Skip to content

fix/device resolution in use skills#325

Merged
xiami762 merged 2 commits into
devfrom
fix/device-resolution-in-use-skills
May 26, 2026
Merged

fix/device resolution in use skills#325
xiami762 merged 2 commits into
devfrom
fix/device-resolution-in-use-skills

Conversation

@duguwanglong

Copy link
Copy Markdown
Contributor

fix(skills): require device_context lookup before calling device tools

Before invoking any device-specific tool (tdp_, onesec_, onesig_,
qingteng_
, skyeye_, sangfor_xdr_), the agent must first call
device_context to list all registered devices, match the user-supplied
device name to the correct device_id, and pass that id on every
subsequent tool call.

Without this step the agent could silently hit the wrong device when
multiple instances of the same product are configured (e.g. "TDP v4"
vs "TDP v6"), or omit device_id entirely when the parameter is marked
optional in the schema.

A dedicated "设备定位(首要步骤,不可跳过)" section has been added at
the top of the API-mode guide in each affected skill, covering:

  • mandatory device_context call before the first tool invocation
  • name-based matching and device_id extraction
  • ask-user-to-confirm when multiple devices match or none match
  • sangfor-edr-use (browser-only) adapted to resolve the access URL
    from device_context instead of always prompting for it

duguwanglong and others added 2 commits May 26, 2026 13:19
Before invoking any device-specific tool (tdp_*, onesec_*, onesig_*,
qingteng_*, skyeye_*, sangfor_xdr_*), the agent must first call
device_context to list all registered devices, match the user-supplied
device name to the correct device_id, and pass that id on every
subsequent tool call.

Without this step the agent could silently hit the wrong device when
multiple instances of the same product are configured (e.g. "TDP v4"
vs "TDP v6"), or omit device_id entirely when the parameter is marked
optional in the schema.

A dedicated "设备定位(首要步骤,不可跳过)" section has been added at
the top of the API-mode guide in each affected skill, covering:
- mandatory device_context call before the first tool invocation
- name-based matching and device_id extraction
- ask-user-to-confirm when multiple devices match or none match
- sangfor-edr-use (browser-only) adapted to resolve the access URL
  from device_context instead of always prompting for it

Co-authored-by: Cursor <cursoragent@cursor.com>
@duguwanglong duguwanglong requested a review from xiami762 May 26, 2026 06:24
@xiami762 xiami762 merged commit 7f4add6 into dev May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants