@bradygaster/squad-cli 0.9.6-insider.2 → 0.10.0-insider.1
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 +555 -0
- package/README.md +5 -5
- package/dist/cli/commands/build.js +3 -3
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/copilot-bridge.d.ts.map +1 -1
- package/dist/cli/commands/copilot-bridge.js +5 -1
- package/dist/cli/commands/copilot-bridge.js.map +1 -1
- package/dist/cli/commands/cross-squad.d.ts +15 -2
- package/dist/cli/commands/cross-squad.d.ts.map +1 -1
- package/dist/cli/commands/cross-squad.js +78 -4
- package/dist/cli/commands/cross-squad.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +6 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +120 -5
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/export.d.ts +7 -3
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +68 -16
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/import.d.ts +7 -3
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/import.js +140 -42
- package/dist/cli/commands/import.js.map +1 -1
- package/dist/cli/commands/install-hooks.d.ts.map +1 -1
- package/dist/cli/commands/install-hooks.js +50 -5
- package/dist/cli/commands/install-hooks.js.map +1 -1
- package/dist/cli/commands/link.d.ts.map +1 -1
- package/dist/cli/commands/link.js +7 -1
- package/dist/cli/commands/link.js.map +1 -1
- package/dist/cli/commands/loop.d.ts.map +1 -1
- package/dist/cli/commands/loop.js +7 -5
- package/dist/cli/commands/loop.js.map +1 -1
- package/dist/cli/commands/memory.d.ts +2 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +304 -0
- package/dist/cli/commands/memory.js.map +1 -0
- package/dist/cli/commands/migrate-backend.d.ts +36 -5
- package/dist/cli/commands/migrate-backend.d.ts.map +1 -1
- package/dist/cli/commands/migrate-backend.js +250 -40
- package/dist/cli/commands/migrate-backend.js.map +1 -1
- package/dist/cli/commands/notes.d.ts +27 -0
- package/dist/cli/commands/notes.d.ts.map +1 -0
- package/dist/cli/commands/notes.js +222 -0
- package/dist/cli/commands/notes.js.map +1 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +423 -8
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/cli/commands/skill.d.ts +31 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +498 -0
- package/dist/cli/commands/skill.js.map +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +9 -1
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/state-mcp.d.ts +25 -0
- package/dist/cli/commands/state-mcp.d.ts.map +1 -0
- package/dist/cli/commands/state-mcp.js +174 -0
- package/dist/cli/commands/state-mcp.js.map +1 -0
- package/dist/cli/commands/watch/agent-spawn.d.ts +62 -0
- package/dist/cli/commands/watch/agent-spawn.d.ts.map +1 -0
- package/dist/cli/commands/watch/agent-spawn.js +127 -0
- package/dist/cli/commands/watch/agent-spawn.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/board.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/board.js +2 -1
- package/dist/cli/commands/watch/capabilities/board.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js +3 -2
- package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/execute.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/execute.js +14 -2
- package/dist/cli/commands/watch/capabilities/execute.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/index.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/index.js +2 -0
- package/dist/cli/commands/watch/capabilities/index.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-email.js +21 -4
- package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/monitor-teams.js +21 -5
- package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/notes-promote.d.ts +11 -0
- package/dist/cli/commands/watch/capabilities/notes-promote.d.ts.map +1 -0
- package/dist/cli/commands/watch/capabilities/notes-promote.js +124 -0
- package/dist/cli/commands/watch/capabilities/notes-promote.js.map +1 -0
- package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/retro.js +3 -2
- package/dist/cli/commands/watch/capabilities/retro.js.map +1 -1
- package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts.map +1 -1
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js +2 -1
- package/dist/cli/commands/watch/capabilities/wave-dispatch.js.map +1 -1
- package/dist/cli/commands/watch/index.d.ts.map +1 -1
- package/dist/cli/commands/watch/index.js +16 -12
- package/dist/cli/commands/watch/index.js.map +1 -1
- package/dist/cli/core/cast.d.ts.map +1 -1
- package/dist/cli/core/cast.js +216 -1
- package/dist/cli/core/cast.js.map +1 -1
- package/dist/cli/core/command-help.d.ts +44 -0
- package/dist/cli/core/command-help.d.ts.map +1 -0
- package/dist/cli/core/command-help.js +401 -0
- package/dist/cli/core/command-help.js.map +1 -0
- package/dist/cli/core/copilot-invocation.d.ts +57 -0
- package/dist/cli/core/copilot-invocation.d.ts.map +1 -0
- package/dist/cli/core/copilot-invocation.js +84 -0
- package/dist/cli/core/copilot-invocation.js.map +1 -0
- package/dist/cli/core/effective-squad-dir.d.ts +33 -0
- package/dist/cli/core/effective-squad-dir.d.ts.map +1 -0
- package/dist/cli/core/effective-squad-dir.js +37 -0
- package/dist/cli/core/effective-squad-dir.js.map +1 -0
- package/dist/cli/core/init.d.ts +2 -0
- package/dist/cli/core/init.d.ts.map +1 -1
- package/dist/cli/core/init.js +130 -1
- package/dist/cli/core/init.js.map +1 -1
- package/dist/cli/core/mcp-root.d.ts +73 -0
- package/dist/cli/core/mcp-root.d.ts.map +1 -0
- package/dist/cli/core/mcp-root.js +195 -0
- package/dist/cli/core/mcp-root.js.map +1 -0
- package/dist/cli/core/mcp-spec.d.ts +48 -0
- package/dist/cli/core/mcp-spec.d.ts.map +1 -0
- package/dist/cli/core/mcp-spec.js +62 -0
- package/dist/cli/core/mcp-spec.js.map +1 -0
- package/dist/cli/core/npm-registry.d.ts +25 -0
- package/dist/cli/core/npm-registry.d.ts.map +1 -0
- package/dist/cli/core/npm-registry.js +65 -0
- package/dist/cli/core/npm-registry.js.map +1 -0
- package/dist/cli/core/templates.d.ts.map +1 -1
- package/dist/cli/core/templates.js +102 -24
- package/dist/cli/core/templates.js.map +1 -1
- package/dist/cli/core/upgrade.d.ts +29 -0
- package/dist/cli/core/upgrade.d.ts.map +1 -1
- package/dist/cli/core/upgrade.js +413 -15
- package/dist/cli/core/upgrade.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/shell/components/App.js +1 -1
- package/dist/cli/shell/components/App.js.map +1 -1
- package/dist/cli/shell/components/MessageStream.js +2 -2
- package/dist/cli/shell/components/MessageStream.js.map +1 -1
- package/dist/cli/shell/coordinator.d.ts.map +1 -1
- package/dist/cli/shell/coordinator.js +11 -5
- package/dist/cli/shell/coordinator.js.map +1 -1
- package/dist/cli/shell/index.d.ts.map +1 -1
- package/dist/cli/shell/index.js +14 -7
- package/dist/cli/shell/index.js.map +1 -1
- package/dist/cli/shell/lifecycle.d.ts.map +1 -1
- package/dist/cli/shell/lifecycle.js +12 -7
- package/dist/cli/shell/lifecycle.js.map +1 -1
- package/dist/cli/shell/session-store.d.ts +4 -4
- package/dist/cli/shell/session-store.d.ts.map +1 -1
- package/dist/cli/shell/session-store.js +11 -11
- package/dist/cli/shell/session-store.js.map +1 -1
- package/dist/cli-entry.js +171 -50
- package/dist/cli-entry.js.map +1 -1
- package/package.json +9 -4
- package/scripts/patch-esm-imports.mjs +3 -1
- package/templates/after-agent-reference.md +64 -0
- package/templates/ceremony-reference.md +82 -0
- package/templates/client-compatibility-reference.md +46 -0
- package/templates/copilot-agent.md +96 -0
- package/templates/copilot-instructions.md +14 -0
- package/templates/fact-checker-policy.md +104 -0
- package/templates/model-selection-reference.md +101 -0
- package/templates/prd-intake.md +105 -0
- package/templates/rai-charter.md +110 -0
- package/templates/rai-policy.md +103 -0
- package/templates/ralph-reference.md +141 -0
- package/templates/routing.md +1 -0
- package/templates/scribe-charter.md +18 -151
- package/templates/session-init-reference.md +199 -0
- package/templates/skills/cross-squad/SKILL.md +66 -6
- package/templates/skills/cross-squad-communication/SKILL.md +399 -0
- package/templates/skills/e2e-template-testing/SKILL.md +557 -0
- package/templates/skills/fact-checking/SKILL.md +61 -0
- package/templates/skills/release-process/SKILL.md +2 -2
- package/templates/skills/squad/SKILL.md +299 -0
- package/templates/skills/squad-help/SKILL.md +97 -0
- package/templates/skills/squad-version-check/SKILL.md +169 -0
- package/templates/skills/tiered-memory/SKILL.md +31 -44
- package/templates/spawn-reference.md +131 -0
- package/templates/squad.agent.md.template +306 -618
- package/templates/workflow-wiring-appendix-a-code-reviewer.md +131 -0
- package/templates/workflow-wiring-appendix-b-documenter.md +140 -0
- package/templates/workflow-wiring-guide.md +276 -0
- package/templates/workflows/squad-heartbeat.yml +167 -167
- package/templates/worktree-reference.md +126 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helper for resolving the `squad_state` MCP launch spec.
|
|
3
|
+
*
|
|
4
|
+
* Used by BOTH `squad init` and `squad upgrade` so the runtime-MCP fallback
|
|
5
|
+
* behavior stays symmetric.
|
|
6
|
+
*
|
|
7
|
+
* Resolution order (iter-7, simplified to 2 tiers):
|
|
8
|
+
* 1. If `cliVersion` IS published on npm → `npx -y <pkg>@<version> state-mcp`
|
|
9
|
+
* (clean cross-machine UX, the steady-state happy path).
|
|
10
|
+
* 2. Else → `npx -y <pkg>@insider state-mcp`. We do NOT probe the registry;
|
|
11
|
+
* the `@insider` dist-tag is kept fresh by the publish flow and tier-2
|
|
12
|
+
* is the de-facto fallback whenever a pinned preview version isn't yet
|
|
13
|
+
* published. If it really isn't reachable at runtime, `npx` will fail
|
|
14
|
+
* loudly — same observable behavior as pre-iter-5.
|
|
15
|
+
*
|
|
16
|
+
* Iter-6 had two additional tiers (a local-install path resolver and a hard
|
|
17
|
+
* error) that the smoke data showed never fired in practice: `@insider` is
|
|
18
|
+
* always current, so tier-2 always wins before tier-3 is reached. Deleted
|
|
19
|
+
* in iter-7 per the "verify you didn't add code that's no longer needed"
|
|
20
|
+
* mandate.
|
|
21
|
+
*/
|
|
22
|
+
const PACKAGE_NAME = '@bradygaster/squad-cli';
|
|
23
|
+
/** Reset internal caches (test-only helper; retained for compat). */
|
|
24
|
+
export function _resetMcpSpecCache() {
|
|
25
|
+
// no caches in the 2-tier resolver — kept as a no-op for backward compat
|
|
26
|
+
// with any test that still calls it.
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the squad_state MCP launch spec given the running CLI version.
|
|
30
|
+
*
|
|
31
|
+
* Always returns a spec. If the pinned version is unpublished we fall back
|
|
32
|
+
* to `@insider`; if even that turns out to be unreachable at runtime, `npx`
|
|
33
|
+
* will fail visibly when Copilot launches the MCP server — same behavior
|
|
34
|
+
* as pre-iter-5.
|
|
35
|
+
*/
|
|
36
|
+
export async function resolveSquadStateMcpSpec(cliVersion, options = {}) {
|
|
37
|
+
// 1. Try the pinned version on the public registry. Skip for placeholder
|
|
38
|
+
// versions ('', '0.0.0') and local/dev builds with build metadata ('+')
|
|
39
|
+
// — the registry will obviously not have them (#1204).
|
|
40
|
+
if (cliVersion && cliVersion !== '0.0.0' && !cliVersion.includes('+')) {
|
|
41
|
+
const probe = options.publishedCheck ?? defaultPublishedCheck;
|
|
42
|
+
const published = await probe(cliVersion);
|
|
43
|
+
if (published) {
|
|
44
|
+
return {
|
|
45
|
+
command: 'npx',
|
|
46
|
+
args: ['-y', `${PACKAGE_NAME}@${cliVersion}`, 'state-mcp'],
|
|
47
|
+
source: 'pinned',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// 2. Fall back to the @insider dist-tag — always returned, never probed.
|
|
52
|
+
return {
|
|
53
|
+
command: 'npx',
|
|
54
|
+
args: ['-y', `${PACKAGE_NAME}@insider`, 'state-mcp'],
|
|
55
|
+
source: 'insider',
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async function defaultPublishedCheck(version) {
|
|
59
|
+
const { isSquadCliVersionPublished } = await import('./npm-registry.js');
|
|
60
|
+
return await isSquadCliVersionPublished(version);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=mcp-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-spec.js","sourceRoot":"","sources":["../../../src/cli/core/mcp-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAU9C,qEAAqE;AACrE,MAAM,UAAU,kBAAkB;IAChC,yEAAyE;IACzE,qCAAqC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,UAAkB,EAClB,UAA2C,EAAE;IAE7C,yEAAyE;IACzE,2EAA2E;IAC3E,0DAA0D;IAC1D,IAAI,UAAU,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,IAAI,qBAAqB,CAAC;QAC9D,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,SAAS,EAAE,CAAC;YACd,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,YAAY,IAAI,UAAU,EAAE,EAAE,WAAW,CAAC;gBAC1D,MAAM,EAAE,QAAQ;aACjB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,yEAAyE;IACzE,OAAO;QACL,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,YAAY,UAAU,EAAE,WAAW,CAAC;QACpD,MAAM,EAAE,SAAS;KAClB,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,qBAAqB,CAAC,OAAe;IAClD,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACzE,OAAO,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight helper to check whether a specific package version exists in the
|
|
3
|
+
* public npm registry. Used by `ensureSquadStateMcpPinned` to avoid pinning a
|
|
4
|
+
* `squad_state` MCP launch spec to a version that `npx` cannot resolve
|
|
5
|
+
* (which would cause an ETARGET at session start and leave the bridge unwired).
|
|
6
|
+
*
|
|
7
|
+
* The result is cached per-process to avoid repeated lookups across the
|
|
8
|
+
* multi-pass upgrade flow. Network failures and non-200 responses are
|
|
9
|
+
* conservatively treated as "version not published" so that we fall back to
|
|
10
|
+
* the locally-installed binary rather than pinning a bad spec.
|
|
11
|
+
*
|
|
12
|
+
* See `.squad/files/validation/MCP-LOADER-ROOT-CAUSE.md` (data-15 Option A).
|
|
13
|
+
*/
|
|
14
|
+
/** Reset the cache (test-only helper). */
|
|
15
|
+
export declare function _resetNpmRegistryCache(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if `@bradygaster/squad-cli@<version>` is reachable on the npm
|
|
18
|
+
* registry, false on any network failure / 404 / non-publishable response.
|
|
19
|
+
*
|
|
20
|
+
* Uses Node's built-in `https` so we don't pull in extra deps. Total budget
|
|
21
|
+
* is bounded by `timeoutMs` (default 2s) so a slow / offline registry can
|
|
22
|
+
* never block CLI startup.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isSquadCliVersionPublished(version: string, timeoutMs?: number): Promise<boolean>;
|
|
25
|
+
//# sourceMappingURL=npm-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.d.ts","sourceRoot":"","sources":["../../../src/cli/core/npm-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,0CAA0C;AAC1C,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,SAAS,SAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAqClB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight helper to check whether a specific package version exists in the
|
|
3
|
+
* public npm registry. Used by `ensureSquadStateMcpPinned` to avoid pinning a
|
|
4
|
+
* `squad_state` MCP launch spec to a version that `npx` cannot resolve
|
|
5
|
+
* (which would cause an ETARGET at session start and leave the bridge unwired).
|
|
6
|
+
*
|
|
7
|
+
* The result is cached per-process to avoid repeated lookups across the
|
|
8
|
+
* multi-pass upgrade flow. Network failures and non-200 responses are
|
|
9
|
+
* conservatively treated as "version not published" so that we fall back to
|
|
10
|
+
* the locally-installed binary rather than pinning a bad spec.
|
|
11
|
+
*
|
|
12
|
+
* See `.squad/files/validation/MCP-LOADER-ROOT-CAUSE.md` (data-15 Option A).
|
|
13
|
+
*/
|
|
14
|
+
const cache = new Map();
|
|
15
|
+
/** Reset the cache (test-only helper). */
|
|
16
|
+
export function _resetNpmRegistryCache() {
|
|
17
|
+
cache.clear();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if `@bradygaster/squad-cli@<version>` is reachable on the npm
|
|
21
|
+
* registry, false on any network failure / 404 / non-publishable response.
|
|
22
|
+
*
|
|
23
|
+
* Uses Node's built-in `https` so we don't pull in extra deps. Total budget
|
|
24
|
+
* is bounded by `timeoutMs` (default 2s) so a slow / offline registry can
|
|
25
|
+
* never block CLI startup.
|
|
26
|
+
*/
|
|
27
|
+
export async function isSquadCliVersionPublished(version, timeoutMs = 2000) {
|
|
28
|
+
if (!version || version === '0.0.0')
|
|
29
|
+
return false;
|
|
30
|
+
const cacheKey = version;
|
|
31
|
+
const cached = cache.get(cacheKey);
|
|
32
|
+
if (cached !== undefined)
|
|
33
|
+
return cached;
|
|
34
|
+
const url = `https://registry.npmjs.org/@bradygaster%2Fsquad-cli/${encodeURIComponent(version)}`;
|
|
35
|
+
const ok = await new Promise((resolve) => {
|
|
36
|
+
let settled = false;
|
|
37
|
+
const finish = (v) => {
|
|
38
|
+
if (settled)
|
|
39
|
+
return;
|
|
40
|
+
settled = true;
|
|
41
|
+
resolve(v);
|
|
42
|
+
};
|
|
43
|
+
const timer = setTimeout(() => finish(false), timeoutMs);
|
|
44
|
+
void import('node:https')
|
|
45
|
+
.then(({ request }) => {
|
|
46
|
+
const req = request(url, { method: 'GET' }, (res) => {
|
|
47
|
+
// Drain to free the socket.
|
|
48
|
+
res.resume();
|
|
49
|
+
finish(res.statusCode === 200);
|
|
50
|
+
});
|
|
51
|
+
req.on('error', () => finish(false));
|
|
52
|
+
req.on('timeout', () => {
|
|
53
|
+
req.destroy();
|
|
54
|
+
finish(false);
|
|
55
|
+
});
|
|
56
|
+
req.setTimeout(timeoutMs);
|
|
57
|
+
req.end();
|
|
58
|
+
})
|
|
59
|
+
.catch(() => finish(false))
|
|
60
|
+
.finally(() => clearTimeout(timer));
|
|
61
|
+
});
|
|
62
|
+
cache.set(cacheKey, ok);
|
|
63
|
+
return ok;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=npm-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.js","sourceRoot":"","sources":["../../../src/cli/core/npm-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmB,CAAC;AAEzC,0CAA0C;AAC1C,MAAM,UAAU,sBAAsB;IACpC,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAAe,EACf,SAAS,GAAG,IAAI;IAEhB,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAClD,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IAExC,MAAM,GAAG,GAAG,uDAAuD,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;IACjG,MAAM,EAAE,GAAG,MAAM,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;QAChD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC,CAAU,EAAE,EAAE;YAC5B,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,OAAO,CAAC,CAAC,CAAC,CAAC;QACb,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;QAEzD,KA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C;IAC5B,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/cli/core/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,+BAA+B;AAC/B,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,EA2V3C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAWxC"}
|
|
@@ -22,6 +22,9 @@ export const TEMPLATE_MANIFEST = [
|
|
|
22
22
|
description: 'Squad coordinator agent prompt',
|
|
23
23
|
},
|
|
24
24
|
// Casting system (squad-owned, overwrite on upgrade)
|
|
25
|
+
// NOTE: These JSON files are read at runtime by the SDK and many agent
|
|
26
|
+
// skills via their flat `.squad/casting-*.json` paths — do NOT route into
|
|
27
|
+
// a subdirectory without coordinated updates across the SDK + skill docs.
|
|
25
28
|
{
|
|
26
29
|
source: 'casting-history.json',
|
|
27
30
|
destination: 'casting-history.json',
|
|
@@ -40,88 +43,108 @@ export const TEMPLATE_MANIFEST = [
|
|
|
40
43
|
overwriteOnUpgrade: true,
|
|
41
44
|
description: 'Universe-based character registry',
|
|
42
45
|
},
|
|
43
|
-
// Template files (squad-owned, overwrite on upgrade)
|
|
46
|
+
// Template files (squad-owned, overwrite on upgrade) — routed to
|
|
47
|
+
// .squad/templates/ so upgrade doesn't dump ~20 generic *.md docs
|
|
48
|
+
// into the .squad/ root.
|
|
44
49
|
{
|
|
45
50
|
source: 'charter.md',
|
|
46
|
-
destination: 'charter.md',
|
|
51
|
+
destination: 'templates/charter.md',
|
|
47
52
|
overwriteOnUpgrade: true,
|
|
48
53
|
description: 'Agent charter template',
|
|
49
54
|
},
|
|
50
55
|
{
|
|
51
56
|
source: 'constraint-tracking.md',
|
|
52
|
-
destination: 'constraint-tracking.md',
|
|
57
|
+
destination: 'templates/constraint-tracking.md',
|
|
53
58
|
overwriteOnUpgrade: true,
|
|
54
59
|
description: 'Constraint tracking template',
|
|
55
60
|
},
|
|
56
61
|
{
|
|
57
62
|
source: 'copilot-instructions.md',
|
|
58
|
-
destination: 'copilot-instructions.md',
|
|
63
|
+
destination: 'templates/copilot-instructions.md',
|
|
59
64
|
overwriteOnUpgrade: true,
|
|
60
65
|
description: 'Copilot instructions template',
|
|
61
66
|
},
|
|
62
67
|
{
|
|
63
68
|
source: 'history.md',
|
|
64
|
-
destination: 'history.md',
|
|
69
|
+
destination: 'templates/history.md',
|
|
65
70
|
overwriteOnUpgrade: true,
|
|
66
71
|
description: 'Agent history template',
|
|
67
72
|
},
|
|
68
73
|
{
|
|
69
74
|
source: 'mcp-config.md',
|
|
70
|
-
destination: 'mcp-config.md',
|
|
75
|
+
destination: 'templates/mcp-config.md',
|
|
71
76
|
overwriteOnUpgrade: true,
|
|
72
77
|
description: 'MCP configuration template',
|
|
73
78
|
},
|
|
74
79
|
{
|
|
75
80
|
source: 'multi-agent-format.md',
|
|
76
|
-
destination: 'multi-agent-format.md',
|
|
81
|
+
destination: 'templates/multi-agent-format.md',
|
|
77
82
|
overwriteOnUpgrade: true,
|
|
78
83
|
description: 'Multi-agent format specification',
|
|
79
84
|
},
|
|
80
85
|
{
|
|
81
86
|
source: 'orchestration-log.md',
|
|
82
|
-
destination: 'orchestration-log.md',
|
|
87
|
+
destination: 'templates/orchestration-log.md',
|
|
83
88
|
overwriteOnUpgrade: true,
|
|
84
89
|
description: 'Orchestration log template',
|
|
85
90
|
},
|
|
86
91
|
{
|
|
87
92
|
source: 'plugin-marketplace.md',
|
|
88
|
-
destination: 'plugin-marketplace.md',
|
|
93
|
+
destination: 'templates/plugin-marketplace.md',
|
|
89
94
|
overwriteOnUpgrade: true,
|
|
90
95
|
description: 'Plugin marketplace template',
|
|
91
96
|
},
|
|
92
97
|
{
|
|
93
98
|
source: 'raw-agent-output.md',
|
|
94
|
-
destination: 'raw-agent-output.md',
|
|
99
|
+
destination: 'templates/raw-agent-output.md',
|
|
95
100
|
overwriteOnUpgrade: true,
|
|
96
101
|
description: 'Raw agent output template',
|
|
97
102
|
},
|
|
98
103
|
{
|
|
99
104
|
source: 'roster.md',
|
|
100
|
-
destination: 'roster.md',
|
|
105
|
+
destination: 'templates/roster.md',
|
|
101
106
|
overwriteOnUpgrade: true,
|
|
102
107
|
description: 'Team roster template',
|
|
103
108
|
},
|
|
104
109
|
{
|
|
105
110
|
source: 'run-output.md',
|
|
106
|
-
destination: 'run-output.md',
|
|
111
|
+
destination: 'templates/run-output.md',
|
|
107
112
|
overwriteOnUpgrade: true,
|
|
108
113
|
description: 'Run output template',
|
|
109
114
|
},
|
|
110
115
|
{
|
|
111
116
|
source: 'scribe-charter.md',
|
|
112
|
-
destination: 'scribe-charter.md',
|
|
117
|
+
destination: 'templates/scribe-charter.md',
|
|
113
118
|
overwriteOnUpgrade: true,
|
|
114
119
|
description: 'Scribe charter template',
|
|
115
120
|
},
|
|
121
|
+
{
|
|
122
|
+
source: 'Rai-charter.md',
|
|
123
|
+
destination: 'templates/Rai-charter.md',
|
|
124
|
+
overwriteOnUpgrade: true,
|
|
125
|
+
description: 'Rai RAI reviewer charter template',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
source: 'rai-policy.md',
|
|
129
|
+
destination: 'templates/rai-policy.md',
|
|
130
|
+
overwriteOnUpgrade: true,
|
|
131
|
+
description: 'Default RAI policy template',
|
|
132
|
+
},
|
|
116
133
|
{
|
|
117
134
|
source: 'fact-checker-charter.md',
|
|
118
|
-
destination: 'fact-checker-charter.md',
|
|
135
|
+
destination: 'templates/fact-checker-charter.md',
|
|
119
136
|
overwriteOnUpgrade: true,
|
|
120
137
|
description: 'Fact checker charter template',
|
|
121
138
|
},
|
|
139
|
+
{
|
|
140
|
+
source: 'fact-checker-policy.md',
|
|
141
|
+
destination: 'templates/fact-checker-policy.md',
|
|
142
|
+
overwriteOnUpgrade: true,
|
|
143
|
+
description: 'Fact checker policy template (verification + DA methodology)',
|
|
144
|
+
},
|
|
122
145
|
{
|
|
123
146
|
source: 'skill.md',
|
|
124
|
-
destination: 'skill.md',
|
|
147
|
+
destination: 'templates/skill.md',
|
|
125
148
|
overwriteOnUpgrade: true,
|
|
126
149
|
description: 'Skill definition template',
|
|
127
150
|
},
|
|
@@ -154,59 +177,114 @@ export const TEMPLATE_MANIFEST = [
|
|
|
154
177
|
// Issue lifecycle (squad-owned)
|
|
155
178
|
{
|
|
156
179
|
source: 'issue-lifecycle.md',
|
|
157
|
-
destination: 'issue-lifecycle.md',
|
|
180
|
+
destination: 'templates/issue-lifecycle.md',
|
|
158
181
|
overwriteOnUpgrade: true,
|
|
159
182
|
description: 'Issue lifecycle process template',
|
|
160
183
|
},
|
|
161
184
|
// Skills subdirectory (squad-owned)
|
|
162
185
|
{
|
|
163
186
|
source: 'skills/squad-conventions/SKILL.md',
|
|
164
|
-
destination: '../.
|
|
187
|
+
destination: '../.github/skills/squad-conventions/SKILL.md',
|
|
165
188
|
overwriteOnUpgrade: true,
|
|
166
189
|
description: 'Squad conventions skill definition',
|
|
167
190
|
},
|
|
168
191
|
{
|
|
169
192
|
source: 'skills/error-recovery/SKILL.md',
|
|
170
|
-
destination: '../.
|
|
193
|
+
destination: '../.github/skills/error-recovery/SKILL.md',
|
|
171
194
|
overwriteOnUpgrade: true,
|
|
172
195
|
description: 'Graceful error recovery patterns',
|
|
173
196
|
},
|
|
174
197
|
{
|
|
175
198
|
source: 'skills/secret-handling/SKILL.md',
|
|
176
|
-
destination: '../.
|
|
199
|
+
destination: '../.github/skills/secret-handling/SKILL.md',
|
|
177
200
|
overwriteOnUpgrade: true,
|
|
178
201
|
description: 'Secrets management and credential safety',
|
|
179
202
|
},
|
|
180
203
|
{
|
|
181
204
|
source: 'skills/git-workflow/SKILL.md',
|
|
182
|
-
destination: '../.
|
|
205
|
+
destination: '../.github/skills/git-workflow/SKILL.md',
|
|
183
206
|
overwriteOnUpgrade: true,
|
|
184
207
|
description: 'Git workflow conventions and branch management',
|
|
185
208
|
},
|
|
186
209
|
{
|
|
187
210
|
source: 'skills/session-recovery/SKILL.md',
|
|
188
|
-
destination: '../.
|
|
211
|
+
destination: '../.github/skills/session-recovery/SKILL.md',
|
|
189
212
|
overwriteOnUpgrade: true,
|
|
190
213
|
description: 'Session checkpoint and recovery patterns',
|
|
191
214
|
},
|
|
192
215
|
{
|
|
193
216
|
source: 'skills/reviewer-protocol/SKILL.md',
|
|
194
|
-
destination: '../.
|
|
217
|
+
destination: '../.github/skills/reviewer-protocol/SKILL.md',
|
|
195
218
|
overwriteOnUpgrade: true,
|
|
196
219
|
description: 'Code review protocol and reviewer gate patterns',
|
|
197
220
|
},
|
|
198
221
|
{
|
|
199
222
|
source: 'skills/test-discipline/SKILL.md',
|
|
200
|
-
destination: '../.
|
|
223
|
+
destination: '../.github/skills/test-discipline/SKILL.md',
|
|
201
224
|
overwriteOnUpgrade: true,
|
|
202
225
|
description: 'Test-first discipline and coverage expectations',
|
|
203
226
|
},
|
|
204
227
|
{
|
|
205
228
|
source: 'skills/agent-collaboration/SKILL.md',
|
|
206
|
-
destination: '../.
|
|
229
|
+
destination: '../.github/skills/agent-collaboration/SKILL.md',
|
|
207
230
|
overwriteOnUpgrade: true,
|
|
208
231
|
description: 'Multi-agent collaboration and handoff patterns',
|
|
209
232
|
},
|
|
233
|
+
{
|
|
234
|
+
source: 'skills/squad/SKILL.md',
|
|
235
|
+
destination: '../.github/skills/squad/SKILL.md',
|
|
236
|
+
overwriteOnUpgrade: true,
|
|
237
|
+
description: 'Squad command catalog — invokable via /squad slash command',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
source: 'skills/squad-version-check/SKILL.md',
|
|
241
|
+
destination: '../.github/skills/squad-version-check/SKILL.md',
|
|
242
|
+
overwriteOnUpgrade: true,
|
|
243
|
+
description: 'Squad CLI internals — version stamping & upgrade mechanics',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
source: 'skills/squad-help/SKILL.md',
|
|
247
|
+
destination: '../.github/skills/squad-help/SKILL.md',
|
|
248
|
+
overwriteOnUpgrade: true,
|
|
249
|
+
description: 'How to actually use Squad — agent vs skill vs slash command (#1297 redirect)',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
source: 'skills/cross-squad-communication/SKILL.md',
|
|
253
|
+
destination: '../.github/skills/cross-squad-communication/SKILL.md',
|
|
254
|
+
overwriteOnUpgrade: true,
|
|
255
|
+
description: 'Cross-squad delegation — calling another squad as a sub-agent',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
source: 'skills/tiered-memory/SKILL.md',
|
|
259
|
+
destination: '../.github/skills/tiered-memory/SKILL.md',
|
|
260
|
+
overwriteOnUpgrade: true,
|
|
261
|
+
description: 'Tiered-memory access patterns (hot/cold/wiki)',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
source: 'skills/iterative-retrieval/SKILL.md',
|
|
265
|
+
destination: '../.github/skills/iterative-retrieval/SKILL.md',
|
|
266
|
+
overwriteOnUpgrade: true,
|
|
267
|
+
description: 'Iterative retrieval for long-running squad work',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
source: 'skills/reflect/SKILL.md',
|
|
271
|
+
destination: '../.github/skills/reflect/SKILL.md',
|
|
272
|
+
overwriteOnUpgrade: true,
|
|
273
|
+
description: 'Reflection skill for capturing session learnings',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
source: 'skills/cross-squad/SKILL.md',
|
|
277
|
+
destination: '../.github/skills/cross-squad/SKILL.md',
|
|
278
|
+
overwriteOnUpgrade: true,
|
|
279
|
+
description: 'Cross-squad discovery — finding peer squads via registry/upstream',
|
|
280
|
+
},
|
|
281
|
+
// Session init reference (squad-owned, coordinator reads at session start)
|
|
282
|
+
{
|
|
283
|
+
source: 'session-init-reference.md',
|
|
284
|
+
destination: 'templates/session-init-reference.md',
|
|
285
|
+
overwriteOnUpgrade: true,
|
|
286
|
+
description: 'Session init reference — coordinator procedures run at session start',
|
|
287
|
+
},
|
|
210
288
|
// Workflows (squad-owned, overwrite on upgrade)
|
|
211
289
|
{
|
|
212
290
|
source: 'workflows/squad-ci.yml',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/cli/core/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAcxC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,mBAAmB;IACnB;QACE,MAAM,EAAE,yBAAyB;QACjC,WAAW,EAAE,kCAAkC;QAC/C,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,gCAAgC;KAC9C;IAED,qDAAqD;IACrD;QACE,MAAM,EAAE,sBAAsB;QAC9B,WAAW,EAAE,sBAAsB;QACnC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,0BAA0B;KACxC;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,WAAW,EAAE,qBAAqB;QAClC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,8BAA8B;KAC5C;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,WAAW,EAAE,uBAAuB;QACpC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,mCAAmC;KACjD;IAED,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/cli/core/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAcxC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,mBAAmB;IACnB;QACE,MAAM,EAAE,yBAAyB;QACjC,WAAW,EAAE,kCAAkC;QAC/C,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,gCAAgC;KAC9C;IAED,qDAAqD;IACrD,uEAAuE;IACvE,0EAA0E;IAC1E,0EAA0E;IAC1E;QACE,MAAM,EAAE,sBAAsB;QAC9B,WAAW,EAAE,sBAAsB;QACnC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,0BAA0B;KACxC;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,WAAW,EAAE,qBAAqB;QAClC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,8BAA8B;KAC5C;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,WAAW,EAAE,uBAAuB;QACpC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,mCAAmC;KACjD;IAED,iEAAiE;IACjE,kEAAkE;IAClE,yBAAyB;IACzB;QACE,MAAM,EAAE,YAAY;QACpB,WAAW,EAAE,sBAAsB;QACnC,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,wBAAwB;KACtC;IACD;QACE,MAAM,EAAE,wBAAwB;QAChC,WAAW,EAAE,kCAAkC;QAC/C,kBAAkB,EAAE,IAAI;QACxB,WAAW,EAAE,8BAA8B;KAC5C;IACD;QACE,MAAM,EAAE,yBAAyB;QACjC,WA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,GAAG,MAAM,CAAC;IACf,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
* Zero-dep implementation using Node.js stdlib only
|
|
4
4
|
* @module cli/core/upgrade
|
|
5
5
|
*/
|
|
6
|
+
import { type SquadStateMcpSpec } from './mcp-spec.js';
|
|
7
|
+
export { resolveSquadStateMcpSpec } from './mcp-spec.js';
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if the version looks like a local dev build or unpublished
|
|
10
|
+
* pre-release that cannot be resolved from the public npm registry.
|
|
11
|
+
* Guards against writing unresolvable version strings into MCP config
|
|
12
|
+
* (see #1204).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isLocalOrUnpublishedVersion(version: string): boolean;
|
|
6
15
|
export interface UpgradeOptions {
|
|
7
16
|
migrateDirectory?: boolean;
|
|
8
17
|
self?: boolean;
|
|
@@ -35,6 +44,26 @@ export declare function ensureDirectories(dest: string): string[];
|
|
|
35
44
|
* available, falling back to inline JSON defaults.
|
|
36
45
|
*/
|
|
37
46
|
export declare function ensureCastingDefaults(dest: string, templatesDir?: string): string[];
|
|
47
|
+
/** Human-readable single-line description of an McpSpec for success() messages. */
|
|
48
|
+
export declare function describeMcpSpec(spec: SquadStateMcpSpec): string;
|
|
49
|
+
export declare function ensureMemoryGovernanceUpgradeDefaults(dest: string): string[];
|
|
50
|
+
/**
|
|
51
|
+
* Scaffold always-on built-in agent charters (Rai, Fact Checker) that ship
|
|
52
|
+
* as templates but may be missing from older squads. Idempotent — only writes
|
|
53
|
+
* when the agent directory is absent. Never overwrites existing charters or
|
|
54
|
+
* history. Sources charter content from the shipped `templates/{name}-charter.md`
|
|
55
|
+
* files when available, falling back to a minimal placeholder otherwise.
|
|
56
|
+
*
|
|
57
|
+
* Scribe and Ralph are intentionally NOT scaffolded here — they should already
|
|
58
|
+
* exist in any squad that ran a prior init, and their charters are inlined in
|
|
59
|
+
* cast.ts (no shipped template file). Adding them here would risk overwriting
|
|
60
|
+
* customized versions on legacy squads.
|
|
61
|
+
*
|
|
62
|
+
* @param dest Root directory containing .squad/
|
|
63
|
+
* @param templatesDir Directory containing shipped charter templates
|
|
64
|
+
* @returns Paths (relative to dest) of created agent files
|
|
65
|
+
*/
|
|
66
|
+
export declare function ensureBuiltinAgents(dest: string, templatesDir: string): string[];
|
|
38
67
|
/**
|
|
39
68
|
* Run the upgrade command
|
|
40
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/cli/core/upgrade.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/cli/core/upgrade.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAczD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQpE;AAqGD,MAAM,WAAW,cAAc;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAyTD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAyB1D;AAkBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAA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