openbot 0.2.14 → 0.3.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.
Files changed (80) hide show
  1. package/dist/agents/openbot/index.js +76 -0
  2. package/dist/agents/openbot/middleware/approval.js +132 -0
  3. package/dist/agents/openbot/runtime.js +289 -0
  4. package/dist/agents/openbot/system-prompt.js +32 -0
  5. package/dist/agents/openbot/tools/delegation.js +78 -0
  6. package/dist/agents/openbot/tools/mcp.js +99 -0
  7. package/dist/agents/openbot/tools/shell.js +91 -0
  8. package/dist/agents/openbot/tools/storage.js +75 -0
  9. package/dist/agents/openbot/tools/ui.js +176 -0
  10. package/dist/agents/system.js +20 -93
  11. package/dist/app/cli.js +0 -0
  12. package/dist/app/config.js +4 -1
  13. package/dist/app/server.js +15 -8
  14. package/dist/bus/agent-package.js +1 -0
  15. package/dist/bus/plugin.js +1 -0
  16. package/dist/bus/services.js +600 -0
  17. package/dist/bus/types.js +1 -0
  18. package/dist/harness/context.js +131 -0
  19. package/dist/harness/event-normalizer.js +59 -0
  20. package/dist/harness/orchestrator.js +27 -227
  21. package/dist/harness/process.js +25 -3
  22. package/dist/harness/queue-processor.js +227 -0
  23. package/dist/harness/runtime-factory.js +103 -0
  24. package/dist/plugins/ai-sdk/index.js +37 -0
  25. package/dist/plugins/ai-sdk/runtime.js +330 -0
  26. package/dist/plugins/ai-sdk/system-prompt.js +3 -0
  27. package/dist/plugins/ai-sdk.js +277 -87
  28. package/dist/plugins/approval/index.js +159 -0
  29. package/dist/plugins/approval.js +163 -0
  30. package/dist/plugins/delegation/index.js +79 -0
  31. package/dist/plugins/delegation.js +67 -11
  32. package/dist/plugins/mcp/index.js +108 -0
  33. package/dist/plugins/shell/index.js +99 -0
  34. package/dist/plugins/shell.js +123 -0
  35. package/dist/plugins/storage-tools/index.js +85 -0
  36. package/dist/plugins/storage.js +240 -5
  37. package/dist/plugins/ui/index.js +184 -0
  38. package/dist/plugins/ui.js +185 -21
  39. package/dist/registry/agents.js +138 -0
  40. package/dist/registry/plugins.js +91 -50
  41. package/dist/services/agent-packages.js +103 -0
  42. package/dist/services/plugins.js +98 -0
  43. package/dist/services/storage.js +360 -94
  44. package/docs/agents.md +39 -66
  45. package/docs/architecture.md +1 -1
  46. package/docs/plugins.md +70 -58
  47. package/docs/templates/AGENT.example.md +57 -0
  48. package/package.json +8 -7
  49. package/src/app/cli.ts +1 -1
  50. package/src/app/config.ts +14 -4
  51. package/src/app/server.ts +23 -10
  52. package/src/app/types.ts +385 -16
  53. package/src/assets/icon.svg +4 -1
  54. package/src/bus/plugin.ts +67 -0
  55. package/src/bus/services.ts +666 -0
  56. package/src/bus/types.ts +147 -0
  57. package/src/harness/context.ts +160 -0
  58. package/src/harness/event-normalizer.ts +82 -0
  59. package/src/harness/orchestrator.ts +35 -273
  60. package/src/harness/process.ts +28 -4
  61. package/src/harness/queue-processor.ts +309 -0
  62. package/src/harness/runtime-factory.ts +125 -0
  63. package/src/plugins/ai-sdk/index.ts +44 -0
  64. package/src/plugins/ai-sdk/runtime.ts +410 -0
  65. package/src/plugins/ai-sdk/system-prompt.ts +4 -0
  66. package/src/plugins/approval/index.ts +228 -0
  67. package/src/plugins/delegation/index.ts +94 -0
  68. package/src/plugins/mcp/index.ts +128 -0
  69. package/src/plugins/shell/index.ts +123 -0
  70. package/src/plugins/storage-tools/index.ts +101 -0
  71. package/src/plugins/ui/index.ts +227 -0
  72. package/src/registry/plugins.ts +106 -55
  73. package/src/services/plugins.ts +133 -0
  74. package/src/services/storage.ts +465 -137
  75. package/src/agents/system.ts +0 -112
  76. package/src/plugins/ai-sdk.ts +0 -197
  77. package/src/plugins/delegation.ts +0 -60
  78. package/src/plugins/mcp.ts +0 -154
  79. package/src/plugins/storage.ts +0 -725
  80. package/src/plugins/ui.ts +0 -57
package/src/app/types.ts CHANGED
@@ -3,10 +3,11 @@ import {
3
3
  AgentDetails,
4
4
  Channel,
5
5
  ChannelDetails,
6
- Plugin,
6
+ PluginDescriptor,
7
7
  Thread,
8
8
  ThreadDetails,
9
- } from '../plugins/storage.js';
9
+ } from '../bus/types.js';
10
+ import type { PluginRef } from '../bus/plugin.js';
10
11
 
