Skip to content

feat(prism-code): finish prism.containers and prism.volumes, SDK and CLI (Part of #443) - #620

Merged
afflom merged 12 commits into
mainfrom
claude/project-thread-a1cnc3
Nov 12, 2026
Merged

afflom merged 12 commits into
mainfrom
claude/project-thread-a1cnc3

Conversation

@afflom

@afflom afflom commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Requested by Alex · project thread

v0.5 workstream WS3. Part of #443 and #445.

Why

#443 asks for every prism.containers verb in both the SDK and the CLI, with any bypass of the run gate explicit and recorded on the container. #445 asks for volumes to be declarable, creatable and inspectable through the SDK and the CLI, and for calls that need host effects to raise a typed error naming #216 and #217.

What

SDK

  • containers.dispatch(image, input, options) runs once and returns the output, as a call. The container is removed unless rm: false, and a failed run rejects with its typed error. A refused image never runs.
  • containers.inspect(id) and logs(id) take an id or a unique prefix, and are also on Container. logs is served from the stored output, so a container read back from PRISM_HOME still has its logs.
  • prism/container/1 records allowUnverified. When a start runs past a refusing check, it also records unverified: { at, warning, code, check }.
  • create takes volumes. Each name goes through attachVolume. Each refusal is kept on the record as volumes: [{ name, attached, refusal }], and the guest never starts. allowUnverified does not bypass this.
  • Real Volume, CreatedVolume, Volumes, ContainerVolume and VolumeRefusal types.

CLI (through the group dispatch of #625)

  • prism-code containers create|inspect|logs|ps|rm|run|start. create prints the id and takes --volume. ps takes --all and --json. The store never keeps the input, so start can only run a container that was created in the same process. Started from another process, it raises container.state.
  • prism-code volumes create|inspect|ls|rm --project <dir> reads the project's capability grant and provider declarations and runs providers through providers.mjs. create prints the names of the variables it provisions, never their values.

Model and conformance

  • Developer glossary (LexLean Developer.lex.tex): ps and logs are available now, and ls is new. stop stays reserved for Long-running holos as containers: run -d, ps, stop, rm, logs and exec #350, so it is not added. Regenerated with cargo xtask bindings-package --write and check-developer-view --write.
  • The container.* codes move from DK-41 to the new DK-43, the containers conformance case (containers.test.mjs, 43 tests). DK-40 now counts 28 tests.
  • Package: +12 KiB allowance (scripts/package-allowances/containers-volumes.json). The package is 1653369 bytes against a 1660928-byte cap.

Test

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5

…ainer (Part of #443, #445)

containers.dispatch, inspect, logs and stop by id; the allowUnverified
bypass recorded on prism/container/1; a volumes option on create that
goes through prism.volumes and keeps the typed host-effects refusal on
the record; real Volume and Container types; container.stop on DK-43,
a new conformance case for the containers module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5

afflom commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

The node 22 and node 24 jobs fail only on all required distributed files fit the 1584 KiB package budget (test 583). Every other test passes. The package is 1589.1 KiB. This PR already includes its allowance, scripts/package-allowances/containers-volumes.json (+12 KiB), but only #618 makes the cap the sum of those files. I'll merge main in once #618 lands, which should turn these jobs green, and then add the CLI groups.


Generated by Claude Code

@afflom
afflom marked this pull request as ready for review November 12, 2026 04:55
…es it (Part of #443)

The developer view of #347 keeps the Docker word stop until Prism can
stop a run (#350), so prism.containers has no stop verb and no
container.stop code yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5
…-a1cnc3

# Conflicts:
#	sdk/npm/prism-code/CHANGELOG.md
…(Part of #443)

prism.containers.list and prism.containers.logs have the behaviour the
developer view's glossary reserved for #350, so the words are available
now; stop still waits for #350. Regenerated with bindings-package and
check-developer-view --write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5
…-a1cnc3

# Conflicts:
#	sdk/npm/prism-code/CHANGELOG.md
prism-code containers create|inspect|logs|ps|rm|run|start and
prism-code volumes create|inspect|ls|rm, in src/cli/ through the group
dispatch of #441. volumes reads a project's capability grant and
provider declarations, and create prints variable names, never values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5
@afflom afflom changed the title feat(prism-code): finish prism.containers and volumes on a container (Part of #443) feat(prism-code): finish prism.containers and prism.volumes, SDK and CLI (Part of #443) Nov 12, 2026
…and the skill (Part of #443)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5
…-a1cnc3

# Conflicts:
#	CONFORMANCE.md
#	SPEC.md
#	features/suites/sdk.feature
#	model/ids.toml
#	sdk/npm/prism-code/developer-surface.json
#	sdk/npm/prism-code/src/cli/index.mjs
#	sdk/npm/prism-code/test/fixtures/package-files.json
…iner store (Part of #443)

get re-reads the record on every call, so a cached Container takes
another client's start, exit or removal instead of the record it first
read. A run in progress in this process keeps its own record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P9bd1FaiHnChhEcZ5
@afflom
afflom merged commit 287040c into main Nov 12, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants