frizz-server 0.15.50 → 0.15.52
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/dist/dev-child.js +645 -181
- package/package.json +1 -1
- package/runtime/cc-worker/lib/frizz-tools.mjs +3 -2
- package/web-dist/assets/{abnfDiagram-VCTEODGH-CSl-iUaD.js → abnfDiagram-VCTEODGH-DiSjUTD1.js} +1 -1
- package/web-dist/assets/architecture-7GRP2DOG-BYgmFD1v.js +1 -0
- package/web-dist/assets/{architectureDiagram-5GKGNRK7-Bo_gyMVC.js → architectureDiagram-5GKGNRK7-I0TjaMyJ.js} +1 -1
- package/web-dist/assets/{blockDiagram-I7D4REHJ-9EtOS1Y1.js → blockDiagram-I7D4REHJ-XB2-cEOS.js} +1 -1
- package/web-dist/assets/{c4Diagram-7LVT6UL2-CE1hW3oj.js → c4Diagram-7LVT6UL2-DtSoQNFw.js} +1 -1
- package/web-dist/assets/channel-DWuOn0MA.js +1 -0
- package/web-dist/assets/{chunk-2E4U76K2-QqOdoNOR.js → chunk-2E4U76K2-B-wkZcpD.js} +1 -1
- package/web-dist/assets/{chunk-4HAMMTFA-Df2uLm9r.js → chunk-4HAMMTFA-DWlXC__7.js} +1 -1
- package/web-dist/assets/{chunk-75Z2AOVW-DF1G6d8q.js → chunk-75Z2AOVW-B8ME16qz.js} +1 -1
- package/web-dist/assets/{chunk-CLGD4ZFX-CMAQm7EJ.js → chunk-CLGD4ZFX-DgSrSm54.js} +1 -1
- package/web-dist/assets/{chunk-DU6HZSFF-UWY5hXXp.js → chunk-DU6HZSFF-CKILAkFG.js} +1 -1
- package/web-dist/assets/{chunk-F27PBJKO-C59uYSbj.js → chunk-F27PBJKO-B_8M_0Rl.js} +1 -1
- package/web-dist/assets/{chunk-GMAD6QVW-BsJsQjY4.js → chunk-GMAD6QVW-UnCsWXAs.js} +1 -1
- package/web-dist/assets/{chunk-GVQU2GXP-BuITwr9r.js → chunk-GVQU2GXP-DC9Elw0X.js} +1 -1
- package/web-dist/assets/{chunk-IMKFNOWR-5Ui4f5l4.js → chunk-IMKFNOWR-wpPy-2NT.js} +1 -1
- package/web-dist/assets/{chunk-L3NEJ4N5-BISBblwX.js → chunk-L3NEJ4N5-BMMh5yw5.js} +1 -1
- package/web-dist/assets/{chunk-OSK3NFVY-CZl3XlkY.js → chunk-OSK3NFVY-CsTV5TtL.js} +1 -1
- package/web-dist/assets/{chunk-P2QGCYS3-DoytbW1J.js → chunk-P2QGCYS3-D3dlUq-V.js} +1 -1
- package/web-dist/assets/{chunk-POPQ4Y6H-D28hnSIy.js → chunk-POPQ4Y6H-BvI7-pFd.js} +1 -1
- package/web-dist/assets/{chunk-PWAF6VOD-CbZvnkji.js → chunk-PWAF6VOD-RqbILfUC.js} +1 -1
- package/web-dist/assets/{chunk-SHT3W25Y-DM4ozJwj.js → chunk-SHT3W25Y-OWaxTLwc.js} +1 -1
- package/web-dist/assets/{chunk-SVP7TREG-m6oapxSg.js → chunk-SVP7TREG-DGAeAXgv.js} +1 -1
- package/web-dist/assets/{chunk-TICWLB2K-Ochfyos9.js → chunk-TICWLB2K-CsSqwjw1.js} +1 -1
- package/web-dist/assets/{chunk-TLUHSLCS-iM7uiuAo.js → chunk-TLUHSLCS-C9oqWUOB.js} +2 -2
- package/web-dist/assets/classDiagram-ZZMXUADV-DSspmFZn.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-DSspmFZn.js +1 -0
- package/web-dist/assets/{cynefin-OW5HDTMX-XtTYGcIH.js → cynefin-OW5HDTMX-BG_ktheh.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-5FMLGOSQ--ClxINOZ.js → cynefinDiagram-5FMLGOSQ-DNxe0xQs.js} +1 -1
- package/web-dist/assets/{dagre-GXQ25YYZ-CupZ_9Gq.js → dagre-GXQ25YYZ-5rLGzKH4.js} +1 -1
- package/web-dist/assets/{diagram-S7CK7UJ4-BlF7gkGi.js → diagram-S7CK7UJ4-ink8IARk.js} +1 -1
- package/web-dist/assets/{diagram-UQ7AKVKN-BMXRmU5D.js → diagram-UQ7AKVKN-CER8u9ua.js} +1 -1
- package/web-dist/assets/{diagram-VSXAHHWV-r5DJsSB3.js → diagram-VSXAHHWV-BWxvx-RY.js} +1 -1
- package/web-dist/assets/{diagram-VX7I27RA-DxGq7Ln7.js → diagram-VX7I27RA-CJ1Zu00i.js} +1 -1
- package/web-dist/assets/{diagram-Z3DM3KII-DqXtb_id.js → diagram-Z3DM3KII-Co7zWuGs.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-PWID7BFC-BV_AT7TD.js → ebnfDiagram-PWID7BFC-nrejbQbC.js} +1 -1
- package/web-dist/assets/{erDiagram-RLTQ6QDP-BV70EqG9.js → erDiagram-RLTQ6QDP-C6CKKxxF.js} +1 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-BSYbQdT6.js +1 -0
- package/web-dist/assets/flowDiagram-HODETNUW-DlmV6Aj2.js +1 -0
- package/web-dist/assets/{ganttDiagram-EL5Y4UJY-Cvkf14ib.js → ganttDiagram-EL5Y4UJY-Dncm7cLz.js} +1 -1
- package/web-dist/assets/{gitGraph-4MIJSDKK-XBlZCz1U.js → gitGraph-4MIJSDKK-CvKEiD2o.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-vDyL82tj.js → gitGraphDiagram-WWUBYQGX-CFYEFiNn.js} +1 -1
- package/web-dist/assets/index-BRMjhxrd.js +242 -0
- package/web-dist/assets/index-C2agpmfX.css +2 -0
- package/web-dist/assets/{info-A6RAGUB7-DfR7iRgc.js → info-A6RAGUB7-CC2XUtgl.js} +1 -1
- package/web-dist/assets/{infoDiagram-27XIBGKW-BT4k6N6o.js → infoDiagram-27XIBGKW-C1uS_G88.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-5VMMS53U-BJIdMG0T.js → ishikawaDiagram-5VMMS53U-BZb69j5E.js} +1 -1
- package/web-dist/assets/{journeyDiagram-3NMN7TZE-CUGzIF61.js → journeyDiagram-3NMN7TZE-CMylE70d.js} +1 -1
- package/web-dist/assets/{kanban-definition-UXKFOSKX-DIPC4kv7.js → kanban-definition-UXKFOSKX-CHEOsGED.js} +1 -1
- package/web-dist/assets/{line-CJKCWj73.js → line-BsjU0-dp.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-BH-fcjsB.js → mermaid-parser.core-BKAVaI1u.js} +3 -3
- package/web-dist/assets/{mermaid.core-BSdNmJCs.js → mermaid.core-B9-DVS7z.js} +3 -3
- package/web-dist/assets/{mindmap-definition-YA3MSWOX-CJC3zMDF.js → mindmap-definition-YA3MSWOX-DZRcUVDr.js} +1 -1
- package/web-dist/assets/{packet-AYTQ26CC-BET157L_.js → packet-AYTQ26CC-BLeUhLlU.js} +1 -1
- package/web-dist/assets/{pegDiagram-XKGWAZYB-Du8ALEoR.js → pegDiagram-XKGWAZYB-Xyqkee6_.js} +1 -1
- package/web-dist/assets/{pie-WAS4IAKB-CDs5cIGi.js → pie-WAS4IAKB-D4o5BTS4.js} +1 -1
- package/web-dist/assets/{pieDiagram-E7YTZNPT-BX88bIIM.js → pieDiagram-E7YTZNPT-DCvmLOew.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-AXDQQJYC-BkGxldmI.js → quadrantDiagram-AXDQQJYC-DOJ_yQix.js} +1 -1
- package/web-dist/assets/{radar-RG4KPBEZ-FMcFyhAF.js → radar-RG4KPBEZ-K-A12o39.js} +1 -1
- package/web-dist/assets/{railroad-74A4TZTK-Du0SbLQI.js → railroad-74A4TZTK-BMkfFovv.js} +1 -1
- package/web-dist/assets/railroad-abnf-HS5TGJTU-CY-xG4Um.js +1 -0
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-DOHo_q0W.js +1 -0
- package/web-dist/assets/railroad-peg-WCYAUIDC-LeJLBEXF.js +1 -0
- package/web-dist/assets/{railroadDiagram-O6MQD6OU-CYqN0dL6.js → railroadDiagram-O6MQD6OU-DT4trHKC.js} +1 -1
- package/web-dist/assets/{requirementDiagram-BXWQKSXE-ClpQ_sLR.js → requirementDiagram-BXWQKSXE-CGM4uxvA.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-P5KCCOFB-CEJUF8o9.js → sankeyDiagram-P5KCCOFB-DS3oAp2M.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-BpJYUJhB.js → sequenceDiagram-WJ2MYXX4-UD3omQ5N.js} +1 -1
- package/web-dist/assets/{stateDiagram-D77RDMKH-BmKLEj9Q.js → stateDiagram-D77RDMKH-DONM7MNf.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-DzVzPXHZ.js +1 -0
- package/web-dist/assets/{swimlanes-42K2YHIH-CyJxVets.js → swimlanes-42K2YHIH-D33RTQxF.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BXcjoK_e.js +8 -0
- package/web-dist/assets/threadSurfaces-ClAzSMCV.js +143 -0
- package/web-dist/assets/{timeline-definition-24CTP7MA-ChEqw_62.js → timeline-definition-24CTP7MA-DPFThVi8.js} +1 -1
- package/web-dist/assets/{treeView-Q6P3EWNA-l1PaAwLT.js → treeView-Q6P3EWNA-BV49dnms.js} +1 -1
- package/web-dist/assets/{treemap-WGGIJYW6-CxvHcEiT.js → treemap-WGGIJYW6-BVrEvhvK.js} +1 -1
- package/web-dist/assets/{vennDiagram-4TSXK5OY-DF-yXPNP.js → vennDiagram-4TSXK5OY-W5Uk1TBS.js} +1 -1
- package/web-dist/assets/{wardley-WFR3VGLG-BqkX6NQy.js → wardley-WFR3VGLG-CblJtHHu.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-VM6X3IG4-B9LU1bxh.js → wardleyDiagram-VM6X3IG4-CGarvkjP.js} +1 -1
- package/web-dist/assets/{xychartDiagram-S5SC5T6Z-Zt_ZqCWS.js → xychartDiagram-S5SC5T6Z-CK45_7ZH.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-7GRP2DOG-jYpGgJVJ.js +0 -1
- package/web-dist/assets/channel-CC-n29cI.js +0 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-CXJ9OBBD.js +0 -1
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-CXJ9OBBD.js +0 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-Cw8GwV1a.js +0 -1
- package/web-dist/assets/flowDiagram-HODETNUW-B0Q6ZSg0.js +0 -1
- package/web-dist/assets/index-D-pcMA7P.js +0 -242
- package/web-dist/assets/index-DqckQXcp.css +0 -2
- package/web-dist/assets/railroad-abnf-HS5TGJTU-DRi4RhLb.js +0 -1
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-BmBkdsnK.js +0 -1
- package/web-dist/assets/railroad-peg-WCYAUIDC-CydTrmQm.js +0 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-D_c6vvvW.js +0 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BcVx8rdP.js +0 -8
- package/web-dist/assets/threadSurfaces-CYpFDk_e.js +0 -143
package/dist/dev-child.js
CHANGED
|
@@ -262,8 +262,8 @@ var init_process_generation = __esm({
|
|
|
262
262
|
observe: observeDefault,
|
|
263
263
|
isAlive: processAlive,
|
|
264
264
|
now: () => Date.now(),
|
|
265
|
-
sleep: (
|
|
266
|
-
if (
|
|
265
|
+
sleep: (ms3) => {
|
|
266
|
+
if (ms3 > 0) Atomics.wait(SYNC_WAIT, 0, 0, ms3);
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
}
|
|
@@ -13477,6 +13477,41 @@ var init_question_fence = __esm({
|
|
|
13477
13477
|
}
|
|
13478
13478
|
});
|
|
13479
13479
|
|
|
13480
|
+
// packages/shared/src/signal-fence.ts
|
|
13481
|
+
function signalFenceBlocks(text2) {
|
|
13482
|
+
const quoted = insideFence(text2);
|
|
13483
|
+
const out = [];
|
|
13484
|
+
const re = new RegExp(SIGNAL_FENCE.source, SIGNAL_FENCE.flags);
|
|
13485
|
+
for (let m = re.exec(text2); m !== null; m = re.exec(text2)) {
|
|
13486
|
+
if (quoted(m.index)) {
|
|
13487
|
+
re.lastIndex = m.index + 1;
|
|
13488
|
+
continue;
|
|
13489
|
+
}
|
|
13490
|
+
out.push({ kind: m[2], raw: m[3], start: m.index, end: m.index + m[0].length });
|
|
13491
|
+
}
|
|
13492
|
+
return out;
|
|
13493
|
+
}
|
|
13494
|
+
function closesMessage(text2, end) {
|
|
13495
|
+
const rest = text2.slice(end);
|
|
13496
|
+
if (!rest.trim()) return true;
|
|
13497
|
+
let left = rest;
|
|
13498
|
+
for (const block of questionFenceBlocks(rest).reverse()) left = left.slice(0, block.start) + left.slice(block.end);
|
|
13499
|
+
return !left.trim();
|
|
13500
|
+
}
|
|
13501
|
+
function signalFenceOf(text2) {
|
|
13502
|
+
const last = signalFenceBlocks(text2).at(-1);
|
|
13503
|
+
return last && closesMessage(text2, last.end) ? last : void 0;
|
|
13504
|
+
}
|
|
13505
|
+
var SIGNAL_FENCE;
|
|
13506
|
+
var init_signal_fence = __esm({
|
|
13507
|
+
"packages/shared/src/signal-fence.ts"() {
|
|
13508
|
+
"use strict";
|
|
13509
|
+
init_code_fences();
|
|
13510
|
+
init_question_fence();
|
|
13511
|
+
SIGNAL_FENCE = /^(`{3,})(done|awaiting)[ \t]*\r?\n([\s\S]*?)\r?\n\1`*[ \t]*$/gm;
|
|
13512
|
+
}
|
|
13513
|
+
});
|
|
13514
|
+
|
|
13480
13515
|
// packages/shared/src/delta.ts
|
|
13481
13516
|
function metaOf(b) {
|
|
13482
13517
|
return {
|
|
@@ -14115,6 +14150,8 @@ function splitAwaitingFrontmatter(raw2) {
|
|
|
14115
14150
|
let structural = true;
|
|
14116
14151
|
let inTitle = false;
|
|
14117
14152
|
let inSteps = false;
|
|
14153
|
+
let stepsKey = false;
|
|
14154
|
+
let stepsWritten = false;
|
|
14118
14155
|
let delimiter5 = -1;
|
|
14119
14156
|
for (let i = 0; i < lines.length; i++) {
|
|
14120
14157
|
const line = lines[i];
|
|
@@ -14137,8 +14174,14 @@ function splitAwaitingFrontmatter(raw2) {
|
|
|
14137
14174
|
}
|
|
14138
14175
|
if (inTitle) titleLines.push(m && key === "title" ? m[2] ?? "" : line);
|
|
14139
14176
|
else if (inSteps) {
|
|
14140
|
-
if (m && key === "steps")
|
|
14141
|
-
|
|
14177
|
+
if (m && key === "steps") {
|
|
14178
|
+
stepsKey = true;
|
|
14179
|
+
if (!/^\[\s*\]$/.test((m[2] ?? "").trim()) && (m[2] ?? "").trim()) stepsWritten = true;
|
|
14180
|
+
steps.push(...inlineSteps(m[2] ?? "").map((title2) => ({ title: [title2], body: void 0, dash: Number.POSITIVE_INFINITY, fence: void 0 })));
|
|
14181
|
+
} else {
|
|
14182
|
+
if (line.trim()) stepsWritten = true;
|
|
14183
|
+
readStepLine(steps, line);
|
|
14184
|
+
}
|
|
14142
14185
|
} else (structural ? yamlLines : rest).push(line);
|
|
14143
14186
|
}
|
|
14144
14187
|
const after = delimiter5 === -1 ? [] : lines.slice(delimiter5 + 1);
|
|
@@ -14151,7 +14194,8 @@ function splitAwaitingFrontmatter(raw2) {
|
|
|
14151
14194
|
const questionHints = parsed.hints.filter((h3) => h3.kind === "question").slice(0, AWAITING_QUESTIONS_MAX);
|
|
14152
14195
|
let items = 0;
|
|
14153
14196
|
const capped = parsed.hints.filter((h3) => h3.kind !== "question" && (AWAITING_SCALAR_KINDS.has(h3.kind) || items++ < AWAITING_HINT_MAX));
|
|
14154
|
-
|
|
14197
|
+
const clearsSteps = stepsKey && !stepsWritten;
|
|
14198
|
+
return { body: rest.join("\n").trim(), hints: [...capped, ...questionHints, ...stepHints], ...clearsSteps ? { clearsSteps: true } : {} };
|
|
14155
14199
|
}
|
|
14156
14200
|
function readStepLine(steps, line) {
|
|
14157
14201
|
const step = steps.at(-1);
|
|
@@ -14309,9 +14353,9 @@ function isAwaitingItemKind(kind) {
|
|
|
14309
14353
|
function parseAwaitingDurationRaw(value) {
|
|
14310
14354
|
const m = AWAITING_DURATION_RE.exec(value.trim());
|
|
14311
14355
|
if (!m) return null;
|
|
14312
|
-
const
|
|
14313
|
-
if (!Number.isFinite(
|
|
14314
|
-
return
|
|
14356
|
+
const ms3 = Number(m[1]) * DURATION_UNIT_MS[m[2]];
|
|
14357
|
+
if (!Number.isFinite(ms3) || ms3 <= 0) return null;
|
|
14358
|
+
return ms3;
|
|
14315
14359
|
}
|
|
14316
14360
|
function isInterruptMarker(text2) {
|
|
14317
14361
|
return INTERRUPT_MARKERS.includes(text2.trim());
|
|
@@ -14442,8 +14486,9 @@ function liveOpsLines(ops, needsInput = false) {
|
|
|
14442
14486
|
section("Monitors you registered:", "monitors", ops?.commands ?? []);
|
|
14443
14487
|
return lines;
|
|
14444
14488
|
}
|
|
14445
|
-
function signoffNudgeMessage(ops, needsInput = false) {
|
|
14446
|
-
const
|
|
14489
|
+
function signoffNudgeMessage(ops, needsInput = false, strayFence = false) {
|
|
14490
|
+
const plain = needsInput ? SIGNOFF_NUDGE_MESSAGE_NEEDS_INPUT : SIGNOFF_NUDGE_MESSAGE;
|
|
14491
|
+
const base = strayFence ? plain.replace(SIGNOFF_NUDGE_BARE_LINE, SIGNOFF_NUDGE_STRAY_LINE) : plain;
|
|
14447
14492
|
const lines = liveOpsLines(ops, needsInput);
|
|
14448
14493
|
if (lines.length) {
|
|
14449
14494
|
lines.push("", "An ```awaiting fence names only what you are ACTUALLY waiting on, one such list per kind, plus");
|
|
@@ -14506,7 +14551,7 @@ function signoffNudgeText(needsInput) {
|
|
|
14506
14551
|
return [
|
|
14507
14552
|
`${SIGNOFF_NUDGE_MARKER} Nothing about your task has changed, and no new work is being asked of you.`,
|
|
14508
14553
|
"",
|
|
14509
|
-
|
|
14554
|
+
SIGNOFF_NUDGE_BARE_LINE,
|
|
14510
14555
|
"",
|
|
14511
14556
|
"**IF THE TASK STILL HAS PARTS LEFT, THE FENCE IS NOT WHAT YOU OWE \u2014 THE WORK IS.** If ANY part of the",
|
|
14512
14557
|
"original task is unfinished, unverified, or deferred, resume it NOW, in THIS turn, and sign off once it",
|
|
@@ -14554,10 +14599,10 @@ function signoffNudgeText(needsInput) {
|
|
|
14554
14599
|
" a Markdown body indented under it after a blank line. Steps name the HUMAN as the wait,",
|
|
14555
14600
|
" so the fence needs no other name and no `for:`, and the thread goes into their queue. Their Done",
|
|
14556
14601
|
" comes back to you as their reply; anything else they need to say comes as a message of their own.",
|
|
14557
|
-
"- A question you asked at an EARLIER rest
|
|
14558
|
-
" carrying its `id:` alone
|
|
14559
|
-
"
|
|
14560
|
-
"
|
|
14602
|
+
"- A question you asked at an EARLIER rest and have not had answered: a sign-off names EVERY open",
|
|
14603
|
+
" question, so write a ```question fence carrying its `id:` alone under the paragraph it belongs to.",
|
|
14604
|
+
" That draws its card in this message and keeps the thread in the human's queue. One you no longer",
|
|
14605
|
+
" need, withdraw with `frizzctl unask <id>` first.",
|
|
14561
14606
|
"",
|
|
14562
14607
|
"**STILL OWED counts things you are not going to do yourself.** A decision you are RECOMMENDING, a",
|
|
14563
14608
|
"draft you wrote but did not send, follow-up work you discovered \u2014 all of it dies with the card, even",
|
|
@@ -14580,7 +14625,32 @@ function signoffNudgeText(needsInput) {
|
|
|
14580
14625
|
}
|
|
14581
14626
|
function isParkCorrection(text2) {
|
|
14582
14627
|
const t = text2.trimStart();
|
|
14583
|
-
return t.startsWith(PARK_CORRECTION_NAMES_LEAD) || t.startsWith(PARK_CORRECTION_RETIRED_LEAD) || t.startsWith(PARK_CORRECTION_QUESTION_LEAD) || t.startsWith(PARK_CORRECTION_NEEDS_INPUT_LEAD) || t.startsWith(QUESTION_FENCE_CORRECTION_LEAD) || t.startsWith(DONE_FENCE_CORRECTION_LEAD);
|
|
14628
|
+
return t.startsWith(PARK_CORRECTION_NAMES_LEAD) || t.startsWith(PARK_CORRECTION_RETIRED_LEAD) || t.startsWith(PARK_CORRECTION_QUESTION_LEAD) || t.startsWith(PARK_CORRECTION_NEEDS_INPUT_LEAD) || t.startsWith(QUESTION_FENCE_CORRECTION_LEAD) || t.startsWith(DONE_FENCE_CORRECTION_LEAD) || t.startsWith(SIGNOFF_CORRECTION_LEAD);
|
|
14629
|
+
}
|
|
14630
|
+
function signOffCorrection(faults) {
|
|
14631
|
+
const ids = (names) => names.map((n) => `\`${n}\``).join(", ");
|
|
14632
|
+
const parts = [];
|
|
14633
|
+
if (faults.missing.length > 0) {
|
|
14634
|
+
const one2 = faults.missing.length === 1;
|
|
14635
|
+
parts.push(
|
|
14636
|
+
`leaves out ${one2 ? "a question" : "questions"} still open on this thread. A new sign-off replaces the one before it, and the human reads only the newest, so it names every open question:`,
|
|
14637
|
+
"",
|
|
14638
|
+
...faults.missing.map((q3) => `- \`${q3.id}\` \u2014 ${q3.question}`),
|
|
14639
|
+
"",
|
|
14640
|
+
`Your next message is the sign-off that counts. Write it whole, everything the human needs since they last typed, with ${one2 ? "that question" : "each of them"} as a \`\`\`question fence carrying ${one2 ? "its" : "the"} \`id:\` alone, under the paragraph it belongs to. A question you no longer need, withdraw with \`frizzctl unask <id>\` first. If you had nothing new for the human, rest on your signal fence alone instead, and the sign-off before stands.`
|
|
14641
|
+
);
|
|
14642
|
+
} else if (faults.relisted.length > 0) {
|
|
14643
|
+
parts.push(
|
|
14644
|
+
`only re-lists ${ids(faults.relisted)}, with nothing written around ${faults.relisted.length === 1 ? "it" : "them"}. Those cards are still on screen where you asked them, so this shows the human nothing new.`,
|
|
14645
|
+
"",
|
|
14646
|
+
"With nothing new to say, rest on your signal fence alone: the sign-off before stays the one the human reads. To replace it, write a whole new sign-off, each open question under the paragraph it belongs to."
|
|
14647
|
+
);
|
|
14648
|
+
}
|
|
14649
|
+
return [
|
|
14650
|
+
`${SIGNOFF_CORRECTION_LEAD}${parts.join("\n")}`,
|
|
14651
|
+
"",
|
|
14652
|
+
"The rule: a sign-off is the whole handoff and replaces the one before it. Nothing new: the fence alone. Something new: all of it again, every open question named with `id:` alone under its paragraph. To change a question, withdraw it with `frizzctl unask <id>` and ask the new one."
|
|
14653
|
+
].join("\n");
|
|
14584
14654
|
}
|
|
14585
14655
|
function doneOpenQuestionsRefusal(questions) {
|
|
14586
14656
|
const lines = questions.map((q3) => ` ${q3.id} ${(q3.question ?? "").split("\n")[0]}`);
|
|
@@ -14598,7 +14668,7 @@ function doneOverOpenQuestionsBody(questions) {
|
|
|
14598
14668
|
"Your next message is the rest that counts, and it takes one of two shapes:",
|
|
14599
14669
|
"",
|
|
14600
14670
|
`- You withdrew ${one2 ? "it" : "every one"}: sign off done again, and it stands.`,
|
|
14601
|
-
one2 ? "- You still need the answer: write no ```done fence.
|
|
14671
|
+
one2 ? "- You still need the answer: write no ```done fence. Sign off with the whole handoff instead, the question named by a ```question fence carrying its `id:` alone under the paragraph it belongs to, which keeps the thread in the human's queue on it, and sign off done once it is answered." : "- You still need an answer: write no ```done fence. Sign off with the whole handoff instead, each question you still need named by a ```question fence carrying its `id:` alone under the paragraph it belongs to, which keeps the thread in the human's queue on them, and sign off done once they are answered."
|
|
14602
14672
|
].join("\n");
|
|
14603
14673
|
}
|
|
14604
14674
|
function timerPromptMessage(prompt, fireAt) {
|
|
@@ -14849,6 +14919,12 @@ function nameQuestionAnswer(answer, spec, handle) {
|
|
|
14849
14919
|
}
|
|
14850
14920
|
function questionAnswerMessage(answers, dismissed = []) {
|
|
14851
14921
|
if (answers.length === 0) return questionsCancelledWakeMessage(dismissed.length, dismissed);
|
|
14922
|
+
return answerRowsMessage(answers, dismissed);
|
|
14923
|
+
}
|
|
14924
|
+
function humanAnswersMessage(answers, dismissed = []) {
|
|
14925
|
+
return answers.length === 0 && dismissed.length === 0 ? "" : answerRowsMessage(answers, dismissed);
|
|
14926
|
+
}
|
|
14927
|
+
function answerRowsMessage(answers, dismissed) {
|
|
14852
14928
|
const rows = [];
|
|
14853
14929
|
const push = (a, followUp) => {
|
|
14854
14930
|
const said = answerPicksText(a.chosen, a.text);
|
|
@@ -14882,6 +14958,17 @@ function repliesStepsDone(text2) {
|
|
|
14882
14958
|
|
|
14883
14959
|
`);
|
|
14884
14960
|
}
|
|
14961
|
+
function stepsReportOf(said) {
|
|
14962
|
+
const text2 = said.trim();
|
|
14963
|
+
if (text2 === STEPS_DONE || text2.startsWith(`${STEPS_DONE}
|
|
14964
|
+
|
|
14965
|
+
`)) return { all: true, note: text2.slice(STEPS_DONE.length).trim() };
|
|
14966
|
+
const [head, ...rows] = text2.split("\n");
|
|
14967
|
+
if (!new RegExp(`^${STEPS_DONE} \\d+ of \\d+:$`).test(head)) return null;
|
|
14968
|
+
let n = 0;
|
|
14969
|
+
while (n < rows.length && /^- \[( |x)\] /.test(rows[n])) n++;
|
|
14970
|
+
return n > 0 ? { all: false, note: rows.slice(n).join("\n").trim() } : null;
|
|
14971
|
+
}
|
|
14885
14972
|
function wordsUnderAnswers(text2) {
|
|
14886
14973
|
let said = text2.trim();
|
|
14887
14974
|
for (; ; ) {
|
|
@@ -15040,9 +15127,9 @@ function threadBandAt(t, nowMs) {
|
|
|
15040
15127
|
if (section === "active") return inActiveBand(t) ? "active" : "rested";
|
|
15041
15128
|
return null;
|
|
15042
15129
|
}
|
|
15043
|
-
function formatElapsed(
|
|
15044
|
-
if (!Number.isFinite(
|
|
15045
|
-
const s = Math.floor(
|
|
15130
|
+
function formatElapsed(ms3) {
|
|
15131
|
+
if (!Number.isFinite(ms3) || ms3 < 0) return "an unknown time";
|
|
15132
|
+
const s = Math.floor(ms3 / 1e3);
|
|
15046
15133
|
if (s < 60) return `${s}s`;
|
|
15047
15134
|
const m = Math.floor(s / 60);
|
|
15048
15135
|
if (m < 60) return `${m}m`;
|
|
@@ -15223,9 +15310,11 @@ function isHumanTypedMessage(text2) {
|
|
|
15223
15310
|
if (isInjectedNoise(text2) || isInterruptMarker(text2) || isWakeDelivery(text2)) return false;
|
|
15224
15311
|
if (parseThreadMessage(text2) || parseCrossSessionMessage(text2) || parseAgentMessage(text2)) return false;
|
|
15225
15312
|
const own = stripHumanGapNote(text2).trim();
|
|
15226
|
-
|
|
15227
|
-
`)
|
|
15228
|
-
|
|
15313
|
+
const answers = (words) => words.startsWith(`${BURIED_ANSWERS_HEADER}
|
|
15314
|
+
`);
|
|
15315
|
+
const said = answers(own) ? wordsUnderAnswers(own) : own;
|
|
15316
|
+
const typed = answers(said) ? "" : stepsReportOf(said)?.note ?? said;
|
|
15317
|
+
return typed !== "" && typed !== RETRY_FOLLOW_UP;
|
|
15229
15318
|
}
|
|
15230
15319
|
function humanTypedMessagesIn(text2) {
|
|
15231
15320
|
return splitWakeDeliveries(text2).filter(isHumanTypedMessage);
|
|
@@ -15299,7 +15388,7 @@ function parseGithubWakeSteer(text2) {
|
|
|
15299
15388
|
function frizzRoute(path3) {
|
|
15300
15389
|
return `${FRIZZ_ROUTE_PREFIX}${path3.startsWith("/") ? path3 : `/${path3}`}`;
|
|
15301
15390
|
}
|
|
15302
|
-
var import_yaml2, ATTACHMENT_IMAGE_EXTENSIONS, ATTACHMENT_TEXT_EXTENSIONS, ATTACHMENT_OFFICE_EXTENSIONS, ATTACHMENT_DATA_EXTENSIONS, ATTACHMENT_ARCHIVE_EXTENSIONS, ATTACHMENT_DOC_EXTENSIONS, ATTACHMENT_EXTENSIONS, ATTACHMENT_MAX_BASE64_CHARS, ATTACHMENT_MAX_BYTES, ATTACHMENT_EXT_SET, ATTACHMENT_ACCEPT, FrizzStatus, BlockMechanism, RuntimeState, Backend, BACKEND_FOLLOW_UPS, CodexModel, ClaudeModel, CODEX_MODELS_FALLBACK, AcpAgent, ACP_MODEL_PREFIX, OPENCODE_MODEL_PREFIX, OpencodeModel, OpencodeModels, AcpAgentModel, AcpAgentModels, AcpAgentModelsInput, ThreadProfileOption, ThreadAgent, SubAgentView, BgShellView, CompletionHoldOp, CompletionHold, AskOption, AskQuestion, PendingAsk, AwaitingHint, RETIRED_AWAITING_KINDS, RETIRED_LINE_RE, RETIRED_AWAITING_REPLACEMENT, AWAITING_KEY_RE, AWAITING_YAML_KEYS, AWAITING_SEQUENCE_KEYS, AWAITING_HINT_MAX, AWAITING_HINT_VALUE_MAX, AWAITING_SCALAR_KINDS, AWAITING_STEPS_MAX, AWAITING_STEP_VALUE_MAX, AWAITING_STEP_BODY_MAX, AWAITING_QUESTIONS_MAX, AWAITING_TITLE_MAX, FENCE_DELIMITER_RE, STEP_CODE_FENCE_RE, indentOf2, AWAITING_STATUSES, AWAITING_ITEM_KINDS, AWAITING_DURATION_RE, DURATION_UNIT_MS, AWAITING_FOR_MAX_MS, SnoozeUntil, SNOOZE_PROMPT_MAX, SnoozePrompt, RECURRING_PROMPT_MAX, RECURRING_MIN_INTERVAL_SECONDS, RECURRING_MAX_INTERVAL_SECONDS, RecurringPromptText, RecurringIntervalSeconds, ThreadRecurringPrompt, INTERRUPT_MARKERS, ALLDONE_SENTINEL, OPT_OUT_NOTE, OVER_QUESTION_NOTE, TIMER_PROMPT_MAX, TIMER_MAX_DELAY_SECONDS, TIMER_MAX_ARMED, TimerPromptText, PR_WATCH_SPENT_TRAILER, PR_WATCH_ARMED_TRAILER, SHELL_DONE_TRAILER, ISSUE_WATCH_SPENT_TRAILER, ISSUE_WATCH_ARMED_TRAILER, LEGACY_PR_WATCH_ARMED_TRAILER, LEGACY_ISSUE_WATCH_ARMED_TRAILER, INTERRUPT_ENDED_LEAD, SIGNOFF_NUDGE_MARKER, SIGNOFF_NUDGE_MESSAGE, SIGNOFF_NUDGE_MESSAGE_NEEDS_INPUT, PARK_CORRECTION_NAMES_LEAD, PARK_CORRECTION_RETIRED_LEAD, PARK_CORRECTION_QUESTION_LEAD, PARK_CORRECTION_NEEDS_INPUT_LEAD, QUESTION_FENCE_CORRECTION_LEAD, DONE_FENCE_CORRECTION_LEAD, ThreadWatchKind, GithubChecksState, GithubMergeState, GithubWatchStatus, GITHUB_READING_STALE_MS, GithubIssueStatus, CommandWatchRun, MonitorStatus, ThreadWatchView, PR_WATCH_FOR_MAX_MS, PR_WATCH_DEFAULT_FOR_MS, PR_WATCH_MAX_ARMED, PrWatchView, AddOwnPrWatchInput, AddOwnPrWatchResult, DropOwnPrWatchInput, DropOwnPrWatchResult, OwnWatchKind, AddOwnWatchInput, OwnWatchView, AddOwnWatchResult, DropOwnWatchInput, DropOwnWatchResult, OWN_WATCH_MAX_ARMED, COMMAND_WATCH_EVERY_MIN_MS, COMMAND_WATCH_EVERY_MAX_MS, COMMAND_WATCH_FOR_MAX_MS, COMMAND_WATCH_MAX_ARMED, COMMAND_WATCH_COMMAND_MAX, COMMAND_WATCH_OUTPUT_MAX_BYTES, COMMAND_WATCH_RUN_TIMEOUT_MS, CommandWatchState, CommandWatchView, AddOwnCommandWatchInput, AddOwnCommandWatchResult, DropOwnCommandWatchInput, DropOwnCommandWatchResult, ListOwnCommandWatchesInput, OwnCommandWatchesResult, COMMAND_WATCH_FALLBACK, COMMAND_WATCH_PASSED_TRAILER, COMMAND_WATCH_EXPIRED_TRAILER, COMMAND_WATCH_CANCELLED_TRAILER, COMMAND_WATCH_TRAILERS_EXPIRED, MONITOR_BATCH_MS, MONITOR_LINE_MAX_CHARS, MONITOR_EVENT_MAX_LINES, MONITOR_FLOOD_MAX_EVENTS, MONITOR_FLOOD_WINDOW_MS, MONITOR_REGISTRATION_WINDOW_MS, MONITOR_DESCRIPTION_MAX, MONITOR_SERVER_MAX_RUNNING, AddOwnMonitorInput, AddOwnMonitorResult, MONITOR_FALLBACK, MONITOR_EVENT_TRAILER, MONITOR_EXITED_TRAILER, MONITOR_EXPIRED_TRAILER, MONITOR_CANCELLED_TRAILER, MONITOR_FLOOD_REASON, MONITOR_STOPPED_BY_HUMAN_REASON, QUESTION_FENCE_RETIRED_AT, NEEDS_INPUT_REQUIRED_AT, AskQuestionKind, ASK_MAX_DEPTH, AskedOptionSchema, AskedQuestionSchema, AskInput, RegisteredQuestionView, QuestionFenceFaultView, ClosedQuestionView, SECRET_ANSWER_PREFIX, SECRET_TTL_MS, AskResult, UnaskInput, UnaskResult, QuestionAnswerSchema, AnswerQuestionsInput, AnswerQuestionsResult, DismissQuestionsInput, DismissQuestionsResult, SettledQuestionView, ClosedQuestionSpecView, ThreadSettledQuestionsResult, ThreadRegisteredDoneResult, BURIED_ANSWERS_HEADER, ANSWER_FOLLOW_UP_MARKER, ANSWER_CONTINUATION_INDENT, indentAnswerContinuation, ANSWER_PICK_PREFIX, DISMISSED_ANSWER, ANSWER_ROW_ID_PATTERN, ANSWER_ROW_ID, answerRowId, ANSWERS_NOTE_HEADER, STEPS_DONE, MarkOwnDoneInput, MarkOwnDoneResult, ListOwnPrWatchesInput, OwnPrWatchesResult, ThreadTimerView, ThreadFence, LimitWindow, LimitPause, ProviderError, ThreadLinkView, HumanTodo, SetHumanTodoInput, UpsertOwnLinkInput, UpsertOwnLinkResult, DropOwnLinkInput, DropOwnLinkResult, LiveTool, ThreadView, SPINNING_UP_TITLE, UNTITLED_THREAD_TITLE, SPIN_UP_MS, CODEX_TITLE_SIGNAL_GRACE_MS, BoardErrorItem, BoardSnapshot, BoardState, QuotaWindow, ProviderQuota, QuotaSnapshot, ProviderAuth, AccountEmails, AuthSnapshot, AccountBackend, AccountLogoutInput, AccountLogoutResult, PermissionMode, LocalFileOpener, Settings, DispatchProviderPreferences, DispatchPreferences, DispatchProfileSnapshotShape, DispatchProfileSnapshot, SetDispatchPreferenceInput, DispatchInput, ADOPT_THREAD_MESSAGE_MAX_CHARS, AdoptThreadInput, AdoptThreadResult, AdoptSessionInput, FollowUpInput, SteerThreadInput, SteerThreadResult, SpawnThreadInput, SpawnThreadResult, SpawnChildInput, SpawnChildResult, DismissFailedFollowUpInput, DismissFailedFollowUpResult, UnqueueFollowUpInput, UnqueueFollowUpResult, DeliverQueuedNowInput, DeliverQueuedNowResult, CompactThreadInput, SetThreadSnoozeInput, SetThreadPinnedInput, ReorderPinnedThreadsInput, SetThreadConsolePinnedInput, ReorderConsolePinnedThreadsInput, SetThreadRecurringPromptInput, SetOwnThreadRecurringPromptInput, SetOwnThreadRecurringPromptResult, GetOwnThreadRecurringPromptInput, OwnThreadRecurringPromptResult, SetOwnThreadTimerInput, CancelOwnThreadTimerInput, ListOwnThreadTimersInput, OwnThreadTimersResult, ThreadActivityItem, ListOwnThreadActivityInput, OwnThreadActivityResult, ThreadBand, ThreadListing, ListThreadsInput, ListThreadsResult, SetOwnThreadTimerResult, CancelOwnThreadTimerResult, SetOwnThreadStopHookInput, SetOwnThreadHeartbeatInput, RenameThreadInput, AiRenameThreadInput, AiRenameThreadResult, SetOwnThreadTitleInput, SetOwnThreadTitleResult, SetThreadPermissionInput, SetThreadPermissionResult, ThreadProfileOptionsInput, ThreadProfileOptionsResult, ThreadSkillSource, ThreadSkill, ThreadSkillsInput, ThreadSkillsResult, McpTarget, McpServerState, McpServerReading, McpStatusInput, McpStatusResult, McpSignInInput, McpSignInState, McpSignInResult, McpSignInAttemptInput, McpSignInPollResult, McpSignInFinishInput, SetThreadProfileInput, SetThreadProfileResult, UpgradeThreadModelInput, UpgradeThreadModelResult, DISPATCH_TASK_BANNER, DISPATCH_TASK_BANNER_MARKER, GITHUB_DISPATCH_UI_BOUNDARY, WAKE_TIME_HEADER_TAIL, WAKE_TRAILERS, HUMAN_GAP_FLOOR_MS, HUMAN_GAP_NOTE_TAIL, WAKE_DELIVERY_TOKEN_TAIL, WAKE_DELIVERY_TOKEN_LINE, MERGED_WAKE_LEAD, MERGED_WAKE_HEADING, NOISE_PREFIXES, AGENT_MESSAGE_WRAPPER, CROSS_SESSION_PREAMBLE, CROSS_SESSION_WRAPPER, CROSS_SESSION_GUIDANCE, XML_ATTRIBUTE, THREAD_MESSAGE_OPEN, THREAD_MESSAGE_CLOSE, THREAD_MESSAGE_GUIDANCE, sealThreadMessageBody, unsealThreadMessageBody, RETRY_FOLLOW_UP, GithubWakeItem, GithubWakeSteer, WAKE_SCOPE, WAKE_REVIEW_LEAD, WAKE_BACKLOG_TAIL, WAKE_REF, WAKE_SINGLE, WAKE_MULTI_HEAD, WAKE_ITEM, WAKE_MORE, PR_WATCH_FINISHED, PR_WATCH_CI_PASSED, PR_WATCH_CI_GATED, PR_WATCH_STATE, PR_WATCH_CI_FAILED, GithubStatus, GithubAccount, GithubRefCard, GithubRefPreviewInput, GithubRefPreviewResult, GithubItem, GithubListInput, GithubListResult, GithubBatchInput, GithubBatchResult, BoardMeta, BoardDeltaEvent, ServerEvent, BoardDeltasInput, BoardDeltasResult, TranscriptEdit, TranscriptTodo, TranscriptToolCall, TranscriptPart, TranscriptMessage, TranscriptPageCursor, EditedFile, TranscriptPage, TranscriptEarlierInput, SocketTranscriptSlug, SocketFilePath, SocketTranscriptClientMsg, SocketFileClientMsg, SocketBoardClientMsg, SocketClientMsg, ProjectCard, ProjectRailCounts, PROJECT_ICON_EXTENSIONS, PROJECT_ICON_MAX_BASE64_CHARS, DirectoryPickResult, ThreadLocation, FRIZZ_ROUTE_PREFIX, DEFAULT_PORT, threadIdentityName;
|
|
15391
|
+
var import_yaml2, ATTACHMENT_IMAGE_EXTENSIONS, ATTACHMENT_TEXT_EXTENSIONS, ATTACHMENT_OFFICE_EXTENSIONS, ATTACHMENT_DATA_EXTENSIONS, ATTACHMENT_ARCHIVE_EXTENSIONS, ATTACHMENT_DOC_EXTENSIONS, ATTACHMENT_EXTENSIONS, ATTACHMENT_MAX_BASE64_CHARS, ATTACHMENT_MAX_BYTES, ATTACHMENT_EXT_SET, ATTACHMENT_ACCEPT, FrizzStatus, BlockMechanism, RuntimeState, Backend, BACKEND_FOLLOW_UPS, CodexModel, ClaudeModel, CODEX_MODELS_FALLBACK, AcpAgent, ACP_MODEL_PREFIX, OPENCODE_MODEL_PREFIX, OpencodeModel, OpencodeModels, AcpAgentModel, AcpAgentModels, AcpAgentModelsInput, ThreadProfileOption, ThreadAgent, SubAgentView, BgShellView, CompletionHoldOp, CompletionHold, AskOption, AskQuestion, PendingAsk, AwaitingHint, RETIRED_AWAITING_KINDS, RETIRED_LINE_RE, RETIRED_AWAITING_REPLACEMENT, AWAITING_KEY_RE, AWAITING_YAML_KEYS, AWAITING_SEQUENCE_KEYS, AWAITING_HINT_MAX, AWAITING_HINT_VALUE_MAX, AWAITING_SCALAR_KINDS, AWAITING_STEPS_MAX, AWAITING_STEP_VALUE_MAX, AWAITING_STEP_BODY_MAX, AWAITING_QUESTIONS_MAX, AWAITING_TITLE_MAX, FENCE_DELIMITER_RE, STEP_CODE_FENCE_RE, indentOf2, AWAITING_STATUSES, AWAITING_ITEM_KINDS, AWAITING_DURATION_RE, DURATION_UNIT_MS, AWAITING_FOR_MAX_MS, SnoozeUntil, SNOOZE_PROMPT_MAX, SnoozePrompt, RECURRING_PROMPT_MAX, RECURRING_MIN_INTERVAL_SECONDS, RECURRING_MAX_INTERVAL_SECONDS, RecurringPromptText, RecurringIntervalSeconds, ThreadRecurringPrompt, INTERRUPT_MARKERS, ALLDONE_SENTINEL, OPT_OUT_NOTE, OVER_QUESTION_NOTE, TIMER_PROMPT_MAX, TIMER_MAX_DELAY_SECONDS, TIMER_MAX_ARMED, TimerPromptText, PR_WATCH_SPENT_TRAILER, PR_WATCH_ARMED_TRAILER, SHELL_DONE_TRAILER, ISSUE_WATCH_SPENT_TRAILER, ISSUE_WATCH_ARMED_TRAILER, LEGACY_PR_WATCH_ARMED_TRAILER, LEGACY_ISSUE_WATCH_ARMED_TRAILER, INTERRUPT_ENDED_LEAD, SIGNOFF_NUDGE_MARKER, SIGNOFF_NUDGE_BARE_LINE, SIGNOFF_NUDGE_STRAY_LINE, SIGNOFF_NUDGE_MESSAGE, SIGNOFF_NUDGE_MESSAGE_NEEDS_INPUT, PARK_CORRECTION_NAMES_LEAD, PARK_CORRECTION_RETIRED_LEAD, PARK_CORRECTION_QUESTION_LEAD, PARK_CORRECTION_NEEDS_INPUT_LEAD, QUESTION_FENCE_CORRECTION_LEAD, DONE_FENCE_CORRECTION_LEAD, SIGNOFF_CORRECTION_LEAD, ThreadWatchKind, GithubChecksState, GithubMergeState, GithubWatchStatus, GITHUB_READING_STALE_MS, GithubIssueStatus, CommandWatchRun, MonitorStatus, ThreadWatchView, PR_WATCH_FOR_MAX_MS, PR_WATCH_DEFAULT_FOR_MS, PR_WATCH_MAX_ARMED, PrWatchView, AddOwnPrWatchInput, AddOwnPrWatchResult, DropOwnPrWatchInput, DropOwnPrWatchResult, OwnWatchKind, AddOwnWatchInput, OwnWatchView, AddOwnWatchResult, DropOwnWatchInput, DropOwnWatchResult, OWN_WATCH_MAX_ARMED, COMMAND_WATCH_EVERY_MIN_MS, COMMAND_WATCH_EVERY_MAX_MS, COMMAND_WATCH_FOR_MAX_MS, COMMAND_WATCH_MAX_ARMED, COMMAND_WATCH_COMMAND_MAX, COMMAND_WATCH_OUTPUT_MAX_BYTES, COMMAND_WATCH_RUN_TIMEOUT_MS, CommandWatchState, CommandWatchView, AddOwnCommandWatchInput, AddOwnCommandWatchResult, DropOwnCommandWatchInput, DropOwnCommandWatchResult, ListOwnCommandWatchesInput, OwnCommandWatchesResult, COMMAND_WATCH_FALLBACK, COMMAND_WATCH_PASSED_TRAILER, COMMAND_WATCH_EXPIRED_TRAILER, COMMAND_WATCH_CANCELLED_TRAILER, COMMAND_WATCH_TRAILERS_EXPIRED, MONITOR_BATCH_MS, MONITOR_LINE_MAX_CHARS, MONITOR_EVENT_MAX_LINES, MONITOR_FLOOD_MAX_EVENTS, MONITOR_FLOOD_WINDOW_MS, MONITOR_REGISTRATION_WINDOW_MS, MONITOR_DESCRIPTION_MAX, MONITOR_SERVER_MAX_RUNNING, AddOwnMonitorInput, AddOwnMonitorResult, MONITOR_FALLBACK, MONITOR_EVENT_TRAILER, MONITOR_EXITED_TRAILER, MONITOR_EXPIRED_TRAILER, MONITOR_CANCELLED_TRAILER, MONITOR_FLOOD_REASON, MONITOR_STOPPED_BY_HUMAN_REASON, QUESTION_FENCE_RETIRED_AT, NEEDS_INPUT_REQUIRED_AT, AskQuestionKind, ASK_MAX_DEPTH, AskedOptionSchema, AskedQuestionSchema, AskInput, RegisteredQuestionView, QuestionFenceFaultView, ClosedQuestionView, SECRET_ANSWER_PREFIX, SECRET_TTL_MS, AskResult, UnaskInput, UnaskResult, QuestionAnswerSchema, AnswerQuestionsInput, AnswerQuestionsResult, DismissQuestionsInput, DismissQuestionsResult, SettledQuestionView, ClosedQuestionSpecView, ThreadSettledQuestionsResult, ThreadRegisteredDoneResult, BURIED_ANSWERS_HEADER, ANSWER_FOLLOW_UP_MARKER, ANSWER_CONTINUATION_INDENT, indentAnswerContinuation, ANSWER_PICK_PREFIX, DISMISSED_ANSWER, ANSWER_ROW_ID_PATTERN, ANSWER_ROW_ID, answerRowId, ANSWERS_NOTE_HEADER, STEPS_DONE, MarkOwnDoneInput, MarkOwnDoneResult, ListOwnPrWatchesInput, OwnPrWatchesResult, ThreadTimerView, ThreadFence, LimitWindow, LimitPause, ProviderError, ThreadLinkView, HumanTodo, SetHumanTodoInput, UpsertOwnLinkInput, UpsertOwnLinkResult, DropOwnLinkInput, DropOwnLinkResult, LiveTool, ThreadView, SPINNING_UP_TITLE, UNTITLED_THREAD_TITLE, SPIN_UP_MS, CODEX_TITLE_SIGNAL_GRACE_MS, BoardErrorItem, BoardSnapshot, BoardState, QuotaWindow, ProviderQuota, QuotaSnapshot, ProviderAuth, AccountEmails, AuthSnapshot, AccountBackend, AccountLogoutInput, AccountLogoutResult, PermissionMode, LocalFileOpener, Settings, DispatchProviderPreferences, DispatchPreferences, DispatchProfileSnapshotShape, DispatchProfileSnapshot, SetDispatchPreferenceInput, DispatchInput, ADOPT_THREAD_MESSAGE_MAX_CHARS, AdoptThreadInput, AdoptThreadResult, AdoptSessionInput, FollowUpInput, SteerThreadInput, SteerThreadResult, SpawnThreadInput, SpawnThreadResult, SpawnChildInput, SpawnChildResult, DismissFailedFollowUpInput, DismissFailedFollowUpResult, UnqueueFollowUpInput, UnqueueFollowUpResult, DeliverQueuedNowInput, DeliverQueuedNowResult, CompactThreadInput, SetThreadSnoozeInput, SetThreadPinnedInput, ReorderPinnedThreadsInput, SetThreadConsolePinnedInput, ReorderConsolePinnedThreadsInput, SetThreadRecurringPromptInput, SetOwnThreadRecurringPromptInput, SetOwnThreadRecurringPromptResult, GetOwnThreadRecurringPromptInput, OwnThreadRecurringPromptResult, SetOwnThreadTimerInput, CancelOwnThreadTimerInput, ListOwnThreadTimersInput, OwnThreadTimersResult, ThreadActivityItem, ListOwnThreadActivityInput, OwnThreadActivityResult, ThreadBand, ThreadListing, ListThreadsInput, ListThreadsResult, SetOwnThreadTimerResult, CancelOwnThreadTimerResult, SetOwnThreadStopHookInput, SetOwnThreadHeartbeatInput, RenameThreadInput, AiRenameThreadInput, AiRenameThreadResult, SetOwnThreadTitleInput, SetOwnThreadTitleResult, SetThreadPermissionInput, SetThreadPermissionResult, ThreadProfileOptionsInput, ThreadProfileOptionsResult, ThreadSkillSource, ThreadSkill, ThreadSkillsInput, ThreadSkillsResult, McpTarget, McpServerState, McpServerReading, McpStatusInput, McpStatusResult, McpSignInInput, McpSignInState, McpSignInResult, McpSignInAttemptInput, McpSignInPollResult, McpSignInFinishInput, SetThreadProfileInput, SetThreadProfileResult, UpgradeThreadModelInput, UpgradeThreadModelResult, DISPATCH_TASK_BANNER, DISPATCH_TASK_BANNER_MARKER, GITHUB_DISPATCH_UI_BOUNDARY, WAKE_TIME_HEADER_TAIL, WAKE_TRAILERS, HUMAN_GAP_FLOOR_MS, HUMAN_GAP_NOTE_TAIL, WAKE_DELIVERY_TOKEN_TAIL, WAKE_DELIVERY_TOKEN_LINE, MERGED_WAKE_LEAD, MERGED_WAKE_HEADING, NOISE_PREFIXES, AGENT_MESSAGE_WRAPPER, CROSS_SESSION_PREAMBLE, CROSS_SESSION_WRAPPER, CROSS_SESSION_GUIDANCE, XML_ATTRIBUTE, THREAD_MESSAGE_OPEN, THREAD_MESSAGE_CLOSE, THREAD_MESSAGE_GUIDANCE, sealThreadMessageBody, unsealThreadMessageBody, RETRY_FOLLOW_UP, GithubWakeItem, GithubWakeSteer, WAKE_SCOPE, WAKE_REVIEW_LEAD, WAKE_BACKLOG_TAIL, WAKE_REF, WAKE_SINGLE, WAKE_MULTI_HEAD, WAKE_ITEM, WAKE_MORE, PR_WATCH_FINISHED, PR_WATCH_CI_PASSED, PR_WATCH_CI_GATED, PR_WATCH_STATE, PR_WATCH_CI_FAILED, GithubStatus, GithubAccount, GithubRefCard, GithubRefPreviewInput, GithubRefPreviewResult, GithubItem, GithubListInput, GithubListResult, GithubBatchInput, GithubBatchResult, BoardMeta, BoardDeltaEvent, ServerEvent, BoardDeltasInput, BoardDeltasResult, TranscriptEdit, TranscriptTodo, TranscriptToolCall, TranscriptPart, TranscriptMessage, TranscriptPageCursor, EditedFile, TranscriptPage, TranscriptEarlierInput, SocketTranscriptSlug, SocketFilePath, SocketTranscriptClientMsg, SocketFileClientMsg, SocketBoardClientMsg, SocketClientMsg, ProjectCard, ProjectRailCounts, PROJECT_ICON_EXTENSIONS, PROJECT_ICON_MAX_BASE64_CHARS, DirectoryPickResult, ThreadLocation, FRIZZ_ROUTE_PREFIX, DEFAULT_PORT, threadIdentityName;
|
|
15303
15392
|
var init_src = __esm({
|
|
15304
15393
|
"packages/shared/src/index.ts"() {
|
|
15305
15394
|
"use strict";
|
|
@@ -15313,6 +15402,7 @@ var init_src = __esm({
|
|
|
15313
15402
|
init_claude_editions();
|
|
15314
15403
|
init_code_fences();
|
|
15315
15404
|
init_question_fence();
|
|
15405
|
+
init_signal_fence();
|
|
15316
15406
|
init_delta();
|
|
15317
15407
|
init_wire_patch();
|
|
15318
15408
|
init_fence_head();
|
|
@@ -15732,7 +15822,7 @@ var init_src = __esm({
|
|
|
15732
15822
|
AWAITING_HINT_MAX = 8;
|
|
15733
15823
|
AWAITING_HINT_VALUE_MAX = 200;
|
|
15734
15824
|
AWAITING_SCALAR_KINDS = /* @__PURE__ */ new Set(["for", "title", "status", "needs_input"]);
|
|
15735
|
-
AWAITING_STEPS_MAX =
|
|
15825
|
+
AWAITING_STEPS_MAX = 64;
|
|
15736
15826
|
AWAITING_STEP_VALUE_MAX = 2e3;
|
|
15737
15827
|
AWAITING_STEP_BODY_MAX = 4e3;
|
|
15738
15828
|
AWAITING_QUESTIONS_MAX = 24;
|
|
@@ -15793,6 +15883,13 @@ var init_src = __esm({
|
|
|
15793
15883
|
LEGACY_ISSUE_WATCH_ARMED_TRAILER = "(Registered issue watcher \u2014 STILL ARMED. It reports again on the next comment, label or assignee change, and once more when the issue closes. Drop it with `mcp__frizz__watch_issue` when it stops mattering.)";
|
|
15794
15884
|
INTERRUPT_ENDED_LEAD = "\u26A0\uFE0F The human's last follow-up was sent with INTERRUPT, which aborted your turn \u2014 and the runtime ends every background sub-agent with the turn. These did not return:";
|
|
15795
15885
|
SIGNOFF_NUDGE_MARKER = "**This message is from frizz, not from the human.**";
|
|
15886
|
+
SIGNOFF_NUDGE_BARE_LINE = "You rested without a fence, so this thread cannot be triaged.";
|
|
15887
|
+
SIGNOFF_NUDGE_STRAY_LINE = [
|
|
15888
|
+
"Your last message wrote a ```done or ```awaiting fence, but not as its END, so it signals nothing and this",
|
|
15889
|
+
"thread cannot be triaged. Only whitespace and ```question fences may follow the signal fence. Prose after it",
|
|
15890
|
+
"turns it into a plain code block, and so does a code block inside it whose own closing ``` line closes a",
|
|
15891
|
+
"three-backtick fence early: open a fence that holds code blocks with four backticks."
|
|
15892
|
+
].join("\n");
|
|
15796
15893
|
SIGNOFF_NUDGE_MESSAGE = signoffNudgeText(false);
|
|
15797
15894
|
SIGNOFF_NUDGE_MESSAGE_NEEDS_INPUT = signoffNudgeText(true);
|
|
15798
15895
|
PARK_CORRECTION_NAMES_LEAD = "\u26A0\uFE0F Your ```awaiting fence names ";
|
|
@@ -15801,6 +15898,7 @@ var init_src = __esm({
|
|
|
15801
15898
|
PARK_CORRECTION_NEEDS_INPUT_LEAD = "\u26A0\uFE0F Your ```awaiting fence gives no ";
|
|
15802
15899
|
QUESTION_FENCE_CORRECTION_LEAD = "\u26A0\uFE0F Your ```question fence ";
|
|
15803
15900
|
DONE_FENCE_CORRECTION_LEAD = "\u26A0\uFE0F Your ```done fence ";
|
|
15901
|
+
SIGNOFF_CORRECTION_LEAD = "\u26A0\uFE0F Your sign-off ";
|
|
15804
15902
|
ThreadWatchKind = external_exports.enum(["shell", "github", "timer", "command"]);
|
|
15805
15903
|
GithubChecksState = external_exports.enum(["none", "running", "passing", "failing"]);
|
|
15806
15904
|
GithubMergeState = external_exports.enum(["mergeable", "blocked", "conflicting", "unknown"]);
|
|
@@ -16394,7 +16492,10 @@ ${ANSWER_CONTINUATION_INDENT}`);
|
|
|
16394
16492
|
body: external_exports.string().optional(),
|
|
16395
16493
|
done: external_exports.boolean(),
|
|
16396
16494
|
/** The tick differs from what the worker was last told, so the next send reports it. */
|
|
16397
|
-
staged: external_exports.boolean()
|
|
16495
|
+
staged: external_exports.boolean(),
|
|
16496
|
+
/** When a send last told the worker about this box, in ms. Every box one send reported shares the
|
|
16497
|
+
* instant, so a settled card can draw what its reply covered, not only the steps its own fence listed. */
|
|
16498
|
+
reportedAt: external_exports.number().optional()
|
|
16398
16499
|
}).strict();
|
|
16399
16500
|
SetHumanTodoInput = external_exports.object({
|
|
16400
16501
|
slug: ThreadSlug,
|
|
@@ -18993,7 +19094,7 @@ async function startGithubSignIn(deps = {}) {
|
|
|
18993
19094
|
const clientId = deps.clientId ?? githubAppClientId();
|
|
18994
19095
|
if (!clientId) throw new Error("Frizz's GitHub App is not registered yet, so there is nothing to sign in to.");
|
|
18995
19096
|
const now = deps.now ?? Date.now;
|
|
18996
|
-
const sleep = deps.sleep ?? ((
|
|
19097
|
+
const sleep = deps.sleep ?? ((ms3) => new Promise((r) => setTimeout(r, ms3)));
|
|
18997
19098
|
const body = await postForm("/login/device/code", { client_id: clientId }, deps);
|
|
18998
19099
|
if (!isString(body.device_code) || !isString(body.user_code) || !isString(body.verification_uri)) {
|
|
18999
19100
|
throw new Error(`GitHub did not issue a device code${isString(body.error_description) ? `: ${body.error_description}` : ""}`);
|
|
@@ -22925,7 +23026,7 @@ function groupBySlug(rows) {
|
|
|
22925
23026
|
}
|
|
22926
23027
|
function ensureStorageSchema(db2) {
|
|
22927
23028
|
db2.exec(STORAGE_SCHEMA);
|
|
22928
|
-
for (const column of ["pinned_at TEXT", "acp_agent TEXT", "worker_surface TEXT", "console_pinned_at TEXT", "archived_at TEXT", "running_since TEXT", "parent_slug TEXT", "child_reported_at TEXT"]) {
|
|
23029
|
+
for (const column of ["pinned_at TEXT", "acp_agent TEXT", "worker_surface TEXT", "console_pinned_at TEXT", "archived_at TEXT", "running_since TEXT", "parent_slug TEXT", "child_reported_at TEXT", "held_releases TEXT"]) {
|
|
22929
23030
|
try {
|
|
22930
23031
|
db2.exec(`ALTER TABLE session ADD COLUMN ${column}`);
|
|
22931
23032
|
} catch {
|
|
@@ -23323,24 +23424,24 @@ function createStorage(source, projectId) {
|
|
|
23323
23424
|
WHEN recurring_armed_at IS NOT NULL AND recurring_prompt IS ? THEN recurring_compact_fired_at
|
|
23324
23425
|
ELSE NULL END`;
|
|
23325
23426
|
const recurringArgs = ({ prompt, stopHook, heartbeat, postCompaction, intervalMs, armedAt }) => {
|
|
23326
|
-
const
|
|
23427
|
+
const ms3 = prompt === null ? null : intervalMs;
|
|
23327
23428
|
const flag = (on2) => prompt === null || !on2 ? 0 : 1;
|
|
23328
23429
|
return [
|
|
23329
23430
|
prompt,
|
|
23330
|
-
|
|
23331
|
-
|
|
23431
|
+
ms3,
|
|
23432
|
+
ms3,
|
|
23332
23433
|
flag(stopHook),
|
|
23333
23434
|
flag(heartbeat),
|
|
23334
23435
|
flag(postCompaction),
|
|
23335
23436
|
prompt,
|
|
23336
23437
|
prompt,
|
|
23337
|
-
|
|
23438
|
+
ms3,
|
|
23338
23439
|
armedAt,
|
|
23339
23440
|
prompt,
|
|
23340
23441
|
prompt,
|
|
23341
23442
|
prompt,
|
|
23342
23443
|
prompt,
|
|
23343
|
-
|
|
23444
|
+
ms3,
|
|
23344
23445
|
prompt,
|
|
23345
23446
|
prompt
|
|
23346
23447
|
];
|
|
@@ -23584,6 +23685,14 @@ function createStorage(source, projectId) {
|
|
|
23584
23685
|
UPDATE thread_question SET state = 'dismissed', settled_at = ?
|
|
23585
23686
|
WHERE project_id = @project_id AND id = ? AND state = 'open'
|
|
23586
23687
|
`);
|
|
23688
|
+
const reopenAnsweredStmt = scope.prepare(`
|
|
23689
|
+
UPDATE thread_question SET state = 'open', answer = NULL, settled_at = NULL, delivered = 0, delivery_id = NULL
|
|
23690
|
+
WHERE project_id = @project_id AND id = ? AND thread_slug = ? AND state = 'answered'
|
|
23691
|
+
`);
|
|
23692
|
+
const undeliverDismissalStmt = scope.prepare(`
|
|
23693
|
+
UPDATE thread_question SET delivered = 0, delivery_id = NULL
|
|
23694
|
+
WHERE project_id = @project_id AND id = ? AND thread_slug = ? AND state = 'dismissed'
|
|
23695
|
+
`);
|
|
23587
23696
|
const delThreadQuestions = scope.prepare("DELETE FROM thread_question WHERE project_id = @project_id AND thread_slug = ?");
|
|
23588
23697
|
const delThreadDone = scope.prepare("DELETE FROM thread_done WHERE project_id = @project_id AND thread_slug = ?");
|
|
23589
23698
|
const delSubAgentSteers = scope.prepare("DELETE FROM subagent_steer WHERE project_id = @project_id AND thread_slug = ?");
|
|
@@ -23794,6 +23903,7 @@ function createStorage(source, projectId) {
|
|
|
23794
23903
|
);
|
|
23795
23904
|
const controlErrorStmt = scope.prepare("UPDATE session SET control_error = ? WHERE project_id = @project_id AND slug = ?");
|
|
23796
23905
|
const deliveryLedgerStmt = scope.prepare("UPDATE session SET delivery_ledger = ? WHERE project_id = @project_id AND slug = ?");
|
|
23906
|
+
const heldReleasesStmt = scope.prepare("UPDATE session SET held_releases = ? WHERE project_id = @project_id AND slug = ?");
|
|
23797
23907
|
const getSet = scope.prepare("SELECT value FROM settings WHERE project_id = @project_id AND key = ?");
|
|
23798
23908
|
const putSet = scope.prepare(
|
|
23799
23909
|
"INSERT INTO settings (project_id, key, value) VALUES (@project_id, ?, ?) ON CONFLICT(project_id, key) DO UPDATE SET value = excluded.value"
|
|
@@ -23826,7 +23936,8 @@ function createStorage(source, projectId) {
|
|
|
23826
23936
|
acp_agent: row.acp_agent ?? null,
|
|
23827
23937
|
worker_surface: row.worker_surface ?? null,
|
|
23828
23938
|
parent_slug: row.parent_slug ?? null,
|
|
23829
|
-
child_reported_at: row.child_reported_at ?? null
|
|
23939
|
+
child_reported_at: row.child_reported_at ?? null,
|
|
23940
|
+
held_releases: row.held_releases ?? null
|
|
23830
23941
|
});
|
|
23831
23942
|
const getAdoptionRuntimeSnapshot = db2.transaction((slug) => ({
|
|
23832
23943
|
// Claim first is intentional: a finalized claim disappearing before the current-row validation
|
|
@@ -24203,6 +24314,7 @@ function createStorage(source, projectId) {
|
|
|
24203
24314
|
markSettlementDelivered: (id2) => markSettlementDeliveredStmt.run(id2).changes === 1,
|
|
24204
24315
|
withdrawThreadQuestion: (slug, id2, atMs) => withdrawThreadQuestionStmt.run(atMs, id2, slug).changes === 1,
|
|
24205
24316
|
dismissThreadQuestion: (id2, atMs) => dismissThreadQuestionStmt.run(atMs, id2).changes === 1,
|
|
24317
|
+
unsettleUndelivered: (slug, id2) => reopenAnsweredStmt.run(id2, slug).changes === 1 || undeliverDismissalStmt.run(id2, slug).changes === 1,
|
|
24206
24318
|
markThreadDone: (slug, body, atMs) => {
|
|
24207
24319
|
markThreadDoneStmt.run(slug, body, atMs);
|
|
24208
24320
|
},
|
|
@@ -24414,6 +24526,7 @@ function createStorage(source, projectId) {
|
|
|
24414
24526
|
setControlErrorIfCurrent: (slug, sessionId, generation, error) => controlErrorIfCurrentStmt.run(error, slug, sessionId, generation).changes === 1,
|
|
24415
24527
|
setControlError: (slug, error) => void controlErrorStmt.run(error, slug),
|
|
24416
24528
|
setDeliveryLedger: (slug, ledger) => void deliveryLedgerStmt.run(ledger, slug),
|
|
24529
|
+
setHeldReleases: (slug, releases) => void heldReleasesStmt.run(releases, slug),
|
|
24417
24530
|
getSetting: (key) => {
|
|
24418
24531
|
const row = getSet.get(key);
|
|
24419
24532
|
if (!row) return void 0;
|
|
@@ -24505,6 +24618,8 @@ var init_storage = __esm({
|
|
|
24505
24618
|
-- rest last reported to it. Both in the ALTER list below.
|
|
24506
24619
|
parent_slug TEXT,
|
|
24507
24620
|
child_reported_at TEXT,
|
|
24621
|
+
-- SessionRow.held_releases. Also in the ALTER list below.
|
|
24622
|
+
held_releases TEXT,
|
|
24508
24623
|
-- THE RECURRING PROMPT (scheduler.ts SOURCES 4, 5 and 7): one text, three independent triggers \u2014
|
|
24509
24624
|
-- every time the thread rests, every N ms on a clock, and/or every time its context is compacted.
|
|
24510
24625
|
-- All flags 0 = off; there is no separate enable column, because another flag could only ever
|
|
@@ -24855,7 +24970,7 @@ function stop(path3) {
|
|
|
24855
24970
|
}
|
|
24856
24971
|
function serveSecret(stateDir, slug, questionId, value, opts = {}) {
|
|
24857
24972
|
const now = opts.now ?? Date.now;
|
|
24858
|
-
const
|
|
24973
|
+
const ttlMs = opts.ttlMs ?? SECRET_TTL_MS;
|
|
24859
24974
|
const root = secretsRoot(stateDir);
|
|
24860
24975
|
const dir = join16(root, slug);
|
|
24861
24976
|
const path3 = secretFilePath(stateDir, slug, questionId);
|
|
@@ -24866,16 +24981,17 @@ function serveSecret(stateDir, slug, questionId, value, opts = {}) {
|
|
|
24866
24981
|
if ((opts.platform ?? process.platform) === "win32") {
|
|
24867
24982
|
writeFileSync9(path3, value, { mode: 384 });
|
|
24868
24983
|
const timer2 = setInterval(() => {
|
|
24869
|
-
if (now() >= expiresAt || !existsSync6(path3)) stop(path3);
|
|
24984
|
+
if (now() >= entry2.expiresAt || !existsSync6(path3)) stop(path3);
|
|
24870
24985
|
}, 1e3);
|
|
24871
24986
|
timer2.unref();
|
|
24872
|
-
|
|
24987
|
+
const entry2 = { timer: timer2, expiresAt: now() + ttlMs, now, ttlMs };
|
|
24988
|
+
served.set(path3, entry2);
|
|
24873
24989
|
return path3;
|
|
24874
24990
|
}
|
|
24875
24991
|
execFileSync5("mkfifo", ["-m", "600", path3]);
|
|
24876
24992
|
const bytes = Buffer.from(value, "utf8");
|
|
24877
24993
|
const timer = setInterval(() => {
|
|
24878
|
-
if (now() >= expiresAt || !existsSync6(path3)) return stop(path3);
|
|
24994
|
+
if (now() >= entry.expiresAt || !existsSync6(path3)) return stop(path3);
|
|
24879
24995
|
let fd2;
|
|
24880
24996
|
try {
|
|
24881
24997
|
fd2 = openSync6(path3, constants2.O_WRONLY | constants2.O_NONBLOCK);
|
|
@@ -24892,9 +25008,19 @@ function serveSecret(stateDir, slug, questionId, value, opts = {}) {
|
|
|
24892
25008
|
if (delivered) stop(path3);
|
|
24893
25009
|
}, POLL_MS2);
|
|
24894
25010
|
timer.unref();
|
|
24895
|
-
|
|
25011
|
+
const entry = { timer, expiresAt: now() + ttlMs, now, ttlMs };
|
|
25012
|
+
served.set(path3, entry);
|
|
24896
25013
|
return path3;
|
|
24897
25014
|
}
|
|
25015
|
+
function rearmSecretsIn(text2) {
|
|
25016
|
+
let rearmed = 0;
|
|
25017
|
+
for (const [path3, entry] of served) {
|
|
25018
|
+
if (!text2.includes(path3)) continue;
|
|
25019
|
+
entry.expiresAt = entry.now() + entry.ttlMs;
|
|
25020
|
+
rearmed++;
|
|
25021
|
+
}
|
|
25022
|
+
return rearmed;
|
|
25023
|
+
}
|
|
24898
25024
|
function clearSecrets(stateDir) {
|
|
24899
25025
|
const root = secretsRoot(stateDir);
|
|
24900
25026
|
let removed = 0;
|
|
@@ -25627,8 +25753,17 @@ function humanTodoView(steps, ticks, options = {}) {
|
|
|
25627
25753
|
const doneAt = stale && tick.done_at !== null && tick.done_at <= tick.reported_at ? null : tick?.done_at ?? null;
|
|
25628
25754
|
const reportedAt = stale ? null : tick?.reported_at ?? null;
|
|
25629
25755
|
const done = tick ? doneAt !== null : step.closedAt !== void 0;
|
|
25630
|
-
if (!done && (!step.listed || options.finished)) continue;
|
|
25631
|
-
todos.push({
|
|
25756
|
+
if (!done && (!step.listed || options.finished || options.retiredAt !== void 0 && step.listedAt <= options.retiredAt)) continue;
|
|
25757
|
+
todos.push({
|
|
25758
|
+
id: step.id,
|
|
25759
|
+
text: step.text,
|
|
25760
|
+
...step.body ? { body: step.body } : {},
|
|
25761
|
+
done,
|
|
25762
|
+
// A tick a message still on its way already reports, as it stands now, is owed nothing more
|
|
25763
|
+
// (delivery-ledger ticksOnTheirWay).
|
|
25764
|
+
staged: tick ? done !== (reportedAt !== null) && options.onTheirWay?.get(step.id) !== done : false,
|
|
25765
|
+
...reportedAt !== null ? { reportedAt } : {}
|
|
25766
|
+
});
|
|
25632
25767
|
}
|
|
25633
25768
|
return todos;
|
|
25634
25769
|
}
|
|
@@ -28220,7 +28355,7 @@ function beginDelivery(storage, slug, send) {
|
|
|
28220
28355
|
return "begin";
|
|
28221
28356
|
}
|
|
28222
28357
|
const kept = send.supersedes ? items.filter((existing) => !(existing.id === send.supersedes && (existing.state === "failed" || existing.state === "sending"))) : items;
|
|
28223
|
-
kept.push({ id: send.id, text: send.text, state: "sending", at: now, updatedAt: now, ...send.silent ? { silent: true } : {} });
|
|
28358
|
+
kept.push({ id: send.id, text: send.text, state: "sending", at: now, updatedAt: now, ...send.silent ? { silent: true } : {}, ...send.questions?.length ? { questions: [...send.questions] } : {}, ...send.todos?.length ? { todos: send.todos.map(({ id: id2, done }) => ({ id: id2, done })) } : {} });
|
|
28224
28359
|
storage.setDeliveryLedger(slug, serializeDeliveryLedger(trimLedger(kept)));
|
|
28225
28360
|
return "begin";
|
|
28226
28361
|
}
|
|
@@ -28289,10 +28424,39 @@ function holdDelivery(storage, slug, send) {
|
|
|
28289
28424
|
const items = parseDeliveryLedger(row.delivery_ledger);
|
|
28290
28425
|
if (items.some((existing) => existing.id === send.id)) return true;
|
|
28291
28426
|
const now = new Date(send.now ?? Date.now()).toISOString();
|
|
28292
|
-
items.push({ id: send.id, text: send.text, state: "held", at: now, updatedAt: now });
|
|
28427
|
+
items.push({ id: send.id, text: send.text, state: "held", at: now, updatedAt: now, ...send.todos?.length ? { todos: send.todos.map(({ id: id2, done }) => ({ id: id2, done })) } : {}, ...send.questions?.length ? { questions: [...send.questions] } : {} });
|
|
28293
28428
|
storage.setDeliveryLedger(slug, serializeDeliveryLedger(trimLedger(items)));
|
|
28294
28429
|
return true;
|
|
28295
28430
|
}
|
|
28431
|
+
function ticksOnTheirWay(json) {
|
|
28432
|
+
let ticks;
|
|
28433
|
+
for (const item of parseDeliveryLedger(json)) {
|
|
28434
|
+
if (!item.todos?.length || item.state !== "held" && item.state !== "sending") continue;
|
|
28435
|
+
ticks ??= /* @__PURE__ */ new Map();
|
|
28436
|
+
for (const tick of item.todos) ticks.set(tick.id, tick.done);
|
|
28437
|
+
}
|
|
28438
|
+
return ticks;
|
|
28439
|
+
}
|
|
28440
|
+
function noteHeldRelease(storage, slug, id2, heldAtMs) {
|
|
28441
|
+
if (!Number.isFinite(heldAtMs)) return;
|
|
28442
|
+
const row = storage.getSession(slug);
|
|
28443
|
+
if (!row) return;
|
|
28444
|
+
const kept = parseHeldReleases(row.held_releases).filter((release) => release.id !== id2);
|
|
28445
|
+
storage.setHeldReleases(slug, JSON.stringify([...kept, { id: id2, heldAt: heldAtMs }].slice(-HELD_RELEASES_MAX)));
|
|
28446
|
+
}
|
|
28447
|
+
function heldReleaseAt(json, id2) {
|
|
28448
|
+
return parseHeldReleases(json).find((release) => release.id === id2)?.heldAt;
|
|
28449
|
+
}
|
|
28450
|
+
function parseHeldReleases(json) {
|
|
28451
|
+
if (!json) return [];
|
|
28452
|
+
try {
|
|
28453
|
+
const parsed = JSON.parse(json);
|
|
28454
|
+
if (!Array.isArray(parsed)) return [];
|
|
28455
|
+
return parsed.filter((r) => typeof r?.id === "string" && typeof r?.heldAt === "number");
|
|
28456
|
+
} catch {
|
|
28457
|
+
return [];
|
|
28458
|
+
}
|
|
28459
|
+
}
|
|
28296
28460
|
function holdStrandedDeliveries(storage, slug, sends, now) {
|
|
28297
28461
|
const row = storage.getSession(slug);
|
|
28298
28462
|
if (!row) return 0;
|
|
@@ -28683,7 +28847,7 @@ function projectDeliveryLedger(messages, items) {
|
|
|
28683
28847
|
}
|
|
28684
28848
|
return messages;
|
|
28685
28849
|
}
|
|
28686
|
-
var PENDING_TIMEOUT_MS, UNCONFIRMED_DROP_MS, MAX_LEDGER_ITEMS, MAX_CANCELLED_ITEMS, MAX_FAILED_ITEMS, SENDING_STALL_MS, RETRYABLE_SEND_GRACE_MS, SENDING_STALL_ERROR, DELIVERY_STATES, canon, DELIVERY_ERROR_MAX_CHARS, OUTSTANDING, COMPOSED_ANCHOR_MIN, renderMatchKey, CANCEL_MATCH_SLACK_MS;
|
|
28850
|
+
var PENDING_TIMEOUT_MS, UNCONFIRMED_DROP_MS, MAX_LEDGER_ITEMS, MAX_CANCELLED_ITEMS, MAX_FAILED_ITEMS, SENDING_STALL_MS, RETRYABLE_SEND_GRACE_MS, SENDING_STALL_ERROR, DELIVERY_STATES, canon, DELIVERY_ERROR_MAX_CHARS, HELD_RELEASES_MAX, OUTSTANDING, COMPOSED_ANCHOR_MIN, renderMatchKey, CANCEL_MATCH_SLACK_MS;
|
|
28687
28851
|
var init_delivery_ledger = __esm({
|
|
28688
28852
|
"packages/server/src/delivery-ledger.ts"() {
|
|
28689
28853
|
"use strict";
|
|
@@ -28700,6 +28864,7 @@ var init_delivery_ledger = __esm({
|
|
|
28700
28864
|
DELIVERY_STATES = ["sending", "pending", "enqueued", "delivered", "unconfirmed", "failed", "cancelled", "held"];
|
|
28701
28865
|
canon = (s) => s.replace(/\s+/g, " ").trim();
|
|
28702
28866
|
DELIVERY_ERROR_MAX_CHARS = 300;
|
|
28867
|
+
HELD_RELEASES_MAX = 8;
|
|
28703
28868
|
OUTSTANDING = /* @__PURE__ */ new Set(["sending", "pending", "enqueued", "delivered"]);
|
|
28704
28869
|
COMPOSED_ANCHOR_MIN = 24;
|
|
28705
28870
|
renderMatchKey = (s) => canon(stripHumanGapNote(stripWakeDeliveryToken(stripDeliveryMarkers(s))));
|
|
@@ -29046,7 +29211,7 @@ import { closeSync as closeSync11, openSync as openSync12, readFileSync as readF
|
|
|
29046
29211
|
import { join as join29 } from "node:path";
|
|
29047
29212
|
function foldSchemaDigest(dir = import.meta.dirname) {
|
|
29048
29213
|
if (foldSchemaMemo) return foldSchemaMemo;
|
|
29049
|
-
const hash = createHash10("sha256").update("frizz-tail-state-
|
|
29214
|
+
const hash = createHash10("sha256").update("frizz-tail-state-v4\0");
|
|
29050
29215
|
let read = 0;
|
|
29051
29216
|
for (const name of FOLD_SOURCES) {
|
|
29052
29217
|
try {
|
|
@@ -29056,7 +29221,7 @@ function foldSchemaDigest(dir = import.meta.dirname) {
|
|
|
29056
29221
|
hash.update(name).update("\0missing\0");
|
|
29057
29222
|
}
|
|
29058
29223
|
}
|
|
29059
|
-
foldSchemaMemo = read === 0 ? "frizz-tail-state-
|
|
29224
|
+
foldSchemaMemo = read === 0 ? "frizz-tail-state-v4-unreadable" : hash.digest("hex").slice(0, 32);
|
|
29060
29225
|
return foldSchemaMemo;
|
|
29061
29226
|
}
|
|
29062
29227
|
function encodeTailState(state) {
|
|
@@ -29262,7 +29427,8 @@ var init_tail_cache = __esm({
|
|
|
29262
29427
|
"backend/acp-transcript.ts",
|
|
29263
29428
|
"../../shared/src/index.ts",
|
|
29264
29429
|
"../../shared/src/question-fence.ts",
|
|
29265
|
-
"../../shared/src/code-fences.ts"
|
|
29430
|
+
"../../shared/src/code-fences.ts",
|
|
29431
|
+
"../../shared/src/signal-fence.ts"
|
|
29266
29432
|
];
|
|
29267
29433
|
foldSchemaMemo = null;
|
|
29268
29434
|
isEncodedMap = (value) => Boolean(value) && typeof value === "object" && Array.isArray(value.__map);
|
|
@@ -29536,13 +29702,23 @@ function parseWindowsShellHolderReport(report, paths) {
|
|
|
29536
29702
|
}
|
|
29537
29703
|
function activityMinute(at2) {
|
|
29538
29704
|
if (!at2) return "";
|
|
29539
|
-
const
|
|
29540
|
-
return Number.isFinite(
|
|
29705
|
+
const ms3 = Date.parse(at2);
|
|
29706
|
+
return Number.isFinite(ms3) ? String(Math.floor(ms3 / 6e4)) : "";
|
|
29541
29707
|
}
|
|
29542
29708
|
function isClaudeAuthErrorText(text2) {
|
|
29543
29709
|
if (/Please run \/login/i.test(text2)) return true;
|
|
29544
29710
|
return /\b401\b/.test(text2) && /authenticat|credential|OAuth/i.test(text2);
|
|
29545
29711
|
}
|
|
29712
|
+
function isSyntheticPlaceholder(rec) {
|
|
29713
|
+
return rec.type === "assistant" && rec.message?.model === "<synthetic>" && rec.isApiErrorMessage !== true;
|
|
29714
|
+
}
|
|
29715
|
+
function heldTypedAt(s, row) {
|
|
29716
|
+
if (!s.restFromAt || !s.restFromRecord || !row?.held_releases) return s.restFromAt;
|
|
29717
|
+
const heldAt = heldReleaseAt(row.held_releases, s.restFromRecord.uuid);
|
|
29718
|
+
if (heldAt === void 0 || heldAt >= Date.parse(s.restFromAt)) return s.restFromAt;
|
|
29719
|
+
const before = Date.parse(s.restFromRecord.before ?? "");
|
|
29720
|
+
return Number.isFinite(before) && before > heldAt ? s.restFromRecord.before : new Date(heldAt).toISOString();
|
|
29721
|
+
}
|
|
29546
29722
|
function newTailState(slug, sessionId, path3, foreign = false, nativeSessionId = sessionId, runtimeGeneration = 0) {
|
|
29547
29723
|
return {
|
|
29548
29724
|
slug,
|
|
@@ -29650,25 +29826,43 @@ function capFenceBody(s) {
|
|
|
29650
29826
|
}
|
|
29651
29827
|
function parseSignalFence(text2) {
|
|
29652
29828
|
if (typeof text2 !== "string") return void 0;
|
|
29653
|
-
const
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
let raw2 = "";
|
|
29657
|
-
let end = 0;
|
|
29658
|
-
let m;
|
|
29659
|
-
while ((m = SIGNAL_FENCE_RE.exec(norm)) !== null) {
|
|
29660
|
-
kind = m[2];
|
|
29661
|
-
raw2 = m[3];
|
|
29662
|
-
end = m.index + m[0].length;
|
|
29663
|
-
}
|
|
29664
|
-
if (!kind) return void 0;
|
|
29665
|
-
if (norm.slice(end).trim() !== "") return void 0;
|
|
29829
|
+
const signal = signalFenceOf(text2.replace(/\r\n/g, "\n"));
|
|
29830
|
+
if (!signal) return void 0;
|
|
29831
|
+
const { kind, raw: raw2 } = signal;
|
|
29666
29832
|
if (kind === "done") {
|
|
29667
29833
|
const { body: body2, hints: hints2 } = splitDoneFrontmatter(raw2);
|
|
29668
29834
|
return { kind, body: capFenceBody(body2), hints: hints2 };
|
|
29669
29835
|
}
|
|
29670
|
-
const { body, hints } = splitAwaitingFrontmatter(raw2);
|
|
29671
|
-
return { kind, body: capFenceBody(body), hints };
|
|
29836
|
+
const { body, hints, clearsSteps } = splitAwaitingFrontmatter(raw2);
|
|
29837
|
+
return { kind, body: capFenceBody(body), hints, ...clearsSteps ? { clearsSteps } : {} };
|
|
29838
|
+
}
|
|
29839
|
+
function signalFenceAlone(text2) {
|
|
29840
|
+
const fence = parseSignalFence(text2);
|
|
29841
|
+
if (!fence || typeof text2 !== "string") return false;
|
|
29842
|
+
if (fence.body.trim() !== "" || fence.kind === "awaiting" && fenceWaitsOnHuman(fence.hints)) return false;
|
|
29843
|
+
if (hasQuestionBlock(text2)) return false;
|
|
29844
|
+
const norm = text2.replace(/\r\n/g, "\n");
|
|
29845
|
+
const signal = signalFenceOf(norm);
|
|
29846
|
+
return signal !== void 0 && norm.slice(0, signal.start).trim() === "";
|
|
29847
|
+
}
|
|
29848
|
+
function questionFencesOnly(text2) {
|
|
29849
|
+
if (typeof text2 !== "string" || !mayHoldQuestionFence(text2)) return false;
|
|
29850
|
+
const blocks = questionFenceBlocks(text2);
|
|
29851
|
+
if (blocks.length === 0) return false;
|
|
29852
|
+
let rest = "";
|
|
29853
|
+
let from = 0;
|
|
29854
|
+
for (const b of blocks) {
|
|
29855
|
+
rest += text2.slice(from, b.start);
|
|
29856
|
+
from = b.end;
|
|
29857
|
+
}
|
|
29858
|
+
rest = (rest + text2.slice(from)).replace(/\r\n/g, "\n");
|
|
29859
|
+
const fence = parseSignalFence(rest);
|
|
29860
|
+
if (fence) {
|
|
29861
|
+
if (fence.body.trim() !== "") return false;
|
|
29862
|
+
const signal = signalFenceOf(rest);
|
|
29863
|
+
if (signal) rest = rest.slice(0, signal.start) + rest.slice(signal.end);
|
|
29864
|
+
}
|
|
29865
|
+
return !/[\p{L}\p{N}]/u.test(rest);
|
|
29672
29866
|
}
|
|
29673
29867
|
function isRealUserMessage(content) {
|
|
29674
29868
|
if (typeof content === "string") return true;
|
|
@@ -29682,6 +29876,7 @@ function noteQueuedMessage(state, rec) {
|
|
|
29682
29876
|
if (rec.operation !== "enqueue" || typeof rec.content !== "string" || typeof rec.timestamp !== "string") return;
|
|
29683
29877
|
if (!isHumanTypedMessage(rec.content)) return;
|
|
29684
29878
|
state.restFromAt = rec.timestamp;
|
|
29879
|
+
state.restFromRecord = void 0;
|
|
29685
29880
|
state.queuedHumanTexts = [...state.queuedHumanTexts ?? [], rec.content].slice(-QUEUED_HUMAN_TEXTS_MAX);
|
|
29686
29881
|
}
|
|
29687
29882
|
function wasQueued(queued, message) {
|
|
@@ -29693,11 +29888,24 @@ function wasQueued(queued, message) {
|
|
|
29693
29888
|
}
|
|
29694
29889
|
return false;
|
|
29695
29890
|
}
|
|
29696
|
-
function noteUserRecordForQuestions(state, text2, at2) {
|
|
29891
|
+
function noteUserRecordForQuestions(state, text2, at2, uuid) {
|
|
29697
29892
|
const queued = state.queuedHumanTexts ?? [];
|
|
29698
|
-
if (humanTypedMessagesIn(text2).some((message) => !wasQueued(queued, message)))
|
|
29893
|
+
if (humanTypedMessagesIn(text2).some((message) => !wasQueued(queued, message))) {
|
|
29894
|
+
state.restFromRecord = uuid ? { uuid, ...state.restFromAt ? { before: state.restFromAt } : {} } : void 0;
|
|
29895
|
+
state.restFromAt = at2;
|
|
29896
|
+
}
|
|
29897
|
+
if (splitWakeDeliveries(text2).some(repliesStepsDone)) state.stepsDoneAt = at2;
|
|
29699
29898
|
if (queued.length > 0) state.queuedHumanTexts = void 0;
|
|
29700
29899
|
if (carriesQuestionFenceCorrection(text2)) state.questionCorrectedAt = at2;
|
|
29900
|
+
if (carriesRepairCorrection(text2)) state.repairAskedAt = at2;
|
|
29901
|
+
}
|
|
29902
|
+
function carriesRepairCorrection(text2) {
|
|
29903
|
+
if (!text2.includes("\u26A0\uFE0F Your ")) return false;
|
|
29904
|
+
const repair = (body) => {
|
|
29905
|
+
const t = body.trimStart();
|
|
29906
|
+
return isParkCorrection(t) && !t.startsWith(SIGNOFF_CORRECTION_LEAD) && !t.startsWith(DONE_FENCE_CORRECTION_LEAD);
|
|
29907
|
+
};
|
|
29908
|
+
return splitWakeDeliveries(text2).some((delivery2) => repair(delivery2) || (parseMergedWake(delivery2) ?? []).some((part) => repair(part.body)));
|
|
29701
29909
|
}
|
|
29702
29910
|
function settleLegacyQuestion(state) {
|
|
29703
29911
|
if (!state.lastAssistantHasQuestion || state.restFromAt === void 0) return;
|
|
@@ -30258,7 +30466,7 @@ function applyRecord(state, rec) {
|
|
|
30258
30466
|
if (type === "system" && rec.subtype === "local_command" && state.lastKind === "user" && typeof rec.content === "string" && LOCAL_COMMAND_RECEIPT.test(rec.content.trim())) {
|
|
30259
30467
|
state.localCommandDone = true;
|
|
30260
30468
|
}
|
|
30261
|
-
if (typeof rec.timestamp === "string" && (type === "assistant" || type === "user" && !metaUserRec || type === "system")) {
|
|
30469
|
+
if (typeof rec.timestamp === "string" && (type === "assistant" && !isSyntheticPlaceholder(rec) || type === "user" && !metaUserRec || type === "system")) {
|
|
30262
30470
|
state.lastActivityAt = rec.timestamp;
|
|
30263
30471
|
}
|
|
30264
30472
|
if (typeof rec.timestamp === "string" && (state.maxRecordAt === void 0 || rec.timestamp > state.maxRecordAt)) {
|
|
@@ -30270,7 +30478,7 @@ function applyRecord(state, rec) {
|
|
|
30270
30478
|
state.permissionMode = parsed.data;
|
|
30271
30479
|
state.permissionModeRevision = (state.permissionModeRevision ?? 0) + 1;
|
|
30272
30480
|
}
|
|
30273
|
-
} else if (type === "assistant") {
|
|
30481
|
+
} else if (type === "assistant" && !isSyntheticPlaceholder(rec)) {
|
|
30274
30482
|
state.sawRecords = true;
|
|
30275
30483
|
state.lastKind = "assistant";
|
|
30276
30484
|
state.interrupted = void 0;
|
|
@@ -30323,7 +30531,9 @@ function applyRecord(state, rec) {
|
|
|
30323
30531
|
setAssistantPreview(state, raw2);
|
|
30324
30532
|
state.lastAssistantHasQuestion = hasQuestionBlock(raw2);
|
|
30325
30533
|
state.lastAssistantAllDone = saysAllDone(raw2);
|
|
30326
|
-
state.
|
|
30534
|
+
state.lastAssistantFenceAlone = signalFenceAlone(raw2);
|
|
30535
|
+
state.lastAssistantFencesOnly = questionFencesOnly(raw2);
|
|
30536
|
+
setSignalFence(state, raw2);
|
|
30327
30537
|
noteHandoff(state);
|
|
30328
30538
|
}
|
|
30329
30539
|
trackDispatches(state, rec);
|
|
@@ -30333,18 +30543,22 @@ function applyRecord(state, rec) {
|
|
|
30333
30543
|
state.sawRecords = true;
|
|
30334
30544
|
state.lastKind = "user";
|
|
30335
30545
|
state.lastStopReason = void 0;
|
|
30336
|
-
const userText2 =
|
|
30546
|
+
const userText2 = userMessageText(rec.message?.content);
|
|
30337
30547
|
state.interrupted = isInterruptMarker(userText2) || void 0;
|
|
30338
30548
|
state.localCommandDone = isLocalCommandReceipt(rec.message?.content) || void 0;
|
|
30339
30549
|
state.lastAssistantAllDone = false;
|
|
30550
|
+
state.lastAssistantFenceAlone = false;
|
|
30551
|
+
state.lastAssistantFencesOnly = false;
|
|
30340
30552
|
noteWakeTokens(state, userMessageText(rec.message?.content));
|
|
30341
30553
|
if (isRealUserMessage(rec.message?.content)) settleHumanSteps(state, userText2);
|
|
30554
|
+
else unstampHandoff(state);
|
|
30342
30555
|
state.lastFence = void 0;
|
|
30556
|
+
state.strayFence = void 0;
|
|
30343
30557
|
const humanSpoke = isHumanSpeaking(rec, userText2, systemUserRec, compactSummaryRec);
|
|
30344
30558
|
state.limitFault = void 0;
|
|
30345
30559
|
if (humanSpoke && typeof rec.timestamp === "string") {
|
|
30346
30560
|
state.lastUserAt = rec.timestamp;
|
|
30347
|
-
noteUserRecordForQuestions(state, userMessageText(rec.message?.content), rec.timestamp);
|
|
30561
|
+
noteUserRecordForQuestions(state, userMessageText(rec.message?.content), rec.timestamp, typeof rec.uuid === "string" ? rec.uuid : void 0);
|
|
30348
30562
|
settleLegacyQuestion(state);
|
|
30349
30563
|
if (state.firstUserText === void 0) {
|
|
30350
30564
|
const text2 = userMessageText(rec.message?.content).trim();
|
|
@@ -30376,21 +30590,47 @@ function applyFinalText(state, text2) {
|
|
|
30376
30590
|
setAssistantPreview(state, text2);
|
|
30377
30591
|
state.lastAssistantHasQuestion = hasQuestionBlock(text2);
|
|
30378
30592
|
state.lastAssistantAllDone = saysAllDone(text2);
|
|
30379
|
-
state.
|
|
30593
|
+
state.lastAssistantFenceAlone = signalFenceAlone(text2);
|
|
30594
|
+
state.lastAssistantFencesOnly = questionFencesOnly(text2);
|
|
30595
|
+
setSignalFence(state, text2);
|
|
30380
30596
|
noteHandoff(state);
|
|
30381
30597
|
}
|
|
30598
|
+
function setSignalFence(state, text2) {
|
|
30599
|
+
unstampHandoff(state);
|
|
30600
|
+
state.lastFence = parseSignalFence(text2);
|
|
30601
|
+
state.strayFence = !state.lastFence && signalFenceBlocks(text2.replace(/\r\n/g, "\n")).length > 0 || void 0;
|
|
30602
|
+
}
|
|
30382
30603
|
function noteHandoff(state) {
|
|
30383
30604
|
const fence = state.lastFence;
|
|
30384
|
-
if (fence?.kind
|
|
30605
|
+
if (fence?.kind !== "awaiting" || !fenceWaitsOnHuman(fence.hints) || !state.lastAssistantAt) return;
|
|
30606
|
+
if (state.handoffAt !== state.lastAssistantAt) state.handoffBefore = state.handoffAt;
|
|
30607
|
+
state.handoffAt = state.lastAssistantAt;
|
|
30608
|
+
}
|
|
30609
|
+
function unstampHandoff(state) {
|
|
30610
|
+
const fence = state.lastFence;
|
|
30611
|
+
if (fence?.kind === "awaiting" && fenceWaitsOnHuman(fence.hints)) state.handoffAt = state.handoffBefore;
|
|
30385
30612
|
}
|
|
30386
30613
|
function settleHumanSteps(state, replyText) {
|
|
30614
|
+
if (state.lastFence?.kind === "done" || state.lastFence?.clearsSteps) {
|
|
30615
|
+
state.humanSteps = unlistSteps(state.humanSteps);
|
|
30616
|
+
if (state.lastFence.clearsSteps && state.lastAssistantAt) state.stepsDoneAt = state.lastAssistantAt;
|
|
30617
|
+
return;
|
|
30618
|
+
}
|
|
30387
30619
|
const steps = state.lastFence?.kind === "awaiting" ? awaitingStepItems(state.lastFence.hints) : [];
|
|
30388
30620
|
const atMs = Date.parse(state.handoffAt ?? "");
|
|
30389
30621
|
if (steps.length === 0 || !Number.isFinite(atMs)) return;
|
|
30390
30622
|
const listed = foldHumanSteps(state.humanSteps ?? [], steps, atMs);
|
|
30391
30623
|
state.humanSteps = repliesStepsDone(replyText) ? closeHumanSteps(listed, steps.map((step) => step.text), atMs) : listed;
|
|
30392
30624
|
}
|
|
30625
|
+
function unlistSteps(steps) {
|
|
30626
|
+
return steps?.some((step) => step.listed) ? steps.map((step) => step.listed ? { ...step, listed: false } : step) : steps;
|
|
30627
|
+
}
|
|
30393
30628
|
function humanStepsOf(state) {
|
|
30629
|
+
if (state.turn === "idle" && state.lastFence?.clearsSteps && state.humanSteps) {
|
|
30630
|
+
const base = state.humanSteps;
|
|
30631
|
+
if (!unlistedAtRest.has(base)) unlistedAtRest.set(base, unlistSteps(base));
|
|
30632
|
+
return unlistedAtRest.get(base);
|
|
30633
|
+
}
|
|
30394
30634
|
const fence = state.turn === "idle" && state.lastFence?.kind === "awaiting" ? state.lastFence : void 0;
|
|
30395
30635
|
const steps = fence ? awaitingStepItems(fence.hints) : [];
|
|
30396
30636
|
const atMs = Date.parse(state.handoffAt ?? "");
|
|
@@ -30417,7 +30657,10 @@ function applyEvent(state, ev) {
|
|
|
30417
30657
|
state.lastAssistant = ev.error.message;
|
|
30418
30658
|
state.lastAssistantLine = firstTextLine(ev.error.message);
|
|
30419
30659
|
state.lastFence = void 0;
|
|
30660
|
+
state.strayFence = void 0;
|
|
30420
30661
|
state.lastAssistantAllDone = false;
|
|
30662
|
+
state.lastAssistantFenceAlone = false;
|
|
30663
|
+
state.lastAssistantFencesOnly = false;
|
|
30421
30664
|
state.lastAssistantHasQuestion = false;
|
|
30422
30665
|
if (typeof ev.at === "string") state.lastAssistantAt = ev.at;
|
|
30423
30666
|
break;
|
|
@@ -30463,8 +30706,11 @@ function applyEvent(state, ev) {
|
|
|
30463
30706
|
state.limitFault = void 0;
|
|
30464
30707
|
state.turn = "in-flight";
|
|
30465
30708
|
state.lastAssistantAllDone = false;
|
|
30709
|
+
state.lastAssistantFenceAlone = false;
|
|
30710
|
+
state.lastAssistantFencesOnly = false;
|
|
30466
30711
|
settleHumanSteps(state, ev.text ?? "");
|
|
30467
30712
|
state.lastFence = void 0;
|
|
30713
|
+
state.strayFence = void 0;
|
|
30468
30714
|
noteWakeTokens(state, ev.text);
|
|
30469
30715
|
if (!ev.synthetic) {
|
|
30470
30716
|
if (typeof ev.at === "string") {
|
|
@@ -32191,7 +32437,7 @@ ${detail2}
|
|
|
32191
32437
|
function telemetryOf(s, row) {
|
|
32192
32438
|
const pendingQuestion = s.lastAssistantHasQuestion && questionFencesLive(row?.spawned_at);
|
|
32193
32439
|
const nowMs = now();
|
|
32194
|
-
return { turn: s.turn, permPrompt: s.permPrompt, permPolicy: s.permPolicy, permDenies: s.permDenies, model: s.model, effort: s.effort, profileAt: s.profileAt, profileRevision: s.profileRevision, permissionMode: s.permissionMode, permissionModeAt: s.permissionModeAt, permissionModeRevision: s.permissionModeRevision, lastActivityAt: s.lastActivityAt, wakeTokens: s.wakeTokens, lastAssistantAt: s.lastAssistantAt, lastAssistant: s.lastAssistant, lastAssistantLine: s.lastAssistantLine, liveTool: newestLiveTool(s), aiTitle: s.aiTitle, customTitle: s.customTitle, customTitleRevision: s.customTitleRevision, subAgents: subAgentViews(s, nowMs, sidecarDirOnGrain(s, row)), droppedReports: [...s.queuedReports.values()], bgShells: [...bgShellViews(s), ...codexBgShellViews(s)], retiredShells: retiredShellViews(s), retiredSubAgents: retiredSubAgentViews(s), questionSightings: s.questionSightings, pendingAsk: s.pendingAsk, pendingQuestion, lastAssistantAllDone: s.lastAssistantAllDone, lastUserAt: s.lastUserAt, lastMidTurnDeliveryAt: s.lastMidTurnDeliveryAt, restFromAt: s
|
|
32440
|
+
return { turn: s.turn, permPrompt: s.permPrompt, permPolicy: s.permPolicy, permDenies: s.permDenies, model: s.model, effort: s.effort, profileAt: s.profileAt, profileRevision: s.profileRevision, permissionMode: s.permissionMode, permissionModeAt: s.permissionModeAt, permissionModeRevision: s.permissionModeRevision, lastActivityAt: s.lastActivityAt, wakeTokens: s.wakeTokens, lastAssistantAt: s.lastAssistantAt, lastAssistant: s.lastAssistant, lastAssistantLine: s.lastAssistantLine, liveTool: newestLiveTool(s), aiTitle: s.aiTitle, customTitle: s.customTitle, customTitleRevision: s.customTitleRevision, subAgents: subAgentViews(s, nowMs, sidecarDirOnGrain(s, row)), droppedReports: [...s.queuedReports.values()], bgShells: [...bgShellViews(s), ...codexBgShellViews(s)], retiredShells: retiredShellViews(s), retiredSubAgents: retiredSubAgentViews(s), questionSightings: s.questionSightings, pendingAsk: s.pendingAsk, pendingQuestion, lastAssistantAllDone: s.lastAssistantAllDone, lastAssistantFenceAlone: s.lastAssistantFenceAlone, lastAssistantFencesOnly: s.lastAssistantFencesOnly, lastUserAt: s.lastUserAt, lastMidTurnDeliveryAt: s.lastMidTurnDeliveryAt, restFromAt: heldTypedAt(s, row), handoffAt: s.handoffAt, stepsDoneAt: s.stepsDoneAt, humanSteps: humanStepsOf(s), questionCorrectedAt: s.questionCorrectedAt, repairAskedAt: s.repairAskedAt, lastUserText: s.lastUserText, firstUserText: s.firstUserText, lastFence: s.lastFence, strayFence: s.strayFence, noTranscript: s.noTranscript, authFault: s.authFault, apiFault: s.apiFault, operatorStopped: s.operatorStopped, providerError: s.providerError, limitFault: s.limitFault, contextTokens: s.contextTokens, contextWindow: s.contextWindow, lastCompactionAt: s.lastCompactionAt };
|
|
32195
32441
|
}
|
|
32196
32442
|
const touches = /* @__PURE__ */ new WeakMap();
|
|
32197
32443
|
const telemetryMemos = /* @__PURE__ */ new WeakMap();
|
|
@@ -32299,7 +32545,7 @@ function landsAfterRead(eventAt, lastReadAt) {
|
|
|
32299
32545
|
if (!Number.isFinite(e10) || !Number.isFinite(r)) return true;
|
|
32300
32546
|
return e10 > r;
|
|
32301
32547
|
}
|
|
32302
|
-
var IDLE_BACKSTOP_MS, RUNTIME_CHASE_MAX, POLL_MS3, MAX_PRIME_ROWS_PER_TICK, PRIME_BUDGET_MS, TRANSCRIPT_READ_WINDOW, EMPTY_BUFFER, LINE_FAULT_LOG_CAP, MAX_POLL_MS, QUIET_POLL_MS, DORMANT_SWEEP_MS, SUBAGENT_STALE_MS, SUSPENDED_GAP_MS, BASH_TIMEOUT_CEILING_MS, PENDING_CALL_TAIL_BYTES, SHELL_PROBE_TTL_MS, SHELL_PROBE_GRACE_MS, SHELL_PROBE_TTL_MAX_MS, SHELL_PROBE_TTL_AGE_SHARE, execFileAsync, shellProbeExec, FOREIGN_FRESH_MS, FOREIGN_MAX, FOREIGN_SCAN_EVERY, CACHE_FLUSH_MS, PRIME_PROGRESS_EVERY, DISCOVER_RETRY_MS, DISCOVER_RETRY_MAX_MS, RETAINED_SUBAGENTS_MAX, RETAINED_SHELLS_MAX, QUESTION_SIGHTINGS_MAX, DESCENDANT_TERMINALS_MAX, PENDING_RESUMES_MAX, PENDING_SHELLS_MAX, LIVE_TOOLS_MAX, RESUME_REPLAY_SLACK_MS, FIRST_USER_TEXT_MAX, ASSISTANT_LINE_MAX, QUESTION_BLOCK_RE,
|
|
32548
|
+
var IDLE_BACKSTOP_MS, RUNTIME_CHASE_MAX, POLL_MS3, MAX_PRIME_ROWS_PER_TICK, PRIME_BUDGET_MS, TRANSCRIPT_READ_WINDOW, EMPTY_BUFFER, LINE_FAULT_LOG_CAP, MAX_POLL_MS, QUIET_POLL_MS, DORMANT_SWEEP_MS, SUBAGENT_STALE_MS, SUSPENDED_GAP_MS, BASH_TIMEOUT_CEILING_MS, PENDING_CALL_TAIL_BYTES, SHELL_PROBE_TTL_MS, SHELL_PROBE_GRACE_MS, SHELL_PROBE_TTL_MAX_MS, SHELL_PROBE_TTL_AGE_SHARE, execFileAsync, shellProbeExec, FOREIGN_FRESH_MS, FOREIGN_MAX, FOREIGN_SCAN_EVERY, CACHE_FLUSH_MS, PRIME_PROGRESS_EVERY, DISCOVER_RETRY_MS, DISCOVER_RETRY_MAX_MS, RETAINED_SUBAGENTS_MAX, RETAINED_SHELLS_MAX, QUESTION_SIGHTINGS_MAX, DESCENDANT_TERMINALS_MAX, PENDING_RESUMES_MAX, PENDING_SHELLS_MAX, LIVE_TOOLS_MAX, RESUME_REPLAY_SLACK_MS, FIRST_USER_TEXT_MAX, ASSISTANT_LINE_MAX, QUESTION_BLOCK_RE, FENCE_BODY_MAX, LOCAL_COMMAND_RECEIPT, QUEUED_HUMAN_TEXTS_MAX, WAKE_TOKEN_RE, WAKE_TOKENS_MAX, LAUNCH_ACK_RE, AUTO_BACKGROUND_ACK_RE, ASYNC_AGENT_ACK_RE, FOLDED_TERMINALS_MAX, AGENT_TRANSCRIPT_PATH_RE, DESCENDANT_SIDECAR_MAX, DESCENDANT_NOTIFY_GRACE_MS, MAX_OWNED_TOOL_USE_IDS, humanStepsAtRest, unlistedAtRest, STOP_CLEARING_KINDS, FRIZZ_HOOK_FILES, FRIZZ_HOOK_COMMAND, HOOK_FAILURE_REPORT_EVERY_MS, BROKER_LIVENESS_TTL_MS, UNRESTORED_TAIL_FIELDS;
|
|
32303
32549
|
var init_tailer = __esm({
|
|
32304
32550
|
"packages/server/src/tailer.ts"() {
|
|
32305
32551
|
"use strict";
|
|
@@ -32371,8 +32617,7 @@ var init_tailer = __esm({
|
|
|
32371
32617
|
FIRST_USER_TEXT_MAX = 400;
|
|
32372
32618
|
ASSISTANT_LINE_MAX = 240;
|
|
32373
32619
|
QUESTION_BLOCK_RE = /^```question(?:[ \t]+[A-Za-z][^\r\n]*?)?[ \t]*\r?\n[\s\S]*?\r?\n```[ \t]*$/gm;
|
|
32374
|
-
|
|
32375
|
-
FENCE_BODY_MAX = 500;
|
|
32620
|
+
FENCE_BODY_MAX = 8e3;
|
|
32376
32621
|
LOCAL_COMMAND_RECEIPT = /^<local-command-(stdout|stderr)>[\s\S]*<\/local-command-\1>$/;
|
|
32377
32622
|
QUEUED_HUMAN_TEXTS_MAX = 16;
|
|
32378
32623
|
WAKE_TOKEN_RE = /<!-- frizz-wake:([A-Za-z0-9_-]+) -->/g;
|
|
@@ -32386,6 +32631,7 @@ var init_tailer = __esm({
|
|
|
32386
32631
|
DESCENDANT_NOTIFY_GRACE_MS = 5e3;
|
|
32387
32632
|
MAX_OWNED_TOOL_USE_IDS = 25e3;
|
|
32388
32633
|
humanStepsAtRest = /* @__PURE__ */ new WeakMap();
|
|
32634
|
+
unlistedAtRest = /* @__PURE__ */ new WeakMap();
|
|
32389
32635
|
STOP_CLEARING_KINDS = /* @__PURE__ */ new Set(["turn-start", "user-message", "assistant-text", "tool-call", "tool-result", "reasoning", "provider-error", "agent-report"]);
|
|
32390
32636
|
FRIZZ_HOOK_FILES = /* @__PURE__ */ new Set([
|
|
32391
32637
|
"agent-bind.mjs",
|
|
@@ -33315,8 +33561,8 @@ async function readAccessToken(configDir) {
|
|
|
33315
33561
|
return readKeychainToken();
|
|
33316
33562
|
}
|
|
33317
33563
|
function isoToUnix(value) {
|
|
33318
|
-
const
|
|
33319
|
-
return Number.isFinite(
|
|
33564
|
+
const ms3 = typeof value === "string" ? Date.parse(value) : NaN;
|
|
33565
|
+
return Number.isFinite(ms3) ? Math.round(ms3 / 1e3) : void 0;
|
|
33320
33566
|
}
|
|
33321
33567
|
function slugify2(name) {
|
|
33322
33568
|
return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
@@ -33453,8 +33699,8 @@ async function writeShared(path3, value) {
|
|
|
33453
33699
|
});
|
|
33454
33700
|
}
|
|
33455
33701
|
}
|
|
33456
|
-
function delay(
|
|
33457
|
-
return new Promise((resolve17) => setTimeout(resolve17,
|
|
33702
|
+
function delay(ms3) {
|
|
33703
|
+
return new Promise((resolve17) => setTimeout(resolve17, ms3));
|
|
33458
33704
|
}
|
|
33459
33705
|
async function acquireLock(path3) {
|
|
33460
33706
|
const deadline = Date.now() + LOCK_WAIT_MS;
|
|
@@ -33661,7 +33907,7 @@ function rateLimited(shared2, now) {
|
|
|
33661
33907
|
}
|
|
33662
33908
|
function serveRateLimited(shared2, now) {
|
|
33663
33909
|
if (shared2.quota.status !== "ok" || now - shared2.at >= STALE_MAX_AGE_MS) return UNAVAILABLE;
|
|
33664
|
-
const minutes = (
|
|
33910
|
+
const minutes = (ms3, round) => Math.max(1, round(ms3 / 6e4));
|
|
33665
33911
|
return {
|
|
33666
33912
|
...shared2.quota,
|
|
33667
33913
|
detail: `Next refresh in ${minutes(shared2.retryAt - now, Math.ceil)}m \xB7 last updated ${minutes(now - shared2.at, Math.round)}m ago`
|
|
@@ -33777,8 +34023,8 @@ async function readEndpointQuota(claudeBin = "claude", deps = {}, options = {})
|
|
|
33777
34023
|
});
|
|
33778
34024
|
}
|
|
33779
34025
|
}
|
|
33780
|
-
function agoLabel(
|
|
33781
|
-
const minutes = Math.floor(
|
|
34026
|
+
function agoLabel(ms3) {
|
|
34027
|
+
const minutes = Math.floor(ms3 / 6e4);
|
|
33782
34028
|
if (minutes < 1) return "just now";
|
|
33783
34029
|
if (minutes < 60) return `${minutes}m ago`;
|
|
33784
34030
|
const rest = minutes % 60;
|
|
@@ -39413,12 +39659,12 @@ var init_codex_app_server = __esm({
|
|
|
39413
39659
|
init_runtime_deferral();
|
|
39414
39660
|
CODEX_APP_SERVER_PROVIDER = "codex-app-server";
|
|
39415
39661
|
CODEX_NATIVE_LISTEN_FLAG = "FRIZZ_CODEX_NATIVE_LISTEN";
|
|
39416
|
-
CODEX_APP_SERVER_SUPPORTED_VERSION = "0.167.
|
|
39662
|
+
CODEX_APP_SERVER_SUPPORTED_VERSION = "0.167.2";
|
|
39417
39663
|
CODEX_APP_SERVER_MINIMUM_VERSION = "0.167.0";
|
|
39418
39664
|
CODEX_APP_SERVER_PROTOCOL_REVISION = Object.freeze({
|
|
39419
39665
|
packageVersion: CODEX_APP_SERVER_SUPPORTED_VERSION,
|
|
39420
|
-
sourceTag: "rust-v0.167.
|
|
39421
|
-
sourceCommit: "
|
|
39666
|
+
sourceTag: "rust-v0.167.2",
|
|
39667
|
+
sourceCommit: "ce21072c90d32c40af7a55b60b2fb35c84a43a6a"
|
|
39422
39668
|
});
|
|
39423
39669
|
PROTOCOL_FINGERPRINT = [
|
|
39424
39670
|
CODEX_APP_SERVER_PROTOCOL_REVISION.sourceTag,
|
|
@@ -40606,17 +40852,17 @@ var init_codex_app_server = __esm({
|
|
|
40606
40852
|
// Like waitForTurnCleared but scoped to ONE turn id: a different id already means the turn we were
|
|
40607
40853
|
// watching is retired (something else legitimately opened the next one), so this must not keep
|
|
40608
40854
|
// waiting for a null it will never see. Same real-wall-clock rationale as waitForTurnCleared.
|
|
40609
|
-
async waitForTurnRetired(threadSlug, sessionId, turnId,
|
|
40855
|
+
async waitForTurnRetired(threadSlug, sessionId, turnId, ms3) {
|
|
40610
40856
|
const start = Date.now();
|
|
40611
|
-
while (Date.now() - start <
|
|
40857
|
+
while (Date.now() - start < ms3) {
|
|
40612
40858
|
const row = this.bindingForScope(threadSlug, sessionId);
|
|
40613
40859
|
if (!row || row.current_turn_id !== turnId) return;
|
|
40614
40860
|
await new Promise((resolve17) => setTimeout(resolve17, 50));
|
|
40615
40861
|
}
|
|
40616
40862
|
}
|
|
40617
|
-
async waitForTurnCleared(threadSlug, sessionId,
|
|
40863
|
+
async waitForTurnCleared(threadSlug, sessionId, ms3) {
|
|
40618
40864
|
const start = Date.now();
|
|
40619
|
-
while (Date.now() - start <
|
|
40865
|
+
while (Date.now() - start < ms3) {
|
|
40620
40866
|
const row = this.bindingForScope(threadSlug, sessionId);
|
|
40621
40867
|
if (!row || row.current_turn_id === null) return;
|
|
40622
40868
|
await new Promise((resolve17) => setTimeout(resolve17, 100));
|
|
@@ -46442,7 +46688,7 @@ function sweepHibernationOnce(deps) {
|
|
|
46442
46688
|
if (retired) result.hibernated.push({ slug: row.slug, idleMs: verdict.idleMs });
|
|
46443
46689
|
}
|
|
46444
46690
|
if (result.hibernated.length) {
|
|
46445
|
-
const detail2 = result.hibernated.map(({ slug, idleMs:
|
|
46691
|
+
const detail2 = result.hibernated.map(({ slug, idleMs: ms3 }) => `${slug} (idle ${(ms3 / 36e5).toFixed(1)}h)`).join(", ");
|
|
46446
46692
|
deps.log?.(
|
|
46447
46693
|
`hibernate: retired ${result.hibernated.length} idle broker daemon(s); each wakes on its next input by cold-resuming its transcript: ${detail2}`
|
|
46448
46694
|
);
|
|
@@ -47242,14 +47488,29 @@ nothing to read, try or act on yet \u2014 a sub-agent mid-task, a build, CI \u20
|
|
|
47242
47488
|
fence carrying \`status: working\` or \`status: watching\` and NOTHING else: no summary, no progress
|
|
47243
47489
|
report, no prose. The thread stays out of the human's queue and nobody is meant to read that message, so
|
|
47244
47490
|
writing one costs you a turn of tokens for no reader. The moment there IS something for them \u2014 a partial
|
|
47245
|
-
result, a file, a server, a question \u2014 the rest is
|
|
47246
|
-
|
|
47247
|
-
|
|
47248
|
-
|
|
47249
|
-
|
|
47250
|
-
|
|
47251
|
-
|
|
47252
|
-
|
|
47491
|
+
result, a file, a server, a question \u2014 the rest is a sign-off instead.
|
|
47492
|
+
|
|
47493
|
+
**A SIGN-OFF IS THE WHOLE HANDOFF, AND IT REPLACES THE ONE BEFORE IT.** Every rest that is for the human
|
|
47494
|
+
\u2014 \`status: needs_input\`, a question, \`steps:\`, \`done\`, or prose with no fence \u2014 is a sign-off. Frizz
|
|
47495
|
+
shows the human their own last message, folds everything after it into one line, and then shows your
|
|
47496
|
+
NEWEST sign-off, so that one message is all they read. It covers everything since their last message,
|
|
47497
|
+
the quiet stretches included, and it names EVERY question still open on this thread \u2014 ones you asked at
|
|
47498
|
+
earlier rests, and ones they typed past without answering \u2014 each with a \` \`\`\`question \` fence carrying
|
|
47499
|
+
its \`id:\` alone, right under the paragraph it belongs to. Frizz refuses a sign-off that leaves an open
|
|
47500
|
+
question out, and a message that only re-lists questions with nothing written around them. So sign off
|
|
47501
|
+
when you have the whole handoff, not before: while work you started is still running and the human has
|
|
47502
|
+
nothing to act on yet, park quietly.
|
|
47503
|
+
|
|
47504
|
+
**WOKEN WITH NOTHING NEW, REST ON THE FENCE ALONE.** A wake that changes nothing for the human \u2014 CI still
|
|
47505
|
+
green, a review you already answered, a shell that finished as expected \u2014 gets the signal fence and
|
|
47506
|
+
nothing else: no prose, no question fences. Your last sign-off stays exactly where it is, cards and all,
|
|
47507
|
+
and stays the one the human reads. The fence's \`status:\` still says where the thread sits, and **A QUIET
|
|
47508
|
+
PARK TAKES THE THREAD OUT OF THE QUEUE, EVEN RIGHT AFTER A \`needs_input\` SIGN-OFF:** your newest
|
|
47509
|
+
\`status:\` is the answer. A report they only had to read no longer needs them, so \`working\` or
|
|
47510
|
+
\`watching\`. A page to review, a result to try, or an open question that is all you wait on still does,
|
|
47511
|
+
so \`status: needs_input\` \u2014 with nothing running, that fence names nothing else and waits on the
|
|
47512
|
+
question. Only \`steps:\` and questions keep the thread in their queue by themselves, until they type to
|
|
47513
|
+
this thread, answer a question or snooze it. Anything new for the human is a new sign-off, written whole.
|
|
47253
47514
|
|
|
47254
47515
|
**ALWAYS SIGN OFF.** A bare rest \u2014 nothing said about where you stand \u2014 is not a handoff, it is an item
|
|
47255
47516
|
nobody can triage: it says neither "answer me" nor "this is finished", so it sits in the queue meaning
|
|
@@ -47273,14 +47534,14 @@ prose and STOP. The card is drawn where you wrote the fence, until it is answere
|
|
|
47273
47534
|
sign-off is not a last line: each fence sits in the prose, under the paragraph it decides, and the
|
|
47274
47535
|
write-up carries the reasoning around the ask, never a copy of it (see Questions for the human).
|
|
47275
47536
|
**A QUESTION YOU ASKED STAYS YOUR ASK UNTIL THE HUMAN TYPES TO THIS THREAD.** A wake does not retire
|
|
47276
|
-
it: a finished shell, a timer, a watch, a Goal prompt or a correction is not the human replying.
|
|
47277
|
-
after one
|
|
47278
|
-
|
|
47279
|
-
|
|
47280
|
-
|
|
47281
|
-
|
|
47282
|
-
carrying its \`id:\` alone
|
|
47283
|
-
|
|
47537
|
+
it: a finished shell, a timer, a watch, a Goal prompt or a correction is not the human replying. A rest
|
|
47538
|
+
after one with nothing new is the fence alone, and the thread stays in the human's queue on that
|
|
47539
|
+
question, with its card where you asked it; you neither repeat nor reference it. Once the human has
|
|
47540
|
+
typed a message that did not answer it, the thread no longer queues on it, though it stays answerable
|
|
47541
|
+
where you asked it and its answer still wakes you. Your next sign-off \u2014 after a wake that brought
|
|
47542
|
+
something new, or after the human typed \u2014 names it again with its REFERENCE, a \` \`\`\`question \` fence
|
|
47543
|
+
carrying its \`id:\` alone, which draws the card there and puts the question back in the queue. One you no
|
|
47544
|
+
longer need, you withdraw with \`frizzctl unask <id>\`; to change one, withdraw it and ask the new version.
|
|
47284
47545
|
|
|
47285
47546
|
Use at most ONE fenced signal block \u2014 \`done\` or \`awaiting\` \u2014 at the very END. A question is not a
|
|
47286
47547
|
signal block, and it does not go at the end: its fence goes in the prose, right under the paragraph that
|
|
@@ -47518,7 +47779,8 @@ exactly ONE of them.
|
|
|
47518
47779
|
**FRIZZ KEEPS ONE TO-DO LIST FOR THE HUMAN PER THREAD, AND EVERY \`steps:\` LANDS ON IT.** A step is its
|
|
47519
47780
|
own text: the same words in a later fence keep the same box, and an unticked step your newest
|
|
47520
47781
|
\`steps:\` leaves out drops off the list, so each \`steps:\` names everything still owed. A rest with
|
|
47521
|
-
no \`steps:\` changes nothing on it
|
|
47782
|
+
no \`steps:\` changes nothing on it, and \`steps: []\` clears what is still unticked, for when nothing
|
|
47783
|
+
on it is owed any more. Their card, headed **Awaiting human**, shows the list with one
|
|
47522
47784
|
checkbox per step. Everything ticked and sent comes back to you as their reply, \`Done\`, the same as
|
|
47523
47785
|
anything they type; only some of it comes back as \`Done 1 of 3:\` over a \`- [x]\` / \`- [ ]\`
|
|
47524
47786
|
checklist, and an unticked step has NOT happened. Listing a step they reported done reopens its box,
|
|
@@ -47570,8 +47832,8 @@ exactly ONE of them.
|
|
|
47570
47832
|
"waiting on the checks" plus a duration just sits in the queue: REGISTER the PR and name it, and
|
|
47571
47833
|
if nothing is actually running, end with \`\`\`done or ask a question. (\`steps:\` counts: it names
|
|
47572
47834
|
the human.)
|
|
47573
|
-
- **WAITING ON A PERSON TO DECIDE IS A QUESTION** \u2014 a \` \`\`\`question \` fence, and
|
|
47574
|
-
|
|
47835
|
+
- **WAITING ON A PERSON TO DECIDE IS A QUESTION** \u2014 a \` \`\`\`question \` fence, and in each later
|
|
47836
|
+
sign-off, its \`id:\` alone. **WAITING ON ONE TO ACT IS \`steps:\`.** There is no
|
|
47575
47837
|
human gate and no prose park.
|
|
47576
47838
|
- **CI, RELEASES, DEPLOYS AND MERGE PROGRESSION ARE AUTOMATABLE \u2014 never \` \`\`\`awaiting \` them
|
|
47577
47839
|
BLINDLY.** For a pull request, \`frizzctl watch-pr\`; for a GitHub issue, \`frizzctl watch-issue\`{{FRIZZ_COMMANDS_CI}}.
|
|
@@ -47982,16 +48244,20 @@ ask, never the ask itself.
|
|
|
47982
48244
|
|
|
47983
48245
|
**A QUESTION STAYS ASKED ACROSS WAKES. IT FADES ONLY WHEN THE HUMAN TYPES PAST IT.** While the human
|
|
47984
48246
|
has not typed to this thread since you asked, the question is still what the thread waits on, however
|
|
47985
|
-
many times Frizz has woken you \u2014
|
|
47986
|
-
did not answer it, it stays answerable where you asked it and
|
|
47987
|
-
|
|
47988
|
-
|
|
47989
|
-
puts the thread back in the human's queue
|
|
48247
|
+
many times Frizz has woken you \u2014 a wake with nothing new gets the fence alone, and nothing more about it.
|
|
48248
|
+
After the human has typed a message that did not answer it, it stays answerable where you asked it and
|
|
48249
|
+
answering it still wakes you, but the thread no longer queues on it. **EVERY NEW SIGN-OFF NAMES EVERY
|
|
48250
|
+
OPEN QUESTION**, whichever of those it is: write its id ALONE, under the paragraph it belongs to. That
|
|
48251
|
+
places its card at this point of this message, puts the thread back in the human's queue, and is the one
|
|
48252
|
+
copy of it the human sees, since your earlier sign-offs fold away under it:
|
|
47990
48253
|
|
|
47991
48254
|
\`\`\`question
|
|
47992
48255
|
id: settings-store
|
|
47993
48256
|
\`\`\`
|
|
47994
48257
|
|
|
48258
|
+
A message that only re-lists question ids, with nothing written around them, is refused: with nothing new,
|
|
48259
|
+
rest on the fence alone.
|
|
48260
|
+
|
|
47995
48261
|
\`frizzctl activity\` lists every open question by its id, and a reference names only one of those: a
|
|
47996
48262
|
question you described in prose or noted as asked, but never wrote out as a full fence, was never
|
|
47997
48263
|
asked. A question you no longer want answered is
|
|
@@ -47999,20 +48265,20 @@ not one you leave out of the write-up \u2014 it is one you withdraw with \`frizz
|
|
|
47999
48265
|
when you worked the answer out yourself: the difference between deciding something and quietly hoping
|
|
48000
48266
|
nobody answers.
|
|
48001
48267
|
|
|
48002
|
-
**A QUESTION IS THE HANDBACK, AND THE ONLY FENCE ITS
|
|
48003
|
-
|
|
48004
|
-
|
|
48005
|
-
|
|
48006
|
-
|
|
48268
|
+
**A QUESTION IS THE HANDBACK, AND THE ONLY FENCE ITS SIGN-OFF NEEDS** \u2014 at the sign-off that asks or
|
|
48269
|
+
references it, write no \`awaiting\` fence after it: not \`status: needs_input\` (the question already puts
|
|
48270
|
+
the thread in the human's queue) and not a park. Two exceptions: work that is ALSO still running \u2014 a
|
|
48271
|
+
sub-agent, a build \u2014 whose \`awaiting\` fence names that work, and a later rest with nothing new, which is
|
|
48272
|
+
the fence alone. The answer arrives as your next user message, as its own wake.
|
|
48007
48273
|
|
|
48008
48274
|
**NO SIGN-OFF AS DONE WHILE ANY QUESTION OF YOURS IS OPEN** \u2014 at every rest, whether the question still
|
|
48009
48275
|
stands or the human has typed past it: a done card invites the human to archive the thread, and the
|
|
48010
48276
|
question dies unread with it. \`frizzctl done\` refuses, naming each open question by its id. A
|
|
48011
48277
|
\` \`\`\`done \` fence cannot be refused, so Frizz corrects it instead: one message for that rest, opening
|
|
48012
48278
|
\`\u26A0\uFE0F Your \`\`\`done fence\`, naming the same questions. Either way there are two ways out. Decide the
|
|
48013
|
-
question yourself, withdraw it with \`frizzctl unask <id>\`, and sign off done again. Or keep it open
|
|
48014
|
-
|
|
48015
|
-
which
|
|
48279
|
+
question yourself, withdraw it with \`frizzctl unask <id>\`, and sign off done again. Or keep it open:
|
|
48280
|
+
write no \`done\`, and sign off with the whole handoff instead, the question named by its REFERENCE under
|
|
48281
|
+
the paragraph it belongs to, which keeps the thread in their queue until it is answered.`;
|
|
48016
48282
|
STOP_CRITERION = `## The stop criterion
|
|
48017
48283
|
|
|
48018
48284
|
**COMING TO REST IS A STOP, and it needs the same justification as a question.** The far more common
|
|
@@ -48062,7 +48328,17 @@ security posture with real exposure; product/UX direction that is genuinely the
|
|
|
48062
48328
|
scope so vague that acting means inventing substantial new code with no way to check it. Everything
|
|
48063
48329
|
else \u2014 mechanical work, clear bugs, refactors, defaults you can justify, architecture you can reverse \u2014
|
|
48064
48330
|
you finish. When you do stop, ask it in a \` \`\`\`question \` fence with your recommendation marked,
|
|
48065
|
-
and do all the work that does NOT depend on the answer first
|
|
48331
|
+
and do all the work that does NOT depend on the answer first.
|
|
48332
|
+
|
|
48333
|
+
**WHEN YOU STOP TO ASK, ASK FOR THE WHOLE ROAD, NOT THE NEXT STEP.** First walk the task to its real
|
|
48334
|
+
end \u2014 built, merged, released, the reply posted \u2014 and find every later point where you would have to
|
|
48335
|
+
stop again: an act that needs the human's say-so, a call that is theirs, how far they want it taken.
|
|
48336
|
+
Ask those too, in the same message \u2014 each a \`when:\` follow-up on the option that leads to it, where
|
|
48337
|
+
one does \u2014 so one reply can carry the thread to the finish. "Implement the fix?" asked alone buys a
|
|
48338
|
+
second round-trip at the merge; with "Merge it once CI is green, or leave the PR for review?" hanging
|
|
48339
|
+
on its yes, it does not. This gathers only the stops the road will make anyway: a call you would make
|
|
48340
|
+
yourself stays yours (say which way you went, and hang nothing on it), and so does every gate the
|
|
48341
|
+
project's norms or the human's prompt already settle.`;
|
|
48066
48342
|
TRIVIAL_PROMPTS = `## Trivial and conversational prompts
|
|
48067
48343
|
|
|
48068
48344
|
Some dispatches never deserved a work effort \u2014 a greeting, a one-line question, a joke, a test ping.
|
|
@@ -51248,8 +51524,9 @@ function quietParkHolds(tele, runtime, nowMs, registeredPrWatches, armedTimerIds
|
|
|
51248
51524
|
function handoffStands(row, tele, questionSettledAt) {
|
|
51249
51525
|
const handoffMs = Date.parse(tele?.handoffAt ?? "");
|
|
51250
51526
|
if (!Number.isFinite(handoffMs)) return false;
|
|
51251
|
-
|
|
51252
|
-
|
|
51527
|
+
if (tele?.lastFence?.clearsSteps) return false;
|
|
51528
|
+
const reached = [tele?.restFromAt ?? tele?.lastUserAt, row.bg_snooze_rested_at, tele?.stepsDoneAt].map((at2) => Date.parse(at2 ?? ""));
|
|
51529
|
+
return ![...reached, questionSettledAt ?? Number.NaN].some((ms3) => ms3 >= handoffMs);
|
|
51253
51530
|
}
|
|
51254
51531
|
function deriveAwaitingBackground(row, tele, runtime, hasActionableInteraction = false, nowMs = Date.now(), limitPause = void 0, deliveryProcessGone = false, github = {}, registeredPrWatches = /* @__PURE__ */ new Set(), armedTimerIds = /* @__PURE__ */ new Set(), armedWatches = [], openQuestions = 0) {
|
|
51255
51532
|
if (runtime !== "turn-idle" || !hasDeclaredWait(tele, nowMs, armedTimerIds, registeredPrWatches, armedWatches)) return false;
|
|
@@ -51360,10 +51637,12 @@ function resolveSessionTitle(row, tele) {
|
|
|
51360
51637
|
aiTitle: locked ? void 0 : persisted ?? tele?.aiTitle
|
|
51361
51638
|
};
|
|
51362
51639
|
}
|
|
51363
|
-
function registeredDoneFence(done, lastUserAt) {
|
|
51640
|
+
function registeredDoneFence(done, lastUserAt, awaitingAt) {
|
|
51364
51641
|
if (!done) return void 0;
|
|
51365
51642
|
const userAt = lastUserAt ? Date.parse(lastUserAt) : Number.NaN;
|
|
51366
51643
|
if (Number.isFinite(userAt) && userAt > done.doneAt) return void 0;
|
|
51644
|
+
const parkedAt = awaitingAt ? Date.parse(awaitingAt) : Number.NaN;
|
|
51645
|
+
if (Number.isFinite(parkedAt) && parkedAt > done.doneAt) return void 0;
|
|
51367
51646
|
const { body, hints } = splitDoneFrontmatter(done.body);
|
|
51368
51647
|
return { kind: "done", body, hints, registered: true };
|
|
51369
51648
|
}
|
|
@@ -51462,7 +51741,7 @@ function sessionThreadView(projectDir, storage, row, rawTele, registeredLegacyTe
|
|
|
51462
51741
|
lastFence: void 0,
|
|
51463
51742
|
lastAssistantAllDone: false
|
|
51464
51743
|
} : rawTele;
|
|
51465
|
-
const done = supersededDone || providerError ? void 0 : registeredDoneFence(registries.done.get(row.slug), rawTele?.lastUserAt);
|
|
51744
|
+
const done = supersededDone || providerError ? void 0 : registeredDoneFence(registries.done.get(row.slug), rawTele?.lastUserAt, rawTele?.lastFence?.kind === "awaiting" ? rawTele.lastAssistantAt : void 0);
|
|
51466
51745
|
const tele = done && failedTele ? { ...failedTele, lastFence: done } : failedTele;
|
|
51467
51746
|
const headlessStalled = row.codex_runtime === "app-server" ? !nativeFailure && appServerTurnStalled(codexLive, tele?.lastActivityAt, nowMs) : isBrokerClaudeRow(row) ? !claudeBrokerDaemonAlive(row.session_id) : false;
|
|
51468
51747
|
const headlessLostWork = isBrokerClaudeRow(row) && headlessStalled && hasUnretiredOwnAgents(tele);
|
|
@@ -51506,7 +51785,11 @@ function sessionThreadView(projectDir, storage, row, rawTele, registeredLegacyTe
|
|
|
51506
51785
|
pendingAsk: Boolean(tele?.pendingAsk),
|
|
51507
51786
|
pendingQuestion: Boolean(tele?.pendingQuestion),
|
|
51508
51787
|
standingQuestions: standingCount,
|
|
51509
|
-
|
|
51788
|
+
// A HANDOFF THE QUIET PARK COULD NOT TAKE BACK is steps or questions still owed, though the last word
|
|
51789
|
+
// is the park: the thread queues for what the human must DO, never as a report they only had to read.
|
|
51790
|
+
// Read off the last fence alone, a pinned thread holding its steps behind a `status: watching` re-park
|
|
51791
|
+
// came out a plain report, and the board and the Console drop those for a pinned row (2026-11-11).
|
|
51792
|
+
humanSteps: hasHumanSteps(tele) || queuedBy.heldHandoff === true,
|
|
51510
51793
|
crashed,
|
|
51511
51794
|
limitPause: Boolean(limitPause),
|
|
51512
51795
|
providerError: Boolean(tele?.providerError && !tele.providerError.retrying)
|
|
@@ -51518,7 +51801,11 @@ function sessionThreadView(projectDir, storage, row, rawTele, registeredLegacyTe
|
|
|
51518
51801
|
const permissionMode = resolveSessionPermission(row, tele);
|
|
51519
51802
|
const permissionPending = resolvePendingPermission(row);
|
|
51520
51803
|
const title = resolveSessionTitle(row, tele);
|
|
51521
|
-
const humanTodos = archived ? [] : humanTodoView(tele?.humanSteps, registries.humanTodos.get(row.slug), {
|
|
51804
|
+
const humanTodos = archived ? [] : humanTodoView(tele?.humanSteps, registries.humanTodos.get(row.slug), {
|
|
51805
|
+
finished: tele?.lastFence?.kind === "done",
|
|
51806
|
+
retiredAt: registries.done.get(row.slug)?.doneAt,
|
|
51807
|
+
onTheirWay: ticksOnTheirWay(row.delivery_ledger)
|
|
51808
|
+
});
|
|
51522
51809
|
return {
|
|
51523
51810
|
id: row.slug,
|
|
51524
51811
|
...title,
|
|
@@ -52384,6 +52671,67 @@ var init_session_peer = __esm({
|
|
|
52384
52671
|
}
|
|
52385
52672
|
});
|
|
52386
52673
|
|
|
52674
|
+
// packages/server/src/signoff-completeness.ts
|
|
52675
|
+
function readSignOffFaults(rest) {
|
|
52676
|
+
const none = { missing: [], relisted: [] };
|
|
52677
|
+
const restMs = ms(rest.restAt);
|
|
52678
|
+
if (!Number.isFinite(restMs)) return none;
|
|
52679
|
+
const fromMs = Number.isFinite(ms(rest.turnFrom)) ? ms(rest.turnFrom) : Number.NEGATIVE_INFINITY;
|
|
52680
|
+
const turn = rest.sightings.filter((s) => ms(s.at) > fromMs && ms(s.at) <= restMs);
|
|
52681
|
+
const rested = turn.filter((s) => ms(s.at) === restMs).at(-1);
|
|
52682
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
52683
|
+
const named = /* @__PURE__ */ new Set();
|
|
52684
|
+
let restedNew = false;
|
|
52685
|
+
let restedRepeats = [];
|
|
52686
|
+
for (const s of turn) {
|
|
52687
|
+
const atMs = ms(s.at);
|
|
52688
|
+
const index = handleIndex(rest.rows, atMs, cache2);
|
|
52689
|
+
for (const b of questionFenceBlocks(s.text)) {
|
|
52690
|
+
if (b.read.form === "invalid") continue;
|
|
52691
|
+
const row = index.get(b.read.id.toLowerCase());
|
|
52692
|
+
if (!row) continue;
|
|
52693
|
+
named.add(row.id);
|
|
52694
|
+
const repeat = b.read.form === "ref" || row.asked_at < atMs;
|
|
52695
|
+
if (s !== rested) continue;
|
|
52696
|
+
if (repeat) restedRepeats.push(b.read.id);
|
|
52697
|
+
else restedNew = true;
|
|
52698
|
+
}
|
|
52699
|
+
}
|
|
52700
|
+
if (rested && !restedNew && restedRepeats.length > 0 && rest.fencesOnly === true) {
|
|
52701
|
+
restedRepeats = unique(restedRepeats);
|
|
52702
|
+
return { ...none, relisted: restedRepeats };
|
|
52703
|
+
}
|
|
52704
|
+
const status = rest.lastFence?.kind === "awaiting" ? awaitingStatus(rest.lastFence.hints) : null;
|
|
52705
|
+
const quiet = status === "working" || status === "watching";
|
|
52706
|
+
const prose = rest.fenceAlone === false;
|
|
52707
|
+
const newSignOff = rested !== void 0 || prose && (rest.lastFence === void 0 || rest.lastFence.kind === "awaiting" && !quiet);
|
|
52708
|
+
if (!newSignOff || rest.repair || rest.lastFence?.kind === "done") return none;
|
|
52709
|
+
const missing = rest.rows.flatMap((row) => {
|
|
52710
|
+
if (row.state !== "open" || row.asked_at > restMs || named.has(row.id)) return [];
|
|
52711
|
+
const spec = rest.spec(row);
|
|
52712
|
+
return spec ? [{ id: row.handle ?? row.id, question: spec.question }] : [];
|
|
52713
|
+
});
|
|
52714
|
+
return { ...none, missing };
|
|
52715
|
+
}
|
|
52716
|
+
function unique(names) {
|
|
52717
|
+
const seen = /* @__PURE__ */ new Set();
|
|
52718
|
+
return names.filter((n) => {
|
|
52719
|
+
const k2 = n.toLowerCase();
|
|
52720
|
+
if (seen.has(k2)) return false;
|
|
52721
|
+
seen.add(k2);
|
|
52722
|
+
return true;
|
|
52723
|
+
});
|
|
52724
|
+
}
|
|
52725
|
+
var ms;
|
|
52726
|
+
var init_signoff_completeness = __esm({
|
|
52727
|
+
"packages/server/src/signoff-completeness.ts"() {
|
|
52728
|
+
"use strict";
|
|
52729
|
+
init_src();
|
|
52730
|
+
init_question_fences();
|
|
52731
|
+
ms = (at2) => at2 ? Date.parse(at2) : Number.NaN;
|
|
52732
|
+
}
|
|
52733
|
+
});
|
|
52734
|
+
|
|
52387
52735
|
// packages/server/src/wake-store.ts
|
|
52388
52736
|
function isQuietWindowExempt(hintKey) {
|
|
52389
52737
|
return WAKE_QUIET_EXEMPT_HINT_PREFIXES.some((prefix) => hintKey.startsWith(prefix));
|
|
@@ -54132,6 +54480,7 @@ function createScheduler(deps) {
|
|
|
54132
54480
|
const questionRows = deps.storage.listThreadQuestions(row.slug);
|
|
54133
54481
|
const standing = standingQuestions(questionRows, tele, deps.questionFaults?.of(row.slug));
|
|
54134
54482
|
if (outbox.get(wakeDeliveryId(row.slug, row.session_id, parkFenceId(QUESTION_FENCE_CAUSE, spokeAt)))) continue;
|
|
54483
|
+
if (signOffFaultRests.get(row.slug) === spokeAt) continue;
|
|
54135
54484
|
if (tele.lastFence || tele.pendingQuestion || registeredDoneFence(deps.storage.getThreadDone(row.slug), tele.lastUserAt) !== void 0 || standing.length > 0 || answersInFlight(questionRows, answersReceivedAt(tele), row.recurring_on_rest === 1 && Boolean(row.recurring_prompt?.trim())) !== void 0 || !needsInput && deps.storage.listThreadWatches(row.slug, { armedOnly: true }).length > 0) {
|
|
54136
54485
|
if ((row.signoff_nudges ?? 0) > 0) deps.storage.resetSignoffNudges(row.slug);
|
|
54137
54486
|
continue;
|
|
@@ -54160,7 +54509,7 @@ function createScheduler(deps) {
|
|
|
54160
54509
|
sessionId: row.session_id,
|
|
54161
54510
|
fenceId,
|
|
54162
54511
|
hintKey: SIGNOFF_HINT_KEY,
|
|
54163
|
-
message: withClock(signoffNudgeMessage(ops, needsInput), spokeAt),
|
|
54512
|
+
message: withClock(signoffNudgeMessage(ops, needsInput, tele.strayFence === true), spokeAt),
|
|
54164
54513
|
reason: "rested without signing off"
|
|
54165
54514
|
}, nowMs).delivery;
|
|
54166
54515
|
log3(`waker: queued ${row.slug} \u2014 ${item.reason}`);
|
|
@@ -54312,6 +54661,58 @@ ${wakeTimeHeader(nowMs, spokeAt)}`,
|
|
|
54312
54661
|
checkpoint("after-enqueue", item);
|
|
54313
54662
|
}
|
|
54314
54663
|
}
|
|
54664
|
+
const signOffRulesFromMs = deps.signOffRulesFromMs ?? Date.now();
|
|
54665
|
+
const signOffFaultRests = /* @__PURE__ */ new Map();
|
|
54666
|
+
function evalSignOffCompleteness(nowMs) {
|
|
54667
|
+
signOffFaultRests.clear();
|
|
54668
|
+
for (const row of deps.storage.allSessions()) {
|
|
54669
|
+
if (row.state === "archived" || row.archived === 1) continue;
|
|
54670
|
+
const tele = deps.tailer.get(row.slug);
|
|
54671
|
+
if (!tele || tele.turn !== "idle") continue;
|
|
54672
|
+
const spokeAt = tele.lastAssistantAt;
|
|
54673
|
+
if (!spokeAt || !(Date.parse(spokeAt) >= signOffRulesFromMs)) continue;
|
|
54674
|
+
if (tele.lastUserAt && Date.parse(tele.lastUserAt) >= Date.parse(spokeAt)) continue;
|
|
54675
|
+
if (tele.authFault || tele.apiFault) continue;
|
|
54676
|
+
if (questionFencesLive(row.spawned_at) || autonomousGoalOf(row) !== void 0 || childOfRow(deps.storage, row)) continue;
|
|
54677
|
+
const rows = deps.storage.listThreadQuestions(row.slug);
|
|
54678
|
+
if (answersInFlight(rows, answersReceivedAt(tele), false) !== void 0) continue;
|
|
54679
|
+
const faults = readSignOffFaults({
|
|
54680
|
+
restAt: spokeAt,
|
|
54681
|
+
turnFrom: tele.lastUserAt,
|
|
54682
|
+
sightings: tele.questionSightings ?? [],
|
|
54683
|
+
lastFence: tele.lastFence,
|
|
54684
|
+
fenceAlone: tele.lastAssistantFenceAlone,
|
|
54685
|
+
fencesOnly: tele.lastAssistantFencesOnly,
|
|
54686
|
+
repair: tele.repairAskedAt !== void 0 && tele.repairAskedAt === tele.lastUserAt,
|
|
54687
|
+
rows,
|
|
54688
|
+
spec: (q3) => safeQuestionSpec(q3.spec)
|
|
54689
|
+
});
|
|
54690
|
+
if (faults.missing.length === 0 && faults.relisted.length === 0) continue;
|
|
54691
|
+
signOffFaultRests.set(row.slug, spokeAt);
|
|
54692
|
+
const tookRest = (cause) => outbox.get(wakeDeliveryId(row.slug, row.session_id, parkFenceId(cause, spokeAt)));
|
|
54693
|
+
if (tookRest(QUESTION_FENCE_CAUSE) || tookRest(DONE_OVER_QUESTION_CAUSE)) continue;
|
|
54694
|
+
if (parkCapSpent(row, spokeAt) || !correctionAllowedSinceHuman(row.slug, SIGNOFF_INCOMPLETE_CAUSE, tele)) continue;
|
|
54695
|
+
const fenceId = parkFenceId(SIGNOFF_INCOMPLETE_CAUSE, spokeAt);
|
|
54696
|
+
const deliveryId = wakeDeliveryId(row.slug, row.session_id, fenceId);
|
|
54697
|
+
if (outbox.get(deliveryId)) continue;
|
|
54698
|
+
const reason = faults.missing.length > 0 ? `sign-off leaves out ${faults.missing.length} open question(s)` : `sign-off only re-lists ${faults.relisted.length} question(s)`;
|
|
54699
|
+
const item = outbox.enqueue({
|
|
54700
|
+
id: deliveryId,
|
|
54701
|
+
slug: row.slug,
|
|
54702
|
+
sessionId: row.session_id,
|
|
54703
|
+
fenceId,
|
|
54704
|
+
hintKey: fenceId,
|
|
54705
|
+
message: `${signOffCorrection(faults)}
|
|
54706
|
+
|
|
54707
|
+
${wakeTimeHeader(nowMs, spokeAt)}`,
|
|
54708
|
+
reason
|
|
54709
|
+
}, nowMs).delivery;
|
|
54710
|
+
deps.storage.countParkBump(row.slug, spokeAt);
|
|
54711
|
+
noteCorrectionSinceHuman(row.slug, SIGNOFF_INCOMPLETE_CAUSE, tele);
|
|
54712
|
+
log3(`waker: queued ${row.slug} \u2014 ${item.reason}`);
|
|
54713
|
+
checkpoint("after-enqueue", item);
|
|
54714
|
+
}
|
|
54715
|
+
}
|
|
54315
54716
|
function evalParkIntegrity(nowMs) {
|
|
54316
54717
|
const github = readGithubStatusBook(deps.storage.getSetting(GITHUB_STATUS_SETTING));
|
|
54317
54718
|
const rows = deps.storage.allSessions();
|
|
@@ -54368,9 +54769,10 @@ ${wakeTimeHeader(nowMs, spokeAt)}`,
|
|
|
54368
54769
|
const expiresAt = parkExpiresAt(park, Date.parse(spokeAt));
|
|
54369
54770
|
const expired = expiresAt !== null && nowMs >= expiresAt;
|
|
54370
54771
|
const onParent = awaitingNeedsInput(tele.lastFence.hints) === true && childOfRow(deps.storage, row) !== void 0;
|
|
54371
|
-
const
|
|
54772
|
+
const onQuestion = park.items.length === 0 && standingQuestions(deps.storage.listThreadQuestions(row.slug), tele, deps.questionFaults?.of(row.slug)).length > 0;
|
|
54773
|
+
const nameless = park.items.length === 0 && !parkOnHuman(park) && !onParent && !onQuestion;
|
|
54372
54774
|
const unanswered2 = needsInputRequired(row.spawned_at) && awaitingNeedsInput(tele.lastFence.hints) === null;
|
|
54373
|
-
const questionFaulted = questionFaultRests.get(row.slug) === spokeAt;
|
|
54775
|
+
const questionFaulted = questionFaultRests.get(row.slug) === spokeAt || signOffFaultRests.get(row.slug) === spokeAt;
|
|
54374
54776
|
if (parkIsHonoured(park, live2) && !unanswered2 && !questionFaulted && (row.park_bumps ?? 0) > 0) deps.storage.resetParkBumps(row.slug);
|
|
54375
54777
|
if (dead.length === 0 && !expired && !nameless) {
|
|
54376
54778
|
if (!parkOnHuman(park) && parkWaitsOnThisSide(park, live2)) {
|
|
@@ -54528,6 +54930,7 @@ ${wakeTimeHeader(nowMs, spokeAt)}`,
|
|
|
54528
54930
|
"nothing left to wait for."
|
|
54529
54931
|
].join("\n");
|
|
54530
54932
|
const cause = retired.length > 0 ? "retired" : nameless ? "nameless" : expired ? "expired" : "dead";
|
|
54933
|
+
if (signOffFaultRests.get(row.slug) === spokeAt) continue;
|
|
54531
54934
|
const ops = cause === "expired" ? [] : liveOpsLines({
|
|
54532
54935
|
shells: (tele.bgShells ?? []).filter((sh2) => sh2.state === "running").map((sh2) => ({ id: sh2.taskId ?? sh2.id, label: sh2.label })),
|
|
54533
54936
|
subAgents: (tele.subAgents ?? []).filter((a) => a.state === "running").map((a) => ({ id: a.taskId ?? a.id, label: a.label })),
|
|
@@ -55908,6 +56311,7 @@ ${wakeTimeHeader(now(), spokeAt)}`;
|
|
|
55908
56311
|
evalParkBumpRelease();
|
|
55909
56312
|
evalQuestionFences(now());
|
|
55910
56313
|
evalDoneOverQuestions(now());
|
|
56314
|
+
evalSignOffCompleteness(now());
|
|
55911
56315
|
evalSignoffNudges(now());
|
|
55912
56316
|
evalParkIntegrity(now());
|
|
55913
56317
|
} catch (err) {
|
|
@@ -56025,12 +56429,13 @@ ${wakeTimeHeader(now(), spokeAt)}`;
|
|
|
56025
56429
|
stopMonitorByHuman
|
|
56026
56430
|
};
|
|
56027
56431
|
}
|
|
56028
|
-
var PR_REF_RE2, OFF_MERGE_PATHS, NEW_HEAD_CI_WAIT_MS, MERGING_PERMISSIONS, LIMIT_FENCE_PREFIX, LIMIT_HINT_PREFIX, LIMIT_RESUME_GRACE_MS, LIMIT_RESUME_HEADROOM_PERCENT, LIMIT_HEADROOM_MIN_FAULT_AGE_MS, REPORT_FENCE_PREFIX, REPORT_HINT_PREFIX, SNOOZE_FENCE_PREFIX, SNOOZE_HINT_PREFIX, HEARTBEAT_FENCE_PREFIX, HEARTBEAT_HINT_PREFIX, STOP_HOOK_FENCE_PREFIX, STOP_HOOK_HINT_KEY, COMPACT_FENCE_PREFIX, COMPACT_HINT_KEY, TIMER_FENCE_PREFIX, TIMER_HINT_PREFIX, SHELL_FENCE_PREFIX, INTERRUPT_ENDED_FENCE_PREFIX, PR_WATCH_FENCE_PREFIX, PR_WATCH_EXPIRED_FENCE_PREFIX, OWN_WATCH_EXPIRED_FENCE_PREFIX, COMMAND_WATCH_FENCE_PREFIX, COMMAND_WATCH_EXPIRED_FENCE_PREFIX, COMMAND_WATCH_CANCELLED_FENCE_PREFIX, MONITOR_EVENT_FENCE_PREFIX, MONITOR_EXITED_FENCE_PREFIX, MONITOR_EXPIRED_FENCE_PREFIX, MONITOR_CANCELLED_FENCE_PREFIX, MONITOR_OUTPUT_PRUNE_EVERY_MS, QUESTION_ANSWER_FENCE_PREFIX, ANSWER_REOFFER_BACKOFF_MS, CONTEXT_SUPERSEDED, PR_WATCH_POLL_MS, PR_WATCH_GONE_MS, PR_STATUS_FALLBACK_LIMIT, SIGNOFF_FENCE_PREFIX, SIGNOFF_HINT_KEY, SIGNOFF_NUDGE_MAX, PARK_BUMP_MAX, OWN_COMPLETION_NOTICE_GRACE_MS, SIGNOFF_NUDGE_SETTING, PARK_FENCE_PREFIX, QUESTION_FENCE_CAUSE, DONE_OVER_QUESTION_CAUSE, DONE_GATE_FROM_MS, FAULTS_OUTLIVE_HUMAN_FROM_MS, GITHUB_STATUS_CAP, REVIEW_SEEN_CAP, REVIEW_STEER_CAP, AWAITING_KEY_OF, MID_TURN_HOLD_MAX_MS, WAKE_HOLD_DEFERRAL, CODEX_CAPACITY_UNCONFIRMED;
|
|
56432
|
+
var PR_REF_RE2, OFF_MERGE_PATHS, NEW_HEAD_CI_WAIT_MS, MERGING_PERMISSIONS, LIMIT_FENCE_PREFIX, LIMIT_HINT_PREFIX, LIMIT_RESUME_GRACE_MS, LIMIT_RESUME_HEADROOM_PERCENT, LIMIT_HEADROOM_MIN_FAULT_AGE_MS, REPORT_FENCE_PREFIX, REPORT_HINT_PREFIX, SNOOZE_FENCE_PREFIX, SNOOZE_HINT_PREFIX, HEARTBEAT_FENCE_PREFIX, HEARTBEAT_HINT_PREFIX, STOP_HOOK_FENCE_PREFIX, STOP_HOOK_HINT_KEY, COMPACT_FENCE_PREFIX, COMPACT_HINT_KEY, TIMER_FENCE_PREFIX, TIMER_HINT_PREFIX, SHELL_FENCE_PREFIX, INTERRUPT_ENDED_FENCE_PREFIX, PR_WATCH_FENCE_PREFIX, PR_WATCH_EXPIRED_FENCE_PREFIX, OWN_WATCH_EXPIRED_FENCE_PREFIX, COMMAND_WATCH_FENCE_PREFIX, COMMAND_WATCH_EXPIRED_FENCE_PREFIX, COMMAND_WATCH_CANCELLED_FENCE_PREFIX, MONITOR_EVENT_FENCE_PREFIX, MONITOR_EXITED_FENCE_PREFIX, MONITOR_EXPIRED_FENCE_PREFIX, MONITOR_CANCELLED_FENCE_PREFIX, MONITOR_OUTPUT_PRUNE_EVERY_MS, QUESTION_ANSWER_FENCE_PREFIX, ANSWER_REOFFER_BACKOFF_MS, CONTEXT_SUPERSEDED, PR_WATCH_POLL_MS, PR_WATCH_GONE_MS, PR_STATUS_FALLBACK_LIMIT, SIGNOFF_FENCE_PREFIX, SIGNOFF_HINT_KEY, SIGNOFF_NUDGE_MAX, PARK_BUMP_MAX, OWN_COMPLETION_NOTICE_GRACE_MS, SIGNOFF_NUDGE_SETTING, PARK_FENCE_PREFIX, QUESTION_FENCE_CAUSE, DONE_OVER_QUESTION_CAUSE, SIGNOFF_INCOMPLETE_CAUSE, DONE_GATE_FROM_MS, FAULTS_OUTLIVE_HUMAN_FROM_MS, GITHUB_STATUS_CAP, REVIEW_SEEN_CAP, REVIEW_STEER_CAP, AWAITING_KEY_OF, MID_TURN_HOLD_MAX_MS, WAKE_HOLD_DEFERRAL, CODEX_CAPACITY_UNCONFIRMED;
|
|
56029
56433
|
var init_scheduler = __esm({
|
|
56030
56434
|
"packages/server/src/scheduler.ts"() {
|
|
56031
56435
|
"use strict";
|
|
56032
56436
|
init_src();
|
|
56033
56437
|
init_loop_turns();
|
|
56438
|
+
init_signoff_completeness();
|
|
56034
56439
|
init_question_fences();
|
|
56035
56440
|
init_awaiting();
|
|
56036
56441
|
init_codex_usage_limit();
|
|
@@ -56095,6 +56500,7 @@ var init_scheduler = __esm({
|
|
|
56095
56500
|
PARK_FENCE_PREFIX = "park";
|
|
56096
56501
|
QUESTION_FENCE_CAUSE = "question-fence";
|
|
56097
56502
|
DONE_OVER_QUESTION_CAUSE = "done-open-question";
|
|
56503
|
+
SIGNOFF_INCOMPLETE_CAUSE = "signoff-incomplete";
|
|
56098
56504
|
DONE_GATE_FROM_MS = Date.parse(QUESTION_FENCES_REGISTER_FROM);
|
|
56099
56505
|
FAULTS_OUTLIVE_HUMAN_FROM_MS = Date.parse(QUESTION_FAULTS_OUTLIVE_HUMAN_FROM);
|
|
56100
56506
|
GITHUB_STATUS_CAP = 200;
|
|
@@ -56762,8 +57168,8 @@ import { readFileSync as readFileSync34 } from "node:fs";
|
|
|
56762
57168
|
function clip4(text2, max) {
|
|
56763
57169
|
return text2.length > max ? `${text2.slice(0, max - 1)}\u2026` : text2;
|
|
56764
57170
|
}
|
|
56765
|
-
function isoFrom(
|
|
56766
|
-
return typeof
|
|
57171
|
+
function isoFrom(ms3, fallback) {
|
|
57172
|
+
return typeof ms3 === "number" && Number.isFinite(ms3) ? new Date(ms3).toISOString() : fallback;
|
|
56767
57173
|
}
|
|
56768
57174
|
function opencodeInboxId(sessionId, deliveryId) {
|
|
56769
57175
|
return `msg_frizz_${sessionId.replace(/[^A-Za-z0-9]/g, "").slice(0, 12)}_${deliveryId.replace(/[^A-Za-z0-9]/g, "")}`;
|
|
@@ -58553,7 +58959,8 @@ function readRests(messages) {
|
|
|
58553
58959
|
let registered = -1;
|
|
58554
58960
|
for (let i = turnStart; i < r; i++) if (messages[i].role === "assistant" && carriesDoneRegistration(messages[i])) registered = i;
|
|
58555
58961
|
const reading = registered >= 0 ? "signOff" : readingOf(messages[at2]) ?? "bare";
|
|
58556
|
-
|
|
58962
|
+
const stands = registered < 0 && reading === "signOff" && at2 >= 0 && signalFenceAlone(messages[at2].text);
|
|
58963
|
+
rests.push({ at: stands ? -1 : at2 >= 0 ? at2 : registered, reading, nudged: nudgedAfter(messages, r) });
|
|
58557
58964
|
turnStart = r + 1;
|
|
58558
58965
|
}
|
|
58559
58966
|
return rests;
|
|
@@ -59254,6 +59661,7 @@ function createTranscriptFold(identityPrefix = "claude") {
|
|
|
59254
59661
|
if (rec.type === "assistant") {
|
|
59255
59662
|
const msg = rec.message;
|
|
59256
59663
|
if (!msg || !Array.isArray(msg.content)) return;
|
|
59664
|
+
if (isSyntheticPlaceholder(rec)) return;
|
|
59257
59665
|
if (rec.isApiErrorMessage === true) {
|
|
59258
59666
|
const errText = msg.content.filter((b) => b?.type === "text" && typeof b.text === "string").map((b) => b.text).join("\n");
|
|
59259
59667
|
if (isClaudeAuthErrorText(errText)) return;
|
|
@@ -60511,8 +60919,8 @@ function codexDirectToolCall(name, obj, callId) {
|
|
|
60511
60919
|
case "interrupt_agent":
|
|
60512
60920
|
return { name: "Interrupt", detail: target };
|
|
60513
60921
|
case "wait_agent": {
|
|
60514
|
-
const
|
|
60515
|
-
return { name: "Wait for agents", detail:
|
|
60922
|
+
const ms3 = typeof obj.timeout_ms === "number" ? obj.timeout_ms : void 0;
|
|
60923
|
+
return { name: "Wait for agents", detail: ms3 !== void 0 ? `up to ${formatCompactDuration(ms3)}` : "mailbox update" };
|
|
60516
60924
|
}
|
|
60517
60925
|
case "wait": {
|
|
60518
60926
|
const cell = typeof obj.cell_id === "number" || typeof obj.cell_id === "string" ? obj.cell_id : void 0;
|
|
@@ -60594,10 +61002,10 @@ function codexAgentCell(obj) {
|
|
|
60594
61002
|
const effort = strField(obj.reasoning_effort);
|
|
60595
61003
|
return model && effort ? `${model}/${effort}` : model ?? effort;
|
|
60596
61004
|
}
|
|
60597
|
-
function formatCompactDuration(
|
|
60598
|
-
if (
|
|
60599
|
-
if (
|
|
60600
|
-
const minutes = Math.round(
|
|
61005
|
+
function formatCompactDuration(ms3) {
|
|
61006
|
+
if (ms3 < 1e3) return `${Math.round(ms3)}ms`;
|
|
61007
|
+
if (ms3 < 6e4) return `${Math.round(ms3 / 1e3)}s`;
|
|
61008
|
+
const minutes = Math.round(ms3 / 6e4);
|
|
60601
61009
|
if (minutes < 60) return `${minutes}m`;
|
|
60602
61010
|
return minutes % 60 ? `${Math.floor(minutes / 60)}h ${minutes % 60}m` : `${Math.floor(minutes / 60)}h`;
|
|
60603
61011
|
}
|
|
@@ -73162,7 +73570,7 @@ function Z8e(e10, t) {
|
|
|
73162
73570
|
r.spawnAbort(m), n.setError(m);
|
|
73163
73571
|
}), Gk(n, e10, o, i), n;
|
|
73164
73572
|
}
|
|
73165
|
-
var J5, X5, AS, Q5, eP, tX, nX, tP, ee, rX, Tr, iX, aX, lX, Ot, Tt, _p, AT, Ie, ze, Qo, Sp, iB, PT, IT, Ep, RB, yr, NB, HB, FT, BB, bp, Cp, Dh, Ap, Nh, Sj, WT, kj, Nj, Hj, Yj, Jj, tK, rK, sK, aK, uK, fK, _K, SK, CK, RK, Gh, xK, IK, MK, UK, JT, XT, VK, XK, e1, a1, u1, QT, g1, _1, E1, A1, T1, x1, I1, M1, U1, H1, z1, K1, W1, Z1, Q1, eG, tw, dG, mG, yG, Kb, Gb, aC, lC, cC, uC, dC, pC, E_, C_, W_, rP, Hi, oP, uX, K7e, pX, mX, Te, TS, wS, xS, bs, gP, IS, yP, MS, US, OX, wX, FS, HS, $S, zS, BS, jS, KS, GS, WS, VS, qS, YS, ZS, JS, CP, XS, AP, QS, vX, xX, eE, tE, nE, rE, oE, sE, iE, aE, lE, cE, uE, ve, RP, kX, get, hn, het, IX, Kf, Ka, NX, _E, kP, HX, qP, YP, Gf, Wf, KX, ZP, JP, Met, LP, WX, yE, ZX, UP, HP, i8, NE, a8, FE, l8, oI, sI, ku, Rs, cI, dI, HE, $E, zE, BE, mI, jE, KE, GE, WE, VE, qE, YE, ZE, JE, tm, EI, cnt, unt, dnt, pnt, fnt, nm, tb, vI, nb, rb, kI, m8, h8, DI, II, E8, b8, C8, Ut, O8, T8, $I, v8, ib, irt, k8, Jt, je, G8, Qa, Y8, Pr, dm, fb, gb, krt, QI, l7, c7, hb, u7, p7, rD, mm, tD, aD, f7, Irt, g7, y7, E7, b7, Nrt, C7, A7, fD, R7, O7, _D, I7, Ab, D7, jrt, Vrt, qrt, ED, Ir, zu, bD, rl, lot, cot, Rb, uot, dot, pot, fot, $u, mot, L7, M7, N7, SD, got, hot, F7, K7, G7, W7, V7, q7, Y7, DD, Z7, J7, X7, Q7, eQ, LD, MD, tQ, nQ, rQ, kD, Om, WD, il, Lb, Gi, FD, HD, Tm, xs, Iot, Dot, uQ, $D, vm, dQ, pQ, Mb, fQ, mQ, pr, Dr, gQ, VD, Nb, qD, xb, kb, YD, ZD, vs, hQ, _Q, JD, Vu, Pb, zD, Ub, XD, Gu, Fb, yQ, Cm, Am, Db, Tb, BD, wb, AQ, RQ, wQ, vQ, xQ, kQ, tL, IQ, DQ, LQ, Lot, Mot, UQ, FQ, wm, $Q, rL, Not, Uot, zQ, Bb, GQ, WQ, iL, VQ, qQ, YQ, aL, ZQ, XQ, eee, fL, mL, ree, qu, Wi, iee, jb, dee, pee, fee, mee, gee, u, hee, _ee, yee, See, Eee, bee, Cee, Aee, Ree, Oee, Tee, wee, vee, xee, kee, Pee, Iee, Dee, Lee, Mee, Nee, Uee, Fee, Hee, $ee, zee, Bee, jee, Kee, Gee, Wee, Vee, qee, Yee, Zee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, Ate, Rte, Ote, Tte, wte, vte, xte, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, Hte, $te, zte, Bte, jte, Kte, Gte, Wte, Vte, qte, Yte, Zte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, Ane, Rne, One, Tne, wne, vne, xne, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, Hne, $ne, zne, Bne, jne, AL, Gne, Ast, bL, Wne, qne, TL, ll, Ost, Tst, wst, vst, cl, xst, kst, Pst, Ist, wL, vL, Vb, xL, Zne, kL, PL, IL, Jne, qb, Yb, Zb, Xne, DL, LL, Qne, Mst, ere, Nst, tre, nre, ML, Ust, rre, ore, sre, ire, are, lre, cre, ure, Fst, Ps, Xb, ul, dre, pre, fre, Zst, _re, eit, Sre, Ere, $L, HL, bre, jL, Are, sC, WL, km, nC, VL, $re, Gre, tM, nM, aM, ioe, cM, uM, goe, Ju, fl, yoe, Soe, Eoe, boe, Coe, Aoe, Roe, Ooe, Toe, woe, voe, xoe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, Hoe, $oe, zoe, Boe, joe, Koe, Goe, Woe, Voe, qoe, Yoe, Zoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, bse, Cse, Ase, Rse, Ose, Tse, wse, vse, xse, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, Hse, $se, zse, Bse, jse, Kse, Gse, Wse, Vse, qse, Yse, Zse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, Aie, Rie, Oie, Tie, wie, vie, xie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, Hie, $ie, zie, Bie, jie, Kie, Gie, Wie, Vie, qie, Yie, Zie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, Aae, Rae, Oae, Tae, wae, vae, xae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, Hae, $ae, zae, Bae, jae, Kae, Gae, Wae, Vae, qae, Yae, Zae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, Ale, Rle, Ole, Tle, wle, vle, xle, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, Hle, $le, zle, Ble, jle, Kle, Gle, Wle, Vle, qle, Yle, Zle, Jle, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, Ace, Rce, Oce, Tce, wce, vce, xce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, Hce, $ce, zce, Bce, jce, Kce, Gce, Wce, Vce, qce, Yce, Zce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, Aue, Rue, Oue, Tue, wue, vue, xue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, Hue, $ue, zue, Bue, jue, Kue, Gue, Wue, Vue, que, Yue, Zue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, Ade, Rde, Ode, Tde, wde, vde, xde, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, Hde, $de, zde, Bde, jde, Kde, Gde, Wde, Vde, qde, Yde, Zde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, Ape, Rpe, Ope, Tpe, wpe, vpe, xpe, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, Hpe, $pe, zpe, Bpe, jpe, Kpe, Gpe, Wpe, Vpe, qpe, Ype, Zpe, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, Afe, Rfe, Ofe, Tfe, wfe, vfe, xfe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, Hfe, $fe, zfe, Bfe, jfe, Kfe, Gfe, Wfe, Vfe, qfe, Yfe, Zfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, Ame, Rme, Ome, Tme, wme, vme, xme, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, Hme, $me, zme, Bme, jme, Kme, Gme, Wme, Vme, qme, Yme, Zme, Jme, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, Age, Rge, Oge, Tge, wge, vge, xge, kge, Pge, Ige, Dge, Lge, Mge, Nge, Uge, Fge, Hge, $ge, zge, Bge, jge, Kge, Gge, Wge, Vge, qge, Yge, Zge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, Ahe, Rhe, Ohe, The, whe, vhe, xhe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, Uhe, Fhe, Hhe, $he, zhe, Bhe, jhe, Khe, Ghe, Whe, Vhe, qhe, Yhe, Zhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, A_e, R_e, O_e, T_e, w_e, v_e, x_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, H_e, $_e, z_e, B_e, j_e, K_e, G_e, W_e, V_e, q_e, Y_e, Z_e, J_e, X_e, Q_e, eye, tye, nye, rye, oye, sye, iye, aye, lye, cye, uye, dye, pye, fye, mye, gye, hye, _ye, yye, Sye, Eye, bye, Cye, Aye, Rye, Oye, Tye, wye, vye, xye, kye, Pye, Iye, Dye, Lye, Mye, Nye, Uye, Fye, Hye, $ye, zye, Bye, jye, Kye, Gye, Wye, Vye, qye, Yye, Zye, Jye, Xye, Qye, eSe, tSe, nSe, rSe, oSe, sSe, iSe, aSe, lSe, cSe, uSe, dSe, pSe, fSe, mSe, gSe, hSe, _Se, ySe, SSe, ESe, bSe, CSe, ASe, RSe, OSe, TSe, wSe, vSe, xSe, kSe, PSe, ISe, DSe, LSe, MSe, NSe, USe, FSe, HSe, $Se, zSe, BSe, jSe, KSe, GSe, WSe, VSe, qSe, YSe, ZSe, JSe, XSe, QSe, eEe, tEe, nEe, rEe, oEe, sEe, iEe, aEe, lEe, cEe, uEe, dEe, pEe, fEe, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, AEe, REe, OEe, TEe, wEe, vEe, xEe, kEe, PEe, IEe, DEe, LEe, MEe, NEe, UEe, FEe, HEe, $Ee, zEe, BEe, jEe, KEe, GEe, WEe, VEe, qEe, YEe, ZEe, JEe, XEe, QEe, ebe, tbe, nbe, rbe, obe, sbe, ibe, abe, lbe, cbe, ube, dbe, pbe, fbe, mbe, gbe, hbe, _be, ybe, Sbe, Ebe, bbe, Cbe, Abe, Rbe, Obe, Tbe, wbe, vbe, xbe, kbe, Pbe, Ibe, Dbe, Lbe, Mbe, Nbe, Ube, Fbe, Hbe, $be, zbe, Bbe, jbe, Kbe, Gbe, Wbe, Vbe, qbe, Ybe, Zbe, Jbe, Xbe, Qbe, eCe, tCe, nCe, rCe, oCe, sCe, iCe, aCe, lCe, cCe, uCe, dCe, pCe, fCe, mCe, gCe, hCe, _Ce, yCe, SCe, ECe, bCe, CCe, ACe, RCe, OCe, TCe, wCe, vCe, xCe, kCe, PCe, ICe, DCe, LCe, MCe, NCe, UCe, FCe, HCe, $Ce, zCe, BCe, jCe, KCe, GCe, WCe, VCe, qCe, YCe, ZCe, JCe, XCe, QCe, eAe, tAe, nAe, rAe, oAe, sAe, iAe, aAe, lAe, cAe, uAe, dAe, pAe, fAe, mAe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, AAe, RAe, OAe, TAe, wAe, vAe, xAe, kAe, PAe, IAe, DAe, LAe, MAe, NAe, UAe, FAe, HAe, $Ae, zAe, BAe, jAe, KAe, GAe, WAe, VAe, qAe, YAe, ZAe, JAe, XAe, QAe, eRe, tRe, nRe, rRe, oRe, sRe, iRe, aRe, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, yRe, SRe, ERe, bRe, CRe, ARe, fM, RRe, ORe, TRe, wRe, vRe, xRe, kRe, PRe, IRe, DRe, LRe, MRe, NRe, URe, FRe, HRe, $Re, zRe, BRe, jRe, KRe, GRe, WRe, VRe, qRe, YRe, ZRe, JRe, XRe, QRe, eOe, tOe, nOe, rOe, oOe, sOe, iOe, aOe, lOe, cOe, uOe, dOe, pOe, fOe, mOe, gOe, hOe, _Oe, yOe, SOe, EOe, bOe, COe, AOe, ROe, OOe, TOe, wOe, vOe, xOe, kOe, POe, IOe, DOe, LOe, MOe, NOe, UOe, FOe, HOe, $Oe, zOe, BOe, jOe, KOe, GOe, WOe, VOe, YOe, ZOe, Dt, XOe, Xat, QOe, Qat, _Te, RTe, SM, Mlt, Nlt, $o, DTe, Mm, LTe, td, MTe, bC, HTe, $Te, Hlt, YM, VM, RC, nN, rN, zm, TC, BTe, CC, Ds, KTe, GTe, _N, PC, yN, ro, dd, Rn, YTe, DC, SN, EN, bN, pd, fd, NC, md, UC, gd, hd, _d, yd, XTe, QTe, Wm, Vm, AN, RN, ON, TN, wN, vN, xN, kN, PN, IN, DN, LN, MN, NN, FN, HN, HC, $N, twe, BN, jN, KN, GN, WN, VN, qN, YN, ZN, JN, eU, $C, Sd, tU, nU, rU, oU, sU, Wt, zC, qm, BC, jC, iU, aU, lU, cU, uU, Ed, dU, pU, fU, mU, gU, hU, _U, KC, Ur, Ge, xU, bd, at, VC, qC, YC, kU, PU, swe, ZC, JC, XC, QC, eA, tA, nA, rA, IU, DU, LU, MU, oA, cwe, sA, iA, aA, lA, cA, Jm, uA, dA, pA, Xm, fA, mA, gA, hA, _A, yA, SA, fwe, EA, $U, Qm, bA, CA, AA, RA, OA, TA, eg, wA, vA, xA, kA, PA, IA, tg, zU, DA, LA, MA, BU, KU, UA, jU, WU, Cd, og, Ad, ng, rg, _we, Swe, VU, qU, Fr, n0, QU, r0, wd, bl, Cl, o0, c0, u0, d0, p0, s0, i0, a0, Cwe, Awe, Rwe, f0, NR, UR, FR, HR, $R, zR, BR, jR, KR, GR, WR, VR, qR, YR, ZR, MR, JR, XR, QR, eO, tO, nO, rO, oO, sO, pg, iO, k0, Dwe, Jn, P0, I0, D0, L0, M0, N0, U0, F0, H0, $0, z0, B0, Xe, G0, uO, bt, dO, W0, V0, q0, Rve, Ove, mg, Tve, wve, vve, xve, kve, Pve, Ive, Dve, Lve, Mve, Nve, Uve, Fve, Hve, $ve, zve, pO, Bve, Y0, jve, Kve, Gve, Wve, Vve, Id, Z0, qve, Yve, lO, cO, Zve, Jve, Rl, Q0, Qve, exe, nxe, eF, yg, Dd, ixe, axe, cxe, tF, fr, nF, iF, mxe, gxe, Sxe, Exe, Ht, vxe, Ns, _F, ldt, EF, bF, CF, AF, Lxe, Mxe, RF, Nxe, Uxe, OF, Fxe, Hxe, wF, Kxe, vF, Wxe, kF, Ag, PF, LF, Zxe, MF, Xxe, eke, FF, HF, nH, upt, Wke, Qke, ePe, pPe, xO, mft, gft, hft, Sft, Eft, SPe, wH, vH, xH, kH, PH, Vft, RPe, PO, OPe, TPe, wPe, vPe, IO, qft, DH, DPe, LPe, MPe, DO, HPe, kO, bH, GH, sIe, Ue, d$, te, Vo, H, Xn, IIe, Fs, DIe, Lg, yn, ye, Il, On, zO, BO, ia, Gd, ue, $r, p$, De, LIe, MIe, NIe, UIe, FIe, HIe, $Ie, zIe, BIe, jO, jIe, KIe, GIe, WIe, VIe, qIe, f$, YIe, Yo, Ll, Ml, Mg, Vd, Ng, qd, Yd, Ug, aa, Zo, Fg, oo, wt, Zd, qo, GO, Jd, Jo, Hg, $g, Nl, Wd, Xd, Qd, la, ep, Ul, io, so, Hs, tp, np, zg, sgt, WO, Bg, rp, igt, j, agt, lgt, cgt, ugt, dgt, pgt, fgt, mgt, ggt, hgt, _gt, ygt, Sgt, Egt, h$, bgt, Cgt, Agt, Rgt, Ogt, Tgt, wgt, vgt, xgt, kgt, Pgt, Igt, Dgt, Lgt, Mgt, Ngt, Ugt, Fgt, Hgt, rDe, oDe, js, Vg, qt, E$, b$, iht, iDe, aDe, YO, Qn, op, pn, gr, hr, fn, qg, A$, R$, JO, pe, XO, aht, lht, Yg, lDe, Zg, cDe, ip, Fl, w$, uDe, dDe, pDe, fDe, mDe, gDe, QO, hDe, _De, eT, Jg, yDe, SDe, Xg, EDe, ap, lp, bDe, cp, Hl, CDe, up, Qg, eh, th, cht, nh, rh, oh, v$, x$, k$, tT, P$, dp, $l, I$, ADe, sh, RDe, ih, ODe, nT, TDe, ah, wDe, vDe, xDe, kDe, PDe, IDe, DDe, LDe, MDe, NDe, lh, UDe, FDe, ch, rT, oT, sT, HDe, $De, zDe, iT, BDe, jDe, KDe, GDe, WDe, D$, uh, VDe, dh, uht, qDe, zl, YDe, dht, pp, ZDe, aT, JDe, XDe, QDe, eLe, tLe, nLe, rLe, Wg, oLe, sLe, iLe, fp, lT, aLe, lLe, cLe, uLe, dLe, pLe, fLe, mLe, gLe, hLe, _Le, yLe, SLe, ELe, bLe, CLe, ALe, RLe, Bl, OLe, TLe, wLe, ph, vLe, xLe, kLe, cT, PLe, pht, fht, mht, ght, hht, _ht, F$, LLe, SG, EG, RG, AG, ts, $ze, Gze, Wze, Vze, qze, Yze, kG, FG, Jze, Xze, Qze, eBe, Re, tBe, c_, ha, Tw, rs, zG, BG, jG, KG, GG, WG, ww, vw, bw, DG, aBe, lBe, uBe, VG, Cw, l_, Rw, Ow, pBe, fBe, LG, di, u_, tr, wBe, d_, vBe, xBe, Bt, kBe, nn, uc, IBe, lt, uW, DBe, LBe, xp, dW, NBe, UBe, pW, HBe, $Be, fW, nr, Yt, jBe, dc, GBe, mW, gW, _W, yW, VBe, SW, ZBe, bW, QBe, Pp, tje, vW, bo, fi, aje, lje, xW, kW, PW, IW, mi, DW, LW, MW, NW, Lt, yje, Sje, Eje, bje, mc, Aje, p_, UW, FW, Oje, Tje, os2, vje, xje, kje, Pje, Ije, Dje, Lje, HW, $W, Vn, Fje, gi, Hje, ss, zW, BW, Bje, jje, Kje, jW, Wje, Vje, KW, Yje, GW, Lw, WW, VW, hi, qW, YW, ZW, JW, _a, oKe, XW, Co, iKe, QW, eV, m_, tV, g_, dKe, pKe, h_, mKe, yc, nV, Sc, _Ke, yKe, SKe, EKe, bKe, CKe, AKe, RKe, OKe, TKe, wKe, vKe, xKe, rV, Mw, oV, Ec, __, sV, y_, MKe, NKe, iV, UKe, bc, aV, HKe, Nw, lV, zKe, BKe, jKe, is, cV, pV, uV, GKe, dV, WKe, VKe, Ao, qKe, YKe, _i, JKe, Cc, QKe, e1e, t1e, n1e, r1e, o1e, s1e, i1e, a1e, l1e, c1e, u1e, d1e, p1e, f1e, m1e, g1e, h1e, _1e, y1e, S1e, E1e, b1e, C1e, dt, fV, Ac, mV, Ip, O1e, Uw, T1e, Ro, gV, w1e, Rc, v1e, x1e, A_, P1e, Oc, R_, L1e, hV, M1e, N1e, _V, Oo, To, Dp, z1e, B1e, j1e, yV, G1e, O_, W1e, T_, V1e, yi, q1e, w_, SV, Y1e, EV, bV, CV, AV, Z1e, J1e, X1e, Q1e, eGe, ya, as, tGe, RV, OV, v_, nGe, TV, wV, Tc, oGe, sGe, xV, x_, kV, k_, PV, dGe, pGe, wc, mGe, IV, gGe, DV, _Ge, yGe, SGe, LV, Cr, bGe, rr, Si, MV, NV, UV, P_, vGe, xGe, FV, vc, HV, $V, zV, wo, NGe, xc, Ei, FGe, HGe, kc, BV, I_, jGe, Pc, KGe, GGe, D_, jV, VGe, qGe, KV, vo, Ic, Dc, eWe, uxt, qV, nWe, XV, uWe, t2, _We, yWe, r2, o2, s2, i2, Mc, l2, $w, c2, M_, a2, OWe, qxt, Ci, u2, Mp, Nc, N_, TWe, f2, d2, Sa, b2, NWe, T2, FWe, w2, Np, v2, tPt, jWe, Yw, L2, WWe, qWe, YWe, nPt, rPt, Fp, xo, dPt, Uc, H_, JWe, XWe, Gr, H2, tVe, B_, j_, K_, zp, j2, $2, sVe, z2, B2, Bp, Hc, V_, q_, K2, uVe, G2, Y_, W2, fVe, mVe, gVe, V2, hVe, _Ve, Z_, jp, Ar, q2, Y2, J2, X2, Q2, J_, eq, TVe, tq, wVe, vVe, xVe, nq, PVe, X_, rq, oq, sq, MVe, iq, aq, lq, cq, uq, zVe, BVe, dq, pq, GVe, fq, mq, gq, hq, qVe, YVe, ZVe, JVe, XVe, QVe, e2e, t2e, n2e, r2e, o2e, s2e, i2e, a2e, l2e, c2e, u2e, d2e, p2e, _q, m2e, yq, Sq, h2e, Eq, _2e, bq, Cq, S2e, Aq, E2e, b2e, C2e, Rq, A2e, R2e, O2e, T2e, Oq, w2e, v2e, x2e, Tq, k2e, P2e, I2e, D2e, L2e, M2e, N2e, U2e, F2e, H2e, $2e, z2e, B2e, j2e, K2e, G2e, ct, wq, vq, xq, kq, Y2e, Z2e, ey, Pq, Iq, Dq, Mq, Nq, ty, nqe, rqe, oqe, sqe, Uq, Fq, lqe, Hq, $q, zq, dqe, jq, fqe, gqe, Gq, ba, Xq, Oqe, Tqe, rY, Pqe, Kp, mY, tv, Yqe, Xqe, Qqe, eYe, tYe, iYe, aYe, PNt, pYe, SY, EY, $c, bY, Ca, gYe, sy, EYe, bYe, CYe, AYe, OY, qNt, YNt, rv, OYe, TYe, wYe, us, zc, ly, xY, kY, vYe, xYe, kYe, PYe, cy, Bc, uy, Oi, ov, py, IYe, DYe, sv, Aa, LYe, MY, oUt, sUt, MYe, iUt, NY, UY, FY, HY, NYe, $Y, zY, BY, jY, UYe, FYe, iv, HYe, GY, zYe, BYe, SUt, CUt, WY, xUt, kUt, n0t, r0t, o0t, uv, l0t, e4e, n4e, r4e, s4e, fy, U0t, i4e, Gc, Ti, a4e, QY, l4e, c4e, u4e, Wc, d4e, t4, gv, n4, p4e, f4e, r4, m4e, g4e, h4e, _4e, _v, yv, S4e, E4e, Sv, b4e, gy, F0t, Zp, C4e, A4e, Ra, z0t, B0t, j0t, K0t, G0t, q0t, R4e, O4e, lFt, T4e, w4e, cFt, SFt, EFt, s4, Cv, k4e, D4e, a4, d4, p4, Jp, f4, hy, Av, wa, H4e, h4, $4e, zFt, Xp, ds, S4, xn, VFt, qFt, YFt, z4e, C4, j4e, Vc, T4, Dv, W4e, F4, V4e, q4e, H4, $4, Y4e, Nv, z4, B4, FHt, J4e, X4e, Q4e, ir, xa, v4, x4, xv, kv, Uv, Fv, tZe, nZe, oZe, Hv, sZe, iZe, Ey, $v, qn, lZe, HHt, W4, cZe, V4, q4, Y4, uZe, zv, dZe, pZe, fZe, mZe, Bv, Z4, k4, gZe, J4, X4, Q4, eZ, P4, hZe, _Ze, jv, tZ, yZe, SZe, EZe, nZ, rZ, bZe, CZe, AZe, oZ, sZ, iZ, aZ, OZe, $Ht, lZ, uZ, wZe, IZe, ef, Gv, zHt, BHt, jHt, LZe, Wv, by, vv, gZ, MZe, UZe, hZ, FZe, HZe, $Ze, zZe, BZe, KZe, WZe, VZe, qZe, YZe, ZZe, e9e, KHt, Pv, GHt, t9e, D4, qc, WHt, VHt, SZ, n9e, r9e, o9e, qHt, s9e, i9e, YHt, ZHt, a9e, JHt, Ay, Zc, l9e, c9e, Yv, i$t, a$t, l$t, Ry, u9e, p9e, ex, vZ, of, xy, g9e, X$t, h9e, _9e, sx, ix, ax, lx, ky, Py, jZ, y9e, S9e, R9e, w9e, v9e, vi, x9e, kZ, PZ, IZ, wy, GZ, k9e, P9e, I9e, D9e, L9e, M9e, N9e, U9e, Sn, ux, tx, Ty, ka, z9e, Q$t, j9e, rf, DZ, K9e, LZ, G9e, W9e, Iy, V9e, MZ, px, Ly, xi, XZ, Xc, Qc, q9e, My, FZ, n9, Q9e, e6e, i9, a9, t6e, mzt, n6e, r6e, o6e, gzt, hzt, _zt, yzt, Ex, bx, s6e, i6e, Szt, Ax, u9, Rx, d9, p9, f9, m9, g9, h9, Tx, c6e, Nzt, wx, vx, xx, kx, u6e, Uzt, Fzt, d6e, Px, af, Ix, Hzt, _9, p6e, f6e, m6e, g6e, $zt, y9, S9, Dx, E9, b9, h6e, _6e, y6e, S6e, b6e, R9, A6e, hBt, w9, R6e, v9, Fy, Nx, T6e, w6e, v6e, DBt, LBt, x9, MBt, NBt, UBt, k9, zBt, x6e, ejt, eu, I6e, lf, D6e, H9, z9, F6e, Y6e, kjt, e62, n6, o3e, DKt, LKt, MKt, NKt, f3e, UKt, FKt, h3e, S3e, ZKt, JKt, XKt, QKt, E3e, b3e, _6, o1t, y6, E6, R3e, O3e, _1t, T3e, y1t, oGt, sGt, By, F6, Gy, Wy, df, qx, H6, $6, Yx, Vy, Ii, z6, kn, Vx, ms, nJe, rJe, XGt, sJe, aJe, uJe, pJe, RJe, Z6, vJe, xJe, e32, r3, a3, nS, $Je, Sf, p5e, pk, F3, S5e, B3, eS, K3, D5e, M5e, Z5e, tJ, J5e, nXe, uu, aJ, oJ, rXe, sXe, lXe, cXe, AXe, a2t, RXe, l2t, c2t, OXe, u2t, TXe, d2t, wXe, Ak, vXe, f2t, gJ, hJ, xXe, _J, yJ, kXe, PXe, SJ, EJ, IXe, DXe, m2t, g2t, MXe, NXe, UXe, FXe, jXe, Ok, TJ, KXe, wJ, aS, GXe, vk, pu, QXe, cS, PJ, dS, IJ, DJ, LJ, MJ, kk, FJ, $J, zJ, tqt, Pk, BJ, jJ, n8e, GJ, r8e, pS, fu, fS, o8e, qJ, gs, YJ, ZJ, a8e, wf, vf, l8e, c8e, JJ, In, u8e, d8e, p8e, Mi, f8e, m8e, QJ, Xqt, g8e, n5, r5, o5, h8e, _8e, s5, y8e, S8e, Dk, E8e, mS, Lk, i5, Mk, Uk, b8e, u5, Fk, g5, w8e, y5, HYt, B8e, V8e;
|
|
73573
|
+
var J5, X5, AS, Q5, eP, tX, nX, tP, ee, rX, Tr, iX, aX, lX, Ot, Tt, _p, AT, Ie, ze, Qo, Sp, iB, PT, IT, Ep, RB, yr, NB, HB, FT, BB, bp, Cp, Dh, Ap, Nh, Sj, WT, kj, Nj, Hj, Yj, Jj, tK, rK, sK, aK, uK, fK, _K, SK, CK, RK, Gh, xK, IK, MK, UK, JT, XT, VK, XK, e1, a1, u1, QT, g1, _1, E1, A1, T1, x1, I1, M1, U1, H1, z1, K1, W1, Z1, Q1, eG, tw, dG, mG, yG, Kb, Gb, aC, lC, cC, uC, dC, pC, E_, C_, W_, rP, Hi, oP, uX, K7e, pX, mX, Te, TS, wS, xS, bs, gP, IS, yP, MS, US, OX, wX, FS, HS, $S, zS, BS, jS, KS, GS, WS, VS, qS, YS, ZS, JS, CP, XS, AP, QS, vX, xX, eE, tE, nE, rE, oE, sE, iE, aE, lE, cE, uE, ve, RP, kX, get, hn, het, IX, Kf, Ka, NX, _E, kP, HX, qP, YP, Gf, Wf, KX, ZP, JP, Met, LP, WX, yE, ZX, UP, HP, i8, NE, a8, FE, l8, oI, sI, ku, Rs, cI, dI, HE, $E, zE, BE, mI, jE, KE, GE, WE, VE, qE, YE, ZE, JE, tm, EI, cnt, unt, dnt, pnt, fnt, nm, tb, vI, nb, rb, kI, m8, h8, DI, II, E8, b8, C8, Ut, O8, T8, $I, v8, ib, irt, k8, Jt, je, G8, Qa, Y8, Pr, dm, fb, gb, krt, QI, l7, c7, hb, u7, p7, rD, mm, tD, aD, f7, Irt, g7, y7, E7, b7, Nrt, C7, A7, fD, R7, O7, _D, I7, Ab, D7, jrt, Vrt, qrt, ED, Ir, zu, bD, rl, lot, cot, Rb, uot, dot, pot, fot, $u, mot, L7, M7, N7, SD, got, hot, F7, K7, G7, W7, V7, q7, Y7, DD, Z7, J7, X7, Q7, eQ, LD, MD, tQ, nQ, rQ, kD, Om, WD, il, Lb, Gi, FD, HD, Tm, xs, Iot, Dot, uQ, $D, vm, dQ, pQ, Mb, fQ, mQ, pr, Dr, gQ, VD, Nb, qD, xb, kb, YD, ZD, vs, hQ, _Q, JD, Vu, Pb, zD, Ub, XD, Gu, Fb, yQ, Cm, Am, Db, Tb, BD, wb, AQ, RQ, wQ, vQ, xQ, kQ, tL, IQ, DQ, LQ, Lot, Mot, UQ, FQ, wm, $Q, rL, Not, Uot, zQ, Bb, GQ, WQ, iL, VQ, qQ, YQ, aL, ZQ, XQ, eee, fL, mL, ree, qu, Wi, iee, jb, dee, pee, fee, mee, gee, u, hee, _ee, yee, See, Eee, bee, Cee, Aee, Ree, Oee, Tee, wee, vee, xee, kee, Pee, Iee, Dee, Lee, Mee, Nee, Uee, Fee, Hee, $ee, zee, Bee, jee, Kee, Gee, Wee, Vee, qee, Yee, Zee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, Ate, Rte, Ote, Tte, wte, vte, xte, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, Hte, $te, zte, Bte, jte, Kte, Gte, Wte, Vte, qte, Yte, Zte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, Ane, Rne, One, Tne, wne, vne, xne, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, Hne, $ne, zne, Bne, jne, AL, Gne, Ast, bL, Wne, qne, TL, ll, Ost, Tst, wst, vst, cl, xst, kst, Pst, Ist, wL, vL, Vb, xL, Zne, kL, PL, IL, Jne, qb, Yb, Zb, Xne, DL, LL, Qne, Mst, ere, Nst, tre, nre, ML, Ust, rre, ore, sre, ire, are, lre, cre, ure, Fst, Ps, Xb, ul, dre, pre, fre, Zst, _re, eit, Sre, Ere, $L, HL, bre, jL, Are, sC, WL, km, nC, VL, $re, Gre, tM, nM, aM, ioe, cM, uM, goe, Ju, fl, yoe, Soe, Eoe, boe, Coe, Aoe, Roe, Ooe, Toe, woe, voe, xoe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, Hoe, $oe, zoe, Boe, joe, Koe, Goe, Woe, Voe, qoe, Yoe, Zoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, bse, Cse, Ase, Rse, Ose, Tse, wse, vse, xse, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, Hse, $se, zse, Bse, jse, Kse, Gse, Wse, Vse, qse, Yse, Zse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, Aie, Rie, Oie, Tie, wie, vie, xie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, Hie, $ie, zie, Bie, jie, Kie, Gie, Wie, Vie, qie, Yie, Zie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, Aae, Rae, Oae, Tae, wae, vae, xae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, Hae, $ae, zae, Bae, jae, Kae, Gae, Wae, Vae, qae, Yae, Zae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, Ale, Rle, Ole, Tle, wle, vle, xle, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, Hle, $le, zle, Ble, jle, Kle, Gle, Wle, Vle, qle, Yle, Zle, Jle, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, Ace, Rce, Oce, Tce, wce, vce, xce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, Hce, $ce, zce, Bce, jce, Kce, Gce, Wce, Vce, qce, Yce, Zce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, Aue, Rue, Oue, Tue, wue, vue, xue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, Hue, $ue, zue, Bue, jue, Kue, Gue, Wue, Vue, que, Yue, Zue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, Ade, Rde, Ode, Tde, wde, vde, xde, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, Hde, $de, zde, Bde, jde, Kde, Gde, Wde, Vde, qde, Yde, Zde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, Ape, Rpe, Ope, Tpe, wpe, vpe, xpe, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, Hpe, $pe, zpe, Bpe, jpe, Kpe, Gpe, Wpe, Vpe, qpe, Ype, Zpe, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, Afe, Rfe, Ofe, Tfe, wfe, vfe, xfe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, Hfe, $fe, zfe, Bfe, jfe, Kfe, Gfe, Wfe, Vfe, qfe, Yfe, Zfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, Ame, Rme, Ome, Tme, wme, vme, xme, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, Hme, $me, zme, Bme, jme, Kme, Gme, Wme, Vme, qme, Yme, Zme, Jme, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, Age, Rge, Oge, Tge, wge, vge, xge, kge, Pge, Ige, Dge, Lge, Mge, Nge, Uge, Fge, Hge, $ge, zge, Bge, jge, Kge, Gge, Wge, Vge, qge, Yge, Zge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, Ahe, Rhe, Ohe, The, whe, vhe, xhe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, Uhe, Fhe, Hhe, $he, zhe, Bhe, jhe, Khe, Ghe, Whe, Vhe, qhe, Yhe, Zhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, A_e, R_e, O_e, T_e, w_e, v_e, x_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, H_e, $_e, z_e, B_e, j_e, K_e, G_e, W_e, V_e, q_e, Y_e, Z_e, J_e, X_e, Q_e, eye, tye, nye, rye, oye, sye, iye, aye, lye, cye, uye, dye, pye, fye, mye, gye, hye, _ye, yye, Sye, Eye, bye, Cye, Aye, Rye, Oye, Tye, wye, vye, xye, kye, Pye, Iye, Dye, Lye, Mye, Nye, Uye, Fye, Hye, $ye, zye, Bye, jye, Kye, Gye, Wye, Vye, qye, Yye, Zye, Jye, Xye, Qye, eSe, tSe, nSe, rSe, oSe, sSe, iSe, aSe, lSe, cSe, uSe, dSe, pSe, fSe, mSe, gSe, hSe, _Se, ySe, SSe, ESe, bSe, CSe, ASe, RSe, OSe, TSe, wSe, vSe, xSe, kSe, PSe, ISe, DSe, LSe, MSe, NSe, USe, FSe, HSe, $Se, zSe, BSe, jSe, KSe, GSe, WSe, VSe, qSe, YSe, ZSe, JSe, XSe, QSe, eEe, tEe, nEe, rEe, oEe, sEe, iEe, aEe, lEe, cEe, uEe, dEe, pEe, fEe, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, AEe, REe, OEe, TEe, wEe, vEe, xEe, kEe, PEe, IEe, DEe, LEe, MEe, NEe, UEe, FEe, HEe, $Ee, zEe, BEe, jEe, KEe, GEe, WEe, VEe, qEe, YEe, ZEe, JEe, XEe, QEe, ebe, tbe, nbe, rbe, obe, sbe, ibe, abe, lbe, cbe, ube, dbe, pbe, fbe, mbe, gbe, hbe, _be, ybe, Sbe, Ebe, bbe, Cbe, Abe, Rbe, Obe, Tbe, wbe, vbe, xbe, kbe, Pbe, Ibe, Dbe, Lbe, Mbe, Nbe, Ube, Fbe, Hbe, $be, zbe, Bbe, jbe, Kbe, Gbe, Wbe, Vbe, qbe, Ybe, Zbe, Jbe, Xbe, Qbe, eCe, tCe, nCe, rCe, oCe, sCe, iCe, aCe, lCe, cCe, uCe, dCe, pCe, fCe, mCe, gCe, hCe, _Ce, yCe, SCe, ECe, bCe, CCe, ACe, RCe, OCe, TCe, wCe, vCe, xCe, kCe, PCe, ICe, DCe, LCe, MCe, NCe, UCe, FCe, HCe, $Ce, zCe, BCe, jCe, KCe, GCe, WCe, VCe, qCe, YCe, ZCe, JCe, XCe, QCe, eAe, tAe, nAe, rAe, oAe, sAe, iAe, aAe, lAe, cAe, uAe, dAe, pAe, fAe, mAe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, AAe, RAe, OAe, TAe, wAe, vAe, xAe, kAe, PAe, IAe, DAe, LAe, MAe, NAe, UAe, FAe, HAe, $Ae, zAe, BAe, jAe, KAe, GAe, WAe, VAe, qAe, YAe, ZAe, JAe, XAe, QAe, eRe, tRe, nRe, rRe, oRe, sRe, iRe, aRe, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, yRe, SRe, ERe, bRe, CRe, ARe, fM, RRe, ORe, TRe, wRe, vRe, xRe, kRe, PRe, IRe, DRe, LRe, MRe, NRe, URe, FRe, HRe, $Re, zRe, BRe, jRe, KRe, GRe, WRe, VRe, qRe, YRe, ZRe, JRe, XRe, QRe, eOe, tOe, nOe, rOe, oOe, sOe, iOe, aOe, lOe, cOe, uOe, dOe, pOe, fOe, mOe, gOe, hOe, _Oe, yOe, SOe, EOe, bOe, COe, AOe, ROe, OOe, TOe, wOe, vOe, xOe, kOe, POe, IOe, DOe, LOe, MOe, NOe, UOe, FOe, HOe, $Oe, zOe, BOe, jOe, KOe, GOe, WOe, VOe, YOe, ZOe, Dt, XOe, Xat, QOe, Qat, _Te, RTe, SM, Mlt, Nlt, $o, DTe, Mm, LTe, td, MTe, bC, HTe, $Te, Hlt, YM, VM, RC, nN, rN, zm, TC, BTe, CC, Ds, KTe, GTe, _N, PC, yN, ro, dd, Rn, YTe, DC, SN, EN, bN, pd, fd, NC, md, UC, gd, hd, _d, yd, XTe, QTe, Wm, Vm, AN, RN, ON, TN, wN, vN, xN, kN, PN, IN, DN, LN, MN, NN, FN, HN, HC, $N, twe, BN, jN, KN, GN, WN, VN, qN, YN, ZN, JN, eU, $C, Sd, tU, nU, rU, oU, sU, Wt, zC, qm, BC, jC, iU, aU, lU, cU, uU, Ed, dU, pU, fU, mU, gU, hU, _U, KC, Ur, Ge, xU, bd, at, VC, qC, YC, kU, PU, swe, ZC, JC, XC, QC, eA, tA, nA, rA, IU, DU, LU, MU, oA, cwe, sA, iA, aA, lA, cA, Jm, uA, dA, pA, Xm, fA, mA, gA, hA, _A, yA, SA, fwe, EA, $U, Qm, bA, CA, AA, RA, OA, TA, eg, wA, vA, xA, kA, PA, IA, tg, zU, DA, LA, MA, BU, KU, UA, jU, WU, Cd, og, Ad, ng, rg, _we, Swe, VU, qU, Fr, n0, QU, r0, wd, bl, Cl, o0, c0, u0, d0, p0, s0, i0, a0, Cwe, Awe, Rwe, f0, NR, UR, FR, HR, $R, zR, BR, jR, KR, GR, WR, VR, qR, YR, ZR, MR, JR, XR, QR, eO, tO, nO, rO, oO, sO, pg, iO, k0, Dwe, Jn, P0, I0, D0, L0, M0, N0, U0, F0, H0, $0, z0, B0, Xe, G0, uO, bt, dO, W0, V0, q0, Rve, Ove, mg, Tve, wve, vve, xve, kve, Pve, Ive, Dve, Lve, Mve, Nve, Uve, Fve, Hve, $ve, zve, pO, Bve, Y0, jve, Kve, Gve, Wve, Vve, Id, Z0, qve, Yve, lO, cO, Zve, Jve, Rl, Q0, Qve, exe, nxe, eF, yg, Dd, ixe, axe, cxe, tF, fr, nF, iF, mxe, gxe, Sxe, Exe, Ht, vxe, Ns, _F, ldt, EF, bF, CF, AF, Lxe, Mxe, RF, Nxe, Uxe, OF, Fxe, Hxe, wF, Kxe, vF, Wxe, kF, Ag, PF, LF, Zxe, MF, Xxe, eke, FF, HF, nH, upt, Wke, Qke, ePe, pPe, xO, mft, gft, hft, Sft, Eft, SPe, wH, vH, xH, kH, PH, Vft, RPe, PO, OPe, TPe, wPe, vPe, IO, qft, DH, DPe, LPe, MPe, DO, HPe, kO, bH, GH, sIe, Ue, d$, te, Vo, H, Xn, IIe, Fs, DIe, Lg, yn, ye, Il, On, zO, BO, ia, Gd, ue, $r, p$, De, LIe, MIe, NIe, UIe, FIe, HIe, $Ie, zIe, BIe, jO, jIe, KIe, GIe, WIe, VIe, qIe, f$, YIe, Yo, Ll, Ml, Mg, Vd, Ng, qd, Yd, Ug, aa, Zo, Fg, oo, wt, Zd, qo, GO, Jd, Jo, Hg, $g, Nl, Wd, Xd, Qd, la, ep, Ul, io, so, Hs, tp, np, zg, sgt, WO, Bg, rp, igt, j, agt, lgt, cgt, ugt, dgt, pgt, fgt, mgt, ggt, hgt, _gt, ygt, Sgt, Egt, h$, bgt, Cgt, Agt, Rgt, Ogt, Tgt, wgt, vgt, xgt, kgt, Pgt, Igt, Dgt, Lgt, Mgt, Ngt, Ugt, Fgt, Hgt, rDe, oDe, js, Vg, qt, E$, b$, iht, iDe, aDe, YO, Qn, op, pn, gr, hr, fn, qg, A$, R$, JO, pe, XO, aht, lht, Yg, lDe, Zg, cDe, ip, Fl, w$, uDe, dDe, pDe, fDe, mDe, gDe, QO, hDe, _De, eT, Jg, yDe, SDe, Xg, EDe, ap, lp, bDe, cp, Hl, CDe, up, Qg, eh, th, cht, nh, rh, oh, v$, x$, k$, tT, P$, dp, $l, I$, ADe, sh, RDe, ih, ODe, nT, TDe, ah, wDe, vDe, xDe, kDe, PDe, IDe, DDe, LDe, MDe, NDe, lh, UDe, FDe, ch, rT, oT, sT, HDe, $De, zDe, iT, BDe, jDe, KDe, GDe, WDe, D$, uh, VDe, dh, uht, qDe, zl, YDe, dht, pp, ZDe, aT, JDe, XDe, QDe, eLe, tLe, nLe, rLe, Wg, oLe, sLe, iLe, fp, lT, aLe, lLe, cLe, uLe, dLe, pLe, fLe, mLe, gLe, hLe, _Le, yLe, SLe, ELe, bLe, CLe, ALe, RLe, Bl, OLe, TLe, wLe, ph, vLe, xLe, kLe, cT, PLe, pht, fht, mht, ght, hht, _ht, F$, LLe, SG, EG, RG, AG, ts, $ze, Gze, Wze, Vze, qze, Yze, kG, FG, Jze, Xze, Qze, eBe, Re, tBe, c_, ha, Tw, rs, zG, BG, jG, KG, GG, WG, ww, vw, bw, DG, aBe, lBe, uBe, VG, Cw, l_, Rw, Ow, pBe, fBe, LG, di, u_, tr, wBe, d_, vBe, xBe, Bt, kBe, nn, uc, IBe, lt, uW, DBe, LBe, xp, dW, NBe, UBe, pW, HBe, $Be, fW, nr, Yt, jBe, dc, GBe, mW, gW, _W, yW, VBe, SW, ZBe, bW, QBe, Pp, tje, vW, bo, fi, aje, lje, xW, kW, PW, IW, mi, DW, LW, MW, NW, Lt, yje, Sje, Eje, bje, mc, Aje, p_, UW, FW, Oje, Tje, os2, vje, xje, kje, Pje, Ije, Dje, Lje, HW, $W, Vn, Fje, gi, Hje, ss, zW, BW, Bje, jje, Kje, jW, Wje, Vje, KW, Yje, GW, Lw, WW, VW, hi, qW, YW, ZW, JW, _a, oKe, XW, Co, iKe, QW, eV, m_, tV, g_, dKe, pKe, h_, mKe, yc, nV, Sc, _Ke, yKe, SKe, EKe, bKe, CKe, AKe, RKe, OKe, TKe, wKe, vKe, xKe, rV, Mw, oV, Ec, __, sV, y_, MKe, NKe, iV, UKe, bc, aV, HKe, Nw, lV, zKe, BKe, jKe, is, cV, pV, uV, GKe, dV, WKe, VKe, Ao, qKe, YKe, _i, JKe, Cc, QKe, e1e, t1e, n1e, r1e, o1e, s1e, i1e, a1e, l1e, c1e, u1e, d1e, p1e, f1e, m1e, g1e, h1e, _1e, y1e, S1e, E1e, b1e, C1e, dt, fV, Ac, mV, Ip, O1e, Uw, T1e, Ro, gV, w1e, Rc, v1e, x1e, A_, P1e, Oc, R_, L1e, hV, M1e, N1e, _V, Oo, To, Dp, z1e, B1e, j1e, yV, G1e, O_, W1e, T_, V1e, yi, q1e, w_, SV, Y1e, EV, bV, CV, AV, Z1e, J1e, X1e, Q1e, eGe, ya, as, tGe, RV, OV, v_, nGe, TV, wV, Tc, oGe, sGe, xV, x_, kV, k_, PV, dGe, pGe, wc, mGe, IV, gGe, DV, _Ge, yGe, SGe, LV, Cr, bGe, rr, Si, MV, NV, UV, P_, vGe, xGe, FV, vc, HV, $V, zV, wo, NGe, xc, Ei, FGe, HGe, kc, BV, I_, jGe, Pc, KGe, GGe, D_, jV, VGe, qGe, KV, vo, Ic, Dc, eWe, uxt, qV, nWe, XV, uWe, t2, _We, yWe, r2, o2, s2, i2, Mc, l2, $w, c2, M_, a2, OWe, qxt, Ci, u2, Mp, Nc, N_, TWe, f2, d2, Sa, b2, NWe, T2, FWe, w2, Np, v2, tPt, jWe, Yw, L2, WWe, qWe, YWe, nPt, rPt, Fp, xo, dPt, Uc, H_, JWe, XWe, Gr, H2, tVe, B_, j_, K_, zp, j2, $2, sVe, z2, B2, Bp, Hc, V_, q_, K2, uVe, G2, Y_, W2, fVe, mVe, gVe, V2, hVe, _Ve, Z_, jp, Ar, q2, Y2, J2, X2, Q2, J_, eq, TVe, tq, wVe, vVe, xVe, nq, PVe, X_, rq, oq, sq, MVe, iq, aq, lq, cq, uq, zVe, BVe, dq, pq, GVe, fq, mq, gq, hq, qVe, YVe, ZVe, JVe, XVe, QVe, e2e, t2e, n2e, r2e, o2e, s2e, i2e, a2e, l2e, c2e, u2e, d2e, p2e, _q, m2e, yq, Sq, h2e, Eq, _2e, bq, Cq, S2e, Aq, E2e, b2e, C2e, Rq, A2e, R2e, O2e, T2e, Oq, w2e, v2e, x2e, Tq, k2e, P2e, I2e, D2e, L2e, M2e, N2e, U2e, F2e, H2e, $2e, z2e, B2e, j2e, K2e, G2e, ct, wq, vq, xq, kq, Y2e, Z2e, ey, Pq, Iq, Dq, Mq, Nq, ty, nqe, rqe, oqe, sqe, Uq, Fq, lqe, Hq, $q, zq, dqe, jq, fqe, gqe, Gq, ba, Xq, Oqe, Tqe, rY, Pqe, Kp, mY, tv, Yqe, Xqe, Qqe, eYe, tYe, iYe, aYe, PNt, pYe, SY, EY, $c, bY, Ca, gYe, sy, EYe, bYe, CYe, AYe, OY, qNt, YNt, rv, OYe, TYe, wYe, us, zc, ly, xY, kY, vYe, xYe, kYe, PYe, cy, Bc, uy, Oi, ov, py, IYe, DYe, sv, Aa, LYe, MY, oUt, sUt, MYe, iUt, NY, UY, FY, HY, NYe, $Y, zY, BY, jY, UYe, FYe, iv, HYe, GY, zYe, BYe, SUt, CUt, WY, xUt, kUt, n0t, r0t, o0t, uv, l0t, e4e, n4e, r4e, s4e, fy, U0t, i4e, Gc, Ti, a4e, QY, l4e, c4e, u4e, Wc, d4e, t4, gv, n4, p4e, f4e, r4, m4e, g4e, h4e, _4e, _v, yv, S4e, E4e, Sv, b4e, gy, F0t, Zp, C4e, A4e, Ra, z0t, B0t, j0t, K0t, G0t, q0t, R4e, O4e, lFt, T4e, w4e, cFt, SFt, EFt, s4, Cv, k4e, D4e, a4, d4, p4, Jp, f4, hy, Av, wa, H4e, h4, $4e, zFt, Xp, ds, S4, xn, VFt, qFt, YFt, z4e, C4, j4e, Vc, T4, Dv, W4e, F4, V4e, q4e, H4, $4, Y4e, Nv, z4, B4, FHt, J4e, X4e, Q4e, ir, xa, v4, x4, xv, kv, Uv, Fv, tZe, nZe, oZe, Hv, sZe, iZe, Ey, $v, qn, lZe, HHt, W4, cZe, V4, q4, Y4, uZe, zv, dZe, pZe, fZe, mZe, Bv, Z4, k4, gZe, J4, X4, Q4, eZ, P4, hZe, _Ze, jv, tZ, yZe, SZe, EZe, nZ, rZ, bZe, CZe, AZe, oZ, sZ, iZ, aZ, OZe, $Ht, lZ, uZ, wZe, IZe, ef, Gv, zHt, BHt, jHt, LZe, Wv, by, vv, gZ, MZe, UZe, hZ, FZe, HZe, $Ze, zZe, BZe, KZe, WZe, VZe, qZe, YZe, ZZe, e9e, KHt, Pv, GHt, t9e, D4, qc, WHt, VHt, SZ, n9e, r9e, o9e, qHt, s9e, i9e, YHt, ZHt, a9e, JHt, Ay, Zc, l9e, c9e, Yv, i$t, a$t, l$t, Ry, u9e, p9e, ex, vZ, of, xy, g9e, X$t, h9e, _9e, sx, ix, ax, lx, ky, Py, jZ, y9e, S9e, R9e, w9e, v9e, vi, x9e, kZ, PZ, IZ, wy, GZ, k9e, P9e, I9e, D9e, L9e, M9e, N9e, U9e, Sn, ux, tx, Ty, ka, z9e, Q$t, j9e, rf, DZ, K9e, LZ, G9e, W9e, Iy, V9e, MZ, px, Ly, xi, XZ, Xc, Qc, q9e, My, FZ, n9, Q9e, e6e, i9, a9, t6e, mzt, n6e, r6e, o6e, gzt, hzt, _zt, yzt, Ex, bx, s6e, i6e, Szt, Ax, u9, Rx, d9, p9, f9, m9, g9, h9, Tx, c6e, Nzt, wx, vx, xx, kx, u6e, Uzt, Fzt, d6e, Px, af, Ix, Hzt, _9, p6e, f6e, m6e, g6e, $zt, y9, S9, Dx, E9, b9, h6e, _6e, y6e, S6e, b6e, R9, A6e, hBt, w9, R6e, v9, Fy, Nx, T6e, w6e, v6e, DBt, LBt, x9, MBt, NBt, UBt, k9, zBt, x6e, ejt, eu, I6e, lf, D6e, H9, z9, F6e, Y6e, kjt, e62, n6, o3e, DKt, LKt, MKt, NKt, f3e, UKt, FKt, h3e, S3e, ZKt, JKt, XKt, QKt, E3e, b3e, _6, o1t, y6, E6, R3e, O3e, _1t, T3e, y1t, oGt, sGt, By, F6, Gy, Wy, df, qx, H6, $6, Yx, Vy, Ii, z6, kn, Vx, ms2, nJe, rJe, XGt, sJe, aJe, uJe, pJe, RJe, Z6, vJe, xJe, e32, r3, a3, nS, $Je, Sf, p5e, pk, F3, S5e, B3, eS, K3, D5e, M5e, Z5e, tJ, J5e, nXe, uu, aJ, oJ, rXe, sXe, lXe, cXe, AXe, a2t, RXe, l2t, c2t, OXe, u2t, TXe, d2t, wXe, Ak, vXe, f2t, gJ, hJ, xXe, _J, yJ, kXe, PXe, SJ, EJ, IXe, DXe, m2t, g2t, MXe, NXe, UXe, FXe, jXe, Ok, TJ, KXe, wJ, aS, GXe, vk, pu, QXe, cS, PJ, dS, IJ, DJ, LJ, MJ, kk, FJ, $J, zJ, tqt, Pk, BJ, jJ, n8e, GJ, r8e, pS, fu, fS, o8e, qJ, gs, YJ, ZJ, a8e, wf, vf, l8e, c8e, JJ, In, u8e, d8e, p8e, Mi, f8e, m8e, QJ, Xqt, g8e, n5, r5, o5, h8e, _8e, s5, y8e, S8e, Dk, E8e, mS, Lk, i5, Mk, Uk, b8e, u5, Fk, g5, w8e, y5, HYt, B8e, V8e;
|
|
73166
73574
|
var init_sdk = __esm({
|
|
73167
73575
|
"node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.322_@anthropic-ai+sdk@0.111.0_zod@4.4.3__@modelconte_32210b6863debeec70012cf369e453bd/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs"() {
|
|
73168
73576
|
if (typeof Symbol.dispose !== "symbol") {
|
|
@@ -90118,9 +90526,9 @@ ${n.join(`
|
|
|
90118
90526
|
Vx = Le({ isCoworkCloud: void 0 }, (e10) => {
|
|
90119
90527
|
e10.isCoworkCloud = void 0;
|
|
90120
90528
|
});
|
|
90121
|
-
|
|
90122
|
-
nJe = [{ matches: (e10) => e10.path === "permissions.defaultMode" && e10.code === "invalid_value", tip: { suggestion: 'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)', docLink: `${
|
|
90123
|
-
rJe = { permissions: `${
|
|
90529
|
+
ms2 = "https://code.claude.com/docs/en";
|
|
90530
|
+
nJe = [{ matches: (e10) => e10.path === "permissions.defaultMode" && e10.code === "invalid_value", tip: { suggestion: 'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)', docLink: `${ms2}/iam#permission-modes` } }, { matches: (e10) => e10.path === "apiKeyHelper" && e10.code === "invalid_type", tip: { suggestion: 'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"' } }, { matches: (e10) => e10.path === "cleanupPeriodDays" && e10.code === "too_small", tip: { suggestion: 'cleanupPeriodDays must be at least 1. To keep transcripts for a long time, set a large number (e.g. 3650 for ~10 years). To disable transcript writes entirely, remove this setting and use the --no-session-persistence CLI flag or the SDK persistSession:false option instead. (0 is rejected because it previously silently disabled all transcript writes, which users setting it to mean "never clean up" did not expect.)' } }, { matches: (e10) => e10.path.startsWith("env.") && e10.code === "invalid_type", tip: { suggestion: 'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"', docLink: `${ms2}/settings#environment-variables` } }, { matches: (e10) => (e10.path === "permissions.allow" || e10.path === "permissions.deny") && e10.code === "invalid_type" && e10.expected === "array", tip: { suggestion: 'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.' } }, { matches: (e10) => e10.path === "hooks" && e10.code === "unrecognized_keys", tip: { suggestion: "Not a recognized hook event. Common events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop. Check spelling and capitalization.", docLink: `${ms2}/hooks` } }, { matches: (e10) => /\.hooks\.\d+\.command$/.test(e10.path) && e10.code === "invalid_type" && e10.received === "undefined", tip: { suggestion: 'Command hooks require `command`. For exec form (no shell), set `command` to the executable and `args` to its arguments: {"type": "command", "command": "echo", "args": ["hi"]}. For shell form, set `command` to the full shell string: {"type": "command", "command": "echo hi"}.', docLink: `${ms2}/hooks#exec-form-and-shell-form` } }, { matches: (e10) => e10.path.includes("hooks") && e10.code === "invalid_type", tip: { suggestion: 'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}' } }, { matches: (e10) => e10.code === "invalid_type" && e10.expected === "boolean", tip: { suggestion: 'Use true or false without quotes. Example: "includeCoAuthoredBy": true' } }, { matches: (e10) => e10.code === "unrecognized_keys", tip: { suggestion: "Check for typos or refer to the documentation for valid fields", docLink: `${ms2}/settings` } }, { matches: (e10) => e10.code === "invalid_value" && e10.enumValues !== void 0, tip: { suggestion: void 0 } }, { matches: (e10) => e10.code === "invalid_type" && e10.expected === "object" && e10.received === null && e10.path === "", tip: { suggestion: "Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error." } }, { matches: (e10) => e10.path === "permissions.additionalDirectories" && e10.code === "invalid_type", tip: { suggestion: 'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command', docLink: `${ms2}/iam#working-directories` } }];
|
|
90531
|
+
rJe = { permissions: `${ms2}/iam#configuring-permissions`, env: `${ms2}/settings#environment-variables`, hooks: `${ms2}/hooks` };
|
|
90124
90532
|
XGt = P(() => dx(Jc(), { strictPolicyHelperKeys: true }).strict());
|
|
90125
90533
|
sJe = 'a PreToolUse/PermissionRequest hook that cannot be loaded does not run, nor does any other hook of the document where "hooks" is listed here as ignored; fix or remove the entry. The managed settings document is not skipped for it, unlike a user or project settings file';
|
|
90126
90534
|
aJe = new Set(ts);
|
|
@@ -93575,8 +93983,13 @@ var init_claude_agent_sdk = __esm({
|
|
|
93575
93983
|
});
|
|
93576
93984
|
|
|
93577
93985
|
// packages/server/src/backend/claude-models.ts
|
|
93578
|
-
function resolveClaudeModels(rows) {
|
|
93986
|
+
function resolveClaudeModels(rows, runs = {}) {
|
|
93579
93987
|
const byAlias = /* @__PURE__ */ new Map();
|
|
93988
|
+
for (const alias of CLAUDE_MODEL_ALIASES) {
|
|
93989
|
+
const id2 = runs[alias];
|
|
93990
|
+
const parsed = id2 === void 0 ? void 0 : parseClaudeWireId(id2);
|
|
93991
|
+
if (parsed?.alias === alias) byAlias.set(alias, editionOf(parsed));
|
|
93992
|
+
}
|
|
93580
93993
|
const records = rows.filter((raw2) => !!raw2 && typeof raw2 === "object");
|
|
93581
93994
|
for (const row of [...records.filter(isNamedForAlias), ...records]) {
|
|
93582
93995
|
for (const key of ["resolvedModel", "value"]) {
|
|
@@ -93584,12 +93997,15 @@ function resolveClaudeModels(rows) {
|
|
|
93584
93997
|
if (typeof candidate !== "string") continue;
|
|
93585
93998
|
const parsed = parseClaudeWireId(candidate);
|
|
93586
93999
|
if (!parsed || byAlias.has(parsed.alias)) continue;
|
|
93587
|
-
byAlias.set(parsed.alias,
|
|
94000
|
+
byAlias.set(parsed.alias, editionOf(parsed));
|
|
93588
94001
|
break;
|
|
93589
94002
|
}
|
|
93590
94003
|
}
|
|
93591
94004
|
return CLAUDE_MODEL_ALIASES.map((alias) => byAlias.get(alias) ?? { alias, label: claudeFamilyLabel(alias) });
|
|
93592
94005
|
}
|
|
94006
|
+
function editionOf(parsed) {
|
|
94007
|
+
return { alias: parsed.alias, label: `${claudeFamilyLabel(parsed.alias)} ${parsed.edition}`, resolvedModel: parsed.resolvedModel, edition: parsed.edition };
|
|
94008
|
+
}
|
|
93593
94009
|
function isNamedForAlias(row) {
|
|
93594
94010
|
return typeof row.value === "string" && CLAUDE_MODEL_ALIASES.includes(row.value.replace(/\[1m\]$/, ""));
|
|
93595
94011
|
}
|
|
@@ -93641,15 +94057,31 @@ async function probeClaudeModels(executable, cwd) {
|
|
|
93641
94057
|
maxTurns: 0
|
|
93642
94058
|
}
|
|
93643
94059
|
});
|
|
94060
|
+
const read = async () => {
|
|
94061
|
+
const rows = await q3.supportedModels();
|
|
94062
|
+
const runs = {};
|
|
94063
|
+
const ask = async () => {
|
|
94064
|
+
for (const alias of CLAUDE_MODEL_ALIASES) {
|
|
94065
|
+
try {
|
|
94066
|
+
await q3.setModel(alias);
|
|
94067
|
+
runs[alias] = (await q3.getContextUsage({ detail: "summary" })).model;
|
|
94068
|
+
} catch {
|
|
94069
|
+
}
|
|
94070
|
+
}
|
|
94071
|
+
};
|
|
94072
|
+
let budget;
|
|
94073
|
+
await Promise.race([ask(), new Promise((resolve17) => budget = setTimeout(resolve17, ASK_BUDGET_MS))]);
|
|
94074
|
+
clearTimeout(budget);
|
|
94075
|
+
return resolveClaudeModels(rows, { ...runs });
|
|
94076
|
+
};
|
|
93644
94077
|
let timer;
|
|
93645
94078
|
try {
|
|
93646
|
-
|
|
93647
|
-
|
|
94079
|
+
return await Promise.race([
|
|
94080
|
+
read(),
|
|
93648
94081
|
new Promise((_, reject) => {
|
|
93649
94082
|
timer = setTimeout(() => reject(new Error(`the runtime did not list its models within ${PROBE_TIMEOUT_MS}ms`)), PROBE_TIMEOUT_MS);
|
|
93650
94083
|
})
|
|
93651
94084
|
]);
|
|
93652
|
-
return resolveClaudeModels(rows);
|
|
93653
94085
|
} finally {
|
|
93654
94086
|
if (timer) clearTimeout(timer);
|
|
93655
94087
|
q3.close();
|
|
@@ -93664,7 +94096,7 @@ function onClaudeModelsResolved(listener) {
|
|
|
93664
94096
|
resolvedListeners.delete(listener);
|
|
93665
94097
|
};
|
|
93666
94098
|
}
|
|
93667
|
-
var CLAUDE_MODEL_ALIASES, CLAUDE_MODELS_FALLBACK, PROBE_TIMEOUT_MS, FAILURE_BACKOFF_MS, resolved, inFlight2, failedAt, lastResolved, resolvedListeners;
|
|
94099
|
+
var CLAUDE_MODEL_ALIASES, CLAUDE_MODELS_FALLBACK, PROBE_TIMEOUT_MS, ASK_BUDGET_MS, FAILURE_BACKOFF_MS, resolved, inFlight2, failedAt, lastResolved, resolvedListeners;
|
|
93668
94100
|
var init_claude_models = __esm({
|
|
93669
94101
|
"packages/server/src/backend/claude-models.ts"() {
|
|
93670
94102
|
"use strict";
|
|
@@ -93677,6 +94109,7 @@ var init_claude_models = __esm({
|
|
|
93677
94109
|
CLAUDE_MODEL_ALIASES = ["fable", "opus", "sonnet", "haiku"];
|
|
93678
94110
|
CLAUDE_MODELS_FALLBACK = CLAUDE_MODEL_ALIASES.map((alias) => ({ alias, label: claudeFamilyLabel(alias) }));
|
|
93679
94111
|
PROBE_TIMEOUT_MS = 15e3;
|
|
94112
|
+
ASK_BUDGET_MS = 5e3;
|
|
93680
94113
|
FAILURE_BACKOFF_MS = 3e4;
|
|
93681
94114
|
resolved = /* @__PURE__ */ new Map();
|
|
93682
94115
|
inFlight2 = /* @__PURE__ */ new Map();
|
|
@@ -93956,8 +94389,8 @@ function parseCpuTimeMs(value) {
|
|
|
93956
94389
|
const m = value.trim().match(/^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+(?:\.\d+)?)$/);
|
|
93957
94390
|
if (!m) return 0;
|
|
93958
94391
|
const [, d, h3, min, s] = m;
|
|
93959
|
-
const
|
|
93960
|
-
return Number.isFinite(
|
|
94392
|
+
const ms3 = ((Number(d ?? 0) * 24 + Number(h3 ?? 0)) * 3600 + Number(min) * 60 + Number(s)) * 1e3;
|
|
94393
|
+
return Number.isFinite(ms3) ? ms3 : 0;
|
|
93961
94394
|
}
|
|
93962
94395
|
async function detectRunawayAux(rows, liveSlugs, exec = defaultExec, options = {}) {
|
|
93963
94396
|
const minCores = options.minCores ?? 0.5;
|
|
@@ -95266,6 +95699,7 @@ function createContextUnchecked(opts, resources) {
|
|
|
95266
95699
|
return liveBrokerRecords(project.stateDir).some((r) => r.sessionId === sessionId) ? "alive" : "dead";
|
|
95267
95700
|
},
|
|
95268
95701
|
resume: (slug, message, deliveryId) => {
|
|
95702
|
+
rearmSecretsIn(message);
|
|
95269
95703
|
const deliveryMessage = `${message}
|
|
95270
95704
|
|
|
95271
95705
|
${wakeDeliveryToken(deliveryId)}`;
|
|
@@ -97615,8 +98049,8 @@ var init_stream = __esm({
|
|
|
97615
98049
|
await this.write(input + "\n");
|
|
97616
98050
|
return this;
|
|
97617
98051
|
}
|
|
97618
|
-
sleep(
|
|
97619
|
-
return new Promise((res) => setTimeout(res,
|
|
98052
|
+
sleep(ms3) {
|
|
98053
|
+
return new Promise((res) => setTimeout(res, ms3));
|
|
97620
98054
|
}
|
|
97621
98055
|
async close() {
|
|
97622
98056
|
this.closed = true;
|
|
@@ -98166,8 +98600,8 @@ function watchLabel(w) {
|
|
|
98166
98600
|
}
|
|
98167
98601
|
function recency(row) {
|
|
98168
98602
|
const at2 = row.band === "done" ? row.archivedAt ?? row.lastActivityAt : row.lastActivityAt ?? row.restedAt ?? row.spawnedAt;
|
|
98169
|
-
const
|
|
98170
|
-
return Number.isFinite(
|
|
98603
|
+
const ms3 = Date.parse(at2 ?? "");
|
|
98604
|
+
return Number.isFinite(ms3) ? ms3 : 0;
|
|
98171
98605
|
}
|
|
98172
98606
|
function listBoardThreads(threads, project, opts = {}) {
|
|
98173
98607
|
const nowMs = opts.nowMs ?? Date.now();
|
|
@@ -100139,6 +100573,7 @@ function createRouter(ctx) {
|
|
|
100139
100573
|
);
|
|
100140
100574
|
}
|
|
100141
100575
|
function deliverFollowUp(sent, opts = {}) {
|
|
100576
|
+
rearmSecretsIn(sent.message);
|
|
100142
100577
|
const silent = !sent.deliveryId;
|
|
100143
100578
|
const input = { ...sent, message: deliverableInputText(sent.message), deliveryId: sent.deliveryId ?? randomUUID22() };
|
|
100144
100579
|
return keepFailedFollowUp(input, { ...opts, silent }, async (openWriteAhead) => {
|
|
@@ -100345,7 +100780,7 @@ ${gapNote}` : input.message;
|
|
|
100345
100780
|
let opened = false;
|
|
100346
100781
|
const open = () => {
|
|
100347
100782
|
if (!input.deliveryId) return true;
|
|
100348
|
-
if (beginDelivery(ctx.storage, input.slug, { id: input.deliveryId, text: input.message, supersedes: input.supersedes, release: opts.release, silent: opts.silent }) === "duplicate") return false;
|
|
100783
|
+
if (beginDelivery(ctx.storage, input.slug, { id: input.deliveryId, text: input.message, supersedes: input.supersedes, release: opts.release, silent: opts.silent, questions: opts.questions, todos: opts.todos }) === "duplicate") return false;
|
|
100349
100784
|
opened = true;
|
|
100350
100785
|
ctx.transcriptChange.emit([input.slug]);
|
|
100351
100786
|
return true;
|
|
@@ -100390,21 +100825,36 @@ ${gapNote}` : input.message;
|
|
|
100390
100825
|
}
|
|
100391
100826
|
return settled;
|
|
100392
100827
|
}
|
|
100828
|
+
function pendingDismissals(slug) {
|
|
100829
|
+
const out = [];
|
|
100830
|
+
for (const q3 of ctx.storage.undeliveredSettlements()) {
|
|
100831
|
+
if (q3.thread_slug !== slug || q3.state !== "dismissed" || q3.delivery_id) continue;
|
|
100832
|
+
const spec = parseQuestionSpec(q3.spec);
|
|
100833
|
+
if (spec) out.push({ id: q3.id, dismissal: { question: spec.question, ...q3.handle ? { handle: q3.handle } : {} } });
|
|
100834
|
+
}
|
|
100835
|
+
return out;
|
|
100836
|
+
}
|
|
100393
100837
|
async function sendFollowUp(input) {
|
|
100394
100838
|
const answers = input.answers ?? [];
|
|
100395
100839
|
let message = input.message;
|
|
100840
|
+
let questions = [];
|
|
100396
100841
|
const replay = input.deliveryId ? deliveryItem(ctx.storage, input.slug, input.deliveryId) : null;
|
|
100397
100842
|
if (replay) {
|
|
100398
100843
|
message = replay.text;
|
|
100399
100844
|
if (replay.state === "held") return;
|
|
100400
|
-
} else
|
|
100401
|
-
const
|
|
100402
|
-
if (
|
|
100403
|
-
|
|
100404
|
-
|
|
100405
|
-
|
|
100406
|
-
|
|
100407
|
-
|
|
100845
|
+
} else {
|
|
100846
|
+
const dismissals = answers.length > 0 || input.message.trim() ? pendingDismissals(input.slug) : [];
|
|
100847
|
+
if (answers.length > 0 || dismissals.length > 0) {
|
|
100848
|
+
const row2 = currentOwnedSession(input.slug, input.sessionId);
|
|
100849
|
+
if (hasPendingPermissionChange(row2)) {
|
|
100850
|
+
throw new Error("Wait for the current permission change to finish before sending a follow-up");
|
|
100851
|
+
}
|
|
100852
|
+
}
|
|
100853
|
+
const settled = answers.length > 0 ? settleQuestionAnswers(input.slug, answers, Date.now(), { delivered: true }) : [];
|
|
100854
|
+
if (settled.length > 0 || dismissals.length > 0) {
|
|
100855
|
+
message = withAnswersNote(humanAnswersMessage(settled, dismissals.map((d) => d.dismissal)), input.message);
|
|
100856
|
+
for (const d of dismissals) ctx.storage.markSettlementDelivered(d.id);
|
|
100857
|
+
questions = [...settled.map((a) => a.questionId), ...dismissals.map((d) => d.id)];
|
|
100408
100858
|
ctx.board.refresh();
|
|
100409
100859
|
}
|
|
100410
100860
|
}
|
|
@@ -100414,9 +100864,11 @@ ${gapNote}` : input.message;
|
|
|
100414
100864
|
throw new Error("There is nothing to send");
|
|
100415
100865
|
}
|
|
100416
100866
|
const send = { ...input, message, answers: void 0, todos: void 0, hold: void 0 };
|
|
100867
|
+
const retried = !replay && input.supersedes ? deliveryItem(ctx.storage, input.slug, input.supersedes) : null;
|
|
100868
|
+
const todos = input.todos?.length ? input.todos : retried?.todos;
|
|
100417
100869
|
const reportTodos = () => {
|
|
100418
|
-
if (!
|
|
100419
|
-
ctx.storage.reportHumanTodos(input.slug,
|
|
100870
|
+
if (!todos?.length) return;
|
|
100871
|
+
ctx.storage.reportHumanTodos(input.slug, todos, Date.now());
|
|
100420
100872
|
ctx.board.refresh();
|
|
100421
100873
|
};
|
|
100422
100874
|
const row = ctx.storage.getSession(input.slug);
|
|
@@ -100426,8 +100878,7 @@ ${gapNote}` : input.message;
|
|
|
100426
100878
|
const items = row ? parseDeliveryLedger(row.delivery_ledger) : [];
|
|
100427
100879
|
if (row && row.session_id === input.sessionId && (inFlight3 || heldSendMustWait(items))) {
|
|
100428
100880
|
const id2 = input.deliveryId ?? randomUUID22();
|
|
100429
|
-
if (holdDelivery(ctx.storage, input.slug, { id: id2, text: message })) {
|
|
100430
|
-
reportTodos();
|
|
100881
|
+
if (holdDelivery(ctx.storage, input.slug, { id: id2, text: message, todos, questions })) {
|
|
100431
100882
|
watchHeld(input.slug);
|
|
100432
100883
|
ctx.transcriptChange.emit([input.slug]);
|
|
100433
100884
|
ctx.board.refresh();
|
|
@@ -100436,7 +100887,7 @@ ${gapNote}` : input.message;
|
|
|
100436
100887
|
}
|
|
100437
100888
|
}
|
|
100438
100889
|
}
|
|
100439
|
-
await deliverFollowUp(send);
|
|
100890
|
+
await deliverFollowUp(send, { questions, todos });
|
|
100440
100891
|
reportTodos();
|
|
100441
100892
|
}
|
|
100442
100893
|
const releasingHeld = /* @__PURE__ */ new Set();
|
|
@@ -100469,7 +100920,12 @@ ${gapNote}` : input.message;
|
|
|
100469
100920
|
if (!item) return 0;
|
|
100470
100921
|
releasingHeld.add(slug);
|
|
100471
100922
|
try {
|
|
100923
|
+
noteHeldRelease(ctx.storage, slug, item.id, Date.parse(item.at));
|
|
100472
100924
|
await deliverFollowUp({ slug, sessionId: row.session_id, message: item.text, deliveryId: item.id }, { release: true });
|
|
100925
|
+
if (item.todos?.length) {
|
|
100926
|
+
ctx.storage.reportHumanTodos(slug, item.todos, Date.now());
|
|
100927
|
+
ctx.board.refresh();
|
|
100928
|
+
}
|
|
100473
100929
|
return 1;
|
|
100474
100930
|
} catch (error) {
|
|
100475
100931
|
log.warn("server", `${slug}: releasing held follow-up ${item.id} failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -101464,8 +101920,10 @@ ${gapNote}` : input.message;
|
|
|
101464
101920
|
input: DismissFailedFollowUpInput,
|
|
101465
101921
|
output: DismissFailedFollowUpResult,
|
|
101466
101922
|
handler: async ({ input }) => {
|
|
101923
|
+
const questions = deliveryItem(ctx.storage, input.slug, input.deliveryId)?.questions ?? [];
|
|
101467
101924
|
const dismissed = dismissFailedDelivery(ctx.storage, input.slug, input.deliveryId);
|
|
101468
101925
|
if (dismissed) ctx.transcriptChange.emit([input.slug]);
|
|
101926
|
+
if (dismissed && questions.filter((id2) => ctx.storage.unsettleUndelivered(input.slug, id2)).length > 0) ctx.board.refresh();
|
|
101469
101927
|
return { dismissed };
|
|
101470
101928
|
}
|
|
101471
101929
|
}),
|
|
@@ -102666,6 +103124,12 @@ Say which way you went and why in your write-up, so the human can course-correct
|
|
|
102666
103124
|
"answerQuestions",
|
|
102667
103125
|
() => ({ project: thisProject, thread: input.slug, detail: { answers: input.answers.map((answer) => answerDigest(input.slug, answer)) } }),
|
|
102668
103126
|
async () => {
|
|
103127
|
+
const row = ctx.storage.getSession(input.slug);
|
|
103128
|
+
const answersOpenRow = input.answers.some((answer) => {
|
|
103129
|
+
const q3 = ctx.storage.getThreadQuestion(answer.questionId);
|
|
103130
|
+
return q3?.thread_slug === input.slug && q3.state === "open";
|
|
103131
|
+
});
|
|
103132
|
+
if (row && answersOpenRow) reopenArchivedThreadForFollowUp(ctx, row);
|
|
102669
103133
|
const answered = settleQuestionAnswers(input.slug, input.answers, Date.now()).map((answer) => answer.questionId);
|
|
102670
103134
|
if (answered.length > 0) {
|
|
102671
103135
|
ctx.board.refresh();
|
|
@@ -106664,9 +107128,9 @@ function createTenantMap(options) {
|
|
|
106664
107128
|
}
|
|
106665
107129
|
took.push([name, performance.now() - began]);
|
|
106666
107130
|
}
|
|
106667
|
-
const total = took.reduce((sum, [,
|
|
107131
|
+
const total = took.reduce((sum, [, ms3]) => sum + ms3, 0);
|
|
106668
107132
|
if (total >= slowCloseMs) {
|
|
106669
|
-
const steps = took.filter(([,
|
|
107133
|
+
const steps = took.filter(([, ms3]) => ms3 >= 1).sort((a, b) => b[1] - a[1]).map(([name, ms3]) => `${name} ${Math.round(ms3)}ms`);
|
|
106670
107134
|
log.warn("tenants", `project ${entry.project.name} took ${Math.round(total)}ms to close: ${steps.join(", ")}`);
|
|
106671
107135
|
}
|
|
106672
107136
|
try {
|
|
@@ -107319,14 +107783,14 @@ function startTenantPrime(deps) {
|
|
|
107319
107783
|
const log3 = deps.log ?? ((message) => log.info("tenants", message));
|
|
107320
107784
|
let stopped = false;
|
|
107321
107785
|
let interrupt;
|
|
107322
|
-
const defaultDelay = (
|
|
107786
|
+
const defaultDelay = (ms3) => new Promise((resolve17) => {
|
|
107323
107787
|
if (stopped) return resolve17();
|
|
107324
107788
|
const finish = () => {
|
|
107325
107789
|
clearTimeout(timer);
|
|
107326
107790
|
interrupt = void 0;
|
|
107327
107791
|
resolve17();
|
|
107328
107792
|
};
|
|
107329
|
-
const timer = setTimeout(finish,
|
|
107793
|
+
const timer = setTimeout(finish, ms3);
|
|
107330
107794
|
timer.unref?.();
|
|
107331
107795
|
interrupt = finish;
|
|
107332
107796
|
});
|
|
@@ -107669,9 +108133,9 @@ function describeServerStart(env, dev, runtime = process) {
|
|
|
107669
108133
|
return `Frizz server ${what} starting: pid ${runtime.pid}, node ${runtime.version}, ${runtime.platform} ${runtime.arch}`;
|
|
107670
108134
|
}
|
|
107671
108135
|
function describeBootTimings(totalMs, phases) {
|
|
107672
|
-
const spell = (
|
|
107673
|
-
const worth = phases.filter(([,
|
|
107674
|
-
return `boot ${spell(totalMs)}${worth.length ? `: ${worth.map(([name,
|
|
108136
|
+
const spell = (ms3) => ms3 < 1e3 ? `${Math.round(ms3)}ms` : `${(ms3 / 1e3).toFixed(2)}s`;
|
|
108137
|
+
const worth = phases.filter(([, ms3]) => ms3 >= 10).sort((a, b) => b[1] - a[1]);
|
|
108138
|
+
return `boot ${spell(totalMs)}${worth.length ? `: ${worth.map(([name, ms3]) => `${name} ${spell(ms3)}`).join(", ")}` : ""}`;
|
|
107675
108139
|
}
|
|
107676
108140
|
async function startServer(opts = {}) {
|
|
107677
108141
|
const runtime = { ...defaultStartServerRuntime, ...opts.runtime };
|