@lambdacurry/arbor 0.21.1 → 0.21.3

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 +95 -9
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2297,6 +2297,16 @@ var artifacts = sqliteTable("artifacts", {
2297
2297
  tierIdx: index("artifacts_tier_idx").on(t.retrievalTier),
2298
2298
  ownerIdx: index("artifacts_owner_idx").on(t.ownerProfileId)
2299
2299
  }));
2300
+ var artifactLivePreviewSurfaces = sqliteTable("artifact_live_preview_surfaces", {
2301
+ artifactId: text("artifact_id").primaryKey().references(() => artifacts.id),
2302
+ threadId: text("thread_id").notNull().references(() => threads.id),
2303
+ boundByProfileId: text("bound_by_profile_id").notNull().references(() => profiles.id),
2304
+ executionContextId: text("execution_context_id").notNull().references(() => executionContexts.id),
2305
+ revision: integer("revision").notNull().default(1),
2306
+ boundAt: ts("bound_at").notNull()
2307
+ }, (t) => ({
2308
+ threadUq: uniqueIndex("artifact_live_preview_surfaces_thread_uniq").on(t.threadId)
2309
+ }));
2300
2310
  var artifactVersions = sqliteTable("artifact_versions", {
2301
2311
  id: text("id").primaryKey(),
2302
2312
  artifactId: text("artifact_id").notNull().references(() => artifacts.id),
@@ -17163,6 +17173,24 @@ var recallHit = exports_external.looseObject({
17163
17173
  url: nullableString,
17164
17174
  createdAt: timestamp
17165
17175
  });
17176
+ var artifactLivePreviewThread = exports_external.looseObject({
17177
+ id,
17178
+ title: exports_external.string()
17179
+ });
17180
+ var artifactLivePreview = exports_external.discriminatedUnion("status", [
17181
+ exports_external.looseObject({
17182
+ thread: artifactLivePreviewThread,
17183
+ boundAt: timestamp,
17184
+ status: exports_external.literal("configured"),
17185
+ url: exports_external.string()
17186
+ }),
17187
+ exports_external.looseObject({
17188
+ thread: artifactLivePreviewThread,
17189
+ boundAt: timestamp,
17190
+ status: exports_external.literal("unavailable"),
17191
+ url: exports_external.never().optional()
17192
+ })
17193
+ ]);
17166
17194
  var contributionRef = exports_external.looseObject({
17167
17195
  id,
17168
17196
  objectType: exports_external.string(),
@@ -17731,6 +17759,18 @@ var MCP_OUTPUT_SCHEMAS = {
17731
17759
  association: jsonObject.nullable(),
17732
17760
  message: exports_external.string()
17733
17761
  }),
17762
+ feedback_status: exports_external.object({
17763
+ feedbackId: id,
17764
+ type: exports_external.enum(ARBOR_FEEDBACK_TYPES),
17765
+ status: exports_external.enum(ARBOR_FEEDBACK_STATUSES),
17766
+ private: exports_external.literal(true),
17767
+ associatedWithSharedKnowledge: exports_external.boolean(),
17768
+ createdAt: timestamp,
17769
+ updatedAt: timestamp,
17770
+ reviewedAt: timestamp.nullable(),
17771
+ resolvedAt: timestamp.nullable(),
17772
+ message: exports_external.string()
17773
+ }),
17734
17774
  admin_feedback_capability: jsonObject,
17735
17775
  admin_feedback_evidence: jsonObject,
17736
17776
  admin_feedback_topic: jsonObject,
@@ -17972,7 +18012,10 @@ var MCP_OUTPUT_SCHEMAS = {
17972
18012
  url: exports_external.string().optional(),
17973
18013
  versions: exports_external.array(jsonObject).optional(),
17974
18014
  appBundles: exports_external.array(jsonObject).optional(),
17975
- usedByApps: exports_external.array(jsonObject).optional()
18015
+ usedByApps: exports_external.array(jsonObject).optional(),
18016
+ livePreview: artifactLivePreview.nullable().optional(),
18017
+ threadId: id.nullable().optional(),
18018
+ changed: exports_external.boolean().optional()
17976
18019
  }),
17977
18020
  artifact_get: exports_external.looseObject({
17978
18021
  id,
@@ -17984,6 +18027,7 @@ var MCP_OUTPUT_SCHEMAS = {
17984
18027
  versions: exports_external.array(jsonObject).optional(),
17985
18028
  appBundles: exports_external.array(jsonObject),
17986
18029
  usedByApps: exports_external.array(jsonObject),
18030
+ livePreview: artifactLivePreview.nullable(),
17987
18031
  watching: exports_external.boolean(),
17988
18032
  url: exports_external.string()
17989
18033
  }),
@@ -18594,6 +18638,7 @@ var MCP_TOOL_ANNOTATIONS = {
18594
18638
  feedback_recall: readOnly,
18595
18639
  feedback_thread_get: readOnly,
18596
18640
  contribute_arbor_feedback: additive,
18641
+ feedback_status: readOnly,
18597
18642
  admin_feedback_capability: destructiveIdempotent,
18598
18643
  admin_feedback_evidence: destructive,
18599
18644
  admin_feedback_topic: destructive,
@@ -18709,9 +18754,10 @@ var CONTRIBUTION_ADD_LINK_RELS = [
18709
18754
  "tracked-as",
18710
18755
  "delivered-by"
18711
18756
  ];
18757
+ 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.`;
18712
18758
  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:
18713
18759
 
18714
- 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\`.
18760
+ ${ARBOR_FEEDBACK_GUIDANCE}
18715
18761
 
18716
18762
  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.
18717
18763
 
@@ -18726,6 +18772,19 @@ Arbor's MCP is the collaboration and durable-knowledge surface. Configure, autho
18726
18772
  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.
18727
18773
 
18728
18774
  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.`;
18775
+ 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.
18776
+
18777
+ ${ARBOR_FEEDBACK_GUIDANCE}
18778
+
18779
+ 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.
18780
+ 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.
18781
+ 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.
18782
+ 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
+ 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
+ 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.
18786
+ 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
+ 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.`;
18729
18788
  var PROSE_LISTS = exports_external.registry();
18730
18789
  function proseList(description) {
18731
18790
  const schema = exports_external.array(exports_external.string()).describe(description);
@@ -18875,7 +18934,7 @@ var ACTION_DEFINITIONS = [
18875
18934
  {
18876
18935
  name: "contribute_arbor_feedback",
18877
18936
  title: "Privately contribute feedback about Arbor",
18878
- 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.",
18937
+ 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.",
18879
18938
  inputSchema: {
18880
18939
  type: exports_external.enum(ARBOR_FEEDBACK_TYPES).optional().describe("the contribution move (default comment); decision is reserved for shared forum curation"),
18881
18940
  body: exports_external.string().min(1).describe("the private feedback body"),
@@ -18890,6 +18949,17 @@ var ACTION_DEFINITIONS = [
18890
18949
  toolset: "feedback",
18891
18950
  run: forward("feedback.contribute")
18892
18951
  },
18952
+ {
18953
+ name: "feedback_status",
18954
+ title: "Check your private Arbor feedback receipt",
18955
+ 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.",
18956
+ inputSchema: {
18957
+ feedbackId: exports_external.string().describe("your private Arbor feedback receipt id, fbk_…")
18958
+ },
18959
+ surfaces: ["mcp", "cli"],
18960
+ toolset: "feedback",
18961
+ run: forward("feedback.status")
18962
+ },
18893
18963
  {
18894
18964
  name: "admin_feedback_capability",
18895
18965
  title: "Manage Arbor Feedback capabilities",
@@ -19649,7 +19719,7 @@ var ACTION_DEFINITIONS = [
19649
19719
  {
19650
19720
  name: "get_artifact",
19651
19721
  title: "Read an artifact",
19652
- description: "Read an artifact: current source + version + immutable versions[].id (artv_…), plus who edited and via what. READ BEFORE YOU EDIT — the version number you read is the baseVersion your edit must name. Use the matching versions[].id as artifactVersionId when publishing an AppBundle. Pass --version to read an old snapshot.",
19722
+ description: "Read an Artifact's current source/version/history plus its current executable Live Preview surface when bound. READ BEFORE YOU EDIT — the version number you read is the baseVersion your edit must name. Surface binding is current Artifact identity metadata and remains current even when --version reads old content.",
19653
19723
  inputSchema: {
19654
19724
  artifactId: exports_external.string().describe("the artifact, art_…"),
19655
19725
  version: exports_external.number().optional().describe("read this old snapshot instead of the current")
@@ -19676,6 +19746,18 @@ var ACTION_DEFINITIONS = [
19676
19746
  verb: Array.isArray(input.patches) ? "patch" : "replace"
19677
19747
  })
19678
19748
  },
19749
+ {
19750
+ name: "set_artifact_live_preview",
19751
+ title: "Set an Artifact's live Thread surface",
19752
+ description: "Bind one Artifact to an existing same-Space Thread Live Preview, making the Artifact the durable entry point for that executable surface. Omit --thread-id to clear the binding; this changes no Artifact source/version and does not create or reconfigure a Computer.",
19753
+ inputSchema: {
19754
+ artifactId: exports_external.string().describe("the Artifact, art_…"),
19755
+ threadId: exports_external.string().optional().describe("the configured Thread Live Preview to bind, thr_…; omit to clear")
19756
+ },
19757
+ surfaces: ["cli"],
19758
+ toolset: "artifacts",
19759
+ run: forward("artifact.setLivePreview")
19760
+ },
19679
19761
  {
19680
19762
  name: "transition_artifact",
19681
19763
  title: "Transition an artifact's lifecycle",
@@ -20491,9 +20573,9 @@ var ACTION_DEFINITIONS = [
20491
20573
  {
20492
20574
  name: "artifact",
20493
20575
  title: "Create or edit an Artifact",
20494
- description: "Create or edit a durable versioned Artifact, or promote a Thread attachment; read artifact_get and its baseVersion before editing, while lifecycle/removal stay in artifact_transition and artifact_delete. Text edits replace source or apply exact-match patches atomically, file artifacts use contentRef, and computer-produced artifacts may cite computerSessionId.",
20576
+ description: "Create or edit a durable versioned Artifact, bind its executable Thread Live Preview, or promote a Thread attachment; read artifact_get before changing it, while lifecycle/removal stay in artifact_transition and artifact_delete. Live-surface binding changes Artifact identity metadata, not source/version content.",
20495
20577
  inputSchema: {
20496
- verb: exports_external.enum(["create", "edit", "promote_attachment"]).describe("which artifact move"),
20578
+ verb: exports_external.enum(["create", "edit", "set_live_preview", "promote_attachment"]).describe("which artifact move"),
20497
20579
  title: exports_external.string().optional().describe("create: the artifact's title"),
20498
20580
  kind: exports_external.enum(["doc", "table", "diagram", "html", "file"]).optional().describe("create: structural kind (default file). doc/table/diagram/html are editable text"),
20499
20581
  type: exports_external.string().optional().describe("create: semantic type, e.g. decision|summary|plan|markdown|table|research-brief"),
@@ -20504,7 +20586,8 @@ var ACTION_DEFINITIONS = [
20504
20586
  sourceThreadId: exports_external.string().optional().describe("create: the thread it came from"),
20505
20587
  computerSessionId: exports_external.string().optional().describe("create: the attached computer session that produced it, cms_…"),
20506
20588
  sourceContributionIds: exports_external.array(exports_external.string()).optional().describe("create: contributions it distills"),
20507
- artifactId: exports_external.string().optional().describe("edit: the Artifact, art_…"),
20589
+ artifactId: exports_external.string().optional().describe("edit/set_live_preview: the Artifact, art_…"),
20590
+ threadId: exports_external.string().optional().describe("set_live_preview: the configured Thread Live Preview, thr_…; omit to clear the binding"),
20508
20591
  baseVersion: exports_external.number().optional().describe("edit: the version you READ (from get/create) — stale base is rejected with the current source"),
20509
20592
  patches: exports_external.array(exports_external.object({ old: exports_external.string(), new: exports_external.string() })).optional().describe("edit: exact-match hunks applied in order, atomically; each old must match exactly once"),
20510
20593
  note: exports_external.string().optional().describe("edit: one-line summary of what changed"),
@@ -20515,13 +20598,14 @@ var ACTION_DEFINITIONS = [
20515
20598
  run: dispatch({
20516
20599
  create: "artifact.create",
20517
20600
  edit: "artifact.edit",
20601
+ set_live_preview: "artifact.setLivePreview",
20518
20602
  promote_attachment: "attachment.promote"
20519
20603
  }, (verb, input) => verb === "edit" ? { ...input, verb: Array.isArray(input.patches) ? "patch" : "replace" } : input)
20520
20604
  },
20521
20605
  {
20522
20606
  name: "artifact_get",
20523
20607
  title: "Read an Artifact",
20524
- description: "Read an Artifact's current source, version, immutable history, and AppBundle references, or pass version for an older snapshot. It cannot edit content, change lifecycle, promote an attachment, or delete an Artifact.",
20608
+ description: "Read an Artifact's current source, version, immutable history, AppBundle references, and current executable Live Preview surface, or pass version for an older content snapshot. It cannot edit content, bind a surface, change lifecycle, promote an attachment, or delete an Artifact.",
20525
20609
  inputSchema: {
20526
20610
  artifactId: exports_external.string().describe("the Artifact, art_…"),
20527
20611
  version: exports_external.number().optional().describe("read this old snapshot instead of the current")
@@ -21577,7 +21661,8 @@ function buildInput(inputSchema, flags, command) {
21577
21661
  var COMMAND_WORD_OVERRIDES = {
21578
21662
  contribute_arbor_feedback: "feedback",
21579
21663
  feedback_recall: "feedback find",
21580
- feedback_thread_get: "feedback thread"
21664
+ feedback_thread_get: "feedback thread",
21665
+ feedback_status: "feedback status"
21581
21666
  };
21582
21667
  function commandWords(action) {
21583
21668
  return COMMAND_WORD_OVERRIDES[action.name] ?? action.name.replace(/_/g, " ");
@@ -21589,6 +21674,7 @@ var POSITIONAL_FIELDS = {
21589
21674
  contribute_arbor_feedback: ["body"],
21590
21675
  feedback_recall: ["query"],
21591
21676
  feedback_thread_get: ["threadId"],
21677
+ feedback_status: ["feedbackId"],
21592
21678
  admin_feedback_capability: ["verb"],
21593
21679
  admin_feedback_evidence: ["verb"],
21594
21680
  admin_feedback_topic: ["action"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
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",