@contractspec/example.agent-console 3.7.5 → 3.7.7

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 (176) hide show
  1. package/.turbo/turbo-build.log +18 -18
  2. package/AGENTS.md +50 -31
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +69 -77
  5. package/dist/agent/agent.event.js +1 -1
  6. package/dist/agent/agent.operation.js +1 -1
  7. package/dist/agent/index.d.ts +5 -5
  8. package/dist/agent/index.js +1 -1
  9. package/dist/browser/agent/agent.event.js +1 -1
  10. package/dist/browser/agent/agent.operation.js +1 -1
  11. package/dist/browser/agent/index.js +1 -1
  12. package/dist/browser/index.js +2145 -2145
  13. package/dist/browser/presentations/index.js +4 -4
  14. package/dist/browser/run/index.js +536 -536
  15. package/dist/browser/run/run.event.js +2 -2
  16. package/dist/browser/run/run.presentation.js +2 -2
  17. package/dist/browser/tool/index.js +260 -260
  18. package/dist/browser/tool/tool.event.js +1 -1
  19. package/dist/browser/tool/tool.presentation.js +2 -2
  20. package/dist/browser/ui/AgentDashboard.js +956 -956
  21. package/dist/browser/ui/AgentRunList.js +16 -16
  22. package/dist/browser/ui/AgentToolRegistry.js +9 -9
  23. package/dist/browser/ui/hooks/index.js +153 -153
  24. package/dist/browser/ui/hooks/useAgentList.js +1 -1
  25. package/dist/browser/ui/hooks/useAgentMutations.js +1 -1
  26. package/dist/browser/ui/hooks/useRunList.js +1 -1
  27. package/dist/browser/ui/hooks/useToolList.js +1 -1
  28. package/dist/browser/ui/index.js +1222 -1222
  29. package/dist/browser/ui/modals/AgentActionsModal.js +13 -13
  30. package/dist/browser/ui/modals/CreateAgentModal.js +15 -15
  31. package/dist/browser/ui/modals/index.js +297 -297
  32. package/dist/browser/ui/renderers/agent-list.renderer.js +7 -7
  33. package/dist/browser/ui/renderers/index.js +157 -157
  34. package/dist/browser/ui/views/AgentListView.js +7 -7
  35. package/dist/browser/ui/views/RunListView.js +16 -16
  36. package/dist/browser/ui/views/ToolRegistryView.js +9 -9
  37. package/dist/browser/ui/views/index.js +97 -97
  38. package/dist/handlers/index.d.ts +1 -1
  39. package/dist/index.d.ts +4 -4
  40. package/dist/index.js +2145 -2145
  41. package/dist/node/agent/agent.event.js +1 -1
  42. package/dist/node/agent/agent.operation.js +1 -1
  43. package/dist/node/agent/index.js +1 -1
  44. package/dist/node/index.js +2145 -2145
  45. package/dist/node/presentations/index.js +4 -4
  46. package/dist/node/run/index.js +536 -536
  47. package/dist/node/run/run.event.js +2 -2
  48. package/dist/node/run/run.presentation.js +2 -2
  49. package/dist/node/tool/index.js +260 -260
  50. package/dist/node/tool/tool.event.js +1 -1
  51. package/dist/node/tool/tool.presentation.js +2 -2
  52. package/dist/node/ui/AgentDashboard.js +956 -956
  53. package/dist/node/ui/AgentRunList.js +16 -16
  54. package/dist/node/ui/AgentToolRegistry.js +9 -9
  55. package/dist/node/ui/hooks/index.js +153 -153
  56. package/dist/node/ui/hooks/useAgentList.js +1 -1
  57. package/dist/node/ui/hooks/useAgentMutations.js +1 -1
  58. package/dist/node/ui/hooks/useRunList.js +1 -1
  59. package/dist/node/ui/hooks/useToolList.js +1 -1
  60. package/dist/node/ui/index.js +1222 -1222
  61. package/dist/node/ui/modals/AgentActionsModal.js +13 -13
  62. package/dist/node/ui/modals/CreateAgentModal.js +15 -15
  63. package/dist/node/ui/modals/index.js +297 -297
  64. package/dist/node/ui/renderers/agent-list.renderer.js +7 -7
  65. package/dist/node/ui/renderers/index.js +157 -157
  66. package/dist/node/ui/views/AgentListView.js +7 -7
  67. package/dist/node/ui/views/RunListView.js +16 -16
  68. package/dist/node/ui/views/ToolRegistryView.js +9 -9
  69. package/dist/node/ui/views/index.js +97 -97
  70. package/dist/presentations/index.d.ts +3 -5
  71. package/dist/presentations/index.js +4 -4
  72. package/dist/run/index.d.ts +7 -7
  73. package/dist/run/index.js +536 -536
  74. package/dist/run/run.event.js +2 -2
  75. package/dist/run/run.handler.d.ts +3 -0
  76. package/dist/run/run.presentation.js +2 -2
  77. package/dist/shared/index.d.ts +1 -1
  78. package/dist/tool/index.d.ts +7 -7
  79. package/dist/tool/index.js +260 -260
  80. package/dist/tool/tool.event.js +1 -1
  81. package/dist/tool/tool.handler.d.ts +1 -1
  82. package/dist/tool/tool.presentation.js +2 -2
  83. package/dist/ui/AgentDashboard.js +956 -956
  84. package/dist/ui/AgentRunList.js +16 -16
  85. package/dist/ui/AgentToolRegistry.js +9 -9
  86. package/dist/ui/hooks/index.d.ts +4 -4
  87. package/dist/ui/hooks/index.js +153 -153
  88. package/dist/ui/hooks/useAgentList.d.ts +5 -0
  89. package/dist/ui/hooks/useAgentList.js +1 -1
  90. package/dist/ui/hooks/useAgentMutations.d.ts +9 -2
  91. package/dist/ui/hooks/useAgentMutations.js +1 -1
  92. package/dist/ui/hooks/useRunList.d.ts +5 -0
  93. package/dist/ui/hooks/useRunList.js +1 -1
  94. package/dist/ui/hooks/useToolList.d.ts +5 -0
  95. package/dist/ui/hooks/useToolList.js +1 -1
  96. package/dist/ui/index.d.ts +3 -3
  97. package/dist/ui/index.js +1222 -1222
  98. package/dist/ui/modals/AgentActionsModal.js +13 -13
  99. package/dist/ui/modals/CreateAgentModal.js +15 -15
  100. package/dist/ui/modals/index.d.ts +1 -1
  101. package/dist/ui/modals/index.js +297 -297
  102. package/dist/ui/renderers/agent-list.markdown.d.ts +5 -0
  103. package/dist/ui/renderers/agent-list.renderer.js +7 -7
  104. package/dist/ui/renderers/dashboard.markdown.d.ts +5 -0
  105. package/dist/ui/renderers/index.d.ts +2 -2
  106. package/dist/ui/renderers/index.js +157 -157
  107. package/dist/ui/renderers/run-list.markdown.d.ts +5 -0
  108. package/dist/ui/renderers/tool-registry.markdown.d.ts +5 -0
  109. package/dist/ui/views/AgentListView.js +7 -7
  110. package/dist/ui/views/RunListView.js +16 -16
  111. package/dist/ui/views/ToolRegistryView.js +9 -9
  112. package/dist/ui/views/index.js +97 -97
  113. package/package.json +10 -10
  114. package/src/agent/agent.entity.ts +111 -111
  115. package/src/agent/agent.enum.ts +12 -12
  116. package/src/agent/agent.event.ts +91 -91
  117. package/src/agent/agent.handler.ts +123 -123
  118. package/src/agent/agent.operation.ts +400 -400
  119. package/src/agent/agent.presentation.ts +62 -62
  120. package/src/agent/agent.schema.ts +175 -175
  121. package/src/agent/agent.test-spec.ts +48 -48
  122. package/src/agent/index.ts +46 -51
  123. package/src/agent.capability.ts +11 -11
  124. package/src/agent.feature.ts +131 -131
  125. package/src/docs/agent-console.docblock.ts +42 -42
  126. package/src/example.ts +35 -35
  127. package/src/handlers/agent.handlers.ts +522 -521
  128. package/src/handlers/index.ts +12 -12
  129. package/src/index.ts +8 -9
  130. package/src/presentations/index.ts +11 -13
  131. package/src/run/index.ts +49 -54
  132. package/src/run/run.entity.ts +137 -137
  133. package/src/run/run.enum.ts +18 -18
  134. package/src/run/run.event.ts +174 -174
  135. package/src/run/run.handler.ts +92 -91
  136. package/src/run/run.operation.ts +474 -474
  137. package/src/run/run.presentation.ts +42 -42
  138. package/src/run/run.schema.ts +126 -126
  139. package/src/run/run.test-spec.ts +48 -48
  140. package/src/seeders/index.ts +21 -21
  141. package/src/shared/index.ts +1 -1
  142. package/src/shared/mock-agents.ts +76 -76
  143. package/src/shared/mock-runs.ts +102 -102
  144. package/src/shared/mock-tools.ts +140 -140
  145. package/src/shared/overlay-types.ts +23 -23
  146. package/src/tool/index.ts +39 -44
  147. package/src/tool/tool.entity.ts +73 -73
  148. package/src/tool/tool.enum.ts +13 -13
  149. package/src/tool/tool.event.ts +80 -80
  150. package/src/tool/tool.handler.ts +102 -102
  151. package/src/tool/tool.operation.ts +328 -328
  152. package/src/tool/tool.presentation.ts +43 -43
  153. package/src/tool/tool.schema.ts +106 -106
  154. package/src/tool/tool.test-spec.ts +48 -48
  155. package/src/ui/AgentDashboard.tsx +348 -348
  156. package/src/ui/hooks/index.ts +7 -7
  157. package/src/ui/hooks/useAgentList.ts +57 -56
  158. package/src/ui/hooks/useAgentMutations.ts +160 -159
  159. package/src/ui/hooks/useRunList.ts +58 -57
  160. package/src/ui/hooks/useToolList.ts +102 -101
  161. package/src/ui/index.ts +6 -9
  162. package/src/ui/modals/AgentActionsModal.tsx +262 -262
  163. package/src/ui/modals/CreateAgentModal.tsx +232 -232
  164. package/src/ui/modals/index.ts +1 -1
  165. package/src/ui/overlays/demo-overlays.ts +52 -52
  166. package/src/ui/renderers/agent-list.markdown.ts +61 -60
  167. package/src/ui/renderers/agent-list.renderer.tsx +14 -14
  168. package/src/ui/renderers/dashboard.markdown.ts +140 -139
  169. package/src/ui/renderers/index.ts +3 -4
  170. package/src/ui/renderers/run-list.markdown.ts +48 -47
  171. package/src/ui/renderers/tool-registry.markdown.ts +66 -65
  172. package/src/ui/views/AgentListView.tsx +90 -90
  173. package/src/ui/views/RunListView.tsx +141 -141
  174. package/src/ui/views/ToolRegistryView.tsx +113 -113
  175. package/tsconfig.json +7 -8
  176. package/tsdown.config.js +7 -3
