@eve/board 0.0.0 → 0.2.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 (74) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +101 -0
  3. package/README.md +36 -2
  4. package/dist/extension/_manifest.json +6 -0
  5. package/dist/extension/channels/board.d.ts +2 -0
  6. package/dist/extension/channels/board.mjs +9 -0
  7. package/dist/extension/extension.d.ts +55 -0
  8. package/dist/extension/extension.mjs +70 -0
  9. package/dist/extension/instructions/boards.d.ts +2 -0
  10. package/dist/extension/instructions/boards.mjs +14 -0
  11. package/dist/extension/instructions.md +9 -0
  12. package/dist/extension/lib/authorize.d.ts +27 -0
  13. package/dist/extension/lib/authorize.mjs +7 -0
  14. package/dist/extension/lib/board-channel.d.ts +103 -0
  15. package/dist/extension/lib/board-channel.mjs +528 -0
  16. package/dist/extension/lib/boards.d.ts +28 -0
  17. package/dist/extension/lib/boards.mjs +103 -0
  18. package/dist/extension/lib/channel.d.ts +12 -0
  19. package/dist/extension/lib/channel.mjs +12 -0
  20. package/dist/extension/lib/client.d.ts +256 -0
  21. package/dist/extension/lib/client.mjs +363 -0
  22. package/dist/extension/lib/inbound.d.ts +21 -0
  23. package/dist/extension/lib/inbound.mjs +121 -0
  24. package/dist/extension/lib/route.d.ts +5 -0
  25. package/dist/extension/lib/route.mjs +23 -0
  26. package/dist/extension/lib/tools.d.ts +548 -0
  27. package/dist/extension/lib/tools.mjs +565 -0
  28. package/dist/extension/lib/watches.d.ts +95 -0
  29. package/dist/extension/lib/watches.mjs +330 -0
  30. package/dist/extension/skills/collaborate/SKILL.md +65 -0
  31. package/dist/extension/tools/actors.d.ts +10 -0
  32. package/dist/extension/tools/actors.mjs +10 -0
  33. package/dist/extension/tools/block_task.d.ts +3 -0
  34. package/dist/extension/tools/block_task.mjs +10 -0
  35. package/dist/extension/tools/cancel_schedule.d.ts +8 -0
  36. package/dist/extension/tools/cancel_schedule.mjs +10 -0
  37. package/dist/extension/tools/channels.d.ts +7 -0
  38. package/dist/extension/tools/channels.mjs +10 -0
  39. package/dist/extension/tools/complete_task.d.ts +3 -0
  40. package/dist/extension/tools/complete_task.mjs +10 -0
  41. package/dist/extension/tools/create_task.d.ts +28 -0
  42. package/dist/extension/tools/create_task.mjs +10 -0
  43. package/dist/extension/tools/fail_task.d.ts +3 -0
  44. package/dist/extension/tools/fail_task.mjs +10 -0
  45. package/dist/extension/tools/label.d.ts +11 -0
  46. package/dist/extension/tools/label.mjs +10 -0
  47. package/dist/extension/tools/no_reply.d.ts +1 -0
  48. package/dist/extension/tools/no_reply.mjs +7 -0
  49. package/dist/extension/tools/note.d.ts +26 -0
  50. package/dist/extension/tools/note.mjs +10 -0
  51. package/dist/extension/tools/post.d.ts +57 -0
  52. package/dist/extension/tools/post.mjs +10 -0
  53. package/dist/extension/tools/react.d.ts +19 -0
  54. package/dist/extension/tools/react.mjs +10 -0
  55. package/dist/extension/tools/read.d.ts +195 -0
  56. package/dist/extension/tools/read.mjs +10 -0
  57. package/dist/extension/tools/reply.d.ts +57 -0
  58. package/dist/extension/tools/reply.mjs +10 -0
  59. package/dist/extension/tools/schedule.d.ts +17 -0
  60. package/dist/extension/tools/schedule.mjs +10 -0
  61. package/dist/extension/tools/schedules.d.ts +9 -0
  62. package/dist/extension/tools/schedules.mjs +10 -0
  63. package/dist/extension/tools/unwatch.d.ts +9 -0
  64. package/dist/extension/tools/unwatch.mjs +10 -0
  65. package/dist/extension/tools/watch.d.ts +25 -0
  66. package/dist/extension/tools/watch.mjs +10 -0
  67. package/dist/extension/tools/watches.d.ts +20 -0
  68. package/dist/extension/tools/watches.mjs +10 -0
  69. package/dist/index.d.ts +4 -0
  70. package/dist/index.mjs +7 -0
  71. package/dist/tools/index.d.ts +21 -0
  72. package/dist/tools/index.mjs +26 -0
  73. package/package.json +65 -14
  74. package/index.js +0 -1
