@oscharko-dev/keiko-server 0.2.8 → 0.2.9

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 (281) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/chat-handlers.d.ts +18 -2
  3. package/dist/chat-handlers.d.ts.map +1 -1
  4. package/dist/chat-handlers.js +185 -3
  5. package/dist/command-runner-errors.d.ts +17 -0
  6. package/dist/command-runner-errors.d.ts.map +1 -0
  7. package/dist/command-runner-errors.js +37 -0
  8. package/dist/command-runner-evidence.d.ts +23 -0
  9. package/dist/command-runner-evidence.d.ts.map +1 -0
  10. package/dist/command-runner-evidence.js +69 -0
  11. package/dist/command-runner-routes.d.ts +7 -0
  12. package/dist/command-runner-routes.d.ts.map +1 -0
  13. package/dist/command-runner-routes.js +175 -0
  14. package/dist/command-runner.d.ts +29 -0
  15. package/dist/command-runner.d.ts.map +1 -0
  16. package/dist/command-runner.js +348 -0
  17. package/dist/conversation-prompt.d.ts +2 -2
  18. package/dist/conversation-prompt.d.ts.map +1 -1
  19. package/dist/conversation-prompt.js +17 -1
  20. package/dist/csp.d.ts.map +1 -1
  21. package/dist/csp.js +3 -0
  22. package/dist/deps.d.ts +27 -1
  23. package/dist/deps.d.ts.map +1 -1
  24. package/dist/deps.js +288 -13
  25. package/dist/discussion-prompt.d.ts +4 -0
  26. package/dist/discussion-prompt.d.ts.map +1 -0
  27. package/dist/discussion-prompt.js +19 -0
  28. package/dist/editor/agentActionAudit.d.ts +18 -0
  29. package/dist/editor/agentActionAudit.d.ts.map +1 -0
  30. package/dist/editor/agentActionAudit.js +80 -0
  31. package/dist/editor/agentRoutes.d.ts +1 -0
  32. package/dist/editor/agentRoutes.d.ts.map +1 -1
  33. package/dist/editor/agentRoutes.js +292 -55
  34. package/dist/editor/agentSessionRegistry.d.ts +35 -0
  35. package/dist/editor/agentSessionRegistry.d.ts.map +1 -0
  36. package/dist/editor/agentSessionRegistry.js +243 -0
  37. package/dist/editor/completionRoutes.d.ts.map +1 -1
  38. package/dist/editor/completionRoutes.js +5 -10
  39. package/dist/editor/languageRoutes.d.ts +12 -1
  40. package/dist/editor/languageRoutes.d.ts.map +1 -1
  41. package/dist/editor/languageRoutes.js +71 -8
  42. package/dist/editor/languageService.d.ts +3 -2
  43. package/dist/editor/languageService.d.ts.map +1 -1
  44. package/dist/editor/languageService.js +41 -3
  45. package/dist/editor/languageServiceHost.d.ts.map +1 -1
  46. package/dist/editor/languageServiceHost.js +2 -2
  47. package/dist/editor/lsp/hostLanguageOperation.d.ts +17 -0
  48. package/dist/editor/lsp/hostLanguageOperation.d.ts.map +1 -0
  49. package/dist/editor/lsp/hostLanguageOperation.js +436 -0
  50. package/dist/editor/lsp/hostLanguageProviders.d.ts +26 -0
  51. package/dist/editor/lsp/hostLanguageProviders.d.ts.map +1 -0
  52. package/dist/editor/lsp/hostLanguageProviders.js +161 -0
  53. package/dist/editor/lsp/lspFrameCodec.d.ts +13 -0
  54. package/dist/editor/lsp/lspFrameCodec.d.ts.map +1 -0
  55. package/dist/editor/lsp/lspFrameCodec.js +164 -0
  56. package/dist/editor/lsp/lspJsonRpcClient.d.ts +34 -0
  57. package/dist/editor/lsp/lspJsonRpcClient.d.ts.map +1 -0
  58. package/dist/editor/lsp/lspJsonRpcClient.js +173 -0
  59. package/dist/editor/lsp/lspLanguageProvider.d.ts +7 -0
  60. package/dist/editor/lsp/lspLanguageProvider.d.ts.map +1 -0
  61. package/dist/editor/lsp/lspLanguageProvider.js +29 -0
  62. package/dist/editor/lsp/lspLifecycleLedger.d.ts +5 -0
  63. package/dist/editor/lsp/lspLifecycleLedger.d.ts.map +1 -0
  64. package/dist/editor/lsp/lspLifecycleLedger.js +37 -0
  65. package/dist/editor/lsp/lspNodeAdapter.d.ts +31 -0
  66. package/dist/editor/lsp/lspNodeAdapter.d.ts.map +1 -0
  67. package/dist/editor/lsp/lspNodeAdapter.js +230 -0
  68. package/dist/editor/lsp/lspProcessManager.d.ts +24 -0
  69. package/dist/editor/lsp/lspProcessManager.d.ts.map +1 -0
  70. package/dist/editor/lsp/lspProcessManager.js +255 -0
  71. package/dist/editor/lsp/lspRestartThrottle.d.ts +6 -0
  72. package/dist/editor/lsp/lspRestartThrottle.d.ts.map +1 -0
  73. package/dist/editor/lsp/lspRestartThrottle.js +24 -0
  74. package/dist/editor/lsp/lspStatusRoute.d.ts +8 -0
  75. package/dist/editor/lsp/lspStatusRoute.d.ts.map +1 -0
  76. package/dist/editor/lsp/lspStatusRoute.js +22 -0
  77. package/dist/editor/lsp/lspTransport.d.ts +19 -0
  78. package/dist/editor/lsp/lspTransport.d.ts.map +1 -0
  79. package/dist/editor/lsp/lspTransport.js +55 -0
  80. package/dist/editor/lsp/testing/fakeLspProcess.d.ts +23 -0
  81. package/dist/editor/lsp/testing/fakeLspProcess.d.ts.map +1 -0
  82. package/dist/editor/lsp/testing/fakeLspProcess.js +132 -0
  83. package/dist/files.d.ts +45 -0
  84. package/dist/files.d.ts.map +1 -1
  85. package/dist/files.js +631 -7
  86. package/dist/gateway-readiness.js +3 -3
  87. package/dist/gateway-setup.d.ts +2 -0
  88. package/dist/gateway-setup.d.ts.map +1 -1
  89. package/dist/gateway-setup.js +275 -11
  90. package/dist/gitDelivery/actionSheetProjection.d.ts +30 -0
  91. package/dist/gitDelivery/actionSheetProjection.d.ts.map +1 -0
  92. package/dist/gitDelivery/actionSheetProjection.js +206 -0
  93. package/dist/gitDelivery/actionSheetRoutes.d.ts +29 -0
  94. package/dist/gitDelivery/actionSheetRoutes.d.ts.map +1 -0
  95. package/dist/gitDelivery/actionSheetRoutes.js +293 -0
  96. package/dist/gitDelivery/agentOperationsRoutes.d.ts +33 -0
  97. package/dist/gitDelivery/agentOperationsRoutes.d.ts.map +1 -0
  98. package/dist/gitDelivery/agentOperationsRoutes.js +405 -0
  99. package/dist/gitDelivery/commitRoutes.d.ts +23 -0
  100. package/dist/gitDelivery/commitRoutes.d.ts.map +1 -0
  101. package/dist/gitDelivery/commitRoutes.js +204 -0
  102. package/dist/gitDelivery/evidenceRoutes.d.ts +9 -0
  103. package/dist/gitDelivery/evidenceRoutes.d.ts.map +1 -0
  104. package/dist/gitDelivery/evidenceRoutes.js +101 -0
  105. package/dist/gitDelivery/execution.d.ts +38 -0
  106. package/dist/gitDelivery/execution.d.ts.map +1 -0
  107. package/dist/gitDelivery/execution.js +117 -0
  108. package/dist/gitDelivery/localMutationRoutes.d.ts +30 -0
  109. package/dist/gitDelivery/localMutationRoutes.d.ts.map +1 -0
  110. package/dist/gitDelivery/localMutationRoutes.js +165 -0
  111. package/dist/gitDelivery/mergeExecution.d.ts +63 -0
  112. package/dist/gitDelivery/mergeExecution.d.ts.map +1 -0
  113. package/dist/gitDelivery/mergeExecution.js +168 -0
  114. package/dist/gitDelivery/mergeRoutes.d.ts +12 -0
  115. package/dist/gitDelivery/mergeRoutes.d.ts.map +1 -0
  116. package/dist/gitDelivery/mergeRoutes.js +218 -0
  117. package/dist/gitDelivery/mutationEvidenceLedger.d.ts +23 -0
  118. package/dist/gitDelivery/mutationEvidenceLedger.d.ts.map +1 -0
  119. package/dist/gitDelivery/mutationEvidenceLedger.js +87 -0
  120. package/dist/gitDelivery/prExecution.d.ts +54 -0
  121. package/dist/gitDelivery/prExecution.d.ts.map +1 -0
  122. package/dist/gitDelivery/prExecution.js +192 -0
  123. package/dist/gitDelivery/prRoutes.d.ts +12 -0
  124. package/dist/gitDelivery/prRoutes.d.ts.map +1 -0
  125. package/dist/gitDelivery/prRoutes.js +256 -0
  126. package/dist/gitDelivery/pushExecution.d.ts +43 -0
  127. package/dist/gitDelivery/pushExecution.d.ts.map +1 -0
  128. package/dist/gitDelivery/pushExecution.js +124 -0
  129. package/dist/gitDelivery/pushRoutes.d.ts +12 -0
  130. package/dist/gitDelivery/pushRoutes.d.ts.map +1 -0
  131. package/dist/gitDelivery/pushRoutes.js +200 -0
  132. package/dist/gitDelivery/requestGuards.d.ts +15 -0
  133. package/dist/gitDelivery/requestGuards.d.ts.map +1 -0
  134. package/dist/gitDelivery/requestGuards.js +97 -0
  135. package/dist/gitDelivery/syncEvidence.d.ts +37 -0
  136. package/dist/gitDelivery/syncEvidence.d.ts.map +1 -0
  137. package/dist/gitDelivery/syncEvidence.js +85 -0
  138. package/dist/gitDelivery/syncExecution.d.ts +30 -0
  139. package/dist/gitDelivery/syncExecution.d.ts.map +1 -0
  140. package/dist/gitDelivery/syncExecution.js +266 -0
  141. package/dist/gitDelivery/syncRoutes.d.ts +13 -0
  142. package/dist/gitDelivery/syncRoutes.d.ts.map +1 -0
  143. package/dist/gitDelivery/syncRoutes.js +200 -0
  144. package/dist/gitPorcelainStatus.d.ts +15 -0
  145. package/dist/gitPorcelainStatus.d.ts.map +1 -0
  146. package/dist/gitPorcelainStatus.js +104 -0
  147. package/dist/gitRepositoryReads.d.ts +10 -0
  148. package/dist/gitRepositoryReads.d.ts.map +1 -0
  149. package/dist/gitRepositoryReads.js +314 -0
  150. package/dist/gitRepositoryRoutes.d.ts +7 -0
  151. package/dist/gitRepositoryRoutes.d.ts.map +1 -0
  152. package/dist/gitRepositoryRoutes.js +221 -0
  153. package/dist/gitRoutes.d.ts +66 -0
  154. package/dist/gitRoutes.d.ts.map +1 -0
  155. package/dist/gitRoutes.js +543 -0
  156. package/dist/governed-workflow.d.ts +2 -0
  157. package/dist/governed-workflow.d.ts.map +1 -1
  158. package/dist/governed-workflow.js +4 -0
  159. package/dist/grounded-qa.d.ts +11 -0
  160. package/dist/grounded-qa.d.ts.map +1 -1
  161. package/dist/grounded-qa.js +13 -4
  162. package/dist/headers.d.ts +4 -1
  163. package/dist/headers.d.ts.map +1 -1
  164. package/dist/headers.js +11 -4
  165. package/dist/index.d.ts +8 -1
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js +9 -1
  168. package/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts +1 -1
  169. package/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -1
  170. package/dist/qualityIntelligence/figmaSnapshotRoutes.js +1 -1
  171. package/dist/read-handlers.d.ts +5 -0
  172. package/dist/read-handlers.d.ts.map +1 -1
  173. package/dist/read-handlers.js +57 -1
  174. package/dist/routes.d.ts.map +1 -1
  175. package/dist/routes.js +259 -6
  176. package/dist/run-engine.d.ts.map +1 -1
  177. package/dist/run-engine.js +3 -0
  178. package/dist/run-handlers.d.ts.map +1 -1
  179. package/dist/run-handlers.js +74 -4
  180. package/dist/run-request.d.ts +11 -0
  181. package/dist/run-request.d.ts.map +1 -1
  182. package/dist/run-request.js +158 -10
  183. package/dist/runtime/capabilityDetector.d.ts +38 -0
  184. package/dist/runtime/capabilityDetector.d.ts.map +1 -0
  185. package/dist/runtime/capabilityDetector.js +443 -0
  186. package/dist/runtime/capabilityRoutes.d.ts +9 -0
  187. package/dist/runtime/capabilityRoutes.d.ts.map +1 -0
  188. package/dist/runtime/capabilityRoutes.js +45 -0
  189. package/dist/runtime/containerEngineDetector.d.ts +17 -0
  190. package/dist/runtime/containerEngineDetector.d.ts.map +1 -0
  191. package/dist/runtime/containerEngineDetector.js +222 -0
  192. package/dist/runtime/containerRoutes.d.ts +8 -0
  193. package/dist/runtime/containerRoutes.d.ts.map +1 -0
  194. package/dist/runtime/containerRoutes.js +207 -0
  195. package/dist/runtime/containerRunner-errors.d.ts +18 -0
  196. package/dist/runtime/containerRunner-errors.d.ts.map +1 -0
  197. package/dist/runtime/containerRunner-errors.js +42 -0
  198. package/dist/runtime/containerRunner-evidence.d.ts +24 -0
  199. package/dist/runtime/containerRunner-evidence.d.ts.map +1 -0
  200. package/dist/runtime/containerRunner-evidence.js +74 -0
  201. package/dist/runtime/containerRunner.d.ts +37 -0
  202. package/dist/runtime/containerRunner.d.ts.map +1 -0
  203. package/dist/runtime/containerRunner.js +443 -0
  204. package/dist/server.d.ts.map +1 -1
  205. package/dist/server.js +24 -4
  206. package/dist/store/schema.d.ts +1 -1
  207. package/dist/store/schema.d.ts.map +1 -1
  208. package/dist/store/schema.js +62 -1
  209. package/dist/task-workspace/active-store.d.ts +21 -0
  210. package/dist/task-workspace/active-store.d.ts.map +1 -0
  211. package/dist/task-workspace/active-store.js +55 -0
  212. package/dist/task-workspace/authorization.d.ts +7 -0
  213. package/dist/task-workspace/authorization.d.ts.map +1 -0
  214. package/dist/task-workspace/authorization.js +54 -0
  215. package/dist/task-workspace/binding.d.ts +3 -0
  216. package/dist/task-workspace/binding.d.ts.map +1 -0
  217. package/dist/task-workspace/binding.js +22 -0
  218. package/dist/task-workspace/cleanup.d.ts +4 -0
  219. package/dist/task-workspace/cleanup.d.ts.map +1 -0
  220. package/dist/task-workspace/cleanup.js +428 -0
  221. package/dist/task-workspace/errors.d.ts +14 -0
  222. package/dist/task-workspace/errors.d.ts.map +1 -0
  223. package/dist/task-workspace/errors.js +81 -0
  224. package/dist/task-workspace/evidence.d.ts +32 -0
  225. package/dist/task-workspace/evidence.d.ts.map +1 -0
  226. package/dist/task-workspace/evidence.js +52 -0
  227. package/dist/task-workspace/field-safety.d.ts +3 -0
  228. package/dist/task-workspace/field-safety.d.ts.map +1 -0
  229. package/dist/task-workspace/field-safety.js +42 -0
  230. package/dist/task-workspace/health.d.ts +4 -0
  231. package/dist/task-workspace/health.d.ts.map +1 -0
  232. package/dist/task-workspace/health.js +163 -0
  233. package/dist/task-workspace/lifecycle.d.ts +3 -0
  234. package/dist/task-workspace/lifecycle.d.ts.map +1 -0
  235. package/dist/task-workspace/lifecycle.js +248 -0
  236. package/dist/task-workspace/locks.d.ts +13 -0
  237. package/dist/task-workspace/locks.d.ts.map +1 -0
  238. package/dist/task-workspace/locks.js +44 -0
  239. package/dist/task-workspace/managed-root.d.ts +7 -0
  240. package/dist/task-workspace/managed-root.d.ts.map +1 -0
  241. package/dist/task-workspace/managed-root.js +98 -0
  242. package/dist/task-workspace/mutex.d.ts +8 -0
  243. package/dist/task-workspace/mutex.d.ts.map +1 -0
  244. package/dist/task-workspace/mutex.js +82 -0
  245. package/dist/task-workspace/naming.d.ts +15 -0
  246. package/dist/task-workspace/naming.d.ts.map +1 -0
  247. package/dist/task-workspace/naming.js +0 -0
  248. package/dist/task-workspace/provisioning.d.ts +3 -0
  249. package/dist/task-workspace/provisioning.d.ts.map +1 -0
  250. package/dist/task-workspace/provisioning.js +528 -0
  251. package/dist/task-workspace/reconciliation.d.ts +15 -0
  252. package/dist/task-workspace/reconciliation.d.ts.map +1 -0
  253. package/dist/task-workspace/reconciliation.js +274 -0
  254. package/dist/task-workspace/repair.d.ts +3 -0
  255. package/dist/task-workspace/repair.d.ts.map +1 -0
  256. package/dist/task-workspace/repair.js +286 -0
  257. package/dist/task-workspace/routes.d.ts +19 -0
  258. package/dist/task-workspace/routes.d.ts.map +1 -0
  259. package/dist/task-workspace/routes.js +481 -0
  260. package/dist/task-workspace/store.d.ts +12 -0
  261. package/dist/task-workspace/store.d.ts.map +1 -0
  262. package/dist/task-workspace/store.js +128 -0
  263. package/dist/task-workspace/types.d.ts +170 -0
  264. package/dist/task-workspace/types.d.ts.map +1 -0
  265. package/dist/task-workspace/types.js +5 -0
  266. package/dist/voice-action-governance.d.ts +23 -0
  267. package/dist/voice-action-governance.d.ts.map +1 -0
  268. package/dist/voice-action-governance.js +126 -0
  269. package/dist/voice-handlers.d.ts +6 -0
  270. package/dist/voice-handlers.d.ts.map +1 -0
  271. package/dist/voice-handlers.js +570 -0
  272. package/dist/voice-realtime-grounded-tool.d.ts +31 -0
  273. package/dist/voice-realtime-grounded-tool.d.ts.map +1 -0
  274. package/dist/voice-realtime-grounded-tool.js +322 -0
  275. package/dist/voice-realtime.d.ts +69 -0
  276. package/dist/voice-realtime.d.ts.map +1 -0
  277. package/dist/voice-realtime.js +787 -0
  278. package/dist/workspace-state-handlers.d.ts +5 -0
  279. package/dist/workspace-state-handlers.d.ts.map +1 -0
  280. package/dist/workspace-state-handlers.js +106 -0
  281. package/package.json +20 -19
