@adhdev/mesh-shared 1.0.60-rc.9 → 1.0.61-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/brain-routing.d.ts +6 -8
  2. package/dist/git-diff.d.ts +21 -0
  3. package/dist/index.d.ts +12 -1
  4. package/dist/index.js +2876 -77
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +2625 -72
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/interpolation.d.ts +0 -9
  9. package/dist/json.d.ts +4 -0
  10. package/dist/keyed-doc-delta.d.ts +105 -0
  11. package/dist/mesh-tool-names.d.ts +31 -2
  12. package/dist/mesh-vocabulary.d.ts +66 -0
  13. package/dist/mission-brief.d.ts +62 -0
  14. package/dist/outbound-message.d.ts +201 -0
  15. package/dist/path-ownership.d.ts +101 -0
  16. package/dist/protocol/daemon-server.d.ts +356 -0
  17. package/dist/protocol/dashboard-daemon-p2p.d.ts +213 -0
  18. package/dist/protocol/dashboard-server.d.ts +240 -0
  19. package/dist/protocol/dashboard-wire-version.d.ts +21 -0
  20. package/dist/protocol/envelope.d.ts +55 -0
  21. package/dist/protocol/index.d.ts +16 -0
  22. package/dist/session-launch.d.ts +105 -0
  23. package/dist/session-status.d.ts +75 -0
  24. package/dist/slot-proposal.d.ts +2 -28
  25. package/dist/turn-evidence.d.ts +434 -0
  26. package/dist/turn-ipc-guards.d.ts +18 -0
  27. package/dist/turn-ipc-mission.d.ts +250 -0
  28. package/dist/turn-ipc-queue.d.ts +196 -0
  29. package/dist/turn-ipc-stats.d.ts +72 -0
  30. package/dist/turn-ipc-turn.d.ts +176 -0
  31. package/dist/turn-ipc.d.ts +90 -0
  32. package/dist/types.d.ts +11 -0
  33. package/dist/worker-protocol.d.ts +69 -0
  34. package/dist/ws-protocol.d.ts +69 -41
  35. package/package.json +1 -1
  36. package/src/brain-routing.ts +9 -11
  37. package/src/git-diff.ts +48 -0
  38. package/src/index.ts +12 -1
  39. package/src/interpolation.ts +0 -18
  40. package/src/json.ts +10 -0
  41. package/src/keyed-doc-delta.ts +413 -0
  42. package/src/mesh-tool-names.ts +66 -25
  43. package/src/mesh-vocabulary.ts +94 -0
  44. package/src/mission-brief.ts +153 -0
  45. package/src/outbound-message.ts +319 -0
  46. package/src/path-ownership.ts +271 -0
  47. package/src/protocol/daemon-server.ts +510 -0
  48. package/src/protocol/dashboard-daemon-p2p.ts +273 -0
  49. package/src/protocol/dashboard-server.ts +340 -0
  50. package/src/protocol/dashboard-wire-version.ts +27 -0
  51. package/src/protocol/envelope.ts +75 -0
  52. package/src/protocol/index.ts +17 -0
  53. package/src/session-launch.ts +245 -0
  54. package/src/session-status.ts +164 -0
  55. package/src/slot-proposal.ts +2 -48
  56. package/src/turn-evidence.ts +596 -0
  57. package/src/turn-ipc-guards.ts +61 -0
  58. package/src/turn-ipc-mission.ts +647 -0
  59. package/src/turn-ipc-queue.ts +493 -0
  60. package/src/turn-ipc-stats.ts +193 -0
  61. package/src/turn-ipc-turn.ts +453 -0
  62. package/src/turn-ipc.ts +137 -0
  63. package/src/types.ts +8 -0
  64. package/src/worker-protocol.ts +164 -0
  65. package/src/ws-protocol.ts +98 -93
  66. package/dist/magi.d.ts +0 -281
  67. package/src/magi.ts +0 -310
@@ -5,10 +5,8 @@
5
5
  * per-difficulty "brain" preset resolves that into a concrete provider / model /
6
6
  * thinking-level for the launched session. The goal is token economy: an `easy`
7
7
  * task runs on a cheaper model at low reasoning effort; a `difficult` task gets a
8
- * stronger model at high effort. This is a separate axis from MAGI's review kinds
9
- * (rca/design/…) — MAGI fans out review replicas; this picks the single brain that
10
- * *executes* a task — but it reuses the same slot shape (provider/model) and the
11
- * same machine-local storage (`~/.adhdev/meshes.json`).
8
+ * stronger model at high effort. This picks the single brain that *executes* a
9
+ * task, stored machine-local (`~/.adhdev/meshes.json`).
12
10
  */
