@compforge/harness-common 0.3.0 → 0.3.5
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/README.md +3 -1
- package/dist/component.d.ts +8 -0
- package/dist/component.js +15 -1
- package/dist/datasource.d.ts +2 -0
- package/dist/execution.d.ts +35 -0
- package/dist/execution.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/product.d.ts +6 -0
- package/dist/product.js +1 -0
- package/dist/service.d.ts +2 -0
- package/dist/workload.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,9 @@ Dependency graphs must be acyclic. A failed initialization permits retry only af
|
|
|
28
28
|
failed cleanup poisons that key and is reported again when the root manager is disposed.
|
|
29
29
|
|
|
30
30
|
Service identifies a Component's runtime presence in an Environment. A Component belongs to a Repository
|
|
31
|
-
on a Forge
|
|
31
|
+
on a Forge. Product is a separate business identity; consumers own its many-to-many associations
|
|
32
|
+
with Components. Repository discovery and directory ownership remain consumer responsibilities.
|
|
33
|
+
A Service explicitly declares zero or more Workloads. Consumers extend Service with business
|
|
32
34
|
capabilities, without duplicating these identities. For example:
|
|
33
35
|
|
|
34
36
|
```typescript
|
package/dist/component.d.ts
CHANGED
|
@@ -3,4 +3,12 @@ import type { Repository } from "./repository.js";
|
|
|
3
3
|
export interface Component {
|
|
4
4
|
readonly repository: Repository;
|
|
5
5
|
readonly name: string;
|
|
6
|
+
/** Human-readable discovery metadata; not part of Component identity. */
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
/** Optional implementation language, supplied by consumers; not part of identity. */
|
|
9
|
+
readonly language?: string;
|
|
6
10
|
}
|
|
11
|
+
/** Derive the tool ecosystem from language; unknown mappings return undefined.
|
|
12
|
+
* Package manager discovery and execution remain consumer responsibilities.
|
|
13
|
+
*/
|
|
14
|
+
export declare function componentEcosystem(component: Component): string | undefined;
|
package/dist/component.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/** Derive the tool ecosystem from language; unknown mappings return undefined.
|
|
2
|
+
* Package manager discovery and execution remain consumer responsibilities.
|
|
3
|
+
*/
|
|
4
|
+
export function componentEcosystem(component) {
|
|
5
|
+
switch (component.language) {
|
|
6
|
+
case "python":
|
|
7
|
+
case "go":
|
|
8
|
+
return component.language;
|
|
9
|
+
case "javascript":
|
|
10
|
+
case "typescript":
|
|
11
|
+
return "node";
|
|
12
|
+
default:
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/datasource.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { ClientProvider } from "./client-provider.js";
|
|
|
3
3
|
import type { Service } from "./service.js";
|
|
4
4
|
/** A source of data; accessible environments implement ClientProvider directly. */
|
|
5
5
|
export interface DataSource<C extends Client> extends ClientProvider<C> {
|
|
6
|
+
/** Safe descriptive metadata for discovery; never credentials or part of clientKey. */
|
|
7
|
+
readonly description?: string;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* @spec A Service association does not own a client or change the source identity.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Service } from "./service.js";
|
|
2
|
+
/** Stable capability identity, independent of access configuration. */
|
|
3
|
+
export interface Operation {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface HttpOperation extends Operation {
|
|
7
|
+
readonly method: string;
|
|
8
|
+
readonly path: string;
|
|
9
|
+
}
|
|
10
|
+
/** A real call owns its raw domain evidence. Case identity and scheduling belong to the domain. */
|
|
11
|
+
export interface OperationRun<O> {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly service: Service;
|
|
14
|
+
readonly operation: Operation;
|
|
15
|
+
readonly outcome: O;
|
|
16
|
+
}
|
|
17
|
+
/** Domain-owned grouping and lifecycle; common does not prescribe a scheduler. */
|
|
18
|
+
export interface Execution<O> {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
operation_runs: OperationRun<O>[];
|
|
21
|
+
}
|
|
22
|
+
export interface Artifact {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly path: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Experiment {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ExperimentRun<E extends Execution<unknown>> {
|
|
30
|
+
readonly run_id: string;
|
|
31
|
+
readonly experiment: string;
|
|
32
|
+
readonly created_at: string;
|
|
33
|
+
executions: E[];
|
|
34
|
+
artifacts: Artifact[];
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/product.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/service.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type { Workload } from "./workload.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export interface Service<E extends Environment = Environment> {
|
|
11
11
|
readonly name: string;
|
|
12
|
+
/** Human-readable discovery metadata; not part of Service identity. */
|
|
13
|
+
readonly description?: string;
|
|
12
14
|
readonly component: Component;
|
|
13
15
|
readonly environment: E;
|
|
14
16
|
/** Zero or more runtime carriers; an empty array declares no workloads. */
|
package/dist/workload.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Logical carrier, not proof of existence. Location is data, not a discovery executor. */
|
|
2
2
|
export interface Workload {
|
|
3
3
|
readonly name: string;
|
|
4
|
+
/** Safe role/context for discovery; not identity, location or proof of availability. */
|
|
5
|
+
readonly description?: string;
|
|
4
6
|
readonly platform: "kubernetes";
|
|
5
7
|
/** Omission requires a resolver default; never means all namespaces. */
|
|
6
8
|
readonly namespace?: string;
|