@anvia/studio 0.3.0 → 0.4.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.
- package/README.md +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -4
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/{index-B0bCx2Nv.js → index-B4i1IueG.js} +9 -9
- package/dist/ui/assets/{index-B0bCx2Nv.js.map → index-B4i1IueG.js.map} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ type StudioAgent = {
|
|
|
10
10
|
quickPrompts?: string[];
|
|
11
11
|
metadata?: JsonObject;
|
|
12
12
|
};
|
|
13
|
-
type StudioTarget = Agent | Pipeline<
|
|
13
|
+
type StudioTarget = Agent | Pipeline<any, any>;
|
|
14
14
|
type StudioAgentConfig = {
|
|
15
15
|
id: string;
|
|
16
16
|
name?: string;
|
|
@@ -39,7 +39,7 @@ type StudioAgentRuntimeSummary = {
|
|
|
39
39
|
};
|
|
40
40
|
type StudioPipeline = {
|
|
41
41
|
id: string;
|
|
42
|
-
pipeline: Pipeline<
|
|
42
|
+
pipeline: Pipeline<any, any>;
|
|
43
43
|
name?: string;
|
|
44
44
|
description?: string;
|
|
45
45
|
metadata?: JsonObject;
|
package/dist/index.js
CHANGED
|
@@ -589,6 +589,7 @@ function registerStudioUi(app, options) {
|
|
|
589
589
|
app.get(`${options.path}/tools`, async (c) => c.html(await renderShell()));
|
|
590
590
|
app.get(`${options.path}/mcps`, async (c) => c.html(await renderShell()));
|
|
591
591
|
app.get(`${options.path}/pipelines`, async (c) => c.html(await renderShell()));
|
|
592
|
+
app.get(`${options.path}/evals`, async (c) => c.html(await renderShell()));
|
|
592
593
|
app.get(`${options.path}/memory`, async (c) => c.html(await renderShell()));
|
|
593
594
|
app.get(`${options.path}/status`, async (c) => c.html(await renderShell()));
|
|
594
595
|
app.get(`${options.path}/knowledge`, async (c) => c.html(await renderShell()));
|
|
@@ -696,7 +697,7 @@ function normalizeUiPath(path) {
|
|
|
696
697
|
return withoutTrailingSlash;
|
|
697
698
|
}
|
|
698
699
|
function studioUiEntryPath(options) {
|
|
699
|
-
return options.
|
|
700
|
+
return `${options.path}/playground`;
|
|
700
701
|
}
|
|
701
702
|
async function readBundledUiIndex() {
|
|
702
703
|
try {
|
|
@@ -2179,6 +2180,9 @@ function formatJson(value) {
|
|
|
2179
2180
|
|
|
2180
2181
|
// src/runtime/json.ts
|
|
2181
2182
|
function toJsonValue2(value) {
|
|
2183
|
+
return toJsonValueInternal(value, /* @__PURE__ */ new WeakSet());
|
|
2184
|
+
}
|
|
2185
|
+
function toJsonValueInternal(value, seen) {
|
|
2182
2186
|
if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
2183
2187
|
return value;
|
|
2184
2188
|
}
|
|
@@ -2186,16 +2190,35 @@ function toJsonValue2(value) {
|
|
|
2186
2190
|
return null;
|
|
2187
2191
|
}
|
|
2188
2192
|
if (Array.isArray(value)) {
|
|
2189
|
-
|
|
2193
|
+
if (seen.has(value)) {
|
|
2194
|
+
return "[Circular]";
|
|
2195
|
+
}
|
|
2196
|
+
seen.add(value);
|
|
2197
|
+
try {
|
|
2198
|
+
return value.map((item) => toJsonValueInternal(item, seen));
|
|
2199
|
+
} finally {
|
|
2200
|
+
seen.delete(value);
|
|
2201
|
+
}
|
|
2190
2202
|
}
|
|
2191
2203
|
if (typeof value === "object") {
|
|
2192
|
-
|
|
2204
|
+
if (seen.has(value)) {
|
|
2205
|
+
return "[Circular]";
|
|
2206
|
+
}
|
|
2207
|
+
seen.add(value);
|
|
2208
|
+
try {
|
|
2209
|
+
return compactJsonObjectInternal(value, seen);
|
|
2210
|
+
} finally {
|
|
2211
|
+
seen.delete(value);
|
|
2212
|
+
}
|
|
2193
2213
|
}
|
|
2194
2214
|
return String(value);
|
|
2195
2215
|
}
|
|
2196
2216
|
function compactJsonObject2(values) {
|
|
2217
|
+
return compactJsonObjectInternal(values, /* @__PURE__ */ new WeakSet());
|
|
2218
|
+
}
|
|
2219
|
+
function compactJsonObjectInternal(values, seen) {
|
|
2197
2220
|
const entries = Object.entries(values).flatMap(
|
|
2198
|
-
([key, value]) => value === void 0 ? [] : [[key,
|
|
2221
|
+
([key, value]) => value === void 0 ? [] : [[key, toJsonValueInternal(value, seen)]]
|
|
2199
2222
|
);
|
|
2200
2223
|
return Object.fromEntries(entries);
|
|
2201
2224
|
}
|
|
@@ -5923,6 +5946,7 @@ var Studio = class {
|
|
|
5923
5946
|
function studioOptionsFromTargets(targets, options) {
|
|
5924
5947
|
const agents = targets.filter((target) => target instanceof Agent);
|
|
5925
5948
|
const pipelines = targets.filter(
|
|
5949
|
+
// biome-ignore lint/suspicious/noExplicitAny: Studio accepts heterogeneous user pipelines.
|
|
5926
5950
|
(target) => target instanceof Pipeline
|
|
5927
5951
|
);
|
|
5928
5952
|
return {
|