@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 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; a Service explicitly declares zero or more Workloads. Consumers extend Service with business
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
@@ -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
- export {};
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
+ }
@@ -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
@@ -10,3 +10,5 @@ export * from "./component.js";
10
10
  export * from "./host.js";
11
11
  export * from "./environment.js";
12
12
  export * from "./service.js";
13
+ export * from "./execution.js";
14
+ export type { Product } from "./product.js";
package/dist/index.js CHANGED
@@ -10,3 +10,4 @@ export * from "./component.js";
10
10
  export * from "./host.js";
11
11
  export * from "./environment.js";
12
12
  export * from "./service.js";
13
+ export * from "./execution.js";
@@ -0,0 +1,6 @@
1
+ /** A business identity independent of repository layout.
2
+ * Consumers own its many-to-many associations with Components.
3
+ */
4
+ export interface Product {
5
+ readonly name: string;
6
+ }
@@ -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. */
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compforge/harness-common",
3
- "version": "0.3.0",
3
+ "version": "0.3.5",
4
4
  "description": "Execution-neutral client lifecycle and datasource contracts for harnesses",
5
5
  "type": "module",
6
6
  "scripts": {