@ai-matrx/desktop-protocol 0.13.0 → 0.14.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/CHANGELOG.md +10 -0
- package/dist/client.cjs +106 -38
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +106 -38
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +103 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -6
- package/dist/index.d.ts +117 -6
- package/dist/index.js +103 -8
- package/dist/index.js.map +1 -1
- package/dist/{models-CxAHZMAM.d.cts → models-DqFPqtNS.d.cts} +173 -1
- package/dist/{models-CxAHZMAM.d.ts → models-DqFPqtNS.d.ts} +173 -1
- package/dist/react.d.cts +86 -0
- package/dist/react.d.ts +86 -0
- package/generated/desktop-protocol.schema.json +360 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './models-
|
|
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-
|
|
2
|
+
import { O as OpName } from './models-DqFPqtNS.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-DqFPqtNS.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. */
|
|
@@ -13,10 +13,11 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
13
13
|
* device status since_ms is null for a device that never connected.
|
|
14
14
|
* 1.2 — the `models` capability (local transcription) and its error reasons (REASONS_SINCE);
|
|
15
15
|
* the `apps` capability (desktop apps, their profiles and usage).
|
|
16
|
+
* 1.3 — the `proc` capability (processes, listening ports, stopping one) and `clipboard`.
|
|
16
17
|
*/
|
|
17
|
-
declare const PROTOCOL_MINOR:
|
|
18
|
+
declare const PROTOCOL_MINOR: 3;
|
|
18
19
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
19
|
-
declare const PROTOCOL_VERSION: "1.
|
|
20
|
+
declare const PROTOCOL_VERSION: "1.3";
|
|
20
21
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
21
22
|
declare const u32: z.ZodInt;
|
|
22
23
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -1642,6 +1643,116 @@ declare const ToolResultsFile: z.ZodObject<{
|
|
|
1642
1643
|
}, z.core.$strict>;
|
|
1643
1644
|
type ToolResultsFile = z.output<typeof ToolResultsFile>;
|
|
1644
1645
|
|
|
1646
|
+
/**
|
|
1647
|
+
* @ai-matrx/desktop-protocol — cap proc (SPEC §6): the processes running on the person's computer,
|
|
1648
|
+
* the ports they listen on, and stopping one. Schema source: lint-enforced rules in
|
|
1649
|
+
* scripts/check-schema-source.mjs. Added in protocol 1.3.
|
|
1650
|
+
*/
|
|
1651
|
+
|
|
1652
|
+
declare const ProcSort: z.ZodEnum<{
|
|
1653
|
+
name: "name";
|
|
1654
|
+
cpu: "cpu";
|
|
1655
|
+
memory: "memory";
|
|
1656
|
+
pid: "pid";
|
|
1657
|
+
}>;
|
|
1658
|
+
declare const ProcListParams: z.ZodObject<{
|
|
1659
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
1661
|
+
name: "name";
|
|
1662
|
+
cpu: "cpu";
|
|
1663
|
+
memory: "memory";
|
|
1664
|
+
pid: "pid";
|
|
1665
|
+
}>>;
|
|
1666
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
1667
|
+
}, z.core.$strict>;
|
|
1668
|
+
type ProcListParams = z.output<typeof ProcListParams>;
|
|
1669
|
+
declare const ProcListResult: z.ZodObject<{
|
|
1670
|
+
processes: z.ZodArray<z.ZodObject<{
|
|
1671
|
+
pid: z.ZodInt;
|
|
1672
|
+
ppid: z.ZodNullable<z.ZodInt>;
|
|
1673
|
+
name: z.ZodString;
|
|
1674
|
+
command: z.ZodString;
|
|
1675
|
+
cpu_percent: z.ZodNullable<z.ZodNumber>;
|
|
1676
|
+
memory_bytes: z.ZodNullable<z.ZodInt>;
|
|
1677
|
+
user: z.ZodNullable<z.ZodString>;
|
|
1678
|
+
}, z.core.$strict>>;
|
|
1679
|
+
total: z.ZodInt;
|
|
1680
|
+
truncated: z.ZodBoolean;
|
|
1681
|
+
}, z.core.$strict>;
|
|
1682
|
+
type ProcListResult = z.output<typeof ProcListResult>;
|
|
1683
|
+
declare const ProcInfo: z.ZodObject<{
|
|
1684
|
+
pid: z.ZodInt;
|
|
1685
|
+
ppid: z.ZodNullable<z.ZodInt>;
|
|
1686
|
+
name: z.ZodString;
|
|
1687
|
+
command: z.ZodString;
|
|
1688
|
+
cpu_percent: z.ZodNullable<z.ZodNumber>;
|
|
1689
|
+
memory_bytes: z.ZodNullable<z.ZodInt>;
|
|
1690
|
+
user: z.ZodNullable<z.ZodString>;
|
|
1691
|
+
}, z.core.$strict>;
|
|
1692
|
+
type ProcInfo = z.output<typeof ProcInfo>;
|
|
1693
|
+
declare const ProcPortsParams: z.ZodObject<{
|
|
1694
|
+
port: z.ZodOptional<z.ZodInt>;
|
|
1695
|
+
}, z.core.$strict>;
|
|
1696
|
+
type ProcPortsParams = z.output<typeof ProcPortsParams>;
|
|
1697
|
+
declare const ProcPortsResult: z.ZodObject<{
|
|
1698
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
1699
|
+
port: z.ZodInt;
|
|
1700
|
+
protocol: z.ZodEnum<{
|
|
1701
|
+
tcp: "tcp";
|
|
1702
|
+
udp: "udp";
|
|
1703
|
+
}>;
|
|
1704
|
+
address: z.ZodString;
|
|
1705
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1706
|
+
process: z.ZodNullable<z.ZodString>;
|
|
1707
|
+
}, z.core.$strict>>;
|
|
1708
|
+
}, z.core.$strict>;
|
|
1709
|
+
type ProcPortsResult = z.output<typeof ProcPortsResult>;
|
|
1710
|
+
declare const ProcPort: z.ZodObject<{
|
|
1711
|
+
port: z.ZodInt;
|
|
1712
|
+
protocol: z.ZodEnum<{
|
|
1713
|
+
tcp: "tcp";
|
|
1714
|
+
udp: "udp";
|
|
1715
|
+
}>;
|
|
1716
|
+
address: z.ZodString;
|
|
1717
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1718
|
+
process: z.ZodNullable<z.ZodString>;
|
|
1719
|
+
}, z.core.$strict>;
|
|
1720
|
+
type ProcPort = z.output<typeof ProcPort>;
|
|
1721
|
+
declare const ProcKillParams: z.ZodObject<{
|
|
1722
|
+
pid: z.ZodInt;
|
|
1723
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
1724
|
+
}, z.core.$strict>;
|
|
1725
|
+
type ProcKillParams = z.output<typeof ProcKillParams>;
|
|
1726
|
+
declare const ProcKillResult: z.ZodObject<{
|
|
1727
|
+
pid: z.ZodInt;
|
|
1728
|
+
signal: z.ZodEnum<{
|
|
1729
|
+
SIGTERM: "SIGTERM";
|
|
1730
|
+
SIGKILL: "SIGKILL";
|
|
1731
|
+
}>;
|
|
1732
|
+
exited: z.ZodBoolean;
|
|
1733
|
+
}, z.core.$strict>;
|
|
1734
|
+
type ProcKillResult = z.output<typeof ProcKillResult>;
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* @ai-matrx/desktop-protocol — cap clipboard (SPEC §6): the system clipboard's text. Schema source:
|
|
1738
|
+
* lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.3.
|
|
1739
|
+
*/
|
|
1740
|
+
|
|
1741
|
+
declare const ClipboardReadParams: z.ZodObject<{}, z.core.$strict>;
|
|
1742
|
+
declare const ClipboardReadResult: z.ZodObject<{
|
|
1743
|
+
text: z.ZodString;
|
|
1744
|
+
truncated: z.ZodBoolean;
|
|
1745
|
+
}, z.core.$strict>;
|
|
1746
|
+
type ClipboardReadResult = z.output<typeof ClipboardReadResult>;
|
|
1747
|
+
declare const ClipboardWriteParams: z.ZodObject<{
|
|
1748
|
+
text: z.ZodString;
|
|
1749
|
+
}, z.core.$strict>;
|
|
1750
|
+
type ClipboardWriteParams = z.output<typeof ClipboardWriteParams>;
|
|
1751
|
+
declare const ClipboardWriteResult: z.ZodObject<{
|
|
1752
|
+
bytes: z.ZodInt;
|
|
1753
|
+
}, z.core.$strict>;
|
|
1754
|
+
type ClipboardWriteResult = z.output<typeof ClipboardWriteResult>;
|
|
1755
|
+
|
|
1645
1756
|
/**
|
|
1646
1757
|
* Version skew is the normal state: a phone, the server and a desktop app in the field run
|
|
1647
1758
|
* different package versions, and a minor protocol bump must never make any of them fail.
|
|
@@ -1728,7 +1839,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
1728
1839
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
1729
1840
|
|
|
1730
1841
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
1731
|
-
declare const CONTRACT_SHA256: "
|
|
1842
|
+
declare const CONTRACT_SHA256: "0354e634fd50ffdc4c83b7ede7f9c31f3b2c877c4574557a6b264d2998470fd6";
|
|
1732
1843
|
|
|
1733
1844
|
/**
|
|
1734
1845
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
@@ -1860,4 +1971,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
1860
1971
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
1861
1972
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
1862
1973
|
|
|
1863
|
-
export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, 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, FsWatchParams, FsWatchResult, FsWriteParams, FsWriteResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, 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, SERVICE_MAX_FRAME_BYTES, 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, 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, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
|
|
1974
|
+
export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, 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, FsWatchParams, FsWatchResult, FsWriteParams, FsWriteResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, 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, SERVICE_MAX_FRAME_BYTES, 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, 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, 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-
|
|
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-
|
|
2
|
+
import { O as OpName } from './models-DqFPqtNS.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-DqFPqtNS.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. */
|
|
@@ -13,10 +13,11 @@ declare const PROTOCOL_MAJOR: 1;
|
|
|
13
13
|
* device status since_ms is null for a device that never connected.
|
|
14
14
|
* 1.2 — the `models` capability (local transcription) and its error reasons (REASONS_SINCE);
|
|
15
15
|
* the `apps` capability (desktop apps, their profiles and usage).
|
|
16
|
+
* 1.3 — the `proc` capability (processes, listening ports, stopping one) and `clipboard`.
|
|
16
17
|
*/
|
|
17
|
-
declare const PROTOCOL_MINOR:
|
|
18
|
+
declare const PROTOCOL_MINOR: 3;
|
|
18
19
|
/** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
|
|
19
|
-
declare const PROTOCOL_VERSION: "1.
|
|
20
|
+
declare const PROTOCOL_VERSION: "1.3";
|
|
20
21
|
/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
|
|
21
22
|
declare const u32: z.ZodInt;
|
|
22
23
|
declare const nonNegInt: z.ZodInt;
|
|
@@ -1642,6 +1643,116 @@ declare const ToolResultsFile: z.ZodObject<{
|
|
|
1642
1643
|
}, z.core.$strict>;
|
|
1643
1644
|
type ToolResultsFile = z.output<typeof ToolResultsFile>;
|
|
1644
1645
|
|
|
1646
|
+
/**
|
|
1647
|
+
* @ai-matrx/desktop-protocol — cap proc (SPEC §6): the processes running on the person's computer,
|
|
1648
|
+
* the ports they listen on, and stopping one. Schema source: lint-enforced rules in
|
|
1649
|
+
* scripts/check-schema-source.mjs. Added in protocol 1.3.
|
|
1650
|
+
*/
|
|
1651
|
+
|
|
1652
|
+
declare const ProcSort: z.ZodEnum<{
|
|
1653
|
+
name: "name";
|
|
1654
|
+
cpu: "cpu";
|
|
1655
|
+
memory: "memory";
|
|
1656
|
+
pid: "pid";
|
|
1657
|
+
}>;
|
|
1658
|
+
declare const ProcListParams: z.ZodObject<{
|
|
1659
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
1661
|
+
name: "name";
|
|
1662
|
+
cpu: "cpu";
|
|
1663
|
+
memory: "memory";
|
|
1664
|
+
pid: "pid";
|
|
1665
|
+
}>>;
|
|
1666
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
1667
|
+
}, z.core.$strict>;
|
|
1668
|
+
type ProcListParams = z.output<typeof ProcListParams>;
|
|
1669
|
+
declare const ProcListResult: z.ZodObject<{
|
|
1670
|
+
processes: z.ZodArray<z.ZodObject<{
|
|
1671
|
+
pid: z.ZodInt;
|
|
1672
|
+
ppid: z.ZodNullable<z.ZodInt>;
|
|
1673
|
+
name: z.ZodString;
|
|
1674
|
+
command: z.ZodString;
|
|
1675
|
+
cpu_percent: z.ZodNullable<z.ZodNumber>;
|
|
1676
|
+
memory_bytes: z.ZodNullable<z.ZodInt>;
|
|
1677
|
+
user: z.ZodNullable<z.ZodString>;
|
|
1678
|
+
}, z.core.$strict>>;
|
|
1679
|
+
total: z.ZodInt;
|
|
1680
|
+
truncated: z.ZodBoolean;
|
|
1681
|
+
}, z.core.$strict>;
|
|
1682
|
+
type ProcListResult = z.output<typeof ProcListResult>;
|
|
1683
|
+
declare const ProcInfo: z.ZodObject<{
|
|
1684
|
+
pid: z.ZodInt;
|
|
1685
|
+
ppid: z.ZodNullable<z.ZodInt>;
|
|
1686
|
+
name: z.ZodString;
|
|
1687
|
+
command: z.ZodString;
|
|
1688
|
+
cpu_percent: z.ZodNullable<z.ZodNumber>;
|
|
1689
|
+
memory_bytes: z.ZodNullable<z.ZodInt>;
|
|
1690
|
+
user: z.ZodNullable<z.ZodString>;
|
|
1691
|
+
}, z.core.$strict>;
|
|
1692
|
+
type ProcInfo = z.output<typeof ProcInfo>;
|
|
1693
|
+
declare const ProcPortsParams: z.ZodObject<{
|
|
1694
|
+
port: z.ZodOptional<z.ZodInt>;
|
|
1695
|
+
}, z.core.$strict>;
|
|
1696
|
+
type ProcPortsParams = z.output<typeof ProcPortsParams>;
|
|
1697
|
+
declare const ProcPortsResult: z.ZodObject<{
|
|
1698
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
1699
|
+
port: z.ZodInt;
|
|
1700
|
+
protocol: z.ZodEnum<{
|
|
1701
|
+
tcp: "tcp";
|
|
1702
|
+
udp: "udp";
|
|
1703
|
+
}>;
|
|
1704
|
+
address: z.ZodString;
|
|
1705
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1706
|
+
process: z.ZodNullable<z.ZodString>;
|
|
1707
|
+
}, z.core.$strict>>;
|
|
1708
|
+
}, z.core.$strict>;
|
|
1709
|
+
type ProcPortsResult = z.output<typeof ProcPortsResult>;
|
|
1710
|
+
declare const ProcPort: z.ZodObject<{
|
|
1711
|
+
port: z.ZodInt;
|
|
1712
|
+
protocol: z.ZodEnum<{
|
|
1713
|
+
tcp: "tcp";
|
|
1714
|
+
udp: "udp";
|
|
1715
|
+
}>;
|
|
1716
|
+
address: z.ZodString;
|
|
1717
|
+
pid: z.ZodNullable<z.ZodInt>;
|
|
1718
|
+
process: z.ZodNullable<z.ZodString>;
|
|
1719
|
+
}, z.core.$strict>;
|
|
1720
|
+
type ProcPort = z.output<typeof ProcPort>;
|
|
1721
|
+
declare const ProcKillParams: z.ZodObject<{
|
|
1722
|
+
pid: z.ZodInt;
|
|
1723
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
1724
|
+
}, z.core.$strict>;
|
|
1725
|
+
type ProcKillParams = z.output<typeof ProcKillParams>;
|
|
1726
|
+
declare const ProcKillResult: z.ZodObject<{
|
|
1727
|
+
pid: z.ZodInt;
|
|
1728
|
+
signal: z.ZodEnum<{
|
|
1729
|
+
SIGTERM: "SIGTERM";
|
|
1730
|
+
SIGKILL: "SIGKILL";
|
|
1731
|
+
}>;
|
|
1732
|
+
exited: z.ZodBoolean;
|
|
1733
|
+
}, z.core.$strict>;
|
|
1734
|
+
type ProcKillResult = z.output<typeof ProcKillResult>;
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* @ai-matrx/desktop-protocol — cap clipboard (SPEC §6): the system clipboard's text. Schema source:
|
|
1738
|
+
* lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.3.
|
|
1739
|
+
*/
|
|
1740
|
+
|
|
1741
|
+
declare const ClipboardReadParams: z.ZodObject<{}, z.core.$strict>;
|
|
1742
|
+
declare const ClipboardReadResult: z.ZodObject<{
|
|
1743
|
+
text: z.ZodString;
|
|
1744
|
+
truncated: z.ZodBoolean;
|
|
1745
|
+
}, z.core.$strict>;
|
|
1746
|
+
type ClipboardReadResult = z.output<typeof ClipboardReadResult>;
|
|
1747
|
+
declare const ClipboardWriteParams: z.ZodObject<{
|
|
1748
|
+
text: z.ZodString;
|
|
1749
|
+
}, z.core.$strict>;
|
|
1750
|
+
type ClipboardWriteParams = z.output<typeof ClipboardWriteParams>;
|
|
1751
|
+
declare const ClipboardWriteResult: z.ZodObject<{
|
|
1752
|
+
bytes: z.ZodInt;
|
|
1753
|
+
}, z.core.$strict>;
|
|
1754
|
+
type ClipboardWriteResult = z.output<typeof ClipboardWriteResult>;
|
|
1755
|
+
|
|
1645
1756
|
/**
|
|
1646
1757
|
* Version skew is the normal state: a phone, the server and a desktop app in the field run
|
|
1647
1758
|
* different package versions, and a minor protocol bump must never make any of them fail.
|
|
@@ -1728,7 +1839,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
1728
1839
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
1729
1840
|
|
|
1730
1841
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
1731
|
-
declare const CONTRACT_SHA256: "
|
|
1842
|
+
declare const CONTRACT_SHA256: "0354e634fd50ffdc4c83b7ede7f9c31f3b2c877c4574557a6b264d2998470fd6";
|
|
1732
1843
|
|
|
1733
1844
|
/**
|
|
1734
1845
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
@@ -1860,4 +1971,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
1860
1971
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
1861
1972
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
1862
1973
|
|
|
1863
|
-
export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, 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, FsWatchParams, FsWatchResult, FsWriteParams, FsWriteResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, 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, SERVICE_MAX_FRAME_BYTES, 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, 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, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
|
|
1974
|
+
export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, 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, FsWatchParams, FsWatchResult, FsWriteParams, FsWriteResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, 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, SERVICE_MAX_FRAME_BYTES, 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, 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, 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 =
|
|
4
|
+
var PROTOCOL_MINOR = 3;
|
|
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_-]+$/);
|
|
@@ -949,6 +949,69 @@ var ToolResultsFile = z13.strictObject({
|
|
|
949
949
|
results: z13.array(ToolLevelResult).max(1e4)
|
|
950
950
|
});
|
|
951
951
|
|
|
952
|
+
// src/schema/proc.ts
|
|
953
|
+
import { z as z14 } from "zod";
|
|
954
|
+
var ProcSort = z14.enum(["cpu", "memory", "pid", "name"]);
|
|
955
|
+
var ProcListParams = z14.strictObject({
|
|
956
|
+
/** Case-insensitive substring of the process name or its command line. */
|
|
957
|
+
name: z14.string().min(1).max(128).optional(),
|
|
958
|
+
sort: ProcSort.default("cpu"),
|
|
959
|
+
limit: z14.int().min(1).max(500).default(50)
|
|
960
|
+
});
|
|
961
|
+
var ProcInfo = z14.strictObject({
|
|
962
|
+
pid: z14.int().min(0),
|
|
963
|
+
/** Parent process id; null where the OS does not report it. */
|
|
964
|
+
ppid: z14.int().min(0).nullable(),
|
|
965
|
+
name: z14.string().max(256),
|
|
966
|
+
/** The command line, cut to 1024 characters. */
|
|
967
|
+
command: z14.string().max(1024),
|
|
968
|
+
/** Share of one core, as `ps` and Task Manager report it; null where the OS does not say. */
|
|
969
|
+
cpu_percent: z14.number().min(0).nullable(),
|
|
970
|
+
memory_bytes: nonNegInt.nullable(),
|
|
971
|
+
user: z14.string().max(128).nullable()
|
|
972
|
+
});
|
|
973
|
+
var ProcListResult = z14.strictObject({
|
|
974
|
+
processes: z14.array(ProcInfo).max(500),
|
|
975
|
+
/** Processes that matched before `limit`. */
|
|
976
|
+
total: nonNegInt,
|
|
977
|
+
truncated: z14.boolean()
|
|
978
|
+
});
|
|
979
|
+
var ProcPortsParams = z14.strictObject({
|
|
980
|
+
/** Only this port. */
|
|
981
|
+
port: z14.int().min(1).max(65535).optional()
|
|
982
|
+
});
|
|
983
|
+
var ProcPort = z14.strictObject({
|
|
984
|
+
port: z14.int().min(1).max(65535),
|
|
985
|
+
protocol: z14.enum(["tcp", "udp"]),
|
|
986
|
+
/** The local address it listens on ("127.0.0.1", "*", "::"). */
|
|
987
|
+
address: z14.string().max(64),
|
|
988
|
+
pid: z14.int().min(0).nullable(),
|
|
989
|
+
process: z14.string().max(256).nullable()
|
|
990
|
+
});
|
|
991
|
+
var ProcPortsResult = z14.strictObject({ ports: z14.array(ProcPort).max(4e3) });
|
|
992
|
+
var ProcKillParams = z14.strictObject({
|
|
993
|
+
pid: z14.int().min(1),
|
|
994
|
+
/** Kill outright (SIGKILL; on Windows the same /F) instead of asking it to quit. */
|
|
995
|
+
force: z14.boolean().default(false)
|
|
996
|
+
});
|
|
997
|
+
var ProcKillResult = z14.strictObject({
|
|
998
|
+
pid: z14.int().min(1),
|
|
999
|
+
signal: z14.enum(["SIGTERM", "SIGKILL"]),
|
|
1000
|
+
/** True when the process was gone within 3 s. */
|
|
1001
|
+
exited: z14.boolean()
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
// src/schema/clipboard.ts
|
|
1005
|
+
import { z as z15 } from "zod";
|
|
1006
|
+
var ClipboardReadParams = z15.strictObject({});
|
|
1007
|
+
var ClipboardReadResult = z15.strictObject({
|
|
1008
|
+
/** The clipboard's text ("" when it holds none), cut to 1 MiB. */
|
|
1009
|
+
text: z15.string().max(1048576),
|
|
1010
|
+
truncated: z15.boolean()
|
|
1011
|
+
});
|
|
1012
|
+
var ClipboardWriteParams = z15.strictObject({ text: z15.string().max(1048576) });
|
|
1013
|
+
var ClipboardWriteResult = z15.strictObject({ bytes: nonNegInt });
|
|
1014
|
+
|
|
952
1015
|
// src/schema/registry.ts
|
|
953
1016
|
var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
|
|
954
1017
|
var OPS = {
|
|
@@ -985,7 +1048,12 @@ var OPS = {
|
|
|
985
1048
|
"apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },
|
|
986
1049
|
"apps.profiles.save": { params: AppsProfilesSaveParams, result: AppsProfilesSaveResult, kind: "unary", since: "1.2", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
987
1050
|
"apps.profiles.remove": { params: AppsProfilesRemoveParams, result: AppsProfilesRemoveResult, kind: "unary", since: "1.2", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
988
|
-
"apps.open": { params: AppsOpenParams, result: AppsOpenResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "AUTH_REQUIRED", "DEVICE_OFFLINE", "INTERNAL"] }
|
|
1051
|
+
"apps.open": { params: AppsOpenParams, result: AppsOpenResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "AUTH_REQUIRED", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
1052
|
+
"proc.list": { params: ProcListParams, result: ProcListResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1053
|
+
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1054
|
+
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|
|
1055
|
+
"clipboard.read": { params: ClipboardReadParams, result: ClipboardReadResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1056
|
+
"clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] }
|
|
989
1057
|
};
|
|
990
1058
|
var EVENTS = {
|
|
991
1059
|
"fs.changed": FsChangedEvent,
|
|
@@ -1137,6 +1205,19 @@ var NAMED_SCHEMAS = {
|
|
|
1137
1205
|
RelayHopEnvelopeHeader,
|
|
1138
1206
|
RelayHopConnectionEnd,
|
|
1139
1207
|
CloseCodeValue,
|
|
1208
|
+
ProcSort,
|
|
1209
|
+
ProcListParams,
|
|
1210
|
+
ProcInfo,
|
|
1211
|
+
ProcListResult,
|
|
1212
|
+
ProcPortsParams,
|
|
1213
|
+
ProcPort,
|
|
1214
|
+
ProcPortsResult,
|
|
1215
|
+
ProcKillParams,
|
|
1216
|
+
ProcKillResult,
|
|
1217
|
+
ClipboardReadParams,
|
|
1218
|
+
ClipboardReadResult,
|
|
1219
|
+
ClipboardWriteParams,
|
|
1220
|
+
ClipboardWriteResult,
|
|
1140
1221
|
ToolLevel,
|
|
1141
1222
|
ToolOutcome,
|
|
1142
1223
|
ToolPlatform,
|
|
@@ -1242,7 +1323,7 @@ function forPeer(op, part, value, version) {
|
|
|
1242
1323
|
var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys()];
|
|
1243
1324
|
|
|
1244
1325
|
// src/contract.ts
|
|
1245
|
-
var CONTRACT_SHA256 = "
|
|
1326
|
+
var CONTRACT_SHA256 = "0354e634fd50ffdc4c83b7ede7f9c31f3b2c877c4574557a6b264d2998470fd6";
|
|
1246
1327
|
|
|
1247
1328
|
// src/close-policy.ts
|
|
1248
1329
|
var CLOSE_RULES = {
|
|
@@ -1293,9 +1374,10 @@ var TOOL_CATALOG = [
|
|
|
1293
1374
|
{ name: "shell_python", group: "files_shell", state: "built", path: "sandbox_proxy", ops: ["exec.run"], platforms: ALL, summary: "Run a Python script" },
|
|
1294
1375
|
{ name: "shell_job", group: "files_shell", state: "planned", path: "device_op", ops: ["exec.job.start", "exec.job.output", "exec.job.stop"], platforms: ALL, summary: "Background commands: start, read output, stop" },
|
|
1295
1376
|
// ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────
|
|
1296
|
-
{ name: "desktop_process", group: "os_control", state: "
|
|
1377
|
+
{ name: "desktop_process", group: "os_control", state: "built", path: "device_op", ops: ["proc.list", "proc.ports", "proc.kill"], platforms: ALL, summary: "Running processes and ports; stop one" },
|
|
1378
|
+
{ name: "desktop_apps", group: "os_control", state: "planned", path: "device_op", ops: ["apps.list", "apps.open"], platforms: ALL, summary: "Installed apps; open or bring one forward" },
|
|
1297
1379
|
{ name: "desktop_system", group: "os_control", state: "planned", path: "device_op", ops: ["sysinfo.get", "system.open_url", "system.open_path", "system.notify"], platforms: ALL, summary: "System facts, open, notify" },
|
|
1298
|
-
{ name: "desktop_clipboard", group: "os_control", state: "
|
|
1380
|
+
{ name: "desktop_clipboard", group: "os_control", state: "built", path: "device_op", ops: ["clipboard.read", "clipboard.write"], platforms: ALL, summary: "Read and write the clipboard's text" },
|
|
1299
1381
|
{ name: "desktop_screen", group: "os_control", state: "planned", path: "device_op", ops: ["screen.list", "screen.capture"], platforms: ALL, summary: "Displays and screenshots" },
|
|
1300
1382
|
{ name: "desktop_window", group: "os_control", state: "planned", path: "device_op", ops: ["window.list", "window.focus", "window.move", "window.minimize"], platforms: ALL, summary: "Find, focus and arrange windows" },
|
|
1301
1383
|
{ name: "desktop_input", group: "os_control", state: "planned", path: "device_op", ops: ["input.type_text", "input.hotkey", "input.mouse_click", "input.mouse_move"], platforms: ALL, summary: "Keyboard and mouse" },
|
|
@@ -1353,12 +1435,12 @@ var LEGACY_ACTIONS = {
|
|
|
1353
1435
|
"local_window.minimize": tool("desktop_window"),
|
|
1354
1436
|
"local_process.list": tool("desktop_process"),
|
|
1355
1437
|
"local_process.ports": tool("desktop_process"),
|
|
1356
|
-
"local_process.launch_app": tool("
|
|
1438
|
+
"local_process.launch_app": tool("desktop_apps"),
|
|
1357
1439
|
"local_process.kill": tool("desktop_process"),
|
|
1358
|
-
"local_process.focus_app": tool("
|
|
1440
|
+
"local_process.focus_app": tool("desktop_apps"),
|
|
1359
1441
|
"local_process.terminals": dropped("Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's"),
|
|
1360
1442
|
"local_process.tail_terminal": dropped("Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's"),
|
|
1361
|
-
"local_process.installed_apps": tool("
|
|
1443
|
+
"local_process.installed_apps": tool("desktop_apps"),
|
|
1362
1444
|
"local_input.type_text": tool("desktop_input"),
|
|
1363
1445
|
"local_input.hotkey": tool("desktop_input"),
|
|
1364
1446
|
"local_input.mouse_click": tool("desktop_input"),
|
|
@@ -1607,6 +1689,10 @@ export {
|
|
|
1607
1689
|
CancelMsg,
|
|
1608
1690
|
ClientToCoreMsg,
|
|
1609
1691
|
ClientType,
|
|
1692
|
+
ClipboardReadParams,
|
|
1693
|
+
ClipboardReadResult,
|
|
1694
|
+
ClipboardWriteParams,
|
|
1695
|
+
ClipboardWriteResult,
|
|
1610
1696
|
CloseCode,
|
|
1611
1697
|
CloseCodeValue,
|
|
1612
1698
|
ContractHash,
|
|
@@ -1710,6 +1796,15 @@ export {
|
|
|
1710
1796
|
PROTOCOL_MAJOR,
|
|
1711
1797
|
PROTOCOL_MINOR,
|
|
1712
1798
|
PROTOCOL_VERSION,
|
|
1799
|
+
ProcInfo,
|
|
1800
|
+
ProcKillParams,
|
|
1801
|
+
ProcKillResult,
|
|
1802
|
+
ProcListParams,
|
|
1803
|
+
ProcListResult,
|
|
1804
|
+
ProcPort,
|
|
1805
|
+
ProcPortsParams,
|
|
1806
|
+
ProcPortsResult,
|
|
1807
|
+
ProcSort,
|
|
1713
1808
|
ProtocolErrorBody,
|
|
1714
1809
|
ProtocolVersion,
|
|
1715
1810
|
PtyInfo,
|