@ai-matrx/desktop-protocol 0.17.7 → 0.17.9

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-Os6toG3X.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-Os6toG3X.cjs';
2
+ import { O as OpName } from './models-G1-Bsz-k.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-G1-Bsz-k.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. */
@@ -24,9 +24,9 @@ declare const PROTOCOL_MAJOR: 1;
24
24
  * 1.9 — chats placed in windows / held, several filed at once, projects renamed / archived / copied;
25
25
  * the list says when it is a saved copy being re-read (`updating`) and when it is not live.
26
26
  */
27
- declare const PROTOCOL_MINOR: 11;
27
+ declare const PROTOCOL_MINOR: 13;
28
28
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
29
- declare const PROTOCOL_VERSION: "1.11";
29
+ declare const PROTOCOL_VERSION: "1.13";
30
30
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
31
31
  declare const u32: z.ZodInt;
32
32
  declare const nonNegInt: z.ZodInt;
@@ -1384,8 +1384,19 @@ declare const ChatRow: z.ZodObject<{
1384
1384
  cache_warm: z.ZodBoolean;
1385
1385
  cache_minutes_left: z.ZodInt;
1386
1386
  }, z.core.$strict>>;
1387
+ app_project: z.ZodOptional<z.ZodObject<{
1388
+ id: z.ZodString;
1389
+ name: z.ZodString;
1390
+ }, z.core.$strict>>;
1391
+ tokens: z.ZodOptional<z.ZodInt>;
1387
1392
  }, z.core.$strict>;
1388
1393
  type ChatRow = z.output<typeof ChatRow>;
1394
+ /** 1.13: a project the app itself keeps (Codex's sidebar projects), never ours and never written. */
1395
+ declare const ChatAppProject: z.ZodObject<{
1396
+ id: z.ZodString;
1397
+ name: z.ZodString;
1398
+ }, z.core.$strict>;
1399
+ type ChatAppProject = z.output<typeof ChatAppProject>;
1389
1400
  /** 1.10: a chat's family: the conversation it was forked from, or the original it is a copy of. */
1390
1401
  declare const ChatFamily: z.ZodObject<{
1391
1402
  id: z.ZodString;
@@ -1451,6 +1462,11 @@ declare const AppsChatsListResult: z.ZodObject<{
1451
1462
  cache_warm: z.ZodBoolean;
1452
1463
  cache_minutes_left: z.ZodInt;
1453
1464
  }, z.core.$strict>>;
1465
+ app_project: z.ZodOptional<z.ZodObject<{
1466
+ id: z.ZodString;
1467
+ name: z.ZodString;
1468
+ }, z.core.$strict>>;
1469
+ tokens: z.ZodOptional<z.ZodInt>;
1454
1470
  }, z.core.$strict>>;
1455
1471
  new_window_ms: z.ZodInt;
1456
1472
  updating: z.ZodOptional<z.ZodBoolean>;
@@ -1527,6 +1543,11 @@ declare const AppsProjectsFileResult: z.ZodObject<{
1527
1543
  cache_warm: z.ZodBoolean;
1528
1544
  cache_minutes_left: z.ZodInt;
1529
1545
  }, z.core.$strict>>;
1546
+ app_project: z.ZodOptional<z.ZodObject<{
1547
+ id: z.ZodString;
1548
+ name: z.ZodString;
1549
+ }, z.core.$strict>>;
1550
+ tokens: z.ZodOptional<z.ZodInt>;
1530
1551
  }, z.core.$strict>;
1531
1552
  project: z.ZodObject<{
1532
1553
  id: z.ZodString;
@@ -1582,6 +1603,11 @@ declare const AppsProjectsUnfileResult: z.ZodObject<{
1582
1603
  cache_warm: z.ZodBoolean;
1583
1604
  cache_minutes_left: z.ZodInt;
1584
1605
  }, z.core.$strict>>;
1606
+ app_project: z.ZodOptional<z.ZodObject<{
1607
+ id: z.ZodString;
1608
+ name: z.ZodString;
1609
+ }, z.core.$strict>>;
1610
+ tokens: z.ZodOptional<z.ZodInt>;
1585
1611
  }, z.core.$strict>;
