@canhta/dsh-autopilot 0.1.0-alpha.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 (448) hide show
  1. package/AGENTS.md +41 -0
  2. package/CONTEXT.md +39 -0
  3. package/LICENSE +21 -0
  4. package/README.md +95 -0
  5. package/cordis.patch.yml +13 -0
  6. package/deploy/dsh-autopilot.service +26 -0
  7. package/docs/CONTRIBUTING.md +60 -0
  8. package/docs/README.md +34 -0
  9. package/docs/agents/domain.md +7 -0
  10. package/docs/agents/issue-tracker.md +21 -0
  11. package/docs/agents/triage-labels.md +13 -0
  12. package/docs/assets/banner.png +0 -0
  13. package/docs/deployment.md +138 -0
  14. package/docs/engineering.md +43 -0
  15. package/docs/specs/execution.md +65 -0
  16. package/docs/specs/integrations.md +89 -0
  17. package/docs/specs/lifecycle.md +81 -0
  18. package/docs/specs/operations.md +89 -0
  19. package/docs/specs/plugin.md +49 -0
  20. package/docs/specs/providers.md +62 -0
  21. package/docs/specs/scope.md +35 -0
  22. package/docs/specs/ui-components.md +96 -0
  23. package/docs/specs/web-ui.md +64 -0
  24. package/lib/admission/cancellation-control.d.ts +11 -0
  25. package/lib/admission/cancellation-control.js +72 -0
  26. package/lib/admission/cancellation-control.js.map +1 -0
  27. package/lib/admission/candidates.d.ts +2 -0
  28. package/lib/admission/candidates.js +23 -0
  29. package/lib/admission/candidates.js.map +1 -0
  30. package/lib/admission/composition-claim.d.ts +10 -0
  31. package/lib/admission/composition-claim.js +13 -0
  32. package/lib/admission/composition-claim.js.map +1 -0
  33. package/lib/admission/constants.d.ts +12 -0
  34. package/lib/admission/constants.js +13 -0
  35. package/lib/admission/constants.js.map +1 -0
  36. package/lib/admission/deliveries.d.ts +6 -0
  37. package/lib/admission/deliveries.js +175 -0
  38. package/lib/admission/deliveries.js.map +1 -0
  39. package/lib/admission/delivery-control.d.ts +28 -0
  40. package/lib/admission/delivery-control.js +294 -0
  41. package/lib/admission/delivery-control.js.map +1 -0
  42. package/lib/admission/execution-control.d.ts +29 -0
  43. package/lib/admission/execution-control.js +177 -0
  44. package/lib/admission/execution-control.js.map +1 -0
  45. package/lib/admission/index.d.ts +4 -0
  46. package/lib/admission/index.js +4 -0
  47. package/lib/admission/index.js.map +1 -0
  48. package/lib/admission/model.d.ts +296 -0
  49. package/lib/admission/model.js +13 -0
  50. package/lib/admission/model.js.map +1 -0
  51. package/lib/admission/pause-control.d.ts +44 -0
  52. package/lib/admission/pause-control.js +220 -0
  53. package/lib/admission/pause-control.js.map +1 -0
  54. package/lib/admission/policy.d.ts +39 -0
  55. package/lib/admission/policy.js +238 -0
  56. package/lib/admission/policy.js.map +1 -0
  57. package/lib/admission/ports.d.ts +13 -0
  58. package/lib/admission/ports.js +2 -0
  59. package/lib/admission/ports.js.map +1 -0
  60. package/lib/admission/publication-control.d.ts +16 -0
  61. package/lib/admission/publication-control.js +153 -0
  62. package/lib/admission/publication-control.js.map +1 -0
  63. package/lib/admission/reconciler.d.ts +7 -0
  64. package/lib/admission/reconciler.js +121 -0
  65. package/lib/admission/reconciler.js.map +1 -0
  66. package/lib/admission/resume-control.d.ts +27 -0
  67. package/lib/admission/resume-control.js +213 -0
  68. package/lib/admission/resume-control.js.map +1 -0
  69. package/lib/admission/run-fence.d.ts +11 -0
  70. package/lib/admission/run-fence.js +49 -0
  71. package/lib/admission/run-fence.js.map +1 -0
  72. package/lib/admission/service.d.ts +130 -0
  73. package/lib/admission/service.js +415 -0
  74. package/lib/admission/service.js.map +1 -0
  75. package/lib/admission/state-domain.d.ts +11 -0
  76. package/lib/admission/state-domain.js +33 -0
  77. package/lib/admission/state-domain.js.map +1 -0
  78. package/lib/admission/state-integrity.d.ts +19 -0
  79. package/lib/admission/state-integrity.js +102 -0
  80. package/lib/admission/state-integrity.js.map +1 -0
  81. package/lib/admission/state-migration.d.ts +4 -0
  82. package/lib/admission/state-migration.js +46 -0
  83. package/lib/admission/state-migration.js.map +1 -0
  84. package/lib/admission/state.d.ts +4524 -0
  85. package/lib/admission/state.js +394 -0
  86. package/lib/admission/state.js.map +1 -0
  87. package/lib/admission.d.ts +1 -0
  88. package/lib/admission.js +2 -0
  89. package/lib/admission.js.map +1 -0
  90. package/lib/client-types/client/OperationsAtoms.d.ts +30 -0
  91. package/lib/client-types/client/OperationsPanel.d.ts +34 -0
  92. package/lib/client-types/client/RunsView.d.ts +14 -0
  93. package/lib/client-types/client/SettingsCapabilitySections.d.ts +16 -0
  94. package/lib/client-types/client/SettingsPanel.d.ts +40 -0
  95. package/lib/client-types/client/SettingsPolicySections.d.ts +13 -0
  96. package/lib/client-types/client/SettingsProviderSection.d.ts +21 -0
  97. package/lib/client-types/client/SummaryView.d.ts +10 -0
  98. package/lib/client-types/client/WorktreesView.d.ts +9 -0
  99. package/lib/client-types/client/index.d.ts +9 -0
  100. package/lib/client-types/client/locales/en.d.ts +154 -0
  101. package/lib/client-types/client/locales/index.d.ts +9 -0
  102. package/lib/client-types/client/locales/zh.d.ts +155 -0
  103. package/lib/client-types/client/settings-draft.d.ts +29 -0
  104. package/lib/client-types/client/state.d.ts +63 -0
  105. package/lib/client-types/code-host/index.d.ts +2 -0
  106. package/lib/client-types/code-host/model.d.ts +118 -0
  107. package/lib/client-types/code-host/registry.d.ts +23 -0
  108. package/lib/client-types/code-host/validation.d.ts +51 -0
  109. package/lib/client-types/code-host.d.ts +2 -0
  110. package/lib/client-types/config/index.d.ts +2 -0
  111. package/lib/client-types/config/settings.d.ts +51 -0
  112. package/lib/client-types/config.d.ts +2 -0
  113. package/lib/client-types/notification/index.d.ts +2 -0
  114. package/lib/client-types/notification/model.d.ts +57 -0
  115. package/lib/client-types/notification/registry.d.ts +16 -0
  116. package/lib/client-types/notification.d.ts +2 -0
  117. package/lib/client-types/providers/generation-registry.d.ts +20 -0
  118. package/lib/client-types/remote.d.ts +65 -0
  119. package/lib/client-types/tracker/index.d.ts +2 -0
  120. package/lib/client-types/tracker/model.d.ts +222 -0
  121. package/lib/client-types/tracker/registry.d.ts +49 -0
  122. package/lib/client-types/tracker/validation.d.ts +60 -0
  123. package/lib/client-types/tracker.d.ts +2 -0
  124. package/lib/client-types/web/contract.d.ts +958 -0
  125. package/lib/client.js +7961 -0
  126. package/lib/client.js.map +1 -0
  127. package/lib/code-host/index.d.ts +2 -0
  128. package/lib/code-host/index.js +3 -0
  129. package/lib/code-host/index.js.map +1 -0
  130. package/lib/code-host/model.d.ts +118 -0
  131. package/lib/code-host/model.js +23 -0
  132. package/lib/code-host/model.js.map +1 -0
  133. package/lib/code-host/registry.d.ts +23 -0
  134. package/lib/code-host/registry.js +90 -0
  135. package/lib/code-host/registry.js.map +1 -0
  136. package/lib/code-host/validation.d.ts +51 -0
  137. package/lib/code-host/validation.js +30 -0
  138. package/lib/code-host/validation.js.map +1 -0
  139. package/lib/code-host.d.ts +2 -0
  140. package/lib/code-host.js +3 -0
  141. package/lib/code-host.js.map +1 -0
  142. package/lib/config/index.d.ts +2 -0
  143. package/lib/config/index.js +3 -0
  144. package/lib/config/index.js.map +1 -0
  145. package/lib/config/settings.d.ts +51 -0
  146. package/lib/config/settings.js +195 -0
  147. package/lib/config/settings.js.map +1 -0
  148. package/lib/config.d.ts +2 -0
  149. package/lib/config.js +3 -0
  150. package/lib/config.js.map +1 -0
  151. package/lib/delivery/index.d.ts +1 -0
  152. package/lib/delivery/index.js +2 -0
  153. package/lib/delivery/index.js.map +1 -0
  154. package/lib/delivery/service.d.ts +29 -0
  155. package/lib/delivery/service.js +140 -0
  156. package/lib/delivery/service.js.map +1 -0
  157. package/lib/delivery.d.ts +2 -0
  158. package/lib/delivery.js +3 -0
  159. package/lib/delivery.js.map +1 -0
  160. package/lib/dispatch/composition.d.ts +18 -0
  161. package/lib/dispatch/composition.js +109 -0
  162. package/lib/dispatch/composition.js.map +1 -0
  163. package/lib/dispatch/contract.d.ts +2 -0
  164. package/lib/dispatch/contract.js +2 -0
  165. package/lib/dispatch/contract.js.map +1 -0
  166. package/lib/dispatch/execute.d.ts +10 -0
  167. package/lib/dispatch/execute.js +138 -0
  168. package/lib/dispatch/execute.js.map +1 -0
  169. package/lib/dispatch/execution-state.d.ts +12 -0
  170. package/lib/dispatch/execution-state.js +24 -0
  171. package/lib/dispatch/execution-state.js.map +1 -0
  172. package/lib/dispatch/git.d.ts +5 -0
  173. package/lib/dispatch/git.js +95 -0
  174. package/lib/dispatch/git.js.map +1 -0
  175. package/lib/dispatch/index.d.ts +2 -0
  176. package/lib/dispatch/index.js +2 -0
  177. package/lib/dispatch/index.js.map +1 -0
  178. package/lib/dispatch/report.d.ts +11 -0
  179. package/lib/dispatch/report.js +141 -0
  180. package/lib/dispatch/report.js.map +1 -0
  181. package/lib/dispatch/resume.d.ts +17 -0
  182. package/lib/dispatch/resume.js +89 -0
  183. package/lib/dispatch/resume.js.map +1 -0
  184. package/lib/dispatch/service.d.ts +56 -0
  185. package/lib/dispatch/service.js +231 -0
  186. package/lib/dispatch/service.js.map +1 -0
  187. package/lib/dispatch/usage.d.ts +10 -0
  188. package/lib/dispatch/usage.js +47 -0
  189. package/lib/dispatch/usage.js.map +1 -0
  190. package/lib/dispatch.d.ts +2 -0
  191. package/lib/dispatch.js +3 -0
  192. package/lib/dispatch.js.map +1 -0
  193. package/lib/github-code-host.d.ts +1 -0
  194. package/lib/github-code-host.js +2 -0
  195. package/lib/github-code-host.js.map +1 -0
  196. package/lib/github-issues.d.ts +1 -0
  197. package/lib/github-issues.js +2 -0
  198. package/lib/github-issues.js.map +1 -0
  199. package/lib/index.d.ts +21 -0
  200. package/lib/index.js +48 -0
  201. package/lib/index.js.map +1 -0
  202. package/lib/ingress.d.ts +2 -0
  203. package/lib/ingress.js +3 -0
  204. package/lib/ingress.js.map +1 -0
  205. package/lib/jira.d.ts +1 -0
  206. package/lib/jira.js +2 -0
  207. package/lib/jira.js.map +1 -0
  208. package/lib/mcp/contracts.d.ts +21 -0
  209. package/lib/mcp/contracts.js +33 -0
  210. package/lib/mcp/contracts.js.map +1 -0
  211. package/lib/mcp/cursor.d.ts +10 -0
  212. package/lib/mcp/cursor.js +68 -0
  213. package/lib/mcp/cursor.js.map +1 -0
  214. package/lib/mcp/definition.d.ts +8 -0
  215. package/lib/mcp/definition.js +43 -0
  216. package/lib/mcp/definition.js.map +1 -0
  217. package/lib/mcp/index.d.ts +6 -0
  218. package/lib/mcp/index.js +7 -0
  219. package/lib/mcp/index.js.map +1 -0
  220. package/lib/mcp/json.d.ts +4 -0
  221. package/lib/mcp/json.js +20 -0
  222. package/lib/mcp/json.js.map +1 -0
  223. package/lib/mcp/mount.d.ts +17 -0
  224. package/lib/mcp/mount.js +79 -0
  225. package/lib/mcp/mount.js.map +1 -0
  226. package/lib/mcp/read-tools.d.ts +27 -0
  227. package/lib/mcp/read-tools.js +149 -0
  228. package/lib/mcp/read-tools.js.map +1 -0
  229. package/lib/notification/index.d.ts +2 -0
  230. package/lib/notification/index.js +3 -0
  231. package/lib/notification/index.js.map +1 -0
  232. package/lib/notification/model.d.ts +57 -0
  233. package/lib/notification/model.js +20 -0
  234. package/lib/notification/model.js.map +1 -0
  235. package/lib/notification/registry.d.ts +16 -0
  236. package/lib/notification/registry.js +67 -0
  237. package/lib/notification/registry.js.map +1 -0
  238. package/lib/notification.d.ts +2 -0
  239. package/lib/notification.js +3 -0
  240. package/lib/notification.js.map +1 -0
  241. package/lib/ntfy-notification.d.ts +1 -0
  242. package/lib/ntfy-notification.js +2 -0
  243. package/lib/ntfy-notification.js.map +1 -0
  244. package/lib/operations/cleanup-inspector.d.ts +16 -0
  245. package/lib/operations/cleanup-inspector.js +132 -0
  246. package/lib/operations/cleanup-inspector.js.map +1 -0
  247. package/lib/operations/cleanup.d.ts +25 -0
  248. package/lib/operations/cleanup.js +151 -0
  249. package/lib/operations/cleanup.js.map +1 -0
  250. package/lib/operations/disposition.d.ts +46 -0
  251. package/lib/operations/disposition.js +89 -0
  252. package/lib/operations/disposition.js.map +1 -0
  253. package/lib/operations/health.d.ts +6 -0
  254. package/lib/operations/health.js +41 -0
  255. package/lib/operations/health.js.map +1 -0
  256. package/lib/operations/index.d.ts +6 -0
  257. package/lib/operations/index.js +7 -0
  258. package/lib/operations/index.js.map +1 -0
  259. package/lib/operations/inspection.d.ts +35 -0
  260. package/lib/operations/inspection.js +183 -0
  261. package/lib/operations/inspection.js.map +1 -0
  262. package/lib/operations/model.d.ts +77 -0
  263. package/lib/operations/model.js +2 -0
  264. package/lib/operations/model.js.map +1 -0
  265. package/lib/operations/recovery.d.ts +11 -0
  266. package/lib/operations/recovery.js +101 -0
  267. package/lib/operations/recovery.js.map +1 -0
  268. package/lib/operations/retention.d.ts +28 -0
  269. package/lib/operations/retention.js +105 -0
  270. package/lib/operations/retention.js.map +1 -0
  271. package/lib/operations/runtime-owner.d.ts +54 -0
  272. package/lib/operations/runtime-owner.js +281 -0
  273. package/lib/operations/runtime-owner.js.map +1 -0
  274. package/lib/operations/service.d.ts +55 -0
  275. package/lib/operations/service.js +154 -0
  276. package/lib/operations/service.js.map +1 -0
  277. package/lib/operations/state.d.ts +79 -0
  278. package/lib/operations/state.js +51 -0
  279. package/lib/operations/state.js.map +1 -0
  280. package/lib/operations/storage-composition.d.ts +16 -0
  281. package/lib/operations/storage-composition.js +61 -0
  282. package/lib/operations/storage-composition.js.map +1 -0
  283. package/lib/operations/store.d.ts +16 -0
  284. package/lib/operations/store.js +84 -0
  285. package/lib/operations/store.js.map +1 -0
  286. package/lib/operations.d.ts +2 -0
  287. package/lib/operations.js +3 -0
  288. package/lib/operations.js.map +1 -0
  289. package/lib/providers/generation-registry.d.ts +20 -0
  290. package/lib/providers/generation-registry.js +72 -0
  291. package/lib/providers/generation-registry.js.map +1 -0
  292. package/lib/providers/github-code-host/contracts.d.ts +224 -0
  293. package/lib/providers/github-code-host/contracts.js +144 -0
  294. package/lib/providers/github-code-host/contracts.js.map +1 -0
  295. package/lib/providers/github-code-host/index.d.ts +2 -0
  296. package/lib/providers/github-code-host/index.js +2 -0
  297. package/lib/providers/github-code-host/index.js.map +1 -0
  298. package/lib/providers/github-code-host/provider.d.ts +5 -0
  299. package/lib/providers/github-code-host/provider.js +289 -0
  300. package/lib/providers/github-code-host/provider.js.map +1 -0
  301. package/lib/providers/github-code-host/schemas.d.ts +81 -0
  302. package/lib/providers/github-code-host/schemas.js +39 -0
  303. package/lib/providers/github-code-host/schemas.js.map +1 -0
  304. package/lib/providers/github-code-host/settings.d.ts +16 -0
  305. package/lib/providers/github-code-host/settings.js +65 -0
  306. package/lib/providers/github-code-host/settings.js.map +1 -0
  307. package/lib/providers/github-issues/contracts.d.ts +151 -0
  308. package/lib/providers/github-issues/contracts.js +141 -0
  309. package/lib/providers/github-issues/contracts.js.map +1 -0
  310. package/lib/providers/github-issues/index.d.ts +1 -0
  311. package/lib/providers/github-issues/index.js +2 -0
  312. package/lib/providers/github-issues/index.js.map +1 -0
  313. package/lib/providers/github-issues/ingress.d.ts +8 -0
  314. package/lib/providers/github-issues/ingress.js +80 -0
  315. package/lib/providers/github-issues/ingress.js.map +1 -0
  316. package/lib/providers/github-issues/normalization.d.ts +11 -0
  317. package/lib/providers/github-issues/normalization.js +115 -0
  318. package/lib/providers/github-issues/normalization.js.map +1 -0
  319. package/lib/providers/github-issues/provider.d.ts +6 -0
  320. package/lib/providers/github-issues/provider.js +235 -0
  321. package/lib/providers/github-issues/provider.js.map +1 -0
  322. package/lib/providers/github-issues/schemas.d.ts +123 -0
  323. package/lib/providers/github-issues/schemas.js +58 -0
  324. package/lib/providers/github-issues/schemas.js.map +1 -0
  325. package/lib/providers/github-issues/settings.d.ts +27 -0
  326. package/lib/providers/github-issues/settings.js +154 -0
  327. package/lib/providers/github-issues/settings.js.map +1 -0
  328. package/lib/providers/jira/contracts.d.ts +193 -0
  329. package/lib/providers/jira/contracts.js +133 -0
  330. package/lib/providers/jira/contracts.js.map +1 -0
  331. package/lib/providers/jira/index.d.ts +1 -0
  332. package/lib/providers/jira/index.js +2 -0
  333. package/lib/providers/jira/index.js.map +1 -0
  334. package/lib/providers/jira/ingress.d.ts +4 -0
  335. package/lib/providers/jira/ingress.js +60 -0
  336. package/lib/providers/jira/ingress.js.map +1 -0
  337. package/lib/providers/jira/normalization.d.ts +8 -0
  338. package/lib/providers/jira/normalization.js +121 -0
  339. package/lib/providers/jira/normalization.js.map +1 -0
  340. package/lib/providers/jira/provider.d.ts +6 -0
  341. package/lib/providers/jira/provider.js +317 -0
  342. package/lib/providers/jira/provider.js.map +1 -0
  343. package/lib/providers/jira/schemas.d.ts +134 -0
  344. package/lib/providers/jira/schemas.js +76 -0
  345. package/lib/providers/jira/schemas.js.map +1 -0
  346. package/lib/providers/jira/settings.d.ts +32 -0
  347. package/lib/providers/jira/settings.js +163 -0
  348. package/lib/providers/jira/settings.js.map +1 -0
  349. package/lib/providers/notification-http.d.ts +13 -0
  350. package/lib/providers/notification-http.js +136 -0
  351. package/lib/providers/notification-http.js.map +1 -0
  352. package/lib/providers/ntfy-notification/index.d.ts +2 -0
  353. package/lib/providers/ntfy-notification/index.js +2 -0
  354. package/lib/providers/ntfy-notification/index.js.map +1 -0
  355. package/lib/providers/ntfy-notification/provider.d.ts +4 -0
  356. package/lib/providers/ntfy-notification/provider.js +89 -0
  357. package/lib/providers/ntfy-notification/provider.js.map +1 -0
  358. package/lib/providers/ntfy-notification/settings.d.ts +12 -0
  359. package/lib/providers/ntfy-notification/settings.js +34 -0
  360. package/lib/providers/ntfy-notification/settings.js.map +1 -0
  361. package/lib/providers/webhook-notification/index.d.ts +2 -0
  362. package/lib/providers/webhook-notification/index.js +2 -0
  363. package/lib/providers/webhook-notification/index.js.map +1 -0
  364. package/lib/providers/webhook-notification/provider.d.ts +4 -0
  365. package/lib/providers/webhook-notification/provider.js +57 -0
  366. package/lib/providers/webhook-notification/provider.js.map +1 -0
  367. package/lib/providers/webhook-notification/settings.d.ts +11 -0
  368. package/lib/providers/webhook-notification/settings.js +31 -0
  369. package/lib/providers/webhook-notification/settings.js.map +1 -0
  370. package/lib/publication/git.d.ts +7 -0
  371. package/lib/publication/git.js +154 -0
  372. package/lib/publication/git.js.map +1 -0
  373. package/lib/publication/index.d.ts +1 -0
  374. package/lib/publication/index.js +2 -0
  375. package/lib/publication/index.js.map +1 -0
  376. package/lib/publication/service.d.ts +27 -0
  377. package/lib/publication/service.js +166 -0
  378. package/lib/publication/service.js.map +1 -0
  379. package/lib/publication.d.ts +2 -0
  380. package/lib/publication.js +3 -0
  381. package/lib/publication.js.map +1 -0
  382. package/lib/reconciliation/index.d.ts +3 -0
  383. package/lib/reconciliation/index.js +4 -0
  384. package/lib/reconciliation/index.js.map +1 -0
  385. package/lib/reconciliation/ingress.d.ts +21 -0
  386. package/lib/reconciliation/ingress.js +168 -0
  387. package/lib/reconciliation/ingress.js.map +1 -0
  388. package/lib/reconciliation/service.d.ts +75 -0
  389. package/lib/reconciliation/service.js +228 -0
  390. package/lib/reconciliation/service.js.map +1 -0
  391. package/lib/reconciliation.d.ts +2 -0
  392. package/lib/reconciliation.js +3 -0
  393. package/lib/reconciliation.js.map +1 -0
  394. package/lib/remote.d.ts +65 -0
  395. package/lib/remote.js +135 -0
  396. package/lib/remote.js.map +1 -0
  397. package/lib/tracker/index.d.ts +2 -0
  398. package/lib/tracker/index.js +3 -0
  399. package/lib/tracker/index.js.map +1 -0
  400. package/lib/tracker/model.d.ts +222 -0
  401. package/lib/tracker/model.js +66 -0
  402. package/lib/tracker/model.js.map +1 -0
  403. package/lib/tracker/registry.d.ts +49 -0
  404. package/lib/tracker/registry.js +213 -0
  405. package/lib/tracker/registry.js.map +1 -0
  406. package/lib/tracker/validation.d.ts +60 -0
  407. package/lib/tracker/validation.js +52 -0
  408. package/lib/tracker/validation.js.map +1 -0
  409. package/lib/tracker.d.ts +2 -0
  410. package/lib/tracker.js +3 -0
  411. package/lib/tracker.js.map +1 -0
  412. package/lib/typert.d.ts +1 -0
  413. package/lib/typert.js +2 -0
  414. package/lib/typert.js.map +1 -0
  415. package/lib/web/commands.d.ts +18 -0
  416. package/lib/web/commands.js +231 -0
  417. package/lib/web/commands.js.map +1 -0
  418. package/lib/web/contract.d.ts +958 -0
  419. package/lib/web/contract.js +230 -0
  420. package/lib/web/contract.js.map +1 -0
  421. package/lib/web/contributions.d.ts +41 -0
  422. package/lib/web/contributions.js +61 -0
  423. package/lib/web/contributions.js.map +1 -0
  424. package/lib/web/integrations.d.ts +13 -0
  425. package/lib/web/integrations.js +95 -0
  426. package/lib/web/integrations.js.map +1 -0
  427. package/lib/web/projection.d.ts +10 -0
  428. package/lib/web/projection.js +192 -0
  429. package/lib/web/projection.js.map +1 -0
  430. package/lib/web/service.d.ts +31 -0
  431. package/lib/web/service.js +141 -0
  432. package/lib/web/service.js.map +1 -0
  433. package/lib/web.d.ts +5 -0
  434. package/lib/web.js +6 -0
  435. package/lib/web.js.map +1 -0
  436. package/lib/webhook-notification.d.ts +1 -0
  437. package/lib/webhook-notification.js +2 -0
  438. package/lib/webhook-notification.js.map +1 -0
  439. package/lib/workflow/index.d.ts +1 -0
  440. package/lib/workflow/index.js +2 -0
  441. package/lib/workflow/index.js.map +1 -0
  442. package/lib/workflow/service.d.ts +31 -0
  443. package/lib/workflow/service.js +220 -0
  444. package/lib/workflow/service.js.map +1 -0
  445. package/lib/workflow.d.ts +2 -0
  446. package/lib/workflow.js +3 -0
  447. package/lib/workflow.js.map +1 -0
  448. package/package.json +276 -0
