sept-agent 0.0.0-stage → 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 (642) hide show
  1. package/CONTRIBUTING.md +48 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +32 -0
  4. package/README.md +93 -2
  5. package/dist/src/cli/auth-interaction.d.ts +7 -0
  6. package/dist/src/cli/auth-interaction.js +127 -0
  7. package/dist/src/cli/auth-interaction.js.map +1 -0
  8. package/dist/src/cli/commands.d.ts +18 -0
  9. package/dist/src/cli/commands.js +239 -0
  10. package/dist/src/cli/commands.js.map +1 -0
  11. package/dist/src/cli/errors.d.ts +8 -0
  12. package/dist/src/cli/errors.js +12 -0
  13. package/dist/src/cli/errors.js.map +1 -0
  14. package/dist/src/cli/options.d.ts +24 -0
  15. package/dist/src/cli/options.js +76 -0
  16. package/dist/src/cli/options.js.map +1 -0
  17. package/dist/src/cli/permission-decisions.d.ts +8 -0
  18. package/dist/src/cli/permission-decisions.js +168 -0
  19. package/dist/src/cli/permission-decisions.js.map +1 -0
  20. package/dist/src/cli/permissions.d.ts +7 -0
  21. package/dist/src/cli/permissions.js +140 -0
  22. package/dist/src/cli/permissions.js.map +1 -0
  23. package/dist/src/cli.d.ts +6 -0
  24. package/dist/src/cli.js +39 -0
  25. package/dist/src/cli.js.map +1 -0
  26. package/dist/src/client/client.d.ts +5 -0
  27. package/dist/src/client/client.js +75 -0
  28. package/dist/src/client/client.js.map +1 -0
  29. package/dist/src/client/contracts.d.ts +76 -0
  30. package/dist/src/client/contracts.js +2 -0
  31. package/dist/src/client/contracts.js.map +1 -0
  32. package/dist/src/client/errors.d.ts +10 -0
  33. package/dist/src/client/errors.js +23 -0
  34. package/dist/src/client/errors.js.map +1 -0
  35. package/dist/src/client/index.d.ts +4 -0
  36. package/dist/src/client/index.js +3 -0
  37. package/dist/src/client/index.js.map +1 -0
  38. package/dist/src/client/request-codecs.d.ts +26 -0
  39. package/dist/src/client/request-codecs.js +101 -0
  40. package/dist/src/client/request-codecs.js.map +1 -0
  41. package/dist/src/client/response-codecs.d.ts +11 -0
  42. package/dist/src/client/response-codecs.js +135 -0
  43. package/dist/src/client/response-codecs.js.map +1 -0
  44. package/dist/src/client/transport.d.ts +7 -0
  45. package/dist/src/client/transport.js +136 -0
  46. package/dist/src/client/transport.js.map +1 -0
  47. package/dist/src/durable/capability-policy.d.ts +52 -0
  48. package/dist/src/durable/capability-policy.js +171 -0
  49. package/dist/src/durable/capability-policy.js.map +1 -0
  50. package/dist/src/durable/capability-request-codec.d.ts +49 -0
  51. package/dist/src/durable/capability-request-codec.js +125 -0
  52. package/dist/src/durable/capability-request-codec.js.map +1 -0
  53. package/dist/src/durable/capability-requests.d.ts +20 -0
  54. package/dist/src/durable/capability-requests.js +143 -0
  55. package/dist/src/durable/capability-requests.js.map +1 -0
  56. package/dist/src/durable/context-transfer-store.d.ts +34 -0
  57. package/dist/src/durable/context-transfer-store.js +125 -0
  58. package/dist/src/durable/context-transfer-store.js.map +1 -0
  59. package/dist/src/durable/contracts.d.ts +146 -0
  60. package/dist/src/durable/contracts.js +27 -0
  61. package/dist/src/durable/contracts.js.map +1 -0
  62. package/dist/src/durable/control-codecs.d.ts +19 -0
  63. package/dist/src/durable/control-codecs.js +168 -0
  64. package/dist/src/durable/control-codecs.js.map +1 -0
  65. package/dist/src/durable/conversation-store.d.ts +36 -0
  66. package/dist/src/durable/conversation-store.js +212 -0
  67. package/dist/src/durable/conversation-store.js.map +1 -0
  68. package/dist/src/durable/errors.d.ts +20 -0
  69. package/dist/src/durable/errors.js +27 -0
  70. package/dist/src/durable/errors.js.map +1 -0
  71. package/dist/src/durable/evidence-codecs.d.ts +15 -0
  72. package/dist/src/durable/evidence-codecs.js +131 -0
  73. package/dist/src/durable/evidence-codecs.js.map +1 -0
  74. package/dist/src/durable/filesystem.d.ts +24 -0
  75. package/dist/src/durable/filesystem.js +183 -0
  76. package/dist/src/durable/filesystem.js.map +1 -0
  77. package/dist/src/durable/index.d.ts +29 -0
  78. package/dist/src/durable/index.js +30 -0
  79. package/dist/src/durable/index.js.map +1 -0
  80. package/dist/src/durable/lease.d.ts +10 -0
  81. package/dist/src/durable/lease.js +260 -0
  82. package/dist/src/durable/lease.js.map +1 -0
  83. package/dist/src/durable/limits.d.ts +25 -0
  84. package/dist/src/durable/limits.js +26 -0
  85. package/dist/src/durable/limits.js.map +1 -0
  86. package/dist/src/durable/operator-queue.d.ts +35 -0
  87. package/dist/src/durable/operator-queue.js +174 -0
  88. package/dist/src/durable/operator-queue.js.map +1 -0
  89. package/dist/src/durable/run-discovery.d.ts +8 -0
  90. package/dist/src/durable/run-discovery.js +62 -0
  91. package/dist/src/durable/run-discovery.js.map +1 -0
  92. package/dist/src/durable/run-evidence.d.ts +22 -0
  93. package/dist/src/durable/run-evidence.js +72 -0
  94. package/dist/src/durable/run-evidence.js.map +1 -0
  95. package/dist/src/durable/run-store.d.ts +85 -0
  96. package/dist/src/durable/run-store.js +275 -0
  97. package/dist/src/durable/run-store.js.map +1 -0
  98. package/dist/src/durable/sqlite-builtin.d.ts +6 -0
  99. package/dist/src/durable/sqlite-builtin.js +59 -0
  100. package/dist/src/durable/sqlite-builtin.js.map +1 -0
  101. package/dist/src/durable/state-codecs.d.ts +10 -0
  102. package/dist/src/durable/state-codecs.js +209 -0
  103. package/dist/src/durable/state-codecs.js.map +1 -0
  104. package/dist/src/durable/validation-primitives.d.ts +18 -0
  105. package/dist/src/durable/validation-primitives.js +65 -0
  106. package/dist/src/durable/validation-primitives.js.map +1 -0
  107. package/dist/src/durable/worker-lifecycle-store.d.ts +18 -0
  108. package/dist/src/durable/worker-lifecycle-store.js +58 -0
  109. package/dist/src/durable/worker-lifecycle-store.js.map +1 -0
  110. package/dist/src/execution/capability-admission.d.ts +18 -0
  111. package/dist/src/execution/capability-admission.js +227 -0
  112. package/dist/src/execution/capability-admission.js.map +1 -0
  113. package/dist/src/execution/capability-requests.d.ts +35 -0
  114. package/dist/src/execution/capability-requests.js +187 -0
  115. package/dist/src/execution/capability-requests.js.map +1 -0
  116. package/dist/src/execution/contracts.d.ts +208 -0
  117. package/dist/src/execution/contracts.js +84 -0
  118. package/dist/src/execution/contracts.js.map +1 -0
  119. package/dist/src/execution/custom-hand.d.ts +10 -0
  120. package/dist/src/execution/custom-hand.js +62 -0
  121. package/dist/src/execution/custom-hand.js.map +1 -0
  122. package/dist/src/execution/docker-backend.d.ts +57 -0
  123. package/dist/src/execution/docker-backend.js +245 -0
  124. package/dist/src/execution/docker-backend.js.map +1 -0
  125. package/dist/src/execution/docker-control.d.ts +43 -0
  126. package/dist/src/execution/docker-control.js +249 -0
  127. package/dist/src/execution/docker-control.js.map +1 -0
  128. package/dist/src/execution/docker-engine.d.ts +36 -0
  129. package/dist/src/execution/docker-engine.js +190 -0
  130. package/dist/src/execution/docker-engine.js.map +1 -0
  131. package/dist/src/execution/engine-failure.d.ts +25 -0
  132. package/dist/src/execution/engine-failure.js +31 -0
  133. package/dist/src/execution/engine-failure.js.map +1 -0
  134. package/dist/src/execution/engine-http.d.ts +19 -0
  135. package/dist/src/execution/engine-http.js +163 -0
  136. package/dist/src/execution/engine-http.js.map +1 -0
  137. package/dist/src/execution/engine-stream.d.ts +20 -0
  138. package/dist/src/execution/engine-stream.js +74 -0
  139. package/dist/src/execution/engine-stream.js.map +1 -0
  140. package/dist/src/execution/hands-bootstrap.d.ts +5 -0
  141. package/dist/src/execution/hands-bootstrap.js +51 -0
  142. package/dist/src/execution/hands-bootstrap.js.map +1 -0
  143. package/dist/src/execution/hands-command-authority.d.ts +10 -0
  144. package/dist/src/execution/hands-command-authority.js +142 -0
  145. package/dist/src/execution/hands-command-authority.js.map +1 -0
  146. package/dist/src/execution/hands-command-client.d.ts +19 -0
  147. package/dist/src/execution/hands-command-client.js +57 -0
  148. package/dist/src/execution/hands-command-client.js.map +1 -0
  149. package/dist/src/execution/hands-command-contracts.d.ts +32 -0
  150. package/dist/src/execution/hands-command-contracts.js +2 -0
  151. package/dist/src/execution/hands-command-contracts.js.map +1 -0
  152. package/dist/src/execution/hands-discovery.d.ts +22 -0
  153. package/dist/src/execution/hands-discovery.js +71 -0
  154. package/dist/src/execution/hands-discovery.js.map +1 -0
  155. package/dist/src/execution/hands-effects.d.ts +5 -0
  156. package/dist/src/execution/hands-effects.js +59 -0
  157. package/dist/src/execution/hands-effects.js.map +1 -0
  158. package/dist/src/execution/hands-entry.d.ts +5 -0
  159. package/dist/src/execution/hands-entry.js +139 -0
  160. package/dist/src/execution/hands-entry.js.map +1 -0
  161. package/dist/src/execution/hands-file-options.d.ts +11 -0
  162. package/dist/src/execution/hands-file-options.js +26 -0
  163. package/dist/src/execution/hands-file-options.js.map +1 -0
  164. package/dist/src/execution/hands-files.d.ts +52 -0
  165. package/dist/src/execution/hands-files.js +266 -0
  166. package/dist/src/execution/hands-files.js.map +1 -0
  167. package/dist/src/execution/hands-frame-decoder.d.ts +24 -0
  168. package/dist/src/execution/hands-frame-decoder.js +113 -0
  169. package/dist/src/execution/hands-frame-decoder.js.map +1 -0
  170. package/dist/src/execution/hands-guarded-command.d.ts +4 -0
  171. package/dist/src/execution/hands-guarded-command.js +25 -0
  172. package/dist/src/execution/hands-guarded-command.js.map +1 -0
  173. package/dist/src/execution/hands-live-authority.d.ts +13 -0
  174. package/dist/src/execution/hands-live-authority.js +17 -0
  175. package/dist/src/execution/hands-live-authority.js.map +1 -0
  176. package/dist/src/execution/hands-loss.d.ts +27 -0
  177. package/dist/src/execution/hands-loss.js +31 -0
  178. package/dist/src/execution/hands-loss.js.map +1 -0
  179. package/dist/src/execution/hands-native-child.d.ts +30 -0
  180. package/dist/src/execution/hands-native-child.js +105 -0
  181. package/dist/src/execution/hands-native-child.js.map +1 -0
  182. package/dist/src/execution/hands-opening.d.ts +16 -0
  183. package/dist/src/execution/hands-opening.js +31 -0
  184. package/dist/src/execution/hands-opening.js.map +1 -0
  185. package/dist/src/execution/hands-operation.d.ts +18 -0
  186. package/dist/src/execution/hands-operation.js +91 -0
  187. package/dist/src/execution/hands-operation.js.map +1 -0
  188. package/dist/src/execution/hands-paths.d.ts +27 -0
  189. package/dist/src/execution/hands-paths.js +136 -0
  190. package/dist/src/execution/hands-paths.js.map +1 -0
  191. package/dist/src/execution/hands-process-owner.d.ts +37 -0
  192. package/dist/src/execution/hands-process-owner.js +248 -0
  193. package/dist/src/execution/hands-process-owner.js.map +1 -0
  194. package/dist/src/execution/hands-processes.d.ts +46 -0
  195. package/dist/src/execution/hands-processes.js +262 -0
  196. package/dist/src/execution/hands-processes.js.map +1 -0
  197. package/dist/src/execution/hands-request.d.ts +5 -0
  198. package/dist/src/execution/hands-request.js +127 -0
  199. package/dist/src/execution/hands-request.js.map +1 -0
  200. package/dist/src/execution/hands-resident.d.ts +2 -0
  201. package/dist/src/execution/hands-resident.js +139 -0
  202. package/dist/src/execution/hands-resident.js.map +1 -0
  203. package/dist/src/execution/hands-resources.d.ts +13 -0
  204. package/dist/src/execution/hands-resources.js +179 -0
  205. package/dist/src/execution/hands-resources.js.map +1 -0
  206. package/dist/src/execution/hands-selected-inputs.d.ts +12 -0
  207. package/dist/src/execution/hands-selected-inputs.js +96 -0
  208. package/dist/src/execution/hands-selected-inputs.js.map +1 -0
  209. package/dist/src/execution/index.d.ts +11 -0
  210. package/dist/src/execution/index.js +12 -0
  211. package/dist/src/execution/index.js.map +1 -0
  212. package/dist/src/execution/native-env.d.ts +48 -0
  213. package/dist/src/execution/native-env.js +112 -0
  214. package/dist/src/execution/native-env.js.map +1 -0
  215. package/dist/src/execution/network-enforcement.d.ts +7 -0
  216. package/dist/src/execution/network-enforcement.js +129 -0
  217. package/dist/src/execution/network-enforcement.js.map +1 -0
  218. package/dist/src/execution/network-profile.d.ts +9 -0
  219. package/dist/src/execution/network-profile.js +220 -0
  220. package/dist/src/execution/network-profile.js.map +1 -0
  221. package/dist/src/execution/profile-configuration.d.ts +36 -0
  222. package/dist/src/execution/profile-configuration.js +268 -0
  223. package/dist/src/execution/profile-configuration.js.map +1 -0
  224. package/dist/src/execution/profile-sources.d.ts +4 -0
  225. package/dist/src/execution/profile-sources.js +61 -0
  226. package/dist/src/execution/profile-sources.js.map +1 -0
  227. package/dist/src/execution/profile.d.ts +13 -0
  228. package/dist/src/execution/profile.js +241 -0
  229. package/dist/src/execution/profile.js.map +1 -0
  230. package/dist/src/execution/protocol.d.ts +26 -0
  231. package/dist/src/execution/protocol.js +260 -0
  232. package/dist/src/execution/protocol.js.map +1 -0
  233. package/dist/src/execution/warm-channel.d.ts +41 -0
  234. package/dist/src/execution/warm-channel.js +266 -0
  235. package/dist/src/execution/warm-channel.js.map +1 -0
  236. package/dist/src/execution/warm-handshake.d.ts +6 -0
  237. package/dist/src/execution/warm-handshake.js +69 -0
  238. package/dist/src/execution/warm-handshake.js.map +1 -0
  239. package/dist/src/hands-api.d.ts +54 -0
  240. package/dist/src/hands-api.js +7 -0
  241. package/dist/src/hands-api.js.map +1 -0
  242. package/dist/src/hands.d.ts +2 -0
  243. package/dist/src/hands.js +3 -0
  244. package/dist/src/hands.js.map +1 -0
  245. package/dist/src/index.d.ts +4 -0
  246. package/dist/src/index.js +4 -0
  247. package/dist/src/index.js.map +1 -0
  248. package/dist/src/ingress/conversation-stream.d.ts +17 -0
  249. package/dist/src/ingress/conversation-stream.js +160 -0
  250. package/dist/src/ingress/conversation-stream.js.map +1 -0
  251. package/dist/src/ingress/errors.d.ts +14 -0
  252. package/dist/src/ingress/errors.js +20 -0
  253. package/dist/src/ingress/errors.js.map +1 -0
  254. package/dist/src/ingress/http-errors.d.ts +7 -0
  255. package/dist/src/ingress/http-errors.js +41 -0
  256. package/dist/src/ingress/http-errors.js.map +1 -0
  257. package/dist/src/ingress/http.d.ts +28 -0
  258. package/dist/src/ingress/http.js +174 -0
  259. package/dist/src/ingress/http.js.map +1 -0
  260. package/dist/src/ingress/index.d.ts +8 -0
  261. package/dist/src/ingress/index.js +9 -0
  262. package/dist/src/ingress/index.js.map +1 -0
  263. package/dist/src/ingress/request-router.d.ts +35 -0
  264. package/dist/src/ingress/request-router.js +209 -0
  265. package/dist/src/ingress/request-router.js.map +1 -0
  266. package/dist/src/ingress/service.d.ts +60 -0
  267. package/dist/src/ingress/service.js +252 -0
  268. package/dist/src/ingress/service.js.map +1 -0
  269. package/dist/src/ingress/validation.d.ts +29 -0
  270. package/dist/src/ingress/validation.js +254 -0
  271. package/dist/src/ingress/validation.js.map +1 -0
  272. package/dist/src/ingress/webhook-receipts.d.ts +40 -0
  273. package/dist/src/ingress/webhook-receipts.js +166 -0
  274. package/dist/src/ingress/webhook-receipts.js.map +1 -0
  275. package/dist/src/ingress/webhook-router.d.ts +39 -0
  276. package/dist/src/ingress/webhook-router.js +154 -0
  277. package/dist/src/ingress/webhook-router.js.map +1 -0
  278. package/dist/src/ingress/webhook.d.ts +39 -0
  279. package/dist/src/ingress/webhook.js +117 -0
  280. package/dist/src/ingress/webhook.js.map +1 -0
  281. package/dist/src/model-access/contracts.d.ts +113 -0
  282. package/dist/src/model-access/contracts.js +7 -0
  283. package/dist/src/model-access/contracts.js.map +1 -0
  284. package/dist/src/model-access/custom-configuration.d.ts +8 -0
  285. package/dist/src/model-access/custom-configuration.js +176 -0
  286. package/dist/src/model-access/custom-configuration.js.map +1 -0
  287. package/dist/src/model-access/index.d.ts +17 -0
  288. package/dist/src/model-access/index.js +16 -0
  289. package/dist/src/model-access/index.js.map +1 -0
  290. package/dist/src/model-access/input.d.ts +8 -0
  291. package/dist/src/model-access/input.js +11 -0
  292. package/dist/src/model-access/input.js.map +1 -0
  293. package/dist/src/model-access/jsonc.d.ts +8 -0
  294. package/dist/src/model-access/jsonc.js +131 -0
  295. package/dist/src/model-access/jsonc.js.map +1 -0
  296. package/dist/src/model-access/model-metadata.d.ts +23 -0
  297. package/dist/src/model-access/model-metadata.js +40 -0
  298. package/dist/src/model-access/model-metadata.js.map +1 -0
  299. package/dist/src/model-access/normalization.d.ts +15 -0
  300. package/dist/src/model-access/normalization.js +69 -0
  301. package/dist/src/model-access/normalization.js.map +1 -0
  302. package/dist/src/model-access/pod-selection.d.ts +10 -0
  303. package/dist/src/model-access/pod-selection.js +61 -0
  304. package/dist/src/model-access/pod-selection.js.map +1 -0
  305. package/dist/src/model-access/runtime-factory.d.ts +14 -0
  306. package/dist/src/model-access/runtime-factory.js +29 -0
  307. package/dist/src/model-access/runtime-factory.js.map +1 -0
  308. package/dist/src/model-access/service.d.ts +40 -0
  309. package/dist/src/model-access/service.js +249 -0
  310. package/dist/src/model-access/service.js.map +1 -0
  311. package/dist/src/observability/configuration.d.ts +36 -0
  312. package/dist/src/observability/configuration.js +77 -0
  313. package/dist/src/observability/configuration.js.map +1 -0
  314. package/dist/src/observability/contract.d.ts +112 -0
  315. package/dist/src/observability/contract.js +7 -0
  316. package/dist/src/observability/contract.js.map +1 -0
  317. package/dist/src/observability/exporters.d.ts +29 -0
  318. package/dist/src/observability/exporters.js +104 -0
  319. package/dist/src/observability/exporters.js.map +1 -0
  320. package/dist/src/observability/index.d.ts +9 -0
  321. package/dist/src/observability/index.js +8 -0
  322. package/dist/src/observability/index.js.map +1 -0
  323. package/dist/src/observability/logger.d.ts +28 -0
  324. package/dist/src/observability/logger.js +124 -0
  325. package/dist/src/observability/logger.js.map +1 -0
  326. package/dist/src/observability/metrics.d.ts +63 -0
  327. package/dist/src/observability/metrics.js +284 -0
  328. package/dist/src/observability/metrics.js.map +1 -0
  329. package/dist/src/observability/safe-fields.d.ts +38 -0
  330. package/dist/src/observability/safe-fields.js +100 -0
  331. package/dist/src/observability/safe-fields.js.map +1 -0
  332. package/dist/src/observability/setup.d.ts +55 -0
  333. package/dist/src/observability/setup.js +109 -0
  334. package/dist/src/observability/setup.js.map +1 -0
  335. package/dist/src/observability/telemetry.d.ts +29 -0
  336. package/dist/src/observability/telemetry.js +183 -0
  337. package/dist/src/observability/telemetry.js.map +1 -0
  338. package/dist/src/observability/tracing.d.ts +70 -0
  339. package/dist/src/observability/tracing.js +252 -0
  340. package/dist/src/observability/tracing.js.map +1 -0
  341. package/dist/src/package-metadata.d.ts +7 -0
  342. package/dist/src/package-metadata.js +27 -0
  343. package/dist/src/package-metadata.js.map +1 -0
  344. package/dist/src/pi-integration/contracts.d.ts +72 -0
  345. package/dist/src/pi-integration/contracts.js +2 -0
  346. package/dist/src/pi-integration/contracts.js.map +1 -0
  347. package/dist/src/pi-integration/custom-tool.d.ts +10 -0
  348. package/dist/src/pi-integration/custom-tool.js +101 -0
  349. package/dist/src/pi-integration/custom-tool.js.map +1 -0
  350. package/dist/src/pi-integration/diagnostics.d.ts +15 -0
  351. package/dist/src/pi-integration/diagnostics.js +20 -0
  352. package/dist/src/pi-integration/diagnostics.js.map +1 -0
  353. package/dist/src/pi-integration/durable-admission.d.ts +22 -0
  354. package/dist/src/pi-integration/durable-admission.js +138 -0
  355. package/dist/src/pi-integration/durable-admission.js.map +1 -0
  356. package/dist/src/pi-integration/durable-database-preflight.d.ts +8 -0
  357. package/dist/src/pi-integration/durable-database-preflight.js +127 -0
  358. package/dist/src/pi-integration/durable-database-preflight.js.map +1 -0
  359. package/dist/src/pi-integration/durable-extensions.d.ts +4 -0
  360. package/dist/src/pi-integration/durable-extensions.js +189 -0
  361. package/dist/src/pi-integration/durable-extensions.js.map +1 -0
  362. package/dist/src/pi-integration/durable-guard.d.ts +20 -0
  363. package/dist/src/pi-integration/durable-guard.js +55 -0
  364. package/dist/src/pi-integration/durable-guard.js.map +1 -0
  365. package/dist/src/pi-integration/durable-host.d.ts +44 -0
  366. package/dist/src/pi-integration/durable-host.js +169 -0
  367. package/dist/src/pi-integration/durable-host.js.map +1 -0
  368. package/dist/src/pi-integration/durable-initialization.d.ts +10 -0
  369. package/dist/src/pi-integration/durable-initialization.js +75 -0
  370. package/dist/src/pi-integration/durable-initialization.js.map +1 -0
  371. package/dist/src/pi-integration/durable-invocation.d.ts +49 -0
  372. package/dist/src/pi-integration/durable-invocation.js +266 -0
  373. package/dist/src/pi-integration/durable-invocation.js.map +1 -0
  374. package/dist/src/pi-integration/durable-preflight.d.ts +9 -0
  375. package/dist/src/pi-integration/durable-preflight.js +207 -0
  376. package/dist/src/pi-integration/durable-preflight.js.map +1 -0
  377. package/dist/src/pi-integration/durable-resources.d.ts +6 -0
  378. package/dist/src/pi-integration/durable-resources.js +259 -0
  379. package/dist/src/pi-integration/durable-resources.js.map +1 -0
  380. package/dist/src/pi-integration/durable-rotation-recovery.d.ts +10 -0
  381. package/dist/src/pi-integration/durable-rotation-recovery.js +77 -0
  382. package/dist/src/pi-integration/durable-rotation-recovery.js.map +1 -0
  383. package/dist/src/pi-integration/durable-runtime.d.ts +10 -0
  384. package/dist/src/pi-integration/durable-runtime.js +190 -0
  385. package/dist/src/pi-integration/durable-runtime.js.map +1 -0
  386. package/dist/src/pi-integration/durable-session-files.d.ts +15 -0
  387. package/dist/src/pi-integration/durable-session-files.js +110 -0
  388. package/dist/src/pi-integration/durable-session-files.js.map +1 -0
  389. package/dist/src/pi-integration/durable-submission.d.ts +30 -0
  390. package/dist/src/pi-integration/durable-submission.js +105 -0
  391. package/dist/src/pi-integration/durable-submission.js.map +1 -0
  392. package/dist/src/pi-integration/durable-tools.d.ts +12 -0
  393. package/dist/src/pi-integration/durable-tools.js +151 -0
  394. package/dist/src/pi-integration/durable-tools.js.map +1 -0
  395. package/dist/src/pi-integration/index.d.ts +15 -0
  396. package/dist/src/pi-integration/index.js +15 -0
  397. package/dist/src/pi-integration/index.js.map +1 -0
  398. package/dist/src/pi-integration/message-text.d.ts +3 -0
  399. package/dist/src/pi-integration/message-text.js +24 -0
  400. package/dist/src/pi-integration/message-text.js.map +1 -0
  401. package/dist/src/pi-integration/prompts.d.ts +18 -0
  402. package/dist/src/pi-integration/prompts.js +77 -0
  403. package/dist/src/pi-integration/prompts.js.map +1 -0
  404. package/dist/src/pi-integration/rollover-evidence.d.ts +35 -0
  405. package/dist/src/pi-integration/rollover-evidence.js +202 -0
  406. package/dist/src/pi-integration/rollover-evidence.js.map +1 -0
  407. package/dist/src/pi-integration/rollover.d.ts +28 -0
  408. package/dist/src/pi-integration/rollover.js +106 -0
  409. package/dist/src/pi-integration/rollover.js.map +1 -0
  410. package/dist/src/pi-integration/sqlite-driver.d.ts +6 -0
  411. package/dist/src/pi-integration/sqlite-driver.js +24 -0
  412. package/dist/src/pi-integration/sqlite-driver.js.map +1 -0
  413. package/dist/src/runtime/contracts.d.ts +29 -0
  414. package/dist/src/runtime/contracts.js +7 -0
  415. package/dist/src/runtime/contracts.js.map +1 -0
  416. package/dist/src/runtime/controller.d.ts +37 -0
  417. package/dist/src/runtime/controller.js +231 -0
  418. package/dist/src/runtime/controller.js.map +1 -0
  419. package/dist/src/runtime/errors.d.ts +17 -0
  420. package/dist/src/runtime/errors.js +24 -0
  421. package/dist/src/runtime/errors.js.map +1 -0
  422. package/dist/src/runtime/index.d.ts +11 -0
  423. package/dist/src/runtime/index.js +11 -0
  424. package/dist/src/runtime/index.js.map +1 -0
  425. package/dist/src/runtime/invocation-loop.d.ts +33 -0
  426. package/dist/src/runtime/invocation-loop.js +193 -0
  427. package/dist/src/runtime/invocation-loop.js.map +1 -0
  428. package/dist/src/runtime/runtime-state.d.ts +26 -0
  429. package/dist/src/runtime/runtime-state.js +97 -0
  430. package/dist/src/runtime/runtime-state.js.map +1 -0
  431. package/dist/src/runtime/session-lifecycle.d.ts +33 -0
  432. package/dist/src/runtime/session-lifecycle.js +130 -0
  433. package/dist/src/runtime/session-lifecycle.js.map +1 -0
  434. package/dist/src/runtime/transitions.d.ts +40 -0
  435. package/dist/src/runtime/transitions.js +225 -0
  436. package/dist/src/runtime/transitions.js.map +1 -0
  437. package/dist/src/runtime/worker-execution.d.ts +33 -0
  438. package/dist/src/runtime/worker-execution.js +110 -0
  439. package/dist/src/runtime/worker-execution.js.map +1 -0
  440. package/dist/src/runtime/worker-messages.d.ts +20 -0
  441. package/dist/src/runtime/worker-messages.js +82 -0
  442. package/dist/src/runtime/worker-messages.js.map +1 -0
  443. package/dist/src/runtime/worker-policy.d.ts +26 -0
  444. package/dist/src/runtime/worker-policy.js +131 -0
  445. package/dist/src/runtime/worker-policy.js.map +1 -0
  446. package/dist/src/runtime/worker-recovery.d.ts +17 -0
  447. package/dist/src/runtime/worker-recovery.js +107 -0
  448. package/dist/src/runtime/worker-recovery.js.map +1 -0
  449. package/dist/src/runtime/worker.d.ts +64 -0
  450. package/dist/src/runtime/worker.js +267 -0
  451. package/dist/src/runtime/worker.js.map +1 -0
  452. package/dist/src/worker/capabilities.d.ts +11 -0
  453. package/dist/src/worker/capabilities.js +76 -0
  454. package/dist/src/worker/capabilities.js.map +1 -0
  455. package/dist/src/worker/index.d.ts +3 -0
  456. package/dist/src/worker/index.js +4 -0
  457. package/dist/src/worker/index.js.map +1 -0
  458. package/dist/src/worker/worker.d.ts +7 -0
  459. package/dist/src/worker/worker.js +59 -0
  460. package/dist/src/worker/worker.js.map +1 -0
  461. package/dist/src/worker-api.d.ts +25 -0
  462. package/dist/src/worker-api.js +4 -0
  463. package/dist/src/worker-api.js.map +1 -0
  464. package/docs/architecture.md +168 -0
  465. package/docs/index.md +55 -0
  466. package/docs/models.md +78 -0
  467. package/docs/observability.md +63 -0
  468. package/docs/pi-contract.md +479 -0
  469. package/docs/sdk.md +180 -0
  470. package/docs/worker-api.md +138 -0
  471. package/examples/incident-investigator/README.md +108 -0
  472. package/examples/incident-investigator/investigate.mjs +122 -0
  473. package/examples/incident-investigator/package.json +15 -0
  474. package/examples/node-app/README.md +65 -0
  475. package/examples/node-app/client.ts +55 -0
  476. package/examples/node-app/extensions/example.ts +39 -0
  477. package/examples/node-app/extensions/tsconfig.json +10 -0
  478. package/examples/node-app/package.json +24 -0
  479. package/examples/node-app/tsconfig.json +28 -0
  480. package/examples/node-app/worker.mjs +35 -0
  481. package/image/pi-native-search/README.md +108 -0
  482. package/image/pi-native-search/native-search.patch +84 -0
  483. package/image/pi-native-search/overlay.tgz +0 -0
  484. package/image/pi-native-search/provenance.json +40 -0
  485. package/package.json +92 -4
  486. package/sept +5 -0
  487. package/src/cli/auth-interaction.ts +151 -0
  488. package/src/cli/commands.ts +315 -0
  489. package/src/cli/errors.ts +12 -0
  490. package/src/cli/options.ts +90 -0
  491. package/src/cli/permission-decisions.ts +257 -0
  492. package/src/cli/permissions.ts +199 -0
  493. package/src/cli.ts +48 -0
  494. package/src/client/client.ts +159 -0
  495. package/src/client/contracts.ts +99 -0
  496. package/src/client/errors.ts +23 -0
  497. package/src/client/index.ts +23 -0
  498. package/src/client/request-codecs.ts +126 -0
  499. package/src/client/response-codecs.ts +164 -0
  500. package/src/client/transport.ts +156 -0
  501. package/src/durable/capability-policy.ts +220 -0
  502. package/src/durable/capability-request-codec.ts +179 -0
  503. package/src/durable/capability-requests.ts +172 -0
  504. package/src/durable/context-transfer-store.ts +178 -0
  505. package/src/durable/contracts.ts +196 -0
  506. package/src/durable/control-codecs.ts +233 -0
  507. package/src/durable/conversation-store.ts +274 -0
  508. package/src/durable/errors.ts +26 -0
  509. package/src/durable/evidence-codecs.ts +205 -0
  510. package/src/durable/filesystem.ts +230 -0
  511. package/src/durable/index.ts +91 -0
  512. package/src/durable/lease.ts +311 -0
  513. package/src/durable/limits.ts +35 -0
  514. package/src/durable/operator-queue.ts +217 -0
  515. package/src/durable/run-discovery.ts +66 -0
  516. package/src/durable/run-evidence.ts +82 -0
  517. package/src/durable/run-store.ts +358 -0
  518. package/src/durable/sqlite-builtin.ts +77 -0
  519. package/src/durable/state-codecs.ts +280 -0
  520. package/src/durable/validation-primitives.ts +83 -0
  521. package/src/durable/worker-lifecycle-store.ts +62 -0
  522. package/src/execution/capability-admission.ts +310 -0
  523. package/src/execution/capability-requests.ts +226 -0
  524. package/src/execution/contracts.ts +285 -0
  525. package/src/execution/custom-hand.ts +87 -0
  526. package/src/execution/docker-backend.ts +326 -0
  527. package/src/execution/docker-control.ts +318 -0
  528. package/src/execution/docker-engine.ts +224 -0
  529. package/src/execution/engine-failure.ts +68 -0
  530. package/src/execution/engine-http.ts +214 -0
  531. package/src/execution/engine-stream.ts +70 -0
  532. package/src/execution/hands-bootstrap.ts +52 -0
  533. package/src/execution/hands-command-authority.ts +170 -0
  534. package/src/execution/hands-command-client.ts +65 -0
  535. package/src/execution/hands-command-contracts.ts +41 -0
  536. package/src/execution/hands-command.c +50 -0
  537. package/src/execution/hands-discovery.ts +104 -0
  538. package/src/execution/hands-effects.ts +82 -0
  539. package/src/execution/hands-entry.ts +219 -0
  540. package/src/execution/hands-file-options.ts +35 -0
  541. package/src/execution/hands-files.ts +319 -0
  542. package/src/execution/hands-frame-decoder.ts +106 -0
  543. package/src/execution/hands-guard.c +134 -0
  544. package/src/execution/hands-guarded-command.ts +31 -0
  545. package/src/execution/hands-live-authority.ts +30 -0
  546. package/src/execution/hands-loss.ts +53 -0
  547. package/src/execution/hands-native-child.ts +138 -0
  548. package/src/execution/hands-opening.ts +51 -0
  549. package/src/execution/hands-operation.ts +136 -0
  550. package/src/execution/hands-paths.ts +178 -0
  551. package/src/execution/hands-process-control.c +180 -0
  552. package/src/execution/hands-process-owner.ts +312 -0
  553. package/src/execution/hands-processes.ts +289 -0
  554. package/src/execution/hands-request.ts +140 -0
  555. package/src/execution/hands-resident.ts +190 -0
  556. package/src/execution/hands-resources.ts +254 -0
  557. package/src/execution/hands-selected-inputs.ts +108 -0
  558. package/src/execution/index.ts +36 -0
  559. package/src/execution/native-env.ts +170 -0
  560. package/src/execution/network-enforcement.ts +160 -0
  561. package/src/execution/network-profile.ts +261 -0
  562. package/src/execution/profile-configuration.ts +326 -0
  563. package/src/execution/profile-sources.ts +66 -0
  564. package/src/execution/profile.ts +302 -0
  565. package/src/execution/protocol.ts +291 -0
  566. package/src/execution/warm-channel.ts +310 -0
  567. package/src/execution/warm-handshake.ts +92 -0
  568. package/src/hands-api.ts +53 -0
  569. package/src/hands.ts +6 -0
  570. package/src/index.ts +4 -0
  571. package/src/ingress/conversation-stream.ts +198 -0
  572. package/src/ingress/errors.ts +23 -0
  573. package/src/ingress/http-errors.ts +43 -0
  574. package/src/ingress/http.ts +212 -0
  575. package/src/ingress/index.ts +10 -0
  576. package/src/ingress/request-router.ts +301 -0
  577. package/src/ingress/service.ts +323 -0
  578. package/src/ingress/validation.ts +339 -0
  579. package/src/ingress/webhook-receipts.ts +223 -0
  580. package/src/ingress/webhook-router.ts +207 -0
  581. package/src/ingress/webhook.ts +171 -0
  582. package/src/model-access/contracts.ts +119 -0
  583. package/src/model-access/custom-configuration.ts +227 -0
  584. package/src/model-access/index.ts +38 -0
  585. package/src/model-access/input.ts +12 -0
  586. package/src/model-access/jsonc.ts +143 -0
  587. package/src/model-access/model-metadata.ts +60 -0
  588. package/src/model-access/normalization.ts +86 -0
  589. package/src/model-access/pod-selection.ts +67 -0
  590. package/src/model-access/runtime-factory.ts +42 -0
  591. package/src/model-access/service.ts +339 -0
  592. package/src/observability/configuration.ts +113 -0
  593. package/src/observability/contract.ts +153 -0
  594. package/src/observability/exporters.ts +133 -0
  595. package/src/observability/index.ts +16 -0
  596. package/src/observability/logger.ts +151 -0
  597. package/src/observability/metrics.ts +344 -0
  598. package/src/observability/safe-fields.ts +114 -0
  599. package/src/observability/setup.ts +194 -0
  600. package/src/observability/telemetry.ts +256 -0
  601. package/src/observability/tracing.ts +350 -0
  602. package/src/package-metadata.ts +32 -0
  603. package/src/pi-integration/contracts.ts +82 -0
  604. package/src/pi-integration/custom-tool.ts +142 -0
  605. package/src/pi-integration/diagnostics.ts +30 -0
  606. package/src/pi-integration/durable-admission.ts +178 -0
  607. package/src/pi-integration/durable-database-preflight.ts +165 -0
  608. package/src/pi-integration/durable-extensions.ts +222 -0
  609. package/src/pi-integration/durable-guard.ts +64 -0
  610. package/src/pi-integration/durable-host.ts +234 -0
  611. package/src/pi-integration/durable-initialization.ts +88 -0
  612. package/src/pi-integration/durable-invocation.ts +327 -0
  613. package/src/pi-integration/durable-preflight.ts +266 -0
  614. package/src/pi-integration/durable-resources.ts +323 -0
  615. package/src/pi-integration/durable-rotation-recovery.ts +115 -0
  616. package/src/pi-integration/durable-runtime.ts +320 -0
  617. package/src/pi-integration/durable-session-files.ts +135 -0
  618. package/src/pi-integration/durable-submission.ts +153 -0
  619. package/src/pi-integration/durable-tools.ts +271 -0
  620. package/src/pi-integration/index.ts +31 -0
  621. package/src/pi-integration/message-text.ts +26 -0
  622. package/src/pi-integration/prompts.ts +89 -0
  623. package/src/pi-integration/rollover-evidence.ts +275 -0
  624. package/src/pi-integration/rollover.ts +154 -0
  625. package/src/pi-integration/sqlite-driver.ts +28 -0
  626. package/src/runtime/contracts.ts +34 -0
  627. package/src/runtime/controller.ts +327 -0
  628. package/src/runtime/errors.ts +26 -0
  629. package/src/runtime/index.ts +18 -0
  630. package/src/runtime/invocation-loop.ts +279 -0
  631. package/src/runtime/runtime-state.ts +157 -0
  632. package/src/runtime/session-lifecycle.ts +163 -0
  633. package/src/runtime/transitions.ts +317 -0
  634. package/src/runtime/worker-execution.ts +139 -0
  635. package/src/runtime/worker-messages.ts +99 -0
  636. package/src/runtime/worker-policy.ts +183 -0
  637. package/src/runtime/worker-recovery.ts +141 -0
  638. package/src/runtime/worker.ts +342 -0
  639. package/src/worker/capabilities.ts +106 -0
  640. package/src/worker/index.ts +7 -0
  641. package/src/worker/worker.ts +69 -0
  642. package/src/worker-api.ts +30 -0