@@ -1,271 +1,271 @@
1
1
  'use client';
2
2
 
3
+ import { Button, Input } from '@contractspec/lib.design-system';
3
4
  /**
4
5
  * CreateAgentModal - Form for creating a new AI agent
5
6
  *
6
7
  * Wires to CreateAgentCommand via useAgentMutations hook.
7
8
  */
8
9
  import { useState } from 'react';
9
- import { Button, Input } from '@contractspec/lib.design-system';
10
10
 
11
11
  // Local type definition for modal props
12
12
  export interface CreateAgentInput {
13
- name: string;
14
- description?: string;
15
- modelProvider: string;
16
- modelName: string;
17
- systemPrompt?: string;
13
+ name: string;
14
+ description?: string;
15
+ modelProvider: string;
16
+ modelName: string;
17
+ systemPrompt?: string;
18
18
  }
19
19
 
20
20
  interface CreateAgentModalProps {
21
- isOpen: boolean;
22
- onClose: () => void;
23
- onSubmit: (input: CreateAgentInput) => Promise<void>;
24
- isLoading?: boolean;
21
+ isOpen: boolean;
22
+ onClose: () => void;
23
+ onSubmit: (input: CreateAgentInput) => Promise<void>;
24
+ isLoading?: boolean;
25
25
  }