package/AGENTS.md ADDED
@@ -0,0 +1,41 @@
1
+ # Engineering instructions
2
+
3
+ Read the relevant GitHub issue and [documentation map](docs/README.md) before work. Keep this plugin repository's rules separate from those of repositories Autopilot modifies. `CLAUDE.md` links to this file; edit this source only.
4
+
5
+ ## Implementation discipline
6
+
7
+ - Continue work on the checked-out branch and deliver commits there. Create or switch to a feature branch, and open a pull request, only when the user explicitly requests that action.
8
+ - Build the approved requirement; actively look for native capabilities that improve its reliability, usability or execution quality. Apply improvements within that behavior; propose material product changes on GitHub with evidence, benefit, cost and acceptance criteria. YAGNI limits speculative implementation, not discovery or proposals. Search the codebase first and reuse an existing implementation.
9
+ - Autopilot is a DSH plugin. Before implementing a capability, inspect supported DSH services, plugins, presets and extension points; reuse or compose them. Implement only missing Autopilot behavior, not a replacement agent loop, Session store, credential system or Web shell. Verify suitability against current source/docs; surface a missing extension instead of silently rebuilding the harness.
10
+ - Before adding code, check in order: standard library, native platform capability, then installed dependencies. Use the first suitable maintained option; write only the missing behavior.
11
+ - Prefer the smallest readable implementation. Keep a one-line solution when it is clear; do not compress code at the cost of comprehension or add speculative abstractions.
12
+ - Organize modules by responsibility and cohesion, not line-count targets. Keep a long file when it owns one clear role behind a deep interface; split when it mixes reasons to change, exposes internal detail, duplicates behavior or couples unrelated callers. Do not create mechanical fragments solely to satisfy a size threshold.
13
+ - Let names, types and structure explain the code. Add brief comments only for non-obvious intent, constraints or failure behavior; do not narrate the code or repeat it in JSDoc. Preserve documentation required by an actual public interface or toolchain.
14
+ - Deliver production-ready behavior: validate external inputs, propagate actionable failures, own resource cleanup, protect secrets and verify relevant behavior. Do not present stubs, happy-path demos or unverified integrations as finished features.
15
+ - Maintain one authoritative implementation. Update affected callers and tests together; do not add parallel versions, compatibility shims or legacy modes. If a real external compatibility obligation or durable-data migration conflicts with this rule, raise it on the GitHub issue before changing or discarding data.
16
+ - Fix a discovered bug in the current task when its cause is clear and the correction is small, safe and verifiable; include a regression test. For larger or independently scoped bugs, search for an existing GitHub issue, then create or update one with evidence, impact, reproduction and acceptance criteria. Link the current task and add a blocking dependency when necessary. Reporting a bug only in chat or leaving it untracked is insufficient; distinguish suspected from reproduced failures.
17
+ - Keep tests risk-based and high-signal. Update affected tests and add the smallest regression, boundary or integration case that proves a real behavior, security or lifecycle contract; each test must identify the failure it prevents. Remove superseded fixtures with their implementation, prefer shared conformance coverage over duplicate vendor cases, and keep suites bounded and fast. Coverage percentage alone does not justify a test.
18
+
19
+ ## Integration and documentation
20
+
21
+ Verify DSH interfaces against the pinned dependency and current upstream source; conceptual spec interfaces are not existing APIs. Keep vendor logic in provider plugins and use the shared Host policy for Web commands. Read the relevant stable specs through the documentation map.
22
+
23
+ When implementing or reviewing Host services, Client UI, lifecycle, persistence, public APIs or tests, follow [plugin engineering standards](docs/engineering.md). They adapt DSH's practices to this external plugin; upstream monorepo conventions do not automatically become this repository's policy.
24
+
25
+ Each rule has one public documentation owner. Keep reusable behavior in specs; record work progress, open questions, review findings and test results on GitHub. Never commit credentials, live ticket content, runtime worktrees or execution transcripts. Report only verification actually performed.
26
+
27
+ Local upstream research lives in `docs/research/`. Agents may read and update it to verify DSH behavior, but it is intentionally excluded from Git and npm and public tracked documents must not link to it. Do not delete this directory merely because Git reports it as ignored. Before shipping a durable fact learned there, record the cited upstream version in the owning spec, ADR or GitHub issue so a clean checkout remains self-contained. If the local directory is absent, inspect the pinned dependency and current upstream source directly.
28
+
29
+ ## Agent skills
30
+
31
+ ### Issue tracker
32
+
33
+ Development work and progress live in GitHub Issues for `canhta/dsh-autopilot`; see [tracker conventions](docs/agents/issue-tracker.md).
34
+
35
+ ### Triage labels
36
+
37
+ Use the five configured triage roles; see [label mapping](docs/agents/triage-labels.md).
38
+
39
+ ### Domain docs
40
+
41
+ Single-context: root `CONTEXT.md` and relevant accepted decisions in `docs/adr/`; see [domain reading rules](docs/agents/domain.md).
package/CONTEXT.md ADDED
@@ -0,0 +1,39 @@
1
+ # Autopilot language
2
+
3
+ Vocabulary for coordinating tracker-approved development through DSH.
4
+
5
+ ## Work and systems
6
+
7
+
8
+ **Plugin repository**: The codebase that develops Autopilot itself.
9
+
10
+ **Target repository**: The codebase modified by an Autopilot execution. Avoid using “repo” when either repository could be meant.
11
+
12
+ **Project scope**: The one configured tracker project from which Autopilot admits work; team/workspace context depends on the tracker.
13
+
14
+ **Tracker provider**: An integration that supplies issue context and applies execution reports to the issue system.
15
+
16
+ **Code-host provider**: An integration that publishes pull requests and resolves their disposition.
17
+
18
+ **Provider binding**: A selected provider implementation and configured connection identity, excluding secret values.
19
+
20
+ **Agent Brief**: The designated tracker comment defining approved scope, constraints and acceptance criteria.
21
+
22
+ ## Execution
23
+
24
+
25
+ **Run**: One admitted ticket execution, including its continuation history. Avoid “task” when referring specifically to this execution record rather than the tracker issue.
26
+
27
+ **Attempt**: An execution interval within a run; resumption is not a new run.
28
+
29
+ **Session**: DSH-owned execution history associated with a run.
30
+
31
+ **Checkpoint**: Continuation information recorded after execution becomes quiescent, not a frozen operating-system process.
32
+
33
+ **Managed worktree**: The Git working directory allocated to an Autopilot run.
34
+
35
+ **Human blocker**: A question or condition requiring a human tracker decision before work continues.
36
+
37
+ **Operational pause**: A resumable stop caused by scheduling, operator hold or spending policy; distinct from a human blocker.
38
+
39
+ **Completed run**: A run whose PR publication has been confirmed; delivery and PR review may still be pending.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 canhta
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/README.md ADDED
@@ -0,0 +1,95 @@
1
+ ![Autopilot — Turn approved work into review-ready pull requests with DeepSeek Harness.](docs/assets/banner.png)
2
+
3
+ # Autopilot
4
+
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-78dba9?style=flat-square)](LICENSE)
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/canhta/dsh-autopilot/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/canhta/dsh-autopilot/actions/workflows/ci.yml)
7
+ [![Status: alpha](https://img.shields.io/badge/status-alpha-d8b46a?style=flat-square)](https://github.com/canhta/dsh-autopilot/releases)
8
+ [![Built for DeepSeek Harness](https://img.shields.io/badge/built_for-DeepSeek_Harness-6fa8dc?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
9
+
10
+ Autopilot turns approved tracker work into bounded agent runs and review-ready pull requests inside [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH).
11
+
12
+ ## What problem it solves
13
+
14
+ Running a coding agent is easy. Operating one continuously is harder: somebody still has to decide which ticket is ready, track reported token use, limit concurrency, recover interrupted work, publish the exact verified commit and tell the team what happened.
15
+
16
+ Autopilot adds that operational layer to DSH. It keeps approval, review and merge with humans while automating the work between an approved ticket and a pull request.
17
+
18
+ It does not replace DSH or vendor integrations. DSH owns the agent runtime, Sessions, credentials and Web shell. Tracker and code-host access reuses official MCP servers and their existing authentication; Autopilot adds only the scheduling, lifecycle and publication behavior that joins them together.
19
+
20
+ ## What it does
21
+
22
+ - Admits only tickets carrying the configured ready marker and current human authorization.
23
+ - Queues work under schedule and concurrency limits, reserving a configured allowance against provider-reported token use.
24
+ - Runs the repository's own instructions in a managed Git worktree through DSH.
25
+ - Pauses, resumes and cancels without discarding durable run history.
26
+ - Recovers interrupted publication, notifications and retained worktrees after restart.
27
+ - Revalidates the exact Git state before creating a pull request.
28
+ - Shows queue, run details, worktrees, delivery status and settings in DSH Web.
29
+ - Stops at pull-request creation; humans still own review, CI decisions and merge.
30
+
31
+ The contributor test suite verifies the current alpha with controlled providers. Production provider promotion remains gated by [provider conformance](https://github.com/canhta/dsh-autopilot/issues/4). Jira, GitHub Issues and GitHub code hosting are the first adapters; Linear, Bitbucket and later providers use the same provider contracts and MCP-first authentication policy.
32
+
33
+ The alpha budget fields reserve capacity and reconcile provider-reported usage after requests. They are not an exact cumulative pre-request hard cap; keep native execution disabled for metered production until [the DSH budget boundary](https://github.com/canhta/dsh-autopilot/issues/5) is completed.
34
+
35
+ ## How it works
36
+
37
+ ```mermaid
38
+ flowchart LR
39
+ ticket["Approved ticket"] --> gate["Ready marker + authorization"]
40
+ gate --> queue["Schedule + capacity + budget"]
41
+ queue --> dsh["DSH agent in managed worktree"]
42
+ dsh --> verify["Checks + exact Git state"]
43
+ verify --> pr["Review-ready pull request"]
44
+ pr -.-> notify["Notification"]
45
+ ```
46
+
47
+ If the agent needs a decision, Autopilot posts the blocker back to the tracker and waits for an explicit response. A paused run retains its Session and worktree for a checked resume. A cancelled queued or quiescent run stops cleanly while retaining the evidence needed to understand what happened.
48
+
49
+ Provider failures are isolated from the durable run result. For example, a notification outage cannot undo a completed pull request, and a restart can retry an uncertain publication without creating a duplicate.
50
+
51
+ ## Install
52
+
53
+ Requires an existing DSH installation.
54
+
55
+ ```sh
56
+ dsh plugin --profile web add https://github.com/canhta/dsh-autopilot/releases/download/v0.1.0-alpha.1/canhta-dsh-autopilot-0.1.0-alpha.1.tgz
57
+ dsh --profile web
58
+ ```
59
+
60
+ Open the URL printed by DSH, then select **Autopilot** in the sidebar.
61
+
62
+ <details>
63
+ <summary>Don't have DSH installed?</summary>
64
+
65
+ Install its CLI with npm, then run DSH Web once to finish the normal DSH setup:
66
+
67
+ ```sh
68
+ npm install --global @deepseek-ai/dsh
69
+ dsh web
70
+ ```
71
+
72
+ See the [DSH repository](https://github.com/deepseek-ai/deepseek-harness) for its own installation and safety guidance. Autopilot does not manage or upgrade this installation.
73
+
74
+ </details>
75
+
76
+ ## Configure
77
+
78
+ Open **Settings → Autopilot** to set the tracker and code-host bindings, schedule, concurrency, budget, notifications and retention policy. Configure the ready marker and provider-specific resource mapping in that provider's linked Settings section.
79
+
80
+ Fresh installs keep execution disabled. Before enabling it, select the DSH default Agent preset and model, then configure each provider's DSH Settings namespace and official MCP server in the same profile. Keep vendor OAuth, model keys and tokens in DSH Credentials; Autopilot does not create a second authentication flow.
81
+
82
+ For a systemd-managed VPS installation and backup/restore procedure, see [One-VPS operation](docs/deployment.md).
83
+
84
+ ## Contribute
85
+
86
+ Start with a [GitHub issue](https://github.com/canhta/dsh-autopilot/issues) so the problem and acceptance criteria are clear. Then run the repository checks before opening a focused pull request:
87
+
88
+ ```sh
89
+ git clone https://github.com/canhta/dsh-autopilot.git
90
+ cd dsh-autopilot
91
+ pnpm install
92
+ pnpm run check
93
+ ```
94
+
95
+ The full contribution workflow, verification expectations and package checks are in [Contributing](docs/CONTRIBUTING.md).
@@ -0,0 +1,13 @@
1
+ - insert:
2
+ - id: autopilot
3
+ name: "@canhta/dsh-autopilot"
4
+ - id: autopilot-jira
5
+ name: "@canhta/dsh-autopilot/jira"
6
+ - id: autopilot-github-issues
7
+ name: "@canhta/dsh-autopilot/github-issues"
8
+ - id: autopilot-github-code-host
9
+ name: "@canhta/dsh-autopilot/github-code-host"
10
+ - id: autopilot-webhook-notification
11
+ name: "@canhta/dsh-autopilot/webhook-notification"
12
+ - id: autopilot-ntfy-notification
13
+ name: "@canhta/dsh-autopilot/ntfy-notification"
@@ -0,0 +1,26 @@
1
+ [Unit]
2
+ Description=DSH Autopilot Host
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ User=dsh-autopilot
9
+ Group=dsh-autopilot
10
+ WorkingDirectory=/var/lib/dsh-autopilot/package
11
+ Environment=DSH_HOME=/var/lib/dsh
12
+ Environment=PATH=/usr/local/bin:/usr/bin:/bin
13
+ ExecStart=/usr/bin/env dsh --profile autopilot --host 127.0.0.1 --port 14500 --no-open
14
+ Restart=on-failure
15
+ RestartSec=10s
16
+ TimeoutStopSec=5min
17
+ KillMode=control-group
18
+ UMask=0077
19
+ NoNewPrivileges=true
20
+ PrivateTmp=true
21
+ ProtectHome=true
22
+ ProtectSystem=strict
23
+ ReadWritePaths=/var/lib/dsh /var/lib/dsh-autopilot /srv/autopilot-target
24
+
25
+ [Install]
26
+ WantedBy=multi-user.target
@@ -0,0 +1,60 @@
1
+ # Contributing to dsh-autopilot
2
+
3
+ Start with a [GitHub issue](https://github.com/canhta/dsh-autopilot/issues). Documentation corrections can go straight to a focused PR; for implementation or design changes, agree on scope and acceptance criteria before substantial work. Questions and proposals also belong in Issues.
4
+
5
+ ## Set up locally
6
+
7
+ Follow the [checkout instructions](../README.md#contribute). To submit changes without repository write access, fork the repository on GitHub and clone your fork instead. Create a branch for your contribution:
8
+
9
+ ```sh
10
+ git switch -c docs/clarify-onboarding
11
+ ```
12
+
13
+ Choose a branch name describing your own change. Plugin work requires [Node.js](https://nodejs.org/) 24 or newer and [pnpm](https://pnpm.io/). Install dependencies after cloning:
14
+
15
+ ```sh
16
+ pnpm install
17
+ pnpm run hooks:install
18
+ ```
19
+
20
+ No API credentials are needed for documentation or the local test suite. Provider behavior tests use controlled MCP responses and private in-memory credential boundaries; they do not contact vendor services.
21
+
22
+ ## Find the right context
23
+
24
+ 1. Read the issue body, comments and dependencies. [Tracker conventions](agents/issue-tracker.md) explain development labels and where work updates belong.
25
+ 2. Read [AGENTS.md](../AGENTS.md) for repository-wide contribution rules. These apply to human and agent-authored changes.
26
+ 3. Use the [documentation map](README.md) to select only the relevant stable specs. Read [engineering standards](engineering.md) when implementing or reviewing code.
27
+
28
+ Do not copy the entire documentation set into an issue or agent prompt. Link the authoritative sections and state the task's scope and acceptance criteria.
29
+
30
+ ## Make and verify a change
31
+
32
+ For documentation, update the existing owner of a fact instead of adding a second explanation. Check relative links and anchors, verify commands against the actual repository, and distinguish required behavior from implemented behavior. When changing an upstream API claim, cite the exact dependency or source version in the owning specification, ADR or GitHub issue.
33
+
34
+ Check whitespace errors before submitting:
35
+
36
+ ```sh
37
+ git diff --check
38
+ ```
39
+
40
+ This checks whitespace only, not links, technical accuracy or plugin behavior. Review the rendered Markdown and verify affected references separately.
41
+
42
+ For code, follow the engineering guide's [verification requirements](engineering.md#verification-by-changed-surface). Run the complete local bootstrap gate before submitting:
43
+
44
+ ```sh
45
+ pnpm run check
46
+ ```
47
+
48
+ Use `pnpm test -- tests/<name>.spec.ts` while iterating on one behavior. Package or export changes also require `mkdir -p .artifacts`, `pnpm pack --pack-destination .artifacts`, and `pnpm run verify:package`; the last command installs the tarball into a disposable DSH profile, verifies the effective layer, boots the built Host entry, and checks the exact resolver diagnostic for a missing Host entry. Report exactly what ran; do not substitute upstream DSH tests for this plugin's integration evidence. Live-provider tests require explicitly authorized resources and spending.
49
+
50
+ Biome is the repository formatter and linter. Run `pnpm run format` to apply safe formatting and lint fixes. Lefthook runs Biome on staged JavaScript, TypeScript and JSON before commit, then runs the complete local gate before push.
51
+
52
+ ## Submit a pull request
53
+
54
+ Push your branch to your fork and open a PR against `main`. Include:
55
+
56
+ - The related issue and the behavior or documentation changed.
57
+ - Verification performed, results and any untested conditions.
58
+ - UI evidence when the change affects an implemented interface.
59
+
60
+ Keep the PR focused. Put progress updates, review findings and test evidence in the issue or PR; keep committed docs about lasting behavior and usage. A documentation update alone is not evidence that a planned feature ships.
package/docs/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # Documentation map
2
+
3
+ Read [scope](specs/scope.md) for product responsibilities and [CONTEXT](../CONTEXT.md) for terminology. New contributors should start with [Contributing](CONTRIBUTING.md).
4
+
5
+ ## Where information belongs
6
+
7
+ | Information | Authoritative location |
8
+ | --- | --- |
9
+ | Agent operating rules | [AGENTS.md](../AGENTS.md); `CLAUDE.md` links to the same source |
10
+ | Implementation and verification standards | [Engineering](engineering.md) |
11
+ | Domain terms | [CONTEXT.md](../CONTEXT.md) |
12
+ | Stable product and integration behavior | `specs/` |
13
+ | Accepted architectural decisions | `adr/` |
14
+ | Tasks, dependencies, progress and verification evidence | [GitHub Issues](https://github.com/canhta/dsh-autopilot/issues) |
15
+
16
+ Specifications define required behavior and acceptance rules; they do not claim that a capability has passed its external acceptance gates. Record implementation status and test evidence on the relevant GitHub issue.
17
+
18
+ ## Read by task
19
+
20
+ | Working on | Read |
21
+ | --- | --- |
22
+ | Product boundaries | [Scope](specs/scope.md) |
23
+ | Host, Client, lifecycle, persistence or tests | [Engineering](engineering.md) |
24
+ | Admission, human authorization, pause and recovery | [Lifecycle](specs/lifecycle.md) |
25
+ | Provider composition and extension | [Providers](specs/providers.md) |
26
+ | DSH execution, repository rules and delegation | [Execution](specs/execution.md) |
27
+ | Cordis lifecycle, packaging and Host/Client integration | [Plugin design](specs/plugin.md) |
28
+ | Tracker projections, PR handoff and delivery | [Integrations](specs/integrations.md) |
29
+ | Configuration, scheduling, budget, persistence and cleanup | [Operations](specs/operations.md) |
30
+ | VPS supervision, backup or restore | [Deployment](deployment.md) |
31
+ | UI navigation, visual design and journeys | [Web UX](specs/web-ui.md) |
32
+ | UI data, commands and states | [Components](specs/ui-components.md) |
33
+
34
+ Repository-development conventions apply here only; they are not imposed on repositories that Autopilot operates on.
@@ -0,0 +1,7 @@
1
+ # Domain documentation
2
+
3
+ This repository uses a single domain context. Before domain/design exploration, read root `CONTEXT.md` and the relevant accepted decisions in `docs/adr/`. If either is absent, proceed without creating placeholders. Domain modeling creates records when terms or architectural choices are actually resolved.
4
+
5
+ CONTEXT is a glossary only. Use its terms consistently; it does not hold product scope, implementation plans or progress. ADRs capture accepted architectural decisions and their rationale, not pending questions or task status. Raise a conflict with an accepted ADR explicitly before changing that decision.
6
+
7
+ Use `docs/README.md` to find stable specifications. Open choices and work progress belong in GitHub Issues as defined in `issue-tracker.md`; record an accepted architectural outcome in an ADR only when its enduring decision value warrants one.
@@ -0,0 +1,21 @@
1
+ # Development tracker: GitHub
2
+
3
+ Use GitHub Issues in `canhta/dsh-autopilot` through `gh` for this repository's development work. Autopilot's runtime Jira/Linear providers are unrelated to this choice.
4
+
5
+ ## Authority
6
+
7
+ Tasks, priorities, assignments, blocking dependencies, unresolved choices and implementation progress live only on GitHub. Task-specific scope and acceptance criteria belong in the issue body; progress, review findings and verification evidence belong in issue/PR comments. Link stable design requirements in docs instead of copying them into each update. Do not maintain task mirrors, progress checklists or open-decision registers in repository Markdown.
8
+
9
+ ## Operations
10
+
11
+ Resolve the repository from the remote and use `--repo canhta/dsh-autopilot` when working elsewhere. Read the issue body, labels, comments and blocking dependencies before starting. Use `gh issue view`, `gh issue list`, `gh issue create`, `gh issue edit` and `gh issue comment` for the corresponding operations. Update or link existing issues rather than create duplicates. Close only when completion evidence meets the issue's criteria.
12
+
13
+ Use native sub-issues for decomposition and native issue dependencies for blocking relationships when supported. Preserve the same facts in issue-body links if a GitHub feature is unavailable; never fall back to a local status mirror. Tracker configuration does not grant blanket authority to create, close or publish work outside the user's requested scope.
14
+
15
+ ## Skill requests
16
+
17
+ “Publish to the issue tracker” means create/update a GitHub issue within the authorized task. “Fetch the relevant ticket” means read the GitHub issue and its comments. Task specs belong in issue bodies; stable product/interface specifications belong in `docs/specs/` and are linked from issues.
18
+
19
+ ## Pull requests as a triage surface
20
+
21
+ PRs as a request surface: no.
@@ -0,0 +1,13 @@
1
+ # Triage labels
2
+
3
+ These roles apply to development issues in this repository, not Autopilot runtime labels.
4
+
5
+ | Role | GitHub label | Meaning |
6
+ | --- | --- | --- |
7
+ | needs-triage | needs-triage | Maintainer evaluation required |
8
+ | needs-info | needs-info | Waiting for clarification |
9
+ | ready-for-agent | ready-for-agent | Self-contained work ready for an agent |
10
+ | ready-for-human | ready-for-human | Requires human implementation |
11
+ | wontfix | wontfix | Will not be actioned |
12
+
13
+ Use this mapping whenever an engineering skill names a triage role. Check blocking dependencies separately; a label does not prove a task is unblocked.
Binary file
@@ -0,0 +1,138 @@
1
+ # One-VPS operation
2
+
3
+ This is the proposed initial deployment shape for the implemented Host/runtime slice: one systemd-managed DSH Web
4
+ profile, one local SQLite runtime store, one target repository and managed worktree root, and operator access through an
5
+ SSH local-forward. It deliberately does not configure the unfinished #8 GitHub/Jira publication and delivery providers.
6
+
7
+ Validation is currently local and synthetic: the packaged Host entry boots in a disposable profile, the unit is checked
8
+ with `systemd-analyze verify`, and a separate synthetic process is refused while the first Host owns the same store.
9
+ No real VPS shutdown/restart or offline backup/restore drill has been performed. Those steps remain an explicit issue #9
10
+ acceptance gate; this recipe must not be presented as production-recovery evidence until that drill is recorded.
11
+
12
+ The commands below assume a dedicated `dsh-autopilot` system account and these roots:
13
+
14
+ | Data | Path |
15
+ | --- | --- |
16
+ | DSH profile, Settings and Session data | `/var/lib/dsh` |
17
+ | installed plugin checkout/artifact | `/var/lib/dsh-autopilot/package` |
18
+ | Autopilot SQLite runtime store | `/var/lib/dsh-autopilot/runtime/state.sqlite` |
19
+ | managed worktrees | `/var/lib/dsh-autopilot/worktrees` |
20
+ | target repository, including the worktrees' common Git directory | `/srv/autopilot-target` |
21
+ | offline backups | `/var/backups/dsh-autopilot` |
22
+
23
+ Keep all of these on local durable storage. DSH's SQLite WAL mode is not selected for a network filesystem.
24
+
25
+ ## Install and supervise
26
+
27
+ Install DSH, Node 24, pnpm and Git through the operator-controlled installation path. Copy the reviewed release artifact to
28
+ `/var/lib/dsh-autopilot/package`, create the DSH `autopilot` profile from the Web defaults, and install the artifact:
29
+
30
+ ```sh
31
+ sudo -u dsh-autopilot env DSH_HOME=/var/lib/dsh \
32
+ dsh --profile autopilot --from-default-profile web --dump-config >/dev/null
33
+ sudo -u dsh-autopilot env DSH_HOME=/var/lib/dsh \
34
+ dsh plugin --profile autopilot add \
35
+ /var/lib/dsh-autopilot/package/canhta-dsh-autopilot-0.1.0-alpha.1.tgz
36
+ ```
37
+
38
+ Record the installed DSH version and artifact checksum before promotion. Upgrade either only as a reviewed deployment
39
+ change. Autopilot does not install, replace or upgrade the operator's DSH runtime.
40
+
41
+ In the effective DSH profile, configure the SQLite storage row at
42
+ `/var/lib/dsh-autopilot/runtime/state.sqlite`. Autopilot derives persistence and process ownership from that DSH storage
43
+ composition. Its optional Host-only `runtimeStorePath` setting is only a fail-closed assertion of the same absolute path;
44
+ it neither selects storage nor enables maintenance. Set `managedWorktreeRoot` to `/var/lib/dsh-autopilot/worktrees`,
45
+ `targetRepository` to `/srv/autopilot-target`, and the approved target base branch. Select the DSH default Agent preset
46
+ and model route for unattended work. Keep execution disabled until those native services and the remaining execution
47
+ settings validate and the profile dump shows the intended effective values. The alpha budget fields reconcile
48
+ provider-reported usage after requests; they are not an exact cumulative pre-request hard cap. Keep metered production
49
+ execution disabled until the enforcement boundary tracked in [#5](https://github.com/canhta/dsh-autopilot/issues/5)
50
+ is complete.
51
+
52
+ Install [the supplied unit](../deploy/dsh-autopilot.service) as `/etc/systemd/system/dsh-autopilot.service`, then run:
53
+
54
+ ```sh
55
+ sudo systemctl daemon-reload
56
+ sudo systemctl enable --now dsh-autopilot.service
57
+ sudo systemctl status dsh-autopilot.service
58
+ sudo journalctl --unit dsh-autopilot.service --since today
59
+ ```
60
+
61
+ The process stays on DSH's supported loopback Web binding. Reach it from an operator workstation with an authenticated,
62
+ encrypted SSH tunnel, then open the loopback URL printed by DSH:
63
+
64
+ ```sh
65
+ ssh -N -L 127.0.0.1:14500:127.0.0.1:14500 operator@vps.example
66
+ ```
67
+
68
+ This is an administrative access path, not a public Web deployment. Do not copy a `0.0.0.0` example: the selected DSH
69
+ Web cohort rejects it, and a generic reverse proxy does not make durable Settings safe on a remote hostname. A public
70
+ TLS deployment remains unclaimed until the separate paired-access composition passes the plugin access acceptance suite.
71
+
72
+ Keep provider credentials out of the unit, Settings snapshots, backup command line and shell environment. When live
73
+ providers arrive, provision encrypted systemd credentials (or an equivalently private host credential mechanism), expose
74
+ only their credential references to the DSH credential/provider configuration, and back up the encrypted source through
75
+ the operator's secret-recovery system. Configure model credentials through the selected DSH provider; Autopilot neither
76
+ reads nor stores them.
77
+
78
+ ## Shutdown and health
79
+
80
+ `systemctl stop dsh-autopilot` gives the Host five minutes to fence admission, quiesce managed Agent/process ranges,
81
+ flush Sessions, persist pause/recovery facts, close the stores and finally release the runtime-owner fence. systemd's
82
+ control-group kill policy is a last resort after that bounded graceful shutdown; a forced kill leaves recovery work for
83
+ the next start.
84
+
85
+ Operational health has independent facts:
86
+
87
+ - process liveness and whether this Host holds the configured runtime-store fence;
88
+ - maintenance-store usability;
89
+ - unfinished-run, cleanup-intent and registered publication/delivery recovery;
90
+ - current code-host disposition availability;
91
+ - admission permitted, intentionally paused, or blocked by recovery.
92
+
93
+ A running process with recovery or persistence failure is not ready to dispatch. An intentionally disabled/draining
94
+ scheduler is paused, not dead. On restart, the owner fence is acquired before run-state recovery. New dispatch remains
95
+ blocked while an interrupted run or registered #8 recovery participant reports pending/failed work.
96
+
97
+ ## Consistent backup
98
+
99
+ Use an offline backup. Stopping the service is the consistency boundary across SQLite, DSH Session files, Git's common
100
+ directory and linked worktrees; copying them live at unrelated instants is not a supported backup.
101
+
102
+ ```sh
103
+ sudo systemctl stop dsh-autopilot.service
104
+ sudo test ! -e /var/lib/dsh-autopilot/runtime/state.sqlite.autopilot-owner
105
+ sudo install -d -m 0700 /var/backups/dsh-autopilot
106
+ sudo tar -C / -cpf /var/backups/dsh-autopilot/autopilot-YYYYMMDDTHHMMSSZ.tar \
107
+ var/lib/dsh \
108
+ var/lib/dsh-autopilot/runtime \
109
+ var/lib/dsh-autopilot/worktrees \
110
+ var/lib/dsh-autopilot/package \
111
+ srv/autopilot-target
112
+ sudo systemctl start dsh-autopilot.service
113
+ ```
114
+
115
+ Record the archive checksum, exact DSH version, plugin artifact checksum and effective profile dump beside the archive.
116
+ Do not add the released `.autopilot-owner` directory to an archive; its presence means shutdown did not complete and the
117
+ backup must not proceed. The target repository is required because retained worktrees point to its common Git directory.
118
+
119
+ ## Restore drill
120
+
121
+ Test restore on a replacement VPS or an isolated filesystem namespace; never over a running Host. Install the same Node,
122
+ pnpm and Git cohort, stop the service, verify the archive checksum, extract all five roots together, restore the dedicated
123
+ account ownership/modes, and keep admission disabled for inspection:
124
+
125
+ ```sh
126
+ sudo systemctl stop dsh-autopilot.service
127
+ sudo tar -C / -xpf /var/backups/dsh-autopilot/autopilot-YYYYMMDDTHHMMSSZ.tar
128
+ sudo chown -R dsh-autopilot:dsh-autopilot /var/lib/dsh /var/lib/dsh-autopilot /srv/autopilot-target
129
+ sudo -u dsh-autopilot git -C /srv/autopilot-target worktree list --porcelain
130
+ sudo systemctl start dsh-autopilot.service
131
+ sudo systemctl status dsh-autopilot.service
132
+ ```
133
+
134
+ Confirm the runtime owner is held, persistence is ready, every retained path is managed/missing/orphaned as expected,
135
+ Sessions resolve, and recovery is complete before enabling admission. Missing paths and orphans require reconciliation;
136
+ workspace association alone never authorizes deletion. Restore encrypted provider credentials through the separate
137
+ private secret-recovery mechanism, then verify integrations. A pending cleanup intent is reconciled to either “path still
138
+ present; preview again” or “path absent; removal completed before acknowledgement”; it is never blindly replayed.
@@ -0,0 +1,43 @@
1
+ # Plugin engineering standards
2
+
3
+ These are rules for implementing this repository, not instructions imposed on target repositories. Product behavior stays in `specs/`; verify exact upstream APIs against the pinned DSH dependency and current public source before using them.
4
+
5
+ ## Host code and public APIs
6
+
7
+ - Use strict TypeScript and ESM. Reuse owner-exported types; brand opaque ids crossing services. Handle closed discriminated unions exhaustively; merge-extensible registries need an explicit unknown-provider/event path.
8
+ - Validate configuration, provider/model JSON, durable records and process/wire inputs where they enter. Trust required types inside the same typed process; avoid defensive fallback branches for impossible inputs. Normalize provider failures at the provider service, preserving independent facts such as timeout and process exit.
9
+ - Give every public operation a current consumer and documented preconditions, effects, failures and cancellation behavior. Keep helpers private. Deployment-varying choices belong in validated configuration; protocol constants and security invariants are not user tunables.
10
+ - Follow the selected Loader export form: a service-class default export or named function-plugin exports, not both. Declare required service injection; read genuinely optional services through `ctx.get`. Packaging and resource lifetimes follow [plugin integration](specs/plugin.md), not a second local convention.
11
+ - One asynchronous operation has one lifecycle owner. Capture its run/Session identity before awaiting; keep that identity explicit at service, persistence, worker and authority boundaries. Cancellation requested, process exited and all descendants stopped are different observations.
12
+ - Publish derived state and notifications after the durable operation commits. Observer failure cannot undo a committed operation or starve other observers; policy vetoes remain in the deciding operation, not an observer. Enforce authorization through the actual executor, including direct and alternate callers.
13
+ - Bound complete retained/emitted values, including framing and metadata. Own temporary paths, output files and child lifetimes; use private unpredictable paths and the configured subprocess environment policy. Worktree removal follows [cleanup requirements](specs/operations.md#worktrees-and-cleanup), not generic recursive deletion.
14
+
15
+ ## Client code
16
+
17
+ Compose in `apply` through DSH slots and injected services. Derive the framework's runtime, child-slot, store and inject prop types rather than restating them. Components receive data and callbacks; they do not receive `ctx`, whole services or custom service-access hooks.
18
+
19
+ Keep Host-derived business data in its owning data object. Declared stores hold shared view state such as selection and drafts; local component state holds local interaction. Subscribe through framework-provided hooks; do not mirror external snapshots with manual subscriptions. Keep observable and unchanged snapshot identities stable. Command/query behavior belongs to [UI components](specs/ui-components.md).
20
+
21
+ Use public static primitives, not another feature plugin's private exports. Route cross-feature UI through declared slots, not ReactNode-valued service props. Use CSS Modules and semantic DSH tokens; route product copy, accessibility names and formatters through typed locale dictionaries. Keep external ticket text and stable identifiers verbatim. Verify exact imports against the pinned DSH package; [visual requirements](specs/web-ui.md) own appearance and accessibility acceptance.
22
+
23
+ ## Verification by changed surface
24
+
25
+ Plan the relevant tiers on the implementation issue before coding. Use real DSH services beneath controlled external/model/clock inputs. Keep source tests and packed-artifact tests explicit so stale build outputs cannot make a source test pass.
26
+
27
+ | Changed surface | Required evidence |
28
+ | --- | --- |
29
+ | Policy, provider or durable operation | Behavior tests for success, denial, malformed external input, uncertain acknowledgement and recovery; relevant [provider conformance](specs/providers.md#future-providers-and-acceptance). |
30
+ | Registration, async resource or composition | Loader-booted fixture through a supported profile; missing dependency, withdrawal, unload/remount and no surviving resources or duplicate registrations. Hand-built plugin mounting alone is insufficient. |
31
+ | Persistence, pause or external side effect | Real storage/fixture Git state across actual restart; verify committed and uncommitted outcomes independently, not just a returned status. |
32
+ | Model-visible input/output | Keyless assembled Session replay/expected-output evidence; inspect persisted events and actual workspace effects. Update intended expectations explicitly, never refresh them in CI. |
33
+ | Client data or presentation | Data-layer tests plus realistic component fixtures; assembled DSH browser evidence for slot/loading, interaction or visible changes. Follow [visual acceptance](specs/web-ui.md#visual-acceptance). |
34
+ | Distribution or public exports | Install the packed artifact outside the checkout; exercise built Host/Client and worker entries actually shipped. Declare assets/dependencies completely; do not rely on upstream source paths. |
35
+ | Live-provider support | Explicitly authorized, bounded test resources and spending. Keyless/mocked success does not certify live support; skipped checks remain reported as skipped. |
36
+
37
+ Tests own unique ports, directories and processes, clean up on failure, and synchronize on observed events rather than guessed sleeps. Include empty, exact-limit, multibyte and oversized-result cases when adding bounds. A regression test must fail when its guarded defect is reintroduced. Verify files, Git state and external receipts independently of model prose.
38
+
39
+ Run the smallest checks covering the changed surface; broader CI supplies the supported platform matrix. Define this repository's runnable gates when build tooling exists, using maintained DSH test helpers where externally usable. Upstream command names and coverage percentages are not evidence that this repository has those gates. Report exact commands, skips and remaining gaps on GitHub.
40
+
41
+ ## Documentation and diagnostics
42
+
43
+ Update affected public usage/error documentation with behavior. Explain non-obvious constraints and model/token/cache effects when a plugin contributes model-visible material; link shared definitions instead of repeating them. Add executable invariant checks only for independent observations that can diverge, not empty companions or assertions of registration metadata. [AGENTS.md](../AGENTS.md) owns prose discipline and discovered-bug handling.