Repository navigation
Conversation
sunner
marked this pull request as draft
October 16, 2026 11:04
sunner
marked this pull request as ready for review
October 16, 2026 11:23
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.
Several agent environments are currently missed, and Grok Bot's shared
CURSOR_AGENTmarker can be reported as Cursor CLI. This adds explicit environment rules while keeping existing result IDs, existing rules' relative order and theAI_AGENToverride.GOOSE_TERMINALand Kiro withAGENT_CONTEXT_OUTwhile retaining their previous conditions.QODER_WORK_INTEGRATION_PRODUCT, Doubao Work using non-emptyDOUBAO_OFFICE_AGENT_NAME, Cue's Linux desktop-worker context using exactMANUS_LONG_DESKTOP_WORKER=1, Muse using its active-agent/tool-call markers, and Manus using its addon-runtime descriptors.GROK_AGENT=1; other non-empty selector values do not match. Grok Build and Grok Bot remain separate results.Junie detection requires non-empty
JUNIE_SHIM_PATH. User-configurableJUNIE_DATAis ignored, so configuring its data directory alone does not trigger Junie detection or suppress another matching agent. The existing rule order is retained.The new product-specific markers precede inherited Cursor/Claude context; Zed remains a last fallback because
ZED_TERMalso describes human-operated terminals. Configuration paths, packaging flags, and general instance/session/location metadata do not independently identify these new contexts. QwenWork accepts any non-empty product-marker value; site, execution mode, endpoint and old chat/distribution markers do not trigger detection. Doubao Work accepts any non-empty agent-name value without requiring a fixed name. TheMANUS_LONG_DESKTOP_WORKERmarker identifies Cue, despite its variable prefix, and does not returnmanus.Names and short descriptions for all thirteen new entries are checked against official product sites, documentation and repositories, with links in the evidence notes. Doubao Work and Manus use canonical IDs
doubao-workandmanusand constantsDOUBAO_WORKandMANUS. Their environment-variable conditions are unchanged.Sources and scope:
docs/environment-marker-evidence.mdrecords versions, archive hashes and propagation locations from static inspection of WorkBuddy 5.8.3, Grok Bot 0.71.2 and QwenWorkCN 1.3.1. It contains no proprietary implementation code or real session values and does not claim end-to-end execution tests or coverage of every product variant.qwenworkcnand propagates it to local/host shell paths. The rule intentionally accepts any non-empty value; this observed value is not a matching restriction. VM/QXC guest-shell propagation of the new marker remains unverified; older marker paths are not evidence for that coverage.DOUBAO_OFFICE_AGENT_NAMEcomes from a user-provided shell observation on 2026-10-16. The rule accepts any non-empty value and is not an independently reproduced run or a public vendor contract. No real credentials, message/log IDs or runtime values are included; all negative fixtures use synthetic values.JARVIS_IS_ASSIGNED=1/ non-emptyJARVIS_TOOL_CALL_IDmarkers come from user-provided runtime observations on 2026-10-16, not locally reproduced runs or inspected application artifacts. Real runtime identifiers are not included.MANUS_ADDON_RUNTIME_SPEC_PATH/MANUS_ADDON_RUNTIME_SPECS_REVISIONdescriptor names were reported in an ordinary shell; their values were not supplied. The rule requires non-empty values. This is user-reported shell evidence, not a locally reproduced probe or verification of the inspected desktop distribution. Other addon/group fields do not match independently.SAND_AGENT; its rule requires all three of non-emptyCURSOR_AGENT, exactSAND_MANIFEST_V2=1and exactSAND_SUPERVISOR_ENABLED=1. The original localSAND_AGENT=1branch is retained. Shared infrastructure markers do not prove exclusive brand ownership or resolve nested agents' immediate identity; no tenant/authentication/store/boot/VNC identifiers are used.Validation on Node 26.12.0 and Go 1.27.2:
pnpm lintpnpm format:checkpnpm type-checkpnpm test— 250 passed, including 221 shared JSON casespnpm buildgo test ./...The existing mock-fs dependency fails during test collection on Node 26. The separate test-only commit replaces its internal filesystem patching with precise
node:fs/promises.accessstubs for present, missing and permission-denied paths. Runtime detection, dependencies and lockfiles are unchanged.Detector cases reset all relevant environment keys and stub filesystem access; TTY state uses the existing controlled fixtures. Cases cover exact and wrong values, empty markers, configuration-only negatives, Grok Bot/Cursor coexistence, each missing or invalid cloud conjunction member, Grok Build separation, Cue-versus-Manus attribution, Muse tool-call context, Manus descriptors, arbitrary non-empty QwenWork product markers and Doubao Work agent names, Zed fallback behavior and retained overrides.
Coordinated Python-port contribution: togethercomputer/detect_agent#19. The two shared JSON documents are structurally identical, following the Python port’s upstream synchronization policy.