@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.
- package/dist/apps/api/src/app.d.ts +1371 -575
- package/dist/apps/api/src/http/routes/step-definition-templates.d.ts +477 -0
- package/dist/apps/api/src/http/routes/step-executions.d.ts +1 -0
- package/dist/packages/core/src/access/authorization/application/authorization-service.d.ts +12 -0
- package/dist/packages/core/src/access/authorization/infra/project-authorization-service.d.ts +7 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/ai-container-launcher.d.ts +21 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/create-project-runtime-session.d.ts +13 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/devcontainer-launcher.d.ts +21 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/get-project-runtime-session.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/git-clone-service.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/list-project-runtime-sessions.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-execution-target.d.ts +3 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-network-metadata.d.ts +15 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/project-runtime-session-repo.d.ts +10 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/runtime-session-network-manager.d.ts +14 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/stop-project-runtime-session.d.ts +29 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/workspace-manager.d.ts +10 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/contracts/project-runtime-session-contracts.d.ts +62 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-entity-helpers.d.ts +12 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-entity.d.ts +99 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/domain/project-runtime-session-execution-target.d.ts +16 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/devcontainer-cli-launcher.d.ts +6 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/docker-ai-container-launcher.d.ts +8 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/drizzle-project-runtime-session-repo.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/git-cli-clone-service.d.ts +4 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-jsonc.d.ts +4 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-port-forward-manager-support.d.ts +42 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-port-forward-manager.d.ts +24 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-devcontainer-working-directory.d.ts +5 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-docker-runtime-session-network-manager.d.ts +17 -0
- package/dist/packages/core/src/agent-sessions/project-runtime-session/infra/local-workspace-manager.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/complete-claimed-runtime-command.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/create-runtime-command.d.ts +17 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/fail-claimed-runtime-command.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/interrupt-claimed-runtime-command.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/run-runtime-command-locally.d.ts +26 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-claim-helpers.d.ts +1 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-output-summary.d.ts +4 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-repo.d.ts +20 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/application/runtime-command-runner.d.ts +25 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/contracts/runtime-command-contracts.d.ts +194 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/domain/runtime-command-entity.d.ts +111 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/infra/drizzle-runtime-command-repo.d.ts +20 -0
- package/dist/packages/core/src/agent-sessions/runtime-command/infra/local-runtime-command-runner.d.ts +25 -0
- package/dist/packages/core/src/agent-sessions/runtime-environment/domain/runtime-environment.d.ts +12 -0
- package/dist/packages/core/src/agent-sessions/runtime-operation-event/application/runtime-operation-event-publisher.d.ts +24 -0
- package/dist/packages/core/src/agent-sessions/runtime-operation-event/application/runtime-operation-event-repo.d.ts +17 -0
- package/dist/packages/core/src/agent-sessions/runtime-operation-event/domain/runtime-operation-event.d.ts +35 -0
- package/dist/packages/core/src/agent-sessions/runtime-operation-event/infra/file-runtime-operation-event-repo.d.ts +25 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/create-runtime-service.d.ts +17 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/get-runtime-service.d.ts +11 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-output-summary.d.ts +10 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-repo.d.ts +9 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-service-runner.d.ts +23 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/runtime-session-service-exposure-provider.d.ts +19 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/start-runtime-service-locally.d.ts +21 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/application/stop-runtime-service.d.ts +32 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/contracts/runtime-service-contracts.d.ts +140 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-access-point.d.ts +12 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-entity.d.ts +76 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/domain/runtime-service-healthcheck.d.ts +20 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/infra/drizzle-runtime-service-repo.d.ts +9 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/infra/local-runtime-service-readiness-probe.d.ts +42 -0
- package/dist/packages/core/src/agent-sessions/runtime-service/infra/local-runtime-service-runner.d.ts +32 -0
- package/dist/packages/core/src/common/contracts/json.d.ts +9 -0
- package/dist/packages/core/src/common/contracts/opencode-mcp.d.ts +73 -0
- package/dist/packages/core/src/common/contracts/uuid-v7.d.ts +8 -0
- package/dist/packages/core/src/lib/db/db-executor.d.ts +4 -0
- package/dist/packages/core/src/lib/db/index.d.ts +7 -0
- package/dist/packages/core/src/lib/db/schema.d.ts +4950 -0
- package/dist/packages/core/src/lib/di.d.ts +112 -0
- package/dist/packages/core/src/lib/domain-events/domain-event.d.ts +12 -0
- package/dist/packages/core/src/lib/domain-events/in-memory-domain-event-dispatcher.d.ts +7 -0
- package/dist/packages/core/src/lib/errors.d.ts +36 -0
- package/dist/packages/core/src/lib/logger.d.ts +7 -0
- package/dist/packages/core/src/lib/time-provider.d.ts +5 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/add-linear-pipeline-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/archive-linear-pipeline-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/create-linear-pipeline-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/get-linear-pipeline-definition.d.ts +7 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/linear-pipeline-definition-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/linear-pipeline-definition-repo.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/list-linear-pipeline-definitions.d.ts +7 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/remove-linear-pipeline-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/set-linear-pipeline-step-advancement-policy-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/contracts/linear-pipeline-definition-contracts.d.ts +357 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/domain/linear-pipeline-definition-entity.d.ts +36 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/entities/linear-pipeline-step-advancement-policy-definition-entity.d.ts +42 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/entities/linear-pipeline-step-definition-entity.d.ts +42 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/infra/drizzle-linear-pipeline-definition-repo.d.ts +11 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/archive-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/create-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/get-step-definition.d.ts +7 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/list-step-definitions.d.ts +7 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/step-definition-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/step-definition-repo.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/update-step-definition.d.ts +9 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/contracts/step-definition-contracts.d.ts +281 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/domain/step-definition-entity.d.ts +53 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/entities/computed-signal-definition-entity.d.ts +31 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/entities/signal-extractor-definition-entity.d.ts +30 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition/infra/drizzle-step-definition-repo.d.ts +11 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/get-step-definition-template.d.ts +6 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/instantiate-step-definition-template.d.ts +11 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/list-step-definition-templates.d.ts +5 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/step-definition-template-repo.d.ts +7 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/contracts/step-definition-template-contracts.d.ts +98 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/domain/step-definition-template-entity.d.ts +37 -0
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/infra/drizzle-step-definition-template-repo.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/create-feedback-requests-on-step-signal-created.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/decline-feedback-request.d.ts +14 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/feedback-request-repo.d.ts +8 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/list-feedback-requests-by-step-signal.d.ts +15 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/contracts/feedback-request-contracts.d.ts +21 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/domain/feedback-request-entity.d.ts +29 -0
- package/dist/packages/core/src/pipeline-executions/feedback-request/infra/drizzle-feedback-request-repo.d.ts +10 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/accept-linear-pipeline-step-run.d.ts +15 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/apply-linear-pipeline-step-result-and-advance.d.ts +17 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/cancel-linear-pipeline-execution.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-execution.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-step-run-attempt.d.ts +13 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/get-linear-pipeline-execution.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-helpers.d.ts +52 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-execution-repo.d.ts +15 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/linear-pipeline-step-input-resolution.d.ts +5 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions-by-definition.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/mark-linear-pipeline-step-run-attempt-running.d.ts +11 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/project-linear-pipeline-executions.d.ts +10 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/queue-first-linear-pipeline-step-run.d.ts +15 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/retrigger-linear-pipeline-step-run.d.ts +13 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/start-linear-pipeline-execution.d.ts +15 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/contracts/linear-pipeline-execution-contracts.d.ts +330 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/domain/linear-pipeline-execution-entity.d.ts +43 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-execution-event-entity.d.ts +25 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-evaluation-entity.d.ts +45 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-run-attempt-entity.d.ts +24 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/entities/linear-pipeline-step-run-entity.d.ts +63 -0
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/infra/drizzle-linear-pipeline-execution-repo.d.ts +19 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/add-step-execution-result.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/claim-step-executions.d.ts +17 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/complete-claimed-step-execution.d.ts +35 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/create-step-execution.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/extract-step-execution-signals.d.ts +13 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution-worker-context.d.ts +13 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/heartbeat-step-execution-claim.d.ts +17 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/list-step-executions-by-project.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/load-status-adjusted-step-executions.d.ts +31 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/mark-step-execution-running.d.ts +9 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-claim-helpers.d.ts +13 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-contract-mapper.d.ts +7 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/application/step-execution-repo.d.ts +29 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/contracts/step-execution-contracts.d.ts +325 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/domain/step-execution-entity.d.ts +61 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/domain/step-signal-created.domain-event.d.ts +18 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/entities/step-execution-result-entity.d.ts +32 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/entities/step-signal-entity.d.ts +36 -0
- package/dist/packages/core/src/pipeline-executions/step-execution/infra/drizzle-step-execution-repo.d.ts +31 -0
- package/dist/packages/core/src/projects/project/application/create-project.d.ts +13 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-create-failing-test-step-definition.d.ts +4 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-description-quality-step-definition.d.ts +4 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-fix-failing-test-step-definition.d.ts +4 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-linear-pipeline-conventions.d.ts +9 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-linear-pipeline-definitions.d.ts +7 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-step-definitions.d.ts +8 -0
- package/dist/packages/core/src/projects/project/application/default-pipelines/default-web-repro-playwright-step-definition.d.ts +4 -0
- package/dist/packages/core/src/projects/project/application/get-project.d.ts +9 -0
- package/dist/packages/core/src/projects/project/application/list-projects.d.ts +9 -0
- package/dist/packages/core/src/projects/project/application/project-authorization.d.ts +4 -0
- package/dist/packages/core/src/projects/project/application/project-contract-mapper.d.ts +3 -0
- package/dist/packages/core/src/projects/project/application/project-repo.d.ts +9 -0
- package/dist/packages/core/src/projects/project/application/seed-default-pipelines-on-project-created.d.ts +12 -0
- package/dist/packages/core/src/projects/project/application/update-project-membership.d.ts +11 -0
- package/dist/packages/core/src/projects/project/contracts/project-contracts.d.ts +37 -0
- package/dist/packages/core/src/projects/project/domain/project-created.domain-event.d.ts +13 -0
- package/dist/packages/core/src/projects/project/domain/project-entity.d.ts +31 -0
- package/dist/packages/core/src/projects/project/domain/project-git-url.d.ts +7 -0
- package/dist/packages/core/src/projects/project/domain/project-membership.d.ts +21 -0
- package/dist/packages/core/src/projects/project/domain/project-permission.d.ts +7 -0
- package/dist/packages/core/src/projects/project/infra/drizzle-project-repo.d.ts +11 -0
- package/dist/packages/core/src/projects/project-context/application/create-project-context-entry.d.ts +13 -0
- package/dist/packages/core/src/projects/project-context/application/delete-project-context-entry.d.ts +10 -0
- package/dist/packages/core/src/projects/project-context/application/list-project-context-entries.d.ts +13 -0
- package/dist/packages/core/src/projects/project-context/application/project-context-entry-repo.d.ts +8 -0
- package/dist/packages/core/src/projects/project-context/contracts/project-context-entry-contracts.d.ts +46 -0
- package/dist/packages/core/src/projects/project-context/domain/project-context-entry-entity.d.ts +27 -0
- package/dist/packages/core/src/projects/project-context/infra/drizzle-project-context-entry-repo.d.ts +10 -0
- package/dist/packages/core/src/projects/project-opencode-config/application/project-opencode-runtime-metadata.d.ts +17 -0
- package/dist/packages/core/src/work-items/work-item/application/create-work-item.d.ts +16 -0
- package/dist/packages/core/src/work-items/work-item/application/delete-work-items.d.ts +14 -0
- package/dist/packages/core/src/work-items/work-item/application/get-work-items.d.ts +14 -0
- package/dist/packages/core/src/work-items/work-item/application/list-work-items-by-project.d.ts +11 -0
- package/dist/packages/core/src/work-items/work-item/application/upsert-work-item.d.ts +16 -0
- package/dist/packages/core/src/work-items/work-item/application/work-item-contract-mapper.d.ts +4 -0
- package/dist/packages/core/src/work-items/work-item/application/work-item-repo.d.ts +27 -0
- package/dist/packages/core/src/work-items/work-item/contracts/work-item-contracts.d.ts +119 -0
- package/dist/packages/core/src/work-items/work-item/domain/date-utils.d.ts +1 -0
- package/dist/packages/core/src/work-items/work-item/domain/work-item-entity.d.ts +58 -0
- package/dist/packages/core/src/work-items/work-item/domain/work-item-field-value.d.ts +3 -0
- package/dist/packages/core/src/work-items/work-item/domain/work-item-id.d.ts +6 -0
- package/dist/packages/core/src/work-items/work-item/domain/work-item-platform.d.ts +2 -0
- package/dist/packages/core/src/work-items/work-item/domain/work-item-projection-fingerprint-entity.d.ts +18 -0
- package/dist/packages/core/src/work-items/work-item/infra/drizzle-work-item-repo.d.ts +25 -0
- package/dist/packages/sdks/js/src/define-step.d.ts +72 -0
- package/dist/packages/sdks/js/src/step-definitions-client.d.ts +202 -0
- package/dist/packages/sdks/js/src/step-execution-plane-client.d.ts +1 -0
- package/dist/packages/sdks/js/test/define-step.test.d.ts +1 -0
- package/package.json +17 -2
|
@@ -0,0 +1,16 @@
|
|
|
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 { AuthorizationService } from "@boboddy/core/access/authorization/application/authorization-service";
|
|
4
|
+
import { type WorkItemContract, type UpsertWorkItemInput, type UpsertWorkItemsInput } from "../contracts/work-item-contracts";
|
|
5
|
+
import type { WorkItemRepo } from "./work-item-repo";
|
|
6
|
+
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
7
|
+
type UpsertWorkItemsDeps = {
|
|
8
|
+
userId: UuidV7;
|
|
9
|
+
authz: AuthorizationService;
|
|
10
|
+
workItemRepo: WorkItemRepo;
|
|
11
|
+
timeProvider: TimeProvider;
|
|
12
|
+
dbExecutor?: DbExecutor | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare const upsertWorkItems: (input: UpsertWorkItemsInput, deps: UpsertWorkItemsDeps) => Promise<WorkItemContract[]>;
|
|
15
|
+
export declare const upsertWorkItem: (input: UpsertWorkItemInput, deps: UpsertWorkItemsDeps) => Promise<WorkItemContract>;
|
|
16
|
+
export {};
|
package/dist/packages/core/src/work-items/work-item/application/work-item-contract-mapper.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateWorkItemProps, WorkItemEntity } from "../domain/work-item-entity";
|
|
2
|
+
import { type WorkItemContract, type UpsertWorkItemInput } from "../contracts/work-item-contracts";
|
|
3
|
+
export declare const upsertWorkItemInputToCreateWorkItemProps: (input: UpsertWorkItemInput) => CreateWorkItemProps;
|
|
4
|
+
export declare const workItemEntityToContract: (workItem: WorkItemEntity) => WorkItemContract;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { WorkItemEntity } from "../domain/work-item-entity";
|
|
4
|
+
import type { WorkItemId } from "../domain/work-item-id";
|
|
5
|
+
import type { WorkItemPlatform } from "../domain/work-item-platform";
|
|
6
|
+
import type { WorkItemProjectionFingerprintEntity } from "../domain/work-item-projection-fingerprint-entity";
|
|
7
|
+
export type WorkItemRepo = {
|
|
8
|
+
load(id: WorkItemId, dbExecutor?: DbExecutor): Promise<WorkItemEntity | null>;
|
|
9
|
+
loadMany(ids: WorkItemId[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
10
|
+
loadByProjectId(projectId: UuidV7, dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
11
|
+
loadByPlatformIdentity(projectId: UuidV7, platform: WorkItemPlatform, sourceIdentity: string, dbExecutor?: DbExecutor): Promise<WorkItemEntity | null>;
|
|
12
|
+
loadManyByPlatformIdentities(identities: {
|
|
13
|
+
projectId: UuidV7;
|
|
14
|
+
platform: WorkItemPlatform;
|
|
15
|
+
sourceIdentity: string;
|
|
16
|
+
}[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
17
|
+
create(workItem: WorkItemEntity, dbExecutor?: DbExecutor): Promise<WorkItemEntity>;
|
|
18
|
+
createMany(workItems: WorkItemEntity[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
19
|
+
save(workItem: WorkItemEntity, dbExecutor?: DbExecutor): Promise<WorkItemEntity>;
|
|
20
|
+
saveMany(workItems: WorkItemEntity[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
21
|
+
delete(id: WorkItemId, dbExecutor?: DbExecutor): Promise<number>;
|
|
22
|
+
deleteMany(ids: WorkItemId[], dbExecutor?: DbExecutor): Promise<number>;
|
|
23
|
+
};
|
|
24
|
+
export type WorkItemProjectionFingerprintRepo = {
|
|
25
|
+
load(workItemId: WorkItemId, specId: string, dbExecutor?: DbExecutor): Promise<WorkItemProjectionFingerprintEntity | null>;
|
|
26
|
+
save(fingerprint: WorkItemProjectionFingerprintEntity, dbExecutor?: DbExecutor): Promise<WorkItemProjectionFingerprintEntity>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const workItemIdSchema: z.ZodString & z.ZodType<import("../domain/work-item-id").WorkItemId, string, z.core.$ZodTypeInternals<import("../domain/work-item-id").WorkItemId, string>>;
|
|
3
|
+
export declare const workItemPlatformSchema: z.ZodEnum<{
|
|
4
|
+
jira: "jira";
|
|
5
|
+
github: "github";
|
|
6
|
+
linear: "linear";
|
|
7
|
+
boboddy: "boboddy";
|
|
8
|
+
custom: "custom";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const workItemSchema: z.ZodObject<{
|
|
11
|
+
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>>;
|
|
12
|
+
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>>;
|
|
13
|
+
platform: z.ZodEnum<{
|
|
14
|
+
jira: "jira";
|
|
15
|
+
github: "github";
|
|
16
|
+
linear: "linear";
|
|
17
|
+
boboddy: "boboddy";
|
|
18
|
+
custom: "custom";
|
|
19
|
+
}>;
|
|
20
|
+
platformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
platformKey: z.ZodString;
|
|
22
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
description: z.ZodString;
|
|
25
|
+
sourceCreatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
26
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
27
|
+
fields: z.ZodNullable<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
|
|
28
|
+
createdAt: z.ZodISODateTime;
|
|
29
|
+
updatedAt: z.ZodISODateTime;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const createWorkItemSchema: z.ZodObject<{
|
|
32
|
+
description: z.ZodString;
|
|
33
|
+
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>>;
|
|
34
|
+
platform: z.ZodEnum<{
|
|
35
|
+
jira: "jira";
|
|
36
|
+
github: "github";
|
|
37
|
+
linear: "linear";
|
|
38
|
+
boboddy: "boboddy";
|
|
39
|
+
custom: "custom";
|
|
40
|
+
}>;
|
|
41
|
+
platformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
platformKey: z.ZodString;
|
|
43
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
44
|
+
title: z.ZodString;
|
|
45
|
+
sourceCreatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
46
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
47
|
+
fields: z.ZodNullable<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const workItemIngestionInputSchema: z.ZodObject<{
|
|
50
|
+
description: z.ZodString;
|
|
51
|
+
platform: z.ZodEnum<{
|
|
52
|
+
jira: "jira";
|
|
53
|
+
github: "github";
|
|
54
|
+
linear: "linear";
|
|
55
|
+
boboddy: "boboddy";
|
|
56
|
+
custom: "custom";
|
|
57
|
+
}>;
|
|
58
|
+
platformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
platformKey: z.ZodString;
|
|
60
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
61
|
+
title: z.ZodString;
|
|
62
|
+
sourceCreatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
63
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
64
|
+
fields: z.ZodNullable<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export declare const upsertWorkItemInputSchema: z.ZodObject<{
|
|
67
|
+
description: z.ZodString;
|
|
68
|
+
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>>;
|
|
69
|
+
platform: z.ZodEnum<{
|
|
70
|
+
jira: "jira";
|
|
71
|
+
github: "github";
|
|
72
|
+
linear: "linear";
|
|
73
|
+
boboddy: "boboddy";
|
|
74
|
+
custom: "custom";
|
|
75
|
+
}>;
|
|
76
|
+
platformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
platformKey: z.ZodString;
|
|
78
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
sourceCreatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
81
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
82
|
+
fields: z.ZodNullable<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export declare const upsertWorkItemsInputSchema: z.ZodArray<z.ZodObject<{
|
|
85
|
+
description: z.ZodString;
|
|
86
|
+
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>>;
|
|
87
|
+
platform: z.ZodEnum<{
|
|
88
|
+
jira: "jira";
|
|
89
|
+
github: "github";
|
|
90
|
+
linear: "linear";
|
|
91
|
+
boboddy: "boboddy";
|
|
92
|
+
custom: "custom";
|
|
93
|
+
}>;
|
|
94
|
+
platformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
platformKey: z.ZodString;
|
|
96
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
97
|
+
title: z.ZodString;
|
|
98
|
+
sourceCreatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
99
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
100
|
+
fields: z.ZodNullable<z.ZodType<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/json").AnyJsonObject, unknown>>>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
export declare const getWorkItemInputSchema: z.ZodString & z.ZodType<import("../domain/work-item-id").WorkItemId, string, z.core.$ZodTypeInternals<import("../domain/work-item-id").WorkItemId, string>>;
|
|
103
|
+
export declare const getWorkItemsInputSchema: z.ZodArray<z.ZodString & z.ZodType<import("../domain/work-item-id").WorkItemId, string, z.core.$ZodTypeInternals<import("../domain/work-item-id").WorkItemId, string>>>;
|
|
104
|
+
export declare const deleteWorkItemInputSchema: z.ZodString & z.ZodType<import("../domain/work-item-id").WorkItemId, string, z.core.$ZodTypeInternals<import("../domain/work-item-id").WorkItemId, string>>;
|
|
105
|
+
export declare const deleteWorkItemsInputSchema: z.ZodArray<z.ZodString & z.ZodType<import("../domain/work-item-id").WorkItemId, string, z.core.$ZodTypeInternals<import("../domain/work-item-id").WorkItemId, string>>>;
|
|
106
|
+
export declare const workItemProjectionSpecSchema: z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
fields: z.ZodArray<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type WorkItemContract = z.infer<typeof workItemSchema>;
|
|
111
|
+
export type CreateWorkItemInput = z.input<typeof createWorkItemSchema>;
|
|
112
|
+
export type WorkItemIngestionInput = z.input<typeof workItemIngestionInputSchema>;
|
|
113
|
+
export type UpsertWorkItemInput = z.input<typeof upsertWorkItemInputSchema>;
|
|
114
|
+
export type UpsertWorkItemsInput = z.input<typeof upsertWorkItemsInputSchema>;
|
|
115
|
+
export type GetWorkItemInput = z.input<typeof getWorkItemInputSchema>;
|
|
116
|
+
export type GetWorkItemsInput = z.input<typeof getWorkItemsInputSchema>;
|
|
117
|
+
export type DeleteWorkItemInput = z.input<typeof deleteWorkItemInputSchema>;
|
|
118
|
+
export type DeleteWorkItemsInput = z.input<typeof deleteWorkItemsInputSchema>;
|
|
119
|
+
export type WorkItemProjectionSpecContract = z.infer<typeof workItemProjectionSpecSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeDate: (value?: Date | string | null) => Date | null | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
2
|
+
import { type WorkItemFields } from "./work-item-field-value";
|
|
3
|
+
import { type WorkItemId } from "./work-item-id";
|
|
4
|
+
import type { WorkItemPlatform } from "./work-item-platform";
|
|
5
|
+
export type WorkItemEntityProps = {
|
|
6
|
+
id: WorkItemId;
|
|
7
|
+
projectId: UuidV7;
|
|
8
|
+
platform: WorkItemPlatform;
|
|
9
|
+
platformId?: string | null | undefined;
|
|
10
|
+
platformKey: string;
|
|
11
|
+
url?: string | null | undefined;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string | null | undefined;
|
|
14
|
+
sourceCreatedAt?: Date | string | null | undefined;
|
|
15
|
+
sourceUpdatedAt?: Date | string | null | undefined;
|
|
16
|
+
fields?: WorkItemFields | undefined;
|
|
17
|
+
createdAt?: Date | string | null | undefined;
|
|
18
|
+
updatedAt?: Date | string | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
export type CreateWorkItemProps = Omit<WorkItemEntityProps, "id" | "createdAt" | "updatedAt"> & {
|
|
21
|
+
id?: WorkItemId | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare class WorkItemEntity {
|
|
24
|
+
readonly id: WorkItemId;
|
|
25
|
+
readonly projectId: UuidV7;
|
|
26
|
+
readonly platform: WorkItemPlatform;
|
|
27
|
+
readonly platformId: string | null;
|
|
28
|
+
readonly platformKey: string;
|
|
29
|
+
readonly url: string | null;
|
|
30
|
+
readonly title: string;
|
|
31
|
+
readonly description: string | null;
|
|
32
|
+
readonly sourceCreatedAt: Date | null;
|
|
33
|
+
readonly sourceUpdatedAt: Date | null;
|
|
34
|
+
readonly fields: WorkItemFields;
|
|
35
|
+
readonly createdAt: Date | null | undefined;
|
|
36
|
+
readonly updatedAt: Date | null | undefined;
|
|
37
|
+
private constructor();
|
|
38
|
+
static create(props: CreateWorkItemProps): WorkItemEntity;
|
|
39
|
+
static rehydrate(props: WorkItemEntityProps): WorkItemEntity;
|
|
40
|
+
reingest(props: Omit<CreateWorkItemProps, "id">, now?: Date): WorkItemEntity;
|
|
41
|
+
toJSON(): {
|
|
42
|
+
id: WorkItemId;
|
|
43
|
+
projectId: UuidV7;
|
|
44
|
+
platform: "jira" | "github" | "linear" | "boboddy" | "custom";
|
|
45
|
+
platformId: string | null;
|
|
46
|
+
platformKey: string;
|
|
47
|
+
url: string | null;
|
|
48
|
+
title: string;
|
|
49
|
+
description: string | null;
|
|
50
|
+
sourceCreatedAt: Date | null;
|
|
51
|
+
sourceUpdatedAt: Date | null;
|
|
52
|
+
fields: {
|
|
53
|
+
[x: string]: import("../../../common/contracts/json").AnyJsonValue;
|
|
54
|
+
};
|
|
55
|
+
createdAt: Date | null | undefined;
|
|
56
|
+
updatedAt: Date | null | undefined;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type WorkItemId = string & {
|
|
2
|
+
readonly __brand: "WorkItemId";
|
|
3
|
+
};
|
|
4
|
+
export declare const isWorkItemId: (value: string) => value is WorkItemId;
|
|
5
|
+
export declare const parseWorkItemId: (value: string) => WorkItemId;
|
|
6
|
+
export declare const createWorkItemId: () => WorkItemId;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WorkItemId } from "./work-item-id";
|
|
2
|
+
export type WorkItemProjectionFingerprintProps = {
|
|
3
|
+
workItemId: WorkItemId;
|
|
4
|
+
specId: string;
|
|
5
|
+
fingerprint: string;
|
|
6
|
+
canonicalContent: string;
|
|
7
|
+
createdAt?: Date | string | null | undefined;
|
|
8
|
+
updatedAt?: Date | string | null | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare class WorkItemProjectionFingerprintEntity {
|
|
11
|
+
readonly workItemId: WorkItemId;
|
|
12
|
+
readonly specId: string;
|
|
13
|
+
readonly fingerprint: string;
|
|
14
|
+
readonly canonicalContent: string;
|
|
15
|
+
readonly createdAt: Date | null | undefined;
|
|
16
|
+
readonly updatedAt: Date | null | undefined;
|
|
17
|
+
constructor(props: WorkItemProjectionFingerprintProps);
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
+
import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
3
|
+
import { workItems } from "@boboddy/core/lib/db/schema";
|
|
4
|
+
import type { WorkItemRepo } from "../application/work-item-repo";
|
|
5
|
+
import { WorkItemEntity } from "../domain/work-item-entity";
|
|
6
|
+
import { type WorkItemId } from "../domain/work-item-id";
|
|
7
|
+
import type { WorkItemPlatform } from "../domain/work-item-platform";
|
|
8
|
+
export declare class DrizzleWorkItemRepo implements WorkItemRepo {
|
|
9
|
+
private toEntity;
|
|
10
|
+
load(id: WorkItemId, dbExecutor?: DbExecutor): Promise<WorkItemEntity | null>;
|
|
11
|
+
loadMany(ids: WorkItemId[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
12
|
+
loadByProjectId(projectId: UuidV7, dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
13
|
+
loadByPlatformIdentity(projectId: UuidV7, platform: typeof workItems.$inferSelect.platform, sourceIdentity: string, dbExecutor?: DbExecutor): Promise<WorkItemEntity | null>;
|
|
14
|
+
loadManyByPlatformIdentities(identities: {
|
|
15
|
+
projectId: UuidV7;
|
|
16
|
+
platform: WorkItemPlatform;
|
|
17
|
+
sourceIdentity: string;
|
|
18
|
+
}[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
19
|
+
save(workItem: WorkItemEntity, dbExecutor?: DbExecutor): Promise<WorkItemEntity>;
|
|
20
|
+
create(workItem: WorkItemEntity, dbExecutor?: DbExecutor): Promise<WorkItemEntity>;
|
|
21
|
+
createMany(workItemEntities: WorkItemEntity[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
22
|
+
saveMany(workItemEntities: WorkItemEntity[], dbExecutor?: DbExecutor): Promise<WorkItemEntity[]>;
|
|
23
|
+
delete(id: WorkItemId, dbExecutor?: DbExecutor): Promise<number>;
|
|
24
|
+
deleteMany(ids: WorkItemId[], dbExecutor?: DbExecutor): Promise<number>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ZodType } from "zod";
|
|
2
|
+
import type { OpenCodeMcpServers } from "@boboddy/core/common/contracts/opencode-mcp";
|
|
3
|
+
type SignalTypeStr = "string" | "number" | "boolean" | "object" | "array";
|
|
4
|
+
type DotPaths<T, D extends readonly unknown[] = []> = D["length"] extends 4 ? string : unknown extends T ? string : T extends readonly unknown[] ? string : T extends object ? {
|
|
5
|
+
[K in keyof T & string]: K | (NonNullable<T[K]> extends object ? `${K}.${DotPaths<NonNullable<T[K]>, [...D, unknown]> & string}` : never);
|
|
6
|
+
}[keyof T & string] : string;
|
|
7
|
+
type TypeAtPath<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof NonNullable<T> ? TypeAtPath<NonNullable<NonNullable<T>[K]>, Rest> : unknown : P extends keyof NonNullable<T> ? NonNullable<T>[P] : unknown;
|
|
8
|
+
type ToSignalType<T> = string extends T ? SignalTypeStr : [T] extends [string] ? "string" : [T] extends [number] ? "number" : [T] extends [boolean] ? "boolean" : [T] extends [readonly unknown[]] ? "array" : [T] extends [object] ? "object" : SignalTypeStr;
|
|
9
|
+
type SignalSpecInput<TOutput> = {
|
|
10
|
+
[P in DotPaths<TOutput>]: {
|
|
11
|
+
key?: string;
|
|
12
|
+
sourcePath: P;
|
|
13
|
+
type?: ToSignalType<TypeAtPath<TOutput, P>>;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
availableWhenResultStatusIn?: string[] | null;
|
|
16
|
+
};
|
|
17
|
+
}[DotPaths<TOutput>];
|
|
18
|
+
export type StepSignalSpec = {
|
|
19
|
+
key?: string;
|
|
20
|
+
sourcePath: string;
|
|
21
|
+
type: SignalTypeStr;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
availableWhenResultStatusIn?: string[] | null;
|
|
24
|
+
};
|
|
25
|
+
export type StepComputedSignalSpec = {
|
|
26
|
+
key: string;
|
|
27
|
+
type: "average" | "weighted_average" | "sum" | "min" | "max" | "custom";
|
|
28
|
+
inputSignalKeys: string[];
|
|
29
|
+
configJson?: Record<string, unknown> | null;
|
|
30
|
+
availableWhenResultStatusIn?: string[] | null;
|
|
31
|
+
};
|
|
32
|
+
export type DefineStepInput<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType> = {
|
|
33
|
+
key: string;
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string | null;
|
|
36
|
+
version?: number;
|
|
37
|
+
prompt?: string | null;
|
|
38
|
+
input?: TInput;
|
|
39
|
+
result?: TResult;
|
|
40
|
+
signals?: SignalSpecInput<TResult["_output"]>[];
|
|
41
|
+
computedSignals?: StepComputedSignalSpec[];
|
|
42
|
+
mcpServers?: OpenCodeMcpServers | null;
|
|
43
|
+
status?: "draft" | "active";
|
|
44
|
+
};
|
|
45
|
+
export type StepDefinitionSpec = {
|
|
46
|
+
key: string;
|
|
47
|
+
name: string;
|
|
48
|
+
description: string | null;
|
|
49
|
+
version: number;
|
|
50
|
+
kind: "user_defined";
|
|
51
|
+
status: "draft" | "active" | "archived";
|
|
52
|
+
prompt: string | null;
|
|
53
|
+
inputSchemaJson: Record<string, unknown> | null;
|
|
54
|
+
resultSchemaJson: Record<string, unknown> | null;
|
|
55
|
+
signalExtractorDefinitions: Array<{
|
|
56
|
+
key: string;
|
|
57
|
+
sourcePath: string;
|
|
58
|
+
type: SignalTypeStr;
|
|
59
|
+
required: boolean;
|
|
60
|
+
availableWhenResultStatusIn: string[] | null;
|
|
61
|
+
}>;
|
|
62
|
+
computedSignalDefinitions: Array<{
|
|
63
|
+
key: string;
|
|
64
|
+
type: "average" | "weighted_average" | "sum" | "min" | "max" | "custom";
|
|
65
|
+
inputSignalKeys: string[];
|
|
66
|
+
configJson: Record<string, unknown> | null;
|
|
67
|
+
availableWhenResultStatusIn: string[] | null;
|
|
68
|
+
}>;
|
|
69
|
+
opencodeMcpJson: OpenCodeMcpServers | null;
|
|
70
|
+
};
|
|
71
|
+
export declare function defineStep<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType>(config: DefineStepInput<TInput, TResult>): StepDefinitionSpec;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { App } from "@boboddy/api/app";
|
|
2
|
+
import type { CreateStepDefinitionInput, UpdateStepDefinitionInput } from "@boboddy/core/pipeline-definitions/step-definition/contracts/step-definition-contracts";
|
|
3
|
+
import { createBoboddyTreaty } from "./treaty";
|
|
4
|
+
type RequestOptions = {
|
|
5
|
+
headers?: Record<string, unknown> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare function createStepDefinitionsClient(baseUrlOrApp: string | App): ReturnType<typeof buildStepDefinitionsClient>;
|
|
8
|
+
declare const buildStepDefinitionsClient: (apiClient: ReturnType<typeof createBoboddyTreaty>) => {
|
|
9
|
+
listByProjectId: (projectId: string, options?: RequestOptions) => Promise<{
|
|
10
|
+
id: string & {
|
|
11
|
+
readonly __brand: "uuidv7";
|
|
12
|
+
};
|
|
13
|
+
projectId: string & {
|
|
14
|
+
readonly __brand: "uuidv7";
|
|
15
|
+
};
|
|
16
|
+
key: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string | null;
|
|
19
|
+
prompt: string | null;
|
|
20
|
+
version: number;
|
|
21
|
+
kind: "built_in" | "user_defined";
|
|
22
|
+
inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
23
|
+
resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
24
|
+
opencodeMcpJson: Record<string, {
|
|
25
|
+
type: "local";
|
|
26
|
+
command: string[];
|
|
27
|
+
environment?: Record<string, string> | undefined;
|
|
28
|
+
enabled?: boolean | undefined;
|
|
29
|
+
timeout?: number | undefined;
|
|
30
|
+
} | {
|
|
31
|
+
type: "remote";
|
|
32
|
+
url: string;
|
|
33
|
+
enabled?: boolean | undefined;
|
|
34
|
+
headers?: Record<string, string> | undefined;
|
|
35
|
+
oauth?: false | {
|
|
36
|
+
clientId?: string | undefined;
|
|
37
|
+
clientSecret?: string | undefined;
|
|
38
|
+
scope?: string | undefined;
|
|
39
|
+
redirectUri?: string | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
timeout?: number | undefined;
|
|
42
|
+
} | {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
}> | null;
|
|
45
|
+
status: "draft" | "active" | "archived";
|
|
46
|
+
signalExtractorDefinitions: {
|
|
47
|
+
id: string & {
|
|
48
|
+
readonly __brand: "uuidv7";
|
|
49
|
+
};
|
|
50
|
+
key: string;
|
|
51
|
+
sourcePath: string;
|
|
52
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
53
|
+
required: boolean;
|
|
54
|
+
availableWhenResultStatusIn: string[] | null;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
}[];
|
|
58
|
+
computedSignalDefinitions: {
|
|
59
|
+
id: string & {
|
|
60
|
+
readonly __brand: "uuidv7";
|
|
61
|
+
};
|
|
62
|
+
key: string;
|
|
63
|
+
type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
|
|
64
|
+
inputSignalKeys: string[];
|
|
65
|
+
configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
66
|
+
availableWhenResultStatusIn: string[] | null;
|
|
67
|
+
createdAt: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
}[];
|
|
70
|
+
createdAt: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
}[]>;
|
|
73
|
+
create: (body: CreateStepDefinitionInput, options?: RequestOptions) => Promise<{
|
|
74
|
+
id: string & {
|
|
75
|
+
readonly __brand: "uuidv7";
|
|
76
|
+
};
|
|
77
|
+
projectId: string & {
|
|
78
|
+
readonly __brand: "uuidv7";
|
|
79
|
+
};
|
|
80
|
+
key: string;
|
|
81
|
+
name: string;
|
|
82
|
+
description: string | null;
|
|
83
|
+
prompt: string | null;
|
|
84
|
+
version: number;
|
|
85
|
+
kind: "built_in" | "user_defined";
|
|
86
|
+
inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
87
|
+
resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
88
|
+
opencodeMcpJson: Record<string, {
|
|
89
|
+
type: "local";
|
|
90
|
+
command: string[];
|
|
91
|
+
environment?: Record<string, string> | undefined;
|
|
92
|
+
enabled?: boolean | undefined;
|
|
93
|
+
timeout?: number | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
type: "remote";
|
|
96
|
+
url: string;
|
|
97
|
+
enabled?: boolean | undefined;
|
|
98
|
+
headers?: Record<string, string> | undefined;
|
|
99
|
+
oauth?: false | {
|
|
100
|
+
clientId?: string | undefined;
|
|
101
|
+
clientSecret?: string | undefined;
|
|
102
|
+
scope?: string | undefined;
|
|
103
|
+
redirectUri?: string | undefined;
|
|
104
|
+
} | undefined;
|
|
105
|
+
timeout?: number | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
}> | null;
|
|
109
|
+
status: "draft" | "active" | "archived";
|
|
110
|
+
signalExtractorDefinitions: {
|
|
111
|
+
id: string & {
|
|
112
|
+
readonly __brand: "uuidv7";
|
|
113
|
+
};
|
|
114
|
+
key: string;
|
|
115
|
+
sourcePath: string;
|
|
116
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
117
|
+
required: boolean;
|
|
118
|
+
availableWhenResultStatusIn: string[] | null;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
}[];
|
|
122
|
+
computedSignalDefinitions: {
|
|
123
|
+
id: string & {
|
|
124
|
+
readonly __brand: "uuidv7";
|
|
125
|
+
};
|
|
126
|
+
key: string;
|
|
127
|
+
type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
|
|
128
|
+
inputSignalKeys: string[];
|
|
129
|
+
configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
130
|
+
availableWhenResultStatusIn: string[] | null;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
}[];
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
}>;
|
|
137
|
+
update: (stepDefinitionId: string, body: UpdateStepDefinitionInput, options?: RequestOptions) => Promise<{
|
|
138
|
+
id: string & {
|
|
139
|
+
readonly __brand: "uuidv7";
|
|
140
|
+
};
|
|
141
|
+
projectId: string & {
|
|
142
|
+
readonly __brand: "uuidv7";
|
|
143
|
+
};
|
|
144
|
+
key: string;
|
|
145
|
+
name: string;
|
|
146
|
+
description: string | null;
|
|
147
|
+
prompt: string | null;
|
|
148
|
+
version: number;
|
|
149
|
+
kind: "built_in" | "user_defined";
|
|
150
|
+
inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
151
|
+
resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
152
|
+
opencodeMcpJson: Record<string, {
|
|
153
|
+
type: "local";
|
|
154
|
+
command: string[];
|
|
155
|
+
environment?: Record<string, string> | undefined;
|
|
156
|
+
enabled?: boolean | undefined;
|
|
157
|
+
timeout?: number | undefined;
|
|
158
|
+
} | {
|
|
159
|
+
type: "remote";
|
|
160
|
+
url: string;
|
|
161
|
+
enabled?: boolean | undefined;
|
|
162
|
+
headers?: Record<string, string> | undefined;
|
|
163
|
+
oauth?: false | {
|
|
164
|
+
clientId?: string | undefined;
|
|
165
|
+
clientSecret?: string | undefined;
|
|
166
|
+
scope?: string | undefined;
|
|
167
|
+
redirectUri?: string | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
timeout?: number | undefined;
|
|
170
|
+
} | {
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
}> | null;
|
|
173
|
+
status: "draft" | "active" | "archived";
|
|
174
|
+
signalExtractorDefinitions: {
|
|
175
|
+
id: string & {
|
|
176
|
+
readonly __brand: "uuidv7";
|
|
177
|
+
};
|
|
178
|
+
key: string;
|
|
179
|
+
sourcePath: string;
|
|
180
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
181
|
+
required: boolean;
|
|
182
|
+
availableWhenResultStatusIn: string[] | null;
|
|
183
|
+
createdAt: string;
|
|
184
|
+
updatedAt: string;
|
|
185
|
+
}[];
|
|
186
|
+
computedSignalDefinitions: {
|
|
187
|
+
id: string & {
|
|
188
|
+
readonly __brand: "uuidv7";
|
|
189
|
+
};
|
|
190
|
+
key: string;
|
|
191
|
+
type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
|
|
192
|
+
inputSignalKeys: string[];
|
|
193
|
+
configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
|
|
194
|
+
availableWhenResultStatusIn: string[] | null;
|
|
195
|
+
createdAt: string;
|
|
196
|
+
updatedAt: string;
|
|
197
|
+
}[];
|
|
198
|
+
createdAt: string;
|
|
199
|
+
updatedAt: string;
|
|
200
|
+
}>;
|
|
201
|
+
};
|
|
202
|
+
export {};
|
|
@@ -13,6 +13,7 @@ declare const buildStepExecutionPlaneClient: (apiClient: ReturnType<typeof creat
|
|
|
13
13
|
workerId: string;
|
|
14
14
|
batchSize: number;
|
|
15
15
|
leaseDurationSeconds: number;
|
|
16
|
+
workItemId?: string | undefined;
|
|
16
17
|
}, options?: RequestOptions) => Promise<{
|
|
17
18
|
stepExecution: {
|
|
18
19
|
id: string & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@boboddy/sdk",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8-alpha",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
"./treaty": {
|
|
16
16
|
"import": "./dist/treaty.js",
|
|
17
17
|
"types": "./dist/treaty.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./define-step": {
|
|
20
|
+
"bun": "./src/define-step.ts",
|
|
21
|
+
"import": "./dist/define-step.js",
|
|
22
|
+
"types": "./dist/define-step.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./step-definitions-client": {
|
|
25
|
+
"import": "./dist/step-definitions-client.js",
|
|
26
|
+
"types": "./dist/step-definitions-client.d.ts"
|
|
18
27
|
}
|
|
19
28
|
},
|
|
20
29
|
"files": [
|
|
@@ -26,13 +35,19 @@
|
|
|
26
35
|
},
|
|
27
36
|
"scripts": {
|
|
28
37
|
"build": "bun run script/build.ts",
|
|
38
|
+
"test": "bun test test",
|
|
29
39
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
30
40
|
},
|
|
31
41
|
"dependencies": {
|
|
42
|
+
"@boboddy/core": "workspace:*",
|
|
32
43
|
"@elysiajs/eden": "^1.4.9"
|
|
33
44
|
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"zod": ">=4.0.0"
|
|
47
|
+
},
|
|
34
48
|
"devDependencies": {
|
|
35
49
|
"@hey-api/openapi-ts": "^0.90.10",
|
|
36
|
-
"bun-types": "^1.3.12"
|
|
50
|
+
"bun-types": "^1.3.12",
|
|
51
|
+
"zod": "^4.3.6"
|
|
37
52
|
}
|
|
38
53
|
}
|