1586
1612
  }, z.core.$strict>;
1587
1613
  type AppsProjectsUnfileResult = z.output<typeof AppsProjectsUnfileResult>;
@@ -1631,6 +1657,11 @@ declare const AppsChatsStarResult: z.ZodObject<{
1631
1657
  cache_warm: z.ZodBoolean;
1632
1658
  cache_minutes_left: z.ZodInt;
1633
1659
  }, z.core.$strict>>;
1660
+ app_project: z.ZodOptional<z.ZodObject<{
1661
+ id: z.ZodString;
1662
+ name: z.ZodString;
1663
+ }, z.core.$strict>>;
1664
+ tokens: z.ZodOptional<z.ZodInt>;
1634
1665
  }, z.core.$strict>;
1635
1666
  }, z.core.$strict>;
1636
1667
  type AppsChatsStarResult = z.output<typeof AppsChatsStarResult>;
@@ -1695,6 +1726,11 @@ declare const AppsChatsPlaceResult: z.ZodObject<{
1695
1726
  cache_warm: z.ZodBoolean;
1696
1727
  cache_minutes_left: z.ZodInt;
1697
1728
  }, z.core.$strict>>;
1729
+ app_project: z.ZodOptional<z.ZodObject<{
1730
+ id: z.ZodString;
1731
+ name: z.ZodString;
1732
+ }, z.core.$strict>>;
1733
+ tokens: z.ZodOptional<z.ZodInt>;
1698
1734
  }, z.core.$strict>;
1699
1735
  message: z.ZodString;
1700
1736
  }, z.core.$strict>;
@@ -1747,6 +1783,11 @@ declare const AppsProjectsFileManyResult: z.ZodObject<{
1747
1783
  cache_warm: z.ZodBoolean;
1748
1784
  cache_minutes_left: z.ZodInt;
1749
1785
  }, z.core.$strict>>;
1786
+ app_project: z.ZodOptional<z.ZodObject<{
1787
+ id: z.ZodString;
1788
+ name: z.ZodString;
1789
+ }, z.core.$strict>>;
1790
+ tokens: z.ZodOptional<z.ZodInt>;
1750
1791
  }, z.core.$strict>>;
1751
1792
  project: z.ZodObject<{
1752
1793
  id: z.ZodString;
@@ -1829,6 +1870,8 @@ declare const AccountUsage: z.ZodObject<{
1829
1870
  live: z.ZodBoolean;
1830
1871
  weekly_resets_at_ms: z.ZodNullable<z.ZodInt>;
1831
1872
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
1873
+ plan: z.ZodOptional<z.ZodString>;
1874
+ credits: z.ZodOptional<z.ZodString>;
1832
1875
  }, z.core.$strict>;
1833
1876
  type AccountUsage = z.output<typeof AccountUsage>;
1834
1877
  /** One window's account's next weekly reset and where the time came from. */
@@ -1885,7 +1928,10 @@ declare const AppsAccountsUsageResult: z.ZodObject<{
1885
1928
  live: z.ZodBoolean;
1886
1929
  weekly_resets_at_ms: z.ZodNullable<z.ZodInt>;
1887
1930
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
1931
+ plan: z.ZodOptional<z.ZodString>;
1932
+ credits: z.ZodOptional<z.ZodString>;
1888
1933
  }, z.core.$strict>>;
1934
+ problem: z.ZodOptional<z.ZodString>;
1889
1935
  }, z.core.$strict>;
1890
1936
  type AppsAccountsUsageResult = z.output<typeof AppsAccountsUsageResult>;
