auriga-cli 1.24.0 → 1.26.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/README.md CHANGED
@@ -14,7 +14,6 @@ This repo itself is a fully configured harness project. You can clone it to see
14
14
  | **Skills** | External development process skills — systematic-debugging, TDD, verification, planning, playwright (spec authoring and architecture design ship as the `spec-design` and `arch-design` skills inside the `auriga-workflow` plugin) |
15
15
  | **Recommended Skills** | Optional utility skills (e.g. `codex-agent`, `claude-code-agent`) you can add on top of the workflow skills |
16
16
  | **Plugins** | Recommended Claude Code and Codex plugins — skill-creator, claude-md-management, codex, auriga-workflow, auriga-notify, session-instructions-loader |
17
- | **Hooks** | Legacy Claude Code hook installer. No repo-owned hooks are currently exposed here; `notify` ships as the `auriga-notify` plugin. |
18
17
 
19
18
  ## Quick Start
20
19
 
@@ -34,20 +33,25 @@ Running inside `claude -p`, `claude -p --worktree`, or any non-interactive Agent
34
33
  npx -y auriga-cli guide
35
34
  ```
36
35
 
37
- This prints a 5-step SOP (prerequisite check → `install --all` → optional recommended skills → session reload → verify). Follow it top-to-bottom and the Agent can install the full harness without any human prompt.
36
+ This prints a 5-step SOP (prerequisite check → `install --preset` → optional recommended skills → session reload → verify). Follow it top-to-bottom and the Agent can install the full harness without any human prompt.
38
37
 
39
38
  The leading `-y` belongs to `npx` (it auto-confirms package installation), **not** to `auriga-cli`.
40
39
 
41
40
  Non-interactive install commands:
42
41
 
43
42
  ```bash
44
- npx -y auriga-cli install --all # workflow + skills + default plugins (atomic)
45
- npx -y auriga-cli install recommended # opt-in utility skills (not in --all)
43
+ npx -y auriga-cli install --preset # curated workflow core: CLAUDE.md/AGENTS.md
44
+ # + workflow skills + auriga-workflow plugin
45
+ # (defaults: scope user, agent both, lang en)
46
+ npx -y auriga-cli install --all # everything: workflow + skills + recommended + plugins
47
+ npx -y auriga-cli install recommended # just the opt-in utility skills
46
48
  npx -y auriga-cli install plugins --agent codex --plugin session-instructions-loader
47
- npx -y auriga-cli install <type> [--flags] # one of: workflow | skills | recommended | plugins | hooks
49
+ npx -y auriga-cli install <type> [--flags] # one of: workflow | skills | recommended | plugins
48
50
  npx -y auriga-cli --help # full catalog + flags
49
51
  ```
50
52
 
53
+ `--preset` is atomic — it cannot be combined with a `<type>` or any filter flag, but it accepts `--scope`, `--agent`, and `--lang` (preset defaults: `user` / `both` / `en`, which differ from the per-category defaults).
54
+
51
55
  Exit codes: `0` success, `1` fatal (precheck / parse / fetch), `2` partial success — `stderr` lists per-category `[OK]/[FAIL]` and a `Retry:` hint. After install, reload the Claude Code or Codex session so the new `CLAUDE.md` / skills / plugins / hook-plugin registrations are picked up.
52
56
 
53
57
  ### Web UI (opt-in)
@@ -71,15 +75,13 @@ npx auriga-cli
71
75
  Interactive menu — select what to install:
72
76
 
73
77
  ```