package/dist/headers.js CHANGED
@@ -1,21 +1,28 @@
1
1
  // Security headers (ADR-0011 D5) applied to every BFF response. The CSP is precomputed once from
2
2
  // the static export's inline-script hashes (see csp.ts) and reused for all responses.
3
- // Headers set on every response regardless of route.
3
+ // Headers set on every response regardless of route. The Permissions-Policy microphone directive is
4
+ // computed separately (see applySecurityHeaders) because Issue #495 scopes it to voice-capable
5
+ // deployments; every other directive is fixed.
4
6
  const BASE_SECURITY_HEADERS = {
5
7
  "X-Content-Type-Options": "nosniff",
6
8
  "X-Frame-Options": "DENY",
7
9
  "Referrer-Policy": "no-referrer",
8
10
  "Cross-Origin-Opener-Policy": "same-origin",
9
11
  "Cross-Origin-Resource-Policy": "same-origin",
10
- "Permissions-Policy": "camera=(), geolocation=(), microphone=(), payment=(), usb=()",
11
12
  };
13
+ function permissionsPolicy(allowMicrophone) {
14
+ const microphone = allowMicrophone ? "microphone=(self)" : "microphone=()";
15
+ return `camera=(), geolocation=(), ${microphone}, payment=(), usb=()`;
16
+ }
12
17
  // Applies the CSP and the base security headers, plus `Cache-Control: no-store` for API responses
