dsh-multigameassistant 2.1.1 → 2.2.1
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.
- package/cordis.patch.yml +16 -1
- package/lib/analyzer.js +37 -81
- package/lib/browser.js +1 -1
- package/lib/{chunk-FBDVN6Q2.js → chunk-52LYI7WP.js} +1 -1
- package/lib/{chunk-SHTX4AGU.js → chunk-6DSSLS7I.js} +26 -0
- package/lib/{chunk-VOTN4IHB.js → chunk-EOZKHLHK.js} +3 -3
- package/lib/{chunk-NM6H6WCQ.js → chunk-F7ZQE7BT.js} +291 -18
- package/lib/{chunk-5PDYWE24.js → chunk-IBPJC6DX.js} +153 -5
- package/lib/chunk-NOZCFSQP.js +22944 -0
- package/lib/chunk-NOZCFSQP.js.LEGAL.txt +8 -0
- package/lib/{chunk-MQG5FLOG.js → chunk-OFVGRKTD.js} +667 -39
- package/lib/{chunk-UQLHGLMP.js → chunk-YSTZL6HE.js} +11 -3
- package/lib/emulator.js +2 -2
- package/lib/feishu.js +5 -5
- package/lib/game-intel.js +531 -67
- package/lib/gateway.js +14 -6
- package/lib/guard.js +2 -2
- package/lib/intervene.js +8 -6
- package/lib/low-context.js +3 -3
- package/lib/monitor.js +4 -4
- package/lib/notify.js +5 -5
- package/lib/orchestrator.js +8 -8
- package/lib/qqbot.js +5 -5
- package/lib/runner.js +4 -4
- package/lib/scheduler.js +2 -2
- package/lib/script-registry.js +33 -3705
- package/lib/webapi-GDSF5EWP.js +2481 -0
- package/package.json +1 -1
- package/skills/game-intel.md +12 -3
- package/skills/script-analysis.md +30 -3
- package/skills/web-reading.md +52 -15
- package/web/assets/index-BBPTH2CM.css +1 -0
- package/web/assets/index-DRxvDcu6.js +245 -0
- package/web/assets/index-DRxvDcu6.js.map +1 -0
- package/web/index.html +2 -2
- package/lib/chunk-RFCFA5P5.js +0 -11
- package/lib/games/arknights/game.yaml +0 -36
- package/lib/games/endfield/game.yaml +0 -25
- package/lib/games/starrail/game.yaml +0 -33
- package/lib/packs/maa/adg.script.yaml +0 -220
- package/lib/packs/maaend/adg.script.yaml +0 -160
- package/lib/packs/march7th/adg.script.yaml +0 -216
- package/web/assets/index-CL3SeTW9.css +0 -1
- package/web/assets/index-GYwpGP3f.js +0 -244
- package/web/assets/index-GYwpGP3f.js.map +0 -1
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-multigameassistant 2.
|
|
1
|
+
# dsh-multigameassistant 2.2.1
|
|
2
2
|
# dsh-multigameassistant: the app's plugins (packages/bundle/cordis.patch.yml, each @adg/<plugin> as dsh-multigameassistant/<plugin>)
|
|
3
3
|
# sharing the dsh with the person's other chats, and the app's agent preset (dsh's standard one with the app's
|
|
4
4
|
# tools and prompts, and compaction as 设置 → 对话压缩 says). No row of dsh is restated.
|
|
@@ -182,6 +182,10 @@
|
|
|
182
182
|
- id: skill-filesystem
|
|
183
183
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
184
184
|
config:
|
|
185
|
+
# The app's agents read their own skills only, not the folders other agents on the machine share
|
|
186
|
+
# (~/.agents/skills, ~/.dsh/skills, a working folder's .agents/skills or .dsh/skills); dsh's bundled ones stay.
|
|
187
|
+
includeDefaultRoots: false
|
|
188
|
+
bundledSkillDir: !!js "process.env.DSH_BUNDLED_SKILL_DIR || undefined"
|
|
185
189
|
customSkillDirs:
|
|
186
190
|
- !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
|
|
187
191
|
- id: tool-skill
|
|
@@ -225,6 +229,9 @@
|
|
|
225
229
|
auto: !!js "(() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().auto !== false"
|
|
226
230
|
thresholdRatio: !!js "(Math.min(100, Math.max(5, Number((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().threshold) || 80)) / 100)"
|
|
227
231
|
retainRatio: !!js "Math.min(0.16, (Math.min(100, Math.max(5, Number((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().threshold) || 80)) / 100) / 2)"
|
|
232
|
+
summarizationProvider: !!js "(s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.provider ?? ''"
|
|
233
|
+
summarizationModel: !!js "(s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.model ?? ''"
|
|
234
|
+
maxTokens: !!js "(m => Number.isInteger(m) && m > 0 ? Math.min(m, 65536) : 65536)((s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.maxTokens)"
|
|
228
235
|
- id: adg-low-context
|
|
229
236
|
name: 'dsh-multigameassistant/low-context'
|
|
230
237
|
config:
|
|
@@ -331,6 +338,11 @@
|
|
|
331
338
|
name: '@deepseek-ai/dsh-tool-schedule'
|
|
332
339
|
- id: skill-filesystem
|
|
333
340
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
341
|
+
config:
|
|
342
|
+
# The app's agents read their own skills only, not the folders other agents on the machine share
|
|
343
|
+
# (~/.agents/skills, ~/.dsh/skills, a working folder's .agents/skills or .dsh/skills); dsh's bundled ones stay.
|
|
344
|
+
includeDefaultRoots: false
|
|
345
|
+
bundledSkillDir: !!js "process.env.DSH_BUNDLED_SKILL_DIR || undefined"
|
|
334
346
|
- id: tool-skill
|
|
335
347
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
336
348
|
- id: command-goal
|
|
@@ -372,6 +384,9 @@
|
|
|
372
384
|
auto: !!js "(() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().auto !== false"
|
|
373
385
|
thresholdRatio: !!js "(Math.min(100, Math.max(5, Number((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().threshold) || 80)) / 100)"
|
|
374
386
|
retainRatio: !!js "Math.min(0.16, (Math.min(100, Math.max(5, Number((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().threshold) || 80)) / 100) / 2)"
|
|
387
|
+
summarizationProvider: !!js "(s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.provider ?? ''"
|
|
388
|
+
summarizationModel: !!js "(s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.model ?? ''"
|
|
389
|
+
maxTokens: !!js "(m => Number.isInteger(m) && m > 0 ? Math.min(m, 65536) : 65536)((s => s !== null && typeof s === 'object' && typeof s.provider === 'string' && s.provider !== '' && typeof s.model === 'string' && s.model !== '' ? s : undefined)((() => { try { return JSON.parse(process.getBuiltinModule('node:fs').readFileSync((process.env.ADG_DATA_DIR || dshHomePath('adg/data')) + '/compaction.json', 'utf8')) } catch { return {} } })().summarizer)?.maxTokens)"
|
|
375
390
|
- id: adg-low-context
|
|
376
391
|
name: 'dsh-multigameassistant/low-context'
|
|
377
392
|
config:
|
package/lib/analyzer.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { createRequire as __adgCreateRequire } from 'node:module'; import { dirname as __adgDirname } from 'node:path'; import { fileURLToPath as __adgFileURLToPath } from 'node:url'; const require = __adgCreateRequire(import.meta.url); const __filename = __adgFileURLToPath(import.meta.url); const __dirname = __adgDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
discoverMcp,
|
|
4
|
+
discoverSkills,
|
|
5
|
+
mcpEndpoints
|
|
6
|
+
} from "./chunk-NOZCFSQP.js";
|
|
2
7
|
import {
|
|
3
8
|
probeProject
|
|
4
9
|
} from "./chunk-B4UT4NYH.js";
|
|
@@ -6,17 +11,23 @@ import {
|
|
|
6
11
|
MANIFEST_FILE,
|
|
7
12
|
SKILL_FILE,
|
|
8
13
|
guideIssues,
|
|
14
|
+
parseJsonc,
|
|
9
15
|
parseManifest,
|
|
10
|
-
require_dist
|
|
11
|
-
|
|
16
|
+
require_dist,
|
|
17
|
+
stripJsonc
|
|
18
|
+
} from "./chunk-IBPJC6DX.js";
|
|
19
|
+
import "./chunk-YSTZL6HE.js";
|
|
20
|
+
import "./chunk-OFVGRKTD.js";
|
|
21
|
+
import "./chunk-52LYI7WP.js";
|
|
22
|
+
import "./chunk-RESS7WVY.js";
|
|
12
23
|
import {
|
|
13
24
|
BUILTIN_PACK_VERSION,
|
|
14
25
|
PACKS_CAPABILITY,
|
|
15
26
|
ScriptId
|
|
16
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-F7ZQE7BT.js";
|
|
17
28
|
import {
|
|
18
29
|
external_exports
|
|
19
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6DSSLS7I.js";
|
|
20
31
|
import {
|
|
21
32
|
__toESM
|
|
22
33
|
} from "./chunk-2UFLGPDY.js";
|
|
@@ -32,77 +43,6 @@ import { Service } from "@deepseek-ai/cordis";
|
|
|
32
43
|
import { readdir, readFile as readFile2, stat } from "node:fs/promises";
|
|
33
44
|
import { extname, join as join2, relative } from "node:path";
|
|
34
45
|
|
|
35
|
-
// packages/analyzer/lib/jsonc.js
|
|
36
|
-
function stripJsonc(source) {
|
|
37
|
-
let out = "";
|
|
38
|
-
let i = 0;
|
|
39
|
-
let inString = false;
|
|
40
|
-
while (i < source.length) {
|
|
41
|
-
const c = source[i];
|
|
42
|
-
const next = source[i + 1];
|
|
43
|
-
if (inString) {
|
|
44
|
-
out += c;
|
|
45
|
-
if (c === "\\" && next !== void 0) {
|
|
46
|
-
out += next;
|
|
47
|
-
i += 2;
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
if (c === '"')
|
|
51
|
-
inString = false;
|
|
52
|
-
i += 1;
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
if (c === '"') {
|
|
56
|
-
inString = true;
|
|
57
|
-
out += c;
|
|
58
|
-
i += 1;
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
if (c === "/" && next === "/") {
|
|
62
|
-
while (i < source.length && source[i] !== "\n")
|
|
63
|
-
i += 1;
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
if (c === "/" && next === "*") {
|
|
67
|
-
const end = source.indexOf("*/", i + 2);
|
|
68
|
-
i = end < 0 ? source.length : end + 2;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
out += c;
|
|
72
|
-
i += 1;
|
|
73
|
-
}
|
|
74
|
-
return removeTrailingCommas(out);
|
|
75
|
-
}
|
|
76
|
-
function removeTrailingCommas(text) {
|
|
77
|
-
let out = "";
|
|
78
|
-
let inString = false;
|
|
79
|
-
for (let i = 0; i < text.length; i++) {
|
|
80
|
-
const c = text[i];
|
|
81
|
-
if (inString) {
|
|
82
|
-
out += c;
|
|
83
|
-
if (c === "\\")
|
|
84
|
-
out += text[++i] ?? "";
|
|
85
|
-
else if (c === '"')
|
|
86
|
-
inString = false;
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
if (c === '"')
|
|
90
|
-
inString = true;
|
|
91
|
-
if (c === ",") {
|
|
92
|
-
let j = i + 1;
|
|
93
|
-
while (j < text.length && /\s/.test(text[j]))
|
|
94
|
-
j++;
|
|
95
|
-
if (text[j] === "}" || text[j] === "]")
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
out += c;
|
|
99
|
-
}
|
|
100
|
-
return out;
|
|
101
|
-
}
|
|
102
|
-
function parseJsonc(source) {
|
|
103
|
-
return JSON.parse(stripJsonc(source.replace(/^/, "")));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
46
|
// packages/analyzer/lib/maafw.js
|
|
107
47
|
import { readFile } from "node:fs/promises";
|
|
108
48
|
import { dirname, join } from "node:path";
|
|
@@ -546,7 +486,7 @@ var AdgAnalyzer = class extends Service {
|
|
|
546
486
|
disposers.push(scoped.adgGateway.generalSkill({ ...guide, source: "bundled" }, () => scoped.skills.register({ ...guide, source: "bundled" })));
|
|
547
487
|
const { scripts: inLibrary } = library.list();
|
|
548
488
|
for (const pack of library.packs()) {
|
|
549
|
-
if (pack.skill === void 0)
|
|
489
|
+
if (pack.skill === void 0 || pack.hub === true)
|
|
550
490
|
continue;
|
|
551
491
|
const skill = parseSkill(pack.skill, pack.manifest.id);
|
|
552
492
|
if (skill === void 0) {
|
|
@@ -558,7 +498,7 @@ var AdgAnalyzer = class extends Service {
|
|
|
558
498
|
...pack.manifest.game?.name === void 0 ? {} : { games: [pack.manifest.game.name] }
|
|
559
499
|
};
|
|
560
500
|
try {
|
|
561
|
-
disposers.push(scoped.adgGateway.skillScope.register({ ...skill, source: pack.builtin ? "bundled" : "custom", path: join4(pack.dir, SKILL_FILE), resourceBase: { kind: "directory", path: pack.dir }, owner }));
|
|
501
|
+
disposers.push(scoped.adgGateway.skillScope.register({ ...skill, source: pack.builtin ? "bundled" : "custom", path: join4(pack.dir, SKILL_FILE), resourceBase: { kind: "directory", path: pack.dir }, owner, kind: "script-pack", pack: pack.manifest.id, ...library.isOwnPack(pack.manifest.id) ? { ownPack: true } : {} }));
|
|
562
502
|
} catch (error) {
|
|
563
503
|
log.warn(`pack ${pack.manifest.id}: skill not registered: ${error instanceof Error ? error.message : String(error)}`);
|
|
564
504
|
}
|
|
@@ -637,7 +577,7 @@ var AdgAnalyzer = class extends Service {
|
|
|
637
577
|
const { packId, version } = params;
|
|
638
578
|
if (version === BUILTIN_PACK_VERSION) {
|
|
639
579
|
if (library.pack(packId)?.over === void 0)
|
|
640
|
-
throw new Error(`${packId} \u6CA1\u6709\
|
|
580
|
+
throw new Error(`${packId} \u6CA1\u6709\u5B98\u65B9\u7684\u811A\u672C\u5305\u53EF\u4EE5\u6062\u590D`);
|
|
641
581
|
await drafts.discard(packId);
|
|
642
582
|
} else {
|
|
643
583
|
await drafts.restore(packId, version);
|
|
@@ -716,10 +656,21 @@ function analyzerTools(deps) {
|
|
|
716
656
|
const manifest = pack === void 0 ? void 0 : await readFile4(join4(pack.dir, MANIFEST_FILE), "utf8").catch(() => void 0);
|
|
717
657
|
const repo = script.channels.github?.repo;
|
|
718
658
|
const online = [...repo === void 0 ? [] : [`https://github.com/${repo}`, `https://github.com/${repo}/wiki`], ...report.docLinks];
|
|
659
|
+
const found = await discoverMcp(script.dir);
|
|
660
|
+
const servers = mcpEndpoints(script.dir, found, void 0, false);
|
|
661
|
+
const skills = await discoverSkills(script.dir).catch(() => []);
|
|
719
662
|
return {
|
|
720
663
|
script: { id: script.id, name: script.name, source: script.source, family: script.family },
|
|
721
664
|
...report,
|
|
722
665
|
docLinks: [...new Set(online)],
|
|
666
|
+
mcp: servers.length === 0 ? null : {
|
|
667
|
+
servers: servers.map((e) => ({ name: e.name, file: e.file, server: e.server, transport: e.transport, ...e.transport === "stdio" ? { command: e.command, args: e.args } : { url: e.url }, ...e.problem === void 0 ? {} : { problem: e.problem } })),
|
|
668
|
+
todo: "\u8FD9\u4E2A\u811A\u672C\u6709 MCP \u670D\u52A1\uFF1A\u811A\u672C\u5305\u8981\u5199 mcp \u4E00\u8282\uFF08servers \u7528 from \u6307\u5411\u5B83\u7684\u914D\u7F6E\u6587\u4EF6\uFF1B\u7528 script_mcp_tools \u8FDE\u4E0A\u770B\u770B\u5DE5\u5177\u540E\u5199 usage \u548C tools\uFF09\uFF0CSKILL.md \u91CC\u5199\u4E00\u8282\u300CMCP\u300D\u8BF4\u660E\u4EC0\u4E48\u65F6\u5019\u7528 MCP\u3001\u4EC0\u4E48\u65F6\u5019\u7528 script_run\uFF08\u89C1 script-analysis \u6280\u80FD\u300CMCP\u300D\u4E00\u8282\uFF09"
|
|
669
|
+
},
|
|
670
|
+
skills: skills.length === 0 ? null : {
|
|
671
|
+
items: skills.map((k) => ({ name: k.name, description: k.description, path: k.path, ...k.problem === void 0 ? {} : { problem: k.problem } })),
|
|
672
|
+
todo: "\u8FD9\u4E2A\u811A\u672C\u81EA\u5E26\u6280\u80FD\uFF1A\u8BFB\u4E00\u8BFB\u5B83\u4EEC\uFF0CSKILL.md \u91CC\u63D0\u4E00\u53E5\uFF1B\u7528\u6237\u60F3\u7528\u65F6\u7528 script_skills_import \u653E\u8FDB\u6280\u80FD\u5E93"
|
|
673
|
+
},
|
|
723
674
|
readFirst: "\u5148\u8BFB\u6587\u6863\uFF08docs \u91CC\u7684\u6587\u4EF6\u3001readme\u3001docLinks \u91CC\u7684\u7F51\u9875\uFF09\uFF0C\u518D\u7ED3\u5408\u4EE3\u7801\u548C\u914D\u7F6E\u6838\u5BF9\u3001\u8865\u5168\uFF1B\u53EA\u6709\u5B8C\u5168\u627E\u4E0D\u5230\u6587\u6863\u65F6\u624D\u76F4\u63A5\u4ECE\u4EE3\u7801\u5206\u6790\u3002",
|
|
724
675
|
currentPack: pack === void 0 ? null : { id: pack.manifest.id, builtin: pack.builtin, manifest, skill: pack.skill }
|
|
725
676
|
};
|
|
@@ -727,7 +678,7 @@ function analyzerTools(deps) {
|
|
|
727
678
|
}),
|
|
728
679
|
tool({
|
|
729
680
|
name: "script_help",
|
|
730
|
-
description: "\u8FD0\u884C\u811A\u672C\u7A0B\u5E8F\u7684\u5E2E\u52A9\u53C2\u6570\uFF08\u9ED8\u8BA4 --help\uFF09\uFF0C\u62FF\u5230\u5B83\u81EA\u5DF1\u8BF4\u660E\u7684\u547D\u4EE4\u548C\u4EFB\u52A1\u3002\u6700\u591A\u8FD0\u884C 20 \u79D2\u540E\u7ED3\u675F\u3002\u6CA1\u6709\
|
|
681
|
+
description: "\u8FD0\u884C\u811A\u672C\u7A0B\u5E8F\u7684\u5E2E\u52A9\u53C2\u6570\uFF08\u9ED8\u8BA4 --help\uFF09\uFF0C\u62FF\u5230\u5B83\u81EA\u5DF1\u8BF4\u660E\u7684\u547D\u4EE4\u548C\u4EFB\u52A1\u3002\u6700\u591A\u8FD0\u884C 20 \u79D2\u540E\u7ED3\u675F\u3002\u6CA1\u6709\u5B98\u65B9\u811A\u672C\u5305\uFF08\u6280\u80FD\u5E93\u4E0B\u8F7D\u7684\uFF09\u7684\u811A\u672C\u4F1A\u5148\u8BF7\u7528\u6237\u786E\u8BA4\uFF0C\u56E0\u4E3A\u8FD9\u4F1A\u542F\u52A8\u5B83\u7684\u7A0B\u5E8F\u3002",
|
|
731
682
|
properties: {
|
|
732
683
|
id,
|
|
733
684
|
exe: { type: "string", description: "\u8981\u8FD0\u884C\u7684\u7A0B\u5E8F\uFF08\u76F8\u5BF9\u811A\u672C\u76EE\u5F55\uFF09\uFF1B\u7701\u7565\u65F6\u7528\u811A\u672C\u5305\u7684\u542F\u52A8\u7A0B\u5E8F\u6216\u627E\u5230\u7684\u7B2C\u4E00\u4E2A\u53EF\u6267\u884C\u6587\u4EF6\u3002" },
|
|
@@ -788,7 +739,7 @@ function analyzerTools(deps) {
|
|
|
788
739
|
}),
|
|
789
740
|
tool({
|
|
790
741
|
name: "pack_propose",
|
|
791
|
-
description: "\u4FDD\u5B58\u811A\u672C\u5305\uFF08adg.script.yaml \u548C SKILL.md\uFF09\uFF0C\u76F4\u63A5\u751F\u6548\uFF0C\u4E0D\u7528\u7528\u6237\u518D\u786E\u8BA4\uFF1A\u65B0\u5199\u4E00\u4EFD\uFF0C\u6216\u8005\u7528\u539F\u6765\u7684 id \u6539\u5DF2\u6709\u7684\u4E00\u4EFD\uFF08\
|
|
742
|
+
description: "\u4FDD\u5B58\u811A\u672C\u5305\uFF08adg.script.yaml \u548C SKILL.md\uFF09\uFF0C\u76F4\u63A5\u751F\u6548\uFF0C\u4E0D\u7528\u7528\u6237\u518D\u786E\u8BA4\uFF1A\u65B0\u5199\u4E00\u4EFD\uFF0C\u6216\u8005\u7528\u539F\u6765\u7684 id \u6539\u5DF2\u6709\u7684\u4E00\u4EFD\uFF08\u5B98\u65B9\u7684\u3001\u7528\u6237\u786E\u8BA4\u8FC7\u7684\u90FD\u53EF\u4EE5\uFF1B\u88AB\u66FF\u6362\u7684\u90A3\u4E00\u7248\u7559\u5728\u5386\u53F2\u91CC\uFF09\u3002\u4F1A\u6309 schema \u6821\u9A8C\uFF0C\u5E76\u68C0\u67E5 manifest \u91CC\u7ED9\u7528\u6237\u770B\u7684\u4F7F\u7528\u8BF4\u660E\uFF08guide\u3001\u4EFB\u52A1\u548C\u53C2\u6570\u7684 description\u3001\u4E34\u65F6\u4FEE\u6539\u7684 note\uFF09\uFF1A\u7F3A\u4E86\u6216\u6DF7\u8FDB\u4E86\u7ED9 agent \u7684\u5185\u5BB9\uFF08\u5DE5\u5177\u540D\u3001\u811A\u672C\u5305\u5B57\u6BB5\u3001\u5360\u4F4D\u7B26\u3001\u6838\u9A8C\u4F9D\u636E\u3001\u5F85\u786E\u8BA4\uFF09\u90FD\u4F1A\u5931\u8D25\u5E76\u8FD4\u56DE\u5177\u4F53\u4F4D\u7F6E\uFF0C\u811A\u672C\u5305\u4FDD\u6301\u539F\u6837\uFF0C\u4FEE\u6B63\u540E\u91CD\u65B0\u63D0\u4EA4\uFF1B\u901A\u8FC7\u540E\u8FD9\u4E2A\u811A\u672C\u9A6C\u4E0A\u7528\u65B0\u7684\u811A\u672C\u5305\uFF0C\u4E4B\u540E\u7684 script_run\u3001script_tasks \u90FD\u6309\u5B83\u6765\u3002\u4E0D\u4F1A\u4FEE\u6539\u811A\u672C\u672C\u8EAB\u3002",
|
|
792
743
|
properties: {
|
|
793
744
|
pack_id: { type: "string", description: "\u811A\u672C\u5305 id\uFF08\u4E0E manifest \u91CC\u7684 id \u76F8\u540C\uFF1B\u6539\u8FDB\u5DF2\u6709\u811A\u672C\u5305\u65F6\u7528\u539F id\uFF09\u3002" },
|
|
794
745
|
script_id: { type: "string", description: "\u8FD9\u4E2A\u5305\u63CF\u8FF0\u7684\u811A\u672C\u5E93\u91CC\u7684\u811A\u672C id\u3002" },
|
|
@@ -820,7 +771,12 @@ function analyzerTools(deps) {
|
|
|
820
771
|
throw new Error("\u5148\u8BFB\u9879\u76EE\u7684\u6587\u6863\u518D\u5199\u811A\u672C\u5305\uFF1Adocs \u91CC\u5199\u51FA\u8BFB\u8FC7\u7684\u6587\u6863\uFF08\u51FA\u5904\u548C\u5F97\u5230\u4E86\u4EC0\u4E48\uFF09\uFF1B\u786E\u5B9E\u627E\u4E0D\u5230\u6587\u6863\u65F6\u7528 no_docs \u8BF4\u660E\u627E\u8FC7\u54EA\u4E9B\u5730\u65B9\uFF08\u811A\u672C\u76EE\u5F55\u3001\u4ED3\u5E93 README\u3001Wiki\u3001\u6587\u6863\u7AD9\uFF09");
|
|
821
772
|
}
|
|
822
773
|
deps.library.get(a.script_id);
|
|
823
|
-
const
|
|
774
|
+
const manifest = parseManifest(a.manifest, `${a.pack_id}/${MANIFEST_FILE}`);
|
|
775
|
+
const issues = guideIssues(manifest);
|
|
776
|
+
const dir = deps.library.get(a.script_id).dir;
|
|
777
|
+
if (manifest.mcp === void 0 && dir !== void 0 && (await discoverMcp(dir)).some((e) => e.disabled !== true)) {
|
|
778
|
+
issues.push("\u8FD9\u4E2A\u811A\u672C\u76EE\u5F55\u91CC\u6709 MCP \u914D\u7F6E\uFF1Amanifest \u8981\u5199 mcp \u4E00\u8282\u2014\u2014servers\uFF08\u7528 from \u6307\u5411\u811A\u672C\u7684\u914D\u7F6E\u6587\u4EF6\uFF09\u3001usage\uFF08\u4EC0\u4E48\u65F6\u5019\u7528 MCP\u3001\u600E\u4E48\u7528\uFF09\u548C tools\uFF08\u4E3B\u8981\u5DE5\u5177\u7684\u7528\u9014\uFF09\uFF1B\u786E\u5B9E\u7528\u4E0D\u4E86\u5C31\u5199 mcp: { servers: [], note: \u4E3A\u4EC0\u4E48 }\u3002SKILL.md \u91CC\u4E5F\u5199\u4E00\u8282\u300CMCP\u300D");
|
|
779
|
+
}
|
|
824
780
|
if (issues.length > 0)
|
|
825
781
|
throw new Error(`\u4F7F\u7528\u8BF4\u660E\u8FD8\u8981\u6539\uFF08\u6309 script-analysis \u6280\u80FD\u300C\u4F7F\u7528\u8BF4\u660E\u300D\u4E00\u8282\uFF09\uFF1A
|
|
826
782
|
- ${issues.join("\n- ")}`);
|
package/lib/browser.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __adgCreateRequire } from 'node:module'; import { dirname as __adgDirname } from 'node:path'; import { fileURLToPath as __adgFileURLToPath } from 'node:url'; const require = __adgCreateRequire(import.meta.url); const __filename = __adgFileURLToPath(import.meta.url); const __dirname = __adgDirname(__filename);
|
|
2
2
|
import {
|
|
3
3
|
external_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6DSSLS7I.js";
|
|
5
5
|
import "./chunk-2UFLGPDY.js";
|
|
6
6
|
|
|
7
7
|
// packages/browser/lib/client.js
|
|
@@ -14518,5 +14518,31 @@ function date4(params) {
|
|
|
14518
14518
|
config(en_default());
|
|
14519
14519
|
|
|
14520
14520
|
export {
|
|
14521
|
+
NEVER,
|
|
14522
|
+
toJSONSchema,
|
|
14523
|
+
iso_exports,
|
|
14524
|
+
safeParse2 as safeParse,
|
|
14525
|
+
string2 as string,
|
|
14526
|
+
email2 as email,
|
|
14527
|
+
url,
|
|
14528
|
+
number2 as number,
|
|
14529
|
+
boolean2 as boolean,
|
|
14530
|
+
_null3 as _null,
|
|
14531
|
+
any,
|
|
14532
|
+
unknown,
|
|
14533
|
+
array,
|
|
14534
|
+
object,
|
|
14535
|
+
looseObject,
|
|
14536
|
+
union,
|
|
14537
|
+
discriminatedUnion,
|
|
14538
|
+
intersection,
|
|
14539
|
+
record,
|
|
14540
|
+
_enum2 as _enum,
|
|
14541
|
+
literal,
|
|
14542
|
+
optional,
|
|
14543
|
+
lazy,
|
|
14544
|
+
preprocess,
|
|
14545
|
+
ZodIssueCode,
|
|
14546
|
+
coerce_exports,
|
|
14521
14547
|
external_exports
|
|
14522
14548
|
};
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
guideView,
|
|
5
5
|
renderTask,
|
|
6
6
|
require_dist
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IBPJC6DX.js";
|
|
8
8
|
import {
|
|
9
9
|
RUNS_CAPABILITY,
|
|
10
10
|
ScriptId
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F7ZQE7BT.js";
|
|
12
12
|
import {
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6DSSLS7I.js";
|
|
15
15
|
import {
|
|
16
16
|
__toESM
|
|
17
17
|
} from "./chunk-2UFLGPDY.js";
|