@llmnative/agentico 0.28.3 → 0.30.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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +326 -241
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +39 -11
- package/dist/server.mjs.map +1 -1
- package/dist/types/backend/agenticoBackend.d.ts +10 -0
- package/dist/types/i18n/types.d.ts +7 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/presentation/AgenticoConnectionsSettings.d.ts +1 -1
- package/dist/types/presentation/hostName.d.ts +1 -0
- package/dist/types/server/connections.d.ts +2 -0
- package/dist/types/server/memories.d.ts +14 -1
- package/dist/types/server/server.d.ts +3 -0
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -463,8 +463,6 @@ var Ke = {
|
|
|
463
463
|
runnerDraining: "Draining",
|
|
464
464
|
runnerAdd: "Add a runner",
|
|
465
465
|
runnerAddDescription: "Install one on your VPS, or connect one already installed.",
|
|
466
|
-
runnerName: "Name",
|
|
467
|
-
runnerRename: "Rename",
|
|
468
466
|
runnerVersion: "Version",
|
|
469
467
|
runnerLoad: "Chats",
|
|
470
468
|
runnerLoadValue: "{chats} of {max}",
|
|
@@ -481,6 +479,13 @@ var Ke = {
|
|
|
481
479
|
memoryName: "Name",
|
|
482
480
|
memoryApiUrl: "API address",
|
|
483
481
|
memoryMcpUrl: "MCP server",
|
|
482
|
+
memoryMcpUrlHint: "Optional: the MCP server the agents and the IDE use, when the memory has one.",
|
|
483
|
+
memoryKeySaved: "•••••••••••• saved",
|
|
484
|
+
memoryNamespaces: "Namespaces ({count})",
|
|
485
|
+
memoryNamespacesLoading: "Reading the namespaces…",
|
|
486
|
+
memoryNamespacesNone: "The memory has no namespaces yet.",
|
|
487
|
+
memoryDocuments: "{count} documents",
|
|
488
|
+
memoryMemories: "{count} memories",
|
|
484
489
|
memoryKey: "Key",
|
|
485
490
|
memoryKeyKeep: "Empty: the saved key stays.",
|
|
486
491
|
memoryCheck: "Check",
|
|
@@ -691,8 +696,6 @@ var Ke = {
|
|
|
691
696
|
runnerDraining: "In svuotamento",
|
|
692
697
|
runnerAdd: "Aggiungi un runner",
|
|
693
698
|
runnerAddDescription: "Installane uno sulla tua VPS, o collegane uno già installato.",
|
|
694
|
-
runnerName: "Nome",
|
|
695
|
-
runnerRename: "Rinomina",
|
|
696
699
|
runnerVersion: "Versione",
|
|
697
700
|
runnerLoad: "Chat",
|
|
698
701
|
runnerLoadValue: "{chats} su {max}",
|
|
@@ -709,6 +712,13 @@ var Ke = {
|
|
|
709
712
|
memoryName: "Nome",
|
|
710
713
|
memoryApiUrl: "Indirizzo API",
|
|
711
714
|
memoryMcpUrl: "Server MCP",
|
|
715
|
+
memoryMcpUrlHint: "Facoltativo: il server MCP che gli agenti e l'IDE usano, se la memoria ne ha uno.",
|
|
716
|
+
memoryKeySaved: "•••••••••••• salvata",
|
|
717
|
+
memoryNamespaces: "Namespace ({count})",
|
|
718
|
+
memoryNamespacesLoading: "Leggo i namespace…",
|
|
719
|
+
memoryNamespacesNone: "La memoria non ha ancora namespace.",
|
|
720
|
+
memoryDocuments: "{count} documenti",
|
|
721
|
+
memoryMemories: "{count} memorie",
|
|
712
722
|
memoryKey: "Chiave",
|
|
713
723
|
memoryKeyKeep: "Vuota: resta la chiave salvata.",
|
|
714
724
|
memoryCheck: "Verifica",
|
|
@@ -919,8 +929,6 @@ var Ke = {
|
|
|
919
929
|
runnerDraining: "Wird geleert",
|
|
920
930
|
runnerAdd: "Runner hinzufügen",
|
|
921
931
|
runnerAddDescription: "Installieren Sie einen auf Ihrem VPS oder verbinden Sie einen bereits installierten.",
|
|
922
|
-
runnerName: "Name",
|
|
923
|
-
runnerRename: "Umbenennen",
|
|
924
932
|
runnerVersion: "Version",
|
|
925
933
|
runnerLoad: "Chats",
|
|
926
934
|
runnerLoadValue: "{chats} von {max}",
|
|
@@ -937,6 +945,13 @@ var Ke = {
|
|
|
937
945
|
memoryName: "Name",
|
|
938
946
|
memoryApiUrl: "API-Adresse",
|
|
939
947
|
memoryMcpUrl: "MCP-Server",
|
|
948
|
+
memoryMcpUrlHint: "Optional: der MCP-Server, den die Agenten und die IDE nutzen, wenn der Speicher einen hat.",
|
|
949
|
+
memoryKeySaved: "•••••••••••• gespeichert",
|
|
950
|
+
memoryNamespaces: "Namespaces ({count})",
|
|
951
|
+
memoryNamespacesLoading: "Lese die Namespaces…",
|
|
952
|
+
memoryNamespacesNone: "Der Speicher hat noch keine Namespaces.",
|
|
953
|
+
memoryDocuments: "{count} Dokumente",
|
|
954
|
+
memoryMemories: "{count} Erinnerungen",
|
|
940
955
|
memoryKey: "Schlüssel",
|
|
941
956
|
memoryKeyKeep: "Leer: der gespeicherte Schlüssel bleibt.",
|
|
942
957
|
memoryCheck: "Prüfen",
|
|
@@ -5095,9 +5110,33 @@ function _i({ onStack: e }) {
|
|
|
5095
5110
|
});
|
|
5096
5111
|
}
|
|
5097
5112
|
//#endregion
|
|
5098
|
-
//#region src/presentation/
|
|
5099
|
-
var vi =
|
|
5113
|
+
//#region src/presentation/hostName.ts
|
|
5114
|
+
var vi = /* @__PURE__ */ new Set([
|
|
5115
|
+
"co",
|
|
5116
|
+
"com",
|
|
5117
|
+
"net",
|
|
5118
|
+
"org",
|
|
5119
|
+
"gov",
|
|
5120
|
+
"edu",
|
|
5121
|
+
"ac"
|
|
5122
|
+
]);
|
|
5100
5123
|
function yi(e) {
|
|
5124
|
+
let t = String(e ?? "").trim();
|
|
5125
|
+
try {
|
|
5126
|
+
t = new URL(/^[a-z]+:\/\//i.test(t) ? t : `https://${t}`).hostname;
|
|
5127
|
+
} catch {}
|
|
5128
|
+
if (t = t.toLowerCase().replace(/\.$/, ""), /^\d{1,3}(\.\d{1,3}){3}$/.test(t)) return t;
|
|
5129
|
+
let n = /(?:^|[.-])(\d{1,3})[-.](\d{1,3})[-.](\d{1,3})[-.](\d{1,3})\.(?:sslip|nip)\.io$/.exec(t);
|
|
5130
|
+
if (n) return n.slice(1, 5).join(".");
|
|
5131
|
+
let r = t.split(".").filter(Boolean);
|
|
5132
|
+
if (r.length < 2) return t;
|
|
5133
|
+
let i = r.length - 1;
|
|
5134
|
+
return r[r.length > 2 && vi.has(r[i - 1]) && r[i].length === 2 ? i - 2 : i - 1] ?? t;
|
|
5135
|
+
}
|
|
5136
|
+
//#endregion
|
|
5137
|
+
//#region src/presentation/AgenticoConnectionsSettings.tsx
|
|
5138
|
+
var bi = (e) => e instanceof Error ? e.message : String(e);
|
|
5139
|
+
function xi(e) {
|
|
5101
5140
|
let [t, n] = l(null), [r, i] = l(null);
|
|
5102
5141
|
return a(() => {
|
|
5103
5142
|
if (!e) return;
|
|
@@ -5105,7 +5144,7 @@ function yi(e) {
|
|
|
5105
5144
|
return e.me().then((e) => {
|
|
5106
5145
|
t && n(e);
|
|
5107
5146
|
}, (e) => {
|
|
5108
|
-
t && i(
|
|
5147
|
+
t && i(bi(e));
|
|
5109
5148
|
}), () => {
|
|
5110
5149
|
t = !1;
|
|
5111
5150
|
};
|
|
@@ -5114,14 +5153,14 @@ function yi(e) {
|
|
|
5114
5153
|
error: r
|
|
5115
5154
|
};
|
|
5116
5155
|
}
|
|
5117
|
-
function
|
|
5118
|
-
let o = Q(), { locale: c } = H(), m = t.role === "platform", h = t.administers?.runners ?? m, g = s(() => n?.store ?? e.connections(), [e, n?.store]), [_, v] = l(null), [y, b] = l(null), [x, S] = l(null), [C, w] = l(null), T = (e) => {
|
|
5156
|
+
function Si({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
5157
|
+
let o = Q(), { locale: c } = H(), m = t.role === "platform", h = t.administers?.runners ?? m, g = s(() => n?.store ?? e.connections(), [e, n?.store]), [_, v] = l(null), [y, b] = l(null), [x, S] = l(null), [C, w] = l(null), [T, E] = l(!1), D = (e) => {
|
|
5119
5158
|
w(e), i?.(e !== null);
|
|
5120
|
-
},
|
|
5159
|
+
}, O = r(async () => {
|
|
5121
5160
|
try {
|
|
5122
5161
|
v((await g.load()).providers.length), h && b(await e.fleet.list()), S(null);
|
|
5123
5162
|
} catch (e) {
|
|
5124
|
-
S(
|
|
5163
|
+
S(bi(e));
|
|
5125
5164
|
}
|
|
5126
5165
|
}, [
|
|
5127
5166
|
e,
|
|
@@ -5129,10 +5168,10 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5129
5168
|
h
|
|
5130
5169
|
]);
|
|
5131
5170
|
a(() => {
|
|
5132
|
-
|
|
5133
|
-
}, [
|
|
5134
|
-
let
|
|
5135
|
-
|
|
5171
|
+
O();
|
|
5172
|
+
}, [O]);
|
|
5173
|
+
let A = () => {
|
|
5174
|
+
D(null), O();
|
|
5136
5175
|
};
|
|
5137
5176
|
return /* @__PURE__ */ G("div", {
|
|
5138
5177
|
className: "flex flex-col gap-3",
|
|
@@ -5159,11 +5198,11 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5159
5198
|
variant: "light",
|
|
5160
5199
|
children: o.cloudNone
|
|
5161
5200
|
}),
|
|
5162
|
-
onClick: () =>
|
|
5201
|
+
onClick: () => D("cloud")
|
|
5163
5202
|
}),
|
|
5164
5203
|
h && y?.map((e) => /* @__PURE__ */ W(k, {
|
|
5165
5204
|
icon: "server",
|
|
5166
|
-
title: e.
|
|
5205
|
+
title: yi(e.url),
|
|
5167
5206
|
description: e.url,
|
|
5168
5207
|
badge: e.draining ? /* @__PURE__ */ W(p, {
|
|
5169
5208
|
variant: "warning",
|
|
@@ -5172,20 +5211,20 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5172
5211
|
variant: "info",
|
|
5173
5212
|
children: o.runnerDefault
|
|
5174
5213
|
}) : void 0,
|
|
5175
|
-
onClick: () =>
|
|
5214
|
+
onClick: () => D({ runner: e })
|
|
5176
5215
|
}, e.id)),
|
|
5177
5216
|
!h && t.hasRunner && /* @__PURE__ */ W(k, {
|
|
5178
5217
|
icon: "server",
|
|
5179
5218
|
title: o.runnerOfProject,
|
|
5180
5219
|
description: o.runnerOfProjectDescription,
|
|
5181
|
-
onClick: () =>
|
|
5220
|
+
onClick: () => D("mine")
|
|
5182
5221
|
}),
|
|
5183
5222
|
h && /* @__PURE__ */ W(k, {
|
|
5184
5223
|
icon: "plus",
|
|
5185
5224
|
dashed: !0,
|
|
5186
5225
|
title: o.runnerAdd,
|
|
5187
5226
|
description: o.runnerAddDescription,
|
|
5188
|
-
onClick: () =>
|
|
5227
|
+
onClick: () => D("add")
|
|
5189
5228
|
})
|
|
5190
5229
|
]
|
|
5191
5230
|
}),
|
|
@@ -5193,11 +5232,11 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5193
5232
|
title: o.cloudTitle,
|
|
5194
5233
|
position: "right",
|
|
5195
5234
|
size: "xl",
|
|
5196
|
-
onClose:
|
|
5235
|
+
onClose: A,
|
|
5197
5236
|
footer: /* @__PURE__ */ W(d, {
|
|
5198
5237
|
variant: "link",
|
|
5199
5238
|
label: o.settingsClose,
|
|
5200
|
-
onClick:
|
|
5239
|
+
onClick: A
|
|
5201
5240
|
}),
|
|
5202
5241
|
children: /* @__PURE__ */ W(u, {
|
|
5203
5242
|
...n ?? {},
|
|
@@ -5209,16 +5248,18 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5209
5248
|
title: o.runnerOfProject,
|
|
5210
5249
|
position: "right",
|
|
5211
5250
|
size: "lg",
|
|
5212
|
-
|
|
5251
|
+
stackedBehind: T,
|
|
5252
|
+
onClose: A,
|
|
5213
5253
|
footer: /* @__PURE__ */ W(d, {
|
|
5214
5254
|
variant: "link",
|
|
5215
5255
|
label: o.settingsClose,
|
|
5216
|
-
onClick:
|
|
5256
|
+
onClick: A
|
|
5217
5257
|
}),
|
|
5218
5258
|
children: /* @__PURE__ */ W(q, {
|
|
5219
5259
|
client: e.runner(),
|
|
5220
5260
|
scope: "user",
|
|
5221
|
-
locale: c
|
|
5261
|
+
locale: c,
|
|
5262
|
+
onStack: E
|
|
5222
5263
|
})
|
|
5223
5264
|
}),
|
|
5224
5265
|
C === "add" && /* @__PURE__ */ W(le, {
|
|
@@ -5226,33 +5267,33 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5226
5267
|
t: ue(c),
|
|
5227
5268
|
locale: c,
|
|
5228
5269
|
position: "right",
|
|
5229
|
-
onClose:
|
|
5230
|
-
onAdded:
|
|
5270
|
+
onClose: A,
|
|
5271
|
+
onAdded: A
|
|
5231
5272
|
}),
|
|
5232
|
-
C && typeof C == "object" && /* @__PURE__ */ W(
|
|
5273
|
+
C && typeof C == "object" && /* @__PURE__ */ W(Ci, {
|
|
5233
5274
|
backend: e,
|
|
5234
5275
|
runner: C.runner,
|
|
5235
5276
|
platform: m,
|
|
5236
|
-
onClose:
|
|
5277
|
+
onClose: A
|
|
5237
5278
|
})
|
|
5238
5279
|
]
|
|
5239
5280
|
});
|
|
5240
5281
|
}
|
|
5241
|
-
function
|
|
5242
|
-
let i = Q(), { locale: o } = H(), [c, u] = l(null), [p, m] = l(null), [h, g] = l(!1), [_, v] = l(!1), y =
|
|
5282
|
+
function Ci({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
5283
|
+
let i = Q(), { locale: o } = H(), [c, u] = l(null), [p, m] = l(null), [h, g] = l(!1), [_, v] = l(!1), y = wi(e);
|
|
5243
5284
|
a(() => {
|
|
5244
5285
|
let n = !0;
|
|
5245
5286
|
return e.fleet.status(t.id).then((e) => {
|
|
5246
5287
|
n && u(e);
|
|
5247
5288
|
}, (e) => {
|
|
5248
|
-
n && m(
|
|
5289
|
+
n && m(bi(e));
|
|
5249
5290
|
}), () => {
|
|
5250
5291
|
n = !1;
|
|
5251
5292
|
};
|
|
5252
5293
|
}, [e, t.id]);
|
|
5253
|
-
let b = (n) => e.fleet.update(t.id, n).catch((e) => m(
|
|
5294
|
+
let b = (n) => e.fleet.update(t.id, n).catch((e) => m(bi(e))), S = s(() => e.runnerOfNamespace(), [e]);
|
|
5254
5295
|
return /* @__PURE__ */ G(j, {
|
|
5255
|
-
title:
|
|
5296
|
+
title: yi(t.url),
|
|
5256
5297
|
position: "right",
|
|
5257
5298
|
size: "lg",
|
|
5258
5299
|
stackedBehind: _,
|
|
@@ -5297,39 +5338,17 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5297
5338
|
onSubmit: () => !1,
|
|
5298
5339
|
children: /* @__PURE__ */ G("div", {
|
|
5299
5340
|
className: "flex flex-col gap-2",
|
|
5300
|
-
children: [
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
let n = E.trim();
|
|
5312
|
-
if (n && n !== C) try {
|
|
5313
|
-
await e.fleet.update(t.id, { name: n }), T(n), m(null);
|
|
5314
|
-
} catch (e) {
|
|
5315
|
-
m(vi(e));
|
|
5316
|
-
}
|
|
5317
|
-
}
|
|
5318
|
-
})
|
|
5319
|
-
}),
|
|
5320
|
-
n && !t.owners?.length && /* @__PURE__ */ W(F, {
|
|
5321
|
-
name: "isDefault",
|
|
5322
|
-
label: i.runnerSetDefault,
|
|
5323
|
-
defaultValue: t.isDefault ? "on" : "",
|
|
5324
|
-
onChange: ({ value: e }) => void b({ isDefault: !!e })
|
|
5325
|
-
}),
|
|
5326
|
-
/* @__PURE__ */ W(F, {
|
|
5327
|
-
name: "draining",
|
|
5328
|
-
label: i.runnerSetDraining,
|
|
5329
|
-
defaultValue: t.draining ? "on" : "",
|
|
5330
|
-
onChange: ({ value: e }) => void b({ draining: !!e })
|
|
5331
|
-
})
|
|
5332
|
-
]
|
|
5341
|
+
children: [n && !t.owners?.length && /* @__PURE__ */ W(F, {
|
|
5342
|
+
name: "isDefault",
|
|
5343
|
+
label: i.runnerSetDefault,
|
|
5344
|
+
defaultValue: t.isDefault ? "on" : "",
|
|
5345
|
+
onChange: ({ value: e }) => void b({ isDefault: !!e })
|
|
5346
|
+
}), /* @__PURE__ */ W(F, {
|
|
5347
|
+
name: "draining",
|
|
5348
|
+
label: i.runnerSetDraining,
|
|
5349
|
+
defaultValue: t.draining ? "on" : "",
|
|
5350
|
+
onChange: ({ value: e }) => void b({ draining: !!e })
|
|
5351
|
+
})]
|
|
5333
5352
|
})
|
|
5334
5353
|
}),
|
|
5335
5354
|
/* @__PURE__ */ W(q, {
|
|
@@ -5338,7 +5357,7 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5338
5357
|
locale: o,
|
|
5339
5358
|
onStack: v,
|
|
5340
5359
|
onChange: () => void y.reload(),
|
|
5341
|
-
renderProvider: (e, t) => t.length ? /* @__PURE__ */ W(
|
|
5360
|
+
renderProvider: (e, t) => t.length ? /* @__PURE__ */ W(Ti, {
|
|
5342
5361
|
provider: e,
|
|
5343
5362
|
defaults: y
|
|
5344
5363
|
}) : null
|
|
@@ -5352,7 +5371,7 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5352
5371
|
try {
|
|
5353
5372
|
await e.fleet.remove(t.id), r();
|
|
5354
5373
|
} catch (e) {
|
|
5355
|
-
m(
|
|
5374
|
+
m(bi(e));
|
|
5356
5375
|
}
|
|
5357
5376
|
return g(!1), !0;
|
|
5358
5377
|
},
|
|
@@ -5360,13 +5379,13 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5360
5379
|
})]
|
|
5361
5380
|
});
|
|
5362
5381
|
}
|
|
5363
|
-
function
|
|
5382
|
+
function wi(e) {
|
|
5364
5383
|
let [t, n] = l({}), [i, o] = l({}), [s, c] = l(null), u = r(async () => {
|
|
5365
5384
|
try {
|
|
5366
5385
|
let [t, r] = await Promise.all([e.runnerDefaults.get(), e.runner().models()]);
|
|
5367
5386
|
n(t), o(Object.fromEntries(r.providers.map((e) => [e.id, e.models]))), c(null);
|
|
5368
5387
|
} catch (e) {
|
|
5369
|
-
c(
|
|
5388
|
+
c(bi(e));
|
|
5370
5389
|
}
|
|
5371
5390
|
}, [e]);
|
|
5372
5391
|
return a(() => {
|
|
@@ -5380,12 +5399,12 @@ function Si(e) {
|
|
|
5380
5399
|
try {
|
|
5381
5400
|
n(await e.runnerDefaults.set(t, r)), c(null);
|
|
5382
5401
|
} catch (e) {
|
|
5383
|
-
c(
|
|
5402
|
+
c(bi(e));
|
|
5384
5403
|
}
|
|
5385
5404
|
}
|
|
5386
5405
|
};
|
|
5387
5406
|
}
|
|
5388
|
-
function
|
|
5407
|
+
function Ti({ provider: e, defaults: t }) {
|
|
5389
5408
|
let n = Q(), r = t.values[e] ?? {}, i = t.models[e] ?? [], a = {
|
|
5390
5409
|
low: n.settingsReasoningLow,
|
|
5391
5410
|
medium: n.settingsReasoningMedium,
|
|
@@ -5456,15 +5475,15 @@ function Ci({ provider: e, defaults: t }) {
|
|
|
5456
5475
|
]
|
|
5457
5476
|
});
|
|
5458
5477
|
}
|
|
5459
|
-
var
|
|
5460
|
-
function
|
|
5478
|
+
var Ei = (e, t) => t.ok ? e.memoryOk : t.error === "rejected" ? e.memoryRejected : t.error === "unreachable" ? e.memoryUnreachable : e.memoryInvalid;
|
|
5479
|
+
function Di({ backend: e, onStack: t }) {
|
|
5461
5480
|
let n = Q(), [i, o] = l(null), [s, c] = l(null), [u, d] = l(null), p = (e) => {
|
|
5462
5481
|
d(e), t?.(e !== null);
|
|
5463
5482
|
}, m = r(async () => {
|
|
5464
5483
|
try {
|
|
5465
5484
|
o(await e.memories.list()), c(null);
|
|
5466
5485
|
} catch (e) {
|
|
5467
|
-
c(
|
|
5486
|
+
c(bi(e));
|
|
5468
5487
|
}
|
|
5469
5488
|
}, [e]);
|
|
5470
5489
|
return a(() => {
|
|
@@ -5488,7 +5507,7 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5488
5507
|
className: "grid gap-3 sm:grid-cols-2",
|
|
5489
5508
|
children: [i?.map((e) => /* @__PURE__ */ W(k, {
|
|
5490
5509
|
icon: "database",
|
|
5491
|
-
title: e.
|
|
5510
|
+
title: yi(e.apiUrl),
|
|
5492
5511
|
description: e.apiUrl,
|
|
5493
5512
|
meta: e.mcpUrl,
|
|
5494
5513
|
onClick: () => p(e)
|
|
@@ -5500,7 +5519,7 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5500
5519
|
onClick: () => p("add")
|
|
5501
5520
|
})]
|
|
5502
5521
|
}),
|
|
5503
|
-
u && /* @__PURE__ */ W(
|
|
5522
|
+
u && /* @__PURE__ */ W(Oi, {
|
|
5504
5523
|
backend: e,
|
|
5505
5524
|
memory: u === "add" ? null : u,
|
|
5506
5525
|
onClose: () => {
|
|
@@ -5510,21 +5529,32 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5510
5529
|
]
|
|
5511
5530
|
});
|
|
5512
5531
|
}
|
|
5513
|
-
function
|
|
5514
|
-
let r = Q(), [i,
|
|
5515
|
-
name: t?.name ?? "",
|
|
5532
|
+
function Oi({ backend: e, memory: t, onClose: n }) {
|
|
5533
|
+
let r = Q(), [i, o] = l({
|
|
5516
5534
|
apiUrl: t?.apiUrl ?? "",
|
|
5517
5535
|
mcpUrl: t?.mcpUrl ?? "",
|
|
5518
5536
|
key: ""
|
|
5519
|
-
}), [
|
|
5537
|
+
}), [s, c] = l(null), [u, m] = l(!1), [h, g] = l(null), [_, v] = l(null), y = (e) => ({ value: t }) => o((n) => ({
|
|
5520
5538
|
...n,
|
|
5521
5539
|
[e]: String(t ?? "")
|
|
5522
|
-
})),
|
|
5540
|
+
})), b = (e) => c({
|
|
5523
5541
|
variant: "danger",
|
|
5524
|
-
text: R(r.connectionsError, { error:
|
|
5542
|
+
text: R(r.connectionsError, { error: bi(e) })
|
|
5525
5543
|
});
|
|
5544
|
+
a(() => {
|
|
5545
|
+
if (!t) return;
|
|
5546
|
+
let n = !0;
|
|
5547
|
+
return e.memories.namespaces(t.id).then((e) => {
|
|
5548
|
+
n && g(e);
|
|
5549
|
+
}, (e) => {
|
|
5550
|
+
n && v(bi(e));
|
|
5551
|
+
}), () => {
|
|
5552
|
+
n = !1;
|
|
5553
|
+
};
|
|
5554
|
+
}, [e, t]);
|
|
5555
|
+
let x = i.apiUrl.trim() ? yi(i.apiUrl) : r.memoryAdd, S = !!i.apiUrl.trim() && (!!i.key.trim() || !!t);
|
|
5526
5556
|
return /* @__PURE__ */ G(j, {
|
|
5527
|
-
title: t
|
|
5557
|
+
title: t ? yi(t.apiUrl) : x,
|
|
5528
5558
|
position: "right",
|
|
5529
5559
|
size: "lg",
|
|
5530
5560
|
onClose: n,
|
|
@@ -5533,12 +5563,12 @@ function Ei({ backend: e, memory: t, onClose: n }) {
|
|
|
5533
5563
|
variant: "outline-danger",
|
|
5534
5564
|
icon: "trash",
|
|
5535
5565
|
label: r.memoryRemove,
|
|
5536
|
-
onClick: () =>
|
|
5566
|
+
onClick: () => m(!0)
|
|
5537
5567
|
}),
|
|
5538
5568
|
/* @__PURE__ */ W(A, {
|
|
5539
5569
|
variant: "outline-primary",
|
|
5540
5570
|
label: r.memoryCheck,
|
|
5541
|
-
disabled: !
|
|
5571
|
+
disabled: !S || !t && !i.key.trim(),
|
|
5542
5572
|
onClick: async () => {
|
|
5543
5573
|
let t = await e.memories.check({
|
|
5544
5574
|
apiUrl: i.apiUrl,
|
|
@@ -5548,117 +5578,171 @@ function Ei({ backend: e, memory: t, onClose: n }) {
|
|
|
5548
5578
|
error: "unreachable",
|
|
5549
5579
|
failure: e
|
|
5550
5580
|
}));
|
|
5551
|
-
|
|
5581
|
+
c({
|
|
5552
5582
|
variant: t.ok ? "success" : "danger",
|
|
5553
|
-
text:
|
|
5583
|
+
text: Ei(r, t)
|
|
5554
5584
|
});
|
|
5555
5585
|
}
|
|
5556
5586
|
}),
|
|
5557
5587
|
/* @__PURE__ */ W(A, {
|
|
5558
5588
|
variant: "primary",
|
|
5559
5589
|
label: r.memorySave,
|
|
5560
|
-
disabled: t ? !
|
|
5590
|
+
disabled: t ? !i.apiUrl.trim() : !i.apiUrl.trim() || !i.key.trim(),
|
|
5561
5591
|
onClick: async () => {
|
|
5562
5592
|
try {
|
|
5593
|
+
let r = yi(i.apiUrl);
|
|
5563
5594
|
t ? await e.memories.update(t.id, {
|
|
5564
|
-
name:
|
|
5565
|
-
mcpUrl: i.mcpUrl || null,
|
|
5595
|
+
name: r,
|
|
5596
|
+
mcpUrl: i.mcpUrl.trim() || null,
|
|
5597
|
+
...i.apiUrl.trim() === t.apiUrl ? {} : { apiUrl: i.apiUrl.trim() },
|
|
5566
5598
|
...i.key.trim() ? { key: i.key } : {}
|
|
5567
5599
|
}) : await e.memories.add({
|
|
5568
|
-
name:
|
|
5600
|
+
name: r,
|
|
5569
5601
|
apiUrl: i.apiUrl,
|
|
5570
|
-
mcpUrl: i.mcpUrl || void 0,
|
|
5602
|
+
mcpUrl: i.mcpUrl.trim() || void 0,
|
|
5571
5603
|
key: i.key
|
|
5572
5604
|
}), n();
|
|
5573
5605
|
} catch (e) {
|
|
5574
|
-
|
|
5606
|
+
b(e);
|
|
5575
5607
|
}
|
|
5576
5608
|
}
|
|
5577
5609
|
})
|
|
5578
5610
|
] }),
|
|
5579
|
-
children: [/* @__PURE__ */
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5611
|
+
children: [/* @__PURE__ */ G("div", {
|
|
5612
|
+
className: "flex flex-col gap-5",
|
|
5613
|
+
children: [/* @__PURE__ */ W(w, {
|
|
5614
|
+
appearance: "empty",
|
|
5615
|
+
showNotice: !1,
|
|
5616
|
+
onSubmit: () => !1,
|
|
5617
|
+
children: /* @__PURE__ */ G("div", {
|
|
5618
|
+
className: "flex flex-col gap-3",
|
|
5619
|
+
children: [
|
|
5620
|
+
s && /* @__PURE__ */ W(f, {
|
|
5621
|
+
variant: s.variant,
|
|
5622
|
+
children: s.text
|
|
5623
|
+
}),
|
|
5624
|
+
/* @__PURE__ */ W(P, {
|
|
5625
|
+
name: "mcpUrl",
|
|
5626
|
+
label: r.memoryMcpUrl,
|
|
5627
|
+
feedback: r.memoryMcpUrlHint,
|
|
5628
|
+
placeholder: "https://memory.example.com/mcp",
|
|
5629
|
+
defaultValue: i.mcpUrl,
|
|
5630
|
+
onChange: y("mcpUrl")
|
|
5631
|
+
}),
|
|
5632
|
+
/* @__PURE__ */ W(P, {
|
|
5633
|
+
name: "apiUrl",
|
|
5634
|
+
label: r.memoryApiUrl,
|
|
5635
|
+
placeholder: "https://memory.example.com",
|
|
5636
|
+
defaultValue: i.apiUrl,
|
|
5637
|
+
onChange: y("apiUrl")
|
|
5638
|
+
}),
|
|
5639
|
+
/* @__PURE__ */ W(te, {
|
|
5640
|
+
name: "key",
|
|
5641
|
+
label: r.memoryKey,
|
|
5642
|
+
autoComplete: "off",
|
|
5643
|
+
placeholder: t ? r.memoryKeySaved : void 0,
|
|
5644
|
+
feedback: t ? r.memoryKeyKeep : void 0,
|
|
5645
|
+
onChange: y("key")
|
|
5646
|
+
})
|
|
5647
|
+
]
|
|
5648
|
+
})
|
|
5649
|
+
}), t && /* @__PURE__ */ G("section", {
|
|
5650
|
+
className: "flex flex-col gap-2",
|
|
5585
5651
|
children: [
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
children:
|
|
5652
|
+
/* @__PURE__ */ W("h5", {
|
|
5653
|
+
className: "text-sm font-semibold",
|
|
5654
|
+
children: R(r.memoryNamespaces, { count: h?.length ?? 0 })
|
|
5589
5655
|
}),
|
|
5590
|
-
/* @__PURE__ */ W(
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
defaultValue: i.name,
|
|
5594
|
-
onChange: p("name")
|
|
5656
|
+
_ && /* @__PURE__ */ W(f, {
|
|
5657
|
+
variant: "warning",
|
|
5658
|
+
children: R(r.connectionsError, { error: _ })
|
|
5595
5659
|
}),
|
|
5596
|
-
/* @__PURE__ */ W(
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
placeholder: "https://memory.example.com",
|
|
5600
|
-
defaultValue: i.apiUrl,
|
|
5601
|
-
disabled: !!t,
|
|
5602
|
-
onChange: p("apiUrl")
|
|
5603
|
-
}),
|
|
5604
|
-
/* @__PURE__ */ W(P, {
|
|
5605
|
-
name: "mcpUrl",
|
|
5606
|
-
label: r.memoryMcpUrl,
|
|
5607
|
-
placeholder: "https://memory.example.com/mcp",
|
|
5608
|
-
defaultValue: i.mcpUrl,
|
|
5609
|
-
onChange: p("mcpUrl")
|
|
5610
|
-
}),
|
|
5611
|
-
/* @__PURE__ */ W(te, {
|
|
5612
|
-
name: "key",
|
|
5613
|
-
label: r.memoryKey,
|
|
5614
|
-
autoComplete: "off",
|
|
5615
|
-
onChange: p("key")
|
|
5660
|
+
!h && !_ && /* @__PURE__ */ W("p", {
|
|
5661
|
+
className: "text-xs text-muted-foreground",
|
|
5662
|
+
children: r.memoryNamespacesLoading
|
|
5616
5663
|
}),
|
|
5617
|
-
|
|
5664
|
+
h && !h.length && /* @__PURE__ */ W("p", {
|
|
5618
5665
|
className: "text-xs text-muted-foreground",
|
|
5619
|
-
children: r.
|
|
5666
|
+
children: r.memoryNamespacesNone
|
|
5667
|
+
}),
|
|
5668
|
+
h && h.length > 0 && /* @__PURE__ */ W("ul", {
|
|
5669
|
+
className: "divide-y divide-border rounded-md border border-border text-sm",
|
|
5670
|
+
children: h.map((e) => /* @__PURE__ */ G("li", {
|
|
5671
|
+
className: "flex flex-wrap items-center justify-between gap-2 px-3 py-2",
|
|
5672
|
+
children: [/* @__PURE__ */ W("span", {
|
|
5673
|
+
className: "font-mono text-xs",
|
|
5674
|
+
children: e.namespace
|
|
5675
|
+
}), /* @__PURE__ */ G("span", {
|
|
5676
|
+
className: "flex flex-wrap items-center gap-1",
|
|
5677
|
+
children: [/* @__PURE__ */ W(p, {
|
|
5678
|
+
variant: "light",
|
|
5679
|
+
children: R(r.memoryDocuments, { count: e.documents })
|
|
5680
|
+
}), /* @__PURE__ */ W(p, {
|
|
5681
|
+
variant: "light",
|
|
5682
|
+
children: R(r.memoryMemories, { count: e.memories })
|
|
5683
|
+
})]
|
|
5684
|
+
})]
|
|
5685
|
+
}, e.namespace))
|
|
5620
5686
|
})
|
|
5621
5687
|
]
|
|
5622
|
-
})
|
|
5623
|
-
}),
|
|
5688
|
+
})]
|
|
5689
|
+
}), u && t && /* @__PURE__ */ W(ee, {
|
|
5624
5690
|
title: r.memoryRemove,
|
|
5625
5691
|
danger: !0,
|
|
5626
|
-
onClose: () =>
|
|
5692
|
+
onClose: () => m(!1),
|
|
5627
5693
|
onYes: async () => {
|
|
5628
5694
|
try {
|
|
5629
5695
|
await e.memories.remove(t.id), n();
|
|
5630
5696
|
} catch (e) {
|
|
5631
|
-
|
|
5697
|
+
b(e);
|
|
5632
5698
|
}
|
|
5633
|
-
return
|
|
5699
|
+
return m(!1), !0;
|
|
5634
5700
|
},
|
|
5635
|
-
children: R(r.memoryRemoveConfirm, { name: t.
|
|
5701
|
+
children: R(r.memoryRemoveConfirm, { name: yi(t.apiUrl) })
|
|
5636
5702
|
})]
|
|
5637
5703
|
});
|
|
5638
5704
|
}
|
|
5639
|
-
function
|
|
5640
|
-
let n = Q(), i = t.role === "platform", [o, s] = l(null), [c, u] = l([]), [d,
|
|
5705
|
+
function ki({ backend: e, me: t }) {
|
|
5706
|
+
let n = Q(), i = t.role === "platform", [o, s] = l(null), [c, u] = l([]), [d, h] = l([]), [g, _] = l(null), v = r(async () => {
|
|
5641
5707
|
try {
|
|
5642
5708
|
let [t, n, r] = await Promise.all([
|
|
5643
5709
|
e.projects.list(),
|
|
5644
5710
|
e.fleet.list(),
|
|
5645
5711
|
e.memories.list()
|
|
5646
5712
|
]);
|
|
5647
|
-
s(t.namespaces), u(n),
|
|
5713
|
+
s(t.namespaces), u(n), h(r), _(null);
|
|
5648
5714
|
} catch (e) {
|
|
5649
|
-
|
|
5715
|
+
_(bi(e));
|
|
5650
5716
|
}
|
|
5651
5717
|
}, [e, i]);
|
|
5652
5718
|
a(() => {
|
|
5653
|
-
|
|
5654
|
-
}, [
|
|
5655
|
-
let
|
|
5719
|
+
v();
|
|
5720
|
+
}, [v]);
|
|
5721
|
+
let y = async (t, n) => {
|
|
5656
5722
|
try {
|
|
5657
|
-
await e.projects.set(t, n), await
|
|
5723
|
+
await e.projects.set(t, n), await v();
|
|
5658
5724
|
} catch (e) {
|
|
5659
|
-
|
|
5725
|
+
_(bi(e));
|
|
5660
5726
|
}
|
|
5661
|
-
}
|
|
5727
|
+
}, b = (e) => {
|
|
5728
|
+
let t = c.find((t) => t.id === e.runner?.id);
|
|
5729
|
+
return t ? yi(t.url) : e.runner?.name ?? n.projectsDefaultRunner;
|
|
5730
|
+
}, x = (e) => {
|
|
5731
|
+
let t = d.find((t) => t.id === e.memory?.id);
|
|
5732
|
+
return t ? yi(t.apiUrl) : e.memory?.name ?? n.projectsNoMemory;
|
|
5733
|
+
}, S = (e, t, n) => /* @__PURE__ */ G("div", {
|
|
5734
|
+
className: "flex items-start gap-3",
|
|
5735
|
+
children: [/* @__PURE__ */ W("span", {
|
|
5736
|
+
className: "mt-6 flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",
|
|
5737
|
+
children: /* @__PURE__ */ W(T, { name: e })
|
|
5738
|
+
}), /* @__PURE__ */ W("div", {
|
|
5739
|
+
className: "min-w-0 flex-1",
|
|
5740
|
+
children: n ?? /* @__PURE__ */ W("span", {
|
|
5741
|
+
className: "text-sm",
|
|
5742
|
+
children: t
|
|
5743
|
+
})
|
|
5744
|
+
})]
|
|
5745
|
+
});
|
|
5662
5746
|
return /* @__PURE__ */ G("div", {
|
|
5663
5747
|
className: "flex flex-col gap-3",
|
|
5664
5748
|
children: [
|
|
@@ -5670,83 +5754,80 @@ function Di({ backend: e, me: t }) {
|
|
|
5670
5754
|
className: "text-xs text-muted-foreground",
|
|
5671
5755
|
children: n.projectsReadOnly
|
|
5672
5756
|
}),
|
|
5673
|
-
|
|
5757
|
+
g && /* @__PURE__ */ W(f, {
|
|
5674
5758
|
variant: "danger",
|
|
5675
|
-
children: R(n.connectionsError, { error:
|
|
5759
|
+
children: R(n.connectionsError, { error: g })
|
|
5676
5760
|
}),
|
|
5677
|
-
o?.map((e) =>
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
children: [/* @__PURE__ */ W("span", {
|
|
5761
|
+
o?.map((e) => {
|
|
5762
|
+
let r = i || e.namespace === t.namespace;
|
|
5763
|
+
return /* @__PURE__ */ W(m, {
|
|
5764
|
+
headerClassName: "justify-between",
|
|
5765
|
+
header: /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
|
|
5682
5766
|
className: "font-medium",
|
|
5683
5767
|
children: e.name ?? e.tenant ?? e.namespace
|
|
5684
|
-
}), /* @__PURE__ */ W(
|
|
5685
|
-
|
|
5686
|
-
children:
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
}
|
|
5729
|
-
|
|
5730
|
-
children: e.memory?.name ?? n.projectsNoMemory
|
|
5731
|
-
})] })]
|
|
5732
|
-
}, e.namespace))
|
|
5768
|
+
}), /* @__PURE__ */ W(p, {
|
|
5769
|
+
variant: "light",
|
|
5770
|
+
children: /* @__PURE__ */ W("span", {
|
|
5771
|
+
className: "font-mono",
|
|
5772
|
+
children: e.namespace
|
|
5773
|
+
})
|
|
5774
|
+
})] }),
|
|
5775
|
+
children: /* @__PURE__ */ W(w, {
|
|
5776
|
+
appearance: "empty",
|
|
5777
|
+
showNotice: !1,
|
|
5778
|
+
onSubmit: () => !1,
|
|
5779
|
+
children: /* @__PURE__ */ G("div", {
|
|
5780
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
5781
|
+
children: [S("server", b(e), r && (i || c.length > 0) ? /* @__PURE__ */ W(N, {
|
|
5782
|
+
name: `runner-${e.namespace}`,
|
|
5783
|
+
label: n.projectsRunner,
|
|
5784
|
+
defaultValue: e.runner?.id ?? "",
|
|
5785
|
+
placeholderOption: {
|
|
5786
|
+
label: n.projectsDefaultRunner,
|
|
5787
|
+
value: ""
|
|
5788
|
+
},
|
|
5789
|
+
options: c.map((e) => ({
|
|
5790
|
+
label: yi(e.url),
|
|
5791
|
+
value: e.id
|
|
5792
|
+
})),
|
|
5793
|
+
onChange: ({ value: t }) => {
|
|
5794
|
+
t && y(e.namespace, { runnerId: String(t) });
|
|
5795
|
+
}
|
|
5796
|
+
}) : null), S("database", x(e), r ? /* @__PURE__ */ W(N, {
|
|
5797
|
+
name: `memory-${e.namespace}`,
|
|
5798
|
+
label: n.projectsMemory,
|
|
5799
|
+
defaultValue: e.memory?.id ?? "",
|
|
5800
|
+
placeholderOption: {
|
|
5801
|
+
label: n.projectsNoMemory,
|
|
5802
|
+
value: ""
|
|
5803
|
+
},
|
|
5804
|
+
options: d.map((e) => ({
|
|
5805
|
+
label: yi(e.apiUrl),
|
|
5806
|
+
value: e.id
|
|
5807
|
+
})),
|
|
5808
|
+
onChange: ({ value: t }) => void y(e.namespace, { memoryId: t ? String(t) : null })
|
|
5809
|
+
}) : null)]
|
|
5810
|
+
})
|
|
5811
|
+
})
|
|
5812
|
+
}, e.namespace);
|
|
5813
|
+
})
|
|
5733
5814
|
]
|
|
5734
5815
|
});
|
|
5735
5816
|
}
|
|
5736
5817
|
//#endregion
|
|
5737
5818
|
//#region src/presentation/AgenticoSettingsModal.tsx
|
|
5738
|
-
var
|
|
5819
|
+
var Ai = [
|
|
5739
5820
|
"low",
|
|
5740
5821
|
"medium",
|
|
5741
5822
|
"high",
|
|
5742
5823
|
"max"
|
|
5743
5824
|
];
|
|
5744
|
-
function
|
|
5825
|
+
function ji() {
|
|
5745
5826
|
let { shown: e, connections: t, backend: n } = $t();
|
|
5746
5827
|
return e.length > 0 || !!t || !!n || J().length > 0;
|
|
5747
5828
|
}
|
|
5748
|
-
function
|
|
5749
|
-
let e = Q(), { settings: t, shown: n, connections: r, models: i, tabs: a, backend: o, save: s, isOpen: c, close: f } = $t(), { me: p } =
|
|
5829
|
+
function Mi() {
|
|
5830
|
+
let e = Q(), { settings: t, shown: n, connections: r, models: i, tabs: a, backend: o, save: s, isOpen: c, close: f } = $t(), { me: p } = xi(c ? o : void 0), m = V(), h = ae()?.registry ?? {}, { modelsByProvider: g } = hr({ unfiltered: !0 }), [_, v] = l(0), [y, b] = l(!1);
|
|
5750
5831
|
if (!c) return null;
|
|
5751
5832
|
let x = J().length > 0, S = Object.keys(h), C = (e) => h[e]?.label ?? e, T = i ? i.map((e) => ({
|
|
5752
5833
|
label: e.group ? `${e.group} / ${e.label}` : e.label,
|
|
@@ -5822,7 +5903,7 @@ function Ai() {
|
|
|
5822
5903
|
label: e.settingsReasoningDefault,
|
|
5823
5904
|
value: ""
|
|
5824
5905
|
},
|
|
5825
|
-
options:
|
|
5906
|
+
options: Ai.map((e) => ({
|
|
5826
5907
|
label: E[e],
|
|
5827
5908
|
value: e
|
|
5828
5909
|
}))
|
|
@@ -5863,7 +5944,7 @@ function Ai() {
|
|
|
5863
5944
|
}, "pages"),
|
|
5864
5945
|
o && p && /* @__PURE__ */ W(I, {
|
|
5865
5946
|
label: e.connectionsTab,
|
|
5866
|
-
children: /* @__PURE__ */ W(
|
|
5947
|
+
children: /* @__PURE__ */ W(Si, {
|
|
5867
5948
|
backend: o,
|
|
5868
5949
|
me: p,
|
|
5869
5950
|
onStack: b,
|
|
@@ -5872,14 +5953,14 @@ function Ai() {
|
|
|
5872
5953
|
}, "connections"),
|
|
5873
5954
|
o && p && (p.administers?.memories ?? p.role === "platform") && /* @__PURE__ */ W(I, {
|
|
5874
5955
|
label: e.memoryTab,
|
|
5875
|
-
children: /* @__PURE__ */ W(
|
|
5956
|
+
children: /* @__PURE__ */ W(Di, {
|
|
5876
5957
|
backend: o,
|
|
5877
5958
|
onStack: b
|
|
5878
5959
|
})
|
|
5879
5960
|
}, "memory"),
|
|
5880
5961
|
o && p && p.role !== "member" && /* @__PURE__ */ W(I, {
|
|
5881
5962
|
label: e.projectsTab,
|
|
5882
|
-
children: /* @__PURE__ */ W(
|
|
5963
|
+
children: /* @__PURE__ */ W(ki, {
|
|
5883
5964
|
backend: o,
|
|
5884
5965
|
me: p
|
|
5885
5966
|
})
|
|
@@ -5898,7 +5979,7 @@ function Ai() {
|
|
|
5898
5979
|
}
|
|
5899
5980
|
//#endregion
|
|
5900
5981
|
//#region src/presentation/Agentico.tsx
|
|
5901
|
-
function
|
|
5982
|
+
function Ni(e, t) {
|
|
5902
5983
|
return Object.values(e).flat().map((e) => {
|
|
5903
5984
|
let n = t?.(e.provider, e.providerLabel ?? e.provider);
|
|
5904
5985
|
return {
|
|
@@ -5910,7 +5991,7 @@ function ji(e, t) {
|
|
|
5910
5991
|
};
|
|
5911
5992
|
});
|
|
5912
5993
|
}
|
|
5913
|
-
function
|
|
5994
|
+
function Pi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
5914
5995
|
let i = Q(), [o, s] = l(""), { agent: u, onApplied: f, manualEntry: p } = e, m = u.running;
|
|
5915
5996
|
a(() => {
|
|
5916
5997
|
t && s(t.detail ?? "");
|
|
@@ -5934,7 +6015,7 @@ function Mi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
|
5934
6015
|
}).then((e) => {
|
|
5935
6016
|
e && f(e);
|
|
5936
6017
|
});
|
|
5937
|
-
}, y = !!p || u.remote && u.remoteModels.length === 0, b = u.alongside && u.remoteModels.some((e) => e.value === u.selectedModel), x = !y && !u.remote && !b && u.hasProviders && !u.selectedModel, S = y ? [] : u.remote ? u.remoteModels : u.alongside ? [...u.remoteModels, ...
|
|
6018
|
+
}, y = !!p || u.remote && u.remoteModels.length === 0, b = u.alongside && u.remoteModels.some((e) => e.value === u.selectedModel), x = !y && !u.remote && !b && u.hasProviders && !u.selectedModel, S = y ? [] : u.remote ? u.remoteModels : u.alongside ? [...u.remoteModels, ...Ni(u.modelsByProvider, u.catalogGroup)] : Ni(u.modelsByProvider);
|
|
5938
6019
|
return /* @__PURE__ */ G(U, { children: [t && /* @__PURE__ */ G("div", {
|
|
5939
6020
|
className: "mb-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
5940
6021
|
children: [
|
|
@@ -5975,7 +6056,7 @@ function Mi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
|
5975
6056
|
maxHeight: 220
|
|
5976
6057
|
})] });
|
|
5977
6058
|
}
|
|
5978
|
-
function
|
|
6059
|
+
function Fi() {
|
|
5979
6060
|
let { startOrchestrator: e } = $(), t = Q(), [n, r] = l(""), { hasProviders: i, modelsByProvider: a, selectedModel: o, setSelectedModel: s } = hr(), c = tn(), u = (t) => {
|
|
5980
6061
|
t.text.trim() && (e(t.text.trim(), {
|
|
5981
6062
|
attachments: t.files.length > 0 ? t.files : void 0,
|
|
@@ -5989,7 +6070,7 @@ function Ni() {
|
|
|
5989
6070
|
disabled: !n.trim() || d,
|
|
5990
6071
|
onSubmit: u,
|
|
5991
6072
|
attachments: !0,
|
|
5992
|
-
models: [...c?.models() ?? [], ...
|
|
6073
|
+
models: [...c?.models() ?? [], ...Ni(a)],
|
|
5993
6074
|
selectedModel: o,
|
|
5994
6075
|
onModelChange: s,
|
|
5995
6076
|
modelPlaceholder: t.selectModelPlaceholder,
|
|
@@ -5997,7 +6078,7 @@ function Ni() {
|
|
|
5997
6078
|
maxHeight: 220
|
|
5998
6079
|
});
|
|
5999
6080
|
}
|
|
6000
|
-
function
|
|
6081
|
+
function Ii({ chat: e, onClose: t }) {
|
|
6001
6082
|
let n = Q(), r = V();
|
|
6002
6083
|
return /* @__PURE__ */ W(j, {
|
|
6003
6084
|
title: n.renameChat,
|
|
@@ -6020,7 +6101,7 @@ function Pi({ chat: e, onClose: t }) {
|
|
|
6020
6101
|
})
|
|
6021
6102
|
});
|
|
6022
6103
|
}
|
|
6023
|
-
function
|
|
6104
|
+
function Li(e, t, n = Date.now()) {
|
|
6024
6105
|
let r = Math.round((e - n) / 1e3), i = new Intl.RelativeTimeFormat(t, {
|
|
6025
6106
|
numeric: "auto",
|
|
6026
6107
|
style: "short"
|
|
@@ -6032,7 +6113,7 @@ function Fi(e, t, n = Date.now()) {
|
|
|
6032
6113
|
]) if (Math.abs(r) >= t) return i.format(Math.round(r / t), e);
|
|
6033
6114
|
return i.format(0, "minute");
|
|
6034
6115
|
}
|
|
6035
|
-
function
|
|
6116
|
+
function Ri({ card: e }) {
|
|
6036
6117
|
let t = Q();
|
|
6037
6118
|
return e.humanSummaryOnly ? /* @__PURE__ */ G("div", {
|
|
6038
6119
|
className: "space-y-2 rounded-lg border border-border/60 p-3",
|
|
@@ -6088,7 +6169,7 @@ function Ii({ card: e }) {
|
|
|
6088
6169
|
]
|
|
6089
6170
|
});
|
|
6090
6171
|
}
|
|
6091
|
-
function
|
|
6172
|
+
function zi({ messages: e }) {
|
|
6092
6173
|
return /* @__PURE__ */ W("div", {
|
|
6093
6174
|
className: "space-y-2 rounded-lg border border-border/60 p-3",
|
|
6094
6175
|
children: e.map((e, t) => /* @__PURE__ */ W("p", {
|
|
@@ -6097,7 +6178,7 @@ function Li({ messages: e }) {
|
|
|
6097
6178
|
}, t))
|
|
6098
6179
|
});
|
|
6099
6180
|
}
|
|
6100
|
-
function
|
|
6181
|
+
function Bi({ scopeId: e, currentTaskId: t, open: n, onOpenChange: r, onSelect: i, onNewChat: o, onArchivedCurrent: c }) {
|
|
6101
6182
|
let u = Q(), { locale: f } = H(), [p, m] = l(""), [h, g] = l(0);
|
|
6102
6183
|
a(() => at(() => g((e) => e + 1)), []);
|
|
6103
6184
|
let _ = s(() => n ? vt(e) : [], [
|
|
@@ -6186,17 +6267,17 @@ function Ri({ scopeId: e, currentTaskId: t, open: n, onOpenChange: r, onSelect:
|
|
|
6186
6267
|
}), /* @__PURE__ */ W("span", {
|
|
6187
6268
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
6188
6269
|
title: `${u.chatStarted.replace("{at}", new Date(gt(e)).toLocaleString(f))} · ${u.chatLastMessage.replace("{at}", new Date(e.savedAt).toLocaleString(f))}`,
|
|
6189
|
-
children:
|
|
6270
|
+
children: Li(gt(e), f)
|
|
6190
6271
|
})]
|
|
6191
6272
|
})
|
|
6192
6273
|
}, `${e.subagentId}:${e.entityId}`);
|
|
6193
6274
|
})
|
|
6194
|
-
}), v && /* @__PURE__ */ W(
|
|
6275
|
+
}), v && /* @__PURE__ */ W(Ii, {
|
|
6195
6276
|
chat: v,
|
|
6196
6277
|
onClose: () => y(null)
|
|
6197
6278
|
})] });
|
|
6198
6279
|
}
|
|
6199
|
-
function
|
|
6280
|
+
function Vi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}) {
|
|
6200
6281
|
let { task: i, isOpen: o, pendingGoal: u, orchestratorRunId: f, pageContext: p, pageContextCard: m, anchoredUserMessages: h, pendingResume: g, resumeRunId: _, dismissForeignTask: v, resumeEntityChat: y, pendingManualEntry: b, manualEntryRunId: x, startManualEntry: S, pendingExtraDestinations: C, pendingResumeWithAI: w, resumeWithAIRunId: T, pendingStart: E, startRunId: D, scope: O, threadEvents: k } = $(), A = Q(), j = c(null), [te, M] = l(!1), [N, P] = l(null), [F, ne] = l(null);
|
|
6201
6282
|
a(() => {
|
|
6202
6283
|
P(null), ne(null);
|
|
@@ -6208,7 +6289,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6208
6289
|
onWidthChange: r
|
|
6209
6290
|
}), re = () => {
|
|
6210
6291
|
(!i || i.agent.running || i.savedToDisk || window.confirm(A.unsavedConversationConfirm)) && (v(), M(!1));
|
|
6211
|
-
}, L = i ? [...i.precedingActivity ?? [], ...i.agent.activity] : [], ie = L.length, R = Math.max(0, Math.min(i?.panelExtraAnchorIndex ?? ie, ie)), z = L.slice(0, R), B = L.slice(R), ae = !!(i && !i.agent.running && i.agent.error), [V, H, oe] = vn(), se = $t(), ce =
|
|
6292
|
+
}, L = i ? [...i.precedingActivity ?? [], ...i.agent.activity] : [], ie = L.length, R = Math.max(0, Math.min(i?.panelExtraAnchorIndex ?? ie, ie)), z = L.slice(0, R), B = L.slice(R), ae = !!(i && !i.agent.running && i.agent.error), [V, H, oe] = vn(), se = $t(), ce = ji(), K = c({ at: Date.now() });
|
|
6212
6293
|
K.current.id !== i?.id && (K.current = {
|
|
6213
6294
|
id: i?.id,
|
|
6214
6295
|
at: Date.now()
|
|
@@ -6333,7 +6414,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6333
6414
|
className: `p-1 ${V ? "text-primary" : "text-muted-foreground"}`,
|
|
6334
6415
|
onClick: () => H(!V)
|
|
6335
6416
|
}),
|
|
6336
|
-
O && /* @__PURE__ */ W(
|
|
6417
|
+
O && /* @__PURE__ */ W(Bi, {
|
|
6337
6418
|
scopeId: O.id,
|
|
6338
6419
|
currentTaskId: i?.id ?? null,
|
|
6339
6420
|
open: te,
|
|
@@ -6353,7 +6434,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6353
6434
|
/* @__PURE__ */ W(rr, {})
|
|
6354
6435
|
]
|
|
6355
6436
|
}),
|
|
6356
|
-
/* @__PURE__ */ W(
|
|
6437
|
+
/* @__PURE__ */ W(Mi, {}),
|
|
6357
6438
|
/* @__PURE__ */ W("div", {
|
|
6358
6439
|
ref: j,
|
|
6359
6440
|
className: `flex-1 overflow-y-auto px-3 pb-2 ${J ? "min-h-24" : "min-h-0"}`,
|
|
@@ -6436,7 +6517,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6436
6517
|
})
|
|
6437
6518
|
]
|
|
6438
6519
|
})
|
|
6439
|
-
] }) : h.length > 0 ? /* @__PURE__ */ W(
|
|
6520
|
+
] }) : h.length > 0 ? /* @__PURE__ */ W(zi, { messages: h }) : m ? /* @__PURE__ */ W(Ri, { card: m }) : /* @__PURE__ */ W("p", {
|
|
6440
6521
|
className: "text-xs text-muted-foreground",
|
|
6441
6522
|
children: p ?? A.orchestratorStarterHint
|
|
6442
6523
|
})
|
|
@@ -6474,12 +6555,12 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6474
6555
|
children: [i?.panelActions && /* @__PURE__ */ W("div", {
|
|
6475
6556
|
className: "mb-2",
|
|
6476
6557
|
children: i.panelActions
|
|
6477
|
-
}), i ? /* @__PURE__ */ W(
|
|
6558
|
+
}), i ? /* @__PURE__ */ W(Pi, {
|
|
6478
6559
|
task: i,
|
|
6479
6560
|
editing: N,
|
|
6480
6561
|
onCancelEdit: () => P(null),
|
|
6481
6562
|
onSendEdit: (e, t) => he(e, t)
|
|
6482
|
-
}, i.id) : /* @__PURE__ */ W(
|
|
6563
|
+
}, i.id) : /* @__PURE__ */ W(Fi, {})]
|
|
6483
6564
|
}),
|
|
6484
6565
|
F && /* @__PURE__ */ G(ee, {
|
|
6485
6566
|
title: A.rewindTitle,
|
|
@@ -6505,13 +6586,13 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6505
6586
|
}
|
|
6506
6587
|
//#endregion
|
|
6507
6588
|
//#region src/presentation/useAgenticoPageContext.ts
|
|
6508
|
-
function
|
|
6589
|
+
function Hi(e, t) {
|
|
6509
6590
|
let { setPageContext: n } = $(), r = c(crypto.randomUUID()).current;
|
|
6510
6591
|
a(() => (n(r, e, t ?? null), () => n(r, null)), [e, t]);
|
|
6511
6592
|
}
|
|
6512
6593
|
//#endregion
|
|
6513
6594
|
//#region src/presentation/useSubagentComponentContext.ts
|
|
6514
|
-
function
|
|
6595
|
+
function Ui(e, t, n, r, i = !0, o) {
|
|
6515
6596
|
let { registerComponentAnchor: s } = $(), l = c(crypto.randomUUID()).current, u = c(n);
|
|
6516
6597
|
u.current = n, a(() => {
|
|
6517
6598
|
if (i) return s(l, {
|
|
@@ -6531,14 +6612,14 @@ function Vi(e, t, n, r, i = !0, o) {
|
|
|
6531
6612
|
}
|
|
6532
6613
|
//#endregion
|
|
6533
6614
|
//#region src/backend/agenticoBackend.ts
|
|
6534
|
-
var
|
|
6615
|
+
var Wi = class extends Error {
|
|
6535
6616
|
status;
|
|
6536
6617
|
code;
|
|
6537
6618
|
constructor(e, t) {
|
|
6538
6619
|
super(t), this.name = "AgenticoBackendError", this.status = e, this.code = t;
|
|
6539
6620
|
}
|
|
6540
|
-
},
|
|
6541
|
-
function
|
|
6621
|
+
}, Gi = (e) => new Promise((t) => setTimeout(t, e));
|
|
6622
|
+
function Ki(e) {
|
|
6542
6623
|
let t = e.baseUrl.replace(/\/+$/, ""), n = (...t) => (e.fetch ?? fetch)(...t), r = e.pollMs ?? 1500;
|
|
6543
6624
|
async function i(r, i, a) {
|
|
6544
6625
|
let o = await n(`${t}${i}`, {
|
|
@@ -6557,7 +6638,7 @@ function Wi(e) {
|
|
|
6557
6638
|
if (!o.ok) {
|
|
6558
6639
|
let e = c && typeof c == "object" && "error" in c ? String(c.error) : `http-${o.status}`;
|
|
6559
6640
|
if (o.status === 422 && c && typeof c == "object" && "ok" in c) return c;
|
|
6560
|
-
throw new
|
|
6641
|
+
throw new Wi(o.status, e);
|
|
6561
6642
|
}
|
|
6562
6643
|
return c;
|
|
6563
6644
|
}
|
|
@@ -6576,6 +6657,9 @@ function Wi(e) {
|
|
|
6576
6657
|
orderAccounts: async (e, r) => {
|
|
6577
6658
|
await i("PUT", `${n(e)}/accounts/order${t}`, { ids: r });
|
|
6578
6659
|
},
|
|
6660
|
+
renameAccount: async (e, r, a) => {
|
|
6661
|
+
await i("PATCH", `${n(e)}/accounts/${encodeURIComponent(r)}${t}`, { label: a });
|
|
6662
|
+
},
|
|
6579
6663
|
setOrder: async (e) => {
|
|
6580
6664
|
await i("PUT", `/connections/order${t}`, { order: e });
|
|
6581
6665
|
},
|
|
@@ -6599,7 +6683,7 @@ function Wi(e) {
|
|
|
6599
6683
|
install: async (e, t) => {
|
|
6600
6684
|
let { installId: n } = await i("POST", "/runners/installs", e), a = 0;
|
|
6601
6685
|
for (;;) {
|
|
6602
|
-
await
|
|
6686
|
+
await Gi(r);
|
|
6603
6687
|
let e = await i("GET", `/runners/installs/${encodeURIComponent(n)}?from=${a}`);
|
|
6604
6688
|
for (let n of e.lines) t({ line: n });
|
|
6605
6689
|
if (a = e.next, e.status === "error") throw Error(e.error ?? "installation failed");
|
|
@@ -6645,7 +6729,8 @@ function Wi(e) {
|
|
|
6645
6729
|
update: async (e, t) => (await i("PATCH", `/memories/${encodeURIComponent(e)}`, t)).memory,
|
|
6646
6730
|
remove: async (e) => {
|
|
6647
6731
|
await i("DELETE", `/memories/${encodeURIComponent(e)}`);
|
|
6648
|
-
}
|
|
6732
|
+
},
|
|
6733
|
+
namespaces: async (e) => (await i("GET", `/memories/${encodeURIComponent(e)}/namespaces`)).namespaces
|
|
6649
6734
|
},
|
|
6650
6735
|
memory: {
|
|
6651
6736
|
get: () => i("GET", "/memory"),
|
|
@@ -6664,6 +6749,6 @@ function Wi(e) {
|
|
|
6664
6749
|
};
|
|
6665
6750
|
}
|
|
6666
6751
|
//#endregion
|
|
6667
|
-
export { Jn as AGENTICO_MAX_WIDTH, qn as AGENTICO_MIN_WIDTH, Wt as AGENTICO_SETTING_KEYS, Kn as AGENTICO_WIDTH, Yn as AGENTICO_WIDTH_STORAGE_KEY,
|
|
6752
|
+
export { Jn as AGENTICO_MAX_WIDTH, qn as AGENTICO_MIN_WIDTH, Wt as AGENTICO_SETTING_KEYS, Kn as AGENTICO_WIDTH, Yn as AGENTICO_WIDTH_STORAGE_KEY, Vi as Agentico, Wi as AgenticoBackendError, gn as AgenticoProvider, Mi as AgenticoSettingsModal, rr as AgenticoToggle, Gt as DEFAULT_AGENTICO_SETTINGS, fe as DEFAULT_REASONING_PART_ID, de as DEFAULT_TEXT_PART_ID, Ve as JSON_EXPORT_DESTINATION_ID, Ie as MICRO_PROMPT_REGISTRY, pn as ORCHESTRATOR_TASK_ID, wt as PREVIEW_LIMIT, Ct as PREVIEW_MAX, Fe as SUMMARY_MICRO_PROMPT, Je as agenticoDe, Ke as agenticoEn, qe as agenticoIt, Te as agenticoPromptsEn, Ee as agenticoPromptsIt, Dt as agenticoTranslations, Le as applyMicroPrompts, Yt as browserSettingsStore, pt as chatHasPersonMessage, gt as chatStartedAt, bt as chatThreadOf, ft as chatTitle, At as compileRoutePattern, Oe as configureAgenticoPrompts, Ze as configureEntityChatStore, Ki as createAgenticoBackend, xe as createCrossAgentTools, dr as createHarnessExecutor, ge as defineSubagent, Ht as diffAgenticoRouting, xt as earlierSessions, Kt as effectiveSettings, yt as entityChatTaskId, Re as extractErrorMessage, ze as extractJsonBlock, Y as findSubagentManifest, he as formatQuestionAnswers, X as getAgenticoPrompts, Ge as getDestinationRegistry, st as getEntityChat, Fr as getSubagentControls, J as getSubagentRegistry, Ar as getSubagentReport, lr as harnessTranscript, Qe as hasEntityChatBackend, Et as imagePreviews, He as jsonExportDestination, vt as listEntityChats, Nt as matchAgenticoPage, jt as matchesAnyPath, It as mergeAgenticoPageRules, Lt as mergeAgenticoRouting, me as messagePartsText, at as onEntityChatsChange, St as placeEvents, be as registerCrossAgentTools, We as registerDestinations, Pr as registerSubagentControls, kr as registerSubagentReports, ve as registerSubagents, _t as removeEntityChat, ht as renameEntityChat, Pe as renderRegistryCli, Ne as renderSubagentCli, ke as resetAgenticoPrompts, Ft as resolveAgenticoRoute, Ot as routePathOf, cr as runHostTool, ct as saveEntityChat, qt as shownSettings, Pt as subagentToolsOf, tt as syncEntityChats, Se as toJsonSchema, Ce as toMcpTool, pe as upsertMessagePart, br as useAgent, $ as useAgentico, tn as useAgenticoHarness, Q as useAgenticoI18n, Hi as useAgenticoPageContext, $t as useAgenticoSettings, Ui as useSubagentComponentContext, Ut as validateAgenticoRouting };
|
|
6668
6753
|
|
|
6669
6754
|
//# sourceMappingURL=index.mjs.map
|