Migrate line locators to agent-gov-core@v0.1.2#16
Merged
Conversation
Mirrors the TaskBound #24 and PolicyMesh #40 pattern: replaces the local lineOfJsonKey / lineOfJsonStringValue regex implementations with delegation to agent-gov-core, keeping a thin wrapper that translates core's '0 means not-found' convention back to undefined for the existing call sites. readJsonObjectWithSource stays local (CapabilityEcho's package.json files are real JSON, not JSONC — no need for the core JSONC reader). Pure refactor — no kind-string changes, no behavior changes, 64/64 tests still passing on existing assertions.
3 tasks
Conalh
added a commit
that referenced
this pull request
May 22, 2026
CapabilityEcho's action.yml uses 'using: node24, main: dist/action.js' — GitHub's node24 runner invokes the main file directly without any 'npm install' step, so every runtime dep must be vendored. When PR #16 migrated discovery.ts to import from agent-gov-core, that broke the published Action: dist/action.js eventually resolves 'agent-gov-core' which isn't in the published tarball's tree. Real production bug — any external consumer of Conalh/CapabilityEcho@main was hitting ERR_MODULE_NOT_FOUND on first run. Fix: - @vercel/ncc as devDep - 'bundle-action' npm script: ncc bundles src/action.ts into a single self-contained dist/action-bundle/index.js with all transitive deps (including agent-gov-core) inlined. 57KB minified. - action.yml main: dist/action-bundle/index.js - Test asserting the action.yml main path updated accordingly. This is the standard pattern for Node-runtime GitHub Actions (used by actions/checkout, etc.). Other suite tools (TaskBound, PolicyMesh, SessionTrail, ScopeTrail) use 'using: composite' with npm ci + npm run build at runtime, which handles deps differently and doesn't have this problem — only CapabilityEcho needed the bundler.
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.
Mirrors the TaskBound #24 and PolicyMesh #40 pattern.
Summary
agent-gov-core@v0.1.2(viagithub:Conalh/agent-gov-core#v0.1.2) to dependencies.lineOfJsonKey/lineOfJsonStringValueregex implementations with thin wrappers around the core versions. Translates core's0 means not-foundconvention back toundefinedso the existing call sites are unchanged.readJsonObjectWithSourcestays local — CapabilityEcho's package.json reads are real JSON, not JSONC, so the core JSONC reader is unneeded here.Why now
Fourth tool in the breadth-migration sweep. Once this and ScopeTrail's migration land, all five suite tools depend on the same core library, and the namespace finding-kinds wave (agent-gov-core#1) becomes the next coordinated work.
Verification
npm install && npm run build— cleannpm test— 64/64 passing on existing kind-string assertions (no behavior change)Test plan