@compforge/harness-common 0.5.4 → 0.5.6
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 +7 -0
- package/dist/{context.d.ts → access/context.d.ts} +1 -1
- package/dist/{datasource.d.ts → access/datasource.d.ts} +1 -1
- package/dist/execution.d.ts +1 -1
- package/dist/index.d.ts +16 -15
- package/dist/index.js +15 -14
- package/dist/{repository.d.ts → system/repository.d.ts} +1 -1
- package/dist/system/resource.d.ts +62 -0
- package/dist/system/resource.js +3 -0
- package/package.json +1 -1
- /package/dist/{client-manager.d.ts → access/client-manager.d.ts} +0 -0
- /package/dist/{client-manager.js → access/client-manager.js} +0 -0
- /package/dist/{client-provider.d.ts → access/client-provider.d.ts} +0 -0
- /package/dist/{client-provider.js → access/client-provider.js} +0 -0
- /package/dist/{client.d.ts → access/client.d.ts} +0 -0
- /package/dist/{client.js → access/client.js} +0 -0
- /package/dist/{context.js → access/context.js} +0 -0
- /package/dist/{datasource.js → access/datasource.js} +0 -0
- /package/dist/{file.d.ts → access/file.d.ts} +0 -0
- /package/dist/{file.js → access/file.js} +0 -0
- /package/dist/{component.d.ts → system/component.d.ts} +0 -0
- /package/dist/{component.js → system/component.js} +0 -0
- /package/dist/{environment.d.ts → system/environment.d.ts} +0 -0
- /package/dist/{environment.js → system/environment.js} +0 -0
- /package/dist/{forge.d.ts → system/forge.d.ts} +0 -0
- /package/dist/{forge.js → system/forge.js} +0 -0
- /package/dist/{host.d.ts → system/host.d.ts} +0 -0
- /package/dist/{host.js → system/host.js} +0 -0
- /package/dist/{knowledge.d.ts → system/knowledge.d.ts} +0 -0
- /package/dist/{knowledge.js → system/knowledge.js} +0 -0
- /package/dist/{product.d.ts → system/product.d.ts} +0 -0
- /package/dist/{product.js → system/product.js} +0 -0
- /package/dist/{repository.js → system/repository.js} +0 -0
- /package/dist/{service.d.ts → system/service.d.ts} +0 -0
- /package/dist/{service.js → system/service.js} +0 -0
- /package/dist/{workload.d.ts → system/workload.d.ts} +0 -0
- /package/dist/{workload.js → system/workload.js} +0 -0
package/README.md
CHANGED
|
@@ -176,3 +176,10 @@ headings or code blocks in child output.
|
|
|
176
176
|
Move `KnowledgeMarkdownOptions.renderEntry` or `dictionaryToMarkdown` renderer callbacks
|
|
177
177
|
into each Entry's `markdown()` method. These callback arguments are removed in 0.5; a
|
|
178
178
|
custom Entry now renders consistently when shown alone or through its Dictionary and Knowledge.
|
|
179
|
+
|
|
180
|
+
## Resource inventory
|
|
181
|
+
|
|
182
|
+
`Resource` declares a collection held by a running Service; `ServiceResource` records manages/uses
|
|
183
|
+
relationships without duplicating identity. `ResourceSnapshot` retains typed instances, unit-bearing
|
|
184
|
+
measurements, independently known totals and complete/partial/unavailable coverage. Discovery and
|
|
185
|
+
rendering remain consumer-owned. See [the shared contract](../../../docs/resource.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClientManager } from "./client-manager.js";
|
|
2
|
-
import type { Environment } from "
|
|
2
|
+
import type { Environment } from "../system/environment.js";
|
|
3
3
|
/**
|
|
4
4
|
* Execution-scoped environment access, independent of fixture orchestration.
|
|
5
5
|
* @rule Borrows clients; does not initialize or dispose resources.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from "./client.js";
|
|
2
2
|
import type { ClientProvider } from "./client-provider.js";
|
|
3
|
-
import type { Service } from "
|
|
3
|
+
import type { Service } from "../system/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
6
|
/** Safe descriptive metadata for discovery; never credentials or part of clientKey. */
|
package/dist/execution.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
export * from "./client.js";
|
|
2
|
-
export * from "./client-provider.js";
|
|
3
|
-
export * from "./context.js";
|
|
4
|
-
export { ClientManager } from "./client-manager.js";
|
|
5
|
-
export * from "./datasource.js";
|
|
6
|
-
export * from "./workload.js";
|
|
7
|
-
export * from "./forge.js";
|
|
8
|
-
export * from "./repository.js";
|
|
9
|
-
export * from "./component.js";
|
|
10
|
-
export * from "./host.js";
|
|
11
|
-
export * from "./environment.js";
|
|
12
|
-
export * from "./service.js";
|
|
1
|
+
export * from "./access/client.js";
|
|
2
|
+
export * from "./access/client-provider.js";
|
|
3
|
+
export * from "./access/context.js";
|
|
4
|
+
export { ClientManager } from "./access/client-manager.js";
|
|
5
|
+
export * from "./access/datasource.js";
|
|
6
|
+
export * from "./system/workload.js";
|
|
7
|
+
export * from "./system/forge.js";
|
|
8
|
+
export * from "./system/repository.js";
|
|
9
|
+
export * from "./system/component.js";
|
|
10
|
+
export * from "./system/host.js";
|
|
11
|
+
export * from "./system/environment.js";
|
|
12
|
+
export * from "./system/service.js";
|
|
13
13
|
export * from "./execution.js";
|
|
14
|
-
export type { Product } from "./product.js";
|
|
15
|
-
export * from "./knowledge.js";
|
|
14
|
+
export type { Product } from "./system/product.js";
|
|
15
|
+
export * from "./system/knowledge.js";
|
|
16
16
|
export type { Identity } from "./identity.js";
|
|
17
|
-
export * from "./file.js";
|
|
17
|
+
export * from "./access/file.js";
|
|
18
|
+
export * from "./system/resource.js";
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export * from "./client.js";
|
|
2
|
-
export * from "./client-provider.js";
|
|
3
|
-
export * from "./context.js";
|
|
4
|
-
export { ClientManager } from "./client-manager.js";
|
|
5
|
-
export * from "./datasource.js";
|
|
6
|
-
export * from "./workload.js";
|
|
7
|
-
export * from "./forge.js";
|
|
8
|
-
export * from "./repository.js";
|
|
9
|
-
export * from "./component.js";
|
|
10
|
-
export * from "./host.js";
|
|
11
|
-
export * from "./environment.js";
|
|
12
|
-
export * from "./service.js";
|
|
1
|
+
export * from "./access/client.js";
|
|
2
|
+
export * from "./access/client-provider.js";
|
|
3
|
+
export * from "./access/context.js";
|
|
4
|
+
export { ClientManager } from "./access/client-manager.js";
|
|
5
|
+
export * from "./access/datasource.js";
|
|
6
|
+
export * from "./system/workload.js";
|
|
7
|
+
export * from "./system/forge.js";
|
|
8
|
+
export * from "./system/repository.js";
|
|
9
|
+
export * from "./system/component.js";
|
|
10
|
+
export * from "./system/host.js";
|
|
11
|
+
export * from "./system/environment.js";
|
|
12
|
+
export * from "./system/service.js";
|
|
13
13
|
export * from "./execution.js";
|
|
14
|
-
export * from "./knowledge.js";
|
|
15
|
-
export * from "./file.js";
|
|
14
|
+
export * from "./system/knowledge.js";
|
|
15
|
+
export * from "./access/file.js";
|
|
16
|
+
export * from "./system/resource.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Forge } from "./forge.js";
|
|
2
|
-
import type { Identity } from "
|
|
2
|
+
import type { Identity } from "../identity.js";
|
|
3
3
|
/**
|
|
4
4
|
* A repository identified by its Forge and path within that Forge.
|
|
5
5
|
* @spec forkedFrom is the direct parent path within the same Forge instance, not repository identity.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Service } from "./service.js";
|
|
2
|
+
/** A category of resources persistently managed or used by a running Service.
|
|
3
|
+
* @spec A declaration describes what can be inventoried, not the current count or existence.
|
|
4
|
+
* @rule id identifies the same resource collection across Services; names are presentation only.
|
|
5
|
+
*/
|
|
6
|
+
export interface Resource {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly kind: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Association does not transfer exclusive ownership or duplicate the underlying resource. */
|
|
13
|
+
export interface ServiceResource<S extends Service = Service> {
|
|
14
|
+
readonly service: S;
|
|
15
|
+
readonly resource: Resource;
|
|
16
|
+
readonly relationship: "manages" | "uses";
|
|
17
|
+
}
|
|
18
|
+
/** Caller-owned environment and collection IDs disambiguate identical local instance IDs. */
|
|
19
|
+
export interface ResourceInstanceRef {
|
|
20
|
+
readonly environment: string;
|
|
21
|
+
readonly resource: string;
|
|
22
|
+
readonly id: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ResourceInstance<Details = Readonly<Record<string, unknown>>> {
|
|
25
|
+
readonly ref: ResourceInstanceRef;
|
|
26
|
+
readonly name?: string;
|
|
27
|
+
/** Domain state, never an implicit health verdict. */
|
|
28
|
+
readonly state?: string;
|
|
29
|
+
readonly details?: Details;
|
|
30
|
+
}
|
|
31
|
+
/** Quantities retain their units and aggregation scope; different measures are not additive. */
|
|
32
|
+
export interface ResourceMeasurement {
|
|
33
|
+
readonly name: string;
|
|
34
|
+
readonly value: number;
|
|
35
|
+
readonly unit: string;
|
|
36
|
+
readonly scope: "observed" | "total";
|
|
37
|
+
}
|
|
38
|
+
export type ResourceCoverage = {
|
|
39
|
+
readonly status: "complete";
|
|
40
|
+
} | {
|
|
41
|
+
readonly status: "partial" | "unavailable";
|
|
42
|
+
readonly reason: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Read-only inventory evidence. Collection, access, pagination policy and rendering belong to consumers.
|
|
46
|
+
* @spec totalCount is an independently known count for scope, never inferred from a page of instances.
|
|
47
|
+
* @spec Unknown values are omitted; partial or unavailable acquisition is not a resource health verdict.
|
|
48
|
+
* @rule source, scope and details contain only safe serializable evidence, never access credentials.
|
|
49
|
+
*/
|
|
50
|
+
export interface ResourceSnapshot<Details = Readonly<Record<string, unknown>>> {
|
|
51
|
+
readonly resource: Resource;
|
|
52
|
+
readonly environment: string;
|
|
53
|
+
readonly observedAt: string;
|
|
54
|
+
readonly source: string;
|
|
55
|
+
readonly scope: Readonly<Record<string, string>>;
|
|
56
|
+
readonly coverage: ResourceCoverage;
|
|
57
|
+
readonly totalCount?: number;
|
|
58
|
+
readonly measurements?: readonly ResourceMeasurement[];
|
|
59
|
+
readonly instances?: readonly ResourceInstance<Details>[];
|
|
60
|
+
readonly nextCursor?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function sameResourceInstance(left: ResourceInstanceRef, right: ResourceInstanceRef): boolean;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|