orchid-ai 2.1.0 → 2.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchid-ai",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Shared Orchid AI chat UI and visualization components",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -173,27 +173,32 @@ export function orchidAiProcessTraceEntryKind(entry: {
173
173
  value: string;
174
174
  }): 'text' | 'tool' | 'compile' | 'mind';
175
175
 
176
+ export type OrchidAiProcessTraceItem =
177
+ | { type: 'status' | 'text'; value: string }
178
+ | { type: 'query'; tool: string; input: Record<string, unknown> };
179
+
176
180
  export function createOrchidAiProcessTraceCollector(): {
181
+ onQuery(tool: string, input: Record<string, unknown>): void;
177
182
  onStatus(text: string, opts?: { isClearStream?: boolean }): void;
178
183
  onDelta(text: string): void;
179
184
  getLiveMain(): string;
180
185
  getLiveInterim(): string;
181
- getItems(): Array<{ type: 'status' | 'text'; value: string }>;
186
+ getItems(): Array<OrchidAiProcessTraceItem>;
182
187
  reset(): void;
183
188
  buildPersistedTrace():
184
- | { items: Array<{ type: 'status' | 'text'; value: string }>; defaultCollapsed: boolean }
189
+ | { items: Array<OrchidAiProcessTraceItem>; defaultCollapsed: boolean }
185
190
  | undefined;
186
191
  };
187
192
 
188
193
  export function snapshotOrchidAiProcessTraceItems(
189
194
  collector: ReturnType<typeof createOrchidAiProcessTraceCollector>
190
- ): { items: Array<{ type: 'status' | 'text'; value: string }>; defaultCollapsed: boolean };
195
+ ): { items: Array<OrchidAiProcessTraceItem>; defaultCollapsed: boolean };
191
196
 
192
197
  export function augmentLiveProcessTraceSnapshot(
193
- trace: { items: Array<{ type: 'status' | 'text'; value: string }>; defaultCollapsed: boolean },
198
+ trace: { items: Array<OrchidAiProcessTraceItem>; defaultCollapsed: boolean },
194
199
  streamingMain: string,
195
200
  liveInterim?: string
196
- ): { items: Array<{ type: 'status' | 'text'; value: string }>; defaultCollapsed: boolean };
201
+ ): { items: Array<OrchidAiProcessTraceItem>; defaultCollapsed: boolean };
197
202
 
198
203
  export function orchidAiProcessTraceHasDisplayableContent(
199
204
  trace: ChatMessage['processTrace'] | undefined,