@oneie/sdk 0.16.3 → 0.16.5

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.
package/dist/receivers.js CHANGED
@@ -97,6 +97,7 @@ export const RECEIVERS = {
97
97
  }),
98
98
  "agent:provision": receiver({
99
99
  receiver: "agent:provision",
100
+ canonical: "agent:enroll",
100
101
  summary: "Zero-to-live in one unauthenticated call — register + workspace + publish agent + import skills + invite owner",
101
102
  request: () => z.object({
102
103
  name: z.string().optional(),
@@ -116,6 +117,7 @@ export const RECEIVERS = {
116
117
  }),
117
118
  "agent:bootstrap": receiver({
118
119
  receiver: "agent:bootstrap",
120
+ canonical: "agent:enroll",
119
121
  summary: "Atomically provision a workspace + actor + scoped key; optionally invite an initial human owner",
120
122
  request: () => z.object({
121
123
  name: z.string(),
@@ -134,6 +136,7 @@ export const RECEIVERS = {
134
136
  }),
135
137
  "auth:agent": receiver({
136
138
  receiver: "auth:agent",
139
+ canonical: "agent:enroll",
137
140
  // `wallet` is a PUBLIC receiving address the caller derived in its own process.
138
141
  // Nothing here generates keys: the address is stored on the TypeDB actor and
139
142
  // registered through wallet:create, which is first-write-wins per chain.
@@ -231,6 +234,7 @@ export const RECEIVERS = {
231
234
  }),
232
235
  "world:invite-agent": receiver({
233
236
  receiver: "world:invite-agent",
237
+ canonical: "agent:enroll",
234
238
  summary: "Create an agent actor in a workspace and return its key once — no email",
235
239
  request: () => z.object({ workspace: z.string(), name: z.string(), role: z.string().optional() }),
236
240
  response: () => z.object({ aid: z.string(), key: z.string() }),
@@ -368,6 +372,7 @@ export const RECEIVERS = {
368
372
  */
369
373
  "world:set-brand-tokens": receiver({
370
374
  receiver: "world:set-brand-tokens",
375
+ canonical: "brand:set",
371
376
  summary: "Write validated colour tokens to a workspace's brand (site.md)",
372
377
  request: () => z.object({
373
378
  /** The workspace being rebranded. The ONLY workspace field: authority is
@@ -414,8 +419,10 @@ export const RECEIVERS = {
414
419
  name: z.string(), type: z.string(), group: z.string().optional(),
415
420
  tags: z.array(z.string()).optional(), model: z.string().optional(), prompt: z.string().optional(),
416
421
  meta: z.unknown().optional(),
422
+ aid: z.string().regex(/^[a-z][a-z0-9-]{1,63}$/).optional().describe("A stable, slug-shaped actor id (a factory seat such as factory-builder) instead of a minted one. Staff or the owner of `group` only; also writes the TypeDB actor (actor-type agent, model) other receivers verify by aid. A taken aid is refused by name"),
423
+ workspace: z.string().optional().describe("The workspace the service lane acts for (the ask door's nominated slug)"),
417
424
  }),
418
- response: () => z.object({ aid: z.string() }), effect: "ask", auth: "manage_actors",
425
+ response: () => z.object({ aid: z.string(), created: z.boolean().optional(), graph: z.boolean().optional() }), effect: "ask", auth: "manage_actors",
419
426
  examples: [{ name: "scout", type: "agent" }],
420
427
  }),
421
428
  "world:update-actor": receiver({
@@ -1179,13 +1186,30 @@ export const RECEIVERS = {
1179
1186
  // ── model router (C3/C4 — do-metabolism) ──
1180
1187
  "world:pick-model": receiver({
1181
1188
  receiver: "world:pick-model",
1182
- summary: "Return the best proven model for a task shape (warmed/cold/toxic-escalate/fallback-unreachable)",
1183
- request: () => z.object({ shape: z.string().min(1) }),
1189
+ summary: "Return the best proven model for a task shape — every `model` is an OpenRouter id from the registry (chat/model-intel.json ∪ model-speed.json), except reason `lane`, which names a claude-code:<seat> the local lane runs",
1190
+ // `kit` and `rung` were answered by the resolver since factory cards 4 and 29,
1191
+ // but this object was `{ shape }` alone — zod strips undeclared keys, so both
1192
+ // were dropped at the door and every pick answered the whole pool. Measured on
1193
+ // production 2026-09-29: kit "cheap" + rung "irreversible" answered cold haiku.
1194
+ request: () => z.object({
1195
+ shape: z.string().min(1),
1196
+ kit: z.string().min(1).max(64).optional().describe("The kit (routing/teams.json). Present → the pick is one of the kit's BUILD seats and an unknown kit is refused as unknown-kit, never dropped"),
1197
+ rung: z.enum(["trivial", "contained", "shaped", "irreversible"]).optional().describe("The row's risk rung (text/work-categories.md). irreversible → frontier tier only; a rung above the kit's rungMax is refused as rung-outside-kit"),
1198
+ }),
1184
1199
  response: () => z.object({
1185
1200
  ok: z.boolean(),
1186
1201
  model: z.string().optional(),
1187
1202
  effort: z.string().optional(),
1188
- reason: z.enum(['warmed', 'cold', 'toxic-escalate', 'fallback-unreachable']).optional(),
1203
+ reason: z.enum(["warmed", "cold", "toxic-escalate", "fallback-unreachable", "rung-apex", "lane", "unknown-kit", "rung-outside-kit"]).optional(),
1204
+ error: z.string().optional(),
1205
+ kit: z.string().optional(),
1206
+ seats: z.record(z.string(), z.unknown()).nullable().optional(),
1207
+ ranking: z.enum(["cost-per-pass", "pass-rate"]).optional(),
1208
+ prices: z.string().optional(),
1209
+ costPerPass: z.number().optional(),
1210
+ // The (shape → model) rows the draw read, so a caller can SEE a mark or a
1211
+ // warn move the weight even while the answer stays cold (WARM_THRESHOLD 3).
1212
+ weights: z.array(z.object({ model: z.string(), strength: z.number(), resistance: z.number() })).optional(),
1189
1213
  }),
1190
1214
  effect: "ask", auth: "none", reversible: true,
1191
1215
  }),
@@ -1198,8 +1222,14 @@ export const RECEIVERS = {
1198
1222
  }),
1199
1223
  "world:bake-outcome": receiver({
1200
1224
  receiver: "world:bake-outcome",
1201
- summary: "One bake row moves one (family → model) path: pass marks, fail warns, could-not-run moves nothing (platform-gated)",
1202
- request: () => z.object({
1225
+ summary: "One bake row moves one (family → model) path: pass marks, fail warns, could-not-run moves nothing (platform-gated: staff, or a caller acting for the platform workspace)",
1226
+ request: () => z.object({
1227
+ // The service lane (GATEWAY_API_KEY) names the workspace it acts for here —
1228
+ // the ask door reads the VALIDATED payload, so without this key zod stripped
1229
+ // it and every script credential was answered "platform only" (2026-09-29).
1230
+ workspace: z.string().optional().describe("The workspace the service lane acts for (the ask door's nominated slug). The platform gate still decides"),
1231
+ // bake.sh --mark-row sends `slug`, the door's first-choice nomination key.
1232
+ slug: z.string().optional().describe("Alias of `workspace` — the ask door reads payload.slug ?? payload.workspace"),
1203
1233
  family: z.string().regex(/^[a-z][a-z0-9-]{0,39}$/).describe("The card's FAMILY from its shape.env — a bare word (text/work-categories.md § The families). The path key is shape:<family>"),
1204
1234
  model: z.string().min(1).max(96).describe("The model id the row ran, e.g. 'deepseek/deepseek-v4-flash'. The path target is model:<id>"),
1205
1235
  verdict: z.enum(["pass", "fail", "could-not-run"]).describe("pass → mark · fail → warn · could-not-run (provider error, cap) → nothing, because the model never answered"),
@@ -1221,6 +1251,7 @@ export const RECEIVERS = {
1221
1251
  }),
1222
1252
  "attention:follow": receiver({
1223
1253
  receiver: "attention:follow",
1254
+ canonical: "world:subscribe",
1224
1255
  summary: "Subscribe to a do-event axis; writes ws-scoped mark so fan-out stays tenant-isolated",
1225
1256
  request: () => z.object({ axis: z.string().min(1) }),
1226
1257
  response: () => z.object({ ok: z.boolean(), target: z.string().optional() }),
@@ -1390,6 +1421,7 @@ export const RECEIVERS = {
1390
1421
  // ── groups ──
1391
1422
  "groups:join": receiver({
1392
1423
  receiver: "groups:join",
1424
+ canonical: "world:request-access",
1393
1425
  surfaces: { mcp: true },
1394
1426
  summary: "Join a group",
1395
1427
  request: () => z.object({ gid: z.string() }),
@@ -1398,6 +1430,7 @@ export const RECEIVERS = {
1398
1430
  }),
1399
1431
  "groups:leave": receiver({
1400
1432
  receiver: "groups:leave",
1433
+ canonical: "world:remove-member",
1401
1434
  surfaces: { mcp: true },
1402
1435
  summary: "Leave a group",
1403
1436
  request: () => z.object({ gid: z.string() }),
@@ -1406,6 +1439,7 @@ export const RECEIVERS = {
1406
1439
  }),
1407
1440
  "groups:invite": receiver({
1408
1441
  receiver: "groups:invite",
1442
+ canonical: "world:invite-member",
1409
1443
  summary: "Invite an actor to a group",
1410
1444
  request: () => z.object({ gid: z.string(), uid: z.string(), role: z.string().optional() }),
1411
1445
  response: () => ok,
@@ -1417,6 +1451,7 @@ export const RECEIVERS = {
1417
1451
  // awareness, not membership: no role, no read, never a world:route target.
1418
1452
  "groups:follow": receiver({
1419
1453
  receiver: "groups:follow",
1454
+ canonical: "world:subscribe",
1420
1455
  summary: "Watch a public group — its world:announce fan-out reaches your inbox",
1421
1456
  request: () => z.object({
1422
1457
  group: z.string().describe("slug or gid of the group to watch"),
@@ -1433,6 +1468,7 @@ export const RECEIVERS = {
1433
1468
  }),
1434
1469
  "groups:unfollow": receiver({
1435
1470
  receiver: "groups:unfollow",
1471
+ canonical: "world:unsubscribe",
1436
1472
  summary: "Stop watching a group — removes the watch row only, never a declared subscription",
1437
1473
  request: () => z.object({ group: z.string().describe("slug or gid") }),
1438
1474
  response: () => z.object({
@@ -1446,6 +1482,7 @@ export const RECEIVERS = {
1446
1482
  }),
1447
1483
  "groups:members": receiver({
1448
1484
  receiver: "groups:members",
1485
+ canonical: "world:list-actors",
1449
1486
  surfaces: { mcp: true },
1450
1487
  summary: "List a group's members",
1451
1488
  request: () => z.object({ gid: z.string() }),
@@ -1535,6 +1572,7 @@ export const RECEIVERS = {
1535
1572
  // ── subscriptions ──
1536
1573
  "subscriptions:register": receiver({
1537
1574
  receiver: "subscriptions:register",
1575
+ canonical: "world:subscribe",
1538
1576
  summary: "Subscribe to a receiver's events by tag",
1539
1577
  request: () => z.object({
1540
1578
  // OPTIONAL, and the default is the common case. `subscriptions.ts` reads
@@ -1635,7 +1673,8 @@ export const RECEIVERS = {
1635
1673
  receiver: "world:route",
1636
1674
  summary: "Route a tagged signal to THE handler via the ladder: learned tag-node path (follow_route) → staked subscribers (reputation-ranked) → CEO standing workflow; marks the delivery path so the next route is smarter. reply:true also invokes the resolved actor and returns its answer inline. decide:true instead answers the deterministic verdict { receiver, rung, reason } (reason: highway|classified|ceo) from the learned lane — a pure read, zero side effects, zero tokens; TypeQL twin: route_verdict (migration 0043)",
1637
1675
  request: () => z.object({
1638
- tags: z.array(z.string()),
1676
+ tags: z.array(z.string()).optional(),
1677
+ text: z.string().optional(),
1639
1678
  decide: z.boolean().optional(), // true → verdict-only: no delivery, no mark, no CEO trigger
1640
1679
  deliver: z.boolean().optional(),
1641
1680
  reply: z.boolean().optional(),
@@ -1652,7 +1691,7 @@ export const RECEIVERS = {
1652
1691
  rung: z.number().optional(),
1653
1692
  reason: z.enum(["highway", "classified", "ceo"]).optional(),
1654
1693
  tags: z.array(z.string()).optional(),
1655
- reply: z.object({ ok: z.boolean(), text: z.string().optional(), error: z.string().optional() }).optional(),
1694
+ reply: z.object({ ok: z.boolean(), text: z.string().optional(), error: z.string().optional(), model: z.string().optional(), picked: z.string().optional(), shape: z.string().optional(), reason: z.string().optional(), usage: z.object({ model: z.string(), tokensIn: z.number(), tokensOut: z.number() }).passthrough().optional() }).optional(),
1656
1695
  }),
1657
1696
  effect: "ask",
1658
1697
  }),
@@ -1889,7 +1928,12 @@ export const RECEIVERS = {
1889
1928
  // close
1890
1929
  attempt: z.string().optional(),
1891
1930
  status: z.enum(["done", "verified", "failed", "dissolved"]).optional(),
1892
- produced: z.string().optional(),
1931
+ produced: z.string().optional().describe("What the attempt produced: a thing tid, a commit sha (7–40 hex) or a repo-relative file path. A sha or a path is minted as an `output` thing, output:<workspace>:commit|file:<ref>, and linked by `production`"),
1932
+ // The router lane: the close's status is the verdict on shape:<shape> → model:<model>,
1933
+ // the path world:pick-model follows (done|verified mark, failed warns, dissolved
1934
+ // moves nothing). Both or neither; the platform gate is world:bake-outcome's.
1935
+ shape: z.string().regex(/^[a-z][a-z0-9-]{0,39}$/).optional().describe("The family the attempt built (a bare word) — with `model`, the close moves shape:<shape> → model:<model>"),
1936
+ model: z.string().min(1).max(96).optional().describe("The OpenRouter id that built it — with `shape`, the close moves shape:<shape> → model:<model>"),
1893
1937
  // Scores land on the ATTEMPT — the graph is the authority; a composite on the
1894
1938
  // plan thing is a cached projection over the attempts it contains (§3.2).
1895
1939
  rubric: z.object({
@@ -1908,9 +1952,12 @@ export const RECEIVERS = {
1908
1952
  phase: z.string().optional(),
1909
1953
  status: z.string().optional(),
1910
1954
  produced: z.string().nullable().optional(),
1955
+ producedRef: z.string().optional(),
1911
1956
  rubric: z.array(z.string()).optional(),
1912
1957
  deduped: z.boolean().optional(),
1913
1958
  error: z.string().optional(),
1959
+ // world:bake-outcome's own answer for the router lane: moved mark|warn|none and the path, or its refusal.
1960
+ learned: z.record(z.string(), z.unknown()).optional(),
1914
1961
  }),
1915
1962
  effect: "ask", idempotent: true,
1916
1963
  }),
@@ -2811,6 +2858,7 @@ export const RECEIVERS = {
2811
2858
  assignee: z.string().optional().describe("Actor slug. '' = unassigned only."),
2812
2859
  parent: z.string().optional().describe("Only direct children of this task id. '' = top-level rows (no parent)."),
2813
2860
  search: z.string().optional().describe("Case-insensitive substring on the task name."),
2861
+ tid: z.string().optional().describe("Exactly this task id (any `task:` prefix doubling ignored). How a `?task=<tid>` link opens a row that is not on the first page."),
2814
2862
  ready: z.boolean().optional().describe("true = only rows claimable now (open, and every blocker closed). false = only rows that are NOT claimable now (not open, or at least one blocker still open). Omit for both."),
2815
2863
  include: z.array(z.enum(["notes", "graph", "dates", "thread"])).optional()
2816
2864
  .describe("Widen each row. notes = the prose goal, WHOLE and unclipped (it was silently cut at 2000 chars until 2026-09-21, mid-word, while `truncated` named the tag budget beside it and stayed silent about this one; the escape hatch its comment named, tasks:get, was never built, so no door returned a longer note at all). Pass `notesClip` for a bound and the response reports `truncated.notes`; graph = children + blocks (the reverse edges); dates = startAt/createdAt/closedAt; thread = the task's inbox conversation (id, comment count, last message). Compact rows already carry parent, blockedBy, dueAt."),
@@ -2841,6 +2889,7 @@ export const RECEIVERS = {
2841
2889
  rows: z.number().optional().describe("The snapshot hit its row budget; this many unique rows were read. total is a floor."),
2842
2890
  edges: z.boolean().optional().describe("parent/blockedBy edges were capped — a row may read as unblocked or orphaned when it is not."),
2843
2891
  tags: z.number().optional().describe("This many returned rows may be missing tags."),
2892
+ thread: z.number().optional().describe("include:'thread' only — this many returned rows could not have their comments counted (thread.unread present, thread.comments null). Absent = every count is real."),
2844
2893
  }).optional().describe("Absent = nothing was cut. Present = say so before you plan on it."),
2845
2894
  summary: z.object({
2846
2895
  byStatus: z.record(z.string(), z.number()),
@@ -2886,7 +2935,8 @@ export const RECEIVERS = {
2886
2935
  // include: thread — the same D1 conversation tasks:comment writes and /in lists
2887
2936
  thread: z.object({
2888
2937
  threadId: z.string().optional().describe("The inbox thread id; absent = nobody has commented yet."),
2889
- comments: z.number(),
2938
+ comments: z.number().nullable().describe("Messages on the task's thread, summed over both stored key shapes (task:<id> and legacy task:task:<id>). 0 = the read succeeded and nobody has commented. null = COULD NOT LOOK — `unread` says why; never read it as 0."),
2939
+ unread: z.string().optional().describe("Present iff the count could not be read: 'd1_error' (the D1 read failed) or 'no_db' (no D1 binding). Counted in `truncated.thread`."),
2890
2940
  lastAt: z.string().optional(),
2891
2941
  lastAuthor: z.string().optional(),
2892
2942
  lastBody: z.string().optional().describe("First 280 chars of the latest message."),
@@ -3025,6 +3075,7 @@ export const RECEIVERS = {
3025
3075
  }),
3026
3076
  "tasks:follow": receiver({
3027
3077
  receiver: "tasks:follow",
3078
+ canonical: "world:subscribe",
3028
3079
  surfaces: { mcp: true },
3029
3080
  summary: "Follow one task — a task-grain subscription (a `follows` row with receiver `tasks:announce`), so its announcements reach the caller's inbox. Refused across tenants",
3030
3081
  request: () => z.object({
@@ -3042,6 +3093,7 @@ export const RECEIVERS = {
3042
3093
  }),
3043
3094
  "tasks:unfollow": receiver({
3044
3095
  receiver: "tasks:unfollow",
3096
+ canonical: "world:unsubscribe",
3045
3097
  surfaces: { mcp: true },
3046
3098
  summary: "Stop following one task — deletes exactly that task-grain subscription row, leaving tag-level subscriptions alone",
3047
3099
  request: () => z.object({
@@ -3147,6 +3199,7 @@ export const RECEIVERS = {
3147
3199
  // That is the whole IDOR rule: the subject is derived, never declared.
3148
3200
  "agents:register": receiver({
3149
3201
  receiver: "agents:register",
3202
+ canonical: "agent:enroll",
3150
3203
  surfaces: { mcp: { name: "register" } },
3151
3204
  summary: "Register as a sellable actor with capabilities. Public: call it with no credential and it mints a scoped identity (returns actorId + apiKey, compute float locked until one x402 payment).",
3152
3205
  request: () => z.object({
@@ -3178,6 +3231,7 @@ export const RECEIVERS = {
3178
3231
  }),
3179
3232
  "agents:status": receiver({
3180
3233
  receiver: "agents:status",
3234
+ canonical: "world:update-actor",
3181
3235
  summary: "Set an agent active or inactive",
3182
3236
  request: () => z.object({ uid: z.string(), status: z.string() }),
3183
3237
  response: () => AgentStatusResponseSchema,
@@ -3888,6 +3942,7 @@ export const RECEIVERS = {
3888
3942
  }),
3889
3943
  "space:join": receiver({
3890
3944
  receiver: "space:join",
3945
+ canonical: "world:request-access",
3891
3946
  summary: "Join a public Space — caller begins receiving its signals and their posts are stamped with the space tag",
3892
3947
  request: () => z.object({ space: z.string() }),
3893
3948
  response: () => z.object({
@@ -3899,6 +3954,7 @@ export const RECEIVERS = {
3899
3954
  }),
3900
3955
  "space:invite": receiver({
3901
3956
  receiver: "space:invite",
3957
+ canonical: "world:invite-member",
3902
3958
  summary: "Invite an actor to a private Space — grants membership so they can read and post; requires the caller to be a member or admin of the Space",
3903
3959
  request: () => z.object({
3904
3960
  space: z.string(),
@@ -4007,6 +4063,7 @@ export const RECEIVERS = {
4007
4063
  // frequent browse becomes a one-name re-run / a feed to follow.
4008
4064
  "lens:save": receiver({
4009
4065
  receiver: "lens:save",
4066
+ canonical: "view:create",
4010
4067
  summary: "Save a named tag-query lens for the workspace (upsert by name) — a reusable browse / followable feed",
4011
4068
  request: () => z.object({
4012
4069
  name: z.string(),
@@ -4021,6 +4078,7 @@ export const RECEIVERS = {
4021
4078
  // lens:list — the workspace's saved lenses.
4022
4079
  "lens:list": receiver({
4023
4080
  receiver: "lens:list",
4081
+ canonical: "view:list",
4024
4082
  summary: "List the workspace's saved lenses",
4025
4083
  request: () => z.object({}),
4026
4084
  response: () => z.object({ ok: z.boolean(), lenses: z.array(z.unknown()).optional(), error: z.string().optional() }),
@@ -4029,6 +4087,7 @@ export const RECEIVERS = {
4029
4087
  // lens:delete — remove a saved lens by name.
4030
4088
  "lens:delete": receiver({
4031
4089
  receiver: "lens:delete",
4090
+ canonical: "view:delete",
4032
4091
  summary: "Delete a saved lens by name",
4033
4092
  request: () => z.object({ name: z.string() }),
4034
4093
  response: () => z.object({ ok: z.boolean(), removed: z.number().optional(), error: z.string().optional() }),
@@ -4234,6 +4293,7 @@ export const RECEIVERS = {
4234
4293
  // entity:meta — editable profile fields for an entity (website, industry, location, …).
4235
4294
  "entity:meta": receiver({
4236
4295
  receiver: "entity:meta",
4296
+ canonical: "world:update-contact",
4237
4297
  summary: "Patch an entity's profile fields (website, industry, location, city, country, size, description, phone, email) — empty value clears the field",
4238
4298
  request: () => z.object({ id: z.string(), meta: z.record(z.string(), z.unknown()) }),
4239
4299
  response: () => z.object({ ok: z.boolean(), meta: z.record(z.string(), z.string()).optional(), error: z.string().optional() }),
@@ -6154,6 +6214,7 @@ export const RECEIVERS = {
6154
6214
  // ── people / companies / conversation — handlers in resolvers/groups.ts ────────
6155
6215
  "people:create": receiver({
6156
6216
  receiver: "people:create",
6217
+ canonical: "world:create-actor",
6157
6218
  summary: "Create a person actor in the workspace",
6158
6219
  request: () => z.object({ name: z.string(), email: z.string().optional() }),
6159
6220
  response: () => z.object({ ok: z.boolean(), aid: z.string().optional(), name: z.string().optional(), error: z.string().optional() }),
@@ -6161,6 +6222,7 @@ export const RECEIVERS = {
6161
6222
  }),
6162
6223
  "companies:create": receiver({
6163
6224
  receiver: "companies:create",
6225
+ canonical: "world:create-group",
6164
6226
  summary: "Create a company group in the workspace",
6165
6227
  request: () => z.object({ name: z.string() }),
6166
6228
  response: () => z.object({ ok: z.boolean(), gid: z.string().optional(), name: z.string().optional(), error: z.string().optional() }),
@@ -7233,6 +7295,7 @@ export const RECEIVERS = {
7233
7295
  }),
7234
7296
  "segment:create": receiver({
7235
7297
  receiver: "segment:create",
7298
+ canonical: "view:create",
7236
7299
  summary: "Create an audience segment from a rule definition (SegmentDef: {all, any?})",
7237
7300
  request: () => z.object({ workspace: z.string(), name: z.string(), description: z.string().optional(), definition: z.record(z.string(), z.unknown()) }),
7238
7301
  response: () => z.object({ id: z.string() }),
@@ -7240,6 +7303,7 @@ export const RECEIVERS = {
7240
7303
  }),
7241
7304
  "segment:update": receiver({
7242
7305
  receiver: "segment:update",
7306
+ canonical: "view:update",
7243
7307
  summary: "Update an audience segment — name, description, or definition",
7244
7308
  request: () => z.object({ workspace: z.string(), id: z.string(), name: z.string().optional(), description: z.string().optional(), definition: z.record(z.string(), z.unknown()).optional() }),
7245
7309
  response: () => z.object({ ok: z.boolean() }),
@@ -7247,6 +7311,7 @@ export const RECEIVERS = {
7247
7311
  }),
7248
7312
  "segment:list": receiver({
7249
7313
  receiver: "segment:list",
7314
+ canonical: "view:list",
7250
7315
  surfaces: { mcp: true },
7251
7316
  summary: "List audience segments for a workspace",
7252
7317
  request: () => z.object({ workspace: z.string() }),
@@ -7255,6 +7320,7 @@ export const RECEIVERS = {
7255
7320
  }),
7256
7321
  "segment:get": receiver({
7257
7322
  receiver: "segment:get",
7323
+ canonical: "view:get",
7258
7324
  surfaces: { mcp: true },
7259
7325
  summary: "Get one audience segment with its rule definition",
7260
7326
  request: () => z.object({ workspace: z.string(), id: z.string() }),
@@ -7271,6 +7337,7 @@ export const RECEIVERS = {
7271
7337
  }),
7272
7338
  "segment:delete": receiver({
7273
7339
  receiver: "segment:delete",
7340
+ canonical: "view:delete",
7274
7341
  summary: "Delete an audience segment and its membership snapshot",
7275
7342
  request: () => z.object({ workspace: z.string(), id: z.string() }),
7276
7343
  response: () => z.object({ ok: z.boolean() }),
@@ -8203,6 +8270,428 @@ export const RECEIVERS = {
8203
8270
  effect: "ask", cost: "variable", idempotent: false, reversible: false, settles: "none", auth: "member",
8204
8271
  examples: [{ workspace: "one", prompt: "a wide banner of a quiet harbour at dawn, muted palette" }],
8205
8272
  }),
8273
+ // ── Declared 2026-09-30 (text/receivers.md deliverable 2): handlers that ran with no contract.
8274
+ // Requests are passthrough so the edge strips nothing a handler reads; labels copied from each body.
8275
+ "activity:announce": receiver({
8276
+ receiver: "activity:announce",
8277
+ summary: "Broadcasts a system event to matched subscribers via tag-intersection fan-out",
8278
+ request: () => z.object({ event: z.unknown().optional(), tags: z.unknown().optional() }).passthrough(),
8279
+ response: () => z.unknown(),
8280
+ effect: "ask", auth: "session", reversible: false,
8281
+ }),
8282
+ "affiliate:approve": receiver({
8283
+ receiver: "affiliate:approve",
8284
+ summary: "Approve or reject a pending affiliate join request",
8285
+ request: () => z.object({ decision: z.unknown().optional(), requestId: z.unknown().optional() }).passthrough(),
8286
+ response: () => z.unknown(),
8287
+ effect: "ask", auth: "owner", reversible: false,
8288
+ }),
8289
+ "affiliate:join-request": receiver({
8290
+ receiver: "affiliate:join-request",
8291
+ summary: "Submit a request to join an affiliate program",
8292
+ request: () => z.object({ program: z.unknown().optional(), reason: z.unknown().optional() }).passthrough(),
8293
+ response: () => z.unknown(),
8294
+ effect: "ask", auth: "session", reversible: false,
8295
+ }),
8296
+ "affiliate:ppc-payout": receiver({
8297
+ receiver: "affiliate:ppc-payout",
8298
+ summary: "Drains unpaid PPC accrual for a budget to affiliate payout addresses via pay.one.ie",
8299
+ request: () => z.object({ budgetId: z.unknown().optional(), chain: z.unknown().optional(), refToAddress: z.unknown().optional(), treasuryAddress: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8300
+ response: () => z.unknown(),
8301
+ effect: "ask", auth: "owner", reversible: false,
8302
+ }),
8303
+ "agent:draft": receiver({
8304
+ receiver: "agent:draft",
8305
+ summary: "Draft an agent's reply into a thread the caller's workspace owns, for a human to review before it is sent",
8306
+ request: () => z.object({}).passthrough(),
8307
+ response: () => z.unknown(),
8308
+ effect: "ask", auth: "session", reversible: false,
8309
+ }),
8310
+ "agent:schedule": receiver({
8311
+ receiver: "agent:schedule",
8312
+ summary: "Writes a scheduled job row for an actor to be woken later",
8313
+ request: () => z.object({ actorId: z.unknown().optional(), cron: z.unknown().optional(), instructions: z.unknown().optional(), skill: z.unknown().optional() }).passthrough(),
8314
+ response: () => z.unknown(),
8315
+ effect: "ask", auth: "owner", reversible: false,
8316
+ }),
8317
+ "calendar:schedule-meeting": receiver({
8318
+ receiver: "calendar:schedule-meeting",
8319
+ summary: "Sends a scheduling email to a contact and returns status",
8320
+ request: () => z.object({ amountLabel: z.unknown().optional(), email: z.unknown().optional(), name: z.unknown().optional(), stepName: z.unknown().optional() }).passthrough(),
8321
+ response: () => z.unknown(),
8322
+ effect: "signal", auth: "session", reversible: false,
8323
+ }),
8324
+ "campaign:brief": receiver({
8325
+ receiver: "campaign:brief",
8326
+ summary: "Creates a campaign group from a brief, fires async channels BUILD, and returns the group ID and slug",
8327
+ request: () => z.object({ brief: z.unknown().optional(), name: z.unknown().optional(), url: z.unknown().optional() }).passthrough(),
8328
+ response: () => z.unknown(),
8329
+ effect: "ask", auth: "member", reversible: false,
8330
+ }),
8331
+ "campaign:update": receiver({
8332
+ receiver: "campaign:update",
8333
+ summary: "Updates a campaign's name or a specific section's content, and returns the updated campaign info",
8334
+ request: () => z.object({ campaignId: z.unknown().optional(), content: z.unknown().optional(), name: z.unknown().optional(), stageKey: z.unknown().optional(), stageName: z.unknown().optional() }).passthrough(),
8335
+ response: () => z.unknown(),
8336
+ effect: "ask", auth: "member", reversible: false,
8337
+ }),
8338
+ "chat:delete-template": receiver({
8339
+ receiver: "chat:delete-template",
8340
+ summary: "Deletes a chat template for a chip_id in the workspace",
8341
+ request: () => z.object({ agent_id: z.unknown().optional(), chip_id: z.unknown().optional() }).passthrough(),
8342
+ response: () => z.unknown(),
8343
+ effect: "ask", auth: "session", reversible: false,
8344
+ }),
8345
+ "chat:list-templates": receiver({
8346
+ receiver: "chat:list-templates",
8347
+ summary: "Lists chat templates for the workspace, optionally filtered by agent_id",
8348
+ request: () => z.object({ agent_id: z.unknown().optional() }).passthrough(),
8349
+ response: () => z.unknown(),
8350
+ effect: "ask", auth: "session", reversible: false,
8351
+ }),
8352
+ "chat:set-template": receiver({
8353
+ receiver: "chat:set-template",
8354
+ summary: "Saves or updates a chat template for a chip_id in the workspace",
8355
+ request: () => z.object({ agent_id: z.unknown().optional(), chip_id: z.unknown().optional(), response_text: z.unknown().optional() }).passthrough(),
8356
+ response: () => z.unknown(),
8357
+ effect: "ask", auth: "session", reversible: false,
8358
+ }),
8359
+ "checkout:link": receiver({
8360
+ receiver: "checkout:link",
8361
+ summary: "Mints a shareable payment link for a product price",
8362
+ request: () => z.object({ chain: z.unknown().optional(), network: z.unknown().optional(), ppid: z.unknown().optional(), slug: z.unknown().optional() }).passthrough(),
8363
+ response: () => z.unknown(),
8364
+ effect: "ask", auth: "owner", reversible: false,
8365
+ }),
8366
+ "checkout:notify": receiver({
8367
+ receiver: "checkout:notify",
8368
+ summary: "Posts a pay link into the conversation for a sell step",
8369
+ request: () => z.object({ amountLabel: z.unknown().optional(), group: z.unknown().optional(), runId: z.unknown().optional(), stepId: z.unknown().optional(), stepName: z.unknown().optional(), url: z.unknown().optional() }).passthrough(),
8370
+ response: () => z.unknown(),
8371
+ effect: "signal", auth: "session", reversible: false,
8372
+ }),
8373
+ "content:draft": receiver({
8374
+ receiver: "content:draft",
8375
+ summary: "Generate or retrieve a cached content draft for a given workspace, function, channel, and lifecycle stage",
8376
+ request: () => z.object({ channel: z.unknown().optional(), fn: z.unknown().optional(), lifecycle: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8377
+ response: () => z.unknown(),
8378
+ effect: "ask", auth: "owner", reversible: false,
8379
+ }),
8380
+ "content:list": receiver({
8381
+ receiver: "content:list",
8382
+ summary: "List recent content drafts for a workspace, optionally filtered by function",
8383
+ request: () => z.object({ fn: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8384
+ response: () => z.unknown(),
8385
+ effect: "ask", auth: "owner", reversible: false,
8386
+ }),
8387
+ "conversation:autonomy": receiver({
8388
+ receiver: "conversation:autonomy",
8389
+ summary: "Read a conversation's autonomy level from tags, defaulting to 'auto' when missing, for the channels worker to decide send vs draft",
8390
+ request: () => z.object({ entityId: z.unknown().optional(), group: z.unknown().optional(), id: z.unknown().optional() }).passthrough(),
8391
+ response: () => z.unknown(),
8392
+ effect: "ask", auth: "session", reversible: false,
8393
+ }),
8394
+ "conversation:route": receiver({
8395
+ receiver: "conversation:route",
8396
+ summary: "Runs the 5-rung turn-taking ladder to route a conversation message to an agent",
8397
+ request: () => z.object({ authorKind: z.unknown().optional(), entityId: z.unknown().optional(), messageId: z.unknown().optional(), replyTo: z.unknown().optional(), sender: z.unknown().optional(), tags: z.unknown().optional(), text: z.unknown().optional() }).passthrough(),
8398
+ response: () => z.unknown(),
8399
+ effect: "ask", auth: "session", reversible: false,
8400
+ }),
8401
+ "credits:balance": receiver({
8402
+ receiver: "credits:balance",
8403
+ summary: "Returns the credits balance for the authenticated caller's slug",
8404
+ request: () => z.object({}).passthrough(),
8405
+ response: () => z.unknown(),
8406
+ effect: "ask", auth: "session", reversible: false,
8407
+ }),
8408
+ "email:send": receiver({
8409
+ receiver: "email:send",
8410
+ summary: "Sends a transactional email on behalf of the workspace",
8411
+ request: () => z.object({ body: z.unknown().optional(), html: z.unknown().optional(), subject: z.unknown().optional(), to: z.unknown().optional() }).passthrough(),
8412
+ response: () => z.unknown(),
8413
+ effect: "signal", auth: "session", reversible: false,
8414
+ }),
8415
+ "enrollment:demote-on-suspend": receiver({
8416
+ receiver: "enrollment:demote-on-suspend",
8417
+ summary: "Demotes all members of a workspace group on suspension",
8418
+ request: () => z.object({ workspace: z.unknown().optional() }).passthrough(),
8419
+ response: () => z.unknown(),
8420
+ effect: "ask", auth: "platform", reversible: false,
8421
+ }),
8422
+ "enrollment:restore-on-resume": receiver({
8423
+ receiver: "enrollment:restore-on-resume",
8424
+ summary: "Restores all members of a workspace group on resume with the provided plan",
8425
+ request: () => z.object({ plan: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8426
+ response: () => z.unknown(),
8427
+ effect: "ask", auth: "platform", reversible: false,
8428
+ }),
8429
+ "inbox": receiver({
8430
+ receiver: "inbox",
8431
+ summary: "Reads an actor's own message history from D1 and channels",
8432
+ request: () => z.object({ _suffix: z.unknown().optional(), limit: z.unknown().optional() }).passthrough(),
8433
+ response: () => z.unknown(),
8434
+ effect: "ask", auth: "session", reversible: false,
8435
+ }),
8436
+ "lead:capture": receiver({
8437
+ receiver: "lead:capture",
8438
+ summary: "Captures a form submit from any standalone page as a lead, resolving workspace from the page slug, and returns the leadId",
8439
+ request: () => z.object({ fields: z.unknown().optional(), page: z.unknown().optional(), visitorHash: z.unknown().optional() }).passthrough(),
8440
+ response: () => z.unknown(),
8441
+ effect: "ask", auth: "public", reversible: false,
8442
+ }),
8443
+ "learning:complete": receiver({
8444
+ receiver: "learning:complete",
8445
+ summary: "Grants credits and records pending reward when a learner completes a course stage. FINDING: falls back to data.workspace when the caller is unattested",
8446
+ request: () => z.object({ courseId: z.unknown().optional(), kind: z.unknown().optional(), stageId: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8447
+ response: () => z.unknown(),
8448
+ effect: "ask", auth: "session", reversible: false,
8449
+ }),
8450
+ "learning:dream": receiver({
8451
+ receiver: "learning:dream",
8452
+ summary: "Creates hypotheses from hardened paths and evidence edges, idempotently",
8453
+ request: () => z.object({}).passthrough(),
8454
+ response: () => z.unknown(),
8455
+ effect: "ask", auth: "platform", reversible: false,
8456
+ }),
8457
+ "learning:eval": receiver({
8458
+ receiver: "learning:eval",
8459
+ summary: "Evaluates dream-sourced hypotheses against new deal signals, updating confidence and status",
8460
+ request: () => z.object({}).passthrough(),
8461
+ response: () => z.unknown(),
8462
+ effect: "ask", auth: "platform", reversible: false,
8463
+ }),
8464
+ "lifecycle:mine": receiver({
8465
+ receiver: "lifecycle:mine",
8466
+ summary: "Read the caller's own lifecycle stage transitions",
8467
+ request: () => z.object({ lifecycle: z.unknown().optional() }).passthrough(),
8468
+ response: () => z.unknown(),
8469
+ effect: "ask", auth: "session", reversible: false,
8470
+ }),
8471
+ "market:quote": receiver({
8472
+ receiver: "market:quote",
8473
+ summary: "Prices a blended deal and optionally creates an offer deal in KV",
8474
+ request: () => z.object({ seller: z.unknown().optional(), skill: z.unknown().optional(), steps: z.unknown().optional() }).passthrough(),
8475
+ response: () => z.unknown(),
8476
+ effect: "ask", auth: "session", reversible: false,
8477
+ }),
8478
+ "market:stake": receiver({
8479
+ receiver: "market:stake",
8480
+ summary: "Bridges an on-chain stake event into routing reputation by calling mark()",
8481
+ request: () => z.object({ amountMist: z.unknown().optional(), seller: z.unknown().optional(), taskId: z.unknown().optional() }).passthrough(),
8482
+ response: () => z.unknown(),
8483
+ effect: "signal", auth: "platform", reversible: false,
8484
+ }),
8485
+ "member:invited": receiver({
8486
+ receiver: "member:invited",
8487
+ summary: "Send an invite email to a member after an invite_member action, checking authorization and generating a signed token",
8488
+ request: () => z.object({ email: z.unknown().optional(), role: z.unknown().optional(), slug: z.unknown().optional() }).passthrough(),
8489
+ response: () => z.unknown(),
8490
+ effect: "ask", auth: "owner", reversible: false,
8491
+ }),
8492
+ "memory:assert": receiver({
8493
+ receiver: "memory:assert",
8494
+ summary: "Writes a hypothesis from a statement or claim to TypeDB. FINDING: no authority check: an anonymous caller writes a hypothesis into workspace \"default\"",
8495
+ request: () => z.object({ claim: z.unknown().optional(), statement: z.unknown().optional() }).passthrough(),
8496
+ response: () => z.unknown(),
8497
+ effect: "ask", auth: "session", reversible: false,
8498
+ }),
8499
+ "memory:remember": receiver({
8500
+ receiver: "memory:remember",
8501
+ summary: "Writes an agent-asserted hypothesis linked to the workspace group",
8502
+ request: () => z.object({ actorId: z.unknown().optional(), key: z.unknown().optional(), value: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8503
+ response: () => z.unknown(),
8504
+ effect: "ask", auth: "owner", reversible: false,
8505
+ }),
8506
+ "memory:reveal": receiver({
8507
+ receiver: "memory:reveal",
8508
+ summary: "Returns all six memory types (hypotheses, paths, memberships, episodic, semantic, social, procedural) for an actor",
8509
+ request: () => z.object({ actorId: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8510
+ response: () => z.unknown(),
8511
+ effect: "ask", auth: "owner", reversible: false,
8512
+ }),
8513
+ "movers:funnel-claim": receiver({
8514
+ receiver: "movers:funnel-claim",
8515
+ summary: "Claims a sponsored preview workspace for the signed-in user, binding them as owner",
8516
+ request: () => z.object({ token: z.unknown().optional() }).passthrough(),
8517
+ response: () => z.unknown(),
8518
+ effect: "ask", auth: "session", reversible: false,
8519
+ }),
8520
+ "pages:chat-generate": receiver({
8521
+ receiver: "pages:chat-generate",
8522
+ summary: "Generates a deterministic chat pack for a page, updates the database, and returns the pack and its hash",
8523
+ request: () => z.object({ page: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8524
+ response: () => z.unknown(),
8525
+ effect: "ask", auth: "member", reversible: false,
8526
+ }),
8527
+ "payout:get": receiver({
8528
+ receiver: "payout:get",
8529
+ summary: "Retrieve a merchant's payout treasury addresses (sui/evm) and Stripe connect status after workspace ownership check",
8530
+ request: () => z.object({ workspace: z.unknown().optional() }).passthrough(),
8531
+ response: () => z.unknown(),
8532
+ effect: "ask", auth: "owner", reversible: false,
8533
+ }),
8534
+ "payout:set": receiver({
8535
+ receiver: "payout:set",
8536
+ summary: "Set a merchant's crypto payout treasury addresses (sui/evm) after workspace ownership check and human presence confirmation",
8537
+ request: () => z.object({ confirm: z.unknown().optional(), treasury_evm: z.unknown().optional(), treasury_sui: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8538
+ response: () => z.unknown(),
8539
+ effect: "ask", auth: "owner", reversible: false,
8540
+ }),
8541
+ "plugins:buy-with-credits": receiver({
8542
+ receiver: "plugins:buy-with-credits",
8543
+ summary: "Buy a plugin using workspace credits, granting entitlement synchronously",
8544
+ request: () => z.object({ name: z.unknown().optional() }).passthrough(),
8545
+ response: () => z.unknown(),
8546
+ effect: "ask", auth: "member", reversible: false,
8547
+ }),
8548
+ "plugins:buy-with-one-token": receiver({
8549
+ receiver: "plugins:buy-with-one-token",
8550
+ summary: "Buys a plugin by verifying a Sui ONE token transfer and granting entitlement with no credit mint",
8551
+ request: () => z.object({ name: z.unknown().optional(), tx: z.unknown().optional(), txDigest: z.unknown().optional() }).passthrough(),
8552
+ response: () => z.unknown(),
8553
+ effect: "ask", auth: "member", reversible: false,
8554
+ }),
8555
+ "plugins:credit-balance": receiver({
8556
+ receiver: "plugins:credit-balance",
8557
+ summary: "Returns the spendable credit balance and funding slug for the caller's workspace",
8558
+ request: () => z.object({}).passthrough(),
8559
+ response: () => z.unknown(),
8560
+ effect: "ask", auth: "member", reversible: false,
8561
+ }),
8562
+ "promise:get": receiver({
8563
+ receiver: "promise:get",
8564
+ summary: "Read a promise's terms and state publicly by slug",
8565
+ request: () => z.object({ slug: z.unknown().optional() }).passthrough(),
8566
+ response: () => z.unknown(),
8567
+ effect: "ask", auth: "public", reversible: false,
8568
+ }),
8569
+ "remote:resolve": receiver({
8570
+ receiver: "remote:resolve",
8571
+ summary: "Resume a run parked at a remote step \u2014 the remote system's attested answer wakes the run (sibling of human:resolve)",
8572
+ request: () => z.object({}).passthrough(),
8573
+ response: () => z.unknown(),
8574
+ effect: "ask", auth: "manage_workflows", reversible: false,
8575
+ }),
8576
+ "reply:discord": receiver({
8577
+ receiver: "reply:discord",
8578
+ summary: "Round-trips a human inbox reply back to the originating Discord surface",
8579
+ request: () => z.object({ entityId: z.unknown().optional(), text: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8580
+ response: () => z.unknown(),
8581
+ effect: "signal", auth: "owner", reversible: false,
8582
+ }),
8583
+ "reply:telegram": receiver({
8584
+ receiver: "reply:telegram",
8585
+ summary: "Round-trips a human inbox reply back to the originating Telegram surface",
8586
+ request: () => z.object({ entityId: z.unknown().optional(), text: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8587
+ response: () => z.unknown(),
8588
+ effect: "signal", auth: "owner", reversible: false,
8589
+ }),
8590
+ "reply:web": receiver({
8591
+ receiver: "reply:web",
8592
+ summary: "Round-trips a human inbox reply back to the originating web surface",
8593
+ request: () => z.object({ entityId: z.unknown().optional(), text: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8594
+ response: () => z.unknown(),
8595
+ effect: "signal", auth: "owner", reversible: false,
8596
+ }),
8597
+ "sdk:init": receiver({
8598
+ receiver: "sdk:init",
8599
+ summary: "Resolves the developer's workspace slug from actor membership and records the sdk.init lifecycle event",
8600
+ request: () => z.object({}).passthrough(),
8601
+ response: () => z.unknown(),
8602
+ effect: "ask", auth: "public", reversible: false,
8603
+ }),
8604
+ "social:refine": receiver({
8605
+ receiver: "social:refine",
8606
+ summary: "Adapt a master post into per-platform draft variants via refine core",
8607
+ request: () => z.object({ postId: z.unknown().optional(), targets: z.unknown().optional() }).passthrough(),
8608
+ response: () => z.unknown(),
8609
+ effect: "ask", auth: "update_group", reversible: false,
8610
+ }),
8611
+ "ssr:calibrate": receiver({
8612
+ receiver: "ssr:calibrate",
8613
+ summary: "Compare strategy PMFs against a human fixture, mark/warn paths, write hypothesis if KS-sim >= 0.85. FINDING: falls back to data.slug when the caller is unattested",
8614
+ request: () => z.object({ concept: z.unknown().optional(), human_pmf: z.unknown().optional(), slug: z.unknown().optional(), strategies: z.unknown().optional() }).passthrough(),
8615
+ response: () => z.unknown(),
8616
+ effect: "ask", auth: "session", reversible: false,
8617
+ }),
8618
+ "ssr:rate": receiver({
8619
+ receiver: "ssr:rate",
8620
+ summary: "Project text onto a PMF using embedding, without LLM turn (test seam + re-rating)",
8621
+ request: () => z.object({ skill_body: z.unknown().optional(), text: z.unknown().optional() }).passthrough(),
8622
+ response: () => z.unknown(),
8623
+ effect: "ask", auth: "public", reversible: false,
8624
+ }),
8625
+ "storefront:balance": receiver({
8626
+ receiver: "storefront:balance",
8627
+ summary: "Fetches the seller's account balance for the workspace",
8628
+ request: () => z.object({ slug: z.unknown().optional() }).passthrough(),
8629
+ response: () => z.unknown(),
8630
+ effect: "ask", auth: "owner", reversible: false,
8631
+ }),
8632
+ "subscriptions:list": receiver({
8633
+ receiver: "subscriptions:list",
8634
+ summary: "Returns all subscriptions for the attested caller",
8635
+ request: () => z.object({}).passthrough(),
8636
+ response: () => z.unknown(),
8637
+ effect: "ask", auth: "session", reversible: false,
8638
+ }),
8639
+ "subscriptions:presence": receiver({
8640
+ receiver: "subscriptions:presence",
8641
+ summary: "Returns agents and workflows following a workspace's view tags",
8642
+ request: () => z.object({ slug: z.unknown().optional(), tags: z.unknown().optional() }).passthrough(),
8643
+ response: () => z.unknown(),
8644
+ effect: "ask", auth: "member", reversible: false,
8645
+ }),
8646
+ "subscriptions:unregister": receiver({
8647
+ receiver: "subscriptions:unregister",
8648
+ summary: "Removes a subscription or all subscriptions for the attested caller",
8649
+ request: () => z.object({ receiver: z.unknown().optional() }).passthrough(),
8650
+ response: () => z.unknown(),
8651
+ effect: "ask", auth: "session", reversible: false,
8652
+ }),
8653
+ "view:preview": receiver({
8654
+ receiver: "view:preview",
8655
+ summary: "Live-preview a view query without saving it, returning rows and metadata",
8656
+ request: () => z.object({ query: z.unknown().optional(), slug: z.unknown().optional() }).passthrough(),
8657
+ response: () => z.unknown(),
8658
+ effect: "ask", auth: "member", reversible: false,
8659
+ }),
8660
+ "workflow:resumed-notify": receiver({
8661
+ receiver: "workflow:resumed-notify",
8662
+ summary: "Posts a short status line into the conversation when a delayed workflow resumes",
8663
+ request: () => z.object({ group: z.unknown().optional(), runId: z.unknown().optional(), stepId: z.unknown().optional(), stepName: z.unknown().optional(), workflowName: z.unknown().optional() }).passthrough(),
8664
+ response: () => z.unknown(),
8665
+ effect: "signal", auth: "session", reversible: false,
8666
+ }),
8667
+ "world:create-client": receiver({
8668
+ receiver: "world:create-client",
8669
+ summary: "Provision a client workspace under a parent, with auth check on parentSlug",
8670
+ request: () => z.object({ handle: z.unknown().optional(), name: z.unknown().optional(), parentSlug: z.unknown().optional(), plan: z.unknown().optional(), slug: z.unknown().optional() }).passthrough(),
8671
+ response: () => z.unknown(),
8672
+ effect: "ask", auth: "owner", reversible: false,
8673
+ }),
8674
+ "world:do-event": receiver({
8675
+ receiver: "world:do-event",
8676
+ summary: "Emit a do-event (build cycle phase) to a workspace's build inbox",
8677
+ request: () => z.object({ axis: z.unknown().optional(), composite: z.unknown().optional(), cycle: z.unknown().optional(), deliverable: z.unknown().optional(), model: z.unknown().optional(), shape: z.unknown().optional(), slug: z.unknown().optional(), success: z.unknown().optional(), type: z.unknown().optional(), wave: z.unknown().optional(), worktags: z.unknown().optional() }).passthrough(),
8678
+ response: () => z.unknown(),
8679
+ effect: "ask", auth: "session", reversible: false,
8680
+ }),
8681
+ "world:set-favicon": receiver({
8682
+ receiver: "world:set-favicon",
8683
+ summary: "Fetch a favicon URL and store as workspace logo with SSRF guard, auth on slug",
8684
+ request: () => z.object({ slug: z.unknown().optional(), url: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
8685
+ response: () => z.unknown(),
8686
+ effect: "ask", auth: "owner", reversible: false,
8687
+ }),
8688
+ "world:sync-subscriptions": receiver({
8689
+ receiver: "world:sync-subscriptions",
8690
+ summary: "Backfill subscription records for all agents in a workspace's R2 content",
8691
+ request: () => z.object({ workspace: z.unknown().optional() }).passthrough(),
8692
+ response: () => z.unknown(),
8693
+ effect: "ask", auth: "owner", reversible: false,
8694
+ }),
8206
8695
  };
8207
8696
  /**
8208
8697
  * RECIPES — the four agent journeys as typed, ordered receiver sequences (C6).