Conversation
Adds an `examples` table keyed on (repo_root, example_name) that caches each `<repo_root>/examples/<name>` food source's content hash, manifest kind, and cached observation count. Repeat SessionStart scans can then skip unchanged directories without touching the observation table. New methods on `Storage`: `upsertExample`, `getExample`, `listExamples`, `deleteExample`. Schema version bumped 6 → 7. Foundation for the upcoming `@colony/foraging` package; no callers yet. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pure-fs primitives for foraging example directories: scanner,
extractor, redact, and shared types. No storage writes or MCP wiring
yet — those arrive in the follow-up so this layer can be unit-tested
without pulling in MemoryStore.
- `scanExamplesFs({ repo_root, limits? })` discovers direct children of
`<repo_root>/examples/` and returns classified `FoodSource[]` with a
stable content_hash over manifest bytes + sorted (path, size) pairs.
- `extract(abs_path, limits)` walks a single example with depth/size
caps, detecting `npm` / `pypi` / `cargo` / `go` / `unknown` manifests
and picking up README + canonical entrypoints.
- `redact(text, extraEnvNames?)` scrubs common cloud-service secret
assignments and armored PEM private-key blocks before content hits
storage.
Public API, types, and constants re-exported from the package index.
20 unit tests across scanner / extractor / redact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NagyVikt
added a commit
that referenced
this pull request
Apr 24, 2026
…_plan (#46) Fills the contract gap between the merged foraging PRs (#41, #43, #44, #45) and CLAUDE.md's 'new MCP tool → update docs/mcp.md' rule. Each entry lists inputs, return shape, and the non-obvious semantics (vector re-rank skipped when filter is set; dependency_delta only computed for npm; target_hint path resolution). Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
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.
Automated by gx branch finish (PR flow).