@ericsanchezok/synergy-plugin 2.4.3 → 2.4.5

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.
@@ -9,11 +9,10 @@ export declare const PluginManifest: z.ZodObject<{
9
9
  license: z.ZodOptional<z.ZodString>;
10
10
  icon: z.ZodOptional<z.ZodString>;
11
11
  keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
- minSynergyVersion: z.ZodOptional<z.ZodString>;
13
12
  engines: z.ZodOptional<z.ZodObject<{
14
13
  synergy: z.ZodOptional<z.ZodString>;
15
14
  bun: z.ZodOptional<z.ZodString>;
16
- }, z.core.$strip>>;
15
+ }, z.core.$strict>>;
17
16
  dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
18
17
  trust: z.ZodOptional<z.ZodObject<{
19
18
  requestedTier: z.ZodOptional<z.ZodEnum<{
@@ -25,7 +24,6 @@ export declare const PluginManifest: z.ZodObject<{
25
24
  }, z.core.$strip>>;
26
25
  permissions: z.ZodOptional<z.ZodObject<{
27
26
  tools: z.ZodOptional<z.ZodObject<{
28
- invoke: z.ZodDefault<z.ZodBoolean>;
29
27
  shell: z.ZodDefault<z.ZodBoolean>;
30
28
  filesystem: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodEnum<{
31
29
  read: "read";
@@ -42,7 +40,7 @@ export declare const PluginManifest: z.ZodObject<{
42
40
  agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
41
  maxRuntimeMs: z.ZodOptional<z.ZodNumber>;
44
42
  }, z.core.$strict>]>>;
45
- }, z.core.$strip>>;
43
+ }, z.core.$strict>>;
46
44
  data: z.ZodOptional<z.ZodObject<{
47
45
  session: z.ZodDefault<z.ZodEnum<{
48
46
  read: "read";
@@ -63,24 +61,26 @@ export declare const PluginManifest: z.ZodObject<{
63
61
  none: "none";
64
62
  own: "own";
65
63
  }>>;
66
- }, z.core.$strip>>;
64
+ }, z.core.$strict>>;
67
65
  network: z.ZodOptional<z.ZodObject<{
68
66
  connectDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
69
67
  resourceDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
70
68
  frameDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
71
- }, z.core.$strip>>;
69
+ }, z.core.$strict>>;
72
70
  ui: z.ZodOptional<z.ZodObject<{
73
71
  toolRenderers: z.ZodDefault<z.ZodBoolean>;
74
72
  partRenderers: z.ZodDefault<z.ZodBoolean>;
75
- workspacePanels: z.ZodDefault<z.ZodBoolean>;
76
- globalPanels: z.ZodDefault<z.ZodBoolean>;
73
+ workbenchPanels: z.ZodDefault<z.ZodBoolean>;
74
+ appPanels: z.ZodDefault<z.ZodBoolean>;
77
75
  settings: z.ZodDefault<z.ZodBoolean>;
76
+ messageSlots: z.ZodDefault<z.ZodBoolean>;
78
77
  themes: z.ZodDefault<z.ZodBoolean>;
79
78
  icons: z.ZodDefault<z.ZodBoolean>;
80
- routes: z.ZodDefault<z.ZodBoolean>;
79
+ appRoutes: z.ZodDefault<z.ZodBoolean>;
80
+ commands: z.ZodDefault<z.ZodBoolean>;
81
81
  trustedImport: z.ZodDefault<z.ZodBoolean>;
82
82
  sandboxIframe: z.ZodDefault<z.ZodBoolean>;
83
- }, z.core.$strip>>;
83
+ }, z.core.$strict>>;
84
84
  hooks: z.ZodOptional<z.ZodObject<{
85
85
  events: z.ZodDefault<z.ZodEnum<{
86
86
  all: "all";
@@ -88,6 +88,7 @@ export declare const PluginManifest: z.ZodObject<{
88
88
  selected: "selected";
89
89
  }>>;
90
90
  eventNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
91
+ config: z.ZodDefault<z.ZodBoolean>;
91
92
  toolExecute: z.ZodDefault<z.ZodEnum<{
92
93
  all: "all";
93
94
  none: "none";
@@ -101,8 +102,8 @@ export declare const PluginManifest: z.ZodObject<{
101
102
  }>>;
102
103
  promptTransform: z.ZodDefault<z.ZodBoolean>;
103
104
  compactionTransform: z.ZodDefault<z.ZodBoolean>;
104
- }, z.core.$strip>>;
105
- }, z.core.$strip>>;
105
+ }, z.core.$strict>>;
106
+ }, z.core.$strict>>;
106
107
  contributes: z.ZodOptional<z.ZodObject<{
107
108
  tools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
108
109
  id: z.ZodOptional<z.ZodString>;
@@ -132,14 +133,9 @@ export declare const PluginManifest: z.ZodObject<{
132
133
  default: "default";
133
134
  "media-generation": "media-generation";
134
135
  }>>;
135
- visibility: z.ZodOptional<z.ZodEnum<{
136
- default: "default";
137
- media: "media";
138
- "hidden-unless-error": "hidden-unless-error";
139
- }>>;
140
- presentation: z.ZodOptional<z.ZodEnum<{
141
- default: "default";
142
- "artifact-only": "artifact-only";
136
+ toolCard: z.ZodOptional<z.ZodEnum<{
137
+ visible: "visible";
138
+ hidden: "hidden";
143
139
  }>>;
144
140
  media: z.ZodOptional<z.ZodObject<{
145
141
  type: z.ZodEnum<{
@@ -150,15 +146,18 @@ export declare const PluginManifest: z.ZodObject<{
150
146
  actionLabel: z.ZodOptional<z.ZodString>;
151
147
  pendingTitle: z.ZodOptional<z.ZodString>;
152
148
  pendingDescription: z.ZodOptional<z.ZodString>;
153
- promptField: z.ZodOptional<z.ZodString>;
154
149
  aspectRatio: z.ZodOptional<z.ZodEnum<{
155
150
  "1:1": "1:1";
156
151
  "4:3": "4:3";
157
152
  "16:9": "16:9";
158
153
  auto: "auto";
159
154
  }>>;
155
+ size: z.ZodOptional<z.ZodEnum<{
156
+ small: "small";
157
+ medium: "medium";
158
+ large: "large";
159
+ }>>;
160
160
  }, z.core.$strict>>;
161
- primaryAttachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
161
  }, z.core.$strict>>;
163
162
  capabilities: z.ZodOptional<z.ZodObject<{
164
163
  filesystem: z.ZodOptional<z.ZodEnum<{
@@ -183,12 +182,7 @@ export declare const PluginManifest: z.ZodObject<{
183
182
  global: "global";
184
183
  none: "none";
185
184
  }>>;
186
- }, z.core.$strip>>;
187
- risk: z.ZodOptional<z.ZodEnum<{
188
- low: "low";
189
- medium: "medium";
190
- high: "high";
191
- }>>;
185
+ }, z.core.$strict>>;
192
186
  }, z.core.$strip>>>>;
193
187
  skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
194
188
  name: z.ZodString;
@@ -248,9 +242,9 @@ export declare const PluginManifest: z.ZodObject<{
248
242
  }, z.core.$strip>>;
249
243
  toolCache: z.ZodOptional<z.ZodObject<{
250
244
  mode: z.ZodOptional<z.ZodEnum<{
245
+ session: "session";
251
246
  persistent: "persistent";
252
247
  disabled: "disabled";
253
- session: "session";
254
248
  }>>;
255
249
  ttlMs: z.ZodOptional<z.ZodNumber>;
256
250
  }, z.core.$strip>>;
@@ -292,9 +286,9 @@ export declare const PluginManifest: z.ZodObject<{
292
286
  }, z.core.$strip>>;
293
287
  toolCache: z.ZodOptional<z.ZodObject<{
294
288
  mode: z.ZodOptional<z.ZodEnum<{
289
+ session: "session";
295
290
  persistent: "persistent";
296
291
  disabled: "disabled";
297
- session: "session";
298
292
  }>>;
299
293
  ttlMs: z.ZodOptional<z.ZodNumber>;
300
294
  }, z.core.$strip>>;
@@ -334,9 +328,9 @@ export declare const PluginManifest: z.ZodObject<{
334
328
  }, z.core.$strip>>;
335
329
  toolCache: z.ZodOptional<z.ZodObject<{
336
330
  mode: z.ZodOptional<z.ZodEnum<{
331
+ session: "session";
337
332
  persistent: "persistent";
338
333
  disabled: "disabled";
339
- session: "session";
340
334
  }>>;
341
335
  ttlMs: z.ZodOptional<z.ZodNumber>;
342
336
  }, z.core.$strip>>;
@@ -351,7 +345,6 @@ export declare const PluginManifest: z.ZodObject<{
351
345
  }, z.core.$strip>>>;
352
346
  permissions: z.ZodOptional<z.ZodOptional<z.ZodObject<{
353
347
  tools: z.ZodOptional<z.ZodObject<{
354
- invoke: z.ZodDefault<z.ZodBoolean>;
355
348
  shell: z.ZodDefault<z.ZodBoolean>;
356
349
  filesystem: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodEnum<{
357
350
  read: "read";
@@ -368,7 +361,7 @@ export declare const PluginManifest: z.ZodObject<{
368
361
  agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
369
362
  maxRuntimeMs: z.ZodOptional<z.ZodNumber>;
370
363
  }, z.core.$strict>]>>;
371
- }, z.core.$strip>>;
364
+ }, z.core.$strict>>;
372
365
  data: z.ZodOptional<z.ZodObject<{
373
366
  session: z.ZodDefault<z.ZodEnum<{
374
367
  read: "read";
@@ -389,24 +382,26 @@ export declare const PluginManifest: z.ZodObject<{
389
382
  none: "none";
390
383
  own: "own";
391
384
  }>>;
392
- }, z.core.$strip>>;
385
+ }, z.core.$strict>>;
393
386
  network: z.ZodOptional<z.ZodObject<{
394
387
  connectDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
395
388
  resourceDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
396
389
  frameDomains: z.ZodDefault<z.ZodArray<z.ZodString>>;
397
- }, z.core.$strip>>;
390
+ }, z.core.$strict>>;
398
391
  ui: z.ZodOptional<z.ZodObject<{
399
392
  toolRenderers: z.ZodDefault<z.ZodBoolean>;
400
393
  partRenderers: z.ZodDefault<z.ZodBoolean>;
401
- workspacePanels: z.ZodDefault<z.ZodBoolean>;
402
- globalPanels: z.ZodDefault<z.ZodBoolean>;
394
+ workbenchPanels: z.ZodDefault<z.ZodBoolean>;
395
+ appPanels: z.ZodDefault<z.ZodBoolean>;
403
396
  settings: z.ZodDefault<z.ZodBoolean>;
397
+ messageSlots: z.ZodDefault<z.ZodBoolean>;
404
398
  themes: z.ZodDefault<z.ZodBoolean>;
405
399
  icons: z.ZodDefault<z.ZodBoolean>;
406
- routes: z.ZodDefault<z.ZodBoolean>;
400
+ appRoutes: z.ZodDefault<z.ZodBoolean>;
401
+ commands: z.ZodDefault<z.ZodBoolean>;
407
402
  trustedImport: z.ZodDefault<z.ZodBoolean>;
408
403
  sandboxIframe: z.ZodDefault<z.ZodBoolean>;
409
- }, z.core.$strip>>;
404
+ }, z.core.$strict>>;
410
405
  hooks: z.ZodOptional<z.ZodObject<{
411
406
  events: z.ZodDefault<z.ZodEnum<{
412
407
  all: "all";
@@ -414,6 +409,7 @@ export declare const PluginManifest: z.ZodObject<{
414
409
  selected: "selected";
415
410
  }>>;
416
411
  eventNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
412
+ config: z.ZodDefault<z.ZodBoolean>;
417
413
  toolExecute: z.ZodDefault<z.ZodEnum<{
418
414
  all: "all";
419
415
  none: "none";
@@ -427,12 +423,12 @@ export declare const PluginManifest: z.ZodObject<{
427
423
  }>>;
428
424
  promptTransform: z.ZodDefault<z.ZodBoolean>;
429
425
  compactionTransform: z.ZodDefault<z.ZodBoolean>;
430
- }, z.core.$strip>>;
431
- }, z.core.$strip>>>;
426
+ }, z.core.$strict>>;
427
+ }, z.core.$strict>>>;
432
428
  ui: z.ZodOptional<z.ZodOptional<z.ZodObject<{
433
- entry: z.ZodOptional<z.ZodOptional<z.ZodString>>;
434
- minUIApiVersion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
435
- toolRenderers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
429
+ entry: z.ZodOptional<z.ZodString>;
430
+ minUIApiVersion: z.ZodOptional<z.ZodString>;
431
+ toolRenderers: z.ZodOptional<z.ZodArray<z.ZodObject<{
436
432
  tool: z.ZodString;
437
433
  exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
438
434
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -441,71 +437,87 @@ export declare const PluginManifest: z.ZodObject<{
441
437
  title: z.ZodOptional<z.ZodString>;
442
438
  subtitleTemplate: z.ZodOptional<z.ZodString>;
443
439
  }, z.core.$strip>>;
444
- }, z.core.$strict>>>>;
445
- partRenderers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
440
+ }, z.core.$strict>>>;
441
+ partRenderers: z.ZodOptional<z.ZodArray<z.ZodObject<{
446
442
  type: z.ZodString;
447
443
  exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
448
444
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
449
- }, z.core.$strict>>>>;
450
- workspacePanels: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ }, z.core.$strict>>>;
446
+ workbenchPanels: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
447
  id: z.ZodString;
