Add namespace and collection inventories
This commit is contained in:
@@ -146,7 +146,7 @@ engines and prepared handles retain their captured definitions; schema and
|
||||
request artifact resources still follow their runtime lifecycle. Inspection
|
||||
does not watch or reload sources automatically.
|
||||
|
||||
## Discover Available Profiles And Prompts
|
||||
## Discover Available Resources And Collections
|
||||
|
||||
Use [`Engine.ListProfiles`](../../listing.go),
|
||||
[`Engine.ListPrompts`](../../listing.go), and
|
||||
@@ -181,6 +181,12 @@ if len(prompts) > 0 {
|
||||
}
|
||||
```
|
||||
|
||||
Use [`Engine.ListNamespaces`](../../listing.go) to discover resource-bearing
|
||||
namespaces across the entire captured configuration, independent of view
|
||||
scopes. [`Engine.ListCollections`](../../listing.go) reports effective
|
||||
collection declarations, including metadata-only entries; it does not infer
|
||||
collection metadata from resource membership or source history.
|
||||
|
||||
These lists describe effective membership, not ConfigKit contribution history,
|
||||
and do not promise that a profile is ready to execute. Use inspection for
|
||||
details and preparation to resolve request resources. The linked method GoDoc
|
||||
|
||||
@@ -16,7 +16,7 @@ contributor workflow and validation.
|
||||
| `examples/go-library/run` | Demonstrates an offline downstream consumer using a prompt file, programmatic profile, inline input, an injected deterministic model client, and `Run`. It is not a public library package. | [Example program](../../examples/go-library/run/main.go) |
|
||||
| `examples/go-library/observe` | Demonstrates offline built-in HTTP retry and synchronous metadata observation across structured proposal and assessment runs using embedded sources, two profiles on one finite backend, and an application decision. It is not a public library package. | [Example program](../../examples/go-library/observe/main.go) |
|
||||
| `internal/backend` | Holds a defensive, immutable lookup of final backend definitions, including diagnostic metadata, plus capacity policies validated by the configuration adapter. | [Backend registry](../../internal/backend/registry.go) |
|
||||
| `internal/configuration` | Loads keyed backend, profile, and prompt configuration through ConfigKit; records effective field presence, validates final values including optional diagnostic metadata, captures indexed prompt definitions, referenced message content, compiled templates, input metadata snapshots, sorted identity-only backend, profile, and prompt inventories, backend and presence-aware profile snapshots, and an explicit read-only inspection view. | [Typed loader](../../internal/configuration/load.go), [identity listing](../../internal/configuration/listing.go), [internal sources](sources.md#typed-configuration-loading) |
|
||||
| `internal/configuration` | Loads keyed backend, profile, and prompt configuration through ConfigKit; records effective field presence, validates final values including optional diagnostic metadata, captures indexed prompt definitions, referenced message content, compiled templates, input metadata snapshots, sorted identity-only backend, profile, and prompt inventories, resource namespace sets, effective collection declarations, backend and presence-aware profile snapshots, and an explicit read-only inspection view. | [Typed loader](../../internal/configuration/load.go), [identity listing](../../internal/configuration/listing.go), [internal sources](sources.md#typed-configuration-loading) |
|
||||
| `internal/capacity` | Owns engine-local bounded execution admission and FIFO model-generation permits for limited backend IDs, including cancellation-safe waiter removal and client wrapping. | [Internal capacity management](capacity.md) |
|
||||
| `internal/domain` | Defines internal framework values for requests, artifacts, prompt definitions, requirement inspection, profiles, execution targets, rendering, generation, validation, and source-neutral smoke diagnostics, and owns source-neutral invariants for shared execution settings, OpenAI-compatible base endpoints, session identifiers, output contracts, and resource-identity syntax and qualification. Source parsing, required fields, other source-specific normalization, defaulting, and boundary-specific error classification remain with their callers. | [Domain declarations](../../internal/domain/domain.go), [requirement values](../../internal/domain/requirements.go), [endpoint invariant](../../internal/domain/endpoint.go) |
|
||||
| `internal/engine` | Assembles caller-selected configuration into one snapshot, then constructs shared capacity, rendering, validation, generation, repair, the ordinary runner, and the smoke tester for each engine. Immutable namespace views share those collaborators and qualify caller-supplied execution, inspection, and diagnostic selections without rewriting captured references. Built-in engines provide the diagnostic HTTP collaborator; injected-client engines do not. It delegates identity listing directly to the captured configuration inventory rather than the runner. | [Engine assembly](../../internal/engine/engine.go), [internal sources](sources.md#typed-configuration-loading), [internal runner](runner.md) |
|
||||
|
||||
@@ -711,6 +711,16 @@ deduplication/sorting, unqualified exclusion, metadata-only collections,
|
||||
scope-independent enumeration, effective overrides, cancellation, and ownership.
|
||||
Run configuration/root tests; no file access or generation should be needed.
|
||||
|
||||
Completion: added global resource-namespace and effective collection inventory
|
||||
APIs. Namespace results are distinct, sorted, kind-selectable, and exclude
|
||||
unqualified resources; collection results preserve absent/null versus empty
|
||||
release labels and include metadata-only declarations. Inventories remain
|
||||
independent of namespace views and return caller-owned values. Validation passed:
|
||||
`GOWORK=off go test ./...`, focused
|
||||
`GOWORK=off go test -race . -run 'TestResourceAndCollectionInventories' -count=1`,
|
||||
`GOWORK=off go vet ./...`, `GOWORK=off python3 scripts/check-examples.py`,
|
||||
and `git diff --check`.
|
||||
|
||||
## Stage 16: Maintain Complete Consumer And Migration Examples
|
||||
|
||||
Scope: runnable/synthetic examples and precise migration guidance.
|
||||
|
||||
Reference in New Issue
Block a user