alt-plugin-sdk 0.2.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/README.md +173 -0
- package/dist/ai.d.ts +7 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +103 -0
- package/dist/ai.js.map +1 -0
- package/dist/client.d.ts +122 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +82 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts.d.ts +800 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +544 -0
- package/dist/contracts.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Major version of the plugin SDK that this host understands.
|
|
4
|
+
* A plugin whose manifest declares a higher major refuses to load.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PLUGIN_HOST_SDK_MAJOR = 1;
|
|
7
|
+
export declare const pluginPermissionSchema: z.ZodEnum<{
|
|
8
|
+
storage: "storage";
|
|
9
|
+
"appState:read": "appState:read";
|
|
10
|
+
"events:subscribe": "events:subscribe";
|
|
11
|
+
"ai:chat": "ai:chat";
|
|
12
|
+
"notes:read": "notes:read";
|
|
13
|
+
"actions:notes": "actions:notes";
|
|
14
|
+
"notes:write": "notes:write";
|
|
15
|
+
"notes:select": "notes:select";
|
|
16
|
+
"folders:write": "folders:write";
|
|
17
|
+
"recording:control": "recording:control";
|
|
18
|
+
"transcription:run": "transcription:run";
|
|
19
|
+
"files:read": "files:read";
|
|
20
|
+
"files:write": "files:write";
|
|
21
|
+
"settings:read": "settings:read";
|
|
22
|
+
"settings:write": "settings:write";
|
|
23
|
+
}>;
|
|
24
|
+
export declare const pluginEventSchema: z.ZodEnum<{
|
|
25
|
+
activeNoteChanged: "activeNoteChanged";
|
|
26
|
+
recordingStatusChanged: "recordingStatusChanged";
|
|
27
|
+
recordingLevel: "recordingLevel";
|
|
28
|
+
transcriptUpdated: "transcriptUpdated";
|
|
29
|
+
noteCreated: "noteCreated";
|
|
30
|
+
noteUpdated: "noteUpdated";
|
|
31
|
+
noteDeleted: "noteDeleted";
|
|
32
|
+
folderCreated: "folderCreated";
|
|
33
|
+
folderUpdated: "folderUpdated";
|
|
34
|
+
folderDeleted: "folderDeleted";
|
|
35
|
+
componentUpdated: "componentUpdated";
|
|
36
|
+
settingChanged: "settingChanged";
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use the first-class methods `alt.notes.create()` / `alt.notes.select()`.
|
|
40
|
+
* Kept as a backwards-compatibility shim for plugins built against SDK v0.
|
|
41
|
+
*/
|
|
42
|
+
export declare const pluginActionSchema: z.ZodEnum<{
|
|
43
|
+
"notes.select": "notes.select";
|
|
44
|
+
"notes.create": "notes.create";
|
|
45
|
+
}>;
|
|
46
|
+
export declare const pluginManifestSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
version: z.ZodString;
|
|
50
|
+
entry: z.ZodString;
|
|
51
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
52
|
+
storage: "storage";
|
|
53
|
+
"appState:read": "appState:read";
|
|
54
|
+
"events:subscribe": "events:subscribe";
|
|
55
|
+
"ai:chat": "ai:chat";
|
|
56
|
+
"notes:read": "notes:read";
|
|
57
|
+
"actions:notes": "actions:notes";
|
|
58
|
+
"notes:write": "notes:write";
|
|
59
|
+
"notes:select": "notes:select";
|
|
60
|
+
"folders:write": "folders:write";
|
|
61
|
+
"recording:control": "recording:control";
|
|
62
|
+
"transcription:run": "transcription:run";
|
|
63
|
+
"files:read": "files:read";
|
|
64
|
+
"files:write": "files:write";
|
|
65
|
+
"settings:read": "settings:read";
|
|
66
|
+
"settings:write": "settings:write";
|
|
67
|
+
}>>>;
|
|
68
|
+
description: z.ZodOptional<z.ZodString>;
|
|
69
|
+
author: z.ZodOptional<z.ZodString>;
|
|
70
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
71
|
+
sdkVersion: z.ZodDefault<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
/**
|
|
74
|
+
* Parse the major number out of a sdkVersion string. Returns NaN for malformed
|
|
75
|
+
* input — callers should treat NaN as "incompatible".
|
|
76
|
+
*/
|
|
77
|
+
export declare function parsePluginSdkMajor(sdkVersion: string): number;
|
|
78
|
+
/**
|
|
79
|
+
* `actions:notes` was a single permission that gated both note creation and
|
|
80
|
+
* selection. The new split surface uses `notes:write` and `notes:select`.
|
|
81
|
+
* Existing plugins are migrated at runtime by expanding the legacy grant.
|
|
82
|
+
*/
|
|
83
|
+
export declare function expandLegacyPermissions(granted: readonly PluginPermission[]): PluginPermission[];
|
|
84
|
+
export type PluginPermission = z.infer<typeof pluginPermissionSchema>;
|
|
85
|
+
export type PluginEvent = z.infer<typeof pluginEventSchema>;
|
|
86
|
+
export type PluginAction = z.infer<typeof pluginActionSchema>;
|
|
87
|
+
export type PluginManifest = z.infer<typeof pluginManifestSchema>;
|
|
88
|
+
export type PluginManifestInput = z.input<typeof pluginManifestSchema>;
|
|
89
|
+
export type PluginStorageValue = string | number | boolean | null | PluginStorageValue[] | {
|
|
90
|
+
[key: string]: PluginStorageValue;
|
|
91
|
+
};
|
|
92
|
+
export declare const pluginStorageValueSchema: z.ZodType<PluginStorageValue>;
|
|
93
|
+
export declare const pluginStorageKeySchema: z.ZodString;
|
|
94
|
+
export declare const pluginSdkMethodSchema: z.ZodEnum<{
|
|
95
|
+
"events:subscribe": "events:subscribe";
|
|
96
|
+
"notes:select": "notes:select";
|
|
97
|
+
"files:read": "files:read";
|
|
98
|
+
"storage:get": "storage:get";
|
|
99
|
+
"storage:set": "storage:set";
|
|
100
|
+
"storage:delete": "storage:delete";
|
|
101
|
+
"storage:list": "storage:list";
|
|
102
|
+
"state:getActiveNoteSummary": "state:getActiveNoteSummary";
|
|
103
|
+
"events:unsubscribe": "events:unsubscribe";
|
|
104
|
+
"actions:invoke": "actions:invoke";
|
|
105
|
+
"ai:models:list": "ai:models:list";
|
|
106
|
+
"notes:listFolders": "notes:listFolders";
|
|
107
|
+
"notes:list": "notes:list";
|
|
108
|
+
"notes:getContent": "notes:getContent";
|
|
109
|
+
"notes:create": "notes:create";
|
|
110
|
+
"notes:update": "notes:update";
|
|
111
|
+
"notes:delete": "notes:delete";
|
|
112
|
+
"notes:setMemo": "notes:setMemo";
|
|
113
|
+
"notes:getMemo": "notes:getMemo";
|
|
114
|
+
"notes:setSummary": "notes:setSummary";
|
|
115
|
+
"notes:appendTranscriptLine": "notes:appendTranscriptLine";
|
|
116
|
+
"notes:listComponents": "notes:listComponents";
|
|
117
|
+
"notes:getComponent": "notes:getComponent";
|
|
118
|
+
"notes:upsertComponent": "notes:upsertComponent";
|
|
119
|
+
"notes:deleteComponent": "notes:deleteComponent";
|
|
120
|
+
"folders:create": "folders:create";
|
|
121
|
+
"folders:rename": "folders:rename";
|
|
122
|
+
"folders:move": "folders:move";
|
|
123
|
+
"folders:delete": "folders:delete";
|
|
124
|
+
"recording:start": "recording:start";
|
|
125
|
+
"recording:stop": "recording:stop";
|
|
126
|
+
"recording:getStatus": "recording:getStatus";
|
|
127
|
+
"ai:summarize": "ai:summarize";
|
|
128
|
+
"files:attach": "files:attach";
|
|
129
|
+
"files:list": "files:list";
|
|
130
|
+
"files:delete": "files:delete";
|
|
131
|
+
"settings:get": "settings:get";
|
|
132
|
+
"settings:list": "settings:list";
|
|
133
|
+
}>;
|
|
134
|
+
export type PluginSdkMethod = z.infer<typeof pluginSdkMethodSchema>;
|
|
135
|
+
export declare const pluginSdkInvokeRequestSchema: z.ZodObject<{
|
|
136
|
+
requestId: z.ZodString;
|
|
137
|
+
method: z.ZodEnum<{
|
|
138
|
+
"events:subscribe": "events:subscribe";
|
|
139
|
+
"notes:select": "notes:select";
|
|
140
|
+
"files:read": "files:read";
|
|
141
|
+
"storage:get": "storage:get";
|
|
142
|
+
"storage:set": "storage:set";
|
|
143
|
+
"storage:delete": "storage:delete";
|
|
144
|
+
"storage:list": "storage:list";
|
|
145
|
+
"state:getActiveNoteSummary": "state:getActiveNoteSummary";
|
|
146
|
+
"events:unsubscribe": "events:unsubscribe";
|
|
147
|
+
"actions:invoke": "actions:invoke";
|
|
148
|
+
"ai:models:list": "ai:models:list";
|
|
149
|
+
"notes:listFolders": "notes:listFolders";
|
|
150
|
+
"notes:list": "notes:list";
|
|
151
|
+
"notes:getContent": "notes:getContent";
|
|
152
|
+
"notes:create": "notes:create";
|
|
153
|
+
"notes:update": "notes:update";
|
|
154
|
+
"notes:delete": "notes:delete";
|
|
155
|
+
"notes:setMemo": "notes:setMemo";
|
|
156
|
+
"notes:getMemo": "notes:getMemo";
|
|
157
|
+
"notes:setSummary": "notes:setSummary";
|
|
158
|
+
"notes:appendTranscriptLine": "notes:appendTranscriptLine";
|
|
159
|
+
"notes:listComponents": "notes:listComponents";
|
|
160
|
+
"notes:getComponent": "notes:getComponent";
|
|
161
|
+
"notes:upsertComponent": "notes:upsertComponent";
|
|
162
|
+
"notes:deleteComponent": "notes:deleteComponent";
|
|
163
|
+
"folders:create": "folders:create";
|
|
164
|
+
"folders:rename": "folders:rename";
|
|
165
|
+
"folders:move": "folders:move";
|
|
166
|
+
"folders:delete": "folders:delete";
|
|
167
|
+
"recording:start": "recording:start";
|
|
168
|
+
"recording:stop": "recording:stop";
|
|
169
|
+
"recording:getStatus": "recording:getStatus";
|
|
170
|
+
"ai:summarize": "ai:summarize";
|
|
171
|
+
"files:attach": "files:attach";
|
|
172
|
+
"files:list": "files:list";
|
|
173
|
+
"files:delete": "files:delete";
|
|
174
|
+
"settings:get": "settings:get";
|
|
175
|
+
"settings:list": "settings:list";
|
|
176
|
+
}>;
|
|
177
|
+
params: z.ZodOptional<z.ZodUnknown>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
export type PluginSdkInvokeRequest = z.infer<typeof pluginSdkInvokeRequestSchema>;
|
|
180
|
+
export declare const pluginAiModelIdSchema: z.ZodEnum<{
|
|
181
|
+
"gpt-5.4": "gpt-5.4";
|
|
182
|
+
auto: "auto";
|
|
183
|
+
local: "local";
|
|
184
|
+
}>;
|
|
185
|
+
export declare const pluginAiModelProviderSchema: z.ZodEnum<{
|
|
186
|
+
auto: "auto";
|
|
187
|
+
local: "local";
|
|
188
|
+
cloud: "cloud";
|
|
189
|
+
}>;
|
|
190
|
+
export declare const pluginAiModelAvailabilitySchema: z.ZodEnum<{
|
|
191
|
+
ready: "ready";
|
|
192
|
+
unavailable: "unavailable";
|
|
193
|
+
}>;
|
|
194
|
+
export declare const pluginAiEndpointSchema: z.ZodEnum<{
|
|
195
|
+
"chat.completions": "chat.completions";
|
|
196
|
+
}>;
|
|
197
|
+
export type PluginAiModelId = z.infer<typeof pluginAiModelIdSchema>;
|
|
198
|
+
export type PluginAiModelProvider = z.infer<typeof pluginAiModelProviderSchema>;
|
|
199
|
+
export type PluginAiModelAvailability = z.infer<typeof pluginAiModelAvailabilitySchema>;
|
|
200
|
+
export type PluginAiEndpoint = z.infer<typeof pluginAiEndpointSchema>;
|
|
201
|
+
export declare const pluginAiModelInfoSchema: z.ZodObject<{
|
|
202
|
+
id: z.ZodEnum<{
|
|
203
|
+
"gpt-5.4": "gpt-5.4";
|
|
204
|
+
auto: "auto";
|
|
205
|
+
local: "local";
|
|
206
|
+
}>;
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
provider: z.ZodEnum<{
|
|
209
|
+
auto: "auto";
|
|
210
|
+
local: "local";
|
|
211
|
+
cloud: "cloud";
|
|
212
|
+
}>;
|
|
213
|
+
supportsTools: z.ZodBoolean;
|
|
214
|
+
availability: z.ZodEnum<{
|
|
215
|
+
ready: "ready";
|
|
216
|
+
unavailable: "unavailable";
|
|
217
|
+
}>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export type PluginAiModelInfo = z.infer<typeof pluginAiModelInfoSchema>;
|
|
220
|
+
export declare const pluginAiStreamRequestSchema: z.ZodObject<{
|
|
221
|
+
requestId: z.ZodString;
|
|
222
|
+
endpoint: z.ZodEnum<{
|
|
223
|
+
"chat.completions": "chat.completions";
|
|
224
|
+
}>;
|
|
225
|
+
model: z.ZodDefault<z.ZodEnum<{
|
|
226
|
+
"gpt-5.4": "gpt-5.4";
|
|
227
|
+
auto: "auto";
|
|
228
|
+
local: "local";
|
|
229
|
+
}>>;
|
|
230
|
+
method: z.ZodLiteral<"POST">;
|
|
231
|
+
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
232
|
+
body: z.ZodString;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
export type PluginAiStreamRequest = z.infer<typeof pluginAiStreamRequestSchema>;
|
|
235
|
+
export declare const pluginAiStreamStartSchema: z.ZodObject<{
|
|
236
|
+
status: z.ZodNumber;
|
|
237
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
export type PluginAiStreamStart = z.infer<typeof pluginAiStreamStartSchema>;
|
|
240
|
+
export declare const pluginAiStreamErrorCodeSchema: z.ZodEnum<{
|
|
241
|
+
FORBIDDEN: "FORBIDDEN";
|
|
242
|
+
MODEL_UNAVAILABLE: "MODEL_UNAVAILABLE";
|
|
243
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
244
|
+
PROXY_ERROR: "PROXY_ERROR";
|
|
245
|
+
}>;
|
|
246
|
+
export type PluginAiStreamErrorCode = z.infer<typeof pluginAiStreamErrorCodeSchema>;
|
|
247
|
+
export declare const pluginAiStreamErrorSchema: z.ZodObject<{
|
|
248
|
+
code: z.ZodEnum<{
|
|
249
|
+
FORBIDDEN: "FORBIDDEN";
|
|
250
|
+
MODEL_UNAVAILABLE: "MODEL_UNAVAILABLE";
|
|
251
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
252
|
+
PROXY_ERROR: "PROXY_ERROR";
|
|
253
|
+
}>;
|
|
254
|
+
message: z.ZodString;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export type PluginAiStreamError = z.infer<typeof pluginAiStreamErrorSchema>;
|
|
257
|
+
export interface PluginAiStreamHandlers {
|
|
258
|
+
onStart(meta: PluginAiStreamStart): void;
|
|
259
|
+
onChunk(chunk: ArrayBuffer): void;
|
|
260
|
+
onEnd(): void;
|
|
261
|
+
onError(error: PluginAiStreamError): void;
|
|
262
|
+
}
|
|
263
|
+
export interface PluginAiStreamHandle {
|
|
264
|
+
cancel(): void;
|
|
265
|
+
}
|
|
266
|
+
export declare const pluginActionInvokeParamsSchema: z.ZodObject<{
|
|
267
|
+
action: z.ZodEnum<{
|
|
268
|
+
"notes.select": "notes.select";
|
|
269
|
+
"notes.create": "notes.create";
|
|
270
|
+
}>;
|
|
271
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
export declare const pluginSelectNotePayloadSchema: z.ZodObject<{
|
|
274
|
+
noteId: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
export declare const pluginCreateNotePayloadSchema: z.ZodObject<{
|
|
277
|
+
title: z.ZodString;
|
|
278
|
+
folderId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
export type PluginSelectNotePayload = z.infer<typeof pluginSelectNotePayloadSchema>;
|
|
281
|
+
export type PluginCreateNotePayload = z.infer<typeof pluginCreateNotePayloadSchema>;
|
|
282
|
+
export interface PluginActiveNoteSummary {
|
|
283
|
+
id: number;
|
|
284
|
+
title: string;
|
|
285
|
+
status: 'draft' | 'in_progress' | 'completed';
|
|
286
|
+
createdAt: string;
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
}
|
|
289
|
+
export interface PluginCreatedNoteSummary {
|
|
290
|
+
id?: number;
|
|
291
|
+
title: string;
|
|
292
|
+
folder_id: number | null;
|
|
293
|
+
lecture_date: string;
|
|
294
|
+
status: 'draft' | 'in_progress' | 'completed';
|
|
295
|
+
created_at: string;
|
|
296
|
+
updated_at?: string;
|
|
297
|
+
}
|
|
298
|
+
export interface PluginActionPayloadMap {
|
|
299
|
+
'notes.select': PluginSelectNotePayload;
|
|
300
|
+
'notes.create': PluginCreateNotePayload;
|
|
301
|
+
}
|
|
302
|
+
export interface PluginActionResultMap {
|
|
303
|
+
'notes.select': {
|
|
304
|
+
ok: true;
|
|
305
|
+
};
|
|
306
|
+
'notes.create': PluginCreatedNoteSummary;
|
|
307
|
+
}
|
|
308
|
+
export declare const pluginRecordingPhaseSchema: z.ZodEnum<{
|
|
309
|
+
idle: "idle";
|
|
310
|
+
recording: "recording";
|
|
311
|
+
paused: "paused";
|
|
312
|
+
}>;
|
|
313
|
+
export type PluginRecordingPhase = z.infer<typeof pluginRecordingPhaseSchema>;
|
|
314
|
+
export declare const pluginRecordingStatusSchema: z.ZodObject<{
|
|
315
|
+
status: z.ZodEnum<{
|
|
316
|
+
idle: "idle";
|
|
317
|
+
recording: "recording";
|
|
318
|
+
paused: "paused";
|
|
319
|
+
}>;
|
|
320
|
+
noteId: z.ZodNullable<z.ZodNumber>;
|
|
321
|
+
durationMs: z.ZodNumber;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
export type PluginRecordingStatus = z.infer<typeof pluginRecordingStatusSchema>;
|
|
324
|
+
export declare const pluginRecordingLevelSchema: z.ZodObject<{
|
|
325
|
+
micDb: z.ZodNumber;
|
|
326
|
+
systemDb: z.ZodNumber;
|
|
327
|
+
timestamp: z.ZodNumber;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export type PluginRecordingLevel = z.infer<typeof pluginRecordingLevelSchema>;
|
|
330
|
+
export type PluginHostEventPayload = {
|
|
331
|
+
event: 'activeNoteChanged';
|
|
332
|
+
data: PluginActiveNoteSummary | null;
|
|
333
|
+
} | {
|
|
334
|
+
event: 'recordingStatusChanged';
|
|
335
|
+
data: PluginRecordingStatus;
|
|
336
|
+
} | {
|
|
337
|
+
event: 'recordingLevel';
|
|
338
|
+
data: PluginRecordingLevel;
|
|
339
|
+
} | {
|
|
340
|
+
event: 'transcriptUpdated';
|
|
341
|
+
data: {
|
|
342
|
+
noteId: number;
|
|
343
|
+
};
|
|
344
|
+
} | {
|
|
345
|
+
event: 'noteCreated';
|
|
346
|
+
data: PluginNoteSummary;
|
|
347
|
+
} | {
|
|
348
|
+
event: 'noteUpdated';
|
|
349
|
+
data: PluginNoteSummary;
|
|
350
|
+
} | {
|
|
351
|
+
event: 'noteDeleted';
|
|
352
|
+
data: {
|
|
353
|
+
noteId: number;
|
|
354
|
+
};
|
|
355
|
+
} | {
|
|
356
|
+
event: 'folderCreated';
|
|
357
|
+
data: PluginFolderNode;
|
|
358
|
+
} | {
|
|
359
|
+
event: 'folderUpdated';
|
|
360
|
+
data: PluginFolderNode;
|
|
361
|
+
} | {
|
|
362
|
+
event: 'folderDeleted';
|
|
363
|
+
data: {
|
|
364
|
+
folderId: number;
|
|
365
|
+
};
|
|
366
|
+
} | {
|
|
367
|
+
event: 'componentUpdated';
|
|
368
|
+
data: PluginNoteComponentSummary;
|
|
369
|
+
} | {
|
|
370
|
+
event: 'settingChanged';
|
|
371
|
+
data: {
|
|
372
|
+
key: PluginAppSettingKey;
|
|
373
|
+
value: PluginAppSettingValue;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
export type PluginEventData<TEvent extends PluginEvent> = Extract<PluginHostEventPayload, {
|
|
377
|
+
event: TEvent;
|
|
378
|
+
}>['data'];
|
|
379
|
+
export declare const pluginNoteStatusSchema: z.ZodEnum<{
|
|
380
|
+
draft: "draft";
|
|
381
|
+
in_progress: "in_progress";
|
|
382
|
+
completed: "completed";
|
|
383
|
+
}>;
|
|
384
|
+
export type PluginNoteStatus = z.infer<typeof pluginNoteStatusSchema>;
|
|
385
|
+
export declare const pluginNoteSummarySchema: z.ZodObject<{
|
|
386
|
+
id: z.ZodNumber;
|
|
387
|
+
title: z.ZodString;
|
|
388
|
+
folderId: z.ZodNullable<z.ZodNumber>;
|
|
389
|
+
status: z.ZodEnum<{
|
|
390
|
+
draft: "draft";
|
|
391
|
+
in_progress: "in_progress";
|
|
392
|
+
completed: "completed";
|
|
393
|
+
}>;
|
|
394
|
+
createdAt: z.ZodString;
|
|
395
|
+
updatedAt: z.ZodString;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
export type PluginNoteSummary = z.infer<typeof pluginNoteSummarySchema>;
|
|
398
|
+
export interface PluginFolderNode {
|
|
399
|
+
id: number;
|
|
400
|
+
name: string;
|
|
401
|
+
parentId: number | null;
|
|
402
|
+
children: PluginFolderNode[];
|
|
403
|
+
}
|
|
404
|
+
export declare const pluginFolderNodeSchema: z.ZodType<PluginFolderNode>;
|
|
405
|
+
export declare const PLUGIN_NOTES_LIST_MAX_LIMIT = 200;
|
|
406
|
+
export declare const PLUGIN_NOTES_LIST_DEFAULT_LIMIT = 50;
|
|
407
|
+
export declare const pluginNotesListParamsSchema: z.ZodObject<{
|
|
408
|
+
folderId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
409
|
+
query: z.ZodOptional<z.ZodString>;
|
|
410
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
export type PluginNotesListParams = z.infer<typeof pluginNotesListParamsSchema>;
|
|
413
|
+
export declare const pluginNoteContentSchema: z.ZodObject<{
|
|
414
|
+
id: z.ZodNumber;
|
|
415
|
+
title: z.ZodString;
|
|
416
|
+
transcript: z.ZodString;
|
|
417
|
+
memo: z.ZodString;
|
|
418
|
+
summary: z.ZodString;
|
|
419
|
+
}, z.core.$strip>;
|
|
420
|
+
export type PluginNoteContent = z.infer<typeof pluginNoteContentSchema>;
|
|
421
|
+
export declare const pluginGetNoteContentParamsSchema: z.ZodObject<{
|
|
422
|
+
noteId: z.ZodNumber;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
export type PluginGetNoteContentParams = z.infer<typeof pluginGetNoteContentParamsSchema>;
|
|
425
|
+
/**
|
|
426
|
+
* Plugin-visible note component summary. Mirrors the shape exposed by the
|
|
427
|
+
* `componentUpdated` event so plugins can react to changes without re-listing.
|
|
428
|
+
*
|
|
429
|
+
* `componentType` lists every component the database supports today; new
|
|
430
|
+
* types may be added in future migrations and should be treated as opaque
|
|
431
|
+
* by plugins that don't recognize them.
|
|
432
|
+
*/
|
|
433
|
+
export declare const pluginNoteComponentTypeSchema: z.ZodEnum<{
|
|
434
|
+
recording: "recording";
|
|
435
|
+
slides: "slides";
|
|
436
|
+
memo: "memo";
|
|
437
|
+
transcript: "transcript";
|
|
438
|
+
summary: "summary";
|
|
439
|
+
slide_summary: "slide_summary";
|
|
440
|
+
meeting_notes: "meeting_notes";
|
|
441
|
+
}>;
|
|
442
|
+
export type PluginNoteComponentType = z.infer<typeof pluginNoteComponentTypeSchema>;
|
|
443
|
+
export declare const pluginNoteComponentSummarySchema: z.ZodObject<{
|
|
444
|
+
id: z.ZodNumber;
|
|
445
|
+
noteId: z.ZodNumber;
|
|
446
|
+
componentType: z.ZodEnum<{
|
|
447
|
+
recording: "recording";
|
|
448
|
+
slides: "slides";
|
|
449
|
+
memo: "memo";
|
|
450
|
+
transcript: "transcript";
|
|
451
|
+
summary: "summary";
|
|
452
|
+
slide_summary: "slide_summary";
|
|
453
|
+
meeting_notes: "meeting_notes";
|
|
454
|
+
}>;
|
|
455
|
+
title: z.ZodString;
|
|
456
|
+
displayOrder: z.ZodNumber;
|
|
457
|
+
hasFile: z.ZodBoolean;
|
|
458
|
+
createdAt: z.ZodString;
|
|
459
|
+
updatedAt: z.ZodString;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
export type PluginNoteComponentSummary = z.infer<typeof pluginNoteComponentSummarySchema>;
|
|
462
|
+
export declare const pluginUpdateNoteParamsSchema: z.ZodObject<{
|
|
463
|
+
noteId: z.ZodNumber;
|
|
464
|
+
title: z.ZodOptional<z.ZodString>;
|
|
465
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
draft: "draft";
|
|
467
|
+
in_progress: "in_progress";
|
|
468
|
+
completed: "completed";
|
|
469
|
+
}>>;
|
|
470
|
+
folderId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
export type PluginUpdateNoteParams = z.infer<typeof pluginUpdateNoteParamsSchema>;
|
|
473
|
+
export declare const pluginDeleteNoteParamsSchema: z.ZodObject<{
|
|
474
|
+
noteId: z.ZodNumber;
|
|
475
|
+
}, z.core.$strip>;
|
|
476
|
+
export type PluginDeleteNoteParams = z.infer<typeof pluginDeleteNoteParamsSchema>;
|
|
477
|
+
export declare const pluginSetMemoParamsSchema: z.ZodObject<{
|
|
478
|
+
noteId: z.ZodNumber;
|
|
479
|
+
markdown: z.ZodString;
|
|
480
|
+
}, z.core.$strip>;
|
|
481
|
+
export type PluginSetMemoParams = z.infer<typeof pluginSetMemoParamsSchema>;
|
|
482
|
+
export declare const pluginGetMemoParamsSchema: z.ZodObject<{
|
|
483
|
+
noteId: z.ZodNumber;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
export type PluginGetMemoParams = z.infer<typeof pluginGetMemoParamsSchema>;
|
|
486
|
+
export declare const pluginSetSummaryParamsSchema: z.ZodObject<{
|
|
487
|
+
noteId: z.ZodNumber;
|
|
488
|
+
markdown: z.ZodString;
|
|
489
|
+
}, z.core.$strip>;
|
|
490
|
+
export type PluginSetSummaryParams = z.infer<typeof pluginSetSummaryParamsSchema>;
|
|
491
|
+
/**
|
|
492
|
+
* Single transcript line to append. Times are in milliseconds relative to the
|
|
493
|
+
* start of the note's recording. End is optional — when omitted, the line is
|
|
494
|
+
* treated as a point-in-time annotation rather than a duration.
|
|
495
|
+
*/
|
|
496
|
+
export declare const pluginAppendTranscriptLineParamsSchema: z.ZodObject<{
|
|
497
|
+
noteId: z.ZodNumber;
|
|
498
|
+
text: z.ZodString;
|
|
499
|
+
startMs: z.ZodNumber;
|
|
500
|
+
endMs: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
speaker: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
export type PluginAppendTranscriptLineParams = z.infer<typeof pluginAppendTranscriptLineParamsSchema>;
|
|
504
|
+
export declare const pluginListComponentsParamsSchema: z.ZodObject<{
|
|
505
|
+
noteId: z.ZodNumber;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
export type PluginListComponentsParams = z.infer<typeof pluginListComponentsParamsSchema>;
|
|
508
|
+
export declare const pluginGetComponentParamsSchema: z.ZodObject<{
|
|
509
|
+
componentId: z.ZodNumber;
|
|
510
|
+
}, z.core.$strip>;
|
|
511
|
+
export type PluginGetComponentParams = z.infer<typeof pluginGetComponentParamsSchema>;
|
|
512
|
+
/**
|
|
513
|
+
* Plugin-visible note component, including raw content_text. Read-only — to
|
|
514
|
+
* mutate, use the type-specific methods (setMemo, setSummary, appendTranscriptLine)
|
|
515
|
+
* or upsertComponent for new text-based components.
|
|
516
|
+
*/
|
|
517
|
+
export declare const pluginNoteComponentSchema: z.ZodObject<{
|
|
518
|
+
id: z.ZodNumber;
|
|
519
|
+
noteId: z.ZodNumber;
|
|
520
|
+
componentType: z.ZodEnum<{
|
|
521
|
+
recording: "recording";
|
|
522
|
+
slides: "slides";
|
|
523
|
+
memo: "memo";
|
|
524
|
+
transcript: "transcript";
|
|
525
|
+
summary: "summary";
|
|
526
|
+
slide_summary: "slide_summary";
|
|
527
|
+
meeting_notes: "meeting_notes";
|
|
528
|
+
}>;
|
|
529
|
+
title: z.ZodString;
|
|
530
|
+
displayOrder: z.ZodNumber;
|
|
531
|
+
hasFile: z.ZodBoolean;
|
|
532
|
+
createdAt: z.ZodString;
|
|
533
|
+
updatedAt: z.ZodString;
|
|
534
|
+
contentText: z.ZodNullable<z.ZodString>;
|
|
535
|
+
}, z.core.$strip>;
|
|
536
|
+
export type PluginNoteComponent = z.infer<typeof pluginNoteComponentSchema>;
|
|
537
|
+
/**
|
|
538
|
+
* Text-based component types that plugins can create directly. File-based
|
|
539
|
+
* components (slides, recording) must go through `alt.files.attach` instead.
|
|
540
|
+
*/
|
|
541
|
+
export declare const pluginUpsertableComponentTypeSchema: z.ZodEnum<{
|
|
542
|
+
memo: "memo";
|
|
543
|
+
transcript: "transcript";
|
|
544
|
+
summary: "summary";
|
|
545
|
+
slide_summary: "slide_summary";
|
|
546
|
+
meeting_notes: "meeting_notes";
|
|
547
|
+
}>;
|
|
548
|
+
export type PluginUpsertableComponentType = z.infer<typeof pluginUpsertableComponentTypeSchema>;
|
|
549
|
+
export declare const pluginUpsertComponentParamsSchema: z.ZodObject<{
|
|
550
|
+
noteId: z.ZodNumber;
|
|
551
|
+
componentId: z.ZodOptional<z.ZodNumber>;
|
|
552
|
+
componentType: z.ZodEnum<{
|
|
553
|
+
memo: "memo";
|
|
554
|
+
transcript: "transcript";
|
|
555
|
+
summary: "summary";
|
|
556
|
+
slide_summary: "slide_summary";
|
|
557
|
+
meeting_notes: "meeting_notes";
|
|
558
|
+
}>;
|
|
559
|
+
title: z.ZodString;
|
|
560
|
+
contentText: z.ZodString;
|
|
561
|
+
displayOrder: z.ZodOptional<z.ZodNumber>;
|
|
562
|
+
}, z.core.$strip>;
|
|
563
|
+
export type PluginUpsertComponentParams = z.infer<typeof pluginUpsertComponentParamsSchema>;
|
|
564
|
+
export declare const pluginDeleteComponentParamsSchema: z.ZodObject<{
|
|
565
|
+
componentId: z.ZodNumber;
|
|
566
|
+
}, z.core.$strip>;
|
|
567
|
+
export type PluginDeleteComponentParams = z.infer<typeof pluginDeleteComponentParamsSchema>;
|
|
568
|
+
export declare const pluginCreateFolderParamsSchema: z.ZodObject<{
|
|
569
|
+
name: z.ZodString;
|
|
570
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
571
|
+
}, z.core.$strip>;
|
|
572
|
+
export type PluginCreateFolderParams = z.infer<typeof pluginCreateFolderParamsSchema>;
|
|
573
|
+
export declare const pluginRenameFolderParamsSchema: z.ZodObject<{
|
|
574
|
+
folderId: z.ZodNumber;
|
|
575
|
+
name: z.ZodString;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
|
+
export type PluginRenameFolderParams = z.infer<typeof pluginRenameFolderParamsSchema>;
|
|
578
|
+
export declare const pluginMoveFolderParamsSchema: z.ZodObject<{
|
|
579
|
+
folderId: z.ZodNumber;
|
|
580
|
+
parentId: z.ZodNullable<z.ZodNumber>;
|
|
581
|
+
}, z.core.$strip>;
|
|
582
|
+
export type PluginMoveFolderParams = z.infer<typeof pluginMoveFolderParamsSchema>;
|
|
583
|
+
export declare const pluginDeleteFolderParamsSchema: z.ZodObject<{
|
|
584
|
+
folderId: z.ZodNumber;
|
|
585
|
+
}, z.core.$strip>;
|
|
586
|
+
export type PluginDeleteFolderParams = z.infer<typeof pluginDeleteFolderParamsSchema>;
|
|
587
|
+
export declare const pluginRecordingStartParamsSchema: z.ZodObject<{
|
|
588
|
+
noteId: z.ZodNumber;
|
|
589
|
+
lectureLanguage: z.ZodOptional<z.ZodString>;
|
|
590
|
+
targetTranslationLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
591
|
+
includeSystemAudio: z.ZodOptional<z.ZodBoolean>;
|
|
592
|
+
selectedDeviceId: z.ZodOptional<z.ZodString>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
export type PluginRecordingStartParams = z.infer<typeof pluginRecordingStartParamsSchema>;
|
|
595
|
+
/** Single segment of transcribed audio in milliseconds. */
|
|
596
|
+
export declare const pluginTranscriptionSegmentSchema: z.ZodObject<{
|
|
597
|
+
startMs: z.ZodNumber;
|
|
598
|
+
endMs: z.ZodNumber;
|
|
599
|
+
text: z.ZodString;
|
|
600
|
+
speaker: z.ZodOptional<z.ZodString>;
|
|
601
|
+
}, z.core.$strip>;
|
|
602
|
+
export type PluginTranscriptionSegment = z.infer<typeof pluginTranscriptionSegmentSchema>;
|
|
603
|
+
export declare const pluginTranscribeFileRequestSchema: z.ZodObject<{
|
|
604
|
+
requestId: z.ZodString;
|
|
605
|
+
filePath: z.ZodString;
|
|
606
|
+
language: z.ZodOptional<z.ZodString>;
|
|
607
|
+
diarization: z.ZodOptional<z.ZodBoolean>;
|
|
608
|
+
}, z.core.$strip>;
|
|
609
|
+
export type PluginTranscribeFileRequest = z.infer<typeof pluginTranscribeFileRequestSchema>;
|
|
610
|
+
export declare const pluginTranscribeNoteRequestSchema: z.ZodObject<{
|
|
611
|
+
requestId: z.ZodString;
|
|
612
|
+
noteId: z.ZodNumber;
|
|
613
|
+
language: z.ZodOptional<z.ZodString>;
|
|
614
|
+
diarization: z.ZodOptional<z.ZodBoolean>;
|
|
615
|
+
}, z.core.$strip>;
|
|
616
|
+
export type PluginTranscribeNoteRequest = z.infer<typeof pluginTranscribeNoteRequestSchema>;
|
|
617
|
+
export declare const pluginTranscriptionStartSchema: z.ZodObject<{
|
|
618
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
export type PluginTranscriptionStart = z.infer<typeof pluginTranscriptionStartSchema>;
|
|
621
|
+
export declare const pluginTranscriptionProgressSchema: z.ZodObject<{
|
|
622
|
+
fraction: z.ZodNumber;
|
|
623
|
+
}, z.core.$strip>;
|
|
624
|
+
export type PluginTranscriptionProgress = z.infer<typeof pluginTranscriptionProgressSchema>;
|
|
625
|
+
export declare const pluginTranscriptionStreamErrorCodeSchema: z.ZodEnum<{
|
|
626
|
+
FORBIDDEN: "FORBIDDEN";
|
|
627
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
628
|
+
RECORDING_ACTIVE: "RECORDING_ACTIVE";
|
|
629
|
+
FILE_UNAVAILABLE: "FILE_UNAVAILABLE";
|
|
630
|
+
PIPELINE_ERROR: "PIPELINE_ERROR";
|
|
631
|
+
}>;
|
|
632
|
+
export type PluginTranscriptionStreamErrorCode = z.infer<typeof pluginTranscriptionStreamErrorCodeSchema>;
|
|
633
|
+
export declare const pluginTranscriptionStreamErrorSchema: z.ZodObject<{
|
|
634
|
+
code: z.ZodEnum<{
|
|
635
|
+
FORBIDDEN: "FORBIDDEN";
|
|
636
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
637
|
+
RECORDING_ACTIVE: "RECORDING_ACTIVE";
|
|
638
|
+
FILE_UNAVAILABLE: "FILE_UNAVAILABLE";
|
|
639
|
+
PIPELINE_ERROR: "PIPELINE_ERROR";
|
|
640
|
+
}>;
|
|
641
|
+
message: z.ZodString;
|
|
642
|
+
}, z.core.$strip>;
|
|
643
|
+
export type PluginTranscriptionStreamError = z.infer<typeof pluginTranscriptionStreamErrorSchema>;
|
|
644
|
+
export interface PluginTranscriptionStreamHandlers {
|
|
645
|
+
onStart(meta: PluginTranscriptionStart): void;
|
|
646
|
+
onSegment(segment: PluginTranscriptionSegment): void;
|
|
647
|
+
onProgress(progress: PluginTranscriptionProgress): void;
|
|
648
|
+
onEnd(result: {
|
|
649
|
+
segments: PluginTranscriptionSegment[];
|
|
650
|
+
}): void;
|
|
651
|
+
onError(error: PluginTranscriptionStreamError): void;
|
|
652
|
+
}
|
|
653
|
+
export interface PluginTranscriptionStreamHandle {
|
|
654
|
+
cancel(): void;
|
|
655
|
+
}
|
|
656
|
+
export declare const pluginAiChatMessageRoleSchema: z.ZodEnum<{
|
|
657
|
+
system: "system";
|
|
658
|
+
user: "user";
|
|
659
|
+
assistant: "assistant";
|
|
660
|
+
}>;
|
|
661
|
+
export type PluginAiChatMessageRole = z.infer<typeof pluginAiChatMessageRoleSchema>;
|
|
662
|
+
export declare const pluginAiChatMessageSchema: z.ZodObject<{
|
|
663
|
+
role: z.ZodEnum<{
|
|
664
|
+
system: "system";
|
|
665
|
+
user: "user";
|
|
666
|
+
assistant: "assistant";
|
|
667
|
+
}>;
|
|
668
|
+
content: z.ZodString;
|
|
669
|
+
}, z.core.$strip>;
|
|
670
|
+
export type PluginAiChatMessage = z.infer<typeof pluginAiChatMessageSchema>;
|
|
671
|
+
export declare const pluginAiCompleteRequestSchema: z.ZodObject<{
|
|
672
|
+
requestId: z.ZodString;
|
|
673
|
+
model: z.ZodDefault<z.ZodEnum<{
|
|
674
|
+
"gpt-5.4": "gpt-5.4";
|
|
675
|
+
auto: "auto";
|
|
676
|
+
local: "local";
|
|
677
|
+
}>>;
|
|
678
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
679
|
+
role: z.ZodEnum<{
|
|
680
|
+
system: "system";
|
|
681
|
+
user: "user";
|
|
682
|
+
assistant: "assistant";
|
|
683
|
+
}>;
|
|
684
|
+
content: z.ZodString;
|
|
685
|
+
}, z.core.$strip>>;
|
|
686
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
687
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
688
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
export type PluginAiCompleteRequest = z.input<typeof pluginAiCompleteRequestSchema>;
|
|
691
|
+
export declare const pluginAiCompleteResultSchema: z.ZodObject<{
|
|
692
|
+
text: z.ZodString;
|
|
693
|
+
finishReason: z.ZodNullable<z.ZodString>;
|
|
694
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
695
|
+
}, z.core.$strip>;
|
|
696
|
+
export type PluginAiCompleteResult = z.infer<typeof pluginAiCompleteResultSchema>;
|
|
697
|
+
/**
|
|
698
|
+
* Plugin-facing summarize request. The host pulls the note's transcript and
|
|
699
|
+
* existing memo, runs them through Alt's built-in summarize prompt, and
|
|
700
|
+
* returns the final markdown.
|
|
701
|
+
*/
|
|
702
|
+
export declare const pluginAiSummarizeRequestSchema: z.ZodObject<{
|
|
703
|
+
noteId: z.ZodNumber;
|
|
704
|
+
style: z.ZodOptional<z.ZodString>;
|
|
705
|
+
outputLanguage: z.ZodOptional<z.ZodString>;
|
|
706
|
+
model: z.ZodDefault<z.ZodEnum<{
|
|
707
|
+
"gpt-5.4": "gpt-5.4";
|
|
708
|
+
auto: "auto";
|
|
709
|
+
local: "local";
|
|
710
|
+
}>>;
|
|
711
|
+
}, z.core.$strip>;
|
|
712
|
+
export type PluginAiSummarizeRequest = z.input<typeof pluginAiSummarizeRequestSchema>;
|
|
713
|
+
export declare const pluginAiSummarizeResultSchema: z.ZodObject<{
|
|
714
|
+
noteId: z.ZodNumber;
|
|
715
|
+
text: z.ZodString;
|
|
716
|
+
}, z.core.$strip>;
|
|
717
|
+
export type PluginAiSummarizeResult = z.infer<typeof pluginAiSummarizeResultSchema>;
|
|
718
|
+
/**
|
|
719
|
+
* File-based component types a plugin can attach. Mirrors the database
|
|
720
|
+
* constraint — only these two component_types may carry a file_inode.
|
|
721
|
+
*/
|
|
722
|
+
export declare const pluginAttachableComponentTypeSchema: z.ZodEnum<{
|
|
723
|
+
recording: "recording";
|
|
724
|
+
slides: "slides";
|
|
725
|
+
}>;
|
|
726
|
+
export type PluginAttachableComponentType = z.infer<typeof pluginAttachableComponentTypeSchema>;
|
|
727
|
+
export declare const pluginAttachFileParamsSchema: z.ZodObject<{
|
|
728
|
+
noteId: z.ZodNumber;
|
|
729
|
+
fileName: z.ZodString;
|
|
730
|
+
data: z.ZodCustom<ArrayBuffer, ArrayBuffer>;
|
|
731
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
732
|
+
componentType: z.ZodEnum<{
|
|
733
|
+
recording: "recording";
|
|
734
|
+
slides: "slides";
|
|
735
|
+
}>;
|
|
736
|
+
title: z.ZodOptional<z.ZodString>;
|
|
737
|
+
displayOrder: z.ZodOptional<z.ZodNumber>;
|
|
738
|
+
}, z.core.$strip>;
|
|
739
|
+
export type PluginAttachFileParams = z.input<typeof pluginAttachFileParamsSchema>;
|
|
740
|
+
export declare const pluginAttachedFileSchema: z.ZodObject<{
|
|
741
|
+
componentId: z.ZodNumber;
|
|
742
|
+
fileId: z.ZodNumber;
|
|
743
|
+
fileName: z.ZodString;
|
|
744
|
+
mimeType: z.ZodNullable<z.ZodString>;
|
|
745
|
+
sizeBytes: z.ZodNumber;
|
|
746
|
+
}, z.core.$strip>;
|
|
747
|
+
export type PluginAttachedFile = z.infer<typeof pluginAttachedFileSchema>;
|
|
748
|
+
export declare const pluginListFilesParamsSchema: z.ZodObject<{
|
|
749
|
+
noteId: z.ZodNumber;
|
|
750
|
+
}, z.core.$strip>;
|
|
751
|
+
export type PluginListFilesParams = z.infer<typeof pluginListFilesParamsSchema>;
|
|
752
|
+
export declare const pluginReadFileParamsSchema: z.ZodObject<{
|
|
753
|
+
fileId: z.ZodNumber;
|
|
754
|
+
}, z.core.$strip>;
|
|
755
|
+
export type PluginReadFileParams = z.infer<typeof pluginReadFileParamsSchema>;
|
|
756
|
+
export declare const pluginReadFileResultSchema: z.ZodObject<{
|
|
757
|
+
fileName: z.ZodString;
|
|
758
|
+
mimeType: z.ZodNullable<z.ZodString>;
|
|
759
|
+
sizeBytes: z.ZodNumber;
|
|
760
|
+
data: z.ZodCustom<ArrayBuffer, ArrayBuffer>;
|
|
761
|
+
}, z.core.$strip>;
|
|
762
|
+
export type PluginReadFileResult = z.infer<typeof pluginReadFileResultSchema>;
|
|
763
|
+
export declare const pluginDeleteFileParamsSchema: z.ZodObject<{
|
|
764
|
+
componentId: z.ZodNumber;
|
|
765
|
+
}, z.core.$strip>;
|
|
766
|
+
export type PluginDeleteFileParams = z.infer<typeof pluginDeleteFileParamsSchema>;
|
|
767
|
+
/**
|
|
768
|
+
* Curated set of app-level setting keys plugins can read. Adding keys here
|
|
769
|
+
* is an explicit API decision — anything not listed is intentionally hidden
|
|
770
|
+
* from plugins.
|
|
771
|
+
*/
|
|
772
|
+
export declare const pluginAppSettingKeySchema: z.ZodEnum<{
|
|
773
|
+
theme: "theme";
|
|
774
|
+
language: "language";
|
|
775
|
+
"transcription.lectureLanguage": "transcription.lectureLanguage";
|
|
776
|
+
"transcription.diarizationEnabled": "transcription.diarizationEnabled";
|
|
777
|
+
"transcription.includeSystemAudio": "transcription.includeSystemAudio";
|
|
778
|
+
}>;
|
|
779
|
+
export type PluginAppSettingKey = z.infer<typeof pluginAppSettingKeySchema>;
|
|
780
|
+
export declare const pluginAppSettingValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
781
|
+
export type PluginAppSettingValue = z.infer<typeof pluginAppSettingValueSchema>;
|
|
782
|
+
export declare const pluginGetSettingParamsSchema: z.ZodObject<{
|
|
783
|
+
key: z.ZodEnum<{
|
|
784
|
+
theme: "theme";
|
|
785
|
+
language: "language";
|
|
786
|
+
"transcription.lectureLanguage": "transcription.lectureLanguage";
|
|
787
|
+
"transcription.diarizationEnabled": "transcription.diarizationEnabled";
|
|
788
|
+
"transcription.includeSystemAudio": "transcription.includeSystemAudio";
|
|
789
|
+
}>;
|
|
790
|
+
}, z.core.$strip>;
|
|
791
|
+
export type PluginGetSettingParams = z.infer<typeof pluginGetSettingParamsSchema>;
|
|
792
|
+
export declare const pluginSettingsSnapshotSchema: z.ZodRecord<z.ZodEnum<{
|
|
793
|
+
theme: "theme";
|
|
794
|
+
language: "language";
|
|
795
|
+
"transcription.lectureLanguage": "transcription.lectureLanguage";
|
|
796
|
+
"transcription.diarizationEnabled": "transcription.diarizationEnabled";
|
|
797
|
+
"transcription.includeSystemAudio": "transcription.includeSystemAudio";
|
|
798
|
+
}>, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
799
|
+
export type PluginSettingsSnapshot = z.infer<typeof pluginSettingsSnapshotSchema>;
|
|
800
|
+
//# sourceMappingURL=contracts.d.ts.map
|