@ai-matrx/desktop-protocol 0.21.18 → 0.21.19

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.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models-xHAz1vPQ.cjs';
3
- export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-xHAz1vPQ.cjs';
2
+ import { O as OpName } from './models-d2qfjJr7.cjs';
3
+ export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-d2qfjJr7.cjs';
4
4
  export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.cjs';
5
5
 
6
6
  /** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
@@ -43,10 +43,12 @@ declare const PROTOCOL_MAJOR: 1;
43
43
  * rotation and refresh rate, power's energy settings and power.history, the keyboard's
44
44
  * repeat, fn key and input sources (input.keyboard_settings/set_keyboard_settings),
45
45
  * system.open_settings (the OS's own settings page), Spend's last 7 days.
46
+ * 1.25 — each coding account's 5-hour reset (AccountUsage.five_hour_resets_by_ms), so Accounts
47
+ * sorts and filters by when an account is usable again.
46
48
  */
47
- declare const PROTOCOL_MINOR: 24;
49
+ declare const PROTOCOL_MINOR: 25;
48
50
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
49
- declare const PROTOCOL_VERSION: "1.24";
51
+ declare const PROTOCOL_VERSION: "1.25";
50
52
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
51
53
  declare const u32: z.ZodInt;
52
54
  declare const nonNegInt: z.ZodInt;
@@ -2150,6 +2152,7 @@ declare const AccountUsage: z.ZodObject<{
2150
2152
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
2151
2153
  plan: z.ZodOptional<z.ZodString>;
2152
2154
  credits: z.ZodOptional<z.ZodString>;
2155
+ five_hour_resets_by_ms: z.ZodOptional<z.ZodInt>;
2153
2156
  }, z.core.$strict>;
2154
2157
  type AccountUsage = z.output<typeof AccountUsage>;
2155
2158
  /** One window's account's next weekly reset and where the time came from. */
@@ -2208,6 +2211,7 @@ declare const AppsAccountsUsageResult: z.ZodObject<{
2208
2211
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
2209
2212
  plan: z.ZodOptional<z.ZodString>;
2210
2213
  credits: z.ZodOptional<z.ZodString>;
2214
+ five_hour_resets_by_ms: z.ZodOptional<z.ZodInt>;
2211
2215
  }, z.core.$strict>>;
2212
2216
  problem: z.ZodOptional<z.ZodString>;
2213
2217
  }, z.core.$strict>;
