@anhlp/alp-runtime 0.0.0-beta.1

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 (94) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +7 -0
  4. package/dist/acp-transport.d.ts +114 -0
  5. package/dist/acp-transport.js +478 -0
  6. package/dist/antigravity-transport.d.ts +80 -0
  7. package/dist/antigravity-transport.js +609 -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 +157 -0
  15. package/dist/claude-transport.js +671 -0
  16. package/dist/contracts.d.ts +163 -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 +24 -0
  25. package/dist/index.js +64 -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 +2979 -0
  48. package/dist/session-config.d.ts +1973 -0
  49. package/dist/session-config.js +205 -0
  50. package/dist/session-state.d.ts +140 -0
  51. package/dist/session-state.js +0 -0
  52. package/dist/tool-results.d.ts +12 -0
  53. package/dist/tool-results.js +25 -0
  54. package/dist/tools.d.ts +674 -0
  55. package/dist/tools.js +375 -0
  56. package/dist/transport.d.ts +47 -0
  57. package/dist/transport.js +169 -0
  58. package/dist/usage.d.ts +15 -0
  59. package/dist/usage.js +35 -0
  60. package/dist/workspace.d.ts +101 -0
  61. package/dist/workspace.js +259 -0
  62. package/dist/worktree-domain.d.ts +88 -0
  63. package/dist/worktree-domain.js +196 -0
  64. package/package.json +256 -0
  65. package/src/acp-transport.ts +473 -0
  66. package/src/antigravity-transport.ts +658 -0
  67. package/src/board-domain.ts +185 -0
  68. package/src/board.ts +80 -0
  69. package/src/catalog.ts +32 -0
  70. package/src/claude-transport.ts +771 -0
  71. package/src/contracts.ts +166 -0
  72. package/src/events.ts +1 -0
  73. package/src/github.ts +37 -0
  74. package/src/handoff.ts +86 -0
  75. package/src/index.ts +26 -0
  76. package/src/language.ts +102 -0
  77. package/src/live.ts +86 -0
  78. package/src/mailbox.ts +46 -0
  79. package/src/mcp-tools.ts +73 -0
  80. package/src/permission-path.ts +37 -0
  81. package/src/process-info.ts +40 -0
  82. package/src/providers.ts +84 -0
  83. package/src/recall.ts +85 -0
  84. package/src/resolve.ts +230 -0
  85. package/src/runtime-context.ts +49 -0
  86. package/src/runtime.ts +3579 -0
  87. package/src/session-config.ts +301 -0
  88. package/src/session-state.ts +141 -0
  89. package/src/tool-results.ts +26 -0
  90. package/src/tools.ts +379 -0
  91. package/src/transport.ts +116 -0
  92. package/src/usage.ts +42 -0
  93. package/src/workspace.ts +318 -0
  94. package/src/worktree-domain.ts +216 -0