1891
1937
  declare const AppsAccountsResetsParams: z.ZodObject<{
@@ -1906,6 +1952,7 @@ declare const AppsAccountsResetsResult: z.ZodObject<{
1906
1952
  official: z.ZodBoolean;
1907
1953
  note: z.ZodNullable<z.ZodString>;
1908
1954
  }, z.core.$strict>>;
1955
+ problem: z.ZodOptional<z.ZodString>;
1909
1956
  }, z.core.$strict>;
1910
1957
  type AppsAccountsResetsResult = z.output<typeof AppsAccountsResetsResult>;
1911
1958
  /** A window action's answer: what happened, in one line. */
@@ -1987,6 +2034,11 @@ declare const AppsProjectsMoveResult: z.ZodObject<{
1987
2034
  cache_warm: z.ZodBoolean;
1988
2035
  cache_minutes_left: z.ZodInt;
1989
2036
  }, z.core.$strict>>;
2037
+ app_project: z.ZodOptional<z.ZodObject<{
2038
+ id: z.ZodString;
2039
+ name: z.ZodString;
2040
+ }, z.core.$strict>>;
2041
+ tokens: z.ZodOptional<z.ZodInt>;
1990
2042
  }, z.core.$strict>;
1991
2043
  project: z.ZodObject<{
1992
2044
  id: z.ZodString;
@@ -3769,6 +3821,20 @@ declare const FIELDS_SINCE: {
3769
3821
  readonly live: "1.9";
3770
3822
  readonly families: "1.10";
3771
3823
  };
3824
+ readonly AppsAccountsUsageResult: {
3825
+ readonly problem: "1.12";
3826
+ };
3827
+ readonly AppsAccountsResetsResult: {
3828
+ readonly problem: "1.12";
3829
+ };
3830
+ readonly ChatRow: {
3831
+ readonly app_project: "1.13";
3832
+ readonly tokens: "1.13";
3833
+ };
3834
+ readonly AccountUsage: {
3835
+ readonly plan: "1.13";
3836
+ readonly credits: "1.13";
3837
+ };
3772
3838
  };
3773
3839
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
3774
3840
  /**
@@ -3823,7 +3889,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
3823
3889
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
3824
3890
 
3825
3891
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
3826
- declare const CONTRACT_SHA256: "de809e319141925b0d86c5acbfe2493f3a85cad7c668c3e20b082e9319f5199b";
3892
+ declare const CONTRACT_SHA256: "753a2852af693308e321d475e3cab2487f6ab96b2c19bbc2fc5525ad3c26bb55";
3827
3893
 
3828
3894
  /**
3829
3895
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -3950,4 +4016,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
3950
4016
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
3951
4017
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
3952
4018
 
3953
- export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
4019
+ export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatAppProject, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models-Os6toG3X.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-Os6toG3X.js';
2
+ import { O as OpName } from './models-G1-Bsz-k.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-G1-Bsz-k.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. */
@@ -24,9 +24,9 @@ declare const PROTOCOL_MAJOR: 1;
24
24
  * 1.9 — chats placed in windows / held, several filed at once, projects renamed / archived / copied;
25
25
  * the list says when it is a saved copy being re-read (`updating`) and when it is not live.
26
26
  */
27
- declare const PROTOCOL_MINOR: 11;
27
+ declare const PROTOCOL_MINOR: 13;
28
28
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
29
- declare const PROTOCOL_VERSION: "1.11";
29
+ declare const PROTOCOL_VERSION: "1.13";
30
30
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
31
31
  declare const u32: z.ZodInt;
32
32
  declare const nonNegInt: z.ZodInt;
@@ -1384,8 +1384,19 @@ declare const ChatRow: z.ZodObject<{
1384
1384
  cache_warm: z.ZodBoolean;
1385
1385
  cache_minutes_left: z.ZodInt;
1386
1386
  }, z.core.$strict>>;
1387
+ app_project: z.ZodOptional<z.ZodObject<{
1388
+ id: z.ZodString;
1389
+ name: z.ZodString;
1390
+ }, z.core.$strict>>;
1391
+ tokens: z.ZodOptional<z.ZodInt>;
1387
1392
  }, z.core.$strict>;
