@ai-matrx/desktop-protocol 0.17.4 → 0.17.5

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-9j0ncAJj.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-9j0ncAJj.cjs';
2
+ import { O as OpName } from './models-Bb87iuvw.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-Bb87iuvw.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. */
@@ -21,10 +21,12 @@ declare const PROTOCOL_MAJOR: 1;
21
21
  * 1.6 — the `audio` capability: devices, record a clip to a WAV file, play a file.
22
22
  * 1.7 — a window names its owning application and process (WindowInfo `app`, `pid`).
23
23
  * 1.8 — `apps.chats.*` / `apps.projects.*`: a coding app's chats, windows, pins and projects, live.
24
+ * 1.9 — chats placed in windows / held, several filed at once, projects renamed / archived / copied;
25
+ * the list says when it is a saved copy being re-read (`updating`) and when it is not live.
24
26
  */
25
- declare const PROTOCOL_MINOR: 8;
27
+ declare const PROTOCOL_MINOR: 9;
26
28
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
27
- declare const PROTOCOL_VERSION: "1.8";
29
+ declare const PROTOCOL_VERSION: "1.9";
28
30
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
29
31
  declare const u32: z.ZodInt;
30
32
  declare const nonNegInt: z.ZodInt;
@@ -1444,6 +1446,8 @@ declare const AppsChatsListResult: z.ZodObject<{
1444
1446
  }, z.core.$strict>>;
1445
1447
  }, z.core.$strict>>;
1446
1448
  new_window_ms: z.ZodInt;
1449
+ updating: z.ZodOptional<z.ZodBoolean>;
1450
+ live: z.ZodOptional<z.ZodBoolean>;
1447
1451
  }, z.core.$strict>;
1448
1452
  type AppsChatsListResult = z.output<typeof AppsChatsListResult>;
1449
1453
  declare const AppsChatsWatchParams: z.ZodObject<{
@@ -1618,6 +1622,161 @@ declare const AppsChatsStarResult: z.ZodObject<{
1618
1622
  }, z.core.$strict>;
1619
1623
  }, z.core.$strict>;
1620
1624
  type AppsChatsStarResult = z.output<typeof AppsChatsStarResult>;
