@nyte-ai/core 0.0.18 → 0.0.21

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 (186) hide show
  1. package/README.md +1 -1
  2. package/THIRD-PARTY-NOTICES.md +66 -0
  3. package/dist/chunks/{compose-yk3y0jap.js → compose-0m65m83c.js} +7 -7
  4. package/dist/chunks/{compose-r12cnkpc.js → compose-12jnd50a.js} +11 -11
  5. package/dist/chunks/{compose-q1n2dgrs.js → compose-1knxqqm1.js} +4 -4
  6. package/dist/chunks/{compose-xtkavyrw.js → compose-1r0wr5dc.js} +17 -9
  7. package/dist/chunks/{compose-9tqm6g18.js → compose-2rha31fc.js} +4 -4
  8. package/dist/chunks/{compose-0bpspysf.js → compose-4ppmas7g.js} +5 -5
  9. package/dist/chunks/compose-5rg7askh.js +52 -0
  10. package/dist/chunks/{compose-mryw0674.js → compose-5z835ej2.js} +6 -1
  11. package/dist/chunks/{compose-7k6nsmtq.js → compose-6gt28900.js} +11 -14
  12. package/dist/chunks/{compose-2eg8w67t.js → compose-6r5ymwyr.js} +15 -4
  13. package/dist/chunks/{compose-xd0kdp3t.js → compose-753gc057.js} +8 -8
  14. package/dist/chunks/{compose-q1ts0v6k.js → compose-767bb340.js} +1 -1
  15. package/dist/chunks/{compose-rpq9n0nz.js → compose-8mkfr84d.js} +89 -32
  16. package/dist/chunks/{compose-5w5bbakh.js → compose-8pp3vtv0.js} +5 -5
  17. package/dist/chunks/{compose-gaps3heh.js → compose-9hy3p236.js} +9 -9
  18. package/dist/chunks/{compose-pgeemk2b.js → compose-a7k9h27z.js} +6 -5
  19. package/dist/chunks/{compose-dc2ns6gd.js → compose-a8ddt55n.js} +10 -10
  20. package/dist/chunks/{compose-7b8ajk7a.js → compose-ad80nkkn.js} +8 -8
  21. package/dist/chunks/{compose-064y3n82.js → compose-ae5t6v5b.js} +5 -5
  22. package/dist/chunks/{compose-amr0k1m1.js → compose-b2bf1jvy.js} +122 -41
  23. package/dist/chunks/{compose-xpfr4wt3.js → compose-bbhk8vnr.js} +7 -4
  24. package/dist/chunks/compose-bd8c5n7k.js +32 -0
  25. package/dist/chunks/{compose-rehp8epe.js → compose-byse0eqj.js} +7 -7
  26. package/dist/chunks/{compose-ef936rsa.js → compose-bz70g01d.js} +27 -11
  27. package/dist/chunks/compose-c4238qkb.js +105 -0
  28. package/dist/chunks/{compose-q1b0tppc.js → compose-c9wxgbjp.js} +4 -4
  29. package/dist/chunks/{compose-h272znxk.js → compose-cdj05t7x.js} +7 -7
  30. package/dist/chunks/{compose-kb22bkpt.js → compose-cqpjcx2t.js} +12 -1
  31. package/dist/chunks/{compose-dbx6ftbm.js → compose-csh5vv2t.js} +42 -4
  32. package/dist/chunks/{compose-eqr5qwp1.js → compose-d1m94kzq.js} +62 -22
  33. package/dist/chunks/{compose-drdej9yt.js → compose-d95fwwvw.js} +4 -4
  34. package/dist/chunks/{compose-jc22rsz4.js → compose-dbsn3bsy.js} +2 -2
  35. package/dist/chunks/{compose-s2aew2c9.js → compose-e2fyz3xc.js} +5 -5
  36. package/dist/chunks/{compose-gg8b9b21.js → compose-e9f6nrwp.js} +23 -18
  37. package/dist/chunks/{compose-52afaf3v.js → compose-fnncnk81.js} +7 -7
  38. package/dist/chunks/{compose-bjx8s01m.js → compose-fqsqjbrf.js} +1 -1
  39. package/dist/chunks/{compose-1gd9vkye.js → compose-gj2ypr7q.js} +3 -3
  40. package/dist/chunks/compose-gvm49f4b.js +155 -0
  41. package/dist/chunks/{compose-1jz2j92f.js → compose-gxjc6vz9.js} +30 -2
  42. package/dist/chunks/{compose-cq1zx4gp.js → compose-h14pmqv3.js} +1 -1
  43. package/dist/chunks/{compose-d2s80zg2.js → compose-hfrjm4a1.js} +5 -5
  44. package/dist/chunks/{compose-kmzr06mw.js → compose-hfsn6pnt.js} +8 -5
  45. package/dist/chunks/{compose-jjchxce6.js → compose-j42p9wfs.js} +1 -1
  46. package/dist/chunks/{compose-4b1zf3p0.js → compose-jd4bsnqh.js} +63 -47
  47. package/dist/chunks/{compose-2g3enfv5.js → compose-jeemzja1.js} +4 -4
  48. package/dist/chunks/{compose-y478gv6x.js → compose-jmmyw9hd.js} +4 -4
  49. package/dist/chunks/{compose-5tkyrzr0.js → compose-jwy1gba9.js} +4 -4
  50. package/dist/chunks/{compose-k35b75k9.js → compose-kwkna3cg.js} +2 -4
  51. package/dist/chunks/{compose-t53j8yxv.js → compose-m01wspwf.js} +1 -1
  52. package/dist/chunks/{compose-n93897b0.js → compose-m91ffwss.js} +1 -1
  53. package/dist/chunks/{compose-madtxnp1.js → compose-matk94se.js} +7 -7
  54. package/dist/chunks/{compose-aa73dbe8.js → compose-mcz93154.js} +117 -58
  55. package/dist/chunks/{compose-r7dx7rpz.js → compose-mdwr0er9.js} +72 -15
  56. package/dist/chunks/{compose-j12n448k.js → compose-nj4nj5n9.js} +36 -3
  57. package/dist/chunks/{compose-yn2et568.js → compose-nkxwrphm.js} +141 -15
  58. package/dist/chunks/{compose-k8aghhv2.js → compose-pkprmn5b.js} +16 -16
  59. package/dist/chunks/{compose-1z7q169s.js → compose-q2zxbg41.js} +69 -41
  60. package/dist/chunks/{compose-b5xz0dj7.js → compose-qwbe95qs.js} +2 -2
  61. package/dist/chunks/{compose-vmhv4e00.js → compose-qxfq6dn9.js} +13 -12
  62. package/dist/chunks/{compose-wgphshsn.js → compose-r8tz1xfj.js} +8 -8
  63. package/dist/chunks/{compose-ffk8dnbh.js → compose-smsafpqe.js} +3 -3
  64. package/dist/chunks/{compose-djq2bt61.js → compose-sprfv38c.js} +6 -6
  65. package/dist/chunks/{compose-cdy4q5mv.js → compose-t9fcqtby.js} +17 -16
  66. package/dist/chunks/{compose-p3q14yt1.js → compose-tppkp915.js} +5 -5
  67. package/dist/chunks/{compose-dckpgtks.js → compose-ts08bth2.js} +3 -3
  68. package/dist/chunks/{compose-n10w4nkk.js → compose-vn7b7fdj.js} +12 -3
  69. package/dist/chunks/{compose-9m19b27b.js → compose-w6zb11k1.js} +7 -7
  70. package/dist/chunks/{compose-j3tkz0tb.js → compose-wvzzf8n2.js} +6 -6
  71. package/dist/chunks/{compose-6vf6dkk2.js → compose-xhtgytrh.js} +2 -2
  72. package/dist/chunks/{compose-4tb2vn84.js → compose-y6xgbg2h.js} +1 -1
  73. package/dist/chunks/compose-yfcb6w2h.js +58 -0
  74. package/dist/chunks/{compose-0rx7ygxq.js → compose-zaanjpb7.js} +1 -1
  75. package/dist/chunks/{compose-7pc3p5ex.js → compose-zjj072km.js} +8 -8
  76. package/dist/src/agent/compaction.js +41 -39
  77. package/dist/src/agent/images.d.ts +7 -0
  78. package/dist/src/agent/images.js +8 -0
  79. package/dist/src/agent/request.js +30 -30
  80. package/dist/src/agent/tool-runner.d.ts +3 -7
  81. package/dist/src/agent/tool-runner.js +34 -30
  82. package/dist/src/agent/transcript.d.ts +0 -1
  83. package/dist/src/agent/transcript.js +37 -35
  84. package/dist/src/agent/turn.js +46 -43
  85. package/dist/src/api/connection.js +60 -56
  86. package/dist/src/api/head.js +42 -41
  87. package/dist/src/api/part.js +22 -22
  88. package/dist/src/api/server.js +48 -44
  89. package/dist/src/api/session.js +48 -47
  90. package/dist/src/builtins/delegation.js +2 -2
  91. package/dist/src/builtins/environment.js +1 -2
  92. package/dist/src/compose.d.ts +6 -7
  93. package/dist/src/compose.js +72 -67
  94. package/dist/src/contract/fold.d.ts +1 -3
  95. package/dist/src/contract/host.d.ts +30 -1
  96. package/dist/src/contract/host.js +4 -2
  97. package/dist/src/contract/kernel.d.ts +6 -35
  98. package/dist/src/contract/parts.d.ts +4 -0
  99. package/dist/src/contract/parts.js +1 -1
  100. package/dist/src/contract/records.d.ts +69 -3
  101. package/dist/src/contract/records.js +5 -1
  102. package/dist/src/contract/session.d.ts +2 -1
  103. package/dist/src/contract/tools.d.ts +10 -1
  104. package/dist/src/contract/workspace.d.ts +7 -3
  105. package/dist/src/drive/execution.js +46 -42
  106. package/dist/src/drive/interruptions.d.ts +7 -0
  107. package/dist/src/drive/interruptions.js +17 -0
  108. package/dist/src/engine/admission.js +24 -24
  109. package/dist/src/engine/batches.js +22 -22
  110. package/dist/src/engine/branch-summary.js +21 -21
  111. package/dist/src/engine/durable.d.ts +0 -2
  112. package/dist/src/engine/durable.js +20 -20
  113. package/dist/src/engine/fence.js +20 -20
  114. package/dist/src/engine/jobs.d.ts +2 -0
  115. package/dist/src/engine/jobs.js +31 -27
  116. package/dist/src/engine/move.js +23 -23
  117. package/dist/src/engine/part-definitions.js +2 -2
  118. package/dist/src/engine/presence.d.ts +39 -0
  119. package/dist/src/engine/presence.js +16 -0
  120. package/dist/src/engine/principals.js +17 -17
  121. package/dist/src/engine/receipts.js +21 -21
  122. package/dist/src/engine/runs.d.ts +1 -1
  123. package/dist/src/engine/runs.js +25 -25
  124. package/dist/src/engine/start.js +36 -35
  125. package/dist/src/engine/surface.d.ts +4 -0
  126. package/dist/src/engine/surface.js +13 -0
  127. package/dist/src/engine/waits.d.ts +5 -15
  128. package/dist/src/engine/waits.js +23 -19
  129. package/dist/src/env/browser.js +27 -27
  130. package/dist/src/env/environment.js +29 -29
  131. package/dist/src/env/mcp.js +31 -31
  132. package/dist/src/env/session-changes.d.ts +10 -0
  133. package/dist/src/env/session-changes.js +15 -0
  134. package/dist/src/env/trust.js +30 -30
  135. package/dist/src/env/workspaces.js +34 -33
  136. package/dist/src/env/worktrees.js +35 -34
  137. package/dist/src/extend/activation.js +35 -34
  138. package/dist/src/extend/hooks.js +22 -22
  139. package/dist/src/extend/models.d.ts +2 -1
  140. package/dist/src/extend/models.js +32 -30
  141. package/dist/src/extend/plugin-api.js +18 -18
  142. package/dist/src/extend/plugin-runtime.js +42 -41
  143. package/dist/src/extend/registry.js +27 -27
  144. package/dist/src/extend/resources.js +31 -31
  145. package/dist/src/extend/setting-layers.js +4 -4
  146. package/dist/src/extend/settings.js +38 -37
  147. package/dist/src/extend/workspace-commands.js +43 -42
  148. package/dist/src/fold/calls.js +5 -5
  149. package/dist/src/fold/checkpoint.js +11 -11
  150. package/dist/src/fold/code.d.ts +1 -2
  151. package/dist/src/fold/code.js +1 -1
  152. package/dist/src/fold/commit.d.ts +0 -4
  153. package/dist/src/fold/commit.js +16 -16
  154. package/dist/src/fold/draft.js +4 -4
  155. package/dist/src/fold/fold.js +7 -7
  156. package/dist/src/fold/paths.js +5 -5
  157. package/dist/src/fold/project.d.ts +3 -1
  158. package/dist/src/fold/project.js +8 -6
  159. package/dist/src/fold/reads.js +5 -5
  160. package/dist/src/fold/seen.js +19 -19
  161. package/dist/src/fold/view.d.ts +1 -1
  162. package/dist/src/fold/view.js +20 -20
  163. package/dist/src/fold/watch.js +15 -15
  164. package/dist/src/harness.d.ts +3 -1
  165. package/dist/src/harness.js +75 -70
  166. package/dist/src/index.d.ts +3 -3
  167. package/dist/src/index.js +5 -3
  168. package/dist/src/server.js +70 -65
  169. package/dist/src/store/inspect.js +4 -4
  170. package/dist/src/store/log.d.ts +0 -2
  171. package/dist/src/store/log.js +2 -2
  172. package/dist/src/store/memory-store.js +5 -5
  173. package/dist/src/store/migrations.js +3 -3
  174. package/dist/src/store/model-state.d.ts +6 -1
  175. package/dist/src/store/model-state.js +14 -4
  176. package/dist/src/store/parts.js +5 -5
  177. package/dist/src/store/refs.d.ts +6 -5
  178. package/dist/src/store/refs.js +11 -1
  179. package/dist/src/store/session-index.js +2 -2
  180. package/dist/src/store/session.d.ts +3 -1
  181. package/dist/src/store/session.js +5 -3
  182. package/dist/src/store.d.ts +1 -1
  183. package/dist/src/store.js +11 -7
  184. package/dist/src/testing.d.ts +2 -0
  185. package/dist/src/testing.js +83 -70
  186. package/package.json +4 -4