452
448
  label: z.ZodString;
453
449
  icon: z.ZodString;
454
450
  exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
451
+ order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
455
452
  sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
456
453
  sandboxEntry: z.ZodOptional<z.ZodString>;
457
- }, z.core.$strict>>>>;
458
- globalPanels: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
454
+ surface: z.ZodEnum<{
455
+ side: "side";
456
+ bottom: "bottom";
457
+ }>;
458
+ cardinality: z.ZodEnum<{
459
+ exclusive: "exclusive";
460
+ singleton: "singleton";
461
+ multi: "multi";
462
+ }>;
463
+ requiresSession: z.ZodOptional<z.ZodBoolean>;
464
+ }, z.core.$strict>>>;
465
+ appPanels: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
466
  id: z.ZodString;
460
467
  label: z.ZodString;
461
468
  icon: z.ZodString;
462
469
  exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
470
+ order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
463
471
  sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
464
472
  sandboxEntry: z.ZodOptional<z.ZodString>;
465
- }, z.core.$strict>>>>;
466
- settings: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
473
+ }, z.core.$strict>>>;
474
+ settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
467
475
  id: z.ZodString;
468
476
  label: z.ZodString;
469
477
  icon: z.ZodString;
470
478
  group: z.ZodString;
471
479
  formSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
