Add a Prime Agent capability package for cost-routed delegation - #18
Open
leonardsellem wants to merge 1 commit into
Open
Add a Prime Agent capability package for cost-routed delegation#18leonardsellem wants to merge 1 commit into
leonardsellem wants to merge 1 commit into
Conversation
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.
What this adds
A second, independent install target alongside the existing Codex plugin:
This candidate is a dedicated branch from
DannyMac180/sol-advisor:main(154fd7ac282088f58246e192347960ba0bfc945f). Its exact head iscf1767c3c973bf2900fcf8e6898ded4828a0eb2f.package.jsonpoints toDannyMac180/sol-advisor, and the diff for inheritedplugins/and.agents/is empty. The Prime Agent and Codex contracts do not import, install, or modify one another.Why put it here
Sol Advisor is a harness discipline: the primary session decomposes, specifies, verifies, and owns acceptance while bounded workers implement. Prime Agent's RLM and persistent IPython kernel make it possible to test the same discipline with different economics:
The package ships no default model or provider. It imports Prime Agent's bundled
rlmruntime lazily and declares no runtime dependency, so every module still imports and tests outside a Prime Agent kernel.The episode corpus
Each delegation opens a record before spawn and closes it with exactly one boundary outcome:
ship,fix-first,rethink, orabandon. Records preserve the exact selector, effort at spawn, child-clamped effort, surviving allowlist size, per-round verification outcomes, correction count, child usage when readable, and named degradations.That ordering is deliberate: opening only after spawn would lose the crashes and refusals that are most useful for routing policy. Corrections remain linked. When a child cannot be corrected in place, the lifecycle starts a new delegation on the same selector and records
restart-only-correctionsrather than silently changing model or losing lineage.Policy fitting is not part of this PR; this PR builds the instrument that accrues the data.
Safety boundary
Prime Agent is not a sandbox, and this package does not claim otherwise. Children run with the operator's permissions; ownership is an attribution and detection device, not enforcement.
The package therefore:
conftest.py, package scripts, hooks, or command-loaded files are not executed beside credentials;Detected violations are reported, never automatically reverted.
Trace-driven corrections included in this head
The latest real skill run exposed a gap fixtures had not caught:
run()treated an importablerlmmodule as proof that delegation worked.preflightandroutingmodules.agent_messageand entirely unusedagent_observerequests even though the lifecycle already supported linked same-model restarts.This head reports capability as unverified until preflight, exposes the documented package-root modules, degrades missing direct correction to the recorded restart path, removes the unused observe probe, and labels raw recovery
unrecorded-manual-delegation. A nestedprime-agentprocess is explicitly not presented as inheriting the parent session's host bridge.On the exact failing session surface, candidate preflight passed despite unavailable
agent_message.list_agents, retained the exact parent selector, returnedrestart-only-corrections, and reportedroster_reachable=false.Verification
Run from a clean proof checkout whose
originwasDannyMac180/sol-advisor:sh scripts/verify-prime-agent-package.sh— 20/20 passedgit diff --check upstream/main...HEAD— passedgit diff upstream/main...HEAD -- plugins .agents— emptypackage.jsonrepository/homepage metadata — matchesDannyMac180/sol-advisorThe full package has also completed a separate live Sol→Luna field acceptance over an existing ChatGPT Pro subscription: a routed worker changed only its owned files, deterministic pytest independently returned
2 passed, a separate reviewer returned zero findings, and episoded-85fa3b079cebclosedship. The temporary host-local provider alias used for that Prime Agent 0.7.0 compatibility test is operator configuration; it is not included here and the package remains provider-neutral.Known inherited verifier condition
The unchanged Codex verifier currently exits 1 on both
upstream/mainand this candidate with:Because
plugins/and.agents/are byte-identical to the base, this PR does not fold an unrelated plugin fix into a package contribution. The new Prime Agent verifier is deliberately independent of that inherited lane; the README still lists the Codex verifier as its own command, and that baseline failure should be resolved separately.Prime Agent 0.7.0 compatibility note
Prime Agent 0.7.0 can authenticate successfully yet return an empty alternate Codex catalog because it sends its own package version as the Codex catalog
client_version. Static model listing therefore does not prove RLM executability. Relevant upstream runtime reports/fixes include #639, #696, #740, and PR #831.The package queries exact selectors through authenticated RLM preflight, owns no OAuth credential, bundles no provider shim, and tells operators to revalidate native discovery after upgrading Prime Agent.
Honest caveats
If the surface is too large, reasonable landing options are the manifest/scaffold/verifier first, documentation-only discoverability, or keeping the implementation in the fork until more episodes accrue.