@harnessio/ai-chat-core 0.0.1 → 0.0.3
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/core/CapabilityExecutionManager.d.ts +17 -0
- package/dist/core/CapabilityRegistry.d.ts +15 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/index.js +725 -526
- package/dist/index.js.map +1 -1
- package/dist/react/components/AuxiliaryRenderer.d.ts +2 -0
- package/dist/react/components/CapabilityRenderer.d.ts +6 -0
- package/dist/react/components/ContentRenderer.d.ts +5 -0
- package/dist/react/components/index.d.ts +3 -0
- package/dist/react/hooks/index.d.ts +3 -1
- package/dist/react/hooks/useCapability.d.ts +2 -0
- package/dist/react/hooks/useCapabilityExecution.d.ts +2 -0
- package/dist/react/hooks/useComposer.d.ts +8 -3
- package/dist/react/index.d.ts +2 -0
- package/dist/react/utils/index.d.ts +1 -0
- package/dist/react/utils/makeCapability.d.ts +3 -0
- package/dist/runtime/AssistantRuntime/AssistantRuntime.d.ts +3 -0
- package/dist/runtime/ThreadListRuntime/ThreadListRuntime.d.ts +2 -0
- package/dist/runtime/ThreadRuntime/ThreadRuntimeCore.d.ts +3 -0
- package/dist/types/adapters.d.ts +6 -0
- package/dist/types/capability.d.ts +53 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/utils/index.d.ts +0 -3
- package/package.json +2 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CapabilityExecution, CapabilityHandler } from '../types/capability';
|
|
2
|
+
export declare class CapabilityExecutionManager {
|
|
3
|
+
private executions;
|
|
4
|
+
private executionQueue;
|
|
5
|
+
private isProcessing;
|
|
6
|
+
private runningByName;
|
|
7
|
+
private subscribers;
|
|
8
|
+
private getHandler;
|
|
9
|
+
constructor(getHandler: (name: string) => CapabilityHandler | undefined);
|
|
10
|
+
executeCapability<TArgs, TResult>(name: string, id: string, args: TArgs, messageId: string, strategy?: string): Promise<void>;
|
|
11
|
+
private processQueue;
|
|
12
|
+
getExecution(id: string): CapabilityExecution | undefined;
|
|
13
|
+
getExecutionsByMessage(messageId: string): CapabilityExecution[];
|
|
14
|
+
subscribe(callback: (executionId: string) => void): () => void;
|
|
15
|
+
private notifySubscribers;
|
|
16
|
+
clear(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CapabilityHandler, CapabilityRenderer } from '../types/capability';
|
|
2
|
+
export declare class CapabilityRegistry {
|
|
3
|
+
private handlers;
|
|
4
|
+
private renderers;
|
|
5
|
+
registerHandler(name: string, handler: CapabilityHandler): void;
|
|
6
|
+
registerRenderer(name: string, renderer: CapabilityRenderer): void;
|
|
7
|
+
unregister(name: string): void;
|
|
8
|
+
getHandler(name: string): CapabilityHandler | undefined;
|
|
9
|
+
getRenderer(name: string): CapabilityRenderer | undefined;
|
|
10
|
+
getStrategy(): string;
|
|
11
|
+
hasHandler(name: string): boolean;
|
|
12
|
+
hasRenderer(name: string): boolean;
|
|
13
|
+
clear(): void;
|
|
14
|
+
getAllCapabilityNames(): string[];
|
|
15
|
+
}
|
package/dist/core/index.d.ts
CHANGED