@lambdacurry/arbor 0.21.33 → 0.21.35
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 +146 -4
- package/package.json +1 -1
package/dist/arbor.js
CHANGED
|
@@ -14328,6 +14328,7 @@ var ERROR_REASONS = new Set([
|
|
|
14328
14328
|
"resource.not_found",
|
|
14329
14329
|
"conflict.state",
|
|
14330
14330
|
"conflict.computer_recipe",
|
|
14331
|
+
"conflict.catalog",
|
|
14331
14332
|
"limit.exceeded",
|
|
14332
14333
|
"provider.timeout",
|
|
14333
14334
|
"provider.failure",
|
|
@@ -16397,6 +16398,19 @@ var computerSnapshots = sqliteTable("computer_snapshots", {
|
|
|
16397
16398
|
runIdx: index("computer_snapshots_run_idx").on(t.runId, t.createdAt),
|
|
16398
16399
|
parentIdx: index("computer_snapshots_parent_idx").on(t.parentSnapshotId)
|
|
16399
16400
|
}));
|
|
16401
|
+
var computerSnapshotEvidence = sqliteTable("computer_snapshot_evidence", {
|
|
16402
|
+
snapshotId: text("snapshot_id").primaryKey().references(() => computerSnapshots.id),
|
|
16403
|
+
purpose: text("purpose").$type().notNull(),
|
|
16404
|
+
resumability: text("resumability").$type().notNull(),
|
|
16405
|
+
captureQuality: text("capture_quality").$type().notNull(),
|
|
16406
|
+
unresolvedOperationIds: text("unresolved_operation_ids", { mode: "json" }).$type().notNull(),
|
|
16407
|
+
operationWatermark: integer2("operation_watermark").notNull(),
|
|
16408
|
+
providerGeneration: integer2("provider_generation").notNull(),
|
|
16409
|
+
evidenceKey: text("evidence_key").notNull(),
|
|
16410
|
+
createdAt: ts("created_at").notNull()
|
|
16411
|
+
}, (t) => ({
|
|
16412
|
+
evidenceKeyIdx: uniqueIndex("computer_snapshot_evidence_key_idx").on(t.evidenceKey)
|
|
16413
|
+
}));
|
|
16400
16414
|
var computerRunStarts = sqliteTable("computer_run_starts", {
|
|
16401
16415
|
id: text("id").primaryKey(),
|
|
16402
16416
|
computerId: text("computer_id").notNull().references(() => threadComputers.id),
|
|
@@ -17146,6 +17160,8 @@ var EMOJI_RE = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
|
17146
17160
|
var BASE_MS = Date.parse("2026-07-20T15:00:00.000Z");
|
|
17147
17161
|
// ../core/src/ops/agent-pairing.ts
|
|
17148
17162
|
var PAIRING_TTL_MS = 15 * 60 * 1000;
|
|
17163
|
+
// ../core/src/ops/computer-recovery.ts
|
|
17164
|
+
var COMPUTER_RECOVERY_GRANT_MAX_TTL_MS = 24 * 60 * 60 * 1000;
|
|
17149
17165
|
// ../core/src/ops/preview.ts
|
|
17150
17166
|
var PREVIEW_ENTRY_MIME = "text/html; charset=utf-8";
|
|
17151
17167
|
var PREVIEW_MAX_BYTES = 2 * 1024 * 1024;
|
|
@@ -17505,7 +17521,7 @@ var computerRun = exports_external.looseObject({
|
|
|
17505
17521
|
startedAt: exports_external.string(),
|
|
17506
17522
|
endedAt: exports_external.string().nullable()
|
|
17507
17523
|
});
|
|
17508
|
-
var
|
|
17524
|
+
var computerRunReceipt2 = exports_external.looseObject({
|
|
17509
17525
|
runId: id,
|
|
17510
17526
|
threadId: id,
|
|
17511
17527
|
computerId: id,
|
|
@@ -17888,6 +17904,7 @@ var paged = (key, item) => exports_external.looseObject({
|
|
|
17888
17904
|
var MCP_OUTPUT_SCHEMAS = {
|
|
17889
17905
|
server_info: exports_external.looseObject({
|
|
17890
17906
|
serverVersion: exports_external.string(),
|
|
17907
|
+
catalogRevision: exports_external.string(),
|
|
17891
17908
|
deployment: exports_external.looseObject({ id: exports_external.string(), sourceRevision: exports_external.string().nullable(), deployedAt: timestamp }).nullable()
|
|
17892
17909
|
}),
|
|
17893
17910
|
recall: exports_external.object({ result: exports_external.array(recallHit) }),
|
|
@@ -18463,7 +18480,7 @@ var MCP_OUTPUT_SCHEMAS = {
|
|
|
18463
18480
|
})
|
|
18464
18481
|
}),
|
|
18465
18482
|
computer_run_receipt: exports_external.looseObject({
|
|
18466
|
-
receipt:
|
|
18483
|
+
receipt: computerRunReceipt2
|
|
18467
18484
|
}),
|
|
18468
18485
|
computer_runs: exports_external.looseObject({
|
|
18469
18486
|
computerId: id,
|
|
@@ -21643,6 +21660,124 @@ function retentionAction(action) {
|
|
|
21643
21660
|
}
|
|
21644
21661
|
var ACTIONS2 = ACTIONS.map(retentionAction);
|
|
21645
21662
|
|
|
21663
|
+
// ../actions/src/recovery-entry.ts
|
|
21664
|
+
var grantOutput = exports_external.object({
|
|
21665
|
+
grant: exports_external.object({
|
|
21666
|
+
grantId: exports_external.string(),
|
|
21667
|
+
requestId: exports_external.string(),
|
|
21668
|
+
threadId: exports_external.string(),
|
|
21669
|
+
runId: exports_external.string(),
|
|
21670
|
+
computerId: exports_external.string(),
|
|
21671
|
+
granteeProfileId: exports_external.string(),
|
|
21672
|
+
grantedByProfileId: exports_external.string(),
|
|
21673
|
+
expiresAt: exports_external.string(),
|
|
21674
|
+
createdAt: exports_external.string(),
|
|
21675
|
+
revokedAt: exports_external.string().nullable(),
|
|
21676
|
+
revokedByProfileId: exports_external.string().nullable()
|
|
21677
|
+
}),
|
|
21678
|
+
replayed: exports_external.boolean()
|
|
21679
|
+
});
|
|
21680
|
+
var diagnosticOutput = exports_external.object({
|
|
21681
|
+
grant: exports_external.object({
|
|
21682
|
+
grantId: exports_external.string(),
|
|
21683
|
+
requestId: exports_external.string(),
|
|
21684
|
+
expiresAt: exports_external.string()
|
|
21685
|
+
}),
|
|
21686
|
+
diagnostic: exports_external.object({
|
|
21687
|
+
runId: exports_external.string(),
|
|
21688
|
+
computerId: exports_external.string(),
|
|
21689
|
+
computerGeneration: exports_external.number().int().positive(),
|
|
21690
|
+
status: exports_external.enum(["active", "finished", "failed", "cancelled"]),
|
|
21691
|
+
outcome: exports_external.enum(["finished", "failed", "cancelled"]).nullable(),
|
|
21692
|
+
reasonCode: exports_external.string().nullable(),
|
|
21693
|
+
runtimeState: exports_external.enum(["shared", "live", "suspended", "releasing", "released"]),
|
|
21694
|
+
snapshotLineage: exports_external.object({
|
|
21695
|
+
baseSnapshotId: exports_external.string().nullable(),
|
|
21696
|
+
currentSnapshotId: exports_external.string().nullable()
|
|
21697
|
+
}),
|
|
21698
|
+
providerState: exports_external.object({
|
|
21699
|
+
generation: exports_external.number().int().min(0).nullable(),
|
|
21700
|
+
lastPhase: exports_external.string().nullable(),
|
|
21701
|
+
lastReasonCode: exports_external.string().nullable()
|
|
21702
|
+
}),
|
|
21703
|
+
operations: exports_external.array(exports_external.object({
|
|
21704
|
+
operationId: exports_external.string(),
|
|
21705
|
+
execution: exports_external.enum(["foreground", "background"]),
|
|
21706
|
+
state: exports_external.enum([
|
|
21707
|
+
"starting",
|
|
21708
|
+
"running",
|
|
21709
|
+
"completed",
|
|
21710
|
+
"failed",
|
|
21711
|
+
"cancelled",
|
|
21712
|
+
"not-routed",
|
|
21713
|
+
"provider-lost",
|
|
21714
|
+
"unknown"
|
|
21715
|
+
]),
|
|
21716
|
+
mutationRetrySafety: exports_external.enum(["not-needed", "safe", "unsafe", "unknown"]),
|
|
21717
|
+
reasonCode: exports_external.string()
|
|
21718
|
+
}))
|
|
21719
|
+
}),
|
|
21720
|
+
auditEventId: exports_external.string()
|
|
21721
|
+
});
|
|
21722
|
+
var additive2 = {
|
|
21723
|
+
readOnlyHint: false,
|
|
21724
|
+
destructiveHint: false,
|
|
21725
|
+
idempotentHint: true,
|
|
21726
|
+
openWorldHint: false
|
|
21727
|
+
};
|
|
21728
|
+
var auditedRead = {
|
|
21729
|
+
readOnlyHint: false,
|
|
21730
|
+
destructiveHint: false,
|
|
21731
|
+
idempotentHint: false,
|
|
21732
|
+
openWorldHint: false
|
|
21733
|
+
};
|
|
21734
|
+
var RECOVERY_ACTIONS = [
|
|
21735
|
+
{
|
|
21736
|
+
name: "computer_recovery_grant",
|
|
21737
|
+
title: "Grant delegated Computer recovery",
|
|
21738
|
+
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.",
|
|
21739
|
+
inputSchema: {
|
|
21740
|
+
requestId: exports_external.string().describe("the targeted open Request authorizing this recovery scope, req_…"),
|
|
21741
|
+
runId: exports_external.string().describe("the exact Run whose diagnostic state may be inspected, run_…"),
|
|
21742
|
+
granteeProfileId: exports_external.string().describe("the exact targeted profile receiving diagnostic visibility"),
|
|
21743
|
+
expiresAt: exports_external.string().describe("future ISO timestamp, at most 24 hours and never after Request expiry"),
|
|
21744
|
+
idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this one logical grant")
|
|
21745
|
+
},
|
|
21746
|
+
outputSchema: grantOutput,
|
|
21747
|
+
annotations: additive2,
|
|
21748
|
+
surfaces: ["computer-mcp"],
|
|
21749
|
+
toolset: "loop",
|
|
21750
|
+
run: (ex, input) => ex.call("computer_recovery.grant", input)
|
|
21751
|
+
},
|
|
21752
|
+
{
|
|
21753
|
+
name: "computer_recovery_revoke",
|
|
21754
|
+
title: "Revoke delegated Computer recovery",
|
|
21755
|
+
description: "Revoke one previously issued delegated diagnostic grant without touching the Computer or provider. Repeating the same revoke is an idempotent no-op.",
|
|
21756
|
+
inputSchema: {
|
|
21757
|
+
grantId: exports_external.string().describe("the delegated recovery grant, crg_…")
|
|
21758
|
+
},
|
|
21759
|
+
outputSchema: grantOutput,
|
|
21760
|
+
annotations: additive2,
|
|
21761
|
+
surfaces: ["computer-mcp"],
|
|
21762
|
+
toolset: "loop",
|
|
21763
|
+
run: (ex, input) => ex.call("computer_recovery.revoke", input)
|
|
21764
|
+
},
|
|
21765
|
+
{
|
|
21766
|
+
name: "computer_recovery_inspect",
|
|
21767
|
+
title: "Inspect delegated Computer recovery state",
|
|
21768
|
+
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.",
|
|
21769
|
+
inputSchema: {
|
|
21770
|
+
grantId: exports_external.string().describe("the delegated recovery grant, crg_…")
|
|
21771
|
+
},
|
|
21772
|
+
outputSchema: diagnosticOutput,
|
|
21773
|
+
annotations: auditedRead,
|
|
21774
|
+
surfaces: ["computer-mcp"],
|
|
21775
|
+
toolset: "loop",
|
|
21776
|
+
run: (ex, input) => ex.call("computer_recovery.inspect", input)
|
|
21777
|
+
}
|
|
21778
|
+
];
|
|
21779
|
+
var ACTIONS3 = [...ACTIONS2, ...RECOVERY_ACTIONS];
|
|
21780
|
+
|
|
21646
21781
|
// src/config.ts
|
|
21647
21782
|
import {
|
|
21648
21783
|
chmodSync,
|
|
@@ -21847,6 +21982,13 @@ function parseErrorDetails(value) {
|
|
|
21847
21982
|
}
|
|
21848
21983
|
if (typeof raw.suggestedAction === "string")
|
|
21849
21984
|
details.suggestedAction = raw.suggestedAction;
|
|
21985
|
+
if (typeof raw.catalogRevision === "string")
|
|
21986
|
+
details.catalogRevision = raw.catalogRevision;
|
|
21987
|
+
if (typeof raw.clientCatalogRevision === "string") {
|
|
21988
|
+
details.clientCatalogRevision = raw.clientCatalogRevision;
|
|
21989
|
+
}
|
|
21990
|
+
if (typeof raw.catalogNextStep === "string")
|
|
21991
|
+
details.catalogNextStep = raw.catalogNextStep;
|
|
21850
21992
|
return details;
|
|
21851
21993
|
}
|
|
21852
21994
|
function detailsForError(err) {
|
|
@@ -22044,7 +22186,7 @@ function emitDual(data, human, action, ctx) {
|
|
|
22044
22186
|
// src/computer-exec-wait.ts
|
|
22045
22187
|
var DEFAULT_PROCESS_DEADLINE_MS = 1800000;
|
|
22046
22188
|
var POLL_MS = 400;
|
|
22047
|
-
var processRead =
|
|
22189
|
+
var processRead = ACTIONS3.find((action) => action.name === "computer_process_read");
|
|
22048
22190
|
function record3(value) {
|
|
22049
22191
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
22050
22192
|
}
|
|
@@ -22314,7 +22456,7 @@ var MCP_COMMAND_ALIASES = {
|
|
|
22314
22456
|
function commandWords(action) {
|
|
22315
22457
|
return COMMAND_WORD_OVERRIDES[action.name] ?? action.name.replace(/_/g, " ");
|
|
22316
22458
|
}
|
|
22317
|
-
var CLI_ACTIONS =
|
|
22459
|
+
var CLI_ACTIONS = ACTIONS3.filter((a) => a.surfaces.includes("cli") || a.surfaces.includes("computer-cli"));
|
|
22318
22460
|
var BY_ACTION_NAME = new Map(CLI_ACTIONS.map((action) => [action.name, action]));
|
|
22319
22461
|
var BY_COMMAND = new Map(CLI_ACTIONS.map((a) => [commandWords(a), a]));
|
|
22320
22462
|
for (const [alias2, actionName] of Object.entries(MCP_COMMAND_ALIASES)) {
|
package/package.json
CHANGED