@rosthq/cli 0.7.49 → 0.7.51
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 +31 -11
- package/dist/index.js.map +2 -2
- package/dist/runner-sandbox.d.ts +0 -1
- package/dist/runner-sandbox.d.ts.map +1 -1
- package/dist/runner-serve.d.ts +3 -1
- package/dist/runner-serve.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43334,6 +43334,7 @@ var forgePlanArtifact = external_exports.object({
|
|
|
43334
43334
|
}
|
|
43335
43335
|
}
|
|
43336
43336
|
});
|
|
43337
|
+
var forgePlanArtifactSchema = forgePlanArtifact;
|
|
43337
43338
|
var forgeImplementationArtifact = external_exports.object({
|
|
43338
43339
|
changes: forgeArtifactList,
|
|
43339
43340
|
verification: forgeArtifactList,
|
|
@@ -52647,6 +52648,7 @@ function subpath(value) {
|
|
|
52647
52648
|
function literal2(value) {
|
|
52648
52649
|
return `(literal ${sbplString(value)})`;
|
|
52649
52650
|
}
|
|
52651
|
+
var CLAUDE_TEMP_SBPL_REGEX = '(regex #"^/private/tmp/claude-[^/]+")';
|
|
52650
52652
|
var STRICT_SYSTEM_READ_SUBPATHS = [
|
|
52651
52653
|
"/usr",
|
|
52652
52654
|
"/bin",
|
|
@@ -52693,7 +52695,7 @@ function buildSeatbeltProfile(input) {
|
|
|
52693
52695
|
if (denyReadBaseSubpaths.length > 0) {
|
|
52694
52696
|
lines.push(`(deny file-read* ${denyReadBaseSubpaths.join(" ")})`);
|
|
52695
52697
|
}
|
|
52696
|
-
const workspaceReads = [subpath(input.workspaceDir), ...input.allowWritePaths.map(subpath)];
|
|
52698
|
+
const workspaceReads = [subpath(input.workspaceDir), ...input.allowWritePaths.map(subpath), CLAUDE_TEMP_SBPL_REGEX];
|
|
52697
52699
|
lines.push(`(allow file-read* ${workspaceReads.join(" ")})`);
|
|
52698
52700
|
lines.push("(deny file-write*)");
|
|
52699
52701
|
const allowWrites = [
|
|
@@ -52702,6 +52704,8 @@ function buildSeatbeltProfile(input) {
|
|
|
52702
52704
|
subpath(`${home}/.claude`),
|
|
52703
52705
|
subpath(`${home}/.codex`),
|
|
52704
52706
|
...input.allowWritePaths.map(subpath),
|
|
52707
|
+
CLAUDE_TEMP_SBPL_REGEX,
|
|
52708
|
+
// DER-1398: Claude Code's per-session + per-command temp dirs.
|
|
52705
52709
|
subpath("/dev/fd"),
|
|
52706
52710
|
literal2("/dev/null"),
|
|
52707
52711
|
literal2("/dev/stdout"),
|
|
@@ -52747,9 +52751,6 @@ function isSandboxExecAvailable() {
|
|
|
52747
52751
|
return false;
|
|
52748
52752
|
}
|
|
52749
52753
|
}
|
|
52750
|
-
function claudeBashTempRoot(uid) {
|
|
52751
|
-
return `/private/tmp/claude-${uid}`;
|
|
52752
|
-
}
|
|
52753
52754
|
function resolveSandboxSpec(options) {
|
|
52754
52755
|
if (options.mode === "off") {
|
|
52755
52756
|
return { kind: "none", reason: "RUNNER_SANDBOX=off (loosened fallback - OS confinement disabled)" };
|
|
@@ -52772,11 +52773,7 @@ function resolveSandboxSpec(options) {
|
|
|
52772
52773
|
const denyWritePaths = (options.denyWritePaths ?? []).map(
|
|
52773
52774
|
(p) => p.endsWith("/") ? `${canonical(p.replace(/\/+$/, ""))}/` : canonicalFile(p)
|
|
52774
52775
|
);
|
|
52775
|
-
const
|
|
52776
|
-
const allowWritePaths = [
|
|
52777
|
-
...(options.allowWritePaths ?? []).map(canonical),
|
|
52778
|
-
...uid !== null ? [canonicalFile(claudeBashTempRoot(uid))] : []
|
|
52779
|
-
];
|
|
52776
|
+
const allowWritePaths = (options.allowWritePaths ?? []).map(canonical);
|
|
52780
52777
|
const profile = buildSeatbeltProfile({
|
|
52781
52778
|
workspaceDir,
|
|
52782
52779
|
tmpDir,
|
|
@@ -53366,7 +53363,9 @@ async function executeClaimedUnit(fetchImpl, appUrl2, state, config2, io, runtim
|
|
|
53366
53363
|
// narrower endpoint — T1.9 scope); its Zod schema strips unrecognized keys on a non-strict
|
|
53367
53364
|
// parse either way, so sending them there is harmless, just unused.
|
|
53368
53365
|
...input.kind === "work_order" ? { step_ledger: ledger.entries() } : {},
|
|
53369
|
-
...input.kind === "work_order" && result.transcript ? { transcript: result.transcript } : {}
|
|
53366
|
+
...input.kind === "work_order" && result.transcript ? { transcript: result.transcript } : {},
|
|
53367
|
+
// DER-1371: the planner's structured decomposition — only sent when the model produced one.
|
|
53368
|
+
...result.planArtifact ? { plan_artifact: result.planArtifact } : {}
|
|
53370
53369
|
}, state.runner_secret);
|
|
53371
53370
|
if (reported.status !== 200) {
|
|
53372
53371
|
if (reported.status >= 400 && reported.status < 500) {
|
|
@@ -54112,12 +54111,14 @@ function runModelProcess(input) {
|
|
|
54112
54111
|
const rawOutput = (out || err || "completed").trim();
|
|
54113
54112
|
const redacted = redactForLog(rawOutput);
|
|
54114
54113
|
const evidence = input.collectEvidence && code === 0 ? extractRunnerEvidence(rawOutput) : [];
|
|
54114
|
+
const planArtifact = input.collectEvidence && code === 0 ? extractForgePlanArtifact(rawOutput) : void 0;
|
|
54115
54115
|
finish({
|
|
54116
54116
|
ok: code === 0,
|
|
54117
54117
|
summary: extractRunnerSummary(redacted).slice(0, 12e3),
|
|
54118
54118
|
transcript: scrubTranscriptSessionIds(redacted).slice(0, MAX_TRANSCRIPT_CHARS),
|
|
54119
54119
|
...evidence.length > 0 ? { evidence } : {},
|
|
54120
|
-
...input.expectSessionEnvelope ? extractClaudeSessionId(rawOutput) : {}
|
|
54120
|
+
...input.expectSessionEnvelope ? extractClaudeSessionId(rawOutput) : {},
|
|
54121
|
+
...planArtifact ? { planArtifact } : {}
|
|
54121
54122
|
});
|
|
54122
54123
|
});
|
|
54123
54124
|
child.on("error", (error51) => {
|
|
@@ -54210,6 +54211,25 @@ function extractRunnerEvidence(output) {
|
|
|
54210
54211
|
}
|
|
54211
54212
|
return [];
|
|
54212
54213
|
}
|
|
54214
|
+
function extractForgePlanArtifact(output) {
|
|
54215
|
+
const directRecord = parseJsonObject(output.trim());
|
|
54216
|
+
if (directRecord) {
|
|
54217
|
+
const parsed = forgePlanArtifactSchema.safeParse(directRecord);
|
|
54218
|
+
if (parsed.success) {
|
|
54219
|
+
return parsed.data;
|
|
54220
|
+
}
|
|
54221
|
+
for (const key of ["result", "summary", "content", "text", "message"]) {
|
|
54222
|
+
const nested = typeof directRecord[key] === "string" ? parseJsonObject(directRecord[key].trim()) : null;
|
|
54223
|
+
if (nested) {
|
|
54224
|
+
const nestedParsed = forgePlanArtifactSchema.safeParse(nested);
|
|
54225
|
+
if (nestedParsed.success) {
|
|
54226
|
+
return nestedParsed.data;
|
|
54227
|
+
}
|
|
54228
|
+
}
|
|
54229
|
+
}
|
|
54230
|
+
}
|
|
54231
|
+
return void 0;
|
|
54232
|
+
}
|
|
54213
54233
|
function extractClaudeSessionId(output) {
|
|
54214
54234
|
const trimmed = output.trim();
|
|
54215
54235
|
if (!trimmed.startsWith("{")) {
|