@anhlp/alp-runtime 0.0.0-stage → 0.0.1-beta.3

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 (97) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +6 -2
  4. package/dist/acp-transport.d.ts +130 -0
  5. package/dist/acp-transport.js +511 -0
  6. package/dist/antigravity-transport.d.ts +82 -0
  7. package/dist/antigravity-transport.js +619 -0
  8. package/dist/board-domain.d.ts +56 -0
  9. package/dist/board-domain.js +157 -0
  10. package/dist/board.d.ts +21 -0
  11. package/dist/board.js +69 -0
  12. package/dist/catalog.d.ts +31 -0
  13. package/dist/catalog.js +38 -0
  14. package/dist/claude-transport.d.ts +174 -0
  15. package/dist/claude-transport.js +734 -0
  16. package/dist/contracts.d.ts +170 -0
  17. package/dist/contracts.js +5 -0
  18. package/dist/events.d.ts +1 -0
  19. package/dist/events.js +0 -0
  20. package/dist/github.d.ts +10 -0
  21. package/dist/github.js +39 -0
  22. package/dist/handoff.d.ts +36 -0
  23. package/dist/handoff.js +73 -0
  24. package/dist/index.d.ts +26 -0
  25. package/dist/index.js +78 -0
  26. package/dist/language.d.ts +41 -0
  27. package/dist/language.js +68 -0
  28. package/dist/live.d.ts +48 -0
  29. package/dist/live.js +45 -0
  30. package/dist/mailbox.d.ts +24 -0
  31. package/dist/mailbox.js +36 -0
  32. package/dist/mcp-tools.d.ts +115 -0
  33. package/dist/mcp-tools.js +71 -0
  34. package/dist/permission-path.d.ts +2 -0
  35. package/dist/permission-path.js +44 -0
  36. package/dist/process-info.d.ts +14 -0
  37. package/dist/process-info.js +32 -0
  38. package/dist/providers.d.ts +28 -0
  39. package/dist/providers.js +71 -0
  40. package/dist/recall.d.ts +42 -0
  41. package/dist/recall.js +60 -0
  42. package/dist/resolve.d.ts +121 -0
  43. package/dist/resolve.js +238 -0
  44. package/dist/runtime-context.d.ts +43 -0
  45. package/dist/runtime-context.js +61 -0
  46. package/dist/runtime.d.ts +4 -0
  47. package/dist/runtime.js +3131 -0
  48. package/dist/session-config.d.ts +1997 -0
  49. package/dist/session-config.js +205 -0
  50. package/dist/session-state.d.ts +150 -0
  51. package/dist/session-state.js +0 -0
  52. package/dist/tool-detail.d.ts +81 -0
  53. package/dist/tool-detail.js +332 -0
  54. package/dist/tool-results.d.ts +12 -0
  55. package/dist/tool-results.js +25 -0
  56. package/dist/tools.d.ts +682 -0
  57. package/dist/tools.js +377 -0
  58. package/dist/transport.d.ts +47 -0
  59. package/dist/transport.js +169 -0
  60. package/dist/usage.d.ts +25 -0
  61. package/dist/usage.js +60 -0
  62. package/dist/workspace.d.ts +101 -0
  63. package/dist/workspace.js +259 -0
  64. package/dist/worktree-domain.d.ts +88 -0
  65. package/dist/worktree-domain.js +196 -0
  66. package/package.json +254 -4
  67. package/src/acp-transport.ts +508 -0
  68. package/src/antigravity-transport.ts +667 -0
  69. package/src/board-domain.ts +185 -0
  70. package/src/board.ts +80 -0
  71. package/src/catalog.ts +32 -0
  72. package/src/claude-transport.ts +843 -0
  73. package/src/contracts.ts +172 -0
  74. package/src/events.ts +1 -0
  75. package/src/github.ts +37 -0
  76. package/src/handoff.ts +86 -0
  77. package/src/index.ts +28 -0
  78. package/src/language.ts +102 -0
  79. package/src/live.ts +86 -0
  80. package/src/mailbox.ts +46 -0
  81. package/src/mcp-tools.ts +73 -0
  82. package/src/permission-path.ts +37 -0
  83. package/src/process-info.ts +40 -0
  84. package/src/providers.ts +84 -0
  85. package/src/recall.ts +85 -0
  86. package/src/resolve.ts +230 -0
  87. package/src/runtime-context.ts +49 -0
  88. package/src/runtime.ts +3765 -0
  89. package/src/session-config.ts +304 -0
  90. package/src/session-state.ts +151 -0
  91. package/src/tool-detail.ts +397 -0
  92. package/src/tool-results.ts +26 -0
  93. package/src/tools.ts +381 -0
  94. package/src/transport.ts +116 -0
  95. package/src/usage.ts +79 -0
  96. package/src/workspace.ts +318 -0
  97. package/src/worktree-domain.ts +216 -0
