@qvac/core 0.0.0 → 0.1.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 (589) hide show
  1. package/LICENSE.md +198 -0
  2. package/NOTICE.md +13 -0
  3. package/README.md +694 -0
  4. package/SECURITY.md +6 -0
  5. package/dist/assistant.bundle +47257 -0
  6. package/dist/assistant.cjs +18 -0
  7. package/dist/assistant.d.ts +8 -0
  8. package/dist/prebuilds-manifest.json +380 -0
  9. package/dist-lib/client.d.ts +2 -0
  10. package/dist-lib/client.js +1 -0
  11. package/dist-lib/index.d.ts +13 -0
  12. package/dist-lib/index.js +10 -0
  13. package/dist-lib/lib/agent-icons.d.ts +3 -0
  14. package/dist-lib/lib/agent-icons.js +1 -0
  15. package/dist-lib/lib/api/agents.d.ts +5 -0
  16. package/dist-lib/lib/api/agents.js +38 -0
  17. package/dist-lib/lib/api/app-config.d.ts +5 -0
  18. package/dist-lib/lib/api/app-config.js +108 -0
  19. package/dist-lib/lib/api/approval-rules.d.ts +3 -0
  20. package/dist-lib/lib/api/approval-rules.js +9 -0
  21. package/dist-lib/lib/api/attachments.d.ts +8 -0
  22. package/dist-lib/lib/api/attachments.js +15 -0
  23. package/dist-lib/lib/api/chat-groups.d.ts +5 -0
  24. package/dist-lib/lib/api/chat-groups.js +12 -0
  25. package/dist-lib/lib/api/chat.d.ts +5 -0
  26. package/dist-lib/lib/api/chat.js +38 -0
  27. package/dist-lib/lib/api/chunks.d.ts +5 -0
  28. package/dist-lib/lib/api/chunks.js +61 -0
  29. package/dist-lib/lib/api/config.d.ts +5 -0
  30. package/dist-lib/lib/api/config.js +15 -0
  31. package/dist-lib/lib/api/current-mesh.d.ts +5 -0
  32. package/dist-lib/lib/api/current-mesh.js +12 -0
  33. package/dist-lib/lib/api/custom-models.d.ts +5 -0
  34. package/dist-lib/lib/api/custom-models.js +45 -0
  35. package/dist-lib/lib/api/devices.d.ts +8 -0
  36. package/dist-lib/lib/api/devices.js +125 -0
  37. package/dist-lib/lib/api/diagnostics.d.ts +7 -0
  38. package/dist-lib/lib/api/diagnostics.js +7 -0
  39. package/dist-lib/lib/api/effective-ctx-size.d.ts +2 -0
  40. package/dist-lib/lib/api/effective-ctx-size.js +10 -0
  41. package/dist-lib/lib/api/execution.d.ts +3 -0
  42. package/dist-lib/lib/api/execution.js +45 -0
  43. package/dist-lib/lib/api/files.d.ts +3 -0
  44. package/dist-lib/lib/api/files.js +48 -0
  45. package/dist-lib/lib/api/index.d.ts +62 -0
  46. package/dist-lib/lib/api/index.js +172 -0
  47. package/dist-lib/lib/api/instrument.d.ts +2 -0
  48. package/dist-lib/lib/api/instrument.js +86 -0
  49. package/dist-lib/lib/api/knowledge.d.ts +8 -0
  50. package/dist-lib/lib/api/knowledge.js +26 -0
  51. package/dist-lib/lib/api/logs.d.ts +14 -0
  52. package/dist-lib/lib/api/logs.js +116 -0
  53. package/dist-lib/lib/api/mesh.d.ts +13 -0
  54. package/dist-lib/lib/api/mesh.js +25 -0
  55. package/dist-lib/lib/api/model-download.d.ts +5 -0
  56. package/dist-lib/lib/api/model-download.js +47 -0
  57. package/dist-lib/lib/api/network.d.ts +8 -0
  58. package/dist-lib/lib/api/network.js +6 -0
  59. package/dist-lib/lib/api/notifications.d.ts +21 -0
  60. package/dist-lib/lib/api/notifications.js +108 -0
  61. package/dist-lib/lib/api/rag.d.ts +7 -0
  62. package/dist-lib/lib/api/rag.js +216 -0
  63. package/dist-lib/lib/api/sync.d.ts +3 -0
  64. package/dist-lib/lib/api/sync.js +6 -0
  65. package/dist-lib/lib/api/tool-activity.d.ts +5 -0
  66. package/dist-lib/lib/api/tool-activity.js +53 -0
  67. package/dist-lib/lib/api/tool-configs.d.ts +6 -0
  68. package/dist-lib/lib/api/tool-configs.js +27 -0
  69. package/dist-lib/lib/api/watchable.d.ts +12 -0
  70. package/dist-lib/lib/api/watchable.js +121 -0
  71. package/dist-lib/lib/assistant-client.d.ts +21 -0
  72. package/dist-lib/lib/assistant-client.js +52 -0
  73. package/dist-lib/lib/assistant-tree.d.ts +50 -0
  74. package/dist-lib/lib/assistant-tree.js +184 -0
  75. package/dist-lib/lib/assistant.d.ts +425 -0
  76. package/dist-lib/lib/assistant.js +2706 -0
  77. package/dist-lib/lib/audio-format.d.ts +4 -0
  78. package/dist-lib/lib/audio-format.js +4 -0
  79. package/dist-lib/lib/chat-title.d.ts +5 -0
  80. package/dist-lib/lib/chat-title.js +58 -0
  81. package/dist-lib/lib/client.d.ts +25 -0
  82. package/dist-lib/lib/client.js +53 -0
  83. package/dist-lib/lib/collabora/convert.d.ts +9 -0
  84. package/dist-lib/lib/collabora/convert.js +62 -0
  85. package/dist-lib/lib/collabora/entry.d.ts +1 -0
  86. package/dist-lib/lib/collabora/entry.js +44 -0
  87. package/dist-lib/lib/collabora/protocol.d.ts +15 -0
  88. package/dist-lib/lib/collabora/protocol.js +24 -0
  89. package/dist-lib/lib/collabora/worker.d.ts +5 -0
  90. package/dist-lib/lib/collabora/worker.js +111 -0
  91. package/dist-lib/lib/compaction.d.ts +30 -0
  92. package/dist-lib/lib/compaction.js +95 -0
  93. package/dist-lib/lib/constants.d.ts +4 -0
  94. package/dist-lib/lib/constants.js +4 -0
  95. package/dist-lib/lib/core/agent.d.ts +15 -0
  96. package/dist-lib/lib/core/agent.js +149 -0
  97. package/dist-lib/lib/core/app-build.d.ts +7 -0
  98. package/dist-lib/lib/core/app-build.js +1 -0
  99. package/dist-lib/lib/core/approval-rules.d.ts +15 -0
  100. package/dist-lib/lib/core/approval-rules.js +41 -0
  101. package/dist-lib/lib/core/async-iterable.d.ts +13 -0
  102. package/dist-lib/lib/core/async-iterable.js +65 -0
  103. package/dist-lib/lib/core/attachment-link.d.ts +7 -0
  104. package/dist-lib/lib/core/attachment-link.js +6 -0
  105. package/dist-lib/lib/core/audio-attachment.d.ts +1 -0
  106. package/dist-lib/lib/core/audio-attachment.js +4 -0
  107. package/dist-lib/lib/core/blind-peers.d.ts +6 -0
  108. package/dist-lib/lib/core/blind-peers.js +13 -0
  109. package/dist-lib/lib/core/chat-activity.d.ts +7 -0
  110. package/dist-lib/lib/core/chat-activity.js +244 -0
  111. package/dist-lib/lib/core/chat-group.d.ts +14 -0
  112. package/dist-lib/lib/core/chat-group.js +79 -0
  113. package/dist-lib/lib/core/chat-search.d.ts +17 -0
  114. package/dist-lib/lib/core/chat-search.js +199 -0
  115. package/dist-lib/lib/core/chat.d.ts +37 -0
  116. package/dist-lib/lib/core/chat.js +196 -0
  117. package/dist-lib/lib/core/chunk.d.ts +61 -0
  118. package/dist-lib/lib/core/chunk.js +212 -0
  119. package/dist-lib/lib/core/contract/activity.d.ts +11 -0
  120. package/dist-lib/lib/core/contract/activity.js +45 -0
  121. package/dist-lib/lib/core/contract/agents.d.ts +2 -0
  122. package/dist-lib/lib/core/contract/agents.js +29 -0
  123. package/dist-lib/lib/core/contract/approval-rules.d.ts +2 -0
  124. package/dist-lib/lib/core/contract/approval-rules.js +14 -0
  125. package/dist-lib/lib/core/contract/attestations.d.ts +2 -0
  126. package/dist-lib/lib/core/contract/attestations.js +14 -0
  127. package/dist-lib/lib/core/contract/chat-group.d.ts +2 -0
  128. package/dist-lib/lib/core/contract/chat-group.js +20 -0
  129. package/dist-lib/lib/core/contract/chat.d.ts +2 -0
  130. package/dist-lib/lib/core/contract/chat.js +18 -0
  131. package/dist-lib/lib/core/contract/chunks.d.ts +2 -0
  132. package/dist-lib/lib/core/contract/chunks.js +156 -0
  133. package/dist-lib/lib/core/contract/devices.d.ts +2 -0
  134. package/dist-lib/lib/core/contract/devices.js +110 -0
  135. package/dist-lib/lib/core/contract/index.d.ts +2 -0
  136. package/dist-lib/lib/core/contract/index.js +30 -0
  137. package/dist-lib/lib/core/contract/indexing.d.ts +4 -0
  138. package/dist-lib/lib/core/contract/indexing.js +82 -0
  139. package/dist-lib/lib/core/contract/knowledge.d.ts +2 -0
  140. package/dist-lib/lib/core/contract/knowledge.js +55 -0
  141. package/dist-lib/lib/core/contract/members.d.ts +2 -0
  142. package/dist-lib/lib/core/contract/members.js +96 -0
  143. package/dist-lib/lib/core/contract/seed-defaults.d.ts +2 -0
  144. package/dist-lib/lib/core/contract/seed-defaults.js +29 -0
  145. package/dist-lib/lib/core/contract/tool-activity.d.ts +2 -0
  146. package/dist-lib/lib/core/contract/tool-activity.js +25 -0
  147. package/dist-lib/lib/core/contract/tool-configs.d.ts +2 -0
  148. package/dist-lib/lib/core/contract/tool-configs.js +50 -0
  149. package/dist-lib/lib/core/contract/types.d.ts +11 -0
  150. package/dist-lib/lib/core/contract/types.js +1 -0
  151. package/dist-lib/lib/core/contract/writers.d.ts +2 -0
  152. package/dist-lib/lib/core/contract/writers.js +112 -0
  153. package/dist-lib/lib/core/cpu-info-node.d.ts +3 -0
  154. package/dist-lib/lib/core/cpu-info-node.js +2 -0
  155. package/dist-lib/lib/core/departures.d.ts +41 -0
  156. package/dist-lib/lib/core/departures.js +145 -0
  157. package/dist-lib/lib/core/device-attestation.d.ts +6 -0
  158. package/dist-lib/lib/core/device-attestation.js +12 -0
  159. package/dist-lib/lib/core/devices.d.ts +14 -0
  160. package/dist-lib/lib/core/devices.js +11 -0
  161. package/dist-lib/lib/core/document-attachment.d.ts +22 -0
  162. package/dist-lib/lib/core/document-attachment.js +35 -0
  163. package/dist-lib/lib/core/files/attachments.d.ts +8 -0
  164. package/dist-lib/lib/core/files/attachments.js +50 -0
  165. package/dist-lib/lib/core/files/index.d.ts +133 -0
  166. package/dist-lib/lib/core/files/index.js +585 -0
  167. package/dist-lib/lib/core/files/knowledge.d.ts +9 -0
  168. package/dist-lib/lib/core/files/knowledge.js +31 -0
  169. package/dist-lib/lib/core/files/preview/image.d.ts +4 -0
  170. package/dist-lib/lib/core/files/preview/image.js +42 -0
  171. package/dist-lib/lib/core/files/preview/index.d.ts +33 -0
  172. package/dist-lib/lib/core/files/preview/index.js +161 -0
  173. package/dist-lib/lib/core/files/processing/claims.d.ts +26 -0
  174. package/dist-lib/lib/core/files/processing/claims.js +89 -0
  175. package/dist-lib/lib/core/files/processing/document.d.ts +100 -0
  176. package/dist-lib/lib/core/files/processing/document.js +101 -0
  177. package/dist-lib/lib/core/files/processing/index.d.ts +75 -0
  178. package/dist-lib/lib/core/files/processing/index.js +295 -0
  179. package/dist-lib/lib/core/files/processing/ownership.d.ts +11 -0
  180. package/dist-lib/lib/core/files/processing/ownership.js +41 -0
  181. package/dist-lib/lib/core/files/processing/protocol.d.ts +29 -0
  182. package/dist-lib/lib/core/files/processing/protocol.js +70 -0
  183. package/dist-lib/lib/core/files/processing/settle.d.ts +10 -0
  184. package/dist-lib/lib/core/files/processing/settle.js +75 -0
  185. package/dist-lib/lib/core/files/processing/source.d.ts +36 -0
  186. package/dist-lib/lib/core/files/processing/source.js +96 -0
  187. package/dist-lib/lib/core/files/processing/state.d.ts +64 -0
  188. package/dist-lib/lib/core/files/processing/state.js +118 -0
  189. package/dist-lib/lib/core/files/rag/artifact/codec.d.ts +3 -0
  190. package/dist-lib/lib/core/files/rag/artifact/codec.js +172 -0
  191. package/dist-lib/lib/core/files/rag/artifact/id.d.ts +10 -0
  192. package/dist-lib/lib/core/files/rag/artifact/id.js +39 -0
  193. package/dist-lib/lib/core/files/rag/artifact/types.d.ts +24 -0
  194. package/dist-lib/lib/core/files/rag/artifact/types.js +41 -0
  195. package/dist-lib/lib/core/files/rag/build.d.ts +25 -0
  196. package/dist-lib/lib/core/files/rag/build.js +60 -0
  197. package/dist-lib/lib/core/files/rag/chunk/chunking.d.ts +12 -0
  198. package/dist-lib/lib/core/files/rag/chunk/chunking.js +117 -0
  199. package/dist-lib/lib/core/files/rag/chunk/metadata.d.ts +30 -0
  200. package/dist-lib/lib/core/files/rag/chunk/metadata.js +89 -0
  201. package/dist-lib/lib/core/files/rag/chunk/tokenizer.d.ts +7 -0
  202. package/dist-lib/lib/core/files/rag/chunk/tokenizer.js +18 -0
  203. package/dist-lib/lib/core/files/rag/document-types.d.ts +11 -0
  204. package/dist-lib/lib/core/files/rag/document-types.js +94 -0
  205. package/dist-lib/lib/core/files/rag/extract/csv-text.d.ts +1 -0
  206. package/dist-lib/lib/core/files/rag/extract/csv-text.js +117 -0
  207. package/dist-lib/lib/core/files/rag/extract/document-types.d.ts +22 -0
  208. package/dist-lib/lib/core/files/rag/extract/document-types.js +152 -0
  209. package/dist-lib/lib/core/files/rag/extract/extract.d.ts +17 -0
  210. package/dist-lib/lib/core/files/rag/extract/extract.js +81 -0
  211. package/dist-lib/lib/core/files/rag/extract/html-table-text.d.ts +1 -0
  212. package/dist-lib/lib/core/files/rag/extract/html-table-text.js +125 -0
  213. package/dist-lib/lib/core/files/rag/extract/html-text.d.ts +1 -0
  214. package/dist-lib/lib/core/files/rag/extract/html-text.js +132 -0
  215. package/dist-lib/lib/core/files/rag/extract/office-collabora.d.ts +2 -0
  216. package/dist-lib/lib/core/files/rag/extract/office-collabora.js +8 -0
  217. package/dist-lib/lib/core/files/rag/extract/pdf-platform.d.ts +17 -0
  218. package/dist-lib/lib/core/files/rag/extract/pdf-platform.js +141 -0
  219. package/dist-lib/lib/core/files/rag/extract/pdf-text.d.ts +12 -0
  220. package/dist-lib/lib/core/files/rag/extract/pdf-text.js +43 -0
  221. package/dist-lib/lib/core/files/rag/extract/rtf-text.d.ts +1 -0
  222. package/dist-lib/lib/core/files/rag/extract/rtf-text.js +15 -0
  223. package/dist-lib/lib/core/files/rag/extract/text-decoding.d.ts +1 -0
  224. package/dist-lib/lib/core/files/rag/extract/text-decoding.js +91 -0
  225. package/dist-lib/lib/core/files/rag/extract/types.d.ts +36 -0
  226. package/dist-lib/lib/core/files/rag/extract/types.js +12 -0
  227. package/dist-lib/lib/core/files/rag/extract/utf.d.ts +2 -0
  228. package/dist-lib/lib/core/files/rag/extract/utf.js +18 -0
  229. package/dist-lib/lib/core/files/rag/index.d.ts +54 -0
  230. package/dist-lib/lib/core/files/rag/index.js +79 -0
  231. package/dist-lib/lib/core/files/rag/limits.d.ts +2 -0
  232. package/dist-lib/lib/core/files/rag/limits.js +2 -0
  233. package/dist-lib/lib/core/files/rag/load.d.ts +28 -0
  234. package/dist-lib/lib/core/files/rag/load.js +250 -0
  235. package/dist-lib/lib/core/files/rag/models.d.ts +1 -0
  236. package/dist-lib/lib/core/files/rag/models.js +1 -0
  237. package/dist-lib/lib/core/files/rag/policy.d.ts +2 -0
  238. package/dist-lib/lib/core/files/rag/policy.js +23 -0
  239. package/dist-lib/lib/core/files/rag/produce.d.ts +21 -0
  240. package/dist-lib/lib/core/files/rag/produce.js +214 -0
  241. package/dist-lib/lib/core/files/rag/retrieval/citation-match.d.ts +2 -0
  242. package/dist-lib/lib/core/files/rag/retrieval/citation-match.js +16 -0
  243. package/dist-lib/lib/core/files/rag/retrieval/coverage.d.ts +4 -0
  244. package/dist-lib/lib/core/files/rag/retrieval/coverage.js +48 -0
  245. package/dist-lib/lib/core/files/rag/retrieval/diversity.d.ts +10 -0
  246. package/dist-lib/lib/core/files/rag/retrieval/diversity.js +37 -0
  247. package/dist-lib/lib/core/files/rag/retrieval/floor.d.ts +5 -0
  248. package/dist-lib/lib/core/files/rag/retrieval/floor.js +21 -0
  249. package/dist-lib/lib/core/files/rag/retrieval/format.d.ts +6 -0
  250. package/dist-lib/lib/core/files/rag/retrieval/format.js +21 -0
  251. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +22 -0
  252. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +137 -0
  253. package/dist-lib/lib/core/files/rag/retrieval/knowledge.d.ts +2 -0
  254. package/dist-lib/lib/core/files/rag/retrieval/knowledge.js +53 -0
  255. package/dist-lib/lib/core/files/rag/retrieval/notices.d.ts +16 -0
  256. package/dist-lib/lib/core/files/rag/retrieval/notices.js +27 -0
  257. package/dist-lib/lib/core/files/rag/retrieval/scoring.d.ts +8 -0
  258. package/dist-lib/lib/core/files/rag/retrieval/scoring.js +82 -0
  259. package/dist-lib/lib/core/files/rag/retrieval/search.d.ts +3 -0
  260. package/dist-lib/lib/core/files/rag/retrieval/search.js +46 -0
  261. package/dist-lib/lib/core/files/rag/retrieval/selection.d.ts +10 -0
  262. package/dist-lib/lib/core/files/rag/retrieval/selection.js +63 -0
  263. package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.d.ts +6 -0
  264. package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.js +79 -0
  265. package/dist-lib/lib/core/files/rag/retrieval/sources.d.ts +13 -0
  266. package/dist-lib/lib/core/files/rag/retrieval/sources.js +20 -0
  267. package/dist-lib/lib/core/files/rag/retrieval/target.d.ts +13 -0
  268. package/dist-lib/lib/core/files/rag/retrieval/target.js +89 -0
  269. package/dist-lib/lib/core/files/rag/retrieval/terms.d.ts +8 -0
  270. package/dist-lib/lib/core/files/rag/retrieval/terms.js +70 -0
  271. package/dist-lib/lib/core/files/rag/retrieval/types.d.ts +28 -0
  272. package/dist-lib/lib/core/files/rag/retrieval/types.js +1 -0
  273. package/dist-lib/lib/core/files/rag/retrieval/web-sources.d.ts +8 -0
  274. package/dist-lib/lib/core/files/rag/retrieval/web-sources.js +41 -0
  275. package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.d.ts +1 -0
  276. package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.js +96 -0
  277. package/dist-lib/lib/core/files/rag/vector/memory.d.ts +15 -0
  278. package/dist-lib/lib/core/files/rag/vector/memory.js +135 -0
  279. package/dist-lib/lib/core/files/rag/vector/types.d.ts +28 -0
  280. package/dist-lib/lib/core/files/rag/vector/types.js +1 -0
  281. package/dist-lib/lib/core/files/records/chunks.d.ts +3 -0
  282. package/dist-lib/lib/core/files/records/chunks.js +12 -0
  283. package/dist-lib/lib/core/files/records/index.d.ts +10 -0
  284. package/dist-lib/lib/core/files/records/index.js +8 -0
  285. package/dist-lib/lib/core/files/records/knowledge.d.ts +22 -0
  286. package/dist-lib/lib/core/files/records/knowledge.js +105 -0
  287. package/dist-lib/lib/core/files/records/linkage.d.ts +11 -0
  288. package/dist-lib/lib/core/files/records/linkage.js +27 -0
  289. package/dist-lib/lib/core/files/records/output.d.ts +8 -0
  290. package/dist-lib/lib/core/files/records/output.js +38 -0
  291. package/dist-lib/lib/core/files/records/reclaim.d.ts +5 -0
  292. package/dist-lib/lib/core/files/records/reclaim.js +73 -0
  293. package/dist-lib/lib/core/files/records/routing.d.ts +23 -0
  294. package/dist-lib/lib/core/files/records/routing.js +62 -0
  295. package/dist-lib/lib/core/files/records/source.d.ts +16 -0
  296. package/dist-lib/lib/core/files/records/source.js +70 -0
  297. package/dist-lib/lib/core/files/records/sweep.d.ts +2 -0
  298. package/dist-lib/lib/core/files/records/sweep.js +30 -0
  299. package/dist-lib/lib/core/files/store/blob.d.ts +29 -0
  300. package/dist-lib/lib/core/files/store/blob.js +98 -0
  301. package/dist-lib/lib/core/files/store/index.d.ts +36 -0
  302. package/dist-lib/lib/core/files/store/index.js +89 -0
  303. package/dist-lib/lib/core/files/store/inline.d.ts +8 -0
  304. package/dist-lib/lib/core/files/store/inline.js +38 -0
  305. package/dist-lib/lib/core/files/store/reference.d.ts +27 -0
  306. package/dist-lib/lib/core/files/store/reference.js +168 -0
  307. package/dist-lib/lib/core/files/store/server.d.ts +27 -0
  308. package/dist-lib/lib/core/files/store/server.js +114 -0
  309. package/dist-lib/lib/core/files/store/sweep.d.ts +2 -0
  310. package/dist-lib/lib/core/files/store/sweep.js +45 -0
  311. package/dist-lib/lib/core/files/upload-input.d.ts +27 -0
  312. package/dist-lib/lib/core/files/upload-input.js +52 -0
  313. package/dist-lib/lib/core/files/upload.d.ts +32 -0
  314. package/dist-lib/lib/core/files/upload.js +201 -0
  315. package/dist-lib/lib/core/fs-drives.d.ts +18 -0
  316. package/dist-lib/lib/core/fs-drives.js +58 -0
  317. package/dist-lib/lib/core/gpu-info-node.d.ts +3 -0
  318. package/dist-lib/lib/core/gpu-info-node.js +2 -0
  319. package/dist-lib/lib/core/handoff-channel.d.ts +46 -0
  320. package/dist-lib/lib/core/handoff-channel.js +102 -0
  321. package/dist-lib/lib/core/health-assistant.d.ts +7 -0
  322. package/dist-lib/lib/core/health-assistant.js +24 -0
  323. package/dist-lib/lib/core/helpers/index.d.ts +5 -0
  324. package/dist-lib/lib/core/helpers/index.js +74 -0
  325. package/dist-lib/lib/core/hosted-agents.d.ts +36 -0
  326. package/dist-lib/lib/core/hosted-agents.js +127 -0
  327. package/dist-lib/lib/core/id.d.ts +1 -0
  328. package/dist-lib/lib/core/id.js +5 -0
  329. package/dist-lib/lib/core/identity.d.ts +14 -0
  330. package/dist-lib/lib/core/identity.js +45 -0
  331. package/dist-lib/lib/core/image/cache-sweep.d.ts +12 -0
  332. package/dist-lib/lib/core/image/cache-sweep.js +67 -0
  333. package/dist-lib/lib/core/image/normalize.d.ts +3 -0
  334. package/dist-lib/lib/core/image/normalize.js +49 -0
  335. package/dist-lib/lib/core/image/sniff.d.ts +3 -0
  336. package/dist-lib/lib/core/image/sniff.js +149 -0
  337. package/dist-lib/lib/core/invite.d.ts +14 -0
  338. package/dist-lib/lib/core/invite.js +36 -0
  339. package/dist-lib/lib/core/local/index.d.ts +71 -0
  340. package/dist-lib/lib/core/local/index.js +391 -0
  341. package/dist-lib/lib/core/membership.d.ts +15 -0
  342. package/dist-lib/lib/core/membership.js +40 -0
  343. package/dist-lib/lib/core/mesh.d.ts +153 -0
  344. package/dist-lib/lib/core/mesh.js +509 -0
  345. package/dist-lib/lib/core/migrations/agent-catalog.d.ts +6 -0
  346. package/dist-lib/lib/core/migrations/agent-catalog.js +17 -0
  347. package/dist-lib/lib/core/migrations/index.d.ts +5 -0
  348. package/dist-lib/lib/core/migrations/index.js +7 -0
  349. package/dist-lib/lib/core/migrations/membership.d.ts +11 -0
  350. package/dist-lib/lib/core/migrations/membership.js +26 -0
  351. package/dist-lib/lib/core/min-version.d.ts +6 -0
  352. package/dist-lib/lib/core/min-version.js +31 -0
  353. package/dist-lib/lib/core/next-frame.d.ts +6 -0
  354. package/dist-lib/lib/core/next-frame.js +27 -0
  355. package/dist-lib/lib/core/notification.d.ts +6 -0
  356. package/dist-lib/lib/core/notification.js +162 -0
  357. package/dist-lib/lib/core/ota-config.d.ts +19 -0
  358. package/dist-lib/lib/core/ota-config.js +44 -0
  359. package/dist-lib/lib/core/prompt-history.d.ts +12 -0
  360. package/dist-lib/lib/core/prompt-history.js +40 -0
  361. package/dist-lib/lib/core/search-fold.d.ts +1 -0
  362. package/dist-lib/lib/core/search-fold.js +4 -0
  363. package/dist-lib/lib/core/secret-handoff.d.ts +17 -0
  364. package/dist-lib/lib/core/secret-handoff.js +29 -0
  365. package/dist-lib/lib/core/send.d.ts +18 -0
  366. package/dist-lib/lib/core/send.js +46 -0
  367. package/dist-lib/lib/core/skill-overlay-handoff.d.ts +25 -0
  368. package/dist-lib/lib/core/skill-overlay-handoff.js +50 -0
  369. package/dist-lib/lib/core/skill-overlay-receiver.d.ts +8 -0
  370. package/dist-lib/lib/core/skill-overlay-receiver.js +20 -0
  371. package/dist-lib/lib/core/skill-secrets.d.ts +25 -0
  372. package/dist-lib/lib/core/skill-secrets.js +79 -0
  373. package/dist-lib/lib/core/sync/chats.d.ts +3 -0
  374. package/dist-lib/lib/core/sync/chats.js +5 -0
  375. package/dist-lib/lib/core/sync/chunks.d.ts +9 -0
  376. package/dist-lib/lib/core/sync/chunks.js +16 -0
  377. package/dist-lib/lib/core/sync/devices.d.ts +4 -0
  378. package/dist-lib/lib/core/sync/devices.js +12 -0
  379. package/dist-lib/lib/core/sync/files.d.ts +16 -0
  380. package/dist-lib/lib/core/sync/files.js +109 -0
  381. package/dist-lib/lib/core/sync/index.d.ts +5 -0
  382. package/dist-lib/lib/core/sync/index.js +63 -0
  383. package/dist-lib/lib/core/sync-status.d.ts +17 -0
  384. package/dist-lib/lib/core/sync-status.js +129 -0
  385. package/dist-lib/lib/core/system-info.d.ts +24 -0
  386. package/dist-lib/lib/core/system-info.js +66 -0
  387. package/dist-lib/lib/core/tool-activity.d.ts +22 -0
  388. package/dist-lib/lib/core/tool-activity.js +39 -0
  389. package/dist-lib/lib/core/tool-configs.d.ts +13 -0
  390. package/dist-lib/lib/core/tool-configs.js +141 -0
  391. package/dist-lib/lib/core.d.ts +291 -0
  392. package/dist-lib/lib/core.js +2126 -0
  393. package/dist-lib/lib/credential-pusher.d.ts +67 -0
  394. package/dist-lib/lib/credential-pusher.js +290 -0
  395. package/dist-lib/lib/custom-model-pusher.d.ts +9 -0
  396. package/dist-lib/lib/custom-model-pusher.js +42 -0
  397. package/dist-lib/lib/custom-model-source.d.ts +15 -0
  398. package/dist-lib/lib/custom-model-source.js +46 -0
  399. package/dist-lib/lib/deadline.d.ts +9 -0
  400. package/dist-lib/lib/deadline.js +31 -0
  401. package/dist-lib/lib/diagnostics.d.ts +35 -0
  402. package/dist-lib/lib/diagnostics.js +14 -0
  403. package/dist-lib/lib/fetch-node.d.ts +1 -0
  404. package/dist-lib/lib/fetch-node.js +1 -0
  405. package/dist-lib/lib/fs-drive-bridge.d.ts +12 -0
  406. package/dist-lib/lib/fs-drive-bridge.js +186 -0
  407. package/dist-lib/lib/fs-grant-keys.d.ts +2 -0
  408. package/dist-lib/lib/fs-grant-keys.js +6 -0
  409. package/dist-lib/lib/fs-grants.d.ts +10 -0
  410. package/dist-lib/lib/fs-grants.js +44 -0
  411. package/dist-lib/lib/image-cache-dir.d.ts +1 -0
  412. package/dist-lib/lib/image-cache-dir.js +5 -0
  413. package/dist-lib/lib/integrations/index.d.ts +4 -0
  414. package/dist-lib/lib/integrations/index.js +3 -0
  415. package/dist-lib/lib/integrations/mcp-providers.d.ts +12 -0
  416. package/dist-lib/lib/integrations/mcp-providers.js +22 -0
  417. package/dist-lib/lib/integrations/oauth-providers.d.ts +14 -0
  418. package/dist-lib/lib/integrations/oauth-providers.js +116 -0
  419. package/dist-lib/lib/integrations/setup-routes.d.ts +12 -0
  420. package/dist-lib/lib/integrations/setup-routes.js +114 -0
  421. package/dist-lib/lib/knowledge-search.d.ts +7 -0
  422. package/dist-lib/lib/knowledge-search.js +53 -0
  423. package/dist-lib/lib/kv-cache-reclaim.d.ts +5 -0
  424. package/dist-lib/lib/kv-cache-reclaim.js +29 -0
  425. package/dist-lib/lib/kv-cache.d.ts +18 -0
  426. package/dist-lib/lib/kv-cache.js +33 -0
  427. package/dist-lib/lib/legacy-core-domain.d.ts +258 -0
  428. package/dist-lib/lib/legacy-core-domain.js +1 -0
  429. package/dist-lib/lib/llm-model-names.d.ts +1 -0
  430. package/dist-lib/lib/llm-model-names.js +1 -0
  431. package/dist-lib/lib/log-buffer.d.ts +7 -0
  432. package/dist-lib/lib/log-buffer.js +16 -0
  433. package/dist-lib/lib/log-levels.d.ts +7 -0
  434. package/dist-lib/lib/log-levels.js +1 -0
  435. package/dist-lib/lib/log.d.ts +60 -0
  436. package/dist-lib/lib/log.js +149 -0
  437. package/dist-lib/lib/logger-type.d.ts +13 -0
  438. package/dist-lib/lib/logger-type.js +1 -0
  439. package/dist-lib/lib/logger.d.ts +5 -0
  440. package/dist-lib/lib/logger.js +18 -0
  441. package/dist-lib/lib/model-catalog-revision.d.ts +9 -0
  442. package/dist-lib/lib/model-catalog-revision.js +65 -0
  443. package/dist-lib/lib/model-clamp.d.ts +6 -0
  444. package/dist-lib/lib/model-clamp.js +20 -0
  445. package/dist-lib/lib/model-context.d.ts +13 -0
  446. package/dist-lib/lib/model-context.js +71 -0
  447. package/dist-lib/lib/model-download-status.d.ts +29 -0
  448. package/dist-lib/lib/model-download-status.js +56 -0
  449. package/dist-lib/lib/model-download.d.ts +191 -0
  450. package/dist-lib/lib/model-download.js +787 -0
  451. package/dist-lib/lib/oauth/asana.d.ts +35 -0
  452. package/dist-lib/lib/oauth/asana.js +71 -0
  453. package/dist-lib/lib/oauth/browser-connect.d.ts +22 -0
  454. package/dist-lib/lib/oauth/browser-connect.js +83 -0
  455. package/dist-lib/lib/oauth/client.d.ts +9 -0
  456. package/dist-lib/lib/oauth/client.js +9 -0
  457. package/dist-lib/lib/oauth/common.d.ts +38 -0
  458. package/dist-lib/lib/oauth/common.js +36 -0
  459. package/dist-lib/lib/oauth/crypto.d.ts +3 -0
  460. package/dist-lib/lib/oauth/crypto.js +25 -0
  461. package/dist-lib/lib/oauth/fetch-platform.d.ts +1 -0
  462. package/dist-lib/lib/oauth/fetch-platform.js +1 -0
  463. package/dist-lib/lib/oauth/flow-core.d.ts +6 -0
  464. package/dist-lib/lib/oauth/flow-core.js +37 -0
  465. package/dist-lib/lib/oauth/flow.d.ts +3 -0
  466. package/dist-lib/lib/oauth/flow.js +24 -0
  467. package/dist-lib/lib/oauth/google.d.ts +37 -0
  468. package/dist-lib/lib/oauth/google.js +77 -0
  469. package/dist-lib/lib/oauth/host.d.ts +5 -0
  470. package/dist-lib/lib/oauth/host.js +3 -0
  471. package/dist-lib/lib/oauth/keys.d.ts +25 -0
  472. package/dist-lib/lib/oauth/keys.js +93 -0
  473. package/dist-lib/lib/oauth/loopback.d.ts +3 -0
  474. package/dist-lib/lib/oauth/loopback.js +119 -0
  475. package/dist-lib/lib/oauth/loopback.stub.d.ts +3 -0
  476. package/dist-lib/lib/oauth/loopback.stub.js +6 -0
  477. package/dist-lib/lib/oauth/notion.d.ts +34 -0
  478. package/dist-lib/lib/oauth/notion.js +82 -0
  479. package/dist-lib/lib/oauth/pkce-runtime.d.ts +3 -0
  480. package/dist-lib/lib/oauth/pkce-runtime.js +5 -0
  481. package/dist-lib/lib/oauth/pkce.d.ts +8 -0
  482. package/dist-lib/lib/oauth/pkce.js +6 -0
  483. package/dist-lib/lib/oauth/providers.d.ts +5 -0
  484. package/dist-lib/lib/oauth/providers.js +73 -0
  485. package/dist-lib/lib/oauth/redirect-types.d.ts +19 -0
  486. package/dist-lib/lib/oauth/redirect-types.js +1 -0
  487. package/dist-lib/lib/oauth/register.d.ts +3 -0
  488. package/dist-lib/lib/oauth/register.js +34 -0
  489. package/dist-lib/lib/oauth/resolve.d.ts +17 -0
  490. package/dist-lib/lib/oauth/resolve.js +57 -0
  491. package/dist-lib/lib/oauth/spotify.d.ts +32 -0
  492. package/dist-lib/lib/oauth/spotify.js +73 -0
  493. package/dist-lib/lib/oauth/token-exchange-core.d.ts +6 -0
  494. package/dist-lib/lib/oauth/token-exchange-core.js +97 -0
  495. package/dist-lib/lib/oauth/token-exchange.d.ts +5 -0
  496. package/dist-lib/lib/oauth/token-exchange.js +9 -0
  497. package/dist-lib/lib/oauth/types.d.ts +54 -0
  498. package/dist-lib/lib/oauth/types.js +1 -0
  499. package/dist-lib/lib/oauth.client.d.ts +5 -0
  500. package/dist-lib/lib/oauth.client.js +2 -0
  501. package/dist-lib/lib/oauth.d.ts +14 -0
  502. package/dist-lib/lib/oauth.js +12 -0
  503. package/dist-lib/lib/obsidian-key.d.ts +1 -0
  504. package/dist-lib/lib/obsidian-key.js +1 -0
  505. package/dist-lib/lib/race-resource.d.ts +5 -0
  506. package/dist-lib/lib/race-resource.js +25 -0
  507. package/dist-lib/lib/reconnecting-watch.d.ts +2 -0
  508. package/dist-lib/lib/reconnecting-watch.js +78 -0
  509. package/dist-lib/lib/retry-budget.d.ts +14 -0
  510. package/dist-lib/lib/retry-budget.js +39 -0
  511. package/dist-lib/lib/run-notices.d.ts +23 -0
  512. package/dist-lib/lib/run-notices.js +33 -0
  513. package/dist-lib/lib/run-transcript.d.ts +35 -0
  514. package/dist-lib/lib/run-transcript.js +106 -0
  515. package/dist-lib/lib/skill-readiness.d.ts +2 -0
  516. package/dist-lib/lib/skill-readiness.js +21 -0
  517. package/dist-lib/lib/skill-types.d.ts +70 -0
  518. package/dist-lib/lib/skill-types.js +1 -0
  519. package/dist-lib/lib/spec-loader.d.ts +14 -0
  520. package/dist-lib/lib/spec-loader.js +9 -0
  521. package/dist-lib/lib/suspend-lifecycle.d.ts +17 -0
  522. package/dist-lib/lib/suspend-lifecycle.js +33 -0
  523. package/dist-lib/lib/task.d.ts +26 -0
  524. package/dist-lib/lib/task.js +69 -0
  525. package/dist-lib/lib/unref.d.ts +3 -0
  526. package/dist-lib/lib/unref.js +4 -0
  527. package/dist-lib/lib/wav-duration.d.ts +1 -0
  528. package/dist-lib/lib/wav-duration.js +53 -0
  529. package/dist-lib/lib/write-queue.d.ts +22 -0
  530. package/dist-lib/lib/write-queue.js +39 -0
  531. package/dist-lib/schema/build.d.ts +1 -0
  532. package/dist-lib/schema/build.js +120 -0
  533. package/dist-lib/schema/config.d.ts +4 -0
  534. package/dist-lib/schema/config.js +7 -0
  535. package/dist-lib/schema/content.d.ts +20 -0
  536. package/dist-lib/schema/content.js +122 -0
  537. package/dist-lib/schema/engine.d.ts +2 -0
  538. package/dist-lib/schema/engine.js +2013 -0
  539. package/dist-lib/schema/field-order.d.ts +1 -0
  540. package/dist-lib/schema/field-order.js +95 -0
  541. package/dist-lib/schema/helpers.d.ts +28 -0
  542. package/dist-lib/schema/helpers.js +176 -0
  543. package/dist-lib/schema/local.d.ts +2 -0
  544. package/dist-lib/schema/local.js +133 -0
  545. package/dist-lib/schema/qvac.d.ts +22 -0
  546. package/dist-lib/schema/qvac.js +722 -0
  547. package/dist-lib/schema/vendor.d.ts +5 -0
  548. package/dist-lib/spec/bind.d.ts +2 -0
  549. package/dist-lib/spec/bind.js +520 -0
  550. package/dist-lib/spec/calls.d.ts +3 -0
  551. package/dist-lib/spec/calls.js +129 -0
  552. package/dist-lib/spec/capabilities.d.ts +263 -0
  553. package/dist-lib/spec/config/hyperconf/index.d.ts +15 -0
  554. package/dist-lib/spec/config/hyperconf/index.js +24 -0
  555. package/dist-lib/spec/config/hyperconf/package.json +3 -0
  556. package/dist-lib/spec/config/hyperschema/index.js +81 -0
  557. package/dist-lib/spec/config/hyperschema/schema.json +19 -0
  558. package/dist-lib/spec/hrpc/hrpc.json +1500 -0
  559. package/dist-lib/spec/hrpc/index.d.ts +3 -0
  560. package/dist-lib/spec/hrpc/index.js +1545 -0
  561. package/dist-lib/spec/hrpc/messages.d.ts +4 -0
  562. package/dist-lib/spec/hrpc/messages.js +8373 -0
  563. package/dist-lib/spec/hyperschema/index.d.ts +20 -0
  564. package/dist-lib/spec/hyperschema/index.js +8373 -0
  565. package/dist-lib/spec/hyperschema/schema.json +6202 -0
  566. package/dist-lib/spec/hyperschema/types.d.ts +1545 -0
  567. package/dist-lib/spec/index.d.ts +36 -0
  568. package/dist-lib/spec/index.js +6 -0
  569. package/dist-lib/spec/local/hyperdb/db.json +186 -0
  570. package/dist-lib/spec/local/hyperdb/index.d.ts +9 -0
  571. package/dist-lib/spec/local/hyperdb/index.js +855 -0
  572. package/dist-lib/spec/local/hyperdb/messages.js +2189 -0
  573. package/dist-lib/spec/local/hyperschema/index.js +1208 -0
  574. package/dist-lib/spec/local/hyperschema/schema.json +639 -0
  575. package/dist-lib/spec/local/hyperschema/types.d.ts +159 -0
  576. package/dist-lib/spec/mesh/hyperdb/db.json +702 -0
  577. package/dist-lib/spec/mesh/hyperdb/index.d.ts +9 -0
  578. package/dist-lib/spec/mesh/hyperdb/index.js +2260 -0
  579. package/dist-lib/spec/mesh/hyperdb/messages.js +7453 -0
  580. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +174 -0
  581. package/dist-lib/spec/mesh/hyperdispatch/index.d.ts +13 -0
  582. package/dist-lib/spec/mesh/hyperdispatch/index.js +566 -0
  583. package/dist-lib/spec/mesh/hyperdispatch/messages.js +5713 -0
  584. package/dist-lib/spec/mesh/hyperschema/index.d.ts +14 -0
  585. package/dist-lib/spec/mesh/hyperschema/index.js +5713 -0
  586. package/dist-lib/spec/mesh/hyperschema/schema.json +3142 -0
  587. package/dist-lib/spec/mesh/hyperschema/types.d.ts +754 -0
  588. package/ducks.png +0 -0
  589. package/package.json +336 -1
