@eddyskywalker/dsh-chatgpt-subscription 0.52.0 → 0.53.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/CHANGELOG.md +21 -0
- package/lib/client.js +33 -14
- package/lib/client.js.map +1 -1
- package/lib/index.js +242 -82
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/account-pool.d.ts +10 -0
- package/lib/types/host/common/account-pool.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/guard.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/header.d.ts +8 -0
- package/lib/types/host/dispatch-ledger/header.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/protocol.d.ts +7 -0
- package/lib/types/host/dispatch-ledger/protocol.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/tool.d.ts.map +1 -1
- package/lib/types/host/kimi-code/oauth.d.ts +8 -0
- package/lib/types/host/kimi-code/oauth.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/package.json +1 -1
- package/presets/dispatch/README.md +11 -3
package/lib/index.js
CHANGED
|
@@ -146,7 +146,7 @@ const ROUTE_PREFIX$5 = "/api/dsh-chatgpt-subscription";
|
|
|
146
146
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
147
147
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
148
148
|
*/
|
|
149
|
-
const PLUGIN_VERSION = "0.
|
|
149
|
+
const PLUGIN_VERSION = "0.53.0";
|
|
150
150
|
const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
|
|
151
151
|
const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
|
|
152
152
|
const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
|
|
@@ -2272,13 +2272,22 @@ var AccountPoolCore = class {
|
|
|
2272
2272
|
return result;
|
|
2273
2273
|
});
|
|
2274
2274
|
}
|
|
2275
|
+
/**
|
|
2276
|
+
* Public summaries of a document the caller already read.
|
|
2277
|
+
*
|
|
2278
|
+
* A caller that needs both the rows and which one would serve the next
|
|
2279
|
+
* request must not read the pool twice: the two reads can straddle a write,
|
|
2280
|
+
* and the answer would then name one account while listing another
|
|
2281
|
+
* generation's state. Reading is not free either — an encrypted round trip,
|
|
2282
|
+
* a DPAPI unprotect on Windows.
|
|
2283
|
+
*/
|
|
2284
|
+
summariesOf(data) {
|
|
2285
|
+
const now = Date.now();
|
|
2286
|
+
return data.accounts.map((account) => this.summarize(account, now));
|
|
2287
|
+
}
|
|
2275
2288
|
/** Public summaries, with cooldowns that already expired reported as absent. */
|
|
2276
2289
|
async listAccounts() {
|
|
2277
|
-
|
|
2278
|
-
const now = Date.now();
|
|
2279
|
-
return data.accounts.map((account) => {
|
|
2280
|
-
return this.summarize(account, now);
|
|
2281
|
-
});
|
|
2290
|
+
return this.summariesOf(await this.read());
|
|
2282
2291
|
}
|
|
2283
2292
|
summarize(account, now) {
|
|
2284
2293
|
const expires = this.hooks.expiresAt?.(account.credentials);
|
|
@@ -2334,7 +2343,7 @@ var AccountPoolCore = class {
|
|
|
2334
2343
|
};
|
|
2335
2344
|
if (existingIndex >= 0) data.accounts[existingIndex] = account;
|
|
2336
2345
|
else data.accounts.push(account);
|
|
2337
|
-
if (!data.activeAccountId
|
|
2346
|
+
if (!data.activeAccountId) data.activeAccountId = account.id;
|
|
2338
2347
|
return account;
|
|
2339
2348
|
}
|
|
2340
2349
|
setPrimary(accountId) {
|
|
@@ -29556,6 +29565,8 @@ async function runDeviceLogin(options) {
|
|
|
29556
29565
|
...identity.nickname === void 0 ? {} : { nickname: identity.nickname }
|
|
29557
29566
|
};
|
|
29558
29567
|
const credentials = options.enrich === void 0 ? signedIn : await options.enrich(signedIn).catch(() => signedIn);
|
|
29568
|
+
const refusal = options.accept?.(credentials) ?? null;
|
|
29569
|
+
if (refusal !== null) throw new Error(refusal);
|
|
29559
29570
|
await options.store.write(credentials);
|
|
29560
29571
|
if (options.onSave) await options.onSave(credentials).catch(() => void 0);
|
|
29561
29572
|
await persistRegion(options.region);
|
|
@@ -29605,7 +29616,8 @@ async function beginWebLogin(store, options = {}) {
|
|
|
29605
29616
|
signal: controller.signal,
|
|
29606
29617
|
open,
|
|
29607
29618
|
...options.onSave === void 0 ? {} : { onSave: options.onSave },
|
|
29608
|
-
...options.enrich === void 0 ? {} : { enrich: options.enrich }
|
|
29619
|
+
...options.enrich === void 0 ? {} : { enrich: options.enrich },
|
|
29620
|
+
...options.accept === void 0 ? {} : { accept: options.accept }
|
|
29609
29621
|
});
|
|
29610
29622
|
webLoginFlow = {
|
|
29611
29623
|
...webLoginFlow,
|
|
@@ -36161,7 +36173,7 @@ async function getKimiCodeWebStatus(store, modelSettings, preferences, options =
|
|
|
36161
36173
|
const credentials = await store.read();
|
|
36162
36174
|
const settings = preferences ? preferences.status() : await modelSettings.read();
|
|
36163
36175
|
const poolData = accountPool === void 0 ? null : await accountPool.read().catch(() => null);
|
|
36164
|
-
const accounts = accountPool === void 0 ? [] :
|
|
36176
|
+
const accounts = accountPool === void 0 || poolData === null ? [] : accountPool.summariesOf(poolData);
|
|
36165
36177
|
const activeAccount = accounts.find((entry) => entry.id === poolData?.activeAccountId) ?? accounts.find((entry) => entry.isPrimary) ?? accounts[0];
|
|
36166
36178
|
const activePoolAccount = poolData === null ? void 0 : poolData.accounts.find((entry) => entry.id === poolData.activeAccountId) ?? poolData.accounts.find((entry) => entry.isPrimary) ?? poolData.accounts[0];
|
|
36167
36179
|
const active = (accountPool === void 0 || activePoolAccount === void 0 ? void 0 : await accountPool.getFreshCredential(activePoolAccount.id, options.fetchFn ?? fetch).catch(() => void 0)) ?? activePoolAccount?.credentials ?? credentials;
|
|
@@ -36339,6 +36351,31 @@ function hitRatioOf(cached, fresh) {
|
|
|
36339
36351
|
const total = cached + fresh;
|
|
36340
36352
|
return total > 0 ? cached / total : null;
|
|
36341
36353
|
}
|
|
36354
|
+
/**
|
|
36355
|
+
* Name the account a re-authorization has to sign back in as.
|
|
36356
|
+
*
|
|
36357
|
+
* `relogin` on the card clears one row's failure marker and then runs an ordinary
|
|
36358
|
+
* device-code sign-in, which authorizes whichever account the browser already
|
|
36359
|
+
* is. Without this check the pool could accept a DIFFERENT account, replace that
|
|
36360
|
+
* account's row and move the rotation with it, while the row the user clicked
|
|
36361
|
+
* stayed broken — the card then looked like the pool had switched on its own.
|
|
36362
|
+
*
|
|
36363
|
+
* The comparison is over identity, never tokens: the account id the token
|
|
36364
|
+
* carries, and only when neither side carries one, the address.
|
|
36365
|
+
*/
|
|
36366
|
+
async function signInGuard(pool, accountId) {
|
|
36367
|
+
const row = (await pool.read().catch(() => null))?.accounts.find((account) => account.id === accountId);
|
|
36368
|
+
if (row === void 0) return () => "要重新登录的账号已不在号池中,本次登录已取消,号池未改动。";
|
|
36369
|
+
const expectedUserId = row.userId ?? row.credentials.userId;
|
|
36370
|
+
const expectedEmail = (row.email ?? row.credentials.email)?.trim().toLowerCase() || void 0;
|
|
36371
|
+
return (credentials) => {
|
|
36372
|
+
const signedUserId = credentials.userId;
|
|
36373
|
+
const signedEmail = credentials.email?.trim().toLowerCase() || void 0;
|
|
36374
|
+
if (expectedUserId !== void 0 && signedUserId !== void 0 ? expectedUserId === signedUserId : expectedEmail !== void 0 && signedEmail !== void 0 ? expectedEmail === signedEmail : true) return null;
|
|
36375
|
+
const signedName = credentials.email ?? signedUserId ?? "未知账号";
|
|
36376
|
+
return `重新登录的是「${row.alias}」,本次登录的却是「${signedName}」,已取消,号池与凭据都没有改动。`;
|
|
36377
|
+
};
|
|
36378
|
+
}
|
|
36342
36379
|
/** Register the Kimi Code settings routes under `/kimi-code/api`. */
|
|
36343
36380
|
function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options = {}, accountPool = options.accountPool) {
|
|
36344
36381
|
const fetchFn = options.fetchFn ?? fetch;
|
|
@@ -36490,12 +36527,15 @@ function registerKimiCodeRoutes(ctx, store, modelSettings, preferences, options
|
|
|
36490
36527
|
});
|
|
36491
36528
|
const body = await readRequestJson$9(request);
|
|
36492
36529
|
const requested = isRegion$4(body.region) ? body.region : void 0;
|
|
36530
|
+
const expectAccountId = typeof body.accountId === "string" ? body.accountId : void 0;
|
|
36531
|
+
const accept = accountPool === void 0 || expectAccountId === void 0 ? void 0 : await signInGuard(accountPool, expectAccountId);
|
|
36493
36532
|
return sendJson$9(response, 200, {
|
|
36494
36533
|
ok: true,
|
|
36495
36534
|
value: await beginWebLogin(store, {
|
|
36496
36535
|
fetchFn,
|
|
36497
36536
|
region: requested,
|
|
36498
36537
|
openBrowser: options.openBrowser,
|
|
36538
|
+
...accept === void 0 ? {} : { accept },
|
|
36499
36539
|
enrich: async (credentials) => {
|
|
36500
36540
|
const profile = await fetchProfile(store, {
|
|
36501
36541
|
fetchFn,
|
|
@@ -86720,39 +86760,68 @@ const HEADER_SCHEMA = z.strictObject({
|
|
|
86720
86760
|
]).optional()
|
|
86721
86761
|
});
|
|
86722
86762
|
/**
|
|
86763
|
+
* 每种角色**允许携带**的字段集。
|
|
86764
|
+
*
|
|
86765
|
+
* 同一个字段集只写一次:它既出现在 kind 违规的拒绝文案尾部(模型被拒时当场
|
|
86766
|
+
* 唯一的纠错入口),也出现在守卫的两条 `MANDATE_KIND` 拒绝里。文案与 schema
|
|
86767
|
+
* 各写一套,迟早会重演"样板自己非法"那类事故。
|
|
86768
|
+
*/
|
|
86769
|
+
const MANDATE_KIND_FIELDS = {
|
|
86770
|
+
dispatch: "v, kind, brief_id, run_id, idem, mandate_version, prompt_ref, policy, task, boundary, followup, parent_mandate",
|
|
86771
|
+
report: "v, kind, brief_id, run_id, idem, mandate_version, prompt_ref, policy, status",
|
|
86772
|
+
steer: "v, kind, brief_id, run_id, idem, mandate_version, prompt_ref, policy, grant"
|
|
86773
|
+
};
|
|
86774
|
+
/**
|
|
86775
|
+
* 拼出"这个方向到底该带什么"的纠错尾巴。
|
|
86776
|
+
*
|
|
86777
|
+
* 拒绝文案只说"不许带 X"时,模型只能逐个字段试错——它反复写不对的原因正在这里。
|
|
86778
|
+
* 把该方向的字段集直接贴在违规说明后面,一次往返就能改对。
|
|
86779
|
+
* @param kind - 声明了角色、却用错了字段的那种角色。
|
|
86780
|
+
* @returns 追加在违规说明之后的纠错尾巴。
|
|
86781
|
+
*/
|
|
86782
|
+
function kindRepairHint(kind) {
|
|
86783
|
+
return " (a " + kind + " header carries exactly: " + MANDATE_KIND_FIELDS[kind] + "; copy the ready-to-send block from dispatch_ledger {action:\"self\"})";
|
|
86784
|
+
}
|
|
86785
|
+
/**
|
|
86723
86786
|
* 校验 kind 与字段的组合。
|
|
86724
86787
|
*
|
|
86725
86788
|
* 字段是"按角色出现"的:dispatch 带 task/boundary/followup/parent_mandate,
|
|
86726
86789
|
* report 带 status,steer 带 grant。组合不合法 = 头部损坏,而不是"忽略
|
|
86727
86790
|
* 多余字段"——多带字段往往意味着模型抄错了角色。
|
|
86791
|
+
*
|
|
86792
|
+
* `null` 与"没写"同义:schema 把 parent_mandate / grant 声明成 nullable,模型
|
|
86793
|
+
* 也习惯把用不到的字段写成 null。把 null 当成"携带了这个字段",等于拒绝一个
|
|
86794
|
+
* 语义上完全正确、只是写法啰嗦的头部。
|
|
86728
86795
|
* @param header - 已通过 schema 的头部。
|
|
86729
86796
|
* @returns 违规说明;合法时 undefined。
|
|
86730
86797
|
*/
|
|
86731
86798
|
function kindViolation(header) {
|
|
86799
|
+
const carriedParent = header.parent_mandate !== void 0 && header.parent_mandate !== null;
|
|
86800
|
+
const carriedGrant = header.grant !== void 0 && header.grant !== null;
|
|
86732
86801
|
if (header.kind === "dispatch") {
|
|
86733
|
-
if (header.task === void 0) return "a dispatch header must carry task";
|
|
86734
|
-
if (header.boundary === void 0) return "a dispatch header must carry boundary";
|
|
86735
|
-
if (header.followup === void 0) return "a dispatch header must carry followup";
|
|
86736
|
-
if (header.parent_mandate === void 0) return "a dispatch header must carry parent_mandate";
|
|
86737
|
-
if (
|
|
86738
|
-
if (header.status !== void 0) return "a dispatch header must not carry status";
|
|
86802
|
+
if (header.task === void 0) return "a dispatch header must carry task" + kindRepairHint("dispatch");
|
|
86803
|
+
if (header.boundary === void 0) return "a dispatch header must carry boundary" + kindRepairHint("dispatch");
|
|
86804
|
+
if (header.followup === void 0) return "a dispatch header must carry followup" + kindRepairHint("dispatch");
|
|
86805
|
+
if (header.parent_mandate === void 0) return "a dispatch header must carry parent_mandate" + kindRepairHint("dispatch");
|
|
86806
|
+
if (carriedGrant) return "a dispatch header must not carry grant" + kindRepairHint("dispatch");
|
|
86807
|
+
if (header.status !== void 0) return "a dispatch header must not carry status" + kindRepairHint("dispatch");
|
|
86739
86808
|
return;
|
|
86740
86809
|
}
|
|
86741
86810
|
if (header.kind === "report") {
|
|
86742
|
-
if (header.status === void 0) return "a report header must carry status";
|
|
86743
|
-
if (header.task !== void 0) return "a report header must not carry task";
|
|
86744
|
-
if (header.boundary !== void 0) return "a report header must not carry boundary";
|
|
86745
|
-
if (header.followup !== void 0) return "a report header must not carry followup";
|
|
86746
|
-
if (
|
|
86747
|
-
if (
|
|
86811
|
+
if (header.status === void 0) return "a report header must carry status" + kindRepairHint("report");
|
|
86812
|
+
if (header.task !== void 0) return "a report header must not carry task" + kindRepairHint("report");
|
|
86813
|
+
if (header.boundary !== void 0) return "a report header must not carry boundary" + kindRepairHint("report");
|
|
86814
|
+
if (header.followup !== void 0) return "a report header must not carry followup" + kindRepairHint("report");
|
|
86815
|
+
if (carriedParent) return "a report header must not carry parent_mandate" + kindRepairHint("report");
|
|
86816
|
+
if (carriedGrant) return "a report header must not carry grant" + kindRepairHint("report");
|
|
86748
86817
|
return;
|
|
86749
86818
|
}
|
|
86750
|
-
if (header.grant === void 0) return "a steer header must carry grant";
|
|
86751
|
-
if (header.status !== void 0) return "a steer header must not carry status";
|
|
86752
|
-
if (header.task !== void 0) return "a steer header must not carry task";
|
|
86753
|
-
if (header.boundary !== void 0) return "a steer header must not carry boundary";
|
|
86754
|
-
if (header.followup !== void 0) return "a steer header must not carry followup";
|
|
86755
|
-
if (
|
|
86819
|
+
if (header.grant === void 0) return "a steer header must carry grant" + kindRepairHint("steer");
|
|
86820
|
+
if (header.status !== void 0) return "a steer header must not carry status" + kindRepairHint("steer");
|
|
86821
|
+
if (header.task !== void 0) return "a steer header must not carry task" + kindRepairHint("steer");
|
|
86822
|
+
if (header.boundary !== void 0) return "a steer header must not carry boundary" + kindRepairHint("steer");
|
|
86823
|
+
if (header.followup !== void 0) return "a steer header must not carry followup" + kindRepairHint("steer");
|
|
86824
|
+
if (carriedParent) return "a steer header must not carry parent_mandate" + kindRepairHint("steer");
|
|
86756
86825
|
}
|
|
86757
86826
|
/**
|
|
86758
86827
|
* 解析一段文本里的 Mandate v2 头部。
|
|
@@ -88616,7 +88685,7 @@ function createDispatchLedgerGuard(options) {
|
|
|
88616
88685
|
if (parsed.state === "invalid" || parsed.header === void 0) return dispatchDenial("MANDATE_MALFORMED", "the mandate header could not be parsed (" + (parsed.reason ?? "unknown reason") + ").");
|
|
88617
88686
|
const header = parsed.header;
|
|
88618
88687
|
if (isDispatch) {
|
|
88619
|
-
if (header.kind !== "dispatch") return dispatchDenial("MANDATE_KIND", "a dispatch call must carry a kind \"dispatch\" header.");
|
|
88688
|
+
if (header.kind !== "dispatch") return dispatchDenial("MANDATE_KIND", "a dispatch call must carry a kind \"dispatch\" header. A dispatch header carries exactly: " + MANDATE_KIND_FIELDS.dispatch + " (copy the ready-to-send block from dispatch_ledger {action:\"self\"}).");
|
|
88620
88689
|
const session = sessionOfAgent$1(execution?.agent);
|
|
88621
88690
|
const state = session === void 0 ? initialDispatchLedgerState() : cache.fold(session);
|
|
88622
88691
|
const policy = options.policyFor?.(session ?? { id: "" });
|
|
@@ -88627,7 +88696,7 @@ function createDispatchLedgerGuard(options) {
|
|
|
88627
88696
|
if (denial === void 0 && issuer !== void 0 && callId !== void 0) reservations.reserve(issuer, ns, callId);
|
|
88628
88697
|
return denial;
|
|
88629
88698
|
}
|
|
88630
|
-
if (header.kind === "dispatch") return dispatchDenial("MANDATE_KIND", "a dispatch header belongs to the delegation tool, not send_message.");
|
|
88699
|
+
if (header.kind === "dispatch") return dispatchDenial("MANDATE_KIND", "a dispatch header belongs to the delegation tool, not send_message. A report header carries exactly: " + MANDATE_KIND_FIELDS.report + "; a steer header exactly: " + MANDATE_KIND_FIELDS.steer + ".");
|
|
88631
88700
|
const targetId = asString$2(args["agent_id"]);
|
|
88632
88701
|
if (targetId === void 0) return void 0;
|
|
88633
88702
|
const sessions = sessionsOf();
|
|
@@ -88686,64 +88755,60 @@ function installDispatchLedgerGuard(ctx, options = {}) {
|
|
|
88686
88755
|
const DISPATCH_MANDATE_PROTOCOL = [
|
|
88687
88756
|
"Dispatch Ledger - Mandate protocol v2",
|
|
88688
88757
|
"",
|
|
88689
|
-
"1. HEADER. Put
|
|
88690
|
-
"`subagent.prompt` (dispatch) or
|
|
88691
|
-
"
|
|
88758
|
+
"1. HEADER. Put ONE fenced block at the VERY START of the text you pass to",
|
|
88759
|
+
"`subagent.prompt` (dispatch) or `send_message.message` (report/steer). Nothing",
|
|
88760
|
+
"may precede it; the body follows the closing fence.",
|
|
88692
88761
|
"",
|
|
88693
88762
|
"```dsh-mandate-v2",
|
|
88694
|
-
"{\"v\":2,\"kind\":\"dispatch\",\"brief_id\":\"b-7f\",\"run_id\":\"r-1\",\"idem\":\"i-1\",\"mandate_version\":1,\"prompt_ref\":\"plan-v3\",\"policy\":{\"id\":\"dsh-dispatch-ledger\",\"version\":\"1\",\"sha256\":\"3f9a1c2b3c4d5e6f\"},\"task\":[\"task://req-42\"],\"boundary\":[\"src/host/dispatch-ledger/**\"],\"followup\":[\"ctx://plan-v3\"],\"parent_mandate\":null
|
|
88763
|
+
"{\"v\":2,\"kind\":\"dispatch\",\"brief_id\":\"b-7f\",\"run_id\":\"r-1\",\"idem\":\"i-1\",\"mandate_version\":1,\"prompt_ref\":\"plan-v3\",\"policy\":{\"id\":\"dsh-dispatch-ledger\",\"version\":\"1\",\"sha256\":\"3f9a1c2b3c4d5e6f\"},\"task\":[\"task://req-42\"],\"boundary\":[\"src/host/dispatch-ledger/**\"],\"followup\":[\"ctx://plan-v3\"],\"parent_mandate\":null}",
|
|
88695
88764
|
"```",
|
|
88696
88765
|
"",
|
|
88697
|
-
"2.
|
|
88698
|
-
"
|
|
88699
|
-
"
|
|
88700
|
-
"
|
|
88701
|
-
"
|
|
88702
|
-
"
|
|
88703
|
-
"
|
|
88704
|
-
"
|
|
88705
|
-
"
|
|
88706
|
-
"
|
|
88707
|
-
"
|
|
88708
|
-
"
|
|
88709
|
-
"
|
|
88710
|
-
"
|
|
88711
|
-
"
|
|
88712
|
-
"
|
|
88713
|
-
"
|
|
88714
|
-
"
|
|
88715
|
-
"
|
|
88716
|
-
"The body after the closing fence is sealed by the host: it computes the sha256 and",
|
|
88717
|
-
" stores it in the ledger. Do NOT put a hash in the header: an unknown field makes",
|
|
88718
|
-
" the header malformed.",
|
|
88766
|
+
"2. PER KIND. Each kind carries its own fields and NO others: one foreign field",
|
|
88767
|
+
"makes the whole header malformed.",
|
|
88768
|
+
"- dispatch: the block above. task: <=4 references (<=160 chars) naming the",
|
|
88769
|
+
" request, NOT its text. boundary: <=16 entries (<=120 chars). followup: <=8",
|
|
88770
|
+
" references (<=120 chars). parent_mandate: null on the first run of a brief,",
|
|
88771
|
+
" else the {brief_id, run_id, idem} of the run this one replaces.",
|
|
88772
|
+
"- report: the same block MINUS task, boundary, followup and parent_mandate, PLUS",
|
|
88773
|
+
" \"status\":\"ready\"|\"hand_back\"|\"blocked\"|\"failed\"|\"dropped\". Take brief_id,",
|
|
88774
|
+
" run_id, idem, prompt_ref and policy from YOUR OWN mandate - read them with",
|
|
88775
|
+
" dispatch_ledger {action:\"self\"} - never from the message you received.",
|
|
88776
|
+
"- steer: the same block MINUS task, boundary, followup and parent_mandate, PLUS",
|
|
88777
|
+
" \"grant\": {\"context\":[\"...\"]} (entries already in that run followup) or null.",
|
|
88778
|
+
"",
|
|
88779
|
+
"3. FIELDS. v = 2, mandate_version = 1. brief_id: the work item, stable across",
|
|
88780
|
+
"runs, <=64 chars from [A-Za-z0-9._:-]. run_id: one dispatch attempt. idem: the",
|
|
88781
|
+
"idempotency key inside one run; both are NEW after a hand_back. prompt_ref and",
|
|
88782
|
+
"policy: copy verbatim from dispatch_ledger {action:\"self\"}; never invent them.",
|
|
88783
|
+
"The host seals the body by hashing it, so never put a hash in the header: an",
|
|
88784
|
+
"unknown field makes the header malformed.",
|
|
88719
88785
|
"",
|
|
88720
|
-
"
|
|
88721
|
-
"a. Call dispatch_ledger {action:\"self\"} ONCE. Copy policy
|
|
88722
|
-
" printed at the TAIL of that result.",
|
|
88723
|
-
"b. Dispatch:
|
|
88786
|
+
"4. FLOW.",
|
|
88787
|
+
"a. Call dispatch_ledger {action:\"self\"} ONCE. Copy policy and prompt_ref from it;",
|
|
88788
|
+
" this protocol is printed at the TAIL of that result.",
|
|
88789
|
+
"b. Dispatch: dispatch header + task text, in `subagent.prompt`.",
|
|
88724
88790
|
"c. The child reads its own mandate with dispatch_ledger {action:\"self\"}.",
|
|
88725
|
-
"d. Report:
|
|
88726
|
-
"e. Steer: header
|
|
88791
|
+
"d. Report: report header + result, in `send_message` to your parent agent id.",
|
|
88792
|
+
"e. Steer: steer header, in `send_message` to the child.",
|
|
88727
88793
|
"",
|
|
88728
|
-
"
|
|
88729
|
-
"MANDATE_MALFORMED: the header does not parse, or a field
|
|
88794
|
+
"5. REJECTION CODES. These are the only denials; each one names its fix.",
|
|
88795
|
+
"MANDATE_MALFORMED: the header does not parse, or carries a field its kind does",
|
|
88796
|
+
" not allow. Re-send with exactly the fields of that kind.",
|
|
88730
88797
|
"MANDATE_KIND: the kind does not match the tool.",
|
|
88731
|
-
"MANDATE_DUPLICATE: the namespace (brief_id, run_id, idem) is
|
|
88732
|
-
"
|
|
88733
|
-
"MANDATE_BRIEF_BUSY: another run of this brief is still booked. Wait
|
|
88734
|
-
"MANDATE_LINEAGE_REQUIRED:
|
|
88735
|
-
"MANDATE_LINEAGE: parent_mandate does not point at the latest
|
|
88736
|
-
"MANDATE_POLICY_STALE: the policy block
|
|
88737
|
-
" dispatch_ledger {action:\"self\"} and copy it again.",
|
|
88798
|
+
"MANDATE_DUPLICATE: the namespace (brief_id, run_id, idem) is claimed and never",
|
|
88799
|
+
" reusable. Use a NEW run_id AND a NEW idem, and set parent_mandate.",
|
|
88800
|
+
"MANDATE_BRIEF_BUSY: another run of this brief is still booked. Wait, or use a new brief_id.",
|
|
88801
|
+
"MANDATE_LINEAGE_REQUIRED: the brief already has a run, but parent_mandate is missing.",
|
|
88802
|
+
"MANDATE_LINEAGE: parent_mandate does not point at the latest settled run of the brief.",
|
|
88803
|
+
"MANDATE_POLICY_STALE: the policy block is not current. Copy it from self again.",
|
|
88738
88804
|
"MANDATE_VERSION: mandate_version or prompt_ref does not match the recorded run.",
|
|
88739
|
-
"MANDATE_NOT_PARENT
|
|
88805
|
+
"MANDATE_NOT_PARENT: the agent you report to is not your parent.",
|
|
88806
|
+
"MANDATE_NOT_CHILD: the agent you steer is not your child.",
|
|
88740
88807
|
"MANDATE_GRANT_EXCEEDS: grant.context asks for context outside followup.",
|
|
88741
88808
|
"MANDATE_NOT_HELD: you do not hold this mandate.",
|
|
88742
|
-
"MANDATE_LEDGER_FULL: the ledger
|
|
88743
|
-
" reuse an old namespace to get around it.",
|
|
88809
|
+
"MANDATE_LEDGER_FULL: the ledger is full. Report it; never reuse an old namespace.",
|
|
88744
88810
|
"",
|
|
88745
|
-
"
|
|
88746
|
-
" After a hand_back the new run needs a NEW run_id and a NEW idem: never reuse the old ones."
|
|
88811
|
+
"6. A dispatch with no header is allowed but audited, and cannot be de-duplicated."
|
|
88747
88812
|
].join("\n");
|
|
88748
88813
|
//#endregion
|
|
88749
88814
|
//#region src/host/dispatch-ledger/tool.ts
|
|
@@ -88900,6 +88965,98 @@ function matchesFilters(row, args) {
|
|
|
88900
88965
|
return true;
|
|
88901
88966
|
}
|
|
88902
88967
|
/**
|
|
88968
|
+
* 造一个本次渲染专用的 id。
|
|
88969
|
+
*
|
|
88970
|
+
* 骨架里的 brief_id / run_id / idem 必须是"抄下来就能用"的真 id,所以每渲染
|
|
88971
|
+
* 一次就现造一组:模型原样照抄也不会撞上别处的命名空间。
|
|
88972
|
+
* @param prefix - id 前缀(b / r / i)。
|
|
88973
|
+
* @returns 符合头部 id 字符集 `[A-Za-z0-9._:-]` 的 id。
|
|
88974
|
+
*/
|
|
88975
|
+
function skeletonId(prefix) {
|
|
88976
|
+
const stamp = Date.now().toString(36);
|
|
88977
|
+
const noise = Math.random().toString(36).slice(2, 8);
|
|
88978
|
+
return prefix + "-" + (stamp + noise).slice(-8);
|
|
88979
|
+
}
|
|
88980
|
+
/**
|
|
88981
|
+
* 把一段头部值包成"可复制"的围栏块,并**先用真解析器自检**。
|
|
88982
|
+
*
|
|
88983
|
+
* 宁可少给一段骨架,也不给一个模型抄了就被拒的头部——这段文本是它唯一的依据。
|
|
88984
|
+
* @param lead - 引导语:说清哪些字段要改、哪些一个都不能动。
|
|
88985
|
+
* @param header - 头部值。
|
|
88986
|
+
* @returns 引导语 + 围栏块;判不出 `ok` 时 undefined。
|
|
88987
|
+
*/
|
|
88988
|
+
function readyToSendBlock(lead, header) {
|
|
88989
|
+
const block = "```dsh-mandate-v2\n" + JSON.stringify(header) + "\n```";
|
|
88990
|
+
if (parseMandateHeader(block).state !== "ok") return void 0;
|
|
88991
|
+
return lead + "\n" + block;
|
|
88992
|
+
}
|
|
88993
|
+
/**
|
|
88994
|
+
* 读一个策略块的三个字段。
|
|
88995
|
+
* @param value - value 里的 policy(或 mandate.policy)。
|
|
88996
|
+
* @returns 策略块;形状不对时 undefined。
|
|
88997
|
+
*/
|
|
88998
|
+
function policyBlockOf(value) {
|
|
88999
|
+
if (!isRecord$7(value)) return void 0;
|
|
89000
|
+
return {
|
|
89001
|
+
id: value["id"],
|
|
89002
|
+
version: value["version"],
|
|
89003
|
+
sha256: value["sha256"]
|
|
89004
|
+
};
|
|
89005
|
+
}
|
|
89006
|
+
/**
|
|
89007
|
+
* 子代理的 **report 骨架**。
|
|
89008
|
+
*
|
|
89009
|
+
* brief_id / run_id / idem / prompt_ref / policy 全部来自它**自己持有的**那份
|
|
89010
|
+
* mandate(也就是它收到的派发头),所以它只需要改 status——把"自己拼 JSON"换成
|
|
89011
|
+
* "照着抄一行"。
|
|
89012
|
+
* @param mandate - `self` 结果里的 mandate。
|
|
89013
|
+
* @returns 可复制块;没有 mandate 或自检不过时 undefined。
|
|
89014
|
+
*/
|
|
89015
|
+
function reportSkeletonOf(mandate) {
|
|
89016
|
+
if (mandate === void 0) return void 0;
|
|
89017
|
+
const policy = policyBlockOf(mandate["policy"]);
|
|
89018
|
+
if (policy === void 0) return void 0;
|
|
89019
|
+
return readyToSendBlock("report header - copy this block into send_message and change ONLY status (ready | hand_back | blocked | failed | dropped); every other field is yours already:", {
|
|
89020
|
+
v: 2,
|
|
89021
|
+
kind: "report",
|
|
89022
|
+
brief_id: mandate["brief_id"],
|
|
89023
|
+
run_id: mandate["run_id"],
|
|
89024
|
+
idem: mandate["idem"],
|
|
89025
|
+
mandate_version: mandate["mandate_version"],
|
|
89026
|
+
prompt_ref: mandate["prompt_ref"],
|
|
89027
|
+
policy,
|
|
89028
|
+
status: "ready"
|
|
89029
|
+
});
|
|
89030
|
+
}
|
|
89031
|
+
/**
|
|
89032
|
+
* 协调者的 **dispatch 骨架**。
|
|
89033
|
+
*
|
|
89034
|
+
* policy 与 prompt_ref 由宿主填好(模型不能自拟),三个 id 现造(每次派发都要
|
|
89035
|
+
* 换新的),task / boundary / followup 留成一眼就该改掉的占位符。
|
|
89036
|
+
* @param policy - `self` 结果里的 policy。
|
|
89037
|
+
* @param promptRef - `self` 结果里的 prompt_ref。
|
|
89038
|
+
* @returns 可复制块;宿主没给 policy / prompt_ref 时 undefined。
|
|
89039
|
+
*/
|
|
89040
|
+
function dispatchSkeletonOf(policy, promptRef) {
|
|
89041
|
+
const block = policyBlockOf(policy);
|
|
89042
|
+
if (block === void 0) return void 0;
|
|
89043
|
+
if (typeof promptRef !== "string" || promptRef === "") return void 0;
|
|
89044
|
+
return readyToSendBlock("dispatch header - give every dispatch NEW brief_id / run_id / idem, make task, boundary and followup name your own work, and write the task text after the closing fence:", {
|
|
89045
|
+
v: 2,
|
|
89046
|
+
kind: "dispatch",
|
|
89047
|
+
brief_id: skeletonId("b"),
|
|
89048
|
+
run_id: skeletonId("r"),
|
|
89049
|
+
idem: skeletonId("i"),
|
|
89050
|
+
mandate_version: 1,
|
|
89051
|
+
prompt_ref: promptRef,
|
|
89052
|
+
policy: block,
|
|
89053
|
+
task: ["task://what-this-dispatch-delivers"],
|
|
89054
|
+
boundary: ["files or module this child may touch"],
|
|
89055
|
+
followup: ["ctx://context-it-may-ask-for-later"],
|
|
89056
|
+
parent_mandate: null
|
|
89057
|
+
});
|
|
89058
|
+
}
|
|
89059
|
+
/**
|
|
88903
89060
|
* 构造 `dispatch_ledger` 工具。
|
|
88904
89061
|
* @param deps - 依赖。
|
|
88905
89062
|
* @returns 可注册的工具定义。
|
|
@@ -89114,15 +89271,18 @@ function createDispatchLedgerTool(deps) {
|
|
|
89114
89271
|
if (record["action"] === "self") {
|
|
89115
89272
|
const mandate = record["mandate"];
|
|
89116
89273
|
const policy = record["policy"];
|
|
89274
|
+
const head = [
|
|
89275
|
+
"session " + String(record["sessionId"]) + (record["parentSessionId"] === void 0 ? "" : " (parent " + String(record["parentSessionId"]) + ")"),
|
|
89276
|
+
"policy " + String(policy?.["id"] ?? "none") + " " + String(policy?.["version"] ?? "") + " sha256 " + String(policy?.["sha256"] ?? ""),
|
|
89277
|
+
"prompt_ref (copy into a dispatch header): " + String(record["prompt_ref"] ?? "not provided by this host"),
|
|
89278
|
+
mandate === void 0 ? "mandate: none held by this session" : "mandate: brief " + String(mandate["brief_id"]) + " run " + String(mandate["run_id"]) + " idem " + String(mandate["idem"]) + " prompt_ref " + String(mandate["prompt_ref"]),
|
|
89279
|
+
"open: " + JSON.stringify(record["open"] ?? {})
|
|
89280
|
+
].join("\n");
|
|
89281
|
+
const held = record["mandate"];
|
|
89282
|
+
const skeleton = (held === void 0 ? void 0 : reportSkeletonOf(held)) ?? dispatchSkeletonOf(policy, record["prompt_ref"]);
|
|
89117
89283
|
return [{
|
|
89118
89284
|
type: "text",
|
|
89119
|
-
text:
|
|
89120
|
-
"session " + String(record["sessionId"]) + (record["parentSessionId"] === void 0 ? "" : " (parent " + String(record["parentSessionId"]) + ")"),
|
|
89121
|
-
"policy " + String(policy?.["id"] ?? "none") + " " + String(policy?.["version"] ?? "") + " sha256 " + String(policy?.["sha256"] ?? ""),
|
|
89122
|
-
"prompt_ref (copy into a dispatch header): " + String(record["prompt_ref"] ?? "not provided by this host"),
|
|
89123
|
-
mandate === void 0 ? "mandate: none held by this session" : "mandate: brief " + String(mandate["brief_id"]) + " run " + String(mandate["run_id"]) + " idem " + String(mandate["idem"]) + " prompt_ref " + String(mandate["prompt_ref"]),
|
|
89124
|
-
"open: " + JSON.stringify(record["open"] ?? {})
|
|
89125
|
-
].join("\n") + "\n\n" + DISPATCH_MANDATE_PROTOCOL
|
|
89285
|
+
text: skeleton === void 0 ? head + "\n\n" + DISPATCH_MANDATE_PROTOCOL : head + "\n\n" + skeleton + "\n\n" + DISPATCH_MANDATE_PROTOCOL
|
|
89126
89286
|
}];
|
|
89127
89287
|
}
|
|
89128
89288
|
const lines = (record["entries"] ?? []).map((entry) => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA0BvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA+CD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"KimiCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA0BvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AA+CD,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CA8uBhG"}
|
package/lib/types/compat.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
|
|
|
71
71
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
72
72
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
73
73
|
*/
|
|
74
|
-
export declare const PLUGIN_VERSION: "0.
|
|
74
|
+
export declare const PLUGIN_VERSION: "0.53.0";
|
|
75
75
|
export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
|
|
76
76
|
export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
|
|
77
77
|
export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
|
|
@@ -304,6 +304,16 @@ export declare class AccountPoolCore<TCredentials, TAccount extends PoolAccountS
|
|
|
304
304
|
* pool write is verified, and must not re-enter the pool either.
|
|
305
305
|
*/
|
|
306
306
|
protected updatePool<T>(mutate: (data: PoolData<TAccount>) => T | Promise<T>, afterCommit?: (data: PoolData<TAccount>, result: T) => Promise<void>): Promise<T>;
|
|
307
|
+
/**
|
|
308
|
+
* Public summaries of a document the caller already read.
|
|
309
|
+
*
|
|
310
|
+
* A caller that needs both the rows and which one would serve the next
|
|
311
|
+
* request must not read the pool twice: the two reads can straddle a write,
|
|
312
|
+
* and the answer would then name one account while listing another
|
|
313
|
+
* generation's state. Reading is not free either — an encrypted round trip,
|
|
314
|
+
* a DPAPI unprotect on Windows.
|
|
315
|
+
*/
|
|
316
|
+
summariesOf(data: PoolData<TAccount>): TSummary[];
|
|
307
317
|
/** Public summaries, with cooldowns that already expired reported as absent. */
|
|
308
318
|
listAccounts(): Promise<TSummary[]>;
|
|
309
319
|
protected summarize(account: TAccount, now: number): TSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/common/account-pool.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,QAAS,CAAA;AAK5C,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,YAAY;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,4EAA4E;AA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,GAAG,OAAO,CAAC,YAAY,CAAC;IAIlG;;;;;;;OAOG;IACG,eAAe,CACnB,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,KAAa,EAAE,QAAQ,CAAC,EAAE,YAAY,GACzE,OAAO,CAAC,YAAY,CAAC;IAIxB;;;;;;;OAOG;YACW,aAAa;IA8B3B;;;;;;;;;;;;;OAaG;YACW,YAAY;IAmC1B;;;;;;OAMG;YACW,cAAc;IAoD5B,OAAO,CAAC,mBAAmB;IAgB3B,kFAAkF;IAClF,OAAO,CAAC,uBAAuB;IAM/B;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO;IAMxD,4EAA4E;IAC5E,OAAO,CAAC,aAAa;IAsBrB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,mBAAmB;IAuC3B;;;;;;;;OAQG;IACG,mBAAmB,CACvB,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,OAAO,GAAE,OAAO,KAAa,EAC7B,YAAY,UAAQ,GACnB,OAAO,CAAC;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,WAAW,EAAE,YAAY,CAAA;KAAE,CAAC;CAiD7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../../src/host/dispatch-ledger/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../../src/host/dispatch-ledger/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAQL,KAAK,uBAAuB,EAC5B,KAA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AOG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,0BAA+B,GACvC,MAAM,IAAI,CAOZ"}
|
|
@@ -121,6 +121,14 @@ export interface MandateParseResult {
|
|
|
121
121
|
/** 围栏之后的正文(`ok` 时有)。 */
|
|
122
122
|
readonly body?: string;
|
|
123
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* 每种角色**允许携带**的字段集。
|
|
126
|
+
*
|
|
127
|
+
* 同一个字段集只写一次:它既出现在 kind 违规的拒绝文案尾部(模型被拒时当场
|
|
128
|
+
* 唯一的纠错入口),也出现在守卫的两条 `MANDATE_KIND` 拒绝里。文案与 schema
|
|
129
|
+
* 各写一套,迟早会重演"样板自己非法"那类事故。
|
|
130
|
+
*/
|
|
131
|
+
export declare const MANDATE_KIND_FIELDS: Readonly<Record<MandateKind, string>>;
|
|
124
132
|
/**
|
|
125
133
|
* 解析一段文本里的 Mandate v2 头部。
|
|
126
134
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/host/dispatch-ledger/header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAIH,yBAAyB;AACzB,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD,mBAAmB;AACnB,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAEvC,qCAAqC;AACrC,eAAO,MAAM,iCAAiC,IAAI,CAAA;AAElD,8BAA8B;AAC9B,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAE5C,mBAAmB;AACnB,eAAO,MAAM,kBAAkB,QAAuB,CAAA;AAEtD,eAAe;AACf,eAAO,MAAM,kBAAkB,QAA8B,CAAA;AAE7D,eAAe;AACf,eAAO,MAAM,mBAAmB,QAAQ,CAAA;AAExC,YAAY;AACZ,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA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BAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAEpE"}
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
* 工具描述保持静态且短(≤240 字符),preset 里只留一行短引导。模型读到的
|
|
12
12
|
* 工具结果尾部就是协议本身。
|
|
13
13
|
*
|
|
14
|
+
* ## 样板必须自洽
|
|
15
|
+
*
|
|
16
|
+
* 正文里出现的每一段围栏,都是模型会**照抄**的样板;样板一旦不合文法,模型
|
|
17
|
+
* 抄一次就被拒一次,而它没有别的依据可循。所以样板与 {@link ./header.ts} 的
|
|
18
|
+
* schema 必须互相自洽:`test/dispatch-ledger-header.test.ts` 会把正文里的
|
|
19
|
+
* 每一段围栏都丢给真解析器,判不出 `ok` 就算回归。
|
|
20
|
+
*
|
|
14
21
|
* ## 长度上限
|
|
15
22
|
*
|
|
16
23
|
* 协议正文必须 ≤ {@link DISPATCH_MANDATE_PROTOCOL_MAX_CHARS} 字符。这条上限
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../src/host/dispatch-ledger/protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../src/host/dispatch-ledger/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iBAAiB;AACjB,eAAO,MAAM,mCAAmC,OAAO,CAAA;AAEvD,2BAA2B;AAC3B,eAAO,MAAM,yBAAyB,EAAE,MAyD5B,CAAA"}
|