@adhdev/mesh-shared 1.0.82-rc.48 → 1.0.82-rc.49
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/assistant-protocol.d.ts +3 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/dist/mesh-tool-names.d.ts +2 -2
- package/dist/turn-ipc-queue.d.ts +7 -0
- package/package.json +1 -1
- package/src/assistant-protocol.ts +5 -1
- package/src/mesh-tool-names.ts +1 -0
- package/src/turn-ipc-queue.ts +7 -3
- package/src/worker-protocol.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -804,6 +804,7 @@ var CANONICAL_MESH_TOOL_NAMES = [
|
|
|
804
804
|
"mesh_release_list",
|
|
805
805
|
"mesh_release_record_deploy",
|
|
806
806
|
"mesh_release_changelog_draft",
|
|
807
|
+
"mesh_file_transfer",
|
|
807
808
|
"mesh_review_inbox",
|
|
808
809
|
"mesh_node_slots",
|
|
809
810
|
"driver_list",
|
|
@@ -1773,7 +1774,8 @@ function renderWorkerProtocolFooter(input = {}) {
|
|
|
1773
1774
|
"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`.",
|
|
1774
1775
|
"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 `[]`.",
|
|
1775
1776
|
"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.",
|
|
1776
|
-
"Put substantial findings (a diagnosis, evidence, repro steps, review findings) in a workspace file and register it with `artifact_register`, then cite the returned ids in `report_completion` `artifact_ids`. The next task in this mission inherits them as input artifacts instead of re-investigating \u2014 keep each artifact self-contained and factual."
|
|
1777
|
+
"Put substantial findings (a diagnosis, evidence, repro steps, review findings) in a workspace file and register it with `artifact_register`, then cite the returned ids in `report_completion` `artifact_ids`. The next task in this mission inherits them as input artifacts instead of re-investigating \u2014 keep each artifact self-contained and factual.",
|
|
1778
|
+
"`driver_invoke` results that carry an image or a large body arrive already registered: take `artifacts[].artifactId` from the result and cite it in `artifact_ids` \u2014 do not paste the body."
|
|
1777
1779
|
);
|
|
1778
1780
|
if (input.enclosedHandoffNotes && input.enclosedHandoffNotes > 0) {
|
|
1779
1781
|
lines.push(
|
|
@@ -1846,7 +1848,8 @@ var ASSISTANT_TOOLS = [
|
|
|
1846
1848
|
"artifact_read",
|
|
1847
1849
|
"decision_answer",
|
|
1848
1850
|
"decision_request",
|
|
1849
|
-
"session_control"
|
|
1851
|
+
"session_control",
|
|
1852
|
+
"file_transfer"
|
|
1850
1853
|
];
|
|
1851
1854
|
var ASSISTANT_TOOL_SET = new Set(ASSISTANT_TOOLS);
|
|
1852
1855
|
function isAssistantTool(value) {
|
|
@@ -1884,6 +1887,8 @@ var ASSISTANT_VERB = {
|
|
|
1884
1887
|
decisionRequest: "assistant_decision_request",
|
|
1885
1888
|
/** Stop / restart / switch the provider of a coordinator, worker or the assistant session (handoff design 2026-11-01 §4). */
|
|
1886
1889
|
sessionControl: "assistant_session_control",
|
|
1890
|
+
/** Request / status / cancel the assistant's own project file transfers (owner approves in the dashboard; file-transfer design section 6). */
|
|
1891
|
+
fileTransfer: "assistant_file_transfer",
|
|
1887
1892
|
// assistant-side daemon verbs without a tool of the same name
|
|
1888
1893
|
launch: "launch_assistant",
|
|
1889
1894
|
pendingRelays: "assistant_pending_relays",
|
|
@@ -1925,9 +1930,10 @@ var ASSISTANT_TOOL_VERBS = {
|
|
|
1925
1930
|
artifact_read: ASSISTANT_VERB.artifactRead,
|
|
1926
1931
|
decision_answer: ASSISTANT_VERB.decisionAnswer,
|
|
1927
1932
|
decision_request: ASSISTANT_VERB.decisionRequest,
|
|
1928
|
-
session_control: ASSISTANT_VERB.sessionControl
|
|
1933
|
+
session_control: ASSISTANT_VERB.sessionControl,
|
|
1934
|
+
file_transfer: ASSISTANT_VERB.fileTransfer
|
|
1929
1935
|
};
|
|
1930
|
-
var ASSISTANT_WRITE_TOOLS = ["project_watch", "assistant_action", "memory", "skill_manage", "project_note", "project_send", "project_add", "project_attach_remote", "launch_defaults_set", "decision_answer", "decision_request", "session_control"];
|
|
1936
|
+
var ASSISTANT_WRITE_TOOLS = ["project_watch", "assistant_action", "memory", "skill_manage", "project_note", "project_send", "project_add", "project_attach_remote", "launch_defaults_set", "decision_answer", "decision_request", "session_control", "file_transfer"];
|
|
1931
1937
|
var ASSISTANT_OWNER_VERBS = [
|
|
1932
1938
|
ASSISTANT_VERB.executionSettings,
|
|
1933
1939
|
ASSISTANT_VERB.stagedResolve,
|
|
@@ -3229,7 +3235,7 @@ function decodeQueueRequeueRequest(value) {
|
|
|
3229
3235
|
return isQueueRequeueRequest(value) ? value : null;
|
|
3230
3236
|
}
|
|
3231
3237
|
function isQueueRequeueResponse(value) {
|
|
3232
|
-
return isRecord(value) && hasOnlyKeys2(value, ["task"]) && (value.task === null || isQueueEntryWire(value.task));
|
|
3238
|
+
return isRecord(value) && hasOnlyKeys2(value, ["task", "quotaOverrideRequested"]) && (value.task === null || isQueueEntryWire(value.task)) && (value.quotaOverrideRequested === void 0 || isRecord(value.quotaOverrideRequested) && typeof value.quotaOverrideRequested.decisionId === "string");
|
|
3233
3239
|
}
|
|
3234
3240
|
function decodeQueueRequeueResponse(value) {
|
|
3235
3241
|
return isQueueRequeueResponse(value) ? value : null;
|
|
@@ -3294,8 +3300,9 @@ function decodeRecoveryContextQueryResponse(value) {
|
|
|
3294
3300
|
return isRecoveryContextQueryResponse(value) ? value : null;
|
|
3295
3301
|
}
|
|
3296
3302
|
function decodeQueueReviseRequest(value) {
|
|
3297
|
-
if (!isRecord(value) || !hasOnlyKeys2(value, ["v", "meshId", "taskId", "expectedRevision", "patch"]) || value.v !== TURN_IPC_PROTOCOL_VERSION || !isEvidenceIdentifier(value.meshId) || !isEvidenceIdentifier(value.taskId) || !Number.isSafeInteger(value.expectedRevision) || value.expectedRevision < 0 || !isRecord(value.patch) || !Object.keys(value.patch).length || !hasOnlyKeys2(value.patch, ["message", "ownedPaths", "phase", "dependsOn", "routingPreferences", "review"])) return null;
|
|
3303
|
+
if (!isRecord(value) || !hasOnlyKeys2(value, ["v", "meshId", "taskId", "expectedRevision", "patch"]) || value.v !== TURN_IPC_PROTOCOL_VERSION || !isEvidenceIdentifier(value.meshId) || !isEvidenceIdentifier(value.taskId) || !Number.isSafeInteger(value.expectedRevision) || value.expectedRevision < 0 || !isRecord(value.patch) || !Object.keys(value.patch).length || !hasOnlyKeys2(value.patch, ["message", "ownedPaths", "phase", "dependsOn", "routingPreferences", "review", "requestQuotaOverride"])) return null;
|
|
3298
3304
|
const p = value.patch;
|
|
3305
|
+
if (p.requestQuotaOverride !== void 0 && (p.requestQuotaOverride !== true || Object.keys(p).length !== 1)) return null;
|
|
3299
3306
|
if (p.message !== void 0 && (typeof p.message !== "string" || !p.message.trim())) return null;
|
|
3300
3307
|
if (p.phase !== void 0 && p.phase !== "source" && p.phase !== "integration") return null;
|
|
3301
3308
|
for (const key of ["ownedPaths", "dependsOn"]) {
|