@adhdev/mesh-shared 1.0.76-rc.3 → 1.0.76-rc.5

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.
@@ -44,6 +44,15 @@ export interface WorkerProtocolFooterInput {
44
44
  enclosedHandoffNotes?: number;
45
45
  /** H2: the owning mission's brief, when this task belongs to one. Rendered above the marker line — see module doc. */
46
46
  missionBrief?: MissionBrief;
47
+ /**
48
+ * Whether the worker MCP (the `WORKER_TOOLS` surface) was actually delivered
49
+ * to the receiving session — the launch-time `deriveWorkerMcpDeliveryStatus`
50
+ * outcome. `false` renders the no-tools variant: the worker is told to end
51
+ * with a plain final summary instead of being sent hunting for tools it does
52
+ * not hold. Absent = unknown (e.g. a remote session) — the tool variant,
53
+ * which is what every worker launched with the default gate receives.
54
+ */
55
+ workerMcp?: boolean;
47
56
  }
48
57
  export declare function hasWorkerProtocolFooter(body: string): boolean;
49
58
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/mesh-shared",
3
- "version": "1.0.76-rc.3",
3
+ "version": "1.0.76-rc.5",
4
4
  "description": "ADHDev mesh-shared — pure mesh/git status normalizers shared by daemon-core and web-core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -62,6 +62,15 @@ export interface WorkerProtocolFooterInput {
62
62
  enclosedHandoffNotes?: number
63
63
  /** H2: the owning mission's brief, when this task belongs to one. Rendered above the marker line — see module doc. */
64
64
  missionBrief?: MissionBrief
65
+ /**
66
+ * Whether the worker MCP (the `WORKER_TOOLS` surface) was actually delivered
67
+ * to the receiving session — the launch-time `deriveWorkerMcpDeliveryStatus`
68
+ * outcome. `false` renders the no-tools variant: the worker is told to end
69
+ * with a plain final summary instead of being sent hunting for tools it does
70
+ * not hold. Absent = unknown (e.g. a remote session) — the tool variant,
71
+ * which is what every worker launched with the default gate receives.
72
+ */
73
+ workerMcp?: boolean
65
74
  }
66
75
 
67
76
  export function hasWorkerProtocolFooter(body: string): boolean {
@@ -99,6 +108,24 @@ export function renderWorkerProtocolFooter(input: WorkerProtocolFooterInput = {}
99
108
  if (input.readonly) scope.push('read-only')
100
109
  if (scope.length) lines.push(`You are a delegated worker (${scope.join(', ')}).`)
101
110
  else lines.push('You are a delegated worker.')
111
+ if (input.workerMcp === false) {
112
+ lines.push(
113
+ 'This session has NO adhdev worker tools (`report_completion`, `progress_update`, `peer_context_pull`, '
114
+ + '`git_*`) — do not look for them. When your work is finished, blocked, or has failed, end your turn '
115
+ + 'with a plain final summary: what you did, what you found, which files you changed, and where you '
116
+ + 'left the branch. That final message is what the coordinator receives.',
117
+ 'You have no coordinator tools (no `mesh_*`) by design: do not enqueue, dispatch, or restart anything. '
118
+ + 'If you need a decision from the coordinator, say so plainly in your final summary — what is blocked '
119
+ + 'and what you need — and stop.',
120
+ )
121
+ if (input.enclosedHandoffNotes && input.enclosedHandoffNotes > 0) {
122
+ lines.push(
123
+ `The ${input.enclosedHandoffNotes} handoff note(s) above were written by agents who touched this code before you; `
124
+ + 'honour their conflict guidance and mention anything the next agent should know in your final summary.',
125
+ )
126
+ }
127
+ return lines.join('\n')
128
+ }
102
129
  lines.push(
103
130
  'When your work is finished, blocked, or has failed, call `report_completion` exactly once. '
104
131
  + 'Its `summary` is recorded verbatim as the authoritative record of this task — your terminal is not '
@@ -107,6 +134,8 @@ export function renderWorkerProtocolFooter(input: WorkerProtocolFooterInput = {}
107
134
  + 'coordinator can see you are alive without polling.',
108
135
  '`peer_context_pull` shows what sibling tasks in this mission have reported; `git_status` / `git_diff` / '
109
136
  + '`git_log` inspect your own workspace — all three REQUIRE the absolute path to it as `workspace`.',
137
+ 'Memos from the coordinator arrive appended to the response of whichever worker tool you call next; '
138
+ + 'read them and follow them.',
110
139
  'You have no coordinator tools (no `mesh_*`) by design: do not enqueue, dispatch, or restart anything. '
111
140
  + 'If you need a decision from the coordinator, finish with `report_completion` and outcome `blocked`, '
112
141
  + 'listing what you need in `blockers`.',