@anvia/studio 1.0.0-rc.2 → 1.0.0-rc.4
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/README.md +38 -0
- package/dist/index.d.ts +152 -67
- package/dist/index.js +921 -1001
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/ArrowClockwise.es-CSEY3Qr6.js +2 -0
- package/dist/ui/assets/{ArrowClockwise.es-DMJj7Hv0.js.map → ArrowClockwise.es-CSEY3Qr6.js.map} +1 -1
- package/dist/ui/assets/CaretDown.es-BHAPbv1R.js +2 -0
- package/dist/ui/assets/CaretDown.es-BHAPbv1R.js.map +1 -0
- package/dist/ui/assets/Check.es-BLChmggz.js +2 -0
- package/dist/ui/assets/Check.es-BLChmggz.js.map +1 -0
- package/dist/ui/assets/Wrench.es-BL6BmNv7.js +4 -0
- package/dist/ui/assets/Wrench.es-BL6BmNv7.js.map +1 -0
- package/dist/ui/assets/agents-page-DQqt45If.js +2 -0
- package/dist/ui/assets/{agents-page-CbQpO3Tg.js.map → agents-page-DQqt45If.js.map} +1 -1
- package/dist/ui/assets/{badge-BIWy1K8W.js → badge-CcajoiAt.js} +1 -1
- package/dist/ui/assets/{badge-BIWy1K8W.js.map → badge-CcajoiAt.js.map} +1 -1
- package/dist/ui/assets/button-07gzSO47.js +2 -0
- package/dist/ui/assets/button-07gzSO47.js.map +1 -0
- package/dist/ui/assets/chunk-D2ECOWN5-fs3ih0yA.js +65 -0
- package/dist/ui/assets/chunk-D2ECOWN5-fs3ih0yA.js.map +1 -0
- package/dist/ui/assets/dialog-CNNQ3hoF.js +2 -0
- package/dist/ui/assets/dialog-CNNQ3hoF.js.map +1 -0
- package/dist/ui/assets/dist-CqMdRzwk.js +2 -0
- package/dist/ui/assets/dist-CqMdRzwk.js.map +1 -0
- package/dist/ui/assets/dist-DWqJwN1i.js +2 -0
- package/dist/ui/assets/dist-DWqJwN1i.js.map +1 -0
- package/dist/ui/assets/es2015-DsZq7PFO.js +42 -0
- package/dist/ui/assets/es2015-DsZq7PFO.js.map +1 -0
- package/dist/ui/assets/icon-CqkMSRbt.js +2 -0
- package/dist/ui/assets/icon-CqkMSRbt.js.map +1 -0
- package/dist/ui/assets/index-BGNC3dLD.css +1 -0
- package/dist/ui/assets/index-BLaXiUWO.js +12 -0
- package/dist/ui/assets/index-BLaXiUWO.js.map +1 -0
- package/dist/ui/assets/{input-BTHDDFpv.js → input-BiI6gsxA.js} +1 -1
- package/dist/ui/assets/{input-BTHDDFpv.js.map → input-BiI6gsxA.js.map} +1 -1
- package/dist/ui/assets/knowledge-model-S51n2rKh.js +2 -0
- package/dist/ui/assets/knowledge-model-S51n2rKh.js.map +1 -0
- package/dist/ui/assets/knowledge-page-DzRhA9qQ.js +2 -0
- package/dist/ui/assets/{knowledge-page-C8zg8uTL.js.map → knowledge-page-DzRhA9qQ.js.map} +1 -1
- package/dist/ui/assets/mcps-page-ZVngljXI.js +2 -0
- package/dist/ui/assets/{mcps-page-gNYeqSPB.js.map → mcps-page-ZVngljXI.js.map} +1 -1
- package/dist/ui/assets/{memory-page-BLrfOqyU.js → memory-page-DAJk0Zof.js} +3 -3
- package/dist/ui/assets/{memory-page-BLrfOqyU.js.map → memory-page-DAJk0Zof.js.map} +1 -1
- package/dist/ui/assets/pipelines-page-8osYA129.js +8 -0
- package/dist/ui/assets/{pipelines-page-hTEhFZGg.js.map → pipelines-page-8osYA129.js.map} +1 -1
- package/dist/ui/assets/{renderers-DC_-TD_X.js → renderers-BPGo4d2i.js} +2 -2
- package/dist/ui/assets/{renderers-DC_-TD_X.js.map → renderers-BPGo4d2i.js.map} +1 -1
- package/dist/ui/assets/request-7oUPS8zY.js +4 -0
- package/dist/ui/assets/request-7oUPS8zY.js.map +1 -0
- package/dist/ui/assets/rfb-DiW3PDuT.js +6 -0
- package/dist/ui/assets/rfb-DiW3PDuT.js.map +1 -0
- package/dist/ui/assets/sandboxes-page-C6kokYwc.js +2 -0
- package/dist/ui/assets/sandboxes-page-C6kokYwc.js.map +1 -0
- package/dist/ui/assets/select-BOYfrfck.js +2 -0
- package/dist/ui/assets/select-BOYfrfck.js.map +1 -0
- package/dist/ui/assets/sessions-page-ClXzRM9K.js +2 -0
- package/dist/ui/assets/{sessions-page-DBzoP7MV.js.map → sessions-page-ClXzRM9K.js.map} +1 -1
- package/dist/ui/assets/status-page-DfuQ0fpa.js +2 -0
- package/dist/ui/assets/{status-page-Bf1lq444.js.map → status-page-DfuQ0fpa.js.map} +1 -1
- package/dist/ui/assets/studio-CeTsQ4gf.js +2 -0
- package/dist/ui/assets/studio-CeTsQ4gf.js.map +1 -0
- package/dist/ui/assets/textarea-DESKg_ZK.js +2 -0
- package/dist/ui/assets/textarea-DESKg_ZK.js.map +1 -0
- package/dist/ui/assets/tool-runner-Cdrcs2v4.js +2 -0
- package/dist/ui/assets/{tool-runner-BbUlfPEO.js.map → tool-runner-Cdrcs2v4.js.map} +1 -1
- package/dist/ui/assets/tools-page-C865VQmM.js +2 -0
- package/dist/ui/assets/{tools-page-BgUz-79v.js.map → tools-page-C865VQmM.js.map} +1 -1
- package/dist/ui/assets/trace-browser-D93H7Xxs.js +10 -0
- package/dist/ui/assets/{trace-browser-qfYPcdR2.js.map → trace-browser-D93H7Xxs.js.map} +1 -1
- package/dist/ui/assets/transcript-item-BadzBIzE.js +3 -0
- package/dist/ui/assets/transcript-item-BadzBIzE.js.map +1 -0
- package/dist/ui/assets/with-selector-CRZWaZzC.js +2 -0
- package/dist/ui/assets/with-selector-CRZWaZzC.js.map +1 -0
- package/dist/ui/index.html +19 -2
- package/package.json +11 -7
- package/dist/ui/assets/ArrowClockwise.es-DMJj7Hv0.js +0 -2
- package/dist/ui/assets/agents-page-CbQpO3Tg.js +0 -2
- package/dist/ui/assets/index-D-CbFx6c.css +0 -1
- package/dist/ui/assets/index-DizotQot.js +0 -119
- package/dist/ui/assets/index-DizotQot.js.map +0 -1
- package/dist/ui/assets/knowledge-page-C8zg8uTL.js +0 -2
- package/dist/ui/assets/mcps-page-gNYeqSPB.js +0 -2
- package/dist/ui/assets/pipelines-page-hTEhFZGg.js +0 -8
- package/dist/ui/assets/sandboxes-page-DtPnuza7.js +0 -2
- package/dist/ui/assets/sandboxes-page-DtPnuza7.js.map +0 -1
- package/dist/ui/assets/sessions-page-DBzoP7MV.js +0 -2
- package/dist/ui/assets/status-page-Bf1lq444.js +0 -2
- package/dist/ui/assets/tool-runner-BbUlfPEO.js +0 -2
- package/dist/ui/assets/tools-page-BgUz-79v.js +0 -2
- package/dist/ui/assets/trace-browser-qfYPcdR2.js +0 -10
- package/dist/ui/assets/transcript-item-HFuuqmKM.js +0 -3
- package/dist/ui/assets/transcript-item-HFuuqmKM.js.map +0 -1
package/README.md
CHANGED
|
@@ -164,3 +164,41 @@ pnpm --filter @anvia/studio typecheck
|
|
|
164
164
|
pnpm --filter @anvia/studio test
|
|
165
165
|
pnpm --filter @anvia/studio build
|
|
166
166
|
```
|
|
167
|
+
## Browser sandbox views
|
|
168
|
+
|
|
169
|
+
Sandbox registrations may include explicit noVNC views. Studio resolves the upstream only through the
|
|
170
|
+
inspector's loopback-published port and exposes an authorized, same-origin WebSocket bridge. Studio's
|
|
171
|
+
programmatic noVNC client renders the desktop directly, so the stock noVNC splash, toolbar, and password
|
|
172
|
+
prompt are not part of the UI.
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
const studio = new Studio([agent], {
|
|
176
|
+
sandboxes: [
|
|
177
|
+
{
|
|
178
|
+
inspector: browser.inspector({ files: true, ports: true, processes: true }),
|
|
179
|
+
views: [
|
|
180
|
+
{
|
|
181
|
+
id: "desktop",
|
|
182
|
+
label: "Browser",
|
|
183
|
+
source: browser.desktop,
|
|
184
|
+
access: { mode: "local" },
|
|
185
|
+
authentication: { type: "password", password },
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Local mode requires a loopback connection and a same-origin browser request. Remotely reachable Studio
|
|
194
|
+
instances must instead provide `{ mode: "authorize", authorize }`; the application callback runs for
|
|
195
|
+
the viewer connection, WebSocket upgrade, and every takeover operation. Studio does not provide or infer
|
|
196
|
+
an application authentication system. View credentials are omitted from sandbox discovery metadata and
|
|
197
|
+
URLs and returned only by the authorized, non-cacheable viewer-connection endpoint.
|
|
198
|
+
|
|
199
|
+
When a registered agent emits a matching browser tool call, Playground replaces its Sessions sidebar
|
|
200
|
+
with a larger resizable desktop panel. The embedded desktop remains view-only until the user explicitly
|
|
201
|
+
takes control. That lease blocks Anvia browser tools, is renewed by the UI, and expires when abandoned.
|
|
202
|
+
It is a coordination boundary rather than a replacement for application authorization. The Sandboxes
|
|
203
|
+
page continues to expose the registered view as inspectable runtime metadata. Closing the Playground
|
|
204
|
+
panel restores Sessions without forgetting the current browser; use **Open browser** to show it again.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
2
|
import { AgentObserver, AgentRunStartArgs, AgentRunObserver } from '@anvia/core/observability';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AgentInteractionResponse, AgentResult, AgentSuspendedResult, AgentStreamEvent, Agent } from '@anvia/core/agent';
|
|
4
|
+
import { JsonObject, Message, JsonValue, CompletionModelCapabilities, ToolResultContentPart, Usage, CompletionModel, StreamingCompletionModel } from '@anvia/core/completion';
|
|
5
5
|
import { MemoryStore, MemoryAppendOptions, MemoryErrorOptions, MemoryScope } from '@anvia/core/memory';
|
|
6
6
|
import { ModelList } from '@anvia/core/model-listing';
|
|
7
7
|
import { Pipeline, PipelineGraph } from '@anvia/core/pipeline';
|
|
8
8
|
|
|
9
9
|
declare function traceSummary(trace: StudioTrace): StudioTraceSummary;
|
|
10
10
|
|
|
11
|
-
type StudioCapability = "agents" | "
|
|
11
|
+
type StudioCapability = "agents" | "interactions" | "evals" | "memory" | "knowledge" | "mcps" | "observability" | "pipelines" | "sandboxes" | "sessions" | "status" | "tools" | "traces";
|
|
12
12
|
type AgentTraceInfo = {
|
|
13
13
|
observer: string;
|
|
14
14
|
traceId?: string | undefined;
|
|
@@ -236,9 +236,128 @@ type StudioAgentToolsSummary = {
|
|
|
236
236
|
tools: StudioAgentToolMetadata[];
|
|
237
237
|
};
|
|
238
238
|
type StudioSandboxCapabilities = {
|
|
239
|
-
files:
|
|
239
|
+
files: boolean;
|
|
240
240
|
ports: boolean;
|
|
241
241
|
processes: boolean;
|
|
242
|
+
views: boolean;
|
|
243
|
+
};
|
|
244
|
+
type StudioSandboxInspectorFileEntry = Readonly<{
|
|
245
|
+
path: string;
|
|
246
|
+
type: StudioSandboxFileType;
|
|
247
|
+
size?: number;
|
|
248
|
+
}>;
|
|
249
|
+
type StudioSandboxInspectorPort = Readonly<{
|
|
250
|
+
containerPort: number;
|
|
251
|
+
host: string;
|
|
252
|
+
hostPort: number;
|
|
253
|
+
protocol: string;
|
|
254
|
+
}>;
|
|
255
|
+
type StudioSandboxInspectorProcess = Readonly<{
|
|
256
|
+
id: string;
|
|
257
|
+
command: string;
|
|
258
|
+
args: readonly string[];
|
|
259
|
+
cwd?: string;
|
|
260
|
+
status: StudioSandboxProcessStatus;
|
|
261
|
+
exitCode?: number;
|
|
262
|
+
startedAt: string;
|
|
263
|
+
endedAt?: string;
|
|
264
|
+
}>;
|
|
265
|
+
type StudioSandboxInspector = Readonly<{
|
|
266
|
+
id: string;
|
|
267
|
+
provider: string;
|
|
268
|
+
workdir: string;
|
|
269
|
+
listFiles?: (options?: Readonly<{
|
|
270
|
+
path?: string;
|
|
271
|
+
abortSignal?: AbortSignal;
|
|
272
|
+
}>) => Promise<readonly StudioSandboxInspectorFileEntry[]>;
|
|
273
|
+
readFile?: (options: Readonly<{
|
|
274
|
+
path: string;
|
|
275
|
+
abortSignal?: AbortSignal;
|
|
276
|
+
}>) => Promise<Uint8Array>;
|
|
277
|
+
publishedPorts?: readonly StudioSandboxInspectorPort[];
|
|
278
|
+
listProcesses?: (options?: Readonly<{
|
|
279
|
+
abortSignal?: AbortSignal;
|
|
280
|
+
}>) => Promise<readonly StudioSandboxInspectorProcess[]>;
|
|
281
|
+
readProcessLogs?: (options: Readonly<{
|
|
282
|
+
processId: string;
|
|
283
|
+
tailBytes?: number;
|
|
284
|
+
abortSignal?: AbortSignal;
|
|
285
|
+
}>) => Promise<StudioSandboxInspectorProcessLogs>;
|
|
286
|
+
}>;
|
|
287
|
+
type StudioSandboxInspectorProcessLogs = Readonly<{
|
|
288
|
+
stdout: Uint8Array;
|
|
289
|
+
stderr: Uint8Array;
|
|
290
|
+
stdoutTruncated: boolean;
|
|
291
|
+
stderrTruncated: boolean;
|
|
292
|
+
}>;
|
|
293
|
+
type StudioSandboxViewControlSnapshot = Readonly<{
|
|
294
|
+
mode: "agent" | "human";
|
|
295
|
+
ownerId?: string;
|
|
296
|
+
expiresAt?: string;
|
|
297
|
+
}>;
|
|
298
|
+
type StudioSandboxViewControlLease = Readonly<{
|
|
299
|
+
id: string;
|
|
300
|
+
ownerId: string;
|
|
301
|
+
expiresAt: string;
|
|
302
|
+
renew(options: Readonly<{
|
|
303
|
+
leaseTimeoutMs: number;
|
|
304
|
+
}>): StudioSandboxViewControlSnapshot;
|
|
305
|
+
release(): void;
|
|
306
|
+
}>;
|
|
307
|
+
type StudioSandboxViewControl = Readonly<{
|
|
308
|
+
snapshot(): StudioSandboxViewControlSnapshot;
|
|
309
|
+
acquireHumanControl(options: Readonly<{
|
|
310
|
+
ownerId: string;
|
|
311
|
+
leaseTimeoutMs: number;
|
|
312
|
+
abortSignal?: AbortSignal;
|
|
313
|
+
}>): Promise<StudioSandboxViewControlLease>;
|
|
314
|
+
}>;
|
|
315
|
+
type StudioSandboxViewSource = Readonly<{
|
|
316
|
+
protocol: "novnc";
|
|
317
|
+
containerPort: number;
|
|
318
|
+
control: StudioSandboxViewControl;
|
|
319
|
+
}>;
|
|
320
|
+
type StudioSandboxViewAuthorizeArgs = Readonly<{
|
|
321
|
+
request: Request;
|
|
322
|
+
sandboxRef: string;
|
|
323
|
+
viewId: string;
|
|
324
|
+
}>;
|
|
325
|
+
type StudioSandboxViewAccess = Readonly<{
|
|
326
|
+
mode: "local";
|
|
327
|
+
}> | Readonly<{
|
|
328
|
+
mode: "authorize";
|
|
329
|
+
authorize(args: StudioSandboxViewAuthorizeArgs): boolean | Promise<boolean>;
|
|
330
|
+
}>;
|
|
331
|
+
type StudioSandboxViewAuthentication = Readonly<{
|
|
332
|
+
type: "none";
|
|
333
|
+
}> | Readonly<{
|
|
334
|
+
type: "password";
|
|
335
|
+
password: string;
|
|
336
|
+
}>;
|
|
337
|
+
type StudioSandboxViewRegistration = Readonly<{
|
|
338
|
+
id: string;
|
|
339
|
+
label: string;
|
|
340
|
+
source: StudioSandboxViewSource;
|
|
341
|
+
access: StudioSandboxViewAccess;
|
|
342
|
+
authentication: StudioSandboxViewAuthentication;
|
|
343
|
+
}>;
|
|
344
|
+
type StudioSandboxRegistration = Readonly<{
|
|
345
|
+
inspector: StudioSandboxInspector;
|
|
346
|
+
agentIds?: readonly string[];
|
|
347
|
+
toolNames?: readonly string[];
|
|
348
|
+
views?: readonly StudioSandboxViewRegistration[];
|
|
349
|
+
}>;
|
|
350
|
+
type StudioSandboxViewSummary = {
|
|
351
|
+
id: string;
|
|
352
|
+
label: string;
|
|
353
|
+
protocol: "novnc";
|
|
354
|
+
};
|
|
355
|
+
type StudioSandboxViewConnection = {
|
|
356
|
+
sandboxRef: string;
|
|
357
|
+
viewId: string;
|
|
358
|
+
protocol: "novnc";
|
|
359
|
+
websocketPath: string;
|
|
360
|
+
authentication: StudioSandboxViewAuthentication;
|
|
242
361
|
};
|
|
243
362
|
type StudioSandboxSummary = {
|
|
244
363
|
ref: string;
|
|
@@ -247,6 +366,7 @@ type StudioSandboxSummary = {
|
|
|
247
366
|
workdir: string;
|
|
248
367
|
agentIds: string[];
|
|
249
368
|
toolNames: string[];
|
|
369
|
+
views: StudioSandboxViewSummary[];
|
|
250
370
|
capabilities: StudioSandboxCapabilities;
|
|
251
371
|
};
|
|
252
372
|
type StudioSandboxesSummary = {
|
|
@@ -408,7 +528,7 @@ type StudioSessionListOptions = {
|
|
|
408
528
|
agentId?: string;
|
|
409
529
|
limit: number;
|
|
410
530
|
};
|
|
411
|
-
type StudioSessionRunStatus = "running" | "success" | "error" | "cancelled";
|
|
531
|
+
type StudioSessionRunStatus = "running" | "success" | "suspended" | "error" | "cancelled";
|
|
412
532
|
type StudioSessionRunTranscriptInput = {
|
|
413
533
|
id: string;
|
|
414
534
|
runId: string;
|
|
@@ -460,7 +580,7 @@ type StudioSessionStore = StudioMemoryStore & {
|
|
|
460
580
|
listSessionLogs?(options: StudioSessionLogListOptions): StudioSessionLogEntry[] | Promise<StudioSessionLogEntry[]>;
|
|
461
581
|
deleteSession?(id: string): boolean | Promise<boolean>;
|
|
462
582
|
};
|
|
463
|
-
type StudioTraceStatus = "running" | "success" | "error";
|
|
583
|
+
type StudioTraceStatus = "running" | "success" | "suspended" | "error";
|
|
464
584
|
type StudioTraceObservationKind = "agent" | "generation" | "tool";
|
|
465
585
|
type StudioTraceObservation = {
|
|
466
586
|
id: string;
|
|
@@ -720,6 +840,7 @@ type StudioOptions = {
|
|
|
720
840
|
stores?: StudioStores;
|
|
721
841
|
ui?: boolean | StudioUiOptions;
|
|
722
842
|
models?: StudioModelConfig;
|
|
843
|
+
sandboxes?: readonly StudioSandboxRegistration[];
|
|
723
844
|
};
|
|
724
845
|
type StudioServeOptions = {
|
|
725
846
|
port?: number;
|
|
@@ -731,25 +852,7 @@ type StudioServeLifecycleOptions = Omit<StudioServeOptions, "handleSignals"> & {
|
|
|
731
852
|
signal?: AbortSignal;
|
|
732
853
|
onShutdown?: () => void | Promise<void>;
|
|
733
854
|
};
|
|
734
|
-
type StudioToolApprovalDecision = {
|
|
735
|
-
approved: boolean;
|
|
736
|
-
reason?: string;
|
|
737
|
-
};
|
|
738
855
|
type StudioToolApprovalStatus = "pending" | "approved" | "rejected" | "timed_out" | "cancelled";
|
|
739
|
-
type StudioToolApproval = {
|
|
740
|
-
id: string;
|
|
741
|
-
runId: string;
|
|
742
|
-
agentId: string;
|
|
743
|
-
sessionId?: string;
|
|
744
|
-
toolName: string;
|
|
745
|
-
callId?: string;
|
|
746
|
-
internalCallId: string;
|
|
747
|
-
args: string;
|
|
748
|
-
status: StudioToolApprovalStatus;
|
|
749
|
-
requestedAt: string;
|
|
750
|
-
resolvedAt?: string;
|
|
751
|
-
reason?: string;
|
|
752
|
-
};
|
|
753
856
|
type StudioToolApprovalTranscript = {
|
|
754
857
|
id: string;
|
|
755
858
|
status: StudioToolApprovalStatus;
|
|
@@ -757,14 +860,6 @@ type StudioToolApprovalTranscript = {
|
|
|
757
860
|
resolvedAt?: string;
|
|
758
861
|
reason?: string;
|
|
759
862
|
};
|
|
760
|
-
type StudioToolApprovalRequestEvent = {
|
|
761
|
-
type: "tool_approval_request";
|
|
762
|
-
approval: StudioToolApproval;
|
|
763
|
-
};
|
|
764
|
-
type StudioToolApprovalResultEvent = {
|
|
765
|
-
type: "tool_approval_result";
|
|
766
|
-
approval: StudioToolApproval;
|
|
767
|
-
};
|
|
768
863
|
type StudioToolQuestionChoice = {
|
|
769
864
|
label: string;
|
|
770
865
|
value: string;
|
|
@@ -773,6 +868,7 @@ type StudioToolQuestionPrompt = {
|
|
|
773
868
|
id: string;
|
|
774
869
|
question: string;
|
|
775
870
|
choices: StudioToolQuestionChoice[];
|
|
871
|
+
allowCustom: boolean;
|
|
776
872
|
};
|
|
777
873
|
type StudioToolQuestionAnswer = {
|
|
778
874
|
questionId: string;
|
|
@@ -781,22 +877,6 @@ type StudioToolQuestionAnswer = {
|
|
|
781
877
|
custom?: boolean;
|
|
782
878
|
};
|
|
783
879
|
type StudioToolQuestionStatus = "pending" | "answered" | "cancelled";
|
|
784
|
-
type StudioToolQuestion = {
|
|
785
|
-
id: string;
|
|
786
|
-
runId: string;
|
|
787
|
-
agentId: string;
|
|
788
|
-
sessionId?: string;
|
|
789
|
-
toolName: string;
|
|
790
|
-
callId?: string;
|
|
791
|
-
internalCallId: string;
|
|
792
|
-
args: string;
|
|
793
|
-
questions: StudioToolQuestionPrompt[];
|
|
794
|
-
status: StudioToolQuestionStatus;
|
|
795
|
-
requestedAt: string;
|
|
796
|
-
answeredAt?: string;
|
|
797
|
-
cancelledAt?: string;
|
|
798
|
-
answers?: StudioToolQuestionAnswer[];
|
|
799
|
-
};
|
|
800
880
|
type StudioToolQuestionTranscript = {
|
|
801
881
|
id: string;
|
|
802
882
|
status: StudioToolQuestionStatus;
|
|
@@ -806,14 +886,6 @@ type StudioToolQuestionTranscript = {
|
|
|
806
886
|
questions: StudioToolQuestionPrompt[];
|
|
807
887
|
answers?: StudioToolQuestionAnswer[];
|
|
808
888
|
};
|
|
809
|
-
type StudioToolQuestionRequestEvent = {
|
|
810
|
-
type: "tool_question_request";
|
|
811
|
-
question: StudioToolQuestion;
|
|
812
|
-
};
|
|
813
|
-
type StudioToolQuestionResultEvent = {
|
|
814
|
-
type: "tool_question_result";
|
|
815
|
-
question: StudioToolQuestion;
|
|
816
|
-
};
|
|
817
889
|
type StudioSessionLogEvent = {
|
|
818
890
|
type: "session_log";
|
|
819
891
|
log: StudioSessionLogEntry;
|
|
@@ -912,21 +984,33 @@ type StudioPipelineRunResponse = {
|
|
|
912
984
|
pipelineId: string;
|
|
913
985
|
output: JsonValue;
|
|
914
986
|
};
|
|
915
|
-
type
|
|
987
|
+
type AgentRunRequestBase = {
|
|
988
|
+
stream?: boolean;
|
|
989
|
+
metadata?: JsonObject;
|
|
990
|
+
trace?: AgentTraceOptions;
|
|
991
|
+
};
|
|
992
|
+
type AgentRunRequest = (AgentRunRequestBase & {
|
|
993
|
+
type: "messages";
|
|
916
994
|
messages: readonly Message[];
|
|
917
995
|
sessionId?: string;
|
|
918
|
-
stream?: boolean;
|
|
919
996
|
maxTurns?: number;
|
|
920
997
|
toolConcurrency?: number;
|
|
921
998
|
model?: StudioModelRef;
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}
|
|
925
|
-
type
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
999
|
+
interactionId?: never;
|
|
1000
|
+
response?: never;
|
|
1001
|
+
}) | (AgentRunRequestBase & {
|
|
1002
|
+
type: "interaction_response";
|
|
1003
|
+
interactionId: string;
|
|
1004
|
+
response: AgentInteractionResponse;
|
|
1005
|
+
messages?: never;
|
|
1006
|
+
sessionId?: never;
|
|
1007
|
+
maxTurns?: never;
|
|
1008
|
+
toolConcurrency?: never;
|
|
1009
|
+
model?: never;
|
|
1010
|
+
});
|
|
1011
|
+
type AgentRunResponse = Exclude<AgentResult, AgentSuspendedResult> | Omit<AgentSuspendedResult, "continuation" | "messages">;
|
|
1012
|
+
type AgentRunStreamEvent = AgentStreamEvent | StudioSessionLogEvent | StudioPipelineLogEvent | StudioPipelineFinalEvent;
|
|
1013
|
+
type StudioErrorCode = "bad_request" | "conflict" | "forbidden" | "not_found" | "payload_too_large" | "unsupported_capability" | "internal_error";
|
|
930
1014
|
type StudioErrorResponse = {
|
|
931
1015
|
error: {
|
|
932
1016
|
code: StudioErrorCode;
|
|
@@ -956,6 +1040,7 @@ declare class Studio implements AnviaStudio {
|
|
|
956
1040
|
private readonly options;
|
|
957
1041
|
private studio;
|
|
958
1042
|
private server;
|
|
1043
|
+
private websocketServer;
|
|
959
1044
|
private sigintHandler;
|
|
960
1045
|
constructor(targets?: StudioTarget[], options?: StudioOptions);
|
|
961
1046
|
get app(): Hono;
|
|
@@ -975,4 +1060,4 @@ declare function createSqliteSessionStore(options?: SqliteSessionStoreOptions):
|
|
|
975
1060
|
|
|
976
1061
|
declare function createInMemoryStudioStore(): StudioSessionStore & StudioTraceStore & StudioPipelineLogStore & StudioPipelineRunStore;
|
|
977
1062
|
|
|
978
|
-
export { type AgentRunRequest, type AgentRunResponse, type AgentRunStreamEvent, type AgentTraceInfo, type AgentTraceOptions, type AnviaStudio, type SqliteSessionStoreOptions, Studio, type StudioAgent, type StudioAgentConfig, type StudioAgentKnowledgeConfig, type StudioAgentMcpServerMetadata, type StudioAgentMcpToolMetadata, type StudioAgentMcpsSummary, type StudioAgentModelPolicy, type StudioAgentModelPolicyConfig, type StudioAgentModelsSummary, type StudioAgentRuntimeSummary, type StudioAgentToolApprovalMetadata, type StudioAgentToolMetadata, type StudioAgentToolSource, type StudioAgentToolsSummary, type StudioCapability, type StudioCapabilityConfig, type StudioConfig, type StudioErrorCode, type StudioErrorResponse, type StudioEvalCasePreview, type StudioEvalMetricSummary, type StudioEvalRunRequest, type StudioEvalRunResponse, type StudioEvalSuite, type StudioEvalSuiteConfig, type StudioKnowledgeEvidence, type StudioKnowledgeEvidenceDocument, type StudioKnowledgeItem, type StudioKnowledgeItemKind, type StudioKnowledgeItemsPage, type StudioKnowledgeSourceKind, type StudioKnowledgeSourceSummary, type StudioKnowledgeSummary, type StudioMemoryAppendOptions, type StudioMemoryConversationMessages, type StudioMemoryConversationSteps, type StudioMemoryConversationSummary, type StudioMemoryConversationsPage, type StudioMemoryErrorOptions, type StudioMemoryMessageRecord, type StudioMemoryScope, type StudioMemorySourceConversationMessages, type StudioMemorySourceConversationSteps, type StudioMemorySourceConversationSummary, type StudioMemorySourceConversationsPage, type StudioMemorySourceKind, type StudioMemorySourceSummary, type StudioMemorySourceUsersPage, type StudioMemorySourcesPage, type StudioMemoryStore, type StudioMemoryUserSummary, type StudioMemoryUsersPage, type StudioModelConfig, type StudioModelDefinition, type StudioModelModalities, type StudioModelModality, type StudioModelProvider, type StudioModelProviderConfig, type StudioModelRef, type StudioModelSummary, type StudioModelsConfig, type StudioObservabilityEvent, type StudioObservabilityEventType, type StudioOptions, type StudioPipeline, type StudioPipelineConfig, type StudioPipelineDetail, type StudioPipelineFinalEvent, type StudioPipelineLogAppendInput, type StudioPipelineLogCategory, type StudioPipelineLogEntry, type StudioPipelineLogEvent, type StudioPipelineLogLevel, type StudioPipelineLogListOptions, type StudioPipelineLogStore, type StudioPipelineReplayRequest, type StudioPipelineRunGetOptions, type StudioPipelineRunListOptions, type StudioPipelineRunRecord, type StudioPipelineRunRequest, type StudioPipelineRunResponse, type StudioPipelineRunSaveInput, type StudioPipelineRunStatus, type StudioPipelineRunStore, type StudioSandboxCapabilities, type StudioSandboxFileEntry, type StudioSandboxFileType, type StudioSandboxFilesResponse, type StudioSandboxPort, type StudioSandboxPortsResponse, type StudioSandboxProcess, type StudioSandboxProcessLogsResponse, type StudioSandboxProcessStatus, type StudioSandboxProcessesResponse, type StudioSandboxSummary, type
|
|
1063
|
+
export { type AgentRunRequest, type AgentRunResponse, type AgentRunStreamEvent, type AgentTraceInfo, type AgentTraceOptions, type AnviaStudio, type SqliteSessionStoreOptions, Studio, type StudioAgent, type StudioAgentConfig, type StudioAgentKnowledgeConfig, type StudioAgentMcpServerMetadata, type StudioAgentMcpToolMetadata, type StudioAgentMcpsSummary, type StudioAgentModelPolicy, type StudioAgentModelPolicyConfig, type StudioAgentModelsSummary, type StudioAgentRuntimeSummary, type StudioAgentToolApprovalMetadata, type StudioAgentToolMetadata, type StudioAgentToolSource, type StudioAgentToolsSummary, type StudioCapability, type StudioCapabilityConfig, type StudioConfig, type StudioErrorCode, type StudioErrorResponse, type StudioEvalCasePreview, type StudioEvalMetricSummary, type StudioEvalRunRequest, type StudioEvalRunResponse, type StudioEvalSuite, type StudioEvalSuiteConfig, type StudioKnowledgeEvidence, type StudioKnowledgeEvidenceDocument, type StudioKnowledgeItem, type StudioKnowledgeItemKind, type StudioKnowledgeItemsPage, type StudioKnowledgeSourceKind, type StudioKnowledgeSourceSummary, type StudioKnowledgeSummary, type StudioMemoryAppendOptions, type StudioMemoryConversationMessages, type StudioMemoryConversationSteps, type StudioMemoryConversationSummary, type StudioMemoryConversationsPage, type StudioMemoryErrorOptions, type StudioMemoryMessageRecord, type StudioMemoryScope, type StudioMemorySourceConversationMessages, type StudioMemorySourceConversationSteps, type StudioMemorySourceConversationSummary, type StudioMemorySourceConversationsPage, type StudioMemorySourceKind, type StudioMemorySourceSummary, type StudioMemorySourceUsersPage, type StudioMemorySourcesPage, type StudioMemoryStore, type StudioMemoryUserSummary, type StudioMemoryUsersPage, type StudioModelConfig, type StudioModelDefinition, type StudioModelModalities, type StudioModelModality, type StudioModelProvider, type StudioModelProviderConfig, type StudioModelRef, type StudioModelSummary, type StudioModelsConfig, type StudioObservabilityEvent, type StudioObservabilityEventType, type StudioOptions, type StudioPipeline, type StudioPipelineConfig, type StudioPipelineDetail, type StudioPipelineFinalEvent, type StudioPipelineLogAppendInput, type StudioPipelineLogCategory, type StudioPipelineLogEntry, type StudioPipelineLogEvent, type StudioPipelineLogLevel, type StudioPipelineLogListOptions, type StudioPipelineLogStore, type StudioPipelineReplayRequest, type StudioPipelineRunGetOptions, type StudioPipelineRunListOptions, type StudioPipelineRunRecord, type StudioPipelineRunRequest, type StudioPipelineRunResponse, type StudioPipelineRunSaveInput, type StudioPipelineRunStatus, type StudioPipelineRunStore, type StudioSandboxCapabilities, type StudioSandboxFileEntry, type StudioSandboxFileType, type StudioSandboxFilesResponse, type StudioSandboxInspector, type StudioSandboxInspectorFileEntry, type StudioSandboxInspectorPort, type StudioSandboxInspectorProcess, type StudioSandboxInspectorProcessLogs, type StudioSandboxPort, type StudioSandboxPortsResponse, type StudioSandboxProcess, type StudioSandboxProcessLogsResponse, type StudioSandboxProcessStatus, type StudioSandboxProcessesResponse, type StudioSandboxRegistration, type StudioSandboxSummary, type StudioSandboxViewAccess, type StudioSandboxViewAuthentication, type StudioSandboxViewAuthorizeArgs, type StudioSandboxViewConnection, type StudioSandboxViewControl, type StudioSandboxViewControlLease, type StudioSandboxViewControlSnapshot, type StudioSandboxViewRegistration, type StudioSandboxViewSource, type StudioSandboxViewSummary, type StudioSandboxesSummary, type StudioServeLifecycleOptions, type StudioServeOptions, type StudioSession, type StudioSessionCreateInput, type StudioSessionListOptions, type StudioSessionLogAppendInput, type StudioSessionLogCategory, type StudioSessionLogEntry, type StudioSessionLogEvent, type StudioSessionLogLevel, type StudioSessionLogListOptions, type StudioSessionRunStatus, type StudioSessionRunTranscriptInput, type StudioSessionStore, type StudioSessionSummary, type StudioSessionTraceListOptions, type StudioStaticKnowledgeDocument, type StudioStatusSummary, type StudioStores, type StudioTarget, type StudioToolApprovalStatus, type StudioToolApprovalTranscript, type StudioToolQuestionAnswer, type StudioToolQuestionChoice, type StudioToolQuestionPrompt, type StudioToolQuestionStatus, type StudioToolQuestionTranscript, type StudioToolRunRequest, type StudioToolRunResponse, type StudioTrace, type StudioTraceListOptions, type StudioTraceObservation, type StudioTraceObservationKind, StudioTraceObserver, type StudioTraceObserverOptions, type StudioTraceStatus, type StudioTraceStore, type StudioTraceSummary, type StudioTranscriptAttachment, type StudioTranscriptChatEntry, type StudioTranscriptChildAgentEvent, type StudioTranscriptEntry, type StudioTranscriptReasoningEntry, type StudioTranscriptToolEntry, type StudioUiOptions, createInMemoryStudioStore, createSqliteSessionStore, traceSummary };
|