@lambdacurry/arbor 0.23.33 → 0.23.36
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 +84 -13
- 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.23.
|
|
5
|
+
version: "0.23.36",
|
|
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",
|
|
@@ -6908,6 +6908,11 @@ var computerRuns = sqliteTable("computer_runs", {
|
|
|
6908
6908
|
f1Authority: text("f1_authority", { mode: "json" }).$type(),
|
|
6909
6909
|
workspaceState: text("workspace_state", { mode: "json" }).$type(),
|
|
6910
6910
|
finishRequest: text("finish_request", { mode: "json" }).$type(),
|
|
6911
|
+
retentionPolicy: text("retention_policy").$type().notNull().default("none"),
|
|
6912
|
+
retentionDeadlineAt: ts("retention_deadline_at"),
|
|
6913
|
+
retentionMeaningfulUseAt: ts("retention_meaningful_use_at"),
|
|
6914
|
+
retentionKeep: integer2("retention_keep", { mode: "boolean" }).notNull().default(false),
|
|
6915
|
+
retentionRevision: integer2("retention_revision").notNull().default(0),
|
|
6911
6916
|
status: text("status").$type().notNull().default("active"),
|
|
6912
6917
|
label: text("label"),
|
|
6913
6918
|
reason: text("reason"),
|
|
@@ -6918,7 +6923,8 @@ var computerRuns = sqliteTable("computer_runs", {
|
|
|
6918
6923
|
threadIdx: index("computer_runs_thread_idx").on(t.threadId, t.startedAt),
|
|
6919
6924
|
sessionIdx: index("computer_runs_session_idx").on(t.computerSessionId, t.startedAt),
|
|
6920
6925
|
statusIdx: index("computer_runs_status_idx").on(t.computerId, t.status),
|
|
6921
|
-
runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState)
|
|
6926
|
+
runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState),
|
|
6927
|
+
retentionDueIdx: index("computer_runs_retention_due_idx").on(t.retentionPolicy, t.status, t.retentionDeadlineAt)
|
|
6922
6928
|
}));
|
|
6923
6929
|
var packageCacheObjects = sqliteTable("package_cache_objects", {
|
|
6924
6930
|
key: text("key").primaryKey(),
|
|
@@ -7893,6 +7899,8 @@ var events = sqliteTable("events", {
|
|
|
7893
7899
|
createdAt: ts("created_at").notNull()
|
|
7894
7900
|
}, (t) => ({
|
|
7895
7901
|
objectIdx: index("events_object_idx").on(t.objectType, t.objectId, t.createdAt),
|
|
7902
|
+
retentionMutationIdx: index("events_retention_mutation_idx").on(t.objectType, t.objectId, t.type, sql`trim(json_extract(${t.payload}, '$.mutationId'))`).where(sql`json_valid(${t.payload})`),
|
|
7903
|
+
retentionProcessIdx: index("events_retention_process_idx").on(t.objectType, t.objectId, t.type, sql`trim(json_extract(${t.payload}, '$.processId'))`).where(sql`json_valid(${t.payload})`),
|
|
7896
7904
|
createdIdx: index("events_created_idx").on(t.createdAt)
|
|
7897
7905
|
}));
|
|
7898
7906
|
var notifications = sqliteTable("notifications", {
|
|
@@ -8175,6 +8183,9 @@ var MAX_WAY_LEN = WAYS_TO_HELP_LIMITS.maxItemLength;
|
|
|
8175
8183
|
// ../core/src/ops/computer-output.ts
|
|
8176
8184
|
var COMPUTER_OUTPUT_DEFAULT_STALE_MS = 24 * 60 * 60 * 1000;
|
|
8177
8185
|
|
|
8186
|
+
// ../core/src/ops/computer-run-retention.ts
|
|
8187
|
+
var COMPUTER_RUN_RETENTION_WARNING_MS = 24 * 60 * 60 * 1000;
|
|
8188
|
+
|
|
8178
8189
|
// ../core/src/ops/computer-run.ts
|
|
8179
8190
|
var COMPUTER_RUN_START_CHECKPOINT_RESERVATION_STALE_MS = 12 * 60 * 1000;
|
|
8180
8191
|
var COMPUTER_RUN_F1_FINAL_FAILURE_CODES = new Set([
|
|
@@ -10053,6 +10064,39 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
10053
10064
|
})
|
|
10054
10065
|
])
|
|
10055
10066
|
}),
|
|
10067
|
+
computer_run_retention: looseObject({
|
|
10068
|
+
runId: id,
|
|
10069
|
+
destructiveExpiration: literal("disabled"),
|
|
10070
|
+
report: looseObject({
|
|
10071
|
+
policy: _enum(["none", "isolated-run-14d"]),
|
|
10072
|
+
deadlineAt: timestamp.nullable(),
|
|
10073
|
+
meaningfulUseAt: timestamp.nullable(),
|
|
10074
|
+
keep: boolean2(),
|
|
10075
|
+
revision: number2().int().min(0),
|
|
10076
|
+
warningDelivery: literal("advisory-only"),
|
|
10077
|
+
destructiveExpiration: literal("disabled"),
|
|
10078
|
+
decision: _enum(["excluded", "not-due", "kept", "deferred", "eligible"]),
|
|
10079
|
+
reasonCode: string2(),
|
|
10080
|
+
warningDue: boolean2(),
|
|
10081
|
+
warningLossScope: string2(),
|
|
10082
|
+
warningAction: literal("computer_run_keep")
|
|
10083
|
+
})
|
|
10084
|
+
}),
|
|
10085
|
+
computer_run_keep: looseObject({
|
|
10086
|
+
runId: id,
|
|
10087
|
+
keep: boolean2(),
|
|
10088
|
+
revision: number2().int().min(0),
|
|
10089
|
+
replayed: boolean2(),
|
|
10090
|
+
retention: looseObject({
|
|
10091
|
+
policy: _enum(["none", "isolated-run-14d"]),
|
|
10092
|
+
deadlineAt: timestamp.nullable(),
|
|
10093
|
+
meaningfulUseAt: timestamp.nullable(),
|
|
10094
|
+
keep: boolean2(),
|
|
10095
|
+
revision: number2().int().min(0),
|
|
10096
|
+
warningDelivery: literal("advisory-only"),
|
|
10097
|
+
destructiveExpiration: literal("disabled")
|
|
10098
|
+
})
|
|
10099
|
+
}),
|
|
10056
10100
|
computer_runs: looseObject({
|
|
10057
10101
|
computerId: id,
|
|
10058
10102
|
threadId: id,
|
|
@@ -10728,6 +10772,8 @@ var MCP_TOOL_ANNOTATIONS = {
|
|
|
10728
10772
|
computer_repo_work_status: readOnly,
|
|
10729
10773
|
computer_run_finish: idempotent,
|
|
10730
10774
|
computer_run_receipt: readOnly,
|
|
10775
|
+
computer_run_retention: readOnly,
|
|
10776
|
+
computer_run_keep: idempotent,
|
|
10731
10777
|
computer_runs: readOnly,
|
|
10732
10778
|
computer_exec: destructiveOpenWorld,
|
|
10733
10779
|
computer_run_setup: destructiveIdempotentOpenWorld,
|
|
@@ -11058,7 +11104,7 @@ var ORIENTATION_SECTIONS = [
|
|
|
11058
11104
|
},
|
|
11059
11105
|
{
|
|
11060
11106
|
brief: null,
|
|
11061
|
-
full: `Run \`arbor help\` (or read the MCP tool list) for
|
|
11107
|
+
full: `Run \`arbor help\` (or read the MCP tool list) for exact commands and flags. Computers are temporary: push Git work or publish/export a needed artifact outside them, suspend for an external wait, and finish the Run when done.`
|
|
11062
11108
|
}
|
|
11063
11109
|
];
|
|
11064
11110
|
var ORIENTATION = renderOrientation(ORIENTATION_SECTIONS);
|
|
@@ -11086,8 +11132,8 @@ var COMPUTER_ORIENTATION_SECTIONS = [
|
|
|
11086
11132
|
full: `2. READ THE CAPABILITIES CARD, NOT THE BACKEND. runId is the one address: every runtime tool takes it, and the computerSessionId a Run carries is legacy input. computer_status(runId) describes the live PARENT Thread Computer behind a shared Run; it does not establish isolated Run activity, so use computer_run_receipt(runId) and computer_process_read for Run-owned work. Command-line utilities, including Git and package managers, run through computer_exec; check unfamiliar binaries with command -v.`
|
|
11087
11133
|
},
|
|
11088
11134
|
{
|
|
11089
|
-
brief: "3.
|
|
11090
|
-
full: `3. ONE RUN PER TASK. A write Run defaults to an isolated execution environment with its own filesystem, processes, ports, and /tmp while preserving /workspace paths; a read Run shares the parent. Pass runId to Run-aware tools. If a response is lost, recover the durable operation/process identity from computer_run_receipt and read it before retrying. computer_process_read settles a provider-absent current-generation process from exact evidence; computer_process_terminate sends one termination request and preserves the actual native terminal outcome from one bounded read. computer_run_suspend performs bounded settlement internally and never replays unknown work. A still-active process returns a retryable busy state; an unknown current-generation mutation fail-closes.
|
|
11135
|
+
brief: "3. Computers are temporary: one Run per task; save work outside the Computer, then finish; suspend for a wait.",
|
|
11136
|
+
full: `3. ONE RUN PER TASK. A write Run defaults to an isolated execution environment with its own filesystem, processes, ports, and /tmp while preserving /workspace paths; a read Run shares the parent. Pass runId to Run-aware tools. If a response is lost, recover the durable operation/process identity from computer_run_receipt and read it before retrying. computer_process_read settles a provider-absent current-generation process from exact evidence; computer_process_terminate sends one termination request and preserves the actual native terminal outcome from one bounded read. computer_run_suspend performs bounded settlement internally and never replays unknown work. A still-active process returns a retryable busy state; an unknown current-generation mutation fail-closes. A local commit or Preview is not Git publication; push Git work or publish/export a needed artifact outside the Computer, then call computer_run_finish when done. Suspend for an external wait. discard=true with outcome failed or cancelled explicitly abandons Git work only after provider work is quiescent; it never overrides active or unknown execution.`
|
|
11091
11137
|
},
|
|
11092
11138
|
{
|
|
11093
11139
|
brief: "4. Checkpoint complete units with `computer_run_suspend`; one `computer_run_finish` request is enough.",
|
|
@@ -11860,9 +11906,10 @@ var ACTION_DEFINITIONS = [
|
|
|
11860
11906
|
{
|
|
11861
11907
|
name: "computer_open",
|
|
11862
11908
|
title: "Open a Thread computer",
|
|
11863
|
-
description: "Deprecated by AD-306: start work with computer_run_start(threadId, mode) instead; this alias remains one release and boots the parent Thread Computer, returning a computerSessionId. Use it only for a legacy client that still addresses the parent by cms_ id; unsafe recovery is refused and unresolved newer workspace state stays fail-closed.",
|
|
11909
|
+
description: "Deprecated by AD-306: start work with computer_run_start(threadId, mode) instead; this alias remains one release and boots the parent Thread Computer, returning a computerSessionId. An optional owned active runId records a successful session attach as Run retention activity. Use it only for a legacy client that still addresses the parent by cms_ id; unsafe recovery is refused and unresolved newer workspace state stays fail-closed.",
|
|
11864
11910
|
inputSchema: {
|
|
11865
11911
|
threadId: string2().describe("the Arbor Thread whose stable computer to open, thr_…"),
|
|
11912
|
+
runId: string2().optional().describe("optional owned active Run; successful open renews its retention deadline"),
|
|
11866
11913
|
idempotencyKey: string2().trim().min(1).max(200).optional().describe("optional explicit key for ONE distinct logical open; omission reuses the durable profile/Thread/recipe identity; changed options require a distinct intent; retry unchanged after response loss and never mint a new key to bypass unresolved work"),
|
|
11867
11914
|
vcpus: number2().int().min(1).max(4).optional().describe("optional container vCPU request"),
|
|
11868
11915
|
label: string2().optional().describe("short runtime label for operator diagnostics")
|
|
@@ -11887,7 +11934,7 @@ var ACTION_DEFINITIONS = [
|
|
|
11887
11934
|
{
|
|
11888
11935
|
name: "computer_run_start",
|
|
11889
11936
|
title: "Start a run",
|
|
11890
|
-
description: `Start an isolated write Run or shared/read Run with one idempotencyKey;
|
|
11937
|
+
description: `Start an isolated write Run or shared/read Run with one idempotencyKey; pending admission returns runStartId for receipt observation while the lifecycle owner continues independently. Save work outside the temporary Computer and finish the Run when done; first use: read the Computer guide at ${AGENT_GUIDE_URLS.computer}.`,
|
|
11891
11938
|
inputSchema: {
|
|
11892
11939
|
threadId: string2().optional().describe("the Thread whose Computer this Run works in, thr_…; the canonical Run-first front door"),
|
|
11893
11940
|
computerSessionId: string2().optional().describe("legacy compatibility alternative to threadId: an existing parent computerSessionId, cms_…"),
|
|
@@ -11907,7 +11954,7 @@ var ACTION_DEFINITIONS = [
|
|
|
11907
11954
|
{
|
|
11908
11955
|
name: "computer_run_suspend",
|
|
11909
11956
|
title: "Suspend a run",
|
|
11910
|
-
description: "Checkpoint an active WRITE Run for an external wait: isolated Runs publish their exact workspace and release the Sandbox; shared Runs checkpoint the parent, and
|
|
11957
|
+
description: "Checkpoint an active WRITE Run for an external wait: isolated Runs publish their exact workspace and release the Sandbox; shared Runs checkpoint the parent, and same runId resumes. Preserves unread terminal output internally for 30 days; no caller drain is required, and active/unknown work or failed preservation blocks release without replay; save needed work outside the temporary Computer first.",
|
|
11911
11958
|
inputSchema: {
|
|
11912
11959
|
runId: string2().describe("the active WRITE Run to suspend, run_…")
|
|
11913
11960
|
},
|
|
@@ -11929,7 +11976,7 @@ var ACTION_DEFINITIONS = [
|
|
|
11929
11976
|
{
|
|
11930
11977
|
name: "computer_run_finish",
|
|
11931
11978
|
title: "Finish a run",
|
|
11932
|
-
description: "
|
|
11979
|
+
description: "Finish after pushing Git or publishing/exporting artifacts outside this Computer; unread output lasts 30 days. An isolated Run may return status active with finishRequest pending while its owner proves Git durability, quiescence, checkpoint, and release without caller cleanup; send once, read the receipt, and use discard=true with failed or cancelled only to abandon Git after provider quiescence.",
|
|
11933
11980
|
inputSchema: {
|
|
11934
11981
|
runId: string2().describe("the runId returned by computer_run_start, run_…"),
|
|
11935
11982
|
outcome: _enum(["finished", "failed", "cancelled"]).optional().describe("terminal outcome; defaults to finished"),
|
|
@@ -11943,7 +11990,7 @@ var ACTION_DEFINITIONS = [
|
|
|
11943
11990
|
{
|
|
11944
11991
|
name: "computer_run_receipt",
|
|
11945
11992
|
title: "Read a run receipt",
|
|
11946
|
-
description: "Read
|
|
11993
|
+
description: "Read pending admission, finish continuation, Run-owned operation/activity state, and providerLifecycle with exactly one of runId or runStartId instead of parent computer_status. This read drives nothing; setupReadiness is not an instruction to reinstall: run computer_run_setup when the task needs a prepared workspace, then save work outside the temporary Computer before finishing.",
|
|
11947
11994
|
inputSchema: {
|
|
11948
11995
|
runId: string2().optional().describe("the Run to read, run_…; provide exactly one of runId or runStartId"),
|
|
11949
11996
|
runStartId: string2().optional().describe("the pending or linked RunStart to read, rsr_…; alternative to runId")
|
|
@@ -11952,6 +11999,30 @@ var ACTION_DEFINITIONS = [
|
|
|
11952
11999
|
toolset: "loop",
|
|
11953
12000
|
run: forward("computer_runtime.run_receipt")
|
|
11954
12001
|
},
|
|
12002
|
+
{
|
|
12003
|
+
name: "computer_run_retention",
|
|
12004
|
+
title: "Inspect Run retention",
|
|
12005
|
+
description: "Report the deadline, last meaningful use, Keep flag, and advisory warning for one isolated Run. Expiry is disabled; this read sends no warning and releases nothing.",
|
|
12006
|
+
inputSchema: {
|
|
12007
|
+
runId: string2().describe("the Run to inspect, run_…")
|
|
12008
|
+
},
|
|
12009
|
+
surfaces: ["computer-mcp", "computer-cli"],
|
|
12010
|
+
toolset: "loop",
|
|
12011
|
+
run: forward("computer_runtime.run_retention")
|
|
12012
|
+
},
|
|
12013
|
+
{
|
|
12014
|
+
name: "computer_run_keep",
|
|
12015
|
+
title: "Keep Run data",
|
|
12016
|
+
description: "The Run owner or an organization admin can set or clear Keep for a newly created isolated Run, using expectedRevision to guard races. It protects restorable Run data without keeping provider compute alive; expiry remains disabled.",
|
|
12017
|
+
inputSchema: {
|
|
12018
|
+
runId: string2().describe("the Run to protect, run_…"),
|
|
12019
|
+
keep: boolean2().describe("true to retain the Run's restorable data; false to resume the policy"),
|
|
12020
|
+
expectedRevision: number2().int().nonnegative().optional().describe("optional retention revision read from computer_run_receipt")
|
|
12021
|
+
},
|
|
12022
|
+
surfaces: ["computer-mcp", "computer-cli"],
|
|
12023
|
+
toolset: "loop",
|
|
12024
|
+
run: forward("computer_runtime.run_keep")
|
|
12025
|
+
},
|
|
11955
12026
|
{
|
|
11956
12027
|
name: "computer_run_setup",
|
|
11957
12028
|
title: "Run the declared setup",
|
|
@@ -11983,7 +12054,7 @@ var ACTION_DEFINITIONS = [
|
|
|
11983
12054
|
{
|
|
11984
12055
|
name: "computer_exec",
|
|
11985
12056
|
title: "Run a command",
|
|
11986
|
-
description: "Run a shell command in runId with ambient GitHub authorization; timeout kills the process
|
|
12057
|
+
description: "Run a shell command in runId with ambient GitHub authorization; timeout kills the process, so save results outside this Computer and finish the Run when done. Use waitForTerminalMs, then computer_process_read with nextCursor for a truncated output page; background is mutually exclusive, and after response loss read computer_run_receipt.operations[].operationId instead of repeating the mutation.",
|
|
11987
12058
|
inputSchema: {
|
|
11988
12059
|
computerSessionId: string2().optional().describe("legacy alternative to runId: a computerSessionId on that Computer, cms_…; required unless runId is supplied"),
|
|
11989
12060
|
command: string2().min(1).describe("the shell command to run"),
|
|
@@ -12033,7 +12104,7 @@ var ACTION_DEFINITIONS = [
|
|
|
12033
12104
|
{
|
|
12034
12105
|
name: "computer_status",
|
|
12035
12106
|
title: "Inspect a computer",
|
|
12036
|
-
description: "Inspect the live PARENT Thread Computer behind runId
|
|
12107
|
+
description: "Inspect the live PARENT Thread Computer behind runId for capabilities, can-I-exec readiness, processes, and profile; save needed work outside this temporary Computer. It does not report isolated Run command state (computer_run_receipt) or restore-safety (get_computer); transient unavailability drops command capabilities, and a terminal unknown mutation is a non-retryable stop.",
|
|
12037
12108
|
inputSchema: {
|
|
12038
12109
|
runId: string2().optional().describe("the Run whose parent Computer to inspect, run_…"),
|
|
12039
12110
|
computerSessionId: string2().optional().describe("legacy alternative to runId: a computerSessionId on that Computer, cms_…")
|
|
@@ -15664,7 +15735,7 @@ async function renderMe(ctx, action) {
|
|
|
15664
15735
|
` : "") + spaceLines;
|
|
15665
15736
|
emitDual(me, human, action, ctx);
|
|
15666
15737
|
}
|
|
15667
|
-
var CLI_NOTE = `On this CLI, before your first write: commands are NOUN-VERB (\`thread get\`, \`space get\`, not \`get thread\`). The underscore tool-names you see in MCP, recall, and docs (\`set_space_charter\`, \`transition_thread\`) work as CLI commands VERBATIM too — \`set_space_charter …\` and \`set space charter …\` are the same command, either form. Computer work is Run-first: start project work with \`arbor computer run start --thread-id thr_… --mode write --idempotency-key scope-run-1\`, reuse that key only for the same logical Run, keep its runId, and pass \`--run-id run_…\` to later commands such as \`computer run suspend --run-id run_…\`, \`computer run finish --run-id run_…\`, and \`computer run receipt --run-id run_…\`.
|
|
15738
|
+
var CLI_NOTE = `On this CLI, before your first write: commands are NOUN-VERB (\`thread get\`, \`space get\`, not \`get thread\`). The underscore tool-names you see in MCP, recall, and docs (\`set_space_charter\`, \`transition_thread\`) work as CLI commands VERBATIM too — \`set_space_charter …\` and \`set space charter …\` are the same command, either form. Computer work is Run-first: start project work with \`arbor computer run start --thread-id thr_… --mode write --idempotency-key scope-run-1\`, reuse that key only for the same logical Run, keep its runId, and pass \`--run-id run_…\` to later commands such as \`computer run suspend --run-id run_…\`, \`computer run finish --run-id run_…\`, and \`computer run receipt --run-id run_…\`. Computers are temporary: push Git work or publish/export a needed artifact outside them; suspend for a wait and make one durable finish request when done. Read the receipt when you need the result. Finish and suspend preserve unread terminal output internally, so no caller drain is required. A public screenshot is lighter: \`arbor computer verify --thread-id thr_… --target-url https://…\` runs directly without starting a Run, and returns a gated download URL plus ready-to-place Markdown; put that Markdown where the image belongs in the contribution body and pass the matching attachment id. A single-argument command also takes a bare positional — \`recall "your question"\`, \`thread get thr_…\` — so you don't have to name the obvious flag. Flag names are kebab-derived from the inputs (\`--thread-id\`, \`--request-id\`, \`--contribution-id\` — not \`--thread\`/\`--request\`), so check \`arbor help\` or \`arbor <command> --help\` (now focused on that command's flags) instead of guessing. Pass long/markdown bodies via \`--body-file -\` (stdin), never shell-quoted; a one-line \`--summary\` (1-2 short sentences, hard limit 500 chars) on a long contribution becomes its recall snippet. List inputs always accept a REPEATED flag, one item each (\`--guidance "…" --guidance "…"\`) — the form that works everywhere. A single value additionally comma-splits for TOKEN lists (\`--capabilities a,b,c\`), but stays one literal item for PROSE lists (\`--guidance\`, \`--ways-to-help\`, \`--contribution-lanes\`) so a comma inside a sentence can't shred it; \`arbor <command> --help\` names which form each list flag takes. \`tree\` is the lifecycle map (default depth \`topics\`, external page 4): choose a Topic, then \`recall --topic top_… "your question"\` before targeted \`thread get\`/\`artifact get\`; continue with \`--cursor\`, use \`--all\` only for intentional complete enumeration, and scope \`--depth threads\` to one Space or Topic. If \`inbox\` is empty, that's "nothing needs you" — but if you're unsure your auth resolved, \`whoami\` confirms it.`;
|
|
15668
15739
|
function renderOrient(ctx) {
|
|
15669
15740
|
emitDual({ orientation: ORIENTATION, cliNote: CLI_NOTE }, `${ORIENTATION}
|
|
15670
15741
|
|
package/package.json
CHANGED