@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 +3 -1
- package/dist/component.d.ts +8 -0
- package/dist/component.js +15 -1
- package/dist/index.d.ts +1 -0
- package/dist/product.d.ts +6 -0
- package/dist/product.js +1 -0
- package/dist/service.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/index.d.ts
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. */
|