@@ -0,0 +1,674 @@
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
+ };
422
+ required: string[];
423
+ additionalProperties: boolean;
424
+ };
425
+ };
426
+ export declare const ISSUE_TOOL: {
427
+ type: string;
428
+ name: string;
429
+ description: string;
430
+ inputSchema: {
431
+ type: string;
432
+ properties: {
433
+ action: {
434
+ type: string;
435
+ enum: string[];
436
+ };
437
+ target: {
438
+ type: string;
439
+ enum: string[];
440
+ };
441
+ query: {
442
+ type: string;
443
+ description: string;
444
+ };
445
+ title: {
446
+ type: string;
447
+ description: string;
448
+ };
449
+ body: {
450
+ type: string;
451
+ description: string;
452
+ };
453
+ issue: {
454
+ type: string;
455
+ description: string;
456
+ };
457
+ labels: {
458
+ type: string;
459
+ items: {
460
+ type: string;
461
+ };
462
+ description: string;
463
+ };
464
+ };
465
+ required: string[];
466
+ additionalProperties: boolean;
467
+ };
468
+ };
469
+ export declare const TASK_ACTIONS: readonly ["create", "update", "link", "start", "close", "reopen", "gate", "clear", "pour", "formulas", "show", "list", "ready"];
470
+ export type TaskAction = typeof TASK_ACTIONS[number];
471
+ export declare const TASK_PAST: Record<string, string>;
472
+ export declare const TASK_FIELDS: Record<TaskAction, string[]>;
473
+ /** The agent a session's team has as main (ALPD §42); `main` outside a team. */
474
+ export declare const mainOf: (mapping: Pick<ResolvedSession, "team">) => string;
475
+ /** A member's role in the session's team; without a team, the built-in agents' roles by name. */
476
+ export declare const roleOf: (mapping: Pick<ResolvedSession, "team">, agent: string) => string | undefined;
477
+ /** What each role may do with the task graph: main changes it, the others read it. */
478
+ export declare function taskActions(mapping: Pick<ResolvedSession, 'agent' | 'team'>, parentAgent?: string, role?: 'supervisor'): TaskAction[];
479
+ export declare const taskLinks: (description: string) => {
480
+ type: string;
481
+ description: string;
482
+ properties: {
483
+ blockedBy: {
484
+ type: string;
485
+ items: {
486
+ type: string;
487
+ };
488
+ description: string;
489
+ };
490
+ related: {
491
+ type: string;
492
+ items: {
493
+ type: string;
494
+ };
495
+ };
496
+ parent: {
497
+ type: string;
498
+ description: string;
499
+ };
500
+ };
501
+ additionalProperties: boolean;
502
+ };
503
+ export declare function taskTool(actions: TaskAction[]): {
504
+ type: string;
505
+ name: string;
506
+ description: string;
507
+ inputSchema: {
508
+ type: string;
509
+ properties: {
510
+ limit?: {
511
+ type: string;
512
+ description: string;
513
+ } | undefined;
514
+ status?: {
515
+ type: string;
516
+ enum: import("@anhlp/alp-core/tasks").TaskStatus[];
517
+ description: string;
518
+ } | undefined;
519
+ label?: {
520
+ type: string;
521
+ description: string;
522
+ } | undefined;
523
+ title?: {
524
+ type: string;
525
+ description: string;
526
+ } | undefined;
527
+ description?: {
528
+ type: string;
529
+ description: string;
530
+ } | undefined;
531
+ type?: {
532
+ type: string;
533
+ enum: import("@anhlp/alp-core/tasks").TaskType[];
534
+ } | undefined;
535
+ priority?: {
536
+ type: string;
537
+ description: string;
538
+ } | undefined;
539
+ labels?: {
540
+ type: string;
541
+ items: {
542
+ type: string;
543
+ };
544
+ } | undefined;
545
+ paths?: {
546
+ type: string;
547
+ items: {
548
+ type: string;
549
+ };
550
+ description: string;
551
+ } | undefined;
552
+ parent?: {
553
+ type: string;
554
+ description: string;
555
+ } | undefined;
556
+ blockedBy?: {
557
+ type: string;
558
+ items: {
559
+ type: string;
560
+ };
561
+ description: string;
562
+ } | undefined;
563
+ discoveredFrom?: {
564
+ type: string;
565
+ description: string;
566
+ } | undefined;
567
+ add?: {
568
+ type: string;
569
+ description: string;
570
+ properties: {
571
+ blockedBy: {
572
+ type: string;
573
+ items: {
574
+ type: string;
575
+ };
576
+ description: string;
577
+ };
578
+ related: {
579
+ type: string;
580
+ items: {
581
+ type: string;
582
+ };
583
+ };
584
+ parent: {
585
+ type: string;
586
+ description: string;
587
+ };
588
+ };
589
+ additionalProperties: boolean;
590
+ } | undefined;
591
+ remove?: {
592
+ type: string;
593
+ description: string;
594
+ properties: {
595
+ blockedBy: {
596
+ type: string;
597
+ items: {
598
+ type: string;
599
+ };
600
+ description: string;
601
+ };
602
+ related: {
603
+ type: string;
604
+ items: {
605
+ type: string;
606
+ };
607
+ };
608
+ parent: {
609
+ type: string;
610
+ description: string;
611
+ };
612
+ };
613
+ additionalProperties: boolean;
614
+ } | undefined;
615
+ reason?: {
616
+ type: string;
617
+ enum: import("@anhlp/alp-core/tasks").CloseReason[];
618
+ description: string;
619
+ } | undefined;
620
+ kind?: {
621
+ type: string;
622
+ enum: import("@anhlp/alp-core/tasks").GateKind[];
623
+ description: string;
624
+ } | undefined;
625
+ until?: {
626
+ type: string;
627
+ description: string;
628
+ } | undefined;
629
+ ref?: {
630
+ type: string;
631
+ description: string;
632
+ } | undefined;
633
+ gate?: {
634
+ type: string;
635
+ description: string;
636
+ } | undefined;
637
+ formula?: {
638
+ type: string;
639
+ description: string;
640
+ } | undefined;
641
+ vars?: {
642
+ type: string;
643
+ additionalProperties: {
644
+ type: string;
645
+ };
646
+ description: string;
647
+ } | undefined;
648
+ summary?: {
649
+ type: string;
650
+ description: string;
651
+ } | undefined;
652
+ unverified?: {
653
+ type: string;
654
+ description: string;
655
+ } | undefined;
656
+ note?: {
657
+ type: string;
658
+ description: string;
659
+ } | undefined;
660
+ action: {
661
+ type: string;
662
+ enum: ("close" | "list" | "create" | "link" | "update" | "start" | "reopen" | "gate" | "clear" | "pour" | "formulas" | "show" | "ready")[];
663
+ };
664
+ id: {
665
+ type: string;
666
+ description: string;
667
+ };
668
+ };
669
+ required: string[];
670
+ additionalProperties: boolean;
671
+ };
672
+ };
673
+ /** The task an assignment takes, as the start of its brief. */
674
+ export declare function taskBrief(task: Task, writing: boolean): string;