@cat-factory/kernel 0.57.0 → 0.58.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.
|
@@ -1,39 +1,58 @@
|
|
|
1
1
|
import type { EnvironmentStatus } from '../domain/types.js';
|
|
2
2
|
/**
|
|
3
|
-
* A workspace's
|
|
4
|
-
* the
|
|
5
|
-
*
|
|
3
|
+
* A workspace's per-provision-type infra HANDLER: how a service's declared provision type
|
|
4
|
+
* (the "what + where") is stood up (the "how"). Keyed by `(workspaceId, provisionType,
|
|
5
|
+
* manifestId)` — a workspace declares one handler per type, plus one per pinned custom
|
|
6
|
+
* `manifestId`. The serialized {@link handlerJson} (the engine connection, sans secrets) and
|
|
7
|
+
* the encrypted secret bundle are decrypted/built only in-memory, at provision time. See
|
|
8
|
+
* docs/initiatives/per-service-provision-types.md.
|
|
9
|
+
*
|
|
10
|
+
* `manifestId` is `null` for the non-custom types; on SQLite/Postgres it sits in the
|
|
11
|
+
* composite primary key as the `''` sentinel (the repos map `'' ⇄ null`), exactly like
|
|
12
|
+
* {@link EnvironmentUserHandlerRecord}.
|
|
6
13
|
*/
|
|
7
14
|
export interface EnvironmentConnectionRecord {
|
|
8
15
|
workspaceId: string;
|
|
16
|
+
/** The provision type this handler serves (`kubernetes` | `docker-compose` | `custom`). */
|
|
17
|
+
provisionType: string;
|
|
18
|
+
/** For `custom`: which manifest id this handler is keyed to; `null` otherwise. */
|
|
19
|
+
manifestId: string | null;
|
|
20
|
+
/** The engine that handles the type (`local-docker` | `local-k3s` | `remote-kubernetes` | `remote-custom`). */
|
|
21
|
+
engine: string;
|
|
9
22
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
23
|
+
* The environment-backend REGISTRY kind that builds this handler's provider (`manifest` |
|
|
24
|
+
* `kubernetes` | `compose` | a custom kind). Distinct from {@link engine}: several backends
|
|
25
|
+
* can serve the same engine (e.g. a custom backend riding `remote-custom`), so the engine
|
|
26
|
+
* alone can't recover the exact provider — the registry is keyed by this kind.
|
|
13
27
|
*/
|
|
14
|
-
|
|
28
|
+
backendKind: string;
|
|
15
29
|
providerId: string;
|
|
16
30
|
label: string;
|
|
17
31
|
baseUrl: string;
|
|
18
32
|
/**
|
|
19
|
-
* The
|
|
20
|
-
*
|
|
21
|
-
*
|
|
33
|
+
* The serialized handler config (an `InfraHandlerConfig` — the engine connection, sans
|
|
34
|
+
* secrets), as JSON. A native engine (`local-k3s`/`remote-kubernetes`) carries only the
|
|
35
|
+
* apiserver/sizing here; the manifests to apply come from the SERVICE at provision time
|
|
36
|
+
* (the deployer merges the two). Renamed from the pre-reshape `manifestJson`.
|
|
22
37
|
*/
|
|
23
|
-
|
|
38
|
+
handlerJson: string;
|
|
39
|
+
/** For a `remote-custom` engine: the custom manifest id this provider accepts; `null` otherwise. */
|
|
40
|
+
acceptsManifestId: string | null;
|
|
24
41
|
/** Ciphertext of the `{ key: value }` secret bundle (SecretCipher envelope). */
|
|
25
42
|
secretsCipher: string;
|
|
26
43
|
createdAt: number;
|
|
27
|
-
/** Set when the workspace unregisters (tombstone). */
|
|
44
|
+
/** Set when the workspace unregisters this handler (tombstone). */
|
|
28
45
|
deletedAt: number | null;
|
|
29
46
|
}
|
|
30
47
|
export interface EnvironmentConnectionRepository {
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/**
|
|
48
|
+
/** Every live handler the workspace has registered (batched — no per-type point reads). */
|
|
49
|
+
listByWorkspace(workspaceId: string): Promise<EnvironmentConnectionRecord[]>;
|
|
50
|
+
/** The live handler for one provision type (+ custom manifest id), or null. */
|
|
51
|
+
getByWorkspaceAndType(workspaceId: string, provisionType: string, manifestId: string | null): Promise<EnvironmentConnectionRecord | null>;
|
|
52
|
+
/** Create or replace one handler (keyed by workspace + provisionType + manifestId). */
|
|
34
53
|
upsert(record: EnvironmentConnectionRecord): Promise<void>;
|
|
35
|
-
/** Tombstone
|
|
36
|
-
softDelete(workspaceId: string, at: number): Promise<void>;
|
|
54
|
+
/** Tombstone one handler. */
|
|
55
|
+
softDelete(workspaceId: string, provisionType: string, manifestId: string | null, at: number): Promise<void>;
|
|
37
56
|
}
|
|
38
57
|
/** A user's override of how a provision type is handled, for a given workspace. */
|
|
39
58
|
export interface EnvironmentUserHandlerRecord {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/environment-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAQ3D
|
|
1
|
+
{"version":3,"file":"environment-repositories.d.ts","sourceRoot":"","sources":["../../src/ports/environment-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAQ3D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAA;IACnB,2FAA2F;IAC3F,aAAa,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,+GAA+G;IAC/G,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,oGAAoG;IACpG,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,+BAA+B;IAC9C,2FAA2F;IAC3F,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,EAAE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AA;CACvE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "Shared vocabulary, pure logic, and port interfaces for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"ai": "^6.0.
|
|
28
|
-
"@cat-factory/contracts": "0.
|
|
27
|
+
"ai": "^6.0.214",
|
|
28
|
+
"@cat-factory/contracts": "0.60.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "7.0.1-rc"
|