agentplane 0.2.6 → 0.2.13

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 (166) hide show
  1. package/README.md +11 -0
  2. package/assets/AGENTS.md +35 -0
  3. package/assets/agents/CODER.json +0 -1
  4. package/assets/agents/INTEGRATOR.json +0 -1
  5. package/assets/agents/ORCHESTRATOR.json +1 -2
  6. package/assets/agents/PLANNER.json +1 -3
  7. package/assets/agents/TESTER.json +0 -1
  8. package/assets/agents/UPGRADER.json +17 -15
  9. package/dist/cli/archive.d.ts.map +1 -1
  10. package/dist/cli/archive.js +61 -36
  11. package/dist/cli/command-guide.d.ts.map +1 -1
  12. package/dist/cli/command-guide.js +5 -3
  13. package/dist/cli/run-cli/command-catalog.d.ts +4 -1
  14. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  15. package/dist/cli/run-cli/command-catalog.js +44 -26
  16. package/dist/cli/run-cli/commands/config.d.ts +5 -4
  17. package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
  18. package/dist/cli/run-cli/commands/config.js +47 -58
  19. package/dist/cli/run-cli/commands/core.d.ts +2 -1
  20. package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
  21. package/dist/cli/run-cli/commands/core.js +187 -51
  22. package/dist/cli/run-cli/commands/ide.d.ts +3 -1
  23. package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
  24. package/dist/cli/run-cli/commands/ide.js +7 -12
  25. package/dist/cli/run-cli/commands/init/ide-sync.d.ts.map +1 -1
  26. package/dist/cli/run-cli/commands/init/ide-sync.js +10 -1
  27. package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
  28. package/dist/cli/run-cli/commands/init/write-agents.js +4 -24
  29. package/dist/cli/run-cli/commands/init/write-gitignore.d.ts +5 -0
  30. package/dist/cli/run-cli/commands/init/write-gitignore.d.ts.map +1 -0
  31. package/dist/cli/run-cli/commands/init/write-gitignore.js +48 -0
  32. package/dist/cli/run-cli/commands/init.d.ts +1 -0
  33. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  34. package/dist/cli/run-cli/commands/init.js +34 -8
  35. package/dist/cli/run-cli/commands/wrap-command.d.ts +6 -0
  36. package/dist/cli/run-cli/commands/wrap-command.d.ts.map +1 -0
  37. package/dist/cli/run-cli/commands/wrap-command.js +17 -0
  38. package/dist/cli/run-cli/registry.run.d.ts +6 -2
  39. package/dist/cli/run-cli/registry.run.d.ts.map +1 -1
  40. package/dist/cli/run-cli/registry.run.js +7 -2
  41. package/dist/cli/run-cli.d.ts.map +1 -1
  42. package/dist/cli/run-cli.js +96 -75
  43. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  44. package/dist/cli/run-cli.test-helpers.js +99 -3
  45. package/dist/cli/spec/parse-utils.d.ts +11 -0
  46. package/dist/cli/spec/parse-utils.d.ts.map +1 -0
  47. package/dist/cli/spec/parse-utils.js +28 -0
  48. package/dist/commands/block.command.d.ts +3 -18
  49. package/dist/commands/block.command.d.ts.map +1 -1
  50. package/dist/commands/block.command.js +2 -143
  51. package/dist/commands/block.run.d.ts +5 -0
  52. package/dist/commands/block.run.d.ts.map +1 -0
  53. package/dist/commands/block.run.js +22 -0
  54. package/dist/commands/block.spec.d.ts +17 -0
  55. package/dist/commands/block.spec.d.ts.map +1 -0
  56. package/dist/commands/block.spec.js +115 -0
  57. package/dist/commands/doctor.command.d.ts +2 -7
  58. package/dist/commands/doctor.command.d.ts.map +1 -1
  59. package/dist/commands/doctor.command.js +2 -137
  60. package/dist/commands/doctor.run.d.ts +4 -0
  61. package/dist/commands/doctor.run.d.ts.map +1 -0
  62. package/dist/commands/doctor.run.js +174 -0
  63. package/dist/commands/doctor.spec.d.ts +7 -0
  64. package/dist/commands/doctor.spec.d.ts.map +1 -0
  65. package/dist/commands/doctor.spec.js +20 -0
  66. package/dist/commands/finish.command.d.ts +3 -27
  67. package/dist/commands/finish.command.d.ts.map +1 -1
  68. package/dist/commands/finish.command.js +2 -237
  69. package/dist/commands/finish.run.d.ts +5 -0
  70. package/dist/commands/finish.run.d.ts.map +1 -0
  71. package/dist/commands/finish.run.js +40 -0
  72. package/dist/commands/finish.spec.d.ts +26 -0
  73. package/dist/commands/finish.spec.d.ts.map +1 -0
  74. package/dist/commands/finish.spec.js +193 -0
  75. package/dist/commands/recipes/install.command.d.ts +2 -11
  76. package/dist/commands/recipes/install.command.d.ts.map +1 -1
  77. package/dist/commands/recipes/install.command.js +2 -161
  78. package/dist/commands/recipes/install.run.d.ts +4 -0
  79. package/dist/commands/recipes/install.run.d.ts.map +1 -0
  80. package/dist/commands/recipes/install.run.js +23 -0
  81. package/dist/commands/recipes/install.spec.d.ts +11 -0
  82. package/dist/commands/recipes/install.spec.d.ts.map +1 -0
  83. package/dist/commands/recipes/install.spec.js +140 -0
  84. package/dist/commands/release/apply.command.d.ts +11 -0
  85. package/dist/commands/release/apply.command.d.ts.map +1 -0
  86. package/dist/commands/release/apply.command.js +343 -0
  87. package/dist/commands/release/plan.command.d.ts +12 -0
  88. package/dist/commands/release/plan.command.d.ts.map +1 -0
  89. package/dist/commands/release/plan.command.js +206 -0
  90. package/dist/commands/release/release.command.d.ts +5 -0
  91. package/dist/commands/release/release.command.d.ts.map +1 -0
  92. package/dist/commands/release/release.command.js +18 -0
  93. package/dist/commands/shared/git-context.d.ts +3 -0
  94. package/dist/commands/shared/git-context.d.ts.map +1 -1
  95. package/dist/commands/shared/git-context.js +10 -0
  96. package/dist/commands/shared/task-backend.d.ts +1 -0
  97. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  98. package/dist/commands/start.command.d.ts +3 -18
  99. package/dist/commands/start.command.d.ts.map +1 -1
  100. package/dist/commands/start.command.js +2 -143
  101. package/dist/commands/start.run.d.ts +5 -0
  102. package/dist/commands/start.run.d.ts.map +1 -0
  103. package/dist/commands/start.run.js +22 -0
  104. package/dist/commands/start.spec.d.ts +17 -0
  105. package/dist/commands/start.spec.d.ts.map +1 -0
  106. package/dist/commands/start.spec.js +115 -0
  107. package/dist/commands/task/add.command.d.ts.map +1 -1
  108. package/dist/commands/task/add.command.js +1 -7
  109. package/dist/commands/task/derive.command.d.ts.map +1 -1
  110. package/dist/commands/task/derive.command.js +1 -7
  111. package/dist/commands/task/finish.d.ts.map +1 -1
  112. package/dist/commands/task/finish.js +34 -2
  113. package/dist/commands/task/list.command.d.ts +3 -8
  114. package/dist/commands/task/list.command.d.ts.map +1 -1
  115. package/dist/commands/task/list.command.js +2 -67
  116. package/dist/commands/task/list.run.d.ts +5 -0
  117. package/dist/commands/task/list.run.d.ts.map +1 -0
  118. package/dist/commands/task/list.run.js +10 -0
  119. package/dist/commands/task/list.spec.d.ts +7 -0
  120. package/dist/commands/task/list.spec.d.ts.map +1 -0
  121. package/dist/commands/task/list.spec.js +51 -0
  122. package/dist/commands/task/next.command.d.ts +3 -8
  123. package/dist/commands/task/next.command.d.ts.map +1 -1
  124. package/dist/commands/task/next.command.js +2 -89
  125. package/dist/commands/task/next.run.d.ts +5 -0
  126. package/dist/commands/task/next.run.d.ts.map +1 -0
  127. package/dist/commands/task/next.run.js +11 -0
  128. package/dist/commands/task/next.spec.d.ts +7 -0
  129. package/dist/commands/task/next.spec.d.ts.map +1 -0
  130. package/dist/commands/task/next.spec.js +69 -0
  131. package/dist/commands/task/search.command.d.ts +3 -10
  132. package/dist/commands/task/search.command.d.ts.map +1 -1
  133. package/dist/commands/task/search.command.js +2 -101
  134. package/dist/commands/task/search.run.d.ts +5 -0
  135. package/dist/commands/task/search.run.d.ts.map +1 -0
  136. package/dist/commands/task/search.run.js +13 -0
  137. package/dist/commands/task/search.spec.d.ts +9 -0
  138. package/dist/commands/task/search.spec.d.ts.map +1 -0
  139. package/dist/commands/task/search.spec.js +79 -0
  140. package/dist/commands/task/set-status.command.d.ts.map +1 -1
  141. package/dist/commands/task/set-status.command.js +1 -7
  142. package/dist/commands/task/shared.d.ts.map +1 -1
  143. package/dist/commands/task/shared.js +15 -8
  144. package/dist/commands/task/show.command.d.ts +3 -7
  145. package/dist/commands/task/show.command.d.ts.map +1 -1
  146. package/dist/commands/task/show.command.js +2 -19
  147. package/dist/commands/task/show.run.d.ts +5 -0
  148. package/dist/commands/task/show.run.d.ts.map +1 -0
  149. package/dist/commands/task/show.run.js +11 -0
  150. package/dist/commands/task/show.spec.d.ts +6 -0
  151. package/dist/commands/task/show.spec.d.ts.map +1 -0
  152. package/dist/commands/task/show.spec.js +8 -0
  153. package/dist/commands/task/update.command.d.ts.map +1 -1
  154. package/dist/commands/task/update.command.js +1 -7
  155. package/dist/commands/upgrade.d.ts.map +1 -1
  156. package/dist/commands/upgrade.js +171 -32
  157. package/dist/commands/verify.command.d.ts +3 -15
  158. package/dist/commands/verify.command.d.ts.map +1 -1
  159. package/dist/commands/verify.command.js +2 -113
  160. package/dist/commands/verify.run.d.ts +5 -0
  161. package/dist/commands/verify.run.d.ts.map +1 -0
  162. package/dist/commands/verify.run.js +17 -0
  163. package/dist/commands/verify.spec.d.ts +14 -0
  164. package/dist/commands/verify.spec.d.ts.map +1 -0
  165. package/dist/commands/verify.spec.js +96 -0
  166. package/package.json +1 -1