74
- ? Select module types to install:
75
- Workflow — CLAUDE.md + AGENTS.md
76
- SkillsDevelopment process skills
77
- Recommended SkillsExtra utility skills
78
- ◉ Plugins — Claude Code / Codex plugins
79
- ◉ Hooks — Claude Code hooks
78
+ ? Select what to install:
79
+ Recommended preset — CLAUDE.md/AGENTS.md + workflow skills + auriga-workflow plugin
80
+ Optional skills opt-in utility skills (claude-code-agent, codex-agent...)
81
+ Other pluginseverything except auriga-workflow (auriga-notify, skill-creator, codex...)
80
82
  ```
81
83
 
82
- Each module supports scope selection where applicable (Skills: project/global, Claude Code Plugins: user/project, Hooks: project local / project / user). Plugin installation also asks which runtime to target: Claude Code, Codex, or both.
84
+ The **Recommended preset** is checked by default and installs silently with the preset defaults (scope `user`, agent `both`, language `en`) — to fine-tune those, use the non-interactive `install --preset` flags. The other two items drill down into a per-item sub-selection. Plugin installation also asks which runtime to target: Claude Code, Codex, or both.
83
85
 
84
86
  ## Module Details
85
87
 
@@ -102,7 +104,7 @@ Installs selected skills via `npx skills add`, targeting both Claude Code and Co
102
104
  | planning-with-files | [OthmanAdi/planning-with-files](https://github.com/OthmanAdi/planning-with-files) | File-based task planning and progress tracking |
103
105
  | playwright-cli | [microsoft/playwright-cli](https://github.com/microsoft/playwright-cli) | Browser automation and testing |
104
106
 
105
- **Recommended Skills (opt-in, not installed by `--all`):**
107
+ **Recommended Skills (opt-in utility skills — installed by `--all`, not by `--preset`):**
106
108
 
107
109
  | Skill | Source | Description |
108
110
  |---|---|---|
@@ -133,21 +135,14 @@ npx -y auriga-cli install plugins --agent codex --plugin session-instructions-lo
133
135
  | skill-creator | Claude Code | Create and manage custom skills |
134
136
  | claude-md-management | Claude Code | Audit and improve CLAUDE.md |
135
137
  | codex | Claude Code | Codex cross-model collaboration |
136
- | auriga-workflow | Claude Code / Codex | The auriga workflow plugin — workflow skills plus the git lifecycle hooks that enforce them. Skills: `incremental-impl`, `test-designer`, `spec-design`, `arch-design`, `code-simplify`, `session-compound`, `goalify` (plans an autonomous goal and dispatches it via Claude Code's built-in `/goal` command), `deep-review` (multi-dimensional PR review orchestrator — parallel per-dimension reviewers synthesized into an actionable punch list), `reviewer-creator` (scaffolds project-level custom reviewers under `docs/rules/review/`), and `git-workflow` (git lifecycle skill). Hooks: `commit-reminder` (PostToolUse on file edits — `Edit` / `Write` / `MultiEdit` in Claude Code, `apply_patch` in Codex — nudges to commit at the next semantic boundary when uncommitted diff vs `HEAD` exceeds 200 lines or 8 files), `pr-create-guard` (PostToolUse on `gh pr create` → injects a PR-body snapshot for five-element self-verification and flags non-Conventional-Commits titles), and `pr-ready-guard` (PreToolUse on `gh pr ready` and non-draft `gh pr create` → blocks on stray planning docs, unfinalized active specs under `docs/specs/`, or unpushed commits). The two PostToolUse hooks reach full Claude Code / Codex parity; Codex currently fails open on `pr-ready-guard`'s PreToolUse `additionalContext` informational path (block path identical). Installed by default through the plugin path. |
138
+ | auriga-workflow | Claude Code / Codex | The auriga workflow plugin — workflow skills plus the git lifecycle hooks that enforce them. Skills: `incremental-impl`, `test-designer`, `spec-design`, `arch-design`, `code-simplify`, `session-compound`, `goalify` (plans an autonomous goal and dispatches it via the built-in `/goal` command), `deep-review` (multi-dimensional PR review orchestrator — parallel per-dimension reviewers synthesized into an actionable punch list), `reviewer-creator` (scaffolds project-level custom reviewers under `docs/rules/review/`), and `git-workflow` (git lifecycle skill). Hooks: `commit-reminder` (PostToolUse on file edits — `Edit` / `Write` / `MultiEdit` in Claude Code, `apply_patch` in Codex — nudges to commit at the next semantic boundary when uncommitted diff vs `HEAD` exceeds 200 lines or 8 files), `pr-create-guard` (PostToolUse on `gh pr create` → injects a PR-body snapshot for five-element self-verification and flags non-Conventional-Commits titles), and `pr-ready-guard` (PreToolUse on `gh pr ready` and non-draft `gh pr create` → blocks on stray planning docs, unfinalized active specs under `docs/specs/`, or unpushed commits). The two PostToolUse hooks reach full Claude Code / Codex parity; Codex currently fails open on `pr-ready-guard`'s PreToolUse `additionalContext` informational path (block path identical). Installed by default through the plugin path. |
137
139
  | auriga-notify *(opt-in)* | Claude Code | macOS native notification plugin for Claude Code `Notification` events. Focus-aware sound-only mode, click-to-activate, per-project notification grouping, and migrated `config.json` / `icon.png` support. Not installed by `install --all`; install explicitly with `install plugins --plugin auriga-notify`. |
138
140
  | session-instructions-loader | Codex | Codex-only SessionStart plugin that injects ancestor `AGENTS.md` files plus repo-configured extra instruction files. |
139
141
 
140
- ### Hooks
141
-
142
- The traditional hook installer remains for compatibility, but this repo no
143
- longer exposes a repo-owned hook through `install hooks`. New repo-owned hooks
144
- should be shipped inside plugins. The former `notify` hook is now the
145
- `auriga-notify` plugin.
146
-
147
142
  ## Requirements
148
143
 
149
144
  - Node.js >= 18
150
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (required for Claude Code Plugins and Hooks modules)
145
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (required for the Plugins module)
151
146
  - Codex CLI (required only for `install plugins --agent codex|both`)
152
147
  - [Homebrew](https://brew.sh) (recommended for the `auriga-notify` plugin to use `alerter`)
153
148
 
package/README.zh-CN.md CHANGED
@@ -14,7 +14,6 @@
14
14
  | **Skills** | 外部开发流程 skills —— systematic-debugging、TDD、verification、planning、playwright(spec 撰写与架构设计由 `auriga-workflow` 插件内的 `spec-design`、`arch-design` skill 提供)|
15
15
  | **Recommended Skills** | 可选的工具类 skills(如 `codex-agent`、`claude-code-agent`),在 workflow skills 之外按需追加 |
16
16
  | **Plugins** | 推荐的 Claude Code 和 Codex 插件 —— skill-creator、claude-md-management、codex、auriga-workflow、auriga-notify、session-instructions-loader |
17
- | **Hooks** | 传统 Claude Code hook 安装器。目前没有仓库自维护 hook 暴露在这里;`notify` 已迁移为 `auriga-notify` 插件。 |
18
17
 
19
18
  ## 快速开始
20
19
 
@@ -34,21 +33,26 @@
34
33
  npx -y auriga-cli guide
35
34
  ```
