* fix(coding-agent): isolate autoload-disabled package test from real home directory
The test asserted result.skills is exactly empty, but resolve() also
scans ~/.agents/skills via getHomeDir(). On machines where that
directory is populated the test failed; CI runners have no
~/.agents/skills, so it always passed there. Stub HOME to the temp
dir with the same save/restore pattern used by neighbouring tests.
* fix(coding-agent): use vi.stubEnv for home directory isolation
Replaces the manual try/finally save/restore with vi.stubEnv plus
vi.unstubAllEnvs in afterEach, shrinking the fix to two added lines.
* fix(coding-agent): plant decoy user skill so the empty-skills assertion cannot pass vacuously
With an empty sandbox, result.skills equal to [] could not distinguish
the package skill being correctly excluded from skill resolution being
broken entirely. A decoy skill in the stubbed HOME's .agents/skills
proves scanning still works while the package skill stays excluded.
* fix(coding-agent): simplify home isolation test
Previously, getLatestNpmVersion() hardcoded a fetch to
registry.npmjs.org, which 404s for packages on alternate
registries (private, Verdaccio, GitHub Packages, etc.).
The error was silently swallowed, so users never saw update
notifications for these packages.
Replace the direct fetch with
via the existing runCommandCapture helper. This uses the same
registry resolution as npm install (reads .npmrc config chain),
respects the npmCommand setting, and runs with this.cwd for
correct .npmrc lookup.
* fix(coding-agent): use supported Anthropic compaction model
The Anthropic compaction test was pinned to claude-3-7-sonnet-latest, which now fails with a 404 because that model line was retired. Switch the test to the existing claude-sonnet-4-5 convention used elsewhere in coding-agent tests.
* test(coding-agent): disable git prompts in HTTPS parsing test
The HTTPS URL parsing test intentionally clones a nonexistent GitHub repo to verify that bare HTTPS sources dispatch to git. Under a TTY, git can prompt on that path and hang the test run.
Set GIT_TERMINAL_PROMPT=0 in that test so it still exercises real git but fails fast instead of waiting for terminal input.
collectAutoExtensionEntries now checks if the directory itself has a
package.json with pi.extensions (or index.ts) before scanning children.
This fixes duplicate extension loading when a manifest-aware directory
is specified directly in settings.json extensions array.
Fixes#1274
Use hosted-git-info library for robust parsing of SSH URLs (git@host:path
and ssh://) in addition to HTTPS. SSH and HTTPS URLs for the same repo
are now properly deduplicated.
Package resolution now uses the same discovery logic as local extensions:
only index.ts (or manifest-declared entries) are loaded from subdirectories,
not helper modules.
fixes#1102