@camunda/copilot-chat 0.7.0 → 0.8.1-alpha.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 +143 -20
- package/dist/highlighted-body-OFNGDK62-CexgshTX.js +19 -0
- package/dist/index-Bh5gDiy3.js +23897 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +253 -713
- package/dist/index.js +13 -16813
- package/dist/mermaid-GHXKKRXX-DR0FmDNX.js +4 -0
- package/package.json +28 -18
- package/dist/package.json +0 -60
package/dist/index.d.ts
CHANGED
|
@@ -1,794 +1,334 @@
|
|
|
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;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export declare interface AgentEvent {
|
|
25
|
-
readonly conversationId: string;
|
|
26
|
-
readonly type: EventTypeValue;
|
|
27
|
-
readonly status: EventStatusValue;
|
|
28
|
-
readonly content?: string;
|
|
29
|
-
readonly toolName?: string;
|
|
30
|
-
readonly toolCallId?: string;
|
|
31
|
-
readonly toolArguments?: string;
|
|
32
|
-
readonly toolResult?: string;
|
|
33
|
-
readonly skillName?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare type AgentResult = ToolInvokeResult | MixedToolResultEvent | ConversationTitleResult;
|
|
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
|
-
};
|
|
44
|
-
|
|
45
|
-
export declare type AgentStateType = (typeof AgentState)[keyof typeof AgentState];
|
|
46
|
-
|
|
47
|
-
declare type AgentStore = AgentStoreState & AgentStoreActions & {
|
|
48
|
-
callbacks: AgentStoreCallbacks;
|
|
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;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare interface AgentStoreCallbacks {
|
|
62
|
-
readonly onMessageStatusUpdate?: MessageStatusCallback;
|
|
63
|
-
readonly onStatusLabelClear?: StatusLabelCallback;
|
|
64
|
-
readonly onMessageError?: MessageErrorCallback;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare interface AgentStoreState {
|
|
68
|
-
readonly conversationId: string | null;
|
|
69
|
-
readonly currentMessageId: string | null;
|
|
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;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export declare interface AgentTransport {
|
|
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>;
|
|
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>;
|
|
93
10
|
}
|
|
94
11
|
|
|
95
|
-
export declare
|
|
96
|
-
|
|
97
|
-
|
|
12
|
+
export declare interface ArtifactRef {
|
|
13
|
+
readonly projectId: string;
|
|
14
|
+
readonly artifactId: string;
|
|
98
15
|
readonly name: string;
|
|
99
|
-
readonly
|
|
100
|
-
readonly parameters: Record<string, unknown>;
|
|
101
|
-
readonly category: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export declare interface BpmnElement {
|
|
105
|
-
readonly id: string;
|
|
106
|
-
readonly type: string;
|
|
107
|
-
readonly businessObject: Record<string, unknown>;
|
|
108
|
-
readonly parent?: BpmnElement;
|
|
109
|
-
readonly incoming?: ReadonlyArray<BpmnElement>;
|
|
110
|
-
readonly outgoing?: ReadonlyArray<BpmnElement>;
|
|
111
|
-
readonly children?: ReadonlyArray<BpmnElement>;
|
|
16
|
+
readonly type: ArtifactType;
|
|
112
17
|
}
|
|
113
18
|
|
|
114
|
-
export declare
|
|
115
|
-
readonly get: (serviceName: string, strict?: boolean) => unknown;
|
|
116
|
-
readonly saveXML: (options?: {
|
|
117
|
-
format?: boolean;
|
|
118
|
-
}) => Promise<{
|
|
119
|
-
xml: string;
|
|
120
|
-
}>;
|
|
121
|
-
}
|
|
19
|
+
export declare type ArtifactType = 'bpmn' | 'dmn' | 'form';
|
|
122
20
|
|
|
123
|
-
export declare
|
|
124
|
-
readonly
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
128
|
-
|
|
129
|
-
readonly properties: {
|
|
130
|
-
readonly query: {
|
|
131
|
-
readonly type: "string";
|
|
132
|
-
readonly description: "The search query to find information in the Camunda knowledge base";
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
readonly required: readonly ["query"];
|
|
136
|
-
};
|
|
137
|
-
readonly type: "frontend";
|
|
138
|
-
readonly contentType: "TEXT";
|
|
139
|
-
readonly category: "GENERAL";
|
|
140
|
-
readonly handler: ToolHandler;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export declare interface camundaDocsSearchToolResult {
|
|
144
|
-
readonly answer: string;
|
|
145
|
-
readonly sources: readonly KapaAiSearchResult[];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export declare const CAPABILITY: {
|
|
149
|
-
readonly BPMN_EDITING: "BPMN_EDITING";
|
|
150
|
-
readonly FORM_EDITING: "FORM_EDITING";
|
|
151
|
-
readonly DMN_EDITING: "DMN_EDITING";
|
|
152
|
-
readonly FEEL_EDITING: "FEEL_EDITING";
|
|
153
|
-
readonly BPMN_VIEWING: "BPMN_VIEWING";
|
|
154
|
-
readonly FORM_VIEWING: "FORM_VIEWING";
|
|
155
|
-
readonly DMN_VIEWING: "DMN_VIEWING";
|
|
156
|
-
readonly FILE_OPERATIONS: "FILE_OPERATIONS";
|
|
157
|
-
readonly FILE_CREATION: "FILE_CREATION";
|
|
158
|
-
readonly VALIDATION: "VALIDATION";
|
|
159
|
-
readonly INTEGRATION: "INTEGRATION";
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export declare type Capability = (typeof CAPABILITY)[keyof typeof CAPABILITY];
|
|
163
|
-
|
|
164
|
-
declare interface ChatActions {
|
|
165
|
-
readonly addUserMessage: (content: string) => string;
|
|
166
|
-
readonly addAssistantMessage: (id: string) => void;
|
|
167
|
-
readonly appendToMessage: (id: string, content: string) => void;
|
|
168
|
-
readonly setMessageContent: (id: string, content: string) => void;
|
|
169
|
-
readonly updateMessageStatus: (id: string, status: MessageStatus) => void;
|
|
170
|
-
readonly updateMessageStatusLabel: (id: string, statusLabel: string) => void;
|
|
171
|
-
readonly setMessageSources: (id: string, sources: readonly SourceReference[]) => void;
|
|
172
|
-
readonly setStreaming: (isStreaming: boolean, messageId?: string | null) => void;
|
|
173
|
-
readonly clearMessages: () => void;
|
|
174
|
-
readonly addThinkingBlock: (messageId: string, blockId: string, label: string) => void;
|
|
175
|
-
readonly appendToThinkingBlock: (messageId: string, blockId: string, content: string) => void;
|
|
176
|
-
readonly completeThinkingBlock: (messageId: string, blockId: string) => void;
|
|
177
|
-
readonly completeAllThinkingBlocks: (messageId: string) => void;
|
|
178
|
-
readonly setMessageError: (id: string, errorMessage: string) => void;
|
|
179
|
-
readonly addToolBlock: (messageId: string, blockId: string, toolName: string, stepNumber: number, toolArguments?: Record<string, unknown>) => void;
|
|
180
|
-
readonly updateToolBlockStatus: (messageId: string, blockId: string, status: ToolBlockStatus) => void;
|
|
181
|
-
readonly updateToolBlockResult: (messageId: string, blockId: string, toolResult: string) => void;
|
|
182
|
-
readonly addErrorBlock: (messageId: string, blockId: string, errorMessage: string) => void;
|
|
183
|
-
readonly setView: (view: ChatView_2) => void;
|
|
184
|
-
readonly setConversationTitle: (title: string) => void;
|
|
185
|
-
readonly loadConversation: (messages: readonly ChatMessage_2[], title: string | null) => void;
|
|
186
|
-
readonly prependMessages: (messages: readonly ChatMessage_2[]) => void;
|
|
187
|
-
readonly rollbackToMessage: (messageId: string) => void;
|
|
188
|
-
readonly addRollbackMessage: (content: string, milestoneId: string) => void;
|
|
189
|
-
readonly setLastAssistantMessageMilestone: (milestoneId: string) => void;
|
|
190
|
-
readonly setLastUserMessageMilestone: (milestoneId: string) => void;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export declare const ChatInput: ({ onSend, onStop, isBusy, isDisabled, placeholder, isOpen, }: ChatInputProps) => JSX.Element;
|
|
194
|
-
|
|
195
|
-
declare interface ChatInputProps {
|
|
196
|
-
readonly onSend: (message: string) => void;
|
|
197
|
-
readonly onStop?: () => void;
|
|
198
|
-
readonly isBusy?: boolean;
|
|
199
|
-
readonly isDisabled?: boolean;
|
|
200
|
-
readonly placeholder?: string;
|
|
201
|
-
readonly isOpen?: boolean;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export declare const ChatMessage: ({ message, isBusy }: ChatMessageProps) => JSX.Element;
|
|
205
|
-
|
|
206
|
-
declare interface ChatMessage_2 {
|
|
207
|
-
readonly id: string;
|
|
208
|
-
readonly role: MessageRole;
|
|
209
|
-
readonly content: string;
|
|
210
|
-
readonly status: MessageStatus;
|
|
211
|
-
readonly timestamp?: number;
|
|
212
|
-
readonly statusLabel?: string;
|
|
213
|
-
readonly thinkingBlocks?: readonly ThinkingBlock[];
|
|
214
|
-
readonly sources?: readonly SourceReference[];
|
|
215
|
-
readonly milestoneId?: string;
|
|
216
|
-
}
|
|
217
|
-
export { ChatMessage_2 as ChatMessageInterface }
|
|
218
|
-
export { ChatMessage_2 as ChatMessageType }
|
|
219
|
-
|
|
220
|
-
export declare const ChatMessageList: ({ messages, emptyStateTitle, emptyStateDescription, suggestions, onSuggestionClick, onRollback, onSeeVersion, isBusy, hasOlderMessages, isLoadingOlderMessages, onLoadOlderMessages, }: ChatMessageListProps) => JSX.Element;
|
|
221
|
-
|
|
222
|
-
declare interface ChatMessageListProps {
|
|
223
|
-
readonly messages: readonly ChatMessage_2[];
|
|
224
|
-
readonly emptyStateTitle?: string;
|
|
225
|
-
readonly emptyStateDescription?: ReactNode;
|
|
226
|
-
readonly suggestions?: readonly Suggestion[];
|
|
227
|
-
readonly onSuggestionClick?: (suggestion: Suggestion) => void;
|
|
228
|
-
readonly onRollback?: (milestoneId: string) => void;
|
|
229
|
-
readonly onSeeVersion?: (milestoneId: string) => void;
|
|
230
|
-
readonly isBusy?: boolean;
|
|
231
|
-
readonly hasOlderMessages?: boolean;
|
|
232
|
-
readonly isLoadingOlderMessages?: boolean;
|
|
233
|
-
readonly onLoadOlderMessages?: () => 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;
|
|
234
27
|
}
|
|
235
28
|
|
|
236
|
-
declare
|
|
237
|
-
readonly message: ChatMessage_2;
|
|
238
|
-
readonly isBusy?: boolean;
|
|
239
|
-
}
|
|
29
|
+
export declare const CandidateReview: ({ candidate, onReviewReady }: CandidateReviewProps) => JSX.Element;
|
|
240
30
|
|
|
241
|
-
declare interface
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
244
|
-
readonly isStreaming: boolean;
|
|
245
|
-
readonly streamingMessageId: string | null;
|
|
246
|
-
readonly currentThinkingBlockId: string | null;
|
|
247
|
-
readonly conversationTitle: string | null;
|
|
31
|
+
export declare interface CandidateReviewProps {
|
|
32
|
+
readonly candidate: Candidate;
|
|
33
|
+
readonly onReviewReady?: (ready: boolean) => void;
|
|
248
34
|
}
|
|
249
35
|
|
|
250
|
-
declare type
|
|
251
|
-
|
|
252
|
-
declare type ChatView = 'chat' | 'history';
|
|
253
|
-
|
|
254
|
-
declare type ChatView_2 = 'chat' | 'history';
|
|
36
|
+
export declare type CandidateState = 'proposed' | 'applied' | 'rejected' | 'cancelled' | 'stale';
|
|
255
37
|
|
|
256
38
|
export declare const closeSidecar: () => void;
|
|
257
39
|
|
|
258
|
-
export declare
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
readonly
|
|
262
|
-
readonly label: string;
|
|
40
|
+
export declare interface Conversation extends ConversationSummary {
|
|
41
|
+
readonly messages: ReadonlyArray<ConversationMessage>;
|
|
42
|
+
readonly verificationHealth?: VerificationHealth | null;
|
|
43
|
+
readonly sourceChangedMessageId?: string | null;
|
|
263
44
|
}
|
|
264
45
|
|
|
265
|
-
export declare
|
|
266
|
-
readonly
|
|
267
|
-
|
|
268
|
-
readonly
|
|
269
|
-
readonly
|
|
270
|
-
|
|
46
|
+
export declare type ConversationEvent = {
|
|
47
|
+
readonly revision?: number;
|
|
48
|
+
} & ({
|
|
49
|
+
readonly type: 'turn_started';
|
|
50
|
+
readonly messageId: string;
|
|
51
|
+
readonly userMessageId: string;
|
|
52
|
+
readonly userContent: string;
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: 'turn_finished';
|
|
55
|
+
readonly messageId: string;
|
|
56
|
+
readonly outcome: 'complete' | 'cancelled';
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: 'candidate_proposed';
|
|
59
|
+
readonly messageId: string;
|
|
60
|
+
readonly candidateId: string;
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: 'candidate_resolved';
|
|
63
|
+
readonly messageId: string;
|
|
64
|
+
readonly candidateId: string;
|
|
65
|
+
readonly state: CandidateState;
|
|
66
|
+
readonly checkpointId?: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly type: 'checkpoint_restored';
|
|
69
|
+
readonly checkpointId: string;
|
|
70
|
+
readonly contents: ReadonlyArray<{
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly content: string | null;
|
|
73
|
+
}>;
|
|
74
|
+
} | {
|
|
75
|
+
readonly type: 'failed';
|
|
76
|
+
readonly messageId: string;
|
|
77
|
+
readonly error: CopilotError;
|
|
78
|
+
} | {
|
|
79
|
+
readonly type: 'text';
|
|
80
|
+
readonly messageId: string;
|
|
81
|
+
readonly delta: string;
|
|
82
|
+
} | {
|
|
83
|
+
readonly type: 'activity';
|
|
84
|
+
readonly messageId: string;
|
|
85
|
+
readonly label: string;
|
|
86
|
+
} | {
|
|
87
|
+
readonly type: 'step_start';
|
|
88
|
+
readonly messageId: string;
|
|
89
|
+
readonly stepId: string;
|
|
90
|
+
readonly kind: StepKind;
|
|
91
|
+
readonly name?: string;
|
|
92
|
+
readonly label: string;
|
|
93
|
+
readonly description?: string;
|
|
94
|
+
readonly groupId?: string;
|
|
95
|
+
} | {
|
|
96
|
+
readonly type: 'step_end';
|
|
97
|
+
readonly messageId: string;
|
|
98
|
+
readonly stepId: string;
|
|
99
|
+
readonly status: 'complete' | 'error';
|
|
100
|
+
readonly description?: string;
|
|
101
|
+
} | {
|
|
102
|
+
readonly type: 'step_removed';
|
|
103
|
+
readonly messageId: string;
|
|
104
|
+
readonly stepId: string;
|
|
105
|
+
} | {
|
|
106
|
+
readonly type: 'source_changed';
|
|
107
|
+
readonly messageId: string;
|
|
108
|
+
});
|
|
271
109
|
|
|
272
110
|
export declare interface ConversationMessage {
|
|
273
|
-
readonly
|
|
274
|
-
readonly
|
|
275
|
-
readonly
|
|
276
|
-
readonly
|
|
277
|
-
readonly
|
|
278
|
-
readonly
|
|
279
|
-
readonly
|
|
280
|
-
readonly toolName?: string;
|
|
281
|
-
readonly milestoneId?: string;
|
|
282
|
-
readonly created: string;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export declare interface ConversationMessagesPage {
|
|
286
|
-
readonly id: string;
|
|
287
|
-
readonly name: string;
|
|
288
|
-
readonly messages: readonly ConversationMessage[];
|
|
289
|
-
readonly nextCursor: number | null;
|
|
290
|
-
readonly hasMore: boolean;
|
|
291
|
-
readonly totalCount: number;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export declare interface ConversationsPage {
|
|
295
|
-
readonly conversations: readonly Conversation[];
|
|
296
|
-
readonly page: number;
|
|
297
|
-
readonly size: number;
|
|
298
|
-
readonly totalItems: number;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
declare interface ConversationTitleResult {
|
|
302
|
-
readonly type: typeof ResultType.CONVERSATION_TITLE;
|
|
303
|
-
readonly conversationTitle: string;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export declare const CopilotChat: ({ onSendMessage, kapaAiIntegrationId, onStopGeneration, onResetConversation, isBusy, isDisabled, isOpen, emptyStateTitle, emptyStateDescription, suggestions, className, contextItems, onRemoveContext, onSeeVersion, }: CopilotChatProps) => JSX.Element;
|
|
307
|
-
|
|
308
|
-
export declare interface CopilotChatProps {
|
|
309
|
-
readonly kapaAiIntegrationId?: string | null;
|
|
310
|
-
readonly onSendMessage: (message: string) => void;
|
|
311
|
-
readonly onStopGeneration?: () => void;
|
|
312
|
-
readonly onResetConversation?: () => void;
|
|
313
|
-
readonly onLoadConversation?: (conversationId: string) => Promise<void>;
|
|
314
|
-
readonly isBusy?: boolean;
|
|
315
|
-
readonly isOpen?: boolean;
|
|
316
|
-
readonly isDisabled?: boolean;
|
|
317
|
-
readonly emptyStateTitle?: string;
|
|
318
|
-
readonly emptyStateDescription?: ReactNode;
|
|
319
|
-
readonly suggestions?: ReadonlyArray<Suggestion>;
|
|
320
|
-
readonly className?: string;
|
|
321
|
-
readonly contextItems?: ReadonlyArray<ContextItem>;
|
|
322
|
-
readonly onRemoveContext?: (item: ContextItem) => void;
|
|
323
|
-
readonly onSeeVersion?: (milestoneId: string) => void;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export declare const CopilotHeader: ({ onReset, onShowHistory, conversationTitle, view, isBusy, }: CopilotHeaderProps) => JSX.Element;
|
|
327
|
-
|
|
328
|
-
declare interface CopilotHeaderProps {
|
|
329
|
-
onReset?: () => void;
|
|
330
|
-
onShowHistory?: () => void;
|
|
331
|
-
conversationTitle?: string;
|
|
332
|
-
view?: ChatView;
|
|
333
|
-
isBusy?: boolean;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
declare type CopilotMessageType = 'USER' | 'ASSISTANT' | 'TOOL_CALL' | 'TOOL_OUTPUT' | 'SYSTEM';
|
|
337
|
-
|
|
338
|
-
export declare const CopilotSidecar: ({ children, workareaSelector, headerSelector, zIndex, }: CopilotSidecarProps) => JSX.Element;
|
|
339
|
-
|
|
340
|
-
export declare interface CopilotSidecarProps {
|
|
341
|
-
readonly children: (props: SidecarRenderProps) => ReactNode;
|
|
342
|
-
readonly workareaSelector?: string;
|
|
343
|
-
readonly headerSelector?: string;
|
|
344
|
-
readonly zIndex?: number;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export declare interface CopilotToolContext {
|
|
348
|
-
readonly modeler: ModelerAccess;
|
|
349
|
-
readonly files: {
|
|
350
|
-
readonly getContent: (fileId: string) => Promise<string>;
|
|
351
|
-
readonly create: (params: {
|
|
352
|
-
readonly name: string;
|
|
353
|
-
readonly type: string;
|
|
354
|
-
readonly content: string;
|
|
355
|
-
readonly projectId: string;
|
|
356
|
-
readonly folderId: string | null;
|
|
357
|
-
}) => Promise<{
|
|
358
|
-
readonly id: string;
|
|
359
|
-
}>;
|
|
360
|
-
readonly list: (projectId: string) => Promise<ReadonlyArray<FileInfo>>;
|
|
361
|
-
};
|
|
362
|
-
readonly templates: {
|
|
363
|
-
readonly getCustom: () => ReadonlyArray<ElementTemplate>;
|
|
364
|
-
readonly getOotbConnectors: () => ReadonlyArray<ElementTemplate>;
|
|
365
|
-
readonly apply: (elementId: string, templateId: string, version?: number) => unknown;
|
|
366
|
-
};
|
|
367
|
-
readonly form: {
|
|
368
|
-
readonly getContent: () => string | null;
|
|
369
|
-
readonly isAvailable: () => boolean;
|
|
370
|
-
readonly getLintErrors: () => Promise<ReadonlyArray<FormLintError>>;
|
|
371
|
-
readonly importSchema: (content: unknown) => void;
|
|
372
|
-
readonly update: () => Promise<void>;
|
|
373
|
-
readonly getParsedContent: (json: string) => unknown;
|
|
374
|
-
readonly getSchema: () => unknown;
|
|
375
|
-
readonly getSelection: () => unknown;
|
|
376
|
-
};
|
|
377
|
-
readonly dmn: {
|
|
378
|
-
readonly createModdle: () => DmnModdle;
|
|
379
|
-
readonly getModeler: () => DmnModeler;
|
|
380
|
-
};
|
|
381
|
-
readonly feel: {
|
|
382
|
-
readonly validate: (expression: string) => Promise<FeelValidationResult>;
|
|
383
|
-
};
|
|
384
|
-
readonly diagram: {
|
|
385
|
-
readonly isBPMN: () => boolean;
|
|
386
|
-
readonly isDMN: () => boolean;
|
|
387
|
-
readonly canEdit: () => boolean;
|
|
388
|
-
readonly getContent: () => string | null;
|
|
389
|
-
readonly importContent: (xml: string) => Promise<ImportResult>;
|
|
390
|
-
readonly saveContent: () => Promise<void>;
|
|
391
|
-
readonly exportXml: () => Promise<string>;
|
|
392
|
-
readonly getLintErrors: () => Promise<ReadonlyArray<LintError>>;
|
|
393
|
-
readonly getDeploymentErrors: () => ReadonlyArray<unknown>;
|
|
394
|
-
readonly ensureExecutionPlatform: () => void;
|
|
395
|
-
};
|
|
396
|
-
readonly project: {
|
|
397
|
-
readonly resolve: () => ProjectContext;
|
|
398
|
-
};
|
|
111
|
+
readonly messageId: string;
|
|
112
|
+
readonly role: 'user' | 'assistant';
|
|
113
|
+
readonly content: string;
|
|
114
|
+
readonly steps: ReadonlyArray<MessageStep>;
|
|
115
|
+
readonly state?: MessageState;
|
|
116
|
+
readonly candidate?: Candidate;
|
|
117
|
+
readonly error?: CopilotError;
|
|
399
118
|
}
|
|
400
119
|
|
|
401
|
-
export declare
|
|
402
|
-
|
|
403
|
-
export declare const createModelerAccess: ({ getModeler, is, getBusinessObject, }: ModelerAccessOptions) => ModelerAccess;
|
|
404
|
-
|
|
405
|
-
export declare const createWithAutoLayoutAndValidation: (context: CopilotToolContext, layoutProcess: (xml: string) => Promise<string>) => <T extends Record<string, unknown>>(mutationFn: (modeler: BpmnModeler) => T | Promise<T>) => Promise<T & {
|
|
406
|
-
readonly validationErrors: ReadonlyArray<LintError>;
|
|
407
|
-
}>;
|
|
408
|
-
|
|
409
|
-
export declare const createWithValidation: (context: CopilotToolContext) => <T extends Record<string, unknown>>(mutationFn: (modeler: BpmnModeler) => T | Promise<T>) => Promise<T & {
|
|
410
|
-
readonly validationErrors: ReadonlyArray<LintError>;
|
|
411
|
-
}>;
|
|
120
|
+
export declare type ConversationStatus = 'idle' | 'running';
|
|
412
121
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
readonly
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
readonly
|
|
122
|
+
declare interface ConversationStoreState {
|
|
123
|
+
readonly conversationId: string | null;
|
|
124
|
+
readonly revision?: number;
|
|
125
|
+
readonly snapshotRevision?: number;
|
|
126
|
+
readonly status: ConversationStatus | null;
|
|
127
|
+
readonly verificationHealth: VerificationHealth | null;
|
|
128
|
+
readonly sourceChangedMessageId: string | null;
|
|
129
|
+
readonly originArtifact: ArtifactRef | null;
|
|
130
|
+
readonly preview: string;
|
|
131
|
+
readonly pendingCandidate: boolean;
|
|
132
|
+
readonly messages: ReadonlyArray<MessageStoreState>;
|
|
133
|
+
readonly messagesLoaded: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export declare interface ConversationSummary {
|
|
137
|
+
readonly conversationId: string;
|
|
138
|
+
readonly revision?: number;
|
|
139
|
+
readonly status: ConversationStatus;
|
|
140
|
+
readonly originArtifact?: ArtifactRef;
|
|
141
|
+
readonly preview: string;
|
|
142
|
+
readonly pendingCandidate: boolean;
|
|
424
143
|
}
|
|
425
144
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
145
|
+
/**
|
|
146
|
+
* Pipeline probe for the Tailwind v4 precompiled-CSS setup: utilities scoped
|
|
147
|
+
* under `.copilot-chat-root`, one design-system token-based class
|
|
148
|
+
* (`bg-(--primary)`), one DS component. Replaced by real UI later.
|
|
149
|
+
*/
|
|
150
|
+
export declare const CopilotBadge: ({ label }: CopilotBadgeProps) => JSX.Element;
|
|
432
151
|
|
|
433
|
-
declare interface
|
|
434
|
-
|
|
435
|
-
readonly id?: string;
|
|
152
|
+
export declare interface CopilotBadgeProps {
|
|
153
|
+
label: string;
|
|
436
154
|
}
|
|
437
155
|
|
|
438
|
-
declare interface
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
readonly getViews?: () => ReadonlyArray<unknown>;
|
|
442
|
-
readonly saveXML?: (options?: {
|
|
443
|
-
format?: boolean;
|
|
444
|
-
}) => Promise<{
|
|
445
|
-
xml: string;
|
|
156
|
+
export declare interface CopilotClient {
|
|
157
|
+
postMessage(input: PostMessageInput): Promise<{
|
|
158
|
+
conversationId: string;
|
|
446
159
|
}>;
|
|
160
|
+
observe(conversationId: string, onEvent: (event: ConversationEvent) => void, onConnected?: () => void, onError?: (error: Error) => void): () => void;
|
|
161
|
+
getConversation(conversationId: string): Promise<Conversation>;
|
|
162
|
+
listConversations(): Promise<ReadonlyArray<ConversationSummary>>;
|
|
163
|
+
observeConversationList?(onSummary: (summary: ConversationSummary) => void, onConnected?: () => void, onError?: (error: Error) => void): () => void;
|
|
164
|
+
approve(candidateId: string): Promise<void>;
|
|
165
|
+
reject(candidateId: string): Promise<void>;
|
|
166
|
+
restoreCheckpoint(checkpointId: string): Promise<void>;
|
|
167
|
+
cancelTurn(conversationId: string): Promise<void>;
|
|
447
168
|
}
|
|
448
169
|
|
|
449
|
-
declare
|
|
450
|
-
readonly get: (serviceName: string, strict?: boolean) => unknown;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export declare interface ElementTemplate {
|
|
454
|
-
readonly id: string;
|
|
455
|
-
readonly name: string;
|
|
456
|
-
readonly description?: string;
|
|
457
|
-
readonly version: number;
|
|
458
|
-
readonly appliesTo: ReadonlyArray<string>;
|
|
459
|
-
readonly elementType?: string;
|
|
460
|
-
readonly properties?: ReadonlyArray<Record<string, unknown>>;
|
|
461
|
-
readonly groups?: ReadonlyArray<Record<string, unknown>>;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
export declare const EventStatus: {
|
|
465
|
-
readonly IN_PROGRESS: "IN_PROGRESS";
|
|
466
|
-
readonly COMPLETED: "COMPLETED";
|
|
467
|
-
readonly ERROR: "ERROR";
|
|
468
|
-
};
|
|
170
|
+
export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, onOpenProject, onClose, renderReview, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
|
|
469
171
|
|
|
470
|
-
export declare
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
readonly
|
|
474
|
-
readonly
|
|
475
|
-
readonly
|
|
476
|
-
readonly
|
|
477
|
-
readonly
|
|
478
|
-
readonly
|
|
479
|
-
readonly
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
readonly
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
readonly error?: string;
|
|
490
|
-
readonly warnings?: ReadonlyArray<string>;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
export declare interface FileInfo {
|
|
494
|
-
readonly id: string;
|
|
495
|
-
readonly name: string;
|
|
496
|
-
readonly type: string;
|
|
497
|
-
readonly lastModified?: string;
|
|
172
|
+
export declare interface CopilotConversationPanelProps {
|
|
173
|
+
readonly client: CopilotClient;
|
|
174
|
+
readonly conversationId: string | null;
|
|
175
|
+
readonly onConversationStarted?: (conversationId: string) => void;
|
|
176
|
+
readonly onSelectConversation?: (conversationId: string | null) => void;
|
|
177
|
+
readonly projectName?: string;
|
|
178
|
+
readonly projectNameUnavailable?: boolean;
|
|
179
|
+
readonly onOpenProject?: (projectId: string) => void;
|
|
180
|
+
readonly onClose?: () => void;
|
|
181
|
+
readonly renderReview?: (candidate: Candidate, actions: {
|
|
182
|
+
approve: () => Promise<void>;
|
|
183
|
+
reject: () => Promise<void>;
|
|
184
|
+
}) => ReactNode;
|
|
185
|
+
readonly artifacts?: ReadonlyArray<ArtifactRef>;
|
|
186
|
+
readonly suggestions?: ReadonlyArray<string>;
|
|
187
|
+
readonly selectionContext?: {
|
|
188
|
+
readonly projectId: string;
|
|
189
|
+
readonly count: number;
|
|
190
|
+
};
|
|
498
191
|
}
|
|
499
192
|
|
|
500
|
-
export declare interface
|
|
501
|
-
readonly
|
|
193
|
+
export declare interface CopilotError {
|
|
194
|
+
readonly code: CopilotErrorCode;
|
|
502
195
|
readonly message: string;
|
|
503
|
-
readonly
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export declare const getDefaultStatusLabel: (eventType: EventTypeValue, toolName?: string, eventStatus?: EventStatusValue) => string;
|
|
507
|
-
|
|
508
|
-
export declare interface ImportResult {
|
|
509
|
-
readonly error?: unknown;
|
|
196
|
+
readonly traceRef?: string;
|
|
510
197
|
}
|
|
511
198
|
|
|
512
|
-
export declare
|
|
513
|
-
|
|
514
|
-
export declare const isCurrentFileModified: (event: AgentEvent) => boolean;
|
|
515
|
-
|
|
516
|
-
export declare const isLayoutBpmnXmlCompleted: (event: AgentEvent) => boolean;
|
|
517
|
-
|
|
518
|
-
export declare const isToolAllowedWithCapabilities: (tool: {
|
|
519
|
-
readonly requiredCapabilities?: ReadonlyArray<string>;
|
|
520
|
-
}, capabilities: ReadonlyArray<string>) => boolean;
|
|
521
|
-
|
|
522
|
-
export declare const isWriteArtifactCompleted: (event: AgentEvent) => boolean;
|
|
523
|
-
|
|
524
|
-
declare interface KapaAiSearchResult {
|
|
525
|
-
readonly content: string;
|
|
526
|
-
readonly source_url: string;
|
|
527
|
-
readonly title: string;
|
|
528
|
-
readonly source_type: string;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
declare interface KapaToolResult {
|
|
532
|
-
readonly sources: readonly KapaAiSearchResult[];
|
|
533
|
-
}
|
|
199
|
+
export declare type CopilotErrorCode = 'PROVIDER_ERROR' | 'CANCELLED' | 'VALIDATION_FAILED' | 'BUDGET_EXCEEDED' | 'STALE_SOURCE';
|
|
534
200
|
|
|
535
|
-
export {
|
|
201
|
+
export declare const CopilotSidecar: ({ children }: CopilotSidecarProps) => JSX.Element;
|
|
536
202
|
|
|
537
|
-
export declare interface
|
|
538
|
-
readonly
|
|
539
|
-
readonly elementName?: string;
|
|
540
|
-
readonly message: string;
|
|
541
|
-
readonly category: string;
|
|
542
|
-
readonly rule: string;
|
|
543
|
-
readonly documentationUrl?: string;
|
|
203
|
+
export declare interface CopilotSidecarProps {
|
|
204
|
+
readonly children: (props: SidecarRenderProps) => ReactNode;
|
|
544
205
|
}
|
|
545
206
|
|
|
546
|
-
export declare const
|
|
547
|
-
|
|
548
|
-
declare type MarkdownRendererProps = Omit<MarkdownProps, 'children'> & {
|
|
549
|
-
readonly content: string;
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
declare type MessageErrorCallback = (messageId: string, errorMessage: string) => void;
|
|
207
|
+
export declare const createFixtureClient: (options?: FixtureClientOptions) => CopilotClient;
|
|
553
208
|
|
|
554
|
-
export declare
|
|
209
|
+
export declare const createHttpClient: (options: HttpClientOptions) => CopilotClient;
|
|
555
210
|
|
|
556
|
-
export declare
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
readonly type: typeof ResultType.MIXED_TOOL_RESULT;
|
|
564
|
-
readonly toolName: string;
|
|
565
|
-
readonly toolResult: string;
|
|
211
|
+
export declare interface EventSourceLike {
|
|
212
|
+
onmessage: ((message: {
|
|
213
|
+
data: string;
|
|
214
|
+
}) => void) | null;
|
|
215
|
+
onopen?: (() => void) | null;
|
|
216
|
+
onerror?: (() => void) | null;
|
|
217
|
+
close(): void;
|
|
566
218
|
}
|
|
567
219
|
|
|
568
|
-
export declare interface
|
|
569
|
-
readonly
|
|
570
|
-
readonly
|
|
571
|
-
readonly
|
|
572
|
-
readonly get: (id: string) => BpmnElement | undefined;
|
|
573
|
-
readonly getAll: () => ReadonlyArray<BpmnElement>;
|
|
574
|
-
readonly filter: (predicate: (el: BpmnElement) => boolean) => ReadonlyArray<BpmnElement>;
|
|
575
|
-
};
|
|
576
|
-
readonly getModeling: () => unknown;
|
|
577
|
-
readonly getCommandStack: () => unknown;
|
|
578
|
-
readonly getElementFactory: () => unknown;
|
|
579
|
-
readonly getModdle: () => unknown;
|
|
580
|
-
readonly getSelection: () => unknown;
|
|
581
|
-
readonly getElementById: (id: string) => BpmnElement;
|
|
582
|
-
readonly is: (element: unknown, type: string) => boolean;
|
|
583
|
-
readonly getBusinessObject: (element: unknown) => Record<string, unknown>;
|
|
584
|
-
readonly getBpmnRules?: () => unknown;
|
|
220
|
+
export declare interface FixtureClientOptions {
|
|
221
|
+
readonly resolveScript?: (input: PostMessageInput) => FixtureScript;
|
|
222
|
+
readonly originArtifact?: ArtifactRef;
|
|
223
|
+
readonly timing?: FixtureTiming;
|
|
585
224
|
}
|
|
586
225
|
|
|
587
|
-
declare interface
|
|
588
|
-
readonly
|
|
589
|
-
readonly
|
|
590
|
-
readonly
|
|
226
|
+
export declare interface FixtureScript {
|
|
227
|
+
readonly outcome: 'answer' | 'propose' | 'failed' | 'run_forever';
|
|
228
|
+
readonly answer?: string;
|
|
229
|
+
readonly changes?: ReadonlyArray<ArtifactChange>;
|
|
230
|
+
readonly error?: CopilotError;
|
|
231
|
+
readonly stepLabels?: ReadonlyArray<string>;
|
|
591
232
|
}
|
|
592
233
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
readonly
|
|
597
|
-
readonly name: string;
|
|
598
|
-
readonly description: string;
|
|
599
|
-
readonly content: string;
|
|
600
|
-
readonly suggestedCapabilities?: readonly string[];
|
|
234
|
+
declare interface FixtureTiming {
|
|
235
|
+
readonly start: number;
|
|
236
|
+
readonly step: number;
|
|
237
|
+
readonly word: number;
|
|
601
238
|
}
|
|
602
239
|
|
|
603
|
-
export declare interface
|
|
604
|
-
readonly
|
|
605
|
-
readonly
|
|
240
|
+
export declare interface HttpClientOptions {
|
|
241
|
+
readonly baseUrl: string;
|
|
242
|
+
readonly fetch?: typeof fetch;
|
|
243
|
+
readonly eventSource?: new (url: string) => EventSourceLike;
|
|
606
244
|
}
|
|
607
245
|
|
|
608
|
-
export declare
|
|
609
|
-
constructor(message?: string);
|
|
610
|
-
}
|
|
246
|
+
export declare type MessageState = 'streaming' | 'complete' | 'cancelled' | 'failed';
|
|
611
247
|
|
|
612
|
-
export declare interface
|
|
613
|
-
readonly
|
|
248
|
+
export declare interface MessageStep {
|
|
249
|
+
readonly stepId: string;
|
|
250
|
+
readonly kind: StepKind;
|
|
614
251
|
readonly name?: string;
|
|
615
|
-
readonly
|
|
616
|
-
readonly
|
|
617
|
-
readonly
|
|
618
|
-
readonly
|
|
619
|
-
readonly documentation?: {
|
|
620
|
-
readonly url?: string;
|
|
621
|
-
};
|
|
622
|
-
};
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
export declare const ResultType: {
|
|
626
|
-
readonly TOOL_INVOKE: "TOOL_INVOKE";
|
|
627
|
-
readonly MIXED_TOOL_RESULT: "MIXED_TOOL_RESULT";
|
|
628
|
-
readonly CONVERSATION_TITLE: "CONVERSATION_TITLE";
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
export declare type ResultTypeValue = (typeof ResultType)[keyof typeof ResultType];
|
|
632
|
-
|
|
633
|
-
export declare interface RollbackResponse {
|
|
634
|
-
readonly milestoneId: string;
|
|
635
|
-
readonly message: string;
|
|
252
|
+
readonly label: string;
|
|
253
|
+
readonly description?: string;
|
|
254
|
+
readonly groupId?: string;
|
|
255
|
+
readonly status: StepStatus;
|
|
636
256
|
}
|
|
637
257
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
export declare const selectIsBusy: (state: AgentStoreState) => boolean;
|
|
641
|
-
|
|
642
|
-
export declare interface SendMessagePayload {
|
|
643
|
-
readonly conversationId: string;
|
|
258
|
+
declare interface MessageStoreState {
|
|
644
259
|
readonly messageId: string;
|
|
260
|
+
readonly role: 'user' | 'assistant';
|
|
645
261
|
readonly content: string;
|
|
646
|
-
readonly
|
|
647
|
-
readonly
|
|
262
|
+
readonly steps: ReadonlyArray<MessageStep>;
|
|
263
|
+
readonly activity: string | null;
|
|
264
|
+
readonly state: MessageState | null;
|
|
265
|
+
readonly candidate: Candidate | null;
|
|
266
|
+
readonly error: CopilotError | null;
|
|
648
267
|
}
|
|
649
268
|
|
|
650
|
-
export declare const
|
|
269
|
+
export declare const openSidecar: () => void;
|
|
270
|
+
|
|
271
|
+
export declare interface PostMessageInput {
|
|
272
|
+
readonly prompt: string;
|
|
273
|
+
readonly conversationId?: string;
|
|
274
|
+
readonly context?: Record<string, unknown>;
|
|
275
|
+
readonly reapplyCandidateId?: string;
|
|
276
|
+
}
|
|
651
277
|
|
|
652
278
|
export declare interface SidecarRenderProps {
|
|
653
279
|
readonly onMinimize: () => void;
|
|
654
280
|
readonly isOpen: boolean;
|
|
655
281
|
}
|
|
656
282
|
|
|
657
|
-
export declare
|
|
658
|
-
readonly slug: string;
|
|
659
|
-
readonly name: string;
|
|
660
|
-
readonly description: string;
|
|
661
|
-
readonly content: string;
|
|
662
|
-
readonly suggestedCapabilities?: readonly string[];
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
export declare const skillRegistry: {
|
|
666
|
-
register: (skill: SkillDefinition) => void;
|
|
667
|
-
get: (slug: string) => SkillDefinition | undefined;
|
|
668
|
-
getAll: () => readonly SkillDefinition[];
|
|
669
|
-
clear: () => void;
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
declare interface SourceReference {
|
|
673
|
-
readonly content: string;
|
|
674
|
-
readonly sourceUrl: string;
|
|
675
|
-
readonly title: string;
|
|
676
|
-
readonly sourceType: string;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
declare type StatusLabelCallback = (messageId: string, label: string) => void;
|
|
283
|
+
export declare type StepKind = 'reasoning' | 'tool' | 'plan' | 'message';
|
|
680
284
|
|
|
681
|
-
export declare
|
|
682
|
-
readonly label: string;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
declare interface ThinkingBlock {
|
|
686
|
-
readonly id: string;
|
|
687
|
-
readonly content: string;
|
|
688
|
-
readonly label: string;
|
|
689
|
-
readonly isComplete: boolean;
|
|
690
|
-
readonly kind?: ThinkingBlockKind;
|
|
691
|
-
readonly toolName?: string;
|
|
692
|
-
readonly toolStatus?: ToolBlockStatus;
|
|
693
|
-
readonly stepNumber?: number;
|
|
694
|
-
readonly toolArguments?: Record<string, unknown>;
|
|
695
|
-
readonly toolResult?: string;
|
|
696
|
-
readonly description?: string;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
declare type ThinkingBlockKind = 'reasoning' | 'tool' | 'error';
|
|
700
|
-
|
|
701
|
-
export declare const ThinkingIndicator: ({ label, content, isComplete }: ThinkingIndicatorProps) => JSX.Element | null;
|
|
702
|
-
|
|
703
|
-
declare interface ThinkingIndicatorProps {
|
|
704
|
-
readonly label?: string;
|
|
705
|
-
readonly content?: string;
|
|
706
|
-
readonly isComplete: boolean;
|
|
707
|
-
}
|
|
285
|
+
export declare type StepStatus = 'active' | 'complete' | 'error';
|
|
708
286
|
|
|
709
287
|
export declare const toggleSidecar: () => void;
|
|
710
288
|
|
|
711
|
-
declare
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
export declare interface ToolInvokeResult {
|
|
732
|
-
readonly type: typeof ResultType.TOOL_INVOKE;
|
|
733
|
-
readonly toolName: string;
|
|
734
|
-
readonly toolCallId?: string;
|
|
735
|
-
readonly toolArguments: Record<string, unknown>;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
export declare interface ToolRegistration extends ToolDefinition {
|
|
739
|
-
readonly handler: ToolHandler | MixedToolHandler;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
declare interface ToolRegistration_2 extends ToolDefinition {
|
|
743
|
-
readonly handler: ToolHandler_2;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
export declare interface ToolRegistry {
|
|
747
|
-
readonly registerTool: (registration: ToolRegistration_2) => void;
|
|
748
|
-
readonly clear: () => void;
|
|
749
|
-
}
|
|
289
|
+
export declare const useCopilotConversation: ({ client, conversationId, }: UseCopilotConversationOptions) => {
|
|
290
|
+
conversationId: string | null;
|
|
291
|
+
status: ConversationStatus | null;
|
|
292
|
+
originArtifact: ArtifactRef | null;
|
|
293
|
+
messages: readonly MessageStoreState[];
|
|
294
|
+
messagesLoaded: boolean;
|
|
295
|
+
pendingCandidate: boolean;
|
|
296
|
+
isRunning: boolean;
|
|
297
|
+
sourceChangedMessageId: string | null;
|
|
298
|
+
synchronizationError: Error | null;
|
|
299
|
+
verificationWarning: boolean;
|
|
300
|
+
postMessage: (prompt: string) => Promise<string>;
|
|
301
|
+
reapply: (candidateId: string, prompt?: string) => Promise<void>;
|
|
302
|
+
refresh: () => Promise<void>;
|
|
303
|
+
approve: (candidateId: string) => Promise<void>;
|
|
304
|
+
reject: (candidateId: string) => Promise<void>;
|
|
305
|
+
restoreCheckpoint: (checkpointId: string) => Promise<void>;
|
|
306
|
+
cancelTurn: () => Promise<void>;
|
|
307
|
+
};
|
|
750
308
|
|
|
751
|
-
export declare const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
getDisplayName: (name: string) => string | undefined;
|
|
757
|
-
getDescription: (name: string, args: Record<string, unknown>) => string;
|
|
758
|
-
hasCustomDescription: (name: string) => boolean;
|
|
759
|
-
getContentType: (name: string) => ContentType;
|
|
760
|
-
getMixedHandler: (name: string) => MixedToolHandler | undefined;
|
|
761
|
-
getHandler: (name: string) => ToolHandler | undefined;
|
|
762
|
-
executeHandler: (name: string, args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
|
|
763
|
-
getToolsForBackend: () => readonly BackendToolPayload[];
|
|
764
|
-
clear: () => void;
|
|
309
|
+
export declare const useCopilotConversationList: ({ client }: UseCopilotConversationListOptions) => {
|
|
310
|
+
conversations: readonly ConversationStoreState[];
|
|
311
|
+
isLoading: boolean;
|
|
312
|
+
error: Error | null;
|
|
313
|
+
reload: () => Promise<void>;
|
|
765
314
|
};
|
|
766
315
|
|
|
767
|
-
export declare interface
|
|
768
|
-
readonly
|
|
769
|
-
readonly type: 'TOOL_RESULT';
|
|
770
|
-
readonly toolName: string;
|
|
771
|
-
readonly toolCallId?: string;
|
|
772
|
-
readonly toolResult: string;
|
|
773
|
-
readonly contentType: 'TEXT' | 'BPMN' | 'JSON';
|
|
316
|
+
export declare interface UseCopilotConversationListOptions {
|
|
317
|
+
readonly client: CopilotClient;
|
|
774
318
|
}
|
|
775
319
|
|
|
776
|
-
export declare
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
declare type TraverseVisitor = (element: DmnModdleElement) => void | false;
|
|
781
|
-
|
|
782
|
-
declare interface UpdateConversationPayload {
|
|
783
|
-
readonly conversationName: string;
|
|
320
|
+
export declare interface UseCopilotConversationOptions {
|
|
321
|
+
readonly client: CopilotClient;
|
|
322
|
+
readonly conversationId: string | null;
|
|
784
323
|
}
|
|
785
324
|
|
|
786
|
-
export declare const useAgentAdapter: ({ transport, onToolInvoke, getStatusLabel, }: AgentAdapterConfig) => AgentAdapterReturn;
|
|
787
|
-
|
|
788
|
-
export declare const useAgentStore: UseBoundStore<StoreApi<AgentStore>>;
|
|
789
|
-
|
|
790
|
-
export declare const useChatStore: UseBoundStore<StoreApi<ChatStore>>;
|
|
791
|
-
|
|
792
325
|
export declare const useSidecarOpen: () => boolean;
|
|
793
326
|
|
|
327
|
+
/** ISO 8601 provider-verification timestamps for one assistant message, not a terminal state. */
|
|
328
|
+
export declare interface VerificationHealth {
|
|
329
|
+
readonly messageId: string;
|
|
330
|
+
readonly lastVerifiedAt: string | null;
|
|
331
|
+
readonly troubleStartedAt: string | null;
|
|
332
|
+
}
|
|
333
|
+
|
|
794
334
|
export { }
|