26
26
 
27
27
  const MODEL_PROVIDERS = [
28
- {
29
- value: 'openai',
30
- label: 'OpenAI',
31
- models: ['gpt-5.4', 'gpt-5-mini', 'gpt-4o', 'gpt-4-turbo', 'gpt-3.5-turbo'],
32
- },
33
- {
34
- value: 'anthropic',
35
- label: 'Anthropic',
36
- models: ['claude-sonnet-4-6', 'claude-opus-4-6', 'claude-haiku-4-5'],
37
- },
38
- {
39
- value: 'google',
40
- label: 'Google',
41
- models: [
42
- 'gemini-2.5-flash',
43
- 'gemini-2.5-pro',
44
- 'gemini-pro',
45
- 'gemini-ultra',
46
- ],
47
- },
48
- {
49
- value: 'mistral',
50
- label: 'Mistral',
51
- models: [
52
- 'mistral-large-2512',
53
- 'mistral-large-latest',
54
- 'mistral-medium-latest',
55
- 'mistral-small-latest',
56
- ],
57
- },
28
+ {
29
+ value: 'openai',
30
+ label: 'OpenAI',
31
+ models: ['gpt-5.4', 'gpt-5-mini', 'gpt-4o', 'gpt-4-turbo', 'gpt-3.5-turbo'],
32
+ },
33
+ {
34
+ value: 'anthropic',
35
+ label: 'Anthropic',
36
+ models: ['claude-sonnet-4-6', 'claude-opus-4-6', 'claude-haiku-4-5'],
37
+ },
38
+ {
39
+ value: 'google',
40
+ label: 'Google',
41
+ models: [
42
+ 'gemini-2.5-flash',
43
+ 'gemini-2.5-pro',
44
+ 'gemini-pro',
45
+ 'gemini-ultra',
46
+ ],
47
+ },
48
+ {
49
+ value: 'mistral',
50
+ label: 'Mistral',
51
+ models: [
52
+ 'mistral-large-2512',
53
+ 'mistral-large-latest',
54
+ 'mistral-medium-latest',
55
+ 'mistral-small-latest',
56
+ ],
57
+ },
58
58
  ] as const;
