squadrant 0.20.0 → 0.20.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/dist/index.js +57 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14659,7 +14659,57 @@ function writePerCrewOpencodeConfig(o) {
|
|
|
14659
14659
|
websearch: "allow",
|
|
14660
14660
|
task: "allow",
|
|
14661
14661
|
lsp: "allow",
|
|
14662
|
-
external_directory
|
|
14662
|
+
// unlike most permission keys, external_directory defaults to "ask" in
|
|
14663
|
+
// opencode. The catch-all is deliberately "ask" (not "allow") so unknown
|
|
14664
|
+
// external paths stay human-gated — least privilege. Trusted AI/config/
|
|
14665
|
+
// memory/tmp dirs are allow-listed explicitly below; each dir is listed
|
|
14666
|
+
// both as the bare path AND as `<dir>/**`, so the directory itself is
|
|
14667
|
+
// reachable, not only its contents.
|
|
14668
|
+
//
|
|
14669
|
+
// Ordering: opencode evaluates patterns last-match-wins, so the catch-all
|
|
14670
|
+
// goes FIRST and the specific allows follow. If a future version resolves
|
|
14671
|
+
// first-match instead, the failure mode is over-prompting (visible, safe)
|
|
14672
|
+
// rather than a silent allow-all (invisible, unsafe).
|
|
14673
|
+
external_directory: {
|
|
14674
|
+
"**": "ask",
|
|
14675
|
+
"/tmp": "allow",
|
|
14676
|
+
"/tmp/**": "allow",
|
|
14677
|
+
"/private/tmp": "allow",
|
|
14678
|
+
"/private/tmp/**": "allow",
|
|
14679
|
+
"/var/folders": "allow",
|
|
14680
|
+
"/var/folders/**": "allow",
|
|
14681
|
+
"~/.config/squadrant": "allow",
|
|
14682
|
+
"~/.config/squadrant/**": "allow",
|
|
14683
|
+
"~/.config/opencode": "allow",
|
|
14684
|
+
"~/.config/opencode/**": "allow",
|
|
14685
|
+
"~/.config/cmux": "allow",
|
|
14686
|
+
"~/.config/cmux/**": "allow",
|
|
14687
|
+
"~/.opencode": "allow",
|
|
14688
|
+
"~/.opencode/**": "allow",
|
|
14689
|
+
"~/.local/share/opencode": "allow",
|
|
14690
|
+
"~/.local/share/opencode/**": "allow",
|
|
14691
|
+
"~/.local/share/claude": "allow",
|
|
14692
|
+
"~/.local/share/claude/**": "allow",
|
|
14693
|
+
"~/.cache/opencode": "allow",
|
|
14694
|
+
"~/.cache/opencode/**": "allow",
|
|
14695
|
+
"~/.claude": "allow",
|
|
14696
|
+
"~/.claude/**": "allow",
|
|
14697
|
+
"~/.claude.json": "allow",
|
|
14698
|
+
"~/squadrant-hub": "allow",
|
|
14699
|
+
"~/squadrant-hub/**": "allow",
|
|
14700
|
+
"~/.claude-mem": "allow",
|
|
14701
|
+
"~/.claude-mem/**": "allow",
|
|
14702
|
+
"~/.agents": "allow",
|
|
14703
|
+
"~/.agents/**": "allow",
|
|
14704
|
+
"~/.cmuxterm": "allow",
|
|
14705
|
+
"~/.cmuxterm/**": "allow",
|
|
14706
|
+
"~/.codex": "allow",
|
|
14707
|
+
"~/.codex/**": "allow",
|
|
14708
|
+
"~/.cursor": "allow",
|
|
14709
|
+
"~/.cursor/**": "allow",
|
|
14710
|
+
"~/.gemini": "allow",
|
|
14711
|
+
"~/.gemini/**": "allow"
|
|
14712
|
+
}
|
|
14663
14713
|
}
|
|
14664
14714
|
};
|
|
14665
14715
|
writeFileSync11(file, JSON.stringify(config, null, 2));
|
|
@@ -18016,6 +18066,10 @@ var launchCommand = new Command14("launch").description(
|
|
|
18016
18066
|
hadFailure = true;
|
|
18017
18067
|
return;
|
|
18018
18068
|
}
|
|
18069
|
+
let captainOpencodeConfigPath;
|
|
18070
|
+
if (isOpencodeCaptain && projectName) {
|
|
18071
|
+
captainOpencodeConfigPath = writePerCrewOpencodeConfig({ stateRoot, project: projectName, taskId: "captain" });
|
|
18072
|
+
}
|
|
18019
18073
|
const priorRecord = projectName ? readCaptainAddress(stateRoot, projectName) : null;
|
|
18020
18074
|
const captainPort = isOpencodeCaptain ? await getFreePort() : void 0;
|
|
18021
18075
|
let opencodeResumeSessionId;
|
|
@@ -18036,7 +18090,7 @@ var launchCommand = new Command14("launch").description(
|
|
|
18036
18090
|
}
|
|
18037
18091
|
const captainBoot = isOpencodeCaptain ? { port: captainPort, sessionId: pickResumeSessionId(priorRecord, "opencode", forceFresh) } : void 0;
|
|
18038
18092
|
opencodeResumeSessionId = captainBoot?.sessionId;
|
|
18039
|
-
|
|
18093
|
+
const baseCmd = buildAgentCmd(
|
|
18040
18094
|
agentName,
|
|
18041
18095
|
registry,
|
|
18042
18096
|
role,
|
|
@@ -18049,6 +18103,7 @@ var launchCommand = new Command14("launch").description(
|
|
|
18049
18103
|
thinking,
|
|
18050
18104
|
captainBoot
|
|
18051
18105
|
);
|
|
18106
|
+
return captainOpencodeConfigPath ? `OPENCODE_CONFIG=${captainOpencodeConfigPath} ${baseCmd}` : baseCmd;
|
|
18052
18107
|
},
|
|
18053
18108
|
initialPrompt,
|
|
18054
18109
|
runtime,
|