@lambdacurry/arbor 0.21.21 → 0.21.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.
Files changed (2) hide show
  1. package/dist/arbor.js +34 -2
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2112,6 +2112,32 @@ var computerSnapshots = sqliteTable("computer_snapshots", {
2112
2112
  runIdx: index("computer_snapshots_run_idx").on(t.runId, t.createdAt),
2113
2113
  parentIdx: index("computer_snapshots_parent_idx").on(t.parentSnapshotId)
2114
2114
  }));
2115
+ var computerRunStarts = sqliteTable("computer_run_starts", {
2116
+ id: text("id").primaryKey(),
2117
+ computerId: text("computer_id").notNull().references(() => threadComputers.id),
2118
+ threadId: text("thread_id").notNull().references(() => threads.id),
2119
+ originatingSessionId: text("originating_session_id").notNull().references(() => computerSessions.id),
2120
+ profileId: text("profile_id").notNull().references(() => profiles.id),
2121
+ executionContextId: text("execution_context_id").notNull().references(() => executionContexts.id),
2122
+ idempotencyKey: text("idempotency_key").notNull(),
2123
+ idempotencyFingerprint: text("idempotency_fingerprint").notNull(),
2124
+ mode: text("mode").$type().notNull(),
2125
+ execution: text("execution").$type().notNull(),
2126
+ label: text("label"),
2127
+ checkpointLineageKey: text("checkpoint_lineage_key"),
2128
+ checkpointExpectedCurrentSnapshotId: text("checkpoint_expected_current_snapshot_id").references(() => computerSnapshots.id),
2129
+ checkpointParentSnapshotId: text("checkpoint_parent_snapshot_id").references(() => computerSnapshots.id),
2130
+ snapshotId: text("snapshot_id").references(() => computerSnapshots.id),
2131
+ runId: text("run_id").references(() => computerRuns.id),
2132
+ createdAt: ts("created_at").notNull(),
2133
+ updatedAt: ts("updated_at").notNull()
2134
+ }, (t) => ({
2135
+ idempotencyIdx: uniqueIndex("computer_run_starts_idempotency_idx").on(t.threadId, t.profileId, t.idempotencyKey),
2136
+ threadIdx: index("computer_run_starts_thread_idx").on(t.threadId, t.createdAt),
2137
+ checkpointLineageIdx: uniqueIndex("computer_run_starts_checkpoint_lineage_idx").on(t.checkpointLineageKey),
2138
+ snapshotIdx: index("computer_run_starts_snapshot_idx").on(t.snapshotId),
2139
+ runIdx: uniqueIndex("computer_run_starts_run_idx").on(t.runId)
2140
+ }));
2115
2141
  var previews = sqliteTable("previews", {
2116
2142
  id: text("id").primaryKey(),
2117
2143
  threadId: text("thread_id").notNull().references(() => threads.id),
@@ -2771,6 +2797,7 @@ var watches = sqliteTable("watches", {
2771
2797
  watchTargetIdx: index("watches_target_idx").on(t.targetType, t.targetId)
2772
2798
  }));
2773
2799
  // ../core/src/ops/computer-run.ts
2800
+ var COMPUTER_RUN_START_CHECKPOINT_RESERVATION_STALE_MS = 12 * 60 * 1000;
2774
2801
  var TERMINAL = new Set(["finished", "failed", "cancelled"]);
2775
2802
  var RUN_LIFECYCLE_TYPES = new Set(["run.started", "run.finished", "run.failed", "run.cancelled"]);
2776
2803
  var COMPUTER_RUN_ACTIVITY_LABEL_MAX = 120;
@@ -18324,7 +18351,9 @@ var MCP_OUTPUT_SCHEMAS = {
18324
18351
  ]).optional()
18325
18352
  }),
18326
18353
  computer_run_start: exports_external.object({
18354
+ runStartId: id,
18327
18355
  runId: id,
18356
+ replayed: exports_external.boolean(),
18328
18357
  execution: exports_external.enum(["shared", "isolated"]),
18329
18358
  durability: computerRunDurabilitySummary,
18330
18359
  status: exports_external.string()
@@ -18718,7 +18747,9 @@ var OUTPUT_SHAPERS = {
18718
18747
  const run = record2(result.run) ?? {};
18719
18748
  const durability = record2(run.durability) ?? {};
18720
18749
  return defined([
18750
+ ["runStartId", result.runStartId],
18721
18751
  ["runId", run.runId],
18752
+ ["replayed", result.replayed],
18722
18753
  ["execution", run.execution],
18723
18754
  [
18724
18755
  "durability",
@@ -19670,12 +19701,13 @@ var ACTION_DEFINITIONS = [
19670
19701
  {
19671
19702
  name: "computer_run_start",
19672
19703
  title: "Start a run",
19673
- description: "Start one bounded unit of work inside an opened Thread Computer. Write Runs default to isolated; if isolated provisioning fails after the durable Run exists, the error returns its runId and points to computer_run_receipt so the caller can inspect the terminal reason without listing or guessing.",
19704
+ description: "Start one bounded unit of work inside an opened Thread Computer with a caller-owned idempotency key so response loss can recover zero-or-one Run creation without listing. Write Runs default isolated; post-creation provisioning failures keep returning the exact runId and computer_run_receipt recovery.",
19674
19705
  inputSchema: {
19675
19706
  computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
19676
19707
  mode: exports_external.enum(["read", "write"]).describe("write for mutable work; read for shared inspection"),
19677
19708
  execution: exports_external.enum(["shared", "isolated"]).optional().describe("write Run placement; defaults to isolated. Use shared only for intentional live collaboration on the Thread Computer"),
19678
- label: exports_external.string().max(120).optional().describe("short factual label for this unit of work")
19709
+ label: exports_external.string().max(120).optional().describe("short factual label for this unit of work"),
19710
+ idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this ONE logical Run-start request; reuse it unchanged for retries")
19679
19711
  },
19680
19712
  surfaces: ["computer-mcp", "computer-cli"],
19681
19713
  toolset: "loop",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.21",
3
+ "version": "0.21.22",
4
4
  "description": "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
5
5
  "keywords": [
6
6
  "agents",