@standardagents/builder 0.25.1 → 0.25.3
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/built-in-routes.js +78 -2
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-C_QyBNy2.js → ApiKeysView-B9XLopSb.js} +1 -1
- package/dist/client/{CenteredContentView-c7OLhxvd.js → CenteredContentView-Bwv4MVSC.js} +1 -1
- package/dist/client/CompositionView-DJOtNN7f.js +32 -0
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang-DQIo2wlE.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-55dXt19T.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-q-A7DQTq.js → CopyButton.vue_vue_type_script_setup_true_lang-B6NqQmW9.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-B0UNyBiO.js → DataTable.vue_vue_type_script_setup_true_lang-0cbPVIIz.js} +1 -1
- package/dist/client/{JsonViewer-DrA7M9_g.js → JsonViewer-B7yHhxqP.js} +1 -1
- package/dist/client/{LoginView-BxbNgfzz.js → LoginView-mY9OytK6.js} +1 -1
- package/dist/client/{MarketplaceView-DXrtN6-0.js → MarketplaceView-B9Z9YMuB.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-CLZzFYMW.js → Modal.vue_vue_type_script_setup_true_lang-DEVCRbXl.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-BaLZApRs.js → ModelModal.vue_vue_type_script_setup_true_lang-FxEBZ3A8.js} +1 -1
- package/dist/client/{ModelsView-CVtPgAVZ.js → ModelsView-DTU8pk-T.js} +1 -1
- package/dist/client/{PromptEditView-Dhc0rBHD.js → PromptEditView-BAKoULxX.js} +1 -1
- package/dist/client/PromptModal-CoinSKIM.js +1 -0
- package/dist/client/{PromptsView-y3yvzkjM.js → PromptsView-DIkj3q-o.js} +1 -1
- package/dist/client/{ProvidersView-DN-SmDPF.js → ProvidersView-B8A6ezDR.js} +2 -2
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-CvssvzLz.js +22 -0
- package/dist/client/{ThreadsView-B1Xo2bP0.js → ThreadsView-DGCVdDej.js} +1 -1
- package/dist/client/{ToolsView-DYj_Mk9L.js → ToolsView-CC-WsZet.js} +1 -1
- package/dist/client/{UsersView-BLNNFDUM.js → UsersView-U3Stwxui.js} +1 -1
- package/dist/client/{VariablesView-D4-5tNwt.js → VariablesView-0-a1F4cn.js} +1 -1
- package/dist/client/assets/{ThreadInspectorPane-CGrBd6US.css → ThreadInspectorPane-ouC_RyKA.css} +1 -1
- package/dist/client/assets/{index-B38KmIlM.css → index-Ca3he3fq.css} +1 -1
- package/dist/client/index-4Zwz6zXD.js +6 -0
- package/dist/client/index.html +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
- package/dist/client/CompositionView-DqKI6dJ9.js +0 -32
- package/dist/client/PromptModal-DXt6M359.js +0 -1
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang-lIW3rtYB.js +0 -22
- package/dist/client/index-0OxNDXyK.js +0 -6
package/dist/built-in-routes.js
CHANGED
|
@@ -245,7 +245,7 @@ function resolveModelPricing(modelDef, providerName) {
|
|
|
245
245
|
source: "model"
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
if (providerName === "anthropic" || providerName === "cerebras" || providerName === "cloudflare" || providerName === "google" || providerName === "groq" || providerName === "openai" || providerName === "xai") {
|
|
248
|
+
if (providerName === "anthropic" || providerName === "baseten" || providerName === "cerebras" || providerName === "cloudflare" || providerName === "google" || providerName === "groq" || providerName === "novita" || providerName === "openai" || providerName === "xai") {
|
|
249
249
|
return getFallbackPricing(providerName, modelDef.model);
|
|
250
250
|
}
|
|
251
251
|
return null;
|
|
@@ -56019,6 +56019,36 @@ function transformChatMessages4(messages) {
|
|
|
56019
56019
|
}
|
|
56020
56020
|
return result;
|
|
56021
56021
|
}
|
|
56022
|
+
function stripServerToolHistory(messages, serverToolNames) {
|
|
56023
|
+
if (serverToolNames.size === 0) return messages;
|
|
56024
|
+
const strippedCallIds = /* @__PURE__ */ new Set();
|
|
56025
|
+
const result = [];
|
|
56026
|
+
for (const message of messages) {
|
|
56027
|
+
if (message.role === "assistant" && message.tool_calls?.length) {
|
|
56028
|
+
const kept = message.tool_calls.filter((call) => {
|
|
56029
|
+
if (!serverToolNames.has(call.function.name)) return true;
|
|
56030
|
+
strippedCallIds.add(call.id);
|
|
56031
|
+
return false;
|
|
56032
|
+
});
|
|
56033
|
+
if (kept.length !== message.tool_calls.length) {
|
|
56034
|
+
const next = { ...message };
|
|
56035
|
+
if (kept.length > 0) {
|
|
56036
|
+
next.tool_calls = kept;
|
|
56037
|
+
} else {
|
|
56038
|
+
delete next.tool_calls;
|
|
56039
|
+
if (!next.content) next.content = "[requested a provider-executed server tool]";
|
|
56040
|
+
}
|
|
56041
|
+
result.push(next);
|
|
56042
|
+
continue;
|
|
56043
|
+
}
|
|
56044
|
+
}
|
|
56045
|
+
if (message.role === "tool" && strippedCallIds.has(message.tool_call_id)) {
|
|
56046
|
+
continue;
|
|
56047
|
+
}
|
|
56048
|
+
result.push(message);
|
|
56049
|
+
}
|
|
56050
|
+
return result;
|
|
56051
|
+
}
|
|
56022
56052
|
function isRecord22(value) {
|
|
56023
56053
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
56024
56054
|
}
|
|
@@ -56416,6 +56446,10 @@ function buildChatParams4(request) {
|
|
|
56416
56446
|
};
|
|
56417
56447
|
if (request.tools && request.tools.length > 0) {
|
|
56418
56448
|
params.tools = transformChatTools3(request.tools, request.providerOptions);
|
|
56449
|
+
const serverToolNames = new Set(
|
|
56450
|
+
request.tools.filter(isOpenRouterProviderTool).map((tool3) => tool3.function.name)
|
|
56451
|
+
);
|
|
56452
|
+
params.messages = stripServerToolHistory(messages, serverToolNames);
|
|
56419
56453
|
const toolChoice = transformChatToolChoice4(request.toolChoice);
|
|
56420
56454
|
if (toolChoice !== void 0) {
|
|
56421
56455
|
params.tool_choice = toolChoice;
|
|
@@ -65977,7 +66011,26 @@ var config_get_default = defineController2(async ({ config, env: env2, req }) =>
|
|
|
65977
66011
|
});
|
|
65978
66012
|
|
|
65979
66013
|
// src/api/diagnostics.get.ts
|
|
65980
|
-
|
|
66014
|
+
function isFetcher(value) {
|
|
66015
|
+
return !!value && typeof value.fetch === "function";
|
|
66016
|
+
}
|
|
66017
|
+
async function iconAssetExists(icon, requestUrl2, env2) {
|
|
66018
|
+
const assetUrl = new URL(icon, requestUrl2);
|
|
66019
|
+
const assets = env2.ASSETS;
|
|
66020
|
+
if (isFetcher(assets)) {
|
|
66021
|
+
try {
|
|
66022
|
+
const res = await assets.fetch(new Request(assetUrl.toString()));
|
|
66023
|
+
if (res.ok) return true;
|
|
66024
|
+
} catch {
|
|
66025
|
+
}
|
|
66026
|
+
}
|
|
66027
|
+
try {
|
|
66028
|
+
return (await fetch(assetUrl.toString())).ok;
|
|
66029
|
+
} catch {
|
|
66030
|
+
return true;
|
|
66031
|
+
}
|
|
66032
|
+
}
|
|
66033
|
+
var diagnostics_get_default = defineController2(async ({ req, env: env2, tools, prompts, promptNames, agents, agentNames }) => {
|
|
65981
66034
|
const warnings = [];
|
|
65982
66035
|
const toolNameSources = /* @__PURE__ */ new Map();
|
|
65983
66036
|
if (tools) {
|
|
@@ -66011,6 +66064,29 @@ var diagnostics_get_default = defineController2(async ({ tools, prompts, promptN
|
|
|
66011
66064
|
}
|
|
66012
66065
|
}
|
|
66013
66066
|
}
|
|
66067
|
+
if (agents && agentNames) {
|
|
66068
|
+
for (const name15 of agentNames) {
|
|
66069
|
+
try {
|
|
66070
|
+
const definition = await agents[name15]?.();
|
|
66071
|
+
const icon = definition?.icon;
|
|
66072
|
+
if (!icon || !icon.startsWith("/")) continue;
|
|
66073
|
+
if (!await iconAssetExists(icon, req.url, env2)) {
|
|
66074
|
+
warnings.push({
|
|
66075
|
+
type: "agent_icon_missing",
|
|
66076
|
+
message: `Agent "${name15}" icon "${icon}" does not resolve to a file`,
|
|
66077
|
+
details: {
|
|
66078
|
+
// `name` keys the banner's dismissal/render key per agent.
|
|
66079
|
+
name: name15,
|
|
66080
|
+
agent: name15,
|
|
66081
|
+
icon,
|
|
66082
|
+
hint: `Add the file to your project's public directory (public${icon}) or use a full URL or data URI.`
|
|
66083
|
+
}
|
|
66084
|
+
});
|
|
66085
|
+
}
|
|
66086
|
+
} catch {
|
|
66087
|
+
}
|
|
66088
|
+
}
|
|
66089
|
+
}
|
|
66014
66090
|
for (const [name15, sources] of toolNameSources) {
|
|
66015
66091
|
if (sources.size > 1) {
|
|
66016
66092
|
warnings.push({
|