feat: CoMSES Net integration (5 tools + 1 prompt)#2
Merged
Conversation
- ComsesClient: search, get_codebase, get_release, resolve_latest - Retry policy: 502/503/504 + network errors, max 2 retries, never on 4xx - search_comses, get_comses_model MCP tools - httpx>=0.27 dep, COMSES_MAX_DOWNLOAD_MB env var
- download_release: resolve → HEAD → stream → safe extract → inspect - Zip-slip, zip-bomb, atomic temp-to-final move, .comses_complete marker - download_comses_model MCP tool
- open_comses_model: loads NetLogo models, returns resolved_version - read_comses_files: priority ordering, byte-cap truncation, UTF-8 replace - Zero-match case, errors-when-cache-missing, latest resolution
- Prompt: NetLogo-first, pins resolved_version, stops-and-asks on errors - README + CHANGELOG + DEVELOPMENT.md updates
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.
Summary
Implements the full COMSES integration per docs/COMSES_PLAN.md v5 — the trust-building deliverable Serge asked for on 2026-04-17.
search_comses,get_comses_model,download_comses_model,open_comses_model,read_comses_files.explore_comses— NetLogo-first, source-introspection, never fabricates commands, stops-and-asks on both empty-discovery and runtime-error cases..comses_completemarker, race reconciliation."latest"pinning: resolved to a concrete version BEFORE any cache path is computed; returned to the AI so follow-upread_comses_filescalls stay pinned to the same slot.Supersedes the auto-closed #1 (branch renamed from
feat/comses-integration→feat/comses).Commits
9cc4558— API client + search/get tools (1/4)1eead71— safe download pipeline (2/4)bf249c4— cache-aware open + file reader (3/4)50315a8— explore_comses prompt + docs (4/4)Test plan
python -m pytest) — 41 existing + 44 new