36
35
 
37
- 会打印一份 5 步 SOP(前置检查 → `install --all` → 可选 recommended skills → 重启 session → 验证)。Agent 照着顺序往下跑就能装完整套 harness,全程不需要人按键。
36
+ 会打印一份 5 步 SOP(前置检查 → `install --preset` → 可选 recommended skills → 重启 session → 验证)。Agent 照着顺序往下跑就能装完整套 harness,全程不需要人按键。
38
37
 
39
38
  开头的 `-y` 是 **npx 自己的 flag**(用来跳过"是否要装这个包"的确认),**不是** auriga-cli 的参数。
40
39
 
41
40
  非交互安装命令:
42
41
 
43
42
  ```bash
44
- npx -y auriga-cli install --all # workflow + skills + 默认 plugins(原子)
45
- npx -y auriga-cli install recommended # 可选工具 skills(不在 --all 内)
43
+ npx -y auriga-cli install --preset # 工作流核心:CLAUDE.md/AGENTS.md
44
+ # + 工作流 skill + auriga-workflow 插件
45
+ # (默认:scope user、agent both、lang en)
46
+ npx -y auriga-cli install --all # 全装:workflow + skills + recommended + plugins
47
+ npx -y auriga-cli install recommended # 只装可选工具 skills
46
48
  npx -y auriga-cli install plugins --agent codex --plugin session-instructions-loader
47
- npx -y auriga-cli install <type> [--flags] # 单类:workflow | skills | recommended | plugins | hooks
49
+ npx -y auriga-cli install <type> [--flags] # 单类:workflow | skills | recommended | plugins
48
50
  npx -y auriga-cli --help # 完整 catalog + flag 说明
49
51
  ```
