Repository navigation
feat: detect goose, junie, pi, and kiro agents - #5
Merged
Merged
Conversation
Adds four agents from the unjs/std-env list. goose (GOOSE_PROVIDER) and junie (JUNIE_DATA/JUNIE_SHIM_PATH) use existing env checks. pi and kiro need two new spec condition types: env_matches (regex match on an env var) and no_tty (process is non-interactive). kiro pairs both so a human at Kiro's integrated terminal isn't misdetected. Also broadens opencode detection to match OPENCODE in addition to OPENCODE_CLIENT. agents.json is reformatted by oxfmt from minified to pretty-printed.
quuu
approved these changes
Jul 9, 2026
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
Adds four agents from the unjs/std-env list that we were missing, and broadens
opencodedetection.GOOSE_PROVIDERsetJUNIE_DATAorJUNIE_SHIM_PATHsetPATHmatches\.pi[\\/]agentTERM_PROGRAMmatcheskiroand stdout is not a TTYopencodenow matchesOPENCODEin addition to our existingOPENCODE_CLIENT(std-env checksOPENCODE).New spec capabilities
gooseandjuniefit the existing schema.piandkironeeded two new leaf condition types, added toagents.schema.json,src/types.ts, and the evaluator:env_matches— regex match against an env var ({ type, name, pattern }).patternis a regex source string, substring semantics, case-sensitive; unset var or invalid pattern → no match (never throws).no_tty— matches when the process is non-interactive (!process.stdout.isTTY). This is the first leaf that reads runtime process state rather than env/filesystem; it exists so terminal-based IDE agents can be disambiguated from a human at the same terminal.kiropairsenv_matchesonTERM_PROGRAMwithno_tty— this is exactly the case std-env's issue #185 addressed. Documented as a deliberate exception in the schema.Notes
agents.jsonreformats from minified to pretty-printed (oxfmt, the project formatter, enforces this) — hence the larger-than-expected diff on that file.mainyet, so there's no.changeset/infra here. Once ci: set up automated releases with Changesets #3 lands, this should get aminorchangeset (new features, additive/backward-compatible), or be versioned accordingly at release.Verification
pnpm type-check,pnpm lint,pnpm format:checkall pass.pnpm test— 86 tests pass (was 68). New unit tests forenv_matches/no_tty, detection tests for all four agents (including kiro TTY vs no-TTY) andopencodeviaOPENCODE.pnpm build, then smoke-tested the builtdist/with real env vars: goose/junie/pi/opencode detected; kiro detected when piped (no TTY) and not detected under an emulated TTY.🤖 Generated with Claude Code