1625
+ /** 1.9: the index's own state, to every watcher: live (changes arrive) or not, and why. */
1626
+ declare const AppsChatsWatchStateEvent: z.ZodObject<{
1627
+ app_key: z.ZodString;
1628
+ live: z.ZodBoolean;
1629
+ updating: z.ZodBoolean;
1630
+ reason: z.ZodNullable<z.ZodString>;
1631
+ }, z.core.$strict>;
1632
+ type AppsChatsWatchStateEvent = z.output<typeof AppsChatsWatchStateEvent>;
1633
+ /** 1.9: put a chat in a window, take it off one (never its last place), or keep it in the holder. */
1634
+ declare const AppsChatsPlaceParams: z.ZodObject<{
1635
+ app_key: z.ZodString;
1636
+ chat_id: z.ZodString;
1637
+ action: z.ZodEnum<{
1638
+ place: "place";
1639
+ take_off: "take_off";
1640
+ hold: "hold";
1641
+ }>;
1642
+ window: z.ZodOptional<z.ZodString>;
1643
+ stop_if_open: z.ZodDefault<z.ZodBoolean>;
1644
+ }, z.core.$strict>;
1645
+ type AppsChatsPlaceParams = z.output<typeof AppsChatsPlaceParams>;
1646
+ declare const AppsChatsPlaceResult: z.ZodObject<{
1647
+ chat: z.ZodObject<{
1648
+ id: z.ZodString;
1649
+ short_id: z.ZodString;
1650
+ record: z.ZodNullable<z.ZodString>;
1651
+ title: z.ZodString;
1652
+ last_active_ms: z.ZodNullable<z.ZodInt>;
1653
+ created_ms: z.ZodNullable<z.ZodInt>;
1654
+ projects: z.ZodArray<z.ZodString>;
1655
+ starred: z.ZodBoolean;
1656
+ pinned_in: z.ZodArray<z.ZodObject<{
1657
+ window: z.ZodString;
1658
+ observed_at_ms: z.ZodNullable<z.ZodInt>;
1659
+ }, z.core.$strict>>;
1660
+ places: z.ZodArray<z.ZodString>;
1661
+ held: z.ZodBoolean;
1662
+ running: z.ZodArray<z.ZodObject<{
1663
+ window: z.ZodString;
1664
+ how: z.ZodEnum<{
1665
+ process: "process";
1666
+ activity: "activity";
1667
+ }>;
1668
+ }, z.core.$strict>>;
1669
+ hidden_in: z.ZodArray<z.ZodObject<{
1670
+ window: z.ZodString;
1671
+ reason: z.ZodString;
1672
+ }, z.core.$strict>>;
1673
+ hidden_from_main: z.ZodBoolean;
1674
+ main_pending: z.ZodBoolean;
1675
+ scheduled: z.ZodNullable<z.ZodString>;
1676
+ new_unfiled: z.ZodBoolean;
1677
+ warnings: z.ZodArray<z.ZodString>;
1678
+ last_use: z.ZodNullable<z.ZodObject<{
1679
+ at_ms: z.ZodInt;
1680
+ window: z.ZodNullable<z.ZodString>;
1681
+ account: z.ZodNullable<z.ZodString>;
1682
+ how: z.ZodNullable<z.ZodString>;
1683
+ cache_warm: z.ZodBoolean;
1684
+ cache_minutes_left: z.ZodInt;
1685
+ }, z.core.$strict>>;
1686
+ }, z.core.$strict>;
1687
+ message: z.ZodString;
1688
+ }, z.core.$strict>;
1689
+ type AppsChatsPlaceResult = z.output<typeof AppsChatsPlaceResult>;
1690
+ /** 1.9: several chats into one project (or a new one by name). */
1691
+ declare const AppsProjectsFileManyParams: z.ZodObject<{
1692
+ app_key: z.ZodString;
1693
+ chat_ids: z.ZodArray<z.ZodString>;
1694
+ project_id: z.ZodOptional<z.ZodString>;
1695
+ new_project_name: z.ZodOptional<z.ZodString>;
1696
+ }, z.core.$strict>;
1697
+ type AppsProjectsFileManyParams = z.output<typeof AppsProjectsFileManyParams>;
1698
+ declare const AppsProjectsFileManyResult: z.ZodObject<{
1699
+ chats: z.ZodArray<z.ZodObject<{
1700
+ id: z.ZodString;
1701
+ short_id: z.ZodString;
1702
+ record: z.ZodNullable<z.ZodString>;
1703
+ title: z.ZodString;
1704
+ last_active_ms: z.ZodNullable<z.ZodInt>;
1705
+ created_ms: z.ZodNullable<z.ZodInt>;
1706
+ projects: z.ZodArray<z.ZodString>;
1707
+ starred: z.ZodBoolean;
1708
+ pinned_in: z.ZodArray<z.ZodObject<{
1709
+ window: z.ZodString;
1710
+ observed_at_ms: z.ZodNullable<z.ZodInt>;
1711
+ }, z.core.$strict>>;
1712
+ places: z.ZodArray<z.ZodString>;
1713
+ held: z.ZodBoolean;
1714
+ running: z.ZodArray<z.ZodObject<{
1715
+ window: z.ZodString;
1716
+ how: z.ZodEnum<{
1717
+ process: "process";
1718
+ activity: "activity";
1719
+ }>;
1720
+ }, z.core.$strict>>;
1721
+ hidden_in: z.ZodArray<z.ZodObject<{
1722
+ window: z.ZodString;
1723
+ reason: z.ZodString;
1724
+ }, z.core.$strict>>;
1725
+ hidden_from_main: z.ZodBoolean;
1726
+ main_pending: z.ZodBoolean;
1727
+ scheduled: z.ZodNullable<z.ZodString>;
1728
+ new_unfiled: z.ZodBoolean;
1729
+ warnings: z.ZodArray<z.ZodString>;
1730
+ last_use: z.ZodNullable<z.ZodObject<{
1731
+ at_ms: z.ZodInt;
1732
+ window: z.ZodNullable<z.ZodString>;
1733
+ account: z.ZodNullable<z.ZodString>;
1734
+ how: z.ZodNullable<z.ZodString>;
1735
+ cache_warm: z.ZodBoolean;
1736
+ cache_minutes_left: z.ZodInt;
1737
+ }, z.core.$strict>>;
1738
+ }, z.core.$strict>>;
1739
+ project: z.ZodObject<{
1740
+ id: z.ZodString;
1741
+ name: z.ZodString;
1742
+ archived: z.ZodBoolean;
1743
+ count: z.ZodInt;
1744
+ }, z.core.$strict>;
1745
+ }, z.core.$strict>;
1746
+ type AppsProjectsFileManyResult = z.output<typeof AppsProjectsFileManyResult>;
1747
+ /** 1.9: rename, archive or restore a project. */
1748
+ declare const AppsProjectsUpdateParams: z.ZodObject<{
1749
+ app_key: z.ZodString;
1750
+ project_id: z.ZodString;
1751
+ name: z.ZodOptional<z.ZodString>;
1752
+ archived: z.ZodOptional<z.ZodBoolean>;
1753
+ }, z.core.$strict>;
1754
+ type AppsProjectsUpdateParams = z.output<typeof AppsProjectsUpdateParams>;
1755
+ declare const AppsProjectsUpdateResult: z.ZodObject<{
1756
+ project: z.ZodObject<{
1757
+ id: z.ZodString;
1758
+ name: z.ZodString;
1759
+ archived: z.ZodBoolean;
1760
+ count: z.ZodInt;
1761
+ }, z.core.$strict>;
1762
+ }, z.core.$strict>;
1763
+ type AppsProjectsUpdateResult = z.output<typeof AppsProjectsUpdateResult>;
1764
+ /** 1.9: save a copy of every chat in a project as another project (made if new). */
1765
+ declare const AppsProjectsCopyParams: z.ZodObject<{
1766
+ app_key: z.ZodString;
1767
+ project_id: z.ZodString;
1768
+ new_project_name: z.ZodString;
1769
+ }, z.core.$strict>;
1770
+ type AppsProjectsCopyParams = z.output<typeof AppsProjectsCopyParams>;
1771
+ declare const AppsProjectsCopyResult: z.ZodObject<{
1772
+ project: z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ name: z.ZodString;
1775
+ archived: z.ZodBoolean;
1776
+ count: z.ZodInt;
1777
+ }, z.core.$strict>;
1778
+ }, z.core.$strict>;
1779
+ type AppsProjectsCopyResult = z.output<typeof AppsProjectsCopyResult>;
1621
1780
 
