@camunda/copilot-chat 0.8.0 → 0.8.1-alpha.1

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/dist/index.d.ts CHANGED
@@ -39,9 +39,13 @@ export declare const closeSidecar: () => void;
39
39
 
40
40
  export declare interface Conversation extends ConversationSummary {
41
41
  readonly messages: ReadonlyArray<ConversationMessage>;
42
+ readonly verificationHealth?: VerificationHealth | null;
43
+ readonly sourceChangedMessageId?: string | null;
42
44
  }
43
45
 
44
46
  export declare type ConversationEvent = {
47
+ readonly revision?: number;
48
+ } & ({
45
49
  readonly type: 'turn_started';
46
50
  readonly messageId: string;
47
51
  readonly userMessageId: string;
@@ -98,7 +102,10 @@ export declare type ConversationEvent = {
98
102
  readonly type: 'step_removed';
99
103
  readonly messageId: string;
100
104
  readonly stepId: string;
101
- };
105
+ } | {
106
+ readonly type: 'source_changed';
107
+ readonly messageId: string;
108
+ });
102
109
 
103
110
  export declare interface ConversationMessage {
104
111
  readonly messageId: string;
@@ -114,7 +121,11 @@ export declare type ConversationStatus = 'idle' | 'running';
114
121
 
115
122
  declare interface ConversationStoreState {
116
123
  readonly conversationId: string | null;
124
+ readonly revision?: number;
125
+ readonly snapshotRevision?: number;
117
126
  readonly status: ConversationStatus | null;
127
+ readonly verificationHealth: VerificationHealth | null;
128
+ readonly sourceChangedMessageId: string | null;
118
129
  readonly originArtifact: ArtifactRef | null;
119
130
  readonly preview: string;
120
131
  readonly pendingCandidate: boolean;
@@ -124,6 +135,7 @@ declare interface ConversationStoreState {
124
135
 
125
136
  export declare interface ConversationSummary {
126
137
  readonly conversationId: string;
138
+ readonly revision?: number;
127
139
  readonly status: ConversationStatus;
128
140
  readonly originArtifact?: ArtifactRef;
129
141
  readonly preview: string;
@@ -145,16 +157,17 @@ export declare interface CopilotClient {
145
157
  postMessage(input: PostMessageInput): Promise<{
146
158
  conversationId: string;
147
159
  }>;
148
- observe(conversationId: string, onEvent: (event: ConversationEvent) => void, onConnected?: () => void): () => void;
160
+ observe(conversationId: string, onEvent: (event: ConversationEvent) => void, onConnected?: () => void, onError?: (error: Error) => void): () => void;
149
161
  getConversation(conversationId: string): Promise<Conversation>;
150
162
  listConversations(): Promise<ReadonlyArray<ConversationSummary>>;
163
+ observeConversationList?(onSummary: (summary: ConversationSummary) => void, onConnected?: () => void, onError?: (error: Error) => void): () => void;
151
164
  approve(candidateId: string): Promise<void>;
152
165
  reject(candidateId: string): Promise<void>;
153
166
  restoreCheckpoint(checkpointId: string): Promise<void>;
154
167
  cancelTurn(conversationId: string): Promise<void>;
155
168
  }
156
169
 
157
- export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, onOpenProject, onClose, renderReview, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
170
+ export declare const CopilotConversationPanel: ({ client, conversationId, onConversationStarted, onSelectConversation, projectName, projectNameUnavailable, readOnlyReason, onOpenProject, onClose, renderReview, artifacts, suggestions, selectionContext, }: CopilotConversationPanelProps) => JSX.Element;
158
171
 
159
172
  export declare interface CopilotConversationPanelProps {
160
173
  readonly client: CopilotClient;
@@ -163,6 +176,7 @@ export declare interface CopilotConversationPanelProps {
163
176
  readonly onSelectConversation?: (conversationId: string | null) => void;
164
177
  readonly projectName?: string;
165
178
  readonly projectNameUnavailable?: boolean;
179
+ readonly readOnlyReason?: string;
166
180
  readonly onOpenProject?: (projectId: string) => void;
167
181
  readonly onClose?: () => void;
168
182
  readonly renderReview?: (candidate: Candidate, actions: {
@@ -200,6 +214,7 @@ export declare interface EventSourceLike {
200
214
  data: string;
201
215
  }) => void) | null;
202
216
  onopen?: (() => void) | null;
217
+ onerror?: (() => void) | null;
203
218
  close(): void;
204
219
  }
205
220
 
@@ -258,6 +273,7 @@ export declare interface PostMessageInput {
258
273
  readonly prompt: string;
259
274
  readonly conversationId?: string;
260
275
  readonly context?: Record<string, unknown>;
276
+ readonly reapplyCandidateId?: string;
261
277
  }
262
278
 
263
279
  export declare interface SidecarRenderProps {
@@ -279,7 +295,11 @@ export declare const useCopilotConversation: ({ client, conversationId, }: UseCo
279
295
  messagesLoaded: boolean;
280
296
  pendingCandidate: boolean;
281
297
  isRunning: boolean;
298
+ sourceChangedMessageId: string | null;
299
+ synchronizationError: Error | null;
300
+ verificationWarning: boolean;
282
301
  postMessage: (prompt: string) => Promise<string>;
302
+ reapply: (candidateId: string, prompt?: string) => Promise<void>;
283
303
  refresh: () => Promise<void>;
284
304
  approve: (candidateId: string) => Promise<void>;
285
305
  reject: (candidateId: string) => Promise<void>;
@@ -290,6 +310,7 @@ export declare const useCopilotConversation: ({ client, conversationId, }: UseCo
290
310
  export declare const useCopilotConversationList: ({ client }: UseCopilotConversationListOptions) => {
291
311
  conversations: readonly ConversationStoreState[];
292
312
  isLoading: boolean;
313
+ error: Error | null;
293
314
  reload: () => Promise<void>;
294
315
  };
295
316
 
@@ -304,4 +325,11 @@ export declare interface UseCopilotConversationOptions {
304
325
 
305
326
  export declare const useSidecarOpen: () => boolean;
306
327
 
328
+ /** ISO 8601 provider-verification timestamps for one assistant message, not a terminal state. */
329
+ export declare interface VerificationHealth {
330
+ readonly messageId: string;
331
+ readonly lastVerifiedAt: string | null;
332
+ readonly troubleStartedAt: string | null;
333
+ }
334
+
307
335
  export { }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as o, a as s, b as t, c as i, d as r, e as n, f as C, o as l, t as c, u as d, g as p, h as u } from "./index-D9bYzhnE.js";
1
+ import { C as o, a as s, b as t, c as i, d as r, e as n, f as C, o as l, t as c, u as d, g as p, h as u } from "./index-CKZtePyt.js";
2
2
  export {
3
3
  o as CandidateReview,
4
4
  s as CopilotBadge,
@@ -0,0 +1,4 @@
1
+ import { p } from "./index-CKZtePyt.js";
2
+ export {
3
+ p as Mermaid
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/copilot-chat",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-alpha.1",
4
4
  "description": "Camunda Copilot Client Library - React components and utilities for Camunda Platform 8",
5
5
  "license": "Camunda License 1.0",
6
6
  "type": "module",
@@ -26,11 +26,7 @@
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
- "files": [
30
- "dist",
31
- "README.md",
32
- "LICENSE"
33
- ],
29
+ "files": ["dist", "README.md", "LICENSE"],
34
30
  "publishConfig": {
35
31
  "access": "public"
36
32
  },
@@ -1,4 +0,0 @@
1
- import { p } from "./index-D9bYzhnE.js";
2
- export {
3
- p as Mermaid
4
- };