@@ -0,0 +1,193 @@
1
+ import { usageError } from "../cli/spec/errors.js";
2
+ import { toStringList } from "../cli/spec/parse-utils.js";
3
+ export const finishSpec = {
4
+ id: ["finish"],
5
+ group: "Lifecycle",
6
+ summary: "Mark task(s) as DONE and record a structured Verified comment.",
7
+ args: [
8
+ {
9
+ name: "task-id",
10
+ required: true,
11
+ variadic: true,
12
+ valueHint: "<task-id>",
13
+ description: "One or more existing task ids.",
14
+ },
15
+ ],
16
+ options: [
17
+ {
18
+ kind: "string",
19
+ name: "author",
20
+ valueHint: "<id>",
21
+ required: true,
22
+ description: "Comment author id (e.g. INTEGRATOR).",
23
+ },
24
+ {
25
+ kind: "string",
26
+ name: "body",
27
+ valueHint: "<text>",
28
+ required: true,
29
+ description: "Structured comment body (must match the configured Verified: prefix).",
30
+ },
31
+ {
32
+ kind: "string",
33
+ name: "result",
34
+ valueHint: "<one-line>",
35
+ description: "One-line result summary stored in task metadata (required for non-spike tasks when finishing a single task).",
36
+ },
37
+ {
38
+ kind: "string",
39
+ name: "risk",
40
+ valueHint: "<low|med|high>",
41
+ choices: ["low", "med", "high"],
42
+ description: "Optional. Risk level stored in task metadata.",
43
+ },
44
+ {
45
+ kind: "boolean",
46
+ name: "breaking",
47
+ default: false,
48
+ description: "Optional. Mark the change as breaking in task metadata.",
49
+ },
50
+ {
51
+ kind: "string",
52
+ name: "commit",
53
+ valueHint: "<hash>",
54
+ description: "Commit hash to record on the task (optional).",
55
+ },
56
+ { kind: "boolean", name: "force", default: false, description: "Force finish despite gates." },
57
+ {
58
+ kind: "boolean",
59
+ name: "commit-from-comment",
60
+ default: false,
61
+ description: "Create a commit using the comment body (requires exactly one task id).",
62
+ },
63
+ {
64
+ kind: "string",
65
+ name: "commit-emoji",
66
+ valueHint: "<emoji>",
67
+ description: "Override the commit emoji (used with --commit-from-comment).",
68
+ },
69
+ {
70
+ kind: "string",
71
+ name: "commit-allow",
72
+ valueHint: "<path-prefix>",
73
+ repeatable: true,
74
+ description: "Repeatable. Allowlist path prefixes to stage for the commit (used with --commit-from-comment).",
75
+ },
76
+ {
77
+ kind: "boolean",
78
+ name: "commit-auto-allow",
79
+ default: false,
80
+ description: "Auto-allow inferred allowlist paths if none are provided (used with --commit-from-comment).",
81
+ },
82
+ {
83
+ kind: "boolean",
84
+ name: "commit-allow-tasks",
85
+ default: true,
86
+ hidden: true,
87
+ description: "Deprecated. Tasks are always allowed for status commits.",
88
+ deprecated: "no-op",
89
+ },
90
+ {
91
+ kind: "boolean",
92
+ name: "commit-require-clean",
93
+ default: false,
94
+ description: "Require a clean working tree for the commit (used with --commit-from-comment).",
95
+ },
96
+ {
97
+ kind: "boolean",
98
+ name: "status-commit",
99
+ default: false,
100
+ description: "Create a separate status commit (requires exactly one task id).",
101
+ },
102
+ {
103
+ kind: "string",
104
+ name: "status-commit-emoji",
105
+ valueHint: "<emoji>",
106
+ description: "Override the status commit emoji (used with --status-commit).",
107
+ },
108
+ {
109
+ kind: "string",
110
+ name: "status-commit-allow",
111
+ valueHint: "<path-prefix>",
112
+ repeatable: true,
113
+ description: "Repeatable. Allowlist path prefixes to stage for the status commit (used with --status-commit).",
114
+ },
115
+ {
116
+ kind: "boolean",
117
+ name: "status-commit-auto-allow",
118
+ default: false,
119
+ description: "Auto-allow inferred allowlist paths if none are provided (used with --status-commit).",
120
+ },
121
+ {
122
+ kind: "boolean",
123
+ name: "status-commit-require-clean",
124
+ default: false,
125
+ description: "Require a clean working tree for the status commit (used with --status-commit).",
126
+ },
127
+ {
128
+ kind: "boolean",
129
+ name: "confirm-status-commit",
130
+ default: false,
131
+ description: "Confirm status commit creation when status_commit_policy=confirm (used with --commit-from-comment or --status-commit).",
132
+ },
133
+ { kind: "boolean", name: "quiet", default: false, description: "Suppress output." },
134
+ ],
135
+ examples: [
136
+ {
137
+ cmd: 'agentplane finish 202602030608-F1Q8AB --author INTEGRATOR --body "Verified: all checks passed" --commit abcdef123456',
138
+ why: "Finish a task and record commit metadata.",
139
+ },
140
+ {
141
+ cmd: 'agentplane finish 202602030608-F1Q8AB --author INTEGRATOR --body "Verified: all checks passed" --commit-from-comment --commit-allow packages/agentplane/src',
142
+ why: "Finish and create a commit from the comment (single-task only).",
143
+ },
144
+ ],
145
+ validateRaw: (raw) => {
146
+ const ids = raw.args["task-id"];
147
+ const taskIds = Array.isArray(ids) ? ids : [];
148
+ const commitFromComment = raw.opts["commit-from-comment"] === true;
149
+ const statusCommit = raw.opts["status-commit"] === true;
150
+ if ((commitFromComment || statusCommit) && taskIds.length !== 1) {
151
+ throw usageError({
152
+ spec: finishSpec,
153
+ command: "finish",
154
+ message: "--commit-from-comment/--status-commit requires exactly one task id",
155
+ });
156
+ }
157
+ const hasMeta = typeof raw.opts.result === "string" ||
158
+ typeof raw.opts.risk === "string" ||
159
+ raw.opts.breaking === true;
160
+ if (hasMeta && taskIds.length !== 1) {
161
+ throw usageError({
162
+ spec: finishSpec,
163
+ command: "finish",
164
+ message: "--result/--risk/--breaking requires exactly one task id",
165
+ });
166
+ }
167
+ },
168
+ parse: (raw) => ({
169
+ taskIds: Array.isArray(raw.args["task-id"])
170
+ ? raw.args["task-id"].filter((x) => typeof x === "string")
171
+ : [],
172
+ author: raw.opts.author,
173
+ body: raw.opts.body,
174
+ result: raw.opts.result,
175
+ risk: raw.opts.risk,
176
+ breaking: raw.opts.breaking === true,
177
+ commit: raw.opts.commit,
178
+ force: raw.opts.force === true,
179
+ commitFromComment: raw.opts["commit-from-comment"] === true,
180
+ commitEmoji: raw.opts["commit-emoji"],
181
+ commitAllow: toStringList(raw.opts["commit-allow"]),
182
+ commitAutoAllow: raw.opts["commit-auto-allow"] === true,
183
+ commitAllowTasks: raw.opts["commit-allow-tasks"] !== false,
184
+ commitRequireClean: raw.opts["commit-require-clean"] === true,
185
+ statusCommit: raw.opts["status-commit"] === true,
186
+ statusCommitEmoji: raw.opts["status-commit-emoji"],
187
+ statusCommitAllow: toStringList(raw.opts["status-commit-allow"]),
188
+ statusCommitAutoAllow: raw.opts["status-commit-auto-allow"] === true,
189
+ statusCommitRequireClean: raw.opts["status-commit-require-clean"] === true,
190
+ confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
191
+ quiet: raw.opts.quiet === true,
192
+ }),
193
+ };
@@ -1,12 +1,3 @@
1
- import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
2
- import { type RecipeConflictMode, type RecipeInstallSource } from "../recipes.js";
3
- export type RecipesInstallParsed = {
4
- source: RecipeInstallSource;
5
- index?: string;
6
- refresh: boolean;
7
- yes: boolean;
8
- onConflict: RecipeConflictMode;
9
- };
10
- export declare const recipesInstallSpec: CommandSpec<RecipesInstallParsed>;
11
- export declare const runRecipesInstall: CommandHandler<RecipesInstallParsed>;
1
+ export { recipesInstallSpec, type RecipesInstallParsed } from "./install.spec.js";
2
+ export { runRecipesInstall } from "./install.run.js";
12
3
  //# sourceMappingURL=install.command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/install.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;AAItF,OAAO,EAAoB,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpG,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CA4IhE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,oBAAoB,CAkB7D,CAAC"}
