@remnic/core 9.54.5 → 9.54.7
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/access-admin-ops-surface.d.ts +24 -24
- package/dist/access-admin-ops-surface.js +32 -29
- package/dist/access-authorization-probe.d.ts +25 -23
- package/dist/access-authorization-probe.js +35 -30
- package/dist/access-boundary.d.ts +26 -24
- package/dist/access-boundary.js +36 -31
- package/dist/access-cli.js +86 -80
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +19 -19
- package/dist/access-extraction-force-flush.js +32 -29
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +22 -22
- package/dist/access-http-lifecycle-flush.d.ts +22 -22
- package/dist/access-http-offline-stream.d.ts +18 -18
- package/dist/access-http-query.js +32 -29
- package/dist/access-http.d.ts +55 -37
- package/dist/access-http.js +52 -43
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +32 -29
- package/dist/access-lcm-surface.d.ts +21 -21
- package/dist/access-lcm-surface.js +32 -29
- package/dist/access-mcp.d.ts +22 -22
- package/dist/access-mcp.js +40 -36
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-BdHlGd_T.d.ts → access-namespace-preflight-CCNn_6NE.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +32 -29
- package/dist/access-observe-write-surface.d.ts +22 -22
- package/dist/access-observe-write-surface.js +32 -29
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-offline-manifest.js +2 -2
- package/dist/access-operations-batch.js +34 -31
- package/dist/access-operations.d.ts +23 -23
- package/dist/access-operations.js +38 -34
- package/dist/access-recall-concurrency.d.ts +21 -21
- package/dist/access-recall-concurrency.js +32 -29
- package/dist/access-recall-response.d.ts +19 -19
- package/dist/access-recall-response.js +32 -29
- package/dist/access-recall-surface.d.ts +19 -19
- package/dist/access-recall-surface.js +32 -29
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-DL7X9hrg.d.ts → access-service-DK82xdNi.d.ts} +1314 -83
- package/dist/access-service-helpers.d.ts +22 -22
- package/dist/access-service.d.ts +31 -31
- package/dist/access-service.js +32 -29
- package/dist/access-surface-catalog.d.ts +22 -22
- package/dist/access-surface-catalog.js +209 -2
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +6 -5
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +2 -1
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/admin-console/public/what-helps-me/app.js +1594 -0
- package/dist/admin-console/public/what-helps-me/index.html +339 -0
- package/dist/admin-console/public/what-helps-me/model.js +685 -0
- package/dist/admin-console/public/what-helps-me/what-helps-me.css +1296 -0
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-TDHLZPVP.js → auto-sync-NR3GPCOA.js} +4 -4
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -9
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +14 -14
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-B90is4d8.d.ts → catalog-DGFf8mD9.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +15 -15
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-CSY44OKU.js → chunk-26ZXBTYN.js} +4 -4
- package/dist/chunk-26ZXBTYN.js.map +1 -0
- package/dist/{chunk-LLJMAULE.js → chunk-2FKEIPIT.js} +5 -5
- package/dist/{chunk-AU7Q3LSC.js → chunk-2QSZNTDO.js} +4 -4
- package/dist/chunk-37DZZFFM.js +502 -0
- package/dist/chunk-37DZZFFM.js.map +1 -0
- package/dist/chunk-3HSRWJTC.js +9 -0
- package/dist/chunk-3HSRWJTC.js.map +1 -0
- package/dist/{chunk-TKFGFDPJ.js → chunk-3TIZPSJC.js} +4 -4
- package/dist/{chunk-B4T3FQMT.js → chunk-43SEBY2M.js} +1 -1
- package/dist/{chunk-LVKYLMSM.js → chunk-46SZBVDS.js} +2 -2
- package/dist/{chunk-YKZLOPTC.js → chunk-5FD7JMTX.js} +2 -2
- package/dist/{chunk-2PNXOQ4P.js → chunk-5NB726GV.js} +3 -7
- package/dist/chunk-5NB726GV.js.map +1 -0
- package/dist/chunk-62OKGIJA.js +39 -0
- package/dist/chunk-62OKGIJA.js.map +1 -0
- package/dist/{chunk-WM5LD6AT.js → chunk-6CYHUWCO.js} +2 -2
- package/dist/{chunk-BIF4SHMD.js → chunk-76JJSXK7.js} +1 -1
- package/dist/chunk-76JJSXK7.js.map +1 -0
- package/dist/{chunk-3SXLD5T3.js → chunk-7BD6O7ZV.js} +189 -4
- package/dist/chunk-7BD6O7ZV.js.map +1 -0
- package/dist/chunk-7TBXNYLO.js +346 -0
- package/dist/chunk-7TBXNYLO.js.map +1 -0
- package/dist/{chunk-YR65W7BV.js → chunk-BRR5EUTF.js} +3 -3
- package/dist/{chunk-JKW663ZN.js → chunk-CIAI24TQ.js} +2 -2
- package/dist/{chunk-3WGI7F4V.js → chunk-D3LBIUWV.js} +9219 -5233
- package/dist/chunk-D3LBIUWV.js.map +1 -0
- package/dist/{chunk-YDWPYDML.js → chunk-EKTP7MNS.js} +4 -4
- package/dist/{chunk-6LEIWWAF.js → chunk-F2JRDPON.js} +2 -2
- package/dist/{chunk-VYQ4URQB.js → chunk-FFRTNF3L.js} +2 -2
- package/dist/{chunk-TY6MKIWP.js → chunk-FONWBCVY.js} +3 -3
- package/dist/{chunk-XSV2YDCJ.js → chunk-FPLM2TKD.js} +2 -2
- package/dist/{chunk-VTU5IEKY.js → chunk-FTPONF6B.js} +2 -2
- package/dist/{chunk-6PZGKGAO.js → chunk-FWX7W5PM.js} +2 -2
- package/dist/{chunk-QPW3PAIH.js → chunk-G6DFSS6A.js} +2 -2
- package/dist/{chunk-2DD6ZHOM.js → chunk-GJ776BC2.js} +3 -3
- package/dist/{chunk-XKAR4RF6.js → chunk-GN3WRFJY.js} +6 -6
- package/dist/{chunk-RG426DJO.js → chunk-H7NAZ3UB.js} +2 -2
- package/dist/{chunk-BSXGTDVJ.js → chunk-HBUFQRIM.js} +2 -2
- package/dist/{chunk-FFEBSFVT.js → chunk-HGJ6NJ4E.js} +2 -2
- package/dist/{chunk-WB7JSQCP.js → chunk-HIEWDJ2O.js} +5 -2
- package/dist/{chunk-WB7JSQCP.js.map → chunk-HIEWDJ2O.js.map} +1 -1
- package/dist/{chunk-QTO6BMQZ.js → chunk-I3MSGFGD.js} +17 -6
- package/dist/chunk-I3MSGFGD.js.map +1 -0
- package/dist/{chunk-5JKUSBMX.js → chunk-IKP5OYQQ.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-IPLYGWQF.js} +5 -5
- package/dist/{chunk-DBY26JJJ.js → chunk-IQ4NVWEF.js} +2 -2
- package/dist/{chunk-7Q7JWLQ4.js → chunk-JYG4OLWH.js} +2 -2
- package/dist/{chunk-3OTSVCPK.js → chunk-K26NWEOC.js} +4 -4
- package/dist/{chunk-WZWZRZ2V.js → chunk-K2UGPTYY.js} +484 -43
- package/dist/chunk-K2UGPTYY.js.map +1 -0
- package/dist/{chunk-L6CQ7WIW.js → chunk-KFBOPMF6.js} +11 -11
- package/dist/chunk-KFBOPMF6.js.map +1 -0
- package/dist/{chunk-HOIRB77A.js → chunk-L6Z5OAS4.js} +2 -2
- package/dist/{chunk-7RZJWZ46.js → chunk-LEPOP46W.js} +5 -5
- package/dist/{chunk-QQXWFDRD.js → chunk-M4YHAODQ.js} +270 -684
- package/dist/chunk-M4YHAODQ.js.map +1 -0
- package/dist/{chunk-NGT35IGQ.js → chunk-MIH3CJPN.js} +3 -3
- package/dist/{chunk-QPAQSG3F.js → chunk-MK5VEWCR.js} +2 -2
- package/dist/chunk-NISZQW72.js +140 -0
- package/dist/chunk-NISZQW72.js.map +1 -0
- package/dist/{chunk-L7RTUEDG.js → chunk-OCIP6YMD.js} +2 -2
- package/dist/{chunk-2INWPC6E.js → chunk-PG4QBPVG.js} +20 -10
- package/dist/chunk-PG4QBPVG.js.map +1 -0
- package/dist/{chunk-DDA55IVB.js → chunk-PT54WISF.js} +189 -55
- package/dist/chunk-PT54WISF.js.map +1 -0
- package/dist/{chunk-UWJNKGBA.js → chunk-QZLDRQ4I.js} +5 -5
- package/dist/{chunk-UYOXFFEY.js → chunk-RUNORG2P.js} +3 -3
- package/dist/{chunk-LC3FD4BV.js → chunk-RZQ6W2W4.js} +39 -39
- package/dist/{chunk-MRGJZ75M.js → chunk-SMNYAMJD.js} +3 -3
- package/dist/{chunk-MKQBXQKU.js → chunk-TB6CBZ5V.js} +22 -15
- package/dist/chunk-TB6CBZ5V.js.map +1 -0
- package/dist/{chunk-DN2IDKI5.js → chunk-TO7ZTWJW.js} +2 -2
- package/dist/{chunk-K2TDK7GG.js → chunk-TWTUGCTY.js} +2 -2
- package/dist/{chunk-CUTFSLSD.js → chunk-UCTS3DDH.js} +2 -2
- package/dist/{chunk-JYIJNNN3.js → chunk-UG6VXIOK.js} +2 -2
- package/dist/{chunk-QOQQMVR2.js → chunk-UKYS3NU5.js} +2 -2
- package/dist/{chunk-VZRFGJCH.js → chunk-UPLZNJKN.js} +2 -2
- package/dist/{chunk-C23BYTJV.js → chunk-UW5NPZJ2.js} +40 -12
- package/dist/chunk-UW5NPZJ2.js.map +1 -0
- package/dist/{chunk-DOOWFDWN.js → chunk-V6ERBR7U.js} +2 -2
- package/dist/{chunk-7HG7MGAP.js → chunk-W5ZKPI34.js} +462 -2673
- package/dist/chunk-W5ZKPI34.js.map +1 -0
- package/dist/{chunk-HNDIND7P.js → chunk-XX4HPFFM.js} +54 -15
- package/dist/chunk-XX4HPFFM.js.map +1 -0
- package/dist/{chunk-N7CXQ5TA.js → chunk-XZHE2DEN.js} +1 -1
- package/dist/chunk-YXQEKCZM.js +223 -0
- package/dist/chunk-YXQEKCZM.js.map +1 -0
- package/dist/{chunk-6NNNURLK.js → chunk-Z54EM5YZ.js} +4 -4
- package/dist/{chunk-F2Y6I74C.js → chunk-ZRZVLB7O.js} +2 -2
- package/dist/{chunk-CLKBV3Z3.js → chunk-ZUKIUXHQ.js} +9 -9
- package/dist/{cli-jfuZXixq.d.ts → cli-BPDUXnAl.d.ts} +5 -5
- package/dist/cli.d.ts +22 -22
- package/dist/cli.js +66 -58
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +14 -14
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +14 -14
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +14 -14
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-KCADHXPE.js → contradiction-scan-JDTBXRGW.js} +3 -3
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +16 -16
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +16 -16
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-CTDuAVJc.d.ts → dependency-propagation-delivery-CzEfB31P.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +14 -14
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +4 -3
- package/dist/external-wiki-access.d.ts +22 -22
- package/dist/external-wiki-access.js +33 -30
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +22 -22
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-faithfulness.js +2 -2
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-judge.js +2 -2
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +20 -20
- package/dist/fallback-llm.d.ts +14 -1
- package/dist/fallback-llm.js +1 -1
- package/dist/{first-start-migration-LMMZFLKK.js → first-start-migration-CRZCZAJN.js} +5 -5
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +30 -747
- package/dist/index.js +203 -118
- package/dist/inline-script.d.ts +3 -0
- package/dist/inline-script.js +8 -0
- package/dist/inline-script.js.map +1 -0
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +2 -2
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +14 -14
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -14
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +15 -15
- package/dist/{maintenance-heMZSq7G.d.ts → maintenance-C8aRWfhq.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +22 -22
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +15 -15
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +14 -14
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +17 -17
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +23 -22
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +19 -19
- package/dist/{orchestrator-BQQPsSjs.d.ts → orchestrator-D85CzDDY.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +86 -80
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-DFfmsnGk.d.ts → pipeline-DPcUifCO.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/public-http-D3GBeII4.d.ts +25 -0
- package/dist/{qmd-BF5bcVRs.d.ts → qmd-dFCHp1r0.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-planner-llm.js +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +3 -2
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/{scope-profiles-CbUOsE_E.d.ts → scope-profiles-DICK7GtN.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +5 -5
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +9 -9
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-DAB3xdKM.d.ts → semantic-consolidation-BP7NAX0N.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +15 -15
- package/dist/semantic-rule-promotion.js +14 -14
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +14 -14
- package/dist/{service-DGKg2O6r.d.ts → service-DT-pJyda.d.ts} +660 -660
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +16 -16
- package/dist/{storage-CC1jKcWg.d.ts → storage-qOnaJ1Lw.d.ts} +4 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +13 -13
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +518 -0
- package/dist/support-passport/index.js +357 -0
- package/dist/support-passport/index.js.map +1 -0
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/tier-routing.js +2 -2
- package/dist/{tier-stats-JDN6HRNT.js → tier-stats-EXYSKSVN.js} +3 -3
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/autodetect.js +1 -1
- package/dist/transfer/backup.js +1 -1
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/types.d.ts +24 -24
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-BnQza1y8.d.ts → types-ed-SvS2t.d.ts} +7 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +14 -14
- package/dist/write-envelope.d.ts +1 -1
- package/dist/write-rate-limiter.d.ts +11 -5
- package/dist/write-rate-limiter.js +1 -1
- package/package.json +12 -2
- package/scripts/build-with-heap.mjs +11 -1
- package/src/access-authorization-probe.ts +20 -2
- package/src/access-boundary.ts +32 -0
- package/src/access-http.test.ts +1940 -643
- package/src/access-http.ts +81 -74
- package/src/access-mcp.ts +3 -1
- package/src/access-operations.ts +2 -0
- package/src/access-service.ts +612 -845
- package/src/access-surface-catalog.test.ts +40 -10
- package/src/access-surface-catalog.ts +15 -0
- package/src/active-memory-bridge.ts +17 -19
- package/src/config.ts +18 -9
- package/src/fallback-llm.test.ts +54 -0
- package/src/fallback-llm.ts +54 -9
- package/src/inline-script.ts +6 -0
- package/src/local-llm-headers-timeout.test.ts +42 -0
- package/src/local-llm.ts +8 -8
- package/src/mcp-read-only-tools.ts +3 -0
- package/src/relay/mission-access.test.ts +11 -11
- package/src/relay/mission-ui.test.ts +3 -1
- package/src/storage/tombstone-blocked-capture-sync.ts +31 -0
- package/src/storage-contract/failure-semantics.test.ts +102 -0
- package/src/support-passport/access-http-base.ts +143 -0
- package/src/support-passport/access-http.ts +172 -0
- package/src/support-passport/access-operations.ts +272 -0
- package/src/support-passport/access-service-base.test.ts +193 -0
- package/src/support-passport/access-service-base.ts +176 -0
- package/src/support-passport/access-surface.test.ts +283 -0
- package/src/support-passport/access-surface.ts +286 -0
- package/src/support-passport/card-projection.test.ts +8 -0
- package/src/support-passport/card-projection.ts +77 -16
- package/src/support-passport/card-replacement.ts +126 -0
- package/src/support-passport/card-service-commit-forwarding.test.ts +160 -0
- package/src/support-passport/card-service.test.ts +533 -31
- package/src/support-passport/card-service.ts +506 -364
- package/src/support-passport/card-state.ts +158 -0
- package/src/support-passport/config-model-routing.test.ts +37 -0
- package/src/support-passport/config.test.ts +34 -0
- package/src/support-passport/config.ts +41 -0
- package/src/support-passport/contracts.test.ts +15 -2
- package/src/support-passport/contracts.ts +13 -0
- package/src/support-passport/errors.ts +6 -0
- package/src/support-passport/generated-batch.test.ts +185 -0
- package/src/support-passport/generated-batch.ts +338 -0
- package/src/support-passport/grant-contracts.ts +45 -1
- package/src/support-passport/grant-generated-batch-scope.test.ts +201 -0
- package/src/support-passport/grant-service-cache.test.ts +2 -2
- package/src/support-passport/grant-service-cancellation.test.ts +2 -0
- package/src/support-passport/grant-service-marker-cache.test.ts +62 -0
- package/src/support-passport/grant-service.test.ts +853 -239
- package/src/support-passport/grant-service.ts +206 -57
- package/src/support-passport/grant-store.ts +7 -3
- package/src/support-passport/index.ts +10 -0
- package/src/support-passport/mcp-tools.test.ts +222 -0
- package/src/support-passport/mcp-tools.ts +187 -0
- package/src/support-passport/model-adapter.test.ts +840 -0
- package/src/support-passport/model-adapter.ts +602 -0
- package/src/support-passport/model-audit-pinned-write.test.ts +59 -0
- package/src/support-passport/model-audit.ts +152 -0
- package/src/support-passport/model-bridge.test.ts +456 -0
- package/src/support-passport/model-bridge.ts +439 -0
- package/src/support-passport/model-contracts.ts +124 -0
- package/src/support-passport/model-service.test.ts +1731 -0
- package/src/support-passport/model-service.ts +399 -0
- package/src/support-passport/owner-http.test.ts +671 -0
- package/src/support-passport/owner-lock.ts +26 -9
- package/src/support-passport/private-file.test.ts +99 -0
- package/src/support-passport/private-file.ts +139 -12
- package/src/support-passport/public-http.test.ts +476 -0
- package/src/support-passport/public-http.ts +601 -0
- package/src/support-passport/ui.test.ts +181 -0
- package/src/types.ts +7 -0
- package/src/write-rate-limiter.test.ts +30 -6
- package/src/write-rate-limiter.ts +29 -18
- package/dist/chunk-2INWPC6E.js.map +0 -1
- package/dist/chunk-2PNXOQ4P.js.map +0 -1
- package/dist/chunk-3SXLD5T3.js.map +0 -1
- package/dist/chunk-3WGI7F4V.js.map +0 -1
- package/dist/chunk-7HG7MGAP.js.map +0 -1
- package/dist/chunk-BIF4SHMD.js.map +0 -1
- package/dist/chunk-C23BYTJV.js.map +0 -1
- package/dist/chunk-CSY44OKU.js.map +0 -1
- package/dist/chunk-DDA55IVB.js.map +0 -1
- package/dist/chunk-HNDIND7P.js.map +0 -1
- package/dist/chunk-L6CQ7WIW.js.map +0 -1
- package/dist/chunk-MKQBXQKU.js.map +0 -1
- package/dist/chunk-QQXWFDRD.js.map +0 -1
- package/dist/chunk-QTO6BMQZ.js.map +0 -1
- package/dist/chunk-WZWZRZ2V.js.map +0 -1
- /package/dist/{auto-sync-TDHLZPVP.js.map → auto-sync-NR3GPCOA.js.map} +0 -0
- /package/dist/{chunk-LLJMAULE.js.map → chunk-2FKEIPIT.js.map} +0 -0
- /package/dist/{chunk-AU7Q3LSC.js.map → chunk-2QSZNTDO.js.map} +0 -0
- /package/dist/{chunk-TKFGFDPJ.js.map → chunk-3TIZPSJC.js.map} +0 -0
- /package/dist/{chunk-B4T3FQMT.js.map → chunk-43SEBY2M.js.map} +0 -0
- /package/dist/{chunk-LVKYLMSM.js.map → chunk-46SZBVDS.js.map} +0 -0
- /package/dist/{chunk-YKZLOPTC.js.map → chunk-5FD7JMTX.js.map} +0 -0
- /package/dist/{chunk-WM5LD6AT.js.map → chunk-6CYHUWCO.js.map} +0 -0
- /package/dist/{chunk-YR65W7BV.js.map → chunk-BRR5EUTF.js.map} +0 -0
- /package/dist/{chunk-JKW663ZN.js.map → chunk-CIAI24TQ.js.map} +0 -0
- /package/dist/{chunk-YDWPYDML.js.map → chunk-EKTP7MNS.js.map} +0 -0
- /package/dist/{chunk-6LEIWWAF.js.map → chunk-F2JRDPON.js.map} +0 -0
- /package/dist/{chunk-VYQ4URQB.js.map → chunk-FFRTNF3L.js.map} +0 -0
- /package/dist/{chunk-TY6MKIWP.js.map → chunk-FONWBCVY.js.map} +0 -0
- /package/dist/{chunk-XSV2YDCJ.js.map → chunk-FPLM2TKD.js.map} +0 -0
- /package/dist/{chunk-VTU5IEKY.js.map → chunk-FTPONF6B.js.map} +0 -0
- /package/dist/{chunk-6PZGKGAO.js.map → chunk-FWX7W5PM.js.map} +0 -0
- /package/dist/{chunk-QPW3PAIH.js.map → chunk-G6DFSS6A.js.map} +0 -0
- /package/dist/{chunk-2DD6ZHOM.js.map → chunk-GJ776BC2.js.map} +0 -0
- /package/dist/{chunk-XKAR4RF6.js.map → chunk-GN3WRFJY.js.map} +0 -0
- /package/dist/{chunk-RG426DJO.js.map → chunk-H7NAZ3UB.js.map} +0 -0
- /package/dist/{chunk-BSXGTDVJ.js.map → chunk-HBUFQRIM.js.map} +0 -0
- /package/dist/{chunk-FFEBSFVT.js.map → chunk-HGJ6NJ4E.js.map} +0 -0
- /package/dist/{chunk-5JKUSBMX.js.map → chunk-IKP5OYQQ.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-IPLYGWQF.js.map} +0 -0
- /package/dist/{chunk-DBY26JJJ.js.map → chunk-IQ4NVWEF.js.map} +0 -0
- /package/dist/{chunk-7Q7JWLQ4.js.map → chunk-JYG4OLWH.js.map} +0 -0
- /package/dist/{chunk-3OTSVCPK.js.map → chunk-K26NWEOC.js.map} +0 -0
- /package/dist/{chunk-HOIRB77A.js.map → chunk-L6Z5OAS4.js.map} +0 -0
- /package/dist/{chunk-7RZJWZ46.js.map → chunk-LEPOP46W.js.map} +0 -0
- /package/dist/{chunk-NGT35IGQ.js.map → chunk-MIH3CJPN.js.map} +0 -0
- /package/dist/{chunk-QPAQSG3F.js.map → chunk-MK5VEWCR.js.map} +0 -0
- /package/dist/{chunk-L7RTUEDG.js.map → chunk-OCIP6YMD.js.map} +0 -0
- /package/dist/{chunk-UWJNKGBA.js.map → chunk-QZLDRQ4I.js.map} +0 -0
- /package/dist/{chunk-UYOXFFEY.js.map → chunk-RUNORG2P.js.map} +0 -0
- /package/dist/{chunk-LC3FD4BV.js.map → chunk-RZQ6W2W4.js.map} +0 -0
- /package/dist/{chunk-MRGJZ75M.js.map → chunk-SMNYAMJD.js.map} +0 -0
- /package/dist/{chunk-DN2IDKI5.js.map → chunk-TO7ZTWJW.js.map} +0 -0
- /package/dist/{chunk-K2TDK7GG.js.map → chunk-TWTUGCTY.js.map} +0 -0
- /package/dist/{chunk-CUTFSLSD.js.map → chunk-UCTS3DDH.js.map} +0 -0
- /package/dist/{chunk-JYIJNNN3.js.map → chunk-UG6VXIOK.js.map} +0 -0
- /package/dist/{chunk-QOQQMVR2.js.map → chunk-UKYS3NU5.js.map} +0 -0
- /package/dist/{chunk-VZRFGJCH.js.map → chunk-UPLZNJKN.js.map} +0 -0
- /package/dist/{chunk-DOOWFDWN.js.map → chunk-V6ERBR7U.js.map} +0 -0
- /package/dist/{chunk-N7CXQ5TA.js.map → chunk-XZHE2DEN.js.map} +0 -0
- /package/dist/{chunk-6NNNURLK.js.map → chunk-Z54EM5YZ.js.map} +0 -0
- /package/dist/{chunk-F2Y6I74C.js.map → chunk-ZRZVLB7O.js.map} +0 -0
- /package/dist/{chunk-CLKBV3Z3.js.map → chunk-ZUKIUXHQ.js.map} +0 -0
- /package/dist/{contradiction-scan-KCADHXPE.js.map → contradiction-scan-JDTBXRGW.js.map} +0 -0
- /package/dist/{first-start-migration-LMMZFLKK.js.map → first-start-migration-CRZCZAJN.js.map} +0 -0
- /package/dist/{tier-stats-JDN6HRNT.js.map → tier-stats-EXYSKSVN.js.map} +0 -0
|
@@ -3,10 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-V7IZKJI3.js";
|
|
4
4
|
import {
|
|
5
5
|
AdapterRegistry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2QSZNTDO.js";
|
|
7
7
|
import {
|
|
8
8
|
WriteRateLimiter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TB6CBZ5V.js";
|
|
10
|
+
import {
|
|
11
|
+
serializeInlineScriptValue
|
|
12
|
+
} from "./chunk-3HSRWJTC.js";
|
|
13
|
+
import {
|
|
14
|
+
handleSupportPassportOwnerHttp
|
|
15
|
+
} from "./chunk-NISZQW72.js";
|
|
16
|
+
import {
|
|
17
|
+
buildSupportPassportPublicRequestHandler
|
|
18
|
+
} from "./chunk-37DZZFFM.js";
|
|
10
19
|
import {
|
|
11
20
|
nonEmptyQueryParam,
|
|
12
21
|
optionalQueryString,
|
|
@@ -21,13 +30,13 @@ import {
|
|
|
21
30
|
processChatMessage,
|
|
22
31
|
sessionBelongsToPrincipal,
|
|
23
32
|
subscribeChatTranscript
|
|
24
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7BD6O7ZV.js";
|
|
25
34
|
import {
|
|
26
35
|
RelayMissionStoreError
|
|
27
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-26ZXBTYN.js";
|
|
28
37
|
import {
|
|
29
38
|
validateRequest
|
|
30
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CIAI24TQ.js";
|
|
31
40
|
import {
|
|
32
41
|
executeResolution,
|
|
33
42
|
isValidResolutionVerb
|
|
@@ -49,13 +58,14 @@ import {
|
|
|
49
58
|
} from "./chunk-CK5KOVHW.js";
|
|
50
59
|
import {
|
|
51
60
|
authorizationProbeNamespaces,
|
|
61
|
+
authorizationProbeRequiresPrincipalNamespace,
|
|
52
62
|
probeOperationAuthorization
|
|
53
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-I3MSGFGD.js";
|
|
54
64
|
import {
|
|
55
65
|
CorrectionContractError,
|
|
56
66
|
getOperation,
|
|
57
67
|
resolveQueryNamespaceWritablePreflight
|
|
58
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-D3LBIUWV.js";
|
|
59
69
|
import {
|
|
60
70
|
isTrustZoneName
|
|
61
71
|
} from "./chunk-KQS72GCR.js";
|
|
@@ -64,7 +74,7 @@ import {
|
|
|
64
74
|
} from "./chunk-DEUNUKTD.js";
|
|
65
75
|
import {
|
|
66
76
|
isRecallDisclosure
|
|
67
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-76JJSXK7.js";
|
|
68
78
|
import {
|
|
69
79
|
OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
|
|
70
80
|
OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
|
|
@@ -101,8 +111,8 @@ import { randomUUID, timingSafeEqual } from "crypto";
|
|
|
101
111
|
import { AsyncLocalStorage } from "async_hooks";
|
|
102
112
|
import { existsSync } from "fs";
|
|
103
113
|
import { readFile } from "fs/promises";
|
|
104
|
-
import
|
|
105
|
-
import { fileURLToPath, URL } from "url";
|
|
114
|
+
import path2 from "path";
|
|
115
|
+
import { fileURLToPath, URL as URL2 } from "url";
|
|
106
116
|
import { gunzipSync } from "zlib";
|
|
107
117
|
|
|
108
118
|
// src/meetings/errors.ts
|
|
@@ -348,16 +358,116 @@ function respondJson(res, status, body) {
|
|
|
348
358
|
res.end(json);
|
|
349
359
|
}
|
|
350
360
|
|
|
361
|
+
// src/support-passport/access-http-base.ts
|
|
362
|
+
import path from "path";
|
|
363
|
+
var SUPPORT_PASSPORT_QUOTA_LIMITED_WRITE_TOOLS = /* @__PURE__ */ new Set([
|
|
364
|
+
"engram.support_passport_draft_create",
|
|
365
|
+
"remnic.support_passport_draft_create",
|
|
366
|
+
"engram.support_passport_drafts_generate",
|
|
367
|
+
"remnic.support_passport_drafts_generate",
|
|
368
|
+
"engram.support_passport_card_replace",
|
|
369
|
+
"remnic.support_passport_card_replace",
|
|
370
|
+
"engram.support_passport_card_approve",
|
|
371
|
+
"remnic.support_passport_card_approve",
|
|
372
|
+
"engram.support_passport_card_reject",
|
|
373
|
+
"remnic.support_passport_card_reject",
|
|
374
|
+
"engram.support_passport_card_withdraw",
|
|
375
|
+
"remnic.support_passport_card_withdraw",
|
|
376
|
+
"engram.support_passport_grant_create",
|
|
377
|
+
"remnic.support_passport_grant_create",
|
|
378
|
+
"engram.support_passport_grant_revoke",
|
|
379
|
+
"remnic.support_passport_grant_revoke"
|
|
380
|
+
]);
|
|
381
|
+
var SUPPORT_PASSPORT_ADMIN_CONSOLE_ASSETS = /* @__PURE__ */ new Map([
|
|
382
|
+
["what-helps-me.css", "text/css; charset=utf-8"],
|
|
383
|
+
["model.js", "application/javascript; charset=utf-8"],
|
|
384
|
+
["app.js", "application/javascript; charset=utf-8"]
|
|
385
|
+
]);
|
|
386
|
+
var SupportPassportAccessHttpBase = class {
|
|
387
|
+
supportPassportPublicHandler;
|
|
388
|
+
handleSupportPassportOwnerRequest(req, res, pathname, hasQuery, abortSignal) {
|
|
389
|
+
return handleSupportPassportOwnerHttp({
|
|
390
|
+
req,
|
|
391
|
+
res,
|
|
392
|
+
pathname,
|
|
393
|
+
hasQuery,
|
|
394
|
+
service: this.service,
|
|
395
|
+
principal: this.resolveRequestPrincipal(req),
|
|
396
|
+
abortSignal,
|
|
397
|
+
readJsonBody: () => this.readJsonBody(req),
|
|
398
|
+
respondJson: (status, payload) => {
|
|
399
|
+
res.setHeader("cache-control", "private, no-store");
|
|
400
|
+
res.setHeader("vary", "Authorization");
|
|
401
|
+
this.respondJson(res, status, payload);
|
|
402
|
+
},
|
|
403
|
+
reserveWriteRateLimitSlot: () => this.reserveWriteRateLimitSlot(req)
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
handleSupportPassportPublicRequest(req, res) {
|
|
407
|
+
this.supportPassportPublicHandler ??= buildSupportPassportPublicRequestHandler(this.service, {
|
|
408
|
+
trustedProxyAddresses: this.service.configRef?.supportPassport?.trustedProxyAddresses ?? []
|
|
409
|
+
});
|
|
410
|
+
return this.supportPassportPublicHandler(req, res, {
|
|
411
|
+
authorized: false,
|
|
412
|
+
tokenAuthorized: false
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
async enforceSupportPassportAuthorizationProbe(req) {
|
|
416
|
+
const principal = this.resolveRequestPrincipal(req)?.trim();
|
|
417
|
+
if (!principal) {
|
|
418
|
+
throw new EngramAccessForbiddenError("A trusted principal is required for support passport access.");
|
|
419
|
+
}
|
|
420
|
+
const owner = await this.service.getWritableStorageForNamespace(void 0, principal);
|
|
421
|
+
enforceNamespaceAllowList(
|
|
422
|
+
tokenCapabilityStore.getStore(),
|
|
423
|
+
owner.namespace,
|
|
424
|
+
this.service.configRef.defaultNamespace
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
isSupportPassportQuotaLimitedWriteTool(toolName) {
|
|
428
|
+
return SUPPORT_PASSPORT_QUOTA_LIMITED_WRITE_TOOLS.has(toolName);
|
|
429
|
+
}
|
|
430
|
+
async handleSupportPassportUi(req, res, pathname) {
|
|
431
|
+
if (req.method !== "GET") return false;
|
|
432
|
+
const isSupportPassportPath = pathname === "/remnic/ui/what-helps-me" || pathname === "/engram/ui/what-helps-me" || pathname.startsWith("/remnic/ui/what-helps-me/") || pathname.startsWith("/engram/ui/what-helps-me/");
|
|
433
|
+
if (!isSupportPassportPath) return false;
|
|
434
|
+
if (!this.service.supportPassportEnabled) {
|
|
435
|
+
this.respondJson(res, 404, { error: "not_found" });
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
if (pathname === "/remnic/ui/what-helps-me" || pathname === "/engram/ui/what-helps-me") {
|
|
439
|
+
const search = new URL(req.url ?? pathname, "http://placeholder").search;
|
|
440
|
+
res.statusCode = 301;
|
|
441
|
+
res.setHeader("location", `${pathname}/${search}`);
|
|
442
|
+
res.end();
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
if (pathname === "/remnic/ui/what-helps-me/" || pathname === "/engram/ui/what-helps-me/") {
|
|
446
|
+
const helperRequest = new URL(req.url ?? pathname, "http://placeholder").searchParams.has("grant");
|
|
447
|
+
res.setHeader("content-security-policy", "frame-ancestors 'none'");
|
|
448
|
+
res.setHeader("x-frame-options", "DENY");
|
|
449
|
+
await this.respondAdminConsoleShell(req, res, pathname, "what-helps-me/index.html", !helperRequest);
|
|
450
|
+
return true;
|
|
451
|
+
}
|
|
452
|
+
const fileName = pathname.split("/").at(-1) ?? "";
|
|
453
|
+
const assetType = SUPPORT_PASSPORT_ADMIN_CONSOLE_ASSETS.get(fileName);
|
|
454
|
+
if (assetType && pathname.split("/").length === 5) {
|
|
455
|
+
await this.respondStatic(res, path.join(this.adminConsolePublicDir, "what-helps-me", fileName), assetType);
|
|
456
|
+
return true;
|
|
457
|
+
}
|
|
458
|
+
this.respondJson(res, 404, { error: "not_found" });
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
351
463
|
// src/access-http.ts
|
|
352
|
-
function resolveDefaultAdminConsolePublicDir() {
|
|
353
|
-
const thisDir =
|
|
464
|
+
function resolveDefaultAdminConsolePublicDir(sourceUrl = import.meta.url) {
|
|
465
|
+
const thisDir = path2.dirname(fileURLToPath(sourceUrl));
|
|
354
466
|
const candidates = [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
// Package root: walk up from dist/ to the package root
|
|
360
|
-
path.resolve(thisDir, "../../admin-console/public")
|
|
467
|
+
path2.resolve(thisDir, "../../../admin-console/public"),
|
|
468
|
+
path2.resolve(thisDir, "../dist/admin-console/public"),
|
|
469
|
+
path2.resolve(thisDir, "./admin-console/public"),
|
|
470
|
+
path2.resolve(thisDir, "../../admin-console/public")
|
|
361
471
|
];
|
|
362
472
|
return candidates.find((candidate) => existsSync(candidate)) ?? candidates[0];
|
|
363
473
|
}
|
|
@@ -399,7 +509,7 @@ function assertResourceMetadataUrl(value) {
|
|
|
399
509
|
if (value === void 0) return void 0;
|
|
400
510
|
let parsed;
|
|
401
511
|
try {
|
|
402
|
-
parsed = new
|
|
512
|
+
parsed = new URL2(value);
|
|
403
513
|
} catch {
|
|
404
514
|
throw new Error(
|
|
405
515
|
`access HTTP resourceMetadataUrl must be an absolute http(s) URL, got: ${value}`
|
|
@@ -436,7 +546,7 @@ function parseTrustZoneFilter(raw) {
|
|
|
436
546
|
function summarizeHttpRequest(req) {
|
|
437
547
|
const method = req.method ?? "UNKNOWN";
|
|
438
548
|
try {
|
|
439
|
-
const parsed = new
|
|
549
|
+
const parsed = new URL2(req.url ?? "/", "http://localhost");
|
|
440
550
|
return `${method} ${parsed.pathname}`;
|
|
441
551
|
} catch {
|
|
442
552
|
return `${method} ${(req.url ?? "/").split("?")[0]}`;
|
|
@@ -488,7 +598,7 @@ function codingContextFromProjectTag(projectTag) {
|
|
|
488
598
|
defaultBranch: null
|
|
489
599
|
};
|
|
490
600
|
}
|
|
491
|
-
var EngramAccessHttpServer = class {
|
|
601
|
+
var EngramAccessHttpServer = class extends SupportPassportAccessHttpBase {
|
|
492
602
|
service;
|
|
493
603
|
host;
|
|
494
604
|
requestedPort;
|
|
@@ -531,6 +641,7 @@ var EngramAccessHttpServer = class {
|
|
|
531
641
|
*/
|
|
532
642
|
chatTtlTimer = null;
|
|
533
643
|
constructor(options) {
|
|
644
|
+
super();
|
|
534
645
|
this.service = options.service;
|
|
535
646
|
this.host = options.host?.trim() || "127.0.0.1";
|
|
536
647
|
this.requestedPort = parseHttpServerPort(options.port);
|
|
@@ -840,11 +951,10 @@ var EngramAccessHttpServer = class {
|
|
|
840
951
|
return queryDisclosure;
|
|
841
952
|
}
|
|
842
953
|
async handle(req, res, correlationId, abortSignal) {
|
|
843
|
-
const parsed = new
|
|
954
|
+
const parsed = new URL2(req.url ?? "/", `http://${hostToUrlAuthority(this.host)}`);
|
|
844
955
|
const pathname = parsed.pathname;
|
|
845
|
-
if (
|
|
846
|
-
|
|
847
|
-
}
|
|
956
|
+
if (await this.handleSupportPassportUi(req, res, pathname)) return;
|
|
957
|
+
if (this.adminConsoleEnabled && await this.handleAdminConsole(req, res, pathname)) return;
|
|
848
958
|
if (req.method === "GET" && (pathname === "/engram/v1/live" || pathname === "/engram/v1/health")) {
|
|
849
959
|
const { ready, warmupAttempts, lastError } = this.readiness();
|
|
850
960
|
if (!ready) {
|
|
@@ -858,11 +968,15 @@ var EngramAccessHttpServer = class {
|
|
|
858
968
|
return;
|
|
859
969
|
}
|
|
860
970
|
}
|
|
971
|
+
if (await this.handleSupportPassportPublicRequest(req, res)) return;
|
|
861
972
|
if (this.externalRequestHandler) {
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
973
|
+
const tokenAuthorized = this.isAuthorized(req, pathname);
|
|
974
|
+
const capabilities = this.resolveTokenCapabilities(req, pathname);
|
|
975
|
+
const authorized = tokenAuthorized && !isCapabilityRestricted(capabilities);
|
|
976
|
+
if (await this.externalRequestHandler(req, res, {
|
|
977
|
+
authorized,
|
|
978
|
+
tokenAuthorized
|
|
979
|
+
})) return;
|
|
866
980
|
}
|
|
867
981
|
if (!this.isAuthorized(req, pathname)) {
|
|
868
982
|
const body = JSON.stringify({ error: "unauthorized", code: "unauthorized" });
|
|
@@ -890,10 +1004,8 @@ var EngramAccessHttpServer = class {
|
|
|
890
1004
|
res.end(body);
|
|
891
1005
|
return;
|
|
892
1006
|
}
|
|
893
|
-
if (req.method === "POST" && pathname === "/mcp")
|
|
894
|
-
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
1007
|
+
if (req.method === "POST" && pathname === "/mcp") return this.handleMcpRequest(req, res, abortSignal);
|
|
1008
|
+
if (await this.handleSupportPassportOwnerRequest(req, res, pathname, parsed.search.length > 0, abortSignal)) return;
|
|
897
1009
|
if (req.method === "GET" && pathname === "/engram/v1/live") return this.respondJson(res, 200, { ok: true, ready: true });
|
|
898
1010
|
if (req.method === "GET" && pathname === "/engram/v1/health") {
|
|
899
1011
|
const { degraded, warmupAttempts, lastError } = this.readiness();
|
|
@@ -910,9 +1022,10 @@ var EngramAccessHttpServer = class {
|
|
|
910
1022
|
if (req.method === "GET" && pathname === "/engram/v1/authorization") {
|
|
911
1023
|
res.setHeader("cache-control", "no-store");
|
|
912
1024
|
const probe = probeOperationAuthorization(tokenCapabilityStore.getStore(), parsed.searchParams.getAll("op"));
|
|
913
|
-
const
|
|
914
|
-
for (const namespace of authorizationProbeNamespaces(probe.operations, namespaceParam))
|
|
1025
|
+
for (const namespace of authorizationProbeNamespaces(probe.operations, parsed.searchParams.get("namespace") ?? void 0))
|
|
915
1026
|
this.resolveNamespace(req, namespace);
|
|
1027
|
+
if (authorizationProbeRequiresPrincipalNamespace(probe.operations))
|
|
1028
|
+
await this.enforceSupportPassportAuthorizationProbe(req);
|
|
916
1029
|
this.respondJson(res, 200, probe);
|
|
917
1030
|
return;
|
|
918
1031
|
}
|
|
@@ -1605,7 +1718,7 @@ var EngramAccessHttpServer = class {
|
|
|
1605
1718
|
if (!op) {
|
|
1606
1719
|
throw new Error("access-boundary: operation not registered: relay_mission_append");
|
|
1607
1720
|
}
|
|
1608
|
-
let
|
|
1721
|
+
let writeQuota;
|
|
1609
1722
|
try {
|
|
1610
1723
|
const output = await op.run(
|
|
1611
1724
|
{ missionId, namespace, event: body.event },
|
|
@@ -1614,17 +1727,18 @@ var EngramAccessHttpServer = class {
|
|
|
1614
1727
|
authenticatedPrincipal: this.resolveRequestPrincipal(req),
|
|
1615
1728
|
hooks: {
|
|
1616
1729
|
enforceWriteQuota: () => {
|
|
1617
|
-
|
|
1730
|
+
writeQuota ??= this.reserveWriteRateLimitSlot(req);
|
|
1618
1731
|
}
|
|
1619
1732
|
}
|
|
1620
1733
|
}
|
|
1621
1734
|
);
|
|
1622
1735
|
if (output.result.appended) {
|
|
1623
|
-
|
|
1736
|
+
writeQuota?.commit();
|
|
1737
|
+
writeQuota = void 0;
|
|
1624
1738
|
}
|
|
1625
1739
|
this.respondJson(res, output.result.appended ? 201 : 200, output.result);
|
|
1626
1740
|
} finally {
|
|
1627
|
-
|
|
1741
|
+
writeQuota?.release();
|
|
1628
1742
|
}
|
|
1629
1743
|
return;
|
|
1630
1744
|
}
|
|
@@ -2255,7 +2369,7 @@ var EngramAccessHttpServer = class {
|
|
|
2255
2369
|
if (req.method === "POST" && pathname === "/engram/v1/contradiction-scan") {
|
|
2256
2370
|
this.enforceTokenOp("contradiction_scan_run");
|
|
2257
2371
|
const body = await this.readJsonBody(req);
|
|
2258
|
-
const { runContradictionScan } = await import("./contradiction-scan-
|
|
2372
|
+
const { runContradictionScan } = await import("./contradiction-scan-JDTBXRGW.js");
|
|
2259
2373
|
const principal = this.resolveRequestPrincipal(req);
|
|
2260
2374
|
const result = await runContradictionScan({
|
|
2261
2375
|
storage: this.service.storageRef,
|
|
@@ -2655,7 +2769,7 @@ var EngramAccessHttpServer = class {
|
|
|
2655
2769
|
* client never disconnects (Cursor review thread `access-http.ts:232`).
|
|
2656
2770
|
*/
|
|
2657
2771
|
async handleGraphEventsSSE(req, res) {
|
|
2658
|
-
const parsed = new
|
|
2772
|
+
const parsed = new URL2(req.url ?? "/", `http://${hostToUrlAuthority(this.host)}`);
|
|
2659
2773
|
const namespaceParam = parsed.searchParams.get("namespace");
|
|
2660
2774
|
const namespace = this.resolveNamespace(req, namespaceParam && namespaceParam.length > 0 ? namespaceParam : void 0);
|
|
2661
2775
|
const principal = this.resolveRequestPrincipal(req);
|
|
@@ -2753,17 +2867,25 @@ var EngramAccessHttpServer = class {
|
|
|
2753
2867
|
]);
|
|
2754
2868
|
const isCodegraphManageAdr = toolName === "engram.codegraph_manage_adr" || toolName === "remnic.codegraph_manage_adr";
|
|
2755
2869
|
const codegraphWrite = CODEGRAPH_WRITE_TOOLS.has(toolName) || isCodegraphManageAdr && (toolArgsSubcommand === "record" || toolArgsSubcommand === "supersede");
|
|
2756
|
-
const
|
|
2870
|
+
const supportPassportQuotaLimitedWrite = this.isSupportPassportQuotaLimitedWriteTool(toolName);
|
|
2871
|
+
const isMcpWrite = request.method === "tools/call" && (toolName === "engram.memory_store" || toolName === "remnic.memory_store" || toolName === "engram.suggestion_submit" || toolName === "remnic.suggestion_submit" || toolName === "engram.observe" || toolName === "remnic.observe" || toolName === "engram.lcm_compaction_flush" || toolName === "remnic.lcm_compaction_flush" || toolName === "engram.extraction_force_flush" || toolName === "remnic.extraction_force_flush" || toolName === "engram.lcm_compaction_record" || toolName === "remnic.lcm_compaction_record" || toolName === "engram.capsule_export" || toolName === "remnic.capsule_export" || toolName === "engram.capsule_import" || toolName === "remnic.capsule_import" || toolName === "engram.entity_synthesis_run" || toolName === "remnic.entity_synthesis_run" || !dreamsRunDryRun && (toolName === "engram.dreams_run" || toolName === "remnic.dreams_run") || !memoryActionApplyDryRun && (toolName === "engram.memory_action_apply" || toolName === "remnic.memory_action_apply") || (toolName === "engram.memory_correct_apply" || toolName === "remnic.memory_correct_apply" || toolName === "engram.memory_correct_plan" || toolName === "remnic.memory_correct_plan") || codingDecisionWrite || codingArchitectureWrite || codegraphWrite || supportPassportQuotaLimitedWrite);
|
|
2757
2872
|
const observeSelfEnforcesQuota = toolName === "engram.observe" || toolName === "remnic.observe";
|
|
2758
2873
|
const extractionForceFlushWrite = toolName === "engram.extraction_force_flush" || toolName === "remnic.extraction_force_flush";
|
|
2759
2874
|
let writeRateLimitRecorded = false;
|
|
2875
|
+
let supportPassportQuota;
|
|
2760
2876
|
const recordCommittedMcpWrite = extractionForceFlushWrite ? () => {
|
|
2761
2877
|
if (writeRateLimitRecorded) return;
|
|
2762
2878
|
writeRateLimitRecorded = true;
|
|
2763
2879
|
this.recordWriteRateLimitHit(req);
|
|
2880
|
+
} : supportPassportQuotaLimitedWrite ? () => {
|
|
2881
|
+
if (writeRateLimitRecorded) return;
|
|
2882
|
+
writeRateLimitRecorded = true;
|
|
2883
|
+
supportPassportQuota?.commit();
|
|
2884
|
+
supportPassportQuota = void 0;
|
|
2764
2885
|
} : void 0;
|
|
2765
2886
|
if (isMcpWrite && !observeSelfEnforcesQuota) {
|
|
2766
|
-
this.
|
|
2887
|
+
if (supportPassportQuotaLimitedWrite) supportPassportQuota = this.reserveWriteRateLimitSlot(req);
|
|
2888
|
+
else this.ensureWriteRateLimitAvailable(req);
|
|
2767
2889
|
}
|
|
2768
2890
|
const sessionId = (() => {
|
|
2769
2891
|
const raw = req.headers["mcp-session-id"];
|
|
@@ -2789,6 +2911,9 @@ var EngramAccessHttpServer = class {
|
|
|
2789
2911
|
recordWriteCommit: recordCommittedMcpWrite,
|
|
2790
2912
|
sourceConnector: this.resolveConnector(req),
|
|
2791
2913
|
abortSignal
|
|
2914
|
+
}).catch((error) => {
|
|
2915
|
+
supportPassportQuota?.release();
|
|
2916
|
+
throw error;
|
|
2792
2917
|
});
|
|
2793
2918
|
if (isMcpWrite && response !== null) {
|
|
2794
2919
|
const result = response.result;
|
|
@@ -2797,10 +2922,16 @@ var EngramAccessHttpServer = class {
|
|
|
2797
2922
|
const isRejectedCodegraph = structured?.ok === false;
|
|
2798
2923
|
const counts = structured ? this.shouldCountWriteRateLimit(structured) : true;
|
|
2799
2924
|
if (!writeRateLimitRecorded && !isError && !isRejectedCodegraph && counts) {
|
|
2800
|
-
|
|
2925
|
+
if (supportPassportQuota) {
|
|
2926
|
+
supportPassportQuota.commit();
|
|
2927
|
+
supportPassportQuota = void 0;
|
|
2928
|
+
} else {
|
|
2929
|
+
this.recordWriteRateLimitHit(req);
|
|
2930
|
+
}
|
|
2801
2931
|
writeRateLimitRecorded = true;
|
|
2802
2932
|
}
|
|
2803
2933
|
}
|
|
2934
|
+
supportPassportQuota?.release();
|
|
2804
2935
|
if (abortSignal.aborted) {
|
|
2805
2936
|
throw isAbortError(abortSignal.reason) ? abortSignal.reason : abortError("HTTP client disconnected");
|
|
2806
2937
|
}
|
|
@@ -2862,7 +2993,7 @@ var EngramAccessHttpServer = class {
|
|
|
2862
2993
|
return true;
|
|
2863
2994
|
}
|
|
2864
2995
|
if (pathname === "/remnic/ui/app.js" || pathname === "/engram/ui/app.js") {
|
|
2865
|
-
await this.respondStatic(res,
|
|
2996
|
+
await this.respondStatic(res, path2.join(this.adminConsolePublicDir, "app.js"), "application/javascript; charset=utf-8");
|
|
2866
2997
|
return true;
|
|
2867
2998
|
}
|
|
2868
2999
|
const relayAsset = RELAY_ADMIN_CONSOLE_ASSETS.get(pathname.split("/").at(-1) ?? "");
|
|
@@ -2870,18 +3001,20 @@ var EngramAccessHttpServer = class {
|
|
|
2870
3001
|
if (isRelayAsset && relayAsset && pathname.split("/").length === 5) {
|
|
2871
3002
|
const fileName = pathname.split("/").at(-1);
|
|
2872
3003
|
if (fileName) {
|
|
2873
|
-
await this.respondStatic(res,
|
|
3004
|
+
await this.respondStatic(res, path2.join(this.adminConsolePublicDir, "relay", fileName), relayAsset);
|
|
2874
3005
|
return true;
|
|
2875
3006
|
}
|
|
2876
3007
|
}
|
|
2877
3008
|
return false;
|
|
2878
3009
|
}
|
|
2879
|
-
async respondAdminConsoleShell(req, res, pathname, relativePath = "index.html") {
|
|
3010
|
+
async respondAdminConsoleShell(req, res, pathname, relativePath = "index.html", allowPrefill = true) {
|
|
2880
3011
|
try {
|
|
2881
|
-
let body = await readFile(
|
|
2882
|
-
const
|
|
3012
|
+
let body = await readFile(path2.join(this.adminConsolePublicDir, relativePath), "utf-8");
|
|
3013
|
+
const matched = this.resolveAuthorizedEntry(req, pathname);
|
|
3014
|
+
const canPrefillToken = allowPrefill && this.adminConsolePrefillToken && matched !== null && matched.capabilities === void 0 && this.timingSafeStringEqual(matched.token, this.adminConsolePrefillToken);
|
|
2883
3015
|
if (canPrefillToken) {
|
|
2884
|
-
const
|
|
3016
|
+
const serializedToken = serializeInlineScriptValue(this.adminConsolePrefillToken);
|
|
3017
|
+
const script = `<script>(function(token,script){const key="__REMNIC_ADMIN_CONSOLE_PREFILL_TOKEN__";const clear=function(){token="";try{delete window[key]}catch{window[key]=""}};window.addEventListener("pagehide",clear,{once:true});window.addEventListener("beforeunload",clear,{once:true});try{if(new URLSearchParams(location.hash.slice(1)).has("secret")){clear();return}Object.defineProperty(window,key,{configurable:true,get:function(){const value=token;clear();return value}})}finally{if(script){script.textContent="";script.remove()}}})(${serializedToken},document.currentScript);</script>`;
|
|
2885
3018
|
body = body.includes("</head>") ? body.replace("</head>", `${script}</head>`) : `${script}${body}`;
|
|
2886
3019
|
res.setHeader("cache-control", "private, no-store");
|
|
2887
3020
|
}
|
|
@@ -3098,7 +3231,7 @@ var EngramAccessHttpServer = class {
|
|
|
3098
3231
|
}
|
|
3099
3232
|
if (!candidate && pathname === "/engram/v1/graph/events") {
|
|
3100
3233
|
try {
|
|
3101
|
-
const parsed = new
|
|
3234
|
+
const parsed = new URL2(req.url ?? "/", `http://${hostToUrlAuthority(this.host)}`);
|
|
3102
3235
|
const queryToken = parsed.searchParams.get("token");
|
|
3103
3236
|
if (queryToken && queryToken.length > 0) {
|
|
3104
3237
|
candidate = queryToken;
|
|
@@ -3227,11 +3360,11 @@ var EngramAccessHttpServer = class {
|
|
|
3227
3360
|
this.writeLimiter.record(this.principalForRateLimit(req));
|
|
3228
3361
|
}
|
|
3229
3362
|
reserveWriteRateLimitSlot(req) {
|
|
3230
|
-
const
|
|
3231
|
-
if (!
|
|
3363
|
+
const reservation = this.writeLimiter.reserve(this.principalForRateLimit(req));
|
|
3364
|
+
if (!reservation) {
|
|
3232
3365
|
throw new HttpError(429, "write_rate_limited", "write_rate_limited");
|
|
3233
3366
|
}
|
|
3234
|
-
return
|
|
3367
|
+
return reservation;
|
|
3235
3368
|
}
|
|
3236
3369
|
principalForRateLimit(req) {
|
|
3237
3370
|
if (!req) return void 0;
|
|
@@ -3261,6 +3394,7 @@ var EngramAccessHttpServer = class {
|
|
|
3261
3394
|
|
|
3262
3395
|
export {
|
|
3263
3396
|
MeetingsInputError,
|
|
3397
|
+
resolveDefaultAdminConsolePublicDir,
|
|
3264
3398
|
EngramAccessHttpServer
|
|
3265
3399
|
};
|
|
3266
|
-
//# sourceMappingURL=chunk-
|
|
3400
|
+
//# sourceMappingURL=chunk-PT54WISF.js.map
|