@ai-matrx/desktop-protocol 0.21.26 → 0.21.27
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 +6 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +36 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +95 -79
- package/dist/index.d.ts +95 -79
- package/dist/index.js +36 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -233,84 +233,6 @@ type SysinfoHardwareResult = z.output<typeof SysinfoHardwareResult>;
|
|
|
233
233
|
|
|
234
234
|
/** @ai-matrx/desktop-protocol — cap fs. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
235
235
|
|
|
236
|
-
/**
|
|
237
|
-
* Copy a file or a whole folder (Finder's Duplicate, Copy and Paste, ⌥-drag). Desktop only (1.30):
|
|
238
|
-
* the daemon has no copy. Timestamps and permission bits are kept, symlinks are copied as links.
|
|
239
|
-
* A name already at `to_path` is CONFLICT/already_exists unless `overwrite`; replacing a folder
|
|
240
|
-
* with a file (or the reverse) is CONFLICT/is_a_directory; copying a folder into itself is
|
|
241
|
-
* INVALID_PARAMS/into_itself.
|
|
242
|
-
*/
|
|
243
|
-
declare const FsCopyParams: z.ZodObject<{
|
|
244
|
-
from_path: z.ZodString;
|
|
245
|
-
to_path: z.ZodString;
|
|
246
|
-
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
247
|
-
}, z.core.$strict>;
|
|
248
|
-
declare const FsCopyResult: z.ZodObject<{
|
|
249
|
-
from_path: z.ZodString;
|
|
250
|
-
to_path: z.ZodString;
|
|
251
|
-
}, z.core.$strict>;
|
|
252
|
-
/**
|
|
253
|
-
* Search the computer's own index by name (Finder's "This Mac", 1.30): Spotlight on macOS; elsewhere,
|
|
254
|
-
* or when the index answers nothing usable, a bounded walk of `scope` (or the home folder). `source`
|
|
255
|
-
* says which one answered. Entries are FsEntry (never following links), most relevant first.
|
|
256
|
-
*/
|
|
257
|
-
declare const FsSearchIndexParams: z.ZodObject<{
|
|
258
|
-
query: z.ZodString;
|
|
259
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
260
|
-
max_results: z.ZodDefault<z.ZodInt>;
|
|
261
|
-
}, z.core.$strict>;
|
|
262
|
-
declare const FsSearchIndexResult: z.ZodObject<{
|
|
263
|
-
entries: z.ZodArray<z.ZodObject<{
|
|
264
|
-
name: z.ZodString;
|
|
265
|
-
path: z.ZodString;
|
|
266
|
-
kind: z.ZodEnum<{
|
|
267
|
-
file: "file";
|
|
268
|
-
dir: "dir";
|
|
269
|
-
symlink: "symlink";
|
|
270
|
-
}>;
|
|
271
|
-
size: z.ZodInt;
|
|
272
|
-
mtime: z.ZodNumber;
|
|
273
|
-
mode: z.ZodInt;
|
|
274
|
-
target: z.ZodNullable<z.ZodString>;
|
|
275
|
-
}, z.core.$strict>>;
|
|
276
|
-
truncated: z.ZodBoolean;
|
|
277
|
-
source: z.ZodEnum<{
|
|
278
|
-
index: "index";
|
|
279
|
-
walk: "walk";
|
|
280
|
-
}>;
|
|
281
|
-
}, z.core.$strict>;
|
|
282
|
-
/**
|
|
283
|
-
* Finder's Get Info facts beyond fs.stat (1.30): when it was made, who owns it, its size on disk
|
|
284
|
-
* (a folder's whole tree, bounded), how many items a folder holds, and its flags. null = the OS
|
|
285
|
-
* does not say (or the bound was hit before the folder's size was known).
|
|
286
|
-
*/
|
|
287
|
-
declare const FsInfoParams: z.ZodObject<{
|
|
288
|
-
path: z.ZodString;
|
|
289
|
-
}, z.core.$strict>;
|
|
290
|
-
declare const FsInfoResult: z.ZodObject<{
|
|
291
|
-
entry: z.ZodObject<{
|
|
292
|
-
name: z.ZodString;
|
|
293
|
-
path: z.ZodString;
|
|
294
|
-
kind: z.ZodEnum<{
|
|
295
|
-
file: "file";
|
|
296
|
-
dir: "dir";
|
|
297
|
-
symlink: "symlink";
|
|
298
|
-
}>;
|
|
299
|
-
size: z.ZodInt;
|
|
300
|
-
mtime: z.ZodNumber;
|
|
301
|
-
mode: z.ZodInt;
|
|
302
|
-
target: z.ZodNullable<z.ZodString>;
|
|
303
|
-
}, z.core.$strict>;
|
|
304
|
-
created: z.ZodNullable<z.ZodNumber>;
|
|
305
|
-
owner: z.ZodNullable<z.ZodString>;
|
|
306
|
-
group: z.ZodNullable<z.ZodString>;
|
|
307
|
-
total_size: z.ZodNullable<z.ZodInt>;
|
|
308
|
-
size_on_disk: z.ZodNullable<z.ZodInt>;
|
|
309
|
-
items: z.ZodNullable<z.ZodInt>;
|
|
310
|
-
hidden: z.ZodBoolean;
|
|
311
|
-
locked: z.ZodNullable<z.ZodBoolean>;
|
|
312
|
-
read_only: z.ZodBoolean;
|
|
313
|
-
}, z.core.$strict>;
|
|
314
236
|
declare const FsKind: z.ZodEnum<{
|
|
315
237
|
file: "file";
|
|
316
238
|
dir: "dir";
|
|
@@ -476,6 +398,90 @@ declare const FsMoveResult: z.ZodObject<{
|
|
|
476
398
|
to_path: z.ZodString;
|
|
477
399
|
}, z.core.$strict>;
|
|
478
400
|
type FsMoveResult = z.output<typeof FsMoveResult>;
|
|
401
|
+
/**
|
|
402
|
+
* Copy a file or a whole folder (Finder's Duplicate, Copy and Paste, ⌥-drag). Desktop only (1.30):
|
|
403
|
+
* the daemon has no copy. Timestamps and permission bits are kept, symlinks are copied as links.
|
|
404
|
+
* A name already at `to_path` is CONFLICT/already_exists unless `overwrite`; replacing a folder
|
|
405
|
+
* with a file (or the reverse) is CONFLICT/is_a_directory; copying a folder into itself is
|
|
406
|
+
* INVALID_PARAMS (no reason). A replaced item goes to the Trash first, as Finder's Replace.
|
|
407
|
+
*/
|
|
408
|
+
declare const FsCopyParams: z.ZodObject<{
|
|
409
|
+
from_path: z.ZodString;
|
|
410
|
+
to_path: z.ZodString;
|
|
411
|
+
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
412
|
+
}, z.core.$strict>;
|
|
413
|
+
type FsCopyParams = z.output<typeof FsCopyParams>;
|
|
414
|
+
declare const FsCopyResult: z.ZodObject<{
|
|
415
|
+
from_path: z.ZodString;
|
|
416
|
+
to_path: z.ZodString;
|
|
417
|
+
}, z.core.$strict>;
|
|
418
|
+
type FsCopyResult = z.output<typeof FsCopyResult>;
|
|
419
|
+
/**
|
|
420
|
+
* Finder's Get Info facts beyond fs.stat (1.30): when it was made, who owns it, its size on disk
|
|
421
|
+
* (a folder's whole tree, bounded), how many items a folder holds, and its flags. null = the OS
|
|
422
|
+
* does not say (or the bound was hit before the folder's size was known).
|
|
423
|
+
*/
|
|
424
|
+
declare const FsInfoParams: z.ZodObject<{
|
|
425
|
+
path: z.ZodString;
|
|
426
|
+
}, z.core.$strict>;
|
|
427
|
+
type FsInfoParams = z.output<typeof FsInfoParams>;
|
|
428
|
+
declare const FsInfoResult: z.ZodObject<{
|
|
429
|
+
entry: z.ZodObject<{
|
|
430
|
+
name: z.ZodString;
|
|
431
|
+
path: z.ZodString;
|
|
432
|
+
kind: z.ZodEnum<{
|
|
433
|
+
file: "file";
|
|
434
|
+
dir: "dir";
|
|
435
|
+
symlink: "symlink";
|
|
436
|
+
}>;
|
|
437
|
+
size: z.ZodInt;
|
|
438
|
+
mtime: z.ZodNumber;
|
|
439
|
+
mode: z.ZodInt;
|
|
440
|
+
target: z.ZodNullable<z.ZodString>;
|
|
441
|
+
}, z.core.$strict>;
|
|
442
|
+
created: z.ZodNullable<z.ZodNumber>;
|
|
443
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
444
|
+
group: z.ZodNullable<z.ZodString>;
|
|
445
|
+
total_size: z.ZodNullable<z.ZodInt>;
|
|
446
|
+
size_on_disk: z.ZodNullable<z.ZodInt>;
|
|
447
|
+
items: z.ZodNullable<z.ZodInt>;
|
|
448
|
+
hidden: z.ZodBoolean;
|
|
449
|
+
locked: z.ZodNullable<z.ZodBoolean>;
|
|
450
|
+
read_only: z.ZodBoolean;
|
|
451
|
+
}, z.core.$strict>;
|
|
452
|
+
type FsInfoResult = z.output<typeof FsInfoResult>;
|
|
453
|
+
/**
|
|
454
|
+
* Search the computer's own index by name (Finder's "This Mac", 1.30): Spotlight on macOS; elsewhere,
|
|
455
|
+
* or when the index answers nothing usable, a bounded walk of `scope` (or the home folder). `source`
|
|
456
|
+
* says which one answered. Entries are FsEntry (never following links), most relevant first.
|
|
457
|
+
*/
|
|
458
|
+
declare const FsSearchIndexParams: z.ZodObject<{
|
|
459
|
+
query: z.ZodString;
|
|
460
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
461
|
+
max_results: z.ZodDefault<z.ZodInt>;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
type FsSearchIndexParams = z.output<typeof FsSearchIndexParams>;
|
|
464
|
+
declare const FsSearchIndexResult: z.ZodObject<{
|
|
465
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
466
|
+
name: z.ZodString;
|
|
467
|
+
path: z.ZodString;
|
|
468
|
+
kind: z.ZodEnum<{
|
|
469
|
+
file: "file";
|
|
470
|
+
dir: "dir";
|
|
471
|
+
symlink: "symlink";
|
|
472
|
+
}>;
|
|
473
|
+
size: z.ZodInt;
|
|
474
|
+
mtime: z.ZodNumber;
|
|
475
|
+
mode: z.ZodInt;
|
|
476
|
+
target: z.ZodNullable<z.ZodString>;
|
|
477
|
+
}, z.core.$strict>>;
|
|
478
|
+
truncated: z.ZodBoolean;
|
|
479
|
+
source: z.ZodEnum<{
|
|
480
|
+
index: "index";
|
|
481
|
+
walk: "walk";
|
|
482
|
+
}>;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
type FsSearchIndexResult = z.output<typeof FsSearchIndexResult>;
|
|
479
485
|
/**
|
|
480
486
|
* Delete. Default goes to the OS Trash (Finder/Explorer semantics: undoable from the phone's
|
|
481
487
|
* "Undo" toast via fs.move back). to_trash:false is a permanent delete — the daemon's behaviour,
|
|
@@ -6046,4 +6052,14 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
6046
6052
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
6047
6053
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
6048
6054
|
|
|
6049
|
-
|
|
6055
|
+
/** The ops refused when these tools are off: those every sending tool has turned off. */
|
|
6056
|
+
declare function refusedOps(disabledTools: readonly string[]): ReadonlySet<string>;
|
|
6057
|
+
/** The catalog tools that send this op. */
|
|
6058
|
+
declare function toolsSending(op: string): string[];
|
|
6059
|
+
/**
|
|
6060
|
+
* For one tool switched off: the tools still on that keep ALL its ops open (turning it off alone
|
|
6061
|
+
* stops nothing until they are off too). Empty when turning it off stops at least one op.
|
|
6062
|
+
*/
|
|
6063
|
+
declare function sharedOpsBlocking(tool: string, disabledTools: readonly string[]): string[];
|
|
6064
|
+
|
|
6065
|
+
export { AbsPath, AccountAgent, AccountAgentsListParams, AccountAgentsListResult, AccountReadState, AccountReset, AccountRowId, AccountUsage, AccountVaultCopyParams, AccountVaultCopyResult, AccountVaultListParams, AccountVaultListResult, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsTitlesCheckParams, AppsChatsTitlesCheckResult, AppsChatsTitlesPushParams, AppsChatsTitlesPushResult, 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, AppsWindowsReopenParams, AppsWindowsReopenResult, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AppsWindowsShownParams, AppsWindowsShownResult, AppsWindowsUpdateAndReopenParams, AppsWindowsUpdateAndReopenResult, AppsWindowsUpdateStateParams, AppsWindowsUpdateStateResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioLevelsParams, AudioLevelsResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, AudioSetLevelsParams, BrowserCallError, BrowserCallParams, BrowserCallPhase, BrowserCallResult, BrowserClientInstance, BrowserDisconnectParams, BrowserDisconnectResult, BrowserInvokeEvent, BrowserKind, BrowserPairCodeParams, BrowserPairCodeResult, BrowserPairRequest, BrowserPairResetParams, BrowserPairResult, BrowserProgressEvent, BrowserProgressParams, BrowserProgressResult, BrowserRegisterParams, BrowserRegisterResult, BrowserResultParams, BrowserResultResult, BrowserSession, BrowserSessionState, BrowserSessionsChangedEvent, BrowserSessionsParams, BrowserSessionsResult, BrowserSetEnabledParams, BrowserSetEnabledResult, 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, DISCOVERY_FILE, DesktopHealth, DeviceId, DiagErrorEntry, DiagErrorKind, DiagErrorStatus, DiagErrorsChangedEvent, DiagErrorsListParams, DiagErrorsListResult, DiagErrorsReportParams, DiagErrorsReportResult, DiagProcess, 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, FsCopyParams, FsCopyResult, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsInfoParams, FsInfoResult, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchIndexParams, FsSearchIndexResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, GIT_MAX_OUTPUT_CHARS, GitAddParams, GitBranchParams, GitBranchResult, GitCloneParams, GitCommitParams, GitCommitResult, GitDiffParams, GitDiffResult, GitLogCommit, GitLogParams, GitLogResult, GitOutputResult, GitPullParams, GitPushParams, GitStashParams, GitStatusFile, GitStatusParams, GitStatusResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputKeyboardSettingsParams, InputKeyboardSettingsResult, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputSetKeyboardSettingsParams, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, MATRX_EXTENSION_IDS, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerEnergy, PowerHistoryParams, PowerHistoryPoint, PowerHistoryResult, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProjectMoveChat, ProjectMoveGroup, ProjectMovePin, 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, ShownSection, Signal, SpendAccount, SpendChat, SpendDay, 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, SysinfoHardwareParams, SysinfoHardwareResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenSettingsParams, SystemOpenSettingsResult, SystemOpenUrlParams, SystemOpenUrlResult, SystemSettingsPane, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, TitleCopies, TitleMismatch, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, ToolsServiceProgress, ToolsWebSearchParams, VERSIONED_RESULT_OPS, VaultFieldSummary, VaultItemKind, VaultItemSummary, WEB_MAX_TEXT_CHARS, WebBrowserFetchParams, WebBrowserFetchResult, WebFetchParams, WebFetchResult, WebHeader, WebScrapePage, WebScrapeParams, WebScrapeResult, WebSearchHit, WebSearchParams, WebSearchQueryResult, WebSearchResult, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, refusedOps, renderToolStatusMarkdown, sharedOpsBlocking, statusForPeer, toolsSending, u32, versionSubprotocol };
|
package/dist/index.d.ts
CHANGED
|
@@ -233,84 +233,6 @@ type SysinfoHardwareResult = z.output<typeof SysinfoHardwareResult>;
|
|
|
233
233
|
|
|
234
234
|
/** @ai-matrx/desktop-protocol — cap fs. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
|
|
235
235
|
|
|
236
|
-
/**
|
|
237
|
-
* Copy a file or a whole folder (Finder's Duplicate, Copy and Paste, ⌥-drag). Desktop only (1.30):
|
|
238
|
-
* the daemon has no copy. Timestamps and permission bits are kept, symlinks are copied as links.
|
|
239
|
-
* A name already at `to_path` is CONFLICT/already_exists unless `overwrite`; replacing a folder
|
|
240
|
-
* with a file (or the reverse) is CONFLICT/is_a_directory; copying a folder into itself is
|
|
241
|
-
* INVALID_PARAMS/into_itself.
|
|
242
|
-
*/
|
|
243
|
-
declare const FsCopyParams: z.ZodObject<{
|
|
244
|
-
from_path: z.ZodString;
|
|
245
|
-
to_path: z.ZodString;
|
|
246
|
-
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
247
|
-
}, z.core.$strict>;
|
|
248
|
-
declare const FsCopyResult: z.ZodObject<{
|
|
249
|
-
from_path: z.ZodString;
|
|
250
|
-
to_path: z.ZodString;
|
|
251
|
-
}, z.core.$strict>;
|
|
252
|
-
/**
|
|
253
|
-
* Search the computer's own index by name (Finder's "This Mac", 1.30): Spotlight on macOS; elsewhere,
|
|
254
|
-
* or when the index answers nothing usable, a bounded walk of `scope` (or the home folder). `source`
|
|
255
|
-
* says which one answered. Entries are FsEntry (never following links), most relevant first.
|
|
256
|
-
*/
|
|
257
|
-
declare const FsSearchIndexParams: z.ZodObject<{
|
|
258
|
-
query: z.ZodString;
|
|
259
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
260
|
-
max_results: z.ZodDefault<z.ZodInt>;
|
|
261
|
-
}, z.core.$strict>;
|
|
262
|
-
declare const FsSearchIndexResult: z.ZodObject<{
|
|
263
|
-
entries: z.ZodArray<z.ZodObject<{
|
|
264
|
-
name: z.ZodString;
|
|
265
|
-
path: z.ZodString;
|
|
266
|
-
kind: z.ZodEnum<{
|
|
267
|
-
file: "file";
|
|
268
|
-
dir: "dir";
|
|
269
|
-
symlink: "symlink";
|
|
270
|
-
}>;
|
|
271
|
-
size: z.ZodInt;
|
|
272
|
-
mtime: z.ZodNumber;
|
|
273
|
-
mode: z.ZodInt;
|
|
274
|
-
target: z.ZodNullable<z.ZodString>;
|
|
275
|
-
}, z.core.$strict>>;
|
|
276
|
-
truncated: z.ZodBoolean;
|
|
277
|
-
source: z.ZodEnum<{
|
|
278
|
-
index: "index";
|
|
279
|
-
walk: "walk";
|
|
280
|
-
}>;
|
|
281
|
-
}, z.core.$strict>;
|
|
282
|
-
/**
|
|
283
|
-
* Finder's Get Info facts beyond fs.stat (1.30): when it was made, who owns it, its size on disk
|
|
284
|
-
* (a folder's whole tree, bounded), how many items a folder holds, and its flags. null = the OS
|
|
285
|
-
* does not say (or the bound was hit before the folder's size was known).
|
|
286
|
-
*/
|
|
287
|
-
declare const FsInfoParams: z.ZodObject<{
|
|
288
|
-
path: z.ZodString;
|
|
289
|
-
}, z.core.$strict>;
|
|
290
|
-
declare const FsInfoResult: z.ZodObject<{
|
|
291
|
-
entry: z.ZodObject<{
|
|
292
|
-
name: z.ZodString;
|
|
293
|
-
path: z.ZodString;
|
|
294
|
-
kind: z.ZodEnum<{
|
|
295
|
-
file: "file";
|
|
296
|
-
dir: "dir";
|
|
297
|
-
symlink: "symlink";
|
|
298
|
-
}>;
|
|
299
|
-
size: z.ZodInt;
|
|
300
|
-
mtime: z.ZodNumber;
|
|
301
|
-
mode: z.ZodInt;
|
|
302
|
-
target: z.ZodNullable<z.ZodString>;
|
|
303
|
-
}, z.core.$strict>;
|
|
304
|
-
created: z.ZodNullable<z.ZodNumber>;
|
|
305
|
-
owner: z.ZodNullable<z.ZodString>;
|
|
306
|
-
group: z.ZodNullable<z.ZodString>;
|
|
307
|
-
total_size: z.ZodNullable<z.ZodInt>;
|
|
308
|
-
size_on_disk: z.ZodNullable<z.ZodInt>;
|
|
309
|
-
items: z.ZodNullable<z.ZodInt>;
|
|
310
|
-
hidden: z.ZodBoolean;
|
|
311
|
-
locked: z.ZodNullable<z.ZodBoolean>;
|
|
312
|
-
read_only: z.ZodBoolean;
|
|
313
|
-
}, z.core.$strict>;
|
|
314
236
|
declare const FsKind: z.ZodEnum<{
|
|
315
237
|
file: "file";
|
|
316
238
|
dir: "dir";
|
|
@@ -476,6 +398,90 @@ declare const FsMoveResult: z.ZodObject<{
|
|
|
476
398
|
to_path: z.ZodString;
|
|
477
399
|
}, z.core.$strict>;
|
|
478
400
|
type FsMoveResult = z.output<typeof FsMoveResult>;
|
|
401
|
+
/**
|
|
402
|
+
* Copy a file or a whole folder (Finder's Duplicate, Copy and Paste, ⌥-drag). Desktop only (1.30):
|
|
403
|
+
* the daemon has no copy. Timestamps and permission bits are kept, symlinks are copied as links.
|
|
404
|
+
* A name already at `to_path` is CONFLICT/already_exists unless `overwrite`; replacing a folder
|
|
405
|
+
* with a file (or the reverse) is CONFLICT/is_a_directory; copying a folder into itself is
|
|
406
|
+
* INVALID_PARAMS (no reason). A replaced item goes to the Trash first, as Finder's Replace.
|
|
407
|
+
*/
|
|
408
|
+
declare const FsCopyParams: z.ZodObject<{
|
|
409
|
+
from_path: z.ZodString;
|
|
410
|
+
to_path: z.ZodString;
|
|
411
|
+
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
412
|
+
}, z.core.$strict>;
|
|
413
|
+
type FsCopyParams = z.output<typeof FsCopyParams>;
|
|
414
|
+
declare const FsCopyResult: z.ZodObject<{
|
|
415
|
+
from_path: z.ZodString;
|
|
416
|
+
to_path: z.ZodString;
|
|
417
|
+
}, z.core.$strict>;
|
|
418
|
+
type FsCopyResult = z.output<typeof FsCopyResult>;
|
|
419
|
+
/**
|
|
420
|
+
* Finder's Get Info facts beyond fs.stat (1.30): when it was made, who owns it, its size on disk
|
|
421
|
+
* (a folder's whole tree, bounded), how many items a folder holds, and its flags. null = the OS
|
|
422
|
+
* does not say (or the bound was hit before the folder's size was known).
|
|
423
|
+
*/
|
|
424
|
+
declare const FsInfoParams: z.ZodObject<{
|
|
425
|
+
path: z.ZodString;
|
|
426
|
+
}, z.core.$strict>;
|
|
427
|
+
type FsInfoParams = z.output<typeof FsInfoParams>;
|
|
428
|
+
declare const FsInfoResult: z.ZodObject<{
|
|
429
|
+
entry: z.ZodObject<{
|
|
430
|
+
name: z.ZodString;
|
|
431
|
+
path: z.ZodString;
|
|
432
|
+
kind: z.ZodEnum<{
|
|
433
|
+
file: "file";
|
|
434
|
+
dir: "dir";
|
|
435
|
+
symlink: "symlink";
|
|
436
|
+
}>;
|
|
437
|
+
size: z.ZodInt;
|
|
438
|
+
mtime: z.ZodNumber;
|
|
439
|
+
mode: z.ZodInt;
|
|
440
|
+
target: z.ZodNullable<z.ZodString>;
|
|
441
|
+
}, z.core.$strict>;
|
|
442
|
+
created: z.ZodNullable<z.ZodNumber>;
|
|
443
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
444
|
+
group: z.ZodNullable<z.ZodString>;
|
|
445
|
+
total_size: z.ZodNullable<z.ZodInt>;
|
|
446
|
+
size_on_disk: z.ZodNullable<z.ZodInt>;
|
|
447
|
+
items: z.ZodNullable<z.ZodInt>;
|
|
448
|
+
hidden: z.ZodBoolean;
|
|
449
|
+
locked: z.ZodNullable<z.ZodBoolean>;
|
|
450
|
+
read_only: z.ZodBoolean;
|
|
451
|
+
}, z.core.$strict>;
|
|
452
|
+
type FsInfoResult = z.output<typeof FsInfoResult>;
|
|
453
|
+
/**
|
|
454
|
+
* Search the computer's own index by name (Finder's "This Mac", 1.30): Spotlight on macOS; elsewhere,
|
|
455
|
+
* or when the index answers nothing usable, a bounded walk of `scope` (or the home folder). `source`
|
|
456
|
+
* says which one answered. Entries are FsEntry (never following links), most relevant first.
|
|
457
|
+
*/
|
|
458
|
+
declare const FsSearchIndexParams: z.ZodObject<{
|
|
459
|
+
query: z.ZodString;
|
|
460
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
461
|
+
max_results: z.ZodDefault<z.ZodInt>;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
type FsSearchIndexParams = z.output<typeof FsSearchIndexParams>;
|
|
464
|
+
declare const FsSearchIndexResult: z.ZodObject<{
|
|
465
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
466
|
+
name: z.ZodString;
|
|
467
|
+
path: z.ZodString;
|
|
468
|
+
kind: z.ZodEnum<{
|
|
469
|
+
file: "file";
|
|
470
|
+
dir: "dir";
|
|
471
|
+
symlink: "symlink";
|
|
472
|
+
}>;
|
|
473
|
+
size: z.ZodInt;
|
|
474
|
+
mtime: z.ZodNumber;
|
|
475
|
+
mode: z.ZodInt;
|
|
476
|
+
target: z.ZodNullable<z.ZodString>;
|
|
477
|
+
}, z.core.$strict>>;
|
|
478
|
+
truncated: z.ZodBoolean;
|
|
479
|
+
source: z.ZodEnum<{
|
|
480
|
+
index: "index";
|
|
481
|
+
walk: "walk";
|
|
482
|
+
}>;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
type FsSearchIndexResult = z.output<typeof FsSearchIndexResult>;
|
|
479
485
|
/**
|
|
480
486
|
* Delete. Default goes to the OS Trash (Finder/Explorer semantics: undoable from the phone's
|
|
481
487
|
* "Undo" toast via fs.move back). to_trash:false is a permanent delete — the daemon's behaviour,
|
|
@@ -6046,4 +6052,14 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
6046
6052
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
6047
6053
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
6048
6054
|
|
|
6049
|
-
|
|
6055
|
+
/** The ops refused when these tools are off: those every sending tool has turned off. */
|
|
6056
|
+
declare function refusedOps(disabledTools: readonly string[]): ReadonlySet<string>;
|
|
6057
|
+
/** The catalog tools that send this op. */
|
|
6058
|
+
declare function toolsSending(op: string): string[];
|
|
6059
|
+
/**
|
|
6060
|
+
* For one tool switched off: the tools still on that keep ALL its ops open (turning it off alone
|
|
6061
|
+
* stops nothing until they are off too). Empty when turning it off stops at least one op.
|
|
6062
|
+
*/
|
|
6063
|
+
declare function sharedOpsBlocking(tool: string, disabledTools: readonly string[]): string[];
|
|
6064
|
+
|
|
6065
|
+
export { AbsPath, AccountAgent, AccountAgentsListParams, AccountAgentsListResult, AccountReadState, AccountReset, AccountRowId, AccountUsage, AccountVaultCopyParams, AccountVaultCopyResult, AccountVaultListParams, AccountVaultListResult, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppWindowInfo, AppsAccountsResetsParams, AppsAccountsResetsResult, AppsAccountsUsageParams, AppsAccountsUsageResult, AppsChatsChangedEvent, AppsChatsColdParams, AppsChatsColdResult, AppsChatsListParams, AppsChatsListResult, AppsChatsOpenParams, AppsChatsPlaceParams, AppsChatsPlaceResult, AppsChatsStarParams, AppsChatsStarResult, AppsChatsTitlesCheckParams, AppsChatsTitlesCheckResult, AppsChatsTitlesPushParams, AppsChatsTitlesPushResult, 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, AppsWindowsReopenParams, AppsWindowsReopenResult, AppsWindowsRestartParams, AppsWindowsSaveNamesParams, AppsWindowsShownParams, AppsWindowsShownResult, AppsWindowsUpdateAndReopenParams, AppsWindowsUpdateAndReopenResult, AppsWindowsUpdateStateParams, AppsWindowsUpdateStateResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioLevelsParams, AudioLevelsResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, AudioSetLevelsParams, BrowserCallError, BrowserCallParams, BrowserCallPhase, BrowserCallResult, BrowserClientInstance, BrowserDisconnectParams, BrowserDisconnectResult, BrowserInvokeEvent, BrowserKind, BrowserPairCodeParams, BrowserPairCodeResult, BrowserPairRequest, BrowserPairResetParams, BrowserPairResult, BrowserProgressEvent, BrowserProgressParams, BrowserProgressResult, BrowserRegisterParams, BrowserRegisterResult, BrowserResultParams, BrowserResultResult, BrowserSession, BrowserSessionState, BrowserSessionsChangedEvent, BrowserSessionsParams, BrowserSessionsResult, BrowserSetEnabledParams, BrowserSetEnabledResult, 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, DISCOVERY_FILE, DesktopHealth, DeviceId, DiagErrorEntry, DiagErrorKind, DiagErrorStatus, DiagErrorsChangedEvent, DiagErrorsListParams, DiagErrorsListResult, DiagErrorsReportParams, DiagErrorsReportResult, DiagProcess, 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, FsCopyParams, FsCopyResult, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsInfoParams, FsInfoResult, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchIndexParams, FsSearchIndexResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, GIT_MAX_OUTPUT_CHARS, GitAddParams, GitBranchParams, GitBranchResult, GitCloneParams, GitCommitParams, GitCommitResult, GitDiffParams, GitDiffResult, GitLogCommit, GitLogParams, GitLogResult, GitOutputResult, GitPullParams, GitPushParams, GitStashParams, GitStatusFile, GitStatusParams, GitStatusResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputKeyboardSettingsParams, InputKeyboardSettingsResult, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputSetKeyboardSettingsParams, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, MATRX_EXTENSION_IDS, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerEnergy, PowerHistoryParams, PowerHistoryPoint, PowerHistoryResult, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProjectMoveChat, ProjectMoveGroup, ProjectMovePin, 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, ShownSection, Signal, SpendAccount, SpendChat, SpendDay, 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, SysinfoHardwareParams, SysinfoHardwareResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenSettingsParams, SystemOpenSettingsResult, SystemOpenUrlParams, SystemOpenUrlResult, SystemSettingsPane, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, TitleCopies, TitleMismatch, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, ToolsServiceProgress, ToolsWebSearchParams, VERSIONED_RESULT_OPS, VaultFieldSummary, VaultItemKind, VaultItemSummary, WEB_MAX_TEXT_CHARS, WebBrowserFetchParams, WebBrowserFetchResult, WebFetchParams, WebFetchResult, WebHeader, WebScrapePage, WebScrapeParams, WebScrapeResult, WebSearchHit, WebSearchParams, WebSearchQueryResult, WebSearchResult, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, refusedOps, renderToolStatusMarkdown, sharedOpsBlocking, statusForPeer, toolsSending, u32, versionSubprotocol };
|
package/dist/index.js
CHANGED
|
@@ -3679,6 +3679,7 @@ var TOOL_CATALOG = [
|
|
|
3679
3679
|
{ name: "desktop_system", group: "os_control", state: "built", path: "device_op", ops: ["sysinfo.get", "sysinfo.hardware", "system.open_url", "system.open_path", "system.open_settings", "system.notify"], platforms: ALL, summary: "System facts, open, notify" },
|
|
3680
3680
|
{ 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" },
|
|
3681
3681
|
{ name: "desktop_screen", group: "os_control", state: "built", path: "device_op", ops: ["screen.list", "screen.capture"], platforms: ALL, summary: "Displays and screenshots" },
|
|
3682
|
+
{ name: "desktop_browser", group: "os_control", state: "built", path: "device_op", ops: ["browser.sessions", "browser.call"], platforms: ALL, summary: "The person's own browser through the AI Matrx extension: tabs, read, screenshot, navigate, click, type" },
|
|
3682
3683
|
{ name: "desktop_window", group: "os_control", state: "built", path: "device_op", ops: ["window.list", "window.focus", "window.move", "window.minimize"], platforms: ALL, summary: "Find, focus and arrange windows" },
|
|
3683
3684
|
{ name: "desktop_input", group: "os_control", state: "built", path: "device_op", ops: ["input.type_text", "input.hotkey", "input.mouse_click", "input.mouse_move", "input.keyboard_settings", "input.set_keyboard_settings"], platforms: ALL, summary: "Keyboard and mouse" },
|
|
3684
3685
|
{ name: "desktop_audio", group: "os_control", state: "built", path: "device_op", ops: ["audio.devices", "audio.levels", "audio.set_levels", "audio.record", "audio.play"], platforms: ALL, summary: "Audio devices, record, play" },
|
|
@@ -3761,14 +3762,15 @@ var LEGACY_ACTIONS = {
|
|
|
3761
3762
|
"local_system.open_url": tool("desktop_system"),
|
|
3762
3763
|
"local_system.open_path": tool("desktop_system"),
|
|
3763
3764
|
"local_system.notify": tool("desktop_system"),
|
|
3764
|
-
|
|
3765
|
-
"local_browser.
|
|
3766
|
-
"local_browser.
|
|
3767
|
-
"local_browser.
|
|
3768
|
-
"local_browser.
|
|
3769
|
-
"local_browser.
|
|
3770
|
-
"local_browser.
|
|
3771
|
-
"local_browser.
|
|
3765
|
+
// The person's own browser is the AI Matrx extension paired with Matrx 2 (cap browser).
|
|
3766
|
+
"local_browser.navigate": tool("desktop_browser"),
|
|
3767
|
+
"local_browser.click": tool("desktop_browser"),
|
|
3768
|
+
"local_browser.type_text": tool("desktop_browser"),
|
|
3769
|
+
"local_browser.extract": tool("desktop_browser"),
|
|
3770
|
+
"local_browser.screenshot": tool("desktop_browser"),
|
|
3771
|
+
"local_browser.eval": dropped("The extension runs no page script for Matrx 2: its script and cdp tools are privileged and refused over the desktop path; read, click and type cover what eval was used for"),
|
|
3772
|
+
"local_browser.tabs": tool("desktop_browser"),
|
|
3773
|
+
"local_browser.close": tool("desktop_browser"),
|
|
3772
3774
|
"local_web.fetch": tool("desktop_web"),
|
|
3773
3775
|
"local_web.fetch_with_browser": tool("desktop_web"),
|
|
3774
3776
|
"local_web.scrape": tool("desktop_web"),
|
|
@@ -3964,6 +3966,29 @@ function renderToolStatusMarkdown(status) {
|
|
|
3964
3966
|
}
|
|
3965
3967
|
return lines.join("\n");
|
|
3966
3968
|
}
|
|
3969
|
+
|
|
3970
|
+
// src/tools/policy.ts
|
|
3971
|
+
function refusedOps(disabledTools) {
|
|
3972
|
+
const off = new Set(disabledTools);
|
|
3973
|
+
const senders = /* @__PURE__ */ new Map();
|
|
3974
|
+
for (const tool2 of TOOL_CATALOG) for (const op of tool2.ops) senders.set(op, [...senders.get(op) ?? [], tool2.name]);
|
|
3975
|
+
const refused = /* @__PURE__ */ new Set();
|
|
3976
|
+
for (const [op, tools] of senders) if (tools.every((t) => off.has(t))) refused.add(op);
|
|
3977
|
+
return refused;
|
|
3978
|
+
}
|
|
3979
|
+
function toolsSending(op) {
|
|
3980
|
+
return TOOL_CATALOG.filter((t) => t.ops.includes(op)).map((t) => t.name);
|
|
3981
|
+
}
|
|
3982
|
+
function sharedOpsBlocking(tool2, disabledTools) {
|
|
3983
|
+
const entry = TOOL_CATALOG.find((t) => t.name === tool2);
|
|
3984
|
+
if (!entry || entry.ops.length === 0) return [];
|
|
3985
|
+
const off = /* @__PURE__ */ new Set([...disabledTools, tool2]);
|
|
3986
|
+
const refused = refusedOps([...off]);
|
|
3987
|
+
if (entry.ops.some((op) => refused.has(op))) return [];
|
|
3988
|
+
const keepers = /* @__PURE__ */ new Set();
|
|
3989
|
+
for (const op of entry.ops) for (const other of TOOL_CATALOG) if (other.name !== tool2 && !off.has(other.name) && other.ops.includes(op)) keepers.add(other.name);
|
|
3990
|
+
return [...keepers].sort();
|
|
3991
|
+
}
|
|
3967
3992
|
export {
|
|
3968
3993
|
AbsPath,
|
|
3969
3994
|
AccountAgent,
|
|
@@ -4511,9 +4536,12 @@ export {
|
|
|
4511
4536
|
negotiate,
|
|
4512
4537
|
nonNegInt,
|
|
4513
4538
|
readCid,
|
|
4539
|
+
refusedOps,
|
|
4514
4540
|
renderToolStatusMarkdown,
|
|
4541
|
+
sharedOpsBlocking,
|
|
4515
4542
|
stampCid,
|
|
4516
4543
|
statusForPeer,
|
|
4544
|
+
toolsSending,
|
|
4517
4545
|
u32,
|
|
4518
4546
|
versionSubprotocol
|
|
4519
4547
|
};
|