@cortexkit/opencode-magic-context 0.49.19 → 0.49.21
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 +48 -9
- package/dist/chunk-embedding-write-worker.js +30 -23
- package/dist/{compaction-marker-candidates-n4krhat4.js → compaction-marker-candidates-31h86ph0.js} +3 -3
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/compartment-chunk-embedding-he60aaa2.js +65 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +43 -9
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-4pmz879v.js → conflict-warning-hook-2r32hyx6.js} +9 -8
- package/dist/{context-j31m2dv7.js → context-j7hp43a0.js} +576 -185
- package/dist/{derive-budgets-zn7yzd2d.js → derive-budgets-pqybnx09.js} +2 -2
- package/dist/embedding-backfill-dtke6tck.js +25 -0
- package/dist/embedding-worker-process.js +2 -2
- package/dist/embedding-worker.js +6 -6
- package/dist/features/magic-context/chunk-embedding-writer.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +44 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts +1 -0
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +2 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-synapse.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +7 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/memory/local-embedding-pooling.d.ts +22 -0
- package/dist/features/magic-context/memory/local-embedding-pooling.d.ts.map +1 -0
- package/dist/features/magic-context/message-index-async.d.ts +7 -2
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +2 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +2 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/search-rerank.d.ts +9 -2
- package/dist/features/magic-context/search-rerank.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +29 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +2 -0
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +2 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/subagent-token-capture.d.ts +20 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/{history-owner-xp3pngv7.js → history-owner-36wp3mkb.js} +2 -2
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-embed-session.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-hint.d.ts +7 -1
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +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 +33 -6
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +6 -2
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +5 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts +4 -0
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts.map +1 -0
- package/dist/hooks/magic-context/execute-reclaim.d.ts +35 -0
- package/dist/hooks/magic-context/execute-reclaim.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +1 -3
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts +8 -0
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +5 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts +3 -0
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts.map +1 -0
- package/dist/hooks/magic-context/pending-drop-eligibility.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +4 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/served-shape-repair.d.ts +19 -0
- package/dist/hooks/magic-context/served-shape-repair.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +4 -2
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +5 -5
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts +10 -0
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-content-primitives.d.ts +1 -1
- package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +4 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/text-complete.d.ts +1 -1
- package/dist/hooks/magic-context/text-complete.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +21 -6
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +2 -2
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-3esx8tkf.js → index-11gzxvf4.js} +394 -125
- package/dist/{index-jn12fvvh.js → index-1gtfne2c.js} +3 -3
- package/dist/{index-jhghdnsm.js → index-1kbznkft.js} +521 -214
- package/dist/{index-3h4dp9wb.js → index-3svaejkh.js} +5 -5
- package/dist/{index-kee4kn5j.js → index-4pnsgvfk.js} +1 -1
- package/dist/{index-bjcnntmz.js → index-51rdvtkz.js} +501 -20
- package/dist/{v2/server-8cd2j99z.js → index-5kym00ag.js} +32 -13
- package/dist/{index-s74zqahq.js → index-66eby7hx.js} +4 -4
- package/dist/{index-63k48rv9.js → index-9q1g3c5q.js} +5 -5
- package/dist/{index-jrr131e0.js → index-a9zvn5fe.js} +29 -15
- package/dist/{index-c5pytzne.js → index-b88dwwrh.js} +1 -1
- package/dist/{index-nj7yykkx.js → index-c7phnbvk.js} +1 -1
- package/dist/index-cpjk5jd2.js +82 -0
- package/dist/{index-c1p88z1y.js → index-ffzhwfzy.js} +4 -4
- package/dist/{v2/server-beht37jy.js → index-gzy5w8ya.js} +194 -5
- package/dist/{index-j75v2476.js → index-h7tgn49j.js} +12 -15
- package/dist/{index-edmpdxcw.js → index-j32jj2t8.js} +5 -5
- package/dist/{index-ke416mdc.js → index-j76ah6d7.js} +2 -2
- package/dist/{index-s734jcsr.js → index-jfem3dgz.js} +9 -3
- package/dist/{index-n37sebck.js → index-jjvbk92s.js} +1 -1
- package/dist/{index-4911rn0b.js → index-jmq8kfe7.js} +6 -6
- package/dist/{index-rr2bb45z.js → index-kfyb3k6n.js} +2 -2
- package/dist/{index-2vxtcb95.js → index-kq5w68dp.js} +2 -2
- package/dist/{index-kq82mtg0.js → index-ksq50rg0.js} +3 -3
- package/dist/{index-b5vqckbw.js → index-m32esgmj.js} +314 -127
- package/dist/{index-9zcsy3hh.js → index-mnhcdfxg.js} +161 -13
- package/dist/{index-se4m2g6w.js → index-mnnkgq0q.js} +111 -19
- package/dist/{index-p5y3k4g7.js → index-nda0zgna.js} +2 -1
- package/dist/{index-wgypt3cs.js → index-nxrsns5x.js} +2466 -1290
- package/dist/{index-4s3t0nd0.js → index-qgh1qwjj.js} +2 -2
- package/dist/{index-y9f76s3f.js → index-rrv26qjz.js} +1 -1
- package/dist/{index-24fezq97.js → index-rxqr723x.js} +5 -5
- package/dist/{index-v10f1rjv.js → index-spwjbkc7.js} +1 -1
- package/dist/{index-dxmq29t1.js → index-syaazvy2.js} +182 -47
- package/dist/{index-k29z4aqh.js → index-t5pck3ss.js} +1 -1
- package/dist/{index-6x57ar45.js → index-wfybj1dw.js} +4 -6
- package/dist/{index-cf74k5ak.js → index-whcgcfrv.js} +9 -6
- package/dist/{index-a6mc0v4d.js → index-x6cbrv9h.js} +3 -3
- package/dist/{index-bp5083x2.js → index-x9k3mqrf.js} +1 -1
- package/dist/{index-rpxdjkm0.js → index-y76rhsnr.js} +319 -61
- package/dist/{index-ze7mvk54.js → index-zy67whjr.js} +95 -59
- package/dist/index.js +58 -54
- package/dist/{logger-jm3sqqzr.js → logger-94kew5wm.js} +1 -1
- package/dist/{message-fts-rowid-map-17s0dfn4.js → message-fts-rowid-map-e79b7b6x.js} +6 -5
- package/dist/{message-index-gtpqnj8w.js → message-index-4q8ek2fc.js} +17 -16
- package/dist/{message-index-bounded-zyc8h32y.js → message-index-bounded-rydsg9r5.js} +17 -16
- package/dist/{message-time-backfill-73mmm76q.js → message-time-backfill-4qva0b4f.js} +3 -3
- package/dist/migration-worker.js +13 -12
- package/dist/{model-resolution-nx97z3x7.js → model-resolution-280gmqvd.js} +1 -1
- package/dist/plugin/embedding-bootstrap.d.ts +4 -1
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +8 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/subagent-tool-policy.d.ts +9 -0
- package/dist/plugin/subagent-tool-policy.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/{project-embedding-registry-z74mhqkf.js → project-embedding-registry-hn529988.js} +16 -13
- package/dist/raw-ordinal-warmup-worker.js +136 -101
- package/dist/{read-session-chunk-jjb48bt9.js → read-session-chunk-t039f0m5.js} +12 -11
- package/dist/{read-session-raw-rsc8c7qy.js → read-session-raw-aw6jgvwg.js} +4 -3
- package/dist/recomp-orchestrator-hbm53jj5.js +62 -0
- package/dist/{safe-notification-target-1szv1k5k.js → safe-notification-target-mkr9yzvr.js} +2 -2
- package/dist/search-archive-weh164mh.js +26 -0
- package/dist/search-hea079d7.js +50 -0
- package/dist/{send-session-notification-6ve0e8p4.js → send-session-notification-gqzkz7da.js} +7 -6
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/model-resolution.d.ts +2 -0
- package/dist/shared/model-resolution.d.ts.map +1 -1
- package/dist/shared/prompt-async-transport.d.ts +3 -0
- package/dist/shared/prompt-async-transport.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +7 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +6 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/subagent-runner.d.ts +2 -0
- package/dist/shared/subagent-runner.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +2 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/worker-shutdown.d.ts +68 -0
- package/dist/shared/worker-shutdown.d.ts.map +1 -0
- package/dist/shared/worker-shutdown.fixture.d.ts +2 -0
- package/dist/shared/worker-shutdown.fixture.d.ts.map +1 -0
- package/dist/{sqlite-zf72c52d.js → sqlite-zdgm52sv.js} +5 -1
- package/dist/{storage-memory-y3qmy00r.js → storage-memory-e6a7mb0k.js} +2 -2
- package/dist/{storage-tags-r7k9tjcv.js → storage-tags-a77q4v77.js} +5 -5
- package/dist/{task-config-x3qmayd2.js → task-config-t6bpyka7.js} +2 -2
- 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-jj99r7z2.js → transform-postprocess-phase-0b04tm1p.js} +35 -32
- package/dist/v2/auto-search-worker.js +48 -9
- package/dist/v2/chunk-embedding-write-worker.js +30 -23
- package/dist/v2/{compaction-marker-candidates-ebx3388k.js → compaction-marker-candidates-m4vmye3w.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +2 -2
- package/dist/v2/compartment-chunk-embedding-8jjmcgeg.js +64 -0
- package/dist/v2/{context-y5yamxak.js → context-ea3x7smm.js} +1797 -810
- package/dist/v2/{derive-budgets-2zh4gm2c.js → derive-budgets-knf763tt.js} +3 -3
- package/dist/v2/embedding-backfill-5e74ae0m.js +24 -0
- package/dist/v2/embedding-worker-process.js +2 -2
- package/dist/v2/embedding-worker.js +6 -6
- package/dist/v2/hidden-child-record.d.ts +2 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +2 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hidden-model-activity.d.ts +7 -0
- package/dist/v2/hidden-model-activity.d.ts.map +1 -0
- package/dist/v2/{history-owner-42e16w0n.js → history-owner-ad0crnrn.js} +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/copied-tag-notation.d.ts +1 -1
- package/dist/v2/hooks/copied-tag-notation.d.ts.map +1 -1
- package/dist/v2/hooks/dream-timer.d.ts +2 -0
- package/dist/v2/hooks/dream-timer.d.ts.map +1 -1
- package/dist/v2/hooks/embedding-lifecycle.d.ts +7 -0
- package/dist/v2/hooks/embedding-lifecycle.d.ts.map +1 -0
- package/dist/v2/hooks/generate.d.ts +36 -1
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/hooks/lkg-system.d.ts +35 -4
- package/dist/v2/hooks/lkg-system.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts +16 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +2 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/tools.d.ts +2 -1
- package/dist/v2/hooks/tools.d.ts.map +1 -1
- package/dist/v2/hooks/transform-features.d.ts +2 -2
- package/dist/v2/hooks/transform-features.d.ts.map +1 -1
- package/dist/v2/{logger-7qt02bnb.js → logger-p34mjtja.js} +1 -1
- package/dist/v2/{message-fts-rowid-map-wfx67gfd.js → message-fts-rowid-map-n8fdg2ja.js} +6 -5
- package/dist/v2/{message-index-bounded-spd8r7pj.js → message-index-bounded-8rcd7qq9.js} +17 -16
- package/dist/v2/{message-index-8vz2pq76.js → message-index-qz9wdp82.js} +17 -16
- package/dist/v2/{message-time-backfill-04t0km1z.js → message-time-backfill-zvthw6xb.js} +3 -3
- package/dist/v2/migration-worker.js +13 -12
- package/dist/v2/{model-resolution-nx97z3x7.js → model-resolution-280gmqvd.js} +1 -1
- package/dist/v2/{project-embedding-registry-gnkj56xp.js → project-embedding-registry-v38q4xd5.js} +16 -13
- package/dist/v2/raw-ordinal-warmup-worker.js +136 -101
- package/dist/v2/{read-session-chunk-cwkxrmns.js → read-session-chunk-wazfyxcg.js} +12 -11
- package/dist/v2/{read-session-raw-yaegtjzh.js → read-session-raw-b70cpwzj.js} +4 -3
- package/dist/v2/recomp-orchestrator-b12zaptj.js +61 -0
- package/dist/v2/{safe-notification-target-qg7n2s77.js → safe-notification-target-khnzg57c.js} +2 -2
- package/dist/v2/search-archive-x64rtz1z.js +25 -0
- package/dist/v2/search-hza9x72a.js +49 -0
- package/dist/v2/{send-session-notification-3pxn658x.js → send-session-notification-8eqe259v.js} +7 -6
- package/dist/v2/{server-45q69hkq.js → server-132h8twc.js} +5 -5
- package/dist/v2/{server-h0410h0v.js → server-1bw1wcbp.js} +1 -1
- package/dist/v2/{server-271qxsf5.js → server-24g8r2d0.js} +2466 -1290
- package/dist/v2/{server-tbe1femw.js → server-29qp8nz4.js} +1 -1
- package/dist/v2/{server-gsxjv2q2.js → server-33nqbqkw.js} +182 -47
- package/dist/v2/{server-tgnbmwah.js → server-3mz2qh5a.js} +1 -1
- package/dist/v2/{server-n1prf1g6.js → server-3vhxy2k5.js} +2 -2
- package/dist/v2/{server-xj136kt8.js → server-4kjmrjn4.js} +9 -3
- package/dist/v2/{server-34kwfsr4.js → server-53eh1r8r.js} +2 -2
- package/dist/{index-8cd2j99z.js → v2/server-5kym00ag.js} +32 -13
- package/dist/v2/{server-46neh5fa.js → server-62g58aaz.js} +314 -127
- package/dist/v2/{server-f2xf5gcb.js → server-6495nmn9.js} +12 -15
- package/dist/v2/{server-a9xqj88f.js → server-6v3cdzsx.js} +4 -4
- package/dist/v2/{server-d04vrx0j.js → server-806rzhs6.js} +2 -2
- package/dist/v2/{server-qd11g795.js → server-92g7d776.js} +2 -1
- package/dist/v2/{server-nj659894.js → server-94wk1ey3.js} +14 -3
- package/dist/v2/{server-6tmj0s7j.js → server-ab1g0wn9.js} +4 -6
- package/dist/v2/{server-8by8qfec.js → server-ad18djzs.js} +95 -59
- package/dist/v2/{server-hy3d3vsx.js → server-bsgd4dk1.js} +2 -2
- package/dist/v2/server-cpjk5jd2.js +82 -0
- package/dist/v2/{server-g3qma5c0.js → server-d1dzgvwd.js} +2 -2
- package/dist/v2/{server-hm38q7r0.js → server-d48x3m4x.js} +5 -5
- package/dist/v2/{server-1wy7b9de.js → server-dtp8hcjh.js} +3 -3
- package/dist/v2/{server-27gq4mfz.js → server-fa7vtp40.js} +9 -6
- package/dist/v2/{server-6pmqg9m4.js → server-gyy4k6mf.js} +1 -1
- package/dist/{index-beht37jy.js → v2/server-gzy5w8ya.js} +194 -5
- package/dist/v2/{server-bmymkx73.js → server-j8h7bsca.js} +29 -15
- package/dist/v2/{server-n37sebck.js → server-jjvbk92s.js} +1 -1
- package/dist/v2/{server-da07v4xp.js → server-k3t06fxr.js} +1 -1
- package/dist/v2/{server-9hx7g5jp.js → server-m4bfaevz.js} +1197 -1049
- package/dist/v2/{server-2ar62dyx.js → server-ppcd1qxh.js} +191 -99
- package/dist/v2/{server-rmygf5pn.js → server-qjvk4a9t.js} +2 -2
- package/dist/v2/{server-zzkj2fch.js → server-qteg2kt9.js} +5 -5
- package/dist/v2/{server-pwv4ezb0.js → server-rqebawx1.js} +2 -2
- package/dist/v2/{server-h1v0pyxb.js → server-vr4szghm.js} +501 -20
- package/dist/v2/{server-xq7dfjke.js → server-wwaw5npa.js} +5 -5
- package/dist/v2/{server-6vdzn1td.js → server-zg5y109h.js} +323 -76
- package/dist/v2/server.js +8 -8
- package/dist/v2/{sqlite-zf72c52d.js → sqlite-zdgm52sv.js} +5 -1
- package/dist/v2/{storage-memory-y3qmy00r.js → storage-memory-e6a7mb0k.js} +2 -2
- package/dist/v2/{storage-tags-3wdb8zph.js → storage-tags-q71rnr9f.js} +5 -5
- package/dist/v2/store-reader.d.ts +10 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{task-config-nvz8mapa.js → task-config-7md27rx8.js} +2 -2
- package/dist/v2/{wrapup-orchestrator-embdz8gj.js → wrapup-orchestrator-3ssd5yy1.js} +33 -32
- package/dist/wrapup-orchestrator-5vpcd1zx.js +49 -0
- package/package.json +2 -2
- package/src/config/index.test.ts +72 -6
- package/src/config/project-security.ts +15 -0
- package/src/config/rerank.test.ts +60 -0
- package/src/config/schema/magic-context.ts +57 -0
- package/src/shared/logger.test.ts +42 -1
- package/src/shared/logger.ts +11 -13
- package/src/shared/model-resolution.test.ts +67 -12
- package/src/shared/model-resolution.ts +43 -16
- package/src/shared/model-suggestion-retry.ts +2 -2
- package/src/shared/prompt-async-transport.ts +47 -3
- package/src/shared/rpc-types.ts +7 -0
- package/src/shared/sqlite-busy-budget-review.test.ts +6 -1
- package/src/shared/sqlite-turn-deadline.test.ts +270 -0
- package/src/shared/sqlite.ts +239 -9
- package/src/shared/subagent-runner.ts +2 -0
- package/src/shared/tag-transcript.ts +9 -1
- package/src/shared/worker-shutdown-fence.test.ts +87 -0
- package/src/shared/worker-shutdown.fixture.ts +25 -0
- package/src/shared/worker-shutdown.test.ts +127 -0
- package/src/shared/worker-shutdown.ts +160 -0
- package/dist/embedding-backfill-fmz50tsy.js +0 -24
- package/dist/recomp-orchestrator-999jj4bc.js +0 -61
- package/dist/search-archive-6vm0e2f5.js +0 -25
- package/dist/search-xsqk1bj4.js +0 -49
- package/dist/v2/embedding-backfill-7c7yr69y.js +0 -23
- package/dist/v2/recomp-orchestrator-f6m9jr7p.js +0 -60
- package/dist/v2/search-archive-wve3tq1k.js +0 -24
- package/dist/v2/search-hwg7jfbj.js +0 -48
- package/dist/wrapup-orchestrator-whhbjmaz.js +0 -48
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
getRawSessionTagKeysThrough2,
|
|
98
98
|
getLegacyProtectedTailStartOrdinal2,
|
|
99
99
|
readSessionChunk2
|
|
100
|
-
} from "./index-
|
|
100
|
+
} from "./index-mnhcdfxg.js";
|
|
101
101
|
import {
|
|
102
102
|
getHarness2,
|
|
103
103
|
harnessOwnsOpenCodeStore2
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
sanitizeDiagnosticText,
|
|
112
112
|
log2,
|
|
113
113
|
sessionLog2
|
|
114
|
-
} from "./index-
|
|
114
|
+
} from "./index-h7tgn49j.js";
|
|
115
115
|
import {
|
|
116
116
|
createScanner,
|
|
117
117
|
parseTree,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
deriveTriggerBudget2,
|
|
135
135
|
resolveHistorianProducerLimits2,
|
|
136
136
|
producerSourceLocalBudget2
|
|
137
|
-
} from "./index-
|
|
137
|
+
} from "./index-spwjbkc7.js";
|
|
138
138
|
import {
|
|
139
139
|
withContentLanguageDirective,
|
|
140
140
|
buildPrimaryLanguageDirective,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
ConfigProfilesSchema,
|
|
148
148
|
MagicContextConfigSchema,
|
|
149
149
|
LIVE_RELOAD_CONFIG_PATHS
|
|
150
|
-
} from "./index-
|
|
150
|
+
} from "./index-nxrsns5x.js";
|
|
151
151
|
import {
|
|
152
152
|
providerMass,
|
|
153
153
|
calibrationForModelKey,
|
|
@@ -157,14 +157,14 @@ import {
|
|
|
157
157
|
hasMeaningfulUserText2,
|
|
158
158
|
estimateTokens,
|
|
159
159
|
estimateFixedPromptTokens
|
|
160
|
-
} from "./index-
|
|
160
|
+
} from "./index-b88dwwrh.js";
|
|
161
161
|
import {
|
|
162
162
|
FAIL_CLOSED_DOCTOR_COMMAND,
|
|
163
163
|
getSchemaFenceRejection,
|
|
164
164
|
LATEST_SUPPORTED_VERSION,
|
|
165
165
|
getPersistedSchemaVersion,
|
|
166
166
|
openDatabase
|
|
167
|
-
} from "./index-
|
|
167
|
+
} from "./index-a9zvn5fe.js";
|
|
168
168
|
import {
|
|
169
169
|
inRootAsyncContext2,
|
|
170
170
|
Database2,
|
|
@@ -172,20 +172,20 @@ import {
|
|
|
172
172
|
withSqliteBackgroundWriter2,
|
|
173
173
|
withoutSqliteTransformPass2,
|
|
174
174
|
beginSqliteWriterAsync2
|
|
175
|
-
} from "./index-
|
|
175
|
+
} from "./index-gzy5w8ya.js";
|
|
176
176
|
import {
|
|
177
177
|
shouldSkipHomeProjectMemory,
|
|
178
178
|
resolveProjectIdentity
|
|
179
|
-
} from "./index-
|
|
179
|
+
} from "./index-kq5w68dp.js";
|
|
180
180
|
import {
|
|
181
181
|
isPidAlive
|
|
182
|
-
} from "./index-
|
|
182
|
+
} from "./index-c7phnbvk.js";
|
|
183
183
|
import {
|
|
184
184
|
isStrictGapHealingMessage2,
|
|
185
185
|
noteRawSessionSummaryRowWritten2,
|
|
186
186
|
RawOrdinalsNotReady2,
|
|
187
187
|
runSessionWarmupWorker
|
|
188
|
-
} from "./index-
|
|
188
|
+
} from "./index-jfem3dgz.js";
|
|
189
189
|
import {
|
|
190
190
|
layoutLkgPrefix,
|
|
191
191
|
assembleLkgPrefix,
|
|
@@ -196,10 +196,10 @@ import {
|
|
|
196
196
|
resolveStoredPathWorkspaceIdentity,
|
|
197
197
|
sourceNameForMemory,
|
|
198
198
|
computeWorkspaceEpochFingerprint
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-9q1g3c5q.js";
|
|
200
200
|
import {
|
|
201
201
|
getTableColumnNames
|
|
202
|
-
} from "./index-
|
|
202
|
+
} from "./index-x9k3mqrf.js";
|
|
203
203
|
import {
|
|
204
204
|
V2_MEMORY_CATEGORIES,
|
|
205
205
|
CATEGORY_PRIORITY,
|
|
@@ -213,7 +213,7 @@ import {
|
|
|
213
213
|
} from "./index-58e3y90n.js";
|
|
214
214
|
import {
|
|
215
215
|
getMeasuredToolDefinitionTokens
|
|
216
|
-
} from "./index-
|
|
216
|
+
} from "./index-j76ah6d7.js";
|
|
217
217
|
import {
|
|
218
218
|
invalidateAutoEmbedSession,
|
|
219
219
|
drainBackgroundBatches,
|
|
@@ -222,17 +222,17 @@ import {
|
|
|
222
222
|
getProjectChunkEmbeddingModelId2,
|
|
223
223
|
getProjectEmbeddingMaxInputTokens2,
|
|
224
224
|
embedItemsForProject2
|
|
225
|
-
} from "./index-
|
|
225
|
+
} from "./index-zy67whjr.js";
|
|
226
226
|
import {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
} from "./index-
|
|
227
|
+
buildCanonicalChunkTextFromFts2,
|
|
228
|
+
buildCompartmentSummaryFallbackText2,
|
|
229
|
+
canonicalizeInMemoryChunkTextForEmbedding2,
|
|
230
|
+
chunkCanonicalText2,
|
|
231
|
+
chunkEmbeddingWindowsAreCurrent2,
|
|
232
|
+
replaceCompartmentChunkEmbeddings2,
|
|
233
|
+
deleteChunkEmbedBackoffForSession2,
|
|
234
|
+
chunkWindowSourceKey2
|
|
235
|
+
} from "./index-m32esgmj.js";
|
|
236
236
|
import {
|
|
237
237
|
BoundedSessionMap,
|
|
238
238
|
clearCompressionDepth,
|
|
@@ -249,7 +249,7 @@ import {
|
|
|
249
249
|
toMessageIndexSource2,
|
|
250
250
|
clearIndexedMessagesInTransaction2,
|
|
251
251
|
indexSourcesAfterOrdinal2
|
|
252
|
-
} from "./index-
|
|
252
|
+
} from "./index-mnnkgq0q.js";
|
|
253
253
|
import {
|
|
254
254
|
stripWellFormedLeadingTagPrefix,
|
|
255
255
|
stripTagPrefix,
|
|
@@ -262,12 +262,12 @@ import {
|
|
|
262
262
|
foldShrunkPartTags2,
|
|
263
263
|
getTagNumberByMessageId2,
|
|
264
264
|
getActiveTagsBySession2
|
|
265
|
-
} from "./index-
|
|
265
|
+
} from "./index-whcgcfrv.js";
|
|
266
266
|
import {
|
|
267
267
|
openCodeDbExists,
|
|
268
268
|
withReadOnlySessionDb,
|
|
269
269
|
getMessageTimesFromOpenCodeDb
|
|
270
|
-
} from "./index-
|
|
270
|
+
} from "./index-ksq50rg0.js";
|
|
271
271
|
import {
|
|
272
272
|
renderUserFacingFailure,
|
|
273
273
|
userFacingFailureCode,
|
|
@@ -276,7 +276,7 @@ import {
|
|
|
276
276
|
insertPrimerCandidates,
|
|
277
277
|
promoteSessionFactsDurable,
|
|
278
278
|
embedPromotedFacts
|
|
279
|
-
} from "./index-
|
|
279
|
+
} from "./index-3svaejkh.js";
|
|
280
280
|
import {
|
|
281
281
|
pushNotification2
|
|
282
282
|
} from "./index-x8a7jmkh.js";
|
|
@@ -287,16 +287,16 @@ import {
|
|
|
287
287
|
getMemoriesByProject2,
|
|
288
288
|
getMemoriesByProjects2,
|
|
289
289
|
getMaxMemoryIdForProjects2
|
|
290
|
-
} from "./index-
|
|
290
|
+
} from "./index-jjvbk92s.js";
|
|
291
291
|
import {
|
|
292
292
|
isMarkerCandidateBasisCurrent2,
|
|
293
293
|
invalidateMarkerCandidateBasis2,
|
|
294
294
|
readMarkerCandidateBasis2,
|
|
295
295
|
prepareMarkerCandidateBasis2
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-qgh1qwjj.js";
|
|
297
297
|
import {
|
|
298
298
|
sendStatusNotification2
|
|
299
|
-
} from "./index-
|
|
299
|
+
} from "./index-66eby7hx.js";
|
|
300
300
|
import {
|
|
301
301
|
isCompactionEnabled,
|
|
302
302
|
migrateLegacyAgentEnabledInMemory
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
import {
|
|
315
315
|
logSlowWriteTransaction,
|
|
316
316
|
WriteTransactionSteps
|
|
317
|
-
} from "./index-
|
|
317
|
+
} from "./index-t5pck3ss.js";
|
|
318
318
|
import {
|
|
319
319
|
ensureStorageDirectorySync,
|
|
320
320
|
writeStorageFileAtomicSync
|
|
@@ -1702,6 +1702,17 @@ function stripUnsafeProjectConfigFields(projectRaw) {
|
|
|
1702
1702
|
warnings.push(`Ignoring ${field} from project config (security: daemon routing and developer-only embedding traffic are user-level settings).`);
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
+
if ("rerank" in projectRaw) {
|
|
1706
|
+
const rerank = projectRaw.rerank;
|
|
1707
|
+
const off = isPlainObject(rerank) && rerank.provider === "off";
|
|
1708
|
+
const removed = !isPlainObject(rerank) || Object.keys(rerank).some((key) => key !== "provider") || !off;
|
|
1709
|
+
if (off)
|
|
1710
|
+
projectRaw.rerank = { provider: "off" };
|
|
1711
|
+
else
|
|
1712
|
+
delete projectRaw.rerank;
|
|
1713
|
+
if (removed)
|
|
1714
|
+
warnings.push("Ignoring rerank settings from project config (security: projects may only set rerank.provider to off; hosted routing, credentials and limits are user-level only).");
|
|
1715
|
+
}
|
|
1705
1716
|
const embedding = projectRaw.embedding;
|
|
1706
1717
|
if (isPlainObject(embedding)) {
|
|
1707
1718
|
const removed = [];
|
|
@@ -9032,7 +9043,7 @@ async function promptWithTimeout(client, args, timeoutMs, signal, transport, fir
|
|
|
9032
9043
|
if (!activity.monitored || activity.received)
|
|
9033
9044
|
return;
|
|
9034
9045
|
silent = true;
|
|
9035
|
-
controller.abort();
|
|
9046
|
+
controller.abort(new ModelProducedNoOutputError(firstOutputTimeoutMs));
|
|
9036
9047
|
}, firstOutputTimeoutMs) : undefined;
|
|
9037
9048
|
const timeoutError = () => silent && firstOutputTimeoutMs !== undefined ? new ModelProducedNoOutputError(firstOutputTimeoutMs) : new Error(`prompt timed out after ${timeoutMs}ms`);
|
|
9038
9049
|
const onExternalAbort = () => controller.abort();
|
|
@@ -9372,7 +9383,7 @@ async function promptSyncWithValidatedOutputRetry(client, args, options) {
|
|
|
9372
9383
|
throwWithPromptFailure(failure.error, failedAttempts, args, timeoutMs, options.transport);
|
|
9373
9384
|
}
|
|
9374
9385
|
if (!cooledPrimary && !quota)
|
|
9375
|
-
log2(`[${callContext}] primary (${explicitPrimaryLabel}) failed validation/prompt: ${shortErr(failure.error)};
|
|
9386
|
+
log2(`[${callContext}] primary (${explicitPrimaryLabel}) failed validation/prompt: ${shortErr(failure.error)}; ${fallbacks.length} fallback(s) configured, subject to remaining budget`);
|
|
9376
9387
|
}
|
|
9377
9388
|
for (let i = 0;i < fallbacks.length; i += 1) {
|
|
9378
9389
|
const fallback = toModelEntry(fallbacks[i]);
|
|
@@ -9445,6 +9456,152 @@ function normalizeSDKResponse(response, fallback, options) {
|
|
|
9445
9456
|
return fallback;
|
|
9446
9457
|
}
|
|
9447
9458
|
// src/features/magic-context/subagent-token-capture.ts
|
|
9459
|
+
var warnedUnknownModels = new Set;
|
|
9460
|
+
var loggedModelReroutes = new Set;
|
|
9461
|
+
var MAX_SUBAGENT_INVOCATION_ERROR_CHARS = 1000;
|
|
9462
|
+
var invocationErrorDetails = new WeakMap;
|
|
9463
|
+
function annotateSubagentInvocationError(error, details) {
|
|
9464
|
+
if (error && typeof error === "object") {
|
|
9465
|
+
const previous = invocationErrorDetails.get(error) ?? {};
|
|
9466
|
+
invocationErrorDetails.set(error, {
|
|
9467
|
+
...previous,
|
|
9468
|
+
...details,
|
|
9469
|
+
hostError: details.hostError ?? previous.hostError
|
|
9470
|
+
});
|
|
9471
|
+
}
|
|
9472
|
+
return error;
|
|
9473
|
+
}
|
|
9474
|
+
function errorDetailsOf(error) {
|
|
9475
|
+
const seen = new Set;
|
|
9476
|
+
const visit = (value, depth) => {
|
|
9477
|
+
if (!value || typeof value !== "object" || depth > 4 || seen.has(value))
|
|
9478
|
+
return {};
|
|
9479
|
+
seen.add(value);
|
|
9480
|
+
const direct = invocationErrorDetails.get(value) ?? {};
|
|
9481
|
+
const record = value;
|
|
9482
|
+
const nested = visit(record.hostError, depth + 1);
|
|
9483
|
+
const cause = visit(record.cause, depth + 1);
|
|
9484
|
+
return {
|
|
9485
|
+
...cause,
|
|
9486
|
+
...nested,
|
|
9487
|
+
...direct,
|
|
9488
|
+
hostError: direct.hostError ?? nested.hostError ?? cause.hostError ?? record.hostError
|
|
9489
|
+
};
|
|
9490
|
+
};
|
|
9491
|
+
return visit(error, 0);
|
|
9492
|
+
}
|
|
9493
|
+
function modelRef(value) {
|
|
9494
|
+
const reference = typeof value === "string" ? value : value?.model;
|
|
9495
|
+
return typeof reference === "string" && reference.trim().length > 0 ? reference.trim() : undefined;
|
|
9496
|
+
}
|
|
9497
|
+
function splitModelRef(value) {
|
|
9498
|
+
if (!value)
|
|
9499
|
+
return { providerId: null, modelId: null };
|
|
9500
|
+
const slash = value.indexOf("/");
|
|
9501
|
+
return slash > 0 && slash < value.length - 1 ? { providerId: value.slice(0, slash), modelId: value.slice(slash + 1) } : { providerId: null, modelId: value };
|
|
9502
|
+
}
|
|
9503
|
+
function cleanOneLine(value) {
|
|
9504
|
+
const oneLine = sanitizeDiagnosticText(value).replaceAll("\r", " ").replaceAll(`
|
|
9505
|
+
`, " ").replaceAll("\t", " ").replace(/\s+/g, " ").trim();
|
|
9506
|
+
return oneLine.length <= MAX_SUBAGENT_INVOCATION_ERROR_CHARS ? oneLine : `${oneLine.slice(0, MAX_SUBAGENT_INVOCATION_ERROR_CHARS - 1)}…`;
|
|
9507
|
+
}
|
|
9508
|
+
function recordMessage(error) {
|
|
9509
|
+
if (typeof error === "string")
|
|
9510
|
+
return error;
|
|
9511
|
+
if (!error || typeof error !== "object")
|
|
9512
|
+
return String(error ?? "");
|
|
9513
|
+
const record = error;
|
|
9514
|
+
const data = record.data && typeof record.data === "object" ? record.data : undefined;
|
|
9515
|
+
const message = typeof data?.message === "string" ? data.message : typeof record.message === "string" ? record.message : typeof record.description === "string" ? record.description : "";
|
|
9516
|
+
const name = typeof record.name === "string" ? record.name : typeof record.type === "string" ? record.type : "";
|
|
9517
|
+
return [name, message].filter(Boolean).join(": ") || "The host reported an error without a message.";
|
|
9518
|
+
}
|
|
9519
|
+
function modelNotFoundDetail(error, attemptedModel) {
|
|
9520
|
+
const seen = new Set;
|
|
9521
|
+
const visit = (value, depth) => {
|
|
9522
|
+
if (typeof value === "string") {
|
|
9523
|
+
const modelMatch = value.match(/model not found:\s*(.+?)(?=(?:\.?\s*did you mean|$))/i);
|
|
9524
|
+
if (!modelMatch)
|
|
9525
|
+
return null;
|
|
9526
|
+
const model = modelMatch[1].trim().replace(/[.,;(]+$/, "");
|
|
9527
|
+
const suggestion = value.match(/did you mean:?\s*\(?\s*([^?);]+)/i)?.[1]?.trim();
|
|
9528
|
+
const message = `Model not found: ${model}${suggestion ? ` (did you mean ${suggestion}?)` : ""}`;
|
|
9529
|
+
return { model, ...suggestion ? { suggestion } : {}, message };
|
|
9530
|
+
}
|
|
9531
|
+
if (!value || typeof value !== "object" || depth > 4 || seen.has(value))
|
|
9532
|
+
return null;
|
|
9533
|
+
seen.add(value);
|
|
9534
|
+
const record = value;
|
|
9535
|
+
const data = record.data && typeof record.data === "object" ? record.data : undefined;
|
|
9536
|
+
const modelRecord = data?.model ?? record.model;
|
|
9537
|
+
const modelId = (typeof data?.modelID === "string" ? data.modelID : undefined) ?? (typeof modelRecord?.modelID === "string" ? modelRecord.modelID : undefined) ?? (typeof modelRecord?.id === "string" ? modelRecord.id : undefined);
|
|
9538
|
+
const providerId = (typeof data?.providerID === "string" ? data.providerID : undefined) ?? (typeof modelRecord?.providerID === "string" ? modelRecord.providerID : undefined);
|
|
9539
|
+
const suggestions = data?.suggestions;
|
|
9540
|
+
const suggestion = Array.isArray(suggestions) && typeof suggestions[0] === "string" ? suggestions[0] : typeof data?.suggestion === "string" ? data.suggestion : undefined;
|
|
9541
|
+
const rawMessage = recordMessage(value);
|
|
9542
|
+
const fromMessage = visit(rawMessage, depth + 1);
|
|
9543
|
+
if (fromMessage)
|
|
9544
|
+
return fromMessage.suggestion || !suggestion ? fromMessage : {
|
|
9545
|
+
...fromMessage,
|
|
9546
|
+
suggestion,
|
|
9547
|
+
message: `Model not found: ${fromMessage.model} (did you mean ${suggestion}?)`
|
|
9548
|
+
};
|
|
9549
|
+
const name = `${String(record.name ?? "")} ${String(record.type ?? "")}`;
|
|
9550
|
+
if (/ProviderModelNotFoundError|model not found/i.test(name) && modelId) {
|
|
9551
|
+
const model = providerId ? `${providerId}/${modelId}` : modelId;
|
|
9552
|
+
const detail = `Model not found: ${model}${suggestion ? ` (did you mean ${suggestion}?)` : ""}`;
|
|
9553
|
+
return { model, ...suggestion ? { suggestion } : {}, message: detail };
|
|
9554
|
+
}
|
|
9555
|
+
for (const key of ["data", "error", "cause", "hostError"]) {
|
|
9556
|
+
const match = visit(record[key], depth + 1);
|
|
9557
|
+
if (match)
|
|
9558
|
+
return match;
|
|
9559
|
+
}
|
|
9560
|
+
return null;
|
|
9561
|
+
};
|
|
9562
|
+
const found = visit(error, 0);
|
|
9563
|
+
if (!found && attemptedModel && (typeof error === "string" && /ProviderModelNotFoundError/i.test(error) || error !== null && typeof error === "object" && /ProviderModelNotFoundError/i.test(`${String(error.name ?? "")} ${String(error.type ?? "")}`))) {
|
|
9564
|
+
return { model: attemptedModel, message: `Model not found: ${attemptedModel}` };
|
|
9565
|
+
}
|
|
9566
|
+
return found;
|
|
9567
|
+
}
|
|
9568
|
+
function hostLabel(harness) {
|
|
9569
|
+
switch (harness) {
|
|
9570
|
+
case "opencode2":
|
|
9571
|
+
return "OpenCode 2";
|
|
9572
|
+
case "opencode":
|
|
9573
|
+
return "OpenCode";
|
|
9574
|
+
case "pi":
|
|
9575
|
+
return "Pi";
|
|
9576
|
+
case "omp":
|
|
9577
|
+
return "Oh My Pi";
|
|
9578
|
+
}
|
|
9579
|
+
}
|
|
9580
|
+
function invocationErrorText(input, details, attemptedModel) {
|
|
9581
|
+
if (input.error == null && input.hostError == null && details.hostError == null)
|
|
9582
|
+
return null;
|
|
9583
|
+
const rawHostError = input.hostError ?? details.hostError;
|
|
9584
|
+
const modelError = modelNotFoundDetail(rawHostError ?? input.error, attemptedModel);
|
|
9585
|
+
if (modelError) {
|
|
9586
|
+
return cleanOneLine(`No reply: ${hostLabel(input.harness)} refused the model: ${modelError.message}`);
|
|
9587
|
+
}
|
|
9588
|
+
if (rawHostError != null) {
|
|
9589
|
+
return cleanOneLine(`No reply: ${hostLabel(input.harness)} reported a child-session error: ${recordMessage(rawHostError)}`);
|
|
9590
|
+
}
|
|
9591
|
+
return cleanOneLine(describeError(input.error).brief);
|
|
9592
|
+
}
|
|
9593
|
+
function warnUnknownModel(input, details, attemptedModel, modelConfigKey) {
|
|
9594
|
+
if (!attemptedModel)
|
|
9595
|
+
return;
|
|
9596
|
+
const issue = modelNotFoundDetail(input.hostError ?? details.hostError ?? input.error, attemptedModel);
|
|
9597
|
+
if (!issue || warnedUnknownModels.has(attemptedModel))
|
|
9598
|
+
return;
|
|
9599
|
+
if (!modelConfigKey)
|
|
9600
|
+
return;
|
|
9601
|
+
warnedUnknownModels.add(attemptedModel);
|
|
9602
|
+
const suggestion = issue.suggestion ? `provider suggests ${cleanOneLine(issue.suggestion)}` : "provider gave no model suggestion";
|
|
9603
|
+
log2(`[magic-context] WARNING: ${modelConfigKey} configured ${attemptedModel}, but ${hostLabel(input.harness)} does not know that model; ${suggestion}`);
|
|
9604
|
+
}
|
|
9448
9605
|
function asNumber(value) {
|
|
9449
9606
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
9450
9607
|
}
|
|
@@ -9515,8 +9672,11 @@ function sumTokensFromChildMessages(messages) {
|
|
|
9515
9672
|
function findLastAssistantModel(messages) {
|
|
9516
9673
|
for (let index = messages.length - 1;index >= 0; index -= 1) {
|
|
9517
9674
|
const message = messages[index];
|
|
9518
|
-
if (isAssistantMessage(message))
|
|
9519
|
-
|
|
9675
|
+
if (isAssistantMessage(message)) {
|
|
9676
|
+
const model = modelFromMessage(message);
|
|
9677
|
+
if (model.providerId || model.modelId)
|
|
9678
|
+
return model;
|
|
9679
|
+
}
|
|
9520
9680
|
}
|
|
9521
9681
|
return { providerId: null, modelId: null };
|
|
9522
9682
|
}
|
|
@@ -9525,10 +9685,25 @@ function recordChildInvocation(input) {
|
|
|
9525
9685
|
return null;
|
|
9526
9686
|
const tokens = input.tokens ?? sumTokensFromChildMessages(input.messages ?? []);
|
|
9527
9687
|
const observedModel = findLastAssistantModel(input.messages ?? []);
|
|
9688
|
+
const details = errorDetailsOf(input.error);
|
|
9689
|
+
const attemptedModel = details.attemptedModel ?? modelRef(input.attemptedModel);
|
|
9690
|
+
const attemptConfig = [input.attemptedModel, ...input.configuredModels ?? []].find((candidate) => modelRef(candidate) === attemptedModel);
|
|
9691
|
+
const modelConfigKey = details.modelConfigKey ?? input.modelConfigKey ?? (typeof attemptConfig === "object" ? attemptConfig?.sourceConfigKey : undefined);
|
|
9692
|
+
const attemptedParts = splitModelRef(attemptedModel);
|
|
9528
9693
|
const model = {
|
|
9529
|
-
providerId: input.providerId ??
|
|
9530
|
-
modelId: input.modelId ??
|
|
9694
|
+
providerId: observedModel.providerId ?? input.providerId ?? attemptedParts.providerId,
|
|
9695
|
+
modelId: observedModel.modelId ?? input.modelId ?? attemptedParts.modelId
|
|
9531
9696
|
};
|
|
9697
|
+
const reportedModelRef = observedModel.providerId && observedModel.modelId ? `${observedModel.providerId}/${observedModel.modelId}` : input.providerId && input.modelId ? `${input.providerId}/${input.modelId}` : undefined;
|
|
9698
|
+
if (attemptedModel && reportedModelRef && attemptedModel !== reportedModelRef && (observedModel.providerId !== null || input.providerId !== undefined)) {
|
|
9699
|
+
const rerouteKey = `${input.harness}\x00${attemptedModel}\x00${reportedModelRef}`;
|
|
9700
|
+
if (!loggedModelReroutes.has(rerouteKey)) {
|
|
9701
|
+
loggedModelReroutes.add(rerouteKey);
|
|
9702
|
+
sessionLog2(input.parentSessionId, `subagent model rerouted by host: attempted=${attemptedModel} reported=${reportedModelRef}`);
|
|
9703
|
+
}
|
|
9704
|
+
}
|
|
9705
|
+
warnUnknownModel(input, details, attemptedModel, modelConfigKey);
|
|
9706
|
+
const errorText = invocationErrorText(input, details, attemptedModel);
|
|
9532
9707
|
try {
|
|
9533
9708
|
return recordSubagentInvocation(input.db, {
|
|
9534
9709
|
sessionId: input.parentSessionId,
|
|
@@ -9544,7 +9719,7 @@ function recordChildInvocation(input) {
|
|
|
9544
9719
|
outputTokens: tokens.output,
|
|
9545
9720
|
cacheReadTokens: tokens.cacheRead,
|
|
9546
9721
|
cacheWriteTokens: tokens.cacheWrite,
|
|
9547
|
-
error:
|
|
9722
|
+
error: errorText,
|
|
9548
9723
|
parentInvocationId: input.parentInvocationId ?? null
|
|
9549
9724
|
});
|
|
9550
9725
|
} catch (error) {
|
|
@@ -9578,6 +9753,17 @@ var HOST_SESSION_ERROR = Symbol("promptAsyncHostSessionError");
|
|
|
9578
9753
|
function isHostSessionError(error) {
|
|
9579
9754
|
return error !== null && typeof error === "object" && error[HOST_SESSION_ERROR] === true;
|
|
9580
9755
|
}
|
|
9756
|
+
function hostSessionErrorOf(error) {
|
|
9757
|
+
if (!isHostSessionError(error))
|
|
9758
|
+
return;
|
|
9759
|
+
return error.hostError;
|
|
9760
|
+
}
|
|
9761
|
+
function requestModelRef(request) {
|
|
9762
|
+
const model = request.body?.model;
|
|
9763
|
+
if (model && typeof model.providerID === "string" && typeof model.modelID === "string")
|
|
9764
|
+
return `${model.providerID}/${model.modelID}`;
|
|
9765
|
+
return;
|
|
9766
|
+
}
|
|
9581
9767
|
function supportsPromptAsync(client) {
|
|
9582
9768
|
const session = sessionApi(client);
|
|
9583
9769
|
return typeof session?.promptAsync === "function" && typeof session?.status === "function" && typeof session?.messages === "function";
|
|
@@ -9732,11 +9918,29 @@ async function promptAsyncAndWaitForIdle(client, request, options = {}) {
|
|
|
9732
9918
|
const initialBaseline = new Set(completionBaseline);
|
|
9733
9919
|
activeSessionErrors.set(sessionId, undefined);
|
|
9734
9920
|
try {
|
|
9735
|
-
|
|
9921
|
+
let sent;
|
|
9922
|
+
try {
|
|
9923
|
+
sent = await session.promptAsync?.(request);
|
|
9924
|
+
} catch (error) {
|
|
9925
|
+
annotateSubagentInvocationError(error, {
|
|
9926
|
+
attemptedModel: requestModelRef(request),
|
|
9927
|
+
modelConfigKey: options.modelConfigKey,
|
|
9928
|
+
hostError: error
|
|
9929
|
+
});
|
|
9930
|
+
throw error;
|
|
9931
|
+
}
|
|
9736
9932
|
if (sent && typeof sent === "object" && "error" in sent) {
|
|
9737
9933
|
const rejection = sent.error;
|
|
9738
9934
|
if (rejection) {
|
|
9739
|
-
|
|
9935
|
+
const error = new Error(`prompt_async was rejected: ${describeRejection(rejection)}`, {
|
|
9936
|
+
cause: rejection
|
|
9937
|
+
});
|
|
9938
|
+
annotateSubagentInvocationError(error, {
|
|
9939
|
+
attemptedModel: requestModelRef(request),
|
|
9940
|
+
modelConfigKey: options.modelConfigKey,
|
|
9941
|
+
hostError: rejection
|
|
9942
|
+
});
|
|
9943
|
+
throw error;
|
|
9740
9944
|
}
|
|
9741
9945
|
}
|
|
9742
9946
|
let sentAt = Date.now();
|
|
@@ -9751,7 +9955,13 @@ async function promptAsyncAndWaitForIdle(client, request, options = {}) {
|
|
|
9751
9955
|
Object.assign(error, {
|
|
9752
9956
|
name: "DreamerProviderOutputFailureError",
|
|
9753
9957
|
transient: true,
|
|
9754
|
-
[HOST_SESSION_ERROR]: true
|
|
9958
|
+
[HOST_SESSION_ERROR]: true,
|
|
9959
|
+
hostError
|
|
9960
|
+
});
|
|
9961
|
+
annotateSubagentInvocationError(error, {
|
|
9962
|
+
attemptedModel: requestModelRef(request),
|
|
9963
|
+
modelConfigKey: options.modelConfigKey,
|
|
9964
|
+
hostError
|
|
9755
9965
|
});
|
|
9756
9966
|
throw error;
|
|
9757
9967
|
}
|
|
@@ -17274,6 +17484,8 @@ function resolveHiddenCompletionExecutor(executor, client, db, directory, entryP
|
|
|
17274
17484
|
}
|
|
17275
17485
|
function createV1HiddenCompletionExecutor(client, db, directory) {
|
|
17276
17486
|
const historianChildren = new Set;
|
|
17487
|
+
const hostErrors = new Map;
|
|
17488
|
+
const runIdentities = new Map;
|
|
17277
17489
|
return {
|
|
17278
17490
|
capabilities: { tools: true, harness: "opencode" },
|
|
17279
17491
|
async open(run) {
|
|
@@ -17290,23 +17502,49 @@ function createV1HiddenCompletionExecutor(client, db, directory) {
|
|
|
17290
17502
|
preferResponseOnMissingData: true
|
|
17291
17503
|
});
|
|
17292
17504
|
const id = typeof created?.id === "string" ? created.id : "";
|
|
17293
|
-
if (id)
|
|
17505
|
+
if (id) {
|
|
17294
17506
|
rememberV1HiddenRun(id, run);
|
|
17507
|
+
runIdentities.set(id, run);
|
|
17508
|
+
}
|
|
17295
17509
|
if (id && run.kind !== "dreamer-task") {
|
|
17296
17510
|
historianChildren.add(id);
|
|
17297
17511
|
rememberHistorianOutputCap(id, run.maxOutputTokens);
|
|
17298
17512
|
}
|
|
17299
|
-
|
|
17513
|
+
const configured = toModelEntry(run.model);
|
|
17514
|
+
return {
|
|
17515
|
+
id,
|
|
17516
|
+
childSessionId: id || undefined,
|
|
17517
|
+
...configured ? { attemptedModel: configured.model } : {},
|
|
17518
|
+
...configured?.sourceConfigKey ? { modelConfigKey: configured.sourceConfigKey } : {}
|
|
17519
|
+
};
|
|
17300
17520
|
},
|
|
17301
17521
|
async attempt(handle, request) {
|
|
17302
17522
|
if (!client)
|
|
17303
17523
|
throw new Error("Hidden completion client is unavailable");
|
|
17524
|
+
const identity = runIdentities.get(handle.id);
|
|
17525
|
+
const requestedModel = request.body?.model;
|
|
17526
|
+
const requestedRef = requestedModel && typeof requestedModel.providerID === "string" && typeof requestedModel.modelID === "string" ? `${requestedModel.providerID}/${requestedModel.modelID}` : undefined;
|
|
17527
|
+
const matchingConfigured = (identity?.configuredModels ?? []).map(toModelEntry).find((entry) => entry?.model === requestedRef);
|
|
17528
|
+
const configured = matchingConfigured ?? (requestedRef && identity?.model && toModelEntry(identity.model)?.model === requestedRef ? toModelEntry(identity.model) : toModelEntry(identity?.model));
|
|
17529
|
+
handle.attemptedModel = requestedRef ?? configured?.model ?? handle.attemptedModel;
|
|
17530
|
+
handle.modelConfigKey = configured?.sourceConfigKey ?? handle.modelConfigKey;
|
|
17304
17531
|
if (supportsPromptAsync(client)) {
|
|
17305
17532
|
try {
|
|
17306
|
-
await promptAsyncAndWaitForIdle(client, request
|
|
17533
|
+
await promptAsyncAndWaitForIdle(client, request, {
|
|
17534
|
+
modelConfigKey: handle.modelConfigKey
|
|
17535
|
+
});
|
|
17307
17536
|
} catch (error) {
|
|
17308
|
-
if (
|
|
17309
|
-
|
|
17537
|
+
if (isHostSessionError(error)) {
|
|
17538
|
+
const hostError = hostSessionErrorOf(error);
|
|
17539
|
+
hostErrors.set(handle.id, hostError);
|
|
17540
|
+
annotateSubagentInvocationError(error, {
|
|
17541
|
+
attemptedModel: handle.attemptedModel,
|
|
17542
|
+
modelConfigKey: handle.modelConfigKey,
|
|
17543
|
+
hostError
|
|
17544
|
+
});
|
|
17545
|
+
if (historianChildren.has(handle.id))
|
|
17546
|
+
return;
|
|
17547
|
+
}
|
|
17310
17548
|
throw error;
|
|
17311
17549
|
}
|
|
17312
17550
|
return;
|
|
@@ -17324,9 +17562,16 @@ function createV1HiddenCompletionExecutor(client, db, directory) {
|
|
|
17324
17562
|
preferResponseOnMissingData: true
|
|
17325
17563
|
});
|
|
17326
17564
|
const assistantFailure = extractLatestAssistantFailure(messages);
|
|
17565
|
+
const hostError = hostErrors.get(handle.id);
|
|
17327
17566
|
if (assistantFailure) {
|
|
17328
17567
|
const finish = assistantFailure.finish ? ` (finish=${assistantFailure.finish})` : "";
|
|
17329
|
-
|
|
17568
|
+
const error = new Error(`Historian host recorded an assistant error${finish}: ${describeAssistantFailure(assistantFailure.error)}`, hostError === undefined ? undefined : { cause: hostError });
|
|
17569
|
+
annotateSubagentInvocationError(error, {
|
|
17570
|
+
attemptedModel: handle.attemptedModel,
|
|
17571
|
+
modelConfigKey: handle.modelConfigKey,
|
|
17572
|
+
hostError
|
|
17573
|
+
});
|
|
17574
|
+
throw error;
|
|
17330
17575
|
}
|
|
17331
17576
|
const text = extractLatestAssistantText(messages);
|
|
17332
17577
|
const latest = Array.isArray(messages) ? messages.filter((message) => isRecord(message) && isRecord(message.info) && message.info.role === "assistant").sort((left, right) => historianMessageCreatedAt(right) - historianMessageCreatedAt(left))[0] : undefined;
|
|
@@ -17337,13 +17582,18 @@ function createV1HiddenCompletionExecutor(client, db, directory) {
|
|
|
17337
17582
|
reasoning: text ? null : extractLatestHistorianReasoning(messages),
|
|
17338
17583
|
lengthCapped: hasLengthCappedOutput(messages),
|
|
17339
17584
|
usage: sumTokensFromChildMessages(messages),
|
|
17340
|
-
tokenLog: runTokenLog(info.tokens, undefined, info.finish ?? info.finish_reason ?? info.finishReason)
|
|
17585
|
+
tokenLog: runTokenLog(info.tokens, undefined, info.finish ?? info.finish_reason ?? info.finishReason),
|
|
17586
|
+
attemptedModel: handle.attemptedModel,
|
|
17587
|
+
modelConfigKey: handle.modelConfigKey,
|
|
17588
|
+
...hostError === undefined ? {} : { hostError }
|
|
17341
17589
|
};
|
|
17342
17590
|
},
|
|
17343
17591
|
async close(handle, settlement) {
|
|
17344
17592
|
if (handle?.id) {
|
|
17345
17593
|
rememberV1HiddenRun(handle.id, undefined);
|
|
17346
17594
|
historianChildren.delete(handle.id);
|
|
17595
|
+
hostErrors.delete(handle.id);
|
|
17596
|
+
runIdentities.delete(handle.id);
|
|
17347
17597
|
forgetHistorianOutputCap(handle.id);
|
|
17348
17598
|
}
|
|
17349
17599
|
if (!client)
|
|
@@ -17498,7 +17748,8 @@ async function runHistorianPrompt(args) {
|
|
|
17498
17748
|
if (invocationRecorded)
|
|
17499
17749
|
return null;
|
|
17500
17750
|
invocationRecorded = true;
|
|
17501
|
-
const
|
|
17751
|
+
const configuredModel = toModelEntry(modelOverride);
|
|
17752
|
+
const actualModelRef = completion?.providerId && completion.modelId ? `${completion.providerId}/${completion.modelId}` : handle?.attemptedModel ?? configuredModel?.model ?? null;
|
|
17502
17753
|
const usedConfiguredFallback = actualModelRef !== null && (fallbackModels ?? []).some((candidate) => toModelEntry(candidate)?.model === actualModelRef);
|
|
17503
17754
|
return recordChildInvocation({
|
|
17504
17755
|
db: openDatabase(),
|
|
@@ -17514,6 +17765,10 @@ async function runHistorianPrompt(args) {
|
|
|
17514
17765
|
providerId: completion.providerId,
|
|
17515
17766
|
modelId: completion.modelId
|
|
17516
17767
|
} : {},
|
|
17768
|
+
attemptedModel: handle?.attemptedModel ?? modelOverride,
|
|
17769
|
+
configuredModels: fallbackModels,
|
|
17770
|
+
modelConfigKey: handle?.modelConfigKey ?? configuredModel?.sourceConfigKey,
|
|
17771
|
+
hostError: params.hostError ?? completion?.hostError,
|
|
17517
17772
|
error: params.error,
|
|
17518
17773
|
parentInvocationId: agentId === HISTORIAN_EDITOR_AGENT ? parentInvocationId ?? null : null
|
|
17519
17774
|
});
|
|
@@ -17627,7 +17882,8 @@ async function runHistorianPrompt(args) {
|
|
|
17627
17882
|
const invocationId = recordInvocation({
|
|
17628
17883
|
status: emptyError ? "empty" : "completed",
|
|
17629
17884
|
messages: completion.messages,
|
|
17630
|
-
error: emptyError
|
|
17885
|
+
error: emptyError,
|
|
17886
|
+
hostError: completion.hostError
|
|
17631
17887
|
});
|
|
17632
17888
|
if (emptyError && (!reasoningResult || lengthCapped)) {
|
|
17633
17889
|
return {
|
|
@@ -17834,19 +18090,19 @@ async function embedAndStoreCompartmentChunks(db, sessionId, projectPath, compar
|
|
|
17834
18090
|
const maxInputTokens = getProjectEmbeddingMaxInputTokens2(projectPath);
|
|
17835
18091
|
for (const compartment of compartments) {
|
|
17836
18092
|
try {
|
|
17837
|
-
const fromMemory = compartment.sourceChunkText ?
|
|
17838
|
-
const mappedText = fromMemory ? fromMemory :
|
|
18093
|
+
const fromMemory = compartment.sourceChunkText ? canonicalizeInMemoryChunkTextForEmbedding2(compartment.sourceChunkText, compartment.startMessage, compartment.endMessage) : "";
|
|
18094
|
+
const mappedText = fromMemory ? fromMemory : buildCanonicalChunkTextFromFts2(db, sessionId, compartment.startMessage, compartment.endMessage);
|
|
17839
18095
|
if (mappedText === null)
|
|
17840
18096
|
continue;
|
|
17841
|
-
const canonicalText = mappedText ||
|
|
18097
|
+
const canonicalText = mappedText || buildCompartmentSummaryFallbackText2(db, compartment.id);
|
|
17842
18098
|
if (canonicalText.length === 0)
|
|
17843
18099
|
continue;
|
|
17844
|
-
const windows =
|
|
18100
|
+
const windows = chunkCanonicalText2(canonicalText, compartment.startMessage, compartment.endMessage, maxInputTokens);
|
|
17845
18101
|
if (windows.length === 0)
|
|
17846
18102
|
continue;
|
|
17847
|
-
const windowSourceKey =
|
|
18103
|
+
const windowSourceKey = chunkWindowSourceKey2(canonicalText, compartment.startMessage, compartment.endMessage, maxInputTokens);
|
|
17848
18104
|
const currentModelId = getProjectChunkEmbeddingModelId2(projectPath);
|
|
17849
|
-
if (currentModelId !== "off" &&
|
|
18105
|
+
if (currentModelId !== "off" && chunkEmbeddingWindowsAreCurrent2(db, compartment.id, currentModelId, windows, projectPath)) {
|
|
17850
18106
|
continue;
|
|
17851
18107
|
}
|
|
17852
18108
|
const result = await embedItemsForProject2(projectPath, windows.map((window) => ({
|
|
@@ -17856,7 +18112,7 @@ async function embedAndStoreCompartmentChunks(db, sessionId, projectPath, compar
|
|
|
17856
18112
|
})), undefined, db, sessionId);
|
|
17857
18113
|
if (!result)
|
|
17858
18114
|
continue;
|
|
17859
|
-
if (
|
|
18115
|
+
if (chunkEmbeddingWindowsAreCurrent2(db, compartment.id, currentModelId, windows, projectPath)) {
|
|
17860
18116
|
continue;
|
|
17861
18117
|
}
|
|
17862
18118
|
const rows = [];
|
|
@@ -17874,7 +18130,7 @@ async function embedAndStoreCompartmentChunks(db, sessionId, projectPath, compar
|
|
|
17874
18130
|
});
|
|
17875
18131
|
}
|
|
17876
18132
|
if (rows.length === windows.length) {
|
|
17877
|
-
|
|
18133
|
+
replaceCompartmentChunkEmbeddings2(db, rows, windowSourceKey);
|
|
17878
18134
|
enqueueShadowEmbeddingItems2(projectPath, "chunk", [String(compartment.id)]);
|
|
17879
18135
|
}
|
|
17880
18136
|
} catch (error) {
|
|
@@ -19327,7 +19583,8 @@ function resolveProtectedTailBoundary(ctx) {
|
|
|
19327
19583
|
break;
|
|
19328
19584
|
}
|
|
19329
19585
|
livePromptFloor.ordinal = lastMeaningfulUserOrdinal || null;
|
|
19330
|
-
|
|
19586
|
+
livePromptFloor.messageId = boundaryMessageId(index, lastMeaningfulUserOrdinal);
|
|
19587
|
+
if (!ctx.liftLivePromptFloor && lastMeaningfulUserOrdinal >= offset) {
|
|
19331
19588
|
protectedTailStart = Math.min(protectedTailStart, lastMeaningfulUserOrdinal);
|
|
19332
19589
|
}
|
|
19333
19590
|
}
|
|
@@ -19455,6 +19712,7 @@ function resolveBoundaryContext(args) {
|
|
|
19455
19712
|
protectedTailPolicyVersion: meta.protectedTailPolicyVersion,
|
|
19456
19713
|
migrationFloorActive,
|
|
19457
19714
|
emergencyTailScale: args.emergencyTailScale,
|
|
19715
|
+
liftLivePromptFloor: args.liftLivePromptFloor,
|
|
19458
19716
|
providerShapeVersion: args.providerShapeVersion ?? "opencode-v1",
|
|
19459
19717
|
cacheNamespace: args.cacheNamespace ?? `opencode:${args.sessionId}`,
|
|
19460
19718
|
storedTokenTotalsForMessages,
|
|
@@ -20566,7 +20824,7 @@ function promoteRecompStagingWithM0Mutation(db, sessionId, holderId) {
|
|
|
20566
20824
|
finished = true;
|
|
20567
20825
|
return null;
|
|
20568
20826
|
}
|
|
20569
|
-
|
|
20827
|
+
deleteChunkEmbedBackoffForSession2(db, sessionId);
|
|
20570
20828
|
db.prepare("DELETE FROM compartments WHERE session_id = ?").run(sessionId);
|
|
20571
20829
|
db.prepare("DELETE FROM session_facts WHERE session_id = ?").run(sessionId);
|
|
20572
20830
|
insertRecompCompartmentRows(db, sessionId, staging.compartments, now);
|
|
@@ -21516,4 +21774,4 @@ async function executeContextRecomp(deps, options = {}) {
|
|
|
21516
21774
|
return (await executeContextRecompWithResult(deps, options)).message;
|
|
21517
21775
|
}
|
|
21518
21776
|
|
|
21519
|
-
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, queueM0Mutation, getMaxM0MutationId, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getUncoveredCompartmentEndsThrough, providerResponseFailed, isSuccessfulProviderCompletion, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, markSessionCleanupPending, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, clearSession, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, clearPendingMaterialization, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, isHeldHeadForRequest, deferDeliveredSystemRefresh, retirePendingSystemPromptDelivery, lkgProviderInputTotal, beginV2LkgRequest, claimLkgRequestIdentity, currentLkgRequestIdentity, noteCapturedLkgRequest, noteLkgProviderResponse, measuredLkgPrefix, clearLkgMeasuredRequest, saveLkgSlotToDb, clearPersistedLkgSlotStrict, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, resolveLkgModelKeys, createLkgEntryProjector, captureLkgSlot, validateAnthropicReasoningRuns, validateLkgSeam, replayLkg, coldStartRawServedIndex, coldStartUncapturedReplay, noteUncertifiedNormalLkg, hasProcessLocalLkgProof, lkgDirtyRevision, rememberLkgDirtyRevision, readPersistedLkgUntaggedInputIds, persistLkgUntaggedInputIds, noteLkgRecoveryPrefix, readLkgRecoveryPrefix, noteLkgHealthyPrefix, lkgRecoveryReplayUnproven, lkgRecoveryEntryUnproven, registerLkgPersistence, beginLkgPass, visitMessageContentFields, contentSnapshotValue, messageContentFields, signatureForFields, exactReusablePrefix, incrementalLkgContentDigests, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, forgetInMemorySlot, dropSlot, noteEntry, getLkgSlotHeapStats, TOOL_SWEEP_SCOPED_MARKER, useScopedToolSweep, createPreAdoptionToolSweepResolver, copySessionStateForClone, queueMemoryMutation, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, failedInvocationStatus, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, prepareCompactionMarkerCandidates, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|
|
21777
|
+
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, queueM0Mutation, getMaxM0MutationId, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getUncoveredCompartmentEndsThrough, providerResponseFailed, isSuccessfulProviderCompletion, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, markSessionCleanupPending, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, clearSession, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, clearPendingMaterialization, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, isHeldHeadForRequest, deferDeliveredSystemRefresh, retirePendingSystemPromptDelivery, lkgProviderInputTotal, beginV2LkgRequest, claimLkgRequestIdentity, currentLkgRequestIdentity, noteCapturedLkgRequest, noteLkgProviderResponse, measuredLkgPrefix, clearLkgMeasuredRequest, saveLkgSlotToDb, clearPersistedLkgSlotStrict, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, resolveLkgModelKeys, createLkgEntryProjector, captureLkgSlot, validateAnthropicReasoningRuns, validateLkgSeam, replayLkg, coldStartRawServedIndex, coldStartUncapturedReplay, noteUncertifiedNormalLkg, hasProcessLocalLkgProof, lkgDirtyRevision, rememberLkgDirtyRevision, readPersistedLkgUntaggedInputIds, persistLkgUntaggedInputIds, noteLkgRecoveryPrefix, readLkgRecoveryPrefix, noteLkgHealthyPrefix, lkgRecoveryReplayUnproven, lkgRecoveryEntryUnproven, registerLkgPersistence, beginLkgPass, visitMessageContentFields, contentSnapshotValue, messageContentFields, signatureForFields, exactReusablePrefix, incrementalLkgContentDigests, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, forgetInMemorySlot, dropSlot, noteEntry, getLkgSlotHeapStats, TOOL_SWEEP_SCOPED_MARKER, useScopedToolSweep, createPreAdoptionToolSweepResolver, copySessionStateForClone, queueMemoryMutation, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, prepareCompactionMarkerCandidates, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|