1622
1781
  /**
1623
1782
  * @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised
@@ -3024,6 +3183,10 @@ declare const FIELDS_SINCE: {
3024
3183
  readonly app: "1.7";
3025
3184
  readonly pid: "1.7";
3026
3185
  };
3186
+ readonly AppsChatsListResult: {
3187
+ readonly updating: "1.9";
3188
+ readonly live: "1.9";
3189
+ };
3027
3190
  };
3028
3191
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
3029
3192
  /**
@@ -3078,7 +3241,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
3078
3241
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
3079
3242
 
3080
3243
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
3081
- declare const CONTRACT_SHA256: "7a5b3712fe3200b8f1051edb1cc9702e696a8d24b2033f9ea73e1a422f52dd33";
3244
+ declare const CONTRACT_SHA256: "8a36e6b958c871853f0a9520e49c92dd30aa05442765c5a1f04c4caa71a35229";
3082
3245
 
3083
3246
  /**
3084
3247
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -3205,4 +3368,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
3205
3368
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
3206
3369
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
3207
3370
 
3208
- export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsChatsChangedEvent, AppsChatsListParams, AppsChatsListResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, 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, 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, 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 };
3371
+ export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsChatsChangedEvent, AppsChatsListParams, AppsChatsListResult, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, 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, 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, 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-9j0ncAJj.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-9j0ncAJj.js';
2
+ import { O as OpName } from './models-Bb87iuvw.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-Bb87iuvw.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. */
@@ -21,10 +21,12 @@ declare const PROTOCOL_MAJOR: 1;
21
21
  * 1.6 — the `audio` capability: devices, record a clip to a WAV file, play a file.
22
22
  * 1.7 — a window names its owning application and process (WindowInfo `app`, `pid`).
23
23
  * 1.8 — `apps.chats.*` / `apps.projects.*`: a coding app's chats, windows, pins and projects, live.
