@agentworkforce/cli 0.6.1 → 0.8.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 +30 -1
- package/README.md +396 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +331 -26
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +89 -1
- package/dist/cli.test.js.map +1 -1
- package/dist/local-personas.d.ts +13 -3
- package/dist/local-personas.d.ts.map +1 -1
- package/dist/local-personas.js +157 -10
- package/dist/local-personas.js.map +1 -1
- package/dist/local-personas.test.js +92 -0
- package/dist/local-personas.test.js.map +1 -1
- package/dist/persona-install.d.ts +32 -0
- package/dist/persona-install.d.ts.map +1 -0
- package/dist/persona-install.js +292 -0
- package/dist/persona-install.js.map +1 -0
- package/dist/persona-install.test.d.ts +2 -0
- package/dist/persona-install.test.d.ts.map +1 -0
- package/dist/persona-install.test.js +223 -0
- package/dist/persona-install.test.js.map +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `agentworkforce create` now opens `persona-maker@best`, supports `--to` and
|
|
13
|
+
`--save-default`, and passes `TARGET_DIR` / `CREATE_MODE` persona inputs.
|
|
14
|
+
- Persona source config supports `defaultCreateTarget` for the implicit create target.
|
|
15
|
+
- `--version`/`-v` now prints the CLI package version.
|
|
16
|
+
|
|
17
|
+
## [0.8.0] - 2026-05-07
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **Add persona create mode**
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Preserve standalone persona inputs
|
|
26
|
+
|
|
27
|
+
## [0.7.0] - 2026-05-07
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Add persona pack install command**
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Disable scripts during persona package pack
|
|
36
|
+
- Add agentworkforce version flag
|
|
37
|
+
- Address persona install review feedback
|
|
38
|
+
- Expand Windows home persona install paths
|
|
39
|
+
|
|
10
40
|
## [0.6.0] - 2026-05-06
|
|
11
41
|
|
|
12
42
|
### Added
|
|
@@ -60,4 +90,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
60
90
|
|
|
61
91
|
- Safe-path validation on persona `configFiles` materialization — rejects empty, absolute, and `..`-traversal paths so a malformed persona can't escape the mount (#23)
|
|
62
92
|
- Exhaustiveness guard in `buildInteractiveSpec` so future `Harness` union additions fail at compile time rather than silently at runtime (#23)
|
|
63
|
-
|
package/README.md
CHANGED
|
@@ -6,20 +6,30 @@ built-in one from `/personas/`, or an installed/local one that extends a lower
|
|
|
6
6
|
source.
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
+
agentworkforce create [--to <target>] [--save-default]
|
|
9
10
|
agentworkforce agent <persona>[@<tier>]
|
|
10
11
|
agentworkforce list [flags]
|
|
11
12
|
agentworkforce show <persona>[@<tier>]
|
|
13
|
+
agentworkforce install [flags] <pkg|path>
|
|
12
14
|
agentworkforce sources <list|add|remove>
|
|
13
15
|
agentworkforce harness check
|
|
16
|
+
agentworkforce --version
|
|
14
17
|
```
|
|
15
18
|
|
|
19
|
+
- `create` — opens `persona-maker@best` for creating a new persona.
|
|
20
|
+
It resolves a target persona directory with the same source-cascade
|
|
21
|
+
constructs used by `list`, `show`, and `agent`, then passes `TARGET_DIR` and
|
|
22
|
+
`CREATE_MODE` into the persona as prompt-visible inputs.
|
|
16
23
|
- `agent` — drops you into an interactive session with the harness.
|
|
17
24
|
- `list` — print the persona catalog as a table (or JSON). See
|
|
18
25
|
[`## List`](#list) below for every flag.
|
|
19
26
|
- `show` — print the resolved spec for one persona.
|
|
27
|
+
- `install` — copy persona JSON files from an npm or local persona pack into
|
|
28
|
+
the current project's fixed cwd source directory.
|
|
20
29
|
- `sources` — list, add, or remove persona source directories.
|
|
21
30
|
- `harness check` — probe which harnesses (`claude`, `codex`, `opencode`)
|
|
22
31
|
are installed. See [`## Harness check`](#harness-check) below.
|
|
32
|
+
- `--version` — print the installed package version.
|
|
23
33
|
|
|
24
34
|
## Install
|
|
25
35
|
|
|
@@ -55,9 +65,68 @@ agentworkforce agent <persona>[@<tier>]
|
|
|
55
65
|
|
|
56
66
|
Unknown persona prints the full catalog with each entry's origin.
|
|
57
67
|
|
|
68
|
+
## Create
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
agentworkforce create [--to <target>] [--save-default] [--install-in-repo]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`create` is the persona-authoring entry point. It runs `persona-maker@best`
|
|
75
|
+
through the same interactive launch path as `agent`, including skill
|
|
76
|
+
materialization, sandbox mount behavior, env/MCP resolution, and harness argv
|
|
77
|
+
translation. The only extra work `create` does is resolve a target and pass it as
|
|
78
|
+
persona inputs:
|
|
79
|
+
|
|
80
|
+
| Input | Meaning |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `TARGET_DIR` | Absolute directory where the new `<id>.json` persona file should be written. |
|
|
83
|
+
| `CREATE_MODE` | `local` writes only JSON; `built-in` also updates catalog/routing/test/docs integration. |
|
|
84
|
+
|
|
85
|
+
Targets:
|
|
86
|
+
|
|
87
|
+
| Target | Resolves to | Create mode |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| `cwd` | `<cwd>/.agentworkforce/workforce/personas` | `local` |
|
|
90
|
+
| `user` | `~/.agentworkforce/workforce/personas` (or `AGENT_WORKFORCE_CONFIG_DIR`) | `local` |
|
|
91
|
+
| `dir:n` | the nth configured persona source from `sources list` | `local` |
|
|
92
|
+
| `library` | `<repo>/personas` | `built-in` |
|
|
93
|
+
| path | explicit directory path | `local` |
|
|
94
|
+
|
|
95
|
+
Default target resolution:
|
|
96
|
+
|
|
97
|
+
1. `--to <target>` wins.
|
|
98
|
+
2. If `<cwd>/.agentworkforce/workforce` exists, use `cwd`.
|
|
99
|
+
3. Else use `defaultCreateTarget` from `~/.agentworkforce/workforce/config.json`.
|
|
100
|
+
4. Else use `user`.
|
|
101
|
+
|
|
102
|
+
`--save-default` persists the resolved target as `defaultCreateTarget` in the
|
|
103
|
+
source config. This is only consulted when no cwd-local workforce directory is
|
|
104
|
+
present.
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
# Create in the project-local persona directory when present, otherwise user dir
|
|
110
|
+
agentworkforce create
|
|
111
|
+
|
|
112
|
+
# Force the user persona directory
|
|
113
|
+
agentworkforce create --to user
|
|
114
|
+
|
|
115
|
+
# Create in a configured persona source
|
|
116
|
+
agentworkforce create --to dir:1
|
|
117
|
+
|
|
118
|
+
# Create in an explicit checked-out persona directory and make that the default
|
|
119
|
+
agentworkforce create --to ../team-personas/personas --save-default
|
|
120
|
+
|
|
121
|
+
# Create a built-in persona in this repo's /personas catalog
|
|
122
|
+
agentworkforce create --to library
|
|
123
|
+
```
|
|
124
|
+
|
|
58
125
|
### Examples
|
|
59
126
|
|
|
60
127
|
```sh
|
|
128
|
+
agentworkforce create
|
|
129
|
+
|
|
61
130
|
# Interactive code reviewer
|
|
62
131
|
agentworkforce agent review@best-value
|
|
63
132
|
|
|
@@ -68,6 +137,150 @@ agentworkforce agent posthog@best
|
|
|
68
137
|
agentworkforce agent my-posthog@best
|
|
69
138
|
```
|
|
70
139
|
|
|
140
|
+
## Install persona packs
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
agentworkforce install <pkg|path> [--persona <id> ...] [--overwrite]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`install` is a shadcn-style copy utility for persona JSON. It copies persona
|
|
147
|
+
files into the current project's fixed cwd layer:
|
|
148
|
+
`<cwd>/.agentworkforce/workforce/personas/`.
|
|
149
|
+
|
|
150
|
+
Once copied, files are project-owned. Edit them directly and commit them to
|
|
151
|
+
git. The CLI does not create an install ledger, lockfile, manifest, update
|
|
152
|
+
command, uninstall command, diff command, or central AgentWorkforce registry.
|
|
153
|
+
|
|
154
|
+
### Package and path forms
|
|
155
|
+
|
|
156
|
+
Npm package specs are resolved with `npm pack`, so npm auth, npm config,
|
|
157
|
+
private packages, tags, and versions work the same way they do for npm:
|
|
158
|
+
|
|
159
|
+
```sh
|
|
160
|
+
agentworkforce install @agentrelay/personas
|
|
161
|
+
agentworkforce install @agentrelay/personas@1.2.3
|
|
162
|
+
agentworkforce install @agentrelay/personas@latest
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Local path installs read directly from the directory:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
agentworkforce install ./local-personas
|
|
169
|
+
agentworkforce install /absolute/path/to/local-personas
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Selecting personas
|
|
173
|
+
|
|
174
|
+
By default, every `*.json` file in the pack's persona directory is copied.
|
|
175
|
+
Use repeated `--persona <id>` flags to install a subset by persona `id`:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
agentworkforce install @agentrelay/personas --persona relay-orchestrator
|
|
179
|
+
agentworkforce install @agentrelay/personas --persona relay-orchestrator --persona code-reviewer
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
If any requested id is missing, the command exits non-zero before copying
|
|
183
|
+
anything.
|
|
184
|
+
|
|
185
|
+
### Conflicts and overwrite
|
|
186
|
+
|
|
187
|
+
Target filenames are flattened into the cwd persona directory:
|
|
188
|
+
|
|
189
|
+
```text
|
|
190
|
+
package/personas/nested/code-reviewer.json
|
|
191
|
+
-> .agentworkforce/workforce/personas/code-reviewer.json
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
If the target file already exists, the installer reports a conflict, skips
|
|
195
|
+
that file, and exits non-zero. Non-conflicting files from the same run may
|
|
196
|
+
still be copied. Pass `--overwrite` to replace existing files unconditionally:
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
agentworkforce install @agentrelay/personas --overwrite
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Filename collisions across packages use the same rule. The install layer does
|
|
203
|
+
not namespace files by package; avoid shipping two pack files with the same
|
|
204
|
+
basename if they are expected to be installed together.
|
|
205
|
+
|
|
206
|
+
### Persona pack format
|
|
207
|
+
|
|
208
|
+
A pack can contain multiple personas:
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
@agentrelay/personas
|
|
212
|
+
├── package.json
|
|
213
|
+
└── personas/
|
|
214
|
+
├── relay-orchestrator.json
|
|
215
|
+
├── code-reviewer.json
|
|
216
|
+
└── e2e-validator.json
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`package.json` may declare the persona directory:
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"name": "@agentrelay/personas",
|
|
224
|
+
"version": "1.2.3",
|
|
225
|
+
"files": ["personas"],
|
|
226
|
+
"keywords": ["agentworkforce-personas"],
|
|
227
|
+
"agentworkforce": {
|
|
228
|
+
"personas": "personas"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Resolution rules:
|
|
234
|
+
|
|
235
|
+
1. Read `package.json.agentworkforce.personas` if present.
|
|
236
|
+
2. Otherwise use a top-level `personas/` directory.
|
|
237
|
+
3. Recursively copy every `*.json` file from that directory, flattening to
|
|
238
|
+
`<cwd>/.agentworkforce/workforce/personas/<basename>.json`.
|
|
239
|
+
|
|
240
|
+
Local path installs use the same metadata rules.
|
|
241
|
+
|
|
242
|
+
### Relationship to sources
|
|
243
|
+
|
|
244
|
+
Use `install` when this project should receive editable copies:
|
|
245
|
+
|
|
246
|
+
```sh
|
|
247
|
+
agentworkforce install @acme/personas
|
|
248
|
+
git add .agentworkforce/workforce/personas
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Use `sources add` when you want the cascade to point at a live directory
|
|
252
|
+
without copying:
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
agentworkforce sources add ~/src/acme-personas/personas
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Both feed the same cascade. `install` writes to the fixed cwd layer, while
|
|
259
|
+
`sources` changes the configured source directories in
|
|
260
|
+
`~/.agentworkforce/workforce/config.json`.
|
|
261
|
+
|
|
262
|
+
### Author and publish a persona pack
|
|
263
|
+
|
|
264
|
+
```sh
|
|
265
|
+
mkdir -p acme-personas/personas
|
|
266
|
+
cd acme-personas
|
|
267
|
+
npm init -y
|
|
268
|
+
npm pkg set name=@acme/personas version=1.0.0
|
|
269
|
+
npm pkg set 'files[0]=personas' 'keywords[0]=agentworkforce-personas'
|
|
270
|
+
npm pkg set agentworkforce.personas=personas
|
|
271
|
+
$EDITOR personas/reviewer.json
|
|
272
|
+
npm publish --access public
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Then install it in a project:
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
cd ../my-project
|
|
279
|
+
agentworkforce install @acme/personas --persona reviewer
|
|
280
|
+
agentworkforce list --filter-tag review
|
|
281
|
+
agentworkforce agent reviewer@best-value
|
|
282
|
+
```
|
|
283
|
+
|
|
71
284
|
## List
|
|
72
285
|
|
|
73
286
|
```
|
|
@@ -136,6 +349,21 @@ defaults to `~/.agentworkforce/workforce/personas`. This makes installed
|
|
|
136
349
|
personas work as plain JSON files in the default user location, or from any
|
|
137
350
|
checked-out repo you add as a source directory.
|
|
138
351
|
|
|
352
|
+
The same config may also carry `defaultCreateTarget`, used by `agentworkforce create`
|
|
353
|
+
when no cwd-local workforce directory exists:
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"personaDirs": ["~/src/company-personas/personas"],
|
|
358
|
+
"defaultCreateTarget": "dir:1"
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Valid `defaultCreateTarget` values are the same values accepted by `create --to`:
|
|
363
|
+
`cwd`, `user`, `dir:n`, `library`, or an explicit path. Use
|
|
364
|
+
`agentworkforce create --to <target> --save-default` to write it without editing
|
|
365
|
+
JSON by hand.
|
|
366
|
+
|
|
139
367
|
`sources add` appends by default. `--position <n>` inserts at the 1-based
|
|
140
368
|
position among configurable directories, so `--position 1` gives that directory
|
|
141
369
|
the highest priority after the fixed cwd source. `sources remove` accepts either
|
|
@@ -278,6 +506,13 @@ library has no `extends`.
|
|
|
278
506
|
"extends": "posthog", // optional; implicit same-id if omitted
|
|
279
507
|
"description": "…", // replaces base description
|
|
280
508
|
"skills": [ … ], // replaces entire skills array
|
|
509
|
+
"inputs": { // prompt-visible runtime inputs; union by key
|
|
510
|
+
"TARGET_DIR": {
|
|
511
|
+
"description": "Where to write output",
|
|
512
|
+
"default": "./out",
|
|
513
|
+
"env": "MY_AGENT_TARGET_DIR"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
281
516
|
"env": { … }, // union, local wins per key
|
|
282
517
|
"mcpServers": { … }, // union by server name, local wins per key
|
|
283
518
|
"permissions": { // allow/deny union (dedup), mode replaces
|
|
@@ -296,6 +531,167 @@ changes — `systemPrompt`, `harness`, and `harnessSettings` still come from the
|
|
|
296
531
|
base. Use top-level `systemPrompt` if you want to replace the prompt
|
|
297
532
|
uniformly across all tiers.
|
|
298
533
|
|
|
534
|
+
To define a standalone local persona that does not inherit from a lower layer,
|
|
535
|
+
include `intent` and a complete `tiers` object for `best`, `best-value`, and
|
|
536
|
+
`minimum`. This is the shape persona packs usually ship before `install`
|
|
537
|
+
copies them into the cwd layer.
|
|
538
|
+
|
|
539
|
+
## Creating Personas
|
|
540
|
+
|
|
541
|
+
Personas are plain JSON files. Use `agentworkforce create` when you want the
|
|
542
|
+
persona-maker to draft one with the repo's conventions, or write the JSON by
|
|
543
|
+
hand when the shape is simple.
|
|
544
|
+
|
|
545
|
+
### Local persona
|
|
546
|
+
|
|
547
|
+
Local personas live in the source cascade and do not require built-in catalog
|
|
548
|
+
integration:
|
|
549
|
+
|
|
550
|
+
```sh
|
|
551
|
+
agentworkforce create --to user
|
|
552
|
+
agentworkforce create --to cwd
|
|
553
|
+
agentworkforce create --to dir:1
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
The persona maker receives `TARGET_DIR` and `CREATE_MODE=local`, so it
|
|
557
|
+
should write only:
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
<target-dir>/<id>.json
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Minimal local persona:
|
|
564
|
+
|
|
565
|
+
```json
|
|
566
|
+
{
|
|
567
|
+
"id": "my-reviewer",
|
|
568
|
+
"extends": "review",
|
|
569
|
+
"description": "Reviews this project with local conventions.",
|
|
570
|
+
"systemPrompt": "Focus on this repository's API compatibility rules and summarize only blocking issues."
|
|
571
|
+
}
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Built-in persona
|
|
575
|
+
|
|
576
|
+
Built-in personas live in the repo's `/personas` catalog and require full
|
|
577
|
+
workload-router integration:
|
|
578
|
+
|
|
579
|
+
```sh
|
|
580
|
+
agentworkforce create --to library
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
The persona maker receives `CREATE_MODE=built-in`, so it should write
|
|
584
|
+
`personas/<id>.json`, update the intent list/catalog registration/routing
|
|
585
|
+
profile/test fixture/README, regenerate `src/generated/personas.ts`, and run
|
|
586
|
+
the repo check.
|
|
587
|
+
|
|
588
|
+
### Full persona file
|
|
589
|
+
|
|
590
|
+
Use this when you are not extending an existing persona:
|
|
591
|
+
|
|
592
|
+
```jsonc
|
|
593
|
+
{
|
|
594
|
+
"id": "release-checker",
|
|
595
|
+
"intent": "release-check",
|
|
596
|
+
"tags": ["release", "review"],
|
|
597
|
+
"description": "Checks release readiness and reports blockers.",
|
|
598
|
+
"skills": [
|
|
599
|
+
{
|
|
600
|
+
"id": "prpm/npm-trusted-publishing",
|
|
601
|
+
"source": "https://prpm.dev/packages/@prpm/npm-trusted-publishing",
|
|
602
|
+
"description": "Trusted publishing and provenance setup guidance."
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
"inputs": {
|
|
606
|
+
"PACKAGE_NAME": {
|
|
607
|
+
"description": "Package to inspect.",
|
|
608
|
+
"env": "PACKAGE_NAME",
|
|
609
|
+
"default": "."
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"env": {
|
|
613
|
+
"NPM_TOKEN": "$NPM_TOKEN"
|
|
614
|
+
},
|
|
615
|
+
"permissions": {
|
|
616
|
+
"allow": ["Bash(npm *)"],
|
|
617
|
+
"deny": ["Bash(npm publish *)"],
|
|
618
|
+
"mode": "default"
|
|
619
|
+
},
|
|
620
|
+
"tiers": {
|
|
621
|
+
"best": {
|
|
622
|
+
"harness": "codex",
|
|
623
|
+
"model": "openai-codex/gpt-5.3-codex",
|
|
624
|
+
"systemPrompt": "Check release readiness for $PACKAGE_NAME. Produce blockers first, then evidence.",
|
|
625
|
+
"harnessSettings": { "reasoning": "high", "timeoutSeconds": 1200 }
|
|
626
|
+
},
|
|
627
|
+
"best-value": {
|
|
628
|
+
"harness": "opencode",
|
|
629
|
+
"model": "opencode/gpt-5-nano",
|
|
630
|
+
"systemPrompt": "Check release readiness for $PACKAGE_NAME. Produce blockers first, then evidence.",
|
|
631
|
+
"harnessSettings": { "reasoning": "medium", "timeoutSeconds": 900 }
|
|
632
|
+
},
|
|
633
|
+
"minimum": {
|
|
634
|
+
"harness": "opencode",
|
|
635
|
+
"model": "opencode/minimax-m2.5-free",
|
|
636
|
+
"systemPrompt": "Check release readiness for $PACKAGE_NAME. Produce only blocking issues and exact evidence.",
|
|
637
|
+
"harnessSettings": { "reasoning": "low", "timeoutSeconds": 600 }
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Persona inputs
|
|
644
|
+
|
|
645
|
+
`inputs` declare non-secret values that a launcher can pass into a persona at
|
|
646
|
+
runtime. They are useful for output paths, package names, modes, and other
|
|
647
|
+
prompt-visible context that should not be hard-coded into the persona.
|
|
648
|
+
|
|
649
|
+
Input names must be env-style uppercase keys: `TARGET_DIR`, `PACKAGE_NAME`,
|
|
650
|
+
`CREATE_MODE`. In `systemPrompt`, use `$NAME` or `${NAME}`; both forms are
|
|
651
|
+
replaced before the harness starts.
|
|
652
|
+
|
|
653
|
+
```jsonc
|
|
654
|
+
{
|
|
655
|
+
"inputs": {
|
|
656
|
+
"TARGET_DIR": {
|
|
657
|
+
"description": "Directory where generated files should be written.",
|
|
658
|
+
"env": "MY_TARGET_DIR",
|
|
659
|
+
"default": "./out"
|
|
660
|
+
},
|
|
661
|
+
"CREATE_MODE": "local"
|
|
662
|
+
},
|
|
663
|
+
"tiers": {
|
|
664
|
+
"best": {
|
|
665
|
+
"systemPrompt": "Write the persona to $TARGET_DIR. Mode: ${CREATE_MODE}."
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
Each input may be either a string shorthand or an object:
|
|
672
|
+
|
|
673
|
+
| Shape | Meaning |
|
|
674
|
+
| --- | --- |
|
|
675
|
+
| `"NAME": "value"` | Shorthand for `{ "default": "value" }`. |
|
|
676
|
+
| `description` | Human-readable explanation for `show`, docs, and catalog UIs. |
|
|
677
|
+
| `env` | Env var to read when the caller did not provide an explicit value. Defaults to the input key. |
|
|
678
|
+
| `default` | Literal fallback when no explicit value or env var exists. |
|
|
679
|
+
|
|
680
|
+
Resolution order is strict:
|
|
681
|
+
|
|
682
|
+
1. Explicit launcher value, such as the values passed by `agentworkforce create`.
|
|
683
|
+
2. `process.env[env]`, or `process.env[NAME]` when `env` is omitted.
|
|
684
|
+
3. `default`.
|
|
685
|
+
4. If none exist, launch fails before the harness starts.
|
|
686
|
+
|
|
687
|
+
Resolved inputs are substituted into the system prompt and injected into the
|
|
688
|
+
child process env under the input key. They are not secrets: resolved values
|
|
689
|
+
can appear in prompts, process env, logs, and agent output. Use `env` references
|
|
690
|
+
instead for API keys and tokens.
|
|
691
|
+
|
|
692
|
+
Local persona overlays merge `inputs` by key, so a user or project override can
|
|
693
|
+
add one input without replacing all inherited inputs.
|
|
694
|
+
|
|
299
695
|
## Env references & secrets
|
|
300
696
|
|
|
301
697
|
Any `env` value or `mcpServers.*.{headers,env,args,url,command}` value can be
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { type Harness } from '@agentworkforce/workload-router';
|
|
3
|
+
export declare const CLI_VERSION: string;
|
|
4
|
+
export declare const CREATE_SELECTOR = "persona-maker@best";
|
|
3
5
|
/**
|
|
4
6
|
* Resolve the `<harness>` placeholder used in persona systemPrompts.
|
|
5
7
|
* Personas embed `<harness>` inside example install commands (e.g.
|
|
@@ -90,12 +92,27 @@ export declare function configureGitForMount(mountDir: string, patterns: readonl
|
|
|
90
92
|
export declare function decideCleanMode(harness: Harness, installInRepo?: boolean): {
|
|
91
93
|
useClean: boolean;
|
|
92
94
|
};
|
|
95
|
+
export interface PersonaInstallArgs {
|
|
96
|
+
source: string;
|
|
97
|
+
personaIds: string[];
|
|
98
|
+
overwrite: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare function parseInstallArgs(args: readonly string[]): PersonaInstallArgs;
|
|
93
101
|
export declare function main(): Promise<void>;
|
|
94
102
|
export interface AgentFlags {
|
|
95
103
|
installInRepo: boolean;
|
|
96
104
|
}
|
|
105
|
+
export interface CreateFlags extends AgentFlags {
|
|
106
|
+
to?: string;
|
|
107
|
+
saveDefault: boolean;
|
|
108
|
+
}
|
|
97
109
|
export declare function parseAgentArgs(args: readonly string[]): {
|
|
98
110
|
flags: AgentFlags;
|
|
99
111
|
positional: string[];
|
|
100
112
|
};
|
|
113
|
+
export declare function parseCreateArgs(args: readonly string[]): {
|
|
114
|
+
flags: CreateFlags;
|
|
115
|
+
selector: string;
|
|
116
|
+
inputValues: Record<string, string>;
|
|
117
|
+
};
|
|
101
118
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAgBA,OAAO,EAOL,KAAK,OAAO,EAMb,MAAM,iCAAiC,CAAC;AA8IzC,eAAO,MAAM,WAAW,QAAuB,CAAC;AAChD,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAgDpD;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAExF;AA6ID;;;;;;;;;;;;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;AAED;;;kDAGkD;AAClD,eAAO,MAAM,sBAAsB,mEAKzB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,8IAajC,CAAC;AAEX;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAU7E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAuCxF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,aAAa,UAAQ,GACpB;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAKvB;AAwmBD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,CA+B5E;AAolBD,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA6D1C;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IACvD,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAwBA;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IACxD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CA4DA"}
|