50
52
 
51
- 退出码:`0` 成功;`1` 致命错误(前置检查 / 解析 / 拉取失败);`2` 部分成功——`stderr` 会列出逐类 `[OK]/[FAIL]` `Retry:` 提示。装完后请重启 Claude Code 或 Codex 会话,让新的 `CLAUDE.md` / skills / plugins / hook 注册生效。
53
+ `--preset` 是原子标志 —— 不能与 `<type>` 或任何过滤标志同时使用,但可带 `--scope`、`--agent`、`--lang`(预设默认 `user` / `both` / `en`,与分类安装的默认不同)。
54
+
55
+ 退出码:`0` 成功;`1` 致命错误(前置检查 / 解析 / 拉取失败);`2` 部分成功——`stderr` 会列出逐类 `[OK]/[FAIL]` 和 `Retry:` 提示。装完后请重启 Claude Code 或 Codex 会话,让新的 `CLAUDE.md` / skills / plugins / hook 插件注册生效。
52
56
 
53
57
  ### Web UI(可选)
54
58
 
@@ -71,15 +75,13 @@ npx auriga-cli
71
75
  交互式菜单,按需选择安装:
72
76
 
73
77
  ```
74
- ? 选择要安装的模块类型:
75
- Workflow — CLAUDE.md + AGENTS.md
76
- Skills开发流程 skills
77
- Recommended Skills额外的工具 skills
78
- ◉ Plugins — Claude Code / Codex 插件
79
- ◉ Hooks — Claude Code hooks
78
+ ? Select what to install:
79
+ Recommended preset — CLAUDE.md/AGENTS.md + workflow skills + auriga-workflow plugin
80
+ Optional skills opt-in utility skills (claude-code-agent, codex-agent...)
81
+ Other pluginseverything except auriga-workflow (auriga-notify, skill-creator, codex...)
80
82
  ```
81
83
 
82
- 每个模块在适用时支持作用域选择(Skills: project/global,Claude Code Plugins: user/project,Hooks: project local / project / user)。安装插件时还会先选择目标运行时:Claude Code、Codex 或两者都装。
84
+ **Recommended preset** 默认勾选,以预设默认值静默安装(scope `user`、agent `both`、语言 `en`)—— 要精调这些参数,改用非交互的 `install --preset` 标志。另两项会下钻到逐项子勾选。安装插件时还会先选择目标运行时:Claude Code、Codex 或两者都装。
83
85
 
84
86
  ## 模块详情
85
87
 