24
+ * 1.9 — chats placed in windows / held, several filed at once, projects renamed / archived / copied;
25
+ * the list says when it is a saved copy being re-read (`updating`) and when it is not live.
24
26
  */
25
- declare const PROTOCOL_MINOR: 8;
27
+ declare const PROTOCOL_MINOR: 9;
26
28
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
27
- declare const PROTOCOL_VERSION: "1.8";
29
+ declare const PROTOCOL_VERSION: "1.9";
28
30
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
29
31
  declare const u32: z.ZodInt;
30
32
  declare const nonNegInt: z.ZodInt;
@@ -1444,6 +1446,8 @@ declare const AppsChatsListResult: z.ZodObject<{
1444
1446
  }, z.core.$strict>>;
1445
1447
  }, z.core.$strict>>;
1446
1448
  new_window_ms: z.ZodInt;
1449
+ updating: z.ZodOptional<z.ZodBoolean>;
1450
+ live: z.ZodOptional<z.ZodBoolean>;
1447
1451
  }, z.core.$strict>;
1448
1452
  type AppsChatsListResult = z.output<typeof AppsChatsListResult>;
1449
1453
  declare const AppsChatsWatchParams: z.ZodObject<{
@@ -1618,6 +1622,161 @@ declare const AppsChatsStarResult: z.ZodObject<{
1618
1622
  }, z.core.$strict>;
1619
1623
  }, z.core.$strict>;
1620
1624
  type AppsChatsStarResult = z.output<typeof AppsChatsStarResult>;
