@ai-matrx/desktop-protocol 0.18.0 → 0.19.0

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-BOPMXUz-.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-BOPMXUz-.cjs';
2
+ import { O as OpName } from './models-DTtWH_yC.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-DTtWH_yC.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. */
@@ -29,10 +29,13 @@ declare const PROTOCOL_MAJOR: 1;
29
29
  * 1.17 — what is using the computer: resources.activity (jobs, heaviest processes, strain, the
30
30
  * last hour), resources.stop_job (a job's whole tree), resources.incidents (slowdown log);
31
31
  * a disk names its volume (ResourcesDisk `name`).
32
+ * 1.18 — a local server says what it is using (StackServer `cpu_percent`, `memory_bytes`).
33
+ * 1.19 — apps.projects.to_window: every chat of a project into one window (plan first), taking
34
+ * them off other side windows where safe, optionally grouped in that window's sidebar.
32
35
  */
33
- declare const PROTOCOL_MINOR: 17;
36
+ declare const PROTOCOL_MINOR: 19;
34
37
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
35
- declare const PROTOCOL_VERSION: "1.17";
38
+ declare const PROTOCOL_VERSION: "1.19";
36
39
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
37
40
  declare const u32: z.ZodInt;
38
41
  declare const nonNegInt: z.ZodInt;
@@ -2520,6 +2523,77 @@ declare const AppsWindowsSaveNamesParams: z.ZodObject<{
2520
2523
  app_key: z.ZodString;
2521
2524
  }, z.core.$strict>;
2522
2525
  type AppsWindowsSaveNamesParams = z.output<typeof AppsWindowsSaveNamesParams>;
2526
+ /** 1.19: one chat named in a whole-project move (its id and title as listed). */
2527
+ declare const ProjectMoveChat: z.ZodObject<{
2528
+ chat_id: z.ZodString;
2529
+ title: z.ZodString;
2530
+ }, z.core.$strict>;
2531
+ type ProjectMoveChat = z.output<typeof ProjectMoveChat>;
2532
+ /** 1.19: a chat the move leaves alone in one window (null: the chat itself), and why. */
2533
+ declare const ProjectMoveSkip: z.ZodObject<{
2534
+ chat_id: z.ZodString;
2535
+ title: z.ZodString;
2536
+ window: z.ZodNullable<z.ZodString>;
2537
+ reason: z.ZodString;
2538
+ }, z.core.$strict>;
2539
+ type ProjectMoveSkip = z.output<typeof ProjectMoveSkip>;
2540
+ /** 1.19: the sidebar group named after the project in the target window: done/planned, or why not. */
2541
+ declare const ProjectMoveGroup: z.ZodObject<{
2542
+ ok: z.ZodBoolean;
2543
+ name: z.ZodString;
2544
+ reason: z.ZodOptional<z.ZodString>;
2545
+ assign: z.ZodOptional<z.ZodInt>;
2546
+ already: z.ZodOptional<z.ZodInt>;
2547
+ from_other_groups: z.ZodOptional<z.ZodInt>;
2548
+ group_exists: z.ZodOptional<z.ZodBoolean>;
2549
+ }, z.core.$strict>;
2550
+ type ProjectMoveGroup = z.output<typeof ProjectMoveGroup>;
2551
+ /** 1.19: every chat of a project into one window (dry_run = the plan only, nothing written). */
2552
+ declare const AppsProjectsToWindowParams: z.ZodObject<{
2553
+ app_key: z.ZodString;
2554
+ project_id: z.ZodString;
2555
+ window: z.ZodString;
2556
+ take_off: z.ZodDefault<z.ZodBoolean>;
2557
+ group: z.ZodDefault<z.ZodBoolean>;
2558
+ dry_run: z.ZodDefault<z.ZodBoolean>;
2559
+ }, z.core.$strict>;
2560
+ type AppsProjectsToWindowParams = z.output<typeof AppsProjectsToWindowParams>;
2561
+ declare const AppsProjectsToWindowResult: z.ZodObject<{
2562
+ project_id: z.ZodString;
2563
+ window: z.ZodString;
2564
+ dry_run: z.ZodBoolean;
2565
+ place: z.ZodArray<z.ZodObject<{
2566
+ chat_id: z.ZodString;
2567
+ title: z.ZodString;
2568
+ }, z.core.$strict>>;
2569
+ already: z.ZodArray<z.ZodObject<{
2570
+ chat_id: z.ZodString;
2571
+ title: z.ZodString;
2572
+ }, z.core.$strict>>;
2573
+ take_off: z.ZodArray<z.ZodObject<{
2574
+ chat_id: z.ZodString;
2575
+ title: z.ZodString;
2576
+ window: z.ZodString;
2577
+ }, z.core.$strict>>;
2578
+ skipped: z.ZodArray<z.ZodObject<{
2579
+ chat_id: z.ZodString;
2580
+ title: z.ZodString;
2581
+ window: z.ZodNullable<z.ZodString>;
2582
+ reason: z.ZodString;
2583
+ }, z.core.$strict>>;
2584
+ other_apps: z.ZodInt;
2585
+ group: z.ZodNullable<z.ZodObject<{
2586
+ ok: z.ZodBoolean;
2587
+ name: z.ZodString;
2588
+ reason: z.ZodOptional<z.ZodString>;
2589
+ assign: z.ZodOptional<z.ZodInt>;
2590
+ already: z.ZodOptional<z.ZodInt>;
2591
+ from_other_groups: z.ZodOptional<z.ZodInt>;
2592
+ group_exists: z.ZodOptional<z.ZodBoolean>;
2593
+ }, z.core.$strict>>;
2594
+ message: z.ZodString;
2595
+ }, z.core.$strict>;
2596
+ type AppsProjectsToWindowResult = z.output<typeof AppsProjectsToWindowResult>;
2523
2597
 
2524
2598
  /**
2525
2599
  * @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised
@@ -3837,6 +3911,8 @@ declare const StackServer: z.ZodObject<{
3837
3911
  restarts: z.ZodInt;
3838
3912
  exit_code: z.ZodNullable<z.ZodInt>;
3839
3913
  pid: z.ZodNullable<z.ZodInt>;
3914
+ cpu_percent: z.ZodOptional<z.ZodNumber>;
3915
+ memory_bytes: z.ZodOptional<z.ZodInt>;
3840
3916
  }, z.core.$strict>;
3841
3917
  type StackServer = z.output<typeof StackServer>;
3842
3918
  /** One entry of the stack's history (the same file Local Admin keeps). */
@@ -3870,6 +3946,8 @@ declare const StackStateResult: z.ZodObject<{
3870
3946
  restarts: z.ZodInt;
3871
3947
  exit_code: z.ZodNullable<z.ZodInt>;
3872
3948
  pid: z.ZodNullable<z.ZodInt>;
3949
+ cpu_percent: z.ZodOptional<z.ZodNumber>;
3950
+ memory_bytes: z.ZodOptional<z.ZodInt>;
3873
3951
  }, z.core.$strict>>;
3874
3952
  setup_note: z.ZodNullable<z.ZodString>;
3875
3953
  pending: z.ZodNullable<z.ZodObject<{
@@ -4332,6 +4410,10 @@ declare const FIELDS_SINCE: {
4332
4410
  readonly ResourcesDisk: {
4333
4411
  readonly name: "1.17";
4334
4412
  };
4413
+ readonly StackServer: {
4414
+ readonly cpu_percent: "1.18";
4415
+ readonly memory_bytes: "1.18";
4416
+ };
4335
4417
  };
4336
4418
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
4337
4419
  /**
@@ -4386,7 +4468,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
4386
4468
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
4387
4469
 
4388
4470
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
4389
- declare const CONTRACT_SHA256: "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
4471
+ declare const CONTRACT_SHA256: "4fc16cc5bdaf7d666d5a0916ad3cd362df192d0238655ea288e7ffe15e54f246";
4390
4472
 
4391
4473
  /**
4392
4474
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -4513,4 +4595,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
4513
4595
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
4514
4596
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
4515
4597
 
4516
- 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, ResourcesActivityParams, ResourcesActivityResult, ResourcesDisk, ResourcesIncident, ResourcesIncidentsParams, ResourcesIncidentsResult, ResourcesJob, ResourcesJobKind, ResourcesPressure, ResourcesProcess, ResourcesSample, ResourcesSnapshotParams, ResourcesSnapshotResult, ResourcesStopJobParams, ResourcesStopJobResult, ResourcesStrain, ResourcesVerdict, 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, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, 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 };
4598
+ 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, AppsProjectsToWindowParams, AppsProjectsToWindowResult, 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, ProjectMoveChat, ProjectMoveGroup, ProjectMoveSkip, 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, ResourcesActivityParams, ResourcesActivityResult, ResourcesDisk, ResourcesIncident, ResourcesIncidentsParams, ResourcesIncidentsResult, ResourcesJob, ResourcesJobKind, ResourcesPressure, ResourcesProcess, ResourcesSample, ResourcesSnapshotParams, ResourcesSnapshotResult, ResourcesStopJobParams, ResourcesStopJobResult, ResourcesStrain, ResourcesVerdict, 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, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, 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-BOPMXUz-.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-BOPMXUz-.js';
2
+ import { O as OpName } from './models-DTtWH_yC.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-DTtWH_yC.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. */
@@ -29,10 +29,13 @@ declare const PROTOCOL_MAJOR: 1;
29
29
  * 1.17 — what is using the computer: resources.activity (jobs, heaviest processes, strain, the
30
30
  * last hour), resources.stop_job (a job's whole tree), resources.incidents (slowdown log);
31
31
  * a disk names its volume (ResourcesDisk `name`).
32
+ * 1.18 — a local server says what it is using (StackServer `cpu_percent`, `memory_bytes`).
33
+ * 1.19 — apps.projects.to_window: every chat of a project into one window (plan first), taking
34
+ * them off other side windows where safe, optionally grouped in that window's sidebar.
32
35
  */
33
- declare const PROTOCOL_MINOR: 17;
36
+ declare const PROTOCOL_MINOR: 19;
34
37
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
35
- declare const PROTOCOL_VERSION: "1.17";
38
+ declare const PROTOCOL_VERSION: "1.19";
36
39
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
37
40
  declare const u32: z.ZodInt;
38
41
  declare const nonNegInt: z.ZodInt;
@@ -2520,6 +2523,77 @@ declare const AppsWindowsSaveNamesParams: z.ZodObject<{
2520
2523
  app_key: z.ZodString;
2521
2524
  }, z.core.$strict>;
2522
2525
  type AppsWindowsSaveNamesParams = z.output<typeof AppsWindowsSaveNamesParams>;
2526
+ /** 1.19: one chat named in a whole-project move (its id and title as listed). */
2527
+ declare const ProjectMoveChat: z.ZodObject<{
2528
+ chat_id: z.ZodString;
2529
+ title: z.ZodString;
2530
+ }, z.core.$strict>;
2531
+ type ProjectMoveChat = z.output<typeof ProjectMoveChat>;
2532
+ /** 1.19: a chat the move leaves alone in one window (null: the chat itself), and why. */
2533
+ declare const ProjectMoveSkip: z.ZodObject<{
2534
+ chat_id: z.ZodString;
2535
+ title: z.ZodString;
2536
+ window: z.ZodNullable<z.ZodString>;
2537
+ reason: z.ZodString;
2538
+ }, z.core.$strict>;
2539
+ type ProjectMoveSkip = z.output<typeof ProjectMoveSkip>;
2540
+ /** 1.19: the sidebar group named after the project in the target window: done/planned, or why not. */
2541
+ declare const ProjectMoveGroup: z.ZodObject<{
2542
+ ok: z.ZodBoolean;
2543
+ name: z.ZodString;
2544
+ reason: z.ZodOptional<z.ZodString>;
2545
+ assign: z.ZodOptional<z.ZodInt>;
2546
+ already: z.ZodOptional<z.ZodInt>;
2547
+ from_other_groups: z.ZodOptional<z.ZodInt>;
2548
+ group_exists: z.ZodOptional<z.ZodBoolean>;
2549
+ }, z.core.$strict>;
2550
+ type ProjectMoveGroup = z.output<typeof ProjectMoveGroup>;
2551
+ /** 1.19: every chat of a project into one window (dry_run = the plan only, nothing written). */
2552
+ declare const AppsProjectsToWindowParams: z.ZodObject<{
2553
+ app_key: z.ZodString;
2554
+ project_id: z.ZodString;
2555
+ window: z.ZodString;
2556
+ take_off: z.ZodDefault<z.ZodBoolean>;
2557
+ group: z.ZodDefault<z.ZodBoolean>;
2558
+ dry_run: z.ZodDefault<z.ZodBoolean>;
2559
+ }, z.core.$strict>;
2560
+ type AppsProjectsToWindowParams = z.output<typeof AppsProjectsToWindowParams>;
2561
+ declare const AppsProjectsToWindowResult: z.ZodObject<{
2562
+ project_id: z.ZodString;
2563
+ window: z.ZodString;
2564
+ dry_run: z.ZodBoolean;
2565
+ place: z.ZodArray<z.ZodObject<{
2566
+ chat_id: z.ZodString;
2567
+ title: z.ZodString;
2568
+ }, z.core.$strict>>;
2569
+ already: z.ZodArray<z.ZodObject<{
2570
+ chat_id: z.ZodString;
2571
+ title: z.ZodString;
2572
+ }, z.core.$strict>>;
2573
+ take_off: z.ZodArray<z.ZodObject<{
2574
+ chat_id: z.ZodString;
2575
+ title: z.ZodString;
2576
+ window: z.ZodString;
2577
+ }, z.core.$strict>>;
2578
+ skipped: z.ZodArray<z.ZodObject<{
2579
+ chat_id: z.ZodString;
2580
+ title: z.ZodString;
2581
+ window: z.ZodNullable<z.ZodString>;
2582
+ reason: z.ZodString;
2583
+ }, z.core.$strict>>;
2584
+ other_apps: z.ZodInt;
2585
+ group: z.ZodNullable<z.ZodObject<{
2586
+ ok: z.ZodBoolean;
2587
+ name: z.ZodString;
2588
+ reason: z.ZodOptional<z.ZodString>;
2589
+ assign: z.ZodOptional<z.ZodInt>;
2590
+ already: z.ZodOptional<z.ZodInt>;
2591
+ from_other_groups: z.ZodOptional<z.ZodInt>;
2592
+ group_exists: z.ZodOptional<z.ZodBoolean>;
2593
+ }, z.core.$strict>>;
2594
+ message: z.ZodString;
2595
+ }, z.core.$strict>;
2596
+ type AppsProjectsToWindowResult = z.output<typeof AppsProjectsToWindowResult>;
2523
2597
 
2524
2598
  /**
2525
2599
  * @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised
@@ -3837,6 +3911,8 @@ declare const StackServer: z.ZodObject<{
3837
3911
  restarts: z.ZodInt;
3838
3912
  exit_code: z.ZodNullable<z.ZodInt>;
3839
3913
  pid: z.ZodNullable<z.ZodInt>;
3914
+ cpu_percent: z.ZodOptional<z.ZodNumber>;
3915
+ memory_bytes: z.ZodOptional<z.ZodInt>;
3840
3916
  }, z.core.$strict>;
3841
3917
  type StackServer = z.output<typeof StackServer>;
3842
3918
  /** One entry of the stack's history (the same file Local Admin keeps). */
@@ -3870,6 +3946,8 @@ declare const StackStateResult: z.ZodObject<{
3870
3946
  restarts: z.ZodInt;
3871
3947
  exit_code: z.ZodNullable<z.ZodInt>;
3872
3948
  pid: z.ZodNullable<z.ZodInt>;
3949
+ cpu_percent: z.ZodOptional<z.ZodNumber>;
3950
+ memory_bytes: z.ZodOptional<z.ZodInt>;
3873
3951
  }, z.core.$strict>>;
3874
3952
  setup_note: z.ZodNullable<z.ZodString>;
3875
3953
  pending: z.ZodNullable<z.ZodObject<{
@@ -4332,6 +4410,10 @@ declare const FIELDS_SINCE: {
4332
4410
  readonly ResourcesDisk: {
4333
4411
  readonly name: "1.17";
4334
4412
  };
4413
+ readonly StackServer: {
4414
+ readonly cpu_percent: "1.18";
4415
+ readonly memory_bytes: "1.18";
4416
+ };
4335
4417
  };
4336
4418
  type FieldsSincePath = keyof typeof FIELDS_SINCE;
4337
4419
  /**
@@ -4386,7 +4468,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
4386
4468
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
4387
4469
 
4388
4470
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
4389
- declare const CONTRACT_SHA256: "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
4471
+ declare const CONTRACT_SHA256: "4fc16cc5bdaf7d666d5a0916ad3cd362df192d0238655ea288e7ffe15e54f246";
4390
4472
 
4391
4473
  /**
4392
4474
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -4513,4 +4595,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
4513
4595
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
4514
4596
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
4515
4597
 
4516
- 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, ResourcesActivityParams, ResourcesActivityResult, ResourcesDisk, ResourcesIncident, ResourcesIncidentsParams, ResourcesIncidentsResult, ResourcesJob, ResourcesJobKind, ResourcesPressure, ResourcesProcess, ResourcesSample, ResourcesSnapshotParams, ResourcesSnapshotResult, ResourcesStopJobParams, ResourcesStopJobResult, ResourcesStrain, ResourcesVerdict, 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, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, 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 };
4598
+ 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, AppsProjectsToWindowParams, AppsProjectsToWindowResult, 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, ProjectMoveChat, ProjectMoveGroup, ProjectMoveSkip, 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, ResourcesActivityParams, ResourcesActivityResult, ResourcesDisk, ResourcesIncident, ResourcesIncidentsParams, ResourcesIncidentsResult, ResourcesJob, ResourcesJobKind, ResourcesPressure, ResourcesProcess, ResourcesSample, ResourcesSnapshotParams, ResourcesSnapshotResult, ResourcesStopJobParams, ResourcesStopJobResult, ResourcesStrain, ResourcesVerdict, 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, StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone, 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
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
4
4
  var PROTOCOL_MAJOR = 1;
5
- var PROTOCOL_MINOR = 17;
5
+ var PROTOCOL_MINOR = 19;
6
6
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
7
7
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
8
8
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1157,6 +1157,43 @@ var AppsProjectsCreateParams = z13.strictObject({ app_key: AppKey, name: z13.str
1157
1157
  var AppsProjectsCreateResult = z13.strictObject({ project: ChatProject });
1158
1158
  var AppsProjectsImportPinsParams = z13.strictObject({ app_key: AppKey });
1159
1159
  var AppsProjectsImportPinsResult = z13.strictObject({ message: z13.string().max(400) });
1160
+ var ProjectMoveChat = z13.strictObject({ chat_id: ChatId, title: z13.string().max(300) });
1161
+ var ProjectMoveSkip = z13.strictObject({ chat_id: ChatId, title: z13.string().max(300), window: ChatPlace.nullable(), reason: z13.string().max(400) });
1162
+ var ProjectMoveGroup = z13.strictObject({
1163
+ ok: z13.boolean(),
1164
+ name: z13.string().max(200),
1165
+ /** Why it is not (or was not) grouped — e.g. the window is open. */
1166
+ reason: z13.string().max(400).optional(),
1167
+ /** Chats that get (or got) the group; already in it; taken from another group of the window. */
1168
+ assign: nonNegInt.optional(),
1169
+ already: nonNegInt.optional(),
1170
+ from_other_groups: nonNegInt.optional(),
1171
+ /** A group of that name was already there (reused, never doubled). */
1172
+ group_exists: z13.boolean().optional()
1173
+ });
1174
+ var AppsProjectsToWindowParams = z13.strictObject({
1175
+ app_key: AppKey,
1176
+ project_id: ChatProjectId,
1177
+ window: ChatPlace,
1178
+ /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
1179
+ take_off: z13.boolean().default(false),
1180
+ /** Also group them under the project's name in that window's sidebar (closed windows only). */
1181
+ group: z13.boolean().default(false),
1182
+ dry_run: z13.boolean().default(false)
1183
+ });
1184
+ var AppsProjectsToWindowResult = z13.strictObject({
1185
+ project_id: ChatProjectId,
1186
+ window: ChatPlace,
1187
+ dry_run: z13.boolean(),
1188
+ place: z13.array(ProjectMoveChat).max(5e3),
1189
+ already: z13.array(ProjectMoveChat).max(5e3),
1190
+ take_off: z13.array(ProjectMoveChat.extend({ window: ChatPlace })).max(2e4),
1191
+ skipped: z13.array(ProjectMoveSkip).max(2e4),
1192
+ /** Chats of the project from other apps (no windows to place into), left as they are. */
1193
+ other_apps: nonNegInt,
1194
+ group: ProjectMoveGroup.nullable(),
1195
+ message: z13.string().max(400)
1196
+ });
1160
1197
  var ColdChat = z13.strictObject({
1161
1198
  id: ChatId,
1162
1199
  title: z13.string().max(1e3),
@@ -1797,7 +1834,11 @@ var StackServer = z24.strictObject({
1797
1834
  started_at_ms: epochMs.nullable(),
1798
1835
  restarts: nonNegInt,
1799
1836
  exit_code: z24.int().nullable(),
1800
- pid: z24.int().nullable()
1837
+ pid: z24.int().nullable(),
1838
+ /** (1.18) CPU of the server's process and everything under it, in percent of one core; absent when it is not running. */
1839
+ cpu_percent: z24.number().min(0).optional(),
1840
+ /** (1.18) Memory of the same processes: the physical footprint (Activity Monitor's Memory) summed; absent when it is not running. */
1841
+ memory_bytes: nonNegInt.optional()
1801
1842
  });
1802
1843
  var StackEvent = z24.strictObject({
1803
1844
  at_ms: epochMs,
@@ -2101,6 +2142,7 @@ var OPS = {
2101
2142
  "apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2102
2143
  "apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2103
2144
  "apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2145
+ "apps.projects.to_window": { params: AppsProjectsToWindowParams, result: AppsProjectsToWindowResult, kind: "unary", since: "1.19", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2104
2146
  // 1.11: Going cold, Spend, sync health, windows upkeep.
2105
2147
  "apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2106
2148
  "apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -2504,6 +2546,11 @@ var NAMED_SCHEMAS = {
2504
2546
  AppsProjectsCreateResult,
2505
2547
  AppsProjectsImportPinsParams,
2506
2548
  AppsProjectsImportPinsResult,
2549
+ ProjectMoveChat,
2550
+ ProjectMoveSkip,
2551
+ ProjectMoveGroup,
2552
+ AppsProjectsToWindowParams,
2553
+ AppsProjectsToWindowResult,
2507
2554
  ColdChat,
2508
2555
  AppsChatsColdParams,
2509
2556
  AppsChatsColdResult,
@@ -2541,7 +2588,8 @@ var FIELDS_SINCE = {
2541
2588
  AppsAccountsResetsResult: { problem: "1.12" },
2542
2589
  ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15" },
2543
2590
  AccountUsage: { plan: "1.13", credits: "1.13" },
2544
- ResourcesDisk: { name: "1.17" }
2591
+ ResourcesDisk: { name: "1.17" },
2592
+ StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" }
2545
2593
  };
2546
2594
  var NULL_SINCE = {
2547
2595
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -2609,7 +2657,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
2609
2657
  ["apps.chats.star", [["chat", "ChatRow"]]],
2610
2658
  ["apps.chats.place", [["chat", "ChatRow"]]],
2611
2659
  ["apps.accounts.usage", [["accounts", "AccountUsage"]]],
2612
- ["resources.snapshot", [["disks", "ResourcesDisk"]]]
2660
+ ["resources.snapshot", [["disks", "ResourcesDisk"]]],
2661
+ ["stack.state", [["servers", "StackServer"]]]
2613
2662
  ]);
2614
2663
  function stripNested(value, nested, version) {
2615
2664
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -2670,7 +2719,7 @@ function forPeer(op, part, value, version) {
2670
2719
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
2671
2720
 
2672
2721
  // src/contract.ts
2673
- var CONTRACT_SHA256 = "cdfad283c689005856b4161f28a37892d1c3356db077f685a4a659fc2c8fc657";
2722
+ var CONTRACT_SHA256 = "4fc16cc5bdaf7d666d5a0916ad3cd362df192d0238655ea288e7ffe15e54f246";
2674
2723
 
2675
2724
  // src/close-policy.ts
2676
2725
  var CLOSE_RULES = {
@@ -3062,6 +3111,8 @@ export {
3062
3111
  AppsProjectsImportPinsResult,
3063
3112
  AppsProjectsMoveParams,
3064
3113
  AppsProjectsMoveResult,
3114
+ AppsProjectsToWindowParams,
3115
+ AppsProjectsToWindowResult,
3065
3116
  AppsProjectsUnfileParams,
3066
3117
  AppsProjectsUnfileResult,
3067
3118
  AppsProjectsUpdateParams,
@@ -3267,6 +3318,9 @@ export {
3267
3318
  ProcPortsParams,
3268
3319
  ProcPortsResult,
3269
3320
  ProcSort,
3321
+ ProjectMoveChat,
3322
+ ProjectMoveGroup,
3323
+ ProjectMoveSkip,
3270
3324
  ProtocolErrorBody,
3271
3325
  ProtocolVersion,
3272
3326
  PtyInfo,