@yagni-app/code-staging 1.2.14-staging.2525.1 → 1.2.15-staging.2565.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.
|
@@ -271,8 +271,10 @@ export const PLACED_VALUES_SECTION = `${PLACED_VALUES_SECTION_HEADER}\n` +
|
|
|
271
271
|
"services run with, in `/run/yagni/secret/env` (linked at `/run/yagni/env`). Never read, " +
|
|
272
272
|
"print, copy or search that file, and never read a running service's environment " +
|
|
273
273
|
"(`/proc/<pid>/environ`, `docker inspect`, `env` or `printenv` run inside a container). " +
|
|
274
|
-
"
|
|
275
|
-
"
|
|
274
|
+
"Every command you run already has the values in its environment, each under its " +
|
|
275
|
+
"variable name, so nothing needs to source the file. If one is ever missing, load them " +
|
|
276
|
+
"in that same command (`set -a; . /run/yagni/env; set +a; <command>`, never inside " +
|
|
277
|
+
"parentheses, which would drop them again). A command never prints one. Code you write " +
|
|
276
278
|
"reads a credential by its variable name, never as a literal, and no credential goes " +
|
|
277
279
|
"into a file, a commit message or your report. A credential that reaches you in any " +
|
|
278
280
|
"output shows as [REDACTED], and YAGNI does not push a change, commit message or pull " +
|
package/dist/extension/index.js
CHANGED
|
@@ -45,7 +45,7 @@ import { isSandboxDenialOutput, sandboxAutoAllowDecision, sandboxDenialSignature
|
|
|
45
45
|
import { sandboxFailureKey } from "./permission/approvedPrefixes.js";
|
|
46
46
|
import { createEscapeTally } from "./sandbox/escapeTally.js";
|
|
47
47
|
import { createGrantCensus } from "./permission/grantCensus.js";
|
|
48
|
-
import { runsInSandboxHarness, toolchainBashToolDefinition, toolchainSpawnHookFromEnv, toolchainUserBashOperations, } from "./toolchain/spawnHook.js";
|
|
48
|
+
import { composeSpawnHooks, runsInSandboxHarness, toolchainBashToolDefinition, toolchainSpawnHookFromEnv, toolchainUserBashOperations, } from "./toolchain/spawnHook.js";
|
|
49
49
|
import { CLOUD_SESSION_ENV } from "./pipeline/cloud.js";
|
|
50
50
|
import { registerCompactionPins } from "./pipeline/compactionPins.js";
|
|
51
51
|
import { registerSessionInbox } from "./pipeline/sessionInbox.js";
|
|
@@ -63,7 +63,7 @@ import { registerDecisionCommands } from "./decisions.js";
|
|
|
63
63
|
import { makeDecisionCapture } from "./decisionCapture.js";
|
|
64
64
|
import { loadGroundingEnabled } from "./grounding.js";
|
|
65
65
|
import { attributionPromptSection, loadAttributionSettings, } from "./attribution.js";
|
|
66
|
-
import { openPlacedValues, registerPlacedValueRedaction } from "./placedValues.js";
|
|
66
|
+
import { makePlacedValuesSpawnHook, openPlacedValues, registerPlacedValueRedaction, } from "./placedValues.js";
|
|
67
67
|
import { registerAmbientRecall } from "./recall.js";
|
|
68
68
|
import { resilientFetch } from "./resilientFetch.js";
|
|
69
69
|
import { installNonZeroExitReporter, installUncaughtExceptionMonitor, makeCrashReporter, runningUnderTest, } from "./crashReport.js";
|
|
@@ -1018,12 +1018,15 @@ export async function registerYagni(pi, deps = {}) {
|
|
|
1018
1018
|
// build runs in it, and its shell needs the repository's toolchain as much
|
|
1019
1019
|
// as a lane session's. Absent everywhere else.
|
|
1020
1020
|
const toolchainHook = toolchainSpawnHookFromEnv(env);
|
|
1021
|
+
// A yak's machine: the same spawns carry the System's placed values, read
|
|
1022
|
+
// at each spawn, with the toolchain's PATH still on top.
|
|
1023
|
+
const shellHook = composeSpawnHooks(placedValues ? makePlacedValuesSpawnHook(deps.placedValuePaths) : undefined, toolchainHook);
|
|
1021
1024
|
const sandboxHandle = evalMode
|
|
1022
1025
|
? null
|
|
1023
1026
|
: registerSandbox(pi, {
|
|
1024
1027
|
cwd: process.cwd(),
|
|
1025
1028
|
env,
|
|
1026
|
-
...(
|
|
1029
|
+
...(shellHook ? { baseSpawnHook: shellHook } : {}),
|
|
1027
1030
|
hasUI: (ctx) => ctx.hasUI,
|
|
1028
1031
|
onShellResolutionRetry: (outcome) => telemetry.sandboxShellResolutionRetry(outcome),
|
|
1029
1032
|
escapeBreakdown: () => escapeTally.breakdown(),
|
|
@@ -1037,11 +1040,11 @@ export async function registerYagni(pi, deps = {}) {
|
|
|
1037
1040
|
});
|
|
1038
1041
|
if (sandboxHandle)
|
|
1039
1042
|
sandboxHandle.setRules(loadedRules.rules);
|
|
1040
|
-
if (
|
|
1043
|
+
if (shellHook) {
|
|
1041
1044
|
// After the sandbox's own handler: a sandboxed `!` command is answered
|
|
1042
1045
|
// there (with this hook applied); any other runs here on the toolchain.
|
|
1043
1046
|
pi.on("user_bash", () => ({
|
|
1044
|
-
operations: toolchainUserBashOperations(
|
|
1047
|
+
operations: toolchainUserBashOperations(shellHook, process.cwd()),
|
|
1045
1048
|
}));
|
|
1046
1049
|
}
|
|
1047
1050
|
const permissionGate = registerPermissionGate(pi, {
|
|
@@ -1707,7 +1710,7 @@ export async function registerYagni(pi, deps = {}) {
|
|
|
1707
1710
|
// built-ins last), so the sandbox composes INTO it here. Identity when
|
|
1708
1711
|
// the sandbox is off.
|
|
1709
1712
|
...(sandboxHandle ? { wrapBash: sandboxHandle.composeBash } : {}),
|
|
1710
|
-
...(
|
|
1713
|
+
...(shellHook ? { bashSpawnHook: shellHook } : {}),
|
|
1711
1714
|
});
|
|
1712
1715
|
condensedToolsRegistered = true;
|
|
1713
1716
|
}
|
|
@@ -1724,7 +1727,7 @@ export async function registerYagni(pi, deps = {}) {
|
|
|
1724
1727
|
// the sandbox to reach bash, so the hatch is the one carve-out.
|
|
1725
1728
|
sandboxHandle.registerOwnBash();
|
|
1726
1729
|
}
|
|
1727
|
-
else if (
|
|
1730
|
+
else if (shellHook) {
|
|
1728
1731
|
// Nothing above takes bash over (eval mode, the classic-rows hatch), so
|
|
1729
1732
|
// the toolchain reaches the model's spawns through pi's own bash
|
|
1730
1733
|
// definition: its schema and rendering unchanged, its PATH the file's.
|
|
@@ -1733,7 +1736,7 @@ export async function registerYagni(pi, deps = {}) {
|
|
|
1733
1736
|
// user's shell settings, or pi's registry taking it) and why.
|
|
1734
1737
|
let step = "definition";
|
|
1735
1738
|
try {
|
|
1736
|
-
const bash = toolchainBashToolDefinition(
|
|
1739
|
+
const bash = toolchainBashToolDefinition(shellHook, process.cwd());
|
|
1737
1740
|
step = "register";
|
|
1738
1741
|
pi.registerTool(bash);
|
|
1739
1742
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* encodes first (base64, split, reversed), part of a value cut by a tool's
|
|
29
29
|
* truncation, and a value inside an image all get past.
|
|
30
30
|
*/
|
|
31
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
31
|
+
import type { BashSpawnHook, ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
32
32
|
/** Where the backend places the values (`repos/system/needs/placement.ts`, `SYSTEM_SECRET_FILE`). */
|
|
33
33
|
export declare const PLACED_VALUES_FILE = "/run/yagni/secret/env";
|
|
34
34
|
/** The link scripts source (`SYSTEM_ENV_PATH`). */
|
|
@@ -64,6 +64,16 @@ export declare function parsePlacedEnvFile(text: string): Map<string, string>;
|
|
|
64
64
|
export declare function placedValueForms(values: Iterable<string>): string[];
|
|
65
65
|
/** `text` with every form replaced by the mark. */
|
|
66
66
|
export declare function redactPlacedText(text: string, forms: readonly string[]): string;
|
|
67
|
+
/**
|
|
68
|
+
* Every bash spawn (and `!` command) runs with the placed values in its
|
|
69
|
+
* environment, read again from the file at each spawn, so no command depends
|
|
70
|
+
* on the model sourcing the file itself. Only the commands get them: this
|
|
71
|
+
* process and the harness never do, so a customer's `NODE_OPTIONS` or proxy
|
|
72
|
+
* never reaches them. A placed value wins over the process's own, as
|
|
73
|
+
* sourcing the file did; `PATH` is never taken. The command string is never
|
|
74
|
+
* touched. Compose it before the toolchain's hook, whose PATH still applies.
|
|
75
|
+
*/
|
|
76
|
+
export declare function makePlacedValuesSpawnHook(paths?: readonly string[]): BashSpawnHook;
|
|
67
77
|
/** A secret the System placed, by the variable a person knows it as; never logged. */
|
|
68
78
|
export interface PlacedSecret {
|
|
69
79
|
name: string;
|
|
@@ -166,6 +166,29 @@ function readPlacedFile(path) {
|
|
|
166
166
|
return null;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Every bash spawn (and `!` command) runs with the placed values in its
|
|
171
|
+
* environment, read again from the file at each spawn, so no command depends
|
|
172
|
+
* on the model sourcing the file itself. Only the commands get them: this
|
|
173
|
+
* process and the harness never do, so a customer's `NODE_OPTIONS` or proxy
|
|
174
|
+
* never reaches them. A placed value wins over the process's own, as
|
|
175
|
+
* sourcing the file did; `PATH` is never taken. The command string is never
|
|
176
|
+
* touched. Compose it before the toolchain's hook, whose PATH still applies.
|
|
177
|
+
*/
|
|
178
|
+
export function makePlacedValuesSpawnHook(paths = [PLACED_VALUES_FILE, PLACED_VALUES_LINK]) {
|
|
179
|
+
return (ctx) => {
|
|
180
|
+
for (const path of paths) {
|
|
181
|
+
const text = readPlacedFile(path);
|
|
182
|
+
if (text === null)
|
|
183
|
+
continue;
|
|
184
|
+
// A value with a NUL is no environment variable: Node refuses the whole
|
|
185
|
+
// spawn over one, quoting the value in its error.
|
|
186
|
+
const placed = Object.fromEntries([...parsePlacedEnvFile(text)].filter(([name, value]) => name !== "PATH" && !value.includes("\0")));
|
|
187
|
+
return { ...ctx, env: { ...ctx.env, ...placed } };
|
|
188
|
+
}
|
|
189
|
+
return ctx;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
169
192
|
/** The names the host listed as secrets, or null when it listed none (a placement before the list). */
|
|
170
193
|
function readSecretNames(path) {
|
|
171
194
|
const text = path ? readPlacedFile(path) : null;
|
|
@@ -27,7 +27,7 @@ import { loadSandboxSettings } from "./config.js";
|
|
|
27
27
|
import { resolveWorktreeGitAccess } from "./worktreeGit.js";
|
|
28
28
|
import { annotateCommandOutput, fsDenialHint, makeSandboxSpawnHook, networkDenialHint, preWrappedCommand, sandboxSpawnEnv, shouldUseSandbox, shouldUseSandboxForUserCommand, } from "./bash.js";
|
|
29
29
|
import { YagniSandboxManager } from "./manager.js";
|
|
30
|
-
import { SandboxPanel, buildPanelState, engineeringPresetBlock, grantCensusRows } from "./panel.js";
|
|
30
|
+
import { SandboxPanel, buildPanelState, engineeringPresetBlock, grantCensusRows, } from "./panel.js";
|
|
31
31
|
import { effectiveRules } from "../permissionRules/loadConfig.js";
|
|
32
32
|
/**
|
|
33
33
|
* Build the sandbox bash composition: given ANY stock bash definition (pi's
|
|
@@ -108,7 +108,7 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
108
108
|
const strictNote = s.allowUnsandboxedCommands === false
|
|
109
109
|
? "All commands MUST run sandboxed — dangerouslyDisableSandbox is disabled by policy."
|
|
110
110
|
: "Default to running commands in the sandbox. Do NOT set dangerouslyDisableSandbox: true unless the user explicitly asks you to bypass the sandbox, or a specific command just failed with evidence of a sandbox restriction. " +
|
|
111
|
-
|
|
111
|
+
'Evidence of sandbox-caused failures includes: "Operation not permitted" errors for file/network operations, access denied to paths outside allowed directories, network connection failures to non-allowlisted hosts, unix-socket connection errors, and TLS certificate verification failures (x509: OSStatus -26276, tls: failed to verify certificate). ' +
|
|
112
112
|
"Commands can fail for many reasons unrelated to the sandbox (missing files, wrong arguments, ordinary network issues) — only retry unsandboxed on that evidence. " +
|
|
113
113
|
"When you see it: retry the SAME command unchanged, adding only dangerouslyDisableSandbox: true, briefly explain what restriction likely caused the failure, and mention that the user can manage restrictions with /sandbox. In auto mode the retry first runs inside the sandbox again (no prompt); you are only asked for permission when the sandbox genuinely cannot run the command. " +
|
|
114
114
|
"Treat each command you execute with dangerouslyDisableSandbox: true individually. Even if you have recently run a command with this setting, you should default to running future commands within the sandbox. " +
|
|
@@ -148,7 +148,11 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
148
148
|
source: "sandbox",
|
|
149
149
|
level: isDebug() ? "debug" : "info",
|
|
150
150
|
event: "tool_execute_decision",
|
|
151
|
-
fields: {
|
|
151
|
+
fields: {
|
|
152
|
+
useSandbox,
|
|
153
|
+
initialized: manager.initialized,
|
|
154
|
+
hasCommand: Boolean(input.command),
|
|
155
|
+
},
|
|
152
156
|
});
|
|
153
157
|
// Background jobs (the bgJobs engine): the SAME prewrap + sandbox
|
|
154
158
|
// decision as the foreground path; the job spawns detached with
|
|
@@ -159,7 +163,11 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
159
163
|
// (unknown params are ignored by createLocalBashOperations).
|
|
160
164
|
if (input.run_in_background) {
|
|
161
165
|
const sessionId = ctx.sessionManager?.getSessionFile?.()
|
|
162
|
-
? ctx.sessionManager
|
|
166
|
+
? ctx.sessionManager
|
|
167
|
+
.getSessionFile()
|
|
168
|
+
.split("/")
|
|
169
|
+
.pop()
|
|
170
|
+
.replace(/\.jsonl$/, "")
|
|
163
171
|
: (process.env.YAGNI_SESSION_ID ?? "unknown");
|
|
164
172
|
// SAME prewrap as the foreground path: when the sandbox decision
|
|
165
173
|
// says sandboxed, the bg command MUST run under the OS sandbox too
|
|
@@ -167,7 +175,10 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
167
175
|
// recorded as sandboxed. The spawn env carries the proxy vars the
|
|
168
176
|
// wrapped command's children need (the spawnHook parity).
|
|
169
177
|
let bgCommand = input.command;
|
|
170
|
-
|
|
178
|
+
// The session's own hook (the toolchain, a yak's placed values), as
|
|
179
|
+
// a foreground spawn gets it: a background install needs them too.
|
|
180
|
+
const hookEnv = baseSpawnHook?.({ command: input.command, cwd, env: process.env }).env;
|
|
181
|
+
let bgEnv = hookEnv;
|
|
171
182
|
if (useSandbox) {
|
|
172
183
|
// retryPolicy "single": the bg launch ack is returns-
|
|
173
184
|
// immediately, and bg launches are precisely the high-load
|
|
@@ -178,7 +189,7 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
178
189
|
onRetry: onShellResolutionRetry,
|
|
179
190
|
retryPolicy: "single",
|
|
180
191
|
});
|
|
181
|
-
bgEnv = { ...process.env, ...sandboxSpawnEnv(manager) };
|
|
192
|
+
bgEnv = { ...(hookEnv ?? process.env), ...sandboxSpawnEnv(manager) };
|
|
182
193
|
manager.cleanupAfterCommand();
|
|
183
194
|
}
|
|
184
195
|
const bg = await startBackgroundJob({
|
|
@@ -190,7 +201,14 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
190
201
|
sandboxed: useSandbox,
|
|
191
202
|
}, sessionId);
|
|
192
203
|
return {
|
|
193
|
-
content: [
|
|
204
|
+
content: [
|
|
205
|
+
{
|
|
206
|
+
type: "text",
|
|
207
|
+
text: bgLaunchResult(bg, typeof input.timeout === "number" && input.timeout > 0
|
|
208
|
+
? input.timeout
|
|
209
|
+
: undefined),
|
|
210
|
+
},
|
|
211
|
+
],
|
|
194
212
|
details: { backgroundTaskId: bg.id, outputFile: bg.outputFile },
|
|
195
213
|
};
|
|
196
214
|
}
|
|
@@ -207,7 +225,8 @@ export function makeBashComposition(manager, settings, cwd, onShellResolutionRet
|
|
|
207
225
|
result = await sandboxBash.execute(id, execParams, signal, onUpdate, ctx);
|
|
208
226
|
}
|
|
209
227
|
catch (err) {
|
|
210
|
-
if (err instanceof Error &&
|
|
228
|
+
if (err instanceof Error &&
|
|
229
|
+
(err.message.includes("Operation not permitted") || networkDenialHint(err.message))) {
|
|
211
230
|
// The thrown-message gate matches the result-text gate: a
|
|
212
231
|
// network-signature denial in EITHER surface gets the
|
|
213
232
|
// annotation + hint (node throws lowercase "operation not
|
|
@@ -470,7 +489,10 @@ export function registerSandbox(pi, opts) {
|
|
|
470
489
|
if (!opts.baseSpawnHook)
|
|
471
490
|
return;
|
|
472
491
|
const userShellPath = SettingsManager.create(opts.cwd).getShellPath();
|
|
473
|
-
pi.registerTool(createBashToolDefinition(opts.cwd, {
|
|
492
|
+
pi.registerTool(createBashToolDefinition(opts.cwd, {
|
|
493
|
+
shellPath: userShellPath,
|
|
494
|
+
spawnHook: opts.baseSpawnHook,
|
|
495
|
+
}));
|
|
474
496
|
return;
|
|
475
497
|
}
|
|
476
498
|
const userShellPath = SettingsManager.create(opts.cwd).getShellPath();
|
|
@@ -513,7 +535,9 @@ export function registerSandbox(pi, opts) {
|
|
|
513
535
|
const child = spawn(shell, [...args, wrapped], {
|
|
514
536
|
cwd,
|
|
515
537
|
// The toolchain's PATH and variables when the session has a base hook.
|
|
516
|
-
env: opts.baseSpawnHook
|
|
538
|
+
env: opts.baseSpawnHook
|
|
539
|
+
? opts.baseSpawnHook({ command, cwd, env: baseEnv }).env
|
|
540
|
+
: baseEnv,
|
|
517
541
|
detached: true,
|
|
518
542
|
stdio: ["ignore", "pipe", "pipe"],
|
|
519
543
|
});
|
|
@@ -530,7 +554,10 @@ export function registerSandbox(pi, opts) {
|
|
|
530
554
|
}
|
|
531
555
|
};
|
|
532
556
|
if (timeout !== undefined && timeout > 0) {
|
|
533
|
-
timeoutHandle = setTimeout(() => {
|
|
557
|
+
timeoutHandle = setTimeout(() => {
|
|
558
|
+
timedOut = true;
|
|
559
|
+
killGroup();
|
|
560
|
+
}, timeout * 1000);
|
|
534
561
|
}
|
|
535
562
|
// Tail buffer (bounded) so a network-posture denial can be
|
|
536
563
|
// annotated + hinted after the child exits — the tool-call path
|
|
@@ -563,11 +590,21 @@ export function registerSandbox(pi, opts) {
|
|
|
563
590
|
const scope = net ? null : fsScope();
|
|
564
591
|
const fs = scope ? fsDenialHint(event.command, tail, opts.cwd, scope) : null;
|
|
565
592
|
if (net) {
|
|
566
|
-
logEvent({
|
|
593
|
+
logEvent({
|
|
594
|
+
source: "sandbox",
|
|
595
|
+
level: "info",
|
|
596
|
+
event: "network_denial_hint",
|
|
597
|
+
fields: { class: net.cls },
|
|
598
|
+
});
|
|
567
599
|
onData(Buffer.from(`\n[sandbox] ${net.hint}`));
|
|
568
600
|
}
|
|
569
601
|
else if (fs) {
|
|
570
|
-
logEvent({
|
|
602
|
+
logEvent({
|
|
603
|
+
source: "sandbox",
|
|
604
|
+
level: "info",
|
|
605
|
+
event: "fs_denial_hint",
|
|
606
|
+
fields: { class: fs.cls, surface: "user-bash" },
|
|
607
|
+
});
|
|
571
608
|
onData(Buffer.from(`\n[sandbox] ${fs.hint}`));
|
|
572
609
|
}
|
|
573
610
|
return { exitCode };
|
|
@@ -929,12 +966,18 @@ export function registerSandbox(pi, opts) {
|
|
|
929
966
|
if (trimmed === "exclude" || trimmed.startsWith("exclude ")) {
|
|
930
967
|
// /sandbox exclude "npm run test:*" — convenience escape valve (the
|
|
931
968
|
// permission gate remains the security boundary).
|
|
932
|
-
const pattern = trimmed
|
|
969
|
+
const pattern = trimmed
|
|
970
|
+
.slice("exclude ".length)
|
|
971
|
+
.trim()
|
|
972
|
+
.replace(/^["']|["']$/g, "");
|
|
933
973
|
if (!pattern) {
|
|
934
974
|
ctx.ui.notify("Usage: /sandbox exclude <command-pattern>", "error");
|
|
935
975
|
return;
|
|
936
976
|
}
|
|
937
|
-
currentSettings = {
|
|
977
|
+
currentSettings = {
|
|
978
|
+
...currentSettings,
|
|
979
|
+
excludedCommands: [...(currentSettings.excludedCommands ?? []), pattern],
|
|
980
|
+
};
|
|
938
981
|
ctx.ui.notify(`Excluded "${pattern}" from sandboxing for this session`, "info");
|
|
939
982
|
return;
|
|
940
983
|
}
|
|
@@ -984,7 +1027,12 @@ function logShellResolutionRetry(outcome) {
|
|
|
984
1027
|
function logNetworkDenialHint(net) {
|
|
985
1028
|
if (!net)
|
|
986
1029
|
return;
|
|
987
|
-
logEvent({
|
|
1030
|
+
logEvent({
|
|
1031
|
+
source: "sandbox",
|
|
1032
|
+
level: "info",
|
|
1033
|
+
event: "network_denial_hint",
|
|
1034
|
+
fields: { class: net.cls },
|
|
1035
|
+
});
|
|
988
1036
|
}
|
|
989
1037
|
/** Sink line for the fs-denial hint (same low-cardinality contract as the
|
|
990
1038
|
* network one — the before/after escape census reads these lines). The
|
|
@@ -993,7 +1041,12 @@ function logNetworkDenialHint(net) {
|
|
|
993
1041
|
function logFsDenialHint(fs, surface) {
|
|
994
1042
|
if (!fs)
|
|
995
1043
|
return;
|
|
996
|
-
logEvent({
|
|
1044
|
+
logEvent({
|
|
1045
|
+
source: "sandbox",
|
|
1046
|
+
level: "info",
|
|
1047
|
+
event: "fs_denial_hint",
|
|
1048
|
+
fields: { class: fs.cls, surface },
|
|
1049
|
+
});
|
|
997
1050
|
}
|
|
998
1051
|
/** Sink line for every network-ask resolution. The ask was invisible in the
|
|
999
1052
|
* incident session's trail — whether the dialog fired, which option was
|
|
@@ -1035,7 +1088,9 @@ function persistDomainGrant(projectRoot, domain, stateHome) {
|
|
|
1035
1088
|
mutateConfigJson(target, (config) => {
|
|
1036
1089
|
const sandbox = isPlainRecord(config.sandbox) ? { ...config.sandbox } : {};
|
|
1037
1090
|
const network = isPlainRecord(sandbox.network) ? { ...sandbox.network } : {};
|
|
1038
|
-
const domains = Array.isArray(network.allowedDomains)
|
|
1091
|
+
const domains = Array.isArray(network.allowedDomains)
|
|
1092
|
+
? [...network.allowedDomains]
|
|
1093
|
+
: [];
|
|
1039
1094
|
if (!domains.includes(domain))
|
|
1040
1095
|
domains.push(domain);
|
|
1041
1096
|
network.allowedDomains = domains;
|
|
@@ -1104,7 +1159,11 @@ export function persistNetworkChoice(choice, cwd, platform = process.platform) {
|
|
|
1104
1159
|
mutateLocalConfig(cwd, (config) => {
|
|
1105
1160
|
const sandbox = isPlainRecord(config.sandbox) ? { ...config.sandbox } : {};
|
|
1106
1161
|
const network = isPlainRecord(sandbox.network) ? { ...sandbox.network } : {};
|
|
1107
|
-
const sockets = isPlainRecord(network)
|
|
1162
|
+
const sockets = isPlainRecord(network)
|
|
1163
|
+
? Array.isArray(network.allowUnixSockets)
|
|
1164
|
+
? [...network.allowUnixSockets]
|
|
1165
|
+
: []
|
|
1166
|
+
: [];
|
|
1108
1167
|
/** Copy-on-write: set/remove the $TMPDIR entry in the local socket
|
|
1109
1168
|
* array (arrays have no false — removal, not a value write). */
|
|
1110
1169
|
const setTmpdirSockets = (on) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15-staging.2565.1",
|
|
4
4
|
"description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"turndown": "^7.2.4",
|
|
59
59
|
"typebox": "^1.3.15"
|
|
60
60
|
},
|
|
61
|
-
"yagniSourceSha": "
|
|
61
|
+
"yagniSourceSha": "39e18233a81abaaa7e71db32d28946d9066bc4cd"
|
|
62
62
|
}
|