@lambdacurry/arbor 0.7.1 → 0.8.0

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 +64 -0
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -1652,6 +1652,17 @@ var notificationCursors = sqliteTable("notification_cursors", {
1652
1652
  profileId: text("profile_id").primaryKey().references(() => profiles.id),
1653
1653
  lastSeenAt: ts("last_seen_at").notNull()
1654
1654
  });
1655
+ var watches = sqliteTable("watches", {
1656
+ id: text("id").primaryKey(),
1657
+ watcherProfileId: text("watcher_profile_id").notNull().references(() => profiles.id),
1658
+ targetType: text("target_type").$type().notNull(),
1659
+ targetId: text("target_id").notNull(),
1660
+ cadence: text("cadence").$type().notNull().default("digest"),
1661
+ createdAt: ts("created_at").notNull()
1662
+ }, (t) => ({
1663
+ watchUq: uniqueIndex("watches_watcher_target_uniq").on(t.watcherProfileId, t.targetType, t.targetId),
1664
+ watchTargetIdx: index("watches_target_idx").on(t.targetType, t.targetId)
1665
+ }));
1655
1666
  // ../core/src/ops/onboarding.ts
1656
1667
  var INVITE_TTL_MS = 7 * 24 * 60 * 60 * 1000;
1657
1668
  var EMOJI_RE = new RegExp("^\\p{RGI_Emoji}$", "v");
@@ -16876,6 +16887,59 @@ var ACTIONS = [
16876
16887
  read_all: "notification.markAllRead"
16877
16888
  })
16878
16889
  },
16890
+ {
16891
+ name: "watch",
16892
+ title: "Watch for changes",
16893
+ description: "CHOSEN attention (AD-202) — subscribe to a thread/artifact/topic and get a notification when it changes, even on work you didn't touch (participation already notifies you about threads you're in; watch is for the rest). verb=on: start watching (targetType thread|artifact|topic + targetId). verb=off: stop. verb=status: are you watching this one? verb=list: everything you watch. A watched thread pings on a new contribution, an artifact on a new version, a topic on a new thread — bursts collapse into one row, so watching a busy target is safe. Watching is PRIVATE (nobody sees you watch).",
16894
+ inputSchema: {
16895
+ verb: exports_external.enum(["on", "off", "status", "list"]).describe("start/stop/check watching, or list"),
16896
+ targetType: exports_external.enum(["thread", "artifact", "topic"]).optional().describe("on/off/status: what to watch"),
16897
+ targetId: exports_external.string().optional().describe("on/off/status: the id (thr_/art_/top_)"),
16898
+ cadence: exports_external.enum(["immediate", "digest"]).optional().describe("on: email cadence for later (stored now; in-app fires regardless today)")
16899
+ },
16900
+ surfaces: ["mcp"],
16901
+ toolset: "loop",
16902
+ run: dispatch({
16903
+ on: "watch.toggle",
16904
+ off: "watch.toggle",
16905
+ status: "watch.get",
16906
+ list: "watch.list"
16907
+ }, (verb, input) => verb === "off" ? { ...input, watching: false } : input)
16908
+ },
16909
+ {
16910
+ name: "watch_target",
16911
+ title: "Watch a thread/artifact/topic",
16912
+ description: "Start watching a thread, artifact, or topic (AD-202) — you'll be notified on its next change (new contribution / version / thread) even if you never touched it. Private; bursts collapse to one notification.",
16913
+ inputSchema: {
16914
+ targetType: exports_external.enum(["thread", "artifact", "topic"]).describe("what to watch"),
16915
+ targetId: exports_external.string().describe("the id (thr_/art_/top_)"),
16916
+ cadence: exports_external.enum(["immediate", "digest"]).optional().describe("email cadence for later (in-app fires regardless today)")
16917
+ },
16918
+ surfaces: ["cli"],
16919
+ toolset: "loop",
16920
+ run: forward("watch.toggle")
16921
+ },
16922
+ {
16923
+ name: "unwatch_target",
16924
+ title: "Stop watching",
16925
+ description: "Stop watching a thread/artifact/topic (AD-202). Idempotent.",
16926
+ inputSchema: {
16927
+ targetType: exports_external.enum(["thread", "artifact", "topic"]).describe("what to stop watching"),
16928
+ targetId: exports_external.string().describe("the id (thr_/art_/top_)")
16929
+ },
16930
+ surfaces: ["cli"],
16931
+ toolset: "loop",
16932
+ run: (ex, input) => ex.call("watch.toggle", { ...input, watching: false })
16933
+ },
16934
+ {
16935
+ name: "watches",
16936
+ title: "List what you watch",
16937
+ description: "List every thread/artifact/topic you're watching (AD-202), newest first.",
16938
+ inputSchema: {},
16939
+ surfaces: ["cli"],
16940
+ toolset: "loop",
16941
+ run: forward("watch.list")
16942
+ },
16879
16943
  {
16880
16944
  name: "curation",
16881
16945
  title: "Curate the record",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
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",