[Prototype] ZL - agent isolated commands#7717
Draft
zzooeeyy wants to merge 2 commits into
Draft
Conversation
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationspackages/cli-kit/dist/public/node/context/agent.d.ts/**
* Identifies which AI coding agent (if any) is invoking the current process.
*
* Mirrors the detection order from `~/Downloads/agent-env_vars` captures:
* most-specific signals first, because some agents inherit other agents'
* environment variables (Cursor inherits VSCODE_*; Claude Code, Codex, and
* Gemini each have a parent signal shared by their flavors).
*
* This is a best-effort signal for telemetry and UX. Agents can spoof any of
* these vars; do not gate security decisions on the result.
*/
export type CallingAgent = 'PI' | 'CODEX' | 'CODEX_VSCODE' | 'CURSOR' | 'OPENCODE' | 'GEMINI' | 'GEMINI_VSCODE' | 'GITHUB_COPILOT_CLI' | 'CLAUDE_CODE' | 'CLAUDE_CODE_VSCODE' | 'OPENCLAW' | 'VSCODE_TERMINAL' | 'ZED_TERMINAL' | 'UNKNOWN';
/**
* Returns the calling agent based on environment variables.
*
* @param env - Environment variables to inspect (defaults to `process.env`).
* @returns The detected agent, or `'UNKNOWN'` when no signal matches.
*/
export declare function callingAgent(env?: NodeJS.ProcessEnv): CallingAgent;
/**
* The bucket key under which a session is stored. UNKNOWN agents share a
* single `'default'` bucket; anything else is keyed by its enum value so
* different agents on the same machine each get their own token.
*/
export declare function agentKeyFor(agent: CallingAgent): string;
/**
* Convenience: resolves the calling agent and returns its bucket key.
*/
export declare function currentAgentKey(env?: NodeJS.ProcessEnv): string;
Existing type declarationsWe found no diffs with existing type declarations |
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.
WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add