shieldcortex 4.15.0 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dashboard/.next/standalone/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/standalone/dashboard/.next/build-manifest.json +2 -2
- package/dashboard/.next/standalone/dashboard/.next/prerender-manifest.json +3 -3
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/api/routes/sessions.d.ts +19 -0
- package/dist/api/routes/sessions.js +153 -0
- package/dist/api/visualization-server.js +2 -0
- package/dist/cli/import-jsonl.d.ts +12 -0
- package/dist/cli/import-jsonl.js +88 -0
- package/dist/cli/migrate-legacy.d.ts +18 -0
- package/dist/cli/migrate-legacy.js +96 -0
- package/dist/database/init.js +65 -0
- package/dist/database/schema.sql +32 -0
- package/dist/database/seed-firewall-rules.d.ts +21 -0
- package/dist/database/seed-firewall-rules.js +105 -0
- package/dist/defence/custom-rules/store.d.ts +4 -1
- package/dist/defence/custom-rules/store.js +7 -3
- package/dist/defence/firewall/instruction-detector.js +15 -0
- package/dist/defence/pipeline.js +19 -13
- package/dist/defence/types.d.ts +1 -1
- package/dist/index.js +8 -0
- package/dist/sessions/capture.d.ts +45 -0
- package/dist/sessions/capture.js +59 -0
- package/dist/sessions/import-jsonl.d.ts +85 -0
- package/dist/sessions/import-jsonl.js +193 -0
- package/dist/sessions/timeline.d.ts +28 -0
- package/dist/sessions/timeline.js +52 -0
- package/hooks/openclaw/cortex-memory/HOOK.md +37 -0
- package/package.json +1 -1
- package/plugins/openclaw/dist/openclaw.plugin.json +1 -1
- package/scripts/lib/extract-memorable-segments.mjs +555 -0
- package/scripts/lib/save-memory.mjs +198 -13
- package/scripts/lib/session-capture.mjs +102 -0
- package/scripts/pre-compact-hook.mjs +38 -375
- package/scripts/prompt-recall-hook.mjs +30 -4
- package/scripts/session-end-hook.mjs +35 -307
- package/scripts/stop-hook.mjs +28 -159
- /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_buildManifest.js +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_clientMiddlewareManifest.json +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_ssgManifest.js +0 -0
|
@@ -21,6 +21,12 @@ import { readTranscriptText } from './lib/transcript-reader.mjs';
|
|
|
21
21
|
import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
|
|
22
22
|
import { recordHookInvocation } from './lib/telemetry.mjs';
|
|
23
23
|
import { deriveProjectKey } from './lib/project-key.mjs';
|
|
24
|
+
import { recordSessionEvent } from './lib/session-capture.mjs';
|
|
25
|
+
import {
|
|
26
|
+
extractMemorableSegments,
|
|
27
|
+
processSegments,
|
|
28
|
+
PRE_COMPACT_CATEGORY_THRESHOLDS,
|
|
29
|
+
} from './lib/extract-memorable-segments.mjs';
|
|
24
30
|
|
|
25
31
|
// Database paths (with legacy fallback)
|
|
26
32
|
const NEW_DB_DIR = join(homedir(), '.shieldcortex');
|
|
@@ -42,31 +48,13 @@ const { dir: DB_DIR, path: DB_PATH } = getDbPath();
|
|
|
42
48
|
const MAX_SHORT_TERM_MEMORIES = 100;
|
|
43
49
|
const MAX_LONG_TERM_MEMORIES = 1000;
|
|
44
50
|
|
|
45
|
-
// Base salience threshold (will be adjusted dynamically)
|
|
46
|
-
// Lowered from 0.45 to capture more content
|
|
47
|
-
const BASE_THRESHOLD = 0.35;
|
|
48
|
-
|
|
49
|
-
// Category-specific extraction thresholds (lower = easier to extract).
|
|
50
|
-
// Raised +0.1 across the board in v4.11.0 after fleet evidence showed the
|
|
51
|
-
// previous permissive thresholds produced ~5% signal and flooded recall with
|
|
52
|
-
// noise. Prefer missing a marginal memory to saving a noisy one.
|
|
53
|
-
const CATEGORY_EXTRACTION_THRESHOLDS = {
|
|
54
|
-
architecture: 0.38,
|
|
55
|
-
error: 0.40,
|
|
56
|
-
context: 0.42,
|
|
57
|
-
learning: 0.42,
|
|
58
|
-
pattern: 0.45,
|
|
59
|
-
preference: 0.48,
|
|
60
|
-
note: 0.52,
|
|
61
|
-
todo: 0.50,
|
|
62
|
-
relationship: 0.45,
|
|
63
|
-
custom: 0.45,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
51
|
// Maximum memories to auto-create per compaction.
|
|
67
52
|
// Dropped 5 → 2 in v4.11.0 for the same reason thresholds were raised.
|
|
68
53
|
const MAX_AUTO_MEMORIES = 2;
|
|
69
54
|
|
|
55
|
+
// Pre-compact uses tighter category thresholds (raised +0.10 in v4.11.0)
|
|
56
|
+
// — see PRE_COMPACT_CATEGORY_THRESHOLDS in scripts/lib/extract-memorable-segments.mjs.
|
|
57
|
+
|
|
70
58
|
// ==================== DYNAMIC THRESHOLD CALCULATION ====================
|
|
71
59
|
|
|
72
60
|
/**
|
|
@@ -103,357 +91,10 @@ function getDynamicThreshold(memoryCount, maxMemories) {
|
|
|
103
91
|
return 0.25; // Very sparse - accept most valuable items
|
|
104
92
|
}
|
|
105
93
|
|
|
106
|
-
|
|
107
|
-
* Get extraction threshold for a specific category
|
|
108
|
-
* Combines dynamic threshold with category-specific adjustments
|
|
109
|
-
*/
|
|
110
|
-
function getExtractionThreshold(category, dynamicThreshold) {
|
|
111
|
-
const categoryThreshold = CATEGORY_EXTRACTION_THRESHOLDS[category] || BASE_THRESHOLD;
|
|
112
|
-
// Use whichever is lower (more permissive for valuable categories when memory is sparse)
|
|
113
|
-
return Math.min(categoryThreshold, dynamicThreshold);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ==================== SALIENCE DETECTION (Mirrors src/memory/salience.ts) ====================
|
|
117
|
-
|
|
118
|
-
const ARCHITECTURE_KEYWORDS = [
|
|
119
|
-
'architecture', 'design', 'pattern', 'structure', 'system',
|
|
120
|
-
'database', 'api', 'schema', 'model', 'framework', 'stack',
|
|
121
|
-
'microservice', 'monolith', 'serverless', 'infrastructure'
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
const ERROR_KEYWORDS = [
|
|
125
|
-
'error', 'bug', 'fix', 'issue', 'problem', 'crash', 'fail',
|
|
126
|
-
'exception', 'debug', 'resolve', 'solution', 'workaround'
|
|
127
|
-
];
|
|
128
|
-
|
|
129
|
-
const PREFERENCE_KEYWORDS = [
|
|
130
|
-
'prefer', 'always', 'never', 'style', 'convention', 'standard',
|
|
131
|
-
'like', 'want', 'should', 'must', 'require'
|
|
132
|
-
];
|
|
133
|
-
|
|
134
|
-
const PATTERN_KEYWORDS = [
|
|
135
|
-
'pattern', 'practice', 'approach', 'method', 'technique',
|
|
136
|
-
'implementation', 'strategy', 'algorithm', 'workflow'
|
|
137
|
-
];
|
|
138
|
-
|
|
139
|
-
const DECISION_KEYWORDS = [
|
|
140
|
-
'decided', 'decision', 'chose', 'chosen', 'selected', 'going with',
|
|
141
|
-
'will use', 'opted for', 'settled on', 'agreed'
|
|
142
|
-
];
|
|
143
|
-
|
|
144
|
-
const LEARNING_KEYWORDS = [
|
|
145
|
-
'learned', 'discovered', 'realized', 'found out', 'turns out',
|
|
146
|
-
'TIL', 'now know', 'understand now', 'figured out'
|
|
147
|
-
];
|
|
148
|
-
|
|
149
|
-
const EMOTIONAL_MARKERS = [
|
|
150
|
-
'important', 'critical', 'crucial', 'essential', 'key',
|
|
151
|
-
'finally', 'breakthrough', 'eureka', 'aha', 'got it',
|
|
152
|
-
'frustrating', 'annoying', 'tricky', 'remember'
|
|
153
|
-
];
|
|
154
|
-
|
|
155
|
-
const CODE_REFERENCE_PATTERNS = [
|
|
156
|
-
/\b[A-Z][a-zA-Z]*\.[a-zA-Z]+\b/,
|
|
157
|
-
/\b[a-z_][a-zA-Z0-9_]*\.(ts|js|py|go|rs)\b/,
|
|
158
|
-
/`[^`]+`/,
|
|
159
|
-
/\b(function|class|interface|type|const|let|var)\s+\w+/i,
|
|
160
|
-
/\bline\s*\d+\b/i,
|
|
161
|
-
/\b(src|lib|app|components?)\/\S+/,
|
|
162
|
-
];
|
|
163
|
-
|
|
164
|
-
function detectKeywords(text, keywords) {
|
|
165
|
-
const lower = text.toLowerCase();
|
|
166
|
-
return keywords.some(keyword => lower.includes(keyword.toLowerCase()));
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function detectCodeReferences(content) {
|
|
170
|
-
return CODE_REFERENCE_PATTERNS.some(pattern => pattern.test(content));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function detectExplicitRequest(text) {
|
|
174
|
-
const patterns = [
|
|
175
|
-
/\bremember\s+(this|that)\b/i,
|
|
176
|
-
/\bdon'?t\s+forget\b/i,
|
|
177
|
-
/\bkeep\s+(in\s+)?mind\b/i,
|
|
178
|
-
/\bnote\s+(this|that)\b/i,
|
|
179
|
-
/\bsave\s+(this|that)\b/i,
|
|
180
|
-
/\bimportant[:\s]/i,
|
|
181
|
-
/\bfor\s+future\s+reference\b/i,
|
|
182
|
-
];
|
|
183
|
-
return patterns.some(pattern => pattern.test(text));
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function calculateSalience(text) {
|
|
187
|
-
let score = 0.25; // Base score
|
|
188
|
-
|
|
189
|
-
if (detectExplicitRequest(text)) score += 0.5;
|
|
190
|
-
if (detectKeywords(text, ARCHITECTURE_KEYWORDS)) score += 0.4;
|
|
191
|
-
if (detectKeywords(text, ERROR_KEYWORDS)) score += 0.35;
|
|
192
|
-
if (detectKeywords(text, DECISION_KEYWORDS)) score += 0.35;
|
|
193
|
-
if (detectKeywords(text, LEARNING_KEYWORDS)) score += 0.3;
|
|
194
|
-
if (detectKeywords(text, PATTERN_KEYWORDS)) score += 0.25;
|
|
195
|
-
if (detectKeywords(text, PREFERENCE_KEYWORDS)) score += 0.25;
|
|
196
|
-
if (detectCodeReferences(text)) score += 0.15;
|
|
197
|
-
if (detectKeywords(text, EMOTIONAL_MARKERS)) score += 0.2;
|
|
198
|
-
|
|
199
|
-
return Math.min(1.0, score);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function suggestCategory(text) {
|
|
203
|
-
const lower = text.toLowerCase();
|
|
204
|
-
|
|
205
|
-
if (detectKeywords(lower, ARCHITECTURE_KEYWORDS)) return 'architecture';
|
|
206
|
-
if (detectKeywords(lower, ERROR_KEYWORDS)) return 'error';
|
|
207
|
-
if (detectKeywords(lower, DECISION_KEYWORDS)) return 'context';
|
|
208
|
-
if (detectKeywords(lower, LEARNING_KEYWORDS)) return 'learning';
|
|
209
|
-
if (detectKeywords(lower, PREFERENCE_KEYWORDS)) return 'preference';
|
|
210
|
-
if (detectKeywords(lower, PATTERN_KEYWORDS)) return 'pattern';
|
|
211
|
-
if (/\b(todo|fixme|hack|xxx)\b/i.test(lower)) return 'todo';
|
|
212
|
-
|
|
213
|
-
return 'note';
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function extractTags(text, extractorName = null) {
|
|
217
|
-
const tags = new Set();
|
|
218
|
-
|
|
219
|
-
// Extract hashtags
|
|
220
|
-
const hashtagMatches = text.match(/#[a-zA-Z][a-zA-Z0-9_-]*/g);
|
|
221
|
-
if (hashtagMatches) {
|
|
222
|
-
hashtagMatches.forEach(tag => tags.add(tag.slice(1).toLowerCase()));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Extract common tech terms
|
|
226
|
-
const techTerms = [
|
|
227
|
-
'react', 'vue', 'angular', 'node', 'python', 'typescript', 'javascript',
|
|
228
|
-
'api', 'database', 'sql', 'mongodb', 'postgresql', 'mysql',
|
|
229
|
-
'docker', 'kubernetes', 'aws', 'git', 'testing', 'auth', 'security'
|
|
230
|
-
];
|
|
231
|
-
|
|
232
|
-
const lowerText = text.toLowerCase();
|
|
233
|
-
techTerms.forEach(term => {
|
|
234
|
-
if (lowerText.includes(term)) tags.add(term);
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
// Add auto-extracted tag
|
|
238
|
-
tags.add('auto-extracted');
|
|
239
|
-
|
|
240
|
-
// Add source extractor tag for tracking
|
|
241
|
-
if (extractorName) {
|
|
242
|
-
tags.add(`source:${extractorName}`);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return Array.from(tags).slice(0, 12);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Calculate frequency boost based on how often key terms appear
|
|
250
|
-
* across all extracted segments. Repeated topics are more important.
|
|
251
|
-
*/
|
|
252
|
-
function calculateFrequencyBoost(segment, allSegments) {
|
|
253
|
-
// Extract key terms (words > 5 chars that aren't common)
|
|
254
|
-
const commonWords = new Set([
|
|
255
|
-
'about', 'after', 'before', 'being', 'between', 'could', 'during',
|
|
256
|
-
'every', 'found', 'through', 'would', 'should', 'which', 'where',
|
|
257
|
-
'there', 'these', 'their', 'other', 'using', 'because', 'without'
|
|
258
|
-
]);
|
|
259
|
-
|
|
260
|
-
const words = segment.content.toLowerCase().split(/\s+/);
|
|
261
|
-
const keyTerms = words.filter(w =>
|
|
262
|
-
w.length > 5 &&
|
|
263
|
-
!commonWords.has(w) &&
|
|
264
|
-
/^[a-z]+$/.test(w)
|
|
265
|
-
);
|
|
266
|
-
|
|
267
|
-
let boost = 0;
|
|
268
|
-
const seenTerms = new Set();
|
|
269
|
-
|
|
270
|
-
for (const term of keyTerms) {
|
|
271
|
-
if (seenTerms.has(term)) continue;
|
|
272
|
-
seenTerms.add(term);
|
|
273
|
-
|
|
274
|
-
// Count how many other segments mention this term
|
|
275
|
-
const mentions = allSegments.filter(s =>
|
|
276
|
-
s !== segment &&
|
|
277
|
-
s.content.toLowerCase().includes(term)
|
|
278
|
-
).length;
|
|
279
|
-
|
|
280
|
-
// Boost for repeated topics (cap at 5 mentions)
|
|
281
|
-
if (mentions > 1) {
|
|
282
|
-
boost += 0.03 * Math.min(mentions, 5);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// Cap total frequency boost at 0.15
|
|
287
|
-
return Math.min(0.15, boost);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// ==================== CONTENT EXTRACTION ====================
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Extract meaningful segments from conversation text
|
|
294
|
-
* Looks for decisions, learnings, fixes, patterns, etc.
|
|
295
|
-
*/
|
|
296
|
-
function extractMemorableSegments(conversationText) {
|
|
297
|
-
const segments = [];
|
|
298
|
-
|
|
299
|
-
// Pattern matchers for different types of important content
|
|
300
|
-
// Expanded patterns with lower minimum lengths for better capture
|
|
301
|
-
const extractors = [
|
|
302
|
-
{
|
|
303
|
-
name: 'decision',
|
|
304
|
-
patterns: [
|
|
305
|
-
/(?:we\s+)?decided\s+(?:to\s+)?(.{15,200})/gi,
|
|
306
|
-
/(?:going|went)\s+with\s+(.{15,150})/gi,
|
|
307
|
-
/(?:chose|chosen|selected)\s+(.{15,150})/gi,
|
|
308
|
-
/the\s+(?:approach|solution|fix)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
309
|
-
// New patterns
|
|
310
|
-
/(?:using|will\s+use)\s+(.{15,150})/gi,
|
|
311
|
-
/(?:opted\s+for|settled\s+on)\s+(.{15,150})/gi,
|
|
312
|
-
],
|
|
313
|
-
titlePrefix: 'Decision: ',
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
name: 'error-fix',
|
|
317
|
-
patterns: [
|
|
318
|
-
/(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
|
|
319
|
-
/the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
320
|
-
/(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
321
|
-
/(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
|
|
322
|
-
// New patterns
|
|
323
|
-
/(?:problem|issue)\s+was\s+(.{15,150})/gi,
|
|
324
|
-
/(?:the\s+)?bug\s+(?:is|was)\s+(.{15,150})/gi,
|
|
325
|
-
/(?:debugging|debugged)\s+(.{15,150})/gi,
|
|
326
|
-
],
|
|
327
|
-
titlePrefix: 'Fix: ',
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: 'learning',
|
|
331
|
-
patterns: [
|
|
332
|
-
/(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
|
|
333
|
-
/turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
|
|
334
|
-
/(?:TIL|today\s+I\s+learned)[:\s]+(.{15,200})/gi,
|
|
335
|
-
// New patterns
|
|
336
|
-
/(?:now\s+)?(?:understand|know)\s+(?:that\s+)?(.{15,150})/gi,
|
|
337
|
-
/(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
|
|
338
|
-
],
|
|
339
|
-
titlePrefix: 'Learned: ',
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
name: 'architecture',
|
|
343
|
-
patterns: [
|
|
344
|
-
/the\s+architecture\s+(?:is|uses|consists\s+of)\s+(.{15,200})/gi,
|
|
345
|
-
/(?:design|pattern)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
346
|
-
/(?:system|api|database)\s+(?:structure|design)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
347
|
-
// New patterns
|
|
348
|
-
/(?:created|added|implemented|built)\s+(?:a\s+)?(.{15,200})/gi,
|
|
349
|
-
/(?:refactored|updated|changed)\s+(?:the\s+)?(.{15,150})/gi,
|
|
350
|
-
],
|
|
351
|
-
titlePrefix: 'Architecture: ',
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
name: 'preference',
|
|
355
|
-
patterns: [
|
|
356
|
-
/(?:always|never)\s+(.{10,150})/gi,
|
|
357
|
-
/(?:prefer|want)\s+to\s+(.{10,150})/gi,
|
|
358
|
-
/(?:should|must)\s+(?:always\s+)?(.{10,150})/gi,
|
|
359
|
-
],
|
|
360
|
-
titlePrefix: 'Preference: ',
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
name: 'important-note',
|
|
364
|
-
patterns: [
|
|
365
|
-
/important[:\s]+(.{15,200})/gi,
|
|
366
|
-
/(?:note|remember)[:\s]+(.{15,200})/gi,
|
|
367
|
-
/(?:key|critical)\s+(?:point|thing)[:\s]+(.{15,200})/gi,
|
|
368
|
-
// New patterns
|
|
369
|
-
/(?:this\s+is\s+)?(?:crucial|essential)[:\s]+(.{15,150})/gi,
|
|
370
|
-
/(?:don't\s+forget|keep\s+in\s+mind)[:\s]+(.{15,150})/gi,
|
|
371
|
-
],
|
|
372
|
-
titlePrefix: 'Note: ',
|
|
373
|
-
},
|
|
374
|
-
];
|
|
375
|
-
|
|
376
|
-
for (const extractor of extractors) {
|
|
377
|
-
for (const pattern of extractor.patterns) {
|
|
378
|
-
let match;
|
|
379
|
-
while ((match = pattern.exec(conversationText)) !== null) {
|
|
380
|
-
const content = match[1].trim();
|
|
381
|
-
if (content.length >= 20) {
|
|
382
|
-
// Generate a title from first ~50 chars
|
|
383
|
-
const titleContent = content.slice(0, 50).replace(/\s+/g, ' ').trim();
|
|
384
|
-
const title = extractor.titlePrefix + (titleContent.length < 50 ? titleContent : titleContent + '...');
|
|
385
|
-
|
|
386
|
-
segments.push({
|
|
387
|
-
title,
|
|
388
|
-
content: content.slice(0, 500), // Cap content length
|
|
389
|
-
extractorType: extractor.name,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return segments;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Deduplicate and score segments
|
|
401
|
-
* @param {Array} segments - Raw extracted segments
|
|
402
|
-
* @param {number} dynamicThreshold - Dynamic threshold based on memory fullness
|
|
403
|
-
*/
|
|
404
|
-
function processSegments(segments, dynamicThreshold = BASE_THRESHOLD) {
|
|
405
|
-
// Remove near-duplicates (segments with >80% overlap)
|
|
406
|
-
const unique = [];
|
|
407
|
-
for (const seg of segments) {
|
|
408
|
-
const isDupe = unique.some(existing => {
|
|
409
|
-
const overlap = calculateOverlap(existing.content, seg.content);
|
|
410
|
-
return overlap > 0.8;
|
|
411
|
-
});
|
|
412
|
-
if (!isDupe) {
|
|
413
|
-
const text = seg.title + ' ' + seg.content;
|
|
414
|
-
const baseSalience = calculateSalience(text);
|
|
415
|
-
const category = suggestCategory(text);
|
|
416
|
-
|
|
417
|
-
unique.push({
|
|
418
|
-
...seg,
|
|
419
|
-
baseSalience,
|
|
420
|
-
category,
|
|
421
|
-
tags: extractTags(text, seg.extractorType),
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// Calculate frequency boost after we have all unique segments
|
|
427
|
-
for (const seg of unique) {
|
|
428
|
-
const frequencyBoost = calculateFrequencyBoost(seg, unique);
|
|
429
|
-
seg.salience = Math.min(1.0, seg.baseSalience + frequencyBoost);
|
|
430
|
-
seg.frequencyBoost = frequencyBoost;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// Sort by salience (highest first)
|
|
434
|
-
unique.sort((a, b) => b.salience - a.salience);
|
|
435
|
-
|
|
436
|
-
// Filter by category-specific threshold (combined with dynamic threshold)
|
|
437
|
-
const filtered = unique.filter(seg => {
|
|
438
|
-
const threshold = getExtractionThreshold(seg.category, dynamicThreshold);
|
|
439
|
-
return seg.salience >= threshold;
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
return filtered.slice(0, MAX_AUTO_MEMORIES);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* Simple overlap calculation (Jaccard similarity on words)
|
|
447
|
-
*/
|
|
448
|
-
function calculateOverlap(text1, text2) {
|
|
449
|
-
const words1 = new Set(text1.toLowerCase().split(/\s+/));
|
|
450
|
-
const words2 = new Set(text2.toLowerCase().split(/\s+/));
|
|
451
|
-
|
|
452
|
-
const intersection = new Set([...words1].filter(w => words2.has(w)));
|
|
453
|
-
const union = new Set([...words1, ...words2]);
|
|
94
|
+
// getExtractionThreshold lives in the shared chunker module.
|
|
454
95
|
|
|
455
|
-
|
|
456
|
-
|
|
96
|
+
// Salience detection, content extraction, and segment processing now
|
|
97
|
+
// live in scripts/lib/extract-memorable-segments.mjs (imported above).
|
|
457
98
|
|
|
458
99
|
// ==================== DATABASE OPERATIONS ====================
|
|
459
100
|
|
|
@@ -461,7 +102,7 @@ function calculateOverlap(text1, text2) {
|
|
|
461
102
|
// write lives in scripts/lib/save-memory.mjs so pre-compact and
|
|
462
103
|
// session-end share one code path (and one regression test).
|
|
463
104
|
function saveMemory(db, memory, project) {
|
|
464
|
-
saveAutoExtractedMemory(db, memory, project);
|
|
105
|
+
return saveAutoExtractedMemory(db, memory, project, { source: 'pre-compact-hook' });
|
|
465
106
|
}
|
|
466
107
|
|
|
467
108
|
|
|
@@ -477,7 +118,7 @@ process.stdin.on('readable', () => {
|
|
|
477
118
|
}
|
|
478
119
|
});
|
|
479
120
|
|
|
480
|
-
process.stdin.on('end', () => {
|
|
121
|
+
process.stdin.on('end', async () => {
|
|
481
122
|
const startedAt = Date.now();
|
|
482
123
|
let db = null;
|
|
483
124
|
let autoExtractedCount = 0;
|
|
@@ -514,6 +155,24 @@ process.stdin.on('end', () => {
|
|
|
514
155
|
// timeout: 5000ms prevents hook from hanging if DB is locked
|
|
515
156
|
db = new Database(DB_PATH, { timeout: 5000 });
|
|
516
157
|
|
|
158
|
+
// ── Session capture (v4.17): mark the compaction boundary in the
|
|
159
|
+
// replay timeline. Reuses the already-open write connection so
|
|
160
|
+
// no extra better-sqlite3 handle is created.
|
|
161
|
+
{
|
|
162
|
+
const sessionId = hookData.session_id || hookData.sessionId || null;
|
|
163
|
+
if (sessionId) {
|
|
164
|
+
try {
|
|
165
|
+
recordSessionEvent(db, {
|
|
166
|
+
session_id: sessionId,
|
|
167
|
+
ts: new Date().toISOString(),
|
|
168
|
+
kind: 'hook_fire',
|
|
169
|
+
payload: { hook: 'pre-compact', trigger, transcript_path: hookData.transcript_path ?? null },
|
|
170
|
+
project: project || null,
|
|
171
|
+
});
|
|
172
|
+
} catch { /* best-effort */ }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
517
176
|
// Get current memory stats for dynamic threshold calculation
|
|
518
177
|
const stats = getMemoryStats(db);
|
|
519
178
|
const totalMemories = stats.shortTerm + stats.longTerm;
|
|
@@ -527,12 +186,16 @@ process.stdin.on('end', () => {
|
|
|
527
186
|
if (conversationText && conversationText.length > 100) {
|
|
528
187
|
// Extract memorable segments
|
|
529
188
|
const segments = extractMemorableSegments(conversationText);
|
|
530
|
-
const processedSegments = processSegments(segments, dynamicThreshold
|
|
189
|
+
const processedSegments = processSegments(segments, dynamicThreshold, {
|
|
190
|
+
maxMemories: MAX_AUTO_MEMORIES,
|
|
191
|
+
categoryThresholds: PRE_COMPACT_CATEGORY_THRESHOLDS,
|
|
192
|
+
conversationText,
|
|
193
|
+
});
|
|
531
194
|
|
|
532
195
|
// Save auto-extracted memories
|
|
533
196
|
for (const memory of processedSegments) {
|
|
534
197
|
try {
|
|
535
|
-
saveMemory(db, memory, project);
|
|
198
|
+
await saveMemory(db, memory, project);
|
|
536
199
|
autoExtractedCount++;
|
|
537
200
|
const boostInfo = memory.frequencyBoost > 0 ? ` +${memory.frequencyBoost.toFixed(2)} boost` : '';
|
|
538
201
|
console.error(`[auto-extract] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}${boostInfo}, category: ${memory.category})`);
|
|
@@ -15,6 +15,7 @@ import { join } from 'path';
|
|
|
15
15
|
import { homedir } from 'os';
|
|
16
16
|
import { deriveProjectKey } from './lib/project-key.mjs';
|
|
17
17
|
import { sanitisePromptForRecall } from './lib/prompt-sanitiser.mjs';
|
|
18
|
+
import { recordSessionEvent } from './lib/session-capture.mjs';
|
|
18
19
|
|
|
19
20
|
// ==================== CONFIG ====================
|
|
20
21
|
|
|
@@ -153,15 +154,40 @@ process.stdin.on('readable', () => {
|
|
|
153
154
|
process.stdin.on('end', () => {
|
|
154
155
|
try {
|
|
155
156
|
const config = loadConfig();
|
|
157
|
+
const hookData = JSON.parse(input || '{}');
|
|
158
|
+
const rawPrompt = hookData.prompt || '';
|
|
159
|
+
const cwd = hookData.cwd || process.cwd();
|
|
160
|
+
const sessionId = hookData.session_id || hookData.sessionId || null;
|
|
161
|
+
|
|
162
|
+
// ── Session capture (v4.17): record the user prompt regardless of
|
|
163
|
+
// proactiveRecall config so the dashboard replay timeline gets a
|
|
164
|
+
// complete event stream. Opt-out via captureEvents=false. Failures
|
|
165
|
+
// are swallowed — capture must never block the user prompt.
|
|
166
|
+
if (config.captureEvents !== false && sessionId && rawPrompt) {
|
|
167
|
+
try {
|
|
168
|
+
const project = deriveProjectKey(cwd);
|
|
169
|
+
const dbPath = getDbPath();
|
|
170
|
+
if (existsSync(dbPath)) {
|
|
171
|
+
const captureDb = new Database(dbPath, { timeout: 1000 });
|
|
172
|
+
recordSessionEvent(captureDb, {
|
|
173
|
+
session_id: sessionId,
|
|
174
|
+
ts: new Date().toISOString(),
|
|
175
|
+
kind: 'prompt',
|
|
176
|
+
payload: { text: rawPrompt },
|
|
177
|
+
project: project || null,
|
|
178
|
+
actor: 'user',
|
|
179
|
+
});
|
|
180
|
+
captureDb.close();
|
|
181
|
+
}
|
|
182
|
+
} catch {
|
|
183
|
+
// Capture is best-effort.
|
|
184
|
+
}
|
|
185
|
+
}
|
|
156
186
|
|
|
157
187
|
if (config.proactiveRecall !== true) {
|
|
158
188
|
process.exit(0);
|
|
159
189
|
}
|
|
160
190
|
|
|
161
|
-
const hookData = JSON.parse(input || '{}');
|
|
162
|
-
const rawPrompt = hookData.prompt || '';
|
|
163
|
-
const cwd = hookData.cwd || process.cwd();
|
|
164
|
-
|
|
165
191
|
// Strip OpenClaw / framework metadata wrappers (e.g. Telegram channel
|
|
166
192
|
// headers) before any prompt-based decisions. Without this, the FTS5
|
|
167
193
|
// query is built from "Conversation info untrusted metadata json" tokens
|