@loopstack/loopstack-studio 0.23.1 → 0.24.0
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/api/index.js +12 -10
- package/dist/api/secrets.js +16 -0
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +168 -108
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiWidget.js +36 -27
- package/dist/components/ui-widgets/widgets/SecretInput.js +42 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +47 -30
- package/dist/features/documents/components/DocumentList.js +5 -1
- package/dist/features/documents/renderers/AiMessage.js +11 -11
- package/dist/features/documents/renderers/DocumentFormRenderer.js +17 -11
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +32 -25
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +57 -49
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +46 -34
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/query-keys.js +41 -34
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +2 -2
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/EmbedWorkbenchPage.js +43 -39
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { util } from "./helpers/util.js";
|
|
2
|
-
const ZodIssueCode = util.arrayToEnum([
|
|
3
|
-
"invalid_type",
|
|
4
|
-
"invalid_literal",
|
|
5
|
-
"custom",
|
|
6
|
-
"invalid_union",
|
|
7
|
-
"invalid_union_discriminator",
|
|
8
|
-
"invalid_enum_value",
|
|
9
|
-
"unrecognized_keys",
|
|
10
|
-
"invalid_arguments",
|
|
11
|
-
"invalid_return_type",
|
|
12
|
-
"invalid_date",
|
|
13
|
-
"invalid_string",
|
|
14
|
-
"too_small",
|
|
15
|
-
"too_big",
|
|
16
|
-
"invalid_intersection_types",
|
|
17
|
-
"not_multiple_of",
|
|
18
|
-
"not_finite"
|
|
19
|
-
]);
|
|
20
|
-
var ZodError = class t extends Error {
|
|
21
|
-
get errors() {
|
|
22
|
-
return this.issues;
|
|
23
|
-
}
|
|
24
|
-
constructor(e) {
|
|
25
|
-
super(), this.issues = [], this.addIssue = (e) => {
|
|
26
|
-
this.issues = [...this.issues, e];
|
|
27
|
-
}, this.addIssues = (e = []) => {
|
|
28
|
-
this.issues = [...this.issues, ...e];
|
|
29
|
-
};
|
|
30
|
-
let t = new.target.prototype;
|
|
31
|
-
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
32
|
-
}
|
|
33
|
-
format(e) {
|
|
34
|
-
let t = e || function(e) {
|
|
35
|
-
return e.message;
|
|
36
|
-
}, n = { _errors: [] }, r = (e) => {
|
|
37
|
-
for (let i of e.issues) if (i.code === "invalid_union") i.unionErrors.map(r);
|
|
38
|
-
else if (i.code === "invalid_return_type") r(i.returnTypeError);
|
|
39
|
-
else if (i.code === "invalid_arguments") r(i.argumentsError);
|
|
40
|
-
else if (i.path.length === 0) n._errors.push(t(i));
|
|
41
|
-
else {
|
|
42
|
-
let e = n, r = 0;
|
|
43
|
-
for (; r < i.path.length;) {
|
|
44
|
-
let n = i.path[r];
|
|
45
|
-
r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return r(this), n;
|
|
50
|
-
}
|
|
51
|
-
static assert(e) {
|
|
52
|
-
if (!(e instanceof t)) throw Error(`Not a ZodError: ${e}`);
|
|
53
|
-
}
|
|
54
|
-
toString() {
|
|
55
|
-
return this.message;
|
|
56
|
-
}
|
|
57
|
-
get message() {
|
|
58
|
-
return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
|
|
59
|
-
}
|
|
60
|
-
get isEmpty() {
|
|
61
|
-
return this.issues.length === 0;
|
|
62
|
-
}
|
|
63
|
-
flatten(e = (e) => e.message) {
|
|
64
|
-
let t = Object.create(null), n = [];
|
|
65
|
-
for (let r of this.issues) if (r.path.length > 0) {
|
|
66
|
-
let n = r.path[0];
|
|
67
|
-
t[n] = t[n] || [], t[n].push(e(r));
|
|
68
|
-
} else n.push(e(r));
|
|
69
|
-
return {
|
|
70
|
-
formErrors: n,
|
|
71
|
-
fieldErrors: t
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
get formErrors() {
|
|
75
|
-
return this.flatten();
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
ZodError.create = (e) => new ZodError(e);
|
|
79
|
-
export { ZodError, ZodIssueCode };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import en_default from "../locales/en.js";
|
|
2
|
-
import { getErrorMap } from "../errors.js";
|
|
3
|
-
const makeIssue = (e) => {
|
|
4
|
-
let { data: i, path: a, errorMaps: o, issueData: s } = e, c = [...a, ...s.path || []], l = {
|
|
5
|
-
...s,
|
|
6
|
-
path: c
|
|
7
|
-
};
|
|
8
|
-
if (s.message !== void 0) return {
|
|
9
|
-
...s,
|
|
10
|
-
path: c,
|
|
11
|
-
message: s.message
|
|
12
|
-
};
|
|
13
|
-
let u = "", d = o.filter((e) => !!e).slice().reverse();
|
|
14
|
-
for (let e of d) u = e(l, {
|
|
15
|
-
data: i,
|
|
16
|
-
defaultError: u
|
|
17
|
-
}).message;
|
|
18
|
-
return {
|
|
19
|
-
...s,
|
|
20
|
-
path: c,
|
|
21
|
-
message: u
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
function addIssueToContext(o, s) {
|
|
25
|
-
let c = getErrorMap(), l = makeIssue({
|
|
26
|
-
issueData: s,
|
|
27
|
-
data: o.data,
|
|
28
|
-
path: o.path,
|
|
29
|
-
errorMaps: [
|
|
30
|
-
o.common.contextualErrorMap,
|
|
31
|
-
o.schemaErrorMap,
|
|
32
|
-
c,
|
|
33
|
-
c === en_default ? void 0 : en_default
|
|
34
|
-
].filter((e) => !!e)
|
|
35
|
-
});
|
|
36
|
-
o.common.issues.push(l);
|
|
37
|
-
}
|
|
38
|
-
var ParseStatus = class e {
|
|
39
|
-
constructor() {
|
|
40
|
-
this.value = "valid";
|
|
41
|
-
}
|
|
42
|
-
dirty() {
|
|
43
|
-
this.value === "valid" && (this.value = "dirty");
|
|
44
|
-
}
|
|
45
|
-
abort() {
|
|
46
|
-
this.value !== "aborted" && (this.value = "aborted");
|
|
47
|
-
}
|
|
48
|
-
static mergeArray(e, i) {
|
|
49
|
-
let a = [];
|
|
50
|
-
for (let o of i) {
|
|
51
|
-
if (o.status === "aborted") return INVALID;
|
|
52
|
-
o.status === "dirty" && e.dirty(), a.push(o.value);
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
status: e.value,
|
|
56
|
-
value: a
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
static async mergeObjectAsync(i, a) {
|
|
60
|
-
let o = [];
|
|
61
|
-
for (let e of a) {
|
|
62
|
-
let i = await e.key, a = await e.value;
|
|
63
|
-
o.push({
|
|
64
|
-
key: i,
|
|
65
|
-
value: a
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return e.mergeObjectSync(i, o);
|
|
69
|
-
}
|
|
70
|
-
static mergeObjectSync(e, i) {
|
|
71
|
-
let a = {};
|
|
72
|
-
for (let o of i) {
|
|
73
|
-
let { key: i, value: s } = o;
|
|
74
|
-
if (i.status === "aborted" || s.status === "aborted") return INVALID;
|
|
75
|
-
i.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), i.value !== "__proto__" && (s.value !== void 0 || o.alwaysSet) && (a[i.value] = s.value);
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
status: e.value,
|
|
79
|
-
value: a
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const INVALID = Object.freeze({ status: "aborted" }), DIRTY = (e) => ({
|
|
84
|
-
status: "dirty",
|
|
85
|
-
value: e
|
|
86
|
-
}), OK = (e) => ({
|
|
87
|
-
status: "valid",
|
|
88
|
-
value: e
|
|
89
|
-
}), isAborted = (e) => e.status === "aborted", isDirty = (e) => e.status === "dirty", isValid = (e) => e.status === "valid", isAsync = (e) => typeof Promise < "u" && e instanceof Promise;
|
|
90
|
-
export { DIRTY, INVALID, OK, ParseStatus, addIssueToContext, isAborted, isAsync, isDirty, isValid, makeIssue };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var util;
|
|
2
|
-
(function(e) {
|
|
3
|
-
e.assertEqual = (e) => {};
|
|
4
|
-
function t(e) {}
|
|
5
|
-
e.assertIs = t;
|
|
6
|
-
function n(e) {
|
|
7
|
-
throw Error();
|
|
8
|
-
}
|
|
9
|
-
e.assertNever = n, e.arrayToEnum = (e) => {
|
|
10
|
-
let t = {};
|
|
11
|
-
for (let n of e) t[n] = n;
|
|
12
|
-
return t;
|
|
13
|
-
}, e.getValidEnumValues = (t) => {
|
|
14
|
-
let n = e.objectKeys(t).filter((e) => typeof t[t[e]] != "number"), r = {};
|
|
15
|
-
for (let e of n) r[e] = t[e];
|
|
16
|
-
return e.objectValues(r);
|
|
17
|
-
}, e.objectValues = (t) => e.objectKeys(t).map(function(e) {
|
|
18
|
-
return t[e];
|
|
19
|
-
}), e.objectKeys = typeof Object.keys == "function" ? (e) => Object.keys(e) : (e) => {
|
|
20
|
-
let t = [];
|
|
21
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
|
|
22
|
-
return t;
|
|
23
|
-
}, e.find = (e, t) => {
|
|
24
|
-
for (let n of e) if (t(n)) return n;
|
|
25
|
-
}, e.isInteger = typeof Number.isInteger == "function" ? (e) => Number.isInteger(e) : (e) => typeof e == "number" && Number.isFinite(e) && Math.floor(e) === e;
|
|
26
|
-
function r(e, t = " | ") {
|
|
27
|
-
return e.map((e) => typeof e == "string" ? `'${e}'` : e).join(t);
|
|
28
|
-
}
|
|
29
|
-
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
30
|
-
})(util ||= {});
|
|
31
|
-
var objectUtil;
|
|
32
|
-
(function(e) {
|
|
33
|
-
e.mergeShapes = (e, t) => ({
|
|
34
|
-
...e,
|
|
35
|
-
...t
|
|
36
|
-
});
|
|
37
|
-
})(objectUtil ||= {});
|
|
38
|
-
const ZodParsedType = util.arrayToEnum([
|
|
39
|
-
"string",
|
|
40
|
-
"nan",
|
|
41
|
-
"number",
|
|
42
|
-
"integer",
|
|
43
|
-
"float",
|
|
44
|
-
"boolean",
|
|
45
|
-
"date",
|
|
46
|
-
"bigint",
|
|
47
|
-
"symbol",
|
|
48
|
-
"function",
|
|
49
|
-
"undefined",
|
|
50
|
-
"null",
|
|
51
|
-
"array",
|
|
52
|
-
"object",
|
|
53
|
-
"unknown",
|
|
54
|
-
"promise",
|
|
55
|
-
"void",
|
|
56
|
-
"never",
|
|
57
|
-
"map",
|
|
58
|
-
"set"
|
|
59
|
-
]), getParsedType = (e) => {
|
|
60
|
-
switch (typeof e) {
|
|
61
|
-
case "undefined": return ZodParsedType.undefined;
|
|
62
|
-
case "string": return ZodParsedType.string;
|
|
63
|
-
case "number": return Number.isNaN(e) ? ZodParsedType.nan : ZodParsedType.number;
|
|
64
|
-
case "boolean": return ZodParsedType.boolean;
|
|
65
|
-
case "function": return ZodParsedType.function;
|
|
66
|
-
case "bigint": return ZodParsedType.bigint;
|
|
67
|
-
case "symbol": return ZodParsedType.symbol;
|
|
68
|
-
case "object": return Array.isArray(e) ? ZodParsedType.array : e === null ? ZodParsedType.null : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? ZodParsedType.promise : typeof Map < "u" && e instanceof Map ? ZodParsedType.map : typeof Set < "u" && e instanceof Set ? ZodParsedType.set : typeof Date < "u" && e instanceof Date ? ZodParsedType.date : ZodParsedType.object;
|
|
69
|
-
default: return ZodParsedType.unknown;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
export { ZodParsedType, getParsedType, util };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ZodParsedType, util } from "../helpers/util.js";
|
|
2
|
-
import { ZodIssueCode } from "../ZodError.js";
|
|
3
|
-
var en_default = (r, i) => {
|
|
4
|
-
let a;
|
|
5
|
-
switch (r.code) {
|
|
6
|
-
case ZodIssueCode.invalid_type:
|
|
7
|
-
a = r.received === ZodParsedType.undefined ? "Required" : `Expected ${r.expected}, received ${r.received}`;
|
|
8
|
-
break;
|
|
9
|
-
case ZodIssueCode.invalid_literal:
|
|
10
|
-
a = `Invalid literal value, expected ${JSON.stringify(r.expected, util.jsonStringifyReplacer)}`;
|
|
11
|
-
break;
|
|
12
|
-
case ZodIssueCode.unrecognized_keys:
|
|
13
|
-
a = `Unrecognized key(s) in object: ${util.joinValues(r.keys, ", ")}`;
|
|
14
|
-
break;
|
|
15
|
-
case ZodIssueCode.invalid_union:
|
|
16
|
-
a = "Invalid input";
|
|
17
|
-
break;
|
|
18
|
-
case ZodIssueCode.invalid_union_discriminator:
|
|
19
|
-
a = `Invalid discriminator value. Expected ${util.joinValues(r.options)}`;
|
|
20
|
-
break;
|
|
21
|
-
case ZodIssueCode.invalid_enum_value:
|
|
22
|
-
a = `Invalid enum value. Expected ${util.joinValues(r.options)}, received '${r.received}'`;
|
|
23
|
-
break;
|
|
24
|
-
case ZodIssueCode.invalid_arguments:
|
|
25
|
-
a = "Invalid function arguments";
|
|
26
|
-
break;
|
|
27
|
-
case ZodIssueCode.invalid_return_type:
|
|
28
|
-
a = "Invalid function return type";
|
|
29
|
-
break;
|
|
30
|
-
case ZodIssueCode.invalid_date:
|
|
31
|
-
a = "Invalid date";
|
|
32
|
-
break;
|
|
33
|
-
case ZodIssueCode.invalid_string:
|
|
34
|
-
typeof r.validation == "object" ? "includes" in r.validation ? (a = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (a = `${a} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? a = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? a = `Invalid input: must end with "${r.validation.endsWith}"` : util.assertNever(r.validation) : a = r.validation === "regex" ? "Invalid" : `Invalid ${r.validation}`;
|
|
35
|
-
break;
|
|
36
|
-
case ZodIssueCode.too_small:
|
|
37
|
-
a = r.type === "array" ? `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" || r.type === "bigint" ? `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(r.minimum))}` : "Invalid input";
|
|
38
|
-
break;
|
|
39
|
-
case ZodIssueCode.too_big:
|
|
40
|
-
a = r.type === "array" ? `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "less than"} ${r.maximum} element(s)` : r.type === "string" ? `String must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "under"} ${r.maximum} character(s)` : r.type === "number" ? `Number must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "bigint" ? `BigInt must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "date" ? `Date must be ${r.exact ? "exactly" : r.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(r.maximum))}` : "Invalid input";
|
|
41
|
-
break;
|
|
42
|
-
case ZodIssueCode.custom:
|
|
43
|
-
a = "Invalid input";
|
|
44
|
-
break;
|
|
45
|
-
case ZodIssueCode.invalid_intersection_types:
|
|
46
|
-
a = "Intersection results could not be merged";
|
|
47
|
-
break;
|
|
48
|
-
case ZodIssueCode.not_multiple_of:
|
|
49
|
-
a = `Number must be a multiple of ${r.multipleOf}`;
|
|
50
|
-
break;
|
|
51
|
-
case ZodIssueCode.not_finite:
|
|
52
|
-
a = "Number must be finite";
|
|
53
|
-
break;
|
|
54
|
-
default: a = i.defaultError, util.assertNever(r);
|
|
55
|
-
}
|
|
56
|
-
return { message: a };
|
|
57
|
-
};
|
|
58
|
-
export { en_default as default };
|