@timurproko/a1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -0
  3. package/bin/addone-supervisor.js +7 -0
  4. package/bin/addone-ui.js +20 -0
  5. package/bin/addone.js +26 -0
  6. package/dist/src/cli/dispatch.d.ts +26 -0
  7. package/dist/src/cli/dispatch.d.ts.map +1 -0
  8. package/dist/src/cli/dispatch.js +35 -0
  9. package/dist/src/cli/dispatch.js.map +1 -0
  10. package/dist/src/cli/index.d.ts +4 -0
  11. package/dist/src/cli/index.d.ts.map +1 -0
  12. package/dist/src/cli/index.js +4 -0
  13. package/dist/src/cli/index.js.map +1 -0
  14. package/dist/src/cli/version-stats.d.ts +17 -0
  15. package/dist/src/cli/version-stats.d.ts.map +1 -0
  16. package/dist/src/cli/version-stats.js +68 -0
  17. package/dist/src/cli/version-stats.js.map +1 -0
  18. package/dist/src/cli/version.d.ts +3 -0
  19. package/dist/src/cli/version.d.ts.map +1 -0
  20. package/dist/src/cli/version.js +23 -0
  21. package/dist/src/cli/version.js.map +1 -0
  22. package/dist/src/features/launch/development-launch.d.ts +9 -0
  23. package/dist/src/features/launch/development-launch.d.ts.map +1 -0
  24. package/dist/src/features/launch/development-launch.js +27 -0
  25. package/dist/src/features/launch/development-launch.js.map +1 -0
  26. package/dist/src/features/launch/index.d.ts +8 -0
  27. package/dist/src/features/launch/index.d.ts.map +1 -0
  28. package/dist/src/features/launch/index.js +8 -0
  29. package/dist/src/features/launch/index.js.map +1 -0
  30. package/dist/src/features/launch/initialize-profile.d.ts +7 -0
  31. package/dist/src/features/launch/initialize-profile.d.ts.map +1 -0
  32. package/dist/src/features/launch/initialize-profile.js +59 -0
  33. package/dist/src/features/launch/initialize-profile.js.map +1 -0
  34. package/dist/src/features/launch/intent.d.ts +8 -0
  35. package/dist/src/features/launch/intent.d.ts.map +1 -0
  36. package/dist/src/features/launch/intent.js +5 -0
  37. package/dist/src/features/launch/intent.js.map +1 -0
  38. package/dist/src/features/launch/prepare-launch.d.ts +14 -0
  39. package/dist/src/features/launch/prepare-launch.d.ts.map +1 -0
  40. package/dist/src/features/launch/prepare-launch.js +22 -0
  41. package/dist/src/features/launch/prepare-launch.js.map +1 -0
  42. package/dist/src/features/launch/profile-paths.d.ts +16 -0
  43. package/dist/src/features/launch/profile-paths.d.ts.map +1 -0
  44. package/dist/src/features/launch/profile-paths.js +30 -0
  45. package/dist/src/features/launch/profile-paths.js.map +1 -0
  46. package/dist/src/features/launch/profiles.d.ts +13 -0
  47. package/dist/src/features/launch/profiles.d.ts.map +1 -0
  48. package/dist/src/features/launch/profiles.js +27 -0
  49. package/dist/src/features/launch/profiles.js.map +1 -0
  50. package/dist/src/features/launch/runtime-selection.d.ts +15 -0
  51. package/dist/src/features/launch/runtime-selection.d.ts.map +1 -0
  52. package/dist/src/features/launch/runtime-selection.js +14 -0
  53. package/dist/src/features/launch/runtime-selection.js.map +1 -0
  54. package/dist/src/features/owned-ui/customization.d.ts +36 -0
  55. package/dist/src/features/owned-ui/customization.d.ts.map +1 -0
  56. package/dist/src/features/owned-ui/customization.js +110 -0
  57. package/dist/src/features/owned-ui/customization.js.map +1 -0
  58. package/dist/src/features/owned-ui/diagnostics.d.ts +34 -0
  59. package/dist/src/features/owned-ui/diagnostics.d.ts.map +1 -0
  60. package/dist/src/features/owned-ui/diagnostics.js +95 -0
  61. package/dist/src/features/owned-ui/diagnostics.js.map +1 -0
  62. package/dist/src/features/owned-ui/index.d.ts +5 -0
  63. package/dist/src/features/owned-ui/index.d.ts.map +1 -0
  64. package/dist/src/features/owned-ui/index.js +5 -0
  65. package/dist/src/features/owned-ui/index.js.map +1 -0
  66. package/dist/src/features/owned-ui/pi-session-shell.d.ts +97 -0
  67. package/dist/src/features/owned-ui/pi-session-shell.d.ts.map +1 -0
  68. package/dist/src/features/owned-ui/pi-session-shell.js +1437 -0
  69. package/dist/src/features/owned-ui/pi-session-shell.js.map +1 -0
  70. package/dist/src/features/owned-ui/run.d.ts +9 -0
  71. package/dist/src/features/owned-ui/run.d.ts.map +1 -0
  72. package/dist/src/features/owned-ui/run.js +21 -0
  73. package/dist/src/features/owned-ui/run.js.map +1 -0
  74. package/dist/src/features/workspace/capabilities.d.ts +32 -0
  75. package/dist/src/features/workspace/capabilities.d.ts.map +1 -0
  76. package/dist/src/features/workspace/capabilities.js +76 -0
  77. package/dist/src/features/workspace/capabilities.js.map +1 -0
  78. package/dist/src/features/workspace/index.d.ts +7 -0
  79. package/dist/src/features/workspace/index.d.ts.map +1 -0
  80. package/dist/src/features/workspace/index.js +7 -0
  81. package/dist/src/features/workspace/index.js.map +1 -0
  82. package/dist/src/features/workspace/presentation.d.ts +31 -0
  83. package/dist/src/features/workspace/presentation.d.ts.map +1 -0
  84. package/dist/src/features/workspace/presentation.js +69 -0
  85. package/dist/src/features/workspace/presentation.js.map +1 -0
  86. package/dist/src/features/workspace/reconciliation.d.ts +16 -0
  87. package/dist/src/features/workspace/reconciliation.d.ts.map +1 -0
  88. package/dist/src/features/workspace/reconciliation.js +83 -0
  89. package/dist/src/features/workspace/reconciliation.js.map +1 -0
  90. package/dist/src/features/workspace/reducer.d.ts +43 -0
  91. package/dist/src/features/workspace/reducer.d.ts.map +1 -0
  92. package/dist/src/features/workspace/reducer.js +214 -0
  93. package/dist/src/features/workspace/reducer.js.map +1 -0
  94. package/dist/src/features/workspace/router.d.ts +32 -0
  95. package/dist/src/features/workspace/router.d.ts.map +1 -0
  96. package/dist/src/features/workspace/router.js +125 -0
  97. package/dist/src/features/workspace/router.js.map +1 -0
  98. package/dist/src/features/workspace/store.d.ts +18 -0
  99. package/dist/src/features/workspace/store.d.ts.map +1 -0
  100. package/dist/src/features/workspace/store.js +55 -0
  101. package/dist/src/features/workspace/store.js.map +1 -0
  102. package/dist/src/foundation/lifecycle/index.d.ts +3 -0
  103. package/dist/src/foundation/lifecycle/index.d.ts.map +1 -0
  104. package/dist/src/foundation/lifecycle/index.js +3 -0
  105. package/dist/src/foundation/lifecycle/index.js.map +1 -0
  106. package/dist/src/foundation/lifecycle/model.d.ts +101 -0
  107. package/dist/src/foundation/lifecycle/model.d.ts.map +1 -0
  108. package/dist/src/foundation/lifecycle/model.js +40 -0
  109. package/dist/src/foundation/lifecycle/model.js.map +1 -0
  110. package/dist/src/foundation/lifecycle/paths.d.ts +11 -0
  111. package/dist/src/foundation/lifecycle/paths.d.ts.map +1 -0
  112. package/dist/src/foundation/lifecycle/paths.js +26 -0
  113. package/dist/src/foundation/lifecycle/paths.js.map +1 -0
  114. package/dist/src/foundation/native-host-protocol/codec.d.ts +12 -0
  115. package/dist/src/foundation/native-host-protocol/codec.d.ts.map +1 -0
  116. package/dist/src/foundation/native-host-protocol/codec.js +57 -0
  117. package/dist/src/foundation/native-host-protocol/codec.js.map +1 -0
  118. package/dist/src/foundation/native-host-protocol/evidence.d.ts +68 -0
  119. package/dist/src/foundation/native-host-protocol/evidence.d.ts.map +1 -0
  120. package/dist/src/foundation/native-host-protocol/evidence.js +141 -0
  121. package/dist/src/foundation/native-host-protocol/evidence.js.map +1 -0
  122. package/dist/src/foundation/native-host-protocol/index.d.ts +5 -0
  123. package/dist/src/foundation/native-host-protocol/index.d.ts.map +1 -0
  124. package/dist/src/foundation/native-host-protocol/index.js +5 -0
  125. package/dist/src/foundation/native-host-protocol/index.js.map +1 -0
  126. package/dist/src/foundation/native-host-protocol/messages.d.ts +57 -0
  127. package/dist/src/foundation/native-host-protocol/messages.d.ts.map +1 -0
  128. package/dist/src/foundation/native-host-protocol/messages.js +149 -0
  129. package/dist/src/foundation/native-host-protocol/messages.js.map +1 -0
  130. package/dist/src/foundation/native-host-protocol/proof-gate.d.ts +14 -0
  131. package/dist/src/foundation/native-host-protocol/proof-gate.d.ts.map +1 -0
  132. package/dist/src/foundation/native-host-protocol/proof-gate.js +34 -0
  133. package/dist/src/foundation/native-host-protocol/proof-gate.js.map +1 -0
  134. package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts +303 -0
  135. package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts.map +1 -0
  136. package/dist/src/foundation/owned-ui-contracts/extension-ui.js +69 -0
  137. package/dist/src/foundation/owned-ui-contracts/extension-ui.js.map +1 -0
  138. package/dist/src/foundation/owned-ui-contracts/index.d.ts +4 -0
  139. package/dist/src/foundation/owned-ui-contracts/index.d.ts.map +1 -0
  140. package/dist/src/foundation/owned-ui-contracts/index.js +4 -0
  141. package/dist/src/foundation/owned-ui-contracts/index.js.map +1 -0
  142. package/dist/src/foundation/owned-ui-contracts/model.d.ts +242 -0
  143. package/dist/src/foundation/owned-ui-contracts/model.d.ts.map +1 -0
  144. package/dist/src/foundation/owned-ui-contracts/model.js +2 -0
  145. package/dist/src/foundation/owned-ui-contracts/model.js.map +1 -0
  146. package/dist/src/foundation/owned-ui-contracts/validation.d.ts +12 -0
  147. package/dist/src/foundation/owned-ui-contracts/validation.d.ts.map +1 -0
  148. package/dist/src/foundation/owned-ui-contracts/validation.js +396 -0
  149. package/dist/src/foundation/owned-ui-contracts/validation.js.map +1 -0
  150. package/dist/src/foundation/pi-component-adapter/components.d.ts +5 -0
  151. package/dist/src/foundation/pi-component-adapter/components.d.ts.map +1 -0
  152. package/dist/src/foundation/pi-component-adapter/components.js +65 -0
  153. package/dist/src/foundation/pi-component-adapter/components.js.map +1 -0
  154. package/dist/src/foundation/pi-component-adapter/conformance.d.ts +17 -0
  155. package/dist/src/foundation/pi-component-adapter/conformance.d.ts.map +1 -0
  156. package/dist/src/foundation/pi-component-adapter/conformance.js +63 -0
  157. package/dist/src/foundation/pi-component-adapter/conformance.js.map +1 -0
  158. package/dist/src/foundation/pi-component-adapter/index.d.ts +13 -0
  159. package/dist/src/foundation/pi-component-adapter/index.d.ts.map +1 -0
  160. package/dist/src/foundation/pi-component-adapter/index.js +13 -0
  161. package/dist/src/foundation/pi-component-adapter/index.js.map +1 -0
  162. package/dist/src/foundation/pi-component-adapter/shell-components.d.ts +7 -0
  163. package/dist/src/foundation/pi-component-adapter/shell-components.d.ts.map +1 -0
  164. package/dist/src/foundation/pi-component-adapter/shell-components.js +7 -0
  165. package/dist/src/foundation/pi-component-adapter/shell-components.js.map +1 -0
  166. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts +12 -0
  167. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts.map +1 -0
  168. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js +165 -0
  169. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js.map +1 -0
  170. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts +36 -0
  171. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts.map +1 -0
  172. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js +280 -0
  173. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js.map +1 -0
  174. package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts +8 -0
  175. package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts.map +1 -0
  176. package/dist/src/foundation/pi-component-adapter/shell-footer-status.js +246 -0
  177. package/dist/src/foundation/pi-component-adapter/shell-footer-status.js.map +1 -0
  178. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts +43 -0
  179. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts.map +1 -0
  180. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js +397 -0
  181. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js.map +1 -0
  182. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts +106 -0
  183. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts.map +1 -0
  184. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js +234 -0
  185. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js.map +1 -0
  186. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts +117 -0
  187. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts.map +1 -0
  188. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js +88 -0
  189. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js.map +1 -0
  190. package/dist/src/foundation/pi-component-adapter/theme.d.ts +2 -0
  191. package/dist/src/foundation/pi-component-adapter/theme.d.ts.map +1 -0
  192. package/dist/src/foundation/pi-component-adapter/theme.js +2 -0
  193. package/dist/src/foundation/pi-component-adapter/theme.js.map +1 -0
  194. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts +423 -0
  195. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts.map +1 -0
  196. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js +297 -0
  197. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js.map +1 -0
  198. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts +11 -0
  199. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts.map +1 -0
  200. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js +30 -0
  201. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js.map +1 -0
  202. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts +18 -0
  203. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts.map +1 -0
  204. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js +52 -0
  205. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js.map +1 -0
  206. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts +23 -0
  207. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts.map +1 -0
  208. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js +143 -0
  209. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js.map +1 -0
  210. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts +5 -0
  211. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts.map +1 -0
  212. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js +43 -0
  213. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js.map +1 -0
  214. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts +18 -0
  215. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts.map +1 -0
  216. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js +82 -0
  217. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js.map +1 -0
  218. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts +25 -0
  219. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts.map +1 -0
  220. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js +106 -0
  221. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js.map +1 -0
  222. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts +3 -0
  223. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts.map +1 -0
  224. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js +19 -0
  225. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js.map +1 -0
  226. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts +10 -0
  227. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts.map +1 -0
  228. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js +78 -0
  229. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js.map +1 -0
  230. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts +56 -0
  231. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts.map +1 -0
  232. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js +343 -0
  233. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js.map +1 -0
  234. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts +23 -0
  235. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts.map +1 -0
  236. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js +160 -0
  237. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js.map +1 -0
  238. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts +96 -0
  239. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts.map +1 -0
  240. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js +890 -0
  241. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js.map +1 -0
  242. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts +20 -0
  243. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts.map +1 -0
  244. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js +45 -0
  245. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js.map +1 -0
  246. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts +31 -0
  247. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts.map +1 -0
  248. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js +60 -0
  249. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js.map +1 -0
  250. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts +99 -0
  251. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts.map +1 -0
  252. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js +1273 -0
  253. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js.map +1 -0
  254. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts +34 -0
  255. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts.map +1 -0
  256. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js +77 -0
  257. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js.map +1 -0
  258. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts +10 -0
  259. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts.map +1 -0
  260. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js +40 -0
  261. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js.map +1 -0
  262. package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts +16 -0
  263. package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts.map +1 -0
  264. package/dist/src/foundation/pi-component-adapter/upstream/model-search.js +15 -0
  265. package/dist/src/foundation/pi-component-adapter/upstream/model-search.js.map +1 -0
  266. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts +26 -0
  267. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts.map +1 -0
  268. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js +118 -0
  269. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js.map +1 -0
  270. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts +54 -0
  271. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts.map +1 -0
  272. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js +311 -0
  273. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js.map +1 -0
  274. package/dist/src/foundation/pi-engine-adapter/adapter.d.ts +343 -0
  275. package/dist/src/foundation/pi-engine-adapter/adapter.d.ts.map +1 -0
  276. package/dist/src/foundation/pi-engine-adapter/adapter.js +2365 -0
  277. package/dist/src/foundation/pi-engine-adapter/adapter.js.map +1 -0
  278. package/dist/src/foundation/pi-engine-adapter/conformance.d.ts +14 -0
  279. package/dist/src/foundation/pi-engine-adapter/conformance.d.ts.map +1 -0
  280. package/dist/src/foundation/pi-engine-adapter/conformance.js +85 -0
  281. package/dist/src/foundation/pi-engine-adapter/conformance.js.map +1 -0
  282. package/dist/src/foundation/pi-engine-adapter/index.d.ts +4 -0
  283. package/dist/src/foundation/pi-engine-adapter/index.d.ts.map +1 -0
  284. package/dist/src/foundation/pi-engine-adapter/index.js +4 -0
  285. package/dist/src/foundation/pi-engine-adapter/index.js.map +1 -0
  286. package/dist/src/foundation/pi-engine-adapter/workflows.d.ts +165 -0
  287. package/dist/src/foundation/pi-engine-adapter/workflows.d.ts.map +1 -0
  288. package/dist/src/foundation/pi-engine-adapter/workflows.js +61 -0
  289. package/dist/src/foundation/pi-engine-adapter/workflows.js.map +1 -0
  290. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts +34 -0
  291. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts.map +1 -0
  292. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js +485 -0
  293. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js.map +1 -0
  294. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts +14 -0
  295. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts.map +1 -0
  296. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js +132 -0
  297. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js.map +1 -0
  298. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts +122 -0
  299. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts.map +1 -0
  300. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js +2 -0
  301. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js.map +1 -0
  302. package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts +4 -0
  303. package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts.map +1 -0
  304. package/dist/src/foundation/pi-tui-runtime-adapter/index.js +4 -0
  305. package/dist/src/foundation/pi-tui-runtime-adapter/index.js.map +1 -0
  306. package/dist/src/foundation/protocol/client.d.ts +17 -0
  307. package/dist/src/foundation/protocol/client.d.ts.map +1 -0
  308. package/dist/src/foundation/protocol/client.js +127 -0
  309. package/dist/src/foundation/protocol/client.js.map +1 -0
  310. package/dist/src/foundation/protocol/index.d.ts +3 -0
  311. package/dist/src/foundation/protocol/index.d.ts.map +1 -0
  312. package/dist/src/foundation/protocol/index.js +3 -0
  313. package/dist/src/foundation/protocol/index.js.map +1 -0
  314. package/dist/src/foundation/protocol/messages.d.ts +90 -0
  315. package/dist/src/foundation/protocol/messages.d.ts.map +1 -0
  316. package/dist/src/foundation/protocol/messages.js +99 -0
  317. package/dist/src/foundation/protocol/messages.js.map +1 -0
  318. package/dist/src/foundation/release/bootstrap.d.ts +30 -0
  319. package/dist/src/foundation/release/bootstrap.d.ts.map +1 -0
  320. package/dist/src/foundation/release/bootstrap.js +283 -0
  321. package/dist/src/foundation/release/bootstrap.js.map +1 -0
  322. package/dist/src/foundation/release/cohort-selection.d.ts +40 -0
  323. package/dist/src/foundation/release/cohort-selection.d.ts.map +1 -0
  324. package/dist/src/foundation/release/cohort-selection.js +76 -0
  325. package/dist/src/foundation/release/cohort-selection.js.map +1 -0
  326. package/dist/src/foundation/release/cohort-state.d.ts +68 -0
  327. package/dist/src/foundation/release/cohort-state.d.ts.map +1 -0
  328. package/dist/src/foundation/release/cohort-state.js +201 -0
  329. package/dist/src/foundation/release/cohort-state.js.map +1 -0
  330. package/dist/src/foundation/release/development-preview-release.d.ts +49 -0
  331. package/dist/src/foundation/release/development-preview-release.d.ts.map +1 -0
  332. package/dist/src/foundation/release/development-preview-release.js +113 -0
  333. package/dist/src/foundation/release/development-preview-release.js.map +1 -0
  334. package/dist/src/foundation/release/index.d.ts +12 -0
  335. package/dist/src/foundation/release/index.d.ts.map +1 -0
  336. package/dist/src/foundation/release/index.js +12 -0
  337. package/dist/src/foundation/release/index.js.map +1 -0
  338. package/dist/src/foundation/release/process-cleanup.d.ts +15 -0
  339. package/dist/src/foundation/release/process-cleanup.d.ts.map +1 -0
  340. package/dist/src/foundation/release/process-cleanup.js +67 -0
  341. package/dist/src/foundation/release/process-cleanup.js.map +1 -0
  342. package/dist/src/foundation/release/release-gc.d.ts +6 -0
  343. package/dist/src/foundation/release/release-gc.d.ts.map +1 -0
  344. package/dist/src/foundation/release/release-gc.js +17 -0
  345. package/dist/src/foundation/release/release-gc.js.map +1 -0
  346. package/dist/src/foundation/release/release-store.d.ts +11 -0
  347. package/dist/src/foundation/release/release-store.d.ts.map +1 -0
  348. package/dist/src/foundation/release/release-store.js +115 -0
  349. package/dist/src/foundation/release/release-store.js.map +1 -0
  350. package/dist/src/foundation/release/release.d.ts +24 -0
  351. package/dist/src/foundation/release/release.d.ts.map +1 -0
  352. package/dist/src/foundation/release/release.js +151 -0
  353. package/dist/src/foundation/release/release.js.map +1 -0
  354. package/dist/src/foundation/release/stable-release.d.ts +30 -0
  355. package/dist/src/foundation/release/stable-release.d.ts.map +1 -0
  356. package/dist/src/foundation/release/stable-release.js +38 -0
  357. package/dist/src/foundation/release/stable-release.js.map +1 -0
  358. package/dist/src/foundation/release/update-transaction.d.ts +31 -0
  359. package/dist/src/foundation/release/update-transaction.d.ts.map +1 -0
  360. package/dist/src/foundation/release/update-transaction.js +88 -0
  361. package/dist/src/foundation/release/update-transaction.js.map +1 -0
  362. package/dist/src/foundation/release/update.d.ts +55 -0
  363. package/dist/src/foundation/release/update.d.ts.map +1 -0
  364. package/dist/src/foundation/release/update.js +316 -0
  365. package/dist/src/foundation/release/update.js.map +1 -0
  366. package/dist/src/foundation/storage/control-store.d.ts +61 -0
  367. package/dist/src/foundation/storage/control-store.d.ts.map +1 -0
  368. package/dist/src/foundation/storage/control-store.js +459 -0
  369. package/dist/src/foundation/storage/control-store.js.map +1 -0
  370. package/dist/src/foundation/storage/index.d.ts +2 -0
  371. package/dist/src/foundation/storage/index.d.ts.map +1 -0
  372. package/dist/src/foundation/storage/index.js +2 -0
  373. package/dist/src/foundation/storage/index.js.map +1 -0
  374. package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts +47 -0
  375. package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts.map +1 -0
  376. package/dist/src/foundation/structured-agent-runtime/backpressure.js +119 -0
  377. package/dist/src/foundation/structured-agent-runtime/backpressure.js.map +1 -0
  378. package/dist/src/foundation/structured-agent-runtime/commands.d.ts +53 -0
  379. package/dist/src/foundation/structured-agent-runtime/commands.d.ts.map +1 -0
  380. package/dist/src/foundation/structured-agent-runtime/commands.js +165 -0
  381. package/dist/src/foundation/structured-agent-runtime/commands.js.map +1 -0
  382. package/dist/src/foundation/structured-agent-runtime/handshake.d.ts +42 -0
  383. package/dist/src/foundation/structured-agent-runtime/handshake.d.ts.map +1 -0
  384. package/dist/src/foundation/structured-agent-runtime/handshake.js +151 -0
  385. package/dist/src/foundation/structured-agent-runtime/handshake.js.map +1 -0
  386. package/dist/src/foundation/structured-agent-runtime/index.d.ts +6 -0
  387. package/dist/src/foundation/structured-agent-runtime/index.d.ts.map +1 -0
  388. package/dist/src/foundation/structured-agent-runtime/index.js +6 -0
  389. package/dist/src/foundation/structured-agent-runtime/index.js.map +1 -0
  390. package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts +38 -0
  391. package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts.map +1 -0
  392. package/dist/src/foundation/structured-agent-runtime/reconnection.js +130 -0
  393. package/dist/src/foundation/structured-agent-runtime/reconnection.js.map +1 -0
  394. package/dist/src/foundation/structured-agent-runtime/state.d.ts +57 -0
  395. package/dist/src/foundation/structured-agent-runtime/state.d.ts.map +1 -0
  396. package/dist/src/foundation/structured-agent-runtime/state.js +119 -0
  397. package/dist/src/foundation/structured-agent-runtime/state.js.map +1 -0
  398. package/dist/src/foundation/supervision/index.d.ts +4 -0
  399. package/dist/src/foundation/supervision/index.d.ts.map +1 -0
  400. package/dist/src/foundation/supervision/index.js +4 -0
  401. package/dist/src/foundation/supervision/index.js.map +1 -0
  402. package/dist/src/foundation/supervision/main.d.ts +2 -0
  403. package/dist/src/foundation/supervision/main.d.ts.map +1 -0
  404. package/dist/src/foundation/supervision/main.js +40 -0
  405. package/dist/src/foundation/supervision/main.js.map +1 -0
  406. package/dist/src/foundation/supervision/paths.d.ts +2 -0
  407. package/dist/src/foundation/supervision/paths.d.ts.map +1 -0
  408. package/dist/src/foundation/supervision/paths.js +2 -0
  409. package/dist/src/foundation/supervision/paths.js.map +1 -0
  410. package/dist/src/foundation/supervision/server.d.ts +21 -0
  411. package/dist/src/foundation/supervision/server.d.ts.map +1 -0
  412. package/dist/src/foundation/supervision/server.js +283 -0
  413. package/dist/src/foundation/supervision/server.js.map +1 -0
  414. package/dist/src/foundation/transparent-terminal/command-resolution.d.ts +14 -0
  415. package/dist/src/foundation/transparent-terminal/command-resolution.d.ts.map +1 -0
  416. package/dist/src/foundation/transparent-terminal/command-resolution.js +70 -0
  417. package/dist/src/foundation/transparent-terminal/command-resolution.js.map +1 -0
  418. package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts +33 -0
  419. package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts.map +1 -0
  420. package/dist/src/foundation/transparent-terminal/foreground-broker.js +88 -0
  421. package/dist/src/foundation/transparent-terminal/foreground-broker.js.map +1 -0
  422. package/dist/src/foundation/transparent-terminal/index.d.ts +4 -0
  423. package/dist/src/foundation/transparent-terminal/index.d.ts.map +1 -0
  424. package/dist/src/foundation/transparent-terminal/index.js +4 -0
  425. package/dist/src/foundation/transparent-terminal/index.js.map +1 -0
  426. package/dist/src/foundation/transparent-terminal/main.d.ts +10 -0
  427. package/dist/src/foundation/transparent-terminal/main.d.ts.map +1 -0
  428. package/dist/src/foundation/transparent-terminal/main.js +107 -0
  429. package/dist/src/foundation/transparent-terminal/main.js.map +1 -0
  430. package/dist/src/foundation/transparent-terminal/native-launcher.d.ts +26 -0
  431. package/dist/src/foundation/transparent-terminal/native-launcher.d.ts.map +1 -0
  432. package/dist/src/foundation/transparent-terminal/native-launcher.js +147 -0
  433. package/dist/src/foundation/transparent-terminal/native-launcher.js.map +1 -0
  434. package/dist/src/foundation/workspace-contracts/index.d.ts +3 -0
  435. package/dist/src/foundation/workspace-contracts/index.d.ts.map +1 -0
  436. package/dist/src/foundation/workspace-contracts/index.js +3 -0
  437. package/dist/src/foundation/workspace-contracts/index.js.map +1 -0
  438. package/dist/src/foundation/workspace-contracts/model.d.ts +249 -0
  439. package/dist/src/foundation/workspace-contracts/model.d.ts.map +1 -0
  440. package/dist/src/foundation/workspace-contracts/model.js +3 -0
  441. package/dist/src/foundation/workspace-contracts/model.js.map +1 -0
  442. package/dist/src/foundation/workspace-contracts/validation.d.ts +14 -0
  443. package/dist/src/foundation/workspace-contracts/validation.d.ts.map +1 -0
  444. package/dist/src/foundation/workspace-contracts/validation.js +336 -0
  445. package/dist/src/foundation/workspace-contracts/validation.js.map +1 -0
  446. package/docs/architecture/boundaries.md +46 -0
  447. package/docs/architecture/project-structure.md +81 -0
  448. package/docs/architecture/resource-and-data-policy.md +55 -0
  449. package/docs/architecture/terminal-host-proof-gate.md +32 -0
  450. package/docs/architecture/terminal-host-provenance.md +69 -0
  451. package/docs/architecture/terminal-host-spike-evidence.md +39 -0
  452. package/docs/architecture/toolchain.md +66 -0
  453. package/docs/features/launch-profiles.md +50 -0
  454. package/docs/manual-transparent-checkpoint.md +53 -0
  455. package/package.json +73 -0
