@joeyshi12/casper 0.15.5 → 0.15.7
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/mcp.js +1 -1
- package/dist/server.js +289 -15
- package/dist/web/assets/{abnfDiagram-N423BO3Z-D7Xtg-ky.js → abnfDiagram-N423BO3Z-jvSYyvNw.js} +1 -1
- package/dist/web/assets/{arc-CJwORcY2.js → arc-BiHYHdUQ.js} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-BPgTaZ-3.js → architectureDiagram-T3A2C74G-4Eqc-u3C.js} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-BmAnCfsF.js → blockDiagram-VBNYF7ZC-BcOcmlBN.js} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-Bod3Uk6N.js → c4Diagram-5PPSVZJV-BUudyYqU.js} +1 -1
- package/dist/web/assets/channel-BueZNEdT.js +1 -0
- package/dist/web/assets/{chunk-2GRJ4B5K-ByhQeRUu.js → chunk-2GRJ4B5K-bTMhoJSQ.js} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-BgNG2_WK.js → chunk-2Q5K7J3B-BYp6dfdp.js} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-CyMm3K6j.js → chunk-5RXB4S5H-Dg3ASlI5.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-DgHpR03Q.js → chunk-5VM5RSS4-B7uwpCHf.js} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-bdejFE5K.js → chunk-6Q2QTUOP-DVTiWdGW.js} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-BNmwEcg4.js → chunk-GF5L2VYU-C2LdpbyU.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-BSZfxr2f.js → chunk-JWPE2WC7-CMX4-S8P.js} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-BWY_nU8b.js → chunk-KBJHAD2P-D92STFuF.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-BB4IAoli.js → chunk-RYQCIY6F-B2PLxj_Q.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-CEosEM7x.js → chunk-XXDRQBXY-DCpI_0Ix.js} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-CSEqsvyn.js +1 -0
- package/dist/web/assets/classDiagram-v2-OCEON4UE-CSEqsvyn.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-Berx3FXP.js → cose-bilkent-JH36ORCC-KtY-8vxF.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-Cp2J1D8A.js → cynefin-VYW2F7L2-DkTsGV_4.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-Cz7j4SDA.js → cynefinDiagram-MW4NZA55-BVPMHgGu.js} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-CWtcoY9K.js → dagre-VZM6K2ZE-DT-S1NOU.js} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-CJZPyvq_.js → diagram-7IWD3JNH-DUJvV7wV.js} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-B_5IjfH9.js → diagram-B4RE2ZJO-DmpnY7ob.js} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-CErWIySU.js → diagram-LBJQPF4R-nEMZNwen.js} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-NISb3pxC.js → diagram-Q27KOJAE-Dr-59ElI.js} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-CLS2e1Fl.js → diagram-UB23O5K3-4wvmRauY.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-Bhp62eSR.js → ebnfDiagram-BXEA7PRR-055xAlHi.js} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-BtmEB8CS.js → erDiagram-JOGREHBK-DqWTDG8u.js} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-D2K79Jwk.js → flowDiagram-UKHOOZJN-D3lUh0yb.js} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-QTnjgpIy.js → ganttDiagram-PKOTCBZU-aV5l2zrT.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-DNkDH_-j.js → gitGraphDiagram-DS77QQ5N-BK2KCI35.js} +1 -1
- package/dist/web/assets/{index-DJG6K5uD.js → index-B5ZDbS-R.js} +51 -51
- package/dist/web/assets/index-CRxbcY2R.css +1 -0
- package/dist/web/assets/{index-By6DwN8Y.js → index-Dv1My9Ob.js} +1 -1
- package/dist/web/assets/{infoDiagram-6WML65LV-CKaPSbez.js → infoDiagram-6WML65LV-BcSXYnWm.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-CdCdA7sV.js → ishikawaDiagram-WSZJBQD7-C0LFAfcz.js} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-bTKRlOtf.js → journeyDiagram-NVQOT4AX-1Zs22Gpd.js} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-CGuizh6I.js → kanban-definition-27J2QSJJ-DW6RwD7S.js} +1 -1
- package/dist/web/assets/{linear-CtKbu7RC.js → linear-Cfzhrbed.js} +1 -1
- package/dist/web/assets/{mermaid.core-DKtykg7R.js → mermaid.core-D0VPssrU.js} +4 -4
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-CA83oPT6.js → mindmap-definition-FAOFIHXS-BeD5KiWO.js} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-CEFna7qV.js → pegDiagram-VL7TDLO6-JDLyI4Gc.js} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-D2ufRBoj.js → pieDiagram-7S7Q4E2Y-BY3XpjEU.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-C5vLXvNr.js → quadrantDiagram-CIZ2JOQS-C4oT4Lqc.js} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-4mve0HiT.js → railroadDiagram-AXF67PYL-lfzvVyK7.js} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-C1cPcHkD.js → requirementDiagram-LRYGKXZP-wGnOD5SS.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-BDvMTpv0.js → sankeyDiagram-W5VNT64P-DJQ2VW0G.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-D9DqcBcB.js → sequenceDiagram-SI44F4Z6-Bz_rjvWZ.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-DmlB45vN.js → sizeCapture-X5ZJPWSS-BgxIA36S.js} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-CFzKMgI8.js → stateDiagram-OKZ733FA-DpL_B9Mu.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DsD9j9Fu.js +1 -0
- package/dist/web/assets/{swimlanes-SLNWSIFB-CvXXHWMQ.js → swimlanes-SLNWSIFB-B6uTv46X.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BxNKQaPC.js +8 -0
- package/dist/web/assets/{timeline-definition-Z64GVDOM-BnIZVMIk.js → timeline-definition-Z64GVDOM-DvMUcNNs.js} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-B574XN0y.js → vennDiagram-T6HMQDX7-K_9U-J2A.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-C1EogIQh.js → wardleyDiagram-T6FBY63Y-DwMi4kCd.js} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-NoSZclEb.js → xychartDiagram-ELKLHX3M-BkcnShpk.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/channel-BmSs6CrX.js +0 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-lsdfAugr.js +0 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-lsdfAugr.js +0 -1
- package/dist/web/assets/index-DNWKm_GR.css +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-B33TP57C.js +0 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-D5fWWsKe.js +0 -8
package/dist/mcp.js
CHANGED
|
@@ -369,7 +369,7 @@ function handleMessage(req, version) {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
// server/src/mcp/server.ts
|
|
372
|
-
var VERSION = true ? "0.15.
|
|
372
|
+
var VERSION = true ? "0.15.7" : "dev";
|
|
373
373
|
function runMcpServer() {
|
|
374
374
|
const rl = createInterface({ input: process.stdin });
|
|
375
375
|
rl.on("line", (line) => {
|
package/dist/server.js
CHANGED
|
@@ -392,6 +392,17 @@ CREATE TABLE IF NOT EXISTS message_attachments (
|
|
|
392
392
|
kind TEXT NOT NULL,
|
|
393
393
|
PRIMARY KEY (chat_id, ordinal, path)
|
|
394
394
|
);
|
|
395
|
+
CREATE TABLE IF NOT EXISTS turn_endings (
|
|
396
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
397
|
+
chat_id TEXT NOT NULL,
|
|
398
|
+
started_at INTEGER NOT NULL,
|
|
399
|
+
ended_at INTEGER NOT NULL,
|
|
400
|
+
prompt TEXT NOT NULL,
|
|
401
|
+
kind TEXT NOT NULL,
|
|
402
|
+
message TEXT,
|
|
403
|
+
items TEXT NOT NULL
|
|
404
|
+
);
|
|
405
|
+
CREATE INDEX IF NOT EXISTS turn_endings_chat ON turn_endings (chat_id);
|
|
395
406
|
CREATE TABLE IF NOT EXISTS subagent_links (
|
|
396
407
|
child_session_id TEXT PRIMARY KEY,
|
|
397
408
|
parent_session_id TEXT NOT NULL,
|
|
@@ -712,6 +723,88 @@ var init_titles = __esm({
|
|
|
712
723
|
}
|
|
713
724
|
});
|
|
714
725
|
|
|
726
|
+
// shared/dist/turnFold.js
|
|
727
|
+
function commitDraft(draft, baseId, ts = Date.now()) {
|
|
728
|
+
const next = [...draft.items];
|
|
729
|
+
if (draft.streamingThought.trim()) {
|
|
730
|
+
next.push({
|
|
731
|
+
type: "message",
|
|
732
|
+
message: {
|
|
733
|
+
id: `t-${baseId}`,
|
|
734
|
+
role: "thinking",
|
|
735
|
+
text: draft.streamingThought.trim(),
|
|
736
|
+
timestamp: ts
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
if (draft.streamingText.trim()) {
|
|
741
|
+
next.push({
|
|
742
|
+
type: "message",
|
|
743
|
+
message: { id: `a-${baseId}`, role: "assistant", text: draft.streamingText, timestamp: ts }
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
return next;
|
|
747
|
+
}
|
|
748
|
+
function settleTools(items) {
|
|
749
|
+
return items.map((it) => it.type === "tool_call" && (it.tool.status === "pending" || it.tool.status === "in_progress") ? { type: "tool_call", tool: { ...it.tool, status: "failed" } } : it);
|
|
750
|
+
}
|
|
751
|
+
function foldSessionUpdate(draft, u, seq, ts) {
|
|
752
|
+
if (u.sessionUpdate === "agent_message_chunk") {
|
|
753
|
+
const chunk = u.content?.text ?? "";
|
|
754
|
+
return { ...draft, streamingText: draft.streamingText + chunk };
|
|
755
|
+
}
|
|
756
|
+
if (u.sessionUpdate === "agent_thought_chunk") {
|
|
757
|
+
const chunk = u.content?.text ?? "";
|
|
758
|
+
return { ...draft, streamingThought: draft.streamingThought + chunk };
|
|
759
|
+
}
|
|
760
|
+
if (u.sessionUpdate === "tool_call") {
|
|
761
|
+
const tc = u;
|
|
762
|
+
const toolName = tc._meta?.kiro?.toolName;
|
|
763
|
+
return {
|
|
764
|
+
items: [
|
|
765
|
+
...commitDraft(draft, `s-${seq}`, ts),
|
|
766
|
+
{
|
|
767
|
+
type: "tool_call",
|
|
768
|
+
tool: {
|
|
769
|
+
id: tc.toolCallId,
|
|
770
|
+
name: toolName,
|
|
771
|
+
title: tc.title ?? tc.toolCallId,
|
|
772
|
+
kind: tc.kind,
|
|
773
|
+
status: tc.status ?? "pending",
|
|
774
|
+
input: tc.rawInput,
|
|
775
|
+
content: tc.content ?? []
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
],
|
|
779
|
+
streamingText: "",
|
|
780
|
+
streamingThought: ""
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
if (u.sessionUpdate === "tool_call_update") {
|
|
784
|
+
const tu = u;
|
|
785
|
+
return {
|
|
786
|
+
...draft,
|
|
787
|
+
items: draft.items.map((it) => it.type === "tool_call" && it.tool.id === tu.toolCallId ? {
|
|
788
|
+
type: "tool_call",
|
|
789
|
+
tool: {
|
|
790
|
+
...it.tool,
|
|
791
|
+
status: tu.status ?? it.tool.status,
|
|
792
|
+
output: tu.rawOutput ?? it.tool.output,
|
|
793
|
+
content: tu.content ?? it.tool.content
|
|
794
|
+
}
|
|
795
|
+
} : it)
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
return draft;
|
|
799
|
+
}
|
|
800
|
+
var emptyDraft;
|
|
801
|
+
var init_turnFold = __esm({
|
|
802
|
+
"shared/dist/turnFold.js"() {
|
|
803
|
+
"use strict";
|
|
804
|
+
emptyDraft = () => ({ items: [], streamingText: "", streamingThought: "" });
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
|
|
715
808
|
// shared/dist/ws-protocol.js
|
|
716
809
|
var init_ws_protocol = __esm({
|
|
717
810
|
"shared/dist/ws-protocol.js"() {
|
|
@@ -728,6 +821,7 @@ var init_dist = __esm({
|
|
|
728
821
|
init_observability();
|
|
729
822
|
init_rest_dto();
|
|
730
823
|
init_titles();
|
|
824
|
+
init_turnFold();
|
|
731
825
|
init_ws_protocol();
|
|
732
826
|
}
|
|
733
827
|
});
|
|
@@ -1249,6 +1343,75 @@ var init_TurnState = __esm({
|
|
|
1249
1343
|
}
|
|
1250
1344
|
});
|
|
1251
1345
|
|
|
1346
|
+
// server/src/session/TurnRecorder.ts
|
|
1347
|
+
function cap(value) {
|
|
1348
|
+
if (typeof value === "string") {
|
|
1349
|
+
return value.length > MAX_STRING ? `${value.slice(0, MAX_STRING)}
|
|
1350
|
+
[truncated]` : value;
|
|
1351
|
+
}
|
|
1352
|
+
if (Array.isArray(value)) return value.filter((v) => !isImage(v)).map(cap);
|
|
1353
|
+
if (value && typeof value === "object") {
|
|
1354
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, cap(v)]));
|
|
1355
|
+
}
|
|
1356
|
+
return value;
|
|
1357
|
+
}
|
|
1358
|
+
var MAX_STRING, isImage, bounded, TurnRecorder;
|
|
1359
|
+
var init_TurnRecorder = __esm({
|
|
1360
|
+
"server/src/session/TurnRecorder.ts"() {
|
|
1361
|
+
"use strict";
|
|
1362
|
+
init_dist();
|
|
1363
|
+
MAX_STRING = 2e4;
|
|
1364
|
+
isImage = (block) => {
|
|
1365
|
+
const b = block;
|
|
1366
|
+
return b?.type === "image" || b?.content?.type === "image";
|
|
1367
|
+
};
|
|
1368
|
+
bounded = (items) => items.map(
|
|
1369
|
+
(it) => it.type === "tool_call" ? {
|
|
1370
|
+
type: "tool_call",
|
|
1371
|
+
tool: {
|
|
1372
|
+
...it.tool,
|
|
1373
|
+
input: cap(it.tool.input),
|
|
1374
|
+
output: cap(it.tool.output),
|
|
1375
|
+
content: cap(it.tool.content)
|
|
1376
|
+
}
|
|
1377
|
+
} : it
|
|
1378
|
+
);
|
|
1379
|
+
TurnRecorder = class {
|
|
1380
|
+
draft = null;
|
|
1381
|
+
startedAt = 0;
|
|
1382
|
+
prompt = "";
|
|
1383
|
+
observe(e) {
|
|
1384
|
+
const p = e.payload;
|
|
1385
|
+
if (p.kind === "turn_started") {
|
|
1386
|
+
this.draft = emptyDraft();
|
|
1387
|
+
this.startedAt = e.ts;
|
|
1388
|
+
this.prompt = stripAttachmentsLine(
|
|
1389
|
+
p.prompt.filter((b) => b.type === "text").map((b) => b.text).join("")
|
|
1390
|
+
);
|
|
1391
|
+
} else if (p.kind === "session_update" && this.draft) {
|
|
1392
|
+
this.draft = foldSessionUpdate(this.draft, p.update, e.seq, e.ts);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
/** Null when no turn was being followed. */
|
|
1396
|
+
finish(ending, endedAt = Date.now()) {
|
|
1397
|
+
const draft = this.draft;
|
|
1398
|
+
this.draft = null;
|
|
1399
|
+
if (!draft) return null;
|
|
1400
|
+
return {
|
|
1401
|
+
startedAt: this.startedAt,
|
|
1402
|
+
endedAt,
|
|
1403
|
+
prompt: this.prompt,
|
|
1404
|
+
...ending,
|
|
1405
|
+
items: bounded(settleTools(commitDraft(draft, `end-${endedAt}`, endedAt)))
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
discard() {
|
|
1409
|
+
this.draft = null;
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1252
1415
|
// server/src/session/SubagentTracker.ts
|
|
1253
1416
|
var SubagentTracker;
|
|
1254
1417
|
var init_SubagentTracker = __esm({
|
|
@@ -1293,6 +1456,21 @@ var init_SubagentTracker = __esm({
|
|
|
1293
1456
|
}
|
|
1294
1457
|
return resolved;
|
|
1295
1458
|
}
|
|
1459
|
+
/** Called when the parent turn ends. The `subagent` tool call blocks the turn, so
|
|
1460
|
+
* any subagent still working was stopped with it, and kiro does not always send a
|
|
1461
|
+
* list_update saying so. Returns whether anything changed. */
|
|
1462
|
+
turnEnded(now = () => (/* @__PURE__ */ new Date()).toISOString()) {
|
|
1463
|
+
let changed = this.pendingCalls.length > 0;
|
|
1464
|
+
this.pendingCalls.length = 0;
|
|
1465
|
+
for (const s of this.byChild.values()) {
|
|
1466
|
+
if (s.status !== "working") continue;
|
|
1467
|
+
s.status = "failed";
|
|
1468
|
+
s.activity = "Stopped";
|
|
1469
|
+
s.updatedAt = now();
|
|
1470
|
+
changed = true;
|
|
1471
|
+
}
|
|
1472
|
+
return changed;
|
|
1473
|
+
}
|
|
1296
1474
|
/** Started stages plus a synthetic 'pending' row for each declared stage that
|
|
1297
1475
|
* hasn't started, so a stage waiting on a dependency still shows up. */
|
|
1298
1476
|
listForCall(toolCallId) {
|
|
@@ -1537,10 +1715,26 @@ async function hasRecordedTurns(sessionId) {
|
|
|
1537
1715
|
return false;
|
|
1538
1716
|
}
|
|
1539
1717
|
}
|
|
1540
|
-
|
|
1718
|
+
function endingItems(e) {
|
|
1719
|
+
const prefix = `te${e.id}-`;
|
|
1720
|
+
const items = e.items.map(
|
|
1721
|
+
(it) => it.type === "message" ? { type: "message", message: { ...it.message, id: prefix + it.message.id } } : it
|
|
1722
|
+
);
|
|
1723
|
+
items.push(
|
|
1724
|
+
e.kind === "failed" ? { type: "turn_error", id: `${prefix}end`, message: e.message ?? "", timestamp: e.endedAt } : { type: "turn_interrupted", id: `${prefix}end`, timestamp: e.endedAt }
|
|
1725
|
+
);
|
|
1726
|
+
return items;
|
|
1727
|
+
}
|
|
1728
|
+
async function hydrateTranscript(sessionId, attachments, endings = []) {
|
|
1541
1729
|
const items = [];
|
|
1542
1730
|
let userOrdinal = 0;
|
|
1543
1731
|
const toolsById = /* @__PURE__ */ new Map();
|
|
1732
|
+
const waiting = [...endings];
|
|
1733
|
+
let replaced = false;
|
|
1734
|
+
const unrecorded = (e) => [
|
|
1735
|
+
{ type: "message", message: { id: `te${e.id}-u`, role: "user", text: e.prompt, timestamp: e.startedAt } },
|
|
1736
|
+
...endingItems(e)
|
|
1737
|
+
];
|
|
1544
1738
|
for (const entry of await readJsonlEntries(sessionId)) {
|
|
1545
1739
|
const content = contentBlocks(entry.data.content);
|
|
1546
1740
|
const textOf = (kind) => content.filter((c) => c.kind === kind).map(blockText).join("");
|
|
@@ -1548,12 +1742,29 @@ async function hydrateTranscript(sessionId, attachments) {
|
|
|
1548
1742
|
const ts = entry.data.meta?.timestamp;
|
|
1549
1743
|
const pushMsg = (msg) => items.push({ type: "message", message: msg });
|
|
1550
1744
|
if (entry.kind === "Prompt") {
|
|
1745
|
+
replaced = false;
|
|
1551
1746
|
const text2 = stripAttachmentsLine(textOf("text"));
|
|
1747
|
+
let matched;
|
|
1748
|
+
if (ts !== void 0) {
|
|
1749
|
+
const at = ts * 1e3;
|
|
1750
|
+
matched = waiting.find(
|
|
1751
|
+
(e) => e.prompt.trim() === text2.trim() && at >= e.startedAt - STAMP_PAD_MS && at <= e.endedAt + STAMP_PAD_MS
|
|
1752
|
+
);
|
|
1753
|
+
while (waiting.length && waiting[0] !== matched && waiting[0].endedAt < at - STAMP_PAD_MS) {
|
|
1754
|
+
items.push(...unrecorded(waiting.shift()));
|
|
1755
|
+
}
|
|
1756
|
+
if (matched) waiting.splice(waiting.indexOf(matched), 1);
|
|
1757
|
+
}
|
|
1552
1758
|
const attached = attachments?.get(userOrdinal);
|
|
1553
1759
|
userOrdinal++;
|
|
1554
1760
|
if (text2.trim() || attached?.length)
|
|
1555
1761
|
pushMsg({ id: `u-${baseId}`, role: "user", text: text2, timestamp: ts, attachments: attached });
|
|
1762
|
+
if (matched) {
|
|
1763
|
+
items.push(...endingItems(matched));
|
|
1764
|
+
replaced = true;
|
|
1765
|
+
}
|
|
1556
1766
|
} else if (entry.kind === "AssistantMessage") {
|
|
1767
|
+
if (replaced) continue;
|
|
1557
1768
|
const thinking = textOf("thinking");
|
|
1558
1769
|
if (thinking.trim())
|
|
1559
1770
|
pushMsg({ id: `t-${baseId}`, role: "thinking", text: thinking.trim(), timestamp: ts });
|
|
@@ -1575,6 +1786,7 @@ async function hydrateTranscript(sessionId, attachments) {
|
|
|
1575
1786
|
items.push({ type: "tool_call", tool });
|
|
1576
1787
|
}
|
|
1577
1788
|
} else if (entry.kind === "ToolResults") {
|
|
1789
|
+
if (replaced) continue;
|
|
1578
1790
|
for (const c of content) {
|
|
1579
1791
|
const d = toolResultData(c);
|
|
1580
1792
|
if (!d) continue;
|
|
@@ -1589,9 +1801,10 @@ async function hydrateTranscript(sessionId, attachments) {
|
|
|
1589
1801
|
items.push({ type: "compaction", id: `c-${baseId}`, summary, timestamp: ts });
|
|
1590
1802
|
}
|
|
1591
1803
|
}
|
|
1804
|
+
for (const e of waiting) items.push(...unrecorded(e));
|
|
1592
1805
|
return items;
|
|
1593
1806
|
}
|
|
1594
|
-
var isRecord;
|
|
1807
|
+
var isRecord, STAMP_PAD_MS;
|
|
1595
1808
|
var init_kiroFiles = __esm({
|
|
1596
1809
|
"server/src/session/kiroFiles.ts"() {
|
|
1597
1810
|
"use strict";
|
|
@@ -1599,6 +1812,7 @@ var init_kiroFiles = __esm({
|
|
|
1599
1812
|
init_config();
|
|
1600
1813
|
init_paths2();
|
|
1601
1814
|
isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
1815
|
+
STAMP_PAD_MS = 2e3;
|
|
1602
1816
|
}
|
|
1603
1817
|
});
|
|
1604
1818
|
|
|
@@ -1672,9 +1886,38 @@ var init_chatStore = __esm({
|
|
|
1672
1886
|
}
|
|
1673
1887
|
return out;
|
|
1674
1888
|
}
|
|
1889
|
+
addTurnEnding(chatId, e) {
|
|
1890
|
+
db().prepare(
|
|
1891
|
+
`INSERT INTO turn_endings (chat_id, started_at, ended_at, prompt, kind, message, items)
|
|
1892
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)`
|
|
1893
|
+
).run(chatId, e.startedAt, e.endedAt, e.prompt, e.kind, e.message ?? null, JSON.stringify(e.items));
|
|
1894
|
+
}
|
|
1895
|
+
turnEndingsByChat(chatId) {
|
|
1896
|
+
const rows = db().prepare(
|
|
1897
|
+
`SELECT id, started_at, ended_at, prompt, kind, message, items FROM turn_endings
|
|
1898
|
+
WHERE chat_id = ? ORDER BY id`
|
|
1899
|
+
).all(chatId);
|
|
1900
|
+
const out = [];
|
|
1901
|
+
for (const r of rows) {
|
|
1902
|
+
try {
|
|
1903
|
+
out.push({
|
|
1904
|
+
id: r.id,
|
|
1905
|
+
startedAt: r.started_at,
|
|
1906
|
+
endedAt: r.ended_at,
|
|
1907
|
+
prompt: r.prompt,
|
|
1908
|
+
kind: r.kind === "interrupted" ? "interrupted" : "failed",
|
|
1909
|
+
...r.message === null ? {} : { message: r.message },
|
|
1910
|
+
items: JSON.parse(r.items)
|
|
1911
|
+
});
|
|
1912
|
+
} catch {
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
return out;
|
|
1916
|
+
}
|
|
1675
1917
|
remove(chatId) {
|
|
1676
1918
|
db().prepare("DELETE FROM chats WHERE chat_id = ?").run(chatId);
|
|
1677
1919
|
db().prepare("DELETE FROM message_attachments WHERE chat_id = ?").run(chatId);
|
|
1920
|
+
db().prepare("DELETE FROM turn_endings WHERE chat_id = ?").run(chatId);
|
|
1678
1921
|
}
|
|
1679
1922
|
read(chatId, column) {
|
|
1680
1923
|
const row = db().prepare(`SELECT ${column} AS value FROM chats WHERE chat_id = ?`).get(chatId);
|
|
@@ -1795,6 +2038,7 @@ var init_SessionManager = __esm({
|
|
|
1795
2038
|
init_KiroProcess();
|
|
1796
2039
|
init_EventStore();
|
|
1797
2040
|
init_TurnState();
|
|
2041
|
+
init_TurnRecorder();
|
|
1798
2042
|
init_SubagentTracker();
|
|
1799
2043
|
init_subagentResult();
|
|
1800
2044
|
init_subagentFallbackMatch();
|
|
@@ -1806,6 +2050,7 @@ var init_SessionManager = __esm({
|
|
|
1806
2050
|
sessionId;
|
|
1807
2051
|
store;
|
|
1808
2052
|
turnState = new TurnState();
|
|
2053
|
+
recorder = new TurnRecorder();
|
|
1809
2054
|
subagents = new SubagentTracker();
|
|
1810
2055
|
cwd;
|
|
1811
2056
|
agentId;
|
|
@@ -1817,6 +2062,7 @@ var init_SessionManager = __esm({
|
|
|
1817
2062
|
updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1818
2063
|
lastActivity = Date.now();
|
|
1819
2064
|
running = false;
|
|
2065
|
+
cancelRequested = false;
|
|
1820
2066
|
// Set while a cancelled turn is given time to end before its process is killed.
|
|
1821
2067
|
cancelTimer;
|
|
1822
2068
|
everLive = false;
|
|
@@ -1842,7 +2088,9 @@ var init_SessionManager = __esm({
|
|
|
1842
2088
|
record(payload) {
|
|
1843
2089
|
this.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1844
2090
|
this.turnState.apply(payload);
|
|
1845
|
-
|
|
2091
|
+
const event = this.store.append(payload);
|
|
2092
|
+
this.recorder.observe(event);
|
|
2093
|
+
return event;
|
|
1846
2094
|
}
|
|
1847
2095
|
};
|
|
1848
2096
|
TRANSCRIPT_PAGE_SIZE = 80;
|
|
@@ -2143,21 +2391,41 @@ var init_SessionManager = __esm({
|
|
|
2143
2391
|
recorded = attachments;
|
|
2144
2392
|
}
|
|
2145
2393
|
s.record({ kind: "turn_started", prompt: content, attachments: recorded });
|
|
2146
|
-
proc.prompt({ sessionId: s.sessionId, prompt: content }).then((res) =>
|
|
2394
|
+
proc.prompt({ sessionId: s.sessionId, prompt: content }).then((res) => {
|
|
2395
|
+
if (res.stopReason === "cancelled") this.saveEnding(chatId, s.recorder.finish({ kind: "interrupted" }));
|
|
2396
|
+
else s.recorder.discard();
|
|
2397
|
+
s.record({ kind: "turn_ended", stopReason: res.stopReason });
|
|
2398
|
+
}).catch((err) => {
|
|
2399
|
+
if (s.cancelRequested) {
|
|
2400
|
+
this.saveEnding(chatId, s.recorder.finish({ kind: "interrupted" }));
|
|
2401
|
+
s.record({ kind: "turn_ended", stopReason: "cancelled" });
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2147
2404
|
this.log.error({ err, sessionId: s.sessionId }, "prompt turn failed");
|
|
2148
2405
|
const tail = proc.stderrTail();
|
|
2149
2406
|
const message = tail && !err.message.includes(tail) ? `${err.message}
|
|
2150
2407
|
|
|
2151
2408
|
kiro-cli output:
|
|
2152
2409
|
${tail}` : err.message;
|
|
2410
|
+
this.saveEnding(chatId, s.recorder.finish({ kind: "failed", message }));
|
|
2153
2411
|
s.record({ kind: "turn_error", message });
|
|
2154
2412
|
}).finally(() => {
|
|
2413
|
+
s.cancelRequested = false;
|
|
2155
2414
|
clearTimeout(s.cancelTimer);
|
|
2156
2415
|
s.cancelTimer = void 0;
|
|
2157
2416
|
s.running = false;
|
|
2158
2417
|
s.lastActivity = Date.now();
|
|
2418
|
+
if (s.subagents.turnEnded()) s.record({ kind: "subagents_changed", subagents: s.subagents.list() });
|
|
2159
2419
|
});
|
|
2160
2420
|
}
|
|
2421
|
+
saveEnding(chatId, ending) {
|
|
2422
|
+
if (!ending) return;
|
|
2423
|
+
try {
|
|
2424
|
+
this.store.addTurnEnding(chatId, ending);
|
|
2425
|
+
} catch (err) {
|
|
2426
|
+
this.log.error({ err, chatId }, "could not store a failed turn");
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2161
2429
|
/**
|
|
2162
2430
|
* Asks kiro to cancel the turn. If the turn has not ended within the grace period, kiro
|
|
2163
2431
|
* has stopped handling the session (its agent loop can panic while the process stays
|
|
@@ -2168,7 +2436,9 @@ ${tail}` : err.message;
|
|
|
2168
2436
|
const proc = s?.proc;
|
|
2169
2437
|
if (!s || !proc) return;
|
|
2170
2438
|
proc.cancel(s.sessionId);
|
|
2171
|
-
if (!s.running
|
|
2439
|
+
if (!s.running) return;
|
|
2440
|
+
s.cancelRequested = true;
|
|
2441
|
+
if (s.cancelTimer) return;
|
|
2172
2442
|
s.cancelTimer = setTimeout(() => {
|
|
2173
2443
|
s.cancelTimer = void 0;
|
|
2174
2444
|
if (!s.running || s.proc !== proc) return;
|
|
@@ -2252,12 +2522,19 @@ ${tail}` : err.message;
|
|
|
2252
2522
|
if (!sessionId) throw new Error(`Unknown chat: ${chatId}`);
|
|
2253
2523
|
return sessionId;
|
|
2254
2524
|
}
|
|
2525
|
+
hydrate(chatId, sessionId) {
|
|
2526
|
+
return hydrateTranscript(
|
|
2527
|
+
sessionId,
|
|
2528
|
+
this.store.attachmentsByChat(chatId),
|
|
2529
|
+
this.store.turnEndingsByChat(chatId)
|
|
2530
|
+
);
|
|
2531
|
+
}
|
|
2255
2532
|
async getDetail(chatId) {
|
|
2256
2533
|
const chat = this.store.get(chatId);
|
|
2257
2534
|
if (!chat) throw new Error(`Unknown chat: ${chatId}`);
|
|
2258
2535
|
const sessionId = chat.sessionId;
|
|
2259
2536
|
const [transcript, persisted] = await Promise.all([
|
|
2260
|
-
sessionId ?
|
|
2537
|
+
sessionId ? this.hydrate(chatId, sessionId) : Promise.resolve([]),
|
|
2261
2538
|
sessionId ? readPersistedSession(sessionId) : Promise.resolve(null)
|
|
2262
2539
|
]);
|
|
2263
2540
|
const s = sessionId ? this.sessions.get(sessionId) : void 0;
|
|
@@ -2267,10 +2544,7 @@ ${tail}` : err.message;
|
|
|
2267
2544
|
/** A transcript slice for lazy "load older on scroll up". offset/limit are
|
|
2268
2545
|
* clamped to the transcript bounds. */
|
|
2269
2546
|
async getTranscriptPage(chatId, offset, limit) {
|
|
2270
|
-
const transcript = await
|
|
2271
|
-
this.sessionIdOf(chatId),
|
|
2272
|
-
this.store.attachmentsByChat(chatId)
|
|
2273
|
-
);
|
|
2547
|
+
const transcript = await this.hydrate(chatId, this.sessionIdOf(chatId));
|
|
2274
2548
|
const start = Math.max(0, Math.min(offset, transcript.length));
|
|
2275
2549
|
const end = Math.max(start, Math.min(start + limit, transcript.length));
|
|
2276
2550
|
return transcript.slice(start, end);
|
|
@@ -2903,11 +3177,11 @@ function hexdump(buf) {
|
|
|
2903
3177
|
async function sendFilePreview(req, reply, realTarget, stat) {
|
|
2904
3178
|
const ext = path14.extname(realTarget).toLowerCase();
|
|
2905
3179
|
const mime = mimeForExt(ext);
|
|
2906
|
-
const
|
|
3180
|
+
const isImage2 = mime.startsWith("image/");
|
|
2907
3181
|
const isPdf = mime === "application/pdf";
|
|
2908
3182
|
const isHtml = mime === "text/html" && req.query.raw === "1";
|
|
2909
3183
|
const kind = classifyKind(realTarget);
|
|
2910
|
-
if (
|
|
3184
|
+
if (isImage2 || isPdf) {
|
|
2911
3185
|
if (stat.size > MAX_IMAGE_PREVIEW_BYTES) {
|
|
2912
3186
|
reply.code(413);
|
|
2913
3187
|
return tooLargeForPreview(stat.size, MAX_IMAGE_PREVIEW_BYTES);
|
|
@@ -2928,7 +3202,7 @@ async function sendFilePreview(req, reply, realTarget, stat) {
|
|
|
2928
3202
|
reply.header("Cache-Control", "no-store");
|
|
2929
3203
|
return reply.send(createReadStream(realTarget));
|
|
2930
3204
|
}
|
|
2931
|
-
if (
|
|
3205
|
+
if (isImage2 || isPdf) {
|
|
2932
3206
|
const etag = `W/"${stat.size}-${stat.mtimeMs}"`;
|
|
2933
3207
|
reply.header("Cache-Control", "private, no-cache");
|
|
2934
3208
|
reply.header("ETag", etag);
|
|
@@ -4383,7 +4657,7 @@ var init_server2 = __esm({
|
|
|
4383
4657
|
"server/src/mcp/server.ts"() {
|
|
4384
4658
|
"use strict";
|
|
4385
4659
|
init_protocol();
|
|
4386
|
-
VERSION = true ? "0.15.
|
|
4660
|
+
VERSION = true ? "0.15.7" : "dev";
|
|
4387
4661
|
}
|
|
4388
4662
|
});
|
|
4389
4663
|
|
|
@@ -7763,7 +8037,7 @@ var program = new Command();
|
|
|
7763
8037
|
// server/src/cli/program.ts
|
|
7764
8038
|
init_paths();
|
|
7765
8039
|
init_settings();
|
|
7766
|
-
var VERSION2 = true ? "0.15.
|
|
8040
|
+
var VERSION2 = true ? "0.15.7" : "dev";
|
|
7767
8041
|
async function bootstrap() {
|
|
7768
8042
|
const file = configFilePath();
|
|
7769
8043
|
const settings = readSettings(file);
|
package/dist/web/assets/{abnfDiagram-N423BO3Z-D7Xtg-ky.js → abnfDiagram-N423BO3Z-jvSYyvNw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-DVTiWdGW.js";import{p as f}from"./chunk-JWPE2WC7-CMX4-S8P.js";import{_ as n,l as o}from"./mermaid.core-D0VPssrU.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-DkTsGV_4.js";import"./index-B5ZDbS-R.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-
|
|
1
|
+
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-D0VPssrU.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|