@flyingrobots/graft 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/README.md +33 -17
- package/bin/graft.js +26 -26
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/cli/cli-error.d.ts.map +1 -1
- package/dist/cli/cli-error.js +22 -3
- package/dist/cli/cli-error.js.map +1 -1
- package/dist/cli/command-parser.d.ts.map +1 -1
- package/dist/cli/command-parser.js +62 -6
- package/dist/cli/command-parser.js.map +1 -1
- package/dist/cli/dead-symbols-render.d.ts +2 -0
- package/dist/cli/dead-symbols-render.d.ts.map +1 -0
- package/dist/cli/dead-symbols-render.js +23 -0
- package/dist/cli/dead-symbols-render.js.map +1 -0
- package/dist/cli/doctor-render.d.ts +2 -0
- package/dist/cli/doctor-render.d.ts.map +1 -0
- package/dist/cli/doctor-render.js +80 -0
- package/dist/cli/doctor-render.js.map +1 -0
- package/dist/cli/entrypoint.d.ts +1 -0
- package/dist/cli/entrypoint.d.ts.map +1 -1
- package/dist/cli/entrypoint.js +1 -0
- package/dist/cli/entrypoint.js.map +1 -1
- package/dist/cli/git-graft-enhance-model.d.ts +33 -3
- package/dist/cli/git-graft-enhance-model.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance-model.js +38 -0
- package/dist/cli/git-graft-enhance-model.js.map +1 -1
- package/dist/cli/git-graft-enhance-render.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance-render.js +13 -0
- package/dist/cli/git-graft-enhance-render.js.map +1 -1
- package/dist/cli/git-graft-enhance.d.ts.map +1 -1
- package/dist/cli/git-graft-enhance.js +44 -1
- package/dist/cli/git-graft-enhance.js.map +1 -1
- package/dist/cli/index-cmd.d.ts +1 -0
- package/dist/cli/index-cmd.d.ts.map +1 -1
- package/dist/cli/index-cmd.js +3 -0
- package/dist/cli/index-cmd.js.map +1 -1
- package/dist/cli/init-client-config.d.ts.map +1 -1
- package/dist/cli/init-client-config.js +40 -4
- package/dist/cli/init-client-config.js.map +1 -1
- package/dist/cli/init-model.js +2 -2
- package/dist/cli/init-model.js.map +1 -1
- package/dist/cli/json-document.d.ts +1 -0
- package/dist/cli/json-document.d.ts.map +1 -1
- package/dist/cli/json-document.js +3 -0
- package/dist/cli/json-document.js.map +1 -1
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +24 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/peer-command.d.ts.map +1 -1
- package/dist/cli/peer-command.js +25 -0
- package/dist/cli/peer-command.js.map +1 -1
- package/dist/cli/review-cooldown.d.ts +15 -0
- package/dist/cli/review-cooldown.d.ts.map +1 -0
- package/dist/cli/review-cooldown.js +136 -0
- package/dist/cli/review-cooldown.js.map +1 -0
- package/dist/cli/structural-blame-render.d.ts +2 -0
- package/dist/cli/structural-blame-render.d.ts.map +1 -0
- package/dist/cli/structural-blame-render.js +39 -0
- package/dist/cli/structural-blame-render.js.map +1 -0
- package/dist/cli/structural-review-render.d.ts +2 -0
- package/dist/cli/structural-review-render.d.ts.map +1 -0
- package/dist/cli/structural-review-render.js +56 -0
- package/dist/cli/structural-review-render.js.map +1 -0
- package/dist/cli/structural-test-coverage-render.d.ts +2 -0
- package/dist/cli/structural-test-coverage-render.d.ts.map +1 -0
- package/dist/cli/structural-test-coverage-render.js +46 -0
- package/dist/cli/structural-test-coverage-render.js.map +1 -0
- package/dist/contracts/capabilities.d.ts +9 -6
- package/dist/contracts/capabilities.d.ts.map +1 -1
- package/dist/contracts/capabilities.js +40 -1
- package/dist/contracts/capabilities.js.map +1 -1
- package/dist/contracts/causal-ontology.d.ts +17 -17
- package/dist/contracts/output-schema-cli.d.ts +103 -41
- package/dist/contracts/output-schema-cli.d.ts.map +1 -1
- package/dist/contracts/output-schema-cli.js +29 -0
- package/dist/contracts/output-schema-cli.js.map +1 -1
- package/dist/contracts/output-schema-fragments.d.ts +76 -76
- package/dist/contracts/output-schema-mcp.d.ts +87 -62
- package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
- package/dist/contracts/output-schema-mcp.js +43 -21
- 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 +69 -1
- package/dist/contracts/output-schemas.js.map +1 -1
- package/dist/git/version-guard.d.ts +17 -0
- package/dist/git/version-guard.d.ts.map +1 -0
- package/dist/git/version-guard.js +51 -0
- package/dist/git/version-guard.js.map +1 -0
- package/dist/hooks/posttooluse-read.js +3 -3
- 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 +2 -0
- package/dist/mcp/burden.js.map +1 -1
- package/dist/mcp/daemon-server.d.ts.map +1 -1
- package/dist/mcp/daemon-server.js +2 -0
- package/dist/mcp/daemon-server.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/persisted-local-history-graph.d.ts.map +1 -1
- package/dist/mcp/persisted-local-history-graph.js +2 -1
- package/dist/mcp/persisted-local-history-graph.js.map +1 -1
- package/dist/mcp/persisted-local-history.d.ts +5 -5
- package/dist/mcp/repo-tool-job.d.ts.map +1 -1
- package/dist/mcp/repo-tool-job.js +2 -0
- package/dist/mcp/repo-tool-job.js.map +1 -1
- package/dist/mcp/server-invocation.d.ts.map +1 -1
- package/dist/mcp/server-invocation.js +206 -147
- package/dist/mcp/server-invocation.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +184 -116
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stdio-server.d.ts.map +1 -1
- package/dist/mcp/stdio-server.js +2 -0
- package/dist/mcp/stdio-server.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +4 -0
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/changed-since.d.ts.map +1 -1
- package/dist/mcp/tools/changed-since.js +10 -3
- package/dist/mcp/tools/changed-since.js.map +1 -1
- package/dist/mcp/tools/dead-symbols.d.ts +3 -0
- package/dist/mcp/tools/dead-symbols.d.ts.map +1 -0
- package/dist/mcp/tools/dead-symbols.js +33 -0
- package/dist/mcp/tools/dead-symbols.js.map +1 -0
- package/dist/mcp/tools/map.d.ts.map +1 -1
- package/dist/mcp/tools/map.js +2 -0
- package/dist/mcp/tools/map.js.map +1 -1
- package/dist/mcp/tools/precision-warp.d.ts.map +1 -1
- package/dist/mcp/tools/precision-warp.js +2 -6
- package/dist/mcp/tools/precision-warp.js.map +1 -1
- package/dist/mcp/tools/refactor-difficulty.d.ts.map +1 -1
- package/dist/mcp/tools/refactor-difficulty.js +2 -0
- package/dist/mcp/tools/refactor-difficulty.js.map +1 -1
- package/dist/mcp/tools/safe-read.d.ts.map +1 -1
- package/dist/mcp/tools/safe-read.js +10 -105
- package/dist/mcp/tools/safe-read.js.map +1 -1
- package/dist/mcp/tools/structural-test-coverage.d.ts +3 -0
- package/dist/mcp/tools/structural-test-coverage.d.ts.map +1 -0
- package/dist/mcp/tools/structural-test-coverage.js +35 -0
- package/dist/mcp/tools/structural-test-coverage.js.map +1 -0
- package/dist/operations/cached-file.d.ts +6 -2
- package/dist/operations/cached-file.d.ts.map +1 -1
- package/dist/operations/cached-file.js +30 -6
- package/dist/operations/cached-file.js.map +1 -1
- package/dist/operations/export-surface-diff.d.ts.map +1 -1
- package/dist/operations/export-surface-diff.js +2 -0
- package/dist/operations/export-surface-diff.js.map +1 -1
- package/dist/operations/file-outline.js +2 -2
- package/dist/operations/file-outline.js.map +1 -1
- package/dist/operations/graft-diff.d.ts.map +1 -1
- package/dist/operations/graft-diff.js +2 -0
- package/dist/operations/graft-diff.js.map +1 -1
- package/dist/operations/projection-safety.d.ts.map +1 -1
- package/dist/operations/projection-safety.js +2 -0
- package/dist/operations/projection-safety.js.map +1 -1
- package/dist/operations/repo-workspace.d.ts.map +1 -1
- package/dist/operations/repo-workspace.js +26 -8
- package/dist/operations/repo-workspace.js.map +1 -1
- package/dist/operations/review-cooldown-status.d.ts +27 -0
- package/dist/operations/review-cooldown-status.d.ts.map +1 -0
- package/dist/operations/review-cooldown-status.js +115 -0
- package/dist/operations/review-cooldown-status.js.map +1 -0
- package/dist/operations/safe-read.js +2 -2
- package/dist/operations/safe-read.js.map +1 -1
- package/dist/operations/sludge-detector.d.ts.map +1 -1
- package/dist/operations/sludge-detector.js +2 -1
- package/dist/operations/sludge-detector.js.map +1 -1
- package/dist/operations/structural-review.js +8 -8
- package/dist/operations/structural-review.js.map +1 -1
- package/dist/operations/structural-test-coverage-map.d.ts +44 -0
- package/dist/operations/structural-test-coverage-map.d.ts.map +1 -0
- package/dist/operations/structural-test-coverage-map.js +331 -0
- package/dist/operations/structural-test-coverage-map.js.map +1 -0
- package/dist/operations/structured-buffer-compare.d.ts.map +1 -1
- package/dist/operations/structured-buffer-compare.js +4 -1
- package/dist/operations/structured-buffer-compare.js.map +1 -1
- package/dist/operations/structured-buffer-model.d.ts +15 -13
- package/dist/operations/structured-buffer-model.d.ts.map +1 -1
- package/dist/operations/structured-buffer-model.js +24 -5
- package/dist/operations/structured-buffer-model.js.map +1 -1
- package/dist/operations/structured-buffer-query.d.ts.map +1 -1
- package/dist/operations/structured-buffer-query.js +21 -12
- package/dist/operations/structured-buffer-query.js.map +1 -1
- package/dist/parser/extractors/common.d.ts +16 -0
- package/dist/parser/extractors/common.d.ts.map +1 -0
- package/dist/parser/extractors/common.js +23 -0
- package/dist/parser/extractors/common.js.map +1 -0
- package/dist/parser/extractors/go.d.ts +18 -0
- package/dist/parser/extractors/go.d.ts.map +1 -0
- package/dist/parser/extractors/go.js +200 -0
- package/dist/parser/extractors/go.js.map +1 -0
- package/dist/parser/extractors/graphql.d.ts +26 -0
- package/dist/parser/extractors/graphql.d.ts.map +1 -0
- package/dist/parser/extractors/graphql.js +239 -0
- package/dist/parser/extractors/graphql.js.map +1 -0
- package/dist/parser/extractors/index.d.ts +4 -0
- package/dist/parser/extractors/index.d.ts.map +1 -0
- package/dist/parser/extractors/index.js +26 -0
- package/dist/parser/extractors/index.js.map +1 -0
- package/dist/parser/extractors/json.d.ts +10 -0
- package/dist/parser/extractors/json.d.ts.map +1 -0
- package/dist/parser/extractors/json.js +75 -0
- package/dist/parser/extractors/json.js.map +1 -0
- package/dist/parser/extractors/python.d.ts +16 -0
- package/dist/parser/extractors/python.d.ts.map +1 -0
- package/dist/parser/extractors/python.js +145 -0
- package/dist/parser/extractors/python.js.map +1 -0
- package/dist/parser/extractors/rust.d.ts +12 -0
- package/dist/parser/extractors/rust.d.ts.map +1 -0
- package/dist/parser/extractors/rust.js +122 -0
- package/dist/parser/extractors/rust.js.map +1 -0
- package/dist/parser/extractors/toml.d.ts +10 -0
- package/dist/parser/extractors/toml.d.ts.map +1 -0
- package/dist/parser/extractors/toml.js +74 -0
- package/dist/parser/extractors/toml.js.map +1 -0
- package/dist/parser/extractors/typescript.d.ts +13 -0
- package/dist/parser/extractors/typescript.d.ts.map +1 -0
- package/dist/parser/extractors/typescript.js +179 -0
- package/dist/parser/extractors/typescript.js.map +1 -0
- package/dist/parser/extractors/yaml.d.ts +13 -0
- package/dist/parser/extractors/yaml.d.ts.map +1 -0
- package/dist/parser/extractors/yaml.js +93 -0
- package/dist/parser/extractors/yaml.js.map +1 -0
- package/dist/parser/lang.d.ts +2 -2
- package/dist/parser/lang.d.ts.map +1 -1
- package/dist/parser/lang.js +19 -1
- package/dist/parser/lang.js.map +1 -1
- package/dist/parser/outline.d.ts +4 -0
- package/dist/parser/outline.d.ts.map +1 -1
- package/dist/parser/outline.js +32 -221
- package/dist/parser/outline.js.map +1 -1
- package/dist/parser/runtime.d.ts +7 -0
- package/dist/parser/runtime.d.ts.map +1 -1
- package/dist/parser/runtime.js +99 -10
- package/dist/parser/runtime.js.map +1 -1
- package/dist/parser/types.d.ts +1 -1
- package/dist/parser/types.d.ts.map +1 -1
- package/dist/parser/types.js.map +1 -1
- package/dist/ports/provenance-timeline.d.ts +10 -0
- package/dist/ports/provenance-timeline.d.ts.map +1 -0
- package/dist/ports/provenance-timeline.js +17 -0
- package/dist/ports/provenance-timeline.js.map +1 -0
- package/dist/ports/semantic-enrichment.d.ts +47 -0
- package/dist/ports/semantic-enrichment.d.ts.map +1 -0
- package/dist/ports/semantic-enrichment.js +2 -0
- package/dist/ports/semantic-enrichment.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-import-resolver.d.ts.map +1 -1
- package/dist/warp/ast-import-resolver.js +2 -1
- package/dist/warp/ast-import-resolver.js.map +1 -1
- package/dist/warp/dead-symbols.d.ts.map +1 -1
- package/dist/warp/dead-symbols.js +4 -7
- package/dist/warp/dead-symbols.js.map +1 -1
- package/dist/warp/index-head.d.ts +4 -0
- package/dist/warp/index-head.d.ts.map +1 -1
- package/dist/warp/index-head.js +255 -22
- package/dist/warp/index-head.js.map +1 -1
- package/dist/warp/observers.d.ts.map +1 -1
- package/dist/warp/observers.js +3 -2
- package/dist/warp/observers.js.map +1 -1
- package/dist/warp/refactor-difficulty.d.ts.map +1 -1
- package/dist/warp/refactor-difficulty.js +4 -9
- package/dist/warp/refactor-difficulty.js.map +1 -1
- package/dist/warp/references.d.ts.map +1 -1
- package/dist/warp/references.js +2 -1
- package/dist/warp/references.js.map +1 -1
- package/dist/warp/semantic-enrichment.d.ts +14 -0
- package/dist/warp/semantic-enrichment.d.ts.map +1 -0
- package/dist/warp/semantic-enrichment.js +55 -0
- package/dist/warp/semantic-enrichment.js.map +1 -0
- package/dist/warp/structural-queries.d.ts.map +1 -1
- package/dist/warp/structural-queries.js +7 -14
- package/dist/warp/structural-queries.js.map +1 -1
- package/dist/warp/sym-id-codec.d.ts +14 -0
- package/dist/warp/sym-id-codec.d.ts.map +1 -0
- package/dist/warp/sym-id-codec.js +47 -0
- package/dist/warp/sym-id-codec.js.map +1 -0
- package/dist/warp/symbol-timeline.d.ts.map +1 -1
- package/dist/warp/symbol-timeline.js +6 -14
- package/dist/warp/symbol-timeline.js.map +1 -1
- package/dist/warp/warp-structural-churn.d.ts.map +1 -1
- package/dist/warp/warp-structural-churn.js +6 -10
- package/dist/warp/warp-structural-churn.js.map +1 -1
- package/dist/warp/warp-structural-log.d.ts.map +1 -1
- package/dist/warp/warp-structural-log.js +8 -10
- package/dist/warp/warp-structural-log.js.map +1 -1
- package/docs/CLI.md +63 -5
- package/docs/MCP.md +2 -1
- package/docs/SETUP.md +11 -7
- package/package.json +12 -4
- package/src/adapters/canonical-json.ts +0 -56
- package/src/adapters/json-text-decoder.ts +0 -11
- package/src/adapters/node-fs.ts +0 -43
- package/src/adapters/node-git.ts +0 -47
- package/src/adapters/node-paths.ts +0 -35
- package/src/adapters/node-process-runner.ts +0 -27
- package/src/adapters/repo-paths.ts +0 -63
- 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 -22
- package/src/cli/activity-render.ts +0 -112
- package/src/cli/cli-error.ts +0 -192
- package/src/cli/command-parser.ts +0 -484
- package/src/cli/daemon-status-model.ts +0 -238
- package/src/cli/daemon-status-render.ts +0 -102
- package/src/cli/daemon-status.ts +0 -100
- package/src/cli/entrypoint.ts +0 -18
- package/src/cli/git-graft-enhance-model.ts +0 -131
- package/src/cli/git-graft-enhance-render.ts +0 -33
- package/src/cli/git-graft-enhance.ts +0 -54
- package/src/cli/index-cmd.ts +0 -90
- package/src/cli/index-model.ts +0 -75
- package/src/cli/init-bootstrap.ts +0 -47
- package/src/cli/init-client-config.ts +0 -428
- package/src/cli/init-model.ts +0 -284
- package/src/cli/init-render.ts +0 -54
- package/src/cli/init-target-hooks.ts +0 -93
- package/src/cli/init.ts +0 -124
- package/src/cli/json-document.ts +0 -155
- 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 -197
- package/src/cli/migrate-local-history.ts +0 -119
- package/src/cli/peer-command.ts +0 -60
- package/src/contracts/capabilities.ts +0 -540
- 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 -18
- package/src/contracts/mcp-runtime.ts +0 -16
- package/src/contracts/output-schema-cli.ts +0 -103
- package/src/contracts/output-schema-fragments.ts +0 -881
- package/src/contracts/output-schema-mcp.ts +0 -501
- package/src/contracts/output-schema-meta.ts +0 -119
- package/src/contracts/output-schemas.ts +0 -1524
- package/src/git/diff.ts +0 -161
- 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 -132
- package/src/mcp/cache.ts +0 -7
- package/src/mcp/cached-file.ts +0 -1
- package/src/mcp/context.ts +0 -150
- 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 -172
- package/src/mcp/daemon-session-host.ts +0 -234
- package/src/mcp/daemon-stdio-bridge.ts +0 -262
- 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 -153
- package/src/mcp/monitor-types.ts +0 -103
- package/src/mcp/persisted-local-history-graph.ts +0 -592
- 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 -482
- 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 -215
- 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 -236
- package/src/mcp/server-invocation.ts +0 -388
- package/src/mcp/server-tool-access.ts +0 -148
- package/src/mcp/server.ts +0 -270
- package/src/mcp/stdio-server.ts +0 -26
- package/src/mcp/stdio.ts +0 -3
- package/src/mcp/tool-registry.ts +0 -98
- 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 -192
- package/src/mcp/tools/code-refs.ts +0 -470
- package/src/mcp/tools/code-show.ts +0 -289
- 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 -97
- package/src/mcp/tools/doctor.ts +0 -83
- package/src/mcp/tools/explain.ts +0 -84
- package/src/mcp/tools/export-surface-diff.ts +0 -26
- 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/graft-edit.ts +0 -276
- package/src/mcp/tools/knowledge-map.ts +0 -34
- package/src/mcp/tools/map-collector.ts +0 -338
- package/src/mcp/tools/map.ts +0 -185
- package/src/mcp/tools/monitor-nudge.ts +0 -19
- 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 -101
- package/src/mcp/tools/precision.ts +0 -21
- package/src/mcp/tools/read-range.ts +0 -28
- package/src/mcp/tools/refactor-difficulty.ts +0 -42
- 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/structural-blame.ts +0 -55
- package/src/mcp/tools/structural-churn.ts +0 -28
- package/src/mcp/tools/structural-log.ts +0 -41
- package/src/mcp/tools/structural-review.ts +0 -63
- 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 -246
- package/src/mcp/workspace-router.ts +0 -688
- package/src/metrics/logger.ts +0 -40
- package/src/metrics/types.ts +0 -40
- package/src/operations/adaptive-projection.ts +0 -54
- package/src/operations/agent-handoff.ts +0 -59
- package/src/operations/cached-file.ts +0 -40
- package/src/operations/capture-range.ts +0 -64
- package/src/operations/conversation-primer.ts +0 -82
- package/src/operations/cross-session-resume.ts +0 -104
- package/src/operations/deterministic-replay.ts +0 -143
- package/src/operations/diff-identity.ts +0 -127
- package/src/operations/export-surface-diff.ts +0 -355
- package/src/operations/file-outline.ts +0 -48
- package/src/operations/footprint-parallelism.ts +0 -98
- package/src/operations/graft-diff.ts +0 -169
- package/src/operations/horizon-of-readability.ts +0 -60
- package/src/operations/import-reference-impact.ts +0 -143
- package/src/operations/knowledge-map.ts +0 -96
- package/src/operations/observation-cache.ts +0 -165
- package/src/operations/projection-safety.ts +0 -111
- 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/semantic-drift.ts +0 -70
- package/src/operations/session-filtration.ts +0 -76
- package/src/operations/session-replay.ts +0 -73
- package/src/operations/sludge-detector.ts +0 -356
- package/src/operations/state.ts +0 -66
- package/src/operations/structural-blame.ts +0 -197
- package/src/operations/structural-review.ts +0 -317
- 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/operations/teaching-hints.ts +0 -52
- package/src/parser/diff.ts +0 -320
- 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/paths.ts +0 -22
- package/src/ports/process-runner.ts +0 -22
- 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/ast-emitter.ts +0 -133
- package/src/warp/ast-import-resolver.ts +0 -333
- package/src/warp/commit-meta.ts +0 -19
- package/src/warp/context.ts +0 -48
- package/src/warp/dead-symbols.ts +0 -174
- package/src/warp/drift-sentinel.ts +0 -101
- package/src/warp/index-head.ts +0 -348
- package/src/warp/observers.ts +0 -101
- package/src/warp/open.ts +0 -67
- package/src/warp/outline-diff-trailer.ts +0 -100
- package/src/warp/plumbing.d.ts +0 -24
- package/src/warp/refactor-difficulty.ts +0 -257
- package/src/warp/references.ts +0 -77
- package/src/warp/stale-docs.ts +0 -210
- package/src/warp/structural-drift-detection.ts +0 -97
- package/src/warp/structural-queries.ts +0 -258
- package/src/warp/symbol-timeline.ts +0 -209
- package/src/warp/traverse-hydrate.ts +0 -61
- package/src/warp/warp-reference-count.ts +0 -47
- package/src/warp/warp-structural-blame.ts +0 -65
- package/src/warp/warp-structural-churn.ts +0 -309
- package/src/warp/warp-structural-log.ts +0 -149
- package/src/warp/writer-id.ts +0 -30
|
@@ -1,881 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
attributionSummarySchema,
|
|
4
|
-
attributionConfidenceSchema,
|
|
5
|
-
evidenceSchema,
|
|
6
|
-
readEventSchema,
|
|
7
|
-
localHistoryContinuityOperationSchema,
|
|
8
|
-
repoConcurrencyAuthoritySchema,
|
|
9
|
-
repoConcurrencyPostureSchema,
|
|
10
|
-
stageEventSchema,
|
|
11
|
-
transitionEventSchema,
|
|
12
|
-
stagedTargetSchema,
|
|
13
|
-
} from "./causal-ontology.js";
|
|
14
|
-
import { causalSurfaceNextActionSchema } from "./causal-surface-next-action.js";
|
|
15
|
-
|
|
16
|
-
export const sessionDepthSchema = z.enum(["early", "mid", "late", "unknown"]);
|
|
17
|
-
export const worldlineLayerSchema = z.enum(["commit_worldline", "ref_view", "workspace_overlay"]);
|
|
18
|
-
export const repoTransitionKindSchema = z.enum(["checkout", "reset", "merge", "rebase"]);
|
|
19
|
-
|
|
20
|
-
export const actualSchema = z.object({
|
|
21
|
-
lines: z.number().int().nonnegative(),
|
|
22
|
-
bytes: z.number().int().nonnegative(),
|
|
23
|
-
}).strict();
|
|
24
|
-
|
|
25
|
-
export const thresholdsSchema = z.object({
|
|
26
|
-
lines: z.number().int().nonnegative(),
|
|
27
|
-
bytes: z.number().int().nonnegative(),
|
|
28
|
-
}).strict();
|
|
29
|
-
|
|
30
|
-
export const budgetSchema = z.object({
|
|
31
|
-
total: z.number().int().positive(),
|
|
32
|
-
consumed: z.number().int().nonnegative(),
|
|
33
|
-
remaining: z.number().int().nonnegative(),
|
|
34
|
-
fraction: z.number(),
|
|
35
|
-
}).strict();
|
|
36
|
-
|
|
37
|
-
export const tripwireSchema = z.object({
|
|
38
|
-
_brand: z.literal("Tripwire").optional(),
|
|
39
|
-
signal: z.string(),
|
|
40
|
-
recommendation: z.string(),
|
|
41
|
-
}).strict();
|
|
42
|
-
|
|
43
|
-
export const outlineEntrySchema: z.ZodType = z.lazy(() => z.object({
|
|
44
|
-
_brand: z.literal("OutlineEntry").optional(),
|
|
45
|
-
kind: z.string(),
|
|
46
|
-
name: z.string(),
|
|
47
|
-
signature: z.string().optional(),
|
|
48
|
-
exported: z.boolean(),
|
|
49
|
-
children: z.array(outlineEntrySchema).optional(),
|
|
50
|
-
}).strict());
|
|
51
|
-
|
|
52
|
-
export const jumpEntrySchema = z.object({
|
|
53
|
-
_brand: z.literal("JumpEntry").optional(),
|
|
54
|
-
symbol: z.string(),
|
|
55
|
-
kind: z.string(),
|
|
56
|
-
start: z.number().int().positive(),
|
|
57
|
-
end: z.number().int().positive(),
|
|
58
|
-
}).strict();
|
|
59
|
-
|
|
60
|
-
export const diffContinuitySchema = z.object({
|
|
61
|
-
_brand: z.literal("DiffContinuity").optional(),
|
|
62
|
-
kind: z.literal("rename"),
|
|
63
|
-
confidence: z.literal("likely"),
|
|
64
|
-
basis: z.enum(["matching_signature_shape", "matching_child_structure"]),
|
|
65
|
-
symbolKind: z.string(),
|
|
66
|
-
oldName: z.string(),
|
|
67
|
-
newName: z.string(),
|
|
68
|
-
oldSignature: z.string().optional(),
|
|
69
|
-
newSignature: z.string().optional(),
|
|
70
|
-
}).strict();
|
|
71
|
-
|
|
72
|
-
export const outlineDiffSchema: z.ZodType = z.lazy(() => z.object({
|
|
73
|
-
_brand: z.literal("OutlineDiff").optional(),
|
|
74
|
-
added: z.array(diffEntrySchema),
|
|
75
|
-
removed: z.array(diffEntrySchema),
|
|
76
|
-
changed: z.array(diffEntrySchema),
|
|
77
|
-
continuity: z.array(diffContinuitySchema),
|
|
78
|
-
unchangedCount: z.number().int().nonnegative(),
|
|
79
|
-
}).strict());
|
|
80
|
-
|
|
81
|
-
export const diffEntrySchema: z.ZodType = z.lazy(() => z.object({
|
|
82
|
-
_brand: z.literal("DiffEntry").optional(),
|
|
83
|
-
name: z.string(),
|
|
84
|
-
kind: z.string(),
|
|
85
|
-
exported: z.boolean().optional(),
|
|
86
|
-
signature: z.string().optional(),
|
|
87
|
-
oldSignature: z.string().optional(),
|
|
88
|
-
childDiff: outlineDiffSchema.optional(),
|
|
89
|
-
}).strict());
|
|
90
|
-
|
|
91
|
-
export const burdenKindSchema = z.enum(["read", "search", "shell", "state", "diagnostic"]);
|
|
92
|
-
|
|
93
|
-
const burdenBucketSchema = z.object({
|
|
94
|
-
calls: z.number().int().nonnegative(),
|
|
95
|
-
bytesReturned: z.number().int().nonnegative(),
|
|
96
|
-
}).strict();
|
|
97
|
-
|
|
98
|
-
export const burdenByKindSchema = z.object({
|
|
99
|
-
read: burdenBucketSchema,
|
|
100
|
-
search: burdenBucketSchema,
|
|
101
|
-
shell: burdenBucketSchema,
|
|
102
|
-
state: burdenBucketSchema,
|
|
103
|
-
diagnostic: burdenBucketSchema,
|
|
104
|
-
}).strict();
|
|
105
|
-
|
|
106
|
-
export const sludgeSignalSchema = z.object({
|
|
107
|
-
kind: z.enum([
|
|
108
|
-
"phantom_shape",
|
|
109
|
-
"cast_density",
|
|
110
|
-
"homeless_constructor",
|
|
111
|
-
"free_function_data_behavior",
|
|
112
|
-
"god_file",
|
|
113
|
-
]),
|
|
114
|
-
severity: z.enum(["low", "medium", "high"]),
|
|
115
|
-
message: z.string(),
|
|
116
|
-
line: z.number().int().positive().optional(),
|
|
117
|
-
symbol: z.string().optional(),
|
|
118
|
-
evidence: z.string(),
|
|
119
|
-
}).strict();
|
|
120
|
-
|
|
121
|
-
export const sludgeFileReportSchema = z.object({
|
|
122
|
-
path: z.string(),
|
|
123
|
-
score: z.number().int().nonnegative(),
|
|
124
|
-
metrics: z.object({
|
|
125
|
-
typedefCount: z.number().int().nonnegative(),
|
|
126
|
-
typeCastCount: z.number().int().nonnegative(),
|
|
127
|
-
classCount: z.number().int().nonnegative(),
|
|
128
|
-
functionCount: z.number().int().nonnegative(),
|
|
129
|
-
symbolCount: z.number().int().nonnegative(),
|
|
130
|
-
homelessConstructorCount: z.number().int().nonnegative(),
|
|
131
|
-
freeFunctionDataBehaviorCount: z.number().int().nonnegative(),
|
|
132
|
-
}).strict(),
|
|
133
|
-
signals: z.array(sludgeSignalSchema),
|
|
134
|
-
}).strict();
|
|
135
|
-
|
|
136
|
-
export const sludgeReportSchema = z.object({
|
|
137
|
-
scannedFiles: z.number().int().nonnegative(),
|
|
138
|
-
filesWithSignals: z.number().int().nonnegative(),
|
|
139
|
-
totalSignals: z.number().int().nonnegative(),
|
|
140
|
-
score: z.number().int().nonnegative(),
|
|
141
|
-
files: z.array(sludgeFileReportSchema),
|
|
142
|
-
summary: z.string(),
|
|
143
|
-
}).strict();
|
|
144
|
-
|
|
145
|
-
export const receiptSchema = z.object({
|
|
146
|
-
sessionId: z.string(),
|
|
147
|
-
traceId: z.string(),
|
|
148
|
-
seq: z.number().int().positive(),
|
|
149
|
-
ts: z.string(),
|
|
150
|
-
tool: z.string(),
|
|
151
|
-
projection: z.string(),
|
|
152
|
-
reason: z.string(),
|
|
153
|
-
latencyMs: z.number().int().nonnegative(),
|
|
154
|
-
fileBytes: z.number().int().nonnegative().nullable(),
|
|
155
|
-
returnedBytes: z.number().int().nonnegative(),
|
|
156
|
-
burden: z.object({
|
|
157
|
-
kind: burdenKindSchema,
|
|
158
|
-
nonRead: z.boolean(),
|
|
159
|
-
}).strict(),
|
|
160
|
-
cumulative: z.object({
|
|
161
|
-
reads: z.number().int().nonnegative(),
|
|
162
|
-
outlines: z.number().int().nonnegative(),
|
|
163
|
-
refusals: z.number().int().nonnegative(),
|
|
164
|
-
cacheHits: z.number().int().nonnegative(),
|
|
165
|
-
bytesReturned: z.number().int().nonnegative(),
|
|
166
|
-
bytesAvoided: z.number().int().nonnegative(),
|
|
167
|
-
nonReadBytesReturned: z.number().int().nonnegative(),
|
|
168
|
-
burdenByKind: burdenByKindSchema,
|
|
169
|
-
}).strict(),
|
|
170
|
-
budget: budgetSchema.optional(),
|
|
171
|
-
compressionRatio: z.number().nullable().optional(),
|
|
172
|
-
}).strict();
|
|
173
|
-
|
|
174
|
-
export const runtimeObservabilitySchema = z.object({
|
|
175
|
-
enabled: z.boolean(),
|
|
176
|
-
logPath: z.string(),
|
|
177
|
-
maxBytes: z.number().int().positive(),
|
|
178
|
-
logPolicy: z.literal("metadata_only"),
|
|
179
|
-
}).strict();
|
|
180
|
-
|
|
181
|
-
export const runtimeCausalContextSchema = z.object({
|
|
182
|
-
transportSessionId: z.string(),
|
|
183
|
-
workspaceSliceId: z.string(),
|
|
184
|
-
causalSessionId: z.string(),
|
|
185
|
-
strandId: z.string(),
|
|
186
|
-
checkoutEpochId: z.string(),
|
|
187
|
-
warpWriterId: z.string(),
|
|
188
|
-
stability: z.literal("runtime_local"),
|
|
189
|
-
provenanceLevel: z.literal("artifact_history"),
|
|
190
|
-
}).strict();
|
|
191
|
-
|
|
192
|
-
const runtimeLocalProvenanceSchema = z.object({
|
|
193
|
-
stability: z.literal("runtime_local"),
|
|
194
|
-
provenanceLevel: z.literal("artifact_history"),
|
|
195
|
-
}).strict();
|
|
196
|
-
|
|
197
|
-
export const runtimeStagedTargetSchema = z.discriminatedUnion("availability", [
|
|
198
|
-
runtimeLocalProvenanceSchema.extend({
|
|
199
|
-
availability: z.literal("none"),
|
|
200
|
-
}).strict(),
|
|
201
|
-
runtimeLocalProvenanceSchema.extend({
|
|
202
|
-
availability: z.literal("full_file"),
|
|
203
|
-
attribution: attributionSummarySchema,
|
|
204
|
-
target: stagedTargetSchema.safeExtend({
|
|
205
|
-
selectionKind: z.literal("full_file"),
|
|
206
|
-
}),
|
|
207
|
-
}).strict(),
|
|
208
|
-
runtimeLocalProvenanceSchema.extend({
|
|
209
|
-
availability: z.literal("ambiguous"),
|
|
210
|
-
attribution: attributionSummarySchema,
|
|
211
|
-
reason: z.enum([
|
|
212
|
-
"missing_head_commit",
|
|
213
|
-
"missing_workspace_overlay",
|
|
214
|
-
"modified_path_selection_requires_deeper_evidence",
|
|
215
|
-
]),
|
|
216
|
-
observedStagedPaths: z.number().int().positive(),
|
|
217
|
-
ambiguousPaths: z.array(z.string()).min(1),
|
|
218
|
-
}).strict(),
|
|
219
|
-
]);
|
|
220
|
-
|
|
221
|
-
export const activityViewAnchorSchema = z.discriminatedUnion("posture", [
|
|
222
|
-
z.object({
|
|
223
|
-
posture: z.literal("head_commit"),
|
|
224
|
-
headRef: z.string().nullable(),
|
|
225
|
-
headSha: z.string(),
|
|
226
|
-
}).strict(),
|
|
227
|
-
z.object({
|
|
228
|
-
posture: z.literal("unknown"),
|
|
229
|
-
headRef: z.string().nullable(),
|
|
230
|
-
headSha: z.string().nullable(),
|
|
231
|
-
reason: z.enum(["workspace_unbound", "missing_head_commit"]),
|
|
232
|
-
}).strict(),
|
|
233
|
-
]);
|
|
234
|
-
|
|
235
|
-
const activityViewContinuityItemSchema = z.object({
|
|
236
|
-
itemKind: z.literal("continuity"),
|
|
237
|
-
recordId: z.string(),
|
|
238
|
-
operation: localHistoryContinuityOperationSchema,
|
|
239
|
-
occurredAt: z.string(),
|
|
240
|
-
causalSessionId: z.string(),
|
|
241
|
-
strandId: z.string(),
|
|
242
|
-
attribution: attributionSummarySchema,
|
|
243
|
-
continuedFromCausalSessionId: z.string().nullable(),
|
|
244
|
-
continuedFromStrandId: z.string().nullable(),
|
|
245
|
-
}).strict();
|
|
246
|
-
|
|
247
|
-
export const activityViewItemSchema = z.union([
|
|
248
|
-
activityViewContinuityItemSchema,
|
|
249
|
-
readEventSchema,
|
|
250
|
-
stageEventSchema,
|
|
251
|
-
transitionEventSchema,
|
|
252
|
-
]);
|
|
253
|
-
|
|
254
|
-
const activityViewGroupSchema = z.object({
|
|
255
|
-
groupKind: z.enum(["transition", "stage", "continuity", "read"]),
|
|
256
|
-
label: z.string(),
|
|
257
|
-
summary: z.string(),
|
|
258
|
-
count: z.number().int().positive(),
|
|
259
|
-
items: z.array(activityViewItemSchema),
|
|
260
|
-
}).strict();
|
|
261
|
-
|
|
262
|
-
const activityViewSummarySchema = z.object({
|
|
263
|
-
headline: z.string(),
|
|
264
|
-
anchor: z.string(),
|
|
265
|
-
workspace: z.string(),
|
|
266
|
-
groups: z.array(z.string()),
|
|
267
|
-
}).strict();
|
|
268
|
-
|
|
269
|
-
export const persistedLocalHistorySummarySchema = z.discriminatedUnion("availability", [
|
|
270
|
-
z.object({
|
|
271
|
-
availability: z.literal("none"),
|
|
272
|
-
persistence: z.literal("persisted_local_history"),
|
|
273
|
-
historyPath: z.string().nullable(),
|
|
274
|
-
totalContinuityRecords: z.literal(0),
|
|
275
|
-
active: z.literal(false),
|
|
276
|
-
lastOperation: z.null(),
|
|
277
|
-
lastObservedAt: z.null(),
|
|
278
|
-
continuityKey: z.null(),
|
|
279
|
-
causalSessionId: z.null(),
|
|
280
|
-
strandId: z.null(),
|
|
281
|
-
checkoutEpochId: z.null(),
|
|
282
|
-
continuedFromCausalSessionId: z.null(),
|
|
283
|
-
continuityConfidence: attributionConfidenceSchema,
|
|
284
|
-
continuityEvidence: z.array(evidenceSchema),
|
|
285
|
-
attribution: attributionSummarySchema,
|
|
286
|
-
latestReadEvent: z.null(),
|
|
287
|
-
latestStageEvent: z.null(),
|
|
288
|
-
latestTransitionEvent: z.null(),
|
|
289
|
-
preserves: z.array(z.string()),
|
|
290
|
-
excludes: z.array(z.string()),
|
|
291
|
-
nextAction: z.literal("bind_workspace_to_begin_local_history"),
|
|
292
|
-
}).strict(),
|
|
293
|
-
z.object({
|
|
294
|
-
availability: z.literal("present"),
|
|
295
|
-
persistence: z.literal("persisted_local_history"),
|
|
296
|
-
historyPath: z.string().nullable(),
|
|
297
|
-
totalContinuityRecords: z.number().int().positive(),
|
|
298
|
-
active: z.boolean(),
|
|
299
|
-
lastOperation: localHistoryContinuityOperationSchema,
|
|
300
|
-
lastObservedAt: z.string(),
|
|
301
|
-
continuityKey: z.string(),
|
|
302
|
-
causalSessionId: z.string(),
|
|
303
|
-
strandId: z.string(),
|
|
304
|
-
checkoutEpochId: z.string(),
|
|
305
|
-
continuedFromCausalSessionId: z.string().nullable(),
|
|
306
|
-
continuityConfidence: attributionConfidenceSchema,
|
|
307
|
-
continuityEvidence: z.array(evidenceSchema),
|
|
308
|
-
attribution: attributionSummarySchema,
|
|
309
|
-
latestReadEvent: readEventSchema.nullable(),
|
|
310
|
-
latestStageEvent: stageEventSchema.nullable(),
|
|
311
|
-
latestTransitionEvent: transitionEventSchema.nullable(),
|
|
312
|
-
preserves: z.array(z.string()),
|
|
313
|
-
excludes: z.array(z.string()),
|
|
314
|
-
nextAction: z.enum([
|
|
315
|
-
"continue_active_causal_workspace",
|
|
316
|
-
"review_transition_boundary_before_continuing",
|
|
317
|
-
"inspect_or_resume_local_history",
|
|
318
|
-
]),
|
|
319
|
-
}).strict(),
|
|
320
|
-
]);
|
|
321
|
-
|
|
322
|
-
export const repoConcurrencySummarySchema = z.object({
|
|
323
|
-
posture: repoConcurrencyPostureSchema,
|
|
324
|
-
authority: repoConcurrencyAuthoritySchema,
|
|
325
|
-
observedWorktreeCount: z.number().int().positive(),
|
|
326
|
-
observedCausalSessionCount: z.number().int().nonnegative(),
|
|
327
|
-
observedActorCount: z.number().int().nonnegative(),
|
|
328
|
-
overlappingPathCount: z.number().int().nonnegative(),
|
|
329
|
-
summary: z.string().min(1),
|
|
330
|
-
daemonSessionLiveness: z.object({
|
|
331
|
-
idleTimeoutMs: z.number().int().positive(),
|
|
332
|
-
liveSessionCount: z.number().int().nonnegative(),
|
|
333
|
-
staleSessionCount: z.number().int().nonnegative(),
|
|
334
|
-
}).strict().optional(),
|
|
335
|
-
}).strict();
|
|
336
|
-
|
|
337
|
-
export const precisionSymbolMatchSchema = z.object({
|
|
338
|
-
name: z.string(),
|
|
339
|
-
kind: z.string(),
|
|
340
|
-
path: z.string(),
|
|
341
|
-
identityId: z.string().optional(),
|
|
342
|
-
signature: z.string().optional(),
|
|
343
|
-
exported: z.boolean(),
|
|
344
|
-
startLine: z.number().int().positive().optional(),
|
|
345
|
-
endLine: z.number().int().positive().optional(),
|
|
346
|
-
}).strict();
|
|
347
|
-
|
|
348
|
-
export const codeRefsMatchSchema = z.object({
|
|
349
|
-
path: z.string(),
|
|
350
|
-
line: z.number().int().positive(),
|
|
351
|
-
column: z.number().int().positive().optional(),
|
|
352
|
-
preview: z.string(),
|
|
353
|
-
}).strict();
|
|
354
|
-
|
|
355
|
-
export const codeRefsProvenanceSchema = z.object({
|
|
356
|
-
engine: z.enum(["ripgrep", "grep"]),
|
|
357
|
-
pattern: z.string(),
|
|
358
|
-
approximate: z.literal(true),
|
|
359
|
-
filesSearched: z.number().int().nonnegative(),
|
|
360
|
-
}).strict();
|
|
361
|
-
|
|
362
|
-
export const structuralRefusalSchema = z.object({
|
|
363
|
-
path: z.string(),
|
|
364
|
-
reason: z.string(),
|
|
365
|
-
reasonDetail: z.string(),
|
|
366
|
-
next: z.array(z.string()),
|
|
367
|
-
actual: actualSchema,
|
|
368
|
-
}).strict();
|
|
369
|
-
|
|
370
|
-
const mapSymbolSchema = z.object({
|
|
371
|
-
name: z.string(),
|
|
372
|
-
kind: z.string(),
|
|
373
|
-
signature: z.string().optional(),
|
|
374
|
-
exported: z.boolean(),
|
|
375
|
-
startLine: z.number().int().positive().optional(),
|
|
376
|
-
endLine: z.number().int().positive().optional(),
|
|
377
|
-
}).strict();
|
|
378
|
-
|
|
379
|
-
export const mapFileSchema = z.object({
|
|
380
|
-
path: z.string(),
|
|
381
|
-
lang: z.string(),
|
|
382
|
-
symbolCount: z.number().int().nonnegative(),
|
|
383
|
-
summaryOnly: z.boolean(),
|
|
384
|
-
symbols: z.array(mapSymbolSchema).optional(),
|
|
385
|
-
}).strict();
|
|
386
|
-
|
|
387
|
-
export const mapDirectorySchema = z.object({
|
|
388
|
-
path: z.string(),
|
|
389
|
-
fileCount: z.number().int().positive(),
|
|
390
|
-
symbolCount: z.number().int().nonnegative(),
|
|
391
|
-
childDirectoryCount: z.number().int().nonnegative(),
|
|
392
|
-
summaryOnly: z.literal(true),
|
|
393
|
-
}).strict();
|
|
394
|
-
|
|
395
|
-
export const mapModeSchema = z.object({
|
|
396
|
-
depth: z.number().int().nonnegative().nullable(),
|
|
397
|
-
summary: z.boolean(),
|
|
398
|
-
}).strict();
|
|
399
|
-
|
|
400
|
-
export const fileDiffSchema = z.object({
|
|
401
|
-
path: z.string(),
|
|
402
|
-
status: z.enum(["modified", "added", "deleted"]),
|
|
403
|
-
summary: z.string(),
|
|
404
|
-
diff: outlineDiffSchema,
|
|
405
|
-
}).strict();
|
|
406
|
-
|
|
407
|
-
export const repoTransitionSchema = z.object({
|
|
408
|
-
kind: repoTransitionKindSchema,
|
|
409
|
-
fromRef: z.string().nullable(),
|
|
410
|
-
toRef: z.string().nullable(),
|
|
411
|
-
fromCommit: z.string().nullable(),
|
|
412
|
-
toCommit: z.string().nullable(),
|
|
413
|
-
evidence: z.object({
|
|
414
|
-
reflogSubject: z.string().nullable(),
|
|
415
|
-
}).strict(),
|
|
416
|
-
}).strict();
|
|
417
|
-
|
|
418
|
-
export const repoSemanticTransitionSchema = z.object({
|
|
419
|
-
kind: z.enum([
|
|
420
|
-
"index_update",
|
|
421
|
-
"conflict_resolution",
|
|
422
|
-
"merge_phase",
|
|
423
|
-
"rebase_phase",
|
|
424
|
-
"bulk_transition",
|
|
425
|
-
"unknown",
|
|
426
|
-
]),
|
|
427
|
-
authority: z.enum([
|
|
428
|
-
"authoritative_git_state",
|
|
429
|
-
"repo_snapshot",
|
|
430
|
-
]),
|
|
431
|
-
phase: z.enum([
|
|
432
|
-
"started",
|
|
433
|
-
"conflicted",
|
|
434
|
-
"resolved_waiting_commit",
|
|
435
|
-
"continued",
|
|
436
|
-
"completed_or_cleared",
|
|
437
|
-
]).nullable(),
|
|
438
|
-
summary: z.string(),
|
|
439
|
-
evidence: z.object({
|
|
440
|
-
totalPaths: z.number().int().nonnegative(),
|
|
441
|
-
stagedPaths: z.number().int().nonnegative(),
|
|
442
|
-
changedPaths: z.number().int().nonnegative(),
|
|
443
|
-
untrackedPaths: z.number().int().nonnegative(),
|
|
444
|
-
unmergedPaths: z.number().int().nonnegative(),
|
|
445
|
-
mergeInProgress: z.boolean(),
|
|
446
|
-
rebaseInProgress: z.boolean(),
|
|
447
|
-
rebaseStep: z.number().int().positive().nullable(),
|
|
448
|
-
rebaseTotalSteps: z.number().int().positive().nullable(),
|
|
449
|
-
lastTransitionKind: repoTransitionKindSchema.nullable(),
|
|
450
|
-
reflogSubject: z.string().nullable(),
|
|
451
|
-
}).strict(),
|
|
452
|
-
}).strict();
|
|
453
|
-
|
|
454
|
-
export const workspaceOverlaySummarySchema = z.object({
|
|
455
|
-
dirty: z.literal(true),
|
|
456
|
-
totalPaths: z.number().int().nonnegative(),
|
|
457
|
-
stagedPaths: z.number().int().nonnegative(),
|
|
458
|
-
changedPaths: z.number().int().nonnegative(),
|
|
459
|
-
untrackedPaths: z.number().int().nonnegative(),
|
|
460
|
-
actorGuess: z.literal("unknown"),
|
|
461
|
-
confidence: z.literal("low"),
|
|
462
|
-
evidence: z.object({
|
|
463
|
-
source: z.literal("git status --porcelain"),
|
|
464
|
-
reflogSubject: z.string().nullable(),
|
|
465
|
-
sample: z.array(z.string()),
|
|
466
|
-
}).strict(),
|
|
467
|
-
}).strict();
|
|
468
|
-
|
|
469
|
-
const gitHookBootstrapStatusSchema = z.object({
|
|
470
|
-
posture: z.enum(["absent", "external_unknown", "installed"]),
|
|
471
|
-
configuredCoreHooksPath: z.string().nullable(),
|
|
472
|
-
resolvedHooksPath: z.string(),
|
|
473
|
-
requiredHooks: z.array(z.string()),
|
|
474
|
-
presentHooks: z.array(z.string()),
|
|
475
|
-
missingHooks: z.array(z.string()),
|
|
476
|
-
supportsCheckoutBoundaries: z.boolean(),
|
|
477
|
-
}).strict();
|
|
478
|
-
|
|
479
|
-
const gitTransitionHookEventSchema = z.object({
|
|
480
|
-
hookName: z.enum(["post-checkout", "post-merge", "post-rewrite"]),
|
|
481
|
-
hookArgs: z.array(z.string()),
|
|
482
|
-
worktreeRoot: z.string(),
|
|
483
|
-
observedAt: z.string(),
|
|
484
|
-
}).strict();
|
|
485
|
-
|
|
486
|
-
export const workspaceOverlayFootingSchema = z.object({
|
|
487
|
-
observationMode: z.enum([
|
|
488
|
-
"inferred_between_tool_calls",
|
|
489
|
-
"hook_observed_checkout_boundaries",
|
|
490
|
-
]),
|
|
491
|
-
lineagePosture: z.enum([
|
|
492
|
-
"stable",
|
|
493
|
-
"forked_after_transition",
|
|
494
|
-
]),
|
|
495
|
-
boundaryAuthority: z.enum([
|
|
496
|
-
"none",
|
|
497
|
-
"repo_snapshot",
|
|
498
|
-
"hook_observed",
|
|
499
|
-
]),
|
|
500
|
-
degraded: z.literal(true),
|
|
501
|
-
degradedReason: z.enum([
|
|
502
|
-
"target_repo_hooks_absent",
|
|
503
|
-
"target_repo_hooks_unrecognized",
|
|
504
|
-
"local_edit_watchers_absent",
|
|
505
|
-
]),
|
|
506
|
-
checkoutEpoch: z.number().int().nonnegative(),
|
|
507
|
-
lastTransition: repoTransitionSchema.nullable(),
|
|
508
|
-
workspaceOverlayId: z.string().nullable(),
|
|
509
|
-
workspaceOverlay: workspaceOverlaySummarySchema.nullable(),
|
|
510
|
-
hookBootstrap: gitHookBootstrapStatusSchema,
|
|
511
|
-
latestHookEvent: gitTransitionHookEventSchema.nullable(),
|
|
512
|
-
}).strict();
|
|
513
|
-
|
|
514
|
-
export const policyBoundarySchema = z.object({
|
|
515
|
-
kind: z.literal("shell_escape_hatch"),
|
|
516
|
-
boundedReadContract: z.literal(false),
|
|
517
|
-
policyEnforced: z.literal(false),
|
|
518
|
-
}).strict();
|
|
519
|
-
|
|
520
|
-
export const burdenSummarySchema = z.object({
|
|
521
|
-
totalBytesReturned: z.number().int().nonnegative(),
|
|
522
|
-
totalNonReadBytesReturned: z.number().int().nonnegative(),
|
|
523
|
-
topKind: burdenKindSchema.nullable(),
|
|
524
|
-
topBytesReturned: z.number().int().nonnegative(),
|
|
525
|
-
topCalls: z.number().int().nonnegative(),
|
|
526
|
-
}).strict();
|
|
527
|
-
|
|
528
|
-
const workspaceCapabilityProfileSchema = z.object({
|
|
529
|
-
boundedReads: z.boolean(),
|
|
530
|
-
structuralTools: z.boolean(),
|
|
531
|
-
precisionTools: z.boolean(),
|
|
532
|
-
stateBookmarks: z.boolean(),
|
|
533
|
-
runtimeLogs: z.literal("session_local_only"),
|
|
534
|
-
runCapture: z.boolean(),
|
|
535
|
-
}).strict();
|
|
536
|
-
|
|
537
|
-
export const workspaceStatusSchema = z.object({
|
|
538
|
-
sessionMode: z.enum(["repo_local", "daemon"]),
|
|
539
|
-
bindState: z.enum(["bound", "unbound"]),
|
|
540
|
-
repoId: z.string().nullable(),
|
|
541
|
-
worktreeId: z.string().nullable(),
|
|
542
|
-
worktreeRoot: z.string().nullable(),
|
|
543
|
-
gitCommonDir: z.string().nullable(),
|
|
544
|
-
graftDir: z.string().nullable(),
|
|
545
|
-
capabilityProfile: workspaceCapabilityProfileSchema.nullable(),
|
|
546
|
-
}).strict();
|
|
547
|
-
|
|
548
|
-
export const workspaceActionSchema = workspaceStatusSchema.extend({
|
|
549
|
-
ok: z.boolean(),
|
|
550
|
-
action: z.enum(["bind", "rebind"]),
|
|
551
|
-
freshSessionSlice: z.boolean(),
|
|
552
|
-
errorCode: z.string().optional(),
|
|
553
|
-
error: z.string().optional(),
|
|
554
|
-
}).strict();
|
|
555
|
-
|
|
556
|
-
const activeCausalWorkspaceSchema = z.object({
|
|
557
|
-
causalContext: runtimeCausalContextSchema,
|
|
558
|
-
attribution: attributionSummarySchema,
|
|
559
|
-
latestReadEvent: readEventSchema.nullable(),
|
|
560
|
-
latestStageEvent: stageEventSchema.nullable(),
|
|
561
|
-
latestTransitionEvent: transitionEventSchema.nullable(),
|
|
562
|
-
repoConcurrency: repoConcurrencySummarySchema.nullable(),
|
|
563
|
-
checkoutEpoch: z.number().int().nonnegative(),
|
|
564
|
-
lastTransition: repoTransitionSchema.nullable(),
|
|
565
|
-
semanticTransition: repoSemanticTransitionSchema.nullable(),
|
|
566
|
-
workspaceOverlayId: z.string().nullable(),
|
|
567
|
-
workspaceOverlay: workspaceOverlaySummarySchema.nullable(),
|
|
568
|
-
workspaceOverlayFooting: workspaceOverlayFootingSchema,
|
|
569
|
-
stagedTarget: runtimeStagedTargetSchema,
|
|
570
|
-
}).strict();
|
|
571
|
-
|
|
572
|
-
export const causalStatusSchema = workspaceStatusSchema.extend({
|
|
573
|
-
activeCausalWorkspace: activeCausalWorkspaceSchema.nullable(),
|
|
574
|
-
persistedLocalHistory: persistedLocalHistorySummarySchema,
|
|
575
|
-
nextAction: causalSurfaceNextActionSchema,
|
|
576
|
-
}).strict();
|
|
577
|
-
|
|
578
|
-
export const causalAttachSchema = workspaceStatusSchema.extend({
|
|
579
|
-
ok: z.boolean(),
|
|
580
|
-
action: z.literal("attach"),
|
|
581
|
-
activeCausalWorkspace: activeCausalWorkspaceSchema.nullable(),
|
|
582
|
-
persistedLocalHistory: persistedLocalHistorySummarySchema,
|
|
583
|
-
nextAction: causalSurfaceNextActionSchema,
|
|
584
|
-
errorCode: z.string().optional(),
|
|
585
|
-
error: z.string().optional(),
|
|
586
|
-
}).strict();
|
|
587
|
-
|
|
588
|
-
export const activityViewSchema = workspaceStatusSchema.extend({
|
|
589
|
-
truthClass: z.literal("artifact_history"),
|
|
590
|
-
anchor: activityViewAnchorSchema,
|
|
591
|
-
summary: activityViewSummarySchema,
|
|
592
|
-
activeCausalWorkspace: z.object({
|
|
593
|
-
causalContext: runtimeCausalContextSchema,
|
|
594
|
-
attribution: attributionSummarySchema,
|
|
595
|
-
repoConcurrency: repoConcurrencySummarySchema.nullable(),
|
|
596
|
-
checkoutEpoch: z.number().int().nonnegative(),
|
|
597
|
-
lastTransition: repoTransitionSchema.nullable(),
|
|
598
|
-
semanticTransition: repoSemanticTransitionSchema.nullable(),
|
|
599
|
-
workspaceOverlayId: z.string().nullable(),
|
|
600
|
-
workspaceOverlay: workspaceOverlaySummarySchema.nullable(),
|
|
601
|
-
workspaceOverlayFooting: workspaceOverlayFootingSchema.nullable(),
|
|
602
|
-
stagedTarget: runtimeStagedTargetSchema,
|
|
603
|
-
}).nullable(),
|
|
604
|
-
activityWindow: z.object({
|
|
605
|
-
historyPath: z.string().nullable(),
|
|
606
|
-
limit: z.number().int().positive(),
|
|
607
|
-
returned: z.number().int().nonnegative(),
|
|
608
|
-
totalMatchingItems: z.number().int().nonnegative(),
|
|
609
|
-
truncated: z.boolean(),
|
|
610
|
-
missingSignalKinds: z.array(z.string()),
|
|
611
|
-
groups: z.array(activityViewGroupSchema),
|
|
612
|
-
}).strict(),
|
|
613
|
-
degradedReasons: z.array(z.string()),
|
|
614
|
-
nextAction: z.union([
|
|
615
|
-
causalSurfaceNextActionSchema,
|
|
616
|
-
z.literal("bind_workspace_to_begin_local_history"),
|
|
617
|
-
]),
|
|
618
|
-
}).strict();
|
|
619
|
-
|
|
620
|
-
export const authorizedWorkspaceSchema = z.object({
|
|
621
|
-
repoId: z.string(),
|
|
622
|
-
worktreeId: z.string(),
|
|
623
|
-
worktreeRoot: z.string(),
|
|
624
|
-
gitCommonDir: z.string(),
|
|
625
|
-
capabilityProfile: workspaceCapabilityProfileSchema,
|
|
626
|
-
authorizedAt: z.string(),
|
|
627
|
-
lastBoundAt: z.string().nullable(),
|
|
628
|
-
activeSessions: z.number().int().nonnegative(),
|
|
629
|
-
}).strict();
|
|
630
|
-
|
|
631
|
-
export const workspaceAuthorizeSchema = z.object({
|
|
632
|
-
ok: z.boolean(),
|
|
633
|
-
changed: z.boolean(),
|
|
634
|
-
authorization: authorizedWorkspaceSchema.optional(),
|
|
635
|
-
errorCode: z.string().optional(),
|
|
636
|
-
error: z.string().optional(),
|
|
637
|
-
}).strict();
|
|
638
|
-
|
|
639
|
-
export const workspaceRevokeSchema = z.object({
|
|
640
|
-
ok: z.boolean(),
|
|
641
|
-
revoked: z.boolean(),
|
|
642
|
-
repoId: z.string().nullable().optional(),
|
|
643
|
-
worktreeId: z.string().nullable().optional(),
|
|
644
|
-
worktreeRoot: z.string().nullable().optional(),
|
|
645
|
-
activeSessions: z.number().int().nonnegative().optional(),
|
|
646
|
-
errorCode: z.string().optional(),
|
|
647
|
-
error: z.string().optional(),
|
|
648
|
-
}).strict();
|
|
649
|
-
|
|
650
|
-
export const daemonSessionSchema = z.object({
|
|
651
|
-
sessionId: z.string(),
|
|
652
|
-
sessionMode: z.literal("daemon"),
|
|
653
|
-
bindState: z.enum(["bound", "unbound"]),
|
|
654
|
-
repoId: z.string().nullable(),
|
|
655
|
-
worktreeId: z.string().nullable(),
|
|
656
|
-
worktreeRoot: z.string().nullable(),
|
|
657
|
-
causalSessionId: z.string().nullable(),
|
|
658
|
-
checkoutEpochId: z.string().nullable(),
|
|
659
|
-
capabilityProfile: workspaceCapabilityProfileSchema.nullable(),
|
|
660
|
-
startedAt: z.string(),
|
|
661
|
-
lastActivityAt: z.string(),
|
|
662
|
-
}).strict();
|
|
663
|
-
|
|
664
|
-
const daemonRepoWorktreeSchema = z.object({
|
|
665
|
-
worktreeId: z.string(),
|
|
666
|
-
worktreeRoot: z.string(),
|
|
667
|
-
activeSessions: z.number().int().nonnegative(),
|
|
668
|
-
lastBoundAt: z.string().nullable(),
|
|
669
|
-
}).strict();
|
|
670
|
-
|
|
671
|
-
const daemonRepoMonitorSchema = z.object({
|
|
672
|
-
workerKind: z.literal("git_poll_indexer"),
|
|
673
|
-
lifecycleState: z.enum(["running", "paused", "stopped"]),
|
|
674
|
-
health: z.enum(["ok", "lagging", "error", "unauthorized", "paused", "stopped"]),
|
|
675
|
-
lastTickAt: z.string().nullable(),
|
|
676
|
-
lastSuccessAt: z.string().nullable(),
|
|
677
|
-
lastError: z.string().nullable(),
|
|
678
|
-
}).strict();
|
|
679
|
-
|
|
680
|
-
export const daemonRepoSchema = z.object({
|
|
681
|
-
repoId: z.string(),
|
|
682
|
-
gitCommonDir: z.string(),
|
|
683
|
-
authorizedWorkspaces: z.number().int().nonnegative(),
|
|
684
|
-
boundSessions: z.number().int().nonnegative(),
|
|
685
|
-
activeWorktrees: z.number().int().nonnegative(),
|
|
686
|
-
backlogCommits: z.number().int().nonnegative(),
|
|
687
|
-
lastBoundAt: z.string().nullable(),
|
|
688
|
-
lastActivityAt: z.string().nullable(),
|
|
689
|
-
monitor: daemonRepoMonitorSchema.nullable(),
|
|
690
|
-
worktrees: z.array(daemonRepoWorktreeSchema),
|
|
691
|
-
}).strict();
|
|
692
|
-
|
|
693
|
-
export const monitorStatusSchema = z.object({
|
|
694
|
-
repoId: z.string(),
|
|
695
|
-
gitCommonDir: z.string(),
|
|
696
|
-
anchorWorktreeRoot: z.string(),
|
|
697
|
-
authorizedWorkspaces: z.number().int().nonnegative(),
|
|
698
|
-
workerKind: z.literal("git_poll_indexer"),
|
|
699
|
-
lifecycleState: z.enum(["running", "paused", "stopped"]),
|
|
700
|
-
health: z.enum(["ok", "lagging", "error", "unauthorized", "paused", "stopped"]),
|
|
701
|
-
pollIntervalMs: z.number().int().positive(),
|
|
702
|
-
lastStartedAt: z.string().nullable(),
|
|
703
|
-
lastTickAt: z.string().nullable(),
|
|
704
|
-
lastSuccessAt: z.string().nullable(),
|
|
705
|
-
lastError: z.string().nullable(),
|
|
706
|
-
lastIndexedCommit: z.string().nullable(),
|
|
707
|
-
lastHeadCommit: z.string().nullable(),
|
|
708
|
-
backlogCommits: z.number().int().nonnegative(),
|
|
709
|
-
lastRunCommitsIndexed: z.number().int().nonnegative(),
|
|
710
|
-
lastRunPatchesWritten: z.number().int().nonnegative(),
|
|
711
|
-
}).strict();
|
|
712
|
-
|
|
713
|
-
export const monitorActionSchema = z.object({
|
|
714
|
-
ok: z.boolean(),
|
|
715
|
-
action: z.enum(["start", "pause", "resume", "stop"]),
|
|
716
|
-
created: z.boolean(),
|
|
717
|
-
changed: z.boolean(),
|
|
718
|
-
status: monitorStatusSchema.optional(),
|
|
719
|
-
errorCode: z.string().optional(),
|
|
720
|
-
error: z.string().optional(),
|
|
721
|
-
}).strict();
|
|
722
|
-
|
|
723
|
-
const daemonSchedulerSchema = z.object({
|
|
724
|
-
maxConcurrentJobs: z.number().int().positive(),
|
|
725
|
-
activeJobs: z.number().int().nonnegative(),
|
|
726
|
-
queuedJobs: z.number().int().nonnegative(),
|
|
727
|
-
interactiveQueuedJobs: z.number().int().nonnegative(),
|
|
728
|
-
backgroundQueuedJobs: z.number().int().nonnegative(),
|
|
729
|
-
activeWriterLanes: z.number().int().nonnegative(),
|
|
730
|
-
queuedWriterLanes: z.number().int().nonnegative(),
|
|
731
|
-
completedJobs: z.number().int().nonnegative(),
|
|
732
|
-
failedJobs: z.number().int().nonnegative(),
|
|
733
|
-
longestQueuedWaitMs: z.number().int().nonnegative(),
|
|
734
|
-
}).strict();
|
|
735
|
-
|
|
736
|
-
const daemonWorkersSchema = z.object({
|
|
737
|
-
mode: z.enum(["inline", "child_processes"]),
|
|
738
|
-
totalWorkers: z.number().int().nonnegative(),
|
|
739
|
-
busyWorkers: z.number().int().nonnegative(),
|
|
740
|
-
idleWorkers: z.number().int().nonnegative(),
|
|
741
|
-
queuedTasks: z.number().int().nonnegative(),
|
|
742
|
-
completedTasks: z.number().int().nonnegative(),
|
|
743
|
-
failedTasks: z.number().int().nonnegative(),
|
|
744
|
-
}).strict();
|
|
745
|
-
|
|
746
|
-
export const daemonStatusSchema = z.object({
|
|
747
|
-
ok: z.literal(true),
|
|
748
|
-
sessionMode: z.literal("daemon"),
|
|
749
|
-
transport: z.enum(["unix_socket", "named_pipe"]),
|
|
750
|
-
sameUserOnly: z.literal(true),
|
|
751
|
-
socketPath: z.string(),
|
|
752
|
-
mcpPath: z.string(),
|
|
753
|
-
healthPath: z.string(),
|
|
754
|
-
activeSessions: z.number().int().nonnegative(),
|
|
755
|
-
boundSessions: z.number().int().nonnegative(),
|
|
756
|
-
unboundSessions: z.number().int().nonnegative(),
|
|
757
|
-
activeWarpRepos: z.number().int().nonnegative(),
|
|
758
|
-
authorizedWorkspaces: z.number().int().nonnegative(),
|
|
759
|
-
authorizedRepos: z.number().int().nonnegative(),
|
|
760
|
-
workspaceBindRequiresAuthorization: z.literal(true),
|
|
761
|
-
defaultCapabilityProfile: workspaceCapabilityProfileSchema,
|
|
762
|
-
totalMonitors: z.number().int().nonnegative(),
|
|
763
|
-
runningMonitors: z.number().int().nonnegative(),
|
|
764
|
-
pausedMonitors: z.number().int().nonnegative(),
|
|
765
|
-
stoppedMonitors: z.number().int().nonnegative(),
|
|
766
|
-
failingMonitors: z.number().int().nonnegative(),
|
|
767
|
-
backlogMonitors: z.number().int().nonnegative(),
|
|
768
|
-
scheduler: daemonSchedulerSchema,
|
|
769
|
-
workers: daemonWorkersSchema,
|
|
770
|
-
startedAt: z.string(),
|
|
771
|
-
}).strict();
|
|
772
|
-
|
|
773
|
-
const initActionSchema = z.object({
|
|
774
|
-
action: z.enum(["exists", "create", "append"]),
|
|
775
|
-
label: z.string(),
|
|
776
|
-
detail: z.string().optional(),
|
|
777
|
-
}).strict();
|
|
778
|
-
|
|
779
|
-
const hooksConfigSchema = z.object({
|
|
780
|
-
hooks: z.object({
|
|
781
|
-
PreToolUse: z.array(z.object({
|
|
782
|
-
matcher: z.literal("Read"),
|
|
783
|
-
hooks: z.array(z.object({
|
|
784
|
-
type: z.literal("command"),
|
|
785
|
-
command: z.string(),
|
|
786
|
-
}).strict()),
|
|
787
|
-
}).strict()),
|
|
788
|
-
PostToolUse: z.array(z.object({
|
|
789
|
-
matcher: z.literal("Read"),
|
|
790
|
-
hooks: z.array(z.object({
|
|
791
|
-
type: z.literal("command"),
|
|
792
|
-
command: z.string(),
|
|
793
|
-
}).strict()),
|
|
794
|
-
}).strict()),
|
|
795
|
-
}).strict(),
|
|
796
|
-
}).strict();
|
|
797
|
-
|
|
798
|
-
const suggestedMcpServerSchema = z.object({
|
|
799
|
-
mcpServers: z.object({
|
|
800
|
-
graft: z.object({
|
|
801
|
-
command: z.literal("npx"),
|
|
802
|
-
args: z.union([
|
|
803
|
-
z.tuple([z.literal("-y"), z.literal("@flyingrobots/graft"), z.literal("serve")]),
|
|
804
|
-
z.tuple([
|
|
805
|
-
z.literal("-y"),
|
|
806
|
-
z.literal("@flyingrobots/graft"),
|
|
807
|
-
z.literal("serve"),
|
|
808
|
-
z.literal("--runtime"),
|
|
809
|
-
z.literal("daemon"),
|
|
810
|
-
]),
|
|
811
|
-
]),
|
|
812
|
-
}).strict(),
|
|
813
|
-
}).strict(),
|
|
814
|
-
}).strict();
|
|
815
|
-
|
|
816
|
-
export const localHistoryDagNodeSchema = z.object({
|
|
817
|
-
id: z.string(),
|
|
818
|
-
label: z.string(),
|
|
819
|
-
entityKind: z.string(),
|
|
820
|
-
eventKind: z.string().optional(),
|
|
821
|
-
occurredAt: z.string().optional(),
|
|
822
|
-
}).strict();
|
|
823
|
-
|
|
824
|
-
export const localHistoryDagEdgeSchema = z.object({
|
|
825
|
-
from: z.string(),
|
|
826
|
-
to: z.string(),
|
|
827
|
-
label: z.string(),
|
|
828
|
-
}).strict();
|
|
829
|
-
|
|
830
|
-
export const cliFragmentSchemas = {
|
|
831
|
-
initActionSchema,
|
|
832
|
-
hooksConfigSchema,
|
|
833
|
-
suggestedMcpServerSchema,
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
export const mcpFragmentSchemas = {
|
|
837
|
-
actualSchema,
|
|
838
|
-
thresholdsSchema,
|
|
839
|
-
budgetSchema,
|
|
840
|
-
tripwireSchema,
|
|
841
|
-
outlineEntrySchema,
|
|
842
|
-
jumpEntrySchema,
|
|
843
|
-
outlineDiffSchema,
|
|
844
|
-
mapFileSchema,
|
|
845
|
-
mapDirectorySchema,
|
|
846
|
-
mapModeSchema,
|
|
847
|
-
fileDiffSchema,
|
|
848
|
-
burdenByKindSchema,
|
|
849
|
-
sludgeReportSchema,
|
|
850
|
-
burdenSummarySchema,
|
|
851
|
-
receiptSchema,
|
|
852
|
-
runtimeObservabilitySchema,
|
|
853
|
-
runtimeCausalContextSchema,
|
|
854
|
-
runtimeStagedTargetSchema,
|
|
855
|
-
persistedLocalHistorySummarySchema,
|
|
856
|
-
repoConcurrencySummarySchema,
|
|
857
|
-
precisionSymbolMatchSchema,
|
|
858
|
-
codeRefsMatchSchema,
|
|
859
|
-
codeRefsProvenanceSchema,
|
|
860
|
-
structuralRefusalSchema,
|
|
861
|
-
worldlineLayerSchema,
|
|
862
|
-
activityViewSchema,
|
|
863
|
-
causalStatusSchema,
|
|
864
|
-
causalAttachSchema,
|
|
865
|
-
workspaceAuthorizeSchema,
|
|
866
|
-
workspaceRevokeSchema,
|
|
867
|
-
workspaceStatusSchema,
|
|
868
|
-
workspaceActionSchema,
|
|
869
|
-
workspaceOverlaySummarySchema,
|
|
870
|
-
workspaceOverlayFootingSchema,
|
|
871
|
-
authorizedWorkspaceSchema,
|
|
872
|
-
policyBoundarySchema,
|
|
873
|
-
daemonStatusSchema,
|
|
874
|
-
daemonSessionSchema,
|
|
875
|
-
daemonRepoSchema,
|
|
876
|
-
monitorStatusSchema,
|
|
877
|
-
monitorActionSchema,
|
|
878
|
-
repoTransitionSchema,
|
|
879
|
-
repoSemanticTransitionSchema,
|
|
880
|
-
sessionDepthSchema,
|
|
881
|
-
};
|