@lambdacurry/arbor 0.21.0 → 0.21.2

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 +87 -5
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2072,6 +2072,9 @@ var computerRuns = sqliteTable("computer_runs", {
2072
2072
  execution: text("isolation").$type().notNull(),
2073
2073
  workspaceDir: text("workspace_dir").notNull(),
2074
2074
  baseSnapshotId: text("base_snapshot_id"),
2075
+ currentSnapshotId: text("current_snapshot_id"),
2076
+ runtimeState: text("runtime_state").$type().notNull().default("shared"),
2077
+ runtimeUpdatedAt: ts("runtime_updated_at"),
2075
2078
  gitStart: text("git_start", { mode: "json" }).$type(),
2076
2079
  status: text("status").$type().notNull().default("active"),
2077
2080
  label: text("label"),
@@ -2082,13 +2085,15 @@ var computerRuns = sqliteTable("computer_runs", {
2082
2085
  computerIdx: index("computer_runs_computer_idx").on(t.computerId, t.startedAt),
2083
2086
  threadIdx: index("computer_runs_thread_idx").on(t.threadId, t.startedAt),
2084
2087
  sessionIdx: index("computer_runs_session_idx").on(t.computerSessionId, t.startedAt),
2085
- statusIdx: index("computer_runs_status_idx").on(t.computerId, t.status)
2088
+ statusIdx: index("computer_runs_status_idx").on(t.computerId, t.status),
2089
+ runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState)
2086
2090
  }));
