feat(agent-spec): add typed Resource bindings - #86
Merged
schickling merged 4 commits intoJul 30, 2026
Conversation
Define a minimal named Resource envelope with exact URI identity, opaque type tags, strict uniqueness and shape validation, and no runtime lifecycle semantics. agent-session-id: dev3.dotfiles-cos-misc-st2-resource-design agent-tool: Codex agent-tool-version: 0.145.0 agent-model: gpt-5.6-sol agent-runtime-profile: /home/schickling/.local/state/agent-session-recovery/2026-07-29-pty-st2-cutover/runtime-profile/profile-without-null-opencode.json agent-skills-manifest: /nix/store/kx5j47nghj1yps2v693ryb6wnf1c2xhb-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@16a22c6
Validate exact RFC 3986 syntax without normalization, keep public serde on the same strict schema, and expose declared descriptors through the stable agents JSON roster. agent-session-id: dev3.dotfiles-cos-misc-st2-resource-design agent-tool: Codex agent-tool-version: 0.145.0 agent-model: gpt-5.6-sol agent-runtime-profile: /home/schickling/.local/state/agent-session-recovery/2026-07-29-pty-st2-cutover/runtime-profile/profile-without-null-opencode.json agent-skills-manifest: /nix/store/kx5j47nghj1yps2v693ryb6wnf1c2xhb-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@16a22c6
schickling-assistant
force-pushed
the
schickling-assistant/2026-07-30-resource-bindings
branch
from
July 30, 2026 13:13
bde2cf3 to
93daa77
Compare
schickling-assistant
marked this pull request as ready for review
July 30, 2026 13:18
Contributor
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
agent-session-id: dev3.dotfiles-cos-misc-st2-resource-design agent-tool: Codex agent-tool-version: 0.145.0 agent-model: gpt-5.6-sol agent-runtime-profile: /home/schickling/.local/state/agent-session-recovery/2026-07-29-pty-st2-cutover/runtime-profile/profile-without-null-opencode.json agent-skills-manifest: /nix/store/kx5j47nghj1yps2v693ryb6wnf1c2xhb-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@16a22c6
agent-session-id: dev3.dotfiles-cos-misc-st2-resource-design agent-tool: Codex agent-tool-version: 0.145.0 agent-model: gpt-5.6-sol agent-runtime-profile: /home/schickling/.local/state/agent-session-recovery/2026-07-29-pty-st2-cutover/runtime-profile/profile-without-null-opencode.json agent-skills-manifest: /nix/store/kx5j47nghj1yps2v693ryb6wnf1c2xhb-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@16a22c6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Agent declarations need a portable way to name the external resources an agent depends on without copying payloads or making st2 own downstream schemas, access, readiness, or lifecycle policy.
What
Add a direct named Resource envelope to Agent Spec:
The public
agent-specmodel preserves bindings in deterministic name order across KDL, TOML, and JSON. Names are unique,_tagstays opaque to st2, anduriis validated as RFC 3986 absolute syntax while its exact bytes remain unnormalized. Public serde uses the same strict invariants and rejects unknown policy fields.st2 agents --json [--enrich]exposes each declaration's orderedresourcesdescriptors for language-neutral inspection, including unknown downstream tags.VRS requirements R20-R21 define the portable envelope and its observable, nondisruptive runtime boundary; the implementation spec traces directly to them.
Rationale
The envelope intentionally contains only the agent-local semantic name, concrete type discriminator, and URI identity. Unsupported policy properties fail closed so callers cannot mistake ignored fields for enforcement. Resource bindings are excluded from task launch targets; a resource-only edit adopts a healthy live task without replacement or relaunch.
This does not project folder-eval resources or define resolution, readiness, access, lifecycle, or mutation semantics.
Validation
cargo test -p agent-spec --no-fail-fastcargo test --lib agents::tests --no-fail-fastcargo test --test status_agents --no-fail-fastcargo test --test reconcile resource_only_changes_do_not_replace_or_relaunch_a_live_task --no-fail-fastcargo test --test validate resource --no-fail-fastcargo test --test invariants --no-fail-fastcargo check --workspace --all-targetsgit diff --check origin/main...HEADRelated to compoundingtech/evals#41. Runtime resolution and renderer boundaries remain tracked in #60 and #61.