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
|
@@ -73,6 +73,39 @@ export interface CleanResult {
|
|
|
73
73
|
* currently populated. Pure read — no mutation.
|
|
74
74
|
*/
|
|
75
75
|
export declare function scanForResidue(): ResidueReport;
|
|
76
|
+
/**
|
|
77
|
+
* Detect whether the SC plugin / hook are currently installed on disk.
|
|
78
|
+
* Used by `scanForOrphans()` to tell legitimate install state from true orphans.
|
|
79
|
+
*
|
|
80
|
+
* Plugin install location depends on which install mode OpenClaw chose:
|
|
81
|
+
*
|
|
82
|
+
* 1. **native-package** (Mac homebrew, npm-global in OpenClaw's search path) —
|
|
83
|
+
* plugin lives at `${npmRoot}/shieldcortex/plugins/openclaw/dist/`. The
|
|
84
|
+
* user-space `~/.openclaw/extensions/` is NOT populated.
|
|
85
|
+
* 2. **trusted-local-copy** (Linux fleet, npm-global outside the search path) —
|
|
86
|
+
* plugin is copied to `~/.openclaw/extensions/shieldcortex-realtime/`.
|
|
87
|
+
*
|
|
88
|
+
* The most reliable signal is the `installPath` recorded under
|
|
89
|
+
* `openclaw.json: .plugins.installs[shieldcortex-realtime]` — that's the path
|
|
90
|
+
* the installer actually used. We honour that first, then fall back to the
|
|
91
|
+
* known install locations so we can still detect installs that pre-date the
|
|
92
|
+
* `installPath` field.
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* The plugin counts as installed when OpenClaw has registered it in BOTH
|
|
96
|
+
* `plugins.entries[<id>]` AND `plugins.allow[]`.
|
|
97
|
+
*
|
|
98
|
+
* Background: when the plugin was installed via `openclaw plugins install <pkg>`
|
|
99
|
+
* (native-package mode — Mac homebrew, Linux global), OpenClaw stores the plugin
|
|
100
|
+
* in its own internal tree, NOT under `~/.openclaw/extensions/`. From the doctor's
|
|
101
|
+
* perspective there are no plugin bytes on disk in any of the paths it checks.
|
|
102
|
+
* Without this check the doctor false-flags `plugins.entries[<id>]` and
|
|
103
|
+
* `plugins.allow[<id>]` as "OpenClaw residue" on every Mac homebrew install
|
|
104
|
+
* (the user-reported symptom on 4 May 2026 that triggered this fix).
|
|
105
|
+
*
|
|
106
|
+
* Exported for direct unit testing without having to mock fs / os.homedir().
|
|
107
|
+
*/
|
|
108
|
+
export declare function isPluginRegisteredInOpenClawConfig(cfg: unknown): boolean;
|
|
76
109
|
/**
|
|
77
110
|
* Return only residue entries that are TRUE ORPHANS — meaning the config /
|
|
78
111
|
* lock-file entry references a ShieldCortex artefact that is NOT currently
|
package/dist/setup/deep-clean.js
CHANGED
|
@@ -219,6 +219,27 @@ export function scanForResidue() {
|
|
|
219
219
|
* known install locations so we can still detect installs that pre-date the
|
|
220
220
|
* `installPath` field.
|
|
221
221
|
*/
|
|
222
|
+
/**
|
|
223
|
+
* The plugin counts as installed when OpenClaw has registered it in BOTH
|
|
224
|
+
* `plugins.entries[<id>]` AND `plugins.allow[]`.
|
|
225
|
+
*
|
|
226
|
+
* Background: when the plugin was installed via `openclaw plugins install <pkg>`
|
|
227
|
+
* (native-package mode — Mac homebrew, Linux global), OpenClaw stores the plugin
|
|
228
|
+
* in its own internal tree, NOT under `~/.openclaw/extensions/`. From the doctor's
|
|
229
|
+
* perspective there are no plugin bytes on disk in any of the paths it checks.
|
|
230
|
+
* Without this check the doctor false-flags `plugins.entries[<id>]` and
|
|
231
|
+
* `plugins.allow[<id>]` as "OpenClaw residue" on every Mac homebrew install
|
|
232
|
+
* (the user-reported symptom on 4 May 2026 that triggered this fix).
|
|
233
|
+
*
|
|
234
|
+
* Exported for direct unit testing without having to mock fs / os.homedir().
|
|
235
|
+
*/
|
|
236
|
+
export function isPluginRegisteredInOpenClawConfig(cfg) {
|
|
237
|
+
const entryEnabled = !!getPath(cfg, ['plugins', 'entries', PLUGIN_ID]);
|
|
238
|
+
const allowList = getPath(cfg, ['plugins', 'allow']);
|
|
239
|
+
const inAllow = Array.isArray(allowList)
|
|
240
|
+
&& allowList.some((e) => typeof e === 'string' && e === PLUGIN_ID);
|
|
241
|
+
return entryEnabled && inAllow;
|
|
242
|
+
}
|
|
222
243
|
function detectInstallState() {
|
|
223
244
|
const home = resolveHome();
|
|
224
245
|
// 1. Honour whatever path the installer recorded in openclaw.json.
|
|
@@ -252,6 +273,11 @@ function detectInstallState() {
|
|
|
252
273
|
pluginInstalled = true;
|
|
253
274
|
}
|
|
254
275
|
}
|
|
276
|
+
// 4. Fallback: trust OpenClaw's own plugin registry — see
|
|
277
|
+
// `isPluginRegisteredInOpenClawConfig` below for the rationale.
|
|
278
|
+
if (!pluginInstalled && isPluginRegisteredInOpenClawConfig(cfg)) {
|
|
279
|
+
pluginInstalled = true;
|
|
280
|
+
}
|
|
255
281
|
const hookCandidates = [
|
|
256
282
|
path.join(home, '.openclaw', 'hooks', HOOK_NAME),
|
|
257
283
|
path.join(home, '.claude', 'hooks', HOOK_NAME),
|
package/dist/setup/doctor.js
CHANGED
|
@@ -46,14 +46,19 @@ function checkDatabase() {
|
|
|
46
46
|
add('FAIL', 'Database not found at ~/.shieldcortex/memories.db');
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
const label = db.isLegacy ?
|
|
49
|
+
const label = db.isLegacy ? `${db.path} (legacy)` : '~/.shieldcortex/memories.db';
|
|
50
50
|
try {
|
|
51
51
|
const stat = fs.statSync(db.path);
|
|
52
52
|
const Database = require('better-sqlite3');
|
|
53
53
|
const conn = new Database(db.path, { readonly: true });
|
|
54
54
|
const row = conn.prepare('SELECT COUNT(*) as count FROM memories').get();
|
|
55
55
|
conn.close();
|
|
56
|
-
|
|
56
|
+
if (db.isLegacy) {
|
|
57
|
+
add('WARN', `Database: ${label} (${row.count} memories, ${formatBytes(stat.size)}) — DEPRECATED, removed in v5.0.0; run: shieldcortex migrate-legacy`);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
add('PASS', `Database: ${label} (${row.count} memories, ${formatBytes(stat.size)})`);
|
|
61
|
+
}
|
|
57
62
|
}
|
|
58
63
|
catch (err) {
|
|
59
64
|
add('FAIL', `Database: ${label} — ${err.message}`);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import os from 'os';
|
|
7
|
+
import { setAutoMemoryEnableConfig } from '../cloud/config.js';
|
|
7
8
|
const SETTINGS_PATH = path.join(os.homedir(), '.claude', 'settings.json');
|
|
8
9
|
const CORTEX_HOOKS = {
|
|
9
10
|
PreCompact: {
|
|
@@ -28,6 +29,13 @@ export const REQUIRED_HOOK_NAMES = Object.freeze(Object.keys(CORTEX_HOOKS));
|
|
|
28
29
|
const STOP_HOOK = {
|
|
29
30
|
hooks: [{ type: 'command', command: 'shieldcortex hook stop', timeout: 10 }],
|
|
30
31
|
};
|
|
32
|
+
// SessionEnd is opt-in. The hook script gates execution behind
|
|
33
|
+
// `autoMemory.enableSessionEnd` in ~/.shieldcortex/config.json AND a
|
|
34
|
+
// process.env-based OpenClaw context detector, so wiring it via this flag
|
|
35
|
+
// does NOT regress the v4.10 OpenClaw-crash class on its own.
|
|
36
|
+
const SESSION_END_HOOK = {
|
|
37
|
+
hooks: [{ type: 'command', command: 'shieldcortex hook session-end', timeout: 10 }],
|
|
38
|
+
};
|
|
31
39
|
function hasCortexHook(entries) {
|
|
32
40
|
return entries.some((e) => e.hooks?.some((h) => typeof h.command === 'string' && h.command.includes('shieldcortex')));
|
|
33
41
|
}
|
|
@@ -79,18 +87,22 @@ export function setupHooks(options) {
|
|
|
79
87
|
}
|
|
80
88
|
// First: migrate any stale npx commands to direct binary
|
|
81
89
|
const migrated = migrateNpxHooks(settings);
|
|
82
|
-
//
|
|
83
|
-
if (
|
|
90
|
+
// SessionEnd handling is now bidirectional:
|
|
91
|
+
// - if --with-session-end was passed, install it (the .mjs gates execution
|
|
92
|
+
// by config + OpenClaw env so it's safe to wire here);
|
|
93
|
+
// - otherwise, remove any existing ShieldCortex SessionEnd entry to keep
|
|
94
|
+
// the OpenClaw-safe default for users who don't explicitly opt in.
|
|
95
|
+
if (!options?.sessionEnd && settings.hooks.SessionEnd) {
|
|
84
96
|
const hadCortex = hasCortexHook(settings.hooks.SessionEnd);
|
|
85
97
|
if (hadCortex) {
|
|
86
98
|
settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter((e) => !e.hooks?.some((h) => typeof h.command === 'string' && h.command.includes('shieldcortex')));
|
|
87
99
|
if (settings.hooks.SessionEnd.length === 0)
|
|
88
100
|
delete settings.hooks.SessionEnd;
|
|
89
|
-
console.log(' - Hook: SessionEnd (removed —
|
|
101
|
+
console.log(' - Hook: SessionEnd (removed — opt in with `--with-session-end`)');
|
|
90
102
|
}
|
|
91
103
|
}
|
|
92
104
|
let added = 0;
|
|
93
|
-
// Install command hooks (PreCompact, SessionStart,
|
|
105
|
+
// Install command hooks (PreCompact, SessionStart, UserPromptSubmit)
|
|
94
106
|
for (const [name, entry] of Object.entries(CORTEX_HOOKS)) {
|
|
95
107
|
if (!Array.isArray(settings.hooks[name])) {
|
|
96
108
|
settings.hooks[name] = [];
|
|
@@ -104,6 +116,20 @@ export function setupHooks(options) {
|
|
|
104
116
|
console.log(` = Hook: ${name} (already configured)`);
|
|
105
117
|
}
|
|
106
118
|
}
|
|
119
|
+
// Optionally install SessionEnd hook
|
|
120
|
+
if (options?.sessionEnd) {
|
|
121
|
+
if (!Array.isArray(settings.hooks.SessionEnd)) {
|
|
122
|
+
settings.hooks.SessionEnd = [];
|
|
123
|
+
}
|
|
124
|
+
if (!hasCortexHook(settings.hooks.SessionEnd)) {
|
|
125
|
+
settings.hooks.SessionEnd.push(SESSION_END_HOOK);
|
|
126
|
+
added++;
|
|
127
|
+
console.log(` + Hook: SessionEnd (opt-in — flipping autoMemory.enableSessionEnd=true)`);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
console.log(` = Hook: SessionEnd (already configured)`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
107
133
|
// Optionally install Stop hook
|
|
108
134
|
if (options?.stopHook) {
|
|
109
135
|
if (!Array.isArray(settings.hooks.Stop)) {
|
|
@@ -112,7 +138,7 @@ export function setupHooks(options) {
|
|
|
112
138
|
if (!hasCortexHook(settings.hooks.Stop)) {
|
|
113
139
|
settings.hooks.Stop.push(STOP_HOOK);
|
|
114
140
|
added++;
|
|
115
|
-
console.log(` + Hook: Stop (opt-in)`);
|
|
141
|
+
console.log(` + Hook: Stop (opt-in — flipping autoMemory.enableStop=true)`);
|
|
116
142
|
}
|
|
117
143
|
else {
|
|
118
144
|
console.log(` = Hook: Stop (already configured)`);
|
|
@@ -126,4 +152,24 @@ export function setupHooks(options) {
|
|
|
126
152
|
else {
|
|
127
153
|
console.log('Hooks: all hooks already configured in ~/.claude/settings.json');
|
|
128
154
|
}
|
|
155
|
+
// Single source of truth: the install flag IS the runtime gate. Wiring the
|
|
156
|
+
// hook in settings.json without flipping autoMemory.enable* was the
|
|
157
|
+
// silent-amnesia failure mode in #41 — passing --with-stop-hook wrote the
|
|
158
|
+
// hook but the runtime gate (default false) made it bail on every fire.
|
|
159
|
+
// Always sync gate to install flag — including the false case, so removing
|
|
160
|
+
// a hook by re-running install without the flag also disables the gate.
|
|
161
|
+
if (options?.stopHook !== undefined || options?.sessionEnd !== undefined) {
|
|
162
|
+
const updates = {};
|
|
163
|
+
if (options.stopHook !== undefined)
|
|
164
|
+
updates.enableStop = options.stopHook;
|
|
165
|
+
if (options.sessionEnd !== undefined)
|
|
166
|
+
updates.enableSessionEnd = options.sessionEnd;
|
|
167
|
+
try {
|
|
168
|
+
setAutoMemoryEnableConfig(updates);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
172
|
+
console.warn(`Hooks: could not update autoMemory enable config — ${msg}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
129
175
|
}
|
package/dist/setup/status.js
CHANGED
|
@@ -66,6 +66,33 @@ function getStatusInfo(dbPath) {
|
|
|
66
66
|
catch {
|
|
67
67
|
// Quarantine table doesn't exist - that's fine
|
|
68
68
|
}
|
|
69
|
+
// Per-hook invocation telemetry (last 7 days). Disambiguates the
|
|
70
|
+
// "fires but produces nothing" vs "never fires" failure modes that
|
|
71
|
+
// both showed as "Last activity: never" in older releases.
|
|
72
|
+
const hookActivity = [];
|
|
73
|
+
try {
|
|
74
|
+
const rows = db.prepare(`
|
|
75
|
+
SELECT hook_name AS hookName,
|
|
76
|
+
COUNT(*) AS invocationCount,
|
|
77
|
+
MAX(invoked_at) AS lastInvokedAt,
|
|
78
|
+
SUM(memories_extracted) AS memoriesExtracted
|
|
79
|
+
FROM hook_invocations
|
|
80
|
+
WHERE invoked_at >= datetime('now', '-7 days')
|
|
81
|
+
GROUP BY hook_name
|
|
82
|
+
ORDER BY hook_name
|
|
83
|
+
`).all();
|
|
84
|
+
for (const r of rows) {
|
|
85
|
+
hookActivity.push({
|
|
86
|
+
hookName: r.hookName,
|
|
87
|
+
invocationCount: r.invocationCount,
|
|
88
|
+
lastInvokedAt: r.lastInvokedAt,
|
|
89
|
+
memoriesExtracted: r.memoriesExtracted ?? 0,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
// hook_invocations table doesn't exist on pre-4.13 installs - leave empty
|
|
95
|
+
}
|
|
69
96
|
return {
|
|
70
97
|
dbPath,
|
|
71
98
|
dbSize,
|
|
@@ -77,6 +104,7 @@ function getStatusInfo(dbPath) {
|
|
|
77
104
|
lastActivity,
|
|
78
105
|
quarantined,
|
|
79
106
|
threatsBlocked,
|
|
107
|
+
hookActivity,
|
|
80
108
|
};
|
|
81
109
|
}
|
|
82
110
|
const SETTINGS_PATH = path.join(os.homedir(), '.claude', 'settings.json');
|
|
@@ -145,6 +173,17 @@ export async function handleStatusCommand() {
|
|
|
145
173
|
Defence: ${info.quarantined} quarantined, ${info.threatsBlocked} threats blocked
|
|
146
174
|
Hooks: ${hooksConfigured ? 'configured' : '⚠️ not configured'}
|
|
147
175
|
`);
|
|
176
|
+
if (info.hookActivity.length > 0) {
|
|
177
|
+
console.log(' Hook activity (last 7 days):');
|
|
178
|
+
for (const h of info.hookActivity) {
|
|
179
|
+
const last = h.lastInvokedAt ? formatRelativeTime(h.lastInvokedAt) : 'never';
|
|
180
|
+
const extracted = h.memoriesExtracted > 0
|
|
181
|
+
? `, extracted ${h.memoriesExtracted} memor${h.memoriesExtracted === 1 ? 'y' : 'ies'}`
|
|
182
|
+
: '';
|
|
183
|
+
console.log(` ${h.hookName.padEnd(14)} fired ${h.invocationCount}× — last ${last}${extracted}`);
|
|
184
|
+
}
|
|
185
|
+
console.log('');
|
|
186
|
+
}
|
|
148
187
|
if (!hooksConfigured) {
|
|
149
188
|
console.log(` ⚠️ Claude Code hooks are not set up. Memory won't auto-save or inject context.`);
|
|
150
189
|
console.log(` Run: shieldcortex install\n`);
|
|
@@ -3,21 +3,35 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
|
-
export function createOpenClawRuntime({
|
|
6
|
+
export function createOpenClawRuntime({
|
|
7
|
+
logPrefix = "[shieldcortex]",
|
|
8
|
+
configPath = path.join(homedir(), ".shieldcortex", "config.json"),
|
|
9
|
+
} = {}) {
|
|
7
10
|
let shieldConfig = null;
|
|
11
|
+
let shieldConfigMtime = 0;
|
|
8
12
|
let resolvedServerCmd = null;
|
|
9
13
|
let lastCallErrorType = null;
|
|
10
14
|
|
|
15
|
+
// mtime-gated cache: re-read on every call if the config file's modified
|
|
16
|
+
// time has advanced. Lets dashboard / CLI toggles take effect on the next
|
|
17
|
+
// event without an OpenClaw gateway restart.
|
|
11
18
|
async function loadShieldConfig() {
|
|
12
|
-
|
|
19
|
+
let mtime = 0;
|
|
20
|
+
try {
|
|
21
|
+
const stats = await fs.stat(configPath);
|
|
22
|
+
mtime = stats.mtimeMs;
|
|
23
|
+
} catch {
|
|
24
|
+
mtime = 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (shieldConfig && mtime === shieldConfigMtime) return shieldConfig;
|
|
13
28
|
|
|
14
29
|
try {
|
|
15
|
-
const configPath = path.join(homedir(), ".shieldcortex", "config.json");
|
|
16
30
|
shieldConfig = JSON.parse(await fs.readFile(configPath, "utf-8"));
|
|
17
31
|
} catch {
|
|
18
32
|
shieldConfig = {};
|
|
19
33
|
}
|
|
20
|
-
|
|
34
|
+
shieldConfigMtime = mtime;
|
|
21
35
|
return shieldConfig;
|
|
22
36
|
}
|
|
23
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shieldcortex",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"description": "Trustworthy memory and security for AI agents. Recall debugging, review queue, OpenClaw session capture, and memory poisoning defence for Claude Code, Codex, OpenClaw, LangChain, and MCP agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -156,6 +156,11 @@ const PLUGIN_CONFIG_JSON_SCHEMA = {
|
|
|
156
156
|
},
|
|
157
157
|
};
|
|
158
158
|
let _config = null;
|
|
159
|
+
// Identity of the shield config we last merged from. The runtime's
|
|
160
|
+
// loadShieldConfig() returns the same parsed object until the file's mtime
|
|
161
|
+
// advances; using reference equality lets us re-merge precisely when the
|
|
162
|
+
// underlying config has actually changed (dashboard / CLI write).
|
|
163
|
+
let _lastShieldConfigRef = null;
|
|
159
164
|
let _configOverride = null;
|
|
160
165
|
let _version = "0.0.0";
|
|
161
166
|
try {
|
|
@@ -229,16 +234,17 @@ function applyPluginConfigOverride(api) {
|
|
|
229
234
|
...(_configOverride ?? {}),
|
|
230
235
|
...pluginConfig,
|
|
231
236
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
237
|
+
// Override changed — invalidate so loadConfig() re-merges with new override.
|
|
238
|
+
_config = null;
|
|
239
|
+
_lastShieldConfigRef = null;
|
|
235
240
|
}
|
|
236
241
|
async function loadConfig() {
|
|
237
|
-
|
|
242
|
+
const shieldConfigRaw = await (await getRuntime()).loadShieldConfig();
|
|
243
|
+
if (_config && shieldConfigRaw === _lastShieldConfigRef)
|
|
238
244
|
return _config;
|
|
239
|
-
|
|
245
|
+
_lastShieldConfigRef = shieldConfigRaw;
|
|
240
246
|
_config = {
|
|
241
|
-
...
|
|
247
|
+
...normaliseConfig(shieldConfigRaw),
|
|
242
248
|
...(_configOverride ?? {}),
|
|
243
249
|
};
|
|
244
250
|
return _config;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "shieldcortex-realtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"name": "ShieldCortex Real-time Scanner",
|
|
5
5
|
"description": "Real-time defence scanning on LLM input, memory extraction on LLM output, and active tool call interception with approval gating.",
|
|
6
6
|
"kind": null,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
|
|
5
|
+
function getConfigPath() {
|
|
6
|
+
// Honour the same SHIELDCORTEX_CONFIG_DIR override that src/cloud/config.ts
|
|
7
|
+
// uses, so the runtime gate and the rest of the system always resolve to the
|
|
8
|
+
// same config file (and so tests can isolate via a temp dir).
|
|
9
|
+
const override = process.env.SHIELDCORTEX_CONFIG_DIR?.trim();
|
|
10
|
+
const dir = override || join(homedir(), '.shieldcortex');
|
|
11
|
+
return join(dir, 'config.json');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const DEFAULTS = Object.freeze({
|
|
15
|
+
maxTranscriptBytes: 1024 * 1024,
|
|
16
|
+
maxTranscriptLines: 5000,
|
|
17
|
+
keepSlashCommandProse: true,
|
|
18
|
+
stopHookSamplingTurns: 10,
|
|
19
|
+
stopHookWindowBytes: 256 * 1024,
|
|
20
|
+
enableSessionEnd: false,
|
|
21
|
+
enableStop: false,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function getAutoMemoryConfig() {
|
|
25
|
+
let raw = {};
|
|
26
|
+
try {
|
|
27
|
+
const configPath = getConfigPath();
|
|
28
|
+
if (existsSync(configPath)) {
|
|
29
|
+
raw = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
30
|
+
}
|
|
31
|
+
} catch {
|
|
32
|
+
// fall through to defaults
|
|
33
|
+
}
|
|
34
|
+
const overrides = (raw && typeof raw.autoMemory === 'object' && raw.autoMemory) || {};
|
|
35
|
+
return {
|
|
36
|
+
maxTranscriptBytes: pickPositiveInt(overrides.maxTranscriptBytes, DEFAULTS.maxTranscriptBytes),
|
|
37
|
+
maxTranscriptLines: pickPositiveInt(overrides.maxTranscriptLines, DEFAULTS.maxTranscriptLines),
|
|
38
|
+
keepSlashCommandProse: typeof overrides.keepSlashCommandProse === 'boolean'
|
|
39
|
+
? overrides.keepSlashCommandProse
|
|
40
|
+
: DEFAULTS.keepSlashCommandProse,
|
|
41
|
+
stopHookSamplingTurns: pickPositiveInt(overrides.stopHookSamplingTurns, DEFAULTS.stopHookSamplingTurns),
|
|
42
|
+
stopHookWindowBytes: pickPositiveInt(overrides.stopHookWindowBytes, DEFAULTS.stopHookWindowBytes),
|
|
43
|
+
enableSessionEnd: overrides.enableSessionEnd === true,
|
|
44
|
+
enableStop: overrides.enableStop === true,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function pickPositiveInt(value, fallback) {
|
|
49
|
+
if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
|
|
50
|
+
return Math.floor(value);
|
|
51
|
+
}
|
|
52
|
+
return fallback;
|
|
53
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook-invocation telemetry.
|
|
3
|
+
*
|
|
4
|
+
* Records every hook firing so `shieldcortex status` can show "fires but
|
|
5
|
+
* extracts nothing" failure modes (previously indistinguishable from
|
|
6
|
+
* "never fires"). Schema mirrors the migration in src/database/init.ts.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
let schemaEnsured = false;
|
|
10
|
+
|
|
11
|
+
function ensureSchema(db) {
|
|
12
|
+
if (schemaEnsured) return;
|
|
13
|
+
db.exec(`
|
|
14
|
+
CREATE TABLE IF NOT EXISTS hook_invocations (
|
|
15
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
16
|
+
hook_name TEXT NOT NULL,
|
|
17
|
+
invoked_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
18
|
+
exit_code INTEGER,
|
|
19
|
+
duration_ms INTEGER,
|
|
20
|
+
memories_extracted INTEGER DEFAULT 0,
|
|
21
|
+
transcript_bytes INTEGER,
|
|
22
|
+
notes TEXT
|
|
23
|
+
);
|
|
24
|
+
CREATE INDEX IF NOT EXISTS idx_hook_invocations_name_time ON hook_invocations(hook_name, invoked_at DESC);
|
|
25
|
+
`);
|
|
26
|
+
schemaEnsured = true;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Insert a single hook-invocation row. All fields except hook_name are
|
|
31
|
+
* optional. Wrapped in try/catch — telemetry must never block a hook.
|
|
32
|
+
*
|
|
33
|
+
* `invoked_at` is supplied as an explicit ISO-8601 UTC string (with `Z`)
|
|
34
|
+
* rather than relying on the SCHEMA's `datetime('now')` default — that
|
|
35
|
+
* default returns a naive `YYYY-MM-DD HH:MM:SS` string with no timezone,
|
|
36
|
+
* which JS Date() then interprets as local time and renders status
|
|
37
|
+
* timestamps off by the local UTC offset.
|
|
38
|
+
*/
|
|
39
|
+
export function recordHookInvocation(db, info) {
|
|
40
|
+
try {
|
|
41
|
+
ensureSchema(db);
|
|
42
|
+
db.prepare(`
|
|
43
|
+
INSERT INTO hook_invocations
|
|
44
|
+
(hook_name, invoked_at, exit_code, duration_ms, memories_extracted, transcript_bytes, notes)
|
|
45
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
46
|
+
`).run(
|
|
47
|
+
info.hookName,
|
|
48
|
+
new Date().toISOString(),
|
|
49
|
+
info.exitCode ?? null,
|
|
50
|
+
info.durationMs ?? null,
|
|
51
|
+
info.memoriesExtracted ?? 0,
|
|
52
|
+
info.transcriptBytes ?? null,
|
|
53
|
+
info.notes ?? null,
|
|
54
|
+
);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error(`[telemetry] Failed to record ${info?.hookName} invocation: ${err?.message}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { existsSync, openSync, readSync, closeSync, statSync } from 'fs';
|
|
2
|
+
import { homedir } from 'os';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_MAX_BYTES = 1024 * 1024;
|
|
5
|
+
const DEFAULT_MAX_LINES = 5000;
|
|
6
|
+
const SLASH_DROP_LEN = 200;
|
|
7
|
+
|
|
8
|
+
function isSingleLineSlashCommand(text) {
|
|
9
|
+
if (!text || text[0] !== '/') return false;
|
|
10
|
+
if (text.length >= SLASH_DROP_LEN) return false;
|
|
11
|
+
if (text.includes('\n')) return false;
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function extractText(content) {
|
|
16
|
+
if (typeof content === 'string') return content;
|
|
17
|
+
if (Array.isArray(content)) {
|
|
18
|
+
return content
|
|
19
|
+
.filter((c) => c && c.type === 'text' && typeof c.text === 'string')
|
|
20
|
+
.map((c) => c.text)
|
|
21
|
+
.join('\n');
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Read the tail of a Claude Code transcript JSONL and return the
|
|
28
|
+
* concatenated user+assistant text plus telemetry metadata.
|
|
29
|
+
*
|
|
30
|
+
* Replaces three duplicated readers in pre-compact-hook and session-end-hook
|
|
31
|
+
* that all hard-coded `slice(-50)` and a blanket `startsWith('/')` filter.
|
|
32
|
+
*
|
|
33
|
+
* @param {string|null|undefined} transcriptPath Path (may start with `~`).
|
|
34
|
+
* @param {object} [opts]
|
|
35
|
+
* @param {number} [opts.maxBytes=1MiB] Tail-byte ceiling — bounds memory on huge transcripts.
|
|
36
|
+
* @param {number} [opts.maxLines=5000] Hard line cap after JSONL parse.
|
|
37
|
+
* @param {boolean} [opts.keepSlashCommandProse=true]
|
|
38
|
+
* true → drop only single-line slash invocations under 200 chars
|
|
39
|
+
* false → drop any message starting with `/` (legacy strict)
|
|
40
|
+
* @returns {{ text: string, messageCount: number, bytesRead: number, rawLineCount: number }}
|
|
41
|
+
*/
|
|
42
|
+
export function readTranscriptText(transcriptPath, opts = {}) {
|
|
43
|
+
const empty = { text: '', messageCount: 0, bytesRead: 0, rawLineCount: 0 };
|
|
44
|
+
if (!transcriptPath || typeof transcriptPath !== 'string') return empty;
|
|
45
|
+
|
|
46
|
+
const resolvedPath = transcriptPath.replace(/^~/, homedir());
|
|
47
|
+
if (!existsSync(resolvedPath)) return empty;
|
|
48
|
+
|
|
49
|
+
const maxBytes = opts.maxBytes ?? DEFAULT_MAX_BYTES;
|
|
50
|
+
const maxLines = opts.maxLines ?? DEFAULT_MAX_LINES;
|
|
51
|
+
const keepSlashProse = opts.keepSlashCommandProse !== false;
|
|
52
|
+
|
|
53
|
+
let raw;
|
|
54
|
+
let bytesRead = 0;
|
|
55
|
+
let truncated = false;
|
|
56
|
+
try {
|
|
57
|
+
const stat = statSync(resolvedPath);
|
|
58
|
+
const fileSize = stat.size;
|
|
59
|
+
bytesRead = Math.min(fileSize, Math.max(0, maxBytes));
|
|
60
|
+
truncated = bytesRead < fileSize;
|
|
61
|
+
|
|
62
|
+
if (bytesRead === 0) return empty;
|
|
63
|
+
|
|
64
|
+
const fd = openSync(resolvedPath, 'r');
|
|
65
|
+
try {
|
|
66
|
+
const buf = Buffer.alloc(bytesRead);
|
|
67
|
+
readSync(fd, buf, 0, bytesRead, fileSize - bytesRead);
|
|
68
|
+
raw = buf.toString('utf-8');
|
|
69
|
+
} finally {
|
|
70
|
+
closeSync(fd);
|
|
71
|
+
}
|
|
72
|
+
} catch {
|
|
73
|
+
return empty;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let lines = raw.split('\n');
|
|
77
|
+
// If we sliced from the middle of the file, the first line is likely a
|
|
78
|
+
// partial JSON fragment — drop it rather than emit a parse error.
|
|
79
|
+
if (truncated && lines.length > 0) {
|
|
80
|
+
lines = lines.slice(1);
|
|
81
|
+
}
|
|
82
|
+
// Trim a trailing empty line from a clean newline-terminated file.
|
|
83
|
+
if (lines.length > 0 && lines[lines.length - 1] === '') {
|
|
84
|
+
lines = lines.slice(0, -1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Hard cap: keep the most recent N lines.
|
|
88
|
+
if (lines.length > maxLines) {
|
|
89
|
+
lines = lines.slice(lines.length - maxLines);
|
|
90
|
+
}
|
|
91
|
+
const rawLineCount = lines.length;
|
|
92
|
+
|
|
93
|
+
const messages = [];
|
|
94
|
+
for (const line of lines) {
|
|
95
|
+
if (!line) continue;
|
|
96
|
+
let entry;
|
|
97
|
+
try {
|
|
98
|
+
entry = JSON.parse(line);
|
|
99
|
+
} catch {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const role = entry.type || entry.message?.role;
|
|
103
|
+
if (role !== 'user' && role !== 'assistant') continue;
|
|
104
|
+
|
|
105
|
+
const text = extractText(entry.message?.content);
|
|
106
|
+
if (!text) continue;
|
|
107
|
+
|
|
108
|
+
if (keepSlashProse) {
|
|
109
|
+
if (isSingleLineSlashCommand(text)) continue;
|
|
110
|
+
} else if (text[0] === '/') {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
messages.push(text);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
text: messages.join('\n\n'),
|
|
119
|
+
messageCount: messages.length,
|
|
120
|
+
bytesRead,
|
|
121
|
+
rawLineCount,
|
|
122
|
+
};
|
|
123
|
+
}
|