@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,369 @@
|
|
|
1
|
+
import { mergeRegisteredPipelines } from './pipeline-registry.js';
|
|
2
|
+
// Sample architecture used to populate a workspace on creation. Mirrors the
|
|
3
|
+
// frontend's `app/utils/seed.ts`. Block ids are stable strings; because blocks
|
|
4
|
+
// are keyed by (workspace_id, id) every workspace gets its own copy, so reusing
|
|
5
|
+
// these ids across workspaces is safe.
|
|
6
|
+
export function seedBlocks() {
|
|
7
|
+
const base = (b) => ({
|
|
8
|
+
description: '',
|
|
9
|
+
status: 'planned',
|
|
10
|
+
progress: 0,
|
|
11
|
+
dependsOn: [],
|
|
12
|
+
executionId: null,
|
|
13
|
+
level: 'frame',
|
|
14
|
+
parentId: null,
|
|
15
|
+
...b,
|
|
16
|
+
});
|
|
17
|
+
return [
|
|
18
|
+
base({
|
|
19
|
+
id: 'blk_frontend',
|
|
20
|
+
title: 'Web Frontend',
|
|
21
|
+
type: 'frontend',
|
|
22
|
+
position: { x: 80, y: 80 },
|
|
23
|
+
description: 'Customer-facing SPA consuming the API gateway.',
|
|
24
|
+
status: 'planned',
|
|
25
|
+
}),
|
|
26
|
+
base({
|
|
27
|
+
id: 'blk_api',
|
|
28
|
+
title: 'API Gateway',
|
|
29
|
+
type: 'api',
|
|
30
|
+
position: { x: 620, y: 80 },
|
|
31
|
+
description: 'Single entrypoint; routing, rate limiting, auth checks.',
|
|
32
|
+
status: 'planned',
|
|
33
|
+
}),
|
|
34
|
+
base({
|
|
35
|
+
id: 'blk_payments',
|
|
36
|
+
title: 'Payments (External)',
|
|
37
|
+
type: 'external',
|
|
38
|
+
position: { x: 1160, y: 80 },
|
|
39
|
+
description: 'Third-party payment provider integration.',
|
|
40
|
+
status: 'planned',
|
|
41
|
+
}),
|
|
42
|
+
base({
|
|
43
|
+
id: 'blk_auth',
|
|
44
|
+
title: 'Auth Service',
|
|
45
|
+
type: 'service',
|
|
46
|
+
position: { x: 80, y: 580 },
|
|
47
|
+
description: 'Issues and validates sessions and access tokens.',
|
|
48
|
+
status: 'ready',
|
|
49
|
+
}),
|
|
50
|
+
base({
|
|
51
|
+
id: 'blk_db',
|
|
52
|
+
title: 'Core Database',
|
|
53
|
+
type: 'database',
|
|
54
|
+
position: { x: 620, y: 580 },
|
|
55
|
+
description: 'Primary relational store for users, accounts and orders.',
|
|
56
|
+
status: 'done',
|
|
57
|
+
progress: 1,
|
|
58
|
+
}),
|
|
59
|
+
base({
|
|
60
|
+
id: 'blk_queue',
|
|
61
|
+
title: 'Notification Queue',
|
|
62
|
+
type: 'queue',
|
|
63
|
+
position: { x: 1160, y: 580 },
|
|
64
|
+
description: 'Async fan-out for emails and push notifications.',
|
|
65
|
+
status: 'planned',
|
|
66
|
+
}),
|
|
67
|
+
// Tasks (draggable) inside the Auth Service.
|
|
68
|
+
base({
|
|
69
|
+
id: 'task_login',
|
|
70
|
+
title: 'Login endpoint',
|
|
71
|
+
type: 'service',
|
|
72
|
+
position: { x: 24, y: 96 },
|
|
73
|
+
description: 'Issue a session on valid credentials.',
|
|
74
|
+
status: 'planned',
|
|
75
|
+
level: 'task',
|
|
76
|
+
parentId: 'blk_auth',
|
|
77
|
+
moduleName: 'Sessions',
|
|
78
|
+
}),
|
|
79
|
+
base({
|
|
80
|
+
id: 'task_refresh',
|
|
81
|
+
title: 'Token refresh',
|
|
82
|
+
type: 'service',
|
|
83
|
+
position: { x: 230, y: 96 },
|
|
84
|
+
description: 'Rotate access tokens against a refresh token.',
|
|
85
|
+
status: 'planned',
|
|
86
|
+
level: 'task',
|
|
87
|
+
parentId: 'blk_auth',
|
|
88
|
+
moduleName: 'Sessions',
|
|
89
|
+
dependsOn: ['task_login'],
|
|
90
|
+
}),
|
|
91
|
+
// A module that already exists, with an implemented task living inside it.
|
|
92
|
+
base({
|
|
93
|
+
id: 'mod_sessions',
|
|
94
|
+
title: 'Sessions',
|
|
95
|
+
type: 'service',
|
|
96
|
+
position: { x: 24, y: 250 },
|
|
97
|
+
description: 'Session lifecycle module.',
|
|
98
|
+
level: 'module',
|
|
99
|
+
parentId: 'blk_auth',
|
|
100
|
+
}),
|
|
101
|
+
base({
|
|
102
|
+
id: 'task_session',
|
|
103
|
+
title: 'Session store',
|
|
104
|
+
type: 'service',
|
|
105
|
+
position: { x: 16, y: 40 },
|
|
106
|
+
description: 'Persist and look up active sessions.',
|
|
107
|
+
status: 'done',
|
|
108
|
+
progress: 1,
|
|
109
|
+
level: 'task',
|
|
110
|
+
parentId: 'mod_sessions',
|
|
111
|
+
moduleName: 'Sessions',
|
|
112
|
+
confidence: 0.92,
|
|
113
|
+
}),
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Reusable pipelines shown in the pipeline palette on first load: the built-in catalog
|
|
118
|
+
* plus any pipelines a deployment registered via `registerPipeline` (e.g. a proprietary
|
|
119
|
+
* org package), merged by id.
|
|
120
|
+
*/
|
|
121
|
+
export function seedPipelines() {
|
|
122
|
+
const builtins = [
|
|
123
|
+
{
|
|
124
|
+
id: 'pl_full',
|
|
125
|
+
name: 'Full build',
|
|
126
|
+
// `requirements` runs first and reviews the collected requirements; the
|
|
127
|
+
// spec-writer then applies them as an increment onto the in-repo spec baseline,
|
|
128
|
+
// and only THEN does the
|
|
129
|
+
// architect design the solution — against that written spec (the architect is
|
|
130
|
+
// spec-aware, so it reads `spec/` from its checkout). The requirements review and
|
|
131
|
+
// the architecture pause for human approval (their proposals are reviewed/edited
|
|
132
|
+
// before the next step); the spec is NOT human-gated — its `spec-companion`
|
|
133
|
+
// (Spec Reviewer) rates it and loops the spec-writer back automatically instead.
|
|
134
|
+
// `blueprints` runs right after implementation so the service map (and the board)
|
|
135
|
+
// is refreshed from the just-written code, on the same PR branch. `conflicts`
|
|
136
|
+
// then ensures the PR is mergeable with its base — looping a `conflict-resolver`
|
|
137
|
+
// agent to merge the base in and resolve any conflicts — `ci` gates the
|
|
138
|
+
// (now-final, up-to-date) PR branch on green CI — looping a `ci-fixer` agent on
|
|
139
|
+
// failure — and `merger` runs last: it scores the PR and either auto-merges
|
|
140
|
+
// (within the task's thresholds) or raises a review notification.
|
|
141
|
+
agentKinds: [
|
|
142
|
+
'requirements-review',
|
|
143
|
+
// The spec-writer applies THIS task's clarified requirements as an increment
|
|
144
|
+
// onto the spec already committed at the branch's baseline (what's merged so
|
|
145
|
+
// far), writing the complete updated in-repo `spec/` document onto the work
|
|
146
|
+
// branch BEFORE the architect and coder run — so the spec (and its Gherkin
|
|
147
|
+
// acceptance scenarios) is the source of truth the architect designs against
|
|
148
|
+
// and the code is written to satisfy. An unmerged sibling task's work is never
|
|
149
|
+
// visible: the only inputs are this task's requirements and the baseline. It
|
|
150
|
+
// is NOT human-gated: the `spec-companion` (Spec Reviewer) below rates the
|
|
151
|
+
// spec and loops the spec-writer back for automatic rework below threshold.
|
|
152
|
+
'spec-writer',
|
|
153
|
+
// `spec-companion` is the spec-writer's optional reviewer: it grades the
|
|
154
|
+
// spec (especially acceptance-scenario coverage), and below its threshold
|
|
155
|
+
// loops the spec-writer back with the feedback folded in — replacing the
|
|
156
|
+
// human review the spec used to require.
|
|
157
|
+
'spec-companion',
|
|
158
|
+
'architect',
|
|
159
|
+
'researcher',
|
|
160
|
+
'coder',
|
|
161
|
+
// `reviewer` is the coder's companion: it rates the change IMMEDIATELY after
|
|
162
|
+
// implementation and loops the coder back for automatic rework when quality is
|
|
163
|
+
// below threshold (see companions) — so review + rework happen before the
|
|
164
|
+
// map/test tail runs, on already-reviewed code.
|
|
165
|
+
'reviewer',
|
|
166
|
+
'blueprints',
|
|
167
|
+
// `mocker` stands up the external-dependency mocks the tester needs to run
|
|
168
|
+
// the suite locally, so it always runs immediately before `tester`.
|
|
169
|
+
'mocker',
|
|
170
|
+
'tester',
|
|
171
|
+
'conflicts',
|
|
172
|
+
'ci',
|
|
173
|
+
'merger',
|
|
174
|
+
],
|
|
175
|
+
// Gate only the context requirements review (index 0) and the architecture
|
|
176
|
+
// proposal (`architect`, index 3). The spec is NO LONGER human-gated — its
|
|
177
|
+
// `spec-companion` (index 2) is the quality gate (rate + automatic rework). The
|
|
178
|
+
// `mocker` / `tester` / `conflicts` / `ci` / `merger` tail
|
|
179
|
+
// is never human-gated (it gates/decides itself), so those slots are false too.
|
|
180
|
+
gates: [
|
|
181
|
+
true,
|
|
182
|
+
false,
|
|
183
|
+
false,
|
|
184
|
+
true,
|
|
185
|
+
false,
|
|
186
|
+
false,
|
|
187
|
+
false,
|
|
188
|
+
false,
|
|
189
|
+
false,
|
|
190
|
+
false,
|
|
191
|
+
false,
|
|
192
|
+
false,
|
|
193
|
+
false,
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
// The most thorough preset: a complex, full-stack feature run that engages
|
|
198
|
+
// every valuable agent so no angle is left uncovered. It extends "Full build"
|
|
199
|
+
// with the up-front researcher, the acceptance-scenario author, the external-
|
|
200
|
+
// dependency mock builder, the business-logic documenter and the developer
|
|
201
|
+
// documenter, in addition to the runnable end-to-end (`playwright`) tests:
|
|
202
|
+
//
|
|
203
|
+
// requirements-review → analyse + clarify the collected context (human gate)
|
|
204
|
+
// researcher → investigate prior art, libraries and constraints
|
|
205
|
+
// spec-writer → apply this task's clarified requirements as a spec
|
|
206
|
+
// increment (+ acceptance scenarios) onto the baseline
|
|
207
|
+
// on the work branch BEFORE the design/code
|
|
208
|
+
// spec-companion → challenge acceptance-scenario coverage; loop the
|
|
209
|
+
// spec-writer back below threshold (no human gate)
|
|
210
|
+
// architect → design the solution against the written spec
|
|
211
|
+
// architect-companion → challenge the design's quality; loop back below
|
|
212
|
+
// threshold, then raise the human gate on a pass
|
|
213
|
+
// mocker → stand up mocks for the external dependencies
|
|
214
|
+
// coder → implement the feature on the implementation branch
|
|
215
|
+
// reviewer → coder's companion: rate the change immediately, loop back
|
|
216
|
+
// for rework before the map/test tail runs
|
|
217
|
+
// blueprints → refresh the in-repo service map from the new code
|
|
218
|
+
// business-documenter → capture the domain rules the code now encodes
|
|
219
|
+
// tester → define the unit / integration test strategy
|
|
220
|
+
// playwright → author the runnable end-to-end / acceptance TESTS (from the
|
|
221
|
+
// spec's derived Gherkin)
|
|
222
|
+
// documenter → write the developer-facing documentation
|
|
223
|
+
// conflicts → ci → merger → the same mergeability / CI / merge tail as Full build
|
|
224
|
+
id: 'pl_fullstack',
|
|
225
|
+
name: 'Complex fullstack feature',
|
|
226
|
+
agentKinds: [
|
|
227
|
+
'requirements-review',
|
|
228
|
+
'researcher',
|
|
229
|
+
'spec-writer',
|
|
230
|
+
'spec-companion',
|
|
231
|
+
'architect',
|
|
232
|
+
'architect-companion',
|
|
233
|
+
'mocker',
|
|
234
|
+
'coder',
|
|
235
|
+
'reviewer',
|
|
236
|
+
'blueprints',
|
|
237
|
+
'business-documenter',
|
|
238
|
+
'tester',
|
|
239
|
+
'playwright',
|
|
240
|
+
'documenter',
|
|
241
|
+
'conflicts',
|
|
242
|
+
'ci',
|
|
243
|
+
'merger',
|
|
244
|
+
],
|
|
245
|
+
// Human gates: the context requirements review (index 0) and — after its
|
|
246
|
+
// companion has cleared the quality bar — the architecture (on `architect-
|
|
247
|
+
// companion`, index 5). The spec is NOT human-gated: its `spec-companion`
|
|
248
|
+
// (index 3) rates it and loops the spec-writer back automatically. Every other
|
|
249
|
+
// step (including the self-gating conflicts / ci / merger tail and the auto-only
|
|
250
|
+
// `reviewer` companion) runs straight through.
|
|
251
|
+
gates: [
|
|
252
|
+
true,
|
|
253
|
+
false,
|
|
254
|
+
false,
|
|
255
|
+
false,
|
|
256
|
+
false,
|
|
257
|
+
true,
|
|
258
|
+
false,
|
|
259
|
+
false,
|
|
260
|
+
false,
|
|
261
|
+
false,
|
|
262
|
+
false,
|
|
263
|
+
false,
|
|
264
|
+
false,
|
|
265
|
+
false,
|
|
266
|
+
false,
|
|
267
|
+
false,
|
|
268
|
+
false,
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
// A bug-fix preset, front-loaded with the investigate → triage pair:
|
|
273
|
+
// bug-investigator → read the codebase from the raw report (read-only) and emit an
|
|
274
|
+
// enriched report + an optional, confidence-gated hypothesis
|
|
275
|
+
// clarity-review → triage that report for fixability (human gate; the iterative
|
|
276
|
+
// answer → incorporate → re-review loop), producing the clarified
|
|
277
|
+
// brief downstream agents consume
|
|
278
|
+
// spec-writer → fold the clarified brief into the in-repo spec
|
|
279
|
+
// architect → coder → reviewer → the design/implement/review core
|
|
280
|
+
// conflicts → ci → merger → the standard mergeability / CI / merge tail
|
|
281
|
+
// Only the clarity review is a human gate; the read-only investigator auto-advances.
|
|
282
|
+
id: 'pl_bugfix',
|
|
283
|
+
name: 'Triage & fix bug',
|
|
284
|
+
agentKinds: [
|
|
285
|
+
'bug-investigator',
|
|
286
|
+
'clarity-review',
|
|
287
|
+
'spec-writer',
|
|
288
|
+
'architect',
|
|
289
|
+
'coder',
|
|
290
|
+
'reviewer',
|
|
291
|
+
'conflicts',
|
|
292
|
+
'ci',
|
|
293
|
+
'merger',
|
|
294
|
+
],
|
|
295
|
+
gates: [false, true, false, false, false, false, false, false, false],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: 'pl_quick',
|
|
299
|
+
name: 'Quick implement',
|
|
300
|
+
agentKinds: ['coder', 'blueprints', 'mocker', 'tester', 'conflicts', 'ci', 'merger'],
|
|
301
|
+
},
|
|
302
|
+
// The leanest end-to-end build: implement → review → test, then the standard
|
|
303
|
+
// mergeability / CI / merge tail. The `coder` (Implementer) writes the change,
|
|
304
|
+
// its `reviewer` companion rates it immediately and loops it back for automatic
|
|
305
|
+
// rework below threshold, `mocker` stands up the external-dependency mocks the
|
|
306
|
+
// `tester` needs to run the suite, and `conflicts` / `ci` / `merger` gate and
|
|
307
|
+
// ship the PR — no design, spec or docs phases.
|
|
308
|
+
{
|
|
309
|
+
id: 'pl_simple',
|
|
310
|
+
name: 'Simple',
|
|
311
|
+
agentKinds: ['coder', 'reviewer', 'mocker', 'tester', 'conflicts', 'ci', 'merger'],
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'pl_integrate',
|
|
315
|
+
name: 'Integrate & ship',
|
|
316
|
+
agentKinds: ['integrator', 'mocker', 'tester', 'documenter'],
|
|
317
|
+
},
|
|
318
|
+
// Recurring-pipeline presets. "Dependency updates" is a plain implement →
|
|
319
|
+
// review → merge run; "Tech debt" first runs a read-only `analysis` agent and
|
|
320
|
+
// a special `tracker` step (files a GitHub issue / Jira ticket from the
|
|
321
|
+
// analysis) before implementation. Both are picked when creating a recurring
|
|
322
|
+
// pipeline on a service.
|
|
323
|
+
{
|
|
324
|
+
id: 'pl_dep_update',
|
|
325
|
+
name: 'Dependency updates',
|
|
326
|
+
agentKinds: [
|
|
327
|
+
'coder',
|
|
328
|
+
'reviewer',
|
|
329
|
+
'blueprints',
|
|
330
|
+
'mocker',
|
|
331
|
+
'tester',
|
|
332
|
+
'conflicts',
|
|
333
|
+
'ci',
|
|
334
|
+
'merger',
|
|
335
|
+
],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
id: 'pl_tech_debt',
|
|
339
|
+
name: 'Tech debt',
|
|
340
|
+
agentKinds: [
|
|
341
|
+
'analysis',
|
|
342
|
+
'tracker',
|
|
343
|
+
'coder',
|
|
344
|
+
'reviewer',
|
|
345
|
+
'blueprints',
|
|
346
|
+
'mocker',
|
|
347
|
+
'tester',
|
|
348
|
+
'conflicts',
|
|
349
|
+
'ci',
|
|
350
|
+
'merger',
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
// A blueprint-only pipeline, run after a bootstrap to create the initial
|
|
354
|
+
// service map (and populate the board) from the freshly bootstrapped repo.
|
|
355
|
+
{ id: 'pl_blueprint', name: 'Map service', agentKinds: ['blueprints'] },
|
|
356
|
+
// A spec-only pipeline, to (re)generate a service's unified in-repo specification
|
|
357
|
+
// (and its Gherkin acceptance scenarios) independently.
|
|
358
|
+
{ id: 'pl_spec', name: 'Write spec', agentKinds: ['spec-writer'] },
|
|
359
|
+
];
|
|
360
|
+
// Every curated catalog pipeline is a read-only template: it can be cloned into an
|
|
361
|
+
// editable copy but not edited in place (see PipelineService.update / clone).
|
|
362
|
+
return mergeRegisteredPipelines(builtins.map((p) => ({ ...p, builtin: true })));
|
|
363
|
+
}
|
|
364
|
+
/** Pipeline id of the blueprint-only run kicked off after a successful bootstrap. */
|
|
365
|
+
export const BLUEPRINT_PIPELINE_ID = 'pl_blueprint';
|
|
366
|
+
/** Pipeline ids of the built-in recurring-pipeline presets. */
|
|
367
|
+
export const DEP_UPDATE_PIPELINE_ID = 'pl_dep_update';
|
|
368
|
+
export const TECH_DEBT_PIPELINE_ID = 'pl_tech_debt';
|
|
369
|
+
//# sourceMappingURL=seed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/domain/seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGjE,4EAA4E;AAC5E,+EAA+E;AAC/E,gFAAgF;AAChF,uCAAuC;AAEvC,MAAM,UAAU,UAAU;IACxB,MAAM,IAAI,GAAG,CAAC,CAAqE,EAAS,EAAE,CAAC,CAAC;QAC9F,WAAW,EAAE,EAAE;QACf,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,IAAI;QACd,GAAG,CAAC;KACL,CAAC,CAAA;IAEF,OAAO;QACL,IAAI,CAAC;YACH,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;YAC1B,WAAW,EAAE,gDAAgD;YAC7D,MAAM,EAAE,SAAS;SAClB,CAAC;QACF,IAAI,CAAC;YACH,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE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EAAE,CAAC,aAAa,CAAC,EAAE;KACnE,CAAA;IACD,mFAAmF;IACnF,8EAA8E;IAC9E,OAAO,wBAAwB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AACjF,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,cAAc,CAAA;AAEnD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAA;AACrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Block } from './types.js';
|
|
2
|
+
import type { Clock, IdGenerator, ServiceRepository, WorkspaceMountRepository, WorkspaceRepository } from '../ports/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The repositories + helpers needed to register a top-level frame as an account-owned
|
|
5
|
+
* service. The service repos are optional so a facade/test without in-org sharing wired
|
|
6
|
+
* keeps the feature cleanly opt-in (registration becomes a no-op).
|
|
7
|
+
*/
|
|
8
|
+
export interface ServiceRegistrationDeps {
|
|
9
|
+
serviceRepository?: ServiceRepository;
|
|
10
|
+
workspaceMountRepository?: WorkspaceMountRepository;
|
|
11
|
+
workspaceRepository: WorkspaceRepository;
|
|
12
|
+
idGenerator: IdGenerator;
|
|
13
|
+
clock: Clock;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Register a newly created top-level frame as an account-owned {@link Service} and mount it
|
|
17
|
+
* onto the creating workspace (in-org sharing), so the frame can be shared with other
|
|
18
|
+
* workspaces in the same org. Returns the new service id to stamp on the frame block (it is
|
|
19
|
+
* then `listByService`-discoverable on every board that mounts the service); the frame's
|
|
20
|
+
* board position is carried on the mount (the per-workspace layout override). Returns
|
|
21
|
+
* undefined — a no-op — when the service repositories aren't wired (legacy/local-only frame).
|
|
22
|
+
*
|
|
23
|
+
* Shared by every site that creates a top-level frame (board drops, repo import, seeded demo
|
|
24
|
+
* boards, repo bootstrap) so they all produce a consistent, shareable service.
|
|
25
|
+
*/
|
|
26
|
+
export declare function registerServiceForFrame(deps: ServiceRegistrationDeps, workspaceId: string, frame: Pick<Block, 'id' | 'position' | 'size'>, repo?: {
|
|
27
|
+
installationId: number;
|
|
28
|
+
githubId: number;
|
|
29
|
+
directory?: string | null;
|
|
30
|
+
}): Promise<string | undefined>;
|
|
31
|
+
//# sourceMappingURL=service-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-registration.d.ts","sourceRoot":"","sources":["../../src/domain/service-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAW,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAE1B;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;CACb;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,uBAAuB,EAC7B,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC,EAC9C,IAAI,CAAC,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC7E,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAuB7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a newly created top-level frame as an account-owned {@link Service} and mount it
|
|
3
|
+
* onto the creating workspace (in-org sharing), so the frame can be shared with other
|
|
4
|
+
* workspaces in the same org. Returns the new service id to stamp on the frame block (it is
|
|
5
|
+
* then `listByService`-discoverable on every board that mounts the service); the frame's
|
|
6
|
+
* board position is carried on the mount (the per-workspace layout override). Returns
|
|
7
|
+
* undefined — a no-op — when the service repositories aren't wired (legacy/local-only frame).
|
|
8
|
+
*
|
|
9
|
+
* Shared by every site that creates a top-level frame (board drops, repo import, seeded demo
|
|
10
|
+
* boards, repo bootstrap) so they all produce a consistent, shareable service.
|
|
11
|
+
*/
|
|
12
|
+
export async function registerServiceForFrame(deps, workspaceId, frame, repo) {
|
|
13
|
+
const { serviceRepository, workspaceMountRepository } = deps;
|
|
14
|
+
if (!serviceRepository || !workspaceMountRepository)
|
|
15
|
+
return undefined;
|
|
16
|
+
const accountId = (await deps.workspaceRepository.accountOf(workspaceId)) ?? null;
|
|
17
|
+
const now = deps.clock.now();
|
|
18
|
+
const service = {
|
|
19
|
+
id: deps.idGenerator.next('svc'),
|
|
20
|
+
accountId,
|
|
21
|
+
frameBlockId: frame.id,
|
|
22
|
+
installationId: repo?.installationId ?? null,
|
|
23
|
+
repoGithubId: repo?.githubId ?? null,
|
|
24
|
+
directory: repo?.directory ?? null,
|
|
25
|
+
createdAt: now,
|
|
26
|
+
};
|
|
27
|
+
await serviceRepository.insert(service);
|
|
28
|
+
await workspaceMountRepository.upsert({
|
|
29
|
+
workspaceId,
|
|
30
|
+
serviceId: service.id,
|
|
31
|
+
position: frame.position,
|
|
32
|
+
size: frame.size ?? null,
|
|
33
|
+
createdAt: now,
|
|
34
|
+
});
|
|
35
|
+
return service.id;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=service-registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-registration.js","sourceRoot":"","sources":["../../src/domain/service-registration.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAA6B,EAC7B,WAAmB,EACnB,KAA8C,EAC9C,IAA8E;IAE9E,MAAM,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,GAAG,IAAI,CAAA;IAC5D,IAAI,CAAC,iBAAiB,IAAI,CAAC,wBAAwB;QAAE,OAAO,SAAS,CAAA;IACrE,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,IAAI,CAAA;IACjF,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAY;QACvB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;QAChC,SAAS;QACT,YAAY,EAAE,KAAK,CAAC,EAAE;QACtB,cAAc,EAAE,IAAI,EAAE,cAAc,IAAI,IAAI;QAC5C,YAAY,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI;QACpC,SAAS,EAAE,IAAI,EAAE,SAAS,IAAI,IAAI;QAClC,SAAS,EAAE,GAAG;KACf,CAAA;IACD,MAAM,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACvC,MAAM,wBAAwB,CAAC,MAAM,CAAC;QACpC,WAAW;QACX,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI;QACxB,SAAS,EAAE,GAAG;KACf,CAAC,CAAA;IACF,OAAO,OAAO,CAAC,EAAE,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StepSubtasks } from './types.js';
|
|
2
|
+
/** Whether two subtask snapshots carry the same counts + items (skips redundant re-emits). */
|
|
3
|
+
export declare function sameSubtasks(a: StepSubtasks | null | undefined, b: StepSubtasks): boolean;
|
|
4
|
+
/** Whether two todo-item lists carry the same labels + statuses, in order. */
|
|
5
|
+
export declare function sameSubtaskItems(a: StepSubtasks['items'], b: StepSubtasks['items']): boolean;
|
|
6
|
+
//# sourceMappingURL=subtasks.logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtasks.logic.d.ts","sourceRoot":"","sources":["../../src/domain/subtasks.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAM9C,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,YAAY,GAAG,OAAO,CAQzF;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,OAAO,CAI5F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Shared subtask-snapshot comparison used by the container-backed flows
|
|
2
|
+
// (execution + bootstrap) to skip redundant re-writes and event broadcasts when
|
|
3
|
+
// a poll returns the same progress as the last one.
|
|
4
|
+
/** Whether two subtask snapshots carry the same counts + items (skips redundant re-emits). */
|
|
5
|
+
export function sameSubtasks(a, b) {
|
|
6
|
+
return (a != null &&
|
|
7
|
+
a.completed === b.completed &&
|
|
8
|
+
a.inProgress === b.inProgress &&
|
|
9
|
+
a.total === b.total &&
|
|
10
|
+
sameSubtaskItems(a.items, b.items));
|
|
11
|
+
}
|
|
12
|
+
/** Whether two todo-item lists carry the same labels + statuses, in order. */
|
|
13
|
+
export function sameSubtaskItems(a, b) {
|
|
14
|
+
if (a === b)
|
|
15
|
+
return true;
|
|
16
|
+
if (!a || !b || a.length !== b.length)
|
|
17
|
+
return false;
|
|
18
|
+
return a.every((it, i) => it.label === b[i]?.label && it.status === b[i]?.status);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=subtasks.logic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtasks.logic.js","sourceRoot":"","sources":["../../src/domain/subtasks.logic.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,gFAAgF;AAChF,oDAAoD;AAEpD,8FAA8F;AAC9F,MAAM,UAAU,YAAY,CAAC,CAAkC,EAAE,CAAe;IAC9E,OAAO,CACL,CAAC,IAAI,IAAI;QACT,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAC7B,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,gBAAgB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CACnC,CAAA;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,CAAwB,EAAE,CAAwB;IACjF,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACxB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IACnD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AACnF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { AgentKind, AgentState, AgentFailure, AgentFailureKind, AgentRunKind, Block, BlockLevel, BlockStatus, BlockType, TaskType, CreateTaskType, TaskTypeFields, Decision, ExecutionInstance, ExecutionStatus, Pipeline, PipelineStep, Position, PromptFragment, PullRequestRef, SpendStatus, StepApproval, StepReviewComment, StepSubtasks, Workspace, WorkspaceSnapshot, FragmentOwnerKind, FragmentTier, CreatePromptFragmentInput, UpdatePromptFragmentInput, FragmentSource, LinkFragmentSourceInput, FragmentSyncResult, FragmentSourceStatus, ResolvedFragment, ResolvedFragmentCatalog, Account, AccountType, AccountRole, AccountMember, CreateAccountInput, AddMemberInput, Service, WorkspaceMount, MountServiceInput, UpdateMountInput, GitHubBranch, GitHubCheckRun, GitHubCommit, GitHubConnection, GitHubInstallationOption, GitHubAvailableRepo, GitHubIssue, GitHubIssueState, GitHubPullRequest, GitHubPullRequestState, GitHubRepo, RepoTreeEntry, SetRepoMonorepoInput, CommitFilesInput, LinkReposInput, OpenPullRequestInput, MergePullRequestInput, DocumentSourceKind, DocumentSourceDescriptor, CredentialField, DocumentConnection, SourceDocument, DocumentSearchResult, DocumentBoardPlan, PlanFrame, PlanModule, PlanTask, TaskSourceKind, TaskSourceDescriptor, TaskConnection, TaskComment, SourceTask, TaskSearchResult, EnvironmentSecretRef, EnvironmentAuthScheme, EnvironmentHttpMethod, EnvironmentRequestTemplate, EnvironmentStatus, EnvironmentAccessScheme, EnvironmentAccessMapping, EnvironmentResponseMapping, EnvironmentManifest, EnvironmentAccessHandle, EnvironmentHandle, EnvironmentConnection, RunnerPoolSecretRef, RunnerPoolAuthScheme, RunnerPoolRequestTemplate, RunnerJobState, RunnerPoolResponseMapping, RunnerPoolManifest, RunnerPoolConnection, ReferenceArchitecture, CreateReferenceArchitectureInput, UpdateReferenceArchitectureInput, BootstrapStatus, BootstrapFailure, BootstrapFailureKind, BootstrapJob, BootstrapRepoInput, BlueprintModule, BlueprintService, BlueprintSource, BoardScanSpawnResult, ReviewItemCategory, ReviewItemSeverity, ReviewItemStatus, RequirementReviewItem, RequirementReviewStatus, RequirementReview, ReplyReviewItemInput, UpdateReviewItemStatusInput, IncorporateRequirementsInput, ResolveRequirementsExceededInput, ResolveRequirementsExceededChoice, ClarityReviewItem, ClarityReviewStatus, ClarityReview, ReplyClarityItemInput, UpdateClarityItemStatusInput, IncorporateClarityInput, ResolveClarityExceededInput, ResolveClarityExceededChoice, IterationCapChoice, ResolveIterationCapInput, RequirementPriority, RequirementKind, AcceptanceCriterion, RequirementItem, DomainRule, RequirementGroup, SpecDoc, SpecVersion, CompanionAssessment, CompanionVerdict, GateStepState, MergeAssessment, MergeThresholdPreset, RequirementConcernLevel, CreateMergePresetInput, UpdateMergePresetInput, ConsensusStrategy, ConsensusParticipant, ConsensusGating, StepGating, ConsensusStepConfig, TaskEstimate, ConsensusScore, ConsensusContribution, ConsensusRound, ConsensusSessionStatus, ConsensusSession, AgentConfigOption, AgentConfigDescriptor, AgentConfigCatalog, AgentConfigValues, TestReport, TestOutcome, TestConcern, TestConcernSeverity, CloudProvider, InstanceSize, UpdateAccountInput, ModelDefaults, SetModelDefaultsInput, ServiceFragmentDefaults, SetServiceFragmentDefaultsInput, Notification, NotificationType, NotificationStatus, NotificationSeverity, NotificationPayload, ResolveNotificationAction, WorkspaceSettings, UpdateWorkspaceSettingsInput, TaskLimitMode, TaskLimitPerType, SlackConnection, SlackRoute, SlackNotificationSettings, SlackMemberMappingEntry, SlackMemberRole, SlackMemberMapping, SlackChannel, ConnectSlackByTokenInput, UpdateSlackSettingsInput, UpdateSlackMemberMappingInput, ScheduleTemplate, Recurrence, PipelineSchedule, ScheduleRun, CreateScheduleInput, UpdateScheduleInput, TrackerKind, TrackerSettings, PutTrackerSettingsInput, LlmCallActivity, SandboxPromptOrigin, SandboxPromptVersion, SandboxFixtureKind, SandboxRepoRef, SandboxFixtureObjective, SandboxFixture, SandboxExperimentStatus, SandboxMatrix, SandboxExperiment, SandboxRunStatus, SandboxTokenUsage, SandboxRun, SandboxGradeDimension, SandboxObjectiveResult, SandboxGrade, } from '@cat-factory/contracts';
|
|
2
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":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ACf,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,6BAA6B,EAE7B,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EAEnB,WAAW,EACX,eAAe,EACf,uBAAuB,EAEvB,eAAe,EAEf,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,GACb,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './domain/types.js';
|
|
2
|
+
export { DomainError, NotFoundError, ValidationError, ConflictError, CredentialRequiredError, assertFound, getErrorMessage, type DomainErrorCode, type CredentialRequiredReason, } from './domain/errors.js';
|
|
3
|
+
export { sameSubtasks, sameSubtaskItems } from './domain/subtasks.logic.js';
|
|
4
|
+
export { BLOCK_TYPE_LABEL, DEFAULT_MERGE_PRESET, DEFAULT_CI_MAX_ATTEMPTS, DEFAULT_MAX_REQUIREMENT_ITERATIONS, DEFAULT_WORKSPACE_SETTINGS, } from './domain/catalog.js';
|
|
5
|
+
export { type SelectableModel, type ModelVariant, type SubscriptionVariant, type SubscriptionVendorConfig, type ProviderCapabilities, type ModelCostResolver, MODEL_CATALOG, SUBSCRIPTION_VENDORS, ALL_SUBSCRIPTION_VENDORS, getSelectableModel, contextWindowFor, effectiveCatalog, effectiveCatalogWith, type LocalEndpointModels, localSelectableModels, parseLocalModelId, resolveModelRef, isModelUsable, subscriptionOptionFor, isIndividualVendor, INDIVIDUAL_VENDORS, individualVendorForModelId, personalCredentialVendorForModelId, } from './domain/models.js';
|
|
6
|
+
export { seedBlocks, seedPipelines, BLUEPRINT_PIPELINE_ID, DEP_UPDATE_PIPELINE_ID, TECH_DEBT_PIPELINE_ID, } from './domain/seed.js';
|
|
7
|
+
export { registerPipeline, registerPipelines, registeredPipelines, clearRegisteredPipelines, } from './domain/pipeline-registry.js';
|
|
8
|
+
export * from './ports/index.js';
|
|
9
|
+
export { type ServiceRegistrationDeps, registerServiceForFrame, } from './domain/service-registration.js';
|
|
10
|
+
export { MapSourceRegistry } from './shared/source-registry.logic.js';
|
|
11
|
+
export * as atlassianLogic from './shared/atlassian.logic.js';
|
|
12
|
+
export { markdownToText, buildExcerpt } from './shared/markdown.logic.js';
|
|
13
|
+
export { normalizeAtlassianBaseUrl, assertSafeAtlassianBaseUrl } from './shared/atlassian.logic.js';
|
|
14
|
+
export { requireWorkspace } from './workspace-guard.js';
|
|
15
|
+
export { type TaskContextView, renderTaskContext } from './shared/tasks-prompt.logic.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAA;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,wBAAwB,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,0BAA0B,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,+BAA+B,CAAA;AAEtC,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EACL,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAEnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Shared vocabulary, pure logic, and port interfaces for the domain packages
|
|
2
|
+
// (@cat-factory/orchestration, @cat-factory/integrations, …).
|
|
3
|
+
export * from './domain/types.js';
|
|
4
|
+
export { DomainError, NotFoundError, ValidationError, ConflictError, CredentialRequiredError, assertFound, getErrorMessage, } from './domain/errors.js';
|
|
5
|
+
export { sameSubtasks, sameSubtaskItems } from './domain/subtasks.logic.js';
|
|
6
|
+
export { BLOCK_TYPE_LABEL, DEFAULT_MERGE_PRESET, DEFAULT_CI_MAX_ATTEMPTS, DEFAULT_MAX_REQUIREMENT_ITERATIONS, DEFAULT_WORKSPACE_SETTINGS, } from './domain/catalog.js';
|
|
7
|
+
export { MODEL_CATALOG, SUBSCRIPTION_VENDORS, ALL_SUBSCRIPTION_VENDORS, getSelectableModel, contextWindowFor, effectiveCatalog, effectiveCatalogWith, localSelectableModels, parseLocalModelId, resolveModelRef, isModelUsable, subscriptionOptionFor, isIndividualVendor, INDIVIDUAL_VENDORS, individualVendorForModelId, personalCredentialVendorForModelId, } from './domain/models.js';
|
|
8
|
+
export { seedBlocks, seedPipelines, BLUEPRINT_PIPELINE_ID, DEP_UPDATE_PIPELINE_ID, TECH_DEBT_PIPELINE_ID, } from './domain/seed.js';
|
|
9
|
+
// Installation-level extension point for predefined pipelines (mirrors the custom
|
|
10
|
+
// agent-kind / model-provider registry seams): a deployment registers extra pipelines at
|
|
11
|
+
// startup and `seedPipelines()` seeds them into every new workspace.
|
|
12
|
+
export { registerPipeline, registerPipelines, registeredPipelines, clearRegisteredPipelines, } from './domain/pipeline-registry.js';
|
|
13
|
+
export * from './ports/index.js';
|
|
14
|
+
export { registerServiceForFrame, } from './domain/service-registration.js';
|
|
15
|
+
export { MapSourceRegistry } from './shared/source-registry.logic.js';
|
|
16
|
+
export * as atlassianLogic from './shared/atlassian.logic.js';
|
|
17
|
+
export { markdownToText, buildExcerpt } from './shared/markdown.logic.js';
|
|
18
|
+
export { normalizeAtlassianBaseUrl, assertSafeAtlassianBaseUrl } from './shared/atlassian.logic.js';
|
|
19
|
+
export { requireWorkspace } from './workspace-guard.js';
|
|
20
|
+
export { renderTaskContext } from './shared/tasks-prompt.logic.js';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"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E,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AccountRole, AccountType, CloudProvider } from '../domain/types.js';
|
|
2
|
+
export interface AccountRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
type: AccountType;
|
|
5
|
+
name: string;
|
|
6
|
+
githubAccountLogin: string | null;
|
|
7
|
+
/** The user who owns a `personal` account (its account-of-one). Null for orgs. */
|
|
8
|
+
ownerUserId: string | null;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
/**
|
|
11
|
+
* The cloud provider new services in this account default to (a service may
|
|
12
|
+
* override it per-frame). Absent ⇒ the built-in {@link DEFAULT_CLOUD_PROVIDER}.
|
|
13
|
+
*/
|
|
14
|
+
defaultCloudProvider?: CloudProvider;
|
|
15
|
+
}
|
|
16
|
+
/** Mutable account settings a member-owner can change (see {@link AccountRepository.updateSettings}). */
|
|
17
|
+
export interface AccountSettingsPatch {
|
|
18
|
+
/** `null` clears the override (back to the built-in default); `undefined` leaves it. */
|
|
19
|
+
defaultCloudProvider?: CloudProvider | null;
|
|
20
|
+
}
|
|
21
|
+
export interface Membership {
|
|
22
|
+
accountId: string;
|
|
23
|
+
userId: string;
|
|
24
|
+
/** The member's combinable roles (admin / developer / product); at least one. */
|
|
25
|
+
roles: AccountRole[];
|
|
26
|
+
createdAt: number;
|
|
27
|
+
}
|
|
28
|
+
export interface AccountRepository {
|
|
29
|
+
get(id: string): Promise<AccountRecord | null>;
|
|
30
|
+
create(account: AccountRecord): Promise<void>;
|
|
31
|
+
rename(id: string, name: string): Promise<void>;
|
|
32
|
+
/** Apply a settings patch (today: the default cloud provider). A no-op for an empty patch. */
|
|
33
|
+
updateSettings(id: string, patch: AccountSettingsPatch): Promise<void>;
|
|
34
|
+
/** The existing personal account owned by a user, if one was already created. */
|
|
35
|
+
findPersonalByUser(userId: string): Promise<AccountRecord | null>;
|
|
36
|
+
}
|
|
37
|
+
export interface MembershipRepository {
|
|
38
|
+
/** Every membership for a user — the accounts they can see and switch between. */
|
|
39
|
+
listByUser(userId: string): Promise<Membership[]>;
|
|
40
|
+
/** Every membership in an account — its member roster. */
|
|
41
|
+
listByAccount(accountId: string): Promise<Membership[]>;
|
|
42
|
+
get(accountId: string, userId: string): Promise<Membership | null>;
|
|
43
|
+
upsert(membership: Membership): Promise<void>;
|
|
44
|
+
remove(accountId: string, userId: string): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=account-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/account-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAWjF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,kFAAkF;IAClF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAA;CACrC;AAED,yGAAyG;AACzG,MAAM,WAAW,oBAAoB;IACnC,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;CAC5C;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,iFAAiF;IACjF,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC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