panoma 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/BUILD-INFO.json +2 -2
- package/app/apps/web/.next-bundle/BUILD_ID +1 -1
- package/app/apps/web/.next-bundle/app-build-manifest.json +201 -201
- package/app/apps/web/.next-bundle/app-path-routes-manifest.json +46 -46
- package/app/apps/web/.next-bundle/build-manifest.json +2 -2
- package/app/apps/web/.next-bundle/prerender-manifest.json +9 -9
- package/app/apps/web/.next-bundle/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/ai/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/apps/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/apps/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/bridge/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/copies/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/credentials/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/disk/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/handoff/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/handoff/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/hidden/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page.js +4 -3
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/video/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/packages/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/search/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/spend/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/twin/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/accounts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/apps/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/consult/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/conversations/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/conversations/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/handoff/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/handoff/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/hello/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/journal/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/keys/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/log/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/video/cancel/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/video/jobs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/video/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ai/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/[operation]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/credentials/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/jobs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/legal/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/settings/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/artifact/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/cancel/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/launch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/catalog/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/check/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/consultations/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/describe/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/disk/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/enrich/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/environment/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/[id]/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/digest/route.js +2 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/digest/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/launch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/record/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/handoff/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/hook/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/hook/session/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ingest/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/apply/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/inspect/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/repair/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/review/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/backfill/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/cases/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/checks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/commitments/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/export/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/jobs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/outcomes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/purge/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/status/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/withdraw/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/north/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/open/all/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/open/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/project/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/rescan/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/roots/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/scale/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/secrets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/spend/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/today/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/assign/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/classify/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/critique/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/design/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/distill/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/learn/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/look/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/mine/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/rehearse/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/score/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/shot/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/sources/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/synthesize/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/taste/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/verdicts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/watch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/icon/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app-paths-manifest.json +46 -46
- package/app/apps/web/.next-bundle/server/chunks/329.js +2 -0
- package/app/apps/web/.next-bundle/server/chunks/7245.js +1 -1
- package/app/apps/web/.next-bundle/server/chunks/8726.js +1 -1
- package/app/apps/web/.next-bundle/server/chunks/9511.js +11 -11
- package/app/apps/web/.next-bundle/server/functions-config-manifest.json +10 -10
- package/app/apps/web/.next-bundle/server/middleware-manifest.json +5 -5
- package/app/apps/web/.next-bundle/server/pages/500.html +1 -1
- package/app/apps/web/.next-bundle/server/pages-manifest.json +1 -1
- package/app/apps/web/.next-bundle/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next-bundle/static/chunks/2575-d138c26dd227bf52.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/4189-e59247c25409a53c.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/handoff/page-abc28ddff96a4dfc.js +1 -0
- package/app/apps/web/.next-bundle/static/css/de9ca9adb4d104cf.css +1 -0
- package/app/node_modules/@panoma/handoff/dist/index.d.ts +16 -1
- package/app/node_modules/@panoma/handoff/dist/index.js +73 -29
- package/app/node_modules/@panoma/mcp/dist/index.js +16 -3
- package/dist/{ai-command-57AH3MUU.js → ai-command-KHHP7M3P.js} +1 -1
- package/dist/{apps-YTSUCVSW.js → apps-JIBB353S.js} +4 -4
- package/dist/{brief-NFOMZLUN.js → brief-QRIDN6ND.js} +3 -3
- package/dist/{check-command-QPXR7BKG.js → check-command-RADN7EQ2.js} +4 -4
- package/dist/{chunk-YL7PZVKO.js → chunk-6L6WBPRZ.js} +1 -1
- package/dist/{chunk-6LQYETKN.js → chunk-B2CTFPQP.js} +3 -3
- package/dist/{chunk-3UQ4TNO4.js → chunk-KZILTAZL.js} +2 -0
- package/dist/{chunk-V5EG3JSQ.js → chunk-R4EMO3Y2.js} +1 -1
- package/dist/{chunk-MBTQ3PDJ.js → chunk-T7S3VVFE.js} +2 -2
- package/dist/{chunk-AVXNC6AH.js → chunk-UHJA5TUC.js} +3 -3
- package/dist/{chunk-AGLVCNMA.js → chunk-ZRNEAPVY.js} +3 -3
- package/dist/{handoff-command-VXAPQ72C.js → handoff-command-EMWYQVOX.js} +101 -39
- package/dist/index.js +19 -19
- package/dist/{md-command-LLMG2EK4.js → md-command-4DLP6YD6.js} +3 -3
- package/dist/{memory-command-ESZY4HJY.js → memory-command-WNZOQUPW.js} +4 -4
- package/dist/{next-command-XYWRIXIJ.js → next-command-RKJV6BCU.js} +4 -4
- package/dist/{north-command-Y2RHE3ZD.js → north-command-ZZ3TWEDY.js} +4 -4
- package/dist/{review-command-Q2LCVNZS.js → review-command-7UOAO3SN.js} +1 -1
- package/dist/{spend-command-M2LK6PDA.js → spend-command-NQ5LQLIH.js} +3 -3
- package/dist/{twin-command-GJWG75TK.js → twin-command-M4ENHXMZ.js} +4 -4
- package/dist/{video-2NHNSDQK.js → video-AFYY2VSI.js} +5 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/app/apps/web/.next-bundle/server/chunks/7400.js +0 -3
- package/app/apps/web/.next-bundle/static/chunks/2575-babf7e8c8f4f8450.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/4189-0adcbb5b786fe4ed.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/handoff/page-dc56d5408723f15e.js +0 -1
- package/app/apps/web/.next-bundle/static/css/655591542b43a891.css +0 -1
- /package/app/apps/web/.next-bundle/static/{z5NZxxbhRK5pbTErTEcgK → xmmOASVL-XuXjHd9elXeS}/_buildManifest.js +0 -0
- /package/app/apps/web/.next-bundle/static/{z5NZxxbhRK5pbTErTEcgK → xmmOASVL-XuXjHd9elXeS}/_ssgManifest.js +0 -0
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-YSBWHGBC.js";
|
|
5
5
|
import {
|
|
6
6
|
sinceMs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZRNEAPVY.js";
|
|
8
8
|
import {
|
|
9
9
|
unreachable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T7S3VVFE.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogFetch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
14
14
|
import {
|
|
15
15
|
HandoffFault,
|
|
16
16
|
asHandoffFault,
|
|
17
17
|
handoffFaultText,
|
|
18
18
|
say
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KZILTAZL.js";
|
|
20
20
|
import "./chunk-DITTKJ7U.js";
|
|
21
21
|
import {
|
|
22
22
|
HANDOFF_CLAUDE_RECORD_VERSION,
|
|
@@ -636,10 +636,6 @@ var TurnBuilder = class {
|
|
|
636
636
|
if (at) turn.at = at;
|
|
637
637
|
this.turns.push(turn);
|
|
638
638
|
}
|
|
639
|
-
/** Everything read so far is behind a compaction: the turns start again. */
|
|
640
|
-
reset() {
|
|
641
|
-
this.turns.length = 0;
|
|
642
|
-
}
|
|
643
639
|
};
|
|
644
640
|
async function readTranscript(path) {
|
|
645
641
|
let size2;
|
|
@@ -779,10 +775,7 @@ async function parseClaudeTranscript(text, input) {
|
|
|
779
775
|
}
|
|
780
776
|
if (type === "system") {
|
|
781
777
|
if (record2["subtype"] !== "compact_boundary") continue;
|
|
782
|
-
builder.reset();
|
|
783
|
-
compactions.length = 0;
|
|
784
778
|
head.compacted = true;
|
|
785
|
-
firstUserText = void 0;
|
|
786
779
|
const meta = record2["compactMetadata"];
|
|
787
780
|
pending = { at, tokensBefore: isRecord(meta) ? readNumber(meta["preTokens"]) : void 0 };
|
|
788
781
|
continue;
|
|
@@ -1047,9 +1040,8 @@ function parseCodexRollout(text, input) {
|
|
|
1047
1040
|
continue;
|
|
1048
1041
|
}
|
|
1049
1042
|
if (type === "compacted") {
|
|
1050
|
-
builder.reset();
|
|
1051
|
-
compactions.length = 0;
|
|
1052
1043
|
head.compacted = true;
|
|
1044
|
+
const opens = builder.turns.length === 0;
|
|
1053
1045
|
const summary = readString(payload["message"]);
|
|
1054
1046
|
if (summary) {
|
|
1055
1047
|
builder.open("user", [{ kind: "summary", text: summary }], at);
|
|
@@ -1058,12 +1050,13 @@ function parseCodexRollout(text, input) {
|
|
|
1058
1050
|
compactions.push(compaction);
|
|
1059
1051
|
}
|
|
1060
1052
|
const history = payload["replacement_history"];
|
|
1061
|
-
if (Array.isArray(history))
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
}
|
|
1053
|
+
if (!Array.isArray(history)) continue;
|
|
1054
|
+
for (const item of history) {
|
|
1055
|
+
if (!isRecord(item)) continue;
|
|
1056
|
+
if (opens) replayItem(item, builder, dropped, at, (t) => {
|
|
1057
|
+
firstUserText ??= t;
|
|
1058
|
+
});
|
|
1059
|
+
else if (item["type"] === "compaction") dropped.other += 1;
|
|
1067
1060
|
}
|
|
1068
1061
|
continue;
|
|
1069
1062
|
}
|
|
@@ -1121,6 +1114,10 @@ function replayItem(item, builder, dropped, at, onUserText) {
|
|
|
1121
1114
|
dropped.thinking += 1;
|
|
1122
1115
|
return;
|
|
1123
1116
|
}
|
|
1117
|
+
if (kind === "agent_message") {
|
|
1118
|
+
dropped.subagents += 1;
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1124
1121
|
dropped.other += 1;
|
|
1125
1122
|
}
|
|
1126
1123
|
function parseArguments(value) {
|
|
@@ -1590,8 +1587,6 @@ function assemble(session, messages, partsByMessage, path, bytes) {
|
|
|
1590
1587
|
}
|
|
1591
1588
|
if (role === "user") {
|
|
1592
1589
|
if (parts.some((p) => p.data["type"] === "compaction")) {
|
|
1593
|
-
builder.reset();
|
|
1594
|
-
compactions.length = 0;
|
|
1595
1590
|
head.compacted = true;
|
|
1596
1591
|
pendingSummary = true;
|
|
1597
1592
|
continue;
|
|
@@ -1712,6 +1707,7 @@ var OPEN_ITEM_HEADING = /^#{0,6}\s*(?:\*\*)?(?:next steps?|open items?|remaining
|
|
|
1712
1707
|
var WRITE_TOOLS = /* @__PURE__ */ new Set(["Edit", "Write", "MultiEdit", "NotebookEdit", "apply_patch", "edit", "write", "multiedit"]);
|
|
1713
1708
|
var PATH_KEYS = ["file_path", "path", "notebook_path", "filePath"];
|
|
1714
1709
|
var PATCH_FILE = /^\*\*\* (?:Add|Update|Delete) File: (.+)$/gm;
|
|
1710
|
+
var PATCH_FILE_IN_SCRIPT = /\*\*\* (?:Add|Update|Delete) File: ((?:[^"\\]|\\[^n])+)/g;
|
|
1715
1711
|
var SHELL_TOOLS = /* @__PURE__ */ new Set(["Bash", "bash", "exec", "shell", "exec_command", "run_shell_command", "shell_command"]);
|
|
1716
1712
|
var COMMAND_MARKER = /^\s*<command-(?:name|message)>[\s\S]*$/;
|
|
1717
1713
|
function digestConversation(conversation) {
|
|
@@ -1793,10 +1789,22 @@ function filesOf(part) {
|
|
|
1793
1789
|
for (const m of input.matchAll(PATCH_FILE)) found.push(m[1].trim());
|
|
1794
1790
|
}
|
|
1795
1791
|
}
|
|
1792
|
+
const script = scriptOf(part);
|
|
1793
|
+
if (script) for (const m of script.matchAll(PATCH_FILE_IN_SCRIPT)) found.push(m[1].trim());
|
|
1796
1794
|
const command = commandOf(part);
|
|
1797
1795
|
if (command) found.push(...movedFiles(command));
|
|
1798
1796
|
return found;
|
|
1799
1797
|
}
|
|
1798
|
+
function scriptOf(part) {
|
|
1799
|
+
if (!SHELL_TOOLS.has(part.name)) return void 0;
|
|
1800
|
+
const input = part.input;
|
|
1801
|
+
if (typeof input === "string") return input;
|
|
1802
|
+
if (typeof input === "object" && input !== null) {
|
|
1803
|
+
const inner = input["input"];
|
|
1804
|
+
if (typeof inner === "string") return inner;
|
|
1805
|
+
}
|
|
1806
|
+
return void 0;
|
|
1807
|
+
}
|
|
1800
1808
|
function movedFiles(command) {
|
|
1801
1809
|
const found = [];
|
|
1802
1810
|
for (const segment of command.split(/\s*(?:&&|\|\||;|\|)\s*/)) {
|
|
@@ -1839,16 +1847,17 @@ function shellWords(segment) {
|
|
|
1839
1847
|
function commandOf(part) {
|
|
1840
1848
|
if (!SHELL_TOOLS.has(part.name)) return void 0;
|
|
1841
1849
|
const input = part.input;
|
|
1842
|
-
if (typeof input === "
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1850
|
+
if (typeof input === "object" && input !== null) {
|
|
1851
|
+
const record2 = input;
|
|
1852
|
+
const direct = record2["command"] ?? record2["cmd"];
|
|
1853
|
+
if (typeof direct === "string") return oneLine(direct);
|
|
1854
|
+
if (Array.isArray(direct)) return oneLine(direct.map(String).join(" "));
|
|
1855
|
+
}
|
|
1856
|
+
const script = scriptOf(part);
|
|
1857
|
+
return script ? commandInScript(script) : void 0;
|
|
1849
1858
|
}
|
|
1850
1859
|
function commandInScript(script) {
|
|
1851
|
-
const match = /"cmd"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(script);
|
|
1860
|
+
const match = /(?:"cmd"|\bcmd)\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(script);
|
|
1852
1861
|
if (!match) return void 0;
|
|
1853
1862
|
try {
|
|
1854
1863
|
return oneLine(JSON.parse(`"${match[1]}"`));
|
|
@@ -1913,9 +1922,8 @@ function digestMarkdown(digest) {
|
|
|
1913
1922
|
}
|
|
1914
1923
|
function compactConversation(conversation, digest, options = {}) {
|
|
1915
1924
|
const keep = Math.max(1, Math.floor(options.keepTurns ?? KEEP_TURNS_DEFAULT));
|
|
1916
|
-
const source = conversation.turns;
|
|
1925
|
+
const source = conversation.turns.filter((turn) => !turn.parts.every((part) => part.kind === "summary"));
|
|
1917
1926
|
let start = Math.max(0, source.length - keep);
|
|
1918
|
-
while (start < source.length && source[start].parts.every((part) => part.kind === "summary")) start += 1;
|
|
1919
1927
|
const first = source[start];
|
|
1920
1928
|
if (start > 0 && first && first.role === "user" && first.parts.some((part) => part.kind === "tool_result")) {
|
|
1921
1929
|
start -= 1;
|
|
@@ -2566,6 +2574,38 @@ async function readWindows(candidate) {
|
|
|
2566
2574
|
await handle.close();
|
|
2567
2575
|
}
|
|
2568
2576
|
}
|
|
2577
|
+
var COMPACTION_MARKERS = { "claude-cli": '"subtype":"compact_boundary"', "codex-cli": '"type":"compacted"' };
|
|
2578
|
+
var SCAN_CHUNK_BYTES = 1024 * 1024;
|
|
2579
|
+
var SCAN_MEMO_LIMIT = 4096;
|
|
2580
|
+
var scanMemo = /* @__PURE__ */ new Map();
|
|
2581
|
+
async function holdsMarker(candidate, marker) {
|
|
2582
|
+
const known = scanMemo.get(candidate.path);
|
|
2583
|
+
if (known && known.bytes === candidate.bytes && known.mtimeMs === candidate.mtimeMs) return known.found;
|
|
2584
|
+
const needle = Buffer.from(marker, "utf8");
|
|
2585
|
+
const chunk = Buffer.alloc(SCAN_CHUNK_BYTES);
|
|
2586
|
+
let carry = Buffer.alloc(0);
|
|
2587
|
+
let position = 0;
|
|
2588
|
+
let found = false;
|
|
2589
|
+
const handle = await open(candidate.path, "r");
|
|
2590
|
+
try {
|
|
2591
|
+
for (; ; ) {
|
|
2592
|
+
const { bytesRead } = await handle.read(chunk, 0, chunk.length, position);
|
|
2593
|
+
if (bytesRead === 0) break;
|
|
2594
|
+
const window = carry.length > 0 ? Buffer.concat([carry, chunk.subarray(0, bytesRead)]) : chunk.subarray(0, bytesRead);
|
|
2595
|
+
if (window.indexOf(needle) !== -1) {
|
|
2596
|
+
found = true;
|
|
2597
|
+
break;
|
|
2598
|
+
}
|
|
2599
|
+
carry = Buffer.from(window.subarray(Math.max(0, window.length - needle.length + 1)));
|
|
2600
|
+
position += bytesRead;
|
|
2601
|
+
}
|
|
2602
|
+
} finally {
|
|
2603
|
+
await handle.close();
|
|
2604
|
+
}
|
|
2605
|
+
if (scanMemo.size >= SCAN_MEMO_LIMIT) scanMemo.clear();
|
|
2606
|
+
scanMemo.set(candidate.path, { bytes: candidate.bytes, mtimeMs: candidate.mtimeMs, found });
|
|
2607
|
+
return found;
|
|
2608
|
+
}
|
|
2569
2609
|
function refOf(conversation, turnCount) {
|
|
2570
2610
|
const { version: _version, hash: _hash, turns: _turns, compactions: _compactions, dropped: _dropped, ...ref } = conversation;
|
|
2571
2611
|
return { ...ref, turnCount };
|
|
@@ -2619,7 +2659,9 @@ async function listClaude(options, limit, scope) {
|
|
|
2619
2659
|
const head = await parseClaudeTranscript(windows.head, input);
|
|
2620
2660
|
const tail = await parseClaudeTranscript(windows.tail, input);
|
|
2621
2661
|
const titled = windows.tail.includes('"custom-title"') || windows.tail.includes('"ai-title"');
|
|
2622
|
-
|
|
2662
|
+
const ref = mergeWindows(head, tail, titled);
|
|
2663
|
+
ref.compacted = ref.compacted || await holdsMarker(candidate, COMPACTION_MARKERS["claude-cli"]);
|
|
2664
|
+
refs.push(ref);
|
|
2623
2665
|
}
|
|
2624
2666
|
} catch {
|
|
2625
2667
|
}
|
|
@@ -2679,7 +2721,7 @@ async function listCodex(options, limit, scope) {
|
|
|
2679
2721
|
const head = parseCodexRollout(windows.head, input);
|
|
2680
2722
|
const tail = parseCodexRollout(windows.tail, input);
|
|
2681
2723
|
const ref = mergeWindows(head, tail, false);
|
|
2682
|
-
ref.compacted = ref.compacted ||
|
|
2724
|
+
ref.compacted = ref.compacted || await holdsMarker(candidate, COMPACTION_MARKERS["codex-cli"]);
|
|
2683
2725
|
refs.push(ref);
|
|
2684
2726
|
}
|
|
2685
2727
|
} catch {
|
|
@@ -3236,7 +3278,9 @@ ${say("handoff.usageHint")}
|
|
|
3236
3278
|
if (digestBy === "model" && !parsed.dryRun) {
|
|
3237
3279
|
const written = await modelDigest(parsed, conversation);
|
|
3238
3280
|
if (typeof written === "number") return written;
|
|
3239
|
-
digest = written;
|
|
3281
|
+
digest = written.digest;
|
|
3282
|
+
if (written.calls !== void 0 && !parsed.json) process.stderr.write(pc.dim(`${say("handoff.digestCalls", { n: written.calls })}
|
|
3283
|
+
`));
|
|
3240
3284
|
} else {
|
|
3241
3285
|
if (digestBy === "model" && !parsed.json) process.stderr.write(pc.dim(`${say("handoff.dryRunDigest")}
|
|
3242
3286
|
`));
|
|
@@ -3481,14 +3525,16 @@ async function modelDigest(parsed, conversation) {
|
|
|
3481
3525
|
`));
|
|
3482
3526
|
return 1;
|
|
3483
3527
|
}
|
|
3484
|
-
|
|
3528
|
+
const calls = typeof body?.calls === "number" && Number.isInteger(body.calls) && body.calls >= 0 ? body.calls : void 0;
|
|
3529
|
+
return calls === void 0 ? { digest } : { digest, calls };
|
|
3485
3530
|
}
|
|
3486
3531
|
function preview(parsed, conversation, digest, target, tier, out) {
|
|
3487
3532
|
const fidelity = target !== void 0 && target !== "bundle" ? fidelityOf(target) : void 0;
|
|
3488
3533
|
const sizeFacts = { turns: conversation.turns.length, tokens: digest.stats.estimatedTokens, bytes: conversation.bytes };
|
|
3534
|
+
const sizes = tierSizes(conversation, digest, parsed.keep);
|
|
3489
3535
|
if (parsed.json) {
|
|
3490
3536
|
process.stdout.write(
|
|
3491
|
-
`${JSON.stringify({ dryRun: true, conversation: refOf2(conversation), digest, tier, target: target ?? null, fidelity: fidelity ?? null, size: sizeFacts, dropped: conversation.dropped, ...target === "bundle" ? { bundle: out ?? null } : {} }, null, 2)}
|
|
3537
|
+
`${JSON.stringify({ dryRun: true, conversation: refOf2(conversation), digest, tier, target: target ?? null, fidelity: fidelity ?? null, size: sizeFacts, sizes, dropped: conversation.dropped, ...target === "bundle" ? { bundle: out ?? null } : {} }, null, 2)}
|
|
3492
3538
|
`
|
|
3493
3539
|
);
|
|
3494
3540
|
return 0;
|
|
@@ -3501,10 +3547,25 @@ function preview(parsed, conversation, digest, target, tier, out) {
|
|
|
3501
3547
|
for (const item of fidelity.leaves) lines.push(` ${pc.dim("\u2212")} ${pc.dim(item)}`);
|
|
3502
3548
|
}
|
|
3503
3549
|
if (target === "bundle") lines.push("", ` ${pc.dim(out ? say("handoff.bundleWouldWrite", { path: out }) : say("handoff.bundleWouldPrint"))}`);
|
|
3504
|
-
lines.push("", ` ${sizeLine(sizeFacts)}`, ` ${pc.dim(leftBehind(conversation.dropped))}`, "");
|
|
3550
|
+
lines.push("", ` ${sizeLine(sizeFacts)}`, ` ${tiersLine(sizes)}`, ` ${pc.dim(leftBehind(conversation.dropped))}`, "");
|
|
3505
3551
|
process.stdout.write(lines.join("\n"));
|
|
3506
3552
|
return 0;
|
|
3507
3553
|
}
|
|
3554
|
+
function tierSizes(conversation, digest, keepTurns) {
|
|
3555
|
+
const options = keepTurns !== void 0 ? { keepTurns } : {};
|
|
3556
|
+
const compact = compactConversation(conversation, digest, options);
|
|
3557
|
+
return {
|
|
3558
|
+
full: { turns: conversation.turns.length, estimatedTokens: estimateTokens(textOfTurns(conversation.turns)) },
|
|
3559
|
+
compact: { turns: compact.turns.length, estimatedTokens: estimateTokens(textOfTurns(compact.turns)) },
|
|
3560
|
+
brief: { estimatedTokens: estimateTokens(briefMarkdown(conversation, digest, options)) }
|
|
3561
|
+
};
|
|
3562
|
+
}
|
|
3563
|
+
function tiersLine(sizes) {
|
|
3564
|
+
return say("handoff.tierSizes", { full: kOf(sizes.full.estimatedTokens), compact: kOf(sizes.compact.estimatedTokens), brief: kOf(sizes.brief.estimatedTokens) });
|
|
3565
|
+
}
|
|
3566
|
+
function kOf(tokens) {
|
|
3567
|
+
return Math.max(1, Math.round(tokens / 1e3));
|
|
3568
|
+
}
|
|
3508
3569
|
function digestLines(conversation, digest, tier) {
|
|
3509
3570
|
const lines = [
|
|
3510
3571
|
` ${say("handoff.source", { agent: labelOf(conversation), handle: pc.cyan(conversation.handle), title: digest.title })}`,
|
|
@@ -3526,7 +3587,7 @@ function digestLines(conversation, digest, tier) {
|
|
|
3526
3587
|
return lines;
|
|
3527
3588
|
}
|
|
3528
3589
|
function sizeLine(facts) {
|
|
3529
|
-
return say("handoff.sizeLine", { n: facts.turns, k:
|
|
3590
|
+
return say("handoff.sizeLine", { n: facts.turns, k: kOf(facts.tokens), size: size(facts.bytes) });
|
|
3530
3591
|
}
|
|
3531
3592
|
function leftBehind(dropped) {
|
|
3532
3593
|
const parts = [];
|
|
@@ -3874,5 +3935,6 @@ export {
|
|
|
3874
3935
|
labelOf,
|
|
3875
3936
|
leftBehind,
|
|
3876
3937
|
nearestWord,
|
|
3877
|
-
rowLines
|
|
3938
|
+
rowLines,
|
|
3939
|
+
tierSizes
|
|
3878
3940
|
};
|
package/dist/index.js
CHANGED
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
hookOutput,
|
|
5
5
|
printHookOutput,
|
|
6
6
|
within
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R4EMO3Y2.js";
|
|
8
8
|
import {
|
|
9
9
|
openAllCommand,
|
|
10
10
|
openCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UHJA5TUC.js";
|
|
12
12
|
import {
|
|
13
13
|
entryCommand,
|
|
14
14
|
helpText,
|
|
15
15
|
todayCommand
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZRNEAPVY.js";
|
|
17
17
|
import {
|
|
18
18
|
cliEntry,
|
|
19
19
|
cliVersion,
|
|
@@ -24,15 +24,15 @@ import {
|
|
|
24
24
|
panomaCommand,
|
|
25
25
|
unreachable,
|
|
26
26
|
upCommand
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-T7S3VVFE.js";
|
|
28
28
|
import {
|
|
29
29
|
catalogFetch
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
31
31
|
import {
|
|
32
32
|
plural,
|
|
33
33
|
riskText,
|
|
34
34
|
say
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KZILTAZL.js";
|
|
36
36
|
import "./chunk-DITTKJ7U.js";
|
|
37
37
|
import {
|
|
38
38
|
MANAGED_EVENTS,
|
|
@@ -1158,19 +1158,19 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1158
1158
|
if (command === void 0) return conAviso(await entryCommand(parsed.api));
|
|
1159
1159
|
if (command === "today") return todayCommand(parsed.api);
|
|
1160
1160
|
if (command === "apps") {
|
|
1161
|
-
const { appsCommand } = await import("./apps-
|
|
1161
|
+
const { appsCommand } = await import("./apps-JIBB353S.js");
|
|
1162
1162
|
return appsCommand(parsed);
|
|
1163
1163
|
}
|
|
1164
1164
|
if (command === "video") {
|
|
1165
|
-
const { videoCommand } = await import("./video-
|
|
1165
|
+
const { videoCommand } = await import("./video-AFYY2VSI.js");
|
|
1166
1166
|
return videoCommand(parsed);
|
|
1167
1167
|
}
|
|
1168
1168
|
if (command === "next") {
|
|
1169
|
-
const { nextCommand } = await import("./next-command-
|
|
1169
|
+
const { nextCommand } = await import("./next-command-RKJV6BCU.js");
|
|
1170
1170
|
return nextCommand(parsed.api, parsed.positionals.slice(1));
|
|
1171
1171
|
}
|
|
1172
1172
|
if (command === "north") {
|
|
1173
|
-
const { northCommand } = await import("./north-command-
|
|
1173
|
+
const { northCommand } = await import("./north-command-ZZ3TWEDY.js");
|
|
1174
1174
|
return northCommand(parsed);
|
|
1175
1175
|
}
|
|
1176
1176
|
if (command === "open") {
|
|
@@ -1191,7 +1191,7 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1191
1191
|
`));
|
|
1192
1192
|
return 1;
|
|
1193
1193
|
}
|
|
1194
|
-
const { checkCommand } = await import("./check-command-
|
|
1194
|
+
const { checkCommand } = await import("./check-command-RADN7EQ2.js");
|
|
1195
1195
|
return checkCommand(parsed.api, query);
|
|
1196
1196
|
}
|
|
1197
1197
|
let escanear = command === "scan";
|
|
@@ -1211,7 +1211,7 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1211
1211
|
return signalCommand(resolve3(expandTilde(parsed.path)), parsed.api);
|
|
1212
1212
|
}
|
|
1213
1213
|
if (command === "brief") {
|
|
1214
|
-
const { briefCommand } = await import("./brief-
|
|
1214
|
+
const { briefCommand } = await import("./brief-QRIDN6ND.js");
|
|
1215
1215
|
return briefCommand(resolve3(expandTilde(parsed.path)), parsed.api);
|
|
1216
1216
|
}
|
|
1217
1217
|
if (command === "hooks") {
|
|
@@ -1223,14 +1223,14 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1223
1223
|
);
|
|
1224
1224
|
}
|
|
1225
1225
|
if (command === "ai") {
|
|
1226
|
-
const { aiCommand } = await import("./ai-command-
|
|
1226
|
+
const { aiCommand } = await import("./ai-command-KHHP7M3P.js");
|
|
1227
1227
|
return aiCommand(parsed);
|
|
1228
1228
|
}
|
|
1229
1229
|
if (command === "md") {
|
|
1230
1230
|
const target2 = resolve3(
|
|
1231
1231
|
expandTilde(parsed.positionals[2] ?? ".")
|
|
1232
1232
|
);
|
|
1233
|
-
const { mdCommand } = await import("./md-command-
|
|
1233
|
+
const { mdCommand } = await import("./md-command-4DLP6YD6.js");
|
|
1234
1234
|
return mdCommand(parsed.positionals[1], target2, parsed.api, { force: parsed.force });
|
|
1235
1235
|
}
|
|
1236
1236
|
if (command === "disk") return reportDisk(parsed.api);
|
|
@@ -1281,24 +1281,24 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1281
1281
|
return createAgentKey(parsed.api, name, parsed.install);
|
|
1282
1282
|
}
|
|
1283
1283
|
if (command === "twin") {
|
|
1284
|
-
const { twinCommand } = await import("./twin-command-
|
|
1284
|
+
const { twinCommand } = await import("./twin-command-M4ENHXMZ.js");
|
|
1285
1285
|
return twinCommand(parsed);
|
|
1286
1286
|
}
|
|
1287
1287
|
if (command === "memory") {
|
|
1288
|
-
const { memoryCommand } = await import("./memory-command-
|
|
1288
|
+
const { memoryCommand } = await import("./memory-command-WNZOQUPW.js");
|
|
1289
1289
|
return memoryCommand(parsed);
|
|
1290
1290
|
}
|
|
1291
1291
|
if (command === "spend") {
|
|
1292
|
-
const { spendCommand } = await import("./spend-command-
|
|
1292
|
+
const { spendCommand } = await import("./spend-command-NQ5LQLIH.js");
|
|
1293
1293
|
return spendCommand(parsed);
|
|
1294
1294
|
}
|
|
1295
1295
|
if (command === "handoff") {
|
|
1296
|
-
const { handoffCommand } = await import("./handoff-command-
|
|
1296
|
+
const { handoffCommand } = await import("./handoff-command-EMWYQVOX.js");
|
|
1297
1297
|
return handoffCommand(parsed);
|
|
1298
1298
|
}
|
|
1299
1299
|
if (command === "review") {
|
|
1300
1300
|
const target2 = resolve3(expandTilde(parsed.positionals[1] ?? "."));
|
|
1301
|
-
const { reviewCommand } = await import("./review-command-
|
|
1301
|
+
const { reviewCommand } = await import("./review-command-7UOAO3SN.js");
|
|
1302
1302
|
return reviewCommand(target2);
|
|
1303
1303
|
}
|
|
1304
1304
|
if (!escanear) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unreachable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T7S3VVFE.js";
|
|
4
4
|
import {
|
|
5
5
|
catalogFetch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
7
7
|
import {
|
|
8
8
|
plural,
|
|
9
9
|
say
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KZILTAZL.js";
|
|
11
11
|
import "./chunk-DITTKJ7U.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_BRIDGE,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R4EMO3Y2.js";
|
|
4
4
|
import {
|
|
5
5
|
unreachable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T7S3VVFE.js";
|
|
7
7
|
import {
|
|
8
8
|
catalogFetch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
say
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KZILTAZL.js";
|
|
13
13
|
import "./chunk-DITTKJ7U.js";
|
|
14
14
|
import {
|
|
15
15
|
expandTilde
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reportUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRNEAPVY.js";
|
|
4
4
|
import {
|
|
5
5
|
unreachable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T7S3VVFE.js";
|
|
7
7
|
import {
|
|
8
8
|
catalogFetch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
plural,
|
|
12
12
|
say
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KZILTAZL.js";
|
|
14
14
|
import "./chunk-DITTKJ7U.js";
|
|
15
15
|
import "./chunk-RD7TE2IA.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reportUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRNEAPVY.js";
|
|
4
4
|
import {
|
|
5
5
|
unreachable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T7S3VVFE.js";
|
|
7
7
|
import {
|
|
8
8
|
catalogFetch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
plural,
|
|
12
12
|
say
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KZILTAZL.js";
|
|
14
14
|
import "./chunk-DITTKJ7U.js";
|
|
15
15
|
import "./chunk-RD7TE2IA.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unreachable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T7S3VVFE.js";
|
|
4
4
|
import {
|
|
5
5
|
catalogFetch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
7
7
|
import {
|
|
8
8
|
say
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KZILTAZL.js";
|
|
10
10
|
import "./chunk-DITTKJ7U.js";
|
|
11
11
|
import "./chunk-RD7TE2IA.js";
|
|
12
12
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sinceMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRNEAPVY.js";
|
|
4
4
|
import {
|
|
5
5
|
unreachable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T7S3VVFE.js";
|
|
7
7
|
import {
|
|
8
8
|
catalogFetch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6L6WBPRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
plural,
|
|
12
12
|
say
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KZILTAZL.js";
|
|
14
14
|
import "./chunk-DITTKJ7U.js";
|
|
15
15
|
import "./chunk-RD7TE2IA.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolve
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UHJA5TUC.js";
|
|
4
4
|
import {
|
|
5
5
|
appsFetch,
|
|
6
6
|
followAppJob
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-B2CTFPQP.js";
|
|
8
|
+
import "./chunk-T7S3VVFE.js";
|
|
9
|
+
import "./chunk-6L6WBPRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
say
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KZILTAZL.js";
|
|
13
13
|
import "./chunk-DITTKJ7U.js";
|
|
14
14
|
import "./chunk-RD7TE2IA.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "panoma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "panoma",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.12.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.71.0",
|
|
12
12
|
"ignore": "^6.0.2",
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=7400,exports.ids=[7400,7711],exports.modules={79768:(a,b,c)=>{c.d(b,{fX:()=>i});var d=c(44810),e=c(40419),f=c(59340),g=c(49256);let h=/^\s*<command-(?:name|message)>[\s\S]*$/;async function i(a,b){var c;let i=function(a,b){let c=(a,b,c=!1)=>(0,e.fjv)(a,{origin:"conversation",limit:b,...c?{}:{includeNote:!1}}),d=a.turns,f=(0,e.fpj)(function(a){let b=b=>{for(let c of a){if("user"!==c.role)continue;let a=c.parts.find(a=>"text"===a.kind&&""!==a.text.trim()&&b(a.text.trim()));if(a&&"text"===a.kind)return a.text.trim()}};return b(a=>!h.test(a))??b(()=>!0)??""}(d)),i=[],j=0;for(let a=d.length-1;a>=0;a-=1){var k;let b=d[a],c=(k=(0,e.fpj)(b.parts.map(g.oK).filter(a=>""!==a.trim()).join("\n")),k.length>2500?`${k.slice(0,2500)}
|
|
2
|
-
…(turn clipped)`:k);if(""===c.trim())continue;let f=`[${b.role}]
|
|
3
|
-
${c}`;if(j+f.length>24e3&&i.length>0)break;i.unshift(f),j+=f.length}let l=[b.decisions.length>0?`Decisions the agent stated: ${b.decisions.length}`:"",b.commandsRun.length>0?`Commands run: ${b.commandsRun.length}`:"",`Turns in the conversation: ${b.stats.turns}; shown below, newest last: ${i.length}`].filter(Boolean),m=[b.filesTouched.length>0?`Files touched: ${b.filesTouched.map(e.fpj).join(", ")}`:"",b.openItems.length>0?`Open items the agent listed: ${b.openItems.map(e.fpj).join(" \xb7 ")}`:""].filter(Boolean);return{system:"You write the summary of a conversation between a person and a coding agent, so that another agent can continue the work without reading the transcript. Plain prose, one to three paragraphs, no headings, no lists, no preamble. Only what the material says: if it does not say why something was done, do not guess.",prompt:["Write the summary in the language the conversation is written in.","Say what the person was trying to do, what was decided and why when the transcript says","why, what was tried and did not work, and what is still open. Name files and commands","exactly as they appear. Do not address the person; describe the work.","","Facts the engine already extracted:",...l.map(a=>`- ${a}`),...m.length>0?["","What the transcript names, as the engine listed it:",c(m.join("\n"),6e3)]:[],"","The person's first message:",c(f,1500)||"(empty)",...b.summary?["","The summary the source agent had already made of the earlier part:",c((0,e.fpj)(b.summary),3e3)]:[],"","The conversation, oldest to newest:",c(i.join("\n\n"),26756,!0)||"(nothing to show)"].join("\n"),turnsIncluded:i.length}}(b.conversation,b.digest),j=b.spent,k=async c=>{let e=await (0,d.My)({system:i.system,prompt:i.prompt,maxTokens:c});return j+=1,await (0,f.DLu)(a,{kind:"handoff",provider:e.provider,model:e.model,identity:b.identity??null,...e.usage?{input:e.usage.input,output:e.usage.output}:{}}),e},l=await k(1200);"length"===l.stopReason&&j<b.cap&&(l=await k(2400));let m=function(a){let b=(0,e.fpj)(a).replace(/^\s*(?:summary|resumen)\s*:\s*/i,"").trim();return""===b?void 0:b}(l.text)??b.digest.summary??"";return{digest:(c=b.digest,{...c,by:"model",summary:m}),calls:j-b.spent,provider:l.provider,model:l.model}}},87711:(a,b,c)=>{c.d(b,{$A:()=>m,Ag:()=>B,Ap:()=>k,Cv:()=>F,D6:()=>n,GJ:()=>I,Js:()=>j,Kq:()=>o,Q1:()=>l,TC:()=>G,_r:()=>z,d8:()=>H,i_:()=>i,jQ:()=>D,l4:()=>A,lG:()=>E,ov:()=>p,p9:()=>C,tY:()=>g,wo:()=>r});var d=c(51455),e=c(76760),f=c(40419);let g=["read","look","memory","ask","rehearse","episodes","card","app","handoff"],h={read:300,look:20,memory:12,ask:20,rehearse:20,episodes:20,card:100,app:20,handoff:10},i={read:"PANOMA_READ_BUDGET",look:"PANOMA_LOOK_BUDGET",memory:"PANOMA_DISTILL_BUDGET",ask:"PANOMA_ASK_BUDGET",rehearse:"PANOMA_REHEARSE_BUDGET",episodes:"PANOMA_EPISODE_BUDGET",card:"PANOMA_CARD_BUDGET",app:"PANOMA_APP_BUDGET",handoff:"PANOMA_HANDOFF_BUDGET"},j={read:["distill","classify","synthesize"],look:["look"],memory:["memory"],ask:["ask"],rehearse:["rehearse"],episodes:["episodes"],card:["describe","review"],app:["app"],handoff:["handoff"]};function k(a){return g.find(b=>j[b].includes(a))}let l={catalog:256,project:64},m={catalog:"PANOMA_MEMORY_QUOTA_MB",project:"PANOMA_PROJECT_QUOTA_MB"},n=1048576,o=1048576,p=1568;function q(){return{caps:{},rates:{},currency:"USD",paused:!1,shots:"full"}}function r(a,b){return`${a}/${b}`}function s(){return(0,f.iuJ)("spend.json")}let t=/^[A-Z]{3}$/;function u(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function v(a){return"number"==typeof a&&Number.isInteger(a)&&a>=0&&a<=1e5}function w(a){return"number"==typeof a&&Number.isInteger(a)&&a>0&&a<=o}function x(a){if(!u(a))return!1;let{input:b,output:c}=a;return"number"==typeof b&&Number.isFinite(b)&&b>=0&&"number"==typeof c&&Number.isFinite(c)&&c>=0}function y(a){return a.length>0&&a.length<=200&&a.includes("/")}async function z(){let a;try{a=await (0,d.readFile)(s(),"utf8")}catch{return{settings:q(),broken:!1}}try{let b=function(a){if(!u(a))return;let b=q();if(u(a.caps))for(let c of g){let d=a.caps[c];v(d)&&(b.caps[c]=d)}if(u(a.rates))for(let[c,d]of Object.entries(a.rates))y(c)&&x(d)&&(b.rates[c]={input:d.input,output:d.output});if("string"==typeof a.currency&&t.test(a.currency)&&(b.currency=a.currency),!0===a.paused&&(b.paused=!0),"fit"===a.shots&&(b.shots="fit"),u(a.quota)){let c={};w(a.quota.catalogMb)&&(c.catalogMb=a.quota.catalogMb),w(a.quota.projectMb)&&(c.projectMb=a.quota.projectMb),(void 0!==c.catalogMb||void 0!==c.projectMb)&&(b.quota=c)}return b}(JSON.parse(a));return b?{settings:b,broken:!1}:{settings:q(),broken:!0}}catch{return{settings:q(),broken:!0}}}async function A(a){let b=s();await (0,d.mkdir)((0,e.dirname)(b),{recursive:!0});let c=`${b}.${process.pid}.${Math.random().toString(36).slice(2,8)}.tmp`;await (0,d.writeFile)(c,JSON.stringify(a,null,2),{mode:384}),await (0,d.rename)(c,b)}function B(a,b){if(!u(b))return{fault:"body"};let c={caps:{...a.caps},rates:{...a.rates},currency:a.currency,paused:a.paused,shots:a.shots,...void 0!==a.quota?{quota:{...a.quota}}:{}};if(void 0!==b.caps){if(!u(b.caps))return{fault:"caps"};for(let[a,d]of Object.entries(b.caps)){let b=g.find(b=>b===a);if(!b)return{fault:"caps"};if(null===d){delete c.caps[b];continue}if(!v(d))return{fault:"caps"};c.caps[b]=d}}if(void 0!==b.rates){if(!u(b.rates))return{fault:"rates"};let a={};for(let[c,d]of Object.entries(b.rates)){if(!y(c))return{fault:"rates"};if(null!==d){if(!x(d))return{fault:"rates"};a[c]={input:d.input,output:d.output}}}c.rates=a}if(void 0!==b.currency){if("string"!=typeof b.currency||!t.test(b.currency))return{fault:"currency"};c.currency=b.currency}if(void 0!==b.paused){if("boolean"!=typeof b.paused)return{fault:"paused"};c.paused=b.paused}if(void 0!==b.shots){if("full"!==b.shots&&"fit"!==b.shots)return{fault:"shots"};c.shots=b.shots}if(void 0!==b.quota){if(!u(b.quota))return{fault:"quota"};let a={...c.quota};for(let[c,d]of Object.entries(b.quota)){if("catalogMb"!==c&&"projectMb"!==c)return{fault:"quota"};if(null===d)delete a[c];else{if(!w(d))return{fault:"quota"};a[c]=d}}Object.keys(a).length?c.quota=a:delete c.quota}return{settings:c}}async function C(){let{settings:a}=await z();return a.shots}function D(a,b){if(void 0===a||""===a.trim())return b;let c=Number(a.trim());return!Number.isInteger(c)||c<0?b:c}function E(a,b,c){let d=h[a],e=b[i[a]],f=void 0!==e&&""!==e.trim()?e:void 0;if(c.paused)return{cap:0,source:"paused",factory:d,...void 0!==f?{env:f}:{}};if(void 0!==f)return{cap:D(f,d),source:"env",factory:d,env:f};let g=c.caps[a];return void 0!==g?{cap:g,source:"file",factory:d}:{cap:d,source:"factory",factory:d}}async function F(a){let{settings:b}=await z();return E(a,process.env,b)}async function G(){let{settings:a}=await z();return Object.fromEntries(g.map(b=>[b,E(b,process.env,a)]))}function H(a,b){let c=c=>{let d=a[m[c]];if(void 0!==d&&""!==d.trim())return{mb:function(a,b){if(void 0===a||""===a.trim())return b;let c=Number(a.trim());return w(c)?c:b}(d,l[c]),source:"variable"};let e="catalog"===c?b.quota?.catalogMb:b.quota?.projectMb;return void 0!==e&&w(e)?{mb:e,source:"file"}:{mb:l[c],source:"factory"}},d=c("catalog"),e=c("project"),f={catalog:d.source,project:e.source},g="variable"===d.source||"variable"===e.source?"variable":"file"===d.source||"file"===e.source?"file":"factory";return{catalogBytes:d.mb*n,projectBytes:e.mb*n,source:g,sources:f}}async function I(){let{settings:a}=await z();return H(process.env,a)}}};
|