@markjaquith/agency 2.28.1 → 2.29.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 +3 -2
- package/cli.ts +12 -0
- package/package.json +1 -1
- package/skills/agency/references/commands.md +2 -1
- package/src/cli-parser.test.ts +2 -0
- package/src/cli-parser.ts +7 -1
- package/src/commands/workbase.ts +2 -1
package/README.md
CHANGED
|
@@ -284,7 +284,7 @@ owning `TASK.md`. Stable IDs do not encode ordering in directory names.
|
|
|
284
284
|
## Quick Start
|
|
285
285
|
|
|
286
286
|
```bash
|
|
287
|
-
agency init ~/work
|
|
287
|
+
agency workbase init ~/work
|
|
288
288
|
cd ~/work
|
|
289
289
|
|
|
290
290
|
agency repo add frontend git@github.com:example/frontend.git
|
|
@@ -381,7 +381,8 @@ conditions remain visible in `warnings` or `unresolved` with a suggested action.
|
|
|
381
381
|
### Workbase and Repositories
|
|
382
382
|
|
|
383
383
|
```text
|
|
384
|
-
agency init [path] [--json]
|
|
384
|
+
agency workbase init [path] [--json]
|
|
385
|
+
agency init [path] [--json] # Alias
|
|
385
386
|
agency workbase add <path> [--name <name>] [--json]
|
|
386
387
|
agency workbase list [--json]
|
|
387
388
|
agency workbase show <id|name|path> [--json]
|
package/cli.ts
CHANGED
|
@@ -358,6 +358,18 @@ const commands: Record<string, Command> = {
|
|
|
358
358
|
console.log(workbaseHelp)
|
|
359
359
|
return
|
|
360
360
|
}
|
|
361
|
+
if (args[0] === "init") {
|
|
362
|
+
await runCommand(
|
|
363
|
+
init({
|
|
364
|
+
path: args[1],
|
|
365
|
+
json: options.json,
|
|
366
|
+
silent: options.silent,
|
|
367
|
+
verbose: options.verbose,
|
|
368
|
+
cwd: options.cwd,
|
|
369
|
+
}),
|
|
370
|
+
)
|
|
371
|
+
return
|
|
372
|
+
}
|
|
361
373
|
await runCommand(
|
|
362
374
|
workbase({
|
|
363
375
|
subcommand: args[0],
|
package/package.json
CHANGED
|
@@ -33,7 +33,8 @@ observational unless `--apply` is explicit.
|
|
|
33
33
|
## Workbase And Repositories
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
agency init [path] [--json]
|
|
36
|
+
agency workbase init [path] [--json]
|
|
37
|
+
agency init [path] [--json] # Alias
|
|
37
38
|
agency workbase add <path> [--name <name>] [--json]
|
|
38
39
|
agency workbase list [--json]
|
|
39
40
|
agency workbase show <id|name|path> [--json]
|
package/src/cli-parser.test.ts
CHANGED
|
@@ -139,6 +139,7 @@ describe("strict CLI parsing", () => {
|
|
|
139
139
|
["repo", "remote", "agency", "https://example.com/repo.git"],
|
|
140
140
|
["repo", "verify", "agency"],
|
|
141
141
|
["workbase", "show", "primary", "--json"],
|
|
142
|
+
["workbase", "init", "new-workbase", "--json"],
|
|
142
143
|
["workbase", "name", "primary", "renamed"],
|
|
143
144
|
["workbase", "name", "primary", "--clear"],
|
|
144
145
|
]) {
|
|
@@ -164,6 +165,7 @@ describe("strict CLI parsing", () => {
|
|
|
164
165
|
test("enforces exact maximum positional arity for every leaf command", () => {
|
|
165
166
|
for (const [args, usage] of [
|
|
166
167
|
[["init", "one", "two"], "agency init"],
|
|
168
|
+
[["workbase", "init", "one", "two"], "agency workbase init"],
|
|
167
169
|
[["workbase", "add", "one", "two"], "agency workbase add"],
|
|
168
170
|
[["workbase", "list", "extra"], "agency workbase list"],
|
|
169
171
|
[["integration", "status", "extra"], "agency integration status"],
|
package/src/cli-parser.ts
CHANGED
|
@@ -127,13 +127,19 @@ const commands = {
|
|
|
127
127
|
},
|
|
128
128
|
},
|
|
129
129
|
workbase: {
|
|
130
|
-
usage: "agency workbase <add|list|show|name|remove|prune|default>",
|
|
130
|
+
usage: "agency workbase <init|add|list|show|name|remove|prune|default>",
|
|
131
131
|
options: {
|
|
132
132
|
...outputOptions,
|
|
133
133
|
name: { type: "string" },
|
|
134
134
|
clear: { type: "boolean" },
|
|
135
135
|
},
|
|
136
136
|
subcommands: {
|
|
137
|
+
init: {
|
|
138
|
+
usage: "agency workbase init [path] [--json]",
|
|
139
|
+
minArgs: 0,
|
|
140
|
+
maxArgs: 1,
|
|
141
|
+
options: ["json"],
|
|
142
|
+
},
|
|
137
143
|
add: {
|
|
138
144
|
usage: "agency workbase add <path> [--json]",
|
|
139
145
|
minArgs: 1,
|
package/src/commands/workbase.ts
CHANGED
|
@@ -151,7 +151,7 @@ export const workbase = (options: WorkbaseOptions) =>
|
|
|
151
151
|
default:
|
|
152
152
|
return yield* Effect.fail(
|
|
153
153
|
new Error(
|
|
154
|
-
"Subcommand is required. Available: add, list, show, name, remove, prune, default",
|
|
154
|
+
"Subcommand is required. Available: init, add, list, show, name, remove, prune, default",
|
|
155
155
|
),
|
|
156
156
|
)
|
|
157
157
|
}
|
|
@@ -161,6 +161,7 @@ export const help = `
|
|
|
161
161
|
Usage: agency workbase <subcommand>
|
|
162
162
|
|
|
163
163
|
Subcommands:
|
|
164
|
+
init [path] Initialize an Agency workbase
|
|
164
165
|
add <path> Register an Agency workbase
|
|
165
166
|
list List registered workbases
|
|
166
167
|
show <selector> Show a registered workbase
|