@getmateo/protocol 0.0.0-stage → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +211 -0
- package/README.md +11 -2
- package/dist/addresses.d.ts +6 -0
- package/dist/addresses.js +2 -0
- package/dist/agent-attention-notification.d.ts +57 -0
- package/dist/agent-attention-notification.js +177 -0
- package/dist/agent-deep-link.d.ts +8 -0
- package/dist/agent-deep-link.js +49 -0
- package/dist/agent-labels.d.ts +14 -0
- package/dist/agent-labels.js +38 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-message.d.ts +20 -0
- package/dist/agent-message.js +12 -0
- package/dist/agent-profile.d.ts +31 -0
- package/dist/agent-profile.js +32 -0
- package/dist/agent-runtime-config.d.ts +4 -0
- package/dist/agent-runtime-config.js +5 -0
- package/dist/agent-shells.d.ts +25 -0
- package/dist/agent-shells.js +17 -0
- package/dist/agent-state-bucket.d.ts +15 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +484 -0
- package/dist/agent-types.js +33 -0
- package/dist/binary-frames/demux.d.ts +15 -0
- package/dist/binary-frames/demux.js +28 -0
- package/dist/binary-frames/file-transfer.d.ts +51 -0
- package/dist/binary-frames/file-transfer.js +108 -0
- package/dist/binary-frames/host-route.d.ts +13 -0
- package/dist/binary-frames/host-route.js +39 -0
- package/dist/binary-frames/index.d.ts +5 -0
- package/dist/binary-frames/index.js +5 -0
- package/dist/binary-frames/terminal.d.ts +35 -0
- package/dist/binary-frames/terminal.js +100 -0
- package/dist/branch-slug.d.ts +14 -0
- package/dist/branch-slug.js +49 -0
- package/dist/browser-automation/capabilities.d.ts +7 -0
- package/dist/browser-automation/capabilities.js +31 -0
- package/dist/browser-automation/rpc-schemas.d.ts +1224 -0
- package/dist/browser-automation/rpc-schemas.js +497 -0
- package/dist/browser-download-rules.d.ts +21 -0
- package/dist/browser-download-rules.js +54 -0
- package/dist/build-metadata.d.ts +17 -0
- package/dist/build-metadata.js +61 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +104 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +23 -0
- package/dist/check-traits.d.ts +11 -0
- package/dist/check-traits.js +10 -0
- package/dist/chunked-transport.d.ts +42 -0
- package/dist/chunked-transport.js +277 -0
- package/dist/client-capabilities.d.ts +24 -0
- package/dist/client-capabilities.js +52 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-auth.d.ts +548 -0
- package/dist/daemon-auth.js +152 -0
- package/dist/daemon-endpoints.d.ts +54 -0
- package/dist/daemon-endpoints.js +243 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/fleet.d.ts +381 -0
- package/dist/fleet.js +134 -0
- package/dist/forge-manifest.d.ts +66 -0
- package/dist/forge-manifest.js +92 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +14187 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.js +262 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +520 -0
- package/dist/generated/validation/ws-outbound.aot.js +106677 -0
- package/dist/git-remote.d.ts +33 -0
- package/dist/git-remote.js +94 -0
- package/dist/gitea-status.d.ts +10 -0
- package/dist/gitea-status.js +23 -0
- package/dist/gitlab-pipeline.d.ts +10 -0
- package/dist/gitlab-pipeline.js +17 -0
- package/dist/global-terminal.d.ts +3 -0
- package/dist/global-terminal.js +8 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/host-target.d.ts +20 -0
- package/dist/host-target.js +137 -0
- package/dist/hosts.d.ts +133 -0
- package/dist/hosts.js +82 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +636 -0
- package/dist/loop/rpc-schemas.js +164 -0
- package/dist/mateo-config-schema.d.ts +138 -0
- package/dist/mateo-config-schema.js +98 -0
- package/dist/mateo-tool-call-detail.d.ts +2 -0
- package/dist/mateo-tool-call-detail.js +3 -0
- package/dist/mateo-tool-presentation/agent-message.d.ts +10 -0
- package/dist/mateo-tool-presentation/agent-message.js +23 -0
- package/dist/mateo-tool-presentation/catalog.d.ts +321 -0
- package/dist/mateo-tool-presentation/catalog.js +319 -0
- package/dist/mateo-tool-presentation/detail-sections.d.ts +15 -0
- package/dist/mateo-tool-presentation/detail-sections.js +161 -0
- package/dist/mateo-tool-presentation/index.d.ts +22 -0
- package/dist/mateo-tool-presentation/index.js +62 -0
- package/dist/mateo-tool-presentation/summary-text.d.ts +7 -0
- package/dist/mateo-tool-presentation/summary-text.js +22 -0
- package/dist/messages.d.ts +70260 -0
- package/dist/messages.js +6740 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/plugin-browser-consent-copy.d.ts +193 -0
- package/dist/plugin-browser-consent-copy.js +109 -0
- package/dist/plugin-browser-grants.d.ts +48 -0
- package/dist/plugin-browser-grants.js +56 -0
- package/dist/plugin-browser.d.ts +321 -0
- package/dist/plugin-browser.js +109 -0
- package/dist/plugin-config.d.ts +18 -0
- package/dist/plugin-config.js +13 -0
- package/dist/plugin-overview.d.ts +12 -0
- package/dist/plugin-overview.js +50 -0
- package/dist/plugin-registry.d.ts +153 -0
- package/dist/plugin-registry.js +83 -0
- package/dist/plugin-requirements.d.ts +11 -0
- package/dist/plugin-requirements.js +26 -0
- package/dist/plugin-source-reference.d.ts +11 -0
- package/dist/plugin-source-reference.js +68 -0
- package/dist/provider-config.d.ts +141 -0
- package/dist/provider-config.js +113 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +54 -0
- package/dist/provider-manifest.d.ts +30 -0
- package/dist/provider-manifest.js +247 -0
- package/dist/provider-snapshot-codec.d.ts +18 -0
- package/dist/provider-snapshot-codec.js +71 -0
- package/dist/schedule/cadence.d.ts +6 -0
- package/dist/schedule/cadence.js +28 -0
- package/dist/schedule/cron-expression.d.ts +14 -0
- package/dist/schedule/cron-expression.js +107 -0
- package/dist/schedule/rpc-schemas.d.ts +570 -0
- package/dist/schedule/rpc-schemas.js +158 -0
- package/dist/schedule/types.d.ts +201 -0
- package/dist/schedule/types.js +68 -0
- package/dist/search/text-match.d.ts +78 -0
- package/dist/search/text-match.js +330 -0
- package/dist/service-defaults.d.ts +3 -0
- package/dist/service-defaults.js +5 -0
- package/dist/ssh-transport.d.ts +11 -0
- package/dist/ssh-transport.js +72 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +30 -0
- package/dist/terminal-input-mode.js +180 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +210 -0
- package/dist/terminal-profile.d.ts +10 -0
- package/dist/terminal-profile.js +11 -0
- package/dist/terminal-profiles.d.ts +41 -0
- package/dist/terminal-profiles.js +276 -0
- package/dist/terminal-snapshot.d.ts +4 -0
- package/dist/terminal-snapshot.js +220 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/dist/timeline-identity.d.ts +3 -0
- package/dist/timeline-identity.js +8 -0
- package/dist/tool-call-display.d.ts +13 -0
- package/dist/tool-call-display.js +144 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/user-agent.d.ts +26 -0
- package/dist/user-agent.js +101 -0
- package/dist/validation/ws-outbound-envelope.d.ts +13413 -0
- package/dist/validation/ws-outbound-envelope.js +17 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +38 -0
- package/dist/websocket-message-limit.d.ts +5 -0
- package/dist/websocket-message-limit.js +5 -0
- package/dist/workspace-labels.d.ts +9 -0
- package/dist/workspace-labels.js +19 -0
- package/package.json +48 -4
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare function isPrivateBrowserControlFrame(frame: unknown): boolean;
|
|
3
|
+
export declare const PluginBrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
op: z.ZodLiteral<"listTabs">;
|
|
5
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6
|
+
op: z.ZodLiteral<"navigate">;
|
|
7
|
+
browserId: z.ZodString;
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
11
|
+
browserId: z.ZodString;
|
|
12
|
+
selector: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
op: z.ZodLiteral<"wait">;
|
|
15
|
+
browserId: z.ZodString;
|
|
16
|
+
text: z.ZodOptional<z.ZodString>;
|
|
17
|
+
url: z.ZodOptional<z.ZodString>;
|
|
18
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
op: z.ZodLiteral<"upload">;
|
|
21
|
+
browserId: z.ZodString;
|
|
22
|
+
selector: z.ZodString;
|
|
23
|
+
filePath: z.ZodString;
|
|
24
|
+
}, z.core.$strict>], "op">;
|
|
25
|
+
export type PluginBrowserCommand = z.infer<typeof PluginBrowserCommandSchema>;
|
|
26
|
+
export declare const PluginBrowserExecuteInputSchema: z.ZodObject<{
|
|
27
|
+
pluginId: z.ZodString;
|
|
28
|
+
installationId: z.ZodUUID;
|
|
29
|
+
workspaceId: z.ZodString;
|
|
30
|
+
serverId: z.ZodString;
|
|
31
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
32
|
+
pluginId: z.ZodString;
|
|
33
|
+
installationId: z.ZodUUID;
|
|
34
|
+
workspaceId: z.ZodString;
|
|
35
|
+
domain: z.ZodString;
|
|
36
|
+
capability: z.ZodEnum<{
|
|
37
|
+
read: "read";
|
|
38
|
+
upload: "upload";
|
|
39
|
+
}>;
|
|
40
|
+
epoch: z.ZodUUID;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
|
+
op: z.ZodLiteral<"listTabs">;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
op: z.ZodLiteral<"navigate">;
|
|
46
|
+
browserId: z.ZodString;
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
49
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
50
|
+
browserId: z.ZodString;
|
|
51
|
+
selector: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
op: z.ZodLiteral<"wait">;
|
|
54
|
+
browserId: z.ZodString;
|
|
55
|
+
text: z.ZodOptional<z.ZodString>;
|
|
56
|
+
url: z.ZodOptional<z.ZodString>;
|
|
57
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
op: z.ZodLiteral<"upload">;
|
|
60
|
+
browserId: z.ZodString;
|
|
61
|
+
selector: z.ZodString;
|
|
62
|
+
filePath: z.ZodString;
|
|
63
|
+
}, z.core.$strict>], "op">;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
export type PluginBrowserExecuteInput = z.infer<typeof PluginBrowserExecuteInputSchema>;
|
|
66
|
+
export declare const PluginBrowserResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
op: z.ZodLiteral<"listTabs">;
|
|
68
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
69
|
+
browserId: z.ZodString;
|
|
70
|
+
origin: z.ZodString;
|
|
71
|
+
}, z.core.$strict>>;
|
|
72
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
73
|
+
op: z.ZodLiteral<"navigate">;
|
|
74
|
+
origin: z.ZodString;
|
|
75
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
76
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
77
|
+
origin: z.ZodString;
|
|
78
|
+
src: z.ZodString;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
op: z.ZodLiteral<"wait">;
|
|
81
|
+
origin: z.ZodString;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
op: z.ZodLiteral<"upload">;
|
|
84
|
+
origin: z.ZodString;
|
|
85
|
+
}, z.core.$strict>], "op">;
|
|
86
|
+
export type PluginBrowserResult = z.infer<typeof PluginBrowserResultSchema>;
|
|
87
|
+
export declare const PluginBrowserErrorCodeSchema: z.ZodEnum<{
|
|
88
|
+
disabled: "disabled";
|
|
89
|
+
unavailable: "unavailable";
|
|
90
|
+
denied: "denied";
|
|
91
|
+
tab_not_found: "tab_not_found";
|
|
92
|
+
invalid_target: "invalid_target";
|
|
93
|
+
invalid_file: "invalid_file";
|
|
94
|
+
timeout: "timeout";
|
|
95
|
+
page_changed: "page_changed";
|
|
96
|
+
plugin_only: "plugin_only";
|
|
97
|
+
workspace_unavailable: "workspace_unavailable";
|
|
98
|
+
}>;
|
|
99
|
+
export type PluginBrowserErrorCode = z.infer<typeof PluginBrowserErrorCodeSchema>;
|
|
100
|
+
export declare const PluginBrowserOutcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
101
|
+
ok: z.ZodLiteral<true>;
|
|
102
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
|
+
op: z.ZodLiteral<"listTabs">;
|
|
104
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
105
|
+
browserId: z.ZodString;
|
|
106
|
+
origin: z.ZodString;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
op: z.ZodLiteral<"navigate">;
|
|
110
|
+
origin: z.ZodString;
|
|
111
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
112
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
113
|
+
origin: z.ZodString;
|
|
114
|
+
src: z.ZodString;
|
|
115
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
116
|
+
op: z.ZodLiteral<"wait">;
|
|
117
|
+
origin: z.ZodString;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
op: z.ZodLiteral<"upload">;
|
|
120
|
+
origin: z.ZodString;
|
|
121
|
+
}, z.core.$strict>], "op">;
|
|
122
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
123
|
+
ok: z.ZodLiteral<false>;
|
|
124
|
+
error: z.ZodEnum<{
|
|
125
|
+
disabled: "disabled";
|
|
126
|
+
unavailable: "unavailable";
|
|
127
|
+
denied: "denied";
|
|
128
|
+
tab_not_found: "tab_not_found";
|
|
129
|
+
invalid_target: "invalid_target";
|
|
130
|
+
invalid_file: "invalid_file";
|
|
131
|
+
timeout: "timeout";
|
|
132
|
+
page_changed: "page_changed";
|
|
133
|
+
plugin_only: "plugin_only";
|
|
134
|
+
workspace_unavailable: "workspace_unavailable";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strict>]>;
|
|
137
|
+
export type PluginBrowserOutcome = z.infer<typeof PluginBrowserOutcomeSchema>;
|
|
138
|
+
export declare const PluginBrowserRequestSchema: z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"plugin.browser.execute.request">;
|
|
140
|
+
requestId: z.ZodString;
|
|
141
|
+
workspaceId: z.ZodString;
|
|
142
|
+
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
143
|
+
op: z.ZodLiteral<"listTabs">;
|
|
144
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
145
|
+
op: z.ZodLiteral<"navigate">;
|
|
146
|
+
browserId: z.ZodString;
|
|
147
|
+
url: z.ZodString;
|
|
148
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
149
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
150
|
+
browserId: z.ZodString;
|
|
151
|
+
selector: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
152
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
153
|
+
op: z.ZodLiteral<"wait">;
|
|
154
|
+
browserId: z.ZodString;
|
|
155
|
+
text: z.ZodOptional<z.ZodString>;
|
|
156
|
+
url: z.ZodOptional<z.ZodString>;
|
|
157
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
159
|
+
op: z.ZodLiteral<"upload">;
|
|
160
|
+
browserId: z.ZodString;
|
|
161
|
+
selector: z.ZodString;
|
|
162
|
+
filePath: z.ZodString;
|
|
163
|
+
}, z.core.$strict>], "op">;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
export declare const PluginBrowserResponseSchema: z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"plugin.browser.execute.response">;
|
|
167
|
+
payload: z.ZodObject<{
|
|
168
|
+
requestId: z.ZodString;
|
|
169
|
+
outcome: z.ZodUnion<readonly [z.ZodObject<{
|
|
170
|
+
ok: z.ZodLiteral<true>;
|
|
171
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
172
|
+
op: z.ZodLiteral<"listTabs">;
|
|
173
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
174
|
+
browserId: z.ZodString;
|
|
175
|
+
origin: z.ZodString;
|
|
176
|
+
}, z.core.$strict>>;
|
|
177
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
+
op: z.ZodLiteral<"navigate">;
|
|
179
|
+
origin: z.ZodString;
|
|
180
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
181
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
182
|
+
origin: z.ZodString;
|
|
183
|
+
src: z.ZodString;
|
|
184
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
op: z.ZodLiteral<"wait">;
|
|
186
|
+
origin: z.ZodString;
|
|
187
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
188
|
+
op: z.ZodLiteral<"upload">;
|
|
189
|
+
origin: z.ZodString;
|
|
190
|
+
}, z.core.$strict>], "op">;
|
|
191
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
+
ok: z.ZodLiteral<false>;
|
|
193
|
+
error: z.ZodEnum<{
|
|
194
|
+
disabled: "disabled";
|
|
195
|
+
unavailable: "unavailable";
|
|
196
|
+
denied: "denied";
|
|
197
|
+
tab_not_found: "tab_not_found";
|
|
198
|
+
invalid_target: "invalid_target";
|
|
199
|
+
invalid_file: "invalid_file";
|
|
200
|
+
timeout: "timeout";
|
|
201
|
+
page_changed: "page_changed";
|
|
202
|
+
plugin_only: "plugin_only";
|
|
203
|
+
workspace_unavailable: "workspace_unavailable";
|
|
204
|
+
}>;
|
|
205
|
+
}, z.core.$strict>]>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export declare const PluginBrowserHostRequestSchema: z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"browser.plugin_host.execute.request">;
|
|
210
|
+
requestId: z.ZodString;
|
|
211
|
+
subscriptionId: z.ZodOptional<z.ZodString>;
|
|
212
|
+
input: z.ZodObject<{
|
|
213
|
+
pluginId: z.ZodString;
|
|
214
|
+
installationId: z.ZodUUID;
|
|
215
|
+
workspaceId: z.ZodString;
|
|
216
|
+
serverId: z.ZodString;
|
|
217
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
218
|
+
pluginId: z.ZodString;
|
|
219
|
+
installationId: z.ZodUUID;
|
|
220
|
+
workspaceId: z.ZodString;
|
|
221
|
+
domain: z.ZodString;
|
|
222
|
+
capability: z.ZodEnum<{
|
|
223
|
+
read: "read";
|
|
224
|
+
upload: "upload";
|
|
225
|
+
}>;
|
|
226
|
+
epoch: z.ZodUUID;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
|
+
op: z.ZodLiteral<"listTabs">;
|
|
230
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
+
op: z.ZodLiteral<"navigate">;
|
|
232
|
+
browserId: z.ZodString;
|
|
233
|
+
url: z.ZodString;
|
|
234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
235
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
236
|
+
browserId: z.ZodString;
|
|
237
|
+
selector: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
238
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
239
|
+
op: z.ZodLiteral<"wait">;
|
|
240
|
+
browserId: z.ZodString;
|
|
241
|
+
text: z.ZodOptional<z.ZodString>;
|
|
242
|
+
url: z.ZodOptional<z.ZodString>;
|
|
243
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
245
|
+
op: z.ZodLiteral<"upload">;
|
|
246
|
+
browserId: z.ZodString;
|
|
247
|
+
selector: z.ZodString;
|
|
248
|
+
filePath: z.ZodString;
|
|
249
|
+
}, z.core.$strict>], "op">;
|
|
250
|
+
}, z.core.$strict>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
export declare const PluginBrowserHostResponseSchema: z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"browser.plugin_host.execute.response">;
|
|
254
|
+
payload: z.ZodObject<{
|
|
255
|
+
requestId: z.ZodString;
|
|
256
|
+
outcome: z.ZodUnion<readonly [z.ZodObject<{
|
|
257
|
+
ok: z.ZodLiteral<true>;
|
|
258
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
259
|
+
op: z.ZodLiteral<"listTabs">;
|
|
260
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
261
|
+
browserId: z.ZodString;
|
|
262
|
+
origin: z.ZodString;
|
|
263
|
+
}, z.core.$strict>>;
|
|
264
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
+
op: z.ZodLiteral<"navigate">;
|
|
266
|
+
origin: z.ZodString;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
op: z.ZodLiteral<"readImageSource">;
|
|
269
|
+
origin: z.ZodString;
|
|
270
|
+
src: z.ZodString;
|
|
271
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
272
|
+
op: z.ZodLiteral<"wait">;
|
|
273
|
+
origin: z.ZodString;
|
|
274
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
+
op: z.ZodLiteral<"upload">;
|
|
276
|
+
origin: z.ZodString;
|
|
277
|
+
}, z.core.$strict>], "op">;
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
279
|
+
ok: z.ZodLiteral<false>;
|
|
280
|
+
error: z.ZodEnum<{
|
|
281
|
+
disabled: "disabled";
|
|
282
|
+
unavailable: "unavailable";
|
|
283
|
+
denied: "denied";
|
|
284
|
+
tab_not_found: "tab_not_found";
|
|
285
|
+
invalid_target: "invalid_target";
|
|
286
|
+
invalid_file: "invalid_file";
|
|
287
|
+
timeout: "timeout";
|
|
288
|
+
page_changed: "page_changed";
|
|
289
|
+
plugin_only: "plugin_only";
|
|
290
|
+
workspace_unavailable: "workspace_unavailable";
|
|
291
|
+
}>;
|
|
292
|
+
}, z.core.$strict>]>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
export declare const PluginBrowserGrantUpdateRequestSchema: z.ZodObject<{
|
|
296
|
+
type: z.ZodLiteral<"browser.plugin_host.set_grants.request">;
|
|
297
|
+
requestId: z.ZodString;
|
|
298
|
+
subscriptionId: z.ZodString;
|
|
299
|
+
snapshot: z.ZodObject<{
|
|
300
|
+
revision: z.ZodNumber;
|
|
301
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
302
|
+
pluginId: z.ZodString;
|
|
303
|
+
installationId: z.ZodUUID;
|
|
304
|
+
workspaceId: z.ZodString;
|
|
305
|
+
domain: z.ZodString;
|
|
306
|
+
capability: z.ZodEnum<{
|
|
307
|
+
read: "read";
|
|
308
|
+
upload: "upload";
|
|
309
|
+
}>;
|
|
310
|
+
epoch: z.ZodUUID;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
export declare const PluginBrowserGrantUpdateResponseSchema: z.ZodObject<{
|
|
315
|
+
type: z.ZodLiteral<"browser.plugin_host.set_grants.response">;
|
|
316
|
+
payload: z.ZodObject<{
|
|
317
|
+
requestId: z.ZodString;
|
|
318
|
+
accepted: z.ZodBoolean;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
//# sourceMappingURL=plugin-browser.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MAX_PLUGIN_BROWSER_GRANTS, PluginBrowserGrantSchema, PluginBrowserGrantSnapshotSchema, } from "./plugin-browser-grants.js";
|
|
3
|
+
// Validation errors can quote unexpected keys. A malformed private operation must not
|
|
4
|
+
// put a selector, file path or signed URL into transport diagnostics on either peer.
|
|
5
|
+
export function isPrivateBrowserControlFrame(frame) {
|
|
6
|
+
if (!frame || typeof frame !== "object" || !("message" in frame))
|
|
7
|
+
return false;
|
|
8
|
+
const message = frame.message;
|
|
9
|
+
return Boolean(message &&
|
|
10
|
+
typeof message === "object" &&
|
|
11
|
+
"type" in message &&
|
|
12
|
+
typeof message.type === "string" &&
|
|
13
|
+
(message.type.startsWith("plugin.browser.") || message.type.startsWith("browser.plugin_host.")));
|
|
14
|
+
}
|
|
15
|
+
const id = z.string().min(1).max(512);
|
|
16
|
+
const url = z.string().min(1).max(16384);
|
|
17
|
+
const selector = z.string().min(1).max(1024);
|
|
18
|
+
export const PluginBrowserCommandSchema = z.discriminatedUnion("op", [
|
|
19
|
+
z.strictObject({ op: z.literal("listTabs") }),
|
|
20
|
+
z.strictObject({ op: z.literal("navigate"), browserId: id, url }),
|
|
21
|
+
z.strictObject({
|
|
22
|
+
op: z.literal("readImageSource"),
|
|
23
|
+
browserId: id,
|
|
24
|
+
selector: z.union([selector, z.array(selector).min(1).max(4)]),
|
|
25
|
+
}),
|
|
26
|
+
z.strictObject({
|
|
27
|
+
op: z.literal("wait"),
|
|
28
|
+
browserId: id,
|
|
29
|
+
text: z.string().min(1).max(1024).optional(),
|
|
30
|
+
url: url.optional(),
|
|
31
|
+
timeoutMs: z.number().int().min(1).max(30000).optional(),
|
|
32
|
+
}),
|
|
33
|
+
z.strictObject({
|
|
34
|
+
op: z.literal("upload"),
|
|
35
|
+
browserId: id,
|
|
36
|
+
selector,
|
|
37
|
+
filePath: z.string().min(1).max(4096),
|
|
38
|
+
}),
|
|
39
|
+
]);
|
|
40
|
+
export const PluginBrowserExecuteInputSchema = z.strictObject({
|
|
41
|
+
pluginId: id,
|
|
42
|
+
installationId: z.uuid(),
|
|
43
|
+
workspaceId: id,
|
|
44
|
+
serverId: id,
|
|
45
|
+
grants: z.array(PluginBrowserGrantSchema).min(1).max(MAX_PLUGIN_BROWSER_GRANTS),
|
|
46
|
+
command: PluginBrowserCommandSchema,
|
|
47
|
+
});
|
|
48
|
+
const origin = z.string().min(1).max(270);
|
|
49
|
+
export const PluginBrowserResultSchema = z.discriminatedUnion("op", [
|
|
50
|
+
z.strictObject({
|
|
51
|
+
op: z.literal("listTabs"),
|
|
52
|
+
tabs: z.array(z.strictObject({ browserId: id, origin })).max(512),
|
|
53
|
+
}),
|
|
54
|
+
z.strictObject({ op: z.literal("navigate"), origin }),
|
|
55
|
+
z.strictObject({ op: z.literal("readImageSource"), origin, src: url }),
|
|
56
|
+
z.strictObject({ op: z.literal("wait"), origin }),
|
|
57
|
+
z.strictObject({ op: z.literal("upload"), origin }),
|
|
58
|
+
]);
|
|
59
|
+
export const PluginBrowserErrorCodeSchema = z.enum([
|
|
60
|
+
"denied",
|
|
61
|
+
"unavailable",
|
|
62
|
+
"tab_not_found",
|
|
63
|
+
"invalid_target",
|
|
64
|
+
"invalid_file",
|
|
65
|
+
"timeout",
|
|
66
|
+
"page_changed",
|
|
67
|
+
"plugin_only",
|
|
68
|
+
"workspace_unavailable",
|
|
69
|
+
"disabled",
|
|
70
|
+
]);
|
|
71
|
+
// zod-aot 0.20.4 emits string cases ("true"/"false") for boolean discriminators.
|
|
72
|
+
// Keep the structural union: the generated validator must accept both boolean branches.
|
|
73
|
+
export const PluginBrowserOutcomeSchema = z.union([
|
|
74
|
+
z.strictObject({ ok: z.literal(true), result: PluginBrowserResultSchema }),
|
|
75
|
+
z.strictObject({ ok: z.literal(false), error: PluginBrowserErrorCodeSchema }),
|
|
76
|
+
]);
|
|
77
|
+
export const PluginBrowserRequestSchema = z.strictObject({
|
|
78
|
+
type: z.literal("plugin.browser.execute.request"),
|
|
79
|
+
requestId: id,
|
|
80
|
+
workspaceId: id,
|
|
81
|
+
command: PluginBrowserCommandSchema,
|
|
82
|
+
});
|
|
83
|
+
export const PluginBrowserResponseSchema = z.object({
|
|
84
|
+
type: z.literal("plugin.browser.execute.response"),
|
|
85
|
+
payload: z.object({ requestId: id, outcome: PluginBrowserOutcomeSchema }),
|
|
86
|
+
});
|
|
87
|
+
// Reverse RPC: the host executor is addressed by its owned registration. The daemon
|
|
88
|
+
// assigns a separate unpredictable ID; plugin request IDs are never forwarded.
|
|
89
|
+
export const PluginBrowserHostRequestSchema = z.object({
|
|
90
|
+
type: z.literal("browser.plugin_host.execute.request"),
|
|
91
|
+
requestId: id,
|
|
92
|
+
subscriptionId: id.optional(),
|
|
93
|
+
input: PluginBrowserExecuteInputSchema,
|
|
94
|
+
});
|
|
95
|
+
export const PluginBrowserHostResponseSchema = z.object({
|
|
96
|
+
type: z.literal("browser.plugin_host.execute.response"),
|
|
97
|
+
payload: z.object({ requestId: id, outcome: PluginBrowserOutcomeSchema }),
|
|
98
|
+
});
|
|
99
|
+
export const PluginBrowserGrantUpdateRequestSchema = z.object({
|
|
100
|
+
type: z.literal("browser.plugin_host.set_grants.request"),
|
|
101
|
+
requestId: id,
|
|
102
|
+
subscriptionId: id,
|
|
103
|
+
snapshot: PluginBrowserGrantSnapshotSchema,
|
|
104
|
+
});
|
|
105
|
+
export const PluginBrowserGrantUpdateResponseSchema = z.object({
|
|
106
|
+
type: z.literal("browser.plugin_host.set_grants.response"),
|
|
107
|
+
payload: z.object({ requestId: id, accepted: z.boolean() }),
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=plugin-browser.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PluginIdSchema: z.ZodString;
|
|
3
|
+
export declare const PluginRequirementsSchema: z.ZodObject<{
|
|
4
|
+
mateo: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PluginRequirements = z.infer<typeof PluginRequirementsSchema>;
|
|
7
|
+
export declare const DirectoryPluginSourceSchema: z.ZodObject<{
|
|
8
|
+
source: z.ZodLiteral<"directory">;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const PluginSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
|
+
source: z.ZodLiteral<"directory">;
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strict>], "source">;
|
|
17
|
+
export type PluginSource = z.infer<typeof PluginSourceSchema>;
|
|
18
|
+
//# sourceMappingURL=plugin-config.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const PluginIdSchema = z.string().regex(/^[a-z][a-z0-9-]*$/);
|
|
3
|
+
// Semver validation belongs at the manifest/runtime boundary, not on the wire.
|
|
4
|
+
export const PluginRequirementsSchema = z.object({ mateo: z.string().optional() });
|
|
5
|
+
export const DirectoryPluginSourceSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
source: z.literal("directory"),
|
|
8
|
+
path: z.string().min(1),
|
|
9
|
+
enabled: z.boolean().optional(),
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
export const PluginSourceSchema = z.discriminatedUnion("source", [DirectoryPluginSourceSchema]);
|
|
13
|
+
//# sourceMappingURL=plugin-config.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Presentation contract for author-controlled registry content, independent of the UI runtime. */
|
|
2
|
+
export declare const pluginOverviewPolicy: {
|
|
3
|
+
readonly rawHtml: false;
|
|
4
|
+
readonly elements: readonly ["p", "br", "hr", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "ul", "ol", "li", "strong", "em", "del", "pre", "code", "a", "img", "table", "thead", "tbody", "tr", "th", "td"];
|
|
5
|
+
readonly link: {
|
|
6
|
+
readonly rel: "noopener noreferrer nofollow";
|
|
7
|
+
readonly target: "_blank";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/** Validate decoded Markdown destinations; never resolve against the reader's page or repository. */
|
|
11
|
+
export declare function pluginOverviewUrl(value: string | undefined): string | undefined;
|
|
12
|
+
//# sourceMappingURL=plugin-overview.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Presentation contract for author-controlled registry content, independent of the UI runtime. */
|
|
2
|
+
export const pluginOverviewPolicy = {
|
|
3
|
+
rawHtml: false,
|
|
4
|
+
elements: [
|
|
5
|
+
"p",
|
|
6
|
+
"br",
|
|
7
|
+
"hr",
|
|
8
|
+
"h1",
|
|
9
|
+
"h2",
|
|
10
|
+
"h3",
|
|
11
|
+
"h4",
|
|
12
|
+
"h5",
|
|
13
|
+
"h6",
|
|
14
|
+
"blockquote",
|
|
15
|
+
"ul",
|
|
16
|
+
"ol",
|
|
17
|
+
"li",
|
|
18
|
+
"strong",
|
|
19
|
+
"em",
|
|
20
|
+
"del",
|
|
21
|
+
"pre",
|
|
22
|
+
"code",
|
|
23
|
+
"a",
|
|
24
|
+
"img",
|
|
25
|
+
"table",
|
|
26
|
+
"thead",
|
|
27
|
+
"tbody",
|
|
28
|
+
"tr",
|
|
29
|
+
"th",
|
|
30
|
+
"td",
|
|
31
|
+
],
|
|
32
|
+
link: { rel: "noopener noreferrer nofollow", target: "_blank" },
|
|
33
|
+
};
|
|
34
|
+
/** Validate decoded Markdown destinations; never resolve against the reader's page or repository. */
|
|
35
|
+
export function pluginOverviewUrl(value) {
|
|
36
|
+
// URL parsers discard controls and normalize backslashes; reject those ambiguous spellings.
|
|
37
|
+
// eslint-disable-next-line no-control-regex
|
|
38
|
+
if (!value || !/^https:\/\/[^/?#]/i.test(value) || /[\u0000-\u0020\u007f\\]/.test(value))
|
|
39
|
+
return undefined;
|
|
40
|
+
try {
|
|
41
|
+
const url = new URL(value);
|
|
42
|
+
if (url.protocol !== "https:" || !url.hostname || url.username || url.password)
|
|
43
|
+
return undefined;
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=plugin-overview.js.map
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PluginRegistryIdSchema: z.ZodString;
|
|
3
|
+
export declare const PluginRegistryIdentitySchema: z.ZodObject<{
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const PluginRegistriesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8
|
+
authorization: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
export declare const PluginRegistryArtifactSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"npm">;
|
|
12
|
+
package: z.ZodString;
|
|
13
|
+
version: z.ZodString;
|
|
14
|
+
resolved: z.ZodString;
|
|
15
|
+
integrity: z.ZodString;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"git">;
|
|
18
|
+
remote: z.ZodString;
|
|
19
|
+
commit: z.ZodString;
|
|
20
|
+
pluginPath: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>], "kind">;
|
|
22
|
+
export declare const PublishedPluginSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
description: z.ZodString;
|
|
26
|
+
license: z.ZodOptional<z.ZodString>;
|
|
27
|
+
categories: z.ZodArray<z.ZodString>;
|
|
28
|
+
author: z.ZodObject<{
|
|
29
|
+
github: z.ZodString;
|
|
30
|
+
name: z.ZodOptional<z.ZodString>;
|
|
31
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
repository: z.ZodObject<{
|
|
34
|
+
url: z.ZodString;
|
|
35
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
artifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"npm">;
|
|
39
|
+
package: z.ZodString;
|
|
40
|
+
version: z.ZodString;
|
|
41
|
+
resolved: z.ZodString;
|
|
42
|
+
integrity: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"git">;
|
|
45
|
+
remote: z.ZodString;
|
|
46
|
+
commit: z.ZodString;
|
|
47
|
+
pluginPath: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>], "kind">;
|
|
49
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
50
|
+
media: z.ZodArray<z.ZodString>;
|
|
51
|
+
submittedAt: z.ZodString;
|
|
52
|
+
reviewedAt: z.ZodString;
|
|
53
|
+
updatedAt: z.ZodString;
|
|
54
|
+
publishedAt: z.ZodString;
|
|
55
|
+
installs: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
/** Whether a registry media entry is a video or an image, from its path extension. */
|
|
58
|
+
export declare function pluginMediaKind(url: string): "image" | "video";
|
|
59
|
+
export declare const PublishedPluginDetailSchema: z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
description: z.ZodString;
|
|
63
|
+
license: z.ZodOptional<z.ZodString>;
|
|
64
|
+
categories: z.ZodArray<z.ZodString>;
|
|
65
|
+
author: z.ZodObject<{
|
|
66
|
+
github: z.ZodString;
|
|
67
|
+
name: z.ZodOptional<z.ZodString>;
|
|
68
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
repository: z.ZodObject<{
|
|
71
|
+
url: z.ZodString;
|
|
72
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
artifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"npm">;
|
|
76
|
+
package: z.ZodString;
|
|
77
|
+
version: z.ZodString;
|
|
78
|
+
resolved: z.ZodString;
|
|
79
|
+
integrity: z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"git">;
|
|
82
|
+
remote: z.ZodString;
|
|
83
|
+
commit: z.ZodString;
|
|
84
|
+
pluginPath: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>], "kind">;
|
|
86
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
87
|
+
media: z.ZodArray<z.ZodString>;
|
|
88
|
+
submittedAt: z.ZodString;
|
|
89
|
+
reviewedAt: z.ZodString;
|
|
90
|
+
updatedAt: z.ZodString;
|
|
91
|
+
publishedAt: z.ZodString;
|
|
92
|
+
installs: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
readme: z.ZodString;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export declare const PluginRegistryIndexSchema: z.ZodObject<{
|
|
96
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
97
|
+
registry: z.ZodObject<{
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
url: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
102
|
+
slug: z.ZodString;
|
|
103
|
+
label: z.ZodString;
|
|
104
|
+
description: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
plugins: z.ZodArray<z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
description: z.ZodString;
|
|
110
|
+
license: z.ZodOptional<z.ZodString>;
|
|
111
|
+
categories: z.ZodArray<z.ZodString>;
|
|
112
|
+
author: z.ZodObject<{
|
|
113
|
+
github: z.ZodString;
|
|
114
|
+
name: z.ZodOptional<z.ZodString>;
|
|
115
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
repository: z.ZodObject<{
|
|
118
|
+
url: z.ZodString;
|
|
119
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
artifact: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"npm">;
|
|
123
|
+
package: z.ZodString;
|
|
124
|
+
version: z.ZodString;
|
|
125
|
+
resolved: z.ZodString;
|
|
126
|
+
integrity: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"git">;
|
|
129
|
+
remote: z.ZodString;
|
|
130
|
+
commit: z.ZodString;
|
|
131
|
+
pluginPath: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>], "kind">;
|
|
133
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
134
|
+
media: z.ZodArray<z.ZodString>;
|
|
135
|
+
submittedAt: z.ZodString;
|
|
136
|
+
reviewedAt: z.ZodString;
|
|
137
|
+
updatedAt: z.ZodString;
|
|
138
|
+
publishedAt: z.ZodString;
|
|
139
|
+
installs: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
featured: z.ZodArray<z.ZodString>;
|
|
142
|
+
generatedAt: z.ZodString;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type PluginRegistryIdentity = z.infer<typeof PluginRegistryIdentitySchema>;
|
|
145
|
+
export type PluginRegistries = z.infer<typeof PluginRegistriesSchema>;
|
|
146
|
+
/** A bare `owner/slug`, which only names a plugin when a default registry is configured. */
|
|
147
|
+
export declare function isBarePluginRegistryId(source: string): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Mateo ships with no default registry: `host/owner/slug` always resolves, and a
|
|
150
|
+
* bare `owner/slug` resolves only against the host's configured default.
|
|
151
|
+
*/
|
|
152
|
+
export declare function parsePluginRegistryReference(source: string, defaultUrl?: string): PluginRegistryIdentity | null;
|
|
153
|
+
//# sourceMappingURL=plugin-registry.d.ts.map
|