@flyingrobots/graft 0.8.0 → 0.10.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.
Files changed (186) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/GUIDE.md +8 -3
  3. package/README.md +134 -100
  4. package/dist/adapters/colorful-cli-prose-projector.d.ts +13 -0
  5. package/dist/adapters/colorful-cli-prose-projector.d.ts.map +1 -0
  6. package/dist/adapters/colorful-cli-prose-projector.js +89 -0
  7. package/dist/adapters/colorful-cli-prose-projector.js.map +1 -0
  8. package/dist/adapters/fake-echo-kernel-transport.d.ts +33 -0
  9. package/dist/adapters/fake-echo-kernel-transport.d.ts.map +1 -0
  10. package/dist/adapters/fake-echo-kernel-transport.js +208 -0
  11. package/dist/adapters/fake-echo-kernel-transport.js.map +1 -0
  12. package/dist/adapters/node-process-runner.d.ts.map +1 -1
  13. package/dist/adapters/node-process-runner.js +1 -0
  14. package/dist/adapters/node-process-runner.js.map +1 -1
  15. package/dist/api/index.d.ts +7 -2
  16. package/dist/api/index.d.ts.map +1 -1
  17. package/dist/api/index.js +14 -3
  18. package/dist/api/index.js.map +1 -1
  19. package/dist/cli/structural-blame-render.d.ts.map +1 -1
  20. package/dist/cli/structural-blame-render.js +4 -1
  21. package/dist/cli/structural-blame-render.js.map +1 -1
  22. package/dist/contracts/capabilities.d.ts +2 -2
  23. package/dist/contracts/capabilities.d.ts.map +1 -1
  24. package/dist/contracts/capabilities.js +14 -0
  25. package/dist/contracts/capabilities.js.map +1 -1
  26. package/dist/contracts/output-schema-cli.d.ts +3 -0
  27. package/dist/contracts/output-schema-cli.d.ts.map +1 -1
  28. package/dist/contracts/output-schema-fragments.d.ts +183 -0
  29. package/dist/contracts/output-schema-fragments.d.ts.map +1 -1
  30. package/dist/contracts/output-schema-fragments.js +38 -0
  31. package/dist/contracts/output-schema-fragments.js.map +1 -1
  32. package/dist/contracts/output-schema-mcp.d.ts +91 -0
  33. package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
  34. package/dist/contracts/output-schema-mcp.js +6 -1
  35. package/dist/contracts/output-schema-mcp.js.map +1 -1
  36. package/dist/contracts/output-schema-meta.d.ts +1 -1
  37. package/dist/contracts/output-schema-meta.d.ts.map +1 -1
  38. package/dist/contracts/output-schemas.d.ts.map +1 -1
  39. package/dist/contracts/output-schemas.js +43 -0
  40. package/dist/contracts/output-schemas.js.map +1 -1
  41. package/dist/echo/canonical-cbor.d.ts +10 -0
  42. package/dist/echo/canonical-cbor.d.ts.map +1 -0
  43. package/dist/echo/canonical-cbor.js +213 -0
  44. package/dist/echo/canonical-cbor.js.map +1 -0
  45. package/dist/echo/codec-runtime.d.ts +72 -0
  46. package/dist/echo/codec-runtime.d.ts.map +1 -0
  47. package/dist/echo/codec-runtime.js +259 -0
  48. package/dist/echo/codec-runtime.js.map +1 -0
  49. package/dist/echo/structural-history-client.d.ts +68 -0
  50. package/dist/echo/structural-history-client.d.ts.map +1 -0
  51. package/dist/echo/structural-history-client.js +149 -0
  52. package/dist/echo/structural-history-client.js.map +1 -0
  53. package/dist/echo/structural-history-envelope-codec.d.ts +46 -0
  54. package/dist/echo/structural-history-envelope-codec.d.ts.map +1 -0
  55. package/dist/echo/structural-history-envelope-codec.js +121 -0
  56. package/dist/echo/structural-history-envelope-codec.js.map +1 -0
  57. package/dist/echo/structural-reading-adapter.d.ts +13 -0
  58. package/dist/echo/structural-reading-adapter.d.ts.map +1 -0
  59. package/dist/echo/structural-reading-adapter.js +120 -0
  60. package/dist/echo/structural-reading-adapter.js.map +1 -0
  61. package/dist/echo/structural-reading-generated-model.d.ts +18 -0
  62. package/dist/echo/structural-reading-generated-model.d.ts.map +1 -0
  63. package/dist/echo/structural-reading-generated-model.js +324 -0
  64. package/dist/echo/structural-reading-generated-model.js.map +1 -0
  65. package/dist/generated/graft-structural-history.codec.generated.d.ts +135 -0
  66. package/dist/generated/graft-structural-history.codec.generated.d.ts.map +1 -0
  67. package/dist/generated/graft-structural-history.codec.generated.js +549 -0
  68. package/dist/generated/graft-structural-history.codec.generated.js.map +1 -0
  69. package/dist/generated/graft-structural-history.d.ts +331 -0
  70. package/dist/generated/graft-structural-history.d.ts.map +1 -0
  71. package/dist/generated/graft-structural-history.js +47 -0
  72. package/dist/generated/graft-structural-history.js.map +1 -0
  73. package/dist/mcp/burden.d.ts.map +1 -1
  74. package/dist/mcp/burden.js +2 -0
  75. package/dist/mcp/burden.js.map +1 -1
  76. package/dist/mcp/context.d.ts +5 -1
  77. package/dist/mcp/context.d.ts.map +1 -1
  78. package/dist/mcp/context.js +11 -1
  79. package/dist/mcp/context.js.map +1 -1
  80. package/dist/mcp/control-plane/types.d.ts +8 -0
  81. package/dist/mcp/control-plane/types.d.ts.map +1 -1
  82. package/dist/mcp/daemon-control-plane.d.ts +2 -1
  83. package/dist/mcp/daemon-control-plane.d.ts.map +1 -1
  84. package/dist/mcp/daemon-control-plane.js +49 -0
  85. package/dist/mcp/daemon-control-plane.js.map +1 -1
  86. package/dist/mcp/repo-tool-worker-context.d.ts.map +1 -1
  87. package/dist/mcp/repo-tool-worker-context.js +19 -0
  88. package/dist/mcp/repo-tool-worker-context.js.map +1 -1
  89. package/dist/mcp/repo-workspace.d.ts +1 -1
  90. package/dist/mcp/repo-workspace.d.ts.map +1 -1
  91. package/dist/mcp/repo-workspace.js +5 -0
  92. package/dist/mcp/repo-workspace.js.map +1 -1
  93. package/dist/mcp/server-context.d.ts.map +1 -1
  94. package/dist/mcp/server-context.js +17 -0
  95. package/dist/mcp/server-context.js.map +1 -1
  96. package/dist/mcp/server-tool-access.d.ts.map +1 -1
  97. package/dist/mcp/server-tool-access.js +4 -0
  98. package/dist/mcp/server-tool-access.js.map +1 -1
  99. package/dist/mcp/tool-registry.d.ts.map +1 -1
  100. package/dist/mcp/tool-registry.js +5 -1
  101. package/dist/mcp/tool-registry.js.map +1 -1
  102. package/dist/mcp/tools/changed-since.d.ts.map +1 -1
  103. package/dist/mcp/tools/changed-since.js +24 -10
  104. package/dist/mcp/tools/changed-since.js.map +1 -1
  105. package/dist/mcp/tools/dead-symbols.d.ts.map +1 -1
  106. package/dist/mcp/tools/dead-symbols.js +2 -3
  107. package/dist/mcp/tools/dead-symbols.js.map +1 -1
  108. package/dist/mcp/tools/file-outline.d.ts.map +1 -1
  109. package/dist/mcp/tools/file-outline.js +10 -5
  110. package/dist/mcp/tools/file-outline.js.map +1 -1
  111. package/dist/mcp/tools/structural-blame.d.ts.map +1 -1
  112. package/dist/mcp/tools/structural-blame.js +3 -0
  113. package/dist/mcp/tools/structural-blame.js.map +1 -1
  114. package/dist/mcp/tools/structural-review.d.ts.map +1 -1
  115. package/dist/mcp/tools/structural-review.js +9 -22
  116. package/dist/mcp/tools/structural-review.js.map +1 -1
  117. package/dist/mcp/tools/workspace-list-opened.d.ts +3 -0
  118. package/dist/mcp/tools/workspace-list-opened.d.ts.map +1 -0
  119. package/dist/mcp/tools/workspace-list-opened.js +10 -0
  120. package/dist/mcp/tools/workspace-list-opened.js.map +1 -0
  121. package/dist/mcp/tools/workspace-open.d.ts +3 -0
  122. package/dist/mcp/tools/workspace-open.d.ts.map +1 -0
  123. package/dist/mcp/tools/workspace-open.js +34 -0
  124. package/dist/mcp/tools/workspace-open.js.map +1 -0
  125. package/dist/mcp/workspace-registry.d.ts +83 -0
  126. package/dist/mcp/workspace-registry.d.ts.map +1 -0
  127. package/dist/mcp/workspace-registry.js +542 -0
  128. package/dist/mcp/workspace-registry.js.map +1 -0
  129. package/dist/mcp/workspace-router-model.d.ts +27 -0
  130. package/dist/mcp/workspace-router-model.d.ts.map +1 -1
  131. package/dist/mcp/workspace-router-model.js.map +1 -1
  132. package/dist/mcp/workspace-router.d.ts +9 -2
  133. package/dist/mcp/workspace-router.d.ts.map +1 -1
  134. package/dist/mcp/workspace-router.js +145 -1
  135. package/dist/mcp/workspace-router.js.map +1 -1
  136. package/dist/operations/colorful-prose-projection.d.ts +32 -0
  137. package/dist/operations/colorful-prose-projection.d.ts.map +1 -0
  138. package/dist/operations/colorful-prose-projection.js +344 -0
  139. package/dist/operations/colorful-prose-projection.js.map +1 -0
  140. package/dist/operations/file-outline.d.ts +10 -0
  141. package/dist/operations/file-outline.d.ts.map +1 -1
  142. package/dist/operations/file-outline.js +29 -3
  143. package/dist/operations/file-outline.js.map +1 -1
  144. package/dist/operations/repo-workspace.d.ts +4 -0
  145. package/dist/operations/repo-workspace.d.ts.map +1 -1
  146. package/dist/operations/repo-workspace.js +57 -21
  147. package/dist/operations/repo-workspace.js.map +1 -1
  148. package/dist/operations/safe-read.d.ts +2 -0
  149. package/dist/operations/safe-read.d.ts.map +1 -1
  150. package/dist/operations/safe-read.js +20 -0
  151. package/dist/operations/safe-read.js.map +1 -1
  152. package/dist/operations/structured-buffer-model.d.ts +19 -15
  153. package/dist/operations/structured-buffer-model.d.ts.map +1 -1
  154. package/dist/operations/structured-buffer-model.js +6 -4
  155. package/dist/operations/structured-buffer-model.js.map +1 -1
  156. package/dist/operations/structured-buffer-query.d.ts.map +1 -1
  157. package/dist/operations/structured-buffer-query.js +64 -1
  158. package/dist/operations/structured-buffer-query.js.map +1 -1
  159. package/dist/operations/structured-buffer.d.ts +3 -1
  160. package/dist/operations/structured-buffer.d.ts.map +1 -1
  161. package/dist/operations/structured-buffer.js.map +1 -1
  162. package/dist/parser/types.d.ts +1 -1
  163. package/dist/parser/types.d.ts.map +1 -1
  164. package/dist/parser/types.js.map +1 -1
  165. package/dist/ports/echo-kernel-transport.d.ts +12 -0
  166. package/dist/ports/echo-kernel-transport.d.ts.map +1 -0
  167. package/dist/ports/echo-kernel-transport.js +13 -0
  168. package/dist/ports/echo-kernel-transport.js.map +1 -0
  169. package/dist/ports/process-runner.d.ts +1 -0
  170. package/dist/ports/process-runner.d.ts.map +1 -1
  171. package/dist/ports/structural-history.d.ts +23 -0
  172. package/dist/ports/structural-history.d.ts.map +1 -0
  173. package/dist/ports/structural-history.js +22 -0
  174. package/dist/ports/structural-history.js.map +1 -0
  175. package/dist/ports/structural-reading.d.ts +100 -0
  176. package/dist/ports/structural-reading.d.ts.map +1 -0
  177. package/dist/ports/structural-reading.js +41 -0
  178. package/dist/ports/structural-reading.js.map +1 -0
  179. package/dist/warp/structural-reading-adapter.d.ts +28 -0
  180. package/dist/warp/structural-reading-adapter.d.ts.map +1 -0
  181. package/dist/warp/structural-reading-adapter.js +98 -0
  182. package/dist/warp/structural-reading-adapter.js.map +1 -0
  183. package/docs/CLI.md +4 -4
  184. package/docs/MCP.md +10 -5
  185. package/docs/SETUP.md +12 -6
  186. package/package.json +13 -6
