@agent-native/core 0.225.2-nightly-20261106152255 → 0.226.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/agent/actions/get-agentkit-capabilities.d.ts +12 -1
- package/dist/agent/actions/get-agentkit-capabilities.js +13 -5
- package/dist/agent/production-agent.js +14 -4
- package/dist/agentkit/capabilities.d.ts +4 -2
- package/dist/agentkit/capabilities.js +71 -18
- package/dist/app-config/experience-profiles.d.ts +4 -0
- package/dist/app-config/experience-profiles.js +7 -0
- package/dist/app-config/onboarding.d.ts +2 -0
- package/dist/app-config/onboarding.js +5 -0
- package/dist/app-config/schema.d.ts +5 -0
- package/dist/app-config/schema.js +2 -0
- package/dist/application-state/handlers.d.ts +2 -2
- package/dist/client/agent-chat.d.ts +3 -1
- package/dist/client/agent-chat.js +8 -0
- package/dist/client/agentkit-chat/transport.d.ts +2 -1
- package/dist/client/agentkit-chat/transport.js +2 -1
- package/dist/client/auth/builder-signup.d.ts +14 -0
- package/dist/client/auth/builder-signup.js +75 -0
- package/dist/client/chat/agentkit-agent-native.d.ts +4 -0
- package/dist/client/chat/agentkit-agent-native.js +25 -0
- package/dist/client/chat/composer-draft.d.ts +1 -7
- package/dist/client/chat/composer-draft.js +5 -1
- package/dist/client/chat/native-uploads.d.ts +11 -0
- package/dist/client/chat/native-uploads.js +97 -0
- package/dist/client/experience-profiles.d.ts +182 -0
- package/dist/client/experience-profiles.js +19 -0
- package/dist/client/uploads/index.d.ts +1 -1
- package/dist/client/uploads/index.js +1 -1
- package/dist/client/use-action.js +3 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/experience-profiles/index.d.ts +13 -0
- package/dist/experience-profiles/index.js +10 -0
- package/dist/experience-profiles/server.d.ts +38 -0
- package/dist/experience-profiles/server.js +76 -0
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/framework-package-versions.json +11 -11
- package/dist/localization/workspace-integration-messages.d.ts +11 -0
- package/dist/localization/workspace-integration-messages.js +132 -0
- package/dist/mcp/screen-memory-stdio.d.ts +3 -3
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/org/index.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
- package/dist/provider-api/actions/provider-api.d.ts +3 -3
- package/dist/provider-api/actions/provider-api.js +2 -0
- package/dist/provider-api/index.d.ts +7 -1
- package/dist/provider-api/index.js +42 -2
- package/dist/scripts/resources/read.d.ts +6 -1
- package/dist/scripts/resources/read.js +85 -8
- package/dist/secrets/routes.d.ts +2 -2
- package/dist/server/agent-chat/script-entries.js +27 -6
- package/dist/server/agent-chat-plugin.js +102 -33
- package/dist/server/agent-engine-api-key-route.d.ts +4 -4
- package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
- package/dist/server/auth.js +25 -1
- package/dist/server/better-auth-instance.d.ts +1 -0
- package/dist/server/builder-browser.d.ts +2 -0
- package/dist/server/builder-browser.js +8 -4
- package/dist/server/builder-signup-experiment.d.ts +67 -0
- package/dist/server/builder-signup-experiment.js +345 -0
- package/dist/server/core-routes-plugin.d.ts +2 -0
- package/dist/server/core-routes-plugin.js +77 -25
- package/dist/server/first-touch-route.d.ts +1 -1
- package/dist/server/google-oauth.d.ts +2 -0
- package/dist/server/google-oauth.js +5 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/agent-chat-references.d.ts +2 -0
- package/dist/shared/agent-chat-references.js +8 -0
- package/dist/shared/auth-copy.d.ts +1 -0
- package/dist/shared/auth-copy.js +11 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/templates/builder-code-starter/server/lib/composer-reference-messages.ts.patch +44 -0
- package/dist/templates/builder-code-starter/server/plugins/agent-chat.ts.patch +10 -1
- package/dist/templates/chat/app/components/ChatComposerContext.tsx +31 -0
- package/dist/templates/chat/app/components/chat/ChatRouteContent.tsx +3 -0
- package/dist/templates/chat/app/components/home/HomePage.tsx +4 -2
- package/dist/templates/chat/app/components/layout/AgentInspector.tsx +2 -0
- package/dist/templates/chat/app/i18n/ar-SA.ts +7 -0
- package/dist/templates/chat/app/i18n/de-DE.ts +8 -0
- package/dist/templates/chat/app/i18n/en-US.ts +8 -0
- package/dist/templates/chat/app/i18n/es-ES.ts +8 -0
- package/dist/templates/chat/app/i18n/fr-FR.ts +8 -0
- package/dist/templates/chat/app/i18n/hi-IN.ts +7 -0
- package/dist/templates/chat/app/i18n/ja-JP.ts +8 -0
- package/dist/templates/chat/app/i18n/ko-KR.ts +8 -0
- package/dist/templates/chat/app/i18n/pt-BR.ts +8 -0
- package/dist/templates/chat/app/i18n/zh-CN.ts +7 -0
- package/dist/templates/chat/app/i18n/zh-TW.ts +7 -0
- package/dist/templates/chat/server/lib/composer-reference-messages.ts +34 -0
- package/dist/templates/chat/server/lib/composer-references.ts +60 -0
- package/dist/templates/chat/server/plugins/agent-chat.ts +13 -0
- package/docs/content/components.mdx +7 -2
- package/package.json +9 -4
- package/src/templates/builder-code-starter/server/lib/composer-reference-messages.ts.patch +44 -0
- package/src/templates/builder-code-starter/server/plugins/agent-chat.ts.patch +10 -1
- package/src/templates/chat/app/components/ChatComposerContext.tsx +31 -0
- package/src/templates/chat/app/components/chat/ChatRouteContent.tsx +3 -0
- package/src/templates/chat/app/components/home/HomePage.tsx +4 -2
- package/src/templates/chat/app/components/layout/AgentInspector.tsx +2 -0
- package/src/templates/chat/app/i18n/ar-SA.ts +7 -0
- package/src/templates/chat/app/i18n/de-DE.ts +8 -0
- package/src/templates/chat/app/i18n/en-US.ts +8 -0
- package/src/templates/chat/app/i18n/es-ES.ts +8 -0
- package/src/templates/chat/app/i18n/fr-FR.ts +8 -0
- package/src/templates/chat/app/i18n/hi-IN.ts +7 -0
- package/src/templates/chat/app/i18n/ja-JP.ts +8 -0
- package/src/templates/chat/app/i18n/ko-KR.ts +8 -0
- package/src/templates/chat/app/i18n/pt-BR.ts +8 -0
- package/src/templates/chat/app/i18n/zh-CN.ts +7 -0
- package/src/templates/chat/app/i18n/zh-TW.ts +7 -0
- package/src/templates/chat/server/lib/composer-reference-messages.ts +34 -0
- package/src/templates/chat/server/lib/composer-references.ts +60 -0
- package/src/templates/chat/server/plugins/agent-chat.ts +13 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { getUserSetting } from "../settings/user-settings.js";
|
|
2
|
+
import { DEFAULT_LOCALE, SUPPORTED_LOCALES, LOCALIZATION_SETTING_KEY, normalizeLocalizationPreference, } from "./shared.js";
|
|
3
|
+
const messages = {
|
|
4
|
+
"en-US": {
|
|
5
|
+
composerReferenceAuthentication: "Sign in to add a reference.",
|
|
6
|
+
composerReferenceInvalid: "Choose a valid reference before sending.",
|
|
7
|
+
composerReferenceUnavailable: "A selected reference is no longer available. Remove it or choose it again.",
|
|
8
|
+
referenceUnknown: "Unknown workspace reference source.",
|
|
9
|
+
referenceSignIn: "Sign in to search workspace references.",
|
|
10
|
+
referenceUnavailable: "Could not load workspace references.",
|
|
11
|
+
limit: "Too many selected integrations.",
|
|
12
|
+
invalid: "Choose a connected integration before sending.",
|
|
13
|
+
unavailable: "A selected integration is no longer available to this app. Reconnect it or remove its reference before sending.",
|
|
14
|
+
},
|
|
15
|
+
"fr-FR": {
|
|
16
|
+
composerReferenceAuthentication: "Connectez-vous pour ajouter une référence.",
|
|
17
|
+
composerReferenceInvalid: "Choisissez une référence valide avant l’envoi.",
|
|
18
|
+
composerReferenceUnavailable: "Une référence sélectionnée n’est plus disponible. Supprimez-la ou sélectionnez-la à nouveau.",
|
|
19
|
+
referenceUnknown: "Source de référence de l’espace de travail inconnue.",
|
|
20
|
+
referenceSignIn: "Connectez-vous pour rechercher des références de l’espace de travail.",
|
|
21
|
+
referenceUnavailable: "Impossible de charger les références de l’espace de travail.",
|
|
22
|
+
limit: "Trop d’intégrations sélectionnées.",
|
|
23
|
+
invalid: "Choisissez une intégration connectée avant l’envoi.",
|
|
24
|
+
unavailable: "Une intégration sélectionnée n’est plus accessible à cette application. Reconnectez-la ou supprimez sa référence avant l’envoi.",
|
|
25
|
+
},
|
|
26
|
+
"de-DE": {
|
|
27
|
+
composerReferenceAuthentication: "Melde dich an, um eine Referenz hinzuzufügen.",
|
|
28
|
+
composerReferenceInvalid: "Wähle vor dem Senden eine gültige Referenz.",
|
|
29
|
+
composerReferenceUnavailable: "Eine ausgewählte Referenz ist nicht mehr verfügbar. Entferne sie oder wähle sie erneut.",
|
|
30
|
+
referenceUnknown: "Unbekannte Quelle für Arbeitsbereichsreferenzen.",
|
|
31
|
+
referenceSignIn: "Melden Sie sich an, um Arbeitsbereichsreferenzen zu suchen.",
|
|
32
|
+
referenceUnavailable: "Arbeitsbereichsreferenzen konnten nicht geladen werden.",
|
|
33
|
+
limit: "Zu viele ausgewählte Integrationen.",
|
|
34
|
+
invalid: "Wählen Sie vor dem Senden eine verbundene Integration.",
|
|
35
|
+
unavailable: "Eine ausgewählte Integration ist für diese App nicht mehr verfügbar. Verbinden Sie sie erneut oder entfernen Sie ihren Verweis vor dem Senden.",
|
|
36
|
+
},
|
|
37
|
+
"es-ES": {
|
|
38
|
+
composerReferenceAuthentication: "Inicia sesión para añadir una referencia.",
|
|
39
|
+
composerReferenceInvalid: "Elige una referencia válida antes de enviar.",
|
|
40
|
+
composerReferenceUnavailable: "Una referencia seleccionada ya no está disponible. Elimínala o selecciónala de nuevo.",
|
|
41
|
+
referenceUnknown: "Fuente de referencias del espacio de trabajo desconocida.",
|
|
42
|
+
referenceSignIn: "Inicia sesión para buscar referencias del espacio de trabajo.",
|
|
43
|
+
referenceUnavailable: "No se pudieron cargar las referencias del espacio de trabajo.",
|
|
44
|
+
limit: "Demasiadas integraciones seleccionadas.",
|
|
45
|
+
invalid: "Elige una integración conectada antes de enviar.",
|
|
46
|
+
unavailable: "Una integración seleccionada ya no está disponible para esta aplicación. Vuelve a conectarla o elimina su referencia antes de enviar.",
|
|
47
|
+
},
|
|
48
|
+
"pt-BR": {
|
|
49
|
+
composerReferenceAuthentication: "Entre para adicionar uma referência.",
|
|
50
|
+
composerReferenceInvalid: "Escolha uma referência válida antes de enviar.",
|
|
51
|
+
composerReferenceUnavailable: "Uma referência selecionada não está mais disponível. Remova-a ou selecione-a novamente.",
|
|
52
|
+
referenceUnknown: "Fonte de referências do espaço de trabalho desconhecida.",
|
|
53
|
+
referenceSignIn: "Entre para pesquisar referências do espaço de trabalho.",
|
|
54
|
+
referenceUnavailable: "Não foi possível carregar as referências do espaço de trabalho.",
|
|
55
|
+
limit: "Muitas integrações selecionadas.",
|
|
56
|
+
invalid: "Escolha uma integração conectada antes de enviar.",
|
|
57
|
+
unavailable: "Uma integração selecionada não está mais disponível para este aplicativo. Reconecte-a ou remova sua referência antes de enviar.",
|
|
58
|
+
},
|
|
59
|
+
"ja-JP": {
|
|
60
|
+
composerReferenceAuthentication: "参照を追加するにはログインしてください。",
|
|
61
|
+
composerReferenceInvalid: "送信する前に有効な参照を選択してください。",
|
|
62
|
+
composerReferenceUnavailable: "選択した参照は利用できなくなりました。削除するか、もう一度選択してください。",
|
|
63
|
+
referenceUnknown: "不明なワークスペース参照元です。",
|
|
64
|
+
referenceSignIn: "ワークスペースの参照を検索するにはログインしてください。",
|
|
65
|
+
referenceUnavailable: "ワークスペースの参照を読み込めませんでした。",
|
|
66
|
+
limit: "選択した連携が多すぎます。",
|
|
67
|
+
invalid: "送信前に接続済みの連携を選択してください。",
|
|
68
|
+
unavailable: "選択した連携はこのアプリで利用できなくなりました。再接続するか、参照を削除してから送信してください。",
|
|
69
|
+
},
|
|
70
|
+
"ko-KR": {
|
|
71
|
+
composerReferenceAuthentication: "참조를 추가하려면 로그인하세요.",
|
|
72
|
+
composerReferenceInvalid: "전송하기 전에 유효한 참조를 선택하세요.",
|
|
73
|
+
composerReferenceUnavailable: "선택한 참조를 더 이상 사용할 수 없습니다. 제거하거나 다시 선택하세요.",
|
|
74
|
+
referenceUnknown: "알 수 없는 워크스페이스 참조 소스입니다.",
|
|
75
|
+
referenceSignIn: "워크스페이스 참조를 검색하려면 로그인하세요.",
|
|
76
|
+
referenceUnavailable: "워크스페이스 참조를 불러오지 못했습니다.",
|
|
77
|
+
limit: "선택한 통합이 너무 많습니다.",
|
|
78
|
+
invalid: "전송 전에 연결된 통합을 선택하세요.",
|
|
79
|
+
unavailable: "선택한 통합을 이 앱에서 더 이상 사용할 수 없습니다. 다시 연결하거나 참조를 제거한 후 전송하세요.",
|
|
80
|
+
},
|
|
81
|
+
"zh-CN": {
|
|
82
|
+
composerReferenceAuthentication: "登录以添加引用。",
|
|
83
|
+
composerReferenceInvalid: "发送前请选择有效的引用。",
|
|
84
|
+
composerReferenceUnavailable: "所选引用已不可用。请移除或重新选择。",
|
|
85
|
+
referenceUnknown: "未知的工作区引用来源。",
|
|
86
|
+
referenceSignIn: "请登录以搜索工作区引用。",
|
|
87
|
+
referenceUnavailable: "无法加载工作区引用。",
|
|
88
|
+
limit: "选择的集成过多。",
|
|
89
|
+
invalid: "请在发送前选择已连接的集成。",
|
|
90
|
+
unavailable: "所选集成已无法在此应用中使用。请重新连接或移除其引用后再发送。",
|
|
91
|
+
},
|
|
92
|
+
"zh-TW": {
|
|
93
|
+
composerReferenceAuthentication: "登入以新增引用。",
|
|
94
|
+
composerReferenceInvalid: "傳送前請選擇有效的引用。",
|
|
95
|
+
composerReferenceUnavailable: "所選引用已無法使用。請移除或重新選擇。",
|
|
96
|
+
referenceUnknown: "未知的工作區參照來源。",
|
|
97
|
+
referenceSignIn: "請登入以搜尋工作區參照。",
|
|
98
|
+
referenceUnavailable: "無法載入工作區參照。",
|
|
99
|
+
limit: "選取的整合項目過多。",
|
|
100
|
+
invalid: "請在傳送前選擇已連線的整合項目。",
|
|
101
|
+
unavailable: "此應用程式已無法使用選取的整合項目。請重新連線或移除其參照後再傳送。",
|
|
102
|
+
},
|
|
103
|
+
"hi-IN": {
|
|
104
|
+
composerReferenceAuthentication: "संदर्भ जोड़ने के लिए साइन इन करें।",
|
|
105
|
+
composerReferenceInvalid: "भेजने से पहले एक मान्य संदर्भ चुनें।",
|
|
106
|
+
composerReferenceUnavailable: "चुना गया संदर्भ अब उपलब्ध नहीं है। उसे हटाएँ या फिर से चुनें।",
|
|
107
|
+
referenceUnknown: "कार्यस्थान संदर्भ का अज्ञात स्रोत।",
|
|
108
|
+
referenceSignIn: "कार्यस्थान संदर्भ खोजने के लिए साइन इन करें।",
|
|
109
|
+
referenceUnavailable: "कार्यस्थान संदर्भ लोड नहीं हो सके।",
|
|
110
|
+
limit: "बहुत अधिक एकीकरण चुने गए हैं।",
|
|
111
|
+
invalid: "भेजने से पहले कोई जुड़ा हुआ एकीकरण चुनें।",
|
|
112
|
+
unavailable: "चुना गया एकीकरण अब इस ऐप के लिए उपलब्ध नहीं है। उसे फिर जोड़ें या भेजने से पहले उसका संदर्भ हटाएँ।",
|
|
113
|
+
},
|
|
114
|
+
"ar-SA": {
|
|
115
|
+
composerReferenceAuthentication: "سجّل الدخول لإضافة مرجع.",
|
|
116
|
+
composerReferenceInvalid: "اختر مرجعًا صالحًا قبل الإرسال.",
|
|
117
|
+
composerReferenceUnavailable: "لم يعد المرجع المحدد متاحًا. أزله أو اختره مرة أخرى.",
|
|
118
|
+
referenceUnknown: "مصدر مراجع مساحة العمل غير معروف.",
|
|
119
|
+
referenceSignIn: "سجّل الدخول للبحث في مراجع مساحة العمل.",
|
|
120
|
+
referenceUnavailable: "تعذر تحميل مراجع مساحة العمل.",
|
|
121
|
+
limit: "تم تحديد عدد كبير جدًا من عمليات التكامل.",
|
|
122
|
+
invalid: "اختر تكاملًا متصلًا قبل الإرسال.",
|
|
123
|
+
unavailable: "لم يعد أحد التكاملات المحددة متاحًا لهذا التطبيق. أعد توصيله أو أزل مرجعه قبل الإرسال.",
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
export async function workspaceIntegrationMessagesForUser(userEmail) {
|
|
127
|
+
const preference = normalizeLocalizationPreference(userEmail
|
|
128
|
+
? await getUserSetting(userEmail, LOCALIZATION_SETTING_KEY)
|
|
129
|
+
: undefined);
|
|
130
|
+
const locale = SUPPORTED_LOCALES.find((candidate) => candidate === preference.locale);
|
|
131
|
+
return messages[locale ?? DEFAULT_LOCALE];
|
|
132
|
+
}
|
|
@@ -283,20 +283,20 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
283
283
|
type: string;
|
|
284
284
|
};
|
|
285
285
|
startAt: {
|
|
286
|
-
description?: undefined;
|
|
287
286
|
type: string;
|
|
287
|
+
description?: undefined;
|
|
288
288
|
};
|
|
289
289
|
endAt: {
|
|
290
|
-
description?: undefined;
|
|
291
290
|
type: string;
|
|
291
|
+
description?: undefined;
|
|
292
292
|
};
|
|
293
293
|
count: {
|
|
294
294
|
type: string;
|
|
295
295
|
description: string;
|
|
296
296
|
};
|
|
297
297
|
reason: {
|
|
298
|
-
description?: undefined;
|
|
299
298
|
type: string;
|
|
299
|
+
description?: undefined;
|
|
300
300
|
};
|
|
301
301
|
includeMicrophone?: undefined;
|
|
302
302
|
includeSystemAudio?: undefined;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
|
|
2
2
|
error?: undefined;
|
|
3
|
+
ok?: undefined;
|
|
3
4
|
count: number;
|
|
4
5
|
updated?: undefined;
|
|
5
|
-
ok?: undefined;
|
|
6
6
|
} | {
|
|
7
7
|
error?: undefined;
|
|
8
|
+
ok?: undefined;
|
|
8
9
|
count?: undefined;
|
|
9
10
|
updated: number;
|
|
10
|
-
ok?: undefined;
|
|
11
11
|
} | {
|
|
12
|
+
ok?: undefined;
|
|
12
13
|
count?: undefined;
|
|
13
14
|
updated?: undefined;
|
|
14
15
|
error: string;
|
|
15
|
-
ok?: undefined;
|
|
16
16
|
} | {
|
|
17
17
|
error?: undefined;
|
|
18
18
|
count?: undefined;
|
package/dist/org/index.d.ts
CHANGED
|
@@ -180,9 +180,9 @@ export declare const getMyOrgHandler: import("h3").EventHandlerWithFetch<import(
|
|
|
180
180
|
soloDeploymentAdmin: boolean | undefined;
|
|
181
181
|
}>>;
|
|
182
182
|
export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
183
|
-
success: boolean;
|
|
184
183
|
id?: undefined;
|
|
185
184
|
name?: undefined;
|
|
185
|
+
success: boolean;
|
|
186
186
|
role?: undefined;
|
|
187
187
|
} | {
|
|
188
188
|
success?: undefined;
|
|
@@ -75,7 +75,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
+
id?: undefined;
|
|
78
79
|
message?: undefined;
|
|
80
|
+
found?: undefined;
|
|
79
81
|
providers: {
|
|
80
82
|
id: string;
|
|
81
83
|
label: string;
|
|
@@ -87,12 +89,11 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
87
89
|
}[];
|
|
88
90
|
count: number;
|
|
89
91
|
provider?: undefined;
|
|
90
|
-
found?: undefined;
|
|
91
92
|
deleted?: undefined;
|
|
92
93
|
registered?: undefined;
|
|
93
|
-
id?: undefined;
|
|
94
94
|
label?: undefined;
|
|
95
95
|
} | {
|
|
96
|
+
id?: undefined;
|
|
96
97
|
message?: undefined;
|
|
97
98
|
providers?: undefined;
|
|
98
99
|
count?: undefined;
|
|
@@ -100,7 +101,6 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
100
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
101
102
|
deleted?: undefined;
|
|
102
103
|
registered?: undefined;
|
|
103
|
-
id?: undefined;
|
|
104
104
|
label?: undefined;
|
|
105
105
|
} | {
|
|
106
106
|
message?: undefined;
|
|
@@ -114,19 +114,19 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
114
114
|
label?: undefined;
|
|
115
115
|
} | {
|
|
116
116
|
message?: undefined;
|
|
117
|
+
found?: undefined;
|
|
117
118
|
providers?: undefined;
|
|
118
119
|
count?: undefined;
|
|
119
120
|
provider?: undefined;
|
|
120
|
-
found?: undefined;
|
|
121
121
|
deleted: boolean;
|
|
122
122
|
id: string;
|
|
123
123
|
registered?: undefined;
|
|
124
124
|
label?: undefined;
|
|
125
125
|
} | {
|
|
126
|
+
found?: undefined;
|
|
126
127
|
providers?: undefined;
|
|
127
128
|
count?: undefined;
|
|
128
129
|
provider?: undefined;
|
|
129
|
-
found?: undefined;
|
|
130
130
|
deleted?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
@@ -317,6 +317,7 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
317
317
|
scope?: "org" | "user" | undefined;
|
|
318
318
|
}, {
|
|
319
319
|
message?: undefined;
|
|
320
|
+
found?: undefined;
|
|
320
321
|
id?: undefined;
|
|
321
322
|
providers: {
|
|
322
323
|
id: string;
|
|
@@ -329,7 +330,6 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
329
330
|
}[];
|
|
330
331
|
count: number;
|
|
331
332
|
provider?: undefined;
|
|
332
|
-
found?: undefined;
|
|
333
333
|
deleted?: undefined;
|
|
334
334
|
registered?: undefined;
|
|
335
335
|
label?: undefined;
|
|
@@ -356,18 +356,18 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
356
356
|
} | {
|
|
357
357
|
count?: undefined;
|
|
358
358
|
message?: undefined;
|
|
359
|
+
found?: undefined;
|
|
359
360
|
providers?: undefined;
|
|
360
361
|
provider?: undefined;
|
|
361
|
-
found?: undefined;
|
|
362
362
|
deleted: boolean;
|
|
363
363
|
id: string;
|
|
364
364
|
registered?: undefined;
|
|
365
365
|
label?: undefined;
|
|
366
366
|
} | {
|
|
367
367
|
count?: undefined;
|
|
368
|
+
found?: undefined;
|
|
368
369
|
providers?: undefined;
|
|
369
370
|
provider?: undefined;
|
|
370
|
-
found?: undefined;
|
|
371
371
|
deleted?: undefined;
|
|
372
372
|
registered: boolean;
|
|
373
373
|
id: string;
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { defineAction, } from "../../action.js";
|
|
3
3
|
import { getCredentialContext } from "../../server/request-context.js";
|
|
4
4
|
import { assertAgentProviderRequestAllowed } from "../agent-request-policy.js";
|
|
5
|
+
import { registerProviderApiActionRuntime } from "../index.js";
|
|
5
6
|
import { isReadOnlyProviderPost } from "../read-only-requests.js";
|
|
6
7
|
import { rejectFailedProviderResult } from "../result-outcome.js";
|
|
7
8
|
import { stagingExecuteRequest } from "../staging.js";
|
|
@@ -211,6 +212,7 @@ function rethrowStagingError(error) {
|
|
|
211
212
|
throw error;
|
|
212
213
|
}
|
|
213
214
|
export function createProviderApiRequestAction(runtime, options = {}) {
|
|
215
|
+
registerProviderApiActionRuntime(runtime);
|
|
214
216
|
const schema = options.schema ?? createProviderApiRequestSchema();
|
|
215
217
|
return defineAction({
|
|
216
218
|
description: options.description ??
|
|
@@ -405,7 +405,7 @@ export declare function getProviderApiConfig(provider: ProviderApiId | string, o
|
|
|
405
405
|
export declare function isValidProviderApiBaseUrl(provider: ProviderApiId | string, value: string, overrides?: readonly ProviderApiConfig[]): boolean;
|
|
406
406
|
export declare function mergeProviderApiConfigs(overrides?: readonly ProviderApiConfig[]): ProviderApiConfig[];
|
|
407
407
|
export declare function isProviderApiId(provider: string): provider is ProviderApiId;
|
|
408
|
-
export declare function listProviderApiIdsForTemplateUse(templateUse:
|
|
408
|
+
export declare function listProviderApiIdsForTemplateUse(templateUse: string, overrides?: readonly ProviderApiConfig[]): ProviderApiId[];
|
|
409
409
|
export declare function listProviderApiCatalog(provider?: ProviderApiId | string, options?: {
|
|
410
410
|
providerIds?: readonly (ProviderApiId | string)[];
|
|
411
411
|
providerOverrides?: readonly ProviderApiConfig[];
|
|
@@ -428,6 +428,12 @@ export declare function listProviderApiCatalog(provider?: ProviderApiId | string
|
|
|
428
428
|
corpusRecipes: readonly ProviderApiCorpusRecipe[];
|
|
429
429
|
templateUses: readonly WorkspaceConnectionTemplateUse[];
|
|
430
430
|
}[];
|
|
431
|
+
export declare function registerProviderApiActionRuntime(runtime: object): void;
|
|
432
|
+
export declare function getRegisteredProviderApiRuntimeOptions(appId: string): ProviderApiRuntimeOptions | undefined;
|
|
433
|
+
export declare function listRegisteredCustomProviderCapabilities(appId: string, context: CredentialContext): Promise<{
|
|
434
|
+
id: string;
|
|
435
|
+
label: string;
|
|
436
|
+
}[]>;
|
|
431
437
|
export declare function createProviderApiRuntime(options: ProviderApiRuntimeOptions): ProviderApiRuntime;
|
|
432
438
|
export declare function fetchProviderApiDocs(options: ProviderApiDocsOptions, runtime?: ProviderApiRuntimeOptions): Promise<{
|
|
433
439
|
provider: string;
|
|
@@ -1344,7 +1344,7 @@ export function isProviderApiId(provider) {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
export function listProviderApiIdsForTemplateUse(templateUse, overrides = []) {
|
|
1346
1346
|
const configs = new Map(mergeProviderApiConfigs(overrides).map((config) => [config.id, config]));
|
|
1347
|
-
return PROVIDER_API_IDS.filter((id) => (configs.get(id)?.templateUses ?? []).
|
|
1347
|
+
return PROVIDER_API_IDS.filter((id) => (configs.get(id)?.templateUses ?? []).some((use) => use === templateUse));
|
|
1348
1348
|
}
|
|
1349
1349
|
export function listProviderApiCatalog(provider, options = {}) {
|
|
1350
1350
|
const providerIds = normalizeProviderIds(options.providerIds);
|
|
@@ -1374,6 +1374,44 @@ export function listProviderApiCatalog(provider, options = {}) {
|
|
|
1374
1374
|
templateUses: config.templateUses ?? [],
|
|
1375
1375
|
}));
|
|
1376
1376
|
}
|
|
1377
|
+
const registeredProviderApiRuntimes = new Map();
|
|
1378
|
+
const providerApiRuntimeOptions = new WeakMap();
|
|
1379
|
+
export function registerProviderApiActionRuntime(runtime) {
|
|
1380
|
+
const options = providerApiRuntimeOptions.get(runtime);
|
|
1381
|
+
if (options)
|
|
1382
|
+
registeredProviderApiRuntimes.set(options.appId, options);
|
|
1383
|
+
}
|
|
1384
|
+
export function getRegisteredProviderApiRuntimeOptions(appId) {
|
|
1385
|
+
return registeredProviderApiRuntimes.get(appId);
|
|
1386
|
+
}
|
|
1387
|
+
export async function listRegisteredCustomProviderCapabilities(appId, context) {
|
|
1388
|
+
const runtime = getRegisteredProviderApiRuntimeOptions(appId);
|
|
1389
|
+
if (!runtime?.getCustomProviders)
|
|
1390
|
+
return [];
|
|
1391
|
+
const providers = await runtime.getCustomProviders();
|
|
1392
|
+
const result = [];
|
|
1393
|
+
for (const provider of providers) {
|
|
1394
|
+
if (!((provider.scope === "org" && provider.scopeId === context.orgId) ||
|
|
1395
|
+
(provider.scope === "user" && provider.scopeId === context.userEmail)))
|
|
1396
|
+
continue;
|
|
1397
|
+
const keys = extractCredentialKeysFromCustomAuth(provider.auth);
|
|
1398
|
+
const credentials = await Promise.all(keys.map((key) => (runtime.resolveCredential ?? defaultProviderApiCredentialResolver)({
|
|
1399
|
+
appId,
|
|
1400
|
+
provider: provider.id,
|
|
1401
|
+
key,
|
|
1402
|
+
ctx: context,
|
|
1403
|
+
localCredentialSource: runtime.localCredentialSource ?? "app_local",
|
|
1404
|
+
})));
|
|
1405
|
+
if (credentials.some((credential) => !credential))
|
|
1406
|
+
continue;
|
|
1407
|
+
for (const credential of credentials) {
|
|
1408
|
+
if (credential)
|
|
1409
|
+
assertCredentialCanReachEndpoint({ scope: provider.scope, scopeId: provider.scopeId }, credential, credential.key);
|
|
1410
|
+
}
|
|
1411
|
+
result.push({ id: provider.id, label: provider.label });
|
|
1412
|
+
}
|
|
1413
|
+
return result;
|
|
1414
|
+
}
|
|
1377
1415
|
export function createProviderApiRuntime(options) {
|
|
1378
1416
|
mergeProviderApiConfigs(options.providerOverrides);
|
|
1379
1417
|
const providerIds = normalizeProviderIds(options.providerIds);
|
|
@@ -1382,7 +1420,7 @@ export function createProviderApiRuntime(options) {
|
|
|
1382
1420
|
providerIds,
|
|
1383
1421
|
localCredentialSource: options.localCredentialSource ?? "app_local",
|
|
1384
1422
|
};
|
|
1385
|
-
|
|
1423
|
+
const runtime = {
|
|
1386
1424
|
providerIds,
|
|
1387
1425
|
listCatalog: (provider) => listProviderApiCatalogWithCustom(provider, { providerIds, providerOverrides: options.providerOverrides }, runtimeOptions),
|
|
1388
1426
|
fetchDocs: (docsOptions) => fetchProviderApiDocs(docsOptions, runtimeOptions),
|
|
@@ -1394,6 +1432,8 @@ export function createProviderApiRuntime(options) {
|
|
|
1394
1432
|
writeGitHubRepositoryFile: (args) => writeGitHubRepositoryFile(args, runtimeOptions),
|
|
1395
1433
|
deleteGitHubRepositoryFile: (args) => deleteGitHubRepositoryFile(args, runtimeOptions),
|
|
1396
1434
|
};
|
|
1435
|
+
providerApiRuntimeOptions.set(runtime, runtimeOptions);
|
|
1436
|
+
return runtime;
|
|
1397
1437
|
}
|
|
1398
1438
|
export async function fetchProviderApiDocs(options, runtime = { appId: "app" }) {
|
|
1399
1439
|
await assertProviderAllowedAsync(options.provider, runtime);
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const RESOURCE_READ_PAGE_CHARS = 40000;
|
|
2
|
+
export declare class ResourceReadResultLimitError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export default function resourceReadScript(args: string[], options?: {
|
|
5
|
+
maxResultChars?: number;
|
|
6
|
+
}): Promise<void>;
|
|
@@ -41,11 +41,82 @@ async function requireSkillLabAccess(resource, resourcePath, owner, orgId) {
|
|
|
41
41
|
fail(`Cannot read "${resourcePath}": the skill requires the "${requiredLab}" Lab to be enabled.`, { errorCode: "skill_lab_required", statusCode: 403 });
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
export const RESOURCE_READ_PAGE_CHARS = 40_000;
|
|
45
|
+
export class ResourceReadResultLimitError extends Error {
|
|
46
|
+
}
|
|
47
|
+
function parseRangeArg(name, value) {
|
|
48
|
+
if (value === undefined)
|
|
49
|
+
return undefined;
|
|
50
|
+
const n = Number(value);
|
|
51
|
+
if (!Number.isInteger(n) || n < (name === "length" ? 1 : 0)) {
|
|
52
|
+
fail(`--${name} must be ${name === "length" ? "a positive" : "a non-negative"} integer.`);
|
|
53
|
+
}
|
|
54
|
+
return n;
|
|
55
|
+
}
|
|
56
|
+
function isInsideSurrogatePair(content, offset) {
|
|
57
|
+
const previous = content.charCodeAt(offset - 1);
|
|
58
|
+
const current = content.charCodeAt(offset);
|
|
59
|
+
return (previous >= 0xd800 &&
|
|
60
|
+
previous <= 0xdbff &&
|
|
61
|
+
current >= 0xdc00 &&
|
|
62
|
+
current <= 0xdfff);
|
|
63
|
+
}
|
|
64
|
+
async function writeResource(resource, resourcePath, owner, orgId, range, maxResultChars) {
|
|
45
65
|
await requireSkillLabAccess(resource, resourcePath, owner, orgId);
|
|
46
|
-
|
|
66
|
+
const { content } = resource;
|
|
67
|
+
const offset = range.offset ?? 0;
|
|
68
|
+
const length = Math.min(range.length ?? RESOURCE_READ_PAGE_CHARS, RESOURCE_READ_PAGE_CHARS);
|
|
69
|
+
if (offset === 0 &&
|
|
70
|
+
content.length <= length &&
|
|
71
|
+
content.length <= maxResultChars) {
|
|
72
|
+
process.stdout.write(content);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (offset >= content.length) {
|
|
76
|
+
fail(`--offset ${offset} is past the end of "${resourcePath}" (${content.length} chars).`);
|
|
77
|
+
}
|
|
78
|
+
if (isInsideSurrogatePair(content, offset)) {
|
|
79
|
+
fail(`--offset ${offset} falls inside a surrogate pair in "${resourcePath}".`);
|
|
80
|
+
}
|
|
81
|
+
let end = Math.min(offset + length, content.length);
|
|
82
|
+
if (isInsideSurrogatePair(content, end)) {
|
|
83
|
+
end += end - offset === 1 ? 1 : -1;
|
|
84
|
+
}
|
|
85
|
+
const header = (pageEnd) => {
|
|
86
|
+
const status = pageEnd < content.length
|
|
87
|
+
? `partial - read again with offset=${pageEnd} for the rest`
|
|
88
|
+
: "end of resource";
|
|
89
|
+
return `[chars ${offset}-${pageEnd} of ${content.length}; ${status}]\n`;
|
|
90
|
+
};
|
|
91
|
+
if (header(end).length + end - offset > maxResultChars) {
|
|
92
|
+
let low = offset + 1;
|
|
93
|
+
let high = Math.min(end, content.length - 1);
|
|
94
|
+
let fittingEnd = offset;
|
|
95
|
+
while (low <= high) {
|
|
96
|
+
const mid = Math.floor((low + high) / 2);
|
|
97
|
+
if (header(mid).length + mid - offset <= maxResultChars) {
|
|
98
|
+
fittingEnd = mid;
|
|
99
|
+
low = mid + 1;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
high = mid - 1;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
end = fittingEnd;
|
|
106
|
+
if (isInsideSurrogatePair(content, end))
|
|
107
|
+
end--;
|
|
108
|
+
if (end === offset) {
|
|
109
|
+
throw new ResourceReadResultLimitError("Resource read result limit is too small for a page header and one character.");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
process.stdout.write(header(end) + content.slice(offset, end));
|
|
47
113
|
}
|
|
48
|
-
export default async function resourceReadScript(args) {
|
|
114
|
+
export default async function resourceReadScript(args, options = {}) {
|
|
115
|
+
const maxResultChars = options.maxResultChars ?? Infinity;
|
|
116
|
+
if (maxResultChars !== Infinity &&
|
|
117
|
+
(!Number.isSafeInteger(maxResultChars) || maxResultChars < 0)) {
|
|
118
|
+
throw new ResourceReadResultLimitError("Invalid resource read result limit.");
|
|
119
|
+
}
|
|
49
120
|
const parsed = parseArgs(args);
|
|
50
121
|
if (parsed.help === "true") {
|
|
51
122
|
console.log(`Usage: pnpm action resource-read --path <path> [options]
|
|
@@ -54,6 +125,8 @@ Options:
|
|
|
54
125
|
--path <path> Resource path (required)
|
|
55
126
|
--scope personal|shared|workspace
|
|
56
127
|
Scope to read from (default: personal, falls back to shared then workspace)
|
|
128
|
+
--offset <n> Start at this character (default: 0)
|
|
129
|
+
--length <n> Characters to return (max ${RESOURCE_READ_PAGE_CHARS}; larger resources are returned in pages)
|
|
57
130
|
--help Show this help message`);
|
|
58
131
|
return;
|
|
59
132
|
}
|
|
@@ -61,6 +134,10 @@ Options:
|
|
|
61
134
|
if (!resourcePath) {
|
|
62
135
|
fail("--path is required. Example: --path LEARNINGS.md");
|
|
63
136
|
}
|
|
137
|
+
const range = {
|
|
138
|
+
offset: parseRangeArg("offset", parsed.offset),
|
|
139
|
+
length: parseRangeArg("length", parsed.length),
|
|
140
|
+
};
|
|
64
141
|
const scope = parsed.scope;
|
|
65
142
|
const owner = getRequestUserEmail() ?? getAmbientUserEmail();
|
|
66
143
|
if (!owner) {
|
|
@@ -78,7 +155,7 @@ Options:
|
|
|
78
155
|
console.log(`Resource not found: ${resourcePath} (scope: workspace). Workspace resources are managed from Dispatch.`);
|
|
79
156
|
return;
|
|
80
157
|
}
|
|
81
|
-
await writeResource(resource, resourcePath, owner, orgId);
|
|
158
|
+
await writeResource(resource, resourcePath, owner, orgId, range, maxResultChars);
|
|
82
159
|
return;
|
|
83
160
|
}
|
|
84
161
|
if (scope === "shared") {
|
|
@@ -92,12 +169,12 @@ Options:
|
|
|
92
169
|
console.log(`Resource not found: ${resourcePath} (scope: shared). You can create it with resource-write.`);
|
|
93
170
|
return;
|
|
94
171
|
}
|
|
95
|
-
await writeResource(resource, resourcePath, owner, orgId);
|
|
172
|
+
await writeResource(resource, resourcePath, owner, orgId, range, maxResultChars);
|
|
96
173
|
return;
|
|
97
174
|
}
|
|
98
175
|
const personal = await resourceGetByPath(owner, resourcePath);
|
|
99
176
|
if (personal) {
|
|
100
|
-
await writeResource(personal, resourcePath, owner, getRequestOrgId() ?? null);
|
|
177
|
+
await writeResource(personal, resourcePath, owner, getRequestOrgId() ?? null, range, maxResultChars);
|
|
101
178
|
return;
|
|
102
179
|
}
|
|
103
180
|
if (scope === "personal") {
|
|
@@ -111,14 +188,14 @@ Options:
|
|
|
111
188
|
? null
|
|
112
189
|
: await resourceGetByPath(SHARED_OWNER, resourcePath, { orgId }));
|
|
113
190
|
if (shared) {
|
|
114
|
-
await writeResource(shared, resourcePath, owner, orgId);
|
|
191
|
+
await writeResource(shared, resourcePath, owner, orgId, range, maxResultChars);
|
|
115
192
|
return;
|
|
116
193
|
}
|
|
117
194
|
const workspace = await resourceGetByPath(WORKSPACE_OWNER, resourcePath, {
|
|
118
195
|
orgId,
|
|
119
196
|
});
|
|
120
197
|
if (workspace) {
|
|
121
|
-
await writeResource(workspace, resourcePath, owner, orgId);
|
|
198
|
+
await writeResource(workspace, resourcePath, owner, orgId, range, maxResultChars);
|
|
122
199
|
return;
|
|
123
200
|
}
|
|
124
201
|
console.log(`Resource not found: ${resourcePath}. You can create it with resource-write.`);
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
55
55
|
errorCode: "secret_managed_elsewhere";
|
|
56
56
|
managedBy: SecretManagedBy;
|
|
57
57
|
} | {
|
|
58
|
-
errorCode?: undefined;
|
|
59
58
|
error: string;
|
|
59
|
+
errorCode?: undefined;
|
|
60
60
|
ok?: undefined;
|
|
61
61
|
status?: undefined;
|
|
62
62
|
} | {
|
|
@@ -65,8 +65,8 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
65
65
|
ok?: undefined;
|
|
66
66
|
status?: undefined;
|
|
67
67
|
} | {
|
|
68
|
-
errorCode?: undefined;
|
|
69
68
|
error?: undefined;
|
|
69
|
+
errorCode?: undefined;
|
|
70
70
|
ok: boolean;
|
|
71
71
|
status: string;
|
|
72
72
|
} | {
|
|
@@ -286,10 +286,6 @@ export async function createResourceScriptEntries() {
|
|
|
286
286
|
description: "",
|
|
287
287
|
parameters: { type: "object", properties: {} },
|
|
288
288
|
}, list.default, { readOnly: true });
|
|
289
|
-
const readEntry = wrapCliScript({
|
|
290
|
-
description: "",
|
|
291
|
-
parameters: { type: "object", properties: {} },
|
|
292
|
-
}, read.default, { readOnly: true });
|
|
293
289
|
const writeEntry = wrapCliScript({
|
|
294
290
|
description: "",
|
|
295
291
|
parameters: { type: "object", properties: {} },
|
|
@@ -329,6 +325,14 @@ export async function createResourceScriptEntries() {
|
|
|
329
325
|
type: "string",
|
|
330
326
|
description: "Content to write. Required for write.",
|
|
331
327
|
},
|
|
328
|
+
offset: {
|
|
329
|
+
type: "string",
|
|
330
|
+
description: "read: start character (default 0); use the partial header's next offset.",
|
|
331
|
+
},
|
|
332
|
+
length: {
|
|
333
|
+
type: "string",
|
|
334
|
+
description: "read: max chars (default/max 40000).",
|
|
335
|
+
},
|
|
332
336
|
scope: {
|
|
333
337
|
type: "string",
|
|
334
338
|
description: "personal, shared, workspace, or all (default varies by action). Workspace is read-only when inherited from Dispatch; in local file mode AGENTS.md, agent-native.json, mcp.config.json, .mcp.json, and skills/ are writable.",
|
|
@@ -371,14 +375,31 @@ export async function createResourceScriptEntries() {
|
|
|
371
375
|
},
|
|
372
376
|
needsApproval: requiresSharedResourceApproval,
|
|
373
377
|
allowPersistentApproval: false,
|
|
374
|
-
run: async (args) => {
|
|
378
|
+
run: async (args, context) => {
|
|
375
379
|
const { action: a, ...rest } = args;
|
|
376
380
|
if (a === "list")
|
|
377
381
|
return listEntry.run(rest);
|
|
378
382
|
if (a === "read") {
|
|
379
383
|
if (!rest.path)
|
|
380
384
|
return "Error: path is required for read";
|
|
381
|
-
|
|
385
|
+
let limitError;
|
|
386
|
+
const result = await captureCliOutput(async () => {
|
|
387
|
+
try {
|
|
388
|
+
await read.default(serializeCliArgs(rest), {
|
|
389
|
+
...(context?.maxResultChars !== undefined && {
|
|
390
|
+
maxResultChars: context.maxResultChars,
|
|
391
|
+
}),
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
catch (error) {
|
|
395
|
+
if (!(error instanceof read.ResourceReadResultLimitError))
|
|
396
|
+
throw error;
|
|
397
|
+
limitError = error;
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
if (limitError)
|
|
401
|
+
throw limitError;
|
|
402
|
+
return result;
|
|
382
403
|
}
|
|
383
404
|
if (a === "effective") {
|
|
384
405
|
if (!rest.path)
|