@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,401 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-command help text for `squad <cmd> --help` / `-h`.
|
|
3
|
+
*
|
|
4
|
+
* Fixes #1201: previously `--help` after a subcommand was silently dropped
|
|
5
|
+
* by the CLI router and the command would execute for real, sometimes with
|
|
6
|
+
* destructive side effects (`squad init --help` would scaffold files into
|
|
7
|
+
* the cwd, `squad triage --help` / `watch --help` would start a polling
|
|
8
|
+
* loop, etc.).
|
|
9
|
+
*
|
|
10
|
+
* The entry point in `cli-entry.ts` intercepts `--help`/`-h` whenever it
|
|
11
|
+
* appears on a subcommand and calls `printCommandHelp(cmd, version)`. If
|
|
12
|
+
* the command has a dedicated help block, it is printed and `true` is
|
|
13
|
+
* returned. Otherwise `false` is returned so the caller can show a generic
|
|
14
|
+
* fallback that points users at the top-level `squad help`.
|
|
15
|
+
*/
|
|
16
|
+
/* eslint-disable no-console -- help printers stream to stdout via console.log,
|
|
17
|
+
matching the style of the top-level help block in cli-entry.ts. */
|
|
18
|
+
import { BOLD, DIM, RESET } from './output.js';
|
|
19
|
+
function header(cmd, version, tagline) {
|
|
20
|
+
console.log(`\n${BOLD}squad ${cmd}${RESET} v${version} — ${tagline}\n`);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Registry of per-command help printers. Adding a new command here is the
|
|
24
|
+
* one place that needs updating when a new subcommand is added to the CLI.
|
|
25
|
+
*/
|
|
26
|
+
const COMMAND_HELP = {
|
|
27
|
+
init: (version) => {
|
|
28
|
+
header('init', version, 'Initialize Squad in the current project');
|
|
29
|
+
console.log(`Usage: squad init [options]`);
|
|
30
|
+
console.log(` squad init --mode remote <team-repo-path>\n`);
|
|
31
|
+
console.log(`Creates a markdown-based squad layout under .squad/ plus default agent`);
|
|
32
|
+
console.log(`workflows under .github/. Safe to re-run — existing files are preserved.\n`);
|
|
33
|
+
console.log(`Options:`);
|
|
34
|
+
console.log(` ${BOLD}--sdk${RESET} Use SDK builder syntax (squad.config.ts)`);
|
|
35
|
+
console.log(` ${BOLD}--roles${RESET} Seed the team with built-in base roles`);
|
|
36
|
+
console.log(` ${BOLD}--global${RESET} Initialize in the personal (global) squad directory`);
|
|
37
|
+
console.log(` ${BOLD}--no-workflows${RESET} Skip writing GitHub Actions workflows`);
|
|
38
|
+
console.log(` ${BOLD}--preset <name>${RESET} Apply a curated preset after init`);
|
|
39
|
+
console.log(` ${BOLD}--state-backend <type>${RESET} State backend (local|orphan|two-layer)`);
|
|
40
|
+
console.log(` ${BOLD}--mode remote <path>${RESET} Point at an external team root (creates .squad/config.json)\n`);
|
|
41
|
+
},
|
|
42
|
+
upgrade: (version) => {
|
|
43
|
+
header('upgrade', version, 'Update Squad-owned files to the latest version');
|
|
44
|
+
console.log(`Usage: squad upgrade [options]\n`);
|
|
45
|
+
console.log(`Overwrites Squad-owned files (squad.agent.md, .squad/templates/) while`);
|
|
46
|
+
console.log(`leaving your team state under .squad/ and .ai-team/ untouched.\n`);
|
|
47
|
+
console.log(`Options:`);
|
|
48
|
+
console.log(` ${BOLD}--global${RESET} Upgrade the personal (global) squad`);
|
|
49
|
+
console.log(` ${BOLD}--migrate-directory${RESET} Rename legacy .ai-team/ to .squad/`);
|
|
50
|
+
console.log(` ${BOLD}--state-backend <type>${RESET} Migrate to a new backend (orphan|two-layer)`);
|
|
51
|
+
console.log(` ${BOLD}--self${RESET} Upgrade the squad CLI package itself`);
|
|
52
|
+
console.log(` ${BOLD}--insider${RESET} With --self, install the @insider tag`);
|
|
53
|
+
console.log(` ${BOLD}--force${RESET} Overwrite files without prompting\n`);
|
|
54
|
+
},
|
|
55
|
+
migrate: (version) => {
|
|
56
|
+
header('migrate', version, 'Convert between markdown and SDK-First squad formats');
|
|
57
|
+
console.log(`Usage: squad migrate --to sdk|markdown [options]\n`);
|
|
58
|
+
console.log(`Options:`);
|
|
59
|
+
console.log(` ${BOLD}--to sdk|markdown${RESET} Target format`);
|
|
60
|
+
console.log(` ${BOLD}--from ai-team${RESET} Source format (defaults to current)`);
|
|
61
|
+
console.log(` ${BOLD}--dry-run${RESET} Show planned changes without writing\n`);
|
|
62
|
+
},
|
|
63
|
+
status: (version) => {
|
|
64
|
+
header('status', version, 'Show which squad is active and why');
|
|
65
|
+
console.log(`Usage: squad status\n`);
|
|
66
|
+
console.log(`Reports the resolved squad directory, the resolution reason (repo vs.`);
|
|
67
|
+
console.log(`global), and the state of the personal squad path.\n`);
|
|
68
|
+
},
|
|
69
|
+
roles: (version) => {
|
|
70
|
+
header('roles', version, 'List built-in Squad roles');
|
|
71
|
+
console.log(`Usage: squad roles [--category <name>] [--search <query>]\n`);
|
|
72
|
+
console.log(`Options:`);
|
|
73
|
+
console.log(` ${BOLD}--category <name>${RESET} Filter to a single category`);
|
|
74
|
+
console.log(` ${BOLD}--search <query>${RESET} Match role name or description\n`);
|
|
75
|
+
},
|
|
76
|
+
cost: (version) => {
|
|
77
|
+
header('cost', version, 'Report token usage from orchestration logs');
|
|
78
|
+
console.log(`Usage: squad cost [options]\n`);
|
|
79
|
+
console.log(`Options:`);
|
|
80
|
+
console.log(` ${BOLD}--all${RESET} Include all logged sessions, not just recent`);
|
|
81
|
+
console.log(` ${BOLD}--agent <name>${RESET} Filter to a single agent\n`);
|
|
82
|
+
},
|
|
83
|
+
triage: (version) => printWatchHelp('triage', version),
|
|
84
|
+
watch: (version) => printWatchHelp('watch', version),
|
|
85
|
+
loop: (version) => {
|
|
86
|
+
header('loop', version, 'Prompt-driven continuous work loop');
|
|
87
|
+
console.log(`Usage: squad loop [options]\n`);
|
|
88
|
+
console.log(`Reads loop.md and runs it as a continuous work loop.\n`);
|
|
89
|
+
console.log(`Options:`);
|
|
90
|
+
console.log(` ${BOLD}--init${RESET} Generate a boilerplate loop.md`);
|
|
91
|
+
console.log(` ${BOLD}--file <path>${RESET} Path to loop file (default: loop.md)`);
|
|
92
|
+
console.log(` ${BOLD}--interval <min>${RESET} Override loop interval in minutes`);
|
|
93
|
+
console.log(` ${BOLD}--timeout <min>${RESET} Override max minutes per cycle`);
|
|
94
|
+
console.log(` ${BOLD}--copilot-flags "..."${RESET} Extra flags for Copilot CLI`);
|
|
95
|
+
console.log(` ${BOLD}--agent-cmd <cmd>${RESET} Override the agent command`);
|
|
96
|
+
console.log(`\nCapabilities (composable with the loop):`);
|
|
97
|
+
console.log(` ${BOLD}--self-pull${RESET} git fetch/pull at round start`);
|
|
98
|
+
console.log(` ${BOLD}--monitor-email${RESET} Scan email for actionable items`);
|
|
99
|
+
console.log(` ${BOLD}--monitor-teams${RESET} Scan Teams for actionable messages`);
|
|
100
|
+
console.log(` ${BOLD}--decision-hygiene${RESET} Auto-merge decision inbox`);
|
|
101
|
+
console.log(` ${BOLD}--retro${RESET} Enforce retrospective checks`);
|
|
102
|
+
console.log(`\nFrontmatter (in loop.md):`);
|
|
103
|
+
console.log(` configured: true ${DIM}(required — confirms intentional setup)${RESET}`);
|
|
104
|
+
console.log(` interval: 10 ${DIM}(minutes between cycles)${RESET}`);
|
|
105
|
+
console.log(` timeout: 30 ${DIM}(max minutes per cycle)${RESET}`);
|
|
106
|
+
console.log(` description: "..." ${DIM}(shown in status output)${RESET}`);
|
|
107
|
+
console.log(`\nExamples:`);
|
|
108
|
+
console.log(` squad loop ${DIM}# run loop.md${RESET}`);
|
|
109
|
+
console.log(` squad loop --init ${DIM}# generate boilerplate${RESET}`);
|
|
110
|
+
console.log(` squad loop --file ops/loop.md ${DIM}# custom loop file${RESET}`);
|
|
111
|
+
console.log(` squad loop --monitor-email ${DIM}# with email monitoring${RESET}`);
|
|
112
|
+
},
|
|
113
|
+
hire: (version) => {
|
|
114
|
+
header('hire', version, 'Team creation wizard');
|
|
115
|
+
console.log(`Usage: squad hire [--name <name>] [--role <role>]\n`);
|
|
116
|
+
console.log(`Interactive wizard that walks you through adding a new agent to the team.\n`);
|
|
117
|
+
console.log(`Options:`);
|
|
118
|
+
console.log(` ${BOLD}--name <name>${RESET} Pre-fill the agent name`);
|
|
119
|
+
console.log(` ${BOLD}--role <role>${RESET} Pre-select a built-in role (see 'squad roles')\n`);
|
|
120
|
+
},
|
|
121
|
+
copilot: (version) => {
|
|
122
|
+
header('copilot', version, 'Add or remove the Copilot coding agent (@copilot)');
|
|
123
|
+
console.log(`Usage: squad copilot [--off] [--auto-assign]\n`);
|
|
124
|
+
console.log(`Options:`);
|
|
125
|
+
console.log(` ${BOLD}--off${RESET} Remove the @copilot agent from the team`);
|
|
126
|
+
console.log(` ${BOLD}--auto-assign${RESET} Configure auto-assignment of issues to @copilot\n`);
|
|
127
|
+
},
|
|
128
|
+
plugin: (version) => {
|
|
129
|
+
header('plugin', version, 'Manage plugin marketplaces');
|
|
130
|
+
console.log(`Usage: squad plugin marketplace add|remove|list|browse\n`);
|
|
131
|
+
console.log(`Subcommands:`);
|
|
132
|
+
console.log(` ${BOLD}marketplace add <url>${RESET} Register a plugin marketplace`);
|
|
133
|
+
console.log(` ${BOLD}marketplace remove <name>${RESET} Unregister a marketplace`);
|
|
134
|
+
console.log(` ${BOLD}marketplace list${RESET} List registered marketplaces`);
|
|
135
|
+
console.log(` ${BOLD}marketplace browse${RESET} Browse available plugins\n`);
|
|
136
|
+
},
|
|
137
|
+
export: (version) => {
|
|
138
|
+
header('export', version, 'Export squad to a portable JSON snapshot');
|
|
139
|
+
console.log(`Usage: squad export [--out <path>]\n`);
|
|
140
|
+
console.log(`Options:`);
|
|
141
|
+
console.log(` ${BOLD}--out <path>${RESET} Output file (default: squad-export.json)\n`);
|
|
142
|
+
},
|
|
143
|
+
import: (version) => {
|
|
144
|
+
header('import', version, 'Import squad from an export file');
|
|
145
|
+
console.log(`Usage: squad import <file> [--force]\n`);
|
|
146
|
+
console.log(`Options:`);
|
|
147
|
+
console.log(` ${BOLD}--force${RESET} Overwrite existing files in target\n`);
|
|
148
|
+
},
|
|
149
|
+
'scrub-emails': (version) => {
|
|
150
|
+
header('scrub-emails', version, 'Remove email addresses from Squad state files');
|
|
151
|
+
console.log(`Usage: squad scrub-emails [directory]\n`);
|
|
152
|
+
console.log(`Defaults to scrubbing .ai-team/ (or .squad/) in the current directory.\n`);
|
|
153
|
+
},
|
|
154
|
+
start: (version) => {
|
|
155
|
+
header('start', version, 'Start Copilot with remote access from phone / browser');
|
|
156
|
+
console.log(`Usage: squad start [--tunnel] [--port <n>] [--command <cmd>] [copilot flags...]\n`);
|
|
157
|
+
console.log(`Options:`);
|
|
158
|
+
console.log(` ${BOLD}--tunnel${RESET} Expose the session over a public devtunnel`);
|
|
159
|
+
console.log(` ${BOLD}--port <n>${RESET} Bind to a specific local port`);
|
|
160
|
+
console.log(` ${BOLD}--command <cmd>${RESET} Override the agent command (default: copilot)\n`);
|
|
161
|
+
console.log(`Examples:`);
|
|
162
|
+
console.log(` squad start --tunnel --yolo`);
|
|
163
|
+
console.log(` squad start --tunnel --model claude-sonnet-4`);
|
|
164
|
+
console.log(` squad start --tunnel --command "gh copilot"\n`);
|
|
165
|
+
},
|
|
166
|
+
nap: (version) => {
|
|
167
|
+
header('nap', version, 'Context hygiene — compress, prune, archive .squad/ state');
|
|
168
|
+
console.log(`Usage: squad nap [--deep] [--dry-run]\n`);
|
|
169
|
+
console.log(`Options:`);
|
|
170
|
+
console.log(` ${BOLD}--deep${RESET} Thorough cleanup, including older history`);
|
|
171
|
+
console.log(` ${BOLD}--dry-run${RESET} Preview changes without writing\n`);
|
|
172
|
+
},
|
|
173
|
+
memory: (version) => {
|
|
174
|
+
header('memory', version, 'Governed memory operations');
|
|
175
|
+
console.log(`Usage: squad memory <subcommand> [options]\n`);
|
|
176
|
+
console.log(`Common subcommands:`);
|
|
177
|
+
console.log(` ${BOLD}write --content "..." --class LOCAL${RESET} Write a memory entry`);
|
|
178
|
+
console.log(` ${BOLD}list${RESET} List memory entries`);
|
|
179
|
+
console.log(` ${BOLD}read <id>${RESET} Read a single entry\n`);
|
|
180
|
+
console.log(`Diagnostics:`);
|
|
181
|
+
console.log(` ${BOLD}--log-level info|debug${RESET} Increase log verbosity`);
|
|
182
|
+
console.log(` ${BOLD}--verbose${RESET} Shortcut for --log-level debug\n`);
|
|
183
|
+
},
|
|
184
|
+
'state-mcp': (version) => {
|
|
185
|
+
header('state-mcp', version, 'MCP bridge exposing Squad runtime state tools');
|
|
186
|
+
console.log(`Usage: squad state-mcp\n`);
|
|
187
|
+
console.log(`Starts a Model Context Protocol server over stdio that exposes Squad`);
|
|
188
|
+
console.log(`state read/write tools to MCP-compatible hosts.\n`);
|
|
189
|
+
},
|
|
190
|
+
doctor: (version) => {
|
|
191
|
+
header('doctor', version, 'Validate squad setup');
|
|
192
|
+
console.log(`Usage: squad doctor\n`);
|
|
193
|
+
console.log(`Checks for required files, valid config, and a reachable Copilot CLI.`);
|
|
194
|
+
console.log(`Exits non-zero if any required check fails.\n`);
|
|
195
|
+
},
|
|
196
|
+
consult: (version) => {
|
|
197
|
+
header('consult', version, 'Enter consult mode with your personal squad');
|
|
198
|
+
console.log(`Usage: squad consult [--status] [--check]\n`);
|
|
199
|
+
console.log(`Options:`);
|
|
200
|
+
console.log(` ${BOLD}--status${RESET} Show consult session status`);
|
|
201
|
+
console.log(` ${BOLD}--check${RESET} Run consult-mode prerequisites check\n`);
|
|
202
|
+
},
|
|
203
|
+
extract: (version) => {
|
|
204
|
+
header('extract', version, 'Extract learnings from a consult-mode session');
|
|
205
|
+
console.log(`Usage: squad extract [options]\n`);
|
|
206
|
+
console.log(`Options:`);
|
|
207
|
+
console.log(` ${BOLD}--dry-run${RESET} Preview the extracted learnings`);
|
|
208
|
+
console.log(` ${BOLD}--clean${RESET} Remove transient session files after extract`);
|
|
209
|
+
console.log(` ${BOLD}--yes${RESET} Skip interactive confirmations`);
|
|
210
|
+
console.log(` ${BOLD}--accept-risks${RESET} Acknowledge data-handling implications\n`);
|
|
211
|
+
},
|
|
212
|
+
subsquads: (version) => {
|
|
213
|
+
header('subsquads', version, 'Manage Squad SubSquads (multi-Codespace scaling)');
|
|
214
|
+
console.log(`Usage: squad subsquads <list|status|activate <name>>\n`);
|
|
215
|
+
console.log(`Aliases (deprecated): ${BOLD}workstreams${RESET}, ${BOLD}streams${RESET}\n`);
|
|
216
|
+
},
|
|
217
|
+
link: (version) => {
|
|
218
|
+
header('link', version, 'Link this project to a remote team root');
|
|
219
|
+
console.log(`Usage: squad link <team-repo-path>\n`);
|
|
220
|
+
},
|
|
221
|
+
build: (version) => {
|
|
222
|
+
header('build', version, 'Compile squad.config.ts into .squad/ markdown');
|
|
223
|
+
console.log(`Usage: squad build [options]\n`);
|
|
224
|
+
console.log(`Options:`);
|
|
225
|
+
console.log(` ${BOLD}--check${RESET} Validate only, do not write files`);
|
|
226
|
+
console.log(` ${BOLD}--dry-run${RESET} Preview the generated markdown`);
|
|
227
|
+
console.log(` ${BOLD}--watch${RESET} Rebuild on changes to squad.config.ts\n`);
|
|
228
|
+
},
|
|
229
|
+
aspire: (version) => {
|
|
230
|
+
header('aspire', version, 'Launch the .NET Aspire dashboard for observability');
|
|
231
|
+
console.log(`Usage: squad aspire [options]\n`);
|
|
232
|
+
console.log(`Options:`);
|
|
233
|
+
console.log(` ${BOLD}--docker${RESET} Force the Docker launch path`);
|
|
234
|
+
console.log(` ${BOLD}--port <n>${RESET} Bind the dashboard to a specific port\n`);
|
|
235
|
+
},
|
|
236
|
+
schedule: (version) => {
|
|
237
|
+
header('schedule', version, 'Manage scheduled Squad tasks');
|
|
238
|
+
console.log(`Usage: squad schedule <list|run <id>|init|status>\n`);
|
|
239
|
+
},
|
|
240
|
+
personal: (version) => {
|
|
241
|
+
header('personal', version, 'Manage your personal squad (ambient agents)');
|
|
242
|
+
console.log(`Usage: squad personal <init|list|add <name>|remove <name>> [options]\n`);
|
|
243
|
+
console.log(`Options:`);
|
|
244
|
+
console.log(` ${BOLD}--role <role>${RESET} Built-in role to attach (see 'squad roles')\n`);
|
|
245
|
+
},
|
|
246
|
+
preset: (version) => {
|
|
247
|
+
header('preset', version, 'Manage squad presets (curated agent collections)');
|
|
248
|
+
console.log(`Usage: squad preset <list|show <name>|apply <name>|save <name>|init> [options]\n`);
|
|
249
|
+
console.log(`Options:`);
|
|
250
|
+
console.log(` ${BOLD}--force${RESET} Overwrite existing agents on apply`);
|
|
251
|
+
console.log(` ${BOLD}--remote${RESET} init: back presets with a GitHub repo\n`);
|
|
252
|
+
},
|
|
253
|
+
cast: (version) => {
|
|
254
|
+
header('cast', version, 'Show the current session cast (project + personal agents)');
|
|
255
|
+
console.log(`Usage: squad cast\n`);
|
|
256
|
+
},
|
|
257
|
+
rc: (version) => printRcHelp('rc', version),
|
|
258
|
+
'remote-control': (version) => printRcHelp('remote-control', version),
|
|
259
|
+
'copilot-bridge': (version) => {
|
|
260
|
+
header('copilot-bridge', version, 'Check Copilot ACP stdio compatibility');
|
|
261
|
+
console.log(`Usage: squad copilot-bridge\n`);
|
|
262
|
+
},
|
|
263
|
+
'init-remote': (version) => {
|
|
264
|
+
header('init-remote', version, 'Link project to a remote team root (shorthand)');
|
|
265
|
+
console.log(`Usage: squad init-remote <team-repo-path>\n`);
|
|
266
|
+
},
|
|
267
|
+
'rc-tunnel': (version) => {
|
|
268
|
+
header('rc-tunnel', version, 'Check devtunnel CLI availability');
|
|
269
|
+
console.log(`Usage: squad rc-tunnel\n`);
|
|
270
|
+
},
|
|
271
|
+
discover: (version) => {
|
|
272
|
+
header('discover', version, 'List known squads and their capabilities');
|
|
273
|
+
console.log(`Usage: squad discover\n`);
|
|
274
|
+
},
|
|
275
|
+
delegate: (version) => {
|
|
276
|
+
header('delegate', version, 'Create work in another squad');
|
|
277
|
+
console.log(`Usage: squad delegate <squad-name> <description>\n`);
|
|
278
|
+
},
|
|
279
|
+
upstream: (version) => {
|
|
280
|
+
header('upstream', version, 'Manage upstream Squad sources');
|
|
281
|
+
console.log(`Usage: squad upstream <add|remove|list|sync> [options]\n`);
|
|
282
|
+
console.log(`Examples:`);
|
|
283
|
+
console.log(` squad upstream add <source> [--name <n>] [--ref <branch>]`);
|
|
284
|
+
console.log(` squad upstream remove <name>`);
|
|
285
|
+
console.log(` squad upstream list`);
|
|
286
|
+
console.log(` squad upstream sync [name]\n`);
|
|
287
|
+
},
|
|
288
|
+
economy: (version) => {
|
|
289
|
+
header('economy', version, 'Toggle economy mode (cost-conscious model selection)');
|
|
290
|
+
console.log(`Usage: squad economy [on|off]\n`);
|
|
291
|
+
},
|
|
292
|
+
externalize: (version) => {
|
|
293
|
+
header('externalize', version, 'Move local squad state to an external team root');
|
|
294
|
+
console.log(`Usage: squad externalize\n`);
|
|
295
|
+
},
|
|
296
|
+
internalize: (version) => {
|
|
297
|
+
header('internalize', version, 'Pull an external team root back into the project');
|
|
298
|
+
console.log(`Usage: squad internalize\n`);
|
|
299
|
+
},
|
|
300
|
+
config: (version) => {
|
|
301
|
+
header('config', version, 'Manage Squad configuration');
|
|
302
|
+
console.log(`Usage: squad config <subcommand> [options]\n`);
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
function printWatchHelp(name, version) {
|
|
306
|
+
header(name, version, 'Scan for work and categorize issues');
|
|
307
|
+
console.log(`Usage: squad ${name} [--interval <minutes>] [--execute] [options]\n`);
|
|
308
|
+
console.log(`Default: checks every 10 minutes (Ctrl+C to stop).\n`);
|
|
309
|
+
console.log(`Core flags:`);
|
|
310
|
+
console.log(` ${BOLD}--execute${RESET} Spawn agents to work on issues`);
|
|
311
|
+
console.log(` ${BOLD}--copilot-flags "..."${RESET} Extra flags for Copilot CLI`);
|
|
312
|
+
console.log(` ${BOLD}--max-concurrent N${RESET} Parallel issue limit (default 1)`);
|
|
313
|
+
console.log(` ${BOLD}--timeout N${RESET} Max minutes per issue (default 30)`);
|
|
314
|
+
console.log(` ${BOLD}--interval <minutes>${RESET} Polling interval (default 10)`);
|
|
315
|
+
console.log(` ${BOLD}--health${RESET} (watch only) print watch instance status\n`);
|
|
316
|
+
console.log(`Capabilities (opt-in via --<name> or .squad/config.json):`);
|
|
317
|
+
console.log(` ${BOLD}--self-pull${RESET} git fetch/pull at round start`);
|
|
318
|
+
console.log(` ${BOLD}--board${RESET} Project board lifecycle + reconciliation`);
|
|
319
|
+
console.log(` ${BOLD}--board-project N${RESET} Project board number (default 1)`);
|
|
320
|
+
console.log(` ${BOLD}--monitor-teams${RESET} Scan Teams for actionable messages`);
|
|
321
|
+
console.log(` ${BOLD}--monitor-email${RESET} Scan email for actionable items`);
|
|
322
|
+
console.log(` ${BOLD}--two-pass${RESET} Lightweight list then hydrate actionable`);
|
|
323
|
+
console.log(` ${BOLD}--wave-dispatch${RESET} Wave-based parallel sub-task dispatch`);
|
|
324
|
+
console.log(` ${BOLD}--retro${RESET} Enforce retrospective checks`);
|
|
325
|
+
console.log(` ${BOLD}--decision-hygiene${RESET} Auto-merge decision inbox\n`);
|
|
326
|
+
console.log(`Disable any capability with ${BOLD}--no-<capability>${RESET}.`);
|
|
327
|
+
console.log(`Logging: ${BOLD}--log-file <path>${RESET} Tee output to file with timestamps\n`);
|
|
328
|
+
}
|
|
329
|
+
function printRcHelp(name, version) {
|
|
330
|
+
header(name, version, 'Start the Remote Control bridge (phone / browser → Copilot)');
|
|
331
|
+
console.log(`Usage: squad ${name} [--tunnel] [--port <n>] [--path <dir>]\n`);
|
|
332
|
+
console.log(`Options:`);
|
|
333
|
+
console.log(` ${BOLD}--tunnel${RESET} Expose the bridge over a public devtunnel`);
|
|
334
|
+
console.log(` ${BOLD}--port <n>${RESET} Bind to a specific local port`);
|
|
335
|
+
console.log(` ${BOLD}--path <dir>${RESET} Squad path to expose (default: cwd)\n`);
|
|
336
|
+
console.log(`${DIM}Note: this command is deprecated; prefer "gh copilot".${RESET}\n`);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Map of command aliases to their canonical name in the help registry.
|
|
340
|
+
*
|
|
341
|
+
* The CLI router in `cli-entry.ts` accepts several aliases for the same
|
|
342
|
+
* command (e.g. `streams` / `workstreams` both route to `subsquads`). The
|
|
343
|
+
* help registry is keyed by the canonical name only, so alias lookups must
|
|
344
|
+
* be normalized before the registry lookup — otherwise `squad streams --help`
|
|
345
|
+
* falls through to the generic fallback instead of showing the dedicated
|
|
346
|
+
* subsquads help block.
|
|
347
|
+
*
|
|
348
|
+
* Keep this in sync with the alias `||` chains in `cli-entry.ts` (search
|
|
349
|
+
* for `cmd === '<alias>'`). Canonical commands that already have a
|
|
350
|
+
* dedicated entry in `COMMAND_HELP` (e.g. `rc` and `remote-control` both
|
|
351
|
+
* have explicit help blocks) do NOT need an entry here.
|
|
352
|
+
*/
|
|
353
|
+
const COMMAND_ALIASES = {
|
|
354
|
+
streams: 'subsquads',
|
|
355
|
+
workstreams: 'subsquads',
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Normalize a CLI command alias to its canonical name for help-registry
|
|
359
|
+
* lookup. Returns the input unchanged when no alias mapping applies.
|
|
360
|
+
*
|
|
361
|
+
* Exported for testing. The runtime caller (`printCommandHelp`) applies
|
|
362
|
+
* this automatically.
|
|
363
|
+
*/
|
|
364
|
+
export function normalizeCommandAlias(cmd) {
|
|
365
|
+
return COMMAND_ALIASES[cmd] ?? cmd;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Print help for `cmd` if a dedicated help block exists.
|
|
369
|
+
* Returns `true` when help was printed, `false` otherwise so the caller can
|
|
370
|
+
* fall back to a generic "see `squad help`" message.
|
|
371
|
+
*
|
|
372
|
+
* Aliases (see `COMMAND_ALIASES`) are normalized to their canonical command
|
|
373
|
+
* before the registry lookup, so `printCommandHelp('streams', v)` prints
|
|
374
|
+
* the `subsquads` help block.
|
|
375
|
+
*/
|
|
376
|
+
export function printCommandHelp(cmd, version) {
|
|
377
|
+
const canonical = normalizeCommandAlias(cmd);
|
|
378
|
+
const printer = COMMAND_HELP[canonical];
|
|
379
|
+
if (!printer) {
|
|
380
|
+
return false;
|
|
381
|
+
}
|
|
382
|
+
printer(version);
|
|
383
|
+
return true;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Print a friendly generic fallback for commands that don't have a dedicated
|
|
387
|
+
* help block yet. Always exits without side effects.
|
|
388
|
+
*/
|
|
389
|
+
export function printGenericCommandHelp(cmd) {
|
|
390
|
+
console.log(`\n${BOLD}squad ${cmd}${RESET}\n`);
|
|
391
|
+
console.log(`No detailed help is available for '${cmd}'.`);
|
|
392
|
+
console.log(`Run '${BOLD}squad help${RESET}' for the full command list and usage.\n`);
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Test helper: list the commands that have dedicated help blocks. Used by
|
|
396
|
+
* unit tests to guard against regression when new commands are added.
|
|
397
|
+
*/
|
|
398
|
+
export function commandsWithHelp() {
|
|
399
|
+
return Object.keys(COMMAND_HELP).sort();
|
|
400
|
+
}
|
|
401
|
+
//# sourceMappingURL=command-help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-help.js","sourceRoot":"","sources":["../../../src/cli/core/command-help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;qEACqE;AAErE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAI/C,SAAS,MAAM,CAAC,GAAW,EAAE,OAAe,EAAE,OAAe;IAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,SAAS,GAAG,GAAG,KAAK,KAAK,OAAO,MAAM,OAAO,IAAI,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,YAAY,GAAgC;IAChD,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;QAChB,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,yCAAyC,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO,CAAC,GAAG,CAAC,4EAA4E,CAAC,CAAC;QAC1F,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,QAAQ,KAAK,iEAAiE,C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AC,GAAG,CAAC,QAAQ,IAAI,aAAa,KAAK,0CAA0C,CAAC,CAAC;AACxF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for spawning the Copilot CLI from squad-managed code paths.
|
|
3
|
+
*
|
|
4
|
+
* Background — iter-9 finding: Copilot CLI 1.0.59 does NOT auto-load the
|
|
5
|
+
* workspace `.mcp.json` in non-interactive (`-p`) mode due to a folder-trust
|
|
6
|
+
* security gate (`FH.isFolderTrusted()`). The gate cannot be satisfied without
|
|
7
|
+
* a UI prompt, so the `squad_state` MCP entry written by `squad init` /
|
|
8
|
+
* `squad upgrade` to the repo-root `.mcp.json` is silently ignored every time
|
|
9
|
+
* squad spawns `copilot -p` — leaving `squad_state_*` tools unwired.
|
|
10
|
+
*
|
|
11
|
+
* Mitigation: every squad-internal `copilot` spawn prepends two flags:
|
|
12
|
+
* 1. `--yolo` — suppresses the per-tool-call consent prompt that would
|
|
13
|
+
* otherwise block non-interactive (`-p`) automation.
|
|
14
|
+
* 2. `--additional-mcp-config @<abs-path>` — explicitly loads the project's
|
|
15
|
+
* `.mcp.json` so `squad_state_*` tools register for that session.
|
|
16
|
+
*
|
|
17
|
+
* We only inject when:
|
|
18
|
+
* - the command being spawned is the bare `copilot` binary (i.e. the user
|
|
19
|
+
* did not override via `--agent-cmd`)
|
|
20
|
+
* - a `.mcp.json` file actually exists at `teamRoot`
|
|
21
|
+
*
|
|
22
|
+
* Empirical test matrix (Copilot CLI 1.0.59):
|
|
23
|
+
* copilot -p "..." → ❌ workspace MCP NOT loaded
|
|
24
|
+
* copilot --yolo -p "..." → ❌ workspace MCP NOT loaded
|
|
25
|
+
* copilot --yolo --autopilot -p "..." → ❌ workspace MCP NOT loaded
|
|
26
|
+
* copilot --additional-mcp-config @.mcp.json --yolo -p → ✅ PROVEN WORKAROUND
|
|
27
|
+
* interactive copilot → "Trust folder?" → Yes → ✅ loads (not automatable)
|
|
28
|
+
*
|
|
29
|
+
* See `.squad/files/validation/COMBINED-FIX-BRANCH-MANIFEST.md` (iter-9) for
|
|
30
|
+
* the full empirical proof that this exact flag combination is required.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Build the extra CLI args needed to make the Copilot CLI load this project's
|
|
34
|
+
* `.mcp.json` for a non-interactive (`-p`) spawned session.
|
|
35
|
+
*
|
|
36
|
+
* Returns `['--yolo', '--additional-mcp-config', '@<abs-path>']` when
|
|
37
|
+
* injection is applicable, or an empty array when:
|
|
38
|
+
* - a custom agent command was specified (not the bare `copilot` binary), or
|
|
39
|
+
* - `teamRoot` is falsy, or
|
|
40
|
+
* - `.mcp.json` does not exist under `teamRoot` (squad init not run, repo
|
|
41
|
+
* downgraded, etc.) — a console warning is emitted in that case.
|
|
42
|
+
*
|
|
43
|
+
* The `@<path>` form is used (rather than inline JSON) to avoid argv quoting
|
|
44
|
+
* issues with multi-line JSON on Windows.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildAdditionalMcpConfigArgs(cmd: string, teamRoot: string | undefined): string[];
|
|
47
|
+
/**
|
|
48
|
+
* Prepend the MCP-config + yolo args to `args`. Returns the full argv list to
|
|
49
|
+
* pass to spawn/execFile for the given cmd. The injection slots these flags
|
|
50
|
+
* BEFORE other args so positional `-p <prompt>` still works correctly.
|
|
51
|
+
*
|
|
52
|
+
* If `--yolo` is already present in `args` (e.g. user supplied it via
|
|
53
|
+
* `copilotFlags`), the duplicate is stripped from `args` before prepending to
|
|
54
|
+
* avoid passing `--yolo` twice.
|
|
55
|
+
*/
|
|
56
|
+
export declare function withAdditionalMcpConfig(cmd: string, args: string[], teamRoot: string | undefined): string[];
|
|
57
|
+
//# sourceMappingURL=copilot-invocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-invocation.d.ts","sourceRoot":"","sources":["../../../src/cli/core/copilot-invocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAiBhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,EAAE,CAMV"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for spawning the Copilot CLI from squad-managed code paths.
|
|
3
|
+
*
|
|
4
|
+
* Background — iter-9 finding: Copilot CLI 1.0.59 does NOT auto-load the
|
|
5
|
+
* workspace `.mcp.json` in non-interactive (`-p`) mode due to a folder-trust
|
|
6
|
+
* security gate (`FH.isFolderTrusted()`). The gate cannot be satisfied without
|
|
7
|
+
* a UI prompt, so the `squad_state` MCP entry written by `squad init` /
|
|
8
|
+
* `squad upgrade` to the repo-root `.mcp.json` is silently ignored every time
|
|
9
|
+
* squad spawns `copilot -p` — leaving `squad_state_*` tools unwired.
|
|
10
|
+
*
|
|
11
|
+
* Mitigation: every squad-internal `copilot` spawn prepends two flags:
|
|
12
|
+
* 1. `--yolo` — suppresses the per-tool-call consent prompt that would
|
|
13
|
+
* otherwise block non-interactive (`-p`) automation.
|
|
14
|
+
* 2. `--additional-mcp-config @<abs-path>` — explicitly loads the project's
|
|
15
|
+
* `.mcp.json` so `squad_state_*` tools register for that session.
|
|
16
|
+
*
|
|
17
|
+
* We only inject when:
|
|
18
|
+
* - the command being spawned is the bare `copilot` binary (i.e. the user
|
|
19
|
+
* did not override via `--agent-cmd`)
|
|
20
|
+
* - a `.mcp.json` file actually exists at `teamRoot`
|
|
21
|
+
*
|
|
22
|
+
* Empirical test matrix (Copilot CLI 1.0.59):
|
|
23
|
+
* copilot -p "..." → ❌ workspace MCP NOT loaded
|
|
24
|
+
* copilot --yolo -p "..." → ❌ workspace MCP NOT loaded
|
|
25
|
+
* copilot --yolo --autopilot -p "..." → ❌ workspace MCP NOT loaded
|
|
26
|
+
* copilot --additional-mcp-config @.mcp.json --yolo -p → ✅ PROVEN WORKAROUND
|
|
27
|
+
* interactive copilot → "Trust folder?" → Yes → ✅ loads (not automatable)
|
|
28
|
+
*
|
|
29
|
+
* See `.squad/files/validation/COMBINED-FIX-BRANCH-MANIFEST.md` (iter-9) for
|
|
30
|
+
* the full empirical proof that this exact flag combination is required.
|
|
31
|
+
*/
|
|
32
|
+
import path from 'node:path';
|
|
33
|
+
import { existsSync } from 'node:fs';
|
|
34
|
+
/**
|
|
35
|
+
* Build the extra CLI args needed to make the Copilot CLI load this project's
|
|
36
|
+
* `.mcp.json` for a non-interactive (`-p`) spawned session.
|
|
37
|
+
*
|
|
38
|
+
* Returns `['--yolo', '--additional-mcp-config', '@<abs-path>']` when
|
|
39
|
+
* injection is applicable, or an empty array when:
|
|
40
|
+
* - a custom agent command was specified (not the bare `copilot` binary), or
|
|
41
|
+
* - `teamRoot` is falsy, or
|
|
42
|
+
* - `.mcp.json` does not exist under `teamRoot` (squad init not run, repo
|
|
43
|
+
* downgraded, etc.) — a console warning is emitted in that case.
|
|
44
|
+
*
|
|
45
|
+
* The `@<path>` form is used (rather than inline JSON) to avoid argv quoting
|
|
46
|
+
* issues with multi-line JSON on Windows.
|
|
47
|
+
*/
|
|
48
|
+
export function buildAdditionalMcpConfigArgs(cmd, teamRoot) {
|
|
49
|
+
if (cmd !== 'copilot')
|
|
50
|
+
return [];
|
|
51
|
+
if (!teamRoot)
|
|
52
|
+
return [];
|
|
53
|
+
const configPath = path.join(teamRoot, '.mcp.json');
|
|
54
|
+
try {
|
|
55
|
+
if (!existsSync(configPath)) {
|
|
56
|
+
console.warn(`[squad] ⚠ .mcp.json not found at ${configPath}. ` +
|
|
57
|
+
`Run \`squad init\` or \`squad upgrade\` to create it. ` +
|
|
58
|
+
`squad_state_* tools will NOT be available in this session.`);
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
return ['--yolo', '--additional-mcp-config', `@${configPath}`];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Prepend the MCP-config + yolo args to `args`. Returns the full argv list to
|
|
69
|
+
* pass to spawn/execFile for the given cmd. The injection slots these flags
|
|
70
|
+
* BEFORE other args so positional `-p <prompt>` still works correctly.
|
|
71
|
+
*
|
|
72
|
+
* If `--yolo` is already present in `args` (e.g. user supplied it via
|
|
73
|
+
* `copilotFlags`), the duplicate is stripped from `args` before prepending to
|
|
74
|
+
* avoid passing `--yolo` twice.
|
|
75
|
+
*/
|
|
76
|
+
export function withAdditionalMcpConfig(cmd, args, teamRoot) {
|
|
77
|
+
const extra = buildAdditionalMcpConfigArgs(cmd, teamRoot);
|
|
78
|
+
if (extra.length === 0)
|
|
79
|
+
return args;
|
|
80
|
+
// Strip any user-supplied --yolo to avoid passing it twice.
|
|
81
|
+
const cleanArgs = args.filter(a => a !== '--yolo');
|
|
82
|
+
return [...extra, ...cleanArgs];
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=copilot-invocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-invocation.js","sourceRoot":"","sources":["../../../src/cli/core/copilot-invocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,4BAA4B,CAAC,GAAW,EAAE,QAA4B;IACpF,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjC,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,CACV,qCAAqC,UAAU,IAAI;gBACjD,wDAAwD;gBACxD,4DAA4D,CAC/D,CAAC;YACF,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE,yBAAyB,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CACrC,GAAW,EACX,IAAc,EACd,QAA4B;IAE5B,MAAM,KAAK,GAAG,4BAA4B,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC1D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,4DAA4D;IAC5D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Effective squad directory resolution — external state aware.
|
|
3
|
+
*
|
|
4
|
+
* Wraps detectSquadDir() to follow the config.json stateLocation marker
|
|
5
|
+
* when state has been externalized via `squad externalize`.
|
|
6
|
+
*
|
|
7
|
+
* @module cli/core/effective-squad-dir
|
|
8
|
+
*/
|
|
9
|
+
import { type SquadDirInfo } from './detect-squad-dir.js';
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the effective state directory from a local .squad/ path.
|
|
12
|
+
*
|
|
13
|
+
* If `.squad/config.json` has `stateLocation: 'external'` and a valid
|
|
14
|
+
* `projectKey`, returns the external state directory. Otherwise returns
|
|
15
|
+
* the original `squadDirPath` unchanged.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveStateDir(squadDirPath: string): string;
|
|
18
|
+
export interface EffectiveSquadDirs {
|
|
19
|
+
/** The local .squad/ directory info (for config.json and non-state files) */
|
|
20
|
+
local: SquadDirInfo;
|
|
21
|
+
/** The effective state directory (external dir when externalized, otherwise local .squad/) */
|
|
22
|
+
stateDir: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Detect the squad directory and resolve the effective state dir.
|
|
26
|
+
*
|
|
27
|
+
* Combines detectSquadDir() (zero-dependency bootstrap) with external
|
|
28
|
+
* state resolution from config.json. Use `stateDir` for reading state
|
|
29
|
+
* files (team.md, routing.md, agents/, plugins/, etc.) and `local.path`
|
|
30
|
+
* for non-state files that remain in the working tree.
|
|
31
|
+
*/
|
|
32
|
+
export declare function effectiveSquadDir(dest: string): EffectiveSquadDirs;
|
|
33
|
+
//# sourceMappingURL=effective-squad-dir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-squad-dir.d.ts","sourceRoot":"","sources":["../../../src/cli/core/effective-squad-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,EAAE,YAAY,CAAC;IACpB,8FAA8F;IAC9F,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAGlE"}
|