@@ -0,0 +1,98 @@
1
+ import { countNamedImportReferencesAtRef as defaultCountNamedImportReferencesAtRef, } from "../operations/import-reference-impact.js";
2
+ import { countSymbolReferencesFromGraph as defaultCountSymbolReferencesFromGraph, } from "./warp-reference-count.js";
3
+ import { findDeadSymbols as defaultFindDeadSymbols, } from "./dead-symbols.js";
4
+ function translatedGitWarpEvidence(deps, basis, evidence) {
5
+ return {
6
+ kind: "translated-substrate",
7
+ evidenceLabel: "fallback-translated",
8
+ substrate: "git-warp",
9
+ basis: {
10
+ kind: "git-committed-history",
11
+ projectRoot: deps.projectRoot,
12
+ ...(basis.ref !== undefined ? { ref: basis.ref } : {}),
13
+ ...(basis.maxCommits !== undefined ? { maxCommits: basis.maxCommits } : {}),
14
+ },
15
+ evidence,
16
+ nativeContinuumWitness: false,
17
+ };
18
+ }
19
+ function normalizeRefOrDefault(ref) {
20
+ const normalized = ref?.trim();
21
+ return normalized === undefined || normalized.length === 0 ? "HEAD" : normalized;
22
+ }
23
+ function symbolReferencePayload(symbolName, result) {
24
+ return {
25
+ symbol: "symbol" in result ? result.symbol : symbolName,
26
+ referenceCount: result.referenceCount,
27
+ referencingFiles: result.referencingFiles,
28
+ };
29
+ }
30
+ export function createGitWarpStructuralReadingPort(deps) {
31
+ const countSymbolReferencesFromGraph = deps.countSymbolReferencesFromGraph ?? defaultCountSymbolReferencesFromGraph;
32
+ const countNamedImportReferencesAtRef = deps.countNamedImportReferencesAtRef ?? defaultCountNamedImportReferencesAtRef;
33
+ const findDeadSymbols = deps.findDeadSymbols ?? defaultFindDeadSymbols;
34
+ return {
35
+ async countSymbolReferences(request) {
36
+ const ref = normalizeRefOrDefault(request.ref);
37
+ const warp = await deps.getWarp();
38
+ const graphResult = await countSymbolReferencesFromGraph(warp, request.symbolName, request.filePath);
39
+ let payload = symbolReferencePayload(request.symbolName, graphResult);
40
+ let source = "warp-graph";
41
+ let residualPosture = "complete";
42
+ if (graphResult.referenceCount === 0) {
43
+ try {
44
+ const fallbackResult = await countNamedImportReferencesAtRef({
45
+ cwd: deps.projectRoot,
46
+ git: deps.git,
47
+ pathOps: deps.pathOps,
48
+ symbolName: request.symbolName,
49
+ filePath: request.filePath,
50
+ ref,
51
+ });
52
+ if (fallbackResult.referenceCount > 0) {
53
+ payload = symbolReferencePayload(request.symbolName, fallbackResult);
54
+ source = "committed-import-scan";
55
+ }
56
+ }
57
+ catch {
58
+ payload = symbolReferencePayload(request.symbolName, graphResult);
59
+ residualPosture = "partial";
60
+ }
61
+ }
62
+ return {
63
+ kind: "symbol-reference-count",
64
+ freshness: "current",
65
+ residualPosture,
66
+ payload,
67
+ evidence: translatedGitWarpEvidence(deps, { ref }, {
68
+ kind: "symbol-reference-count",
69
+ source,
70
+ symbolName: request.symbolName,
71
+ filePath: request.filePath,
72
+ }),
73
+ };
74
+ },
75
+ async findDeadSymbols(request = {}) {
76
+ const warp = await deps.getWarp();
77
+ const options = request.maxCommits !== undefined
78
+ ? { maxCommits: request.maxCommits }
79
+ : undefined;
80
+ const symbols = await findDeadSymbols(warp, options);
81
+ return {
82
+ kind: "dead-symbols",
83
+ freshness: "current",
84
+ residualPosture: "complete",
85
+ payload: {
86
+ symbols,
87
+ total: symbols.length,
88
+ },
89
+ evidence: translatedGitWarpEvidence(deps, { maxCommits: request.maxCommits }, {
90
+ kind: "dead-symbols",
91
+ source: "warp-graph",
92
+ ...(request.maxCommits !== undefined ? { maxCommits: request.maxCommits } : {}),
93
+ }),
94
+ };
95
+ },
96
+ };
97
+ }
98
+ //# sourceMappingURL=structural-reading-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-reading-adapter.js","sourceRoot":"","sources":["../../src/warp/structural-reading-adapter.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,+BAA+B,IAAI,sCAAsC,GAC1E,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,8BAA8B,IAAI,qCAAqC,GACxE,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,IAAI,sBAAsB,GAE1C,MAAM,mBAAmB,CAAC;AA2B3B,SAAS,yBAAyB,CAChC,IAA2D,EAC3D,KAAsF,EACtF,QAAyB;IAEzB,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,aAAa,EAAE,qBAAqB;QACpC,SAAS,EAAE,UAAU;QACrB,KAAK,EAAE;YACL,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,GAAG,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5E;QACD,QAAQ;QACR,sBAAsB,EAAE,KAAK;KAC9B,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAuB;IACpD,MAAM,UAAU,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC;IAC/B,OAAO,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;AACnF,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAAkB,EAClB,MAAyI;IAEzI,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;oBACE,IAAI,EAAE,cAAc;oBACpB,MAAM,EAAE,YAAY;oBACpB,GAAG,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAChF,CACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/docs/CLI.md CHANGED
@@ -125,10 +125,10 @@ the `graft_dead_symbols` MCP peer.
125
125
 