2087
2091
  var computerSnapshots = sqliteTable("computer_snapshots", {
2088
2092
  id: text("id").primaryKey(),
2089
2093
  ownerScope: text("owner_scope").$type().notNull(),
2090
2094
  topicId: text("topic_id").notNull().references(() => topics.id),
2091
2095
  computerId: text("computer_id").references(() => threadComputers.id),
2096
+ runId: text("run_id").references(() => computerRuns.id),
2092
2097
  parentSnapshotId: text("parent_snapshot_id"),
2093
2098
  lineageKey: text("lineage_key"),
2094
2099
  configKey: text("config_key"),
@@ -2104,6 +2109,7 @@ var computerSnapshots = sqliteTable("computer_snapshots", {
2104
2109
  topicBaseIdx: uniqueIndex("computer_snapshots_topic_base_idx").on(t.topicId, t.configKey),
2105
2110
  lineageIdx: uniqueIndex("computer_snapshots_lineage_idx").on(t.lineageKey),
2106
2111
  computerIdx: index("computer_snapshots_computer_idx").on(t.computerId, t.createdAt),
2112
+ runIdx: index("computer_snapshots_run_idx").on(t.runId, t.createdAt),
2107
2113
  parentIdx: index("computer_snapshots_parent_idx").on(t.parentSnapshotId)
2108
2114
  }));
2109
2115
  var previews = sqliteTable("previews", {
@@ -17249,6 +17255,11 @@ var computerRunPublication = exports_external.looseObject({
17249
17255
  reasonCode: exports_external.string(),
17250
17256
  remoteRef: exports_external.string().optional()
17251
17257
  });
17258
+ var computerRunRuntime = exports_external.looseObject({
17259
+ state: exports_external.enum(["shared", "live", "suspended", "released"]),
17260
+ currentSnapshotId: id.nullable(),
17261
+ updatedAt: exports_external.string().nullable()
17262
+ });
17252
17263
  var computerRunDurability = exports_external.looseObject({
17253
17264
  workspace: exports_external.enum(["shared", "isolated"]),
17254
17265
  parentMutation: exports_external.enum(["direct", "none"]),
@@ -17330,6 +17341,8 @@ var computerRun = exports_external.looseObject({
17330
17341
  execution: exports_external.enum(["shared", "isolated"]),
17331
17342
  workspaceDir: exports_external.string(),
17332
17343
  baseSnapshotId: id.nullable(),
17344
+ currentSnapshotId: id.nullable().optional(),
17345
+ runtime: computerRunRuntime,
17333
17346
  gitStart: computerRunGitStart.nullable().optional(),
17334
17347
  durability: computerRunDurability,
17335
17348
  status: exports_external.enum(["active", "finished", "failed", "cancelled"]),
@@ -17353,6 +17366,7 @@ var computerRunReceipt = exports_external.looseObject({
17353
17366
  execution: exports_external.enum(["shared", "isolated"]),
17354
17367
  workspace: exports_external.looseObject({ dir: exports_external.string() }),
17355
17368
  baseSnapshotId: id.nullable(),
17369
+ runtime: computerRunRuntime,
17356
17370
  gitStart: computerRunGitStart.nullable().optional(),
17357
17371
  durability: computerRunDurability,
17358
17372
  finishAssessment: computerRunFinishAssessment.nullable(),
@@ -17717,6 +17731,18 @@ var MCP_OUTPUT_SCHEMAS = {
17717
17731
  association: jsonObject.nullable(),
17718
17732
  message: exports_external.string()
17719
17733
  }),
17734
+ feedback_status: exports_external.object({
17735
+ feedbackId: id,
17736
+ type: exports_external.enum(ARBOR_FEEDBACK_TYPES),
17737
+ status: exports_external.enum(ARBOR_FEEDBACK_STATUSES),
17738
+ private: exports_external.literal(true),
17739
+ associatedWithSharedKnowledge: exports_external.boolean(),
17740
+ createdAt: timestamp,
17741
+ updatedAt: timestamp,
17742
+ reviewedAt: timestamp.nullable(),
17743
+ resolvedAt: timestamp.nullable(),
17744
+ message: exports_external.string()
17745
+ }),
17720
17746
  admin_feedback_capability: jsonObject,
17721
17747
  admin_feedback_evidence: jsonObject,
17722
17748
  admin_feedback_topic: jsonObject,
@@ -18081,6 +18107,12 @@ var MCP_OUTPUT_SCHEMAS = {
18081
18107
  durability: computerRunDurabilitySummary,
18082
18108
  status: exports_external.string()
18083
18109
  }),
18110
+ computer_run_suspend: exports_external.looseObject({
18111
+ runId: id,
18112
+ runtime: computerRunRuntime,
18113
+ replayed: exports_external.boolean(),
18114
+ snapshotId: id.nullable()
18115
+ }),
18084
18116
  computer_run_finish: exports_external.looseObject({
18085
18117
  status: exports_external.string(),
18086
18118
  replayed: exports_external.boolean(),
@@ -18464,6 +18496,15 @@ var OUTPUT_SHAPERS = {
18464
18496
  ["status", run.status]
18465
18497
  ]);
18466
18498
  },
18499
+ computer_run_suspend: (result) => {
18500
+ const run = record2(result.run) ?? {};
18501
+ return defined([
18502
+ ["runId", run.runId],
18503
+ ["runtime", selected(run.runtime, ["state", "currentSnapshotId", "updatedAt"])],
18504
+ ["replayed", result.replayed],
18505
+ ["snapshotId", result.snapshotId]
18506
+ ]);
18507
+ },
18467
18508
  computer_run_finish: (result) => {
18468
18509
  const run = record2(result.run) ?? {};
18469
18510
  return defined([
@@ -18565,6 +18606,7 @@ var MCP_TOOL_ANNOTATIONS = {
18565
18606
  feedback_recall: readOnly,
18566
18607
  feedback_thread_get: readOnly,
18567
18608
  contribute_arbor_feedback: additive,
18609
+ feedback_status: readOnly,
18568
18610
  admin_feedback_capability: destructiveIdempotent,
18569
18611
  admin_feedback_evidence: destructive,
18570
18612
  admin_feedback_topic: destructive,
@@ -18642,6 +18684,7 @@ var MCP_TOOL_ANNOTATIONS = {
18642
18684
  computer_open: additive,
18643
18685
  computer_reprovision: destructiveIdempotent,
18644
18686
  computer_run_start: additive,
18687
+ computer_run_suspend: idempotent,
18645
18688
  computer_repo_work_status: readOnly,
18646
18689
  computer_run_finish: idempotent,
18647
18690
  computer_run_receipt: readOnly,
@@ -18679,9 +18722,10 @@ var CONTRIBUTION_ADD_LINK_RELS = [
18679
18722
  "tracked-as",
18680
18723
  "delivered-by"
18681
18724
  ];
18725
+ var ARBOR_FEEDBACK_GUIDANCE = `ARBOR-SPECIFIC FEEDBACK — Privately capture ONE bounded report through \`contribute_arbor_feedback\` when Arbor itself caused meaningful friction: confusing semantics; surprising Arbor UI/MCP/CLI behavior; a missing Arbor capability; repeated Arbor retries; an Arbor-specific workaround; or misleading state, recovery guidance, or ergonomics. Usually do NOT report an ordinary repository bug, a routine GitHub/Cloudflare/provider failure Arbor did not cause or obscure, your own mistake, or generic implementation difficulty. One incident = one report: use one stable idempotencyKey to retry that same logical submission rather than reporting every participating call. Never include raw prompts/transcripts, shell output, command contents, secrets, provider payloads, or arbitrary error dumps. The raw body remains private; \`feedback_status\` reads only a receipt you own, while \`feedback_tree\` → \`feedback_recall\` → \`feedback_thread_get\` browses deliberately shared, sanitized knowledge.`;
18682
18726
  var ORIENTATION = `Arbor is your team's deliberation room and shared memory — people and agents settle typed work here, and Arbor remembers what's decided. To work well:
18683
18727
 
18684
- Meaningful friction with Arbor itself can be privately contributed through \`contribute_arbor_feedback\`; the raw body is never posted into the current Thread or the shared Arbor Feedback forum. Browse the curated shared forum with \`feedback_tree\` → \`feedback_recall\` → \`feedback_thread_get\`.
18728
+ ${ARBOR_FEEDBACK_GUIDANCE}
18685
18729
 
18686
18730
  Arbor's MCP is the collaboration and durable-knowledge surface. Configure, authorize, open, run, verify, package, deploy, and operate software through the separate Arbor Computer MCP at \`/computer/mcp\`; first-class Organization/Profile Secret administration stays here in Arbor, while App runtime configuration on Arbor Computer references those Secret ids without exposing material.
18687
18731
 
@@ -18696,6 +18740,19 @@ Arbor's MCP is the collaboration and durable-knowledge surface. Configure, autho
18696
18740
  8. DURABLE OUTPUT IS AN ARTIFACT, NOT A LONG CONTRIBUTION (AD-201). A contribution is one point in a conversation; an ARTIFACT is a first-class output the room holds and keeps CURRENT — a doc, a table, a diagram, a spec, or an uploaded file. When your point is really a deliverable the team will read or UPDATE later — a table of options, a reference doc, a plan, a rubric — make it an artifact (\`artifact\` verb=create with kind doc/table/diagram/html + \`source\`, or promote a file) instead of pasting it into prose. Text-kind artifacts are LIVING: \`artifact_get\` it, then \`artifact\` verb=edit naming the \`baseVersion\` you read — patches apply exact-match and atomically, one version per call, every version attributed. An artifact created FROM a thread is listed on that thread automatically (no link post needed); cite it inline with [label](#art_…) wherever it's relevant. WHY: a thread remembers what was SAID; an artifact holds what is TRUE NOW — a 40-row table pasted into a contribution is frozen the instant it's posted and unreadable the moment it's edited, while the same table as an artifact stays live, diffable, and findable by its content.
18697
18741
 
18698
18742
  Run \`arbor help\` (or read the MCP tool list) for the exact command/flags — those stay generated from the live action surface, so they're always current.`;
18743
+ var COMPUTER_ORIENTATION = `Arbor Computer is the complete software execution platform attached to Arbor's durable collaboration graph. It configures project environments, executes and verifies work, packages and releases Apps, and preserves reviewable evidence; it does not schedule agents or replace Arbor collaboration.
18744
+
18745
+ ${ARBOR_FEEDBACK_GUIDANCE}
18746
+
18747
+ 1. ORIENT, CONFIGURE, AND AUTHORIZE. Start with get_computer(threadId) to inspect the effective inherited recipe, repository authorization, compatibility, and durable lineage. Use set_organization_computer, set_space_computer, set_topic_computer, or set_thread_computer only when the corresponding complete sparse layer must be replaced; use github_repositories then github_connect_repository to authorize repositories at the narrowest scope that should inherit them. attach_computer mints durable protocol identity without starting a runtime; computer_open attaches as needed and starts or resumes the project environment. Each returned repository entry includes verified root instruction pointers when that repo has an AGENTS.md: read surfaced repository instructions before substantial edits or verification, then check for a nearer nested AGENTS.md once the target path is known. Repo-local instructions/scripts/config beat guessed formatter, test, lint, or build commands.
18748
+ 2. READ THE CAPABILITIES CARD, NOT THE BACKEND. computer_open and computer_status describe the live PARENT Thread Computer and return the exact computerSessionId for parent filesystem, command, checkpoint, Preview, bundle, and stop operations. computer_status does not establish isolated Run activity; use computer_run_receipt(runId) and computer_process_read for Run-owned work. Command-line utilities, including Git and package managers, run through computer_exec; check unfamiliar binaries with command -v.
18749
+ 3. ONE RUN PER TASK. A write Run defaults to an isolated execution environment with its own filesystem, processes, ports, and /tmp while preserving /workspace paths; a read Run shares the parent. Pass runId to Run-aware tools. If a response is lost, recover the durable operation/process identity from computer_run_receipt and read it before retrying. Once every operation is settled, computer_run_suspend publishes the exact workspace and releases the provider during an external wait; the next Run-aware operation restores that checkpoint under the same runId automatically. Suspension refuses active processes or unsettled outcomes and never replays unknown work, so reconcile process and Git/publication evidence first. An isolated local commit or Preview is not Git publication; push coherent work and prove it with computer_repo_work_status before computer_run_finish destroys the final placement. discard=true is the explicit choice to destroy proven non-durable work.
18750
+ 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.
18751
+ 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.
18752
+ 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.
18753
+ 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.
18754
+ 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.
18755
+ 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.`;
18699
18756
  var PROSE_LISTS = exports_external.registry();
18700
18757
  function proseList(description) {
18701
18758
  const schema = exports_external.array(exports_external.string()).describe(description);
@@ -18845,7 +18902,7 @@ var ACTION_DEFINITIONS = [
18845
18902
  {
18846
18903
  name: "contribute_arbor_feedback",
18847
18904
  title: "Privately contribute feedback about Arbor",
18848
- description: "Privately contribute feedback about using Arbor, including friction, evidence, critiques, questions, risks, or improvement proposals. The submitted body is not posted into the current Thread or shared Arbor Feedback forum; optional Topic/Thread ids only associate the private evidence with sanitized shared knowledge.",
18905
+ description: "Privately capture one bounded report when Arbor itself caused meaningful product or ergonomics friction; do not use this for ordinary repository bugs, routine un-obscured provider failures, agent mistakes, or generic implementation difficulty. The body is never posted into the current Thread or shared forum; one incident should produce one report, with a stable idempotencyKey used only to retry that same submission.",
18849
18906
  inputSchema: {
18850
18907
  type: exports_external.enum(ARBOR_FEEDBACK_TYPES).optional().describe("the contribution move (default comment); decision is reserved for shared forum curation"),
18851
18908
  body: exports_external.string().min(1).describe("the private feedback body"),
@@ -18860,6 +18917,17 @@ var ACTION_DEFINITIONS = [
18860
18917
  toolset: "feedback",
18861
18918
  run: forward("feedback.contribute")
18862
18919
  },
18920
+ {
18921
+ name: "feedback_status",
18922
+ title: "Check your private Arbor feedback receipt",
18923
+ description: "READ ONLY: Check the useful lifecycle of one private Arbor feedback receipt you own. Missing and not-owned receipts look identical, and this returns no raw body, identities, moderator diagnostics, or shared association targets.",
18924
+ inputSchema: {
18925
+ feedbackId: exports_external.string().describe("your private Arbor feedback receipt id, fbk_…")
18926
+ },
18927
+ surfaces: ["mcp", "cli"],
18928
+ toolset: "feedback",
18929
+ run: forward("feedback.status")
18930
+ },
18863
18931
  {
18864
18932
  name: "admin_feedback_capability",
18865
18933
  title: "Manage Arbor Feedback capabilities",
@@ -19242,6 +19310,17 @@ var ACTION_DEFINITIONS = [
19242
19310
  toolset: "loop",
19243
19311
  run: forward("computer_runtime.run_start")
19244
19312
  },
19313
+ {
19314
+ name: "computer_run_suspend",
19315
+ title: "Suspend a run",
19316
+ description: "Checkpoint an active isolated WRITE Run's exact workspace, publish that Run-owned restore point, and release its provider Sandbox during an external wait; the same runId resumes automatically on its next operation. Refuses active processes or unsettled mutations and never replays unknown work.",
19317
+ inputSchema: {
19318
+ runId: exports_external.string().describe("the active isolated WRITE Run to suspend, run_…")
19319
+ },
19320
+ surfaces: ["computer-mcp", "computer-cli"],
19321
+ toolset: "loop",
19322
+ run: forward("computer_runtime.run_suspend")
19323
+ },
19245
19324
  {
19246
19325
  name: "computer_repo_work_status",
19247
19326
  title: "Inspect repository finish state",
@@ -20138,7 +20217,7 @@ var ACTION_DEFINITIONS = [
20138
20217
  {
20139
20218
  name: "service_register",
20140
20219
  title: "Register a Computer lifecycle service",
20141
- description: "Register a persistent service identity for Currybox Computer lifecycle maintenance and mint its API key (shown ONCE). Human owner/admin CLI setup only. The credential is restricted to computer.get + computer.lifecycle_runs + computer.checkpoint + computer.reconcile_runs and to the Spaces listed here; store it as the Currybox control plane's Arbor credential.",
20220
+ description: "Register a persistent service identity for Currybox Computer lifecycle maintenance and mint its API key (shown ONCE). Human owner/admin CLI setup only. The credential is restricted to computer.get + computer.lifecycle_runs + computer.checkpoint + computer.suspend_run + computer.resume_run + computer.reconcile_runs and to the Spaces listed here; store it as the Currybox control plane's Arbor credential.",
20142
20221
  inputSchema: {
20143
20222
  displayName: exports_external.string().min(1).describe("the service display name, e.g. Currybox lifecycle service"),
20144
20223
  spaceIds: exports_external.array(exports_external.string().min(1)).min(1).describe("Spaces whose Thread computers the service may maintain")
@@ -21536,7 +21615,8 @@ function buildInput(inputSchema, flags, command) {
21536
21615
  var COMMAND_WORD_OVERRIDES = {
21537
21616
  contribute_arbor_feedback: "feedback",
21538
21617
  feedback_recall: "feedback find",
21539
- feedback_thread_get: "feedback thread"
21618
+ feedback_thread_get: "feedback thread",
21619
+ feedback_status: "feedback status"
21540
21620
  };
21541
21621
  function commandWords(action) {
21542
21622
  return COMMAND_WORD_OVERRIDES[action.name] ?? action.name.replace(/_/g, " ");
@@ -21548,6 +21628,7 @@ var POSITIONAL_FIELDS = {
21548
21628
  contribute_arbor_feedback: ["body"],
21549
21629
  feedback_recall: ["query"],
21550
21630
  feedback_thread_get: ["threadId"],
21631
+ feedback_status: ["feedbackId"],
21551
21632
  admin_feedback_capability: ["verb"],
21552
21633
  admin_feedback_evidence: ["verb"],
21553
21634
  admin_feedback_topic: ["action"],
@@ -21557,6 +21638,7 @@ var POSITIONAL_FIELDS = {
21557
21638
  app_fetch: ["appId", "path"],
21558
21639
  app_request: ["appId", "path"],
21559
21640
  computer_run_start: ["computerSessionId", "mode"],
21641
+ computer_run_suspend: ["runId"],
21560
21642
  code_symbols: ["path"],
21561
21643
  code_find_symbol: ["namePath", "path"],
21562
21644
  code_references: ["namePath", "path"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
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",