@@ -0,0 +1,106 @@
1
+ import { WriteQueue } from "./write-queue.js";
2
+ const COALESCE_CAP = 8192;
3
+ const FLUSH_INTERVAL_MS = 250;
4
+ const SLOW_WRITE_MS = 5000;
5
+ const TRANSCRIPT = 'transcript';
6
+ const STATUS = 'status';
7
+ export class RunTranscript {
8
+ _engine;
9
+ _chatId;
10
+ _runId;
11
+ _deviceId;
12
+ _model;
13
+ _log;
14
+ _writes;
15
+ _ticker;
16
+ _announced = new Set();
17
+ _buffered = null;
18
+ constructor(engine, { chatId, runId, deviceId, model, log }) {
19
+ this._engine = engine;
20
+ this._chatId = chatId;
21
+ this._runId = runId;
22
+ this._deviceId = deviceId;
23
+ this._model = model;
24
+ this._log = log ?? null;
25
+ this._writes = new WriteQueue({
26
+ slowMs: SLOW_WRITE_MS,
27
+ onSlow: (info) => this._log?.warn('runs', 'write still pending', { runId, ...info })
28
+ });
29
+ this._ticker = setInterval(() => {
30
+ this.flush().catch((err) => this._log?.error('assistant', 'content flush failed', err));
31
+ }, FLUSH_INTERVAL_MS);
32
+ }
33
+ async text(type, text) {
34
+ if (this._buffered && this._buffered.type !== type)
35
+ await this.flush();
36
+ if (!this._buffered) {
37
+ this._buffered = { type, text: '' };
38
+ this._announce(type);
39
+ }
40
+ this._buffered.text += text;
41
+ if (this._buffered.text.length >= COALESCE_CAP)
42
+ await this.flush();
43
+ }
44
+ chunk(chunk) {
45
+ return this._writes.run(TRANSCRIPT, `append:${chunk.type}`, () => this._engine.appendChunk({
46
+ chatId: this._chatId,
47
+ runId: this._runId,
48
+ originDeviceId: this._deviceId,
49
+ ...chunk
50
+ }));
51
+ }
52
+ status(runStatus) {
53
+ this._log?.info('runs', `run ${runStatus.state}`, {
54
+ runId: this._runId,
55
+ chatId: this._chatId,
56
+ reason: runStatus.reason || undefined
57
+ });
58
+ return this._writes.run(STATUS, `status:${runStatus.state}`, () => this._engine.appendChunk({
59
+ chatId: this._chatId,
60
+ runId: this._runId,
61
+ type: 'run-status',
62
+ runStatus: { ...runStatus, model: this._model },
63
+ originDeviceId: this._deviceId
64
+ }));
65
+ }
66
+ progress(id, runStatus) {
67
+ return this._writes.run(TRANSCRIPT, 'update:run-status', () => this._engine.updateChunk({ id, runStatus: { ...runStatus, model: this._model } }));
68
+ }
69
+ flush() {
70
+ return this._writes.run(TRANSCRIPT, 'append:text', async () => {
71
+ if (!this._buffered)
72
+ return;
73
+ const { type, text } = this._buffered;
74
+ this._buffered = null;
75
+ const started = Date.now();
76
+ await this._engine.appendChunk({
77
+ chatId: this._chatId,
78
+ runId: this._runId,
79
+ type,
80
+ content: type === 'content' ? { text } : null,
81
+ thinking: type === 'thinking' ? { text } : null,
82
+ originDeviceId: this._deviceId
83
+ });
84
+ const ms = Date.now() - started;
85
+ if (ms > FLUSH_INTERVAL_MS) {
86
+ this._log?.warn('runs', 'slow content flush', {
87
+ runId: this._runId,
88
+ ms,
89
+ chars: text.length
90
+ });
91
+ }
92
+ });
93
+ }
94
+ pending() {
95
+ return this._writes.pending();
96
+ }
97
+ close() {
98
+ clearInterval(this._ticker);
99
+ }
100
+ _announce(type) {
101
+ if (this._announced.has(type))
102
+ return;
103
+ this._announced.add(type);
104
+ this._log?.info('runs', `${type} started`, { runId: this._runId });
105
+ }
106
+ }
@@ -0,0 +1,2 @@
1
+ export declare function encodeAgentSkillReadiness(agentId: string, readySkillNames: ReadonlyArray<string>): string[];
2
+ export declare function agentReadySkillNames(reported: ReadonlyArray<string> | null | undefined, agentId: string | null | undefined): ReadonlyArray<string> | null;
@@ -0,0 +1,21 @@
1
+ const AGENT_PREFIX = '\0agent-skill-readiness\0';
2
+ function prefix(agentId) {
3
+ return `${AGENT_PREFIX}${agentId}\0`;
4
+ }
5
+ export function encodeAgentSkillReadiness(agentId, readySkillNames) {
6
+ const scoped = prefix(agentId);
7
+ return [scoped, ...readySkillNames.map((name) => `${scoped}${name}`)];
8
+ }
9
+ export function agentReadySkillNames(reported, agentId) {
10
+ if (reported === null || reported === undefined)
11
+ return null;
12
+ const unscoped = reported.filter((name) => !name.startsWith(AGENT_PREFIX));
13
+ if (!agentId || !reported.some((name) => name.startsWith(AGENT_PREFIX)))
14
+ return unscoped;
15
+ const scoped = prefix(agentId);
16
+ if (!reported.includes(scoped))
17
+ return unscoped;
18
+ return reported
19
+ .filter((name) => name !== scoped && name.startsWith(scoped))
20
+ .map((name) => name.slice(scoped.length));
21
+ }
@@ -0,0 +1,70 @@
1
+ export type CapabilityProfile = 'tiny' | 'low' | 'mid' | 'high' | 'xhigh';
2
+ export type SkillState = 'ready' | 'needs-setup' | 'failed' | 'disabled' | 'disconnected' | 'outdated' | 'incompatible-model' | 'unsupported';
3
+ export type InstallStep = {
4
+ readonly id: string;
5
+ readonly kind: string;
6
+ readonly formula?: string | undefined;
7
+ readonly bins?: ReadonlyArray<string> | undefined;
8
+ readonly label: string;
9
+ readonly command?: string | undefined;
10
+ readonly manual?: boolean | undefined;
11
+ };
12
+ export type SkillTransport = {
13
+ readonly credentialKey: string;
14
+ readonly name: string;
15
+ readonly directive: string;
16
+ };
17
+ export type SkillSetupField = {
18
+ readonly key: string;
19
+ readonly label: string;
20
+ readonly placeholder?: string | undefined;
21
+ readonly secret?: boolean | undefined;
22
+ readonly required?: boolean | undefined;
23
+ };
24
+ export type SkillSetupRoute = {
25
+ readonly kind: 'oauth' | 'token' | 'install' | 'picker' | 'instructions';
26
+ readonly label: string;
27
+ readonly provider?: string | undefined;
28
+ readonly credentialKey?: string | undefined;
29
+ readonly description?: string | undefined;
30
+ readonly helpUrl?: string | undefined;
31
+ readonly steps?: ReadonlyArray<string> | undefined;
32
+ readonly configSteps?: ReadonlyArray<string> | undefined;
33
+ readonly fields?: ReadonlyArray<SkillSetupField> | undefined;
34
+ readonly satisfied?: boolean | undefined;
35
+ };
36
+ export type SkillSetup = {
37
+ readonly summary?: string | undefined;
38
+ readonly routes?: ReadonlyArray<SkillSetupRoute> | undefined;
39
+ };
40
+ export type SkillMetadata = {
41
+ readonly name: string;
42
+ readonly description: string;
43
+ readonly os?: ReadonlyArray<string> | undefined;
44
+ readonly requires?: {
45
+ readonly bins?: ReadonlyArray<string> | undefined;
46
+ readonly credentials?: ReadonlyArray<string> | undefined;
47
+ readonly binMinVersions?: Readonly<Record<string, {
48
+ readonly min: string;
49
+ readonly command?: string | undefined;
50
+ }>> | undefined;
51
+ readonly credentialChecks?: Readonly<Record<string, {
52
+ readonly url: string;
53
+ readonly method?: string | undefined;
54
+ readonly headers?: Readonly<Record<string, string>> | undefined;
55
+ }>> | undefined;
56
+ } | undefined;
57
+ readonly transports?: ReadonlyArray<SkillTransport> | undefined;
58
+ readonly install?: ReadonlyArray<InstallStep> | undefined;
59
+ readonly surfaceWhenUnsupported?: boolean | undefined;
60
+ readonly setup?: SkillSetup | undefined;
61
+ readonly stub?: boolean | undefined;
62
+ readonly tools?: ReadonlyArray<string> | undefined;
63
+ readonly minCapabilityProfile?: CapabilityProfile | undefined;
64
+ };
65
+ export type SkillEntry = {
66
+ readonly metadata: SkillMetadata;
67
+ readonly content: string;
68
+ readonly available: boolean;
69
+ readonly state: SkillState;
70
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { bindApi } from '../spec/bind.js';
2
+ import { engineClient } from '../spec/calls.js';
3
+ import DefaultHRPC from '../spec/hrpc/index.js';
4
+ export interface CoreSpec {
5
+ bindApi: typeof bindApi;
6
+ HRPC: typeof DefaultHRPC;
7
+ }
8
+ export interface EngineSpec {
9
+ engineClient: typeof engineClient;
10
+ bindApi: typeof bindApi;
11
+ HRPC: typeof DefaultHRPC;
12
+ }
13
+ export declare function openLocalSpec(): Promise<CoreSpec>;
14
+ export declare function openLocalEngineSpec(): Promise<EngineSpec>;
@@ -0,0 +1,9 @@
1
+ import { bindApi } from '../spec/bind.js';
2
+ import { engineClient } from '../spec/calls.js';
3
+ import DefaultHRPC from '../spec/hrpc/index.js';
4
+ export async function openLocalSpec() {
5
+ return { bindApi, HRPC: DefaultHRPC };
6
+ }
7
+ export async function openLocalEngineSpec() {
8
+ return { engineClient, bindApi, HRPC: DefaultHRPC };
9
+ }
@@ -0,0 +1,17 @@
1
+ import Suspendify from 'suspendify';
2
+ export declare const ASSISTANT_WAKEUP_LINGER_MS = 6000;
3
+ type LifecycleSupervisor = {
4
+ readonly opened: boolean;
5
+ ready(): Promise<void>;
6
+ presuspend(): Promise<void>;
7
+ suspend(): Promise<void>;
8
+ wakeup(): Promise<void>;
9
+ resume(): Promise<void>;
10
+ };
11
+ export type AssistantSuspendLifecycleOptions = {
12
+ readonly wakeupLinger?: number;
13
+ readonly pollLinger?: () => Promise<number> | number;
14
+ readonly onSuspended?: () => void;
15
+ };
16
+ export declare function createAssistantSuspendLifecycle(supervisor: LifecycleSupervisor, options?: AssistantSuspendLifecycleOptions): Suspendify;
17
+ export {};
@@ -0,0 +1,33 @@
1
+ import Suspendify from 'suspendify';
2
+ export const ASSISTANT_WAKEUP_LINGER_MS = 6_000;
3
+ export function createAssistantSuspendLifecycle(supervisor, options = {}) {
4
+ const { wakeupLinger = ASSISTANT_WAKEUP_LINGER_MS, pollLinger, onSuspended = noop } = options;
5
+ const lifecycle = new Suspendify({
6
+ wakeupLinger,
7
+ pollLinger,
8
+ presuspend: async () => {
9
+ if (!supervisor.opened)
10
+ await supervisor.ready();
11
+ await supervisor.presuspend();
12
+ },
13
+ suspend: async () => {
14
+ if (!supervisor.opened)
15
+ await supervisor.ready();
16
+ await supervisor.suspend();
17
+ if (!lifecycle.interrupted)
18
+ onSuspended();
19
+ },
20
+ wakeup: async () => {
21
+ if (!supervisor.opened)
22
+ await supervisor.ready();
23
+ await supervisor.wakeup();
24
+ },
25
+ resume: async () => {
26
+ if (!supervisor.opened)
27
+ await supervisor.ready();
28
+ await supervisor.resume();
29
+ }
30
+ });
31
+ return lifecycle;
32
+ }
33
+ function noop() { }
@@ -0,0 +1,26 @@
1
+ import type { Capabilities } from '../spec/capabilities.d.ts';
2
+ import type { AssistantChunk, AssistantChunkContentAttachment, AssistantRagSource, AssistantRunState } from '../spec/hyperschema/types.d.ts';
3
+ export type TaskEngine = Pick<Capabilities, 'chunksWatch' | 'sendMessage'>;
4
+ export interface TaskRequest {
5
+ readonly agentId: string;
6
+ readonly prompt: string;
7
+ readonly chatId?: string;
8
+ readonly skill?: string;
9
+ }
10
+ export interface TaskToolCall {
11
+ readonly name: string;
12
+ readonly arguments: unknown;
13
+ }
14
+ export interface TaskResult {
15
+ readonly chatId: string;
16
+ readonly runId: string;
17
+ readonly state: AssistantRunState;
18
+ readonly text: string;
19
+ readonly thinking: string;
20
+ readonly toolCalls: ReadonlyArray<TaskToolCall>;
21
+ readonly attachments: ReadonlyArray<AssistantChunkContentAttachment>;
22
+ readonly sources: ReadonlyArray<AssistantRagSource>;
23
+ readonly reason: string | null;
24
+ readonly chunks: ReadonlyArray<AssistantChunk>;
25
+ }
26
+ export declare function runTask(engine: TaskEngine, request: TaskRequest): Promise<TaskResult>;
@@ -0,0 +1,69 @@
1
+ const TERMINAL_STATES = new Set(['completed', 'failed', 'canceled']);
2
+ const TITLE_CHARS = 60;
3
+ export async function runTask(engine, request) {
4
+ const { agentId, prompt, skill } = request;
5
+ const text = skill ? `@${skill} ${prompt}` : prompt;
6
+ const { chatId, runId } = await engine.sendMessage({
7
+ text,
8
+ agentId,
9
+ chatId: request.chatId ?? null,
10
+ title: request.chatId ? null : title(prompt)
11
+ });
12
+ for await (const frame of engine.chunksWatch({ chatId })) {
13
+ const chunks = frame.chunks ?? [];
14
+ const state = terminalState(chunks, runId);
15
+ if (state)
16
+ return collect(chatId, runId, state, chunks);
17
+ }
18
+ throw new Error(`chunk stream ended before the run settled: ${chatId}`);
19
+ }
20
+ function terminalState(chunks, runId) {
21
+ for (const chunk of chunks) {
22
+ const state = chunk.runId === runId ? chunk.runStatus?.state : undefined;
23
+ if (state && TERMINAL_STATES.has(state))
24
+ return state;
25
+ }
26
+ return null;
27
+ }
28
+ function collect(chatId, runId, state, all) {
29
+ const chunks = all.filter((chunk) => chunk.runId === runId);
30
+ const text = [];
31
+ const thinking = [];
32
+ const toolCalls = [];
33
+ const attachments = [];
34
+ const sources = [];
35
+ let reason = null;
36
+ for (const chunk of chunks) {
37
+ const call = chunk.toolCall;
38
+ if (chunk.type === 'tool-result')
39
+ text.length = 0;
40
+ if (chunk.content)
41
+ text.push(chunk.content.text);
42
+ if (chunk.thinking)
43
+ thinking.push(chunk.thinking.text);
44
+ if (call)
45
+ toolCalls.push({ name: call.name, arguments: call.arguments });
46
+ if (chunk.attachment && !chunk.attachment.deletedAt)
47
+ attachments.push(chunk.attachment);
48
+ if (chunk.sources)
49
+ sources.push(...chunk.sources.sources);
50
+ if (chunk.runStatus?.reason)
51
+ reason = chunk.runStatus.reason;
52
+ }
53
+ return {
54
+ chatId,
55
+ runId,
56
+ state,
57
+ text: text.join('').trim(),
58
+ thinking: thinking.join('').trim(),
59
+ toolCalls,
60
+ attachments,
61
+ sources,
62
+ reason,
63
+ chunks
64
+ };
65
+ }
66
+ function title(prompt) {
67
+ const line = prompt.trim().split('\n', 1)[0] ?? '';
68
+ return line.length > TITLE_CHARS ? `${line.slice(0, TITLE_CHARS)}…` : line;
69
+ }
@@ -0,0 +1,3 @@
1
+ export declare function unref(timer: {
2
+ unref?: () => void;
3
+ } | number): void;
@@ -0,0 +1,4 @@
1
+ export function unref(timer) {
2
+ if (typeof timer !== 'number')
3
+ timer.unref?.();
4
+ }
@@ -0,0 +1 @@
1
+ export declare function wavDurationSeconds(head: Uint8Array, totalBytes: number): number | null;
@@ -0,0 +1,53 @@
1
+ const WAV_FORMAT_PCM = 1;
2
+ const WAV_FORMAT_IEEE_FLOAT = 3;
3
+ const RIFF_HEADER_BYTES = 12;
4
+ const CHUNK_HEADER_BYTES = 8;
5
+ function ascii(bytes, start, end) {
6
+ let out = '';
7
+ for (let i = start; i < end; i++)
8
+ out += String.fromCharCode(bytes[i] ?? 0);
9
+ return out;
10
+ }
11
+ function readWavHeader(head) {
12
+ if (head.length < RIFF_HEADER_BYTES)
13
+ return null;
14
+ if (ascii(head, 0, 4) !== 'RIFF' || ascii(head, 8, 12) !== 'WAVE')
15
+ return null;
16
+ const view = new DataView(head.buffer, head.byteOffset, head.byteLength);
17
+ let fmt = null;
18
+ let offset = RIFF_HEADER_BYTES;
19
+ while (offset + CHUNK_HEADER_BYTES <= head.length) {
20
+ const id = ascii(head, offset, offset + 4);
21
+ const size = view.getUint32(offset + 4, true);
22
+ const start = offset + CHUNK_HEADER_BYTES;
23
+ if (id === 'fmt ' && start + 16 <= head.length) {
24
+ fmt = {
25
+ format: view.getUint16(start, true),
26
+ channels: view.getUint16(start + 2, true),
27
+ sampleRate: view.getUint32(start + 4, true),
28
+ bitsPerSample: view.getUint16(start + 14, true)
29
+ };
30
+ }
31
+ else if (id === 'data') {
32
+ return fmt ? { ...fmt, dataStart: start, dataSize: size } : null;
33
+ }
34
+ offset = start + size + (size & 1);
35
+ }
36
+ return null;
37
+ }
38
+ export function wavDurationSeconds(head, totalBytes) {
39
+ const header = readWavHeader(head);
40
+ if (!header)
41
+ return null;
42
+ if (header.format !== WAV_FORMAT_PCM && header.format !== WAV_FORMAT_IEEE_FLOAT)
43
+ return null;
44
+ const frameBytes = header.channels * (header.bitsPerSample / 8);
45
+ if (!(frameBytes > 0) || !(header.sampleRate > 0))
46
+ return null;
47
+ const available = totalBytes - header.dataStart;
48
+ if (!(available > 0))
49
+ return null;
50
+ const dataBytes = header.dataSize > 0 && header.dataSize <= available ? header.dataSize : available;
51
+ const seconds = dataBytes / (header.sampleRate * frameBytes);
52
+ return Number.isFinite(seconds) && seconds > 0 ? seconds : null;
53
+ }
@@ -0,0 +1,22 @@
1
+ export interface WriteQueueOptions {
2
+ slowMs?: number;
3
+ onSlow?: (info: {
4
+ scope: string;
5
+ write: string;
6
+ waiting: number;
7
+ afterMs: number;
8
+ }) => void;
9
+ }
10
+ export declare class WriteQueue {
11
+ private readonly _scopes;
12
+ private readonly _slowMs;
13
+ private readonly _onSlow;
14
+ constructor({ slowMs, onSlow }?: WriteQueueOptions);
15
+ run<T>(name: string, write: string, task: () => Promise<T>): Promise<T>;
16
+ pending(): Array<{
17
+ scope: string;
18
+ waiting: number;
19
+ }>;
20
+ private _enter;
21
+ private _leave;
22
+ }
@@ -0,0 +1,39 @@
1
+ import ScopeLock from 'scope-lock';
2
+ export class WriteQueue {
3
+ _scopes = new Map();
4
+ _slowMs;
5
+ _onSlow;
6
+ constructor({ slowMs = 5000, onSlow } = {}) {
7
+ this._slowMs = slowMs;
8
+ this._onSlow = onSlow;
9
+ }
10
+ async run(name, write, task) {
11
+ const scope = this._enter(name);
12
+ await scope.lock.lock();
13
+ const slow = setTimeout(() => {
14
+ this._onSlow?.({ scope: name, write, waiting: scope.waiting, afterMs: this._slowMs });
15
+ }, this._slowMs);
16
+ try {
17
+ return await task();
18
+ }
19
+ finally {
20
+ clearTimeout(slow);
21
+ scope.lock.unlock();
22
+ this._leave(name, scope);
23
+ }
24
+ }
25
+ pending() {
26
+ return [...this._scopes].map(([name, scope]) => ({ scope: name, waiting: scope.waiting }));
27
+ }
28
+ _enter(name) {
29
+ const scope = this._scopes.get(name) ?? { lock: new ScopeLock(), waiting: 0 };
30
+ scope.waiting++;
31
+ this._scopes.set(name, scope);
32
+ return scope;
33
+ }
34
+ _leave(name, scope) {
35
+ scope.waiting--;
36
+ if (scope.waiting === 0 && this._scopes.get(name) === scope)
37
+ this._scopes.delete(name);
38
+ }
39
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,120 @@
1
+ import fs from 'bare-fs';
2
+ import path from 'bare-path';
3
+ import { fileURLToPath } from 'bare-url';
4
+ import regen from 'hyperschema-regen';
5
+ import HRPCBuilder from 'hrpc';
6
+ import Hyperconf from 'hyperconf/builder';
7
+ import Hyperdispatch from 'hyperdispatch';
8
+ import Hyperschema from 'hyperschema';
9
+ import HyperschemaTS from 'hyperschema-ts';
10
+ import HyperDB from 'hyperdb/builder';
11
+ import { resetHrpcIds, rewindSpec, unstageSpec } from '@qvac/harness/schema/baseline';
12
+ import { assertFieldOrder } from "./field-order.js";
13
+ import { VENDORED_MIN_SUPPORTED_VERSION, registerConfigTypes } from "./config.js";
14
+ import { registerEngineApi, registerEngineTypes } from "./engine.js";
15
+ import { writeBind, writeCapabilities, writeClient, writeConfigTypes } from '@qvac/harness/schema/generate';
16
+ import { registerLocalCollections, registerLocalTypes } from "./local.js";
17
+ import { registerQvacCollections, registerQvacDispatch, registerQvacTypes } from "./qvac.js";
18
+ const dir = path.dirname(fileURLToPath(import.meta.url));
19
+ const ROOT = path.join(dir, '..');
20
+ const SPEC_DIR = path.join(dir, '..', 'spec');
21
+ const SCHEMA_DIR = path.join(SPEC_DIR, 'hyperschema');
22
+ const HRPC_DIR = path.join(SPEC_DIR, 'hrpc');
23
+ const LOCAL_DIR = path.join(SPEC_DIR, 'local');
24
+ const LOCAL_SCHEMA_DIR = path.join(LOCAL_DIR, 'hyperschema');
25
+ const LOCAL_DB_DIR = path.join(LOCAL_DIR, 'hyperdb');
26
+ const MESH_DIR = path.join(SPEC_DIR, 'mesh');
27
+ const MESH_SCHEMA_DIR = path.join(MESH_DIR, 'hyperschema');
28
+ const MESH_DB_DIR = path.join(MESH_DIR, 'hyperdb');
29
+ const MESH_DISPATCH_DIR = path.join(MESH_DIR, 'hyperdispatch');
30
+ const CONFIG_SCHEMA_DIR = path.join(SPEC_DIR, 'config', 'hyperschema');
31
+ const CONFIG_CONF_DIR = path.join(SPEC_DIR, 'config', 'hyperconf');
32
+ const MESH_DB_JSON = path.join(MESH_DB_DIR, 'db.json');
33
+ const MESH_DISPATCH_JSON = path.join(MESH_DISPATCH_DIR, 'dispatch.json');
34
+ const LOCAL_DB_JSON = path.join(LOCAL_DB_DIR, 'db.json');
35
+ const MESH_SCHEMA_JSON = path.join(MESH_SCHEMA_DIR, 'schema.json');
36
+ const BASELINE_DIRS = [SPEC_DIR];
37
+ const HAND_WRITTEN = [
38
+ 'spec/index.js',
39
+ 'spec/index.d.ts',
40
+ 'spec/calls.d.ts',
41
+ 'spec/bind.d.ts',
42
+ 'spec/hrpc/index.d.ts',
43
+ 'spec/hrpc/messages.d.ts',
44
+ 'spec/mesh/hyperdispatch/index.d.ts',
45
+ 'spec/mesh/hyperdb/index.d.ts',
46
+ 'spec/local/hyperdb/index.d.ts',
47
+ 'spec/hyperschema/index.d.ts',
48
+ 'spec/mesh/hyperschema/index.d.ts'
49
+ ];
50
+ const baselines = rewindSpec(ROOT, BASELINE_DIRS, {
51
+ carries: 'spec/mesh/hyperdb/db.json',
52
+ keep: HAND_WRITTEN
53
+ });
54
+ const engineSchemaFile = path.join(SCHEMA_DIR, 'schema.json');
55
+ const engineSchema = JSON.parse(fs.readFileSync(engineSchemaFile, 'utf8'));
56
+ const chatEnvelope = engineSchema.schema.find((type) => type.name === 'notification');
57
+ if (chatEnvelope?.fields?.some((field) => field.name === 'chatId' && field.required)) {
58
+ engineSchema.schema = engineSchema.schema.filter((type) => !type.name.startsWith('notification'));
59
+ fs.writeFileSync(engineSchemaFile, JSON.stringify(engineSchema, null, 2));
60
+ }
61
+ const schema = Hyperschema.from(SCHEMA_DIR);
62
+ registerEngineTypes(schema.namespace('assistant'));
63
+ Hyperschema.toDisk(schema, { esm: true });
64
+ HyperschemaTS.toDisk(schema);
65
+ resetHrpcIds(HRPC_DIR);
66
+ const builder = HRPCBuilder.from(SCHEMA_DIR, HRPC_DIR);
67
+ registerEngineApi(builder.namespace('assistant'));
68
+ HRPCBuilder.toDisk(builder);
69
+ writeBind(builder, path.join(SPEC_DIR, 'bind.js'));
70
+ writeClient(builder, path.join(SPEC_DIR, 'calls.js'));
71
+ writeCapabilities(builder, path.join(SPEC_DIR, 'capabilities.d.ts'));
72
+ const localSchema = Hyperschema.from(LOCAL_SCHEMA_DIR);
73
+ registerLocalTypes(localSchema.namespace('local'));
74
+ Hyperschema.toDisk(localSchema, { esm: true });
75
+ HyperschemaTS.toDisk(localSchema);
76
+ const db = HyperDB.from(LOCAL_SCHEMA_DIR, LOCAL_DB_DIR);
77
+ registerLocalCollections(db.namespace('local'));
78
+ HyperDB.toDisk(db, { esm: true });
79
+ const meshSchema = Hyperschema.from(MESH_SCHEMA_DIR);
80
+ registerQvacTypes(meshSchema.namespace('qvac'));
81
+ Hyperschema.toDisk(meshSchema, { esm: true });
82
+ HyperschemaTS.toDisk(meshSchema);
83
+ const meshDb = HyperDB.from(MESH_SCHEMA_DIR, MESH_DB_DIR);
84
+ registerQvacCollections(meshDb.namespace('qvac'), path.join(dir, 'helpers.js'));
85
+ HyperDB.toDisk(meshDb, { esm: true });
86
+ const dispatch = Hyperdispatch.from(MESH_SCHEMA_DIR, MESH_DISPATCH_DIR);
87
+ registerQvacDispatch(dispatch.namespace('qvac'));
88
+ Hyperdispatch.toDisk(dispatch);
89
+ const configSchema = Hyperschema.from(CONFIG_SCHEMA_DIR);
90
+ registerConfigTypes(configSchema.namespace('conf'));
91
+ Hyperschema.toDisk(configSchema);
92
+ const config = Hyperconf.from(CONFIG_SCHEMA_DIR, CONFIG_CONF_DIR);
93
+ config.setProduction('@conf/config', { minSupportedVersion: VENDORED_MIN_SUPPORTED_VERSION });
94
+ Hyperconf.toDisk(config);
95
+ fs.writeFileSync(path.join(CONFIG_CONF_DIR, 'package.json'), `${JSON.stringify({ type: 'commonjs' }, null, 2)}\n`);
96
+ writeConfigTypes(path.join(CONFIG_CONF_DIR, 'index.d.ts'));
97
+ for (const file of [MESH_DISPATCH_JSON, MESH_DB_JSON, LOCAL_DB_JSON])
98
+ assertUniqueIds(file);
99
+ try {
100
+ for (const tag of baselines) {
101
+ regen.validate(MESH_DB_JSON, LOCAL_DB_JSON, MESH_DISPATCH_JSON, { tag });
102
+ }
103
+ if (baselines.length > 0)
104
+ assertFieldOrder(ROOT, MESH_SCHEMA_JSON, baselines);
105
+ }
106
+ finally {
107
+ if (baselines.length > 0)
108
+ unstageSpec(ROOT, BASELINE_DIRS);
109
+ }
110
+ console.log('assistant schema + hrpc + bind + client + local + mesh hyperdb generated under spec/');
111
+ function assertUniqueIds(file) {
112
+ const { schema } = JSON.parse(fs.readFileSync(file, 'utf8'));
113
+ const byId = new Map();
114
+ for (const { id, name } of schema) {
115
+ const clash = byId.get(id);
116
+ if (clash)
117
+ throw new Error(`${path.basename(file)}: id ${id} is on both ${clash} and ${name}`);
118
+ byId.set(id, name);
119
+ }
120
+ }
@@ -0,0 +1,4 @@
1
+ export declare function registerConfigTypes(ns: {
2
+ register: (spec: Record<string, unknown>) => void;
3
+ }): void;
4
+ export declare const VENDORED_MIN_SUPPORTED_VERSION = ">=0.18.0";
@@ -0,0 +1,7 @@
1
+ export function registerConfigTypes(ns) {
2
+ ns.register({
3
+ name: 'config',
4
+ fields: [{ name: 'minSupportedVersion', type: 'string', required: true }]
5
+ });
6
+ }
7
+ export const VENDORED_MIN_SUPPORTED_VERSION = '>=0.18.0';
@@ -0,0 +1,20 @@
1
+ export declare const CHUNK_TYPES: string[];
2
+ export declare const RUN_STATES: string[];
3
+ export declare const APPROVAL_STATUSES: string[];
4
+ export declare const CHUNK_PAYLOAD_FIELDS: {
5
+ readonly 'user-message': "userMessage";
6
+ readonly content: "content";
7
+ readonly thinking: "thinking";
8
+ readonly 'tool-call': "toolCall";
9
+ readonly 'tool-result': "toolResult";
10
+ readonly attachment: "attachment";
11
+ readonly 'approval-request': "approvalRequest";
12
+ readonly 'run-status': "runStatus";
13
+ readonly 'run-request': "runRequest";
14
+ readonly sources: "sources";
15
+ readonly compaction: "compaction";
16
+ };
17
+ export type ChunkType = keyof typeof CHUNK_PAYLOAD_FIELDS;
18
+ export type ChunkPayloadField = (typeof CHUNK_PAYLOAD_FIELDS)[ChunkType];
19
+ export declare function versionedRegistrar(ns: any, namespace: string): (name: string, fields: any[]) => void;
20
+ export declare function registerContentTypes(ns: any, namespace: string): void;