Skip to content

fix(agent): install default system skills by agent id#262

Merged
RussellLuo merged 1 commit into
OpenCSGs:mainfrom
GatewayJ:fix-agent-system-skills-id
Jun 30, 2026
Merged

fix(agent): install default system skills by agent id#262
RussellLuo merged 1 commit into
OpenCSGs:mainfrom
GatewayJ:fix-agent-system-skills-id

Conversation

@GatewayJ

Copy link
Copy Markdown
Collaborator

Summary

  • Install embedded default system skills into the runtime skills directory resolved from the agent ID, not the display name.
  • Update create/start regression coverage so the worker ID and display name differ, matching real typed-ID agent creation.

Root Cause

  • feat(skillhub): add default system skills #235 introduced embedded system skills and default installation during agent create/start/recreate. That path installed skills using req.AgentName.
  • feat(store): migrate local state to typed ids #245 migrated durable agent/workspace/runtime paths to immutable typed agent IDs. Runtime provisioning now materializes the agent home from AgentID, but the default system skill installer still used AgentName.
  • For workers whose generated ID differs from their display name, system skills such as skill-installer and skill-creator could be copied to a sibling name-derived directory instead of the active runtime skills directory.

Fix

  • Pass req.AgentID to installDefaultSystemSkills from runtime provisioning.
  • Rename the helper parameter to agentID to reflect the storage contract.
  • Adjust tests to use agent-worker-123 with display name alice, so the regression fails if ID/name paths drift again.

Validation

  • env GOCACHE=/tmp/gocache go test ./internal/agent
  • env GOCACHE=/tmp/gocache go test ./internal/agent ./internal/api

@GatewayJ GatewayJ marked this pull request as ready for review June 30, 2026 04:12
@GatewayJ GatewayJ requested a review from RussellLuo June 30, 2026 04:12
@RussellLuo RussellLuo merged commit 04b3865 into OpenCSGs:main Jun 30, 2026
1 check passed
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