472
- exportName: z.ZodOptional<z.ZodString>;
480
+ exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
481
+ order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
473
482
  sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
474
483
  sandboxEntry: z.ZodOptional<z.ZodString>;
475
- }, z.core.$strict>>>>;
476
- chatComponents: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
484
+ }, z.core.$strict>>>;
485
+ messageSlots: z.ZodOptional<z.ZodArray<z.ZodObject<{
477
486
  id: z.ZodString;
478
487
  exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
479
- slot: z.ZodOptional<z.ZodEnum<{
480
- "before-tools": "before-tools";
481
- "after-tools": "after-tools";
488
+ slot: z.ZodEnum<{
482
489
  "before-reasoning": "before-reasoning";
483
490
  "after-reasoning": "after-reasoning";
484
- }>>;
485
- }, z.core.$strict>>>>;
486
- themes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
491
+ "before-tools": "before-tools";
492
+ "after-tools": "after-tools";
493
+ }>;
494
+ }, z.core.$strict>>>;
495
+ themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
487
496
  id: z.ZodString;
488
497
  label: z.ZodString;
489
498
  path: z.ZodString;
490
- }, z.core.$strict>>>>;
491
- icons: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
499
+ }, z.core.$strict>>>;
500
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
492
501
  name: z.ZodString;
