@cortexkit/opencode-magic-context 0.48.0 → 0.49.1
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/{announcement-fp14dw0n.js → announcement-hdbkt8v5.js} +1 -1
- package/dist/auto-search-worker.js +3 -3
- package/dist/config/{mural-model-deprecation.d.ts → deprecated-config.d.ts} +4 -1
- package/dist/config/deprecated-config.d.ts.map +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +2 -2
- package/dist/config/schema/magic-context.d.ts +4 -4
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-w8cykrnf.js → conflict-warning-hook-asnt6hfc.js} +7 -7
- package/dist/{context-m0cy262m.js → context-tfyhtdcs.js} +187 -68
- package/dist/{derive-budgets-sg0xsq7s.js → derive-budgets-j4ry8j8n.js} +2 -2
- package/dist/embedding-backfill-wyc3ykyf.js +21 -0
- package/dist/embedding-worker-process.js +30 -0
- package/dist/embedding-worker.js +6 -6
- package/dist/features/magic-context/dreamer/task-registry.d.ts +2 -3
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +8 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-process.d.ts +2 -0
- package/dist/features/magic-context/memory/embedding-worker-process.d.ts.map +1 -0
- package/dist/features/magic-context/memory/onnx-telemetry.d.ts +3 -0
- package/dist/features/magic-context/memory/onnx-telemetry.d.ts.map +1 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +1 -2
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts +1 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts.map +1 -1
- package/dist/features/magic-context/search-rerank.d.ts +35 -0
- package/dist/features/magic-context/search-rerank.d.ts.map +1 -0
- package/dist/features/magic-context/search.d.ts +11 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +13 -2
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +2 -0
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts +29 -9
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +9 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +1 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +2 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +4 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts +1 -0
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-deadline.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-replay.fixture.d.ts +24 -0
- package/dist/hooks/magic-context/auto-search-replay.fixture.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts +2 -0
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +2 -0
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts +28 -0
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +1 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-host-runner.d.ts +8 -0
- package/dist/hooks/magic-context/historian-host-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +3 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts +7 -0
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts +8 -14
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +62 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +38 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/opaque-thinking.d.ts +12 -0
- package/dist/hooks/magic-context/opaque-thinking.d.ts.map +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts +3 -2
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts +8 -0
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts +7 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +3 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +35 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +37 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts +8 -1
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts.map +1 -1
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts +8 -0
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +5 -2
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +29 -0
- package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts +6 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts +47 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +4 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +8 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +15 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +7 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-ty64eqcn.js → index-0pjvpfkf.js} +24 -4
- package/dist/{index-db7zwa3v.js → index-1bt88epp.js} +93 -9
- package/dist/{index-2y0s2hep.js → index-4mjhqadz.js} +1 -1
- package/dist/index-6m7rdv7y.js +733 -0
- package/dist/{index-k1xb52kd.js → index-6tfxmc4n.js} +11 -11
- package/dist/{index-fbv1dn35.js → index-7w18gg78.js} +26 -2
- package/dist/{index-7mx8v0pw.js → index-att4bfan.js} +4 -4
- package/dist/{index-mmyh6d8f.js → index-eypn4ba6.js} +11 -6
- package/dist/{index-q2tqeqde.js → index-fdtkt5r1.js} +1229 -78
- package/dist/{index-c43kr12f.js → index-fg00p1cg.js} +42 -40
- package/dist/{v2/server-1bc61ans.js → index-fvnzcnww.js} +44 -1
- package/dist/index-gbmqa9x9.js +1170 -0
- package/dist/{index-knh4y330.js → index-gzky5rva.js} +31 -49
- package/dist/{index-0qhce371.js → index-h2wc01qk.js} +2 -2
- package/dist/{index-dhwzyd54.js → index-h5zfkjyk.js} +160 -25
- package/dist/{index-bhvjj0ys.js → index-k6xvbj2e.js} +255 -1075
- package/dist/{index-0w56v4fm.js → index-mw7c950g.js} +1 -1
- package/dist/{index-8j7gqj40.js → index-nsjyysj0.js} +6 -2
- package/dist/{index-k9nnwad5.js → index-nydv6g8r.js} +44 -7
- package/dist/{index-f0h6xwqm.js → index-p0n5ryq8.js} +304 -960
- package/dist/{index-pg50n748.js → index-p1hnwfd8.js} +4 -4
- package/dist/{index-1qb0z7wa.js → index-qx53vezw.js} +1 -1
- package/dist/{index-5zygecde.js → index-r2zcs71c.js} +8 -6
- package/dist/{index-cb7emxgj.js → index-rafsaxac.js} +336 -6
- package/dist/{index-z8e0psj8.js → index-s7fc0fkn.js} +3 -3
- package/dist/{index-14cjxt20.js → index-sfhndpcb.js} +505 -11
- package/dist/index-sv0bb7vg.js +6972 -0
- package/dist/{index-jcbd3znx.js → index-tqf7yg27.js} +1 -1
- package/dist/{index-72nhv486.js → index-vkbqdnkj.js} +2 -2
- package/dist/{index-pdecwzrd.js → index-w23dh319.js} +18 -259
- package/dist/{index-yq8n9qcb.js → index-xgrwmj82.js} +4 -4
- package/dist/{index-0an7742d.js → index-xnanvj3w.js} +1364 -2278
- package/dist/{index-eeezr5zz.js → index-z1tjp257.js} +1 -1
- package/dist/{index-692jzy0p.js → index-zfzdpeq2.js} +2279 -4061
- package/dist/{index-q7h7csab.js → index-zg8yq4ya.js} +34 -749
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +241 -76
- package/dist/{logger-d3wex3dz.js → logger-ewak5q1s.js} +1 -1
- package/dist/{message-index-bounded-7ezbgddp.js → message-index-bounded-hqktkhdy.js} +15 -14
- package/dist/{message-time-backfill-brbd63hv.js → message-time-backfill-8x06r9kx.js} +2 -2
- package/dist/migration-worker.js +11 -10
- package/dist/plugin/hooks/create-session-hooks.d.ts +5 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/{project-embedding-registry-7qzptcw7.js → project-embedding-registry-0gv3h6y8.js} +10 -10
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-6k83m4fj.js → read-session-chunk-5mh0bh8y.js} +12 -9
- package/dist/{read-session-raw-3g9qy1xa.js → read-session-raw-8sjbc9h0.js} +5 -3
- package/dist/{recomp-orchestrator-d3fp1cy0.js → recomp-orchestrator-kpkhkjhq.js} +28 -27
- package/dist/{safe-notification-target-5ffqq32m.js → safe-notification-target-q0cyrx3x.js} +2 -2
- package/dist/{search-epax1ecv.js → search-p9w39qv4.js} +22 -21
- package/dist/{send-session-notification-erecz4y4.js → send-session-notification-xffh3bbe.js} +5 -5
- package/dist/shared/auto-search-lifecycle.d.ts +14 -0
- package/dist/shared/auto-search-lifecycle.d.ts.map +1 -1
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/models-dev-temperature.d.ts +18 -0
- package/dist/shared/models-dev-temperature.d.ts.map +1 -0
- package/dist/shared/project-directory-key.d.ts +16 -0
- package/dist/shared/project-directory-key.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts +9 -0
- package/dist/shared/storage-file-mutex.d.ts.map +1 -0
- package/dist/shared/storage-permissions.d.ts +6 -0
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/subagent-temperature.d.ts +46 -0
- package/dist/shared/subagent-temperature.d.ts.map +1 -0
- package/dist/shared/window-geometry.d.ts +9 -66
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/standalone-plugin-marker.d.ts +8 -0
- package/dist/standalone-plugin-marker.d.ts.map +1 -0
- package/dist/{storage-tags-d3b0v2ss.js → storage-tags-k0pda32s.js} +6 -4
- package/dist/tools/ctx-reduce/constants.d.ts +1 -2
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/types.d.ts +1 -0
- package/dist/tools/ctx-search/types.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-spcy2qre.js → transform-postprocess-phase-481j5a7z.js} +28 -27
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/{context-sf98kstd.js → context-gsdtha5v.js} +1619 -3111
- package/dist/v2/{derive-budgets-3vc0y84t.js → derive-budgets-enckmg7y.js} +3 -3
- package/dist/v2/embedding-backfill-dbvjbcmm.js +20 -0
- package/dist/v2/embedding-worker-process.js +29 -0
- package/dist/v2/embedding-worker.js +6 -7
- package/dist/v2/hidden-child-native.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +7 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/copied-tag-notation.d.ts +19 -0
- package/dist/v2/hooks/copied-tag-notation.d.ts.map +1 -0
- package/dist/v2/hooks/dream-trigger.d.ts +4 -1
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +9 -2
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/system-prompt-response.d.ts +5 -0
- package/dist/v2/hooks/system-prompt-response.d.ts.map +1 -0
- package/dist/v2/{logger-mxd0ym09.js → logger-pj02s7sr.js} +1 -1
- package/dist/v2/{message-index-bounded-dy3s2k1e.js → message-index-bounded-p6v0n8qh.js} +15 -14
- package/dist/v2/{message-time-backfill-gtx1pwk1.js → message-time-backfill-cje68egj.js} +2 -2
- package/dist/v2/migration-worker.js +11 -10
- package/dist/v2/{project-embedding-registry-1tgba5dv.js → project-embedding-registry-nyq7z8y6.js} +11 -12
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-rh4khdkv.js → read-session-chunk-fhyfe4qa.js} +12 -9
- package/dist/v2/{read-session-raw-bsbmf0vj.js → read-session-raw-j8dvp7f4.js} +5 -3
- package/dist/v2/recomp-orchestrator-5xy7w136.js +57 -0
- package/dist/v2/{safe-notification-target-73ax1p5v.js → safe-notification-target-y3p1hce9.js} +2 -2
- package/dist/v2/{search-nzkwrc6n.js → search-j7bakcwa.js} +23 -23
- package/dist/v2/{send-session-notification-6km439kn.js → send-session-notification-f6v698r5.js} +5 -5
- package/dist/v2/{server-7wwc2nga.js → server-1fszbabv.js} +32 -32
- package/dist/v2/{server-k228xhjg.js → server-2htmbqbv.js} +26 -2
- package/dist/v2/{server-aan4q8mx.js → server-3t0q2cqx.js} +1 -1
- package/dist/v2/{server-686jg6eb.js → server-4c7jt8gq.js} +68 -7
- package/dist/v2/{server-xxm59eww.js → server-4enr7s6x.js} +4 -4
- package/dist/v2/{server-zxhgvsf9.js → server-676xw7at.js} +1 -1
- package/dist/v2/{server-52awr2mw.js → server-6byqfbqf.js} +93 -9
- package/dist/v2/{server-e0vdaae2.js → server-6tcrjfw8.js} +4 -4
- package/dist/v2/{server-qye6ykf7.js → server-7ekna9zs.js} +2 -2
- package/dist/v2/{server-g5r0n3b6.js → server-7h861yms.js} +160 -25
- package/dist/v2/{server-k8x2rbxc.js → server-7spkq1y6.js} +3457 -5192
- package/dist/v2/{server-8pyt7hev.js → server-7vkj6zhb.js} +34 -749
- package/dist/v2/{server-yczc713m.js → server-8xmq9h3f.js} +31 -49
- package/dist/v2/{server-sggvvzhb.js → server-bgzy0phk.js} +505 -11
- package/dist/v2/server-c7n2ftng.js +6860 -0
- package/dist/v2/server-cvgn49tr.js +733 -0
- package/dist/v2/{server-zm570tr2.js → server-cw6521wn.js} +232 -7
- package/dist/v2/{server-xdfwt6kh.js → server-czb2rkpk.js} +23 -3
- package/dist/v2/{server-x2g40a71.js → server-d6g4whc2.js} +21 -15
- package/dist/{index-1bc61ans.js → v2/server-fvnzcnww.js} +44 -1
- package/dist/v2/{server-4k748ke6.js → server-hb6xhh9q.js} +2 -2
- package/dist/v2/{server-gjcr4w98.js → server-kh958yj8.js} +5 -5
- package/dist/v2/{server-1r6pmz4f.js → server-kzns2hbz.js} +1 -1
- package/dist/v2/{server-psqc7e9n.js → server-mqvtz7wz.js} +1227 -78
- package/dist/v2/{server-vqpf3167.js → server-ras2sxnc.js} +135 -15
- package/dist/v2/{server-ezhze64f.js → server-s2st631p.js} +4 -4
- package/dist/v2/{server-5m3dt5r1.js → server-t4k4qexw.js} +6 -2
- package/dist/v2/{server-z2037m6z.js → server-t528t8qm.js} +2 -2
- package/dist/v2/{server-v06jcv0w.js → server-vb7pbd9p.js} +18 -259
- package/dist/v2/{server-8tqanswc.js → server-zbxjj2mz.js} +331 -4
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +150 -6
- package/dist/v2/{storage-tags-w4tv77sn.js → storage-tags-5yxrvkaf.js} +6 -4
- package/dist/v2/store-reader.d.ts +8 -2
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-mz7efs7w.js → wrapup-orchestrator-yem5422s.js} +36 -36
- package/dist/wrapup-orchestrator-xvrr27ws.js +45 -0
- package/package.json +4 -4
- package/src/config/{mural-model-deprecation.ts → deprecated-config.ts} +19 -0
- package/src/config/index.test.ts +15 -37
- package/src/config/index.ts +2 -3
- package/src/config/project-security.ts +3 -3
- package/src/config/schema/magic-context.ts +11 -7
- package/src/features/magic-context/dreamer/task-registry.ts +2 -3
- package/src/shared/auto-search-lifecycle.ts +43 -0
- package/src/shared/logger.test.ts +38 -0
- package/src/shared/logger.ts +10 -2
- package/src/shared/models-dev-cache.ts +1 -7
- package/src/shared/models-dev-temperature.ts +107 -0
- package/src/shared/project-directory-key.test.ts +59 -0
- package/src/shared/project-directory-key.ts +20 -0
- package/src/shared/sqlite-640-review.test.ts +5 -1
- package/src/shared/storage-file-mutex-review.test.ts +162 -0
- package/src/shared/storage-file-mutex.ts +130 -0
- package/src/shared/storage-permissions.ts +46 -0
- package/src/shared/subagent-temperature.test.ts +270 -0
- package/src/shared/subagent-temperature.ts +110 -0
- package/src/shared/window-geometry.test.ts +102 -236
- package/src/shared/window-geometry.ts +23 -413
- package/dist/config/mural-model-deprecation.d.ts.map +0 -1
- package/dist/embedding-backfill-9rcm1mfy.js +0 -21
- package/dist/index-bdckkfw6.js +0 -3261
- package/dist/index-mfkzp7qj.js +0 -229
- package/dist/v2/embedding-backfill-vn8g1nh1.js +0 -21
- package/dist/v2/recomp-orchestrator-az61rfcg.js +0 -57
- package/dist/v2/server-2fbhp79z.js +0 -3205
- package/dist/v2/server-mfkzp7qj.js +0 -229
- package/dist/wrapup-orchestrator-amzta1t4.js +0 -44
- package/src/shared/__fixtures__/window-overlay.v1.json +0 -337
- /package/dist/{index-2pp04pmg.js → index-69vas84q.js} +0 -0
- /package/dist/v2/{index-2pp04pmg.js → index-69vas84q.js} +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toolTemplateError
|
|
3
|
-
} from "./server-mfkzp7qj.js";
|
|
4
1
|
import {
|
|
5
2
|
DEFAULT_PROTECTED_TOOLS,
|
|
6
3
|
mergeProtectedTools
|
|
@@ -5090,6 +5087,234 @@ function nextDueAtMs(expression, afterMs, consumedScheduledAtMs, maxSearchMs = M
|
|
|
5090
5087
|
return next ? next.getTime() : null;
|
|
5091
5088
|
}
|
|
5092
5089
|
|
|
5090
|
+
// src/shared/historian-tool-template.ts
|
|
5091
|
+
class Parser {
|
|
5092
|
+
source;
|
|
5093
|
+
pos = 0;
|
|
5094
|
+
constructor(source) {
|
|
5095
|
+
this.source = source;
|
|
5096
|
+
}
|
|
5097
|
+
error() {
|
|
5098
|
+
throw new Error(`Invalid tool expansion template at character ${this.pos + 1}`);
|
|
5099
|
+
}
|
|
5100
|
+
take(value) {
|
|
5101
|
+
if (!this.source.startsWith(value, this.pos))
|
|
5102
|
+
return false;
|
|
5103
|
+
this.pos += value.length;
|
|
5104
|
+
return true;
|
|
5105
|
+
}
|
|
5106
|
+
field() {
|
|
5107
|
+
const match = /^[A-Za-z_][A-Za-z0-9_-]*/.exec(this.source.slice(this.pos));
|
|
5108
|
+
if (!match)
|
|
5109
|
+
return this.error();
|
|
5110
|
+
this.pos += match[0].length;
|
|
5111
|
+
return match[0];
|
|
5112
|
+
}
|
|
5113
|
+
quoted() {
|
|
5114
|
+
const start = this.pos;
|
|
5115
|
+
if (!this.take('"'))
|
|
5116
|
+
return this.error();
|
|
5117
|
+
while (this.pos < this.source.length) {
|
|
5118
|
+
if (this.take("\\")) {
|
|
5119
|
+
this.pos++;
|
|
5120
|
+
continue;
|
|
5121
|
+
}
|
|
5122
|
+
if (this.take('"')) {
|
|
5123
|
+
try {
|
|
5124
|
+
return JSON.parse(this.source.slice(start, this.pos));
|
|
5125
|
+
} catch {
|
|
5126
|
+
return this.error();
|
|
5127
|
+
}
|
|
5128
|
+
}
|
|
5129
|
+
this.pos++;
|
|
5130
|
+
}
|
|
5131
|
+
return this.error();
|
|
5132
|
+
}
|
|
5133
|
+
integer() {
|
|
5134
|
+
const match = /^\d+/.exec(this.source.slice(this.pos));
|
|
5135
|
+
if (!match)
|
|
5136
|
+
return this.error();
|
|
5137
|
+
this.pos += match[0].length;
|
|
5138
|
+
const n = Number(match[0]);
|
|
5139
|
+
if (!Number.isSafeInteger(n))
|
|
5140
|
+
return this.error();
|
|
5141
|
+
return n;
|
|
5142
|
+
}
|
|
5143
|
+
expression(relative) {
|
|
5144
|
+
const steps = [];
|
|
5145
|
+
if (!(relative && this.take("."))) {
|
|
5146
|
+
const root = this.field();
|
|
5147
|
+
if (!relative && root !== "input" && root !== "output")
|
|
5148
|
+
return this.error();
|
|
5149
|
+
steps.push({ field: root });
|
|
5150
|
+
}
|
|
5151
|
+
while (true) {
|
|
5152
|
+
if (this.take("[")) {
|
|
5153
|
+
if (this.take("*]."))
|
|
5154
|
+
steps.push({ project: this.field() });
|
|
5155
|
+
else {
|
|
5156
|
+
const index = this.integer();
|
|
5157
|
+
if (!this.take("]"))
|
|
5158
|
+
return this.error();
|
|
5159
|
+
steps.push({ index });
|
|
5160
|
+
}
|
|
5161
|
+
} else if (this.source[this.pos] === "." && !/^\.(each\(|join\(|count(?:\.|\})|truncate\()/.test(this.source.slice(this.pos))) {
|
|
5162
|
+
this.pos++;
|
|
5163
|
+
steps.push({ field: this.field() });
|
|
5164
|
+
if (this.source[this.pos] === "(")
|
|
5165
|
+
return this.error();
|
|
5166
|
+
} else
|
|
5167
|
+
break;
|
|
5168
|
+
}
|
|
5169
|
+
const expression = { steps };
|
|
5170
|
+
if (this.take(".each(")) {
|
|
5171
|
+
if (relative)
|
|
5172
|
+
return this.error();
|
|
5173
|
+
expression.each = parseTemplate(this.quoted(), true);
|
|
5174
|
+
if (!this.take(")"))
|
|
5175
|
+
return this.error();
|
|
5176
|
+
}
|
|
5177
|
+
if (this.take(".join(")) {
|
|
5178
|
+
expression.join = this.quoted();
|
|
5179
|
+
if (!this.take(")"))
|
|
5180
|
+
return this.error();
|
|
5181
|
+
}
|
|
5182
|
+
if (this.take(".count")) {
|
|
5183
|
+
if (expression.each || expression.join !== undefined)
|
|
5184
|
+
return this.error();
|
|
5185
|
+
expression.count = true;
|
|
5186
|
+
}
|
|
5187
|
+
if (this.take(".truncate(")) {
|
|
5188
|
+
expression.cap = this.integer();
|
|
5189
|
+
if (!this.take(")"))
|
|
5190
|
+
return this.error();
|
|
5191
|
+
}
|
|
5192
|
+
if (!this.take("}"))
|
|
5193
|
+
return this.error();
|
|
5194
|
+
return expression;
|
|
5195
|
+
}
|
|
5196
|
+
template(relative) {
|
|
5197
|
+
const nodes = [];
|
|
5198
|
+
while (this.pos < this.source.length) {
|
|
5199
|
+
const next = this.source.indexOf("${", this.pos);
|
|
5200
|
+
if (next < 0) {
|
|
5201
|
+
nodes.push(this.source.slice(this.pos));
|
|
5202
|
+
break;
|
|
5203
|
+
}
|
|
5204
|
+
nodes.push(this.source.slice(this.pos, next));
|
|
5205
|
+
this.pos = next + 2;
|
|
5206
|
+
nodes.push(this.expression(relative));
|
|
5207
|
+
}
|
|
5208
|
+
return nodes;
|
|
5209
|
+
}
|
|
5210
|
+
}
|
|
5211
|
+
function parseTemplate(source, relative = false) {
|
|
5212
|
+
return new Parser(source).template(relative);
|
|
5213
|
+
}
|
|
5214
|
+
function toolTemplateError(source) {
|
|
5215
|
+
try {
|
|
5216
|
+
parseTemplate(source);
|
|
5217
|
+
return;
|
|
5218
|
+
} catch (error) {
|
|
5219
|
+
return error.message;
|
|
5220
|
+
}
|
|
5221
|
+
}
|
|
5222
|
+
var templates = new Map;
|
|
5223
|
+
function compiled(source) {
|
|
5224
|
+
if (!templates.has(source)) {
|
|
5225
|
+
try {
|
|
5226
|
+
templates.set(source, parseTemplate(source));
|
|
5227
|
+
} catch {
|
|
5228
|
+
templates.set(source, null);
|
|
5229
|
+
}
|
|
5230
|
+
}
|
|
5231
|
+
return templates.get(source) ?? null;
|
|
5232
|
+
}
|
|
5233
|
+
function oneLine(value) {
|
|
5234
|
+
return value.replace(/[\r\n\u2028\u2029]+/g, " ");
|
|
5235
|
+
}
|
|
5236
|
+
function truncate(value, cap, legacyPreview = false) {
|
|
5237
|
+
const chars = Array.from(oneLine(value));
|
|
5238
|
+
if (cap === undefined || chars.length <= cap)
|
|
5239
|
+
return chars.join("");
|
|
5240
|
+
if (legacyPreview)
|
|
5241
|
+
return `${chars.slice(0, cap).join("")}…`;
|
|
5242
|
+
let end = 0;
|
|
5243
|
+
for (let i = 0;i < Math.min(cap, chars.length); i++) {
|
|
5244
|
+
if (!".!?。!?".includes(chars[i]))
|
|
5245
|
+
continue;
|
|
5246
|
+
let next = i + 1;
|
|
5247
|
+
while (next < chars.length && `"'”’)]`.includes(chars[next]))
|
|
5248
|
+
next++;
|
|
5249
|
+
if (next <= cap && ("。!?".includes(chars[i]) || next === chars.length || /[ \t]/.test(chars[next])))
|
|
5250
|
+
end = next;
|
|
5251
|
+
}
|
|
5252
|
+
return `${end ? `${chars.slice(0, end).join("")} ` : ""}[… ${chars.length - end} more characters]`;
|
|
5253
|
+
}
|
|
5254
|
+
function scalar(value) {
|
|
5255
|
+
if (value === undefined)
|
|
5256
|
+
return "";
|
|
5257
|
+
return typeof value === "string" ? value : compactJson(value);
|
|
5258
|
+
}
|
|
5259
|
+
function compactJson(value) {
|
|
5260
|
+
if (Array.isArray(value))
|
|
5261
|
+
return `[${value.map((v) => compactJson(v)).join(",")}]`;
|
|
5262
|
+
if (value !== null && typeof value === "object")
|
|
5263
|
+
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${compactJson(value[key])}`).join(",")}}`;
|
|
5264
|
+
return JSON.stringify(value) ?? "null";
|
|
5265
|
+
}
|
|
5266
|
+
function field(value, key) {
|
|
5267
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && Object.hasOwn(value, key) ? value[key] : undefined;
|
|
5268
|
+
}
|
|
5269
|
+
function render(nodes, root, legacyPreview) {
|
|
5270
|
+
return nodes.map((node) => {
|
|
5271
|
+
if (typeof node === "string")
|
|
5272
|
+
return node;
|
|
5273
|
+
const cap = node.cap ?? (legacyPreview ? 300 : undefined);
|
|
5274
|
+
let value = root;
|
|
5275
|
+
let list = false;
|
|
5276
|
+
for (const step of node.steps) {
|
|
5277
|
+
if ("field" in step)
|
|
5278
|
+
value = list && Array.isArray(value) ? value.map((item) => field(item, step.field)) : field(value, step.field);
|
|
5279
|
+
else if ("index" in step)
|
|
5280
|
+
value = Array.isArray(value) ? value[step.index] : undefined;
|
|
5281
|
+
else {
|
|
5282
|
+
value = Array.isArray(value) ? value.map((item) => field(item, step.project)) : undefined;
|
|
5283
|
+
list = true;
|
|
5284
|
+
}
|
|
5285
|
+
}
|
|
5286
|
+
if (node.count)
|
|
5287
|
+
return truncate(Array.isArray(value) ? String(value.length) : "", cap, legacyPreview);
|
|
5288
|
+
if (node.each || list || node.join !== undefined) {
|
|
5289
|
+
if (!Array.isArray(value))
|
|
5290
|
+
return "";
|
|
5291
|
+
const elements = value.slice(0, legacyPreview ? 10 : undefined).map((item) => truncate(node.each ? render(node.each, item, legacyPreview) : scalar(item), legacyPreview ? 300 : undefined, legacyPreview));
|
|
5292
|
+
if (legacyPreview && value.length > 10)
|
|
5293
|
+
elements.push(`… +${value.length - 10} more`);
|
|
5294
|
+
return truncate(elements.join(node.join ?? (node.each ? "; " : ", ")), cap, legacyPreview);
|
|
5295
|
+
}
|
|
5296
|
+
return truncate(scalar(value), cap, legacyPreview);
|
|
5297
|
+
}).join("");
|
|
5298
|
+
}
|
|
5299
|
+
function renderToolTemplate(source, input, output, legacyPreview = false) {
|
|
5300
|
+
const nodes = compiled(source);
|
|
5301
|
+
if (!nodes)
|
|
5302
|
+
return null;
|
|
5303
|
+
const text = typeof output === "string" ? output : output === undefined ? "" : compactJson(output);
|
|
5304
|
+
let structured = output;
|
|
5305
|
+
if (typeof output === "string") {
|
|
5306
|
+
try {
|
|
5307
|
+
const parsed = JSON.parse(output);
|
|
5308
|
+
structured = parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : undefined;
|
|
5309
|
+
} catch {
|
|
5310
|
+
structured = undefined;
|
|
5311
|
+
}
|
|
5312
|
+
}
|
|
5313
|
+
const root = { input, output: structured };
|
|
5314
|
+
const bareOutputNodes = nodes.map((node) => typeof node !== "string" && node.steps.length === 1 && ("field" in node.steps[0]) && node.steps[0].field === "output" && !node.each && !node.count && node.join === undefined ? truncate(text ?? "", node.cap ?? (legacyPreview ? 300 : undefined), legacyPreview) : node);
|
|
5315
|
+
return truncate(render(bareOutputNodes, root, legacyPreview), legacyPreview ? 1000 : undefined, legacyPreview);
|
|
5316
|
+
}
|
|
5317
|
+
|
|
5093
5318
|
// src/shared/prompt-surface.ts
|
|
5094
5319
|
function promptSurfaceConfigIdentity(config) {
|
|
5095
5320
|
return JSON.stringify({
|
|
@@ -5498,7 +5723,7 @@ var BaseEmbeddingConfigSchema = object({
|
|
|
5498
5723
|
document_prefix: string().optional().describe("OpenAI-compatible stored-document prefix override, prepended verbatim. Defaults to the model-family recipe (empty for Qwen3/gte/e5 instruct; 'search_document: ' for Nomic). Changing it changes stored vectors and triggers re-embedding. User-level only; project values are ignored."),
|
|
5499
5724
|
truncate: string().optional().describe("Optional truncate mode sent in the embedding request body (e.g. NVIDIA NIM accepts 'NONE' | 'START' | 'END'). Omitted from the request when unset."),
|
|
5500
5725
|
max_input_tokens: number2().int().positive().optional().describe("Optional maximum input tokens for chunk embeddings. Defaults conservatively to 512 when omitted."),
|
|
5501
|
-
local_runtime: _enum(["auto", "native", "wasm"]).default("auto").describe("Local provider only: ONNX runtime selection. 'auto' uses native under Node and uses WASM under Bun versions before 1.4.0, where Bun's NAPI teardown race can panic on quit; native is restored automatically on Bun 1.4.0+. Inference runs in a dedicated worker. On Bun before 1.4.0, even explicit 'native' uses WASM because native worker teardown can crash the process. Set 'wasm' to avoid loading the native addon on newer hosts too."),
|
|
5726
|
+
local_runtime: _enum(["auto", "native", "wasm"]).default("auto").describe("Local provider only: ONNX runtime selection. 'auto' uses native under Node and uses WASM under Bun versions before 1.4.0, where Bun's NAPI teardown race can panic on quit; native is restored automatically on Bun 1.4.0+. Inference runs in a dedicated worker after disabling POSIX telemetry in the native process environment. Compiled Bun hosts and hosts without a verified in-process opt-out use a subprocess instead. Windows native ONNX emits OS-controlled ETW diagnostics, not direct uploads. On Bun before 1.4.0, even explicit 'native' uses WASM because native worker teardown can crash the process. Set 'wasm' to avoid loading the native addon on newer hosts too."),
|
|
5502
5727
|
local_dtype: _enum([
|
|
5503
5728
|
"auto",
|
|
5504
5729
|
"fp32",
|
|
@@ -5607,8 +5832,8 @@ var MagicContextConfigSchema = object({
|
|
|
5607
5832
|
object({ default: number2().min(0) }).catchall(number2().min(0))
|
|
5608
5833
|
]).optional().describe('User-only output-token reservation override. Number or per-model object ({ default: 16384, "provider/model": 8192 }); 0 disables reservation. Takes precedence over every derived source: an explicit value here always wins against catalog output limits, provider window-geometry facts, and the 25%-of-context fallback (usable window = context window minus this reserve). When unset, Magic Context reserves the catalog output limit (capped at 25% of context) for shared-window providers and keeps proven separate-quota Google/Gemini windows unchanged.'),
|
|
5609
5834
|
models: object({
|
|
5610
|
-
window_overlay_path:
|
|
5611
|
-
}).optional().describe("
|
|
5835
|
+
window_overlay_path: unknown().optional().describe("Deprecated: ignored. Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.").meta({ deprecated: true })
|
|
5836
|
+
}).optional().describe("Deprecated user-only Fusiform window-overlay settings; ignored."),
|
|
5612
5837
|
toast_duration_ms: number2().min(0).max(60000).default(5000).describe("TUI toast lifetime in milliseconds for Magic Context notifications. Set to 0 to disable Magic Context toasts entirely (min: 0, max: 60000, default: 5000)"),
|
|
5613
5838
|
execute_threshold_percentage: union([
|
|
5614
5839
|
number2().min(20).max(90, EXECUTE_THRESHOLD_CAP_MESSAGE),
|
|
@@ -5774,4 +5999,4 @@ function deriveDefaultProtectedTokens(usableSoft) {
|
|
|
5774
5999
|
return Math.min(64000, Math.max(lowerBound, target));
|
|
5775
6000
|
}
|
|
5776
6001
|
|
|
5777
|
-
export { string, unknown, array, object, union, tuple, record, withContentLanguageDirective, buildPrimaryLanguageDirective, parseCron, nextOccurrence, nextDueAtMs, promptSurfaceConfigIdentity, resolveModelConfigValue, resolvePromptSurface, DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE, DEFAULT_HISTORIAN_TIMEOUT_MS, PROTECTED_TOKENS_MIN, DEFAULT_LOCAL_EMBEDDING_MODEL, PER_HARNESS_MIGRATION_INVENTORY, PER_HARNESS_MODEL_KEYS, ConfigProfilesSchema, DREAM_TASK_PROMOTION_DEFAULTS, MagicContextConfigSchema, LIVE_RELOAD_CONFIG_PATHS, deriveDefaultProtectedTokens };
|
|
6002
|
+
export { string, unknown, array, object, union, tuple, record, withContentLanguageDirective, buildPrimaryLanguageDirective, parseCron, nextOccurrence, nextDueAtMs, renderToolTemplate, promptSurfaceConfigIdentity, resolveModelConfigValue, resolvePromptSurface, DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE, DEFAULT_HISTORIAN_TIMEOUT_MS, PROTECTED_TOKENS_MIN, DEFAULT_LOCAL_EMBEDDING_MODEL, PER_HARNESS_MIGRATION_INVENTORY, PER_HARNESS_MODEL_KEYS, ConfigProfilesSchema, DREAM_TASK_PROMOTION_DEFAULTS, MagicContextConfigSchema, LIVE_RELOAD_CONFIG_PATHS, deriveDefaultProtectedTokens };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./server-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./server-
|
|
6
|
+
} from "./server-t4k4qexw.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveOpenCodeDbPath,
|
|
9
9
|
assertOpenCodeStoreGeneration,
|
|
@@ -247,6 +247,26 @@ function latestPersistedMessageForRecovery(sessionId) {
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
+
function latestRealUserTurnIdFromOpenCodeDb(sessionId) {
|
|
251
|
+
try {
|
|
252
|
+
return withReadOnlySessionDb((db) => {
|
|
253
|
+
const row = db.prepare(`SELECT m.id FROM message m
|
|
254
|
+
WHERE m.session_id = ? AND json_extract(m.data, '$.role') = 'user'
|
|
255
|
+
AND COALESCE(json_type(m.data, '$.synthetic'), 'null') != 'true'
|
|
256
|
+
AND m.id NOT LIKE 'synth-user-%'
|
|
257
|
+
AND NOT (EXISTS (SELECT 1 FROM part p WHERE p.message_id = m.id)
|
|
258
|
+
AND NOT EXISTS (SELECT 1 FROM part p WHERE p.message_id = m.id
|
|
259
|
+
AND COALESCE(json_type(p.data, '$.synthetic'), 'null') != 'true'
|
|
260
|
+
AND COALESCE(json_type(p.data, '$.ignored'), 'null') != 'true'
|
|
261
|
+
AND COALESCE(json_extract(p.data, '$.type'), '') NOT IN
|
|
262
|
+
('tool_result', 'toolResult', 'tool-result')))
|
|
263
|
+
ORDER BY m.time_created DESC, m.id DESC LIMIT 1`).get(sessionId);
|
|
264
|
+
return typeof row?.id === "string" ? row.id : undefined;
|
|
265
|
+
}) ?? undefined;
|
|
266
|
+
} catch {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
250
270
|
function hasNewerRealUserMessage(db, sessionId, latestAssistantTimeCreated) {
|
|
251
271
|
if (typeof latestAssistantTimeCreated !== "number")
|
|
252
272
|
return false;
|
|
@@ -299,7 +319,7 @@ function getMessageTimesFromOpenCodeDb(sessionId, messageIds) {
|
|
|
299
319
|
try {
|
|
300
320
|
withReadOnlySessionDb((db) => {
|
|
301
321
|
const placeholders = messageIds.map(() => "?").join(",");
|
|
302
|
-
const rows = db.prepare(`SELECT id, time_created FROM message WHERE session_id = ? AND id IN (${placeholders})`).all(sessionId, ...messageIds);
|
|
322
|
+
const rows = db.prepare(`SELECT id, time_created FROM message WHERE +session_id = ? AND id IN (${placeholders})`).all(sessionId, ...messageIds);
|
|
303
323
|
for (const row of rows) {
|
|
304
324
|
if (typeof row.id === "string" && typeof row.time_created === "number") {
|
|
305
325
|
result.set(row.id, row.time_created);
|
|
@@ -370,4 +390,4 @@ function findLastAssistantModelFromOpenCodeDb(sessionId) {
|
|
|
370
390
|
}
|
|
371
391
|
}
|
|
372
392
|
|
|
373
|
-
export { openCodeDbExists, withReadOnlySessionDb, getRawSessionMessageCountFromDb, shouldHoldIgnoredNotification, latestPersistedMessageForRecovery, getMessageTimesFromOpenCodeDb, findLastAssistantModelFromOpenCodeDb };
|
|
393
|
+
export { openCodeDbExists, withReadOnlySessionDb, getRawSessionMessageCountFromDb, shouldHoldIgnoredNotification, latestPersistedMessageForRecovery, latestRealUserTurnIdFromOpenCodeDb, getMessageTimesFromOpenCodeDb, findLastAssistantModelFromOpenCodeDb };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log2
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-t4k4qexw.js";
|
|
4
4
|
import {
|
|
5
|
-
setWindowOverlayPath,
|
|
6
5
|
setOutputReserveConfig
|
|
7
|
-
} from "./server-
|
|
6
|
+
} from "./server-vb7pbd9p.js";
|
|
8
7
|
import {
|
|
9
8
|
DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
|
|
10
9
|
PROTECTED_TOKENS_MIN,
|
|
@@ -12,7 +11,7 @@ import {
|
|
|
12
11
|
PER_HARNESS_MODEL_KEYS,
|
|
13
12
|
ConfigProfilesSchema,
|
|
14
13
|
MagicContextConfigSchema
|
|
15
|
-
} from "./server-
|
|
14
|
+
} from "./server-cw6521wn.js";
|
|
16
15
|
|
|
17
16
|
// src/config/index.ts
|
|
18
17
|
import { existsSync as existsSync4 } from "node:fs";
|
|
@@ -1684,6 +1683,22 @@ function migrateLegacyAgentEnabledInMemory(rawConfig, warnings) {
|
|
|
1684
1683
|
return patched;
|
|
1685
1684
|
}
|
|
1686
1685
|
|
|
1686
|
+
// src/config/deprecated-config.ts
|
|
1687
|
+
var MURAL_MODEL_DEPRECATION_WARNING = "mural.model is deprecated and ignored; compress-cues now uses the dreamer model for each harness, like every other dreamer task. To override it, set dreamer.opencode.tasks.compress-cues.model (or the pi/omp equivalent). This key no longer does anything; remove it.";
|
|
1688
|
+
var WINDOW_OVERLAY_PATH_DEPRECATION_WARNING = "models.window_overlay_path is deprecated and ignored; Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.";
|
|
1689
|
+
function warnDeprecatedMuralModel(config, warnings) {
|
|
1690
|
+
const mural = config.mural;
|
|
1691
|
+
if (typeof mural === "object" && mural !== null && Object.hasOwn(mural, "model")) {
|
|
1692
|
+
warnings.push(MURAL_MODEL_DEPRECATION_WARNING);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
function warnDeprecatedWindowOverlayPath(config, warnings) {
|
|
1696
|
+
const models = config.models;
|
|
1697
|
+
if (typeof models === "object" && models !== null && Object.hasOwn(models, "window_overlay_path") && !warnings.includes(WINDOW_OVERLAY_PATH_DEPRECATION_WARNING)) {
|
|
1698
|
+
warnings.push(WINDOW_OVERLAY_PATH_DEPRECATION_WARNING);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1687
1702
|
// src/config/migrate-config-location.ts
|
|
1688
1703
|
import { homedir } from "node:os";
|
|
1689
1704
|
import { basename, dirname, isAbsolute, join } from "node:path";
|
|
@@ -2160,15 +2175,6 @@ function migrateLegacyExperimental(rawConfig, warnings) {
|
|
|
2160
2175
|
return patched;
|
|
2161
2176
|
}
|
|
2162
2177
|
|
|
2163
|
-
// src/config/mural-model-deprecation.ts
|
|
2164
|
-
var MURAL_MODEL_DEPRECATION_WARNING = "mural.model is deprecated and ignored; compress-cues now uses the dreamer model for each harness, like every other dreamer task. To override it, set dreamer.opencode.tasks.compress-cues.model (or the pi/omp equivalent). This key no longer does anything; remove it.";
|
|
2165
|
-
function warnDeprecatedMuralModel(config, warnings) {
|
|
2166
|
-
const mural = config.mural;
|
|
2167
|
-
if (typeof mural === "object" && mural !== null && Object.hasOwn(mural, "model")) {
|
|
2168
|
-
warnings.push(MURAL_MODEL_DEPRECATION_WARNING);
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
2178
|
// src/config/profiles.ts
|
|
2173
2179
|
function withoutProfileFields(raw) {
|
|
2174
2180
|
const copy = { ...raw };
|
|
@@ -2430,7 +2436,7 @@ function stripUnsafeProjectConfigFields(projectRaw) {
|
|
|
2430
2436
|
const models = projectRaw.models;
|
|
2431
2437
|
if (isPlainObject(models) && "window_overlay_path" in models) {
|
|
2432
2438
|
delete models.window_overlay_path;
|
|
2433
|
-
warnings.push("Ignoring models.window_overlay_path from project config (
|
|
2439
|
+
warnings.push("Ignoring models.window_overlay_path from project config (deprecated; this setting no longer changes model window geometry).");
|
|
2434
2440
|
}
|
|
2435
2441
|
if ("language" in projectRaw) {
|
|
2436
2442
|
delete projectRaw.language;
|
|
@@ -3570,6 +3576,7 @@ function parsePluginConfig(rawConfig, recoveredTopLevelKeys = []) {
|
|
|
3570
3576
|
preMigrationWarnings.push(...misplacedAgentModelWarnings(rawConfig));
|
|
3571
3577
|
const migratedExperimental = migrateLegacyExperimental(configWithoutRemovedAgent, preMigrationWarnings);
|
|
3572
3578
|
warnDeprecatedMuralModel(migratedExperimental, preMigrationWarnings);
|
|
3579
|
+
warnDeprecatedWindowOverlayPath(migratedExperimental, preMigrationWarnings);
|
|
3573
3580
|
const migratedDreamer = migrateDreamerV2(migratedExperimental, preMigrationWarnings);
|
|
3574
3581
|
const migrated = migrateLegacyAgentEnabledInMemory(migratedDreamer, preMigrationWarnings);
|
|
3575
3582
|
const parsed = MagicContextConfigSchema.safeParse(migrated);
|
|
@@ -3818,7 +3825,6 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
|
|
|
3818
3825
|
config.profile = profileResolution.activeProfile;
|
|
3819
3826
|
if (applyRuntimeGlobals) {
|
|
3820
3827
|
setOutputReserveConfig(config.output_reserve);
|
|
3821
|
-
setWindowOverlayPath(config.models?.window_overlay_path);
|
|
3822
3828
|
}
|
|
3823
3829
|
const leafValidationWarnings = [...config.configWarnings ?? []];
|
|
3824
3830
|
if (config.configWarnings?.length) {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
chmodSync,
|
|
5
5
|
closeSync,
|
|
6
6
|
createWriteStream,
|
|
7
|
+
fsyncSync,
|
|
7
8
|
lstatSync,
|
|
8
9
|
mkdirSync,
|
|
9
10
|
openSync,
|
|
@@ -32,6 +33,14 @@ function ensureStorageDirectorySync(directory, forcePrivate = false, recursive =
|
|
|
32
33
|
...privateMode ? { mode: 448 } : {}
|
|
33
34
|
});
|
|
34
35
|
}
|
|
36
|
+
function ensurePrivateStorageDirectorySync(directory) {
|
|
37
|
+
ensureStorageDirectorySync(directory, true);
|
|
38
|
+
const stat = lstatSync(directory);
|
|
39
|
+
if (!stat.isDirectory() || stat.isSymbolicLink())
|
|
40
|
+
throw new Error("Private storage directory is not a real directory");
|
|
41
|
+
if (process.platform !== "win32")
|
|
42
|
+
chmodSync(directory, 448);
|
|
43
|
+
}
|
|
35
44
|
function writeStorageFileSync(filePath, content, options = {}) {
|
|
36
45
|
const { forcePrivate = false, ...writeOptions } = options;
|
|
37
46
|
const privateMode = forcePrivate || shouldEnforcePrivateStoragePermissions();
|
|
@@ -51,6 +60,35 @@ function writeStorageFileAtomicSync(filePath, content, forcePrivate = false) {
|
|
|
51
60
|
throw error;
|
|
52
61
|
}
|
|
53
62
|
}
|
|
63
|
+
function syncStorageDirectorySync(directory) {
|
|
64
|
+
const fd = openSync(directory, "r");
|
|
65
|
+
try {
|
|
66
|
+
fsyncSync(fd);
|
|
67
|
+
} finally {
|
|
68
|
+
closeSync(fd);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function writeStorageFileDurableAtomicSync(filePath, content, afterTempSync) {
|
|
72
|
+
const directory = dirname(filePath);
|
|
73
|
+
ensurePrivateStorageDirectorySync(directory);
|
|
74
|
+
const tempPath = `${filePath}.${process.pid}.${randomBytes(12).toString("hex")}.tmp`;
|
|
75
|
+
let fd;
|
|
76
|
+
try {
|
|
77
|
+
fd = openStorageFileSync(tempPath, "wx", true);
|
|
78
|
+
writeFileSync(fd, content, "utf8");
|
|
79
|
+
fsyncSync(fd);
|
|
80
|
+
closeSync(fd);
|
|
81
|
+
fd = undefined;
|
|
82
|
+
afterTempSync?.();
|
|
83
|
+
renameSync(tempPath, filePath);
|
|
84
|
+
syncStorageDirectorySync(directory);
|
|
85
|
+
syncStorageDirectorySync(dirname(directory));
|
|
86
|
+
} finally {
|
|
87
|
+
if (fd !== undefined)
|
|
88
|
+
closeSync(fd);
|
|
89
|
+
rmSync(tempPath, { force: true });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
54
92
|
function copyStorageFileSync(sourcePath, destinationPath, forcePrivate = false) {
|
|
55
93
|
ensureStorageDirectorySync(dirname(destinationPath), forcePrivate);
|
|
56
94
|
const privateMode = forcePrivate || shouldEnforcePrivateStoragePermissions();
|
|
@@ -94,6 +132,11 @@ function copyStorageTreeSync(sourcePath, destinationPath, forcePrivate = false)
|
|
|
94
132
|
copyStorageTreeSync(join(sourcePath, entry), join(destinationPath, entry), forcePrivate);
|
|
95
133
|
}
|
|
96
134
|
}
|
|
135
|
+
function openStorageFileSync(filePath, flags, forcePrivate = false) {
|
|
136
|
+
ensureStorageDirectorySync(dirname(filePath), forcePrivate);
|
|
137
|
+
const privateMode = forcePrivate || shouldEnforcePrivateStoragePermissions();
|
|
138
|
+
return openSync(filePath, flags, privateMode ? 384 : 438);
|
|
139
|
+
}
|
|
97
140
|
async function writeStorageFileAsync(filePath, content, forcePrivate = false) {
|
|
98
141
|
const privateMode = forcePrivate || shouldEnforcePrivateStoragePermissions();
|
|
99
142
|
ensureStorageDirectorySync(dirname(filePath), privateMode);
|
|
@@ -151,4 +194,4 @@ function tightenStorageTreeSync(root) {
|
|
|
151
194
|
return { tightened, failures };
|
|
152
195
|
}
|
|
153
196
|
|
|
154
|
-
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, ensureStorageDirectorySync, writeStorageFileSync, writeStorageFileAtomicSync, copyStorageFileSync, copyStorageTreeSync, writeStorageFileAsync, writeStorageFileHandleAsync, createStorageWriteStream, createStorageFileHandleAsync, tightenStorageTreeSync };
|
|
197
|
+
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, ensureStorageDirectorySync, ensurePrivateStorageDirectorySync, writeStorageFileSync, writeStorageFileAtomicSync, syncStorageDirectorySync, writeStorageFileDurableAtomicSync, copyStorageFileSync, copyStorageTreeSync, writeStorageFileAsync, writeStorageFileHandleAsync, createStorageWriteStream, createStorageFileHandleAsync, tightenStorageTreeSync };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-kzns2hbz.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./server-pavzsdc6.js";
|
|
7
7
|
import {
|
|
8
8
|
log2
|
|
9
|
-
} from "./server-
|
|
9
|
+
} from "./server-t4k4qexw.js";
|
|
10
10
|
|
|
11
11
|
// src/features/magic-context/memory/embedding-synapse.ts
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-cw6521wn.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./server-
|
|
6
|
+
} from "./server-t4k4qexw.js";
|
|
7
7
|
import {
|
|
8
8
|
isSynapseEmbeddingTruncated,
|
|
9
9
|
SynapseEmbeddingProvider
|
|
10
|
-
} from "./server-
|
|
10
|
+
} from "./server-hb6xhh9q.js";
|
|
11
11
|
import {
|
|
12
12
|
LocalEmbeddingProvider
|
|
13
|
-
} from "./server-
|
|
13
|
+
} from "./server-ras2sxnc.js";
|
|
14
14
|
import {
|
|
15
15
|
OpenAICompatibleEmbeddingProvider,
|
|
16
16
|
getProjectEmbeddingSnapshot2,
|
|
17
17
|
embedBatchForProject2
|
|
18
|
-
} from "./server-
|
|
18
|
+
} from "./server-1fszbabv.js";
|
|
19
19
|
import {
|
|
20
20
|
isEmbeddingHostBusy2
|
|
21
21
|
} from "./server-qt1qqasc.js";
|