@flyingrobots/graft 0.6.1 → 0.7.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/CHANGELOG.md +148 -0
- package/README.md +1 -2
- package/bin/graft.js +26 -26
- package/dist/adapters/json-text-decoder.d.ts +3 -0
- package/dist/adapters/json-text-decoder.d.ts.map +1 -0
- package/dist/adapters/json-text-decoder.js +12 -0
- package/dist/adapters/json-text-decoder.js.map +1 -0
- package/dist/adapters/node-paths.d.ts +3 -0
- package/dist/adapters/node-paths.d.ts.map +1 -0
- package/dist/adapters/node-paths.js +29 -0
- package/dist/adapters/node-paths.js.map +1 -0
- package/dist/adapters/repo-paths.d.ts.map +1 -1
- package/dist/adapters/repo-paths.js +40 -5
- package/dist/adapters/repo-paths.js.map +1 -1
- package/dist/api/tool-bridge.d.ts +1 -1
- package/dist/api/tool-bridge.d.ts.map +1 -1
- package/dist/api/tool-bridge.js +1 -1
- package/dist/api/tool-bridge.js.map +1 -1
- package/dist/cli/cli-error.d.ts.map +1 -1
- package/dist/cli/cli-error.js +47 -10
- package/dist/cli/cli-error.js.map +1 -1
- package/dist/cli/command-parser.d.ts +12 -3
- package/dist/cli/command-parser.d.ts.map +1 -1
- package/dist/cli/command-parser.js +161 -2
- package/dist/cli/command-parser.js.map +1 -1
- package/dist/cli/daemon-status-model.d.ts +87 -0
- package/dist/cli/daemon-status-model.d.ts.map +1 -0
- package/dist/cli/daemon-status-model.js +142 -0
- package/dist/cli/daemon-status-model.js.map +1 -0
- package/dist/cli/daemon-status-render.d.ts +3 -0
- package/dist/cli/daemon-status-render.d.ts.map +1 -0
- package/dist/cli/daemon-status-render.js +100 -0
- package/dist/cli/daemon-status-render.js.map +1 -0
- package/dist/cli/daemon-status.d.ts +7 -0
- package/dist/cli/daemon-status.d.ts.map +1 -0
- package/dist/cli/daemon-status.js +79 -0
- package/dist/cli/daemon-status.js.map +1 -0
- package/dist/cli/git-graft-enhance-model.d.ts +67 -0
- package/dist/cli/git-graft-enhance-model.d.ts.map +1 -0
- package/dist/cli/git-graft-enhance-model.js +55 -0
- package/dist/cli/git-graft-enhance-model.js.map +1 -0
- package/dist/cli/git-graft-enhance-render.d.ts +3 -0
- package/dist/cli/git-graft-enhance-render.d.ts.map +1 -0
- package/dist/cli/git-graft-enhance-render.js +29 -0
- package/dist/cli/git-graft-enhance-render.js.map +1 -0
- package/dist/cli/git-graft-enhance.d.ts +14 -0
- package/dist/cli/git-graft-enhance.d.ts.map +1 -0
- package/dist/cli/git-graft-enhance.js +29 -0
- package/dist/cli/git-graft-enhance.js.map +1 -0
- package/dist/cli/index-cmd.d.ts.map +1 -1
- package/dist/cli/index-cmd.js +18 -21
- package/dist/cli/index-cmd.js.map +1 -1
- package/dist/cli/index-model.d.ts +5 -9
- package/dist/cli/index-model.d.ts.map +1 -1
- package/dist/cli/index-model.js +20 -18
- package/dist/cli/index-model.js.map +1 -1
- package/dist/cli/init-client-config.d.ts +12 -7
- package/dist/cli/init-client-config.d.ts.map +1 -1
- package/dist/cli/init-client-config.js +145 -47
- package/dist/cli/init-client-config.js.map +1 -1
- package/dist/cli/init-model.d.ts +9 -2
- package/dist/cli/init-model.d.ts.map +1 -1
- package/dist/cli/init-model.js +54 -6
- package/dist/cli/init-model.js.map +1 -1
- package/dist/cli/init-render.d.ts.map +1 -1
- package/dist/cli/init-render.js +2 -2
- package/dist/cli/init-render.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +11 -9
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/json-document.d.ts +6 -0
- package/dist/cli/json-document.d.ts.map +1 -1
- package/dist/cli/json-document.js +12 -0
- package/dist/cli/json-document.js.map +1 -1
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +49 -7
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migrate-local-history.d.ts.map +1 -1
- package/dist/cli/migrate-local-history.js +3 -2
- package/dist/cli/migrate-local-history.js.map +1 -1
- package/dist/cli/peer-command.d.ts +1 -1
- package/dist/cli/peer-command.d.ts.map +1 -1
- package/dist/cli/peer-command.js +1 -1
- package/dist/cli/peer-command.js.map +1 -1
- package/dist/contracts/capabilities.d.ts +5 -5
- package/dist/contracts/capabilities.d.ts.map +1 -1
- package/dist/contracts/capabilities.js +89 -0
- package/dist/contracts/capabilities.js.map +1 -1
- package/dist/contracts/causal-ontology.d.ts +17 -17
- package/dist/contracts/json-object.d.ts +0 -1
- package/dist/contracts/json-object.d.ts.map +1 -1
- package/dist/contracts/json-object.js +0 -10
- package/dist/contracts/json-object.js.map +1 -1
- package/dist/contracts/output-schema-cli.d.ts +277 -25
- package/dist/contracts/output-schema-cli.d.ts.map +1 -1
- package/dist/contracts/output-schema-cli.js +35 -3
- package/dist/contracts/output-schema-cli.js.map +1 -1
- package/dist/contracts/output-schema-fragments.d.ts +212 -87
- package/dist/contracts/output-schema-fragments.d.ts.map +1 -1
- package/dist/contracts/output-schema-fragments.js +49 -2
- package/dist/contracts/output-schema-fragments.js.map +1 -1
- package/dist/contracts/output-schema-mcp.d.ts +372 -47
- package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
- package/dist/contracts/output-schema-mcp.js +217 -1
- package/dist/contracts/output-schema-mcp.js.map +1 -1
- package/dist/contracts/output-schema-meta.d.ts +2 -2
- package/dist/contracts/output-schema-meta.d.ts.map +1 -1
- package/dist/contracts/output-schemas.d.ts +7 -7
- package/dist/contracts/output-schemas.d.ts.map +1 -1
- package/dist/contracts/output-schemas.js +294 -6
- package/dist/contracts/output-schemas.js.map +1 -1
- package/dist/git/diff.d.ts +11 -0
- package/dist/git/diff.d.ts.map +1 -1
- package/dist/git/diff.js +50 -6
- package/dist/git/diff.js.map +1 -1
- package/dist/hooks/posttooluse-read.js +1 -1
- package/dist/hooks/posttooluse-read.js.map +1 -1
- package/dist/hooks/pretooluse-read.js +1 -1
- package/dist/hooks/pretooluse-read.js.map +1 -1
- package/dist/mcp/burden.d.ts.map +1 -1
- package/dist/mcp/burden.js +9 -0
- package/dist/mcp/burden.js.map +1 -1
- package/dist/mcp/context.d.ts +3 -2
- package/dist/mcp/context.d.ts.map +1 -1
- package/dist/mcp/context.js +2 -37
- package/dist/mcp/context.js.map +1 -1
- package/dist/mcp/daemon-server.d.ts +2 -0
- package/dist/mcp/daemon-server.d.ts.map +1 -1
- package/dist/mcp/daemon-server.js +6 -1
- package/dist/mcp/daemon-server.js.map +1 -1
- package/dist/mcp/daemon-session-host.d.ts +1 -0
- package/dist/mcp/daemon-session-host.d.ts.map +1 -1
- package/dist/mcp/daemon-session-host.js +3 -0
- package/dist/mcp/daemon-session-host.js.map +1 -1
- package/dist/mcp/daemon-stdio-bridge.d.ts +1 -0
- package/dist/mcp/daemon-stdio-bridge.d.ts.map +1 -1
- package/dist/mcp/daemon-stdio-bridge.js +1 -0
- package/dist/mcp/daemon-stdio-bridge.js.map +1 -1
- package/dist/mcp/daemon-worker-child-pool.d.ts +2 -0
- package/dist/mcp/daemon-worker-child-pool.d.ts.map +1 -1
- package/dist/mcp/daemon-worker-child-pool.js +10 -3
- package/dist/mcp/daemon-worker-child-pool.js.map +1 -1
- package/dist/mcp/daemon-worker-pool.d.ts +1 -1
- package/dist/mcp/daemon-worker-pool.d.ts.map +1 -1
- package/dist/mcp/daemon-worker-pool.js +1 -1
- package/dist/mcp/daemon-worker-pool.js.map +1 -1
- package/dist/mcp/monitor-tick-job.d.ts +1 -0
- package/dist/mcp/monitor-tick-job.d.ts.map +1 -1
- package/dist/mcp/monitor-tick-job.js +84 -29
- package/dist/mcp/monitor-tick-job.js.map +1 -1
- package/dist/mcp/monitor-types.d.ts +1 -1
- package/dist/mcp/monitor-types.d.ts.map +1 -1
- package/dist/mcp/persisted-local-history-graph.d.ts +2 -2
- package/dist/mcp/persisted-local-history-graph.d.ts.map +1 -1
- package/dist/mcp/persisted-local-history-graph.js +3 -2
- package/dist/mcp/persisted-local-history-graph.js.map +1 -1
- package/dist/mcp/persisted-local-history.d.ts +5 -5
- package/dist/mcp/persisted-local-history.js +2 -2
- package/dist/mcp/persisted-local-history.js.map +1 -1
- package/dist/mcp/persistent-monitor-runtime.d.ts +1 -0
- package/dist/mcp/persistent-monitor-runtime.d.ts.map +1 -1
- package/dist/mcp/persistent-monitor-runtime.js +35 -0
- package/dist/mcp/persistent-monitor-runtime.js.map +1 -1
- package/dist/mcp/repo-tool-worker-context.d.ts.map +1 -1
- package/dist/mcp/repo-tool-worker-context.js +5 -2
- package/dist/mcp/repo-tool-worker-context.js.map +1 -1
- package/dist/mcp/server-context.d.ts.map +1 -1
- package/dist/mcp/server-context.js +13 -0
- package/dist/mcp/server-context.js.map +1 -1
- package/dist/mcp/server-tool-access.d.ts +1 -1
- package/dist/mcp/server-tool-access.d.ts.map +1 -1
- package/dist/mcp/server-tool-access.js +3 -1
- package/dist/mcp/server-tool-access.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +18 -0
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/code-find.d.ts.map +1 -1
- package/dist/mcp/tools/code-find.js +20 -0
- package/dist/mcp/tools/code-find.js.map +1 -1
- package/dist/mcp/tools/code-show.d.ts.map +1 -1
- package/dist/mcp/tools/code-show.js +24 -0
- package/dist/mcp/tools/code-show.js.map +1 -1
- package/dist/mcp/tools/diagnostic-models.d.ts +2 -0
- package/dist/mcp/tools/diagnostic-models.d.ts.map +1 -1
- package/dist/mcp/tools/doctor.d.ts.map +1 -1
- package/dist/mcp/tools/doctor.js +18 -1
- package/dist/mcp/tools/doctor.js.map +1 -1
- package/dist/mcp/tools/export-surface-diff.d.ts +3 -0
- package/dist/mcp/tools/export-surface-diff.d.ts.map +1 -0
- package/dist/mcp/tools/export-surface-diff.js +24 -0
- package/dist/mcp/tools/export-surface-diff.js.map +1 -0
- package/dist/mcp/tools/file-outline.js +1 -1
- package/dist/mcp/tools/file-outline.js.map +1 -1
- package/dist/mcp/tools/graft-edit.d.ts +3 -0
- package/dist/mcp/tools/graft-edit.d.ts.map +1 -0
- package/dist/mcp/tools/graft-edit.js +192 -0
- package/dist/mcp/tools/graft-edit.js.map +1 -0
- package/dist/mcp/tools/knowledge-map.d.ts +3 -0
- package/dist/mcp/tools/knowledge-map.d.ts.map +1 -0
- package/dist/mcp/tools/knowledge-map.js +31 -0
- package/dist/mcp/tools/knowledge-map.js.map +1 -0
- package/dist/mcp/tools/monitor-nudge.d.ts +3 -0
- package/dist/mcp/tools/monitor-nudge.d.ts.map +1 -0
- package/dist/mcp/tools/monitor-nudge.js +17 -0
- package/dist/mcp/tools/monitor-nudge.js.map +1 -0
- package/dist/mcp/tools/precision-warp.d.ts +3 -3
- package/dist/mcp/tools/precision-warp.d.ts.map +1 -1
- package/dist/mcp/tools/precision-warp.js +24 -15
- package/dist/mcp/tools/precision-warp.js.map +1 -1
- package/dist/mcp/tools/refactor-difficulty.d.ts +3 -0
- package/dist/mcp/tools/refactor-difficulty.d.ts.map +1 -0
- package/dist/mcp/tools/refactor-difficulty.js +36 -0
- package/dist/mcp/tools/refactor-difficulty.js.map +1 -0
- package/dist/mcp/tools/safe-read.js +2 -2
- package/dist/mcp/tools/safe-read.js.map +1 -1
- package/dist/mcp/tools/structural-blame.d.ts +3 -0
- package/dist/mcp/tools/structural-blame.d.ts.map +1 -0
- package/dist/mcp/tools/structural-blame.js +44 -0
- package/dist/mcp/tools/structural-blame.js.map +1 -0
- package/dist/mcp/tools/structural-churn.d.ts +3 -0
- package/dist/mcp/tools/structural-churn.d.ts.map +1 -0
- package/dist/mcp/tools/structural-churn.js +28 -0
- package/dist/mcp/tools/structural-churn.js.map +1 -0
- package/dist/mcp/tools/structural-log.d.ts +3 -0
- package/dist/mcp/tools/structural-log.d.ts.map +1 -0
- package/dist/mcp/tools/structural-log.js +38 -0
- package/dist/mcp/tools/structural-log.js.map +1 -0
- package/dist/mcp/tools/structural-review.d.ts +3 -0
- package/dist/mcp/tools/structural-review.d.ts.map +1 -0
- package/dist/mcp/tools/structural-review.js +55 -0
- package/dist/mcp/tools/structural-review.js.map +1 -0
- package/dist/mcp/warp-pool.d.ts +4 -4
- package/dist/mcp/warp-pool.d.ts.map +1 -1
- package/dist/mcp/warp-pool.js.map +1 -1
- package/dist/mcp/workspace-router-model.d.ts +2 -2
- package/dist/mcp/workspace-router-model.d.ts.map +1 -1
- package/dist/mcp/workspace-router-runtime.d.ts +3 -3
- package/dist/mcp/workspace-router-runtime.d.ts.map +1 -1
- package/dist/mcp/workspace-router-runtime.js +4 -1
- package/dist/mcp/workspace-router-runtime.js.map +1 -1
- package/dist/mcp/workspace-router.d.ts +3 -2
- package/dist/mcp/workspace-router.d.ts.map +1 -1
- package/dist/mcp/workspace-router.js +6 -0
- package/dist/mcp/workspace-router.js.map +1 -1
- package/dist/operations/adaptive-projection.d.ts +22 -0
- package/dist/operations/adaptive-projection.d.ts.map +1 -0
- package/dist/operations/adaptive-projection.js +36 -0
- package/dist/operations/adaptive-projection.js.map +1 -0
- package/dist/operations/agent-handoff.d.ts +25 -0
- package/dist/operations/agent-handoff.d.ts.map +1 -0
- package/dist/operations/agent-handoff.js +36 -0
- package/dist/operations/agent-handoff.js.map +1 -0
- package/dist/operations/capture-range.d.ts +33 -0
- package/dist/operations/capture-range.d.ts.map +1 -0
- package/dist/operations/capture-range.js +45 -0
- package/dist/operations/capture-range.js.map +1 -0
- package/dist/operations/conversation-primer.d.ts +27 -0
- package/dist/operations/conversation-primer.d.ts.map +1 -0
- package/dist/operations/conversation-primer.js +52 -0
- package/dist/operations/conversation-primer.js.map +1 -0
- package/dist/operations/cross-session-resume.d.ts +28 -0
- package/dist/operations/cross-session-resume.d.ts.map +1 -0
- package/dist/operations/cross-session-resume.js +79 -0
- package/dist/operations/cross-session-resume.js.map +1 -0
- package/dist/operations/deterministic-replay.d.ts +39 -0
- package/dist/operations/deterministic-replay.d.ts.map +1 -0
- package/dist/operations/deterministic-replay.js +90 -0
- package/dist/operations/deterministic-replay.js.map +1 -0
- package/dist/operations/export-surface-diff.d.ts +36 -0
- package/dist/operations/export-surface-diff.d.ts.map +1 -0
- package/dist/operations/export-surface-diff.js +298 -0
- package/dist/operations/export-surface-diff.js.map +1 -0
- package/dist/operations/footprint-parallelism.d.ts +25 -0
- package/dist/operations/footprint-parallelism.d.ts.map +1 -0
- package/dist/operations/footprint-parallelism.js +79 -0
- package/dist/operations/footprint-parallelism.js.map +1 -0
- package/dist/operations/graft-diff.d.ts.map +1 -1
- package/dist/operations/graft-diff.js +14 -7
- package/dist/operations/graft-diff.js.map +1 -1
- package/dist/operations/horizon-of-readability.d.ts +23 -0
- package/dist/operations/horizon-of-readability.d.ts.map +1 -0
- package/dist/operations/horizon-of-readability.js +39 -0
- package/dist/operations/horizon-of-readability.js.map +1 -0
- package/dist/operations/import-reference-impact.d.ts +13 -0
- package/dist/operations/import-reference-impact.d.ts.map +1 -0
- package/dist/operations/import-reference-impact.js +101 -0
- package/dist/operations/import-reference-impact.js.map +1 -0
- package/dist/operations/knowledge-map.d.ts +30 -0
- package/dist/operations/knowledge-map.d.ts.map +1 -0
- package/dist/operations/knowledge-map.js +64 -0
- package/dist/operations/knowledge-map.js.map +1 -0
- package/dist/operations/observation-cache.d.ts +8 -2
- package/dist/operations/observation-cache.d.ts.map +1 -1
- package/dist/operations/observation-cache.js +17 -5
- package/dist/operations/observation-cache.js.map +1 -1
- package/dist/operations/projection-safety.d.ts +31 -0
- package/dist/operations/projection-safety.d.ts.map +1 -0
- package/dist/operations/projection-safety.js +77 -0
- package/dist/operations/projection-safety.js.map +1 -0
- package/dist/operations/repo-workspace.js +3 -3
- package/dist/operations/repo-workspace.js.map +1 -1
- package/dist/operations/semantic-drift.d.ts +27 -0
- package/dist/operations/semantic-drift.d.ts.map +1 -0
- package/dist/operations/semantic-drift.js +46 -0
- package/dist/operations/semantic-drift.js.map +1 -0
- package/dist/operations/session-filtration.d.ts +36 -0
- package/dist/operations/session-filtration.d.ts.map +1 -0
- package/dist/operations/session-filtration.js +48 -0
- package/dist/operations/session-filtration.js.map +1 -0
- package/dist/operations/session-replay.d.ts +17 -0
- package/dist/operations/session-replay.d.ts.map +1 -0
- package/dist/operations/session-replay.js +59 -0
- package/dist/operations/session-replay.js.map +1 -0
- package/dist/operations/sludge-detector.d.ts +45 -0
- package/dist/operations/sludge-detector.d.ts.map +1 -0
- package/dist/operations/sludge-detector.js +278 -0
- package/dist/operations/sludge-detector.js.map +1 -0
- package/dist/operations/structural-blame.d.ts +67 -0
- package/dist/operations/structural-blame.d.ts.map +1 -0
- package/dist/operations/structural-blame.js +111 -0
- package/dist/operations/structural-blame.js.map +1 -0
- package/dist/operations/structural-review.d.ts +47 -0
- package/dist/operations/structural-review.d.ts.map +1 -0
- package/dist/operations/structural-review.js +225 -0
- package/dist/operations/structural-review.js.map +1 -0
- package/dist/operations/teaching-hints.d.ts +18 -0
- package/dist/operations/teaching-hints.d.ts.map +1 -0
- package/dist/operations/teaching-hints.js +35 -0
- package/dist/operations/teaching-hints.js.map +1 -0
- package/dist/parser/diff.d.ts +2 -0
- package/dist/parser/diff.d.ts.map +1 -1
- package/dist/parser/diff.js +7 -0
- package/dist/parser/diff.js.map +1 -1
- package/dist/ports/paths.d.ts +17 -0
- package/dist/ports/paths.d.ts.map +1 -0
- package/dist/ports/{warp.js → paths.js} +2 -2
- package/dist/ports/paths.js.map +1 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -1
- package/dist/version.js.map +1 -1
- package/dist/warp/ast-emitter.d.ts +28 -0
- package/dist/warp/ast-emitter.d.ts.map +1 -0
- package/dist/warp/ast-emitter.js +90 -0
- package/dist/warp/ast-emitter.js.map +1 -0
- package/dist/warp/ast-import-resolver.d.ts +13 -0
- package/dist/warp/ast-import-resolver.d.ts.map +1 -0
- package/dist/warp/ast-import-resolver.js +259 -0
- package/dist/warp/ast-import-resolver.js.map +1 -0
- package/dist/warp/commit-meta.d.ts +8 -0
- package/dist/warp/commit-meta.d.ts.map +1 -0
- package/dist/warp/commit-meta.js +13 -0
- package/dist/warp/commit-meta.js.map +1 -0
- package/dist/warp/context.d.ts +10 -0
- package/dist/warp/context.d.ts.map +1 -0
- package/dist/warp/context.js +26 -0
- package/dist/warp/context.js.map +1 -0
- package/dist/warp/dead-symbols.d.ts +40 -0
- package/dist/warp/dead-symbols.d.ts.map +1 -0
- package/dist/warp/dead-symbols.js +127 -0
- package/dist/warp/dead-symbols.js.map +1 -0
- package/dist/warp/drift-sentinel.d.ts +30 -0
- package/dist/warp/drift-sentinel.d.ts.map +1 -0
- package/dist/warp/drift-sentinel.js +65 -0
- package/dist/warp/drift-sentinel.js.map +1 -0
- package/dist/warp/index-head.d.ts +32 -0
- package/dist/warp/index-head.d.ts.map +1 -0
- package/dist/warp/index-head.js +245 -0
- package/dist/warp/index-head.js.map +1 -0
- package/dist/warp/observers.d.ts +6 -6
- package/dist/warp/observers.d.ts.map +1 -1
- package/dist/warp/observers.js +5 -4
- package/dist/warp/observers.js.map +1 -1
- package/dist/warp/open.d.ts +5 -4
- package/dist/warp/open.d.ts.map +1 -1
- package/dist/warp/open.js +24 -49
- package/dist/warp/open.js.map +1 -1
- package/dist/warp/outline-diff-trailer.d.ts +26 -0
- package/dist/warp/outline-diff-trailer.d.ts.map +1 -0
- package/dist/warp/outline-diff-trailer.js +68 -0
- package/dist/warp/outline-diff-trailer.js.map +1 -0
- package/dist/warp/refactor-difficulty.d.ts +38 -0
- package/dist/warp/refactor-difficulty.d.ts.map +1 -0
- package/dist/warp/refactor-difficulty.js +169 -0
- package/dist/warp/refactor-difficulty.js.map +1 -0
- package/dist/warp/references.d.ts +22 -0
- package/dist/warp/references.d.ts.map +1 -0
- package/dist/warp/references.js +57 -0
- package/dist/warp/references.js.map +1 -0
- package/dist/warp/stale-docs.d.ts +56 -0
- package/dist/warp/stale-docs.d.ts.map +1 -0
- package/dist/warp/stale-docs.js +149 -0
- package/dist/warp/stale-docs.js.map +1 -0
- package/dist/warp/structural-drift-detection.d.ts +49 -0
- package/dist/warp/structural-drift-detection.d.ts.map +1 -0
- package/dist/warp/structural-drift-detection.js +51 -0
- package/dist/warp/structural-drift-detection.js.map +1 -0
- package/dist/warp/structural-queries.d.ts +49 -0
- package/dist/warp/structural-queries.d.ts.map +1 -0
- package/dist/warp/structural-queries.js +175 -0
- package/dist/warp/structural-queries.js.map +1 -0
- package/dist/warp/symbol-timeline.d.ts +34 -0
- package/dist/warp/symbol-timeline.d.ts.map +1 -0
- package/dist/warp/symbol-timeline.js +127 -0
- package/dist/warp/symbol-timeline.js.map +1 -0
- package/dist/warp/traverse-hydrate.d.ts +23 -0
- package/dist/warp/traverse-hydrate.d.ts.map +1 -0
- package/dist/warp/traverse-hydrate.js +39 -0
- package/dist/warp/traverse-hydrate.js.map +1 -0
- package/dist/warp/warp-reference-count.d.ts +19 -0
- package/dist/warp/warp-reference-count.d.ts.map +1 -0
- package/dist/warp/warp-reference-count.js +32 -0
- package/dist/warp/warp-reference-count.js.map +1 -0
- package/dist/warp/warp-structural-blame.d.ts +20 -0
- package/dist/warp/warp-structural-blame.d.ts.map +1 -0
- package/dist/warp/warp-structural-blame.js +43 -0
- package/dist/warp/warp-structural-blame.js.map +1 -0
- package/dist/warp/warp-structural-churn.d.ts +30 -0
- package/dist/warp/warp-structural-churn.d.ts.map +1 -0
- package/dist/warp/warp-structural-churn.js +213 -0
- package/dist/warp/warp-structural-churn.js.map +1 -0
- package/dist/warp/warp-structural-log.d.ts +35 -0
- package/dist/warp/warp-structural-log.d.ts.map +1 -0
- package/dist/warp/warp-structural-log.js +104 -0
- package/dist/warp/warp-structural-log.js.map +1 -0
- package/docs/CLI.md +68 -4
- package/docs/MCP.md +23 -0
- package/docs/SETUP.md +112 -27
- package/package.json +13 -6
- package/dist/ports/warp.d.ts +0 -45
- package/dist/ports/warp.d.ts.map +0 -1
- package/dist/ports/warp.js.map +0 -1
- package/dist/warp/identity-resolver.d.ts +0 -14
- package/dist/warp/identity-resolver.d.ts.map +0 -1
- package/dist/warp/identity-resolver.js +0 -31
- package/dist/warp/identity-resolver.js.map +0 -1
- package/dist/warp/indexer-git.d.ts +0 -22
- package/dist/warp/indexer-git.d.ts.map +0 -1
- package/dist/warp/indexer-git.js +0 -148
- package/dist/warp/indexer-git.js.map +0 -1
- package/dist/warp/indexer-graph.d.ts +0 -17
- package/dist/warp/indexer-graph.d.ts.map +0 -1
- package/dist/warp/indexer-graph.js +0 -179
- package/dist/warp/indexer-graph.js.map +0 -1
- package/dist/warp/indexer-model.d.ts +0 -51
- package/dist/warp/indexer-model.d.ts.map +0 -1
- package/dist/warp/indexer-model.js +0 -21
- package/dist/warp/indexer-model.js.map +0 -1
- package/dist/warp/indexer.d.ts +0 -9
- package/dist/warp/indexer.d.ts.map +0 -1
- package/dist/warp/indexer.js +0 -112
- package/dist/warp/indexer.js.map +0 -1
- package/dist/warp/symbol-identity.d.ts +0 -11
- package/dist/warp/symbol-identity.d.ts.map +0 -1
- package/dist/warp/symbol-identity.js +0 -67
- package/dist/warp/symbol-identity.js.map +0 -1
- package/src/adapters/canonical-json.ts +0 -56
- package/src/adapters/node-fs.ts +0 -43
- package/src/adapters/node-git.ts +0 -47
- package/src/adapters/node-process-runner.ts +0 -27
- package/src/adapters/repo-paths.ts +0 -22
- package/src/adapters/rotating-ndjson-log.ts +0 -66
- package/src/api/index.ts +0 -107
- package/src/api/repo-local-graft.ts +0 -21
- package/src/api/repo-workspace.ts +0 -34
- package/src/api/tool-bridge.ts +0 -21
- package/src/cli/activity-render.ts +0 -112
- package/src/cli/cli-error.ts +0 -153
- package/src/cli/command-parser.ts +0 -302
- package/src/cli/entrypoint.ts +0 -18
- package/src/cli/index-cmd.ts +0 -94
- package/src/cli/index-model.ts +0 -76
- package/src/cli/init-bootstrap.ts +0 -47
- package/src/cli/init-client-config.ts +0 -299
- package/src/cli/init-model.ts +0 -229
- package/src/cli/init-render.ts +0 -54
- package/src/cli/init-target-hooks.ts +0 -93
- package/src/cli/init.ts +0 -122
- package/src/cli/json-document.ts +0 -144
- package/src/cli/local-history-dag-model.ts +0 -437
- package/src/cli/local-history-dag-render.ts +0 -133
- package/src/cli/local-history-dag.ts +0 -103
- package/src/cli/main.ts +0 -150
- package/src/cli/migrate-local-history.ts +0 -118
- package/src/cli/peer-command.ts +0 -59
- package/src/contracts/capabilities.ts +0 -450
- package/src/contracts/causal-ontology.ts +0 -627
- package/src/contracts/causal-surface-next-action.ts +0 -18
- package/src/contracts/json-object.ts +0 -28
- package/src/contracts/mcp-runtime.ts +0 -16
- package/src/contracts/output-schema-cli.ts +0 -70
- package/src/contracts/output-schema-fragments.ts +0 -831
- package/src/contracts/output-schema-mcp.ts +0 -282
- package/src/contracts/output-schema-meta.ts +0 -119
- package/src/contracts/output-schemas.ts +0 -1230
- package/src/git/diff.ts +0 -100
- package/src/git/target-git-hook-bootstrap.ts +0 -56
- package/src/guards/stream-boundary.ts +0 -110
- package/src/hooks/posttooluse-read.ts +0 -54
- package/src/hooks/pretooluse-read.ts +0 -52
- package/src/hooks/read-governor.ts +0 -95
- package/src/hooks/read-messages.ts +0 -53
- package/src/hooks/shared.ts +0 -168
- package/src/index.ts +0 -1
- package/src/mcp/burden.ts +0 -123
- package/src/mcp/cache.ts +0 -7
- package/src/mcp/cached-file.ts +0 -1
- package/src/mcp/context.ts +0 -187
- package/src/mcp/control-plane/authz-storage.ts +0 -129
- package/src/mcp/control-plane/session-registry.ts +0 -115
- package/src/mcp/control-plane/status-projection.ts +0 -76
- package/src/mcp/control-plane/types.ts +0 -144
- package/src/mcp/daemon-bootstrap.ts +0 -100
- package/src/mcp/daemon-control-plane.ts +0 -310
- package/src/mcp/daemon-job-scheduler.ts +0 -279
- package/src/mcp/daemon-repos.ts +0 -99
- package/src/mcp/daemon-server.ts +0 -165
- package/src/mcp/daemon-session-host.ts +0 -230
- package/src/mcp/daemon-stdio-bridge.ts +0 -260
- package/src/mcp/daemon-worker-child-pool.ts +0 -213
- package/src/mcp/daemon-worker-inline-pool.ts +0 -46
- package/src/mcp/daemon-worker-pool.ts +0 -7
- package/src/mcp/daemon-worker-process.ts +0 -52
- package/src/mcp/daemon-worker-types.ts +0 -66
- package/src/mcp/metrics.ts +0 -176
- package/src/mcp/monitor-health.ts +0 -83
- package/src/mcp/monitor-persistence.ts +0 -54
- package/src/mcp/monitor-tick-job.ts +0 -102
- package/src/mcp/monitor-types.ts +0 -103
- package/src/mcp/persisted-local-history-graph.ts +0 -591
- package/src/mcp/persisted-local-history-policy.ts +0 -501
- package/src/mcp/persisted-local-history-views.ts +0 -250
- package/src/mcp/persisted-local-history.ts +0 -1621
- package/src/mcp/persistent-monitor-runtime.ts +0 -445
- package/src/mcp/policy.ts +0 -75
- package/src/mcp/receipt.ts +0 -201
- package/src/mcp/repo-concurrency.ts +0 -392
- package/src/mcp/repo-overview/filter.ts +0 -44
- package/src/mcp/repo-overview/types.ts +0 -63
- package/src/mcp/repo-overview/view-projection.ts +0 -90
- package/src/mcp/repo-state-git.ts +0 -247
- package/src/mcp/repo-state-observation.ts +0 -203
- package/src/mcp/repo-state-transition.ts +0 -151
- package/src/mcp/repo-state-types.ts +0 -107
- package/src/mcp/repo-state.ts +0 -146
- package/src/mcp/repo-tool-job.ts +0 -102
- package/src/mcp/repo-tool-worker-context.ts +0 -212
- package/src/mcp/repo-workspace.ts +0 -21
- package/src/mcp/run-capture-config.ts +0 -33
- package/src/mcp/runtime-causal-context.ts +0 -72
- package/src/mcp/runtime-observability.ts +0 -217
- package/src/mcp/runtime-staged-target.ts +0 -161
- package/src/mcp/runtime-workspace-overlay.ts +0 -255
- package/src/mcp/secret-scrub.ts +0 -89
- package/src/mcp/semantic-transition-guidance.ts +0 -60
- package/src/mcp/semantic-transition-summary.ts +0 -130
- package/src/mcp/server-context.ts +0 -223
- package/src/mcp/server-invocation.ts +0 -388
- package/src/mcp/server-tool-access.ts +0 -145
- package/src/mcp/server.ts +0 -265
- package/src/mcp/stdio-server.ts +0 -26
- package/src/mcp/stdio.ts +0 -3
- package/src/mcp/tool-registry.ts +0 -80
- package/src/mcp/tools/activity-view.ts +0 -325
- package/src/mcp/tools/budget.ts +0 -23
- package/src/mcp/tools/causal-attach.ts +0 -67
- package/src/mcp/tools/causal-status.ts +0 -58
- package/src/mcp/tools/changed-since.ts +0 -71
- package/src/mcp/tools/code-find.ts +0 -169
- package/src/mcp/tools/code-refs.ts +0 -470
- package/src/mcp/tools/code-show.ts +0 -262
- package/src/mcp/tools/daemon-monitors.ts +0 -14
- package/src/mcp/tools/daemon-repos.ts +0 -22
- package/src/mcp/tools/daemon-sessions.ts +0 -14
- package/src/mcp/tools/daemon-status.ts +0 -12
- package/src/mcp/tools/diagnostic-models.ts +0 -95
- package/src/mcp/tools/doctor.ts +0 -66
- package/src/mcp/tools/explain.ts +0 -84
- package/src/mcp/tools/file-outline.ts +0 -67
- package/src/mcp/tools/git-files.ts +0 -73
- package/src/mcp/tools/graft-diff.ts +0 -35
- package/src/mcp/tools/map-collector.ts +0 -338
- package/src/mcp/tools/map.ts +0 -185
- package/src/mcp/tools/monitor-pause.ts +0 -18
- package/src/mcp/tools/monitor-resume.ts +0 -18
- package/src/mcp/tools/monitor-start.ts +0 -20
- package/src/mcp/tools/monitor-stop.ts +0 -18
- package/src/mcp/tools/precision-live.ts +0 -158
- package/src/mcp/tools/precision-match.ts +0 -54
- package/src/mcp/tools/precision-paths.ts +0 -59
- package/src/mcp/tools/precision-query.ts +0 -127
- package/src/mcp/tools/precision-show.ts +0 -86
- package/src/mcp/tools/precision-visibility.ts +0 -44
- package/src/mcp/tools/precision-warp.ts +0 -90
- package/src/mcp/tools/precision.ts +0 -21
- package/src/mcp/tools/read-range.ts +0 -28
- package/src/mcp/tools/run-capture.ts +0 -149
- package/src/mcp/tools/safe-read.ts +0 -148
- package/src/mcp/tools/since.ts +0 -53
- package/src/mcp/tools/state.ts +0 -39
- package/src/mcp/tools/stats.ts +0 -24
- package/src/mcp/tools/workspace-authorizations.ts +0 -14
- package/src/mcp/tools/workspace-authorize.ts +0 -20
- package/src/mcp/tools/workspace-bind.ts +0 -25
- package/src/mcp/tools/workspace-rebind.ts +0 -25
- package/src/mcp/tools/workspace-revoke.ts +0 -18
- package/src/mcp/tools/workspace-status.ts +0 -12
- package/src/mcp/warp-pool.ts +0 -36
- package/src/mcp/workspace-read-observation-model.ts +0 -48
- package/src/mcp/workspace-read-observation.ts +0 -103
- package/src/mcp/workspace-router-capability.ts +0 -32
- package/src/mcp/workspace-router-history.ts +0 -233
- package/src/mcp/workspace-router-model.ts +0 -131
- package/src/mcp/workspace-router-resolution.ts +0 -71
- package/src/mcp/workspace-router-runtime.ts +0 -243
- package/src/mcp/workspace-router.ts +0 -681
- package/src/metrics/logger.ts +0 -40
- package/src/metrics/types.ts +0 -40
- package/src/operations/cached-file.ts +0 -40
- package/src/operations/diff-identity.ts +0 -127
- package/src/operations/file-outline.ts +0 -48
- package/src/operations/graft-diff.ts +0 -162
- package/src/operations/observation-cache.ts +0 -149
- package/src/operations/read-range.ts +0 -64
- package/src/operations/repo-workspace.ts +0 -339
- package/src/operations/result-dto.ts +0 -23
- package/src/operations/safe-read.ts +0 -118
- package/src/operations/state.ts +0 -66
- package/src/operations/structured-buffer-compare.ts +0 -429
- package/src/operations/structured-buffer-model.ts +0 -456
- package/src/operations/structured-buffer-query.ts +0 -794
- package/src/operations/structured-buffer.ts +0 -181
- package/src/parser/diff.ts +0 -313
- package/src/parser/lang.ts +0 -71
- package/src/parser/markdown.ts +0 -197
- package/src/parser/outline.ts +0 -316
- package/src/parser/runtime.ts +0 -71
- package/src/parser/types.ts +0 -75
- package/src/policy/evaluate.ts +0 -178
- package/src/policy/graftignore.ts +0 -6
- package/src/policy/types.ts +0 -87
- package/src/ports/codec.ts +0 -13
- package/src/ports/filesystem.ts +0 -18
- package/src/ports/git.ts +0 -16
- package/src/ports/guards.ts +0 -68
- package/src/ports/process-runner.ts +0 -22
- package/src/ports/warp.ts +0 -55
- package/src/release/security-gate.ts +0 -102
- package/src/session/tracker.ts +0 -145
- package/src/session/types.ts +0 -23
- package/src/version.ts +0 -3
- package/src/warp/identity-resolver.ts +0 -35
- package/src/warp/indexer-git.ts +0 -182
- package/src/warp/indexer-graph.ts +0 -276
- package/src/warp/indexer-model.ts +0 -69
- package/src/warp/indexer.ts +0 -186
- package/src/warp/observers.ts +0 -100
- package/src/warp/open.ts +0 -93
- package/src/warp/plumbing.d.ts +0 -15
- package/src/warp/symbol-identity.ts +0 -100
- package/src/warp/writer-id.ts +0 -30
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// WARP-based Structural Log — replaces git log SHA walking
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
import { observeGraph } from "./context.js";
|
|
5
|
+
/**
|
|
6
|
+
* Produce a structural log entirely from the WARP graph.
|
|
7
|
+
*
|
|
8
|
+
* Walks commit nodes in reverse tick order (most recent first),
|
|
9
|
+
* traverses outgoing adds/changes/removes edges per commit to
|
|
10
|
+
* collect symbol changes. Zero git subprocess calls.
|
|
11
|
+
*/
|
|
12
|
+
export async function structuralLogFromGraph(ctx, options) {
|
|
13
|
+
const limit = options?.limit ?? 20;
|
|
14
|
+
const pathFilter = options?.path;
|
|
15
|
+
// Query all commit nodes
|
|
16
|
+
const obs = await observeGraph(ctx, {
|
|
17
|
+
match: ["commit:*", "sym:*"],
|
|
18
|
+
expose: ["sha", "tick", "message", "author", "date", "name", "kind", "signature", "exported"],
|
|
19
|
+
});
|
|
20
|
+
const commitResult = await obs.query()
|
|
21
|
+
.match("commit:*")
|
|
22
|
+
.select(["id", "props"])
|
|
23
|
+
.run();
|
|
24
|
+
const commits = [];
|
|
25
|
+
for (const node of commitResult.nodes) {
|
|
26
|
+
if (node.id === undefined)
|
|
27
|
+
continue;
|
|
28
|
+
const props = node.props ?? {};
|
|
29
|
+
commits.push({
|
|
30
|
+
id: node.id,
|
|
31
|
+
sha: typeof props["sha"] === "string" ? props["sha"] : node.id.slice("commit:".length),
|
|
32
|
+
tick: typeof props["tick"] === "number" ? props["tick"] : 0,
|
|
33
|
+
message: typeof props["message"] === "string" ? props["message"] : "",
|
|
34
|
+
author: typeof props["author"] === "string" ? props["author"] : "",
|
|
35
|
+
date: typeof props["date"] === "string" ? props["date"] : "",
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (commits.length === 0)
|
|
39
|
+
return [];
|
|
40
|
+
// Sort by tick descending (most recent first)
|
|
41
|
+
commits.sort((a, b) => b.tick - a.tick);
|
|
42
|
+
const scoped = commits.slice(0, limit);
|
|
43
|
+
// For each commit, traverse edges to get symbol changes
|
|
44
|
+
const edgeLabels = [
|
|
45
|
+
{ label: "adds", key: "added" },
|
|
46
|
+
{ label: "changes", key: "changed" },
|
|
47
|
+
{ label: "removes", key: "removed" },
|
|
48
|
+
];
|
|
49
|
+
const entries = [];
|
|
50
|
+
for (const commit of scoped) {
|
|
51
|
+
const added = [];
|
|
52
|
+
const changed = [];
|
|
53
|
+
const removed = [];
|
|
54
|
+
for (const { label, key } of edgeLabels) {
|
|
55
|
+
const symIds = await obs.traverse.bfs(commit.id, {
|
|
56
|
+
dir: "out",
|
|
57
|
+
labelFilter: label,
|
|
58
|
+
maxDepth: 1,
|
|
59
|
+
});
|
|
60
|
+
for (const symId of symIds) {
|
|
61
|
+
if (!symId.startsWith("sym:"))
|
|
62
|
+
continue;
|
|
63
|
+
const withoutPrefix = symId.slice("sym:".length);
|
|
64
|
+
const lastColon = withoutPrefix.lastIndexOf(":");
|
|
65
|
+
if (lastColon === -1)
|
|
66
|
+
continue;
|
|
67
|
+
const filePath = withoutPrefix.slice(0, lastColon);
|
|
68
|
+
const symbolName = withoutPrefix.slice(lastColon + 1);
|
|
69
|
+
if (pathFilter !== undefined && !filePath.startsWith(pathFilter))
|
|
70
|
+
continue;
|
|
71
|
+
const symProps = await obs.getNodeProps(symId);
|
|
72
|
+
const kind = typeof symProps?.["kind"] === "string" ? symProps["kind"] : "unknown";
|
|
73
|
+
const signature = typeof symProps?.["signature"] === "string" ? symProps["signature"] : undefined;
|
|
74
|
+
const exported = typeof symProps?.["exported"] === "boolean" ? symProps["exported"] : false;
|
|
75
|
+
const change = {
|
|
76
|
+
name: symbolName,
|
|
77
|
+
kind,
|
|
78
|
+
signature,
|
|
79
|
+
exported,
|
|
80
|
+
filePath,
|
|
81
|
+
};
|
|
82
|
+
if (key === "added")
|
|
83
|
+
added.push(change);
|
|
84
|
+
else if (key === "changed")
|
|
85
|
+
changed.push(change);
|
|
86
|
+
else
|
|
87
|
+
removed.push(change);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const totalChanges = added.length + changed.length + removed.length;
|
|
91
|
+
entries.push({
|
|
92
|
+
sha: commit.sha,
|
|
93
|
+
author: commit.author,
|
|
94
|
+
date: commit.date,
|
|
95
|
+
message: commit.message,
|
|
96
|
+
symbols: { added, removed, changed },
|
|
97
|
+
summary: totalChanges === 0
|
|
98
|
+
? "No structural changes."
|
|
99
|
+
: `${String(added.length)} added, ${String(changed.length)} changed, ${String(removed.length)} removed.`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return entries;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=warp-structural-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warp-structural-log.js","sourceRoot":"","sources":["../../src/warp/warp-structural-log.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,2DAA2D;AAC3D,8EAA8E;AAI9E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8B5C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAAgB,EAChB,OAAwB;IAExB,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;IACnC,MAAM,UAAU,GAAG,OAAO,EAAE,I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,IAAI,CAAC,MAAM,CAAC,CAAC;qBACnC,IAAI,GAAG,KAAK,SAAS;oBAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;;oBAC5C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAEpE,OAAO,CAAC,IAAI,CAAC;YACX,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;YACpC,OAAO,EAAE,YAAY,KAAK,CAAC;gBACzB,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW;SAC3G,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/docs/CLI.md
CHANGED
|
@@ -8,9 +8,12 @@ flowchart LR
|
|
|
8
8
|
A --> C[Namespaces]
|
|
9
9
|
B --> B1[init]
|
|
10
10
|
B --> B2[serve]
|
|
11
|
-
B --> B3[daemon]
|
|
12
|
-
B --> B4[
|
|
13
|
-
B --> B5[
|
|
11
|
+
B --> B3[serve --runtime daemon]
|
|
12
|
+
B --> B4[daemon]
|
|
13
|
+
B --> B5[daemon status]
|
|
14
|
+
B --> B6[index]
|
|
15
|
+
B --> B7[migrate local-history]
|
|
16
|
+
B --> B8[enhance]
|
|
14
17
|
C --> C1[read]
|
|
15
18
|
C --> C2[struct]
|
|
16
19
|
C --> C3[symbol]
|
|
@@ -19,28 +22,45 @@ flowchart LR
|
|
|
19
22
|
|
|
20
23
|
## What it is for
|
|
21
24
|
- bootstrap and setup via `graft init`
|
|
25
|
+
- repo-local stdio MCP via `graft serve`
|
|
26
|
+
- daemon-backed stdio MCP via `graft serve --runtime daemon`
|
|
27
|
+
- read-only daemon status inspection via `graft daemon status`
|
|
28
|
+
- bounded, lazy WARP refresh via `graft index --path <path>`
|
|
22
29
|
- one-time legacy import via `graft migrate local-history`
|
|
30
|
+
- Git-facing structural review summaries via `git graft enhance`
|
|
23
31
|
- local debugging and dogfooding of MCP peer commands
|
|
24
32
|
- human-facing inspection of bounded state such as:
|
|
25
33
|
- `graft diag activity`
|
|
26
34
|
- `graft diag local-history-dag`
|
|
27
35
|
- `graft diag doctor`
|
|
36
|
+
- `graft doctor --sludge`
|
|
28
37
|
- `graft diag stats`
|
|
38
|
+
- `graft symbol difficulty`
|
|
29
39
|
|
|
30
40
|
## Core namespaces
|
|
31
41
|
- `read` — bounded reads and change checks
|
|
32
42
|
- `struct` — structural diff / since / map
|
|
33
|
-
- `symbol` — precision show / find
|
|
43
|
+
- `symbol` — precision show / find / blame / difficulty
|
|
34
44
|
- `diag` — activity, local-history-dag, doctor, explain, stats, capture
|
|
35
45
|
|
|
36
46
|
## Release-facing commands
|
|
37
47
|
```bash
|
|
48
|
+
graft serve
|
|
49
|
+
graft serve --runtime daemon
|
|
50
|
+
graft daemon status
|
|
51
|
+
graft daemon status --socket /path/to/mcp.sock
|
|
52
|
+
graft index --path src/app.ts --json
|
|
38
53
|
graft migrate local-history --json
|
|
39
54
|
graft diag activity --json
|
|
40
55
|
graft diag local-history-dag --json
|
|
41
56
|
graft diag doctor --json
|
|
57
|
+
graft doctor --sludge --json
|
|
42
58
|
graft symbol find 'create*' --json
|
|
59
|
+
graft symbol difficulty createUser --path src/users.ts --json
|
|
43
60
|
graft struct diff --json
|
|
61
|
+
git graft enhance --since HEAD~1
|
|
62
|
+
git-graft enhance --since HEAD~1
|
|
63
|
+
git-graft enhance --since HEAD~1 --json
|
|
44
64
|
```
|
|
45
65
|
|
|
46
66
|
## Repo-local invocation
|
|
@@ -53,10 +73,54 @@ pnpm graft diag activity
|
|
|
53
73
|
|
|
54
74
|
Bare `graft ...` only works when the package is installed or linked onto your `PATH`.
|
|
55
75
|
|
|
76
|
+
`git graft enhance --since <ref> [--head <ref>] [--json]` is the
|
|
77
|
+
installed Git external-command form for the release-facing structural
|
|
78
|
+
review aggregator. `git-graft enhance --since <ref>` is the direct
|
|
79
|
+
package binary form. Both route through the same top-level `enhance`
|
|
80
|
+
parser path. The command composes the shipped structural-since and
|
|
81
|
+
export-surface facts into a concise review summary; it does not wrap
|
|
82
|
+
arbitrary Git subcommands or expand into provenance, blame, reference, or
|
|
83
|
+
write-tool behavior.
|
|
84
|
+
|
|
56
85
|
`graft diag activity` is the current human-facing between-commit surface. It reports bounded local `artifact_history`, not canonical provenance, and now renders a textual operator summary by default. Use `--json` when you want the structured machine-readable form.
|
|
57
86
|
|
|
58
87
|
`graft diag local-history-dag` is a CLI-only debug surface over the repo-local WARP graph. It renders a bounded event-centric DAG for local history through Bijou's `dag()` component. In interactive terminals that means the Bijou DAG layout; in pipes or non-TTY contexts it degrades to Bijou's truthful pipe-mode graph listing.
|
|
59
88
|
|
|
89
|
+
`graft daemon status` is the read-only daemon status surface. It connects
|
|
90
|
+
to an already-running daemon, builds a deterministic status model from
|
|
91
|
+
existing daemon read tools, and renders daemon health, sessions,
|
|
92
|
+
workspace posture, monitors, scheduler pressure, and worker pressure.
|
|
93
|
+
Use `--socket <path>` to inspect a non-default daemon socket. This first
|
|
94
|
+
slice does not authorize, revoke, bind, rebind, pause, resume, start, or
|
|
95
|
+
stop daemon resources.
|
|
96
|
+
|
|
97
|
+
`graft index` follows the lazy-index policy. Use `--path <path>` to refresh a
|
|
98
|
+
specific tracked source file at `HEAD`; read/search surfaces also opportunistically
|
|
99
|
+
refresh the files they touch. Unbounded whole-repo indexing is guarded and returns
|
|
100
|
+
a structured refusal when the request would write too many file patches at once.
|
|
101
|
+
|
|
102
|
+
## MCP Runtime Selection
|
|
103
|
+
|
|
104
|
+
`graft serve` is repo-local stdio MCP. The launched process owns one
|
|
105
|
+
repo-local workspace rooted at the current checkout.
|
|
106
|
+
|
|
107
|
+
`graft serve --runtime daemon` is daemon-backed stdio MCP. The launched
|
|
108
|
+
process is a bridge to the local daemon `/mcp` surface. If the daemon is
|
|
109
|
+
not already healthy, the bridge starts it and waits for readiness. Add
|
|
110
|
+
`--no-autostart` to fail instead of starting a daemon, and add
|
|
111
|
+
`--socket <path>` to target a non-default daemon socket.
|
|
112
|
+
|
|
113
|
+
Generated MCP config uses the same distinction:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
graft init --write-codex-mcp
|
|
117
|
+
graft init --mcp-runtime daemon --write-codex-mcp
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The first command emits `args = ["-y", "@flyingrobots/graft", "serve"]`.
|
|
121
|
+
The second emits
|
|
122
|
+
`args = ["-y", "@flyingrobots/graft", "serve", "--runtime", "daemon"]`.
|
|
123
|
+
|
|
60
124
|
## Related docs
|
|
61
125
|
- [README](../README.md)
|
|
62
126
|
- [Setup Guide](./SETUP.md)
|
package/docs/MCP.md
CHANGED
|
@@ -27,6 +27,25 @@ This is the default repo-local MCP posture. The current checkout is the
|
|
|
27
27
|
active workspace, so there is no separate daemon authorization or
|
|
28
28
|
binding step.
|
|
29
29
|
|
|
30
|
+
### Daemon-backed stdio MCP
|
|
31
|
+
```bash
|
|
32
|
+
npx @flyingrobots/graft serve --runtime daemon
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This keeps compatibility with MCP clients that can launch only a stdio
|
|
36
|
+
command while routing MCP traffic to the local daemon `/mcp` surface.
|
|
37
|
+
The bridge auto-starts the daemon when it is missing, waits for
|
|
38
|
+
`/healthz`, then proxies stdio traffic to the daemon. Use
|
|
39
|
+
`--no-autostart` to require an already-running daemon:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx @flyingrobots/graft serve --runtime daemon --no-autostart
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Daemon-backed sessions start unbound. Repository-scoped tools fail
|
|
46
|
+
until the session is authorized and bound through the workspace control
|
|
47
|
+
plane.
|
|
48
|
+
|
|
30
49
|
### Local Daemon
|
|
31
50
|
```bash
|
|
32
51
|
npx @flyingrobots/graft daemon
|
|
@@ -43,13 +62,17 @@ flow:
|
|
|
43
62
|
|
|
44
63
|
## Key Tool Groups
|
|
45
64
|
- **Bounded Reads**: `safe_read`, `file_outline`, `read_range`, `changed_since`
|
|
65
|
+
- **Governed Edits**: `graft_edit`
|
|
46
66
|
- **Structural History**: `graft_diff`, `graft_since`, `graft_map`
|
|
67
|
+
- **Structural Metrics**: `graft_churn`, `graft_difficulty`
|
|
47
68
|
- **Precision**: `code_show`, `code_find`, `code_refs`
|
|
48
69
|
- **Activity & Footing**: `activity_view`, `causal_status`, `causal_attach`, `doctor`
|
|
49
70
|
- **Daemon Control Plane**: `workspace_authorizations`, `workspace_authorize`, `workspace_bind`, `workspace_status`, `workspace_rebind`, `workspace_revoke`, `daemon_status`, `daemon_repos`, `daemon_sessions`, `daemon_monitors`, `monitor_*`
|
|
50
71
|
|
|
51
72
|
## Current Truth
|
|
52
73
|
- MCP is the primary agent surface.
|
|
74
|
+
- `graft serve` is repo-local stdio; `graft serve --runtime daemon` is
|
|
75
|
+
the daemon-backed stdio bridge.
|
|
53
76
|
- Responses carry versioned `_schema` metadata and `_receipt` decision data.
|
|
54
77
|
- `activity_view` provides bounded local `artifact_history` anchored to Git `HEAD`.
|
|
55
78
|
|
package/docs/SETUP.md
CHANGED
|
@@ -29,10 +29,9 @@ has a repo-local instruction layer alongside the MCP config.
|
|
|
29
29
|
|
|
30
30
|
Idempotent — safe to run again without duplicating entries.
|
|
31
31
|
|
|
32
|
-
`init` bootstraps repo-local files and client config.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
tools.
|
|
32
|
+
`init` bootstraps repo-local files and client config. The default MCP
|
|
33
|
+
runtime is repo-local stdio. Use `--mcp-runtime daemon` only when you
|
|
34
|
+
want generated MCP config to launch the daemon-backed stdio bridge.
|
|
36
35
|
|
|
37
36
|
## Choose Your Setup Path
|
|
38
37
|
|
|
@@ -48,9 +47,10 @@ whole setup guide front-to-back.
|
|
|
48
47
|
| Continue MCP in this repo | `npx @flyingrobots/graft init --write-continue-mcp` | Writes or merges `.continue/config.json` |
|
|
49
48
|
| Cline MCP in this repo | `npx @flyingrobots/graft init --write-cline-mcp` | Writes or merges `.vscode/cline_mcp_settings.json` |
|
|
50
49
|
| Codex MCP in this repo | `npx @flyingrobots/graft init --write-codex-mcp` | Writes or merges `.codex/config.toml` and seeds `AGENTS.md` |
|
|
50
|
+
| Daemon-backed MCP in this repo | `npx @flyingrobots/graft init --mcp-runtime daemon --write-*-mcp` | Writes or merges client config that launches `graft serve --runtime daemon` |
|
|
51
51
|
| Manual review before any config file write | `npx @flyingrobots/graft init` | Scaffolds repo files and prints the manual MCP / hook snippets |
|
|
52
|
-
| Global config instead of project-local config | Edit your client's global MCP settings manually | Use the
|
|
53
|
-
| Another MCP-compatible client | Add graft manually to that client's MCP config | Use `command = npx
|
|
52
|
+
| Global config instead of project-local config | Edit your client's global MCP settings manually | Use the repo-local or daemon-backed `serve` args shown below |
|
|
53
|
+
| Another MCP-compatible client | Add graft manually to that client's MCP config | Use `command = npx` with either `serve` or `serve --runtime daemon` |
|
|
54
54
|
|
|
55
55
|
## Governed Read Posture By Client
|
|
56
56
|
|
|
@@ -75,8 +75,8 @@ distinct runtime paths:
|
|
|
75
75
|
Windows named pipe, with `/mcp` for MCP traffic and `/healthz` for
|
|
76
76
|
liveness
|
|
77
77
|
|
|
78
|
-
The daemon is
|
|
79
|
-
|
|
78
|
+
The daemon is available as an explicit opt-in MCP bootstrap runtime. It
|
|
79
|
+
is not the default because it uses a stricter contract:
|
|
80
80
|
|
|
81
81
|
- daemon sessions start unbound
|
|
82
82
|
- workspace binding requires prior authorization through the daemon
|
|
@@ -103,14 +103,63 @@ Daemon control-plane inspection now exists through MCP tools:
|
|
|
103
103
|
- `workspace_rebind`
|
|
104
104
|
- `workspace_revoke`
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
Human operators can inspect the same read-side daemon posture without
|
|
107
|
+
opening raw MCP JSON:
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
```bash
|
|
110
|
+
npx @flyingrobots/graft daemon status
|
|
111
|
+
npx @flyingrobots/graft daemon status --socket /path/to/mcp.sock
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`daemon status` is read-only. It shows daemon health, session counts,
|
|
115
|
+
workspace authorization/bind posture, monitor summary, scheduler
|
|
116
|
+
pressure, and worker pressure. It does not authorize, revoke, bind,
|
|
117
|
+
rebind, pause, resume, start, or stop daemon resources.
|
|
118
|
+
|
|
119
|
+
Practical daemon-backed MCP first-use sequence:
|
|
120
|
+
|
|
121
|
+
1. configure your MCP client with `graft serve --runtime daemon`
|
|
122
|
+
2. let the bridge auto-start the daemon, or start `npx @flyingrobots/graft daemon`
|
|
110
123
|
3. call `workspace_authorize` with the target `cwd`
|
|
111
124
|
4. call `workspace_bind` with the target `cwd`
|
|
112
125
|
5. then use repository-scoped tools such as `safe_read` or `graft_map`
|
|
113
126
|
|
|
127
|
+
### MCP runtime selection
|
|
128
|
+
|
|
129
|
+
Repo-local stdio is the default and remains the simplest path:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"graft": {
|
|
135
|
+
"command": "npx",
|
|
136
|
+
"args": ["-y", "@flyingrobots/graft", "serve"]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Daemon-backed stdio keeps the same MCP client shape but changes the
|
|
143
|
+
runtime:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"mcpServers": {
|
|
148
|
+
"graft": {
|
|
149
|
+
"command": "npx",
|
|
150
|
+
"args": ["-y", "@flyingrobots/graft", "serve", "--runtime", "daemon"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Use repo-local stdio when you want one MCP server bound directly to the
|
|
157
|
+
current checkout. Use daemon-backed stdio when you want daemon-only
|
|
158
|
+
capabilities such as shared worker pools, persistent monitors, and
|
|
159
|
+
daemon control-plane inspection. Daemon-backed sessions start unbound;
|
|
160
|
+
repository-scoped tools require `workspace_authorize` and
|
|
161
|
+
`workspace_bind`.
|
|
162
|
+
|
|
114
163
|
### One-step bootstrap
|
|
115
164
|
|
|
116
165
|
Write project-local client config directly when you want `init` to do
|
|
@@ -125,8 +174,20 @@ npx @flyingrobots/graft init --write-cline-mcp
|
|
|
125
174
|
npx @flyingrobots/graft init --write-codex-mcp
|
|
126
175
|
```
|
|
127
176
|
|
|
177
|
+
Add `--mcp-runtime daemon` before a `--write-*-mcp` flag to generate
|
|
178
|
+
daemon-backed stdio config instead of the default repo-local stdio
|
|
179
|
+
config:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npx @flyingrobots/graft init --mcp-runtime daemon --write-codex-mcp
|
|
183
|
+
```
|
|
184
|
+
|
|
128
185
|
Supported write flags:
|
|
129
186
|
|
|
187
|
+
- `--mcp-runtime repo-local` -> generate repo-local `graft serve` MCP
|
|
188
|
+
config; this is the default
|
|
189
|
+
- `--mcp-runtime daemon` -> generate `graft serve --runtime daemon` MCP
|
|
190
|
+
config
|
|
130
191
|
- `--write-claude-mcp` -> writes or merges `.mcp.json`
|
|
131
192
|
- `--write-claude-hooks` -> writes or merges `.claude/settings.json`
|
|
132
193
|
- `--write-cursor-mcp` -> writes or merges `.cursor/mcp.json`
|
|
@@ -143,7 +204,7 @@ For automation, CLI commands support `--json`:
|
|
|
143
204
|
|
|
144
205
|
```bash
|
|
145
206
|
npx @flyingrobots/graft init --json
|
|
146
|
-
npx @flyingrobots/graft index --json
|
|
207
|
+
npx @flyingrobots/graft index --path src/app.ts --json
|
|
147
208
|
npx @flyingrobots/graft read safe src/app.ts --json
|
|
148
209
|
npx @flyingrobots/graft struct diff --json
|
|
149
210
|
npx @flyingrobots/graft symbol find 'create*' --json
|
|
@@ -155,7 +216,7 @@ Grouped CLI namespaces:
|
|
|
155
216
|
|
|
156
217
|
- `read` — `safe`, `outline`, `range`, `changed`
|
|
157
218
|
- `struct` — `diff`, `since`, `map`
|
|
158
|
-
- `symbol` — `show`, `find`
|
|
219
|
+
- `symbol` — `show`, `find`, `blame`, `difficulty`
|
|
159
220
|
- `diag` — `activity`, `doctor`, `explain`, `stats`, `capture`
|
|
160
221
|
|
|
161
222
|
## MCP Configuration
|
|
@@ -163,6 +224,24 @@ Grouped CLI namespaces:
|
|
|
163
224
|
Graft runs as an MCP server over stdio. Add it to your editor or
|
|
164
225
|
agent's MCP configuration.
|
|
165
226
|
|
|
227
|
+
The default runtime is repo-local:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
npx @flyingrobots/graft serve
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
The daemon-backed runtime is explicit:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npx @flyingrobots/graft serve --runtime daemon
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
When the daemon-backed bridge cannot reach a daemon, it attempts to
|
|
240
|
+
start one and waits for `/healthz`. Use `--no-autostart` when you want
|
|
241
|
+
startup to fail instead of launching the daemon. Once connected,
|
|
242
|
+
daemon sessions remain unbound until authorized and bound through the
|
|
243
|
+
daemon workspace tools.
|
|
244
|
+
|
|
166
245
|
### Claude Code
|
|
167
246
|
|
|
168
247
|
Add to `.mcp.json` in your project root (per-project) or
|
|
@@ -345,7 +424,7 @@ Add to `.claude/settings.json` in your project root:
|
|
|
345
424
|
"hooks": [
|
|
346
425
|
{
|
|
347
426
|
"type": "command",
|
|
348
|
-
"command": "node
|
|
427
|
+
"command": "node node_modules/@flyingrobots/graft/dist/hooks/pretooluse-read.js"
|
|
349
428
|
}
|
|
350
429
|
]
|
|
351
430
|
}
|
|
@@ -356,7 +435,7 @@ Add to `.claude/settings.json` in your project root:
|
|
|
356
435
|
"hooks": [
|
|
357
436
|
{
|
|
358
437
|
"type": "command",
|
|
359
|
-
"command": "node
|
|
438
|
+
"command": "node node_modules/@flyingrobots/graft/dist/hooks/posttooluse-read.js"
|
|
360
439
|
}
|
|
361
440
|
]
|
|
362
441
|
}
|
|
@@ -371,12 +450,16 @@ Project-local shortcut:
|
|
|
371
450
|
npx @flyingrobots/graft init --write-claude-hooks
|
|
372
451
|
```
|
|
373
452
|
|
|
374
|
-
|
|
375
|
-
|
|
453
|
+
Rerunning this command also upgrades generated v0.7.0 hook commands
|
|
454
|
+
that pointed at `src/hooks/*.ts` to the published `dist/hooks/*.js`
|
|
455
|
+
entry points.
|
|
376
456
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
457
|
+
If developing graft itself, run `pnpm build` and replace the
|
|
458
|
+
`node_modules/...` paths with local paths:
|
|
459
|
+
|
|
460
|
+
```text
|
|
461
|
+
dist/hooks/pretooluse-read.js (PreToolUse)
|
|
462
|
+
dist/hooks/posttooluse-read.js (PostToolUse)
|
|
380
463
|
```
|
|
381
464
|
|
|
382
465
|
### PreToolUse — ban enforcement
|
|
@@ -452,9 +535,10 @@ add to `.claude/settings.local.json`:
|
|
|
452
535
|
| `graft_map` | Structural directory map of files and symbols under a path, with explicit denied-file reporting. |
|
|
453
536
|
| `code_show` | Focus on a symbol by name and return its source with line metadata. |
|
|
454
537
|
| `code_find` | Search symbols across the project by approximate name or glob pattern, with optional kind/path filter. |
|
|
538
|
+
| `graft_difficulty` | Refactor difficulty score for a symbol. Combines WARP churn curvature with reference-edge friction and returns the scalar plus the underlying factors. |
|
|
455
539
|
| `code_refs` | Search import sites, callsites, property access, or literal text references with explicit text-fallback provenance, pattern, and scope. |
|
|
456
540
|
| `activity_view` | Bounded between-commit activity for the active workspace, including commit anchor, grouped recent activity, and degraded posture. |
|
|
457
|
-
| `doctor` | Runtime health check including layered-worldline repo state and burden summary. |
|
|
541
|
+
| `doctor` | Runtime health check including layered-worldline repo state and burden summary. Accepts an opt-in `sludge` scan for parser-backed structural smell signals. |
|
|
458
542
|
| `stats` | Decision metrics for the current server session, including burden by tool kind. |
|
|
459
543
|
| `explain` | Human-readable meaning and recommended action for a reason code. |
|
|
460
544
|
| `run_capture` | Execute a shell command and return the last N lines of output (default 60). This tool is outside graft's bounded-read policy contract, responses include an explicit `policyBoundary` marker, log persistence can be disabled, and persisted output is redacted for obvious secrets by default. |
|
|
@@ -464,7 +548,7 @@ add to `.claude/settings.local.json`:
|
|
|
464
548
|
MCP responses include versioned `_schema` metadata and `_receipt`
|
|
465
549
|
fields. CLI peer commands also return versioned `_schema` metadata;
|
|
466
550
|
the declared contracts live in `src/contracts/output-schemas.ts`.
|
|
467
|
-
| `doctor` | Runtime health check. Shows project root, parser status, active thresholds, session depth, message count, and a compact burden summary. |
|
|
551
|
+
| `doctor` | Runtime health check. Shows project root, parser status, active thresholds, session depth, message count, and a compact burden summary. With `sludge: true`, reports parser-backed structural smell signals. |
|
|
468
552
|
| `set_budget` | Declare a session byte budget. Graft tightens read thresholds as the budget drains — no single read may consume more than 5% of remaining budget. Call once at session start. |
|
|
469
553
|
| `explain` | Explain a graft reason code. Returns human-readable meaning and recommended next action for any code (e.g., `BINARY`, `BUDGET_CAP`). Case-insensitive. |
|
|
470
554
|
| `stats` | Decision metrics for the current session. Total reads, outlines, refusals, cache hits, bytes avoided, and returned-byte burden by tool kind. |
|
|
@@ -479,8 +563,8 @@ Declared output contracts live in `src/contracts/output-schemas.ts`.
|
|
|
479
563
|
|
|
480
564
|
## What the agent sees
|
|
481
565
|
|
|
482
|
-
Once configured, the agent gains
|
|
483
|
-
happens when it uses
|
|
566
|
+
Once configured, the agent gains the MCP tool surface. Here's what
|
|
567
|
+
happens when it uses those tools:
|
|
484
568
|
|
|
485
569
|
### Reading files
|
|
486
570
|
|
|
@@ -512,9 +596,10 @@ and its symbols (function signatures, class shapes, exports) in
|
|
|
512
596
|
one call. Denied files are surfaced explicitly instead of silently
|
|
513
597
|
disappearing.
|
|
514
598
|
|
|
515
|
-
Both tools work on the current working tree.
|
|
516
|
-
|
|
517
|
-
|
|
599
|
+
Both tools work on the current working tree. Persistent structural indexing is
|
|
600
|
+
lazy: use `graft index --path <path>` from the CLI to refresh one tracked source
|
|
601
|
+
file at `HEAD`, or let read/search surfaces opportunistically refresh the files
|
|
602
|
+
they touch. Unbounded whole-repo eager indexing is guarded.
|
|
518
603
|
|
|
519
604
|
### Structural navigation
|
|
520
605
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flyingrobots/graft",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Context governor and between-commit activity surface for coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.30.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"dist/parser/runtime.js",
|
|
11
|
+
"dist/operations/structured-buffer-model.js"
|
|
12
|
+
],
|
|
9
13
|
"exports": {
|
|
10
14
|
".": {
|
|
11
15
|
"types": "./dist/index.d.ts",
|
|
@@ -20,7 +24,6 @@
|
|
|
20
24
|
"files": [
|
|
21
25
|
"bin/",
|
|
22
26
|
"dist/",
|
|
23
|
-
"src/",
|
|
24
27
|
"ADVANCED_GUIDE.md",
|
|
25
28
|
"ARCHITECTURE.md",
|
|
26
29
|
"CHANGELOG.md",
|
|
@@ -37,14 +40,17 @@
|
|
|
37
40
|
"graft": "node ./bin/graft.js",
|
|
38
41
|
"build": "tsc -p tsconfig.build.json",
|
|
39
42
|
"prepack": "pnpm build",
|
|
40
|
-
"
|
|
43
|
+
"prepublishOnly": "pnpm release:check",
|
|
44
|
+
"test": "tsx scripts/run-isolated-tests.ts",
|
|
45
|
+
"test:local": "vitest run",
|
|
41
46
|
"test:watch": "vitest",
|
|
42
47
|
"lint": "eslint .",
|
|
43
48
|
"typecheck": "tsc --noEmit",
|
|
44
49
|
"pack:check": "pnpm pack --dry-run",
|
|
50
|
+
"guard:agent-worktrees": "tsx scripts/check-agent-worktree-hygiene.ts",
|
|
45
51
|
"security:check": "tsx scripts/check-release-security.ts",
|
|
46
52
|
"release:surface-gate": "vitest run --run test/unit/release/package-library-surface.test.ts test/unit/release/three-surface-capability-posture.test.ts",
|
|
47
|
-
"release:check": "pnpm lint && pnpm typecheck && pnpm release:surface-gate && pnpm test && pnpm security:check && pnpm pack:check"
|
|
53
|
+
"release:check": "pnpm guard:agent-worktrees && pnpm lint && pnpm typecheck && pnpm release:surface-gate && pnpm test && pnpm security:check && pnpm pack:check"
|
|
48
54
|
},
|
|
49
55
|
"engines": {
|
|
50
56
|
"node": ">=20.11.0"
|
|
@@ -85,7 +91,6 @@
|
|
|
85
91
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
86
92
|
"picomatch": "^4.0.4",
|
|
87
93
|
"tree-sitter-wasms": "0.1.13",
|
|
88
|
-
"tsx": "^4.21.0",
|
|
89
94
|
"web-tree-sitter": "^0.20.8",
|
|
90
95
|
"zod": "4.3.6"
|
|
91
96
|
},
|
|
@@ -95,6 +100,7 @@
|
|
|
95
100
|
"@types/picomatch": "^4.0.2",
|
|
96
101
|
"eslint": "^10.1.0",
|
|
97
102
|
"globals": "^17.4.0",
|
|
103
|
+
"tsx": "^4.21.0",
|
|
98
104
|
"typescript": "^6.0.2",
|
|
99
105
|
"typescript-eslint": "^8.58.0",
|
|
100
106
|
"vite": "^8.0.5",
|
|
@@ -104,7 +110,8 @@
|
|
|
104
110
|
"onlyBuiltDependencies": [],
|
|
105
111
|
"overrides": {
|
|
106
112
|
"vite": "^8.0.5",
|
|
107
|
-
"hono": ">=4.12.14"
|
|
113
|
+
"hono": ">=4.12.14",
|
|
114
|
+
"postcss": "8.5.12"
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
}
|
package/dist/ports/warp.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface WarpObserverLens {
|
|
2
|
-
readonly match: string | readonly string[];
|
|
3
|
-
readonly expose?: readonly string[] | undefined;
|
|
4
|
-
readonly redact?: readonly string[] | undefined;
|
|
5
|
-
}
|
|
6
|
-
export interface WarpObserverOptions {
|
|
7
|
-
readonly source?: {
|
|
8
|
-
readonly kind: "live";
|
|
9
|
-
readonly ceiling: number | null;
|
|
10
|
-
} | undefined;
|
|
11
|
-
}
|
|
12
|
-
export interface WarpEdge {
|
|
13
|
-
readonly from: string;
|
|
14
|
-
readonly to: string;
|
|
15
|
-
readonly label: string;
|
|
16
|
-
}
|
|
17
|
-
export interface WarpObserver {
|
|
18
|
-
getNodes(): Promise<string[]>;
|
|
19
|
-
getNodeProps(nodeId: string): Promise<Record<string, unknown> | null>;
|
|
20
|
-
getEdges(): Promise<readonly WarpEdge[]>;
|
|
21
|
-
}
|
|
22
|
-
export interface WarpPatchBuilder {
|
|
23
|
-
addNode(id: string): unknown;
|
|
24
|
-
setProperty(id: string, key: string, value: unknown): unknown;
|
|
25
|
-
addEdge(from: string, to: string, label: string): unknown;
|
|
26
|
-
removeNode(id: string): unknown;
|
|
27
|
-
removeEdge(from: string, to: string, label: string): unknown;
|
|
28
|
-
}
|
|
29
|
-
export interface WarpMaterializeReceiptOp {
|
|
30
|
-
readonly op: string;
|
|
31
|
-
readonly result: string;
|
|
32
|
-
readonly target: string;
|
|
33
|
-
}
|
|
34
|
-
export interface WarpMaterializeReceipt {
|
|
35
|
-
readonly lamport: number;
|
|
36
|
-
readonly ops: readonly WarpMaterializeReceiptOp[];
|
|
37
|
-
}
|
|
38
|
-
export interface WarpHandle {
|
|
39
|
-
hasNode(nodeId: string): Promise<boolean>;
|
|
40
|
-
observer(lens: WarpObserverLens, options?: WarpObserverOptions): Promise<WarpObserver>;
|
|
41
|
-
patch(build: (patch: WarpPatchBuilder) => void | Promise<void>): Promise<string>;
|
|
42
|
-
materialize(): Promise<void>;
|
|
43
|
-
materializeReceipts(): Promise<readonly WarpMaterializeReceipt[]>;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=warp.d.ts.map
|
package/dist/ports/warp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warp.d.ts","sourceRoot":"","sources":["../../src/ports/warp.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC,GAAG,SAAS,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9B,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IACtE,QAAQ,IAAI,OAAO,CAAC,SAAS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;CACnE"}
|
package/dist/ports/warp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warp.js","sourceRoot":"","sources":["../../src/ports/warp.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4DAA4D;AAC5D,8EAA8E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WARP Identity Resolver — creates an IdentityResolver backed by
|
|
3
|
-
* the WARP graph. Reads symbol identityId properties through the
|
|
4
|
-
* observer lens system.
|
|
5
|
-
*/
|
|
6
|
-
import type { WarpHandle } from "../ports/warp.js";
|
|
7
|
-
import type { IdentityResolver } from "../operations/diff-identity.js";
|
|
8
|
-
/**
|
|
9
|
-
* Create an IdentityResolver that queries WARP for canonical symbol
|
|
10
|
-
* identities. Each call reads the current frontier snapshot — the
|
|
11
|
-
* resolver is stateless between calls.
|
|
12
|
-
*/
|
|
13
|
-
export declare function createWarpIdentityResolver(warp: WarpHandle): IdentityResolver;
|
|
14
|
-
//# sourceMappingURL=identity-resolver.d.ts.map
|