13
11
  /** The fixed difficulty axis the coordinator classifies a task into. */
14
12
  export type MeshTaskDifficulty = 'easy' | 'medium' | 'difficult' | 'freeform';
@@ -29,8 +27,8 @@ export interface BrainSlot {
29
27
  }
30
28
  /**
31
29
  * Per-difficulty brain bindings for ONE mesh, stored machine-local in
32
- * `~/.adhdev/meshes.json` under that mesh's entry (`meshes[].difficultyBrains`,
33
- * sibling of `magiKindPanels`). The scope is per mesh: two meshes on the same
30
+ * `~/.adhdev/meshes.json` under that mesh's entry (`meshes[].difficultyBrains`).
31
+ * The scope is per mesh: two meshes on the same
34
32
  * machine hold independent presets, so one can pin `difficult` to a cheaper model
35
33
  * without changing what any other mesh runs. (It formerly sat at the config root
36
34
  * keyed by difficulty alone — and since this map picks the MODEL a task runs on,
@@ -58,7 +56,7 @@ export declare function isMeshTaskDifficulty(value: unknown): value is MeshTaskD
58
56
  * a value that should never have been stamped provider-blind.
59
57
  *
60
58
  * 2. IT FOUGHT THE SLOTS. Operators express model choice per node via
61
- * capability slots (`mesh_node_slots_set`), which know the provider. A
59
+ * capability slots (`mesh_node_slots` action "set"), which know the provider. A
62
60
  * mesh-wide preset that also picks a model duplicated that decision from a
63
61
  * position with strictly less information, and needed the modelSource
64
62
  * ('explicit' vs 'preset') precedence machinery plus a fail-closed
@@ -133,7 +131,7 @@ export declare function deriveSlotsFromLegacy(input: {
133
131
  * The reverse direction of deriveSlotsFromLegacy: derive the legacy
134
132
  * `providerPriority` order from capability slots — each slot's provider, in
135
133
  * first-appearance order, de-duplicated. Slot order = preference is the settled
136
- * slots semantics (ORCHESTRATION_NODE_SLOTS.md), so this is what readers of the
134
+ * slots semantics (node capability slots design, 2026-07-09), so this is what readers of the
137
135
  * legacy `policy.providerPriority` field must fall back to when a node declares
138
136
  * slots but no explicit providerPriority (otherwise such a node reads as
139
137
  * unlaunchable even though its slots fully determine the preference order).
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Projection of a daemon `git_diff_file` answer into the per-file row the MCP
3
+ * `git_diff` tool and the cloud git-diff shortcut both return: the diff text
4
+ * capped at `maxLines` (with a visible truncation marker), plus the file's
5
+ * change metadata from the diff summary.
6
+ */
7
+ export interface GitFileDiffRow {
8
+ path: string;
9
+ old_path?: string | null;
10
+ status?: string;
11
+ diff: string;
12
+ truncated: boolean;
13
+ binary: boolean;
14
+ error?: string;
15
+ }
16
+ /** One changed file's row from its `git_diff_file` answer (either `{ diff: {...} }` or the bare diff record). */
17
+ export declare function projectFileDiffRow(file: {
18
+ path: string;
19
+ oldPath?: string | null;
20
+ status?: string;
21
+ }, rawResult: unknown, maxLines: number): GitFileDiffRow;
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export * from './node-facts';
18
18
  export * from './workspace-normalize';
19
19
  export * from './daemon-normalize';
20
20
  export * from './git-summarize';
21
- export * from './magi';
21
+ export * from './git-diff';
22
22
  export * from './brain-routing';
23
23
  export * from './slot-proposal';
24
24
  export * from './interpolation';
@@ -28,3 +28,14 @@ export * from './rpc-chunking';
28
28
  export * from './semver-compare';
29
29
  export * from './ws-protocol';
30
30
  export * from './interactive-prompt-constants';
31
+ export * from './session-status';
32
+ export * from './mesh-vocabulary';
33
+ export * from './outbound-message';
34
+ export * from './worker-protocol';
35
+ export * from './protocol';
36
+ export * from './turn-evidence';
37
+ export * from './session-launch';
38
+ export * from './turn-ipc';
39
+ export * from './path-ownership';
40
+ export * from './mission-brief';
41
+ export * from './keyed-doc-delta';