59
59
 
60
60
  type ModelProvider = (typeof MODEL_PROVIDERS)[number]['value'];
61
61
 
62
62
  export function CreateAgentModal({
63
- isOpen,
64
- onClose,
65
- onSubmit,
66
- isLoading = false,
63
+ isOpen,
64
+ onClose,
65
+ onSubmit,
66
+ isLoading = false,
67
67
  }: CreateAgentModalProps) {
68
- const [name, setName] = useState('');
69
- const [description, setDescription] = useState('');
70
- const [modelProvider, setModelProvider] = useState<ModelProvider>('openai');
71
- const [modelName, setModelName] = useState('gpt-5.4');
72
- const [systemPrompt, setSystemPrompt] = useState('');
73
- const [error, setError] = useState<string | null>(null);
68
+ const [name, setName] = useState('');
69
+ const [description, setDescription] = useState('');
70
+ const [modelProvider, setModelProvider] = useState<ModelProvider>('openai');
71
+ const [modelName, setModelName] = useState('gpt-5.4');
72
+ const [systemPrompt, setSystemPrompt] = useState('');
73
+ const [error, setError] = useState<string | null>(null);
74
74
 
75
- const selectedProvider = MODEL_PROVIDERS.find(
76
- (p) => p.value === modelProvider
77
- );
75
+ const selectedProvider = MODEL_PROVIDERS.find(
76
+ (p) => p.value === modelProvider
77
+ );
78
78
 
79
- const handleSubmit = async (e: React.FormEvent) => {
80
- e.preventDefault();
81
- setError(null);
79
+ const handleSubmit = async (e: React.FormEvent) => {
80
+ e.preventDefault();
81
+ setError(null);
82
82
 
83
- // Validation
84
- if (!name.trim()) {
85
- setError('Agent name is required');
86
- return;
87
- }
83
+ // Validation
84
+ if (!name.trim()) {
85
+ setError('Agent name is required');
86
+ return;
87
+ }
88
88
 
89
- try {
90
- await onSubmit({
91
- name: name.trim(),
92
- description: description.trim() || undefined,
93
- modelProvider,
94
- modelName,
95
- systemPrompt: systemPrompt.trim() || undefined,
96
- });
89
+ try {
90
+ await onSubmit({
91
+ name: name.trim(),
92
+ description: description.trim() || undefined,
93
+ modelProvider,
94
+ modelName,
95
+ systemPrompt: systemPrompt.trim() || undefined,
96
+ });
97
97
 
98
- // Reset form
99
- setName('');
100
- setDescription('');
101
- setModelProvider('openai');
102
- setModelName('gpt-5.4');
103
- setSystemPrompt('');
104
- onClose();
105
- } catch (err) {
106
- setError(err instanceof Error ? err.message : 'Failed to create agent');
107
- }
108
- };
98
+ // Reset form
99
+ setName('');
100
+ setDescription('');
101
+ setModelProvider('openai');
102
+ setModelName('gpt-5.4');
103
+ setSystemPrompt('');
104
+ onClose();
105
+ } catch (err) {
106
+ setError(err instanceof Error ? err.message : 'Failed to create agent');
107
+ }
108
+ };
109
109
 
110
- // Update model when provider changes
111
- const handleProviderChange = (provider: ModelProvider) => {
112
- setModelProvider(provider);
113
- const providerConfig = MODEL_PROVIDERS.find((p) => p.value === provider);
114
- if (providerConfig) {
115
- setModelName(providerConfig.models[0]);
116
- }
117
- };
110
+ // Update model when provider changes
111
+ const handleProviderChange = (provider: ModelProvider) => {
112
+ setModelProvider(provider);
113
+ const providerConfig = MODEL_PROVIDERS.find((p) => p.value === provider);
114
+ if (providerConfig) {
115
+ setModelName(providerConfig.models[0]);
116
+ }
117
+ };
118
118
 
119
- if (!isOpen) return null;
119
+ if (!isOpen) return null;
120
120
 
121
- return (
122
- <div className="fixed inset-0 z-50 flex items-center justify-center">
123
- {/* Backdrop */}
124
- <div
125
- className="bg-background/80 absolute inset-0 backdrop-blur-sm"
126
- onClick={onClose}
127
- role="button"
128
- tabIndex={0}
129
- onKeyDown={(e) => {
130
- if (e.key === 'Enter' || e.key === ' ') onClose();
131
- }}
132
- aria-label="Close modal"
133
- />
121
+ return (
122
+ <div className="fixed inset-0 z-50 flex items-center justify-center">
123
+ {/* Backdrop */}
124
+ <div
125
+ className="absolute inset-0 bg-background/80 backdrop-blur-sm"
126
+ onClick={onClose}
127
+ role="button"
128
+ tabIndex={0}
129
+ onKeyDown={(e) => {
130
+ if (e.key === 'Enter' || e.key === ' ') onClose();
131
+ }}
132
+ aria-label="Close modal"
133
+ />
134
134
 
135
- {/* Modal */}
136
- <div className="bg-card border-border relative z-10 max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border p-6 shadow-xl">
137
- <h2 className="mb-4 text-xl font-semibold">Create New Agent</h2>
135
+ {/* Modal */}
136
+ <div className="relative z-10 max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border border-border bg-card p-6 shadow-xl">
137
+ <h2 className="mb-4 font-semibold text-xl">Create New Agent</h2>
138
138
 
139
- <form onSubmit={handleSubmit} className="space-y-4">
140
- {/* Agent Name */}
141
- <div>
142
- <label
143
- htmlFor="agent-name"
144
- className="text-muted-foreground mb-1 block text-sm font-medium"
145
- >
146
- Agent Name *
147
- </label>
148
- <Input
149
- id="agent-name"
150
- value={name}
151
- onChange={(e) => setName(e.target.value)}
152
- placeholder="e.g., Customer Support Bot"
153
- disabled={isLoading}
154
- />
155
- </div>
139
+ <form onSubmit={handleSubmit} className="space-y-4">
140
+ {/* Agent Name */}
141
+ <div>
142
+ <label
143
+ htmlFor="agent-name"
144
+ className="mb-1 block font-medium text-muted-foreground text-sm"
145
+ >
146
+ Agent Name *
147
+ </label>
148
+ <Input
149
+ id="agent-name"
150
+ value={name}
151
+ onChange={(e) => setName(e.target.value)}
152
+ placeholder="e.g., Customer Support Bot"
153
+ disabled={isLoading}
154
+ />
155
+ </div>
156
156
 
157
- {/* Description */}
158
- <div>
159
- <label
160
- htmlFor="agent-description"
161
- className="text-muted-foreground mb-1 block text-sm font-medium"
162
- >
163
- Description
164
- </label>
165
- <textarea
166
- id="agent-description"
167
- value={description}
168
- onChange={(e) => setDescription(e.target.value)}
169
- placeholder="Describe what this agent does..."
170
- rows={2}
171
- disabled={isLoading}
172
- className="border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
173
- />
174
- </div>
157
+ {/* Description */}
158
+ <div>
159
+ <label
160
+ htmlFor="agent-description"
161
+ className="mb-1 block font-medium text-muted-foreground text-sm"
162
+ >
163
+ Description
164
+ </label>
165
+ <textarea
166
+ id="agent-description"
167
+ value={description}
168
+ onChange={(e) => setDescription(e.target.value)}
169
+ placeholder="Describe what this agent does..."
170
+ rows={2}
171
+ disabled={isLoading}
172
+ className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
173
+ />
174
+ </div>
175
175
 
176
- {/* Model Provider & Model */}
177
- <div className="flex gap-3">
178
- <div className="flex-1">
179
- <label
180
- htmlFor="model-provider"
181
- className="text-muted-foreground mb-1 block text-sm font-medium"
182
- >
183
- Provider *
184
- </label>
185
- <select
186
- id="model-provider"
187
- value={modelProvider}
188
- onChange={(e) =>
189
- handleProviderChange(e.target.value as ModelProvider)
190
- }
191
- disabled={isLoading}
192
- className="border-input bg-background focus:ring-ring h-10 w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
193
- >
194
- {MODEL_PROVIDERS.map((p) => (
195
- <option key={p.value} value={p.value}>
196
- {p.label}
197
- </option>
198
- ))}
199
- </select>
200
- </div>
201
- <div className="flex-1">
202
- <label
203
- htmlFor="model-name"
204
- className="text-muted-foreground mb-1 block text-sm font-medium"
205
- >
206
- Model *
207
- </label>
208
- <select
209
- id="model-name"
210
- value={modelName}
211
- onChange={(e) => setModelName(e.target.value)}
212
- disabled={isLoading}
213
- className="border-input bg-background focus:ring-ring h-10 w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
214
- >
215
- {selectedProvider?.models.map((m) => (
216
- <option key={m} value={m}>
217
- {m}
218
- </option>
219
- ))}
220
- </select>
221
- </div>
222
- </div>
176
+ {/* Model Provider & Model */}
177
+ <div className="flex gap-3">
178
+ <div className="flex-1">
179
+ <label
180
+ htmlFor="model-provider"
181
+ className="mb-1 block font-medium text-muted-foreground text-sm"
182
+ >
183
+ Provider *
184
+ </label>
185
+ <select
186
+ id="model-provider"
187
+ value={modelProvider}
188
+ onChange={(e) =>
189
+ handleProviderChange(e.target.value as ModelProvider)
190
+ }
191
+ disabled={isLoading}
192
+ className="h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
193
+ >
194
+ {MODEL_PROVIDERS.map((p) => (
195
+ <option key={p.value} value={p.value}>
196
+ {p.label}
197
+ </option>
198
+ ))}
199
+ </select>
200
+ </div>
201
+ <div className="flex-1">
202
+ <label
203
+ htmlFor="model-name"
204
+ className="mb-1 block font-medium text-muted-foreground text-sm"
205
+ >
206
+ Model *
207
+ </label>
208
+ <select
209
+ id="model-name"
210
+ value={modelName}
211
+ onChange={(e) => setModelName(e.target.value)}
212
+ disabled={isLoading}
213
+ className="h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
214
+ >
215
+ {selectedProvider?.models.map((m) => (
216
+ <option key={m} value={m}>
217
+ {m}
218
+ </option>
219
+ ))}
220
+ </select>
221
+ </div>
222
+ </div>
223
223
 
224
- {/* System Prompt */}
225
- <div>
226
- <label
227
- htmlFor="system-prompt"
228
- className="text-muted-foreground mb-1 block text-sm font-medium"
229
- >
230
- System Prompt
231
- </label>
232
- <textarea
233
- id="system-prompt"
234
- value={systemPrompt}
235
- onChange={(e) => setSystemPrompt(e.target.value)}
236
- placeholder="You are a helpful assistant that..."
237
- rows={4}
238
- disabled={isLoading}
239
- className="border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 font-mono text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
240
- />
241
- <p className="text-muted-foreground mt-1 text-xs">
242
- Instructions that define the agent's behavior
243
- </p>
244
- </div>
224
+ {/* System Prompt */}
225
+ <div>
226
+ <label
227
+ htmlFor="system-prompt"
228
+ className="mb-1 block font-medium text-muted-foreground text-sm"
229
+ >
230
+ System Prompt
231
+ </label>
232
+ <textarea
233
+ id="system-prompt"
234
+ value={systemPrompt}
235
+ onChange={(e) => setSystemPrompt(e.target.value)}
236
+ placeholder="You are a helpful assistant that..."
237
+ rows={4}
238
+ disabled={isLoading}
239
+ className="w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
240
+ />
241
+ <p className="mt-1 text-muted-foreground text-xs">
242
+ Instructions that define the agent's behavior
243
+ </p>
244
+ </div>
245
245
 
246
- {/* Error Message */}
247
- {error && (
248
- <div className="bg-destructive/10 text-destructive rounded-md p-3 text-sm">
249
- {error}
250
- </div>
251
- )}
246
+ {/* Error Message */}
247
+ {error && (
248
+ <div className="rounded-md bg-destructive/10 p-3 text-destructive text-sm">
249
+ {error}
250
+ </div>
251
+ )}
252
252
 
253
- {/* Actions */}
254
- <div className="flex justify-end gap-3 pt-2">
255
- <Button
256
- type="button"
257
- variant="ghost"
258
- onPress={onClose}
259
- disabled={isLoading}
260
- >
261
- Cancel
262
- </Button>
263
- <Button type="submit" disabled={isLoading}>
264
- {isLoading ? 'Creating...' : 'Create Agent'}
265
- </Button>
266
- </div>
267
- </form>
268
- </div>
269
- </div>
270
- );
253
+ {/* Actions */}
254
+ <div className="flex justify-end gap-3 pt-2">
255
+ <Button
256
+ type="button"
257
+ variant="ghost"
258
+ onPress={onClose}
259
+ disabled={isLoading}
260
+ >
261
+ Cancel
262
+ </Button>
263
+ <Button type="submit" disabled={isLoading}>
264
+ {isLoading ? 'Creating...' : 'Create Agent'}
265
+ </Button>
266
+ </div>
267
+ </form>
268
+ </div>
269
+ </div>
270
+ );
271
271
  }
