dsh-multigameassistant 2.2.2 → 2.3.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 CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-multigameassistant 2.2.2
1
+ # dsh-multigameassistant 2.3.0
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.
@@ -51,9 +51,13 @@
51
51
  - id: adg-analyzer
52
52
  name: 'dsh-multigameassistant/analyzer'
53
53
 
54
- # M2: the agent may not change script files without the user's grant.
54
+ # M2: the agent may not change script files without the user's grant, nor the
55
+ # app's own program, data and settings at all (dsh's profiles: its plugins, this guard).
55
56
  - id: adg-guard
56
57
  name: 'dsh-multigameassistant/guard'
58
+ config:
59
+ settingsDirs:
60
+ - !!js "dshHomePath('profiles')"
57
61
 
58
62
  # M3: incidents while scripts run (error rules, failures, stalls,
59
63
  # overtime), L0 recovery from the pack, screenshots; the `monitor` capability.
package/lib/analyzer.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  discoverMcp,
4
4
  discoverSkills,
5
5
  mcpEndpoints
6
- } from "./chunk-CCYE6H2F.js";
6
+ } from "./chunk-AJMAUHPI.js";
7
7
  import {
8
8
  probeProject
9
9
  } from "./chunk-B4UT4NYH.js";
@@ -11,20 +11,24 @@ import {
11
11
  MANIFEST_FILE,
12
12
  SKILL_FILE,
13
13
  guideIssues,
14
+ isScriptLauncher,
15
+ launchCommand,
14
16
  parseJsonc,
15
17
  parseManifest,
18
+ patternIssues,
16
19
  require_dist,
20
+ strayKeys,
17
21
  stripJsonc
18
- } from "./chunk-RGEGJH6R.js";
19
- import "./chunk-6YPSKAQ5.js";
20
- import "./chunk-DSWWQWQH.js";
21
- import "./chunk-KMVQK5CI.js";
22
+ } from "./chunk-TXW3NMBH.js";
23
+ import "./chunk-VG32XPZH.js";
24
+ import "./chunk-VBWSM7LF.js";
25
+ import "./chunk-Y3ZZBBLV.js";
22
26
  import "./chunk-RESS7WVY.js";
23
27
  import {
24
28
  BUILTIN_PACK_VERSION,
25
29
  PACKS_CAPABILITY,
26
30
  ScriptId
27
- } from "./chunk-LXHF6AKU.js";
31
+ } from "./chunk-7EFZ5KR6.js";
28
32
  import {
29
33
  external_exports
30
34
  } from "./chunk-6DSSLS7I.js";
@@ -475,6 +479,33 @@ var AdgAnalyzer = class extends Service {
475
479
  return problem;
476
480
  }
477
481
  };
