Commit graph

148 commits

Author SHA1 Message Date
XiaoSeS
6817d98007
Merge pull request #367 from xring/fix/postgres-lostfound
Some checks are pending
Deploy Docs / build (push) Waiting to run
Deploy Docs / Deploy (push) Blocked by required conditions
Security / Dependency Review (push) Waiting to run
Security / CodeQL (java-kotlin) (push) Waiting to run
Security / CodeQL (javascript-typescript) (push) Waiting to run
Security / CodeQL (python) (push) Waiting to run
fix(deploy): isolate PostgreSQL data from volume root
2026-07-30 09:56:00 +08:00
XiaoSeS
3db3c9685f feat(redis): complete cluster connection support
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 17:36:06 +08:00
XiaoSeS
13b3f2da92 chore(cli): integrate contributor merge update (#606)
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 10:37:03 +08:00
XiaoSeS
a9007a4e8c fix(cli): preserve download error contract (#606)
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 10:31:49 +08:00
dongmucat
c1835fc9e9 merge(main): resolve CLI error mapping conflicts (#606)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-29 10:24:23 +08:00
XiaoSeS
ad4a2dbc2f chore(cli): merge main into PR #608
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 10:19:03 +08:00
XiaoSeS
7872e64177
Merge pull request #609 from iflytek/fix/auth-revoked-token-validation
test(auth): cover revoked CLI token lifecycles
2026-07-29 03:37:47 +08:00
XiaoSeS
0dd600ce13 fix(deploy): preserve PostgreSQL PVC data layout 2026-07-29 01:41:20 +08:00
XiaoSeS
e4fb26d4ba fix(nginx): trust forwarded proto only when configured
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 20:03:50 +08:00
gale-popai
d977ea9dc4
fix(api): tell callers why a request was forbidden (#610)
* fix(api): tell callers why a request was forbidden

The scope filter already computes an exact reason ("Missing API token
scope: skill:delete", "API token cannot access endpoint: /x") and the
access-denied handler discarded it, returning a bare "Forbidden" for
every case: missing scope, endpoint closed to API tokens, and paths
that simply don't exist. Clients cannot tell those apart, so they
guess — the published CLI reports every 403 as "token may lack
required scope", which sent us debugging token scopes for an hour when
the real causes were a revoked token and a mistyped namespace path.

The reason now rides in the response via a new error.forbidden.detail
message (en + zh), and is logged alongside the exception type.

Signed-off-by: Gal Eyal <gal.e@popai.health>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(api): safely expose API token denial reasons

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 17:42:20 +08:00
dongmucat
d4d1f65705 fix(cli): scope local remove by namespace (#606)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 16:58:32 +08:00
dongmucat
a94073004f docs(cli): define namespace error fix plan (#606)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 16:58:31 +08:00
dongmucat
5012b31af2 test(auth): cover CLI session fallback (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 15:22:11 +08:00
dongmucat
8163a48e9e docs(auth): align Bearer-only response contract (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 13:52:42 +08:00
FenjuFu
e5f0cc140a
docs(faq): add community-sourced deployment and operations Q&A (#593)
* docs(faq): add community-sourced deployment and operations Q&A

Adds entries collected from real user-support threads to the reference FAQ
(both zh and en):

- 502 on auth APIs while the page loads, traced to server startup failure
  on the SKILLHUB_DOWNLOAD_ANON_COOKIE_SECRET placeholder guard
- config changes not taking effect (.env.release.example vs .env.release,
  restart vs recreate)
- built-in skill sync failure in offline environments
- upgrade path with Flyway auto-migration and volume retention
- external dependencies and the lack of MySQL support
- granting SUPER_ADMIN to an OAuth account via the bootstrap admin
- telling CLI and server versions apart
- installing skills into a target directory on an intranet

Signed-off-by: FenjuFu <fufenjupku@gmail.com>

* docs(faq): move entries to the published docs source and fix inaccuracies

Move the new FAQ entries from document/ (a generated tree that the docs
build does not read) to docs/skillhub/, which is what make docs-build and
the Pages deploy actually publish.

Also address review feedback:
- drop the SKILLHUB_BUILTIN_SKILLS_ENABLED tip; compose.release.yml does
  not pass that variable through, so setting it has no effect
- correct the dependency list: object storage defaults to local, S3 is
  recommended for production
- soften the 502 wording, since upstream/DNS/network can also cause it
- state the 32-character minimum for the cookie secret
- give a real bulk-install example and qualify v0.2.12 as a server version
- drop entries already covered by existing upgrade/MySQL/version questions

Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>

* docs(faq): correct deployment and admin guidance

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* docs(faq): fix remaining recreate guidance

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* docs(faq): clarify bulk install paths

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: FenjuFu <fufenjupku@gmail.com>
Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Co-authored-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 13:49:38 +08:00
dongmucat
5805e0f1d3 docs(auth): document CLI token failure semantics (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 12:55:35 +08:00
dongmucat
e5b8439678 docs(auth): plan revoked token regression coverage (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 11:37:07 +08:00
dongmucat
6567c19664 docs(auth): tighten runtime validation gates (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 11:20:08 +08:00
dongmucat
03085f19b5 docs(auth): define revoked token validation design (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 11:08:37 +08:00
dongmucat
982258d032
Merge pull request #585 from betterlmy/agent/generic-user-install-target
feat(cli): add generic user-level install target
2026-07-22 17:20:14 +08:00
dongmucat
9af4d391f3
docs(integrations): add Hermes Agent skill guide (#584)
* docs(integrations): add Hermes skill guide

Signed-off-by: dongmucat <1127093059@qq.com>

* docs(integrations): clarify Hermes skill collision handling

Signed-off-by: dongmucat <1127093059@qq.com>

---------

Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-22 15:01:50 +08:00
betterlmy
f519b08a73 fix(cli): preflight canonical install targets
Signed-off-by: betterlmy <betterlmy@icloud.com>
2026-07-17 17:20:22 +08:00
dongmucat
2e4a69d590
Merge pull request #529 from FenjuFu/faq/add-community-qa
Some checks failed
Deploy Docs / build (push) Has been cancelled
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
docs(faq): supplement FAQ (zh & en) with community-sourced Q&A
2026-07-17 10:35:29 +08:00
dongmucat
3a254d7524 fix(auth): guard SUPER_ADMIN role mutations
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-01 16:23:45 +08:00
dongmucat
bf7c71ad2c fix(scanner): backport local LLM base URL handling for #563
Also add Python CodeQL coverage in the security workflow so repository-level script regression checks stay green when Python source exists.

Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-29 14:34:55 +08:00
dongmucat
636f1edac2 docs(auth): align auth me example with #541
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-23 13:54:33 +08:00
dongmucat
f8ea4e67e4
feat(cli): support anonymous public search and install
feat(cli): support anonymous public search and install
2026-06-18 14:29:45 +08:00
dongmucat
22a76515d3
Merge pull request #538 from iflytek/chore/deps-2026-06-security
chore(deps): patch dependabot security alerts
2026-06-17 14:01:39 +08:00
dongmucat
47a0ef1f7f chore(deps): patch dependabot security alerts
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 13:43:43 +08:00
dongmucat
cb4bf94711 fix(cli): filter installable search before pagination
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
b56973fb80 fix(auth): fail closed invalid cli bearer tokens
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
256344cbde fix(review): allow super admin self promotion review
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 11:29:39 +08:00
FenjuFu
e57667ae60 docs(faq): add CLI publish & deployment Q&A (zh & en)
Add more community-sourced questions (both Chinese and English):

- Troubleshooting CLI `skillhub publish` returning 400 (name conflict,
  SKILL.md location/frontmatter, namespace membership, etc.)
- Required skill package structure (SKILL.md in root)
- "malformed input" on publish caused by non-UTF-8 / Chinese-path zips
- Per-package file-count limit and how to raise it
- Minimum server version for CLI features (v0.2.7+)
- PostgreSQL-only (no MySQL); plugins not distributable yet
- How to check server/CLI versions and customize via secondary dev

Signed-off-by: FenjuFu <fufenjupku@gmail.com>
2026-06-16 10:15:36 +08:00
FenjuFu
e3f84b074f docs(faq): use github.io docs URL for online docs link
Signed-off-by: FenjuFu <fufenjupku@gmail.com>
2026-06-16 01:47:00 +08:00
FenjuFu
4aee3a64cd docs(faq): supplement FAQ (zh & en) with community-sourced Q&A
Add questions frequently raised in the user community that were not yet
covered in the SkillHub FAQ, for both Chinese and English pages:

- Recommended deployment via the one-line script vs manual image pulls
- Redirected back to login page after deploying (manual deployment)
- Changing the admin password / why env changes need a restart
- Password change/reset requires email code (SMTP setup)
- Skill naming (English only; Chinese names error in OpenClaw)
- Whether unreviewed skills can be downloaded
- Hiding/removing GitHub & GitLab SSO login options
- Built-in Skill Scanner: iFLYTEK integration over Cisco's scanner (Apache-2.0)
- Which cisco-ai-skill-scanner version is used (unpinned in Dockerfile)
- Note that upgrades preserve registered skills; online docs link

Signed-off-by: FenjuFu <fufenjupku@gmail.com>
2026-06-16 01:47:00 +08:00
dongmucat
4776550391
Merge pull request #498 from iflytek/feature/cloud-url-builtin-skills
feat(bootstrap): sync built-in skills from cloud manifest
2026-06-11 17:27:26 +08:00
XiaoSeS
a88b09e51b fix(publish): accept case-insensitive SKILL.md uploads 2026-06-11 16:34:13 +08:00
dongmucat
1b09ab88a2 fix(bootstrap): enforce strict builtin skill skips
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-10 14:19:41 +08:00
dongmucat
dd3e511a91 fix(bootstrap): support skill directory archives
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-10 10:31:40 +08:00
dongmucat
973c37613e fix(bootstrap): harden builtin skill sync
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-09 14:19:25 +08:00
dongmucat
973c336c82 fix(auth): protect builtin system account boundaries
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-08 18:01:20 +08:00
dongmucat
5cc934a294 fix(bootstrap): harden builtin skill startup sync
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-08 15:20:10 +08:00
dongmucat
4c4a888b01 fix(bootstrap): harden built-in skill startup sync
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-08 14:01:19 +08:00
dongmucat
0f752e2305 docs(bootstrap): add built-in skill cloud setup guide
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-05 17:16:25 +08:00
dongmucat
04caf21e76
fix(audit): resolve 8-hour timezone offset in audit log timestamps (#472)
## Problem
Audit log timestamps displayed 8 hours later than actual time when JVM
default timezone != UTC. Root cause: `audit_log.created_at` was
`TIMESTAMP without time zone`, and `rs.getTimestamp()` interprets bare
values using JVM timezone.

## Solution
### Backend
- **V42 migration**: Upgrade `audit_log.created_at` from `TIMESTAMP` to
  `TIMESTAMPTZ`, anchor historical data as UTC via `USING created_at AT
  TIME ZONE 'UTC'` (same pattern as V18/V19/V23/V25/V36)
- **Read path**: `AdminAuditLogAppService.readInstant()` uses
  `rs.getObject(col, OffsetDateTime.class).toInstant()`, result
  independent of JVM timezone
- **Write path (filter params)**: `startTime`/`endTime` binding changed
  from `Timestamp.from()` to `OffsetDateTime.ofInstant(instant,
  ZoneOffset.UTC)` via `toUtcOffsetDateTime()` helper, symmetric with
  read path

### Migration Safety
- `SET LOCAL lock_timeout = '30s'` (transaction-scoped, won't leak to pool)
- `DO $$ ... IF data_type = 'timestamp without time zone' THEN ... ELSE
  ... END $$` idempotent guard with dual-branch `RAISE NOTICE`
- Safe retry: re-running won't double-apply `AT TIME ZONE 'UTC'`

### Test Coverage (10 tests, 477 total suite)
- `rowMapper_readsCreatedAtAsInstant` — UTC offset regression
- `rowMapper_normalisesNonUtcOffsetToInstant` — Non-UTC offset (+08:00)
- `rowMapper_returnsNullTimestampWhenColumnIsNull` — Null path
- `rowMapper_isIndependentOfJvmDefaultTimezone` — JVM TZ=Asia/Shanghai
  drift prevention with `verify(rs, never()).getTimestamp()`
- `@ParameterizedTest buildWhereClause_bindsTimeRangeAsOffsetDateTime` —
  3 cases (both/startOnly/endOnly) for filter param binding
- `@BeforeEach setUp()` — Mock isolation to prevent cross-test stub
  accumulation

## Quality Gates
- [x] `make test-backend-app` passes (477 tests, 0 failures)
- [x] No Controller changes, `make generate-api` not needed
- [x] No frontend changes, typecheck/lint/e2e not needed

## Deployment
V42 must run before new code (guaranteed by Spring Boot startup sequence
→ Flyway executes before app accepts traffic). Rolling deployment:
- New pod + migrated column: correct
- Old pod + migrated column: old code reads TIMESTAMPTZ correctly (pgjdbc
  returns absolute instant)

## Related Docs
- `docs/15-backend-time-governance-plan.md` §3.1: V42 progress registered
- `docs/16-backend-time-inventory.md` §3.1: V42 listed
- Same migration pattern: V18/V19/V23/V25/V36
2026-06-05 15:28:12 +08:00
dongmucat
1ec93db0d6
Revert "feat(bootstrap): initialize built-in skills (#481)" (#487)
This reverts commit 90fc97e740.
2026-06-05 11:25:02 +08:00
dongmucat
90fc97e740
feat(bootstrap): initialize built-in skills (#481)
* feat(bootstrap): initialize built-in skills

Signed-off-by: dongmucat <1127093059@qq.com>

* docs(builtin-skills): remove implementation plan

Signed-off-by: dongmucat <1127093059@qq.com>

---------

Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-05 10:27:37 +08:00
dongmucat
55b38051ce
chore(deps): bump vite/postcss/picomatch/flatted/esbuild to patch Dependabot alerts
Some checks failed
Deploy Docs / build (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
* chore(deps): bump vite/postcss/picomatch/flatted/esbuild to patch Dependabot alerts

web/:
- pnpm.overrides force vite>=6.4.2, postcss>=8.5.10, picomatch>=2.3.2/>=4.0.4, flatted>=3.4.2
- bump devDeps vite to ^6.4.2 and postcss to ^8.5.10

docs/skillhub/:
- npm overrides force vite^6.4.2, postcss^8.5.10, esbuild^0.25.0
- regenerate package-lock.json

Resolves Dependabot alerts:
- web: GHSA-p9ff-h696-f583 (vite high), GHSA-rf6f-7fwh-wjgh (flatted high),
       GHSA-qx2v-qp2m-jg93 (postcss), GHSA-4w7w-66w2-5vf9 (vite),
       GHSA-3v7f-55p6-f55p (picomatch x2)
- docs: GHSA-67mh-4wv8-2f99 (esbuild), GHSA-qx2v-qp2m-jg93 (postcss),
        GHSA-4w7w-66w2-5vf9 (vite)

* chore(deps): bump brace-expansion and add docs-build PR check

web/:
- pnpm.overrides force brace-expansion>=1.1.13 and >=2.0.3
  to address GHSA-f886-m6hf-6m8v (transitive via eslint/typescript-eslint -> minimatch)
- pnpm-lock.yaml resolves brace-expansion 1.1.15 / 2.1.1

ci:
- add docs-build job to pr-tests.yml, gated by docs/skillhub/** path filter
  so docs-only PRs and dependency overrides on docs are exercised before merge
2026-05-28 10:17:27 +08:00
dongmucat
8c8b047cbb docs(protocol): adopt .agents/skills (plural) as canonical universal fallback
Resolve historical naming drift between protocol spec and CLI by adopting the
plural form across both docs:

- docs/07-skill-protocol.md: drop the drift caveat; the four-tier priority is
  now stated as .agents/skills / ~/.agents/skills / .claude/skills /
  ~/.claude/skills directly.
- docs/00-product-direction.md: align with the same plural form.

The CLI already uses .agents/skills (cli/src/agents/profiles/generic-fallback.ts
and cli/src/agents/resolver.ts). No code change required.
2026-05-19 10:49:31 +08:00
dongmucat
f7ab8f4db7 feat(cli): add --scope option to install command
- Distinguish user vs project install scope via explicit --scope flag
- Interactive mode prompts for scope when --scope/--agent/--dir not provided
- Non-interactive bare install preserves existing behavior (backward compatible)
- Mutual exclusion: --dir cannot be combined with --scope or --agent
- Symmetric fallback: --scope user falls back to ~/.agents/skills,
  --scope project falls back to <cwd>/.agents/skills
- Strict TTY check requires both stdin and stdout TTY plus no --json
- Scope-aware candidate generation avoids root.startsWith(cwd) misjudgement
  when cwd === home or paths overlap
- Correct gemini-cli (.gemini/skills) and kiro-cli (.kiro/skills) paths
  in install path tables across README and guide docs
- Note CLI fallback uses .agents/skills (with s) in skill protocol doc
2026-05-15 14:43:25 +08:00