1625
+ /** 1.9: the index's own state, to every watcher: live (changes arrive) or not, and why. */
1626
+ declare const AppsChatsWatchStateEvent: z.ZodObject<{
1627
+ app_key: z.ZodString;
1628
+ live: z.ZodBoolean;
1629
+ updating: z.ZodBoolean;
1630
+ reason: z.ZodNullable<z.ZodString>;
1631
+ }, z.core.$strict>;
1632
+ type AppsChatsWatchStateEvent = z.output<typeof AppsChatsWatchStateEvent>;
1633
+ /** 1.9: put a chat in a window, take it off one (never its last place), or keep it in the holder. */
1634
+ declare const AppsChatsPlaceParams: z.ZodObject<{
1635
+ app_key: z.ZodString;
1636
+ chat_id: z.ZodString;
1637
+ action: z.ZodEnum<{
1638
+ place: "place";
1639
+ take_off: "take_off";
1640
+ hold: "hold";
1641
+ }>;
1642
+ window: z.ZodOptional<z.ZodString>;
1643
+ stop_if_open: z.ZodDefault<z.ZodBoolean>;
1644
+ }, z.core.$strict>;
1645
+ type AppsChatsPlaceParams = z.output<typeof AppsChatsPlaceParams>;
1646
+ declare const AppsChatsPlaceResult: z.ZodObject<{
1647
+ chat: z.ZodObject<{
1648
+ id: z.ZodString;
1649
+ short_id: z.ZodString;
1650
+ record: z.ZodNullable<z.ZodString>;
1651
+ title: z.ZodString;
1652
+ last_active_ms: z.ZodNullable<z.ZodInt>;
1653
+ created_ms: z.ZodNullable<z.ZodInt>;
1654
+ projects: z.ZodArray<z.ZodString>;
1655
+ starred: z.ZodBoolean;
1656
+ pinned_in: z.ZodArray<z.ZodObject<{
1657
+ window: z.ZodString;
1658
+ observed_at_ms: z.ZodNullable<z.ZodInt>;
1659
+ }, z.core.$strict>>;
1660
+ places: z.ZodArray<z.ZodString>;
1661
+ held: z.ZodBoolean;
1662
+ running: z.ZodArray<z.ZodObject<{
1663
+ window: z.ZodString;
1664
+ how: z.ZodEnum<{
1665
+ process: "process";
1666
+ activity: "activity";
1667
+ }>;
1668
+ }, z.core.$strict>>;
1669
+ hidden_in: z.ZodArray<z.ZodObject<{
1670
+ window: z.ZodString;
1671
+ reason: z.ZodString;
1672
+ }, z.core.$strict>>;
1673
+ hidden_from_main: z.ZodBoolean;
1674
+ main_pending: z.ZodBoolean;
1675
+ scheduled: z.ZodNullable<z.ZodString>;
1676
+ new_unfiled: z.ZodBoolean;
1677
+ warnings: z.ZodArray<z.ZodString>;
1678
+ last_use: z.ZodNullable<z.ZodObject<{
1679
+ at_ms: z.ZodInt;
1680
+ window: z.ZodNullable<z.ZodString>;
1681
+ account: z.ZodNullable<z.ZodString>;
1682
+ how: z.ZodNullable<z.ZodString>;
1683
+ cache_warm: z.ZodBoolean;
1684
+ cache_minutes_left: z.ZodInt;
1685
+ }, z.core.$strict>>;
1686
+ }, z.core.$strict>;
1687
+ message: z.ZodString;
1688
+ }, z.core.$strict>;
1689
+ type AppsChatsPlaceResult = z.output<typeof AppsChatsPlaceResult>;
1690
+ /** 1.9: several chats into one project (or a new one by name). */
1691
+ declare const AppsProjectsFileManyParams: z.ZodObject<{
1692
+ app_key: z.ZodString;
1693
+ chat_ids: z.ZodArray<z.ZodString>;
1694
+ project_id: z.ZodOptional<z.ZodString>;
1695
+ new_project_name: z.ZodOptional<z.ZodString>;
1696
+ }, z.core.$strict>;
1697
+ type AppsProjectsFileManyParams = z.output<typeof AppsProjectsFileManyParams>;
1698
+ declare const AppsProjectsFileManyResult: z.ZodObject<{
1699
+ chats: z.ZodArray<z.ZodObject<{
1700
+ id: z.ZodString;
1701
+ short_id: z.ZodString;
1702
+ record: z.ZodNullable<z.ZodString>;
1703
+ title: z.ZodString;
1704
+ last_active_ms: z.ZodNullable<z.ZodInt>;
1705
+ created_ms: z.ZodNullable<z.ZodInt>;
1706
+ projects: z.ZodArray<z.ZodString>;
1707
+ starred: z.ZodBoolean;
1708
+ pinned_in: z.ZodArray<z.ZodObject<{
1709
+ window: z.ZodString;
1710
+ observed_at_ms: z.ZodNullable<z.ZodInt>;
1711
+ }, z.core.$strict>>;
1712
+ places: z.ZodArray<z.ZodString>;
1713
+ held: z.ZodBoolean;
1714
+ running: z.ZodArray<z.ZodObject<{
1715
+ window: z.ZodString;
1716
+ how: z.ZodEnum<{
1717
+ process: "process";
1718
+ activity: "activity";
1719
+ }>;
1720
+ }, z.core.$strict>>;
1721
+ hidden_in: z.ZodArray<z.ZodObject<{
1722
+ window: z.ZodString;
1723
+ reason: z.ZodString;
1724
+ }, z.core.$strict>>;
1725
+ hidden_from_main: z.ZodBoolean;
1726
+ main_pending: z.ZodBoolean;
1727
+ scheduled: z.ZodNullable<z.ZodString>;
1728
+ new_unfiled: z.ZodBoolean;
1729
+ warnings: z.ZodArray<z.ZodString>;
1730
+ last_use: z.ZodNullable<z.ZodObject<{
1731
+ at_ms: z.ZodInt;
1732
+ window: z.ZodNullable<z.ZodString>;
1733
+ account: z.ZodNullable<z.ZodString>;
1734
+ how: z.ZodNullable<z.ZodString>;
1735
+ cache_warm: z.ZodBoolean;
1736
+ cache_minutes_left: z.ZodInt;
1737
+ }, z.core.$strict>>;
1738
+ }, z.core.$strict>>;
1739
+ project: z.ZodObject<{
1740
+ id: z.ZodString;
1741
+ name: z.ZodString;
1742
+ archived: z.ZodBoolean;
1743
+ count: z.ZodInt;
1744
+ }, z.core.$strict>;
1745
+ }, z.core.$strict>;
1746
+ type AppsProjectsFileManyResult = z.output<typeof AppsProjectsFileManyResult>;
1747
+ /** 1.9: rename, archive or restore a project. */
1748
+ declare const AppsProjectsUpdateParams: z.ZodObject<{
1749
+ app_key: z.ZodString;
1750
+ project_id: z.ZodString;
1751
+ name: z.ZodOptional<z.ZodString>;
1752
+ archived: z.ZodOptional<z.ZodBoolean>;
1753
+ }, z.core.$strict>;
1754
+ type AppsProjectsUpdateParams = z.output<typeof AppsProjectsUpdateParams>;
1755
+ declare const AppsProjectsUpdateResult: z.ZodObject<{
1756
+ project: z.ZodObject<{
1757
+ id: z.ZodString;
1758
+ name: z.ZodString;
1759
+ archived: z.ZodBoolean;
1760
+ count: z.ZodInt;
1761
+ }, z.core.$strict>;
1762
+ }, z.core.$strict>;
1763
+ type AppsProjectsUpdateResult = z.output<typeof AppsProjectsUpdateResult>;
1764
+ /** 1.9: save a copy of every chat in a project as another project (made if new). */
1765
+ declare const AppsProjectsCopyParams: z.ZodObject<{
1766
+ app_key: z.ZodString;
1767
+ project_id: z.ZodString;
1768
+ new_project_name: z.ZodString;
1769
+ }, z.core.$strict>;
1770
+ type AppsProjectsCopyParams = z.output<typeof AppsProjectsCopyParams>;
1771
+ declare const AppsProjectsCopyResult: z.ZodObject<{
1772
+ project: z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ name: z.ZodString;
1775
+ archived: z.ZodBoolean;
1776
+ count: z.ZodInt;
1777
+ }, z.core.$strict>;
1778
+ }, z.core.$strict>;
1779
+ type AppsProjectsCopyResult = z.output<typeof AppsProjectsCopyResult>;
1621
1780
 
