@lambdacurry/arbor 0.21.33 → 0.21.34
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 +137 -4
- package/package.json +1 -1
package/dist/arbor.js
CHANGED
|
@@ -16397,6 +16397,19 @@ var computerSnapshots = sqliteTable("computer_snapshots", {
|
|
|
16397
16397
|
runIdx: index("computer_snapshots_run_idx").on(t.runId, t.createdAt),
|
|
16398
16398
|
parentIdx: index("computer_snapshots_parent_idx").on(t.parentSnapshotId)
|
|
16399
16399
|
}));
|
|
16400
|
+
var computerSnapshotEvidence = sqliteTable("computer_snapshot_evidence", {
|
|
16401
|
+
snapshotId: text("snapshot_id").primaryKey().references(() => computerSnapshots.id),
|
|
16402
|
+
purpose: text("purpose").$type().notNull(),
|
|
16403
|
+
resumability: text("resumability").$type().notNull(),
|
|
16404
|
+
captureQuality: text("capture_quality").$type().notNull(),
|
|
16405
|
+
unresolvedOperationIds: text("unresolved_operation_ids", { mode: "json" }).$type().notNull(),
|
|
16406
|
+
operationWatermark: integer2("operation_watermark").notNull(),
|
|
16407
|
+
providerGeneration: integer2("provider_generation").notNull(),
|
|
16408
|
+
evidenceKey: text("evidence_key").notNull(),
|
|
16409
|
+
createdAt: ts("created_at").notNull()
|
|
16410
|
+
}, (t) => ({
|
|
16411
|
+
evidenceKeyIdx: uniqueIndex("computer_snapshot_evidence_key_idx").on(t.evidenceKey)
|
|
16412
|
+
}));
|
|
16400
16413
|
var computerRunStarts = sqliteTable("computer_run_starts", {
|
|
16401
16414
|
id: text("id").primaryKey(),
|
|
16402
16415
|
computerId: text("computer_id").notNull().references(() => threadComputers.id),
|
|
@@ -17146,6 +17159,8 @@ var EMOJI_RE = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
|
17146
17159
|
var BASE_MS = Date.parse("2026-07-20T15:00:00.000Z");
|
|
17147
17160
|
// ../core/src/ops/agent-pairing.ts
|
|
17148
17161
|
var PAIRING_TTL_MS = 15 * 60 * 1000;
|
|
17162
|
+
// ../core/src/ops/computer-recovery.ts
|
|
17163
|
+
var COMPUTER_RECOVERY_GRANT_MAX_TTL_MS = 24 * 60 * 60 * 1000;
|
|
17149
17164
|
// ../core/src/ops/preview.ts
|
|
17150
17165
|
var PREVIEW_ENTRY_MIME = "text/html; charset=utf-8";
|
|
17151
17166
|
var PREVIEW_MAX_BYTES = 2 * 1024 * 1024;
|
|
@@ -17505,7 +17520,7 @@ var computerRun = exports_external.looseObject({
|
|
|
17505
17520
|
startedAt: exports_external.string(),
|
|
17506
17521
|
endedAt: exports_external.string().nullable()
|
|
17507
17522
|
});
|
|
17508
|
-
var
|
|
17523
|
+
var computerRunReceipt2 = exports_external.looseObject({
|
|
17509
17524
|
runId: id,
|
|
17510
17525
|
threadId: id,
|
|
17511
17526
|
computerId: id,
|
|
@@ -18463,7 +18478,7 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
18463
18478
|
})
|
|
18464
18479
|
}),
|
|
18465
18480
|
computer_run_receipt: exports_external.looseObject({
|
|
18466
|
-
receipt:
|
|
18481
|
+
receipt: computerRunReceipt2
|
|
18467
18482
|
}),
|
|
18468
18483
|
computer_runs: exports_external.looseObject({
|
|
18469
18484
|
computerId: id,
|
|
@@ -21643,6 +21658,124 @@ function retentionAction(action) {
|
|
|
21643
21658
|
}
|
|
21644
21659
|
var ACTIONS2 = ACTIONS.map(retentionAction);
|
|
21645
21660
|
|
|
21661
|
+
// ../actions/src/recovery-entry.ts
|
|
21662
|
+
var grantOutput = exports_external.object({
|
|
21663
|
+
grant: exports_external.object({
|
|
21664
|
+
grantId: exports_external.string(),
|
|
21665
|
+
requestId: exports_external.string(),
|
|
21666
|
+
threadId: exports_external.string(),
|
|
21667
|
+
runId: exports_external.string(),
|
|
21668
|
+
computerId: exports_external.string(),
|
|
21669
|
+
granteeProfileId: exports_external.string(),
|
|
21670
|
+
grantedByProfileId: exports_external.string(),
|
|
21671
|
+
expiresAt: exports_external.string(),
|
|
21672
|
+
createdAt: exports_external.string(),
|
|
21673
|
+
revokedAt: exports_external.string().nullable(),
|
|
21674
|
+
revokedByProfileId: exports_external.string().nullable()
|
|
21675
|
+
}),
|
|
21676
|
+
replayed: exports_external.boolean()
|
|
21677
|
+
});
|
|
21678
|
+
var diagnosticOutput = exports_external.object({
|
|
21679
|
+
grant: exports_external.object({
|
|
21680
|
+
grantId: exports_external.string(),
|
|
21681
|
+
requestId: exports_external.string(),
|
|
21682
|
+
expiresAt: exports_external.string()
|
|
21683
|
+
}),
|
|
21684
|
+
diagnostic: exports_external.object({
|
|
21685
|
+
runId: exports_external.string(),
|
|
21686
|
+
computerId: exports_external.string(),
|
|
21687
|
+
computerGeneration: exports_external.number().int().positive(),
|
|
21688
|
+
status: exports_external.enum(["active", "finished", "failed", "cancelled"]),
|
|
21689
|
+
outcome: exports_external.enum(["finished", "failed", "cancelled"]).nullable(),
|
|
21690
|
+
reasonCode: exports_external.string().nullable(),
|
|
21691
|
+
runtimeState: exports_external.enum(["shared", "live", "suspended", "releasing", "released"]),
|
|
21692
|
+
snapshotLineage: exports_external.object({
|
|
21693
|
+
baseSnapshotId: exports_external.string().nullable(),
|
|
21694
|
+
currentSnapshotId: exports_external.string().nullable()
|
|
21695
|
+
}),
|
|
21696
|
+
providerState: exports_external.object({
|
|
21697
|
+
generation: exports_external.number().int().min(0).nullable(),
|
|
21698
|
+
lastPhase: exports_external.string().nullable(),
|
|
21699
|
+
lastReasonCode: exports_external.string().nullable()
|
|
21700
|
+
}),
|
|
21701
|
+
operations: exports_external.array(exports_external.object({
|
|
21702
|
+
operationId: exports_external.string(),
|
|
21703
|
+
execution: exports_external.enum(["foreground", "background"]),
|
|
21704
|
+
state: exports_external.enum([
|
|
21705
|
+
"starting",
|
|
21706
|
+
"running",
|
|
21707
|
+
"completed",
|
|
21708
|
+
"failed",
|
|
21709
|
+
"cancelled",
|
|
21710
|
+
"not-routed",
|
|
21711
|
+
"provider-lost",
|
|
21712
|
+
"unknown"
|
|
21713
|
+
]),
|
|
21714
|
+
mutationRetrySafety: exports_external.enum(["not-needed", "safe", "unsafe", "unknown"]),
|
|
21715
|
+
reasonCode: exports_external.string()
|
|
21716
|
+
}))
|
|
21717
|
+
}),
|
|
21718
|
+
auditEventId: exports_external.string()
|
|
21719
|
+
});
|
|
21720
|
+
var additive2 = {
|
|
21721
|
+
readOnlyHint: false,
|
|
21722
|
+
destructiveHint: false,
|
|
21723
|
+
idempotentHint: true,
|
|
21724
|
+
openWorldHint: false
|
|
21725
|
+
};
|
|
21726
|
+
var auditedRead = {
|
|
21727
|
+
readOnlyHint: false,
|
|
21728
|
+
destructiveHint: false,
|
|
21729
|
+
idempotentHint: false,
|
|
21730
|
+
openWorldHint: false
|
|
21731
|
+
};
|
|
21732
|
+
var RECOVERY_ACTIONS = [
|
|
21733
|
+
{
|
|
21734
|
+
name: "computer_recovery_grant",
|
|
21735
|
+
title: "Grant delegated Computer recovery",
|
|
21736
|
+
description: "Issue one short-lived diagnostic grant for a profile explicitly targeted by the same open Request and exact Run. This grants no execution, file, environment, Secret, Git, checkpoint, or lifecycle capability.",
|
|
21737
|
+
inputSchema: {
|
|
21738
|
+
requestId: exports_external.string().describe("the targeted open Request authorizing this recovery scope, req_…"),
|
|
21739
|
+
runId: exports_external.string().describe("the exact Run whose diagnostic state may be inspected, run_…"),
|
|
21740
|
+
granteeProfileId: exports_external.string().describe("the exact targeted profile receiving diagnostic visibility"),
|
|
21741
|
+
expiresAt: exports_external.string().describe("future ISO timestamp, at most 24 hours and never after Request expiry"),
|
|
21742
|
+
idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this one logical grant")
|
|
21743
|
+
},
|
|
21744
|
+
outputSchema: grantOutput,
|
|
21745
|
+
annotations: additive2,
|
|
21746
|
+
surfaces: ["computer-mcp"],
|
|
21747
|
+
toolset: "loop",
|
|
21748
|
+
run: (ex, input) => ex.call("computer_recovery.grant", input)
|
|
21749
|
+
},
|
|
21750
|
+
{
|
|
21751
|
+
name: "computer_recovery_revoke",
|
|
21752
|
+
title: "Revoke delegated Computer recovery",
|
|
21753
|
+
description: "Revoke one previously issued delegated diagnostic grant without touching the Computer or provider. Repeating the same revoke is an idempotent no-op.",
|
|
21754
|
+
inputSchema: {
|
|
21755
|
+
grantId: exports_external.string().describe("the delegated recovery grant, crg_…")
|
|
21756
|
+
},
|
|
21757
|
+
outputSchema: grantOutput,
|
|
21758
|
+
annotations: additive2,
|
|
21759
|
+
surfaces: ["computer-mcp"],
|
|
21760
|
+
toolset: "loop",
|
|
21761
|
+
run: (ex, input) => ex.call("computer_recovery.revoke", input)
|
|
21762
|
+
},
|
|
21763
|
+
{
|
|
21764
|
+
name: "computer_recovery_inspect",
|
|
21765
|
+
title: "Inspect delegated Computer recovery state",
|
|
21766
|
+
description: "Read only the sanitized diagnostic projection authorized by one live delegated grant; every successful read records an attributed Arbor audit Event. It never calls the provider or exposes repository paths/heads, command output, environment, Secrets, sessions, or mutation controls.",
|
|
21767
|
+
inputSchema: {
|
|
21768
|
+
grantId: exports_external.string().describe("the delegated recovery grant, crg_…")
|
|
21769
|
+
},
|
|
21770
|
+
outputSchema: diagnosticOutput,
|
|
21771
|
+
annotations: auditedRead,
|
|
21772
|
+
surfaces: ["computer-mcp"],
|
|
21773
|
+
toolset: "loop",
|
|
21774
|
+
run: (ex, input) => ex.call("computer_recovery.inspect", input)
|
|
21775
|
+
}
|
|
21776
|
+
];
|
|
21777
|
+
var ACTIONS3 = [...ACTIONS2, ...RECOVERY_ACTIONS];
|
|
21778
|
+
|
|
21646
21779
|
// src/config.ts
|
|
21647
21780
|
import {
|
|
21648
21781
|
chmodSync,
|
|
@@ -22044,7 +22177,7 @@ function emitDual(data, human, action, ctx) {
|
|
|
22044
22177
|
// src/computer-exec-wait.ts
|
|
22045
22178
|
var DEFAULT_PROCESS_DEADLINE_MS = 1800000;
|
|
22046
22179
|
var POLL_MS = 400;
|
|
22047
|
-
var processRead =
|
|
22180
|
+
var processRead = ACTIONS3.find((action) => action.name === "computer_process_read");
|
|
22048
22181
|
function record3(value) {
|
|
22049
22182
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
22050
22183
|
}
|
|
@@ -22314,7 +22447,7 @@ var MCP_COMMAND_ALIASES = {
|
|
|
22314
22447
|
function commandWords(action) {
|
|
22315
22448
|
return COMMAND_WORD_OVERRIDES[action.name] ?? action.name.replace(/_/g, " ");
|
|
22316
22449
|
}
|
|
22317
|
-
var CLI_ACTIONS =
|
|
22450
|
+
var CLI_ACTIONS = ACTIONS3.filter((a) => a.surfaces.includes("cli") || a.surfaces.includes("computer-cli"));
|
|
22318
22451
|
var BY_ACTION_NAME = new Map(CLI_ACTIONS.map((action) => [action.name, action]));
|
|
22319
22452
|
var BY_COMMAND = new Map(CLI_ACTIONS.map((a) => [commandWords(a), a]));
|
|
22320
22453
|
for (const [alias2, actionName] of Object.entries(MCP_COMMAND_ALIASES)) {
|
package/package.json
CHANGED