@compforge/harness-common 0.5.11 → 0.5.12
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 +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/system/component.d.ts +9 -1
- package/dist/system/depot.d.ts +17 -0
- package/dist/system/depot.js +1 -0
- package/dist/system/tool.d.ts +8 -0
- package/dist/system/tool.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -203,3 +203,11 @@ Use `serializeValue` to preserve immutable JSON and reading hints, and `deserial
|
|
|
203
203
|
with an explicit matching codec to restore runtime behavior. Encoding and decoding are pure.
|
|
204
204
|
Doctor and its Plugins import these contracts directly from `@compforge/harness-common`;
|
|
205
205
|
Observation identity, evidence and rendering remain with their consumers.
|
|
206
|
+
|
|
207
|
+
## Component tools and Depot
|
|
208
|
+
|
|
209
|
+
Component optionally declares `tools` and one logical `depot`. `Tool` describes a development
|
|
210
|
+
tool and an optional declared version/constraint. `Depot.bins` groups `Bin` declarations with
|
|
211
|
+
repository-relative paths and `dependencies`, `output` or `cache` kinds. Metadata does not change
|
|
212
|
+
Component identity, prove physical existence or authorize deletion. Discovery, preparation,
|
|
213
|
+
usage protection and reclamation belong to consumers. See [the shared contract](../../../docs/component-depot.md).
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * from "./system/forge.js";
|
|
|
8
8
|
export * from "./system/repository.js";
|
|
9
9
|
export * from "./system/pull-request.js";
|
|
10
10
|
export * from "./system/component.js";
|
|
11
|
+
export * from "./system/tool.js";
|
|
12
|
+
export * from "./system/depot.js";
|
|
11
13
|
export * from "./system/host.js";
|
|
12
14
|
export * from "./system/environment.js";
|
|
13
15
|
export * from "./system/service.js";
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export * from "./system/forge.js";
|
|
|
8
8
|
export * from "./system/repository.js";
|
|
9
9
|
export * from "./system/pull-request.js";
|
|
10
10
|
export * from "./system/component.js";
|
|
11
|
+
export * from "./system/tool.js";
|
|
12
|
+
export * from "./system/depot.js";
|
|
11
13
|
export * from "./system/host.js";
|
|
12
14
|
export * from "./system/environment.js";
|
|
13
15
|
export * from "./system/service.js";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { Depot } from "./depot.js";
|
|
2
|
+
import type { Tool } from "./tool.js";
|
|
1
3
|
import type { Repository } from "./repository.js";
|
|
2
|
-
/** A buildable component within a repository; one repository may own many.
|
|
4
|
+
/** A buildable component within a repository; one repository may own many.
|
|
5
|
+
* @spec language, tools and depot are optional declarations, not Component identity or runtime evidence.
|
|
6
|
+
*/
|
|
3
7
|
export interface Component {
|
|
4
8
|
readonly repository: Repository;
|
|
5
9
|
readonly name: string;
|
|
@@ -7,6 +11,10 @@ export interface Component {
|
|
|
7
11
|
readonly description?: string;
|
|
8
12
|
/** Optional implementation language, supplied by consumers; not part of identity. */
|
|
9
13
|
readonly language?: string;
|
|
14
|
+
/** Omitted means undeclared; an empty list declares no tools. */
|
|
15
|
+
readonly tools?: readonly Tool[];
|
|
16
|
+
/** Logical content declaration, resolved separately in each checkout. */
|
|
17
|
+
readonly depot?: Depot;
|
|
10
18
|
}
|
|
11
19
|
/** Derive the tool ecosystem from language; unknown mappings return undefined.
|
|
12
20
|
* Package manager discovery and execution remain consumer responsibilities.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A recoverable content unit within a Depot, usually one directory.
|
|
2
|
+
* @spec path is a normalized repository-relative POSIX path, never checkout-absolute.
|
|
3
|
+
* @rule A declaration alone does not authorize deletion or prove exclusive ownership.
|
|
4
|
+
* @see {@link component://docs/component-depot.md}
|
|
5
|
+
*/
|
|
6
|
+
export interface Bin {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
readonly kind: "dependencies" | "output" | "cache";
|
|
9
|
+
}
|
|
10
|
+
/** The optional logical container for a Component's recoverable supporting content.
|
|
11
|
+
* @spec A Component has at most one Depot per checkout; missing contents do not remove its declaration.
|
|
12
|
+
* @spec Consumers own discovery, preparation, usage protection and reclamation.
|
|
13
|
+
* @see {@link component://docs/component-depot.md}
|
|
14
|
+
*/
|
|
15
|
+
export interface Depot {
|
|
16
|
+
readonly bins: readonly Bin[];
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** A development tool declared for a Component, such as pnpm, uv or Vite.
|
|
2
|
+
* @spec A declaration does not prove installation or select an executable.
|
|
3
|
+
*/
|
|
4
|
+
export interface Tool {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
/** Declared version or constraint, not an observed installed version. */
|
|
7
|
+
readonly version?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|