@lambdacurry/arbor 0.22.20 → 0.22.22
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/arbor.js +23 -19
- package/package.json +1 -1
package/dist/arbor.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// package.json
|
|
3
3
|
var package_default = {
|
|
4
4
|
name: "@lambdacurry/arbor",
|
|
5
|
-
version: "0.22.
|
|
5
|
+
version: "0.22.22",
|
|
6
6
|
description: "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
|
|
7
7
|
keywords: [
|
|
8
8
|
"agents",
|
|
@@ -9153,6 +9153,7 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
9153
9153
|
exitCode: number2().optional(),
|
|
9154
9154
|
processId: string2().optional(),
|
|
9155
9155
|
status: string2().optional(),
|
|
9156
|
+
timedOut: boolean2().optional(),
|
|
9156
9157
|
truncated: boolean2().optional().describe("true when returned stdout/stderr is partial and more output remains"),
|
|
9157
9158
|
nextCursor: string2().optional().describe("opaque cursor for continuing partial output with computer_process_read"),
|
|
9158
9159
|
cwd: string2().optional(),
|
|
@@ -9162,6 +9163,7 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
9162
9163
|
computer_process_read: looseObject({
|
|
9163
9164
|
processId: string2(),
|
|
9164
9165
|
status: string2(),
|
|
9166
|
+
timedOut: boolean2().optional(),
|
|
9165
9167
|
endedAt: timestamp.nullable().optional(),
|
|
9166
9168
|
durationMs: number2().int().min(0).nullable().optional(),
|
|
9167
9169
|
stdout: string2().optional(),
|
|
@@ -9551,6 +9553,7 @@ var OUTPUT_SHAPERS = {
|
|
|
9551
9553
|
["exitCode", omitNull(result.exitCode)],
|
|
9552
9554
|
["processId", omitNull(result.processId)],
|
|
9553
9555
|
["status", omitNull(result.status)],
|
|
9556
|
+
["timedOut", omitNull(result.timedOut)],
|
|
9554
9557
|
["truncated", omitNull(result.truncated)],
|
|
9555
9558
|
["nextCursor", omitNull(result.nextCursor)],
|
|
9556
9559
|
["execution", omitProviderNativeExecution(result.execution)],
|
|
@@ -9560,6 +9563,7 @@ var OUTPUT_SHAPERS = {
|
|
|
9560
9563
|
computer_process_read: (result) => defined([
|
|
9561
9564
|
["processId", result.processId],
|
|
9562
9565
|
["status", result.status],
|
|
9566
|
+
["timedOut", omitNull(result.timedOut)],
|
|
9563
9567
|
["stdout", result.stdout],
|
|
9564
9568
|
["stderr", result.stderr],
|
|
9565
9569
|
["truncated", result.truncated],
|
|
@@ -9945,7 +9949,7 @@ Arbor's MCP is the collaboration and durable-knowledge surface. Configure, autho
|
|
|
9945
9949
|
|
|
9946
9950
|
Run \`arbor help\` (or read the MCP tool list) for the exact command/flags — those stay generated from the live action surface, so they're always current.`;
|
|
9947
9951
|
var ARBOR_SKILL_MARKDOWN = renderArborSkill(ORIENTATION);
|
|
9948
|
-
var COMPUTER_ORIENTATION = `Long Computer work returns a handle — do not hold one tool call for a full test or build. \`computer_exec\` runs a command; if the result is still running, take \`processId\` and
|
|
9952
|
+
var COMPUTER_ORIENTATION = `Long Computer work returns a handle — do not hold one tool call for a full test or build. \`computer_exec\` runs a command; if the result is still running or output is truncated, take \`processId\`/\`nextCursor\` and continue with \`computer_process_read\`. Do not chain \`pnpm test && pnpm build\` in one exec; split steps or pass \`background:true\`. The CLI polls only while the process is silent unless \`--no-wait\`; it returns the first bounded output page instead of concatenating continuation pages into one agent context.
|
|
9949
9953
|
|
|
9950
9954
|
Arbor Computer is the complete software execution platform attached to Arbor's durable collaboration graph. It configures project environments, executes and verifies work, packages and releases Apps, and preserves reviewable evidence; it does not schedule agents or replace Arbor collaboration.
|
|
9951
9955
|
|
|
@@ -13516,6 +13520,7 @@ function emitDual(data, human, action, ctx) {
|
|
|
13516
13520
|
|
|
13517
13521
|
// src/computer-exec-wait.ts
|
|
13518
13522
|
var DEFAULT_PROCESS_DEADLINE_MS = 1800000;
|
|
13523
|
+
var PROCESS_OUTPUT_PAGE_BYTES = 4096;
|
|
13519
13524
|
var POLL_MS = 400;
|
|
13520
13525
|
var processRead = ACTIONS3.find((action) => action.name === "computer_process_read");
|
|
13521
13526
|
function record3(value) {
|
|
@@ -13536,6 +13541,12 @@ function isRunning(value) {
|
|
|
13536
13541
|
return false;
|
|
13537
13542
|
return typeof value.processId === "string";
|
|
13538
13543
|
}
|
|
13544
|
+
function hasCallerVisibleOutputPage(value) {
|
|
13545
|
+
return typeof value.stdout === "string" && value.stdout.length > 0 || typeof value.stderr === "string" && value.stderr.length > 0 || value.truncated === true;
|
|
13546
|
+
}
|
|
13547
|
+
function withContinuation(value) {
|
|
13548
|
+
return isRunning(value) || value.truncated === true ? { ...value, nextAction: "computer_process_read" } : value;
|
|
13549
|
+
}
|
|
13539
13550
|
function sleep(ms) {
|
|
13540
13551
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
13541
13552
|
}
|
|
@@ -13547,39 +13558,32 @@ async function waitForComputerExec(executor, input, value, ctx) {
|
|
|
13547
13558
|
if (!processRead || !isComputerExecHandle(value))
|
|
13548
13559
|
return value;
|
|
13549
13560
|
let latest = value;
|
|
13561
|
+
if (hasCallerVisibleOutputPage(latest))
|
|
13562
|
+
return withContinuation(latest);
|
|
13550
13563
|
let cursor = typeof latest.nextCursor === "string" && latest.nextCursor ? latest.nextCursor : undefined;
|
|
13551
|
-
let stdoutPages = typeof latest.stdout === "string" ? latest.stdout : "";
|
|
13552
|
-
let stderrPages = typeof latest.stderr === "string" ? latest.stderr : "";
|
|
13553
|
-
if (stdoutPages)
|
|
13554
|
-
advise(stdoutPages, ctx);
|
|
13555
13564
|
const deadline = Date.now() + (typeof input.timeout === "number" && Number.isFinite(input.timeout) ? input.timeout : DEFAULT_PROCESS_DEADLINE_MS);
|
|
13556
|
-
advise(
|
|
13557
|
-
` : `Process ${String(latest.processId)} has unread output; polling computer_process_read.
|
|
13565
|
+
advise(`Process ${String(latest.processId)} is still running; polling computer_process_read.
|
|
13558
13566
|
`, ctx);
|
|
13559
|
-
while (
|
|
13567
|
+
while (isRunning(latest) && Date.now() < deadline) {
|
|
13560
13568
|
await sleep(POLL_MS);
|
|
13561
13569
|
const read = record3(await processRead.run(executor, {
|
|
13562
13570
|
processId: latest.processId,
|
|
13571
|
+
maxBytes: PROCESS_OUTPUT_PAGE_BYTES,
|
|
13563
13572
|
...cursor ? { cursor } : {},
|
|
13564
13573
|
...typeof input.runId === "string" ? { runId: input.runId } : {},
|
|
13565
13574
|
...typeof input.computerSessionId === "string" ? { computerSessionId: input.computerSessionId } : {}
|
|
13566
13575
|
}));
|
|
13567
|
-
if (!read)
|
|
13576
|
+
if (!read)
|
|
13568
13577
|
throw new Error("computer_process_read returned an empty result");
|
|
13569
|
-
}
|
|
13570
13578
|
latest = read;
|
|
13571
13579
|
if (typeof read.nextCursor === "string" && read.nextCursor)
|
|
13572
13580
|
cursor = read.nextCursor;
|
|
13573
|
-
const stdout = typeof latest.stdout === "string" ? latest.stdout : "";
|
|
13574
|
-
const stderr = typeof latest.stderr === "string" ? latest.stderr : "";
|
|
13575
|
-
if (stdout)
|
|
13576
|
-
advise(stdout, ctx);
|
|
13577
|
-
stdoutPages += stdout;
|
|
13578
|
-
stderrPages += stderr;
|
|
13579
13581
|
if (latest.recovery)
|
|
13580
|
-
|
|
13582
|
+
return latest;
|
|
13583
|
+
if (hasCallerVisibleOutputPage(latest) || !isRunning(latest))
|
|
13584
|
+
return withContinuation(latest);
|
|
13581
13585
|
}
|
|
13582
|
-
return
|
|
13586
|
+
return withContinuation(latest);
|
|
13583
13587
|
}
|
|
13584
13588
|
|
|
13585
13589
|
// src/schema.ts
|
package/package.json
CHANGED