Skip to content

Spike scoped approval for journal appends - #1337

Merged
taras merged 6 commits into
codex/sidekick-reply-approval-correctionfrom
codex/scoped-append-approval-spike
Nov 15, 2026
Merged

taras merged 6 commits into
codex/sidekick-reply-approval-correctionfrom
codex/scoped-append-approval-spike

Conversation

@taras

@taras taras commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Why

Sidekick reply acceptance needs permission to save specific text that secret detection flagged. This spike tests whether Core can provide that permission to any trusted host while the host owns the approval decision and the meaning of its record.

What changes

Sidekick asks for approval within its existing turn continuation. On acceptance it calls the scoped approveAppend() operation and publishes the reply using the ordinary durable operation. The approval names the coroutine, effect, exact string fields, and approved finding ranges. The journal still scans the entire append and requires every finding to match.

The trusted host receives the operation alongside the execution handle. Grant registration now travels directly to its owner, outside replaceable Context. The scope retires the grant, and journal replay restores the acknowledged record without asking for approval again.

Review guide

Start with packages/core/tests/append-approval.test.ts to see a host with no Agent dependency. Then follow approveAppend() in packages/core/src/secrets/append-approval.ts and its Sidekick caller in packages/core/src/agent/conversation.ts.

How to verify it

  • The standalone host exercises exact publication, replay, scope expiry, single use, changed text, and additional findings in unrelated fields.
  • The existing Agent conversation suite exercises accepted replies, automatic feedback, continuation and storage failures.
  • Local checks at 3a2b2264c passed on Deno (167 steps across four suites), Node (94 tests), and Bun (94 tests).

Scope

This draft is stacked on #1327 so the diff shows only the spike. Generated evaluation and automatic feedback still use Agent-specific provenance logic. The generic append approval is the seam tested here.

taras and others added 6 commits November 15, 2026 12:13
Move packages/core/src/agent into the new publishable @executablemd/agent
package with ./api and ./host entries, and remove every Agent export from
Core's root, API and host. Agent production code reaches Core only through
its public entries; Core's host gains the narrow failure, source-owner and
approved-copy placement helpers that requires. Registrations, identity
components and documentation keep the @executablemd/core origin and the
synthetic conversation root is unchanged.

Migrate CLI, ACP, Workflow, Test Agent, examples and tests to the new
entries, move the Agent suites and PA4 into the package, add the package
boundary tests, and update manifests, locks, packaging, the publish
workflow, specs, architecture and the README map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The nested-run inspection host built its Plugin source with Agent imported
from Core's root, which no longer exports it. The documentation smoke's
closing line now names both packages it documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PB1 now reads `deno info` through the scoped quiet-process pattern, so a
passing run no longer forwards megabytes of graph JSON, and its one
predicate covers the registry spellings (npm, JSR and jsr.io) beside the
local Agent paths. The npm CLI artifact suite asserts the emitted Core
manifest has no Agent dependency and that a consumer outside the checkout
imports both Agent subpaths through the emitted export map.

The release specification records Agent's publish order, its relocated
documentation asset and the new npm check. The language spec states the
documentation join by registered origin and why Agent keeps the Core
origin; the ACP and launch specs name the Agent package as the owner of
configured uses, setup snapshots and the delivered launch coordinator,
with phases retained under Core-issued invocation identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@taras
taras marked this pull request as ready for review November 15, 2026 23:03
@taras
taras merged commit 56b5af5 into codex/sidekick-reply-approval-correction Nov 15, 2026
1 check passed
@taras
taras deleted the codex/scoped-append-approval-spike branch November 15, 2026 23:04
taras added a commit that referenced this pull request Nov 16, 2026
Restack the reviewed #1327 reply approval feature (tree delta
853e862..35dcb34, previously at 88703be) onto main after the Agent
package extraction (#1343), without the #1337 extraction spike.

Agent owns the conversation, reply review, acceptance record and replay
(packages/agent/src/reply-acceptance.ts, reply-review.ts, exported from
@executablemd/agent/host). Core keeps the generic pieces the feature needs:
the accepted-reply copy grants, reply secret location and text checks,
Elicit answer readers, and executeInstalledBound with the evaluator that
takes an AcceptedRootReply, all exported from @executablemd/core/host.
Core imports nothing from the Agent package.

The approval drawer takes precedence over main's Sidekick inspection view,
and the chat projection keeps both main's request reading and the
feature's control outcomes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant