@feltdb/feltkit 0.3.37 → 0.5.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 (184) hide show
  1. package/dist/agent-engine.d.ts +93 -0
  2. package/dist/agent-engine.js +40 -0
  3. package/dist/agent-engine.js.map +1 -0
  4. package/dist/app.d.ts +306 -7
  5. package/dist/app.js +289 -28
  6. package/dist/app.js.map +1 -1
  7. package/dist/appboundry/build.d.ts +7 -0
  8. package/dist/appboundry/build.js +25 -1
  9. package/dist/appboundry/build.js.map +1 -1
  10. package/dist/appboundry/guest.js +8 -0
  11. package/dist/appboundry/guest.js.map +1 -1
  12. package/dist/appboundry/host.d.ts +21 -0
  13. package/dist/appboundry/host.js +25 -0
  14. package/dist/appboundry/host.js.map +1 -1
  15. package/dist/appboundry/runtime.js +1 -0
  16. package/dist/appboundry/runtime.js.map +1 -1
  17. package/dist/boards/index.d.ts +1258 -0
  18. package/dist/boards/index.js +1410 -0
  19. package/dist/boards/index.js.map +1 -0
  20. package/dist/boards/model.d.ts +177 -0
  21. package/dist/boards/model.js +177 -0
  22. package/dist/boards/model.js.map +1 -0
  23. package/dist/boards/react.d.ts +18 -0
  24. package/dist/boards/react.js +339 -0
  25. package/dist/boards/react.js.map +1 -0
  26. package/dist/cli/deploy-appboundry-self-hosted.js +2 -2
  27. package/dist/cli/deploy.js +19 -6
  28. package/dist/cli/deploy.js.map +1 -1
  29. package/dist/cli/main.js +70 -5
  30. package/dist/cli/main.js.map +1 -1
  31. package/dist/client/index.d.ts +454 -4
  32. package/dist/client/index.js +371 -3
  33. package/dist/client/index.js.map +1 -1
  34. package/dist/clock.d.ts +24 -0
  35. package/dist/clock.js +49 -0
  36. package/dist/clock.js.map +1 -0
  37. package/dist/cron.d.ts +18 -0
  38. package/dist/cron.js +67 -0
  39. package/dist/cron.js.map +1 -0
  40. package/dist/dashboard/assets/index-iIj7SL77.js +15 -0
  41. package/dist/dashboard/index.html +1 -1
  42. package/dist/docs.d.ts +1 -1
  43. package/dist/docs.js +4 -0
  44. package/dist/docs.js.map +1 -1
  45. package/dist/eve/index.d.ts +77 -0
  46. package/dist/eve/index.js +128 -0
  47. package/dist/eve/index.js.map +1 -0
  48. package/dist/event-stage.js +2 -0
  49. package/dist/event-stage.js.map +1 -1
  50. package/dist/index.d.ts +17 -2
  51. package/dist/index.js +3 -1
  52. package/dist/index.js.map +1 -1
  53. package/dist/native/build.d.ts +112 -0
  54. package/dist/native/build.js +472 -0
  55. package/dist/native/build.js.map +1 -0
  56. package/dist/native/index.d.ts +67 -0
  57. package/dist/native/index.js +113 -0
  58. package/dist/native/index.js.map +1 -0
  59. package/dist/native/instance.d.ts +3 -0
  60. package/dist/native/instance.js +18 -0
  61. package/dist/native/instance.js.map +1 -0
  62. package/dist/policy.d.ts +9 -1
  63. package/dist/policy.js +16 -3
  64. package/dist/policy.js.map +1 -1
  65. package/dist/presence.d.ts +85 -0
  66. package/dist/presence.js +37 -0
  67. package/dist/presence.js.map +1 -0
  68. package/dist/quota.d.ts +72 -0
  69. package/dist/quota.js +143 -0
  70. package/dist/quota.js.map +1 -0
  71. package/dist/react/agent-control.d.ts +191 -0
  72. package/dist/react/agent-control.js +366 -0
  73. package/dist/react/agent-control.js.map +1 -0
  74. package/dist/react/auth.d.ts +15 -1
  75. package/dist/react/auth.js +28 -5
  76. package/dist/react/auth.js.map +1 -1
  77. package/dist/react/hooks.d.ts +88 -0
  78. package/dist/react/hooks.js +188 -0
  79. package/dist/react/hooks.js.map +1 -0
  80. package/dist/react/index.d.ts +5 -75
  81. package/dist/react/index.js +4 -145
  82. package/dist/react/index.js.map +1 -1
  83. package/dist/runtime/activity.d.ts +8 -0
  84. package/dist/runtime/activity.js.map +1 -1
  85. package/dist/runtime/agent-control.d.ts +28 -0
  86. package/dist/runtime/agent-control.js +43 -2
  87. package/dist/runtime/agent-control.js.map +1 -1
  88. package/dist/runtime/agent-run.d.ts +166 -0
  89. package/dist/runtime/agent-run.js +431 -0
  90. package/dist/runtime/agent-run.js.map +1 -0
  91. package/dist/runtime/agent.d.ts +158 -1
  92. package/dist/runtime/agent.js +345 -12
  93. package/dist/runtime/agent.js.map +1 -1
  94. package/dist/runtime/assemble.js +15 -2
  95. package/dist/runtime/assemble.js.map +1 -1
  96. package/dist/runtime/authority.d.ts +47 -0
  97. package/dist/runtime/authority.js +13 -2
  98. package/dist/runtime/authority.js.map +1 -1
  99. package/dist/runtime/capabilities.js +2 -1
  100. package/dist/runtime/capabilities.js.map +1 -1
  101. package/dist/runtime/changes.d.ts +17 -0
  102. package/dist/runtime/changes.js +65 -2
  103. package/dist/runtime/changes.js.map +1 -1
  104. package/dist/runtime/context.d.ts +123 -0
  105. package/dist/runtime/contract.js +9 -3
  106. package/dist/runtime/contract.js.map +1 -1
  107. package/dist/runtime/events.js +17 -1
  108. package/dist/runtime/events.js.map +1 -1
  109. package/dist/runtime/integrations.js +7 -7
  110. package/dist/runtime/integrations.js.map +1 -1
  111. package/dist/runtime/invocations.d.ts +19 -2
  112. package/dist/runtime/invocations.js +16 -3
  113. package/dist/runtime/invocations.js.map +1 -1
  114. package/dist/runtime/policies.d.ts +5 -2
  115. package/dist/runtime/policies.js.map +1 -1
  116. package/dist/runtime/presence-host.d.ts +84 -0
  117. package/dist/runtime/presence-host.js +303 -0
  118. package/dist/runtime/presence-host.js.map +1 -0
  119. package/dist/runtime/providers.d.ts +5 -1
  120. package/dist/runtime/providers.js +11 -5
  121. package/dist/runtime/providers.js.map +1 -1
  122. package/dist/runtime/required-capabilities.d.ts +73 -0
  123. package/dist/runtime/required-capabilities.js +69 -0
  124. package/dist/runtime/required-capabilities.js.map +1 -0
  125. package/dist/runtime/resource-access.d.ts +137 -0
  126. package/dist/runtime/resource-access.js +177 -0
  127. package/dist/runtime/resource-access.js.map +1 -0
  128. package/dist/runtime/runtime.d.ts +143 -1
  129. package/dist/runtime/runtime.js +853 -44
  130. package/dist/runtime/runtime.js.map +1 -1
  131. package/dist/runtime/sessions.d.ts +12 -0
  132. package/dist/runtime/sessions.js +16 -1
  133. package/dist/runtime/sessions.js.map +1 -1
  134. package/dist/runtime/tenancy.d.ts +68 -1
  135. package/dist/runtime/tenancy.js +150 -0
  136. package/dist/runtime/tenancy.js.map +1 -1
  137. package/dist/runtime/transactions.d.ts +3 -1
  138. package/dist/runtime/transactions.js.map +1 -1
  139. package/dist/runtime/workers.d.ts +123 -0
  140. package/dist/runtime/workers.js +291 -0
  141. package/dist/runtime/workers.js.map +1 -0
  142. package/dist/server/eve.d.ts +287 -0
  143. package/dist/server/eve.js +1071 -0
  144. package/dist/server/eve.js.map +1 -0
  145. package/dist/server/index.d.ts +2 -19
  146. package/dist/server/index.js +102 -5
  147. package/dist/server/index.js.map +1 -1
  148. package/dist/server/mcp.d.ts +15 -22
  149. package/dist/server/mcp.js +40 -3
  150. package/dist/server/mcp.js.map +1 -1
  151. package/dist/server/project.js +26 -8
  152. package/dist/server/project.js.map +1 -1
  153. package/dist/server/tenancy.d.ts +9 -0
  154. package/dist/server/tenancy.js +62 -1
  155. package/dist/server/tenancy.js.map +1 -1
  156. package/dist/server/watch.d.ts +10 -0
  157. package/dist/server/watch.js +88 -0
  158. package/dist/server/watch.js.map +1 -0
  159. package/dist/testing/index.d.ts +4 -5
  160. package/dist/testing/index.js +3 -2
  161. package/dist/testing/index.js.map +1 -1
  162. package/docs/AGENT-CONTROL.md +166 -4
  163. package/docs/APPBOUNDRY.md +73 -0
  164. package/docs/ARCHITECTURE.md +6 -2
  165. package/docs/AUTH.md +37 -0
  166. package/docs/COMPONENTS.md +71 -0
  167. package/docs/EVE-COMPOSITION.md +75 -0
  168. package/docs/GUARANTEES.md +4 -4
  169. package/docs/NATIVE-AGENTS.md +353 -0
  170. package/docs/NATIVE.md +137 -0
  171. package/docs/PRESENCE-AND-SIGNALING-PROPOSAL.md +152 -0
  172. package/docs/README.md +6 -2
  173. package/docs/SECURITY.md +71 -3
  174. package/docs/TRANSACTIONS.md +48 -0
  175. package/docs/UPSTREAM-GAPS.md +16 -2
  176. package/package.json +42 -16
  177. package/skills/.claude-plugin/marketplace.json +1 -1
  178. package/skills/.claude-plugin/plugin.json +1 -1
  179. package/skills/feltkit-agent/SKILL.md +1 -1
  180. package/skills/feltkit-build/SKILL.md +11 -1
  181. package/skills/feltkit-data/SKILL.md +1 -1
  182. package/skills/feltkit-operations/SKILL.md +1 -1
  183. package/skills/feltkit-services/SKILL.md +1 -1
  184. package/dist/dashboard/assets/index-BhxrvY37.js +0 -15
