@adhdev/mesh-shared 1.0.58-rc.7 → 1.0.58-rc.70
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.d.ts +1 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interactive-prompt-constants.d.ts +1 -0
- package/dist/node-facts.d.ts +20 -1
- package/dist/ws-protocol.d.ts +17 -2
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/interactive-prompt-constants.ts +1 -0
- package/src/node-facts.ts +21 -1
- package/src/ws-protocol.ts +19 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX = "Claude TUI review page is not focused";
|
package/dist/node-facts.d.ts
CHANGED
|
@@ -51,6 +51,25 @@ export interface MeshNodeFactsProviderQuota {
|
|
|
51
51
|
status: string;
|
|
52
52
|
session: MeshNodeFactsQuotaWindow | null;
|
|
53
53
|
weekly: MeshNodeFactsQuotaWindow | null;
|
|
54
|
+
/** 30-day billing-style window, only for providers that report one
|
|
55
|
+
* (cursor-cli). Promoted from the index signature 2026-08-24 so readers
|
|
56
|
+
* can render it typed — an 'ok' cursor snapshot often carries ONLY this
|
|
57
|
+
* axis, and a reader that looks at session/weekly alone misreads a
|
|
58
|
+
* healthy reading as a failure. */
|
|
59
|
+
monthly?: MeshNodeFactsQuotaWindow | null;
|
|
60
|
+
/** Per-pool quota buckets, only for providers whose plan has more than one
|
|
61
|
+
* pool (antigravity-cli: Gemini vs Claude/GPT groups, each with a 5h and
|
|
62
|
+
* a weekly bucket). `session`/`weekly` above collapse these to the WORST
|
|
63
|
+
* bucket per window (the routing-safe headline); the buckets carry the
|
|
64
|
+
* per-pool detail a reader should surface. Promoted from the index
|
|
65
|
+
* signature 2026-08-24, same reasoning as `monthly`. */
|
|
66
|
+
buckets?: Array<{
|
|
67
|
+
name?: string;
|
|
68
|
+
usedPercent?: number;
|
|
69
|
+
windowMinutes?: number;
|
|
70
|
+
resetsAt?: number | null;
|
|
71
|
+
[extra: string]: unknown;
|
|
72
|
+
}> | null;
|
|
54
73
|
/** Unix ms of the snapshot itself — older than the bundle's reportedAt. */
|
|
55
74
|
updatedAt: number;
|
|
56
75
|
error: string | null;
|
|
@@ -136,7 +155,7 @@ export interface MeshNodeFacts {
|
|
|
136
155
|
machineNickname?: string;
|
|
137
156
|
/**
|
|
138
157
|
* Per-provider quota snapshots, keyed by QuotaProvider id ('claude-cli',
|
|
139
|
-
* 'codex-cli', 'kimi'). Consumed by ROUTING as well as observation: the
|
|
158
|
+
* 'codex-cli', 'cursor-cli', 'kimi'). Consumed by ROUTING as well as observation: the
|
|
140
159
|
* coordinator's quota gate / spread bonus (daemon-core mesh-quota-routing.ts,
|
|
141
160
|
* thresholds in RepoMeshPolicy.quotaRouting) reads exactly this shape, so
|
|
142
161
|
* field renames here are a routing-contract change, not a cosmetic one.
|
package/dist/ws-protocol.d.ts
CHANGED
|
@@ -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
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CLAUDE_TUI_REVIEW_PAGE_NOT_FOCUSED_PREFIX = 'Claude TUI review page is not focused';
|
package/src/node-facts.ts
CHANGED
|
@@ -54,6 +54,25 @@ export interface MeshNodeFactsProviderQuota {
|
|
|
54
54
|
status: string
|
|
55
55
|
session: MeshNodeFactsQuotaWindow | null
|
|
56
56
|
weekly: MeshNodeFactsQuotaWindow | null
|
|
57
|
+
/** 30-day billing-style window, only for providers that report one
|
|
58
|
+
* (cursor-cli). Promoted from the index signature 2026-08-24 so readers
|
|
59
|
+
* can render it typed — an 'ok' cursor snapshot often carries ONLY this
|
|
60
|
+
* axis, and a reader that looks at session/weekly alone misreads a
|
|
61
|
+
* healthy reading as a failure. */
|
|
62
|
+
monthly?: MeshNodeFactsQuotaWindow | null
|
|
63
|
+
/** Per-pool quota buckets, only for providers whose plan has more than one
|
|
64
|
+
* pool (antigravity-cli: Gemini vs Claude/GPT groups, each with a 5h and
|
|
65
|
+
* a weekly bucket). `session`/`weekly` above collapse these to the WORST
|
|
66
|
+
* bucket per window (the routing-safe headline); the buckets carry the
|
|
67
|
+
* per-pool detail a reader should surface. Promoted from the index
|
|
68
|
+
* signature 2026-08-24, same reasoning as `monthly`. */
|
|
69
|
+
buckets?: Array<{
|
|
70
|
+
name?: string
|
|
71
|
+
usedPercent?: number
|
|
72
|
+
windowMinutes?: number
|
|
73
|
+
resetsAt?: number | null
|
|
74
|
+
[extra: string]: unknown
|
|
75
|
+
}> | null
|
|
57
76
|
/** Unix ms of the snapshot itself — older than the bundle's reportedAt. */
|
|
58
77
|
updatedAt: number
|
|
59
78
|
error: string | null
|
|
@@ -141,7 +160,7 @@ export interface MeshNodeFacts {
|
|
|
141
160
|
machineNickname?: string
|
|
142
161
|
/**
|
|
143
162
|
* Per-provider quota snapshots, keyed by QuotaProvider id ('claude-cli',
|
|
144
|
-
* 'codex-cli', 'kimi'). Consumed by ROUTING as well as observation: the
|
|
163
|
+
* 'codex-cli', 'cursor-cli', 'kimi'). Consumed by ROUTING as well as observation: the
|
|
145
164
|
* coordinator's quota gate / spread bonus (daemon-core mesh-quota-routing.ts,
|
|
146
165
|
* thresholds in RepoMeshPolicy.quotaRouting) reads exactly this shape, so
|
|
147
166
|
* field renames here are a routing-contract change, not a cosmetic one.
|
|
@@ -246,6 +265,7 @@ export const QUOTA_SUPPORTED_PROVIDERS: readonly string[] = [
|
|
|
246
265
|
'antigravity-cli',
|
|
247
266
|
'claude-cli',
|
|
248
267
|
'codex-cli',
|
|
268
|
+
'cursor-cli',
|
|
249
269
|
'grok-cli',
|
|
250
270
|
'kimi',
|
|
251
271
|
'opencode',
|
package/src/ws-protocol.ts
CHANGED
|
@@ -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 {
|