126
126
  `graft symbol history <symbol> [--path <path>] [--json]` renders the
127
127
  same provenance-backed history as `graft symbol blame`, with a
128
- timeline-first human view over creation, signature-change, and reference
129
- facts. JSON output remains the schema-validated `graft.cli.symbol_blame`
130
- payload so the alias does not create a second wire shape for the same
131
- WARP truth.
128
+ timeline-first human view over creation, signature-change, per-version
129
+ path and line-range facts, and reference facts. JSON output remains the
130
+ schema-validated `graft.cli.symbol_blame` payload so the alias does not
131
+ create a second wire shape for the same WARP truth.
132
132
 
133
133
  `git graft enhance --since <ref> [--head <ref>] [--json]` is the
134
134
  installed Git external-command form for the release-facing structural
package/docs/MCP.md CHANGED
@@ -52,14 +52,18 @@ npx @flyingrobots/graft daemon
52
52
  ```
53
53
 
54
54
  Daemon sessions start `unbound`. Once a client is connected to the
55
- daemon MCP surface, repository-scoped work follows this control-plane
56
- flow:
55
+ daemon MCP surface, repository-scoped work normally follows this
56
+ agent-facing flow:
57
57
 
58
- 1. `workspace_authorize` with the target `cwd`
59
- 2. `workspace_bind` with the target `cwd`
58
+ 1. `workspace_open` with the target `cwd`
59
+ 2. optionally `workspace_list_opened` to inspect opened paths and the
60
+ active workspace
60
61
  3. then call repository-scoped tools such as `safe_read`, `graft_since`,
61
62
  or `code_show`
62
63
 
64
+ `workspace_authorize` and `workspace_bind` remain available as lower-level
65
+ daemon control-plane tools.
66
+
63
67
  ## Key Tool Groups
64
68
  - **Bounded Reads**: `safe_read`, `file_outline`, `read_range`, `changed_since`
65
69
  - **Governed Edits**: `graft_edit`
@@ -68,7 +72,8 @@ flow:
68
72
  - **Structural Metrics**: `graft_churn`, `graft_difficulty`
69
73
  - **Precision**: `code_show`, `code_find`, `code_refs`
70
74
  - **Activity & Footing**: `activity_view`, `causal_status`, `causal_attach`, `doctor`
71
- - **Daemon Control Plane**: `workspace_authorizations`, `workspace_authorize`, `workspace_bind`, `workspace_status`, `workspace_rebind`, `workspace_revoke`, `daemon_status`, `daemon_repos`, `daemon_sessions`, `daemon_monitors`, `monitor_*`
75
+ - **Workspace Routing**: `workspace_open`, `workspace_list_opened`, `workspace_status`
76
+ - **Daemon Control Plane**: `workspace_authorizations`, `workspace_authorize`, `workspace_bind`, `workspace_rebind`, `workspace_revoke`, `daemon_status`, `daemon_repos`, `daemon_sessions`, `daemon_monitors`, `monitor_*`
72
77
 
73
78
  ## Current Truth
74
79
  - MCP is the primary agent surface.
package/docs/SETUP.md CHANGED
@@ -98,6 +98,8 @@ Daemon control-plane inspection now exists through MCP tools:
98
98
  - `monitor_stop`
99
99
  - `workspace_authorizations`
100
100
  - `workspace_authorize`
101
+ - `workspace_open`
102
+ - `workspace_list_opened`
101
103
  - `workspace_bind`
102
104
  - `workspace_status`
103
105
  - `workspace_rebind`
@@ -120,10 +122,14 @@ Practical daemon-backed MCP first-use sequence:
120
122
 
121
123
  1. configure your MCP client with `graft serve --runtime daemon`
122
124
  2. let the bridge auto-start the daemon, or start `npx @flyingrobots/graft daemon`
123
- 3. call `workspace_authorize` with the target `cwd`
124
- 4. call `workspace_bind` with the target `cwd`
125
+ 3. call `workspace_open` with the target `cwd`
126
+ 4. optionally call `workspace_list_opened` to inspect opened paths and the
127
+ active workspace
125
128
  5. then use repository-scoped tools such as `safe_read` or `graft_map`
126
129
 
130
+ Use `workspace_authorize` plus `workspace_bind` when you need direct
131
+ operator control over daemon authorization and binding state.
132
+
127
133
  ### MCP runtime selection
128
134
 
129
135
  Repo-local stdio is the default and remains the simplest path:
@@ -157,8 +163,7 @@ Use repo-local stdio when you want one MCP server bound directly to the
157
163
  current checkout. Use daemon-backed stdio when you want daemon-only
158
164
  capabilities such as shared worker pools, persistent monitors, and
159
165
  daemon control-plane inspection. Daemon-backed sessions start unbound;
160
- repository-scoped tools require `workspace_authorize` and
161
- `workspace_bind`.
166
+ repository-scoped tools normally begin with `workspace_open`.
162
167
 
163
168
  ### One-step bootstrap
164
169
 
@@ -399,8 +404,9 @@ If your client doesn't support `npx`, install globally and use:
399
404
 
400
405
  This section shows the repo-local stdio path. If you connect through
401
406
  `graft daemon` instead, the MCP session starts `unbound` and needs
402
- `workspace_authorize` plus `workspace_bind` before repository-scoped
403
- tool calls.
407
+ `workspace_open` before repository-scoped tool calls. The lower-level
408
+ `workspace_authorize` and `workspace_bind` tools remain available for
409
+ operator control-plane workflows.
404
410
 
405
411
  ## Claude Code Hooks
406
412
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyingrobots/graft",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Context governor and between-commit activity surface for coding agents",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.0",
@@ -46,11 +46,15 @@
46
46
  "test:watch": "vitest",
47
47
  "lint": "eslint .",
48
48
  "typecheck": "tsc --noEmit",
49
+ "schema:structural-history:check": "tsx scripts/check-structural-history-schema-artifacts.ts && tsx scripts/check-structural-history-echo-package.ts",
49
50
  "pack:check": "pnpm pack --dry-run",
50
51
  "guard:agent-worktrees": "tsx scripts/check-agent-worktree-hygiene.ts",
51
52
  "security:check": "tsx scripts/check-release-security.ts",
52
53
  "release:surface-gate": "vitest run --run test/unit/release/package-library-surface.test.ts test/unit/release/three-surface-capability-posture.test.ts",
53
- "release:check": "pnpm guard:agent-worktrees && pnpm lint && pnpm typecheck && pnpm release:surface-gate && pnpm test && pnpm security:check && pnpm pack:check"
54
+ "release:check": "pnpm guard:agent-worktrees && pnpm schema:structural-history:check && pnpm lint && pnpm typecheck && pnpm release:surface-gate && pnpm test && pnpm security:check && pnpm pack:check",
55
+ "gh:issues": "bash scripts/gh-issues.sh bootstrap",
56
+ "gh-issues": "bash scripts/gh-issues.sh bootstrap",
57
+ "gh-issues:check": "bash scripts/gh-issues-check.sh"
54
58
  },
55
59
  "engines": {
56
60
  "node": ">=20.11.0"
@@ -97,6 +101,7 @@
97
101
  },
98
102
  "devDependencies": {
99
103
  "@eslint/js": "^10.0.1",
104
+ "@git-stunts/alfred": "^0.10.3",
100
105
  "@types/node": "^25.5.0",
101
106
  "@types/picomatch": "^4.0.2",
102
107
  "eslint": "^10.1.0",
@@ -104,17 +109,19 @@
104
109
  "tsx": "^4.21.0",
105
110
  "typescript": "^6.0.2",
106
111
  "typescript-eslint": "^8.58.0",
107
- "vite": "^8.0.5",
112
+ "vite": "8.0.16",
108
113
  "vitest": "^4.1.2"
109
114
  },
110
115
  "pnpm": {
111
116
  "onlyBuiltDependencies": [],
112
117
  "overrides": {
113
- "vite": "^8.0.5",
114
- "hono": "4.12.18",
118
+ "vite": "8.0.16",
119
+ "brace-expansion": "5.0.6",
120
+ "hono": "4.12.25",
115
121
  "fast-uri": "3.1.2",
116
122
  "ip-address": "10.2.0",
117
- "postcss": "8.5.12"
123
+ "postcss": "8.5.12",
124
+ "qs": "6.15.2"
118
125
  }
119
126
  }
120
127
  }