@camunda/copilot-chat 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -60
- package/dist/highlighted-body-OFNGDK62-D0jnB6Wf.js +19 -0
- package/dist/index-D9bYzhnE.js +23566 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +223 -788
- package/dist/index.js +13 -15787
- package/dist/mermaid-GHXKKRXX-ixv1ipvh.js +4 -0
- package/package.json +27 -12
- package/dist/package.json +0 -63
package/dist/index.d.ts
CHANGED
|
@@ -1,872 +1,307 @@
|
|
|
1
|
-
import { JSX } from 'react
|
|
2
|
-
import { layoutProcess } from 'bpmn-auto-layout';
|
|
3
|
-
import { MarkdownProps } from '@carbon/ai-chat-components/es/react/markdown';
|
|
1
|
+
import { JSX } from 'react';
|
|
4
2
|
import { ReactNode } from 'react';
|
|
5
|
-
import { StoreApi } from 'zustand';
|
|
6
|
-
import { UseBoundStore } from 'zustand';
|
|
7
3
|
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export declare interface AgentAdapterReturn {
|
|
17
|
-
readonly sendMessage: (content: string, context: Record<string, unknown>) => Promise<void>;
|
|
18
|
-
readonly stopGeneration: () => void;
|
|
19
|
-
readonly resetConversation: () => void;
|
|
20
|
-
readonly loadConversation: (conversationId: string) => Promise<void>;
|
|
21
|
-
readonly isBusy: boolean;
|
|
4
|
+
export declare interface ArtifactChange {
|
|
5
|
+
readonly changeKind: 'create' | 'modify';
|
|
6
|
+
readonly artifact: ArtifactRef;
|
|
7
|
+
readonly content: string;
|
|
8
|
+
readonly before?: string;
|
|
9
|
+
readonly validationMessages?: ReadonlyArray<string>;
|
|
22
10
|
}
|
|
23
11
|
|
|
24
|
-
export declare interface
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly toolName?: string;
|
|
30
|
-
readonly toolCallId?: string;
|
|
31
|
-
readonly toolArguments?: string;
|
|
32
|
-
readonly toolResult?: string;
|
|
33
|
-
readonly skillName?: string;
|
|
12
|
+
export declare interface ArtifactRef {
|
|
13
|
+
readonly projectId: string;
|
|
14
|
+
readonly artifactId: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly type: ArtifactType;
|
|
34
17
|
}
|
|
35
18
|
|
|
36
|
-
export declare type
|
|
37
|
-
|
|
38
|
-
export declare const AgentState: {
|
|
39
|
-
readonly IDLE: "IDLE";
|
|
40
|
-
readonly BUSY: "BUSY";
|
|
41
|
-
readonly AWAITING_TOOL: "AWAITING_TOOL";
|
|
42
|
-
readonly ERROR: "ERROR";
|
|
43
|
-
};
|
|
19
|
+
export declare type ArtifactType = 'bpmn' | 'dmn' | 'form';
|
|
44
20
|
|
|
45
|
-
export declare
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
declare interface AgentStoreActions {
|
|
52
|
-
readonly startConversation: (conversationId: string, messageId: string) => void;
|
|
53
|
-
readonly processEvent: (event: AgentEvent) => AgentResult | null;
|
|
54
|
-
readonly clearPendingTool: () => void;
|
|
55
|
-
readonly setError: (error: string) => void;
|
|
56
|
-
readonly reset: () => void;
|
|
57
|
-
readonly setCallbacks: (callbacks: AgentStoreCallbacks) => void;
|
|
58
|
-
readonly setConversationId: (conversationId: string) => void;
|
|
21
|
+
export declare interface Candidate {
|
|
22
|
+
readonly candidateId: string;
|
|
23
|
+
readonly messageId: string;
|
|
24
|
+
readonly state: CandidateState;
|
|
25
|
+
readonly changes: ReadonlyArray<ArtifactChange>;
|
|
26
|
+
readonly checkpointId?: string;
|
|
59
27
|
}
|
|
60
28
|
|
|
61
|
-
declare
|
|
62
|
-
readonly onMessageStatusUpdate?: MessageStatusCallback;
|
|
63
|
-
readonly onStatusLabelClear?: StatusLabelCallback;
|
|
64
|
-
readonly onMessageError?: MessageErrorCallback;
|
|
65
|
-
}
|
|
29
|
+
export declare const CandidateReview: ({ candidate, onReviewReady }: CandidateReviewProps) => JSX.Element;
|
|
66
30
|
|
|
67
|
-
declare interface
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly isBusy: boolean;
|
|
71
|
-
readonly currentEventType: EventTypeValue | null;
|
|
72
|
-
readonly currentToolName: string | null;
|
|
73
|
-
readonly pendingToolInvoke: {
|
|
74
|
-
readonly toolName: string;
|
|
75
|
-
readonly toolCallId?: string;
|
|
76
|
-
readonly toolArguments: Record<string, unknown>;
|
|
77
|
-
} | null;
|
|
78
|
-
readonly error: string | null;
|
|
31
|
+
export declare interface CandidateReviewProps {
|
|
32
|
+
readonly candidate: Candidate;
|
|
33
|
+
readonly onReviewReady?: (ready: boolean) => void;
|
|
79
34
|
}
|
|
80
35
|
|
|
81
|
-
export declare
|
|
82
|
-
subscribe(conversationId: string, onEvent: (event: AgentEvent) => void): void;
|
|
83
|
-
unsubscribe(conversationId: string): void;
|
|
84
|
-
sendMessage(payload: SendMessagePayload): Promise<void>;
|
|
85
|
-
sendToolResult(payload: ToolResultPayload): Promise<void>;
|
|
86
|
-
haltConversation?(conversationId: string): Promise<void>;
|
|
87
|
-
updateConversation?(conversationId: string, payload: UpdateConversationPayload): Promise<void>;
|
|
88
|
-
deleteConversation?(conversationId: string): Promise<void>;
|
|
89
|
-
fetchConversations?(page: number, size: number): Promise<ConversationsPage>;
|
|
90
|
-
fetchConversationMessages?(conversationId: string, cursor?: number | null, limit?: number): Promise<ConversationMessagesPage>;
|
|
91
|
-
rollbackConversation?(conversationId: string, milestoneId: string): Promise<RollbackResponse | undefined>;
|
|
92
|
-
registerSkills?(conversationId: string, skills: readonly SkillDefinition[]): Promise<void>;
|
|
93
|
-
}
|
|
36
|
+
export declare type CandidateState = 'proposed' | 'applied' | 'rejected' | 'cancelled' | 'stale';
|
|
94
37
|
|
|
95
|
-
export declare const
|
|
96
|
-
readonly slug: "audit-and-repair";
|
|
97
|
-
readonly name: "Audit and repair";
|
|
98
|
-
readonly description: "Use ONLY when the user is asking to review, audit, check, fix, or repair an EXISTING diagram on the canvas. Do NOT use for creating new diagrams or modifying not-yet-built processes.";
|
|
99
|
-
readonly suggestedCapabilities: readonly ["BPMN_VIEWING", "BPMN_EDITING"];
|
|
100
|
-
readonly content: string;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
declare interface BackendToolPayload {
|
|
104
|
-
readonly name: string;
|
|
105
|
-
readonly description: string;
|
|
106
|
-
readonly parameters: Record<string, unknown>;
|
|
107
|
-
readonly category: string;
|
|
108
|
-
}
|
|
38
|
+
export declare const closeSidecar: () => void;
|
|
109
39
|
|
|
110
|
-
export declare interface
|
|
111
|
-
readonly
|
|
112
|
-
readonly type: string;
|
|
113
|
-
readonly businessObject: Record<string, unknown>;
|
|
114
|
-
readonly parent?: BpmnElement;
|
|
115
|
-
readonly incoming?: ReadonlyArray<BpmnElement>;
|
|
116
|
-
readonly outgoing?: ReadonlyArray<BpmnElement>;
|
|
117
|
-
readonly children?: ReadonlyArray<BpmnElement>;
|
|
40
|
+
export declare interface Conversation extends ConversationSummary {
|
|
41
|
+
readonly messages: ReadonlyArray<ConversationMessage>;
|
|
118
42
|
}
|
|
119
43
|
|
|
120
|
-
export declare
|
|
121
|
-
readonly
|
|
122
|
-
readonly
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
readonly
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
44
|
+
export declare type ConversationEvent = {
|
|
45
|
+
readonly type: 'turn_started';
|
|
46
|
+
readonly messageId: string;
|
|
47
|
+
readonly userMessageId: string;
|
|
48
|
+
readonly userContent: string;
|
|
49
|
+
} | {
|
|
50
|
+
readonly type: 'turn_finished';
|
|
51
|
+
readonly messageId: string;
|
|
52
|
+
readonly outcome: 'complete' | 'cancelled';
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: 'candidate_proposed';
|
|
55
|
+
readonly messageId: string;
|
|
56
|
+
readonly candidateId: string;
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: 'candidate_resolved';
|
|
59
|
+
readonly messageId: string;
|
|
60
|
+
readonly candidateId: string;
|
|
61
|
+
readonly state: CandidateState;
|
|
62
|
+
readonly checkpointId?: string;
|
|
63
|
+
} | {
|
|
64
|
+
readonly type: 'checkpoint_restored';
|
|
65
|
+
readonly checkpointId: string;
|
|
66
|
+
readonly contents: ReadonlyArray<{
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly content: string | null;
|
|
142
69
|
}>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
readonly
|
|
147
|
-
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
readonly
|
|
155
|
-
|
|
156
|
-
readonly
|
|
157
|
-
readonly
|
|
158
|
-
readonly
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
readonly
|
|
163
|
-
readonly
|
|
164
|
-
|
|
165
|
-
readonly
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
};
|
|
175
|
-
readonly type: "frontend";
|
|
176
|
-
readonly contentType: "TEXT";
|
|
177
|
-
readonly category: "GENERAL";
|
|
178
|
-
readonly handler: ToolHandler;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export declare interface camundaDocsSearchToolResult {
|
|
182
|
-
readonly answer: string;
|
|
183
|
-
readonly sources: readonly KapaAiSearchResult[];
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export declare const CAPABILITY: {
|
|
187
|
-
readonly BPMN_EDITING: "BPMN_EDITING";
|
|
188
|
-
readonly FORM_EDITING: "FORM_EDITING";
|
|
189
|
-
readonly DMN_EDITING: "DMN_EDITING";
|
|
190
|
-
readonly FEEL_EDITING: "FEEL_EDITING";
|
|
191
|
-
readonly BPMN_VIEWING: "BPMN_VIEWING";
|
|
192
|
-
readonly FORM_VIEWING: "FORM_VIEWING";
|
|
193
|
-
readonly DMN_VIEWING: "DMN_VIEWING";
|
|
194
|
-
readonly FILE_OPERATIONS: "FILE_OPERATIONS";
|
|
195
|
-
readonly FILE_CREATION: "FILE_CREATION";
|
|
196
|
-
readonly VALIDATION: "VALIDATION";
|
|
197
|
-
readonly INTEGRATION: "INTEGRATION";
|
|
70
|
+
} | {
|
|
71
|
+
readonly type: 'failed';
|
|
72
|
+
readonly messageId: string;
|
|
73
|
+
readonly error: CopilotError;
|
|
74
|
+
} | {
|
|
75
|
+
readonly type: 'text';
|
|
76
|
+
readonly messageId: string;
|
|
77
|
+
readonly delta: string;
|
|
78
|
+
} | {
|
|
79
|
+
readonly type: 'activity';
|
|
80
|
+
readonly messageId: string;
|
|
81
|
+
readonly label: string;
|
|
82
|
+
} | {
|
|
83
|
+
readonly type: 'step_start';
|
|
84
|
+
readonly messageId: string;
|
|
85
|
+
readonly stepId: string;
|
|
86
|
+
readonly kind: StepKind;
|
|
87
|
+
readonly name?: string;
|
|
88
|
+
readonly label: string;
|
|
89
|
+
readonly description?: string;
|
|
90
|
+
readonly groupId?: string;
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: 'step_end';
|
|
93
|
+
readonly messageId: string;
|
|
94
|
+
readonly stepId: string;
|
|
95
|
+
readonly status: 'complete' | 'error';
|
|
96
|
+
readonly description?: string;
|
|
97
|
+
} | {
|
|
98
|
+
readonly type: 'step_removed';
|
|
99
|
+
readonly messageId: string;
|
|
100
|
+
readonly stepId: string;
|
|
198
101
|
};
|
|
199
102
|
|
|
200
|
-
export declare
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
readonly addUserMessage: (content: string) => string;
|
|
204
|
-
readonly addAssistantMessage: (id: string) => void;
|
|
205
|
-
readonly appendToMessage: (id: string, content: string) => void;
|
|
206
|
-
readonly setMessageContent: (id: string, content: string) => void;
|
|
207
|
-
readonly updateMessageStatus: (id: string, status: MessageStatus) => void;
|
|
208
|
-
readonly updateMessageStatusLabel: (id: string, statusLabel: string) => void;
|
|
209
|
-
readonly setMessageSources: (id: string, sources: readonly SourceReference[]) => void;
|
|
210
|
-
readonly setStreaming: (isStreaming: boolean, messageId?: string | null) => void;
|
|
211
|
-
readonly clearMessages: () => void;
|
|
212
|
-
readonly addThinkingBlock: (messageId: string, blockId: string, label: string) => void;
|
|
213
|
-
readonly appendToThinkingBlock: (messageId: string, blockId: string, content: string) => void;
|
|
214
|
-
readonly completeThinkingBlock: (messageId: string, blockId: string) => void;
|
|
215
|
-
readonly completeAllThinkingBlocks: (messageId: string) => void;
|
|
216
|
-
readonly setMessageError: (id: string, errorMessage: string) => void;
|
|
217
|
-
readonly addToolBlock: (messageId: string, blockId: string, toolName: string, stepNumber: number, toolArguments?: Record<string, unknown>) => void;
|
|
218
|
-
readonly updateToolBlockStatus: (messageId: string, blockId: string, status: ToolBlockStatus) => void;
|
|
219
|
-
readonly updateToolBlockResult: (messageId: string, blockId: string, toolResult: string) => void;
|
|
220
|
-
readonly addErrorBlock: (messageId: string, blockId: string, errorMessage: string) => void;
|
|
221
|
-
readonly setView: (view: ChatView_2) => void;
|
|
222
|
-
readonly setConversationTitle: (title: string) => void;
|
|
223
|
-
readonly loadConversation: (messages: readonly ChatMessage_2[], title: string | null) => void;
|
|
224
|
-
readonly prependMessages: (messages: readonly ChatMessage_2[]) => void;
|
|
225
|
-
readonly rollbackToMessage: (messageId: string) => void;
|
|
226
|
-
readonly addRollbackMessage: (content: string, milestoneId: string) => void;
|
|
227
|
-
readonly setLastAssistantMessageMilestone: (milestoneId: string) => void;
|
|
228
|
-
readonly setLastUserMessageMilestone: (milestoneId: string) => void;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export declare const ChatInput: ({ onSend, onStop, isBusy, isDisabled, placeholder, isOpen, }: ChatInputProps) => JSX.Element;
|
|
232
|
-
|
|
233
|
-
declare interface ChatInputProps {
|
|
234
|
-
readonly onSend: (message: string) => void;
|
|
235
|
-
readonly onStop?: () => void;
|
|
236
|
-
readonly isBusy?: boolean;
|
|
237
|
-
readonly isDisabled?: boolean;
|
|
238
|
-
readonly placeholder?: string;
|
|
239
|
-
readonly isOpen?: boolean;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
export declare const ChatMessage: ({ message, isBusy }: ChatMessageProps) => JSX.Element;
|
|
243
|
-
|
|
244
|
-
declare interface ChatMessage_2 {
|
|
245
|
-
readonly id: string;
|
|
246
|
-
readonly role: MessageRole;
|
|
103
|
+
export declare interface ConversationMessage {
|
|
104
|
+
readonly messageId: string;
|
|
105
|
+
readonly role: 'user' | 'assistant';
|
|
247
106
|
readonly content: string;
|
|
248
|
-
readonly
|
|
249
|
-
readonly
|
|
250
|
-
readonly
|
|
251
|
-
readonly
|
|
252
|
-
readonly sources?: readonly SourceReference[];
|
|
253
|
-
readonly milestoneId?: string;
|
|
254
|
-
}
|
|
255
|
-
export { ChatMessage_2 as ChatMessageInterface }
|
|
256
|
-
export { ChatMessage_2 as ChatMessageType }
|
|
257
|
-
|
|
258
|
-
export declare const ChatMessageList: ({ messages, emptyStateTitle, emptyStateDescription, suggestions, onSuggestionClick, onRollback, onSeeVersion, isBusy, hasOlderMessages, isLoadingOlderMessages, onLoadOlderMessages, }: ChatMessageListProps) => JSX.Element;
|
|
259
|
-
|
|
260
|
-
declare interface ChatMessageListProps {
|
|
261
|
-
readonly messages: readonly ChatMessage_2[];
|
|
262
|
-
readonly emptyStateTitle?: string;
|
|
263
|
-
readonly emptyStateDescription?: ReactNode;
|
|
264
|
-
readonly suggestions?: readonly Suggestion[];
|
|
265
|
-
readonly onSuggestionClick?: (suggestion: Suggestion) => void;
|
|
266
|
-
readonly onRollback?: (milestoneId: string) => void;
|
|
267
|
-
readonly onSeeVersion?: (milestoneId: string) => void;
|
|
268
|
-
readonly isBusy?: boolean;
|
|
269
|
-
readonly hasOlderMessages?: boolean;
|
|
270
|
-
readonly isLoadingOlderMessages?: boolean;
|
|
271
|
-
readonly onLoadOlderMessages?: () => void;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
declare interface ChatMessageProps {
|
|
275
|
-
readonly message: ChatMessage_2;
|
|
276
|
-
readonly isBusy?: boolean;
|
|
107
|
+
readonly steps: ReadonlyArray<MessageStep>;
|
|
108
|
+
readonly state?: MessageState;
|
|
109
|
+
readonly candidate?: Candidate;
|
|
110
|
+
readonly error?: CopilotError;
|
|
277
111
|
}
|
|
278
112
|
|
|
279
|
-
declare
|
|
280
|
-
readonly view: ChatView_2;
|
|
281
|
-
readonly messages: readonly ChatMessage_2[];
|
|
282
|
-
readonly isStreaming: boolean;
|
|
283
|
-
readonly streamingMessageId: string | null;
|
|
284
|
-
readonly currentThinkingBlockId: string | null;
|
|
285
|
-
readonly conversationTitle: string | null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
declare type ChatStore = ChatState & ChatActions;
|
|
289
|
-
|
|
290
|
-
declare type ChatView = 'chat' | 'history';
|
|
291
|
-
|
|
292
|
-
declare type ChatView_2 = 'chat' | 'history';
|
|
293
|
-
|
|
294
|
-
export declare const closeSidecar: () => void;
|
|
295
|
-
|
|
296
|
-
export declare type ContentType = 'TEXT' | 'BPMN';
|
|
113
|
+
export declare type ConversationStatus = 'idle' | 'running';
|
|
297
114
|
|
|
298
|
-
|
|
299
|
-
readonly
|
|
300
|
-
readonly
|
|
115
|
+
declare interface ConversationStoreState {
|
|
116
|
+
readonly conversationId: string | null;
|
|
117
|
+
readonly status: ConversationStatus | null;
|
|
118
|
+
readonly originArtifact: ArtifactRef | null;
|
|
119
|
+
readonly preview: string;
|
|
120
|
+
readonly pendingCandidate: boolean;
|
|
121
|
+
readonly messages: ReadonlyArray<MessageStoreState>;
|
|
122
|
+
readonly messagesLoaded: boolean;
|
|
301
123
|
}
|
|
302
124
|
|
|
303
|
-
export declare interface
|
|
304
|
-
readonly
|
|
305
|
-
readonly
|
|
306
|
-
readonly
|
|
307
|
-
readonly
|
|
125
|
+
export declare interface ConversationSummary {
|
|
126
|
+
readonly conversationId: string;
|
|
127
|
+
readonly status: ConversationStatus;
|
|
128
|
+
readonly originArtifact?: ArtifactRef;
|
|
129
|
+
readonly preview: string;
|
|
130
|
+
readonly pendingCandidate: boolean;
|
|
308
131
|
}
|
|
309
132
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
readonly artifactJson?: string;
|
|
317
|
-
readonly toolCallId?: string;
|
|
318
|
-
readonly toolName?: string;
|
|
319
|
-
readonly milestoneId?: string;
|
|
320
|
-
readonly created: string;
|
|
321
|
-
}
|
|
133
|
+
/**
|
|
134
|
+
* Pipeline probe for the Tailwind v4 precompiled-CSS setup: utilities scoped
|
|
135
|
+
* under `.copilot-chat-root`, one design-system token-based class
|
|
136
|
+
* (`bg-(--primary)`), one DS component. Replaced by real UI later.
|
|
137
|
+
*/
|
|
138
|
+
export declare const CopilotBadge: ({ label }: CopilotBadgeProps) => JSX.Element;
|
|
322
139
|
|
|
323
|
-
export declare interface
|
|
324
|
-
|
|
325
|
-
readonly name: string;
|
|
326
|
-
readonly messages: readonly ConversationMessage[];
|
|
327
|
-
readonly nextCursor: number | null;
|
|
328
|
-
readonly hasMore: boolean;
|
|
329
|
-
readonly totalCount: number;
|
|
140
|
+
export declare interface CopilotBadgeProps {
|
|
141
|
+
label: string;
|
|
330
142
|
}
|
|
331
143
|
|
|
332
|
-
export declare interface
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
144
|
+
export declare interface CopilotClient {
|
|
145
|
+
postMessage(input: PostMessageInput): Promise<{
|
|
146
|
+
conversationId: string;
|
|
147
|
+
}>;
|
|
148
|
+
observe(conversationId: string, onEvent: (event: ConversationEvent) => void, onConnected?: () => void): () => void;
|
|
149
|
+
getConversation(conversationId: string): Promise<Conversation>;
|
|
150
|
+
listConversations(): Promise<ReadonlyArray<ConversationSummary>>;
|
|
151
|
+
approve(candidateId: string): Promise<void>;
|
|
152
|
+
reject(candidateId: string): Promise<void>;
|
|
153
|
+
restoreCheckpoint(checkpointId: string): Promise<void>;
|
|
154
|
+
cancelTurn(conversationId: string): Promise<void>;
|
|
337
155
|
}
|
|
338
156
|
|
|
339
|
-
declare
|
|
340
|
-
readonly type: typeof ResultType.CONVERSATION_TITLE;
|
|
341
|
-
readonly conversationTitle: string;
|
|
342
|
-
}
|
|
157
|
+
export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, onOpenProject, onClose, renderReview, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
|
|
343
158
|
|
|
344
|
-
export declare
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
readonly
|
|
348
|
-
readonly
|
|
349
|
-
readonly
|
|
350
|
-
readonly
|
|
351
|
-
readonly
|
|
352
|
-
readonly
|
|
353
|
-
readonly
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
readonly
|
|
358
|
-
readonly
|
|
359
|
-
readonly
|
|
360
|
-
|
|
361
|
-
|
|
159
|
+
export declare interface CopilotConversationPanelProps {
|
|
160
|
+
readonly client: CopilotClient;
|
|
161
|
+
readonly conversationId: string | null;
|
|
162
|
+
readonly onConversationStarted?: (conversationId: string) => void;
|
|
163
|
+
readonly onSelectConversation?: (conversationId: string | null) => void;
|
|
164
|
+
readonly projectName?: string;
|
|
165
|
+
readonly projectNameUnavailable?: boolean;
|
|
166
|
+
readonly onOpenProject?: (projectId: string) => void;
|
|
167
|
+
readonly onClose?: () => void;
|
|
168
|
+
readonly renderReview?: (candidate: Candidate, actions: {
|
|
169
|
+
approve: () => Promise<void>;
|
|
170
|
+
reject: () => Promise<void>;
|
|
171
|
+
}) => ReactNode;
|
|
172
|
+
readonly artifacts?: ReadonlyArray<ArtifactRef>;
|
|
173
|
+
readonly suggestions?: ReadonlyArray<string>;
|
|
174
|
+
readonly selectionContext?: {
|
|
175
|
+
readonly projectId: string;
|
|
176
|
+
readonly count: number;
|
|
177
|
+
};
|
|
362
178
|
}
|
|
363
179
|
|
|
364
|
-
export declare
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
onShowHistory?: () => void;
|
|
369
|
-
conversationTitle?: string;
|
|
370
|
-
view?: ChatView;
|
|
371
|
-
isBusy?: boolean;
|
|
180
|
+
export declare interface CopilotError {
|
|
181
|
+
readonly code: CopilotErrorCode;
|
|
182
|
+
readonly message: string;
|
|
183
|
+
readonly traceRef?: string;
|
|
372
184
|
}
|
|
373
185
|
|
|
374
|
-
declare type
|
|
186
|
+
export declare type CopilotErrorCode = 'PROVIDER_ERROR' | 'CANCELLED' | 'VALIDATION_FAILED' | 'BUDGET_EXCEEDED' | 'STALE_SOURCE';
|
|
375
187
|
|
|
376
|
-
export declare const CopilotSidecar: ({ children
|
|
188
|
+
export declare const CopilotSidecar: ({ children }: CopilotSidecarProps) => JSX.Element;
|
|
377
189
|
|
|
378
190
|
export declare interface CopilotSidecarProps {
|
|
379
191
|
readonly children: (props: SidecarRenderProps) => ReactNode;
|
|
380
|
-
readonly workareaSelector?: string;
|
|
381
|
-
readonly headerSelector?: string;
|
|
382
|
-
readonly zIndex?: number;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export declare interface CopilotToolContext {
|
|
386
|
-
readonly modeler: ModelerAccess;
|
|
387
|
-
readonly files: {
|
|
388
|
-
readonly getContent: (fileId: string) => Promise<string>;
|
|
389
|
-
readonly create: (params: {
|
|
390
|
-
readonly name: string;
|
|
391
|
-
readonly type: string;
|
|
392
|
-
readonly content: string;
|
|
393
|
-
readonly projectId: string;
|
|
394
|
-
readonly folderId: string | null;
|
|
395
|
-
}) => Promise<{
|
|
396
|
-
readonly id: string;
|
|
397
|
-
}>;
|
|
398
|
-
readonly list: (projectId: string) => Promise<ReadonlyArray<FileInfo>>;
|
|
399
|
-
};
|
|
400
|
-
readonly templates: {
|
|
401
|
-
readonly getCustom: () => ReadonlyArray<ElementTemplate>;
|
|
402
|
-
readonly getOotbConnectors: () => ReadonlyArray<ElementTemplate>;
|
|
403
|
-
readonly apply: (elementId: string, templateId: string, version?: number) => unknown;
|
|
404
|
-
};
|
|
405
|
-
readonly form: {
|
|
406
|
-
readonly getContent: () => string | null;
|
|
407
|
-
readonly isAvailable: () => boolean;
|
|
408
|
-
readonly getLintErrors: () => Promise<ReadonlyArray<FormLintError>>;
|
|
409
|
-
readonly importSchema: (content: unknown) => void;
|
|
410
|
-
readonly update: () => Promise<void>;
|
|
411
|
-
readonly getParsedContent: (json: string) => unknown;
|
|
412
|
-
readonly getSchema: () => unknown;
|
|
413
|
-
readonly getSelection: () => unknown;
|
|
414
|
-
};
|
|
415
|
-
readonly dmn: {
|
|
416
|
-
readonly createModdle: () => DmnModdle;
|
|
417
|
-
readonly getModeler: () => DmnModeler;
|
|
418
|
-
};
|
|
419
|
-
readonly feel: {
|
|
420
|
-
readonly validate: (expression: string) => Promise<FeelValidationResult>;
|
|
421
|
-
};
|
|
422
|
-
readonly diagram: {
|
|
423
|
-
readonly isBPMN: () => boolean;
|
|
424
|
-
readonly isDMN: () => boolean;
|
|
425
|
-
readonly canEdit: () => boolean;
|
|
426
|
-
readonly getContent: () => string | null;
|
|
427
|
-
readonly importContent: (xml: string) => Promise<ImportResult>;
|
|
428
|
-
readonly saveContent: () => Promise<void>;
|
|
429
|
-
readonly exportXml: () => Promise<string>;
|
|
430
|
-
readonly getLintErrors: () => Promise<ReadonlyArray<LintError>>;
|
|
431
|
-
readonly getDeploymentErrors: () => ReadonlyArray<unknown>;
|
|
432
|
-
readonly ensureExecutionPlatform: () => void;
|
|
433
|
-
};
|
|
434
|
-
readonly project: {
|
|
435
|
-
readonly resolve: () => ProjectContext;
|
|
436
|
-
};
|
|
437
192
|
}
|
|
438
193
|
|
|
439
|
-
export declare const
|
|
194
|
+
export declare const createFixtureClient: (options?: FixtureClientOptions) => CopilotClient;
|
|
440
195
|
|
|
441
|
-
export declare const
|
|
196
|
+
export declare const createHttpClient: (options: HttpClientOptions) => CopilotClient;
|
|
442
197
|
|
|
443
|
-
export declare
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}>;
|
|
450
|
-
|
|
451
|
-
export declare type DescriptionFormatter = (args: Record<string, unknown>) => string;
|
|
452
|
-
|
|
453
|
-
export declare const discoverySkill: {
|
|
454
|
-
readonly slug: "discovery";
|
|
455
|
-
readonly name: "Discovery";
|
|
456
|
-
readonly description: "Detect gaps in a BPMN request before building — ask 1–3 targeted questions about actors, error conditions, and time constraints when the request is ambiguous. Skip if the request is already detailed.";
|
|
457
|
-
readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
|
|
458
|
-
readonly content: string;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
declare interface DmnDefinitions extends DmnModdleElement {
|
|
462
|
-
readonly $model: {
|
|
463
|
-
readonly toXML: (definitions: DmnDefinitions, options?: {
|
|
464
|
-
format?: boolean;
|
|
465
|
-
}) => Promise<{
|
|
466
|
-
xml: string;
|
|
467
|
-
}>;
|
|
468
|
-
};
|
|
469
|
-
readonly drgElement?: ReadonlyArray<DmnModdleElement>;
|
|
198
|
+
export declare interface EventSourceLike {
|
|
199
|
+
onmessage: ((message: {
|
|
200
|
+
data: string;
|
|
201
|
+
}) => void) | null;
|
|
202
|
+
onopen?: (() => void) | null;
|
|
203
|
+
close(): void;
|
|
470
204
|
}
|
|
471
205
|
|
|
472
|
-
declare interface
|
|
473
|
-
readonly
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
readonly create: (type: string, properties: Record<string, unknown>) => DmnModdleElement;
|
|
206
|
+
export declare interface FixtureClientOptions {
|
|
207
|
+
readonly resolveScript?: (input: PostMessageInput) => FixtureScript;
|
|
208
|
+
readonly originArtifact?: ArtifactRef;
|
|
209
|
+
readonly timing?: FixtureTiming;
|
|
477
210
|
}
|
|
478
211
|
|
|
479
|
-
declare interface
|
|
480
|
-
readonly
|
|
481
|
-
readonly
|
|
212
|
+
export declare interface FixtureScript {
|
|
213
|
+
readonly outcome: 'answer' | 'propose' | 'failed' | 'run_forever';
|
|
214
|
+
readonly answer?: string;
|
|
215
|
+
readonly changes?: ReadonlyArray<ArtifactChange>;
|
|
216
|
+
readonly error?: CopilotError;
|
|
217
|
+
readonly stepLabels?: ReadonlyArray<string>;
|
|
482
218
|
}
|
|
483
219
|
|
|
484
|
-
declare interface
|
|
485
|
-
readonly
|
|
486
|
-
readonly
|
|
487
|
-
readonly
|
|
488
|
-
readonly saveXML?: (options?: {
|
|
489
|
-
format?: boolean;
|
|
490
|
-
}) => Promise<{
|
|
491
|
-
xml: string;
|
|
492
|
-
}>;
|
|
220
|
+
declare interface FixtureTiming {
|
|
221
|
+
readonly start: number;
|
|
222
|
+
readonly step: number;
|
|
223
|
+
readonly word: number;
|
|
493
224
|
}
|
|
494
225
|
|
|
495
|
-
declare interface
|
|
496
|
-
readonly
|
|
226
|
+
export declare interface HttpClientOptions {
|
|
227
|
+
readonly baseUrl: string;
|
|
228
|
+
readonly fetch?: typeof fetch;
|
|
229
|
+
readonly eventSource?: new (url: string) => EventSourceLike;
|
|
497
230
|
}
|
|
498
231
|
|
|
499
|
-
export declare
|
|
500
|
-
readonly id: string;
|
|
501
|
-
readonly name: string;
|
|
502
|
-
readonly description?: string;
|
|
503
|
-
readonly version: number;
|
|
504
|
-
readonly appliesTo: ReadonlyArray<string>;
|
|
505
|
-
readonly elementType?: string;
|
|
506
|
-
readonly properties?: ReadonlyArray<Record<string, unknown>>;
|
|
507
|
-
readonly groups?: ReadonlyArray<Record<string, unknown>>;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
export declare const EventStatus: {
|
|
511
|
-
readonly IN_PROGRESS: "IN_PROGRESS";
|
|
512
|
-
readonly COMPLETED: "COMPLETED";
|
|
513
|
-
readonly ERROR: "ERROR";
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
export declare type EventStatusValue = (typeof EventStatus)[keyof typeof EventStatus];
|
|
517
|
-
|
|
518
|
-
export declare const EventType: {
|
|
519
|
-
readonly THINKING: "THINKING";
|
|
520
|
-
readonly EXECUTION_PLAN: "EXECUTION_PLAN";
|
|
521
|
-
readonly TOOL_PLANNING: "TOOL_PLANNING";
|
|
522
|
-
readonly TOOL_INVOKE: "TOOL_INVOKE";
|
|
523
|
-
readonly EXTERNAL_TOOL_CALL: "EXTERNAL_TOOL_CALL";
|
|
524
|
-
readonly TOOL_RESULT: "TOOL_RESULT";
|
|
525
|
-
readonly EXECUTION_COMPLETE: "EXECUTION_COMPLETE";
|
|
526
|
-
readonly ERROR: "ERROR";
|
|
527
|
-
readonly CONVERSATION_TITLE: "CONVERSATION_TITLE";
|
|
528
|
-
readonly SKILL_ACTIVATED: "SKILL_ACTIVATED";
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
export declare type EventTypeValue = (typeof EventType)[keyof typeof EventType];
|
|
232
|
+
export declare type MessageState = 'streaming' | 'complete' | 'cancelled' | 'failed';
|
|
532
233
|
|
|
533
|
-
export declare
|
|
534
|
-
readonly
|
|
535
|
-
readonly
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
declare interface FeelValidationResult {
|
|
542
|
-
readonly error?: string;
|
|
543
|
-
readonly warnings?: ReadonlyArray<string>;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
export declare interface FileInfo {
|
|
547
|
-
readonly id: string;
|
|
548
|
-
readonly name: string;
|
|
549
|
-
readonly type: string;
|
|
550
|
-
readonly lastModified?: string;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
export declare interface FormLintError {
|
|
554
|
-
readonly fieldId: string;
|
|
555
|
-
readonly message: string;
|
|
556
|
-
readonly category: string;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
export declare const formSchemaSkill: {
|
|
560
|
-
readonly slug: "form-schema";
|
|
561
|
-
readonly name: "Camunda Form Schema";
|
|
562
|
-
readonly description: "Camunda Forms schema rules — component types, validation, ID conventions, binding, datetime subtype. Activate when creating or modifying forms.";
|
|
563
|
-
readonly suggestedCapabilities: readonly ["FORM_EDITING"];
|
|
564
|
-
readonly content: string;
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
export declare const getDefaultStatusLabel: (eventType: EventTypeValue, toolName?: string, eventStatus?: EventStatusValue) => string;
|
|
568
|
-
|
|
569
|
-
export declare interface ImportResult {
|
|
570
|
-
readonly error?: unknown;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
export declare const isApplyElementTemplateCompleted: (event: AgentEvent) => boolean;
|
|
574
|
-
|
|
575
|
-
export declare const isCurrentFileModified: (event: AgentEvent) => boolean;
|
|
576
|
-
|
|
577
|
-
export declare const isLayoutBpmnXmlCompleted: (event: AgentEvent) => boolean;
|
|
578
|
-
|
|
579
|
-
export declare const isToolAllowedWithCapabilities: (tool: {
|
|
580
|
-
readonly requiredCapabilities?: ReadonlyArray<string>;
|
|
581
|
-
}, capabilities: ReadonlyArray<string>) => boolean;
|
|
582
|
-
|
|
583
|
-
export declare const isWriteArtifactCompleted: (event: AgentEvent) => boolean;
|
|
584
|
-
|
|
585
|
-
declare interface KapaAiSearchResult {
|
|
586
|
-
readonly content: string;
|
|
587
|
-
readonly source_url: string;
|
|
588
|
-
readonly title: string;
|
|
589
|
-
readonly source_type: string;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
declare interface KapaToolResult {
|
|
593
|
-
readonly sources: readonly KapaAiSearchResult[];
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
export { layoutProcess }
|
|
597
|
-
|
|
598
|
-
export declare interface LintError {
|
|
599
|
-
readonly elementId: string;
|
|
600
|
-
readonly elementName?: string;
|
|
601
|
-
readonly message: string;
|
|
602
|
-
readonly category: string;
|
|
603
|
-
readonly rule: string;
|
|
604
|
-
readonly documentationUrl?: string;
|
|
234
|
+
export declare interface MessageStep {
|
|
235
|
+
readonly stepId: string;
|
|
236
|
+
readonly kind: StepKind;
|
|
237
|
+
readonly name?: string;
|
|
238
|
+
readonly label: string;
|
|
239
|
+
readonly description?: string;
|
|
240
|
+
readonly groupId?: string;
|
|
241
|
+
readonly status: StepStatus;
|
|
605
242
|
}
|
|
606
243
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
244
|
+
declare interface MessageStoreState {
|
|
245
|
+
readonly messageId: string;
|
|
246
|
+
readonly role: 'user' | 'assistant';
|
|
610
247
|
readonly content: string;
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
export declare type MessageStatus = 'pending' | 'streaming' | 'complete' | 'error';
|
|
618
|
-
|
|
619
|
-
declare type MessageStatusCallback = (messageId: string, status: 'complete' | 'error') => void;
|
|
620
|
-
|
|
621
|
-
declare type MixedToolHandler = (toolResult: string, onError: (toolName: string, error: Error) => void) => KapaToolResult | null;
|
|
622
|
-
|
|
623
|
-
declare interface MixedToolResultEvent {
|
|
624
|
-
readonly type: typeof ResultType.MIXED_TOOL_RESULT;
|
|
625
|
-
readonly toolName: string;
|
|
626
|
-
readonly toolResult: string;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
export declare interface ModelerAccess {
|
|
630
|
-
readonly getModeler: () => BpmnModeler;
|
|
631
|
-
readonly getCanvas: () => unknown;
|
|
632
|
-
readonly getElementRegistry: () => {
|
|
633
|
-
readonly get: (id: string) => BpmnElement | undefined;
|
|
634
|
-
readonly getAll: () => ReadonlyArray<BpmnElement>;
|
|
635
|
-
readonly filter: (predicate: (el: BpmnElement) => boolean) => ReadonlyArray<BpmnElement>;
|
|
636
|
-
};
|
|
637
|
-
readonly getModeling: () => unknown;
|
|
638
|
-
readonly getCommandStack: () => unknown;
|
|
639
|
-
readonly getElementFactory: () => unknown;
|
|
640
|
-
readonly getModdle: () => unknown;
|
|
641
|
-
readonly getSelection: () => unknown;
|
|
642
|
-
readonly getElementById: (id: string) => BpmnElement;
|
|
643
|
-
readonly is: (element: unknown, type: string) => boolean;
|
|
644
|
-
readonly getBusinessObject: (element: unknown) => Record<string, unknown>;
|
|
645
|
-
readonly getBpmnRules?: () => unknown;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
declare interface ModelerAccessOptions {
|
|
649
|
-
readonly getModeler: () => BpmnModeler;
|
|
650
|
-
readonly is: (element: unknown, type: string) => boolean;
|
|
651
|
-
readonly getBusinessObject: (element: unknown) => Record<string, unknown>;
|
|
248
|
+
readonly steps: ReadonlyArray<MessageStep>;
|
|
249
|
+
readonly activity: string | null;
|
|
250
|
+
readonly state: MessageState | null;
|
|
251
|
+
readonly candidate: Candidate | null;
|
|
252
|
+
readonly error: CopilotError | null;
|
|
652
253
|
}
|
|
653
254
|
|
|
654
255
|
export declare const openSidecar: () => void;
|
|
655
256
|
|
|
656
|
-
export declare
|
|
657
|
-
readonly
|
|
658
|
-
readonly
|
|
659
|
-
readonly
|
|
660
|
-
readonly suggestedCapabilities: readonly ["BPMN_VIEWING", "BPMN_EDITING"];
|
|
661
|
-
readonly content: string;
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
export declare interface ProjectContext {
|
|
665
|
-
readonly id: string;
|
|
666
|
-
readonly folderId: string | null;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
export declare class QueryCancelledError extends Error {
|
|
670
|
-
constructor(message?: string);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
export declare interface RawBpmnLintError {
|
|
674
|
-
readonly id: string;
|
|
675
|
-
readonly name?: string;
|
|
676
|
-
readonly message: string;
|
|
677
|
-
readonly category: string;
|
|
678
|
-
readonly rule: string;
|
|
679
|
-
readonly meta?: {
|
|
680
|
-
readonly documentation?: {
|
|
681
|
-
readonly url?: string;
|
|
682
|
-
};
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
export declare const ResultType: {
|
|
687
|
-
readonly TOOL_INVOKE: "TOOL_INVOKE";
|
|
688
|
-
readonly MIXED_TOOL_RESULT: "MIXED_TOOL_RESULT";
|
|
689
|
-
readonly CONVERSATION_TITLE: "CONVERSATION_TITLE";
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
export declare type ResultTypeValue = (typeof ResultType)[keyof typeof ResultType];
|
|
693
|
-
|
|
694
|
-
export declare interface RollbackResponse {
|
|
695
|
-
readonly milestoneId: string;
|
|
696
|
-
readonly message: string;
|
|
257
|
+
export declare interface PostMessageInput {
|
|
258
|
+
readonly prompt: string;
|
|
259
|
+
readonly conversationId?: string;
|
|
260
|
+
readonly context?: Record<string, unknown>;
|
|
697
261
|
}
|
|
698
262
|
|
|
699
|
-
export declare const selectAgentState: (state: AgentStoreState) => string;
|
|
700
|
-
|
|
701
|
-
export declare const selectIsBusy: (state: AgentStoreState) => boolean;
|
|
702
|
-
|
|
703
|
-
export declare interface SendMessagePayload {
|
|
704
|
-
readonly conversationId: string;
|
|
705
|
-
readonly messageId: string;
|
|
706
|
-
readonly content: string;
|
|
707
|
-
readonly externalTools: readonly BackendToolPayload[];
|
|
708
|
-
readonly context: Record<string, unknown>;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
export declare const setupBpmnTools: (context: CopilotToolContext, registry: ToolRegistry) => void;
|
|
712
|
-
|
|
713
263
|
export declare interface SidecarRenderProps {
|
|
714
264
|
readonly onMinimize: () => void;
|
|
715
265
|
readonly isOpen: boolean;
|
|
716
266
|
}
|
|
717
267
|
|
|
718
|
-
export declare
|
|
719
|
-
readonly slug: string;
|
|
720
|
-
readonly name: string;
|
|
721
|
-
readonly description: string;
|
|
722
|
-
readonly content: string;
|
|
723
|
-
readonly suggestedCapabilities?: readonly Capability[];
|
|
724
|
-
}
|
|
268
|
+
export declare type StepKind = 'reasoning' | 'tool' | 'plan' | 'message';
|
|
725
269
|
|
|
726
|
-
export declare
|
|
727
|
-
register: (skill: SkillDefinition) => void;
|
|
728
|
-
get: (slug: string) => SkillDefinition | undefined;
|
|
729
|
-
getAll: () => readonly SkillDefinition[];
|
|
730
|
-
clear: () => void;
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
declare interface SourceReference {
|
|
734
|
-
readonly content: string;
|
|
735
|
-
readonly sourceUrl: string;
|
|
736
|
-
readonly title: string;
|
|
737
|
-
readonly sourceType: string;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
declare type StatusLabelCallback = (messageId: string, label: string) => void;
|
|
741
|
-
|
|
742
|
-
export declare interface Suggestion {
|
|
743
|
-
readonly label: string;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
declare interface ThinkingBlock {
|
|
747
|
-
readonly id: string;
|
|
748
|
-
readonly content: string;
|
|
749
|
-
readonly label: string;
|
|
750
|
-
readonly isComplete: boolean;
|
|
751
|
-
readonly kind?: ThinkingBlockKind;
|
|
752
|
-
readonly toolName?: string;
|
|
753
|
-
readonly toolStatus?: ToolBlockStatus;
|
|
754
|
-
readonly stepNumber?: number;
|
|
755
|
-
readonly toolArguments?: Record<string, unknown>;
|
|
756
|
-
readonly toolResult?: string;
|
|
757
|
-
readonly description?: string;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
declare type ThinkingBlockKind = 'reasoning' | 'tool' | 'error';
|
|
761
|
-
|
|
762
|
-
export declare const ThinkingIndicator: ({ label, completedLabel, content, isComplete, }: ThinkingIndicatorProps) => JSX.Element | null;
|
|
763
|
-
|
|
764
|
-
declare interface ThinkingIndicatorProps {
|
|
765
|
-
readonly label?: string;
|
|
766
|
-
readonly completedLabel?: string;
|
|
767
|
-
readonly content?: string;
|
|
768
|
-
readonly isComplete: boolean;
|
|
769
|
-
}
|
|
270
|
+
export declare type StepStatus = 'active' | 'complete' | 'error';
|
|
770
271
|
|
|
771
272
|
export declare const toggleSidecar: () => void;
|
|
772
273
|
|
|
773
|
-
declare
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
export declare type ToolHandler = (args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
|
|
790
|
-
|
|
791
|
-
declare type ToolHandler_2 = (args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
|
|
792
|
-
|
|
793
|
-
export declare interface ToolInvokeResult {
|
|
794
|
-
readonly type: typeof ResultType.TOOL_INVOKE;
|
|
795
|
-
readonly toolName: string;
|
|
796
|
-
readonly toolCallId?: string;
|
|
797
|
-
readonly toolArguments: Record<string, unknown>;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
export declare interface ToolRegistration extends ToolDefinition {
|
|
801
|
-
readonly handler: ToolHandler | MixedToolHandler;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
declare interface ToolRegistration_2 extends ToolDefinition {
|
|
805
|
-
readonly handler: ToolHandler_2;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
export declare interface ToolRegistry {
|
|
809
|
-
readonly registerTool: (registration: ToolRegistration_2) => void;
|
|
810
|
-
readonly clear: () => void;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
export declare const toolRegistry: {
|
|
814
|
-
registerTool: (registration: ToolRegistration) => void;
|
|
815
|
-
has: (name: string) => boolean;
|
|
816
|
-
hasHandler: (name: string) => boolean;
|
|
817
|
-
isMixed: (name: string) => boolean;
|
|
818
|
-
getDisplayName: (name: string) => string | undefined;
|
|
819
|
-
getDescription: (name: string, args: Record<string, unknown>) => string;
|
|
820
|
-
hasCustomDescription: (name: string) => boolean;
|
|
821
|
-
getContentType: (name: string) => ContentType;
|
|
822
|
-
getMixedHandler: (name: string) => MixedToolHandler | undefined;
|
|
823
|
-
getHandler: (name: string) => ToolHandler | undefined;
|
|
824
|
-
executeHandler: (name: string, args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
|
|
825
|
-
getToolsForBackend: () => readonly BackendToolPayload[];
|
|
826
|
-
clear: () => void;
|
|
274
|
+
export declare const useCopilotConversation: ({ client, conversationId, }: UseCopilotConversationOptions) => {
|
|
275
|
+
conversationId: string | null;
|
|
276
|
+
status: ConversationStatus | null;
|
|
277
|
+
originArtifact: ArtifactRef | null;
|
|
278
|
+
messages: readonly MessageStoreState[];
|
|
279
|
+
messagesLoaded: boolean;
|
|
280
|
+
pendingCandidate: boolean;
|
|
281
|
+
isRunning: boolean;
|
|
282
|
+
postMessage: (prompt: string) => Promise<string>;
|
|
283
|
+
refresh: () => Promise<void>;
|
|
284
|
+
approve: (candidateId: string) => Promise<void>;
|
|
285
|
+
reject: (candidateId: string) => Promise<void>;
|
|
286
|
+
restoreCheckpoint: (checkpointId: string) => Promise<void>;
|
|
287
|
+
cancelTurn: () => Promise<void>;
|
|
827
288
|
};
|
|
828
289
|
|
|
829
|
-
export declare
|
|
830
|
-
readonly
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
readonly toolCallId?: string;
|
|
834
|
-
readonly toolResult: string;
|
|
835
|
-
readonly contentType: 'TEXT' | 'BPMN' | 'JSON';
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
export declare type ToolType = 'frontend' | 'mixed';
|
|
839
|
-
|
|
840
|
-
export declare const topologyClassifierSkill: {
|
|
841
|
-
readonly slug: "topology-classifier";
|
|
842
|
-
readonly name: "Topology classifier";
|
|
843
|
-
readonly description: "Use ONLY when the prompt EXPLICITLY mentions AI agents, autonomous decisioning, LLM orchestration, or multiple-event-triggered flows. Do NOT use for ordinary sequential business processes (e.g. approval, KYC, onboarding, invoice handling, claim handling) — those are handled by plan-then-build alone.";
|
|
844
|
-
readonly suggestedCapabilities: readonly ["BPMN_VIEWING", "BPMN_EDITING"];
|
|
845
|
-
readonly content: string;
|
|
290
|
+
export declare const useCopilotConversationList: ({ client }: UseCopilotConversationListOptions) => {
|
|
291
|
+
conversations: readonly ConversationStoreState[];
|
|
292
|
+
isLoading: boolean;
|
|
293
|
+
reload: () => Promise<void>;
|
|
846
294
|
};
|
|
847
295
|
|
|
848
|
-
export declare
|
|
849
|
-
|
|
850
|
-
declare type TraverseVisitor = (element: DmnModdleElement) => void | false;
|
|
851
|
-
|
|
852
|
-
declare interface UpdateConversationPayload {
|
|
853
|
-
readonly conversationName: string;
|
|
296
|
+
export declare interface UseCopilotConversationListOptions {
|
|
297
|
+
readonly client: CopilotClient;
|
|
854
298
|
}
|
|
855
299
|
|
|
856
|
-
export declare
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
export declare const useChatStore: UseBoundStore<StoreApi<ChatStore>>;
|
|
300
|
+
export declare interface UseCopilotConversationOptions {
|
|
301
|
+
readonly client: CopilotClient;
|
|
302
|
+
readonly conversationId: string | null;
|
|
303
|
+
}
|
|
861
304
|
|
|
862
305
|
export declare const useSidecarOpen: () => boolean;
|
|
863
306
|
|
|
864
|
-
export declare const zeebeTaskConfigurationSkill: {
|
|
865
|
-
readonly slug: "zeebe-task-configuration";
|
|
866
|
-
readonly name: "Zeebe Task Configuration";
|
|
867
|
-
readonly description: "Zeebe extension element patterns for service tasks, user tasks, and business rule tasks — taskDefinition, assignmentDefinition, formDefinition, ioMapping. Activate when configuring any task.";
|
|
868
|
-
readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
|
|
869
|
-
readonly content: string;
|
|
870
|
-
};
|
|
871
|
-
|
|
872
307
|
export { }
|