@lambdacurry/arbor 0.23.26 → 0.23.27

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 +41 -12
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // package.json
3
3
  var package_default = {
4
4
  name: "@lambdacurry/arbor",
5
- version: "0.23.26",
5
+ version: "0.23.27",
6
6
  description: "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
7
7
  keywords: [
8
8
  "agents",
@@ -6457,12 +6457,13 @@ var workflows = sqliteTable("workflows", {
6457
6457
  name: text("name").notNull(),
6458
6458
  summary: text("summary").notNull(),
6459
6459
  labels: text("labels", { mode: "json" }).$type().notNull(),
6460
+ derivedFromBuiltin: text("derived_from_builtin").$type(),
6460
6461
  createdAt: ts("created_at").notNull(),
6461
6462
  updatedAt: ts("updated_at").notNull()
6462
6463
  }, (t) => ({ orgIdx: index("workflows_org_idx").on(t.orgId) }));
6463
6464
  var spaceWorkflows = sqliteTable("space_workflows", {
6464
6465
  spaceId: text("space_id").notNull().references(() => spaces.id),
6465
- workflowId: text("workflow_id").notNull().references(() => workflows.id),
6466
+ workflowId: text("workflow_id").notNull(),
6466
6467
  isDefault: integer2("is_default", { mode: "boolean" }).notNull().default(false)
6467
6468
  }, (t) => ({
6468
6469
  pk: primaryKey({ columns: [t.spaceId, t.workflowId] }),
@@ -6476,7 +6477,7 @@ var topics = sqliteTable("topics", {
6476
6477
  purpose: text("purpose"),
6477
6478
  guidance: text("guidance", { mode: "json" }).$type().notNull().default([]),
6478
6479
  contributionLanes: text("contribution_lanes", { mode: "json" }).$type().notNull().default([]),
6479
- workflowId: text("workflow_id").references(() => workflows.id),
6480
+ workflowId: text("workflow_id"),
6480
6481
  archivedAt: ts("archived_at"),
6481
6482
  createdAt: ts("created_at").notNull()
6482
6483
  }, (t) => ({
@@ -7751,7 +7752,26 @@ var notificationCursors = sqliteTable("notification_cursors", {
7751
7752
  var recallIndex = sqliteTable("recall_index", {
7752
7753
  objectId: text("object_id").primaryKey(),
7753
7754
  indexedAt: ts("indexed_at").notNull(),
7754
- chunks: integer2("chunks")
7755
+ chunks: integer2("chunks"),
7756
+ pendingToken: text("pending_token"),
7757
+ vectorRevision: text("vector_revision")
7758
+ }, (t) => ({ pendingIdx: index("recall_index_pending_idx").on(t.pendingToken) }));
7759
+ var recallLifecycleRefreshes = sqliteTable("recall_lifecycle_refreshes", {
7760
+ threadId: text("thread_id").primaryKey().references(() => threads.id, { onDelete: "cascade" }),
7761
+ targetType: text("target_type").$type().notNull(),
7762
+ generation: text("generation").notNull(),
7763
+ cursorType: text("cursor_type").$type(),
7764
+ cursorId: text("cursor_id"),
7765
+ leaseToken: text("lease_token"),
7766
+ leaseUntil: ts("lease_until"),
7767
+ updatedAt: ts("updated_at").notNull()
7768
+ }, (t) => ({
7769
+ pendingIdx: index("recall_lifecycle_refreshes_pending_idx").on(t.updatedAt)
7770
+ }));
7771
+ var recallVectorLeases = sqliteTable("recall_vector_leases", {
7772
+ threadId: text("thread_id").primaryKey().references(() => threads.id, { onDelete: "cascade" }),
7773
+ token: text("token").notNull(),
7774
+ leaseUntil: ts("lease_until").notNull()
7755
7775
  });
7756
7776
  var watches = sqliteTable("watches", {
7757
7777
  id: text("id").primaryKey(),
@@ -7833,6 +7853,7 @@ var BUILTIN_WORKFLOW_IDS = [
7833
7853
  "experiment",
7834
7854
  "funnel"
7835
7855
  ];
7856
+ var BUILTIN_WORKFLOW_ID_SET = new Set(BUILTIN_WORKFLOW_IDS);
7836
7857
  var col = (key, name, type, order, extra) => ({ key, name, type, order, ...extra });
7837
7858
  var STANDARD = {
7838
7859
  id: "standard",
@@ -8179,6 +8200,9 @@ var recallFts = sqliteTable("recall_fts", {
8179
8200
  thread: text("thread")
8180
8201
  });
8181
8202
 
8203
+ // ../core/src/retrieval/vector-lease.ts
8204
+ var LEASE_MS = 5 * 60000;
8205
+
8182
8206
  // ../core/src/retrieval/index-consumer.ts
8183
8207
  var INDEX_ON = new Set([
8184
8208
  "contribution.added",
@@ -8193,6 +8217,9 @@ var INDEX_ON = new Set([
8193
8217
  "contribution.restored"
8194
8218
  ]);
8195
8219
  var PURGE_ON = new Set(["contribution.deleted"]);
8220
+ // ../core/src/retrieval/lifecycle-refresh.ts
8221
+ var LEASE_MS2 = 2 * 60000;
8222
+ var MISSING_VECTOR_GRACE_MS = 5 * 60000;
8196
8223
  // ../actions/src/external-read-defaults.ts
8197
8224
  var EXTERNAL_DEFAULT_PAGE_SIZE = 50;
8198
8225
  var TREE_EXTERNAL_DEFAULT_PAGE_SIZE = 4;
@@ -8734,6 +8761,8 @@ var workflowSummary = looseObject({
8734
8761
  name: string2(),
8735
8762
  summary: string2(),
8736
8763
  origin: string2().optional(),
8764
+ selectedBy: string2().optional(),
8765
+ derivedFromBuiltin: nullableString.optional(),
8737
8766
  isDefault: boolean2().optional(),
8738
8767
  labels: array(jsonObject).optional(),
8739
8768
  createdAt: string2().optional(),
@@ -11389,7 +11418,7 @@ var ACTION_DEFINITIONS = [
11389
11418
  spaceId: string2().describe("the space to create the topic in, spc_…"),
11390
11419
  title: string2().min(1).describe("the topic's name — an area of work, not a question"),
11391
11420
  purpose: string2().optional().describe("what this Topic accomplishes and what belongs here, leading with its primary role — Direction, Delivery, Operations, Intake, Coordination, or Learning; name an external or split source of truth or a handoff boundary only when it materially matters"),
11392
- workflow: string2().optional().describe("catalog id from `space_get.workflows` (pick by summary); must already be attached to this Space")
11421
+ workflow: string2().optional().describe("a workflow id from `space_get.workflows` (pick by summary) — a built-in such as `queue` or a catalog `wfl_…`; must already be attached to this Space")
11393
11422
  },
11394
11423
  surfaces: ["mcp", "cli"],
11395
11424
  toolset: "structure",
@@ -11403,7 +11432,7 @@ var ACTION_DEFINITIONS = [
11403
11432
  topicId: string2().describe("the topic to edit, top_…"),
11404
11433
  title: string2().min(1).optional().describe("a new title — an area of work, not a question"),
11405
11434
  purpose: string2().optional().describe("a new purpose — what this Topic accomplishes and what belongs here, leading with its primary role (Direction, Delivery, Operations, Intake, Coordination, or Learning); name an external or split source of truth or a handoff boundary only when it materially matters"),
11406
- workflow: string2().nullable().optional().describe("catalog id from `space_get.workflows` (pick by summary); must be attached to the Space; blank or null inherits the Space default")
11435
+ workflow: string2().nullable().optional().describe("a workflow id from `space_get.workflows` (pick by summary) — a built-in such as `queue` or a catalog `wfl_…`; must be attached to the Space; blank or null inherits the Space default")
11407
11436
  },
11408
11437
  surfaces: ["mcp", "cli"],
11409
11438
  toolset: "spaces",
@@ -12631,15 +12660,15 @@ var ACTION_DEFINITIONS = [
12631
12660
  {
12632
12661
  name: "space_update",
12633
12662
  title: "Edit a space's config",
12634
- description: "Edit a Space's purpose, title, or visibility; org owner/admin or that Space's admin only, and only supplied fields are patched. Use this for factual room metadata, including open/private, or org-admin `--attach-workflow` / `--detach-workflow` / `--default-workflow`; collaboration norms belong in Space guidance.",
12663
+ description: "Edit a Space's purpose, title, visibility, or offered workflows (`--attach-workflow` / `--detach-workflow` / `--default-workflow` take a built-in id like `queue` or a catalog `wfl_…`); org owner/admin or that Space's admin only, patching only supplied fields. Norms belong in Space guidance.",
12635
12664
  inputSchema: {
12636
12665
  spaceId: string2().describe("the space, spc_…"),
12637
12666
  purpose: string2().optional().describe("why this boundary exists and what it is around — commonly a Product/System, Program/Function, Portfolio/Network, or Practice/Community — plus its dominant work modes (Build, Operate, Coordinate, Discuss, Share) when that helps; plain prose, not metadata syntax"),
12638
12667
  title: string2().optional().describe("a new title for the space"),
12639
12668
  visibility: _enum(["open", "private"]).optional().describe("open or private (invite-only)"),
12640
- attachWorkflow: string2().optional().describe("org-admin: attach this catalog workflow id to the Space allowlist"),
12641
- detachWorkflow: string2().optional().describe("org-admin: detach this catalog workflow; rejected if a Topic still selects it"),
12642
- defaultWorkflow: string2().optional().describe("org-admin: name which attached workflow new Topics inherit")
12669
+ attachWorkflow: string2().optional().describe("add a workflow to this Space's list: a built-in id (`standard`, `queue`, `content`, `experiment`, `funnel`) or a catalog `wfl_…` from `workflow_list`"),
12670
+ detachWorkflow: string2().optional().describe("remove a workflow (built-in id or `wfl_…`) from this Space's list; rejected while a Topic still selects it"),
12671
+ defaultWorkflow: string2().optional().describe("name which attached workflow (built-in id or `wfl_…`) new Topics inherit; with none, Standard")
12643
12672
  },
12644
12673
  surfaces: ["mcp", "cli"],
12645
12674
  toolset: "spaces",
@@ -12648,7 +12677,7 @@ var ACTION_DEFINITIONS = [
12648
12677
  {
12649
12678
  name: "workflow_create",
12650
12679
  title: "Create a catalog workflow",
12651
- description: "Copy a built-in into the org catalog (`--from-builtin`) or author name, summary, and labels. Org-admin; copy-then-edit — the built-in constant is never mutated in place.",
12680
+ description: "Customize a built-in by copying it into the org catalog (`--from-builtin`), or author name, summary, and labels. Org-admin; to use a built-in unchanged, attach it by id with `space_update`.",
12652
12681
  inputSchema: {
12653
12682
  fromBuiltin: _enum(BUILTIN_WORKFLOW_IDS).optional().describe("copy this built-in template into the catalog"),
12654
12683
  name: string2().min(1).optional().describe("catalog name; defaults from the built-in"),
@@ -12676,7 +12705,7 @@ var ACTION_DEFINITIONS = [
12676
12705
  {
12677
12706
  name: "workflow_list",
12678
12707
  title: "List org workflows",
12679
- description: "List built-in templates and this org's catalog copies, each with its required summary. Org-admin; members read the Space allowlist on `space_get`.",
12708
+ description: "List the built-in workflows (attach by id) and this org's catalog (`wfl_…`), each with its summary and `origin`. Pick one to attach with `space_update`; a Space's own list is on `space_get`.",
12680
12709
  inputSchema: {},
12681
12710
  surfaces: ["mcp", "cli"],
12682
12711
  toolset: "structure",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.23.26",
3
+ "version": "0.23.27",
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",