@agentworkforce/cli 0.13.0 → 0.15.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/CHANGELOG.md +27 -2
- package/README.md +61 -26
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +81 -26
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +123 -7
- package/dist/cli.test.js.map +1 -1
- package/dist/local-personas.d.ts +5 -3
- package/dist/local-personas.d.ts.map +1 -1
- package/dist/local-personas.js +128 -25
- package/dist/local-personas.js.map +1 -1
- package/dist/local-personas.test.js +240 -0
- package/dist/local-personas.test.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -12,11 +12,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
12
12
|
- `agentworkforce agent` now records launch metadata for direct harness
|
|
13
13
|
launches; opt out with `--no-launch-metadata` or
|
|
14
14
|
`AGENTWORKFORCE_LAUNCH_METADATA=0`.
|
|
15
|
-
- `agentworkforce create` now opens `persona-maker@best`, supports
|
|
16
|
-
`--save-default`, and passes
|
|
15
|
+
- `agentworkforce create` now opens `persona-maker@best`, supports
|
|
16
|
+
`--save-in-directory=<target>` and `--save-default`, and passes
|
|
17
|
+
`TARGET_DIR` / `CREATE_MODE` persona inputs.
|
|
17
18
|
- Persona source config supports `defaultCreateTarget` for the implicit create target.
|
|
18
19
|
- `--version`/`-v` now prints the CLI package version.
|
|
19
20
|
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `agentworkforce create` now defaults to writing into
|
|
24
|
+
`<cwd>/.agentworkforce/workforce/personas` unconditionally, creating the
|
|
25
|
+
directory if it does not already exist. The previous behavior fell back to
|
|
26
|
+
the user persona dir when no cwd-local workforce existed; pass
|
|
27
|
+
`--save-in-directory=<target>` (or set `defaultCreateTarget` in the source
|
|
28
|
+
config) to author somewhere else.
|
|
29
|
+
- The previous `--to <target>` flag has been renamed to
|
|
30
|
+
`--save-in-directory=<target>` (also accepted as
|
|
31
|
+
`--save-in-directory <target>`). The old name is no longer recognized.
|
|
32
|
+
|
|
33
|
+
## [0.15.0] - 2026-05-08
|
|
34
|
+
|
|
35
|
+
### Released
|
|
36
|
+
|
|
37
|
+
- v0.15.0
|
|
38
|
+
|
|
39
|
+
## [0.14.0] - 2026-05-08
|
|
40
|
+
|
|
41
|
+
### Released
|
|
42
|
+
|
|
43
|
+
- v0.14.0
|
|
44
|
+
|
|
20
45
|
## [0.13.0] - 2026-05-08
|
|
21
46
|
|
|
22
47
|
### Released
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ built-in one from `/personas/`, or an installed/local one that extends a lower
|
|
|
6
6
|
source.
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
agentworkforce create [--
|
|
9
|
+
agentworkforce create [--save-in-directory=<target>] [--save-default] [--install-in-repo] [--no-launch-metadata]
|
|
10
10
|
agentworkforce agent [--install-in-repo] [--no-launch-metadata] <persona>[@<tier>]
|
|
11
11
|
agentworkforce list [flags]
|
|
12
12
|
agentworkforce show <persona>[@<tier>]
|
|
@@ -68,7 +68,7 @@ Unknown persona prints the full catalog with each entry's origin.
|
|
|
68
68
|
## Create
|
|
69
69
|
|
|
70
70
|
```
|
|
71
|
-
agentworkforce create [--
|
|
71
|
+
agentworkforce create [--save-in-directory=<target>] [--save-default] [--install-in-repo] [--no-launch-metadata]
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
`create` is the persona-authoring entry point. It runs `persona-maker@best`
|
|
@@ -94,32 +94,33 @@ Targets:
|
|
|
94
94
|
|
|
95
95
|
Default target resolution:
|
|
96
96
|
|
|
97
|
-
1. `--
|
|
98
|
-
2.
|
|
99
|
-
3. Else use `
|
|
100
|
-
4. Else use `user`.
|
|
97
|
+
1. `--save-in-directory=<target>` wins.
|
|
98
|
+
2. Else use `defaultCreateTarget` from `~/.agentworkforce/workforce/config.json`.
|
|
99
|
+
3. Else use `cwd` (`<cwd>/.agentworkforce/workforce/personas`).
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
The cwd persona directory is created (`mkdir -p`) when it does not exist, so a
|
|
102
|
+
fresh project can run `agentworkforce create` without any setup. To author
|
|
103
|
+
personas anywhere else, pass `--save-in-directory=<target>` on the command line
|
|
104
|
+
(the value can also be passed as `--save-in-directory <target>`), or use
|
|
105
|
+
`--save-default` once to persist a different default in the source config.
|
|
105
106
|
|
|
106
107
|
Examples:
|
|
107
108
|
|
|
108
109
|
```sh
|
|
109
|
-
# Create in
|
|
110
|
+
# Create in <cwd>/.agentworkforce/workforce/personas (created if missing)
|
|
110
111
|
agentworkforce create
|
|
111
112
|
|
|
112
113
|
# Force the user persona directory
|
|
113
|
-
agentworkforce create --
|
|
114
|
+
agentworkforce create --save-in-directory=user
|
|
114
115
|
|
|
115
116
|
# Create in a configured persona source
|
|
116
|
-
agentworkforce create --
|
|
117
|
+
agentworkforce create --save-in-directory=dir:1
|
|
117
118
|
|
|
118
119
|
# Create in an explicit checked-out persona directory and make that the default
|
|
119
|
-
agentworkforce create --
|
|
120
|
+
agentworkforce create --save-in-directory=../team-personas/personas --save-default
|
|
120
121
|
|
|
121
122
|
# Create a built-in persona in this repo's /personas catalog
|
|
122
|
-
agentworkforce create --
|
|
123
|
+
agentworkforce create --save-in-directory=library
|
|
123
124
|
```
|
|
124
125
|
|
|
125
126
|
### Examples
|
|
@@ -350,7 +351,7 @@ personas work as plain JSON files in the default user location, or from any
|
|
|
350
351
|
checked-out repo you add as a source directory.
|
|
351
352
|
|
|
352
353
|
The same config may also carry `defaultCreateTarget`, used by `agentworkforce create`
|
|
353
|
-
|
|
354
|
+
to override its default of `cwd`:
|
|
354
355
|
|
|
355
356
|
```json
|
|
356
357
|
{
|
|
@@ -359,10 +360,12 @@ when no cwd-local workforce directory exists:
|
|
|
359
360
|
}
|
|
360
361
|
```
|
|
361
362
|
|
|
362
|
-
Valid `defaultCreateTarget` values are the same values accepted by
|
|
363
|
-
`cwd`, `user`, `dir:n`, `library`, or an
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
Valid `defaultCreateTarget` values are the same values accepted by
|
|
364
|
+
`create --save-in-directory=<target>`: `cwd`, `user`, `dir:n`, `library`, or an
|
|
365
|
+
explicit path. When this key is unset, `agentworkforce create` writes to
|
|
366
|
+
`<cwd>/.agentworkforce/workforce/personas` (creating it if missing). Use
|
|
367
|
+
`agentworkforce create --save-in-directory=<target> --save-default` to write
|
|
368
|
+
the override without editing JSON by hand.
|
|
366
369
|
|
|
367
370
|
`sources add` appends by default. `--position <n>` inserts at the 1-based
|
|
368
371
|
position among configurable directories, so `--position 1` gives that directory
|
|
@@ -552,9 +555,9 @@ Local personas live in the source cascade and do not require built-in catalog
|
|
|
552
555
|
integration:
|
|
553
556
|
|
|
554
557
|
```sh
|
|
555
|
-
agentworkforce create --
|
|
556
|
-
agentworkforce create --
|
|
557
|
-
agentworkforce create --
|
|
558
|
+
agentworkforce create --save-in-directory=user
|
|
559
|
+
agentworkforce create --save-in-directory=cwd
|
|
560
|
+
agentworkforce create --save-in-directory=dir:1
|
|
558
561
|
```
|
|
559
562
|
|
|
560
563
|
The persona maker receives `TARGET_DIR` and `CREATE_MODE=local`, so it
|
|
@@ -581,7 +584,7 @@ Built-in personas live in the repo's `/personas` catalog and require full
|
|
|
581
584
|
workload-router integration:
|
|
582
585
|
|
|
583
586
|
```sh
|
|
584
|
-
agentworkforce create --
|
|
587
|
+
agentworkforce create --save-in-directory=library
|
|
585
588
|
```
|
|
586
589
|
|
|
587
590
|
The persona maker receives `CREATE_MODE=built-in`, so it should write
|
|
@@ -783,15 +786,47 @@ mount rules (`.agentignore` / `.agentreadonly`) for that.
|
|
|
783
786
|
- **Tool patterns** are passed through verbatim; use the harness's native
|
|
784
787
|
grammar. For Claude Code: `Bash(<pattern>)`, `mcp__<server>` (all tools
|
|
785
788
|
from that server), `mcp__<server>__<tool>` (specific tool).
|
|
786
|
-
- **Harness support today:** only `claude` is wired (flags:
|
|
787
|
-
`--disallowedTools`, `--permission-mode`). codex and
|
|
788
|
-
warning and fall back to their defaults when `permissions`
|
|
789
|
+
- **Harness support today:** only `claude` is wired for `permissions` (flags:
|
|
790
|
+
`--allowedTools`, `--disallowedTools`, `--permission-mode`). codex and
|
|
791
|
+
opencode emit a warning and fall back to their defaults when `permissions`
|
|
792
|
+
is set.
|
|
789
793
|
- **Cascade merge:** `allow` and `deny` are unions across layers (deduped on
|
|
790
794
|
merge); `mode` is replaced by the topmost layer that sets it. So the
|
|
791
795
|
library can declare the minimum-viable allow list, a user or configured
|
|
792
796
|
persona source can layer shared denies, and cwd can add per-project patterns
|
|
793
797
|
— they all compose.
|
|
794
798
|
|
|
799
|
+
## Codex Sandbox Settings
|
|
800
|
+
|
|
801
|
+
Codex-backed tiers can set Codex launch policy inside `harnessSettings`:
|
|
802
|
+
|
|
803
|
+
```jsonc
|
|
804
|
+
{
|
|
805
|
+
"tiers": {
|
|
806
|
+
"best": {
|
|
807
|
+
"harness": "codex",
|
|
808
|
+
"model": "openai-codex/gpt-5.3-codex",
|
|
809
|
+
"systemPrompt": "…",
|
|
810
|
+
"harnessSettings": {
|
|
811
|
+
"reasoning": "high",
|
|
812
|
+
"timeoutSeconds": 1200,
|
|
813
|
+
"sandboxMode": "workspace-write",
|
|
814
|
+
"approvalPolicy": "on-request",
|
|
815
|
+
"workspaceWriteNetworkAccess": true,
|
|
816
|
+
"webSearch": true
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
`sandboxMode` maps to Codex `--sandbox` (`read-only`, `workspace-write`, or
|
|
824
|
+
`danger-full-access`), `approvalPolicy` maps to `--ask-for-approval`,
|
|
825
|
+
`workspaceWriteNetworkAccess` maps to
|
|
826
|
+
`-c sandbox_workspace_write.network_access=<bool>`, and `webSearch` maps to
|
|
827
|
+
`--search`. Prefer `workspace-write` plus `workspaceWriteNetworkAccess` for
|
|
828
|
+
package or registry discovery so filesystem writes stay sandboxed.
|
|
829
|
+
|
|
795
830
|
### Example: PostHog with auto-approve
|
|
796
831
|
|
|
797
832
|
The built-in `posthog` persona declares `permissions.allow = ["mcp__posthog"]`
|
package/dist/cli.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export interface AgentFlags {
|
|
|
168
168
|
noLaunchMetadata: boolean;
|
|
169
169
|
}
|
|
170
170
|
export interface CreateFlags extends AgentFlags {
|
|
171
|
-
|
|
171
|
+
saveInDirectory?: string;
|
|
172
172
|
saveDefault: boolean;
|
|
173
173
|
}
|
|
174
174
|
export declare function parseAgentArgs(args: readonly string[]): {
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAiBA,OAAO,EAQL,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAiBA,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAIrB,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AA6BzC,OAAO,EAAe,KAAK,aAAa,EAAmB,MAAM,qBAAqB,CAAC;AAwIvF,eAAO,MAAM,WAAW,QAAuB,CAAC;AAChD,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAkGpD;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAExF;AAyJD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAUhE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAe5D;A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ands:
|
|
|
19
19
|
create [flags] Opens persona-maker@best for creating a new
|
|
20
20
|
persona, with target path passed as persona inputs.
|
|
21
21
|
Flags:
|
|
22
|
-
--
|
|
22
|
+
--save-in-directory=<target>
|
|
23
|
+
Storage target: cwd, user, dir:n,
|
|
23
24
|
library, or an explicit path.
|
|
24
|
-
Default: cwd
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
Default: cwd
|
|
26
|
+
(<cwd>/.agentworkforce/workforce/personas);
|
|
27
|
+
the directory is created if missing.
|
|
28
|
+
Override via this flag, or pin a
|
|
29
|
+
different default with --save-default.
|
|
30
|
+
--save-default Persist --save-in-directory as
|
|
31
|
+
defaultCreateTarget in
|
|
29
32
|
~/.agentworkforce/workforce/config.json.
|
|
30
33
|
--install-in-repo Same behavior as agent.
|
|
31
34
|
--no-launch-metadata
|
|
@@ -113,7 +116,7 @@ configured persona dir is ~/.agentworkforce/workforce/personas.
|
|
|
113
116
|
|
|
114
117
|
Examples:
|
|
115
118
|
agentworkforce create
|
|
116
|
-
agentworkforce create --
|
|
119
|
+
agentworkforce create --save-in-directory=user
|
|
117
120
|
agentworkforce agent npm-provenance-publisher@best
|
|
118
121
|
agentworkforce agent my-posthog@best
|
|
119
122
|
agentworkforce agent review@best-value
|
|
@@ -148,6 +151,44 @@ const local = loadLocalPersonas();
|
|
|
148
151
|
for (const warning of local.warnings) {
|
|
149
152
|
process.stderr.write(`warning: ${warning}\n`);
|
|
150
153
|
}
|
|
154
|
+
function collectKnownPersonas() {
|
|
155
|
+
const byName = new Map();
|
|
156
|
+
for (const spec of local.byId.values()) {
|
|
157
|
+
byName.set(spec.id, {
|
|
158
|
+
name: spec.id,
|
|
159
|
+
description: spec.description
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
for (const spec of Object.values(personaCatalog)) {
|
|
163
|
+
if (byName.has(spec.id))
|
|
164
|
+
continue;
|
|
165
|
+
byName.set(spec.id, {
|
|
166
|
+
name: spec.id,
|
|
167
|
+
description: spec.description
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return [...byName.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
171
|
+
}
|
|
172
|
+
function formatNameDescriptionTable(rows) {
|
|
173
|
+
const headers = {
|
|
174
|
+
name: 'NAME',
|
|
175
|
+
description: 'DESCRIPTION'
|
|
176
|
+
};
|
|
177
|
+
const rendered = rows.map((r) => ({
|
|
178
|
+
name: r.name,
|
|
179
|
+
description: r.description.replace(/\s+/g, ' ').trim()
|
|
180
|
+
}));
|
|
181
|
+
const nameWidth = Math.max(headers.name.length, ...rendered.map((r) => r.name.length));
|
|
182
|
+
const termWidth = process.stderr.isTTY && typeof process.stderr.columns === 'number'
|
|
183
|
+
? process.stderr.columns
|
|
184
|
+
: 120;
|
|
185
|
+
const descBudget = Math.max(headers.description.length, Math.max(32, termWidth - nameWidth - 3));
|
|
186
|
+
const truncate = (text) => text.length <= descBudget
|
|
187
|
+
? text
|
|
188
|
+
: `${text.slice(0, Math.max(1, descBudget - 3)).trimEnd()}...`;
|
|
189
|
+
const line = (row) => `${row.name.padEnd(nameWidth)} | ${truncate(row.description)}`.trimEnd();
|
|
190
|
+
return [line(headers), ...rendered.map(line)].join('\n');
|
|
191
|
+
}
|
|
151
192
|
function resolveSpec(key) {
|
|
152
193
|
const localSpec = local.byId.get(key);
|
|
153
194
|
if (localSpec)
|
|
@@ -158,15 +199,9 @@ function resolveSpec(key) {
|
|
|
158
199
|
const byId = Object.values(personaCatalog).find((p) => p.id === key);
|
|
159
200
|
if (byId)
|
|
160
201
|
return byId;
|
|
161
|
-
|
|
162
|
-
.
|
|
163
|
-
|
|
164
|
-
.map((p) => ` ${p.id} (intent: ${p.intent})`);
|
|
165
|
-
const localListing = [...local.byId.values()]
|
|
166
|
-
.sort((a, b) => a.id.localeCompare(b.id))
|
|
167
|
-
.map((p) => ` ${p.id} (${local.sources.get(p.id) ?? 'local'})`);
|
|
168
|
-
const listing = [...repoListing, ...localListing].join('\n');
|
|
169
|
-
return { error: `Unknown persona "${key}". Known personas:\n${listing}` };
|
|
202
|
+
return {
|
|
203
|
+
error: `Unknown persona "${key}". Known personas:\n${formatNameDescriptionTable(collectKnownPersonas())}`
|
|
204
|
+
};
|
|
170
205
|
}
|
|
171
206
|
function parseSelector(sel) {
|
|
172
207
|
const at = sel.indexOf('@');
|
|
@@ -732,6 +767,7 @@ async function runInteractive(selection, options) {
|
|
|
732
767
|
personaId,
|
|
733
768
|
model: runtime.model,
|
|
734
769
|
systemPrompt: runtime.systemPrompt,
|
|
770
|
+
harnessSettings: runtime.harnessSettings,
|
|
735
771
|
mcpServers: resolvedMcp,
|
|
736
772
|
permissions: effectiveSelection.permissions,
|
|
737
773
|
...(installRoot !== undefined ? { pluginDirs: [installRoot] } : {})
|
|
@@ -1478,7 +1514,7 @@ function runList(args) {
|
|
|
1478
1514
|
return false;
|
|
1479
1515
|
if (applyRecommended) {
|
|
1480
1516
|
const rule = recommendedByIntent[r.intent];
|
|
1481
|
-
if (
|
|
1517
|
+
if (r.rating !== (rule?.tier ?? 'best-value'))
|
|
1482
1518
|
return false;
|
|
1483
1519
|
}
|
|
1484
1520
|
return true;
|
|
@@ -1686,6 +1722,18 @@ function formatPersonaShow(spec, source, tiers, tierNote) {
|
|
|
1686
1722
|
lines.push(` model: ${rt.model}`);
|
|
1687
1723
|
lines.push(` reasoning: ${rt.harnessSettings.reasoning}`);
|
|
1688
1724
|
lines.push(` timeout: ${rt.harnessSettings.timeoutSeconds}s`);
|
|
1725
|
+
if (rt.harnessSettings.sandboxMode) {
|
|
1726
|
+
lines.push(` sandbox: ${rt.harnessSettings.sandboxMode}`);
|
|
1727
|
+
}
|
|
1728
|
+
if (rt.harnessSettings.approvalPolicy) {
|
|
1729
|
+
lines.push(` approvals: ${rt.harnessSettings.approvalPolicy}`);
|
|
1730
|
+
}
|
|
1731
|
+
if (rt.harnessSettings.workspaceWriteNetworkAccess !== undefined) {
|
|
1732
|
+
lines.push(` network: ${rt.harnessSettings.workspaceWriteNetworkAccess}`);
|
|
1733
|
+
}
|
|
1734
|
+
if (rt.harnessSettings.webSearch !== undefined) {
|
|
1735
|
+
lines.push(` webSearch: ${rt.harnessSettings.webSearch}`);
|
|
1736
|
+
}
|
|
1689
1737
|
lines.push(' systemPrompt:');
|
|
1690
1738
|
lines.push(indent(rt.systemPrompt, ' '));
|
|
1691
1739
|
}
|
|
@@ -1717,10 +1765,7 @@ function runHarnessCheck() {
|
|
|
1717
1765
|
process.exit(0);
|
|
1718
1766
|
}
|
|
1719
1767
|
function defaultCreateTargetSelector() {
|
|
1720
|
-
|
|
1721
|
-
return 'cwd';
|
|
1722
|
-
}
|
|
1723
|
-
return loadPersonaSourceConfig().defaultCreateTarget ?? 'user';
|
|
1768
|
+
return loadPersonaSourceConfig().defaultCreateTarget ?? 'cwd';
|
|
1724
1769
|
}
|
|
1725
1770
|
function resolveCreateTarget(rawTarget) {
|
|
1726
1771
|
const raw = rawTarget?.trim() || defaultCreateTargetSelector();
|
|
@@ -1744,7 +1789,7 @@ function resolveCreateTarget(rawTarget) {
|
|
|
1744
1789
|
if (raw === 'library') {
|
|
1745
1790
|
const dir = resolvePath(process.cwd(), 'personas');
|
|
1746
1791
|
if (!existsSync(dir)) {
|
|
1747
|
-
die('create: --
|
|
1792
|
+
die('create: --save-in-directory=library requires running from the AgentWorkforce repo root, where ./personas exists.');
|
|
1748
1793
|
}
|
|
1749
1794
|
return {
|
|
1750
1795
|
raw,
|
|
@@ -2042,17 +2087,27 @@ export function parseCreateArgs(args) {
|
|
|
2042
2087
|
flags.noLaunchMetadata = true;
|
|
2043
2088
|
continue;
|
|
2044
2089
|
}
|
|
2045
|
-
if (arg === '--
|
|
2046
|
-
|
|
2090
|
+
if (arg === '--save-in-directory') {
|
|
2091
|
+
const value = valueOf(i, arg).trim();
|
|
2092
|
+
if (!value)
|
|
2093
|
+
die('create: --save-in-directory requires a non-empty value.');
|
|
2094
|
+
flags.saveInDirectory = value;
|
|
2047
2095
|
i += 1;
|
|
2048
2096
|
continue;
|
|
2049
2097
|
}
|
|
2098
|
+
if (arg.startsWith('--save-in-directory=')) {
|
|
2099
|
+
const value = arg.slice('--save-in-directory='.length).trim();
|
|
2100
|
+
if (!value)
|
|
2101
|
+
die('create: --save-in-directory requires a non-empty value.');
|
|
2102
|
+
flags.saveInDirectory = value;
|
|
2103
|
+
continue;
|
|
2104
|
+
}
|
|
2050
2105
|
if (arg === '--save-default') {
|
|
2051
2106
|
flags.saveDefault = true;
|
|
2052
2107
|
continue;
|
|
2053
2108
|
}
|
|
2054
2109
|
if (arg === '-h' || arg === '--help') {
|
|
2055
|
-
process.stdout.write('Usage: agentworkforce create [--
|
|
2110
|
+
process.stdout.write('Usage: agentworkforce create [--save-in-directory=<cwd|user|dir:n|library|path>] [--save-default] [--install-in-repo] [--no-launch-metadata]\n');
|
|
2056
2111
|
process.exit(0);
|
|
2057
2112
|
}
|
|
2058
2113
|
positional.push(arg);
|
|
@@ -2061,7 +2116,7 @@ export function parseCreateArgs(args) {
|
|
|
2061
2116
|
if (unexpected) {
|
|
2062
2117
|
die(`create: unexpected argument "${unexpected}". The create command always runs ${CREATE_SELECTOR}; use "agentworkforce agent <persona>[@<tier>]" to run another persona.`);
|
|
2063
2118
|
}
|
|
2064
|
-
const target = resolveCreateTarget(flags.
|
|
2119
|
+
const target = resolveCreateTarget(flags.saveInDirectory);
|
|
2065
2120
|
ensureCreateTargetDir(target);
|
|
2066
2121
|
if (flags.saveDefault)
|
|
2067
2122
|
saveDefaultCreateTarget(target);
|