Skip to content

Register project tools through devtools' shared registry (0.7.9) - #4

Merged
MainSequenceDev merged 5 commits into
mainfrom
codex/shared-project-tool-registry
Oct 23, 2026
Merged

MainSequenceDev merged 5 commits into
mainfrom
codex/shared-project-tool-registry

Conversation

@MainSequenceDev

@MainSequenceDev MainSequenceDev commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Saved project MCP tools (for example the CRM's 72 tools) are now first-class Codex tools, and the plugin no longer carries its own copy of the naming, catalog and result-shaping logic.

Commits on this branch, oldest first:

  • f7c36ce Use local-backend for local development clients — development-backend documentation.
  • 0097b4c Complete MainSequence agent messaging and workspace tools — the 0.5–0.7.6 agent messaging, workspace and panel work (previously unpushed on codex/agent-messaging).
  • e5ba1a7 Register saved MCP tools directly and lift the Codex tool timeout (0.7.8):
    • .mcp.json sets tool_timeout_sec: 300. A cold CRM call measured 53–71 s (release detail and exchange-launch ~2 s each, project initialize 9–60+ s, tools/call 39 s); Codex's default 60 s per-tool timeout failed the tool while the server was still waiting. The server's per-request limit is 290 s and project requests get a 120 s HTTP budget.
    • Every saved connection's tools are registered as ms_<tool>_<hash> with the remote schema (same names as the Claude Desktop plugin); a call forwards to mcp-call and returns the remote tool's own content and structuredContent.
    • Discovery refusals name the argument and what is accepted (wrong environmentUid lists the environments; a release known in another environment names it; arguments may be omitted; release ids match regardless of case). CONTEXT_CHANGED carries its cause.
  • 5db974f Register project tools through devtools' shared registry (0.7.9): src/hosts/toolCatalog.ts and its test removed; the server uses devtools 0.3.12's createProjectToolCatalog / projectToolResult; the catalog file is the host-neutral project-tool-catalog.json. See devtools ADR 0004 (Add the shared project-tool registry (0.3.12) mainsequence-devtools#19).

Testing

  • npm run build vendors devtools 0.3.12; node --test tests/*.test.cjs: 55 pass.
  • Live over stdio (codex/dist/panel-server.js, real session, Production CRM): first tools/list returned the 16 plugin tools, the background refresh wrote 72 CRM schemas and sent tools/list_changed, the next tools/list returned 88 tools, and ms_crm_contacts_list_68ee6e71 returned a contact in 15 s.
  • Live in Codex (0.7.8 build, CLI 0.163.0): codex exec found and called mcp__mainsequence__ms_crm_contacts_list_68ee6e71 directly and answered with the contact; earlier attempts failed only on upstream 500/503 responses, which now reach the model with their status code.

Review notes

  • Depends on devtools 0.3.12, published from Add the shared project-tool registry (0.3.12) mainsequence-devtools#19 (tag v0.3.12); the lockfile pins the published archive (sha512-tV4k57P5…f16Lg==).
  • The installed plugin on the development workstation is still the 0.7.8 build; 0.7.9 is installed from artifacts/local-marketplace with codex plugin add mainsequence@mainsequence-local and a new chat.
  • A connection saved in the current chat is registered as an ms_* tool from the next chat on (Codex rebuilds function schemas per chat, not on tools/list_changed); within the chat it is usable through mainsequence_tools / mainsequence_call_tool.

🤖 Generated with Claude Code

MainSequenceDev and others added 4 commits October 23, 2026 10:30
Document the existing shared-settings operation used to select local-backend:8000, retaining the repositories folder and backend-scoped login/connection behavior. No plugin code or published default changes.

A: No existing ADR amendment; the approved local proxy already owns this endpoint.
B: No new ADR; this uses existing configuration and proxy mechanisms.
C: Owner-requested configuration migration, not a defect or new architecture.
D: Relevant documentation is updated in this commit.

Validation: Installed mainsequence_settings save/get and mainsequence_open report the new backend. No saved login exists for the new hostname. Documentation diff check passed.

Co-authored-by: Codex <codex@openai.com>
Commit the existing panel, messaging and workspace tool work, package metadata, host probes, verification scripts and documentation.

A/B: Preserve the existing decision records and documentation included in this working-tree checkpoint; the commit operation introduces no additional architectural decisions.
C: Owner-requested checkpoint of all pending work, not a new implementation or a claim that every feature is release-ready.
D: Include the pending documentation alongside its code/configuration changes.

Validation: npm test passed: build and all 53 tests. Existing probe results are saved evidence, not a new live verification.
Commit preflight: reviewed all scoped paths; no credential filename/private-key/provider-key/JWT matches; all changed Python/JSON/TOML syntax checks passed.

Co-authored-by: Codex <codex@openai.com>
…7.8)

A cold project MCP call measured 53-71 s against the Production CRM (release
detail and exchange-launch ~2 s each, project initialize 9-60+ s, tools/call
39 s). Codex fails MCP tools at its default tool_timeout_sec of 60 s while the
Claude Desktop plugin runs the same devtools call with a 30-minute budget, so
the CRM worked from Claude and not from Codex.

- .mcp.json sets tool_timeout_sec 300. The server's per-request limit is now
  290 s and project MCP requests (mainsequence_tools, mainsequence_call_tool,
  mainsequence_connection and the registered tools) give devtools a 120 s HTTP
  budget per message instead of its 60 s default.
- Saved project MCP tools are registered as first-class ms_<tool>_<hash> tools
  (src/hosts/toolCatalog.ts), with the Claude plugin's FNV-1a naming so one
  remote tool has one name in both hosts. tools/list answers from a catalog
  cache beside mcp-connections.json; one chat process refreshes it at a time
  under a lock, announces changes with tools/list_changed, keeps a connection's
  earlier tools when its catalog cannot be read, and frees the lock when the
  server ends. A call forwards to mcp-call with the saved connection's backend,
  environment and release and returns the remote tool's content and
  structuredContent. mainsequence_open reports registeredTools; connection and
  account changes refresh the catalog; mainsequence_tools updates it in place
  and no longer discards the shared transport cache for every chat.
- Discovery refusals name the argument and what is accepted: a wrong
  environmentUid lists the account's environments, a release known in another
  environment names it, an unknown release says which read must come first,
  an omitted arguments object is an empty object as the schema says, and
  release ids match regardless of case. CONTEXT_CHANGED carries its cause.

Also included from the 0.7.8 work: devtools 0.3.11, inline agent icons through
include_icons, local backend activation and CRM renewal notes, and the live
verification scripts.

Live acceptance (Codex CLI 0.163.0): a codex exec session called
mcp__mainsequence__ms_crm_contacts_list_68ee6e71 directly and returned a
contact in ~35 s; earlier attempts failed only on upstream 500/503 responses,
which now reach the model with their status code.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
devtools 0.3.12 owns the project-tool registry both host plugins used to carry
(ADR 0004 there): the ms_<tool>_<hash> name, the definition, the result shape, the
catalog refresh and the state directory. This release consumes it:

- src/hosts/toolCatalog.ts is removed. The server creates devtools'
  createProjectToolCatalog, lists catalog.list() after its own tools, keeps
  tools/list_changed, update() after mainsequence_tools and refresh(true) after a
  connection or account change, and answers an ms_* call with projectToolResult.
- The catalog file is project-tool-catalog.json beside mcp-connections.json, shared
  with the Claude Desktop plugin; codex-tool-catalog.json is left unused. Listings
  are scoped to the current account's backend.
- The 120 s project request override is gone: devtools gives project requests that
  budget itself and honours a tool's advertised timeout up to 300 s. Its messages
  name the endpoint, request and status and pass through unchanged.
- tests/panel-tool-catalog.test.cjs moved to devtools; panel-server.test.cjs reads the
  name from devtools and the shared catalog file.

Pins @dev-mainsequence/devtools 0.3.12 (lockfile integrity of its reproducible pack).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The release workflow's npm pack of the same tree produced different archive
bytes than the local pack the lockfile recorded (identical contents, different
compression), so npm ci and scripts/install-devtools.cjs refused the published
0.3.12. The lockfile now carries the integrity of the archive on the registry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@MainSequenceDev
MainSequenceDev merged commit c90f1c1 into main Oct 23, 2026
4 checks passed
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