@cat-factory/kernel 0.6.0
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/LICENSE +21 -0
- package/dist/domain/catalog.d.ts +36 -0
- package/dist/domain/catalog.d.ts.map +1 -0
- package/dist/domain/catalog.js +55 -0
- package/dist/domain/catalog.js.map +1 -0
- package/dist/domain/errors.d.ts +57 -0
- package/dist/domain/errors.d.ts.map +1 -0
- package/dist/domain/errors.js +60 -0
- package/dist/domain/errors.js.map +1 -0
- package/dist/domain/models.d.ts +204 -0
- package/dist/domain/models.d.ts.map +1 -0
- package/dist/domain/models.js +522 -0
- package/dist/domain/models.js.map +1 -0
- package/dist/domain/pipeline-registry.d.ts +19 -0
- package/dist/domain/pipeline-registry.d.ts.map +1 -0
- package/dist/domain/pipeline-registry.js +48 -0
- package/dist/domain/pipeline-registry.js.map +1 -0
- package/dist/domain/seed.d.ts +14 -0
- package/dist/domain/seed.d.ts.map +1 -0
- package/dist/domain/seed.js +369 -0
- package/dist/domain/seed.js.map +1 -0
- package/dist/domain/service-registration.d.ts +31 -0
- package/dist/domain/service-registration.d.ts.map +1 -0
- package/dist/domain/service-registration.js +37 -0
- package/dist/domain/service-registration.js.map +1 -0
- package/dist/domain/subtasks.logic.d.ts +6 -0
- package/dist/domain/subtasks.logic.d.ts.map +1 -0
- package/dist/domain/subtasks.logic.js +20 -0
- package/dist/domain/subtasks.logic.js.map +1 -0
- package/dist/domain/types.d.ts +2 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +2 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/ports/account-repositories.d.ts +46 -0
- package/dist/ports/account-repositories.d.ts.map +1 -0
- package/dist/ports/account-repositories.js +2 -0
- package/dist/ports/account-repositories.js.map +1 -0
- package/dist/ports/agent-executor.d.ts +361 -0
- package/dist/ports/agent-executor.d.ts.map +1 -0
- package/dist/ports/agent-executor.js +8 -0
- package/dist/ports/agent-executor.js.map +1 -0
- package/dist/ports/agent-runs.d.ts +28 -0
- package/dist/ports/agent-runs.d.ts.map +1 -0
- package/dist/ports/agent-runs.js +2 -0
- package/dist/ports/agent-runs.js.map +1 -0
- package/dist/ports/board-operations.d.ts +15 -0
- package/dist/ports/board-operations.d.ts.map +1 -0
- package/dist/ports/board-operations.js +2 -0
- package/dist/ports/board-operations.js.map +1 -0
- package/dist/ports/board-scan-repositories.d.ts +23 -0
- package/dist/ports/board-scan-repositories.d.ts.map +1 -0
- package/dist/ports/board-scan-repositories.js +2 -0
- package/dist/ports/board-scan-repositories.js.map +1 -0
- package/dist/ports/bootstrap-repositories.d.ts +71 -0
- package/dist/ports/bootstrap-repositories.d.ts.map +1 -0
- package/dist/ports/bootstrap-repositories.js +2 -0
- package/dist/ports/bootstrap-repositories.js.map +1 -0
- package/dist/ports/bootstrap-runner.d.ts +20 -0
- package/dist/ports/bootstrap-runner.d.ts.map +1 -0
- package/dist/ports/bootstrap-runner.js +12 -0
- package/dist/ports/bootstrap-runner.js.map +1 -0
- package/dist/ports/ci-status.d.ts +23 -0
- package/dist/ports/ci-status.d.ts.map +1 -0
- package/dist/ports/ci-status.js +8 -0
- package/dist/ports/ci-status.js.map +1 -0
- package/dist/ports/clarity-review-repositories.d.ts +12 -0
- package/dist/ports/clarity-review-repositories.d.ts.map +1 -0
- package/dist/ports/clarity-review-repositories.js +2 -0
- package/dist/ports/clarity-review-repositories.js.map +1 -0
- package/dist/ports/consensus-repositories.d.ts +12 -0
- package/dist/ports/consensus-repositories.d.ts.map +1 -0
- package/dist/ports/consensus-repositories.js +2 -0
- package/dist/ports/consensus-repositories.js.map +1 -0
- package/dist/ports/document-repositories.d.ts +55 -0
- package/dist/ports/document-repositories.d.ts.map +1 -0
- package/dist/ports/document-repositories.js +2 -0
- package/dist/ports/document-repositories.js.map +1 -0
- package/dist/ports/document-source.d.ts +55 -0
- package/dist/ports/document-source.d.ts.map +1 -0
- package/dist/ports/document-source.js +2 -0
- package/dist/ports/document-source.js.map +1 -0
- package/dist/ports/email-sender.d.ts +42 -0
- package/dist/ports/email-sender.d.ts.map +1 -0
- package/dist/ports/email-sender.js +7 -0
- package/dist/ports/email-sender.js.map +1 -0
- package/dist/ports/environment-provider.d.ts +67 -0
- package/dist/ports/environment-provider.d.ts.map +1 -0
- package/dist/ports/environment-provider.js +2 -0
- package/dist/ports/environment-provider.js.map +1 -0
- package/dist/ports/environment-repositories.d.ts +64 -0
- package/dist/ports/environment-repositories.d.ts.map +1 -0
- package/dist/ports/environment-repositories.js +2 -0
- package/dist/ports/environment-repositories.js.map +1 -0
- package/dist/ports/execution-events.d.ts +72 -0
- package/dist/ports/execution-events.d.ts.map +1 -0
- package/dist/ports/execution-events.js +16 -0
- package/dist/ports/execution-events.js.map +1 -0
- package/dist/ports/fragment-repositories.d.ts +65 -0
- package/dist/ports/fragment-repositories.d.ts.map +1 -0
- package/dist/ports/fragment-repositories.js +2 -0
- package/dist/ports/fragment-repositories.js.map +1 -0
- package/dist/ports/fragment-selector.d.ts +64 -0
- package/dist/ports/fragment-selector.d.ts.map +1 -0
- package/dist/ports/fragment-selector.js +2 -0
- package/dist/ports/fragment-selector.js.map +1 -0
- package/dist/ports/github-client.d.ts +226 -0
- package/dist/ports/github-client.d.ts.map +1 -0
- package/dist/ports/github-client.js +2 -0
- package/dist/ports/github-client.js.map +1 -0
- package/dist/ports/github-provisioning.d.ts +47 -0
- package/dist/ports/github-provisioning.d.ts.map +1 -0
- package/dist/ports/github-provisioning.js +12 -0
- package/dist/ports/github-provisioning.js.map +1 -0
- package/dist/ports/github-repositories.d.ts +136 -0
- package/dist/ports/github-repositories.d.ts.map +1 -0
- package/dist/ports/github-repositories.js +2 -0
- package/dist/ports/github-repositories.js.map +1 -0
- package/dist/ports/incident-enrichment.d.ts +40 -0
- package/dist/ports/incident-enrichment.d.ts.map +1 -0
- package/dist/ports/incident-enrichment.js +30 -0
- package/dist/ports/incident-enrichment.js.map +1 -0
- package/dist/ports/index.d.ts +68 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/index.js +11 -0
- package/dist/ports/index.js.map +1 -0
- package/dist/ports/invitation-repositories.d.ts +28 -0
- package/dist/ports/invitation-repositories.d.ts.map +1 -0
- package/dist/ports/invitation-repositories.js +2 -0
- package/dist/ports/invitation-repositories.js.map +1 -0
- package/dist/ports/llm-metrics.d.ts +142 -0
- package/dist/ports/llm-metrics.d.ts.map +1 -0
- package/dist/ports/llm-metrics.js +16 -0
- package/dist/ports/llm-metrics.js.map +1 -0
- package/dist/ports/llm-trace-sink.d.ts +84 -0
- package/dist/ports/llm-trace-sink.d.ts.map +1 -0
- package/dist/ports/llm-trace-sink.js +55 -0
- package/dist/ports/llm-trace-sink.js.map +1 -0
- package/dist/ports/local-model-repositories.d.ts +29 -0
- package/dist/ports/local-model-repositories.d.ts.map +1 -0
- package/dist/ports/local-model-repositories.js +2 -0
- package/dist/ports/local-model-repositories.js.map +1 -0
- package/dist/ports/merge-preset-repositories.d.ts +14 -0
- package/dist/ports/merge-preset-repositories.d.ts.map +1 -0
- package/dist/ports/merge-preset-repositories.js +2 -0
- package/dist/ports/merge-preset-repositories.js.map +1 -0
- package/dist/ports/model-default-repositories.d.ts +9 -0
- package/dist/ports/model-default-repositories.d.ts.map +1 -0
- package/dist/ports/model-default-repositories.js +6 -0
- package/dist/ports/model-default-repositories.js.map +1 -0
- package/dist/ports/model-provider.d.ts +69 -0
- package/dist/ports/model-provider.d.ts.map +1 -0
- package/dist/ports/model-provider.js +16 -0
- package/dist/ports/model-provider.js.map +1 -0
- package/dist/ports/notification-channel.d.ts +16 -0
- package/dist/ports/notification-channel.d.ts.map +1 -0
- package/dist/ports/notification-channel.js +22 -0
- package/dist/ports/notification-channel.js.map +1 -0
- package/dist/ports/notification-repositories.d.ts +15 -0
- package/dist/ports/notification-repositories.d.ts.map +1 -0
- package/dist/ports/notification-repositories.js +2 -0
- package/dist/ports/notification-repositories.js.map +1 -0
- package/dist/ports/password-hasher.d.ts +14 -0
- package/dist/ports/password-hasher.d.ts.map +1 -0
- package/dist/ports/password-hasher.js +9 -0
- package/dist/ports/password-hasher.js.map +1 -0
- package/dist/ports/personal-secret-cipher.d.ts +7 -0
- package/dist/ports/personal-secret-cipher.d.ts.map +1 -0
- package/dist/ports/personal-secret-cipher.js +12 -0
- package/dist/ports/personal-secret-cipher.js.map +1 -0
- package/dist/ports/personal-subscription-repositories.d.ts +72 -0
- package/dist/ports/personal-subscription-repositories.d.ts.map +1 -0
- package/dist/ports/personal-subscription-repositories.js +2 -0
- package/dist/ports/personal-subscription-repositories.js.map +1 -0
- package/dist/ports/pr-mergeability.d.ts +24 -0
- package/dist/ports/pr-mergeability.d.ts.map +1 -0
- package/dist/ports/pr-mergeability.js +7 -0
- package/dist/ports/pr-mergeability.js.map +1 -0
- package/dist/ports/pr-merger.d.ts +10 -0
- package/dist/ports/pr-merger.d.ts.map +1 -0
- package/dist/ports/pr-merger.js +8 -0
- package/dist/ports/pr-merger.js.map +1 -0
- package/dist/ports/provider-api-key-repositories.d.ts +71 -0
- package/dist/ports/provider-api-key-repositories.d.ts.map +1 -0
- package/dist/ports/provider-api-key-repositories.js +15 -0
- package/dist/ports/provider-api-key-repositories.js.map +1 -0
- package/dist/ports/provider-subscription-repositories.d.ts +51 -0
- package/dist/ports/provider-subscription-repositories.d.ts.map +1 -0
- package/dist/ports/provider-subscription-repositories.js +15 -0
- package/dist/ports/provider-subscription-repositories.js.map +1 -0
- package/dist/ports/recurring-repositories.d.ts +46 -0
- package/dist/ports/recurring-repositories.d.ts.map +1 -0
- package/dist/ports/recurring-repositories.js +2 -0
- package/dist/ports/recurring-repositories.js.map +1 -0
- package/dist/ports/release-health-repositories.d.ts +42 -0
- package/dist/ports/release-health-repositories.d.ts.map +1 -0
- package/dist/ports/release-health-repositories.js +6 -0
- package/dist/ports/release-health-repositories.js.map +1 -0
- package/dist/ports/release-health.d.ts +59 -0
- package/dist/ports/release-health.d.ts.map +1 -0
- package/dist/ports/release-health.js +8 -0
- package/dist/ports/release-health.js.map +1 -0
- package/dist/ports/repo-bootstrapper.d.ts +80 -0
- package/dist/ports/repo-bootstrapper.d.ts.map +1 -0
- package/dist/ports/repo-bootstrapper.js +2 -0
- package/dist/ports/repo-bootstrapper.js.map +1 -0
- package/dist/ports/repo-scanner.d.ts +22 -0
- package/dist/ports/repo-scanner.d.ts.map +1 -0
- package/dist/ports/repo-scanner.js +2 -0
- package/dist/ports/repo-scanner.js.map +1 -0
- package/dist/ports/repositories.d.ts +131 -0
- package/dist/ports/repositories.d.ts.map +1 -0
- package/dist/ports/repositories.js +2 -0
- package/dist/ports/repositories.js.map +1 -0
- package/dist/ports/requirement-review-repositories.d.ts +16 -0
- package/dist/ports/requirement-review-repositories.d.ts.map +1 -0
- package/dist/ports/requirement-review-repositories.js +2 -0
- package/dist/ports/requirement-review-repositories.js.map +1 -0
- package/dist/ports/runner-pool-provider.d.ts +25 -0
- package/dist/ports/runner-pool-provider.d.ts.map +1 -0
- package/dist/ports/runner-pool-provider.js +2 -0
- package/dist/ports/runner-pool-provider.js.map +1 -0
- package/dist/ports/runner-pool-repositories.d.ts +27 -0
- package/dist/ports/runner-pool-repositories.d.ts.map +1 -0
- package/dist/ports/runner-pool-repositories.js +7 -0
- package/dist/ports/runner-pool-repositories.js.map +1 -0
- package/dist/ports/runner-transport.d.ts +119 -0
- package/dist/ports/runner-transport.d.ts.map +1 -0
- package/dist/ports/runner-transport.js +2 -0
- package/dist/ports/runner-transport.js.map +1 -0
- package/dist/ports/runtime.d.ts +9 -0
- package/dist/ports/runtime.d.ts.map +1 -0
- package/dist/ports/runtime.js +5 -0
- package/dist/ports/runtime.js.map +1 -0
- package/dist/ports/sandbox-repositories.d.ts +39 -0
- package/dist/ports/sandbox-repositories.d.ts.map +1 -0
- package/dist/ports/sandbox-repositories.js +2 -0
- package/dist/ports/sandbox-repositories.js.map +1 -0
- package/dist/ports/secret-cipher.d.ts +7 -0
- package/dist/ports/secret-cipher.d.ts.map +1 -0
- package/dist/ports/secret-cipher.js +7 -0
- package/dist/ports/secret-cipher.js.map +1 -0
- package/dist/ports/service-fragment-default-repositories.d.ts +7 -0
- package/dist/ports/service-fragment-default-repositories.d.ts.map +1 -0
- package/dist/ports/service-fragment-default-repositories.js +6 -0
- package/dist/ports/service-fragment-default-repositories.js.map +1 -0
- package/dist/ports/service-repositories.d.ts +68 -0
- package/dist/ports/service-repositories.d.ts.map +1 -0
- package/dist/ports/service-repositories.js +2 -0
- package/dist/ports/service-repositories.js.map +1 -0
- package/dist/ports/slack-repositories.d.ts +61 -0
- package/dist/ports/slack-repositories.d.ts.map +1 -0
- package/dist/ports/slack-repositories.js +2 -0
- package/dist/ports/slack-repositories.js.map +1 -0
- package/dist/ports/task-repositories.d.ts +61 -0
- package/dist/ports/task-repositories.d.ts.map +1 -0
- package/dist/ports/task-repositories.js +2 -0
- package/dist/ports/task-repositories.js.map +1 -0
- package/dist/ports/task-source.d.ts +69 -0
- package/dist/ports/task-source.d.ts.map +1 -0
- package/dist/ports/task-source.js +2 -0
- package/dist/ports/task-source.js.map +1 -0
- package/dist/ports/ticket-tracker.d.ts +19 -0
- package/dist/ports/ticket-tracker.d.ts.map +1 -0
- package/dist/ports/ticket-tracker.js +8 -0
- package/dist/ports/ticket-tracker.js.map +1 -0
- package/dist/ports/token-usage.d.ts +37 -0
- package/dist/ports/token-usage.d.ts.map +1 -0
- package/dist/ports/token-usage.js +6 -0
- package/dist/ports/token-usage.js.map +1 -0
- package/dist/ports/tracker-settings-repositories.d.ts +6 -0
- package/dist/ports/tracker-settings-repositories.d.ts.map +1 -0
- package/dist/ports/tracker-settings-repositories.js +2 -0
- package/dist/ports/tracker-settings-repositories.js.map +1 -0
- package/dist/ports/url-safety-policy.d.ts +15 -0
- package/dist/ports/url-safety-policy.d.ts.map +1 -0
- package/dist/ports/url-safety-policy.js +13 -0
- package/dist/ports/url-safety-policy.js.map +1 -0
- package/dist/ports/user-repositories.d.ts +52 -0
- package/dist/ports/user-repositories.d.ts.map +1 -0
- package/dist/ports/user-repositories.js +13 -0
- package/dist/ports/user-repositories.js.map +1 -0
- package/dist/ports/webhook-verifier.d.ts +9 -0
- package/dist/ports/webhook-verifier.d.ts.map +1 -0
- package/dist/ports/webhook-verifier.js +8 -0
- package/dist/ports/webhook-verifier.js.map +1 -0
- package/dist/ports/work-runner.d.ts +19 -0
- package/dist/ports/work-runner.d.ts.map +1 -0
- package/dist/ports/work-runner.js +19 -0
- package/dist/ports/work-runner.js.map +1 -0
- package/dist/ports/workspace-settings-repositories.d.ts +8 -0
- package/dist/ports/workspace-settings-repositories.d.ts.map +1 -0
- package/dist/ports/workspace-settings-repositories.js +2 -0
- package/dist/ports/workspace-settings-repositories.js.map +1 -0
- package/dist/shared/atlassian.logic.d.ts +11 -0
- package/dist/shared/atlassian.logic.d.ts.map +1 -0
- package/dist/shared/atlassian.logic.js +148 -0
- package/dist/shared/atlassian.logic.js.map +1 -0
- package/dist/shared/markdown.logic.d.ts +5 -0
- package/dist/shared/markdown.logic.d.ts.map +1 -0
- package/dist/shared/markdown.logic.js +21 -0
- package/dist/shared/markdown.logic.js.map +1 -0
- package/dist/shared/source-registry.logic.d.ts +10 -0
- package/dist/shared/source-registry.logic.d.ts.map +1 -0
- package/dist/shared/source-registry.logic.js +17 -0
- package/dist/shared/source-registry.logic.js.map +1 -0
- package/dist/shared/tasks-prompt.logic.d.ts +16 -0
- package/dist/shared/tasks-prompt.logic.d.ts.map +1 -0
- package/dist/shared/tasks-prompt.logic.js +29 -0
- package/dist/shared/tasks-prompt.logic.js.map +1 -0
- package/dist/workspace-guard.d.ts +4 -0
- package/dist/workspace-guard.d.ts.map +1 -0
- package/dist/workspace-guard.js +5 -0
- package/dist/workspace-guard.js.map +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurring-repositories.d.ts","source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;IAC/D,8DAA8D;IAC9D,SAAS,CACP,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC,CAAC,GACrF,OAAO,CAAC,IAAI,CAAC,CAAA;IAChB,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;IACzE,wFAAwF;IACxF,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurring-repositories.js","sourceRoot":"","sources":["../../src/ports/recurring-repositories.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** A workspace's Datadog connection. Exactly one per workspace. */
|
|
2
|
+
export interface DatadogConnectionRecord {
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
/** Datadog site host, e.g. 'datadoghq.com' | 'datadoghq.eu' | 'us5.datadoghq.com'. */
|
|
5
|
+
site: string;
|
|
6
|
+
/** Datadog API key (DD-API-KEY). */
|
|
7
|
+
apiKey: string;
|
|
8
|
+
/** Datadog application key (DD-APPLICATION-KEY). */
|
|
9
|
+
appKey: string;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
}
|
|
13
|
+
export interface DatadogConnectionRepository {
|
|
14
|
+
get(workspaceId: string): Promise<DatadogConnectionRecord | null>;
|
|
15
|
+
upsert(record: DatadogConnectionRecord): Promise<void>;
|
|
16
|
+
delete(workspaceId: string): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Per-repo/service release-health config: which Datadog monitors/SLOs map to a
|
|
20
|
+
* block (the service frame a run's repo target resolves to). Drives the gate's
|
|
21
|
+
* `probe` reads for that run.
|
|
22
|
+
*/
|
|
23
|
+
export interface ReleaseHealthConfigRecord {
|
|
24
|
+
workspaceId: string;
|
|
25
|
+
/** The service frame (or task) block these monitors/SLOs belong to. */
|
|
26
|
+
blockId: string;
|
|
27
|
+
/** Datadog monitor ids to watch. */
|
|
28
|
+
monitorIds: string[];
|
|
29
|
+
/** Datadog SLO ids to watch. */
|
|
30
|
+
sloIds: string[];
|
|
31
|
+
/** Optional env tag (e.g. 'prod') used when querying logs/errors. */
|
|
32
|
+
envTag: string | null;
|
|
33
|
+
createdAt: number;
|
|
34
|
+
updatedAt: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ReleaseHealthConfigRepository {
|
|
37
|
+
getByBlock(workspaceId: string, blockId: string): Promise<ReleaseHealthConfigRecord | null>;
|
|
38
|
+
listByWorkspace(workspaceId: string): Promise<ReleaseHealthConfigRecord[]>;
|
|
39
|
+
upsert(record: ReleaseHealthConfigRecord): Promise<void>;
|
|
40
|
+
delete(workspaceId: string, blockId: string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=release-health-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-health-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/release-health-repositories.ts"],"names":[],"mappings":"AAKA,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;IACjE,MAAM,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtD,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,gCAAgC;IAChC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,qEAAqE;IACrE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,6BAA6B;IAC5C,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IAC3F,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAAA;IAC1E,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Persistence ports for the Datadog post-release-health integration. Both mirror
|
|
2
|
+
// across the D1 (Cloudflare) and Drizzle/Postgres (Node) facades (runtime parity is
|
|
3
|
+
// mandatory). Credentials are sealed at rest by the facade's SecretCipher; the
|
|
4
|
+
// records here carry plaintext only in memory.
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=release-health-repositories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-health-repositories.js","sourceRoot":"","sources":["../../src/ports/release-health-repositories.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oFAAoF;AACpF,+EAA+E;AAC/E,+CAA+C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** The state of a single monitored signal (a Datadog monitor or SLO). */
|
|
2
|
+
export type ReleaseSignalState = 'ok' | 'warn' | 'alert' | 'no_data';
|
|
3
|
+
/** Whether a {@link ReleaseSignal} is a Datadog monitor or an SLO. */
|
|
4
|
+
export type ReleaseSignalKind = 'monitor' | 'slo';
|
|
5
|
+
/** One configured monitor/SLO, flattened to its current state. */
|
|
6
|
+
export interface ReleaseSignal {
|
|
7
|
+
kind: ReleaseSignalKind;
|
|
8
|
+
/** The Datadog monitor or SLO id. */
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
state: ReleaseSignalState;
|
|
12
|
+
/** Optional human detail (current value vs threshold, SLO budget burn, …). */
|
|
13
|
+
detail?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The provider's verdict on the configured signals (independent of the gate's
|
|
17
|
+
* monitoring-window timing, which the engine layers on):
|
|
18
|
+
* - `healthy` — nothing alerting / no SLO breached.
|
|
19
|
+
* - `pending` — no verdict yet (e.g. `no_data` right after deploy).
|
|
20
|
+
* - `regressed` — at least one monitor alerting or SLO breached.
|
|
21
|
+
*/
|
|
22
|
+
export type ReleaseHealthStatus = 'healthy' | 'pending' | 'regressed';
|
|
23
|
+
export interface ReleaseHealthReport {
|
|
24
|
+
status: ReleaseHealthStatus;
|
|
25
|
+
signals: ReleaseSignal[];
|
|
26
|
+
}
|
|
27
|
+
/** A recent error group / log sample gathered for the on-call investigation. */
|
|
28
|
+
export interface ReleaseErrorSample {
|
|
29
|
+
/** Error class / log group title. */
|
|
30
|
+
title: string;
|
|
31
|
+
/** Occurrences in the window, when known. */
|
|
32
|
+
count?: number;
|
|
33
|
+
/** Epoch ms of first occurrence in the window, when known. */
|
|
34
|
+
firstSeen?: number;
|
|
35
|
+
/** A representative message / sample line. */
|
|
36
|
+
sampleMessage?: string;
|
|
37
|
+
/** Deep link to the source (Datadog log view), when known. */
|
|
38
|
+
url?: string;
|
|
39
|
+
}
|
|
40
|
+
/** The investigation bundle handed to the on-call agent on a regression. */
|
|
41
|
+
export interface ReleaseEvidence {
|
|
42
|
+
/** The signals that are alerting / breached. */
|
|
43
|
+
regressedSignals: ReleaseSignal[];
|
|
44
|
+
/** Recent error groups / log samples from the observability + error sources. */
|
|
45
|
+
errors: ReleaseErrorSample[];
|
|
46
|
+
/** Free-form notes (query windows used, services inspected). */
|
|
47
|
+
notes?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ReleaseHealthProvider {
|
|
50
|
+
/**
|
|
51
|
+
* Read the configured monitors/SLOs for the block's release since `since`
|
|
52
|
+
* (epoch ms of the release marker). The engine combines this verdict with the
|
|
53
|
+
* monitoring-window timing to decide pass / keep-polling / escalate.
|
|
54
|
+
*/
|
|
55
|
+
probe(workspaceId: string, blockId: string, since: number): Promise<ReleaseHealthReport>;
|
|
56
|
+
/** Gather the investigation evidence bundle for the on-call agent. */
|
|
57
|
+
gatherEvidence(workspaceId: string, blockId: string, since: number): Promise<ReleaseEvidence>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=release-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-health.d.ts","sourceRoot":"","sources":["../../src/ports/release-health.ts"],"names":[],"mappings":"AAOA,yEAAyE;AACzE,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpE,sEAAsE;AACtE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,KAAK,CAAA;AAEjD,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAA;IACvB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,kBAAkB,CAAA;IACzB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAA;AAErE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,mBAAmB,CAAA;IAC3B,OAAO,EAAE,aAAa,EAAE,CAAA;CACzB;AAED,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,gBAAgB,EAAE,aAAa,EAAE,CAAA;IACjC,gFAAgF;IAChF,MAAM,EAAE,kBAAkB,EAAE,CAAA;IAC5B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACxF,sEAAsE;IACtE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CAC9F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Port for reading a deployed release's health from an observability provider
|
|
2
|
+
// (today Datadog) for the post-release-health gate. Modelled on `CiStatusProvider`:
|
|
3
|
+
// the gate polls `probe` between durable sleeps over a monitoring window and, on a
|
|
4
|
+
// regression, escalates to the `on-call` agent — handing it the bundle from
|
|
5
|
+
// `gatherEvidence`. Core stays free of Datadog specifics; the facade resolves the
|
|
6
|
+
// block's release-health config (which monitors/SLOs to read) and credentials.
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=release-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-health.js","sourceRoot":"","sources":["../../src/ports/release-health.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AACpF,mFAAmF;AACnF,4EAA4E;AAC5E,kFAAkF;AAClF,+EAA+E"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { BootstrapFailureKind, StepSubtasks } from '../domain/types.js';
|
|
2
|
+
export interface BootstrapRepoRequest {
|
|
3
|
+
/** Workspace the run belongs to (resolves the GitHub installation to use). */
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
/** Id of the bootstrap job this run records into (also keys the container job). */
|
|
6
|
+
jobId: string;
|
|
7
|
+
/** The base repository to clone from, or undefined to scaffold from scratch. */
|
|
8
|
+
referenceRepo?: {
|
|
9
|
+
owner: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
/** The repository to create and bootstrap into. */
|
|
13
|
+
target: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
private: boolean;
|
|
17
|
+
};
|
|
18
|
+
/** Effective bootstrapper instructions (reference defaults + per-run extras). */
|
|
19
|
+
instructions: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BootstrapRepoOutcome {
|
|
22
|
+
/** Web URL of the created repository. */
|
|
23
|
+
repoUrl: string;
|
|
24
|
+
/** Owner the repo was created under. */
|
|
25
|
+
owner: string;
|
|
26
|
+
/** Name of the created repository. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Default branch the bootstrapped contents were pushed to. */
|
|
29
|
+
defaultBranch: string;
|
|
30
|
+
}
|
|
31
|
+
/** Addresses a dispatched bootstrap job for polling (the container is keyed by job id). */
|
|
32
|
+
export interface BootstrapJobHandle {
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
jobId: string;
|
|
35
|
+
}
|
|
36
|
+
/** A bootstrap job's current state, as the container reports it via the poll. */
|
|
37
|
+
export interface BootstrapJobUpdate {
|
|
38
|
+
state: 'running' | 'done' | 'failed';
|
|
39
|
+
/** Present while running once the agent has touched its todo list. */
|
|
40
|
+
subtasks?: StepSubtasks;
|
|
41
|
+
/** Present when `state === 'done'`: where the bootstrapped repo landed. */
|
|
42
|
+
outcome?: BootstrapRepoOutcome;
|
|
43
|
+
/** Present when `state === 'failed'`: why the run faulted. */
|
|
44
|
+
error?: string;
|
|
45
|
+
/** Present when `state === 'failed'`: classification of the fault. */
|
|
46
|
+
failureKind?: BootstrapFailureKind;
|
|
47
|
+
/** Present when `state === 'failed'`: extended diagnostic detail, if any. */
|
|
48
|
+
detail?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface RepoBootstrapper {
|
|
51
|
+
/**
|
|
52
|
+
* Whether the workspace is connected to GitHub (an active App installation
|
|
53
|
+
* exists). Checked before a run starts so an unconnected workspace fails fast
|
|
54
|
+
* with a clear error instead of recording a job that immediately fails.
|
|
55
|
+
*/
|
|
56
|
+
isWorkspaceConnected(workspaceId: string): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Pre-flight the target repo (exists, reachable, empty-or-boilerplate) and
|
|
59
|
+
* dispatch the bootstrap container. Returns once the job is accepted — the work
|
|
60
|
+
* continues in the container, polled via {@link pollBootstrap}. Throws on a
|
|
61
|
+
* pre-flight failure (e.g. the repo has real content) so the run fails fast.
|
|
62
|
+
* Idempotent per job id: a re-dispatch re-attaches rather than duplicating.
|
|
63
|
+
*/
|
|
64
|
+
startBootstrap(request: BootstrapRepoRequest): Promise<BootstrapJobHandle>;
|
|
65
|
+
/** Poll a dispatched job for progress / its terminal outcome. */
|
|
66
|
+
pollBootstrap(handle: BootstrapJobHandle): Promise<BootstrapJobUpdate>;
|
|
67
|
+
/**
|
|
68
|
+
* Best-effort: stop and reclaim the per-run container for a job (e.g. after the
|
|
69
|
+
* run faulted), so a leaked instance doesn't idle until its sleep timer. Safe to
|
|
70
|
+
* call when the container is already gone — implementations swallow the error.
|
|
71
|
+
*/
|
|
72
|
+
stopBootstrap(handle: BootstrapJobHandle): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* After a successful run: ensure the new repo is present in the local GitHub
|
|
75
|
+
* projection and link it to the board service frame `blockId`, so tasks dropped
|
|
76
|
+
* on that frame resolve to (and are implemented against) the bootstrapped repo.
|
|
77
|
+
*/
|
|
78
|
+
linkRepoToBlock(workspaceId: string, outcome: BootstrapRepoOutcome, blockId: string): Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=repo-bootstrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-bootstrapper.d.ts","sourceRoot":"","sources":["../../src/ports/repo-bootstrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAe5E,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAA;IACnB,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,aAAa,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,mDAAmD;IACnD,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/D,iFAAiF;IACjF,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,2FAA2F;AAC3F,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,iFAAiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAA;IACpC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC3D;;;;;;OAMG;IACH,cAAc,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC1E,iEAAiE;IACjE,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACtE;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD;;;;OAIG;IACH,eAAe,CACb,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-bootstrapper.js","sourceRoot":"","sources":["../../src/ports/repo-bootstrapper.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BlueprintService, BlueprintSource } from '../domain/types.js';
|
|
2
|
+
export interface ScanRepoRequest {
|
|
3
|
+
/** Workspace the scan belongs to (resolves the GitHub installation to use). */
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
/** The repository to scan. */
|
|
6
|
+
repo: {
|
|
7
|
+
owner: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
/** Extra guidance for the scanner (focus areas, naming, granularity). */
|
|
11
|
+
instructions: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ScannedBlueprint {
|
|
14
|
+
/** Whether an LLM produced the decomposition, or the deterministic heuristic. */
|
|
15
|
+
source: BlueprintSource;
|
|
16
|
+
/** The repository decomposed into one service frame with its modules. */
|
|
17
|
+
service: BlueprintService;
|
|
18
|
+
}
|
|
19
|
+
export interface RepoScanner {
|
|
20
|
+
scan(request: ScanRepoRequest): Promise<ScannedBlueprint>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=repo-scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-scanner.d.ts","sourceRoot":"","sources":["../../src/ports/repo-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAQ3E,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAA;IACnB,8BAA8B;IAC9B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACrC,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,MAAM,EAAE,eAAe,CAAA;IACvB,yEAAyE;IACzE,OAAO,EAAE,gBAAgB,CAAA;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAC1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-scanner.js","sourceRoot":"","sources":["../../src/ports/repo-scanner.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { AgentFailure, Block, ExecutionInstance, Pipeline, Workspace } from '../domain/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The set of boards a signed-in user may see: those belonging to an account they
|
|
4
|
+
* are a member of, plus any legacy boards they personally own (account_id NULL,
|
|
5
|
+
* owner_user_id = them). `null` means "no scoping" — the auth-disabled / local-dev
|
|
6
|
+
* path, where every board is returned.
|
|
7
|
+
*/
|
|
8
|
+
export type WorkspaceVisibility = {
|
|
9
|
+
accountIds: string[];
|
|
10
|
+
ownerUserId: string;
|
|
11
|
+
} | null;
|
|
12
|
+
export interface WorkspaceRepository {
|
|
13
|
+
/**
|
|
14
|
+
* List boards visible to a user (see {@link WorkspaceVisibility}). A `null`
|
|
15
|
+
* scope means ownership is not being enforced (auth disabled) and ALL boards
|
|
16
|
+
* are returned.
|
|
17
|
+
*/
|
|
18
|
+
listVisible(scope: WorkspaceVisibility): Promise<Workspace[]>;
|
|
19
|
+
get(id: string): Promise<Workspace | null>;
|
|
20
|
+
/**
|
|
21
|
+
* The owning user id for a board: a string when owned, `null` for a board with
|
|
22
|
+
* no owner, and `undefined` when the board does not exist.
|
|
23
|
+
*/
|
|
24
|
+
ownerOf(id: string): Promise<string | null | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* The owning account id for a board: a string when account-scoped, `null` for a
|
|
27
|
+
* legacy/unscoped board, and `undefined` when the board does not exist. Used by
|
|
28
|
+
* the API's per-workspace authorization check.
|
|
29
|
+
*/
|
|
30
|
+
accountOf(id: string): Promise<string | null | undefined>;
|
|
31
|
+
create(workspace: Workspace, ownerUserId: string | null, accountId: string | null): Promise<void>;
|
|
32
|
+
rename(id: string, name: string): Promise<void>;
|
|
33
|
+
/** Update a board's description (null clears it). */
|
|
34
|
+
setDescription(id: string, description: string | null): Promise<void>;
|
|
35
|
+
delete(id: string): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fields of a block that may be patched. Excludes `id`; the `parentId`/`position`
|
|
39
|
+
* structural move is just another patch, kept honest by the adapter.
|
|
40
|
+
*/
|
|
41
|
+
export type BlockPatch = Partial<Omit<Block, 'id'>>;
|
|
42
|
+
export interface BlockRepository {
|
|
43
|
+
listByWorkspace(workspaceId: string): Promise<Block[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Every block belonging to a service (its frame + modules + tasks), regardless of
|
|
46
|
+
* which workspace created them. Backs the board composition that renders a service
|
|
47
|
+
* mounted from another workspace in the same org. Returns the blocks whose
|
|
48
|
+
* `service_id` column matches (set at insert time when the service repos are wired).
|
|
49
|
+
*/
|
|
50
|
+
listByService(serviceId: string): Promise<Block[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Every block belonging to ANY of the given services, in a single (chunked) query — the
|
|
53
|
+
* batched form of {@link BlockRepository.listByService} used to compose a board from all the
|
|
54
|
+
* services it mounts without one round-trip per service. Empty input → empty result.
|
|
55
|
+
*/
|
|
56
|
+
listByServices(serviceIds: string[]): Promise<Block[]>;
|
|
57
|
+
get(workspaceId: string, id: string): Promise<Block | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve a block by its (globally unique) id, regardless of which workspace homes it,
|
|
60
|
+
* returning the block plus its home `workspaceId` and its `serviceId` (or null). Backs
|
|
61
|
+
* the shared-board mutation path: a block belonging to a service mounted from another
|
|
62
|
+
* workspace is acted on at its home workspace (after the caller authorizes that the
|
|
63
|
+
* requester mounts the service). Returns null when no block has that id.
|
|
64
|
+
*/
|
|
65
|
+
findById(blockId: string): Promise<{
|
|
66
|
+
workspaceId: string;
|
|
67
|
+
serviceId: string | null;
|
|
68
|
+
block: Block;
|
|
69
|
+
} | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Insert a block. `serviceId` stamps the account-owned service the block belongs to
|
|
72
|
+
* (so it can be rendered on every workspace that mounts the service); omit/undefined
|
|
73
|
+
* for legacy, workspace-local blocks.
|
|
74
|
+
*/
|
|
75
|
+
insert(workspaceId: string, block: Block, serviceId?: string | null): Promise<void>;
|
|
76
|
+
update(workspaceId: string, id: string, patch: BlockPatch): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Re-stamp the `service_id` of one or more blocks. Used when a block is reparented into a
|
|
79
|
+
* different service's frame (`service_id` is not part of {@link BlockPatch}, since it is the
|
|
80
|
+
* physical scope key, not a domain field): the moved subtree must follow its new owning
|
|
81
|
+
* service so it renders on — and fans out to — the right boards.
|
|
82
|
+
*/
|
|
83
|
+
setService(workspaceId: string, ids: string[], serviceId: string | null): Promise<void>;
|
|
84
|
+
deleteMany(workspaceId: string, ids: string[]): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
export interface PipelineRepository {
|
|
87
|
+
listByWorkspace(workspaceId: string): Promise<Pipeline[]>;
|
|
88
|
+
get(workspaceId: string, id: string): Promise<Pipeline | null>;
|
|
89
|
+
insert(workspaceId: string, pipeline: Pipeline): Promise<void>;
|
|
90
|
+
/** Overwrite an existing pipeline in place (preserving its catalog order). */
|
|
91
|
+
update(workspaceId: string, pipeline: Pipeline): Promise<void>;
|
|
92
|
+
delete(workspaceId: string, id: string): Promise<void>;
|
|
93
|
+
}
|
|
94
|
+
/** A lightweight reference to a run, used by the cron sweeper. */
|
|
95
|
+
export interface RunRef {
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
id: string;
|
|
98
|
+
}
|
|
99
|
+
export interface ExecutionRepository {
|
|
100
|
+
listByWorkspace(workspaceId: string): Promise<ExecutionInstance[]>;
|
|
101
|
+
/**
|
|
102
|
+
* Every execution belonging to a service, regardless of which workspace it ran under.
|
|
103
|
+
* Backs the board snapshot for a service mounted from another workspace in the same org,
|
|
104
|
+
* so its run progress/status renders identically on every board that mounts it (not just
|
|
105
|
+
* on its home workspace). Matches the `service_id` column stamped at insert time.
|
|
106
|
+
*/
|
|
107
|
+
listByService(serviceId: string): Promise<ExecutionInstance[]>;
|
|
108
|
+
/**
|
|
109
|
+
* Every execution belonging to ANY of the given services, in a single (chunked) query — the
|
|
110
|
+
* batched form of {@link ExecutionRepository.listByService} used to compose a board's runs
|
|
111
|
+
* from all the services it mounts without one round-trip per mount. Empty input → empty.
|
|
112
|
+
*/
|
|
113
|
+
listByServices(serviceIds: string[]): Promise<ExecutionInstance[]>;
|
|
114
|
+
get(workspaceId: string, id: string): Promise<ExecutionInstance | null>;
|
|
115
|
+
getByBlock(workspaceId: string, blockId: string): Promise<ExecutionInstance | null>;
|
|
116
|
+
upsert(workspaceId: string, execution: ExecutionInstance): Promise<void>;
|
|
117
|
+
deleteByBlock(workspaceId: string, blockId: string): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Runs still marked `running` whose lease (`updated_at`) is older than the
|
|
120
|
+
* given epoch-ms cutoff — i.e. candidates the durable driver may have dropped.
|
|
121
|
+
* Spans all workspaces so a single cron pass can repair the whole system.
|
|
122
|
+
*/
|
|
123
|
+
listStale(olderThanEpochMs: number): Promise<RunRef[]>;
|
|
124
|
+
/**
|
|
125
|
+
* Record a terminal agent failure: flip the run to `failed` and store the
|
|
126
|
+
* structured {@link AgentFailure} (its `message` mirrors the legacy one-line
|
|
127
|
+
* `error`). Surfaces the same failure banner + retry as a failed bootstrap.
|
|
128
|
+
*/
|
|
129
|
+
markFailed(workspaceId: string, id: string, failure: AgentFailure): Promise<void>;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../src/ports/repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACV,MAAM,oBAAoB,CAAA;AAS3B;;;;;GAKG;AACH,MAAM,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;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAClF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.js","sourceRoot":"","sources":["../../src/ports/repositories.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RequirementReview } from '../domain/types.js';
|
|
2
|
+
export interface RequirementReviewRepository {
|
|
3
|
+
/** The current review for a block, or null if none has been run. */
|
|
4
|
+
getByBlock(workspaceId: string, blockId: string): Promise<RequirementReview | null>;
|
|
5
|
+
/** A review by its id, or null if it does not exist. */
|
|
6
|
+
get(workspaceId: string, id: string): Promise<RequirementReview | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Create or replace a review. Replacing the block's prior review is the caller's
|
|
9
|
+
* responsibility (the service deletes it before inserting a fresh one), so a
|
|
10
|
+
* block never accumulates stale reviews.
|
|
11
|
+
*/
|
|
12
|
+
upsert(workspaceId: string, review: RequirementReview): Promise<void>;
|
|
13
|
+
/** Drop any existing review(s) for a block (called before a fresh review run). */
|
|
14
|
+
deleteByBlock(workspaceId: string, blockId: string): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=requirement-review-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirement-review-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/requirement-review-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAQ3D,MAAM,WAAW,2BAA2B;IAC1C,oEAAoE;IACpE,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IACnF,wDAAwD;IACxD,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IACvE;;;;OAIG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrE,kFAAkF;IAClF,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirement-review-repositories.js","sourceRoot":"","sources":["../../src/ports/requirement-review-repositories.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RunnerPoolManifest } from '../domain/types.js';
|
|
2
|
+
import type { SecretResolver } from './environment-provider.js';
|
|
3
|
+
import type { RunnerJobView } from './runner-transport.js';
|
|
4
|
+
export interface RunnerDispatchRequest {
|
|
5
|
+
manifest: RunnerPoolManifest;
|
|
6
|
+
/** The cat-factory job id (execution id) the pool is keyed on. */
|
|
7
|
+
jobId: string;
|
|
8
|
+
/** The harness job spec; available to templates as `{{input.job}}` (JSON). */
|
|
9
|
+
spec: Record<string, unknown>;
|
|
10
|
+
resolveSecret: SecretResolver;
|
|
11
|
+
}
|
|
12
|
+
export interface RunnerPollRequest {
|
|
13
|
+
manifest: RunnerPoolManifest;
|
|
14
|
+
jobId: string;
|
|
15
|
+
resolveSecret: SecretResolver;
|
|
16
|
+
}
|
|
17
|
+
export interface RunnerPoolProvider {
|
|
18
|
+
/** Start (or re-attach to) the job on the pool. Idempotent per `jobId`. */
|
|
19
|
+
dispatch(req: RunnerDispatchRequest): Promise<void>;
|
|
20
|
+
/** Read the job's current state, mapped onto the canonical view. */
|
|
21
|
+
poll(req: RunnerPollRequest): Promise<RunnerJobView>;
|
|
22
|
+
/** Free the job/runner (only when the manifest declares a `release` template). */
|
|
23
|
+
release(req: RunnerPollRequest): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=runner-pool-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-pool-provider.d.ts","sourceRoot":"","sources":["../../src/ports/runner-pool-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAS1D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnD,oEAAoE;IACpE,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IACpD,kFAAkF;IAClF,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-pool-provider.js","sourceRoot":"","sources":["../../src/ports/runner-pool-provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A workspace's binding to a self-hosted runner pool: the validated manifest and
|
|
3
|
+
* the encrypted per-tenant secret bundle (the scheduler-API credentials). The
|
|
4
|
+
* bundle is decrypted only in-memory, at call time, by the dispatch/poll path.
|
|
5
|
+
*/
|
|
6
|
+
export interface RunnerPoolConnectionRecord {
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
providerId: string;
|
|
9
|
+
label: string;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
/** The validated manifest, serialized as JSON. */
|
|
12
|
+
manifestJson: string;
|
|
13
|
+
/** Ciphertext of the `{ key: value }` secret bundle (SecretCipher envelope). */
|
|
14
|
+
secretsCipher: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
/** Set when the workspace unregisters (tombstone). */
|
|
17
|
+
deletedAt: number | null;
|
|
18
|
+
}
|
|
19
|
+
export interface RunnerPoolConnectionRepository {
|
|
20
|
+
/** The workspace's live connection, or null if not registered. */
|
|
21
|
+
getByWorkspace(workspaceId: string): Promise<RunnerPoolConnectionRecord | null>;
|
|
22
|
+
/** Create or replace the live connection for a workspace. */
|
|
23
|
+
upsert(record: RunnerPoolConnectionRecord): Promise<void>;
|
|
24
|
+
/** Tombstone the workspace's connection. */
|
|
25
|
+
softDelete(workspaceId: string, at: number): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=runner-pool-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-pool-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/runner-pool-repositories.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,sDAAsD;IACtD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,8BAA8B;IAC7C,kEAAkE;IAClE,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAA;IAC/E,6DAA6D;IAC7D,MAAM,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,4CAA4C;IAC5C,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Persistence port for the self-hosted runner-pool integration. The worker
|
|
2
|
+
// implements this against D1 (migration 0013); tests can supply an in-memory
|
|
3
|
+
// fake. Rows are scoped by workspace, mirroring the environment-connection
|
|
4
|
+
// repository. The management-API secret bundle is stored as opaque ciphertext
|
|
5
|
+
// (see the SecretCipher port) — this record never holds plaintext secrets.
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=runner-pool-repositories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner-pool-repositories.js","sourceRoot":"","sources":["../../src/ports/runner-pool-repositories.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,2EAA2E"}
|