@@ -1,2 +1,2 @@
1
- export { CreateAgentModal } from './CreateAgentModal';
2
1
  export { AgentActionsModal } from './AgentActionsModal';
2
+ export { CreateAgentModal } from './CreateAgentModal';
@@ -10,68 +10,68 @@ import type { OverlayDefinition } from '../../shared/overlay-types';
10
10
  * Demo user overlay - hides advanced configuration options
11
11
  */
12
12
  export const agentConsoleDemoOverlay: OverlayDefinition = {
13
- overlayId: 'agent-console.demo-user',
14
- version: '1.0.0',
15
- description: 'Simplifies agent console for demo users',
16
- appliesTo: {
17
- feature: 'agent-console',
18
- role: 'demo',
19
- },
20
- modifications: [
21
- {
22
- type: 'hideField',
23
- field: 'modelConfig',
24
- reason: 'Advanced config not relevant for demo',
25
- },
26
- {
27
- type: 'hideField',
28
- field: 'webhookConfig',
29
- reason: 'Integration not available in demo',
30
- },
31
- {
32
- type: 'renameLabel',
33
- field: 'systemPrompt',
34
- newLabel: 'Agent Instructions',
35
- },
36
- {
37
- type: 'addBadge',
38
- position: 'header',
39
- label: 'Demo Mode',
40
- variant: 'warning',
41
- },
42
- ],
13
+ overlayId: 'agent-console.demo-user',
14
+ version: '1.0.0',
15
+ description: 'Simplifies agent console for demo users',
16
+ appliesTo: {
17
+ feature: 'agent-console',
18
+ role: 'demo',
19
+ },
20
+ modifications: [
21
+ {
22
+ type: 'hideField',
23
+ field: 'modelConfig',
24
+ reason: 'Advanced config not relevant for demo',
25
+ },
26
+ {
27
+ type: 'hideField',
28
+ field: 'webhookConfig',
29
+ reason: 'Integration not available in demo',
30
+ },
31
+ {
32
+ type: 'renameLabel',
33
+ field: 'systemPrompt',
34
+ newLabel: 'Agent Instructions',
35
+ },
36
+ {
37
+ type: 'addBadge',
38
+ position: 'header',
39
+ label: 'Demo Mode',
40
+ variant: 'warning',
41
+ },
42
+ ],
43
43
  };
