@compforge/harness-common 0.5.11 → 0.5.13

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
@@ -203,3 +203,23 @@ 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).
214
+
215
+ ## Endpoint
216
+
217
+ `Endpoint` describes a network access address: optional lowercase `scheme`, `host`, explicit
218
+ `port`, and optional `secure`. It is independent of the Service, DataSource or resource behind
219
+ that address. IPv6 hosts are unbracketed. Credentials, paths, query parameters, execution
220
+ locations and timeouts are not part of this contract.
221
+
222
+ `secure: true` requires encrypted transport; the protocol determines whether it uses direct
223
+ TLS or protocol-specific negotiation. Omission makes no encryption requirement. HTTPS/WSS/TLS
224
+ endpoints require `secure: true`. This declaration does not assert connectivity, trust-policy
225
+ approval or authorization. Toolbox owns URL projection, validation and network probing.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A network access address, independent of the Service, DataSource or resource behind it.
3
+ * @spec Endpoint contains no credentials, resource path, query or execution location.
4
+ * @spec secure requires encrypted transport; the scheme determines how it is established.
5
+ * It does not assert reachability, trust-policy approval or application authorization.
6
+ */
7
+ export interface Endpoint {
8
+ /** Lowercase URI scheme without a colon; protocol metadata, not a health assertion. */
9
+ readonly scheme?: string;
10
+ /** Hostname or IP literal; IPv6 literals have no surrounding brackets. */
11
+ readonly host: string;
12
+ readonly port: number;
13
+ /** Omission makes no encryption requirement; HTTPS/WSS/TLS endpoints require true. */
14
+ readonly secure?: boolean;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
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";
@@ -20,3 +22,4 @@ export * from "./system/resource.js";
20
22
  export * from "./json.js";
21
23
  export * from "./summary.js";
22
24
  export * from "./value.js";
25
+ export type { Endpoint } from "./access/endpoint.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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compforge/harness-common",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "Execution-neutral client lifecycle and datasource contracts for harnesses",
5
5
  "type": "module",
6
6
  "scripts": {