493
502
  path: z.ZodString;
494
- }, z.core.$strict>>>>;
495
- routes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
496
- path: z.ZodString;
497
- entry: z.ZodString;
503
+ }, z.core.$strict>>>;
504
+ appRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
+ id: z.ZodString;
498
506
  label: z.ZodString;
499
507
  icon: z.ZodOptional<z.ZodString>;
500
- }, z.core.$strict>>>>;
501
- commands: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
508
+ entry: z.ZodOptional<z.ZodString>;
509
+ exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
510
+ sandbox: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
511
+ sandboxEntry: z.ZodOptional<z.ZodString>;
512
+ }, z.core.$strict>>>;
513
+ commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
502
514
  id: z.ZodString;
503
515
  label: z.ZodString;
504
- exportName: z.ZodOptional<z.ZodString>;
516
+ exportName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
505
517
  description: z.ZodOptional<z.ZodString>;
506
518
  icon: z.ZodOptional<z.ZodString>;
507
- }, z.core.$strict>>>>;
508
- }, z.core.$strip>>>;
519
+ }, z.core.$strict>>>;
520
+ }, z.core.$strict>>>;
509
521
  }, z.core.$strip>>;
510
522
  main: z.ZodDefault<z.ZodOptional<z.ZodString>>;
511
523
  lifecycle: z.ZodOptional<z.ZodObject<{
@@ -523,9 +535,16 @@ export declare const PluginManifest: z.ZodObject<{
523
535
  resources: z.ZodOptional<z.ZodObject<{
524
536
  memoryMb: z.ZodOptional<z.ZodNumber>;
525
537
  startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
526
- requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
538
+ toolInvocationTimeoutMs: z.ZodOptional<z.ZodNumber>;
539
+ hookInvocationTimeoutMs: z.ZodOptional<z.ZodNumber>;
540
+ bridgeRequestTimeoutMs: z.ZodOptional<z.ZodNumber>;
541
+ taskRunTimeoutMs: z.ZodOptional<z.ZodNumber>;
542
+ shutdownGraceMs: z.ZodOptional<z.ZodNumber>;
527
543
  maxConcurrentRequests: z.ZodOptional<z.ZodNumber>;
528
544
  maxLogBytesPerMinute: z.ZodOptional<z.ZodNumber>;
545
+ memoryPollIntervalMs: z.ZodOptional<z.ZodNumber>;
546
+ heartbeatIntervalMs: z.ZodOptional<z.ZodNumber>;
547
+ heartbeatMissesBeforeKill: z.ZodOptional<z.ZodNumber>;
529
548
  }, z.core.$strip>>;
530
549
  }, z.core.$strip>>;
531
550
  }, z.core.$strict>;
