@c4a/context-cli 0.7.17 → 0.7.23

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.
Files changed (41) hide show
  1. package/README.md +16 -2
  2. package/README.zh-CN.md +16 -2
  3. package/cli.js +58612 -58073
  4. package/indexers/contracts/profile-contract.json +245 -245
  5. package/indexers/release-manifest.json +1 -1
  6. package/package.json +12 -12
  7. package/plugins/README.md +5 -4
  8. package/plugins/README_CN.md +4 -2
  9. package/plugins/VERSION +1 -1
  10. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  11. package/plugins/claude/commands/context-inspect-search.md +141 -170
  12. package/plugins/claude/commands/context.md +77 -6
  13. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  14. package/plugins/codex/skills/context/SKILL.md +77 -6
  15. package/plugins/codex/skills/context-inspect-search/SKILL.md +141 -170
  16. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  17. package/plugins/cursor/commands/c4a-context-inspect-search.md +141 -170
  18. package/plugins/cursor/commands/c4a-context.md +77 -6
  19. package/plugins/skills/context/SKILL.md +77 -6
  20. package/plugins/skills/context-inspect-search/SKILL.md +141 -170
  21. package/providers/context/codes.yaml +1 -1
  22. package/providers/context/graphs/indexer.yaml +11 -7
  23. package/providers/context/graphs/workspace.yaml +5 -0
  24. package/providers/context/manifest.json +34 -34
  25. package/providers/context/provider.yaml +1 -1
  26. package/providers/context/resources/manuals/guides/knowledge-updates.md +5 -1
  27. package/providers/context/resources/manuals/guides/workspace-prepare.md +9 -0
  28. package/providers/context/resources/manuals/guides/workspace-restore.md +5 -1
  29. package/providers/context/resources/procedures/approved-revision.md +20 -0
  30. package/providers/context/resources/procedures/knowledge-review.md +11 -4
  31. package/providers/context/resources/procedures/knowledge-updates.md +5 -1
  32. package/providers/context/resources/procedures/package-output.md +4 -0
  33. package/providers/context/resources/procedures/production-requirements.md +5 -3
  34. package/providers/context/resources/procedures/source-boundary.md +15 -5
  35. package/providers/context/resources/procedures/source-capture-detailed.md +17 -0
  36. package/providers/context/resources/procedures/work-start-report.md +19 -6
  37. package/providers/context/resources/procedures/workspace-prepare.md +9 -0
  38. package/providers/context/resources/procedures/workspace-restore.md +5 -1
  39. package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +7 -2
  40. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +3 -2
  41. package/providers/context/skills/work-production-stage/SKILL.md +5 -3
package/README.md CHANGED
@@ -18,10 +18,24 @@ an LLM itself.
18
18
 
19
19
  ```bash
20
20
  npm install -g @c4a/context-cli@latest
21
- context plugin install
21
+ context plugin install # global installation
22
+ # Alternatively, install only in a repository:
23
+ context plugin install --local /path/to/repo --agent auto-detect
22
24
  ```
23
25
 
24
- Restart or refresh the Agent host after installation. One install creates the
26
+ `--local` requires explicit `--agent`: `claude`, `cursor`, `codex`, `all`, `auto-detect`, or `standalone`. The path is a repository root: explicit hosts install into `.claude`, `.cursor`, or `.agents` without detection. `all` installs all three. Only `auto-detect` checks existing `.claude`, `.cursor`, and `.agents` directories in the target repository, never PATH or installed desktop applications; it falls back to `.agents/skills` when none exist. `standalone` instead writes all skills directly to `<path>/skills`, with no commands or host subdirectory. All modes support `--dry-run` and preserve global configuration.
27
+
28
+ Migration from 0.7.20: add `--agent auto-detect` to bare `--local`; for explicit hosts pass the repository root, not its host directory. Global installation is unchanged. Host detection does not verify runtime loading.
29
+
30
+ | Command | Local layout |
31
+ | --- | --- |
32
+ | `context plugin install --local /path/to/repo --agent claude` | Public entries in `commands/`, other skills in `skills/`; internal skills receive `user-invocable: false`, without duplicate entry skills |
33
+ | `context plugin install --local /path/to/repo --agent cursor` | Bundled `c4a-*` commands plus other skills; hiding Providers from the command menu is not guaranteed |
34
+ | `context plugin install --local /path/to/repo --agent codex` | All entries remain skills; bundled `agents/openai.yaml` policies are preserved; no unsupported `commands/` directory |
35
+
36
+ Local entries have no plugin namespace; the host must discover the destination. Use `--dry-run` to preview. Refresh only replaces unmodified managed content; unrelated files remain and conflicting/customized entries are rejected. Choose a fresh host directory when switching from a standalone installation to command entries, to avoid duplicates. `plugin status` still inspects global hosts only. Invocation metadata is not a CLI permission or security boundary.
37
+
38
+ Restart or refresh the Agent host after installation. Global installation creates the
25
39
  host-namespaced Context entry and projects `context-code-indexer` and
