Skip to content

Migrate line locators to agent-gov-core@v0.1.2#24

Merged
Conalh merged 1 commit into
mainfrom
migrate-locators-to-agent-gov-core
May 22, 2026
Merged

Migrate line locators to agent-gov-core@v0.1.2#24
Conalh merged 1 commit into
mainfrom
migrate-locators-to-agent-gov-core

Conversation

@Conalh
Copy link
Copy Markdown
Owner

@Conalh Conalh commented May 22, 2026

Summary

Pure refactor. Replaces local lineOfJsonKey, lineOfJsonStringValue, lineOfPattern, and escapeRegExp with the shared primitives from agent-gov-core@v0.1.2. No kind-string changes, no behavior changes.

src/discovery.ts shrinks from 57 → 51 lines, dropping logic now owned by the library. The async readJsonObjectWithSource wrapper stays — its ENOENT → empty-object semantics are TaskBound-specific.

What stays local

  • Async wrapper with ENOENT → empty (TaskBound runs against repos that haven't adopted these surfaces).
  • JSON.parse direct (no JSONC comment stripping — deferred; this PR is scope-locked to locator dedup).

Action.yml

No changes needed — TaskBound's action already runs npm ci + npm run build at action invocation, so the new agent-gov-core runtime dep resolves automatically.

Test plan

  • npm test — all 27 tests pass
  • CI green

🤖 Generated with Claude Code

Replaces local copies of lineOfJsonKey, lineOfJsonStringValue,
lineOfPattern, and escapeRegExp with the shared primitives. The async
readJsonObjectWithSource wrapper stays — its ENOENT → empty-object
semantics are TaskBound-specific and not duplicated logic.

Pure refactor. No kind-string changes, no behavior changes. All 27
existing tests pass against the migrated locators.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Conalh Conalh merged commit e58b2ad into main May 22, 2026
3 checks passed
@Conalh Conalh deleted the migrate-locators-to-agent-gov-core branch May 22, 2026 14:07
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