@adhdev/mesh-shared 1.0.60-rc.41 → 1.0.60-rc.43
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/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +11 -0
- package/package.json +1 -1
- package/src/types.ts +8 -0
- package/src/worker-protocol.ts +24 -2
package/dist/index.js
CHANGED
|
@@ -1990,15 +1990,25 @@ function renderWorkerProtocolFooter(input = {}) {
|
|
|
1990
1990
|
const scope = [];
|
|
1991
1991
|
if (input.taskId) scope.push(`task ${input.taskId}`);
|
|
1992
1992
|
if (input.taskMode) scope.push(`mode ${input.taskMode}`);
|
|
1993
|
-
if (input.difficulty)
|
|
1993
|
+
if (input.difficulty) {
|
|
1994
|
+
if (isMeshTaskDifficulty(input.difficulty)) {
|
|
1995
|
+
scope.push(`difficulty ${input.difficulty}`);
|
|
1996
|
+
} else {
|
|
1997
|
+
console.warn(
|
|
1998
|
+
`[worker-protocol] task ${input.taskId ?? "(unknown)"}: dropping invalid difficulty '${input.difficulty}' from the worker footer (expected one of easy, medium, difficult, freeform)`
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
1994
2002
|
if (input.readonly) scope.push("read-only");
|
|
1995
2003
|
if (scope.length) lines.push(`You are a delegated worker (${scope.join(", ")}).`);
|
|
1996
2004
|
else lines.push("You are a delegated worker.");
|
|
1997
2005
|
lines.push(
|
|
1998
2006
|
"When your work is finished, blocked, or has failed, call `report_completion` exactly once. Its `summary` is recorded verbatim as the authoritative record of this task \u2014 your terminal is not scraped for it \u2014 so state what you did, what you found, and where you left the branch.",
|
|
1999
2007
|
"For work that runs longer than a few minutes, call `progress_update` at natural checkpoints so the coordinator can see you are alive without polling.",
|
|
2000
|
-
"`peer_context_pull` shows what sibling tasks in this mission have reported; `git_status` / `git_diff` / `git_log` inspect your own workspace
|
|
2001
|
-
"You have no coordinator tools (no `mesh_*`) by design: do not enqueue, dispatch, or restart anything. If you need a decision from the coordinator, finish with `report_completion` and outcome `blocked`, listing what you need in `blockers`."
|
|
2008
|
+
"`peer_context_pull` shows what sibling tasks in this mission have reported; `git_status` / `git_diff` / `git_log` inspect your own workspace \u2014 all three REQUIRE the absolute path to it as `workspace`.",
|
|
2009
|
+
"You have no coordinator tools (no `mesh_*`) by design: do not enqueue, dispatch, or restart anything. If you need a decision from the coordinator, finish with `report_completion` and outcome `blocked`, listing what you need in `blockers`.",
|
|
2010
|
+
"On a code-changing task, `report_completion` with outcome `completed` requires `touched_files` \u2014 send `[]` if you changed nothing, omitting the field is what gets refused. `blocked`/`failed` never need it, and a read-only task should omit it or send `[]`.",
|
|
2011
|
+
"If `report_completion` is refused, the response carries `validationErrors` (or a `hint`) naming exactly what to fix \u2014 correct that field and call it again; a refusal records nothing."
|
|
2002
2012
|
);
|
|
2003
2013
|
if (input.enclosedHandoffNotes && input.enclosedHandoffNotes > 0) {
|
|
2004
2014
|
lines.push(
|