@boboddy/sdk 0.0.7-alpha → 0.0.8-alpha

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 (215) hide show
  1. package/dist/apps/api/src/app.d.ts +1371 -575
  2. package/dist/apps/api/src/http/routes/step-definition-templates.d.ts +477 -0
  3. package/dist/apps/api/src/http/routes/step-executions.d.ts +1 -0
  4. package/dist/packages/core/src/access/authorization/application/authorization-service.d.ts +12 -0
  5. package/dist/packages/core/src/access/authorization/infra/project-authorization-service.d.ts +7 -0
  6. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/ai-container-launcher.d.ts +21 -0
  7. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/create-project-runtime-session.d.ts +13 -0
  8. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/devcontainer-launcher.d.ts +21 -0
  9. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/get-project-runtime-session.d.ts +11 -0
  10. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/git-clone-service.d.ts +11 -0
  11. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/list-project-runtime-sessions.d.ts +11 -0
  12. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-contract-mapper.d.ts +3 -0
  13. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-execution-target.d.ts +3 -0
  14. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-network-metadata.d.ts +15 -0
  15. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-repo.d.ts +10 -0
  16. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/runtime-session-network-manager.d.ts +14 -0
  17. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/stop-project-runtime-session.d.ts +29 -0
  18. package/dist/packages/core/src/agent-sessions/project-runtime-session/application/workspace-manager.d.ts +10 -0
  19. package/dist/packages/core/src/agent-sessions/project-runtime-session/contracts/project-runtime-session-contracts.d.ts +62 -0
  20. package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-entity-helpers.d.ts +12 -0
  21. package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-entity.d.ts +99 -0
  22. package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-execution-target.d.ts +16 -0
  23. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/devcontainer-cli-launcher.d.ts +6 -0
  24. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/docker-ai-container-launcher.d.ts +8 -0
  25. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/drizzle-project-runtime-session-repo.d.ts +11 -0
  26. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/git-cli-clone-service.d.ts +4 -0
  27. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-jsonc.d.ts +4 -0
  28. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-port-forward-manager-support.d.ts +42 -0
  29. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-port-forward-manager.d.ts +24 -0
  30. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-working-directory.d.ts +5 -0
  31. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-docker-runtime-session-network-manager.d.ts +17 -0
  32. package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-workspace-manager.d.ts +11 -0
  33. package/dist/packages/core/src/agent-sessions/runtime-command/application/complete-claimed-runtime-command.d.ts +11 -0
  34. package/dist/packages/core/src/agent-sessions/runtime-command/application/create-runtime-command.d.ts +17 -0
  35. package/dist/packages/core/src/agent-sessions/runtime-command/application/fail-claimed-runtime-command.d.ts +11 -0
  36. package/dist/packages/core/src/agent-sessions/runtime-command/application/interrupt-claimed-runtime-command.d.ts +11 -0
  37. package/dist/packages/core/src/agent-sessions/runtime-command/application/run-runtime-command-locally.d.ts +26 -0
  38. package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-claim-helpers.d.ts +1 -0
  39. package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-contract-mapper.d.ts +3 -0
  40. package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-output-summary.d.ts +4 -0
  41. package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-repo.d.ts +20 -0
  42. package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-runner.d.ts +25 -0
  43. package/dist/packages/core/src/agent-sessions/runtime-command/contracts/runtime-command-contracts.d.ts +194 -0
  44. package/dist/packages/core/src/agent-sessions/runtime-command/domain/runtime-command-entity.d.ts +111 -0
  45. package/dist/packages/core/src/agent-sessions/runtime-command/infra/drizzle-runtime-command-repo.d.ts +20 -0
  46. package/dist/packages/core/src/agent-sessions/runtime-command/infra/local-runtime-command-runner.d.ts +25 -0
  47. package/dist/packages/core/src/agent-sessions/runtime-environment/domain/runtime-environment.d.ts +12 -0
  48. package/dist/packages/core/src/agent-sessions/runtime-operation-event/application/runtime-operation-event-publisher.d.ts +24 -0
  49. package/dist/packages/core/src/agent-sessions/runtime-operation-event/application/runtime-operation-event-repo.d.ts +17 -0
  50. package/dist/packages/core/src/agent-sessions/runtime-operation-event/domain/runtime-operation-event.d.ts +35 -0
  51. package/dist/packages/core/src/agent-sessions/runtime-operation-event/infra/file-runtime-operation-event-repo.d.ts +25 -0
  52. package/dist/packages/core/src/agent-sessions/runtime-service/application/create-runtime-service.d.ts +17 -0
  53. package/dist/packages/core/src/agent-sessions/runtime-service/application/get-runtime-service.d.ts +11 -0
  54. package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-contract-mapper.d.ts +3 -0
  55. package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-output-summary.d.ts +10 -0
  56. package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-repo.d.ts +9 -0
  57. package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-runner.d.ts +23 -0
  58. package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-session-service-exposure-provider.d.ts +19 -0
  59. package/dist/packages/core/src/agent-sessions/runtime-service/application/start-runtime-service-locally.d.ts +21 -0
  60. package/dist/packages/core/src/agent-sessions/runtime-service/application/stop-runtime-service.d.ts +32 -0
  61. package/dist/packages/core/src/agent-sessions/runtime-service/contracts/runtime-service-contracts.d.ts +140 -0
  62. package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-access-point.d.ts +12 -0
  63. package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-entity.d.ts +76 -0
  64. package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-healthcheck.d.ts +20 -0
  65. package/dist/packages/core/src/agent-sessions/runtime-service/infra/drizzle-runtime-service-repo.d.ts +9 -0
  66. package/dist/packages/core/src/agent-sessions/runtime-service/infra/local-runtime-service-readiness-probe.d.ts +42 -0
  67. package/dist/packages/core/src/agent-sessions/runtime-service/infra/local-runtime-service-runner.d.ts +32 -0
  68. package/dist/packages/core/src/common/contracts/json.d.ts +9 -0
  69. package/dist/packages/core/src/common/contracts/opencode-mcp.d.ts +73 -0
  70. package/dist/packages/core/src/common/contracts/uuid-v7.d.ts +8 -0
  71. package/dist/packages/core/src/lib/db/db-executor.d.ts +4 -0
  72. package/dist/packages/core/src/lib/db/index.d.ts +7 -0
  73. package/dist/packages/core/src/lib/db/schema.d.ts +4950 -0
  74. package/dist/packages/core/src/lib/di.d.ts +112 -0
  75. package/dist/packages/core/src/lib/domain-events/domain-event.d.ts +12 -0
  76. package/dist/packages/core/src/lib/domain-events/in-memory-domain-event-dispatcher.d.ts +7 -0
  77. package/dist/packages/core/src/lib/errors.d.ts +36 -0
  78. package/dist/packages/core/src/lib/logger.d.ts +7 -0
  79. package/dist/packages/core/src/lib/time-provider.d.ts +5 -0
  80. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/add-linear-pipeline-step-definition.d.ts +9 -0
  81. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/archive-linear-pipeline-definition.d.ts +9 -0
  82. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/create-linear-pipeline-definition.d.ts +9 -0
  83. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/get-linear-pipeline-definition.d.ts +7 -0
  84. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/linear-pipeline-definition-contract-mapper.d.ts +3 -0
  85. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/linear-pipeline-definition-repo.d.ts +9 -0
  86. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/list-linear-pipeline-definitions.d.ts +7 -0
  87. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/remove-linear-pipeline-step-definition.d.ts +9 -0
  88. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/set-linear-pipeline-step-advancement-policy-definition.d.ts +9 -0
  89. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-definition.d.ts +9 -0
  90. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-step-definition.d.ts +9 -0
  91. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/contracts/linear-pipeline-definition-contracts.d.ts +357 -0
  92. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/domain/linear-pipeline-definition-entity.d.ts +36 -0
  93. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/entities/linear-pipeline-step-advancement-policy-definition-entity.d.ts +42 -0
  94. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/entities/linear-pipeline-step-definition-entity.d.ts +42 -0
  95. package/dist/packages/core/src/pipeline-definitions/pipeline-definition/infra/drizzle-linear-pipeline-definition-repo.d.ts +11 -0
  96. package/dist/packages/core/src/pipeline-definitions/step-definition/application/archive-step-definition.d.ts +9 -0
  97. package/dist/packages/core/src/pipeline-definitions/step-definition/application/create-step-definition.d.ts +9 -0
  98. package/dist/packages/core/src/pipeline-definitions/step-definition/application/get-step-definition.d.ts +7 -0
  99. package/dist/packages/core/src/pipeline-definitions/step-definition/application/list-step-definitions.d.ts +7 -0
  100. package/dist/packages/core/src/pipeline-definitions/step-definition/application/step-definition-contract-mapper.d.ts +3 -0
  101. package/dist/packages/core/src/pipeline-definitions/step-definition/application/step-definition-repo.d.ts +9 -0
  102. package/dist/packages/core/src/pipeline-definitions/step-definition/application/update-step-definition.d.ts +9 -0
  103. package/dist/packages/core/src/pipeline-definitions/step-definition/contracts/step-definition-contracts.d.ts +281 -0
  104. package/dist/packages/core/src/pipeline-definitions/step-definition/domain/step-definition-entity.d.ts +53 -0
  105. package/dist/packages/core/src/pipeline-definitions/step-definition/entities/computed-signal-definition-entity.d.ts +31 -0
  106. package/dist/packages/core/src/pipeline-definitions/step-definition/entities/signal-extractor-definition-entity.d.ts +30 -0
  107. package/dist/packages/core/src/pipeline-definitions/step-definition/infra/drizzle-step-definition-repo.d.ts +11 -0
  108. package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/get-step-definition-template.d.ts +6 -0
  109. package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/instantiate-step-definition-template.d.ts +11 -0
  110. package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/list-step-definition-templates.d.ts +5 -0
  111. package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/step-definition-template-repo.d.ts +7 -0
  112. package/dist/packages/core/src/pipeline-definitions/step-definition-template/contracts/step-definition-template-contracts.d.ts +98 -0
  113. package/dist/packages/core/src/pipeline-definitions/step-definition-template/domain/step-definition-template-entity.d.ts +37 -0
  114. package/dist/packages/core/src/pipeline-definitions/step-definition-template/infra/drizzle-step-definition-template-repo.d.ts +9 -0
  115. package/dist/packages/core/src/pipeline-executions/feedback-request/application/create-feedback-requests-on-step-signal-created.d.ts +9 -0
  116. package/dist/packages/core/src/pipeline-executions/feedback-request/application/decline-feedback-request.d.ts +14 -0
  117. package/dist/packages/core/src/pipeline-executions/feedback-request/application/feedback-request-repo.d.ts +8 -0
  118. package/dist/packages/core/src/pipeline-executions/feedback-request/application/list-feedback-requests-by-step-signal.d.ts +15 -0
  119. package/dist/packages/core/src/pipeline-executions/feedback-request/contracts/feedback-request-contracts.d.ts +21 -0
  120. package/dist/packages/core/src/pipeline-executions/feedback-request/domain/feedback-request-entity.d.ts +29 -0
  121. package/dist/packages/core/src/pipeline-executions/feedback-request/infra/drizzle-feedback-request-repo.d.ts +10 -0
  122. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/accept-linear-pipeline-step-run.d.ts +15 -0
  123. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/apply-linear-pipeline-step-result-and-advance.d.ts +17 -0
  124. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/cancel-linear-pipeline-execution.d.ts +11 -0
  125. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-execution.d.ts +11 -0
  126. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-step-run-attempt.d.ts +13 -0
  127. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/get-linear-pipeline-execution.d.ts +11 -0
  128. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-contract-mapper.d.ts +3 -0
  129. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-helpers.d.ts +52 -0
  130. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-repo.d.ts +15 -0
  131. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-step-input-resolution.d.ts +5 -0
  132. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions-by-definition.d.ts +11 -0
  133. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions.d.ts +11 -0
  134. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/mark-linear-pipeline-step-run-attempt-running.d.ts +11 -0
  135. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/project-linear-pipeline-executions.d.ts +10 -0
  136. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/queue-first-linear-pipeline-step-run.d.ts +15 -0
  137. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/retrigger-linear-pipeline-step-run.d.ts +13 -0
  138. package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/start-linear-pipeline-execution.d.ts +15 -0
  139. package/dist/packages/core/src/pipeline-executions/pipeline-execution/contracts/linear-pipeline-execution-contracts.d.ts +330 -0
  140. package/dist/packages/core/src/pipeline-executions/pipeline-execution/domain/linear-pipeline-execution-entity.d.ts +43 -0
  141. package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-execution-event-entity.d.ts +25 -0
  142. package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-evaluation-entity.d.ts +45 -0
  143. package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-run-attempt-entity.d.ts +24 -0
  144. package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-run-entity.d.ts +63 -0
  145. package/dist/packages/core/src/pipeline-executions/pipeline-execution/infra/drizzle-linear-pipeline-execution-repo.d.ts +19 -0
  146. package/dist/packages/core/src/pipeline-executions/step-execution/application/add-step-execution-result.d.ts +9 -0
  147. package/dist/packages/core/src/pipeline-executions/step-execution/application/claim-step-executions.d.ts +17 -0
  148. package/dist/packages/core/src/pipeline-executions/step-execution/application/complete-claimed-step-execution.d.ts +35 -0
  149. package/dist/packages/core/src/pipeline-executions/step-execution/application/create-step-execution.d.ts +9 -0
  150. package/dist/packages/core/src/pipeline-executions/step-execution/application/extract-step-execution-signals.d.ts +13 -0
  151. package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution-worker-context.d.ts +13 -0
  152. package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution.d.ts +9 -0
  153. package/dist/packages/core/src/pipeline-executions/step-execution/application/heartbeat-step-execution-claim.d.ts +17 -0
  154. package/dist/packages/core/src/pipeline-executions/step-execution/application/list-step-executions-by-project.d.ts +9 -0
  155. package/dist/packages/core/src/pipeline-executions/step-execution/application/load-status-adjusted-step-executions.d.ts +31 -0
  156. package/dist/packages/core/src/pipeline-executions/step-execution/application/mark-step-execution-running.d.ts +9 -0
  157. package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-claim-helpers.d.ts +13 -0
  158. package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-contract-mapper.d.ts +7 -0
  159. package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-repo.d.ts +29 -0
  160. package/dist/packages/core/src/pipeline-executions/step-execution/contracts/step-execution-contracts.d.ts +325 -0
  161. package/dist/packages/core/src/pipeline-executions/step-execution/domain/step-execution-entity.d.ts +61 -0
  162. package/dist/packages/core/src/pipeline-executions/step-execution/domain/step-signal-created.domain-event.d.ts +18 -0
  163. package/dist/packages/core/src/pipeline-executions/step-execution/entities/step-execution-result-entity.d.ts +32 -0
  164. package/dist/packages/core/src/pipeline-executions/step-execution/entities/step-signal-entity.d.ts +36 -0
  165. package/dist/packages/core/src/pipeline-executions/step-execution/infra/drizzle-step-execution-repo.d.ts +31 -0
  166. package/dist/packages/core/src/projects/project/application/create-project.d.ts +13 -0
  167. package/dist/packages/core/src/projects/project/application/default-pipelines/default-create-failing-test-step-definition.d.ts +4 -0
  168. package/dist/packages/core/src/projects/project/application/default-pipelines/default-description-quality-step-definition.d.ts +4 -0
  169. package/dist/packages/core/src/projects/project/application/default-pipelines/default-fix-failing-test-step-definition.d.ts +4 -0
  170. package/dist/packages/core/src/projects/project/application/default-pipelines/default-linear-pipeline-conventions.d.ts +9 -0
  171. package/dist/packages/core/src/projects/project/application/default-pipelines/default-linear-pipeline-definitions.d.ts +7 -0
  172. package/dist/packages/core/src/projects/project/application/default-pipelines/default-step-definitions.d.ts +8 -0
  173. package/dist/packages/core/src/projects/project/application/default-pipelines/default-web-repro-playwright-step-definition.d.ts +4 -0
  174. package/dist/packages/core/src/projects/project/application/get-project.d.ts +9 -0
  175. package/dist/packages/core/src/projects/project/application/list-projects.d.ts +9 -0
  176. package/dist/packages/core/src/projects/project/application/project-authorization.d.ts +4 -0
  177. package/dist/packages/core/src/projects/project/application/project-contract-mapper.d.ts +3 -0
  178. package/dist/packages/core/src/projects/project/application/project-repo.d.ts +9 -0
  179. package/dist/packages/core/src/projects/project/application/seed-default-pipelines-on-project-created.d.ts +12 -0
  180. package/dist/packages/core/src/projects/project/application/update-project-membership.d.ts +11 -0
  181. package/dist/packages/core/src/projects/project/contracts/project-contracts.d.ts +37 -0
  182. package/dist/packages/core/src/projects/project/domain/project-created.domain-event.d.ts +13 -0
  183. package/dist/packages/core/src/projects/project/domain/project-entity.d.ts +31 -0
  184. package/dist/packages/core/src/projects/project/domain/project-git-url.d.ts +7 -0
  185. package/dist/packages/core/src/projects/project/domain/project-membership.d.ts +21 -0
  186. package/dist/packages/core/src/projects/project/domain/project-permission.d.ts +7 -0
  187. package/dist/packages/core/src/projects/project/infra/drizzle-project-repo.d.ts +11 -0
  188. package/dist/packages/core/src/projects/project-context/application/create-project-context-entry.d.ts +13 -0
  189. package/dist/packages/core/src/projects/project-context/application/delete-project-context-entry.d.ts +10 -0
  190. package/dist/packages/core/src/projects/project-context/application/list-project-context-entries.d.ts +13 -0
  191. package/dist/packages/core/src/projects/project-context/application/project-context-entry-repo.d.ts +8 -0
  192. package/dist/packages/core/src/projects/project-context/contracts/project-context-entry-contracts.d.ts +46 -0
  193. package/dist/packages/core/src/projects/project-context/domain/project-context-entry-entity.d.ts +27 -0
  194. package/dist/packages/core/src/projects/project-context/infra/drizzle-project-context-entry-repo.d.ts +10 -0
  195. package/dist/packages/core/src/projects/project-opencode-config/application/project-opencode-runtime-metadata.d.ts +17 -0
  196. package/dist/packages/core/src/work-items/work-item/application/create-work-item.d.ts +16 -0
  197. package/dist/packages/core/src/work-items/work-item/application/delete-work-items.d.ts +14 -0
  198. package/dist/packages/core/src/work-items/work-item/application/get-work-items.d.ts +14 -0
  199. package/dist/packages/core/src/work-items/work-item/application/list-work-items-by-project.d.ts +11 -0
  200. package/dist/packages/core/src/work-items/work-item/application/upsert-work-item.d.ts +16 -0
  201. package/dist/packages/core/src/work-items/work-item/application/work-item-contract-mapper.d.ts +4 -0
  202. package/dist/packages/core/src/work-items/work-item/application/work-item-repo.d.ts +27 -0
  203. package/dist/packages/core/src/work-items/work-item/contracts/work-item-contracts.d.ts +119 -0
  204. package/dist/packages/core/src/work-items/work-item/domain/date-utils.d.ts +1 -0
  205. package/dist/packages/core/src/work-items/work-item/domain/work-item-entity.d.ts +58 -0
  206. package/dist/packages/core/src/work-items/work-item/domain/work-item-field-value.d.ts +3 -0
  207. package/dist/packages/core/src/work-items/work-item/domain/work-item-id.d.ts +6 -0
  208. package/dist/packages/core/src/work-items/work-item/domain/work-item-platform.d.ts +2 -0
  209. package/dist/packages/core/src/work-items/work-item/domain/work-item-projection-fingerprint-entity.d.ts +18 -0
  210. package/dist/packages/core/src/work-items/work-item/infra/drizzle-work-item-repo.d.ts +25 -0
  211. package/dist/packages/sdks/js/src/define-step.d.ts +72 -0
  212. package/dist/packages/sdks/js/src/step-definitions-client.d.ts +202 -0
  213. package/dist/packages/sdks/js/src/step-execution-plane-client.d.ts +1 -0
  214. package/dist/packages/sdks/js/test/define-step.test.d.ts +1 -0
  215. package/package.json +17 -2
