dsh-multigameassistant 2.3.1 → 2.3.3
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 +19 -9
- package/lib/{chunk-M7GNYL5B.js → chunk-4NR36PKL.js} +1 -1
- package/lib/{chunk-C7X2KJ5C.js → chunk-7UJ3LK3G.js} +77 -67
- package/lib/{chunk-KW36B7DT.js → chunk-AXOXWMQT.js} +12 -11
- package/lib/{chunk-34VNH3YS.js → chunk-BB2T4JHF.js} +18 -2
- package/lib/{chunk-76UHR2GO.js → chunk-DBOGZLXA.js} +53 -16
- package/lib/{chunk-QSETYM2Y.js → chunk-OCJFAT7J.js} +39 -8
- package/lib/{chunk-4QXRDWGS.js → chunk-RREVLKRY.js} +181 -46
- package/lib/emulator.js +19 -3
- package/lib/feishu.js +4 -4
- package/lib/game-intel.js +24 -25
- package/lib/gateway.js +3 -3
- package/lib/guard.js +1 -1
- package/lib/intervene.js +10 -10
- package/lib/low-context.js +2 -2
- package/lib/monitor.js +4 -4
- package/lib/notify.js +8 -4
- package/lib/orchestrator.js +57 -21
- package/lib/qqbot.js +280 -46
- 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 +2 -2
- package/skills/pipeline-planning.md +2 -2
- package/skills/script-analysis.md +7 -4
- package/web/assets/{index-cNJNBRun.js → index-7Lrqcs5W.js} +64 -64
- package/web/assets/index-7Lrqcs5W.js.map +1 -0
- package/web/assets/index-CCqwfXjF.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-O-2OxnhJ.css +0 -1
- package/web/assets/index-cNJNBRun.js.map +0 -1
- /package/lib/{chunk-KW36B7DT.js.LEGAL.txt → chunk-AXOXWMQT.js.LEGAL.txt} +0 -0
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-multigameassistant 2.3.
|
|
1
|
+
# dsh-multigameassistant 2.3.3
|
|
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.
|
package/lib/analyzer.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
discoverMcp,
|
|
4
4
|
discoverSkills,
|
|
5
5
|
mcpEndpoints
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AXOXWMQT.js";
|
|
7
7
|
import {
|
|
8
8
|
probeProject
|
|
9
9
|
} from "./chunk-B4UT4NYH.js";
|
|
@@ -19,16 +19,16 @@ import {
|
|
|
19
19
|
require_dist,
|
|
20
20
|
strayKeys,
|
|
21
21
|
stripJsonc
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-7UJ3LK3G.js";
|
|
23
|
+
import "./chunk-RREVLKRY.js";
|
|
24
|
+
import "./chunk-OCJFAT7J.js";
|
|
25
|
+
import "./chunk-4NR36PKL.js";
|
|
26
26
|
import "./chunk-RESS7WVY.js";
|
|
27
27
|
import {
|
|
28
28
|
BUILTIN_PACK_VERSION,
|
|
29
29
|
PACKS_CAPABILITY,
|
|
30
30
|
ScriptId
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BB2T4JHF.js";
|
|
32
32
|
import {
|
|
33
33
|
external_exports
|
|
34
34
|
} from "./chunk-6DSSLS7I.js";
|
|
@@ -647,6 +647,17 @@ var AdgAnalyzer = class extends Service {
|
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
|
+
function rewriteIssues(previous, manifest, text) {
|
|
651
|
+
const issues = [];
|
|
652
|
+
const lost = (previous?.routines ?? []).filter((r) => !manifest.routines.some((n) => n.id === r.id));
|
|
653
|
+
if (lost.length > 0)
|
|
654
|
+
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`);
|
|
655
|
+
const selfLaunch = previous?.game?.selfLaunch;
|
|
656
|
+
if (selfLaunch !== void 0 && selfLaunch !== "never" && (manifest.game?.selfLaunch ?? "never") === "never" && !/^\s*selfLaunch\s*:/m.test(text)) {
|
|
657
|
+
issues.push(`\u539F\u6765\u7684\u811A\u672C\u5305\u5199\u7740\u811A\u672C\u81EA\u5DF1\u4F1A\u542F\u52A8\u6E38\u620F\uFF08game.selfLaunch: ${typeof selfLaunch === "string" ? selfLaunch : JSON.stringify(selfLaunch)}\uFF09\uFF0C\u65B0\u7684\u91CC\u6CA1\u6709\u4E86\uFF1A\u5E73\u53F0\u4F1A\u5728\u811A\u672C\u4E4B\u524D\u518D\u542F\u52A8\u4E00\u6B21\u6E38\u620F\u3002\u7167\u539F\u6837\u4FDD\u7559 game \u4E00\u8282\uFF1B\u786E\u5B9E\u8981\u5E73\u53F0\u6765\u542F\u52A8\u65F6\u660E\u5199 selfLaunch: never\uFF0C\u5E76\u5728 summary \u91CC\u8BF4\u660E\u4F9D\u636E`);
|
|
658
|
+
}
|
|
659
|
+
return issues;
|
|
660
|
+
}
|
|
650
661
|
function androidNext(manifest, check) {
|
|
651
662
|
if (check === void 0)
|
|
652
663
|
return "";
|
|
@@ -831,9 +842,7 @@ function analyzerTools(deps) {
|
|
|
831
842
|
} catch {
|
|
832
843
|
previous = void 0;
|
|
833
844
|
}
|
|
834
|
-
|
|
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`);
|
|
845
|
+
issues.push(...rewriteIssues(previous, manifest, a.manifest));
|
|
837
846
|
const dir = deps.library.get(a.script_id).dir;
|
|
838
847
|
if (manifest.mcp === void 0 && dir !== void 0 && (await discoverMcp(dir)).some((e) => e.disabled !== true)) {
|
|
839
848
|
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");
|
|
@@ -891,5 +900,6 @@ export {
|
|
|
891
900
|
parseJsonc,
|
|
892
901
|
parseSkill,
|
|
893
902
|
readInterface,
|
|
903
|
+
rewriteIssues,
|
|
894
904
|
stripJsonc
|
|
895
905
|
};
|
|
@@ -2,7 +2,7 @@ import { createRequire as __adgCreateRequire } from 'node:module'; import { dirn
|
|
|
2
2
|
import {
|
|
3
3
|
ScriptFamily,
|
|
4
4
|
ScriptId
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BB2T4JHF.js";
|
|
6
6
|
import {
|
|
7
7
|
external_exports
|
|
8
8
|
} from "./chunk-6DSSLS7I.js";
|
|
@@ -715,7 +715,7 @@ var require_Scalar = __commonJS({
|
|
|
715
715
|
var Node = require_Node();
|
|
716
716
|
var toJS = require_toJS();
|
|
717
717
|
var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
718
|
-
var
|
|
718
|
+
var Scalar2 = class extends Node.NodeBase {
|
|
719
719
|
constructor(value) {
|
|
720
720
|
super(identity.SCALAR);
|
|
721
721
|
this.value = value;
|
|
@@ -727,12 +727,12 @@ var require_Scalar = __commonJS({
|
|
|
727
727
|
return String(this.value);
|
|
728
728
|
}
|
|
729
729
|
};
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
exports.Scalar =
|
|
730
|
+
Scalar2.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
731
|
+
Scalar2.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
732
|
+
Scalar2.PLAIN = "PLAIN";
|
|
733
|
+
Scalar2.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
734
|
+
Scalar2.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
735
|
+
exports.Scalar = Scalar2;
|
|
736
736
|
exports.isScalarValue = isScalarValue;
|
|
737
737
|
}
|
|
738
738
|
});
|
|
@@ -743,7 +743,7 @@ var require_createNode = __commonJS({
|
|
|
743
743
|
"use strict";
|
|
744
744
|
var Alias = require_Alias();
|
|
745
745
|
var identity = require_identity();
|
|
746
|
-
var
|
|
746
|
+
var Scalar2 = require_Scalar();
|
|
747
747
|
var defaultTagPrefix = "tag:yaml.org,2002:";
|
|
748
748
|
function findTagObject(value, tagName, tags) {
|
|
749
749
|
if (tagName) {
|
|
@@ -788,7 +788,7 @@ var require_createNode = __commonJS({
|
|
|
788
788
|
value = value.toJSON();
|
|
789
789
|
}
|
|
790
790
|
if (!value || typeof value !== "object") {
|
|
791
|
-
const node2 = new
|
|
791
|
+
const node2 = new Scalar2.Scalar(value);
|
|
792
792
|
if (ref)
|
|
793
793
|
ref.node = node2;
|
|
794
794
|
return node2;
|
|
@@ -799,7 +799,7 @@ var require_createNode = __commonJS({
|
|
|
799
799
|
onTagObj(tagObj);
|
|
800
800
|
delete ctx.onTagObj;
|
|
801
801
|
}
|
|
802
|
-
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new
|
|
802
|
+
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar2.Scalar(value);
|
|
803
803
|
if (tagName)
|
|
804
804
|
node.tag = tagName;
|
|
805
805
|
else if (!tagObj.default)
|
|
@@ -1112,7 +1112,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
1112
1112
|
var require_stringifyString = __commonJS({
|
|
1113
1113
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1114
1114
|
"use strict";
|
|
1115
|
-
var
|
|
1115
|
+
var Scalar2 = require_Scalar();
|
|
1116
1116
|
var foldFlowLines = require_foldFlowLines();
|
|
1117
1117
|
var getFoldOptions = (ctx, isBlock) => ({
|
|
1118
1118
|
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
@@ -1255,7 +1255,7 @@ ${indent}`) + "'";
|
|
|
1255
1255
|
return quotedString(value, ctx);
|
|
1256
1256
|
}
|
|
1257
1257
|
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
1258
|
-
const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type ===
|
|
1258
|
+
const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar2.Scalar.BLOCK_FOLDED ? false : type === Scalar2.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
|
|
1259
1259
|
if (!value)
|
|
1260
1260
|
return literal ? "|\n" : ">\n";
|
|
1261
1261
|
let chomp;
|
|
@@ -1310,7 +1310,7 @@ ${indent}`) + "'";
|
|
|
1310
1310
|
const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
|
|
1311
1311
|
let literalFallback = false;
|
|
1312
1312
|
const foldOptions = getFoldOptions(ctx, true);
|
|
1313
|
-
if (blockQuote !== "folded" && type !==
|
|
1313
|
+
if (blockQuote !== "folded" && type !== Scalar2.Scalar.BLOCK_FOLDED) {
|
|
1314
1314
|
foldOptions.onOverflow = () => {
|
|
1315
1315
|
literalFallback = true;
|
|
1316
1316
|
};
|
|
@@ -1333,7 +1333,7 @@ ${indent}${start}${value}${end}`;
|
|
|
1333
1333
|
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
1334
1334
|
return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
1335
1335
|
}
|
|
1336
|
-
if (!implicitKey && !inFlow && type !==
|
|
1336
|
+
if (!implicitKey && !inFlow && type !== Scalar2.Scalar.PLAIN && value.includes("\n")) {
|
|
1337
1337
|
return blockString(item, ctx, onComment, onChompKeep);
|
|
1338
1338
|
}
|
|
1339
1339
|
if (containsDocumentMarker(value)) {
|
|
@@ -1358,20 +1358,20 @@ ${indent}`);
|
|
|
1358
1358
|
const { implicitKey, inFlow } = ctx;
|
|
1359
1359
|
const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
|
|
1360
1360
|
let { type } = item;
|
|
1361
|
-
if (type !==
|
|
1361
|
+
if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
|
|
1362
1362
|
if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
|
|
1363
|
-
type =
|
|
1363
|
+
type = Scalar2.Scalar.QUOTE_DOUBLE;
|
|
1364
1364
|
}
|
|
1365
1365
|
const _stringify = (_type) => {
|
|
1366
1366
|
switch (_type) {
|
|
1367
|
-
case
|
|
1368
|
-
case
|
|
1367
|
+
case Scalar2.Scalar.BLOCK_FOLDED:
|
|
1368
|
+
case Scalar2.Scalar.BLOCK_LITERAL:
|
|
1369
1369
|
return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
|
|
1370
|
-
case
|
|
1370
|
+
case Scalar2.Scalar.QUOTE_DOUBLE:
|
|
1371
1371
|
return doubleQuotedString(ss.value, ctx);
|
|
1372
|
-
case
|
|
1372
|
+
case Scalar2.Scalar.QUOTE_SINGLE:
|
|
1373
1373
|
return singleQuotedString(ss.value, ctx);
|
|
1374
|
-
case
|
|
1374
|
+
case Scalar2.Scalar.PLAIN:
|
|
1375
1375
|
return plainString(ss, ctx, onComment, onChompKeep);
|
|
1376
1376
|
default:
|
|
1377
1377
|
return null;
|
|
@@ -1520,7 +1520,7 @@ var require_stringifyPair = __commonJS({
|
|
|
1520
1520
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1521
1521
|
"use strict";
|
|
1522
1522
|
var identity = require_identity();
|
|
1523
|
-
var
|
|
1523
|
+
var Scalar2 = require_Scalar();
|
|
1524
1524
|
var stringify = require_stringify();
|
|
1525
1525
|
var stringifyComment = require_stringifyComment();
|
|
1526
1526
|
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
@@ -1535,7 +1535,7 @@ var require_stringifyPair = __commonJS({
|
|
|
1535
1535
|
throw new Error(msg);
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type ===
|
|
1538
|
+
let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar2.Scalar.BLOCK_FOLDED || key.type === Scalar2.Scalar.BLOCK_LITERAL : typeof key === "object"));
|
|
1539
1539
|
ctx = Object.assign({}, ctx, {
|
|
1540
1540
|
allNullValues: false,
|
|
1541
1541
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -1675,19 +1675,19 @@ var require_merge = __commonJS({
|
|
|
1675
1675
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1676
1676
|
"use strict";
|
|
1677
1677
|
var identity = require_identity();
|
|
1678
|
-
var
|
|
1678
|
+
var Scalar2 = require_Scalar();
|
|
1679
1679
|
var MERGE_KEY = "<<";
|
|
1680
1680
|
var merge = {
|
|
1681
1681
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
1682
1682
|
default: "key",
|
|
1683
1683
|
tag: "tag:yaml.org,2002:merge",
|
|
1684
1684
|
test: /^<<$/,
|
|
1685
|
-
resolve: () => Object.assign(new
|
|
1685
|
+
resolve: () => Object.assign(new Scalar2.Scalar(Symbol(MERGE_KEY)), {
|
|
1686
1686
|
addToJSMap: addMergeToJSMap
|
|
1687
1687
|
}),
|
|
1688
1688
|
stringify: () => MERGE_KEY
|
|
1689
1689
|
};
|
|
1690
|
-
var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type ===
|
|
1690
|
+
var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar2.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
1691
1691
|
function addMergeToJSMap(ctx, map, value) {
|
|
1692
1692
|
const source = resolveAliasValue(ctx, value);
|
|
1693
1693
|
if (identity.isSeq(source))
|
|
@@ -1994,7 +1994,7 @@ var require_YAMLMap = __commonJS({
|
|
|
1994
1994
|
var Collection = require_Collection();
|
|
1995
1995
|
var identity = require_identity();
|
|
1996
1996
|
var Pair = require_Pair();
|
|
1997
|
-
var
|
|
1997
|
+
var Scalar2 = require_Scalar();
|
|
1998
1998
|
function findPair(items, key) {
|
|
1999
1999
|
const k = identity.isScalar(key) ? key.value : key;
|
|
2000
2000
|
for (const it of items) {
|
|
@@ -2061,7 +2061,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2061
2061
|
if (prev) {
|
|
2062
2062
|
if (!overwrite)
|
|
2063
2063
|
throw new Error(`Key ${_pair.key} already set`);
|
|
2064
|
-
if (identity.isScalar(prev.value) &&
|
|
2064
|
+
if (identity.isScalar(prev.value) && Scalar2.isScalarValue(_pair.value))
|
|
2065
2065
|
prev.value.value = _pair.value;
|
|
2066
2066
|
else
|
|
2067
2067
|
prev.value = _pair.value;
|
|
@@ -2159,7 +2159,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2159
2159
|
var stringifyCollection = require_stringifyCollection();
|
|
2160
2160
|
var Collection = require_Collection();
|
|
2161
2161
|
var identity = require_identity();
|
|
2162
|
-
var
|
|
2162
|
+
var Scalar2 = require_Scalar();
|
|
2163
2163
|
var toJS = require_toJS();
|
|
2164
2164
|
var YAMLSeq = class extends Collection.Collection {
|
|
2165
2165
|
static get tagName() {
|
|
@@ -2216,7 +2216,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2216
2216
|
if (typeof idx !== "number")
|
|
2217
2217
|
throw new Error(`Expected a valid index, not ${key}.`);
|
|
2218
2218
|
const prev = this.items[idx];
|
|
2219
|
-
if (identity.isScalar(prev) &&
|
|
2219
|
+
if (identity.isScalar(prev) && Scalar2.isScalarValue(value))
|
|
2220
2220
|
prev.value = value;
|
|
2221
2221
|
else
|
|
2222
2222
|
this.items[idx] = value;
|
|
@@ -2312,14 +2312,14 @@ var require_string = __commonJS({
|
|
|
2312
2312
|
var require_null = __commonJS({
|
|
2313
2313
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2314
2314
|
"use strict";
|
|
2315
|
-
var
|
|
2315
|
+
var Scalar2 = require_Scalar();
|
|
2316
2316
|
var nullTag = {
|
|
2317
2317
|
identify: (value) => value == null,
|
|
2318
|
-
createNode: () => new
|
|
2318
|
+
createNode: () => new Scalar2.Scalar(null),
|
|
2319
2319
|
default: true,
|
|
2320
2320
|
tag: "tag:yaml.org,2002:null",
|
|
2321
2321
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
2322
|
-
resolve: () => new
|
|
2322
|
+
resolve: () => new Scalar2.Scalar(null),
|
|
2323
2323
|
stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr
|
|
2324
2324
|
};
|
|
2325
2325
|
exports.nullTag = nullTag;
|
|
@@ -2330,13 +2330,13 @@ var require_null = __commonJS({
|
|
|
2330
2330
|
var require_bool = __commonJS({
|
|
2331
2331
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2332
2332
|
"use strict";
|
|
2333
|
-
var
|
|
2333
|
+
var Scalar2 = require_Scalar();
|
|
2334
2334
|
var boolTag = {
|
|
2335
2335
|
identify: (value) => typeof value === "boolean",
|
|
2336
2336
|
default: true,
|
|
2337
2337
|
tag: "tag:yaml.org,2002:bool",
|
|
2338
2338
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
2339
|
-
resolve: (str) => new
|
|
2339
|
+
resolve: (str) => new Scalar2.Scalar(str[0] === "t" || str[0] === "T"),
|
|
2340
2340
|
stringify({ source, value }, ctx) {
|
|
2341
2341
|
if (source && boolTag.test.test(source)) {
|
|
2342
2342
|
const sv = source[0] === "t" || source[0] === "T";
|
|
@@ -2381,7 +2381,7 @@ var require_stringifyNumber = __commonJS({
|
|
|
2381
2381
|
var require_float = __commonJS({
|
|
2382
2382
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2383
2383
|
"use strict";
|
|
2384
|
-
var
|
|
2384
|
+
var Scalar2 = require_Scalar();
|
|
2385
2385
|
var stringifyNumber = require_stringifyNumber();
|
|
2386
2386
|
var floatNaN = {
|
|
2387
2387
|
identify: (value) => typeof value === "number",
|
|
@@ -2409,7 +2409,7 @@ var require_float = __commonJS({
|
|
|
2409
2409
|
tag: "tag:yaml.org,2002:float",
|
|
2410
2410
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
2411
2411
|
resolve(str) {
|
|
2412
|
-
const node = new
|
|
2412
|
+
const node = new Scalar2.Scalar(parseFloat(str));
|
|
2413
2413
|
const dot = str.indexOf(".");
|
|
2414
2414
|
if (dot !== -1 && str[str.length - 1] === "0")
|
|
2415
2415
|
node.minFractionDigits = str.length - dot - 1;
|
|
@@ -2500,7 +2500,7 @@ var require_schema = __commonJS({
|
|
|
2500
2500
|
var require_schema2 = __commonJS({
|
|
2501
2501
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2502
2502
|
"use strict";
|
|
2503
|
-
var
|
|
2503
|
+
var Scalar2 = require_Scalar();
|
|
2504
2504
|
var map = require_map();
|
|
2505
2505
|
var seq = require_seq();
|
|
2506
2506
|
function intIdentify(value) {
|
|
@@ -2517,7 +2517,7 @@ var require_schema2 = __commonJS({
|
|
|
2517
2517
|
},
|
|
2518
2518
|
{
|
|
2519
2519
|
identify: (value) => value == null,
|
|
2520
|
-
createNode: () => new
|
|
2520
|
+
createNode: () => new Scalar2.Scalar(null),
|
|
2521
2521
|
default: true,
|
|
2522
2522
|
tag: "tag:yaml.org,2002:null",
|
|
2523
2523
|
test: /^null$/,
|
|
@@ -2568,7 +2568,7 @@ var require_binary = __commonJS({
|
|
|
2568
2568
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2569
2569
|
"use strict";
|
|
2570
2570
|
var node_buffer = __require("buffer");
|
|
2571
|
-
var
|
|
2571
|
+
var Scalar2 = require_Scalar();
|
|
2572
2572
|
var stringifyString = require_stringifyString();
|
|
2573
2573
|
var binary = {
|
|
2574
2574
|
identify: (value) => value instanceof Uint8Array,
|
|
@@ -2612,15 +2612,15 @@ var require_binary = __commonJS({
|
|
|
2612
2612
|
} else {
|
|
2613
2613
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
2614
2614
|
}
|
|
2615
|
-
type ?? (type =
|
|
2616
|
-
if (type !==
|
|
2615
|
+
type ?? (type = Scalar2.Scalar.BLOCK_LITERAL);
|
|
2616
|
+
if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
|
|
2617
2617
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
2618
2618
|
const n = Math.ceil(str.length / lineWidth);
|
|
2619
2619
|
const lines = new Array(n);
|
|
2620
2620
|
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
|
|
2621
2621
|
lines[i] = str.substr(o, lineWidth);
|
|
2622
2622
|
}
|
|
2623
|
-
str = lines.join(type ===
|
|
2623
|
+
str = lines.join(type === Scalar2.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
2624
2624
|
}
|
|
2625
2625
|
return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
|
|
2626
2626
|
}
|
|
@@ -2635,7 +2635,7 @@ var require_pairs = __commonJS({
|
|
|
2635
2635
|
"use strict";
|
|
2636
2636
|
var identity = require_identity();
|
|
2637
2637
|
var Pair = require_Pair();
|
|
2638
|
-
var
|
|
2638
|
+
var Scalar2 = require_Scalar();
|
|
2639
2639
|
var YAMLSeq = require_YAMLSeq();
|
|
2640
2640
|
function resolvePairs(seq, onError) {
|
|
2641
2641
|
if (identity.isSeq(seq)) {
|
|
@@ -2646,7 +2646,7 @@ var require_pairs = __commonJS({
|
|
|
2646
2646
|
else if (identity.isMap(item)) {
|
|
2647
2647
|
if (item.items.length > 1)
|
|
2648
2648
|
onError("Each pair must have its own sequence indicator");
|
|
2649
|
-
const pair = item.items[0] || new Pair.Pair(new
|
|
2649
|
+
const pair = item.items[0] || new Pair.Pair(new Scalar2.Scalar(null));
|
|
2650
2650
|
if (item.commentBefore)
|
|
2651
2651
|
pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}
|
|
2652
2652
|
${pair.key.commentBefore}` : item.commentBefore;
|
|
@@ -2789,7 +2789,7 @@ var require_omap = __commonJS({
|
|
|
2789
2789
|
var require_bool2 = __commonJS({
|
|
2790
2790
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
2791
2791
|
"use strict";
|
|
2792
|
-
var
|
|
2792
|
+
var Scalar2 = require_Scalar();
|
|
2793
2793
|
function boolStringify({ value, source }, ctx) {
|
|
2794
2794
|
const boolObj = value ? trueTag : falseTag;
|
|
2795
2795
|
if (source && boolObj.test.test(source))
|
|
@@ -2801,7 +2801,7 @@ var require_bool2 = __commonJS({
|
|
|
2801
2801
|
default: true,
|
|
2802
2802
|
tag: "tag:yaml.org,2002:bool",
|
|
2803
2803
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
2804
|
-
resolve: () => new
|
|
2804
|
+
resolve: () => new Scalar2.Scalar(true),
|
|
2805
2805
|
stringify: boolStringify
|
|
2806
2806
|
};
|
|
2807
2807
|
var falseTag = {
|
|
@@ -2809,7 +2809,7 @@ var require_bool2 = __commonJS({
|
|
|
2809
2809
|
default: true,
|
|
2810
2810
|
tag: "tag:yaml.org,2002:bool",
|
|
2811
2811
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
2812
|
-
resolve: () => new
|
|
2812
|
+
resolve: () => new Scalar2.Scalar(false),
|
|
2813
2813
|
stringify: boolStringify
|
|
2814
2814
|
};
|
|
2815
2815
|
exports.falseTag = falseTag;
|
|
@@ -2821,7 +2821,7 @@ var require_bool2 = __commonJS({
|
|
|
2821
2821
|
var require_float2 = __commonJS({
|
|
2822
2822
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
2823
2823
|
"use strict";
|
|
2824
|
-
var
|
|
2824
|
+
var Scalar2 = require_Scalar();
|
|
2825
2825
|
var stringifyNumber = require_stringifyNumber();
|
|
2826
2826
|
var floatNaN = {
|
|
2827
2827
|
identify: (value) => typeof value === "number",
|
|
@@ -2849,7 +2849,7 @@ var require_float2 = __commonJS({
|
|
|
2849
2849
|
tag: "tag:yaml.org,2002:float",
|
|
2850
2850
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
2851
2851
|
resolve(str) {
|
|
2852
|
-
const node = new
|
|
2852
|
+
const node = new Scalar2.Scalar(parseFloat(str.replace(/_/g, "")));
|
|
2853
2853
|
const dot = str.indexOf(".");
|
|
2854
2854
|
if (dot !== -1) {
|
|
2855
2855
|
const f = str.substring(dot + 1).replace(/_/g, "");
|
|
@@ -4357,7 +4357,7 @@ var require_compose_collection = __commonJS({
|
|
|
4357
4357
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4358
4358
|
"use strict";
|
|
4359
4359
|
var identity = require_identity();
|
|
4360
|
-
var
|
|
4360
|
+
var Scalar2 = require_Scalar();
|
|
4361
4361
|
var YAMLMap = require_YAMLMap();
|
|
4362
4362
|
var YAMLSeq = require_YAMLSeq();
|
|
4363
4363
|
var resolveBlockMap = require_resolve_block_map();
|
|
@@ -4406,7 +4406,7 @@ var require_compose_collection = __commonJS({
|
|
|
4406
4406
|
}
|
|
4407
4407
|
const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
|
|
4408
4408
|
const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
|
|
4409
|
-
const node = identity.isNode(res) ? res : new
|
|
4409
|
+
const node = identity.isNode(res) ? res : new Scalar2.Scalar(res);
|
|
4410
4410
|
node.range = coll.range;
|
|
4411
4411
|
node.tag = tagName;
|
|
4412
4412
|
if (tag?.format)
|
|
@@ -4421,13 +4421,13 @@ var require_compose_collection = __commonJS({
|
|
|
4421
4421
|
var require_resolve_block_scalar = __commonJS({
|
|
4422
4422
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4423
4423
|
"use strict";
|
|
4424
|
-
var
|
|
4424
|
+
var Scalar2 = require_Scalar();
|
|
4425
4425
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
4426
4426
|
const start = scalar.offset;
|
|
4427
4427
|
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
|
|
4428
4428
|
if (!header)
|
|
4429
4429
|
return { value: "", type: null, comment: "", range: [start, start, start] };
|
|
4430
|
-
const type = header.mode === ">" ?
|
|
4430
|
+
const type = header.mode === ">" ? Scalar2.Scalar.BLOCK_FOLDED : Scalar2.Scalar.BLOCK_LITERAL;
|
|
4431
4431
|
const lines = scalar.source ? splitLines(scalar.source) : [];
|
|
4432
4432
|
let chompStart = lines.length;
|
|
4433
4433
|
for (let i = lines.length - 1; i >= 0; --i) {
|
|
@@ -4489,7 +4489,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4489
4489
|
onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
|
|
4490
4490
|
indent = "";
|
|
4491
4491
|
}
|
|
4492
|
-
if (type ===
|
|
4492
|
+
if (type === Scalar2.Scalar.BLOCK_LITERAL) {
|
|
4493
4493
|
value += sep + indent.slice(trimIndent) + content;
|
|
4494
4494
|
sep = "\n";
|
|
4495
4495
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
@@ -4604,7 +4604,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4604
4604
|
var require_resolve_flow_scalar = __commonJS({
|
|
4605
4605
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4606
4606
|
"use strict";
|
|
4607
|
-
var
|
|
4607
|
+
var Scalar2 = require_Scalar();
|
|
4608
4608
|
var resolveEnd = require_resolve_end();
|
|
4609
4609
|
function resolveFlowScalar(scalar, strict, onError) {
|
|
4610
4610
|
const { offset, type, source, end } = scalar;
|
|
@@ -4613,15 +4613,15 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4613
4613
|
const _onError = (rel, code, msg) => onError(offset + rel, code, msg);
|
|
4614
4614
|
switch (type) {
|
|
4615
4615
|
case "scalar":
|
|
4616
|
-
_type =
|
|
4616
|
+
_type = Scalar2.Scalar.PLAIN;
|
|
4617
4617
|
value = plainValue(source, _onError);
|
|
4618
4618
|
break;
|
|
4619
4619
|
case "single-quoted-scalar":
|
|
4620
|
-
_type =
|
|
4620
|
+
_type = Scalar2.Scalar.QUOTE_SINGLE;
|
|
4621
4621
|
value = singleQuotedValue(source, _onError);
|
|
4622
4622
|
break;
|
|
4623
4623
|
case "double-quoted-scalar":
|
|
4624
|
-
_type =
|
|
4624
|
+
_type = Scalar2.Scalar.QUOTE_DOUBLE;
|
|
4625
4625
|
value = doubleQuotedValue(source, _onError);
|
|
4626
4626
|
break;
|
|
4627
4627
|
/* istanbul ignore next should not happen */
|
|
@@ -4826,7 +4826,7 @@ var require_compose_scalar = __commonJS({
|
|
|
4826
4826
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
4827
4827
|
"use strict";
|
|
4828
4828
|
var identity = require_identity();
|
|
4829
|
-
var
|
|
4829
|
+
var Scalar2 = require_Scalar();
|
|
4830
4830
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
4831
4831
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
4832
4832
|
function composeScalar(ctx, token, tagToken, onError) {
|
|
@@ -4844,11 +4844,11 @@ var require_compose_scalar = __commonJS({
|
|
|
4844
4844
|
let scalar;
|
|
4845
4845
|
try {
|
|
4846
4846
|
const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
|
|
4847
|
-
scalar = identity.isScalar(res) ? res : new
|
|
4847
|
+
scalar = identity.isScalar(res) ? res : new Scalar2.Scalar(res);
|
|
4848
4848
|
} catch (error) {
|
|
4849
4849
|
const msg = error instanceof Error ? error.message : String(error);
|
|
4850
4850
|
onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
|
|
4851
|
-
scalar = new
|
|
4851
|
+
scalar = new Scalar2.Scalar(value);
|
|
4852
4852
|
}
|
|
4853
4853
|
scalar.range = range;
|
|
4854
4854
|
scalar.source = value;
|
|
@@ -7301,7 +7301,7 @@ var require_dist = __commonJS({
|
|
|
7301
7301
|
var Alias = require_Alias();
|
|
7302
7302
|
var identity = require_identity();
|
|
7303
7303
|
var Pair = require_Pair();
|
|
7304
|
-
var
|
|
7304
|
+
var Scalar2 = require_Scalar();
|
|
7305
7305
|
var YAMLMap = require_YAMLMap();
|
|
7306
7306
|
var YAMLSeq = require_YAMLSeq();
|
|
7307
7307
|
var cst = require_cst();
|
|
@@ -7326,7 +7326,7 @@ var require_dist = __commonJS({
|
|
|
7326
7326
|
exports.isScalar = identity.isScalar;
|
|
7327
7327
|
exports.isSeq = identity.isSeq;
|
|
7328
7328
|
exports.Pair = Pair.Pair;
|
|
7329
|
-
exports.Scalar =
|
|
7329
|
+
exports.Scalar = Scalar2.Scalar;
|
|
7330
7330
|
exports.YAMLMap = YAMLMap.YAMLMap;
|
|
7331
7331
|
exports.YAMLSeq = YAMLSeq.YAMLSeq;
|
|
7332
7332
|
exports.CST = cst;
|
|
@@ -7553,6 +7553,15 @@ var Logs = external_exports.object({
|
|
|
7553
7553
|
/** No new script log line for this long counts as stalled (monitor incident, `recovery` on `stalled`). */
|
|
7554
7554
|
stallAfter: Duration.optional()
|
|
7555
7555
|
});
|
|
7556
|
+
var Scalar = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
7557
|
+
var SelfLaunchCondition = external_exports.object({
|
|
7558
|
+
file: external_exports.string().min(1),
|
|
7559
|
+
path: external_exports.array(PathSegment).min(1),
|
|
7560
|
+
equals: Scalar.optional(),
|
|
7561
|
+
some: external_exports.record(external_exports.string().min(1), external_exports.union([Scalar, external_exports.object({ match: Regex2 })])).optional(),
|
|
7562
|
+
/** What it is, for people: 「实例里勾选了启动游戏」. */
|
|
7563
|
+
note: external_exports.string().optional()
|
|
7564
|
+
}).refine((c) => c.equals === void 0 !== (c.some === void 0), "selfLaunch \u7684\u6761\u4EF6\u8981\u5199 equals \u6216 some \u5176\u4E2D\u4E00\u4E2A");
|
|
7556
7565
|
var Game = external_exports.object({
|
|
7557
7566
|
name: external_exports.string().optional(),
|
|
7558
7567
|
/** Started in the emulator before `adb` tasks. */
|
|
@@ -7565,11 +7574,12 @@ var Game = external_exports.object({
|
|
|
7565
7574
|
}).optional(),
|
|
7566
7575
|
/**
|
|
7567
7576
|
* When the script starts the game itself: `always`, `never`, or when any
|
|
7568
|
-
* of these
|
|
7577
|
+
* of these conditions holds in the config the run uses (task parameters
|
|
7578
|
+
* fill `{placeholders}` in `where` segments, e.g. the chosen instance).
|
|
7569
7579
|
*/
|
|
7570
7580
|
selfLaunch: external_exports.union([
|
|
7571
7581
|
external_exports.enum(["always", "never"]),
|
|
7572
|
-
external_exports.array(
|
|
7582
|
+
external_exports.array(SelfLaunchCondition).min(1)
|
|
7573
7583
|
]).default("never"),
|
|
7574
7584
|
/** Seconds to give the game after starting it, before the script starts. */
|
|
7575
7585
|
startupSeconds: external_exports.number().int().min(0).max(600).default(30)
|