package/dist/manifest.js CHANGED
@@ -1,4 +1,9 @@
1
1
  import z from "zod";
2
+ const UiSurfaceId = z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/);
3
+ const JsAssetPath = z
4
+ .string()
5
+ .regex(/^[a-zA-Z0-9_/.-]+\.js$/)
6
+ .max(256);
2
7
  const ToolRendererDef = z
3
8
  .object({
4
9
  tool: z.string().min(1),
@@ -22,39 +27,38 @@ const PartRendererDef = z
22
27
  .strict();
23
28
  const PanelDef = z
24
29
  .object({
25
- id: z.string().min(1).max(64),
30
+ id: UiSurfaceId,
26
31
  label: z.string().min(1).max(64),
27
32
  icon: z.string().min(1),
28
33
  exportName: z.string().optional().default("default"),
34
+ order: z.number().int().optional().default(1000),
29
35
  sandbox: z.boolean().optional().default(false),
30
- sandboxEntry: z
31
- .string()
32
- .regex(/^[a-zA-Z0-9_/.-]+\.js$/)
33
- .max(256)
34
- .optional(),
36
+ sandboxEntry: JsAssetPath.optional(),
35
37
  })
36
38
  .strict();
39
+ const WorkbenchPanelDef = PanelDef.extend({
40
+ surface: z.enum(["side", "bottom"]),
41
+ cardinality: z.enum(["exclusive", "singleton", "multi"]),
42
+ requiresSession: z.boolean().optional(),
43
+ }).strict();
37
44
  const SettingsDef = z
38
45
  .object({
39
- id: z.string().min(1).max(64),
46
+ id: UiSurfaceId,
40
47
  label: z.string().min(1).max(64),
41
48
  icon: z.string().min(1),
42
49
  group: z.string(),
43
50
  formSchema: z.record(z.string(), z.unknown()).optional(),
44
- exportName: z.string().optional(),
51
+ exportName: z.string().optional().default("default"),
52
+ order: z.number().int().optional().default(1000),
45
53
  sandbox: z.boolean().optional().default(false),
46
- sandboxEntry: z
47
- .string()
48
- .regex(/^[a-zA-Z0-9_/.-]+\.js$/)
49
- .max(256)
50
- .optional(),
54
+ sandboxEntry: JsAssetPath.optional(),
51
55
  })
52
56
  .strict();
53
- const ChatComponentDef = z
57
+ const MessageSlotDef = z
54
58
  .object({
55
- id: z.string().min(1),
59
+ id: UiSurfaceId,
56
60
  exportName: z.string().optional().default("default"),
57
- slot: z.enum(["before-tools", "after-tools", "before-reasoning", "after-reasoning"]).optional(),
61
+ slot: z.enum(["before-reasoning", "after-reasoning", "before-tools", "after-tools"]),
58
62
  })
59
63
  .strict();
60
64
  const ThemeDef = z
@@ -70,19 +74,22 @@ const IconDef = z
70
74
  path: z.string().min(1),
71
75
  })
