diff --git a/CONFORMANCE.md b/CONFORMANCE.md index 73b87490c..6af2bf261 100644 --- a/CONFORMANCE.md +++ b/CONFORMANCE.md @@ -264,6 +264,7 @@ The three honesty levels: | `DK-40` | `build` | The prism.volumes namespace of prism-code is a view over the capability file with create, list, inspect and remove: a host-folder mount, a name or provider outside the grant, and a store outside the image's declared world or the active policy are refused with CapabilityDeniedError before any provider runs, attaching a store to a guest raises a typed error naming host effects #216 and #217, and the module never reads or writes a system model and imports only errors and the capability code. | | `DK-41` | `build` | The prism.system namespace of prism-code reports info, version, df, prune and events over the containers of its own client: info and version name the package, the holo format revision, the runtime and the toolchain and builder image a project's prismpm.lock pins, prune removes exited containers only and no image, events streams the create, start, die and destroy events of the client's containers with since, until and filters, and createPrism and Prism.fromEnv expose the eight other modules of #440 on one client. | | `DK-42` | `build` | The Rust runtime runs @prism-code/conformance through its shim, prism-conformance-shim, which translates prism/conformance-shim/1 requests to the prismpm library's inspect and verify and judges nothing: every check of the suite runs, the digests checks pass in full, and each check the Rust runtime does not pass is named with its reason in crates/conformance/runtime/declaration.json, so a check that starts to pass or newly fails fails the run. | +| `DK-44` | `build` | The prism-code system and auth command groups are the CLI of prism.system and prism.auth: system info and version name the package, the holo format, the runtime and the toolchain and builder image the project's prismpm.lock pins, events replays and follows create, start, die and destroy from the container store with since, until and filters, df counts every record and prune removes exited containers only and asks first unless forced; auth login checks the credential with the registry before storing it where Docker would, refuses a password on the command line, and no password reaches stdout, stderr or an error in any spelling, and logout names an ambient token it cannot clear. | ## security diff --git a/SPEC.md b/SPEC.md index 942b957c5..356694b2f 100644 --- a/SPEC.md +++ b/SPEC.md @@ -4491,6 +4491,7 @@ Every row below is normative, has the honesty level registered in `model/ids.tom | `DK-40` | `sdk` | The prism.volumes namespace of prism-code is a view over the capability file with create, list, inspect and remove: a host-folder mount, a name or provider outside the grant, and a store outside the image's declared world or the active policy are refused with CapabilityDeniedError before any provider runs, attaching a store to a guest raises a typed error naming host effects #216 and #217, and the module never reads or writes a system model and imports only errors and the capability code. | §12 | | `DK-41` | `sdk` | The prism.system namespace of prism-code reports info, version, df, prune and events over the containers of its own client: info and version name the package, the holo format revision, the runtime and the toolchain and builder image a project's prismpm.lock pins, prune removes exited containers only and no image, events streams the create, start, die and destroy events of the client's containers with since, until and filters, and createPrism and Prism.fromEnv expose the eight other modules of #440 on one client. | §12 | | `DK-42` | `sdk` | The Rust runtime runs @prism-code/conformance through its shim, prism-conformance-shim, which translates prism/conformance-shim/1 requests to the prismpm library's inspect and verify and judges nothing: every check of the suite runs, the digests checks pass in full, and each check the Rust runtime does not pass is named with its reason in crates/conformance/runtime/declaration.json, so a check that starts to pass or newly fails fails the run. | §12 | +| `DK-44` | `sdk` | The prism-code system and auth command groups are the CLI of prism.system and prism.auth: system info and version name the package, the holo format, the runtime and the toolchain and builder image the project's prismpm.lock pins, events replays and follows create, start, die and destroy from the container store with since, until and filters, df counts every record and prune removes exited containers only and asks first unless forced; auth login checks the credential with the registry before storing it where Docker would, refuses a password on the command line, and no password reaches stdout, stderr or an error in any spelling, and logout names an ambient token it cannot clear. | §12 | | `OC-01` | `oci` | Product releases use OCI 1.1 descriptors, manifests, indexes, subjects, annotations, and referrers with registered media types. | §13 | | `OC-02` | `oci` | A locked build atomically emits a verified root only after every declared source, proof, package, oracle, and release gate passes. | §13 | | `OC-03` | `oci` | The release graph closes over all artifacts and binds SBOM, provenance, validation, signature, policy, and deployment referrers to exact subjects. | §13 | diff --git a/STABILITY.md b/STABILITY.md index 97523701a..1e11908d3 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -186,6 +186,7 @@ Removed: `prism-code check [args]` with no holo, which ran `prismpm check` in th | `prism-code` | `manifestProviders`, `ProviderError`, `ProviderNotFoundError`, `ProviderReplyError`, `ProviderFailedError` and their `code`s and `provider.*` checks, the `provider-not-granted` lint warning, the `providers` capability kind and the check `capabilities.providers`; `resolveProviders`, `releaseProviders`, `PROVIDER_MESSAGES`, `PROVIDER_MESSAGES_ENV`, `PROVIDER_TIMEOUT_MS` in `prism-code/node` | [#294](https://github.com/UOR-Foundation/PrismPM/issues/294) | | `prism-code` | `src/volumes.mjs`: `createVolumes`, its `create`, `list`, `inspect` and `remove`, `attachVolume`, `refusalRecord`, `HOST_EFFECTS`, and the `capabilities.host-folder` and `capabilities.host-effects` checks of `CapabilityDeniedError`. Reached as `prism.volumes` on the client (#441) | [#445](https://github.com/UOR-Foundation/PrismPM/issues/445) | | `prism-code` | `prism.system` in `src/system.mjs`: `createSystem`, `createEventBus`, `info`, `version`, `df`, `prune` and `events`, their options, the `prism/system-info/1`, `prism/system-version/1`, `prism/system-df/1`, `prism/system-prune/1` and `prism/system-event/1` shapes, `EVENT_ACTIONS`, `EVENT_HISTORY` and `IMAGE_STORE`; `containers.list` and `containers.prune`, and the `onEvent` option of `createContainers` | [#446](https://github.com/UOR-Foundation/PrismPM/issues/446) | +| `prism-code` | The `prism-code system info\|version\|events\|df\|prune` and `prism-code auth login\|logout` groups (`src/cli/system.mjs`, `src/cli/auth.mjs`), the top-level `login` and `logout`, their options and `--json` output, and the rule that `login` takes no password on the command line | [#446](https://github.com/UOR-Foundation/PrismPM/issues/446), [#447](https://github.com/UOR-Foundation/PrismPM/issues/447) | | `prism-code` | The client: `createPrism` exposing `images`, `containers`, `networks`, `volumes`, `system`, `auth`, `errors` and `verify`, its options, `MODULES` and `memoryCapabilityStore`; `Prism.fromEnv()` and `Prism.create` in `prism-code/node`; the `client.option`, `auth.unavailable` and `images.unavailable` codes | [#441](https://github.com/UOR-Foundation/PrismPM/issues/441) | | `prism-code` | The CLI groups `prism-code ` in `src/cli/`: `images build`, `inspect`, `pull`, `push`, `verify` and `containers run`, `rm`, `inspect`, each the same as the flat verb it names, and `GROUPS`, `TOP_LEVEL` and `groupVerb` in `src/cli/index.mjs` | [#441](https://github.com/UOR-Foundation/PrismPM/issues/441) | | `prism-code` | `prism.errors` in `src/errors-namespace.mjs`: the error classes and functions of the package exports, `errors.codes` (the stable code of each class, by class name) and `errors.spec`; every code prism-code raises, each listed with its owning capability in model/sdk-diagnostics.toml and ERRORS.md. Reached as `prism.errors` on the client (#441) | [#448](https://github.com/UOR-Foundation/PrismPM/issues/448) | diff --git a/crates/conformance/src/cases/mod.rs b/crates/conformance/src/cases/mod.rs index d9b02b580..0211d9ca3 100644 --- a/crates/conformance/src/cases/mod.rs +++ b/crates/conformance/src/cases/mod.rs @@ -741,6 +741,13 @@ pub fn run_at(root: &Path, id: &str) { &[("sdk/npm/prism-code/test/system.test.mjs", 20)], "600000", ), + // The `prism-code system` and `auth` command groups of #446 and #447. + "DK-44" => node_suite::verify_exact( + root, + id, + &[("sdk/npm/prism-code/test/system-auth-cli.test.mjs", 16)], + "600000", + ), "DK-35" => verify_node_suite( root, id, diff --git a/crates/conformance/tests/conformance.rs b/crates/conformance/tests/conformance.rs index 12c5b42f9..9010623bf 100644 --- a/crates/conformance/tests/conformance.rs +++ b/crates/conformance/tests/conformance.rs @@ -225,6 +225,7 @@ test_case!(conformance_dk_35, "DK-35"); test_case!(conformance_dk_39, "DK-39"); test_case!(conformance_dk_40, "DK-40"); test_case!(conformance_dk_41, "DK-41"); +test_case!(conformance_dk_44, "DK-44"); test_case!(conformance_dk_42, "DK-42"); test_case!(conformance_oc_01, "OC-01"); test_case!(conformance_oc_02, "OC-02"); diff --git a/features/suites/sdk.feature b/features/suites/sdk.feature index d3028755b..42e3bdc91 100644 --- a/features/suites/sdk.feature +++ b/features/suites/sdk.feature @@ -271,3 +271,10 @@ Feature: sdk When the suite runs every check against the shim Then the run passes with every gap declared, and the digests checks pass in full And the checks that pass are exactly the ones DK-42 lists, by feature + + @DK-44 @build + Scenario: The prism-code system and auth command groups are the CLI of prism.system and prism.auth: system info and version name the package, the holo format, the runtime and the toolchain and builder image the project's prismpm.lock pins, events replays and follows create, start, die and destroy from the container store with since, until and filters, df counts every record and prune removes exited containers only and asks first unless forced; auth login checks the credential with the registry before storing it where Docker would, refuses a password on the command line, and no password reaches stdout, stderr or an error in any spelling, and logout names an ambient token it cannot clear. + Given a PRISM_HOME with containers, a project with a prismpm.lock, a Docker config folder and an in-process registry + When the system and auth verbs are called as the CLI dispatcher calls them, with good and bad arguments + Then system reports, replays and follows events, counts and prunes as prism.system does, and every bad argument is a usage error + And login stores only a credential the registry accepts, a password on the command line is refused, and no secret appears in any output or error diff --git a/model/ids.toml b/model/ids.toml index 49bfcb8c1..3dbd971e4 100644 --- a/model/ids.toml +++ b/model/ids.toml @@ -1230,6 +1230,12 @@ suite = "sdk" level = "build" statement = "The Rust runtime runs @prism-code/conformance through its shim, prism-conformance-shim, which translates prism/conformance-shim/1 requests to the prismpm library's inspect and verify and judges nothing: every check of the suite runs, the digests checks pass in full, and each check the Rust runtime does not pass is named with its reason in crates/conformance/runtime/declaration.json, so a check that starts to pass or newly fails fails the run." +[[id]] +id = "DK-44" +suite = "sdk" +level = "build" +statement = "The prism-code system and auth command groups are the CLI of prism.system and prism.auth: system info and version name the package, the holo format, the runtime and the toolchain and builder image the project's prismpm.lock pins, events replays and follows create, start, die and destroy from the container store with since, until and filters, df counts every record and prune removes exited containers only and asks first unless forced; auth login checks the credential with the registry before storing it where Docker would, refuses a password on the command line, and no password reaches stdout, stderr or an error in any spelling, and logout names an ambient token it cannot clear." + [[id]] id = "OC-01" suite = "oci" diff --git a/sdk/docs/cli.json b/sdk/docs/cli.json index 071053029..089ba3c20 100644 --- a/sdk/docs/cli.json +++ b/sdk/docs/cli.json @@ -58,7 +58,11 @@ { "name": "build", "usage": "prism-code build [--check] [--hosted] [--local] [--remote github] [--repo ] [--ref ] [--timeout ] [--allow-dirty] [--json]", "summary": "Build the project into a holo inside the SDK image the lockfile pins. With `--remote github`, the repository's own GitHub Actions builds one commit instead, pushed to `prism/build/` so the run is that commit and no other, and this machine verifies what comes back before anything lands under `.prism/build/`: the commit and repository named in the artifact, the holo's SHA-256, the signed provenance (its subject, its repository and commit, and its signature by a workflow of the repository through GitHub's issuer), then `check` at the P0 policy unless `--policy` names one, the recorded fingerprint, and every acceptance vector replayed here. Needs the template's `build.yml` in the repository, a token (`GITHUB_TOKEN`, `GH_TOKEN` or `gh`), and the Sigstore packages or `gh` for the signature. No Docker. With `--check`, validate the model and write nothing: the full check in the image when it is on this machine, or with `--local`; otherwise `prism.toml` here and `lexlean check` of the files under `src/` on the hosted verifier, which skips the lockfile and SDK pins and says so. The hosted check sends the files under `src/`, unlisted but not private." }, { "name": "verify", "usage": "prism-code verify [--lean] [--hosted] [--local] [--all]", "summary": "Run verify in the SDK image the lockfile pins. With `--lean`, run `lexlean verify` on the project's LexLean project instead: every theorem through Lean and leanchecker with its exact axiom policy, about a minute. It runs in the image when the image is on this machine, or with `--local`; otherwise on the hosted verifier at `https://mcp.uor.foundation/` (profile `prism-app`), which takes a project whose only source root is `src` and passes only when every entrypoint module comes back verified, and writes its record to `.lexlean/hosted/`. The hosted verify sends the files under `src/`, unlisted but not private." }, { "name": "axioms", "usage": "prism-code axioms [--write] [--json]", "summary": "Compile the project once in the SDK image and print the axiom set Lean observes for every definition and theorem beside the set the source declares; exit 1 while any differs. With `--write`, set each `axioms` member to the observed set and format the project." }, - { "name": "conformance", "usage": "prism-code conformance", "summary": "Run the conformance suite in the SDK image the lockfile pins." } + { "name": "conformance", "usage": "prism-code conformance", "summary": "Run the conformance suite in the SDK image the lockfile pins." }, + { "name": "system", "usage": "prism-code system [--project ] [--since