@lambdacurry/arbor 0.20.10 → 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 +45 -11
  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 {
@@ -1742,7 +1769,8 @@ var previewVersions = sqliteTable("preview_versions", {
1742
1769
  fileCount: integer("file_count").notNull(),
1743
1770
  byteCount: integer("byte_count").notNull(),
1744
1771
  computerSessionId: text("computer_session_id").notNull().references(() => computerSessions.id),
1745
- snapshotId: text("snapshot_id").notNull().references(() => computerSnapshots.id),
1772
+ snapshotId: text("snapshot_id").references(() => computerSnapshots.id),
1773
+ runId: text("run_id").references(() => computerRuns.id),
1746
1774
  publishedByProfileId: text("published_by_profile_id").notNull().references(() => profiles.id),
1747
1775
  idempotencyKey: text("idempotency_key"),
1748
1776
  idempotencyFingerprint: text("idempotency_fingerprint"),
@@ -1755,7 +1783,9 @@ var previewVersions = sqliteTable("preview_versions", {
1755
1783
  hostIdx: uniqueIndex("preview_versions_host_idx").on(t.hostLabel),
1756
1784
  sessionIdx: index("preview_versions_session_idx").on(t.computerSessionId, t.createdAt),
1757
1785
  idempotencyIdx: uniqueIndex("preview_versions_idempotency_idx").on(t.computerSessionId, t.publishedByProfileId, t.idempotencyKey),
1758
- 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)`)
1759
1789
  }));
1760
1790
  var previewVersionFiles = sqliteTable("preview_version_files", {
1761
1791
  versionId: text("version_id").notNull().references(() => previewVersions.id),
@@ -2532,7 +2562,7 @@ __export(exports_external, {
2532
2562
  clone: () => clone,
2533
2563
  cidrv6: () => cidrv62,
2534
2564
  cidrv4: () => cidrv42,
2535
- check: () => check,
2565
+ check: () => check2,
2536
2566
  catch: () => _catch2,
2537
2567
  boolean: () => boolean2,
2538
2568
  bigint: () => bigint2,
@@ -14649,7 +14679,7 @@ __export(exports_schemas2, {
14649
14679
  codec: () => codec,
14650
14680
  cidrv6: () => cidrv62,
14651
14681
  cidrv4: () => cidrv42,
14652
- check: () => check,
14682
+ check: () => check2,
14653
14683
  catch: () => _catch2,
14654
14684
  boolean: () => boolean2,
14655
14685
  bigint: () => bigint2,
@@ -14941,8 +14971,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
14941
14971
  reg.add(this, meta2);
14942
14972
  return this;
14943
14973
  },
14944
- refine(check, params) {
14945
- return this.check(refine(check, params));
14974
+ refine(check2, params) {
14975
+ return this.check(refine(check2, params));
14946
14976
  },
14947
14977
  superRefine(refinement, params) {
14948
14978
  return this.check(superRefine(refinement, params));
@@ -16084,7 +16114,7 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
16084
16114
  ZodType.init(inst, def);
16085
16115
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
16086
16116
  });
16087
- function check(fn) {
16117
+ function check2(fn) {
16088
16118
  const ch = new $ZodCheck({
16089
16119
  check: "custom"
16090
16120
  });
@@ -17527,9 +17557,12 @@ var MCP_OUTPUT_SCHEMAS = {
17527
17557
  manifestDigest: exports_external.string(),
17528
17558
  fileCount: exports_external.number(),
17529
17559
  byteCount: exports_external.number(),
17530
- snapshotId: id,
17560
+ snapshotId: id.optional(),
17561
+ runId: id.optional(),
17531
17562
  published: exports_external.boolean(),
17532
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"
17533
17566
  }),
17534
17567
  computer_publish_app_bundle: exports_external.looseObject({
17535
17568
  bundleId: id,
@@ -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.10",
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",