@lambdacurry/arbor 0.21.21 → 0.21.23

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 +69 -23
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -1720,7 +1720,8 @@ var orgs = sqliteTable("orgs", {
1720
1720
  status: text("status").$type().notNull().default("active"),
1721
1721
  lockedAt: ts("locked_at"),
1722
1722
  lockedReason: text("locked_reason"),
1723
- systemKind: text("system_kind").unique()
1723
+ systemKind: text("system_kind").unique(),
1724
+ memberSpaceCreation: text("member_space_creation").$type().notNull().default("admins")
1724
1725
  });
1725
1726
  var profiles = sqliteTable("profiles", {
1726
1727
  id: text("id").primaryKey(),
@@ -2112,6 +2113,32 @@ var computerSnapshots = sqliteTable("computer_snapshots", {
2112
2113
  runIdx: index("computer_snapshots_run_idx").on(t.runId, t.createdAt),
2113
2114
  parentIdx: index("computer_snapshots_parent_idx").on(t.parentSnapshotId)
2114
2115
  }));
2116
+ var computerRunStarts = sqliteTable("computer_run_starts", {
2117
+ id: text("id").primaryKey(),
2118
+ computerId: text("computer_id").notNull().references(() => threadComputers.id),
2119
+ threadId: text("thread_id").notNull().references(() => threads.id),
2120
+ originatingSessionId: text("originating_session_id").notNull().references(() => computerSessions.id),
2121
+ profileId: text("profile_id").notNull().references(() => profiles.id),
2122
+ executionContextId: text("execution_context_id").notNull().references(() => executionContexts.id),
2123
+ idempotencyKey: text("idempotency_key").notNull(),
2124
+ idempotencyFingerprint: text("idempotency_fingerprint").notNull(),
2125
+ mode: text("mode").$type().notNull(),
2126
+ execution: text("execution").$type().notNull(),
2127
+ label: text("label"),
2128
+ checkpointLineageKey: text("checkpoint_lineage_key"),
2129
+ checkpointExpectedCurrentSnapshotId: text("checkpoint_expected_current_snapshot_id").references(() => computerSnapshots.id),
2130
+ checkpointParentSnapshotId: text("checkpoint_parent_snapshot_id").references(() => computerSnapshots.id),
2131
+ snapshotId: text("snapshot_id").references(() => computerSnapshots.id),
2132
+ runId: text("run_id").references(() => computerRuns.id),
2133
+ createdAt: ts("created_at").notNull(),
2134
+ updatedAt: ts("updated_at").notNull()
2135
+ }, (t) => ({
2136
+ idempotencyIdx: uniqueIndex("computer_run_starts_idempotency_idx").on(t.threadId, t.profileId, t.idempotencyKey),
2137
+ threadIdx: index("computer_run_starts_thread_idx").on(t.threadId, t.createdAt),
2138
+ checkpointLineageIdx: uniqueIndex("computer_run_starts_checkpoint_lineage_idx").on(t.checkpointLineageKey),
2139
+ snapshotIdx: index("computer_run_starts_snapshot_idx").on(t.snapshotId),
2140
+ runIdx: uniqueIndex("computer_run_starts_run_idx").on(t.runId)
2141
+ }));
2115
2142
  var previews = sqliteTable("previews", {
2116
2143
  id: text("id").primaryKey(),
2117
2144
  threadId: text("thread_id").notNull().references(() => threads.id),
@@ -2296,7 +2323,8 @@ var artifacts = sqliteTable("artifacts", {
2296
2323
  }, (t) => ({
2297
2324
  statusIdx: index("artifacts_status_idx").on(t.status),
2298
2325
  tierIdx: index("artifacts_tier_idx").on(t.retrievalTier),
2299
- ownerIdx: index("artifacts_owner_idx").on(t.ownerProfileId)
2326
+ ownerIdx: index("artifacts_owner_idx").on(t.ownerProfileId),
2327
+ sourceThreadIdx: index("artifacts_source_thread_idx").on(t.sourceThreadId)
2300
2328
  }));
2301
2329
  var artifactLivePreviewSurfaces = sqliteTable("artifact_live_preview_surfaces", {
2302
2330
  artifactId: text("artifact_id").primaryKey().references(() => artifacts.id),
@@ -2770,7 +2798,27 @@ var watches = sqliteTable("watches", {
2770
2798
  watchUq: uniqueIndex("watches_watcher_target_uniq").on(t.watcherProfileId, t.targetType, t.targetId),
2771
2799
  watchTargetIdx: index("watches_target_idx").on(t.targetType, t.targetId)
2772
2800
  }));
2801
+ // ../core/src/ops/secret.ts
2802
+ var SECRET_PERMISSIONS = [
2803
+ "create",
2804
+ "metadata:read",
2805
+ "value:write",
2806
+ "rotate",
2807
+ "bind",
2808
+ "unbind",
2809
+ "revoke",
2810
+ "delete",
2811
+ "plaintext:read"
2812
+ ];
2813
+ var SECRET_ADMIN_PERMISSIONS = SECRET_PERMISSIONS.filter((permission) => permission !== "create" && permission !== "plaintext:read");
2814
+ var ORG_ADMIN_CONTAINMENT_PERMISSIONS = new Set([
2815
+ "metadata:read",
2816
+ "unbind",
2817
+ "revoke"
2818
+ ]);
2819
+
2773
2820
  // ../core/src/ops/computer-run.ts
2821
+ var COMPUTER_RUN_START_CHECKPOINT_RESERVATION_STALE_MS = 12 * 60 * 1000;
2774
2822
  var TERMINAL = new Set(["finished", "failed", "cancelled"]);
2775
2823
  var RUN_LIFECYCLE_TYPES = new Set(["run.started", "run.finished", "run.failed", "run.cancelled"]);
2776
2824
  var COMPUTER_RUN_ACTIVITY_LABEL_MAX = 120;
@@ -2805,24 +2853,6 @@ var EMOJI_RE = new RegExp("^\\p{RGI_Emoji}$", "v");
2805
2853
  var BASE_MS = Date.parse("2026-07-20T15:00:00.000Z");
2806
2854
  // ../core/src/ops/agent-pairing.ts
2807
2855
  var PAIRING_TTL_MS = 15 * 60 * 1000;
2808
- // ../core/src/ops/secret.ts
2809
- var SECRET_PERMISSIONS = [
2810
- "create",
2811
- "metadata:read",
2812
- "value:write",
2813
- "rotate",
2814
- "bind",
2815
- "unbind",
2816
- "revoke",
2817
- "delete",
2818
- "plaintext:read"
2819
- ];
2820
- var SECRET_ADMIN_PERMISSIONS = SECRET_PERMISSIONS.filter((permission) => permission !== "create" && permission !== "plaintext:read");
2821
- var ORG_ADMIN_CONTAINMENT_PERMISSIONS = new Set([
2822
- "metadata:read",
2823
- "unbind",
2824
- "revoke"
2825
- ]);
2826
2856
  // ../core/src/ops/preview.ts
2827
2857
  var PREVIEW_ENTRY_MIME = "text/html; charset=utf-8";
2828
2858
  var PREVIEW_MAX_BYTES = 2 * 1024 * 1024;
@@ -18324,7 +18354,9 @@ var MCP_OUTPUT_SCHEMAS = {
18324
18354
  ]).optional()
18325
18355
  }),
18326
18356
  computer_run_start: exports_external.object({
18357
+ runStartId: id,
18327
18358
  runId: id,
18359
+ replayed: exports_external.boolean(),
18328
18360
  execution: exports_external.enum(["shared", "isolated"]),
18329
18361
  durability: computerRunDurabilitySummary,
18330
18362
  status: exports_external.string()
@@ -18718,7 +18750,9 @@ var OUTPUT_SHAPERS = {
18718
18750
  const run = record2(result.run) ?? {};
18719
18751
  const durability = record2(run.durability) ?? {};
18720
18752
  return defined([
18753
+ ["runStartId", result.runStartId],
18721
18754
  ["runId", run.runId],
18755
+ ["replayed", result.replayed],
18722
18756
  ["execution", run.execution],
18723
18757
  [
18724
18758
  "durability",
@@ -19670,12 +19704,13 @@ var ACTION_DEFINITIONS = [
19670
19704
  {
19671
19705
  name: "computer_run_start",
19672
19706
  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.",
19707
+ 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
19708
  inputSchema: {
19675
19709
  computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
19676
19710
  mode: exports_external.enum(["read", "write"]).describe("write for mutable work; read for shared inspection"),
19677
19711
  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")
19712
+ label: exports_external.string().max(120).optional().describe("short factual label for this unit of work"),
19713
+ idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this ONE logical Run-start request; reuse it unchanged for retries")
19679
19714
  },
19680
19715
  surfaces: ["computer-mcp", "computer-cli"],
19681
19716
  toolset: "loop",
@@ -20580,7 +20615,7 @@ var ACTION_DEFINITIONS = [
20580
20615
  {
20581
20616
  name: "space_create",
20582
20617
  title: "Create a space",
20583
- description: "Create a top-level Space for a new collaboration area; org owner/admin only, with open/private visibility and optional seeded members (agents join directly, humans receive invites). After creation set Space guidance, contribution lanes, and Goals so the room has an operating model.",
20618
+ description: "Create a top-level Space for a new collaboration area — open/private visibility plus optional seeded members (agents join directly, humans get invites); you become its first admin. Org owner/admins always can; other members only when their org enables member space creation.",
20584
20619
  inputSchema: {
20585
20620
  title: exports_external.string().min(1).describe("the space title"),
20586
20621
  purpose: exports_external.string().optional().describe("optional one-line purpose"),
@@ -20641,6 +20676,17 @@ var ACTION_DEFINITIONS = [
20641
20676
  toolset: "admin",
20642
20677
  run: forward("human.invite")
20643
20678
  },
20679
+ {
20680
+ name: "set_member_space_creation",
20681
+ title: "Set who may create spaces",
20682
+ description: "Set your org's space-creation policy (AD-052 rev): 'admins' (default — org owner/admin only) or 'members' (every active org member may create spaces they administer). Owner/admin only. Spaces remain visible/membership-governed exactly as before; this only moves who may stand one up.",
20683
+ inputSchema: {
20684
+ value: exports_external.enum(["admins", "members"]).describe("the new creation policy for the org")
20685
+ },
20686
+ surfaces: ["cli"],
20687
+ toolset: "admin",
20688
+ run: forward("org.setMemberSpaceCreation")
20689
+ },
20644
20690
  {
20645
20691
  name: "space_get",
20646
20692
  title: "Read a space",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.21",
3
+ "version": "0.21.23",
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",