@canhta/dsh-autopilot 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +41 -0
- package/CONTEXT.md +39 -0
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/cordis.patch.yml +13 -0
- package/deploy/dsh-autopilot.service +26 -0
- package/docs/CONTRIBUTING.md +60 -0
- package/docs/README.md +34 -0
- package/docs/agents/domain.md +7 -0
- package/docs/agents/issue-tracker.md +21 -0
- package/docs/agents/triage-labels.md +13 -0
- package/docs/assets/banner.png +0 -0
- package/docs/deployment.md +138 -0
- package/docs/engineering.md +43 -0
- package/docs/specs/execution.md +65 -0
- package/docs/specs/integrations.md +89 -0
- package/docs/specs/lifecycle.md +81 -0
- package/docs/specs/operations.md +89 -0
- package/docs/specs/plugin.md +49 -0
- package/docs/specs/providers.md +62 -0
- package/docs/specs/scope.md +35 -0
- package/docs/specs/ui-components.md +96 -0
- package/docs/specs/web-ui.md +64 -0
- package/lib/admission/cancellation-control.d.ts +11 -0
- package/lib/admission/cancellation-control.js +72 -0
- package/lib/admission/cancellation-control.js.map +1 -0
- package/lib/admission/candidates.d.ts +2 -0
- package/lib/admission/candidates.js +23 -0
- package/lib/admission/candidates.js.map +1 -0
- package/lib/admission/composition-claim.d.ts +10 -0
- package/lib/admission/composition-claim.js +13 -0
- package/lib/admission/composition-claim.js.map +1 -0
- package/lib/admission/constants.d.ts +12 -0
- package/lib/admission/constants.js +13 -0
- package/lib/admission/constants.js.map +1 -0
- package/lib/admission/deliveries.d.ts +6 -0
- package/lib/admission/deliveries.js +175 -0
- package/lib/admission/deliveries.js.map +1 -0
- package/lib/admission/delivery-control.d.ts +28 -0
- package/lib/admission/delivery-control.js +294 -0
- package/lib/admission/delivery-control.js.map +1 -0
- package/lib/admission/execution-control.d.ts +29 -0
- package/lib/admission/execution-control.js +177 -0
- package/lib/admission/execution-control.js.map +1 -0
- package/lib/admission/index.d.ts +4 -0
- package/lib/admission/index.js +4 -0
- package/lib/admission/index.js.map +1 -0
- package/lib/admission/model.d.ts +296 -0
- package/lib/admission/model.js +13 -0
- package/lib/admission/model.js.map +1 -0
- package/lib/admission/pause-control.d.ts +44 -0
- package/lib/admission/pause-control.js +220 -0
- package/lib/admission/pause-control.js.map +1 -0
- package/lib/admission/policy.d.ts +39 -0
- package/lib/admission/policy.js +238 -0
- package/lib/admission/policy.js.map +1 -0
- package/lib/admission/ports.d.ts +13 -0
- package/lib/admission/ports.js +2 -0
- package/lib/admission/ports.js.map +1 -0
- package/lib/admission/publication-control.d.ts +16 -0
- package/lib/admission/publication-control.js +153 -0
- package/lib/admission/publication-control.js.map +1 -0
- package/lib/admission/reconciler.d.ts +7 -0
- package/lib/admission/reconciler.js +121 -0
- package/lib/admission/reconciler.js.map +1 -0
- package/lib/admission/resume-control.d.ts +27 -0
- package/lib/admission/resume-control.js +213 -0
- package/lib/admission/resume-control.js.map +1 -0
- package/lib/admission/run-fence.d.ts +11 -0
- package/lib/admission/run-fence.js +49 -0
- package/lib/admission/run-fence.js.map +1 -0
- package/lib/admission/service.d.ts +130 -0
- package/lib/admission/service.js +415 -0
- package/lib/admission/service.js.map +1 -0
- package/lib/admission/state-domain.d.ts +11 -0
- package/lib/admission/state-domain.js +33 -0
- package/lib/admission/state-domain.js.map +1 -0
- package/lib/admission/state-integrity.d.ts +19 -0
- package/lib/admission/state-integrity.js +102 -0
- package/lib/admission/state-integrity.js.map +1 -0
- package/lib/admission/state-migration.d.ts +4 -0
- package/lib/admission/state-migration.js +46 -0
- package/lib/admission/state-migration.js.map +1 -0
- package/lib/admission/state.d.ts +4524 -0
- package/lib/admission/state.js +394 -0
- package/lib/admission/state.js.map +1 -0
- package/lib/admission.d.ts +1 -0
- package/lib/admission.js +2 -0
- package/lib/admission.js.map +1 -0
- package/lib/client-types/client/OperationsAtoms.d.ts +30 -0
- package/lib/client-types/client/OperationsPanel.d.ts +34 -0
- package/lib/client-types/client/RunsView.d.ts +14 -0
- package/lib/client-types/client/SettingsCapabilitySections.d.ts +16 -0
- package/lib/client-types/client/SettingsPanel.d.ts +40 -0
- package/lib/client-types/client/SettingsPolicySections.d.ts +13 -0
- package/lib/client-types/client/SettingsProviderSection.d.ts +21 -0
- package/lib/client-types/client/SummaryView.d.ts +10 -0
- package/lib/client-types/client/WorktreesView.d.ts +9 -0
- package/lib/client-types/client/index.d.ts +9 -0
- package/lib/client-types/client/locales/en.d.ts +154 -0
- package/lib/client-types/client/locales/index.d.ts +9 -0
- package/lib/client-types/client/locales/zh.d.ts +155 -0
- package/lib/client-types/client/settings-draft.d.ts +29 -0
- package/lib/client-types/client/state.d.ts +63 -0
- package/lib/client-types/code-host/index.d.ts +2 -0
- package/lib/client-types/code-host/model.d.ts +118 -0
- package/lib/client-types/code-host/registry.d.ts +23 -0
- package/lib/client-types/code-host/validation.d.ts +51 -0
- package/lib/client-types/code-host.d.ts +2 -0
- package/lib/client-types/config/index.d.ts +2 -0
- package/lib/client-types/config/settings.d.ts +51 -0
- package/lib/client-types/config.d.ts +2 -0
- package/lib/client-types/notification/index.d.ts +2 -0
- package/lib/client-types/notification/model.d.ts +57 -0
- package/lib/client-types/notification/registry.d.ts +16 -0
- package/lib/client-types/notification.d.ts +2 -0
- package/lib/client-types/providers/generation-registry.d.ts +20 -0
- package/lib/client-types/remote.d.ts +65 -0
- package/lib/client-types/tracker/index.d.ts +2 -0
- package/lib/client-types/tracker/model.d.ts +222 -0
- package/lib/client-types/tracker/registry.d.ts +49 -0
- package/lib/client-types/tracker/validation.d.ts +60 -0
- package/lib/client-types/tracker.d.ts +2 -0
- package/lib/client-types/web/contract.d.ts +958 -0
- package/lib/client.js +7961 -0
- package/lib/client.js.map +1 -0
- package/lib/code-host/index.d.ts +2 -0
- package/lib/code-host/index.js +3 -0
- package/lib/code-host/index.js.map +1 -0
- package/lib/code-host/model.d.ts +118 -0
- package/lib/code-host/model.js +23 -0
- package/lib/code-host/model.js.map +1 -0
- package/lib/code-host/registry.d.ts +23 -0
- package/lib/code-host/registry.js +90 -0
- package/lib/code-host/registry.js.map +1 -0
- package/lib/code-host/validation.d.ts +51 -0
- package/lib/code-host/validation.js +30 -0
- package/lib/code-host/validation.js.map +1 -0
- package/lib/code-host.d.ts +2 -0
- package/lib/code-host.js +3 -0
- package/lib/code-host.js.map +1 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.js +3 -0
- package/lib/config/index.js.map +1 -0
- package/lib/config/settings.d.ts +51 -0
- package/lib/config/settings.js +195 -0
- package/lib/config/settings.js.map +1 -0
- package/lib/config.d.ts +2 -0
- package/lib/config.js +3 -0
- package/lib/config.js.map +1 -0
- package/lib/delivery/index.d.ts +1 -0
- package/lib/delivery/index.js +2 -0
- package/lib/delivery/index.js.map +1 -0
- package/lib/delivery/service.d.ts +29 -0
- package/lib/delivery/service.js +140 -0
- package/lib/delivery/service.js.map +1 -0
- package/lib/delivery.d.ts +2 -0
- package/lib/delivery.js +3 -0
- package/lib/delivery.js.map +1 -0
- package/lib/dispatch/composition.d.ts +18 -0
- package/lib/dispatch/composition.js +109 -0
- package/lib/dispatch/composition.js.map +1 -0
- package/lib/dispatch/contract.d.ts +2 -0
- package/lib/dispatch/contract.js +2 -0
- package/lib/dispatch/contract.js.map +1 -0
- package/lib/dispatch/execute.d.ts +10 -0
- package/lib/dispatch/execute.js +138 -0
- package/lib/dispatch/execute.js.map +1 -0
- package/lib/dispatch/execution-state.d.ts +12 -0
- package/lib/dispatch/execution-state.js +24 -0
- package/lib/dispatch/execution-state.js.map +1 -0
- package/lib/dispatch/git.d.ts +5 -0
- package/lib/dispatch/git.js +95 -0
- package/lib/dispatch/git.js.map +1 -0
- package/lib/dispatch/index.d.ts +2 -0
- package/lib/dispatch/index.js +2 -0
- package/lib/dispatch/index.js.map +1 -0
- package/lib/dispatch/report.d.ts +11 -0
- package/lib/dispatch/report.js +141 -0
- package/lib/dispatch/report.js.map +1 -0
- package/lib/dispatch/resume.d.ts +17 -0
- package/lib/dispatch/resume.js +89 -0
- package/lib/dispatch/resume.js.map +1 -0
- package/lib/dispatch/service.d.ts +56 -0
- package/lib/dispatch/service.js +231 -0
- package/lib/dispatch/service.js.map +1 -0
- package/lib/dispatch/usage.d.ts +10 -0
- package/lib/dispatch/usage.js +47 -0
- package/lib/dispatch/usage.js.map +1 -0
- package/lib/dispatch.d.ts +2 -0
- package/lib/dispatch.js +3 -0
- package/lib/dispatch.js.map +1 -0
- package/lib/github-code-host.d.ts +1 -0
- package/lib/github-code-host.js +2 -0
- package/lib/github-code-host.js.map +1 -0
- package/lib/github-issues.d.ts +1 -0
- package/lib/github-issues.js +2 -0
- package/lib/github-issues.js.map +1 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.js +48 -0
- package/lib/index.js.map +1 -0
- package/lib/ingress.d.ts +2 -0
- package/lib/ingress.js +3 -0
- package/lib/ingress.js.map +1 -0
- package/lib/jira.d.ts +1 -0
- package/lib/jira.js +2 -0
- package/lib/jira.js.map +1 -0
- package/lib/mcp/contracts.d.ts +21 -0
- package/lib/mcp/contracts.js +33 -0
- package/lib/mcp/contracts.js.map +1 -0
- package/lib/mcp/cursor.d.ts +10 -0
- package/lib/mcp/cursor.js +68 -0
- package/lib/mcp/cursor.js.map +1 -0
- package/lib/mcp/definition.d.ts +8 -0
- package/lib/mcp/definition.js +43 -0
- package/lib/mcp/definition.js.map +1 -0
- package/lib/mcp/index.d.ts +6 -0
- package/lib/mcp/index.js +7 -0
- package/lib/mcp/index.js.map +1 -0
- package/lib/mcp/json.d.ts +4 -0
- package/lib/mcp/json.js +20 -0
- package/lib/mcp/json.js.map +1 -0
- package/lib/mcp/mount.d.ts +17 -0
- package/lib/mcp/mount.js +79 -0
- package/lib/mcp/mount.js.map +1 -0
- package/lib/mcp/read-tools.d.ts +27 -0
- package/lib/mcp/read-tools.js +149 -0
- package/lib/mcp/read-tools.js.map +1 -0
- package/lib/notification/index.d.ts +2 -0
- package/lib/notification/index.js +3 -0
- package/lib/notification/index.js.map +1 -0
- package/lib/notification/model.d.ts +57 -0
- package/lib/notification/model.js +20 -0
- package/lib/notification/model.js.map +1 -0
- package/lib/notification/registry.d.ts +16 -0
- package/lib/notification/registry.js +67 -0
- package/lib/notification/registry.js.map +1 -0
- package/lib/notification.d.ts +2 -0
- package/lib/notification.js +3 -0
- package/lib/notification.js.map +1 -0
- package/lib/ntfy-notification.d.ts +1 -0
- package/lib/ntfy-notification.js +2 -0
- package/lib/ntfy-notification.js.map +1 -0
- package/lib/operations/cleanup-inspector.d.ts +16 -0
- package/lib/operations/cleanup-inspector.js +132 -0
- package/lib/operations/cleanup-inspector.js.map +1 -0
- package/lib/operations/cleanup.d.ts +25 -0
- package/lib/operations/cleanup.js +151 -0
- package/lib/operations/cleanup.js.map +1 -0
- package/lib/operations/disposition.d.ts +46 -0
- package/lib/operations/disposition.js +89 -0
- package/lib/operations/disposition.js.map +1 -0
- package/lib/operations/health.d.ts +6 -0
- package/lib/operations/health.js +41 -0
- package/lib/operations/health.js.map +1 -0
- package/lib/operations/index.d.ts +6 -0
- package/lib/operations/index.js +7 -0
- package/lib/operations/index.js.map +1 -0
- package/lib/operations/inspection.d.ts +35 -0
- package/lib/operations/inspection.js +183 -0
- package/lib/operations/inspection.js.map +1 -0
- package/lib/operations/model.d.ts +77 -0
- package/lib/operations/model.js +2 -0
- package/lib/operations/model.js.map +1 -0
- package/lib/operations/recovery.d.ts +11 -0
- package/lib/operations/recovery.js +101 -0
- package/lib/operations/recovery.js.map +1 -0
- package/lib/operations/retention.d.ts +28 -0
- package/lib/operations/retention.js +105 -0
- package/lib/operations/retention.js.map +1 -0
- package/lib/operations/runtime-owner.d.ts +54 -0
- package/lib/operations/runtime-owner.js +281 -0
- package/lib/operations/runtime-owner.js.map +1 -0
- package/lib/operations/service.d.ts +55 -0
- package/lib/operations/service.js +154 -0
- package/lib/operations/service.js.map +1 -0
- package/lib/operations/state.d.ts +79 -0
- package/lib/operations/state.js +51 -0
- package/lib/operations/state.js.map +1 -0
- package/lib/operations/storage-composition.d.ts +16 -0
- package/lib/operations/storage-composition.js +61 -0
- package/lib/operations/storage-composition.js.map +1 -0
- package/lib/operations/store.d.ts +16 -0
- package/lib/operations/store.js +84 -0
- package/lib/operations/store.js.map +1 -0
- package/lib/operations.d.ts +2 -0
- package/lib/operations.js +3 -0
- package/lib/operations.js.map +1 -0
- package/lib/providers/generation-registry.d.ts +20 -0
- package/lib/providers/generation-registry.js +72 -0
- package/lib/providers/generation-registry.js.map +1 -0
- package/lib/providers/github-code-host/contracts.d.ts +224 -0
- package/lib/providers/github-code-host/contracts.js +144 -0
- package/lib/providers/github-code-host/contracts.js.map +1 -0
- package/lib/providers/github-code-host/index.d.ts +2 -0
- package/lib/providers/github-code-host/index.js +2 -0
- package/lib/providers/github-code-host/index.js.map +1 -0
- package/lib/providers/github-code-host/provider.d.ts +5 -0
- package/lib/providers/github-code-host/provider.js +289 -0
- package/lib/providers/github-code-host/provider.js.map +1 -0
- package/lib/providers/github-code-host/schemas.d.ts +81 -0
- package/lib/providers/github-code-host/schemas.js +39 -0
- package/lib/providers/github-code-host/schemas.js.map +1 -0
- package/lib/providers/github-code-host/settings.d.ts +16 -0
- package/lib/providers/github-code-host/settings.js +65 -0
- package/lib/providers/github-code-host/settings.js.map +1 -0
- package/lib/providers/github-issues/contracts.d.ts +151 -0
- package/lib/providers/github-issues/contracts.js +141 -0
- package/lib/providers/github-issues/contracts.js.map +1 -0
- package/lib/providers/github-issues/index.d.ts +1 -0
- package/lib/providers/github-issues/index.js +2 -0
- package/lib/providers/github-issues/index.js.map +1 -0
- package/lib/providers/github-issues/ingress.d.ts +8 -0
- package/lib/providers/github-issues/ingress.js +80 -0
- package/lib/providers/github-issues/ingress.js.map +1 -0
- package/lib/providers/github-issues/normalization.d.ts +11 -0
- package/lib/providers/github-issues/normalization.js +115 -0
- package/lib/providers/github-issues/normalization.js.map +1 -0
- package/lib/providers/github-issues/provider.d.ts +6 -0
- package/lib/providers/github-issues/provider.js +235 -0
- package/lib/providers/github-issues/provider.js.map +1 -0
- package/lib/providers/github-issues/schemas.d.ts +123 -0
- package/lib/providers/github-issues/schemas.js +58 -0
- package/lib/providers/github-issues/schemas.js.map +1 -0
- package/lib/providers/github-issues/settings.d.ts +27 -0
- package/lib/providers/github-issues/settings.js +154 -0
- package/lib/providers/github-issues/settings.js.map +1 -0
- package/lib/providers/jira/contracts.d.ts +193 -0
- package/lib/providers/jira/contracts.js +133 -0
- package/lib/providers/jira/contracts.js.map +1 -0
- package/lib/providers/jira/index.d.ts +1 -0
- package/lib/providers/jira/index.js +2 -0
- package/lib/providers/jira/index.js.map +1 -0
- package/lib/providers/jira/ingress.d.ts +4 -0
- package/lib/providers/jira/ingress.js +60 -0
- package/lib/providers/jira/ingress.js.map +1 -0
- package/lib/providers/jira/normalization.d.ts +8 -0
- package/lib/providers/jira/normalization.js +121 -0
- package/lib/providers/jira/normalization.js.map +1 -0
- package/lib/providers/jira/provider.d.ts +6 -0
- package/lib/providers/jira/provider.js +317 -0
- package/lib/providers/jira/provider.js.map +1 -0
- package/lib/providers/jira/schemas.d.ts +134 -0
- package/lib/providers/jira/schemas.js +76 -0
- package/lib/providers/jira/schemas.js.map +1 -0
- package/lib/providers/jira/settings.d.ts +32 -0
- package/lib/providers/jira/settings.js +163 -0
- package/lib/providers/jira/settings.js.map +1 -0
- package/lib/providers/notification-http.d.ts +13 -0
- package/lib/providers/notification-http.js +136 -0
- package/lib/providers/notification-http.js.map +1 -0
- package/lib/providers/ntfy-notification/index.d.ts +2 -0
- package/lib/providers/ntfy-notification/index.js +2 -0
- package/lib/providers/ntfy-notification/index.js.map +1 -0
- package/lib/providers/ntfy-notification/provider.d.ts +4 -0
- package/lib/providers/ntfy-notification/provider.js +89 -0
- package/lib/providers/ntfy-notification/provider.js.map +1 -0
- package/lib/providers/ntfy-notification/settings.d.ts +12 -0
- package/lib/providers/ntfy-notification/settings.js +34 -0
- package/lib/providers/ntfy-notification/settings.js.map +1 -0
- package/lib/providers/webhook-notification/index.d.ts +2 -0
- package/lib/providers/webhook-notification/index.js +2 -0
- package/lib/providers/webhook-notification/index.js.map +1 -0
- package/lib/providers/webhook-notification/provider.d.ts +4 -0
- package/lib/providers/webhook-notification/provider.js +57 -0
- package/lib/providers/webhook-notification/provider.js.map +1 -0
- package/lib/providers/webhook-notification/settings.d.ts +11 -0
- package/lib/providers/webhook-notification/settings.js +31 -0
- package/lib/providers/webhook-notification/settings.js.map +1 -0
- package/lib/publication/git.d.ts +7 -0
- package/lib/publication/git.js +154 -0
- package/lib/publication/git.js.map +1 -0
- package/lib/publication/index.d.ts +1 -0
- package/lib/publication/index.js +2 -0
- package/lib/publication/index.js.map +1 -0
- package/lib/publication/service.d.ts +27 -0
- package/lib/publication/service.js +166 -0
- package/lib/publication/service.js.map +1 -0
- package/lib/publication.d.ts +2 -0
- package/lib/publication.js +3 -0
- package/lib/publication.js.map +1 -0
- package/lib/reconciliation/index.d.ts +3 -0
- package/lib/reconciliation/index.js +4 -0
- package/lib/reconciliation/index.js.map +1 -0
- package/lib/reconciliation/ingress.d.ts +21 -0
- package/lib/reconciliation/ingress.js +168 -0
- package/lib/reconciliation/ingress.js.map +1 -0
- package/lib/reconciliation/service.d.ts +75 -0
- package/lib/reconciliation/service.js +228 -0
- package/lib/reconciliation/service.js.map +1 -0
- package/lib/reconciliation.d.ts +2 -0
- package/lib/reconciliation.js +3 -0
- package/lib/reconciliation.js.map +1 -0
- package/lib/remote.d.ts +65 -0
- package/lib/remote.js +135 -0
- package/lib/remote.js.map +1 -0
- package/lib/tracker/index.d.ts +2 -0
- package/lib/tracker/index.js +3 -0
- package/lib/tracker/index.js.map +1 -0
- package/lib/tracker/model.d.ts +222 -0
- package/lib/tracker/model.js +66 -0
- package/lib/tracker/model.js.map +1 -0
- package/lib/tracker/registry.d.ts +49 -0
- package/lib/tracker/registry.js +213 -0
- package/lib/tracker/registry.js.map +1 -0
- package/lib/tracker/validation.d.ts +60 -0
- package/lib/tracker/validation.js +52 -0
- package/lib/tracker/validation.js.map +1 -0
- package/lib/tracker.d.ts +2 -0
- package/lib/tracker.js +3 -0
- package/lib/tracker.js.map +1 -0
- package/lib/typert.d.ts +1 -0
- package/lib/typert.js +2 -0
- package/lib/typert.js.map +1 -0
- package/lib/web/commands.d.ts +18 -0
- package/lib/web/commands.js +231 -0
- package/lib/web/commands.js.map +1 -0
- package/lib/web/contract.d.ts +958 -0
- package/lib/web/contract.js +230 -0
- package/lib/web/contract.js.map +1 -0
- package/lib/web/contributions.d.ts +41 -0
- package/lib/web/contributions.js +61 -0
- package/lib/web/contributions.js.map +1 -0
- package/lib/web/integrations.d.ts +13 -0
- package/lib/web/integrations.js +95 -0
- package/lib/web/integrations.js.map +1 -0
- package/lib/web/projection.d.ts +10 -0
- package/lib/web/projection.js +192 -0
- package/lib/web/projection.js.map +1 -0
- package/lib/web/service.d.ts +31 -0
- package/lib/web/service.js +141 -0
- package/lib/web/service.js.map +1 -0
- package/lib/web.d.ts +5 -0
- package/lib/web.js +6 -0
- package/lib/web.js.map +1 -0
- package/lib/webhook-notification.d.ts +1 -0
- package/lib/webhook-notification.js +2 -0
- package/lib/webhook-notification.js.map +1 -0
- package/lib/workflow/index.d.ts +1 -0
- package/lib/workflow/index.js +2 -0
- package/lib/workflow/index.js.map +1 -0
- package/lib/workflow/service.d.ts +31 -0
- package/lib/workflow/service.js +220 -0
- package/lib/workflow/service.js.map +1 -0
- package/lib/workflow.d.ts +2 -0
- package/lib/workflow.js +3 -0
- package/lib/workflow.js.map +1 -0
- package/package.json +276 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
declare const trackerProviderIdBrand: unique symbol;
|
|
2
|
+
declare const trackerBindingIdBrand: unique symbol;
|
|
3
|
+
declare const trackerIssueIdBrand: unique symbol;
|
|
4
|
+
declare const trackerCommentIdBrand: unique symbol;
|
|
5
|
+
declare const readinessGenerationBrand: unique symbol;
|
|
6
|
+
/** Validated stable identity of one tracker provider implementation. */
|
|
7
|
+
export type TrackerProviderId = string & {
|
|
8
|
+
readonly [trackerProviderIdBrand]: true;
|
|
9
|
+
};
|
|
10
|
+
/** Validated identity of the configured project or workspace binding that supplied an issue. */
|
|
11
|
+
export type TrackerBindingId = string & {
|
|
12
|
+
readonly [trackerBindingIdBrand]: true;
|
|
13
|
+
};
|
|
14
|
+
/** Validated provider-native issue identity, independent of its display key. */
|
|
15
|
+
export type TrackerIssueId = string & {
|
|
16
|
+
readonly [trackerIssueIdBrand]: true;
|
|
17
|
+
};
|
|
18
|
+
/** Validated provider-native comment identity. */
|
|
19
|
+
export type TrackerCommentId = string & {
|
|
20
|
+
readonly [trackerCommentIdBrand]: true;
|
|
21
|
+
};
|
|
22
|
+
/** Validated identity of the human readiness transition authorizing one run. */
|
|
23
|
+
export type ReadinessGeneration = string & {
|
|
24
|
+
readonly [readinessGenerationBrand]: true;
|
|
25
|
+
};
|
|
26
|
+
/** Validate and brand a provider id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
27
|
+
export declare const trackerProviderId: (value: string) => TrackerProviderId;
|
|
28
|
+
/** Validate and brand a binding id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
29
|
+
export declare const trackerBindingId: (value: string) => TrackerBindingId;
|
|
30
|
+
/** Validate and brand an issue id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
31
|
+
export declare const trackerIssueId: (value: string) => TrackerIssueId;
|
|
32
|
+
/** Validate and brand a comment id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
33
|
+
export declare const trackerCommentId: (value: string) => TrackerCommentId;
|
|
34
|
+
/**
|
|
35
|
+
* Validate and brand a readiness-generation id; throws `TypeError` for an invalid external value and has no
|
|
36
|
+
* cancellation point.
|
|
37
|
+
*/
|
|
38
|
+
export declare const readinessGeneration: (value: string) => ReadinessGeneration;
|
|
39
|
+
/** Exact provider contract version accepted by this build. */
|
|
40
|
+
export declare const TRACKER_INTERFACE_VERSION: 2;
|
|
41
|
+
/** Capabilities every provider generation must implement before registration succeeds. */
|
|
42
|
+
export declare const trackerCapabilities: readonly ['candidates', 'comments', 'dependencies', 'readiness', 'ingress'];
|
|
43
|
+
/** Capability name declared by a compatible provider generation. */
|
|
44
|
+
export type TrackerCapability = (typeof trackerCapabilities)[number];
|
|
45
|
+
export declare const trackerWriteCapabilities: readonly ['reports', 'projections'];
|
|
46
|
+
export type TrackerWriteCapability = (typeof trackerWriteCapabilities)[number];
|
|
47
|
+
/** Immutable comment data used to select and retain the Agent Brief. */
|
|
48
|
+
export interface TrackerComment {
|
|
49
|
+
id: TrackerCommentId;
|
|
50
|
+
authorId: string;
|
|
51
|
+
body: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
}
|
|
54
|
+
/** Current completion observation for an issue that blocks a candidate. */
|
|
55
|
+
export interface TrackerDependency {
|
|
56
|
+
issueId: TrackerIssueId;
|
|
57
|
+
displayKey: string;
|
|
58
|
+
state: 'completed' | 'not-completed' | 'unknown';
|
|
59
|
+
}
|
|
60
|
+
/** Human readiness evidence, or its explicit absence, at the time of the provider read. */
|
|
61
|
+
export type TrackerReadiness = {
|
|
62
|
+
kind: 'absent';
|
|
63
|
+
} | {
|
|
64
|
+
kind: 'transition';
|
|
65
|
+
generation: ReadinessGeneration;
|
|
66
|
+
actorId: string;
|
|
67
|
+
actorKind: 'human' | 'automation' | 'unknown';
|
|
68
|
+
occurredAt: string;
|
|
69
|
+
};
|
|
70
|
+
/** Complete, bounded issue projection consumed by admission policy. */
|
|
71
|
+
export interface TrackerIssueSnapshot {
|
|
72
|
+
bindingId: TrackerBindingId;
|
|
73
|
+
issueId: TrackerIssueId;
|
|
74
|
+
displayKey: string;
|
|
75
|
+
summary: string;
|
|
76
|
+
priorityRank: number;
|
|
77
|
+
isReady: boolean;
|
|
78
|
+
labels: readonly string[];
|
|
79
|
+
comments: readonly TrackerComment[];
|
|
80
|
+
dependencies: readonly TrackerDependency[];
|
|
81
|
+
readiness: TrackerReadiness;
|
|
82
|
+
}
|
|
83
|
+
/** One validated provider page and its opaque continuation cursor. */
|
|
84
|
+
export interface TrackerCandidatePage {
|
|
85
|
+
issues: readonly TrackerIssueSnapshot[];
|
|
86
|
+
nextCursor?: string;
|
|
87
|
+
}
|
|
88
|
+
/** Generation- and caller-cancellable input supplied to a provider candidate read. */
|
|
89
|
+
export interface TrackerReadRequest {
|
|
90
|
+
/** Aborts when either the provider generation is withdrawn or the calling operation is cancelled. */
|
|
91
|
+
signal: AbortSignal;
|
|
92
|
+
cursor?: string;
|
|
93
|
+
}
|
|
94
|
+
/** One raw ingress header; repeated names remain separate entries. */
|
|
95
|
+
export interface TrackerIngressHeader {
|
|
96
|
+
name: string;
|
|
97
|
+
value: string;
|
|
98
|
+
}
|
|
99
|
+
/** Detached, bounded HTTP input passed from the Host adapter to the selected provider. */
|
|
100
|
+
export interface TrackerIngressRequest {
|
|
101
|
+
/** HTTP method received by the Host ingress adapter. */
|
|
102
|
+
method: string;
|
|
103
|
+
/** Raw headers with duplicates preserved so the provider can reject ambiguous authentication input. */
|
|
104
|
+
headers: readonly TrackerIngressHeader[];
|
|
105
|
+
/** Detached, bounded request bytes. */
|
|
106
|
+
body: Uint8Array;
|
|
107
|
+
}
|
|
108
|
+
/** Ingress input extended with the operation's combined cancellation signal. */
|
|
109
|
+
export interface TrackerProviderIngressRequest extends TrackerIngressRequest {
|
|
110
|
+
/** Aborts when either the provider generation is withdrawn or the calling operation is cancelled. */
|
|
111
|
+
signal: AbortSignal;
|
|
112
|
+
}
|
|
113
|
+
/** Authentication result whose id is stable across retries and qualified by provider id. */
|
|
114
|
+
export interface TrackerIngressDelivery {
|
|
115
|
+
/** Provider-qualified delivery id safe to retain in durable admission state. */
|
|
116
|
+
deliveryId: string;
|
|
117
|
+
}
|
|
118
|
+
export interface TrackerReportDelivery {
|
|
119
|
+
readonly kind: 'report';
|
|
120
|
+
readonly deliveryId: string;
|
|
121
|
+
readonly eventId: string;
|
|
122
|
+
readonly bindingId: TrackerBindingId;
|
|
123
|
+
readonly issueId: TrackerIssueId;
|
|
124
|
+
readonly displayKey: string;
|
|
125
|
+
readonly body: string;
|
|
126
|
+
}
|
|
127
|
+
export type TrackerProjectionState = 'queued' | 'implementing' | 'paused' | 'blocked' | 'failed' | 'completed';
|
|
128
|
+
export interface TrackerProjectionDelivery {
|
|
129
|
+
readonly kind: 'projection';
|
|
130
|
+
readonly deliveryId: string;
|
|
131
|
+
readonly eventId: string;
|
|
132
|
+
readonly bindingId: TrackerBindingId;
|
|
133
|
+
readonly issueId: TrackerIssueId;
|
|
134
|
+
readonly displayKey: string;
|
|
135
|
+
readonly readinessGeneration: ReadinessGeneration;
|
|
136
|
+
readonly runRevision: number;
|
|
137
|
+
readonly desiredState: TrackerProjectionState;
|
|
138
|
+
}
|
|
139
|
+
export type TrackerOutboundDelivery = TrackerReportDelivery | TrackerProjectionDelivery;
|
|
140
|
+
export interface TrackerOutboundReceipt {
|
|
141
|
+
readonly receiptId: string;
|
|
142
|
+
readonly receivedAt: string;
|
|
143
|
+
}
|
|
144
|
+
export type TrackerDeliveryObservation = {
|
|
145
|
+
readonly kind: 'missing';
|
|
146
|
+
} | {
|
|
147
|
+
readonly kind: 'delivered';
|
|
148
|
+
readonly receipt: TrackerOutboundReceipt;
|
|
149
|
+
} | {
|
|
150
|
+
readonly kind: 'conflict';
|
|
151
|
+
readonly reason: string;
|
|
152
|
+
};
|
|
153
|
+
export interface TrackerProviderWriteRequest {
|
|
154
|
+
readonly delivery: TrackerOutboundDelivery;
|
|
155
|
+
readonly signal: AbortSignal;
|
|
156
|
+
}
|
|
157
|
+
/** Non-replayed availability transition for one provider generation. */
|
|
158
|
+
export interface TrackerProviderLifecycleEvent {
|
|
159
|
+
kind: 'available' | 'unavailable';
|
|
160
|
+
providerId: TrackerProviderId;
|
|
161
|
+
}
|
|
162
|
+
/** Bounded, secret-free metadata for one currently available tracker provider generation. */
|
|
163
|
+
export interface TrackerProviderRegistration {
|
|
164
|
+
readonly id: TrackerProviderId;
|
|
165
|
+
readonly displayName: string;
|
|
166
|
+
readonly configurationNamespace: string;
|
|
167
|
+
readonly capabilities: readonly (TrackerCapability | TrackerWriteCapability)[];
|
|
168
|
+
}
|
|
169
|
+
/** Versioned read-only tracker adapter registered as one lifecycle-owned generation. */
|
|
170
|
+
export interface TrackerProvider {
|
|
171
|
+
id: TrackerProviderId;
|
|
172
|
+
interfaceVersion: typeof TRACKER_INTERFACE_VERSION;
|
|
173
|
+
displayName: string;
|
|
174
|
+
configurationNamespace: string;
|
|
175
|
+
capabilities: readonly (TrackerCapability | TrackerWriteCapability)[];
|
|
176
|
+
/**
|
|
177
|
+
* Read one provider page without external writes. The cursor, when present, must come from the preceding page.
|
|
178
|
+
* Resolve with provider data or reject with `TrackerProviderError`; reject with the signal reason when cancelled.
|
|
179
|
+
*/
|
|
180
|
+
readCandidates(request: TrackerReadRequest): Promise<TrackerCandidatePage>;
|
|
181
|
+
/**
|
|
182
|
+
* Authenticate a bounded raw ingress request without retaining a receipt or making external writes. Resolve with a
|
|
183
|
+
* provider-qualified, retry-stable delivery id; reject with `TrackerProviderError` for authentication or malformed
|
|
184
|
+
* input and reject with the signal reason when cancelled.
|
|
185
|
+
*/
|
|
186
|
+
verifyIngress(request: TrackerProviderIngressRequest): Promise<TrackerIngressDelivery>;
|
|
187
|
+
/** Reconcile a stable outbound identity before any retry. Required when reports/projections are declared. */
|
|
188
|
+
reconcileDelivery?(request: TrackerProviderWriteRequest): Promise<TrackerDeliveryObservation>;
|
|
189
|
+
/** Apply one report or mutable projection. Required when reports/projections are declared. */
|
|
190
|
+
deliver?(request: TrackerProviderWriteRequest): Promise<TrackerOutboundReceipt>;
|
|
191
|
+
}
|
|
192
|
+
/** A generation-scoped, normalized provider view valid only during its `Tracker.withProvider` callback. */
|
|
193
|
+
export interface TrackerReader {
|
|
194
|
+
/**
|
|
195
|
+
* Read and validate one candidate page. A supplied caller signal is combined with provider-withdrawal cancellation;
|
|
196
|
+
* caller cancellation rejects with its original reason, while withdrawal and provider failures are normalized as
|
|
197
|
+
* `TrackerProviderError`. This operation has no durable or external-write effect.
|
|
198
|
+
*/
|
|
199
|
+
readCandidates(cursor?: string, signal?: AbortSignal): Promise<TrackerCandidatePage>;
|
|
200
|
+
/**
|
|
201
|
+
* Authenticate and validate detached ingress bytes. A supplied caller signal is combined with provider-withdrawal
|
|
202
|
+
* cancellation; caller cancellation rejects with its original reason, while withdrawal and provider failures are
|
|
203
|
+
* normalized as `TrackerProviderError`. Successful verification does not retain a receipt.
|
|
204
|
+
*/
|
|
205
|
+
verifyIngress(request: TrackerIngressRequest, signal?: AbortSignal): Promise<TrackerIngressDelivery>;
|
|
206
|
+
}
|
|
207
|
+
export interface TrackerWriter {
|
|
208
|
+
reconcileDelivery(delivery: TrackerOutboundDelivery, signal?: AbortSignal): Promise<TrackerDeliveryObservation>;
|
|
209
|
+
deliver(delivery: TrackerOutboundDelivery, signal?: AbortSignal): Promise<TrackerOutboundReceipt>;
|
|
210
|
+
}
|
|
211
|
+
/** Stable failure classification safe for scheduling, diagnostics, and HTTP mapping. */
|
|
212
|
+
export type TrackerProviderErrorCode = 'authentication' | 'permission' | 'invalid-configuration' | 'not-found' | 'conflict' | 'rate-limit' | 'timeout' | 'transient' | 'unsupported-capability' | 'ambiguous-acknowledgement' | 'invalid-response' | 'provider-unavailable';
|
|
213
|
+
/** Normalized operational failure at the tracker-provider boundary. */
|
|
214
|
+
export declare class TrackerProviderError extends Error {
|
|
215
|
+
readonly code: TrackerProviderErrorCode;
|
|
216
|
+
readonly retryAfterMs?: number | undefined;
|
|
217
|
+
/** Construct a provider-safe failure; retry delay is meaningful only for retryable codes and cannot be cancelled. */
|
|
218
|
+
constructor(code: TrackerProviderErrorCode, message: string, retryAfterMs?: number | undefined);
|
|
219
|
+
}
|
|
220
|
+
/** Map a provider failure code to stable operator-facing text without retaining provider-authored details. */
|
|
221
|
+
export declare function publicTrackerFailureMessage(code: TrackerProviderErrorCode): string;
|
|
222
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const ID_PATTERN = /^[a-z0-9][a-z0-9._:-]{0,255}$/;
|
|
2
|
+
function opaqueId(kind, value) {
|
|
3
|
+
if (!ID_PATTERN.test(value))
|
|
4
|
+
throw new TypeError(`${kind} must match ${String(ID_PATTERN)}`);
|
|
5
|
+
return value;
|
|
6
|
+
}
|
|
7
|
+
/** Validate and brand a provider id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
8
|
+
export const trackerProviderId = (value) => opaqueId('tracker provider id', value);
|
|
9
|
+
/** Validate and brand a binding id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
10
|
+
export const trackerBindingId = (value) => opaqueId('tracker binding id', value);
|
|
11
|
+
/** Validate and brand an issue id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
12
|
+
export const trackerIssueId = (value) => opaqueId('tracker issue id', value);
|
|
13
|
+
/** Validate and brand a comment id; throws `TypeError` for an invalid external value and has no cancellation point. */
|
|
14
|
+
export const trackerCommentId = (value) => opaqueId('tracker comment id', value);
|
|
15
|
+
/**
|
|
16
|
+
* Validate and brand a readiness-generation id; throws `TypeError` for an invalid external value and has no
|
|
17
|
+
* cancellation point.
|
|
18
|
+
*/
|
|
19
|
+
export const readinessGeneration = (value) => opaqueId('readiness generation', value);
|
|
20
|
+
/** Exact provider contract version accepted by this build. */
|
|
21
|
+
export const TRACKER_INTERFACE_VERSION = 2;
|
|
22
|
+
/** Capabilities every provider generation must implement before registration succeeds. */
|
|
23
|
+
export const trackerCapabilities = ['candidates', 'comments', 'dependencies', 'readiness', 'ingress'];
|
|
24
|
+
export const trackerWriteCapabilities = ['reports', 'projections'];
|
|
25
|
+
/** Normalized operational failure at the tracker-provider boundary. */
|
|
26
|
+
export class TrackerProviderError extends Error {
|
|
27
|
+
code;
|
|
28
|
+
retryAfterMs;
|
|
29
|
+
/** Construct a provider-safe failure; retry delay is meaningful only for retryable codes and cannot be cancelled. */
|
|
30
|
+
constructor(code, message, retryAfterMs) {
|
|
31
|
+
super(message);
|
|
32
|
+
this.code = code;
|
|
33
|
+
this.retryAfterMs = retryAfterMs;
|
|
34
|
+
this.name = 'TrackerProviderError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Map a provider failure code to stable operator-facing text without retaining provider-authored details. */
|
|
38
|
+
export function publicTrackerFailureMessage(code) {
|
|
39
|
+
switch (code) {
|
|
40
|
+
case 'authentication':
|
|
41
|
+
return 'Tracker authentication failed.';
|
|
42
|
+
case 'permission':
|
|
43
|
+
return 'Tracker access was denied.';
|
|
44
|
+
case 'invalid-configuration':
|
|
45
|
+
return 'Tracker configuration is invalid or incomplete.';
|
|
46
|
+
case 'not-found':
|
|
47
|
+
return 'A configured tracker resource was not found.';
|
|
48
|
+
case 'conflict':
|
|
49
|
+
return 'Tracker state could not be reconciled safely.';
|
|
50
|
+
case 'rate-limit':
|
|
51
|
+
return 'Tracker rate limiting deferred reconciliation.';
|
|
52
|
+
case 'timeout':
|
|
53
|
+
return 'The tracker request timed out.';
|
|
54
|
+
case 'transient':
|
|
55
|
+
return 'The tracker was temporarily unavailable.';
|
|
56
|
+
case 'unsupported-capability':
|
|
57
|
+
return 'The selected tracker does not support this operation.';
|
|
58
|
+
case 'ambiguous-acknowledgement':
|
|
59
|
+
return 'Tracker acknowledgement could not be confirmed.';
|
|
60
|
+
case 'invalid-response':
|
|
61
|
+
return 'The tracker returned an invalid or unsafe response.';
|
|
62
|
+
case 'provider-unavailable':
|
|
63
|
+
return 'The selected tracker provider is unavailable.';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/tracker/model.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,GAAG,+BAA+B,CAAA;AAElD,SAAS,QAAQ,CAAmB,IAAY,EAAE,KAAa;IAC7D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS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QAGrB,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAA;IACpC,CAAC;CACF;AAED,8GAA8G;AAC9G,MAAM,UAAU,2BAA2B,CAAC,IAA8B;IACxE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,gBAAgB;YACnB,OAAO,gCAAgC,CAAA;QACzC,KAAK,YAAY;YACf,OAAO,4BAA4B,CAAA;QACrC,KAAK,uBAAuB;YAC1B,OAAO,iDAAiD,CAAA;QAC1D,KAAK,WAAW;YACd,OAAO,8CAA8C,CAAA;QACvD,KAAK,UAAU;YACb,OAAO,+CAA+C,CAAA;QACxD,KAAK,YAAY;YACf,OAAO,gDAAgD,CAAA;QACzD,KAAK,SAAS;YACZ,OAAO,gCAAgC,CAAA;QACzC,KAAK,WAAW;YACd,OAAO,0CAA0C,CAAA;QACnD,KAAK,wBAAwB;YAC3B,OAAO,uDAAuD,CAAA;QAChE,KAAK,2BAA2B;YAC9B,OAAO,iDAAiD,CAAA;QAC1D,KAAK,kBAAkB;YACrB,OAAO,qDAAqD,CAAA;QAC9D,KAAK,sBAAsB;YACzB,OAAO,+CAA+C,CAAA;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type Context, Service } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type TrackerCandidatePage, type TrackerProvider, type TrackerProviderId, type TrackerProviderLifecycleEvent, type TrackerProviderRegistration, type TrackerReader, type TrackerWriter } from './model.js';
|
|
3
|
+
declare module '@deepseek-ai/cordis' {
|
|
4
|
+
interface Context {
|
|
5
|
+
tracker: Tracker;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/** Provider registry and normalized read seam consumed by admission. */
|
|
9
|
+
export declare class Tracker extends Service {
|
|
10
|
+
private readonly lifecycleObservers;
|
|
11
|
+
private readonly providers;
|
|
12
|
+
constructor(ctx: Context);
|
|
13
|
+
/**
|
|
14
|
+
* Register one complete provider generation and synchronously publish its availability. The provider must use the
|
|
15
|
+
* current interface version, declare every required capability, and have a unique id; violations throw without
|
|
16
|
+
* changing the registry. The returned idempotent disposer stops admission to the generation, aborts and drains its
|
|
17
|
+
* active operations, removes it, then publishes unavailability. Disposer cancellation is not supported.
|
|
18
|
+
*/
|
|
19
|
+
register(provider: TrackerProvider): () => Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Observe future provider availability changes synchronously. Registration has no replay and no cancellation point;
|
|
22
|
+
* observer failures are logged and do not block other observers. The returned idempotent function unsubscribes.
|
|
23
|
+
*/
|
|
24
|
+
watchProviders(observer: (event: TrackerProviderLifecycleEvent) => void): () => void;
|
|
25
|
+
/** Return stable, secret-free metadata for every currently accepting provider generation. */
|
|
26
|
+
providerRegistrations(): readonly TrackerProviderRegistration[];
|
|
27
|
+
/**
|
|
28
|
+
* Read one validated page through the currently registered provider generation. The optional cursor must have been
|
|
29
|
+
* returned by that provider. Provider failures and withdrawal reject with `TrackerProviderError`; caller cancellation
|
|
30
|
+
* rejects with its original reason. This operation has no durable or external-write effect.
|
|
31
|
+
*/
|
|
32
|
+
readCandidates(id: TrackerProviderId, cursor?: string, signal?: AbortSignal): Promise<TrackerCandidatePage>;
|
|
33
|
+
/**
|
|
34
|
+
* Retain the selected provider generation while an operation uses its reader. The provider must be available when
|
|
35
|
+
* called. Provider withdrawal aborts its reads, waits for the callback to settle, and fences late results; consumer
|
|
36
|
+
* failures are preserved. Effects performed by the callback are caller-owned and must occur only after awaited reader
|
|
37
|
+
* operations succeed. `withProvider` itself has no independent caller-cancellation input.
|
|
38
|
+
*/
|
|
39
|
+
withProvider<T>(id: TrackerProviderId, operation: (reader: TrackerReader) => Promise<T>): Promise<T>;
|
|
40
|
+
/** Retain one write-capable provider generation while a durable delivery owner reconciles and applies its intent. */
|
|
41
|
+
withWriter<T>(id: TrackerProviderId, operation: (writer: TrackerWriter) => Promise<T>): Promise<T>;
|
|
42
|
+
private readProviderCandidates;
|
|
43
|
+
private verifyProviderIngress;
|
|
44
|
+
private reconcileProviderDelivery;
|
|
45
|
+
private deliverProviderIntent;
|
|
46
|
+
private invokeWrite;
|
|
47
|
+
private notifyProviderLifecycle;
|
|
48
|
+
}
|
|
49
|
+
export default Tracker;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Service } from '@deepseek-ai/cordis';
|
|
2
|
+
import { GenerationRegistry } from '../providers/generation-registry.js';
|
|
3
|
+
import { TRACKER_INTERFACE_VERSION, TrackerProviderError, trackerCapabilities, trackerWriteCapabilities, } from './model.js';
|
|
4
|
+
import { candidatePageSchema, deliveryObservationSchema, ingressDeliverySchema, outboundReceiptSchema, } from './validation.js';
|
|
5
|
+
/** Provider registry and normalized read seam consumed by admission. */
|
|
6
|
+
export class Tracker extends Service {
|
|
7
|
+
lifecycleObservers = new Set();
|
|
8
|
+
providers = new GenerationRegistry((providerId) => this.notifyProviderLifecycle({ kind: 'available', providerId }), (providerId) => this.notifyProviderLifecycle({ kind: 'unavailable', providerId }));
|
|
9
|
+
constructor(ctx) {
|
|
10
|
+
super(ctx, 'tracker');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Register one complete provider generation and synchronously publish its availability. The provider must use the
|
|
14
|
+
* current interface version, declare every required capability, and have a unique id; violations throw without
|
|
15
|
+
* changing the registry. The returned idempotent disposer stops admission to the generation, aborts and drains its
|
|
16
|
+
* active operations, removes it, then publishes unavailability. Disposer cancellation is not supported.
|
|
17
|
+
*/
|
|
18
|
+
register(provider) {
|
|
19
|
+
if (provider.interfaceVersion !== TRACKER_INTERFACE_VERSION) {
|
|
20
|
+
throw new TypeError(`tracker provider "${provider.id}" uses interface version ${String(provider.interfaceVersion)}; expected ${String(TRACKER_INTERFACE_VERSION)}`);
|
|
21
|
+
}
|
|
22
|
+
if (this.providers.has(provider.id))
|
|
23
|
+
throw new Error(`tracker provider "${provider.id}" is already registered`);
|
|
24
|
+
const missing = trackerCapabilities.filter((capability) => !provider.capabilities.includes(capability));
|
|
25
|
+
if (missing.length > 0) {
|
|
26
|
+
throw new TypeError(`tracker provider "${provider.id}" is missing capabilities: ${missing.join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
const writes = trackerWriteCapabilities.filter((capability) => provider.capabilities.includes(capability));
|
|
29
|
+
if (writes.length > 0 &&
|
|
30
|
+
(writes.length !== trackerWriteCapabilities.length ||
|
|
31
|
+
provider.reconcileDelivery === undefined ||
|
|
32
|
+
provider.deliver === undefined)) {
|
|
33
|
+
throw new TypeError(`tracker provider "${provider.id}" must implement reports and projections together`);
|
|
34
|
+
}
|
|
35
|
+
return this.providers.register(provider.id, provider);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Observe future provider availability changes synchronously. Registration has no replay and no cancellation point;
|
|
39
|
+
* observer failures are logged and do not block other observers. The returned idempotent function unsubscribes.
|
|
40
|
+
*/
|
|
41
|
+
watchProviders(observer) {
|
|
42
|
+
this.lifecycleObservers.add(observer);
|
|
43
|
+
return () => {
|
|
44
|
+
this.lifecycleObservers.delete(observer);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Return stable, secret-free metadata for every currently accepting provider generation. */
|
|
48
|
+
providerRegistrations() {
|
|
49
|
+
return [...this.providers.values()]
|
|
50
|
+
.filter((registered) => registered.accepting)
|
|
51
|
+
.map(({ provider }) => ({
|
|
52
|
+
id: provider.id,
|
|
53
|
+
displayName: provider.displayName,
|
|
54
|
+
configurationNamespace: provider.configurationNamespace,
|
|
55
|
+
capabilities: [...provider.capabilities],
|
|
56
|
+
}))
|
|
57
|
+
.sort((left, right) => left.displayName.localeCompare(right.displayName) || left.id.localeCompare(right.id));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Read one validated page through the currently registered provider generation. The optional cursor must have been
|
|
61
|
+
* returned by that provider. Provider failures and withdrawal reject with `TrackerProviderError`; caller cancellation
|
|
62
|
+
* rejects with its original reason. This operation has no durable or external-write effect.
|
|
63
|
+
*/
|
|
64
|
+
async readCandidates(id, cursor, signal) {
|
|
65
|
+
return this.withProvider(id, (reader) => reader.readCandidates(cursor, signal));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Retain the selected provider generation while an operation uses its reader. The provider must be available when
|
|
69
|
+
* called. Provider withdrawal aborts its reads, waits for the callback to settle, and fences late results; consumer
|
|
70
|
+
* failures are preserved. Effects performed by the callback are caller-owned and must occur only after awaited reader
|
|
71
|
+
* operations succeed. `withProvider` itself has no independent caller-cancellation input.
|
|
72
|
+
*/
|
|
73
|
+
async withProvider(id, operation) {
|
|
74
|
+
const registered = this.providers.require(id, () => new TrackerProviderError('provider-unavailable', `tracker provider "${id}" is unavailable`));
|
|
75
|
+
const reader = {
|
|
76
|
+
readCandidates: (cursor, signal) => this.readProviderCandidates(registered, cursor, signal),
|
|
77
|
+
verifyIngress: (request, signal) => this.verifyProviderIngress(registered, request, signal),
|
|
78
|
+
};
|
|
79
|
+
return await this.providers.retain(registered, () => operation(reader));
|
|
80
|
+
}
|
|
81
|
+
/** Retain one write-capable provider generation while a durable delivery owner reconciles and applies its intent. */
|
|
82
|
+
async withWriter(id, operation) {
|
|
83
|
+
const registered = this.providers.require(id, () => new TrackerProviderError('provider-unavailable', `tracker provider "${id}" is unavailable`));
|
|
84
|
+
if (!registered.accepting ||
|
|
85
|
+
registered.provider.reconcileDelivery === undefined ||
|
|
86
|
+
registered.provider.deliver === undefined ||
|
|
87
|
+
!trackerWriteCapabilities.every((capability) => registered.provider.capabilities.includes(capability))) {
|
|
88
|
+
throw new TrackerProviderError('unsupported-capability', `tracker provider "${id}" has no outbound delivery seam`);
|
|
89
|
+
}
|
|
90
|
+
const writer = {
|
|
91
|
+
reconcileDelivery: (delivery, signal) => this.reconcileProviderDelivery(registered, delivery, signal),
|
|
92
|
+
deliver: (delivery, signal) => this.deliverProviderIntent(registered, delivery, signal),
|
|
93
|
+
};
|
|
94
|
+
return await this.providers.retain(registered, () => operation(writer));
|
|
95
|
+
}
|
|
96
|
+
async readProviderCandidates(registered, cursor, callerSignal) {
|
|
97
|
+
callerSignal?.throwIfAborted();
|
|
98
|
+
const request = {
|
|
99
|
+
signal: this.providers.signal(registered, callerSignal),
|
|
100
|
+
...(cursor === undefined ? {} : { cursor }),
|
|
101
|
+
};
|
|
102
|
+
let page;
|
|
103
|
+
try {
|
|
104
|
+
page = await registered.provider.readCandidates(request);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (!registered.accepting) {
|
|
108
|
+
throw new TrackerProviderError('provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
109
|
+
}
|
|
110
|
+
callerSignal?.throwIfAborted();
|
|
111
|
+
if (error instanceof TrackerProviderError)
|
|
112
|
+
throw error;
|
|
113
|
+
throw new TrackerProviderError('transient', `tracker provider "${registered.provider.id}" failed to read candidates`);
|
|
114
|
+
}
|
|
115
|
+
if (!registered.accepting) {
|
|
116
|
+
throw new TrackerProviderError('provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
117
|
+
}
|
|
118
|
+
callerSignal?.throwIfAborted();
|
|
119
|
+
const parsed = candidatePageSchema.safeParse(page);
|
|
120
|
+
if (!parsed.success) {
|
|
121
|
+
throw new TrackerProviderError('invalid-response', `tracker provider "${registered.provider.id}" returned an invalid candidate page`);
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
issues: parsed.data.issues,
|
|
125
|
+
...(parsed.data.nextCursor === undefined ? {} : { nextCursor: parsed.data.nextCursor }),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
async verifyProviderIngress(registered, request, callerSignal) {
|
|
129
|
+
callerSignal?.throwIfAborted();
|
|
130
|
+
let delivery;
|
|
131
|
+
try {
|
|
132
|
+
delivery = await registered.provider.verifyIngress({
|
|
133
|
+
method: request.method,
|
|
134
|
+
headers: request.headers.map((header) => ({ ...header })),
|
|
135
|
+
body: request.body.slice(),
|
|
136
|
+
signal: this.providers.signal(registered, callerSignal),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
if (!registered.accepting) {
|
|
141
|
+
throw new TrackerProviderError('provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
142
|
+
}
|
|
143
|
+
callerSignal?.throwIfAborted();
|
|
144
|
+
if (error instanceof TrackerProviderError)
|
|
145
|
+
throw error;
|
|
146
|
+
throw new TrackerProviderError('transient', `tracker provider "${registered.provider.id}" failed to verify ingress`);
|
|
147
|
+
}
|
|
148
|
+
if (!registered.accepting) {
|
|
149
|
+
throw new TrackerProviderError('provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
150
|
+
}
|
|
151
|
+
callerSignal?.throwIfAborted();
|
|
152
|
+
const parsed = ingressDeliverySchema.safeParse(delivery);
|
|
153
|
+
if (!parsed.success || !parsed.data.deliveryId.startsWith(`${registered.provider.id}:`)) {
|
|
154
|
+
throw new TrackerProviderError('invalid-response', `tracker provider "${registered.provider.id}" returned an invalid ingress delivery`);
|
|
155
|
+
}
|
|
156
|
+
return parsed.data;
|
|
157
|
+
}
|
|
158
|
+
async reconcileProviderDelivery(registered, delivery, callerSignal) {
|
|
159
|
+
const value = await this.invokeWrite(registered, 'reconcileDelivery', delivery, callerSignal);
|
|
160
|
+
const parsed = deliveryObservationSchema.safeParse(value);
|
|
161
|
+
if (!parsed.success) {
|
|
162
|
+
throw new TrackerProviderError('invalid-response', 'tracker provider returned an invalid delivery observation');
|
|
163
|
+
}
|
|
164
|
+
return parsed.data;
|
|
165
|
+
}
|
|
166
|
+
async deliverProviderIntent(registered, delivery, callerSignal) {
|
|
167
|
+
const value = await this.invokeWrite(registered, 'deliver', delivery, callerSignal);
|
|
168
|
+
const parsed = outboundReceiptSchema.safeParse(value);
|
|
169
|
+
if (!parsed.success)
|
|
170
|
+
throw new TrackerProviderError('invalid-response', 'tracker provider returned an invalid receipt');
|
|
171
|
+
return parsed.data;
|
|
172
|
+
}
|
|
173
|
+
async invokeWrite(registered, operation, delivery, callerSignal) {
|
|
174
|
+
callerSignal?.throwIfAborted();
|
|
175
|
+
try {
|
|
176
|
+
const request = {
|
|
177
|
+
delivery: structuredClone(delivery),
|
|
178
|
+
signal: this.providers.signal(registered, callerSignal),
|
|
179
|
+
};
|
|
180
|
+
const value = operation === 'reconcileDelivery'
|
|
181
|
+
? await registered.provider.reconcileDelivery?.(request)
|
|
182
|
+
: await registered.provider.deliver?.(request);
|
|
183
|
+
if (value === undefined)
|
|
184
|
+
throw new TrackerProviderError('unsupported-capability', 'tracker write is unavailable');
|
|
185
|
+
if (!registered.accepting) {
|
|
186
|
+
throw new TrackerProviderError(operation === 'deliver' ? 'ambiguous-acknowledgement' : 'provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
187
|
+
}
|
|
188
|
+
callerSignal?.throwIfAborted();
|
|
189
|
+
return value;
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
if (!registered.accepting) {
|
|
193
|
+
throw new TrackerProviderError(operation === 'deliver' ? 'ambiguous-acknowledgement' : 'provider-unavailable', `tracker provider "${registered.provider.id}" was withdrawn`);
|
|
194
|
+
}
|
|
195
|
+
callerSignal?.throwIfAborted();
|
|
196
|
+
if (error instanceof TrackerProviderError)
|
|
197
|
+
throw error;
|
|
198
|
+
throw new TrackerProviderError('transient', `tracker provider "${registered.provider.id}" failed outbound delivery`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
notifyProviderLifecycle(event) {
|
|
202
|
+
for (const observer of [...this.lifecycleObservers]) {
|
|
203
|
+
try {
|
|
204
|
+
observer(event);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
this.ctx.logger.warn('autopilot tracker provider lifecycle observer failed');
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
export default Tracker;
|
|
213
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/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AC,QAAQ,CAAC,EAAE,iBAAiB,CAC7D,CAAA;YACH,CAAC;YACD,YAAY,EAAE,cAAc,EAAE,CAAA;YAC9B,IAAI,KAAK,YAAY,oBAAoB;gBAAE,MAAM,KAAK,CAAA;YACtD,MAAM,IAAI,oBAAoB,CAC5B,WAAW,EACX,qBAAqB,UAAU,CAAC,QAAQ,CAAC,EAAE,4BAA4B,CACxE,CAAA;QACH,CAAC;IACH,CAAC;IAEO,uBAAuB,CAAC,KAAoC;QAClE,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpD,IAAI,CAAC;gBACH,QAAQ,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAA;YAC9E,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const candidatePageSchema: z.ZodObject<{
|
|
3
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
4
|
+
bindingId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./model.js").TrackerBindingId, string>>;
|
|
5
|
+
issueId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./model.js").TrackerIssueId, string>>;
|
|
6
|
+
displayKey: z.ZodString;
|
|
7
|
+
summary: z.ZodString;
|
|
8
|
+
priorityRank: z.ZodNumber;
|
|
9
|
+
isReady: z.ZodBoolean;
|
|
10
|
+
labels: z.ZodArray<z.ZodString>;
|
|
11
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./model.js").TrackerCommentId, string>>;
|
|
13
|
+
authorId: z.ZodString;
|
|
14
|
+
body: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodISODateTime;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
18
|
+
issueId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./model.js").TrackerIssueId, string>>;
|
|
19
|
+
displayKey: z.ZodString;
|
|
20
|
+
state: z.ZodEnum<{
|
|
21
|
+
completed: "completed";
|
|
22
|
+
"not-completed": "not-completed";
|
|
23
|
+
unknown: "unknown";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
readiness: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"absent">;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"transition">;
|
|
30
|
+
generation: z.ZodPipe<z.ZodString, z.ZodTransform<import("./model.js").ReadinessGeneration, string>>;
|
|
31
|
+
actorId: z.ZodString;
|
|
32
|
+
actorKind: z.ZodEnum<{
|
|
33
|
+
automation: "automation";
|
|
34
|
+
human: "human";
|
|
35
|
+
unknown: "unknown";
|
|
36
|
+
}>;
|
|
37
|
+
occurredAt: z.ZodISODateTime;
|
|
38
|
+
}, z.core.$strip>], "kind">;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const ingressDeliverySchema: z.ZodObject<{
|
|
43
|
+
deliveryId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const outboundReceiptSchema: z.ZodObject<{
|
|
46
|
+
receiptId: z.ZodString;
|
|
47
|
+
receivedAt: z.ZodISODateTime;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const deliveryObservationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"missing">;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"delivered">;
|
|
53
|
+
receipt: z.ZodObject<{
|
|
54
|
+
receiptId: z.ZodString;
|
|
55
|
+
receivedAt: z.ZodISODateTime;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
kind: z.ZodLiteral<"conflict">;
|
|
59
|
+
reason: z.ZodString;
|
|
60
|
+
}, z.core.$strip>], "kind">;
|