Two distribution defects left installed skills stale (issue PeterGuy326#8): 1. skill setup resolved its source from cwd / exe-adjacent checkouts, so an upgraded binary happily re-installed whatever stale checkout it was run from, and agents kept routing 'create robot' into the chat dead end. The skills/mono and skills/multi trees are now embedded (go:embed) and setup defaults to that copy, materialized into ~/.dws/skills/<mode> — upgrading the binary upgrades what setup installs. --source and DWS_SKILL_SOURCE stay as explicit overrides, and an override that has no skill root errors out instead of silently falling back. 2. dws upgrade's skill refresh (knownSkillDirs) skipped ~/.qoder and ~/.qoderwork, so Qoder/QoderWork hosts never got refreshed routing. Added both to the dir table and its seven mirrors (npm install.js, install.sh/ps1, install-skills.sh, homebrew template, package test, verify-package-managers.sh). setup-side detection and --target qoder/qoderwork already work on this branch; this closes the remaining upgrade-side and source-side gaps.
29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
// Copyright 2026 Alibaba Group
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// Package skills embeds the dws skill sources into the binary so that
|
|
// `dws skill setup` always installs the skill set matching the running
|
|
// binary version, regardless of the working directory. Before this, setup
|
|
// resolved its source from cwd/exe-adjacent checkouts, so an upgraded
|
|
// binary could silently re-install stale skills (issue PeterGuy326#8).
|
|
package skills
|
|
|
|
import "embed"
|
|
|
|
// FS holds the mono and multi skill trees. The all: prefix keeps
|
|
// underscore-prefixed directories (e.g. references/best_practices/_common)
|
|
// that plain embed patterns would skip.
|
|
//
|
|
//go:embed all:mono all:multi
|
|
var FS embed.FS
|