1388
1393
  type ChatRow = z.output<typeof ChatRow>;
1394
+ /** 1.13: a project the app itself keeps (Codex's sidebar projects), never ours and never written. */
1395
+ declare const ChatAppProject: z.ZodObject<{
1396
+ id: z.ZodString;
1397
+ name: z.ZodString;
1398
+ }, z.core.$strict>;
1399
+ type ChatAppProject = z.output<typeof ChatAppProject>;
1389
1400
  /** 1.10: a chat's family: the conversation it was forked from, or the original it is a copy of. */
1390
1401
  declare const ChatFamily: z.ZodObject<{
1391
1402
  id: z.ZodString;
@@ -1451,6 +1462,11 @@ declare const AppsChatsListResult: z.ZodObject<{
1451
1462
  cache_warm: z.ZodBoolean;
1452
1463
  cache_minutes_left: z.ZodInt;
1453
1464
  }, z.core.$strict>>;
1465
+ app_project: z.ZodOptional<z.ZodObject<{
1466
+ id: z.ZodString;
1467
+ name: z.ZodString;
1468
+ }, z.core.$strict>>;
1469
+ tokens: z.ZodOptional<z.ZodInt>;
1454
1470
  }, z.core.$strict>>;
1455
1471
  new_window_ms: z.ZodInt;
1456
1472
  updating: z.ZodOptional<z.ZodBoolean>;
@@ -1527,6 +1543,11 @@ declare const AppsProjectsFileResult: z.ZodObject<{
1527
1543
  cache_warm: z.ZodBoolean;
1528
1544
  cache_minutes_left: z.ZodInt;
1529
1545
  }, z.core.$strict>>;
1546
+ app_project: z.ZodOptional<z.ZodObject<{
1547
+ id: z.ZodString;
1548
+ name: z.ZodString;
1549
+ }, z.core.$strict>>;
1550
+ tokens: z.ZodOptional<z.ZodInt>;
1530
1551
  }, z.core.$strict>;
1531
1552
  project: z.ZodObject<{
1532
1553
  id: z.ZodString;
@@ -1582,6 +1603,11 @@ declare const AppsProjectsUnfileResult: z.ZodObject<{
1582
1603
  cache_warm: z.ZodBoolean;
1583
1604
  cache_minutes_left: z.ZodInt;
1584
1605
  }, z.core.$strict>>;
1606
+ app_project: z.ZodOptional<z.ZodObject<{
1607
+ id: z.ZodString;
1608
+ name: z.ZodString;
1609
+ }, z.core.$strict>>;
1610
+ tokens: z.ZodOptional<z.ZodInt>;
1585
1611
  }, z.core.$strict>;
1586
1612
  }, z.core.$strict>;
1587
1613
  type AppsProjectsUnfileResult = z.output<typeof AppsProjectsUnfileResult>;
@@ -1631,6 +1657,11 @@ declare const AppsChatsStarResult: z.ZodObject<{
1631
1657
  cache_warm: z.ZodBoolean;
1632
1658
  cache_minutes_left: z.ZodInt;
1633
1659
  }, z.core.$strict>>;
1660
+ app_project: z.ZodOptional<z.ZodObject<{
1661
+ id: z.ZodString;
1662
+ name: z.ZodString;
1663
+ }, z.core.$strict>>;
1664
+ tokens: z.ZodOptional<z.ZodInt>;
1634
1665
  }, z.core.$strict>;
1635
1666
  }, z.core.$strict>;
1636
1667
  type AppsChatsStarResult = z.output<typeof AppsChatsStarResult>;
@@ -1695,6 +1726,11 @@ declare const AppsChatsPlaceResult: z.ZodObject<{
1695
1726
  cache_warm: z.ZodBoolean;
1696
1727
  cache_minutes_left: z.ZodInt;
1697
1728
  }, z.core.$strict>>;