1622
1781
  /**
1623
1782
  * @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised
@@ -3024,6 +3183,10 @@ declare const FIELDS_SINCE: {
3024
3183
  readonly app: "1.7";
3025
3184
  readonly pid: "1.7";
3026
3185
  };
3186
+ readonly AppsChatsListResult: {
3187
+ readonly updating: "1.9";
3188
+ readonly live: "1.9";
3189
+ };
3027
3190
  };
3028
3191
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
3029
3192
  /**
@@ -3078,7 +3241,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
3078
3241
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
3079
3242
 
3080
3243
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
3081
- declare const CONTRACT_SHA256: "7a5b3712fe3200b8f1051edb1cc9702e696a8d24b2033f9ea73e1a422f52dd33";
3244
+ declare const CONTRACT_SHA256: "8a36e6b958c871853f0a9520e49c92dd30aa05442765c5a1f04c4caa71a35229";
3082
3245
 
3083
3246
  /**
3084
3247
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -3205,4 +3368,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
3205
3368
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
3206
3369
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
3207
3370
 
3208
- export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsChatsChangedEvent, AppsChatsListParams, AppsChatsListResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, 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, 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, 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 };
3371
+ export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsChatsChangedEvent, AppsChatsListParams, AppsChatsListResult, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsWatchParams, AppsChatsWatchResult, AppsChatsWatchStateEvent, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AppsProjectsCopyParams, AppsProjectsCopyResult, AppsProjectsFileManyParams, AppsProjectsFileManyResult, AppsProjectsFileParams, AppsProjectsFileResult, AppsProjectsUnfileParams, AppsProjectsUnfileResult, AppsProjectsUpdateParams, AppsProjectsUpdateResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, 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, 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, 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 = 8;
4
+ var PROTOCOL_MINOR = 9;
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_-]+$/);
@@ -977,7 +977,11 @@ var AppsChatsListResult = z12.strictObject({
977
977
  projects: z12.array(ChatProject).max(5e3),
978
978
  chats: z12.array(ChatRow).max(2e4),
979
979
  /** How long a chat in no project counts as new. */
980
- new_window_ms: nonNegInt
980
+ new_window_ms: nonNegInt,
981
+ /** 1.9: this is the copy saved at the last read, shown while everything is read again. */
982
+ updating: z12.boolean().optional(),
983
+ /** 1.9: false while the folder watches are down (changes are not arriving); `apps.chats.watch_state` says when it changes. */
984
+ live: z12.boolean().optional()
981
985
  });
