Add additional scaffolding - #163
Open
mdeyell-valid-mind wants to merge 7 commits into
Open
Conversation
mdeyell-valid-mind
force-pushed
the
mdeyell/sc-17522/scaffolding
branch
from
July 29, 2026 15:46
bb30fc5 to
772b184
Compare
…hing matchApprovedPlan switched to matching approved plans by the agent's stable VMCUID, but migration 030 added agent_cuid as a bare nullable column with no backfill. Any plan approved before this shipped has agent_cuid = NULL, so the CUID-only lookup found nothing and silently dropped an otherwise-valid, human-approved pass. Backfill agent_cuid for existing invocations/plans/external_sessions in the migration, and fall back to the legacy agent_id/alias lookup when the CUID lookup comes up empty, mirroring SubmitPlan's existing revision_of fallback. Co-Authored-By: Claude Sonnet 5 <[email protected]>
klall
approved these changes
Aug 14, 2026
kam-validmind
approved these changes
Aug 14, 2026
kam-validmind
requested review from
kam-validmind and
klall
and removed request for
even-steven and
klall
August 14, 2026 11:23
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.
Summary
Access model
Embedders can enable the new behavior with
atryum.WithAccessResolver.For human operator tokens, the resolver maps a verified token email to:
read_resourcesupdate_agentsdecide_invocationssummarize_invocationsdecide_plansadministrative_operationsStatic operator API-key credentials remain unrestricted. Runtime OAuth tokens follow a different path: an email-less client-credentials token must carry an agent identity that resolves to a stored Atryum agent, and the caller is bound only to that agent's CUID. A runtime token with an email must also resolve to a provisioned user assigned to that agent.
Without an access resolver, Atryum continues to use its existing authentication and authorization behavior.
Scoped resources and decisions
Scoped operators can:
Administrative operations remain restricted. In particular, scoped users cannot create approval rules while deciding an invocation or override the configured summary model.
Invocation summarization
The PR adds
GET /api/v1/invocation-summary/config, an authenticated endpoint that returns only whether invocation summarization is available. This lets the invocation UI enable summarization for assigned users without reading or exposing administrative settings.Summary availability and execution now treat the configured providers independently. A configured local summarizer works without a ValidMind backend client.
Agent ownership
Invocations, plans, and external sessions now persist
agent_cuidalongside the runtimeagent_id.The stable CUID is used to:
Migration 030 adds the ownership columns and supporting indexes, and backfills
agent_cuidon existing rows from theagentstable. Any lookup that keys off the stable CUID (plan-pass matching, idempotency-key scoping) falls back to theagent_id/alias lookup whenever the CUID lookup finds nothing, so a row with no resolved CUID never loses ownership.Verification
go test ./...go vet ./...git diff --checkCompatibility
GET /api/v1/invocation-summary/configagent_cuidis an additive field on invocation and plan API representationsagent_cuidon existing rows and falls back to theagent_id/alias lookup for any row where it's still unset, so in-flight invocations, approved plans, and idempotency retries survive the cutover