@@ -0,0 +1,16 @@
1
+ import type { LaunchProfileId } from "./profiles.js";
2
+ export interface LaunchProfilePaths {
3
+ readonly home: string;
4
+ readonly addoneRoot: string;
5
+ readonly addoneAgent: string;
6
+ readonly sandbox: string;
7
+ }
8
+ export interface LaunchProfilePathOptions {
9
+ readonly environment?: NodeJS.ProcessEnv;
10
+ readonly home?: string;
11
+ readonly readHome?: () => string;
12
+ readonly platform?: NodeJS.Platform;
13
+ }
14
+ export declare function resolveLaunchProfilePaths(options?: LaunchProfilePathOptions): LaunchProfilePaths;
15
+ export declare function configurationRootForProfile(profileId: LaunchProfileId, paths: LaunchProfilePaths): string | null;
16
+ //# sourceMappingURL=profile-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-paths.d.ts","sourceRoot":"","sources":["../../../../src/features/launch/profile-paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;CACrC;AAED,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,wBAA6B,GAAG,kBAAkB,CAYpG;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,kBAAkB,GACxB,MAAM,GAAG,IAAI,CAIf"}
@@ -0,0 +1,30 @@
1
+ import { homedir } from "node:os";
2
+ import { posix, win32 } from "node:path";
3
+ export function resolveLaunchProfilePaths(options = {}) {
4
+ const environment = options.environment ?? process.env;
5
+ const path = options.platform === "win32" || (options.platform === undefined && process.platform === "win32") ? win32 : posix;
6
+ const selectedHome = options.home ?? environment.ADDONE_PROFILE_HOME ?? options.readHome?.() ?? homedir();
7
+ const home = validateAbsolutePath(selectedHome, "effective user home", path);
8
+ const addoneRoot = path.resolve(home, ".a1");
9
+ return Object.freeze({
10
+ home,
11
+ addoneRoot,
12
+ addoneAgent: path.resolve(addoneRoot, "agent"),
13
+ sandbox: path.resolve(addoneRoot, "sandbox"),
14
+ });
15
+ }
16
+ export function configurationRootForProfile(profileId, paths) {
17
+ if (profileId === "addone")
18
+ return paths.addoneAgent;
19
+ if (profileId === "sandbox")
20
+ return paths.sandbox;
21
+ return null;
22
+ }
23
+ function validateAbsolutePath(value, name, path) {
24
+ if (value.length === 0 || value.includes("\0"))
25
+ throw new TypeError(`${name} is invalid`);
26
+ if (!path.isAbsolute(value))
27
+ throw new TypeError(`${name} must be absolute`);
28
+ return path.resolve(value);
29
+ }
30
+ //# sourceMappingURL=profile-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-paths.js","sourceRoot":"","sources":["../../../../src/features/launch/profile-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAqB,MAAM,WAAW,CAAC;AAiB5D,MAAM,UAAU,yBAAyB,CAAC,UAAoC,EAAE;IAC9E,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9H,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,IAAI,WAAW,CAAC,mBAAmB,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,OAAO,EAAE,CAAC;IAC1G,MAAM,IAAI,GAAG,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,EAAE,IAAI,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI;QACJ,UAAU;QACV,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC;QAC9C,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,SAA0B,EAC1B,KAAyB;IAEzB,IAAI,SAAS,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,WAAW,CAAC;IACrD,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IAClD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa,EAAE,IAAY,EAAE,IAAkB;IAC3E,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,aAAa,CAAC,CAAC;IAC1F,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { LaunchProfileId } from "../../foundation/lifecycle/index.js";
2
+ export type { LaunchProfileId } from "../../foundation/lifecycle/index.js";
3
+ export type PiConfigurationRootPolicy = "addone-agent" | "pi-default" | "addone-sandbox";
4
+ export type ProjectTrustPolicy = "pi-default" | "ignore";
5
+ export interface LaunchProfileContract {
6
+ readonly id: LaunchProfileId;
7
+ readonly productSurface: "agent" | "vanilla-baseline" | "isolated-profile";
8
+ readonly piConfigurationRoot: PiConfigurationRootPolicy;
9
+ readonly projectTrust: ProjectTrustPolicy;
10
+ readonly terminalCapability: "owned-ui" | "transparent";
11
+ }
12
+ export declare function launchProfileContract(id: LaunchProfileId): LaunchProfileContract;
13
+ //# sourceMappingURL=profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../../src/features/launch/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,YAAY,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,cAAc,GAAG,YAAY,GAAG,gBAAgB,CAAC;AACzF,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,OAAO,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;IAC3E,QAAQ,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,UAAU,GAAG,aAAa,CAAC;CACzD;AA0BD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,eAAe,GAAG,qBAAqB,CAEhF"}
@@ -0,0 +1,27 @@
1
+ const contracts = Object.freeze({
2
+ addone: Object.freeze({
3
+ id: "addone",
4
+ productSurface: "agent",
5
+ piConfigurationRoot: "addone-agent",
6
+ projectTrust: "pi-default",
7
+ terminalCapability: "owned-ui",
8
+ }),
9
+ pi: Object.freeze({
10
+ id: "pi",
11
+ productSurface: "vanilla-baseline",
12
+ piConfigurationRoot: "pi-default",
13
+ projectTrust: "pi-default",
14
+ terminalCapability: "transparent",
15
+ }),
16
+ sandbox: Object.freeze({
17
+ id: "sandbox",
18
+ productSurface: "isolated-profile",
19
+ piConfigurationRoot: "addone-sandbox",
20
+ projectTrust: "ignore",
21
+ terminalCapability: "transparent",
22
+ }),
23
+ });
24
+ export function launchProfileContract(id) {
25
+ return contracts[id];
26
+ }
27
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../../src/features/launch/profiles.ts"],"names":[],"mappings":"AAcA,MAAM,SAAS,GAA6D,MAAM,CAAC,MAAM,CAAC;IACxF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,EAAE,EAAE,QAAQ;QACZ,cAAc,EAAE,OAAO;QACvB,mBAAmB,EAAE,cAAc;QACnC,YAAY,EAAE,YAAY;QAC1B,kBAAkB,EAAE,UAAU;KAC/B,CAAC;IACF,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,IAAI;QACR,cAAc,EAAE,kBAAkB;QAClC,mBAAmB,EAAE,YAAY;QACjC,YAAY,EAAE,YAAY;QAC1B,kBAAkB,EAAE,aAAa;KAClC,CAAC;IACF,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,EAAE,EAAE,SAAS;QACb,cAAc,EAAE,kBAAkB;QAClC,mBAAmB,EAAE,gBAAgB;QACrC,YAAY,EAAE,QAAQ;QACtB,kBAAkB,EAAE,aAAa;KAClC,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CAAC,EAAmB;IACvD,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC;AACvB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type LaunchProfileId } from "../../foundation/lifecycle/index.js";
2
+ export type TransparentInteractiveProfileId = Exclude<LaunchProfileId, "addone">;
3
+ export type InteractiveRuntimeSelection = {
4
+ readonly kind: "owned-ui";
5
+ } | {
6
+ readonly kind: "transparent";
7
+ readonly profileId: TransparentInteractiveProfileId;
8
+ };
9
+ export interface InteractiveRuntimeRunners {
10
+ readonly ownedUi: () => Promise<number>;
11
+ readonly transparent: (profileId: TransparentInteractiveProfileId) => Promise<number>;
12
+ }
13
+ export declare function selectInteractiveRuntime(profileId: string): InteractiveRuntimeSelection;
14
+ export declare function runSelectedInteractiveRuntime(profileId: string, runners: InteractiveRuntimeRunners): Promise<number>;
15
+ //# sourceMappingURL=runtime-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-selection.d.ts","sourceRoot":"","sources":["../../../../src/features/launch/runtime-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAElG,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAEjF,MAAM,MAAM,2BAA2B,GACnC;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,+BAA+B,CAAA;CAAE,CAAC;AAE1F,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,+BAA+B,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvF;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,2BAA2B,CAKvF;AAED,wBAAsB,6BAA6B,CACjD,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,MAAM,CAAC,CAKjB"}
@@ -0,0 +1,14 @@
1
+ import { assertLaunchProfileId } from "../../foundation/lifecycle/index.js";
2
+ export function selectInteractiveRuntime(profileId) {
3
+ assertLaunchProfileId(profileId);
4
+ return profileId === "addone"
5
+ ? Object.freeze({ kind: "owned-ui" })
6
+ : Object.freeze({ kind: "transparent", profileId });
7
+ }
8
+ export async function runSelectedInteractiveRuntime(profileId, runners) {
9
+ const selection = selectInteractiveRuntime(profileId);
10
+ return selection.kind === "owned-ui"
11
+ ? await runners.ownedUi()
12
+ : await runners.transparent(selection.profileId);
13
+ }
14
+ //# sourceMappingURL=runtime-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-selection.js","sourceRoot":"","sources":["../../../../src/features/launch/runtime-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,qCAAqC,CAAC;AAalG,MAAM,UAAU,wBAAwB,CAAC,SAAiB;IACxD,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,SAAS,KAAK,QAAQ;QAC3B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACrC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,SAAiB,EACjB,OAAkC;IAElC,MAAM,SAAS,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;IACtD,OAAO,SAAS,CAAC,IAAI,KAAK,UAAU;QAClC,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE;QACzB,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type OwnedUiCommand, type OwnedUiCustomization, type OwnedUiSlotId } from "../../foundation/owned-ui-contracts/index.js";
2
+ export interface OwnedUiSlotImplementation {
3
+ readonly payload: unknown;
4
+ render?(input: unknown, width: number): readonly string[];
5
+ createCommand?(context: {
6
+ readonly sessionId: string;
7
+ readonly correlationId: string;
8
+ }): OwnedUiCommand | Promise<OwnedUiCommand>;
9
+ }
10
+ export interface OwnedCommandHandlerContext {
11
+ readonly sessionId: string;
12
+ readonly correlationId: string;
13
+ }
14
+ export type OwnedCommandHandler = (context: OwnedCommandHandlerContext) => OwnedUiCommand | Promise<OwnedUiCommand>;
15
+ export declare class OwnedCommandSurface {
16
+ #private;
17
+ register(name: string, handler: OwnedCommandHandler): () => void;
18
+ names(): readonly string[];
19
+ dispatch(name: string, sessionId: string): Promise<OwnedUiCommand>;
20
+ }
21
+ export interface ResolvedOwnedUiSlot {
22
+ readonly customization: OwnedUiCustomization;
23
+ readonly implementation: OwnedUiSlotImplementation;
24
+ }
25
+ export declare class OwnedUiCustomizationRegistry {
26
+ #private;
27
+ register(customization: OwnedUiCustomization, implementation: OwnedUiSlotImplementation): () => void;
28
+ resolve(slot: OwnedUiSlotId): ResolvedOwnedUiSlot | undefined;
29
+ registrations(slot: OwnedUiSlotId): readonly OwnedUiCustomization[];
30
+ remove(id: string): boolean;
31
+ all(): readonly OwnedUiCustomization[];
32
+ clear(): void;
33
+ installCommands(surface: OwnedCommandSurface, sessionId: string): readonly string[];
34
+ }
35
+ export declare function createVanillaUiCustomizationRegistry(): OwnedUiCustomizationRegistry;
36
+ //# sourceMappingURL=customization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customization.d.ts","sourceRoot":"","sources":["../../../../src/features/owned-ui/customization.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAEnB,MAAM,8CAA8C,CAAC;AAGtD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC1D,aAAa,CAAC,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACnI;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,0BAA0B,KAAK,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEpH,qBAAa,mBAAmB;;IAI9B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,MAAM,IAAI;IAKhE,KAAK,IAAI,SAAS,MAAM,EAAE;IAIpB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAMzE;AAOD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CAAC;CACpD;AAED,qBAAa,4BAA4B;;IAGvC,QAAQ,CACN,aAAa,EAAE,oBAAoB,EACnC,cAAc,EAAE,yBAAyB,GACxC,MAAM,IAAI;IAYb,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS;IAS7D,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,oBAAoB,EAAE;IAMnE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAO3B,GAAG,IAAI,SAAS,oBAAoB,EAAE;IAMtC,KAAK,IAAI,IAAI;IAIb,eAAe,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;CAqBpF;AAED,wBAAgB,oCAAoC,IAAI,4BAA4B,CA+BnF"}
@@ -0,0 +1,110 @@
1
+ import { assertOwnedUiCustomization, } from "../../foundation/owned-ui-contracts/index.js";
2
+ import { renderPiShellTranscriptBlock } from "../../foundation/pi-component-adapter/index.js";
3
+ export class OwnedCommandSurface {
4
+ #handlers = new Map();
5
+ #sequence = 0;
6
+ register(name, handler) {
7
+ this.#handlers.set(name, handler);
8
+ return () => this.#handlers.delete(name);
9
+ }
10
+ names() {
11
+ return [...this.#handlers.keys()].sort();
12
+ }
13
+ async dispatch(name, sessionId) {
14
+ const handler = this.#handlers.get(name);
15
+ if (!handler)
16
+ throw new Error(`unknown owned UI command: ${name}`);
17
+ this.#sequence += 1;
18
+ return handler({ sessionId, correlationId: `ui-command-${this.#sequence}` });
19
+ }
20
+ }
21
+ export class OwnedUiCustomizationRegistry {
22
+ #registrations = new Map();
23
+ register(customization, implementation) {
24
+ assertOwnedUiCustomization(customization);
25
+ if (typeof implementation !== "object" || implementation === null) {
26
+ throw new TypeError("owned UI slot implementation is invalid");
27
+ }
28
+ const slot = this.#slot(customization.slot);
29
+ slot.set(customization.id, Object.freeze({ customization, implementation }));
30
+ return () => {
31
+ if (slot.get(customization.id)?.customization.version === customization.version)
32
+ slot.delete(customization.id);
33
+ };
34
+ }
35
+ resolve(slot) {
36
+ return [...(this.#registrations.get(slot)?.values() ?? [])]
37
+ .sort((left, right) => right.customization.precedence - left.customization.precedence
38
+ || right.customization.version - left.customization.version
39
+ || left.customization.id.localeCompare(right.customization.id))[0];
40
+ }
41
+ registrations(slot) {
42
+ return [...(this.#registrations.get(slot)?.values() ?? [])]
43
+ .map(registration => registration.customization)
44
+ .sort((left, right) => right.precedence - left.precedence || right.version - left.version || left.id.localeCompare(right.id));
45
+ }
46
+ remove(id) {
47
+ for (const slot of this.#registrations.values()) {
48
+ if (slot.delete(id))
49
+ return true;
50
+ }
51
+ return false;
52
+ }
53
+ all() {
54
+ return [...this.#registrations.values()]
55
+ .flatMap(slot => [...slot.values()].map(registration => registration.customization))
56
+ .sort((left, right) => left.slot.localeCompare(right.slot) || right.precedence - left.precedence || left.id.localeCompare(right.id));
57
+ }
58
+ clear() {
59
+ this.#registrations.clear();
60
+ }
61
+ installCommands(surface, sessionId) {
62
+ const installed = [];
63
+ for (const registration of this.#registrations.get("command")?.values() ?? []) {
64
+ if (!registration.implementation.createCommand)
65
+ continue;
66
+ installed.push(registration.customization.id);
67
+ surface.register(registration.customization.id, context => {
68
+ if (context.sessionId !== sessionId)
69
+ throw new Error("owned UI command session does not match the registry binding");
70
+ return registration.implementation.createCommand(context);
71
+ });
72
+ }
73
+ return installed;
74
+ }
75
+ #slot(slot) {
76
+ let registrations = this.#registrations.get(slot);
77
+ if (!registrations) {
78
+ registrations = new Map();
79
+ this.#registrations.set(slot, registrations);
80
+ }
81
+ return registrations;
82
+ }
83
+ }
84
+ export function createVanillaUiCustomizationRegistry() {
85
+ const registry = new OwnedUiCustomizationRegistry();
86
+ const register = (slot, id, label, implementation = { payload: {} }) => registry.register({
87
+ id,
88
+ slot,
89
+ version: 1,
90
+ precedence: 0,
91
+ label,
92
+ payload: {},
93
+ }, implementation);
94
+ register("theme", "vanilla-theme", "Vanilla Pi style", {
95
+ payload: { background: "terminal", foreground: "terminal", accent: "blue" },
96
+ });
97
+ register("transcript-block", "vanilla-transcript", "Vanilla transcript", {
98
+ payload: {},
99
+ render: (input, width) => renderPiShellTranscriptBlock(input, width, process.cwd()),
100
+ });
101
+ register("tool-card", "vanilla-tool-card", "Vanilla tool cards");
102
+ register("editor", "vanilla-editor", "Vanilla editor");
103
+ register("status", "vanilla-status", "Vanilla status");
104
+ register("selector", "vanilla-selector", "Vanilla selector");
105
+ register("dialog", "vanilla-dialog", "Vanilla dialog");
106
+ register("overlay", "vanilla-overlay", "Vanilla overlay");
107
+ register("layout", "vanilla-fullscreen", "Fullscreen session");
108
+ return registry;
109
+ }
110
+ //# sourceMappingURL=customization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customization.js","sourceRoot":"","sources":["../../../../src/features/owned-ui/customization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAK3B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAe9F,MAAM,OAAO,mBAAmB;IACrB,SAAS,GAAG,IAAI,GAAG,EAA+B,CAAC;IAC5D,SAAS,GAAG,CAAC,CAAC;IAEd,QAAQ,CAAC,IAAY,EAAE,OAA4B;QACjD,IAAI,CAAC,SA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D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACvD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IAC7D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACvD,QAAQ,CAAC,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;IAC/D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { OwnedUiDiagnostics } from "../../foundation/owned-ui-contracts/index.js";
2
+ export interface OwnedUiFrameObservation {
3
+ readonly requestedFrames: number;
4
+ readonly presentedFrames: number;
5
+ readonly failedFrames: number;
6
+ readonly lastFrameBytes: number;
7
+ }
8
+ export interface OwnedUiResourceObservation {
9
+ readonly cpuUserMicros: number;
10
+ readonly cpuSystemMicros: number;
11
+ readonly residentMemoryBytes: number;
12
+ readonly heapBytes: number;
13
+ }
14
+ export interface OwnedUiDiagnosticsSnapshot {
15
+ readonly entries: readonly OwnedUiDiagnostics[];
16
+ readonly frames: OwnedUiFrameObservation;
17
+ readonly resources: OwnedUiResourceObservation | null;
18
+ readonly terminalRestorationFailed: boolean;
19
+ }
20
+ export declare class OwnedUiDiagnosticsRecorder {
21
+ #private;
22
+ readonly maximumEntries: number;
23
+ constructor(maximumEntries?: number);
24
+ entries(): readonly OwnedUiDiagnostics[];
25
+ record(severity: OwnedUiDiagnostics["severity"], code: string, message: string, recoverable?: boolean): OwnedUiDiagnostics;
26
+ noteFrame(bytes: number, failed?: boolean): OwnedUiFrameObservation;
27
+ noteResources(observation: OwnedUiResourceObservation): OwnedUiResourceObservation;
28
+ captureResources(read?: () => NodeJS.ResourceUsage): OwnedUiResourceObservation;
29
+ noteTerminalRestorationFailure(error: unknown): OwnedUiDiagnostics;
30
+ frames(): OwnedUiFrameObservation;
31
+ snapshot(): OwnedUiDiagnosticsSnapshot;
32
+ }
33
+ export declare function redactDiagnosticMessage(message: string): string;
34
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../src/features/owned-ui/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;CAC7C;AAED,qBAAa,0BAA0B;;IAUzB,QAAQ,CAAC,cAAc;gBAAd,cAAc,SAAM;IAIzC,OAAO,IAAI,SAAS,kBAAkB,EAAE;IAIxC,MAAM,CACJ,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,EACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,UAAO,GACjB,kBAAkB;IAarB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,uBAAuB;IASjE,aAAa,CAAC,WAAW,EAAE,0BAA0B,GAAG,0BAA0B;IAQlF,gBAAgB,CAAC,IAAI,GAAE,MAAM,MAAM,CAAC,aAA6C,GAAG,0BAA0B;IAU9G,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB;IAUlE,MAAM,IAAI,uBAAuB;IASjC,QAAQ,IAAI,0BAA0B;CAQvC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO/D"}
@@ -0,0 +1,95 @@
1
+ export class OwnedUiDiagnosticsRecorder {
2
+ maximumEntries;
3
+ #entries = [];
4
+ #sequence = 0;
5
+ #requestedFrames = 0;
6
+ #presentedFrames = 0;
7
+ #failedFrames = 0;
8
+ #lastFrameBytes = 0;
9
+ #resources = null;
10
+ #terminalRestorationFailed = false;
11
+ constructor(maximumEntries = 100) {
12
+ this.maximumEntries = maximumEntries;
13
+ if (!Number.isSafeInteger(maximumEntries) || maximumEntries <= 0)
14
+ throw new RangeError("diagnostic capacity must be positive");
15
+ }
16
+ entries() {
17
+ return this.#entries.map(entry => ({ ...entry }));
18
+ }
19
+ record(severity, code, message, recoverable = true) {
20
+ const entry = {
21
+ sequence: this.#sequence++,
22
+ code: sanitizeDiagnosticCode(code),
23
+ severity,
24
+ message: redactDiagnosticMessage(message),
25
+ recoverable,
26
+ };
27
+ this.#entries.push(entry);
28
+ if (this.#entries.length > this.maximumEntries)
29
+ this.#entries.shift();
30
+ return { ...entry };
31
+ }
32
+ noteFrame(bytes, failed = false) {
33
+ if (!Number.isSafeInteger(bytes) || bytes < 0)
34
+ throw new RangeError("frame byte count is invalid");
35
+ this.#requestedFrames += 1;
36
+ if (failed)
37
+ this.#failedFrames += 1;
38
+ else
39
+ this.#presentedFrames += 1;
40
+ this.#lastFrameBytes = bytes;
41
+ return this.frames();
42
+ }
43
+ noteResources(observation) {
44
+ for (const value of Object.values(observation)) {
45
+ if (!Number.isFinite(value) || value < 0)
46
+ throw new RangeError("resource observations must be non-negative finite values");
47
+ }
48
+ this.#resources = Object.freeze({ ...observation });
49
+ return this.#resources;
50
+ }
51
+ captureResources(read = () => process.resourceUsage()) {
52
+ const usage = read();
53
+ return this.noteResources({
54
+ cpuUserMicros: usage.userCPUTime,
55
+ cpuSystemMicros: usage.systemCPUTime,
56
+ residentMemoryBytes: process.memoryUsage().rss,
57
+ heapBytes: process.memoryUsage().heapUsed,
58
+ });
59
+ }
60
+ noteTerminalRestorationFailure(error) {
61
+ this.#terminalRestorationFailed = true;
62
+ return this.record("error", "terminal-restoration", error instanceof Error ? error.message : String(error), false);
63
+ }
64
+ frames() {
65
+ return {
66
+ requestedFrames: this.#requestedFrames,
67
+ presentedFrames: this.#presentedFrames,
68
+ failedFrames: this.#failedFrames,
69
+ lastFrameBytes: this.#lastFrameBytes,
70
+ };
71
+ }
72
+ snapshot() {
73
+ return {
74
+ entries: this.entries(),
75
+ frames: this.frames(),
76
+ resources: this.#resources === null ? null : { ...this.#resources },
77
+ terminalRestorationFailed: this.#terminalRestorationFailed,
78
+ };
79
+ }
80
+ }
81
+ export function redactDiagnosticMessage(message) {
82
+ return message
83
+ .replace(/[A-Za-z0-9_\-]{24,}\.[A-Za-z0-9_\-]{12,}\.[A-Za-z0-9_\-]{12,}/g, "[redacted-token]")
84
+ .replace(/(api[_-]?key|token|secret|password)=([^\s]+)/gi, "$1=[redacted]")
85
+ .replace(/[A-Z]:\\Users\\[^\\\s]+/gi, "[home]")
86
+ .replace(/\/home\/[^/\s]+/g, "[home]")
87
+ .slice(0, 4_096);
88
+ }
89
+ function sanitizeDiagnosticCode(code) {
90
+ const normalized = code.toLowerCase().replace(/[^a-z0-9._:-]+/g, "-").replace(/^-+|-+$/g, "");
91
+ if (!normalized)
92
+ throw new TypeError("diagnostic code is invalid");
93
+ return normalized.slice(0, 128);
94
+ }
95
+ //# sourceMappingURL=diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagn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CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./customization.js";
2
+ export * from "./diagnostics.js";
3
+ export * from "./run.js";
4
+ export * from "./pi-session-shell.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/owned-ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./customization.js";
2
+ export * from "./diagnostics.js";
3
+ export * from "./run.js";
4
+ export * from "./pi-session-shell.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/owned-ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,97 @@
1
+ import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel } from "../../foundation/owned-ui-contracts/index.js";
2
+ import { type AdapterCommandResult, type PiEngineAdapter, type PiWorkflowRequest, type PiWorkflowResult } from "../../foundation/pi-engine-adapter/index.js";
3
+ import { type PiShellComponentPort, type PiShellEditorPort, type PiShellExtensionRendererResolver, type PiShellHeaderOptions, type PiShellHeaderPort, type PiShellLoadedResourcesPort, type PiShellSelectorOption, type PiShellTranscriptComponentPort } from "../../foundation/pi-component-adapter/index.js";
4
+ import { PiTuiRuntimeAdapter, type PiTuiComponentPort, type PiTuiLayoutNode, type PiTuiOverlayHandle, type PiTuiTerminalPort } from "../../foundation/pi-tui-runtime-adapter/index.js";
5
+ export interface PiSessionShellOptions {
6
+ readonly adapter: PiEngineAdapter;
7
+ readonly cwd: string;
8
+ readonly terminal?: PiTuiTerminalPort;
9
+ readonly startup?: PiShellHeaderOptions;
10
+ }
11
+ export declare class PiSessionShellRoot implements PiTuiComponentPort {
12
+ #private;
13
+ readonly editor: PiShellEditorPort;
14
+ readonly header: PiShellHeaderPort;
15
+ readonly resources: PiShellLoadedResourcesPort;
16
+ constructor(view: OwnedUiSessionViewModel, cwd: string, handlers: {
17
+ readonly getColumns: () => number;
18
+ readonly getRows: () => number;
19
+ readonly requestRender: () => void;
20
+ readonly onSubmit: (text: string) => void;
21
+ readonly onInterrupt: () => void;
22
+ readonly onClear?: () => void;
23
+ readonly onExit: () => void;
24
+ readonly onModelSelect: () => void;
25
+ readonly onModelCycle?: (direction: "forward" | "backward") => void;
26
+ readonly onThinkingCycle: () => void;
27
+ readonly onThinkingToggle?: () => void;
28
+ readonly onMessageCopy?: () => void;
29
+ readonly onFollowUp?: () => void;
30
+ readonly onDequeue?: () => void;
31
+ }, startup?: PiShellHeaderOptions, agentDir?: string, extensionRenderers?: PiShellExtensionRendererResolver);
32
+ update(view: OwnedUiSessionViewModel): void;
33
+ render(width: number): readonly string[];
34
+ layoutRoot(): PiTuiLayoutNode;
35
+ transcriptComponent(id: string): PiShellTranscriptComponentPort | undefined;
36
+ appendWorkflowStatus(message: string): void;
37
+ appendWorkflowResult(result: PiWorkflowResult): void;
38
+ appendDaxnuts(): void;
39
+ toggleThinkingVisibility(): void;
40
+ get toolsExpanded(): boolean;
41
+ setToolsExpanded(expanded: boolean): void;
42
+ setExtensionWidget(key: string, component: PiShellComponentPort | null, placement: "aboveEditor" | "belowEditor"): void;
43
+ setExtensionHeader(component: PiShellComponentPort | null): void;
44
+ setExtensionFooter(component: PiShellComponentPort | null): void;
45
+ setExtensionStatus(key: string, text: string | undefined): void;
46
+ setExtensionWorking(message: string | undefined, visible?: boolean): void;
47
+ resetWorkflowPresentation(): void;
48
+ resetExtensionUi(): void;
49
+ addExtensionNotification(message: string, type: "info" | "warning" | "error"): void;
50
+ extensionFooterData(): unknown;
51
+ setInputSurface(component: PiShellComponentPort | null, disposePrevious?: boolean): void;
52
+ handleInput(data: string): void;
53
+ invalidate(): void;
54
+ setFocused(focused: boolean): void;
55
+ dispose(): void;
56
+ }
57
+ export declare class PiSessionShell {
58
+ #private;
59
+ readonly adapter: PiEngineAdapter;
60
+ readonly root: PiSessionShellRoot;
61
+ readonly runtime: PiTuiRuntimeAdapter;
62
+ constructor(options: PiSessionShellOptions);
63
+ view(): OwnedUiSessionViewModel;
64
+ start(): void;
65
+ onView(listener: (view: OwnedUiSessionViewModel) => void): () => void;
66
+ waitUntilStopped(): Promise<void>;
67
+ submit(text: string): Promise<AdapterCommandResult>;
68
+ clearOrExit(now?: number): Promise<AdapterCommandResult>;
69
+ interrupt(): Promise<AdapterCommandResult>;
70
+ abort(): Promise<AdapterCommandResult>;
71
+ retry(): Promise<AdapterCommandResult>;
72
+ compact(): Promise<AdapterCommandResult>;
73
+ newSession(): Promise<AdapterCommandResult>;
74
+ resumeSession(sessionPath: string): Promise<AdapterCommandResult>;
75
+ setModel(providerId: string, modelId: string): Promise<AdapterCommandResult>;
76
+ setThinkingLevel(thinkingLevel: OwnedUiThinkingLevel): Promise<AdapterCommandResult>;
77
+ cycleThinkingLevel(): Promise<AdapterCommandResult>;
78
+ cycleModel(direction: "forward" | "backward"): Promise<AdapterCommandResult>;
79
+ queueFollowUp(): Promise<AdapterCommandResult>;
80
+ restoreQueuedInput(): void;
81
+ showSelector(title: string, options: readonly PiShellSelectorOption[], onSelect: (id: string) => void, onCancel?: () => void): PiTuiOverlayHandle;
82
+ showModelSelector(): void;
83
+ showForkSelector(): void;
84
+ showLogoutSelector(): Promise<void>;
85
+ showLoginMethodSelector(providerReference: string): void;
86
+ showTreeSelector(initialSelectedId?: string): void;
87
+ showLoginAuthTypeSelector(): void;
88
+ showLoginProviderSelector(authType: "oauth" | "api_key"): void;
89
+ showSessionSelector(): void;
90
+ showSettingsSelector(): void;
91
+ shutdown(): Promise<AdapterCommandResult>;
92
+ runWorkflow(request: PiWorkflowRequest): Promise<AdapterCommandResult>;
93
+ showTrustSelector(): void;
94
+ showScopedModelsSelector(): void;
95
+ dispose(): Promise<void>;
96
+ }
97
+ //# sourceMappingURL=pi-session-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi-session-shell.d.ts","sourceRoot":"","sources":["../../../../src/features/owned-ui/pi-session-shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EAIpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAiCL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAK/B,KAAK,qBAAqB,EAE1B,KAAK,8BAA8B,EAEpC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,kDAAkD,CAAC;AAE1D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;CACzC;AAED,qBAAa,kBAAmB,YAAW,kBAAkB;;IAC3D,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;gBA6B7C,IAAI,EAAE,uBAAuB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