@compforge/harness-common 0.3.2 → 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
+ }
package/dist/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export * from "./host.js";
11
11
  export * from "./environment.js";
12
12
  export * from "./service.js";
13
13
  export * from "./execution.js";
14
+ export type { Product } from "./product.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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compforge/harness-common",
3
- "version": "0.3.2",
3
+ "version": "0.3.5",
4
4
  "description": "Execution-neutral client lifecycle and datasource contracts for harnesses",
5
5
  "type": "module",
6
6
  "scripts": {