44
44
 
45
45
  /**
46
46
  * Read-only overlay - for viewing without edit permissions
47
47
  */
48
48
  export const agentConsoleReadOnlyOverlay: OverlayDefinition = {
49
- overlayId: 'agent-console.read-only',
50
- version: '1.0.0',
51
- description: 'Read-only view for non-admin users',
52
- appliesTo: {
53
- feature: 'agent-console',
54
- role: 'viewer',
55
- },
56
- modifications: [
57
- {
58
- type: 'hideField',
59
- field: 'deleteButton',
60
- reason: 'No delete permission',
61
- },
62
- { type: 'hideField', field: 'editButton', reason: 'No edit permission' },
63
- {
64
- type: 'hideField',
65
- field: 'createButton',
66
- reason: 'No create permission',
67
- },
68
- ],
49
+ overlayId: 'agent-console.read-only',
50
+ version: '1.0.0',
51
+ description: 'Read-only view for non-admin users',
52
+ appliesTo: {
53
+ feature: 'agent-console',
54
+ role: 'viewer',
55
+ },
56
+ modifications: [
57
+ {
58
+ type: 'hideField',
59
+ field: 'deleteButton',
60
+ reason: 'No delete permission',
61
+ },
62
+ { type: 'hideField', field: 'editButton', reason: 'No edit permission' },
63
+ {
64
+ type: 'hideField',
65
+ field: 'createButton',
66
+ reason: 'No create permission',
67
+ },
68
+ ],
69
69
  };
70
70
 
71
71
  /**
72
72
  * All overlays for agent-console
73
73
  */
74
74
  export const agentConsoleOverlays: OverlayDefinition[] = [
75
- agentConsoleDemoOverlay,
76
- agentConsoleReadOnlyOverlay,
75
+ agentConsoleDemoOverlay,
76
+ agentConsoleReadOnlyOverlay,
77
77
  ];