@lambdacurry/arbor 0.20.9 → 0.20.11

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 +47 -13
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -754,6 +754,33 @@ function alias(table, alias2) {
754
754
  return new Proxy(table, new TableAliasProxyHandler(alias2, false));
755
755
  }
756
756
 
757
+ // ../../node_modules/.pnpm/drizzle-orm@0.38.4_@cloudflare+workers-types@4.20260529.1_@prisma+client@5.22.0_@types+_885285c61ee4b1c788385eea24f801ee/node_modules/drizzle-orm/sqlite-core/checks.js
758
+ class CheckBuilder {
759
+ constructor(name, value) {
760
+ this.name = name;
761
+ this.value = value;
762
+ }
763
+ static [entityKind] = "SQLiteCheckBuilder";
764
+ brand;
765
+ build(table) {
766
+ return new Check(table, this);
767
+ }
768
+ }
769
+
770
+ class Check {
771
+ constructor(table, builder) {
772
+ this.table = table;
773
+ this.name = builder.name;
774
+ this.value = builder.value;
775
+ }
776
+ static [entityKind] = "SQLiteCheck";
777
+ name;
778
+ value;
779
+ }
780
+ function check(name, value) {
781
+ return new CheckBuilder(name, value);
782
+ }
783
+
757
784
  // ../../node_modules/.pnpm/drizzle-orm@0.38.4_@cloudflare+workers-types@4.20260529.1_@prisma+client@5.22.0_@types+_885285c61ee4b1c788385eea24f801ee/node_modules/drizzle-orm/utils.js
