@camunda/copilot-chat 0.5.12-alpha.1 → 0.5.12-alpha.11

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.
@@ -0,0 +1,889 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import { layoutProcess } from 'bpmn-auto-layout';
3
+ import { MarkdownProps } from '@carbon/ai-chat-components/es/react/markdown';
4
+ import { ReactNode } from 'react';
5
+ import { StoreApi } from 'zustand';
6
+ import { UseBoundStore } from 'zustand';
7
+
8
+ export declare const adaptBpmnLintErrorsForLlm: (rawLintErrors: ReadonlyArray<RawBpmnLintError>) => ReadonlyArray<LintError>;
9
+
10
+ export declare interface AgentAdapterConfig {
11
+ readonly transport: AgentTransport;
12
+ readonly onToolInvoke?: (toolName: string, args: Record<string, unknown>) => Promise<unknown>;
13
+ readonly getStatusLabel?: (eventType: EventTypeValue, toolName?: string, eventStatus?: EventStatusValue) => string;
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
+ }
34
+
35
+ export declare type AgentResult = ToolInvokeResult | MixedToolResultEvent | ConversationTitleResult;
36
+
37
+ export declare const AgentState: {
38
+ readonly IDLE: "IDLE";
39
+ readonly BUSY: "BUSY";
40
+ readonly AWAITING_TOOL: "AWAITING_TOOL";
41
+ readonly ERROR: "ERROR";
42
+ };
43
+
44
+ export declare type AgentStateType = (typeof AgentState)[keyof typeof AgentState];
45
+
46
+ declare type AgentStore = AgentStoreState & AgentStoreActions & {
47
+ callbacks: AgentStoreCallbacks;
48
+ };
49
+
50
+ declare interface AgentStoreActions {
51
+ readonly startConversation: (conversationId: string, messageId: string) => void;
52
+ readonly processEvent: (event: AgentEvent) => AgentResult | null;
53
+ readonly clearPendingTool: () => void;
54
+ readonly setError: (error: string) => void;
55
+ readonly reset: () => void;
56
+ readonly setCallbacks: (callbacks: AgentStoreCallbacks) => void;
57
+ readonly setConversationId: (conversationId: string) => void;
58
+ }
59
+
60
+ declare interface AgentStoreCallbacks {
61
+ readonly onMessageStatusUpdate?: MessageStatusCallback;
62
+ readonly onStatusLabelClear?: StatusLabelCallback;
63
+ readonly onMessageError?: MessageErrorCallback;
64
+ }
65
+
66
+ declare interface AgentStoreState {
67
+ readonly conversationId: string | null;
68
+ readonly currentMessageId: string | null;
69
+ readonly isBusy: boolean;
70
+ readonly currentEventType: EventTypeValue | null;
71
+ readonly currentToolName: string | null;
72
+ readonly pendingToolInvoke: {
73
+ readonly toolName: string;
74
+ readonly toolCallId?: string;
75
+ readonly toolArguments: Record<string, unknown>;
76
+ } | null;
77
+ readonly error: string | null;
78
+ }
79
+
80
+ export declare interface AgentTransport {
81
+ subscribe(conversationId: string, onEvent: (event: AgentEvent) => void): void;
82
+ unsubscribe(conversationId: string): void;
83
+ sendMessage(payload: SendMessagePayload): Promise<void>;
84
+ sendToolResult(payload: ToolResultPayload): Promise<void>;
85
+ haltConversation?(conversationId: string): Promise<void>;
86
+ updateConversation?(conversationId: string, payload: UpdateConversationPayload): Promise<void>;
87
+ deleteConversation?(conversationId: string): Promise<void>;
88
+ fetchConversations?(page: number, size: number): Promise<ConversationsPage>;
89
+ fetchConversationMessages?(conversationId: string, cursor?: number | null, limit?: number): Promise<ConversationMessagesPage>;
90
+ rollbackConversation?(conversationId: string, milestoneId: string): Promise<RollbackResponse | undefined>;
91
+ registerSkills?(conversationId: string, skills: readonly SkillDefinition[]): Promise<void>;
92
+ }
93
+
94
+ export declare const auditAndRepairSkill: {
95
+ readonly slug: "audit-and-repair";
96
+ readonly name: "Audit and repair";
97
+ 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.";
98
+ readonly suggestedCapabilities: readonly ["BPMN_VIEWING", "BPMN_EDITING"];
99
+ readonly content: string;
100
+ };
101
+
102
+ declare interface BackendToolPayload {
103
+ readonly name: string;
104
+ readonly description: string;
105
+ readonly parameters: Record<string, unknown>;
106
+ readonly category: string;
107
+ }
108
+
109
+ export declare interface BpmnElement {
110
+ readonly id: string;
111
+ readonly type: string;
112
+ readonly businessObject: Record<string, unknown>;
113
+ readonly parent?: BpmnElement;
114
+ readonly incoming?: ReadonlyArray<BpmnElement>;
115
+ readonly outgoing?: ReadonlyArray<BpmnElement>;
116
+ readonly children?: ReadonlyArray<BpmnElement>;
117
+ }
118
+
119
+ export declare const bpmnErrorHandlingSkill: {
120
+ readonly slug: "bpmn-error-handling";
121
+ readonly name: "BPMN Error Handling";
122
+ readonly description: "Error boundary events and error end event patterns for BPMN processes. Activate when the process has service tasks, call activities, or explicit error/failure handling.";
123
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
124
+ readonly content: string;
125
+ };
126
+
127
+ export declare const bpmnGatewayPatternsSkill: {
128
+ readonly slug: "bpmn-gateway-patterns";
129
+ readonly name: "BPMN Gateway Patterns";
130
+ readonly description: "Gateway rules — default flows, condition expression syntax, parallel split/join, event-based gateways. Activate when the process has decision points or parallel work.";
131
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
132
+ readonly content: string;
133
+ };
134
+
135
+ export declare interface BpmnModeler {
136
+ readonly get: (serviceName: string, strict?: boolean) => unknown;
137
+ readonly saveXML: (options?: {
138
+ format?: boolean;
139
+ }) => Promise<{
140
+ xml: string;
141
+ }>;
142
+ }
143
+
144
+ export declare const bpmnModelingBestPracticesSkill: {
145
+ readonly slug: "bpmn-modeling-best-practices";
146
+ readonly name: "BPMN Modeling Best Practices";
147
+ readonly description: "Camunda 8 modeling conventions aligned with the camunda/process-os reference: naming, required Zeebe extensions, signal vs message, waiting states, escalation patterns, XOR gateway data requirements, error handling, SLA reminder pattern, multi-end-event rule. Activate this BEFORE building any non-trivial BPMN process.";
148
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
149
+ readonly content: string;
150
+ };
151
+
152
+ export declare const bpmnTimerSlaSkill: {
153
+ readonly slug: "bpmn-timer-sla";
154
+ readonly name: "BPMN Timer & SLA";
155
+ readonly description: "Timer boundary events, SLA escalation, and ISO 8601 duration expressions. Activate when the process has user tasks with deadlines, approval steps, or any time-based waiting.";
156
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
157
+ readonly content: string;
158
+ };
159
+
160
+ export declare const camundaDocsSearchTool: {
161
+ readonly name: "camunda_docs_search";
162
+ readonly displayName: "Searching docs";
163
+ readonly description: string;
164
+ readonly parameters: {
165
+ readonly type: "object";
166
+ readonly properties: {
167
+ readonly query: {
168
+ readonly type: "string";
169
+ readonly description: "The search query to find information in the Camunda knowledge base";
170
+ };
171
+ };
172
+ readonly required: readonly ["query"];
173
+ };
174
+ readonly type: "frontend";
175
+ readonly contentType: "TEXT";
176
+ readonly category: "GENERAL";
177
+ readonly handler: ToolHandler;
178
+ };
179
+
180
+ export declare interface camundaDocsSearchToolResult {
181
+ readonly answer: string;
182
+ readonly sources: readonly KapaAiSearchResult[];
183
+ }
184
+
185
+ export declare const CAPABILITY: {
186
+ readonly BPMN_EDITING: "BPMN_EDITING";
187
+ readonly FORM_EDITING: "FORM_EDITING";
188
+ readonly DMN_EDITING: "DMN_EDITING";
189
+ readonly FEEL_EDITING: "FEEL_EDITING";
190
+ readonly BPMN_VIEWING: "BPMN_VIEWING";
191
+ readonly FORM_VIEWING: "FORM_VIEWING";
192
+ readonly DMN_VIEWING: "DMN_VIEWING";
193
+ readonly FILE_OPERATIONS: "FILE_OPERATIONS";
194
+ readonly FILE_CREATION: "FILE_CREATION";
195
+ readonly VALIDATION: "VALIDATION";
196
+ readonly INTEGRATION: "INTEGRATION";
197
+ };
198
+
199
+ export declare type Capability = (typeof CAPABILITY)[keyof typeof CAPABILITY];
200
+
201
+ declare interface ChatActions {
202
+ readonly addUserMessage: (content: string) => string;
203
+ readonly addAssistantMessage: (id: string) => void;
204
+ readonly appendToMessage: (id: string, content: string) => void;
205
+ readonly setMessageContent: (id: string, content: string) => void;
206
+ readonly updateMessageStatus: (id: string, status: MessageStatus) => void;
207
+ readonly updateMessageStatusLabel: (id: string, statusLabel: string) => void;
208
+ readonly setMessageSources: (id: string, sources: readonly SourceReference[]) => void;
209
+ readonly setStreaming: (isStreaming: boolean, messageId?: string | null) => void;
210
+ readonly clearMessages: () => void;
211
+ readonly addThinkingBlock: (messageId: string, blockId: string, label: string) => void;
212
+ readonly appendToThinkingBlock: (messageId: string, blockId: string, content: string) => void;
213
+ readonly completeThinkingBlock: (messageId: string, blockId: string) => void;
214
+ readonly completeAllThinkingBlocks: (messageId: string) => void;
215
+ readonly setMessageError: (id: string, errorMessage: string) => void;
216
+ readonly addToolBlock: (messageId: string, blockId: string, toolName: string, stepNumber: number, toolArguments?: Record<string, unknown>) => void;
217
+ readonly updateToolBlockStatus: (messageId: string, blockId: string, status: ToolBlockStatus) => void;
218
+ readonly updateToolBlockResult: (messageId: string, blockId: string, toolResult: string) => void;
219
+ readonly addErrorBlock: (messageId: string, blockId: string, errorMessage: string) => void;
220
+ readonly setView: (view: ChatView_2) => void;
221
+ readonly setConversationTitle: (title: string) => void;
222
+ readonly loadConversation: (messages: readonly ChatMessage_2[], title: string | null) => void;
223
+ readonly prependMessages: (messages: readonly ChatMessage_2[]) => void;
224
+ readonly rollbackToMessage: (messageId: string) => void;
225
+ readonly addRollbackMessage: (content: string, milestoneId: string) => void;
226
+ readonly setLastAssistantMessageMilestone: (milestoneId: string) => void;
227
+ readonly setLastUserMessageMilestone: (milestoneId: string) => void;
228
+ }
229
+
230
+ export declare const ChatInput: ({ onSend, onStop, isBusy, isDisabled, placeholder, isOpen, }: ChatInputProps) => JSX.Element;
231
+
232
+ declare interface ChatInputProps {
233
+ readonly onSend: (message: string) => void;
234
+ readonly onStop?: () => void;
235
+ readonly isBusy?: boolean;
236
+ readonly isDisabled?: boolean;
237
+ readonly placeholder?: string;
238
+ readonly isOpen?: boolean;
239
+ }
240
+
241
+ export declare const ChatMessage: ({ message, isBusy }: ChatMessageProps) => JSX.Element;
242
+
243
+ declare interface ChatMessage_2 {
244
+ readonly id: string;
245
+ readonly role: MessageRole;
246
+ readonly content: string;
247
+ readonly status: MessageStatus;
248
+ readonly timestamp?: number;
249
+ readonly statusLabel?: string;
250
+ readonly thinkingBlocks?: readonly ThinkingBlock[];
251
+ readonly sources?: readonly SourceReference[];
252
+ readonly milestoneId?: string;
253
+ }
254
+ export { ChatMessage_2 as ChatMessageInterface }
255
+ export { ChatMessage_2 as ChatMessageType }
256
+
257
+ export declare const ChatMessageList: ({ messages, emptyStateTitle, emptyStateDescription, suggestions, onSuggestionClick, onRollback, onSeeVersion, isBusy, hasOlderMessages, isLoadingOlderMessages, onLoadOlderMessages, }: ChatMessageListProps) => JSX.Element;
258
+
259
+ declare interface ChatMessageListProps {
260
+ readonly messages: readonly ChatMessage_2[];
261
+ readonly emptyStateTitle?: string;
262
+ readonly emptyStateDescription?: ReactNode;
263
+ readonly suggestions?: readonly Suggestion[];
264
+ readonly onSuggestionClick?: (suggestion: Suggestion) => void;
265
+ readonly onRollback?: (milestoneId: string) => void;
266
+ readonly onSeeVersion?: (milestoneId: string) => void;
267
+ readonly isBusy?: boolean;
268
+ readonly hasOlderMessages?: boolean;
269
+ readonly isLoadingOlderMessages?: boolean;
270
+ readonly onLoadOlderMessages?: () => void;
271
+ }
272
+
273
+ declare interface ChatMessageProps {
274
+ readonly message: ChatMessage_2;
275
+ readonly isBusy?: boolean;
276
+ }
277
+
278
+ declare interface ChatState {
279
+ readonly view: ChatView_2;
280
+ readonly messages: readonly ChatMessage_2[];
281
+ readonly isStreaming: boolean;
282
+ readonly streamingMessageId: string | null;
283
+ readonly currentThinkingBlockId: string | null;
284
+ readonly conversationTitle: string | null;
285
+ }
286
+
287
+ declare type ChatStore = ChatState & ChatActions;
288
+
289
+ declare type ChatView = 'chat' | 'history';
290
+
291
+ declare type ChatView_2 = 'chat' | 'history';
292
+
293
+ export declare const closeSidecar: () => void;
294
+
295
+ export declare type ContentType = 'TEXT' | 'BPMN';
296
+
297
+ export declare interface ContextItem {
298
+ readonly id?: string;
299
+ readonly label: string;
300
+ readonly type?: 'default' | 'skill';
301
+ }
302
+
303
+ export declare interface Conversation {
304
+ readonly id: string;
305
+ readonly name: string;
306
+ readonly created: string;
307
+ readonly updated: string;
308
+ }
309
+
310
+ export declare interface ConversationMessage {
311
+ readonly id: string;
312
+ readonly type: CopilotMessageType;
313
+ readonly message?: string;
314
+ readonly feel?: string;
315
+ readonly artifactXml?: string;
316
+ readonly artifactJson?: string;
317
+ readonly toolCallId?: string;
318
+ readonly toolName?: string;
319
+ readonly milestoneId?: string;
320
+ readonly created: string;
321
+ }
322
+
323
+ export declare interface ConversationMessagesPage {
324
+ readonly id: string;
325
+ readonly name: string;
326
+ readonly messages: readonly ConversationMessage[];
327
+ readonly nextCursor: number | null;
328
+ readonly hasMore: boolean;
329
+ readonly totalCount: number;
330
+ }
331
+
332
+ export declare interface ConversationsPage {
333
+ readonly conversations: readonly Conversation[];
334
+ readonly page: number;
335
+ readonly size: number;
336
+ readonly totalItems: number;
337
+ }
338
+
339
+ declare interface ConversationTitleResult {
340
+ readonly type: typeof ResultType.CONVERSATION_TITLE;
341
+ readonly conversationTitle: string;
342
+ }
343
+
344
+ export declare const CopilotChat: ({ onSendMessage, kapaAiIntegrationId, onStopGeneration, onResetConversation, isBusy, isDisabled, isOpen, emptyStateTitle, emptyStateDescription, suggestions, className, contextItems, onRemoveContext, onSeeVersion, showSkillPicker, }: CopilotChatProps) => JSX.Element;
345
+
346
+ export declare interface CopilotChatProps {
347
+ readonly kapaAiIntegrationId?: string | null;
348
+ readonly onSendMessage: (message: string) => void;
349
+ readonly onStopGeneration?: () => void;
350
+ readonly onResetConversation?: () => void;
351
+ readonly onLoadConversation?: (conversationId: string) => Promise<void>;
352
+ readonly isBusy?: boolean;
353
+ readonly isOpen?: boolean;
354
+ readonly isDisabled?: boolean;
355
+ readonly emptyStateTitle?: string;
356
+ readonly emptyStateDescription?: ReactNode;
357
+ readonly suggestions?: ReadonlyArray<Suggestion>;
358
+ readonly className?: string;
359
+ readonly contextItems?: ReadonlyArray<ContextItem>;
360
+ readonly onRemoveContext?: (item: ContextItem) => void;
361
+ readonly onSeeVersion?: (milestoneId: string) => void;
362
+ readonly showSkillPicker?: boolean;
363
+ }
364
+
365
+ export declare const CopilotHeader: ({ onReset, onShowHistory, conversationTitle, view, isBusy, }: CopilotHeaderProps) => JSX.Element;
366
+
367
+ declare interface CopilotHeaderProps {
368
+ onReset?: () => void;
369
+ onShowHistory?: () => void;
370
+ conversationTitle?: string;
371
+ view?: ChatView;
372
+ isBusy?: boolean;
373
+ }
374
+
375
+ declare type CopilotMessageType = 'USER' | 'ASSISTANT' | 'TOOL_CALL' | 'TOOL_OUTPUT' | 'SYSTEM';
376
+
377
+ export declare const CopilotSidecar: ({ children, workareaSelector, headerSelector, zIndex }: CopilotSidecarProps) => JSX.Element;
378
+
379
+ export declare interface CopilotSidecarProps {
380
+ readonly children: (props: SidecarRenderProps) => ReactNode;
381
+ readonly workareaSelector?: string;
382
+ readonly headerSelector?: string;
383
+ readonly zIndex?: number;
384
+ }
385
+
386
+ export declare interface CopilotToolContext {
387
+ readonly modeler: ModelerAccess;
388
+ readonly files: {
389
+ readonly getContent: (fileId: string) => Promise<string>;
390
+ readonly create: (params: {
391
+ readonly name: string;
392
+ readonly type: string;
393
+ readonly content: string;
394
+ readonly projectId: string;
395
+ readonly folderId: string | null;
396
+ }) => Promise<{
397
+ readonly id: string;
398
+ }>;
399
+ readonly list: (projectId: string) => Promise<ReadonlyArray<FileInfo>>;
400
+ };
401
+ readonly templates: {
402
+ readonly getCustom: () => ReadonlyArray<ElementTemplate>;
403
+ readonly getOotbConnectors: () => ReadonlyArray<ElementTemplate>;
404
+ readonly apply: (elementId: string, templateId: string, version?: number) => unknown;
405
+ };
406
+ readonly form: {
407
+ readonly getContent: () => string | null;
408
+ readonly isAvailable: () => boolean;
409
+ readonly getLintErrors: () => Promise<ReadonlyArray<FormLintError>>;
410
+ readonly importSchema: (content: unknown) => void;
411
+ readonly update: () => Promise<void>;
412
+ readonly getParsedContent: (json: string) => unknown;
413
+ readonly getSchema: () => unknown;
414
+ readonly getSelection: () => unknown;
415
+ };
416
+ readonly dmn: {
417
+ readonly createModdle: () => DmnModdle;
418
+ readonly getModeler: () => DmnModeler;
419
+ };
420
+ readonly feel: {
421
+ readonly validate: (expression: string) => Promise<FeelValidationResult>;
422
+ };
423
+ readonly diagram: {
424
+ readonly isBPMN: () => boolean;
425
+ readonly isDMN: () => boolean;
426
+ readonly canEdit: () => boolean;
427
+ readonly getContent: () => string | null;
428
+ readonly importContent: (xml: string) => Promise<ImportResult>;
429
+ readonly saveContent: () => Promise<void>;
430
+ readonly exportXml: () => Promise<string>;
431
+ readonly getLintErrors: () => Promise<ReadonlyArray<LintError>>;
432
+ readonly getDeploymentErrors: () => ReadonlyArray<unknown>;
433
+ readonly ensureExecutionPlatform: () => void;
434
+ };
435
+ readonly project: {
436
+ readonly resolve: () => ProjectContext;
437
+ };
438
+ }
439
+
440
+ export declare const createAllTools: (context: CopilotToolContext) => ReadonlyArray<ToolRegistration_2>;
441
+
442
+ export declare const createModelerAccess: ({ getModeler, is, getBusinessObject }: ModelerAccessOptions) => ModelerAccess;
443
+
444
+ export declare const createWithAutoLayoutAndValidation: (context: CopilotToolContext, layoutProcess: (xml: string) => Promise<string>) => <T extends Record<string, unknown>>(mutationFn: (modeler: BpmnModeler) => T | Promise<T>) => Promise<T & {
445
+ readonly validationErrors: ReadonlyArray<LintError>;
446
+ }>;
447
+
448
+ export declare const createWithValidation: (context: CopilotToolContext) => <T extends Record<string, unknown>>(mutationFn: (modeler: BpmnModeler) => T | Promise<T>) => Promise<T & {
449
+ readonly validationErrors: ReadonlyArray<LintError>;
450
+ }>;
451
+
452
+ export declare type DescriptionFormatter = (args: Record<string, unknown>) => string;
453
+
454
+ export declare const discoverySkill: {
455
+ readonly slug: "discovery";
456
+ readonly name: "Discovery";
457
+ 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.";
458
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
459
+ readonly content: string;
460
+ };
461
+
462
+ declare interface DmnDefinitions extends DmnModdleElement {
463
+ readonly $model: {
464
+ readonly toXML: (definitions: DmnDefinitions, options?: {
465
+ format?: boolean;
466
+ }) => Promise<{
467
+ xml: string;
468
+ }>;
469
+ };
470
+ readonly drgElement?: ReadonlyArray<DmnModdleElement>;
471
+ }
472
+
473
+ declare interface DmnModdle {
474
+ readonly fromXML: (xml: string) => Promise<{
475
+ rootElement: DmnDefinitions;
476
+ }>;
477
+ readonly create: (type: string, properties: Record<string, unknown>) => DmnModdleElement;
478
+ }
479
+
480
+ declare interface DmnModdleElement extends Record<string, unknown> {
481
+ readonly $type: string;
482
+ readonly id?: string;
483
+ }
484
+
485
+ declare interface DmnModeler {
486
+ readonly get: (serviceName: string, strict?: boolean) => unknown;
487
+ readonly getActiveViewer?: () => DmnViewer | null;
488
+ readonly getViews?: () => ReadonlyArray<unknown>;
489
+ readonly saveXML?: (options?: {
490
+ format?: boolean;
491
+ }) => Promise<{
492
+ xml: string;
493
+ }>;
494
+ }
495
+
496
+ declare interface DmnViewer {
497
+ readonly get: (serviceName: string, strict?: boolean) => unknown;
498
+ }
499
+
500
+ export declare interface ElementTemplate {
501
+ readonly id: string;
502
+ readonly name: string;
503
+ readonly description?: string;
504
+ readonly version: number;
505
+ readonly appliesTo: ReadonlyArray<string>;
506
+ readonly elementType?: string;
507
+ readonly properties?: ReadonlyArray<Record<string, unknown>>;
508
+ readonly groups?: ReadonlyArray<Record<string, unknown>>;
509
+ }
510
+
511
+ export declare const EventStatus: {
512
+ readonly IN_PROGRESS: "IN_PROGRESS";
513
+ readonly COMPLETED: "COMPLETED";
514
+ readonly ERROR: "ERROR";
515
+ };
516
+
517
+ export declare type EventStatusValue = (typeof EventStatus)[keyof typeof EventStatus];
518
+
519
+ export declare const EventType: {
520
+ readonly THINKING: "THINKING";
521
+ readonly EXECUTION_PLAN: "EXECUTION_PLAN";
522
+ readonly TOOL_PLANNING: "TOOL_PLANNING";
523
+ readonly TOOL_INVOKE: "TOOL_INVOKE";
524
+ readonly EXTERNAL_TOOL_CALL: "EXTERNAL_TOOL_CALL";
525
+ readonly TOOL_RESULT: "TOOL_RESULT";
526
+ readonly EXECUTION_COMPLETE: "EXECUTION_COMPLETE";
527
+ readonly ERROR: "ERROR";
528
+ readonly CONVERSATION_TITLE: "CONVERSATION_TITLE";
529
+ };
530
+
531
+ export declare type EventTypeValue = (typeof EventType)[keyof typeof EventType];
532
+
533
+ export declare const feelReferenceSkill: {
534
+ readonly slug: "feel-reference";
535
+ readonly name: "FEEL Language Reference";
536
+ readonly description: "Full FEEL language reference — operators, 20 most-used built-ins, date/time arithmetic, null safety, multi-entry context. Activate when writing non-trivial FEEL expressions.";
537
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
538
+ readonly content: string;
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;
605
+ }
606
+
607
+ export declare const MarkdownRenderer: ({ content, streaming, highlight, ...rest }: MarkdownRendererProps) => JSX.Element | null;
608
+
609
+ declare type MarkdownRendererProps = Omit<MarkdownProps, 'children'> & {
610
+ readonly content: string;
611
+ };
612
+
613
+ declare type MessageErrorCallback = (messageId: string, errorMessage: string) => void;
614
+
615
+ export declare type MessageRole = 'user' | 'assistant';
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>;
652
+ }
653
+
654
+ export declare const openSidecar: () => void;
655
+
656
+ export declare const planThenBuildSkill: {
657
+ readonly slug: "plan-then-build";
658
+ readonly name: "Plan then build";
659
+ readonly description: "Plan a BPMN process before any mutation; lock in the topology and build iteratively.";
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;
697
+ }
698
+
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
+ export declare interface SidecarRenderProps {
714
+ readonly onMinimize: () => void;
715
+ readonly isOpen: boolean;
716
+ }
717
+
718
+ export declare interface SkillDefinition {
719
+ readonly slug: string;
720
+ readonly name: string;
721
+ readonly description: string;
722
+ readonly content: string;
723
+ readonly suggestedCapabilities?: readonly Capability[];
724
+ }
725
+
726
+ export declare const SkillPicker: () => JSX.Element | null;
727
+
728
+ export declare const skillRegistry: {
729
+ register: (skill: SkillDefinition) => void;
730
+ get: (slug: string) => SkillDefinition | undefined;
731
+ getAll: () => readonly SkillDefinition[];
732
+ clear: () => void;
733
+ };
734
+
735
+ declare type SkillStore = SkillStoreState & SkillStoreActions;
736
+
737
+ declare interface SkillStoreActions {
738
+ readonly addActiveSkill: (skill: SkillDefinition) => void;
739
+ readonly removeActiveSkill: (slug: string) => void;
740
+ readonly setActiveSkills: (skills: readonly SkillDefinition[]) => void;
741
+ readonly clearActiveSkills: () => void;
742
+ }
743
+
744
+ declare interface SkillStoreState {
745
+ readonly activeSkills: readonly SkillDefinition[];
746
+ }
747
+
748
+ declare interface SourceReference {
749
+ readonly content: string;
750
+ readonly sourceUrl: string;
751
+ readonly title: string;
752
+ readonly sourceType: string;
753
+ }
754
+
755
+ declare type StatusLabelCallback = (messageId: string, label: string) => void;
756
+
757
+ export declare interface Suggestion {
758
+ readonly label: string;
759
+ }
760
+
761
+ declare interface ThinkingBlock {
762
+ readonly id: string;
763
+ readonly content: string;
764
+ readonly label: string;
765
+ readonly isComplete: boolean;
766
+ readonly kind?: ThinkingBlockKind;
767
+ readonly toolName?: string;
768
+ readonly toolStatus?: ToolBlockStatus;
769
+ readonly stepNumber?: number;
770
+ readonly toolArguments?: Record<string, unknown>;
771
+ readonly toolResult?: string;
772
+ readonly description?: string;
773
+ }
774
+
775
+ declare type ThinkingBlockKind = 'reasoning' | 'tool' | 'error';
776
+
777
+ export declare const ThinkingIndicator: ({ label, completedLabel, content, isComplete, }: ThinkingIndicatorProps) => JSX.Element | null;
778
+
779
+ declare interface ThinkingIndicatorProps {
780
+ readonly label?: string;
781
+ readonly completedLabel?: string;
782
+ readonly content?: string;
783
+ readonly isComplete: boolean;
784
+ }
785
+
786
+ export declare const toggleSidecar: () => void;
787
+
788
+ declare type ToolBlockStatus = 'success' | 'processing' | 'error';
789
+
790
+ export declare type ToolCategory = 'BPMN_CORE' | 'BPMN_MODIFICATION' | 'BPMN_QUERY' | 'DMN_QUERY' | 'DMN_MODIFICATION' | 'FEEL_CORE' | 'FORM_CORE' | 'INTEGRATION' | 'FILE_OPERATION' | 'GENERAL';
791
+
792
+ export declare interface ToolDefinition {
793
+ readonly name: string;
794
+ readonly description: string;
795
+ readonly parameters: Record<string, unknown>;
796
+ readonly type: ToolType;
797
+ readonly contentType: ContentType;
798
+ readonly category: ToolCategory;
799
+ readonly requiredCapabilities?: ReadonlyArray<string>;
800
+ readonly displayName?: string;
801
+ readonly descriptionFormatter?: DescriptionFormatter;
802
+ }
803
+
804
+ export declare type ToolHandler = (args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
805
+
806
+ declare type ToolHandler_2 = (args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
807
+
808
+ export declare interface ToolInvokeResult {
809
+ readonly type: typeof ResultType.TOOL_INVOKE;
810
+ readonly toolName: string;
811
+ readonly toolCallId?: string;
812
+ readonly toolArguments: Record<string, unknown>;
813
+ }
814
+
815
+ export declare interface ToolRegistration extends ToolDefinition {
816
+ readonly handler: ToolHandler | MixedToolHandler;
817
+ }
818
+
819
+ declare interface ToolRegistration_2 extends ToolDefinition {
820
+ readonly handler: ToolHandler_2;
821
+ }
822
+
823
+ export declare interface ToolRegistry {
824
+ readonly registerTool: (registration: ToolRegistration_2) => void;
825
+ readonly clear: () => void;
826
+ }
827
+
828
+ export declare const toolRegistry: {
829
+ registerTool: (registration: ToolRegistration) => void;
830
+ has: (name: string) => boolean;
831
+ hasHandler: (name: string) => boolean;
832
+ isMixed: (name: string) => boolean;
833
+ getDisplayName: (name: string) => string | undefined;
834
+ getDescription: (name: string, args: Record<string, unknown>) => string;
835
+ hasCustomDescription: (name: string) => boolean;
836
+ getContentType: (name: string) => ContentType;
837
+ getMixedHandler: (name: string) => MixedToolHandler | undefined;
838
+ getHandler: (name: string) => ToolHandler | undefined;
839
+ executeHandler: (name: string, args: Record<string, unknown>, onError: (toolName: string, error: Error) => void) => Promise<unknown>;
840
+ getToolsForBackend: () => readonly BackendToolPayload[];
841
+ clear: () => void;
842
+ };
843
+
844
+ export declare interface ToolResultPayload {
845
+ readonly conversationId: string;
846
+ readonly type: 'TOOL_RESULT';
847
+ readonly toolName: string;
848
+ readonly toolCallId?: string;
849
+ readonly toolResult: string;
850
+ readonly contentType: 'TEXT' | 'BPMN' | 'JSON';
851
+ }
852
+
853
+ export declare type ToolType = 'frontend' | 'mixed';
854
+
855
+ export declare const topologyClassifierSkill: {
856
+ readonly slug: "topology-classifier";
857
+ readonly name: "Topology classifier";
858
+ 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.";
859
+ readonly suggestedCapabilities: readonly ["BPMN_VIEWING", "BPMN_EDITING"];
860
+ readonly content: string;
861
+ };
862
+
863
+ export declare const traverseModdle: (root: DmnModdleElement | Record<string, unknown>, visitor: TraverseVisitor) => void;
864
+
865
+ declare type TraverseVisitor = (element: DmnModdleElement) => void | false;
866
+
867
+ declare interface UpdateConversationPayload {
868
+ readonly conversationName: string;
869
+ }
870
+
871
+ export declare const useAgentAdapter: ({ transport, onToolInvoke, getStatusLabel, }: AgentAdapterConfig) => AgentAdapterReturn;
872
+
873
+ export declare const useAgentStore: UseBoundStore<StoreApi<AgentStore>>;
874
+
875
+ export declare const useChatStore: UseBoundStore<StoreApi<ChatStore>>;
876
+
877
+ export declare const useSidecarOpen: () => boolean;
878
+
879
+ export declare const useSkillStore: UseBoundStore<StoreApi<SkillStore>>;
880
+
881
+ export declare const zeebeTaskConfigurationSkill: {
882
+ readonly slug: "zeebe-task-configuration";
883
+ readonly name: "Zeebe Task Configuration";
884
+ readonly description: "Zeebe extension element patterns for service tasks, user tasks, and business rule tasks — taskDefinition, assignmentDefinition, formDefinition, ioMapping. Activate when configuring any task.";
885
+ readonly suggestedCapabilities: readonly ["BPMN_EDITING"];
886
+ readonly content: string;
887
+ };
888
+
889
+ export { }