@sweny-ai/core 0.1.153 → 0.1.155
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/harness/acp.js
CHANGED
|
@@ -727,6 +727,9 @@ export class AcpHarness {
|
|
|
727
727
|
tools: req.tools,
|
|
728
728
|
context: this.defaultContext,
|
|
729
729
|
logger: this.logger,
|
|
730
|
+
// Wrapped, the shim cannot open the unix socket (srt blocks AF_UNIX on
|
|
731
|
+
// Linux); it tunnels to a loopback port through the sandbox proxy (#439).
|
|
732
|
+
tcp: wrapper !== undefined,
|
|
730
733
|
...(this.toolBridgeShim ? { shimCommand: this.toolBridgeShim } : {}),
|
|
731
734
|
});
|
|
732
735
|
// The token rides in the shim's own env entry of session/new, never in argv.
|
|
@@ -762,7 +765,8 @@ export class AcpHarness {
|
|
|
762
765
|
policy,
|
|
763
766
|
spawn: { command: this.agent.command, args: this.agent.args, env, cwd: this.cwd },
|
|
764
767
|
wrapper: wrapper ?? null,
|
|
765
|
-
|
|
768
|
+
// The bridge's loopback endpoint (wrapped runs only): the one extra host the shim needs.
|
|
769
|
+
harnessEgress: [...this.egress, ...(bridge?.egress ?? [])],
|
|
766
770
|
env: process.env,
|
|
767
771
|
});
|
|
768
772
|
degraded = prep.degraded;
|
|
@@ -22,8 +22,11 @@ export declare const CLAUDE_CODE_CAPABILITIES: HarnessCapabilities;
|
|
|
22
22
|
* is not trusted in that ignored file (config/src/loader/mod.rs).
|
|
23
23
|
* - sandbox fs only: `--sandbox read-only|workspace-write`. Network is one
|
|
24
24
|
* on/off switch (`sandbox_workspace_write.network_access`), not a host list.
|
|
25
|
-
* - readOnly native: `--sandbox read-only` plus the
|
|
26
|
-
*
|
|
25
|
+
* - readOnly native: `--sandbox read-only` plus the web search and subagent
|
|
26
|
+
* switches above. The shell stays: Codex has no other way to read a file, and
|
|
27
|
+
* the OS sandbox (SandboxPolicy::ReadOnly, network off by default,
|
|
28
|
+
* protocol/src/protocol.rs) blocks writes and network from it. An explicit
|
|
29
|
+
* `tools.deny: [shell]` still removes it.
|
|
27
30
|
* - turnLimit watchdog: codex exec has no turn limit; sweny counts tool calls.
|
|
28
31
|
* - usage tokens only: `turn.completed.usage`; Codex reports no cost.
|
|
29
32
|
*/
|
|
@@ -32,8 +32,11 @@ export const CLAUDE_CODE_CAPABILITIES = {
|
|
|
32
32
|
* is not trusted in that ignored file (config/src/loader/mod.rs).
|
|
33
33
|
* - sandbox fs only: `--sandbox read-only|workspace-write`. Network is one
|
|
34
34
|
* on/off switch (`sandbox_workspace_write.network_access`), not a host list.
|
|
35
|
-
* - readOnly native: `--sandbox read-only` plus the
|
|
36
|
-
*
|
|
35
|
+
* - readOnly native: `--sandbox read-only` plus the web search and subagent
|
|
36
|
+
* switches above. The shell stays: Codex has no other way to read a file, and
|
|
37
|
+
* the OS sandbox (SandboxPolicy::ReadOnly, network off by default,
|
|
38
|
+
* protocol/src/protocol.rs) blocks writes and network from it. An explicit
|
|
39
|
+
* `tools.deny: [shell]` still removes it.
|
|
37
40
|
* - turnLimit watchdog: codex exec has no turn limit; sweny counts tool calls.
|
|
38
41
|
* - usage tokens only: `turn.completed.usage`; Codex reports no cost.
|
|
39
42
|
*/
|
package/dist/harness/codex.js
CHANGED
|
@@ -744,8 +744,19 @@ export class CodexHarness {
|
|
|
744
744
|
}
|
|
745
745
|
const readOnly = policy.readOnly;
|
|
746
746
|
const deny = new Set(policy.deny);
|
|
747
|
+
// Read-only keeps the shell. Codex has no non-shell way to read a file
|
|
748
|
+
// (apply_patch only writes), so dropping it left read-only nodes (triage
|
|
749
|
+
// gather/investigate, implement analyze, drift inventory) blind. The shell
|
|
750
|
+
// is safe here because `--sandbox read-only` is enforced by the OS, not by
|
|
751
|
+
// the model: it maps to SandboxPolicy::ReadOnly { network_access: false },
|
|
752
|
+
// "read-only access ... outbound network ... false by default"
|
|
753
|
+
// (openai/codex rust-v0.159.2, codex-rs/protocol/src/protocol.rs, the
|
|
754
|
+
// SandboxPolicy enum ~L1079 and new_read_only_policy ~L1205). So a shell
|
|
755
|
+
// command can read the checkout but cannot write files or reach the
|
|
756
|
+
// network. Network and subagents are still denied at the tool level, and an
|
|
757
|
+
// explicit `tools.deny: [shell]` (already in policy.deny) still removes it.
|
|
747
758
|
if (readOnly)
|
|
748
|
-
for (const c of ["
|
|
759
|
+
for (const c of ["net", "subagent"])
|
|
749
760
|
deny.add(c);
|
|
750
761
|
let sandbox = "read-only";
|
|
751
762
|
if (!readOnly) {
|