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
|
@@ -30,6 +30,11 @@ import { readTranscriptText } from './lib/transcript-reader.mjs';
|
|
|
30
30
|
import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
|
|
31
31
|
import { recordHookInvocation } from './lib/telemetry.mjs';
|
|
32
32
|
import { deriveProjectKey } from './lib/project-key.mjs';
|
|
33
|
+
import { recordSessionEvent } from './lib/session-capture.mjs';
|
|
34
|
+
import {
|
|
35
|
+
extractMemorableSegments,
|
|
36
|
+
processSegments,
|
|
37
|
+
} from './lib/extract-memorable-segments.mjs';
|
|
33
38
|
|
|
34
39
|
// Database paths (with legacy fallback)
|
|
35
40
|
const NEW_DB_DIR = join(homedir(), '.shieldcortex');
|
|
@@ -49,21 +54,6 @@ const { dir: DB_DIR, path: DB_PATH } = getDbPath();
|
|
|
49
54
|
// Memory limits
|
|
50
55
|
const MAX_SHORT_TERM_MEMORIES = 100;
|
|
51
56
|
const MAX_LONG_TERM_MEMORIES = 1000;
|
|
52
|
-
const BASE_THRESHOLD = 0.35;
|
|
53
|
-
const MAX_AUTO_MEMORIES = 5;
|
|
54
|
-
|
|
55
|
-
const CATEGORY_EXTRACTION_THRESHOLDS = {
|
|
56
|
-
architecture: 0.28,
|
|
57
|
-
error: 0.30,
|
|
58
|
-
context: 0.32,
|
|
59
|
-
learning: 0.32,
|
|
60
|
-
pattern: 0.35,
|
|
61
|
-
preference: 0.38,
|
|
62
|
-
note: 0.42,
|
|
63
|
-
todo: 0.40,
|
|
64
|
-
relationship: 0.35,
|
|
65
|
-
custom: 0.35,
|
|
66
|
-
};
|
|
67
57
|
|
|
68
58
|
// ==================== DYNAMIC THRESHOLD ====================
|
|
69
59
|
|
|
@@ -91,299 +81,16 @@ function getDynamicThreshold(memoryCount, maxMemories) {
|
|
|
91
81
|
return 0.25;
|
|
92
82
|
}
|
|
93
83
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return Math.min(categoryThreshold, dynamicThreshold);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// ==================== SALIENCE DETECTION ====================
|
|
100
|
-
|
|
101
|
-
const ARCHITECTURE_KEYWORDS = [
|
|
102
|
-
'architecture', 'design', 'pattern', 'structure', 'system',
|
|
103
|
-
'database', 'api', 'schema', 'model', 'framework', 'stack',
|
|
104
|
-
'microservice', 'monolith', 'serverless', 'infrastructure'
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
const ERROR_KEYWORDS = [
|
|
108
|
-
'error', 'bug', 'fix', 'issue', 'problem', 'crash', 'fail',
|
|
109
|
-
'exception', 'debug', 'resolve', 'solution', 'workaround'
|
|
110
|
-
];
|
|
111
|
-
|
|
112
|
-
const PREFERENCE_KEYWORDS = [
|
|
113
|
-
'prefer', 'always', 'never', 'style', 'convention', 'standard',
|
|
114
|
-
'like', 'want', 'should', 'must', 'require'
|
|
115
|
-
];
|
|
116
|
-
|
|
117
|
-
const PATTERN_KEYWORDS = [
|
|
118
|
-
'pattern', 'practice', 'approach', 'method', 'technique',
|
|
119
|
-
'implementation', 'strategy', 'algorithm', 'workflow'
|
|
120
|
-
];
|
|
121
|
-
|
|
122
|
-
const DECISION_KEYWORDS = [
|
|
123
|
-
'decided', 'decision', 'chose', 'chosen', 'selected', 'going with',
|
|
124
|
-
'will use', 'opted for', 'settled on', 'agreed'
|
|
125
|
-
];
|
|
126
|
-
|
|
127
|
-
const LEARNING_KEYWORDS = [
|
|
128
|
-
'learned', 'discovered', 'realized', 'found out', 'turns out',
|
|
129
|
-
'TIL', 'now know', 'understand now', 'figured out'
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
const EMOTIONAL_MARKERS = [
|
|
133
|
-
'important', 'critical', 'crucial', 'essential', 'key',
|
|
134
|
-
'finally', 'breakthrough', 'eureka', 'aha', 'got it',
|
|
135
|
-
'frustrating', 'annoying', 'tricky', 'remember'
|
|
136
|
-
];
|
|
137
|
-
|
|
138
|
-
const CODE_REFERENCE_PATTERNS = [
|
|
139
|
-
/\b[A-Z][a-zA-Z]*\.[a-zA-Z]+\b/,
|
|
140
|
-
/\b[a-z_][a-zA-Z0-9_]*\.(ts|js|py|go|rs)\b/,
|
|
141
|
-
/`[^`]+`/,
|
|
142
|
-
/\b(function|class|interface|type|const|let|var)\s+\w+/i,
|
|
143
|
-
/\bline\s*\d+\b/i,
|
|
144
|
-
/\b(src|lib|app|components?)\/\S+/,
|
|
145
|
-
];
|
|
146
|
-
|
|
147
|
-
function detectKeywords(text, keywords) {
|
|
148
|
-
const lower = text.toLowerCase();
|
|
149
|
-
return keywords.some(keyword => lower.includes(keyword.toLowerCase()));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function detectCodeReferences(content) {
|
|
153
|
-
return CODE_REFERENCE_PATTERNS.some(pattern => pattern.test(content));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function detectExplicitRequest(text) {
|
|
157
|
-
const patterns = [
|
|
158
|
-
/\bremember\s+(this|that)\b/i,
|
|
159
|
-
/\bdon'?t\s+forget\b/i,
|
|
160
|
-
/\bkeep\s+(in\s+)?mind\b/i,
|
|
161
|
-
/\bnote\s+(this|that)\b/i,
|
|
162
|
-
/\bsave\s+(this|that)\b/i,
|
|
163
|
-
/\bimportant[:\s]/i,
|
|
164
|
-
/\bfor\s+future\s+reference\b/i,
|
|
165
|
-
];
|
|
166
|
-
return patterns.some(pattern => pattern.test(text));
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function calculateSalience(text) {
|
|
170
|
-
let score = 0.25;
|
|
171
|
-
if (detectExplicitRequest(text)) score += 0.5;
|
|
172
|
-
if (detectKeywords(text, ARCHITECTURE_KEYWORDS)) score += 0.4;
|
|
173
|
-
if (detectKeywords(text, ERROR_KEYWORDS)) score += 0.35;
|
|
174
|
-
if (detectKeywords(text, DECISION_KEYWORDS)) score += 0.35;
|
|
175
|
-
if (detectKeywords(text, LEARNING_KEYWORDS)) score += 0.3;
|
|
176
|
-
if (detectKeywords(text, PATTERN_KEYWORDS)) score += 0.25;
|
|
177
|
-
if (detectKeywords(text, PREFERENCE_KEYWORDS)) score += 0.25;
|
|
178
|
-
if (detectCodeReferences(text)) score += 0.15;
|
|
179
|
-
if (detectKeywords(text, EMOTIONAL_MARKERS)) score += 0.2;
|
|
180
|
-
return Math.min(1.0, score);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function suggestCategory(text) {
|
|
184
|
-
const lower = text.toLowerCase();
|
|
185
|
-
if (detectKeywords(lower, ARCHITECTURE_KEYWORDS)) return 'architecture';
|
|
186
|
-
if (detectKeywords(lower, ERROR_KEYWORDS)) return 'error';
|
|
187
|
-
if (detectKeywords(lower, DECISION_KEYWORDS)) return 'context';
|
|
188
|
-
if (detectKeywords(lower, LEARNING_KEYWORDS)) return 'learning';
|
|
189
|
-
if (detectKeywords(lower, PREFERENCE_KEYWORDS)) return 'preference';
|
|
190
|
-
if (detectKeywords(lower, PATTERN_KEYWORDS)) return 'pattern';
|
|
191
|
-
if (/\b(todo|fixme|hack|xxx)\b/i.test(lower)) return 'todo';
|
|
192
|
-
return 'note';
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function extractTags(text, extractorName = null) {
|
|
196
|
-
const tags = new Set();
|
|
197
|
-
const hashtagMatches = text.match(/#[a-zA-Z][a-zA-Z0-9_-]*/g);
|
|
198
|
-
if (hashtagMatches) {
|
|
199
|
-
hashtagMatches.forEach(tag => tags.add(tag.slice(1).toLowerCase()));
|
|
200
|
-
}
|
|
201
|
-
const techTerms = [
|
|
202
|
-
'react', 'vue', 'angular', 'node', 'python', 'typescript', 'javascript',
|
|
203
|
-
'api', 'database', 'sql', 'mongodb', 'postgresql', 'mysql',
|
|
204
|
-
'docker', 'kubernetes', 'aws', 'git', 'testing', 'auth', 'security'
|
|
205
|
-
];
|
|
206
|
-
const lowerText = text.toLowerCase();
|
|
207
|
-
techTerms.forEach(term => {
|
|
208
|
-
if (lowerText.includes(term)) tags.add(term);
|
|
209
|
-
});
|
|
210
|
-
tags.add('auto-extracted');
|
|
211
|
-
tags.add('session-end');
|
|
212
|
-
if (extractorName) {
|
|
213
|
-
tags.add(`source:${extractorName}`);
|
|
214
|
-
}
|
|
215
|
-
return Array.from(tags).slice(0, 12);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function calculateFrequencyBoost(segment, allSegments) {
|
|
219
|
-
const commonWords = new Set([
|
|
220
|
-
'about', 'after', 'before', 'being', 'between', 'could', 'during',
|
|
221
|
-
'every', 'found', 'through', 'would', 'should', 'which', 'where',
|
|
222
|
-
'there', 'these', 'their', 'other', 'using', 'because', 'without'
|
|
223
|
-
]);
|
|
224
|
-
const words = segment.content.toLowerCase().split(/\s+/);
|
|
225
|
-
const keyTerms = words.filter(w =>
|
|
226
|
-
w.length > 5 && !commonWords.has(w) && /^[a-z]+$/.test(w)
|
|
227
|
-
);
|
|
228
|
-
let boost = 0;
|
|
229
|
-
const seenTerms = new Set();
|
|
230
|
-
for (const term of keyTerms) {
|
|
231
|
-
if (seenTerms.has(term)) continue;
|
|
232
|
-
seenTerms.add(term);
|
|
233
|
-
const mentions = allSegments.filter(s =>
|
|
234
|
-
s !== segment && s.content.toLowerCase().includes(term)
|
|
235
|
-
).length;
|
|
236
|
-
if (mentions > 1) {
|
|
237
|
-
boost += 0.03 * Math.min(mentions, 5);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return Math.min(0.15, boost);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// ==================== CONTENT EXTRACTION ====================
|
|
244
|
-
|
|
245
|
-
function extractMemorableSegments(conversationText) {
|
|
246
|
-
const segments = [];
|
|
247
|
-
const extractors = [
|
|
248
|
-
{
|
|
249
|
-
name: 'decision',
|
|
250
|
-
patterns: [
|
|
251
|
-
/(?:we\s+)?decided\s+(?:to\s+)?(.{15,200})/gi,
|
|
252
|
-
/(?:going|went)\s+with\s+(.{15,150})/gi,
|
|
253
|
-
/(?:chose|chosen|selected)\s+(.{15,150})/gi,
|
|
254
|
-
/the\s+(?:approach|solution|fix)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
255
|
-
/(?:using|will\s+use)\s+(.{15,150})/gi,
|
|
256
|
-
/(?:opted\s+for|settled\s+on)\s+(.{15,150})/gi,
|
|
257
|
-
],
|
|
258
|
-
titlePrefix: 'Decision: ',
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
name: 'error-fix',
|
|
262
|
-
patterns: [
|
|
263
|
-
/(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
|
|
264
|
-
/the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
265
|
-
/(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
266
|
-
/(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
|
|
267
|
-
/(?:problem|issue)\s+was\s+(.{15,150})/gi,
|
|
268
|
-
/(?:the\s+)?bug\s+(?:is|was)\s+(.{15,150})/gi,
|
|
269
|
-
/(?:debugging|debugged)\s+(.{15,150})/gi,
|
|
270
|
-
],
|
|
271
|
-
titlePrefix: 'Fix: ',
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: 'learning',
|
|
275
|
-
patterns: [
|
|
276
|
-
/(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
|
|
277
|
-
/turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
|
|
278
|
-
/(?:TIL|today\s+I\s+learned)[:\s]+(.{15,200})/gi,
|
|
279
|
-
/(?:now\s+)?(?:understand|know)\s+(?:that\s+)?(.{15,150})/gi,
|
|
280
|
-
/(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
|
|
281
|
-
],
|
|
282
|
-
titlePrefix: 'Learned: ',
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
name: 'architecture',
|
|
286
|
-
patterns: [
|
|
287
|
-
/the\s+architecture\s+(?:is|uses|consists\s+of)\s+(.{15,200})/gi,
|
|
288
|
-
/(?:design|pattern)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
289
|
-
/(?:system|api|database)\s+(?:structure|design)\s+(?:is|uses)\s+(.{15,200})/gi,
|
|
290
|
-
/(?:created|added|implemented|built)\s+(?:a\s+)?(.{15,200})/gi,
|
|
291
|
-
/(?:refactored|updated|changed)\s+(?:the\s+)?(.{15,150})/gi,
|
|
292
|
-
],
|
|
293
|
-
titlePrefix: 'Architecture: ',
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
name: 'preference',
|
|
297
|
-
patterns: [
|
|
298
|
-
/(?:always|never)\s+(.{10,150})/gi,
|
|
299
|
-
/(?:prefer|want)\s+to\s+(.{10,150})/gi,
|
|
300
|
-
/(?:should|must)\s+(?:always\s+)?(.{10,150})/gi,
|
|
301
|
-
],
|
|
302
|
-
titlePrefix: 'Preference: ',
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
name: 'important-note',
|
|
306
|
-
patterns: [
|
|
307
|
-
/important[:\s]+(.{15,200})/gi,
|
|
308
|
-
/(?:note|remember)[:\s]+(.{15,200})/gi,
|
|
309
|
-
/(?:key|critical)\s+(?:point|thing)[:\s]+(.{15,200})/gi,
|
|
310
|
-
/(?:this\s+is\s+)?(?:crucial|essential)[:\s]+(.{15,150})/gi,
|
|
311
|
-
/(?:don't\s+forget|keep\s+in\s+mind)[:\s]+(.{15,150})/gi,
|
|
312
|
-
],
|
|
313
|
-
titlePrefix: 'Note: ',
|
|
314
|
-
},
|
|
315
|
-
];
|
|
316
|
-
|
|
317
|
-
for (const extractor of extractors) {
|
|
318
|
-
for (const pattern of extractor.patterns) {
|
|
319
|
-
let match;
|
|
320
|
-
while ((match = pattern.exec(conversationText)) !== null) {
|
|
321
|
-
const content = match[1].trim();
|
|
322
|
-
if (content.length >= 20) {
|
|
323
|
-
const titleContent = content.slice(0, 50).replace(/\s+/g, ' ').trim();
|
|
324
|
-
const title = extractor.titlePrefix + (titleContent.length < 50 ? titleContent : titleContent + '...');
|
|
325
|
-
segments.push({
|
|
326
|
-
title,
|
|
327
|
-
content: content.slice(0, 500),
|
|
328
|
-
extractorType: extractor.name,
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return segments;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
function processSegments(segments, dynamicThreshold = BASE_THRESHOLD) {
|
|
339
|
-
const unique = [];
|
|
340
|
-
for (const seg of segments) {
|
|
341
|
-
const isDupe = unique.some(existing => {
|
|
342
|
-
const overlap = calculateOverlap(existing.content, seg.content);
|
|
343
|
-
return overlap > 0.8;
|
|
344
|
-
});
|
|
345
|
-
if (!isDupe) {
|
|
346
|
-
const text = seg.title + ' ' + seg.content;
|
|
347
|
-
const baseSalience = calculateSalience(text);
|
|
348
|
-
const category = suggestCategory(text);
|
|
349
|
-
unique.push({
|
|
350
|
-
...seg,
|
|
351
|
-
baseSalience,
|
|
352
|
-
category,
|
|
353
|
-
tags: extractTags(text, seg.extractorType),
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
for (const seg of unique) {
|
|
359
|
-
const frequencyBoost = calculateFrequencyBoost(seg, unique);
|
|
360
|
-
seg.salience = Math.min(1.0, seg.baseSalience + frequencyBoost);
|
|
361
|
-
seg.frequencyBoost = frequencyBoost;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
unique.sort((a, b) => b.salience - a.salience);
|
|
365
|
-
|
|
366
|
-
const filtered = unique.filter(seg => {
|
|
367
|
-
const threshold = getExtractionThreshold(seg.category, dynamicThreshold);
|
|
368
|
-
return seg.salience >= threshold;
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
return filtered.slice(0, MAX_AUTO_MEMORIES);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function calculateOverlap(text1, text2) {
|
|
375
|
-
const words1 = new Set(text1.toLowerCase().split(/\s+/));
|
|
376
|
-
const words2 = new Set(text2.toLowerCase().split(/\s+/));
|
|
377
|
-
const intersection = new Set([...words1].filter(w => words2.has(w)));
|
|
378
|
-
const union = new Set([...words1, ...words2]);
|
|
379
|
-
return intersection.size / union.size;
|
|
380
|
-
}
|
|
84
|
+
// Salience detection, content extraction, and segment processing now
|
|
85
|
+
// live in scripts/lib/extract-memorable-segments.mjs (imported above).
|
|
381
86
|
|
|
382
87
|
// ==================== DATABASE OPERATIONS ====================
|
|
383
88
|
|
|
384
|
-
// Thin wrapper
|
|
89
|
+
// Thin wrapper that stamps this hook's source identifier so defence_audit
|
|
90
|
+
// rows are attributable. saveAutoExtractedMemory is async (it loads the
|
|
91
|
+
// dist'd pipeline lazily and routes through it).
|
|
385
92
|
function saveMemory(db, memory, project) {
|
|
386
|
-
saveAutoExtractedMemory(db, memory, project);
|
|
93
|
+
return saveAutoExtractedMemory(db, memory, project, { source: 'session-end-hook' });
|
|
387
94
|
}
|
|
388
95
|
|
|
389
96
|
// ==================== MAIN HOOK LOGIC ====================
|
|
@@ -410,7 +117,7 @@ function looksLikeOpenClawContext() {
|
|
|
410
117
|
return false;
|
|
411
118
|
}
|
|
412
119
|
|
|
413
|
-
process.stdin.on('end', () => {
|
|
120
|
+
process.stdin.on('end', async () => {
|
|
414
121
|
const startedAt = Date.now();
|
|
415
122
|
let db = null;
|
|
416
123
|
let autoExtractedCount = 0;
|
|
@@ -422,6 +129,24 @@ process.stdin.on('end', () => {
|
|
|
422
129
|
const reason = hookData.reason || 'unknown';
|
|
423
130
|
const project = deriveProjectKey(hookData.cwd);
|
|
424
131
|
const autoMemConfig = getAutoMemoryConfig();
|
|
132
|
+
const sessionId = hookData.session_id || hookData.sessionId || null;
|
|
133
|
+
|
|
134
|
+
// ── Session capture (v4.17): record a `hook_fire` marker so the
|
|
135
|
+
// replay timeline shows where sessions end. Best-effort — never
|
|
136
|
+
// blocks memory extraction below.
|
|
137
|
+
if (sessionId && existsSync(DB_PATH)) {
|
|
138
|
+
try {
|
|
139
|
+
const captureDb = new Database(DB_PATH, { timeout: 1000 });
|
|
140
|
+
recordSessionEvent(captureDb, {
|
|
141
|
+
session_id: sessionId,
|
|
142
|
+
ts: new Date().toISOString(),
|
|
143
|
+
kind: 'hook_fire',
|
|
144
|
+
payload: { hook: 'session-end', reason, transcript_path: hookData.transcript_path ?? null },
|
|
145
|
+
project: project || null,
|
|
146
|
+
});
|
|
147
|
+
captureDb.close();
|
|
148
|
+
} catch { /* best-effort */ }
|
|
149
|
+
}
|
|
425
150
|
|
|
426
151
|
// Config gate: opt-in (default off). Preserves the historical default
|
|
427
152
|
// that protected OpenClaw users. We exit before touching the DB so a
|
|
@@ -479,11 +204,14 @@ process.stdin.on('end', () => {
|
|
|
479
204
|
|
|
480
205
|
// Extract memorable segments
|
|
481
206
|
const segments = extractMemorableSegments(conversationText);
|
|
482
|
-
const processedSegments = processSegments(segments, dynamicThreshold
|
|
207
|
+
const processedSegments = processSegments(segments, dynamicThreshold, {
|
|
208
|
+
hookTag: 'session-end',
|
|
209
|
+
conversationText,
|
|
210
|
+
});
|
|
483
211
|
|
|
484
212
|
for (const memory of processedSegments) {
|
|
485
213
|
try {
|
|
486
|
-
saveMemory(db, memory, project);
|
|
214
|
+
await saveMemory(db, memory, project);
|
|
487
215
|
autoExtractedCount++;
|
|
488
216
|
const boostInfo = memory.frequencyBoost > 0 ? ` +${memory.frequencyBoost.toFixed(2)} boost` : '';
|
|
489
217
|
console.error(`[session-end] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}${boostInfo}, category: ${memory.category})`);
|
package/scripts/stop-hook.mjs
CHANGED
|
@@ -25,6 +25,18 @@ import { readTranscriptText } from './lib/transcript-reader.mjs';
|
|
|
25
25
|
import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
|
|
26
26
|
import { recordHookInvocation } from './lib/telemetry.mjs';
|
|
27
27
|
import { deriveProjectKey } from './lib/project-key.mjs';
|
|
28
|
+
import {
|
|
29
|
+
extractMemorableSegments,
|
|
30
|
+
processSegments,
|
|
31
|
+
PRE_COMPACT_CATEGORY_THRESHOLDS,
|
|
32
|
+
ARCHITECTURE_KEYWORDS,
|
|
33
|
+
ERROR_KEYWORDS,
|
|
34
|
+
DECISION_KEYWORDS,
|
|
35
|
+
LEARNING_KEYWORDS,
|
|
36
|
+
PATTERN_KEYWORDS,
|
|
37
|
+
detectKeywords,
|
|
38
|
+
detectCodeReferences,
|
|
39
|
+
} from './lib/extract-memorable-segments.mjs';
|
|
28
40
|
|
|
29
41
|
// Sentinel directory for once-per-session "disabled" log lines. Without this
|
|
30
42
|
// the stop hook bails silently on every turn when autoMemory.enableStop is
|
|
@@ -74,163 +86,14 @@ const { dir: DB_DIR, path: DB_PATH } = getDbPath();
|
|
|
74
86
|
// Memory limits (kept in sync with pre-compact)
|
|
75
87
|
const MAX_SHORT_TERM_MEMORIES = 100;
|
|
76
88
|
const MAX_LONG_TERM_MEMORIES = 1000;
|
|
77
|
-
const BASE_THRESHOLD = 0.35;
|
|
78
89
|
const MAX_AUTO_MEMORIES = 2;
|
|
90
|
+
// Stop-hook uses pre-compact's tighter category thresholds — see
|
|
91
|
+
// PRE_COMPACT_CATEGORY_THRESHOLDS in scripts/lib/extract-memorable-segments.mjs.
|
|
79
92
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
learning: 0.42,
|
|
85
|
-
pattern: 0.45,
|
|
86
|
-
preference: 0.48,
|
|
87
|
-
note: 0.52,
|
|
88
|
-
todo: 0.50,
|
|
89
|
-
relationship: 0.45,
|
|
90
|
-
custom: 0.45,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// ==================== SALIENCE (mirrors pre-compact) ====================
|
|
94
|
-
|
|
95
|
-
const ARCHITECTURE_KEYWORDS = ['architecture','design','pattern','structure','system','database','api','schema','model','framework','stack','microservice','monolith','serverless','infrastructure'];
|
|
96
|
-
const ERROR_KEYWORDS = ['error','bug','fix','issue','problem','crash','fail','exception','debug','resolve','solution','workaround'];
|
|
97
|
-
const PREFERENCE_KEYWORDS = ['prefer','always','never','style','convention','standard','like','want','should','must','require'];
|
|
98
|
-
const PATTERN_KEYWORDS = ['pattern','practice','approach','method','technique','implementation','strategy','algorithm','workflow'];
|
|
99
|
-
const DECISION_KEYWORDS = ['decided','decision','chose','chosen','selected','going with','will use','opted for','settled on','agreed'];
|
|
100
|
-
const LEARNING_KEYWORDS = ['learned','discovered','realized','found out','turns out','TIL','now know','understand now','figured out'];
|
|
101
|
-
const EMOTIONAL_MARKERS = ['important','critical','crucial','essential','key','finally','breakthrough','eureka','aha','got it','frustrating','annoying','tricky','remember'];
|
|
102
|
-
const CODE_REFERENCE_PATTERNS = [
|
|
103
|
-
/\b[A-Z][a-zA-Z]*\.[a-zA-Z]+\b/,
|
|
104
|
-
/\b[a-z_][a-zA-Z0-9_]*\.(ts|js|py|go|rs)\b/,
|
|
105
|
-
/`[^`]+`/,
|
|
106
|
-
/\b(function|class|interface|type|const|let|var)\s+\w+/i,
|
|
107
|
-
/\bline\s*\d+\b/i,
|
|
108
|
-
/\b(src|lib|app|components?)\/\S+/,
|
|
109
|
-
];
|
|
110
|
-
|
|
111
|
-
function detectKeywords(text, keywords) {
|
|
112
|
-
const lower = text.toLowerCase();
|
|
113
|
-
return keywords.some((k) => lower.includes(k.toLowerCase()));
|
|
114
|
-
}
|
|
115
|
-
function detectCodeReferences(c) {
|
|
116
|
-
return CODE_REFERENCE_PATTERNS.some((p) => p.test(c));
|
|
117
|
-
}
|
|
118
|
-
function detectExplicitRequest(t) {
|
|
119
|
-
const patterns = [
|
|
120
|
-
/\bremember\s+(this|that)\b/i, /\bdon'?t\s+forget\b/i, /\bkeep\s+(in\s+)?mind\b/i,
|
|
121
|
-
/\bnote\s+(this|that)\b/i, /\bsave\s+(this|that)\b/i, /\bimportant[:\s]/i,
|
|
122
|
-
/\bfor\s+future\s+reference\b/i,
|
|
123
|
-
];
|
|
124
|
-
return patterns.some((p) => p.test(t));
|
|
125
|
-
}
|
|
126
|
-
function calculateSalience(text) {
|
|
127
|
-
let score = 0.25;
|
|
128
|
-
if (detectExplicitRequest(text)) score += 0.5;
|
|
129
|
-
if (detectKeywords(text, ARCHITECTURE_KEYWORDS)) score += 0.4;
|
|
130
|
-
if (detectKeywords(text, ERROR_KEYWORDS)) score += 0.35;
|
|
131
|
-
if (detectKeywords(text, DECISION_KEYWORDS)) score += 0.35;
|
|
132
|
-
if (detectKeywords(text, LEARNING_KEYWORDS)) score += 0.3;
|
|
133
|
-
if (detectKeywords(text, PATTERN_KEYWORDS)) score += 0.25;
|
|
134
|
-
if (detectKeywords(text, PREFERENCE_KEYWORDS)) score += 0.25;
|
|
135
|
-
if (detectCodeReferences(text)) score += 0.15;
|
|
136
|
-
if (detectKeywords(text, EMOTIONAL_MARKERS)) score += 0.2;
|
|
137
|
-
return Math.min(1.0, score);
|
|
138
|
-
}
|
|
139
|
-
function suggestCategory(text) {
|
|
140
|
-
const lower = text.toLowerCase();
|
|
141
|
-
if (detectKeywords(lower, ARCHITECTURE_KEYWORDS)) return 'architecture';
|
|
142
|
-
if (detectKeywords(lower, ERROR_KEYWORDS)) return 'error';
|
|
143
|
-
if (detectKeywords(lower, DECISION_KEYWORDS)) return 'context';
|
|
144
|
-
if (detectKeywords(lower, LEARNING_KEYWORDS)) return 'learning';
|
|
145
|
-
if (detectKeywords(lower, PREFERENCE_KEYWORDS)) return 'preference';
|
|
146
|
-
if (detectKeywords(lower, PATTERN_KEYWORDS)) return 'pattern';
|
|
147
|
-
if (/\b(todo|fixme|hack|xxx)\b/i.test(lower)) return 'todo';
|
|
148
|
-
return 'note';
|
|
149
|
-
}
|
|
150
|
-
function extractTags(text, extractorName) {
|
|
151
|
-
const tags = new Set();
|
|
152
|
-
const hashtags = text.match(/#[a-zA-Z][a-zA-Z0-9_-]*/g);
|
|
153
|
-
if (hashtags) hashtags.forEach((t) => tags.add(t.slice(1).toLowerCase()));
|
|
154
|
-
['react','vue','angular','node','python','typescript','javascript','api','database','sql','mongodb','postgresql','mysql','docker','kubernetes','aws','git','testing','auth','security']
|
|
155
|
-
.forEach((t) => { if (text.toLowerCase().includes(t)) tags.add(t); });
|
|
156
|
-
tags.add('auto-extracted');
|
|
157
|
-
tags.add('source:stop-hook');
|
|
158
|
-
if (extractorName) tags.add(`source:${extractorName}`);
|
|
159
|
-
return Array.from(tags).slice(0, 12);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// ==================== EXTRACTORS ====================
|
|
163
|
-
|
|
164
|
-
function extractMemorableSegments(text) {
|
|
165
|
-
const segments = [];
|
|
166
|
-
const extractors = [
|
|
167
|
-
{ name: 'decision', titlePrefix: 'Decision: ', patterns: [
|
|
168
|
-
/(?:we\s+)?decided\s+(?:to\s+)?(.{15,200})/gi,
|
|
169
|
-
/(?:going|went)\s+with\s+(.{15,150})/gi,
|
|
170
|
-
/(?:chose|chosen|selected)\s+(.{15,150})/gi,
|
|
171
|
-
/the\s+(?:approach|solution|fix)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
172
|
-
/(?:using|will\s+use)\s+(.{15,150})/gi,
|
|
173
|
-
/(?:opted\s+for|settled\s+on)\s+(.{15,150})/gi,
|
|
174
|
-
]},
|
|
175
|
-
{ name: 'error-fix', titlePrefix: 'Fix: ', patterns: [
|
|
176
|
-
/(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
|
|
177
|
-
/the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
178
|
-
/(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
|
|
179
|
-
/(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
|
|
180
|
-
]},
|
|
181
|
-
{ name: 'learning', titlePrefix: 'Learned: ', patterns: [
|
|
182
|
-
/(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
|
|
183
|
-
/turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
|
|
184
|
-
/(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
|
|
185
|
-
]},
|
|
186
|
-
{ name: 'preference', titlePrefix: 'Preference: ', patterns: [
|
|
187
|
-
/(?:always|never)\s+(.{10,150})/gi,
|
|
188
|
-
/(?:prefer|want)\s+to\s+(.{10,150})/gi,
|
|
189
|
-
]},
|
|
190
|
-
];
|
|
191
|
-
for (const ex of extractors) {
|
|
192
|
-
for (const p of ex.patterns) {
|
|
193
|
-
let m;
|
|
194
|
-
while ((m = p.exec(text)) !== null) {
|
|
195
|
-
const content = m[1].trim();
|
|
196
|
-
if (content.length >= 20) {
|
|
197
|
-
const titleContent = content.slice(0, 50).replace(/\s+/g, ' ').trim();
|
|
198
|
-
const title = ex.titlePrefix + (titleContent.length < 50 ? titleContent : titleContent + '...');
|
|
199
|
-
segments.push({ title, content: content.slice(0, 500), extractorType: ex.name });
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return segments;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function calculateOverlap(t1, t2) {
|
|
208
|
-
const w1 = new Set(t1.toLowerCase().split(/\s+/));
|
|
209
|
-
const w2 = new Set(t2.toLowerCase().split(/\s+/));
|
|
210
|
-
const inter = new Set([...w1].filter((w) => w2.has(w)));
|
|
211
|
-
const union = new Set([...w1, ...w2]);
|
|
212
|
-
return inter.size / Math.max(1, union.size);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function processSegments(segments, dynamicThreshold) {
|
|
216
|
-
const unique = [];
|
|
217
|
-
for (const seg of segments) {
|
|
218
|
-
if (unique.some((u) => calculateOverlap(u.content, seg.content) > 0.8)) continue;
|
|
219
|
-
const text = seg.title + ' ' + seg.content;
|
|
220
|
-
unique.push({
|
|
221
|
-
...seg,
|
|
222
|
-
salience: calculateSalience(text),
|
|
223
|
-
category: suggestCategory(text),
|
|
224
|
-
tags: extractTags(text, seg.extractorType),
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
unique.sort((a, b) => b.salience - a.salience);
|
|
228
|
-
const filtered = unique.filter((s) => {
|
|
229
|
-
const cat = CATEGORY_EXTRACTION_THRESHOLDS[s.category] ?? BASE_THRESHOLD;
|
|
230
|
-
return s.salience >= Math.min(cat, dynamicThreshold);
|
|
231
|
-
});
|
|
232
|
-
return filtered.slice(0, MAX_AUTO_MEMORIES);
|
|
233
|
-
}
|
|
93
|
+
// Salience detection, content extraction, and segment processing live in
|
|
94
|
+
// scripts/lib/extract-memorable-segments.mjs. Stop-hook uses the lighter
|
|
95
|
+
// 'stop' extractor set (no architecture / important-note) for backward
|
|
96
|
+
// compatibility with its pre-refactor behaviour.
|
|
234
97
|
|
|
235
98
|
function getMemoryStats(db) {
|
|
236
99
|
try {
|
|
@@ -311,7 +174,7 @@ process.stdin.on('readable', () => {
|
|
|
311
174
|
while ((chunk = process.stdin.read()) !== null) input += chunk;
|
|
312
175
|
});
|
|
313
176
|
|
|
314
|
-
process.stdin.on('end', () => {
|
|
177
|
+
process.stdin.on('end', async () => {
|
|
315
178
|
const startedAt = Date.now();
|
|
316
179
|
let db = null;
|
|
317
180
|
let extractedCount = 0;
|
|
@@ -401,12 +264,18 @@ process.stdin.on('end', () => {
|
|
|
401
264
|
const max = MAX_SHORT_TERM_MEMORIES + MAX_LONG_TERM_MEMORIES;
|
|
402
265
|
const dyn = getDynamicThreshold(total, max);
|
|
403
266
|
|
|
404
|
-
const segments = extractMemorableSegments(transcriptOut.text);
|
|
405
|
-
const processed = processSegments(segments, dyn
|
|
267
|
+
const segments = extractMemorableSegments(transcriptOut.text, { mode: 'stop' });
|
|
268
|
+
const processed = processSegments(segments, dyn, {
|
|
269
|
+
hookTag: 'source:stop-hook',
|
|
270
|
+
maxMemories: MAX_AUTO_MEMORIES,
|
|
271
|
+
categoryThresholds: PRE_COMPACT_CATEGORY_THRESHOLDS,
|
|
272
|
+
applyFrequencyBoost: false,
|
|
273
|
+
conversationText: transcriptOut.text,
|
|
274
|
+
});
|
|
406
275
|
|
|
407
276
|
for (const memory of processed) {
|
|
408
277
|
try {
|
|
409
|
-
saveAutoExtractedMemory(db, memory, project);
|
|
278
|
+
await saveAutoExtractedMemory(db, memory, project, { source: 'stop-hook' });
|
|
410
279
|
extractedCount++;
|
|
411
280
|
console.error(`[stop] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}, category: ${memory.category})`);
|
|
412
281
|
} catch (err) {
|
|
File without changes
|
|
File without changes
|