tauri-agent-tools 0.6.0 → 0.7.1

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.
Files changed (89) hide show
  1. package/.agents/skills/tauri-agent-tools/SKILL.md +94 -5
  2. package/.agents/skills/tauri-bridge-setup/SKILL.md +45 -13
  3. package/.agents/skills/tauri-debug-quickstart/SKILL.md +80 -0
  4. package/README.md +72 -4
  5. package/dist/bridge/client.d.ts +17 -1
  6. package/dist/bridge/client.js +82 -1
  7. package/dist/bridge/client.js.map +1 -1
  8. package/dist/bridge/tokenDiscovery.js +29 -29
  9. package/dist/bridge/tokenDiscovery.js.map +1 -1
  10. package/dist/cli.js +25 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/appPaths.d.ts +2 -0
  13. package/dist/commands/appPaths.js +97 -0
  14. package/dist/commands/appPaths.js.map +1 -0
  15. package/dist/commands/capabilitiesAudit.d.ts +2 -0
  16. package/dist/commands/capabilitiesAudit.js +105 -0
  17. package/dist/commands/capabilitiesAudit.js.map +1 -0
  18. package/dist/commands/capture.js +1 -1
  19. package/dist/commands/configInspect.d.ts +2 -0
  20. package/dist/commands/configInspect.js +223 -0
  21. package/dist/commands/configInspect.js.map +1 -0
  22. package/dist/commands/diagnose.d.ts +2 -0
  23. package/dist/commands/diagnose.js +311 -0
  24. package/dist/commands/diagnose.js.map +1 -0
  25. package/dist/commands/forensics.d.ts +2 -0
  26. package/dist/commands/forensics.js +331 -0
  27. package/dist/commands/forensics.js.map +1 -0
  28. package/dist/commands/health.d.ts +2 -0
  29. package/dist/commands/health.js +39 -0
  30. package/dist/commands/health.js.map +1 -0
  31. package/dist/commands/invoke.js +14 -4
  32. package/dist/commands/invoke.js.map +1 -1
  33. package/dist/commands/ipcMonitor.d.ts +3 -0
  34. package/dist/commands/ipcMonitor.js +22 -10
  35. package/dist/commands/ipcMonitor.js.map +1 -1
  36. package/dist/commands/osLogs.d.ts +2 -0
  37. package/dist/commands/osLogs.js +130 -0
  38. package/dist/commands/osLogs.js.map +1 -0
  39. package/dist/commands/pageState.d.ts +1 -0
  40. package/dist/commands/pageState.js +2 -2
  41. package/dist/commands/pageState.js.map +1 -1
  42. package/dist/commands/processTree.d.ts +2 -0
  43. package/dist/commands/processTree.js +45 -0
  44. package/dist/commands/processTree.js.map +1 -0
  45. package/dist/commands/sidecarReplay.d.ts +7 -0
  46. package/dist/commands/sidecarReplay.js +93 -0
  47. package/dist/commands/sidecarReplay.js.map +1 -0
  48. package/dist/commands/sidecarTap.d.ts +2 -0
  49. package/dist/commands/sidecarTap.js +118 -0
  50. package/dist/commands/sidecarTap.js.map +1 -0
  51. package/dist/commands/snapshot.js +1 -1
  52. package/dist/commands/webviewAttach.d.ts +2 -0
  53. package/dist/commands/webviewAttach.js +64 -0
  54. package/dist/commands/webviewAttach.js.map +1 -0
  55. package/dist/platform/oslog/darwin.d.ts +21 -0
  56. package/dist/platform/oslog/darwin.js +72 -0
  57. package/dist/platform/oslog/darwin.js.map +1 -0
  58. package/dist/platform/oslog/linux.d.ts +16 -0
  59. package/dist/platform/oslog/linux.js +47 -0
  60. package/dist/platform/oslog/linux.js.map +1 -0
  61. package/dist/platform/oslog/windows.d.ts +15 -0
  62. package/dist/platform/oslog/windows.js +16 -0
  63. package/dist/platform/oslog/windows.js.map +1 -0
  64. package/dist/schemas/bridge.d.ts +222 -0
  65. package/dist/schemas/bridge.js +44 -0
  66. package/dist/schemas/bridge.js.map +1 -1
  67. package/dist/schemas/osLog.d.ts +34 -0
  68. package/dist/schemas/osLog.js +18 -0
  69. package/dist/schemas/osLog.js.map +1 -0
  70. package/dist/schemas/sidecar.d.ts +33 -0
  71. package/dist/schemas/sidecar.js +17 -0
  72. package/dist/schemas/sidecar.js.map +1 -0
  73. package/dist/schemas/tauriConfig.d.ts +825 -0
  74. package/dist/schemas/tauriConfig.js +102 -0
  75. package/dist/schemas/tauriConfig.js.map +1 -0
  76. package/dist/util/ndjson.d.ts +37 -0
  77. package/dist/util/ndjson.js +82 -0
  78. package/dist/util/ndjson.js.map +1 -0
  79. package/dist/util/tauriConfig.d.ts +63 -0
  80. package/dist/util/tauriConfig.js +235 -0
  81. package/dist/util/tauriConfig.js.map +1 -0
  82. package/examples/frontend-stub/index.html +1 -0
  83. package/examples/tauri-bridge/Cargo.toml +6 -0
  84. package/examples/tauri-bridge/build.rs +3 -0
  85. package/examples/tauri-bridge/icons/icon.png +0 -0
  86. package/examples/tauri-bridge/src/dev_bridge.rs +536 -43
  87. package/examples/tauri-bridge/tauri.conf.json +25 -0
  88. package/package.json +3 -1
  89. package/rust-bridge/README.md +10 -1
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Build `log stream` args for the macOS unified log. We filter by either the
3
+ * subsystem (matches `OSLog.Logger`/Rust `tracing` subsystem when configured)
4
+ * or by sender image path (catches everything the app process emits even when
5
+ * the subsystem isn't set). Returns argv suitable for execFile.
6
+ */
7
+ export function buildArgs({ identifier, productName, since }) {
8
+ const predicate = `subsystem == "${identifier}" OR senderImagePath CONTAINS[c] "${productName}"`;
9
+ const args = ['stream', '--predicate', predicate, '--style', 'ndjson'];
10
+ if (since) {
11
+ // `log stream` doesn't support --start directly; we accept the flag and
12
+ // surface it to the caller, but the actual time-based filter must be done
13
+ // client-side via `--last`/`show`. For `stream`, --since is informational.
14
+ // Callers wanting historical logs should use a separate `log show` variant.
15
+ }
16
+ return args;
17
+ }
18
+ /**
19
+ * Parse a single `log stream --style ndjson` line into our normalized shape.
20
+ * Returns null when the line is metadata (e.g., the initial "Filtering the
21
+ * log data using…" line which is not valid JSON).
22
+ */
23
+ export function parseLine(line) {
24
+ if (!line.trim().startsWith('{'))
25
+ return null;
26
+ let raw;
27
+ try {
28
+ raw = JSON.parse(line);
29
+ }
30
+ catch {
31
+ return null;
32
+ }
33
+ const ts = typeof raw['timestamp'] === 'string'
34
+ ? raw['timestamp']
35
+ : new Date().toISOString();
36
+ // macOS log levels: Default, Info, Debug, Error, Fault. Coerce to our 4-level
37
+ // taxonomy.
38
+ const typeRaw = String(raw['messageType'] ?? raw['eventMessage'] ?? 'Default');
39
+ const level = mapDarwinLevel(typeRaw);
40
+ const subsystem = String(raw['subsystem'] ?? '');
41
+ const senderImage = String(raw['senderImagePath'] ?? '');
42
+ const source = inferSource(senderImage);
43
+ const message = String(raw['eventMessage'] ?? raw['message'] ?? '');
44
+ return { ts, level, source, subsystem, message, raw };
45
+ }
46
+ function mapDarwinLevel(typeRaw) {
47
+ // macOS log emits canonical types: Default, Info, Debug, Error, Fault.
48
+ // Match the exact token (case-insensitive) rather than substring, otherwise
49
+ // "Default" gets misclassified as an error because it contains "fault".
50
+ switch (typeRaw.toLowerCase()) {
51
+ case 'fault':
52
+ case 'error':
53
+ return 'error';
54
+ case 'debug':
55
+ return 'debug';
56
+ case 'info':
57
+ return 'info';
58
+ case 'default':
59
+ default:
60
+ return 'info';
61
+ }
62
+ }
63
+ function inferSource(senderImagePath) {
64
+ // Apple's WebKit lives at /System/Library/Frameworks/WebKit.framework/…
65
+ if (/WebKit|com\.apple\.WebKit/i.test(senderImagePath))
66
+ return 'webview';
67
+ // App's main binary path will end with the executable name; everything else is "main".
68
+ return 'main';
69
+ }
70
+ /** The actual command binary the adapter shells out to. */
71
+ export const COMMAND = 'log';
72
+ //# sourceMappingURL=darwin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"darwin.js","sourceRoot":"","sources":["../../../src/platform/oslog/darwin.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAmB;IAC3E,MAAM,SAAS,GAAG,iBAAiB,UAAU,qCAAqC,WAAW,GAAG,CAAC;IACjG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvE,IAAI,KAAK,EAAE,CAAC;QACV,wEAAwE;QACxE,0EAA0E;QAC1E,2EAA2E;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AuE;IACvE,4EAA4E;IAC5E,wEAAwE;IACxE,QAAQ,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QAC9B,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,eAAuB;IAC1C,wEAAwE;IACxE,IAAI,4BAA4B,CAAC,IAAI,CAAC,eAAe,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,uFAAuF;IACvF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,2DAA2D;AAC3D,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { NormalizedLogEntry } from '../../schemas/osLog.js';
2
+ export interface LinuxSpawnArgs {
3
+ identifier: string;
4
+ productName: string;
5
+ since?: string;
6
+ }
7
+ /**
8
+ * Build `journalctl` args. We use `--user` (current user's systemd journal),
9
+ * `-f` to follow, `-o json` for structured output, and `-t` to filter by
10
+ * SYSLOG_IDENTIFIER. The product name is the most reliable identifier here
11
+ * because that's what Rust's `env_logger`/`log` typically uses, but we also
12
+ * accept the bundle id as a fallback subsystem match.
13
+ */
14
+ export declare function buildArgs({ identifier, productName, since }: LinuxSpawnArgs): string[];
15
+ export declare function parseLine(line: string): NormalizedLogEntry | null;
16
+ export declare const COMMAND = "journalctl";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Build `journalctl` args. We use `--user` (current user's systemd journal),
3
+ * `-f` to follow, `-o json` for structured output, and `-t` to filter by
4
+ * SYSLOG_IDENTIFIER. The product name is the most reliable identifier here
5
+ * because that's what Rust's `env_logger`/`log` typically uses, but we also
6
+ * accept the bundle id as a fallback subsystem match.
7
+ */
8
+ export function buildArgs({ identifier, productName, since }) {
9
+ const args = ['--user', '-f', '-o', 'json', '-t', productName, '-t', identifier];
10
+ if (since)
11
+ args.push('--since', since);
12
+ return args;
13
+ }
14
+ export function parseLine(line) {
15
+ if (!line.trim().startsWith('{'))
16
+ return null;
17
+ let raw;
18
+ try {
19
+ raw = JSON.parse(line);
20
+ }
21
+ catch {
22
+ return null;
23
+ }
24
+ // journalctl `__REALTIME_TIMESTAMP` is microseconds since epoch as a string.
25
+ const tsMicros = raw['__REALTIME_TIMESTAMP'];
26
+ const ts = typeof tsMicros === 'string' && /^\d+$/.test(tsMicros)
27
+ ? new Date(Math.floor(Number(tsMicros) / 1000)).toISOString()
28
+ : new Date().toISOString();
29
+ // syslog priorities: 0=emerg .. 7=debug. journalctl exposes PRIORITY as a string.
30
+ const priorityRaw = raw['PRIORITY'];
31
+ const level = mapJournalPriority(typeof priorityRaw === 'string' ? Number(priorityRaw) : Number(priorityRaw ?? 6));
32
+ const subsystem = String(raw['SYSLOG_IDENTIFIER'] ?? '');
33
+ const message = String(raw['MESSAGE'] ?? '');
34
+ const source = 'main';
35
+ return { ts, level, source, subsystem, message, raw };
36
+ }
37
+ function mapJournalPriority(priority) {
38
+ if (priority <= 3)
39
+ return 'error'; // emerg/alert/crit/err
40
+ if (priority === 4)
41
+ return 'warn';
42
+ if (priority === 5 || priority === 6)
43
+ return 'info';
44
+ return 'debug';
45
+ }
46
+ export const COMMAND = 'journalctl';
47
+ //# sourceMappingURL=linux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linux.js","sourceRoot":"","sources":["../../../src/platform/oslog/linux.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAkB;IAC1E,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACjF,IAAI,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EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AACxD,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,uBAAuB;IAC1D,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IACpD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { NormalizedLogEntry } from '../../schemas/osLog.js';
2
+ export interface WindowsSpawnArgs {
3
+ identifier: string;
4
+ productName: string;
5
+ since?: string;
6
+ }
7
+ /**
8
+ * Windows os-logs support is not implemented in v0.7. The plan is to wrap
9
+ * `wevtutil qe Application` and `Get-WinEvent -FilterHashtable` once we have
10
+ * a Windows test target. Until then, callers receive a clear error rather
11
+ * than silent zero output.
12
+ */
13
+ export declare function buildArgs(_args: WindowsSpawnArgs): string[];
14
+ export declare function parseLine(_line: string): NormalizedLogEntry | null;
15
+ export declare const COMMAND = "wevtutil";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Windows os-logs support is not implemented in v0.7. The plan is to wrap
3
+ * `wevtutil qe Application` and `Get-WinEvent -FilterHashtable` once we have
4
+ * a Windows test target. Until then, callers receive a clear error rather
5
+ * than silent zero output.
6
+ */
7
+ export function buildArgs(_args) {
8
+ throw new Error('os-logs is not yet implemented on Windows. ' +
9
+ 'Track the gap in the CHANGELOG or use `tauri-agent-tools forensics --since <duration>` ' +
10
+ 'against the app log directory directly.');
11
+ }
12
+ export function parseLine(_line) {
13
+ return null;
14
+ }
15
+ export const COMMAND = 'wevtutil';
16
+ //# sourceMappingURL=windows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows.js","sourceRoot":"","sources":["../../../src/platform/oslog/windows.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAuB;IAC/C,MAAM,IAAI,KAAK,CACb,6CAA6C;QAC3C,yFAAyF;QACzF,yCAAyC,CAC5C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC"}
@@ -152,3 +152,225 @@ export declare const VersionResponseSchema: z.ZodObject<{
152
152
  endpoints: string[];
153
153
  }>;
154
154
  export type VersionResponse = z.infer<typeof VersionResponseSchema>;
155
+ export declare const SidecarSummarySchema: z.ZodObject<{
156
+ name: z.ZodString;
157
+ pid: z.ZodNumber;
158
+ exe: z.ZodOptional<z.ZodString>;
159
+ args: z.ZodArray<z.ZodString, "many">;
160
+ alive: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ args: string[];
163
+ pid: number;
164
+ name: string;
165
+ exe?: string | undefined;
166
+ alive?: boolean | null | undefined;
167
+ }, {
168
+ args: string[];
169
+ pid: number;
170
+ name: string;
171
+ exe?: string | undefined;
172
+ alive?: boolean | null | undefined;
173
+ }>;
174
+ export type SidecarSummary = z.infer<typeof SidecarSummarySchema>;
175
+ export declare const TauriProcessInfoSchema: z.ZodObject<{
176
+ pid: z.ZodNumber;
177
+ exe: z.ZodOptional<z.ZodString>;
178
+ args: z.ZodArray<z.ZodString, "many">;
179
+ uptime_ms: z.ZodNumber;
180
+ }, "strip", z.ZodTypeAny, {
181
+ args: string[];
182
+ pid: number;
183
+ uptime_ms: number;
184
+ exe?: string | undefined;
185
+ }, {
186
+ args: string[];
187
+ pid: number;
188
+ uptime_ms: number;
189
+ exe?: string | undefined;
190
+ }>;
191
+ export type TauriProcessInfo = z.infer<typeof TauriProcessInfoSchema>;
192
+ export declare const ProcessResponseSchema: z.ZodObject<{
193
+ tauri: z.ZodObject<{
194
+ pid: z.ZodNumber;
195
+ exe: z.ZodOptional<z.ZodString>;
196
+ args: z.ZodArray<z.ZodString, "many">;
197
+ uptime_ms: z.ZodNumber;
198
+ }, "strip", z.ZodTypeAny, {
199
+ args: string[];
200
+ pid: number;
201
+ uptime_ms: number;
202
+ exe?: string | undefined;
203
+ }, {
204
+ args: string[];
205
+ pid: number;
206
+ uptime_ms: number;
207
+ exe?: string | undefined;
208
+ }>;
209
+ sidecars: z.ZodArray<z.ZodObject<{
210
+ name: z.ZodString;
211
+ pid: z.ZodNumber;
212
+ exe: z.ZodOptional<z.ZodString>;
213
+ args: z.ZodArray<z.ZodString, "many">;
214
+ alive: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ args: string[];
217
+ pid: number;
218
+ name: string;
219
+ exe?: string | undefined;
220
+ alive?: boolean | null | undefined;
221
+ }, {
222
+ args: string[];
223
+ pid: number;
224
+ name: string;
225
+ exe?: string | undefined;
226
+ alive?: boolean | null | undefined;
227
+ }>, "many">;
228
+ }, "strip", z.ZodTypeAny, {
229
+ tauri: {
230
+ args: string[];
231
+ pid: number;
232
+ uptime_ms: number;
233
+ exe?: string | undefined;
234
+ };
235
+ sidecars: {
236
+ args: string[];
237
+ pid: number;
238
+ name: string;
239
+ exe?: string | undefined;
240
+ alive?: boolean | null | undefined;
241
+ }[];
242
+ }, {
243
+ tauri: {
244
+ args: string[];
245
+ pid: number;
246
+ uptime_ms: number;
247
+ exe?: string | undefined;
248
+ };
249
+ sidecars: {
250
+ args: string[];
251
+ pid: number;
252
+ name: string;
253
+ exe?: string | undefined;
254
+ alive?: boolean | null | undefined;
255
+ }[];
256
+ }>;
257
+ export type ProcessResponse = z.infer<typeof ProcessResponseSchema>;
258
+ export declare const LiveCapabilityEntrySchema: z.ZodObject<{
259
+ identifier: z.ZodString;
260
+ description: z.ZodOptional<z.ZodString>;
261
+ windows: z.ZodArray<z.ZodString, "many">;
262
+ permissions: z.ZodArray<z.ZodString, "many">;
263
+ }, "strip", z.ZodTypeAny, {
264
+ windows: string[];
265
+ identifier: string;
266
+ permissions: string[];
267
+ description?: string | undefined;
268
+ }, {
269
+ windows: string[];
270
+ identifier: string;
271
+ permissions: string[];
272
+ description?: string | undefined;
273
+ }>;
274
+ export type LiveCapabilityEntry = z.infer<typeof LiveCapabilityEntrySchema>;
275
+ export declare const CapabilitiesResponseSchema: z.ZodObject<{
276
+ declared: z.ZodArray<z.ZodObject<{
277
+ identifier: z.ZodString;
278
+ description: z.ZodOptional<z.ZodString>;
279
+ windows: z.ZodArray<z.ZodString, "many">;
280
+ permissions: z.ZodArray<z.ZodString, "many">;
281
+ }, "strip", z.ZodTypeAny, {
282
+ windows: string[];
283
+ identifier: string;
284
+ permissions: string[];
285
+ description?: string | undefined;
286
+ }, {
287
+ windows: string[];
288
+ identifier: string;
289
+ permissions: string[];
290
+ description?: string | undefined;
291
+ }>, "many">;
292
+ windows: z.ZodArray<z.ZodString, "many">;
293
+ }, "strip", z.ZodTypeAny, {
294
+ windows: string[];
295
+ declared: {
296
+ windows: string[];
297
+ identifier: string;
298
+ permissions: string[];
299
+ description?: string | undefined;
300
+ }[];
301
+ }, {
302
+ windows: string[];
303
+ declared: {
304
+ windows: string[];
305
+ identifier: string;
306
+ permissions: string[];
307
+ description?: string | undefined;
308
+ }[];
309
+ }>;
310
+ export type CapabilitiesResponse = z.infer<typeof CapabilitiesResponseSchema>;
311
+ export declare const DevtoolsPlatformSchema: z.ZodEnum<["wkwebview", "webview2", "webkitgtk"]>;
312
+ export type DevtoolsPlatform = z.infer<typeof DevtoolsPlatformSchema>;
313
+ export declare const DevtoolsResponseSchema: z.ZodObject<{
314
+ platform: z.ZodEnum<["wkwebview", "webview2", "webkitgtk"]>;
315
+ inspectable: z.ZodBoolean;
316
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ hint: z.ZodString;
318
+ }, "strip", z.ZodTypeAny, {
319
+ platform: "wkwebview" | "webview2" | "webkitgtk";
320
+ inspectable: boolean;
321
+ hint: string;
322
+ url?: string | null | undefined;
323
+ }, {
324
+ platform: "wkwebview" | "webview2" | "webkitgtk";
325
+ inspectable: boolean;
326
+ hint: string;
327
+ url?: string | null | undefined;
328
+ }>;
329
+ export type DevtoolsResponse = z.infer<typeof DevtoolsResponseSchema>;
330
+ export declare const HealthResponseSchema: z.ZodObject<{
331
+ uptime_ms: z.ZodNumber;
332
+ webview_ready: z.ZodBoolean;
333
+ sidecars_alive: z.ZodBoolean;
334
+ sidecars: z.ZodArray<z.ZodObject<{
335
+ name: z.ZodString;
336
+ pid: z.ZodNumber;
337
+ exe: z.ZodOptional<z.ZodString>;
338
+ args: z.ZodArray<z.ZodString, "many">;
339
+ alive: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ args: string[];
342
+ pid: number;
343
+ name: string;
344
+ exe?: string | undefined;
345
+ alive?: boolean | null | undefined;
346
+ }, {
347
+ args: string[];
348
+ pid: number;
349
+ name: string;
350
+ exe?: string | undefined;
351
+ alive?: boolean | null | undefined;
352
+ }>, "many">;
353
+ }, "strip", z.ZodTypeAny, {
354
+ uptime_ms: number;
355
+ sidecars: {
356
+ args: string[];
357
+ pid: number;
358
+ name: string;
359
+ exe?: string | undefined;
360
+ alive?: boolean | null | undefined;
361
+ }[];
362
+ webview_ready: boolean;
363
+ sidecars_alive: boolean;
364
+ }, {
365
+ uptime_ms: number;
366
+ sidecars: {
367
+ args: string[];
368
+ pid: number;
369
+ name: string;
370
+ exe?: string | undefined;
371
+ alive?: boolean | null | undefined;
372
+ }[];
373
+ webview_ready: boolean;
374
+ sidecars_alive: boolean;
375
+ }>;
376
+ export type HealthResponse = z.infer<typeof HealthResponseSchema>;
@@ -48,4 +48,48 @@ export const VersionResponseSchema = z.object({
48
48
  version: z.string(),
49
49
  endpoints: z.array(z.string()),
50
50
  });
51
+ // === /process ===
52
+ export const SidecarSummarySchema = z.object({
53
+ name: z.string(),
54
+ pid: z.number().int(),
55
+ exe: z.string().optional(),
56
+ args: z.array(z.string()),
57
+ alive: z.boolean().nullable().optional(),
58
+ });
59
+ export const TauriProcessInfoSchema = z.object({
60
+ pid: z.number().int(),
61
+ exe: z.string().optional(),
62
+ args: z.array(z.string()),
63
+ uptime_ms: z.number().int(),
64
+ });
65
+ export const ProcessResponseSchema = z.object({
66
+ tauri: TauriProcessInfoSchema,
67
+ sidecars: z.array(SidecarSummarySchema),
68
+ });
69
+ // === /capabilities ===
70
+ export const LiveCapabilityEntrySchema = z.object({
71
+ identifier: z.string(),
72
+ description: z.string().optional(),
73
+ windows: z.array(z.string()),
74
+ permissions: z.array(z.string()),
75
+ });
76
+ export const CapabilitiesResponseSchema = z.object({
77
+ declared: z.array(LiveCapabilityEntrySchema),
78
+ windows: z.array(z.string()),
79
+ });
80
+ // === /devtools ===
81
+ export const DevtoolsPlatformSchema = z.enum(['wkwebview', 'webview2', 'webkitgtk']);
82
+ export const DevtoolsResponseSchema = z.object({
83
+ platform: DevtoolsPlatformSchema,
84
+ inspectable: z.boolean(),
85
+ url: z.string().nullable().optional(),
86
+ hint: z.string(),
87
+ });
88
+ // === /health ===
89
+ export const HealthResponseSchema = z.object({
90
+ uptime_ms: z.number().int(),
91
+ webview_ready: z.boolean(),
92
+ sidecars_alive: z.boolean(),
93
+ sidecars: z.array(SidecarSummarySchema),
94
+ });
51
95
  //# sourceMappingURL=bridge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../src/schemas/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0BAA0B;AAE1B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GA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';
2
+ export declare const OsLogLevelSchema: z.ZodEnum<["debug", "info", "warn", "error"]>;
3
+ export type OsLogLevel = z.infer<typeof OsLogLevelSchema>;
4
+ export declare const OsLogSourceSchema: z.ZodEnum<["main", "webview", "sidecar", "all"]>;
5
+ export type OsLogSource = z.infer<typeof OsLogSourceSchema>;
6
+ /**
7
+ * Normalized log envelope emitted by `os-logs`. The raw upstream payload
8
+ * (macOS log JSON, journalctl JSON, …) is preserved in `raw` so consumers
9
+ * can recover any platform-specific field that didn't make it into the
10
+ * normalized projection.
11
+ */
12
+ export declare const NormalizedLogEntrySchema: z.ZodObject<{
13
+ ts: z.ZodString;
14
+ level: z.ZodEnum<["debug", "info", "warn", "error"]>;
15
+ source: z.ZodString;
16
+ subsystem: z.ZodString;
17
+ message: z.ZodString;
18
+ raw: z.ZodUnknown;
19
+ }, "strip", z.ZodTypeAny, {
20
+ message: string;
21
+ level: "warn" | "error" | "info" | "debug";
22
+ source: string;
23
+ ts: string;
24
+ subsystem: string;
25
+ raw?: unknown;
26
+ }, {
27
+ message: string;
28
+ level: "warn" | "error" | "info" | "debug";
29
+ source: string;
30
+ ts: string;
31
+ subsystem: string;
32
+ raw?: unknown;
33
+ }>;
34
+ export type NormalizedLogEntry = z.infer<typeof NormalizedLogEntrySchema>;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export const OsLogLevelSchema = z.enum(['debug', 'info', 'warn', 'error']);
3
+ export const OsLogSourceSchema = z.enum(['main', 'webview', 'sidecar', 'all']);
4
+ /**
5
+ * Normalized log envelope emitted by `os-logs`. The raw upstream payload
6
+ * (macOS log JSON, journalctl JSON, …) is preserved in `raw` so consumers
7
+ * can recover any platform-specific field that didn't make it into the
8
+ * normalized projection.
9
+ */
10
+ export const NormalizedLogEntrySchema = z.object({
11
+ ts: z.string(),
12
+ level: OsLogLevelSchema,
13
+ source: z.string(),
14
+ subsystem: z.string(),
15
+ message: z.string(),
16
+ raw: z.unknown(),
17
+ });
18
+ //# sourceMappingURL=osLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osLog.js","sourceRoot":"","sources":["../../src/schemas/osLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAG3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AAG/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE;CACjB,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * One envelope emitted by `sidecar tap`. The raw line is preserved in
4
+ * `payload` after JSON.parse if the line was parseable, otherwise it lives in
5
+ * `rawLine`. `valid` reflects either schema conformance (when a schema is
6
+ * supplied) or simple JSON-parse success.
7
+ */
8
+ export declare const SidecarEnvelopeSchema: z.ZodObject<{
9
+ ts: z.ZodString;
10
+ direction: z.ZodEnum<["sidecar→", "←parent"]>;
11
+ valid: z.ZodBoolean;
12
+ payload: z.ZodOptional<z.ZodUnknown>;
13
+ rawLine: z.ZodOptional<z.ZodString>;
14
+ parseError: z.ZodOptional<z.ZodString>;
15
+ schemaErrors: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ valid: boolean;
18
+ ts: string;
19
+ direction: "sidecar→" | "←parent";
20
+ payload?: unknown;
21
+ rawLine?: string | undefined;
22
+ parseError?: string | undefined;
23
+ schemaErrors?: unknown[] | undefined;
24
+ }, {
25
+ valid: boolean;
26
+ ts: string;
27
+ direction: "sidecar→" | "←parent";
28
+ payload?: unknown;
29
+ rawLine?: string | undefined;
30
+ parseError?: string | undefined;
31
+ schemaErrors?: unknown[] | undefined;
32
+ }>;
33
+ export type SidecarEnvelope = z.infer<typeof SidecarEnvelopeSchema>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * One envelope emitted by `sidecar tap`. The raw line is preserved in
4
+ * `payload` after JSON.parse if the line was parseable, otherwise it lives in
5
+ * `rawLine`. `valid` reflects either schema conformance (when a schema is
6
+ * supplied) or simple JSON-parse success.
7
+ */
8
+ export const SidecarEnvelopeSchema = z.object({
9
+ ts: z.string(),
10
+ direction: z.enum(['sidecar→', '←parent']),
11
+ valid: z.boolean(),
12
+ payload: z.unknown().optional(),
13
+ rawLine: z.string().optional(),
14
+ parseError: z.string().optional(),
15
+ schemaErrors: z.array(z.unknown()).optional(),
16
+ });
17
+ //# sourceMappingURL=sidecar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidecar.js","sourceRoot":"","sources":["../../src/schemas/sidecar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC"}