1729
+ app_project: z.ZodOptional<z.ZodObject<{
1730
+ id: z.ZodString;
1731
+ name: z.ZodString;
1732
+ }, z.core.$strict>>;
1733
+ tokens: z.ZodOptional<z.ZodInt>;
1698
1734
  }, z.core.$strict>;
1699
1735
  message: z.ZodString;
1700
1736
  }, z.core.$strict>;
@@ -1747,6 +1783,11 @@ declare const AppsProjectsFileManyResult: z.ZodObject<{
1747
1783
  cache_warm: z.ZodBoolean;
1748
1784
  cache_minutes_left: z.ZodInt;
1749
1785
  }, z.core.$strict>>;
1786
+ app_project: z.ZodOptional<z.ZodObject<{
1787
+ id: z.ZodString;
1788
+ name: z.ZodString;
1789
+ }, z.core.$strict>>;
1790
+ tokens: z.ZodOptional<z.ZodInt>;
1750
1791
  }, z.core.$strict>>;
1751
1792
  project: z.ZodObject<{
1752
1793
  id: z.ZodString;
@@ -1829,6 +1870,8 @@ declare const AccountUsage: z.ZodObject<{
1829
1870
  live: z.ZodBoolean;
1830
1871
  weekly_resets_at_ms: z.ZodNullable<z.ZodInt>;
1831
1872
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
1873
+ plan: z.ZodOptional<z.ZodString>;
1874
+ credits: z.ZodOptional<z.ZodString>;
1832
1875
  }, z.core.$strict>;
1833
1876
  type AccountUsage = z.output<typeof AccountUsage>;
1834
1877
  /** One window's account's next weekly reset and where the time came from. */
@@ -1885,7 +1928,10 @@ declare const AppsAccountsUsageResult: z.ZodObject<{
1885
1928
  live: z.ZodBoolean;
1886
1929
  weekly_resets_at_ms: z.ZodNullable<z.ZodInt>;
1887
1930
  weekly_reset_official: z.ZodNullable<z.ZodBoolean>;
1931
+ plan: z.ZodOptional<z.ZodString>;
1932
+ credits: z.ZodOptional<z.ZodString>;
1888
1933
  }, z.core.$strict>>;
1934
+ problem: z.ZodOptional<z.ZodString>;
1889
1935
  }, z.core.$strict>;
1890
1936
  type AppsAccountsUsageResult = z.output<typeof AppsAccountsUsageResult>;
1891
1937
  declare const AppsAccountsResetsParams: z.ZodObject<{
@@ -1906,6 +1952,7 @@ declare const AppsAccountsResetsResult: z.ZodObject<{
1906
1952
  official: z.ZodBoolean;
1907
1953
  note: z.ZodNullable<z.ZodString>;
1908
1954
  }, z.core.$strict>>;
1955
+ problem: z.ZodOptional<z.ZodString>;
1909
1956
  }, z.core.$strict>;
1910
1957
  type AppsAccountsResetsResult = z.output<typeof AppsAccountsResetsResult>;
1911
1958
  /** A window action's answer: what happened, in one line. */
@@ -1987,6 +2034,11 @@ declare const AppsProjectsMoveResult: z.ZodObject<{
1987
2034
  cache_warm: z.ZodBoolean;
1988
2035
  cache_minutes_left: z.ZodInt;
1989
2036
  }, z.core.$strict>>;
2037
+ app_project: z.ZodOptional<z.ZodObject<{
2038
+ id: z.ZodString;
2039
+ name: z.ZodString;
2040
+ }, z.core.$strict>>;
2041
+ tokens: z.ZodOptional<z.ZodInt>;
1990
2042
  }, z.core.$strict>;