11
12
  export interface OpenBotState {
12
13
  agentId: string;
@@ -20,10 +21,11 @@ export interface OpenBotState {
20
21
  shortTermMessages?: ShortTermMessage[];
21
22
  }
22
23
 
23
- export type ShortTermMessage = {
24
- role: 'user' | 'assistant' | 'system';
25
- content: string;
26
- };
24
+ export type ShortTermMessage =
25
+ | { role: 'system'; content: string }
26
+ | { role: 'user'; content: string }
27
+ | { role: 'assistant'; content: string; toolCalls?: any[] }
28
+ | { role: 'tool'; content: string; toolCallId: string; toolName: string };
27
29
 
28
30
  export type BaseEvent = {
29
31
  id?: string;
@@ -76,6 +78,17 @@ export type GetChannelDetailsResultEvent = BaseEvent & {
76
78
  };
77
79
  };
78
80
 
81
+ export type GetThreadDetailsEvent = BaseEvent & {
82
+ type: 'action:storage:get-thread-details';
83
+ };
84
+
85
+ export type GetThreadDetailsResultEvent = BaseEvent & {
86
+ type: 'action:storage:get-thread-details-result';
87
+ data: {
88
+ threadDetails: ThreadDetails | null;
89
+ };
90
+ };
91
+
79
92
  export type GetAgentsEvent = BaseEvent & {
80
93
  type: 'action:storage:get-agents';
81
94
  };
@@ -94,7 +107,7 @@ export type GetPluginsEvent = BaseEvent & {
94
107
  export type GetPluginsResultEvent = BaseEvent & {
95
108
  type: 'action:storage:get-plugins-result';
96
109
  data: {
97
- plugins: Plugin[];
110
+ plugins: PluginDescriptor[];
98
111
  };
99
112
  };
100
113
 
@@ -123,6 +136,59 @@ export type GetAgentDetailsResultEvent = BaseEvent & {
123
136
  };
124
137
  };
125
138
 
139
+ export type CreateAgentEvent = BaseEvent & {
140
+ type: 'action:storage:create-agent';
141
+ data: {
142
+ agentId: string;
143
+ name: string;
144
+ description?: string;
145
+ instructions: string;
146
+ plugins: PluginRef[];
147
+ };
148
+ };
149
+
150
+ export type CreateAgentResultEvent = BaseEvent & {
151
+ type: 'action:storage:create-agent-result';
152
+ data: {
153
+ success: boolean;
154
+ error?: string;
155
+ };
156
+ };
157
+
158
+ export type UpdateAgentEvent = BaseEvent & {
159
+ type: 'action:storage:update-agent';
160
+ data: {
161
+ agentId: string;
162
+ name?: string;
163
+ description?: string;
164
+ instructions?: string;
165
+ plugins?: PluginRef[];
166
+ };
167
+ };
168
+
169
+ export type UpdateAgentResultEvent = BaseEvent & {
170
+ type: 'action:storage:update-agent-result';
171
+ data: {
172
+ success: boolean;
173
+ error?: string;
174
+ };
175
+ };
176
+
177
+ export type DeleteAgentEvent = BaseEvent & {
178
+ type: 'action:storage:delete-agent';
179
+ data: {
180
+ agentId: string;
181
+ };
182
+ };
183
+
184
+ export type DeleteAgentResultEvent = BaseEvent & {
185
+ type: 'action:storage:delete-agent-result';
186
+ data: {
187
+ success: boolean;
188
+ error?: string;
189
+ };
190
+ };
191
+
126
192
  export type StreamThreadEvent = BaseEvent & {
127
193
  type: 'stream:thread';
128
194
  data: {
@@ -142,6 +208,38 @@ export type GetVariablesResultEvent = BaseEvent & {
142
208
  };
143
209
  };
144
210
 
211
+ export type CreateVariableEvent = BaseEvent & {
212
+ type: 'action:storage:create-variable';
213
+ data: {
214
+ key: string;
215
+ value: string;
216
+ secret?: boolean;
217
+ };
218
+ };
219
+
220
+ export type CreateVariableResultEvent = BaseEvent & {
221
+ type: 'action:storage:create-variable-result';
222
+ data: {
223
+ success: boolean;
224
+ error?: string;
225
+ };
226
+ };
227
+
228
+ export type DeleteVariableEvent = BaseEvent & {
229
+ type: 'action:storage:delete-variable';
230
+ data: {
231
+ key: string;
232
+ };
233
+ };
234
+
235
+ export type DeleteVariableResultEvent = BaseEvent & {
236
+ type: 'action:storage:delete-variable-result';
237
+ data: {
238
+ success: boolean;
239
+ error?: string;
240
+ };
241
+ };
242
+
145
243
  export type PatchChannelStateEvent = BaseEvent & {
146
244
  type: 'action:storage:patch-channel-state';
147
245
  data: {
@@ -346,22 +444,128 @@ export type UpdateChannelResultEvent = BaseEvent & {
346
444
  };
347
445
  };
348
446
 
447
+ export type UIWidgetAction = {
448
+ id: string;
449
+ label: string;
450
+ value?: unknown;
451
+ variant?: 'primary' | 'secondary' | 'danger';
452
+ disabled?: boolean;
453
+ };
454
+
455
+ export type UIWidgetField = {
456
+ id: string;
457
+ label: string;
458
+ type: 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'multiselect' | 'date';
459
+ description?: string;
460
+ placeholder?: string;
461
+ required?: boolean;
462
+ options?: Array<{ label: string; value: string }>;
463
+ defaultValue?: unknown;
464
+ };
465
+
466
+ export type UIWidgetListItem = {
467
+ id: string;
468
+ label: string;
469
+ description?: string;
470
+ status?: 'pending' | 'in_progress' | 'done' | 'error' | 'cancelled';
471
+ metadata?: Record<string, unknown>;
472
+ };
473
+
474
+ export type UIWidgetBase = {
475
+ widgetId: string;
476
+ title?: string;
477
+ description?: string;
478
+ body?: string;
479
+ state?: 'open' | 'submitted' | 'cancelled' | 'error';
480
+ metadata?: Record<string, unknown>;
481
+ };
482
+
483
+ export type UIMessageWidget = UIWidgetBase & {
484
+ kind: 'message';
485
+ actions?: UIWidgetAction[];
486
+ };
487
+
488
+ export type UIChoiceWidget = UIWidgetBase & {
489
+ kind: 'choice';
490
+ actions: UIWidgetAction[];
491
+ };
492
+
493
+ export type UIFormWidget = UIWidgetBase & {
494
+ kind: 'form';
495
+ fields: UIWidgetField[];
496
+ submitLabel?: string;
497
+ actions?: UIWidgetAction[];
498
+ };
499
+
500
+ export type UIListWidget = UIWidgetBase & {
501
+ kind: 'list';
502
+ items: UIWidgetListItem[];
503
+ actions?: UIWidgetAction[];
504
+ };
505
+
506
+ export type UIWidgetSpec = UIMessageWidget | UIChoiceWidget | UIFormWidget | UIListWidget;
507
+
508
+ export type RenderUIWidgetData =
509
+ | (Omit<UIMessageWidget, 'widgetId'> & { widgetId?: string })
510
+ | (Omit<UIChoiceWidget, 'widgetId'> & { widgetId?: string })
511
+ | (Omit<UIFormWidget, 'widgetId'> & { widgetId?: string })
512
+ | (Omit<UIListWidget, 'widgetId'> & { widgetId?: string })
513
+ | {
514
+ kind: 'approval' | 'todo_list';
515
+ widgetId?: string;
516
+ title?: string;
517
+ props?: Record<string, unknown>;
518
+ metadata?: Record<string, unknown>;
519
+ };
520
+
349
521
  export type UIWidgetEvent = BaseEvent & {
350
522
  type: 'client:ui:widget';
351
- data: {
352
- widgetId: string;
353
- kind: 'approval' | 'todo_list' | 'form';
354
- title?: string;
355
- props: Record<string, unknown>;
523
+ data: UIWidgetSpec;
524
+ meta: {
525
+ agentId: string;
526
+ threadId?: string;
356
527
  };
357
528
  };
358
529
 
359
530
  export type RenderUIWidgetEvent = BaseEvent & {
360
531
  type: 'action:render_ui_widget';
532
+ data: RenderUIWidgetData;
533
+ };
534
+
535
+ export type UIWidgetResponseEvent = BaseEvent & {
536
+ type: 'client:ui:widget:response';
537
+ data: {
538
+ widgetId: string;
539
+ actionId: string;
540
+ values?: Record<string, unknown>;
541
+ metadata?: Record<string, unknown>;
542
+ };
543
+ };
544
+
545
+ export type HandoffEvent = BaseEvent & {
546
+ type: 'action:handoff';
547
+ data: {
548
+ agentId: string;
549
+ content: string;
550
+ };
551
+ meta?: {
552
+ toolCallId?: string;
553
+ [key: string]: any;
554
+ };
555
+ };
556
+
557
+ export type HandoffResultEvent = BaseEvent & {
558
+ type: 'action:handoff:result';
361
559
  data: {
362
- kind: 'approval' | 'todo_list' | 'form';
363
- title?: string;
364
- props: Record<string, unknown>;
560
+ success: boolean;
561
+ agentId: string;
562
+ accepted: boolean;
563
+ };
564
+ meta: {
565
+ toolCallId: string;
566
+ agentId: string;
567
+ threadId?: string;
568
+ [key: string]: any;
365
569
  };
366
570
  };
367
571
 
@@ -371,9 +575,45 @@ export type DelegateEvent = BaseEvent & {
371
575
  agentId: string;
372
576
  content: string;
373
577
  };
578
+ meta?: {
579
+ toolCallId?: string;
580
+ [key: string]: any;
581
+ };
582
+ };
583
+
584
+ export type DelegateResultEvent = BaseEvent & {
585
+ type: 'action:delegate:result';
586
+ data: {
587
+ success: boolean;
588
+ agentId: string;
589
+ summary: string;
590
+ };
374
591
  meta: {
375
592
  toolCallId: string;
593
+ agentId: string;
594
+ threadId?: string;
595
+ [key: string]: any;
596
+ };
597
+ };
598
+
599
+ /** Internal routing: delegation plugin → orchestrator only (not stored or broadcast). */
600
+ export type HandoffRequestEvent = BaseEvent & {
601
+ type: 'handoff:request';
602
+ data: {
603
+ agentId: string;
604
+ content: string;
605
+ };
606
+ meta?: Record<string, unknown>;
607
+ };
608
+
609
+ /** Internal routing: delegation plugin → orchestrator only (not stored or broadcast). */
610
+ export type DelegationRequestEvent = BaseEvent & {
611
+ type: 'delegation:request';
612
+ data: {
613
+ agentId: string;
614
+ content: string;
376
615
  };
616
+ meta?: Record<string, unknown>;
377
617
  };
378
618
 
379
619
  export type MCPListToolsEvent = BaseEvent & {
@@ -413,6 +653,35 @@ export type MCPCallResultEvent = BaseEvent & {
413
653
  };
414
654
  };
415
655
 
656
+ export type ShellExecEvent = BaseEvent & {
657
+ type: 'action:shell_exec';
658
+ data: {
659
+ command: string;
660
+ cwd?: string;
661
+ shell?: string;
662
+ timeoutMs?: number;
663
+ };
664
+ meta?: {
665
+ toolCallId?: string;
666
+ approvalId?: string;
667
+ approvalStatus?: 'approved' | 'denied';
668
+ [key: string]: any;
669
+ };
670
+ };
671
+
672
+ export type ShellExecResultEvent = BaseEvent & {
673
+ type: 'action:shell_exec:result';
674
+ data: {
675
+ success: boolean;
676
+ approved?: boolean;
677
+ exitCode: number | null;
678
+ stdout: string;
679
+ stderr: string;
680
+ timedOut: boolean;
681
+ error?: string;
682
+ };
683
+ };
684
+
416
685
  export type UserInputEvent = BaseEvent & {
417
686
  type: 'user:input';
418
687
  data: {
@@ -425,6 +694,78 @@ export type UserInputEvent = BaseEvent & {
425
694
  };
426
695
  };
427
696
 
697
+ export type InstallPluginEvent = BaseEvent & {
698
+ type: 'action:plugin:install';
699
+ data: {
700
+ name: string;
701
+ version?: string;
702
+ };
703
+ };
704
+
705
+ export type InstallPluginResultEvent = BaseEvent & {
706
+ type: 'action:plugin:install:result';
707
+ data: {
708
+ success: boolean;
709
+ plugin?: { name: string; version: string };
710
+ error?: string;
711
+ };
712
+ };
713
+
714
+ export type UninstallPluginEvent = BaseEvent & {
715
+ type: 'action:plugin:uninstall';
716
+ data: {
717
+ id: string;
718
+ };
719
+ };
720
+
721
+ export type UninstallPluginResultEvent = BaseEvent & {
722
+ type: 'action:plugin:uninstall:result';
723
+ data: {
724
+ success: boolean;
725
+ error?: string;
726
+ };
727
+ };
728
+
729
+ export type ListMarketplaceAgentsEvent = BaseEvent & {
730
+ type: 'action:marketplace:list';
731
+ };
732
+
733
+ export type ListMarketplaceAgentsResultEvent = BaseEvent & {
734
+ type: 'action:marketplace:list:result';
735
+ data: {
736
+ success: boolean;
737
+ agents: Array<{
738
+ id: string;
739
+ name: string;
740
+ description: string;
741
+ image?: string;
742
+ instructions: string;
743
+ plugins: PluginRef[];
744
+ }>;
745
+ error?: string;
746
+ };
747
+ };
748
+
749
+ export type InstallAgentEvent = BaseEvent & {
750
+ type: 'action:agent:install';
751
+ data: {
752
+ agentId: string;
753
+ name: string;
754
+ description?: string;
755
+ instructions: string;
756
+ plugins: PluginRef[];
757
+ };
758
+ };
759
+
760
+ export type InstallAgentResultEvent = BaseEvent & {
761
+ type: 'action:agent:install:result';
762
+ data: {
763
+ success: boolean;
764
+ agentId: string;
765
+ error?: string;
766
+ };
767
+ };
768
+
428
769
  export type OpenBotEvent =
429
770
  | UserInputEvent
430
771
  | AgentInvokeEvent
@@ -438,17 +779,29 @@ export type OpenBotEvent =
438
779
  | GetThreadsResultEvent
439
780
  | GetChannelDetailsEvent
440
781
  | GetChannelDetailsResultEvent
782
+ | GetThreadDetailsEvent
783
+ | GetThreadDetailsResultEvent
441
784
  | GetAgentsEvent
442
785
  | GetAgentsResultEvent
443
786
  | GetPluginsEvent
444
787
  | GetPluginsResultEvent
445
788
  | GetAgentDetailsEvent
446
789
  | GetAgentDetailsResultEvent
790
+ | CreateAgentEvent
791
+ | CreateAgentResultEvent
792
+ | UpdateAgentEvent
793
+ | UpdateAgentResultEvent
794
+ | DeleteAgentEvent
795
+ | DeleteAgentResultEvent
447
796
  | GetEventsEvent
448
797
  | GetEventsResultEvent
449
798
  | StreamThreadEvent
450
799
  | GetVariablesEvent
451
800
  | GetVariablesResultEvent
801
+ | CreateVariableEvent
802
+ | CreateVariableResultEvent
803
+ | DeleteVariableEvent
804
+ | DeleteVariableResultEvent
452
805
  | PatchChannelStateEvent
453
806
  | PatchChannelStateResultEvent
454
807
  | PatchThreadStateEvent
@@ -469,8 +822,24 @@ export type OpenBotEvent =
469
822
  | UpdateChannelResultEvent
470
823
  | UIWidgetEvent
471
824
  | RenderUIWidgetEvent
825
+ | UIWidgetResponseEvent
826
+ | HandoffEvent
827
+ | HandoffResultEvent
472
828
  | DelegateEvent
829
+ | DelegateResultEvent
830
+ | HandoffRequestEvent
831
+ | DelegationRequestEvent
473
832
  | MCPListToolsEvent
474
833
  | MCPListToolsResultEvent
475
834
  | MCPCallEvent
476
- | MCPCallResultEvent;
835
+ | MCPCallResultEvent
836
+ | ShellExecEvent
837
+ | ShellExecResultEvent
838
+ | InstallPluginEvent
839
+ | InstallPluginResultEvent
840
+ | UninstallPluginEvent
841
+ | UninstallPluginResultEvent
842
+ | ListMarketplaceAgentsEvent
843
+ | ListMarketplaceAgentsResultEvent
844
+ | InstallAgentEvent
845
+ | InstallAgentResultEvent;
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 762 762" fill="none" shape-rendering="auto"><metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description><dc:title>Adventurer</dc:title><dc:creator>Lisa Wischofsky</dc:creator><dc:source xsi:type="dcterms:URI">https://www.figma.com/community/file/1184595184137881796</dc:source><dcterms:license xsi:type="dcterms:URI">https://creativecommons.org/licenses/by/4.0/</dcterms:license><dc:rights>Remix of „Adventurer” (https://www.figma.com/community/file/1184595184137881796) by „Lisa Wischofsky”, licensed under „CC BY 4.0” (https://creativecommons.org/licenses/by/4.0/)</dc:rights></rdf:Description></rdf:RDF></metadata><mask id="viewboxMask"><rect width="762" height="762" rx="0" ry="0" x="0" y="0" fill="#fff" /></mask><g mask="url(#viewboxMask)"><path d="M396 164.8a224.8 224.8 0 0 1 104.8 42.4c6.2 4.9 12.5 9.4 18 15a225.4 225.4 0 0 1 71.8 149 58.5 58.5 0 0 1 50.9 42.2 71 71 0 0 1-27.6 76.5c-11 7.7-24.5 12-38 11.7-5 0-10-1.6-15-1.8-1.9 2.2-3.3 4.9-4.8 7.3A223.3 223.3 0 0 1 389 609.8c-11 .7-21.9 2-33 .7a223.7 223.7 0 0 1-178.8-342.3A223.4 223.4 0 0 1 352 163.5c14.6-1.4 29.4-.3 44 1.3Z" fill="#000"/><path fill-rule="evenodd" clip-rule="evenodd" d="M498.8 213.2A216 216 0 0 0 363 169c-13-.2-26.2 1.6-39 4a218 218 0 0 0-113.6 365.5 218.5 218.5 0 0 0 260.4 40.2c35-18.8 64.2-47.3 84.4-81.5l-3-1.6c-2.8-1.4-5.7-3-8-5-2.2-2-.3-5.8 2.7-4.7 1.5.7 3 1.6 4.4 2.4a55 55 0 0 0 59.6-3.6 64.5 64.5 0 0 0 25-69.8 53.1 53.1 0 0 0-24-31 52.6 52.6 0 0 0-47-2.8c-1.6.8-3.4 1.5-5 1.3-2.5-.2-2.8-4.2-.6-5.2 8-4 16.5-5.6 25.4-6.4a217 217 0 0 0-72-146.4c-4.4-4-8.7-8.1-13.9-11.3Zm107.6 196.2c2-1.2 1.3-5.1-1.4-5-2 0-4.2.8-6.2 1.6l-1.4.4a95.1 95.1 0 0 0-25.5 12.4c-2.2 2-2.2 4.4.1 6.2a92 92 0 0 0 5.2 2.8 36 36 0 0 1 13 9.2c-.2 1.9-2 3.4-3.4 4.5l-.2.2c-3.9 3-8.8 5-13.6 7-2.5 1-4.9 2-7.1 3.1-1.7.8-2.6 2.2-1.6 3.9 1 2 3.2 1.1 5 .5l.6-.2 5.4-2.3c5.4-2.3 11-4.5 15.4-8 2.7-2.1 5.1-5.1 5.4-8.7-.5-3.4-2.7-5.7-5.3-7.8a83 83 0 0 0-11.6-7.2l-1.1-.6c5.4-3 10.8-5.6 16.6-7.7l5-1.7a52 52 0 0 0 6.7-2.6Z" fill="#763900"/><g transform="translate(-161 -83)"><path d="M589.3 432.7a64.4 64.4 0 0 1 28.5 33.5 64.3 64.3 0 0 1 .5 45.1c-1 2.9-2.9 5.2-6.3 4.8-15-.8-30 .1-45 .5-10 1.1-20 2.2-30 3.8-10.5 1.8-20.6 4.1-31 6.1-4.3-.1-5.3-4.2-7.2-7.3A65.5 65.5 0 0 1 546 425c14.8-2.6 30.5.2 43.4 7.7Z" fill="#000"/><path d="M558 429.9a59.1 59.1 0 0 1 54.4 80.6l-3.2-.3a27 27 0 0 0 1.3-15.4 26.6 26.6 0 1 0-50 16.9 287 287 0 0 0-34 5.2c-6.7 1.2-13.4 3.2-20.1 4A59.8 59.8 0 0 1 517 445a59 59 0 0 1 41-15.1Z" fill="#fff"/><path d="M392 447a54.8 54.8 0 0 1 42.8 81.9c-1.1 1.9-2.9 4-5 4.7-3 .8-6.6-.2-9.6-.9-8.7-2-17.4-3.8-26.3-5.1-12.9-.9-26-1-39 0-4.7.4-9.7 1.4-14.5 1-2.3-1-3.7-4.2-4.6-6.4a54.9 54.9 0 0 1 56.2-75Z" fill="#000"/><path d="M401.5 454.7a49.3 49.3 0 0 1 26.7 74l-4.1-.7c4.1-4.4 7-9.8 6.8-16a22.6 22.6 0 0 0-43.7-8.8c-2.5 5.9-1.9 12 .4 18-7.6.2-15-.4-22.6.3-7.3.7-14.7 1.2-22 1.8l-1.9-3.4a49.2 49.2 0 0 1 60.4-65.2Z" fill="#fff"/></g><g transform="translate(-161 -83)"><path d="M531 352.3a85.8 85.8 0 0 1 60.6 15.1 82.9 82.9 0 0 1 29 33c1 3-.4 3.8-2.6 5.3-4-2.2-6.9-5.6-10.5-8.3-13-9.7-28-16.3-43.7-20.2-15-3.5-30.6-5-45.8-2.8-4.8.4-9.3 2-14 2.7-2.4.2-5.1-1.2-4.2-4 1.9-4.2 4.2-8.6 7.6-11.7a45 45 0 0 1 23.6-9ZM383 428.8c13.4-.8 26.3-.6 39 4.3 5.9 2.3 11.6 5.9 14 12a14 14 0 0 1-1.8 12.6c-4.9-.7-9.4-2.6-14.1-3.8a203 203 0 0 0-71-6c-5 .4-10 2-14.8 1.8-1.8-.5-1.2-2.2-1-3.5.9-2.5 3.6-3.9 5.8-5.1a119.2 119.2 0 0 1 43.9-12.3Z" fill="#000"/></g><g transform="translate(-161 -83)"><path d="m525 563.7 1.2 2.3c.4 2.7-2 3.4-3.8 4.4a184 184 0 0 1-85.8 17c-5-.6-10.2-.7-15-2-2.3-1-2.6-4-.3-5.2 2.7 0 5.5.9 8.2 1 7.2 1 14.3.7 21.5.7 22.5-.8 45-6.8 65.7-15.5 2.8-1.2 5.2-2.6 8.3-2.7Z" fill="#000"/></g><g transform="translate(-161 -83)"></g><g transform="translate(-161 -83)"></g><g transform="translate(-161 -83)"><path d="M754.9 186.1a94.7 94.7 0 0 1 29 52c5.3 43 5.3 86 11.8 128.9 4.5 31.8 10.7 66.1 25.5 94.9 10.3 20.5 21.8 40.5 31.8 61.1 8.6 17.7 14 37.3 14.8 57 .9 11.5.4 23.5-.6 34.9-2.2 18-7.9 36.3-17.5 51.8-7.5 12.2-19 21.4-30.6 29.5-1.3.8-2.5 2.8-4.1 2.6-2 0-3-2-2.5-3.8a95 95 0 0 0 6.5-69.1c-.3-1-.4-2.1-1.4-2.7-4.6 25.3-15 49.9-31.4 69.9-13.2 16-30 28.9-50.2 34.6a73.7 73.7 0 0 1-47-1.7c-1.6-1.7-4.5-3.3-3.3-6a68.1 68.1 0 0 0 16.8-32c-1.8.6-3.3 1.7-5 2.4a67.7 67.7 0 0 1-29.5 5.9c-9 0-19.3-2-26.3-8-1.8-1.6-4-3.2-3.3-5.9a69 69 0 0 0 12.8-32.3c.7-.9 1.9-1.4 2.8-2.1 26-18.2 47.3-42.2 63.5-69.5 1-2.3 3.4-2.8 5.6-2a55.2 55.2 0 0 0 41.4-4 64.8 64.8 0 0 0 34.3-65.5 55 55 0 0 0-19.8-36 50.2 50.2 0 0 0-55-6 123 123 0 0 1-4.6 32.1 123.4 123.4 0 0 1-35 58.3c-1.3 1-2.7 2.6-4.4 3.1-1.3.1-3.5-.9-3.5-2.5-.3-1.9 1.7-3.3 2.7-4.8a76.6 76.6 0 0 0 10-21.2c4.3-14 6-29.3 6.1-44-.3-26-5-52.4-16-76.1-.6-1.8-1.8-3.8-1-5.8 2-5 3-10.3 3.2-15.7-4.3 2.8-9 5.2-13.4 7.7-2.2 1.2-5.4 2.1-7.3 0-1.1-3.4-1-7.5-.7-11 .3-6.2.5-12.1 0-18.2-6.9 3.7-13.3 7.5-20.6 10.4-2.5 1-5.3 0-7.7-.9a83.6 83.6 0 0 1-29.2-23c-4.7-5.3-9-10.6-11.8-17.3-2.6-6-3.6-12.1-3.7-18.6-13.7 7.3-31 6.1-46.1 6.2-16 .3-32.2-.8-48 1.1-1.8.2-4.8-.8-4.9-2.9-.5-2.8 1.8-4.6 3.5-6.5-13.2 3.6-26.2 8.7-39 13-3.6.9-7 2.6-10.4.4-3.5-2.5-2.6-6.2-2.3-10-3 0-6 1.4-8.8 2.3a721.5 721.5 0 0 1-41 14.3c-9.5 2.9-19 5-29.1 4.8-4.8-.2-9.6.9-14 3a62.4 62.4 0 0 1-44.1-15 40.6 40.6 0 0 1-13-24.2 46 46 0 0 1 2-20 69.7 69.7 0 0 1 34.4-37.7c1.6-.8 3.9-2.4 5.7-1.4 1.7 1 2 3.4 1 5a49.6 49.6 0 0 0-5.8 57.9c4.4 7.3 10.9 14.2 19.5 16 2.6-15 10.8-29 20.5-40.6a205.6 205.6 0 0 1 49.4-41.6 297.1 297.1 0 0 1 114.9-41.3 176 176 0 0 1 66.5 2.6c17-22 42.5-37.2 70-41.6 30.7-5.4 63.9 3.6 86.9 24.8Z" fill="#000"/><g fill="#3eac2c"><path d="M681 165.9c28-1.7 56.2 9.2 75.2 29.9a88.5 88.5 0 0 1 21.6 42.3c.6 7 2 13.8 2.2 20.8 1.3 9.7 1.5 19.4 2.5 29.1 1.2 22.6 3.1 45.5 5.7 68 4 29 8 57.1 17.6 85 5.8 16.7 14.1 31.4 22.3 46.9 7.8 14.9 16.1 29.7 22.9 45.1 11.9 27.4 13.5 58.6 9.4 87.9a112.7 112.7 0 0 1-22.5 52c-4.5 5-9.7 9.9-15.2 13.7 4.3-12.3 6.3-25.6 5.7-38.6-.3-12.7-3.2-26-9.2-37.2-1.2-2.3-5.1-2-5.7.7-3.7 30-15.6 60.3-36.2 82.8a90 90 0 0 1-52.4 29.8 66.1 66.1 0 0 1-32.2-3c8.3-10.9 15.8-25.2 15.7-39.1.2-2.8-3.4-3.3-5.1-1.8a53.9 53.9 0 0 1-19.3 8.6 52.6 52.6 0 0 1-34.5-2.3c-1.2-.8-3.7-1.9-4.2-3.2a84.7 84.7 0 0 0 11.5-29.8c1.5-2 4.1-3 6-4.7a226.1 226.1 0 0 0 59-66.2c4.7.4 9.3 1.8 14.2 1.9a66 66 0 0 0 55-27.5 72.5 72.5 0 0 0 14.1-39 62.6 62.6 0 0 0-20.9-50 55 55 0 0 0 6.6-19c3.1-19.7.1-40.7-4.4-60a214.8 214.8 0 0 0-21-53.1c-3.6-15.1-8.4-29.8-15.8-43.5a138 138 0 0 0-55.4-56.6c-1.2-.7-2.5-.9-3.9-1.1a58.9 58.9 0 0 0-44.3-24.4c-5-.8-9.9 0-14.9 0-3.3-2.4-7-3.2-11-3.4-6.1-.5-11 1.8-16.6-1.5A104.6 104.6 0 0 1 681 166Z"/><path d="M594 208c1 .4 2.3.3 2.9 1.4-2.4.6-4.8 1.4-7 2.3a320.2 320.2 0 0 0-75.1 33.9c-8.2 5-16.1 10.6-23.5 16.7-1.5 1.3-1.6 3.3-.5 5 1.5.8 2.8.8 4.1-.4a254.2 254.2 0 0 1 46.6-29.4 268.6 268.6 0 0 1 61.6-23c6.4-1 13.5-2.5 20-1.3 2.2.4 4.2 1.7 6.4 2.4 3 1.2 6.2.2 9.5.2 4.3.1 8.8.3 13 1.2 12.5 2.2 24 9 32 19a91.5 91.5 0 0 1 17.3 44.1c1 7.6 1.8 15.2 1.6 22.9 0 2.2 0 5.7 3 5.5 2.2 0 3-1.6 3-3.5 0-21.1-3-41.8-12.4-61a127.4 127.4 0 0 1 36.4 33 156 156 0 0 1 27.8 66c4.7 25.5 4.3 52.4 1 78-.5 3.3-1.3 6.8-1.1 10.1 1.3 3 5.2 2.2 5.5-1 1.7-8.8 2.7-18 3.2-27.1 1.6-16.3.9-32.1-.8-48.3.3 2 1.4 3.6 2.2 5.4A202.3 202.3 0 0 1 786 428c.3 11.7-.6 25.3-6.3 35.8a57 57 0 0 0-56-5.3c-.6-1.6-.5-4.2-2.8-4.4-1.7-.3-3.4 1-3.3 2.9.3 6.6.5 13.4-.2 20a130.9 130.9 0 0 1-22.6 58l-1 .5c.2-2 .8-3.7 1.4-5.5 5-16.8 6.3-34.2 5.8-51.6-1.2-24.9-6.5-50.5-17.4-73.1 2.4-6 3-12 3.8-18.3.1-2 .5-4.1 0-6.1-1.2-2.4-4.1-1.8-5.7-.1-3.2 3-7 5.1-10.9 7-1.6.8-3.2 2.2-5 2.2 0-3.6.4-7.3.2-11 0-5.9.5-12.4-1-18-2.5-2.2-5-1-7.2.9-6.2 3.5-12.5 6.8-19 9.6-1.8.8-3.4.2-5-.4a78.2 78.2 0 0 1-24.8-19.2 64.7 64.7 0 0 1-13.4-19.4 39.7 39.7 0 0 1 2-33c1-1.6.5-4.1-1.7-4.4-2.7-.6-4 3-5 4.9-2 4.5-4 10.9-8.4 13.6-9.6 4-19.4 4.3-29.6 4.2h-48c-2.6.1-5.1.6-7.8.8 2-3 5.3-5 3.1-8.9-3.2-2-6.4-.7-9.8-.1-13.2 3.5-26 8.6-39 13-2 .6-4 1.4-6 1 .1-2.8 1.4-6.8-1-9-2-2.3-4.8-2-7.5-1.5-7 1.8-13.2 4.6-20 7-12.9 4.5-25.9 9.3-39.2 12.5-7.5 1.7-15.1 1.9-22.8 2-3.7 0-6.3 2.6-10 2.3a54 54 0 0 1-26-5c-9.7-4.3-17.9-11.9-21.6-22a37 37 0 0 1 1.2-27 62.3 62.3 0 0 1 22-26.4c-1.6 4-3.3 7.8-4.3 12-4.5 19 .4 40.8 15.1 54.1 5.2 3.6 10 7 16.6 7.1 2.3 0 3.8-1.3 4.2-3.5 3.4-20.6 18-39.2 32.8-53.2 26.2-24.4 59.4-42.1 93-53.9 13.1-4.4 26.4-8 40-10.7 24.7-4.5 51.4-6.2 76-.4Z"/></g></g><g transform="translate(-161 -83)"></g></g></svg>
1
+ <svg width="60.2" height="58.1" viewBox="262.8 360.5 84.2 82.1" fill="#9333EA" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M301.841 380.896C302.069 380.893 302.297 380.889 302.531 380.885C304.636 380.853 306.741 380.836 308.845 380.822C310.26 380.813 311.675 380.8 313.09 380.775C314.456 380.752 315.822 380.739 317.189 380.735C317.71 380.731 318.231 380.724 318.752 380.712C322.824 380.626 322.824 380.626 323.909 381.43C324.315 382.025 324.561 382.569 324.8 383.246C324.965 383.518 325.13 383.789 325.301 384.068C325.519 384.445 325.519 384.445 325.741 384.83C325.909 385.118 326.077 385.407 326.249 385.704C326.336 385.854 326.423 386.004 326.513 386.159C328.304 389.25 330.137 392.314 332.004 395.361C332.482 396.144 332.957 396.929 333.431 397.715C333.631 398.035 333.631 398.035 333.835 398.361C334.546 399.544 334.969 400.367 334.7 401.777C334.24 402.838 333.683 403.834 333.113 404.839C332.867 405.285 332.621 405.73 332.375 406.176C332.125 406.626 331.874 407.075 331.622 407.525C330.952 408.724 330.296 409.931 329.639 411.137C329.518 411.359 329.397 411.58 329.272 411.807C328.303 413.581 327.349 415.362 326.398 417.144C324.53 420.642 322.621 424.107 320.611 427.525C320.282 428.088 319.962 428.655 319.644 429.224C319.215 429.954 319.215 429.954 318.708 430.462C317.978 430.557 317.978 430.557 317.185 430.462C316.049 429.578 315.42 428.258 314.71 427.035C313.685 425.291 312.637 423.6 311.454 421.96C311.024 421.203 310.906 420.668 310.838 419.8C311.092 419.081 311.092 419.081 311.491 418.343C311.707 417.937 311.707 417.937 311.927 417.522C312.081 417.242 312.235 416.963 312.393 416.675C312.615 416.26 312.615 416.26 312.841 415.836C314.003 413.671 314.003 413.671 314.549 412.797C315.269 411.676 315.269 411.676 315.308 410.387C314.801 409.466 314.268 408.575 313.694 407.695C313.466 407.335 313.238 406.976 313.011 406.616C312.845 406.353 312.845 406.353 312.676 406.085C312.247 405.402 311.829 404.713 311.425 404.014C311.304 403.806 311.183 403.598 311.058 403.384C310.786 402.65 310.848 402.26 311.092 401.523C311.6 401.015 311.6 401.015 312.57 400.967C312.988 400.97 313.407 400.975 313.826 400.982C314.281 400.981 314.737 400.981 315.192 400.98C315.911 400.98 316.629 400.984 317.348 400.995C318.041 401.005 318.733 401.002 319.427 400.998C319.641 401.004 319.854 401.011 320.075 401.017C320.695 401.007 321.171 400.974 321.754 400.762C322.329 400.154 322.665 399.481 323.023 398.731C323.171 398.49 323.318 398.248 323.47 398C323.899 397.287 324.326 396.573 324.752 395.859C324.904 395.608 325.056 395.357 325.212 395.099C325.355 394.859 325.498 394.618 325.646 394.371C325.841 394.045 325.841 394.045 326.04 393.713C326.38 393.138 326.38 393.138 326.323 392.385C326.167 392.384 326.011 392.383 325.85 392.383C322.054 392.368 318.257 392.349 314.461 392.325C312.625 392.313 310.789 392.303 308.953 392.297C307.352 392.291 305.752 392.282 304.152 392.271C303.305 392.265 302.458 392.26 301.61 392.258C300.664 392.256 299.719 392.249 298.773 392.241C298.351 392.241 298.351 392.241 297.921 392.242C297.663 392.238 297.406 392.235 297.14 392.232C296.916 392.231 296.693 392.23 296.462 392.228C295.73 392.109 295.379 391.879 294.846 391.369C294.591 389.978 295.187 388.999 295.837 387.818C295.938 387.63 296.038 387.441 296.142 387.246C296.464 386.646 296.789 386.049 297.115 385.451C297.333 385.045 297.551 384.638 297.769 384.231C299.545 380.925 299.545 380.925 301.841 380.896Z" fill="#9333EA"/>
3
+ <path d="M291.476 372.547C292.795 373.009 293.243 374.055 293.942 375.218C294.23 375.684 294.519 376.15 294.807 376.615C294.945 376.84 295.082 377.065 295.223 377.297C295.544 377.813 295.875 378.314 296.225 378.811C296.388 379.044 296.551 379.277 296.718 379.518C296.856 379.711 296.994 379.903 297.137 380.102C297.492 380.97 297.407 381.615 297.131 382.485C296.704 383.459 296.209 384.39 295.703 385.325C295.497 385.714 295.497 385.714 295.287 386.111C294.44 387.702 293.559 389.255 292.565 390.759C292.217 391.585 292.351 392.026 292.562 392.892C292.955 393.665 292.955 393.665 293.466 394.431C293.555 394.572 293.644 394.713 293.736 394.858C294.019 395.304 294.305 395.748 294.592 396.192C294.971 396.778 295.346 397.365 295.719 397.953C295.886 398.212 296.053 398.471 296.225 398.738C296.646 399.535 296.848 400.115 296.877 401.015C296.559 401.435 296.559 401.435 296.115 401.777C295.364 401.849 294.663 401.877 293.911 401.871C293.467 401.876 293.023 401.88 292.579 401.885C291.879 401.887 291.18 401.888 290.48 401.888C289.804 401.888 289.129 401.895 288.453 401.903C288.244 401.901 288.036 401.899 287.82 401.897C286.637 401.91 286.637 401.91 285.616 402.466C284.844 403.543 284.229 404.69 283.598 405.854C283.455 406.11 283.312 406.365 283.165 406.628C283.031 406.873 282.897 407.118 282.76 407.371C282.637 407.594 282.515 407.818 282.389 408.048C282.071 408.656 282.071 408.656 282.408 409.392C282.559 409.393 282.71 409.394 282.865 409.395C286.539 409.416 290.213 409.439 293.886 409.465C295.663 409.478 297.439 409.49 299.216 409.499C300.929 409.509 302.642 409.521 304.356 409.534C305.011 409.539 305.665 409.543 306.32 409.546C307.235 409.55 308.15 409.557 309.064 409.565C309.473 409.566 309.473 409.566 309.89 409.567C310.139 409.57 310.388 409.573 310.644 409.576C310.861 409.577 311.077 409.578 311.3 409.58C311.854 409.646 311.854 409.646 312.615 410.154C312.797 411.581 312.41 412.577 311.745 413.808C311.656 413.979 311.567 414.15 311.475 414.326C311.288 414.685 311.099 415.042 310.908 415.399C310.616 415.946 310.329 416.495 310.042 417.045C309.859 417.394 309.676 417.743 309.492 418.092C309.363 418.337 309.363 418.337 309.231 418.588C308.881 419.242 308.574 419.78 308.046 420.308C307.364 420.361 306.707 420.382 306.024 420.382C305.815 420.383 305.606 420.385 305.391 420.387C304.698 420.392 304.005 420.392 303.312 420.393C302.832 420.395 302.351 420.396 301.871 420.398C300.862 420.401 299.854 420.402 298.845 420.402C297.552 420.402 296.259 420.409 294.966 420.417C293.973 420.423 292.98 420.424 291.987 420.424C291.51 420.424 291.034 420.427 290.557 420.431C289.89 420.436 289.224 420.434 288.557 420.431C288.36 420.434 288.163 420.437 287.959 420.44C287.061 420.429 286.569 420.386 285.852 419.824C285.47 419.314 285.137 418.817 284.831 418.259C284.718 418.056 284.605 417.852 284.488 417.643C284.367 417.423 284.246 417.203 284.121 416.976C282.907 414.808 281.638 412.679 280.329 410.566C280.156 410.286 279.982 410.006 279.803 409.717C279.469 409.176 279.134 408.636 278.799 408.096C277.871 406.592 276.959 405.077 276.062 403.554C275.968 403.409 275.874 403.264 275.777 403.114C275.143 402.097 274.834 401.442 275.046 400.254C275.425 399.337 275.889 398.475 276.363 397.604C276.568 397.22 276.568 397.22 276.777 396.828C278.005 394.541 279.284 392.283 280.569 390.029C282.224 387.119 283.868 384.197 285.327 381.184C289.509 372.654 289.509 372.654 291.476 372.547Z" fill="#9333EA"/>
4
+ </svg>
@@ -0,0 +1,67 @@
1
+ import { MelonyPlugin } from 'melony';
2
+ import { OpenBotEvent, OpenBotState } from '../app/types.js';
3
+ import { AgentDetails, ConfigSchema, Storage } from './types.js';
4
+
5
+ /**
6
+ * Reference to a plugin from an agent's AGENT.md frontmatter.
7
+ *
8
+ * The `id` is either a built-in plugin id (e.g. `ai-sdk`, `shell`) or an npm
9
+ * package name (e.g. `openbot-plugin-codex`, `@scope/openbot-plugin-foo`).
10
+ * Each entry may carry plugin-specific `config`.
11
+ */
12
+ export interface PluginRef {
13
+ id: string;
14
+ config?: Record<string, unknown>;
15
+ }
16
+
17
+ /** Tool definition shape contributed by a plugin and consumed by runtime plugins. */
18
+ export interface ToolDefinition {
19
+ description: string;
20
+ inputSchema: unknown;
21
+ }
22
+
23
+ /**
24
+ * Context passed to a Plugin factory at runtime.
25
+ *
26
+ * `tools` is the merged tool map collected from every tool plugin attached to
27
+ * the same agent. Runtime plugins read it to feed an LLM; tool plugins ignore
28
+ * it. The agent loader is responsible for the merge and collision detection.
29
+ */
30
+ export interface PluginContext {
31
+ agentId: string;
32
+ agentDetails: AgentDetails;
33
+ config: Record<string, unknown>;
34
+ storage: Storage;
35
+ tools: Record<string, ToolDefinition>;
36
+ }
37
+
38
+ /**
39
+ * A Plugin is the single extension unit on the OpenBot bus.
40
+ *
41
+ * The bus does not care whether a plugin owns the LLM loop (a "runtime"
42
+ * plugin), contributes tools (a "tool" plugin), or layers behaviour (e.g.
43
+ * approval middleware). Roles are defined entirely by which events the plugin
44
+ * subscribes to and emits.
45
+ *
46
+ * - Runtime plugins typically handle `agent:invoke` and may consume `tools`.
47
+ * - Tool plugins typically expose `toolDefinitions` and handle `action:<tool>`.
48
+ * - Middleware plugins observe events and (re-)emit them with extra logic.
49
+ *
50
+ * An agent must include at least one plugin that handles `agent:invoke`; the
51
+ * loader cannot enforce this statically (handlers are registered at factory
52
+ * time), so misconfigured agents will simply not respond.
53
+ */
54
+ export interface Plugin {
55
+ id: string;
56
+ name: string;
57
+ description: string;
58
+ image?: string;
59
+ /** Optional system-prompt body suggested when this plugin is used as the runtime. */
60
+ defaultInstructions?: string;
61
+ /** JSON-schema-like description of `config` accepted in AGENT.md `plugins[].config`. */
62
+ configSchema?: ConfigSchema;
63
+ /** Tool definitions contributed to any runtime plugin attached to the same agent. */
64
+ toolDefinitions?: Record<string, ToolDefinition>;
65
+ /** Build the Melony plugin that wires this plugin onto the bus for one run. */
66
+ factory: (context: PluginContext) => MelonyPlugin<OpenBotState, OpenBotEvent>;
67
+ }