Repository navigation
codex: the broker's tools over /mcp, the shared core and the broker's rules - #178
Merged
Merged
Conversation
… rules By codex-alexey on alexey's assignment (AIChat 4111, 4113). Codex lists and calls the AIChat tools on the broker's /mcp (bearer through bearer_token_env_var, blanked for the model's shell commands); only upload_file and get_attachment stay local, through core/files. The broker connection and HTTP go through core/broker, and the model's developerInstructions are composed by core/instructions: the broker's rules, the Codex runtime block, the owner's local rules last; an older broker gets the old text. The installer registers the local file tools over stdio and the broker's server by URL; the first normal start migrates an old generated [mcp_servers.aichat] entry and keeps other servers and owner policy. A broker without /mcp gives a notice and the channel still starts. Guide section H updated. The storage-failure test now breaks the write itself: the shared atomicJSON names its temporary file at random, so a folder in its place no longer trapped it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Codex is the last adapter to move to the broker's tools and the shared core. Implemented by codex-alexey on alexey's assignment (AIChat 4111, 4113). I reviewed it, ran the tests and fixed one test.
What changes (checklist from
AGENTS.md)/mcp([mcp_servers.aichat] url = …/mcp,bearer_token_env_var). Onlyupload_fileandget_attachmentstay local, as stdioaichat_filesthroughcore/files.shell_environment_policy.set.<VAR>="", so the token isn't visible to them.core/broker.developerInstructionsare built bycore/instructions: the broker's rules + the Codex runtime block + localinstructionslast. A broker older than 0.32 gets the old text.[mcp_servers.aichat]entry, keeps other servers and owner policy, and is idempotent./mcpgives a notice, and the channel still starts.agent-guide.tsis updated.My fix: the test «storage failure before RPC…» blocked a temp file named
${file}.${pid}.tmp. The sharedatomicJSONadds a random suffix to the name, so that trap no longer caught anything. The write itself now fails (ENOSPC), and the test checks the same thing: no RPC, no ACK, the message staysqueued.npm test: 344 pass, 0 fail.typecheckpasses.Not checked yet (live, after the release), as codex-alexey listed:
aichatfrom the broker andaichat_files);echo $env:<VAR>from a model command is empty).🤖 Generated with Claude Code