@@ -0,0 +1,682 @@
1
+ import { type Task } from '@anhlp/alp-core/tasks';
2
+ import { type ResolvedSession } from './resolve.js';
3
+ export declare const handoffList: (description: string) => {
4
+ type: string;
5
+ items: {
6
+ type: string;
7
+ };
8
+ description: string;
9
+ };
10
+ export declare const HANDOFF_TOOL: {
11
+ type: string;
12
+ name: string;
13
+ description: string;
14
+ inputSchema: {
15
+ type: string;
16
+ properties: {
17
+ outcome: {
18
+ type: string;
19
+ enum: readonly ["complete", "partial", "blocked", "reconsider"];
20
+ description: string;
21
+ };
22
+ summary: {
23
+ type: string;
24
+ description: string;
25
+ };
26
+ candidate: {
27
+ type: string;
28
+ items: {
29
+ type: string;
30
+ };
31
+ description: string;
32
+ };
33
+ scope: {
34
+ type: string;
35
+ items: {
36
+ type: string;
37
+ };
38
+ description: string;
39
+ };
40
+ verification: {
41
+ type: string;
42
+ items: {
43
+ type: string;
44
+ };
45
+ description: string;
46
+ };
47
+ risks: {
48
+ type: string;
49
+ items: {
50
+ type: string;
51
+ };
52
+ description: string;
53
+ };
54
+ discovered: {
55
+ type: string;
56
+ items: {
57
+ type: string;
58
+ };
59
+ description: string;
60
+ };
61
+ ownership: {
62
+ type: string;
63
+ description: string;
64
+ };
65
+ verdict: {
66
+ type: string;
67
+ description: string;
68
+ properties: {
69
+ result: {
70
+ type: string;
71
+ enum: readonly ["pass", "pass_with_findings", "fail", "blocked"];
72
+ };
73
+ criteria: {
74
+ type: string;
75
+ items: {
76
+ type: string;
77
+ properties: {
78
+ criterion: {
79
+ type: string;
80
+ description: string;
81
+ };
82
+ result: {
83
+ type: string;
84
+ enum: readonly ["pass", "fail", "not_checked"];
85
+ };
86
+ evidence: {
87
+ type: string;
88
+ description: string;
89
+ };
90
+ };
91
+ required: string[];
92
+ additionalProperties: boolean;
93
+ };
94
+ };
95
+ findings: {
96
+ type: string;
97
+ items: {
98
+ type: string;
99
+ properties: {
100
+ severity: {
101
+ type: string;
102
+ enum: readonly ["critical", "high", "medium", "low"];
103
+ description: string;
104
+ };
105
+ where: {
106
+ type: string;
107
+ description: string;
108
+ };
109
+ problem: {
110
+ type: string;
111
+ description: string;
112
+ };
113
+ fix: {
114
+ type: string;
115
+ description: string;
116
+ };
117
+ };
118
+ required: string[];
119
+ additionalProperties: boolean;
120
+ };
121
+ };
122
+ };
123
+ required: string[];
124
+ additionalProperties: boolean;
125
+ };
126
+ };
127
+ required: string[];
128
+ additionalProperties: boolean;
129
+ };
130
+ };
131
+ export declare const WAIT_TOOL: {
132
+ type: string;
133
+ name: string;
134
+ description: string;
135
+ inputSchema: {
136
+ type: string;
137
+ properties: {
138
+ assignments: {
139
+ type: string;
140
+ items: {
141
+ type: string;
142
+ };
143
+ description: string;
144
+ };
145
+ timeoutMs: {
146
+ type: string;
147
+ description: string;
148
+ };
149
+ };
150
+ additionalProperties: boolean;
151
+ };
152
+ };
153
+ export declare const SEND_TOOL: {
154
+ type: string;
155
+ name: string;
156
+ description: string;
157
+ inputSchema: {
158
+ type: string;
159
+ properties: {
160
+ to: {
161
+ type: string;
162
+ description: string;
163
+ };
164
+ kind: {
165
+ type: string;
166
+ enum: string[];
167
+ description: string;
168
+ };
169
+ body: {
170
+ type: string;
171
+ };
172
+ replyTo: {
173
+ type: string;
174
+ description: string;
175
+ };
176
+ };
177
+ required: string[];
178
+ additionalProperties: boolean;
179
+ };
180
+ };
181
+ export declare const MERGE_TOOL: {
182
+ type: string;
183
+ name: string;
184
+ description: string;
185
+ inputSchema: {
186
+ type: string;
187
+ properties: {
188
+ assignmentId: {
189
+ type: string;
190
+ };
191
+ skipVerify: {
192
+ type: string;
193
+ description: string;
194
+ };
195
+ };
196
+ required: string[];
197
+ additionalProperties: boolean;
198
+ };
199
+ };
200
+ export declare const VERIFY_TOOL: {
201
+ type: string;
202
+ name: string;
203
+ description: string;
204
+ inputSchema: {
205
+ type: string;
206
+ properties: {
207
+ taskId: {
208
+ type: string;
209
+ description: string;
210
+ };
211
+ };
212
+ additionalProperties: boolean;
213
+ };
214
+ };
215
+ export declare const DISCARD_TOOL: {
216
+ type: string;
217
+ name: string;
218
+ description: string;
219
+ inputSchema: {
220
+ type: string;
221
+ properties: {
222
+ assignmentId: {
223
+ type: string;
224
+ };
225
+ };
226
+ required: string[];
227
+ additionalProperties: boolean;
228
+ };
229
+ };
230
+ export declare const CANCEL_TOOL: {
231
+ type: string;
232
+ name: string;
233
+ description: string;
234
+ inputSchema: {
235
+ type: string;
236
+ properties: {
237
+ assignmentId: {
238
+ type: string;
239
+ };
240
+ reason: {
241
+ type: string;
242
+ description: string;
243
+ };
244
+ };
245
+ required: string[];
246
+ additionalProperties: boolean;
247
+ };
248
+ };
249
+ export declare const RECALL_TOOL: {
250
+ type: string;
251
+ name: string;
252
+ description: string;
253
+ inputSchema: {
254
+ type: string;
255
+ properties: {
256
+ assignmentId: {
257
+ type: string;
258
+ description: string;
259
+ };
260
+ taskId: {
261
+ type: string;
262
+ description: string;
263
+ };
264
+ question: {
265
+ type: string;
266
+ description: string;
267
+ };
268
+ };
269
+ required: string[];
270
+ additionalProperties: boolean;
271
+ };
272
+ };
273
+ export declare const PIN_TOOL: {
274
+ type: string;
275
+ name: string;
276
+ description: string;
277
+ inputSchema: {
278
+ type: string;
279
+ properties: {
280
+ kind: {
281
+ type: string;
282
+ enum: readonly ["claim", "decision", "finding"];
283
+ };
284
+ body: {
285
+ type: string;
286
+ description: string;
287
+ };
288
+ paths: {
289
+ type: string;
290
+ items: {
291
+ type: string;
292
+ };
293
+ description: string;
294
+ };
295
+ };
296
+ required: string[];
297
+ additionalProperties: boolean;
298
+ };
299
+ };
300
+ export declare const BOARD_TOOL: {
301
+ type: string;
302
+ name: string;
303
+ description: string;
304
+ inputSchema: {
305
+ type: string;
306
+ properties: {
307
+ kinds: {
308
+ type: string;
309
+ items: {
310
+ type: string;
311
+ enum: readonly ["claim", "decision", "finding"];
312
+ };
313
+ };
314
+ limit: {
315
+ type: string;
316
+ description: string;
317
+ };
318
+ };
319
+ additionalProperties: boolean;
320
+ };
321
+ };
322
+ export declare const UNPIN_TOOL: {
323
+ type: string;
324
+ name: string;
325
+ description: string;
326
+ inputSchema: {
327
+ type: string;
328
+ properties: {
329
+ pinId: {
330
+ type: string;
331
+ };
332
+ };
333
+ required: string[];
334
+ additionalProperties: boolean;
335
+ };
336
+ };
337
+ export declare const ASK_TOOL: {
338
+ type: string;
339
+ name: string;
340
+ description: string;
341
+ inputSchema: {
342
+ type: string;
343
+ properties: {
344
+ question: {
345
+ type: string;
346
+ };
347
+ to: {
348
+ type: string;
349
+ enum: string[];
350
+ description: string;
351
+ };
352
+ options: {
353
+ type: string;
354
+ items: {
355
+ type: string;
356
+ };
357
+ description: string;
358
+ };
359
+ };
360
+ required: string[];
361
+ additionalProperties: boolean;
362
+ };
363
+ };
364
+ export declare const LESSON_TOOL: {
365
+ type: string;
366
+ name: string;
367
+ description: string;
368
+ inputSchema: {
369
+ type: string;
370
+ properties: {
371
+ scope: {
372
+ type: string;
373
+ enum: string[];
374
+ };
375
+ lesson: {
376
+ type: string;
377
+ description: string;
378
+ };
379
+ };
380
+ required: string[];
381
+ additionalProperties: boolean;
382
+ };
383
+ };
384
+ export declare const SKILL_TOOL: {
385
+ type: string;
386
+ name: string;
387
+ description: string;
388
+ inputSchema: {
389
+ type: string;
390
+ properties: {
391
+ name: {
392
+ type: string;
393
+ description: string;
394
+ };
395
+ description: {
396
+ type: string;
397
+ description: string;
398
+ };
399
+ body: {
400
+ type: string;
401
+ description: string;
402
+ };
403
+ roles: {
404
+ type: string;
405
+ items: {
406
+ type: string;
407
+ };
408
+ description: string;
409
+ };
410
+ lessons: {
411
+ type: string;
412
+ items: {
413
+ type: string;
414
+ };
415
+ description: string;
416
+ };
417
+ replace: {
418
+ type: string;
419
+ description: string;
420
+ };
421
+ requestId: {
422
+ type: string;
423
+ description: string;
424
+ };
425
+ };
426
+ required: string[];
427
+ additionalProperties: boolean;
428
+ };
429
+ };
430
+ export declare const ISSUE_TOOL: {
431
+ type: string;
432
+ name: string;
433
+ description: string;
434
+ inputSchema: {
435
+ type: string;
436
+ properties: {
437
+ action: {
438
+ type: string;
439
+ enum: string[];
440
+ };
441
+ target: {
442
+ type: string;
443
+ enum: string[];
444
+ };
445
+ query: {
446
+ type: string;
447
+ description: string;
448
+ };
449
+ title: {
450
+ type: string;
451
+ description: string;
452
+ };
453
+ body: {
454
+ type: string;
455
+ description: string;
456
+ };
457
+ issue: {
458
+ type: string;
459
+ description: string;
460
+ };
461
+ requestId: {
462
+ type: string;
463
+ description: string;
464
+ };
465
+ labels: {
466
+ type: string;
467
+ items: {
468
+ type: string;
469
+ };
470
+ description: string;
471
+ };
472
+ };
473
+ required: string[];
474
+ additionalProperties: boolean;
475
+ };
476
+ };
477
+ export declare const TASK_ACTIONS: readonly ["create", "update", "link", "start", "close", "reopen", "gate", "clear", "pour", "formulas", "show", "list", "ready"];
478
+ export type TaskAction = typeof TASK_ACTIONS[number];
479
+ export declare const TASK_PAST: Record<string, string>;
480
+ export declare const TASK_FIELDS: Record<TaskAction, string[]>;
481
+ /** The agent a session's team has as main (ALPD §42); `main` outside a team. */
482
+ export declare const mainOf: (mapping: Pick<ResolvedSession, "team">) => string;
483
+ /** A member's role in the session's team; without a team, the built-in agents' roles by name. */
484
+ export declare const roleOf: (mapping: Pick<ResolvedSession, "team">, agent: string) => string | undefined;
485
+ /** What each role may do with the task graph: main changes it, the others read it. */
486
+ export declare function taskActions(mapping: Pick<ResolvedSession, 'agent' | 'team'>, parentAgent?: string, role?: 'supervisor'): TaskAction[];
487
+ export declare const taskLinks: (description: string) => {
488
+ type: string;
489
+ description: string;
490
+ properties: {
491
+ blockedBy: {
492
+ type: string;
493
+ items: {
494
+ type: string;
495
+ };
496
+ description: string;
497
+ };
498
+ related: {
499
+ type: string;
500
+ items: {
501
+ type: string;
502
+ };
503
+ };
504
+ parent: {
505
+ type: string;
506
+ description: string;
507
+ };
508
+ };
509
+ additionalProperties: boolean;
510
+ };
511
+ export declare function taskTool(actions: TaskAction[]): {
512
+ type: string;
513
+ name: string;
514
+ description: string;
515
+ inputSchema: {
516
+ type: string;
517
+ properties: {
518
+ limit?: {
519
+ type: string;
520
+ description: string;
521
+ } | undefined;
522
+ status?: {
523
+ type: string;
524
+ enum: import("@anhlp/alp-core/tasks").TaskStatus[];
525
+ description: string;
526
+ } | undefined;
527
+ label?: {
528
+ type: string;
529
+ description: string;
530
+ } | undefined;
531
+ title?: {
532
+ type: string;
533
+ description: string;
534
+ } | undefined;
535
+ description?: {
536
+ type: string;
537
+ description: string;
538
+ } | undefined;
539
+ type?: {
540
+ type: string;
541
+ enum: import("@anhlp/alp-core/tasks").TaskType[];
542
+ } | undefined;
543
+ priority?: {
544
+ type: string;
545
+ description: string;
546
+ } | undefined;
547
+ labels?: {
548
+ type: string;
549
+ items: {
550
+ type: string;
551
+ };
552
+ } | undefined;
553
+ paths?: {
554
+ type: string;
555
+ items: {
556
+ type: string;
557
+ };
558
+ description: string;
559
+ } | undefined;
560
+ parent?: {
561
+ type: string;
562
+ description: string;
563
+ } | undefined;
564
+ blockedBy?: {
565
+ type: string;
566
+ items: {
567
+ type: string;
568
+ };
569
+ description: string;
570
+ } | undefined;
571
+ discoveredFrom?: {
572
+ type: string;
573
+ description: string;
574
+ } | undefined;
575
+ add?: {
576
+ type: string;
577
+ description: string;
578
+ properties: {
579
+ blockedBy: {
580
+ type: string;
581
+ items: {
582
+ type: string;
583
+ };
584
+ description: string;
585
+ };
586
+ related: {
587
+ type: string;
588
+ items: {
589
+ type: string;
590
+ };
591
+ };
592
+ parent: {
593
+ type: string;
594
+ description: string;
595
+ };
596
+ };
597
+ additionalProperties: boolean;
598
+ } | undefined;
599
+ remove?: {
600
+ type: string;
601
+ description: string;
602
+ properties: {
603
+ blockedBy: {
604
+ type: string;
605
+ items: {
606
+ type: string;
607
+ };
608
+ description: string;
609
+ };
610
+ related: {
611
+ type: string;
612
+ items: {
613
+ type: string;
614
+ };
615
+ };
616
+ parent: {
617
+ type: string;
618
+ description: string;
619
+ };
620
+ };
621
+ additionalProperties: boolean;
622
+ } | undefined;
623
+ reason?: {
624
+ type: string;
625
+ enum: import("@anhlp/alp-core/tasks").CloseReason[];
626
+ description: string;
627
+ } | undefined;
628
+ kind?: {
629
+ type: string;
630
+ enum: import("@anhlp/alp-core/tasks").GateKind[];
631
+ description: string;
632
+ } | undefined;
633
+ until?: {
634
+ type: string;
635
+ description: string;
636
+ } | undefined;
637
+ ref?: {
638
+ type: string;
639
+ description: string;
640
+ } | undefined;
641
+ gate?: {
642
+ type: string;
643
+ description: string;
644
+ } | undefined;
645
+ formula?: {
646
+ type: string;
647
+ description: string;
648
+ } | undefined;
649
+ vars?: {
650
+ type: string;
651
+ additionalProperties: {
652
+ type: string;
653
+ };
654
+ description: string;
655
+ } | undefined;
656
+ summary?: {
657
+ type: string;
658
+ description: string;
659
+ } | undefined;
660
+ unverified?: {
661
+ type: string;
662
+ description: string;
663
+ } | undefined;
664
+ note?: {
665
+ type: string;
666
+ description: string;
667
+ } | undefined;
668
+ action: {
669
+ type: string;
670
+ enum: ("close" | "list" | "create" | "link" | "update" | "start" | "reopen" | "gate" | "clear" | "pour" | "formulas" | "show" | "ready")[];
671
+ };
672
+ id: {
673
+ type: string;
674
+ description: string;
675
+ };
676
+ };
677
+ required: string[];
678
+ additionalProperties: boolean;
679
+ };
680
+ };
681
+ /** The task an assignment takes, as the start of its brief. */
682
+ export declare function taskBrief(task: Task, writing: boolean): string;