@cortexkit/opencode-magic-context 0.49.10 → 0.49.12
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/dist/agents/smart-notes-dreamer-gate.fixture.d.ts +28 -0
- package/dist/agents/smart-notes-dreamer-gate.fixture.d.ts.map +1 -0
- package/dist/{announcement-hdbkt8v5.js → announcement-g789dmt6.js} +2 -2
- package/dist/auto-search-worker.js +4 -4
- package/dist/{compaction-marker-candidates-xxz35vwp.js → compaction-marker-candidates-v5c6997n.js} +3 -3
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/config/agent-disable.d.ts +14 -0
- package/dist/config/agent-disable.d.ts.map +1 -1
- package/dist/config/dependency-notes.d.ts +34 -0
- package/dist/config/dependency-notes.d.ts.map +1 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-w3crzrar.js → conflict-warning-hook-f4x5wed7.js} +8 -8
- package/dist/{context-ey3ap3cc.js → context-dam8p201.js} +306 -119
- package/dist/{derive-budgets-3nbxsyss.js → derive-budgets-5306b1jt.js} +3 -3
- package/dist/embedding-backfill-qbfcbp87.js +21 -0
- package/dist/embedding-worker-process.js +2 -2
- package/dist/embedding-worker.js +6 -6
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +12 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts +22 -4
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +22 -0
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +4 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-openai.d.ts +32 -0
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/project-identity.d.ts +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/unborn-head.d.ts +34 -0
- package/dist/features/magic-context/memory/unborn-head.d.ts.map +1 -0
- package/dist/features/magic-context/memory-enabled.d.ts +5 -0
- package/dist/features/magic-context/memory-enabled.d.ts.map +1 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/search-pool-fixture.d.ts +39 -0
- package/dist/features/magic-context/search-pool-fixture.d.ts.map +1 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +2 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +57 -2
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/{history-owner-ty29fz0f.js → history-owner-xp3pngv7.js} +3 -3
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +6 -0
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +3 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger-error.d.ts +12 -0
- package/dist/hooks/magic-context/compartment-trigger-error.d.ts.map +1 -0
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts +14 -2
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts +2 -0
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -1
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +12 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-exact-ordinal-read.d.ts +58 -0
- package/dist/hooks/magic-context/raw-exact-ordinal-read.d.ts.map +1 -0
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +7 -0
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +5 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +19 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +2 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/render-options.d.ts +21 -0
- package/dist/hooks/magic-context/render-options.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +4 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +2 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +5 -7
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-21919gcq.js → index-05n6ykca.js} +4 -4
- package/dist/{index-q76br5zn.js → index-1d289pq2.js} +26 -21
- package/dist/{index-w28y7d0z.js → index-1sarmj9z.js} +15 -15
- package/dist/{index-x57ep4fp.js → index-1wwh38fk.js} +323 -121
- package/dist/{index-pgy3h49n.js → index-2pgxcncf.js} +4 -4
- package/dist/{index-ffa8x2as.js → index-6sytd5w3.js} +18 -13
- package/dist/{index-16vwdyy5.js → index-6sz25c3s.js} +3 -3
- package/dist/{index-4hb8nt93.js → index-7h8a1xpc.js} +3 -3
- package/dist/{index-rg1cezmj.js → index-7zd5asz9.js} +140 -17
- package/dist/{index-jw4gbfkv.js → index-8ketfacn.js} +2 -2
- package/dist/{index-nenz4gpb.js → index-95s8xaj1.js} +6 -5
- package/dist/{index-bmwfzz28.js → index-9vqb5p1s.js} +4 -4
- package/dist/{index-0jz47061.js → index-a8bvhwqs.js} +190 -30
- package/dist/{index-wpwpn7nj.js → index-b16gpywn.js} +9 -9
- package/dist/{index-g7jkrz0x.js → index-bp5083x2.js} +1 -1
- package/dist/{index-mp2kghkv.js → index-dyvbsvga.js} +1 -1
- package/dist/{index-s178h9z8.js → index-f71thw8j.js} +1 -1
- package/dist/{index-kvw6xew3.js → index-fkx2qnvw.js} +2 -2
- package/dist/{index-f8cn4xqa.js → index-fwefky9w.js} +18 -5
- package/dist/{index-a43xq1pg.js → index-fx90bvjd.js} +5 -5
- package/dist/{index-0sahzkwr.js → index-g2q4htwp.js} +46 -2
- package/dist/{index-7bjgyaj1.js → index-gf0psee3.js} +243 -135
- package/dist/{index-mw7c950g.js → index-gp3kcpc4.js} +1 -1
- package/dist/{index-gjvjh960.js → index-hqkczed7.js} +1 -1
- package/dist/{index-mvvephtj.js → index-j75v2476.js} +1 -1
- package/dist/{index-150zz6fh.js → index-k29z4aqh.js} +1 -1
- package/dist/{index-b64n4d0h.js → index-kee4kn5j.js} +1 -1
- package/dist/index-ksdyrrav.js +52 -0
- package/dist/{index-angx1s0k.js → index-mmfa86mt.js} +16 -6
- package/dist/{index-9jvab89d.js → index-n6m03s3n.js} +2 -2
- package/dist/{index-q28hsbpg.js → index-nj7yykkx.js} +1 -1
- package/dist/{index-ghc9f0n7.js → index-p5y3k4g7.js} +29 -1
- package/dist/{index-6k86es2p.js → index-qtbdx42g.js} +54 -25
- package/dist/{index-a865mj02.js → index-tdn0zkw4.js} +4 -4
- package/dist/{index-0x9cn9w1.js → index-wqs4q74r.js} +8 -8
- package/dist/{index-swgpe402.js → index-x2xjyq8f.js} +11 -11
- package/dist/{index-a4b0gbyg.js → index-y9f76s3f.js} +1 -1
- package/dist/{index-3403gbzj.js → index-yx5kgp2x.js} +288 -127
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +97 -76
- package/dist/{logger-wn328tfg.js → logger-jm3sqqzr.js} +2 -2
- package/dist/{message-index-bounded-fskdyc81.js → message-index-bounded-nq6rp8xa.js} +16 -16
- package/dist/{message-index-6r1x9cqh.js → message-index-df7swgy1.js} +16 -16
- package/dist/{message-time-backfill-nb5hhnrt.js → message-time-backfill-qjge9044.js} +3 -3
- package/dist/migration-worker.js +11 -11
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- 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-vy7sv9jt.js → project-embedding-registry-q0ysjyzc.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +12 -7
- package/dist/{read-session-chunk-zgpvs423.js → read-session-chunk-ax05f7gr.js} +11 -11
- package/dist/{read-session-raw-gm6xj30v.js → read-session-raw-m56hc7v2.js} +7 -3
- package/dist/{recomp-orchestrator-77xc8wpe.js → recomp-orchestrator-a0mvby4e.js} +29 -29
- package/dist/{safe-notification-target-jdynm677.js → safe-notification-target-1szv1k5k.js} +3 -3
- package/dist/{search-72fkjwk2.js → search-fm002702.js} +23 -23
- package/dist/{send-session-notification-q8ngbap3.js → send-session-notification-y2wg3fkh.js} +6 -6
- package/dist/shared/data-path.d.ts +4 -0
- package/dist/shared/data-path.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +5 -0
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- package/dist/{storage-tags-35m4gms2.js → storage-tags-yygfb9c8.js} +7 -5
- package/dist/{task-config-cgpg0nvh.js → task-config-x3qmayd2.js} +6 -2
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-r8d406j0.js → transform-postprocess-phase-s84rdf32.js} +29 -29
- package/dist/v2/auto-search-worker.js +4 -4
- package/dist/v2/{compaction-marker-candidates-a15w3mqh.js → compaction-marker-candidates-1vqwr3s5.js} +2 -2
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{context-z2yagwy4.js → context-x60fa16g.js} +758 -286
- package/dist/v2/{derive-budgets-0rmpmxjw.js → derive-budgets-z25jw3py.js} +3 -3
- package/dist/v2/embedding-backfill-mbjyza2a.js +20 -0
- package/dist/v2/embedding-worker-process.js +1 -1
- package/dist/v2/embedding-worker.js +5 -5
- package/dist/v2/{history-owner-2cr9py37.js → history-owner-42e16w0n.js} +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/dream-manual.d.ts +1 -0
- package/dist/v2/hooks/dream-manual.d.ts.map +1 -1
- package/dist/v2/hooks/dream-timer.d.ts +3 -1
- package/dist/v2/hooks/dream-timer.d.ts.map +1 -1
- package/dist/v2/hooks/dream-trigger.d.ts +6 -1
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts +1 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/transform-decision-binding.d.ts +15 -0
- package/dist/v2/hooks/transform-decision-binding.d.ts.map +1 -0
- package/dist/v2/hooks/transform-features.d.ts +40 -0
- package/dist/v2/hooks/transform-features.d.ts.map +1 -0
- package/dist/v2/{logger-te6e1j72.js → logger-7qt02bnb.js} +1 -1
- package/dist/v2/{message-index-9ezq6wze.js → message-index-5nayhm1r.js} +15 -15
- package/dist/v2/{message-index-bounded-rqc603f2.js → message-index-bounded-pgv1ndpb.js} +15 -15
- package/dist/v2/{message-time-backfill-rz1pnpaj.js → message-time-backfill-bsteyc4d.js} +2 -2
- package/dist/v2/migration-worker.js +10 -10
- package/dist/v2/{project-embedding-registry-ja23aygk.js → project-embedding-registry-jbmjc0p4.js} +12 -10
- package/dist/v2/raw-ordinal-warmup-worker.js +12 -7
- package/dist/v2/{read-session-chunk-7f87tg2q.js → read-session-chunk-hr3w5bjk.js} +10 -10
- package/dist/v2/{read-session-raw-h4azh85b.js → read-session-raw-b3tf6ra1.js} +6 -2
- package/dist/v2/recomp-orchestrator-8w3449eb.js +59 -0
- package/dist/v2/{safe-notification-target-936374xx.js → safe-notification-target-qg7n2s77.js} +2 -2
- package/dist/v2/{search-2td1b1wy.js → search-mhmxgq0e.js} +22 -22
- package/dist/v2/{send-session-notification-6n7chhyp.js → send-session-notification-jevgj9fe.js} +5 -5
- package/dist/v2/{server-npm52h2q.js → server-05xjtq6c.js} +1 -1
- package/dist/v2/{server-s6jqh8bj.js → server-0ppsweh6.js} +1 -1
- package/dist/v2/server-0s95v3en.js +49 -0
- package/dist/v2/{server-2hxypdx5.js → server-25tg45b4.js} +17 -12
- package/dist/v2/{server-44ryn9rb.js → server-2x42esxd.js} +3 -3
- package/dist/v2/{server-4qr18rfg.js → server-37ngj8qw.js} +10 -51
- package/dist/v2/{server-4zwx20yg.js → server-4c10404h.js} +3 -3
- package/dist/v2/{server-23znwjqk.js → server-50mkkhy1.js} +14 -11
- package/dist/v2/{server-c9w52qss.js → server-5gvkzzrf.js} +290 -76
- package/dist/v2/{server-7dv9wt9r.js → server-6pmqg9m4.js} +1 -1
- package/dist/v2/{server-ak7w74j9.js → server-83ygfha2.js} +4 -4
- package/dist/v2/{server-4rs8sm06.js → server-9ewkzqgd.js} +5 -5
- package/dist/v2/{server-kmapq3v0.js → server-bxpwy6fy.js} +18 -5
- package/dist/v2/{server-zrwaj29a.js → server-d8tj10db.js} +25 -20
- package/dist/v2/{server-cxsr0ng6.js → server-da07v4xp.js} +1 -1
- package/dist/v2/{server-9e5r8y60.js → server-f2xf5gcb.js} +46 -2
- package/dist/v2/{server-hn9fb3v0.js → server-f7jfmrrz.js} +2 -2
- package/dist/v2/{server-f27he3j1.js → server-fa75w6gp.js} +4 -4
- package/dist/v2/{server-njnx39q2.js → server-gvkm8xaj.js} +189 -29
- package/dist/v2/{server-ckrb5rm8.js → server-h0410h0v.js} +1 -1
- package/dist/v2/{server-nveratm5.js → server-kn9n2qgd.js} +1 -1
- package/dist/v2/{server-gc8x2xdb.js → server-m97brnat.js} +9 -9
- package/dist/v2/{server-z0rjemg1.js → server-nmrm2rjy.js} +8 -8
- package/dist/v2/{server-bx59ezg6.js → server-prg55b7k.js} +16 -6
- package/dist/v2/{server-89fcbe37.js → server-pwv4ezb0.js} +1 -1
- package/dist/v2/{server-r5p3b1wy.js → server-qd11g795.js} +29 -1
- package/dist/v2/{server-988cqjme.js → server-rrqpvwqd.js} +2 -2
- package/dist/v2/{server-4easnf78.js → server-sz8jj92q.js} +150 -18
- package/dist/v2/{server-7e087rvk.js → server-th4y11y7.js} +16 -16
- package/dist/v2/{server-9a6bwc12.js → server-vknbt0gq.js} +255 -135
- package/dist/v2/{server-63ha7f0f.js → server-yrvqaswb.js} +1 -1
- package/dist/v2/{server-xqf2d2mg.js → server-zs8d0s3b.js} +2 -2
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +13 -6
- package/dist/v2/{storage-tags-c4zfcxv4.js → storage-tags-a2gq6dw7.js} +6 -4
- package/dist/v2/store-reader.d.ts +4 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{task-config-x0hq3qfd.js → task-config-nvz8mapa.js} +6 -2
- package/dist/v2/{wrapup-orchestrator-wg8dmmm9.js → wrapup-orchestrator-r82y780v.js} +30 -29
- package/dist/wrapup-orchestrator-vmt6z3q5.js +47 -0
- package/package.json +1 -1
- package/src/agents/smart-notes-dreamer-gate.fixture.ts +171 -0
- package/src/agents/smart-notes-dreamer-gate.golden.json +245 -0
- package/src/agents/smart-notes-dreamer-gate.test.ts +161 -0
- package/src/config/agent-disable.ts +13 -0
- package/src/config/dependency-notes.test.ts +114 -0
- package/src/config/dependency-notes.ts +80 -0
- package/src/config/schema/magic-context.ts +23 -14
- package/src/features/magic-context/dreamer/task-registry.ts +40 -0
- package/src/shared/chunk-vector-writer-guard.test.ts +72 -0
- package/src/shared/data-path.test.ts +35 -1
- package/src/shared/data-path.ts +57 -1
- package/src/shared/prompt-surface-runtime.test.ts +15 -0
- package/src/shared/prompt-surface-runtime.ts +12 -0
- package/dist/embedding-backfill-3h2m5n0q.js +0 -21
- package/dist/v2/embedding-backfill-vr7wdtrf.js +0 -20
- package/dist/v2/recomp-orchestrator-s5tdpsbs.js +0 -59
- package/dist/wrapup-orchestrator-b1z99yg5.js +0 -47
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./index-v0p37hm2.js";
|
|
9
9
|
import {
|
|
10
10
|
log2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-j75v2476.js";
|
|
12
12
|
|
|
13
13
|
// src/hooks/magic-context/read-session-raw.ts
|
|
14
14
|
import { isMainThread } from "node:worker_threads";
|
|
@@ -91,6 +91,8 @@ function runSessionWarmupWorker(input, options) {
|
|
|
91
91
|
finish({ inserted: reply.inserted, measurements: reply.measurements });
|
|
92
92
|
else if (reply.kind === "orphan-sweep")
|
|
93
93
|
finish({ orphanSweep: reply.result });
|
|
94
|
+
else if (reply.kind === "exact-ordinal-ids")
|
|
95
|
+
finish({ exactOrdinalIds: reply.ids });
|
|
94
96
|
else
|
|
95
97
|
finish({ failure: "worker-error", detail: reply.error });
|
|
96
98
|
});
|
|
@@ -316,7 +318,7 @@ function readRawMessagePageRows(db, sessionId, afterOrdinal, limit, finalWaterma
|
|
|
316
318
|
const skip = anchor === after && after ? 0 : ordinal - (floor?.ordinal ?? 0);
|
|
317
319
|
if (skip > ORDINAL_LOOKUP_LIMIT) {
|
|
318
320
|
prewarmRawSessionOrdinalsForDb(db, sessionId);
|
|
319
|
-
throw new
|
|
321
|
+
throw new RawOrdinalsNotReady2;
|
|
320
322
|
}
|
|
321
323
|
const rawLimit = skip + pageSize + ORDINAL_LOOKUP_LIMIT;
|
|
322
324
|
const rows = db.prepare(`SELECT id, data, time_created, time_updated, ${EXCLUDED_ROW_SQL} AS excluded
|
|
@@ -329,7 +331,7 @@ function readRawMessagePageRows(db, sessionId, afterOrdinal, limit, finalWaterma
|
|
|
329
331
|
const eligible = rows.filter((row) => row.excluded !== 1);
|
|
330
332
|
if (eligible.length <= skip && rows.length === rawLimit) {
|
|
331
333
|
prewarmRawSessionOrdinalsForDb(db, sessionId);
|
|
332
|
-
throw new
|
|
334
|
+
throw new RawOrdinalsNotReady2;
|
|
333
335
|
}
|
|
334
336
|
return eligible.slice(skip, skip + pageSize).filter(isRawMessageRow).map((row, index) => ({
|
|
335
337
|
...row,
|
|
@@ -417,11 +419,13 @@ function countRawSessionMessageOrdinalsFromDb2(db, sessionId) {
|
|
|
417
419
|
)`).get(sessionId);
|
|
418
420
|
return typeof row?.count === "number" ? row.count : 0;
|
|
419
421
|
}
|
|
422
|
+
var exactOrdinalScansOnThisThread = 0;
|
|
420
423
|
function readRawSessionMessageIdOrdinalsForRangeFromDb2(db, sessionId, fromOrdinal, toOrdinal) {
|
|
421
424
|
const from = Math.max(1, Math.floor(fromOrdinal));
|
|
422
425
|
const to = Math.floor(toOrdinal);
|
|
423
426
|
if (to < from)
|
|
424
427
|
return new Map;
|
|
428
|
+
exactOrdinalScansOnThisThread += 1;
|
|
425
429
|
const rows = db.prepare(`
|
|
426
430
|
SELECT id, data FROM message WHERE session_id = ?
|
|
427
431
|
AND CASE WHEN json_valid(data) THEN NOT (
|
|
@@ -437,6 +441,12 @@ function readRawSessionMessageIdOrdinalsForRangeFromDb2(db, sessionId, fromOrdin
|
|
|
437
441
|
}
|
|
438
442
|
return result;
|
|
439
443
|
}
|
|
444
|
+
function readRawSessionMessageIdsAtOrdinalsFromDb2(db, sessionId, ordinals) {
|
|
445
|
+
return withReadSnapshot(db, () => ordinals.map((ordinal) => [
|
|
446
|
+
ordinal,
|
|
447
|
+
readRawSessionMessageIdOrdinalsForRangeFromDb2(db, sessionId, ordinal, ordinal).keys().next().value ?? null
|
|
448
|
+
]));
|
|
449
|
+
}
|
|
440
450
|
function readRawSessionMessageOrdinalPageFromDb2(db, sessionId, after, limit) {
|
|
441
451
|
const pageSize = Math.max(1, Math.floor(limit));
|
|
442
452
|
const rows = (after ? db.prepare(`SELECT id, data, time_created
|
|
@@ -745,7 +755,7 @@ function extendOrdinalCheckpoints(db, sessionId, scan, limit) {
|
|
|
745
755
|
return true;
|
|
746
756
|
}
|
|
747
757
|
|
|
748
|
-
class
|
|
758
|
+
class RawOrdinalsNotReady2 extends Error {
|
|
749
759
|
constructor() {
|
|
750
760
|
super("canonical ordinals are warming off-thread; retry after preparation");
|
|
751
761
|
}
|
|
@@ -794,7 +804,7 @@ function boundedOrdinalPrefix(db, sessionId, through) {
|
|
|
794
804
|
ordinalJsonRowsRead += rows.length;
|
|
795
805
|
if (rows.length > ORDINAL_LOOKUP_LIMIT) {
|
|
796
806
|
prewarmRawSessionOrdinalsForDb(db, sessionId);
|
|
797
|
-
throw new
|
|
807
|
+
throw new RawOrdinalsNotReady2;
|
|
798
808
|
}
|
|
799
809
|
return (floor?.ordinal ?? 0) + rows.reduce((sum, row) => sum + (row.excluded === 1 ? 0 : 1), 0);
|
|
800
810
|
}
|
|
@@ -1257,4 +1267,4 @@ function readRawSessionBoundaryEndpointsFromDb2(db, sessionId, ids, blockIds = [
|
|
|
1257
1267
|
}
|
|
1258
1268
|
}
|
|
1259
1269
|
|
|
1260
|
-
export { isStrictGapHealingMessage2, isRawCompactionSummaryInfo2, readRawSessionMessagesFromDb2, readRawSessionMessagePageFromDb2, readRawSessionMessageSummaryPageFromDb2, countRawSessionMessageOrdinalsFromDb2, readRawSessionMessageIdOrdinalsForRangeFromDb2, readRawSessionMessageOrdinalPageFromDb2, countStoredRawSessionMessagesFromDb2, readRawSessionTailFromDb2, extractInMemoryMessageViews2, buildInMemoryTailRawMessages2, readRawSessionMessagePartsByIdFromDb2, forgetRawSessionOrdinalWatermark2, forgetRawSessionSummaryRows2, noteRawSessionSummaryRowWritten2, rawOrdinalSummarySeed2, scanRawSessionSummaryRows2, getRawSessionSummaryEpoch2, installRawSessionSummaryScan2, isRawSessionSummaryWarm2, readRawSessionMessageOrdinalByIdFromDb2, readRawSessionMessageByIdFromDb2, hasRawSessionMessageByIdFromDb2, readRawSeedTailFromDb2, readRawSessionBoundaryEndpointsFromDb2, runSessionWarmupWorker, prewarmRawSessionOrdinalsForDb };
|
|
1270
|
+
export { isStrictGapHealingMessage2, isRawCompactionSummaryInfo2, readRawSessionMessagesFromDb2, readRawSessionMessagePageFromDb2, readRawSessionMessageSummaryPageFromDb2, countRawSessionMessageOrdinalsFromDb2, readRawSessionMessageIdOrdinalsForRangeFromDb2, readRawSessionMessageIdsAtOrdinalsFromDb2, readRawSessionMessageOrdinalPageFromDb2, countStoredRawSessionMessagesFromDb2, readRawSessionTailFromDb2, extractInMemoryMessageViews2, buildInMemoryTailRawMessages2, readRawSessionMessagePartsByIdFromDb2, forgetRawSessionOrdinalWatermark2, forgetRawSessionSummaryRows2, noteRawSessionSummaryRowWritten2, RawOrdinalsNotReady2, rawOrdinalSummarySeed2, scanRawSessionSummaryRows2, getRawSessionSummaryEpoch2, installRawSessionSummaryScan2, isRawSessionSummaryWarm2, readRawSessionMessageOrdinalByIdFromDb2, readRawSessionMessageByIdFromDb2, hasRawSessionMessageByIdFromDb2, readRawSeedTailFromDb2, readRawSessionBoundaryEndpointsFromDb2, runSessionWarmupWorker, prewarmRawSessionOrdinalsForDb };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-hqkczed7.js";
|
|
4
4
|
import {
|
|
5
5
|
stableStringify
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-bp5083x2.js";
|
|
7
7
|
|
|
8
8
|
// src/features/magic-context/tool-definition-tokens.ts
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDreamerTaskModel2
|
|
3
3
|
} from "./index-8cd2j99z.js";
|
|
4
|
+
import {
|
|
5
|
+
isDreamerRunnable
|
|
6
|
+
} from "./index-ksdyrrav.js";
|
|
4
7
|
|
|
5
8
|
// src/features/magic-context/dreamer/task-registry.ts
|
|
6
9
|
var CANONICAL_DREAM_TASKS = [
|
|
@@ -124,6 +127,25 @@ var MEMORY_DOMAIN_TASKS = [
|
|
|
124
127
|
"refresh-primers"
|
|
125
128
|
];
|
|
126
129
|
var MEMORY_DOMAIN_SET = new Set(MEMORY_DOMAIN_TASKS);
|
|
130
|
+
var PROJECT_MEMORY_DREAM_TASKS = [
|
|
131
|
+
"map-memories",
|
|
132
|
+
"verify",
|
|
133
|
+
"verify-broad",
|
|
134
|
+
"curate",
|
|
135
|
+
"compress-cues",
|
|
136
|
+
"classify-memories",
|
|
137
|
+
"retrospective",
|
|
138
|
+
"promote-primers",
|
|
139
|
+
"refresh-primers"
|
|
140
|
+
];
|
|
141
|
+
var PROJECT_MEMORY_DREAM_TASK_SET = new Set(PROJECT_MEMORY_DREAM_TASKS);
|
|
142
|
+
function dreamTaskAllowedBySettings(task, settings) {
|
|
143
|
+
if (PROJECT_MEMORY_DREAM_TASK_SET.has(task))
|
|
144
|
+
return settings.projectMemoryEnabled !== false;
|
|
145
|
+
if (task === "evaluate-smart-notes")
|
|
146
|
+
return settings.smartNotesEnabled !== false;
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
127
149
|
function leaseKindFor(task) {
|
|
128
150
|
if (MEMORY_DOMAIN_SET.has(task))
|
|
129
151
|
return "memory";
|
|
@@ -179,6 +201,12 @@ function userMemoryCollectionEnabled2(dreamer) {
|
|
|
179
201
|
const schedule = dreamer?.tasks?.["review-user-memories"]?.schedule;
|
|
180
202
|
return typeof schedule === "string" && schedule.trim() !== "";
|
|
181
203
|
}
|
|
204
|
+
function userObservationCollectionEnabled2(dreamer) {
|
|
205
|
+
return userObservationsRequested2(dreamer) && userMemoryCollectionEnabled2(dreamer);
|
|
206
|
+
}
|
|
207
|
+
function userObservationsRequested2(dreamer) {
|
|
208
|
+
return isDreamerRunnable({ dreamer });
|
|
209
|
+
}
|
|
182
210
|
function userMemoryPromotionThreshold2(dreamer) {
|
|
183
211
|
return dreamer?.tasks?.["review-user-memories"]?.promotion_threshold ?? 3;
|
|
184
212
|
}
|
|
@@ -198,4 +226,4 @@ function summarizeDreamSchedule2(dreamer, smartNotesEnabled = true) {
|
|
|
198
226
|
return enabled.map((t) => `${t} ${dreamer?.tasks[t]?.schedule}`).join(", ");
|
|
199
227
|
}
|
|
200
228
|
|
|
201
|
-
export { CANONICAL_DREAM_TASKS, DREAM_TASK_CAPABILITIES, toolLoopDreamTasks, formatUnsupportedDreamTasks, formatDreamTaskBacklogs, formatDreamTaskFailures, processedDreamTaskItems, leaseKindFor, leaseKeyFor, isCanonicalDreamTask, compareTaskOrder, buildDreamTaskRuntimeConfigs2, userMemoryCollectionEnabled2, userMemoryPromotionThreshold2, dreamTaskScheduled2, enabledDreamTasks2, summarizeDreamSchedule2 };
|
|
229
|
+
export { CANONICAL_DREAM_TASKS, DREAM_TASK_CAPABILITIES, toolLoopDreamTasks, formatUnsupportedDreamTasks, formatDreamTaskBacklogs, formatDreamTaskFailures, processedDreamTaskItems, PROJECT_MEMORY_DREAM_TASKS, dreamTaskAllowedBySettings, leaseKindFor, leaseKeyFor, isCanonicalDreamTask, compareTaskOrder, buildDreamTaskRuntimeConfigs2, userMemoryCollectionEnabled2, userObservationCollectionEnabled2, userObservationsRequested2, userMemoryPromotionThreshold2, dreamTaskScheduled2, enabledDreamTasks2, summarizeDreamSchedule2 };
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getTemporalDecisions,
|
|
7
7
|
freezeTemporalDecisions,
|
|
8
8
|
stableStringify
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-bp5083x2.js";
|
|
10
10
|
import {
|
|
11
11
|
protectedToolTagNumbers,
|
|
12
12
|
byteSize,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
backfillTagTokenCounts2,
|
|
48
48
|
insertTag2,
|
|
49
49
|
updateTagStatus2,
|
|
50
|
+
markTagDropped2,
|
|
50
51
|
markWhitespaceAssistantTagInert2,
|
|
51
52
|
getInertWhitespaceAssistantTags2,
|
|
52
53
|
updateTagDropMode2,
|
|
@@ -69,16 +70,16 @@ import {
|
|
|
69
70
|
adoptNullOwnerToolTag2,
|
|
70
71
|
getCandidateToolOwners2,
|
|
71
72
|
pickNearestPriorOwner2
|
|
72
|
-
} from "./index-
|
|
73
|
+
} from "./index-fwefky9w.js";
|
|
73
74
|
import {
|
|
74
75
|
textMentionsRecentCommit,
|
|
75
76
|
hasMeaningfulUserText2,
|
|
76
77
|
estimateTokens
|
|
77
|
-
} from "./index-
|
|
78
|
+
} from "./index-hqkczed7.js";
|
|
78
79
|
import {
|
|
79
80
|
log2,
|
|
80
81
|
sessionLog2
|
|
81
|
-
} from "./index-
|
|
82
|
+
} from "./index-j75v2476.js";
|
|
82
83
|
import {
|
|
83
84
|
inRootAsyncContext2,
|
|
84
85
|
getTagIdentityWriteGeneration2,
|
|
@@ -88,12 +89,12 @@ import {
|
|
|
88
89
|
} from "./index-wafzvyhg.js";
|
|
89
90
|
import {
|
|
90
91
|
isValidLanguageCode
|
|
91
|
-
} from "./index-
|
|
92
|
+
} from "./index-1sarmj9z.js";
|
|
92
93
|
import {
|
|
93
94
|
getProjectEmbeddingSnapshot2,
|
|
94
95
|
embedTextForProject2,
|
|
95
96
|
embedBatchForProject2
|
|
96
|
-
} from "./index-
|
|
97
|
+
} from "./index-7zd5asz9.js";
|
|
97
98
|
import {
|
|
98
99
|
isEmbeddingHostBusy2
|
|
99
100
|
} from "./index-qt1qqasc.js";
|
|
@@ -189,7 +190,7 @@ import {
|
|
|
189
190
|
extractToolCallObservation,
|
|
190
191
|
ToolMutationBatch,
|
|
191
192
|
createToolDropTarget
|
|
192
|
-
} from "./index-
|
|
193
|
+
} from "./index-b16gpywn.js";
|
|
193
194
|
import {
|
|
194
195
|
getMaxM0MutationId,
|
|
195
196
|
rememberUnpublishedAutoSearchNoHint,
|
|
@@ -201,6 +202,7 @@ import {
|
|
|
201
202
|
advanceToolReclaimWatermark,
|
|
202
203
|
requestPendingMaterialization,
|
|
203
204
|
pendingMaterializationOrigin,
|
|
205
|
+
hasPendingMaterializationOrigin,
|
|
204
206
|
clearPendingMaterialization,
|
|
205
207
|
saveSourceContent,
|
|
206
208
|
replaceSourceContent,
|
|
@@ -223,21 +225,21 @@ import {
|
|
|
223
225
|
peekNoteNudgeText,
|
|
224
226
|
markNoteNudgeDelivered,
|
|
225
227
|
getActiveCompartmentRun
|
|
226
|
-
} from "./index-
|
|
228
|
+
} from "./index-yx5kgp2x.js";
|
|
227
229
|
import {
|
|
228
230
|
runSessionWarmupWorker
|
|
229
|
-
} from "./index-
|
|
231
|
+
} from "./index-mmfa86mt.js";
|
|
230
232
|
import {
|
|
231
233
|
openCodeDbExists,
|
|
232
234
|
withReadOnlySessionDb,
|
|
233
235
|
getMessageTimesFromOpenCodeDb
|
|
234
|
-
} from "./index-
|
|
236
|
+
} from "./index-1d289pq2.js";
|
|
235
237
|
import {
|
|
236
238
|
BoundedSessionMap
|
|
237
|
-
} from "./index-
|
|
239
|
+
} from "./index-wqs4q74r.js";
|
|
238
240
|
import {
|
|
239
241
|
renderUserFacingFailure
|
|
240
|
-
} from "./index-
|
|
242
|
+
} from "./index-6sz25c3s.js";
|
|
241
243
|
import {
|
|
242
244
|
getErrorMessage
|
|
243
245
|
} from "./index-y8v6yerm.js";
|
|
@@ -247,7 +249,7 @@ import {
|
|
|
247
249
|
} from "./index-d9vfe7xq.js";
|
|
248
250
|
import {
|
|
249
251
|
logSlowWriteTransaction
|
|
250
|
-
} from "./index-
|
|
252
|
+
} from "./index-k29z4aqh.js";
|
|
251
253
|
|
|
252
254
|
// src/features/magic-context/tagger.ts
|
|
253
255
|
var TOOL_COMPOSITE_KEY_SEP = "\x00";
|
|
@@ -2829,13 +2831,20 @@ function foldBustsServedPrefix(reason, before, after) {
|
|
|
2829
2831
|
return CACHE_LOSING_FOLD_REASONS.has(reason ?? "") || foldChangesServedPrefix(before, after);
|
|
2830
2832
|
}
|
|
2831
2833
|
function prepareLegacyToolSkeletonConversions(db, sessionId, targets, options = {}) {
|
|
2832
|
-
const
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2834
|
+
const candidates = [...targets.keys()].sort((a, b) => a - b);
|
|
2835
|
+
const readRows = (connection) => {
|
|
2836
|
+
if (candidates.length === 0)
|
|
2837
|
+
return [];
|
|
2838
|
+
const statement = connection.prepare(`SELECT tag_number AS tagNumber, drop_mode AS dropMode, message_id AS callId
|
|
2839
|
+
FROM tags WHERE session_id = ? AND tag_number = ?
|
|
2840
|
+
AND type = 'tool' AND status = 'dropped'
|
|
2841
|
+
AND drop_mode IN ('truncated', 'full')`);
|
|
2842
|
+
return candidates.flatMap((tagNumber) => {
|
|
2843
|
+
const row = statement.get(sessionId, tagNumber);
|
|
2844
|
+
return row ? [row] : [];
|
|
2845
|
+
});
|
|
2846
|
+
};
|
|
2837
2847
|
const rows = readRows(db);
|
|
2838
|
-
const identity = JSON.stringify(rows);
|
|
2839
2848
|
const converted = new Map;
|
|
2840
2849
|
for (const row of rows) {
|
|
2841
2850
|
const target = targets.get(row.tagNumber);
|
|
@@ -2856,7 +2865,10 @@ function prepareLegacyToolSkeletonConversions(db, sessionId, targets, options =
|
|
|
2856
2865
|
}
|
|
2857
2866
|
return {
|
|
2858
2867
|
converted,
|
|
2859
|
-
isCurrent: (connection) =>
|
|
2868
|
+
isCurrent: (connection) => {
|
|
2869
|
+
const current = readRows(connection);
|
|
2870
|
+
return current.length === rows.length && current.every((row, index) => row.tagNumber === rows[index].tagNumber && row.dropMode === rows[index].dropMode && row.callId === rows[index].callId);
|
|
2871
|
+
},
|
|
2860
2872
|
persist: (connection) => {
|
|
2861
2873
|
for (const [tagNumber, mode] of converted)
|
|
2862
2874
|
updateTagDropMode2(connection, sessionId, tagNumber, mode);
|
|
@@ -2943,9 +2955,7 @@ function applyPendingOperations(sessionId, db, targets, protectedTagIds, preload
|
|
|
2943
2955
|
try {
|
|
2944
2956
|
db.transaction(() => {
|
|
2945
2957
|
startedAt = performance.now();
|
|
2946
|
-
|
|
2947
|
-
updateTagDropMode2(db, sessionId, pendingOp.tagId, mode);
|
|
2948
|
-
updateTagStatus2(db, sessionId, pendingOp.tagId, "dropped");
|
|
2958
|
+
markTagDropped2(db, sessionId, pendingOp.tagId, mode);
|
|
2949
2959
|
if (!synthetic)
|
|
2950
2960
|
removePendingOp(db, sessionId, pendingOp.tagId);
|
|
2951
2961
|
}).immediate();
|
|
@@ -5279,6 +5289,25 @@ function finalizeMessageRepresentation2(messages, resolvedProviderID, options) {
|
|
|
5279
5289
|
}
|
|
5280
5290
|
return { clearedParts, mergedReasoningParts };
|
|
5281
5291
|
}
|
|
5292
|
+
function legacyPublishedHeadChanged(args) {
|
|
5293
|
+
if (!args.pendingCompartmentInjection || !args.readLastServedMessages)
|
|
5294
|
+
return false;
|
|
5295
|
+
const served = args.readLastServedMessages();
|
|
5296
|
+
if (served === null)
|
|
5297
|
+
return true;
|
|
5298
|
+
const previous = served[0];
|
|
5299
|
+
if (!Array.isArray(previous?.parts) || !args.pendingCompartmentInjection)
|
|
5300
|
+
return false;
|
|
5301
|
+
const text = previous.parts.find((part) => typeof part === "object" && part !== null && ("type" in part) && part.type === "text" && ("text" in part))?.text;
|
|
5302
|
+
if (typeof text !== "string")
|
|
5303
|
+
return false;
|
|
5304
|
+
const block = `<session-history>
|
|
5305
|
+
${args.pendingCompartmentInjection.block}
|
|
5306
|
+
</session-history>`;
|
|
5307
|
+
return text !== block && !text.startsWith(`${block}
|
|
5308
|
+
|
|
5309
|
+
`);
|
|
5310
|
+
}
|
|
5282
5311
|
async function runPostTransformPhase2(args) {
|
|
5283
5312
|
const tPostprocessSetup = performance.now();
|
|
5284
5313
|
const compactionOff = args.compactionOff === true;
|
|
@@ -5520,8 +5549,8 @@ async function runPostTransformPhase2(args) {
|
|
|
5520
5549
|
subagentExecute: !args.fullFeatureMode && args.schedulerDecision === "execute",
|
|
5521
5550
|
hardFold: foldBustsServedPrefixThisPass || firstRenderBust || idleExpiryRebuild,
|
|
5522
5551
|
force: emergencyDropEligible && (args.contextUsage.percentage >= 95 || getEmergencyInputSample(args.db, args.sessionId) === 0),
|
|
5523
|
-
explicitFlush: isExplicitFlush
|
|
5524
|
-
publishedHistory: publishedM1RefreshedThisPass || !m0M1EnabledForFold && (args.pendingCompartmentInjection?.compartmentCount ?? 0) > 0 && (args
|
|
5552
|
+
explicitFlush: isExplicitFlush && hasPendingMaterializationOrigin(args.pendingMaterializationSessions, args.sessionId, "user_flush"),
|
|
5553
|
+
publishedHistory: !prefixPreflightFailed && (publishedM1RefreshedThisPass || !m0M1EnabledForFold && (args.pendingCompartmentInjection?.compartmentCount ?? 0) > 0 && legacyPublishedHeadChanged(args))
|
|
5525
5554
|
};
|
|
5526
5555
|
const publishedWorkDrainAllowed = !compactionOff && (!activeThinkingPrefixHold || firstRenderBust || idleExpiryRebuild || emergencyDropEligible) && hasReclaimRide(rideSignals);
|
|
5527
5556
|
const shouldApplyPendingOps = publishedWorkDrainAllowed;
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-fr0wbhdn.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-j75v2476.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureColumn,
|
|
9
9
|
healAllNullColumns,
|
|
10
10
|
installV95PerfSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-bp5083x2.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveOpenCodeDbPath,
|
|
14
14
|
openCodeDbPathExists,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
normalizeStoredProjectPath,
|
|
22
22
|
storedPathBelongsToIdentity
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-a8bvhwqs.js";
|
|
24
24
|
import {
|
|
25
25
|
logSlowWriteTransaction
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-k29z4aqh.js";
|
|
27
27
|
|
|
28
28
|
// src/features/magic-context/lkg-prefix-chunks.ts
|
|
29
29
|
import { createHash } from "node:crypto";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
tagRevisionKey,
|
|
6
6
|
tagIdentityRevisionKey,
|
|
7
7
|
deleteTagIdentityRevisions
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-bp5083x2.js";
|
|
9
9
|
import {
|
|
10
10
|
getHarness2
|
|
11
11
|
} from "./index-pavzsdc6.js";
|
|
@@ -13,30 +13,30 @@ import {
|
|
|
13
13
|
removeSystemReminders,
|
|
14
14
|
hasMeaningfulUserText2,
|
|
15
15
|
extractTexts2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-hqkczed7.js";
|
|
17
17
|
import {
|
|
18
18
|
getMagicContextStorageDir
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-g2q4htwp.js";
|
|
20
20
|
import {
|
|
21
21
|
withSqliteBackgroundWriter2,
|
|
22
22
|
withoutSqliteTransformPass2
|
|
23
23
|
} from "./index-wafzvyhg.js";
|
|
24
24
|
import {
|
|
25
25
|
cleanUserText2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-b16gpywn.js";
|
|
27
27
|
import {
|
|
28
28
|
recordMessageFtsRowid,
|
|
29
29
|
recordIndexedMessageTime,
|
|
30
30
|
messageFtsOrdinalRangeIsMapped,
|
|
31
31
|
deleteUnmappedMessageFtsRows
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-dyvbsvga.js";
|
|
33
33
|
import {
|
|
34
34
|
isPidAlive,
|
|
35
35
|
readProcessStartTime
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-nj7yykkx.js";
|
|
37
37
|
import {
|
|
38
38
|
deleteChunkEmbedBackoffForSession
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-gf0psee3.js";
|
|
40
40
|
import {
|
|
41
41
|
ensurePrivateStorageDirectorySync,
|
|
42
42
|
writeStorageFileSync,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from "./index-8ajstryz.js";
|
|
50
50
|
import {
|
|
51
51
|
logSlowWriteTransaction
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-k29z4aqh.js";
|
|
53
53
|
|
|
54
54
|
// src/shared/bounded-session-map.ts
|
|
55
55
|
class BoundedSessionMap {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
importPluginModule,
|
|
4
4
|
writeForwardedLogLine2,
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-j75v2476.js";
|
|
7
7
|
import {
|
|
8
8
|
inRootAsyncContext2,
|
|
9
9
|
registerSlowWriteReporter2,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
bootQuietRemainingMs,
|
|
20
20
|
scheduleAfterBootQuiet
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-a8bvhwqs.js";
|
|
22
22
|
import {
|
|
23
23
|
getHarness2,
|
|
24
24
|
harnessOwnsOpenCodeStore2
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
getMagicContextStorageDir,
|
|
28
28
|
getLegacyOpenCodeMagicContextStorageDir
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-g2q4htwp.js";
|
|
30
30
|
import {
|
|
31
31
|
isOwnRpcServerRecord,
|
|
32
32
|
isPidAlive,
|
|
@@ -37,13 +37,13 @@ import {
|
|
|
37
37
|
parseRpcPortFile,
|
|
38
38
|
inspectProcessesAsync,
|
|
39
39
|
inspectWindowsProcessesSync
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-nj7yykkx.js";
|
|
41
41
|
import {
|
|
42
42
|
configureContextDatabasePragmas2
|
|
43
43
|
} from "./index-fb3zxn06.js";
|
|
44
44
|
import {
|
|
45
45
|
startMessageFtsRowidMapBackfill
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-dyvbsvga.js";
|
|
47
47
|
import {
|
|
48
48
|
LKG_SLOT_CHUNKS_DDL,
|
|
49
49
|
SESSION_REPLAY_DECISIONS_DDL,
|
|
@@ -53,12 +53,12 @@ import {
|
|
|
53
53
|
hasPendingMigrations,
|
|
54
54
|
getMainThreadMigrationBodyCount,
|
|
55
55
|
runMigrations
|
|
56
|
-
} from "./index-
|
|
56
|
+
} from "./index-tdn0zkw4.js";
|
|
57
57
|
import {
|
|
58
58
|
installTagIdentityRevisionTrigger,
|
|
59
59
|
ensureColumn,
|
|
60
60
|
installV95PerfSchema
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-bp5083x2.js";
|
|
62
62
|
import {
|
|
63
63
|
resolveOpenCodeDbPath,
|
|
64
64
|
hasV1MessageTables
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
import {
|
|
67
67
|
setDatabase,
|
|
68
68
|
loadToolDefinitionMeasurements
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-n6m03s3n.js";
|
|
70
70
|
import {
|
|
71
71
|
getErrorMessage
|
|
72
72
|
} from "./index-y8v6yerm.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
} from "./index-8ajstryz.js";
|
|
84
84
|
import {
|
|
85
85
|
logSlowWriteTransaction
|
|
86
|
-
} from "./index-
|
|
86
|
+
} from "./index-k29z4aqh.js";
|
|
87
87
|
|
|
88
88
|
// src/features/magic-context/fail-closed-block.ts
|
|
89
89
|
var FAIL_CLOSED_DOCTOR_COMMAND = "npx @cortexkit/magic-context@latest doctor";
|
|
@@ -1270,8 +1270,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1270
1270
|
startMessageFtsRowidMapBackfill(db).then(async () => {
|
|
1271
1271
|
if (!readsOpenCodeStore)
|
|
1272
1272
|
return;
|
|
1273
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1274
|
-
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-
|
|
1273
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-ax05f7gr.js"));
|
|
1274
|
+
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-qjge9044.js"));
|
|
1275
1275
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|
|
1276
1276
|
readPage: readRawSessionMessagePage
|
|
1277
1277
|
}));
|