dsh-multigameassistant 2.2.0 → 2.2.2
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 +1 -1
- package/lib/analyzer.js +6 -6
- package/lib/browser.js +5 -1
- package/lib/{chunk-I4NHWXKH.js → chunk-6YPSKAQ5.js} +169 -123
- package/lib/{chunk-J4QJC6UZ.js → chunk-CCYE6H2F.js} +32 -18
- package/lib/{chunk-KTOQFJ7R.js → chunk-DSWWQWQH.js} +423 -26
- package/lib/{chunk-ICJLH3DP.js → chunk-KMVQK5CI.js} +1 -1
- package/lib/{chunk-NEUZQ7TI.js → chunk-LXHF6AKU.js} +91 -16
- package/lib/{chunk-26JIEF6M.js → chunk-RGEGJH6R.js} +1 -1
- package/lib/{chunk-EKTA4OYC.js → chunk-TELJUUBZ.js} +28 -5
- package/lib/emulator.js +1 -1
- package/lib/feishu.js +4 -4
- package/lib/game-intel.js +4363 -365
- package/lib/gateway.js +3 -3
- package/lib/guard.js +1 -1
- package/lib/intervene.js +19 -9
- package/lib/low-context.js +2 -2
- package/lib/monitor.js +20 -3
- package/lib/notify.js +4 -4
- package/lib/orchestrator.js +67 -12
- package/lib/qqbot.js +4 -4
- package/lib/runner.js +3 -3
- package/lib/scheduler.js +1 -1
- package/lib/script-registry.js +6 -6
- package/package.json +1 -1
- package/skills/game-intel.md +4 -3
- package/skills/web-reading.md +51 -19
- package/web/assets/index-DwItOcWq.css +1 -0
- package/web/assets/index-YiJ--jV1.js +255 -0
- package/web/assets/index-YiJ--jV1.js.map +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-C5cMI4PK.css +0 -1
- package/web/assets/index-ClYIoZUR.js +0 -244
- package/web/assets/index-ClYIoZUR.js.map +0 -1
- /package/lib/{chunk-J4QJC6UZ.js.LEGAL.txt → chunk-CCYE6H2F.js.LEGAL.txt} +0 -0
|
@@ -290,7 +290,7 @@ var ReleaseInfo = external_exports.object({
|
|
|
290
290
|
notes: external_exports.string().optional()
|
|
291
291
|
});
|
|
292
292
|
var ScriptJobPhase = external_exports.enum(["queued", "resolving", "downloading", "verifying", "extracting", "checking", "running", "done", "failed", "cancelled"]);
|
|
293
|
-
var SetupAgent = external_exports.object({ sessionId: external_exports.string(), state: external_exports.enum(["running", "failed"]), reason: external_exports.string().optional() });
|
|
293
|
+
var SetupAgent = external_exports.object({ sessionId: external_exports.string(), taskId: external_exports.string().optional(), state: external_exports.enum(["running", "failed"]), reason: external_exports.string().optional() });
|
|
294
294
|
var PendingSetupInfo = external_exports.object({
|
|
295
295
|
scriptId: external_exports.string(),
|
|
296
296
|
name: external_exports.string(),
|
|
@@ -1206,6 +1206,8 @@ var NodeRun = external_exports.object({
|
|
|
1206
1206
|
state: NodeRunState,
|
|
1207
1207
|
/** For people: what it waits for, how it ended. */
|
|
1208
1208
|
detail: external_exports.string().optional(),
|
|
1209
|
+
/** The outcome of an explicitly linked repair after the pipeline ended. */
|
|
1210
|
+
repair: external_exports.object({ runId: external_exports.string(), state: external_exports.enum(["succeeded", "failed", "cancelled"]), at: external_exports.number() }).optional(),
|
|
1209
1211
|
/** Script runs started for this node (retries add more). */
|
|
1210
1212
|
runIds: external_exports.array(external_exports.string()),
|
|
1211
1213
|
attempts: external_exports.number().int().min(0),
|
|
@@ -1512,6 +1514,11 @@ var GameNotice = external_exports.object({
|
|
|
1512
1514
|
/** When it was read. */
|
|
1513
1515
|
at: external_exports.number()
|
|
1514
1516
|
});
|
|
1517
|
+
var NoticeArticle = external_exports.array(external_exports.discriminatedUnion("type", [
|
|
1518
|
+
external_exports.object({ type: external_exports.literal("text"), text: external_exports.string() }),
|
|
1519
|
+
external_exports.object({ type: external_exports.literal("image"), url: external_exports.url({ protocol: /^https$/ }) })
|
|
1520
|
+
]));
|
|
1521
|
+
var GameNoticeDetail = GameNotice.extend({ article: NoticeArticle.optional() });
|
|
1515
1522
|
var Activity = external_exports.object({
|
|
1516
1523
|
/** `<game>/<key>`; the key is the normalised name, so a site and the screen meet on it. */
|
|
1517
1524
|
id: external_exports.string(),
|
|
@@ -1540,6 +1547,7 @@ var Activity = external_exports.object({
|
|
|
1540
1547
|
name: external_exports.string(),
|
|
1541
1548
|
at: external_exports.number(),
|
|
1542
1549
|
web: external_exports.boolean(),
|
|
1550
|
+
url: external_exports.string().optional(),
|
|
1543
1551
|
startsAt: external_exports.number().optional(),
|
|
1544
1552
|
endsAt: external_exports.number().optional(),
|
|
1545
1553
|
shopEndsAt: external_exports.number().optional(),
|
|
@@ -1607,6 +1615,15 @@ var GameSourceInfo = external_exports.object({
|
|
|
1607
1615
|
/** A page the user added on the game page (`games/source/add`); it can be removed there. */
|
|
1608
1616
|
added: external_exports.boolean().optional()
|
|
1609
1617
|
});
|
|
1618
|
+
var GameReading = external_exports.object({
|
|
1619
|
+
state: external_exports.enum(["queued", "running", "done", "partial", "failed", "cancelled"]),
|
|
1620
|
+
at: external_exports.number(),
|
|
1621
|
+
sessionId: external_exports.string().optional(),
|
|
1622
|
+
taskId: external_exports.string().optional(),
|
|
1623
|
+
scope: external_exports.string().optional(),
|
|
1624
|
+
remainingUrls: external_exports.array(external_exports.string()).optional(),
|
|
1625
|
+
summary: external_exports.string().optional()
|
|
1626
|
+
});
|
|
1610
1627
|
var GameInfo = external_exports.object({
|
|
1611
1628
|
id: external_exports.string(),
|
|
1612
1629
|
name: external_exports.string(),
|
|
@@ -1619,6 +1636,8 @@ var GameInfo = external_exports.object({
|
|
|
1619
1636
|
builtin: external_exports.boolean(),
|
|
1620
1637
|
/** The game pack's own picture (https; fetch it with `games/image`). */
|
|
1621
1638
|
art: external_exports.string().optional(),
|
|
1639
|
+
/** The picture the user chose for the banner across the game's page (`own:…`, fetch it with `games/image`); none: the version's art. */
|
|
1640
|
+
banner: external_exports.string().optional(),
|
|
1622
1641
|
/** Followed from the SRA public API without a Game Pack (no scripts, no screen reading): can be unfollowed. */
|
|
1623
1642
|
followed: external_exports.boolean().optional(),
|
|
1624
1643
|
/** The SRA public API's ids its sources read (to match it with the 技能库's packs for the game). */
|
|
@@ -1650,19 +1669,9 @@ var GameInfo = external_exports.object({
|
|
|
1650
1669
|
/** The last data-site refresh. */
|
|
1651
1670
|
refreshed: external_exports.object({ at: external_exports.number(), ok: external_exports.boolean(), count: external_exports.number(), detail: external_exports.string().optional() }).optional(),
|
|
1652
1671
|
/** The last time the agent read the game screen. */
|
|
1653
|
-
reading:
|
|
1654
|
-
state: external_exports.enum(["running", "done", "failed"]),
|
|
1655
|
-
at: external_exports.number(),
|
|
1656
|
-
sessionId: external_exports.string().optional(),
|
|
1657
|
-
summary: external_exports.string().optional()
|
|
1658
|
-
}).optional(),
|
|
1672
|
+
reading: GameReading.optional(),
|
|
1659
1673
|
/** The last time the agent read the web for it (official news, wikis — the sources the plugin cannot read itself). */
|
|
1660
|
-
webReading:
|
|
1661
|
-
state: external_exports.enum(["running", "done", "failed"]),
|
|
1662
|
-
at: external_exports.number(),
|
|
1663
|
-
sessionId: external_exports.string().optional(),
|
|
1664
|
-
summary: external_exports.string().optional()
|
|
1665
|
-
}).optional()
|
|
1674
|
+
webReading: GameReading.optional()
|
|
1666
1675
|
});
|
|
1667
1676
|
var GamesSettings = external_exports.object({
|
|
1668
1677
|
report: external_exports.object({
|
|
@@ -1699,6 +1708,11 @@ var GamesRequests = {
|
|
|
1699
1708
|
params: external_exports.object({}),
|
|
1700
1709
|
result: external_exports.object({ games: external_exports.array(GameInfo), activities: external_exports.array(Activity), notices: external_exports.array(GameNotice).default([]), settings: GamesSettings, report: ReportInfo })
|
|
1701
1710
|
},
|
|
1711
|
+
"games/notice/detail": {
|
|
1712
|
+
capability: GAMES_CAPABILITY,
|
|
1713
|
+
params: external_exports.object({ game: external_exports.string(), noticeId: external_exports.string() }),
|
|
1714
|
+
result: GameNoticeDetail
|
|
1715
|
+
},
|
|
1702
1716
|
/** Read the data sites now (one game, or all). */
|
|
1703
1717
|
"games/refresh": {
|
|
1704
1718
|
capability: GAMES_CAPABILITY,
|
|
@@ -1716,6 +1730,11 @@ var GamesRequests = {
|
|
|
1716
1730
|
params: external_exports.object({ game: external_exports.string(), how: external_exports.enum(["screen", "web"]).optional(), source: external_exports.string().optional() }),
|
|
1717
1731
|
result: external_exports.object({ sessionId: external_exports.string() })
|
|
1718
1732
|
},
|
|
1733
|
+
"games/read/cancel": {
|
|
1734
|
+
capability: GAMES_CAPABILITY,
|
|
1735
|
+
params: external_exports.object({ taskId: external_exports.string() }),
|
|
1736
|
+
result: external_exports.object({ cancelled: external_exports.boolean() })
|
|
1737
|
+
},
|
|
1719
1738
|
"games/report/preview": {
|
|
1720
1739
|
capability: GAMES_CAPABILITY,
|
|
1721
1740
|
params: external_exports.object({}),
|
|
@@ -1841,6 +1860,21 @@ var GamesRequests = {
|
|
|
1841
1860
|
* (kept by the host, it becomes `cover`). A new one needs a `name`; one
|
|
1842
1861
|
* with the same name already in the calendar is that one.
|
|
1843
1862
|
*/
|
|
1863
|
+
/**
|
|
1864
|
+
* The picture across the top of a game's page: one the user picked (`image`,
|
|
1865
|
+
* its bytes; or `path`, a file on the host's computer from a file dialog),
|
|
1866
|
+
* kept under the host's data folder; neither: the version's art again.
|
|
1867
|
+
*/
|
|
1868
|
+
"games/banner/set": {
|
|
1869
|
+
capability: GAMES_CAPABILITY,
|
|
1870
|
+
params: external_exports.object({
|
|
1871
|
+
game: external_exports.string().min(1),
|
|
1872
|
+
image: ActivityImage.optional(),
|
|
1873
|
+
path: external_exports.string().trim().min(1).max(1e3).optional()
|
|
1874
|
+
}).refine((p) => p.image === void 0 || p.path === void 0, "\u56FE\u7247\u548C\u8DEF\u5F84\u53EA\u80FD\u7ED9\u4E00\u4E2A"),
|
|
1875
|
+
/** No `banner`: back to the version's art. */
|
|
1876
|
+
result: external_exports.object({ banner: external_exports.string().optional() })
|
|
1877
|
+
},
|
|
1844
1878
|
"games/activity/save": {
|
|
1845
1879
|
capability: GAMES_CAPABILITY,
|
|
1846
1880
|
params: external_exports.object({
|
|
@@ -2729,13 +2763,35 @@ var TurnEndReason = external_exports.object({
|
|
|
2729
2763
|
kind: external_exports.string(),
|
|
2730
2764
|
message: external_exports.string().optional()
|
|
2731
2765
|
});
|
|
2766
|
+
var FallbackRoute = external_exports.object({
|
|
2767
|
+
provider: external_exports.string(),
|
|
2768
|
+
providerName: external_exports.string(),
|
|
2769
|
+
model: external_exports.string(),
|
|
2770
|
+
modelName: external_exports.string()
|
|
2771
|
+
});
|
|
2772
|
+
var ModelFallbackNotice = external_exports.object({
|
|
2773
|
+
from: FallbackRoute,
|
|
2774
|
+
to: FallbackRoute,
|
|
2775
|
+
/** Why it was switched, in a few words (余额不足, Key 无效, …). */
|
|
2776
|
+
reason: external_exports.string(),
|
|
2777
|
+
/** The model service's own error message. */
|
|
2778
|
+
error: external_exports.string(),
|
|
2779
|
+
/** dsh's failure code (QUOTA, AUTH, HTTP_402, …). */
|
|
2780
|
+
code: external_exports.string(),
|
|
2781
|
+
/** A sub-agent's model (the sub-agent list), else an agent's own conversation (the agent list). */
|
|
2782
|
+
sub: external_exports.boolean().optional()
|
|
2783
|
+
});
|
|
2784
|
+
var MODEL_FALLBACK_SOURCE = "adg-model-fallback";
|
|
2732
2785
|
var MessageOrigin = external_exports.object({
|
|
2733
2786
|
/** Upstream source kind: `user`, `user-rpc`, injected-context producers, goal rounds, ... */
|
|
2734
2787
|
kind: external_exports.string(),
|
|
2735
2788
|
/** True for a direct human prompt; false for injected context. */
|
|
2736
2789
|
human: external_exports.boolean(),
|
|
2737
2790
|
/** One-line account for `notice`-form injected context. */
|
|
2738
|
-
summary: external_exports.string().optional()
|
|
2791
|
+
summary: external_exports.string().optional(),
|
|
2792
|
+
/** A model failed and the agent went on with the next of its fallback list (kind MODEL_FALLBACK_SOURCE). */
|
|
2793
|
+
fallback: ModelFallbackNotice.optional(),
|
|
2794
|
+
childId: external_exports.string().optional()
|
|
2739
2795
|
});
|
|
2740
2796
|
var base = { seq: external_exports.number(), time: external_exports.number() };
|
|
2741
2797
|
var SessionEvent = external_exports.discriminatedUnion("type", [
|
|
@@ -2777,6 +2833,7 @@ var SessionEvent = external_exports.discriminatedUnion("type", [
|
|
|
2777
2833
|
external_exports.object({
|
|
2778
2834
|
...base,
|
|
2779
2835
|
type: external_exports.literal("assistant/attempt"),
|
|
2836
|
+
usage: TokenUsage.optional(),
|
|
2780
2837
|
turn: external_exports.number(),
|
|
2781
2838
|
step: external_exports.number(),
|
|
2782
2839
|
timing: StreamTiming,
|
|
@@ -3087,13 +3144,19 @@ var ModelSelection = external_exports.object({
|
|
|
3087
3144
|
model: external_exports.string(),
|
|
3088
3145
|
reasoningEffort: external_exports.string().optional()
|
|
3089
3146
|
});
|
|
3147
|
+
var ModelFallbacks = external_exports.object({
|
|
3148
|
+
agents: external_exports.array(ModelSelection),
|
|
3149
|
+
subAgents: external_exports.array(ModelSelection)
|
|
3150
|
+
});
|
|
3090
3151
|
var AgentModels = external_exports.object({
|
|
3091
3152
|
/** Role agents' own models, by agent id. */
|
|
3092
3153
|
agents: external_exports.record(external_exports.string(), ModelSelection),
|
|
3093
3154
|
/** Every agent's sub-agents. */
|
|
3094
3155
|
subAgents: ModelSelection.nullable(),
|
|
3095
3156
|
/** One agent's sub-agents, by agent id (`main`: 助手's). */
|
|
3096
|
-
subAgentsOf: external_exports.record(external_exports.string(), ModelSelection)
|
|
3157
|
+
subAgentsOf: external_exports.record(external_exports.string(), ModelSelection),
|
|
3158
|
+
/** The fallback lists; absent from a gateway that has none. */
|
|
3159
|
+
fallbacks: ModelFallbacks.optional()
|
|
3097
3160
|
});
|
|
3098
3161
|
var AGENTS_CAPABILITY = "agents";
|
|
3099
3162
|
var ThreadMessage = external_exports.object({
|
|
@@ -3121,6 +3184,8 @@ var HandOff = external_exports.object({
|
|
|
3121
3184
|
/** The agent it went to (role id) and its conversation. */
|
|
3122
3185
|
to: external_exports.string(),
|
|
3123
3186
|
toSession: external_exports.string(),
|
|
3187
|
+
isolated: external_exports.boolean().optional(),
|
|
3188
|
+
ownerSession: external_exports.string().optional(),
|
|
3124
3189
|
title: external_exports.string(),
|
|
3125
3190
|
task: external_exports.string(),
|
|
3126
3191
|
expecting: external_exports.string().optional(),
|
|
@@ -3449,6 +3514,12 @@ var Requests = {
|
|
|
3449
3514
|
params: external_exports.object({ agentId: external_exports.string().optional(), sub: external_exports.boolean().optional(), model: ModelSelection.nullable() }),
|
|
3450
3515
|
result: external_exports.object({ warning: external_exports.string().optional() })
|
|
3451
3516
|
},
|
|
3517
|
+
/** Set one fallback list (ModelFallbacks): the agents' (`sub` false) or the sub-agents'. Empty: no fallback. */
|
|
3518
|
+
"models/setFallbacks": {
|
|
3519
|
+
capability: "agent-models",
|
|
3520
|
+
params: external_exports.object({ sub: external_exports.boolean(), models: external_exports.array(ModelSelection) }),
|
|
3521
|
+
result: Empty2
|
|
3522
|
+
},
|
|
3452
3523
|
"models/catalog": {
|
|
3453
3524
|
capability: "models",
|
|
3454
3525
|
params: Empty2,
|
|
@@ -3867,6 +3938,8 @@ function parseGitHubLink(text) {
|
|
|
3867
3938
|
var UPDATE_RULE = "\u66F4\u65B0\u811A\u672C\u53EA\u8D70\u5B98\u65B9\u6E20\u9053\uFF1A\u5148\u7528 script_update\uFF08Mirror\u9171 \u6216\u5B98\u65B9\u53D1\u5E03\u5305\uFF0C\u914D\u7F6E\u4F1A\u63A5\u4E0A\uFF09\uFF1B\u5B83\u6CA1\u6709\u66F4\u65B0\u6765\u6E90\u6216\u5931\u8D25\u65F6\uFF0C\u7528\u811A\u672C\u81EA\u5DF1\u7684\u66F4\u65B0\u529F\u80FD\uFF08\u5B83\u7684\u66F4\u65B0\u7A0B\u5E8F\u3001\u542F\u52A8\u5668\u6216\u8BBE\u7F6E\u91CC\u7684\u300C\u68C0\u67E5\u66F4\u65B0\u300D\uFF09\u3002\u4E0D\u8981\u7528 git clone / pull / checkout \u62C9\u4EE3\u7801\uFF0C\u4E0D\u8981\u81EA\u5DF1\u4E0B\u8F7D\u6E90\u7801\u6216\u624B\u52A8\u89E3\u538B\u8986\u76D6\u6587\u4EF6\u2014\u2014\u9664\u975E\u6CA1\u6709\u4EFB\u4F55\u5B98\u65B9\u6E20\u9053\uFF0C\u5E76\u4E14\u7528\u6237\u540C\u610F\u3002";
|
|
3868
3939
|
|
|
3869
3940
|
export {
|
|
3941
|
+
ModelFallbackNotice,
|
|
3942
|
+
MODEL_FALLBACK_SOURCE,
|
|
3870
3943
|
EMULATORS_CAPABILITY,
|
|
3871
3944
|
EmulatorSettings,
|
|
3872
3945
|
SCRIPTS_CAPABILITY,
|
|
@@ -3911,11 +3984,13 @@ export {
|
|
|
3911
3984
|
AgentTaskRun,
|
|
3912
3985
|
INTERVENE_CAPABILITY,
|
|
3913
3986
|
GAMES_CAPABILITY,
|
|
3914
|
-
|
|
3987
|
+
NoticeArticle,
|
|
3988
|
+
GameNoticeDetail,
|
|
3915
3989
|
OWN_SOURCE,
|
|
3916
3990
|
SCREEN_SOURCE,
|
|
3917
3991
|
OWN_IMAGE,
|
|
3918
3992
|
SHOT_IMAGE,
|
|
3993
|
+
GameReading,
|
|
3919
3994
|
GamesSettings,
|
|
3920
3995
|
PERMISSIONS_CAPABILITY,
|
|
3921
3996
|
AreaPolicy,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
guideView,
|
|
5
5
|
renderTask,
|
|
6
6
|
require_dist
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RGEGJH6R.js";
|
|
8
8
|
import {
|
|
9
9
|
RUNS_CAPABILITY,
|
|
10
10
|
ScriptId
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LXHF6AKU.js";
|
|
12
12
|
import {
|
|
13
13
|
external_exports
|
|
14
14
|
} from "./chunk-6DSSLS7I.js";
|
|
@@ -2054,6 +2054,21 @@ var Runner = class {
|
|
|
2054
2054
|
* not restarted unless a person asks for it (`byUser`).
|
|
2055
2055
|
* @throws Error when the task cannot start again (e.g. its resources are busy).
|
|
2056
2056
|
*/
|
|
2057
|
+
async repair(runId, scriptId, taskId) {
|
|
2058
|
+
const original = this.#run(runId);
|
|
2059
|
+
if (original.info.scriptId !== scriptId || original.info.taskId !== taskId)
|
|
2060
|
+
throw new Error("\u8865\u507F\u76EE\u6807\u4E0E\u539F\u8FD0\u884C\u7684\u811A\u672C\u6216\u4EFB\u52A1\u4E0D\u4E00\u81F4");
|
|
2061
|
+
if (original.info.endedAt === void 0 || original.info.state === "succeeded")
|
|
2062
|
+
throw new Error("\u53EA\u80FD\u8865\u507F\u5DF2\u7ED3\u675F\u4E14\u672A\u6210\u529F\u7684\u8FD0\u884C");
|
|
2063
|
+
const pending = this.#successors.get(runId);
|
|
2064
|
+
if (pending) {
|
|
2065
|
+
const successor = await pending;
|
|
2066
|
+
if (successor)
|
|
2067
|
+
return successor;
|
|
2068
|
+
throw new Error("\u5148\u524D\u7684\u8865\u507F\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C\u8BB0\u5F55\u540E\u91CD\u8BD5");
|
|
2069
|
+
}
|
|
2070
|
+
return this.restart(runId, "\u9488\u5BF9\u539F\u8FD0\u884C\u7684\u8865\u507F");
|
|
2071
|
+
}
|
|
2057
2072
|
async restart(runId, reason, options = {}) {
|
|
2058
2073
|
const run = this.#run(runId);
|
|
2059
2074
|
if (run.mode !== "task")
|
|
@@ -2072,7 +2087,12 @@ var Runner = class {
|
|
|
2072
2087
|
throw new Error("\u8FD9\u6B21\u8FD0\u884C\u5DF2\u7ECF\u88AB\u505C\u6B62\u4E86\uFF0C\u4E0D\u518D\u91CD\u65B0\u8FD0\u884C");
|
|
2073
2088
|
return this.start(run.info.scriptId, run.info.taskId, run.info.params, { retryOf: runId, profile: run.info.profile, signal: abort.signal });
|
|
2074
2089
|
})();
|
|
2075
|
-
|
|
2090
|
+
const successor = next.catch(() => {
|
|
2091
|
+
if (this.#successors.get(runId) === successor)
|
|
2092
|
+
this.#successors.delete(runId);
|
|
2093
|
+
return void 0;
|
|
2094
|
+
});
|
|
2095
|
+
this.#successors.set(runId, successor);
|
|
2076
2096
|
return next;
|
|
2077
2097
|
}
|
|
2078
2098
|
/**
|
|
@@ -2722,6 +2742,7 @@ function runnerTools(runner, config) {
|
|
|
2722
2742
|
task: { type: "string", description: "\u4EFB\u52A1 id\uFF08script_tasks \u53EF\u67E5\uFF09\u3002" },
|
|
2723
2743
|
params: { ...PARAMS_SCHEMA, description: '\u4EFB\u52A1\u53C2\u6570\uFF0C\u4F8B\u5982 [{"name":"stage","value":"1-7"}]\uFF1B\u7701\u7565\u7684\u53C2\u6570\u7528\u9ED8\u8BA4\u503C\u3002' },
|
|
2724
2744
|
wait: { type: "boolean", description: "\u7B49\u8FD0\u884C\u7ED3\u675F\u518D\u8FD4\u56DE\uFF08\u6700\u957F 3 \u5C0F\u65F6\uFF09\u3002" },
|
|
2745
|
+
repair_of: { type: "string", description: "\u8865\u507F\u67D0\u4E2A\u5DF2\u5931\u8D25\u7684\u8FD0\u884C\u65F6\uFF0C\u4F20\u5B83\u7684 run_id\u3002\u6CBF\u7528\u539F\u53C2\u6570\u548C\u914D\u7F6E\uFF0C\u91CD\u590D\u8BF7\u6C42\u8FD4\u56DE\u540C\u4E00\u8865\u507F\u3002" },
|
|
2725
2746
|
profile: { ...profile, description: "\u7528\u54EA\u4EFD\u914D\u7F6E\u8FD0\u884C\uFF08script_profiles \u53EF\u67E5\uFF09\uFF1B\u4E0D\u586B\u5C31\u662F\u5F53\u524D\u90A3\u4EFD\u3002\u7528\u6237\u8BF4\u300C\u7528\u5C0F\u53F7\u7684\u914D\u7F6E\u300D\u4E4B\u7C7B\u65F6\u586B\u3002" }
|
|
2726
2747
|
},
|
|
2727
2748
|
required: ["id", "task"],
|
|
@@ -2729,9 +2750,11 @@ function runnerTools(runner, config) {
|
|
|
2729
2750
|
kind: "execute",
|
|
2730
2751
|
title: (a) => `\u8FD0\u884C\uFF1A${String(a["id"] ?? "")} / ${String(a["task"] ?? "")}`,
|
|
2731
2752
|
execute: async (args, exec) => {
|
|
2732
|
-
const a = parse(external_exports.object({ id: ScriptId, task: external_exports.string().min(1).max(64), params: external_exports.array(external_exports.object({ name: external_exports.string().min(1), value: external_exports.string() })).max(40).nullish(), wait: external_exports.boolean().nullish(), profile: Profile }), args);
|
|
2753
|
+
const a = parse(external_exports.object({ id: ScriptId, task: external_exports.string().min(1).max(64), params: external_exports.array(external_exports.object({ name: external_exports.string().min(1), value: external_exports.string() })).max(40).nullish(), wait: external_exports.boolean().nullish(), repair_of: external_exports.string().min(1).nullish(), profile: Profile }), args);
|
|
2733
2754
|
const spec = config.library.packOf(a.id)?.manifest.tasks.find((t) => t.id === a.task)?.params ?? {};
|
|
2734
|
-
|
|
2755
|
+
if (a.repair_of && (a.params?.length || a.profile))
|
|
2756
|
+
throw new Error("\u8865\u507F\u6CBF\u7528\u539F\u8FD0\u884C\u7684\u53C2\u6570\u548C\u914D\u7F6E");
|
|
2757
|
+
const started = a.repair_of ? await runner.repair(a.repair_of, a.id, a.task) : await runner.start(a.id, a.task, taskParams(a.params, spec), { profile: ref(a.profile) });
|
|
2735
2758
|
if (a.wait !== true || started.endedAt !== void 0)
|
|
2736
2759
|
return brief(runner, started.id);
|
|
2737
2760
|
const onAbort = () => void runner.stop(started.id);
|
package/lib/emulator.js
CHANGED
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-6YPSKAQ5.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-DSWWQWQH.js";
|
|
16
|
+
import "./chunk-KMVQK5CI.js";
|
|
17
17
|
import {
|
|
18
18
|
writeFileAtomic
|
|
19
19
|
} from "./chunk-RESS7WVY.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
FEISHU_SECRET_REF,
|
|
23
23
|
FeishuPending,
|
|
24
24
|
FeishuSettings
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LXHF6AKU.js";
|
|
26
26
|
import {
|
|
27
27
|
external_exports
|
|
28
28
|
} from "./chunk-6DSSLS7I.js";
|