@cat-kit/agent-context 1.2.1 → 1.2.2
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/README.md +16 -11
- package/dist/cli.js +1 -1
- package/dist/stats.html +1 -1
- package/dist/tools.js +1 -1
- package/package.json +1 -1
- package/src/cli.ts +8 -2
- package/src/tools.ts +23 -1
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -61,11 +61,14 @@ agent-context install
|
|
|
61
61
|
agent-context install --tools claude,codex,cursor
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
安装完成后,CLI 会在对应目录生成 Skill
|
|
64
|
+
安装完成后,CLI 会在对应目录生成 Skill 文件(技能目录名为 `ac-workflow`),例如:
|
|
65
65
|
|
|
66
|
-
- Codex: `.codex/skills/
|
|
67
|
-
- Claude: `.claude/skills/
|
|
68
|
-
- Cursor: `.cursor/skills/
|
|
66
|
+
- Codex: `.codex/skills/ac-workflow/`
|
|
67
|
+
- Claude: `.claude/skills/ac-workflow/`
|
|
68
|
+
- Cursor: `.cursor/skills/ac-workflow/`
|
|
69
|
+
- Antigravity: `.agent/skills/ac-workflow/`
|
|
70
|
+
- Agent Skills(开放标准,如 Gemini CLI 等工具的 `.agents` 别名): `.agents/skills/ac-workflow/`
|
|
71
|
+
- Gemini CLI: `.gemini/skills/ac-workflow/`
|
|
69
72
|
|
|
70
73
|
## 快速开始
|
|
71
74
|
|
|
@@ -346,13 +349,15 @@ agent-context index
|
|
|
346
349
|
|
|
347
350
|
## 支持的工具
|
|
348
351
|
|
|
349
|
-
| 工具 | Skill 目录
|
|
350
|
-
| -------------- |
|
|
351
|
-
| Claude | `.claude/skills/
|
|
352
|
-
| Codex | `.codex/skills/
|
|
353
|
-
| Cursor | `.cursor/skills/
|
|
354
|
-
| Antigravity | `.agent/skills/
|
|
355
|
-
|
|
|
352
|
+
| 工具 | Skill 目录 |
|
|
353
|
+
| -------------- | ------------------------------ |
|
|
354
|
+
| Claude | `.claude/skills/ac-workflow/` |
|
|
355
|
+
| Codex | `.codex/skills/ac-workflow/` |
|
|
356
|
+
| Cursor | `.cursor/skills/ac-workflow/` |
|
|
357
|
+
| Antigravity | `.agent/skills/ac-workflow/` |
|
|
358
|
+
| Agent Skills(开放标准) | `.agents/skills/ac-workflow/` |
|
|
359
|
+
| Gemini CLI | `.gemini/skills/ac-workflow/` |
|
|
360
|
+
| GitHub Copilot | `.github/skills/ac-workflow/` |
|
|
356
361
|
|
|
357
362
|
其中 Codex 会额外生成 `agents/openai.yaml` 元数据文件,其余工具只生成 Skill 内容本身。
|
|
358
363
|
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{doneCommand as e}from"./commands/done.js";import{indexCommand as t}from"./commands/index-cmd.js";import{initCommand as n}from"./commands/init.js";import{installCommand as r}from"./commands/install.js";import{statusCommand as i}from"./commands/status.js";import{syncCommand as a}from"./commands/sync.js";import{validateCommand as o}from"./commands/validate.js";import{readFileSync as s}from"node:fs";import{Command as c}from"commander";const l=JSON.parse(s(new URL(`../package.json`,import.meta.url),`utf8`)),u=typeof l.version==`string`?l.version:`0.0.0`,d=new c;d.name(`agent-context`).description(`Agent Context Skills 安装工具`).version(u),d.command(`install`).description(`安装 ac-workflow Skill`).option(`--tools <tools>`,`指定目标工具,逗号分隔:claude,codex,cursor,antigravity,copilot`).option(`--yes`,`非交互模式:优先复用已安装工具,否则安装全部工具`).option(`--check`,`仅检查是否存在待更新内容,不写入文件`).action(r),d.command(`sync`).description(`同步已安装的 ac-workflow Skill`).option(`--tools <tools>`,`指定目标工具,逗号分隔:claude,codex,cursor,antigravity,copilot`).option(`--check`,`仅检查是否存在待更新内容,不写入文件`).action(a),d.command(`init`).description(`初始化 SCOPE(从 git user.name 自动获取或手动指定)`).option(`--scope <name>`,`手动指定 SCOPE 名称`).option(`--yes`,`非交互模式:自动覆盖已存在的 SCOPE`).action(n),d.command(`validate`).description(`校验 .agent-context 目录结构`).action(o),d.command(`status`).description(`查看当前 agent-context 状态`).action(i),d.command(`done`).description(`归档当前已执行计划`).option(`--yes`,`跳过确认,直接归档`).action(e),d.command(`index`).description(`生成或更新计划索引文件`).action(t),d.parseAsync().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`\n❌ ${t}`),process.exitCode=1});export{};
|
|
2
|
+
import{doneCommand as e}from"./commands/done.js";import{indexCommand as t}from"./commands/index-cmd.js";import{initCommand as n}from"./commands/init.js";import{installCommand as r}from"./commands/install.js";import{statusCommand as i}from"./commands/status.js";import{syncCommand as a}from"./commands/sync.js";import{validateCommand as o}from"./commands/validate.js";import{readFileSync as s}from"node:fs";import{Command as c}from"commander";const l=JSON.parse(s(new URL(`../package.json`,import.meta.url),`utf8`)),u=typeof l.version==`string`?l.version:`0.0.0`,d=new c;d.name(`agent-context`).description(`Agent Context Skills 安装工具`).version(u),d.command(`install`).description(`安装 ac-workflow Skill`).option(`--tools <tools>`,`指定目标工具,逗号分隔:claude,codex,cursor,antigravity,agents,gemini,copilot`).option(`--yes`,`非交互模式:优先复用已安装工具,否则安装全部工具`).option(`--check`,`仅检查是否存在待更新内容,不写入文件`).action(r),d.command(`sync`).description(`同步已安装的 ac-workflow Skill`).option(`--tools <tools>`,`指定目标工具,逗号分隔:claude,codex,cursor,antigravity,agents,gemini,copilot`).option(`--check`,`仅检查是否存在待更新内容,不写入文件`).action(a),d.command(`init`).description(`初始化 SCOPE(从 git user.name 自动获取或手动指定)`).option(`--scope <name>`,`手动指定 SCOPE 名称`).option(`--yes`,`非交互模式:自动覆盖已存在的 SCOPE`).action(n),d.command(`validate`).description(`校验 .agent-context 目录结构`).action(o),d.command(`status`).description(`查看当前 agent-context 状态`).action(i),d.command(`done`).description(`归档当前已执行计划`).option(`--yes`,`跳过确认,直接归档`).action(e),d.command(`index`).description(`生成或更新计划索引文件`).action(t),d.parseAsync().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`\n❌ ${t}`),process.exitCode=1});export{};
|
package/dist/stats.html
CHANGED
|
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
|
|
|
4930
4930
|
</script>
|
|
4931
4931
|
<script>
|
|
4932
4932
|
/*<!--*/
|
|
4933
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"cli.d.ts","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/cli.d.ts","uid":"2800e162-1"}]},{"name":"cli.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/cli.ts","uid":"2800e162-3"}]},{"name":"commands/done.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/done.ts","uid":"2800e162-5"}]},{"name":"commands/index-cmd.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/index-cmd.ts","uid":"2800e162-7"}]},{"name":"commands/init.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/init.ts","uid":"2800e162-9"}]},{"name":"commands/install.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/install.ts","uid":"2800e162-11"}]},{"name":"commands/printer.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/printer.ts","uid":"2800e162-13"}]},{"name":"commands/status.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/status.ts","uid":"2800e162-15"}]},{"name":"commands/sync.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/sync.ts","uid":"2800e162-17"}]},{"name":"commands/validate.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/validate.ts","uid":"2800e162-19"}]},{"name":"content/actions.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/content/actions.ts","uid":"2800e162-21"}]},{"name":"content/index.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/content/index.ts","uid":"2800e162-23"}]},{"name":"context/archiver.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/archiver.ts","uid":"2800e162-25"}]},{"name":"context/indexer.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/indexer.ts","uid":"2800e162-27"}]},{"name":"context/reader.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/reader.ts","uid":"2800e162-29"}]},{"name":"context/scope.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/scope.ts","uid":"2800e162-31"}]},{"name":"context/validator.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/validator.ts","uid":"2800e162-33"}]},{"name":"runner.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/runner.ts","uid":"2800e162-35"}]},{"name":"tools.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/tools.ts","uid":"2800e162-37"}]}],"isRoot":true},"nodeParts":{"2800e162-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-0"},"2800e162-3":{"renderedLength":1863,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-2"},"2800e162-5":{"renderedLength":1508,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-4"},"2800e162-7":{"renderedLength":629,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-6"},"2800e162-9":{"renderedLength":718,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-8"},"2800e162-11":{"renderedLength":1005,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-10"},"2800e162-13":{"renderedLength":909,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-12"},"2800e162-15":{"renderedLength":993,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-14"},"2800e162-17":{"renderedLength":765,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-16"},"2800e162-19":{"renderedLength":813,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-18"},"2800e162-21":{"renderedLength":11445,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-20"},"2800e162-23":{"renderedLength":4355,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-22"},"2800e162-25":{"renderedLength":1012,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-24"},"2800e162-27":{"renderedLength":1274,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-26"},"2800e162-29":{"renderedLength":2276,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-28"},"2800e162-31":{"renderedLength":1479,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-30"},"2800e162-33":{"renderedLength":1905,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-32"},"2800e162-35":{"renderedLength":2037,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-34"},"2800e162-37":{"renderedLength":2174,"gzipLength":0,"brotliLength":0,"metaUid":"2800e162-36"}},"nodeMetas":{"2800e162-0":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/cli.d.ts","moduleParts":{"cli.d.ts":"2800e162-1"},"imported":[],"importedBy":[],"isEntry":true},"2800e162-2":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/cli.ts","moduleParts":{"cli.js":"2800e162-3"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-39"},{"uid":"2800e162-4"},{"uid":"2800e162-6"},{"uid":"2800e162-8"},{"uid":"2800e162-10"},{"uid":"2800e162-14"},{"uid":"2800e162-16"},{"uid":"2800e162-18"}],"importedBy":[],"isEntry":true},"2800e162-4":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/done.ts","moduleParts":{"commands/done.js":"2800e162-5"},"imported":[{"uid":"2800e162-40"},{"uid":"2800e162-41"},{"uid":"2800e162-42"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-6":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/index-cmd.ts","moduleParts":{"commands/index-cmd.js":"2800e162-7"},"imported":[{"uid":"2800e162-40"},{"uid":"2800e162-42"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-8":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/init.ts","moduleParts":{"commands/init.js":"2800e162-9"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-43"},{"uid":"2800e162-40"},{"uid":"2800e162-41"},{"uid":"2800e162-30"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-10":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/install.ts","moduleParts":{"commands/install.js":"2800e162-11"},"imported":[{"uid":"2800e162-41"},{"uid":"2800e162-34"},{"uid":"2800e162-36"},{"uid":"2800e162-12"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-12":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/printer.ts","moduleParts":{"commands/printer.js":"2800e162-13"},"imported":[{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-10"},{"uid":"2800e162-16"}]},"2800e162-14":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/status.ts","moduleParts":{"commands/status.js":"2800e162-15"},"imported":[{"uid":"2800e162-42"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-16":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/sync.ts","moduleParts":{"commands/sync.js":"2800e162-17"},"imported":[{"uid":"2800e162-34"},{"uid":"2800e162-36"},{"uid":"2800e162-12"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-18":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/validate.ts","moduleParts":{"commands/validate.js":"2800e162-19"},"imported":[{"uid":"2800e162-42"}],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-20":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/content/actions.ts","moduleParts":{"content/actions.js":"2800e162-21"},"imported":[],"importedBy":[{"uid":"2800e162-22"}]},"2800e162-22":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/content/index.ts","moduleParts":{"content/index.js":"2800e162-23"},"imported":[{"uid":"2800e162-20"}],"importedBy":[{"uid":"2800e162-34"}]},"2800e162-24":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/archiver.ts","moduleParts":{"context/archiver.js":"2800e162-25"},"imported":[{"uid":"2800e162-43"},{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-42"}]},"2800e162-26":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/indexer.ts","moduleParts":{"context/indexer.js":"2800e162-27"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-43"},{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-42"}]},"2800e162-28":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/reader.ts","moduleParts":{"context/reader.js":"2800e162-29"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-43"},{"uid":"2800e162-40"},{"uid":"2800e162-30"}],"importedBy":[{"uid":"2800e162-42"}]},"2800e162-30":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/scope.ts","moduleParts":{"context/scope.js":"2800e162-31"},"imported":[{"uid":"2800e162-44"},{"uid":"2800e162-38"},{"uid":"2800e162-43"},{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-8"},{"uid":"2800e162-42"},{"uid":"2800e162-28"}]},"2800e162-32":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/validator.ts","moduleParts":{"context/validator.js":"2800e162-33"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-42"}]},"2800e162-34":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/runner.ts","moduleParts":{"runner.js":"2800e162-35"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-43"},{"uid":"2800e162-40"},{"uid":"2800e162-22"},{"uid":"2800e162-36"}],"importedBy":[{"uid":"2800e162-10"},{"uid":"2800e162-16"}]},"2800e162-36":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/tools.ts","moduleParts":{"tools.js":"2800e162-37"},"imported":[{"uid":"2800e162-38"},{"uid":"2800e162-40"}],"importedBy":[{"uid":"2800e162-10"},{"uid":"2800e162-16"},{"uid":"2800e162-34"}]},"2800e162-38":{"id":"node:fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-2"},{"uid":"2800e162-8"},{"uid":"2800e162-30"},{"uid":"2800e162-34"},{"uid":"2800e162-36"},{"uid":"2800e162-28"},{"uid":"2800e162-32"},{"uid":"2800e162-26"}]},"2800e162-39":{"id":"commander","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-2"}]},"2800e162-40":{"id":"node:path","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-4"},{"uid":"2800e162-6"},{"uid":"2800e162-8"},{"uid":"2800e162-30"},{"uid":"2800e162-34"},{"uid":"2800e162-36"},{"uid":"2800e162-12"},{"uid":"2800e162-28"},{"uid":"2800e162-32"},{"uid":"2800e162-24"},{"uid":"2800e162-26"}]},"2800e162-41":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-4"},{"uid":"2800e162-8"},{"uid":"2800e162-10"}]},"2800e162-42":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/index.ts","moduleParts":{},"imported":[{"uid":"2800e162-28"},{"uid":"2800e162-32"},{"uid":"2800e162-24"},{"uid":"2800e162-26"},{"uid":"2800e162-30"}],"importedBy":[{"uid":"2800e162-4"},{"uid":"2800e162-6"},{"uid":"2800e162-14"},{"uid":"2800e162-18"}]},"2800e162-43":{"id":"node:fs/promises","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-8"},{"uid":"2800e162-30"},{"uid":"2800e162-34"},{"uid":"2800e162-28"},{"uid":"2800e162-24"},{"uid":"2800e162-26"}]},"2800e162-44":{"id":"node:child_process","moduleParts":{},"imported":[],"importedBy":[{"uid":"2800e162-30"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4933
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"cli.d.ts","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/cli.d.ts","uid":"e9c35142-1"}]},{"name":"cli.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/cli.ts","uid":"e9c35142-3"}]},{"name":"commands/done.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/done.ts","uid":"e9c35142-5"}]},{"name":"commands/index-cmd.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/index-cmd.ts","uid":"e9c35142-7"}]},{"name":"commands/init.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/init.ts","uid":"e9c35142-9"}]},{"name":"commands/install.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/install.ts","uid":"e9c35142-11"}]},{"name":"commands/printer.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/printer.ts","uid":"e9c35142-13"}]},{"name":"commands/status.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/status.ts","uid":"e9c35142-15"}]},{"name":"commands/sync.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/sync.ts","uid":"e9c35142-17"}]},{"name":"commands/validate.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/commands/validate.ts","uid":"e9c35142-19"}]},{"name":"content/actions.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/content/actions.ts","uid":"e9c35142-21"}]},{"name":"content/index.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/content/index.ts","uid":"e9c35142-23"}]},{"name":"context/archiver.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/archiver.ts","uid":"e9c35142-25"}]},{"name":"context/indexer.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/indexer.ts","uid":"e9c35142-27"}]},{"name":"context/reader.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/reader.ts","uid":"e9c35142-29"}]},{"name":"context/scope.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/scope.ts","uid":"e9c35142-31"}]},{"name":"context/validator.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/context/validator.ts","uid":"e9c35142-33"}]},{"name":"runner.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/runner.ts","uid":"e9c35142-35"}]},{"name":"tools.js","children":[{"name":"Users/whj/Codes/cat-kit/packages/agent-context/src/tools.ts","uid":"e9c35142-37"}]}],"isRoot":true},"nodeParts":{"e9c35142-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-0"},"e9c35142-3":{"renderedLength":1891,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-2"},"e9c35142-5":{"renderedLength":1508,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-4"},"e9c35142-7":{"renderedLength":629,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-6"},"e9c35142-9":{"renderedLength":718,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-8"},"e9c35142-11":{"renderedLength":1005,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-10"},"e9c35142-13":{"renderedLength":909,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-12"},"e9c35142-15":{"renderedLength":993,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-14"},"e9c35142-17":{"renderedLength":765,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-16"},"e9c35142-19":{"renderedLength":813,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-18"},"e9c35142-21":{"renderedLength":11445,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-20"},"e9c35142-23":{"renderedLength":4355,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-22"},"e9c35142-25":{"renderedLength":1012,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-24"},"e9c35142-27":{"renderedLength":1274,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-26"},"e9c35142-29":{"renderedLength":2276,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-28"},"e9c35142-31":{"renderedLength":1479,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-30"},"e9c35142-33":{"renderedLength":1905,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-32"},"e9c35142-35":{"renderedLength":2037,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-34"},"e9c35142-37":{"renderedLength":2509,"gzipLength":0,"brotliLength":0,"metaUid":"e9c35142-36"}},"nodeMetas":{"e9c35142-0":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/cli.d.ts","moduleParts":{"cli.d.ts":"e9c35142-1"},"imported":[],"importedBy":[],"isEntry":true},"e9c35142-2":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/cli.ts","moduleParts":{"cli.js":"e9c35142-3"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-39"},{"uid":"e9c35142-4"},{"uid":"e9c35142-6"},{"uid":"e9c35142-8"},{"uid":"e9c35142-10"},{"uid":"e9c35142-14"},{"uid":"e9c35142-16"},{"uid":"e9c35142-18"}],"importedBy":[],"isEntry":true},"e9c35142-4":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/done.ts","moduleParts":{"commands/done.js":"e9c35142-5"},"imported":[{"uid":"e9c35142-40"},{"uid":"e9c35142-41"},{"uid":"e9c35142-42"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-6":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/index-cmd.ts","moduleParts":{"commands/index-cmd.js":"e9c35142-7"},"imported":[{"uid":"e9c35142-40"},{"uid":"e9c35142-42"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-8":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/init.ts","moduleParts":{"commands/init.js":"e9c35142-9"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-43"},{"uid":"e9c35142-40"},{"uid":"e9c35142-41"},{"uid":"e9c35142-30"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-10":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/install.ts","moduleParts":{"commands/install.js":"e9c35142-11"},"imported":[{"uid":"e9c35142-41"},{"uid":"e9c35142-34"},{"uid":"e9c35142-36"},{"uid":"e9c35142-12"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-12":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/printer.ts","moduleParts":{"commands/printer.js":"e9c35142-13"},"imported":[{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-10"},{"uid":"e9c35142-16"}]},"e9c35142-14":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/status.ts","moduleParts":{"commands/status.js":"e9c35142-15"},"imported":[{"uid":"e9c35142-42"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-16":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/sync.ts","moduleParts":{"commands/sync.js":"e9c35142-17"},"imported":[{"uid":"e9c35142-34"},{"uid":"e9c35142-36"},{"uid":"e9c35142-12"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-18":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/commands/validate.ts","moduleParts":{"commands/validate.js":"e9c35142-19"},"imported":[{"uid":"e9c35142-42"}],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-20":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/content/actions.ts","moduleParts":{"content/actions.js":"e9c35142-21"},"imported":[],"importedBy":[{"uid":"e9c35142-22"}]},"e9c35142-22":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/content/index.ts","moduleParts":{"content/index.js":"e9c35142-23"},"imported":[{"uid":"e9c35142-20"}],"importedBy":[{"uid":"e9c35142-34"}]},"e9c35142-24":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/archiver.ts","moduleParts":{"context/archiver.js":"e9c35142-25"},"imported":[{"uid":"e9c35142-43"},{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-42"}]},"e9c35142-26":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/indexer.ts","moduleParts":{"context/indexer.js":"e9c35142-27"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-43"},{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-42"}]},"e9c35142-28":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/reader.ts","moduleParts":{"context/reader.js":"e9c35142-29"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-43"},{"uid":"e9c35142-40"},{"uid":"e9c35142-30"}],"importedBy":[{"uid":"e9c35142-42"}]},"e9c35142-30":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/scope.ts","moduleParts":{"context/scope.js":"e9c35142-31"},"imported":[{"uid":"e9c35142-44"},{"uid":"e9c35142-38"},{"uid":"e9c35142-43"},{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-8"},{"uid":"e9c35142-42"},{"uid":"e9c35142-28"}]},"e9c35142-32":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/validator.ts","moduleParts":{"context/validator.js":"e9c35142-33"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-42"}]},"e9c35142-34":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/runner.ts","moduleParts":{"runner.js":"e9c35142-35"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-43"},{"uid":"e9c35142-40"},{"uid":"e9c35142-22"},{"uid":"e9c35142-36"}],"importedBy":[{"uid":"e9c35142-10"},{"uid":"e9c35142-16"}]},"e9c35142-36":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/tools.ts","moduleParts":{"tools.js":"e9c35142-37"},"imported":[{"uid":"e9c35142-38"},{"uid":"e9c35142-40"}],"importedBy":[{"uid":"e9c35142-10"},{"uid":"e9c35142-16"},{"uid":"e9c35142-34"}]},"e9c35142-38":{"id":"node:fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-2"},{"uid":"e9c35142-8"},{"uid":"e9c35142-30"},{"uid":"e9c35142-34"},{"uid":"e9c35142-36"},{"uid":"e9c35142-28"},{"uid":"e9c35142-32"},{"uid":"e9c35142-26"}]},"e9c35142-39":{"id":"commander","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-2"}]},"e9c35142-40":{"id":"node:path","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-4"},{"uid":"e9c35142-6"},{"uid":"e9c35142-8"},{"uid":"e9c35142-30"},{"uid":"e9c35142-34"},{"uid":"e9c35142-36"},{"uid":"e9c35142-12"},{"uid":"e9c35142-28"},{"uid":"e9c35142-32"},{"uid":"e9c35142-24"},{"uid":"e9c35142-26"}]},"e9c35142-41":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-4"},{"uid":"e9c35142-8"},{"uid":"e9c35142-10"}]},"e9c35142-42":{"id":"/Users/whj/Codes/cat-kit/packages/agent-context/src/context/index.ts","moduleParts":{},"imported":[{"uid":"e9c35142-28"},{"uid":"e9c35142-32"},{"uid":"e9c35142-24"},{"uid":"e9c35142-26"},{"uid":"e9c35142-30"}],"importedBy":[{"uid":"e9c35142-4"},{"uid":"e9c35142-6"},{"uid":"e9c35142-14"},{"uid":"e9c35142-18"}]},"e9c35142-43":{"id":"node:fs/promises","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-8"},{"uid":"e9c35142-30"},{"uid":"e9c35142-34"},{"uid":"e9c35142-28"},{"uid":"e9c35142-24"},{"uid":"e9c35142-26"}]},"e9c35142-44":{"id":"node:child_process","moduleParts":{},"imported":[],"importedBy":[{"uid":"e9c35142-30"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4934
4934
|
|
|
4935
4935
|
const run = () => {
|
|
4936
4936
|
const width = window.innerWidth;
|
package/dist/tools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as e}from"node:fs";import{resolve as t}from"node:path";const n={claude:{id:`claude`,name:`Claude Code`,skillRootDir:`.claude/skills`,frontmatterProfile:`claude`,metadataFiles:[]},codex:{id:`codex`,name:`Codex`,skillRootDir:`.codex/skills`,frontmatterProfile:`standard`,metadataFiles:[`openai`]},cursor:{id:`cursor`,name:`Cursor`,skillRootDir:`.cursor/skills`,frontmatterProfile:`standard`,metadataFiles:[]},antigravity:{id:`antigravity`,name:`Antigravity`,skillRootDir:`.agent/skills`,frontmatterProfile:`standard`,metadataFiles:[]},copilot:{id:`copilot`,name:`GitHub Copilot`,skillRootDir:`.github/skills`,frontmatterProfile:`copilot`,metadataFiles:[]}},r=[`claude`,`codex`,`
|
|
1
|
+
import{existsSync as e}from"node:fs";import{resolve as t}from"node:path";const n={claude:{id:`claude`,name:`Claude Code`,skillRootDir:`.claude/skills`,frontmatterProfile:`claude`,metadataFiles:[]},codex:{id:`codex`,name:`Codex`,skillRootDir:`.codex/skills`,frontmatterProfile:`standard`,metadataFiles:[`openai`]},cursor:{id:`cursor`,name:`Cursor`,skillRootDir:`.cursor/skills`,frontmatterProfile:`standard`,metadataFiles:[]},antigravity:{id:`antigravity`,name:`Antigravity`,skillRootDir:`.agent/skills`,frontmatterProfile:`standard`,metadataFiles:[]},agents:{id:`agents`,name:`Agent Skills(开放标准 · .agents)`,skillRootDir:`.agents/skills`,frontmatterProfile:`standard`,metadataFiles:[]},gemini:{id:`gemini`,name:`Gemini CLI`,skillRootDir:`.gemini/skills`,frontmatterProfile:`standard`,metadataFiles:[]},copilot:{id:`copilot`,name:`GitHub Copilot`,skillRootDir:`.github/skills`,frontmatterProfile:`copilot`,metadataFiles:[]}},r=[`agents`,`cursor`,`claude`,`codex`,`antigravity`,`gemini`,`copilot`];function i(){return r.map(e=>({id:e,name:n[e].name}))}function a(e){let t=e.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return[...r];let n=[];for(let e of t){if(!l(e))throw Error(`不支持的工具标识: ${e}。可选值: ${r.join(`, `)}`);n.includes(e)||n.push(e)}return n}function o(e){return(e&&e.length>0?e:r).map(e=>({...n[e]}))}function s(t){return r.filter(r=>{let i=n[r];return e(c(i,t).skillFile)})}function c(e,n){let r=t(n,e.skillRootDir,`ac-workflow`);return{skillDir:r,skillFile:t(r,`SKILL.md`),openaiMetadataFile:t(r,`agents/openai.yaml`)}}function l(e){return Object.hasOwn(n,e)}export{r as DEFAULT_TOOL_ORDER,s as detectConfiguredToolIds,i as getToolChoices,a as parseToolIds,c as resolveSkillPaths,o as resolveToolTargets};
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -24,7 +24,10 @@ program.name('agent-context').description('Agent Context Skills 安装工具').v
|
|
|
24
24
|
program
|
|
25
25
|
.command('install')
|
|
26
26
|
.description('安装 ac-workflow Skill')
|
|
27
|
-
.option(
|
|
27
|
+
.option(
|
|
28
|
+
'--tools <tools>',
|
|
29
|
+
'指定目标工具,逗号分隔:claude,codex,cursor,antigravity,agents,gemini,copilot'
|
|
30
|
+
)
|
|
28
31
|
.option('--yes', '非交互模式:优先复用已安装工具,否则安装全部工具')
|
|
29
32
|
.option('--check', '仅检查是否存在待更新内容,不写入文件')
|
|
30
33
|
.action(installCommand)
|
|
@@ -32,7 +35,10 @@ program
|
|
|
32
35
|
program
|
|
33
36
|
.command('sync')
|
|
34
37
|
.description('同步已安装的 ac-workflow Skill')
|
|
35
|
-
.option(
|
|
38
|
+
.option(
|
|
39
|
+
'--tools <tools>',
|
|
40
|
+
'指定目标工具,逗号分隔:claude,codex,cursor,antigravity,agents,gemini,copilot'
|
|
41
|
+
)
|
|
36
42
|
.option('--check', '仅检查是否存在待更新内容,不写入文件')
|
|
37
43
|
.action(syncCommand)
|
|
38
44
|
|
package/src/tools.ts
CHANGED
|
@@ -35,6 +35,20 @@ const TOOL_TARGET_MAP: Record<ToolId, ToolTarget> = {
|
|
|
35
35
|
frontmatterProfile: 'standard',
|
|
36
36
|
metadataFiles: []
|
|
37
37
|
},
|
|
38
|
+
agents: {
|
|
39
|
+
id: 'agents',
|
|
40
|
+
name: 'Agent Skills(开放标准 · .agents)',
|
|
41
|
+
skillRootDir: '.agents/skills',
|
|
42
|
+
frontmatterProfile: 'standard',
|
|
43
|
+
metadataFiles: []
|
|
44
|
+
},
|
|
45
|
+
gemini: {
|
|
46
|
+
id: 'gemini',
|
|
47
|
+
name: 'Gemini CLI',
|
|
48
|
+
skillRootDir: '.gemini/skills',
|
|
49
|
+
frontmatterProfile: 'standard',
|
|
50
|
+
metadataFiles: []
|
|
51
|
+
},
|
|
38
52
|
copilot: {
|
|
39
53
|
id: 'copilot',
|
|
40
54
|
name: 'GitHub Copilot',
|
|
@@ -44,7 +58,15 @@ const TOOL_TARGET_MAP: Record<ToolId, ToolTarget> = {
|
|
|
44
58
|
}
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
export const DEFAULT_TOOL_ORDER: ToolId[] = [
|
|
61
|
+
export const DEFAULT_TOOL_ORDER: ToolId[] = [
|
|
62
|
+
'agents',
|
|
63
|
+
'cursor',
|
|
64
|
+
'claude',
|
|
65
|
+
'codex',
|
|
66
|
+
'antigravity',
|
|
67
|
+
'gemini',
|
|
68
|
+
'copilot'
|
|
69
|
+
]
|
|
48
70
|
|
|
49
71
|
export interface ToolChoice {
|
|
50
72
|
id: ToolId
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ToolId = 'claude' | 'codex' | 'cursor' | 'antigravity' | 'copilot'
|
|
1
|
+
export type ToolId = 'claude' | 'codex' | 'cursor' | 'antigravity' | 'agents' | 'gemini' | 'copilot'
|
|
2
2
|
|
|
3
3
|
export type SkillFrontmatterProfile = 'standard' | 'claude' | 'copilot'
|
|
4
4
|
export type SkillMetadataFile = 'openai'
|