758
785
  function getColumnNameAndConfig(a, b) {
759
786
  return {
@@ -1681,7 +1708,6 @@ var computerRuns = sqliteTable("computer_runs", {
1681
1708
  mode: text("mode").$type().notNull(),
1682
1709
  execution: text("isolation").$type().notNull(),
1683
1710
  workspaceDir: text("workspace_dir").notNull(),
1684
- _legacyWorkspaceRef: text("workspace_ref"),
1685
1711
  baseSnapshotId: text("base_snapshot_id"),
1686
1712
  gitStart: text("git_start", { mode: "json" }).$type(),
1687
1713
  status: text("status").$type().notNull().default("active"),
@@ -1743,7 +1769,8 @@ var previewVersions = sqliteTable("preview_versions", {
1743
1769
  fileCount: integer("file_count").notNull(),
1744
1770
  byteCount: integer("byte_count").notNull(),
1745
1771
  computerSessionId: text("computer_session_id").notNull().references(() => computerSessions.id),
1746
- snapshotId: text("snapshot_id").notNull().references(() => computerSnapshots.id),
1772
+ snapshotId: text("snapshot_id").references(() => computerSnapshots.id),
1773
+ runId: text("run_id").references(() => computerRuns.id),
1747
1774
  publishedByProfileId: text("published_by_profile_id").notNull().references(() => profiles.id),
1748
1775
  idempotencyKey: text("idempotency_key"),
1749
1776
  idempotencyFingerprint: text("idempotency_fingerprint"),
@@ -1756,7 +1783,9 @@ var previewVersions = sqliteTable("preview_versions", {
1756
1783
  hostIdx: uniqueIndex("preview_versions_host_idx").on(t.hostLabel),
1757
1784
  sessionIdx: index("preview_versions_session_idx").on(t.computerSessionId, t.createdAt),
1758
1785
  idempotencyIdx: uniqueIndex("preview_versions_idempotency_idx").on(t.computerSessionId, t.publishedByProfileId, t.idempotencyKey),
1759
- snapshotIdx: index("preview_versions_snapshot_idx").on(t.snapshotId)
1786
+ snapshotIdx: index("preview_versions_snapshot_idx").on(t.snapshotId),
1787
+ runIdx: index("preview_versions_run_idx").on(t.runId),
1788
+ sourceCheck: check("preview_versions_source_check", sql`(${t.snapshotId} is not null and ${t.runId} is null) or (${t.snapshotId} is null and ${t.runId} is not null)`)
1760
1789
  }));
1761
1790
  var previewVersionFiles = sqliteTable("preview_version_files", {
1762
1791
  versionId: text("version_id").notNull().references(() => previewVersions.id),
@@ -2533,7 +2562,7 @@ __export(exports_external, {
2533
2562
  clone: () => clone,
2534
2563
  cidrv6: () => cidrv62,
2535
2564
  cidrv4: () => cidrv42,
2536
- check: () => check,
2565
+ check: () => check2,
2537
2566
  catch: () => _catch2,
2538
2567
  boolean: () => boolean2,
2539
2568
  bigint: () => bigint2,
@@ -14650,7 +14679,7 @@ __export(exports_schemas2, {
14650
14679
  codec: () => codec,
14651
14680
  cidrv6: () => cidrv62,
14652
14681
  cidrv4: () => cidrv42,
14653
- check: () => check,
14682
+ check: () => check2,
14654
14683
  catch: () => _catch2,
14655
14684
  boolean: () => boolean2,
14656
14685
  bigint: () => bigint2,
@@ -14942,8 +14971,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
14942
14971
  reg.add(this, meta2);
14943
14972
  return this;
14944
14973
  },
14945
- refine(check, params) {
14946
- return this.check(refine(check, params));
14974
+ refine(check2, params) {
14975
+ return this.check(refine(check2, params));
14947
14976
  },
14948
14977
  superRefine(refinement, params) {
14949
14978
  return this.check(superRefine(refinement, params));
@@ -16085,7 +16114,7 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
16085
16114
  ZodType.init(inst, def);
16086
16115
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
16087
16116
  });
16088
- function check(fn) {
16117
+ function check2(fn) {
16089
16118
  const ch = new $ZodCheck({
16090
16119
  check: "custom"
16091
16120
  });
@@ -17528,9 +17557,12 @@ var MCP_OUTPUT_SCHEMAS = {
17528
17557
  manifestDigest: exports_external.string(),
17529
17558
  fileCount: exports_external.number(),
17530
17559
  byteCount: exports_external.number(),
17531
- snapshotId: id,
17560
+ snapshotId: id.optional(),
17561
+ runId: id.optional(),
17532
17562
  published: exports_external.boolean(),
17533
17563
  replayed: exports_external.boolean()
17564
+ }).refine((value) => Boolean(value.snapshotId) !== Boolean(value.runId), {
17565
+ message: "Preview output requires exactly one provenance source: snapshotId or runId"
17534
17566
  }),
17535
17567
  computer_publish_app_bundle: exports_external.looseObject({
17536
17568
  bundleId: id,
@@ -18266,7 +18298,7 @@ var ACTION_DEFINITIONS = [
18266
18298
  {
18267
18299
  name: "computer_exec",
18268
18300
  title: "Run a command",
18269
- description: "Run one bounded logical operation in an opened Thread computer. Omitting cwd uses the environment's defaultCwd; pass cwd explicitly to override it. Pass runId to route the command according to that Run's execution placement; without runId the command executes in the parent Computer. Strict Bash semantics are ON by default. For tests, builds, installs, or any command likely to run long, prefer background=true so the call returns a processId immediately; follow it with computer_process_read using the returned cursor for small incremental tails. For a connected human, Arbor supplies ambient GitHub authorization and Git identity ephemerally without writing credentials into the workspace. Background processes stay in the environment where they were started.",
18301
+ description: "Run one bounded logical operation in an opened Thread computer. Omitting cwd uses the environment's defaultCwd; pass cwd explicitly to override it. Pass runId to route the command according to that Run's execution placement; without runId the command executes in the parent Computer. Strict Bash semantics are ON by default. For tests, builds, installs, or any command likely to run long, prefer background=true so the call returns a processId immediately; follow it with computer_process_read using the returned cursor for small incremental tails. For a labeled run-scoped verification check, pass activityKind=verification so the terminal exit becomes a distilled verification outcome. For a connected human, Arbor supplies ambient GitHub authorization and Git identity ephemerally without writing credentials into the workspace. Background processes stay in the environment where they were started.",
18270
18302
  inputSchema: {
18271
18303
  computerSessionId: exports_external.string().optional().describe("the computerSessionId returned by computer_open, cms_…; required unless runId is supplied"),
18272
18304
  command: exports_external.string().min(1).describe("the shell command to run"),
@@ -18275,6 +18307,7 @@ var ACTION_DEFINITIONS = [
18275
18307
  timeout: exports_external.number().int().min(1000).max(1800000).optional().describe("timeout in milliseconds, from 1,000 through 1,800,000"),
18276
18308
  background: exports_external.boolean().optional().describe("start a container process and return its pid"),
18277
18309
  activityLabel: exports_external.string().min(1).max(COMPUTER_RUN_ACTIVITY_LABEL_MAX).optional().describe("short human-readable label for run-scoped background work; Arbor records this label instead of the raw command or output"),
18310
+ activityKind: exports_external.literal("verification").optional().describe("mark a labeled run-scoped background command as a verification check; its provider-observed terminal result is recorded as verification.finished"),
18278
18311
  strict: exports_external.boolean().optional().describe("fail on the first unhandled command or pipeline failure; defaults to true, set false only for intentional best-effort execution")
18279
18312
  },
18280
18313
  surfaces: ["computer-mcp", "computer-cli"],
@@ -18446,9 +18479,10 @@ var ACTION_DEFINITIONS = [
18446
18479
  {
18447
18480
  name: "computer_publish_preview",
18448
18481
  title: "Publish an immutable static Preview",
18449
- description: "Publish one checked HTML file or bounded static build directory from the live parent Thread Computer as a private immutable Preview after checkpointing its source. This is intentionally not Run-scoped yet; an isolated Run must not silently publish stale parent files or imply integration. The returned arborthreads.dev URL survives computer teardown; put it on its own line to show the interactive Preview card. A directory must contain index.html, use relative local asset URLs, and cannot include dotfiles, source maps, secrets, symlinks, or server code. Supply one stable idempotencyKey per logical publication: safe retries return the original immutable URL, while reusing the key for another path/title conflicts.",
18482
+ description: "Publish one checked HTML file or bounded static build directory as a private immutable Preview. Parent publication uses computerSessionId, checkpoints the source into Thread lineage, then publishes it. Isolated Run publication uses runId, freezes that Run's exact static bytes without checkpointing, adopting the Run, or advancing parent lineage, and remains durable after the Run is destroyed. The returned arborthreads.dev URL survives teardown; put it on its own line to show the interactive Preview card. A directory must contain index.html, use relative local asset URLs, and cannot include dotfiles, source maps, secrets, symlinks, or server code. Supply one stable idempotencyKey per logical publication: safe retries return the original immutable URL, while reusing the key for another path/title or Run fork conflicts.",
18450
18483
  inputSchema: {
18451
- computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_"),
18484
+ computerSessionId: exports_external.string().optional().describe("the computerSessionId returned by computer_open, cms_…; required for parent publication, optional when runId is supplied"),
18485
+ runId: exports_external.string().optional().describe("active isolated write Run whose static workspace bytes should be published as review output"),
18452
18486
  path: exports_external.string().describe("absolute path to one HTML file or static build directory under /workspace"),
18453
18487
  title: exports_external.string().min(1).max(160).describe("short factual Preview title"),
18454
18488
  idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this ONE logical publication (≤200 chars); reuse it only to retry the same path and title")
@@ -18460,7 +18494,7 @@ var ACTION_DEFINITIONS = [
18460
18494
  {
18461
18495
  name: "computer_publish_app_bundle",
18462
18496
  title: "Publish an immutable AppBundle",
18463
- description: "From the live parent Thread Computer, after a Bun container build is green, verify that entryPath bytes exactly match the referenced ArtifactVersion. This is intentionally not Run-scoped yet; isolated Run publication requires a separate integration/provenance decision. Then capture source hashes plus Git/workspace provenance, then freeze the Worker module and optional static assets into a content-addressed AppBundle. A mismatch is rejected; dirty or untracked source is allowed but returned as an explicit warning. Use the returned bundleId with app_deploy; retries require the same idempotencyKey.",
18497
+ description: "From the live parent Thread Computer, after a Bun container build is green, verify that entryPath bytes exactly match the referenced ArtifactVersion, then capture source hashes plus Git/workspace provenance, then freeze the Worker module and optional static assets into a content-addressed AppBundle. A mismatch is rejected; dirty or untracked source is allowed but returned as an explicit warning. Use the returned bundleId with app_deploy; retries require the same idempotencyKey. AppBundle publication remains intentionally parent-only; an isolated Run Preview is review output and does not adopt the Run.",
18464
18498
  inputSchema: {
18465
18499
  computerSessionId: exports_external.string().describe("the computerSessionId returned by computer_open, cms_…"),
18466
18500
  artifactVersionId: exports_external.string().describe("the source ArtifactVersion, artv_…"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.20.9",
3
+ "version": "0.20.11",
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",