@botlearn-course/daemon 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Materialize the Skills authorized for one turn into the runtime's skills directory.
3
+ *
4
+ * The DeepSeek/Codewhale CLI discovers Skills from `<skills-dir>/<name>/SKILL.md` and
5
+ * exposes them through its native `load_skill` tool. That path does not involve MCP, which
6
+ * matters because `deepseek serve --http` — the mode the daemon runs — never loads an MCP
7
+ * config at all, so the previous relay could not reach the model.
8
+ *
9
+ * The directory is rewritten per turn rather than created fresh each time: its path is
10
+ * baked into the runtime process environment at spawn, and that process is pooled and
11
+ * reused. A per-turn path would leave a reused process pointing at a stale directory,
12
+ * and the authorized set genuinely differs between a task turn (global set plus the
13
+ * task's set) and ordinary conversation (global set only).
14
+ */
15
+ import type { PreparedRuntimeSkillProvider, RuntimeSkillCatalogEntry } from "./runtime-skills.js";
16
+ /** Directory name created under the runtime profile root. */
17
+ export declare const RUNTIME_SKILLS_DIR_NAME = "skills";
18
+ export declare class RuntimeSkillMaterializationError extends Error {
19
+ readonly code: string;
20
+ constructor(code: string, message: string);
21
+ }
22
+ export interface MaterializedSkill {
23
+ ref: string;
24
+ /** Directory name under the skills root; also the name the model passes to load_skill. */
25
+ name: string;
26
+ files: number;
27
+ bytes: number;
28
+ }
29
+ export interface MaterializeCourseSkillsResult {
30
+ skillsDir: string;
31
+ skills: MaterializedSkill[];
32
+ /** Stable fingerprint of the materialized set, for logging and reuse assertions. */
33
+ fingerprint: string;
34
+ }
35
+ export interface MaterializeCourseSkillsOptions {
36
+ prepared: PreparedRuntimeSkillProvider;
37
+ /** Runtime profile root; the skills directory is created directly below it. */
38
+ profileRoot: string;
39
+ /** Managed sessions hand the directory to a separate runtime UID via the group bit. */
40
+ managed: boolean;
41
+ }
42
+ /**
43
+ * The directory name the model will use. Derived from the grant's logical id, never from
44
+ * manifest text, so a package cannot rename itself into another Skill's directory.
45
+ */
46
+ export declare function skillDirectoryName(entry: RuntimeSkillCatalogEntry): string;
47
+ export declare function skillSetFingerprint(refs: readonly string[]): string;
48
+ /**
49
+ * Rewrite `<profileRoot>/skills` so it contains exactly the authorized Skills.
50
+ *
51
+ * Throws on any failure. A partial or stale directory must never be handed to the model:
52
+ * silently continuing without a Skill is the failure mode this whole change exists to
53
+ * remove.
54
+ */
55
+ export declare function materializeCourseSkills(options: MaterializeCourseSkillsOptions): Promise<MaterializeCourseSkillsResult>;
56
+ export declare function cleanupCourseSkills(profileRoot: string | undefined): void;
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Materialize the Skills authorized for one turn into the runtime's skills directory.
3
+ *
4
+ * The DeepSeek/Codewhale CLI discovers Skills from `<skills-dir>/<name>/SKILL.md` and
5
+ * exposes them through its native `load_skill` tool. That path does not involve MCP, which
6
+ * matters because `deepseek serve --http` — the mode the daemon runs — never loads an MCP
7
+ * config at all, so the previous relay could not reach the model.
8
+ *
9
+ * The directory is rewritten per turn rather than created fresh each time: its path is
10
+ * baked into the runtime process environment at spawn, and that process is pooled and
11
+ * reused. A per-turn path would leave a reused process pointing at a stale directory,
12
+ * and the authorized set genuinely differs between a task turn (global set plus the
13
+ * task's set) and ordinary conversation (global set only).
14
+ */
15
+ import { chmodSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
16
+ import path from "node:path";
17
+ /** Directory name created under the runtime profile root. */
18
+ export const RUNTIME_SKILLS_DIR_NAME = "skills";
19
+ const DIR_MODE_MANAGED = 0o750;
20
+ const FILE_MODE_MANAGED = 0o640;
21
+ const DIR_MODE_PRIVATE = 0o700;
22
+ const FILE_MODE_PRIVATE = 0o600;
23
+ export class RuntimeSkillMaterializationError extends Error {
24
+ code;
25
+ constructor(code, message) {
26
+ super(message);
27
+ this.code = code;
28
+ this.name = "RuntimeSkillMaterializationError";
29
+ }
30
+ }
31
+ /**
32
+ * The directory name the model will use. Derived from the grant's logical id, never from
33
+ * manifest text, so a package cannot rename itself into another Skill's directory.
34
+ */
35
+ export function skillDirectoryName(entry) {
36
+ const separator = entry.ref.lastIndexOf("@");
37
+ const logicalId = separator > 0 ? entry.ref.slice(0, separator) : entry.ref;
38
+ const name = logicalId.split(".").pop() ?? logicalId;
39
+ if (!/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/i.test(name)) {
40
+ throw new RuntimeSkillMaterializationError("skill_directory_name_invalid", `Skill logical id does not yield a usable directory name: ${entry.ref}`);
41
+ }
42
+ return name;
43
+ }
44
+ export function skillSetFingerprint(refs) {
45
+ return [...refs].sort().join(",");
46
+ }
47
+ /**
48
+ * Rewrite `<profileRoot>/skills` so it contains exactly the authorized Skills.
49
+ *
50
+ * Throws on any failure. A partial or stale directory must never be handed to the model:
51
+ * silently continuing without a Skill is the failure mode this whole change exists to
52
+ * remove.
53
+ */
54
+ export async function materializeCourseSkills(options) {
55
+ const { prepared, profileRoot, managed } = options;
56
+ const skillsDir = path.join(profileRoot, RUNTIME_SKILLS_DIR_NAME);
57
+ const dirMode = managed ? DIR_MODE_MANAGED : DIR_MODE_PRIVATE;
58
+ const fileMode = managed ? FILE_MODE_MANAGED : FILE_MODE_PRIVATE;
59
+ // Rebuild rather than merge: a Skill dropped from the authorized set must disappear.
60
+ rmSync(skillsDir, { recursive: true, force: true });
61
+ if (prepared.catalog.length === 0) {
62
+ return { skillsDir, skills: [], fingerprint: "" };
63
+ }
64
+ mkdirSync(skillsDir, { recursive: true, mode: dirMode });
65
+ chmodSync(skillsDir, dirMode);
66
+ const skills = [];
67
+ try {
68
+ for (const entry of prepared.catalog) {
69
+ const name = skillDirectoryName(entry);
70
+ const pkg = await fetchPackage(prepared, entry);
71
+ const target = path.join(skillsDir, name);
72
+ mkdirSync(target, { recursive: true, mode: dirMode });
73
+ chmodSync(target, dirMode);
74
+ writePackage(pkg, target, dirMode, fileMode);
75
+ skills.push({ ref: entry.ref, name, files: pkg.files.length, bytes: pkg.bytes });
76
+ }
77
+ }
78
+ catch (error) {
79
+ // Never leave a half-written directory behind; the next turn would inherit it.
80
+ rmSync(skillsDir, { recursive: true, force: true });
81
+ throw error;
82
+ }
83
+ return {
84
+ skillsDir,
85
+ skills,
86
+ fingerprint: skillSetFingerprint(skills.map((skill) => skill.ref)),
87
+ };
88
+ }
89
+ async function fetchPackage(prepared, entry) {
90
+ try {
91
+ return await prepared.provider.fetchPackage(entry.ref);
92
+ }
93
+ catch (error) {
94
+ const code = error instanceof Error && "code" in error
95
+ ? String(error.code)
96
+ : "skill_package_fetch_failed";
97
+ throw new RuntimeSkillMaterializationError(code, `Failed to fetch Skill package ${entry.ref}`);
98
+ }
99
+ }
100
+ function writePackage(pkg, target, dirMode, fileMode) {
101
+ const entry = pkg.files.find((file) => file.path === pkg.entrypoint);
102
+ if (!entry) {
103
+ throw new RuntimeSkillMaterializationError("skill_package_entrypoint_missing", `Skill package ${pkg.ref} is missing its entrypoint ${pkg.entrypoint}`);
104
+ }
105
+ for (const file of pkg.files) {
106
+ writeFile(path.join(target, file.path), file.content, target, dirMode, fileMode);
107
+ }
108
+ // The CLI only discovers `SKILL.md`. When the package entrypoint has another name we
109
+ // write both: the canonical name for discovery, and the original so that any in-package
110
+ // reference to it keeps resolving.
111
+ if (pkg.entrypoint !== "SKILL.md") {
112
+ writeFile(path.join(target, "SKILL.md"), entry.content, target, dirMode, fileMode);
113
+ }
114
+ }
115
+ function writeFile(destination, content, root, dirMode, fileMode) {
116
+ const resolvedRoot = path.resolve(root);
117
+ const resolved = path.resolve(destination);
118
+ // Defence in depth: the provider already rejects absolute paths and `..` segments, but
119
+ // a corrupted or hostile package must not be able to write outside its own directory.
120
+ if (resolved !== resolvedRoot && !resolved.startsWith(`${resolvedRoot}${path.sep}`)) {
121
+ throw new RuntimeSkillMaterializationError("skill_package_path_escape", "Skill package file escapes its materialization directory");
122
+ }
123
+ mkdirSync(path.dirname(resolved), { recursive: true, mode: dirMode });
124
+ writeFileSync(resolved, content, { mode: fileMode });
125
+ chmodSync(resolved, fileMode);
126
+ }
127
+ export function cleanupCourseSkills(profileRoot) {
128
+ if (!profileRoot)
129
+ return;
130
+ rmSync(path.join(profileRoot, RUNTIME_SKILLS_DIR_NAME), {
131
+ recursive: true,
132
+ force: true,
133
+ });
134
+ }
@@ -30,10 +30,30 @@ export interface RuntimeLoadedSkill {
30
30
  export interface RuntimeSkillReference extends RuntimeLoadedSkill {
31
31
  path: string;
32
32
  }
33
+ export interface RuntimeSkillPackageFile {
34
+ path: string;
35
+ content: Uint8Array;
36
+ }
37
+ export interface RuntimeSkillPackage {
38
+ ref: string;
39
+ digest: string;
40
+ envelopeDigest: string;
41
+ entrypoint: string;
42
+ files: RuntimeSkillPackageFile[];
43
+ bytes: number;
44
+ }
33
45
  export interface RuntimeSkillProvider {
34
46
  listEligibleSkills(): Promise<RuntimeSkillCatalogEntry[]>;
35
47
  loadSkill(ref: string): Promise<RuntimeLoadedSkill>;
36
48
  loadReference(ref: string, referencePath: string): Promise<RuntimeSkillReference>;
49
+ /**
50
+ * Fetch every file of one authorized Skill in a single call.
51
+ *
52
+ * Materializing a Skill into the runtime's skills directory needs the whole package:
53
+ * `loadSkill`/`loadReference` only expose one caller-named path at a time and cannot
54
+ * enumerate the package, so they can never produce a complete directory.
55
+ */
56
+ fetchPackage(ref: string): Promise<RuntimeSkillPackage>;
37
57
  }
38
58
  export interface PreparedRuntimeSkillProvider {
39
59
  binding: RuntimeSkillProviderBinding;
@@ -85,6 +105,7 @@ export declare class HttpRuntimeSkillProvider implements RuntimeSkillProvider {
85
105
  });
86
106
  listEligibleSkills(): Promise<RuntimeSkillCatalogEntry[]>;
87
107
  loadSkill(ref: string): Promise<RuntimeLoadedSkill>;
108
+ fetchPackage(ref: string): Promise<RuntimeSkillPackage>;
88
109
  loadReference(ref: string, referencePath: string): Promise<RuntimeSkillReference>;
89
110
  private requireEligible;
90
111
  private call;
@@ -8,6 +8,13 @@ const MAX_SKILLS = 32;
8
8
  const MAX_CATALOG_DESCRIPTION_CODE_POINTS = 500;
9
9
  const MAX_PROVIDER_RESPONSE_BYTES = 512 * 1024;
10
10
  const MAX_LOADED_CONTENT_BYTES = 256 * 1024;
11
+ // 物化一次取整包,响应必然大于单文件调用,因此单独给出预算。
12
+ // 原始包上限与 agent-svc 的 _MAX_PACKAGE_BYTES 对齐;base64 后约 2.7 MiB,
13
+ // 响应上限留到 4 MiB 覆盖 JSON 结构开销。
14
+ const MAX_PACKAGE_BYTES = 2 * 1024 * 1024;
15
+ const MAX_PACKAGE_BASE64 = 512 * 1024;
16
+ const MAX_PACKAGE_FILES = 64;
17
+ const MAX_PACKAGE_RESPONSE_BYTES = 4 * 1024 * 1024;
11
18
  const MAX_BINDING_LIFETIME_MS = 24 * 60 * 60 * 1000;
12
19
  export const COURSE_SKILLS_BINDING_SCHEMA = "course-skills-binding/0.1";
13
20
  export const COURSE_SKILLS_PROTOCOL = "course-skills/0.1";
@@ -107,6 +114,12 @@ export class HttpRuntimeSkillProvider {
107
114
  const data = resultData(envelope, "skill_loaded");
108
115
  return parseLoadedSkill(data, grant);
109
116
  }
117
+ async fetchPackage(ref) {
118
+ const grant = this.requireEligible(ref);
119
+ const envelope = await this.call("fetch_package", { ref }, MAX_PACKAGE_RESPONSE_BYTES);
120
+ const data = resultData(envelope, "skill_package_fetched");
121
+ return parseSkillPackage(data, grant);
122
+ }
110
123
  async loadReference(ref, referencePath) {
111
124
  const grant = this.requireEligible(ref);
112
125
  const safePath = safeReferencePath(referencePath);
@@ -125,7 +138,7 @@ export class HttpRuntimeSkillProvider {
125
138
  }
126
139
  return grant;
127
140
  }
128
- async call(operation, input) {
141
+ async call(operation, input, maxResponseBytes = MAX_PROVIDER_RESPONSE_BYTES) {
129
142
  if (Date.parse(this.binding.expiresAt) <= this.now()) {
130
143
  throw new RuntimeSkillProviderError("agent_run_activation_expired", "Skill Provider binding has expired");
131
144
  }
@@ -149,7 +162,7 @@ export class HttpRuntimeSkillProvider {
149
162
  catch {
150
163
  throw new RuntimeSkillProviderError("skill_provider_unavailable", "Skill Provider request failed");
151
164
  }
152
- const envelope = await readBoundedJson(response);
165
+ const envelope = await readBoundedJson(response, maxResponseBytes);
153
166
  if (!response.ok) {
154
167
  const code = safeErrorCode(envelope.code) ?? "skill_provider_unavailable";
155
168
  throw new RuntimeSkillProviderError(code, "Skill Provider rejected the request");
@@ -320,9 +333,9 @@ function parseEffectiveSkillGrants(raw) {
320
333
  }
321
334
  return grants;
322
335
  }
323
- async function readBoundedJson(response) {
336
+ async function readBoundedJson(response, maxBytes = MAX_PROVIDER_RESPONSE_BYTES) {
324
337
  const declared = Number(response.headers.get("content-length") ?? 0);
325
- if (Number.isFinite(declared) && declared > MAX_PROVIDER_RESPONSE_BYTES) {
338
+ if (Number.isFinite(declared) && declared > maxBytes) {
326
339
  throw providerResponseError("Skill Provider response is too large");
327
340
  }
328
341
  if (!response.body)
@@ -337,7 +350,7 @@ async function readBoundedJson(response) {
337
350
  if (!value)
338
351
  continue;
339
352
  size += value.byteLength;
340
- if (size > MAX_PROVIDER_RESPONSE_BYTES) {
353
+ if (size > maxBytes) {
341
354
  await reader.cancel().catch(() => undefined);
342
355
  throw providerResponseError("Skill Provider response is too large");
343
356
  }
@@ -355,6 +368,53 @@ async function readBoundedJson(response) {
355
368
  throw providerResponseError("Skill Provider response is not valid JSON");
356
369
  }
357
370
  }
371
+ function parseSkillPackage(data, grant) {
372
+ const ref = requiredString(data.ref, "ref", 5, 240);
373
+ const digest = requiredString(data.digest, "digest", 71, 71);
374
+ if (ref !== grant.ref || digest !== grant.digest) {
375
+ throw new RuntimeSkillProviderError("skill_provider_identity_mismatch", "Skill package identity does not match the activation grant");
376
+ }
377
+ const entrypoint = safeReferencePath(requiredString(data.entrypoint, "entrypoint", 1, 512));
378
+ if (!Array.isArray(data.files) || data.files.length === 0) {
379
+ throw providerResponseError("Skill package contains no files");
380
+ }
381
+ if (data.files.length > MAX_PACKAGE_FILES) {
382
+ throw providerResponseError("Skill package contains too many files");
383
+ }
384
+ const seen = new Set();
385
+ let bytes = 0;
386
+ const files = data.files.map((entry) => {
387
+ if (!entry || typeof entry !== "object") {
388
+ throw providerResponseError("Skill package file entry is invalid");
389
+ }
390
+ const record = entry;
391
+ // safeReferencePath rejects absolute paths and any `..` segment, so a hostile or
392
+ // corrupted package cannot write outside the materialization directory.
393
+ const path = safeReferencePath(requiredString(record.path, "path", 1, 512));
394
+ if (seen.has(path)) {
395
+ throw providerResponseError("Skill package repeats a file path");
396
+ }
397
+ seen.add(path);
398
+ const encoded = requiredString(record.contentBase64, "contentBase64", 0, MAX_PACKAGE_BASE64);
399
+ const content = Buffer.from(encoded, "base64");
400
+ bytes += content.byteLength;
401
+ if (bytes > MAX_PACKAGE_BYTES) {
402
+ throw providerResponseError("Skill package exceeds the materialization budget");
403
+ }
404
+ return { path, content: new Uint8Array(content) };
405
+ });
406
+ if (!files.some((file) => file.path === entrypoint)) {
407
+ throw providerResponseError("Skill package is missing its entrypoint");
408
+ }
409
+ return {
410
+ ref,
411
+ digest,
412
+ envelopeDigest: requiredString(data.envelopeDigest, "envelopeDigest", 71, 71),
413
+ entrypoint,
414
+ files,
415
+ bytes,
416
+ };
417
+ }
358
418
  function resultData(envelope, expectedCode) {
359
419
  if (envelope.schemaVersion !== "tool-result/0.1"
360
420
  || envelope.ok !== true
@@ -3,6 +3,7 @@ import { chmodSync, existsSync, lstatSync, mkdirSync, realpathSync, rmSync, writ
3
3
  import path from "node:path";
4
4
  import net from "node:net";
5
5
  import { MAX_PROGRESS_EVENTS_PER_ATTEMPT } from "../mcp/report-progress.js";
6
+ import { materializeCourseSkills, RUNTIME_SKILLS_DIR_NAME, skillDirectoryName, } from "../runtime-skill-materialization.js";
6
7
  import { startCourseSkillsMcpServer, } from "../mcp/course-skills-server.js";
7
8
  import { sanitizeRuntimeFailureText } from "../redaction.js";
8
9
  import { runtimeChildEnv, runtimeChildLaunch } from "../runtime-env.js";
@@ -58,6 +59,9 @@ function courseSkillsSystemContext(systemContext, catalog) {
58
59
  source: "course_service_activation",
59
60
  authority: "read_only_catalog_metadata",
60
61
  skills: catalog.map((entry) => ({
62
+ // `name` 是 skills 目录名,也是模型传给 load_skill 的参数。0.8.39 的
63
+ // load_skill 不支持列举,名称必须由这里给出。
64
+ name: skillDirectoryName(entry),
61
65
  ref: entry.ref,
62
66
  description: entry.description.replace(/[\u0000-\u001f\u007f]+/g, " ").trim(),
63
67
  })),
@@ -68,8 +72,8 @@ function courseSkillsSystemContext(systemContext, catalog) {
68
72
  COURSE_SKILL_CATALOG_BEGIN,
69
73
  JSON.stringify(contextEnvelope),
70
74
  COURSE_SKILL_CATALOG_END,
71
- "When one entry is useful, call the course_skills load tool with its exact ref before following that Skill.",
72
- "Use load_reference only after load and only for a relative path named by the loaded Skill.",
75
+ "When one entry is useful, call load_skill with that entry's exact `name` before following that Skill.",
76
+ "These Skills are already installed for this activation; read their files directly and do not fetch them from anywhere else.",
73
77
  "Never search for, install, or substitute a Skill outside this activation catalog.",
74
78
  ].join("\n");
75
79
  const context = systemContext?.trim();
@@ -223,6 +227,40 @@ export class DeepseekTuiAdapter {
223
227
  throw abortReason(turnAbort.signal);
224
228
  handle.inFlight += 1;
225
229
  countedInFlight = true;
230
+ // 每个 turn 都要重写 skills 目录,且必须在此处而不是 acquireHandle 内:
231
+ // acquireHandle 只在需要新建进程时执行,复用进程时不会走到,那样第二个 turn
232
+ // 会沿用上一轮的授权集。目录路径固定,所以复用进程的环境变量依然指对。
233
+ if (opts.skillProvider && handle.progressMcpConfig) {
234
+ const startedAt = Date.now();
235
+ try {
236
+ const materialized = await materializeCourseSkills({
237
+ prepared: opts.skillProvider,
238
+ profileRoot: handle.progressMcpConfig.dir,
239
+ managed: Boolean(this.managedActivationId(opts)),
240
+ });
241
+ // info 而非 debug:这是「Skill 是否真的到达模型」的唯一事实。上一次同类故障
242
+ // 之所以要跨四个进程反复排查,就是因为这一段完全没有留痕。
243
+ log.info("deepseek-tui.course-skills-materialized", {
244
+ skillsDir: materialized.skillsDir,
245
+ count: materialized.skills.length,
246
+ fingerprint: materialized.fingerprint,
247
+ refs: materialized.skills.map((skill) => skill.ref),
248
+ names: materialized.skills.map((skill) => skill.name),
249
+ bytes: materialized.skills.reduce((total, skill) => total + skill.bytes, 0),
250
+ durationMs: Date.now() - startedAt,
251
+ });
252
+ }
253
+ catch (error) {
254
+ log.error("deepseek-tui.course-skills-materialization-failed", {
255
+ code: error instanceof Error && "code" in error
256
+ ? String(error.code)
257
+ : "unknown",
258
+ refs: opts.skillProvider.catalog.map((entry) => entry.ref),
259
+ durationMs: Date.now() - startedAt,
260
+ });
261
+ throw error;
262
+ }
263
+ }
226
264
  if (handle.idleTimer)
227
265
  clearTimeout(handle.idleTimer);
228
266
  const headers = authHeaders(handle.token);
@@ -443,7 +481,9 @@ export class DeepseekTuiAdapter {
443
481
  try {
444
482
  child = this.spawnFn(launch.binary, launch.args, {
445
483
  cwd: opts.cwd,
446
- env: this.spawnEnv(opts, progressMcpConfig?.path, visionConfigPath),
484
+ env: this.spawnEnv(opts, progressMcpConfig?.path, visionConfigPath, progressMcpConfig
485
+ ? path.join(progressMcpConfig.dir, RUNTIME_SKILLS_DIR_NAME)
486
+ : undefined),
447
487
  ...launch.identity,
448
488
  stdio: ["ignore", "pipe", "pipe"],
449
489
  // 自成进程组:解析到的二进制可能是会再 spawn 真实 deepseek-tui
@@ -507,7 +547,7 @@ export class DeepseekTuiAdapter {
507
547
  * pins the durable RuntimeThreadStore to the RuntimeSession workspace even though
508
548
  * the credential-bearing server process is still reclaimed after every activation.
509
549
  */
510
- spawnEnv(opts, progressMcpConfigPath, visionConfigPath) {
550
+ spawnEnv(opts, progressMcpConfigPath, visionConfigPath, skillsDir) {
511
551
  const env = {
512
552
  ...runtimeChildEnv(opts.env ?? process.env),
513
553
  FORCE_COLOR: "0",
@@ -515,6 +555,12 @@ export class DeepseekTuiAdapter {
515
555
  };
516
556
  if (progressMcpConfigPath)
517
557
  env.DEEPSEEK_MCP_CONFIG = progressMcpConfigPath;
558
+ if (skillsDir) {
559
+ // 该路径在一个 profile root 内固定,进程池复用时依然有效;每个 turn 只重写目录
560
+ // 内容。0.9.x 起 CLI 改名为 Codewhale,两个变量都设以覆盖升级窗口。
561
+ env.DEEPSEEK_SKILLS_DIR = skillsDir;
562
+ env.CODEWHALE_SKILLS_DIR = skillsDir;
563
+ }
518
564
  if (visionConfigPath)
519
565
  env.DEEPSEEK_CONFIG_PATH = visionConfigPath;
520
566
  if (this.managedActivationId(opts)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botlearn-course/daemon",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Lightweight BotLearn Course daemon: run course tasks on your own machine with your own agent runtime (BYOA).",
5
5
  "type": "module",
6
6
  "bin": {