1991
2043
  project: z.ZodObject<{
1992
2044
  id: z.ZodString;
@@ -3769,6 +3821,20 @@ declare const FIELDS_SINCE: {
3769
3821
  readonly live: "1.9";
3770
3822
  readonly families: "1.10";
3771
3823
  };
3824
+ readonly AppsAccountsUsageResult: {
3825
+ readonly problem: "1.12";
3826
+ };
3827
+ readonly AppsAccountsResetsResult: {
3828
+ readonly problem: "1.12";
3829
+ };
3830
+ readonly ChatRow: {
3831
+ readonly app_project: "1.13";
3832
+ readonly tokens: "1.13";
3833
+ };
3834
+ readonly AccountUsage: {
3835
+ readonly plan: "1.13";
3836
+ readonly credits: "1.13";
3837
+ };
3772
3838
  };
3773
3839
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
3774
3840
  /**
@@ -3823,7 +3889,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
3823
3889
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
3824
3890
 
3825
3891
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
3826
- declare const CONTRACT_SHA256: "de809e319141925b0d86c5acbfe2493f3a85cad7c668c3e20b082e9319f5199b";
3892
+ declare const CONTRACT_SHA256: "753a2852af693308e321d475e3cab2487f6ab96b2c19bbc2fc5525ad3c26bb55";
3827
3893
 
3828
3894
  /**
3829
3895
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -3950,4 +4016,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
3950
4016
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
3951
4017
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
3952
4018
 
3953
- export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
4019
+ export { AbsPath, AccountReset, AccountUsage, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsCreateParams, AppsProjectsCreateResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsImportPinsParams, AppsProjectsImportPinsResult, AppsProjectsMoveParams, AppsProjectsMoveResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AppsSpendParams, AppsSpendResult, AppsSyncRunParams, AppsSyncStatusParams, AppsSyncStatusResult, AppsWindowActionResult, AppsWindowsAddParams, AppsWindowsListParams, AppsWindowsListResult, AppsWindowsOpenParams, AppsWindowsProcessesParams, AppsWindowsProcessesResult, AppsWindowsRefreshUsageParams, AppsWindowsReloadParams, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ChatAppProject, ChatFamily, ChatHidden, ChatId, ChatLastUse, ChatPin, ChatPlace, ChatProject, ChatProjectId, ChatRow, ChatRunning, ChatWindow, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ColdChat, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, SpendAccount, SpendChat, SpendHelper, SpendIdle, SpendIdleScope, SpendLive, SpendModel, SpendScopes, SpendSplit, SpendStart, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/schema/primitives.ts
2
2
  import { z } from "zod";
3
3
  var PROTOCOL_MAJOR = 1;
4
- var PROTOCOL_MINOR = 11;
4
+ var PROTOCOL_MINOR = 13;
5
5
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
6
6
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
7
7
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -936,6 +936,10 @@ var ChatLastUse = z12.strictObject({
936
936
  cache_warm: z12.boolean(),
937
937
  cache_minutes_left: nonNegInt
938
938
  });
939
+ var ChatAppProject = z12.strictObject({
940
+ id: z12.string().min(1).max(200),
941
+ name: z12.string().max(200)
942
+ });
939
943
  var ChatRow = z12.strictObject({
940
944
  id: ChatId,
941
945
  /** The short id people see (the listing's first 8 characters). */
@@ -962,7 +966,11 @@ var ChatRow = z12.strictObject({
962
966
  /** Created recently and in no project: offered for filing. */
963
967
  new_unfiled: z12.boolean(),
964
968
  warnings: z12.array(z12.string().max(400)).max(20),
965
- last_use: ChatLastUse.nullable()
969
+ last_use: ChatLastUse.nullable(),
970
+ /** 1.13: the app's own project the chat is grouped under in the app (Codex), read only; absent = none or not an app that groups. */
971
+ app_project: ChatAppProject.optional(),
972
+ /** 1.13: tokens the conversation has used, when the app records it (Codex); absent when not recorded; prices are not on disk. */
973
+ tokens: nonNegInt.optional()
966
974
  });
