shieldcortex 4.12.14 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/required-server-files.json +4 -4
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- 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/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.rsc +21 -18
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +2 -2
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_full.segment.rsc +21 -18
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.rsc +20 -18
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview/__PAGE__.segment.rsc +2 -2
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_full.segment.rsc +20 -18
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/page_client-reference-manifest.js +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 +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_tree.segment.rsc +2 -2
- 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 +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.rsc +17 -15
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection/__PAGE__.segment.rsc +2 -2
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.rsc +17 -15
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +2 -2
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- 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 +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.rsc +17 -15
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.rsc +17 -15
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray/__PAGE__.segment.rsc +2 -2
- 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 +9 -7
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_full.segment.rsc +17 -15
- 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 +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/9f1d4_@tanstack_68dcbde9._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__fb5796ae._.js → [root-of-the-server]__2de25d56._.js} +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__52bd7a9f._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__b789489c._.js → [root-of-the-server]__6f881a23._.js} +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_01f6ceb0._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_20c6acea._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{9f1d4_next_c9fe89e1._.js → dashboard_25b568c3._.js} +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_2a8eef6b._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_35a9932a._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_37f17371._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_77cb2b63._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_91003e6d._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9b8695d8._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_a16ef10a._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_c219bf07._.js +4 -4
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_f9cd1dc2._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_fefd3b85._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_44a9f72c._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_de7ac4f9._.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_protection_ProtectionOverview_tsx_54554a97._.js +3 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_settings_SettingsView_tsx_16dc83a7._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_xray_XRayOverview_tsx_ceba698e._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +1 -1
- 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/dashboard/.next/standalone/dashboard/.next/static/chunks/015dc64369f26b7d.css +3 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/2fe84829530e61a3.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/34d0309a4e34b084.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/3729c748a4361c1f.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/3b7fdf1ee828254c.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/{3d53807a9a943ce7.js → 4c90ebd2c08cd656.js} +4 -4
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/4d4af0cecaef56f2.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/4eb86dc2f379d3ca.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/6aba18b7aac42ccd.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/{b4b3fb5729bead7e.js → 6ea97c8dc9e30ea5.js} +1 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/74ea1a87751e93a3.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/910628c23329a773.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/{c288964c4c00982a.js → b308a787e8cbc2a9.js} +3 -3
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/bdb50889a1c1ab37.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/d0bf5ccba09917dd.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/e804a1fda2839550.js +1 -0
- package/dashboard/.next/standalone/dashboard/server.js +1 -1
- package/dist/api/routes/digest.d.ts +59 -0
- package/dist/api/routes/digest.js +305 -0
- package/dist/api/routes/memories.js +84 -15
- package/dist/api/routes/system.js +10 -2
- package/dist/api/visualization-server.js +2 -0
- package/dist/cli/doctor.d.ts +42 -0
- package/dist/cli/doctor.js +173 -0
- package/dist/cli/migrate-legacy.d.ts +28 -0
- package/dist/cli/migrate-legacy.js +291 -0
- package/dist/cloud/cli.js +2 -2
- package/dist/cloud/config.d.ts +22 -0
- package/dist/cloud/config.js +38 -0
- package/dist/database/init.js +26 -1
- package/dist/index.js +8 -1
- package/dist/memory/backup.d.ts +19 -0
- package/dist/memory/backup.js +47 -0
- package/dist/memory/dedupe-runner.d.ts +33 -0
- package/dist/memory/dedupe-runner.js +103 -0
- package/dist/memory/fts.d.ts +26 -0
- package/dist/memory/fts.js +59 -0
- package/dist/memory/lifecycle.d.ts +83 -0
- package/dist/memory/lifecycle.js +274 -0
- package/dist/memory/links.d.ts +63 -0
- package/dist/memory/links.js +232 -0
- package/dist/memory/prune.d.ts +34 -0
- package/dist/memory/prune.js +76 -0
- package/dist/memory/search-recall.d.ts +48 -0
- package/dist/memory/search-recall.js +367 -0
- package/dist/memory/store.d.ts +6 -121
- package/dist/memory/store.js +45 -854
- package/dist/setup/claude-md.d.ts +1 -0
- package/dist/setup/deep-clean.d.ts +33 -0
- package/dist/setup/deep-clean.js +26 -0
- package/dist/setup/doctor.js +7 -2
- package/dist/setup/settings-hooks.d.ts +1 -0
- package/dist/setup/settings-hooks.js +51 -5
- package/dist/setup/status.js +39 -0
- package/hooks/openclaw/cortex-memory/runtime.mjs +18 -4
- package/package.json +1 -1
- package/plugins/openclaw/dist/index.js +12 -6
- package/plugins/openclaw/dist/openclaw.plugin.json +1 -1
- package/scripts/lib/auto-memory-config.mjs +53 -0
- package/scripts/lib/telemetry.mjs +58 -0
- package/scripts/lib/transcript-reader.mjs +123 -0
- package/scripts/postinstall.mjs +47 -1
- package/scripts/pre-compact-hook.mjs +76 -124
- package/scripts/session-end-hook.mjs +102 -97
- package/scripts/stop-hook.mjs +385 -116
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/9f1d4_@tanstack_785e068c._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__c2b92077._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_11878109._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_35c9f22e._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_836b4a04._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9770c429._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9dd626ed._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_e94d2da2._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_564ea5ae._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_lib_3f1490a1._.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/079a5be036130e37.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/1770a8ce7abb2437.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/1a074f8ddc7cd385.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/24da99d1341bd573.css +0 -3
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/2aa8afb655c1c2e5.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/302ad459a0e5c4ba.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/385ec610bad1acc5.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/4f57582c2d186438.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/52843253e4b833a5.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/7fca141efba9d353.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/8593e1796c9d043d.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/cbc2e6ffcad6e91c.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/fced7dd3c9874ed1.js +0 -1
- /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → 2JvJZkELhPQRzhTlgun1M}/_buildManifest.js +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → 2JvJZkELhPQRzhTlgun1M}/_clientMiddlewareManifest.json +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → 2JvJZkELhPQRzhTlgun1M}/_ssgManifest.js +0 -0
package/scripts/postinstall.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 is set
|
|
10
10
|
* - Running as a local/dev install (npm_config_global !== 'true')
|
|
11
11
|
*/
|
|
12
|
-
import { existsSync, copyFileSync, mkdirSync, readdirSync, readFileSync } from 'fs';
|
|
12
|
+
import { existsSync, copyFileSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'fs';
|
|
13
13
|
import { join, dirname } from 'path';
|
|
14
14
|
import { homedir } from 'os';
|
|
15
15
|
import { spawnSync } from 'child_process';
|
|
@@ -19,6 +19,37 @@ const isGlobal = process.env.npm_config_global === 'true';
|
|
|
19
19
|
const isCI = process.env.CI === 'true' || process.env.CONTINUOUS_INTEGRATION === 'true';
|
|
20
20
|
const skipAutoOpenClaw = process.env.SHIELDCORTEX_SKIP_AUTO_OPENCLAW === '1';
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Write integration defaults for fresh installs only.
|
|
24
|
+
* Returns true if defaults were written (fresh install), false if config already exists.
|
|
25
|
+
*
|
|
26
|
+
* Why: as of v4.13.x ShieldCortex ships flagship integrations ON by default for new
|
|
27
|
+
* users so they see value within the first session. Existing users keep their current
|
|
28
|
+
* settings — we never overwrite a config file that already exists.
|
|
29
|
+
*
|
|
30
|
+
* The v4.11.0 latency concern (200-500ms + 100-400 tokens/turn for proactive recall)
|
|
31
|
+
* is real but only matters for fast OpenClaw agent loops; for interactive Claude Code
|
|
32
|
+
* sessions the value > latency. Users can opt out via dashboard or CLI.
|
|
33
|
+
*/
|
|
34
|
+
function writeFreshInstallDefaults() {
|
|
35
|
+
const configDir = join(homedir(), '.shieldcortex');
|
|
36
|
+
const configFile = join(configDir, 'config.json');
|
|
37
|
+
|
|
38
|
+
if (existsSync(configFile)) return false;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
mkdirSync(configDir, { recursive: true });
|
|
42
|
+
const defaults = {
|
|
43
|
+
openclawAutoMemory: true,
|
|
44
|
+
proactiveRecall: true,
|
|
45
|
+
};
|
|
46
|
+
writeFileSync(configFile, JSON.stringify(defaults, null, 2) + '\n');
|
|
47
|
+
return true;
|
|
48
|
+
} catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
22
53
|
/**
|
|
23
54
|
* Detect Docker/container environment — mirrors the logic in src/setup/openclaw.ts.
|
|
24
55
|
* Postinstall must not crash the gateway in Umbrel/Docker installs (#16).
|
|
@@ -100,6 +131,7 @@ if (isGlobal && !isCI) {
|
|
|
100
131
|
const __dirname = dirname(__filename);
|
|
101
132
|
const cliPath = join(__dirname, '..', 'dist', 'index.js');
|
|
102
133
|
|
|
134
|
+
const isFreshInstall = writeFreshInstallDefaults();
|
|
103
135
|
const state = getOpenClawState();
|
|
104
136
|
const inDocker = isDockerEnvironment();
|
|
105
137
|
|
|
@@ -153,4 +185,18 @@ if (isGlobal && !isCI) {
|
|
|
153
185
|
console.log('\x1b[36m│\x1b[0m sessions, compactions, and projects. \x1b[36m│\x1b[0m');
|
|
154
186
|
console.log('\x1b[36m╰───────────────────────────────────────────────────────╯\x1b[0m');
|
|
155
187
|
console.log('');
|
|
188
|
+
if (isFreshInstall) {
|
|
189
|
+
console.log('\x1b[2mFresh install — flagship integrations enabled by default:\x1b[0m');
|
|
190
|
+
console.log('\x1b[2m • OpenClaw Auto-Memory — captures memories from agent LLM output\x1b[0m');
|
|
191
|
+
console.log('\x1b[2m • Proactive Recall — injects relevant memory into prompts\x1b[0m');
|
|
192
|
+
console.log('\x1b[2mTo opt out (e.g. for fast agent loops): dashboard Settings → Integrations, or:\x1b[0m');
|
|
193
|
+
console.log('\x1b[2m shieldcortex config --openclaw-auto-memory false\x1b[0m');
|
|
194
|
+
console.log('\x1b[2m shieldcortex config --proactive-recall false\x1b[0m');
|
|
195
|
+
} else {
|
|
196
|
+
console.log('\x1b[2mIntegration toggles preserved from your existing config.\x1b[0m');
|
|
197
|
+
console.log('\x1b[2mManage in dashboard Settings → Integrations, or:\x1b[0m');
|
|
198
|
+
console.log('\x1b[2m shieldcortex config --openclaw-auto-memory true|false\x1b[0m');
|
|
199
|
+
console.log('\x1b[2m shieldcortex config --proactive-recall true|false\x1b[0m');
|
|
200
|
+
}
|
|
201
|
+
console.log('');
|
|
156
202
|
}
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import Database from 'better-sqlite3';
|
|
15
|
-
import { existsSync, mkdirSync,
|
|
15
|
+
import { existsSync, mkdirSync, readdirSync, statSync } from 'fs';
|
|
16
16
|
import { join } from 'path';
|
|
17
17
|
import { homedir } from 'os';
|
|
18
18
|
import { encodeClaudeProjectDir } from './lib/claude-project-dir.mjs';
|
|
19
19
|
import { saveAutoExtractedMemory } from './lib/save-memory.mjs';
|
|
20
|
+
import { readTranscriptText } from './lib/transcript-reader.mjs';
|
|
21
|
+
import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
|
|
22
|
+
import { recordHookInvocation } from './lib/telemetry.mjs';
|
|
20
23
|
|
|
21
24
|
// Database paths (with legacy fallback)
|
|
22
25
|
const NEW_DB_DIR = join(homedir(), '.shieldcortex');
|
|
@@ -507,15 +510,24 @@ process.stdin.on('readable', () => {
|
|
|
507
510
|
});
|
|
508
511
|
|
|
509
512
|
process.stdin.on('end', () => {
|
|
513
|
+
const startedAt = Date.now();
|
|
514
|
+
let db = null;
|
|
515
|
+
let autoExtractedCount = 0;
|
|
516
|
+
let bytesRead = 0;
|
|
517
|
+
let exitCode = 0;
|
|
518
|
+
let notes = null;
|
|
510
519
|
try {
|
|
511
520
|
const hookData = JSON.parse(input || '{}');
|
|
512
521
|
|
|
513
522
|
const trigger = hookData.trigger || 'unknown';
|
|
514
523
|
const project = extractProjectFromPath(hookData.cwd);
|
|
524
|
+
const autoMemConfig = getAutoMemoryConfig();
|
|
515
525
|
|
|
516
526
|
// Extract conversation text from hook data
|
|
517
527
|
// Claude Code passes conversation in various formats
|
|
518
|
-
const
|
|
528
|
+
const conversationOut = extractConversationText(hookData, autoMemConfig);
|
|
529
|
+
const conversationText = conversationOut.text;
|
|
530
|
+
bytesRead = conversationOut.bytesRead;
|
|
519
531
|
|
|
520
532
|
// Ensure database directory exists
|
|
521
533
|
if (!existsSync(DB_DIR)) {
|
|
@@ -526,12 +538,13 @@ process.stdin.on('end', () => {
|
|
|
526
538
|
if (!existsSync(DB_PATH)) {
|
|
527
539
|
console.error('[pre-compact] Memory database not found, skipping auto-extraction');
|
|
528
540
|
outputReminder(0, BASE_THRESHOLD);
|
|
541
|
+
notes = 'no-database';
|
|
529
542
|
process.exit(0);
|
|
530
543
|
}
|
|
531
544
|
|
|
532
545
|
// Connect to database with timeout to handle concurrent access
|
|
533
546
|
// timeout: 5000ms prevents hook from hanging if DB is locked
|
|
534
|
-
|
|
547
|
+
db = new Database(DB_PATH, { timeout: 5000 });
|
|
535
548
|
|
|
536
549
|
// Get current memory stats for dynamic threshold calculation
|
|
537
550
|
const stats = getMemoryStats(db);
|
|
@@ -542,8 +555,6 @@ process.stdin.on('end', () => {
|
|
|
542
555
|
console.error(`[auto-extract] Memory status: ${totalMemories}/${maxMemories} (${(totalMemories/maxMemories*100).toFixed(0)}% full)`);
|
|
543
556
|
console.error(`[auto-extract] Dynamic threshold: ${dynamicThreshold.toFixed(2)}`);
|
|
544
557
|
|
|
545
|
-
let autoExtractedCount = 0;
|
|
546
|
-
|
|
547
558
|
// Only attempt extraction if we have conversation content
|
|
548
559
|
if (conversationText && conversationText.length > 100) {
|
|
549
560
|
// Extract memorable segments
|
|
@@ -561,142 +572,79 @@ process.stdin.on('end', () => {
|
|
|
561
572
|
console.error(`[auto-extract] Failed to save "${memory.title}": ${err.message}`);
|
|
562
573
|
}
|
|
563
574
|
}
|
|
575
|
+
} else {
|
|
576
|
+
notes = 'no-content';
|
|
564
577
|
}
|
|
565
578
|
|
|
566
579
|
console.error(`[shieldcortex] Pre-compact complete: ${autoExtractedCount} memories auto-extracted`);
|
|
567
580
|
|
|
568
581
|
outputReminder(autoExtractedCount, dynamicThreshold);
|
|
569
|
-
|
|
570
|
-
db.close();
|
|
571
|
-
process.exit(0);
|
|
572
582
|
} catch (error) {
|
|
573
583
|
console.error(`[pre-compact] Error: ${error.message}`);
|
|
584
|
+
notes = `error: ${error.message}`;
|
|
585
|
+
exitCode = 0; // Don't block compaction on errors
|
|
574
586
|
outputReminder(0, BASE_THRESHOLD);
|
|
575
|
-
|
|
587
|
+
} finally {
|
|
588
|
+
if (db) {
|
|
589
|
+
recordHookInvocation(db, {
|
|
590
|
+
hookName: 'pre-compact',
|
|
591
|
+
exitCode,
|
|
592
|
+
durationMs: Date.now() - startedAt,
|
|
593
|
+
memoriesExtracted: autoExtractedCount,
|
|
594
|
+
transcriptBytes: bytesRead,
|
|
595
|
+
notes,
|
|
596
|
+
});
|
|
597
|
+
try { db.close(); } catch { /* ignore */ }
|
|
598
|
+
}
|
|
599
|
+
process.exit(exitCode);
|
|
576
600
|
}
|
|
577
601
|
});
|
|
578
602
|
|
|
579
603
|
/**
|
|
580
|
-
*
|
|
581
|
-
* Claude Code stores sessions
|
|
604
|
+
* Resolve the most-recently-modified JSONL transcript for the given cwd
|
|
605
|
+
* (Claude Code stores sessions under ~/.claude/projects/<encoded-cwd>/).
|
|
582
606
|
*/
|
|
583
|
-
function
|
|
584
|
-
if (!cwd) return
|
|
585
|
-
|
|
607
|
+
function findLatestTranscriptForCwd(cwd) {
|
|
608
|
+
if (!cwd) return null;
|
|
609
|
+
const projectDir = join(homedir(), '.claude', 'projects', encodeClaudeProjectDir(cwd));
|
|
610
|
+
if (!existsSync(projectDir)) return null;
|
|
611
|
+
let files;
|
|
586
612
|
try {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
console.error(`[auto-extract] Session dir not found: ${projectDir}`);
|
|
591
|
-
return '';
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
// Find the most recently modified .jsonl file (= current session)
|
|
595
|
-
const files = readdirSync(projectDir)
|
|
596
|
-
.filter(f => f.endsWith('.jsonl'))
|
|
597
|
-
.map(f => ({ name: f, mtime: statSync(join(projectDir, f)).mtimeMs }))
|
|
613
|
+
files = readdirSync(projectDir)
|
|
614
|
+
.filter((f) => f.endsWith('.jsonl'))
|
|
615
|
+
.map((f) => ({ name: f, mtime: statSync(join(projectDir, f)).mtimeMs }))
|
|
598
616
|
.sort((a, b) => b.mtime - a.mtime);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
console.error('[auto-extract] No session JSONL files found');
|
|
602
|
-
return '';
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
const sessionFile = join(projectDir, files[0].name);
|
|
606
|
-
const content = readFileSync(sessionFile, 'utf-8');
|
|
607
|
-
const lines = content.trim().split('\n');
|
|
608
|
-
|
|
609
|
-
// Read last 50 lines to get recent conversation
|
|
610
|
-
const recentLines = lines.slice(-50);
|
|
611
|
-
const messages = [];
|
|
612
|
-
|
|
613
|
-
for (const line of recentLines) {
|
|
614
|
-
try {
|
|
615
|
-
const entry = JSON.parse(line);
|
|
616
|
-
// Claude Code JSONL: entry.type is "user"|"assistant", entry.message has API content
|
|
617
|
-
const role = entry.type || entry.message?.role;
|
|
618
|
-
const content = entry.message?.content;
|
|
619
|
-
if ((role === 'user' || role === 'assistant') && content) {
|
|
620
|
-
const text = Array.isArray(content)
|
|
621
|
-
? content.filter(c => c.type === 'text').map(c => c.text).join('\n')
|
|
622
|
-
: content;
|
|
623
|
-
if (text && !text.startsWith('/')) {
|
|
624
|
-
messages.push(text);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
} catch {
|
|
628
|
-
// Skip invalid lines
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
const result = messages.join('\n\n');
|
|
633
|
-
console.error(`[auto-extract] Read ${messages.length} messages from session JSONL (${result.length} chars)`);
|
|
634
|
-
return result;
|
|
635
|
-
} catch (err) {
|
|
636
|
-
console.error(`[auto-extract] Failed to read session: ${err.message}`);
|
|
637
|
-
return '';
|
|
617
|
+
} catch {
|
|
618
|
+
return null;
|
|
638
619
|
}
|
|
620
|
+
if (files.length === 0) return null;
|
|
621
|
+
return join(projectDir, files[0].name);
|
|
639
622
|
}
|
|
640
623
|
|
|
641
624
|
/**
|
|
642
|
-
*
|
|
643
|
-
*
|
|
625
|
+
* Extract conversation text from hook data, with three fallbacks:
|
|
626
|
+
* 1. transcript_path supplied by Claude Code
|
|
627
|
+
* 2. inline payload fields (conversation, messages, etc.)
|
|
628
|
+
* 3. auto-detect latest JSONL under ~/.claude/projects/<encoded cwd>/
|
|
629
|
+
*
|
|
630
|
+
* Delegates JSONL parsing to scripts/lib/transcript-reader.mjs so the
|
|
631
|
+
* byte-cap and slash-command rules are shared with session-end-hook.
|
|
644
632
|
*/
|
|
645
|
-
function
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
return '';
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
try {
|
|
655
|
-
const content = readFileSync(resolvedPath, 'utf-8');
|
|
656
|
-
const lines = content.trim().split('\n');
|
|
657
|
-
const recentLines = lines.slice(-50);
|
|
658
|
-
const messages = [];
|
|
659
|
-
|
|
660
|
-
for (const line of recentLines) {
|
|
661
|
-
try {
|
|
662
|
-
const entry = JSON.parse(line);
|
|
663
|
-
const role = entry.type || entry.message?.role;
|
|
664
|
-
const msgContent = entry.message?.content;
|
|
665
|
-
if ((role === 'user' || role === 'assistant') && msgContent) {
|
|
666
|
-
const text = Array.isArray(msgContent)
|
|
667
|
-
? msgContent.filter(c => c.type === 'text').map(c => c.text).join('\n')
|
|
668
|
-
: msgContent;
|
|
669
|
-
if (text && !text.startsWith('/')) {
|
|
670
|
-
messages.push(text);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
} catch {
|
|
674
|
-
// Skip invalid lines
|
|
675
|
-
}
|
|
676
|
-
}
|
|
633
|
+
function extractConversationText(hookData, autoMemConfig) {
|
|
634
|
+
const readerOpts = {
|
|
635
|
+
maxBytes: autoMemConfig.maxTranscriptBytes,
|
|
636
|
+
maxLines: autoMemConfig.maxTranscriptLines,
|
|
637
|
+
keepSlashCommandProse: autoMemConfig.keepSlashCommandProse,
|
|
638
|
+
};
|
|
677
639
|
|
|
678
|
-
const result = messages.join('\n\n');
|
|
679
|
-
console.error(`[auto-extract] Read ${messages.length} messages from transcript (${result.length} chars)`);
|
|
680
|
-
return result;
|
|
681
|
-
} catch (err) {
|
|
682
|
-
console.error(`[auto-extract] Failed to read transcript: ${err.message}`);
|
|
683
|
-
return '';
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* Extract conversation text from hook data, falling back to session JSONL
|
|
689
|
-
*/
|
|
690
|
-
function extractConversationText(hookData) {
|
|
691
|
-
// Primary: use transcript_path provided by Claude Code
|
|
692
640
|
if (hookData.transcript_path) {
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
695
|
-
|
|
641
|
+
const out = readTranscriptText(hookData.transcript_path, readerOpts);
|
|
642
|
+
if (out.text) {
|
|
643
|
+
console.error(`[auto-extract] Read ${out.messageCount} messages from transcript_path (${out.text.length} chars, ${out.bytesRead} bytes scanned)`);
|
|
644
|
+
return { text: out.text, bytesRead: out.bytesRead };
|
|
696
645
|
}
|
|
697
646
|
}
|
|
698
647
|
|
|
699
|
-
// Secondary: try other possible locations for conversation content
|
|
700
648
|
const sources = [
|
|
701
649
|
hookData.conversation,
|
|
702
650
|
hookData.messages,
|
|
@@ -705,25 +653,29 @@ function extractConversationText(hookData) {
|
|
|
705
653
|
hookData.context,
|
|
706
654
|
hookData.text,
|
|
707
655
|
];
|
|
708
|
-
|
|
709
656
|
for (const source of sources) {
|
|
710
|
-
if (typeof source === 'string' && source.length > 0) {
|
|
711
|
-
return source;
|
|
712
|
-
}
|
|
657
|
+
if (typeof source === 'string' && source.length > 0) return { text: source, bytesRead: 0 };
|
|
713
658
|
if (Array.isArray(source)) {
|
|
714
|
-
|
|
715
|
-
.map(msg => {
|
|
659
|
+
const text = source
|
|
660
|
+
.map((msg) => {
|
|
716
661
|
if (typeof msg === 'string') return msg;
|
|
717
662
|
if (msg.content) return msg.content;
|
|
718
663
|
if (msg.text) return msg.text;
|
|
719
664
|
return '';
|
|
720
665
|
})
|
|
721
666
|
.join('\n');
|
|
667
|
+
return { text, bytesRead: 0 };
|
|
722
668
|
}
|
|
723
669
|
}
|
|
724
670
|
|
|
725
|
-
|
|
726
|
-
|
|
671
|
+
const latest = findLatestTranscriptForCwd(hookData.cwd);
|
|
672
|
+
if (!latest) {
|
|
673
|
+
console.error('[auto-extract] No transcript located for cwd');
|
|
674
|
+
return { text: '', bytesRead: 0 };
|
|
675
|
+
}
|
|
676
|
+
const out = readTranscriptText(latest, readerOpts);
|
|
677
|
+
console.error(`[auto-extract] Read ${out.messageCount} messages from session JSONL (${out.text.length} chars, ${out.bytesRead} bytes scanned)`);
|
|
678
|
+
return { text: out.text, bytesRead: out.bytesRead };
|
|
727
679
|
}
|
|
728
680
|
|
|
729
681
|
/**
|
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import Database from 'better-sqlite3';
|
|
25
|
-
import { existsSync, mkdirSync
|
|
25
|
+
import { existsSync, mkdirSync } from 'fs';
|
|
26
26
|
import { join } from 'path';
|
|
27
27
|
import { homedir } from 'os';
|
|
28
28
|
import { saveAutoExtractedMemory } from './lib/save-memory.mjs';
|
|
29
|
+
import { readTranscriptText } from './lib/transcript-reader.mjs';
|
|
30
|
+
import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
|
|
31
|
+
import { recordHookInvocation } from './lib/telemetry.mjs';
|
|
29
32
|
|
|
30
33
|
// Database paths (with legacy fallback)
|
|
31
34
|
const NEW_DB_DIR = join(homedir(), '.shieldcortex');
|
|
@@ -405,57 +408,6 @@ function saveMemory(db, memory, project) {
|
|
|
405
408
|
saveAutoExtractedMemory(db, memory, project);
|
|
406
409
|
}
|
|
407
410
|
|
|
408
|
-
// ==================== TRANSCRIPT READING ====================
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Read conversation text from the session transcript JSONL file.
|
|
412
|
-
*/
|
|
413
|
-
function readTranscript(transcriptPath) {
|
|
414
|
-
if (!transcriptPath) return '';
|
|
415
|
-
|
|
416
|
-
// Expand ~ to homedir
|
|
417
|
-
const resolvedPath = transcriptPath.replace(/^~/, homedir());
|
|
418
|
-
|
|
419
|
-
if (!existsSync(resolvedPath)) {
|
|
420
|
-
console.error(`[session-end] Transcript not found: ${resolvedPath}`);
|
|
421
|
-
return '';
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
try {
|
|
425
|
-
const content = readFileSync(resolvedPath, 'utf-8');
|
|
426
|
-
const lines = content.trim().split('\n');
|
|
427
|
-
|
|
428
|
-
// Read last 50 lines to get recent conversation
|
|
429
|
-
const recentLines = lines.slice(-50);
|
|
430
|
-
const messages = [];
|
|
431
|
-
|
|
432
|
-
for (const line of recentLines) {
|
|
433
|
-
try {
|
|
434
|
-
const entry = JSON.parse(line);
|
|
435
|
-
const role = entry.type || entry.message?.role;
|
|
436
|
-
const msgContent = entry.message?.content;
|
|
437
|
-
if ((role === 'user' || role === 'assistant') && msgContent) {
|
|
438
|
-
const text = Array.isArray(msgContent)
|
|
439
|
-
? msgContent.filter(c => c.type === 'text').map(c => c.text).join('\n')
|
|
440
|
-
: msgContent;
|
|
441
|
-
if (text && !text.startsWith('/')) {
|
|
442
|
-
messages.push(text);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
} catch {
|
|
446
|
-
// Skip invalid lines
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
const result = messages.join('\n\n');
|
|
451
|
-
console.error(`[session-end] Read ${messages.length} messages from transcript (${result.length} chars)`);
|
|
452
|
-
return result;
|
|
453
|
-
} catch (err) {
|
|
454
|
-
console.error(`[session-end] Failed to read transcript: ${err.message}`);
|
|
455
|
-
return '';
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
411
|
// ==================== MAIN HOOK LOGIC ====================
|
|
460
412
|
|
|
461
413
|
let input = '';
|
|
@@ -468,69 +420,122 @@ process.stdin.on('readable', () => {
|
|
|
468
420
|
}
|
|
469
421
|
});
|
|
470
422
|
|
|
423
|
+
function looksLikeOpenClawContext() {
|
|
424
|
+
// OpenClaw spawns Claude Code agents as subprocesses. When SessionEnd fires
|
|
425
|
+
// inside that subprocess, the OpenClaw runtime has often already torn down
|
|
426
|
+
// shared state (lock files, IPC channels) — extracting from there has caused
|
|
427
|
+
// fatal failures historically (settings-hooks.ts:23-25). Detect via env.
|
|
428
|
+
if (process.env.OPENCLAW_AGENT_ID) return true;
|
|
429
|
+
if (process.env.OPENCLAW_SESSION_ID) return true;
|
|
430
|
+
if (process.env.OPENCLAW_PARENT_PID) return true;
|
|
431
|
+
if (typeof process.env.OPENCLAW === 'string' && process.env.OPENCLAW.length > 0) return true;
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
|
|
471
435
|
process.stdin.on('end', () => {
|
|
436
|
+
const startedAt = Date.now();
|
|
437
|
+
let db = null;
|
|
438
|
+
let autoExtractedCount = 0;
|
|
439
|
+
let bytesRead = 0;
|
|
440
|
+
let notes = null;
|
|
472
441
|
try {
|
|
473
442
|
const hookData = JSON.parse(input || '{}');
|
|
474
443
|
|
|
475
444
|
const reason = hookData.reason || 'unknown';
|
|
476
445
|
const project = extractProjectFromPath(hookData.cwd);
|
|
446
|
+
const autoMemConfig = getAutoMemoryConfig();
|
|
477
447
|
|
|
478
|
-
//
|
|
479
|
-
|
|
480
|
-
|
|
448
|
+
// Config gate: opt-in (default off). Preserves the historical default
|
|
449
|
+
// that protected OpenClaw users. We exit before touching the DB so a
|
|
450
|
+
// disabled hook never opens better-sqlite3 — telemetry stays silent too.
|
|
451
|
+
if (!autoMemConfig.enableSessionEnd) {
|
|
452
|
+
console.error('[session-end] Disabled by config (autoMemory.enableSessionEnd=false)');
|
|
481
453
|
process.exit(0);
|
|
482
454
|
}
|
|
483
455
|
|
|
484
|
-
//
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
if (!conversationText || conversationText.length < 100) {
|
|
488
|
-
console.error('[session-end] Not enough conversation content to extract from');
|
|
456
|
+
// OpenClaw subprocess guard (extra defence on top of the config gate).
|
|
457
|
+
if (looksLikeOpenClawContext()) {
|
|
458
|
+
console.error('[session-end] OpenClaw context detected, skipping extraction');
|
|
489
459
|
process.exit(0);
|
|
490
460
|
}
|
|
491
461
|
|
|
492
|
-
//
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
|
|
462
|
+
// Skip extraction on /clear — session is being intentionally wiped
|
|
463
|
+
if (reason === 'clear') {
|
|
464
|
+
console.error('[session-end] Session cleared, skipping extraction');
|
|
465
|
+
notes = 'reason=clear';
|
|
466
|
+
// fall through to telemetry record so 'fired but skipped' is visible
|
|
467
|
+
} else {
|
|
468
|
+
// Read conversation from transcript_path (provided by Claude Code)
|
|
469
|
+
const transcriptOut = readTranscriptText(hookData.transcript_path, {
|
|
470
|
+
maxBytes: autoMemConfig.maxTranscriptBytes,
|
|
471
|
+
maxLines: autoMemConfig.maxTranscriptLines,
|
|
472
|
+
keepSlashCommandProse: autoMemConfig.keepSlashCommandProse,
|
|
473
|
+
});
|
|
474
|
+
const conversationText = transcriptOut.text;
|
|
475
|
+
bytesRead = transcriptOut.bytesRead;
|
|
476
|
+
if (transcriptOut.messageCount > 0) {
|
|
477
|
+
console.error(`[session-end] Read ${transcriptOut.messageCount} messages from transcript (${conversationText.length} chars, ${bytesRead} bytes scanned)`);
|
|
478
|
+
}
|
|
496
479
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
480
|
+
if (conversationText && conversationText.length >= 100) {
|
|
481
|
+
// Ensure database directory exists
|
|
482
|
+
if (!existsSync(DB_DIR)) {
|
|
483
|
+
mkdirSync(DB_DIR, { recursive: true });
|
|
484
|
+
}
|
|
501
485
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const dynamicThreshold = getDynamicThreshold(totalMemories, maxMemories);
|
|
508
|
-
|
|
509
|
-
console.error(`[session-end] Memory status: ${totalMemories}/${maxMemories} (${(totalMemories/maxMemories*100).toFixed(0)}% full)`);
|
|
510
|
-
console.error(`[session-end] Reason: ${reason}, Dynamic threshold: ${dynamicThreshold.toFixed(2)}`);
|
|
511
|
-
|
|
512
|
-
// Extract memorable segments
|
|
513
|
-
const segments = extractMemorableSegments(conversationText);
|
|
514
|
-
const processedSegments = processSegments(segments, dynamicThreshold);
|
|
515
|
-
|
|
516
|
-
let autoExtractedCount = 0;
|
|
517
|
-
for (const memory of processedSegments) {
|
|
518
|
-
try {
|
|
519
|
-
saveMemory(db, memory, project);
|
|
520
|
-
autoExtractedCount++;
|
|
521
|
-
const boostInfo = memory.frequencyBoost > 0 ? ` +${memory.frequencyBoost.toFixed(2)} boost` : '';
|
|
522
|
-
console.error(`[session-end] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}${boostInfo}, category: ${memory.category})`);
|
|
523
|
-
} catch (err) {
|
|
524
|
-
console.error(`[session-end] Failed to save "${memory.title}": ${err.message}`);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
486
|
+
if (!existsSync(DB_PATH)) {
|
|
487
|
+
console.error('[session-end] Memory database not found, skipping extraction');
|
|
488
|
+
notes = 'no-database';
|
|
489
|
+
process.exit(0);
|
|
490
|
+
}
|
|
527
491
|
|
|
528
|
-
|
|
492
|
+
db = new Database(DB_PATH, { timeout: 5000 });
|
|
529
493
|
|
|
530
|
-
|
|
531
|
-
|
|
494
|
+
const stats = getMemoryStats(db);
|
|
495
|
+
const totalMemories = stats.shortTerm + stats.longTerm;
|
|
496
|
+
const maxMemories = MAX_SHORT_TERM_MEMORIES + MAX_LONG_TERM_MEMORIES;
|
|
497
|
+
const dynamicThreshold = getDynamicThreshold(totalMemories, maxMemories);
|
|
498
|
+
|
|
499
|
+
console.error(`[session-end] Memory status: ${totalMemories}/${maxMemories} (${(totalMemories/maxMemories*100).toFixed(0)}% full)`);
|
|
500
|
+
console.error(`[session-end] Reason: ${reason}, Dynamic threshold: ${dynamicThreshold.toFixed(2)}`);
|
|
501
|
+
|
|
502
|
+
// Extract memorable segments
|
|
503
|
+
const segments = extractMemorableSegments(conversationText);
|
|
504
|
+
const processedSegments = processSegments(segments, dynamicThreshold);
|
|
505
|
+
|
|
506
|
+
for (const memory of processedSegments) {
|
|
507
|
+
try {
|
|
508
|
+
saveMemory(db, memory, project);
|
|
509
|
+
autoExtractedCount++;
|
|
510
|
+
const boostInfo = memory.frequencyBoost > 0 ? ` +${memory.frequencyBoost.toFixed(2)} boost` : '';
|
|
511
|
+
console.error(`[session-end] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}${boostInfo}, category: ${memory.category})`);
|
|
512
|
+
} catch (err) {
|
|
513
|
+
console.error(`[session-end] Failed to save "${memory.title}": ${err.message}`);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
console.error(`[session-end] Complete: ${autoExtractedCount} memories auto-extracted on session ${reason}`);
|
|
518
|
+
} else {
|
|
519
|
+
console.error('[session-end] Not enough conversation content to extract from');
|
|
520
|
+
notes = 'no-content';
|
|
521
|
+
}
|
|
522
|
+
}
|
|
532
523
|
} catch (error) {
|
|
533
524
|
console.error(`[session-end] Error: ${error.message}`);
|
|
534
|
-
|
|
525
|
+
notes = `error: ${error.message}`;
|
|
526
|
+
// Don't block session exit on errors
|
|
527
|
+
} finally {
|
|
528
|
+
if (db) {
|
|
529
|
+
recordHookInvocation(db, {
|
|
530
|
+
hookName: 'session-end',
|
|
531
|
+
exitCode: 0,
|
|
532
|
+
durationMs: Date.now() - startedAt,
|
|
533
|
+
memoriesExtracted: autoExtractedCount,
|
|
534
|
+
transcriptBytes: bytesRead,
|
|
535
|
+
notes,
|
|
536
|
+
});
|
|
537
|
+
try { db.close(); } catch { /* ignore */ }
|
|
538
|
+
}
|
|
539
|
+
process.exit(0);
|
|
535
540
|
}
|
|
536
541
|
});
|