@@ -0,0 +1,548 @@
1
+ import { type ToolContext } from "eve/tools";
2
+ import { type BoardSettings } from "./client.ts";
3
+ import { type BoardWatchAction } from "./watches.ts";
4
+ type Settings = () => BoardSettings;
5
+ export declare function holdsTask(ctx: Pick<ToolContext, "channel">): boolean;
6
+ /** Lists the board's channels. */
7
+ export declare function defineBoardChannelsTool(settings: Settings): import("eve/tools").ToolDefinition<{
8
+ board?: string | undefined;
9
+ }, {
10
+ channels: readonly import("./client.ts").BoardChannelSummary[];
11
+ }>;
12
+ /** Reads a thread, or a channel's threads. */
13
+ export declare function defineBoardReadTool(settings: Settings): import("eve/tools").ToolDefinition<{
14
+ board?: string | undefined;
15
+ id?: string | undefined;
16
+ link?: string | undefined;
17
+ channel?: string | undefined;
18
+ label?: string[] | undefined;
19
+ text?: string | undefined;
20
+ mentions?: string | undefined;
21
+ after?: string | undefined;
22
+ before?: string | undefined;
23
+ limit?: number | undefined;
24
+ }, {
25
+ message: {
26
+ attachments: string[];
27
+ author: string;
28
+ channel: string;
29
+ createdAt: string;
30
+ id: string;
31
+ labels: Readonly<Record<string, string>>;
32
+ re: string | null;
33
+ text: string;
34
+ task?: {
35
+ blocked: {
36
+ readonly kind: string | null;
37
+ readonly reason: string;
38
+ } | null;
39
+ holder: string | null;
40
+ result: string | null;
41
+ state: string;
42
+ } | undefined;
43
+ };
44
+ replies: {
45
+ attachments: string[];
46
+ author: string;
47
+ channel: string;
48
+ createdAt: string;
49
+ id: string;
50
+ labels: Readonly<Record<string, string>>;
51
+ re: string | null;
52
+ text: string;
53
+ task?: {
54
+ blocked: {
55
+ readonly kind: string | null;
56
+ readonly reason: string;
57
+ } | null;
58
+ holder: string | null;
59
+ result: string | null;
60
+ state: string;
61
+ } | undefined;
62
+ }[];
63
+ } | {
64
+ cursor: string;
65
+ older: string | null;
66
+ scanned?: number | undefined;
67
+ threads: {
68
+ last: {
69
+ attachments: string[];
70
+ author: string;
71
+ channel: string;
72
+ createdAt: string;
73
+ id: string;
74
+ labels: Readonly<Record<string, string>>;
75
+ re: string | null;
76
+ text: string;
77
+ task?: {
78
+ blocked: {
79
+ readonly kind: string | null;
80
+ readonly reason: string;
81
+ } | null;
82
+ holder: string | null;
83
+ result: string | null;
84
+ state: string;
85
+ } | undefined;
86
+ } | null;
87
+ message: {
88
+ attachments: string[];
89
+ author: string;
90
+ channel: string;
91
+ createdAt: string;
92
+ id: string;
93
+ labels: Readonly<Record<string, string>>;
94
+ re: string | null;
95
+ text: string;
96
+ task?: {
97
+ blocked: {
98
+ readonly kind: string | null;
99
+ readonly reason: string;
100
+ } | null;
101
+ holder: string | null;
102
+ result: string | null;
103
+ state: string;
104
+ } | undefined;
105
+ };
106
+ replies: number;
107
+ }[];
108
+ }> & {
109
+ execute(input: {
110
+ board?: string | undefined;
111
+ id?: string | undefined;
112
+ link?: string | undefined;
113
+ channel?: string | undefined;
114
+ label?: string[] | undefined;
115
+ text?: string | undefined;
116
+ mentions?: string | undefined;
117
+ after?: string | undefined;
118
+ before?: string | undefined;
119
+ limit?: number | undefined;
120
+ }, ctx: ToolContext): Promise<{
121
+ message: {
122
+ attachments: string[];
123
+ author: string;
124
+ channel: string;
125
+ createdAt: string;
126
+ id: string;
127
+ labels: Readonly<Record<string, string>>;
128
+ re: string | null;
129
+ text: string;
130
+ task?: {
131
+ blocked: {
132
+ readonly kind: string | null;
133
+ readonly reason: string;
134
+ } | null;
135
+ holder: string | null;
136
+ result: string | null;
137
+ state: string;
138
+ } | undefined;
139
+ };
140
+ replies: {
141
+ attachments: string[];
142
+ author: string;
143
+ channel: string;
144
+ createdAt: string;
145
+ id: string;
146
+ labels: Readonly<Record<string, string>>;
147
+ re: string | null;
148
+ text: string;
149
+ task?: {
150
+ blocked: {
151
+ readonly kind: string | null;
152
+ readonly reason: string;
153
+ } | null;
154
+ holder: string | null;
155
+ result: string | null;
156
+ state: string;
157
+ } | undefined;
158
+ }[];
159
+ } | {
160
+ cursor: string;
161
+ older: string | null;
162
+ scanned?: number | undefined;
163
+ threads: {
164
+ last: {
165
+ attachments: string[];
166
+ author: string;
167
+ channel: string;
168
+ createdAt: string;
169
+ id: string;
170
+ labels: Readonly<Record<string, string>>;
171
+ re: string | null;
172
+ text: string;
173
+ task?: {
174
+ blocked: {
175
+ readonly kind: string | null;
176
+ readonly reason: string;
177
+ } | null;
178
+ holder: string | null;
179
+ result: string | null;
180
+ state: string;
181
+ } | undefined;
182
+ } | null;
183
+ message: {
184
+ attachments: string[];
185
+ author: string;
186
+ channel: string;
187
+ createdAt: string;
188
+ id: string;
189
+ labels: Readonly<Record<string, string>>;
190
+ re: string | null;
191
+ text: string;
192
+ task?: {
193
+ blocked: {
194
+ readonly kind: string | null;
195
+ readonly reason: string;
196
+ } | null;
197
+ holder: string | null;
198
+ result: string | null;
199
+ state: string;
200
+ } | undefined;
201
+ };
202
+ replies: number;
203
+ }[];
204
+ }>;
205
+ };
206
+ /** Starts a thread in a channel. */
207
+ export declare function defineBoardPostTool(settings: Settings): import("eve/tools").ToolDefinition<{
208
+ board?: string | undefined;
209
+ channel: string;
210
+ text?: string | undefined;
211
+ attach?: string[] | undefined;
212
+ labels?: Record<string, string> | undefined;
213
+ noSync?: boolean | undefined;
214
+ }, {
215
+ warning?: string | undefined;
216
+ attachments: string[];
217
+ author: string;
218
+ channel: string;
219
+ createdAt: string;
220
+ id: string;
221
+ labels: Readonly<Record<string, string>>;
222
+ re: string | null;
223
+ text: string;
224
+ task?: {
225
+ blocked: {
226
+ readonly kind: string | null;
227
+ readonly reason: string;
228
+ } | null;
229
+ holder: string | null;
230
+ result: string | null;
231
+ state: string;
232
+ } | undefined;
233
+ }> & {
234
+ execute(input: {
235
+ board?: string | undefined;
236
+ channel: string;
237
+ text?: string | undefined;
238
+ attach?: string[] | undefined;
239
+ labels?: Record<string, string> | undefined;
240
+ noSync?: boolean | undefined;
241
+ }, ctx: ToolContext): Promise<{
242
+ warning?: string | undefined;
243
+ attachments: string[];
244
+ author: string;
245
+ channel: string;
246
+ createdAt: string;
247
+ id: string;
248
+ labels: Readonly<Record<string, string>>;
249
+ re: string | null;
250
+ text: string;
251
+ task?: {
252
+ blocked: {
253
+ readonly kind: string | null;
254
+ readonly reason: string;
255
+ } | null;
256
+ holder: string | null;
257
+ result: string | null;
258
+ state: string;
259
+ } | undefined;
260
+ }>;
261
+ };
262
+ /** Replies in a thread. */
263
+ export declare function defineBoardReplyTool(settings: Settings): import("eve/tools").ToolDefinition<{
264
+ board?: string | undefined;
265
+ id?: string | undefined;
266
+ text?: string | undefined;
267
+ attach?: string[] | undefined;
268
+ after?: string | undefined;
269
+ noSync?: boolean | undefined;
270
+ }, {
271
+ warning?: string | undefined;
272
+ attachments: string[];
273
+ author: string;
274
+ channel: string;
275
+ createdAt: string;
276
+ id: string;
277
+ labels: Readonly<Record<string, string>>;
278
+ re: string | null;
279
+ text: string;
280
+ task?: {
281
+ blocked: {
282
+ readonly kind: string | null;
283
+ readonly reason: string;
284
+ } | null;
285
+ holder: string | null;
286
+ result: string | null;
287
+ state: string;
288
+ } | undefined;
289
+ }> & {
290
+ execute(input: {
291
+ board?: string | undefined;
292
+ id?: string | undefined;
293
+ text?: string | undefined;
294
+ attach?: string[] | undefined;
295
+ after?: string | undefined;
296
+ noSync?: boolean | undefined;
297
+ }, ctx: ToolContext): Promise<{
298
+ warning?: string | undefined;
299
+ attachments: string[];
300
+ author: string;
301
+ channel: string;
302
+ createdAt: string;
303
+ id: string;
304
+ labels: Readonly<Record<string, string>>;
305
+ re: string | null;
306
+ text: string;
307
+ task?: {
308
+ blocked: {
309
+ readonly kind: string | null;
310
+ readonly reason: string;
311
+ } | null;
312
+ holder: string | null;
313
+ result: string | null;
314
+ state: string;
315
+ } | undefined;
316
+ }>;
317
+ };
318
+ /** Keeps a note in a thread, on the board only. */
319
+ export declare function defineBoardNoteTool(settings: Settings): import("eve/tools").ToolDefinition<{
320
+ board?: string | undefined;
321
+ id?: string | undefined;
322
+ text: string;
323
+ }, {
324
+ warning?: string | undefined;
325
+ attachments: string[];
326
+ author: string;
327
+ channel: string;
328
+ createdAt: string;
329
+ id: string;
330
+ labels: Readonly<Record<string, string>>;
331
+ re: string | null;
332
+ text: string;
333
+ task?: {
334
+ blocked: {
335
+ readonly kind: string | null;
336
+ readonly reason: string;
337
+ } | null;
338
+ holder: string | null;
339
+ result: string | null;
340
+ state: string;
341
+ } | undefined;
342
+ }>;
343
+ /** Reacts to a message. */
344
+ export declare function defineBoardReactTool(settings: Settings): import("eve/tools").ToolDefinition<{
345
+ board?: string | undefined;
346
+ id: string;
347
+ emoji: string;
348
+ remove?: boolean | undefined;
349
+ }, {
350
+ ok: boolean;
351
+ }> & {
352
+ execute(input: {
353
+ board?: string | undefined;
354
+ id: string;
355
+ emoji: string;
356
+ remove?: boolean | undefined;
357
+ }, ctx: ToolContext): Promise<{
358
+ ok: boolean;
359
+ }>;
360
+ };
361
+ /** Sets or unsets labels on a thread. */
362
+ export declare function defineBoardLabelTool(settings: Settings): import("eve/tools").ToolDefinition<{
363
+ board?: string | undefined;
364
+ id: string;
365
+ set?: Record<string, string> | undefined;
366
+ unset?: string[] | undefined;
367
+ if?: Record<string, string | null> | undefined;
368
+ }, {
369
+ ok: boolean;
370
+ }>;
371
+ /** Schedules a message that wakes the agent later. */
372
+ export declare function defineBoardScheduleTool(settings: Settings): import("eve/tools").ToolDefinition<{
373
+ board?: string | undefined;
374
+ id?: string | undefined;
375
+ text: string;
376
+ in?: string | undefined;
377
+ at?: string | undefined;
378
+ every?: string | undefined;
379
+ times?: number | undefined;
380
+ until?: string | undefined;
381
+ sync?: boolean | undefined;
382
+ }, {
383
+ id: string;
384
+ next: string | null;
385
+ re: string | null;
386
+ }>;
387
+ /** Cancels a scheduled message. */
388
+ export declare function defineBoardCancelScheduleTool(settings: Settings): import("eve/tools").ToolDefinition<{
389
+ board?: string | undefined;
390
+ id: string;
391
+ }, {
392
+ readonly canceled: boolean;
393
+ }>;
394
+ /** Lists pending scheduled messages. */
395
+ export declare function defineBoardSchedulesTool(settings: Settings): import("eve/tools").ToolDefinition<{
396
+ board?: string | undefined;
397
+ id?: string | undefined;
398
+ channel?: string | undefined;
399
+ }, {
400
+ schedules: readonly import("./client.ts").BoardSchedule[];
401
+ }>;
402
+ /** Lists the board's actors, to mention them. */
403
+ export declare function defineBoardActorsTool(settings: Settings): import("eve/tools").ToolDefinition<{
404
+ board?: string | undefined;
405
+ search?: string | undefined;
406
+ limit?: number | undefined;
407
+ }, {
408
+ actors: import("./client.ts").BoardActorSummary[];
409
+ total: number;
410
+ }>;
411
+ /** Creates a task on the board's queue. */
412
+ export declare function defineBoardCreateTaskTool(settings: Settings): import("eve/tools").ToolDefinition<{
413
+ board?: string | undefined;
414
+ channel: string;
415
+ text: string;
416
+ labels?: Record<string, string> | undefined;
417
+ needs?: string[] | undefined;
418
+ noSync?: boolean | undefined;
419
+ }, {
420
+ attachments: string[];
421
+ author: string;
422
+ channel: string;
423
+ createdAt: string;
424
+ id: string;
425
+ labels: Readonly<Record<string, string>>;
426
+ re: string | null;
427
+ text: string;
428
+ task?: {
429
+ blocked: {
430
+ readonly kind: string | null;
431
+ readonly reason: string;
432
+ } | null;
433
+ holder: string | null;
434
+ result: string | null;
435
+ state: string;
436
+ } | undefined;
437
+ }>;
438
+ export declare function defineBoardCompleteTaskTool(): import("eve/tools").ToolDefinition<{
439
+ result?: string | undefined;
440
+ }, {
441
+ result?: string;
442
+ reason?: string;
443
+ kind?: string;
444
+ settled: "blocked" | "completed" | "failed";
445
+ task: string;
446
+ }> & {
447
+ execute(input: {
448
+ result?: string | undefined;
449
+ }, ctx: ToolContext): Promise<{
450
+ result?: string;
451
+ reason?: string;
452
+ kind?: string;
453
+ settled: "blocked" | "completed" | "failed";
454
+ task: string;
455
+ }>;
456
+ };
457
+ export declare function defineBoardFailTaskTool(): import("eve/tools").ToolDefinition<{
458
+ reason: string;
459
+ }, {
460
+ result?: string;
461
+ reason?: string;
462
+ kind?: string;
463
+ settled: "blocked" | "completed" | "failed";
464
+ task: string;
465
+ }> & {
466
+ execute(input: {
467
+ reason: string;
468
+ }, ctx: ToolContext): Promise<{
469
+ result?: string;
470
+ reason?: string;
471
+ kind?: string;
472
+ settled: "blocked" | "completed" | "failed";
473
+ task: string;
474
+ }>;
475
+ };
476
+ export declare function defineBoardBlockTaskTool(): import("eve/tools").ToolDefinition<{
477
+ reason: string;
478
+ kind?: string | undefined;
479
+ }, {
480
+ result?: string;
481
+ reason?: string;
482
+ kind?: string;
483
+ settled: "blocked" | "completed" | "failed";
484
+ task: string;
485
+ }> & {
486
+ execute(input: {
487
+ reason: string;
488
+ kind?: string | undefined;
489
+ }, ctx: ToolContext): Promise<{
490
+ result?: string;
491
+ reason?: string;
492
+ kind?: string;
493
+ settled: "blocked" | "completed" | "failed";
494
+ task: string;
495
+ }>;
496
+ };
497
+ /** Creates a watch: the board wakes the agent with these instructions when a message matches. */
498
+ export declare function defineBoardWatchTool(settings: Settings): import("eve/tools").ToolDefinition<{
499
+ board?: string | undefined;
500
+ channel: string;
501
+ label?: string[] | undefined;
502
+ by?: string | undefined;
503
+ text?: string | undefined;
504
+ instructions: string;
505
+ claim?: {
506
+ channel: string;
507
+ label?: Record<string, string> | undefined;
508
+ from?: string[] | undefined;
509
+ } | undefined;
510
+ }, {
511
+ action: BoardWatchAction | undefined;
512
+ id: string;
513
+ tail: string;
514
+ board?: undefined;
515
+ } | {
516
+ action: BoardWatchAction | undefined;
517
+ board: string;
518
+ id: string;
519
+ tail: string;
520
+ }>;
521
+ /** Lists the agent's watches. */
522
+ export declare function defineBoardWatchesTool(settings: Settings): import("eve/tools").ToolDefinition<{
523
+ board?: string | undefined;
524
+ details?: boolean | undefined;
525
+ }, {
526
+ board?: undefined;
527
+ watches: import("./watches.ts").BoardWatch[];
528
+ boards?: undefined;
529
+ } | {
530
+ board: string;
531
+ watches: import("./watches.ts").BoardWatch[];
532
+ boards?: undefined;
533
+ } | {
534
+ board?: undefined;
535
+ watches?: undefined;
536
+ boards: {
537
+ [k: string]: import("./watches.ts").BoardWatch[];
538
+ };
539
+ }>;
540
+ /** Removes a watch. */
541
+ export declare function defineBoardUnwatchTool(settings: Settings): import("eve/tools").ToolDefinition<{
542
+ board?: string | undefined;
543
+ id: string;
544
+ }, {
545
+ readonly id: string;
546
+ readonly removed: boolean;
547
+ }>;
548
+ export {};