@lambdacurry/arbor 0.21.3 → 0.21.4

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 +94 -1
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2404,6 +2404,31 @@ var appBundles = sqliteTable("app_bundles", {
2404
2404
  spaceIdx: index("app_bundles_space_idx").on(t.spaceId, t.createdAt),
2405
2405
  idempotencyUq: uniqueIndex("app_bundles_idempotency_uq").on(t.computerSessionId, t.createdByProfileId, t.idempotencyKey)
2406
2406
  }));
2407
+ var previewApps = sqliteTable("preview_apps", {
2408
+ id: text("id").primaryKey(),
2409
+ threadId: text("thread_id").notNull().references(() => threads.id),
2410
+ spaceId: text("space_id").notNull().references(() => spaces.id),
2411
+ artifactId: text("artifact_id").notNull().references(() => artifacts.id),
2412
+ artifactVersionId: text("artifact_version_id").notNull().references(() => artifactVersions.id),
2413
+ bundleId: text("bundle_id").references(() => appBundles.id),
2414
+ hostLabel: text("host_label").notNull(),
2415
+ lifecycle: text("lifecycle").$type().notNull().default("active"),
2416
+ roomsEnabled: integer("rooms_enabled", { mode: "boolean" }).notNull().default(false),
2417
+ expiresAt: ts("expires_at").notNull(),
2418
+ createdByProfileId: text("created_by_profile_id").notNull().references(() => profiles.id),
2419
+ createdExecutionContextId: text("created_execution_context_id").notNull().references(() => executionContexts.id),
2420
+ idempotencyKey: text("idempotency_key").notNull(),
2421
+ idempotencyFingerprint: text("idempotency_fingerprint").notNull(),
2422
+ createdAt: ts("created_at").notNull(),
2423
+ retiredAt: ts("retired_at"),
2424
+ retireReason: text("retire_reason").$type()
2425
+ }, (t) => ({
2426
+ hostUq: uniqueIndex("preview_apps_host_uq").on(t.hostLabel),
2427
+ creatorIdempotencyUq: uniqueIndex("preview_apps_creator_idempotency_uq").on(t.createdByProfileId, t.idempotencyKey),
2428
+ threadIdx: index("preview_apps_thread_idx").on(t.threadId, t.lifecycle, t.createdAt),
2429
+ artifactIdx: index("preview_apps_artifact_idx").on(t.artifactId, t.lifecycle, t.createdAt),
2430
+ expiryIdx: index("preview_apps_expiry_idx").on(t.lifecycle, t.expiresAt)
2431
+ }));
2407
2432
  var apps = sqliteTable("apps", {
2408
2433
  id: text("id").primaryKey(),
2409
2434
  orgId: text("org_id").notNull().references(() => orgs.id),
@@ -2786,6 +2811,9 @@ var PREVIEW_MIME_TYPES = new Set([
2786
2811
  "font/woff",
2787
2812
  "font/woff2"
2788
2813
  ]);
2814
+ // ../core/src/ops/preview-app.ts
2815
+ var PREVIEW_APP_DEFAULT_TTL_SECONDS = 60 * 60;
2816
+ var PREVIEW_APP_MAX_TTL_SECONDS = 24 * 60 * 60;
2789
2817
  // ../core/src/ops/app.ts
2790
2818
  var APP_MAX_MODULE_BYTES = 10 * 1024 * 1024;
2791
2819
  var APP_MAX_ASSET_BYTES = 25 * 1024 * 1024;
@@ -18065,6 +18093,35 @@ var MCP_OUTPUT_SCHEMAS = {
18065
18093
  bindingName: exports_external.string().optional(),
18066
18094
  unbound: exports_external.boolean().optional()
18067
18095
  }),
18096
+ preview_app_create: exports_external.looseObject({
18097
+ id,
18098
+ artifactId: id,
18099
+ artifactVersionId: id,
18100
+ bundleId: id.nullable(),
18101
+ hostLabel: exports_external.string(),
18102
+ lifecycle: exports_external.string(),
18103
+ roomsEnabled: exports_external.boolean(),
18104
+ expiresAt: timestamp,
18105
+ url: exports_external.string(),
18106
+ replayed: exports_external.boolean()
18107
+ }),
18108
+ preview_app_get: exports_external.looseObject({
18109
+ id,
18110
+ artifactId: id,
18111
+ artifactVersionId: id,
18112
+ bundleId: id.nullable(),
18113
+ lifecycle: exports_external.string(),
18114
+ roomsEnabled: exports_external.boolean(),
18115
+ expiresAt: timestamp,
18116
+ url: exports_external.string(),
18117
+ effectiveStatus: exports_external.string()
18118
+ }),
18119
+ preview_app_retire: exports_external.looseObject({
18120
+ id,
18121
+ lifecycle: exports_external.string(),
18122
+ url: exports_external.string(),
18123
+ replayed: exports_external.boolean()
18124
+ }),
18068
18125
  app_list: exports_external.object({ result: exports_external.array(app2) }),
18069
18126
  app_get: exports_external.looseObject({
18070
18127
  app: app2,
@@ -18696,6 +18753,9 @@ var MCP_TOOL_ANNOTATIONS = {
18696
18753
  artifact_transition: additive,
18697
18754
  artifact_delete: destructive,
18698
18755
  secrets: destructive,
18756
+ preview_app_get: readOnly,
18757
+ preview_app_create: idempotent,
18758
+ preview_app_retire: destructiveIdempotent,
18699
18759
  app_get: readOnly,
18700
18760
  app_list: readOnly,
18701
18761
  app_deployment_get: readOnly,
@@ -18782,7 +18842,7 @@ ${ARBOR_FEEDBACK_GUIDANCE}
18782
18842
  4. CHECKPOINT COMPLETE PARENT UNITS. computer_checkpoint advances immutable parent lineage after an intermediate complete unit; computer_stop performs the final checkpoint before teardown. An isolated Run Preview is durable review output, not adoption or a checkpoint. The internal provider-handle publication operations are not agent tools.
18783
18843
  5. GIT AND GITHUB ARE ORDINARY COMMANDS AFTER AUTHORIZATION. Clone, fetch, pull, push, and gh run through computer_exec using a connected human's just-in-time ambient GitHub identity. Credentials never enter argv, workspace files, Git config, checkpoints, Events, logs, or receipts. A restored Computer deliberately keeps the checkout age of its snapshot, so fetch/pull before trusting remote state.
18784
18844
  6. VERIFY, PREVIEW, AND EXPORT. computer_verify captures a public URL directly without opening a project runtime. computer_publish_preview preserves immutable static output from either the parent or an active isolated write Run. computer_export moves bounded files into durable Thread Attachments; place returned Markdown exactly where the media belongs and cite the matching attachment ids.
18785
- 7. PACKAGE, DEPLOY, ACTIVATE, AND OPERATE APPS HERE. computer_publish_app_bundle creates the immutable executable bundle from verified parent bytes. Then use app_create, app_config_apply, app_deploy, app_deployment_get, app_activate, app_get, app_fetch/app_request, app_rollback, app_set_access, app_reset_state/app_restore_state, and app_archive as one workflow-closed release surface. First-class Organization/Profile Secrets remain on Arbor's collaboration MCP because they are broader identity-owned resources; App configuration here references existing Secret ids and never accepts or returns secret material.
18845
+ 7. PACKAGE, DEPLOY, ACTIVATE, AND OPERATE APPS HERE. computer_publish_app_bundle creates the immutable executable bundle from verified parent bytes. For short-lived public Artifact experiments use preview_app_create/get/retire; for published Space Apps use app_create, app_config_apply, app_deploy, app_deployment_get, app_activate, app_get, app_fetch/app_request, app_rollback, app_set_access, app_reset_state/app_restore_state, and app_archive as one workflow-closed release surface. First-class Organization/Profile Secrets remain on Arbor's collaboration MCP because they are broader identity-owned resources; App configuration here references existing Secret ids and never accepts or returns secret material.
18786
18846
  8. FINISH WHAT YOU START. Stop the parent after its final complete unit, finish every Run, and preserve evidence before teardown. When reporting collaboration conclusions through Arbor, pass the producing computerSessionId and attachmentIds to contribute or respond.
18787
18847
  9. CLOSE OUT ARBOR DOGFOOD. When developing Arbor through Arbor, ask: “Did Arbor itself create meaningful friction or require an Arbor-specific workaround?” If yes, apply the classifier above and privately capture one bounded report before closing the development loop; keep unrelated product friction out of the implementation Thread. If no, close normally without manufacturing feedback.`;
18788
18848
  var PROSE_LISTS = exports_external.registry();
@@ -20846,6 +20906,39 @@ var ACTION_DEFINITIONS = [
20846
20906
  toolset: "apps",
20847
20907
  run: forward("app.get")
20848
20908
  },
20909
+ {
20910
+ name: "preview_app_create",
20911
+ title: "Create a public Preview App",
20912
+ description: "Mint a short-lived public no-login Preview App from one Artifact's exact current version, optionally executing a same-version fetch AppBundle with bounded Preview-scoped WebSocket rooms. It stays Thread/Artifact scoped, TTL-bounded, and out of the Space App catalog.",
20913
+ inputSchema: {
20914
+ artifactId: exports_external.string().describe("source Artifact, art_…; its current version is pinned"),
20915
+ bundleId: exports_external.string().optional().describe("optional fetch AppBundle, bnd_…, built from that exact current ArtifactVersion"),
20916
+ roomsEnabled: exports_external.boolean().optional().describe("allow named WebSocket rooms backed by preview-scoped SQLite Durable Object facets"),
20917
+ ttlSeconds: exports_external.number().int().min(60).max(86400).optional().describe("Preview lifetime in seconds; default 3600, hard max 86400"),
20918
+ idempotencyKey: exports_external.string().min(1).max(200).describe("stable retry key for this one logical Preview App mint")
20919
+ },
20920
+ surfaces: ["computer-mcp", "cli"],
20921
+ toolset: "apps",
20922
+ run: forward("preview_app.create")
20923
+ },
20924
+ {
20925
+ name: "preview_app_get",
20926
+ title: "Read a Preview App",
20927
+ description: "READ ONLY: Inspect one Preview App's public URL, pinned ArtifactVersion/AppBundle lineage, absolute expiry, Thread status, and bounded WebSocket room contract. It is not a Space App catalog read.",
20928
+ inputSchema: { previewAppId: exports_external.string().describe("the Preview App, papp_…") },
20929
+ surfaces: ["computer-mcp", "cli"],
20930
+ toolset: "apps",
20931
+ run: forward("preview_app.get")
20932
+ },
20933
+ {
20934
+ name: "preview_app_retire",
20935
+ title: "Retire a Preview App",
20936
+ description: "Retire one short-lived Preview App immediately, stopping its public gateway and tearing down bounded room Durable Objects. Artifact/AppBundle history stays intact, and Thread close performs the same retirement automatically.",
20937
+ inputSchema: { previewAppId: exports_external.string().describe("the Preview App, papp_…") },
20938
+ surfaces: ["computer-mcp", "cli"],
20939
+ toolset: "apps",
20940
+ run: forward("preview_app.retire")
20941
+ },
20849
20942
  {
20850
20943
  name: "app_create",
20851
20944
  title: "Create an App",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
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",