@@ -3,90 +3,95 @@ import {
3
3
  composeServer2,
4
4
  hostIdentity2,
5
5
  createKernel2
6
- } from "../chunks/compose-1z7q169s.js";
7
- import"../chunks/compose-k8aghhv2.js";
8
- import"../chunks/compose-r12cnkpc.js";
9
- import"../chunks/compose-djq2bt61.js";
10
- import"../chunks/compose-4b1zf3p0.js";
11
- import"../chunks/compose-7pc3p5ex.js";
12
- import"../chunks/compose-xm52jghq.js";
13
- import"../chunks/compose-j3tkz0tb.js";
14
- import"../chunks/compose-gg8b9b21.js";
15
- import"../chunks/compose-xtkavyrw.js";
16
- import"../chunks/compose-wgphshsn.js";
6
+ } from "../chunks/compose-q2zxbg41.js";
7
+ import"../chunks/compose-pkprmn5b.js";
8
+ import"../chunks/compose-wvzzf8n2.js";
17
9
  import"../chunks/compose-e3635qmn.js";
18
- import"../chunks/compose-n93897b0.js";
19
- import"../chunks/compose-amr0k1m1.js";
10
+ import"../chunks/compose-12jnd50a.js";
11
+ import"../chunks/compose-jd4bsnqh.js";
12
+ import"../chunks/compose-c4238qkb.js";
13
+ import"../chunks/compose-sprfv38c.js";
14
+ import"../chunks/compose-m91ffwss.js";
15
+ import"../chunks/compose-b2bf1jvy.js";
20
16
  import"../chunks/compose-597de3tc.js";