72
76
  .strict();
73
- const RouteDef = z
77
+ const AppRouteDef = z
74
78
  .object({
75
- path: z.string().min(1),
76
- entry: z.string().min(1),
79
+ id: UiSurfaceId,
77
80
  label: z.string().min(1),
78
81
  icon: z.string().optional(),
82
+ entry: JsAssetPath.optional(),
83
+ exportName: z.string().optional().default("default"),
84
+ sandbox: z.boolean().optional().default(false),
85
+ sandboxEntry: JsAssetPath.optional(),
79
86
  })
80
87
  .strict();
81
88
  const UICommandDef = z
82
89
  .object({
83
- id: z.string().min(1).max(64),
90
+ id: UiSurfaceId,
84
91
  label: z.string().min(1).max(64),
85
- exportName: z.string().optional(),
92
+ exportName: z.string().optional().default("default"),
86
93
  description: z.string().max(256).optional(),
87
94
  icon: z.string().optional(),
88
95
  })
@@ -127,52 +134,45 @@ const TaskPermissionDef = z.union([
127
134
  const ToolDisplayDef = z
128
135
  .object({
129
136
  kind: z.enum(["default", "media-generation"]).optional(),
130
- visibility: z.enum(["default", "media", "hidden-unless-error"]).optional(),
131
- presentation: z.enum(["default", "artifact-only"]).optional(),
137
+ toolCard: z.enum(["visible", "hidden"]).optional(),
132
138
  media: z
133
139
  .object({
134
140
  type: z.enum(["image", "video", "audio"]),
135
141
  actionLabel: z.string().min(1).max(80).optional(),
136
142
  pendingTitle: z.string().min(1).max(120).optional(),
137
143
  pendingDescription: z.string().min(1).max(200).optional(),
138
- promptField: z.string().min(1).max(64).optional(),
139
144
  aspectRatio: z.enum(["1:1", "4:3", "16:9", "auto"]).optional(),
145
+ size: z.enum(["small", "medium", "large"]).optional(),
140
146
  })
141
147
  .strict()
142
148
  .optional(),
143
- primaryAttachmentIds: z.array(z.string().min(1)).optional(),
144
149
  })
145
150
  .strict();
146
151
  const UIContribution = z
147
152
  .object({
148
- entry: z
149
- .string()
150
- .regex(/^[a-zA-Z0-9_/.-]+\.js$/)
151
- .max(256)
152
- .optional(),
153
+ entry: JsAssetPath.optional(),
153
154
  minUIApiVersion: z
154
155
  .string()
155
156
  .regex(/^\d+\.\d+\.\d+$/)
156
157
  .optional(),
157
158
  toolRenderers: z.array(ToolRendererDef).optional(),
158
159
  partRenderers: z.array(PartRendererDef).optional(),
159
- workspacePanels: z.array(PanelDef).optional(),
160
- globalPanels: z.array(PanelDef).optional(),
160
+ workbenchPanels: z.array(WorkbenchPanelDef).optional(),
161
+ appPanels: z.array(PanelDef).optional(),
161
162
  settings: z.array(SettingsDef).optional(),
162
- chatComponents: z.array(ChatComponentDef).optional(),
163
+ messageSlots: z.array(MessageSlotDef).optional(),
163
164
  themes: z.array(ThemeDef).optional(),
164
165
  icons: z.array(IconDef).optional(),
165
- routes: z.array(RouteDef).optional(),
166
+ appRoutes: z.array(AppRouteDef).optional(),
166
167
  commands: z.array(UICommandDef).optional(),
167
168
  })
168
- .partial()
169
+ .strict()
169
170
  .optional();
170
171
  const PluginPermissionsSchema = z
171
172
  .object({
172
173
  /** Tool execution permissions */
173
174
  tools: z
174
175
  .object({
175
- invoke: z.boolean().default(true),
176
176
  shell: z.boolean().default(false),
177
177
  filesystem: z.preprocess((val) => {
178
178
  if (val === true)
@@ -185,15 +185,17 @@ const PluginPermissionsSchema = z
185
185
  mcp: z.enum(["none", "invoke", "spawn"]).default("none"),
186
186
  task: TaskPermissionDef.optional(),
187
187
  })
188
+ .strict()
188
189
  .optional(),
189
190
  /** Data access */
190
191
  data: z
191
192
  .object({
192
193
  session: z.enum(["none", "metadata", "read"]).default("none"),
193
194
  workspace: z.enum(["none", "metadata", "read"]).default("none"),
194
- config: z.enum(["none", "plugin", "global"]).default("plugin"),
195
+ config: z.enum(["none", "plugin", "global"]).default("none"),
195
196
  secrets: z.enum(["none", "own"]).default("none"),
196
197
  })
198
+ .strict()
197
199
  .optional(),
198
200
  /** Network access */
199
201
  network: z
@@ -202,34 +204,41 @@ const PluginPermissionsSchema = z
202
204
  resourceDomains: z.array(z.string()).default([]),
203
205
  frameDomains: z.array(z.string()).default([]),
204
206
  })
207
+ .strict()
205
208
  .optional(),
206
209
  /** UI surface permissions */
207
210
  ui: z
208
211
  .object({
209
212
  toolRenderers: z.boolean().default(false),
210
213
  partRenderers: z.boolean().default(false),
211
- workspacePanels: z.boolean().default(false),
212
- globalPanels: z.boolean().default(false),
214
+ workbenchPanels: z.boolean().default(false),
215
+ appPanels: z.boolean().default(false),
213
216
  settings: z.boolean().default(false),
217
+ messageSlots: z.boolean().default(false),
214
218
  themes: z.boolean().default(false),
215
219
  icons: z.boolean().default(false),
216
- routes: z.boolean().default(false),
220
+ appRoutes: z.boolean().default(false),
221
+ commands: z.boolean().default(false),
217
222
  trustedImport: z.boolean().default(false),
218
223
  sandboxIframe: z.boolean().default(false),
219
224
  })
225
+ .strict()
220
226
  .optional(),
221
227
  /** Hook permission declarations */
222
228
  hooks: z
223
229
  .object({
224
230
  events: z.enum(["none", "selected", "all"]).default("selected"),
225
231
  eventNames: z.array(z.string()).default([]),
232
+ config: z.boolean().default(false),
226
233
  toolExecute: z.enum(["none", "own", "declared", "all"]).default("own"),
227
234
  permissionAsk: z.enum(["none", "own", "all"]).default("none"),
228
235
  promptTransform: z.boolean().default(false),
229
236
  compactionTransform: z.boolean().default(false),
230
237
  })
238
+ .strict()
231
239
  .optional(),
232
240
  })
241
+ .strict()
233
242
  .optional();
234
243
  // PluginManifest: the declarative plugin descriptor (plugin.json)
235
244
  export const PluginManifest = z
@@ -244,16 +253,12 @@ export const PluginManifest = z
244
253
  license: z.string().optional(),
245
254
  icon: z.string().optional(),
246
255
  keywords: z.array(z.string()).optional(),
247
- // Compatibility
248
- minSynergyVersion: z
249
- .string()
250
- .regex(/^\d+\.\d+\.\d+$/)
251
- .optional(),
252
256
  engines: z
253
257
  .object({
254
258
  synergy: z.string().optional(),
255
259
  bun: z.string().optional(),
256
260
  })
261
+ .strict()
257
262
  .optional(),
258
263
  // Dependencies on other plugins
259
264
  dependencies: z.record(z.string(), z.string()).optional(),
@@ -289,8 +294,8 @@ export const PluginManifest = z
289
294
  workspace: z.enum(["none", "metadata", "read"]).optional(),
290
295
  config: z.enum(["none", "plugin", "global"]).optional(),
291
296
  })
