@camunda/copilot-chat 0.0.0-alpha4 → 0.0.0-alpha7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/copilot-chat",
3
- "version": "0.0.0-alpha4",
3
+ "version": "0.0.0-alpha7",
4
4
  "description": "Camunda Copilot Client Library - React components and utilities for Camunda Platform 8",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -44,6 +44,7 @@
44
44
  "npm": ">=9.0.0"
45
45
  },
46
46
  "dependencies": {
47
+ "@carbon/ai-chat-components": "^0.5.0",
47
48
  "@carbon/react": "1.95.0",
48
49
  "@carbon/styles": "^1.68.0",
49
50
  "react-markdown": "^9.0.1",
@@ -0,0 +1,26 @@
1
+ import { AgentStateType, AgentEvent, AgentResult, FrontendTool, EventTypeValue } from '../types/agentTypes';
2
+ interface AgentStoreState {
3
+ readonly conversationId: string | null;
4
+ readonly currentMessageId: string | null;
5
+ readonly activeEvents: ReadonlySet<EventTypeValue>;
6
+ readonly pendingToolInvoke: {
7
+ readonly toolName: string;
8
+ readonly toolArguments: Record<string, unknown>;
9
+ } | null;
10
+ readonly frontendToolNames: ReadonlySet<string>;
11
+ readonly error: string | null;
12
+ }
13
+ interface AgentStoreActions {
14
+ readonly startConversation: (conversationId: string, messageId: string) => void;
15
+ readonly setFrontendTools: (tools: readonly FrontendTool[]) => void;
16
+ readonly processEvent: (event: AgentEvent) => AgentResult | null;
17
+ readonly clearPendingTool: () => void;
18
+ readonly setError: (error: string) => void;
19
+ readonly reset: () => void;
20
+ }
21
+ type AgentStore = AgentStoreState & AgentStoreActions;
22
+ export declare const selectAgentState: (state: AgentStoreState) => AgentStateType;
23
+ export declare const selectIsBusy: (state: AgentStoreState) => boolean;
24
+ export declare const useAgentStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AgentStore>>;
25
+ export {};
26
+ //#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,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAsBtD,eAAO,MAAM,gBAAgB,GAAI,OAAO,eAAe,KAAG,cACkB,CAAC;AAE7E,eAAO,MAAM,YAAY,GAAI,OAAO,eAAe,KAAG,OAKrD,CAAC;AAOF,eAAO,MAAM,aAAa,yEA+HvB,CAAC"}
@@ -10,7 +10,7 @@ interface ChatActions {
10
10
  readonly appendToMessage: (id: string, content: string) => void;
11
11
  readonly setMessageContent: (id: string, content: string) => void;
12
12
  readonly updateMessageStatus: (id: string, status: MessageStatus) => void;
13
- readonly updateMessageEventType: (id: string, eventType: string, toolName?: string) => void;
13
+ readonly updateMessageStatusLabel: (id: string, statusLabel: string) => void;
14
14
  readonly setStreaming: (isStreaming: boolean, messageId?: string | null) => void;
15
15
  readonly clearMessages: () => void;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chatStore.d.ts","sourceRoot":"","sources":["../../src/store/chatStore.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,SAAS;IACjB,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,QAAQ,CAAC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,QAAQ,CAAC,m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AE,aAAa,KAAK,IAAI,CAAC;IAC1E,QAAQ,CAAC,wBAAwB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7E,QAAQ,CAAC,YAAY,EAAE,CACrB,WAAW,EAAE,OAAO,EACpB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,KACtB,IAAI,CAAC;IACV,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAKzC,eAAO,MAAM,YAAY,wEAyFtB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { useChatStore } from './chatStore';
2
+ export { useAgentStore, selectIsBusy, selectAgentState } from './agentStore';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,64 +1,46 @@
1
- export declare const AgentEventType: {
1
+ export declare const AgentState: {
2
+ readonly IDLE: "IDLE";
3
+ readonly BUSY: "BUSY";
4
+ readonly AWAITING_TOOL: "AWAITING_TOOL";
5
+ readonly ERROR: "ERROR";
6
+ };
7
+ export type AgentStateType = (typeof AgentState)[keyof typeof AgentState];
8
+ export declare const EventType: {
2
9
  readonly THINKING: "THINKING";
3
10
  readonly EXECUTION_PLAN: "EXECUTION_PLAN";
4
11
  readonly TOOL_PLANNING: "TOOL_PLANNING";
5
12
  readonly TOOL_INVOKE: "TOOL_INVOKE";
6
13
  readonly TOOL_RESULT: "TOOL_RESULT";
7
14
  };
8
- export type AgentEventTypeValue = (typeof AgentEventType)[keyof typeof AgentEventType];
9
- export declare const AgentEventStatus: {
15
+ export type EventTypeValue = (typeof EventType)[keyof typeof EventType];
16
+ export declare const EventStatus: {
10
17
  readonly IN_PROGRESS: "IN_PROGRESS";
11
18
  readonly COMPLETED: "COMPLETED";
12
19
  readonly ERROR: "ERROR";
13
20
  };
14
- export type AgentEventStatusValue = (typeof AgentEventStatus)[keyof typeof AgentEventStatus];
21
+ export type EventStatusValue = (typeof EventStatus)[keyof typeof EventStatus];
22
+ export declare const ResultType: {
23
+ readonly TOOL_INVOKE: "TOOL_INVOKE";
24
+ };
25
+ export type ResultTypeValue = (typeof ResultType)[keyof typeof ResultType];
15
26
  export interface AgentEvent {
16
27
  readonly conversationId: string;
17
- readonly type: AgentEventTypeValue;
18
- readonly status: AgentEventStatusValue;
28
+ readonly type: EventTypeValue;
29
+ readonly status: EventStatusValue;
19
30
  readonly content?: string;
20
31
  readonly toolName?: string;
21
32
  readonly toolArguments?: string;
22
33
  readonly toolResult?: string;
23
34
  }
24
- export interface FrontendToolSpecification {
35
+ export interface ToolInvokeResult {
36
+ readonly type: typeof ResultType.TOOL_INVOKE;
37
+ readonly toolName: string;
38
+ readonly toolArguments: Record<string, unknown>;
39
+ }
40
+ export type AgentResult = ToolInvokeResult;
41
+ export interface FrontendTool {
25
42
  readonly name: string;
26
43
  readonly description: string;
27
44
  readonly parametersSchema: string;
28
45
  }
29
- export type ToolInvokeHandler = (toolName: string, toolArguments: Record<string, unknown>) => Promise<string | Record<string, unknown>>;
30
- export declare const ToolResultContentType: {
31
- readonly TEXT: "TEXT";
32
- readonly BPMN: "BPMN";
33
- readonly JSON: "JSON";
34
- };
35
- export type ToolResultContentTypeValue = (typeof ToolResultContentType)[keyof typeof ToolResultContentType];
36
- export interface AgentInvokeRequest {
37
- readonly conversationId: string;
38
- readonly messageId: string;
39
- readonly content: string;
40
- readonly frontendTools?: FrontendToolSpecification[];
41
- }
42
- export interface ContinueWithToolResultRequest {
43
- readonly conversationId: string;
44
- readonly toolName: string;
45
- readonly toolResult: string;
46
- readonly contentType?: ToolResultContentTypeValue;
47
- }
48
- export interface AgentResponse {
49
- readonly type: 'complete' | 'toolInvoke';
50
- readonly content?: string;
51
- readonly toolName?: string;
52
- readonly toolArguments?: Record<string, unknown>;
53
- }
54
- export interface CopilotAgentConfig {
55
- readonly apiBaseUrl: string;
56
- readonly converseEndpoint?: string;
57
- readonly continueEndpoint?: string;
58
- readonly timeout?: number;
59
- readonly getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
60
- readonly subscribeToEvents: (conversationId: string, onEvent: (event: AgentEvent) => void) => () => void;
61
- readonly frontendTools?: FrontendToolSpecification[];
62
- readonly onToolInvoke?: ToolInvokeHandler;
63
- }
64
46
  //# sourceMappingURL=agentTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentTypes.d.ts","sourceRoot":"","sources":["../../src/types/agentTypes.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAA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AAC,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,UAAU,CAAC,WAAW,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AAED,MAAM,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC"}
@@ -6,8 +6,7 @@ export interface ChatMessage {
6
6
  readonly content: string;
7
7
  readonly status: MessageStatus;
8
8
  readonly timestamp: number;
9
- readonly eventType?: string;
10
- readonly toolName?: string;
9
+ readonly statusLabel?: string;
11
10
  }
12
11
  export interface StreamChunk {
13
12
  readonly type: 'chunk';
@@ -1 +1 @@
1
- {"version":3,"file":"chatTypes.d.ts","sourceRoot":"","sources":["../../src/types/chatTypes.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AAE3E,MAAM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Q,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/copilot-chat",
3
- "version": "0.0.0-alpha4",
3
+ "version": "0.0.0-alpha7",
4
4
  "description": "Camunda Copilot Client Library - React components and utilities for Camunda Platform 8",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -44,6 +44,7 @@
44
44
  "npm": ">=9.0.0"
45
45
  },
46
46
  "dependencies": {
47
+ "@carbon/ai-chat-components": "^0.5.0",
47
48
  "@carbon/react": "1.95.0",
48
49
  "@carbon/styles": "^1.68.0",
49
50
  "react-markdown": "^9.0.1",
@@ -1,11 +0,0 @@
1
- import { CopilotAgentConfig } from '../types';
2
- export interface UseCopilotAgentOptions {
3
- readonly config: CopilotAgentConfig;
4
- }
5
- export interface UseCopilotAgentReturn {
6
- readonly sendMessage: (message: string) => Promise<void>;
7
- readonly isStreaming: boolean;
8
- readonly stopGeneration: () => void;
9
- }
10
- export declare function useCopilotAgent({ config, }: UseCopilotAgentOptions): UseCopilotAgentReturn;
11
- //# sourceMappingURL=useCopilotAgent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCopilotAgent.d.ts","sourceRoot":"","sources":["../../src/hooks/useCopilotAgent.ts"],"names":[],"mappings":"AAcA,OAAO,EAIL,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AA+BlB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,GACP,EAAE,sBAAsB,GAAG,qBAAqB,CAoLhD"}
@@ -1,25 +0,0 @@
1
- import { AgentEvent, AgentResponse, CopilotAgentConfig, ToolResultContentTypeValue } from '../types';
2
- interface EventListener {
3
- (event: AgentEvent): void;
4
- }
5
- export declare class CopilotAgentService {
6
- private readonly config;
7
- private state;
8
- private readonly eventListeners;
9
- constructor(config: CopilotAgentConfig);
10
- addEventListener(listener: EventListener): () => void;
11
- private emitEvent;
12
- invoke(userMessage: string): Promise<AgentResponse>;
13
- continueWithToolResult(toolName: string, toolResult: string, contentType?: ToolResultContentTypeValue): Promise<AgentResponse>;
14
- cancel(): void;
15
- private cleanup;
16
- private executeRequest;
17
- private executeContinueRequest;
18
- private postRequest;
19
- private listenForResponse;
20
- get conversationId(): string | null;
21
- get messageId(): string | null;
22
- }
23
- export declare function createAgentService(config: CopilotAgentConfig): CopilotAgentService;
24
- export {};
25
- //# sourceMappingURL=agentService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agentService.d.ts","sourceRoot":"","sources":["../../src/services/agentService.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,UAAU,EAIV,aAAa,EAEb,kBAAkB,EAElB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAsBlB,UAAU,aAAa;IACrB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3B;AAUD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqB;gBAExC,MAAM,EAAE,kBAAkB;IAYtC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,IAAI;IAKrD,OAAO,CAAC,SAAS;IAIX,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA2BnD,sBAAsB,CAC1B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,0BAAuD,GACnE,OAAO,CAAC,aAAa,CAAC;IAiBzB,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,OAAO;YAOD,cAAc;YAWd,sBAAsB;YAWtB,WAAW;IAoBzB,OAAO,CAAC,iBAAiB;IAoEzB,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,CAElC;IAED,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;CACF;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,mBAAmB,CAErB"}
@@ -1,2 +0,0 @@
1
- export { CopilotAgentService, createAgentService } from './agentService';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}