21
17
  import"../chunks/compose-kevyezbv.js";
22
- import"../chunks/compose-rpq9n0nz.js";
23
- import"../chunks/compose-aa73dbe8.js";
24
- import"../chunks/compose-madtxnp1.js";
25
- import"../chunks/compose-5tkyrzr0.js";
26
- import"../chunks/compose-vmhv4e00.js";
27
- import"../chunks/compose-dc2ns6gd.js";
28
- import"../chunks/compose-yk3y0jap.js";
29
- import"../chunks/compose-s2aew2c9.js";
30
- import"../chunks/compose-r7dx7rpz.js";
31
- import"../chunks/compose-gaps3heh.js";
32
- import"../chunks/compose-0rx7ygxq.js";
33
- import"../chunks/compose-2g3enfv5.js";
34
- import"../chunks/compose-xd0kdp3t.js";
35
- import"../chunks/compose-064y3n82.js";
36
- import"../chunks/compose-q1b0tppc.js";
37
- import"../chunks/compose-b5xz0dj7.js";
38
- import"../chunks/compose-kmzr06mw.js";
39
- import"../chunks/compose-d2s80zg2.js";
40
- import"../chunks/compose-q1n2dgrs.js";
41
- import"../chunks/compose-eqr5qwp1.js";
42
- import"../chunks/compose-1gd9vkye.js";
43
- import"../chunks/compose-y478gv6x.js";
44
- import"../chunks/compose-5w5bbakh.js";
45
- import"../chunks/compose-0bpspysf.js";
46
- import"../chunks/compose-9tqm6g18.js";
47
- import"../chunks/compose-t53j8yxv.js";
48
- import"../chunks/compose-yn2et568.js";
49
- import"../chunks/compose-rehp8epe.js";
18
+ import"../chunks/compose-zjj072km.js";
19
+ import"../chunks/compose-e9f6nrwp.js";
20
+ import"../chunks/compose-r8tz1xfj.js";
21
+ import"../chunks/compose-1r0wr5dc.js";
22
+ import"../chunks/compose-xm52jghq.js";
23
+ import"../chunks/compose-8mkfr84d.js";
24
+ import"../chunks/compose-mcz93154.js";
25
+ import"../chunks/compose-a8ddt55n.js";
26
+ import"../chunks/compose-bd8c5n7k.js";
27
+ import"../chunks/compose-5rg7askh.js";
28
+ import"../chunks/compose-matk94se.js";
29
+ import"../chunks/compose-gvm49f4b.js";
30
+ import"../chunks/compose-jwy1gba9.js";
31
+ import"../chunks/compose-qxfq6dn9.js";
32
+ import"../chunks/compose-0m65m83c.js";
33
+ import"../chunks/compose-e2fyz3xc.js";
34
+ import"../chunks/compose-mdwr0er9.js";
35
+ import"../chunks/compose-9hy3p236.js";
36
+ import"../chunks/compose-zaanjpb7.js";
37
+ import"../chunks/compose-jeemzja1.js";
38
+ import"../chunks/compose-753gc057.js";
39
+ import"../chunks/compose-ae5t6v5b.js";
40
+ import"../chunks/compose-c9wxgbjp.js";
41
+ import"../chunks/compose-qwbe95qs.js";
42
+ import"../chunks/compose-hfsn6pnt.js";
43
+ import"../chunks/compose-hfrjm4a1.js";
44
+ import"../chunks/compose-1knxqqm1.js";
45
+ import"../chunks/compose-d1m94kzq.js";
46
+ import"../chunks/compose-gj2ypr7q.js";
47
+ import"../chunks/compose-yfcb6w2h.js";
48
+ import"../chunks/compose-jmmyw9hd.js";
49
+ import"../chunks/compose-8pp3vtv0.js";
50
+ import"../chunks/compose-4ppmas7g.js";
51
+ import"../chunks/compose-2rha31fc.js";
52
+ import"../chunks/compose-m01wspwf.js";
53
+ import"../chunks/compose-nkxwrphm.js";
54
+ import"../chunks/compose-byse0eqj.js";
50
55
  import"../chunks/compose-vzvm76dn.js";
