skill-creator 2.0.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -0
- package/README-zh.md +298 -0
- package/README.md +121 -112
- package/dist/cli.js +8037 -5914
- package/dist/cli.js.map +4 -4
- package/dist/daemon.js +2921 -886
- package/dist/daemon.js.map +4 -4
- package/dist/package.json +1 -1
- package/dist/webui/_app/immutable/assets/0.CT0Z92yp.css +2 -0
- package/dist/webui/_app/immutable/assets/ProviderView.BKgtsfqs.css +1 -0
- package/dist/webui/_app/immutable/chunks/0k4S-8Dm.js +1 -0
- package/dist/webui/_app/immutable/chunks/{C36hgawG.js → BD8KMBgQ.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CnsFCObb.js → BLKqTz4e.js} +1 -1
- package/dist/webui/_app/immutable/chunks/BTdzDCtA.js +1 -0
- package/dist/webui/_app/immutable/chunks/{Bs27XW8_.js → BXwUnloU.js} +1 -1
- package/dist/webui/_app/immutable/chunks/BZOx0Qre.js +1 -0
- package/dist/webui/_app/immutable/chunks/{CLVPf5uP.js → BfKHhAfw.js} +1 -1
- package/dist/webui/_app/immutable/chunks/Bm81ovyU.js +8 -0
- package/dist/webui/_app/immutable/chunks/{DFx4VmvA.js → BpM7GQdD.js} +4 -4
- package/dist/webui/_app/immutable/chunks/{CeR4do8T.js → BpPdtmVY.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BEPs9Z9s.js → C4d-joyd.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{CLM6PwBO.js → CRrxCnau.js} +1 -1
- package/dist/webui/_app/immutable/chunks/CUkgSGd5.js +1 -0
- package/dist/webui/_app/immutable/chunks/{BNZqT8Gb.js → CX1CHr5A.js} +1 -1
- package/dist/webui/_app/immutable/chunks/CaRy05kX.js +1 -0
- package/dist/webui/_app/immutable/chunks/{UeEccMjN.js → CmWHiR19.js} +1 -1
- package/dist/webui/_app/immutable/chunks/CokLx9SK.js +3 -0
- package/dist/webui/_app/immutable/chunks/D-GGMKF5.js +1 -0
- package/dist/webui/_app/immutable/chunks/D00gXCrF.js +2 -0
- package/dist/webui/_app/immutable/chunks/{BIfnT_mK.js → DAvb_BTz.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{D68T6slS.js → DYphEAOV.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{0umLG1IN.js → DlRJa6Rp.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{D-V0xBeS.js → DsOfMPqr.js} +1 -1
- package/dist/webui/_app/immutable/chunks/DxUS3G9A.js +1 -0
- package/dist/webui/_app/immutable/chunks/{CQD9uzpA.js → LKyxHDTu.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{Dl8eQ129.js → WSgbVOcX.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{BFnZD865.js → b00Wice3.js} +2 -2
- package/dist/webui/_app/immutable/chunks/{Ckw1quWt.js → n3HFLfXO.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{DUYTokm-.js → xHmEZGe9.js} +1 -1
- package/dist/webui/_app/immutable/chunks/{D8Der6oM.js → y5ROg0gY.js} +1 -1
- package/dist/webui/_app/immutable/entry/{app.CEIXmsDN.js → app.wmUVPoAL.js} +2 -2
- package/dist/webui/_app/immutable/entry/start.DeqHj237.js +1 -0
- package/dist/webui/_app/immutable/nodes/0.B1MRgs82.js +234 -0
- package/dist/webui/_app/immutable/nodes/{1.sVOukQaO.js → 1.DmFrzXB8.js} +1 -1
- package/dist/webui/_app/immutable/nodes/{2.Cpm2DXYr.js → 2.C5_mWJeB.js} +1 -1
- package/dist/webui/_app/version.json +1 -1
- package/dist/webui/index.html +27 -27
- package/package.json +32 -26
- package/dist/webui/_app/immutable/assets/0.0XN00VKF.css +0 -2
- package/dist/webui/_app/immutable/assets/ProviderView.DEH95hqa.css +0 -1
- package/dist/webui/_app/immutable/chunks/BkEnd9_Z.js +0 -1
- package/dist/webui/_app/immutable/chunks/CIFG41pU.js +0 -1
- package/dist/webui/_app/immutable/chunks/CNPsST_i.js +0 -1
- package/dist/webui/_app/immutable/chunks/CQhmWGDZ.js +0 -8
- package/dist/webui/_app/immutable/chunks/Ce6RiTD3.js +0 -2
- package/dist/webui/_app/immutable/chunks/Ce_bE79q.js +0 -1
- package/dist/webui/_app/immutable/chunks/CryWMAmp.js +0 -1
- package/dist/webui/_app/immutable/chunks/DbA0Nfjq.js +0 -1
- package/dist/webui/_app/immutable/chunks/DkjKuLZP.js +0 -3
- package/dist/webui/_app/immutable/chunks/DrGEPnFY.js +0 -1
- package/dist/webui/_app/immutable/entry/start.A-8tRY5f.js +0 -1
- package/dist/webui/_app/immutable/nodes/0.DtX11nez.js +0 -231
package/README.md
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
- [2026-07-21]「我们默认是破坏性更新的……使用 zod 的 safeParse 来统一解决这个问题,遇到不兼容的就当是空值。」
|
|
11
|
-
- [2026-07-21]「任何外部输入都应该遵循这个规则:各种配置文件、数据库结构、网络返回等。」
|
|
12
|
-
- [2026-07-21]「`skill-creator stop` 找不到 daemon,但 `pnpm dev` 又说已有 daemon 持有 socket。」
|
|
13
|
-
- [2026-07-22]「同意,但是改成 `skill-creator openinbrowser`。」
|
|
14
|
-
正交意图:1. 定义产品边界;2. 给出真实安装与运行方式;3. 说明协议和安全模型;4. 提供开发验证入口;5. 承载品牌门面图(color-symbol)。
|
|
15
|
-
妥协声明:README 是包发布后唯一随包分发的公开入口,安装、运行、边界与安全事实必须同处一份文件,拆分会使发布包缺失必要上下文。品牌图经项目相对路径 `./resources/color-symbol.png` 引用,GitHub 自动渲染为 raw 链接;resources 不进 npm 包,npm 端图片缺失不影响文本可读性,repository 字段引导读者到 GitHub。
|
|
2
|
+
File intent (2026-09-15, bilingual restructure — Owner ruling: "at least bilingual").
|
|
3
|
+
Original user requests: see README-zh.md's intent header (Chinese, canonical history).
|
|
4
|
+
Orthogonal intents: 1. Define the product boundary. 2. State the real install and run path.
|
|
5
|
+
3. Document the protocol and security model. 4. Provide the development verification entry.
|
|
6
|
+
5. Carry the storefront brand mark (color-symbol).
|
|
7
|
+
Compromise: the README ships inside the published package as the only public entry —
|
|
8
|
+
install, run, boundary, and security facts must live in one file; this English canon and
|
|
9
|
+
README-zh.md must evolve in lockstep (same facts, both languages).
|
|
16
10
|
-->
|
|
17
11
|
|
|
18
12
|
<p align="center">
|
|
@@ -21,7 +15,9 @@
|
|
|
21
15
|
|
|
22
16
|
<h1 align="center">Skill Creator</h1>
|
|
23
17
|
|
|
24
|
-
|
|
18
|
+
English | [简体中文](README-zh.md) · Site <https://skill-creator.jixoai.com>
|
|
19
|
+
|
|
20
|
+
Skill Creator is a local-first workbench for Agent skills. A thin CLI manages a single daemon; the daemon hosts everything in its own shell (an SPA with three ChromeTabs-style apps): the agent panel on the right carries conversations, a headless DSH (DeepSeek Harness) kernel drives sessions (agent/session/llm/approval), and the Manager's domain capabilities are exposed as an MCP server (`/mcp`, plus a `skill-creator mcp` stdio form from the same implementation) for the kernel and external clients — every mutation arrives as a proposal awaiting human approval. Skill discovery, validation, and installation run through the ccski SDK; Workspace/Provider projection, permission boundaries, and the cross-route experience belong to Skill Creator, not ccski. When the kernel is unavailable the daemon degrades to a Manager-only surface without blocking startup.
|
|
25
21
|
|
|
26
22
|
```text
|
|
27
23
|
Skill Creator
|
|
@@ -41,21 +37,21 @@ Skill Creator 是本地优先的 Agent 技能工作台。薄 CLI 管理单例 da
|
|
|
41
37
|
validate / toggle change log curated + user sources
|
|
42
38
|
```
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
The top-level navigation is three apps — Workspaces, Creator, Repository. The WebUI uses a ChromeTabs-style tab shell (`webui/src/lib/shell` + `webui/src/lib/apps`); URLs are resolved by the shell's route registry and SvelteKit serves a single catch-all mount point.
|
|
45
41
|
|
|
46
|
-
##
|
|
42
|
+
## Product boundary
|
|
47
43
|
|
|
48
|
-
| Surface |
|
|
49
|
-
| -------------------------- |
|
|
50
|
-
| `/workspaces` home |
|
|
51
|
-
| `/workspaces` provider tab |
|
|
52
|
-
| Global Workspace
|
|
53
|
-
| `/creator` |
|
|
54
|
-
| `/repository` |
|
|
44
|
+
| Surface | Responsibility | Write boundary |
|
|
45
|
+
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
46
|
+
| `/workspaces` home | Index Global and Imported Workspaces; entry points for import and remove-recovery | Remove Workspace deletes only the registry entry, never the user's directory |
|
|
47
|
+
| `/workspaces` provider tab | Discover, filter, inspect, validate, enable, or disable skills in one Workspace's Providers; compare against upstream and reinstall outdated skills; the `Workflow` tab hosts the skill steward workflows (below) | Every operation carries an explicit Workspace ID + Provider ID |
|
|
48
|
+
| Global Workspace (`~`) | Aggregates each Agent's global skills roots | Read/manage existing skills; never a write target for Creator or Repository |
|
|
49
|
+
| `/creator` | Create, load, edit, and delete `SKILL.md` inside imported Workspace.Providers; view the change log (agent sessions live in the right-hand panel, below) | `workspace`+`provider` preselects a new draft; adding `skill` loads it for editing; update/delete require the content revision |
|
|
50
|
+
| `/repository` | Scan Git repositories, preview skills, dry-run, install to multiple targets, and review results; manage curated and user Discover sources | A scan session pins one commit; multiple imported Workspace.Provider write targets; user sources are https-only Git URLs |
|
|
55
51
|
|
|
56
|
-
Workspace
|
|
52
|
+
Workspace is the first scope layer for skills; a Provider is one Agent skills root inside it. The Global Workspace (`~`) resolves this machine's Agent global directories from a community catalog; an Imported Workspace derives each Provider root from its canonical directory. The user submits a directory path only when importing; afterwards, skill reads and writes use daemon-verified `WorkspaceProviderTarget`s, opaque Workspace IDs, and Skill IDs — the WebUI never assembles output paths.
|
|
57
53
|
|
|
58
|
-
Provider catalog
|
|
54
|
+
The Provider catalog is a reviewed snapshot of [vercel-labs/skills](https://github.com/vercel-labs/skills) `src/agents.ts`, living at `src/shared/provider-catalog.ts` at runtime. See [references/README.md](references/README.md) for the local research checkout notes; it is not a runtime or release dependency.
|
|
59
55
|
|
|
60
56
|
```text
|
|
61
57
|
/creator
|
|
@@ -70,42 +66,42 @@ Repository install
|
|
|
70
66
|
-> daemon-verified local Skill IDs -> Review installed -> Creator edit
|
|
71
67
|
```
|
|
72
68
|
|
|
73
|
-
##
|
|
69
|
+
## Requirements
|
|
74
70
|
|
|
75
|
-
- Node.js `>=24
|
|
76
|
-
- Bun `>=1.3
|
|
71
|
+
- Node.js `>=24` (kernel persistence uses `node:zlib`'s zstd; the `package.json` engines field is the same source of truth)
|
|
72
|
+
- Bun `>=1.3` (development and build scripts)
|
|
77
73
|
- pnpm `>=10`
|
|
78
|
-
- Git
|
|
79
|
-
- macOS
|
|
74
|
+
- Git, callable as `git` by the daemon process
|
|
75
|
+
- macOS, Windows (`arm64` / `x64`), or Linux
|
|
80
76
|
|
|
81
|
-
macOS
|
|
77
|
+
macOS and Windows host the native app window through `@opentray/ext-webview` (`appMode: true` joins the taskbar/Dock and app switcher; focus, layering, and closing are managed by the OS). On Linux `@opentray/ext-webview` has no native package, so the default is **web mode**: the daemon mounts a plain OpenTray notification-bar icon (menu + icon) and the WebUI opens in the system browser. Any platform can override explicitly with `--web` / `--no-web`.
|
|
82
78
|
|
|
83
|
-
##
|
|
79
|
+
## Install and development
|
|
84
80
|
|
|
85
|
-
|
|
81
|
+
The repository root is a pnpm workspace that includes `webui`. One install is enough:
|
|
86
82
|
|
|
87
83
|
```bash
|
|
88
84
|
pnpm install
|
|
89
85
|
```
|
|
90
86
|
|
|
91
|
-
|
|
87
|
+
Start the WebUI with HMR and the development daemon:
|
|
92
88
|
|
|
93
89
|
```bash
|
|
94
|
-
pnpm dev #
|
|
95
|
-
pnpm dev --web #
|
|
96
|
-
pnpm dev --no-web #
|
|
90
|
+
pnpm dev # default (native window on macOS/Windows)
|
|
91
|
+
pnpm dev --web # force web mode: plain tray + browser, no native window
|
|
92
|
+
pnpm dev --no-web # force windowed mode (overrides the Linux default)
|
|
97
93
|
```
|
|
98
94
|
|
|
99
|
-
`pnpm dev`
|
|
95
|
+
`pnpm dev` is wrapped by `scripts/dev.sh.ts`: it intercepts `--web` / `--no-web` into the `SKILL_CREATOR_WEB` env (vite itself rejects unknown flags) and passes everything else through to vite. Vite first releases the production daemon and any previous dev process tree, then allocates the daemon port, mounts the `/api/` and `/ws/` proxies ahead of the SvelteKit SPA fallback, and mounts the dev-mode OpenTray. Repeated `pnpm dev` runs need no manual socket cleanup; the takeover waits for both the old daemon's PID and IPC endpoint to release. During the daemon startup window the API returns a retryable `503` instead of falling back to `index.html`. On macOS the dev home defaults to `/tmp/sc-v2`, so app state lives under `/tmp/sc-v2/.skill-creator/` and never touches your real user state. Windows uses `skill-creator-v2-dev` under the system temp directory.
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
Build and full static checks:
|
|
102
98
|
|
|
103
99
|
```bash
|
|
104
100
|
pnpm build
|
|
105
101
|
pnpm check
|
|
106
102
|
```
|
|
107
103
|
|
|
108
|
-
`pnpm build`
|
|
104
|
+
`pnpm build` produces:
|
|
109
105
|
|
|
110
106
|
```text
|
|
111
107
|
dist/
|
|
@@ -117,64 +113,77 @@ dist/
|
|
|
117
113
|
|
|
118
114
|
## CLI
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
Inside the repository use `pnpm skill-creator <command>` after building; as an installed package use `skill-creator <command>`.
|
|
121
117
|
|
|
122
|
-
| Command |
|
|
123
|
-
| --------------- |
|
|
124
|
-
| `start` |
|
|
125
|
-
| `start --web` |
|
|
126
|
-
| `open` |
|
|
127
|
-
| `openinbrowser` |
|
|
128
|
-
| `status` |
|
|
129
|
-
| `stop` |
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
118
|
+
| Command | Behavior |
|
|
119
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
120
|
+
| `start` | Start the daemon, wait for the WebUI and tray to mount, then show the native window; web mode opens the browser; headless prints the `openinbrowser` hint and does not auto-open |
|
|
121
|
+
| `start --web` | Start in web mode: mount only the plain tray icon (menu + icon), no native window; the WebUI opens in the system browser (the Linux default) |
|
|
122
|
+
| `open` | Show and focus the existing tray window; web mode falls back to opening the browser; unavailable headless, hinting `openinbrowser` |
|
|
123
|
+
| `openinbrowser` | Explicitly open the current daemon's tokened WebUI URL in the system browser |
|
|
124
|
+
| `status` | Print PID, version, HTTP port, tray state (mounted/web/headless), and any tray error |
|
|
125
|
+
| `stop` | Stop the production daemon; if the production endpoint is gone, discover and stop the dev daemon, waiting for endpoint release |
|
|
126
|
+
| `search` | Search local skills in-process (BM25 + skill tokenizer, no daemon required); see [Skill search](#skill-search) |
|
|
127
|
+
| `version` | Print the package version |
|
|
128
|
+
| `help` | Print command help |
|
|
132
129
|
|
|
133
130
|
```bash
|
|
134
131
|
pnpm build
|
|
135
132
|
pnpm skill-creator start
|
|
136
|
-
pnpm skill-creator start --web #
|
|
133
|
+
pnpm skill-creator start --web # force web mode (plain tray + browser)
|
|
137
134
|
pnpm skill-creator status
|
|
138
135
|
pnpm skill-creator open
|
|
139
136
|
pnpm skill-creator openinbrowser
|
|
140
137
|
pnpm skill-creator stop
|
|
141
138
|
```
|
|
142
139
|
|
|
143
|
-
|
|
140
|
+
The commands above were exercised against the built output (`dist/`, identical to the published package): headless `start` prints the recovery hint and exits 0; `status` prints pid/version/port/tray state, the DSH host health line (`--json` prints the full state), and the tokened WebUI URL; `open` is unavailable headless and hints `openinbrowser`; `openinbrowser` prints and invokes the system browser; after `stop` the HTTP endpoint releases immediately and `status` reports ENOENT with the `start` recovery entry. The published package was black-box tested the same way (start/status/stop/restart) after `npm install <tarball>` in an empty directory outside the repo (ccski is bundled into the output, no `link:` dependency; reproduce with `bun scripts/clean-install-check.sh.ts`, evidence in `docs/release/skill-steward.md`). Runtime requires Node `>=24.0.0` (kernel persistence uses `node:zlib`'s zstd; the `node:module` `stripTypeScriptTypes` that DSH code-runtime needs requires `>=22.13`, already covered by 24).
|
|
141
|
+
|
|
142
|
+
## Skill search
|
|
143
|
+
|
|
144
|
+
`skill-creator search <query...>` searches every local skill — all Global Workspace provider roots plus every Imported Workspace — in-process, without the daemon:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
skill-creator search "React组件设计" # human-readable output
|
|
148
|
+
skill-creator search react component --json # machine-readable: { "results": [...] }
|
|
149
|
+
skill-creator search http3 --limit 20 # limit 1..50, default 10
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Results are canonical: multiple installations of the same skill (symlinks included) collapse into one entry with an `installations` list, and byte-identical copies fold into `duplicates`. Ranking is field-weighted BM25+ (name ×10 … body ×1) plus a frozen rerank pass, with prefix and fuzzy (typo) matching; ordering is deterministic and replayable. The first run builds a persistent index under `~/.skill-creator/search-index.json`; later runs refresh it incrementally via stat checks (mtime/size/inode/ctime), so unchanged corpora are not re-read. Exit codes: `0` on a successful query (including zero results), `1` for an empty query, a bad flag, or an index I/O failure. Design, frozen tokenizer/ranking contracts, and benchmark methodology: [docs/search-design.md](docs/search-design.md).
|
|
144
153
|
|
|
145
|
-
##
|
|
154
|
+
## Skill Steward
|
|
146
155
|
|
|
147
|
-
|
|
156
|
+
The skill steward is a Manager-owned maintenance workflow: choose a task and scope → run → review evidence → human approval → apply → roll back if needed. The entry point is the **Workflow** tab in the Workspaces provider view.
|
|
148
157
|
|
|
149
|
-
## Agent
|
|
158
|
+
## Agent panel and the MCP capability surface
|
|
150
159
|
|
|
151
|
-
- **Agent
|
|
152
|
-
- **
|
|
153
|
-
- **MCP
|
|
154
|
-
- **
|
|
160
|
+
- **Agent panel**: a shell-level right drawer (440px resident ≥720px, full-screen overlay on narrow screens) that survives tab switches. Session list/create/switch, conversation streams (tool rows expand inputs/results), ask_user_question approval cards, model/preset/approval configuration projection; disconnects are visible and recoverable.
|
|
161
|
+
- **Headless kernel**: the daemon boots a single `dsh-base` bundle (no DSH webui/HTTP surface); the product preset carries only persona + ask-user, with generic bash/fs/web tool rows disabled; the official `@deepseek-ai/dsh-mcp-client` bridge registers Manager capabilities as `mcp__skill-creator__*` tools.
|
|
162
|
+
- **MCP surface**: `/mcp` (loopback + Bearer web token, stateless streamable HTTP) and `skill-creator mcp` (stdio, readonly-narrowed) share one implementation; skill documents also have a readonly resource template. Tool results automatically attach `ui://` visual cards per capability (skill info/findings/proposals/install results, with in-app navigation); the panel renders them in sandboxed iframes with untrusted text forcibly escaped.
|
|
163
|
+
- **Authority red line**: MCP mutations always produce proposals (`*_propose` tools) awaiting human approval in the panel before the Manager executes them; the Manager forever owns path, revision, toggle, install, update, and approval authority.
|
|
155
164
|
|
|
156
|
-
###
|
|
165
|
+
### Model configuration
|
|
157
166
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
- approval
|
|
167
|
+
- Opening the Workflow tab shows the current runtime config (model, preset, approval policy, revision). The preset is `deterministic` (built-in scripted transport, zero credentials, works offline) or `live` (a real provider).
|
|
168
|
+
- Switching to `live` requires writing an API key for the chosen provider first (credentials live in a daemon-private file `0600`; the UI only echoes the configured state, never the value).
|
|
169
|
+
- The approval policy `ask` / `never` only affects the agent's interaction policy while running; **apply always requires a human-approved one-time grant** — the policy never widens authorization.
|
|
161
170
|
|
|
162
|
-
###
|
|
171
|
+
### Maintenance flow
|
|
163
172
|
|
|
164
|
-
1.
|
|
165
|
-
2.
|
|
166
|
-
3. `Run
|
|
167
|
-
4.
|
|
168
|
-
5.
|
|
173
|
+
1. Pick a task: `Check` (read-only health inspection), `Optimize` (edit optimization), `Organize` (split/merge/toggle cleanup).
|
|
174
|
+
2. Pick a scope: check a subset of skills (empty = the whole Provider), optionally with up to 2000 characters of supplementary instructions.
|
|
175
|
+
3. `Run`: the daemon takes a snapshot, the agent executes through five domain-whitelisted tools (every call returns to the Manager registry for audit), and proposals come out.
|
|
176
|
+
4. Review: each proposal card goes `Validate` (per-item checks) → `Approve` (mints a one-time grant bound to the patch fingerprint and all input revisions) → `Apply` (a journaled transaction; the mutation diff table lists relPath/semantics/revision changes).
|
|
177
|
+
5. Roll back: after `Prepare rollback`, choose per proposal type — toggle-type reverse operations are reverse proposals (Approve reverse / Apply reverse again); split/merge types roll back directly with `Rollback (replay)` replaying the journal backwards. Byte-exact disk restoration is guaranteed by the transaction layer.
|
|
169
178
|
|
|
170
|
-
###
|
|
179
|
+
### Recovery flows
|
|
171
180
|
|
|
172
|
-
- **DSH
|
|
173
|
-
- **
|
|
174
|
-
-
|
|
175
|
-
- **
|
|
181
|
+
- **DSH kernel unavailable** (missing package/version mismatch/plugin failure): the daemon explicitly degrades to the Manager-only surface (no agent sessions; `agent.*` returns a typed UNAVAILABLE) and `status`'s `dsh` field carries the reason; restarting the daemon is the recovery path.
|
|
182
|
+
- **Apply terminal states `recovery-required` / `compensated`**: the proposal card shows a banner with the daemon-side failure reason; `compensated` means the transaction already rolled itself back, `recovery-required` means leftovers must be handled per the hint (file state is preserved, never silently overwritten). Re-run the task for fresh proposals afterwards — proposals whose revisions drifted are rejected at validation (`stale`).
|
|
183
|
+
- **Reconnects**: task/scope selection, runtime config, and the latest run projection survive reconnects; late responses never overwrite newer state.
|
|
184
|
+
- **Daemon restart**: `skill-creator stop && skill-creator start`; unconsumed approval grants all expire (authorizations are never replayed) and need re-approval.
|
|
176
185
|
|
|
177
|
-
##
|
|
186
|
+
## Runtime architecture
|
|
178
187
|
|
|
179
188
|
```text
|
|
180
189
|
src/cli/cli.ts
|
|
@@ -210,7 +219,7 @@ src/daemon/ipc-server.ts ---------------------- single-instance owner
|
|
|
210
219
|
| `-- proposals --------- mutation→proposal approval chain
|
|
211
220
|
|-- capability/ ------------- capability-core + domain registry
|
|
212
221
|
|-- dsh-settings.ts ------- model/preset/permissions
|
|
213
|
-
`-- acp-bridge-service.ts [internal legacy] agent subprocess + fs security gate
|
|
222
|
+
`-- acp-bridge-service.ts [internal legacy] agent subprocess + fs security gate (product entry removed, 3.2)
|
|
214
223
|
|
|
215
224
|
src/shared/rpc-contract.ts
|
|
216
225
|
^ ^
|
|
@@ -218,24 +227,24 @@ src/shared/rpc-contract.ts
|
|
|
218
227
|
daemon webui/src/lib/rpc-client.ts
|
|
219
228
|
```
|
|
220
229
|
|
|
221
|
-
|
|
230
|
+
Browser-safe contracts compose in `src/shared/rpc-contract.ts`, with the concrete schemas physically split under `src/shared/contracts/`:
|
|
222
231
|
|
|
223
|
-
| RPC module | Procedures
|
|
224
|
-
| -------------- |
|
|
225
|
-
| `skills` | `list`, `info`, `toggle`, `validate`, `update.check`, `update.apply`
|
|
226
|
-
| `workspace` | `list`, `add`, `remove`, `setActive`
|
|
227
|
-
| `creator` | `save`, `load`, `remove`, `revisions`
|
|
228
|
-
| `repository` | `scan`, `preview`, `install`, `sources.list`, `sources.add`, `sources.remove`
|
|
229
|
-
| `daemon` | `status`
|
|
230
|
-
| `skillSteward` | `startRun`, `validate`, `approve`, `apply`, `prepareRollback`, `applyRollback
|
|
231
|
-
| `agent` | `sessions.list/streams`, `session.create/prompt/cancel/stream/answer`, `card.get`, `proposals.list/approve/reject`, `settings.get/update`, `credentials.set/clear
|
|
232
|
-
| `acp` | `agents.list`, `session.open`, `session.close
|
|
232
|
+
| RPC module | Procedures |
|
|
233
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
234
|
+
| `skills` | `list`, `info`, `toggle`, `validate`, `update.check`, `update.apply` |
|
|
235
|
+
| `workspace` | `list`, `add`, `remove`, `setActive` |
|
|
236
|
+
| `creator` | `save`, `load`, `remove`, `revisions` |
|
|
237
|
+
| `repository` | `scan`, `preview`, `install`, `sources.list`, `sources.add`, `sources.remove` |
|
|
238
|
+
| `daemon` | `status` |
|
|
239
|
+
| `skillSteward` | `startRun`, `validate`, `approve`, `apply`, `prepareRollback`, `applyRollback` (human approval surface; apply/rollback are journaled transactions) |
|
|
240
|
+
| `agent` | `sessions.list/streams`, `session.create/prompt/cancel/stream/answer`, `card.get`, `proposals.list/approve/reject`, `settings.get/update`, `credentials.set/clear` (panel + approval chain + config projection) |
|
|
241
|
+
| `acp` | `agents.list`, `session.open`, `session.close` (internal legacy, not a product entry) |
|
|
233
242
|
|
|
234
|
-
WebUI
|
|
243
|
+
The WebUI derives its client types from the shared contract; the daemon implements handlers against the same one. Network input and output both pass Zod runtime validation.
|
|
235
244
|
|
|
236
|
-
Workspace
|
|
245
|
+
Workspace lists, skill lists/details, and repository scan/preview each carry an independent request generation; a newer request, a scope switch, or an RPC client replacement revokes an older response's commit eligibility so slow responses never clobber fresh UI state. Revoked read/write requests never trigger follow-up refreshes or navigation on a new connection; a dirty draft the Creator has accepted survives disconnect-reconnects.
|
|
237
246
|
|
|
238
|
-
##
|
|
247
|
+
## Security model
|
|
239
248
|
|
|
240
249
|
```text
|
|
241
250
|
explicit import path
|
|
@@ -253,32 +262,32 @@ Git source + ref --> temporary clone --> commit SHA --> repo_<session>
|
|
|
253
262
|
preview/install --+--> same snapshot
|
|
254
263
|
```
|
|
255
264
|
|
|
256
|
-
- HTTP
|
|
257
|
-
- daemon
|
|
258
|
-
- IPC endpoint
|
|
259
|
-
- Workspace
|
|
260
|
-
-
|
|
261
|
-
- Creator
|
|
262
|
-
- Repository
|
|
263
|
-
- Repository
|
|
264
|
-
-
|
|
265
|
-
- daemon
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
|
|
269
|
-
##
|
|
270
|
-
|
|
271
|
-
|
|
|
265
|
+
- HTTP listens on `127.0.0.1` only. `/api/health` and the static SPA perform no filesystem mutations.
|
|
266
|
+
- The daemon mints a 32-byte web token at every startup. The token reaches the WebUI through the URL fragment, is captured into the tab's `sessionStorage`, and is removed from the address bar; `/ws/rpc` validates it before the protocol upgrade.
|
|
267
|
+
- The IPC endpoint is the single-instance lock. On macOS the runtime directory is `0700` and the socket `0600`; Windows uses `\\.\pipe\skill-creator-sock`.
|
|
268
|
+
- Workspace, Provider, Skill, Repository Session, and Remote Skill are all bound to server-generated or server-verified identities. Apart from the explicit import in `workspace.add` and the Git source in `repository.scan`, mutations never accept caller-supplied output paths.
|
|
269
|
+
- Exactly one in-memory Workspace Registry lives for the daemon's lifetime. Persisted paths must be absolute and normalized; `ws_*` must match the path digest; import, remove, and switch atomically commit the full next state before replacing memory. `skillCount` and availability derive at read time and are never written back.
|
|
270
|
+
- Creator drafts may only create direct children of an imported Workspace.Provider; edits and deletes must stay inside that Provider root. Documents land atomically via a temp file plus rename; update/delete reject stale operations on SHA-256 revision mismatch.
|
|
271
|
+
- Repository scans clone first, then narrow the HEAD commit with Zod. Preview and install reuse the same temporary snapshot and session ID; eviction immediately rejects new operations but lets accepted installs hold the snapshot until done. daemon stop aborts pending clones, and late scans cannot re-register a session.
|
|
272
|
+
- Repository installs cannot target `~`; every target must be an imported, writable Workspace.Provider. Multiple targets yield per-skill, per-target independent results.
|
|
273
|
+
- The repository install summary carries the Workspace.Provider targets committed at install time; the ccski installer output is first narrowed by a runtime schema, and only items actually `installed` / `overwritten` and re-verified as a direct, non-symlink `SKILL.md` child of the Provider root receive a local Skill ID for Creator review.
|
|
274
|
+
- The daemon publishes its stop coordinator and signal listeners before mounting the tray. Stop closes HTTP/WebSocket and IPC admission first, then reclaims repository, tray, and connections in parallel; native handles arriving late during mount are destroyed immediately, uncooperative sockets are force-closed after the grace deadline, and concurrent stops converge on one completion state.
|
|
275
|
+
- Every external read decodes to `unknown` first and then runs the current Zod schema's `safeParse`. Incompatible snapshots inside config files, future database records, and third-party/network responses project to their domain's empty value; collections drop invalid entries; results that cannot safely read as empty return typed failures. RPC/IPC, authentication, paths, and mutation inputs are still rejected explicitly — never degraded to empty.
|
|
276
|
+
- The current v2 registry has no migration layer for older schemas. JSON syntax errors or states that fail the current Zod schema load as empty: nothing is read, converted, or written back at load time; the next normal workspace mutation atomically commits the current v2 state. File I/O errors still refuse startup and log to `.skill-creator/logs/daemon.log` under the current home. There is no database today; when one lands, database reads must follow the same projection law.
|
|
277
|
+
|
|
278
|
+
## State paths
|
|
279
|
+
|
|
280
|
+
| State | macOS / release | Windows / release |
|
|
272
281
|
| ------------------ | ----------------------------------------- | ---------------------------------------------- |
|
|
273
|
-
|
|
|
282
|
+
| App directory | `~/.skill-creator/` | `%USERPROFILE%\.skill-creator\` |
|
|
274
283
|
| Workspace registry | `~/.skill-creator/workspaces.json` | `%USERPROFILE%\.skill-creator\workspaces.json` |
|
|
275
|
-
|
|
|
284
|
+
| User repo sources | `~/.skill-creator/sources.json` | `%USERPROFILE%\.skill-creator\sources.json` |
|
|
276
285
|
| Daemon log | `~/.skill-creator/logs/daemon.log` | `%USERPROFILE%\.skill-creator\logs\daemon.log` |
|
|
277
286
|
| IPC | `~/.skill-creator/run/skill-creator.sock` | `\\.\pipe\skill-creator-sock-<home-digest>` |
|
|
278
287
|
|
|
279
|
-
`SKILL_CREATOR_HOME`
|
|
288
|
+
`SKILL_CREATOR_HOME` overrides the home root for the current command; the app still creates `.skill-creator/` under it. `SKILL_CREATOR_DEV_HOME` overrides the dev runtime discovery path specifically; on macOS it defaults to `/tmp/sc-v2/.skill-creator/`.
|
|
280
289
|
|
|
281
|
-
##
|
|
290
|
+
## Verification
|
|
282
291
|
|
|
283
292
|
```bash
|
|
284
293
|
pnpm test
|