@adhdev/mesh-shared 1.0.58-rc.9 → 1.0.58-rc.91

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.
@@ -0,0 +1,17 @@
1
+ export declare const CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX = "Claude TUI review page is not focused";
2
+ /**
3
+ * The answer keystrokes reached the terminal, but the daemon could not CONFIRM
4
+ * the review page before its settle budget expired — the picker was still
5
+ * showing our own bound question, not a foreign widget.
6
+ *
7
+ * This is deliberately a separate class from
8
+ * CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX, which means "the screen is
9
+ * something we do not own, so we refuse to press Enter into it". Here the
10
+ * screen IS ours and the input WAS delivered; only the confirmation is
11
+ * missing. Resending would replay the whole keystroke sequence into a picker
12
+ * that may have advanced in the meantime, so the UI for this class must NOT
13
+ * invite a retry. See the daemon-side gate in
14
+ * `providers/spec/cli-adapter.ts` (assertFocusedClaudeTuiReview) and the web
15
+ * mapping in `web-core/src/hooks/useInteractivePrompt.ts`.
16
+ */
17
+ export declare const CLAUDE_TUI_REVIEW_UNCONFIRMED_PREFIX = "Claude TUI answer delivered but not confirmed";
@@ -18,9 +18,24 @@
18
18
  * or matches.
19
19
  */
20
20
  /** Messages the daemon sends UP to the Workers server over the WS bridge. */
21
- export type DaemonToServerWsMsg = 'auth' | 'status_report' | 'status_heartbeat' | 'status_event' | 'command_result' | 'error' | 'agent_event' | 'log';
21
+ export type DaemonToServerWsMsg = 'auth' | 'status_report' | 'status_heartbeat' | 'status_event' | 'command_result' | 'error' | 'agent_event' | 'log'
22
+ /**
23
+ * seqscribe Beacon vectors (design §7.1). ONE daemon-initiated frame carries
24
+ * both directions — `op: 'put'` stores this node's content-free vector
25
+ * report, `op: 'get'` asks for the board — because the server has no way to
26
+ * wake itself: `DaemonConnectionDO` has neither an alarm nor a timer, and
27
+ * adding one would hit the most request-quota-pressured axis in the system.
28
+ */
29
+ | 'beacon_vectors';
22
30
  /** Server→daemon control messages the OSS engine reacts to. */
23
- export type ServerToDaemonWsMsg = 'auth_ok' | 'auth_error' | 'machine_evicted' | 'force_disconnect' | 'token_revoked' | 'version_mismatch' | 'force_update_required' | 'command' | 'agent_command' | 'resolve_action';
31
+ export type ServerToDaemonWsMsg = 'auth_ok' | 'auth_error' | 'machine_evicted' | 'force_disconnect' | 'token_revoked' | 'version_mismatch' | 'force_update_required' | 'command' | 'agent_command' | 'resolve_action'
32
+ /**
33
+ * Reply to a `beacon_vectors` GET, correlated by `requestId`. A PUT is
34
+ * fire-and-forget and gets no reply at all — the beacon is advisory, so a
35
+ * lost report costs one debounce cycle of prediction accuracy and nothing
36
+ * else, which is not worth an ack round trip.
37
+ */
38
+ | 'beacon_vectors_result';
24
39
  /** P2P signaling relayed through the server WS. */
25
40
  export type P2PSignalingWsMsg = 'p2p_ready' | 'offer' | 'answer' | 'ice' | 'mesh_p2p_ready' | 'mesh_p2p_offer' | 'mesh_p2p_answer' | 'mesh_p2p_ice';
26
41
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/mesh-shared",
3
- "version": "1.0.58-rc.9",
3
+ "version": "1.0.58-rc.91",
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/index.ts CHANGED
@@ -28,3 +28,4 @@ export * from './mesh-status-probe'
28
28
  export * from './rpc-chunking'
29
29
  export * from './semver-compare'
30
30
  export * from './ws-protocol'
31
+ export * from './interactive-prompt-constants'
@@ -0,0 +1,18 @@
1
+ export const CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX = 'Claude TUI review page is not focused';
2
+
3
+ /**
4
+ * The answer keystrokes reached the terminal, but the daemon could not CONFIRM
5
+ * the review page before its settle budget expired — the picker was still
6
+ * showing our own bound question, not a foreign widget.
7
+ *
8
+ * This is deliberately a separate class from
9
+ * CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX, which means "the screen is
10
+ * something we do not own, so we refuse to press Enter into it". Here the
11
+ * screen IS ours and the input WAS delivered; only the confirmation is
12
+ * missing. Resending would replay the whole keystroke sequence into a picker
13
+ * that may have advanced in the meantime, so the UI for this class must NOT
14
+ * invite a retry. See the daemon-side gate in
15
+ * `providers/spec/cli-adapter.ts` (assertFocusedClaudeTuiReview) and the web
16
+ * mapping in `web-core/src/hooks/useInteractivePrompt.ts`.
17
+ */
18
+ export const CLAUDE_TUI_REVIEW_UNCONFIRMED_PREFIX = 'Claude TUI answer delivered but not confirmed';
@@ -27,7 +27,15 @@ export type DaemonToServerWsMsg =
27
27
  | 'command_result'
28
28
  | 'error'
29
29
  | 'agent_event'
30
- | 'log';
30
+ | 'log'
31
+ /**
32
+ * seqscribe Beacon vectors (design §7.1). ONE daemon-initiated frame carries
33
+ * both directions — `op: 'put'` stores this node's content-free vector
34
+ * report, `op: 'get'` asks for the board — because the server has no way to
35
+ * wake itself: `DaemonConnectionDO` has neither an alarm nor a timer, and
36
+ * adding one would hit the most request-quota-pressured axis in the system.
37
+ */
38
+ | 'beacon_vectors';
31
39
 
32
40
  /** Server→daemon control messages the OSS engine reacts to. */
33
41
  export type ServerToDaemonWsMsg =
@@ -40,7 +48,14 @@ export type ServerToDaemonWsMsg =
40
48
  | 'force_update_required'
41
49
  | 'command'
42
50
  | 'agent_command'
43
- | 'resolve_action';
51
+ | 'resolve_action'
52
+ /**
53
+ * Reply to a `beacon_vectors` GET, correlated by `requestId`. A PUT is
54
+ * fire-and-forget and gets no reply at all — the beacon is advisory, so a
55
+ * lost report costs one debounce cycle of prediction accuracy and nothing
56
+ * else, which is not worth an ack round trip.
57
+ */
58
+ | 'beacon_vectors_result';
44
59
 
45
60
  /** P2P signaling relayed through the server WS. */
46
61
  export type P2PSignalingWsMsg =
@@ -74,11 +89,13 @@ export type DashboardP2PMessageKind =
74
89
 
75
90
  export const DAEMON_TO_SERVER_WS_MSGS: readonly DaemonToServerWsMsg[] = [
76
91
  'auth', 'status_report', 'status_heartbeat', 'status_event', 'command_result', 'error', 'agent_event', 'log',
92
+ 'beacon_vectors',
77
93
  ];
78
94
 
79
95
  export const SERVER_TO_DAEMON_WS_MSGS: readonly ServerToDaemonWsMsg[] = [
80
96
  'auth_ok', 'auth_error', 'machine_evicted', 'force_disconnect', 'token_revoked',
81
97
  'version_mismatch', 'force_update_required', 'command', 'agent_command', 'resolve_action',
98
+ 'beacon_vectors_result',
82
99
  ];
83
100
 
84
101
  export function isDaemonToServerWsMsg(value: unknown): value is DaemonToServerWsMsg {