@agentworkforce/cli 2.1.0 → 2.1.2
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 +8 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -10
- package/dist/cli.js.map +1 -1
- package/dist/launch-metadata.d.ts.map +1 -1
- package/dist/launch-metadata.js +12 -1
- package/dist/launch-metadata.js.map +1 -1
- package/dist/launch-metadata.test.js +58 -0
- package/dist/launch-metadata.test.js.map +1 -1
- package/dist/local-personas.d.ts +20 -0
- package/dist/local-personas.d.ts.map +1 -1
- package/dist/local-personas.js +26 -0
- package/dist/local-personas.js.map +1 -1
- package/dist/local-personas.test.js +10 -1
- package/dist/local-personas.test.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.2] - 2026-05-11
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Persona sources: keep cwd label as `cwd` (not `repo`)
|
|
15
|
+
- Persona sources: rename display labels (built-in / repo / personal)
|
|
16
|
+
- Persona-kit: add local skill source provider
|
|
17
|
+
|
|
10
18
|
## [2.1.0] - 2026-05-11
|
|
11
19
|
|
|
12
20
|
### Changed
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAsBA,OAAO,EAiBL,KAAK,OAAO,EAIZ,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAIrB,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAsBA,OAAO,EA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gB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IACvD,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAoCA;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,CA6EA"}
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import { listBuiltInPersonas, personaCatalog, routingProfiles } from '@agentwork
|
|
|
10
10
|
import { createMount, readAgentDotfiles } from '@relayfile/local-mount';
|
|
11
11
|
import ora from 'ora';
|
|
12
12
|
import { startLaunchMetadataRecording } from './launch-metadata.js';
|
|
13
|
-
import { buildPersonaSourceDirectories, defaultCwdPersonaDir, loadLocalPersonas, loadPersonaSourceConfig, normalizePersonaDir, savePersonaSourceConfig } from './local-personas.js';
|
|
13
|
+
import { buildPersonaSourceDirectories, defaultCwdPersonaDir, formatPersonaSourceLabel, loadLocalPersonas, loadPersonaSourceConfig, normalizePersonaDir, savePersonaSourceConfig } from './local-personas.js';
|
|
14
14
|
import { installPersonas } from './persona-install.js';
|
|
15
15
|
import { pickPersona } from './persona-picker.js';
|
|
16
16
|
import { recordRecent, loadRecents, runPersonaPickerTui } from './persona-tui.js';
|
|
@@ -18,7 +18,9 @@ const USAGE = `Usage: agentworkforce <command> [args...]
|
|
|
18
18
|
|
|
19
19
|
Run with no arguments inside a TTY to open an interactive persona picker —
|
|
20
20
|
the top 3 most recently used personas are shown first, and typing fuzzy-
|
|
21
|
-
searches across persona names and descriptions.
|
|
21
|
+
searches across persona names and descriptions. Each row's SOURCE column
|
|
22
|
+
is one of: built-in (bundled), cwd (./.agentworkforce/workforce/personas),
|
|
23
|
+
personal (~/.agentworkforce/workforce/personas), or dir:N (configured).
|
|
22
24
|
|
|
23
25
|
Commands:
|
|
24
26
|
create [flags] Opens persona-maker@best for creating a new
|
|
@@ -424,7 +426,10 @@ async function runInstallOrThrow(command, label, cwd) {
|
|
|
424
426
|
}
|
|
425
427
|
}
|
|
426
428
|
function buildInstallContext(selection, options = {}) {
|
|
427
|
-
const plan = materializeSkills(selection.skills, selection.runtime.harness,
|
|
429
|
+
const plan = materializeSkills(selection.skills, selection.runtime.harness, {
|
|
430
|
+
...(options.installRoot !== undefined ? { installRoot: options.installRoot } : {}),
|
|
431
|
+
...(options.repoRoot !== undefined ? { repoRoot: options.repoRoot } : {})
|
|
432
|
+
});
|
|
428
433
|
const { installCommand, installCommandString } = buildInstallArtifacts(plan);
|
|
429
434
|
const { cleanupCommand, cleanupCommandString } = buildCleanupArtifacts(plan);
|
|
430
435
|
return {
|
|
@@ -852,7 +857,12 @@ function runDryRun(selection) {
|
|
|
852
857
|
process.stderr.write(`warning: ${w}\n`);
|
|
853
858
|
process.stderr.write(`✓ harness spec: ${spec.bin} (${spec.args.length} args)\n`);
|
|
854
859
|
// Check 3: skill installs.
|
|
855
|
-
|
|
860
|
+
// Dry-run runs each install inside a fresh tempDir (see `cwd: tempDir` on
|
|
861
|
+
// the spawnSync below). Pass repoRoot=process.cwd() so `local`-kind skills
|
|
862
|
+
// resolve their relative source paths against the real repo, not the tmp.
|
|
863
|
+
const plan = materializeSkills(effectiveSelection.skills, runtime.harness, {
|
|
864
|
+
repoRoot: process.cwd()
|
|
865
|
+
});
|
|
856
866
|
if (plan.installs.length === 0) {
|
|
857
867
|
process.stderr.write('✓ skills: (none declared)\n');
|
|
858
868
|
process.stderr.write('✓ dry-run ok\n');
|
|
@@ -949,7 +959,15 @@ async function runInteractive(selection, options) {
|
|
|
949
959
|
const installRoot = sessionRoot && runtime.harness === 'claude'
|
|
950
960
|
? sessionInstallRoot(sessionRoot)
|
|
951
961
|
: undefined;
|
|
952
|
-
|
|
962
|
+
// `repoRoot` lets the local skill provider (kind: 'local') resolve
|
|
963
|
+
// relative source paths like `.agentworkforce/workforce/skills/foo.md` to
|
|
964
|
+
// absolute paths before the install command runs. Critical for claude's
|
|
965
|
+
// installRoot mode, where the install runs `cd <installRoot> && cp ...`
|
|
966
|
+
// and a relative source would otherwise resolve against the wrong dir.
|
|
967
|
+
const install = buildInstallContext(effectiveSelection, {
|
|
968
|
+
...(installRoot !== undefined ? { installRoot } : {}),
|
|
969
|
+
repoRoot: process.cwd()
|
|
970
|
+
});
|
|
953
971
|
process.stderr.write(`→ ${personaId} [${tier}] via ${runtime.harness} (${runtime.model})\n`);
|
|
954
972
|
const startLaunchMetadataForLaunch = (cwd = process.cwd()) => startLaunchMetadataRecording({
|
|
955
973
|
selection: effectiveSelection,
|
|
@@ -1403,12 +1421,18 @@ function formatSourcesTable(rows, configPath, defaultCreateTarget) {
|
|
|
1403
1421
|
dir: 'DIR'
|
|
1404
1422
|
};
|
|
1405
1423
|
const cols = ['cascade', 'config', 'source', 'exists', 'dir'];
|
|
1406
|
-
|
|
1424
|
+
// Display label only — the underlying `source` literal flows through to
|
|
1425
|
+
// --json so tooling that pins on `'cwd'` / `'user'` / `'library'` is fine.
|
|
1426
|
+
const display = rows.map((r) => ({
|
|
1427
|
+
...r,
|
|
1428
|
+
source: formatPersonaSourceLabel(r.source)
|
|
1429
|
+
}));
|
|
1430
|
+
const widths = Object.fromEntries(cols.map((c) => [c, Math.max(headers[c].length, ...display.map((r) => r[c].length))]));
|
|
1407
1431
|
const line = (row) => cols.map((c) => row[c].padEnd(widths[c])).join(' ').trimEnd();
|
|
1408
1432
|
return [
|
|
1409
1433
|
`Config: ${configPath}`,
|
|
1410
1434
|
`Default create target: ${defaultCreateTarget ?? '(auto)'}`,
|
|
1411
|
-
[line(headers), ...
|
|
1435
|
+
[line(headers), ...display.map(line)].join('\n'),
|
|
1412
1436
|
''
|
|
1413
1437
|
].join('\n');
|
|
1414
1438
|
}
|
|
@@ -1691,7 +1715,9 @@ function formatPersonaTable(rows, display) {
|
|
|
1691
1715
|
};
|
|
1692
1716
|
const rendered = rows.map((r) => ({
|
|
1693
1717
|
persona: r.persona,
|
|
1694
|
-
|
|
1718
|
+
// Show the user-facing label (`built-in` / `repo` / `personal` / `dir:N`).
|
|
1719
|
+
// The internal cascade key is still in `--json` output for tooling.
|
|
1720
|
+
source: formatPersonaSourceLabel(r.source),
|
|
1695
1721
|
harness: r.harness,
|
|
1696
1722
|
model: r.model,
|
|
1697
1723
|
rating: r.rating,
|
|
@@ -3064,13 +3090,17 @@ function applyPatchInPlace(root, patch) {
|
|
|
3064
3090
|
export function buildTuiCandidates() {
|
|
3065
3091
|
const byId = new Map();
|
|
3066
3092
|
for (const spec of listBuiltInPersonas()) {
|
|
3067
|
-
byId.set(spec.id, {
|
|
3093
|
+
byId.set(spec.id, {
|
|
3094
|
+
id: spec.id,
|
|
3095
|
+
description: spec.description,
|
|
3096
|
+
source: formatPersonaSourceLabel('library')
|
|
3097
|
+
});
|
|
3068
3098
|
}
|
|
3069
3099
|
for (const [id, spec] of local.byId.entries()) {
|
|
3070
3100
|
byId.set(id, {
|
|
3071
3101
|
id,
|
|
3072
3102
|
description: spec.description,
|
|
3073
|
-
source: local.sources.get(id) ?? 'library'
|
|
3103
|
+
source: formatPersonaSourceLabel(local.sources.get(id) ?? 'library')
|
|
3074
3104
|
});
|
|
3075
3105
|
}
|
|
3076
3106
|
return [...byId.values()].sort((a, b) => a.id.localeCompare(b.id));
|