51
- import"../chunks/compose-cdy4q5mv.js";
56
+ import"../chunks/compose-t9fcqtby.js";
57
+ import"../chunks/compose-ac5efwd1.js";
52
58
  import"../chunks/compose-rb9gqgp9.js";
53
- import"../chunks/compose-52afaf3v.js";
54
- import"../chunks/compose-p3q14yt1.js";
59
+ import"../chunks/compose-fnncnk81.js";
60
+ import"../chunks/compose-tppkp915.js";
55
61
  import"../chunks/compose-66009v9f.js";
56
- import"../chunks/compose-9m19b27b.js";
57
- import"../chunks/compose-ac5efwd1.js";
58
- import"../chunks/compose-ef936rsa.js";
59
- import"../chunks/compose-6vf6dkk2.js";
62
+ import"../chunks/compose-w6zb11k1.js";
63
+ import"../chunks/compose-bz70g01d.js";
64
+ import"../chunks/compose-xhtgytrh.js";
60
65
  import"../chunks/compose-7tf625s3.js";
61
- import"../chunks/compose-xpfr4wt3.js";
62
- import"../chunks/compose-7b8ajk7a.js";
63
- import"../chunks/compose-2eg8w67t.js";
64
- import"../chunks/compose-pgeemk2b.js";
65
- import"../chunks/compose-7k6nsmtq.js";
66
- import"../chunks/compose-jc22rsz4.js";
66
+ import"../chunks/compose-bbhk8vnr.js";
67
+ import"../chunks/compose-ad80nkkn.js";
68
+ import"../chunks/compose-6r5ymwyr.js";
69
+ import"../chunks/compose-a7k9h27z.js";
70
+ import"../chunks/compose-6gt28900.js";
71
+ import"../chunks/compose-dbsn3bsy.js";
67
72
  import"../chunks/compose-1c6w12g1.js";
68
- import"../chunks/compose-jjchxce6.js";
69
- import"../chunks/compose-q1ts0v6k.js";
70
- import"../chunks/compose-cq1zx4gp.js";
71
- import"../chunks/compose-ffk8dnbh.js";
72
- import"../chunks/compose-drdej9yt.js";
73
- import"../chunks/compose-n10w4nkk.js";
73
+ import"../chunks/compose-j42p9wfs.js";
74
+ import"../chunks/compose-767bb340.js";
75
+ import"../chunks/compose-h14pmqv3.js";
76
+ import"../chunks/compose-smsafpqe.js";
77
+ import"../chunks/compose-d95fwwvw.js";
78
+ import"../chunks/compose-vn7b7fdj.js";
74
79
  import"../chunks/compose-rxsqmcgq.js";
75
80
  import"../chunks/compose-84272xbk.js";
76
81
  import"../chunks/compose-7w4ebjp1.js";
77
- import"../chunks/compose-mryw0674.js";
78
- import"../chunks/compose-bjx8s01m.js";
82
+ import"../chunks/compose-5z835ej2.js";
83
+ import"../chunks/compose-fqsqjbrf.js";
79
84
  import"../chunks/compose-n116fnmp.js";
80
85
  import"../chunks/compose-zfjxkavf.js";
81
86
  import"../chunks/compose-bj54tkph.js";
82
87
  import"../chunks/compose-j50h13pg.js";
83
88
  import"../chunks/compose-sd0stm97.js";
84
- import"../chunks/compose-k35b75k9.js";
85
- import"../chunks/compose-j12n448k.js";
89
+ import"../chunks/compose-kwkna3cg.js";
90
+ import"../chunks/compose-nj4nj5n9.js";
86
91
  import"../chunks/compose-0wq555bd.js";
87
- import"../chunks/compose-dbx6ftbm.js";
88
- import"../chunks/compose-kb22bkpt.js";
89
- import"../chunks/compose-1jz2j92f.js";
92
+ import"../chunks/compose-csh5vv2t.js";
93
+ import"../chunks/compose-cqpjcx2t.js";
94
+ import"../chunks/compose-gxjc6vz9.js";
90
95
  import"../chunks/compose-ry29956g.js";
91
96
  import"../chunks/compose-q6c7wswc.js";