26
40
  `context-markdown-indexer`, `context-note-indexer` and
27
41
  `context-sessions-indexer` as unnamespaced lifecycle Provider Skills for
package/README.zh-CN.md CHANGED
@@ -14,10 +14,24 @@
14
14
 
15
15
  ```bash
16
16
  npm install -g @c4a/context-cli@latest
17
- context plugin install
17
+ context plugin install # 全局安装
18
+ # 或者,只安装到仓库:
19
+ context plugin install --local /path/to/repo --agent auto-detect
18
20
  ```
19
21
 
20
- 安装后重启或刷新 Agent 宿主。一次安装会生成一个带宿主命名空间的 Context 主入口,
22
+ `--local` 必须显式搭配 `--agent`:`claude`、`cursor`、`codex`、`all`、`auto-detect` `standalone`。路径为仓库根;指定宿主直接写入对应 `.claude`、`.cursor`、`.agents` 子目录,不检测是否安装宿主。`all` 全装;只有 `auto-detect` 检测目标仓库已有的 `.claude`、`.cursor`、`.agents` 目录,不检测 PATH 或桌面应用;均不存在时兜底 `.agents/skills`。`standalone` 则直接写入 `<path>/skills`,不生成 commands 或宿主子目录。均支持 `--dry-run`,不改全局配置。
23
+
24
+ 从 0.7.20 迁移:裸 `--local` 补充 `--agent auto-detect`;指定宿主时传仓库根,不再传宿主目录。全局安装不变。自动探测不代表宿主已加载,安装后需刷新宿主。
25
+
26
+ | 命令 | 局部目录与行为 |
27
+ | --- | --- |
28
+ | `context plugin install --local /path/to/repo --agent claude` | `commands/` 放公开入口;`skills/` 放其他技能,内部技能设置 `user-invocable: false`,不重复安装入口 Skill |
29
+ | `context plugin install --local /path/to/repo --agent cursor` | `commands/` 使用随包的 `c4a-*` 命令;`skills/` 放其他技能,不保证隐藏 Provider 的菜单入口 |
30
+ | `context plugin install --local /path/to/repo --agent codex` | 全部入口保留为 skills,保留随包的 `agents/openai.yaml` 调用策略,不生成无效的 `commands/` |
31
+
32
+ 宿主必须支持发现目标位置。局部入口没有插件命名空间。`--dry-run` 只预览;重复安装仅刷新本命令管理且未被修改的内容,保留无关文件;同名自定义内容或本地修改会报冲突。已有通用 skills 目录切换为 command 宿主时,请选择新目录,避免重复入口。`plugin status` 仍只检查全局宿主状态。调用元数据控制宿主入口展示/自动调用,不是 CLI 权限或安全隔离。
33
+
34
+ 安装后重启或刷新 Agent 宿主。全局安装会生成一个带宿主命名空间的 Context 主入口,
21
35
  并把 `context-code-indexer`、`context-markdown-indexer` 作为无命名空间的生命周期
22
36
  Provider Skill 投影到 Claude、Codex 和 Cursor 的用户技能目录。
23
37