@@ -5251,6 +5255,7 @@ declare const FIELDS_SINCE: {
5251
5255
  readonly AccountUsage: {
5252
5256
  readonly plan: "1.13";
5253
5257
  readonly credits: "1.13";
5258
+ readonly five_hour_resets_by_ms: "1.25";
5254
5259
  };
5255
5260
  readonly ResourcesDisk: {
5256
5261
  readonly name: "1.17";
@@ -5327,7 +5332,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
5327
5332
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
5328
5333
 
5329
5334
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
5330
- declare const CONTRACT_SHA256: "89943d5297e89b0ae7433b24c3076be1f65ca39a5edc3f338620597b24009226";
5335
+ declare const CONTRACT_SHA256: "8848ddd3157baf0f83cbd62141dd8b9f2e11f57d0f155f83a4fd2b40db8c7bc6";
5331
5336
 
5332
5337
  /**
5333
5338
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models-xHAz1vPQ.js';
3
- export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-xHAz1vPQ.js';
2
+ import { O as OpName } from './models-d2qfjJr7.js';
3
+ export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-d2qfjJr7.js';
4
4
  export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.js';
5
5
 
6
6
  /** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
@@ -43,10 +43,12 @@ declare const PROTOCOL_MAJOR: 1;
43
43
  * rotation and refresh rate, power's energy settings and power.history, the keyboard's
44
44
  * repeat, fn key and input sources (input.keyboard_settings/set_keyboard_settings),
45
45
  * system.open_settings (the OS's own settings page), Spend's last 7 days.
46
+ * 1.25 — each coding account's 5-hour reset (AccountUsage.five_hour_resets_by_ms), so Accounts
47
+ * sorts and filters by when an account is usable again.
46
48
  */
47
- declare const PROTOCOL_MINOR: 24;
49
+ declare const PROTOCOL_MINOR: 25;
48
50
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
49
- declare const PROTOCOL_VERSION: "1.24";
51
+ declare const PROTOCOL_VERSION: "1.25";
50
52
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
51
53
  declare const u32: z.ZodInt;
52
54
  declare const nonNegInt: z.ZodInt;
@@ -2150,6 +2152,7 @@ declare const AccountUsage: z.ZodObject<{
2150
2152
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
2151
2153
  plan: z.ZodOptional<z.ZodString>;
2152
2154
  credits: z.ZodOptional<z.ZodString>;
2155
+ five_hour_resets_by_ms: z.ZodOptional<z.ZodInt>;
2153
2156
  }, z.core.$strict>;
2154
2157
  type AccountUsage = z.output<typeof AccountUsage>;
2155
2158
  /** One window's account's next weekly reset and where the time came from. */
@@ -2208,6 +2211,7 @@ declare const AppsAccountsUsageResult: z.ZodObject<{
2208
2211
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
2209
2212
  plan: z.ZodOptional<z.ZodString>;
2210
2213
  credits: z.ZodOptional<z.ZodString>;
2214
+ five_hour_resets_by_ms: z.ZodOptional<z.ZodInt>;
2211
2215
  }, z.core.$strict>>;
2212
2216
  problem: z.ZodOptional<z.ZodString>;
2213
2217
  }, z.core.$strict>;
@@ -5251,6 +5255,7 @@ declare const FIELDS_SINCE: {
5251
5255
  readonly AccountUsage: {
5252
5256
  readonly plan: "1.13";
5253
5257
  readonly credits: "1.13";
5258
+ readonly five_hour_resets_by_ms: "1.25";
5254
5259
  };
5255
5260
  readonly ResourcesDisk: {
5256
5261
  readonly name: "1.17";
@@ -5327,7 +5332,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
5327
5332
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
5328
5333
 
5329
5334
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
5330
- declare const CONTRACT_SHA256: "89943d5297e89b0ae7433b24c3076be1f65ca39a5edc3f338620597b24009226";
5335
+ declare const CONTRACT_SHA256: "8848ddd3157baf0f83cbd62141dd8b9f2e11f57d0f155f83a4fd2b40db8c7bc6";
5331
5336
 
5332
5337
  /**
5333
5338
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
4
4
  var PROTOCOL_MAJOR = 1;
5
- var PROTOCOL_MINOR = 24;
5
+ var PROTOCOL_MINOR = 25;
6
6
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
7
7
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
8
8
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1200,7 +1200,13 @@ var AccountUsage = z14.strictObject({
1200
1200
  /** 1.13: the account's plan as the app names it (Codex: "pro", "prolite"), when recorded. */
1201
1201
  plan: z14.string().max(80).optional(),
1202
1202
  /** 1.13: the account's credit balance as the app records it (Codex), when recorded. */
1203
- credits: z14.string().max(40).optional()
1203
+ credits: z14.string().max(40).optional(),
1204
+ /**
1205
+ * 1.25: the latest the account's 5-hour window can reset: 5 hours after the first reading of this
1206
+ * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour
1207
+ * window is running (no use in the last reading, or the reading is over 5 hours old).
1208
+ */
1209
+ five_hour_resets_by_ms: epochMs.optional()
1204
1210
  });
1205
1211
  var AccountReset = z14.strictObject({
1206
1212
  window: ChatPlace,
@@ -3104,7 +3110,7 @@ var FIELDS_SINCE = {
3104
3110
  AppsAccountsUsageResult: { problem: "1.12" },
3105
3111
  AppsAccountsResetsResult: { problem: "1.12" },
3106
3112
  ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15" },
3107
- AccountUsage: { plan: "1.13", credits: "1.13" },
3113
+ AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
3108
3114
  ResourcesDisk: { name: "1.17" },
3109
3115
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
3110
3116
  AudioDevice: { kind: "1.24" },
@@ -3240,7 +3246,7 @@ function forPeer(op, part, value, version) {
3240
3246
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
3241
3247
 
3242
3248
  // src/contract.ts
3243
- var CONTRACT_SHA256 = "89943d5297e89b0ae7433b24c3076be1f65ca39a5edc3f338620597b24009226";
3249
+ var CONTRACT_SHA256 = "8848ddd3157baf0f83cbd62141dd8b9f2e11f57d0f155f83a4fd2b40db8c7bc6";
3244
3250
 
3245
3251
  // src/close-policy.ts
3246
3252
  var CLOSE_RULES = {