@@ -0,0 +1,48 @@
1
+ # Contributing to SEPT
2
+
3
+ Use a complete source checkout and Node.js >=22.19.0. Read the repository-only [AGENTS.md](https://github.com/DB-Conneely/sept/blob/main/AGENTS.md) and [TypeScript rules](https://github.com/DB-Conneely/sept/blob/main/.codex/rules/typescript.md) before changing source/tests. They are intentionally not shipped as npm build inputs. Keep the thin Pi-owned architecture and preserve user work and meaningful history. Deployment is performed manually by the user through GitHub CI/CD.
4
+
5
+ ## Setup and gates
6
+
7
+ ```sh
8
+ npm ci
9
+ npm run check
10
+ ```
11
+
12
+ Dependencies are exact pins: Pi Durable/coding-agent/AI/Chord/codemode1.1.0, TypeScript 5.9.2 and Node types 24.3.1. Keep the lockfile, strict compiler, architecture rules, exported-behavior checks and test concurrency 4. Do not substitute a compiler, hide declaration failures with broader skips, or patch host npm Pi headers. The image-only native-search overlay is separately pinned and verified.
13
+
14
+ For Docker-dependent gates, select one trusted canonical local Unix socket and clear ambient Docker selection. Run from the pinned full checkout; building is local verification, not deployment:
15
+
16
+ ```sh
17
+ export SEPT_ENGINE_SOCKET=/run/docker.sock # choose the actual trusted local socket
18
+ export SEPT_ENGINE_SOCKET="$(node -e 'console.log(require("node:fs").realpathSync(process.env.SEPT_ENGINE_SOCKET))')"
19
+ export SEPT_ENGINE_HOST="unix://$SEPT_ENGINE_SOCKET"
20
+ env -u DOCKER_HOST -u DOCKER_CONTEXT docker --host "$SEPT_ENGINE_HOST" \
21
+ build --no-cache --iidfile /absolute/private/evidence/sept.iid -t sept:local .
22
+ SEPT_HANDS_TEST_IMAGE="$(cat /absolute/private/evidence/sept.iid)" npm run gate
23
+ npm audit
24
+ ```
25
+
26
+ Create the evidence directory first; keep build/image receipts. Check the actual actor traversal, cgroup v2 and memory/PID/disk headroom. Gate fixture Engine selection follows the test host's configuration; the supplied-hands consumer recipe uses its explicit socket. Full native Linux/amd64 is the gate target; the bounded native Mac ARM Docker Linux smoke is separate. A full Darwin suite is not a release gate.
27
+
28
+ After each coherent module: `npm run check`, directly affected tests, structural/TSDoc review, then unchanged `npm run gate`. The gate includes build, all compiled tests, meta-tests and `npm audit --omit=dev`. Before handoff also run `git diff --check` and full audit. A red/unrun gate is incomplete. Serialize independently launched heavy build/gate/provider work under nice 10; retain unchanged test concurrency 4. Join every job and independent finalizer. `npm run build` and `prepack` clean `dist`; wait for all dist consumers before running them.
29
+
30
+ ## Ownership and change expectations
31
+
32
+ [Architecture](docs/architecture.md) names the mechanism boundaries. Cross-mechanism imports use intentional indexes. Pi alone owns providers/authentication, generation/tool tasks, native scheduling/replay and context accounting. SEPT owns durable task/lifecycle/evidence, bounded authenticated transport and explicitly supplied execution authority. Do not add another provider SDK, model loop, tokenizer, compactor, scheduler, extension ABI or provisioner.
33
+
34
+ Keep functions/files cohesive and documented; validate hostile input once at its owning boundary, use typed domain errors, preserve first-cause cancellation and independent cleanup, bound resources before buffering, and preserve fsync-before-transition ordering. Credentials never enter prompts, durable/public state, telemetry, logs or images. Trusted extensions are full-authority brain code; workspace instructions/skills and mounts never grant executable authority. Hands checks live policy beside effects and fails closed.
35
+
36
+ A focused PR should explain the concrete trigger and resulting behavior, exact owner/callers and relevant validation. Update public contracts/docs/examples together. Add meaningful focused regression coverage for behavior, important errors and both race orderings; avoid tests that merely mirror trivial implementation. Preserve exact dependency/security/limit/meta gates.
37
+
38
+ Only root, client and hands are public npm entries. Public API changes need strict external NodeNext compilation with normal Node types and `skipLibCheck=false`, a real production-only cold install outside repository module lookup, and actual behavioral callers. Native Pi extension authoring is a separate declaration/tooling concern; describe any upstream limits honestly. The [two copied external integrations](docs/index.md#developer-reading-order) must compile/copy/run explicitly because root tsconfig does not include them.
39
+
40
+ ## Installed evidence and cleanup
41
+
42
+ Compilation and isolated tests support delivery; the actual installed runtime path is the completion criterion. Exercise the changed installed CLI/public import through production Pi and supplied hands. Container input changes require a fresh no-cache image and affected installed proof. The npm tarball excludes the Docker build context; build from full source and inspect final package inventory, source maps, legal/provenance files and allowed imports.
43
+
44
+ Record exact source/tar/image/dependency identity, cwd/commands, actual child exit/signal/join, original failures and separately observed finalizers. Do not turn wrapper exit0 into a product verdict. Export needed tmpfs data before stopping the exact owned generation; independently close worker, provider/listener, attachments/leases and namespace even if one cleanup fails. Preserve stopped-generation proof, mutex inodes, evidence, recovery and unrelated resources. Never prune/delete them as incidental cleanup. See [operator finalization](docs/pi-contract.md#export-and-finalize-the-owned-generation).
45
+
46
+ ## Automated package releases
47
+
48
+ [Release setup and retry policy](https://github.com/DB-Conneely/sept/blob/main/docs/releasing.md) describes the GitHub-hosted Linux/amd64 gate and main-push npm/GHCR/GitHub release workflow. It uses no live provider or local model. The publish job consumes the exact tested tarball and saved image; deployment remains manual.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SEPT contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,32 @@
1
+ SEPT
2
+
3
+ Copyright (c) 2026 SEPT contributors
4
+
5
+ SEPT depends on @earendil-works/pi-coding-agent 1.1.0, distributed under the MIT
6
+ License. Its upstream npm archive omits a LICENSE file. The complete upstream
7
+ notice below is retained from repository commit
8
+ abe508e1b89912adde45528136c3221eb69acdd7. Exact source URL, license hash and
9
+ image-only native-search modification provenance are recorded in
10
+ image/pi-native-search/provenance.json and image/pi-native-search/README.md.
11
+
12
+ MIT License
13
+
14
+ Copyright (c) 2025 Mario Zechner
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,94 @@
1
- # Temporary Holding Version
1
+ # SEPT
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ SEPT is a durable, single-slot task worker for Node.js, built on the native Pi Durable Harness. Embed a complete worker in an application, submit tasks from an existing service, or use the installed `sept` CLI. Pi owns models, authentication, generation, tools and native conversation persistence; SEPT adds durable task/operator evidence, wait/wake, bounded HTTP transport, cancellation, drain and context rollover.
4
+
5
+ ## Install and prepare
6
+
7
+ Requires Node.js **22.19.0 or newer**, ESM, Pi credentials or a suitable configured model, persistent local state, and an operator-supplied Docker Linux hands namespace. Valid hands are required even for text-only tasks. The package does not install Docker, serve models or provision hands.
8
+
9
+ After npm publication, add SEPT to your application with `npm install --save-exact sept-agent`. The command is `sept` and the import name is `sept-agent`.
10
+
11
+ To install a retained exact package artifact for a qualified source revision:
12
+
13
+ ```sh
14
+ npm install --save-exact /absolute/path/sept-agent-0.1.0.tgz
15
+ ```
16
+
17
+ This works without assuming a registry publication. For development from a complete checkout, use `npm ci` then `npm run build`. Configure [models and Pi authentication](docs/models.md), then follow the [supplied-hands setup](docs/pi-contract.md#executable-supplied-hands-setup), including the explicit first-boot policy **before starting a worker or direct run**.
18
+
19
+ The supplied brain image runs as UID10001 and stores durable evidence at `/state/runs`. Container operation requires persistent storage, for example `-v sept-state:/state`, plus explicit private Pi credential storage and assigned workspaces. Supply hands as a separate namespace using the linked setup.
20
+
21
+ ## Embed a JavaScript worker
22
+
23
+ Save as `worker.mjs`. These environment variables are application inputs; the library itself reads no CLI/environment defaults.
24
+
25
+ ```js
26
+ import { createWorker } from "sept-agent";
27
+
28
+ const worker = await createWorker({
29
+ stateRoot: process.env.SEPT_STATE_DIR,
30
+ agentDir: process.env.PI_CODING_AGENT_DIR,
31
+ workspaceRoot: process.env.SEPT_WORKSPACE_ROOT,
32
+ handsConfigurationPath: process.env.SEPT_HANDS_CONFIGURATION,
33
+ token: process.env.SEPT_TOKEN,
34
+ host: "127.0.0.1",
35
+ port: 8090,
36
+ });
37
+
38
+ // The host owns signal handling and must await shutdown.
39
+ for (const signal of ["SIGINT", "SIGTERM"]) {
40
+ process.once(signal, () => {
41
+ void worker.stop().catch(() => { process.exitCode = 1; });
42
+ });
43
+ }
44
+ console.log(worker.address);
45
+ ```
46
+
47
+ Required roots/token must be nonempty; use canonical absolute paths and a persistent external state root. Readiness covers the listener/router and synchronous durable adoption; asynchronous Pi/backend execution is observed through task state. `stop()` joins the existing durable boundary. See [SDK lifecycle and ownership](docs/sdk.md#worker-lifecycle).
48
+
49
+ ## Submit from TypeScript
50
+
51
+ ```ts
52
+ import { createTaskClient, type TaskRequest } from "sept-agent/client";
53
+
54
+ const task: TaskRequest = {
55
+ task: "Summarize the supplied evidence, cite its IDs and state what remains unknown",
56
+ maxInvocations: 3,
57
+ maxEpochs: 2,
58
+ timeoutSeconds: 120,
59
+ };
60
+ const client = createTaskClient({
61
+ baseUrl: "http://127.0.0.1:8090",
62
+ token: process.env.SEPT_TOKEN ?? "",
63
+ });
64
+ const admission = await client.createTask({
65
+ source: "my-service",
66
+ eventId: "evidence-case-001",
67
+ task,
68
+ });
69
+ const current = await client.getTask(admission.runId);
70
+ console.log(current.state.status);
71
+ ```
72
+
73
+ Keep `source`/`eventId` stable across retries. Admission receipts retain their original `active` status; `getTask` reports current state. A timeout or abort can occur after durable acceptance. The [SDK guide](docs/sdk.md) covers all five client methods, finite cursor-gap recovery, limits and error classifications.
74
+
75
+ ## CLI and integrations
76
+
77
+ The installed CLI uses the same complete worker composition:
78
+
79
+ ```sh
80
+ sept auth login --provider openai-codex --method subscription --agent-dir "$PI_CODING_AGENT_DIR"
81
+ sept models current --agent-dir "$PI_CODING_AGENT_DIR"
82
+ sept worker --state-dir "$SEPT_STATE_DIR" --agent-dir "$PI_CODING_AGENT_DIR" \
83
+ --workspace-root "$SEPT_WORKSPACE_ROOT" --hands "$SEPT_HANDS_CONFIGURATION"
84
+ ```
85
+
86
+ The bearer comes from `SEPT_TOKEN`, never a CLI token option. Every HTTP route requires it. One state root has one owner and one resident slot, including while waiting. The [Node application](examples/node-app/README.md) and [incident investigator](examples/incident-investigator/README.md) show the two integration patterns; each owns its finite work and cleanup.
87
+
88
+ [Formal documentation and AI navigation](docs/index.md) · [HTTP/SSE API](docs/worker-api.md) · [Pi, hands and security contract](docs/pi-contract.md) · [Architecture](docs/architecture.md) · [Observability](docs/observability.md) · [Contributing](CONTRIBUTING.md)
89
+
90
+ Support is scoped to qualified source/image/host combinations; see [version and support](docs/index.md#version-and-support). The npm artifact is a consumer package; build the Docker image from a pinned complete repository checkout. Host npm Pi stays stock; the [four native-search image assets](image/pi-native-search/README.md) describe the image-only overlay. No publication or deployment is performed by these instructions.
91
+
92
+ SEPT is [MIT licensed](LICENSE). [NOTICE](NOTICE) retains the known upstream attribution and image-overlay provenance.
93
+
94
+ Maintainers: [automatic checks and publishing setup](https://github.com/DB-Conneely/sept/blob/main/docs/releasing.md) describes main-push releases, npm trusted publishing and GHCR configuration. Publishing does not deploy a service.
@@ -0,0 +1,7 @@
1
+ import type { LoginInteraction } from "../model-access/index.js";
2
+ /** A Pi login interaction whose terminal listeners and streams can be released idempotently. */
3
+ export interface TerminalAuthInteraction extends LoginInteraction {
4
+ close(): void;
5
+ }
6
+ /** Terminal presentation only; Pi still owns every authentication flow and credential mutation. */
7
+ export declare function createTerminalAuthInteraction(): TerminalAuthInteraction;
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Adapts Pi-owned authentication prompts to this process's terminal. This module owns only
3
+ * bounded display, cancellation, and terminal cleanup; ModelAccess owns credentials and flows.
4
+ */
5
+ import { createInterface } from "node:readline";
6
+ import { Writable } from "node:stream";
7
+ import { CliError } from "./errors.js";
8
+ function display(value) {
9
+ return value
10
+ .replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, "")
11
+ .replace(/\bBearer\s+\S+/gi, "[redacted]")
12
+ .slice(0, 4096);
13
+ }
14
+ class TerminalPrompter {
15
+ signal;
16
+ controller = new AbortController();
17
+ terminal = process.stdin.isTTY;
18
+ output;
19
+ input;
20
+ muted = false;
21
+ closed = false;
22
+ constructor() {
23
+ this.signal = this.controller.signal;
24
+ this.output = new Writable({
25
+ write: (chunk, _encoding, callback) => {
26
+ if (!this.muted) {
27
+ process.stderr.write(chunk);
28
+ }
29
+ callback();
30
+ },
31
+ });
32
+ Object.assign(this.output, {
33
+ isTTY: process.stderr.isTTY,
34
+ columns: process.stderr.columns,
35
+ });
36
+ this.input = createInterface({
37
+ input: process.stdin,
38
+ output: this.output,
39
+ terminal: this.terminal,
40
+ });
41
+ process.once("SIGINT", this.cancel);
42
+ }
43
+ cancel = () => {
44
+ this.controller.abort();
45
+ };
46
+ question(message, secret, promptSignal) {
47
+ return new Promise((resolve, reject) => {
48
+ const signal = promptSignal
49
+ ? AbortSignal.any([this.controller.signal, promptSignal])
50
+ : this.controller.signal;
51
+ if (signal.aborted) {
52
+ reject(new CliError("Login cancelled"));
53
+ return;
54
+ }
55
+ let settled = false;
56
+ const finish = (error, answer) => {
57
+ if (settled) {
58
+ return;
59
+ }
60
+ settled = true;
61
+ signal.removeEventListener("abort", abort);
62
+ if (secret && this.terminal && this.muted) {
63
+ this.muted = false;
64
+ process.stderr.write("\n");
65
+ }
66
+ if (error) {
67
+ reject(error);
68
+ }
69
+ else {
70
+ resolve(answer ?? "");
71
+ }
72
+ };
73
+ const abort = () => {
74
+ finish(new CliError("Login cancelled"));
75
+ };
76
+ signal.addEventListener("abort", abort, { once: true });
77
+ if (secret && this.terminal) {
78
+ process.stderr.write(`${display(message)}: `);
79
+ this.muted = true;
80
+ }
81
+ this.input.question(secret && this.terminal ? "" : `${display(message)}: `, (answer) => {
82
+ finish(undefined, answer);
83
+ });
84
+ });
85
+ }
86
+ // Pi may retain these callbacks independently of this owner, so receiver binding must survive.
87
+ prompt = async (prompt) => {
88
+ if (prompt.type === "select") {
89
+ process.stderr.write(`${display(prompt.message)}\n${prompt.options.map((option) => ` ${option.id}: ${display(option.label)}${option.description ? ` — ${display(option.description)}` : ""}`).join("\n")}\n`);
90
+ const selected = await this.question("Selection", false, prompt.signal);
91
+ if (!prompt.options.some((option) => option.id === selected)) {
92
+ throw new CliError("Login selection is invalid");
93
+ }
94
+ return selected;
95
+ }
96
+ return this.question(prompt.message, prompt.type === "secret" || prompt.type === "manual_code", prompt.signal);
97
+ };
98
+ notify = (event) => {
99
+ if (event.type === "auth_url") {
100
+ process.stderr.write(`Open this provider authorization URL:\n${display(event.url)}\n${event.instructions ? `${display(event.instructions)}\n` : ""}`);
101
+ }
102
+ else if (event.type === "device_code") {
103
+ process.stderr.write(`Open ${display(event.verificationUri)} and enter code ${display(event.userCode)}.\n`);
104
+ }
105
+ else if (event.type === "info") {
106
+ process.stderr.write(`${display(event.message)}${event.links?.length ? `\n${event.links.map((link) => `${display(link.label ?? "Link")}: ${display(link.url)}`).join("\n")}` : ""}\n`);
107
+ }
108
+ else {
109
+ process.stderr.write(`${display(event.message)}\n`);
110
+ }
111
+ };
112
+ close = () => {
113
+ if (this.closed) {
114
+ return;
115
+ }
116
+ this.closed = true;
117
+ process.removeListener("SIGINT", this.cancel);
118
+ this.controller.abort();
119
+ this.input.close();
120
+ this.muted = false;
121
+ };
122
+ }
123
+ /** Terminal presentation only; Pi still owns every authentication flow and credential mutation. */
124
+ export function createTerminalAuthInteraction() {
125
+ return new TerminalPrompter();
126
+ }
127
+ //# sourceMappingURL=auth-interaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-interaction.js","sourceRoot":"","sources":["../../../src/cli/auth-interaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAkB,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK;SACT,OAAO,CAAC,iDAAiD,EAAE,EAAE,CAAC;SAC9D,OAAO,CAAC,kBAAkB,EAAE,YAAY,CAAC;SACzC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACpB,CAAC;AAOD,MAAM,gBAAgB;IACJ,MAAM,CAAc;IACnB,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;IAC/B,MAAM,CAAW;IACjB,KAAK,CAAY;IAC1B,KAAK,GAAG,KAAK,CAAC;IACd,MAAM,GAAG,KAAK,CAAC;IAEvB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC;YACzB,KAAK,EAAE,CAAC,KAA0B,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;gBACzD,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;oBAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC9B,CAAC;gBACD,QAAQ,EAAE,CAAC;YACb,CAAC;SACF,CAAC,CAAC;QACH,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AC;AAChC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Composes validated CLI syntax with SEPT's public mechanism boundaries. Each handler owns one
3
+ * command lifecycle; durable state, credentials, telemetry, Pi sessions, and HTTP remain owned by
4
+ * their respective mechanisms.
5
+ */
6
+ import { type Observability } from "../observability/index.js";
7
+ import type { CliInvocation } from "./options.js";
8
+ interface CommandContext extends CliInvocation {
9
+ agentDir: string;
10
+ piVersion: string;
11
+ septVersion: string;
12
+ telemetry: Observability;
13
+ }
14
+ /** Execute one parsed command through public mechanism boundaries without retaining credentials. */
15
+ export declare function executeCommand(context: CommandContext): Promise<void>;
16
+ /** Resolve the Pi agent directory only after argv syntax has been accepted. */
17
+ export declare function resolveAgentDirectory(options: Record<string, string>): string;
18
+ export {};
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Composes validated CLI syntax with SEPT's public mechanism boundaries. Each handler owns one
3
+ * command lifecycle; durable state, credentials, telemetry, Pi sessions, and HTTP remain owned by
4
+ * their respective mechanisms.
5
+ */
6
+ import { join, resolve } from "node:path";
7
+ import { acquireStateRootLease, RunStore } from "../durable/index.js";
8
+ import { validateRequest, publicTaskProjection } from "../ingress/index.js";
9
+ import { ModelAccessService } from "../model-access/index.js";
10
+ import { classifyError } from "../observability/index.js";
11
+ import { assertCompatibleStateRoot, getAgentDir, inspectPi } from "../pi-integration/index.js";
12
+ import { CycleController } from "../runtime/index.js";
13
+ import { createTerminalAuthInteraction } from "./auth-interaction.js";
14
+ import { initializeCapabilities, assertCapabilityAdmission, capabilityHostFactory, createWorker, } from "../worker/index.js";
15
+ import { runPermissions } from "./permissions.js";
16
+ import { resumePermissionRun, assertLocalRunSlot } from "./permission-decisions.js";
17
+ import { CliError } from "./errors.js";
18
+ function writeJson(value) {
19
+ process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
20
+ }
21
+ function integer(value) {
22
+ return value === undefined ? undefined : Number(value);
23
+ }
24
+ async function selectModel(access, options) {
25
+ const provider = options.provider;
26
+ const model = options.model;
27
+ if (provider === undefined || model === undefined) {
28
+ throw new CliError("models select requires --provider and --model");
29
+ }
30
+ writeJson(await access.setPodDefault(provider, model, AbortSignal.timeout(15_000)));
31
+ }
32
+ async function runModels(context) {
33
+ const access = await ModelAccessService.create(context.agentDir);
34
+ if (context.action === "validate") {
35
+ writeJson(access.validateCustomConfiguration());
36
+ }
37
+ else if (context.action === "list") {
38
+ writeJson(await access.catalogue(context.options.provider, AbortSignal.timeout(15_000)));
39
+ }
40
+ else if (context.action === "current") {
41
+ const resolved = access.resolveSelection();
42
+ writeJson(await access.preflightSelection(resolved.provider, resolved.model, resolved.source, AbortSignal.timeout(15_000)));
43
+ }
44
+ else if (context.action === "select") {
45
+ await selectModel(access, context.options);
46
+ }
47
+ else {
48
+ throw new CliError("Usage: sept models list|current|validate|select [--provider <id>] [--model <id>]");
49
+ }
50
+ }
51
+ function authenticationMethod(value) {
52
+ if (value === "api-key") {
53
+ return "api_key";
54
+ }
55
+ if (value === "subscription" || value === "oauth") {
56
+ return value;
57
+ }
58
+ return undefined;
59
+ }
60
+ async function login(access, provider, methodOption) {
61
+ const method = authenticationMethod(methodOption);
62
+ if (method === undefined) {
63
+ throw new CliError("auth login requires --method api-key|subscription|oauth");
64
+ }
65
+ const interaction = createTerminalAuthInteraction();
66
+ try {
67
+ writeJson(await access.login(provider, method, interaction));
68
+ }
69
+ finally {
70
+ interaction.close();
71
+ }
72
+ }
73
+ async function runAuth(context) {
74
+ const provider = context.options.provider;
75
+ if (provider === undefined) {
76
+ throw new CliError("auth commands require --provider");
77
+ }
78
+ const access = await ModelAccessService.create(context.agentDir);
79
+ if (context.action === "status") {
80
+ writeJson(await access.authenticationStatus(provider, AbortSignal.timeout(15_000)));
81
+ }
82
+ else if (context.action === "logout") {
83
+ writeJson(await access.logout(provider, AbortSignal.timeout(15_000)));
84
+ }
85
+ else if (context.action === "login") {
86
+ await login(access, provider, context.options.method);
87
+ }
88
+ else {
89
+ throw new CliError("Usage: sept auth status|login|logout --provider <id> [--method api-key|subscription]");
90
+ }
91
+ }
92
+ function stateRoot(options) {
93
+ return resolve(options["state-dir"] ?? process.env.SEPT_STATE_DIR ?? join(process.cwd(), ".sept", "runs"));
94
+ }
95
+ function registerWorkerStop(service, telemetry) {
96
+ let stopping;
97
+ const stop = () => {
98
+ stopping ??= (async () => {
99
+ try {
100
+ await service.stop();
101
+ }
102
+ finally {
103
+ await telemetry.shutdown();
104
+ }
105
+ })().catch((error) => {
106
+ telemetry.log("process.failed", { "sept.outcome": "failure", "error.type": classifyError(error) }, "error");
107
+ process.stderr.write(`sept: ${error instanceof Error ? error.message : String(error)}\n`);
108
+ process.exitCode = 1;
109
+ });
110
+ };
111
+ process.on("SIGINT", stop);
112
+ process.on("SIGTERM", stop);
113
+ }
114
+ async function runWorker(context) {
115
+ const host = context.options.host;
116
+ const port = integer(context.options.port);
117
+ const handsConfigurationPath = context.options.hands ?? process.env.SEPT_HANDS_CONFIGURATION;
118
+ const worker = await createWorker({
119
+ stateRoot: stateRoot(context.options),
120
+ agentDir: context.agentDir,
121
+ workspaceRoot: resolve(context.options["workspace-root"] ?? process.env.SEPT_WORKSPACE_ROOT ?? process.cwd()),
122
+ token: process.env.SEPT_TOKEN ?? "",
123
+ telemetry: context.telemetry,
124
+ ...(handsConfigurationPath === undefined ? {} : { handsConfigurationPath }),
125
+ ...(host === undefined ? {} : { host }),
126
+ ...(port === undefined ? {} : { port }),
127
+ });
128
+ const address = worker.address;
129
+ process.stdout.write(`SEPT Pi worker listening on http://${address.host}:${String(address.port)}\n`);
130
+ registerWorkerStop(worker, context.telemetry);
131
+ }
132
+ function directRequest(options) {
133
+ return {
134
+ task: options.task,
135
+ role: options.role,
136
+ workspace: options.workspace,
137
+ provider: options.provider,
138
+ model: options.model,
139
+ thinking: options.thinking,
140
+ maxInvocations: integer(options["max-invocations"]),
141
+ maxEpochs: integer(options["max-epochs"]),
142
+ timeoutSeconds: integer(options.timeout),
143
+ };
144
+ }
145
+ async function createDirectRun(context, root) {
146
+ const validated = validateRequest(directRequest(context.options), context.piVersion);
147
+ const access = await ModelAccessService.create(context.agentDir);
148
+ const explicit = context.options.provider !== undefined && context.options.model !== undefined
149
+ ? { provider: validated.provider, model: validated.model }
150
+ : undefined;
151
+ const resolved = access.resolveSelection(explicit);
152
+ const preflight = await access.preflightSelection(resolved.provider, resolved.model, resolved.source, AbortSignal.timeout(15_000));
153
+ return context.telemetry.spanSync("sept.task.create", {}, () => RunStore.create(root, {
154
+ ...validated,
155
+ provider: preflight.selected.provider,
156
+ model: preflight.selected.model,
157
+ }));
158
+ }
159
+ async function executeDirectRun(context, store) {
160
+ context.telemetry.workerStarted("none", "run");
161
+ context.telemetry.setWorkerState("busy");
162
+ const snapshot = store.snapshot();
163
+ context.telemetry.setRunState(snapshot.status, snapshot.epoch, snapshot.invocations, store.pendingMessages().length);
164
+ context.telemetry.log(context.options.resume === undefined ? "task.created" : "task.resumed", {
165
+ "sept.run.id": store.runId,
166
+ "sept.run.state": "active",
167
+ "sept.outcome": "accepted",
168
+ });
169
+ process.stdout.write(`${store.runId}\n`);
170
+ await new CycleController(store, context.agentDir, capabilityHostFactory(stateRoot(context.options), context.options.hands ?? process.env.SEPT_HANDS_CONFIGURATION), context.telemetry).run();
171
+ process.stdout.write(`${JSON.stringify(publicTaskProjection(store).state)}\n`);
172
+ }
173
+ async function runDirect(context) {
174
+ const root = stateRoot(context.options);
175
+ assertCompatibleStateRoot(root, context.telemetry);
176
+ const policy = await initializeCapabilities(root, context.options.hands ?? process.env.SEPT_HANDS_CONFIGURATION);
177
+ const releaseRoot = acquireStateRootLease(root);
178
+ try {
179
+ assertLocalRunSlot(root, context.options.resume);
180
+ assertCapabilityAdmission(policy, context.options.hands ?? process.env.SEPT_HANDS_CONFIGURATION);
181
+ const resumed = await resumePermissionRun(context, root, context.agentDir);
182
+ await executeDirectRun(context, resumed ?? (await createDirectRun(context, root)));
183
+ }
184
+ finally {
185
+ try {
186
+ releaseRoot();
187
+ }
188
+ finally {
189
+ await context.telemetry.shutdown();
190
+ }
191
+ }
192
+ }
193
+ async function runDoctor(context) {
194
+ const diagnostic = await inspectPi(context.agentDir, context.options.provider ?? "openai-codex");
195
+ writeJson({
196
+ node: process.version,
197
+ sept: context.septVersion,
198
+ piSdk: context.piVersion,
199
+ agentDir: context.agentDir,
200
+ ...diagnostic,
201
+ });
202
+ }
203
+ async function runHealth(context) {
204
+ const token = process.env.SEPT_TOKEN ?? "";
205
+ if (!token) {
206
+ throw new CliError("SEPT_TOKEN is required for the authenticated health check");
207
+ }
208
+ const url = context.options.url ?? "http://127.0.0.1:8090/health";
209
+ const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
210
+ if (!response.ok) {
211
+ throw new CliError(`SEPT worker health check failed (${String(response.status)})`);
212
+ }
213
+ process.stdout.write("SEPT worker healthy\n");
214
+ }
215
+ /** Execute one parsed command through public mechanism boundaries without retaining credentials. */
216
+ export async function executeCommand(context) {
217
+ switch (context.command) {
218
+ case "permissions":
219
+ writeJson(await runPermissions(context, stateRoot(context.options), context.agentDir));
220
+ return;
221
+ case "models":
222
+ return runModels(context);
223
+ case "auth":
224
+ return runAuth(context);
225
+ case "worker":
226
+ return runWorker(context);
227
+ case "run":
228
+ return runDirect(context);
229
+ case "doctor":
230
+ return runDoctor(context);
231
+ case "health":
232
+ return runHealth(context);
233
+ }
234
+ }
235
+ /** Resolve the Pi agent directory only after argv syntax has been accepted. */
236
+ export function resolveAgentDirectory(options) {
237
+ return resolve(options["agent-dir"] ?? process.env.PI_CODING_AGENT_DIR ?? getAgentDir());
238
+ }
239
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/cli/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CA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AAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;YACvF,OAAO;QACT,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,MAAM;YACT,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACnE,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,WAAW,EAAE,CAAC,CAAC;AAC3F,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Typed failures owned by CLI composition. Command handlers may present these messages, while
3
+ * credential and runtime mechanisms remain responsible for their own classified failures.
4
+ */
5
+ /** A safe operator-facing failure caused by invalid CLI input or interaction. */
6
+ export declare class CliError extends Error {
7
+ constructor(message: string);
8
+ }