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
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared chunker / auto-extractor for the ShieldCortex memory hooks.
|
|
3
|
+
*
|
|
4
|
+
* This module is the single source of truth for the regex-based extraction
|
|
5
|
+
* that turns conversation text into memory candidates. The session-end,
|
|
6
|
+
* pre-compact, and stop hooks all consume it.
|
|
7
|
+
*
|
|
8
|
+
* Behaviour-preserving extraction of identical code that previously lived
|
|
9
|
+
* in three near-duplicate hook scripts. Keeping the chunker centralised
|
|
10
|
+
* means rule tightening (e.g. rejection corpus, salience cap) lands in
|
|
11
|
+
* one place.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// ==================== CONSTANTS ====================
|
|
15
|
+
|
|
16
|
+
export const MAX_AUTO_MEMORIES = 5;
|
|
17
|
+
export const BASE_THRESHOLD = 0.35;
|
|
18
|
+
|
|
19
|
+
// Cap salience for non-LLM-rated auto-extracted memories. The regex
|
|
20
|
+
// extractors catch keyword shapes, not semantic confidence, so they should
|
|
21
|
+
// not produce 1.0-salience captures (which front-load proactive recall and
|
|
22
|
+
// shadow real high-confidence user input). 0.6 sits in the auto-quarantine
|
|
23
|
+
// trust band (0.5–0.7) used elsewhere in the pipeline.
|
|
24
|
+
export const AUTO_EXTRACT_SALIENCE_CAP = 0.6;
|
|
25
|
+
|
|
26
|
+
// Default category thresholds (session-end / lighter hooks).
|
|
27
|
+
// Pre-compact hook uses tighter thresholds (raised +0.10 in v4.11.0) and
|
|
28
|
+
// passes them via processSegments({ categoryThresholds: ... }).
|
|
29
|
+
export const DEFAULT_CATEGORY_THRESHOLDS = {
|
|
30
|
+
architecture: 0.28,
|
|
31
|
+
error: 0.30,
|
|
32
|
+
context: 0.32,
|
|
33
|
+
learning: 0.32,
|
|
34
|
+
pattern: 0.35,
|
|
35
|
+
preference: 0.38,
|
|
36
|
+
note: 0.42,
|
|
37
|
+
todo: 0.40,
|
|
38
|
+
relationship: 0.35,
|
|
39
|
+
custom: 0.35,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const PRE_COMPACT_CATEGORY_THRESHOLDS = {
|
|
43
|
+
architecture: 0.38,
|
|
44
|
+
error: 0.40,
|
|
45
|
+
context: 0.42,
|
|
46
|
+
learning: 0.42,
|
|
47
|
+
pattern: 0.45,
|
|
48
|
+
preference: 0.48,
|
|
49
|
+
note: 0.52,
|
|
50
|
+
todo: 0.50,
|
|
51
|
+
relationship: 0.45,
|
|
52
|
+
custom: 0.45,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const ARCHITECTURE_KEYWORDS = [
|
|
56
|
+
'architecture', 'design', 'pattern', 'structure', 'system',
|
|
57
|
+
'database', 'api', 'schema', 'model', 'framework', 'stack',
|
|
58
|
+
'microservice', 'monolith', 'serverless', 'infrastructure',
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
export const ERROR_KEYWORDS = [
|
|
62
|
+
'error', 'bug', 'fix', 'issue', 'problem', 'crash', 'fail',
|
|
63
|
+
'exception', 'debug', 'resolve', 'solution', 'workaround',
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
export const PREFERENCE_KEYWORDS = [
|
|
67
|
+
'prefer', 'always', 'never', 'style', 'convention', 'standard',
|
|
68
|
+
'like', 'want', 'should', 'must', 'require',
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
export const PATTERN_KEYWORDS = [
|
|
72
|
+
'pattern', 'practice', 'approach', 'method', 'technique',
|
|
73
|
+
'implementation', 'strategy', 'algorithm', 'workflow',
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
export const DECISION_KEYWORDS = [
|
|
77
|
+
'decided', 'decision', 'chose', 'chosen', 'selected', 'going with',
|
|
78
|
+
'will use', 'opted for', 'settled on', 'agreed',
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
export const LEARNING_KEYWORDS = [
|
|
82
|
+
'learned', 'discovered', 'realized', 'found out', 'turns out',
|
|
83
|
+
'TIL', 'now know', 'understand now', 'figured out',
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
export const EMOTIONAL_MARKERS = [
|
|
87
|
+
'important', 'critical', 'crucial', 'essential', 'key',
|
|
88
|
+
'finally', 'breakthrough', 'eureka', 'aha', 'got it',
|
|
89
|
+
'frustrating', 'annoying', 'tricky', 'remember',
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
export const CODE_REFERENCE_PATTERNS = [
|
|
93
|
+
/\b[A-Z][a-zA-Z]*\.[a-zA-Z]+\b/,
|
|
94
|
+
/\b[a-z_][a-zA-Z0-9_]*\.(ts|js|py|go|rs)\b/,
|
|
95
|
+
/`[^`]+`/,
|
|
96
|
+
/\b(function|class|interface|type|const|let|var)\s+\w+/i,
|
|
97
|
+
/\bline\s*\d+\b/i,
|
|
98
|
+
/\b(src|lib|app|components?)\/\S+/,
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const TECH_TAGS = [
|
|
102
|
+
'react', 'vue', 'angular', 'node', 'python', 'typescript', 'javascript',
|
|
103
|
+
'api', 'database', 'sql', 'mongodb', 'postgresql', 'mysql',
|
|
104
|
+
'docker', 'kubernetes', 'aws', 'git', 'testing', 'auth', 'security',
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
// ==================== SALIENCE ====================
|
|
108
|
+
|
|
109
|
+
export function detectKeywords(text, keywords) {
|
|
110
|
+
const lower = text.toLowerCase();
|
|
111
|
+
return keywords.some((keyword) => lower.includes(keyword.toLowerCase()));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function detectCodeReferences(content) {
|
|
115
|
+
return CODE_REFERENCE_PATTERNS.some((pattern) => pattern.test(content));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function detectExplicitRequest(text) {
|
|
119
|
+
const patterns = [
|
|
120
|
+
/\bremember\s+(this|that)\b/i,
|
|
121
|
+
/\bdon'?t\s+forget\b/i,
|
|
122
|
+
/\bkeep\s+(in\s+)?mind\b/i,
|
|
123
|
+
/\bnote\s+(this|that)\b/i,
|
|
124
|
+
/\bsave\s+(this|that)\b/i,
|
|
125
|
+
/\bimportant[:\s]/i,
|
|
126
|
+
/\bfor\s+future\s+reference\b/i,
|
|
127
|
+
];
|
|
128
|
+
return patterns.some((pattern) => pattern.test(text));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function calculateSalience(text) {
|
|
132
|
+
let score = 0.25;
|
|
133
|
+
if (detectExplicitRequest(text)) score += 0.5;
|
|
134
|
+
if (detectKeywords(text, ARCHITECTURE_KEYWORDS)) score += 0.4;
|
|
135
|
+
if (detectKeywords(text, ERROR_KEYWORDS)) score += 0.35;
|
|
136
|
+
if (detectKeywords(text, DECISION_KEYWORDS)) score += 0.35;
|
|
137
|
+
if (detectKeywords(text, LEARNING_KEYWORDS)) score += 0.3;
|
|
138
|
+
if (detectKeywords(text, PATTERN_KEYWORDS)) score += 0.25;
|
|
139
|
+
if (detectKeywords(text, PREFERENCE_KEYWORDS)) score += 0.25;
|
|
140
|
+
if (detectCodeReferences(text)) score += 0.15;
|
|
141
|
+
if (detectKeywords(text, EMOTIONAL_MARKERS)) score += 0.2;
|
|
142
|
+
return Math.min(1.0, score);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function suggestCategory(text) {
|
|
146
|
+
const lower = text.toLowerCase();
|
|
147
|
+
if (detectKeywords(lower, ARCHITECTURE_KEYWORDS)) return 'architecture';
|
|
148
|
+
if (detectKeywords(lower, ERROR_KEYWORDS)) return 'error';
|
|
149
|
+
if (detectKeywords(lower, DECISION_KEYWORDS)) return 'context';
|
|
150
|
+
if (detectKeywords(lower, LEARNING_KEYWORDS)) return 'learning';
|
|
151
|
+
if (detectKeywords(lower, PREFERENCE_KEYWORDS)) return 'preference';
|
|
152
|
+
if (detectKeywords(lower, PATTERN_KEYWORDS)) return 'pattern';
|
|
153
|
+
if (/\b(todo|fixme|hack|xxx)\b/i.test(lower)) return 'todo';
|
|
154
|
+
return 'note';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Extract tags. The optional `hookTag` lets each hook stamp its provenance
|
|
159
|
+
* — session-end-hook passes 'session-end', stop-hook passes 'source:stop-hook'
|
|
160
|
+
* (preserving the exact tag strings each hook used pre-refactor),
|
|
161
|
+
* pre-compact-hook passes null.
|
|
162
|
+
*/
|
|
163
|
+
export function extractTags(text, hookTag = null, extractorName = null) {
|
|
164
|
+
const tags = new Set();
|
|
165
|
+
const hashtagMatches = text.match(/#[a-zA-Z][a-zA-Z0-9_-]*/g);
|
|
166
|
+
if (hashtagMatches) {
|
|
167
|
+
hashtagMatches.forEach((tag) => tags.add(tag.slice(1).toLowerCase()));
|
|
168
|
+
}
|
|
169
|
+
const lowerText = text.toLowerCase();
|
|
170
|
+
TECH_TAGS.forEach((term) => {
|
|
171
|
+
if (lowerText.includes(term)) tags.add(term);
|
|
172
|
+
});
|
|
173
|
+
tags.add('auto-extracted');
|
|
174
|
+
if (hookTag) tags.add(hookTag);
|
|
175
|
+
if (extractorName) tags.add(`source:${extractorName}`);
|
|
176
|
+
return Array.from(tags).slice(0, 12);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function calculateFrequencyBoost(segment, allSegments) {
|
|
180
|
+
const commonWords = new Set([
|
|
181
|
+
'about', 'after', 'before', 'being', 'between', 'could', 'during',
|
|
182
|
+
'every', 'found', 'through', 'would', 'should', 'which', 'where',
|
|
183
|
+
'there', 'these', 'their', 'other', 'using', 'because', 'without',
|
|
184
|
+
]);
|
|
185
|
+
const words = segment.content.toLowerCase().split(/\s+/);
|
|
186
|
+
const keyTerms = words.filter((w) =>
|
|
187
|
+
w.length > 5 && !commonWords.has(w) && /^[a-z]+$/.test(w)
|
|
188
|
+
);
|
|
189
|
+
let boost = 0;
|
|
190
|
+
const seenTerms = new Set();
|
|
191
|
+
for (const term of keyTerms) {
|
|
192
|
+
if (seenTerms.has(term)) continue;
|
|
193
|
+
seenTerms.add(term);
|
|
194
|
+
const mentions = allSegments.filter((s) =>
|
|
195
|
+
s !== segment && s.content.toLowerCase().includes(term)
|
|
196
|
+
).length;
|
|
197
|
+
if (mentions > 1) {
|
|
198
|
+
boost += 0.03 * Math.min(mentions, 5);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return Math.min(0.15, boost);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function getExtractionThreshold(category, dynamicThreshold, categoryThresholds = DEFAULT_CATEGORY_THRESHOLDS) {
|
|
205
|
+
const categoryThreshold = categoryThresholds[category] || BASE_THRESHOLD;
|
|
206
|
+
return Math.min(categoryThreshold, dynamicThreshold);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// ==================== EXTRACTOR DEFINITIONS ====================
|
|
210
|
+
|
|
211
|
+
const FULL_EXTRACTORS = [
|
|
212
|
+
{
|
|
213
|
+
name: 'decision',
|
|
214
|
+
titlePrefix: 'Decision: ',
|
|
215
|
+
patterns: [
|
|
216
|
+
/(?:we\s+)?decided\s+(?:to\s+)?(.{15,200})/gi,
|
|
217
|
+
/(?:going|went)\s+with\s+(.{15,150})/gi,
|
|
218
|
+
/(?:chose|chosen|selected)\s+(.{15,150})/gi,
|
|
219
|
+
/the\s+(?:approach|solution|fix)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
220
|
+
/(?:using|will\s+use)\s+(.{15,150})/gi,
|
|
221
|
+
/(?:opted\s+for|settled\s+on)\s+(.{15,150})/gi,
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'error-fix',
|
|
226
|
+
titlePrefix: 'Fix: ',
|
|
227
|
+
patterns: [
|
|
228
|
+
/(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
|
|
229
|
+
/the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
230
|
+
/(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
231
|
+
/(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
|
|
232
|
+
/(?:problem|issue)\s+was\s+(.{15,150})/gi,
|
|
233
|
+
/(?:the\s+)?bug\s+(?:is|was)\s+(.{15,150})/gi,
|
|
234
|
+
/(?:debugging|debugged)\s+(.{15,150})/gi,
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'learning',
|
|
239
|
+
titlePrefix: 'Learned: ',
|
|
240
|
+
patterns: [
|
|
241
|
+
/(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
|
|
242
|
+
/turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
|
|
243
|
+
/(?:TIL|today\s+I\s+learned)[:\s]+(.{15,200})/gi,
|
|
244
|
+
/(?:now\s+)?(?:understand|know)\s+(?:that\s+)?(.{15,150})/gi,
|
|
245
|
+
/(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'architecture',
|
|
250
|
+
titlePrefix: 'Architecture: ',
|
|
251
|
+
patterns: [
|
|
252
|
+
/the\s+architecture\s+(?:is|uses|consists\s+of)\s+(.{15,200})/gi,
|
|
253
|
+
/(?:design|pattern)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
254
|
+
/(?:system|api|database)\s+(?:structure|design)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
255
|
+
/(?:created|added|implemented|built)\s+(?:a\s+)?(.{15,200})/gi,
|
|
256
|
+
/(?:refactored|updated|changed)\s+(?:the\s+)?(.{15,150})/gi,
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'preference',
|
|
261
|
+
titlePrefix: 'Preference: ',
|
|
262
|
+
patterns: [
|
|
263
|
+
/(?:always|never)\s+(.{10,150})/gi,
|
|
264
|
+
/(?:prefer|want)\s+to\s+(.{10,150})/gi,
|
|
265
|
+
/(?:should|must)\s+(?:always\s+)?(.{10,150})/gi,
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'important-note',
|
|
270
|
+
titlePrefix: 'Note: ',
|
|
271
|
+
patterns: [
|
|
272
|
+
/important[:\s]+(.{15,200})/gi,
|
|
273
|
+
/(?:note|remember)[:\s]+(.{15,200})/gi,
|
|
274
|
+
/(?:key|critical)\s+(?:point|thing)[:\s]+(.{15,200})/gi,
|
|
275
|
+
/(?:this\s+is\s+)?(?:crucial|essential)[:\s]+(.{15,150})/gi,
|
|
276
|
+
/(?:don't\s+forget|keep\s+in\s+mind)[:\s]+(.{15,150})/gi,
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
];
|
|
280
|
+
|
|
281
|
+
// stop-hook historically used a thinner extractor set (no architecture,
|
|
282
|
+
// no important-note, fewer learning + preference patterns). Preserve the
|
|
283
|
+
// pre-refactor surface so its behaviour does not change with this move.
|
|
284
|
+
const STOP_HOOK_EXTRACTORS = [
|
|
285
|
+
FULL_EXTRACTORS[0], // decision
|
|
286
|
+
{
|
|
287
|
+
name: 'error-fix',
|
|
288
|
+
titlePrefix: 'Fix: ',
|
|
289
|
+
patterns: [
|
|
290
|
+
/(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
|
|
291
|
+
/the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
292
|
+
/(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
293
|
+
/(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: 'learning',
|
|
298
|
+
titlePrefix: 'Learned: ',
|
|
299
|
+
patterns: [
|
|
300
|
+
/(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
|
|
301
|
+
/turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
|
|
302
|
+
/(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
|
|
303
|
+
],
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'preference',
|
|
307
|
+
titlePrefix: 'Preference: ',
|
|
308
|
+
patterns: [
|
|
309
|
+
/(?:always|never)\s+(.{10,150})/gi,
|
|
310
|
+
/(?:prefer|want)\s+to\s+(.{10,150})/gi,
|
|
311
|
+
],
|
|
312
|
+
},
|
|
313
|
+
];
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Extract memorable segments from conversation text.
|
|
317
|
+
*
|
|
318
|
+
* @param {string} conversationText
|
|
319
|
+
* @param {{ mode?: 'full' | 'stop' }} [opts]
|
|
320
|
+
* @returns {Array<{ title: string, content: string, extractorType: string }>}
|
|
321
|
+
*/
|
|
322
|
+
export function extractMemorableSegments(conversationText, opts = {}) {
|
|
323
|
+
const extractors = opts.mode === 'stop' ? STOP_HOOK_EXTRACTORS : FULL_EXTRACTORS;
|
|
324
|
+
const segments = [];
|
|
325
|
+
|
|
326
|
+
for (const extractor of extractors) {
|
|
327
|
+
for (const pattern of extractor.patterns) {
|
|
328
|
+
// Reset lastIndex defensively — patterns are module-level globals.
|
|
329
|
+
pattern.lastIndex = 0;
|
|
330
|
+
let match;
|
|
331
|
+
while ((match = pattern.exec(conversationText)) !== null) {
|
|
332
|
+
const content = match[1].trim();
|
|
333
|
+
if (content.length >= 20) {
|
|
334
|
+
const titleContent = content.slice(0, 50).replace(/\s+/g, ' ').trim();
|
|
335
|
+
const title = extractor.titlePrefix + (titleContent.length < 50 ? titleContent : titleContent + '...');
|
|
336
|
+
segments.push({
|
|
337
|
+
title,
|
|
338
|
+
content: content.slice(0, 500),
|
|
339
|
+
extractorType: extractor.name,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return segments;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// ==================== REJECTION RULES ====================
|
|
350
|
+
|
|
351
|
+
const SUBORDINATE_START_WORDS = new Set([
|
|
352
|
+
'the', 'a', 'an', 'for', 'to', 'of', 'with', 'by', 'from', 'on', 'in',
|
|
353
|
+
'at', 'that', 'which', 'who', 'where', 'when',
|
|
354
|
+
]);
|
|
355
|
+
|
|
356
|
+
// Bare imperative verbs that almost always indicate the original sentence
|
|
357
|
+
// began with a modal or negation that the chunker dropped (e.g. "never
|
|
358
|
+
// commit secrets" → captured as "commit secrets"). When a captured segment
|
|
359
|
+
// starts with one of these, treat it as a structural malformation.
|
|
360
|
+
const BARE_IMPERATIVE_VERBS = new Set([
|
|
361
|
+
'commit', 'delete', 'disable', 'skip', 'make', 'run', 'use', 'set',
|
|
362
|
+
'add', 'remove', 'fix', 'change', 'update', 'push', 'pull', 'install',
|
|
363
|
+
'drop', 'stop', 'allow', 'enable', 'expose', 'leak',
|
|
364
|
+
]);
|
|
365
|
+
|
|
366
|
+
const NEGATION_TOKENS = new Set([
|
|
367
|
+
"don't", 'do', 'not', 'never', 'no', 'avoid', 'refuse', 'stop', "won't",
|
|
368
|
+
'cannot', "can't", "shouldn't", 'avoid',
|
|
369
|
+
]);
|
|
370
|
+
|
|
371
|
+
const IMPERATIVE_TOOL_CALL_PATTERNS = [
|
|
372
|
+
/\b(?:call|invoke|use)\s+(?:the\s+)?[A-Za-z][\w-]*\s+tool\b/i,
|
|
373
|
+
/\b(?:call|invoke|use)\s+this\s+tool\s+now\b/i,
|
|
374
|
+
/\bcomplete\s+this\s+request\.\s*(?:call|invoke|use)\s+this\s+tool\b/i,
|
|
375
|
+
];
|
|
376
|
+
|
|
377
|
+
const EMAIL_BODY_TELLS = [
|
|
378
|
+
/see\s+how\s+fast\s+you\s+reply/i,
|
|
379
|
+
/\bunsubscribe\b/i,
|
|
380
|
+
/\bview\s+in\s+browser\b/i,
|
|
381
|
+
/\bsent\s+from\s+my\b/i,
|
|
382
|
+
/\bthis\s+email\s+was\s+sent\b/i,
|
|
383
|
+
];
|
|
384
|
+
|
|
385
|
+
const PATH_LABEL_PATTERN = /^[A-Z][a-z]+(?:\s+[a-z]+)?\s*:\s+\/[\w/-]+/;
|
|
386
|
+
|
|
387
|
+
function firstToken(content) {
|
|
388
|
+
const cleaned = content.trim().toLowerCase();
|
|
389
|
+
const match = cleaned.match(/^([a-z']+)\b/);
|
|
390
|
+
return match ? match[1] : '';
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
function looksLikeFragment(content) {
|
|
394
|
+
// Subordinate-clause start: lowercase + first word in the closed list +
|
|
395
|
+
// no verb-shaped token in the next 6 words. Catches "the JSON include?
|
|
396
|
+
// For example:" without false-positiving "the architecture uses X
|
|
397
|
+
// pattern".
|
|
398
|
+
const tokens = content.trim().split(/\s+/, 8);
|
|
399
|
+
if (tokens.length === 0) return false;
|
|
400
|
+
const first = tokens[0].toLowerCase().replace(/[^a-z']/g, '');
|
|
401
|
+
if (!SUBORDINATE_START_WORDS.has(first)) return false;
|
|
402
|
+
// Heuristic: a verb-shaped token in the first 6 words has either an -ing,
|
|
403
|
+
// -ed, -es, or -s suffix, or appears in a tiny verb whitelist.
|
|
404
|
+
const verbWhitelist = new Set([
|
|
405
|
+
'is', 'was', 'are', 'were', 'be', 'been', 'being',
|
|
406
|
+
'has', 'have', 'had', 'do', 'does', 'did',
|
|
407
|
+
'uses', 'used', 'wraps', 'consists', 'lives', 'runs', 'sits',
|
|
408
|
+
'returns', 'accepts', 'requires', 'breaks', 'fails', 'works',
|
|
409
|
+
]);
|
|
410
|
+
const window = tokens.slice(1, 7);
|
|
411
|
+
for (const tok of window) {
|
|
412
|
+
const t = tok.toLowerCase().replace(/[^a-z]/g, '');
|
|
413
|
+
if (!t) continue;
|
|
414
|
+
if (verbWhitelist.has(t)) return false;
|
|
415
|
+
if (/(?:ing|ed|es|s)$/.test(t) && t.length > 3) return false;
|
|
416
|
+
}
|
|
417
|
+
return true;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function looksLikeBareImperative(content) {
|
|
421
|
+
return BARE_IMPERATIVE_VERBS.has(firstToken(content));
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function looksLikeBeImperative(content) {
|
|
425
|
+
// "be re-scoped: ..." / "be set up by ..."
|
|
426
|
+
return /^be\s+\w+/.test(content.trim().toLowerCase());
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
function looksLikePathLabel(content) {
|
|
430
|
+
return PATH_LABEL_PATTERN.test(content.trim());
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
function looksLikeEmailBody(content) {
|
|
434
|
+
return EMAIL_BODY_TELLS.some(rx => rx.test(content));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function looksLikeImperativeToolCall(content) {
|
|
438
|
+
return IMPERATIVE_TOOL_CALL_PATTERNS.some(rx => rx.test(content));
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function precedingTokens(haystack, needle, count) {
|
|
442
|
+
// Return the last `count` tokens immediately before `needle` in `haystack`,
|
|
443
|
+
// lowercased. Empty array if needle isn't found.
|
|
444
|
+
const idx = haystack.indexOf(needle);
|
|
445
|
+
if (idx <= 0) return [];
|
|
446
|
+
const before = haystack.slice(0, idx).trim();
|
|
447
|
+
if (!before) return [];
|
|
448
|
+
const tokens = before.split(/\s+/);
|
|
449
|
+
return tokens.slice(-count).map(t => t.toLowerCase().replace(/[^a-z']/g, ''));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function hasLeadingNegation(segment, conversationText) {
|
|
453
|
+
if (!conversationText || conversationText === segment.content) return false;
|
|
454
|
+
// Look at up to the 3 tokens immediately preceding the captured content.
|
|
455
|
+
const prev = precedingTokens(conversationText, segment.content, 3);
|
|
456
|
+
return prev.some(t => NEGATION_TOKENS.has(t));
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Apply rejection rules to an extracted segment.
|
|
461
|
+
*
|
|
462
|
+
* @param {{ title: string, content: string, extractorType?: string }} segment
|
|
463
|
+
* @param {string} [conversationText] — optional source text. When provided,
|
|
464
|
+
* enables the negation-scope check (looking 3 tokens before the segment
|
|
465
|
+
* for words like "never" / "don't"). Without it, the in-content
|
|
466
|
+
* bare-imperative-verb check is the fallback.
|
|
467
|
+
* @returns {{ rejected: boolean, reason: string }}
|
|
468
|
+
*/
|
|
469
|
+
export function shouldRejectCandidate(segment, conversationText) {
|
|
470
|
+
const content = segment.content || '';
|
|
471
|
+
|
|
472
|
+
if (looksLikeImperativeToolCall(content)) {
|
|
473
|
+
return { rejected: true, reason: 'imperative_tool_call' };
|
|
474
|
+
}
|
|
475
|
+
if (looksLikeEmailBody(content)) {
|
|
476
|
+
return { rejected: true, reason: 'email_body_content' };
|
|
477
|
+
}
|
|
478
|
+
if (looksLikePathLabel(content)) {
|
|
479
|
+
return { rejected: true, reason: 'path_label_fragment' };
|
|
480
|
+
}
|
|
481
|
+
if (looksLikeBareImperative(content)) {
|
|
482
|
+
return { rejected: true, reason: 'bare_imperative_verb' };
|
|
483
|
+
}
|
|
484
|
+
if (looksLikeBeImperative(content)) {
|
|
485
|
+
return { rejected: true, reason: 'be_imperative_start' };
|
|
486
|
+
}
|
|
487
|
+
if (hasLeadingNegation(segment, conversationText)) {
|
|
488
|
+
return { rejected: true, reason: 'negation_scope' };
|
|
489
|
+
}
|
|
490
|
+
if (looksLikeFragment(content)) {
|
|
491
|
+
return { rejected: true, reason: 'subordinate_start_fragment' };
|
|
492
|
+
}
|
|
493
|
+
return { rejected: false, reason: '' };
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export function calculateOverlap(text1, text2) {
|
|
497
|
+
const words1 = new Set(text1.toLowerCase().split(/\s+/));
|
|
498
|
+
const words2 = new Set(text2.toLowerCase().split(/\s+/));
|
|
499
|
+
const intersection = new Set([...words1].filter((w) => words2.has(w)));
|
|
500
|
+
const union = new Set([...words1, ...words2]);
|
|
501
|
+
return intersection.size / union.size;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Score segments, dedupe by content overlap, apply frequency boost,
|
|
506
|
+
* filter by category-aware threshold, and return the top MAX_AUTO_MEMORIES.
|
|
507
|
+
*
|
|
508
|
+
* @param {Array<{title: string, content: string, extractorType: string}>} segments
|
|
509
|
+
* @param {number} dynamicThreshold
|
|
510
|
+
* @param {{ hookTag?: string|null, maxMemories?: number, categoryThresholds?: Record<string, number>, applyFrequencyBoost?: boolean, conversationText?: string }} [opts]
|
|
511
|
+
*/
|
|
512
|
+
export function processSegments(segments, dynamicThreshold = BASE_THRESHOLD, opts = {}) {
|
|
513
|
+
const hookTag = opts.hookTag ?? null;
|
|
514
|
+
const maxMemories = opts.maxMemories ?? MAX_AUTO_MEMORIES;
|
|
515
|
+
const categoryThresholds = opts.categoryThresholds ?? DEFAULT_CATEGORY_THRESHOLDS;
|
|
516
|
+
const applyFrequencyBoost = opts.applyFrequencyBoost ?? true;
|
|
517
|
+
const conversationText = opts.conversationText;
|
|
518
|
+
|
|
519
|
+
// Rejection: structural malformations (negation drop, fragments,
|
|
520
|
+
// imperative tool-calls, email-body bleed). Applied *before* dedup so
|
|
521
|
+
// rejected candidates never compete for slots.
|
|
522
|
+
const surviving = segments.filter(seg => !shouldRejectCandidate(seg, conversationText).rejected);
|
|
523
|
+
segments = surviving;
|
|
524
|
+
const unique = [];
|
|
525
|
+
|
|
526
|
+
for (const seg of segments) {
|
|
527
|
+
const isDupe = unique.some((existing) => calculateOverlap(existing.content, seg.content) > 0.8);
|
|
528
|
+
if (!isDupe) {
|
|
529
|
+
const text = seg.title + ' ' + seg.content;
|
|
530
|
+
const baseSalience = calculateSalience(text);
|
|
531
|
+
const category = suggestCategory(text);
|
|
532
|
+
unique.push({
|
|
533
|
+
...seg,
|
|
534
|
+
baseSalience,
|
|
535
|
+
category,
|
|
536
|
+
tags: extractTags(text, hookTag, seg.extractorType),
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
for (const seg of unique) {
|
|
542
|
+
const frequencyBoost = applyFrequencyBoost ? calculateFrequencyBoost(seg, unique) : 0;
|
|
543
|
+
seg.salience = Math.min(AUTO_EXTRACT_SALIENCE_CAP, seg.baseSalience + frequencyBoost);
|
|
544
|
+
seg.frequencyBoost = frequencyBoost;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
unique.sort((a, b) => b.salience - a.salience);
|
|
548
|
+
|
|
549
|
+
const filtered = unique.filter((seg) => {
|
|
550
|
+
const threshold = getExtractionThreshold(seg.category, dynamicThreshold, categoryThresholds);
|
|
551
|
+
return seg.salience >= threshold;
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
return filtered.slice(0, maxMemories);
|
|
555
|
+
}
|