982
986
  var AppsChatsWatchParams = z12.strictObject({ app_key: AppKey });
983
987
  var AppsChatsWatchResult = z12.strictObject({ resource_id: ResourceId, version: nonNegInt });
@@ -987,6 +991,38 @@ var AppsChatsChangedEvent = z12.strictObject({
987
991
  ids: z12.array(ChatId).max(1e3),
988
992
  all: z12.boolean()
989
993
  });
994
+ var AppsChatsWatchStateEvent = z12.strictObject({
995
+ app_key: AppKey,
996
+ live: z12.boolean(),
997
+ updating: z12.boolean(),
998
+ reason: z12.string().max(300).nullable()
999
+ });
1000
+ var AppsChatsPlaceParams = z12.strictObject({
1001
+ app_key: AppKey,
1002
+ chat_id: ChatId,
1003
+ action: z12.enum(["place", "take_off", "hold"]),
1004
+ /** The window (for place and take_off). */
1005
+ window: ChatPlace.optional(),
1006
+ /** take_off where it is open: stop it there first (the person confirmed). */
1007
+ stop_if_open: z12.boolean().default(false)
1008
+ });
1009
+ var AppsChatsPlaceResult = z12.strictObject({ chat: ChatRow, message: z12.string().max(400) });
1010
+ var AppsProjectsFileManyParams = z12.strictObject({
1011
+ app_key: AppKey,
1012
+ chat_ids: z12.array(ChatId).min(1).max(500),
1013
+ project_id: ChatProjectId.optional(),
1014
+ new_project_name: z12.string().min(1).max(200).optional()
1015
+ });
1016
+ var AppsProjectsFileManyResult = z12.strictObject({ chats: z12.array(ChatRow).max(500), project: ChatProject });
1017
+ var AppsProjectsUpdateParams = z12.strictObject({
1018
+ app_key: AppKey,
1019
+ project_id: ChatProjectId,
1020
+ name: z12.string().min(1).max(200).optional(),
1021
+ archived: z12.boolean().optional()
1022
+ });
1023
+ var AppsProjectsUpdateResult = z12.strictObject({ project: ChatProject });
1024
+ var AppsProjectsCopyParams = z12.strictObject({ app_key: AppKey, project_id: ChatProjectId, new_project_name: z12.string().min(1).max(200) });
1025
+ var AppsProjectsCopyResult = z12.strictObject({ project: ChatProject });
990
1026
  var AppsProjectsFileParams = z12.strictObject({
991
1027
  app_key: AppKey,
992
1028
  chat_id: ChatId,
@@ -1626,6 +1662,10 @@ var OPS = {
1626
1662
  "apps.chats.watch": { params: AppsChatsWatchParams, result: AppsChatsWatchResult, kind: "resource", since: "1.8", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
1627
1663
  "apps.chats.star": { params: AppsChatsStarParams, result: AppsChatsStarResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1628
1664
  "apps.projects.file": { params: AppsProjectsFileParams, result: AppsProjectsFileResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1665
+ "apps.chats.place": { params: AppsChatsPlaceParams, result: AppsChatsPlaceResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1666
+ "apps.projects.file_many": { params: AppsProjectsFileManyParams, result: AppsProjectsFileManyResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1667
+ "apps.projects.update": { params: AppsProjectsUpdateParams, result: AppsProjectsUpdateResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1668
+ "apps.projects.copy": { params: AppsProjectsCopyParams, result: AppsProjectsCopyResult, kind: "unary", since: "1.9", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1629
1669
  "apps.projects.unfile": { params: AppsProjectsUnfileParams, result: AppsProjectsUnfileResult, kind: "unary", since: "1.8", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1630
1670
  "proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1631
1671
  "proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -1664,6 +1704,7 @@ var OPS = {
1664
1704
  var EVENTS = {
1665
1705
  "fs.changed": FsChangedEvent,
1666
1706
  "apps.chats.changed": AppsChatsChangedEvent,
1707
+ "apps.chats.watch_state": AppsChatsWatchStateEvent,
1667
1708
  "exec.exited": ExecExitedEvent,
1668
1709
  "exec.title": ExecTitleEvent,
1669
1710
  "exec.cwd": ExecCwdEvent,
@@ -1949,7 +1990,16 @@ var NAMED_SCHEMAS = {
1949
1990
  AppsProjectsFileParams,
1950
1991
  AppsProjectsFileResult,
1951
1992
  AppsProjectsUnfileParams,
1952
- AppsProjectsUnfileResult
1993
+ AppsProjectsUnfileResult,
1994
+ AppsChatsWatchStateEvent,
1995
+ AppsChatsPlaceParams,
1996
+ AppsChatsPlaceResult,
1997
+ AppsProjectsFileManyParams,
1998
+ AppsProjectsFileManyResult,
1999
+ AppsProjectsUpdateParams,
2000
+ AppsProjectsUpdateResult,
2001
+ AppsProjectsCopyParams,
2002
+ AppsProjectsCopyResult
1953
2003
  };
1954
2004
 
1955
2005
  // src/versioning.ts
@@ -1958,7 +2008,8 @@ var FIELDS_SINCE = {
1958
2008
  "ProtocolErrorBody.data": { edits_failed: "1.1" },
1959
2009
  "RelayCallResponse|0": { protocol_version: "1.1" },
1960
2010
  "RelayCallResponse|1": { protocol_version: "1.1" },
1961
- WindowInfo: { app: "1.7", pid: "1.7" }
2011
+ WindowInfo: { app: "1.7", pid: "1.7" },
2012
+ AppsChatsListResult: { updating: "1.9", live: "1.9" }
1962
2013
  };
1963
2014
  var NULL_SINCE = {
1964
2015
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -2011,7 +2062,10 @@ function strip(value, fields, version) {
2011
2062
  }
2012
2063
  return out ?? value;
2013
2064
  }
2014
- var RESULT_PATH = /* @__PURE__ */ new Map([["fs.patch", "FsPatchResult"]]);
2065
+ var RESULT_PATH = /* @__PURE__ */ new Map([
2066
+ ["fs.patch", "FsPatchResult"],
2067
+ ["apps.chats.list", "AppsChatsListResult"]
2068
+ ]);
2015
2069
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
2016
2070
  ["window.list", "windows"],
2017
2071
  ["window.focus", "window"],
@@ -2052,7 +2106,7 @@ function forPeer(op, part, value, version) {
2052
2106
  var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys()];
2053
2107
 
2054
2108
  // src/contract.ts
2055
- var CONTRACT_SHA256 = "7a5b3712fe3200b8f1051edb1cc9702e696a8d24b2033f9ea73e1a422f52dd33";
2109
+ var CONTRACT_SHA256 = "8a36e6b958c871853f0a9520e49c92dd30aa05442765c5a1f04c4caa71a35229";
2056
2110
 
2057
2111
  // src/close-policy.ts
2058
2112
  var CLOSE_RULES = {
@@ -2405,10 +2459,13 @@ export {
2405
2459
  AppsChatsChangedEvent,
2406
2460
  AppsChatsListParams,
2407
2461
  AppsChatsListResult,
2462
+ AppsChatsPlaceParams,
2463
+ AppsChatsPlaceResult,
2408
2464
  AppsChatsStarParams,
2409
2465
  AppsChatsStarResult,
2410
2466
  AppsChatsWatchParams,
2411
2467
  AppsChatsWatchResult,
2468
+ AppsChatsWatchStateEvent,
2412
2469
  AppsListParams,
2413
2470
  AppsListResult,
2414
2471
  AppsOpenParams,
@@ -2419,10 +2476,16 @@ export {
2419
2476
  AppsProfilesRemoveResult,
2420
2477
  AppsProfilesSaveParams,
2421
2478
  AppsProfilesSaveResult,
2479
+ AppsProjectsCopyParams,
2480
+ AppsProjectsCopyResult,
2481
+ AppsProjectsFileManyParams,
2482
+ AppsProjectsFileManyResult,
2422
2483
  AppsProjectsFileParams,
2423
2484
  AppsProjectsFileResult,
2424
2485
  AppsProjectsUnfileParams,
2425
2486
  AppsProjectsUnfileResult,
2487
+ AppsProjectsUpdateParams,
2488
+ AppsProjectsUpdateResult,
2426
2489
  AudioDevice,
2427
2490
  AudioDevicesParams,
2428
2491
  AudioDevicesResult,