@anvia/studio 0.1.0 → 0.1.2
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 +32 -7
- package/dist/index.js +702 -105
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/{index-DArq3ZFi.js → index-Dy72BB4f.js} +6 -6
- package/dist/ui/assets/{index-DArq3ZFi.js.map → index-Dy72BB4f.js.map} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Message, JsonObject, AgentTraceOptions, PromptResponse, AgentStreamEvent, JsonValue, Usage, AgentTraceInfo, Agent, AgentObserver, AgentRunStartArgs, AgentRunObserver } from '@anvia/core';
|
|
1
|
+
import { Message, JsonObject, AgentTraceOptions, PromptResponse, AgentStreamEvent, JsonValue, Usage, AgentTraceInfo, Agent, MemoryStore, AgentObserver, AgentRunStartArgs, AgentRunObserver } from '@anvia/core';
|
|
2
2
|
import { Hono } from 'hono';
|
|
3
3
|
|
|
4
4
|
type StudioCapability = "agents" | "approvals" | "knowledge" | "observability" | "sessions" | "traces";
|
|
@@ -53,9 +53,30 @@ type StudioTranscriptToolEntry = {
|
|
|
53
53
|
callId?: string;
|
|
54
54
|
args?: string;
|
|
55
55
|
result?: string;
|
|
56
|
+
childEvents?: StudioTranscriptChildAgentEvent[];
|
|
56
57
|
approval?: StudioToolApprovalTranscript;
|
|
57
58
|
question?: StudioToolQuestionTranscript;
|
|
58
59
|
};
|
|
60
|
+
type StudioTranscriptChildAgentEvent = {
|
|
61
|
+
kind: "message";
|
|
62
|
+
agentId: string;
|
|
63
|
+
agentName?: string;
|
|
64
|
+
text: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "reasoning";
|
|
67
|
+
agentId: string;
|
|
68
|
+
agentName?: string;
|
|
69
|
+
reasoningId?: string;
|
|
70
|
+
text: string;
|
|
71
|
+
} | {
|
|
72
|
+
kind: "tool";
|
|
73
|
+
agentId: string;
|
|
74
|
+
agentName?: string;
|
|
75
|
+
toolName: string;
|
|
76
|
+
callId?: string;
|
|
77
|
+
args?: string;
|
|
78
|
+
result?: string;
|
|
79
|
+
};
|
|
59
80
|
type StudioTranscriptEntry = StudioTranscriptChatEntry | StudioTranscriptReasoningEntry | StudioTranscriptToolEntry;
|
|
60
81
|
type StudioSessionSummary = {
|
|
61
82
|
id: string;
|
|
@@ -80,24 +101,28 @@ type StudioSessionListOptions = {
|
|
|
80
101
|
agentId?: string;
|
|
81
102
|
limit: number;
|
|
82
103
|
};
|
|
83
|
-
type
|
|
104
|
+
type StudioSessionRunStatus = "running" | "success" | "error";
|
|
105
|
+
type StudioSessionRunTranscriptInput = {
|
|
84
106
|
id: string;
|
|
107
|
+
runId: string;
|
|
85
108
|
title?: string;
|
|
86
|
-
messages: Message[];
|
|
87
109
|
transcript: StudioTranscriptEntry[];
|
|
110
|
+
status: StudioSessionRunStatus;
|
|
111
|
+
error?: JsonValue;
|
|
88
112
|
};
|
|
89
|
-
type StudioSessionStore = {
|
|
113
|
+
type StudioSessionStore = MemoryStore & {
|
|
90
114
|
readonly kind?: string;
|
|
91
115
|
listSessions(options: StudioSessionListOptions): StudioSessionSummary[] | Promise<StudioSessionSummary[]>;
|
|
92
116
|
createSession(input: StudioSessionCreateInput): StudioSessionSummary | Promise<StudioSessionSummary>;
|
|
93
117
|
getSession(id: string): StudioSession | undefined | Promise<StudioSession | undefined>;
|
|
94
|
-
|
|
118
|
+
saveSessionRunTranscript(input: StudioSessionRunTranscriptInput): StudioSession | undefined | Promise<StudioSession | undefined>;
|
|
95
119
|
deleteSession?(id: string): boolean | Promise<boolean>;
|
|
96
120
|
};
|
|
97
121
|
type StudioTraceStatus = "running" | "success" | "error";
|
|
98
|
-
type StudioTraceObservationKind = "generation" | "tool";
|
|
122
|
+
type StudioTraceObservationKind = "agent" | "generation" | "tool";
|
|
99
123
|
type StudioTraceObservation = {
|
|
100
124
|
id: string;
|
|
125
|
+
parentObservationId?: string;
|
|
101
126
|
kind: StudioTraceObservationKind;
|
|
102
127
|
name: string;
|
|
103
128
|
status: StudioTraceStatus;
|
|
@@ -341,4 +366,4 @@ type SqliteSessionStoreOptions = {
|
|
|
341
366
|
};
|
|
342
367
|
declare function createSqliteSessionStore(options?: SqliteSessionStoreOptions): StudioSessionStore & StudioTraceStore;
|
|
343
368
|
|
|
344
|
-
export { type AgentRunRequest, type AgentRunResponse, type AgentRunStreamEvent, type AnviaStudio, type SqliteSessionStoreOptions, Studio, type StudioAgent, type StudioAgentConfig, type StudioAgentKnowledgeConfig, type StudioCapability, type StudioCapabilityConfig, type StudioConfig, type StudioErrorCode, type StudioErrorResponse, type StudioKnowledgeEvidence, type StudioKnowledgeEvidenceDocument, type StudioKnowledgeSourceKind, type StudioKnowledgeSourceSummary, type StudioKnowledgeSummary, type StudioOptions, type StudioServeOptions, type StudioSession, type
|
|
369
|
+
export { type AgentRunRequest, type AgentRunResponse, type AgentRunStreamEvent, type AnviaStudio, type SqliteSessionStoreOptions, Studio, type StudioAgent, type StudioAgentConfig, type StudioAgentKnowledgeConfig, type StudioCapability, type StudioCapabilityConfig, type StudioConfig, type StudioErrorCode, type StudioErrorResponse, type StudioKnowledgeEvidence, type StudioKnowledgeEvidenceDocument, type StudioKnowledgeSourceKind, type StudioKnowledgeSourceSummary, type StudioKnowledgeSummary, type StudioOptions, type StudioServeOptions, type StudioSession, type StudioSessionCreateInput, type StudioSessionListOptions, type StudioSessionRunStatus, type StudioSessionRunTranscriptInput, type StudioSessionStore, type StudioSessionSummary, type StudioSessionTraceListOptions, type StudioStaticKnowledgeDocument, type StudioStores, type StudioToolApproval, type StudioToolApprovalDecision, type StudioToolApprovalRequestEvent, type StudioToolApprovalResultEvent, type StudioToolApprovalStatus, type StudioToolApprovalTranscript, type StudioToolQuestion, type StudioToolQuestionAnswer, type StudioToolQuestionChoice, type StudioToolQuestionPrompt, type StudioToolQuestionRequestEvent, type StudioToolQuestionResultEvent, type StudioToolQuestionStatus, type StudioToolQuestionTranscript, type StudioTrace, type StudioTraceListOptions, type StudioTraceObservation, type StudioTraceObservationKind, StudioTraceObserver, type StudioTraceObserverOptions, type StudioTraceStatus, type StudioTraceStore, type StudioTraceSummary, type StudioTranscriptChatEntry, type StudioTranscriptChildAgentEvent, type StudioTranscriptEntry, type StudioTranscriptReasoningEntry, type StudioTranscriptToolEntry, type StudioUiOptions, createSqliteSessionStore };
|