@adhdev/mesh-shared 1.0.79 → 1.0.80-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.
@@ -73,10 +73,19 @@ export * from './turn-ipc-stats';
73
73
  * ledger_not_owner — the daemon that answered does not own the
74
74
  * attempt/mesh addressed by the request (routing
75
75
  * mistake, or the owner changed after a reclaim).
76
+ * session_busy_with_task — `turn_observe{dispatch_accepted}` was REFUSED: the
77
+ * target session already holds an open mesh attempt
78
+ * (≤1 open attempt per session). The error message
79
+ * carries the machine token
80
+ * `session_busy_with_task[task=<id> attempt=<id>]`
81
+ * (daemon-core mesh-session-busy-dispatch.ts) naming
82
+ * the attempt in the way. Unlike the codes above this
83
+ * is a definite answer, not "the ledger is not there":
84
+ * the dispatch must not be sent.
76
85
  */
77
- export declare const TURN_IPC_ERROR_CODES: readonly ["daemon_required", "turn_ledger_unavailable", "ledger_not_owner"];
86
+ export declare const TURN_IPC_ERROR_CODES: readonly ["daemon_required", "turn_ledger_unavailable", "ledger_not_owner", "session_busy_with_task"];
78
87
  export type TurnIpcErrorCode = typeof TURN_IPC_ERROR_CODES[number];
79
- export declare const isTurnIpcErrorCode: (value: unknown) => value is "daemon_required" | "turn_ledger_unavailable" | "ledger_not_owner";
88
+ export declare const isTurnIpcErrorCode: (value: unknown) => value is "daemon_required" | "turn_ledger_unavailable" | "ledger_not_owner" | "session_busy_with_task";
80
89
  /** Structured failure shape a responder returns instead of a result. Never thrown across the wire — the client maps it to a typed error (see mcp-server/src/ipc/turn-commands.ts). */
81
90
  export interface TurnIpcError {
82
91
  code: TurnIpcErrorCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/mesh-shared",
3
- "version": "1.0.79",
3
+ "version": "1.0.80-rc.1",
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",
package/src/turn-ipc.ts CHANGED
@@ -80,8 +80,17 @@ export * from './turn-ipc-stats';
80
80
  * ledger_not_owner — the daemon that answered does not own the
81
81
  * attempt/mesh addressed by the request (routing
82
82
  * mistake, or the owner changed after a reclaim).
83
+ * session_busy_with_task — `turn_observe{dispatch_accepted}` was REFUSED: the
84
+ * target session already holds an open mesh attempt
85
+ * (≤1 open attempt per session). The error message
86
+ * carries the machine token
87
+ * `session_busy_with_task[task=<id> attempt=<id>]`
88
+ * (daemon-core mesh-session-busy-dispatch.ts) naming
89
+ * the attempt in the way. Unlike the codes above this
90
+ * is a definite answer, not "the ledger is not there":
91
+ * the dispatch must not be sent.
83
92
  */
84
- export const TURN_IPC_ERROR_CODES = ['daemon_required', 'turn_ledger_unavailable', 'ledger_not_owner'] as const
93
+ export const TURN_IPC_ERROR_CODES = ['daemon_required', 'turn_ledger_unavailable', 'ledger_not_owner', 'session_busy_with_task'] as const
85
94
  export type TurnIpcErrorCode = typeof TURN_IPC_ERROR_CODES[number]
86
95
 
87
96
  export const isTurnIpcErrorCode = makeGuard(TURN_IPC_ERROR_CODES)