Files
dingtalk-workspace-cli/skills_embed.go
修雨 b175acb48f feat(skill): embed skills/ into the binary, default skill setup to it (#488)
go:embed the skills/ tree (mono + multi) into the binary and make
`dws skill setup` install from the embedded bundle by default. Upgrading
the binary now refreshes the installed skill, instead of silently reusing
a stale copy probed from the current working directory. An explicit
--source / DWS_SKILL_SOURCE still overrides for development.

Replants the change from #441 onto main: #441 was stacked on the
abandoned feat/chat-bot-provisioning-openclaw base (PRs #407/#397 closed),
which is why its CI was red. The embedded-bundle test asserted a
connect.md doc that only existed on that dead base; retargeted it to a
reference doc that exists on main.
2026-06-24 17:55:23 +08:00

28 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 dws is the module-root package. Its sole purpose is to bake the
// skills/ documentation tree into the binary at build time so that
// `dws skill setup` installs the skill version shipped with THIS binary,
// independent of any local checkout. See internal/app/skill_setup.go.
package dws
import "embed"
// EmbeddedSkills holds the bundled skills/ tree (mono + multi) compiled into
// the binary. The `all:` prefix is required so dot/underscore entries — e.g.
// references/best_practices/_common — are included rather than skipped.
//
//go:embed all:skills
var EmbeddedSkills embed.FS