@flyingrobots/graft 0.8.0 → 0.9.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 (116) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/GUIDE.md +8 -3
  3. package/README.md +126 -100
  4. package/dist/adapters/fake-echo-kernel-transport.d.ts +33 -0
  5. package/dist/adapters/fake-echo-kernel-transport.d.ts.map +1 -0
  6. package/dist/adapters/fake-echo-kernel-transport.js +208 -0
  7. package/dist/adapters/fake-echo-kernel-transport.js.map +1 -0
  8. package/dist/cli/structural-blame-render.d.ts.map +1 -1
  9. package/dist/cli/structural-blame-render.js +4 -1
  10. package/dist/cli/structural-blame-render.js.map +1 -1
  11. package/dist/contracts/capabilities.d.ts +2 -2
  12. package/dist/contracts/capabilities.d.ts.map +1 -1
  13. package/dist/contracts/capabilities.js +14 -0
  14. package/dist/contracts/capabilities.js.map +1 -1
  15. package/dist/contracts/output-schema-cli.d.ts +3 -0
  16. package/dist/contracts/output-schema-cli.d.ts.map +1 -1
  17. package/dist/contracts/output-schema-fragments.d.ts +162 -0
  18. package/dist/contracts/output-schema-fragments.d.ts.map +1 -1
  19. package/dist/contracts/output-schema-fragments.js +27 -0
  20. package/dist/contracts/output-schema-fragments.js.map +1 -1
  21. package/dist/contracts/output-schema-mcp.d.ts +84 -0
  22. package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
  23. package/dist/contracts/output-schema-mcp.js +6 -1
  24. package/dist/contracts/output-schema-mcp.js.map +1 -1
  25. package/dist/contracts/output-schema-meta.d.ts +1 -1
  26. package/dist/contracts/output-schema-meta.d.ts.map +1 -1
  27. package/dist/contracts/output-schemas.d.ts.map +1 -1
  28. package/dist/contracts/output-schemas.js +32 -0
  29. package/dist/contracts/output-schemas.js.map +1 -1
  30. package/dist/echo/canonical-cbor.d.ts +10 -0
  31. package/dist/echo/canonical-cbor.d.ts.map +1 -0
  32. package/dist/echo/canonical-cbor.js +213 -0
  33. package/dist/echo/canonical-cbor.js.map +1 -0
  34. package/dist/echo/codec-runtime.d.ts +72 -0
  35. package/dist/echo/codec-runtime.d.ts.map +1 -0
  36. package/dist/echo/codec-runtime.js +259 -0
  37. package/dist/echo/codec-runtime.js.map +1 -0
  38. package/dist/echo/structural-history-client.d.ts +68 -0
  39. package/dist/echo/structural-history-client.d.ts.map +1 -0
  40. package/dist/echo/structural-history-client.js +149 -0
  41. package/dist/echo/structural-history-client.js.map +1 -0
  42. package/dist/echo/structural-history-envelope-codec.d.ts +46 -0
  43. package/dist/echo/structural-history-envelope-codec.d.ts.map +1 -0
  44. package/dist/echo/structural-history-envelope-codec.js +121 -0
  45. package/dist/echo/structural-history-envelope-codec.js.map +1 -0
  46. package/dist/echo/structural-reading-adapter.d.ts +13 -0
  47. package/dist/echo/structural-reading-adapter.d.ts.map +1 -0
  48. package/dist/echo/structural-reading-adapter.js +120 -0
  49. package/dist/echo/structural-reading-adapter.js.map +1 -0
  50. package/dist/generated/graft-structural-history.codec.generated.d.ts +135 -0
  51. package/dist/generated/graft-structural-history.codec.generated.d.ts.map +1 -0
  52. package/dist/generated/graft-structural-history.codec.generated.js +545 -0
  53. package/dist/generated/graft-structural-history.codec.generated.js.map +1 -0
  54. package/dist/generated/graft-structural-history.d.ts +331 -0
  55. package/dist/generated/graft-structural-history.d.ts.map +1 -0
  56. package/dist/generated/graft-structural-history.js +47 -0
  57. package/dist/generated/graft-structural-history.js.map +1 -0
  58. package/dist/mcp/burden.d.ts.map +1 -1
  59. package/dist/mcp/burden.js +2 -0
  60. package/dist/mcp/burden.js.map +1 -1
  61. package/dist/mcp/context.d.ts +5 -1
  62. package/dist/mcp/context.d.ts.map +1 -1
  63. package/dist/mcp/context.js +11 -1
  64. package/dist/mcp/context.js.map +1 -1
  65. package/dist/mcp/repo-tool-worker-context.d.ts.map +1 -1
  66. package/dist/mcp/repo-tool-worker-context.js +19 -0
  67. package/dist/mcp/repo-tool-worker-context.js.map +1 -1
  68. package/dist/mcp/server-context.d.ts.map +1 -1
  69. package/dist/mcp/server-context.js +17 -0
  70. package/dist/mcp/server-context.js.map +1 -1
  71. package/dist/mcp/server-tool-access.d.ts.map +1 -1
  72. package/dist/mcp/server-tool-access.js +4 -0
  73. package/dist/mcp/server-tool-access.js.map +1 -1
  74. package/dist/mcp/tool-registry.d.ts.map +1 -1
  75. package/dist/mcp/tool-registry.js +5 -1
  76. package/dist/mcp/tool-registry.js.map +1 -1
  77. package/dist/mcp/tools/dead-symbols.d.ts.map +1 -1
  78. package/dist/mcp/tools/dead-symbols.js +2 -3
  79. package/dist/mcp/tools/dead-symbols.js.map +1 -1
  80. package/dist/mcp/tools/structural-blame.d.ts.map +1 -1
  81. package/dist/mcp/tools/structural-blame.js +3 -0
  82. package/dist/mcp/tools/structural-blame.js.map +1 -1
  83. package/dist/mcp/tools/structural-review.d.ts.map +1 -1
  84. package/dist/mcp/tools/structural-review.js +9 -22
  85. package/dist/mcp/tools/structural-review.js.map +1 -1
  86. package/dist/mcp/tools/workspace-list-opened.d.ts +3 -0
  87. package/dist/mcp/tools/workspace-list-opened.d.ts.map +1 -0
  88. package/dist/mcp/tools/workspace-list-opened.js +10 -0
  89. package/dist/mcp/tools/workspace-list-opened.js.map +1 -0
  90. package/dist/mcp/tools/workspace-open.d.ts +3 -0
  91. package/dist/mcp/tools/workspace-open.d.ts.map +1 -0
  92. package/dist/mcp/tools/workspace-open.js +34 -0
  93. package/dist/mcp/tools/workspace-open.js.map +1 -0
  94. package/dist/mcp/workspace-router-model.d.ts +27 -0
  95. package/dist/mcp/workspace-router-model.d.ts.map +1 -1
  96. package/dist/mcp/workspace-router-model.js.map +1 -1
  97. package/dist/mcp/workspace-router.d.ts +9 -2
  98. package/dist/mcp/workspace-router.d.ts.map +1 -1
  99. package/dist/mcp/workspace-router.js +145 -1
  100. package/dist/mcp/workspace-router.js.map +1 -1
  101. package/dist/ports/echo-kernel-transport.d.ts +12 -0
  102. package/dist/ports/echo-kernel-transport.d.ts.map +1 -0
  103. package/dist/ports/echo-kernel-transport.js +13 -0
  104. package/dist/ports/echo-kernel-transport.js.map +1 -0
  105. package/dist/ports/structural-reading.d.ts +100 -0
  106. package/dist/ports/structural-reading.d.ts.map +1 -0
  107. package/dist/ports/structural-reading.js +41 -0
  108. package/dist/ports/structural-reading.js.map +1 -0
  109. package/dist/warp/structural-reading-adapter.d.ts +28 -0
  110. package/dist/warp/structural-reading-adapter.d.ts.map +1 -0
  111. package/dist/warp/structural-reading-adapter.js +94 -0
  112. package/dist/warp/structural-reading-adapter.js.map +1 -0
  113. package/docs/CLI.md +4 -4
  114. package/docs/MCP.md +10 -5
  115. package/docs/SETUP.md +12 -6
  116. package/package.json +9 -3
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.9.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"
@@ -111,10 +115,12 @@
111
115
  "onlyBuiltDependencies": [],
112
116
  "overrides": {
113
117
  "vite": "^8.0.5",
118
+ "brace-expansion": "5.0.6",
114
119
  "hono": "4.12.18",
115
120
  "fast-uri": "3.1.2",
116
121
  "ip-address": "10.2.0",
117
- "postcss": "8.5.12"
122
+ "postcss": "8.5.12",
123
+ "qs": "6.15.2"
118
124
  }
119
125
  }
120
126
  }