dsh-multigameassistant 2.0.3 → 2.0.5
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 +7 -2
- package/lib/analyzer.js +132 -25
- package/lib/{chunk-AWZ4O7BY.js → chunk-4Q4EH73S.js} +5 -2
- package/lib/{chunk-IH3K4QPN.js → chunk-BTT2GBTQ.js} +373 -162
- package/lib/chunk-IOBYH4RN.js +530 -0
- package/lib/{chunk-OQZ2XZVP.js → chunk-KHO3SRUJ.js} +289 -5
- package/lib/{chunk-C6HSCWNE.js → chunk-PAJOD6LV.js} +16 -6
- package/lib/{chunk-ZXD4IYZP.js → chunk-TD4YFQWE.js} +1980 -286
- package/lib/emulator.js +1 -1
- package/lib/feishu.js +4 -3
- package/lib/game-intel.js +7 -5
- package/lib/gateway.js +3 -2
- package/lib/guard.js +1 -1
- package/lib/intervene.js +4 -3
- package/lib/low-context.js +73 -0
- package/lib/monitor.js +3 -3
- package/lib/notify.js +4 -3
- package/lib/orchestrator.js +89 -23
- package/lib/packs/maa/adg.script.yaml +119 -1
- package/lib/packs/maaend/adg.script.yaml +74 -4
- package/lib/packs/march7th/adg.script.yaml +116 -0
- package/lib/qqbot.js +4 -3
- package/lib/runner.js +3 -3
- package/lib/scheduler.js +1 -1
- package/lib/script-registry.js +19 -12
- package/package.json +2 -1
- package/skills/pipeline-planning.md +8 -5
- package/skills/script-analysis.md +70 -10
- package/web/assets/index-BuStplKb.js +242 -0
- package/web/assets/index-BuStplKb.js.map +1 -0
- package/web/assets/index-CSB3B28L.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-BVPmzXp6.js +0 -241
- package/web/assets/index-BVPmzXp6.js.map +0 -1
- package/web/assets/index-Dwlpk_7H.css +0 -1
|
@@ -14708,6 +14708,57 @@ var PackSummary = external_exports.object({
|
|
|
14708
14708
|
/** Problems loading the pack, if any; the pack is skipped. */
|
|
14709
14709
|
error: external_exports.string().optional()
|
|
14710
14710
|
});
|
|
14711
|
+
var PackGuide = external_exports.object({
|
|
14712
|
+
packId: external_exports.string(),
|
|
14713
|
+
name: external_exports.string(),
|
|
14714
|
+
builtin: external_exports.boolean(),
|
|
14715
|
+
/** The pack has a written guide; without one only its tasks and run changes are known. */
|
|
14716
|
+
written: external_exports.boolean(),
|
|
14717
|
+
overview: external_exports.string().optional(),
|
|
14718
|
+
tasks: external_exports.array(external_exports.object({
|
|
14719
|
+
id: external_exports.string(),
|
|
14720
|
+
title: external_exports.string(),
|
|
14721
|
+
description: external_exports.string().optional(),
|
|
14722
|
+
utterances: external_exports.array(external_exports.string()),
|
|
14723
|
+
/** `desktop` takes the mouse and keyboard; `adb` an emulator; `window` the game's window in the background. */
|
|
14724
|
+
input: external_exports.enum(["desktop", "window", "adb", "none"]),
|
|
14725
|
+
expectedDuration: external_exports.string().optional(),
|
|
14726
|
+
params: external_exports.array(external_exports.object({
|
|
14727
|
+
name: external_exports.string(),
|
|
14728
|
+
type: external_exports.enum(["string", "integer", "number", "boolean"]),
|
|
14729
|
+
description: external_exports.string().optional(),
|
|
14730
|
+
default: external_exports.string().optional(),
|
|
14731
|
+
/** Its allowed values: listed, or where they come from. */
|
|
14732
|
+
values: external_exports.string().optional()
|
|
14733
|
+
}))
|
|
14734
|
+
})),
|
|
14735
|
+
setup: external_exports.array(external_exports.string()),
|
|
14736
|
+
checks: external_exports.array(external_exports.string()),
|
|
14737
|
+
features: external_exports.array(external_exports.object({
|
|
14738
|
+
title: external_exports.string(),
|
|
14739
|
+
description: external_exports.string().optional(),
|
|
14740
|
+
enable: external_exports.string(),
|
|
14741
|
+
config: external_exports.array(external_exports.object({ file: external_exports.string(), key: external_exports.string(), value: external_exports.string() })),
|
|
14742
|
+
/** Titles of the tasks that do it. */
|
|
14743
|
+
tasks: external_exports.array(external_exports.string())
|
|
14744
|
+
})),
|
|
14745
|
+
config: external_exports.array(external_exports.object({
|
|
14746
|
+
file: external_exports.string(),
|
|
14747
|
+
about: external_exports.string().optional(),
|
|
14748
|
+
keys: external_exports.array(external_exports.object({ key: external_exports.string(), meaning: external_exports.string(), values: external_exports.string().optional(), default: external_exports.string().optional(), advice: external_exports.string().optional() })),
|
|
14749
|
+
/** What runs set in it for themselves; the file is put back after each run. */
|
|
14750
|
+
changes: external_exports.array(external_exports.object({
|
|
14751
|
+
key: external_exports.string(),
|
|
14752
|
+
value: external_exports.string(),
|
|
14753
|
+
note: external_exports.string().optional(),
|
|
14754
|
+
/** Only then (e.g. 本应用启动了模拟器时). */
|
|
14755
|
+
when: external_exports.string().optional(),
|
|
14756
|
+
/** Titles of the tasks that make it. */
|
|
14757
|
+
tasks: external_exports.array(external_exports.string())
|
|
14758
|
+
}))
|
|
14759
|
+
})),
|
|
14760
|
+
troubleshooting: external_exports.array(external_exports.object({ problem: external_exports.string(), cause: external_exports.string().optional(), fix: external_exports.string() }))
|
|
14761
|
+
});
|
|
14711
14762
|
var MirrorLookup = external_exports.object({
|
|
14712
14763
|
rid: external_exports.string(),
|
|
14713
14764
|
version: external_exports.string(),
|
|
@@ -14815,6 +14866,12 @@ var ScriptRequests = {
|
|
|
14815
14866
|
params: ById,
|
|
14816
14867
|
result: ScriptInfo
|
|
14817
14868
|
},
|
|
14869
|
+
/** The script's user guide, from its pack; null without a pack. */
|
|
14870
|
+
"scripts/guide": {
|
|
14871
|
+
capability: SCRIPTS_CAPABILITY,
|
|
14872
|
+
params: ById,
|
|
14873
|
+
result: external_exports.object({ guide: PackGuide.nullable() })
|
|
14874
|
+
},
|
|
14818
14875
|
/** Search GitHub repositories; packs whose repo matches are marked. */
|
|
14819
14876
|
"scripts/search": {
|
|
14820
14877
|
capability: SCRIPTS_CAPABILITY,
|
|
@@ -15058,7 +15115,29 @@ var PackDraft = external_exports.object({
|
|
|
15058
15115
|
/** Tasks the draft declares. */
|
|
15059
15116
|
tasks: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() }))
|
|
15060
15117
|
});
|
|
15118
|
+
var PackVersion = external_exports.object({
|
|
15119
|
+
/** What `packs/restore` takes; `builtin` for the built-in pack. */
|
|
15120
|
+
id: external_exports.string(),
|
|
15121
|
+
/** When it was replaced (absent for the built-in pack). */
|
|
15122
|
+
at: external_exports.number().optional(),
|
|
15123
|
+
builtin: external_exports.boolean().optional(),
|
|
15124
|
+
/** Tasks it declares. */
|
|
15125
|
+
tasks: external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string() }))
|
|
15126
|
+
});
|
|
15127
|
+
var BUILTIN_PACK_VERSION = "builtin";
|
|
15061
15128
|
var PackRequests = {
|
|
15129
|
+
/** What a pack can go back to, the last replaced first, the built-in pack (if a user pack is used instead of it) last. */
|
|
15130
|
+
"packs/history": {
|
|
15131
|
+
capability: PACKS_CAPABILITY,
|
|
15132
|
+
params: external_exports.object({ packId: ScriptId }),
|
|
15133
|
+
result: external_exports.object({ items: external_exports.array(PackVersion) })
|
|
15134
|
+
},
|
|
15135
|
+
/** Put that version back in use. The pack in use now goes into the history, so this can be undone. */
|
|
15136
|
+
"packs/restore": {
|
|
15137
|
+
capability: PACKS_CAPABILITY,
|
|
15138
|
+
params: external_exports.object({ packId: ScriptId, version: external_exports.string().min(1).max(64) }),
|
|
15139
|
+
result: external_exports.object({})
|
|
15140
|
+
},
|
|
15062
15141
|
"packs/drafts": {
|
|
15063
15142
|
capability: PACKS_CAPABILITY,
|
|
15064
15143
|
params: external_exports.object({ scriptId: ScriptId.optional() }),
|
|
@@ -16156,10 +16235,10 @@ var PERMISSIONS_CAPABILITY = "permissions";
|
|
|
16156
16235
|
var PermissionMode = external_exports.enum(["ask", "full"]);
|
|
16157
16236
|
var AreaPolicy = external_exports.enum(["default", "allow", "ask", "deny"]);
|
|
16158
16237
|
var AGENT_AREAS = [
|
|
16159
|
-
{ id: "pipelines-edit", title: "\u7F16\u8F91\u6D41\u6C34\u7EBF\u548C\u5B9A\u65F6", description: "\u8D77\u8349\
|
|
16238
|
+
{ id: "pipelines-edit", title: "\u7F16\u8F91\u6D41\u6C34\u7EBF\u548C\u5B9A\u65F6", description: "\u8D77\u8349\u6D41\u6C34\u7EBF\uFF0C\u300C\u7F16\u6392\u300D\u76F4\u63A5\u4FEE\u6539\u3001\u4FDD\u5B58\u6D41\u6C34\u7EBF\uFF08pipeline_save\uFF09\uFF0C\u8BBE\u5B9A\u65F6\u95F4\uFF08schedule_set\uFF09\uFF0C\u4EE5\u53CA dsh \u81EA\u5DF1\u7684\u5B9A\u65F6\u4EFB\u52A1\u3002", tools: ["pipeline_draft", "pipeline_save", "schedule_set", "schedule_create", "schedule_update", "schedule_delete"] },
|
|
16160
16239
|
{ id: "run", title: "\u8FD0\u884C\u6D41\u6C34\u7EBF\u548C\u811A\u672C", description: "\u542F\u52A8\u3001\u505C\u6B62\u6D41\u6C34\u7EBF\u548C\u811A\u672C\u4EFB\u52A1\u3002", tools: ["pipeline_run", "script_run", "script_stop"] },
|
|
16161
16240
|
{ id: "scripts-config", title: "\u6539\u811A\u672C\u914D\u7F6E", description: "\u4FEE\u6539\u811A\u672C\u7684\u914D\u7F6E\u526F\u672C\u3001\u5BFC\u5165\u914D\u7F6E\u3001\u65B0\u5EFA\u9009\u9879\u3001\u6253\u5F00\u811A\u672C\u81EA\u5DF1\u7684\u8BBE\u7F6E\u754C\u9762\u3001\u8BBE\u7F6E\u6E38\u620F\u4F4D\u7F6E\u3002", tools: ["script_config_set", "script_config_import", "script_choice_create", "script_settings", "game_path_set"] },
|
|
16162
|
-
{ id: "scripts-install", title: "\u5B89\u88C5\u3001\u66F4\u65B0\u3001\u5220\u9664\u811A\u672C", description: "\u4ECE GitHub \u5B89\u88C5\u3001\u66F4\u65B0\u3001\u56DE\u6EDA\u3001\u5220\u9664\u811A\u672C\uFF0C\u8FD0\u884C\u811A\u672C\u7684\u5B89\u88C5\u7A0B\u5E8F\uFF0C\u5BFC\u5165\u672C\u5730\u811A\u672C\uFF0C\u4FEE\u590D\u8FD0\u884C\u73AF\u5883\uFF0C\
|
|
16241
|
+
{ id: "scripts-install", title: "\u5B89\u88C5\u3001\u66F4\u65B0\u3001\u5220\u9664\u811A\u672C", description: "\u4ECE GitHub \u5B89\u88C5\u3001\u66F4\u65B0\u3001\u56DE\u6EDA\u3001\u5220\u9664\u811A\u672C\uFF0C\u8FD0\u884C\u811A\u672C\u7684\u5B89\u88C5\u7A0B\u5E8F\uFF0C\u5BFC\u5165\u672C\u5730\u811A\u672C\uFF0C\u4FEE\u590D\u8FD0\u884C\u73AF\u5883\uFF0C\u5199\u3001\u6539\u811A\u672C\u5305\uFF08pack_propose\uFF0C\u76F4\u63A5\u751F\u6548\uFF09\u3002", tools: ["script_install", "script_update", "script_rollback", "script_remove", "script_setup_run", "script_import", "script_env_fix", "pack_propose"] },
|
|
16163
16242
|
{ id: "screen", title: "\u64CD\u4F5C\u5C4F\u5E55\u548C\u6A21\u62DF\u5668", description: "\u5728\u6E38\u620F\u7A97\u53E3\u6216\u6A21\u62DF\u5668\u91CC\u70B9\u51FB\u3001\u8F93\u5165\u3001\u6309\u952E\u3001\u6ED1\u52A8\u3001\u5207\u6362\u7A97\u53E3\uFF08\u622A\u56FE\u4E0D\u7B97\uFF09\u3002", tools: ["screen_tap", "screen_type", "screen_key", "screen_scroll", "screen_swipe", "window_focus"] },
|
|
16164
16243
|
{ id: "games", title: "\u542F\u52A8\u3001\u5173\u95ED\u6E38\u620F\u548C\u6A21\u62DF\u5668", description: "\u6253\u5F00\u3001\u5173\u6389\u6E38\u620F\uFF0C\u542F\u52A8\u3001\u5173\u95ED\u3001\u5B89\u88C5\u3001\u8BBE\u7F6E\u6A21\u62DF\u5668\u3002", tools: ["game_launch", "game_close", "emulator_start", "emulator_stop", "emulator_install", "emulator_configure"] },
|
|
16165
16244
|
{ id: "game-records", title: "\u8BB0\u5F55\u6D3B\u52A8\u3001\u6DFB\u52A0\u6E38\u620F", description: "\u628A\u8BFB\u5230\u7684\u6D3B\u52A8\u5199\u8FDB\u65E5\u5386\uFF0C\u66FF\u4F60\u6DFB\u52A0\u3001\u4FEE\u6539\u6216\u53BB\u6389\u6D3B\u52A8\uFF0C\u7ED9\u65B0\u6E38\u620F\u5EFA\u6E38\u620F\u5305\u3002", tools: ["game_record", "game_activity_save", "game_activity_remove", "game_add"] },
|
|
@@ -16345,6 +16424,142 @@ var SkillsNotifications = {
|
|
|
16345
16424
|
"skills/changed": external_exports.object({})
|
|
16346
16425
|
};
|
|
16347
16426
|
|
|
16427
|
+
// packages/protocol/lib/handoff-notes.js
|
|
16428
|
+
var BY_YOU = "\u4F60";
|
|
16429
|
+
var QUIET = "\uFF08\u4E0D\u7528\u544A\u8BC9\u7528\u6237\uFF09";
|
|
16430
|
+
var wordsOf = (text) => text.replace(/[^\p{Script=Han}a-zA-Z0-9]/gu, "");
|
|
16431
|
+
function isQuiet(text) {
|
|
16432
|
+
return wordsOf(text) === wordsOf(QUIET);
|
|
16433
|
+
}
|
|
16434
|
+
var RETURNS = "\uFF08\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4F1A\u4F5C\u4E3A\u7ED3\u8BBA\u4EA4\u56DE\u53BB\u3002\u5728\u90A3\u4E4B\u524D\u8981\u8BA9\u5BF9\u65B9\u77E5\u9053\u7684\uFF0C\u7528 agent_message \u7684 update \u8BF4\uFF0C\u9A6C\u4E0A\u9001\u5230\uFF0C\u8BF4\u51E0\u6B21\u90FD\u884C\uFF1B\u4EA4\u56DE\u7ED3\u8BBA\u4EE5\u540E\u8FD8\u6709\u8BDD\uFF0C\u540C\u6837\u53D1\u5230\u8FD9\u6761\u7EBF\u7D22\uFF1A\u4F60\u7684\u666E\u901A\u56DE\u590D\u5BF9\u65B9\u770B\u4E0D\u5230\u3002\uFF09";
|
|
16435
|
+
var RETURNS_BEFORE = "\uFF08\u505A\u5B8C\u540E\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4F1A\u539F\u6837\u4EA4\u56DE\u53BB\uFF1A\u628A\u7ED3\u8BBA\u5199\u5728\u90A3\u91CC\u3002\uFF09";
|
|
16436
|
+
var THREAD_LINE = /^(这件事的线索是 (\S+):做的过程中要问清楚什么,用 agent_message 问,thread 填它;不要猜。)$/;
|
|
16437
|
+
var PAST_HEAD = (who) => `\uFF08\u4F60\u548C${who}\u4E4B\u524D\u7684\u6765\u5F80\uFF0C\u4ECE\u65E7\u5230\u65B0\u3002\u53EF\u80FD\u5DF2\u7ECF\u8FC7\u65F6\uFF1B\u8981\u770B\u5B8C\u6574\u7684\uFF0C\u7528 agent_threads \u5E26 id\uFF1A`;
|
|
16438
|
+
var PAST_LINE = /^(你和.{1,20}之前的来往,/;
|
|
16439
|
+
var PAST_END = "\uFF09";
|
|
16440
|
+
function taskMessage(by, title, body, returns = false, thread, past) {
|
|
16441
|
+
const head = by === BY_YOU ? `\uFF08\u4F60\u5728\u8F6F\u4EF6\u91CC\u70B9\u7684\uFF1A${oneLine(title)}\uFF09` : `\uFF08${by}\u4EA4\u7ED9\u4F60\u7684\u4E8B\uFF1A${oneLine(title)}\uFF09`;
|
|
16442
|
+
const notes = [...returns ? [RETURNS] : [], ...thread === void 0 ? [] : [`\uFF08\u8FD9\u4EF6\u4E8B\u7684\u7EBF\u7D22\u662F ${thread}\uFF1A\u505A\u7684\u8FC7\u7A0B\u4E2D\u8981\u95EE\u6E05\u695A\u4EC0\u4E48\uFF0C\u7528 agent_message \u95EE\uFF0Cthread \u586B\u5B83\uFF1B\u4E0D\u8981\u731C\u3002\uFF09`]];
|
|
16443
|
+
if (past !== void 0 && past.lines.length > 0)
|
|
16444
|
+
notes.push([PAST_HEAD(past.who), ...past.lines, PAST_END].join("\n"));
|
|
16445
|
+
return `${head}
|
|
16446
|
+
${notes.map((n) => `${n}
|
|
16447
|
+
`).join("")}
|
|
16448
|
+
${body}`;
|
|
16449
|
+
}
|
|
16450
|
+
function parseTask(text) {
|
|
16451
|
+
const [first = "", ...rest] = text.split("\n");
|
|
16452
|
+
const mine = /^(你在软件里点的:(.*))$/.exec(first);
|
|
16453
|
+
const theirs = mine === null ? /^(([^():]{1,20})交给你的事:(.*))$/.exec(first) : null;
|
|
16454
|
+
if (mine === null && theirs === null)
|
|
16455
|
+
return void 0;
|
|
16456
|
+
const returns = rest[0] === RETURNS || rest[0] === RETURNS_BEFORE;
|
|
16457
|
+
const after = returns ? rest.slice(1) : rest;
|
|
16458
|
+
const thread = THREAD_LINE.exec(after[0] ?? "")?.[1];
|
|
16459
|
+
const next = thread === void 0 ? after : after.slice(1);
|
|
16460
|
+
const pastEnd = PAST_LINE.test(next[0] ?? "") ? next.indexOf(PAST_END) : -1;
|
|
16461
|
+
return {
|
|
16462
|
+
by: mine !== null ? BY_YOU : theirs[1],
|
|
16463
|
+
title: mine !== null ? mine[1] : theirs[2],
|
|
16464
|
+
returns,
|
|
16465
|
+
...thread === void 0 ? {} : { thread },
|
|
16466
|
+
body: next.slice(pastEnd + 1).join("\n").trim()
|
|
16467
|
+
};
|
|
16468
|
+
}
|
|
16469
|
+
var THREAD_WORDS = { question: "\u95EE\u4F60", answer: "\u56DE\u7B54\u4E86\u4F60", update: "\u544A\u8BC9\u4F60" };
|
|
16470
|
+
function threadTail(kind, thread, reader, closed) {
|
|
16471
|
+
const person = `\u770B\u60C5\u51B5\u544A\u8BC9\u7528\u6237\uFF1A\u6709\u7528\u6237\u8BE5\u77E5\u9053\u7684\uFF0C\u4E00\u4E24\u53E5\u8BDD\u8BF4\u8981\u70B9\uFF1B\u6CA1\u6709\u7684\u8BDD\u6574\u6BB5\u56DE\u590D\u53EA\u5199\u300C${QUIET}\u300D\u3002`;
|
|
16472
|
+
if (closed) {
|
|
16473
|
+
if (kind === "question")
|
|
16474
|
+
return `\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u7684\u8BDD\u3002\u8981\u56DE\u7B54\u7684\u8BDD\u7528 agent_message\uFF1Athread \u586B ${thread}\uFF0Ckind \u586B answer\uFF0C\u4F60\u7684\u666E\u901A\u56DE\u590D\u5BF9\u65B9\u770B\u4E0D\u5230\u3002\uFF09`;
|
|
16475
|
+
return reader === "main" ? `\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u8865\u7684\u8BDD\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002${person}\uFF09` : "\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u8865\u7684\u8BDD\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002\uFF09";
|
|
16476
|
+
}
|
|
16477
|
+
if (kind === "question")
|
|
16478
|
+
return `\uFF08\u5BF9\u65B9\u5728\u7B49\uFF1A\u5148\u56DE\u7B54\u5B83\uFF0C\u518D\u63A5\u7740\u505A\u624B\u4E0A\u7684\u4E8B\u3002\u7528 agent_message \u56DE\u7B54\uFF1Athread \u586B ${thread}\uFF0Ckind \u586B answer\u3002\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4E5F\u7B97\u56DE\u7B54\u3002\u8981\u7B49\u7528\u6237\u51B3\u5B9A\u7684\u8BDD\uFF0C\u5148\u7528 kind: update \u8BF4\u4E00\u58F0\uFF0C\u7B49\u6709\u4E86\u7ED3\u679C\u518D\u56DE\u7B54\u3002\uFF09`;
|
|
16479
|
+
if (kind === "answer" || reader === "worker")
|
|
16480
|
+
return "\uFF08\u63A5\u7740\u505A\u8FD9\u4EF6\u4E8B\u3002\uFF09";
|
|
16481
|
+
return reader === "main" ? `\uFF08\u5B83\u8FD8\u5728\u505A\uFF0C\u8FD9\u662F\u8FC7\u7A0B\u4E2D\u544A\u8BC9\u4F60\u7684\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002${person}\uFF09` : "\uFF08\u5B83\u8FD8\u5728\u505A\uFF0C\u8FD9\u662F\u8FC7\u7A0B\u4E2D\u544A\u8BC9\u4F60\u7684\uFF0C\u4E0D\u7528\u56DE\u5B83\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\u3002\uFF09";
|
|
16482
|
+
}
|
|
16483
|
+
function threadMessage(input) {
|
|
16484
|
+
const head = `\uFF08\u300C${input.from}\u300D\u5728\u7EBF\u7D22 ${input.thread} \u91CC${THREAD_WORDS[input.kind]}\uFF1A${oneLine(input.title)}\uFF09`;
|
|
16485
|
+
return `${head}
|
|
16486
|
+
|
|
16487
|
+
${input.text.trim()}
|
|
16488
|
+
|
|
16489
|
+
${threadTail(input.kind, input.thread, input.reader ?? "worker", input.closed === true)}`;
|
|
16490
|
+
}
|
|
16491
|
+
function parseThreadNote(text) {
|
|
16492
|
+
const [first = "", ...rest] = text.split("\n");
|
|
16493
|
+
const head = /^(「([^」]+)」在线索 (\S+) 里(问你|回答了你|告诉你):(.*))$/.exec(first);
|
|
16494
|
+
if (head === null)
|
|
16495
|
+
return void 0;
|
|
16496
|
+
const body = rest.join("\n").trim();
|
|
16497
|
+
const end = body.lastIndexOf("\n\n\uFF08");
|
|
16498
|
+
return { from: head[1], thread: head[2], kind: head[3] === "\u95EE\u4F60" ? "question" : head[3] === "\u544A\u8BC9\u4F60" ? "update" : "answer", title: head[4], text: (end === -1 ? body : body.slice(0, end)).trim() };
|
|
16499
|
+
}
|
|
16500
|
+
function relayMessage(input) {
|
|
16501
|
+
const head = `\uFF08\u300C${input.agent}\u300D${input.ok ? "\u4EA4\u56DE\u4E86" : "\u6CA1\u6709\u505A\u5B8C"}${input.asker}\u4EA4\u7ED9\u5B83\u7684\u4E8B\uFF1A${oneLine(input.title)}\uFF09`;
|
|
16502
|
+
const tail = input.toLead === true ? input.ok ? "\uFF08\u8FD9\u662F\u4F60\u95EE\u5B83\u7684\u7ED3\u679C\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\uFF0C\u628A\u5B83\u7528\u5230\u4F60\u7684\u7ED3\u8BBA\u91CC\u3002\uFF09" : "\uFF08\u5B83\u6CA1\u505A\u6210\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\uFF0C\u80FD\u7ED5\u8FC7\u53BB\u5C31\u7ED5\u8FC7\u53BB\uFF0C\u7ED5\u4E0D\u8FC7\u53BB\u5C31\u5728\u4F60\u7684\u7ED3\u8BBA\u91CC\u8BF4\u6E05\u695A\u3002\uFF09" : input.ok ? `\uFF08\u770B\u60C5\u51B5\u544A\u8BC9\u7528\u6237\uFF1A\u6709\u7528\u6237\u8BE5\u77E5\u9053\u6216\u8981\u505A\u7684\uFF0C\u7528\u4E00\u4E24\u53E5\u8BDD\u8BF4\u8981\u70B9\uFF0C\u5B8C\u6574\u8FC7\u7A0B\u5728\u300C${input.agent}\u300D\u7684\u5BF9\u8BDD\u91CC\uFF1B\u6CA1\u6709\u7684\u8BDD\u6574\u6BB5\u56DE\u590D\u53EA\u5199\u300C${QUIET}\u300D\u3002\u8FD8\u8981\u522B\u7684 agent \u63A5\u7740\u505A\u7684\uFF0C\u53EF\u4EE5\u518D\u4EA4\u3002\uFF09` : `\uFF08\u544A\u8BC9\u7528\u6237\u54EA\u91CC\u6CA1\u505A\u6210\u3001\u4E3A\u4EC0\u4E48\uFF1B\u9700\u8981\u7684\u8BDD\u6362\u4E2A\u8BF4\u6CD5\u518D\u4EA4\u4E00\u6B21\uFF0C\u6216\u8005\u95EE\u7528\u6237\u3002\uFF09`;
|
|
16503
|
+
const asked = input.consulted !== void 0 && input.consulted.length > 0 ? `
|
|
16504
|
+
|
|
16505
|
+
\uFF08\u505A\u8FD9\u4EF6\u4E8B\u65F6\u5B83\u8FD8\u95EE\u4E86\uFF1A${input.consulted.join("\u3001")}\u3002\uFF09` : "";
|
|
16506
|
+
return `${head}
|
|
16507
|
+
|
|
16508
|
+
${input.reply.trim()}${asked}
|
|
16509
|
+
|
|
16510
|
+
${tail}`;
|
|
16511
|
+
}
|
|
16512
|
+
function threadsBetween(all, a, b) {
|
|
16513
|
+
return all.filter((h) => {
|
|
16514
|
+
const from = h.chain?.at(-2);
|
|
16515
|
+
const to = h.chain?.at(-1);
|
|
16516
|
+
return from === a && to === b || from === b && to === a;
|
|
16517
|
+
});
|
|
16518
|
+
}
|
|
16519
|
+
function parseRelay(text) {
|
|
16520
|
+
const [first = "", ...rest] = text.split("\n");
|
|
16521
|
+
const head = /^(「([^」]+)」(交回了|没有做完)([^()]{1,20}?)交给它的事:(.*))$/.exec(first);
|
|
16522
|
+
if (head === null)
|
|
16523
|
+
return void 0;
|
|
16524
|
+
const body = rest.join("\n").trim();
|
|
16525
|
+
const end = body.lastIndexOf("\n\n\uFF08");
|
|
16526
|
+
return { agent: head[1], ok: head[2] === "\u4EA4\u56DE\u4E86", asker: head[3], title: head[4], reply: (end === -1 ? body : body.slice(0, end)).trim() };
|
|
16527
|
+
}
|
|
16528
|
+
function oneLine(text) {
|
|
16529
|
+
return text.replace(/\s+/g, " ").replace(/[()]/g, (m) => m === "\uFF08" ? "(" : ")").trim();
|
|
16530
|
+
}
|
|
16531
|
+
var REMINDER_NOTE = /\n\n(这是你在线索 \S+ 上定的提醒:[^)]*)$/;
|
|
16532
|
+
function threadReminder(prompt, thread, by) {
|
|
16533
|
+
return `${prompt}
|
|
16534
|
+
|
|
16535
|
+
\uFF08\u8FD9\u662F\u4F60\u5728\u7EBF\u7D22 ${thread} \u4E0A\u5B9A\u7684\u63D0\u9192\uFF1A\u8981\u8BA9${by}\u77E5\u9053\u7684\uFF0C\u5230\u70B9\u540E\u7528 agent_message \u53D1\u7ED9\u5B83\uFF0Cthread \u586B ${thread}\uFF0Ckind \u586B update\uFF1B\u4F60\u7684\u666E\u901A\u56DE\u590D\u5B83\u770B\u4E0D\u5230\u3002\uFF09`;
|
|
16536
|
+
}
|
|
16537
|
+
function reminderPrompts(text) {
|
|
16538
|
+
const single = /^\[SCHEDULE REMINDER\]\n[\s\S]*?^reminder_prompt_json: (.*)$/m.exec(text);
|
|
16539
|
+
if (single !== null)
|
|
16540
|
+
return [jsonString(single[1]).replace(REMINDER_NOTE, "")];
|
|
16541
|
+
const batch = /^\[SCHEDULE REMINDER BATCH\]\n[\s\S]*?^reminders_json: (.*)$/m.exec(text);
|
|
16542
|
+
if (batch === null)
|
|
16543
|
+
return void 0;
|
|
16544
|
+
try {
|
|
16545
|
+
const items = JSON.parse(batch[1]);
|
|
16546
|
+
return items.map((item) => String(item.reminder_prompt ?? "").replace(REMINDER_NOTE, "")).filter((p) => p !== "");
|
|
16547
|
+
} catch {
|
|
16548
|
+
return [];
|
|
16549
|
+
}
|
|
16550
|
+
}
|
|
16551
|
+
function reminderLine(prompts) {
|
|
16552
|
+
return prompts.length === 0 ? "\u5B9A\u65F6\u63D0\u9192" : `\u5B9A\u65F6\u63D0\u9192\uFF1A${prompts.map((p) => oneLine(p)).join("\uFF1B")}`;
|
|
16553
|
+
}
|
|
16554
|
+
function jsonString(json2) {
|
|
16555
|
+
try {
|
|
16556
|
+
const value = JSON.parse(json2);
|
|
16557
|
+
return typeof value === "string" ? value : json2;
|
|
16558
|
+
} catch {
|
|
16559
|
+
return json2;
|
|
16560
|
+
}
|
|
16561
|
+
}
|
|
16562
|
+
|
|
16348
16563
|
// packages/protocol/lib/persona.js
|
|
16349
16564
|
var PERSONA_CAPABILITY = "persona";
|
|
16350
16565
|
var PersonaStyle = external_exports.enum(["default", "concise", "patient", "lively", "buddy", "butler"]);
|
|
@@ -16371,6 +16586,34 @@ var PersonaAnswer = PersonaSettings.extend({
|
|
|
16371
16586
|
/** The same, as it is for each agent, by id. */
|
|
16372
16587
|
prompts: external_exports.record(external_exports.string(), external_exports.string())
|
|
16373
16588
|
});
|
|
16589
|
+
var STYLE_TEXT = {
|
|
16590
|
+
default: "",
|
|
16591
|
+
concise: "\u56DE\u7B54\u7B80\u77ED\u76F4\u63A5\uFF1A\u5148\u7ED9\u7ED3\u8BBA\uFF0C\u518D\u7ED9\u5FC5\u8981\u7684\u7EC6\u8282\uFF1B\u5C11\u5BD2\u6684\uFF0C\u4E0D\u7528\u8868\u60C5\u3002",
|
|
16592
|
+
patient: "\u8010\u5FC3\u3001\u8BB2\u6E05\u695A\uFF1A\u6BCF\u4E00\u6B65\u8BF4\u660E\u4E3A\u4EC0\u4E48\u8FD9\u4E48\u505A\uFF0C\u7528\u5BF9\u65B9\u542C\u5F97\u61C2\u7684\u8BDD\uFF0C\u50CF\u6559\u4E00\u4E2A\u521A\u63A5\u89E6\u7684\u4EBA\u3002",
|
|
16593
|
+
lively: "\u8BED\u6C14\u8F7B\u677E\u6D3B\u6CFC\uFF0C\u53EF\u4EE5\u7528\u4E00\u70B9\u8BED\u6C14\u8BCD\u548C\u8868\u60C5\uFF0C\u4F46\u4FE1\u606F\u8981\u51C6\u786E\u3001\u4E0D\u5570\u55E6\u3002",
|
|
16594
|
+
buddy: "\u50CF\u4E00\u8D77\u73A9\u6E38\u620F\u7684\u8001\u670B\u53CB\u90A3\u6837\u8BF4\u8BDD\uFF1A\u719F\u6089\u6E38\u620F\u91CC\u7684\u8BF4\u6CD5\uFF0C\u53EF\u4EE5\u9002\u5F53\u5410\u69FD\u548C\u9F13\u52B1\uFF0C\u4F46\u4E0D\u5938\u5F20\u3001\u4E0D\u6CB9\u817B\u3002",
|
|
16595
|
+
butler: "\u50CF\u4E00\u4F4D\u7A33\u91CD\u5468\u5230\u7684\u7BA1\u5BB6\uFF1A\u793C\u8C8C\u3001\u6761\u7406\u6E05\u695A\uFF0C\u4E3B\u52A8\u6C47\u62A5\u8FDB\u5EA6\u548C\u9700\u8981\u5BF9\u65B9\u51B3\u5B9A\u7684\u4E8B\u3002"
|
|
16596
|
+
};
|
|
16597
|
+
function personaOf(settings, agentId) {
|
|
16598
|
+
const own = Object.entries(settings.agents[agentId] ?? {}).filter(([, value]) => value !== void 0);
|
|
16599
|
+
return { ...settings.persona, ...Object.fromEntries(own) };
|
|
16600
|
+
}
|
|
16601
|
+
function personaPrompt(p) {
|
|
16602
|
+
const lines = [];
|
|
16603
|
+
if (p.name !== void 0 && p.name.trim() !== "")
|
|
16604
|
+
lines.push(`\u4F60\u7684\u540D\u5B57\u662F\u300C${p.name.trim()}\u300D\uFF0C\u81EA\u79F0\u65F6\u7528\u8FD9\u4E2A\u540D\u5B57\u3002`);
|
|
16605
|
+
if (p.callUser !== void 0 && p.callUser.trim() !== "")
|
|
16606
|
+
lines.push(`\u79F0\u547C\u7528\u6237\u4E3A\u300C${p.callUser.trim()}\u300D\u3002`);
|
|
16607
|
+
if (STYLE_TEXT[p.style] !== "")
|
|
16608
|
+
lines.push(STYLE_TEXT[p.style]);
|
|
16609
|
+
if (p.custom !== void 0 && p.custom.trim() !== "")
|
|
16610
|
+
lines.push(`\u7528\u6237\u5BF9\u4F60\u8BF4\u8BDD\u65B9\u5F0F\u7684\u8981\u6C42\uFF1A${p.custom.trim()}`);
|
|
16611
|
+
if (lines.length === 0)
|
|
16612
|
+
return "";
|
|
16613
|
+
lines.push(p.peerStyle === "same" ? "\u548C\u5176\u4ED6 agent \u8BF4\u8BDD\u65F6\u4E5F\u7528\u8FD9\u4E2A\u65B9\u5F0F\u3002" : "\u4E0A\u9762\u662F\u5BF9\u7528\u6237\u8BF4\u8BDD\u7684\u65B9\u5F0F\u3002\u548C\u5176\u4ED6 agent \u8BF4\u8BDD\uFF08agent_delegate\u3001agent_message\u3001\u4EA4\u56DE\u53BB\u7684\u7ED3\u8BBA\uFF09\u7528\u5E73\u5B9E\u7684\u8BDD\uFF0C\u76F4\u63A5\u8BF4\u4E8B\uFF0C\u4E0D\u7528\u4EBA\u8BBE\u548C\u79F0\u547C\uFF1A\u5B83\u4EEC\u8981\u8BFB\u7684\u662F\u5185\u5BB9\u3002");
|
|
16614
|
+
lines.push(`\u8F6F\u4EF6\u7EA6\u5B9A\u7684\u56FA\u5B9A\u5199\u6CD5\uFF08\u6BD4\u5982\u300C${QUIET}\u300D\u8FD9\u4E00\u53E5\u3001\u7EBF\u7D22\u7F16\u53F7\u3001\u5DE5\u5177\u7684\u53C2\u6570\uFF09\u4E00\u5B57\u4E0D\u5DEE\u7167\u5199\uFF0C\u4E0D\u52A0\u8BED\u6C14\u8BCD\u548C\u8868\u60C5\u3002`);
|
|
16615
|
+
return ["# \u56DE\u590D\u98CE\u683C", ...lines, "\u8FD9\u4E9B\u53EA\u5F71\u54CD\u4F60\u8BF4\u8BDD\u7684\u65B9\u5F0F\uFF0C\u4E0D\u6539\u53D8\u505A\u4E8B\u7684\u89C4\u5219\uFF1A\u786E\u8BA4\u3001\u5B89\u5168\u9650\u5236\u548C\u4E0D\u80FD\u505A\u7684\u4E8B\u90FD\u7167\u65E7\uFF1B\u5728\u98DE\u4E66\u91CC\u56DE\u590D\u4E5F\u4E00\u6837\u3002"].join("\n");
|
|
16616
|
+
}
|
|
16374
16617
|
var PersonaRequests = {
|
|
16375
16618
|
"persona/get": {
|
|
16376
16619
|
capability: PERSONA_CAPABILITY,
|
|
@@ -16387,13 +16630,21 @@ var PersonaRequests = {
|
|
|
16387
16630
|
// packages/protocol/lib/compaction.js
|
|
16388
16631
|
var COMPACTION_CAPABILITY = "compaction";
|
|
16389
16632
|
var DEFAULT_COMPACTION_THRESHOLD = 80;
|
|
16390
|
-
var MIN_COMPACTION_THRESHOLD =
|
|
16391
|
-
var MAX_COMPACTION_THRESHOLD =
|
|
16633
|
+
var MIN_COMPACTION_THRESHOLD = 5;
|
|
16634
|
+
var MAX_COMPACTION_THRESHOLD = 100;
|
|
16635
|
+
var LOW_CONTEXT_WINDOW_MS = 12 * 60 * 6e4;
|
|
16636
|
+
var MIN_ARCHIVE_DAYS = 1;
|
|
16637
|
+
var MAX_ARCHIVE_DAYS = 365;
|
|
16638
|
+
var ARCHIVE_MARK = "\uFF08\u5DF2\u5F52\u6863\uFF09";
|
|
16392
16639
|
var CompactionSettings = external_exports.object({
|
|
16393
16640
|
/** Compact by itself when the conversation is long; off: a too-long conversation fails until compacted by hand. */
|
|
16394
16641
|
auto: external_exports.boolean(),
|
|
16395
16642
|
/** How full the context window gets before compacting, in percent. */
|
|
16396
|
-
threshold: external_exports.number().int().min(MIN_COMPACTION_THRESHOLD).max(MAX_COMPACTION_THRESHOLD)
|
|
16643
|
+
threshold: external_exports.number().int().min(MIN_COMPACTION_THRESHOLD).max(MAX_COMPACTION_THRESHOLD),
|
|
16644
|
+
/** Low-context mode: keep only the last 12 hours and the summary in the context. */
|
|
16645
|
+
lowContext: external_exports.boolean(),
|
|
16646
|
+
/** With low-context mode: summaries of conversation older than this many days leave the context too; null: they stay. */
|
|
16647
|
+
archiveDays: external_exports.number().int().min(MIN_ARCHIVE_DAYS).max(MAX_ARCHIVE_DAYS).nullable().default(null)
|
|
16397
16648
|
});
|
|
16398
16649
|
var State = external_exports.object({ settings: CompactionSettings, applied: CompactionSettings });
|
|
16399
16650
|
var CompactionRequests = {
|
|
@@ -16409,6 +16660,77 @@ var CompactionRequests = {
|
|
|
16409
16660
|
}
|
|
16410
16661
|
};
|
|
16411
16662
|
|
|
16663
|
+
// packages/protocol/lib/memory.js
|
|
16664
|
+
var MEMORY_CAPABILITY = "memory";
|
|
16665
|
+
var SHARED_MEMORY = "shared";
|
|
16666
|
+
var MemoryKind = external_exports.enum(["profile", "journal", "core"]);
|
|
16667
|
+
var MAX_CORE_CHARS = 2e3;
|
|
16668
|
+
var MemorySource = external_exports.object({
|
|
16669
|
+
/** The lead agent whose conversation it is (only that agent reads it back). */
|
|
16670
|
+
agent: external_exports.string(),
|
|
16671
|
+
sessionId: external_exports.string(),
|
|
16672
|
+
seq: external_exports.number().int().min(0)
|
|
16673
|
+
});
|
|
16674
|
+
var MAX_MEMORY_TEXT = 600;
|
|
16675
|
+
var MemoryEntry = external_exports.object({
|
|
16676
|
+
id: external_exports.string(),
|
|
16677
|
+
kind: MemoryKind,
|
|
16678
|
+
/** `shared`, or the id of the agent whose own it is. */
|
|
16679
|
+
scope: external_exports.string(),
|
|
16680
|
+
text: external_exports.string(),
|
|
16681
|
+
/** ISO time it was written, and last changed. */
|
|
16682
|
+
createdAt: external_exports.string(),
|
|
16683
|
+
updatedAt: external_exports.string(),
|
|
16684
|
+
/** Who wrote it: an agent id, `user` (设置 → 记忆), or `auto` (read back from a conversation). */
|
|
16685
|
+
by: external_exports.string(),
|
|
16686
|
+
/** Where it was learned; absent for what the user wrote on 设置 → 记忆, and for entries from before this was kept. */
|
|
16687
|
+
source: MemorySource.optional()
|
|
16688
|
+
});
|
|
16689
|
+
var MemoryAutoSettings = external_exports.object({
|
|
16690
|
+
auto: external_exports.boolean(),
|
|
16691
|
+
/** Same shape as ModelSelection (methods.ts), which imports this file. */
|
|
16692
|
+
model: external_exports.object({ provider: external_exports.string(), model: external_exports.string(), reasoningEffort: external_exports.string().optional() }).nullable()
|
|
16693
|
+
});
|
|
16694
|
+
var MemoryText = external_exports.string().trim().min(1).max(MAX_MEMORY_TEXT);
|
|
16695
|
+
var MemoryRequests = {
|
|
16696
|
+
"memory/list": {
|
|
16697
|
+
capability: MEMORY_CAPABILITY,
|
|
16698
|
+
params: external_exports.object({}),
|
|
16699
|
+
/** Newest first. */
|
|
16700
|
+
result: external_exports.object({ items: external_exports.array(MemoryEntry) })
|
|
16701
|
+
},
|
|
16702
|
+
"memory/add": {
|
|
16703
|
+
capability: MEMORY_CAPABILITY,
|
|
16704
|
+
params: external_exports.object({ kind: MemoryKind, scope: external_exports.string().min(1).max(64), text: MemoryText }),
|
|
16705
|
+
result: external_exports.object({ item: MemoryEntry })
|
|
16706
|
+
},
|
|
16707
|
+
"memory/update": {
|
|
16708
|
+
capability: MEMORY_CAPABILITY,
|
|
16709
|
+
params: external_exports.object({ id: external_exports.string(), text: MemoryText, kind: MemoryKind.optional(), scope: external_exports.string().min(1).max(64).optional() }),
|
|
16710
|
+
result: external_exports.object({ item: MemoryEntry })
|
|
16711
|
+
},
|
|
16712
|
+
"memory/auto/get": {
|
|
16713
|
+
capability: MEMORY_CAPABILITY,
|
|
16714
|
+
params: external_exports.object({}),
|
|
16715
|
+
/** `forced`: on whatever `auto` says, because low-context mode is on (compaction.ts). */
|
|
16716
|
+
result: MemoryAutoSettings.extend({ forced: external_exports.boolean().optional() })
|
|
16717
|
+
},
|
|
16718
|
+
"memory/auto/set": {
|
|
16719
|
+
capability: MEMORY_CAPABILITY,
|
|
16720
|
+
params: MemoryAutoSettings,
|
|
16721
|
+
result: MemoryAutoSettings
|
|
16722
|
+
},
|
|
16723
|
+
"memory/remove": {
|
|
16724
|
+
capability: MEMORY_CAPABILITY,
|
|
16725
|
+
params: external_exports.object({ id: external_exports.string() }),
|
|
16726
|
+
result: external_exports.object({ removed: external_exports.boolean() })
|
|
16727
|
+
}
|
|
16728
|
+
};
|
|
16729
|
+
var MemoryNotifications = {
|
|
16730
|
+
/** An entry was written, changed or forgotten; re-read `memory/list`. */
|
|
16731
|
+
"memory/changed": external_exports.object({})
|
|
16732
|
+
};
|
|
16733
|
+
|
|
16412
16734
|
// packages/protocol/lib/runs.js
|
|
16413
16735
|
var RUNS_CAPABILITY = "runs";
|
|
16414
16736
|
var RunState = external_exports.enum(["starting", "running", "stopping", "succeeded", "failed", "cancelled"]);
|
|
@@ -17141,6 +17463,16 @@ var PromptImage = external_exports.object({
|
|
|
17141
17463
|
data: external_exports.string().min(1).max(MAX_IMAGE_BASE64).regex(/^[A-Za-z0-9+/]+={0,2}$/, "base64 without a data: prefix"),
|
|
17142
17464
|
name: external_exports.string().max(200).optional()
|
|
17143
17465
|
});
|
|
17466
|
+
var ReleaseNote = external_exports.object({
|
|
17467
|
+
version: external_exports.string(),
|
|
17468
|
+
/** The release's own title, when it has one. */
|
|
17469
|
+
title: external_exports.string().optional(),
|
|
17470
|
+
publishedAt: external_exports.string().optional(),
|
|
17471
|
+
/** Its page on GitHub. */
|
|
17472
|
+
url: external_exports.string(),
|
|
17473
|
+
/** Markdown. */
|
|
17474
|
+
body: external_exports.string()
|
|
17475
|
+
});
|
|
17144
17476
|
var Empty2 = external_exports.object({});
|
|
17145
17477
|
var Accepted = external_exports.object({ accepted: external_exports.literal(true) });
|
|
17146
17478
|
var Requests = {
|
|
@@ -17389,14 +17721,15 @@ var Requests = {
|
|
|
17389
17721
|
/**
|
|
17390
17722
|
* The plugin package's newest release on GitHub, if newer than this one (a pre-release only for a
|
|
17391
17723
|
* pre-release). `onNpm`: npm already serves it under the plugin's name (a release is live there only
|
|
17392
|
-
* once approved); undefined when npm could not be asked.
|
|
17724
|
+
* once approved); undefined when npm could not be asked. `notes`: what each release from this one up
|
|
17725
|
+
* to it brings (its GitHub Release text), newest first. Only the plugin package checks here.
|
|
17393
17726
|
*/
|
|
17394
17727
|
"about/checkUpdate": {
|
|
17395
17728
|
capability: "about",
|
|
17396
17729
|
params: Empty2,
|
|
17397
17730
|
result: external_exports.object({
|
|
17398
17731
|
current: external_exports.string(),
|
|
17399
|
-
latest: external_exports.object({ version: external_exports.string(), prerelease: external_exports.boolean(), notesUrl: external_exports.string(), onNpm: external_exports.boolean().optional() }).optional(),
|
|
17732
|
+
latest: external_exports.object({ version: external_exports.string(), prerelease: external_exports.boolean(), notesUrl: external_exports.string(), onNpm: external_exports.boolean().optional(), notes: external_exports.array(ReleaseNote).optional() }).optional(),
|
|
17400
17733
|
checkedAt: external_exports.number()
|
|
17401
17734
|
})
|
|
17402
17735
|
},
|
|
@@ -17477,7 +17810,8 @@ var Requests = {
|
|
|
17477
17810
|
...SkillsRequests,
|
|
17478
17811
|
...SkillHubRequests,
|
|
17479
17812
|
...PersonaRequests,
|
|
17480
|
-
...CompactionRequests
|
|
17813
|
+
...CompactionRequests,
|
|
17814
|
+
...MemoryRequests
|
|
17481
17815
|
};
|
|
17482
17816
|
var SessionsChanged = external_exports.discriminatedUnion("kind", [
|
|
17483
17817
|
external_exports.object({ kind: external_exports.literal("upsert"), item: SessionItem.partial().extend({ id: external_exports.string() }) }),
|
|
@@ -17533,7 +17867,8 @@ var Notifications = {
|
|
|
17533
17867
|
...GamesNotifications,
|
|
17534
17868
|
...PermissionsNotifications,
|
|
17535
17869
|
...QuestionsNotifications,
|
|
17536
|
-
...InstancesNotifications
|
|
17870
|
+
...InstancesNotifications,
|
|
17871
|
+
...MemoryNotifications
|
|
17537
17872
|
};
|
|
17538
17873
|
var ErrorCode = {
|
|
17539
17874
|
ParseError: -32700,
|
|
@@ -17574,142 +17909,6 @@ function classify(value) {
|
|
|
17574
17909
|
return "invalid";
|
|
17575
17910
|
}
|
|
17576
17911
|
|
|
17577
|
-
// packages/protocol/lib/handoff-notes.js
|
|
17578
|
-
var BY_YOU = "\u4F60";
|
|
17579
|
-
var QUIET = "\uFF08\u4E0D\u7528\u544A\u8BC9\u7528\u6237\uFF09";
|
|
17580
|
-
var wordsOf = (text) => text.replace(/[^\p{Script=Han}a-zA-Z0-9]/gu, "");
|
|
17581
|
-
function isQuiet(text) {
|
|
17582
|
-
return wordsOf(text) === wordsOf(QUIET);
|
|
17583
|
-
}
|
|
17584
|
-
var RETURNS = "\uFF08\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4F1A\u4F5C\u4E3A\u7ED3\u8BBA\u4EA4\u56DE\u53BB\u3002\u5728\u90A3\u4E4B\u524D\u8981\u8BA9\u5BF9\u65B9\u77E5\u9053\u7684\uFF0C\u7528 agent_message \u7684 update \u8BF4\uFF0C\u9A6C\u4E0A\u9001\u5230\uFF0C\u8BF4\u51E0\u6B21\u90FD\u884C\uFF1B\u4EA4\u56DE\u7ED3\u8BBA\u4EE5\u540E\u8FD8\u6709\u8BDD\uFF0C\u540C\u6837\u53D1\u5230\u8FD9\u6761\u7EBF\u7D22\uFF1A\u4F60\u7684\u666E\u901A\u56DE\u590D\u5BF9\u65B9\u770B\u4E0D\u5230\u3002\uFF09";
|
|
17585
|
-
var RETURNS_BEFORE = "\uFF08\u505A\u5B8C\u540E\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4F1A\u539F\u6837\u4EA4\u56DE\u53BB\uFF1A\u628A\u7ED3\u8BBA\u5199\u5728\u90A3\u91CC\u3002\uFF09";
|
|
17586
|
-
var THREAD_LINE = /^(这件事的线索是 (\S+):做的过程中要问清楚什么,用 agent_message 问,thread 填它;不要猜。)$/;
|
|
17587
|
-
var PAST_HEAD = (who) => `\uFF08\u4F60\u548C${who}\u4E4B\u524D\u7684\u6765\u5F80\uFF0C\u4ECE\u65E7\u5230\u65B0\u3002\u53EF\u80FD\u5DF2\u7ECF\u8FC7\u65F6\uFF1B\u8981\u770B\u5B8C\u6574\u7684\uFF0C\u7528 agent_threads \u5E26 id\uFF1A`;
|
|
17588
|
-
var PAST_LINE = /^(你和.{1,20}之前的来往,/;
|
|
17589
|
-
var PAST_END = "\uFF09";
|
|
17590
|
-
function taskMessage(by, title, body, returns = false, thread, past) {
|
|
17591
|
-
const head = by === BY_YOU ? `\uFF08\u4F60\u5728\u8F6F\u4EF6\u91CC\u70B9\u7684\uFF1A${oneLine(title)}\uFF09` : `\uFF08${by}\u4EA4\u7ED9\u4F60\u7684\u4E8B\uFF1A${oneLine(title)}\uFF09`;
|
|
17592
|
-
const notes = [...returns ? [RETURNS] : [], ...thread === void 0 ? [] : [`\uFF08\u8FD9\u4EF6\u4E8B\u7684\u7EBF\u7D22\u662F ${thread}\uFF1A\u505A\u7684\u8FC7\u7A0B\u4E2D\u8981\u95EE\u6E05\u695A\u4EC0\u4E48\uFF0C\u7528 agent_message \u95EE\uFF0Cthread \u586B\u5B83\uFF1B\u4E0D\u8981\u731C\u3002\uFF09`]];
|
|
17593
|
-
if (past !== void 0 && past.lines.length > 0)
|
|
17594
|
-
notes.push([PAST_HEAD(past.who), ...past.lines, PAST_END].join("\n"));
|
|
17595
|
-
return `${head}
|
|
17596
|
-
${notes.map((n) => `${n}
|
|
17597
|
-
`).join("")}
|
|
17598
|
-
${body}`;
|
|
17599
|
-
}
|
|
17600
|
-
function parseTask(text) {
|
|
17601
|
-
const [first = "", ...rest] = text.split("\n");
|
|
17602
|
-
const mine = /^(你在软件里点的:(.*))$/.exec(first);
|
|
17603
|
-
const theirs = mine === null ? /^(([^():]{1,20})交给你的事:(.*))$/.exec(first) : null;
|
|
17604
|
-
if (mine === null && theirs === null)
|
|
17605
|
-
return void 0;
|
|
17606
|
-
const returns = rest[0] === RETURNS || rest[0] === RETURNS_BEFORE;
|
|
17607
|
-
const after = returns ? rest.slice(1) : rest;
|
|
17608
|
-
const thread = THREAD_LINE.exec(after[0] ?? "")?.[1];
|
|
17609
|
-
const next = thread === void 0 ? after : after.slice(1);
|
|
17610
|
-
const pastEnd = PAST_LINE.test(next[0] ?? "") ? next.indexOf(PAST_END) : -1;
|
|
17611
|
-
return {
|
|
17612
|
-
by: mine !== null ? BY_YOU : theirs[1],
|
|
17613
|
-
title: mine !== null ? mine[1] : theirs[2],
|
|
17614
|
-
returns,
|
|
17615
|
-
...thread === void 0 ? {} : { thread },
|
|
17616
|
-
body: next.slice(pastEnd + 1).join("\n").trim()
|
|
17617
|
-
};
|
|
17618
|
-
}
|
|
17619
|
-
var THREAD_WORDS = { question: "\u95EE\u4F60", answer: "\u56DE\u7B54\u4E86\u4F60", update: "\u544A\u8BC9\u4F60" };
|
|
17620
|
-
function threadTail(kind, thread, reader, closed) {
|
|
17621
|
-
const person = `\u770B\u60C5\u51B5\u544A\u8BC9\u7528\u6237\uFF1A\u6709\u7528\u6237\u8BE5\u77E5\u9053\u7684\uFF0C\u4E00\u4E24\u53E5\u8BDD\u8BF4\u8981\u70B9\uFF1B\u6CA1\u6709\u7684\u8BDD\u6574\u6BB5\u56DE\u590D\u53EA\u5199\u300C${QUIET}\u300D\u3002`;
|
|
17622
|
-
if (closed) {
|
|
17623
|
-
if (kind === "question")
|
|
17624
|
-
return `\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u7684\u8BDD\u3002\u8981\u56DE\u7B54\u7684\u8BDD\u7528 agent_message\uFF1Athread \u586B ${thread}\uFF0Ckind \u586B answer\uFF0C\u4F60\u7684\u666E\u901A\u56DE\u590D\u5BF9\u65B9\u770B\u4E0D\u5230\u3002\uFF09`;
|
|
17625
|
-
return reader === "main" ? `\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u8865\u7684\u8BDD\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002${person}\uFF09` : "\uFF08\u8FD9\u4EF6\u4E8B\u5DF2\u7ECF\u4EA4\u56DE\u4E86\uFF0C\u8FD9\u662F\u540E\u9762\u8865\u7684\u8BDD\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002\uFF09";
|
|
17626
|
-
}
|
|
17627
|
-
if (kind === "question")
|
|
17628
|
-
return `\uFF08\u5BF9\u65B9\u5728\u7B49\uFF1A\u5148\u56DE\u7B54\u5B83\uFF0C\u518D\u63A5\u7740\u505A\u624B\u4E0A\u7684\u4E8B\u3002\u7528 agent_message \u56DE\u7B54\uFF1Athread \u586B ${thread}\uFF0Ckind \u586B answer\u3002\u4F60\u8FD9\u4E00\u8F6E\u7684\u6700\u540E\u4E00\u6BB5\u56DE\u590D\u4E5F\u7B97\u56DE\u7B54\u3002\u8981\u7B49\u7528\u6237\u51B3\u5B9A\u7684\u8BDD\uFF0C\u5148\u7528 kind: update \u8BF4\u4E00\u58F0\uFF0C\u7B49\u6709\u4E86\u7ED3\u679C\u518D\u56DE\u7B54\u3002\uFF09`;
|
|
17629
|
-
if (kind === "answer" || reader === "worker")
|
|
17630
|
-
return "\uFF08\u63A5\u7740\u505A\u8FD9\u4EF6\u4E8B\u3002\uFF09";
|
|
17631
|
-
return reader === "main" ? `\uFF08\u5B83\u8FD8\u5728\u505A\uFF0C\u8FD9\u662F\u8FC7\u7A0B\u4E2D\u544A\u8BC9\u4F60\u7684\uFF0C\u4E0D\u7528\u56DE\u5B83\u3002${person}\uFF09` : "\uFF08\u5B83\u8FD8\u5728\u505A\uFF0C\u8FD9\u662F\u8FC7\u7A0B\u4E2D\u544A\u8BC9\u4F60\u7684\uFF0C\u4E0D\u7528\u56DE\u5B83\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\u3002\uFF09";
|
|
17632
|
-
}
|
|
17633
|
-
function threadMessage(input) {
|
|
17634
|
-
const head = `\uFF08\u300C${input.from}\u300D\u5728\u7EBF\u7D22 ${input.thread} \u91CC${THREAD_WORDS[input.kind]}\uFF1A${oneLine(input.title)}\uFF09`;
|
|
17635
|
-
return `${head}
|
|
17636
|
-
|
|
17637
|
-
${input.text.trim()}
|
|
17638
|
-
|
|
17639
|
-
${threadTail(input.kind, input.thread, input.reader ?? "worker", input.closed === true)}`;
|
|
17640
|
-
}
|
|
17641
|
-
function parseThreadNote(text) {
|
|
17642
|
-
const [first = "", ...rest] = text.split("\n");
|
|
17643
|
-
const head = /^(「([^」]+)」在线索 (\S+) 里(问你|回答了你|告诉你):(.*))$/.exec(first);
|
|
17644
|
-
if (head === null)
|
|
17645
|
-
return void 0;
|
|
17646
|
-
const body = rest.join("\n").trim();
|
|
17647
|
-
const end = body.lastIndexOf("\n\n\uFF08");
|
|
17648
|
-
return { from: head[1], thread: head[2], kind: head[3] === "\u95EE\u4F60" ? "question" : head[3] === "\u544A\u8BC9\u4F60" ? "update" : "answer", title: head[4], text: (end === -1 ? body : body.slice(0, end)).trim() };
|
|
17649
|
-
}
|
|
17650
|
-
function relayMessage(input) {
|
|
17651
|
-
const head = `\uFF08\u300C${input.agent}\u300D${input.ok ? "\u4EA4\u56DE\u4E86" : "\u6CA1\u6709\u505A\u5B8C"}${input.asker}\u4EA4\u7ED9\u5B83\u7684\u4E8B\uFF1A${oneLine(input.title)}\uFF09`;
|
|
17652
|
-
const tail = input.toLead === true ? input.ok ? "\uFF08\u8FD9\u662F\u4F60\u95EE\u5B83\u7684\u7ED3\u679C\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\uFF0C\u628A\u5B83\u7528\u5230\u4F60\u7684\u7ED3\u8BBA\u91CC\u3002\uFF09" : "\uFF08\u5B83\u6CA1\u505A\u6210\uFF1A\u63A5\u7740\u505A\u4F60\u624B\u4E0A\u7684\u4E8B\uFF0C\u80FD\u7ED5\u8FC7\u53BB\u5C31\u7ED5\u8FC7\u53BB\uFF0C\u7ED5\u4E0D\u8FC7\u53BB\u5C31\u5728\u4F60\u7684\u7ED3\u8BBA\u91CC\u8BF4\u6E05\u695A\u3002\uFF09" : input.ok ? `\uFF08\u770B\u60C5\u51B5\u544A\u8BC9\u7528\u6237\uFF1A\u6709\u7528\u6237\u8BE5\u77E5\u9053\u6216\u8981\u505A\u7684\uFF0C\u7528\u4E00\u4E24\u53E5\u8BDD\u8BF4\u8981\u70B9\uFF0C\u5B8C\u6574\u8FC7\u7A0B\u5728\u300C${input.agent}\u300D\u7684\u5BF9\u8BDD\u91CC\uFF1B\u6CA1\u6709\u7684\u8BDD\u6574\u6BB5\u56DE\u590D\u53EA\u5199\u300C${QUIET}\u300D\u3002\u8FD8\u8981\u522B\u7684 agent \u63A5\u7740\u505A\u7684\uFF0C\u53EF\u4EE5\u518D\u4EA4\u3002\uFF09` : `\uFF08\u544A\u8BC9\u7528\u6237\u54EA\u91CC\u6CA1\u505A\u6210\u3001\u4E3A\u4EC0\u4E48\uFF1B\u9700\u8981\u7684\u8BDD\u6362\u4E2A\u8BF4\u6CD5\u518D\u4EA4\u4E00\u6B21\uFF0C\u6216\u8005\u95EE\u7528\u6237\u3002\uFF09`;
|
|
17653
|
-
const asked = input.consulted !== void 0 && input.consulted.length > 0 ? `
|
|
17654
|
-
|
|
17655
|
-
\uFF08\u505A\u8FD9\u4EF6\u4E8B\u65F6\u5B83\u8FD8\u95EE\u4E86\uFF1A${input.consulted.join("\u3001")}\u3002\uFF09` : "";
|
|
17656
|
-
return `${head}
|
|
17657
|
-
|
|
17658
|
-
${input.reply.trim()}${asked}
|
|
17659
|
-
|
|
17660
|
-
${tail}`;
|
|
17661
|
-
}
|
|
17662
|
-
function threadsBetween(all, a, b) {
|
|
17663
|
-
return all.filter((h) => {
|
|
17664
|
-
const from = h.chain?.at(-2);
|
|
17665
|
-
const to = h.chain?.at(-1);
|
|
17666
|
-
return from === a && to === b || from === b && to === a;
|
|
17667
|
-
});
|
|
17668
|
-
}
|
|
17669
|
-
function parseRelay(text) {
|
|
17670
|
-
const [first = "", ...rest] = text.split("\n");
|
|
17671
|
-
const head = /^(「([^」]+)」(交回了|没有做完)([^()]{1,20}?)交给它的事:(.*))$/.exec(first);
|
|
17672
|
-
if (head === null)
|
|
17673
|
-
return void 0;
|
|
17674
|
-
const body = rest.join("\n").trim();
|
|
17675
|
-
const end = body.lastIndexOf("\n\n\uFF08");
|
|
17676
|
-
return { agent: head[1], ok: head[2] === "\u4EA4\u56DE\u4E86", asker: head[3], title: head[4], reply: (end === -1 ? body : body.slice(0, end)).trim() };
|
|
17677
|
-
}
|
|
17678
|
-
function oneLine(text) {
|
|
17679
|
-
return text.replace(/\s+/g, " ").replace(/[()]/g, (m) => m === "\uFF08" ? "(" : ")").trim();
|
|
17680
|
-
}
|
|
17681
|
-
var REMINDER_NOTE = /\n\n(这是你在线索 \S+ 上定的提醒:[^)]*)$/;
|
|
17682
|
-
function threadReminder(prompt, thread, by) {
|
|
17683
|
-
return `${prompt}
|
|
17684
|
-
|
|
17685
|
-
\uFF08\u8FD9\u662F\u4F60\u5728\u7EBF\u7D22 ${thread} \u4E0A\u5B9A\u7684\u63D0\u9192\uFF1A\u8981\u8BA9${by}\u77E5\u9053\u7684\uFF0C\u5230\u70B9\u540E\u7528 agent_message \u53D1\u7ED9\u5B83\uFF0Cthread \u586B ${thread}\uFF0Ckind \u586B update\uFF1B\u4F60\u7684\u666E\u901A\u56DE\u590D\u5B83\u770B\u4E0D\u5230\u3002\uFF09`;
|
|
17686
|
-
}
|
|
17687
|
-
function reminderPrompts(text) {
|
|
17688
|
-
const single = /^\[SCHEDULE REMINDER\]\n[\s\S]*?^reminder_prompt_json: (.*)$/m.exec(text);
|
|
17689
|
-
if (single !== null)
|
|
17690
|
-
return [jsonString(single[1]).replace(REMINDER_NOTE, "")];
|
|
17691
|
-
const batch = /^\[SCHEDULE REMINDER BATCH\]\n[\s\S]*?^reminders_json: (.*)$/m.exec(text);
|
|
17692
|
-
if (batch === null)
|
|
17693
|
-
return void 0;
|
|
17694
|
-
try {
|
|
17695
|
-
const items = JSON.parse(batch[1]);
|
|
17696
|
-
return items.map((item) => String(item.reminder_prompt ?? "").replace(REMINDER_NOTE, "")).filter((p) => p !== "");
|
|
17697
|
-
} catch {
|
|
17698
|
-
return [];
|
|
17699
|
-
}
|
|
17700
|
-
}
|
|
17701
|
-
function reminderLine(prompts) {
|
|
17702
|
-
return prompts.length === 0 ? "\u5B9A\u65F6\u63D0\u9192" : `\u5B9A\u65F6\u63D0\u9192\uFF1A${prompts.map((p) => oneLine(p)).join("\uFF1B")}`;
|
|
17703
|
-
}
|
|
17704
|
-
function jsonString(json2) {
|
|
17705
|
-
try {
|
|
17706
|
-
const value = JSON.parse(json2);
|
|
17707
|
-
return typeof value === "string" ? value : json2;
|
|
17708
|
-
} catch {
|
|
17709
|
-
return json2;
|
|
17710
|
-
}
|
|
17711
|
-
}
|
|
17712
|
-
|
|
17713
17912
|
// packages/protocol/lib/tools.js
|
|
17714
17913
|
function summarizeToolArgs(args) {
|
|
17715
17914
|
try {
|
|
@@ -17738,10 +17937,10 @@ var SAVE_SKILL_PROMPT = [
|
|
|
17738
17937
|
function optimizeScriptPrompt(target, why, id) {
|
|
17739
17938
|
return [
|
|
17740
17939
|
`\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`,
|
|
17741
|
-
"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\u7528\u539F\u6765\u7684\u811A\u672C\u5305 id \
|
|
17940
|
+
"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",
|
|
17742
17941
|
"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",
|
|
17743
17942
|
"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",
|
|
17744
|
-
"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\
|
|
17943
|
+
"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"
|
|
17745
17944
|
].join("\n");
|
|
17746
17945
|
}
|
|
17747
17946
|
var COMMANDS = [
|
|
@@ -17767,12 +17966,12 @@ var COMMANDS = [
|
|
|
17767
17966
|
{
|
|
17768
17967
|
name: "\u7F16\u6392",
|
|
17769
17968
|
aliases: ["plan", "pipeline"],
|
|
17770
|
-
title: "\u628A\u811A\u672C\u7F16\u6210\u6D41\u6C34\u7EBF
|
|
17969
|
+
title: "\u628A\u811A\u672C\u7F16\u6210\u6D41\u6C34\u7EBF",
|
|
17771
17970
|
arg: "\u60F3\u505A\u4EC0\u4E48\uFF08\u53EF\u9009\uFF0C\u4F8B\u5982\u300C\u6BCF\u5929\u65E9\u4E0A\u8DD1\u5B8C\u4E09\u4E2A\u6E38\u620F\u7684\u65E5\u5E38\u300D\uFF09",
|
|
17772
17971
|
expand: (arg) => [
|
|
17773
17972
|
`\u5E2E\u6211\u628A\u811A\u672C\u7F16\u6392\u6210\u6D41\u6C34\u7EBF\uFF1A${arg === "" ? "\u628A\u6211\u88C5\u597D\u7684\u5404\u4E2A\u811A\u672C\u7684\u65E5\u5E38\u4EFB\u52A1\u6392\u6210\u6BCF\u5929\u80FD\u81EA\u52A8\u8DD1\u7684\u6D41\u7A0B" : arg}\u3002\u6309\u6280\u80FD pipeline-planning\uFF1A`,
|
|
17774
17973
|
"1. \u5148 system_info \u770B\u7535\u8111\u914D\u7F6E\uFF08\u80FD\u4E0D\u80FD\u540C\u65F6\u8DD1\u51E0\u4E2A\u6E38\u620F\uFF09\uFF0Cpipeline_list \u770B\u5DF2\u6709\u7684\u6D41\u6C34\u7EBF\uFF0Cscript_tasks \u770B\u5404\u811A\u672C\u6709\u54EA\u4E9B\u4EFB\u52A1\uFF1B",
|
|
17775
|
-
"2. \u7528 pipeline_draft \u8D77\u8349\uFF08\u8349\u7A3F\uFF0C\u6211\u5728\u300C\u7F16\u6392\u300D\u9875\u4FDD\u5B58\u540E\u624D\u4F1A\u6309\u5B9A\u65F6\u8FD0\u884C\uFF09\
|
|
17974
|
+
"2. \u6392\u597D\u540E\u4FDD\u5B58\uFF1A\u4F60\u662F\u300C\u7F16\u6392\u300D\u5C31\u7528 pipeline_save \u76F4\u63A5\u4FDD\u5B58\uFF1B\u4E0D\u662F\u5C31\u7528 pipeline_draft \u8D77\u8349\uFF08\u8349\u7A3F\uFF0C\u6211\u5728\u300C\u7F16\u6392\u300D\u9875\u4FDD\u5B58\u540E\u624D\u4F1A\u6309\u5B9A\u65F6\u8FD0\u884C\uFF09\uFF0C\u6216\u8005\u4EA4\u7ED9\u300C\u7F16\u6392\u300D\u3002\u6A21\u62DF\u5668\u548C\u524D\u53F0\u811A\u672C\u80FD\u5E76\u884C\u7684\u5E76\u884C\uFF0C\u5931\u8D25\u4E0D\u8981\u6321\u4F4F\u522B\u7684\uFF1B",
|
|
17776
17975
|
"3. \u8BF4\u6E05\u695A\u4E3A\u4EC0\u4E48\u8FD9\u6837\u6392\u3001\u54EA\u4E9B\u6B65\u9AA4\u5E76\u884C\u3001\u4F30\u8BA1\u591A\u4E45\u3001\u5EFA\u8BAE\u5B9A\u5728\u51E0\u70B9\u8DD1\u3002"
|
|
17777
17976
|
].join("\n")
|
|
17778
17977
|
},
|
|
@@ -17903,6 +18102,7 @@ export {
|
|
|
17903
18102
|
SetupAgent,
|
|
17904
18103
|
InstallSettings,
|
|
17905
18104
|
PACKS_CAPABILITY,
|
|
18105
|
+
BUILTIN_PACK_VERSION,
|
|
17906
18106
|
GUARD_CAPABILITY,
|
|
17907
18107
|
MONITOR_CAPABILITY,
|
|
17908
18108
|
Incident,
|
|
@@ -17945,12 +18145,36 @@ export {
|
|
|
17945
18145
|
SKILL_NAME,
|
|
17946
18146
|
MAX_SKILL_NAME,
|
|
17947
18147
|
SKILLHUB_CAPABILITY,
|
|
18148
|
+
BY_YOU,
|
|
18149
|
+
isQuiet,
|
|
18150
|
+
taskMessage,
|
|
18151
|
+
parseTask,
|
|
18152
|
+
threadMessage,
|
|
18153
|
+
parseThreadNote,
|
|
18154
|
+
relayMessage,
|
|
18155
|
+
threadsBetween,
|
|
18156
|
+
parseRelay,
|
|
18157
|
+
threadReminder,
|
|
18158
|
+
reminderPrompts,
|
|
18159
|
+
reminderLine,
|
|
17948
18160
|
PERSONA_CAPABILITY,
|
|
17949
18161
|
Persona,
|
|
17950
18162
|
PersonaSettings,
|
|
18163
|
+
personaOf,
|
|
18164
|
+
personaPrompt,
|
|
17951
18165
|
COMPACTION_CAPABILITY,
|
|
17952
18166
|
DEFAULT_COMPACTION_THRESHOLD,
|
|
18167
|
+
LOW_CONTEXT_WINDOW_MS,
|
|
18168
|
+
MIN_ARCHIVE_DAYS,
|
|
18169
|
+
MAX_ARCHIVE_DAYS,
|
|
18170
|
+
ARCHIVE_MARK,
|
|
17953
18171
|
CompactionSettings,
|
|
18172
|
+
MEMORY_CAPABILITY,
|
|
18173
|
+
SHARED_MEMORY,
|
|
18174
|
+
MemoryKind,
|
|
18175
|
+
MAX_CORE_CHARS,
|
|
18176
|
+
MAX_MEMORY_TEXT,
|
|
18177
|
+
MemoryEntry,
|
|
17954
18178
|
RUNS_CAPABILITY,
|
|
17955
18179
|
DEEPSEEK_API_KEY,
|
|
17956
18180
|
AGENTS_CAPABILITY,
|
|
@@ -17963,18 +18187,5 @@ export {
|
|
|
17963
18187
|
optimizeScriptPrompt,
|
|
17964
18188
|
expandSlash,
|
|
17965
18189
|
parseGitHubLink,
|
|
17966
|
-
BY_YOU,
|
|
17967
|
-
QUIET,
|
|
17968
|
-
isQuiet,
|
|
17969
|
-
taskMessage,
|
|
17970
|
-
parseTask,
|
|
17971
|
-
threadMessage,
|
|
17972
|
-
parseThreadNote,
|
|
17973
|
-
relayMessage,
|
|
17974
|
-
threadsBetween,
|
|
17975
|
-
parseRelay,
|
|
17976
|
-
threadReminder,
|
|
17977
|
-
reminderPrompts,
|
|
17978
|
-
reminderLine,
|
|
17979
18190
|
UPDATE_RULE
|
|
17980
18191
|
};
|