@lousy-agents/agent-shell 5.1.5 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -97,7 +97,9 @@ agent-shell classifies who initiated each script execution:
97
97
  | 2 | `GITHUB_ACTIONS=true` | `ci` |
98
98
  | 3 | `CLAUDE_CODE` is set | `claude-code` |
99
99
  | 4 | `COPILOT_AGENT` is set | `copilot` |
100
- | 5 | No match | `human` |
100
+ | 5 | `COPILOT_CLI` is set | `copilot` |
101
+ | 6 | `COPILOT_CLI_BINARY_VERSION` is set | `copilot` |
102
+ | 7 | No match | `human` |
101
103
 
102
104
  ## Querying Events
103
105
 
package/dist/index.js CHANGED
@@ -14587,6 +14587,8 @@ async function runShim(options) {
14587
14587
  // Best-effort agent detection env vars (Phase 1):
14588
14588
  // - CLAUDE_CODE: Set by Claude Code (`CLAUDE_CODE=1`) in its shell sessions
14589
14589
  // - COPILOT_AGENT: Set by GitHub Copilot coding agent in its shell sessions
14590
+ // - COPILOT_CLI: Set by GitHub Copilot CLI (`COPILOT_CLI=1`) in its shell sessions
14591
+ // - COPILOT_CLI_BINARY_VERSION: Set by GitHub Copilot CLI (e.g. `COPILOT_CLI_BINARY_VERSION=1.0.4`)
14590
14592
  // If these prove incorrect, the detection rule should be removed entirely.
14591
14593
  /**
14592
14594
  * Determines who initiated a script execution based on environment variables.
@@ -14610,6 +14612,9 @@ async function runShim(options) {
14610
14612
  if (env.COPILOT_AGENT !== undefined && env.COPILOT_AGENT !== "") {
14611
14613
  return "copilot";
14612
14614
  }
14615
+ if (env.COPILOT_CLI !== undefined && env.COPILOT_CLI !== "" || env.COPILOT_CLI_BINARY_VERSION !== undefined && env.COPILOT_CLI_BINARY_VERSION !== "") {
14616
+ return "copilot";
14617
+ }
14613
14618
  return "human";
14614
14619
  }
14615
14620