1
+ {"version":3,"file":"install.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/install.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,161 +1,2 @@
1
- import { usageError } from "../../cli/spec/errors.js";
2
- import { CliError } from "../../shared/errors.js";
3
- import { cmdRecipeInstall } from "../recipes.js";
4
- export const recipesInstallSpec = {
5
- id: ["recipes", "install"],
6
- group: "Recipes",
7
- summary: "Install a recipe from remote index, local archive, or URL.",
8
- synopsis: [
9
- "agentplane recipes install <id|path|url> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
10
- "agentplane recipes install --name <id> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
11
- "agentplane recipes install --path <path> [--yes] [--on-conflict <fail|rename|overwrite>]",
12
- "agentplane recipes install --url <url> [--yes] [--on-conflict <fail|rename|overwrite>]",
13
- ],
14
- args: [
15
- {
16
- name: "source",
17
- required: false,
18
- valueHint: "<id|path|url>",
19
- description: "Auto mode: URL if http(s); else PATH if file exists; else NAME (remote index id).",
20
- },
21
- ],
22
- options: [
23
- {
24
- kind: "string",
25
- name: "name",
26
- valueHint: "<id>",
27
- description: "Install from remote index by recipe id.",
28
- },
29
- {
30
- kind: "string",
31
- name: "path",
32
- valueHint: "<path>",
33
- description: "Install from local recipe archive path.",
34
- },
35
- {
36
- kind: "string",
37
- name: "url",
38
- valueHint: "<url>",
39
- description: "Install from recipe archive URL.",
40
- },
41
- {
42
- kind: "string",
43
- name: "index",
44
- valueHint: "<path|url>",
45
- description: "Override recipes index location (used when installing by name / auto-name).",
46
- },
47
- {
48
- kind: "boolean",
49
- name: "refresh",
50
- default: false,
51
- description: "Refresh remote index cache before installing.",
52
- },
53
- {
54
- kind: "boolean",
55
- name: "yes",
56
- default: false,
57
- description: "Auto-approve network prompts when allowed by config.",
58
- },
59
- {
60
- kind: "string",
61
- name: "on-conflict",
62
- valueHint: "<fail|rename|overwrite>",
63
- choices: ["fail", "rename", "overwrite"],
64
- default: "fail",
65
- description: "How to handle conflicts when applying recipe agents.",
66
- },
67
- ],
68
- validateRaw: (raw) => {
69
- const explicit = [raw.opts.name, raw.opts.path, raw.opts.url].filter(Boolean).length;
70
- const hasPositional = Boolean(raw.args.source);
71
- if (explicit + (hasPositional ? 1 : 0) !== 1) {
72
- throw usageError({
73
- spec: recipesInstallSpec,
74
- message: "Exactly one source is required: <source> OR --name OR --path OR --url",
75
- command: "recipes install",
76
- });
77
- }
78
- },
79
- parse: (raw) => {
80
- const onConflict = (raw.opts["on-conflict"] ?? "fail");
81
- const refresh = raw.opts.refresh === true;
82
- const yes = raw.opts.yes === true;
83
- const index = typeof raw.opts.index === "string" ? raw.opts.index : undefined;
84
- if (raw.opts.name) {
85
- return {
86
- source: { type: "name", value: raw.opts.name },
87
- index,
88
- refresh,
89
- yes,
90
- onConflict,
91
- };
92
- }
93
- if (raw.opts.path) {
94
- return {
95
- source: { type: "path", value: raw.opts.path },
96
- index,
97
- refresh,
98
- yes,
99
- onConflict,
100
- };
101
- }
102
- if (raw.opts.url) {
103
- return {
104
- source: { type: "url", value: raw.opts.url },
105
- index,
106
- refresh,
107
- yes,
108
- onConflict,
109
- };
110
- }
111
- const source = raw.args.source;
112
- if (typeof source !== "string") {
113
- throw usageError({
114
- spec: recipesInstallSpec,
115
- command: "recipes install",
116
- message: "Missing source argument",
117
- });
118
- }
119
- return {
120
- source: { type: "auto", value: source },
121
- index,
122
- refresh,
123
- yes,
124
- onConflict,
125
- };
126
- },
127
- examples: [
128
- { cmd: "agentplane recipes install viewer", why: "Auto: install by id from remote index." },
129
- {
130
- cmd: "agentplane recipes install --name viewer --refresh",
131
- why: "Install by id, forcing index refresh.",
132
- },
133
- {
134
- cmd: "agentplane recipes install viewer --on-conflict overwrite",
135
- why: "Apply recipe agents, overwriting conflicts.",
136
- },
137
- ],
138
- notes: [
139
- "Auto mode resolution matches v0.1.9: URL if http(s); else PATH if file exists; else NAME (remote index).",
140
- "Network operations may require approval; use --yes to auto-approve when allowed by config.",
141
- ],
142
- };
143
- export const runRecipesInstall = (ctx, p) => (async () => {
144
- try {
145
- return await cmdRecipeInstall({
146
- cwd: ctx.cwd,
147
- rootOverride: ctx.rootOverride,
148
- ...p,
149
- });
150
- }
151
- catch (err) {
152
- if (err instanceof CliError && err.code === "E_USAGE") {
153
- throw usageError({
154
- spec: recipesInstallSpec,
155
- command: "recipes install",
156
- message: err.message,
157
- });
158
- }
159
- throw err;
160
- }
161
- })();
1
+ export { recipesInstallSpec } from "./install.spec.js";
2
+ export { runRecipesInstall } from "./install.run.js";
@@ -0,0 +1,4 @@
1
+ import type { CommandHandler } from "../../cli/spec/spec.js";
2
+ import type { RecipesInstallParsed } from "./install.spec.js";
3
+ export declare const runRecipesInstall: CommandHandler<RecipesInstallParsed>;
4
+ //# sourceMappingURL=install.run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.run.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/install.run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,oBAAoB,CAkB7D,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { usageError } from "../../cli/spec/errors.js";
2
+ import { CliError } from "../../shared/errors.js";
3
+ import { cmdRecipeInstall } from "../recipes.js";
4
+ import { recipesInstallSpec } from "./install.spec.js";
5
+ export const runRecipesInstall = (ctx, p) => (async () => {
6
+ try {
7
+ return await cmdRecipeInstall({
8
+ cwd: ctx.cwd,
9
+ rootOverride: ctx.rootOverride,
10
+ ...p,
11
+ });
12
+ }
13
+ catch (err) {
14
+ if (err instanceof CliError && err.code === "E_USAGE") {
15
+ throw usageError({
16
+ spec: recipesInstallSpec,
17
+ command: "recipes install",
18
+ message: err.message,
19
+ });
20
+ }
21
+ throw err;
22
+ }
23
+ })();
@@ -0,0 +1,11 @@
1
+ import type { CommandSpec } from "../../cli/spec/spec.js";
2
+ import type { RecipeConflictMode, RecipeInstallSource } from "../recipes.js";
3
+ export type RecipesInstallParsed = {
4
+ source: RecipeInstallSource;
5
+ index?: string;
6
+ refresh: boolean;
7
+ yes: boolean;
8
+ onConflict: RecipeConflictMode;
9
+ };
10
+ export declare const recipesInstallSpec: CommandSpec<RecipesInstallParsed>;
11
+ //# sourceMappingURL=install.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/install.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,oBAAoB,CA4IhE,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { usageError } from "../../cli/spec/errors.js";
2
+ export const recipesInstallSpec = {
3
+ id: ["recipes", "install"],
4
+ group: "Recipes",
5
+ summary: "Install a recipe from remote index, local archive, or URL.",
6
+ synopsis: [
7
+ "agentplane recipes install <id|path|url> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
8
+ "agentplane recipes install --name <id> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
9
+ "agentplane recipes install --path <path> [--yes] [--on-conflict <fail|rename|overwrite>]",
10
+ "agentplane recipes install --url <url> [--yes] [--on-conflict <fail|rename|overwrite>]",
11
+ ],
12
+ args: [
13
+ {
14
+ name: "source",
15
+ required: false,
16
+ valueHint: "<id|path|url>",
17
+ description: "Auto mode: URL if http(s); else PATH if file exists; else NAME (remote index id).",
18
+ },
19
+ ],
20
+ options: [
21
+ {
22
+ kind: "string",
23
+ name: "name",
24
+ valueHint: "<id>",
25
+ description: "Install from remote index by recipe id.",
26
+ },
27
+ {
28
+ kind: "string",
29
+ name: "path",
30
+ valueHint: "<path>",
31
+ description: "Install from local recipe archive path.",
32
+ },
33
+ {
34
+ kind: "string",
35
+ name: "url",
36
+ valueHint: "<url>",
37
+ description: "Install from recipe archive URL.",
38
+ },
39
+ {
40
+ kind: "string",
41
+ name: "index",
42
+ valueHint: "<path|url>",
43
+ description: "Override recipes index location (used when installing by name / auto-name).",
44
+ },
45
+ {
46
+ kind: "boolean",
47
+ name: "refresh",
48
+ default: false,
49
+ description: "Refresh remote index cache before installing.",
50
+ },
51
+ {
52
+ kind: "boolean",
53
+ name: "yes",
54
+ default: false,
55
+ description: "Auto-approve network prompts when allowed by config.",
56
+ },
57
+ {
58
+ kind: "string",
59
+ name: "on-conflict",
60
+ valueHint: "<fail|rename|overwrite>",
61
+ choices: ["fail", "rename", "overwrite"],
62
+ default: "fail",
63
+ description: "How to handle conflicts when applying recipe agents.",
64
+ },
65
+ ],
66
+ validateRaw: (raw) => {
67
+ const explicit = [raw.opts.name, raw.opts.path, raw.opts.url].filter(Boolean).length;
68
+ const hasPositional = Boolean(raw.args.source);
69
+ if (explicit + (hasPositional ? 1 : 0) !== 1) {
70
+ throw usageError({
71
+ spec: recipesInstallSpec,
72
+ message: "Exactly one source is required: <source> OR --name OR --path OR --url",
73
+ command: "recipes install",
74
+ });
75
+ }
76
+ },
77
+ parse: (raw) => {
78
+ const onConflict = (raw.opts["on-conflict"] ?? "fail");
79
+ const refresh = raw.opts.refresh === true;
80
+ const yes = raw.opts.yes === true;
81
+ const index = typeof raw.opts.index === "string" ? raw.opts.index : undefined;
82
+ if (raw.opts.name) {
83
+ return {
84
+ source: { type: "name", value: raw.opts.name },
85
+ index,
86
+ refresh,
87
+ yes,
88
+ onConflict,
89
+ };
90
+ }
91
+ if (raw.opts.path) {
92
+ return {
93
+ source: { type: "path", value: raw.opts.path },
94
+ index,
95
+ refresh,
96
+ yes,
97
+ onConflict,
98
+ };
99
+ }
100
+ if (raw.opts.url) {
101
+ return {
102
+ source: { type: "url", value: raw.opts.url },
103
+ index,
104
+ refresh,
105
+ yes,
106
+ onConflict,
107
+ };
108
+ }
109
+ const source = raw.args.source;
110
+ if (typeof source !== "string") {
111
+ throw usageError({
112
+ spec: recipesInstallSpec,
113
+ command: "recipes install",
114
+ message: "Missing source argument",
115
+ });
116
+ }
117
+ return {
118
+ source: { type: "auto", value: source },
119
+ index,
120
+ refresh,
121
+ yes,
122
+ onConflict,
123
+ };
124
+ },
125
+ examples: [
126
+ { cmd: "agentplane recipes install viewer", why: "Auto: install by id from remote index." },
127
+ {
128
+ cmd: "agentplane recipes install --name viewer --refresh",
129
+ why: "Install by id, forcing index refresh.",
130
+ },
131
+ {
132
+ cmd: "agentplane recipes install viewer --on-conflict overwrite",
133
+ why: "Apply recipe agents, overwriting conflicts.",
134
+ },
135
+ ],
136
+ notes: [
137
+ "Auto mode resolution matches v0.1.9: URL if http(s); else PATH if file exists; else NAME (remote index).",
138
+ "Network operations may require approval; use --yes to auto-approve when allowed by config.",
139
+ ],
140
+ };
@@ -0,0 +1,11 @@
1
+ import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
2
+ export type ReleaseApplyFlags = {
3
+ plan?: string;
4
+ yes: boolean;
5
+ push: boolean;
6
+ remote: string;
7
+ };
8
+ export type ReleaseApplyParsed = ReleaseApplyFlags;
9
+ export declare const releaseApplySpec: CommandSpec<ReleaseApplyParsed>;
10
+ export declare const runReleaseApply: CommandHandler<ReleaseApplyParsed>;
11
+ //# sourceMappingURL=apply.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAS1E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AA0KnD,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAwE5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,kBAAkB,CA+H9D,CAAC"}