@@ -0,0 +1,1258 @@
1
+ /**
2
+ * Boards — durable coordination for people and agents, as an application capability.
3
+ *
4
+ * // feltkit/boards.ts
5
+ * import { defineBoards } from "@feltdb/feltkit/boards";
6
+ * import { app } from "./app.js";
7
+ * export const boards = defineBoards(app);
8
+ *
9
+ * One export gives the application boards, channels, threads (tasks and discussions), messages, claims
10
+ * with leases, dependencies, grants, history, watchers, follow-ups and an integration contract: every
11
+ * operation a function named `boards:<op>`, the agent-facing ones published as AppPort capabilities
12
+ * (`boards.*`, also MCP tools). People use them from `<Boards />` (`@feltdb/feltkit/boards/react`); agents
13
+ * and other applications through AppPort. There is one implementation and one store: what a person does
14
+ * and what an agent does land in the same records.
15
+ *
16
+ * Nothing here is a new mechanism. It is written against FeltKit's public API, and every guarantee is
17
+ * one FeltKit already makes:
18
+ *
19
+ * state FeltDB collections declared with app.collection (schema-validated, tenant-scoped when asked)
20
+ * consistency each operation is one mutation: one FeltDB transaction whose reads are fenced at commit
21
+ * (two agents claiming one task: one wins, the other gets CONFLICT and nothing is written)
22
+ * claims an app.presence collection: leases on the runtime's clock, ended exactly once
23
+ * (left / removed / expired / session-ended), ended leases kept as claim history
24
+ * history an append-only event log ordered by ctx.db.sequence per thread
25
+ * authority roles → each function's `access` (which operations), grants on boards and channels
26
+ * (where); checked in the function, so every interface (HTTP, AppPort, MCP) gets the same answer
27
+ * live updates live queries: a commit by anyone re-runs the queries that read what changed
28
+ * watchers ctx.afterCommit.agent: an app.agent runs after the triggering commit, as itself
29
+ * follow-ups ctx.afterCommit.jobs.enqueue(…, { runAt }): AppPort Services jobs, durable and retried
30
+ * outbound sync ctx.afterCommit.webhooks.emit: signed, retried deliveries to registered endpoints
31
+ *
32
+ * Deterministic rules (status machine, readiness, cycles, access levels) live in ./model.ts.
33
+ */
34
+ import { type CollectionDefinition, type FeltKitApp } from "../app.js";
35
+ import { type Schema } from "../schema.js";
36
+ import { type GrantLevel } from "./model.js";
37
+ export * from "./model.js";
38
+ /** A versioned message schema: `{ "ci.result": [{ version: 1, schema: s.object({...}) }] }`. */
39
+ export type StructuredSchemas = Record<string, ReadonlyArray<{
40
+ version: number;
41
+ schema: Schema;
42
+ description?: string;
43
+ }>>;
44
+ export interface BoardsOptions {
45
+ /** Collection name prefix (default "boards"): boards, boards_channels, boards_threads, … */
46
+ prefix?: string;
47
+ /** How long a claim lasts without renewal, in ms (default 10 minutes; 1 s to 24 h). */
48
+ claimTtlMs?: number;
49
+ /** Store boards per workspace (`auth.tenant`): every board collection is `{ tenant: true }`. */
50
+ tenant?: boolean;
51
+ /** Message schemas agents and integrations post against. Each version stays valid for the messages written with it. */
52
+ schemas?: StructuredSchemas;
53
+ /**
54
+ * Follow-ups (`boards:scheduleFollowup`) run as an AppPort Services job of this type. Declare it in
55
+ * `feltkit({ services: { jobs: { handlers: { "boards.followup": "boards:runFollowup" } } } })` (module name
56
+ * where you exported the group). Default "boards.followup".
57
+ */
58
+ followupJob?: string;
59
+ /** Emit board activity on threads with external links as webhook events (`board.message.*`). Needs services.webhooks. */
60
+ outboundWebhooks?: boolean;
61
+ }
62
+ /** Permissions Boards functions check (`access`). Grant them through roles, e.g. `member: ["boards.*"]`. */
63
+ export declare const BOARD_PERMISSIONS: {
64
+ /** See boards you have access to; read threads, messages, history. */
65
+ readonly read: "boards.read";
66
+ /** Create threads, reply, react. */
67
+ readonly post: "boards.post";
68
+ /** Claim and work tasks. */
69
+ readonly work: "boards.work";
70
+ /** Labels, dependencies, links, status changes. */
71
+ readonly manage: "boards.manage";
72
+ /** Create boards. (Administering one board needs an admin grant on it, which its creator receives.) */
73
+ readonly create: "boards.create";
74
+ /** Board settings, channels, grants, watchers (also needs admin level on the board). */
75
+ readonly admin: "boards.admin";
76
+ /** Import messages from external systems (an integration's principal). */
77
+ readonly integrate: "boards.integrate";
78
+ };
79
+ export declare const WATCH_EVENTS: readonly ["thread.created", "message.posted", "labels.changed", "status.changed", "task.completed", "task.failed", "task.ready", "followup.due"];
80
+ export type WatchEvent = (typeof WATCH_EVENTS)[number];
81
+ export declare function defineBoards(app: FeltKitApp, options?: BoardsOptions): import("../app.js").FunctionGroup<{
82
+ listBoards: import("../app.js").QueryDefinition<{
83
+ includeArchived?: boolean | undefined;
84
+ }, {
85
+ archived: boolean;
86
+ id: string;
87
+ name: string;
88
+ visibility: string;
89
+ }[]>;
90
+ getBoard: import("../app.js").QueryDefinition<{
91
+ boardId: string;
92
+ }, {
93
+ board: {
94
+ archived: boolean;
95
+ id: string;
96
+ name: string;
97
+ visibility: string;
98
+ };
99
+ channels: {
100
+ id: string;
101
+ name: string;
102
+ }[];
103
+ counts: Record<string, number>;
104
+ level: string;
105
+ }>;
106
+ createBoard: import("../app.js").MutationDefinition<{
107
+ description?: string | undefined;
108
+ name: string;
109
+ visibility?: "open" | "restricted" | undefined;
110
+ }, {
111
+ id: string;
112
+ }>;
113
+ updateBoard: import("../app.js").MutationDefinition<{
114
+ archived?: boolean | undefined;
115
+ boardId: string;
116
+ description?: string | undefined;
117
+ name?: string | undefined;
118
+ visibility?: "open" | "restricted" | undefined;
119
+ }, {
120
+ id: string;
121
+ }>;
122
+ createChannel: import("../app.js").MutationDefinition<{
123
+ boardId: string;
124
+ name: string;
125
+ purpose?: string | undefined;
126
+ restricted?: boolean | undefined;
127
+ }, {
128
+ id: string;
129
+ }>;
130
+ updateChannel: import("../app.js").MutationDefinition<{
131
+ archived?: boolean | undefined;
132
+ channelId: string;
133
+ name?: string | undefined;
134
+ purpose?: string | undefined;
135
+ restricted?: boolean | undefined;
136
+ }, {
137
+ id: string;
138
+ }>;
139
+ listThreads: import("../app.js").QueryDefinition<{
140
+ channelId: string;
141
+ kind?: "discussion" | "task" | undefined;
142
+ labels?: string[] | undefined;
143
+ limit?: number | undefined;
144
+ status?: ("blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready")[] | undefined;
145
+ text?: string | undefined;
146
+ }, {
147
+ boardId: string;
148
+ channelId: string;
149
+ id: string;
150
+ kind: string;
151
+ labels: string[];
152
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
153
+ title: string;
154
+ }[]>;
155
+ getThread: import("../app.js").QueryDefinition<{
156
+ threadId: string;
157
+ }, {
158
+ events: {
159
+ type: string;
160
+ }[];
161
+ messages: {
162
+ id: string;
163
+ text: string;
164
+ }[];
165
+ thread: {
166
+ boardId: string;
167
+ channelId: string;
168
+ id: string;
169
+ kind: string;
170
+ labels: string[];
171
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
172
+ title: string;
173
+ };
174
+ }>;
175
+ createThread: import("../app.js").MutationDefinition<{
176
+ body?: string | undefined;
177
+ channelId: string;
178
+ dependsOn?: string[] | undefined;
179
+ kind?: "discussion" | "task" | undefined;
180
+ labels?: string[] | undefined;
181
+ metadata?: Record<string, unknown> | undefined;
182
+ title: string;
183
+ }, {
184
+ id: string;
185
+ }>;
186
+ updateThread: import("../app.js").MutationDefinition<{
187
+ body?: string | undefined;
188
+ metadata?: Record<string, unknown> | undefined;
189
+ threadId: string;
190
+ title?: string | undefined;
191
+ }, {
192
+ id: string;
193
+ }>;
194
+ transitionThread: import("../app.js").MutationDefinition<{
195
+ action: "block" | "cancel" | "reopen" | "resolve" | "unblock";
196
+ reason?: string | undefined;
197
+ threadId: string;
198
+ }, {
199
+ from: string;
200
+ id: string;
201
+ to: string;
202
+ }>;
203
+ setLabels: import("../app.js").MutationDefinition<{
204
+ add?: string[] | undefined;
205
+ remove?: string[] | undefined;
206
+ threadId: string;
207
+ }, {
208
+ id: string;
209
+ labels: string[];
210
+ }>;
211
+ addLink: import("../app.js").MutationDefinition<{
212
+ link: {
213
+ externalId?: string | undefined;
214
+ kind: string;
215
+ title?: string | undefined;
216
+ url: string;
217
+ };
218
+ threadId: string;
219
+ }, {
220
+ id: string;
221
+ }>;
222
+ removeLink: import("../app.js").MutationDefinition<{
223
+ linkId: string;
224
+ }, {
225
+ id: string;
226
+ }>;
227
+ postMessage: import("../app.js").MutationDefinition<{
228
+ replyTo?: string | undefined;
229
+ structured?: {
230
+ data: unknown;
231
+ schema: string;
232
+ version?: number | undefined;
233
+ } | undefined;
234
+ text: string;
235
+ threadId: string;
236
+ }, {
237
+ id: any;
238
+ seq: any;
239
+ }>;
240
+ editMessage: import("../app.js").MutationDefinition<{
241
+ messageId: string;
242
+ text: string;
243
+ }, {
244
+ id: string;
245
+ }>;
246
+ deleteMessage: import("../app.js").MutationDefinition<{
247
+ messageId: string;
248
+ }, {
249
+ id: string;
250
+ }>;
251
+ react: import("../app.js").MutationDefinition<{
252
+ emoji: string;
253
+ messageId: string;
254
+ on: boolean;
255
+ }, {
256
+ id: string;
257
+ on: boolean;
258
+ }>;
259
+ readyTasks: import("../app.js").QueryDefinition<{
260
+ boardId?: string | undefined;
261
+ channelId?: string | undefined;
262
+ labels?: string[] | undefined;
263
+ limit?: number | undefined;
264
+ }, {
265
+ boardId: string;
266
+ channelId: string;
267
+ id: string;
268
+ kind: string;
269
+ labels: string[];
270
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
271
+ title: string;
272
+ }[]>;
273
+ claimTask: import("../app.js").MutationDefinition<{
274
+ note?: string | undefined;
275
+ threadId: string;
276
+ }, {
277
+ id: string;
278
+ claimId: string;
279
+ expiresAt: number | null;
280
+ recoveredFrom: string | null;
281
+ }>;
282
+ renewClaim: import("../app.js").MutationDefinition<{
283
+ threadId: string;
284
+ }, {
285
+ id: string;
286
+ expiresAt: number | null;
287
+ }>;
288
+ releaseTask: import("../app.js").MutationDefinition<{
289
+ note?: string | undefined;
290
+ threadId: string;
291
+ }, {
292
+ id: string;
293
+ to: string;
294
+ }>;
295
+ reportProgress: import("../app.js").MutationDefinition<{
296
+ renew?: boolean | undefined;
297
+ structured?: {
298
+ data: unknown;
299
+ schema: string;
300
+ version?: number | undefined;
301
+ } | undefined;
302
+ text: string;
303
+ threadId: string;
304
+ }, {
305
+ id: string;
306
+ messageId: any;
307
+ expiresAt: any;
308
+ }>;
309
+ completeTask: import("../app.js").MutationDefinition<{
310
+ data?: Record<string, unknown> | undefined;
311
+ links?: {
312
+ externalId?: string | undefined;
313
+ kind: string;
314
+ title?: string | undefined;
315
+ url: string;
316
+ }[] | undefined;
317
+ structured?: {
318
+ data: unknown;
319
+ schema: string;
320
+ version?: number | undefined;
321
+ } | undefined;
322
+ summary: string;
323
+ threadId: string;
324
+ }, {
325
+ id: string;
326
+ status: string;
327
+ unblocked: string[];
328
+ }>;
329
+ failTask: import("../app.js").MutationDefinition<{
330
+ data?: Record<string, unknown> | undefined;
331
+ links?: {
332
+ externalId?: string | undefined;
333
+ kind: string;
334
+ title?: string | undefined;
335
+ url: string;
336
+ }[] | undefined;
337
+ structured?: {
338
+ data: unknown;
339
+ schema: string;
340
+ version?: number | undefined;
341
+ } | undefined;
342
+ summary: string;
343
+ threadId: string;
344
+ }, {
345
+ id: string;
346
+ status: string;
347
+ unblocked: string[];
348
+ }>;
349
+ addDependency: import("../app.js").MutationDefinition<{
350
+ dependsOn: string;
351
+ taskId: string;
352
+ }, {
353
+ id: string;
354
+ status: string;
355
+ }>;
356
+ removeDependency: import("../app.js").MutationDefinition<{
357
+ dependsOn: string;
358
+ taskId: string;
359
+ }, {
360
+ id: string;
361
+ status: string;
362
+ }>;
363
+ listGrants: import("../app.js").QueryDefinition<{
364
+ boardId: string;
365
+ includeRevoked?: boolean | undefined;
366
+ }, {
367
+ id: string;
368
+ level: string;
369
+ principal: string;
370
+ }[]>;
371
+ explain: import("../app.js").QueryDefinition<{
372
+ boardId: string;
373
+ channelId?: string | undefined;
374
+ principal?: string | undefined;
375
+ roles?: string[] | undefined;
376
+ }, {
377
+ level: string;
378
+ principal: string;
379
+ reasons: string[];
380
+ }>;
381
+ grant: import("../app.js").MutationDefinition<{
382
+ boardId: string;
383
+ channelId?: string | undefined;
384
+ level: GrantLevel;
385
+ principal: string;
386
+ }, {
387
+ id: string;
388
+ }>;
389
+ revokeGrant: import("../app.js").MutationDefinition<{
390
+ grantId: string;
391
+ }, {
392
+ id: string;
393
+ }>;
394
+ activity: import("../app.js").QueryDefinition<{
395
+ boardId: string;
396
+ channelId?: string | undefined;
397
+ limit?: number | undefined;
398
+ types?: string[] | undefined;
399
+ }, {
400
+ at: number;
401
+ id: string;
402
+ type: string;
403
+ }[]>;
404
+ listSchemas: import("../app.js").QueryDefinition<{}, {
405
+ description?: string | undefined;
406
+ jsonSchema: unknown;
407
+ name: string;
408
+ version: number;
409
+ }[]>;
410
+ listWatchers: import("../app.js").QueryDefinition<{
411
+ boardId: string;
412
+ }, {
413
+ agent: string;
414
+ id: string;
415
+ }[]>;
416
+ createWatcher: import("../app.js").MutationDefinition<{
417
+ agent: string;
418
+ boardId: string;
419
+ channelId?: string | undefined;
420
+ labels?: string[] | undefined;
421
+ on: ("followup.due" | "labels.changed" | "message.posted" | "status.changed" | "task.completed" | "task.failed" | "task.ready" | "thread.created")[];
422
+ }, {
423
+ id: string;
424
+ }>;
425
+ deleteWatcher: import("../app.js").MutationDefinition<{
426
+ watcherId: string;
427
+ }, {
428
+ id: string;
429
+ }>;
430
+ scheduleFollowup: import("../app.js").MutationDefinition<{
431
+ at: string | number;
432
+ note: string;
433
+ threadId: string;
434
+ }, {
435
+ id: string;
436
+ dueAt: number;
437
+ outboxId: string;
438
+ }>;
439
+ changeFollowup: import("../app.js").MutationDefinition<{
440
+ action: "cancel" | "reschedule";
441
+ at?: string | number | undefined;
442
+ followupId: string;
443
+ }, {
444
+ id: string;
445
+ state: string;
446
+ dueAt: any;
447
+ }>;
448
+ runFollowup: import("../app.js").MutationDefinition<{
449
+ followupId: string;
450
+ token: string;
451
+ }, {
452
+ outcome: "fired" | "skipped";
453
+ reason?: string | undefined;
454
+ }>;
455
+ importMessage: import("../app.js").MutationDefinition<{
456
+ author: {
457
+ id: string;
458
+ name?: string | undefined;
459
+ };
460
+ deleted?: boolean | undefined;
461
+ externalId: string;
462
+ link?: {
463
+ externalId: string;
464
+ kind: string;
465
+ } | undefined;
466
+ source: string;
467
+ text: string;
468
+ threadId?: string | undefined;
469
+ updatedAt: number;
470
+ url?: string | undefined;
471
+ }, {
472
+ id: string | null;
473
+ outcome: "created" | "deleted" | "duplicate" | "stale" | "updated";
474
+ }>;
475
+ /** The collections, for application code that reads board state directly (reports, policies). */
476
+ collections: { [K in "boards" | "channels" | "claims" | "deps" | "events" | "followups" | "grants" | "links" | "messages" | "reactions" | "threads" | "watchRuns" | "watchers"]: CollectionDefinition; };
477
+ options: Readonly<{
478
+ prefix: string;
479
+ claimTtlMs: number;
480
+ followupJob: string;
481
+ }>;
482
+ run: <K extends "activity" | "addDependency" | "addLink" | "changeFollowup" | "claimTask" | "completeTask" | "createBoard" | "createChannel" | "createThread" | "createWatcher" | "deleteMessage" | "deleteWatcher" | "editMessage" | "explain" | "failTask" | "getBoard" | "getThread" | "grant" | "importMessage" | "listBoards" | "listGrants" | "listSchemas" | "listThreads" | "listWatchers" | "postMessage" | "react" | "readyTasks" | "releaseTask" | "removeDependency" | "removeLink" | "renewClaim" | "reportProgress" | "revokeGrant" | "scheduleFollowup" | "setLabels" | "transitionThread" | "updateBoard" | "updateChannel" | "updateThread">(ctx: any, op: K, args: Parameters<({
483
+ listBoards: import("../app.js").QueryDefinition<{
484
+ includeArchived?: boolean | undefined;
485
+ }, {
486
+ archived: boolean;
487
+ id: string;
488
+ name: string;
489
+ visibility: string;
490
+ }[]>;
491
+ getBoard: import("../app.js").QueryDefinition<{
492
+ boardId: string;
493
+ }, {
494
+ board: {
495
+ archived: boolean;
496
+ id: string;
497
+ name: string;
498
+ visibility: string;
499
+ };
500
+ channels: {
501
+ id: string;
502
+ name: string;
503
+ }[];
504
+ counts: Record<string, number>;
505
+ level: string;
506
+ }>;
507
+ createBoard: import("../app.js").MutationDefinition<{
508
+ description?: string | undefined;
509
+ name: string;
510
+ visibility?: "open" | "restricted" | undefined;
511
+ }, {
512
+ id: string;
513
+ }>;
514
+ updateBoard: import("../app.js").MutationDefinition<{
515
+ archived?: boolean | undefined;
516
+ boardId: string;
517
+ description?: string | undefined;
518
+ name?: string | undefined;
519
+ visibility?: "open" | "restricted" | undefined;
520
+ }, {
521
+ id: string;
522
+ }>;
523
+ createChannel: import("../app.js").MutationDefinition<{
524
+ boardId: string;
525
+ name: string;
526
+ purpose?: string | undefined;
527
+ restricted?: boolean | undefined;
528
+ }, {
529
+ id: string;
530
+ }>;
531
+ updateChannel: import("../app.js").MutationDefinition<{
532
+ archived?: boolean | undefined;
533
+ channelId: string;
534
+ name?: string | undefined;
535
+ purpose?: string | undefined;
536
+ restricted?: boolean | undefined;
537
+ }, {
538
+ id: string;
539
+ }>;
540
+ listThreads: import("../app.js").QueryDefinition<{
541
+ channelId: string;
542
+ kind?: "discussion" | "task" | undefined;
543
+ labels?: string[] | undefined;
544
+ limit?: number | undefined;
545
+ status?: ("blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready")[] | undefined;
546
+ text?: string | undefined;
547
+ }, {
548
+ boardId: string;
549
+ channelId: string;
550
+ id: string;
551
+ kind: string;
552
+ labels: string[];
553
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
554
+ title: string;
555
+ }[]>;
556
+ getThread: import("../app.js").QueryDefinition<{
557
+ threadId: string;
558
+ }, {
559
+ events: {
560
+ type: string;
561
+ }[];
562
+ messages: {
563
+ id: string;
564
+ text: string;
565
+ }[];
566
+ thread: {
567
+ boardId: string;
568
+ channelId: string;
569
+ id: string;
570
+ kind: string;
571
+ labels: string[];
572
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
573
+ title: string;
574
+ };
575
+ }>;
576
+ createThread: import("../app.js").MutationDefinition<{
577
+ body?: string | undefined;
578
+ channelId: string;
579
+ dependsOn?: string[] | undefined;
580
+ kind?: "discussion" | "task" | undefined;
581
+ labels?: string[] | undefined;
582
+ metadata?: Record<string, unknown> | undefined;
583
+ title: string;
584
+ }, {
585
+ id: string;
586
+ }>;
587
+ updateThread: import("../app.js").MutationDefinition<{
588
+ body?: string | undefined;
589
+ metadata?: Record<string, unknown> | undefined;
590
+ threadId: string;
591
+ title?: string | undefined;
592
+ }, {
593
+ id: string;
594
+ }>;
595
+ transitionThread: import("../app.js").MutationDefinition<{
596
+ action: "block" | "cancel" | "reopen" | "resolve" | "unblock";
597
+ reason?: string | undefined;
598
+ threadId: string;
599
+ }, {
600
+ from: string;
601
+ id: string;
602
+ to: string;
603
+ }>;
604
+ setLabels: import("../app.js").MutationDefinition<{
605
+ add?: string[] | undefined;
606
+ remove?: string[] | undefined;
607
+ threadId: string;
608
+ }, {
609
+ id: string;
610
+ labels: string[];
611
+ }>;
612
+ addLink: import("../app.js").MutationDefinition<{
613
+ link: {
614
+ externalId?: string | undefined;
615
+ kind: string;
616
+ title?: string | undefined;
617
+ url: string;
618
+ };
619
+ threadId: string;
620
+ }, {
621
+ id: string;
622
+ }>;
623
+ removeLink: import("../app.js").MutationDefinition<{
624
+ linkId: string;
625
+ }, {
626
+ id: string;
627
+ }>;
628
+ postMessage: import("../app.js").MutationDefinition<{
629
+ replyTo?: string | undefined;
630
+ structured?: {
631
+ data: unknown;
632
+ schema: string;
633
+ version?: number | undefined;
634
+ } | undefined;
635
+ text: string;
636
+ threadId: string;
637
+ }, {
638
+ id: any;
639
+ seq: any;
640
+ }>;
641
+ editMessage: import("../app.js").MutationDefinition<{
642
+ messageId: string;
643
+ text: string;
644
+ }, {
645
+ id: string;
646
+ }>;
647
+ deleteMessage: import("../app.js").MutationDefinition<{
648
+ messageId: string;
649
+ }, {
650
+ id: string;
651
+ }>;
652
+ react: import("../app.js").MutationDefinition<{
653
+ emoji: string;
654
+ messageId: string;
655
+ on: boolean;
656
+ }, {
657
+ id: string;
658
+ on: boolean;
659
+ }>;
660
+ readyTasks: import("../app.js").QueryDefinition<{
661
+ boardId?: string | undefined;
662
+ channelId?: string | undefined;
663
+ labels?: string[] | undefined;
664
+ limit?: number | undefined;
665
+ }, {
666
+ boardId: string;
667
+ channelId: string;
668
+ id: string;
669
+ kind: string;
670
+ labels: string[];
671
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
672
+ title: string;
673
+ }[]>;
674
+ claimTask: import("../app.js").MutationDefinition<{
675
+ note?: string | undefined;
676
+ threadId: string;
677
+ }, {
678
+ id: string;
679
+ claimId: string;
680
+ expiresAt: number | null;
681
+ recoveredFrom: string | null;
682
+ }>;
683
+ renewClaim: import("../app.js").MutationDefinition<{
684
+ threadId: string;
685
+ }, {
686
+ id: string;
687
+ expiresAt: number | null;
688
+ }>;
689
+ releaseTask: import("../app.js").MutationDefinition<{
690
+ note?: string | undefined;
691
+ threadId: string;
692
+ }, {
693
+ id: string;
694
+ to: string;
695
+ }>;
696
+ reportProgress: import("../app.js").MutationDefinition<{
697
+ renew?: boolean | undefined;
698
+ structured?: {
699
+ data: unknown;
700
+ schema: string;
701
+ version?: number | undefined;
702
+ } | undefined;
703
+ text: string;
704
+ threadId: string;
705
+ }, {
706
+ id: string;
707
+ messageId: any;
708
+ expiresAt: any;
709
+ }>;
710
+ completeTask: import("../app.js").MutationDefinition<{
711
+ data?: Record<string, unknown> | undefined;
712
+ links?: {
713
+ externalId?: string | undefined;
714
+ kind: string;
715
+ title?: string | undefined;
716
+ url: string;
717
+ }[] | undefined;
718
+ structured?: {
719
+ data: unknown;
720
+ schema: string;
721
+ version?: number | undefined;
722
+ } | undefined;
723
+ summary: string;
724
+ threadId: string;
725
+ }, {
726
+ id: string;
727
+ status: string;
728
+ unblocked: string[];
729
+ }>;
730
+ failTask: import("../app.js").MutationDefinition<{
731
+ data?: Record<string, unknown> | undefined;
732
+ links?: {
733
+ externalId?: string | undefined;
734
+ kind: string;
735
+ title?: string | undefined;
736
+ url: string;
737
+ }[] | undefined;
738
+ structured?: {
739
+ data: unknown;
740
+ schema: string;
741
+ version?: number | undefined;
742
+ } | undefined;
743
+ summary: string;
744
+ threadId: string;
745
+ }, {
746
+ id: string;
747
+ status: string;
748
+ unblocked: string[];
749
+ }>;
750
+ addDependency: import("../app.js").MutationDefinition<{
751
+ dependsOn: string;
752
+ taskId: string;
753
+ }, {
754
+ id: string;
755
+ status: string;
756
+ }>;
757
+ removeDependency: import("../app.js").MutationDefinition<{
758
+ dependsOn: string;
759
+ taskId: string;
760
+ }, {
761
+ id: string;
762
+ status: string;
763
+ }>;
764
+ listGrants: import("../app.js").QueryDefinition<{
765
+ boardId: string;
766
+ includeRevoked?: boolean | undefined;
767
+ }, {
768
+ id: string;
769
+ level: string;
770
+ principal: string;
771
+ }[]>;
772
+ explain: import("../app.js").QueryDefinition<{
773
+ boardId: string;
774
+ channelId?: string | undefined;
775
+ principal?: string | undefined;
776
+ roles?: string[] | undefined;
777
+ }, {
778
+ level: string;
779
+ principal: string;
780
+ reasons: string[];
781
+ }>;
782
+ grant: import("../app.js").MutationDefinition<{
783
+ boardId: string;
784
+ channelId?: string | undefined;
785
+ level: GrantLevel;
786
+ principal: string;
787
+ }, {
788
+ id: string;
789
+ }>;
790
+ revokeGrant: import("../app.js").MutationDefinition<{
791
+ grantId: string;
792
+ }, {
793
+ id: string;
794
+ }>;
795
+ activity: import("../app.js").QueryDefinition<{
796
+ boardId: string;
797
+ channelId?: string | undefined;
798
+ limit?: number | undefined;
799
+ types?: string[] | undefined;
800
+ }, {
801
+ at: number;
802
+ id: string;
803
+ type: string;
804
+ }[]>;
805
+ listSchemas: import("../app.js").QueryDefinition<{}, {
806
+ description?: string | undefined;
807
+ jsonSchema: unknown;
808
+ name: string;
809
+ version: number;
810
+ }[]>;
811
+ listWatchers: import("../app.js").QueryDefinition<{
812
+ boardId: string;
813
+ }, {
814
+ agent: string;
815
+ id: string;
816
+ }[]>;
817
+ createWatcher: import("../app.js").MutationDefinition<{
818
+ agent: string;
819
+ boardId: string;
820
+ channelId?: string | undefined;
821
+ labels?: string[] | undefined;
822
+ on: ("followup.due" | "labels.changed" | "message.posted" | "status.changed" | "task.completed" | "task.failed" | "task.ready" | "thread.created")[];
823
+ }, {
824
+ id: string;
825
+ }>;
826
+ deleteWatcher: import("../app.js").MutationDefinition<{
827
+ watcherId: string;
828
+ }, {
829
+ id: string;
830
+ }>;
831
+ scheduleFollowup: import("../app.js").MutationDefinition<{
832
+ at: string | number;
833
+ note: string;
834
+ threadId: string;
835
+ }, {
836
+ id: string;
837
+ dueAt: number;
838
+ outboxId: string;
839
+ }>;
840
+ changeFollowup: import("../app.js").MutationDefinition<{
841
+ action: "cancel" | "reschedule";
842
+ at?: string | number | undefined;
843
+ followupId: string;
844
+ }, {
845
+ id: string;
846
+ state: string;
847
+ dueAt: any;
848
+ }>;
849
+ importMessage: import("../app.js").MutationDefinition<{
850
+ author: {
851
+ id: string;
852
+ name?: string | undefined;
853
+ };
854
+ deleted?: boolean | undefined;
855
+ externalId: string;
856
+ link?: {
857
+ externalId: string;
858
+ kind: string;
859
+ } | undefined;
860
+ source: string;
861
+ text: string;
862
+ threadId?: string | undefined;
863
+ updatedAt: number;
864
+ url?: string | undefined;
865
+ }, {
866
+ id: string | null;
867
+ outcome: "created" | "deleted" | "duplicate" | "stale" | "updated";
868
+ }>;
869
+ })[K]["handler"]>[1]) => Promise<Awaited<ReturnType<({
870
+ listBoards: import("../app.js").QueryDefinition<{
871
+ includeArchived?: boolean | undefined;
872
+ }, {
873
+ archived: boolean;
874
+ id: string;
875
+ name: string;
876
+ visibility: string;
877
+ }[]>;
878
+ getBoard: import("../app.js").QueryDefinition<{
879
+ boardId: string;
880
+ }, {
881
+ board: {
882
+ archived: boolean;
883
+ id: string;
884
+ name: string;
885
+ visibility: string;
886
+ };
887
+ channels: {
888
+ id: string;
889
+ name: string;
890
+ }[];
891
+ counts: Record<string, number>;
892
+ level: string;
893
+ }>;
894
+ createBoard: import("../app.js").MutationDefinition<{
895
+ description?: string | undefined;
896
+ name: string;
897
+ visibility?: "open" | "restricted" | undefined;
898
+ }, {
899
+ id: string;
900
+ }>;
901
+ updateBoard: import("../app.js").MutationDefinition<{
902
+ archived?: boolean | undefined;
903
+ boardId: string;
904
+ description?: string | undefined;
905
+ name?: string | undefined;
906
+ visibility?: "open" | "restricted" | undefined;
907
+ }, {
908
+ id: string;
909
+ }>;
910
+ createChannel: import("../app.js").MutationDefinition<{
911
+ boardId: string;
912
+ name: string;
913
+ purpose?: string | undefined;
914
+ restricted?: boolean | undefined;
915
+ }, {
916
+ id: string;
917
+ }>;
918
+ updateChannel: import("../app.js").MutationDefinition<{
919
+ archived?: boolean | undefined;
920
+ channelId: string;
921
+ name?: string | undefined;
922
+ purpose?: string | undefined;
923
+ restricted?: boolean | undefined;
924
+ }, {
925
+ id: string;
926
+ }>;
927
+ listThreads: import("../app.js").QueryDefinition<{
928
+ channelId: string;
929
+ kind?: "discussion" | "task" | undefined;
930
+ labels?: string[] | undefined;
931
+ limit?: number | undefined;
932
+ status?: ("blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready")[] | undefined;
933
+ text?: string | undefined;
934
+ }, {
935
+ boardId: string;
936
+ channelId: string;
937
+ id: string;
938
+ kind: string;
939
+ labels: string[];
940
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
941
+ title: string;
942
+ }[]>;
943
+ getThread: import("../app.js").QueryDefinition<{
944
+ threadId: string;
945
+ }, {
946
+ events: {
947
+ type: string;
948
+ }[];
949
+ messages: {
950
+ id: string;
951
+ text: string;
952
+ }[];
953
+ thread: {
954
+ boardId: string;
955
+ channelId: string;
956
+ id: string;
957
+ kind: string;
958
+ labels: string[];
959
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
960
+ title: string;
961
+ };
962
+ }>;
963
+ createThread: import("../app.js").MutationDefinition<{
964
+ body?: string | undefined;
965
+ channelId: string;
966
+ dependsOn?: string[] | undefined;
967
+ kind?: "discussion" | "task" | undefined;
968
+ labels?: string[] | undefined;
969
+ metadata?: Record<string, unknown> | undefined;
970
+ title: string;
971
+ }, {
972
+ id: string;
973
+ }>;
974
+ updateThread: import("../app.js").MutationDefinition<{
975
+ body?: string | undefined;
976
+ metadata?: Record<string, unknown> | undefined;
977
+ threadId: string;
978
+ title?: string | undefined;
979
+ }, {
980
+ id: string;
981
+ }>;
982
+ transitionThread: import("../app.js").MutationDefinition<{
983
+ action: "block" | "cancel" | "reopen" | "resolve" | "unblock";
984
+ reason?: string | undefined;
985
+ threadId: string;
986
+ }, {
987
+ from: string;
988
+ id: string;
989
+ to: string;
990
+ }>;
991
+ setLabels: import("../app.js").MutationDefinition<{
992
+ add?: string[] | undefined;
993
+ remove?: string[] | undefined;
994
+ threadId: string;
995
+ }, {
996
+ id: string;
997
+ labels: string[];
998
+ }>;
999
+ addLink: import("../app.js").MutationDefinition<{
1000
+ link: {
1001
+ externalId?: string | undefined;
1002
+ kind: string;
1003
+ title?: string | undefined;
1004
+ url: string;
1005
+ };
1006
+ threadId: string;
1007
+ }, {
1008
+ id: string;
1009
+ }>;
1010
+ removeLink: import("../app.js").MutationDefinition<{
1011
+ linkId: string;
1012
+ }, {
1013
+ id: string;
1014
+ }>;
1015
+ postMessage: import("../app.js").MutationDefinition<{
1016
+ replyTo?: string | undefined;
1017
+ structured?: {
1018
+ data: unknown;
1019
+ schema: string;
1020
+ version?: number | undefined;
1021
+ } | undefined;
1022
+ text: string;
1023
+ threadId: string;
1024
+ }, {
1025
+ id: any;
1026
+ seq: any;
1027
+ }>;
1028
+ editMessage: import("../app.js").MutationDefinition<{
1029
+ messageId: string;
1030
+ text: string;
1031
+ }, {
1032
+ id: string;
1033
+ }>;
1034
+ deleteMessage: import("../app.js").MutationDefinition<{
1035
+ messageId: string;
1036
+ }, {
1037
+ id: string;
1038
+ }>;
1039
+ react: import("../app.js").MutationDefinition<{
1040
+ emoji: string;
1041
+ messageId: string;
1042
+ on: boolean;
1043
+ }, {
1044
+ id: string;
1045
+ on: boolean;
1046
+ }>;
1047
+ readyTasks: import("../app.js").QueryDefinition<{
1048
+ boardId?: string | undefined;
1049
+ channelId?: string | undefined;
1050
+ labels?: string[] | undefined;
1051
+ limit?: number | undefined;
1052
+ }, {
1053
+ boardId: string;
1054
+ channelId: string;
1055
+ id: string;
1056
+ kind: string;
1057
+ labels: string[];
1058
+ status: "blocked" | "cancelled" | "claimed" | "completed" | "failed" | "in_progress" | "open" | "ready";
1059
+ title: string;
1060
+ }[]>;
1061
+ claimTask: import("../app.js").MutationDefinition<{
1062
+ note?: string | undefined;
1063
+ threadId: string;
1064
+ }, {
1065
+ id: string;
1066
+ claimId: string;
1067
+ expiresAt: number | null;
1068
+ recoveredFrom: string | null;
1069
+ }>;
1070
+ renewClaim: import("../app.js").MutationDefinition<{
1071
+ threadId: string;
1072
+ }, {
1073
+ id: string;
1074
+ expiresAt: number | null;
1075
+ }>;
1076
+ releaseTask: import("../app.js").MutationDefinition<{
1077
+ note?: string | undefined;
1078
+ threadId: string;
1079
+ }, {
1080
+ id: string;
1081
+ to: string;
1082
+ }>;
1083
+ reportProgress: import("../app.js").MutationDefinition<{
1084
+ renew?: boolean | undefined;
1085
+ structured?: {
1086
+ data: unknown;
1087
+ schema: string;
1088
+ version?: number | undefined;
1089
+ } | undefined;
1090
+ text: string;
1091
+ threadId: string;
1092
+ }, {
1093
+ id: string;
1094
+ messageId: any;
1095
+ expiresAt: any;
1096
+ }>;
1097
+ completeTask: import("../app.js").MutationDefinition<{
1098
+ data?: Record<string, unknown> | undefined;
1099
+ links?: {
1100
+ externalId?: string | undefined;
1101
+ kind: string;
1102
+ title?: string | undefined;
1103
+ url: string;
1104
+ }[] | undefined;
1105
+ structured?: {
1106
+ data: unknown;
1107
+ schema: string;
1108
+ version?: number | undefined;
1109
+ } | undefined;
1110
+ summary: string;
1111
+ threadId: string;
1112
+ }, {
1113
+ id: string;
1114
+ status: string;
1115
+ unblocked: string[];
1116
+ }>;
1117
+ failTask: import("../app.js").MutationDefinition<{
1118
+ data?: Record<string, unknown> | undefined;
1119
+ links?: {
1120
+ externalId?: string | undefined;
1121
+ kind: string;
1122
+ title?: string | undefined;
1123
+ url: string;
1124
+ }[] | undefined;
1125
+ structured?: {
1126
+ data: unknown;
1127
+ schema: string;
1128
+ version?: number | undefined;
1129
+ } | undefined;
1130
+ summary: string;
1131
+ threadId: string;
1132
+ }, {
1133
+ id: string;
1134
+ status: string;
1135
+ unblocked: string[];
1136
+ }>;
1137
+ addDependency: import("../app.js").MutationDefinition<{
1138
+ dependsOn: string;
1139
+ taskId: string;
1140
+ }, {
1141
+ id: string;
1142
+ status: string;
1143
+ }>;
1144
+ removeDependency: import("../app.js").MutationDefinition<{
1145
+ dependsOn: string;
1146
+ taskId: string;
1147
+ }, {
1148
+ id: string;
1149
+ status: string;
1150
+ }>;
1151
+ listGrants: import("../app.js").QueryDefinition<{
1152
+ boardId: string;
1153
+ includeRevoked?: boolean | undefined;
1154
+ }, {
1155
+ id: string;
1156
+ level: string;
1157
+ principal: string;
1158
+ }[]>;
1159
+ explain: import("../app.js").QueryDefinition<{
1160
+ boardId: string;
1161
+ channelId?: string | undefined;
1162
+ principal?: string | undefined;
1163
+ roles?: string[] | undefined;
1164
+ }, {
1165
+ level: string;
1166
+ principal: string;
1167
+ reasons: string[];
1168
+ }>;
1169
+ grant: import("../app.js").MutationDefinition<{
1170
+ boardId: string;
1171
+ channelId?: string | undefined;
1172
+ level: GrantLevel;
1173
+ principal: string;
1174
+ }, {
1175
+ id: string;
1176
+ }>;
1177
+ revokeGrant: import("../app.js").MutationDefinition<{
1178
+ grantId: string;
1179
+ }, {
1180
+ id: string;
1181
+ }>;
1182
+ activity: import("../app.js").QueryDefinition<{
1183
+ boardId: string;
1184
+ channelId?: string | undefined;
1185
+ limit?: number | undefined;
1186
+ types?: string[] | undefined;
1187
+ }, {
1188
+ at: number;
1189
+ id: string;
1190
+ type: string;
1191
+ }[]>;
1192
+ listSchemas: import("../app.js").QueryDefinition<{}, {
1193
+ description?: string | undefined;
1194
+ jsonSchema: unknown;
1195
+ name: string;
1196
+ version: number;
1197
+ }[]>;
1198
+ listWatchers: import("../app.js").QueryDefinition<{
1199
+ boardId: string;
1200
+ }, {
1201
+ agent: string;
1202
+ id: string;
1203
+ }[]>;
1204
+ createWatcher: import("../app.js").MutationDefinition<{
1205
+ agent: string;
1206
+ boardId: string;
1207
+ channelId?: string | undefined;
1208
+ labels?: string[] | undefined;
1209
+ on: ("followup.due" | "labels.changed" | "message.posted" | "status.changed" | "task.completed" | "task.failed" | "task.ready" | "thread.created")[];
1210
+ }, {
1211
+ id: string;
1212
+ }>;
1213
+ deleteWatcher: import("../app.js").MutationDefinition<{
1214
+ watcherId: string;
1215
+ }, {
1216
+ id: string;
1217
+ }>;
1218
+ scheduleFollowup: import("../app.js").MutationDefinition<{
1219
+ at: string | number;
1220
+ note: string;
1221
+ threadId: string;
1222
+ }, {
1223
+ id: string;
1224
+ dueAt: number;
1225
+ outboxId: string;
1226
+ }>;
1227
+ changeFollowup: import("../app.js").MutationDefinition<{
1228
+ action: "cancel" | "reschedule";
1229
+ at?: string | number | undefined;
1230
+ followupId: string;
1231
+ }, {
1232
+ id: string;
1233
+ state: string;
1234
+ dueAt: any;
1235
+ }>;
1236
+ importMessage: import("../app.js").MutationDefinition<{
1237
+ author: {
1238
+ id: string;
1239
+ name?: string | undefined;
1240
+ };
1241
+ deleted?: boolean | undefined;
1242
+ externalId: string;
1243
+ link?: {
1244
+ externalId: string;
1245
+ kind: string;
1246
+ } | undefined;
1247
+ source: string;
1248
+ text: string;
1249
+ threadId?: string | undefined;
1250
+ updatedAt: number;
1251
+ url?: string | undefined;
1252
+ }, {
1253
+ id: string | null;
1254
+ outcome: "created" | "deleted" | "duplicate" | "stale" | "updated";
1255
+ }>;
1256
+ })[K]["handler"]>>>;
1257
+ }>;
1258
+ export type BoardsDefinition = ReturnType<typeof defineBoards>;