@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.
@@ -14,7 +14,7 @@
14
14
  * Assistant-specific tools remain separate from mesh tools. Driver discovery
15
15
  * (list/describe) is shared across all three modes; invoke remains Worker-only.
16
16
  */
17
- export declare const ASSISTANT_TOOLS: readonly ["projects", "environment", "assistant_action", "project_watch", "project_status", "project_send", "project_read", "project_add", "project_attach_remote", "discover_repos", "memory", "memory_search", "skill_view", "skill_manage", "project_note", "launch_defaults", "launch_defaults_set", "driver_list", "driver_describe", "artifact_list", "artifact_read", "decision_answer", "decision_request", "session_control"];
17
+ export declare const ASSISTANT_TOOLS: readonly ["projects", "environment", "assistant_action", "project_watch", "project_status", "project_send", "project_read", "project_add", "project_attach_remote", "discover_repos", "memory", "memory_search", "skill_view", "skill_manage", "project_note", "launch_defaults", "launch_defaults_set", "driver_list", "driver_describe", "artifact_list", "artifact_read", "decision_answer", "decision_request", "session_control", "file_transfer"];
18
18
  export type AssistantTool = typeof ASSISTANT_TOOLS[number];
19
19
  export declare function isAssistantTool(value: unknown): value is AssistantTool;
20
20
  /** Daemon verb names (§4.4 table + the five verbs below it). */
@@ -49,6 +49,8 @@ export declare const ASSISTANT_VERB: {
49
49
  readonly decisionRequest: "assistant_decision_request";
50
50
  /** Stop / restart / switch the provider of a coordinator, worker or the assistant session (handoff design 2026-11-01 §4). */
51
51
  readonly sessionControl: "assistant_session_control";
52
+ /** Request / status / cancel the assistant's own project file transfers (owner approves in the dashboard; file-transfer design section 6). */
53
+ readonly fileTransfer: "assistant_file_transfer";
52
54
  readonly launch: "launch_assistant";
53
55
  readonly pendingRelays: "assistant_pending_relays";
54
56
  readonly stagedResolve: "assistant_staged_resolve";
package/dist/index.js CHANGED
@@ -1302,6 +1302,7 @@ var CANONICAL_MESH_TOOL_NAMES = [
1302
1302
  "mesh_release_list",
1303
1303
  "mesh_release_record_deploy",
1304
1304
  "mesh_release_changelog_draft",
1305
+ "mesh_file_transfer",
1305
1306
  "mesh_review_inbox",
1306
1307
  "mesh_node_slots",
1307
1308
  "driver_list",
@@ -2271,7 +2272,8 @@ function renderWorkerProtocolFooter(input = {}) {
2271
2272
  "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`.",
2272
2273
  "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 `[]`.",
2273
2274
  "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.",
2274
- "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."
2275
+ "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.",
2276
+ "`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."
2275
2277
  );
2276
2278
  if (input.enclosedHandoffNotes && input.enclosedHandoffNotes > 0) {
2277
2279
  lines.push(
@@ -2344,7 +2346,8 @@ var ASSISTANT_TOOLS = [
2344
2346
  "artifact_read",
2345
2347
  "decision_answer",
2346
2348
  "decision_request",
2347
- "session_control"
2349
+ "session_control",
2350
+ "file_transfer"
2348
2351
  ];
2349
2352
  var ASSISTANT_TOOL_SET = new Set(ASSISTANT_TOOLS);
2350
2353
  function isAssistantTool(value) {
@@ -2382,6 +2385,8 @@ var ASSISTANT_VERB = {
2382
2385
  decisionRequest: "assistant_decision_request",
2383
2386
  /** Stop / restart / switch the provider of a coordinator, worker or the assistant session (handoff design 2026-11-01 §4). */
2384
2387
  sessionControl: "assistant_session_control",
2388
+ /** Request / status / cancel the assistant's own project file transfers (owner approves in the dashboard; file-transfer design section 6). */
2389
+ fileTransfer: "assistant_file_transfer",
2385
2390
  // assistant-side daemon verbs without a tool of the same name
2386
2391
  launch: "launch_assistant",
2387
2392
  pendingRelays: "assistant_pending_relays",
@@ -2423,9 +2428,10 @@ var ASSISTANT_TOOL_VERBS = {
2423
2428
  artifact_read: ASSISTANT_VERB.artifactRead,
2424
2429
  decision_answer: ASSISTANT_VERB.decisionAnswer,
2425
2430
  decision_request: ASSISTANT_VERB.decisionRequest,
2426
- session_control: ASSISTANT_VERB.sessionControl
2431
+ session_control: ASSISTANT_VERB.sessionControl,
2432
+ file_transfer: ASSISTANT_VERB.fileTransfer
2427
2433
  };
2428
- 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"];
2434
+ 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"];
2429
2435
  var ASSISTANT_OWNER_VERBS = [
2430
2436
  ASSISTANT_VERB.executionSettings,
2431
2437
  ASSISTANT_VERB.stagedResolve,
@@ -3727,7 +3733,7 @@ function decodeQueueRequeueRequest(value) {
3727
3733
  return isQueueRequeueRequest(value) ? value : null;
3728
3734
  }
3729
3735
  function isQueueRequeueResponse(value) {
3730
- return isRecord(value) && hasOnlyKeys2(value, ["task"]) && (value.task === null || isQueueEntryWire(value.task));
3736
+ 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");
3731
3737
  }
3732
3738
  function decodeQueueRequeueResponse(value) {
3733
3739
  return isQueueRequeueResponse(value) ? value : null;
@@ -3792,8 +3798,9 @@ function decodeRecoveryContextQueryResponse(value) {
3792
3798
  return isRecoveryContextQueryResponse(value) ? value : null;
3793
3799
  }
3794
3800
  function decodeQueueReviseRequest(value) {
3795
- 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;
3801
+ 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;
3796
3802
  const p = value.patch;
3803
+ if (p.requestQuotaOverride !== void 0 && (p.requestQuotaOverride !== true || Object.keys(p).length !== 1)) return null;
3797
3804
  if (p.message !== void 0 && (typeof p.message !== "string" || !p.message.trim())) return null;
3798
3805
  if (p.phase !== void 0 && p.phase !== "source" && p.phase !== "integration") return null;
3799
3806
  for (const key of ["ownedPaths", "dependsOn"]) {