@ai-matrx/desktop-protocol 0.21.29 → 0.21.30
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 +1277 -754
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -2
- package/dist/client.d.ts +7 -2
- package/dist/client.js +1277 -754
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +1136 -456
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2195 -85
- package/dist/index.d.ts +2195 -85
- package/dist/index.js +1136 -456
- package/dist/index.js.map +1 -1
- package/dist/{models-BpzT2hqF.d.cts → models-CzKyJhDP.d.cts} +6864 -3303
- package/dist/{models-BpzT2hqF.d.ts → models-CzKyJhDP.d.ts} +6864 -3303
- package/dist/react.d.cts +1585 -1
- package/dist/react.d.ts +1585 -1
- package/generated/desktop-protocol.schema.json +3923 -222
- package/package.json +2 -2
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 =
|
|
5
|
+
var PROTOCOL_MINOR = 39;
|
|
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_-]+$/);
|
|
@@ -926,7 +926,22 @@ var AccountAgent = z11.strictObject({
|
|
|
926
926
|
shared_by: z11.string().max(320).nullable(),
|
|
927
927
|
/** The organization it belongs to. */
|
|
928
928
|
organization: z11.string().max(200).nullable(),
|
|
929
|
-
updated_at_ms: epochMs
|
|
929
|
+
updated_at_ms: epochMs,
|
|
930
|
+
// 1.39: the catalogue's own row (agx_get_list_full, read whole through @ai-matrx/agents/catalog).
|
|
931
|
+
/** The agent's tags (the library's search and its inspector). */
|
|
932
|
+
tags: z11.array(z11.string().max(120)).max(50).optional(),
|
|
933
|
+
/** The model it runs (a model catalogue id); absent when it names none. */
|
|
934
|
+
model_id: AccountRowId.optional(),
|
|
935
|
+
/** The person's access: owner, admin, editor, viewer or system (the database's own words); absent when unknown. */
|
|
936
|
+
access_level: z11.string().min(1).max(40).optional(),
|
|
937
|
+
/** The organization's id (the label is `organization`); absent when it has none. */
|
|
938
|
+
organization_id: AccountRowId.optional(),
|
|
939
|
+
/** Whose it is: the person's own, shared with them, or one AI Matrx ships (Gallery). */
|
|
940
|
+
origin: z11.enum(["mine", "shared", "system"]).optional(),
|
|
941
|
+
/** Archived (the catalogue's archive filter decides whether the library lists it). */
|
|
942
|
+
is_archived: z11.boolean().optional(),
|
|
943
|
+
/** An orchestra: it conducts other agents. */
|
|
944
|
+
orchestra: z11.boolean().optional()
|
|
930
945
|
});
|
|
931
946
|
var AccountAgentsListParams = z11.strictObject({});
|
|
932
947
|
var AccountAgentsListResult = z11.strictObject({
|
|
@@ -935,6 +950,70 @@ var AccountAgentsListResult = z11.strictObject({
|
|
|
935
950
|
problem: z11.string().max(300).nullable(),
|
|
936
951
|
agents: z11.array(AccountAgent).max(2e3)
|
|
937
952
|
});
|
|
953
|
+
var AccountAgentVariable = z11.strictObject({
|
|
954
|
+
name: z11.string().min(1).max(200),
|
|
955
|
+
/** The default value as text ("" when it has none). */
|
|
956
|
+
default_value: z11.string().max(4e3),
|
|
957
|
+
required: z11.boolean(),
|
|
958
|
+
help: z11.string().max(1e3)
|
|
959
|
+
});
|
|
960
|
+
var AccountAgentDetail = z11.strictObject({
|
|
961
|
+
agent: AccountAgent,
|
|
962
|
+
/** The inputs a run asks for (the agent's variables). */
|
|
963
|
+
variables: z11.array(AccountAgentVariable).max(100),
|
|
964
|
+
/** How many tools, custom tools, skills and connections it may use. */
|
|
965
|
+
tool_count: z11.int().min(0),
|
|
966
|
+
custom_tool_count: z11.int().min(0),
|
|
967
|
+
skill_count: z11.int().min(0),
|
|
968
|
+
connection_count: z11.int().min(0),
|
|
969
|
+
/** The model's display name when the catalogue knows it. */
|
|
970
|
+
model_name: z11.string().max(200).nullable()
|
|
971
|
+
});
|
|
972
|
+
var AccountAgentsGetParams = z11.strictObject({ agent_id: AccountRowId });
|
|
973
|
+
var AccountAgentsGetResult = z11.strictObject({
|
|
974
|
+
state: AccountReadState,
|
|
975
|
+
problem: z11.string().max(300).nullable(),
|
|
976
|
+
/** Null when the person cannot open it (not theirs, not shared with them, or gone). */
|
|
977
|
+
detail: AccountAgentDetail.nullable()
|
|
978
|
+
});
|
|
979
|
+
var AccountAgentRunStatus = z11.enum(["succeeded", "warned", "failed", "stopped", "waiting", "running"]);
|
|
980
|
+
var AccountAgentRun = z11.strictObject({
|
|
981
|
+
run_id: AccountRowId,
|
|
982
|
+
status: AccountAgentRunStatus,
|
|
983
|
+
started_at_ms: epochMs,
|
|
984
|
+
completed_at_ms: epochMs.nullable(),
|
|
985
|
+
duration_ms: z11.int().min(0).nullable(),
|
|
986
|
+
cost: z11.number().min(0).nullable(),
|
|
987
|
+
tokens: z11.int().min(0).nullable(),
|
|
988
|
+
/** One line of the answer (at most 240 characters), when the run kept one. */
|
|
989
|
+
output_preview: z11.string().max(240).nullable(),
|
|
990
|
+
/** The run's error, one line. */
|
|
991
|
+
error: z11.string().max(300).nullable(),
|
|
992
|
+
/** The mandate it served, when one named it. */
|
|
993
|
+
mandate_key: z11.string().max(200).nullable(),
|
|
994
|
+
organization: z11.string().max(200).nullable(),
|
|
995
|
+
/** The conversation that holds its transcript, when it kept one. */
|
|
996
|
+
conversation_id: AccountRowId.nullable(),
|
|
997
|
+
has_transcript: z11.boolean()
|
|
998
|
+
});
|
|
999
|
+
var AccountAgentRunSort = z11.enum(["started_at", "duration", "cost", "status"]);
|
|
1000
|
+
var AccountAgentsRunsParams = z11.strictObject({
|
|
1001
|
+
agent_id: AccountRowId,
|
|
1002
|
+
status: AccountAgentRunStatus.optional(),
|
|
1003
|
+
sort: AccountAgentRunSort.optional(),
|
|
1004
|
+
descending: z11.boolean().optional(),
|
|
1005
|
+
offset: z11.int().min(0).max(1e5).optional(),
|
|
1006
|
+
limit: z11.int().min(1).max(100).optional()
|
|
1007
|
+
});
|
|
1008
|
+
var AccountAgentsRunsResult = z11.strictObject({
|
|
1009
|
+
state: AccountReadState,
|
|
1010
|
+
problem: z11.string().max(300).nullable(),
|
|
1011
|
+
/** Every run of this agent the person may see (rows is one page of it). */
|
|
1012
|
+
total: z11.int().min(0),
|
|
1013
|
+
rows: z11.array(AccountAgentRun).max(100)
|
|
1014
|
+
});
|
|
1015
|
+
var AccountAgentsFavoriteParams = z11.strictObject({ agent_id: AccountRowId, favorite: z11.boolean() });
|
|
1016
|
+
var AccountAgentsFavoriteResult = z11.strictObject({ favorite: z11.boolean() });
|
|
938
1017
|
var VaultItemKind = z11.enum(["login", "passkey", "key", "other"]);
|
|
939
1018
|
var VaultFieldSummary = z11.strictObject({
|
|
940
1019
|
key: z11.string().min(1).max(120),
|
|
@@ -2680,22 +2759,387 @@ var CodingHistoryProgressEvent = z32.strictObject({
|
|
|
2680
2759
|
failed: nonNegInt
|
|
2681
2760
|
});
|
|
2682
2761
|
|
|
2683
|
-
// src/schema/
|
|
2762
|
+
// src/schema/coding-sessions.ts
|
|
2684
2763
|
import { z as z33 } from "zod";
|
|
2685
|
-
var
|
|
2686
|
-
var
|
|
2687
|
-
var
|
|
2688
|
-
var
|
|
2764
|
+
var CodingProviderName = z33.enum(["claude", "codex"]);
|
|
2765
|
+
var CodingRunStatus = z33.enum(["starting", "running", "completed", "stopped", "failed"]);
|
|
2766
|
+
var SessionKey = z33.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
2767
|
+
var IsoTime = z33.string().min(10).max(40);
|
|
2768
|
+
var LocalPath = z33.string().min(1).max(4096);
|
|
2769
|
+
var CodingClientRequestId = z33.string().regex(/^[A-Za-z0-9_-]{8,64}$/);
|
|
2770
|
+
var ShortText = z33.string().max(500);
|
|
2771
|
+
var CodingRunUsage = z33.strictObject({
|
|
2772
|
+
inputTokens: nonNegInt,
|
|
2773
|
+
outputTokens: nonNegInt,
|
|
2774
|
+
cachedInputTokens: nonNegInt
|
|
2775
|
+
});
|
|
2776
|
+
var CodingStartedBy = z33.strictObject({
|
|
2777
|
+
kind: z33.enum(["this_computer", "web", "phone", "agent", "other"]),
|
|
2778
|
+
label: z33.string().min(1).max(80)
|
|
2779
|
+
});
|
|
2780
|
+
var CodingRunRecord = z33.strictObject({
|
|
2781
|
+
runId: z33.string().min(1).max(64),
|
|
2782
|
+
sessionId: SessionKey,
|
|
2783
|
+
provider: CodingProviderName,
|
|
2784
|
+
cwd: LocalPath,
|
|
2785
|
+
prompt: z33.string().max(1048576),
|
|
2786
|
+
model: z33.string().max(200).nullable(),
|
|
2787
|
+
status: CodingRunStatus,
|
|
2788
|
+
startedAt: IsoTime,
|
|
2789
|
+
endedAt: IsoTime.nullable(),
|
|
2790
|
+
error: z33.string().max(65536).nullable(),
|
|
2791
|
+
usage: CodingRunUsage.nullable(),
|
|
2792
|
+
costUsd: z33.number().nullable(),
|
|
2793
|
+
billing: z33.enum(["subscription", "api", "unknown"]).nullable(),
|
|
2794
|
+
startedBy: CodingStartedBy.nullable()
|
|
2795
|
+
});
|
|
2796
|
+
var CodingSessionAgentPart = z33.strictObject({
|
|
2797
|
+
part: z33.enum(["instructions", "skills", "tools"]),
|
|
2798
|
+
loaded: nonNegInt,
|
|
2799
|
+
total: nonNegInt
|
|
2800
|
+
});
|
|
2801
|
+
var CodingSessionAgent = z33.strictObject({
|
|
2802
|
+
agentId: z33.string().min(1).max(64),
|
|
2803
|
+
versionId: z33.string().max(64).nullable(),
|
|
2804
|
+
versionNumber: nonNegInt.nullable(),
|
|
2805
|
+
name: z33.string().max(300),
|
|
2806
|
+
definitionHash: z33.string().max(200),
|
|
2807
|
+
loaded: z33.array(CodingSessionAgentPart).max(3),
|
|
2808
|
+
unavailable: z33.array(z33.strictObject({ kind: z33.string().max(60), name: z33.string().max(300), reason: ShortText })).max(500),
|
|
2809
|
+
skills: z33.array(z33.string().max(300)).max(500),
|
|
2810
|
+
tools: z33.array(z33.string().max(300)).max(500),
|
|
2811
|
+
variables: z33.record(z33.string().max(200), z33.unknown()),
|
|
2812
|
+
blockDue: z33.boolean(),
|
|
2813
|
+
deliveredAt: IsoTime.nullable(),
|
|
2814
|
+
replaces: z33.string().max(300).nullable()
|
|
2815
|
+
});
|
|
2816
|
+
var CodingSessionRecord = z33.strictObject({
|
|
2817
|
+
id: SessionKey,
|
|
2818
|
+
provider: CodingProviderName,
|
|
2819
|
+
providerSessionId: SessionKey.nullable(),
|
|
2820
|
+
cwd: LocalPath,
|
|
2821
|
+
title: z33.string().max(500),
|
|
2822
|
+
model: z33.string().max(200).nullable(),
|
|
2823
|
+
effort: z33.string().max(40).nullable(),
|
|
2824
|
+
origin: z33.enum(["started", "takeover"]),
|
|
2825
|
+
createdAt: IsoTime,
|
|
2826
|
+
updatedAt: IsoTime,
|
|
2827
|
+
lastRunId: z33.string().max(64).nullable(),
|
|
2828
|
+
lastRunStatus: CodingRunStatus.nullable(),
|
|
2829
|
+
queued: z33.array(z33.string().max(1048576)).max(100),
|
|
2830
|
+
agent: CodingSessionAgent.nullable(),
|
|
2831
|
+
agentRemovedDue: z33.boolean()
|
|
2832
|
+
});
|
|
2833
|
+
var CodingActiveElsewhere = z33.strictObject({
|
|
2834
|
+
reason: z33.enum(["process", "recent-write", "open-tool-call", "open"]),
|
|
2835
|
+
message: ShortText,
|
|
2836
|
+
/** The process driving it, when the evidence is a process (re-checked before any stop). */
|
|
2837
|
+
pid: z33.int().min(1).nullable()
|
|
2838
|
+
});
|
|
2839
|
+
var CodingTitleSource = z33.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt", "unknown"]);
|
|
2840
|
+
var CodingDiscoveredChat = z33.strictObject({
|
|
2841
|
+
provider: CodingProviderName,
|
|
2842
|
+
providerSessionId: SessionKey,
|
|
2843
|
+
cwd: LocalPath.nullable(),
|
|
2844
|
+
title: z33.string().max(500),
|
|
2845
|
+
titleSource: CodingTitleSource.optional(),
|
|
2846
|
+
titlePending: z33.boolean().optional(),
|
|
2847
|
+
archived: z33.boolean().optional(),
|
|
2848
|
+
scheduled: z33.boolean().optional(),
|
|
2849
|
+
unlisted: z33.boolean().optional(),
|
|
2850
|
+
unavailable: ShortText.nullable(),
|
|
2851
|
+
updatedAt: IsoTime,
|
|
2852
|
+
source: z33.string().max(60).nullable(),
|
|
2853
|
+
activeElsewhere: CodingActiveElsewhere.nullable()
|
|
2854
|
+
});
|
|
2855
|
+
var CodingTranscriptItem = z33.discriminatedUnion("kind", [
|
|
2856
|
+
z33.strictObject({ kind: z33.literal("user"), id: z33.string().max(200), text: z33.string(), at: IsoTime.nullable() }),
|
|
2857
|
+
z33.strictObject({ kind: z33.literal("text"), id: z33.string().max(200), text: z33.string() }),
|
|
2858
|
+
z33.strictObject({ kind: z33.literal("text-delta"), id: z33.string().max(200), text: z33.string() }),
|
|
2859
|
+
z33.strictObject({ kind: z33.literal("reasoning"), id: z33.string().max(200), text: z33.string() }),
|
|
2860
|
+
z33.strictObject({ kind: z33.literal("tool-call"), id: z33.string().max(200), name: z33.string().max(300), input: z33.unknown() }),
|
|
2861
|
+
z33.strictObject({
|
|
2862
|
+
kind: z33.literal("tool-result"),
|
|
2863
|
+
id: z33.string().max(200),
|
|
2864
|
+
output: z33.string(),
|
|
2865
|
+
isError: z33.boolean(),
|
|
2866
|
+
/** The output's full size when only its start is here; `coding.item.full` reads the rest. */
|
|
2867
|
+
fullBytes: nonNegInt.optional()
|
|
2868
|
+
}),
|
|
2869
|
+
z33.strictObject({ kind: z33.literal("usage"), usage: CodingRunUsage, costUsd: z33.number().nullable() }),
|
|
2870
|
+
z33.strictObject({ kind: z33.literal("notice"), id: z33.string().max(200), level: z33.enum(["info", "warning"]), text: z33.string() }),
|
|
2871
|
+
z33.strictObject({ kind: z33.literal("error"), id: z33.string().max(200), text: z33.string() })
|
|
2872
|
+
]);
|
|
2873
|
+
var CodingHistoryRecord = z33.strictObject({
|
|
2874
|
+
items: z33.array(CodingTranscriptItem),
|
|
2875
|
+
/** Only the end of the chat is here; "Show earlier" reads more (a bigger `max_bytes`). */
|
|
2876
|
+
truncated: z33.boolean(),
|
|
2877
|
+
unavailable: ShortText.nullable(),
|
|
2878
|
+
/** The last live item `seq` this read already contains; a watch applies only newer ones. */
|
|
2879
|
+
seq: nonNegInt
|
|
2880
|
+
});
|
|
2881
|
+
var CodingQuotaWindow = z33.strictObject({
|
|
2882
|
+
label: z33.string().max(120),
|
|
2883
|
+
usedPercent: z33.number().nullable(),
|
|
2884
|
+
resetsAt: z33.string().max(80).nullable(),
|
|
2885
|
+
valueLabel: z33.string().max(120).nullable()
|
|
2886
|
+
});
|
|
2887
|
+
var CodingProviderProblem = z33.strictObject({
|
|
2888
|
+
kind: z33.enum(["usage-limit", "signed-out"]),
|
|
2889
|
+
message: z33.string().max(2e3),
|
|
2890
|
+
until: z33.string().max(120).nullable(),
|
|
2891
|
+
at: IsoTime
|
|
2892
|
+
});
|
|
2893
|
+
var CodingProviderBinary = z33.strictObject({
|
|
2894
|
+
path: LocalPath,
|
|
2895
|
+
version: z33.string().max(80).nullable(),
|
|
2896
|
+
source: z33.enum(["desktop-app", "path", "npm-global", "configured"]),
|
|
2897
|
+
sourceLabel: z33.string().max(120),
|
|
2898
|
+
newer: z33.strictObject({ path: LocalPath, version: z33.string().max(80), sourceLabel: z33.string().max(120) }).nullable()
|
|
2899
|
+
});
|
|
2900
|
+
var CodingProviderStatus = z33.strictObject({
|
|
2901
|
+
provider: CodingProviderName,
|
|
2902
|
+
label: z33.string().max(60),
|
|
2903
|
+
installed: z33.boolean(),
|
|
2904
|
+
version: z33.string().max(80).nullable(),
|
|
2905
|
+
loggedIn: z33.boolean(),
|
|
2906
|
+
billing: z33.enum(["subscription", "api", "unknown"]),
|
|
2907
|
+
plan: z33.string().max(80).nullable(),
|
|
2908
|
+
account: z33.string().max(320).nullable(),
|
|
2909
|
+
problem: ShortText.nullable(),
|
|
2910
|
+
fix: ShortText.nullable(),
|
|
2911
|
+
ready: z33.boolean(),
|
|
2912
|
+
lastProblem: CodingProviderProblem.nullable(),
|
|
2913
|
+
quota: z33.array(CodingQuotaWindow).max(20),
|
|
2914
|
+
models: z33.array(z33.strictObject({ id: z33.string().max(200), label: z33.string().max(200) })).max(200),
|
|
2915
|
+
efforts: z33.array(z33.string().max(40)).max(20),
|
|
2916
|
+
defaultModel: z33.strictObject({ id: z33.string().max(200), source: z33.enum(["settings", "driver"]) }).nullable(),
|
|
2917
|
+
defaultEffort: z33.string().max(40).nullable(),
|
|
2918
|
+
binary: CodingProviderBinary.nullable()
|
|
2919
|
+
});
|
|
2920
|
+
var CodingChatPreference = z33.strictObject({
|
|
2921
|
+
title: z33.string().max(500).nullable(),
|
|
2922
|
+
pinned: z33.boolean(),
|
|
2923
|
+
hidden: z33.boolean(),
|
|
2924
|
+
/** When the person last had this chat open on any screen of this computer (the "New output" dot). */
|
|
2925
|
+
lastSeenAt: IsoTime.nullable(),
|
|
2926
|
+
updatedAt: IsoTime.nullable()
|
|
2927
|
+
});
|
|
2928
|
+
var CodingTitleStatus = z33.strictObject({
|
|
2929
|
+
owner: z33.boolean(),
|
|
2930
|
+
pending: z33.boolean(),
|
|
2931
|
+
problem: ShortText.nullable(),
|
|
2932
|
+
renames: ShortText.nullable()
|
|
2933
|
+
});
|
|
2934
|
+
var CodingRecentRow = z33.strictObject({
|
|
2935
|
+
target: z33.string().min(3).max(200),
|
|
2936
|
+
title: z33.string().max(500),
|
|
2937
|
+
provider: CodingProviderName,
|
|
2938
|
+
sessionId: SessionKey.nullable(),
|
|
2939
|
+
providerSessionId: SessionKey.nullable(),
|
|
2940
|
+
cwd: LocalPath.nullable(),
|
|
2941
|
+
updatedAt: IsoTime,
|
|
2942
|
+
state: z33.enum(["running", "needs_attention", "new_output", "elsewhere", "idle"]),
|
|
2943
|
+
stateLabel: z33.string().max(120).nullable(),
|
|
2944
|
+
pinned: z33.boolean(),
|
|
2945
|
+
startedBy: CodingStartedBy.nullable()
|
|
2946
|
+
});
|
|
2947
|
+
var CodingFolderCheck = z33.strictObject({
|
|
2948
|
+
path: z33.string().max(4096),
|
|
2949
|
+
exists: z33.boolean(),
|
|
2950
|
+
isDirectory: z33.boolean()
|
|
2951
|
+
});
|
|
2952
|
+
var CodingRecentFolder = z33.strictObject({ path: LocalPath, lastUsedAt: IsoTime, exists: z33.boolean() });
|
|
2953
|
+
var CodingAgentSelectionParams = z33.strictObject({
|
|
2954
|
+
agent_id: z33.string().min(1).max(64),
|
|
2955
|
+
version_id: z33.string().min(1).max(64).optional(),
|
|
2956
|
+
variables: z33.record(z33.string().max(200), z33.unknown()).optional()
|
|
2957
|
+
});
|
|
2958
|
+
var CodingSendResult = z33.strictObject({
|
|
2959
|
+
session: CodingSessionRecord,
|
|
2960
|
+
run: CodingRunRecord.nullable(),
|
|
2961
|
+
/** The prompt waits behind a live run (it shows as a queued bubble). */
|
|
2962
|
+
queued: z33.boolean()
|
|
2963
|
+
});
|
|
2964
|
+
var CodingProvidersParams = z33.strictObject({});
|
|
2965
|
+
var CodingProvidersResult = z33.strictObject({ providers: z33.array(CodingProviderStatus).max(4) });
|
|
2966
|
+
var CodingSessionsListParams = z33.strictObject({});
|
|
2967
|
+
var CodingSessionsListResult = z33.strictObject({
|
|
2968
|
+
sessions: z33.array(CodingSessionRecord),
|
|
2969
|
+
/** The latest run of each session, by session id. */
|
|
2970
|
+
runs: z33.record(z33.string().max(128), CodingRunRecord),
|
|
2971
|
+
recent: z33.array(CodingRecentRow),
|
|
2972
|
+
title_status: CodingTitleStatus
|
|
2973
|
+
});
|
|
2974
|
+
var CodingDiscoverParams = z33.strictObject({ limit: z33.int().min(1).max(1e3).optional() });
|
|
2975
|
+
var CodingDiscoverResult = z33.strictObject({ chats: z33.array(CodingDiscoveredChat) });
|
|
2976
|
+
var CodingRunsListParams = z33.strictObject({ session_id: SessionKey });
|
|
2977
|
+
var CodingRunsListResult = z33.strictObject({ runs: z33.array(CodingRunRecord) });
|
|
2978
|
+
var CodingHistoryParams = z33.strictObject({ session_id: SessionKey, max_bytes: z33.int().min(1024).max(209715200).optional() });
|
|
2979
|
+
var CodingHistoryResult = CodingHistoryRecord;
|
|
2980
|
+
var CodingTranscriptReadParams = z33.strictObject({
|
|
2981
|
+
provider: CodingProviderName,
|
|
2982
|
+
provider_session_id: SessionKey,
|
|
2983
|
+
max_bytes: z33.int().min(1024).max(209715200).optional()
|
|
2984
|
+
});
|
|
2985
|
+
var CodingTranscriptReadResult = CodingHistoryRecord;
|
|
2986
|
+
var CodingItemFullParams = z33.strictObject({
|
|
2987
|
+
provider: CodingProviderName,
|
|
2988
|
+
provider_session_id: SessionKey,
|
|
2989
|
+
item_id: z33.string().min(1).max(200)
|
|
2990
|
+
});
|
|
2991
|
+
var CodingItemFullResult = z33.strictObject({ output: z33.string(), bytes: nonNegInt });
|
|
2992
|
+
var CodingActivityParams = z33.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
2993
|
+
var CodingActivityResult = z33.strictObject({ active: CodingActiveElsewhere.nullable() });
|
|
2994
|
+
var CodingFoldersRecentParams = z33.strictObject({});
|
|
2995
|
+
var CodingFoldersRecentResult = z33.strictObject({ folders: z33.array(CodingRecentFolder).max(100) });
|
|
2996
|
+
var CodingFoldersCheckParams = z33.strictObject({ path: z33.string().min(1).max(4096) });
|
|
2997
|
+
var CodingFoldersCheckResult = CodingFolderCheck;
|
|
2998
|
+
var CodingFoldersCreateParams = z33.strictObject({ path: z33.string().min(1).max(4096) });
|
|
2999
|
+
var CodingFoldersCreateResult = CodingFolderCheck;
|
|
3000
|
+
var CodingStartParams = z33.strictObject({
|
|
3001
|
+
provider: CodingProviderName,
|
|
3002
|
+
cwd: z33.string().min(1).max(4096),
|
|
3003
|
+
prompt: z33.string().min(1).max(1048576),
|
|
3004
|
+
model: z33.string().min(1).max(200).optional(),
|
|
3005
|
+
effort: z33.string().min(1).max(40).optional(),
|
|
3006
|
+
agent: CodingAgentSelectionParams.optional(),
|
|
3007
|
+
/** One of the person's coding accounts on this computer (Accounts); absent = the default login. */
|
|
3008
|
+
account_profile_id: z33.string().min(1).max(64).optional(),
|
|
3009
|
+
client_request_id: CodingClientRequestId
|
|
3010
|
+
});
|
|
3011
|
+
var CodingStartResult = CodingSendResult;
|
|
3012
|
+
var CodingTakeoverParams = z33.strictObject({
|
|
3013
|
+
provider: CodingProviderName,
|
|
3014
|
+
provider_session_id: SessionKey,
|
|
3015
|
+
cwd: z33.string().min(1).max(4096),
|
|
3016
|
+
title: z33.string().max(500).optional(),
|
|
3017
|
+
agent: CodingAgentSelectionParams.optional(),
|
|
3018
|
+
confirm_elsewhere: z33.boolean().optional()
|
|
3019
|
+
});
|
|
3020
|
+
var CodingTakeoverResult = z33.strictObject({ session: CodingSessionRecord });
|
|
3021
|
+
var CodingSendParams = z33.strictObject({
|
|
3022
|
+
session_id: SessionKey,
|
|
3023
|
+
prompt: z33.string().min(1).max(1048576),
|
|
3024
|
+
client_request_id: CodingClientRequestId
|
|
3025
|
+
});
|
|
3026
|
+
var CodingStopParams = z33.strictObject({ run_id: z33.string().min(1).max(64) });
|
|
3027
|
+
var CodingStopResult = z33.strictObject({ run: CodingRunRecord.nullable() });
|
|
3028
|
+
var CodingStopElsewhereParams = z33.strictObject({
|
|
3029
|
+
provider: CodingProviderName,
|
|
3030
|
+
provider_session_id: SessionKey,
|
|
3031
|
+
pid: z33.int().min(1)
|
|
3032
|
+
});
|
|
3033
|
+
var CodingStopElsewhereResult = z33.strictObject({ stopped: z33.boolean(), message: ShortText });
|
|
3034
|
+
var CodingOptionsSetParams = z33.strictObject({
|
|
3035
|
+
session_id: SessionKey,
|
|
3036
|
+
model: z33.string().max(200).optional(),
|
|
3037
|
+
effort: z33.string().max(40).optional()
|
|
3038
|
+
});
|
|
3039
|
+
var CodingOptionsSetResult = z33.strictObject({ session: CodingSessionRecord });
|
|
3040
|
+
var CodingAgentSetParams = z33.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });
|
|
3041
|
+
var CodingAgentSetResult = z33.strictObject({ session: CodingSessionRecord });
|
|
3042
|
+
var CodingAgentsAccessParams = z33.strictObject({});
|
|
3043
|
+
var CodingAgentsAccessResult = z33.strictObject({
|
|
3044
|
+
signedIn: z33.boolean(),
|
|
3045
|
+
userId: z33.string().max(64).nullable(),
|
|
3046
|
+
organizationId: z33.string().max(64).nullable(),
|
|
3047
|
+
configured: z33.boolean()
|
|
3048
|
+
});
|
|
3049
|
+
var CodingTitlesStatusParams = z33.strictObject({});
|
|
3050
|
+
var CodingTitlesStatusResult = CodingTitleStatus;
|
|
3051
|
+
var CodingPrefsListParams = z33.strictObject({});
|
|
3052
|
+
var CodingPrefsListResult = z33.strictObject({ preferences: z33.record(z33.string().max(200), CodingChatPreference) });
|
|
3053
|
+
var CodingPrefsSetParams = z33.strictObject({
|
|
3054
|
+
key: z33.string().min(1).max(200),
|
|
3055
|
+
title: z33.string().min(1).max(500).optional(),
|
|
3056
|
+
clear_title: z33.boolean().optional(),
|
|
3057
|
+
pinned: z33.boolean().optional(),
|
|
3058
|
+
hidden: z33.boolean().optional()
|
|
3059
|
+
});
|
|
3060
|
+
var CodingPrefsSetResult = CodingPrefsListResult;
|
|
3061
|
+
var CodingRecentSeenParams = z33.strictObject({ target: z33.string().min(3).max(200) });
|
|
3062
|
+
var CodingRecentSeenResult = z33.strictObject({ recent: z33.array(CodingRecentRow) });
|
|
3063
|
+
var CodingSearchParams = z33.strictObject({
|
|
3064
|
+
query: z33.string().min(1).max(500),
|
|
3065
|
+
cursor: nonNegInt.optional(),
|
|
3066
|
+
limit: z33.int().min(1).max(100).optional()
|
|
3067
|
+
});
|
|
3068
|
+
var CodingSearchResult = z33.strictObject({
|
|
3069
|
+
query: z33.string().max(500),
|
|
3070
|
+
hits: z33.array(
|
|
3071
|
+
z33.strictObject({
|
|
3072
|
+
provider: CodingProviderName,
|
|
3073
|
+
providerSessionId: SessionKey,
|
|
3074
|
+
title: z33.string().max(500),
|
|
3075
|
+
cwd: LocalPath.nullable(),
|
|
3076
|
+
updatedAt: IsoTime,
|
|
3077
|
+
where: z33.enum(["title", "content"]),
|
|
3078
|
+
snippet: z33.string().max(2e3).nullable()
|
|
3079
|
+
})
|
|
3080
|
+
),
|
|
3081
|
+
scanned: nonNegInt,
|
|
3082
|
+
total: nonNegInt,
|
|
3083
|
+
nextCursor: nonNegInt.nullable()
|
|
3084
|
+
});
|
|
3085
|
+
var CodingReconcileParams = z33.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
3086
|
+
var CodingReconcileResult = z33.strictObject({
|
|
3087
|
+
state: z33.enum(["done", "blocked", "nothing_to_do"]),
|
|
3088
|
+
summary: z33.string().max(400)
|
|
3089
|
+
});
|
|
3090
|
+
var CodingTranscriptRawParams = z33.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });
|
|
3091
|
+
var CodingTranscriptRawResult = z33.strictObject({
|
|
3092
|
+
available: z33.boolean(),
|
|
3093
|
+
reason: ShortText.nullable(),
|
|
3094
|
+
file_name: z33.string().max(300).nullable(),
|
|
3095
|
+
bytes: nonNegInt,
|
|
3096
|
+
/** The opt-in cloud backup was refreshed (false: off, unchanged, or signed out). */
|
|
3097
|
+
backup_refreshed: z33.boolean(),
|
|
3098
|
+
/** Subagent transcripts beside the chat (Claude Code), downloaded separately. */
|
|
3099
|
+
subagents: nonNegInt
|
|
3100
|
+
});
|
|
3101
|
+
var CodingWatchParams = z33.strictObject({});
|
|
3102
|
+
var CodingWatchResult = z33.strictObject({ resource_id: ResourceId });
|
|
3103
|
+
var CodingSessionWatchParams = z33.strictObject({ session_id: SessionKey, since_seq: nonNegInt.optional() });
|
|
3104
|
+
var CodingSessionWatchResult = z33.strictObject({
|
|
3105
|
+
resource_id: ResourceId,
|
|
3106
|
+
/** The newest item seq the device has for this session right now. */
|
|
3107
|
+
seq: nonNegInt
|
|
3108
|
+
});
|
|
3109
|
+
var CodingChangedEvent = z33.discriminatedUnion("kind", [
|
|
3110
|
+
z33.strictObject({ kind: z33.literal("session"), session: CodingSessionRecord }),
|
|
3111
|
+
z33.strictObject({ kind: z33.literal("run"), run: CodingRunRecord }),
|
|
3112
|
+
z33.strictObject({ kind: z33.literal("preferences"), preferences: z33.record(z33.string().max(200), CodingChatPreference) }),
|
|
3113
|
+
z33.strictObject({ kind: z33.literal("titles") }),
|
|
3114
|
+
z33.strictObject({ kind: z33.literal("recent"), recent: z33.array(CodingRecentRow) })
|
|
3115
|
+
]);
|
|
3116
|
+
var CodingWatchStateEvent = z33.strictObject({ live: z33.boolean(), reason: ShortText.nullable(), beat_ms: z33.int().min(1e3) });
|
|
3117
|
+
var CodingItemEvent = z33.strictObject({
|
|
3118
|
+
session_id: SessionKey,
|
|
3119
|
+
run_id: z33.string().min(1).max(64),
|
|
3120
|
+
seq: nonNegInt,
|
|
3121
|
+
item: CodingTranscriptItem
|
|
3122
|
+
});
|
|
3123
|
+
var CodingGapEvent = z33.strictObject({ session_id: SessionKey, since_seq: nonNegInt, seq: nonNegInt });
|
|
3124
|
+
var SessionIdentifyParams = z33.strictObject({ label: z33.string().min(1).max(60) });
|
|
3125
|
+
var SessionIdentifyResult = z33.strictObject({ label: z33.string().max(60) });
|
|
3126
|
+
|
|
3127
|
+
// src/schema/browser.ts
|
|
3128
|
+
import { z as z34 } from "zod";
|
|
3129
|
+
var BrowserClientInstance = z34.string().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/);
|
|
3130
|
+
var BrowserKind = z34.enum(["chrome", "edge", "brave", "arc", "opera", "vivaldi", "chromium", "firefox", "other"]);
|
|
3131
|
+
var BrowserSessionState = z34.enum(["connected", "different_account", "extension_signed_out", "device_signed_out", "unverified"]);
|
|
3132
|
+
var BrowserSession = z34.strictObject({
|
|
2689
3133
|
client_instance: BrowserClientInstance,
|
|
2690
3134
|
/** What the person sees ("Chrome — Work"), set by the extension. */
|
|
2691
|
-
client_label:
|
|
3135
|
+
client_label: z34.string().min(1).max(128),
|
|
2692
3136
|
browser: BrowserKind,
|
|
2693
|
-
extension_version:
|
|
3137
|
+
extension_version: z34.string().min(1).max(32),
|
|
2694
3138
|
state: BrowserSessionState,
|
|
2695
3139
|
/** True only for `connected`: an agent's call can reach this session. */
|
|
2696
|
-
routable:
|
|
3140
|
+
routable: z34.boolean(),
|
|
2697
3141
|
/** The extension's account email from its token (null when signed out or unknown). */
|
|
2698
|
-
account_email:
|
|
3142
|
+
account_email: z34.string().max(320).nullable(),
|
|
2699
3143
|
connected_at_ms: epochMs,
|
|
2700
3144
|
last_call_at_ms: epochMs.nullable(),
|
|
2701
3145
|
calls: nonNegInt,
|
|
@@ -2704,119 +3148,119 @@ var BrowserSession = z33.strictObject({
|
|
|
2704
3148
|
p50_ms: nonNegInt.nullable(),
|
|
2705
3149
|
p95_ms: nonNegInt.nullable(),
|
|
2706
3150
|
/** A call is waiting for the person to confirm it in the browser. */
|
|
2707
|
-
awaiting_confirmation:
|
|
3151
|
+
awaiting_confirmation: z34.boolean()
|
|
2708
3152
|
});
|
|
2709
|
-
var BrowserRegisterParams =
|
|
3153
|
+
var BrowserRegisterParams = z34.strictObject({
|
|
2710
3154
|
client_instance: BrowserClientInstance,
|
|
2711
|
-
client_label:
|
|
3155
|
+
client_label: z34.string().min(1).max(128),
|
|
2712
3156
|
browser: BrowserKind,
|
|
2713
|
-
extension_version:
|
|
3157
|
+
extension_version: z34.string().min(1).max(32),
|
|
2714
3158
|
/** The extension's current AI Matrx access token, checked against the device owner; null when signed out. */
|
|
2715
|
-
account_token:
|
|
3159
|
+
account_token: z34.string().min(16).max(8192).nullable()
|
|
2716
3160
|
});
|
|
2717
|
-
var BrowserRegisterResult =
|
|
2718
|
-
var BrowserCallError =
|
|
2719
|
-
message:
|
|
3161
|
+
var BrowserRegisterResult = z34.strictObject({ session: BrowserSession });
|
|
3162
|
+
var BrowserCallError = z34.strictObject({
|
|
3163
|
+
message: z34.string().max(1e3),
|
|
2720
3164
|
/** The extension's own error code, when it has one ("tool_not_found", "denied"). */
|
|
2721
|
-
code:
|
|
3165
|
+
code: z34.string().max(64).nullable()
|
|
2722
3166
|
});
|
|
2723
|
-
var BrowserResultParams =
|
|
2724
|
-
call_id:
|
|
2725
|
-
ok:
|
|
3167
|
+
var BrowserResultParams = z34.strictObject({
|
|
3168
|
+
call_id: z34.string().min(1).max(64),
|
|
3169
|
+
ok: z34.boolean(),
|
|
2726
3170
|
/** The tool's result when ok (any JSON). */
|
|
2727
|
-
result:
|
|
3171
|
+
result: z34.unknown(),
|
|
2728
3172
|
error: BrowserCallError.nullable()
|
|
2729
3173
|
});
|
|
2730
|
-
var BrowserResultResult =
|
|
2731
|
-
var BrowserCallPhase =
|
|
2732
|
-
var BrowserProgressParams =
|
|
2733
|
-
var BrowserProgressResult =
|
|
2734
|
-
var BrowserSessionsParams =
|
|
2735
|
-
var BrowserSessionsResult =
|
|
3174
|
+
var BrowserResultResult = z34.strictObject({ accepted: z34.boolean() });
|
|
3175
|
+
var BrowserCallPhase = z34.enum(["awaiting_confirmation", "running"]);
|
|
3176
|
+
var BrowserProgressParams = z34.strictObject({ call_id: z34.string().min(1).max(64), phase: BrowserCallPhase });
|
|
3177
|
+
var BrowserProgressResult = z34.strictObject({ accepted: z34.boolean() });
|
|
3178
|
+
var BrowserSessionsParams = z34.strictObject({});
|
|
3179
|
+
var BrowserSessionsResult = z34.strictObject({
|
|
2736
3180
|
/** The person's Browser connection switch. Off: no pairing, no extension sessions. */
|
|
2737
|
-
enabled:
|
|
3181
|
+
enabled: z34.boolean(),
|
|
2738
3182
|
/** Whether Matrx 2 is signed in (without an owner no session is routable). */
|
|
2739
|
-
owner_signed_in:
|
|
2740
|
-
sessions:
|
|
2741
|
-
});
|
|
2742
|
-
var BrowserDisconnectParams =
|
|
2743
|
-
var BrowserDisconnectResult =
|
|
2744
|
-
var BrowserSetEnabledParams =
|
|
2745
|
-
var BrowserSetEnabledResult =
|
|
2746
|
-
var BrowserPairCodeParams =
|
|
2747
|
-
var BrowserPairCodeResult =
|
|
2748
|
-
var BrowserPairResetParams =
|
|
2749
|
-
var BrowserCallParams =
|
|
2750
|
-
tool:
|
|
2751
|
-
args:
|
|
3183
|
+
owner_signed_in: z34.boolean(),
|
|
3184
|
+
sessions: z34.array(BrowserSession).max(64)
|
|
3185
|
+
});
|
|
3186
|
+
var BrowserDisconnectParams = z34.strictObject({ client_instance: BrowserClientInstance });
|
|
3187
|
+
var BrowserDisconnectResult = z34.strictObject({ disconnected: z34.boolean() });
|
|
3188
|
+
var BrowserSetEnabledParams = z34.strictObject({ enabled: z34.boolean() });
|
|
3189
|
+
var BrowserSetEnabledResult = z34.strictObject({ enabled: z34.boolean() });
|
|
3190
|
+
var BrowserPairCodeParams = z34.strictObject({});
|
|
3191
|
+
var BrowserPairCodeResult = z34.strictObject({ code: z34.string().min(16).max(128) });
|
|
3192
|
+
var BrowserPairResetParams = z34.strictObject({});
|
|
3193
|
+
var BrowserCallParams = z34.strictObject({
|
|
3194
|
+
tool: z34.string().min(1).max(96).regex(/^[a-z][a-z0-9_]*$/),
|
|
3195
|
+
args: z34.record(z34.string(), z34.unknown()),
|
|
2752
3196
|
/** Which session; default: the most recently active routable one (BROWSER ambiguity → CONFLICT). */
|
|
2753
3197
|
client_instance: BrowserClientInstance.optional(),
|
|
2754
3198
|
/** How long to wait, including a person's confirmation; default 120 s. */
|
|
2755
|
-
timeout_ms:
|
|
3199
|
+
timeout_ms: z34.int().min(1e3).max(6e5).optional()
|
|
2756
3200
|
});
|
|
2757
|
-
var BrowserCallResult =
|
|
3201
|
+
var BrowserCallResult = z34.strictObject({
|
|
2758
3202
|
client_instance: BrowserClientInstance,
|
|
2759
|
-
result:
|
|
3203
|
+
result: z34.unknown(),
|
|
2760
3204
|
duration_ms: nonNegInt
|
|
2761
3205
|
});
|
|
2762
|
-
var BrowserToolMetricsParams =
|
|
2763
|
-
var BrowserToolMetric =
|
|
2764
|
-
tool:
|
|
3206
|
+
var BrowserToolMetricsParams = z34.strictObject({ client_instance: BrowserClientInstance });
|
|
3207
|
+
var BrowserToolMetric = z34.strictObject({
|
|
3208
|
+
tool: z34.string().max(256),
|
|
2765
3209
|
calls: nonNegInt,
|
|
2766
3210
|
errors: nonNegInt,
|
|
2767
3211
|
/** Over the last 200 answered calls; null before the first answer. */
|
|
2768
3212
|
p50_ms: nonNegInt.nullable(),
|
|
2769
3213
|
p95_ms: nonNegInt.nullable(),
|
|
2770
3214
|
last_call_at_ms: epochMs.nullable(),
|
|
2771
|
-
last_error:
|
|
3215
|
+
last_error: z34.string().max(2048).nullable()
|
|
2772
3216
|
});
|
|
2773
|
-
var BrowserToolMetricsResult =
|
|
2774
|
-
var BrowserResetCountersParams =
|
|
2775
|
-
var BrowserResetCountersResult =
|
|
2776
|
-
var BrowserLogParams =
|
|
3217
|
+
var BrowserToolMetricsResult = z34.strictObject({ client_instance: z34.string(), tools: z34.array(BrowserToolMetric) });
|
|
3218
|
+
var BrowserResetCountersParams = z34.strictObject({ client_instance: BrowserClientInstance });
|
|
3219
|
+
var BrowserResetCountersResult = z34.strictObject({ reset: z34.boolean() });
|
|
3220
|
+
var BrowserLogParams = z34.strictObject({
|
|
2777
3221
|
/** Only messages after this seq (0: from the oldest kept; the core keeps the last 500). */
|
|
2778
3222
|
after_seq: nonNegInt.default(0),
|
|
2779
|
-
limit:
|
|
3223
|
+
limit: z34.int().min(1).max(500).default(500)
|
|
2780
3224
|
});
|
|
2781
|
-
var BrowserLogMessage =
|
|
3225
|
+
var BrowserLogMessage = z34.strictObject({
|
|
2782
3226
|
seq: nonNegInt,
|
|
2783
3227
|
at_ms: epochMs,
|
|
2784
|
-
direction:
|
|
2785
|
-
client_instance:
|
|
2786
|
-
kind:
|
|
2787
|
-
tool:
|
|
2788
|
-
call_id:
|
|
2789
|
-
ok:
|
|
2790
|
-
detail:
|
|
2791
|
-
});
|
|
2792
|
-
var BrowserLogResult =
|
|
2793
|
-
messages:
|
|
3228
|
+
direction: z34.enum(["to_browser", "from_browser", "core"]),
|
|
3229
|
+
client_instance: z34.string(),
|
|
3230
|
+
kind: z34.enum(["register", "invoke", "result", "progress", "timeout", "closed"]),
|
|
3231
|
+
tool: z34.string().nullable(),
|
|
3232
|
+
call_id: z34.string().nullable(),
|
|
3233
|
+
ok: z34.boolean().nullable(),
|
|
3234
|
+
detail: z34.string().max(1024)
|
|
3235
|
+
});
|
|
3236
|
+
var BrowserLogResult = z34.strictObject({
|
|
3237
|
+
messages: z34.array(BrowserLogMessage),
|
|
2794
3238
|
/** The newest seq the core has written (pass it back as after_seq to follow the log). */
|
|
2795
3239
|
last_seq: nonNegInt
|
|
2796
3240
|
});
|
|
2797
|
-
var BrowserInvokeEvent =
|
|
2798
|
-
call_id:
|
|
2799
|
-
tool:
|
|
2800
|
-
args:
|
|
3241
|
+
var BrowserInvokeEvent = z34.strictObject({
|
|
3242
|
+
call_id: z34.string().min(1).max(64),
|
|
3243
|
+
tool: z34.string().min(1).max(96),
|
|
3244
|
+
args: z34.record(z34.string(), z34.unknown()),
|
|
2801
3245
|
deadline_ms: epochMs
|
|
2802
3246
|
});
|
|
2803
|
-
var BrowserSessionsChangedEvent =
|
|
2804
|
-
var BrowserProgressEvent =
|
|
2805
|
-
call_id:
|
|
3247
|
+
var BrowserSessionsChangedEvent = z34.strictObject({ count: nonNegInt, enabled: z34.boolean() });
|
|
3248
|
+
var BrowserProgressEvent = z34.strictObject({
|
|
3249
|
+
call_id: z34.string().min(1).max(64),
|
|
2806
3250
|
client_instance: BrowserClientInstance,
|
|
2807
3251
|
phase: BrowserCallPhase
|
|
2808
3252
|
});
|
|
2809
|
-
var DesktopHealth =
|
|
2810
|
-
status:
|
|
2811
|
-
service:
|
|
2812
|
-
version:
|
|
2813
|
-
protocol_version:
|
|
2814
|
-
ws_path:
|
|
2815
|
-
device_id:
|
|
2816
|
-
browser_connection:
|
|
2817
|
-
});
|
|
2818
|
-
var BrowserPairRequest =
|
|
2819
|
-
var BrowserPairResult =
|
|
3253
|
+
var DesktopHealth = z34.strictObject({
|
|
3254
|
+
status: z34.literal("ok"),
|
|
3255
|
+
service: z34.literal("matrx-desktop"),
|
|
3256
|
+
version: z34.string().max(32),
|
|
3257
|
+
protocol_version: z34.string().max(16),
|
|
3258
|
+
ws_path: z34.literal("/v1/connect"),
|
|
3259
|
+
device_id: z34.string().max(64),
|
|
3260
|
+
browser_connection: z34.enum(["on", "off"])
|
|
3261
|
+
});
|
|
3262
|
+
var BrowserPairRequest = z34.strictObject({ client_instance: BrowserClientInstance });
|
|
3263
|
+
var BrowserPairResult = z34.strictObject({ pair_token: z34.string().min(16).max(128), ws_path: z34.literal("/v1/connect") });
|
|
2820
3264
|
var MATRX_EXTENSION_IDS = {
|
|
2821
3265
|
store: "hnfolienncfklkgmdjjmhhegglimlamg",
|
|
2822
3266
|
development: "cihdmkcdjjckfhjpgoedmgfpoljebaml"
|
|
@@ -2824,572 +3268,572 @@ var MATRX_EXTENSION_IDS = {
|
|
|
2824
3268
|
var DISCOVERY_FILE = { live: "matrx2.json", development: "matrx2-dev.json" };
|
|
2825
3269
|
|
|
2826
3270
|
// src/schema/net.ts
|
|
2827
|
-
import { z as
|
|
2828
|
-
var NetInfoParams =
|
|
2829
|
-
var NetAddress =
|
|
2830
|
-
address:
|
|
2831
|
-
family:
|
|
2832
|
-
netmask:
|
|
3271
|
+
import { z as z35 } from "zod";
|
|
3272
|
+
var NetInfoParams = z35.strictObject({});
|
|
3273
|
+
var NetAddress = z35.strictObject({
|
|
3274
|
+
address: z35.string(),
|
|
3275
|
+
family: z35.enum(["ipv4", "ipv6"]),
|
|
3276
|
+
netmask: z35.string().nullable(),
|
|
2833
3277
|
/** CIDR form ("192.168.1.20/24"); null where the OS gives no prefix. */
|
|
2834
|
-
cidr:
|
|
3278
|
+
cidr: z35.string().nullable()
|
|
2835
3279
|
});
|
|
2836
|
-
var NetInterface =
|
|
2837
|
-
name:
|
|
2838
|
-
mac:
|
|
3280
|
+
var NetInterface = z35.strictObject({
|
|
3281
|
+
name: z35.string(),
|
|
3282
|
+
mac: z35.string().nullable(),
|
|
2839
3283
|
/** Loopback and other internal interfaces. */
|
|
2840
|
-
internal:
|
|
2841
|
-
addresses:
|
|
3284
|
+
internal: z35.boolean(),
|
|
3285
|
+
addresses: z35.array(NetAddress)
|
|
2842
3286
|
});
|
|
2843
|
-
var NetInfoResult =
|
|
2844
|
-
hostname:
|
|
2845
|
-
interfaces:
|
|
3287
|
+
var NetInfoResult = z35.strictObject({
|
|
3288
|
+
hostname: z35.string(),
|
|
3289
|
+
interfaces: z35.array(NetInterface),
|
|
2846
3290
|
/** The default route's gateway; null when the OS does not say (or there is none). */
|
|
2847
|
-
gateway:
|
|
3291
|
+
gateway: z35.string().nullable(),
|
|
2848
3292
|
/** The DNS servers the OS uses; empty when it does not say. */
|
|
2849
|
-
dns:
|
|
3293
|
+
dns: z35.array(z35.string())
|
|
2850
3294
|
});
|
|
2851
|
-
var NetWifiParams =
|
|
2852
|
-
var NetWifiNetwork =
|
|
3295
|
+
var NetWifiParams = z35.strictObject({});
|
|
3296
|
+
var NetWifiNetwork = z35.strictObject({
|
|
2853
3297
|
/** null: the OS hides the name (macOS without Location Services for this app). */
|
|
2854
|
-
ssid:
|
|
3298
|
+
ssid: z35.string().nullable(),
|
|
2855
3299
|
/** dBm; null where the OS does not say. */
|
|
2856
|
-
rssi:
|
|
2857
|
-
channel:
|
|
2858
|
-
security:
|
|
3300
|
+
rssi: z35.int().nullable(),
|
|
3301
|
+
channel: z35.string().nullable(),
|
|
3302
|
+
security: z35.string().nullable()
|
|
2859
3303
|
});
|
|
2860
|
-
var NetWifiResult =
|
|
3304
|
+
var NetWifiResult = z35.strictObject({
|
|
2861
3305
|
/** Whether the computer has a Wi-Fi interface at all. */
|
|
2862
|
-
available:
|
|
3306
|
+
available: z35.boolean(),
|
|
2863
3307
|
/** The network the computer is on; null when it is on none. */
|
|
2864
3308
|
current: NetWifiNetwork.nullable(),
|
|
2865
3309
|
/** Networks in range (may be empty where the OS lists none to apps). */
|
|
2866
|
-
networks:
|
|
3310
|
+
networks: z35.array(NetWifiNetwork)
|
|
2867
3311
|
});
|
|
2868
|
-
var NetBluetoothParams =
|
|
2869
|
-
var NetBluetoothDevice =
|
|
2870
|
-
name:
|
|
2871
|
-
address:
|
|
2872
|
-
connected:
|
|
3312
|
+
var NetBluetoothParams = z35.strictObject({});
|
|
3313
|
+
var NetBluetoothDevice = z35.strictObject({
|
|
3314
|
+
name: z35.string(),
|
|
3315
|
+
address: z35.string().nullable(),
|
|
3316
|
+
connected: z35.boolean(),
|
|
2873
3317
|
/** What it is, in the OS's words ("Headphones", "Keyboard"); null where it does not say. */
|
|
2874
|
-
kind:
|
|
3318
|
+
kind: z35.string().nullable(),
|
|
2875
3319
|
/** Battery percent, where the OS reports it. */
|
|
2876
|
-
battery:
|
|
3320
|
+
battery: z35.int().min(0).max(100).nullable()
|
|
2877
3321
|
});
|
|
2878
|
-
var NetBluetoothResult =
|
|
3322
|
+
var NetBluetoothResult = z35.strictObject({
|
|
2879
3323
|
/** Bluetooth is on; null where the OS does not say. */
|
|
2880
|
-
powered:
|
|
2881
|
-
devices:
|
|
2882
|
-
});
|
|
2883
|
-
var NetDevicesParams =
|
|
2884
|
-
var NetDevice =
|
|
2885
|
-
ip:
|
|
2886
|
-
mac:
|
|
2887
|
-
interface:
|
|
3324
|
+
powered: z35.boolean().nullable(),
|
|
3325
|
+
devices: z35.array(NetBluetoothDevice)
|
|
3326
|
+
});
|
|
3327
|
+
var NetDevicesParams = z35.strictObject({});
|
|
3328
|
+
var NetDevice = z35.strictObject({
|
|
3329
|
+
ip: z35.string(),
|
|
3330
|
+
mac: z35.string().nullable(),
|
|
3331
|
+
interface: z35.string().nullable(),
|
|
2888
3332
|
/** The name the local network gives it (reverse DNS / mDNS), when the table carries one. */
|
|
2889
|
-
hostname:
|
|
3333
|
+
hostname: z35.string().nullable()
|
|
2890
3334
|
});
|
|
2891
|
-
var NetDevicesResult =
|
|
2892
|
-
var NetMdnsParams =
|
|
3335
|
+
var NetDevicesResult = z35.strictObject({ devices: z35.array(NetDevice) });
|
|
3336
|
+
var NetMdnsParams = z35.strictObject({
|
|
2893
3337
|
/** A service type ("_http._tcp"); absent lists the service types found. */
|
|
2894
|
-
service_type:
|
|
3338
|
+
service_type: z35.string().min(1).max(64).regex(/^_[A-Za-z0-9-]+\._(tcp|udp)$/).optional(),
|
|
2895
3339
|
/** How long to listen. */
|
|
2896
|
-
timeout_s:
|
|
3340
|
+
timeout_s: z35.int().min(1).max(30).default(3)
|
|
2897
3341
|
});
|
|
2898
|
-
var NetMdnsService =
|
|
2899
|
-
name:
|
|
2900
|
-
type:
|
|
2901
|
-
domain:
|
|
2902
|
-
interface:
|
|
3342
|
+
var NetMdnsService = z35.strictObject({
|
|
3343
|
+
name: z35.string(),
|
|
3344
|
+
type: z35.string(),
|
|
3345
|
+
domain: z35.string(),
|
|
3346
|
+
interface: z35.string().nullable()
|
|
2903
3347
|
});
|
|
2904
|
-
var NetMdnsResult =
|
|
2905
|
-
var NetScanParams =
|
|
3348
|
+
var NetMdnsResult = z35.strictObject({ services: z35.array(NetMdnsService) });
|
|
3349
|
+
var NetScanParams = z35.strictObject({
|
|
2906
3350
|
/** A host name or address; a private or loopback address unless `allow_public`. */
|
|
2907
|
-
host:
|
|
2908
|
-
ports:
|
|
2909
|
-
timeout_ms:
|
|
3351
|
+
host: z35.string().min(1).max(253),
|
|
3352
|
+
ports: z35.array(z35.int().min(1).max(65535)).min(1).max(1024),
|
|
3353
|
+
timeout_ms: z35.int().min(50).max(1e4).default(800),
|
|
2910
3354
|
/** Scanning a host on the public internet needs saying so. */
|
|
2911
|
-
allow_public:
|
|
3355
|
+
allow_public: z35.boolean().default(false)
|
|
2912
3356
|
});
|
|
2913
|
-
var NetScanResult =
|
|
2914
|
-
host:
|
|
3357
|
+
var NetScanResult = z35.strictObject({
|
|
3358
|
+
host: z35.string(),
|
|
2915
3359
|
/** The address the host resolved to. */
|
|
2916
|
-
address:
|
|
2917
|
-
open:
|
|
3360
|
+
address: z35.string(),
|
|
3361
|
+
open: z35.array(z35.int().min(1).max(65535)),
|
|
2918
3362
|
closed: nonNegInt,
|
|
2919
3363
|
elapsed_ms: nonNegInt
|
|
2920
3364
|
});
|
|
2921
|
-
var NetDownloadParams =
|
|
2922
|
-
url:
|
|
3365
|
+
var NetDownloadParams = z35.strictObject({
|
|
3366
|
+
url: z35.string().min(1).max(8192).regex(/^https?:\/\//),
|
|
2923
3367
|
/** Where to save it: an absolute path (a folder keeps the URL's file name). */
|
|
2924
3368
|
path: AbsPath,
|
|
2925
|
-
overwrite:
|
|
2926
|
-
timeout_s:
|
|
3369
|
+
overwrite: z35.boolean().default(false),
|
|
3370
|
+
timeout_s: z35.int().min(1).max(3600).default(300),
|
|
2927
3371
|
/** Refuse anything larger. */
|
|
2928
|
-
max_bytes:
|
|
3372
|
+
max_bytes: z35.int().min(1).max(10737418240).default(2147483648)
|
|
2929
3373
|
});
|
|
2930
|
-
var NetDownloadResult =
|
|
2931
|
-
path:
|
|
3374
|
+
var NetDownloadResult = z35.strictObject({
|
|
3375
|
+
path: z35.string(),
|
|
2932
3376
|
bytes: nonNegInt,
|
|
2933
|
-
content_type:
|
|
3377
|
+
content_type: z35.string().nullable(),
|
|
2934
3378
|
/** The final URL after redirects. */
|
|
2935
|
-
url:
|
|
3379
|
+
url: z35.string(),
|
|
2936
3380
|
elapsed_ms: nonNegInt
|
|
2937
3381
|
});
|
|
2938
3382
|
|
|
2939
3383
|
// src/schema/personal.ts
|
|
2940
|
-
import { z as
|
|
2941
|
-
var Text =
|
|
2942
|
-
var AutomationScriptParams =
|
|
3384
|
+
import { z as z36 } from "zod";
|
|
3385
|
+
var Text = z36.string().max(65536);
|
|
3386
|
+
var AutomationScriptParams = z36.strictObject({
|
|
2943
3387
|
/** applescript and jxa: macOS (osascript); powershell: Windows (and pwsh where installed). */
|
|
2944
|
-
language:
|
|
2945
|
-
script:
|
|
2946
|
-
timeout_s:
|
|
2947
|
-
});
|
|
2948
|
-
var AutomationScriptResult =
|
|
2949
|
-
stdout:
|
|
2950
|
-
stderr:
|
|
2951
|
-
exit_code:
|
|
2952
|
-
timed_out:
|
|
3388
|
+
language: z36.enum(["applescript", "jxa", "powershell"]),
|
|
3389
|
+
script: z36.string().min(1).max(262144),
|
|
3390
|
+
timeout_s: z36.int().min(1).max(600).default(60)
|
|
3391
|
+
});
|
|
3392
|
+
var AutomationScriptResult = z36.strictObject({
|
|
3393
|
+
stdout: z36.string(),
|
|
3394
|
+
stderr: z36.string(),
|
|
3395
|
+
exit_code: z36.int(),
|
|
3396
|
+
timed_out: z36.boolean(),
|
|
2953
3397
|
/** stdout or stderr was cut at 1 MiB. */
|
|
2954
|
-
truncated:
|
|
3398
|
+
truncated: z36.boolean(),
|
|
2955
3399
|
elapsed_ms: nonNegInt
|
|
2956
3400
|
});
|
|
2957
|
-
var MailAccountsParams =
|
|
2958
|
-
var MailAccount =
|
|
2959
|
-
var MailAccountsResult =
|
|
2960
|
-
var MailListParams =
|
|
3401
|
+
var MailAccountsParams = z36.strictObject({});
|
|
3402
|
+
var MailAccount = z36.strictObject({ name: z36.string(), emails: z36.array(z36.string()), enabled: z36.boolean() });
|
|
3403
|
+
var MailAccountsResult = z36.strictObject({ accounts: z36.array(MailAccount) });
|
|
3404
|
+
var MailListParams = z36.strictObject({
|
|
2961
3405
|
/** The account's name in Mail; absent: every account. */
|
|
2962
|
-
account:
|
|
3406
|
+
account: z36.string().min(1).max(256).optional(),
|
|
2963
3407
|
/** The mailbox's name ("INBOX", "Sent Messages"). */
|
|
2964
|
-
mailbox:
|
|
2965
|
-
unread_only:
|
|
2966
|
-
limit:
|
|
2967
|
-
});
|
|
2968
|
-
var MailMessage =
|
|
2969
|
-
id:
|
|
2970
|
-
subject:
|
|
2971
|
-
sender:
|
|
3408
|
+
mailbox: z36.string().min(1).max(256).default("INBOX"),
|
|
3409
|
+
unread_only: z36.boolean().default(false),
|
|
3410
|
+
limit: z36.int().min(1).max(200).default(25)
|
|
3411
|
+
});
|
|
3412
|
+
var MailMessage = z36.strictObject({
|
|
3413
|
+
id: z36.string(),
|
|
3414
|
+
subject: z36.string(),
|
|
3415
|
+
sender: z36.string(),
|
|
2972
3416
|
received_at_ms: epochMs.nullable(),
|
|
2973
|
-
read:
|
|
2974
|
-
account:
|
|
2975
|
-
mailbox:
|
|
3417
|
+
read: z36.boolean(),
|
|
3418
|
+
account: z36.string(),
|
|
3419
|
+
mailbox: z36.string(),
|
|
2976
3420
|
/** The first lines of the message's text. */
|
|
2977
|
-
preview:
|
|
3421
|
+
preview: z36.string()
|
|
2978
3422
|
});
|
|
2979
|
-
var MailListResult =
|
|
2980
|
-
var MailSendParams =
|
|
2981
|
-
to:
|
|
2982
|
-
cc:
|
|
2983
|
-
subject:
|
|
3423
|
+
var MailListResult = z36.strictObject({ messages: z36.array(MailMessage) });
|
|
3424
|
+
var MailSendParams = z36.strictObject({
|
|
3425
|
+
to: z36.array(z36.string().min(3).max(320)).min(1).max(50),
|
|
3426
|
+
cc: z36.array(z36.string().min(3).max(320)).max(50).default([]),
|
|
3427
|
+
subject: z36.string().max(998),
|
|
2984
3428
|
body: Text,
|
|
2985
3429
|
/** The sending account's address; absent: Mail's default. */
|
|
2986
|
-
from:
|
|
3430
|
+
from: z36.string().min(3).max(320).optional(),
|
|
2987
3431
|
/** false leaves it open in Mail as a draft for the person to send. */
|
|
2988
|
-
send:
|
|
2989
|
-
});
|
|
2990
|
-
var MailSendResult =
|
|
2991
|
-
var MessagesChatsParams =
|
|
2992
|
-
var MessagesChat =
|
|
2993
|
-
chat_id:
|
|
2994
|
-
name:
|
|
2995
|
-
participants:
|
|
3432
|
+
send: z36.boolean().default(true)
|
|
3433
|
+
});
|
|
3434
|
+
var MailSendResult = z36.strictObject({ sent: z36.boolean() });
|
|
3435
|
+
var MessagesChatsParams = z36.strictObject({ limit: z36.int().min(1).max(200).default(25) });
|
|
3436
|
+
var MessagesChat = z36.strictObject({
|
|
3437
|
+
chat_id: z36.string(),
|
|
3438
|
+
name: z36.string().nullable(),
|
|
3439
|
+
participants: z36.array(z36.string()),
|
|
2996
3440
|
last_message_at_ms: epochMs.nullable(),
|
|
2997
|
-
service:
|
|
3441
|
+
service: z36.string().nullable()
|
|
2998
3442
|
});
|
|
2999
|
-
var MessagesChatsResult =
|
|
3000
|
-
var MessagesListParams =
|
|
3443
|
+
var MessagesChatsResult = z36.strictObject({ chats: z36.array(MessagesChat) });
|
|
3444
|
+
var MessagesListParams = z36.strictObject({
|
|
3001
3445
|
/** One chat (messages.chats' chat_id); absent: the newest across all. */
|
|
3002
|
-
chat_id:
|
|
3003
|
-
limit:
|
|
3004
|
-
});
|
|
3005
|
-
var MessagesMessage =
|
|
3006
|
-
id:
|
|
3007
|
-
chat_id:
|
|
3008
|
-
text:
|
|
3009
|
-
from_me:
|
|
3446
|
+
chat_id: z36.string().min(1).max(512).optional(),
|
|
3447
|
+
limit: z36.int().min(1).max(500).default(50)
|
|
3448
|
+
});
|
|
3449
|
+
var MessagesMessage = z36.strictObject({
|
|
3450
|
+
id: z36.string(),
|
|
3451
|
+
chat_id: z36.string().nullable(),
|
|
3452
|
+
text: z36.string(),
|
|
3453
|
+
from_me: z36.boolean(),
|
|
3010
3454
|
/** The other person's handle (phone or email); null for the person's own messages. */
|
|
3011
|
-
sender:
|
|
3455
|
+
sender: z36.string().nullable(),
|
|
3012
3456
|
sent_at_ms: epochMs.nullable()
|
|
3013
3457
|
});
|
|
3014
|
-
var MessagesListResult =
|
|
3015
|
-
var MessagesSendParams =
|
|
3458
|
+
var MessagesListResult = z36.strictObject({ messages: z36.array(MessagesMessage) });
|
|
3459
|
+
var MessagesSendParams = z36.strictObject({
|
|
3016
3460
|
/** A phone number or email the person can message. */
|
|
3017
|
-
to:
|
|
3018
|
-
text:
|
|
3461
|
+
to: z36.string().min(3).max(320),
|
|
3462
|
+
text: z36.string().min(1).max(2e4)
|
|
3019
3463
|
});
|
|
3020
|
-
var MessagesSendResult =
|
|
3021
|
-
var ContactsSearchParams =
|
|
3464
|
+
var MessagesSendResult = z36.strictObject({ sent: z36.boolean() });
|
|
3465
|
+
var ContactsSearchParams = z36.strictObject({
|
|
3022
3466
|
/** Matched against names, organizations, emails and phone numbers. */
|
|
3023
|
-
query:
|
|
3024
|
-
limit:
|
|
3467
|
+
query: z36.string().min(1).max(256),
|
|
3468
|
+
limit: z36.int().min(1).max(200).default(25)
|
|
3025
3469
|
});
|
|
3026
|
-
var ContactLabeled =
|
|
3027
|
-
var ContactSummary =
|
|
3028
|
-
id:
|
|
3029
|
-
name:
|
|
3030
|
-
organization:
|
|
3031
|
-
emails:
|
|
3032
|
-
phones:
|
|
3033
|
-
});
|
|
3034
|
-
var ContactsSearchResult =
|
|
3035
|
-
var ContactsGetParams =
|
|
3036
|
-
var ContactDetail =
|
|
3037
|
-
id:
|
|
3038
|
-
name:
|
|
3039
|
-
organization:
|
|
3040
|
-
job_title:
|
|
3041
|
-
emails:
|
|
3042
|
-
phones:
|
|
3043
|
-
addresses:
|
|
3044
|
-
birthday:
|
|
3045
|
-
note:
|
|
3046
|
-
});
|
|
3047
|
-
var ContactsGetResult =
|
|
3048
|
-
var CalendarListParams =
|
|
3470
|
+
var ContactLabeled = z36.strictObject({ label: z36.string().nullable(), value: z36.string() });
|
|
3471
|
+
var ContactSummary = z36.strictObject({
|
|
3472
|
+
id: z36.string(),
|
|
3473
|
+
name: z36.string(),
|
|
3474
|
+
organization: z36.string().nullable(),
|
|
3475
|
+
emails: z36.array(ContactLabeled),
|
|
3476
|
+
phones: z36.array(ContactLabeled)
|
|
3477
|
+
});
|
|
3478
|
+
var ContactsSearchResult = z36.strictObject({ contacts: z36.array(ContactSummary) });
|
|
3479
|
+
var ContactsGetParams = z36.strictObject({ id: z36.string().min(1).max(256) });
|
|
3480
|
+
var ContactDetail = z36.strictObject({
|
|
3481
|
+
id: z36.string(),
|
|
3482
|
+
name: z36.string(),
|
|
3483
|
+
organization: z36.string().nullable(),
|
|
3484
|
+
job_title: z36.string().nullable(),
|
|
3485
|
+
emails: z36.array(ContactLabeled),
|
|
3486
|
+
phones: z36.array(ContactLabeled),
|
|
3487
|
+
addresses: z36.array(ContactLabeled),
|
|
3488
|
+
birthday: z36.string().nullable(),
|
|
3489
|
+
note: z36.string().nullable()
|
|
3490
|
+
});
|
|
3491
|
+
var ContactsGetResult = z36.strictObject({ contact: ContactDetail });
|
|
3492
|
+
var CalendarListParams = z36.strictObject({
|
|
3049
3493
|
from_ms: epochMs,
|
|
3050
3494
|
to_ms: epochMs,
|
|
3051
3495
|
/** One calendar's name; absent: every calendar. */
|
|
3052
|
-
calendar:
|
|
3053
|
-
limit:
|
|
3496
|
+
calendar: z36.string().min(1).max(256).optional(),
|
|
3497
|
+
limit: z36.int().min(1).max(500).default(100)
|
|
3054
3498
|
});
|
|
3055
|
-
var CalendarEvent =
|
|
3056
|
-
id:
|
|
3057
|
-
title:
|
|
3499
|
+
var CalendarEvent = z36.strictObject({
|
|
3500
|
+
id: z36.string(),
|
|
3501
|
+
title: z36.string(),
|
|
3058
3502
|
start_ms: epochMs,
|
|
3059
3503
|
end_ms: epochMs,
|
|
3060
|
-
all_day:
|
|
3061
|
-
calendar:
|
|
3062
|
-
location:
|
|
3063
|
-
notes:
|
|
3064
|
-
});
|
|
3065
|
-
var CalendarListResult =
|
|
3066
|
-
var CalendarCreateParams =
|
|
3067
|
-
title:
|
|
3504
|
+
all_day: z36.boolean(),
|
|
3505
|
+
calendar: z36.string(),
|
|
3506
|
+
location: z36.string().nullable(),
|
|
3507
|
+
notes: z36.string().nullable()
|
|
3508
|
+
});
|
|
3509
|
+
var CalendarListResult = z36.strictObject({ events: z36.array(CalendarEvent) });
|
|
3510
|
+
var CalendarCreateParams = z36.strictObject({
|
|
3511
|
+
title: z36.string().min(1).max(1024),
|
|
3068
3512
|
start_ms: epochMs,
|
|
3069
3513
|
end_ms: epochMs,
|
|
3070
|
-
all_day:
|
|
3514
|
+
all_day: z36.boolean().default(false),
|
|
3071
3515
|
/** The calendar's name; absent: the first writable calendar. */
|
|
3072
|
-
calendar:
|
|
3073
|
-
location:
|
|
3516
|
+
calendar: z36.string().min(1).max(256).optional(),
|
|
3517
|
+
location: z36.string().max(1024).optional(),
|
|
3074
3518
|
notes: Text.optional()
|
|
3075
3519
|
});
|
|
3076
|
-
var CalendarCreateResult =
|
|
3077
|
-
var RemindersListParams =
|
|
3520
|
+
var CalendarCreateResult = z36.strictObject({ id: z36.string(), calendar: z36.string() });
|
|
3521
|
+
var RemindersListParams = z36.strictObject({
|
|
3078
3522
|
/** One list's name; absent: every list. */
|
|
3079
|
-
list:
|
|
3080
|
-
include_completed:
|
|
3081
|
-
limit:
|
|
3082
|
-
});
|
|
3083
|
-
var Reminder =
|
|
3084
|
-
id:
|
|
3085
|
-
title:
|
|
3086
|
-
list:
|
|
3523
|
+
list: z36.string().min(1).max(256).optional(),
|
|
3524
|
+
include_completed: z36.boolean().default(false),
|
|
3525
|
+
limit: z36.int().min(1).max(500).default(100)
|
|
3526
|
+
});
|
|
3527
|
+
var Reminder = z36.strictObject({
|
|
3528
|
+
id: z36.string(),
|
|
3529
|
+
title: z36.string(),
|
|
3530
|
+
list: z36.string(),
|
|
3087
3531
|
due_ms: epochMs.nullable(),
|
|
3088
|
-
completed:
|
|
3089
|
-
notes:
|
|
3532
|
+
completed: z36.boolean(),
|
|
3533
|
+
notes: z36.string().nullable()
|
|
3090
3534
|
});
|
|
3091
|
-
var RemindersListResult =
|
|
3092
|
-
var RemindersCreateParams =
|
|
3093
|
-
title:
|
|
3535
|
+
var RemindersListResult = z36.strictObject({ reminders: z36.array(Reminder) });
|
|
3536
|
+
var RemindersCreateParams = z36.strictObject({
|
|
3537
|
+
title: z36.string().min(1).max(1024),
|
|
3094
3538
|
due_ms: epochMs.optional(),
|
|
3095
|
-
list:
|
|
3539
|
+
list: z36.string().min(1).max(256).optional(),
|
|
3096
3540
|
notes: Text.optional()
|
|
3097
3541
|
});
|
|
3098
|
-
var RemindersCreateResult =
|
|
3099
|
-
var PhotosSearchParams =
|
|
3542
|
+
var RemindersCreateResult = z36.strictObject({ id: z36.string(), list: z36.string() });
|
|
3543
|
+
var PhotosSearchParams = z36.strictObject({
|
|
3100
3544
|
/** Matched against file names, titles, descriptions and keywords; absent: the newest. */
|
|
3101
|
-
query:
|
|
3545
|
+
query: z36.string().min(1).max(256).optional(),
|
|
3102
3546
|
from_ms: epochMs.optional(),
|
|
3103
3547
|
to_ms: epochMs.optional(),
|
|
3104
|
-
favorites_only:
|
|
3105
|
-
limit:
|
|
3548
|
+
favorites_only: z36.boolean().default(false),
|
|
3549
|
+
limit: z36.int().min(1).max(200).default(25)
|
|
3106
3550
|
});
|
|
3107
|
-
var Photo =
|
|
3108
|
-
id:
|
|
3109
|
-
filename:
|
|
3551
|
+
var Photo = z36.strictObject({
|
|
3552
|
+
id: z36.string(),
|
|
3553
|
+
filename: z36.string(),
|
|
3110
3554
|
taken_at_ms: epochMs.nullable(),
|
|
3111
3555
|
width: nonNegInt.nullable(),
|
|
3112
3556
|
height: nonNegInt.nullable(),
|
|
3113
|
-
favorite:
|
|
3114
|
-
title:
|
|
3557
|
+
favorite: z36.boolean(),
|
|
3558
|
+
title: z36.string().nullable()
|
|
3115
3559
|
});
|
|
3116
|
-
var PhotosSearchResult =
|
|
3117
|
-
var PhotosGetParams =
|
|
3118
|
-
id:
|
|
3560
|
+
var PhotosSearchResult = z36.strictObject({ photos: z36.array(Photo) });
|
|
3561
|
+
var PhotosGetParams = z36.strictObject({
|
|
3562
|
+
id: z36.string().min(1).max(256),
|
|
3119
3563
|
/** Copy the original into a folder Matrx 2 owns and answer its path (then fs_read or desktop_documents reads it). */
|
|
3120
|
-
export:
|
|
3564
|
+
export: z36.boolean().default(false)
|
|
3121
3565
|
});
|
|
3122
|
-
var PhotosGetResult =
|
|
3123
|
-
var LocationGetParams =
|
|
3124
|
-
var LocationGetResult =
|
|
3125
|
-
latitude:
|
|
3126
|
-
longitude:
|
|
3566
|
+
var PhotosGetResult = z36.strictObject({ photo: Photo, path: z36.string().nullable() });
|
|
3567
|
+
var LocationGetParams = z36.strictObject({ timeout_s: z36.int().min(1).max(60).default(15) });
|
|
3568
|
+
var LocationGetResult = z36.strictObject({
|
|
3569
|
+
latitude: z36.number().min(-90).max(90),
|
|
3570
|
+
longitude: z36.number().min(-180).max(180),
|
|
3127
3571
|
/** Metres; null where the OS does not say. */
|
|
3128
|
-
accuracy_m:
|
|
3572
|
+
accuracy_m: z36.number().min(0).nullable(),
|
|
3129
3573
|
at_ms: epochMs,
|
|
3130
3574
|
/** Who answered: the OS's own location service. */
|
|
3131
|
-
source:
|
|
3575
|
+
source: z36.enum(["corelocation", "windows", "geoclue"])
|
|
3132
3576
|
});
|
|
3133
3577
|
|
|
3134
3578
|
// src/schema/windows.ts
|
|
3135
|
-
import { z as
|
|
3136
|
-
var RegistryKey =
|
|
3137
|
-
var RegistryValueType =
|
|
3138
|
-
var WindowsRegistryReadParams =
|
|
3579
|
+
import { z as z37 } from "zod";
|
|
3580
|
+
var RegistryKey = z37.string().min(6).max(1024).regex(/^(HKLM|HKCU|HKCR|HKU|HKCC|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\.*)?$/);
|
|
3581
|
+
var RegistryValueType = z37.enum(["REG_SZ", "REG_EXPAND_SZ", "REG_MULTI_SZ", "REG_DWORD", "REG_QWORD", "REG_BINARY", "REG_NONE"]);
|
|
3582
|
+
var WindowsRegistryReadParams = z37.strictObject({
|
|
3139
3583
|
key: RegistryKey,
|
|
3140
3584
|
/** One value's name ("" is the key's default value); absent: every value and the subkeys. */
|
|
3141
|
-
name:
|
|
3585
|
+
name: z37.string().max(16383).optional()
|
|
3142
3586
|
});
|
|
3143
|
-
var RegistryValue =
|
|
3144
|
-
var WindowsRegistryReadResult =
|
|
3145
|
-
key:
|
|
3146
|
-
exists:
|
|
3147
|
-
values:
|
|
3148
|
-
subkeys:
|
|
3587
|
+
var RegistryValue = z37.strictObject({ name: z37.string(), type: RegistryValueType, data: z37.string() });
|
|
3588
|
+
var WindowsRegistryReadResult = z37.strictObject({
|
|
3589
|
+
key: z37.string(),
|
|
3590
|
+
exists: z37.boolean(),
|
|
3591
|
+
values: z37.array(RegistryValue),
|
|
3592
|
+
subkeys: z37.array(z37.string())
|
|
3149
3593
|
});
|
|
3150
|
-
var WindowsRegistryWriteParams =
|
|
3594
|
+
var WindowsRegistryWriteParams = z37.strictObject({
|
|
3151
3595
|
key: RegistryKey,
|
|
3152
|
-
name:
|
|
3596
|
+
name: z37.string().max(16383),
|
|
3153
3597
|
type: RegistryValueType.default("REG_SZ"),
|
|
3154
3598
|
/** As reg.exe takes it: text, a number, hex for binary, \\0 between the strings of a multi-string. */
|
|
3155
|
-
data:
|
|
3599
|
+
data: z37.string().max(1048576),
|
|
3156
3600
|
/** Remove the value instead of writing it. */
|
|
3157
|
-
delete:
|
|
3601
|
+
delete: z37.boolean().default(false)
|
|
3158
3602
|
});
|
|
3159
|
-
var WindowsRegistryWriteResult =
|
|
3160
|
-
var WindowsServicesParams =
|
|
3603
|
+
var WindowsRegistryWriteResult = z37.strictObject({ key: z37.string(), name: z37.string(), deleted: z37.boolean() });
|
|
3604
|
+
var WindowsServicesParams = z37.strictObject({
|
|
3161
3605
|
/** Matched against the service's name and display name. */
|
|
3162
|
-
filter:
|
|
3163
|
-
limit:
|
|
3606
|
+
filter: z37.string().min(1).max(256).optional(),
|
|
3607
|
+
limit: z37.int().min(1).max(1e3).default(200)
|
|
3164
3608
|
});
|
|
3165
|
-
var WindowsService =
|
|
3166
|
-
name:
|
|
3167
|
-
display_name:
|
|
3609
|
+
var WindowsService = z37.strictObject({
|
|
3610
|
+
name: z37.string(),
|
|
3611
|
+
display_name: z37.string(),
|
|
3168
3612
|
/** Running, Stopped, Paused… as Windows says it. */
|
|
3169
|
-
status:
|
|
3613
|
+
status: z37.string(),
|
|
3170
3614
|
/** Automatic, Manual, Disabled…; null where Windows does not say. */
|
|
3171
|
-
start_type:
|
|
3615
|
+
start_type: z37.string().nullable()
|
|
3172
3616
|
});
|
|
3173
|
-
var WindowsServicesResult =
|
|
3174
|
-
var WindowsServiceControlParams =
|
|
3175
|
-
name:
|
|
3176
|
-
action:
|
|
3617
|
+
var WindowsServicesResult = z37.strictObject({ services: z37.array(WindowsService) });
|
|
3618
|
+
var WindowsServiceControlParams = z37.strictObject({
|
|
3619
|
+
name: z37.string().min(1).max(256),
|
|
3620
|
+
action: z37.enum(["start", "stop", "restart"])
|
|
3177
3621
|
});
|
|
3178
|
-
var WindowsServiceControlResult =
|
|
3179
|
-
var WindowsEventLogParams =
|
|
3180
|
-
log:
|
|
3622
|
+
var WindowsServiceControlResult = z37.strictObject({ name: z37.string(), status: z37.string() });
|
|
3623
|
+
var WindowsEventLogParams = z37.strictObject({
|
|
3624
|
+
log: z37.string().min(1).max(256).default("System"),
|
|
3181
3625
|
/** Only these levels; absent: all. */
|
|
3182
|
-
levels:
|
|
3626
|
+
levels: z37.array(z37.enum(["critical", "error", "warning", "information", "verbose"])).max(5).optional(),
|
|
3183
3627
|
since_ms: epochMs.optional(),
|
|
3184
|
-
limit:
|
|
3628
|
+
limit: z37.int().min(1).max(500).default(50)
|
|
3185
3629
|
});
|
|
3186
|
-
var WindowsEvent =
|
|
3187
|
-
id:
|
|
3188
|
-
level:
|
|
3189
|
-
source:
|
|
3630
|
+
var WindowsEvent = z37.strictObject({
|
|
3631
|
+
id: z37.int(),
|
|
3632
|
+
level: z37.string(),
|
|
3633
|
+
source: z37.string(),
|
|
3190
3634
|
at_ms: epochMs,
|
|
3191
|
-
message:
|
|
3635
|
+
message: z37.string()
|
|
3192
3636
|
});
|
|
3193
|
-
var WindowsEventLogResult =
|
|
3194
|
-
var WindowsFeaturesParams =
|
|
3195
|
-
var WindowsFeature =
|
|
3196
|
-
var WindowsFeaturesResult =
|
|
3637
|
+
var WindowsEventLogResult = z37.strictObject({ log: z37.string(), events: z37.array(WindowsEvent) });
|
|
3638
|
+
var WindowsFeaturesParams = z37.strictObject({ filter: z37.string().min(1).max(256).optional() });
|
|
3639
|
+
var WindowsFeature = z37.strictObject({ name: z37.string(), state: z37.string() });
|
|
3640
|
+
var WindowsFeaturesResult = z37.strictObject({ features: z37.array(WindowsFeature) });
|
|
3197
3641
|
|
|
3198
3642
|
// src/schema/schedule.ts
|
|
3199
|
-
import { z as
|
|
3200
|
-
var OpRef =
|
|
3201
|
-
var ScheduleCreateParams =
|
|
3202
|
-
name:
|
|
3643
|
+
import { z as z38 } from "zod";
|
|
3644
|
+
var OpRef = z38.string().min(3).max(128).regex(/^[a-z_]+(\.[a-z_]+)+$/);
|
|
3645
|
+
var ScheduleCreateParams = z38.strictObject({
|
|
3646
|
+
name: z38.string().min(1).max(200),
|
|
3203
3647
|
op: OpRef,
|
|
3204
3648
|
/** The op's params, exactly as the op takes them; checked when the task is created. */
|
|
3205
|
-
params:
|
|
3206
|
-
interval_s:
|
|
3649
|
+
params: z38.record(z38.string(), z38.unknown()).default({}),
|
|
3650
|
+
interval_s: z38.int().min(10).max(2592e3),
|
|
3207
3651
|
/** Stop after this many runs; absent: until cancelled. */
|
|
3208
|
-
max_runs:
|
|
3652
|
+
max_runs: z38.int().min(1).max(1e5).optional(),
|
|
3209
3653
|
/** Run once now, before the first interval. */
|
|
3210
|
-
run_now:
|
|
3654
|
+
run_now: z38.boolean().default(false)
|
|
3211
3655
|
});
|
|
3212
|
-
var ScheduleRun =
|
|
3656
|
+
var ScheduleRun = z38.strictObject({
|
|
3213
3657
|
at_ms: epochMs,
|
|
3214
|
-
ok:
|
|
3658
|
+
ok: z38.boolean(),
|
|
3215
3659
|
elapsed_ms: nonNegInt,
|
|
3216
3660
|
/** The error's code and message when the run failed. */
|
|
3217
|
-
error:
|
|
3661
|
+
error: z38.string().nullable(),
|
|
3218
3662
|
/** The start of the answer, as JSON (cut at 4 KiB). */
|
|
3219
|
-
result_preview:
|
|
3663
|
+
result_preview: z38.string().nullable()
|
|
3220
3664
|
});
|
|
3221
|
-
var ScheduledTask =
|
|
3222
|
-
id:
|
|
3223
|
-
name:
|
|
3224
|
-
op:
|
|
3225
|
-
params:
|
|
3665
|
+
var ScheduledTask = z38.strictObject({
|
|
3666
|
+
id: z38.string(),
|
|
3667
|
+
name: z38.string(),
|
|
3668
|
+
op: z38.string(),
|
|
3669
|
+
params: z38.record(z38.string(), z38.unknown()),
|
|
3226
3670
|
interval_s: nonNegInt,
|
|
3227
3671
|
max_runs: nonNegInt.nullable(),
|
|
3228
3672
|
runs: nonNegInt,
|
|
3229
3673
|
created_at_ms: epochMs,
|
|
3230
3674
|
next_run_at_ms: epochMs.nullable(),
|
|
3231
3675
|
/** active, done (ran max_runs), cancelled. */
|
|
3232
|
-
state:
|
|
3676
|
+
state: z38.enum(["active", "done", "cancelled"]),
|
|
3233
3677
|
/** The newest runs, newest first (at most 10). */
|
|
3234
|
-
recent:
|
|
3678
|
+
recent: z38.array(ScheduleRun)
|
|
3235
3679
|
});
|
|
3236
|
-
var ScheduleCreateResult =
|
|
3237
|
-
var ScheduleListParams =
|
|
3238
|
-
var ScheduleListResult =
|
|
3239
|
-
var ScheduleCancelParams =
|
|
3240
|
-
var ScheduleCancelResult =
|
|
3680
|
+
var ScheduleCreateResult = z38.strictObject({ task: ScheduledTask });
|
|
3681
|
+
var ScheduleListParams = z38.strictObject({ include_finished: z38.boolean().default(false) });
|
|
3682
|
+
var ScheduleListResult = z38.strictObject({ tasks: z38.array(ScheduledTask) });
|
|
3683
|
+
var ScheduleCancelParams = z38.strictObject({ id: z38.string().min(1).max(64) });
|
|
3684
|
+
var ScheduleCancelResult = z38.strictObject({ task: ScheduledTask });
|
|
3241
3685
|
|
|
3242
3686
|
// src/schema/notes.ts
|
|
3243
|
-
import { z as
|
|
3244
|
-
var NoteFolder =
|
|
3245
|
-
var NotePath =
|
|
3246
|
-
var NotesFoldersParams =
|
|
3247
|
-
var NotesFolder =
|
|
3248
|
-
var NotesFoldersResult =
|
|
3687
|
+
import { z as z39 } from "zod";
|
|
3688
|
+
var NoteFolder = z39.string().min(1).max(512).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*$/);
|
|
3689
|
+
var NotePath = z39.string().min(4).max(1024).regex(/^[^/\\:*?"<>|][^\\:*?"<>|]*\.md$/);
|
|
3690
|
+
var NotesFoldersParams = z39.strictObject({});
|
|
3691
|
+
var NotesFolder = z39.strictObject({ folder: z39.string(), notes: nonNegInt });
|
|
3692
|
+
var NotesFoldersResult = z39.strictObject({
|
|
3249
3693
|
/** The notes root on this computer. */
|
|
3250
|
-
root:
|
|
3251
|
-
folders:
|
|
3694
|
+
root: z39.string(),
|
|
3695
|
+
folders: z39.array(NotesFolder)
|
|
3252
3696
|
});
|
|
3253
|
-
var NotesListParams =
|
|
3697
|
+
var NotesListParams = z39.strictObject({
|
|
3254
3698
|
folder: NoteFolder.optional(),
|
|
3255
|
-
limit:
|
|
3699
|
+
limit: z39.int().min(1).max(2e3).default(500)
|
|
3256
3700
|
});
|
|
3257
|
-
var NoteEntry =
|
|
3258
|
-
path:
|
|
3259
|
-
label:
|
|
3260
|
-
folder:
|
|
3701
|
+
var NoteEntry = z39.strictObject({
|
|
3702
|
+
path: z39.string(),
|
|
3703
|
+
label: z39.string(),
|
|
3704
|
+
folder: z39.string(),
|
|
3261
3705
|
bytes: nonNegInt,
|
|
3262
3706
|
modified_at_ms: epochMs
|
|
3263
3707
|
});
|
|
3264
|
-
var NotesListResult =
|
|
3265
|
-
var NotesReadParams =
|
|
3266
|
-
var NotesReadResult =
|
|
3267
|
-
path:
|
|
3268
|
-
content:
|
|
3708
|
+
var NotesListResult = z39.strictObject({ root: z39.string(), notes: z39.array(NoteEntry), total: nonNegInt });
|
|
3709
|
+
var NotesReadParams = z39.strictObject({ path: NotePath });
|
|
3710
|
+
var NotesReadResult = z39.strictObject({
|
|
3711
|
+
path: z39.string(),
|
|
3712
|
+
content: z39.string(),
|
|
3269
3713
|
bytes: nonNegInt,
|
|
3270
3714
|
modified_at_ms: epochMs,
|
|
3271
3715
|
/** SHA-256 of the content: pass it back as `if_hash` to write only over this version. */
|
|
3272
|
-
hash:
|
|
3716
|
+
hash: z39.string()
|
|
3273
3717
|
});
|
|
3274
|
-
var NotesWriteParams =
|
|
3718
|
+
var NotesWriteParams = z39.strictObject({
|
|
3275
3719
|
folder: NoteFolder.default("General"),
|
|
3276
3720
|
/** The note's name, without ".md". */
|
|
3277
|
-
label:
|
|
3278
|
-
content:
|
|
3721
|
+
label: z39.string().min(1).max(200).regex(/^[^/\\:*?"<>|]+$/),
|
|
3722
|
+
content: z39.string().max(10485760),
|
|
3279
3723
|
/** Write only when the note is still this version (notes.read's hash); a change since answers CONFLICT. */
|
|
3280
|
-
if_hash:
|
|
3724
|
+
if_hash: z39.string().length(64).optional()
|
|
3281
3725
|
});
|
|
3282
|
-
var NotesWriteResult =
|
|
3283
|
-
var NotesSearchParams =
|
|
3284
|
-
query:
|
|
3285
|
-
limit:
|
|
3726
|
+
var NotesWriteResult = z39.strictObject({ path: z39.string(), bytes: nonNegInt, created: z39.boolean(), hash: z39.string() });
|
|
3727
|
+
var NotesSearchParams = z39.strictObject({
|
|
3728
|
+
query: z39.string().min(1).max(512),
|
|
3729
|
+
limit: z39.int().min(1).max(200).default(50)
|
|
3286
3730
|
});
|
|
3287
|
-
var NotesMatch =
|
|
3288
|
-
path:
|
|
3289
|
-
label:
|
|
3290
|
-
folder:
|
|
3731
|
+
var NotesMatch = z39.strictObject({
|
|
3732
|
+
path: z39.string(),
|
|
3733
|
+
label: z39.string(),
|
|
3734
|
+
folder: z39.string(),
|
|
3291
3735
|
/** The matching lines (at most five), trimmed. */
|
|
3292
|
-
lines:
|
|
3736
|
+
lines: z39.array(z39.string())
|
|
3293
3737
|
});
|
|
3294
|
-
var NotesSearchResult =
|
|
3738
|
+
var NotesSearchResult = z39.strictObject({ matches: z39.array(NotesMatch), total: nonNegInt });
|
|
3295
3739
|
|
|
3296
3740
|
// src/schema/documents.ts
|
|
3297
|
-
import { z as
|
|
3741
|
+
import { z as z40 } from "zod";
|
|
3298
3742
|
var DOCUMENTS_MAX_TEXT_CHARS = 1048576;
|
|
3299
|
-
var DocumentsPdfTextParams =
|
|
3743
|
+
var DocumentsPdfTextParams = z40.strictObject({
|
|
3300
3744
|
path: AbsPath,
|
|
3301
3745
|
/** 1-based, inclusive. */
|
|
3302
|
-
first_page:
|
|
3303
|
-
last_page:
|
|
3304
|
-
max_chars:
|
|
3746
|
+
first_page: z40.int().min(1).optional(),
|
|
3747
|
+
last_page: z40.int().min(1).optional(),
|
|
3748
|
+
max_chars: z40.int().min(1).max(DOCUMENTS_MAX_TEXT_CHARS).default(2e5)
|
|
3305
3749
|
});
|
|
3306
|
-
var DocumentsPdfPage =
|
|
3307
|
-
var DocumentsPdfTextResult =
|
|
3750
|
+
var DocumentsPdfPage = z40.strictObject({ page: z40.int().min(1), text: z40.string() });
|
|
3751
|
+
var DocumentsPdfTextResult = z40.strictObject({
|
|
3308
3752
|
pages: nonNegInt,
|
|
3309
3753
|
/** Each page read, in order (an image-only page has empty text: OCR it). */
|
|
3310
|
-
read:
|
|
3311
|
-
truncated:
|
|
3312
|
-
title:
|
|
3313
|
-
author:
|
|
3754
|
+
read: z40.array(DocumentsPdfPage),
|
|
3755
|
+
truncated: z40.boolean(),
|
|
3756
|
+
title: z40.string().nullable(),
|
|
3757
|
+
author: z40.string().nullable()
|
|
3314
3758
|
});
|
|
3315
|
-
var DocumentsOcrParams =
|
|
3759
|
+
var DocumentsOcrParams = z40.strictObject({
|
|
3316
3760
|
path: AbsPath,
|
|
3317
3761
|
/** BCP-47 language hints ("en-US", "fr-FR"); absent: the OS's own choice. */
|
|
3318
|
-
languages:
|
|
3762
|
+
languages: z40.array(z40.string().min(2).max(16)).max(8).optional(),
|
|
3319
3763
|
/** Faster, less accurate. */
|
|
3320
|
-
fast:
|
|
3764
|
+
fast: z40.boolean().default(false)
|
|
3321
3765
|
});
|
|
3322
|
-
var DocumentsOcrLine =
|
|
3323
|
-
text:
|
|
3766
|
+
var DocumentsOcrLine = z40.strictObject({
|
|
3767
|
+
text: z40.string(),
|
|
3324
3768
|
/** 0–1; null where the engine does not say. */
|
|
3325
|
-
confidence:
|
|
3769
|
+
confidence: z40.number().min(0).max(1).nullable()
|
|
3326
3770
|
});
|
|
3327
|
-
var DocumentsOcrResult =
|
|
3328
|
-
text:
|
|
3329
|
-
lines:
|
|
3330
|
-
truncated:
|
|
3771
|
+
var DocumentsOcrResult = z40.strictObject({
|
|
3772
|
+
text: z40.string(),
|
|
3773
|
+
lines: z40.array(DocumentsOcrLine),
|
|
3774
|
+
truncated: z40.boolean(),
|
|
3331
3775
|
/** Which engine read it ("vision" on macOS, "windows-ocr", "tesseract"). */
|
|
3332
|
-
engine:
|
|
3776
|
+
engine: z40.string()
|
|
3333
3777
|
});
|
|
3334
|
-
var DocumentsImageResizeParams =
|
|
3778
|
+
var DocumentsImageResizeParams = z40.strictObject({
|
|
3335
3779
|
path: AbsPath,
|
|
3336
3780
|
/** Where to write it; absent: next to the original, "<name>-resized.<ext>". */
|
|
3337
3781
|
out_path: AbsPath.optional(),
|
|
3338
3782
|
/** The longest side, kept in proportion; absent: the size stays (a format change only). */
|
|
3339
|
-
max_size:
|
|
3340
|
-
format:
|
|
3341
|
-
overwrite:
|
|
3783
|
+
max_size: z40.int().min(1).max(32768).optional(),
|
|
3784
|
+
format: z40.enum(["png", "jpeg", "tiff", "heic", "bmp", "gif"]).optional(),
|
|
3785
|
+
overwrite: z40.boolean().default(false)
|
|
3342
3786
|
});
|
|
3343
|
-
var DocumentsImageResizeResult =
|
|
3344
|
-
path:
|
|
3787
|
+
var DocumentsImageResizeResult = z40.strictObject({
|
|
3788
|
+
path: z40.string(),
|
|
3345
3789
|
width: nonNegInt,
|
|
3346
3790
|
height: nonNegInt,
|
|
3347
3791
|
bytes: nonNegInt
|
|
3348
3792
|
});
|
|
3349
|
-
var DocumentsParagraph =
|
|
3350
|
-
style:
|
|
3351
|
-
text:
|
|
3793
|
+
var DocumentsParagraph = z40.strictObject({
|
|
3794
|
+
style: z40.enum(["title", "heading1", "heading2", "heading3", "body", "bullet", "numbered", "quote", "code"]).default("body"),
|
|
3795
|
+
text: z40.string().max(1e5)
|
|
3352
3796
|
});
|
|
3353
|
-
var DocumentsSheet =
|
|
3354
|
-
name:
|
|
3797
|
+
var DocumentsSheet = z40.strictObject({
|
|
3798
|
+
name: z40.string().min(1).max(31),
|
|
3355
3799
|
/** Rows of cells; the first row is the header when `header` is true. */
|
|
3356
|
-
rows:
|
|
3357
|
-
header:
|
|
3800
|
+
rows: z40.array(z40.array(z40.union([z40.string().max(32767), z40.number(), z40.boolean(), z40.null()])).max(16384)).max(1e5),
|
|
3801
|
+
header: z40.boolean().default(true)
|
|
3358
3802
|
});
|
|
3359
|
-
var DocumentsOfficeGenerateParams =
|
|
3360
|
-
kind:
|
|
3803
|
+
var DocumentsOfficeGenerateParams = z40.strictObject({
|
|
3804
|
+
kind: z40.enum(["docx", "xlsx"]),
|
|
3361
3805
|
path: AbsPath,
|
|
3362
|
-
title:
|
|
3806
|
+
title: z40.string().max(1024).optional(),
|
|
3363
3807
|
/** docx: the document's paragraphs, in order. */
|
|
3364
|
-
paragraphs:
|
|
3808
|
+
paragraphs: z40.array(DocumentsParagraph).max(5e4).optional(),
|
|
3365
3809
|
/** xlsx: the workbook's sheets, in order. */
|
|
3366
|
-
sheets:
|
|
3367
|
-
overwrite:
|
|
3810
|
+
sheets: z40.array(DocumentsSheet).min(1).max(64).optional(),
|
|
3811
|
+
overwrite: z40.boolean().default(false)
|
|
3368
3812
|
});
|
|
3369
|
-
var DocumentsOfficeGenerateResult =
|
|
3370
|
-
var EntitiesNerParams =
|
|
3371
|
-
text:
|
|
3813
|
+
var DocumentsOfficeGenerateResult = z40.strictObject({ path: z40.string(), bytes: nonNegInt });
|
|
3814
|
+
var EntitiesNerParams = z40.strictObject({
|
|
3815
|
+
text: z40.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
3372
3816
|
/** Which kinds to keep; absent: all three. */
|
|
3373
|
-
labels:
|
|
3817
|
+
labels: z40.array(z40.enum(["person", "place", "organization"])).min(1).max(3).optional()
|
|
3374
3818
|
});
|
|
3375
|
-
var EntitySpan =
|
|
3376
|
-
text:
|
|
3377
|
-
label:
|
|
3819
|
+
var EntitySpan = z40.strictObject({
|
|
3820
|
+
text: z40.string(),
|
|
3821
|
+
label: z40.string(),
|
|
3378
3822
|
/** Character offsets into the text (UTF-16, as JavaScript counts). */
|
|
3379
3823
|
start: nonNegInt,
|
|
3380
3824
|
end: nonNegInt
|
|
3381
3825
|
});
|
|
3382
|
-
var EntitiesNerResult =
|
|
3383
|
-
var PiiKind =
|
|
3384
|
-
var EntitiesPiiParams =
|
|
3385
|
-
text:
|
|
3386
|
-
kinds:
|
|
3826
|
+
var EntitiesNerResult = z40.strictObject({ entities: z40.array(EntitySpan), engine: z40.string() });
|
|
3827
|
+
var PiiKind = z40.enum(["email", "phone", "credit_card", "us_ssn", "iban", "ip_address", "url", "api_key"]);
|
|
3828
|
+
var EntitiesPiiParams = z40.strictObject({
|
|
3829
|
+
text: z40.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),
|
|
3830
|
+
kinds: z40.array(PiiKind).min(1).max(8).optional(),
|
|
3387
3831
|
/** Also answer the text with each finding replaced by its kind ("[email]"). */
|
|
3388
|
-
redact:
|
|
3832
|
+
redact: z40.boolean().default(false)
|
|
3389
3833
|
});
|
|
3390
|
-
var EntitiesPiiResult =
|
|
3391
|
-
findings:
|
|
3392
|
-
redacted:
|
|
3834
|
+
var EntitiesPiiResult = z40.strictObject({
|
|
3835
|
+
findings: z40.array(z40.strictObject({ kind: PiiKind, text: z40.string(), start: nonNegInt, end: nonNegInt })),
|
|
3836
|
+
redacted: z40.string().nullable()
|
|
3393
3837
|
});
|
|
3394
3838
|
|
|
3395
3839
|
// src/schema/registry.ts
|
|
@@ -3523,6 +3967,36 @@ var OPS = {
|
|
|
3523
3967
|
"apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
3524
3968
|
// Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
|
|
3525
3969
|
"coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] },
|
|
3970
|
+
// Code from anywhere (1.38): the coding engine's sessions, read and driven over any transport.
|
|
3971
|
+
"coding.providers": { params: CodingProvidersParams, result: CodingProvidersResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
3972
|
+
"coding.sessions.list": { params: CodingSessionsListParams, result: CodingSessionsListResult, kind: "unary", since: "1.38", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
3973
|
+
"coding.discover": { params: CodingDiscoverParams, result: CodingDiscoverResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
3974
|
+
"coding.runs.list": { params: CodingRunsListParams, result: CodingRunsListResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
3975
|
+
"coding.history": { params: CodingHistoryParams, result: CodingHistoryResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
3976
|
+
"coding.transcript.read": { params: CodingTranscriptReadParams, result: CodingTranscriptReadResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
3977
|
+
"coding.item.full": { params: CodingItemFullParams, result: CodingItemFullResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
|
|
3978
|
+
"coding.activity": { params: CodingActivityParams, result: CodingActivityResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
3979
|
+
"coding.folders.recent": { params: CodingFoldersRecentParams, result: CodingFoldersRecentResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
3980
|
+
"coding.folders.check": { params: CodingFoldersCheckParams, result: CodingFoldersCheckResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
3981
|
+
"coding.folders.create": { params: CodingFoldersCreateParams, result: CodingFoldersCreateResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
3982
|
+
"coding.start": { params: CodingStartParams, result: CodingStartResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "RATE_LIMITED", "INTERNAL"] },
|
|
3983
|
+
"coding.takeover": { params: CodingTakeoverParams, result: CodingTakeoverResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
3984
|
+
"coding.send": { params: CodingSendParams, result: CodingSendResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "RATE_LIMITED", "INTERNAL"] },
|
|
3985
|
+
"coding.stop": { params: CodingStopParams, result: CodingStopResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
3986
|
+
"coding.stop_elsewhere": { params: CodingStopElsewhereParams, result: CodingStopElsewhereResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "CONFLICT", "PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
3987
|
+
"coding.options.set": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "INTERNAL"] },
|
|
3988
|
+
"coding.agent.set": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "AUTH_FORBIDDEN", "INTERNAL"] },
|
|
3989
|
+
"coding.agents.access": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
3990
|
+
"coding.titles.status": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
3991
|
+
"coding.prefs.list": { params: CodingPrefsListParams, result: CodingPrefsListResult, kind: "unary", since: "1.38", errors: ["INTERNAL"] },
|
|
3992
|
+
"coding.prefs.set": { params: CodingPrefsSetParams, result: CodingPrefsSetResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
3993
|
+
"coding.recent.seen": { params: CodingRecentSeenParams, result: CodingRecentSeenResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
3994
|
+
"coding.search": { params: CodingSearchParams, result: CodingSearchResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "TIMEOUT", "INTERNAL"] },
|
|
3995
|
+
"coding.reconcile": { params: CodingReconcileParams, result: CodingReconcileResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "RESOURCE_BUSY", "CANCELLED", "INTERNAL"] },
|
|
3996
|
+
"coding.transcript.raw": { params: CodingTranscriptRawParams, result: CodingTranscriptRawResult, kind: "stream", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "CANCELLED", "INTERNAL"] },
|
|
3997
|
+
"coding.watch": { params: CodingWatchParams, result: CodingWatchResult, kind: "resource", since: "1.38", errors: ["PLATFORM_UNSUPPORTED", "RATE_LIMITED", "INTERNAL"] },
|
|
3998
|
+
"coding.session.watch": { params: CodingSessionWatchParams, result: CodingSessionWatchResult, kind: "resource", since: "1.38", errors: ["INVALID_PARAMS", "NOT_FOUND", "RATE_LIMITED", "INTERNAL"] },
|
|
3999
|
+
"session.identify": { params: SessionIdentifyParams, result: SessionIdentifyResult, kind: "unary", since: "1.38", errors: ["INVALID_PARAMS"] },
|
|
3526
4000
|
// 1.22: git for agents (core `git`, the system git; the cloud sandbox's /git/* set, SPEC 6.1).
|
|
3527
4001
|
"git.status": { params: GitStatusParams, result: GitStatusResult, kind: "unary", since: "1.22", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
|
|
3528
4002
|
"git.diff": { params: GitDiffParams, result: GitDiffResult, kind: "unary", since: "1.22", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
|
|
@@ -3543,6 +4017,10 @@ var OPS = {
|
|
|
3543
4017
|
"account.agents.list": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
|
|
3544
4018
|
"account.vault.list": { params: AccountVaultListParams, result: AccountVaultListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
|
|
3545
4019
|
"account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
4020
|
+
// 1.39: one agent opened (its inputs and what it uses), its runs (mandate.run_history, one agent at a time) and its star.
|
|
4021
|
+
"account.agents.get": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
4022
|
+
"account.agents.runs": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: "unary", since: "1.39", errors: ["INVALID_PARAMS", "INTERNAL"] },
|
|
4023
|
+
"account.agents.favorite": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: "unary", since: "1.39", errors: ["AUTH_REQUIRED", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
|
|
3546
4024
|
// 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
|
|
3547
4025
|
"apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
3548
4026
|
"apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
@@ -3616,6 +4094,10 @@ var EVENTS = {
|
|
|
3616
4094
|
"session.control_changed": SessionControlChangedEvent,
|
|
3617
4095
|
"models.progress": ModelsProgressEvent,
|
|
3618
4096
|
"coding.history.progress": CodingHistoryProgressEvent,
|
|
4097
|
+
"coding.changed": CodingChangedEvent,
|
|
4098
|
+
"coding.watch_state": CodingWatchStateEvent,
|
|
4099
|
+
"coding.item": CodingItemEvent,
|
|
4100
|
+
"coding.gap": CodingGapEvent,
|
|
3619
4101
|
"relay.device_status": RelayDeviceStatusEvent,
|
|
3620
4102
|
"relay.auth_expiring": RelayAuthExpiringEvent,
|
|
3621
4103
|
"diag.errors.changed": DiagErrorsChangedEvent,
|
|
@@ -3790,6 +4272,91 @@ var NAMED_SCHEMAS = {
|
|
|
3790
4272
|
CodingHistoryImportMissingParams,
|
|
3791
4273
|
CodingHistoryImportMissingResult,
|
|
3792
4274
|
CodingHistoryProgressEvent,
|
|
4275
|
+
CodingProviderName,
|
|
4276
|
+
CodingRunStatus,
|
|
4277
|
+
CodingClientRequestId,
|
|
4278
|
+
CodingRunUsage,
|
|
4279
|
+
CodingStartedBy,
|
|
4280
|
+
CodingRunRecord,
|
|
4281
|
+
CodingSessionAgentPart,
|
|
4282
|
+
CodingSessionAgent,
|
|
4283
|
+
CodingSessionRecord,
|
|
4284
|
+
CodingActiveElsewhere,
|
|
4285
|
+
CodingDiscoveredChat,
|
|
4286
|
+
CodingTranscriptItem,
|
|
4287
|
+
CodingHistoryRecord,
|
|
4288
|
+
CodingQuotaWindow,
|
|
4289
|
+
CodingProviderProblem,
|
|
4290
|
+
CodingProviderBinary,
|
|
4291
|
+
CodingProviderStatus,
|
|
4292
|
+
CodingChatPreference,
|
|
4293
|
+
CodingTitleStatus,
|
|
4294
|
+
CodingRecentRow,
|
|
4295
|
+
CodingFolderCheck,
|
|
4296
|
+
CodingRecentFolder,
|
|
4297
|
+
CodingAgentSelectionParams,
|
|
4298
|
+
CodingSendResult,
|
|
4299
|
+
CodingProvidersParams,
|
|
4300
|
+
CodingProvidersResult,
|
|
4301
|
+
CodingSessionsListParams,
|
|
4302
|
+
CodingSessionsListResult,
|
|
4303
|
+
CodingDiscoverParams,
|
|
4304
|
+
CodingDiscoverResult,
|
|
4305
|
+
CodingRunsListParams,
|
|
4306
|
+
CodingRunsListResult,
|
|
4307
|
+
CodingHistoryParams,
|
|
4308
|
+
CodingHistoryResult,
|
|
4309
|
+
CodingTranscriptReadParams,
|
|
4310
|
+
CodingTranscriptReadResult,
|
|
4311
|
+
CodingItemFullParams,
|
|
4312
|
+
CodingItemFullResult,
|
|
4313
|
+
CodingActivityParams,
|
|
4314
|
+
CodingActivityResult,
|
|
4315
|
+
CodingFoldersRecentParams,
|
|
4316
|
+
CodingFoldersRecentResult,
|
|
4317
|
+
CodingFoldersCheckParams,
|
|
4318
|
+
CodingFoldersCheckResult,
|
|
4319
|
+
CodingFoldersCreateParams,
|
|
4320
|
+
CodingFoldersCreateResult,
|
|
4321
|
+
CodingStartParams,
|
|
4322
|
+
CodingStartResult,
|
|
4323
|
+
CodingTakeoverParams,
|
|
4324
|
+
CodingTakeoverResult,
|
|
4325
|
+
CodingSendParams,
|
|
4326
|
+
CodingStopParams,
|
|
4327
|
+
CodingStopResult,
|
|
4328
|
+
CodingStopElsewhereParams,
|
|
4329
|
+
CodingStopElsewhereResult,
|
|
4330
|
+
CodingOptionsSetParams,
|
|
4331
|
+
CodingOptionsSetResult,
|
|
4332
|
+
CodingAgentSetParams,
|
|
4333
|
+
CodingAgentSetResult,
|
|
4334
|
+
CodingAgentsAccessParams,
|
|
4335
|
+
CodingAgentsAccessResult,
|
|
4336
|
+
CodingTitlesStatusParams,
|
|
4337
|
+
CodingTitlesStatusResult,
|
|
4338
|
+
CodingPrefsListParams,
|
|
4339
|
+
CodingPrefsListResult,
|
|
4340
|
+
CodingPrefsSetParams,
|
|
4341
|
+
CodingPrefsSetResult,
|
|
4342
|
+
CodingRecentSeenParams,
|
|
4343
|
+
CodingRecentSeenResult,
|
|
4344
|
+
CodingSearchParams,
|
|
4345
|
+
CodingSearchResult,
|
|
4346
|
+
CodingReconcileParams,
|
|
4347
|
+
CodingReconcileResult,
|
|
4348
|
+
CodingTranscriptRawParams,
|
|
4349
|
+
CodingTranscriptRawResult,
|
|
4350
|
+
CodingWatchParams,
|
|
4351
|
+
CodingWatchResult,
|
|
4352
|
+
CodingSessionWatchParams,
|
|
4353
|
+
CodingSessionWatchResult,
|
|
4354
|
+
SessionIdentifyParams,
|
|
4355
|
+
SessionIdentifyResult,
|
|
4356
|
+
CodingChangedEvent,
|
|
4357
|
+
CodingWatchStateEvent,
|
|
4358
|
+
CodingItemEvent,
|
|
4359
|
+
CodingGapEvent,
|
|
3793
4360
|
ServiceName,
|
|
3794
4361
|
ContractHash,
|
|
3795
4362
|
ServiceToken,
|
|
@@ -4099,6 +4666,17 @@ var NAMED_SCHEMAS = {
|
|
|
4099
4666
|
AccountVaultListResult,
|
|
4100
4667
|
AccountVaultCopyParams,
|
|
4101
4668
|
AccountVaultCopyResult,
|
|
4669
|
+
AccountAgentVariable,
|
|
4670
|
+
AccountAgentDetail,
|
|
4671
|
+
AccountAgentsGetParams,
|
|
4672
|
+
AccountAgentsGetResult,
|
|
4673
|
+
AccountAgentRunStatus,
|
|
4674
|
+
AccountAgentRun,
|
|
4675
|
+
AccountAgentRunSort,
|
|
4676
|
+
AccountAgentsRunsParams,
|
|
4677
|
+
AccountAgentsRunsResult,
|
|
4678
|
+
AccountAgentsFavoriteParams,
|
|
4679
|
+
AccountAgentsFavoriteResult,
|
|
4102
4680
|
AppsWindowsUpdateStateParams,
|
|
4103
4681
|
AppsWindowsUpdateStateResult,
|
|
4104
4682
|
AppsWindowsReopenParams,
|
|
@@ -4283,7 +4861,8 @@ var FIELDS_SINCE = {
|
|
|
4283
4861
|
AppsWindowsUpdateStateResult: { closed_by_update: "1.27" },
|
|
4284
4862
|
AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36" },
|
|
4285
4863
|
AppsProjectsToWindowResult: { pin: "1.32" },
|
|
4286
|
-
AppsChatsTitlesCheckResult: { stale_windows: "1.33" }
|
|
4864
|
+
AppsChatsTitlesCheckResult: { stale_windows: "1.33" },
|
|
4865
|
+
AccountAgent: { tags: "1.39", model_id: "1.39", access_level: "1.39", organization_id: "1.39", origin: "1.39", is_archived: "1.39", orchestra: "1.39" }
|
|
4287
4866
|
};
|
|
4288
4867
|
var NULL_SINCE = {
|
|
4289
4868
|
"RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
|
|
@@ -4359,7 +4938,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
4359
4938
|
["apps.chats.place", [["chat", "ChatRow"]]],
|
|
4360
4939
|
["apps.accounts.usage", [["accounts", "AccountUsage"]]],
|
|
4361
4940
|
["resources.snapshot", [["disks", "ResourcesDisk"]]],
|
|
4362
|
-
["stack.state", [["servers", "StackServer"]]]
|
|
4941
|
+
["stack.state", [["servers", "StackServer"]]],
|
|
4942
|
+
["account.agents.list", [["agents", "AccountAgent"]]]
|
|
4363
4943
|
]);
|
|
4364
4944
|
function stripNested(value, nested, version) {
|
|
4365
4945
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
@@ -4420,7 +5000,7 @@ function forPeer(op, part, value, version) {
|
|
|
4420
5000
|
var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
|
|
4421
5001
|
|
|
4422
5002
|
// src/contract.ts
|
|
4423
|
-
var CONTRACT_SHA256 = "
|
|
5003
|
+
var CONTRACT_SHA256 = "542bc69319741eea52154d413b4fe974ee5a56f7aef351e78b866b0562e82753";
|
|
4424
5004
|
|
|
4425
5005
|
// src/close-policy.ts
|
|
4426
5006
|
var CLOSE_RULES = {
|
|
@@ -4494,6 +5074,10 @@ var TOOL_CATALOG = [
|
|
|
4494
5074
|
{ name: "desktop_location", group: "personal_automation", state: "built", path: "device_op", ops: ["location.get"], platforms: ["darwin", "win32"], summary: "Where the computer is (the OS's location service)" },
|
|
4495
5075
|
{ name: "desktop_net", group: "personal_automation", state: "built", path: "device_op", ops: ["net.info", "net.wifi", "net.bluetooth", "net.devices", "net.mdns", "net.scan", "net.download"], platforms: ALL, summary: "Local network, Wi-Fi, Bluetooth, open ports and downloads" },
|
|
4496
5076
|
{ name: "desktop_schedule", group: "personal_automation", state: "built", path: "device_op", ops: ["schedule.create", "schedule.list", "schedule.cancel"], platforms: ALL, summary: "Run a tool's op on this computer on an interval; list and cancel" },
|
|
5077
|
+
// 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning
|
|
5078
|
+
// either off in Agents › Tools refuses its ops on every relay connection (the existing switch).
|
|
5079
|
+
{ name: "coding_sessions_read", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.providers", "coding.sessions.list", "coding.discover", "coding.runs.list", "coding.history", "coding.transcript.read", "coding.item.full", "coding.activity", "coding.folders.recent", "coding.folders.check", "coding.agents.access", "coding.titles.status", "coding.prefs.list", "coding.recent.seen", "coding.search", "coding.transcript.raw", "coding.watch", "coding.session.watch"], platforms: ALL, summary: "Claude Code and Codex sessions: list, read live, search, download" },
|
|
5080
|
+
{ name: "coding_sessions_drive", group: "personal_automation", state: "built", path: "device_op", ops: ["coding.start", "coding.takeover", "coding.send", "coding.stop", "coding.stop_elsewhere", "coding.options.set", "coding.agent.set", "coding.folders.create", "coding.prefs.set", "coding.reconcile"], platforms: ALL, summary: "Claude Code and Codex sessions: start, send, stop, take over, rename" },
|
|
4497
5081
|
// ── 4. Documents, notes and entities (1.37: the core's `documents` and `notes` owners; desktop_web is the `tools` service) ──
|
|
4498
5082
|
{ name: "desktop_documents", group: "tools_service", state: "built", path: "device_op", ops: ["documents.pdf_text", "documents.ocr", "documents.image_resize", "documents.office_generate"], platforms: ALL, summary: "PDF text, OCR, images, Word and Excel files" },
|
|
4499
5083
|
{ name: "desktop_web", group: "tools_service", state: "built", path: "device_op", ops: ["web.fetch", "web.scrape", "web.search", "web.fetch_with_browser"], platforms: ALL, summary: "Fetch, scrape and search the web from this computer's own connection" },
|
|
@@ -4794,8 +5378,19 @@ function sharedOpsBlocking(tool2, disabledTools) {
|
|
|
4794
5378
|
export {
|
|
4795
5379
|
AbsPath,
|
|
4796
5380
|
AccountAgent,
|
|
5381
|
+
AccountAgentDetail,
|
|
5382
|
+
AccountAgentRun,
|
|
5383
|
+
AccountAgentRunSort,
|
|
5384
|
+
AccountAgentRunStatus,
|
|
5385
|
+
AccountAgentVariable,
|
|
5386
|
+
AccountAgentsFavoriteParams,
|
|
5387
|
+
AccountAgentsFavoriteResult,
|
|
5388
|
+
AccountAgentsGetParams,
|
|
5389
|
+
AccountAgentsGetResult,
|
|
4797
5390
|
AccountAgentsListParams,
|
|
4798
5391
|
AccountAgentsListResult,
|
|
5392
|
+
AccountAgentsRunsParams,
|
|
5393
|
+
AccountAgentsRunsResult,
|
|
4799
5394
|
AccountReadState,
|
|
4800
5395
|
AccountReset,
|
|
4801
5396
|
AccountRowId,
|
|
@@ -4964,17 +5559,100 @@ export {
|
|
|
4964
5559
|
ClipboardWriteResult,
|
|
4965
5560
|
CloseCode,
|
|
4966
5561
|
CloseCodeValue,
|
|
5562
|
+
CodingActiveElsewhere,
|
|
5563
|
+
CodingActivityParams,
|
|
5564
|
+
CodingActivityResult,
|
|
5565
|
+
CodingAgentSelectionParams,
|
|
5566
|
+
CodingAgentSetParams,
|
|
5567
|
+
CodingAgentSetResult,
|
|
5568
|
+
CodingAgentsAccessParams,
|
|
5569
|
+
CodingAgentsAccessResult,
|
|
5570
|
+
CodingChangedEvent,
|
|
5571
|
+
CodingChatPreference,
|
|
5572
|
+
CodingClientRequestId,
|
|
5573
|
+
CodingDiscoverParams,
|
|
5574
|
+
CodingDiscoverResult,
|
|
5575
|
+
CodingDiscoveredChat,
|
|
5576
|
+
CodingFolderCheck,
|
|
5577
|
+
CodingFoldersCheckParams,
|
|
5578
|
+
CodingFoldersCheckResult,
|
|
5579
|
+
CodingFoldersCreateParams,
|
|
5580
|
+
CodingFoldersCreateResult,
|
|
5581
|
+
CodingFoldersRecentParams,
|
|
5582
|
+
CodingFoldersRecentResult,
|
|
5583
|
+
CodingGapEvent,
|
|
4967
5584
|
CodingHistoryBlocked,
|
|
4968
5585
|
CodingHistoryFailure,
|
|
4969
5586
|
CodingHistoryImportMissingParams,
|
|
4970
5587
|
CodingHistoryImportMissingResult,
|
|
5588
|
+
CodingHistoryParams,
|
|
4971
5589
|
CodingHistoryProgressEvent,
|
|
5590
|
+
CodingHistoryRecord,
|
|
5591
|
+
CodingHistoryResult,
|
|
4972
5592
|
CodingHistoryRun,
|
|
4973
5593
|
CodingHistoryStep,
|
|
4974
5594
|
CodingImportNextParams,
|
|
5595
|
+
CodingItemEvent,
|
|
5596
|
+
CodingItemFullParams,
|
|
5597
|
+
CodingItemFullResult,
|
|
5598
|
+
CodingOptionsSetParams,
|
|
5599
|
+
CodingOptionsSetResult,
|
|
4975
5600
|
CodingPlanMissingParams,
|
|
5601
|
+
CodingPrefsListParams,
|
|
5602
|
+
CodingPrefsListResult,
|
|
5603
|
+
CodingPrefsSetParams,
|
|
5604
|
+
CodingPrefsSetResult,
|
|
5605
|
+
CodingProviderBinary,
|
|
5606
|
+
CodingProviderName,
|
|
5607
|
+
CodingProviderProblem,
|
|
5608
|
+
CodingProviderStatus,
|
|
5609
|
+
CodingProvidersParams,
|
|
5610
|
+
CodingProvidersResult,
|
|
5611
|
+
CodingQuotaWindow,
|
|
5612
|
+
CodingRecentFolder,
|
|
5613
|
+
CodingRecentRow,
|
|
5614
|
+
CodingRecentSeenParams,
|
|
5615
|
+
CodingRecentSeenResult,
|
|
5616
|
+
CodingReconcileParams,
|
|
5617
|
+
CodingReconcileResult,
|
|
5618
|
+
CodingRunRecord,
|
|
5619
|
+
CodingRunStatus,
|
|
5620
|
+
CodingRunUsage,
|
|
5621
|
+
CodingRunsListParams,
|
|
5622
|
+
CodingRunsListResult,
|
|
5623
|
+
CodingSearchParams,
|
|
5624
|
+
CodingSearchResult,
|
|
5625
|
+
CodingSendParams,
|
|
5626
|
+
CodingSendResult,
|
|
4976
5627
|
CodingServiceCredentials,
|
|
4977
5628
|
CodingServiceProgress,
|
|
5629
|
+
CodingSessionAgent,
|
|
5630
|
+
CodingSessionAgentPart,
|
|
5631
|
+
CodingSessionRecord,
|
|
5632
|
+
CodingSessionWatchParams,
|
|
5633
|
+
CodingSessionWatchResult,
|
|
5634
|
+
CodingSessionsListParams,
|
|
5635
|
+
CodingSessionsListResult,
|
|
5636
|
+
CodingStartParams,
|
|
5637
|
+
CodingStartResult,
|
|
5638
|
+
CodingStartedBy,
|
|
5639
|
+
CodingStopElsewhereParams,
|
|
5640
|
+
CodingStopElsewhereResult,
|
|
5641
|
+
CodingStopParams,
|
|
5642
|
+
CodingStopResult,
|
|
5643
|
+
CodingTakeoverParams,
|
|
5644
|
+
CodingTakeoverResult,
|
|
5645
|
+
CodingTitleStatus,
|
|
5646
|
+
CodingTitlesStatusParams,
|
|
5647
|
+
CodingTitlesStatusResult,
|
|
5648
|
+
CodingTranscriptItem,
|
|
5649
|
+
CodingTranscriptRawParams,
|
|
5650
|
+
CodingTranscriptRawResult,
|
|
5651
|
+
CodingTranscriptReadParams,
|
|
5652
|
+
CodingTranscriptReadResult,
|
|
5653
|
+
CodingWatchParams,
|
|
5654
|
+
CodingWatchResult,
|
|
5655
|
+
CodingWatchStateEvent,
|
|
4978
5656
|
ColdChat,
|
|
4979
5657
|
ContactDetail,
|
|
4980
5658
|
ContactLabeled,
|
|
@@ -5337,6 +6015,8 @@ export {
|
|
|
5337
6015
|
SessionControlChangedEvent,
|
|
5338
6016
|
SessionDetachParams,
|
|
5339
6017
|
SessionDetachResult,
|
|
6018
|
+
SessionIdentifyParams,
|
|
6019
|
+
SessionIdentifyResult,
|
|
5340
6020
|
SessionListParams,
|
|
5341
6021
|
SessionListResult,
|
|
5342
6022
|
SessionReleaseParams,
|