@agent-native/core 0.169.0 → 0.169.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/corpus/README.md +1 -1
- package/corpus/templates/analytics/actions/bigquery-table-info.ts +3 -2
- package/corpus/templates/analytics/actions/search-bigquery-schema.ts +130 -4
- package/corpus/templates/analytics/agent-native.config.ts +1 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +36 -23
- package/corpus/templates/analytics/app/lib/dashboard-visibility.ts +41 -0
- package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +34 -9
- package/corpus/templates/analytics/changelog/2026-08-21-dashboard-filters-keep-other-users-dashboards-out-of-mine.md +6 -0
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +14 -3
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +33 -3
- package/corpus/templates/brain/server/lib/brain.ts +27 -2
- package/corpus/templates/clips/actions/stop-meeting-recording.ts +87 -6
- package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +3 -4
- package/corpus/templates/design/app/components/design/EditPanel.tsx +15 -47
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +3 -3
- package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +0 -7
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +2 -4
- package/corpus/templates/design/app/i18n-data.ts +10 -10
- package/corpus/templates/design/app/pages/DesignEditor.tsx +22 -22
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +39 -8
- package/corpus/templates/design/app/pages/DesignSystems.tsx +1 -1
- package/corpus/templates/design/app/pages/Index.tsx +1 -1
- package/corpus/templates/design/app/pages/design-editor/preview-navigation.ts +25 -0
- package/corpus/templates/mail/app/hooks/use-emails.ts +13 -3
- package/dist/agent/engine/credential-errors.d.ts +1 -1
- package/dist/agent/engine/credential-errors.js +2 -2
- package/dist/client/AssistantChat.js +47 -15
- package/dist/client/ConnectBuilderCard.d.ts +3 -1
- package/dist/client/ConnectBuilderCard.js +6 -3
- package/dist/client/chat/message-components.d.ts +7 -0
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/run-recovery.js +5 -2
- package/dist/client/chat/tool-call-display.js +9 -3
- package/dist/client/error-format.js +12 -0
- package/dist/client/navigation/index.d.ts +1 -0
- package/dist/client/navigation/index.js +1 -0
- package/dist/client/route-state.js +6 -0
- package/dist/client/workspace-app-navigation.d.ts +10 -0
- package/dist/client/workspace-app-navigation.js +38 -0
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +13 -0
- package/dist/deploy/build.js +51 -0
- package/dist/localization/core-messages/ar-SA.js +1 -1
- package/dist/localization/core-messages/de-DE.js +1 -1
- package/dist/localization/core-messages/en-US.d.ts +1 -1
- package/dist/localization/core-messages/en-US.js +1 -1
- package/dist/localization/core-messages/es-ES.js +1 -1
- package/dist/localization/core-messages/fr-FR.js +1 -1
- package/dist/localization/core-messages/hi-IN.js +1 -1
- package/dist/localization/core-messages/ja-JP.js +1 -1
- package/dist/localization/core-messages/ko-KR.js +1 -1
- package/dist/localization/core-messages/pt-BR.js +1 -1
- package/dist/localization/core-messages/zh-CN.js +1 -1
- package/dist/localization/core-messages/zh-TW.js +1 -1
- package/dist/localization/core-messages.d.ts +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/db/check-scoping.js +9 -6
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/builder-browser.d.ts +4 -0
- package/dist/server/builder-browser.js +23 -1
- package/dist/server/core-routes-plugin.js +13 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +3 -3
- /package/corpus/templates/dispatch/app/routes/{apps.$appId.tsx → apps.$appId.$.tsx} +0 -0
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
|
|
14
14
|
*/
|
|
15
15
|
export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
16
|
-
ok?: undefined;
|
|
17
16
|
error: string;
|
|
17
|
+
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
19
|
error?: undefined;
|
|
20
20
|
ok: boolean;
|
package/dist/deploy/build.d.ts
CHANGED
|
@@ -254,6 +254,19 @@ export declare function assertSingleTemplateNetlifyBuildOutput(projectCwd: strin
|
|
|
254
254
|
* Netlify platform 404s. Preserve any real redirects from `public/_redirects`.
|
|
255
255
|
*/
|
|
256
256
|
export declare function writeSingleTemplateNetlifyRedirects(projectCwd: string): void;
|
|
257
|
+
/**
|
|
258
|
+
* Whether the emitted bundle actually imports the `libsql` native addon.
|
|
259
|
+
*
|
|
260
|
+
* The `@libsql/client` node entry `require`s it; `@libsql/client/web` and
|
|
261
|
+
* `better-sqlite3` do not. Probing the emitted output is the only gate that
|
|
262
|
+
* cannot be wrong: `getDialect()` reads `DATABASE_URL` at RUNTIME, and neither
|
|
263
|
+
* the docs nor the beta deploy workflow sets it at build time, so build-time
|
|
264
|
+
* dialect is unknowable. This mirrors `findServerlessBrowserRuntimeConsumer`,
|
|
265
|
+
* which already gates the Chromium copy the same way — the asymmetry is why a
|
|
266
|
+
* 9.3MB Linux SQLite driver shipped in the docs function, a deployment that
|
|
267
|
+
* runs Postgres and can never load it.
|
|
268
|
+
*/
|
|
269
|
+
export declare function bundleImportsLibsqlNativeAddon(serverDir: string): boolean;
|
|
257
270
|
/**
|
|
258
271
|
* Nitro's file tracer can over-include optional desktop/dev packages that are
|
|
259
272
|
* present in a monorepo install but cannot run in serverless. Netlify installs
|
package/dist/deploy/build.js
CHANGED
|
@@ -3389,9 +3389,60 @@ export function writeSingleTemplateNetlifyRedirects(projectCwd) {
|
|
|
3389
3389
|
}
|
|
3390
3390
|
console.log('[deploy] Removed Netlify fallback rewrite to /.netlify/functions/server (incompatible with Nitro config.path: "/*").');
|
|
3391
3391
|
}
|
|
3392
|
+
/**
|
|
3393
|
+
* Whether the emitted bundle actually imports the `libsql` native addon.
|
|
3394
|
+
*
|
|
3395
|
+
* The `@libsql/client` node entry `require`s it; `@libsql/client/web` and
|
|
3396
|
+
* `better-sqlite3` do not. Probing the emitted output is the only gate that
|
|
3397
|
+
* cannot be wrong: `getDialect()` reads `DATABASE_URL` at RUNTIME, and neither
|
|
3398
|
+
* the docs nor the beta deploy workflow sets it at build time, so build-time
|
|
3399
|
+
* dialect is unknowable. This mirrors `findServerlessBrowserRuntimeConsumer`,
|
|
3400
|
+
* which already gates the Chromium copy the same way — the asymmetry is why a
|
|
3401
|
+
* 9.3MB Linux SQLite driver shipped in the docs function, a deployment that
|
|
3402
|
+
* runs Postgres and can never load it.
|
|
3403
|
+
*/
|
|
3404
|
+
export function bundleImportsLibsqlNativeAddon(serverDir) {
|
|
3405
|
+
const bareImport = /(?:require\(|from\s*)["']libsql["']/;
|
|
3406
|
+
const stack = [serverDir];
|
|
3407
|
+
while (stack.length > 0) {
|
|
3408
|
+
const dir = stack.pop();
|
|
3409
|
+
let entries;
|
|
3410
|
+
try {
|
|
3411
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
3412
|
+
}
|
|
3413
|
+
catch {
|
|
3414
|
+
continue;
|
|
3415
|
+
}
|
|
3416
|
+
for (const entry of entries) {
|
|
3417
|
+
const full = path.join(dir, entry.name);
|
|
3418
|
+
if (entry.isDirectory()) {
|
|
3419
|
+
// The copied native package itself is the thing being gated; its own
|
|
3420
|
+
// files must never count as a consumer.
|
|
3421
|
+
if (entry.name === "node_modules" || entry.name === "@libsql")
|
|
3422
|
+
continue;
|
|
3423
|
+
stack.push(full);
|
|
3424
|
+
continue;
|
|
3425
|
+
}
|
|
3426
|
+
if (!/\.(?:mjs|cjs|js)$/.test(entry.name))
|
|
3427
|
+
continue;
|
|
3428
|
+
try {
|
|
3429
|
+
if (bareImport.test(fs.readFileSync(full, "utf8")))
|
|
3430
|
+
return true;
|
|
3431
|
+
}
|
|
3432
|
+
catch {
|
|
3433
|
+
continue;
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
return false;
|
|
3438
|
+
}
|
|
3392
3439
|
function copyInstalledLibsqlNativePackages(serverDir) {
|
|
3393
3440
|
if (!serverDir || !fs.existsSync(serverDir))
|
|
3394
3441
|
return;
|
|
3442
|
+
if (!bundleImportsLibsqlNativeAddon(serverDir)) {
|
|
3443
|
+
console.log("[deploy] Skipped the libsql native package: the emitted bundle never imports the `libsql` addon.");
|
|
3444
|
+
return;
|
|
3445
|
+
}
|
|
3395
3446
|
const nodeModulesRoots = nodeModulesAncestors(cwd);
|
|
3396
3447
|
const destScopeDir = path.join(serverDir, "node_modules", "@libsql");
|
|
3397
3448
|
let copied = 0;
|
|
@@ -270,7 +270,7 @@ const messages = {
|
|
|
270
270
|
"errorMessages.gatewayNoDetails": "لم تُرجع بوابة النموذج أي تفاصيل عن الخطأ وتعذّر على المحادثة الاسترداد. انتظر قليلًا ثم أعد المحاولة، أو ابدأ محادثة جديدة إذا استمرت المشكلة.",
|
|
271
271
|
"errorMessages.inactivityTimeout": "انتهت مهلة اتصال الوكيل قبل أن يتمكن من الإكمال. يمكنك المتابعة من العمل الجزئي أو إعادة المحاولة.",
|
|
272
272
|
"errorMessages.invalidToolSchema": "كان مخطط إحدى الأدوات غير صالح، لذلك رفض النموذج الطلب قبل بدئه. يمكن تخطي الأداة غير الصالحة وإعادة محاولة الطلب.",
|
|
273
|
-
"errorMessages.noProviderConnected": "لا يوجد مزوّد LLM متصل. افتح
|
|
273
|
+
"errorMessages.noProviderConnected": "لا يوجد مزوّد LLM متصل. افتح الإعدادات > الوكيل > مزوّدو الذكاء الاصطناعي، ثم اربط Builder.io (تتوفر خطة مجانية) أو أضف مفتاح مزوّد.",
|
|
274
274
|
"errorMessages.openBuilderSpaceSettings": "فتح إعدادات مساحة Builder",
|
|
275
275
|
"errorMessages.providerAuthentication": "رفض مزوّد النموذج مفتاح API المحفوظ. حدّث المفتاح من الإعدادات ← عمليات التكامل ← مفاتيح API، ثم أعد المحاولة.",
|
|
276
276
|
"errorMessages.providerConfiguration": "لا يمكن لهذا النموذج استخدام الأدوات بالإعدادات الحالية. بدّل النموذج من الإعدادات، ثم أعد المحاولة.",
|
|
@@ -399,7 +399,7 @@ const messages = {
|
|
|
399
399
|
"errorMessages.gatewayNoDetails": "Das Modell-Gateway hat keine Fehlerdetails zurückgegeben und der Chat konnte nicht fortgesetzt werden. Warte einen Moment und versuche es erneut. Falls das Problem bestehen bleibt, starte einen neuen Chat.",
|
|
400
400
|
"errorMessages.inactivityTimeout": "Die Verbindung zum Agenten wurde wegen Zeitüberschreitung beendet, bevor er fertig war. Du kannst mit dem Teilergebnis fortfahren oder es erneut versuchen.",
|
|
401
401
|
"errorMessages.invalidToolSchema": "Ein Tool-Schema war ungültig. Deshalb hat das Modell die Anfrage abgelehnt, bevor sie gestartet wurde. Das ungültige Tool kann übersprungen und die Anfrage erneut gesendet werden.",
|
|
402
|
-
"errorMessages.noProviderConnected": "Es ist kein LLM-Anbieter verbunden. Öffne
|
|
402
|
+
"errorMessages.noProviderConnected": "Es ist kein LLM-Anbieter verbunden. Öffne Einstellungen > Agent > KI-Anbieter und verbinde anschließend Builder.io (kostenloser Tarif verfügbar) oder füge einen Anbieterschlüssel hinzu.",
|
|
403
403
|
"errorMessages.openBuilderSpaceSettings": "Builder-Space-Einstellungen öffnen",
|
|
404
404
|
"errorMessages.providerAuthentication": "Der Modellanbieter hat den gespeicherten API-Schlüssel abgelehnt. Aktualisiere ihn unter Einstellungen → Integrationen → API-Schlüssel und versuche es erneut.",
|
|
405
405
|
"errorMessages.providerConfiguration": "Dieses Modell kann mit den aktuellen Einstellungen keine Tools verwenden. Wechsle in den Einstellungen das Modell und versuche es erneut.",
|
|
@@ -262,7 +262,7 @@ declare const messages: {
|
|
|
262
262
|
readonly "errorMessages.gatewayNoDetails": "The model gateway returned no error details and the chat couldn't recover. Wait a moment and retry, or start a new chat if it keeps happening.";
|
|
263
263
|
readonly "errorMessages.inactivityTimeout": "The agent connection timed out before it could finish. You can continue from the partial work or retry.";
|
|
264
264
|
readonly "errorMessages.invalidToolSchema": "A tool schema was invalid, so the model rejected the request before it started. The invalid tool can be skipped and the request retried.";
|
|
265
|
-
readonly "errorMessages.noProviderConnected": "No LLM provider is connected. Open
|
|
265
|
+
readonly "errorMessages.noProviderConnected": "No LLM provider is connected. Open Settings > Agent > AI providers, then connect Builder.io (free tier available) or add a provider key.";
|
|
266
266
|
readonly "errorMessages.openBuilderSpaceSettings": "Open Builder space settings";
|
|
267
267
|
readonly "errorMessages.providerAuthentication": "The model provider rejected the saved API key. Update the key in Settings → Integrations → API keys, then retry.";
|
|
268
268
|
readonly "errorMessages.providerConfiguration": "This model can't use tools with the current settings. Switch models in Settings, then retry.";
|
|
@@ -262,7 +262,7 @@ const messages = {
|
|
|
262
262
|
"errorMessages.gatewayNoDetails": "The model gateway returned no error details and the chat couldn't recover. Wait a moment and retry, or start a new chat if it keeps happening.",
|
|
263
263
|
"errorMessages.inactivityTimeout": "The agent connection timed out before it could finish. You can continue from the partial work or retry.",
|
|
264
264
|
"errorMessages.invalidToolSchema": "A tool schema was invalid, so the model rejected the request before it started. The invalid tool can be skipped and the request retried.",
|
|
265
|
-
"errorMessages.noProviderConnected": "No LLM provider is connected. Open
|
|
265
|
+
"errorMessages.noProviderConnected": "No LLM provider is connected. Open Settings > Agent > AI providers, then connect Builder.io (free tier available) or add a provider key.",
|
|
266
266
|
"errorMessages.openBuilderSpaceSettings": "Open Builder space settings",
|
|
267
267
|
"errorMessages.providerAuthentication": "The model provider rejected the saved API key. Update the key in Settings → Integrations → API keys, then retry.",
|
|
268
268
|
"errorMessages.providerConfiguration": "This model can't use tools with the current settings. Switch models in Settings, then retry.",
|
|
@@ -406,7 +406,7 @@ const messages = {
|
|
|
406
406
|
"errorMessages.gatewayNoDetails": "La pasarela del modelo no devolvió detalles del error y el chat no pudo recuperarse. Espera un momento y vuelve a intentarlo. Si el problema continúa, inicia un chat nuevo.",
|
|
407
407
|
"errorMessages.inactivityTimeout": "La conexión del agente expiró antes de que pudiera finalizar. Puedes continuar desde el trabajo parcial o volver a intentarlo.",
|
|
408
408
|
"errorMessages.invalidToolSchema": "El esquema de una herramienta no era válido, así que el modelo rechazó la solicitud antes de iniciarla. Puedes omitir la herramienta no válida y volver a intentarlo.",
|
|
409
|
-
"errorMessages.noProviderConnected": "No hay ningún proveedor de LLM conectado. Abre
|
|
409
|
+
"errorMessages.noProviderConnected": "No hay ningún proveedor de LLM conectado. Abre Configuración > Agente > Proveedores de IA y, a continuación, conecta Builder.io (nivel gratuito disponible) o añade una clave de proveedor.",
|
|
410
410
|
"errorMessages.openBuilderSpaceSettings": "Abrir los ajustes del espacio de Builder",
|
|
411
411
|
"errorMessages.providerAuthentication": "El proveedor del modelo rechazó la clave de API guardada. Actualízala en Ajustes → Integraciones → Claves de API y vuelve a intentarlo.",
|
|
412
412
|
"errorMessages.providerConfiguration": "Este modelo no puede usar herramientas con los ajustes actuales. Cambia de modelo en Ajustes y vuelve a intentarlo.",
|
|
@@ -406,7 +406,7 @@ const messages = {
|
|
|
406
406
|
"errorMessages.gatewayNoDetails": "La passerelle du modèle n’a fourni aucun détail sur l’erreur et la discussion n’a pas pu reprendre. Patientez un instant et réessayez. Si le problème persiste, démarrez une nouvelle discussion.",
|
|
407
407
|
"errorMessages.inactivityTimeout": "La connexion à l’agent a expiré avant la fin. Vous pouvez poursuivre à partir du travail partiel ou réessayer.",
|
|
408
408
|
"errorMessages.invalidToolSchema": "Le schéma d’un outil n’était pas valide. Le modèle a donc rejeté la demande avant son démarrage. Vous pouvez ignorer cet outil et réessayer.",
|
|
409
|
-
"errorMessages.noProviderConnected": "Aucun fournisseur de LLM n’est connecté. Ouvrez
|
|
409
|
+
"errorMessages.noProviderConnected": "Aucun fournisseur de LLM n’est connecté. Ouvrez Paramètres > Agent > Fournisseurs d’IA, puis connectez Builder.io (offre gratuite disponible) ou ajoutez une clé de fournisseur.",
|
|
410
410
|
"errorMessages.openBuilderSpaceSettings": "Ouvrir les paramètres de l’espace Builder",
|
|
411
411
|
"errorMessages.providerAuthentication": "Le fournisseur du modèle a rejeté la clé API enregistrée. Mettez-la à jour dans Paramètres → Intégrations → Clés API, puis réessayez.",
|
|
412
412
|
"errorMessages.providerConfiguration": "Ce modèle ne peut pas utiliser d’outils avec les paramètres actuels. Changez de modèle dans les paramètres, puis réessayez.",
|
|
@@ -262,7 +262,7 @@ const messages = {
|
|
|
262
262
|
"errorMessages.gatewayNoDetails": "मॉडल गेटवे ने त्रुटि का कोई विवरण नहीं दिया और चैट रिकवर नहीं हो सकी। कुछ देर रुककर फिर से प्रयास करें या समस्या बनी रहने पर नई चैट शुरू करें।",
|
|
263
263
|
"errorMessages.inactivityTimeout": "एजेंट का कनेक्शन काम पूरा होने से पहले समय सीमा पर पहुँच गया। आप आंशिक काम से जारी रख सकते हैं या फिर से प्रयास कर सकते हैं।",
|
|
264
264
|
"errorMessages.invalidToolSchema": "एक टूल स्कीमा अमान्य था, इसलिए मॉडल ने अनुरोध शुरू होने से पहले ही अस्वीकार कर दिया। अमान्य टूल को छोड़कर अनुरोध दोबारा किया जा सकता है।",
|
|
265
|
-
"errorMessages.noProviderConnected": "कोई LLM प्रदाता कनेक्ट नहीं है।
|
|
265
|
+
"errorMessages.noProviderConnected": "कोई LLM प्रदाता कनेक्ट नहीं है। सेटिंग्स > एजेंट > AI प्रदाता खोलें, फिर Builder.io कनेक्ट करें (मुफ़्त स्तर उपलब्ध है) या प्रदाता कुंजी जोड़ें।",
|
|
266
266
|
"errorMessages.openBuilderSpaceSettings": "Builder स्पेस सेटिंग्स खोलें",
|
|
267
267
|
"errorMessages.providerAuthentication": "मॉडल प्रदाता ने सहेजी गई API कुंजी अस्वीकार कर दी। सेटिंग्स → इंटीग्रेशन → API कुंजियाँ में कुंजी अपडेट करें, फिर से प्रयास करें।",
|
|
268
268
|
"errorMessages.providerConfiguration": "यह मॉडल मौजूदा सेटिंग्स के साथ टूल का उपयोग नहीं कर सकता। सेटिंग्स में मॉडल बदलें, फिर से प्रयास करें।",
|
|
@@ -260,7 +260,7 @@ const messages = {
|
|
|
260
260
|
"errorMessages.gatewayNoDetails": "モデルゲートウェイからエラーの詳細が返されず、チャットを復旧できませんでした。少し待ってから再試行し、繰り返し発生する場合は新しいチャットを開始してください。",
|
|
261
261
|
"errorMessages.inactivityTimeout": "エージェントとの接続が完了前にタイムアウトしました。途中までの作業から続行するか、再試行できます。",
|
|
262
262
|
"errorMessages.invalidToolSchema": "ツールのスキーマが無効だったため、モデルは開始前にリクエストを拒否しました。無効なツールをスキップして再試行できます。",
|
|
263
|
-
"errorMessages.noProviderConnected": "LLM
|
|
263
|
+
"errorMessages.noProviderConnected": "LLM プロバイダーが接続されていません。設定 > エージェント > AI プロバイダーを開き、Builder.io(無料プランあり)に接続するか、プロバイダーキーを追加してください。",
|
|
264
264
|
"errorMessages.openBuilderSpaceSettings": "Builder スペース設定を開く",
|
|
265
265
|
"errorMessages.providerAuthentication": "モデルプロバイダーが保存済みの API キーを拒否しました。設定 → 連携 → API キーでキーを更新してから再試行してください。",
|
|
266
266
|
"errorMessages.providerConfiguration": "現在の設定では、このモデルはツールを使用できません。設定でモデルを切り替えてから再試行してください。",
|
|
@@ -260,7 +260,7 @@ const messages = {
|
|
|
260
260
|
"errorMessages.gatewayNoDetails": "모델 게이트웨이가 오류 세부 정보를 반환하지 않아 채팅을 복구할 수 없습니다. 잠시 후 다시 시도하고, 문제가 계속되면 새 채팅을 시작하세요.",
|
|
261
261
|
"errorMessages.inactivityTimeout": "에이전트 연결이 완료 전에 시간 초과되었습니다. 부분적으로 완료된 작업에서 계속하거나 다시 시도할 수 있습니다.",
|
|
262
262
|
"errorMessages.invalidToolSchema": "도구 스키마가 올바르지 않아 모델이 요청 시작 전에 거부했습니다. 올바르지 않은 도구를 건너뛰고 요청을 다시 시도할 수 있습니다.",
|
|
263
|
-
"errorMessages.noProviderConnected": "연결된 LLM 제공업체가 없습니다.
|
|
263
|
+
"errorMessages.noProviderConnected": "연결된 LLM 제공업체가 없습니다. 설정 > 에이전트 > AI 제공업체를 연 다음 Builder.io(무료 요금제 제공)를 연결하거나 제공업체 키를 추가하세요.",
|
|
264
264
|
"errorMessages.openBuilderSpaceSettings": "Builder 스페이스 설정 열기",
|
|
265
265
|
"errorMessages.providerAuthentication": "모델 제공업체가 저장된 API 키를 거부했습니다. 설정 → 연동 → API 키에서 키를 업데이트한 후 다시 시도하세요.",
|
|
266
266
|
"errorMessages.providerConfiguration": "현재 설정에서는 이 모델이 도구를 사용할 수 없습니다. 설정에서 모델을 변경한 후 다시 시도하세요.",
|
|
@@ -406,7 +406,7 @@ const messages = {
|
|
|
406
406
|
"errorMessages.gatewayNoDetails": "O gateway do modelo não retornou detalhes do erro, e o chat não pôde ser recuperado. Aguarde um momento e tente novamente. Se o problema persistir, inicie um novo chat.",
|
|
407
407
|
"errorMessages.inactivityTimeout": "A conexão com o agente expirou antes da conclusão. Você pode continuar a partir do trabalho parcial ou tentar novamente.",
|
|
408
408
|
"errorMessages.invalidToolSchema": "O esquema de uma ferramenta era inválido, então o modelo rejeitou a solicitação antes de iniciá-la. Você pode ignorar a ferramenta inválida e tentar novamente.",
|
|
409
|
-
"errorMessages.noProviderConnected": "Nenhum provedor de LLM está conectado. Abra
|
|
409
|
+
"errorMessages.noProviderConnected": "Nenhum provedor de LLM está conectado. Abra Configurações > Agente > Provedores de IA e conecte o Builder.io (nível gratuito disponível) ou adicione uma chave de provedor.",
|
|
410
410
|
"errorMessages.openBuilderSpaceSettings": "Abrir as configurações do espaço do Builder",
|
|
411
411
|
"errorMessages.providerAuthentication": "O provedor do modelo rejeitou a chave de API salva. Atualize-a em Configurações → Integrações → Chaves de API e tente novamente.",
|
|
412
412
|
"errorMessages.providerConfiguration": "Este modelo não pode usar ferramentas com as configurações atuais. Troque de modelo em Configurações e tente novamente.",
|
|
@@ -260,7 +260,7 @@ const messages = {
|
|
|
260
260
|
"errorMessages.gatewayNoDetails": "模型网关未返回错误详情,聊天无法恢复。请稍等片刻后重试;如果问题持续出现,请开始新聊天。",
|
|
261
261
|
"errorMessages.inactivityTimeout": "智能体连接在完成前超时。您可以从已完成的部分继续,也可以重试。",
|
|
262
262
|
"errorMessages.invalidToolSchema": "工具架构无效,因此模型在请求开始前拒绝了该请求。可以跳过无效工具并重试请求。",
|
|
263
|
-
"errorMessages.noProviderConnected": "尚未连接任何 LLM
|
|
263
|
+
"errorMessages.noProviderConnected": "尚未连接任何 LLM 提供商。打开设置 > 智能体 > AI 提供商,然后连接 Builder.io(提供免费套餐)或添加提供商密钥。",
|
|
264
264
|
"errorMessages.openBuilderSpaceSettings": "打开 Builder 空间设置",
|
|
265
265
|
"errorMessages.providerAuthentication": "模型提供商拒绝了已保存的 API 密钥。请在设置 → 集成 → API 密钥中更新密钥,然后重试。",
|
|
266
266
|
"errorMessages.providerConfiguration": "此模型无法在当前设置下使用工具。请在设置中切换模型,然后重试。",
|
|
@@ -260,7 +260,7 @@ const messages = {
|
|
|
260
260
|
"errorMessages.gatewayNoDetails": "模型閘道未傳回錯誤詳細資訊,聊天無法復原。請稍候再試;如果問題持續發生,請開始新聊天。",
|
|
261
261
|
"errorMessages.inactivityTimeout": "代理連線在完成前逾時。您可以從已完成的部分繼續,也可以重試。",
|
|
262
262
|
"errorMessages.invalidToolSchema": "工具結構描述無效,因此模型在要求開始前便拒絕了要求。您可以略過無效工具並重試要求。",
|
|
263
|
-
"errorMessages.noProviderConnected": "尚未連接任何 LLM
|
|
263
|
+
"errorMessages.noProviderConnected": "尚未連接任何 LLM 提供商。開啟設定 > 代理程式 > AI 提供商,然後連接 Builder.io(提供免費方案)或新增提供商金鑰。",
|
|
264
264
|
"errorMessages.openBuilderSpaceSettings": "開啟 Builder 空間設定",
|
|
265
265
|
"errorMessages.providerAuthentication": "模型供應商拒絕了已儲存的 API 金鑰。請在設定 → 整合 → API 金鑰中更新金鑰,然後重試。",
|
|
266
266
|
"errorMessages.providerConfiguration": "這個模型無法在目前設定下使用工具。請在設定中切換模型,然後重試。",
|
|
@@ -264,7 +264,7 @@ export declare const englishAgentChatMessages: {
|
|
|
264
264
|
readonly "errorMessages.gatewayNoDetails": "The model gateway returned no error details and the chat couldn't recover. Wait a moment and retry, or start a new chat if it keeps happening.";
|
|
265
265
|
readonly "errorMessages.inactivityTimeout": "The agent connection timed out before it could finish. You can continue from the partial work or retry.";
|
|
266
266
|
readonly "errorMessages.invalidToolSchema": "A tool schema was invalid, so the model rejected the request before it started. The invalid tool can be skipped and the request retried.";
|
|
267
|
-
readonly "errorMessages.noProviderConnected": "No LLM provider is connected. Open
|
|
267
|
+
readonly "errorMessages.noProviderConnected": "No LLM provider is connected. Open Settings > Agent > AI providers, then connect Builder.io (free tier available) or add a provider key.";
|
|
268
268
|
readonly "errorMessages.openBuilderSpaceSettings": "Open Builder space settings";
|
|
269
269
|
readonly "errorMessages.providerAuthentication": "The model provider rejected the saved API key. Update the key in Settings → Integrations → API keys, then retry.";
|
|
270
270
|
readonly "errorMessages.providerConfiguration": "This model can't use tools with the current settings. Switch models in Settings, then retry.";
|
|
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
41
41
|
thumbsUpRate: number;
|
|
42
42
|
avgEvalScore: number;
|
|
43
43
|
} | {
|
|
44
|
-
error?: undefined;
|
|
45
44
|
summary: import("./types.js").TraceSummary;
|
|
46
45
|
spans: import("./types.js").TraceSpan[];
|
|
47
46
|
id?: undefined;
|
|
47
|
+
error?: undefined;
|
|
48
48
|
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
|
-
error?: undefined;
|
|
51
50
|
summary?: undefined;
|
|
52
51
|
spans?: undefined;
|
|
53
52
|
id: string;
|
|
53
|
+
error?: undefined;
|
|
54
54
|
ok?: undefined;
|
|
55
55
|
} | {
|
|
56
56
|
summary?: undefined;
|
|
@@ -59,9 +59,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
59
59
|
error: any;
|
|
60
60
|
ok?: undefined;
|
|
61
61
|
} | {
|
|
62
|
-
error?: undefined;
|
|
63
62
|
summary?: undefined;
|
|
64
63
|
spans?: undefined;
|
|
65
64
|
id?: undefined;
|
|
65
|
+
error?: undefined;
|
|
66
66
|
ok: boolean;
|
|
67
67
|
}>>;
|
|
@@ -75,9 +75,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
deleted?: undefined;
|
|
79
|
-
found?: undefined;
|
|
80
78
|
id?: undefined;
|
|
79
|
+
provider?: undefined;
|
|
80
|
+
deleted?: undefined;
|
|
81
81
|
providers: {
|
|
82
82
|
id: string;
|
|
83
83
|
label: string;
|
|
@@ -88,46 +88,46 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
88
88
|
updatedAt: number;
|
|
89
89
|
}[];
|
|
90
90
|
count: number;
|
|
91
|
-
|
|
91
|
+
found?: undefined;
|
|
92
92
|
registered?: undefined;
|
|
93
93
|
label?: undefined;
|
|
94
94
|
message?: undefined;
|
|
95
95
|
} | {
|
|
96
|
-
deleted?: undefined;
|
|
97
96
|
id?: undefined;
|
|
98
|
-
providers?: undefined;
|
|
99
97
|
count?: undefined;
|
|
98
|
+
deleted?: undefined;
|
|
99
|
+
providers?: undefined;
|
|
100
100
|
found: boolean;
|
|
101
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
102
102
|
registered?: undefined;
|
|
103
103
|
label?: undefined;
|
|
104
104
|
message?: undefined;
|
|
105
105
|
} | {
|
|
106
|
-
deleted?: undefined;
|
|
107
|
-
providers?: undefined;
|
|
108
106
|
count?: undefined;
|
|
109
107
|
provider?: undefined;
|
|
108
|
+
deleted?: undefined;
|
|
109
|
+
providers?: undefined;
|
|
110
110
|
found: boolean;
|
|
111
111
|
id: string;
|
|
112
112
|
registered?: undefined;
|
|
113
113
|
label?: undefined;
|
|
114
114
|
message?: undefined;
|
|
115
115
|
} | {
|
|
116
|
-
found?: undefined;
|
|
117
|
-
providers?: undefined;
|
|
118
116
|
count?: undefined;
|
|
119
117
|
provider?: undefined;
|
|
118
|
+
providers?: undefined;
|
|
119
|
+
found?: undefined;
|
|
120
120
|
deleted: boolean;
|
|
121
121
|
id: string;
|
|
122
122
|
registered?: undefined;
|
|
123
123
|
label?: undefined;
|
|
124
124
|
message?: undefined;
|
|
125
125
|
} | {
|
|
126
|
-
deleted?: undefined;
|
|
127
|
-
found?: undefined;
|
|
128
|
-
providers?: undefined;
|
|
129
126
|
count?: undefined;
|
|
130
127
|
provider?: undefined;
|
|
128
|
+
deleted?: undefined;
|
|
129
|
+
providers?: undefined;
|
|
130
|
+
found?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
133
133
|
label: string;
|
|
@@ -311,10 +311,10 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
-
id?: undefined;
|
|
315
|
-
deleted?: undefined;
|
|
316
|
-
found?: undefined;
|
|
317
314
|
message?: undefined;
|
|
315
|
+
deleted?: undefined;
|
|
316
|
+
id?: undefined;
|
|
317
|
+
provider?: undefined;
|
|
318
318
|
providers: {
|
|
319
319
|
id: string;
|
|
320
320
|
label: string;
|
|
@@ -325,45 +325,45 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
325
325
|
updatedAt: number;
|
|
326
326
|
}[];
|
|
327
327
|
count: number;
|
|
328
|
-
|
|
328
|
+
found?: undefined;
|
|
329
329
|
registered?: undefined;
|
|
330
330
|
label?: undefined;
|
|
331
331
|
} | {
|
|
332
|
-
id?: undefined;
|
|
333
|
-
deleted?: undefined;
|
|
334
332
|
message?: undefined;
|
|
335
|
-
|
|
333
|
+
deleted?: undefined;
|
|
336
334
|
count?: undefined;
|
|
335
|
+
id?: undefined;
|
|
336
|
+
providers?: undefined;
|
|
337
337
|
found: boolean;
|
|
338
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
339
339
|
registered?: undefined;
|
|
340
340
|
label?: undefined;
|
|
341
341
|
} | {
|
|
342
|
-
deleted?: undefined;
|
|
343
342
|
message?: undefined;
|
|
344
|
-
|
|
343
|
+
deleted?: undefined;
|
|
345
344
|
count?: undefined;
|
|
346
345
|
provider?: undefined;
|
|
346
|
+
providers?: undefined;
|
|
347
347
|
found: boolean;
|
|
348
348
|
id: string;
|
|
349
349
|
registered?: undefined;
|
|
350
350
|
label?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
found?: undefined;
|
|
353
352
|
message?: undefined;
|
|
354
|
-
providers?: undefined;
|
|
355
353
|
count?: undefined;
|
|
356
354
|
provider?: undefined;
|
|
355
|
+
providers?: undefined;
|
|
356
|
+
found?: undefined;
|
|
357
357
|
deleted: boolean;
|
|
358
358
|
id: string;
|
|
359
359
|
registered?: undefined;
|
|
360
360
|
label?: undefined;
|
|
361
361
|
} | {
|
|
362
362
|
deleted?: undefined;
|
|
363
|
-
found?: undefined;
|
|
364
|
-
providers?: undefined;
|
|
365
363
|
count?: undefined;
|
|
366
364
|
provider?: undefined;
|
|
365
|
+
providers?: undefined;
|
|
366
|
+
found?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
label: string;
|
|
@@ -73,7 +73,6 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
73
73
|
offset?: unknown;
|
|
74
74
|
limit?: unknown;
|
|
75
75
|
}, {
|
|
76
|
-
deleted?: undefined;
|
|
77
76
|
jobs: {
|
|
78
77
|
id: string;
|
|
79
78
|
name: string;
|
|
@@ -84,6 +83,7 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
84
83
|
updatedAt: string;
|
|
85
84
|
}[];
|
|
86
85
|
total: number;
|
|
86
|
+
deleted?: undefined;
|
|
87
87
|
jobId?: undefined;
|
|
88
88
|
} | {
|
|
89
89
|
jobs?: undefined;
|
|
@@ -91,9 +91,9 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
91
91
|
deleted: boolean;
|
|
92
92
|
jobId: string;
|
|
93
93
|
} | {
|
|
94
|
-
deleted?: undefined;
|
|
95
94
|
jobs?: undefined;
|
|
96
95
|
total?: undefined;
|
|
96
|
+
deleted?: undefined;
|
|
97
97
|
jobId?: undefined;
|
|
98
98
|
hits: Record<string, unknown>[];
|
|
99
99
|
offset: number;
|
|
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
|
|
|
48
48
|
}>;
|
|
49
49
|
/** DELETE /_agent-native/resources/:id — delete a resource */
|
|
50
50
|
export declare function handleDeleteResource(event: any): Promise<{
|
|
51
|
-
ok?: undefined;
|
|
52
51
|
error: string;
|
|
52
|
+
ok?: undefined;
|
|
53
53
|
} | {
|
|
54
54
|
error?: undefined;
|
|
55
55
|
ok: boolean;
|
|
@@ -12,9 +12,15 @@
|
|
|
12
12
|
* pnpm action db-check-scoping [--db path] [--require-org] [--format json]
|
|
13
13
|
*/
|
|
14
14
|
import path from "path";
|
|
15
|
-
import {
|
|
16
|
-
import { getDatabaseUrl, getDatabaseAuthToken } from "../../db/client.js";
|
|
15
|
+
import { getDatabaseUrl } from "../../db/client.js";
|
|
17
16
|
import { parseArgs } from "../utils.js";
|
|
17
|
+
// The `@libsql/client` node entry pulls the `libsql` native addon into whatever
|
|
18
|
+
// graph imports it, and this maintenance script was its only importer in the
|
|
19
|
+
// server bundle — which is how a 9.3MB Linux SQLite driver reached the docs
|
|
20
|
+
// function, a deployment that runs Postgres. `createSqliteScriptClient` reaches
|
|
21
|
+
// the same two backends through dynamic imports instead, so nothing static
|
|
22
|
+
// depends on the native package.
|
|
23
|
+
import { createSqliteScriptClient } from "./sqlite-client.js";
|
|
18
24
|
function isPostgresUrl(url) {
|
|
19
25
|
return url.startsWith("postgres://") || url.startsWith("postgresql://");
|
|
20
26
|
}
|
|
@@ -125,10 +131,7 @@ Options:
|
|
|
125
131
|
}
|
|
126
132
|
}
|
|
127
133
|
else {
|
|
128
|
-
const client =
|
|
129
|
-
url,
|
|
130
|
-
authToken: getDatabaseAuthToken(),
|
|
131
|
-
});
|
|
134
|
+
const client = await createSqliteScriptClient(url);
|
|
132
135
|
try {
|
|
133
136
|
allColumns = await discoverColumnsSqlite(client);
|
|
134
137
|
}
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -37,17 +37,17 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
37
37
|
ok?: undefined;
|
|
38
38
|
status?: undefined;
|
|
39
39
|
} | {
|
|
40
|
-
error?: undefined;
|
|
41
40
|
ok: boolean;
|
|
42
41
|
status: string;
|
|
42
|
+
error?: undefined;
|
|
43
43
|
} | {
|
|
44
44
|
ok?: undefined;
|
|
45
45
|
error: string;
|
|
46
46
|
removed?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
error?: undefined;
|
|
49
48
|
ok: boolean;
|
|
50
49
|
removed: boolean;
|
|
50
|
+
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
@@ -58,13 +58,13 @@ export declare function createTestSecretHandler(): import("h3").EventHandlerWith
|
|
|
58
58
|
error: string;
|
|
59
59
|
note?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
error?: undefined;
|
|
62
61
|
ok: boolean;
|
|
63
62
|
note?: undefined;
|
|
64
|
-
} | {
|
|
65
63
|
error?: undefined;
|
|
64
|
+
} | {
|
|
66
65
|
ok: boolean;
|
|
67
66
|
note: string;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
-
error?: undefined;
|
|
99
98
|
ok: boolean;
|
|
100
99
|
key: string;
|
|
101
|
-
} | {
|
|
102
100
|
error?: undefined;
|
|
101
|
+
} | {
|
|
103
102
|
ok: boolean;
|
|
104
103
|
removed: boolean;
|
|
104
|
+
error?: undefined;
|
|
105
105
|
}>>;
|
|
@@ -339,11 +339,15 @@ export declare function createBuilderBrowserCallbackErrorPage(message: string, o
|
|
|
339
339
|
}): string;
|
|
340
340
|
export interface RunBuilderAgentArgs {
|
|
341
341
|
prompt: string;
|
|
342
|
+
context?: string;
|
|
342
343
|
projectId?: string;
|
|
343
344
|
branchName?: string;
|
|
344
345
|
userEmail?: string;
|
|
345
346
|
userId?: string;
|
|
346
347
|
}
|
|
348
|
+
export declare const BUILDER_AGENT_CONTEXT_MAX_CHARS = 32000;
|
|
349
|
+
export declare function normalizeBuilderAgentContext(value: unknown): string | undefined;
|
|
350
|
+
export declare function buildBuilderAgentUserPrompt(prompt: string, context?: string): string;
|
|
347
351
|
export interface RunBuilderAgentResult {
|
|
348
352
|
branchName: string;
|
|
349
353
|
projectId: string;
|
|
@@ -1381,6 +1381,27 @@ export function createBuilderBrowserCallbackErrorPage(message, opts = {}) {
|
|
|
1381
1381
|
</body>
|
|
1382
1382
|
</html>`;
|
|
1383
1383
|
}
|
|
1384
|
+
export const BUILDER_AGENT_CONTEXT_MAX_CHARS = 32_000;
|
|
1385
|
+
export function normalizeBuilderAgentContext(value) {
|
|
1386
|
+
if (value == null)
|
|
1387
|
+
return undefined;
|
|
1388
|
+
if (typeof value !== "string") {
|
|
1389
|
+
throw new Error("context must be a string");
|
|
1390
|
+
}
|
|
1391
|
+
const context = value.trim();
|
|
1392
|
+
if (!context)
|
|
1393
|
+
return undefined;
|
|
1394
|
+
if (context.length > BUILDER_AGENT_CONTEXT_MAX_CHARS) {
|
|
1395
|
+
throw new Error(`context must be ${BUILDER_AGENT_CONTEXT_MAX_CHARS} characters or fewer`);
|
|
1396
|
+
}
|
|
1397
|
+
return context;
|
|
1398
|
+
}
|
|
1399
|
+
export function buildBuilderAgentUserPrompt(prompt, context) {
|
|
1400
|
+
const normalizedContext = normalizeBuilderAgentContext(context);
|
|
1401
|
+
if (!normalizedContext)
|
|
1402
|
+
return prompt;
|
|
1403
|
+
return `${prompt.trim()}\n\n<context>\n${normalizedContext}\n</context>`;
|
|
1404
|
+
}
|
|
1384
1405
|
function normalizeBuilderApiString(value, fieldName) {
|
|
1385
1406
|
if (typeof value !== "string" || !value.trim()) {
|
|
1386
1407
|
throw new Error(`Builder agent run returned a blank ${fieldName}`);
|
|
@@ -1636,11 +1657,12 @@ export async function runBuilderAgent(args) {
|
|
|
1636
1657
|
if (!builderUserEmail && !builderUserId) {
|
|
1637
1658
|
throw new Error("userEmail or userId is required");
|
|
1638
1659
|
}
|
|
1660
|
+
const userPrompt = buildBuilderAgentUserPrompt(args.prompt, args.context);
|
|
1639
1661
|
const url = new URL("/agents/run", getBuilderApiHost());
|
|
1640
1662
|
url.searchParams.set("apiKey", creds.publicKey);
|
|
1641
1663
|
const postRun = async (actor) => {
|
|
1642
1664
|
const body = {
|
|
1643
|
-
userMessage: { userPrompt
|
|
1665
|
+
userMessage: { userPrompt },
|
|
1644
1666
|
projectId,
|
|
1645
1667
|
};
|
|
1646
1668
|
if (args.branchName)
|