@@ -0,0 +1,194 @@
1
+ import { z } from "zod";
2
+ export declare const runtimeCommandEnvironmentRoleSchema: z.ZodEnum<{
3
+ project: "project";
4
+ agent: "agent";
5
+ }>;
6
+ export declare const runtimeCommandStatusSchema: z.ZodEnum<{
7
+ queued: "queued";
8
+ running: "running";
9
+ succeeded: "succeeded";
10
+ failed: "failed";
11
+ cancelled: "cancelled";
12
+ claimed: "claimed";
13
+ interrupted: "interrupted";
14
+ }>;
15
+ export declare const runtimeCommandExecutionResultSchema: z.ZodObject<{
16
+ exitCode: z.ZodNullable<z.ZodNumber>;
17
+ signal: z.ZodNullable<z.ZodString>;
18
+ output: z.ZodObject<{
19
+ stdoutPreview: z.ZodString;
20
+ stderrPreview: z.ZodString;
21
+ stdoutBytes: z.ZodNumber;
22
+ stderrBytes: z.ZodNumber;
23
+ logRef: z.ZodNullable<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ }, z.core.$strip>;
26
+ export declare const runtimeCommandSchema: z.ZodObject<{
27
+ id: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
28
+ projectId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
29
+ projectRuntimeSessionId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
30
+ environmentRole: z.ZodEnum<{
31
+ project: "project";
32
+ agent: "agent";
33
+ }>;
34
+ command: z.ZodString;
35
+ status: z.ZodEnum<{
36
+ queued: "queued";
37
+ running: "running";
38
+ succeeded: "succeeded";
39
+ failed: "failed";
40
+ cancelled: "cancelled";
41
+ claimed: "claimed";
42
+ interrupted: "interrupted";
43
+ }>;
44
+ claimedBy: z.ZodNullable<z.ZodString>;
45
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
46
+ lastHeartbeatAt: z.ZodNullable<z.ZodISODateTime>;
47
+ leaseExpiresAt: z.ZodNullable<z.ZodISODateTime>;
48
+ startedAt: z.ZodNullable<z.ZodISODateTime>;
49
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
50
+ result: z.ZodNullable<z.ZodObject<{
51
+ exitCode: z.ZodNullable<z.ZodNumber>;
52
+ signal: z.ZodNullable<z.ZodString>;
53
+ output: z.ZodObject<{
54
+ stdoutPreview: z.ZodString;
55
+ stderrPreview: z.ZodString;
56
+ stdoutBytes: z.ZodNumber;
57
+ stderrBytes: z.ZodNumber;
58
+ logRef: z.ZodNullable<z.ZodString>;
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>>;
61
+ failureReason: z.ZodNullable<z.ZodString>;
62
+ metadata: z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>;
63
+ createdAt: z.ZodISODateTime;
64
+ updatedAt: z.ZodISODateTime;
65
+ }, z.core.$strip>;
66
+ export declare const runtimeCommandClaimSchema: z.ZodObject<{
67
+ runtimeCommand: z.ZodObject<{
68
+ id: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
69
+ projectId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
70
+ projectRuntimeSessionId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
71
+ environmentRole: z.ZodEnum<{
72
+ project: "project";
73
+ agent: "agent";
74
+ }>;
75
+ command: z.ZodString;
76
+ status: z.ZodEnum<{
77
+ queued: "queued";
78
+ running: "running";
79
+ succeeded: "succeeded";
80
+ failed: "failed";
81
+ cancelled: "cancelled";
82
+ claimed: "claimed";
83
+ interrupted: "interrupted";
84
+ }>;
85
+ claimedBy: z.ZodNullable<z.ZodString>;
86
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
87
+ lastHeartbeatAt: z.ZodNullable<z.ZodISODateTime>;
88
+ leaseExpiresAt: z.ZodNullable<z.ZodISODateTime>;
89
+ startedAt: z.ZodNullable<z.ZodISODateTime>;
90
+ completedAt: z.ZodNullable<z.ZodISODateTime>;
91
+ result: z.ZodNullable<z.ZodObject<{
92
+ exitCode: z.ZodNullable<z.ZodNumber>;
93
+ signal: z.ZodNullable<z.ZodString>;
94
+ output: z.ZodObject<{
95
+ stdoutPreview: z.ZodString;
96
+ stderrPreview: z.ZodString;
97
+ stdoutBytes: z.ZodNumber;
98
+ stderrBytes: z.ZodNumber;
99
+ logRef: z.ZodNullable<z.ZodString>;
100
+ }, z.core.$strip>;
101
+ }, z.core.$strip>>;
102
+ failureReason: z.ZodNullable<z.ZodString>;
103
+ metadata: z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>;
104
+ createdAt: z.ZodISODateTime;
105
+ updatedAt: z.ZodISODateTime;
106
+ }, z.core.$strip>;
107
+ claimToken: z.ZodString;
108
+ }, z.core.$strip>;
109
+ export declare const createRuntimeCommandInputSchema: z.ZodObject<{
110
+ projectId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
111
+ projectRuntimeSessionId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
112
+ environmentRole: z.ZodDefault<z.ZodEnum<{
113
+ project: "project";
114
+ agent: "agent";
115
+ }>>;
116
+ command: z.ZodString;
117
+ metadata: z.ZodOptional<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
118
+ }, z.core.$strip>;
119
+ export declare const claimRuntimeCommandsInputSchema: z.ZodObject<{
120
+ projectRuntimeSessionId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
121
+ workerId: z.ZodString;
122
+ environmentRole: z.ZodDefault<z.ZodEnum<{
123
+ project: "project";
124
+ agent: "agent";
125
+ }>>;
126
+ batchSize: z.ZodDefault<z.ZodNumber>;
127
+ leaseDurationSeconds: z.ZodDefault<z.ZodNumber>;
128
+ }, z.core.$strip>;
129
+ export declare const runtimeCommandClaimCommandInputSchema: z.ZodObject<{
130
+ claimToken: z.ZodString;
131
+ leaseDurationSeconds: z.ZodDefault<z.ZodNumber>;
132
+ }, z.core.$strip>;
133
+ export declare const completeClaimedRuntimeCommandInputSchema: z.ZodObject<{
134
+ claimToken: z.ZodString;
135
+ result: z.ZodObject<{
136
+ exitCode: z.ZodNullable<z.ZodNumber>;
137
+ signal: z.ZodNullable<z.ZodString>;
138
+ output: z.ZodObject<{
139
+ stdoutPreview: z.ZodString;
140
+ stderrPreview: z.ZodString;
141
+ stdoutBytes: z.ZodNumber;
142
+ stderrBytes: z.ZodNumber;
143
+ logRef: z.ZodNullable<z.ZodString>;
144
+ }, z.core.$strip>;
145
+ }, z.core.$strip>;
146
+ metadata: z.ZodOptional<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
147
+ }, z.core.$strip>;
148
+ export declare const failClaimedRuntimeCommandInputSchema: z.ZodObject<{
149
+ claimToken: z.ZodString;
150
+ reason: z.ZodString;
151
+ result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
152
+ exitCode: z.ZodNullable<z.ZodNumber>;
153
+ signal: z.ZodNullable<z.ZodString>;
154
+ output: z.ZodObject<{
155
+ stdoutPreview: z.ZodString;
156
+ stderrPreview: z.ZodString;
157
+ stdoutBytes: z.ZodNumber;
158
+ stderrBytes: z.ZodNumber;
159
+ logRef: z.ZodNullable<z.ZodString>;
160
+ }, z.core.$strip>;
161
+ }, z.core.$strip>>>;
162
+ metadata: z.ZodOptional<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
163
+ }, z.core.$strip>;
164
+ export declare const interruptClaimedRuntimeCommandInputSchema: z.ZodObject<{
165
+ claimToken: z.ZodString;
166
+ reason: z.ZodString;
167
+ result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
168
+ exitCode: z.ZodNullable<z.ZodNumber>;
169
+ signal: z.ZodNullable<z.ZodString>;
170
+ output: z.ZodObject<{
171
+ stdoutPreview: z.ZodString;
172
+ stderrPreview: z.ZodString;
173
+ stdoutBytes: z.ZodNumber;
174
+ stderrBytes: z.ZodNumber;
175
+ logRef: z.ZodNullable<z.ZodString>;
176
+ }, z.core.$strip>;
177
+ }, z.core.$strip>>>;
178
+ metadata: z.ZodOptional<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
179
+ }, z.core.$strip>;
180
+ export declare const cancelRuntimeCommandInputSchema: z.ZodObject<{
181
+ reason: z.ZodString;
182
+ metadata: z.ZodOptional<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
183
+ }, z.core.$strip>;
184
+ export declare const getRuntimeCommandInputSchema: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
185
+ export type RuntimeCommandContract = z.infer<typeof runtimeCommandSchema>;
186
+ export type RuntimeCommandClaimContract = z.infer<typeof runtimeCommandClaimSchema>;
187
+ export type CreateRuntimeCommandInput = z.input<typeof createRuntimeCommandInputSchema>;
188
+ export type ClaimRuntimeCommandsInput = z.input<typeof claimRuntimeCommandsInputSchema>;
189
+ export type RuntimeCommandClaimCommandInput = z.input<typeof runtimeCommandClaimCommandInputSchema>;
190
+ export type CompleteClaimedRuntimeCommandInput = z.input<typeof completeClaimedRuntimeCommandInputSchema>;
191
+ export type FailClaimedRuntimeCommandInput = z.input<typeof failClaimedRuntimeCommandInputSchema>;
192
+ export type InterruptClaimedRuntimeCommandInput = z.input<typeof interruptClaimedRuntimeCommandInputSchema>;
193
+ export type CancelRuntimeCommandInput = z.input<typeof cancelRuntimeCommandInputSchema>;
194
+ export type GetRuntimeCommandInput = z.input<typeof getRuntimeCommandInputSchema>;
@@ -0,0 +1,111 @@
1
+ import { type UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
2
+ import type { AnyJsonObject } from "@boboddy/core/common/contracts/json";
3
+ import { type RuntimeEnvironmentRole } from "@boboddy/core/agent-sessions/runtime-environment/domain/runtime-environment";
4
+ export declare const RUNTIME_COMMAND_ENVIRONMENT_ROLES: readonly ["project", "agent"];
5
+ export type RuntimeCommandEnvironmentRole = RuntimeEnvironmentRole;
6
+ export declare const RUNTIME_COMMAND_STATUSES: readonly ["queued", "claimed", "running", "succeeded", "failed", "cancelled", "interrupted"];
7
+ export type RuntimeCommandStatus = (typeof RUNTIME_COMMAND_STATUSES)[number];
8
+ export type RuntimeCommandExecutionResult = {
9
+ exitCode: number | null;
10
+ signal: string | null;
11
+ output: {
12
+ stdoutPreview: string;
13
+ stderrPreview: string;
14
+ stdoutBytes: number;
15
+ stderrBytes: number;
16
+ logRef: string | null;
17
+ };
18
+ };
19
+ export type RuntimeCommandEntityProps = {
20
+ id: UuidV7;
21
+ projectId: UuidV7;
22
+ projectRuntimeSessionId: UuidV7;
23
+ environmentRole: RuntimeCommandEnvironmentRole;
24
+ command: string;
25
+ status: RuntimeCommandStatus;
26
+ claimedBy?: string | null | undefined;
27
+ claimToken?: string | null | undefined;
28
+ claimedAt?: Date | string | null | undefined;
29
+ lastHeartbeatAt?: Date | string | null | undefined;
30
+ leaseExpiresAt?: Date | string | null | undefined;
31
+ startedAt?: Date | string | null | undefined;
32
+ completedAt?: Date | string | null | undefined;
33
+ result?: RuntimeCommandExecutionResult | null | undefined;
34
+ failureReason?: string | null | undefined;
35
+ metadata?: AnyJsonObject | null | undefined;
36
+ createdAt?: Date | string | null | undefined;
37
+ updatedAt?: Date | string | null | undefined;
38
+ };
39
+ export type CreateRuntimeCommandEntityProps = Omit<RuntimeCommandEntityProps, "id"> & {
40
+ id?: UuidV7 | undefined;
41
+ };
42
+ export declare class RuntimeCommandEntity {
43
+ readonly id: UuidV7;
44
+ readonly projectId: UuidV7;
45
+ readonly projectRuntimeSessionId: UuidV7;
46
+ readonly environmentRole: RuntimeCommandEnvironmentRole;
47
+ readonly command: string;
48
+ readonly status: RuntimeCommandStatus;
49
+ readonly claimedBy: string | null;
50
+ readonly claimToken: string | null;
51
+ readonly claimedAt: Date | null | undefined;
52
+ readonly lastHeartbeatAt: Date | null | undefined;
53
+ readonly leaseExpiresAt: Date | null | undefined;
54
+ readonly startedAt: Date | null | undefined;
55
+ readonly completedAt: Date | null | undefined;
56
+ readonly result: RuntimeCommandExecutionResult | null;
57
+ readonly failureReason: string | null;
58
+ readonly metadata: AnyJsonObject;
59
+ readonly createdAt: Date | null | undefined;
60
+ readonly updatedAt: Date | null | undefined;
61
+ private constructor();
62
+ get isTerminal(): boolean;
63
+ static createQueued(props: Omit<CreateRuntimeCommandEntityProps, "status" | "claimedBy" | "claimToken" | "claimedAt" | "lastHeartbeatAt" | "leaseExpiresAt" | "startedAt" | "completedAt" | "result" | "failureReason">): RuntimeCommandEntity;
64
+ static rehydrate(props: RuntimeCommandEntityProps): RuntimeCommandEntity;
65
+ canBeClaimedAt(now: Date): boolean;
66
+ claim(input: {
67
+ workerId: string;
68
+ claimToken: string;
69
+ claimedAt: Date;
70
+ leaseExpiresAt: Date;
71
+ }): RuntimeCommandEntity;
72
+ markRunning(input: {
73
+ claimToken: string;
74
+ startedAt: Date;
75
+ }): RuntimeCommandEntity;
76
+ heartbeat(input: {
77
+ claimToken: string;
78
+ heartbeatAt: Date;
79
+ leaseExpiresAt: Date;
80
+ }): RuntimeCommandEntity;
81
+ succeed(input: {
82
+ claimToken: string;
83
+ completedAt: Date;
84
+ result: RuntimeCommandExecutionResult;
85
+ metadata?: AnyJsonObject | undefined;
86
+ }): RuntimeCommandEntity;
87
+ fail(input: {
88
+ claimToken: string;
89
+ completedAt: Date;
90
+ reason: string;
91
+ result?: RuntimeCommandExecutionResult | null | undefined;
92
+ metadata?: AnyJsonObject | undefined;
93
+ }): RuntimeCommandEntity;
94
+ interrupt(input: {
95
+ claimToken: string;
96
+ completedAt: Date;
97
+ reason: string;
98
+ result?: RuntimeCommandExecutionResult | null | undefined;
99
+ metadata?: AnyJsonObject | undefined;
100
+ }): RuntimeCommandEntity;
101
+ cancel(input: {
102
+ completedAt: Date;
103
+ reason: string;
104
+ metadata?: AnyJsonObject | undefined;
105
+ }): RuntimeCommandEntity;
106
+ toJSON(): RuntimeCommandEntityProps;
107
+ private assertClaimOwnership;
108
+ private assertNotTerminal;
109
+ private clearClaimFields;
110
+ private copy;
111
+ }
@@ -0,0 +1,20 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { RuntimeCommandRepo } from "../application/runtime-command-repo";
3
+ import { RuntimeCommandEntity, type RuntimeCommandEntityProps } from "../domain/runtime-command-entity";
4
+ export declare class DrizzleRuntimeCommandRepo implements RuntimeCommandRepo {
5
+ load(id: RuntimeCommandEntityProps["id"], dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity | null>;
6
+ listByProjectRuntimeSessionId(projectRuntimeSessionId: RuntimeCommandEntityProps["projectRuntimeSessionId"], dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity[]>;
7
+ loadClaimableByProjectRuntimeSessionId(projectRuntimeSessionId: RuntimeCommandEntityProps["projectRuntimeSessionId"], environmentRole: RuntimeCommandEntityProps["environmentRole"], limit: number, now: Date, dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity[]>;
8
+ create(runtimeCommand: RuntimeCommandEntity, dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity>;
9
+ claim(runtimeCommandId: RuntimeCommandEntityProps["id"], claim: {
10
+ workerId: string;
11
+ claimToken: string;
12
+ claimedAt: Date;
13
+ leaseExpiresAt: Date;
14
+ }, dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity | null>;
15
+ heartbeat(runtimeCommandId: RuntimeCommandEntityProps["id"], claimToken: string, heartbeat: {
16
+ lastHeartbeatAt: Date;
17
+ leaseExpiresAt: Date;
18
+ }, dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity | null>;
19
+ save(runtimeCommand: RuntimeCommandEntity, dbExecutor?: DbExecutor): Promise<RuntimeCommandEntity>;
20
+ }
@@ -0,0 +1,25 @@
1
+ import type { AnyJsonObject } from "@boboddy/core/common/contracts/json";
2
+ import { type Logger } from "@boboddy/core/lib/logger";
3
+ import type { ProjectRuntimeSessionExecutionTarget } from "@boboddy/core/agent-sessions/project-runtime-session/domain/project-runtime-session-execution-target";
4
+ import type { RuntimeCommandRunner } from "../application/runtime-command-runner";
5
+ export declare class LocalRuntimeCommandRunner implements RuntimeCommandRunner {
6
+ private readonly logger;
7
+ constructor(logger?: Logger);
8
+ executeOneShot({ command, executionTarget, metadata, onOutput, signal, }: {
9
+ command: string;
10
+ executionTarget: ProjectRuntimeSessionExecutionTarget;
11
+ metadata?: AnyJsonObject | undefined;
12
+ onOutput?: ((output: {
13
+ stream: "stdout" | "stderr";
14
+ chunk: string;
15
+ }) => Promise<void> | void) | undefined;
16
+ signal?: AbortSignal | undefined;
17
+ }): Promise<{
18
+ metadata: {
19
+ mode: string;
20
+ };
21
+ exitCode: number | null;
22
+ signal: string | null;
23
+ output: import("../application/runtime-command-runner").RuntimeCommandExecutionOutputTransport;
24
+ }>;
25
+ }
@@ -0,0 +1,12 @@
1
+ export declare const RUNTIME_ENVIRONMENT_ROLES: readonly ["project", "agent"];
2
+ export type RuntimeEnvironmentRole = (typeof RUNTIME_ENVIRONMENT_ROLES)[number];
3
+ export type RuntimeEnvironmentRef = string & {
4
+ readonly __brand: "RuntimeEnvironmentRef";
5
+ };
6
+ export type RuntimeRunnerAssignment = string & {
7
+ readonly __brand: "RuntimeRunnerAssignment";
8
+ };
9
+ export declare const parseRuntimeEnvironmentRef: (value: string) => RuntimeEnvironmentRef;
10
+ export declare const parseOptionalRuntimeEnvironmentRef: (value?: string | null) => RuntimeEnvironmentRef | null;
11
+ export declare const parseRuntimeRunnerAssignment: (value: string) => RuntimeRunnerAssignment;
12
+ export declare const parseOptionalRuntimeRunnerAssignment: (value?: string | null) => RuntimeRunnerAssignment | null;
@@ -0,0 +1,24 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { TimeProvider } from "@boboddy/core/lib/time-provider";
3
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
4
+ import type { AnyJsonObject } from "@boboddy/core/common/contracts/json";
5
+ import { RuntimeOperationEvent, type RuntimeOperationEventType, type RuntimeOperationKind } from "../domain/runtime-operation-event";
6
+ import type { RuntimeOperationEventRepo } from "./runtime-operation-event-repo";
7
+ export type PublishRuntimeOperationEventInput = {
8
+ projectId: UuidV7;
9
+ projectRuntimeSessionId: UuidV7;
10
+ operationKind: RuntimeOperationKind;
11
+ operationId: UuidV7;
12
+ eventType: RuntimeOperationEventType;
13
+ payload?: AnyJsonObject | undefined;
14
+ };
15
+ export type RuntimeOperationEventPublisher = {
16
+ publish(input: PublishRuntimeOperationEventInput, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent>;
17
+ };
18
+ export declare class DefaultRuntimeOperationEventPublisher implements RuntimeOperationEventPublisher {
19
+ private readonly runtimeOperationEventRepo;
20
+ private readonly timeProvider;
21
+ private readonly pendingPublishes;
22
+ constructor(runtimeOperationEventRepo: RuntimeOperationEventRepo, timeProvider: TimeProvider);
23
+ publish(input: PublishRuntimeOperationEventInput, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent>;
24
+ }
@@ -0,0 +1,17 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
3
+ import type { RuntimeOperationEvent, RuntimeOperationKind } from "../domain/runtime-operation-event";
4
+ export type RuntimeOperationEventRepo = {
5
+ create(event: RuntimeOperationEvent, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent>;
6
+ listByProjectRuntimeSessionId(projectRuntimeSessionId: UuidV7, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent[]>;
7
+ listByOperation(input: {
8
+ projectRuntimeSessionId: UuidV7;
9
+ operationKind: RuntimeOperationKind;
10
+ operationId: UuidV7;
11
+ }, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent[]>;
12
+ getLatestSequence(input: {
13
+ projectRuntimeSessionId: UuidV7;
14
+ operationKind: RuntimeOperationKind;
15
+ operationId: UuidV7;
16
+ }, dbExecutor?: DbExecutor): Promise<number>;
17
+ };
@@ -0,0 +1,35 @@
1
+ import { type UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
2
+ import type { AnyJsonObject } from "@boboddy/core/common/contracts/json";
3
+ export declare const RUNTIME_OPERATION_KINDS: readonly ["command", "service"];
4
+ export type RuntimeOperationKind = (typeof RUNTIME_OPERATION_KINDS)[number];
5
+ export declare const RUNTIME_OPERATION_EVENT_TYPES: readonly ["started", "stdout", "stderr", "ready", "failed", "completed", "stopped", "access_point_announced"];
6
+ export type RuntimeOperationEventType = (typeof RUNTIME_OPERATION_EVENT_TYPES)[number];
7
+ export type RuntimeOperationEventProps = {
8
+ id: UuidV7;
9
+ projectId: UuidV7;
10
+ projectRuntimeSessionId: UuidV7;
11
+ operationKind: RuntimeOperationKind;
12
+ operationId: UuidV7;
13
+ sequence: number;
14
+ eventType: RuntimeOperationEventType;
15
+ payload?: AnyJsonObject | null | undefined;
16
+ createdAt?: Date | string | null | undefined;
17
+ };
18
+ export type CreateRuntimeOperationEventProps = Omit<RuntimeOperationEventProps, "id"> & {
19
+ id?: UuidV7 | undefined;
20
+ };
21
+ export declare class RuntimeOperationEvent {
22
+ readonly id: UuidV7;
23
+ readonly projectId: UuidV7;
24
+ readonly projectRuntimeSessionId: UuidV7;
25
+ readonly operationKind: RuntimeOperationKind;
26
+ readonly operationId: UuidV7;
27
+ readonly sequence: number;
28
+ readonly eventType: RuntimeOperationEventType;
29
+ readonly payload: AnyJsonObject;
30
+ readonly createdAt: Date | null | undefined;
31
+ private constructor();
32
+ static create(props: CreateRuntimeOperationEventProps): RuntimeOperationEvent;
33
+ static rehydrate(props: RuntimeOperationEventProps): RuntimeOperationEvent;
34
+ toJSON(): RuntimeOperationEventProps;
35
+ }
@@ -0,0 +1,25 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
3
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
4
+ import type { RuntimeOperationEventRepo } from "../application/runtime-operation-event-repo";
5
+ import { RuntimeOperationEvent, type RuntimeOperationKind } from "../domain/runtime-operation-event";
6
+ export declare class FileRuntimeOperationEventRepo implements RuntimeOperationEventRepo {
7
+ private readonly projectRuntimeSessionRepo;
8
+ constructor(projectRuntimeSessionRepo: ProjectRuntimeSessionRepo);
9
+ create(event: RuntimeOperationEvent, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent>;
10
+ listByProjectRuntimeSessionId(projectRuntimeSessionId: UuidV7, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent[]>;
11
+ listByOperation(input: {
12
+ projectRuntimeSessionId: UuidV7;
13
+ operationKind: RuntimeOperationKind;
14
+ operationId: UuidV7;
15
+ }, dbExecutor?: DbExecutor): Promise<RuntimeOperationEvent[]>;
16
+ getLatestSequence(input: {
17
+ projectRuntimeSessionId: UuidV7;
18
+ operationKind: RuntimeOperationKind;
19
+ operationId: UuidV7;
20
+ }, dbExecutor?: DbExecutor): Promise<number>;
21
+ private resolveOperationStreamPath;
22
+ private resolveEventsDirectoryPath;
23
+ private readEventsFromFile;
24
+ private pathExists;
25
+ }
@@ -0,0 +1,17 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { TimeProvider } from "@boboddy/core/lib/time-provider";
3
+ import { type Logger } from "@boboddy/core/lib/logger";
4
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
5
+ import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
6
+ import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
7
+ import type { RuntimeServiceRepo } from "./runtime-service-repo";
8
+ import { type CreateRuntimeServiceInput, type RuntimeServiceContract } from "../contracts/runtime-service-contracts";
9
+ export declare const createRuntimeService: (input: CreateRuntimeServiceInput, { userId, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, timeProvider, dbExecutor, logger, }: {
10
+ userId: UuidV7;
11
+ projectRepo: ProjectRepo;
12
+ projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
13
+ runtimeServiceRepo: RuntimeServiceRepo;
14
+ timeProvider: TimeProvider;
15
+ dbExecutor?: DbExecutor | undefined;
16
+ logger?: Logger | undefined;
17
+ }) => Promise<RuntimeServiceContract>;
@@ -0,0 +1,11 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
3
+ import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
4
+ import type { RuntimeServiceRepo } from "./runtime-service-repo";
5
+ import { type GetRuntimeServiceInput, type RuntimeServiceContract } from "../contracts/runtime-service-contracts";
6
+ export declare const getRuntimeService: (input: GetRuntimeServiceInput, { userId, projectRepo, runtimeServiceRepo, dbExecutor, }: {
7
+ userId: UuidV7;
8
+ projectRepo: ProjectRepo;
9
+ runtimeServiceRepo: RuntimeServiceRepo;
10
+ dbExecutor?: DbExecutor | undefined;
11
+ }) => Promise<RuntimeServiceContract>;
@@ -0,0 +1,3 @@
1
+ import { type RuntimeServiceContract } from "../contracts/runtime-service-contracts";
2
+ import type { RuntimeServiceEntity } from "../domain/runtime-service-entity";
3
+ export declare const runtimeServiceEntityToContract: (runtimeService: RuntimeServiceEntity) => RuntimeServiceContract;
@@ -0,0 +1,10 @@
1
+ export declare const RUNTIME_SERVICE_OUTPUT_PREVIEW_LIMIT = 4000;
2
+ export declare const summarizeRuntimeServiceOutput: (output: {
3
+ stdout: string;
4
+ stderr: string;
5
+ }) => {
6
+ stdoutPreview: string;
7
+ stderrPreview: string;
8
+ stdoutBytes: number;
9
+ stderrBytes: number;
10
+ };
@@ -0,0 +1,9 @@
1
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
2
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
3
+ import type { RuntimeServiceEntity } from "../domain/runtime-service-entity";
4
+ export type RuntimeServiceRepo = {
5
+ load(id: UuidV7, dbExecutor?: DbExecutor): Promise<RuntimeServiceEntity | null>;
6
+ listByProjectRuntimeSessionId(projectRuntimeSessionId: UuidV7, dbExecutor?: DbExecutor): Promise<RuntimeServiceEntity[]>;
7
+ create(runtimeService: RuntimeServiceEntity, dbExecutor?: DbExecutor): Promise<RuntimeServiceEntity>;
8
+ save(runtimeService: RuntimeServiceEntity, dbExecutor?: DbExecutor): Promise<RuntimeServiceEntity>;
9
+ };
@@ -0,0 +1,23 @@
1
+ import type { AnyJsonObject } from "@boboddy/core/common/contracts/json";
2
+ import type { ProjectRuntimeSessionExecutionTarget } from "@boboddy/core/agent-sessions/project-runtime-session/domain/project-runtime-session-execution-target";
3
+ import type { RuntimeServiceAccessPoint } from "../domain/runtime-service-access-point";
4
+ import type { RuntimeServiceEntity } from "../domain/runtime-service-entity";
5
+ export type RuntimeServiceOutputEvent = {
6
+ stream: "stdout" | "stderr";
7
+ chunk: string;
8
+ };
9
+ export type RuntimeServiceRunner = {
10
+ start(input: {
11
+ runtimeService: RuntimeServiceEntity;
12
+ executionTarget: ProjectRuntimeSessionExecutionTarget;
13
+ onOutput?: ((output: RuntimeServiceOutputEvent) => Promise<void> | void) | undefined;
14
+ }): Promise<{
15
+ accessPoints: RuntimeServiceAccessPoint[];
16
+ readyAt: Date;
17
+ metadata?: AnyJsonObject | undefined;
18
+ }>;
19
+ stop(input: {
20
+ runtimeService: RuntimeServiceEntity;
21
+ executionTarget: ProjectRuntimeSessionExecutionTarget;
22
+ }): Promise<void>;
23
+ };
@@ -0,0 +1,19 @@
1
+ import type { ProjectRuntimeSessionExecutionTarget } from "@boboddy/core/agent-sessions/project-runtime-session/domain/project-runtime-session-execution-target";
2
+ import type { RuntimeServiceAccessPoint, RuntimeServiceAccessPointProtocol } from "../domain/runtime-service-access-point";
3
+ export type RuntimeSessionServiceAccessPoint = RuntimeServiceAccessPoint & {
4
+ targetPort: number;
5
+ };
6
+ export type EnsureDefaultRuntimeServiceAccessPointsInput = {
7
+ executionTarget: ProjectRuntimeSessionExecutionTarget;
8
+ workspacePath: string;
9
+ devcontainerConfigPath: string;
10
+ };
11
+ export type EnsureRuntimeServiceAccessPointInput = EnsureDefaultRuntimeServiceAccessPointsInput & {
12
+ targetPort: number;
13
+ protocol: RuntimeServiceAccessPointProtocol;
14
+ };
15
+ export type RuntimeSessionServiceExposureProvider = {
16
+ ensureDefaultAccessPoints(input: EnsureDefaultRuntimeServiceAccessPointsInput): Promise<RuntimeSessionServiceAccessPoint[]>;
17
+ ensureAccessPoint(input: EnsureRuntimeServiceAccessPointInput): Promise<RuntimeSessionServiceAccessPoint>;
18
+ stop(executionTarget: ProjectRuntimeSessionExecutionTarget): Promise<void>;
19
+ };
@@ -0,0 +1,21 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { TimeProvider } from "@boboddy/core/lib/time-provider";
3
+ import { type Logger } from "@boboddy/core/lib/logger";
4
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
5
+ import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
6
+ import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
7
+ import type { RuntimeOperationEventPublisher } from "@boboddy/core/agent-sessions/runtime-operation-event/application/runtime-operation-event-publisher";
8
+ import type { RuntimeServiceRepo } from "./runtime-service-repo";
9
+ import type { RuntimeServiceRunner } from "./runtime-service-runner";
10
+ import { type RuntimeServiceContract, type StartRuntimeServiceInput } from "../contracts/runtime-service-contracts";
11
+ export declare const startRuntimeServiceLocally: (input: StartRuntimeServiceInput, { userId, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, timeProvider, dbExecutor, logger, }: {
12
+ userId: UuidV7;
13
+ projectRepo: ProjectRepo;
14
+ projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
15
+ runtimeServiceRepo: RuntimeServiceRepo;
16
+ runtimeServiceRunner: RuntimeServiceRunner;
17
+ runtimeOperationEventPublisher: RuntimeOperationEventPublisher;
18
+ timeProvider: TimeProvider;
19
+ dbExecutor?: DbExecutor | undefined;
20
+ logger?: Logger | undefined;
21
+ }) => Promise<RuntimeServiceContract>;
@@ -0,0 +1,32 @@
1
+ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
2
+ import type { TimeProvider } from "@boboddy/core/lib/time-provider";
3
+ import { type Logger } from "@boboddy/core/lib/logger";
4
+ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
5
+ import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
6
+ import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
7
+ import { getProjectRuntimeSessionExecutionTarget } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-execution-target";
8
+ import type { RuntimeOperationEventPublisher } from "@boboddy/core/agent-sessions/runtime-operation-event/application/runtime-operation-event-publisher";
9
+ import type { RuntimeServiceRepo } from "./runtime-service-repo";
10
+ import type { RuntimeServiceRunner } from "./runtime-service-runner";
11
+ import type { RuntimeServiceEntity } from "../domain/runtime-service-entity";
12
+ import { type RuntimeServiceContract, type StopRuntimeServiceInput } from "../contracts/runtime-service-contracts";
13
+ export declare const stopOwnedRuntimeService: (runtimeService: RuntimeServiceEntity, { runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, executionTarget, timeProvider, dbExecutor, logger, }: {
14
+ runtimeServiceRepo: RuntimeServiceRepo;
15
+ runtimeServiceRunner: RuntimeServiceRunner;
16
+ runtimeOperationEventPublisher: RuntimeOperationEventPublisher;
17
+ executionTarget?: ReturnType<typeof getProjectRuntimeSessionExecutionTarget> | undefined;
18
+ timeProvider: TimeProvider;
19
+ dbExecutor?: DbExecutor | undefined;
20
+ logger?: Logger | undefined;
21
+ }) => Promise<RuntimeServiceEntity>;
22
+ export declare const stopRuntimeService: (input: StopRuntimeServiceInput, { userId, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, timeProvider, dbExecutor, logger, }: {
23
+ userId: UuidV7;
24
+ projectRepo: ProjectRepo;
25
+ projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
26
+ runtimeServiceRepo: RuntimeServiceRepo;
27
+ runtimeServiceRunner: RuntimeServiceRunner;
28
+ runtimeOperationEventPublisher: RuntimeOperationEventPublisher;
29
+ timeProvider: TimeProvider;
30
+ dbExecutor?: DbExecutor | undefined;
31
+ logger?: Logger | undefined;
32
+ }) => Promise<RuntimeServiceContract>;