@listeningkit/log 0.4.0 → 0.4.1-nightly.202611211641.04abfce
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/docs/guides/runsAndEvidence.md +3 -3
- package/docs/platforms/discord/operations.json +0 -1
- package/docs/platforms/facebook/operations.json +0 -1
- package/docs/platforms/instagram/operations.json +0 -1
- package/docs/platforms/linkedin/operations.json +0 -1
- package/docs/platforms/reddit/operations.json +0 -1
- package/docs/platforms/slack/operations.json +0 -1
- package/docs/relate/demoGraph.rl +0 -0
- package/docs/relateGraph.md +24 -9
- package/docs/specs/README.md +6 -2
- package/docs/specs/relateGraph.md +31 -5
- package/docs/specs/runsAndRea.md +1 -1
- package/docs/specs/updates.md +1 -1
- package/hermesPlugin/dashboard/manifest.json +1 -1
- package/hermesPlugin/plugin.yaml +1 -1
- package/package.json +1 -1
- package/scripts/checks/agnosticBaseline.json +1 -1
- package/scripts/checks/checkClientDocs.mjs +4 -18
- package/skills/runs/SKILL.md +3 -3
- package/src/browser/runStore/client.ts +11 -8
- package/src/browser/runStore/index.ts +1 -0
- package/src/browser/runStore/types.ts +2 -0
- package/src/cli/capture/index.ts +7 -5
- package/src/cli/relate/index.ts +9 -3
- package/src/cli/runs/index.ts +2 -1
- package/src/rea/facebookClient/client.ts +2 -2
- package/src/rea/platformClient/client.ts +1 -1
- package/src/relate/graph/client.ts +82 -21
- package/src/relate/graph/fixtures/connectedWorld.ts +68 -0
- package/src/relate/graph/fixtures/demoWorld.ts +1 -1
- package/src/relate/graph/helpers/mentions.ts +20 -1
- package/src/relate/graph/helpers/project.ts +150 -13
- package/src/relate/graph/types.ts +55 -3
- package/src/release/postInstall/helpers/effects.ts +6 -0
- package/src/release/postInstall/types.ts +2 -1
- package/src/specs/relateGraph/index.ts +34 -5
- package/src/specs/runsAndRea/index.ts +2 -2
- package/src/storage/engineStore/types.ts +2 -1
- package/vendor/diagram/LICENSE +21 -0
- package/vendor/diagram/SKILL.md +385 -0
- package/vendor/diagram/THIRD_PARTY_LICENSES.md +51 -0
- package/vendor/diagram/assets/example-arc-diagram-dark.html +111 -0
- package/vendor/diagram/assets/example-arc-diagram-full.html +143 -0
- package/vendor/diagram/assets/example-arc-diagram.html +111 -0
- package/vendor/diagram/assets/example-architecture-containment-dark.html +205 -0
- package/vendor/diagram/assets/example-architecture-containment-full.html +224 -0
- package/vendor/diagram/assets/example-architecture-containment.html +205 -0
- package/vendor/diagram/assets/example-architecture-dark.html +182 -0
- package/vendor/diagram/assets/example-architecture-delta-dark.html +193 -0
- package/vendor/diagram/assets/example-architecture-delta-full.html +210 -0
- package/vendor/diagram/assets/example-architecture-delta.html +193 -0
- package/vendor/diagram/assets/example-architecture-full.html +194 -0
- package/vendor/diagram/assets/example-architecture.html +183 -0
- package/vendor/diagram/assets/example-axonometric-plan-campus-animated.html +442 -0
- package/vendor/diagram/assets/example-axonometric-plan-campus-dark.html +108 -0
- package/vendor/diagram/assets/example-axonometric-plan-campus-full.html +107 -0
- package/vendor/diagram/assets/example-axonometric-plan-campus.html +108 -0
- package/vendor/diagram/assets/example-axonometric-plan-coffee-shop-animated.html +448 -0
- package/vendor/diagram/assets/example-axonometric-plan-coffee-shop-dark.html +121 -0
- package/vendor/diagram/assets/example-axonometric-plan-coffee-shop-full.html +120 -0
- package/vendor/diagram/assets/example-axonometric-plan-coffee-shop.html +121 -0
- package/vendor/diagram/assets/example-axonometric-plan-dark.html +114 -0
- package/vendor/diagram/assets/example-axonometric-plan-full.html +113 -0
- package/vendor/diagram/assets/example-axonometric-plan-warehouse-animated.html +448 -0
- package/vendor/diagram/assets/example-axonometric-plan-warehouse-dark.html +127 -0
- package/vendor/diagram/assets/example-axonometric-plan-warehouse-full.html +126 -0
- package/vendor/diagram/assets/example-axonometric-plan-warehouse.html +127 -0
- package/vendor/diagram/assets/example-axonometric-plan.html +114 -0
- package/vendor/diagram/assets/example-bar-dark.html +129 -0
- package/vendor/diagram/assets/example-bar-full.html +105 -0
- package/vendor/diagram/assets/example-bar.html +129 -0
- package/vendor/diagram/assets/example-beeswarm-dark.html +384 -0
- package/vendor/diagram/assets/example-beeswarm-full.html +416 -0
- package/vendor/diagram/assets/example-beeswarm.html +384 -0
- package/vendor/diagram/assets/example-box-plot-dark.html +127 -0
- package/vendor/diagram/assets/example-box-plot-full.html +159 -0
- package/vendor/diagram/assets/example-box-plot.html +127 -0
- package/vendor/diagram/assets/example-bubble-dark.html +147 -0
- package/vendor/diagram/assets/example-bubble-full.html +177 -0
- package/vendor/diagram/assets/example-bubble.html +147 -0
- package/vendor/diagram/assets/example-bump-dark.html +142 -0
- package/vendor/diagram/assets/example-bump-full.html +172 -0
- package/vendor/diagram/assets/example-bump.html +142 -0
- package/vendor/diagram/assets/example-data-flow-dark.html +143 -0
- package/vendor/diagram/assets/example-data-flow-full.html +185 -0
- package/vendor/diagram/assets/example-data-flow.html +143 -0
- package/vendor/diagram/assets/example-datalake-dark.html +243 -0
- package/vendor/diagram/assets/example-datalake-full.html +248 -0
- package/vendor/diagram/assets/example-datalake.html +269 -0
- package/vendor/diagram/assets/example-db-schema-dark.html +302 -0
- package/vendor/diagram/assets/example-db-schema-full.html +305 -0
- package/vendor/diagram/assets/example-db-schema.html +302 -0
- package/vendor/diagram/assets/example-dependency-dark.html +224 -0
- package/vendor/diagram/assets/example-dependency-full.html +227 -0
- package/vendor/diagram/assets/example-dependency.html +224 -0
- package/vendor/diagram/assets/example-deployment-dark.html +190 -0
- package/vendor/diagram/assets/example-deployment-full.html +202 -0
- package/vendor/diagram/assets/example-deployment.html +190 -0
- package/vendor/diagram/assets/example-dp-integration-dark.html +81 -0
- package/vendor/diagram/assets/example-dp-integration-full.html +91 -0
- package/vendor/diagram/assets/example-dp-integration.html +81 -0
- package/vendor/diagram/assets/example-dp-security-matrix-dark.html +31 -0
- package/vendor/diagram/assets/example-dp-security-matrix-full.html +32 -0
- package/vendor/diagram/assets/example-dp-security-matrix.html +88 -0
- package/vendor/diagram/assets/example-er-dark.html +202 -0
- package/vendor/diagram/assets/example-er-full.html +205 -0
- package/vendor/diagram/assets/example-er.html +202 -0
- package/vendor/diagram/assets/example-event-modeling-dark.html +64 -0
- package/vendor/diagram/assets/example-event-modeling-full.html +64 -0
- package/vendor/diagram/assets/example-event-modeling.html +64 -0
- package/vendor/diagram/assets/example-exploded-ai-stack-animated.html +438 -0
- package/vendor/diagram/assets/example-exploded-ai-stack-dark.html +85 -0
- package/vendor/diagram/assets/example-exploded-ai-stack-full.html +84 -0
- package/vendor/diagram/assets/example-exploded-ai-stack.html +85 -0
- package/vendor/diagram/assets/example-exploded-dark.html +83 -0
- package/vendor/diagram/assets/example-exploded-full.html +82 -0
- package/vendor/diagram/assets/example-exploded-keyboard-animated.html +437 -0
- package/vendor/diagram/assets/example-exploded-keyboard-dark.html +84 -0
- package/vendor/diagram/assets/example-exploded-keyboard-full.html +83 -0
- package/vendor/diagram/assets/example-exploded-keyboard.html +84 -0
- package/vendor/diagram/assets/example-exploded-phone-animated.html +436 -0
- package/vendor/diagram/assets/example-exploded-phone-dark.html +83 -0
- package/vendor/diagram/assets/example-exploded-phone-full.html +82 -0
- package/vendor/diagram/assets/example-exploded-phone.html +83 -0
- package/vendor/diagram/assets/example-exploded-unboxing-animated.html +437 -0
- package/vendor/diagram/assets/example-exploded-unboxing-dark.html +84 -0
- package/vendor/diagram/assets/example-exploded-unboxing-full.html +83 -0
- package/vendor/diagram/assets/example-exploded-unboxing.html +84 -0
- package/vendor/diagram/assets/example-exploded.html +83 -0
- package/vendor/diagram/assets/example-fishbone-dark.html +152 -0
- package/vendor/diagram/assets/example-fishbone-full.html +146 -0
- package/vendor/diagram/assets/example-fishbone.html +152 -0
- package/vendor/diagram/assets/example-flowchart-dark.html +163 -0
- package/vendor/diagram/assets/example-flowchart-full.html +160 -0
- package/vendor/diagram/assets/example-flowchart.html +163 -0
- package/vendor/diagram/assets/example-gantt-dark.html +137 -0
- package/vendor/diagram/assets/example-gantt-full.html +127 -0
- package/vendor/diagram/assets/example-gantt.html +137 -0
- package/vendor/diagram/assets/example-heatmap-dark.html +224 -0
- package/vendor/diagram/assets/example-heatmap-full.html +270 -0
- package/vendor/diagram/assets/example-heatmap.html +224 -0
- package/vendor/diagram/assets/example-high-level-dark.html +251 -0
- package/vendor/diagram/assets/example-high-level-full.html +247 -0
- package/vendor/diagram/assets/example-high-level-vertical-dark.html +274 -0
- package/vendor/diagram/assets/example-high-level-vertical-full.html +252 -0
- package/vendor/diagram/assets/example-high-level-vertical.html +325 -0
- package/vendor/diagram/assets/example-high-level.html +301 -0
- package/vendor/diagram/assets/example-import-drawio.html +185 -0
- package/vendor/diagram/assets/example-import-excalidraw.html +70 -0
- package/vendor/diagram/assets/example-import-mermaid.html +70 -0
- package/vendor/diagram/assets/example-import-plantuml.html +107 -0
- package/vendor/diagram/assets/example-it-state-dark.html +90 -0
- package/vendor/diagram/assets/example-it-state-full.html +69 -0
- package/vendor/diagram/assets/example-it-state.html +128 -0
- package/vendor/diagram/assets/example-journey-dark.html +148 -0
- package/vendor/diagram/assets/example-journey-full.html +142 -0
- package/vendor/diagram/assets/example-journey.html +148 -0
- package/vendor/diagram/assets/example-kanban-dark.html +174 -0
- package/vendor/diagram/assets/example-kanban-full.html +178 -0
- package/vendor/diagram/assets/example-kanban.html +174 -0
- package/vendor/diagram/assets/example-layers-dark.html +123 -0
- package/vendor/diagram/assets/example-layers-full.html +126 -0
- package/vendor/diagram/assets/example-layers.html +123 -0
- package/vendor/diagram/assets/example-line-dark.html +111 -0
- package/vendor/diagram/assets/example-line-full.html +105 -0
- package/vendor/diagram/assets/example-line.html +111 -0
- package/vendor/diagram/assets/example-loop-dark.html +100 -0
- package/vendor/diagram/assets/example-loop-full.html +137 -0
- package/vendor/diagram/assets/example-loop-terminal.html +347 -0
- package/vendor/diagram/assets/example-loop.html +100 -0
- package/vendor/diagram/assets/example-marimekko-dark.html +148 -0
- package/vendor/diagram/assets/example-marimekko-full.html +172 -0
- package/vendor/diagram/assets/example-marimekko.html +148 -0
- package/vendor/diagram/assets/example-medallion-dark.html +159 -0
- package/vendor/diagram/assets/example-medallion-full.html +201 -0
- package/vendor/diagram/assets/example-medallion.html +159 -0
- package/vendor/diagram/assets/example-nested-dark.html +132 -0
- package/vendor/diagram/assets/example-nested-full.html +135 -0
- package/vendor/diagram/assets/example-nested.html +136 -0
- package/vendor/diagram/assets/example-org-chart-dark.html +45 -0
- package/vendor/diagram/assets/example-org-chart-full.html +45 -0
- package/vendor/diagram/assets/example-org-chart.html +45 -0
- package/vendor/diagram/assets/example-paved-road-animated.html +546 -0
- package/vendor/diagram/assets/example-polar-dark.html +116 -0
- package/vendor/diagram/assets/example-polar-full.html +147 -0
- package/vendor/diagram/assets/example-polar.html +116 -0
- package/vendor/diagram/assets/example-policy-trace-animated.html +490 -0
- package/vendor/diagram/assets/example-process-dark.html +64 -0
- package/vendor/diagram/assets/example-process-full.html +74 -0
- package/vendor/diagram/assets/example-process.html +64 -0
- package/vendor/diagram/assets/example-pyramid-dark.html +119 -0
- package/vendor/diagram/assets/example-pyramid-full.html +122 -0
- package/vendor/diagram/assets/example-pyramid.html +119 -0
- package/vendor/diagram/assets/example-quadrant-consultant.html +166 -0
- package/vendor/diagram/assets/example-quadrant-dark.html +135 -0
- package/vendor/diagram/assets/example-quadrant-full.html +138 -0
- package/vendor/diagram/assets/example-quadrant.html +135 -0
- package/vendor/diagram/assets/example-queue-animated.html +577 -0
- package/vendor/diagram/assets/example-radar-dark.html +139 -0
- package/vendor/diagram/assets/example-radar-full.html +135 -0
- package/vendor/diagram/assets/example-radar.html +139 -0
- package/vendor/diagram/assets/example-requirement-traceability-dark.html +122 -0
- package/vendor/diagram/assets/example-requirement-traceability-full.html +126 -0
- package/vendor/diagram/assets/example-requirement-traceability.html +122 -0
- package/vendor/diagram/assets/example-ridgeline-dark.html +104 -0
- package/vendor/diagram/assets/example-ridgeline-full.html +134 -0
- package/vendor/diagram/assets/example-ridgeline.html +104 -0
- package/vendor/diagram/assets/example-sankey-dark.html +150 -0
- package/vendor/diagram/assets/example-sankey-full.html +151 -0
- package/vendor/diagram/assets/example-sankey.html +150 -0
- package/vendor/diagram/assets/example-sbgn-dark.html +213 -0
- package/vendor/diagram/assets/example-sbgn-full.html +232 -0
- package/vendor/diagram/assets/example-sbgn.html +213 -0
- package/vendor/diagram/assets/example-scatter-dark.html +141 -0
- package/vendor/diagram/assets/example-scatter-full.html +116 -0
- package/vendor/diagram/assets/example-scatter.html +141 -0
- package/vendor/diagram/assets/example-schedule-network-dark.html +15 -0
- package/vendor/diagram/assets/example-schedule-network-full.html +15 -0
- package/vendor/diagram/assets/example-schedule-network.html +15 -0
- package/vendor/diagram/assets/example-sequence-dark.html +222 -0
- package/vendor/diagram/assets/example-sequence-full.html +388 -0
- package/vendor/diagram/assets/example-sequence-oauth-dark.html +188 -0
- package/vendor/diagram/assets/example-sequence-oauth-full.html +350 -0
- package/vendor/diagram/assets/example-sequence-oauth.html +227 -0
- package/vendor/diagram/assets/example-sequence.html +222 -0
- package/vendor/diagram/assets/example-service-blueprint-dark.html +170 -0
- package/vendor/diagram/assets/example-service-blueprint-full.html +263 -0
- package/vendor/diagram/assets/example-service-blueprint.html +185 -0
- package/vendor/diagram/assets/example-slopegraph-dark.html +119 -0
- package/vendor/diagram/assets/example-slopegraph-full.html +149 -0
- package/vendor/diagram/assets/example-slopegraph.html +119 -0
- package/vendor/diagram/assets/example-state-dark.html +147 -0
- package/vendor/diagram/assets/example-state-full.html +150 -0
- package/vendor/diagram/assets/example-state-lifecycle-dark.html +88 -0
- package/vendor/diagram/assets/example-state-lifecycle-full.html +112 -0
- package/vendor/diagram/assets/example-state-lifecycle.html +92 -0
- package/vendor/diagram/assets/example-state.html +147 -0
- package/vendor/diagram/assets/example-steps-dark.html +67 -0
- package/vendor/diagram/assets/example-steps-full.html +47 -0
- package/vendor/diagram/assets/example-steps.html +78 -0
- package/vendor/diagram/assets/example-story-map-dark.html +184 -0
- package/vendor/diagram/assets/example-story-map-full.html +188 -0
- package/vendor/diagram/assets/example-story-map.html +184 -0
- package/vendor/diagram/assets/example-streamgraph-dark.html +99 -0
- package/vendor/diagram/assets/example-streamgraph-full.html +129 -0
- package/vendor/diagram/assets/example-streamgraph.html +99 -0
- package/vendor/diagram/assets/example-swimlane-dark.html +172 -0
- package/vendor/diagram/assets/example-swimlane-full.html +175 -0
- package/vendor/diagram/assets/example-swimlane.html +172 -0
- package/vendor/diagram/assets/example-timeline-dark.html +135 -0
- package/vendor/diagram/assets/example-timeline-full.html +138 -0
- package/vendor/diagram/assets/example-timeline.html +135 -0
- package/vendor/diagram/assets/example-tree-block-decomposition-dark.html +151 -0
- package/vendor/diagram/assets/example-tree-block-decomposition-full.html +154 -0
- package/vendor/diagram/assets/example-tree-block-decomposition.html +151 -0
- package/vendor/diagram/assets/example-tree-dark.html +173 -0
- package/vendor/diagram/assets/example-tree-full.html +176 -0
- package/vendor/diagram/assets/example-tree.html +173 -0
- package/vendor/diagram/assets/example-treemap-dark.html +107 -0
- package/vendor/diagram/assets/example-treemap-full.html +134 -0
- package/vendor/diagram/assets/example-treemap.html +107 -0
- package/vendor/diagram/assets/example-uml-class-dark.html +188 -0
- package/vendor/diagram/assets/example-uml-class-full.html +191 -0
- package/vendor/diagram/assets/example-uml-class.html +188 -0
- package/vendor/diagram/assets/example-unit-grid-dark.html +141 -0
- package/vendor/diagram/assets/example-unit-grid-full.html +146 -0
- package/vendor/diagram/assets/example-unit-grid.html +141 -0
- package/vendor/diagram/assets/example-venn-dark.html +132 -0
- package/vendor/diagram/assets/example-venn-full.html +135 -0
- package/vendor/diagram/assets/example-venn.html +110 -0
- package/vendor/diagram/assets/example-wardley-dark.html +153 -0
- package/vendor/diagram/assets/example-wardley-full.html +146 -0
- package/vendor/diagram/assets/example-wardley.html +153 -0
- package/vendor/diagram/assets/example-waterfall-dark.html +129 -0
- package/vendor/diagram/assets/example-waterfall-full.html +106 -0
- package/vendor/diagram/assets/example-waterfall.html +129 -0
- package/vendor/diagram/assets/icons.html +230 -0
- package/vendor/diagram/assets/index.html +709 -0
- package/vendor/diagram/assets/template-dark.html +99 -0
- package/vendor/diagram/assets/template-full.html +421 -0
- package/vendor/diagram/assets/template-motion.html +448 -0
- package/vendor/diagram/assets/template-terminal.html +188 -0
- package/vendor/diagram/assets/template.html +100 -0
- package/vendor/diagram/references/animation.md +143 -0
- package/vendor/diagram/references/doctor.md +130 -0
- package/vendor/diagram/references/export-registry.md +78 -0
- package/vendor/diagram/references/export.md +378 -0
- package/vendor/diagram/references/import-drawio.md +181 -0
- package/vendor/diagram/references/import-excalidraw.md +130 -0
- package/vendor/diagram/references/import-mermaid.md +150 -0
- package/vendor/diagram/references/import-plantuml.md +133 -0
- package/vendor/diagram/references/layout-budget.md +104 -0
- package/vendor/diagram/references/onboarding.md +368 -0
- package/vendor/diagram/references/output-spec.md +277 -0
- package/vendor/diagram/references/primitive-annotation.md +36 -0
- package/vendor/diagram/references/primitive-icons.md +827 -0
- package/vendor/diagram/references/primitive-sketchy.md +43 -0
- package/vendor/diagram/references/primitive-terminal.md +76 -0
- package/vendor/diagram/references/primitives-core.md +146 -0
- package/vendor/diagram/references/profiles.md +183 -0
- package/vendor/diagram/references/semantic-patterns.md +154 -0
- package/vendor/diagram/references/style-guide.md +232 -0
- package/vendor/diagram/references/type-architecture-delta.md +143 -0
- package/vendor/diagram/references/type-architecture.md +117 -0
- package/vendor/diagram/references/type-axonometric-plan.md +83 -0
- package/vendor/diagram/references/type-bar.md +108 -0
- package/vendor/diagram/references/type-data-flow.md +371 -0
- package/vendor/diagram/references/type-db-schema.md +48 -0
- package/vendor/diagram/references/type-dependency.md +115 -0
- package/vendor/diagram/references/type-deployment.md +45 -0
- package/vendor/diagram/references/type-dp-integration.md +407 -0
- package/vendor/diagram/references/type-dp-security-matrix.md +379 -0
- package/vendor/diagram/references/type-er.md +25 -0
- package/vendor/diagram/references/type-event-modeling.md +36 -0
- package/vendor/diagram/references/type-exploded.md +115 -0
- package/vendor/diagram/references/type-fishbone.md +75 -0
- package/vendor/diagram/references/type-flowchart.md +23 -0
- package/vendor/diagram/references/type-gantt.md +47 -0
- package/vendor/diagram/references/type-heatmap.md +80 -0
- package/vendor/diagram/references/type-high-level.md +470 -0
- package/vendor/diagram/references/type-it-state.md +468 -0
- package/vendor/diagram/references/type-journey.md +55 -0
- package/vendor/diagram/references/type-kanban.md +49 -0
- package/vendor/diagram/references/type-layers.md +26 -0
- package/vendor/diagram/references/type-line.md +337 -0
- package/vendor/diagram/references/type-loop.md +223 -0
- package/vendor/diagram/references/type-medallion.md +356 -0
- package/vendor/diagram/references/type-nested.md +22 -0
- package/vendor/diagram/references/type-org-chart.md +44 -0
- package/vendor/diagram/references/type-polar.md +136 -0
- package/vendor/diagram/references/type-process.md +490 -0
- package/vendor/diagram/references/type-pyramid.md +33 -0
- package/vendor/diagram/references/type-quadrant.md +81 -0
- package/vendor/diagram/references/type-radar.md +82 -0
- package/vendor/diagram/references/type-requirement-traceability.md +45 -0
- package/vendor/diagram/references/type-sankey.md +75 -0
- package/vendor/diagram/references/type-sbgn.md +80 -0
- package/vendor/diagram/references/type-scatter.md +276 -0
- package/vendor/diagram/references/type-schedule-network.md +146 -0
- package/vendor/diagram/references/type-sequence.md +130 -0
- package/vendor/diagram/references/type-service-blueprint.md +103 -0
- package/vendor/diagram/references/type-state.md +30 -0
- package/vendor/diagram/references/type-steps.md +180 -0
- package/vendor/diagram/references/type-story-map.md +46 -0
- package/vendor/diagram/references/type-swimlane.md +22 -0
- package/vendor/diagram/references/type-timeline.md +20 -0
- package/vendor/diagram/references/type-tree.md +24 -0
- package/vendor/diagram/references/type-treemap.md +137 -0
- package/vendor/diagram/references/type-uml-class.md +65 -0
- package/vendor/diagram/references/type-unit-grid.md +63 -0
- package/vendor/diagram/references/type-venn.md +26 -0
- package/vendor/diagram/references/type-wardley.md +39 -0
- package/vendor/diagram/references/type-waterfall.md +75 -0
- package/vendor/diagram/scripts/drawio_extract.py +995 -0
- package/vendor/diagram/scripts/excalidraw_extract.py +736 -0
- package/vendor/diagram/scripts/export_png.py +93 -0
- package/vendor/diagram/scripts/export_svg.py +1624 -0
- package/vendor/diagram/scripts/mermaid_extract.py +2060 -0
- package/vendor/diagram/scripts/plantuml_extract.py +2118 -0
- package/vendor/diagram/scripts/self_check.py +1177 -0
- package/vendor/diagram/scripts/verify_geometry.py +696 -0
|
@@ -63,12 +63,12 @@ an inspect run up to 1.4 GB. On 2026-10-22 they reached 12.5 GB, the disk had
|
|
|
63
63
|
|
|
64
64
|
1. **Analyse** (rule 25): a run may go only when rea settled it
|
|
65
65
|
(`settle.json`: every step read, findings.md written) and the request docs
|
|
66
|
-
hold its requests (`docs
|
|
66
|
+
hold its requests (`log capture docs` ran after it, kept in log.db).
|
|
67
67
|
- Not settled: `log capture settle <its capture folder>`.
|
|
68
68
|
- Not in the docs: `log capture docs`, then write any request's
|
|
69
69
|
reasoning it asks for.
|
|
70
|
-
2. **Look:** `log runs` lists each run with `may go` or why it is kept
|
|
71
|
-
|
|
70
|
+
2. **Look:** `log runs` lists each run with `may go` or why it is kept, and
|
|
71
|
+
counts those not in the docs.
|
|
72
72
|
3. **Prune:** `log runs prune --apply` (`--before <YYYY-MM-DD>` keeps the
|
|
73
73
|
runs from that day on). First it takes every step's internal API calls
|
|
74
74
|
out of its HAR (`exchanges.json`: what was sent and what came back, rule
|
package/docs/relate/demoGraph.rl
CHANGED
|
Binary file
|
package/docs/relateGraph.md
CHANGED
|
@@ -19,7 +19,7 @@ answerEvent → relateAnswer → relateContext ──► current graph-<seq>.rl
|
|
|
19
19
|
## How it uses Relate
|
|
20
20
|
|
|
21
21
|
- **Mode: single file.** Each build writes a new `graph-<throughSeq>-<ms>.rl` beside log.db (`~/.logCli/relate/`), and log.db's `state` table points at the current one. A single file is one immutable snapshot: it is written whole, checkpointed, and only then pointed at, so a reader never sees half a graph. It can be copied, inspected with the `relate` CLI, or thrown away.
|
|
22
|
-
- **Why not one long-lived store:** Relate is single-process with one writer, and on Windows a second process can't open a store another process is writing. log has many processes (the MCP server, the context service, every hook, the account owners), so the writer is a short-lived build process and everyone else opens finished snapshots read-only.
|
|
22
|
+
- **Why not one long-lived store:** Relate is single-process with one writer, and on Windows a second process can't open a store another process is writing. log has many processes (the MCP server, the context service, every hook, the account owners), so the writer is a short-lived build process and everyone else opens finished snapshots read-only. Even a finished file can't be opened read-only while any process still holds it writable (the engine answers `internal error`), so `buildGraph` always writes in its own child process, which exits and lets go. A file that still can't be opened is a coded `graphUnreadable` outcome, never a hook error.
|
|
23
23
|
- **Embedded:** `@relate/relate` runs in the same Bun process as the hook through its C ABI (koffi). No server. Per Relate's ADR-0079, only the CLI binary sends anonymous usage metrics; the embedded library never phones home.
|
|
24
24
|
|
|
25
25
|
## What the graph models
|
|
@@ -28,7 +28,9 @@ answerEvent → relateAnswer → relateContext ──► current graph-<seq>.rl
|
|
|
28
28
|
| --- | --- | --- |
|
|
29
29
|
| `Account` | `platform:account` | `accounts`, `chats` |
|
|
30
30
|
| `Identity` | `platform:userId` | `identities`, `handleAliases` (handle, name and aliases copied for lookup; `owner` marks the owner's own ids) |
|
|
31
|
-
| `Room` | `chatId` | `chats` (DM, group, channel) |
|
|
31
|
+
| `Room` | `chatId` | `chats` (DM, group, channel), with the channel's own name and server from the Discord channel catalog (`engineState`) |
|
|
32
|
+
| `Server` | `platform:server:<id>` | `chats.serverId`, named from the catalog |
|
|
33
|
+
| `Person` | `person:<personId>` | `persons`, `identityLinks` (from `log people link`) |
|
|
32
34
|
| `Post` | `platform:account:targetRef` | `interactions.targetRef`, `targetText` |
|
|
33
35
|
| `Snapshot` | `snapshot` | the event `seq`, schema and projector version it was built from |
|
|
34
36
|
|
|
@@ -36,7 +38,11 @@ answerEvent → relateAnswer → relateContext ──► current graph-<seq>.rl
|
|
|
36
38
|
| --- | --- | --- |
|
|
37
39
|
| `(Account)-[:HAS_ROOM]->(Room)` | the account sees this chat | `chats` |
|
|
38
40
|
| `(Identity)-[:MEMBER_OF]->(Room)` | they are in it | `memberships` |
|
|
39
|
-
| `(Identity\|Account)-[:SAID {messages, lastAtMs}]->(Room)` | how much each side said there | `messages`, counted |
|
|
41
|
+
| `(Identity\|Account)-[:SAID {messages, firstAtMs, lastAtMs}]->(Room)` | how much each side said there, and when | `messages`, counted |
|
|
42
|
+
| `(Identity\|Account)-[:REPLIED_TO {room, times, firstAtMs, lastAtMs}]->(Identity\|Account)` | who replied to whom, the owner's side being the room's account | `messages.replyToKey` |
|
|
43
|
+
| `(Identity\|Account)-[:MENTIONED {room, times, firstAtMs, lastAtMs}]->(Identity\|Account)` | who named whom (`<@id>`, `@handle`) | `messages.text` |
|
|
44
|
+
| `(Room)-[:IN_SERVER]->(Server)` | the channel's server | `chats.serverId` |
|
|
45
|
+
| `(Identity)-[:LINKED_TO {linkedBy, linkedAt}]->(Person)` | identities the owner linked as one person | `identityLinks` |
|
|
40
46
|
| `(Identity)-[:ENGAGED {kind, times, lastAtMs}]->(Post)` | like, reply, repost, quote, mention | `interactions` |
|
|
41
47
|
| `(Identity)-[:FOLLOWED]->(Account)` | a follow | `interactions` |
|
|
42
48
|
| `(Account)-[:POSTED]->(Post)` | the owner's post | `interactions` |
|
|
@@ -45,15 +51,16 @@ Message text stays in log.db. The graph holds counts and times, plus the post te
|
|
|
45
51
|
|
|
46
52
|
## The questions it answers
|
|
47
53
|
|
|
48
|
-
For each person a prompt names (`@handle`,
|
|
54
|
+
For each person a prompt names (`@handle`, a known handle without the @, or a display name the way `saidBy` matches one, e.g. `@Max Current` or `Design bakery`), from their node outwards:
|
|
49
55
|
|
|
50
56
|
1. **Talks:** which of the owner's accounts chat with them and how much each side said.
|
|
51
57
|
2. **Engaged the owner:** what they liked, replied to, reposted or followed, and when.
|
|
52
|
-
3. **
|
|
53
|
-
4. **
|
|
54
|
-
5. **
|
|
58
|
+
3. **Replied to or mentioned the owner:** where, how often and when last.
|
|
59
|
+
4. **In groups:** the groups and channels they are in, as `Server #channel`.
|
|
60
|
+
5. **Who could introduce:** people in those groups whom the owner already has a DM with (2 hops: person → room → member → DM room).
|
|
61
|
+
6. **Same orbit:** others who engaged the same posts (person → post → person).
|
|
55
62
|
|
|
56
|
-
Identities on one platform with the same handle are merged (a handle seen before its numeric id was known). Nobody named means no context: silence beats a guess.
|
|
63
|
+
Identities on one platform with the same handle are merged (a handle seen before its numeric id was known), and identities linked to one `Person` are one person across platforms. Nobody named means no context: silence beats a guess.
|
|
57
64
|
|
|
58
65
|
## Setup and run
|
|
59
66
|
|
|
@@ -66,7 +73,14 @@ log relate ask "intro me to @someone"
|
|
|
66
73
|
log relate query "MATCH (i:Identity)-[e:ENGAGED]->(p:Post) RETURN i.handle, e.kind, p.text LIMIT 5"
|
|
67
74
|
```
|
|
68
75
|
|
|
69
|
-
Over MCP these are `relateBuild`, `relateStatus`, `relateVerify`, `relateAsk` and `relateQuery`.
|
|
76
|
+
Over MCP these are `relateBuild`, `relateStatus`, `relateVerify`, `relateAsk` and `relateQuery`. Install and `log update` build it once (the `relateGraph` after-install step, right after migrations). After that the hook keeps it fresh: it answers from the current graph and starts a rebuild in the background when log.db has moved on (at most once a minute; a build of the real log.db takes about 2 s). With no graph yet, the hook and `log relate status` start the first build at once.
|
|
77
|
+
|
|
78
|
+
One query answers "who replied to the owner in a channel after a date":
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
log relate query "MATCH (i:Identity)-[r:REPLIED_TO]->(:Account) WHERE r.room ENDS WITH ':<channelId>' AND r.lastAtMs > <ms> RETURN coalesce(i.name, i.handle) AS who, r.times AS times"
|
|
82
|
+
log relate query "MATCH (i:Identity)-[:SAID]->(:Room)-[:IN_SERVER]->(s:Server {name: 'Some Server'}) RETURN DISTINCT i.handle"
|
|
83
|
+
```
|
|
70
84
|
|
|
71
85
|
To try it without any accounts, the demo store is in this repo:
|
|
72
86
|
|
|
@@ -90,6 +104,7 @@ relate --read-only -d docs/relate/demoGraph.rl "MATCH (p:Identity {handleLower:'
|
|
|
90
104
|
| Half-written reads | New file per build, pointer moved only after the commit and checkpoint. |
|
|
91
105
|
| Retried or concurrent builds | One build per log.db at a time (`relateGraphBuilding` claim); every build starts from an empty file, so a retry can't double edges. |
|
|
92
106
|
| Re-keyed identities | Rebuilt whole, never patched, so a merged handle can't leave a stale node. |
|
|
107
|
+
| A writer that never lets go | Each build runs in its own child process, so a long-lived MCP server or context service never keeps a writable handle that blocks every reader. |
|
|
93
108
|
| Schema change | The pointer carries the projector version; a graph from other code is ignored and rebuilt. |
|
|
94
109
|
| Another workspace's data | The graph folder sits beside its own log.db and the pointer carries that log.db's workspace key. |
|
|
95
110
|
| Drift | `log relate verify` compares every count with log.db. |
|
package/docs/specs/README.md
CHANGED
|
@@ -4,7 +4,7 @@ title: "Specs"
|
|
|
4
4
|
|
|
5
5
|
# Specs
|
|
6
6
|
|
|
7
|
-
What log-cli must do, in order by domain: 56 domains,
|
|
7
|
+
What log-cli must do, in order by domain: 56 domains, 658 requirements. Each one's anchors are proved against its code by the syntax tree on every commit, push and pull request (`bun run check:specs`). SubQ reads a requirement against its code only when asked (`bun run check:specs --subq`, rule 170). AGENTS.md keeps the rules by date; these pages are the same rules as they stand today. Written by `bun run docs:build` from the spec pages, not edited by hand.
|
|
8
8
|
|
|
9
9
|
## [Command shape](./commandShape.md)
|
|
10
10
|
|
|
@@ -653,9 +653,13 @@ log keeps a Relate (Neo4j's embedded graph database) projection of log.db: the o
|
|
|
653
653
|
- **REQ-RELATE-04** A graph belongs to one log.db
|
|
654
654
|
- **REQ-RELATE-05** The hook names only people the prompt names
|
|
655
655
|
- **REQ-RELATE-06** The context is what the graph connects, as facts
|
|
656
|
-
- **REQ-RELATE-07**
|
|
656
|
+
- **REQ-RELATE-07** The graph is built at install and kept current
|
|
657
657
|
- **REQ-RELATE-08** Agents can read the graph with Cypher
|
|
658
658
|
- **REQ-RELATE-09** The hook adds what was said, found by all three retrievers together
|
|
659
|
+
- **REQ-RELATE-10** Discord rooms carry their kind, their own name and their server
|
|
660
|
+
- **REQ-RELATE-11** Person links are projected, so linked identities share one person
|
|
661
|
+
- **REQ-RELATE-12** SAID keeps first and last times, and replies and mentions are edges
|
|
662
|
+
- **REQ-RELATE-13** A graph that can't be opened is a coded outcome
|
|
659
663
|
|
|
660
664
|
## [People across platforms](./people.md)
|
|
661
665
|
|
|
@@ -10,13 +10,13 @@ log keeps a Relate (Neo4j's embedded graph database) projection of log.db: the o
|
|
|
10
10
|
|
|
11
11
|
### REQ-RELATE-01: The graph is built from log.db's typed tables in one read snapshot
|
|
12
12
|
|
|
13
|
-
`log relate build` reads accounts, chats, identities, handle aliases, memberships, messages (counted per sender and room
|
|
13
|
+
`log relate build` reads accounts, chats, identities, handle aliases, person links, memberships, messages (counted per sender and room, with replies and mentions), interactions (counted per actor, post and kind) and the Discord channel catalog (`engineState` `discordServers` and `discordThreads`) inside one read transaction, with the highest event `seq` of that same snapshot as the graph's `throughSeq`. The owner's own identities (each account's own id, a `self:` id, or the account's own handle) are marked `owner` and never listed as other people.
|
|
14
14
|
|
|
15
15
|
Checked by: code and SubQ
|
|
16
16
|
|
|
17
17
|
### REQ-RELATE-02: Each build writes a new graph file and only then points at it
|
|
18
18
|
|
|
19
|
-
A build writes a new single-file Relate store `graph-<throughSeq>-<ms>.rl` under a `relate` folder beside log.db, in one Relate transaction, checkpoints it, and only then stores its pointer (file, throughSeq, projector version, schema version, workspace, counts) in log.db's `state` table under `relateGraph`. A reader opens only the file the pointer names, read-only, so it never sees a half-written graph. Old files beyond the last three are removed when nothing in the process holds them. One build runs at a time per log.db (`relateGraphBuilding` claim).
|
|
19
|
+
A build runs in its own short-lived Bun process (`buildGraph` spawns `buildGraphHere`), so no long-lived process (the MCP server, the context service) keeps a writable handle that would make every read-only open fail. It writes a new single-file Relate store `graph-<throughSeq>-<ms>.rl` under a `relate` folder beside log.db, in one Relate transaction, checkpoints it, and only then stores its pointer (file, throughSeq, projector version, schema version, workspace, counts) in log.db's `state` table under `relateGraph`. A reader opens only the file the pointer names, read-only, so it never sees a half-written graph. Old files beyond the last three are removed when nothing in the process holds them. One build runs at a time per log.db (`relateGraphBuilding` claim).
|
|
20
20
|
|
|
21
21
|
Checked by: code and SubQ
|
|
22
22
|
|
|
@@ -36,7 +36,7 @@ Checked by: code and SubQ
|
|
|
36
36
|
|
|
37
37
|
### REQ-RELATE-05: The hook names only people the prompt names
|
|
38
38
|
|
|
39
|
-
On UserPromptSubmit the `relate` hook reads the prompt's `@handle`s and its other words of four letters or more (leaving out common words), finds identities whose handle or a known alias matches, ignores the owner's own, merges identities on one platform with the same handle, and keeps at most three people. A prompt naming nobody the graph knows, a system text starting with `<`, or a missing graph gives no context at all.
|
|
39
|
+
On UserPromptSubmit the `relate` hook reads the prompt's `@handle`s and its other words of four letters or more (leaving out common words), finds identities whose handle or a known alias matches, or whose handle, display name or a name they sent messages under (`senderLabel`, as `saidBy` matches) appears in the prompt: a name of two or more words anywhere, a one-word name only when written with a capital or an @, ignores the owner's own, merges identities on one platform with the same handle, and keeps at most three people. A prompt naming nobody the graph knows, a system text starting with `<`, or a missing graph gives no context at all.
|
|
40
40
|
|
|
41
41
|
Checked by: code and SubQ
|
|
42
42
|
|
|
@@ -46,9 +46,9 @@ For each person it says: the owner's accounts that talk with them and how many m
|
|
|
46
46
|
|
|
47
47
|
Checked by: code and SubQ
|
|
48
48
|
|
|
49
|
-
### REQ-RELATE-07:
|
|
49
|
+
### REQ-RELATE-07: The graph is built at install and kept current
|
|
50
50
|
|
|
51
|
-
The
|
|
51
|
+
The after-install routine (`POST_INSTALL_STEPS`) builds the graph right after log.db's migrations, as a non-blocking step. After that, when the graph is behind log.db and was built more than a minute ago, the hook starts `log relate build` as a hidden detached process and answers from the current graph meanwhile. With no graph yet and events in log.db, the hook and `log relate status` start that build at once, so status is never empty for long on a machine with data. A build already running is not started twice.
|
|
52
52
|
|
|
53
53
|
Checked by: code and SubQ
|
|
54
54
|
|
|
@@ -65,3 +65,29 @@ When the prompt names someone the graph knows, the `relate` hook also runs one s
|
|
|
65
65
|
- The search gets 6 seconds; past that it is dropped, so the hook never hangs.
|
|
66
66
|
|
|
67
67
|
Checked by: code and SubQ
|
|
68
|
+
|
|
69
|
+
## Rooms, servers, people and replies
|
|
70
|
+
|
|
71
|
+
### REQ-RELATE-10: Discord rooms carry their kind, their own name and their server
|
|
72
|
+
|
|
73
|
+
A Discord room's kind and name come from the channel catalog when it lists the room: a channel is `channel`, named after the channel itself (`hermes-agent-hackathon`, not the server prefix or a speaker). A Discord room the catalog doesn't list but that has a `serverId` is a `channel` with no name, never a DM named after whoever spoke first. Every room with a server has an `IN_SERVER` edge to one `Server` node (`platform:server:<id>`, with the server's name when known).
|
|
74
|
+
|
|
75
|
+
Checked by: code and SubQ
|
|
76
|
+
|
|
77
|
+
### REQ-RELATE-11: Person links are projected, so linked identities share one person
|
|
78
|
+
|
|
79
|
+
Every active `identityLinks` row (from `log people link`) becomes an `(Identity)-[:LINKED_TO {linkedBy, linkedAt}]->(Person)` edge to one `Person` node per `personId`, and the identity keeps `personId`, so the context merges a person's identities across platforms.
|
|
80
|
+
|
|
81
|
+
Checked by: code and SubQ
|
|
82
|
+
|
|
83
|
+
### REQ-RELATE-12: SAID keeps first and last times, and replies and mentions are edges
|
|
84
|
+
|
|
85
|
+
`SAID` carries `messages`, `firstAtMs` and `lastAtMs`. A message that replies to another (`replyToKey`) adds to a `REPLIED_TO {room, times, firstAtMs, lastAtMs}` edge from its sender to the replied-to sender, and a message naming someone (`<@id>` or `@handle` of a known identity or of the owner's account) adds to a `MENTIONED` edge. The owner's side is the room's `Account`, so "who replied to the owner in a room after a date" is one query. The context lists where a person replied to or mentioned the owner.
|
|
86
|
+
|
|
87
|
+
Checked by: code and SubQ
|
|
88
|
+
|
|
89
|
+
### REQ-RELATE-13: A graph that can't be opened is a coded outcome
|
|
90
|
+
|
|
91
|
+
When the current graph file can't be opened read-only, `relateContext` answers `graphUnreadable` with the reason, the search prior is skipped, and the hook adds nothing instead of failing with the engine's error.
|
|
92
|
+
|
|
93
|
+
Checked by: code and SubQ
|
package/docs/specs/runsAndRea.md
CHANGED
|
@@ -60,7 +60,7 @@ Checked by: code and SubQ
|
|
|
60
60
|
|
|
61
61
|
### REQ-RUNS-09: The docs gate refuses undocumented or unread requests
|
|
62
62
|
|
|
63
|
-
lefthook's pre-push runs the docs gate (`check:clientDocs`). It refuses a listed doc that is missing, a doc rea has not read, a doc whose reasoning is not written, a doc not in `operations.json`, a Facebook request named in the code with no doc, and
|
|
63
|
+
lefthook's pre-push runs the docs gate (`check:clientDocs`). It refuses a listed doc that is missing, a doc rea has not read, a doc whose reasoning is not written, a doc not in `operations.json`, a Facebook request named in the code with no doc, and an `operations.json` that carries `builtAt`. It never reads the runs on this machine: when the docs were last built is kept in log.db (`log capture docs` records it), and `log runs` says which runs are not in the docs yet.
|
|
64
64
|
|
|
65
65
|
Checked by: code and SubQ
|
|
66
66
|
|
package/docs/specs/updates.md
CHANGED
|
@@ -44,7 +44,7 @@ Checked by: code and SubQ
|
|
|
44
44
|
|
|
45
45
|
### REQ-UPDATE-07: Install and update run one after-install routine, at one release
|
|
46
46
|
|
|
47
|
-
`install.ps1` and `install.sh` install one version: `LOG_VERSION` when set, else the newest GitHub Release's tag, else npm's `latest`, refuse when Bun installed another version than `LOG_VERSION`, and end with `installed log X.Y.Z`. After setting up Python they run `scripts/update/postInstall.ts`, which is `runPostInstall` over `POST_INSTALL_STEPS`: the Python vendors (`PYTHON_VENDORS` with the pip-pinned models and the Windows wheel), log.db's migrations, the skills build, the local models (`fetchModels`) and every harness (`refreshHarnesses`). `log update` runs the NEW version's own `postInstall.ts` with `--skip harnesses --json` (harnesses are refreshed after the restart) and reads its report (`parsePostInstall`); a failed vendor, migration or skills step fails the update and rolls it back, while a model that couldn't be fetched is reported in the answer and `resume.json` (`models`).
|
|
47
|
+
`install.ps1` and `install.sh` install one version: `LOG_VERSION` when set, else the newest GitHub Release's tag, else npm's `latest`, refuse when Bun installed another version than `LOG_VERSION`, and end with `installed log X.Y.Z`. After setting up Python they run `scripts/update/postInstall.ts`, which is `runPostInstall` over `POST_INSTALL_STEPS`: the Python vendors (`PYTHON_VENDORS` with the pip-pinned models and the Windows wheel), log.db's migrations, the Relate graph build (`log relate build`, not blocking), the skills build, the local models (`fetchModels`) and every harness (`refreshHarnesses`). `log update` runs the NEW version's own `postInstall.ts` with `--skip harnesses --json` (harnesses are refreshed after the restart) and reads its report (`parsePostInstall`); a failed vendor, migration or skills step fails the update and rolls it back, while a model that couldn't be fetched is reported in the answer and `resume.json` (`models`).
|
|
48
48
|
|
|
49
49
|
Checked by: code and SubQ
|
|
50
50
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"label": "log",
|
|
4
4
|
"description": "Your accounts, who is waiting on a reply, and what log sent today, read from log's own files on this machine.",
|
|
5
5
|
"icon": "MessageSquare",
|
|
6
|
-
"version": "0.4.
|
|
6
|
+
"version": "0.4.1-nightly.202611211641.04abfce",
|
|
7
7
|
"tab": {
|
|
8
8
|
"path": "/log",
|
|
9
9
|
"position": "after:skills"
|
package/hermesPlugin/plugin.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: log
|
|
2
|
-
version: 0.
|
|
2
|
+
version: 0.4.0
|
|
3
3
|
description: "log by ListeningKit for Hermes, as one plugin: every play as a log:<play> skill, log's GenUI blocks and report views (tools, recipes, the dashboard tab and the Desktop half), and the hooks. Before each model call, pre_llm_call puts the play the prompt asks for, names it resolves, pending inbox messages and browser states in front of the model; pre_tool_call refuses a script that parses log output and names the flag that narrows it; transform_tool_result adds the messages that landed while a log tool ran and advises turning a hand-rolled read into a log tool; post_llm_call times the turn; a message the account watchers hear between turns starts a turn in that chat through ctx.inject_message (needs plugins.entries.log.allow_gateway_injection: true); on chats that can't draw, transform_llm_output swaps a view's tag for its text. log's tools come from the log MCP server in config.yaml (hermes mcp add log --command logMcp), which a native plugin can't declare; the hook says so when it's missing. Written from src/agentHooks/registry (bun run check:agentHooks --write)."
|
|
4
4
|
provides_tools:
|
|
5
5
|
- assistant_calendar
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@listeningkit/log",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1-nightly.202611211641.04abfce",
|
|
4
4
|
"description": "ListeningKit's go-to-market tool, open-sourced: one CLI and MCP server that runs your accounts on X, Discord, Slack, Instagram, Reddit, LinkedIn and Facebook from your terminal or any agent, self-hosted.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"guideChars.logMcpInstructions": 24638,
|
|
31
31
|
"guideChars.newPlatform": 5807,
|
|
32
32
|
"guideChars.reddit": 4423,
|
|
33
|
-
"guideChars.runsAndEvidence":
|
|
33
|
+
"guideChars.runsAndEvidence": 22255,
|
|
34
34
|
"guideChars.sessions": 3414,
|
|
35
35
|
"guideChars.slack": 6285,
|
|
36
36
|
"guideChars.tiktok": 2998,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
2
|
import { dirname, join, relative } from 'node:path';
|
|
4
3
|
import { fileURLToPath } from 'node:url';
|
|
5
4
|
|
|
@@ -14,6 +13,7 @@ if (!existsSync(indexPath)) {
|
|
|
14
13
|
}
|
|
15
14
|
const index = JSON.parse(readFileSync(indexPath, 'utf8'));
|
|
16
15
|
const listed = new Set(index.operations.map((o) => o.doc));
|
|
16
|
+
if ('builtAt' in index) problems.push('operations.json: carries builtAt; when the docs were built is kept in log.db, not in the repo');
|
|
17
17
|
|
|
18
18
|
for (const operation of index.operations) {
|
|
19
19
|
const path = join(docsDir, operation.doc);
|
|
@@ -36,7 +36,9 @@ for (const platform of readdirSync(platformsDir)) {
|
|
|
36
36
|
const platformIndex = join(platformsDir, platform, 'operations.json');
|
|
37
37
|
if (platform === 'facebook' || !existsSync(platformIndex)) continue;
|
|
38
38
|
const platformDocs = join(platformsDir, platform);
|
|
39
|
-
const
|
|
39
|
+
const platformIndexBody = JSON.parse(readFileSync(platformIndex, 'utf8'));
|
|
40
|
+
if ('builtAt' in platformIndexBody) problems.push(`${platform}/operations.json: carries builtAt; when the docs were built is kept in log.db, not in the repo`);
|
|
41
|
+
const platformOps = platformIndexBody.operations;
|
|
40
42
|
const platformListed = new Set(platformOps.map((o) => o.doc));
|
|
41
43
|
for (const operation of platformOps) {
|
|
42
44
|
const path = join(platformDocs, operation.doc);
|
|
@@ -60,22 +62,6 @@ if (existsSync(flowsDir)) {
|
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
const captures = process.env.LOG_CAPTURES_ROOT || join(homedir(), '.logCli');
|
|
64
|
-
const builtAt = Date.parse(index.builtAt);
|
|
65
|
-
const newer = [];
|
|
66
|
-
const walk = (dir, depth) => {
|
|
67
|
-
let names;
|
|
68
|
-
try {
|
|
69
|
-
names = readdirSync(dir);
|
|
70
|
-
} catch {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (names.includes('session.har') && statSync(join(dir, 'session.har')).mtimeMs > builtAt) newer.push(relative(captures, dir));
|
|
74
|
-
if (depth > 0) for (const name of names) if (statSync(join(dir, name), { throwIfNoEntry: false })?.isDirectory()) walk(join(dir, name), depth - 1);
|
|
75
|
-
};
|
|
76
|
-
for (const top of ['runs', 'publish']) walk(join(captures, top), 6);
|
|
77
|
-
if (newer.length) problems.push(`${newer.length} run(s) recorded after the docs were built (${newer.slice(0, 3).join(', ')}${newer.length > 3 ? ', …' : ''}): run \`log capture docs\``);
|
|
78
|
-
|
|
79
65
|
const documented = new Set(index.operations.map((o) => o.name));
|
|
80
66
|
const named = new Map();
|
|
81
67
|
const scan = (dir) => {
|
package/skills/runs/SKILL.md
CHANGED
|
@@ -13,12 +13,12 @@ an inspect run up to 1.4 GB. On 2026-10-22 they reached 12.5 GB, the disk had
|
|
|
13
13
|
|
|
14
14
|
1. **Analyse** (rule 25): a run may go only when rea settled it
|
|
15
15
|
(`settle.json`: every step read, findings.md written) and the request docs
|
|
16
|
-
hold its requests (`docs
|
|
16
|
+
hold its requests (`log capture docs` ran after it, kept in log.db).
|
|
17
17
|
- Not settled: `log capture settle <its capture folder>`.
|
|
18
18
|
- Not in the docs: `log capture docs`, then write any request's
|
|
19
19
|
reasoning it asks for.
|
|
20
|
-
2. **Look:** `log runs` lists each run with `may go` or why it is kept
|
|
21
|
-
|
|
20
|
+
2. **Look:** `log runs` lists each run with `may go` or why it is kept, and
|
|
21
|
+
counts those not in the docs.
|
|
22
22
|
3. **Prune:** `log runs prune --apply` (`--before <YYYY-MM-DD>` keeps the
|
|
23
23
|
runs from that day on). First it takes every step's internal API calls
|
|
24
24
|
out of its HAR (`exchanges.json`: what was sent and what came back, rule
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { appendRecord } from '../../storage/records/index'
|
|
2
2
|
import { appendFileSync, promises as fsp, copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statfsSync, statSync, writeFileSync } from 'node:fs'
|
|
3
3
|
import { join } from 'node:path'
|
|
4
|
-
import { fileURLToPath } from 'node:url'
|
|
5
4
|
import { knownRequests } from '../../subq/stepReading/client.ts'
|
|
6
5
|
import { exchangesOf } from '../../subq/stepReading/helpers/exchangesOf.ts'
|
|
7
6
|
import { DOCUMENT_FIELDS, EXCHANGES_FILE } from '../../subq/stepReading/types.ts'
|
|
8
7
|
import { openInspects } from '../inspect/index.ts'
|
|
9
8
|
import { domainsInHar } from './helpers/domainsInHar.ts'
|
|
9
|
+
import type { Database } from 'bun:sqlite'
|
|
10
|
+
import { readEngineStore, writeEngineStore } from '../../storage/engineStore/index'
|
|
11
|
+
import { DOCS_BUILT_ACCOUNT } from './types.ts'
|
|
10
12
|
import type { Backfill, PrunedRun, RunEntry, StepHar } from './types.ts'
|
|
11
13
|
import { logHome } from '../../config/logHome/index.ts'
|
|
12
14
|
|
|
@@ -45,13 +47,14 @@ function newestChange(path: string): number {
|
|
|
45
47
|
return readdirSync(path).filter((name) => !TAKEN_OUT.test(name)).reduce((n, name) => Math.max(n, newestChange(join(path, name))), 0)
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
export function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
50
|
+
export function recordDocsBuilt(platform: string, at: number, handle?: Database): void {
|
|
51
|
+
writeEngineStore('clientDocs', DOCS_BUILT_ACCOUNT, { builtAt: { [platform]: at } }, handle)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function docsBuiltAt(handle?: Database): number {
|
|
55
|
+
const stored = readEngineStore<{ builtAt?: Record<string, unknown> }>('clientDocs', DOCS_BUILT_ACCOUNT, undefined, handle)
|
|
56
|
+
const times = Object.values(stored?.builtAt ?? {}).filter((t): t is number => typeof t === 'number' && t > 0)
|
|
57
|
+
return times.length ? Math.min(...times) : 0
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
export function listRuns(options: { root?: string; builtAt?: number; now?: number; open?: string[] } = {}): RunEntry[] {
|
package/src/cli/capture/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
import { buildClientMap, capturesRoot } from "../../rea/facebookClient/index.ts";
|
|
5
5
|
import { captureFromHar, defaultReaRunner, settleRunCapture } from "../../rea/capture/index.ts";
|
|
6
6
|
import { buildPlatformClientMap } from "../../rea/platformClient/index.ts";
|
|
7
|
+
import { recordDocsBuilt } from "../../browser/runStore/index.ts";
|
|
7
8
|
import { PLATFORM_SITES, PLATFORMS } from "../runner/helpers/platforms.ts";
|
|
8
9
|
import type { ReaRunner } from "../../rea/capture/index.ts";
|
|
9
10
|
import { JSON_FLAG, parseArgs, parserSpecOf, refuseInput } from "../runner/helpers/index.ts";
|
|
@@ -58,13 +59,14 @@ export async function runCapture(argv: string[], runner?: ReaRunner, log: (line:
|
|
|
58
59
|
if (form === "docs") {
|
|
59
60
|
const root = capturesRoot();
|
|
60
61
|
const notes: string[] = [];
|
|
62
|
+
const startedAt = Date.now();
|
|
61
63
|
for (const platform of PLATFORMS.filter((p) => PLATFORM_SITES[p].browser)) {
|
|
62
|
-
if (platform === "facebook") {
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
if (platform === "facebook") notes.push(await buildClientMap({ capturesRoot: root, outDir: join(root, "rea", "facebookClient"), docsDir: platformClientDocs(platform), runner: reaRunner, log }));
|
|
65
|
+
else {
|
|
66
|
+
log(`${platform}: its runs' calls, their code in its bundles, rea reading each`);
|
|
67
|
+
notes.push(await buildPlatformClientMap({ platform, capturesRoot: root, outDir: join(root, "rea", `${platform}Client`), docsDir: platformClientDocs(platform), runner: reaRunner, log }));
|
|
65
68
|
}
|
|
66
|
-
|
|
67
|
-
notes.push(await buildPlatformClientMap({ platform, capturesRoot: root, outDir: join(root, "rea", `${platform}Client`), docsDir: platformClientDocs(platform), runner: reaRunner, log }));
|
|
69
|
+
recordDocsBuilt(platform, startedAt);
|
|
68
70
|
}
|
|
69
71
|
return { code: 0, stdout: notes.join("\n") };
|
|
70
72
|
}
|
package/src/cli/relate/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { buildGraph, pointerOf, eventsThrough, queryGraph, refreshGraph, relateContext, verifyGraph, graphDir } from "../../relate/graph/index.ts";
|
|
2
3
|
import type { GraphCounts } from "../../relate/graph/index.ts";
|
|
3
4
|
import { defaultDbPath, openDatabase } from "../../storage/schema/index.ts";
|
|
4
5
|
import { JSON_FLAG, parseArgs, parserSpecOf, refuseInput } from "../runner/helpers/index.ts";
|
|
@@ -23,7 +24,9 @@ export const RELATE_INPUT: CommandInput = {
|
|
|
23
24
|
],
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
const countsLine = (c: GraphCounts): string => `${c.accounts} accounts, ${c.identities} people, ${c.rooms} rooms, ${c.posts} posts, ${c.memberOf} memberships, ${c.said} said, ${c.engaged} engaged`;
|
|
27
|
+
const countsLine = (c: GraphCounts): string => `${c.accounts} accounts, ${c.identities} people, ${c.rooms} rooms, ${c.servers} servers, ${c.posts} posts, ${c.persons} linked persons, ${c.memberOf} memberships, ${c.said} said, ${c.repliedTo} replied, ${c.mentioned} mentioned, ${c.engaged} engaged`;
|
|
28
|
+
|
|
29
|
+
const REPO = join(import.meta.dir, "..", "..", "..");
|
|
27
30
|
|
|
28
31
|
export const relateCommand: Command = {
|
|
29
32
|
usage: RELATE_USAGE,
|
|
@@ -49,7 +52,9 @@ export const relateCommand: Command = {
|
|
|
49
52
|
const handle = openDatabase(dbPath);
|
|
50
53
|
const pointer = pointerOf(dbPath, handle);
|
|
51
54
|
const through = eventsThrough(handle);
|
|
52
|
-
|
|
55
|
+
const building = pointer ? false : refreshGraph(REPO, dbPath);
|
|
56
|
+
if (json) return { code: 0, stdout: JSON.stringify({ pointer, eventsThrough: through, behind: pointer ? through - pointer.throughSeq : null, building }, null, 2) };
|
|
57
|
+
if (!pointer && building) return { code: 1, stdout: `log relate status: no graph for this log.db yet, so a build of its ${through} events has started in the background; ask again in a few seconds.` };
|
|
53
58
|
if (!pointer) return { code: 1, stdout: "log relate status: no graph for this log.db yet. `log relate build` makes one." };
|
|
54
59
|
return { code: 0, stdout: `log relate status: ${pointer.file}\n built ${pointer.builtAt} through event ${pointer.throughSeq} (log.db is at ${through}, ${through - pointer.throughSeq} behind)\n ${countsLine(pointer.counts)}` };
|
|
55
60
|
}
|
|
@@ -65,6 +70,7 @@ export const relateCommand: Command = {
|
|
|
65
70
|
const answer = relateContext(rest[0], dbPath);
|
|
66
71
|
if (json) return { code: 0, stdout: JSON.stringify(answer, null, 2) };
|
|
67
72
|
if (answer.outcome === "noGraph") return { code: 1, stdout: "log relate ask: no graph for this log.db yet. `log relate build` makes one." };
|
|
73
|
+
if (answer.outcome === "graphUnreadable") return { code: 1, stdout: `log relate ask: ${answer.detail ?? "graphUnreadable"}. \`log relate build\` writes a fresh one.` };
|
|
68
74
|
return { code: 0, stdout: answer.text || "log relate ask: that text names nobody the graph knows." };
|
|
69
75
|
}
|
|
70
76
|
if (sub === "query" && rest.length === 1) {
|
package/src/cli/runs/index.ts
CHANGED
|
@@ -19,7 +19,8 @@ function table(entries: RunEntry[]): string {
|
|
|
19
19
|
const lines = entries.map((e) => `${mb(e.bytes).padStart(8)} settled ${yn(e.settled).padEnd(3)} docs ${yn(e.documented).padEnd(3)} ${`${e.action}/${e.run}`.padEnd(48)} ${e.keep ? `kept: ${e.keep}` : "may go"}`);
|
|
20
20
|
const total = entries.reduce((n, e) => n + e.bytes, 0);
|
|
21
21
|
const free = entries.filter((e) => !e.keep).reduce((n, e) => n + e.bytes, 0);
|
|
22
|
-
|
|
22
|
+
const undocumented = entries.filter((e) => e.documented === false).length;
|
|
23
|
+
return [...lines, `${entries.length} runs, ${gb(total)}; ${entries.filter((e) => !e.keep).length} may go (${gb(free)}).`, ...(undocumented ? [`${undocumented} run(s) not in the request docs yet: log capture docs`] : [])].join("\n");
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export const RUNS_INPUT: CommandInput = {
|
|
@@ -276,7 +276,7 @@ export function writeOperationDocs(operations: ClientOperation[], docsDir: strin
|
|
|
276
276
|
}));
|
|
277
277
|
const seenNow = new Set(current.map((e) => e.name));
|
|
278
278
|
const kept = previous.filter((e) => !seenNow.has(e.name) && existsSync(join(docsDir, e.doc)));
|
|
279
|
-
const index = {
|
|
279
|
+
const index = { runs, operations: [...current, ...kept].sort((x, y) => x.name.localeCompare(y.name)) };
|
|
280
280
|
writeFileSync(join(docsDir, DOCS_INDEX), `${JSON.stringify(index, null, 2)}\n`);
|
|
281
281
|
mkdirSync(dirname(storePath), { recursive: true });
|
|
282
282
|
writeFileSync(storePath, `${JSON.stringify(store)}\n`);
|
|
@@ -315,7 +315,7 @@ export async function buildClientMap(options: BuildClientMapOptions): Promise<st
|
|
|
315
315
|
mkdirSync(options.outDir, { recursive: true });
|
|
316
316
|
if (options.runner) await readSlices(operations, modules, options.outDir, options.runner, log, options.concurrency);
|
|
317
317
|
else log("rea: not run (--noRea)");
|
|
318
|
-
writeFileSync(join(options.outDir, "clientMap.json"), `${JSON.stringify({
|
|
318
|
+
writeFileSync(join(options.outDir, "clientMap.json"), `${JSON.stringify({ operations }, null, 2)}\n`, { mode: 0o600 });
|
|
319
319
|
const docs = writeOperationDocs(operations, options.docsDir, captures.length, clientFactsPath(), requestDocPrompts({ name: "Facebook", evidence: "its definition", machines: platformMachines("facebook") }));
|
|
320
320
|
const unread = operations.filter((o) => !o.reaEvidenceId).length;
|
|
321
321
|
return `Facebook client map: ${operations.length} requests from ${captures.length} runs, ${operations.length - unread} read by rea. Docs: ${options.docsDir} (${docs.toWrite} still need their reasoning written).`;
|
|
@@ -297,7 +297,7 @@ export async function buildPlatformClientMap(options: BuildPlatformMapOptions):
|
|
|
297
297
|
if (sighting) operation.reaEvidenceId = evidence.get(`${sighting.run}\u0000${sighting.step}`) ?? null;
|
|
298
298
|
}
|
|
299
299
|
if (options.runner) await readOperationNetwork(operations, rawByName, options.outDir, options.runner, log);
|
|
300
|
-
writeFileSync(join(options.outDir, "clientMap.json"), `${JSON.stringify({
|
|
300
|
+
writeFileSync(join(options.outDir, "clientMap.json"), `${JSON.stringify({ operations }, null, 2)}\n`, { mode: 0o600 });
|
|
301
301
|
const docs = writeOperationDocs(operations, options.docsDir, used.length, options.storePath ?? platformFactsPath(platform), requestDocPrompts({ name: PLATFORM_LABELS[platform], evidence: PLATFORM_EVIDENCE, machines: platformMachines(platform) }));
|
|
302
302
|
const sliced = operations.filter((o) => (slicesByName.get(o.name) ?? []).length).length;
|
|
303
303
|
const read = operations.filter((o) => o.reaEvidenceId).length;
|