dsh-multigameassistant 2.1.1 → 2.2.0
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-5PDYWE24.js → chunk-26JIEF6M.js} +153 -5
- package/lib/{chunk-SHTX4AGU.js → chunk-6DSSLS7I.js} +26 -0
- package/lib/{chunk-VOTN4IHB.js → chunk-EKTA4OYC.js} +3 -3
- package/lib/{chunk-UQLHGLMP.js → chunk-I4NHWXKH.js} +3 -3
- package/lib/{chunk-FBDVN6Q2.js → chunk-ICJLH3DP.js} +1 -1
- package/lib/chunk-J4QJC6UZ.js +22944 -0
- package/lib/chunk-J4QJC6UZ.js.LEGAL.txt +8 -0
- package/lib/{chunk-MQG5FLOG.js → chunk-KTOQFJ7R.js} +381 -36
- package/lib/{chunk-NM6H6WCQ.js → chunk-NEUZQ7TI.js} +237 -16
- package/lib/emulator.js +2 -2
- package/lib/feishu.js +5 -5
- package/lib/game-intel.js +454 -57
- 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 +9 -1
- package/skills/script-analysis.md +30 -3
- package/skills/web-reading.md +7 -2
- package/web/assets/index-C5cMI4PK.css +1 -0
- package/web/assets/index-ClYIoZUR.js +244 -0
- package/web/assets/index-ClYIoZUR.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
|
@@ -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
|
|
|
6
6
|
// packages/protocol/lib/emulators.js
|
|
7
7
|
var EMULATORS_CAPABILITY = "emulators";
|
|
@@ -191,6 +191,8 @@ var PackSummary = external_exports.object({
|
|
|
191
191
|
builtin: external_exports.boolean(),
|
|
192
192
|
/** A script with this pack is in the library. */
|
|
193
193
|
installed: external_exports.boolean(),
|
|
194
|
+
/** The user's own (the agent wrote it, in the user's pack directory): `scripts/packs/remove` deletes it. */
|
|
195
|
+
own: external_exports.boolean().optional(),
|
|
194
196
|
/** Problems loading the pack, if any; the pack is skipped. */
|
|
195
197
|
error: external_exports.string().optional()
|
|
196
198
|
});
|
|
@@ -339,6 +341,33 @@ var InstallSettings = external_exports.object({
|
|
|
339
341
|
autoUpdate: ScriptUpdatePolicy
|
|
340
342
|
});
|
|
341
343
|
var Empty = external_exports.object({});
|
|
344
|
+
var ScriptMcpServer = external_exports.object({
|
|
345
|
+
name: external_exports.string(),
|
|
346
|
+
/** `pack`: its pack names it; `discovered`: only in the script's own MCP config file. */
|
|
347
|
+
source: external_exports.enum(["pack", "discovered"]),
|
|
348
|
+
transport: external_exports.enum(["stdio", "http", "sse"]),
|
|
349
|
+
/** The program it starts, or its address. */
|
|
350
|
+
target: external_exports.string(),
|
|
351
|
+
/** The script's config file it was read from. */
|
|
352
|
+
file: external_exports.string().optional(),
|
|
353
|
+
/** Served by the script's own program while it runs. */
|
|
354
|
+
needsRunning: external_exports.boolean(),
|
|
355
|
+
description: external_exports.string().optional(),
|
|
356
|
+
/** Why it cannot be used as written. */
|
|
357
|
+
problem: external_exports.string().optional(),
|
|
358
|
+
/** Started without asking: a built-in pack's, or approved before. */
|
|
359
|
+
trusted: external_exports.boolean(),
|
|
360
|
+
connected: external_exports.boolean()
|
|
361
|
+
});
|
|
362
|
+
var ScriptSkillItem = external_exports.object({
|
|
363
|
+
name: external_exports.string(),
|
|
364
|
+
description: external_exports.string(),
|
|
365
|
+
/** Its folder in the script directory. */
|
|
366
|
+
path: external_exports.string(),
|
|
367
|
+
problem: external_exports.string().optional(),
|
|
368
|
+
/** Among this app's skills: under which name, whether it is the script's current version, whether it was changed here. */
|
|
369
|
+
imported: external_exports.object({ name: external_exports.string(), current: external_exports.boolean(), changed: external_exports.boolean() }).optional()
|
|
370
|
+
});
|
|
342
371
|
var ById = external_exports.object({ id: ScriptId });
|
|
343
372
|
var ScriptRequests = {
|
|
344
373
|
/** Library, plus the packs that could be installed. */
|
|
@@ -538,11 +567,56 @@ var ScriptRequests = {
|
|
|
538
567
|
params: external_exports.object({ id: ScriptId }),
|
|
539
568
|
result: external_exports.object({ sessionId: external_exports.string() })
|
|
540
569
|
},
|
|
570
|
+
/** Forget a script; its own script pack (one the agent wrote for it, that no other script uses) goes with it. */
|
|
541
571
|
"scripts/remove": {
|
|
542
572
|
capability: SCRIPTS_CAPABILITY,
|
|
543
573
|
params: external_exports.object({ id: ScriptId, deleteFiles: external_exports.boolean().optional() }),
|
|
544
574
|
result: Empty
|
|
545
575
|
},
|
|
576
|
+
/**
|
|
577
|
+
* Delete one of the user's own script packs (`own`). Scripts it describes
|
|
578
|
+
* stay, without its tasks; packs from the 技能库 are deleted there.
|
|
579
|
+
*/
|
|
580
|
+
"scripts/packs/remove": {
|
|
581
|
+
capability: SCRIPTS_CAPABILITY,
|
|
582
|
+
params: external_exports.object({ id: external_exports.string().min(1) }),
|
|
583
|
+
result: Empty
|
|
584
|
+
},
|
|
585
|
+
/**
|
|
586
|
+
* What the script offers agents beyond its tasks: its MCP servers (read
|
|
587
|
+
* from its MCP config files and its pack) and the skills it ships.
|
|
588
|
+
*/
|
|
589
|
+
"scripts/mcp": {
|
|
590
|
+
capability: SCRIPTS_CAPABILITY,
|
|
591
|
+
params: ById,
|
|
592
|
+
result: external_exports.object({
|
|
593
|
+
servers: external_exports.array(ScriptMcpServer),
|
|
594
|
+
/** The pack's notes for the agent on using them. */
|
|
595
|
+
usage: external_exports.string().optional(),
|
|
596
|
+
note: external_exports.string().optional(),
|
|
597
|
+
skills: external_exports.array(ScriptSkillItem)
|
|
598
|
+
})
|
|
599
|
+
},
|
|
600
|
+
/** Connect to one of the script's MCP servers and list its tools (the user's click: trusted from then on). */
|
|
601
|
+
"scripts/mcp/probe": {
|
|
602
|
+
capability: SCRIPTS_CAPABILITY,
|
|
603
|
+
params: external_exports.object({ id: ScriptId, server: external_exports.string().min(1).max(32) }),
|
|
604
|
+
result: external_exports.object({
|
|
605
|
+
ok: external_exports.boolean(),
|
|
606
|
+
tools: external_exports.array(external_exports.object({ name: external_exports.string(), title: external_exports.string().optional(), description: external_exports.string().optional() })).optional(),
|
|
607
|
+
server: external_exports.object({ name: external_exports.string(), version: external_exports.string() }).optional(),
|
|
608
|
+
error: external_exports.string().optional()
|
|
609
|
+
})
|
|
610
|
+
},
|
|
611
|
+
/** Put the script's skills (these, or all) among this app's skills, belonging to the script. */
|
|
612
|
+
"scripts/skills/import": {
|
|
613
|
+
capability: SCRIPTS_CAPABILITY,
|
|
614
|
+
params: external_exports.object({ id: ScriptId, names: external_exports.array(external_exports.string().min(1).max(200)).max(50).optional() }),
|
|
615
|
+
result: external_exports.object({
|
|
616
|
+
imported: external_exports.array(external_exports.object({ skill: external_exports.string(), name: external_exports.string(), replaced: external_exports.boolean() })),
|
|
617
|
+
skipped: external_exports.array(external_exports.object({ skill: external_exports.string(), reason: external_exports.string() }))
|
|
618
|
+
})
|
|
619
|
+
},
|
|
546
620
|
/** Check the script's runtime requirements on this machine. */
|
|
547
621
|
"scripts/envCheck": {
|
|
548
622
|
capability: SCRIPTS_CAPABILITY,
|
|
@@ -1068,6 +1142,30 @@ var PipelineSchedule = external_exports.object({
|
|
|
1068
1142
|
/** Also run when this other pipeline finishes successfully. */
|
|
1069
1143
|
after: PipelineId.optional()
|
|
1070
1144
|
});
|
|
1145
|
+
var DAY_NAMES = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
1146
|
+
var WEEK_ORDER = [1, 2, 3, 4, 5, 6, 0];
|
|
1147
|
+
function timetableText(s) {
|
|
1148
|
+
if (!s.enabled)
|
|
1149
|
+
return "\u5DF2\u6682\u505C";
|
|
1150
|
+
if (s.times.length === 0)
|
|
1151
|
+
return s.after === void 0 ? "\u6CA1\u6709\u8BBE\u65F6\u95F4" : `\u300C${s.after}\u300D\u8DD1\u5B8C\u540E`;
|
|
1152
|
+
const days = s.days.length === 0 || s.days.length === 7 ? "\u6BCF\u5929" : `\u6BCF\u5468${WEEK_ORDER.filter((d) => s.days.includes(d)).map((d) => DAY_NAMES[d]).join("\u3001")}`;
|
|
1153
|
+
return `${days} ${[...s.times].sort().join("\u3001")}`;
|
|
1154
|
+
}
|
|
1155
|
+
var ScheduleAgentSet = external_exports.object({
|
|
1156
|
+
kind: external_exports.enum(["task", "reminder"]),
|
|
1157
|
+
/** The timed task's id (`tasks/list`) or the reminder's (`reminders/list`), when known. */
|
|
1158
|
+
id: external_exports.string().optional(),
|
|
1159
|
+
/** Who set it (role id; `main`: 助手). */
|
|
1160
|
+
by: external_exports.string(),
|
|
1161
|
+
/** Who is handed it when it comes. */
|
|
1162
|
+
agent: external_exports.string(),
|
|
1163
|
+
title: external_exports.string(),
|
|
1164
|
+
/** When, in words (每天 09:00, 一次 …); empty when not known. */
|
|
1165
|
+
when: external_exports.string(),
|
|
1166
|
+
/** An existing one was changed, not a new one made. */
|
|
1167
|
+
changed: external_exports.boolean()
|
|
1168
|
+
});
|
|
1071
1169
|
var PowerAction = external_exports.enum(["none", "sleep", "hibernate", "shutdown"]);
|
|
1072
1170
|
var Pipeline = external_exports.object({
|
|
1073
1171
|
id: PipelineId,
|
|
@@ -1328,6 +1426,8 @@ var PipelineNotifications = {
|
|
|
1328
1426
|
"schedule/changed": external_exports.object({}),
|
|
1329
1427
|
/** A timed task was saved, removed, or one of its runs started or ended. */
|
|
1330
1428
|
"tasks/changed": external_exports.object({}),
|
|
1429
|
+
/** An agent set a timed task or a reminder with its tool (the 定时 page's own changes are not announced). */
|
|
1430
|
+
"schedule/agentSet": ScheduleAgentSet,
|
|
1331
1431
|
/** Keeping awake started or stopped; a sleep / shutdown was asked for, began counting down, was cancelled or done. */
|
|
1332
1432
|
"schedule/power": PowerStatus
|
|
1333
1433
|
};
|
|
@@ -1392,6 +1492,26 @@ var InterveneNotifications = {
|
|
|
1392
1492
|
|
|
1393
1493
|
// packages/protocol/lib/games.js
|
|
1394
1494
|
var GAMES_CAPABILITY = "games";
|
|
1495
|
+
var GameNotice = external_exports.object({
|
|
1496
|
+
/** `<game>/<key>`. */
|
|
1497
|
+
id: external_exports.string(),
|
|
1498
|
+
game: external_exports.string(),
|
|
1499
|
+
title: external_exports.string(),
|
|
1500
|
+
/** `update`: a version update or patch notes; `notice`: an announcement; `news`: other news. */
|
|
1501
|
+
kind: external_exports.enum(["update", "notice", "news"]),
|
|
1502
|
+
publishedAt: external_exports.number().optional(),
|
|
1503
|
+
/** The version it is about ("v1.0.3"). */
|
|
1504
|
+
version: external_exports.string().optional(),
|
|
1505
|
+
summary: external_exports.string().optional(),
|
|
1506
|
+
url: external_exports.string().optional(),
|
|
1507
|
+
/** Its picture (https). */
|
|
1508
|
+
cover: external_exports.string().optional(),
|
|
1509
|
+
/** Stays relevant (a long-term notice): kept and listed first. */
|
|
1510
|
+
lasting: external_exports.boolean().optional(),
|
|
1511
|
+
source: external_exports.object({ id: external_exports.string(), name: external_exports.string() }),
|
|
1512
|
+
/** When it was read. */
|
|
1513
|
+
at: external_exports.number()
|
|
1514
|
+
});
|
|
1395
1515
|
var Activity = external_exports.object({
|
|
1396
1516
|
/** `<game>/<key>`; the key is the normalised name, so a site and the screen meet on it. */
|
|
1397
1517
|
id: external_exports.string(),
|
|
@@ -1501,6 +1621,12 @@ var GameInfo = external_exports.object({
|
|
|
1501
1621
|
art: external_exports.string().optional(),
|
|
1502
1622
|
/** Followed from the SRA public API without a Game Pack (no scripts, no screen reading): can be unfollowed. */
|
|
1503
1623
|
followed: external_exports.boolean().optional(),
|
|
1624
|
+
/** The SRA public API's ids its sources read (to match it with the 技能库's packs for the game). */
|
|
1625
|
+
sra: external_exports.array(external_exports.string()).optional(),
|
|
1626
|
+
/** Made here (added by name, or by the agent): `games/remove` deletes it. */
|
|
1627
|
+
own: external_exports.boolean().optional(),
|
|
1628
|
+
/** A single-player game: its page leads with announcements (no timed events). */
|
|
1629
|
+
single: external_exports.boolean().optional(),
|
|
1504
1630
|
/** The game's current version, from a data site that knows it. */
|
|
1505
1631
|
version: external_exports.object({
|
|
1506
1632
|
name: external_exports.string(),
|
|
@@ -1552,7 +1678,9 @@ var GamesSettings = external_exports.object({
|
|
|
1552
1678
|
ai: external_exports.boolean()
|
|
1553
1679
|
}),
|
|
1554
1680
|
/** SRA game ids followed besides the Game Packs (`ys`, `zzz`…), see `games/catalog`. */
|
|
1555
|
-
followed: external_exports.array(external_exports.string())
|
|
1681
|
+
followed: external_exports.array(external_exports.string()),
|
|
1682
|
+
/** Game packs (from the 技能库) the user took off the game page: still installed, not shown. */
|
|
1683
|
+
hidden: external_exports.array(external_exports.string()).optional()
|
|
1556
1684
|
});
|
|
1557
1685
|
var ReportInfo = external_exports.object({
|
|
1558
1686
|
/** When today's (or the last) report went out. */
|
|
@@ -1569,13 +1697,13 @@ var GamesRequests = {
|
|
|
1569
1697
|
"games/list": {
|
|
1570
1698
|
capability: GAMES_CAPABILITY,
|
|
1571
1699
|
params: external_exports.object({}),
|
|
1572
|
-
result: external_exports.object({ games: external_exports.array(GameInfo), activities: external_exports.array(Activity), settings: GamesSettings, report: ReportInfo })
|
|
1700
|
+
result: external_exports.object({ games: external_exports.array(GameInfo), activities: external_exports.array(Activity), notices: external_exports.array(GameNotice).default([]), settings: GamesSettings, report: ReportInfo })
|
|
1573
1701
|
},
|
|
1574
1702
|
/** Read the data sites now (one game, or all). */
|
|
1575
1703
|
"games/refresh": {
|
|
1576
1704
|
capability: GAMES_CAPABILITY,
|
|
1577
1705
|
params: external_exports.object({ game: external_exports.string().optional() }),
|
|
1578
|
-
result: external_exports.object({ results: external_exports.array(external_exports.object({ game: external_exports.string(), ok: external_exports.boolean(), count: external_exports.number(), detail: external_exports.string().optional() })) })
|
|
1706
|
+
result: external_exports.object({ results: external_exports.array(external_exports.object({ game: external_exports.string(), ok: external_exports.boolean(), count: external_exports.number(), notices: external_exports.number().optional(), detail: external_exports.string().optional() })) })
|
|
1579
1707
|
},
|
|
1580
1708
|
/** Ask the agent to read the game screen; it works in a session of its own. */
|
|
1581
1709
|
/**
|
|
@@ -1629,10 +1757,31 @@ var GamesRequests = {
|
|
|
1629
1757
|
params: external_exports.object({ game: external_exports.string().min(1) }),
|
|
1630
1758
|
result: external_exports.object({ icon: external_exports.object({ mediaType: external_exports.string(), data: external_exports.string() }).optional() })
|
|
1631
1759
|
},
|
|
1632
|
-
/**
|
|
1760
|
+
/**
|
|
1761
|
+
* Put a game on the game page by its name, whatever is known about it: one
|
|
1762
|
+
* already there (or taken off it) is shown; one the SRA public API knows is
|
|
1763
|
+
* followed; any other is made empty, for the agent to find its sources from
|
|
1764
|
+
* its page (`games/discover`). Packs are not downloaded here.
|
|
1765
|
+
*/
|
|
1766
|
+
"games/create": {
|
|
1767
|
+
capability: GAMES_CAPABILITY,
|
|
1768
|
+
params: external_exports.object({ name: external_exports.string().trim().min(1).max(60) }),
|
|
1769
|
+
result: external_exports.object({ game: external_exports.string() })
|
|
1770
|
+
},
|
|
1771
|
+
/**
|
|
1772
|
+
* Take a game off the game page: one followed from the SRA public API is no
|
|
1773
|
+
* longer followed, a game pack from the 技能库 is hidden (the pack stays
|
|
1774
|
+
* installed), one made here is deleted with its events.
|
|
1775
|
+
*/
|
|
1776
|
+
"games/remove": {
|
|
1777
|
+
capability: GAMES_CAPABILITY,
|
|
1778
|
+
params: external_exports.object({ game: external_exports.string() }),
|
|
1779
|
+
result: external_exports.object({})
|
|
1780
|
+
},
|
|
1781
|
+
/** The agent finds where a game on the page can be read (its game pack's sources), from the game's page. */
|
|
1633
1782
|
"games/discover": {
|
|
1634
1783
|
capability: GAMES_CAPABILITY,
|
|
1635
|
-
params: external_exports.object({
|
|
1784
|
+
params: external_exports.object({ game: external_exports.string() }),
|
|
1636
1785
|
result: external_exports.object({ sessionId: external_exports.string() })
|
|
1637
1786
|
},
|
|
1638
1787
|
/**
|
|
@@ -1663,7 +1812,11 @@ var GamesRequests = {
|
|
|
1663
1812
|
params: external_exports.object({}),
|
|
1664
1813
|
result: external_exports.object({ games: external_exports.array(external_exports.object({ sra: external_exports.string(), name: external_exports.string(), followed: external_exports.boolean(), pack: external_exports.string().optional() })) })
|
|
1665
1814
|
},
|
|
1666
|
-
/**
|
|
1815
|
+
/**
|
|
1816
|
+
* Show (or stop showing) an SRA game on the game page: followed through the
|
|
1817
|
+
* API, or, when a game pack reads it, that game pack shown or hidden (the
|
|
1818
|
+
* pack is not downloaded or deleted). Its events come in with the daily refresh.
|
|
1819
|
+
*/
|
|
1667
1820
|
"games/follow": {
|
|
1668
1821
|
capability: GAMES_CAPABILITY,
|
|
1669
1822
|
params: external_exports.object({ sra: external_exports.string(), follow: external_exports.boolean() }),
|
|
@@ -1740,13 +1893,13 @@ var PermissionMode = external_exports.enum(["ask", "full"]);
|
|
|
1740
1893
|
var AreaPolicy = external_exports.enum(["default", "allow", "ask", "deny"]);
|
|
1741
1894
|
var AGENT_AREAS = [
|
|
1742
1895
|
{ id: "pipelines-edit", title: "\u7F16\u8F91\u6D41\u6C34\u7EBF\u548C\u5B9A\u65F6", description: "\u8D77\u8349\u6D41\u6C34\u7EBF\uFF0C\u300C\u7F16\u6392\u300D\u76F4\u63A5\u4FEE\u6539\u3001\u4FDD\u5B58\u6D41\u6C34\u7EBF\uFF08pipeline_save\uFF09\uFF0C\u8BBE\u5B9A\u65F6\u95F4\uFF08schedule_set\uFF09\uFF0C\u4EE5\u53CA dsh \u81EA\u5DF1\u7684\u5B9A\u65F6\u4EFB\u52A1\u3002", tools: ["pipeline_draft", "pipeline_save", "schedule_set", "schedule_create", "schedule_edit"] },
|
|
1743
|
-
{ id: "run", title: "\u8FD0\u884C\u6D41\u6C34\u7EBF\u548C\u811A\u672C", description: "\u542F\u52A8\u3001\u505C\u6B62\u6D41\u6C34\u7EBF\u548C\u811A\u672C\u4EFB\u52A1\u3002", tools: ["pipeline_run", "script_run", "script_stop"] },
|
|
1896
|
+
{ id: "run", title: "\u8FD0\u884C\u6D41\u6C34\u7EBF\u548C\u811A\u672C", description: "\u542F\u52A8\u3001\u505C\u6B62\u6D41\u6C34\u7EBF\u548C\u811A\u672C\u4EFB\u52A1\uFF0C\u901A\u8FC7\u811A\u672C\u81EA\u5E26\u7684 MCP \u670D\u52A1\u64CD\u63A7\u811A\u672C\u3002", tools: ["pipeline_run", "script_run", "script_stop", "script_mcp_call"] },
|
|
1744
1897
|
{ id: "scripts-config", title: "\u6539\u811A\u672C\u914D\u7F6E", description: "\u4FEE\u6539\u811A\u672C\u7684\u914D\u7F6E\u526F\u672C\u3001\u5BFC\u5165\u914D\u7F6E\u3001\u65B0\u5EFA\u9009\u9879\u3001\u6253\u5F00\u811A\u672C\u81EA\u5DF1\u7684\u8BBE\u7F6E\u754C\u9762\u3001\u8BBE\u7F6E\u6E38\u620F\u4F4D\u7F6E\u3002", tools: ["script_config_set", "script_config_import", "script_choice_create", "script_settings", "game_path_set"] },
|
|
1745
1898
|
{ id: "scripts-install", title: "\u5B89\u88C5\u3001\u66F4\u65B0\u3001\u5220\u9664\u811A\u672C", description: "\u4ECE GitHub \u5B89\u88C5\u3001\u66F4\u65B0\u3001\u56DE\u6EDA\u3001\u5220\u9664\u811A\u672C\uFF0C\u8FD0\u884C\u811A\u672C\u7684\u5B89\u88C5\u7A0B\u5E8F\uFF0C\u5BFC\u5165\u672C\u5730\u811A\u672C\uFF0C\u4FEE\u590D\u8FD0\u884C\u73AF\u5883\uFF0C\u5199\u3001\u6539\u811A\u672C\u5305\uFF08pack_propose\uFF0C\u76F4\u63A5\u751F\u6548\uFF09\u3002", tools: ["script_install", "script_update", "script_rollback", "script_remove", "script_setup_run", "script_import", "script_env_fix", "pack_propose"] },
|
|
1746
1899
|
{ id: "screen", title: "\u64CD\u4F5C\u5C4F\u5E55\u548C\u6A21\u62DF\u5668", description: "\u5728\u6E38\u620F\u7A97\u53E3\u6216\u6A21\u62DF\u5668\u91CC\u70B9\u51FB\u3001\u8F93\u5165\u3001\u6309\u952E\u3001\u6ED1\u52A8\u3001\u5207\u6362\u7A97\u53E3\uFF08\u622A\u56FE\u4E0D\u7B97\uFF09\u3002", tools: ["screen_tap", "screen_type", "screen_key", "screen_scroll", "screen_swipe", "window_focus"] },
|
|
1747
1900
|
{ id: "games", title: "\u542F\u52A8\u3001\u5173\u95ED\u6E38\u620F\u548C\u6A21\u62DF\u5668", description: "\u6253\u5F00\u3001\u5173\u6389\u6E38\u620F\uFF0C\u542F\u52A8\u3001\u5173\u95ED\u3001\u5B89\u88C5\u3001\u8BBE\u7F6E\u6A21\u62DF\u5668\u3002", tools: ["game_launch", "game_close", "emulator_start", "emulator_stop", "emulator_install", "emulator_configure"] },
|
|
1748
1901
|
{ id: "game-records", title: "\u8BB0\u5F55\u6D3B\u52A8\u3001\u6DFB\u52A0\u6E38\u620F", description: "\u628A\u8BFB\u5230\u7684\u6D3B\u52A8\u5199\u8FDB\u65E5\u5386\uFF0C\u66FF\u4F60\u6DFB\u52A0\u3001\u4FEE\u6539\u6216\u53BB\u6389\u6D3B\u52A8\uFF0C\u7ED9\u65B0\u6E38\u620F\u5EFA\u6E38\u620F\u5305\u3002", tools: ["game_record", "game_activity_save", "game_activity_remove", "game_add"] },
|
|
1749
|
-
{ id: "skills", title: "\u4FDD\u5B58\u6280\u80FD", description: "\u628A\u505A\u6CD5\u5B58\u6210\u6280\u80FD\uFF0C\u4EE5\u540E\u7684\u5BF9\u8BDD\u90FD\u4F1A\u7528\u5230\u3002", tools: ["skill_save"] },
|
|
1902
|
+
{ id: "skills", title: "\u4FDD\u5B58\u6280\u80FD", description: "\u628A\u505A\u6CD5\u5B58\u6210\u6280\u80FD\uFF0C\u4EE5\u540E\u7684\u5BF9\u8BDD\u90FD\u4F1A\u7528\u5230\uFF1B\u628A\u811A\u672C\u81EA\u5E26\u7684\u6280\u80FD\u653E\u8FDB\u6280\u80FD\u5E93\u3002", tools: ["skill_save", "script_skills_import"] },
|
|
1750
1903
|
{ id: "web", title: "\u4E0A\u7F51\u67E5\u8D44\u6599", description: "\u8BFB\u7F51\u9875\u3001\u641C\u7D22\u3002", tools: ["web_fetch", "web_search"] },
|
|
1751
1904
|
{ id: "browser", title: "\u64CD\u4F5C\u5185\u7F6E\u6D4F\u89C8\u5668", description: "\u5728\u5185\u7F6E\u6D4F\u89C8\u5668\u91CC\u6253\u5F00\u7F51\u9875\u3001\u70B9\u51FB\u3001\u8F93\u5165\u3001\u6309\u952E\u3001\u6EDA\u52A8\u3001\u5207\u6362\u6807\u7B7E\u9875\uFF08\u8BFB\u9875\u9762\u548C\u622A\u56FE\u4E0D\u7B97\uFF09\u3002", tools: ["browser_navigate", "browser_click", "browser_type", "browser_press", "browser_scroll", "browser_tabs"] },
|
|
1752
1905
|
{ id: "shell", title: "\u8FD0\u884C\u547D\u4EE4\u3001\u6539\u6587\u4EF6", description: "dsh \u81EA\u5E26\u7684\u547D\u4EE4\u884C\u548C\u6587\u4EF6\u7F16\u8F91\u3002\u53EA\u5728\u5B83\u8BF7\u6C42\u786E\u8BA4\u65F6\u6309\u8FD9\u91CC\u7684\u8BBE\u7F6E\u5904\u7406\uFF08\u6C99\u7BB1\u91CC\u7684\u666E\u901A\u547D\u4EE4\u4E0D\u4F1A\u8BF7\u6C42\uFF09\u3002", tools: ["pwsh", "bash", "edit", "write"], approvalOnly: true }
|
|
@@ -1868,9 +2021,11 @@ var SkillInfo = external_exports.object({
|
|
|
1868
2021
|
description: external_exports.string(),
|
|
1869
2022
|
whenToUse: external_exports.string().optional(),
|
|
1870
2023
|
/**
|
|
1871
|
-
* Where it comes from: `bundled` (shipped with the app or a plugin
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
2024
|
+
* Where it comes from: `bundled` (shipped with the app or a plugin: core,
|
|
2025
|
+
* cannot be changed), `hub` (downloaded from the 技能库), `custom` (packs and
|
|
2026
|
+
* game packs the user added, and the skills saved here), `runtime`. The
|
|
2027
|
+
* app's agents do not read the skill folders other agents share
|
|
2028
|
+
* (`~/.agents/skills`, `~/.dsh/skills`, a working folder's `.agents/skills`).
|
|
1874
2029
|
*/
|
|
1875
2030
|
source: external_exports.string(),
|
|
1876
2031
|
/** The plugin or provider that serves it. */
|
|
@@ -1887,7 +2042,13 @@ var SkillInfo = external_exports.object({
|
|
|
1887
2042
|
*/
|
|
1888
2043
|
owner: SkillOwner.optional(),
|
|
1889
2044
|
/** Kept in this app's skills folder (saved by the agent or made on the 技能 page): it can be changed and deleted. */
|
|
1890
|
-
removable: external_exports.boolean().optional()
|
|
2045
|
+
removable: external_exports.boolean().optional(),
|
|
2046
|
+
/** A script pack's SKILL.md, or a game pack's guide (the 技能 page lists them as 脚本包 and 游戏包). */
|
|
2047
|
+
kind: external_exports.enum(["script-pack", "game-pack"]).optional(),
|
|
2048
|
+
/** A script pack's id (its SKILL.md is this skill). */
|
|
2049
|
+
pack: external_exports.string().optional(),
|
|
2050
|
+
/** A script pack of the user's own (the agent wrote it): `scripts/packs/remove` deletes it. */
|
|
2051
|
+
ownPack: external_exports.boolean().optional()
|
|
1891
2052
|
});
|
|
1892
2053
|
var SKILL_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
1893
2054
|
var MAX_SKILL_NAME = 48;
|
|
@@ -1917,6 +2078,12 @@ var SkillsRequests = {
|
|
|
1917
2078
|
}),
|
|
1918
2079
|
result: external_exports.object({ name: external_exports.string(), replaced: external_exports.boolean() })
|
|
1919
2080
|
},
|
|
2081
|
+
/** The scripts and games a session is working on (技能隔离's focus): the page offers their packs from the 技能库. */
|
|
2082
|
+
"skills/focus": {
|
|
2083
|
+
capability: SKILLS_CAPABILITY,
|
|
2084
|
+
params: external_exports.object({ sessionId: external_exports.string() }),
|
|
2085
|
+
result: SkillOwner.required()
|
|
2086
|
+
},
|
|
1920
2087
|
/** Delete one of this app's skills folder (`removable`). */
|
|
1921
2088
|
"skills/remove": {
|
|
1922
2089
|
capability: SKILLS_CAPABILITY,
|
|
@@ -1926,7 +2093,9 @@ var SkillsRequests = {
|
|
|
1926
2093
|
};
|
|
1927
2094
|
var SkillsNotifications = {
|
|
1928
2095
|
/** A skill was saved or deleted; re-read `skills/list`. */
|
|
1929
|
-
"skills/changed": external_exports.object({})
|
|
2096
|
+
"skills/changed": external_exports.object({}),
|
|
2097
|
+
/** A session's focus changed (the agent turned to a script or game). */
|
|
2098
|
+
"skills/focused": external_exports.object({ sessionId: external_exports.string(), scripts: external_exports.array(external_exports.string()), games: external_exports.array(external_exports.string()) })
|
|
1930
2099
|
};
|
|
1931
2100
|
|
|
1932
2101
|
// packages/protocol/lib/handoff-notes.js
|
|
@@ -2155,8 +2324,20 @@ var CompactionSettings = external_exports.object({
|
|
|
2155
2324
|
* prints enters their conversation, so polling a run or reading a long log costs a few lines, not every result
|
|
2156
2325
|
* at every step. Off: they run the standard preset, one tool call per step. Read when the agent service starts.
|
|
2157
2326
|
*/
|
|
2158
|
-
ptcSubagents: external_exports.boolean().default(true)
|
|
2327
|
+
ptcSubagents: external_exports.boolean().default(true),
|
|
2328
|
+
/**
|
|
2329
|
+
* The model that writes every summary (automatic, by hand, low-context mode); null: the model the conversation
|
|
2330
|
+
* is using (dsh's own choice). Another model reads the span without the conversation's prompt cache, and needs a
|
|
2331
|
+
* context window that holds it. `maxTokens`: the most the summary may be, the model's own output limit when its
|
|
2332
|
+
* route declares one (the host fills it in). Read when the agent service starts.
|
|
2333
|
+
*/
|
|
2334
|
+
summarizer: external_exports.object({
|
|
2335
|
+
provider: external_exports.string().min(1).max(200),
|
|
2336
|
+
model: external_exports.string().min(1).max(200),
|
|
2337
|
+
maxTokens: external_exports.number().int().positive().optional()
|
|
2338
|
+
}).nullable().default(null)
|
|
2159
2339
|
});
|
|
2340
|
+
var SUMMARY_MAX_TOKENS = 65536;
|
|
2160
2341
|
var State = external_exports.object({ settings: CompactionSettings, applied: CompactionSettings });
|
|
2161
2342
|
var CompactionRequests = {
|
|
2162
2343
|
"compaction/get": {
|
|
@@ -2717,10 +2898,23 @@ var HubItem = external_exports.object({
|
|
|
2717
2898
|
description: external_exports.string(),
|
|
2718
2899
|
title: external_exports.string().optional(),
|
|
2719
2900
|
kind: external_exports.enum(["game", "script", "general"]),
|
|
2901
|
+
/**
|
|
2902
|
+
* A script pack (its folder has `adg.script.yaml`: how the script installs,
|
|
2903
|
+
* its tasks; the pack id is the name) or a game pack (`game.yaml`: where the
|
|
2904
|
+
* game page reads events). Absent: a skill only.
|
|
2905
|
+
*/
|
|
2906
|
+
pack: external_exports.enum(["script", "game"]).optional(),
|
|
2907
|
+
/** A game pack's game id, and the SRA public API's ids for it (the games page's 更多游戏 list). */
|
|
2908
|
+
game: external_exports.string().optional(),
|
|
2909
|
+
sra: external_exports.array(external_exports.string()).optional(),
|
|
2910
|
+
/** Offered ticked when the packs for its game are offered (the main ones); others unticked. */
|
|
2911
|
+
default: external_exports.boolean().optional(),
|
|
2720
2912
|
/** Game ids and script / pack ids it is for: the page suggests it for the ones the user has. */
|
|
2721
2913
|
games: external_exports.array(external_exports.string()),
|
|
2722
2914
|
scripts: external_exports.array(external_exports.string()),
|
|
2723
2915
|
repo: external_exports.string(),
|
|
2916
|
+
/** Who published it (a GitHub name): the 技能库 lists packs by game, script, then author. */
|
|
2917
|
+
author: external_exports.string().optional(),
|
|
2724
2918
|
path: external_exports.string(),
|
|
2725
2919
|
/** Fingerprint of its whole folder: a different one is another version. */
|
|
2726
2920
|
hash: external_exports.string(),
|
|
@@ -2729,6 +2923,8 @@ var HubItem = external_exports.object({
|
|
|
2729
2923
|
changes: external_exports.string().optional(),
|
|
2730
2924
|
/** App versions it works with, e.g. `>=2.1.0`. */
|
|
2731
2925
|
requires: external_exports.string().optional(),
|
|
2926
|
+
/** Earlier versions the repository keeps (git tags `<name>@<version>`), newest first: `skillhub/version` takes any. */
|
|
2927
|
+
history: external_exports.array(external_exports.object({ version: external_exports.string(), changes: external_exports.string().optional() })).optional(),
|
|
2732
2928
|
installed: external_exports.object({
|
|
2733
2929
|
at: external_exports.number(),
|
|
2734
2930
|
/** The repository has a newer version (not one gone back from). */
|
|
@@ -2753,6 +2949,18 @@ var SkillHubRequests = {
|
|
|
2753
2949
|
params: external_exports.object({ refresh: external_exports.boolean().optional() }),
|
|
2754
2950
|
result: external_exports.object({ items: external_exports.array(HubItem), repos: external_exports.array(HubRepo), errors: external_exports.array(external_exports.string()), fetchedAt: external_exports.number().optional() })
|
|
2755
2951
|
},
|
|
2952
|
+
/** A skill's SKILL.md as the repository has it, for one not downloaded yet. */
|
|
2953
|
+
"skillhub/preview": {
|
|
2954
|
+
capability: SKILLHUB_CAPABILITY,
|
|
2955
|
+
params: ByName,
|
|
2956
|
+
result: external_exports.object({ content: external_exports.string() })
|
|
2957
|
+
},
|
|
2958
|
+
/** Change a downloaded one's SKILL.md (its description and instructions); the next update replaces it like the rest. */
|
|
2959
|
+
"skillhub/save": {
|
|
2960
|
+
capability: SKILLHUB_CAPABILITY,
|
|
2961
|
+
params: ByName.extend({ description: external_exports.string().trim().min(10).max(400), content: external_exports.string().trim().min(20).max(2e4) }),
|
|
2962
|
+
result: external_exports.object({})
|
|
2963
|
+
},
|
|
2756
2964
|
"skillhub/install": {
|
|
2757
2965
|
capability: SKILLHUB_CAPABILITY,
|
|
2758
2966
|
params: ByName.extend({ repo: GitHubRepo.optional() }),
|
|
@@ -2764,6 +2972,16 @@ var SkillHubRequests = {
|
|
|
2764
2972
|
params: ByName,
|
|
2765
2973
|
result: external_exports.object({ state: external_exports.enum(["current", "updated"]), item: HubItem })
|
|
2766
2974
|
},
|
|
2975
|
+
/**
|
|
2976
|
+
* Take one version the repository keeps, forward or back: the current one
|
|
2977
|
+
* (`version`) or one of `history`. One not current is held (no update
|
|
2978
|
+
* offered until another); one of another kind (not a pack then) is refused.
|
|
2979
|
+
*/
|
|
2980
|
+
"skillhub/version": {
|
|
2981
|
+
capability: SKILLHUB_CAPABILITY,
|
|
2982
|
+
params: ByName.extend({ version: external_exports.string().min(1).max(40) }),
|
|
2983
|
+
result: HubItem
|
|
2984
|
+
},
|
|
2767
2985
|
/** Go back to the version the last update replaced. */
|
|
2768
2986
|
"skillhub/rollback": {
|
|
2769
2987
|
capability: SKILLHUB_CAPABILITY,
|
|
@@ -2846,7 +3064,7 @@ var QueuedPrompt = external_exports.object({
|
|
|
2846
3064
|
requestId: external_exports.string().optional(),
|
|
2847
3065
|
text: external_exports.string(),
|
|
2848
3066
|
images: external_exports.number().int().optional(),
|
|
2849
|
-
placement: external_exports.enum(["next-turn", "next-step"])
|
|
3067
|
+
placement: external_exports.enum(["next-turn", "next-step", "taken"])
|
|
2850
3068
|
});
|
|
2851
3069
|
var SessionContext = external_exports.object({
|
|
2852
3070
|
contextWindow: external_exports.number().int().positive(),
|
|
@@ -3684,6 +3902,7 @@ export {
|
|
|
3684
3902
|
ClockTime,
|
|
3685
3903
|
isMarker,
|
|
3686
3904
|
withStartEnd,
|
|
3905
|
+
timetableText,
|
|
3687
3906
|
PowerAction,
|
|
3688
3907
|
Pipeline,
|
|
3689
3908
|
PipelineRun,
|
|
@@ -3692,6 +3911,7 @@ export {
|
|
|
3692
3911
|
AgentTaskRun,
|
|
3693
3912
|
INTERVENE_CAPABILITY,
|
|
3694
3913
|
GAMES_CAPABILITY,
|
|
3914
|
+
GameNotice,
|
|
3695
3915
|
OWN_SOURCE,
|
|
3696
3916
|
SCREEN_SOURCE,
|
|
3697
3917
|
OWN_IMAGE,
|
|
@@ -3731,6 +3951,7 @@ export {
|
|
|
3731
3951
|
MAX_ARCHIVE_DAYS,
|
|
3732
3952
|
ARCHIVE_MARK,
|
|
3733
3953
|
CompactionSettings,
|
|
3954
|
+
SUMMARY_MAX_TOKENS,
|
|
3734
3955
|
MEMORY_CAPABILITY,
|
|
3735
3956
|
SHARED_MEMORY,
|
|
3736
3957
|
MemoryKind,
|
package/lib/emulator.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
EMULATORS_CAPABILITY,
|
|
11
11
|
EmulatorSettings
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NEUZQ7TI.js";
|
|
13
13
|
import {
|
|
14
14
|
external_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6DSSLS7I.js";
|
|
16
16
|
import "./chunk-2UFLGPDY.js";
|
|
17
17
|
|
|
18
18
|
// packages/emulator/lib/index.js
|
package/lib/feishu.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire as __adgCreateRequire } from 'node:module'; import { dirn
|
|
|
2
2
|
import {
|
|
3
3
|
replyMarkdown,
|
|
4
4
|
replyPlain
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-I4NHWXKH.js";
|
|
6
6
|
import {
|
|
7
7
|
require_extension,
|
|
8
8
|
require_permessage_deflate,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
require_subprotocol,
|
|
13
13
|
require_websocket,
|
|
14
14
|
require_websocket_server
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-KTOQFJ7R.js";
|
|
16
|
+
import "./chunk-ICJLH3DP.js";
|
|
17
17
|
import {
|
|
18
18
|
writeFileAtomic
|
|
19
19
|
} from "./chunk-RESS7WVY.js";
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
FEISHU_SECRET_REF,
|
|
23
23
|
FeishuPending,
|
|
24
24
|
FeishuSettings
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NEUZQ7TI.js";
|
|
26
26
|
import {
|
|
27
27
|
external_exports
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6DSSLS7I.js";
|
|
29
29
|
import {
|
|
30
30
|
__commonJS,
|
|
31
31
|
__require,
|