13
- // (the contract requires it on every `/api/*` response; D5).
14
- export function applySecurityHeaders(res, csp, isApiPath) {
18
+ // (the contract requires it on every `/api/*` response; D5). The microphone directive is relaxed only
19
+ // when `options.allowMicrophone` is true (ADR-0058 D6 / docs/voice/privacy-contract.md).
20
+ export function applySecurityHeaders(res, csp, isApiPath, options = {}) {
15
21
  res.setHeader("Content-Security-Policy", csp);
16
22
  for (const [name, value] of Object.entries(BASE_SECURITY_HEADERS)) {
17
23
  res.setHeader(name, value);
18
24
  }
25
+ res.setHeader("Permissions-Policy", permissionsPolicy(options.allowMicrophone === true));
19
26
  if (isApiPath) {
20
27
  res.setHeader("Cache-Control", "no-store");
21
28
  }
package/dist/index.d.ts CHANGED
@@ -21,7 +21,14 @@ export { runMemoryMaintenance, type MaintenanceCounts } from "./memory-maintenan
21
21
  export { exportMemoryDiagnostics, type ExportMemoryDiagnosticsOptions, type MemoryDiagnostics, type MemoryScopeCount, type MemoryStatusHistogram, } from "./memory-diagnostics.js";
22
22
  export { createMemoryEmbedder, selectMemoryEmbeddingModelId, type MemoryEmbedder, } from "./memory-embedding.js";
23
23
  export { buildTerminalEvidenceEntry, appendTerminalEvidence, type TerminalEvidenceEntry, } from "./terminal-evidence.js";
24
- export { handleFilesContent, handleFilesSearch, listFilesDirectories, readFilesContent, readFilesPreview, readFilesTree, searchFiles, writeFilesContent, type FilesContentResponse, type FilesDirectoryEntry, type FilesDirectoryListing, type FilesDirectoryRoot, type FilesEntryKind, type FilesSearchResponse, type FilesSearchResult, type FilesPreviewResponse, type FilesTreeEntry, type FilesTreeResponse, } from "./files.js";
24
+ export { DEFAULT_RUNTIME_CAPABILITY_DEADLINE_MS, PathHostExecutableProbe, RUNTIME_HOST_EXECUTABLE_SPECS, detectRuntimeCapabilities, type HostExecutableProbe, type HostExecutableProbeResult, type HostExecutableSpec, type RuntimeCapabilityDetectorOptions, } from "./runtime/capabilityDetector.js";
25
+ export { handleRuntimeCapabilities, type RuntimeCapabilityRouteOptions, } from "./runtime/capabilityRoutes.js";
26
+ export { detectContainerEngines, DEFAULT_CONTAINER_PROBE_DEADLINE_MS, SUPPORTED_DOCKER_MAJOR, KEIKO_CONTAINERS_DISABLED_ENV, type ContainerProbeDeps, } from "./runtime/containerEngineDetector.js";
27
+ export { createContainerRunnerManager, buildContainerRunArgv, DEFAULT_CONTAINER_EXECUTION_POLICY, DEFAULT_CONTAINER_RESOURCE_LIMITS, DEFAULT_CONTAINER_TASKS, type ContainerRunInput, type ContainerRunnerEventEmitter, type ContainerRunnerManager, type ContainerRunnerManagerOptions, } from "./runtime/containerRunner.js";
28
+ export { handleContainerCapability, handleContainerCatalog, handleContainerEvents, handleCreateContainerRun, handleDeleteContainerRun, } from "./runtime/containerRoutes.js";
29
+ export { ContainerRunnerError, CONTAINER_RUNNER_ERROR_CODES, type ContainerRunnerErrorCode, } from "./runtime/containerRunner-errors.js";
30
+ export { appendContainerRunEvidence, buildContainerRunEvidenceEntry, CONTAINER_RUN_EVIDENCE_KIND, type ContainerRunEvidenceEntry, type ContainerRunEvidenceInput, } from "./runtime/containerRunner-evidence.js";
31
+ export { copyFilesEntry, createFilesEntry, deleteFilesEntry, handleFilesContent, handleFilesCopy, handleFilesCreate, handleFilesDelete, handleFilesRename, handleFilesSearch, listFilesDirectories, readFilesContent, readFilesPreview, readFilesTree, renameFilesEntry, searchFiles, writeFilesContent, type FilesContentResponse, type FilesDirectoryEntry, type FilesDirectoryListing, type FilesDirectoryRoot, type FilesEntryKind, type FilesMutationResponse, type FilesSearchFileRole, type FilesSearchMatchQuality, type FilesSearchResponse, type FilesSearchResult, type FilesSearchRootKind, type FilesPreviewResponse, type FilesTreeEntry, type FilesTreeResponse, } from "./files.js";
25
32
  export { conversationForGateway, MAX_CONTEXT_MESSAGES, type GatewayConversationMessage, } from "./chat-handlers.js";
26
33
  export { conversationForGatewayWithCompaction, type ConversationCompactionOptions, type ConversationCompactionOutcome, } from "./conversation-compaction.js";
27
34
  export { handlePromptEnhancement, buildPromptEnhancementRecordInput, runPromptEnhancement, PromptEnhancementCancelledError, PromptEnhancementInputError, type RunPromptEnhancementDeps, } from "./promptEnhancer/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,KAAK,QAAQ,E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AC"}
package/dist/index.js CHANGED
@@ -26,7 +26,15 @@ export { runMemoryMaintenance } from "./memory-maintenance-handlers.js";
26
26
  export { exportMemoryDiagnostics, } from "./memory-diagnostics.js";
27
27
  export { createMemoryEmbedder, selectMemoryEmbeddingModelId, } from "./memory-embedding.js";
28
28
  export { buildTerminalEvidenceEntry, appendTerminalEvidence, } from "./terminal-evidence.js";
29
- export { handleFilesContent, handleFilesSearch, listFilesDirectories, readFilesContent, readFilesPreview, readFilesTree, searchFiles, writeFilesContent, } from "./files.js";
29
+ export { DEFAULT_RUNTIME_CAPABILITY_DEADLINE_MS, PathHostExecutableProbe, RUNTIME_HOST_EXECUTABLE_SPECS, detectRuntimeCapabilities, } from "./runtime/capabilityDetector.js";
30
+ export { handleRuntimeCapabilities, } from "./runtime/capabilityRoutes.js";
31
+ // Issue #1388 (ADR-0070) — governed container engine detection + execution pilot.
32
+ export { detectContainerEngines, DEFAULT_CONTAINER_PROBE_DEADLINE_MS, SUPPORTED_DOCKER_MAJOR, KEIKO_CONTAINERS_DISABLED_ENV, } from "./runtime/containerEngineDetector.js";
33
+ export { createContainerRunnerManager, buildContainerRunArgv, DEFAULT_CONTAINER_EXECUTION_POLICY, DEFAULT_CONTAINER_RESOURCE_LIMITS, DEFAULT_CONTAINER_TASKS, } from "./runtime/containerRunner.js";
34
+ export { handleContainerCapability, handleContainerCatalog, handleContainerEvents, handleCreateContainerRun, handleDeleteContainerRun, } from "./runtime/containerRoutes.js";
35
+ export { ContainerRunnerError, CONTAINER_RUNNER_ERROR_CODES, } from "./runtime/containerRunner-errors.js";
36
+ export { appendContainerRunEvidence, buildContainerRunEvidenceEntry, CONTAINER_RUN_EVIDENCE_KIND, } from "./runtime/containerRunner-evidence.js";
37
+ export { copyFilesEntry, createFilesEntry, deleteFilesEntry, handleFilesContent, handleFilesCopy, handleFilesCreate, handleFilesDelete, handleFilesRename, handleFilesSearch, listFilesDirectories, readFilesContent, readFilesPreview, readFilesTree, renameFilesEntry, searchFiles, writeFilesContent, } from "./files.js";
30
38
  // PR4-W4 (ADR-0055) — additive exports so the deterministic context-quality gate
31
39
  // (scripts/check-context-quality.mjs) can drive the REAL chat history-compaction splice end-to-end.
32
40
  // Behavior-preserving: these names already exist on their modules; only the barrel surface widens.
@@ -101,7 +101,7 @@ export declare function makeInFlightMap(): Map<string, CoalescedBuildEntry>;
101
101
  /** Reset the module-level coalescing map. Used by tests to ensure isolation. */
102
102
  export declare function resetInFlightMap(): void;
103
103
  export declare function handleFigmaTriggerSnapshot(ctx: RouteContext, deps: UiHandlerDeps, inFlight?: Map<string, CoalescedBuildEntry>): Promise<RouteResult>;
104
- export declare function handleFigmaRevokeToken(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
104
+ export declare function handleFigmaRevokeToken(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
105
105
  export declare function handleFigmaListSnapshots(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
106
106
  export declare function handleFigmaLoadSnapshot(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
107
107
  export declare function handleFigmaUpdateSnapshotMetadata(ctx: RouteContext, deps: UiHandlerDeps): Promise<RouteResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"figmaSnapshotRoutes.d.ts","sourceRoot":"","sources":["../../src/qualityIntelligence/figmaSnapshotRoutes.ts"],"names":[],"mappings":"AAkDA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EASL,KAAK,qBAAqB,EAE1B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AA8I1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACz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7 @@ export async function handleFigmaTriggerSnapshot(ctx, deps, inFlight = defaultIn
707
707
  }
708
708
  }
709
709
  // ─── DELETE /api/figma/token — revoke the stored PAT (#758 rotation/revocation, #760 audit) ───
710
- export function handleFigmaRevokeToken(ctx, deps) {
710
+ export function handleFigmaRevokeToken(_ctx, deps) {
711
711
  const evidenceDir = deps.evidenceDir;
712
712
  if (evidenceDir === undefined || evidenceDir.length === 0) {
713
713
  return { status: 503, body: figmaErrorBody("FIGMA_NO_EVIDENCE_DIR") };
@@ -1,7 +1,12 @@
1
+ import { type EnvSource } from "@oscharko-dev/keiko-model-gateway";
1
2
  import type { RouteContext, RouteResult } from "./routes.js";
2
3
  import type { UiHandlerDeps } from "./deps.js";
3
4
  export declare function handleConfig(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
4
5
  export declare function handleModels(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
6
+ export declare function isVoiceDisabledByPolicy(env: EnvSource): boolean;
7
+ export declare function handleVoiceCapability(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
8
+ export declare function isVoiceDictationCapable(deps: UiHandlerDeps): boolean;
9
+ export declare function isVoiceRealtimeCapable(deps: UiHandlerDeps): boolean;
5
10
  export declare function handleWorkflows(): RouteResult;
6
11
  export declare function handleWorkspace(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
7
12
  export declare function handleEvidenceList(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
@@ -1 +1 @@
1
- {"version":3,"file":"read-handlers.d.ts","sourceRoot":"","sources":["../src/read-handlers.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAW/C,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAUjF;AAID,wBAAgB,YAAY,CAAC,IAAI,EAA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B,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAMtF;AAKD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CA2BxF"}
@@ -5,7 +5,7 @@
5
5
  // construction on disk, served as-is per D9). No secret reaches any response; the config route
6
6
  // never leaks the config path even on a load failure (handled upstream in deps.ts, which yields
7
7
  // `config: undefined` rather than throwing).
8
- import { toSafeObject, listConfiguredCapabilities } from "@oscharko-dev/keiko-model-gateway";
8
+ import { toSafeObject, listConfiguredCapabilities, resolveVoiceCapability, } from "@oscharko-dev/keiko-model-gateway";
9
9
  import { UNIT_TEST_WORKFLOW_DESCRIPTOR, BUG_INVESTIGATION_WORKFLOW_DESCRIPTOR, } from "@oscharko-dev/keiko-workflows";
10
10
  import { DEFAULT_LIMITS } from "@oscharko-dev/keiko-harness";
11
11
  import { listEvidence, loadEvidence, assertValidRunId, EvidenceReadError, EvidenceSchemaError, InvalidRunIdError, } from "@oscharko-dev/keiko-evidence";
@@ -34,6 +34,62 @@ export function handleModels(_ctx, deps) {
34
34
  const models = config === undefined ? [] : listConfiguredCapabilities(config);
35
35
  return { status: 200, body: { models } };
36
36
  }
37
+ // Voice-capability disable kill-switch (Issue #493, ADR-0058 D1). A regulated deployment can
38
+ // disable voice entirely via `KEIKO_VOICE_DISABLED`; the resolver then reports a clean
39
+ // `unavailable` (reason "policy-disabled") and Keiko stays fully usable. Exported so the voice
40
+ // dictation route (Issue #494) gates on the identical kill-switch, keeping one source of truth.
41
+ export function isVoiceDisabledByPolicy(env) {
42
+ const value = env.KEIKO_VOICE_DISABLED;
43
+ return value === "1" || value?.toLowerCase() === "true";
44
+ }
45
+ // Route — voice capability resolution (Issue #493, Epic #491). Returns the content-free voice
46
+ // capability the UI reads before rendering any voice affordance. The resolution carries only enum
47
+ // literals and booleans — never a provider base URL, credential, model id, audio, or transcript —
48
+ // so provider credentials are never returned to the browser (AC4) and nothing sensitive can leak
49
+ // into UI logs (AC5), by construction. When no config is resolved, voice is disabled by policy, or
50
+ // no voice provider is configured, the endpoint returns a clean `unavailable` resolution rather
51
+ // than failing — Keiko stays fully usable in no-voice environments (AC1). Capability detection is
52
+ // metadata-only and performs NO network probe (ADR-0058 out-of-scope for #493).
53
+ export function handleVoiceCapability(_ctx, deps) {
54
+ const config = currentGatewayConfig(deps);
55
+ const policyDisabled = isVoiceDisabledByPolicy(deps.env);
56
+ const voice = resolveVoiceCapability(config ?? { providers: [] }, { policyDisabled });
57
+ return { status: 200, body: { voice } };
58
+ }
59
+ // Issue #495, Epic #491 — whether the running deployment should permit browser microphone capture.
60
+ // True only when the resolved voice capability advertises speech-to-text and voice is not disabled by
61
+ // policy. The server scopes the Permissions-Policy microphone directive to this (headers.ts /
62
+ // server.ts) so a no-voice deployment keeps the strict `microphone=()`. It mirrors the dictation
63
+ // route's capability gate (voice-handlers.ts selectDictationProvider) so the header and the route
64
+ // agree on exactly when dictation is permitted.
65
+ export function isVoiceDictationCapable(deps) {
66
+ const config = currentGatewayConfig(deps);
67
+ if (config === undefined) {
68
+ return false;
69
+ }
70
+ const voice = resolveVoiceCapability(config, {
71
+ policyDisabled: isVoiceDisabledByPolicy(deps.env),
72
+ });
73
+ return voice.available && voice.capabilities.speechToText;
74
+ }
75
+ // Issue #497, Epic #491 (ADR-0058 D3, ADR-0059) — whether the running deployment may open the
76
+ // realtime voice WebSocket control plane and the browser-native WebRTC media plane. True only when
77
+ // the resolved voice capability is the full-realtime profile (`transport.webrtcMedia`) and voice is
78
+ // not disabled by policy. It is the single source of truth for two gates: the capability-gated
79
+ // WebSocket upgrade (server.ts re-opens the BFF upgrade only for this) and the Permissions-Policy
80
+ // microphone scoping (a realtime-only-without-STT deployment still needs `microphone=(self)` for the
81
+ // WebRTC capture track, which `isVoiceDictationCapable` alone would not grant). A no-voice or
82
+ // STT-only deployment returns false, so the upgrade stays hard-rejected (AC1/AC3).
83
+ export function isVoiceRealtimeCapable(deps) {
84
+ const config = currentGatewayConfig(deps);
85
+ if (config === undefined) {
86
+ return false;
87
+ }
88
+ const voice = resolveVoiceCapability(config, {
89
+ policyDisabled: isVoiceDisabledByPolicy(deps.env),
90
+ });
91
+ return voice.available && voice.transport.webrtcMedia;
92
+ }
37
93
  // Route 4 — launch-form metadata: the workflow descriptors plus the synthesized explain-plan and
38
94
  // verify inputs (both are harness tasks with no workflow descriptor — verify is BFF-only and runs
39
95
  // the deterministic verification orchestrator).
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAmK/C,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE;AAID,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,OAAO,SAAS,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAElD,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,CACzB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,aAAa,KAChB,cAAc,GA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.js CHANGED
@@ -5,27 +5,38 @@
5
5
  // server serializes) OR the STREAMING sentinel, meaning it has taken over the raw ServerResponse
6
6
  // (the SSE events route). Non-2xx bodies use the redacted error envelope `{ error: { code, message } }`.
7
7
  import { SDK_VERSION } from "@oscharko-dev/keiko-sdk";
8
- import { handleConfig, handleModels, handleWorkflows, handleWorkspace, handleEvidenceList, handleEvidenceDetail, } from "./read-handlers.js";
8
+ import { handleConfig, handleModels, handleVoiceCapability, handleWorkflows, handleWorkspace, handleEvidenceList, handleEvidenceDetail, } from "./read-handlers.js";
9
+ import { handleGetWorkspaceState, handlePutWorkspaceState } from "./workspace-state-handlers.js";
10
+ import { handleVoiceSpeak, handleVoiceSpeakStream, handleVoiceTranscribe, } from "./voice-handlers.js";
9
11
  import { handleCreateRun, handleRunEvents, handleCancelRun, handleGetRun, handleApplyRun, } from "./run-handlers.js";
10
12
  import { handleListProjects, handleCreateProject, handleUpdateProject, handleDeleteProject, handleListChats, handleCreateChat, handleUpdateChat, handleDeleteChat, handleListMessages, handleCreateMessage, handleCreateRunSummaryPair, handleUpdateMessage, } from "./store-handlers.js";
11
- import { handleCreateDesktopChat, handleSendDesktopChat } from "./chat-handlers.js";
13
+ import { handleAppendDesktopVoiceTurn, handleCreateDesktopChat, handleSendDesktopChat, } from "./chat-handlers.js";
12
14
  import { handleSendDesktopChatStream } from "./chat-stream-handlers.js";
15
+ import { handleCloneRepository } from "./gitRepositoryRoutes.js";
13
16
  import { handleListMemories, handleMemoryReviewQueue, handleGetMemory, handleEditMemory, handlePinMemory, handleUnpinMemory, handleArchiveMemory, handleForgetMemory, handleForgetMemories, handleDeleteMemory, handleCorrectMemory, handleResolveMemoryConflict, handleAcceptMemoryProposal, handleRejectMemoryProposal, } from "./memory-handlers.js";
14
17
  import { handleMemoryRetrieveContext, handleMemoryCaptureFromConversation, } from "./memory-conv-handlers.js";
15
18
  import { handleCancelConsolidationJob, handleCreateConsolidationJob, handleGetConsolidationJob, } from "./memory-consolidation-handlers.js";
16
19
  import { handleRunMaintenance } from "./memory-maintenance-handlers.js";
17
20
  import { handleGroundedAsk } from "./grounded-qa.js";
21
+ import { handleRealtimeGroundedVoiceTool } from "./voice-realtime-grounded-tool.js";
18
22
  import { handleGatewayReadiness } from "./gateway-readiness.js";
19
23
  import { handleGatewaySetup } from "./gateway-setup.js";
20
24
  import { handleCreateTerminalExecution, handleDeleteTerminalExecution, handleTerminalDirectories, handleTerminalEvents, handleTerminalPolicy, } from "./terminal-routes.js";
21
- import { handleFilesContent, handleFilesDirectories, handleFilesPreview, handleFilesSearch, handleFilesTree, } from "./files.js";
22
- import { handleEditorLanguage, handleEditorLanguageCapabilities } from "./editor/languageRoutes.js";
25
+ import { handleRuntimeCapabilities } from "./runtime/capabilityRoutes.js";
26
+ import { handleCommandCatalog, handleCommandEvents, handleCreateCommandRun, handleDeleteCommandRun, } from "./command-runner-routes.js";
27
+ import { handleActivateTaskWorkspace, handleCleanupOrphanTaskWorkspaces, handleCleanupTaskWorkspace, handleClearActiveTaskWorkspace, handleGetActiveTaskWorkspace, handleGetTaskWorkspace, handleGetTaskWorkspaceHealth, handleGetTaskWorkspaceReconciliation, handleHandoffTaskWorkspace, handleListTaskWorkspaces, handlePauseTaskWorkspace, handleProvisionTaskWorkspace, handleReconcileTaskWorkspaces, handleRepairTaskWorkspace, handleResumeTaskWorkspace, handleSetActiveTaskWorkspace, } from "./task-workspace/routes.js";
28
+ import { handleContainerCapability, handleContainerCatalog, handleContainerEvents, handleCreateContainerRun, handleDeleteContainerRun, } from "./runtime/containerRoutes.js";
29
+ import { handleFilesContent, handleFilesCopy, handleFilesCreate, handleFilesDelete, handleFilesDirectories, handleFilesPreview, handleFilesRename, handleFilesSearch, handleFilesTree, } from "./files.js";
30
+ import { handleGitBranches, handleGitDiff, handleGitStatus } from "./gitRoutes.js";
31
+ import { handleGitHistory, handleGitRemotes, handleGitSummary } from "./gitRepositoryReads.js";
32
+ import { handleEditorLanguage, handleEditorLanguageCapabilitiesForRoute, } from "./editor/languageRoutes.js";
33
+ import { handleEditorLspStatus } from "./editor/lsp/lspStatusRoute.js";
23
34
  import { handleEditorContext, handleEditorLocalKnowledgeRetrieve, handleEditorRepoSearch, } from "./editor/contextRoutes.js";
24
35
  import { handleEditorCompletion } from "./editor/completionRoutes.js";
25
36
  import { handleEditorInlineCompletion, handleEditorInlineCompletionTelemetry, } from "./editor/inlineCompletionRoutes.js";
26
37
  import { handleEditorTestGeneration } from "./editor/testGenerationRoutes.js";
27
38
  import { handleEditorPatchApply } from "./editor/patchApplyRoutes.js";
28
- import { handleEditorAgentActions, handleEditorAgentEvents, handleEditorAgentSessions, handleEditorAgentSnapshot, } from "./editor/agentRoutes.js";
39
+ import { handleEditorAgentActions, handleEditorAgentAudit, handleEditorAgentEvents, handleEditorAgentSessions, handleEditorAgentSnapshot, } from "./editor/agentRoutes.js";
29
40
  import { handleBrowserApplyScreenshot, handleBrowserContent, handleBrowserEvents, handleBrowserNavigate, handleBrowserScreenshot, handleBrowserStatus, handleCreateBrowserSession, handleDeleteBrowserSession, } from "./browser.js";
30
41
  import { handleCancelLocalKnowledgeCapsuleIndexing, handleConnectLocalKnowledgeCapsule, handleCreateLocalKnowledgeCapsule, handleCreateLocalKnowledgeCapsuleSet, handleDeleteLocalKnowledgeCapsule, handleDisconnectLocalKnowledgeCapsule, handleGetLocalKnowledgeCapsule, handleListLocalKnowledgeCapsules, handleListLocalKnowledgeCapsuleSets, handleReindexLocalKnowledgeCapsule, handleStartLocalKnowledgeCapsuleIndexing, handleUpdateLocalKnowledgeCapsule, } from "./local-knowledge-handlers.js";
31
42
  import { handleRelationshipCreate, handleRelationshipDelete, handleRelationshipDependencies, handleRelationshipEvents, handleRelationshipExplain, handleRelationshipGet, handleRelationshipHealth, handleRelationshipImpact, handleRelationshipList, handleRelationshipPatch, handleRelationshipValidate, } from "./relationship-handlers.js";
@@ -33,6 +44,15 @@ import { handleQiCapabilities, handleQiDryRunFigma, handleQiDryRunJira, handleQi
33
44
  import { handleFigmaListSnapshots, handleFigmaInspectSnapshotScreenJson, handleFigmaDeleteSnapshot, handleFigmaTriggerSnapshot, handleFigmaLoadSnapshot, handleFigmaLoadSnapshotImage, handleFigmaRevokeToken, handleFigmaUpdateSnapshotMetadata, } from "./qualityIntelligence/figmaSnapshotRoutes.js";
34
45
  import { handleFigmaGenerateCode } from "./qualityIntelligence/figmaCodegenRoutes.js";
35
46
  import { handlePromptEnhancement, handlePromptEnhancementEvidence, } from "./promptEnhancer/index.js";
47
+ import { GIT_DELIVERY_ACTION_SHEET_ROUTE_GROUP } from "./gitDelivery/actionSheetRoutes.js";
48
+ import { GIT_DELIVERY_EVIDENCE_ROUTE_GROUP } from "./gitDelivery/evidenceRoutes.js";
49
+ import { GIT_DELIVERY_LOCAL_MUTATION_ROUTE_GROUP } from "./gitDelivery/localMutationRoutes.js";
50
+ import { GIT_DELIVERY_COMMIT_ROUTE_GROUP } from "./gitDelivery/commitRoutes.js";
51
+ import { GIT_DELIVERY_PUSH_ROUTE_GROUP } from "./gitDelivery/pushRoutes.js";
52
+ import { GIT_DELIVERY_PR_ROUTE_GROUP } from "./gitDelivery/prRoutes.js";
53
+ import { GIT_DELIVERY_MERGE_ROUTE_GROUP } from "./gitDelivery/mergeRoutes.js";
54
+ import { GIT_DELIVERY_SYNC_ROUTE_GROUP } from "./gitDelivery/syncRoutes.js";
55
+ import { GIT_AGENT_OPERATION_ROUTE_GROUP } from "./gitDelivery/agentOperationsRoutes.js";
36
56
  export const STREAMING = Symbol("streaming");
37
57
  function health() {
38
58
  return { status: 200, body: { status: "ok", version: SDK_VERSION } };
@@ -45,6 +65,16 @@ export const API_ROUTES = [
45
65
  { method: "GET", pattern: "/api/health", handler: health },
46
66
  { method: "GET", pattern: "/api/config", handler: handleConfig },
47
67
  { method: "GET", pattern: "/api/models", handler: handleModels },
68
+ { method: "GET", pattern: "/api/voice/capability", handler: handleVoiceCapability },
69
+ // Issue #494 (Epic #491) — optional, capability-gated STT composer dictation (ADR-0058 D1/D2/D4).
70
+ // POST a short audio clip (base64 inside the JSON + CSRF envelope) and receive its transcript;
71
+ // answers VOICE_UNAVAILABLE when no speech-to-text capability is configured/enabled.
72
+ { method: "POST", pattern: "/api/voice/transcribe", handler: handleVoiceTranscribe },
73
+ // Issue #1558 (Epic #1556) — optional, capability-gated assistant speech output (ADR-0095). POST
74
+ // the visible assistant answer text (inside the JSON + CSRF envelope) and receive synthesized audio
75
+ // as base64; answers VOICE_UNAVAILABLE when no speech-output capability is configured/enabled.
76
+ { method: "POST", pattern: "/api/voice/speak", handler: handleVoiceSpeak },
77
+ { method: "POST", pattern: "/api/voice/speak/stream", handler: handleVoiceSpeakStream },
48
78
  { method: "POST", pattern: "/api/gateway/readiness", handler: handleGatewayReadiness },
49
79
  { method: "POST", pattern: "/api/gateway/setup", handler: handleGatewaySetup },
50
80
  { method: "GET", pattern: "/api/workflows", handler: handleWorkflows },
@@ -56,11 +86,14 @@ export const API_ROUTES = [
56
86
  { method: "GET", pattern: "/api/evidence", handler: handleEvidenceList },
57
87
  { method: "GET", pattern: "/api/evidence/:runId", handler: handleEvidenceDetail },
58
88
  { method: "GET", pattern: "/api/workspace", handler: handleWorkspace },
89
+ { method: "GET", pattern: "/api/workspace/state", handler: handleGetWorkspaceState },
90
+ { method: "PUT", pattern: "/api/workspace/state", handler: handlePutWorkspaceState },
59
91
  // ADR-0013 D7 — UI-local persistence routes (additive).
60
92
  { method: "GET", pattern: "/api/projects", handler: handleListProjects },
61
93
  { method: "POST", pattern: "/api/projects", handler: handleCreateProject },
62
94
  { method: "PATCH", pattern: "/api/projects", handler: handleUpdateProject },
63
95
  { method: "DELETE", pattern: "/api/projects", handler: handleDeleteProject },
96
+ { method: "POST", pattern: "/api/repositories/clone", handler: handleCloneRepository },
64
97
  { method: "GET", pattern: "/api/chats", handler: handleListChats },
65
98
  { method: "POST", pattern: "/api/chats", handler: handleCreateChat },
66
99
  { method: "PATCH", pattern: "/api/chats", handler: handleUpdateChat },
@@ -77,10 +110,20 @@ export const API_ROUTES = [
77
110
  { method: "PATCH", pattern: "/api/chats/messages", handler: handleUpdateMessage },
78
111
  // Issue #185 — grounded repository-aware Q&A. Composes #179-#183 behind the chat-scope binding.
79
112
  { method: "POST", pattern: "/api/chats/messages/grounded", handler: handleGroundedAsk },
113
+ {
114
+ method: "POST",
115
+ pattern: "/api/voice/realtime/grounded-tool",
116
+ handler: handleRealtimeGroundedVoiceTool,
117
+ },
80
118
  // Desktop canvas V1 — real chat against the configured gateway model without new agent scope.
81
119
  { method: "POST", pattern: "/api/desktop/chats", handler: handleCreateDesktopChat },
82
120
  { method: "POST", pattern: "/api/desktop/chat", handler: handleSendDesktopChat },
83
121
  { method: "POST", pattern: "/api/desktop/chat/stream", handler: handleSendDesktopChatStream },
122
+ {
123
+ method: "POST",
124
+ pattern: "/api/desktop/chat/voice-turn",
125
+ handler: handleAppendDesktopVoiceTurn,
126
+ },
84
127
  // ADR-0018 — bounded permitted-command execution. PTY routes (shells/sessions/WS upgrade) and
85
128
  // the WebSocket upgrade handler in server.ts are removed; commands run via synchronous POST.
86
129
  { method: "GET", pattern: "/api/terminal/policy", handler: handleTerminalPolicy },
@@ -92,6 +135,168 @@ export const API_ROUTES = [
92
135
  handler: handleDeleteTerminalExecution,
93
136
  },
94
137
  { method: "GET", pattern: "/api/terminal/events", handler: handleTerminalEvents },
138
+ // Issue #1385 — read-only local runtime inventory. Metadata-only detection: no package manager,
139
+ // Git, language, or container command is executed; root-scoped command sources use contained
140
+ // manifest reads on a registered project.
141
+ {
142
+ method: "GET",
143
+ pattern: "/api/runtime/capabilities",
144
+ handler: (ctx, deps) => handleRuntimeCapabilities(ctx, deps, deps.runtimeCapabilityRouteOptions),
145
+ },
146
+ // Issue #1386 — read-only Git repository status/diff BFF. Git execution stays server-side with
147
+ // fixed args/env, selected-root containment, unsafe-owner surfacing, and bounded diff output.
148
+ {
149
+ method: "GET",
150
+ pattern: "/api/git/status",
151
+ handler: (ctx, deps) => handleGitStatus(ctx, deps, deps.gitRouteOptions),
152
+ },
153
+ {
154
+ method: "GET",
155
+ pattern: "/api/git/diff",
156
+ handler: (ctx, deps) => handleGitDiff(ctx, deps, deps.gitRouteOptions),
157
+ },
158
+ {
159
+ method: "GET",
160
+ pattern: "/api/git/branches",
161
+ handler: (ctx, deps) => handleGitBranches(ctx, deps, deps.gitRouteOptions),
162
+ },
163
+ // Issue #1573 — read-only Git repository summary, history, and remotes BFF. Reuses the hardened
164
+ // runner + selected-root containment from the #1386 reads; responses are content-free (counts,
165
+ // typed codes, branch/remote names, ISO dates) and pass through the live-payload redactor.
166
+ {
167
+ method: "GET",
168
+ pattern: "/api/git/summary",
169
+ handler: (ctx, deps) => handleGitSummary(ctx, deps, deps.gitRouteOptions),
170
+ },
171
+ {
172
+ method: "GET",
173
+ pattern: "/api/git/history",
174
+ handler: (ctx, deps) => handleGitHistory(ctx, deps, deps.gitRouteOptions),
175
+ },
176
+ {
177
+ method: "GET",
178
+ pattern: "/api/git/remotes",
179
+ handler: (ctx, deps) => handleGitRemotes(ctx, deps, deps.gitRouteOptions),
180
+ },
181
+ // Issue #1387 — controlled test/build/run command executor. Tasks are discovered from package
182
+ // scripts and run through the single governed spawn boundary (keiko-tools runCommand): allowlisted
183
+ // task ids only (never free-form argv), workspace-contained cwd, output cap, timeout, cancellation,
184
+ // and content-free evidence. Literal `catalog`/`events` paths register before the `:runId` route.
185
+ {
186
+ method: "GET",
187
+ pattern: "/api/commands/catalog",
188
+ handler: handleCommandCatalog,
189
+ },
190
+ {
191
+ method: "GET",
192
+ pattern: "/api/commands/events",
193
+ handler: handleCommandEvents,
194
+ },
195
+ { method: "POST", pattern: "/api/commands/runs", handler: handleCreateCommandRun },
196
+ {
197
+ method: "DELETE",
198
+ pattern: "/api/commands/runs/:runId",
199
+ handler: handleDeleteCommandRun,
200
+ },
201
+ // Issue #445 (Epic #443, ADR-0089) — governed managed task-workspace provisioning + activation.
202
+ // Provision creates a dedicated task branch + managed Git worktree from an approved base branch
203
+ // through the narrow worktree adapter (single governed spawn boundary; no generic git runner) and
204
+ // persists a WorkspaceInstance; activate yields the WorkspaceBinding surfaces bind to. CSRF is
205
+ // enforced by the server's state-changing gate for the POST routes.
206
+ { method: "POST", pattern: "/api/task-workspaces", handler: handleProvisionTaskWorkspace },
207
+ // Issue #446 (Epic #443, ADR-0090) — the shared ACTIVE task-workspace binding the Studio/editor/
208
+ // runtime/Git-Delivery surfaces consume. `matchRoute` resolves by literal specificity, so the
209
+ // literal `active` and the `?root` collection paths win over the `:workspaceId` param route
210
+ // regardless of registration order. CSRF is enforced by the state-changing gate for POST/DELETE.
211
+ { method: "GET", pattern: "/api/task-workspaces", handler: handleListTaskWorkspaces },
212
+ { method: "GET", pattern: "/api/task-workspaces/active", handler: handleGetActiveTaskWorkspace },
213
+ { method: "POST", pattern: "/api/task-workspaces/active", handler: handleSetActiveTaskWorkspace },
214
+ {
215
+ method: "DELETE",
216
+ pattern: "/api/task-workspaces/active",
217
+ handler: handleClearActiveTaskWorkspace,
218
+ },
219
+ {
220
+ method: "POST",
221
+ pattern: "/api/task-workspaces/:workspaceId/pause",
222
+ handler: handlePauseTaskWorkspace,
223
+ },
224
+ {
225
+ method: "POST",
226
+ pattern: "/api/task-workspaces/:workspaceId/resume",
227
+ handler: handleResumeTaskWorkspace,
228
+ },
229
+ {
230
+ method: "POST",
231
+ pattern: "/api/task-workspaces/:workspaceId/handoff",
232
+ handler: handleHandoffTaskWorkspace,
233
+ },
234
+ {
235
+ method: "POST",
236
+ pattern: "/api/task-workspaces/:workspaceId/activate",
237
+ handler: handleActivateTaskWorkspace,
238
+ },
239
+ // Issue #447 (Epic #443, ADR-0091) — startup reconciliation report (read-only, derived from the
240
+ // persisted content-free fields), an explicit live reconcile pass (CSRF-gated POST), and the
241
+ // controlled, operator-approval-gated repair. The literal `reconciliation` path wins over the
242
+ // `:workspaceId` GET by `matchRoute` specificity.
243
+ {
244
+ method: "GET",
245
+ pattern: "/api/task-workspaces/reconciliation",
246
+ handler: handleGetTaskWorkspaceReconciliation,
247
+ },
248
+ {
249
+ method: "POST",
250
+ pattern: "/api/task-workspaces/reconciliation",
251
+ handler: handleReconcileTaskWorkspaces,
252
+ },
253
+ {
254
+ method: "POST",
255
+ pattern: "/api/task-workspaces/:workspaceId/repair",
256
+ handler: handleRepairTaskWorkspace,
257
+ },
258
+ // Issue #448 (Epic #443, ADR-0092) — operational health/drift/orphan report (read-only) plus the
259
+ // governed, operator-approval-gated cleanup controls. The literal `health` and `cleanup/orphans`
260
+ // paths win over the `:workspaceId` routes by `matchRoute` specificity.
261
+ { method: "GET", pattern: "/api/task-workspaces/health", handler: handleGetTaskWorkspaceHealth },
262
+ {
263
+ method: "POST",
264
+ pattern: "/api/task-workspaces/cleanup/orphans",
265
+ handler: handleCleanupOrphanTaskWorkspaces,
266
+ },
267
+ {
268
+ method: "POST",
269
+ pattern: "/api/task-workspaces/:workspaceId/cleanup",
270
+ handler: handleCleanupTaskWorkspace,
271
+ },
272
+ { method: "GET", pattern: "/api/task-workspaces/:workspaceId", handler: handleGetTaskWorkspace },
273
+ // Issue #1388 (ADR-0070) — governed container engine detection + execution pilot. The capability
274
+ // route runs an opt-in ACTIVE daemon probe (distinct from the metadata-only #1385 detector); the
275
+ // catalog/run routes degrade to 503 CONTAINER_ENGINE_UNAVAILABLE when no engine is present. A run
276
+ // names a closed-catalog task id only (never a free-form image/argv/flag), executes a server-frozen
277
+ // hardened `docker run` argv through the single runCommand boundary, and writes content-free
278
+ // evidence. Literal `capability`/`catalog`/`events` paths register before the `:runId` route.
279
+ {
280
+ method: "GET",
281
+ pattern: "/api/containers/capability",
282
+ handler: handleContainerCapability,
283
+ },
284
+ {
285
+ method: "GET",
286
+ pattern: "/api/containers/catalog",
287
+ handler: handleContainerCatalog,
288
+ },
289
+ {
290
+ method: "GET",
291
+ pattern: "/api/containers/events",
292
+ handler: handleContainerEvents,
293
+ },
294
+ { method: "POST", pattern: "/api/containers/runs", handler: handleCreateContainerRun },
295
+ {
296
+ method: "DELETE",
297
+ pattern: "/api/containers/runs/:runId",
298
+ handler: handleDeleteContainerRun,
299
+ },
95
300
  // Desktop files — selected-root browser, preview, and editor control plane.
96
301
  { method: "GET", pattern: "/api/files/directories", handler: handleFilesDirectories },
97
302
  { method: "GET", pattern: "/api/files/tree", handler: handleFilesTree },
@@ -99,12 +304,19 @@ export const API_ROUTES = [
99
304
  { method: "GET", pattern: "/api/files/preview", handler: handleFilesPreview },
100
305
  { method: "GET", pattern: "/api/files/content", handler: handleFilesContent },
101
306
  { method: "PATCH", pattern: "/api/files/content", handler: handleFilesContent },
307
+ // File-tree mutations (create / rename / delete). State-changing methods inherit the server CSRF +
308
+ // JSON gate; each handler re-resolves containment + deny inside the selected root and is
309
+ // non-destructive by default (atomic no-overwrite create, no-clobber rename, symlinks rejected).
310
+ { method: "POST", pattern: "/api/files/create", handler: handleFilesCreate },
311
+ { method: "POST", pattern: "/api/files/rename", handler: handleFilesRename },
312
+ { method: "POST", pattern: "/api/files/delete", handler: handleFilesDelete },
313
+ { method: "POST", pattern: "/api/files/copy", handler: handleFilesCopy },
102
314
  // Issue #1198 — deterministic, model-free language intelligence (completion, diagnostics, hover,
103
315
  // symbols) over an editor overlay (ADR-0042 D4). Capabilities advertises the registered providers.
104
316
  {
105
317
  method: "GET",
106
318
  pattern: "/api/editor/language/capabilities",
107
- handler: handleEditorLanguageCapabilities,
319
+ handler: (ctx, deps) => handleEditorLanguageCapabilitiesForRoute(ctx, deps, deps.editorLanguageRouteOptions),
108
320
  },
109
321
  {
110
322
  method: "POST",
@@ -176,6 +388,19 @@ export const API_ROUTES = [
176
388
  pattern: "/api/editor/agent/events",
177
389
  handler: handleEditorAgentEvents,
178
390
  },
391
+ // Issue #1395 (ADR-0062) — read-only bounded audit feed of recent agent editor actions.
392
+ {
393
+ method: "GET",
394
+ pattern: "/api/editor/agent/audit",
395
+ handler: handleEditorAgentAudit,
396
+ },
397
+ // Issue #1381 (ADR-0069) — read-only, content-free LSP process lifecycle status feed. Env-gated
398
+ // default-OFF via KEIKO_EDITOR_LSP_STATUS (404 until an operator opts in). No CSP change needed.
399
+ {
400
+ method: "GET",
401
+ pattern: "/api/editor/lsp/status",
402
+ handler: (ctx, deps) => handleEditorLspStatus(ctx, { env: deps.env }),
403
+ },
179
404
  {
180
405
  method: "POST",
181
406
  pattern: "/api/editor/local-knowledge/retrieve",
@@ -432,6 +657,34 @@ export const API_ROUTES = [
432
657
  // envelope (refs only, no chat content). Registered as a sibling group so concurrent
433
658
  // QI epic merges (e.g. #280) stay mechanically merge-safe.
434
659
  ...QI_HANDOFF_ROUTE_GROUP,
660
+ // Issue #473 (Epic #470) — governed Git delivery action-sheet route group. Single READ-ONLY
661
+ // POST seam returning a UI-safe GitDeliveryActionSheet projection; never mutates the repo.
662
+ // Registered as a sibling group so concurrent #470 epic merges stay mechanically merge-safe.
663
+ ...GIT_DELIVERY_ACTION_SHEET_ROUTE_GROUP,
664
+ ...GIT_DELIVERY_EVIDENCE_ROUTE_GROUP,
665
+ // #475 governed local write flows: branch create/switch, staging, and commit preview/execute. These
666
+ // EXECUTE through the #472 kernel + #474 evidence ledger; gated by the same capability flag and CSRF.
667
+ ...GIT_DELIVERY_LOCAL_MUTATION_ROUTE_GROUP,
668
+ ...GIT_DELIVERY_COMMIT_ROUTE_GROUP,
669
+ // #476 governed remote publish: push preview (read-only) + execute through the SEPARATE publish
670
+ // gateway (dedicated push-only allowlist) + #474 evidence ledger; same capability flag and CSRF.
671
+ ...GIT_DELIVERY_PUSH_ROUTE_GROUP,
672
+ // #477 governed GitHub pull request command center: PR preview (read-only metadata/readiness/
673
+ // recommendation) + execute through the SEPARATE PR gateway (dedicated `gh api` allowlist) + #474
674
+ // evidence ledger; same capability flag and CSRF.
675
+ ...GIT_DELIVERY_PR_ROUTE_GROUP,
676
+ // #478 governed merge: merge preview (read-only readiness/eligible-strategies/recommendation) +
677
+ // execute through the SEPARATE merge gateway (dedicated `gh api` merge allowlist, readiness gate, final
678
+ // approval) + #474 evidence ledger; same capability flag and CSRF.
679
+ ...GIT_DELIVERY_MERGE_ROUTE_GROUP,
680
+ // #1573 governed fetch/pull sync: sync preview (read-only readiness + executable gate) + execute
681
+ // through a preflight-gated credential-capable runner (NOT the #472 kernel — fetch/pull have no
682
+ // GitDeliveryActionKind) + a dedicated content-free sync evidence ledger; same central CSRF + JSON
683
+ // content-type gate.
684
+ ...GIT_DELIVERY_SYNC_ROUTE_GROUP,
685
+ // #1577 agent repository operations: typed facade over existing Git read and governed delivery
686
+ // handlers. No shell/provider authority is introduced; command-shaped payloads are denied first.
687
+ ...GIT_AGENT_OPERATION_ROUTE_GROUP,
435
688
  ];
436
689
  // Matches a concrete path against a route pattern, capturing `:name` params. Returns the captured
437
690
  // params, or undefined when the segment counts differ or a literal segment mismatches.
@@ -1 +1 @@
1
- {"version":3,"file":"run-engine.d.ts","sourceRoot":"","sources":["../src/run-engine.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAqB7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAa,MAAM,WAAW,CAAC;AAC3E,OAAO,EAIL,KAAK,sBAAsB,EAE5B,MAAM,eAAe,CAAC;AAIvB,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AASD,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAG/B,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