92
97
  export {
@@ -46,6 +46,7 @@ export interface FoldInput {
46
46
  readonly previous: MessageId;
47
47
  readonly stopped: RunId | null;
48
48
  } | null;
49
+ readonly requires: readonly string[] | null;
49
50
  readonly landed: {
50
51
  readonly commit: CommitId;
51
52
  readonly run: RunId | null;
@@ -66,9 +67,6 @@ export interface FoldTurn {
66
67
  readonly head: HeadName;
67
68
  readonly live: readonly CallId[];
68
69
  }
69
- export type UserMessage = Extract<Message, {
70
- readonly kind: "user";
71
- }>;
72
70
  export type Logged<Kind extends SessionEvent["kind"]> = Extract<SessionEvent, {
73
71
  readonly kind: Kind;
74
72
  }>;
@@ -1,4 +1,4 @@
1
- import type { AdvanceReport, Authority, Awaitable, BlobId, ByteReader, CallId, CredentialSource, Cursor, DecodedObjectView, Disposer, ExecutionCoverage, HeadName, HostDescription, HostId, HostView, IdentityChallenge, IntegrityReport, JournalEntry, Json, LoginMethod, ModelAccount, ModelCatalogView, ModelRef, Owned, Paged, PluginCheckReport, PluginReplacementReport, PrincipalId, PrincipalView, ProviderUsage, ReceiptId, Ref, RepairPage, RunId, Seq, SessionEvent, SessionId, SettingOutcome, WorkspaceId, WorkspaceTarget } from "@nyte-ai/schema";
1
+ import type { AdvanceReport, Authority, Awaitable, BlobId, ByteReader, CallId, CredentialSource, Cursor, DecodedObjectView, Disposer, ExecutionCoverage, HeadName, HostDescription, HostId, HostView, IdentityChallenge, IntegrityReport, JournalEntry, Json, LoginMethod, ModelAccount, ModelCatalogView, ModelListing, ModelRef, Owned, Paged, PluginCheckReport, PluginReplacementReport, PrincipalId, PrincipalView, ProviderUsage, ReceiptId, Ref, RepairPage, RunId, Seq, SessionEvent, SessionId, SettingOutcome, WorkspaceId, WorkspaceTarget } from "@nyte-ai/schema";
2
2
  import type { Models, Provider } from "@nyte-ai/ai";
3
3
  import type { Plugin } from "./plugin.ts";
4
4
  import type { Session, Sessions } from "./session.ts";
@@ -66,6 +66,30 @@ export interface OpenOptions {
66
66
  readonly mcp?: McpHubFactory;
67
67
  /** The serving machine's GitHub CLI login, served as `Connection.github`; absent, its calls throw `SdkError("unavailable")`. */
68
68
  readonly github?: GitHubAccountApi;
69
+ readonly images?: ImageProcessor;
70
+ }
71
+ export interface ImageLimits {
72
+ readonly maxWidth: number;
73
+ readonly maxHeight: number;
74
+ readonly maxBase64Bytes: number;
75
+ }
76
+ export declare const IMAGE_LIMITS: ImageLimits;
77
+ export interface PreparedImage {
78
+ readonly data: string;
79
+ readonly mimeType: string;
80
+ readonly resized?: {
81
+ readonly from: {
82
+ readonly width: number;
83
+ readonly height: number;
84
+ };
85
+ readonly to: {
86
+ readonly width: number;
87
+ readonly height: number;
88
+ };
89
+ };
90
+ }
91
+ export interface ImageProcessor {
92
+ prepare(bytes: Uint8Array, mimeType: string, limits: ImageLimits): Promise<PreparedImage | undefined>;
69
93
  }
70
94
  export interface ConnectOptions {
71
95
  readonly url: string;
@@ -127,6 +151,11 @@ export interface ModelsApi {
127
151
  } | {
128
152
  readonly kind: "unknown-model";
129
153
  }>;
154
+ setListing(refs: readonly ModelRef[], listing: ModelListing): Promise<{
155
+ readonly kind: "set";
156
+ } | {
157
+ readonly kind: "unknown-model";
158
+ }>;
130
159
  verify(provider: string): Promise<{
131
160
  readonly kind: "verified";
132
161
  } | {
@@ -4,11 +4,13 @@ import {
4
4
  ALL_AUTHORITY2,
5
5
  TOKEN_AUTHORITY2,
6
6
  CORE_CONTEXT2,
7
- PARTICIPANT_AUTHORITY2
8
- } from "../../chunks/compose-mryw0674.js";
7
+ PARTICIPANT_AUTHORITY2,
8
+ IMAGE_LIMITS2
9
+ } from "../../chunks/compose-5z835ej2.js";
9
10
  export {
10
11
  ALL_AUTHORITY2 as ALL_AUTHORITY,
11
12
  CORE_CONTEXT2 as CORE_CONTEXT,
13
+ IMAGE_LIMITS2 as IMAGE_LIMITS,
12
14
  LOCAL2 as LOCAL,
13
15
  PARTICIPANT_AUTHORITY2 as PARTICIPANT_AUTHORITY,
14
16
  TOKEN2 as TOKEN,
@@ -1,9 +1,10 @@
1
1
  import type { Activation, CallId, CommitId, Configuration, ConfigurationPatch, ConfigureOutcome, Decision, Delivery, Disposer, ExecutionCoverage, HeadName, HostDescription, HostId, HostView, JobEnd, JobId, Json, MessageId, MessageSource, ModelRef, ModelRequestInput, ModelRequestOutcome, PartId, PluginLoadOutcome, PrincipalId, Revision, RunEnd, RunId, RunView, SessionCatalogView, SessionId, ToolInfo, Usage, ValidationIssue } from "@nyte-ai/schema";
2
2
  import type { KeyedSerial } from "@nyte-ai/schema/serial";
3
3
  import type { FoldCache, LogPublisher, SessionBus } from "./fold.ts";
4
- import type { Connection, ConnectionContext, ConnectionRegistry, Host, HostState, ModelState, OpenOptions } from "./host.ts";
4
+ import type { Connection, ConnectionContext, ConnectionRegistry, Host, HostState, ImageProcessor, ModelState, OpenOptions } from "./host.ts";
5
5
  import type { PartDefinition, PartDefinitions, PartTable } from "./parts.ts";
6
6
  import type { Agent, ContributionTable, HookEntry, HookName, HookTable, Plugin, PluginApi, Registries, Registry, SettingDefinition, SettingsRegistry } from "./plugin.ts";
7
+ import type { Presence } from "../engine/presence.ts";
7
8
  import type { CallRecord } from "./records.ts";
8
9
  import type { Session } from "./session.ts";
9
10
  import type { StoreConnection } from "./store.ts";
@@ -12,13 +13,12 @@ import type { EnvironmentRegistry, ExecutionEnv, GitHubAccountApi, JobTable, Mcp
12
13
  export interface Kernel {
13
14
  readonly hostId: HostId;
14
15
  readonly instance: string;
16
+ readonly presence: Presence | null;
15
17
  readonly poll: number | null;
16
- /** Listeners the store poll calls when another process has committed, for readers of what the bus does not carry, such as the session directory. */
17
18
  readonly externalCommits: Set<() => void>;
18
19
  readonly store: StoreConnection;
19
20
  readonly description: HostDescription;
20
21
  readonly bus: SessionBus;
21
- /** The one way logged events reach the bus: once each, in seq order per session. */
22
22
  readonly publisher: LogPublisher;
23
23
  readonly host: HostState;
24
24
  readonly folds: FoldCache;
@@ -32,7 +32,7 @@ export interface Kernel {
32
32
  readonly summarize: Summarizer;
33
33
  readonly compact: Compactor;
34
34
  readonly resolveConfiguration: ConfigurationResolver;
35
- /** Whether `model`'s runtime takes a message sent mid-turn (`ModelCapabilities.steer`); true for a model of no known provider. */
35
+ readonly rememberChoice: (choice: Configuration, scope: "model" | "thinking") => Promise<void>;
36
36
  readonly modelSteers: (model: ModelRef) => boolean;
37
37
  readonly waits: WaitRegistry;
38
38
  readonly modelState: ModelState;
@@ -46,63 +46,47 @@ export interface Kernel {
46
46
  request<T>(session: SessionId, input: ModelRequestInput<T>): Promise<ModelRequestOutcome<T>>;
47
47
  readonly secrets: NonNullable<OpenOptions["secrets"]> | null;
48
48
  readonly mcp: McpHub | null;
49
- /** The serving machine's GitHub CLI login, null on a host without one. */
50
49
  readonly github: GitHubAccountApi | null;
50
+ readonly images: ImageProcessor | null;
51
51
  readonly plugins: PluginHost;
52
- /** Builds the public connection and session handles, so engine and plugin code never import the api layer. */
53
52
  readonly handles: Handles;
54
- /** Removes a chat whose first message is still deciding, the way a refusal does; returns that message, or null when nothing on the chat is deciding. On the kernel so receipts reach it without importing start.ts. */
55
53
  stopStart(session: SessionId): Promise<MessageId | null>;
56
54
  }
57
- /** The host's plugins and the per-session runtimes that load them. */
58
55
  export interface PluginHost {
59
- /** The first-party plugins every session loads first. */
60
56
  readonly builtins: readonly Plugin<"core">[];
61
- /** The host's own plugins, after the built-ins; `replace` swaps them. */
62
57
  host: readonly Plugin<"core">[];
63
- /** Where each plugin loaded from a file came from. */
64
58
  readonly sources: ReadonlyMap<Plugin<"core">, {
65
59
  readonly source: "user" | "project";
66
60
  readonly path: string;
67
61
  }>;
68
62
  readonly state: PluginState;
69
- /** The session's runtime, installed on first use. */
70
63
  runtime(session: SessionId): PluginRuntime;
71
- /** Installs a fresh runtime for the session over the one it has, and waits for it. */
72
64
  reload(session: SessionId): Promise<void>;
73
65
  runtimes(): ReadonlyMap<SessionId, PluginRuntime>;
74
66
  close(session: SessionId): Promise<void>;
75
- /** The api a plugin owns in a session's runtime. */
76
67
  api(owner: string, session: SessionId): PluginApi<"core">;
77
68
  replace(plugins: readonly Plugin<"core">[], scope?: {
78
69
  readonly session: SessionId;
79
70
  }): ReturnType<Host["plugins"]["replace"]>;
80
71
  check(plugins: readonly Plugin<"core">[]): ReturnType<Host["plugins"]["check"]>;
81
- /** Imports the plugins in `paths`, through the host's plugin loader. */
82
72
  load(paths: readonly string[]): Promise<readonly Plugin<"core">[]>;
83
73
  }
84
- /** This process's activation and catalog of each session, each change published on the session's bus. */
85
74
  export interface SessionDirectory {
86
75
  activation(session: SessionId): Activation;
87
76
  setActivation(session: SessionId, activation: Activation): void;
88
77
  catalog(session: SessionId): SessionCatalogView;
89
78
  setCatalog(session: SessionId, catalog: SessionCatalogView): void;
90
- /** Drops a removed session's activation and catalog. */
91
79
  forget(session: SessionId): void;
92
80
  }
93
81
  interface Handles {
94
82
  connection(context: ConnectionContext): Connection;
95
83
  session(context: ConnectionContext, session: SessionId): Session;
96
- /** The session handle a plugin's `activate` receives: its main head sends without waiting on the activation. */
97
84
  activationSession(context: ConnectionContext, session: SessionId): Session;
98
85
  }
99
- /** This process's abort controllers for the runs it works on. Whether a run is stopping is its record's `stopping`; this table only follows that record's logged stop fence. */
100
86
  export interface RunTable {
101
- /** The controller of a run this process works on, created on first use, following the session's bus for the run's stop fence. */
102
87
  start(session: SessionId, run: RunId): AbortController;
103
88
  abort(run: RunId): void;
104
89
  signal(run: RunId): AbortSignal | null;
105
- /** Whether the run's stop fence reached this process's bus, or its work here was aborted. */
106
90
  fenced(run: RunId): boolean;
107
91
  end(run: RunId): void;
108
92
  }
@@ -189,35 +173,23 @@ export interface ParkedWait {
189
173
  readonly partial: CallRecord["partial"];
190
174
  readonly index: number;
191
175
  }
192
- /** Wakes parked calls: each target event offers its outcome to the waits the store-side index lists under it, and `tick` to the timers and deadlines that are due. */
193
176
  export interface WaitRegistry {
194
- /** Checks a just-parked wait against what it waits on, completing it at once when that already happened. */
195
177
  park(entry: ParkedWait): Promise<void>;
196
- /** Offers a run's end to its waiters; whether any took it. */
197
178
  runEnded(session: SessionId, run: RunId, end: RunEnd): Promise<boolean>;
198
- /** Offers a job's end to its waiters; whether any took it. */
199
179
  jobEnded(job: JobId, end: JobEnd): Promise<boolean>;
200
180
  partAnswered(session: SessionId, part: PartId, answer: {
201
181
  readonly action: string;
202
182
  readonly input: Json;
203
183
  }): Promise<void>;
204
184
  partClosed(session: SessionId, part: PartId): Promise<void>;
205
- /** Ends the waits on a head that stop at its next input. */
206
185
  inputAdmitted(session: SessionId, head: HeadName, message: MessageId): Promise<void>;
207
- /** Ends the waits a run's parked calls hold, stopped. */
208
186
  runStopped(session: SessionId, run: RunId): Promise<void>;
209
- /** Ends a call's wait, and those of the calls nested in it, stopped. */
210
187
  callStopped(session: SessionId, call: CallId): Promise<void>;
211
- /** Offers the timers and deadlines due at `now`. */
212
188
  tick(now: number): Promise<void>;
213
189
  rerun(session: SessionId, call: CallId): void;
214
- /** After another process committed: steps the calls its wakes indexed as woken (see `loadWaits`), and resumes this process's action loops whose call it settled or whose re-run claim lapsed. A parked call is left to its index, which every process offers through. */
215
190
  refresh(): Promise<void>;
216
- /** Registers this process's live loop for an action call, resumed when its wait completes. */
217
191
  onWoken(session: SessionId, call: CallId, resume: () => void): Disposer;
218
- /** Calls `listener` each time this process settles the receipt, until disposed. */
219
192
  onReceipt(session: SessionId, receipt: string, listener: () => void): Disposer;
220
- /** Tells this process's listeners of the receipt that it settled. */
221
193
  receiptSettled(session: SessionId, receipt: string): void;
222
194
  }
223
195
  export interface PluginRuntime {
@@ -321,15 +293,14 @@ interface Held {
321
293
  }
322
294
  export interface ExecutionState {
323
295
  readonly held: Map<string, Held>;
324
- /** The runs this process drives a turn of, with their sessions. */
325
296
  readonly driving: Map<RunId, SessionId>;
326
297
  readonly covers: Map<object, ExecutionCoverage>;
327
298
  readonly advancing: Set<string>;
299
+ readonly undrained: Set<string>;
328
300
  readonly leaseQueue: KeyedSerial<string>;
329
301
  readonly pending: Map<string, boolean>;
330
302
  readonly summaries: Set<string>;
331
303
  readonly callQueue: KeyedSerial<string>;
332
- /** The chats whose first message this process is deciding, each with the abort a stop or remove fires. */
333
304
  readonly starting: Map<SessionId, {
334
305
  readonly done: Promise<void>;
335
306
  readonly abort: AbortController;
@@ -137,6 +137,7 @@ export declare const tool: PartDefinition<{
137
137
  readonly name: string;
138
138
  readonly call: import("@nyte-ai/schema").Id<"call">;
139
139
  readonly changes: {
140
+ readonly unattributed?: true | undefined;
140
141
  readonly removed: number;
141
142
  readonly added: number;
142
143
  readonly paths: readonly string[];
@@ -193,6 +194,9 @@ export declare const tool: PartDefinition<{
193
194
  readonly stop: {
194
195
  readonly input: Schema<Record<string, never>>;
195
196
  };
197
+ readonly background: {
198
+ readonly input: Schema<Record<string, never>>;
199
+ };
196
200
  }>;
197
201
  export declare const compaction: PartDefinition<{
198
202
  usage: {
@@ -6,7 +6,7 @@ import {
6
6
  tool2,
7
7
  compaction2,
8
8
  branchSummary2
9
- } from "../../chunks/compose-bjx8s01m.js";
9
+ } from "../../chunks/compose-fqsqjbrf.js";
10
10
  import"../../chunks/compose-bj54tkph.js";
11
11
  export {
12
12
  branchSummary2 as branchSummary,
@@ -333,6 +333,11 @@ declare const RunRecordType: Type.TObject<{
333
333
  };
334
334
  }>>>;
335
335
  parked: Type.TReadonly<Type.TImmutable<Type.TArray<Type.TUnsafe<import("@nyte-ai/schema").Id<"call">>>>>;
336
+ interrupted: Type.TReadonly<Type.TOptional<Type.TObject<{
337
+ count: Type.TReadonly<Type.TNumber>;
338
+ mark: Type.TReadonly<Type.TString>;
339
+ }>>>;
340
+ requires: Type.TReadonly<Type.TOptional<Type.TImmutable<Type.TArray<Type.TString>>>>;
336
341
  }>;
337
342
  export type RunRecord = Static<typeof RunRecordType>;
338
343
  declare const PartRecordType: Type.TObject<{
@@ -991,7 +996,6 @@ declare const WorkspaceRecordType: Type.TObject<{
991
996
  }>, Type.TNull]>>;
992
997
  }>;
993
998
  export type WorkspaceRecord = Static<typeof WorkspaceRecordType>;
994
- /** The user's decision for one folder's project files, at `trust/<folder key>`; folders under it inherit it. */
995
999
  declare const TrustRecordType: Type.TObject<{
996
1000
  target: Type.TReadonly<Type.TUnsafe<{
997
1001
  readonly path: string;
@@ -1025,13 +1029,41 @@ declare const LeaseType: Type.TObject<{
1025
1029
  expiresAt: Type.TReadonly<Type.TNumber>;
1026
1030
  }>;
1027
1031
  type Lease = Static<typeof LeaseType>;
1032
+ declare const ProcessRecordType: Type.TObject<{
1033
+ instance: Type.TReadonly<Type.TString>;
1034
+ holder: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"host">>>;
1035
+ label: Type.TReadonly<Type.TString>;
1036
+ pid: Type.TReadonly<Type.TUnion<[Type.TNumber, Type.TNull]>>;
1037
+ capabilities: Type.TReadonly<Type.TImmutable<Type.TArray<Type.TString>>>;
1038
+ startedAt: Type.TReadonly<Type.TNumber>;
1039
+ }>;
1040
+ export type ProcessRecord = Static<typeof ProcessRecordType>;
1041
+ declare const JobRecordType: Type.TObject<{
1042
+ id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"job">>>;
1043
+ instance: Type.TReadonly<Type.TString>;
1044
+ workspace: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"workspace">>>;
1045
+ session: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"session">>>;
1046
+ head: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"head">>>;
1047
+ startedBy: Type.TReadonly<Type.TUnion<[Type.TUnsafe<import("@nyte-ai/schema").Id<"call">>, Type.TNull]>>;
1048
+ title: Type.TReadonly<Type.TString>;
1049
+ command: Type.TReadonly<Type.TString>;
1050
+ startedAt: Type.TReadonly<Type.TNumber>;
1051
+ end: Type.TReadonly<Type.TUnion<[Type.TUnsafe<{
1052
+ readonly code: number | null;
1053
+ readonly kind: "exited";
1054
+ readonly reason: "exited" | "terminated" | "expired" | "host-lost";
1055
+ } | {
1056
+ readonly kind: "lost";
1057
+ }>, Type.TNull]>>;
1058
+ endedAt: Type.TReadonly<Type.TUnion<[Type.TNumber, Type.TNull]>>;
1059
+ }>;
1060
+ export type JobRecord = Static<typeof JobRecordType>;
1028
1061
  declare const HostIdentityType: Type.TObject<{
1029
1062
  id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"host">>>;
1030
1063
  createdAt: Type.TReadonly<Type.TNumber>;
1031
1064
  }>;
1032
1065
  export type HostIdentity = Static<typeof HostIdentityType>;
1033
- export type RecordKind = "session" | "commit" | "inbox" | "run" | "part" | "receipt" | "seen" | "workspace" | "trust" | "lease" | "call" | "kv" | "principals" | "identity";
1034
- /** The schema of every stored record body by envelope kind, `kv` excepted since it holds any JSON. Old stores keep old bodies, so a change here must still decode them or come with a backfill. */
1066
+ export type RecordKind = "session" | "commit" | "inbox" | "run" | "part" | "receipt" | "seen" | "workspace" | "trust" | "lease" | "process" | "job" | "call" | "kv" | "principals" | "identity";
1035
1067
  export declare const STORED_RECORD_TYPES: {
1036
1068
  session: Type.TObject<{
1037
1069
  id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"session">>>;
@@ -1289,6 +1321,11 @@ export declare const STORED_RECORD_TYPES: {
1289
1321
  };
1290
1322
  }>>>;
1291
1323
  parked: Type.TReadonly<Type.TImmutable<Type.TArray<Type.TUnsafe<import("@nyte-ai/schema").Id<"call">>>>>;
1324
+ interrupted: Type.TReadonly<Type.TOptional<Type.TObject<{
1325
+ count: Type.TReadonly<Type.TNumber>;
1326
+ mark: Type.TReadonly<Type.TString>;
1327
+ }>>>;
1328
+ requires: Type.TReadonly<Type.TOptional<Type.TImmutable<Type.TArray<Type.TString>>>>;
1292
1329
  }>;
1293
1330
  part: Type.TObject<{
1294
1331
  id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"part">>>;
@@ -1536,6 +1573,33 @@ export declare const STORED_RECORD_TYPES: {
1536
1573
  instance: Type.TReadonly<Type.TString>;
1537
1574
  expiresAt: Type.TReadonly<Type.TNumber>;
1538
1575
  }>;
1576
+ process: Type.TObject<{
1577
+ instance: Type.TReadonly<Type.TString>;
1578
+ holder: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"host">>>;
1579
+ label: Type.TReadonly<Type.TString>;
1580
+ pid: Type.TReadonly<Type.TUnion<[Type.TNumber, Type.TNull]>>;
1581
+ capabilities: Type.TReadonly<Type.TImmutable<Type.TArray<Type.TString>>>;
1582
+ startedAt: Type.TReadonly<Type.TNumber>;
1583
+ }>;
1584
+ job: Type.TObject<{
1585
+ id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"job">>>;
1586
+ instance: Type.TReadonly<Type.TString>;
1587
+ workspace: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"workspace">>>;
1588
+ session: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"session">>>;
1589
+ head: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"head">>>;
1590
+ startedBy: Type.TReadonly<Type.TUnion<[Type.TUnsafe<import("@nyte-ai/schema").Id<"call">>, Type.TNull]>>;
1591
+ title: Type.TReadonly<Type.TString>;
1592
+ command: Type.TReadonly<Type.TString>;
1593
+ startedAt: Type.TReadonly<Type.TNumber>;
1594
+ end: Type.TReadonly<Type.TUnion<[Type.TUnsafe<{
1595
+ readonly code: number | null;
1596
+ readonly kind: "exited";
1597
+ readonly reason: "exited" | "terminated" | "expired" | "host-lost";
1598
+ } | {
1599
+ readonly kind: "lost";
1600
+ }>, Type.TNull]>>;
1601
+ endedAt: Type.TReadonly<Type.TUnion<[Type.TNumber, Type.TNull]>>;
1602
+ }>;
1539
1603
  call: Type.TObject<{
1540
1604
  id: Type.TReadonly<Type.TUnsafe<import("@nyte-ai/schema").Id<"call">>>;
1541
1605
  kind: Type.TReadonly<Type.TEnum<["tool", "action", "hook", "intent"]>>;
@@ -1990,6 +2054,8 @@ export declare const decodeTrustRecord: Decode<TrustRecord>;
1990
2054
  export declare const decodeCallRecord: Decode<CallRecord>;
1991
2055
  export declare const decodePrincipalRecord: Decode<PrincipalRecord>;
1992
2056
  export declare const decodeLease: Decode<Lease>;
2057
+ export declare const decodeProcessRecord: Decode<ProcessRecord>;
2058
+ export declare const decodeJobRecord: Decode<JobRecord>;
1993
2059
  export declare const decodeHostIdentity: Decode<HostIdentity>;
1994
2060
  export declare function decodeKvValue(object: Json | null): Json | undefined;
1995
2061
  export {};
@@ -13,19 +13,23 @@ import {
13
13
  decodeCallRecord2,
14
14
  decodePrincipalRecord2,
15
15
  decodeLease2,
16
+ decodeProcessRecord2,
17
+ decodeJobRecord2,
16
18
  decodeHostIdentity2,
17
19
  decodeKvValue2
18
- } from "../../chunks/compose-1jz2j92f.js";
20
+ } from "../../chunks/compose-gxjc6vz9.js";
19
21
  export {
20
22
  STORED_RECORD_TYPES2 as STORED_RECORD_TYPES,
21
23
  decodeCallRecord2 as decodeCallRecord,
22
24
  decodeCommitRecord2 as decodeCommitRecord,
23
25
  decodeHostIdentity2 as decodeHostIdentity,
24
26
  decodeInboxRecord2 as decodeInboxRecord,
27
+ decodeJobRecord2 as decodeJobRecord,
25
28
  decodeKvValue2 as decodeKvValue,
26
29
  decodeLease2 as decodeLease,
27
30
  decodePartRecord2 as decodePartRecord,
28
31
  decodePrincipalRecord2 as decodePrincipalRecord,
32
+ decodeProcessRecord2 as decodeProcessRecord,
29
33
  decodeReceiptRecord2 as decodeReceiptRecord,
30
34
  decodeRunRecord2 as decodeRunRecord,
31
35
  decodeSeenRecord2 as decodeSeenRecord,
@@ -80,7 +80,7 @@ export interface Sessions {
80
80
  readonly parents?: ParentFilter;
81
81
  readonly limit?: number;
82
82
  }): AsyncIterable<readonly SessionInfo[]>;
83
- /** Starts a chat with its first message. One commit creates the session and admits the message, so no session exists without one; until then a client holds a draft. `id` is minted when absent and names the chat, its first message and its receipt. Pass it to key a draft or to retry: the same id and input return the same start. Other input under that id, or an id naming an existing chat, is refused as invalid. Resolves once the session's before_send hooks decided the message. A refusal, a failing hook, or a stop before the decision removes the session and throws. */
83
+ /** Starts a chat with its first message. One commit creates the session and admits the message, so no session exists without one; until then a client holds a draft. A person's client's `configuration` is remembered as `Head.configure` remembers it. `id` is minted when absent and names the chat, its first message and its receipt. Pass it to key a draft or to retry: the same id and input return the same start. Other input under that id, or an id naming an existing chat, is refused as invalid. Resolves once the session's before_send hooks decided the message. A refusal, a failing hook, or a stop before the decision removes the session and throws. */
84
84
  start(input: {
85
85
  readonly id?: SessionId;
86
86
  readonly name?: string;
@@ -105,6 +105,7 @@ export interface Head {
105
105
  readonly sessionId: SessionId;
106
106
  readonly name: HeadName;
107
107
  send(content: UserContent, options?: SendOptions): Promise<SendReceipt>;
108
+ /** A model switch without a level lands on the new model's `defaultThinking`. From a person's client, not a tool call or plugin, an accepted model becomes the default and an accepted level its model's `defaultThinking`. */
108
109
  configure(patch: ConfigurationPatch): Promise<ConfigureOutcome>;
109
110
  view(options?: ViewOptions): Promise<SessionView>;
110
111
  watch(options?: ViewOptions): AsyncIterable<SessionView>;
@@ -1,7 +1,7 @@
1
1
  import type { Awaitable, CallId, HeadName, Json, RunId, Schema, ToolClass, ToolInfo, ToolOutcome, ToolProgress, ToolResult, WaitOutcome, WaitTarget } from "@nyte-ai/schema";
2
2
  import type { Connection } from "./host.ts";
3
3
  import type { Session } from "./session.ts";
4
- import type { ExecutionEnv, Workspace } from "./workspace.ts";
4
+ import type { ExecutionEnv, Job, Workspace } from "./workspace.ts";
5
5
  export interface ToolInvocation extends Durable {
6
6
  readonly run: RunId;
7
7
  readonly call: CallId;
@@ -12,6 +12,7 @@ export interface ToolInvocation extends Durable {
12
12
  readonly workspace: Workspace;
13
13
  readonly env: ExecutionEnv;
14
14
  progress(update: ToolProgress): void;
15
+ readonly foreground: ForegroundJobs;
15
16
  readonly tools: {
16
17
  execute(name: string, args: Json, options?: {
17
18
  readonly key?: string;
@@ -20,6 +21,14 @@ export interface ToolInvocation extends Durable {
20
21
  list(): readonly ToolInfo[];
21
22
  };
22
23
  }
24
+ export interface ForegroundJobs {
25
+ start(input: {
26
+ readonly command: string;
27
+ readonly title?: string;
28
+ }): Promise<Job>;
29
+ release(): boolean;
30
+ readonly released: AbortSignal;
31
+ }
23
32
  export interface Durable {
24
33
  wait(target: WaitTarget | {
25
34
  readonly kind: "any" | "all";