@@ -102,7 +104,7 @@ npx auriga-cli
102
104
  | planning-with-files | [OthmanAdi/planning-with-files](https://github.com/OthmanAdi/planning-with-files) | 文件化任务计划与进度跟踪 |
103
105
  | playwright-cli | [microsoft/playwright-cli](https://github.com/microsoft/playwright-cli) | 浏览器自动化与测试 |
104
106
 
105
- **Recommended Skills(可选,不在 `--all` 内):**
107
+ **Recommended Skills(可选工具类 skill —— `--all` 会装,`--preset` 不装):**
106
108
 
107
109
  | Skill | 来源 | 说明 |
108
110
  |---|---|---|
@@ -133,20 +135,14 @@ npx -y auriga-cli install plugins --agent codex --plugin session-instructions-lo
133
135
  | skill-creator | Claude Code | 创建和管理自定义 skills |
134
136
  | claude-md-management | Claude Code | 审计和改进 CLAUDE.md |
135
137
  | codex | Claude Code | Codex 跨模型协作 |
136
- | auriga-workflow | Claude Code / Codex | auriga 工作流插件 —— 工作流 skill 加上强制执行工作流的 git 生命周期 hook。Skills:`incremental-impl`、`test-designer`、`spec-design`、`arch-design`、`code-simplify`、`session-compound`、`goalify`(plan 出自驱 goal 并通过 Claude Code 内置 `/goal` 命令分发执行)、`deep-review`(多维度 PR review 编排器——并行派发各维度 reviewer,汇总成可执行的 punch list)、`reviewer-creator`(在 `docs/rules/review/` 下生成项目级自定义 reviewer)、`git-workflow`(git 生命周期 skill)。Hooks:`commit-reminder`(文件编辑的 PostToolUse —— Claude Code 匹配 `Edit` / `Write` / `MultiEdit`,Codex 匹配 `apply_patch` —— 未提交 diff 对比 `HEAD` 超过 200 行或 8 个文件时,提醒在下一个语义边界 commit)、`pr-create-guard`(`gh pr create` 的 PostToolUse —— 注入 PR body 快照供五要素自检,并对不符合 Conventional Commits 的标题提示)、`pr-ready-guard`(`gh pr ready` 与非 draft `gh pr create` 的 PreToolUse —— 拦截游离规划文档、`docs/specs/` 内未结案的活跃 spec、未 push commits)。两个 PostToolUse hook 在 Claude Code / Codex 上完全对齐;Codex 仅对 `pr-ready-guard` 的 PreToolUse `additionalContext` 信息路径 fail-open(block 路径两边一致)。默认通过插件路径安装。 |
138
+ | auriga-workflow | Claude Code / Codex | auriga 工作流插件 —— 工作流 skill 加上强制执行工作流的 git 生命周期 hook。Skills:`incremental-impl`、`test-designer`、`spec-design`、`arch-design`、`code-simplify`、`session-compound`、`goalify`(plan 出自驱 goal 并通过内置 `/goal` 命令分发执行)、`deep-review`(多维度 PR review 编排器——并行派发各维度 reviewer,汇总成可执行的 punch list)、`reviewer-creator`(在 `docs/rules/review/` 下生成项目级自定义 reviewer)、`git-workflow`(git 生命周期 skill)。Hooks:`commit-reminder`(文件编辑的 PostToolUse —— Claude Code 匹配 `Edit` / `Write` / `MultiEdit`,Codex 匹配 `apply_patch` —— 未提交 diff 对比 `HEAD` 超过 200 行或 8 个文件时,提醒在下一个语义边界 commit)、`pr-create-guard`(`gh pr create` 的 PostToolUse —— 注入 PR body 快照供五要素自检,并对不符合 Conventional Commits 的标题提示)、`pr-ready-guard`(`gh pr ready` 与非 draft `gh pr create` 的 PreToolUse —— 拦截游离规划文档、`docs/specs/` 内未结案的活跃 spec、未 push commits)。两个 PostToolUse hook 在 Claude Code / Codex 上完全对齐;Codex 仅对 `pr-ready-guard` 的 PreToolUse `additionalContext` 信息路径 fail-open(block 路径两边一致)。默认通过插件路径安装。 |
137
139
  | auriga-notify *(opt-in)* | Claude Code | Claude Code `Notification` 事件的 macOS 原生通知插件。支持焦点感知仅提示音、点击唤起终端、按项目分组通知,并迁移旧 `config.json` / `icon.png`。不随 `install --all` 默认安装,需要显式执行 `install plugins --plugin auriga-notify`。 |
138
140
  | session-instructions-loader | Codex | Codex-only SessionStart 插件,注入上层目录的 `AGENTS.md` 和仓库配置的额外 instruction 文件。 |
139
141
 
140
- ### Hooks
141
-
142
- 传统 hook 安装器仍保留作兼容入口,但本仓库当前不再通过
143
- `install hooks` 暴露自维护 hook。新的自维护 hook 应随插件分发。原来的
144
- `notify` hook 已迁移为 `auriga-notify` 插件。
145
-
146
142
  ## 环境要求
147
143
 
148
144
  - Node.js >= 18
149
- - [Claude Code](https://docs.anthropic.com/en/docs/claude-code)(Claude Code Plugins 和 Hooks 模块需要)
145
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code)(Plugins 模块需要)
150
146
  - Codex CLI(仅 `install plugins --agent codex|both` 需要)
151
147
  - [Homebrew](https://brew.sh)(`auriga-notify` 插件使用 `alerter` 时推荐安装)
152
148
 
@@ -5,7 +5,7 @@ export type ItemStatus = "installed" | "not-installed"
5
5
  * agents are enumerated in `PluginState.missingAgents`. */
6
6
  | "partial-install";
7
7
  /**
8
- * Per-category scan scope. Each category (workflow / skills / plugins / hooks)
8
+ * Per-category scan scope. Each category (workflow / skills / plugins)
9
9
  * can be independently scanned in either user scope (~/.claude/, ~/.codex/)
10
10
  * or project scope (<proj>/.claude/). The Web UI's per-column scope picker
11
11
  * carries these through the `/api/state` query so the scanner reads the
@@ -23,7 +23,6 @@ export interface StateReport {
23
23
  skills: SkillState[];
24
24
  recommendedSkills: SkillState[];
25
25
  plugins: PluginState[];
26
- hooks: HookState[];
27
26
  warnings: StateWarning[];
28
27
  }
29
28
  export interface WorkflowState {
@@ -70,13 +69,6 @@ export interface PluginState {
70
69
  * `claude plugins update`, not via auriga-cli. */
71
70
  external?: boolean;
72
71
  }
73
- export interface HookState {
74
- name: string;
75
- description: string;
76
- status: ItemStatus;
77
- /** Scope the scanner read to produce this row. See WorkflowState comment. */
78
- observedScope?: ScanScope;
79
- }
80
72
  export interface StateWarning {
81
73
  code: "claude-cli-missing" | "codex-cli-missing" | "marketplace-offline" | "claude-code-not-installed" | "settings-unreadable" | "skill-malformed"
82
74
  /** Project-scope CLAUDE.md (or the user-scope fallback when scanning
@@ -86,7 +78,11 @@ export interface StateWarning {
86
78
  | "workflow-foreign-claudemd";
87
79
  message: string;
88
80
  }
89
- export type ApplyCategory = "workflow" | "skill" | "recommended-skill" | "plugin" | "hook";
81
+ export type ApplyCategory = "workflow" | "skill" | "recommended-skill" | "plugin"
82
+ /** The curated preset (workflow doc + workflow skills + auriga-workflow
83
+ * plugin). A single apply item drives the whole installPreset
84
+ * orchestration; `name` is the sentinel "preset". */
85
+ | "preset";
90
86
  export type ApplyAction = "install" | "uninstall";
91
87
  /**
92
88
  * Installer scope. Carried per-item so the Web UI can mix scopes within a
@@ -94,7 +90,6 @@ export type ApplyAction = "install" | "uninstall";
94
90
  *
95
91
  * - workflow: no scope; field MUST be omitted.
96
92
  * - skill / recommended-skill / plugin: "project" | "user". Default project.
97
- * - hook: "project" | "user" for v0.1 (project-local deferred to v0.2).
98
93
  */
99
94
  export type ApplyScope = "project" | "user";
100
95
  /**
@@ -107,18 +102,31 @@ export type ApplyScope = "project" | "user";
107
102
  * categories so the API surface stays explicit.
108
103
  */
109
104
  export type ApplyLang = "en" | "zh-CN";
105
+ /**
106
+ * Preset install runtime target — Claude Code, Codex, or both.
107
+ *
108
+ * Only meaningful for `category === "preset"` (the preset's UI exposes an
109
+ * agent control); the server rejects it for every other category, where
110
+ * the per-plugin agent is derived from the catalog rather than supplied
111
+ * by the client.
112
+ */
113
+ export type ApplyPresetAgent = "claude" | "codex" | "both";
110
114
  export interface ApplyItemRef {
111
115
  category: ApplyCategory;
112
116
  name: string;
113
117
  action: ApplyAction;
114
- /** Installer scope. Omitted = "project" (back-compat default). The server
115
- * rejects this field for category="workflow" because workflow has no
116
- * scope concept (it's a single file at the project root). */
118
+ /** Installer scope. Omitted = "project" (back-compat default), except
119
+ * for category="preset" where the handler defaults it to "user". The
120
+ * server rejects this field for category="workflow" because workflow
121
+ * has no scope concept (it's a single file at the project root). */
117
122
  scope?: ApplyScope;
118
123
  /** Workflow CLAUDE.md language variant. Omitted = "en" (back-compat
119
- * default). The server rejects this field for any non-workflow
120
- * category. */
124
+ * default). The server accepts this field only for category="workflow"
125
+ * and category="preset" (the preset installs the workflow doc). */
121
126
  lang?: ApplyLang;
127
+ /** Preset install runtime. Omitted = "both". The server accepts this
128
+ * field only for category="preset". */
129
+ agent?: ApplyPresetAgent;
122
130
  }
123
131
  export interface ApplyRequest {
124
132
  items: ApplyItemRef[];
@@ -1,6 +1,6 @@
1
1
  // Builds the default ApplyHandlers map that wires the Web UI's /api/apply
2
- // route to the real installers in workflow.ts / skills.ts / plugins.ts /
3
- // hooks.ts. Tests inject their own mock handlers; CLI mode (the `web-ui`
2
+ // route to the real installers in workflow.ts / skills.ts / plugins.ts.
3
+ // Tests inject their own mock handlers; CLI mode (the `web-ui`
4
4
  // subcommand) calls `buildDefaultApplyHandlers` at boot.
5
5
  //
6
6
  // Per-item dispatch is layered on top of the existing bulk installers via
@@ -14,16 +14,14 @@
14
14
  // recommended-skill: uninstallSkill(name, …) │ same store
15
15
  // plugin: installPlugins(…, agent, sel:[]) │ per-name
16
16
  // plugin: uninstallPlugin(name, agent, …) │
17
- // hook: installHook(hookDef, "project",…)│ needs HookDef
18
- // hook: uninstallHook(name, …) │
19
17
  //
20
18
  // v1.19.0 dropped the "update" action — every installer is idempotent and
21
19
  // overwriting, so re-running install IS the update path. Apply receives
22
20
  // "install" or "uninstall" only.
23
21
  //
24
22
  // Spec: docs/architecture/web-ui.md §6.4 (apply execution model).
25
- import { installHook, loadHooksConfig, uninstallHook } from "./hooks.js";
26
23
  import { installPlugins, uninstallPlugin, } from "./plugins.js";
24
+ import { installPreset } from "./preset.js";
27
25
  import { installRecommendedSkills, installSkills, uninstallSkill, } from "./skills.js";
28
26
  import { installWorkflow, uninstallWorkflow } from "./workflow.js";
29
27
  const ALL_ACTIONS = new Set([
@@ -154,35 +152,40 @@ export function buildDefaultApplyHandlers(ctx) {
154
152
  throw new Error(`plugin ${name} ${action} failed for ${failures.length} agent(s) — ${summary}`);
155
153
  }
156
154
  };
157
- const hook = async (action, name, { onLog, scope }) => {
155
+ // The preset is a single apply item that drives the whole installPreset
156
+ // orchestration. scope / agent / lang come from the Dashboard's preset
157
+ // controls; omitted values fall back to the preset defaults
158
+ // (user / both / en). Uninstall is not a preset operation.
159
+ const preset = async (action, _name, { onLog, scope, lang: requestedLang, agent }) => {
158
160
  assertAction(action);
159
- const installScope = scope ?? "project";
160
- if (action === "uninstall") {
161
- await uninstallHook(name, {
162
- cwd,
163
- scope: installScope,
164
- onLog: (line) => onLog(line, "info"),
165
- });
166
- return;
161
+ if (action !== "install") {
162
+ throw new Error("preset only supports the install action");
163
+ }
164
+ const results = await installPreset(packageRoot, {
165
+ interactive: false,
166
+ cwd,
167
+ scope: scope ?? "user",
168
+ agent: agent ?? "both",
169
+ lang: requestedLang ?? lang,
170
+ onLog: streamLog(onLog),
171
+ });
172
+ for (const r of results) {
173
+ onLog(r.ok
174
+ ? `preset: ${r.category} installed`
175
+ : `preset: ${r.category} failed — ${r.err}`, r.ok ? "info" : "error");
167
176
  }
168
- // Look up the HookDef in the bundled registry; unknown name → loud throw
169
- // so the SSE caller surfaces it as item:done success=false. The hook
170
- // installer is idempotent; re-running install is the update path.
171
- const config = loadHooksConfig(packageRoot);
172
- const hookDef = config.hooks.find((h) => h.name === name);
173
- if (!hookDef) {
174
- throw new Error(`hook not found in registry: ${name}`);
177
+ const failed = results.filter((r) => !r.ok);
178
+ if (failed.length > 0) {
179
+ throw new Error(`preset install failed for ${failed.length} step(s): ${failed
180
+ .map((f) => f.category)
181
+ .join(", ")}`);
175
182
  }
176
- // installHook takes a wider Scope union ("project"|"user"|"project-local");
177
- // v0.1 only exposes "project"|"user" via the API. Cast is safe.
178
- await installHook(hookDef, scope ?? "project", cwd, packageRoot);
179
- onLog(`hook ${name} installed (${scope ?? "project"})`, "info");
180
183
  };
181
184
  return {
182
185
  workflow,
183
186
  skill,
184
187
  "recommended-skill": recommendedSkill,
185
188
  plugin,
186
- hook,
189
+ preset,
187
190
  };
188
191
  }
package/dist/catalog.d.ts CHANGED
@@ -6,7 +6,7 @@ export interface CatalogEntry {
6
6
  * config files are NOT shipped in the npm tarball, so the scanner can't
7
7
  * read them at runtime. Baking here lets `/api/state` correctly classify
8
8
  * dual-Agent plugins as `["claude","codex"]` for installed users. Absent
9
- * on skill / hook entries. */
9
+ * on skill entries. */
10
10
  agents?: ("claude" | "codex")[];
11
11
  /** True for plugins whose source lives in an UPSTREAM marketplace
12
12
  * (skill-creator / claude-md-management / codex), not in this repo.
@@ -19,6 +19,5 @@ export interface Catalog {
19
19
  workflowSkills: CatalogEntry[];
20
20
  recommendedSkills: CatalogEntry[];
21
21
  plugins: CatalogEntry[];
22
- hooks: CatalogEntry[];
23
22
  }
24
23
  export declare function loadCatalog(packageRoot: string): Catalog;
package/dist/catalog.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-05-15T17:31:57.831Z",
2
+ "generatedAt": "2026-05-16T02:00:33.470Z",
3
3
  "workflowSkills": [
4
4
  {
5
5
  "name": "planning-with-files",
@@ -99,6 +99,5 @@
99
99
  "codex"
100
100
  ]
101
101
  }
102
- ],
103
- "hooks": []
102
+ ]
104
103
  }
package/dist/cli.d.ts CHANGED
@@ -4,6 +4,10 @@ import { type CategoryName } from "./types.js";
4
4
  export type { CategoryName } from "./types.js";
5
5
  export interface InstallParsed {
6
6
  all: boolean;
7
+ /** `--preset` — atomic install of the curated default set (workflow
8
+ * doc + workflow skills + auriga-workflow plugin). Mutually exclusive
9
+ * with `all` / `type` / `filter`. */
10
+ preset?: boolean;
7
11
  type?: CategoryName;
8
12
  filter?: string[];
9
13
  lang?: string;
@@ -37,3 +41,19 @@ export type ParsedArgs = {
37
41
  };
38
42
  export declare function parseArgs(argv: string[]): ParsedArgs;
39
43
  export declare function main(argv: string[]): Promise<number>;
44
+ type LegacyMenuValue = "preset" | "recommended" | "plugins";
45
+ /**
46
+ * The TUI's three menu items, in fixed order. Lifted to a module-level
47
+ * constant so VAL-TUI-001 / VAL-TUI-002 can assert the "exactly 3 items /
48
+ * order / default-checked" contract without driving inquirer.
49
+ *
50
+ * Workflow + Skills are absorbed by the「推荐预设」item.
51
+ * The preset label spells out the silent defaults (scope user / agent
52
+ * both / lang en) so a TTY user knows what they're getting — fine-tuning
53
+ * those goes through the non-interactive `install --preset` flags.
54
+ */
55
+ export declare const LEGACY_MENU_CHOICES: ReadonlyArray<{
56
+ value: LegacyMenuValue;
57
+ name: string;
58
+ checked: boolean;
59
+ }>;