graphlit-client 1.0.20260217003 → 1.0.20260217005
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/client.d.ts +10 -2
- package/dist/client.js +154 -88
- package/dist/generated/graphql-documents.js +122 -1
- package/dist/generated/graphql-types.d.ts +146 -0
- package/dist/types/agent.d.ts +9 -1
- package/dist/types/ui-events.d.ts +8 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { NormalizedCacheObject } from "@apollo/client/core/index.js";
|
|
|
3
3
|
import * as Types from "./generated/graphql-types.js";
|
|
4
4
|
import { AgentOptions, AgentResult, StreamAgentOptions, ToolHandler } from "./types/agent.js";
|
|
5
5
|
import { AgentStreamEvent } from "./types/ui-events.js";
|
|
6
|
-
export type { AgentOptions, AgentResult, StreamAgentOptions, ToolCallResult, UsageInfo, AgentError, } from "./types/agent.js";
|
|
6
|
+
export type { AgentOptions, AgentResult, ArtifactCollector, StreamAgentOptions, ToolCallResult, UsageInfo, AgentError, } from "./types/agent.js";
|
|
7
7
|
export type { AgentStreamEvent } from "./types/ui-events.js";
|
|
8
8
|
export interface RetryConfig {
|
|
9
9
|
/** Maximum number of retry attempts (default: 5) */
|
|
@@ -51,6 +51,7 @@ declare class Graphlit {
|
|
|
51
51
|
private bedrockClient?;
|
|
52
52
|
private deepseekClient?;
|
|
53
53
|
private xaiClient?;
|
|
54
|
+
private readonly conversationQueues;
|
|
54
55
|
constructor(organizationIdOrOptions?: string | GraphlitClientOptions, environmentId?: string, jwtSecret?: string, ownerId?: string, userId?: string, apiUri?: string);
|
|
55
56
|
/**
|
|
56
57
|
* Initialize the Apollo client without regenerating the token.
|
|
@@ -928,10 +929,11 @@ declare class Graphlit {
|
|
|
928
929
|
* @param completionTime - The time taken for completion, optional.
|
|
929
930
|
* @param ttft - Time to first token, optional.
|
|
930
931
|
* @param throughput - Tokens per second throughput, optional.
|
|
932
|
+
* @param artifacts - The artifacts produced during the completion, optional.
|
|
931
933
|
* @param correlationId - The tenant correlation identifier, optional.
|
|
932
934
|
* @returns The completed conversation.
|
|
933
935
|
*/
|
|
934
|
-
completeConversation(completion: string, id: string, completionTime?: Types.Scalars["TimeSpan"]["input"], ttft?: Types.Scalars["TimeSpan"]["input"], throughput?: Types.Scalars["Float"]["input"], correlationId?: string): Promise<Types.CompleteConversationMutation>;
|
|
936
|
+
completeConversation(completion: string, id: string, completionTime?: Types.Scalars["TimeSpan"]["input"], ttft?: Types.Scalars["TimeSpan"]["input"], throughput?: Types.Scalars["Float"]["input"], artifacts?: Types.EntityReferenceInput[], correlationId?: string): Promise<Types.CompleteConversationMutation>;
|
|
935
937
|
/**
|
|
936
938
|
* Asks a question about Graphlit SDK usage.
|
|
937
939
|
* @param prompt - The question about Graphlit.
|
|
@@ -2525,6 +2527,12 @@ declare class Graphlit {
|
|
|
2525
2527
|
*/
|
|
2526
2528
|
promptAgent(prompt: string, conversationId?: string, specification?: Types.EntityReferenceInput, tools?: Types.ToolDefinitionInput[], toolHandlers?: Record<string, ToolHandler>, options?: AgentOptions, mimeType?: string, data?: string, // base64 encoded
|
|
2527
2529
|
contentFilter?: Types.ContentCriteriaInput, augmentedFilter?: Types.ContentCriteriaInput, correlationId?: string, persona?: Types.EntityReferenceInput): Promise<AgentResult>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Serializes async work per conversation ID to prevent concurrent formatConversation /
|
|
2532
|
+
* completeConversation calls from racing each other. Each call chains after the previous
|
|
2533
|
+
* one for the same conversation, so messages are always processed in order.
|
|
2534
|
+
*/
|
|
2535
|
+
private enqueueForConversation;
|
|
2528
2536
|
/**
|
|
2529
2537
|
* Execute an agent with streaming response
|
|
2530
2538
|
* @param prompt - The user prompt
|
package/dist/client.js
CHANGED
|
@@ -155,6 +155,9 @@ class Graphlit {
|
|
|
155
155
|
bedrockClient;
|
|
156
156
|
deepseekClient;
|
|
157
157
|
xaiClient;
|
|
158
|
+
// Serializes streamAgent calls per conversation to prevent race conditions
|
|
159
|
+
// when a user sends a second message before the first response completes.
|
|
160
|
+
conversationQueues = new Map();
|
|
158
161
|
constructor(organizationIdOrOptions, environmentId, jwtSecret, ownerId, userId, apiUri) {
|
|
159
162
|
// Handle both old constructor signature and new options object
|
|
160
163
|
let options;
|
|
@@ -1751,16 +1754,18 @@ class Graphlit {
|
|
|
1751
1754
|
* @param completionTime - The time taken for completion, optional.
|
|
1752
1755
|
* @param ttft - Time to first token, optional.
|
|
1753
1756
|
* @param throughput - Tokens per second throughput, optional.
|
|
1757
|
+
* @param artifacts - The artifacts produced during the completion, optional.
|
|
1754
1758
|
* @param correlationId - The tenant correlation identifier, optional.
|
|
1755
1759
|
* @returns The completed conversation.
|
|
1756
1760
|
*/
|
|
1757
|
-
async completeConversation(completion, id, completionTime, ttft, throughput, correlationId) {
|
|
1761
|
+
async completeConversation(completion, id, completionTime, ttft, throughput, artifacts, correlationId) {
|
|
1758
1762
|
return this.mutateAndCheckError(Documents.CompleteConversation, {
|
|
1759
1763
|
completion: completion,
|
|
1760
1764
|
id: id,
|
|
1761
1765
|
completionTime: completionTime,
|
|
1762
1766
|
ttft: ttft,
|
|
1763
1767
|
throughput: throughput,
|
|
1768
|
+
artifacts: artifacts,
|
|
1764
1769
|
correlationId: correlationId,
|
|
1765
1770
|
});
|
|
1766
1771
|
}
|
|
@@ -4686,6 +4691,29 @@ class Graphlit {
|
|
|
4686
4691
|
clearTimeout(timeoutId);
|
|
4687
4692
|
}
|
|
4688
4693
|
}
|
|
4694
|
+
/**
|
|
4695
|
+
* Serializes async work per conversation ID to prevent concurrent formatConversation /
|
|
4696
|
+
* completeConversation calls from racing each other. Each call chains after the previous
|
|
4697
|
+
* one for the same conversation, so messages are always processed in order.
|
|
4698
|
+
*/
|
|
4699
|
+
enqueueForConversation(conversationId, work, abortSignal) {
|
|
4700
|
+
const previous = this.conversationQueues.get(conversationId) ?? Promise.resolve();
|
|
4701
|
+
// Swallow errors from the previous call so a failed message doesn't
|
|
4702
|
+
// permanently block the queue for this conversation.
|
|
4703
|
+
// Check the abort signal before starting work so ESC while queued is instant.
|
|
4704
|
+
const next = previous.catch(() => { }).then(() => {
|
|
4705
|
+
if (abortSignal?.aborted)
|
|
4706
|
+
throw new Error("Operation aborted");
|
|
4707
|
+
return work();
|
|
4708
|
+
});
|
|
4709
|
+
this.conversationQueues.set(conversationId, next);
|
|
4710
|
+
next.finally(() => {
|
|
4711
|
+
if (this.conversationQueues.get(conversationId) === next) {
|
|
4712
|
+
this.conversationQueues.delete(conversationId);
|
|
4713
|
+
}
|
|
4714
|
+
});
|
|
4715
|
+
return next;
|
|
4716
|
+
}
|
|
4689
4717
|
/**
|
|
4690
4718
|
* Execute an agent with streaming response
|
|
4691
4719
|
* @param prompt - The user prompt
|
|
@@ -4744,107 +4772,130 @@ class Graphlit {
|
|
|
4744
4772
|
throw new Error("Failed to create conversation");
|
|
4745
4773
|
}
|
|
4746
4774
|
}
|
|
4747
|
-
//
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
}
|
|
4752
|
-
// Fallback to promptAgent using the same conversation and parameters
|
|
4753
|
-
const promptResult = await this.promptAgent(prompt, actualConversationId, // Preserve conversation
|
|
4754
|
-
specification, tools, toolHandlers, {
|
|
4755
|
-
maxToolRounds: maxRounds,
|
|
4756
|
-
}, mimeType, data, contentFilter, augmentedFilter, correlationId, persona);
|
|
4757
|
-
// Convert promptAgent result to streaming events
|
|
4775
|
+
// Serialize execution per-conversation: if the user sends a second message
|
|
4776
|
+
// before the first response completes, queue it so formatConversation /
|
|
4777
|
+
// completeConversation calls never interleave on the same conversation.
|
|
4778
|
+
if (this.conversationQueues.has(actualConversationId)) {
|
|
4758
4779
|
onEvent({
|
|
4759
|
-
type: "
|
|
4780
|
+
type: "conversation_queued",
|
|
4760
4781
|
conversationId: actualConversationId,
|
|
4761
4782
|
timestamp: new Date(),
|
|
4762
4783
|
});
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4784
|
+
}
|
|
4785
|
+
await this.enqueueForConversation(actualConversationId, async () => {
|
|
4786
|
+
// Check streaming support - fallback to promptAgent if not supported
|
|
4787
|
+
if (fullSpec && !this.supportsStreaming(fullSpec, tools)) {
|
|
4788
|
+
if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
|
|
4789
|
+
console.log("\n⚠️ [streamAgent] Streaming not supported, falling back to promptAgent with same conversation");
|
|
4790
|
+
}
|
|
4791
|
+
// Fallback to promptAgent using the same conversation and parameters
|
|
4792
|
+
const promptResult = await this.promptAgent(prompt, actualConversationId, // Preserve conversation
|
|
4793
|
+
specification, tools, toolHandlers, {
|
|
4794
|
+
maxToolRounds: maxRounds,
|
|
4795
|
+
}, mimeType, data, contentFilter, augmentedFilter, correlationId, persona);
|
|
4796
|
+
// Convert promptAgent result to streaming events
|
|
4797
|
+
onEvent({
|
|
4798
|
+
type: "conversation_started",
|
|
4799
|
+
conversationId: actualConversationId,
|
|
4800
|
+
timestamp: new Date(),
|
|
4776
4801
|
});
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4802
|
+
// Debug logging for fallback
|
|
4803
|
+
if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
|
|
4804
|
+
console.log(`📊 [streamAgent fallback] promptAgent result:`, {
|
|
4805
|
+
hasMessage: !!promptResult.message,
|
|
4806
|
+
messageLength: promptResult.message?.length,
|
|
4807
|
+
toolCallsCount: promptResult.toolCalls?.length || 0,
|
|
4808
|
+
toolResultsCount: promptResult.toolResults?.length || 0,
|
|
4809
|
+
toolCalls: promptResult.toolCalls,
|
|
4810
|
+
toolResults: promptResult.toolResults?.map((tr) => ({
|
|
4811
|
+
name: tr.name,
|
|
4812
|
+
hasResult: !!tr.result,
|
|
4813
|
+
hasError: !!tr.error,
|
|
4814
|
+
})),
|
|
4785
4815
|
});
|
|
4786
4816
|
}
|
|
4817
|
+
// Emit tool events if there were tool calls
|
|
4818
|
+
if (promptResult.toolCalls && promptResult.toolCalls.length > 0) {
|
|
4819
|
+
for (const toolCall of promptResult.toolCalls) {
|
|
4820
|
+
onEvent({
|
|
4821
|
+
type: "tool_update",
|
|
4822
|
+
toolCall: toolCall,
|
|
4823
|
+
status: "completed",
|
|
4824
|
+
});
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
// Emit the final message as a single update (simulating streaming)
|
|
4828
|
+
onEvent({
|
|
4829
|
+
type: "message_update",
|
|
4830
|
+
message: {
|
|
4831
|
+
__typename: "ConversationMessage",
|
|
4832
|
+
message: promptResult.message,
|
|
4833
|
+
role: Types.ConversationRoleTypes.Assistant,
|
|
4834
|
+
timestamp: new Date().toISOString(),
|
|
4835
|
+
toolCalls: promptResult.toolCalls || [],
|
|
4836
|
+
},
|
|
4837
|
+
isStreaming: false,
|
|
4838
|
+
});
|
|
4839
|
+
// Emit completion event
|
|
4840
|
+
onEvent({
|
|
4841
|
+
type: "conversation_completed",
|
|
4842
|
+
message: {
|
|
4843
|
+
__typename: "ConversationMessage",
|
|
4844
|
+
message: promptResult.message,
|
|
4845
|
+
role: Types.ConversationRoleTypes.Assistant,
|
|
4846
|
+
timestamp: new Date().toISOString(),
|
|
4847
|
+
toolCalls: promptResult.toolCalls || [],
|
|
4848
|
+
},
|
|
4849
|
+
});
|
|
4850
|
+
return; // Exit early after successful fallback
|
|
4787
4851
|
}
|
|
4788
|
-
//
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4852
|
+
// Create UI event adapter with model information
|
|
4853
|
+
const modelName = fullSpec ? getModelName(fullSpec) : undefined;
|
|
4854
|
+
const modelEnum = fullSpec ? getModelEnum(fullSpec) : undefined;
|
|
4855
|
+
const serviceType = fullSpec ? getServiceType(fullSpec) : undefined;
|
|
4856
|
+
uiAdapter = new UIEventAdapter(onEvent, actualConversationId, {
|
|
4857
|
+
smoothingEnabled: options?.smoothingEnabled ?? true,
|
|
4858
|
+
chunkingStrategy: options?.chunkingStrategy ?? "word",
|
|
4859
|
+
smoothingDelay: options?.smoothingDelay ?? 30,
|
|
4860
|
+
model: modelEnum,
|
|
4861
|
+
modelName: modelName,
|
|
4862
|
+
modelService: serviceType,
|
|
4799
4863
|
});
|
|
4800
|
-
//
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
message: {
|
|
4804
|
-
__typename: "ConversationMessage",
|
|
4805
|
-
message: promptResult.message,
|
|
4806
|
-
role: Types.ConversationRoleTypes.Assistant,
|
|
4807
|
-
timestamp: new Date().toISOString(),
|
|
4808
|
-
toolCalls: promptResult.toolCalls || [],
|
|
4809
|
-
},
|
|
4810
|
-
});
|
|
4811
|
-
return; // Exit early after successful fallback
|
|
4812
|
-
}
|
|
4813
|
-
// Create UI event adapter with model information
|
|
4814
|
-
const modelName = fullSpec ? getModelName(fullSpec) : undefined;
|
|
4815
|
-
const modelEnum = fullSpec ? getModelEnum(fullSpec) : undefined;
|
|
4816
|
-
const serviceType = fullSpec ? getServiceType(fullSpec) : undefined;
|
|
4817
|
-
uiAdapter = new UIEventAdapter(onEvent, actualConversationId, {
|
|
4818
|
-
smoothingEnabled: options?.smoothingEnabled ?? true,
|
|
4819
|
-
chunkingStrategy: options?.chunkingStrategy ?? "word",
|
|
4820
|
-
smoothingDelay: options?.smoothingDelay ?? 30,
|
|
4821
|
-
model: modelEnum,
|
|
4822
|
-
modelName: modelName,
|
|
4823
|
-
modelService: serviceType,
|
|
4824
|
-
});
|
|
4825
|
-
// Start the streaming conversation
|
|
4826
|
-
await this.executeStreamingAgent(prompt, actualConversationId, fullSpec, tools, toolHandlers, uiAdapter, maxRounds, abortSignal, mimeType, data, correlationId, persona);
|
|
4864
|
+
// Start the streaming conversation
|
|
4865
|
+
await this.executeStreamingAgent(prompt, actualConversationId, fullSpec, tools, toolHandlers, uiAdapter, maxRounds, abortSignal, mimeType, data, correlationId, persona);
|
|
4866
|
+
}, abortSignal);
|
|
4827
4867
|
}
|
|
4828
4868
|
catch (error) {
|
|
4829
|
-
const
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
type: "error",
|
|
4833
|
-
error: errorMessage,
|
|
4834
|
-
});
|
|
4835
|
-
}
|
|
4836
|
-
else {
|
|
4837
|
-
// Fallback error event
|
|
4869
|
+
const isAbortError = (error instanceof Error && error.message === "Operation aborted") ||
|
|
4870
|
+
(error instanceof DOMException && error.name === "AbortError");
|
|
4871
|
+
if (isAbortError) {
|
|
4838
4872
|
onEvent({
|
|
4839
|
-
type: "
|
|
4840
|
-
error: {
|
|
4841
|
-
message: errorMessage,
|
|
4842
|
-
recoverable: false,
|
|
4843
|
-
},
|
|
4873
|
+
type: "conversation_cancelled",
|
|
4844
4874
|
conversationId: conversationId || "",
|
|
4845
4875
|
timestamp: new Date(),
|
|
4846
4876
|
});
|
|
4847
4877
|
}
|
|
4878
|
+
else {
|
|
4879
|
+
const errorMessage = error instanceof Error ? error.message : "Streaming failed";
|
|
4880
|
+
if (uiAdapter) {
|
|
4881
|
+
uiAdapter.handleEvent({
|
|
4882
|
+
type: "error",
|
|
4883
|
+
error: errorMessage,
|
|
4884
|
+
});
|
|
4885
|
+
}
|
|
4886
|
+
else {
|
|
4887
|
+
// Fallback error event
|
|
4888
|
+
onEvent({
|
|
4889
|
+
type: "error",
|
|
4890
|
+
error: {
|
|
4891
|
+
message: errorMessage,
|
|
4892
|
+
recoverable: false,
|
|
4893
|
+
},
|
|
4894
|
+
conversationId: conversationId || "",
|
|
4895
|
+
timestamp: new Date(),
|
|
4896
|
+
});
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4848
4899
|
throw error;
|
|
4849
4900
|
}
|
|
4850
4901
|
finally {
|
|
@@ -4860,6 +4911,19 @@ class Graphlit {
|
|
|
4860
4911
|
async executeStreamingAgent(prompt, conversationId, specification, tools, toolHandlers, uiAdapter, maxRounds, abortSignal, mimeType, data, correlationId, persona) {
|
|
4861
4912
|
let currentRound = 0;
|
|
4862
4913
|
let fullMessage = "";
|
|
4914
|
+
// Collects artifact content IDs from tool handlers (e.g. code_execution).
|
|
4915
|
+
// Handlers register async ingestion promises; we await all of them before
|
|
4916
|
+
// completeConversation so the IDs are available without blocking the LLM.
|
|
4917
|
+
const pendingArtifacts = [];
|
|
4918
|
+
const artifactCollector = {
|
|
4919
|
+
addPending(p) {
|
|
4920
|
+
pendingArtifacts.push(p);
|
|
4921
|
+
},
|
|
4922
|
+
async resolve() {
|
|
4923
|
+
const results = await Promise.all(pendingArtifacts);
|
|
4924
|
+
return results.filter((r) => r != null);
|
|
4925
|
+
},
|
|
4926
|
+
};
|
|
4863
4927
|
// Start the conversation
|
|
4864
4928
|
uiAdapter.handleEvent({
|
|
4865
4929
|
type: "start",
|
|
@@ -5320,7 +5384,7 @@ class Graphlit {
|
|
|
5320
5384
|
}
|
|
5321
5385
|
}
|
|
5322
5386
|
// Execute tool
|
|
5323
|
-
const result = await handler(args);
|
|
5387
|
+
const result = await handler(args, artifactCollector);
|
|
5324
5388
|
// Update UI with complete event including result
|
|
5325
5389
|
uiAdapter.handleEvent({
|
|
5326
5390
|
type: "tool_call_complete",
|
|
@@ -5387,7 +5451,9 @@ class Graphlit {
|
|
|
5387
5451
|
const seconds = ms / 1000;
|
|
5388
5452
|
return `PT${seconds}S`;
|
|
5389
5453
|
};
|
|
5390
|
-
|
|
5454
|
+
// Await any pending artifact ingestions so content IDs are available
|
|
5455
|
+
const collectedArtifacts = await artifactCollector.resolve();
|
|
5456
|
+
const completeResponse = await this.completeConversation(trimmedMessage, conversationId, millisecondsToTimeSpan(completionTime), millisecondsToTimeSpan(ttft), throughput, collectedArtifacts.length > 0 ? collectedArtifacts : undefined, correlationId);
|
|
5391
5457
|
// Extract token count from the response
|
|
5392
5458
|
finalTokens =
|
|
5393
5459
|
completeResponse.completeConversation?.message?.tokens ?? undefined;
|
|
@@ -1057,6 +1057,12 @@ export const DescribeEncodedImage = gql `
|
|
|
1057
1057
|
mimeType
|
|
1058
1058
|
toolCallId
|
|
1059
1059
|
toolCallResponse
|
|
1060
|
+
artifacts {
|
|
1061
|
+
id
|
|
1062
|
+
name
|
|
1063
|
+
mimeType
|
|
1064
|
+
uri
|
|
1065
|
+
}
|
|
1060
1066
|
}
|
|
1061
1067
|
}
|
|
1062
1068
|
`;
|
|
@@ -1198,6 +1204,12 @@ export const DescribeImage = gql `
|
|
|
1198
1204
|
mimeType
|
|
1199
1205
|
toolCallId
|
|
1200
1206
|
toolCallResponse
|
|
1207
|
+
artifacts {
|
|
1208
|
+
id
|
|
1209
|
+
name
|
|
1210
|
+
mimeType
|
|
1211
|
+
uri
|
|
1212
|
+
}
|
|
1201
1213
|
}
|
|
1202
1214
|
}
|
|
1203
1215
|
`;
|
|
@@ -4175,6 +4187,12 @@ export const AskGraphlit = gql `
|
|
|
4175
4187
|
mimeType
|
|
4176
4188
|
toolCallId
|
|
4177
4189
|
toolCallResponse
|
|
4190
|
+
artifacts {
|
|
4191
|
+
id
|
|
4192
|
+
name
|
|
4193
|
+
mimeType
|
|
4194
|
+
uri
|
|
4195
|
+
}
|
|
4178
4196
|
}
|
|
4179
4197
|
messageCount
|
|
4180
4198
|
}
|
|
@@ -4211,13 +4229,14 @@ export const CloseConversation = gql `
|
|
|
4211
4229
|
}
|
|
4212
4230
|
`;
|
|
4213
4231
|
export const CompleteConversation = gql `
|
|
4214
|
-
mutation CompleteConversation($completion: String!, $id: ID!, $completionTime: TimeSpan, $ttft: TimeSpan, $throughput: Float, $correlationId: String) {
|
|
4232
|
+
mutation CompleteConversation($completion: String!, $id: ID!, $completionTime: TimeSpan, $ttft: TimeSpan, $throughput: Float, $artifacts: [EntityReferenceInput!], $correlationId: String) {
|
|
4215
4233
|
completeConversation(
|
|
4216
4234
|
completion: $completion
|
|
4217
4235
|
id: $id
|
|
4218
4236
|
completionTime: $completionTime
|
|
4219
4237
|
ttft: $ttft
|
|
4220
4238
|
throughput: $throughput
|
|
4239
|
+
artifacts: $artifacts
|
|
4221
4240
|
correlationId: $correlationId
|
|
4222
4241
|
) {
|
|
4223
4242
|
conversation {
|
|
@@ -4354,6 +4373,12 @@ export const CompleteConversation = gql `
|
|
|
4354
4373
|
mimeType
|
|
4355
4374
|
toolCallId
|
|
4356
4375
|
toolCallResponse
|
|
4376
|
+
artifacts {
|
|
4377
|
+
id
|
|
4378
|
+
name
|
|
4379
|
+
mimeType
|
|
4380
|
+
uri
|
|
4381
|
+
}
|
|
4357
4382
|
}
|
|
4358
4383
|
messageCount
|
|
4359
4384
|
facets {
|
|
@@ -4539,6 +4564,12 @@ export const CompleteConversation = gql `
|
|
|
4539
4564
|
mimeType
|
|
4540
4565
|
toolCallId
|
|
4541
4566
|
toolCallResponse
|
|
4567
|
+
artifacts {
|
|
4568
|
+
id
|
|
4569
|
+
name
|
|
4570
|
+
mimeType
|
|
4571
|
+
uri
|
|
4572
|
+
}
|
|
4542
4573
|
}
|
|
4543
4574
|
}
|
|
4544
4575
|
}
|
|
@@ -4685,6 +4716,12 @@ export const ContinueConversation = gql `
|
|
|
4685
4716
|
mimeType
|
|
4686
4717
|
toolCallId
|
|
4687
4718
|
toolCallResponse
|
|
4719
|
+
artifacts {
|
|
4720
|
+
id
|
|
4721
|
+
name
|
|
4722
|
+
mimeType
|
|
4723
|
+
uri
|
|
4724
|
+
}
|
|
4688
4725
|
}
|
|
4689
4726
|
messageCount
|
|
4690
4727
|
facets {
|
|
@@ -4870,6 +4907,12 @@ export const ContinueConversation = gql `
|
|
|
4870
4907
|
mimeType
|
|
4871
4908
|
toolCallId
|
|
4872
4909
|
toolCallResponse
|
|
4910
|
+
artifacts {
|
|
4911
|
+
id
|
|
4912
|
+
name
|
|
4913
|
+
mimeType
|
|
4914
|
+
uri
|
|
4915
|
+
}
|
|
4873
4916
|
}
|
|
4874
4917
|
}
|
|
4875
4918
|
}
|
|
@@ -5066,6 +5109,12 @@ export const FormatConversation = gql `
|
|
|
5066
5109
|
mimeType
|
|
5067
5110
|
toolCallId
|
|
5068
5111
|
toolCallResponse
|
|
5112
|
+
artifacts {
|
|
5113
|
+
id
|
|
5114
|
+
name
|
|
5115
|
+
mimeType
|
|
5116
|
+
uri
|
|
5117
|
+
}
|
|
5069
5118
|
}
|
|
5070
5119
|
messageCount
|
|
5071
5120
|
facets {
|
|
@@ -5251,6 +5300,12 @@ export const FormatConversation = gql `
|
|
|
5251
5300
|
mimeType
|
|
5252
5301
|
toolCallId
|
|
5253
5302
|
toolCallResponse
|
|
5303
|
+
artifacts {
|
|
5304
|
+
id
|
|
5305
|
+
name
|
|
5306
|
+
mimeType
|
|
5307
|
+
uri
|
|
5308
|
+
}
|
|
5254
5309
|
}
|
|
5255
5310
|
}
|
|
5256
5311
|
}
|
|
@@ -5400,6 +5455,12 @@ export const GetConversation = gql `
|
|
|
5400
5455
|
mimeType
|
|
5401
5456
|
toolCallId
|
|
5402
5457
|
toolCallResponse
|
|
5458
|
+
artifacts {
|
|
5459
|
+
id
|
|
5460
|
+
name
|
|
5461
|
+
mimeType
|
|
5462
|
+
uri
|
|
5463
|
+
}
|
|
5403
5464
|
}
|
|
5404
5465
|
transcriptUri
|
|
5405
5466
|
turns {
|
|
@@ -5802,6 +5863,12 @@ export const Prompt = gql `
|
|
|
5802
5863
|
mimeType
|
|
5803
5864
|
toolCallId
|
|
5804
5865
|
toolCallResponse
|
|
5866
|
+
artifacts {
|
|
5867
|
+
id
|
|
5868
|
+
name
|
|
5869
|
+
mimeType
|
|
5870
|
+
uri
|
|
5871
|
+
}
|
|
5805
5872
|
}
|
|
5806
5873
|
error
|
|
5807
5874
|
}
|
|
@@ -5956,6 +6023,12 @@ export const PromptConversation = gql `
|
|
|
5956
6023
|
mimeType
|
|
5957
6024
|
toolCallId
|
|
5958
6025
|
toolCallResponse
|
|
6026
|
+
artifacts {
|
|
6027
|
+
id
|
|
6028
|
+
name
|
|
6029
|
+
mimeType
|
|
6030
|
+
uri
|
|
6031
|
+
}
|
|
5959
6032
|
}
|
|
5960
6033
|
messageCount
|
|
5961
6034
|
facets {
|
|
@@ -6141,6 +6214,12 @@ export const PromptConversation = gql `
|
|
|
6141
6214
|
mimeType
|
|
6142
6215
|
toolCallId
|
|
6143
6216
|
toolCallResponse
|
|
6217
|
+
artifacts {
|
|
6218
|
+
id
|
|
6219
|
+
name
|
|
6220
|
+
mimeType
|
|
6221
|
+
uri
|
|
6222
|
+
}
|
|
6144
6223
|
}
|
|
6145
6224
|
}
|
|
6146
6225
|
}
|
|
@@ -6421,6 +6500,12 @@ export const QueryConversations = gql `
|
|
|
6421
6500
|
mimeType
|
|
6422
6501
|
toolCallId
|
|
6423
6502
|
toolCallResponse
|
|
6503
|
+
artifacts {
|
|
6504
|
+
id
|
|
6505
|
+
name
|
|
6506
|
+
mimeType
|
|
6507
|
+
uri
|
|
6508
|
+
}
|
|
6424
6509
|
}
|
|
6425
6510
|
transcriptUri
|
|
6426
6511
|
turns {
|
|
@@ -6790,6 +6875,12 @@ export const QueryConversationsClusters = gql `
|
|
|
6790
6875
|
mimeType
|
|
6791
6876
|
toolCallId
|
|
6792
6877
|
toolCallResponse
|
|
6878
|
+
artifacts {
|
|
6879
|
+
id
|
|
6880
|
+
name
|
|
6881
|
+
mimeType
|
|
6882
|
+
uri
|
|
6883
|
+
}
|
|
6793
6884
|
}
|
|
6794
6885
|
transcriptUri
|
|
6795
6886
|
turns {
|
|
@@ -7312,6 +7403,12 @@ export const ReviseContent = gql `
|
|
|
7312
7403
|
mimeType
|
|
7313
7404
|
toolCallId
|
|
7314
7405
|
toolCallResponse
|
|
7406
|
+
artifacts {
|
|
7407
|
+
id
|
|
7408
|
+
name
|
|
7409
|
+
mimeType
|
|
7410
|
+
uri
|
|
7411
|
+
}
|
|
7315
7412
|
}
|
|
7316
7413
|
messageCount
|
|
7317
7414
|
}
|
|
@@ -7461,6 +7558,12 @@ export const ReviseEncodedImage = gql `
|
|
|
7461
7558
|
mimeType
|
|
7462
7559
|
toolCallId
|
|
7463
7560
|
toolCallResponse
|
|
7561
|
+
artifacts {
|
|
7562
|
+
id
|
|
7563
|
+
name
|
|
7564
|
+
mimeType
|
|
7565
|
+
uri
|
|
7566
|
+
}
|
|
7464
7567
|
}
|
|
7465
7568
|
messageCount
|
|
7466
7569
|
}
|
|
@@ -7609,6 +7712,12 @@ export const ReviseImage = gql `
|
|
|
7609
7712
|
mimeType
|
|
7610
7713
|
toolCallId
|
|
7611
7714
|
toolCallResponse
|
|
7715
|
+
artifacts {
|
|
7716
|
+
id
|
|
7717
|
+
name
|
|
7718
|
+
mimeType
|
|
7719
|
+
uri
|
|
7720
|
+
}
|
|
7612
7721
|
}
|
|
7613
7722
|
messageCount
|
|
7614
7723
|
}
|
|
@@ -7757,6 +7866,12 @@ export const ReviseText = gql `
|
|
|
7757
7866
|
mimeType
|
|
7758
7867
|
toolCallId
|
|
7759
7868
|
toolCallResponse
|
|
7869
|
+
artifacts {
|
|
7870
|
+
id
|
|
7871
|
+
name
|
|
7872
|
+
mimeType
|
|
7873
|
+
uri
|
|
7874
|
+
}
|
|
7760
7875
|
}
|
|
7761
7876
|
messageCount
|
|
7762
7877
|
}
|
|
@@ -16300,6 +16415,12 @@ export const PromptSpecifications = gql `
|
|
|
16300
16415
|
mimeType
|
|
16301
16416
|
toolCallId
|
|
16302
16417
|
toolCallResponse
|
|
16418
|
+
artifacts {
|
|
16419
|
+
id
|
|
16420
|
+
name
|
|
16421
|
+
mimeType
|
|
16422
|
+
uri
|
|
16423
|
+
}
|
|
16303
16424
|
}
|
|
16304
16425
|
error
|
|
16305
16426
|
}
|
|
@@ -3634,6 +3634,8 @@ export type ConversationInput = {
|
|
|
3634
3634
|
/** Represents a conversation message. */
|
|
3635
3635
|
export type ConversationMessage = {
|
|
3636
3636
|
__typename?: 'ConversationMessage';
|
|
3637
|
+
/** The content artifacts produced in this message turn, e.g., by code execution tools. */
|
|
3638
|
+
artifacts?: Maybe<Array<Maybe<Content>>>;
|
|
3637
3639
|
/** The conversation message author. */
|
|
3638
3640
|
author?: Maybe<Scalars['String']['output']>;
|
|
3639
3641
|
/** The conversation message citations. */
|
|
@@ -3669,6 +3671,8 @@ export type ConversationMessage = {
|
|
|
3669
3671
|
};
|
|
3670
3672
|
/** Represents a conversation message. */
|
|
3671
3673
|
export type ConversationMessageInput = {
|
|
3674
|
+
/** The content artifact references produced in this message turn, optional. */
|
|
3675
|
+
artifacts?: InputMaybe<Array<InputMaybe<EntityReferenceInput>>>;
|
|
3672
3676
|
/** The conversation message author. */
|
|
3673
3677
|
author?: InputMaybe<Scalars['String']['input']>;
|
|
3674
3678
|
/** The elapsed time for the model to complete the prompt. */
|
|
@@ -13342,6 +13346,7 @@ export type MutationCloseConversationArgs = {
|
|
|
13342
13346
|
id: Scalars['ID']['input'];
|
|
13343
13347
|
};
|
|
13344
13348
|
export type MutationCompleteConversationArgs = {
|
|
13349
|
+
artifacts?: InputMaybe<Array<EntityReferenceInput>>;
|
|
13345
13350
|
completion: Scalars['String']['input'];
|
|
13346
13351
|
completionTime?: InputMaybe<Scalars['TimeSpan']['input']>;
|
|
13347
13352
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -22591,6 +22596,13 @@ export type DescribeEncodedImageMutation = {
|
|
|
22591
22596
|
name: string;
|
|
22592
22597
|
arguments: string;
|
|
22593
22598
|
} | null> | null;
|
|
22599
|
+
artifacts?: Array<{
|
|
22600
|
+
__typename?: 'Content';
|
|
22601
|
+
id: string;
|
|
22602
|
+
name: string;
|
|
22603
|
+
mimeType?: string | null;
|
|
22604
|
+
uri?: any | null;
|
|
22605
|
+
} | null> | null;
|
|
22594
22606
|
} | null;
|
|
22595
22607
|
};
|
|
22596
22608
|
export type DescribeImageMutationVariables = Exact<{
|
|
@@ -22740,6 +22752,13 @@ export type DescribeImageMutation = {
|
|
|
22740
22752
|
name: string;
|
|
22741
22753
|
arguments: string;
|
|
22742
22754
|
} | null> | null;
|
|
22755
|
+
artifacts?: Array<{
|
|
22756
|
+
__typename?: 'Content';
|
|
22757
|
+
id: string;
|
|
22758
|
+
name: string;
|
|
22759
|
+
mimeType?: string | null;
|
|
22760
|
+
uri?: any | null;
|
|
22761
|
+
} | null> | null;
|
|
22743
22762
|
} | null;
|
|
22744
22763
|
};
|
|
22745
22764
|
export type ExtractContentsMutationVariables = Exact<{
|
|
@@ -26107,6 +26126,13 @@ export type AskGraphlitMutation = {
|
|
|
26107
26126
|
name: string;
|
|
26108
26127
|
arguments: string;
|
|
26109
26128
|
} | null> | null;
|
|
26129
|
+
artifacts?: Array<{
|
|
26130
|
+
__typename?: 'Content';
|
|
26131
|
+
id: string;
|
|
26132
|
+
name: string;
|
|
26133
|
+
mimeType?: string | null;
|
|
26134
|
+
uri?: any | null;
|
|
26135
|
+
} | null> | null;
|
|
26110
26136
|
} | null;
|
|
26111
26137
|
} | null;
|
|
26112
26138
|
};
|
|
@@ -26155,6 +26181,7 @@ export type CompleteConversationMutationVariables = Exact<{
|
|
|
26155
26181
|
completionTime?: InputMaybe<Scalars['TimeSpan']['input']>;
|
|
26156
26182
|
ttft?: InputMaybe<Scalars['TimeSpan']['input']>;
|
|
26157
26183
|
throughput?: InputMaybe<Scalars['Float']['input']>;
|
|
26184
|
+
artifacts?: InputMaybe<Array<EntityReferenceInput> | EntityReferenceInput>;
|
|
26158
26185
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
|
26159
26186
|
}>;
|
|
26160
26187
|
export type CompleteConversationMutation = {
|
|
@@ -26305,6 +26332,13 @@ export type CompleteConversationMutation = {
|
|
|
26305
26332
|
name: string;
|
|
26306
26333
|
arguments: string;
|
|
26307
26334
|
} | null> | null;
|
|
26335
|
+
artifacts?: Array<{
|
|
26336
|
+
__typename?: 'Content';
|
|
26337
|
+
id: string;
|
|
26338
|
+
name: string;
|
|
26339
|
+
mimeType?: string | null;
|
|
26340
|
+
uri?: any | null;
|
|
26341
|
+
} | null> | null;
|
|
26308
26342
|
} | null;
|
|
26309
26343
|
facets?: Array<{
|
|
26310
26344
|
__typename?: 'ContentFacet';
|
|
@@ -26505,6 +26539,13 @@ export type CompleteConversationMutation = {
|
|
|
26505
26539
|
name: string;
|
|
26506
26540
|
arguments: string;
|
|
26507
26541
|
} | null> | null;
|
|
26542
|
+
artifacts?: Array<{
|
|
26543
|
+
__typename?: 'Content';
|
|
26544
|
+
id: string;
|
|
26545
|
+
name: string;
|
|
26546
|
+
mimeType?: string | null;
|
|
26547
|
+
uri?: any | null;
|
|
26548
|
+
} | null> | null;
|
|
26508
26549
|
} | null> | null;
|
|
26509
26550
|
} | null;
|
|
26510
26551
|
} | null;
|
|
@@ -26662,6 +26703,13 @@ export type ContinueConversationMutation = {
|
|
|
26662
26703
|
name: string;
|
|
26663
26704
|
arguments: string;
|
|
26664
26705
|
} | null> | null;
|
|
26706
|
+
artifacts?: Array<{
|
|
26707
|
+
__typename?: 'Content';
|
|
26708
|
+
id: string;
|
|
26709
|
+
name: string;
|
|
26710
|
+
mimeType?: string | null;
|
|
26711
|
+
uri?: any | null;
|
|
26712
|
+
} | null> | null;
|
|
26665
26713
|
} | null;
|
|
26666
26714
|
facets?: Array<{
|
|
26667
26715
|
__typename?: 'ContentFacet';
|
|
@@ -26862,6 +26910,13 @@ export type ContinueConversationMutation = {
|
|
|
26862
26910
|
name: string;
|
|
26863
26911
|
arguments: string;
|
|
26864
26912
|
} | null> | null;
|
|
26913
|
+
artifacts?: Array<{
|
|
26914
|
+
__typename?: 'Content';
|
|
26915
|
+
id: string;
|
|
26916
|
+
name: string;
|
|
26917
|
+
mimeType?: string | null;
|
|
26918
|
+
uri?: any | null;
|
|
26919
|
+
} | null> | null;
|
|
26865
26920
|
} | null> | null;
|
|
26866
26921
|
} | null;
|
|
26867
26922
|
} | null;
|
|
@@ -27085,6 +27140,13 @@ export type FormatConversationMutation = {
|
|
|
27085
27140
|
name: string;
|
|
27086
27141
|
arguments: string;
|
|
27087
27142
|
} | null> | null;
|
|
27143
|
+
artifacts?: Array<{
|
|
27144
|
+
__typename?: 'Content';
|
|
27145
|
+
id: string;
|
|
27146
|
+
name: string;
|
|
27147
|
+
mimeType?: string | null;
|
|
27148
|
+
uri?: any | null;
|
|
27149
|
+
} | null> | null;
|
|
27088
27150
|
} | null;
|
|
27089
27151
|
facets?: Array<{
|
|
27090
27152
|
__typename?: 'ContentFacet';
|
|
@@ -27285,6 +27347,13 @@ export type FormatConversationMutation = {
|
|
|
27285
27347
|
name: string;
|
|
27286
27348
|
arguments: string;
|
|
27287
27349
|
} | null> | null;
|
|
27350
|
+
artifacts?: Array<{
|
|
27351
|
+
__typename?: 'Content';
|
|
27352
|
+
id: string;
|
|
27353
|
+
name: string;
|
|
27354
|
+
mimeType?: string | null;
|
|
27355
|
+
uri?: any | null;
|
|
27356
|
+
} | null> | null;
|
|
27288
27357
|
} | null> | null;
|
|
27289
27358
|
} | null;
|
|
27290
27359
|
} | null;
|
|
@@ -27449,6 +27518,13 @@ export type GetConversationQuery = {
|
|
|
27449
27518
|
name: string;
|
|
27450
27519
|
arguments: string;
|
|
27451
27520
|
} | null> | null;
|
|
27521
|
+
artifacts?: Array<{
|
|
27522
|
+
__typename?: 'Content';
|
|
27523
|
+
id: string;
|
|
27524
|
+
name: string;
|
|
27525
|
+
mimeType?: string | null;
|
|
27526
|
+
uri?: any | null;
|
|
27527
|
+
} | null> | null;
|
|
27452
27528
|
} | null> | null;
|
|
27453
27529
|
turns?: Array<{
|
|
27454
27530
|
__typename?: 'ConversationTurn';
|
|
@@ -27923,6 +27999,13 @@ export type PromptMutation = {
|
|
|
27923
27999
|
name: string;
|
|
27924
28000
|
arguments: string;
|
|
27925
28001
|
} | null> | null;
|
|
28002
|
+
artifacts?: Array<{
|
|
28003
|
+
__typename?: 'Content';
|
|
28004
|
+
id: string;
|
|
28005
|
+
name: string;
|
|
28006
|
+
mimeType?: string | null;
|
|
28007
|
+
uri?: any | null;
|
|
28008
|
+
} | null> | null;
|
|
27926
28009
|
} | null> | null;
|
|
27927
28010
|
} | null;
|
|
27928
28011
|
};
|
|
@@ -28087,6 +28170,13 @@ export type PromptConversationMutation = {
|
|
|
28087
28170
|
name: string;
|
|
28088
28171
|
arguments: string;
|
|
28089
28172
|
} | null> | null;
|
|
28173
|
+
artifacts?: Array<{
|
|
28174
|
+
__typename?: 'Content';
|
|
28175
|
+
id: string;
|
|
28176
|
+
name: string;
|
|
28177
|
+
mimeType?: string | null;
|
|
28178
|
+
uri?: any | null;
|
|
28179
|
+
} | null> | null;
|
|
28090
28180
|
} | null;
|
|
28091
28181
|
facets?: Array<{
|
|
28092
28182
|
__typename?: 'ContentFacet';
|
|
@@ -28287,6 +28377,13 @@ export type PromptConversationMutation = {
|
|
|
28287
28377
|
name: string;
|
|
28288
28378
|
arguments: string;
|
|
28289
28379
|
} | null> | null;
|
|
28380
|
+
artifacts?: Array<{
|
|
28381
|
+
__typename?: 'Content';
|
|
28382
|
+
id: string;
|
|
28383
|
+
name: string;
|
|
28384
|
+
mimeType?: string | null;
|
|
28385
|
+
uri?: any | null;
|
|
28386
|
+
} | null> | null;
|
|
28290
28387
|
} | null> | null;
|
|
28291
28388
|
} | null;
|
|
28292
28389
|
} | null;
|
|
@@ -28591,6 +28688,13 @@ export type QueryConversationsQuery = {
|
|
|
28591
28688
|
name: string;
|
|
28592
28689
|
arguments: string;
|
|
28593
28690
|
} | null> | null;
|
|
28691
|
+
artifacts?: Array<{
|
|
28692
|
+
__typename?: 'Content';
|
|
28693
|
+
id: string;
|
|
28694
|
+
name: string;
|
|
28695
|
+
mimeType?: string | null;
|
|
28696
|
+
uri?: any | null;
|
|
28697
|
+
} | null> | null;
|
|
28594
28698
|
} | null> | null;
|
|
28595
28699
|
turns?: Array<{
|
|
28596
28700
|
__typename?: 'ConversationTurn';
|
|
@@ -29028,6 +29132,13 @@ export type QueryConversationsClustersQuery = {
|
|
|
29028
29132
|
name: string;
|
|
29029
29133
|
arguments: string;
|
|
29030
29134
|
} | null> | null;
|
|
29135
|
+
artifacts?: Array<{
|
|
29136
|
+
__typename?: 'Content';
|
|
29137
|
+
id: string;
|
|
29138
|
+
name: string;
|
|
29139
|
+
mimeType?: string | null;
|
|
29140
|
+
uri?: any | null;
|
|
29141
|
+
} | null> | null;
|
|
29031
29142
|
} | null> | null;
|
|
29032
29143
|
turns?: Array<{
|
|
29033
29144
|
__typename?: 'ConversationTurn';
|
|
@@ -29652,6 +29763,13 @@ export type ReviseContentMutation = {
|
|
|
29652
29763
|
name: string;
|
|
29653
29764
|
arguments: string;
|
|
29654
29765
|
} | null> | null;
|
|
29766
|
+
artifacts?: Array<{
|
|
29767
|
+
__typename?: 'Content';
|
|
29768
|
+
id: string;
|
|
29769
|
+
name: string;
|
|
29770
|
+
mimeType?: string | null;
|
|
29771
|
+
uri?: any | null;
|
|
29772
|
+
} | null> | null;
|
|
29655
29773
|
} | null;
|
|
29656
29774
|
} | null;
|
|
29657
29775
|
};
|
|
@@ -29811,6 +29929,13 @@ export type ReviseEncodedImageMutation = {
|
|
|
29811
29929
|
name: string;
|
|
29812
29930
|
arguments: string;
|
|
29813
29931
|
} | null> | null;
|
|
29932
|
+
artifacts?: Array<{
|
|
29933
|
+
__typename?: 'Content';
|
|
29934
|
+
id: string;
|
|
29935
|
+
name: string;
|
|
29936
|
+
mimeType?: string | null;
|
|
29937
|
+
uri?: any | null;
|
|
29938
|
+
} | null> | null;
|
|
29814
29939
|
} | null;
|
|
29815
29940
|
} | null;
|
|
29816
29941
|
};
|
|
@@ -29969,6 +30094,13 @@ export type ReviseImageMutation = {
|
|
|
29969
30094
|
name: string;
|
|
29970
30095
|
arguments: string;
|
|
29971
30096
|
} | null> | null;
|
|
30097
|
+
artifacts?: Array<{
|
|
30098
|
+
__typename?: 'Content';
|
|
30099
|
+
id: string;
|
|
30100
|
+
name: string;
|
|
30101
|
+
mimeType?: string | null;
|
|
30102
|
+
uri?: any | null;
|
|
30103
|
+
} | null> | null;
|
|
29972
30104
|
} | null;
|
|
29973
30105
|
} | null;
|
|
29974
30106
|
};
|
|
@@ -30127,6 +30259,13 @@ export type ReviseTextMutation = {
|
|
|
30127
30259
|
name: string;
|
|
30128
30260
|
arguments: string;
|
|
30129
30261
|
} | null> | null;
|
|
30262
|
+
artifacts?: Array<{
|
|
30263
|
+
__typename?: 'Content';
|
|
30264
|
+
id: string;
|
|
30265
|
+
name: string;
|
|
30266
|
+
mimeType?: string | null;
|
|
30267
|
+
uri?: any | null;
|
|
30268
|
+
} | null> | null;
|
|
30130
30269
|
} | null;
|
|
30131
30270
|
} | null;
|
|
30132
30271
|
};
|
|
@@ -40497,6 +40636,13 @@ export type PromptSpecificationsMutation = {
|
|
|
40497
40636
|
name: string;
|
|
40498
40637
|
arguments: string;
|
|
40499
40638
|
} | null> | null;
|
|
40639
|
+
artifacts?: Array<{
|
|
40640
|
+
__typename?: 'Content';
|
|
40641
|
+
id: string;
|
|
40642
|
+
name: string;
|
|
40643
|
+
mimeType?: string | null;
|
|
40644
|
+
uri?: any | null;
|
|
40645
|
+
} | null> | null;
|
|
40500
40646
|
} | null> | null;
|
|
40501
40647
|
} | null> | null;
|
|
40502
40648
|
};
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { ConversationMessage, ConversationToolCall } from "../generated/graphql-types.js";
|
|
2
|
-
export
|
|
2
|
+
export interface ArtifactCollector {
|
|
3
|
+
addPending(promise: Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
} | undefined>): void;
|
|
6
|
+
resolve(): Promise<{
|
|
7
|
+
id: string;
|
|
8
|
+
}[]>;
|
|
9
|
+
}
|
|
10
|
+
export type ToolHandler = (args: any, artifacts?: ArtifactCollector) => Promise<any>;
|
|
3
11
|
export interface AgentOptions {
|
|
4
12
|
maxToolRounds?: number;
|
|
5
13
|
timeout?: number;
|
|
@@ -35,6 +35,14 @@ export type AgentStreamEvent = {
|
|
|
35
35
|
conversationId: string;
|
|
36
36
|
timestamp: Date;
|
|
37
37
|
model?: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "conversation_queued";
|
|
40
|
+
conversationId: string;
|
|
41
|
+
timestamp: Date;
|
|
42
|
+
} | {
|
|
43
|
+
type: "conversation_cancelled";
|
|
44
|
+
conversationId: string;
|
|
45
|
+
timestamp: Date;
|
|
38
46
|
} | ContextWindowEvent | {
|
|
39
47
|
type: "message_update";
|
|
40
48
|
message: StreamingConversationMessage;
|