Skip to content

feat: make the template CodeMode-native - #11

Merged
jmgilman merged 7 commits into
masterfrom
feat/codemode-template
Sep 11, 2026
Merged

jmgilman merged 7 commits into
masterfrom
feat/codemode-template

Conversation

@jmgilman

Copy link
Copy Markdown
Contributor

Changes

  • Build one immutable CodeMode runtime, exposing exactly search_api, describe_api, and execute; register random.int as a typed capability.
  • Pin published CodeMode v0.2.0 and production MCP SDK v1.7.0 with Go 1.26.6. Keep the independent development proxy on its existing SDK v1.6.1 to preserve its legacy logging protocol.
  • Preserve trusted identity per HTTP request using verified TokenInfo.UserID; use explicit single-user stdio identity and demo AllowAll authorization.
  • Rename module, binary, packaging, workflows, configuration, docs, and consumer guidance to template-mcp-codemode.
  • Exercise real worker execution in root:check and both binary/container release paths.

Verification

  • Complete local moon run root:check passes: format, lint, race tests, builds, documentation, proxy checks, and real stdio MCP smoke.
  • HTTP identity regression fails before the fix and passes after it; real authenticated HTTP execution, cancellation, recovery, and unauthenticated rejection verified.
  • Live proxy reload verified on the same client session during execution: unchanged three-tool definitions, changed capability discovery, interrupted old execution, successful new execution, and no leftover child processes.
  • Nonroot read-only scratch-container execution, cancellation, and recovery verified.
  • Renamed disposable consumer builds; the documented text.uppercase example executes and returns DRAW 7.

Merge gate

Require green PR checks and the explicitly dispatched binary/image release rehearsal before merging.

Upstream adapter and release: meigma/codemode#54, meigma/codemode#55, https://github.com/meigma/codemode/releases/tag/v0.2.0.

Wire random.int through CodeMode, share one HTTP runtime across
sessions, and install trusted subjects per transport. The CLI
supplies authz.AllowAll explicitly.
Rename every owned build, release, container, lint, docs-site, and dev-proxy
identity reference from template-mcp to template-mcp-codemode, and set the
server title to "Meigma CodeMode MCP server template".

Toolchain and dependencies:
- Pin Go 1.26.6 in mise.toml and regenerate mise.lock for all four platforms.
- Move the nested proxy module to
  github.com/meigma/template-mcp-codemode/tools/proxy on go 1.26.6 with
  go-sdk v1.7.0. No unrelated dependency updates.

Release baseline:
- Reset .release-please-manifest.json to 0.0.0 and add initial-version 0.1.0,
  plus 0.0.0 in the melange/apko x-release-please-version markers. Release
  Please treats a manifest version of 0.0.0 as "never released" and falls back
  to initial-version, so the first release here is v0.1.0 rather than a bump of
  the inherited 0.1.4 history.

Real MCP smoke test:
- Add .github/scripts/mcp_smoke.py: a stdlib Python script that speaks the real
  stdio JSON-RPC protocol to a target argv, asserts the exact server identity,
  the exact search_api/describe_api/execute surface, discovery of random.int,
  a deterministic bounded Starlark composition (min == max), and rejection of
  an impossible range — then proves the session still serves afterwards.
- Wire it into the release dry run and the real release for both the host
  binary and the container image (docker run -i), replacing verification that
  only checked --version/--help, and surface it in the inspection summary.
- Add a root:smoke Moon task in the check graph so the same end-to-end path is
  exercised on every PR.
@jmgilman
jmgilman merged commit 70663aa into master Sep 11, 2026
11 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