@cortexkit/opencode-magic-context 0.48.0 → 0.49.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/dist/auto-search-worker.js +3 -3
- package/dist/{conflict-warning-hook-w8cykrnf.js → conflict-warning-hook-kzx4dmk1.js} +7 -7
- package/dist/{context-m0cy262m.js → context-nj5f293n.js} +96 -43
- package/dist/{derive-budgets-sg0xsq7s.js → derive-budgets-qz5rrr08.js} +2 -2
- package/dist/embedding-backfill-aetxv1vt.js +21 -0
- package/dist/embedding-worker.js +4 -4
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts +1 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts.map +1 -1
- package/dist/features/magic-context/search-rerank.d.ts +35 -0
- package/dist/features/magic-context/search-rerank.d.ts.map +1 -0
- package/dist/features/magic-context/search.d.ts +11 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +13 -2
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +2 -0
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts +29 -9
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +9 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +1 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +2 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +3 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-deadline.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-replay.fixture.d.ts +24 -0
- package/dist/hooks/magic-context/auto-search-replay.fixture.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts +2 -0
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +2 -0
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts +28 -0
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-host-runner.d.ts +8 -0
- package/dist/hooks/magic-context/historian-host-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +2 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts +7 -0
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/pass-outcome.d.ts +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +7 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +35 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +36 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts +8 -1
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts.map +1 -1
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts +8 -0
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +13 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +1 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-db7zwa3v.js → index-1bt88epp.js} +93 -9
- package/dist/{index-f0h6xwqm.js → index-1g30axtz.js} +229 -67
- package/dist/{index-k1xb52kd.js → index-1r0k9js3.js} +5 -5
- package/dist/{index-692jzy0p.js → index-2jcbj7r1.js} +122 -371
- package/dist/{index-bdckkfw6.js → index-2jgwttpt.js} +16 -8
- package/dist/{index-2y0s2hep.js → index-4mjhqadz.js} +1 -1
- package/dist/{index-pdecwzrd.js → index-57mrqed8.js} +1 -1
- package/dist/{index-ty64eqcn.js → index-9qjqq45k.js} +3 -3
- package/dist/{index-yq8n9qcb.js → index-9rt53q79.js} +4 -4
- package/dist/{index-pg50n748.js → index-b7mv1jx3.js} +4 -4
- package/dist/{index-mmyh6d8f.js → index-ezmszwbd.js} +6 -4
- package/dist/{index-fbv1dn35.js → index-gzcmtmar.js} +1 -1
- package/dist/{index-0an7742d.js → index-h2py7207.js} +549 -973
- package/dist/{index-0qhce371.js → index-h2wc01qk.js} +2 -2
- package/dist/{index-dhwzyd54.js → index-h5zfkjyk.js} +160 -25
- package/dist/{index-q2tqeqde.js → index-ha87j7a8.js} +1229 -78
- package/dist/{index-14cjxt20.js → index-hj2q50k0.js} +45 -8
- package/dist/{index-cb7emxgj.js → index-kmpvemph.js} +336 -6
- package/dist/{index-c43kr12f.js → index-kp5qe690.js} +7 -7
- package/dist/{index-bhvjj0ys.js → index-kq57tdf0.js} +2 -2
- package/dist/{index-7mx8v0pw.js → index-nm6a8xpd.js} +4 -4
- package/dist/{index-8j7gqj40.js → index-nsjyysj0.js} +6 -2
- package/dist/{index-k9nnwad5.js → index-nydv6g8r.js} +44 -7
- package/dist/{index-5zygecde.js → index-peshmj6h.js} +4 -4
- package/dist/{index-knh4y330.js → index-pxwp2hjk.js} +7 -2
- package/dist/{index-1qb0z7wa.js → index-qx53vezw.js} +1 -1
- package/dist/{index-q7h7csab.js → index-s4j7t92z.js} +9 -9
- package/dist/{index-z8e0psj8.js → index-stbr4ce6.js} +3 -3
- package/dist/{index-jcbd3znx.js → index-tqf7yg27.js} +1 -1
- package/dist/{index-72nhv486.js → index-vkbqdnkj.js} +2 -2
- package/dist/{index-eeezr5zz.js → index-z1tjp257.js} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -44
- package/dist/{logger-d3wex3dz.js → logger-ewak5q1s.js} +1 -1
- package/dist/{message-index-bounded-7ezbgddp.js → message-index-bounded-h0mrd4pr.js} +13 -13
- package/dist/{message-time-backfill-brbd63hv.js → message-time-backfill-8x06r9kx.js} +2 -2
- package/dist/migration-worker.js +9 -9
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/{project-embedding-registry-7qzptcw7.js → project-embedding-registry-rtt0djyb.js} +9 -9
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-6k83m4fj.js → read-session-chunk-ty89v75e.js} +10 -8
- package/dist/{read-session-raw-3g9qy1xa.js → read-session-raw-8sjbc9h0.js} +5 -3
- package/dist/{recomp-orchestrator-d3fp1cy0.js → recomp-orchestrator-4f1yyd1q.js} +25 -25
- package/dist/{safe-notification-target-5ffqq32m.js → safe-notification-target-q0cyrx3x.js} +2 -2
- package/dist/{search-epax1ecv.js → search-pz4f4wge.js} +20 -20
- package/dist/{send-session-notification-erecz4y4.js → send-session-notification-38cd5dqt.js} +5 -5
- package/dist/shared/auto-search-lifecycle.d.ts +14 -0
- package/dist/shared/auto-search-lifecycle.d.ts.map +1 -1
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/models-dev-temperature.d.ts +18 -0
- package/dist/shared/models-dev-temperature.d.ts.map +1 -0
- package/dist/shared/project-directory-key.d.ts +16 -0
- package/dist/shared/project-directory-key.d.ts.map +1 -1
- package/dist/shared/subagent-temperature.d.ts +46 -0
- package/dist/shared/subagent-temperature.d.ts.map +1 -0
- package/dist/{storage-tags-d3b0v2ss.js → storage-tags-k0pda32s.js} +6 -4
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/types.d.ts +1 -0
- package/dist/tools/ctx-search/types.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-spcy2qre.js → transform-postprocess-phase-tck4g20s.js} +25 -25
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/{context-sf98kstd.js → context-crbt6p1y.js} +809 -1052
- package/dist/v2/{derive-budgets-3vc0y84t.js → derive-budgets-fgej9j46.js} +3 -3
- package/dist/v2/embedding-backfill-ph1qfyn3.js +21 -0
- package/dist/v2/embedding-worker.js +4 -4
- package/dist/v2/hidden-child-native.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +7 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/dream-trigger.d.ts +4 -1
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +9 -2
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/{logger-mxd0ym09.js → logger-pj02s7sr.js} +1 -1
- package/dist/v2/{message-index-bounded-dy3s2k1e.js → message-index-bounded-xwqdywxg.js} +13 -13
- package/dist/v2/{message-time-backfill-gtx1pwk1.js → message-time-backfill-cje68egj.js} +2 -2
- package/dist/v2/migration-worker.js +9 -9
- package/dist/v2/{project-embedding-registry-1tgba5dv.js → project-embedding-registry-d6m7tyxr.js} +9 -9
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-rh4khdkv.js → read-session-chunk-8p5mdryx.js} +10 -8
- package/dist/v2/{read-session-raw-bsbmf0vj.js → read-session-raw-j8dvp7f4.js} +5 -3
- package/dist/v2/{recomp-orchestrator-az61rfcg.js → recomp-orchestrator-ckfgt6wq.js} +26 -26
- package/dist/v2/{safe-notification-target-73ax1p5v.js → safe-notification-target-y3p1hce9.js} +2 -2
- package/dist/v2/{search-nzkwrc6n.js → search-ym8rehhz.js} +20 -20
- package/dist/v2/{send-session-notification-6km439kn.js → send-session-notification-5m0yapqx.js} +5 -5
- package/dist/v2/{server-x2g40a71.js → server-19zjmn02.js} +2 -2
- package/dist/v2/{server-sggvvzhb.js → server-1tk82krw.js} +45 -8
- package/dist/v2/{server-vqpf3167.js → server-2s6ayq3t.js} +2 -2
- package/dist/v2/{server-z2037m6z.js → server-2s9qz6n7.js} +2 -2
- package/dist/v2/{server-k228xhjg.js → server-3j4d00kf.js} +1 -1
- package/dist/v2/{server-aan4q8mx.js → server-3t0q2cqx.js} +1 -1
- package/dist/v2/{server-2fbhp79z.js → server-4ez8mntn.js} +16 -8
- package/dist/v2/{server-zxhgvsf9.js → server-676xw7at.js} +1 -1
- package/dist/v2/{server-52awr2mw.js → server-6byqfbqf.js} +93 -9
- package/dist/v2/{server-qye6ykf7.js → server-7ekna9zs.js} +2 -2
- package/dist/v2/{server-g5r0n3b6.js → server-7h861yms.js} +160 -25
- package/dist/v2/{server-v06jcv0w.js → server-8k2agx29.js} +1 -1
- package/dist/v2/{server-686jg6eb.js → server-c5rrgrcd.js} +44 -7
- package/dist/v2/{server-4k748ke6.js → server-hb6xhh9q.js} +2 -2
- package/dist/v2/{server-7wwc2nga.js → server-jvxzm1jy.js} +7 -7
- package/dist/v2/{server-1r6pmz4f.js → server-kzns2hbz.js} +1 -1
- package/dist/v2/{server-xdfwt6kh.js → server-pj4pjv02.js} +2 -2
- package/dist/v2/{server-psqc7e9n.js → server-q4ph9bwn.js} +1227 -78
- package/dist/v2/{server-8pyt7hev.js → server-sa8jvrfc.js} +9 -9
- package/dist/v2/{server-ezhze64f.js → server-ss95ky04.js} +4 -4
- package/dist/v2/{server-5m3dt5r1.js → server-t4k4qexw.js} +6 -2
- package/dist/v2/{server-e0vdaae2.js → server-v4mewb78.js} +4 -4
- package/dist/v2/{server-gjcr4w98.js → server-w32kmdez.js} +4 -4
- package/dist/v2/{server-k8x2rbxc.js → server-x4hscabv.js} +119 -365
- package/dist/v2/{server-yczc713m.js → server-xwz4dqh9.js} +7 -2
- package/dist/v2/{server-xxm59eww.js → server-ycw9qqcy.js} +4 -4
- package/dist/v2/{server-8tqanswc.js → server-zp53y8js.js} +331 -4
- package/dist/v2/server.js +4 -4
- package/dist/v2/{storage-tags-w4tv77sn.js → storage-tags-8vw924zn.js} +6 -4
- package/dist/v2/store-reader.d.ts +8 -2
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-mz7efs7w.js → wrapup-orchestrator-a7efxaax.js} +26 -26
- package/dist/wrapup-orchestrator-barbc6h9.js +44 -0
- package/package.json +1 -1
- package/src/shared/auto-search-lifecycle.ts +43 -0
- package/src/shared/logger.test.ts +38 -0
- package/src/shared/logger.ts +10 -2
- package/src/shared/models-dev-temperature.ts +107 -0
- package/src/shared/project-directory-key.test.ts +59 -0
- package/src/shared/project-directory-key.ts +20 -0
- package/src/shared/subagent-temperature.test.ts +270 -0
- package/src/shared/subagent-temperature.ts +110 -0
- package/dist/embedding-backfill-9rcm1mfy.js +0 -21
- package/dist/v2/embedding-backfill-vn8g1nh1.js +0 -21
- package/dist/wrapup-orchestrator-amzta1t4.js +0 -44
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./index-1zx87sdm.js";
|
|
5
5
|
import {
|
|
6
6
|
estimateTokens
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qx53vezw.js";
|
|
8
8
|
import {
|
|
9
9
|
getHarness2
|
|
10
10
|
} from "./index-pavzsdc6.js";
|
|
11
11
|
import {
|
|
12
12
|
sessionLog2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-nsjyysj0.js";
|
|
14
14
|
import {
|
|
15
15
|
getTagIdentityWriteGeneration2,
|
|
16
16
|
getSqliteDatabasePath2
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
tagIdentityRevisionKey,
|
|
20
20
|
tagOrderConstraintIndex,
|
|
21
21
|
stableStringify
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-1bt88epp.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_PROTECTED_TOOLS,
|
|
25
25
|
normalizeProtectedToolName,
|
|
@@ -2426,6 +2426,15 @@ function readTagIdentityRevision(db, sessionId) {
|
|
|
2426
2426
|
const row = db.prepare("SELECT value FROM schema_migrations_meta WHERE key = ?").get(tagIdentityRevisionKey(sessionId));
|
|
2427
2427
|
return typeof row?.value === "string" ? row.value : null;
|
|
2428
2428
|
}
|
|
2429
|
+
function captureInitialTagOwnerRevision(db, sessionId, cached, appendedRows) {
|
|
2430
|
+
if (cached.identityRevision !== null || appendedRows === 0)
|
|
2431
|
+
return true;
|
|
2432
|
+
const revision = readTagIdentityRevision(db, sessionId);
|
|
2433
|
+
if (revision !== null && !/^[1-9]\d*:0$/.test(revision))
|
|
2434
|
+
return false;
|
|
2435
|
+
cached.identityRevision = revision;
|
|
2436
|
+
return true;
|
|
2437
|
+
}
|
|
2429
2438
|
function appendedSinceForeignCommit(db, sessionId, cached) {
|
|
2430
2439
|
tagOwnerShapeChecks += 1;
|
|
2431
2440
|
const rows = db.prepare(TAG_OWNER_APPENDED_WITH_SHAPE_SQL).all(cached.globalLastRowId, sessionId, tagIdentityRevisionKey(sessionId), sessionId);
|
|
@@ -2466,6 +2475,11 @@ function readTagOwnerSummary(db, sessionId, proseRatio, extraRatios = []) {
|
|
|
2466
2475
|
rows.push(...page);
|
|
2467
2476
|
}
|
|
2468
2477
|
}
|
|
2478
|
+
if (!captureInitialTagOwnerRevision(db, sessionId, cached, rows.length)) {
|
|
2479
|
+
if (offThreadOnly)
|
|
2480
|
+
throw new TagOwnerSummaryNotReady;
|
|
2481
|
+
rows = null;
|
|
2482
|
+
}
|
|
2469
2483
|
} else {
|
|
2470
2484
|
if (offThreadOnly)
|
|
2471
2485
|
db.exec("BEGIN");
|
|
@@ -2595,7 +2609,7 @@ function getTagNumberByMessageIdStatement(db) {
|
|
|
2595
2609
|
function getAssignableTagNumberByMessageIdStatement(db) {
|
|
2596
2610
|
let stmt = getAssignableTagNumberByMessageIdStatements.get(db);
|
|
2597
2611
|
if (!stmt) {
|
|
2598
|
-
stmt = db.prepare(`SELECT tag_number FROM tags
|
|
2612
|
+
stmt = db.prepare(`SELECT tag_number FROM tags INDEXED BY idx_tags_session_message_id
|
|
2599
2613
|
WHERE session_id = ?
|
|
2600
2614
|
AND message_id = ?
|
|
2601
2615
|
AND NOT (
|
|
@@ -2696,6 +2710,28 @@ function getInertWhitespaceAssistantTags2(db, sessionId, messageIds) {
|
|
|
2696
2710
|
return contentId.length > 0 ? [{ tagNumber: row.tagNumber, contentId }] : [];
|
|
2697
2711
|
});
|
|
2698
2712
|
}
|
|
2713
|
+
var inertWhitespaceByNumberStatements = new WeakMap;
|
|
2714
|
+
function getInertWhitespaceAssistantTagsByNumbers2(db, sessionId, tagNumbers) {
|
|
2715
|
+
if (tagNumbers.length === 0)
|
|
2716
|
+
return [];
|
|
2717
|
+
let statement = inertWhitespaceByNumberStatements.get(db);
|
|
2718
|
+
if (!statement) {
|
|
2719
|
+
statement = db.prepare(`SELECT tags.tag_number AS tagNumber, tags.entry_fingerprint AS entryFingerprint
|
|
2720
|
+
FROM json_each(?) AS wanted CROSS JOIN tags
|
|
2721
|
+
WHERE tags.session_id = ?
|
|
2722
|
+
AND tags.tag_number = wanted.value
|
|
2723
|
+
AND tags.type = 'message'
|
|
2724
|
+
AND tags.status = 'compacted'
|
|
2725
|
+
AND tags.entry_fingerprint LIKE ?
|
|
2726
|
+
ORDER BY tags.tag_number, tags.id`);
|
|
2727
|
+
inertWhitespaceByNumberStatements.set(db, statement);
|
|
2728
|
+
}
|
|
2729
|
+
const rows = statement.all(JSON.stringify([...new Set(tagNumbers)]), sessionId, `${WHITESPACE_ASSISTANT_INERT_FINGERPRINT_PREFIX}%`);
|
|
2730
|
+
return rows.flatMap((row) => {
|
|
2731
|
+
const contentId = row.entryFingerprint.slice(WHITESPACE_ASSISTANT_INERT_FINGERPRINT_PREFIX.length);
|
|
2732
|
+
return contentId.length > 0 ? [{ tagNumber: row.tagNumber, contentId }] : [];
|
|
2733
|
+
});
|
|
2734
|
+
}
|
|
2699
2735
|
function updateTagDropMode2(db, sessionId, tagNumber, dropMode) {
|
|
2700
2736
|
getUpdateTagDropModeStatement(db).run(dropMode, sessionId, tagNumber);
|
|
2701
2737
|
}
|
|
@@ -3124,7 +3160,8 @@ function markTagsCompactedByMessageIds2(db, sessionId, messageIds, eligibleTagNu
|
|
|
3124
3160
|
SELECT value AS source_id, lower(value) AS folded_id FROM json_each(?)
|
|
3125
3161
|
)
|
|
3126
3162
|
SELECT id, tag_number, message_id, tool_owner_message_id FROM tags INDEXED BY ${tagOrderConstraintIndex(db)}
|
|
3127
|
-
WHERE session_id = ? AND
|
|
3163
|
+
WHERE session_id = ? ${eligibleTagNumbers ? "AND tag_number IN (SELECT value FROM json_each(?))" : ""}
|
|
3164
|
+
AND status IN ('active', 'dropped') AND (
|
|
3128
3165
|
message_id IN (SELECT source_id FROM ids)
|
|
3129
3166
|
OR tool_owner_message_id IN (SELECT source_id FROM ids)
|
|
3130
3167
|
OR (instr(lower(message_id), ':p') > 0 AND
|
|
@@ -3133,7 +3170,7 @@ function markTagsCompactedByMessageIds2(db, sessionId, messageIds, eligibleTagNu
|
|
|
3133
3170
|
lower(substr(message_id, 1, instr(lower(message_id), ':file') - 1)) IN (SELECT folded_id FROM ids))
|
|
3134
3171
|
OR (? AND instr(message_id, ':') > 0)
|
|
3135
3172
|
OR ?
|
|
3136
|
-
)`).all(JSON.stringify(Array.from(ids)), sessionId, Array.from(ids).some((id) => id.includes(":")) ? 1 : 0, nulPrefixes.size > 0 ? 1 : 0);
|
|
3173
|
+
)`).all(JSON.stringify(Array.from(ids)), sessionId, ...eligibleTagNumbers ? [JSON.stringify([...eligibleTagNumbers])] : [], Array.from(ids).some((id) => id.includes(":")) ? 1 : 0, nulPrefixes.size > 0 ? 1 : 0);
|
|
3137
3174
|
const candidates = rows.filter((row) => (eligibleTagNumbers === undefined || eligibleTagNumbers.has(row.tag_number)) && matches(row.message_id, row.tool_owner_message_id));
|
|
3138
3175
|
if (candidates.length === 0)
|
|
3139
3176
|
return 0;
|
|
@@ -3529,4 +3566,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
|
|
|
3529
3566
|
return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
|
|
3530
3567
|
}
|
|
3531
3568
|
|
|
3532
|
-
export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, isRecord, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, reclaimableToolOutputCount, buildChannel2Reminder, buildChannel1Reminder, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|
|
3569
|
+
export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, isRecord, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, reclaimableToolOutputCount, buildChannel2Reminder, buildChannel1Reminder, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL,
|
|
3
3
|
LocalEmbeddingProvider
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-kq57tdf0.js";
|
|
5
5
|
import {
|
|
6
6
|
log2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-nsjyysj0.js";
|
|
8
8
|
import {
|
|
9
9
|
isSynapseEmbeddingTruncated,
|
|
10
10
|
SynapseEmbeddingProvider
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-vkbqdnkj.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenAICompatibleEmbeddingProvider,
|
|
14
14
|
getProjectEmbeddingSnapshot2,
|
|
15
15
|
embedBatchForProject2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-kp5qe690.js";
|
|
17
17
|
import {
|
|
18
18
|
isEmbeddingHostBusy2
|
|
19
19
|
} from "./index-qt1qqasc.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-0sahzkwr.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-nsjyysj0.js";
|
|
7
7
|
import {
|
|
8
8
|
writeStorageFileAtomicSync
|
|
9
9
|
} from "./index-1bc61ans.js";
|
|
@@ -30,6 +30,11 @@ function projectDirectoryKey(directory) {
|
|
|
30
30
|
}
|
|
31
31
|
return path.resolve(directory);
|
|
32
32
|
}
|
|
33
|
+
function sameProjectDirectory(a, b) {
|
|
34
|
+
if (a.length === 0 || b.length === 0)
|
|
35
|
+
return false;
|
|
36
|
+
return projectDirectoryKey(a) === projectDirectoryKey(b);
|
|
37
|
+
}
|
|
33
38
|
var realpathForCanonicalDirectory = (directory) => realpathSync.native(directory);
|
|
34
39
|
function canonicalProjectDirectory(directory) {
|
|
35
40
|
let resolved = directory;
|
|
@@ -563,4 +568,4 @@ function setBootQuietPeriodForTests(startAtMs) {
|
|
|
563
568
|
bootQuietUntilMs = startAtMs === null ? 0 : startAtMs + BOOT_QUIET_MS;
|
|
564
569
|
}
|
|
565
570
|
|
|
566
|
-
export { canonicalProjectDirectory, setHomeProjectPermission, shouldSkipHomeProjectMemory, ProjectIdentityError, resolveProjectIdentityStrict, takeDubiousOwnershipProjectIdentityWarning, isUserHomeDirectory, resolveProjectIdentity, directoryHasGitMetadata, describeUnresolvedProjectIdentity, isUsableProjectIdentity, resolveProjectIdentityForSession, normalizeStoredProjectPath, storedPathBelongsToIdentity, beginBootQuietPeriod, bootQuietRemainingMs, scheduleAfterBootQuiet, setBootQuietPeriodForTests };
|
|
571
|
+
export { sameProjectDirectory, canonicalProjectDirectory, setHomeProjectPermission, shouldSkipHomeProjectMemory, ProjectIdentityError, resolveProjectIdentityStrict, takeDubiousOwnershipProjectIdentityWarning, isUserHomeDirectory, resolveProjectIdentity, directoryHasGitMetadata, describeUnresolvedProjectIdentity, isUsableProjectIdentity, resolveProjectIdentityForSession, normalizeStoredProjectPath, storedPathBelongsToIdentity, beginBootQuietPeriod, bootQuietRemainingMs, scheduleAfterBootQuiet, setBootQuietPeriodForTests };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
importPluginModule,
|
|
4
4
|
writeForwardedLogLine2,
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-nsjyysj0.js";
|
|
7
7
|
import {
|
|
8
8
|
harnessOwnsOpenCodeStore2
|
|
9
9
|
} from "./index-pavzsdc6.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./index-fb3zxn06.js";
|
|
27
27
|
import {
|
|
28
28
|
startMessageFtsRowidMapBackfill
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-gzcmtmar.js";
|
|
30
30
|
import {
|
|
31
31
|
LKG_SLOT_CHUNKS_DDL,
|
|
32
32
|
SESSION_REPLAY_DECISIONS_DDL,
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
hasPendingMigrations,
|
|
37
37
|
getMainThreadMigrationBodyCount,
|
|
38
38
|
runMigrations
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-nm6a8xpd.js";
|
|
40
40
|
import {
|
|
41
41
|
installTagIdentityRevisionTrigger,
|
|
42
42
|
ensureColumn,
|
|
43
43
|
installV95PerfSchema
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-1bt88epp.js";
|
|
45
45
|
import {
|
|
46
46
|
resolveOpenCodeDbPath,
|
|
47
47
|
hasV1MessageTables
|
|
@@ -50,11 +50,11 @@ import {
|
|
|
50
50
|
canonicalProjectDirectory,
|
|
51
51
|
bootQuietRemainingMs,
|
|
52
52
|
scheduleAfterBootQuiet
|
|
53
|
-
} from "./index-
|
|
53
|
+
} from "./index-pxwp2hjk.js";
|
|
54
54
|
import {
|
|
55
55
|
setDatabase,
|
|
56
56
|
loadToolDefinitionMeasurements
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-h2wc01qk.js";
|
|
58
58
|
import {
|
|
59
59
|
getErrorMessage
|
|
60
60
|
} from "./index-y8v6yerm.js";
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
} from "./index-8ajstryz.js";
|
|
72
72
|
import {
|
|
73
73
|
logSlowWriteTransaction
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-4mjhqadz.js";
|
|
75
75
|
|
|
76
76
|
// src/features/magic-context/fail-closed-block.ts
|
|
77
77
|
var FAIL_CLOSED_DOCTOR_COMMAND = "npx @cortexkit/magic-context@latest doctor";
|
|
@@ -1974,8 +1974,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1974
1974
|
startMessageFtsRowidMapBackfill(db).then(async () => {
|
|
1975
1975
|
if (!readsOpenCodeStore)
|
|
1976
1976
|
return;
|
|
1977
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1978
|
-
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-
|
|
1977
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-ty89v75e.js"));
|
|
1978
|
+
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-8x06r9kx.js"));
|
|
1979
1979
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|
|
1980
1980
|
readPage: readRawSessionMessagePage
|
|
1981
1981
|
}));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importPluginModule,
|
|
3
3
|
log2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-nsjyysj0.js";
|
|
5
5
|
import {
|
|
6
6
|
sendStatusNotification2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9rt53q79.js";
|
|
8
8
|
import {
|
|
9
9
|
formatConflictShort
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-z1tjp257.js";
|
|
11
11
|
|
|
12
12
|
// src/plugin/conflict-warning-hook.ts
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-qx53vezw.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./index-pavzsdc6.js";
|
|
7
7
|
import {
|
|
8
8
|
log2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-nsjyysj0.js";
|
|
10
10
|
|
|
11
11
|
// ../../node_modules/.bun/@cortexkit+subc-client@0.11.1/node_modules/@cortexkit/subc-client/dist/client.js
|
|
12
12
|
import { promises as fs2 } from "node:fs";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA2GvE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA2GvE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAqiCpC,QAAA,MAAM,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,KAAK,CAAA;CAIjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
log2,
|
|
12
12
|
sessionLog2,
|
|
13
13
|
flushLogger2
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-nsjyysj0.js";
|
|
15
15
|
import {
|
|
16
16
|
withContentLanguageDirective,
|
|
17
17
|
string,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
record,
|
|
24
24
|
DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
|
|
25
25
|
DEFAULT_HISTORIAN_TIMEOUT_MS
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-kq57tdf0.js";
|
|
27
27
|
import {
|
|
28
28
|
denyTaskRoutingToCallerAgents,
|
|
29
29
|
buildHiddenAgentRegistrations,
|
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
noteLkgProviderResponse,
|
|
77
77
|
registerLkgPersistence,
|
|
78
78
|
dropSlot,
|
|
79
|
+
forgetUnpublishedAutoSearchNoHint,
|
|
79
80
|
getOrCreateSessionMeta,
|
|
80
81
|
updateSessionMeta,
|
|
81
82
|
markSessionCleanupPending,
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
checkCompactionMarkerConsistency,
|
|
89
90
|
clearInjectionCache,
|
|
90
91
|
clearNoteNudgeTriggerOnly
|
|
91
|
-
} from "./index-
|
|
92
|
+
} from "./index-2jcbj7r1.js";
|
|
92
93
|
import"./index-sd3egckz.js";
|
|
93
94
|
import {
|
|
94
95
|
reloadWindowOverlay,
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
deriveHistorianChunkTokens2,
|
|
100
101
|
resolveKnownHistorianContextLimit2,
|
|
101
102
|
resolveHistorianContextLimit2
|
|
102
|
-
} from "./index-
|
|
103
|
+
} from "./index-57mrqed8.js";
|
|
103
104
|
import"./index-mfkzp7qj.js";
|
|
104
105
|
import {
|
|
105
106
|
resolveOpenCodeDbPath,
|
|
@@ -114,8 +115,6 @@ import {
|
|
|
114
115
|
runSessionProjectBackfill,
|
|
115
116
|
SMART_NOTE_COMPILER_SYSTEM_PROMPT,
|
|
116
117
|
createLiveSessionState,
|
|
117
|
-
getDefaultSubcConnectionFile,
|
|
118
|
-
SubcModuleTransport,
|
|
119
118
|
OpenCodeRetrospectiveRawProvider,
|
|
120
119
|
createDreamTaskExecutor,
|
|
121
120
|
runManualDream,
|
|
@@ -157,6 +156,7 @@ import {
|
|
|
157
156
|
maybeDeliverChannel2,
|
|
158
157
|
armLatestThinkingRecovery,
|
|
159
158
|
armBindingRecoverySafely,
|
|
159
|
+
rustWrapupHistorianFields,
|
|
160
160
|
clearMessageTokensCache,
|
|
161
161
|
createTransform,
|
|
162
162
|
createSubcModuleClient,
|
|
@@ -176,8 +176,9 @@ import {
|
|
|
176
176
|
createCtxReduceTools,
|
|
177
177
|
createCtxSearchTools,
|
|
178
178
|
parameterDescriptionsFor,
|
|
179
|
-
MagicContextRpcServer
|
|
180
|
-
|
|
179
|
+
MagicContextRpcServer,
|
|
180
|
+
applyHiddenSubagentTemperature
|
|
181
|
+
} from "./index-h2py7207.js";
|
|
181
182
|
import {
|
|
182
183
|
formatFailClosedBlockingMessage,
|
|
183
184
|
createFailClosedController,
|
|
@@ -192,7 +193,7 @@ import {
|
|
|
192
193
|
openDatabaseAsync,
|
|
193
194
|
isDatabasePersisted,
|
|
194
195
|
getDatabasePersistenceError
|
|
195
|
-
} from "./index-
|
|
196
|
+
} from "./index-s4j7t92z.js";
|
|
196
197
|
import {
|
|
197
198
|
setHomeProjectPermission,
|
|
198
199
|
ProjectIdentityError,
|
|
@@ -203,32 +204,32 @@ import {
|
|
|
203
204
|
beginBootQuietPeriod,
|
|
204
205
|
bootQuietRemainingMs,
|
|
205
206
|
scheduleAfterBootQuiet
|
|
206
|
-
} from "./index-
|
|
207
|
+
} from "./index-pxwp2hjk.js";
|
|
207
208
|
import {
|
|
208
209
|
deleteTemporalDecision
|
|
209
|
-
} from "./index-
|
|
210
|
+
} from "./index-1bt88epp.js";
|
|
210
211
|
import {
|
|
211
212
|
observeSessionActivity,
|
|
212
213
|
backfillSessionActivity,
|
|
213
214
|
deleteIndexedMessage
|
|
214
|
-
} from "./index-
|
|
215
|
+
} from "./index-hj2q50k0.js";
|
|
215
216
|
import {
|
|
216
217
|
recordSessionProjectIdentity,
|
|
217
218
|
getProjectEmbeddingSnapshot2,
|
|
218
219
|
getEmbeddingCoverageStatus2,
|
|
219
220
|
getAutoEmbeddingSessionCoverage2
|
|
220
|
-
} from "./index-
|
|
221
|
+
} from "./index-kp5qe690.js";
|
|
221
222
|
import"./index-fb3zxn06.js";
|
|
222
|
-
import"./index-
|
|
223
|
-
import"./index-
|
|
223
|
+
import"./index-gzcmtmar.js";
|
|
224
|
+
import"./index-nm6a8xpd.js";
|
|
224
225
|
import"./index-fr0wbhdn.js";
|
|
225
226
|
import {
|
|
226
227
|
preloadTokenizer
|
|
227
|
-
} from "./index-
|
|
228
|
+
} from "./index-qx53vezw.js";
|
|
228
229
|
import {
|
|
229
230
|
getCurrentToolSetHash,
|
|
230
231
|
recordToolDefinition
|
|
231
|
-
} from "./index-
|
|
232
|
+
} from "./index-h2wc01qk.js";
|
|
232
233
|
import {
|
|
233
234
|
invalidateTrueRawTokenCache,
|
|
234
235
|
recordToolParameters,
|
|
@@ -239,40 +240,44 @@ import {
|
|
|
239
240
|
detectOverflow,
|
|
240
241
|
isAnthropicFamilyRoute,
|
|
241
242
|
readRawSessionMessages2
|
|
242
|
-
} from "./index-
|
|
243
|
-
import"./index-
|
|
243
|
+
} from "./index-2jgwttpt.js";
|
|
244
|
+
import"./index-vkbqdnkj.js";
|
|
245
|
+
import {
|
|
246
|
+
getDefaultSubcConnectionFile,
|
|
247
|
+
SubcModuleTransport
|
|
248
|
+
} from "./index-ha87j7a8.js";
|
|
244
249
|
import {
|
|
245
250
|
isEmbeddingHostBusy2
|
|
246
251
|
} from "./index-qt1qqasc.js";
|
|
247
|
-
import"./index-
|
|
252
|
+
import"./index-tqf7yg27.js";
|
|
248
253
|
import {
|
|
249
254
|
registerExitAbort,
|
|
250
255
|
unregisterExitAbort,
|
|
251
256
|
forgetRawSessionOrdinalWatermark2
|
|
252
|
-
} from "./index-
|
|
257
|
+
} from "./index-h5zfkjyk.js";
|
|
253
258
|
import {
|
|
254
259
|
observeOpenCodeTurnEvent,
|
|
255
260
|
clearTrackedOpenCodeSession,
|
|
256
261
|
findLastAssistantModelFromOpenCodeDb
|
|
257
|
-
} from "./index-
|
|
262
|
+
} from "./index-9qjqq45k.js";
|
|
258
263
|
import {
|
|
259
264
|
sendCommandResult2,
|
|
260
265
|
sendStatusNotification2
|
|
261
|
-
} from "./index-
|
|
266
|
+
} from "./index-9rt53q79.js";
|
|
262
267
|
import {
|
|
263
268
|
detectConflicts,
|
|
264
269
|
resolveCompactionForBoot
|
|
265
|
-
} from "./index-
|
|
270
|
+
} from "./index-z1tjp257.js";
|
|
266
271
|
import {
|
|
267
272
|
sendConflictWarning2,
|
|
268
273
|
cleanupConflictWarnings2
|
|
269
|
-
} from "./index-
|
|
274
|
+
} from "./index-stbr4ce6.js";
|
|
270
275
|
import"./index-1zx87sdm.js";
|
|
271
276
|
import {
|
|
272
277
|
stripPersistedAssistantText,
|
|
273
278
|
deleteTagsByMessageId2,
|
|
274
279
|
getMaxTagNumberBySession2
|
|
275
|
-
} from "./index-
|
|
280
|
+
} from "./index-nydv6g8r.js";
|
|
276
281
|
import {
|
|
277
282
|
resolveHistorianModel2,
|
|
278
283
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -282,25 +287,24 @@ import {
|
|
|
282
287
|
buildDreamTaskRuntimeConfigs2,
|
|
283
288
|
userMemoryCollectionEnabled2
|
|
284
289
|
} from "./index-ghc9f0n7.js";
|
|
285
|
-
import"./index-
|
|
286
|
-
import"./index-
|
|
290
|
+
import"./index-b7mv1jx3.js";
|
|
291
|
+
import"./index-kmpvemph.js";
|
|
287
292
|
import {
|
|
288
293
|
pushNotification2
|
|
289
294
|
} from "./index-x8a7jmkh.js";
|
|
290
295
|
import"./index-4dhv7mqz.js";
|
|
291
|
-
import"./index-
|
|
296
|
+
import"./index-peshmj6h.js";
|
|
292
297
|
import"./index-7jzrrxap.js";
|
|
293
|
-
import"./index-q2tqeqde.js";
|
|
294
298
|
import {
|
|
295
299
|
createTagger,
|
|
296
300
|
cavemanWordRulesForLanguage,
|
|
297
301
|
setCtxReduceRegisteredGlobally,
|
|
298
302
|
clearToolPermissionDenied,
|
|
299
303
|
resetDegradedCacheCount2
|
|
300
|
-
} from "./index-
|
|
304
|
+
} from "./index-1g30axtz.js";
|
|
301
305
|
import {
|
|
302
306
|
runManagedRecomp2
|
|
303
|
-
} from "./index-
|
|
307
|
+
} from "./index-ezmszwbd.js";
|
|
304
308
|
import {
|
|
305
309
|
isValidSemver,
|
|
306
310
|
compareSemverCore
|
|
@@ -308,7 +312,7 @@ import {
|
|
|
308
312
|
import"./index-fmsr7v69.js";
|
|
309
313
|
import {
|
|
310
314
|
runManagedWrapup2
|
|
311
|
-
} from "./index-
|
|
315
|
+
} from "./index-1r0k9js3.js";
|
|
312
316
|
import {
|
|
313
317
|
__toESM,
|
|
314
318
|
__commonJS
|
|
@@ -328,7 +332,7 @@ import {
|
|
|
328
332
|
import {
|
|
329
333
|
closeQuietly
|
|
330
334
|
} from "./index-8ajstryz.js";
|
|
331
|
-
import"./index-
|
|
335
|
+
import"./index-4mjhqadz.js";
|
|
332
336
|
|
|
333
337
|
// ../../node_modules/.bun/esprima@4.0.1/node_modules/esprima/dist/esprima.js
|
|
334
338
|
var require_esprima = __commonJS(function(exports, module) {
|
|
@@ -9501,7 +9505,7 @@ async function deliverChannel2IfPending(deps, sessionId) {
|
|
|
9501
9505
|
}
|
|
9502
9506
|
}
|
|
9503
9507
|
function cleanupRemovedMessageState(deps, sessionId, messageId) {
|
|
9504
|
-
|
|
9508
|
+
const result = deps.db.transaction(() => {
|
|
9505
9509
|
const removedTagNumbers = deleteTagsByMessageId2(deps.db, sessionId, messageId);
|
|
9506
9510
|
deleteTemporalDecision(deps.db, sessionId, messageId);
|
|
9507
9511
|
sessionLog2(sessionId, `event message.removed: deleted ${removedTagNumbers.length} tag(s) for message ${messageId}`);
|
|
@@ -9531,6 +9535,8 @@ function cleanupRemovedMessageState(deps, sessionId, messageId) {
|
|
|
9531
9535
|
clearedNoteNudge
|
|
9532
9536
|
};
|
|
9533
9537
|
}).immediate();
|
|
9538
|
+
forgetUnpublishedAutoSearchNoHint(sessionId, messageId);
|
|
9539
|
+
return result;
|
|
9534
9540
|
}
|
|
9535
9541
|
function createEventHandler2(deps) {
|
|
9536
9542
|
const newestUsageMessageIdBySession = new Map;
|
|
@@ -10028,7 +10034,7 @@ function createEventHandler2(deps) {
|
|
|
10028
10034
|
await deps.onSessionDeleted?.(sessionId);
|
|
10029
10035
|
if (!rustCleanupPending || deps.rustSessionCleanup === true) {
|
|
10030
10036
|
removeCompactionMarkerForSession(deps.db, sessionId);
|
|
10031
|
-
clearSession(deps.db, sessionId, deps.rustSessionCleanup === true);
|
|
10037
|
+
clearSession(deps.db, sessionId, deps.rustSessionCleanup === true, true);
|
|
10032
10038
|
}
|
|
10033
10039
|
} catch (error) {
|
|
10034
10040
|
sessionLog2(sessionId, "event session.deleted persistence failed:", error);
|
|
@@ -10583,6 +10589,15 @@ function createMagicContextHook(deps) {
|
|
|
10583
10589
|
historyBudgetPercentage: deps.config.history_budget_percentage,
|
|
10584
10590
|
transformMode: deps.config.transform_mode,
|
|
10585
10591
|
rustModeModuleClient,
|
|
10592
|
+
resolveRustWrapupHistorianFields: () => {
|
|
10593
|
+
const run = sampleHistorian();
|
|
10594
|
+
return rustWrapupHistorianFields({
|
|
10595
|
+
historianModel: run.model,
|
|
10596
|
+
fallbackModels: run.fallbackModels,
|
|
10597
|
+
timeoutMs: run.timeoutMs,
|
|
10598
|
+
maxOutputTokens: run.maxOutputTokens
|
|
10599
|
+
});
|
|
10600
|
+
},
|
|
10586
10601
|
projectRoot: deps.directory,
|
|
10587
10602
|
commitClusterTrigger: deps.config.commit_cluster_trigger,
|
|
10588
10603
|
sampleCommitClusterTrigger: () => (deps.sampleHistorianConfig?.() ?? deps.config).commit_cluster_trigger,
|
|
@@ -11743,6 +11758,7 @@ function createToolRegistry(args) {
|
|
|
11743
11758
|
}),
|
|
11744
11759
|
...createCtxSearchTools({
|
|
11745
11760
|
db,
|
|
11761
|
+
rerankConnectionFile: pluginConfig.subc?.connection_file,
|
|
11746
11762
|
resolveProjectPath,
|
|
11747
11763
|
ensureProjectRegistered: ensureProjectRegisteredFromOpenCodeDirectory
|
|
11748
11764
|
}),
|
|
@@ -11890,7 +11906,7 @@ async function setup(context) {
|
|
|
11890
11906
|
log2("v2 setup() called on a host without session.hook; v1 server lane owns this host, v2 lane inert");
|
|
11891
11907
|
return async () => {};
|
|
11892
11908
|
}
|
|
11893
|
-
const { registerContext } = await import("./context-
|
|
11909
|
+
const { registerContext } = await import("./context-nj5f293n.js");
|
|
11894
11910
|
setHarness2("opencode2");
|
|
11895
11911
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
11896
11912
|
const duties = await registerContext(context);
|
|
@@ -11961,7 +11977,7 @@ var server = async (ctx) => {
|
|
|
11961
11977
|
if (hasBannerEntries)
|
|
11962
11978
|
setTimeout(async () => {
|
|
11963
11979
|
try {
|
|
11964
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
11980
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-38cd5dqt.js"));
|
|
11965
11981
|
const clientWithSessions = ctx.client;
|
|
11966
11982
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
11967
11983
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -11978,7 +11994,7 @@ var server = async (ctx) => {
|
|
|
11978
11994
|
log2(`[magic-context] opencode_db_missing path=${openCodeDbResolution.path} source=${openCodeDbResolution.source}`);
|
|
11979
11995
|
setTimeout(async () => {
|
|
11980
11996
|
try {
|
|
11981
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
11997
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-38cd5dqt.js"));
|
|
11982
11998
|
const clientWithSessions = ctx.client;
|
|
11983
11999
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
11984
12000
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12254,12 +12270,12 @@ var server = async (ctx) => {
|
|
|
12254
12270
|
{
|
|
12255
12271
|
const fence = getSchemaFenceRejection();
|
|
12256
12272
|
if (fence) {
|
|
12257
|
-
importPluginModule(() => import("./conflict-warning-hook-
|
|
12273
|
+
importPluginModule(() => import("./conflict-warning-hook-kzx4dmk1.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
|
|
12258
12274
|
}
|
|
12259
12275
|
}
|
|
12260
12276
|
const serverUrl = ctx.serverUrl;
|
|
12261
12277
|
const serverUrlStr = serverUrl instanceof URL ? serverUrl.toString().replace(/\/$/, "") : typeof serverUrl === "string" ? serverUrl.replace(/\/$/, "") : undefined;
|
|
12262
|
-
importPluginModule(() => import("./send-session-notification-
|
|
12278
|
+
importPluginModule(() => import("./send-session-notification-38cd5dqt.js")).then(({ setNotificationServerUrl }) => {
|
|
12263
12279
|
setNotificationServerUrl(serverUrlStr);
|
|
12264
12280
|
}).catch((error) => log2("[magic-context] notification transport unavailable:", error));
|
|
12265
12281
|
if (conflictResult?.hasConflict) {
|
|
@@ -12282,7 +12298,7 @@ var server = async (ctx) => {
|
|
|
12282
12298
|
}) => {
|
|
12283
12299
|
if (!shouldShowAnnouncement())
|
|
12284
12300
|
return;
|
|
12285
|
-
return importPluginModule(() => import("./conflict-warning-hook-
|
|
12301
|
+
return importPluginModule(() => import("./conflict-warning-hook-kzx4dmk1.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
|
|
12286
12302
|
}).catch(() => {});
|
|
12287
12303
|
}, 8000);
|
|
12288
12304
|
}
|
|
@@ -12344,6 +12360,7 @@ var server = async (ctx) => {
|
|
|
12344
12360
|
}),
|
|
12345
12361
|
"chat.params": async (input, output) => {
|
|
12346
12362
|
dreamerCap.apply(input, output);
|
|
12363
|
+
applyHiddenSubagentTemperature(input, output, log2);
|
|
12347
12364
|
},
|
|
12348
12365
|
"experimental.chat.messages.transform": createMessagesTransformHandler({
|
|
12349
12366
|
magicContext: magicContextRuntime.magicContext,
|
|
@@ -12355,8 +12372,8 @@ var server = async (ctx) => {
|
|
|
12355
12372
|
tryReopenStorage,
|
|
12356
12373
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12357
12374
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12358
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12359
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12375
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-38cd5dqt.js"));
|
|
12376
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-tck4g20s.js"));
|
|
12360
12377
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12361
12378
|
toastDurationMs: 15000
|
|
12362
12379
|
});
|