297
+ .strict()
292
298
  .optional(),
293
- risk: z.enum(["low", "medium", "high"]).optional(),
294
299
  }))
295
300
  .optional(),
296
301
  skills: z
@@ -473,9 +478,16 @@ export const PluginManifest = z
473
478
  .object({
474
479
  memoryMb: z.number().positive().optional(),
475
480
  startupTimeoutMs: z.number().positive().optional(),
476
- requestTimeoutMs: z.number().positive().optional(),
481
+ toolInvocationTimeoutMs: z.number().positive().optional(),
482
+ hookInvocationTimeoutMs: z.number().positive().optional(),
483
+ bridgeRequestTimeoutMs: z.number().positive().optional(),
484
+ taskRunTimeoutMs: z.number().positive().optional(),
485
+ shutdownGraceMs: z.number().positive().optional(),
477
486
  maxConcurrentRequests: z.number().positive().optional(),
478
487
  maxLogBytesPerMinute: z.number().positive().optional(),
488
+ memoryPollIntervalMs: z.number().positive().optional(),
489
+ heartbeatIntervalMs: z.number().positive().optional(),
490
+ heartbeatMissesBeforeKill: z.number().positive().optional(),
479
491
  })
480
492
  .optional(),
481
493
  })
@@ -0,0 +1,34 @@
1
+ export interface GitHubPluginMarketplaceDefaults {
2
+ registryRepo: string;
3
+ registryGithubRepo: string;
4
+ registryBaseBranch: string;
5
+ registryBranchPrefix: string;
6
+ }
7
+ export declare const OFFICIAL_GITHUB_PLUGIN_MARKETPLACE: GitHubPluginMarketplaceDefaults;
8
+ export interface GitHubReleaseAssetUrlInput {
9
+ repo: string | undefined;
10
+ version: string;
11
+ filename: string;
12
+ tagTemplate?: string;
13
+ }
14
+ export declare function githubReleaseAssetUrl(input: GitHubReleaseAssetUrlInput): string | undefined;
15
+ export declare function githubReleaseTag(version: string, template?: string): string;
16
+ export declare function normalizeGitHubRepoUrl(input?: string): string | undefined;
17
+ export declare function githubRepoSlug(input?: string): string | undefined;
18
+ export declare function githubRawFileUrl(input: {
19
+ repo?: string;
20
+ branch: string;
21
+ filepath: string;
22
+ }): string | undefined;
23
+ export declare function githubMarketplaceRegistryUrl(input?: GitHubPluginMarketplaceDefaults): string;
24
+ export declare const OFFICIAL_PLUGIN_REGISTRY_URL: string;
25
+ export declare const DEFAULT_PLUGIN_MARKETPLACE_CONFIG: {
26
+ readonly enabled: true;
27
+ readonly registryUrl: string;
28
+ readonly includeLocalRegistry: true;
29
+ readonly cacheTtlMs: 3600000;
30
+ readonly offlineCache: true;
31
+ readonly requestTimeoutMs: 10000;
32
+ readonly artifactDownloadTimeoutMs: 60000;
33
+ readonly cliRequestTimeoutMs: 120000;
34
+ };