967
975
  var ChatFamily = z12.strictObject({
968
976
  id: ChatId,
@@ -1085,7 +1093,11 @@ var AccountUsage = z13.strictObject({
1085
1093
  /** The next weekly reset, when known. */
1086
1094
  weekly_resets_at_ms: epochMs.nullable(),
1087
1095
  /** That reset time is Claude's own (its reading, or a reset seen in its usage history). */
1088
- weekly_reset_official: z13.boolean().nullable()
1096
+ weekly_reset_official: z13.boolean().nullable(),
1097
+ /** 1.13: the account's plan as the app names it (Codex: "pro", "prolite"), when recorded. */
1098
+ plan: z13.string().max(80).optional(),
1099
+ /** 1.13: the account's credit balance as the app records it (Codex), when recorded. */
1100
+ credits: z13.string().max(40).optional()
1089
1101
  });
1090
1102
  var AccountReset = z13.strictObject({
1091
1103
  window: ChatPlace,
@@ -1101,9 +1113,19 @@ var AccountReset = z13.strictObject({
1101
1113
  var AppsWindowsListParams = z13.strictObject({ app_key: AppKey });
1102
1114
  var AppsWindowsListResult = z13.strictObject({ app_key: AppKey, windows: z13.array(AppWindowInfo).max(200) });
1103
1115
  var AppsAccountsUsageParams = z13.strictObject({ app_key: AppKey });
1104
- var AppsAccountsUsageResult = z13.strictObject({ app_key: AppKey, accounts: z13.array(AccountUsage).max(500) });
1116
+ var AppsAccountsUsageResult = z13.strictObject({
1117
+ app_key: AppKey,
1118
+ accounts: z13.array(AccountUsage).max(500),
1119
+ /** 1.12: the rows are right but something around them failed (a newly read reset time could not be saved); shown, never hidden. */
1120
+ problem: z13.string().max(400).optional()
1121
+ });
1105
1122
  var AppsAccountsResetsParams = z13.strictObject({ app_key: AppKey });
1106
- var AppsAccountsResetsResult = z13.strictObject({ app_key: AppKey, resets: z13.array(AccountReset).max(200) });
1123
+ var AppsAccountsResetsResult = z13.strictObject({
1124
+ app_key: AppKey,
1125
+ resets: z13.array(AccountReset).max(200),
1126
+ /** 1.12: as on `apps.accounts.usage`. */
1127
+ problem: z13.string().max(400).optional()
1128
+ });
1107
1129
  var AppsWindowActionResult = z13.strictObject({ message: z13.string().max(400) });
1108
1130
  var AppsWindowsOpenParams = z13.strictObject({ app_key: AppKey, window: ChatPlace });
1109
1131
  var AppsWindowsReloadParams = z13.strictObject({ app_key: AppKey, window: ChatPlace });
@@ -2186,6 +2208,7 @@ var NAMED_SCHEMAS = {
2186
2208
  ChatRunning,
2187
2209
  ChatHidden,
2188
2210
  ChatLastUse,
2211
+ ChatAppProject,
2189
2212
  ChatRow,
2190
2213
  AppsChatsListParams,
2191
2214
  AppsChatsListResult,
@@ -2260,7 +2283,11 @@ var FIELDS_SINCE = {
2260
2283
  "RelayCallResponse|0": { protocol_version: "1.1" },
2261
2284
  "RelayCallResponse|1": { protocol_version: "1.1" },
2262
2285
  WindowInfo: { app: "1.7", pid: "1.7" },
2263
- AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" }
2286
+ AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
2287
+ AppsAccountsUsageResult: { problem: "1.12" },
2288
+ AppsAccountsResetsResult: { problem: "1.12" },
2289
+ ChatRow: { app_project: "1.13", tokens: "1.13" },
2290
+ AccountUsage: { plan: "1.13", credits: "1.13" }
2264
2291
  };
2265
2292
  var NULL_SINCE = {
2266
2293
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -2315,8 +2342,37 @@ function strip(value, fields, version) {
2315
2342
  }
2316
2343
  var RESULT_PATH = /* @__PURE__ */ new Map([
2317
2344
  ["fs.patch", "FsPatchResult"],
2318
- ["apps.chats.list", "AppsChatsListResult"]
2345
+ ["apps.chats.list", "AppsChatsListResult"],
2346
+ ["apps.accounts.usage", "AppsAccountsUsageResult"],
2347
+ ["apps.accounts.resets", "AppsAccountsResetsResult"]
2319
2348
  ]);
2349
+ var NESTED_RESULTS = /* @__PURE__ */ new Map([
2350
+ ["apps.chats.list", [["chats", "ChatRow"]]],
2351
+ ["apps.projects.file", [["chat", "ChatRow"]]],
2352
+ ["apps.projects.file_many", [["chats", "ChatRow"]]],
2353
+ ["apps.projects.unfile", [["chat", "ChatRow"]]],
2354
+ ["apps.projects.move", [["chat", "ChatRow"]]],
2355
+ ["apps.chats.star", [["chat", "ChatRow"]]],
2356
+ ["apps.chats.place", [["chat", "ChatRow"]]],
2357
+ ["apps.accounts.usage", [["accounts", "AccountUsage"]]]
2358
+ ]);
2359
+ function stripNested(value, nested, version) {
2360
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
2361
+ let body = value;
2362
+ for (const [key, path] of nested) {
2363
+ const inner = body[key];
2364
+ if (inner === void 0 || inner === null) continue;
2365
+ const fields = FIELDS_SINCE[path];
2366
+ if (Array.isArray(inner)) {
2367
+ const next = inner.map((x) => strip(x, fields, version));
2368
+ if (next.some((x, i) => x !== inner[i])) body = { ...body, [key]: next };
2369
+ } else {
2370
+ const next = strip(inner, fields, version);
2371
+ if (next !== inner) body = { ...body, [key]: next };
2372
+ }
2373
+ }
2374
+ return body;
2375
+ }
2320
2376
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
2321
2377
  ["window.list", "windows"],
2322
2378
  ["window.focus", "window"],
@@ -2340,7 +2396,9 @@ function forPeer(op, part, value, version) {
2340
2396
  const windowKey = op ? WINDOW_RESULTS.get(op) : void 0;
2341
2397
  if (windowKey) return stripWindows(value, windowKey, version);
2342
2398
  const path = op ? RESULT_PATH.get(op) : void 0;
2343
- return path ? strip(value, FIELDS_SINCE[path], version) : value;
2399
+ const top = path ? strip(value, FIELDS_SINCE[path], version) : value;
2400
+ const nested = op ? NESTED_RESULTS.get(op) : void 0;
2401
+ return nested ? stripNested(top, nested, version) : top;
2344
2402
  }
2345
2403
  if (value === null || typeof value !== "object") return value;
2346
2404
  const body = value;
@@ -2354,10 +2412,10 @@ function forPeer(op, part, value, version) {
2354
2412
  }
2355
2413
  return data === body.data ? value : { ...body, data };
2356
2414
  }
2357
- var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys()];
2415
+ var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
2358
2416
 
2359
2417
  // src/contract.ts
2360
- var CONTRACT_SHA256 = "de809e319141925b0d86c5acbfe2493f3a85cad7c668c3e20b082e9319f5199b";
2418
+ var CONTRACT_SHA256 = "753a2852af693308e321d475e3cab2487f6ab96b2c19bbc2fc5525ad3c26bb55";
2361
2419
 
2362
2420
  // src/close-policy.ts
2363
2421
  var CLOSE_RULES = {
@@ -2781,6 +2839,7 @@ export {
2781
2839
  CLOSE_RULES,
2782
2840
  CONTRACT_SHA256,
2783
2841
  CancelMsg,
2842
+ ChatAppProject,
2784
2843
  ChatFamily,
2785
2844
  ChatHidden,
2786
2845
  ChatId,