482
+ const android = async (scriptId, manifest) => {
483
+ if (!manifest.tasks.some((t) => t.resources.input === "adb"))
484
+ return void 0;
485
+ const runner = ctx.get("adgRunner")?.runner;
486
+ const emulators = ctx.get("adgEmulators");
487
+ if (runner === void 0 || emulators?.findApps === void 0)
488
+ return void 0;
489
+ const game = manifest.game;
490
+ const names = game?.name === void 0 ? [] : [game.name];
491
+ const packages = game?.android?.package === void 0 ? [] : [{ package: game.android.package, source: "\u811A\u672C\u5305\u5199\u7684\u5305\u540D" }];
492
+ if (names.length === 0 && packages.length === 0)
493
+ return { note: "\u811A\u672C\u5305\u6CA1\u5199 game.name\uFF0C\u67E5\u4E0D\u4E86\u6A21\u62DF\u5668\u91CC\u88C5\u7684\u662F\u54EA\u4E2A\u6E38\u620F" };
494
+ let found;
495
+ try {
496
+ found = await emulators.findApps({ packages, names }, AbortSignal.timeout(12e4), void 0, { start: false });
497
+ } catch (error) {
498
+ return { note: `\u6CA1\u67E5\u6A21\u62DF\u5668\u91CC\u7684\u6E38\u620F\uFF08${error instanceof Error ? error.message : String(error)}\uFF09\uFF1B\u6A21\u62DF\u5668\u5F00\u7740\u65F6\u7528 emulator_apps \u67E5` };
499
+ }
500
+ const candidates = found.candidates.map((c) => ({ package: c.package, ...c.label === void 0 ? {} : { label: c.label }, ...c.client === void 0 ? {} : { client: c.client }, reason: c.reason }));
501
+ const saved = (await runner.launch.get(scriptId)).androidPackage;
502
+ const only = found.candidates.length === 1 && found.candidates[0].score >= 80 ? found.candidates[0] : void 0;
503
+ if (saved === void 0 && only !== void 0 && only.package !== game?.android?.package) {
504
+ await runner.launch.set(scriptId, { androidPackage: only.package });
505
+ return { device: found.device, candidates, saved_for_script: only.package };
506
+ }
507
+ return { device: found.device, candidates, ...saved === void 0 ? {} : { script_has: saved } };
508
+ };
478
509
  ctx.inject(["skills", "adgGateway"], (scoped) => {
479
510
  let disposers = [];
480
511
  const register = async () => {
@@ -521,7 +552,7 @@ var AdgAnalyzer = class extends Service {
521
552
  };
522
553
  ctx.inject(["adgGateway"], (gateway) => gateway.adgGateway.agentPart("adg-analyzer tools", (agent) => {
523
554
  const registered = [];
524
- for (const tool of analyzerTools({ library, drafts, approve, ready: scripts.ready, changed, use }))
555
+ for (const tool of analyzerTools({ library, drafts, approve, ready: scripts.ready, changed, use, android }))
525
556
  registered.push(agent.tools.register({ ...tool, execute: async (args, exec) => {
526
557
  await ctx.get("adgGateway")?.guardTool(exec);
527
558
  return tool.execute(args, exec);
@@ -616,6 +647,21 @@ var AdgAnalyzer = class extends Service {
616
647
  };
617
648
  }
618
649
  };
650
+ function androidNext(manifest, check) {
651
+ if (check === void 0)
652
+ return "";
653
+ const own = manifest.game?.android?.package;
654
+ const list = (check.candidates ?? []).map((c) => `${c.label ?? c.package}${c.client === void 0 ? "" : `\uFF08${c.client}\uFF09`} ${c.package}`).join("\u3001");
655
+ const parts = [];
656
+ if (own === void 0) {
657
+ parts.push(list === "" ? `\u8FD9\u4E2A\u811A\u672C\u6709\u6A21\u62DF\u5668\u4EFB\u52A1\uFF0C\u4F46 game.android.package \u6CA1\u5199\uFF1A${check.note ?? "\u6A21\u62DF\u5668\u91CC\u6CA1\u627E\u5230\u8FD9\u4E2A\u6E38\u620F"}\u3002\u67E5\u5230\u5305\u540D\u540E\u5199\u8FDB game.android.package\uFF08\u5199\u5B98\u670D\u7684\uFF09\uFF0C\u518D pack_propose \u4E00\u6B21` : `\u8FD9\u4E2A\u811A\u672C\u6709\u6A21\u62DF\u5668\u4EFB\u52A1\uFF0C\u4F46 game.android.package \u6CA1\u5199\uFF1A\u6A21\u62DF\u5668\u91CC\u88C5\u7684\u662F ${list}\u3002\u628A\u5B98\u670D\u7684\u5305\u540D\u5199\u8FDB game.android.package\uFF08\u53EA\u88C5\u4E86\u6E20\u9053\u670D\u65F6\u5199\u5B83\u672C\u8EAB\uFF09\uFF0C\u518D pack_propose \u4E00\u6B21`);
658
+ }
659
+ if (check.saved_for_script !== void 0)
660
+ parts.push(`\u5DF2\u628A\u6A21\u62DF\u5668\u91CC\u88C5\u7684 ${check.saved_for_script} \u5B58\u4E3A\u8FD9\u4E2A\u811A\u672C\u7684\u6E38\u620F\u5305\u540D\uFF08\u811A\u672C\u9875\u300C\u542F\u52A8\u6E38\u620F\u300D\u91CC\u80FD\u770B\u5230\uFF09\uFF0C\u544A\u8BC9\u7528\u6237`);
661
+ else if ((check.candidates?.length ?? 0) > 1 && check.script_has === void 0)
662
+ parts.push(`\u6A21\u62DF\u5668\u91CC\u88C5\u4E86\u597D\u51E0\u4E2A\u7248\u672C\uFF08${list}\uFF09\uFF1A\u95EE\u7528\u6237\u73A9\u54EA\u4E2A\uFF0C\u7528 game_path_set \u7684 android_package \u5B58\u7ED9\u8FD9\u4E2A\u811A\u672C`);
663
+ return parts.length === 0 ? "" : `${parts.join("\uFF1B")}\u3002`;
664
+ }
619
665
  function analyzerTools(deps) {
620
666
  const json = (value) => JSON.parse(JSON.stringify(value ?? null));
621
667
  const parse = (schema, args) => {
@@ -678,11 +724,11 @@ function analyzerTools(deps) {
678
724
  }),
679
725
  tool({
680
726
  name: "script_help",
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",
727
+ 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.bat / .cmd / .ps1 \u542F\u52A8\u5668\u591A\u534A\u4E0D\u8BA4 --help\u3001\u4F1A\u76F4\u63A5\u5F00\u59CB\u8DD1\u4EFB\u52A1\uFF1A\u5148\u7528\u8BFB\u6587\u4EF6\u5DE5\u5177\u770B\u5B83\u91CC\u9762\u8C03\u7528\u7684\u771F\u6B63\u7A0B\u5E8F\u548C\u53C2\u6570\uFF08\u4F8B\u5982 runtime\\python.exe main.py\uFF09\uFF0C\u518D\u7528 exe \u548C args \u76F4\u63A5\u95EE\u90A3\u4E2A\u7A0B\u5E8F\u3002",
682
728
  properties: {
683
729
  id,
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" },
685
- args: { type: "array", items: { type: "string" }, description: '\u53C2\u6570\uFF0C\u9ED8\u8BA4 ["--help"]\uFF1B\u4E5F\u53EF\u4EE5\u662F ["-h"]\u3001["-l"]\u3001["--list-workflows"]\u3002' }
730
+ exe: { type: "string", description: "\u8981\u8FD0\u884C\u7684\u7A0B\u5E8F\uFF08\u76F8\u5BF9\u811A\u672C\u76EE\u5F55\uFF09\uFF0C\u4F8B\u5982 runtime\\node.exe \u6216 python\\python.exe\uFF1B\u7701\u7565\u65F6\u7528\u811A\u672C\u5305\u7684\u542F\u52A8\u7A0B\u5E8F\uFF0C\u6216\u627E\u5230\u7684\u7B2C\u4E00\u4E2A\u7A0B\u5E8F\uFF08.exe \u4F18\u5148\u4E8E .bat\uFF09\u3002" },
731
+ args: { type: "array", items: { type: "string" }, description: '\u53C2\u6570\uFF0C\u9ED8\u8BA4 ["--help"]\uFF1B\u4E5F\u53EF\u4EE5\u662F ["-h"]\u3001["-l"]\u3001["--list-workflows"]\uFF1Bexe \u662F\u89E3\u91CA\u5668\u65F6\u5148\u5199\u5165\u53E3\u6587\u4EF6\uFF0C\u4F8B\u5982 ["main.py", "--help"]\u3002' }
686
732
  },
687
733
  required: ["id"],
688
734
  kind: "execute",
@@ -694,14 +740,16 @@ function analyzerTools(deps) {
694
740
  if (script.dir === void 0)
695
741
  throw new Error(`${script.name} \u8FD8\u6CA1\u6709\u5B89\u88C5`);
696
742
  const pack = deps.library.packOf(a.id);
697
- const exe = a.exe ?? pack?.manifest.launch?.exe ?? script.probe?.executables[0];
743
+ const found = script.probe?.executables ?? [];
744
+ const exe = a.exe ?? pack?.manifest.launch?.exe ?? found.find((e) => !isScriptLauncher(e)) ?? found[0];
698
745
  if (exe === void 0)
699
746
  throw new Error("\u6CA1\u6709\u627E\u5230\u53EF\u6267\u884C\u6587\u4EF6\uFF0C\u8BF7\u7528 exe \u53C2\u6570\u6307\u5B9A");
700
747
  if (exe.split(/[\\/]/).includes("..") || /^([A-Za-z]:|[\\/])/.test(exe))
701
748
  throw new Error("exe \u5FC5\u987B\u662F\u811A\u672C\u76EE\u5F55\u91CC\u7684\u76F8\u5BF9\u8DEF\u5F84");
702
749
  const helpArgs = a.args ?? ["--help"];
750
+ const launcher = isScriptLauncher(exe) ? `\uFF1B${exe} \u662F\u6279\u5904\u7406\u542F\u52A8\u5668\uFF0C\u5B83\u53EF\u80FD\u4E0D\u8BA4\u8FD9\u4E9B\u53C2\u6570\u3001\u76F4\u63A5\u5F00\u59CB\u8DD1\u4EFB\u52A1` : "";
703
751
  if (pack?.builtin !== true)
704
- await deps.approve(exec, `\u4E3A\u4E86\u5206\u6790 ${script.name}\uFF0C\u8FD0\u884C ${exe} ${helpArgs.join(" ")}\uFF08\u6700\u591A 20 \u79D2\uFF0C\u53EA\u770B\u5B83\u7684\u5E2E\u52A9\u8F93\u51FA\uFF09`);
752
+ await deps.approve(exec, `\u4E3A\u4E86\u5206\u6790 ${script.name}\uFF0C\u8FD0\u884C ${exe} ${helpArgs.join(" ")}\uFF08\u6700\u591A 20 \u79D2\uFF0C\u53EA\u770B\u5B83\u7684\u5E2E\u52A9\u8F93\u51FA${launcher}\uFF09`);
705
753
  return runHelp(join4(script.dir, exe), helpArgs, script.dir);
706
754
  }
707
755
  }),
@@ -773,12 +821,25 @@ function analyzerTools(deps) {
773
821
  deps.library.get(a.script_id);
774
822
  const manifest = parseManifest(a.manifest, `${a.pack_id}/${MANIFEST_FILE}`);
775
823
  const issues = guideIssues(manifest);
824
+ const strays = strayKeys(a.manifest);
825
+ if (strays.length > 0)
826
+ issues.push(`\u8FD9\u4E9B\u4E0D\u662F\u811A\u672C\u5305\u7684\u5B57\u6BB5\uFF0C\u4FDD\u5B58\u65F6\u4F1A\u88AB\u4E22\u6389\uFF1A${strays.join("\u3001")}\uFF08\u5E38\u89C1\u95EE\u9898\u5199\u5728 guide.troubleshooting \u4E0B\uFF1B\u65E5\u5E38\u5468\u5E38\u7684\u65E5\u5FD7\u5199 routines[].log\uFF09`);
827
+ issues.push(...patternIssues(manifest));
828
+ let previous;
829
+ try {
830
+ previous = deps.library.pack(a.pack_id)?.manifest;
831
+ } catch {
832
+ previous = void 0;
833
+ }
834
+ const lost = (previous?.routines ?? []).filter((r) => !manifest.routines.some((n) => n.id === r.id));
835
+ if (lost.length > 0)
836
+ issues.push(`\u539F\u6765\u7684\u811A\u672C\u5305\u6709\u65E5\u5E38\u5468\u5E38\uFF08routines\uFF09\uFF1A${lost.map((r) => `${r.name}\uFF08${r.id}\uFF09`).join("\u3001")}\uFF0C\u65B0\u7684\u91CC\u6CA1\u6709\u3002\u6E38\u620F\u9875\u9760\u5B83\u4EEC\u81EA\u52A8\u52FE\u9009\uFF0C\u7167\u539F\u6837\u4FDD\u7559\uFF08log \u6362\u6210\u8FD0\u884C\u65E5\u5FD7\u91CC\u771F\u5B9E\u7684\u539F\u6587\u66F4\u597D\uFF09`);
776
837
  const dir = deps.library.get(a.script_id).dir;
777
838
  if (manifest.mcp === void 0 && dir !== void 0 && (await discoverMcp(dir)).some((e) => e.disabled !== true)) {
778
839
  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
840
  }
780
841
  if (issues.length > 0)
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
842
+ throw new Error(`\u811A\u672C\u5305\u8FD8\u8981\u6539\uFF08\u4F7F\u7528\u8BF4\u660E\u6309 script-analysis \u6280\u80FD\u300C\u4F7F\u7528\u8BF4\u660E\u300D\u4E00\u8282\uFF09\uFF1A
782
843
  - ${issues.join("\n- ")}`);
783
844
  const saved = await deps.drafts.save({
784
845
  packId: a.pack_id,
@@ -791,6 +852,7 @@ function analyzerTools(deps) {
791
852
  }, a.manifest, a.skill);
792
853
  const problem = await deps.use(a.pack_id, a.script_id);
793
854
  deps.changed(a.pack_id);
855
+ const android = problem === void 0 ? await deps.android?.(a.script_id, manifest).catch(() => void 0) : void 0;
794
856
  return {
795
857
  ok: true,
796
858
  pack_id: a.pack_id,
@@ -798,7 +860,8 @@ function analyzerTools(deps) {
798
860
  in_use: problem === void 0,
799
861
  replaced: saved.replaced,
800
862
  ...problem === void 0 ? {} : { problem },
801
- next: problem === void 0 ? `\u811A\u672C\u5305\u5DF2\u7ECF\u4FDD\u5B58\u5E76\u751F\u6548${saved.replaced ? "\uFF08\u4E4B\u524D\u7684\u7248\u672C\u7559\u5728\u5386\u53F2\u91CC\uFF09" : ""}\uFF0C\u4E0D\u7528\u7528\u6237\u786E\u8BA4\u3002\u56DE\u590D\u91CC\u544A\u8BC9\u7528\u6237\u6539\u4E86\u4EC0\u4E48\u3001\u4F9D\u636E\u4E86\u54EA\u4E9B\u6587\u6863\u3001\u54EA\u4E9B\u8FD8\u5F85\u786E\u8BA4\u3002` : `\u811A\u672C\u5305\u5DF2\u7ECF\u4FDD\u5B58\uFF0C\u4F46\u6CA1\u80FD\u63A5\u5230\u811A\u672C ${a.script_id} \u4E0A\uFF1A${problem}\u3002\u628A\u8FD9\u4E2A\u539F\u56E0\u544A\u8BC9\u7528\u6237\u3002`
863
+ ...android === void 0 ? {} : { android },
864
+ next: problem === void 0 ? `\u811A\u672C\u5305\u5DF2\u7ECF\u4FDD\u5B58\u5E76\u751F\u6548${saved.replaced ? "\uFF08\u4E4B\u524D\u7684\u7248\u672C\u7559\u5728\u5386\u53F2\u91CC\uFF09" : ""}\uFF0C\u4E0D\u7528\u7528\u6237\u786E\u8BA4\u3002${androidNext(manifest, android)}\u56DE\u590D\u91CC\u544A\u8BC9\u7528\u6237\u6539\u4E86\u4EC0\u4E48\u3001\u4F9D\u636E\u4E86\u54EA\u4E9B\u6587\u6863\u3001\u54EA\u4E9B\u8FD8\u5F85\u786E\u8BA4\u3002` : `\u811A\u672C\u5305\u5DF2\u7ECF\u4FDD\u5B58\uFF0C\u4F46\u6CA1\u80FD\u63A5\u5230\u811A\u672C ${a.script_id} \u4E0A\uFF1A${problem}\u3002\u628A\u8FD9\u4E2A\u539F\u56E0\u544A\u8BC9\u7528\u6237\u3002`
802
865
  };
803
866
  }
804
867
  })
@@ -806,7 +869,8 @@ function analyzerTools(deps) {
806
869
  }
807
870
  function runHelp(file, args, cwd) {
808
871
  return new Promise((resolve) => {
809
- execFile(file, [...args], { cwd, windowsHide: true, timeout: 2e4, maxBuffer: 4 * 1024 * 1024, encoding: "buffer" }, (error, stdout, stderr) => {
872
+ const command = launchCommand(file, args, process.platform, process.env["ComSpec"]);
873
+ execFile(command.file, [...command.args], { cwd, windowsHide: true, timeout: 2e4, maxBuffer: 4 * 1024 * 1024, encoding: "buffer", windowsVerbatimArguments: command.verbatim }, (error, stdout, stderr) => {
810
874
  const raw = Buffer.concat([stdout, stderr]);
811
875
  let output = new TextDecoder("utf-8").decode(raw);
812
876
  if ((output.match(/�/g)?.length ?? 0) > 5)
@@ -822,6 +886,7 @@ export {
822
886
  AdgAnalyzer,
823
887
  DraftStore,
824
888
  analyzeDir,
889
+ androidNext,
825
890
  lib_default as default,
826
891
  parseJsonc,
827
892
  parseSkill,
@@ -23,6 +23,19 @@ var EmulatorProvider = external_exports.object({
23
23
  instances: external_exports.array(EmulatorInstance),
24
24
  error: external_exports.string().optional()
25
25
  });
26
+ var AndroidAppCandidate = external_exports.object({
27
+ package: external_exports.string(),
28
+ /** The app's own name, from its APK. */
29
+ label: external_exports.string().optional(),
30
+ /** Which build: 官服, B服, 国际服… when known. */
31
+ client: external_exports.string().optional(),
32
+ /** Why it is taken for the game, for people. */
33
+ reason: external_exports.string(),
34
+ /** 100: a package the game is known by; 85/80: another build of one; 90/70: by the app's name. */
35
+ score: external_exports.number(),
36
+ /** The app's launcher icon (PNG, WebP, or an SVG of an adaptive icon's layers). */
37
+ icon: external_exports.object({ mediaType: external_exports.string(), data: external_exports.string() }).optional()
38
+ });
26
39
  var EmulatorSettings = external_exports.object({
27
40
  /** MuMuManager.exe chosen by the user; otherwise found automatically. */
28
41
  mumuManager: external_exports.string().optional(),
@@ -1624,6 +1637,34 @@ var GameReading = external_exports.object({
1624
1637
  remainingUrls: external_exports.array(external_exports.string()).optional(),
1625
1638
  summary: external_exports.string().optional()
1626
1639
  });
1640
+ var GameRoutine = external_exports.object({
1641
+ id: external_exports.string(),
1642
+ name: external_exports.string(),
1643
+ period: external_exports.enum(["daily", "weekly", "event"]),
1644
+ description: external_exports.string().optional(),
1645
+ /** Where it comes from: `game` the game pack, `script:<id>` a script pack, `own` the user. */
1646
+ from: external_exports.string(),
1647
+ /** How it gets ticked off by itself, for people ("MAA 日志「完成任务: 基建换班」"); none: only by hand. */
1648
+ links: external_exports.array(external_exports.string()),
1649
+ /** Done in the current period: when, and what showed it. */
1650
+ done: external_exports.object({
1651
+ at: external_exports.number(),
1652
+ /**
1653
+ * `log` a script's log line, `task` a task that succeeded (both also found
1654
+ * afterwards in the period's saved runs), `agent` an agent with what it saw
1655
+ * (game_routine), `user` the person on the game page.
1656
+ */
1657
+ by: external_exports.enum(["log", "task", "agent", "user"]),
1658
+ /** The log line, the task's title, or what the agent saw. */
1659
+ detail: external_exports.string().optional(),
1660
+ script: external_exports.string().optional(),
1661
+ runId: external_exports.string().optional()
1662
+ }).optional(),
1663
+ /** When the current period ends (the next reset, or the event's end). */
1664
+ resetsAt: external_exports.number().optional(),
1665
+ /** period=event: its events on the calendar now (activity ids), the running one first. */
1666
+ activities: external_exports.array(external_exports.string()).optional()
1667
+ });
1627
1668
  var GameInfo = external_exports.object({
1628
1669
  id: external_exports.string(),
1629
1670
  name: external_exports.string(),
@@ -1666,6 +1707,12 @@ var GameInfo = external_exports.object({
1666
1707
  cover: external_exports.string().optional(),
1667
1708
  up: external_exports.array(external_exports.string())
1668
1709
  })).optional(),
1710
+ /** Its 日常 / 周常 and recurring events, with what is done in the current period. */
1711
+ routines: external_exports.array(GameRoutine).optional(),
1712
+ /** Routines from packs the user took off the page. */
1713
+ hiddenRoutines: external_exports.number().optional(),
1714
+ /** When its day and week start over (epoch ms of the next reset). */
1715
+ resets: external_exports.object({ daily: external_exports.number(), weekly: external_exports.number() }).optional(),
1669
1716
  /** The last data-site refresh. */
1670
1717
  refreshed: external_exports.object({ at: external_exports.number(), ok: external_exports.boolean(), count: external_exports.number(), detail: external_exports.string().optional() }).optional(),
1671
1718
  /** The last time the agent read the game screen. */
@@ -1769,13 +1816,38 @@ var GamesRequests = {
1769
1816
  },
1770
1817
  /**
1771
1818
  * The game program's own icon (its .exe, as Explorer shows it), for the game's avatar: the program a script that plays
1772
- * it starts (启动游戏), else where 自动查找 finds it. No `icon`: no PC program known (a phone game), or not on Windows.
1819
+ * it starts (启动游戏), else where 自动查找 finds it; else (first, for a game played in the emulator) its app's icon in the
1820
+ * emulator, as read from the APK there (games/android/locate, or now when the emulator is up). No `icon`: neither is known.
1773
1821
  */
1774
1822
  "games/icon": {
1775
1823
  capability: GAMES_CAPABILITY,
1776
1824
  params: external_exports.object({ game: external_exports.string().min(1) }),
1777
1825
  result: external_exports.object({ icon: external_exports.object({ mediaType: external_exports.string(), data: external_exports.string() }).optional() })
1778
1826
  },
1827
+ /**
1828
+ * Which app in the emulator is the game a script plays (启动游戏 on the script
1829
+ * page): its installed apps matched against the game's known packages (one
1830
+ * per client, like MAA's 客户端类型), other builds of them, and the apps' own
1831
+ * names. Starts the emulator the script's tasks use when it is not running.
1832
+ * The icons found are kept for the game's avatar.
1833
+ */
1834
+ "games/android/locate": {
1835
+ capability: GAMES_CAPABILITY,
1836
+ params: external_exports.object({ scriptId: external_exports.string().min(1) }),
1837
+ result: external_exports.object({
1838
+ /** The emulator looked in, for people. */
1839
+ device: external_exports.string(),
1840
+ /** Third-party apps installed there. */
1841
+ installed: external_exports.number().int(),
1842
+ candidates: external_exports.array(AndroidAppCandidate)
1843
+ })
1844
+ },
1845
+ /** A saved Android package's name and icon (as last read from the emulator), for the script page; none when never read. */
1846
+ "games/android/app": {
1847
+ capability: GAMES_CAPABILITY,
1848
+ params: external_exports.object({ package: external_exports.string().min(1) }),
1849
+ result: external_exports.object({ label: external_exports.string().optional(), icon: external_exports.object({ mediaType: external_exports.string(), data: external_exports.string() }).optional() })
1850
+ },
1779
1851
  /**
1780
1852
  * Put a game on the game page by its name, whatever is known about it: one
1781
1853
  * already there (or taken off it) is shown; one the SRA public API knows is
@@ -1841,6 +1913,24 @@ var GamesRequests = {
1841
1913
  params: external_exports.object({ sra: external_exports.string(), follow: external_exports.boolean() }),
1842
1914
  result: external_exports.object({})
1843
1915
  },
1916
+ /** Tick a 日常 / 周常 off for the current period, or take it back. */
1917
+ "games/routine/set": {
1918
+ capability: GAMES_CAPABILITY,
1919
+ params: external_exports.object({ game: external_exports.string(), routine: external_exports.string(), done: external_exports.boolean() }),
1920
+ result: external_exports.object({})
1921
+ },
1922
+ /** A 日常 / 周常 of the user's own, ticked by hand. */
1923
+ "games/routine/add": {
1924
+ capability: GAMES_CAPABILITY,
1925
+ params: external_exports.object({ game: external_exports.string(), name: external_exports.string().trim().min(1).max(40), period: external_exports.enum(["daily", "weekly"]) }),
1926
+ result: external_exports.object({ routine: GameRoutine })
1927
+ },
1928
+ /** Delete one of the user's own; one from a pack is hidden from the game page instead (`restore` shows the hidden ones again). */
1929
+ "games/routine/remove": {
1930
+ capability: GAMES_CAPABILITY,
1931
+ params: external_exports.object({ game: external_exports.string(), routine: external_exports.string().optional(), restore: external_exports.boolean().optional() }),
1932
+ result: external_exports.object({})
1933
+ },
1844
1934
  /** The user's own progress on an event: its checklist, or done as a whole. */
1845
1935
  "games/activity/progress": {
1846
1936
  capability: GAMES_CAPABILITY,
@@ -3761,6 +3851,10 @@ function classify(value) {
3761
3851
  return "invalid";
3762
3852
  }
3763
3853
 
3854
+ // packages/protocol/lib/update-rule.js
3855
+ 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";
3856
+ var APP_FILES_RULE = "\u4E0D\u8981\u6539 MultiGameAssistant \u81EA\u5DF1\uFF1A\u5B83\u7684\u7A0B\u5E8F\u548C\u6E90\u7801\uFF08\u5B89\u88C5\u76EE\u5F55\u3001\u6E90\u7801\u76EE\u5F55\uFF09\u3001\u6570\u636E\u548C\u8BBE\u7F6E\u90FD\u4E0D\u5F52\u4F60\u6539\uFF0C\u4E5F\u4E0D\u8981\u5728\u8FD9\u4E9B\u76EE\u5F55\u91CC\u5F00\u5B50 agent \u53BB\u6539\u3002\u8F6F\u4EF6\u7684\u6570\u636E\u6709\u4E13\u95E8\u7684\u5DE5\u5177\uFF08\u811A\u672C\u5305 pack_propose\u3001\u6280\u80FD skill_save\u3001\u65E5\u5E38 game_routine\u3001\u811A\u672C\u8BBE\u7F6E script_config_set\uFF09\u3002\u7528\u6237\u8BF4\u8F6F\u4EF6\u54EA\u91CC\u4E0D\u5BF9\u3001\u5C11\u4E86\u4EC0\u4E48\uFF0C\u6216\u8005\u4F60\u53D1\u73B0\u4E86\u8F6F\u4EF6\u672C\u8EAB\u7684\u95EE\u9898\uFF1A\u8BF4\u6E05\u695A\u73B0\u8C61\u548C\u4F60\u7684\u5224\u65AD\uFF0C\u7531\u7528\u6237\u51B3\u5B9A\u600E\u4E48\u6539\uFF0C\u4E0D\u8981\u81EA\u5DF1\u52A8\u624B\u4FEE\u3002";
3857
+
3764
3858
  // packages/protocol/lib/tools.js
3765
3859
  function summarizeToolArgs(args) {
3766
3860
  try {
@@ -3790,9 +3884,10 @@ function optimizeScriptPrompt(target, why, id) {
3790
3884
  return [
3791
3885
  `\u4F18\u5316\u811A\u672C${target === "" ? "\uFF1A\u6700\u8FD1\u8FD0\u884C\u8FC7\u7684\u811A\u672C\uFF08script_runs \u770B\u6700\u8FD1\u4E00\u5468\u8DD1\u8FC7\u54EA\u4E9B\uFF0C\u4E00\u4E2A\u4E00\u4E2A\u6765\uFF09" : `\u300C${target}\u300D${id === void 0 ? "" : `\uFF08\u811A\u672C id ${id}\uFF09`}`}${why === void 0 ? "" : `\uFF08${why}\uFF09`}\u3002\u628A\u8FD9\u6BB5\u65F6\u95F4\u8FD0\u884C\u6512\u4E0B\u7684\u4FE1\u606F\u7528\u8D77\u6765\uFF0C\u4E00\u6B21\u505A\u5B8C\u4E0B\u9762\u51E0\u4EF6\u4E8B\uFF1A`,
3792
3886
  "1. \u91CD\u65B0\u603B\u7ED3\u811A\u672C\u5305\uFF1Ascript_tasks\u3001script_help \u770B\u5B83\u73B0\u5728\u6709\u54EA\u4E9B\u4EFB\u52A1\u548C\u53C2\u6570\uFF0Cscript_runs\u3001script_run_log \u770B\u6700\u8FD1\u7684\u8FD0\u884C\uFF08\u6210\u529F\u7684\u770B\u6B63\u5E38\u6D41\u7A0B\u548C\u7528\u65F6\uFF0C\u5931\u8D25\u7684\u770B\u539F\u56E0\uFF09\uFF1B\u66F4\u65B0\u8FC7\u7248\u672C\u5C31\u5148\u7528 script_changelog \u8BFB\u66F4\u65B0\u65E5\u5FD7\u3002\u5BF9\u7167\u5B83\u7684\u811A\u672C\u5305\uFF0C\u4EFB\u52A1\u3001\u53C2\u6570\u3001\u914D\u7F6E\u6587\u4EF6\u3001\u5B8C\u6210\u548C\u51FA\u9519\u7684\u65E5\u5FD7\u6587\u5B57\u3001\u9884\u8BA1\u7528\u65F6\u6709\u4E0D\u5BF9\u6216\u7F3A\u7684\uFF0C\u6216\u8005\u4F7F\u7528\u8BF4\u660E\uFF08guide\uFF1A\u529F\u80FD\u600E\u4E48\u5F00\u542F\u3001\u914D\u7F6E\u600E\u4E48\u8BBE\u3001\u8FD0\u884C\u524D\u68C0\u67E5\u3001\u5E38\u89C1\u95EE\u9898\uFF09\u7F3A\u4E86\u3001\u8FC7\u65F6\u4E86\u3001\u80FD\u7528\u8FD0\u884C\u91CC\u9047\u5230\u7684\u62A5\u9519\u8865\u4E0A\u7684\uFF0C\u7528\u539F\u6765\u7684\u811A\u672C\u5305 id \u8C03\u7528 pack_propose \u4FDD\u5B58\uFF08\u76F4\u63A5\u751F\u6548\uFF1Bsummary \u5199\u660E\u4F9D\u636E\uFF09\uFF1B\u90FD\u5BF9\u5C31\u4E0D\u6539\uFF1B",
3887
+ " \u65E5\u5E38\u5468\u5E38\uFF08routines\uFF0C\u6E38\u620F\u9875\u300C\u65E5\u5E38 \xB7 \u5468\u5E38\u300D\u9760\u5B83\u4EEC\u81EA\u52A8\u52FE\u9009\uFF09\uFF1A\u539F\u6765\u6709\u7684\u7167\u539F\u6837\u4FDD\u7559\uFF1B\u6BCF\u4E00\u9879\u7684 log \u7528\u8FD0\u884C\u65E5\u5FD7\u91CC\u5B83\u771F\u6B63\u505A\u5B8C\u65F6\u7684\u539F\u6587\u5199\uFF08\u4F8B\u5982\u300C\u5B8C\u6210\u4EFB\u52A1: \u57FA\u5EFA\u6362\u73ED\u300D\u300C\u6BCF\u65E5\u5B9E\u8BAD\u5DF2\u5B8C\u6210\u300D\u300C\u672C\u5468\u527F\u706D\u5DF2\u5B8C\u6210\uFF0C\u8DF3\u8FC7\u527F\u706D\u300D\uFF09\uFF0C\u770B\u4E0D\u51FA\u5355\u9879\u3001\u53EA\u6709\u4EFB\u52A1\u6210\u529F\u80FD\u8BC1\u660E\u7684\u5199 tasks\uFF1B\u5F00\u59CB\u3001\u8DF3\u8FC7\u4E0D\u4E86\u3001\u5931\u8D25\u7684\u884C\u4E0D\u8981\u5199\u6210\u5B8C\u6210\u3002\u5E38\u89C1\u95EE\u9898\u5199\u5728 guide.troubleshooting \u4E0B\uFF0C\u5199\u5728\u522B\u5904\u4F1A\u88AB\u4E22\u6389\uFF1B",
3793
3888
  "2. \u6539\u5584\u76D1\u63A7\u65F6\u95F4\uFF1Amonitor_stall_check \u770B\u5B83\u6B63\u5E38\u8FD0\u884C\u65F6\u65E5\u5FD7\u7684\u8282\u594F\uFF0C\u6309\u5EFA\u8BAE\u503C\u548C\u4F60\u770B\u65E5\u5FD7\u7684\u5224\u65AD\u7528 monitor_stall_set \u8BBE\u5B83\u591A\u4E45\u6CA1\u65B0\u65E5\u5FD7\u7B97\u5361\u4F4F\uFF0Cnote \u5199\u660E\u4F9D\u636E\uFF08\u4F8B\u5982\u300C\u6218\u6597\u4E2D\u6700\u957F 70 \u79D2\u4E0D\u8F93\u51FA\u300D\uFF09\uFF1B",
3794
3889
  "3. \u628A\u505A\u8FC7\u7684\u6B65\u9AA4\u603B\u7ED3\u6210\u6280\u80FD\uFF0C\u5206\u5230\u5BF9\u5E94\u7684\u6E38\u620F\u548C\u811A\u672C\uFF1A\u8FD0\u884C\u548C\u5904\u7406\u8FD9\u4E2A\u811A\u672C\u65F6\u53CD\u590D\u7528\u5230\u3001\u5DF2\u7ECF\u8D70\u901A\u7684\u505A\u6CD5\uFF08\u5E38\u89C1\u62A5\u9519\u600E\u4E48\u5904\u7406\u3001\u600E\u4E48\u786E\u8BA4\u8DD1\u5B8C\u3001\u914D\u7F6E\u600E\u4E48\u6539\uFF09\u7528 skill_save \u5B58\u6210\u6280\u80FD\uFF0Cscripts \u586B\u8FD9\u4E2A\u811A\u672C\u7684 id\uFF0C\u53EA\u7ED9\u5B83\u7528\uFF1B\u5176\u4E2D\u548C\u6E38\u620F\u672C\u8EAB\u6709\u5173\u3001\u522B\u7684\u811A\u672C\u4E5F\u7528\u5F97\u4E0A\u7684\uFF08\u6E38\u620F\u91CC\u7684\u64CD\u4F5C\u3001\u754C\u9762\u3001\u6D3B\u52A8\u3001\u673A\u5236\uFF09\u5355\u72EC\u5B58\uFF0Cgames \u586B\u5B83\u73A9\u7684\u6E38\u620F id\uFF08game_list \u67E5\uFF09\uFF0C\u4E0D\u586B scripts\uFF1B\u5DF2\u6709\u7684\u6280\u80FD\u5C31\u5408\u5E76\u66F4\u65B0\uFF08replace\uFF09\uFF0C\u4E0D\u8981\u91CD\u590D\u5B58\uFF0C\u6CA1\u6709\u503C\u5F97\u5B58\u7684\u5C31\u4E0D\u5B58\uFF1B",
3795
- "4. \u4E0D\u8981\u8FD0\u884C\u811A\u672C\u3001\u4E0D\u8981\u6539\u5B83\u7684\u914D\u7F6E\uFF1B\u6700\u540E\u7528\u51E0\u53E5\u8BDD\u544A\u8BC9\u6211\uFF1A\u811A\u672C\u5305\u6539\u4E86\u4EC0\u4E48\uFF08\u5DF2\u7ECF\u76F4\u63A5\u751F\u6548\uFF09\u3001\u5361\u4F4F\u65F6\u95F4\u8BBE\u6210\u591A\u5C11\u3001\u5B58\u4E86\u6216\u66F4\u65B0\u4E86\u54EA\u4E9B\u6280\u80FD\u3002"
3890
+ "4. \u4E0D\u8981\u8FD0\u884C\u811A\u672C\u3001\u4E0D\u8981\u6539\u5B83\u7684\u914D\u7F6E\uFF1B\u6700\u540E\u7528\u51E0\u53E5\u8BDD\u544A\u8BC9\u6211\uFF1A\u811A\u672C\u5305\u6539\u4E86\u4EC0\u4E48\uFF08\u5DF2\u7ECF\u76F4\u63A5\u751F\u6548\uFF09\u3001\u54EA\u4E9B\u65E5\u5E38\u5468\u5E38\u80FD\u81EA\u52A8\u52FE\u9009\u3001\u5361\u4F4F\u65F6\u95F4\u8BBE\u6210\u591A\u5C11\u3001\u5B58\u4E86\u6216\u66F4\u65B0\u4E86\u54EA\u4E9B\u6280\u80FD\u3002"
3796
3891
  ].join("\n");
3797
3892
  }
3798
3893
  var COMMANDS = [
@@ -3934,9 +4029,6 @@ function parseGitHubLink(text) {
3934
4029
  return { repo };
3935
4030
  }
3936
4031
 
3937
- // packages/protocol/lib/update-rule.js
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";
3939
-
3940
4032
  export {
3941
4033
  ModelFallbackNotice,
3942
4034
  MODEL_FALLBACK_SOURCE,
@@ -4045,5 +4137,6 @@ export {
4045
4137
  optimizeScriptPrompt,
4046
4138
  expandSlash,
4047
4139
  parseGitHubLink,
4048
- UPDATE_RULE
4140
+ UPDATE_RULE,
4141
+ APP_FILES_RULE
4049
4142
  };
@@ -35,13 +35,13 @@ import {
35
35
  parseJsonc,
36
36
  parseManifest,
37
37
  versionOfTag
38
- } from "./chunk-RGEGJH6R.js";
38
+ } from "./chunk-TXW3NMBH.js";
39
39
  import {
40
40
  sessionConversations
41
- } from "./chunk-6YPSKAQ5.js";
41
+ } from "./chunk-VG32XPZH.js";
42
42
  import {
43
43
  pluginVersion
44
- } from "./chunk-DSWWQWQH.js";
44
+ } from "./chunk-VBWSM7LF.js";
45
45
  import {
46
46
  ExeIcons,
47
47
  writeFileAtomic
@@ -64,7 +64,7 @@ import {
64
64
  optimizeScriptPrompt,
65
65
  parseGitHubLink,
66
66
  taskMessage
67
- } from "./chunk-LXHF6AKU.js";
67
+ } from "./chunk-7EFZ5KR6.js";
68
68
  import {
69
69
  NEVER,
70
70
  ZodIssueCode,
@@ -609,6 +609,7 @@ var SCRIPT_ROLE = {
609
609
  order: 30,
610
610
  titles: ["\u5B89\u88C5\u811A\u672C", "\u811A\u672C\u4ECB\u7ECD", "\u68C0\u67E5\u811A\u672C\u5305", "\u5408\u5E76\u6280\u80FD"],
611
611
  // Scripts, their packs and environment, skills; the screen for setup programs. No game reading or pipelines.
612
+ // game_routine: a pack's routines tick the game page's 日常 · 周常; it reads them while writing them and checks after.
612
613
  tools: [
613
614
  "script_*",
614
615
  "pack_*",
@@ -617,6 +618,7 @@ var SCRIPT_ROLE = {
617
618
  "game_list",
618
619
  "game_locate",
619
620
  "game_path_set",
621
+ "game_routine",
620
622
  "screen_*",
621
623
  "window_*",
622
624
  "monitor_incidents",
@@ -22955,4 +22957,4 @@ export {
22955
22957
  AdgScripts,
22956
22958
  lib_default
22957
22959
  };
22958
- /*! For license information please see chunk-CCYE6H2F.js.LEGAL.txt */
22960
+ /*! For license information please see chunk-AJMAUHPI.js.LEGAL.txt */