@cat-factory/orchestration 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/container.d.ts +15 -6
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +7 -5
- package/dist/container.js.map +1 -1
- package/dist/modules/execution/ExecutionService.d.ts +68 -2
- package/dist/modules/execution/ExecutionService.d.ts.map +1 -1
- package/dist/modules/execution/ExecutionService.js +133 -2
- package/dist/modules/execution/ExecutionService.js.map +1 -1
- package/dist/modules/pipelines/PipelineService.d.ts +4 -4
- package/dist/modules/pipelines/PipelineService.d.ts.map +1 -1
- package/dist/modules/pipelines/PipelineService.js +5 -5
- package/dist/modules/pipelines/PipelineService.js.map +1 -1
- package/dist/modules/releaseHealth/ReleaseHealthService.d.ts +13 -12
- package/dist/modules/releaseHealth/ReleaseHealthService.d.ts.map +1 -1
- package/dist/modules/releaseHealth/ReleaseHealthService.js +32 -18
- package/dist/modules/releaseHealth/ReleaseHealthService.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { BlockRepository, Clock,
|
|
2
|
-
import type {
|
|
1
|
+
import type { BlockRepository, Clock, ObservabilityConnectionRepository, ReleaseHealthConfigRepository, SecretCipher, WorkspaceRepository } from '@cat-factory/kernel';
|
|
2
|
+
import type { ObservabilityConnectionView, ReleaseHealthConfigWire, UpsertObservabilityConnectionInput, UpsertReleaseHealthConfigInput } from '@cat-factory/contracts';
|
|
3
3
|
export interface ReleaseHealthServiceDependencies {
|
|
4
|
-
|
|
4
|
+
observabilityConnectionRepository: ObservabilityConnectionRepository;
|
|
5
5
|
releaseHealthConfigRepository: ReleaseHealthConfigRepository;
|
|
6
|
-
/** Seals the
|
|
7
|
-
|
|
6
|
+
/** Seals the observability credentials at rest (domain tag 'cat-factory:observability'). */
|
|
7
|
+
observabilitySecretCipher: SecretCipher;
|
|
8
8
|
workspaceRepository: WorkspaceRepository;
|
|
9
9
|
/** Validates a per-block config targets a block that exists in the workspace. */
|
|
10
10
|
blockRepository: BlockRepository;
|
|
@@ -12,9 +12,10 @@ export interface ReleaseHealthServiceDependencies {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Manages the post-release-health integration's settings for a workspace: the (single)
|
|
15
|
-
*
|
|
16
|
-
* monitor/SLO mappings the gate reads. Read paths
|
|
17
|
-
*
|
|
15
|
+
* observability connection — provider-keyed, credentials sealed at rest as one JSON blob
|
|
16
|
+
* and never read back — and the per-block monitor/SLO mappings the gate reads. Read paths
|
|
17
|
+
* return redacted views (provider + a non-secret summary); the secrets only leave the
|
|
18
|
+
* cipher inside the provider adapter at probe time.
|
|
18
19
|
*/
|
|
19
20
|
export declare class ReleaseHealthService {
|
|
20
21
|
private readonly connections;
|
|
@@ -24,10 +25,10 @@ export declare class ReleaseHealthService {
|
|
|
24
25
|
private readonly blocks;
|
|
25
26
|
private readonly clock;
|
|
26
27
|
constructor(deps: ReleaseHealthServiceDependencies);
|
|
27
|
-
/** The workspace's
|
|
28
|
-
getConnection(workspaceId: string): Promise<
|
|
29
|
-
/** Set/replace the workspace's
|
|
30
|
-
setConnection(workspaceId: string, input:
|
|
28
|
+
/** The workspace's observability connection, redacted (never returns the secret keys). */
|
|
29
|
+
getConnection(workspaceId: string): Promise<ObservabilityConnectionView>;
|
|
30
|
+
/** Set/replace the workspace's observability connection, sealing the credentials at rest. */
|
|
31
|
+
setConnection(workspaceId: string, input: UpsertObservabilityConnectionInput): Promise<ObservabilityConnectionView>;
|
|
31
32
|
deleteConnection(workspaceId: string): Promise<void>;
|
|
32
33
|
/** The workspace's per-block monitor/SLO mappings. */
|
|
33
34
|
listConfigs(workspaceId: string): Promise<ReleaseHealthConfigWire[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReleaseHealthService.d.ts","sourceRoot":"","sources":["../../../src/modules/releaseHealth/ReleaseHealthService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"ReleaseHealthService.d.ts","sourceRoot":"","sources":["../../../src/modules/releaseHealth/ReleaseHealthService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,KAAK,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,YAAY,EACZ,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,kCAAkC,EAClC,8BAA8B,EAC/B,MAAM,wBAAwB,CAAA;AAG/B,MAAM,WAAW,gCAAgC;IAC/C,iCAAiC,EAAE,iCAAiC,CAAA;IACpE,6BAA6B,EAAE,6BAA6B,CAAA;IAC5D,4FAA4F;IAC5F,yBAAyB,EAAE,YAAY,CAAA;IACvC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,iFAAiF;IACjF,eAAe,EAAE,eAAe,CAAA;IAChC,KAAK,EAAE,KAAK,CAAA;CACb;AAED;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;IAE7B,YAAY,IAAI,EAAE,gCAAgC,EAOjD;IAED,0FAA0F;IACpF,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAS7E;IAED,6FAA6F;IACvF,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,kCAAkC,GACxC,OAAO,CAAC,2BAA2B,CAAC,CAetC;IAEK,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzD;IAED,sDAAsD;IAChD,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CASzE;IAED,sDAAsD;IAChD,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,uBAAuB,CAAC,CAuBlC;IAEK,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAItE;CACF"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { assertFound, requireWorkspace } from '@cat-factory/kernel';
|
|
2
|
+
import { observabilityConnectionSummary } from '@cat-factory/contracts';
|
|
2
3
|
/**
|
|
3
4
|
* Manages the post-release-health integration's settings for a workspace: the (single)
|
|
4
|
-
*
|
|
5
|
-
* monitor/SLO mappings the gate reads. Read paths
|
|
6
|
-
*
|
|
5
|
+
* observability connection — provider-keyed, credentials sealed at rest as one JSON blob
|
|
6
|
+
* and never read back — and the per-block monitor/SLO mappings the gate reads. Read paths
|
|
7
|
+
* return redacted views (provider + a non-secret summary); the secrets only leave the
|
|
8
|
+
* cipher inside the provider adapter at probe time.
|
|
7
9
|
*/
|
|
8
10
|
export class ReleaseHealthService {
|
|
9
11
|
connections;
|
|
@@ -13,39 +15,41 @@ export class ReleaseHealthService {
|
|
|
13
15
|
blocks;
|
|
14
16
|
clock;
|
|
15
17
|
constructor(deps) {
|
|
16
|
-
this.connections = deps.
|
|
18
|
+
this.connections = deps.observabilityConnectionRepository;
|
|
17
19
|
this.configs = deps.releaseHealthConfigRepository;
|
|
18
|
-
this.cipher = deps.
|
|
20
|
+
this.cipher = deps.observabilitySecretCipher;
|
|
19
21
|
this.workspaceRepository = deps.workspaceRepository;
|
|
20
22
|
this.blocks = deps.blockRepository;
|
|
21
23
|
this.clock = deps.clock;
|
|
22
24
|
}
|
|
23
|
-
/** The workspace's
|
|
25
|
+
/** The workspace's observability connection, redacted (never returns the secret keys). */
|
|
24
26
|
async getConnection(workspaceId) {
|
|
25
27
|
await requireWorkspace(this.workspaceRepository, workspaceId);
|
|
26
28
|
const connection = await this.connections.get(workspaceId);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
if (!connection)
|
|
30
|
+
return { connected: false, provider: null, summary: null };
|
|
31
|
+
return {
|
|
32
|
+
connected: true,
|
|
33
|
+
provider: connection.provider,
|
|
34
|
+
summary: parseSummary(connection.summary),
|
|
35
|
+
};
|
|
30
36
|
}
|
|
31
|
-
/** Set/replace the workspace's
|
|
37
|
+
/** Set/replace the workspace's observability connection, sealing the credentials at rest. */
|
|
32
38
|
async setConnection(workspaceId, input) {
|
|
33
39
|
await requireWorkspace(this.workspaceRepository, workspaceId);
|
|
34
40
|
const now = this.clock.now();
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
this.cipher.encrypt(input.appKey),
|
|
38
|
-
]);
|
|
41
|
+
const summary = observabilityConnectionSummary(input.provider, input.credentials);
|
|
42
|
+
const credentials = await this.cipher.encrypt(JSON.stringify(input.credentials));
|
|
39
43
|
const existing = await this.connections.get(workspaceId);
|
|
40
44
|
await this.connections.upsert({
|
|
41
45
|
workspaceId,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
provider: input.provider,
|
|
47
|
+
credentials,
|
|
48
|
+
summary: JSON.stringify(summary),
|
|
45
49
|
createdAt: existing?.createdAt ?? now,
|
|
46
50
|
updatedAt: now,
|
|
47
51
|
});
|
|
48
|
-
return { connected: true,
|
|
52
|
+
return { connected: true, provider: input.provider, summary };
|
|
49
53
|
}
|
|
50
54
|
async deleteConnection(workspaceId) {
|
|
51
55
|
await requireWorkspace(this.workspaceRepository, workspaceId);
|
|
@@ -93,4 +97,14 @@ export class ReleaseHealthService {
|
|
|
93
97
|
await this.configs.delete(workspaceId, blockId);
|
|
94
98
|
}
|
|
95
99
|
}
|
|
100
|
+
/** Parse the stored non-secret summary JSON, tolerating a malformed/empty value. */
|
|
101
|
+
function parseSummary(raw) {
|
|
102
|
+
try {
|
|
103
|
+
const parsed = JSON.parse(raw);
|
|
104
|
+
return parsed && typeof parsed === 'object' ? parsed : null;
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
96
110
|
//# sourceMappingURL=ReleaseHealthService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReleaseHealthService.js","sourceRoot":"","sources":["../../../src/modules/releaseHealth/ReleaseHealthService.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"ReleaseHealthService.js","sourceRoot":"","sources":["../../../src/modules/releaseHealth/ReleaseHealthService.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAOnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAA;AAavE;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACd,WAAW,CAAmC;IAC9C,OAAO,CAA+B;IACtC,MAAM,CAAc;IACpB,mBAAmB,CAAqB;IACxC,MAAM,CAAiB;IACvB,KAAK,CAAO;IAE7B,YAAY,IAAsC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,iCAAiC,CAAA;QACzD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,6BAA6B,CAAA;QACjD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAA;QAC5C,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,CAAA;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACzB,CAAC;IAED,0F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|
"name": "@cat-factory/orchestration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^6.0.209",
|
|
28
|
-
"@cat-factory/
|
|
29
|
-
"@cat-factory/
|
|
30
|
-
"@cat-factory/integrations": "0.
|
|
31
|
-
"@cat-factory/kernel": "0.
|
|
32
|
-
"@cat-factory/prompt-fragments": "0.7.
|
|
33
|
-
"@cat-factory/spend": "0.8.
|
|
34
|
-
"@cat-factory/workspaces": "0.7.
|
|
28
|
+
"@cat-factory/contracts": "0.12.0",
|
|
29
|
+
"@cat-factory/agents": "0.11.1",
|
|
30
|
+
"@cat-factory/integrations": "0.9.0",
|
|
31
|
+
"@cat-factory/kernel": "0.12.0",
|
|
32
|
+
"@cat-factory/prompt-fragments": "0.7.7",
|
|
33
|
+
"@cat-factory/spend": "0.8.4",
|
|
34
|
+
"@cat-factory/workspaces": "0.7.10"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "7.0.1-rc",
|