jangada-ai 0.1.0 → 1.0.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/README.md +6 -2
- package/dist/a2a/index.cjs +9 -0
- package/dist/a2a/index.d.cts +2 -0
- package/dist/a2a/index.d.ts +2 -0
- package/dist/a2a/index.js +1 -0
- package/dist/{anthropic-D5xT9Yc4.cjs → anthropic-B3YravIz.cjs} +57 -19
- package/dist/{anthropic-BOBKTM1i.js → anthropic-BIf0c9qU.js} +44 -6
- package/dist/base-DCec5kyg.cjs +277 -0
- package/dist/base-DINmmIz8.js +254 -0
- package/dist/bedrock-B0H9pi3_.cjs +475 -0
- package/dist/bedrock-sN_8C9li.js +475 -0
- package/dist/client-BcJnFY-A.d.cts +357 -0
- package/dist/client-D2b1IWMA.js +793 -0
- package/dist/client-DgttfmVI.cjs +852 -0
- package/dist/client-G7gJaq6H.d.ts +585 -0
- package/dist/client-gwTD3MxV.d.ts +357 -0
- package/dist/client-voHjPm-f.d.cts +585 -0
- package/dist/context-BWyYfOyr.cjs +136 -0
- package/dist/context-CvNVqdqz.js +101 -0
- package/dist/context-DN___2Xb.d.cts +56 -0
- package/dist/context-DN___2Xb.d.ts +56 -0
- package/dist/env-B1ffNsxb.cjs +26 -0
- package/dist/env-BH4ulZ4_.js +15 -0
- package/dist/errors-BJIPDLwX.cjs +320 -0
- package/dist/errors-hp-4UePr.js +207 -0
- package/dist/eval/index.cjs +275 -0
- package/dist/eval/index.d.cts +87 -0
- package/dist/eval/index.d.ts +87 -0
- package/dist/eval/index.js +270 -0
- package/dist/files-DhchXoMT.cjs +363 -0
- package/dist/files-lcQv3hAq.js +340 -0
- package/dist/{gemini-Cko-M_l8.cjs → gemini-De2Tpc2b.cjs} +257 -26
- package/dist/{gemini-CyhOfOSH.js → gemini-DnHVRfsI.js} +245 -14
- package/dist/gemini-schema-BLKtypnG.js +21 -0
- package/dist/gemini-schema-BwcTPvV1.cjs +26 -0
- package/dist/index.cjs +2820 -99
- package/dist/index.d.cts +622 -550
- package/dist/index.d.ts +622 -550
- package/dist/index.js +2715 -35
- package/dist/mcp/index.cjs +21 -0
- package/dist/mcp/index.d.cts +4 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.js +4 -0
- package/dist/{env-c3s1IX0t.js → message-0wKCrEp2.js} +1 -15
- package/dist/{env-BgCjpek9.cjs → message-DCvWw0dF.cjs} +2 -22
- package/dist/mistral-Dw4pHREG.js +882 -0
- package/dist/mistral-TvOcFJiO.cjs +882 -0
- package/dist/node/index.cjs +255 -3
- package/dist/node/index.d.cts +65 -1
- package/dist/node/index.d.ts +65 -1
- package/dist/node/index.js +250 -2
- package/dist/observability-Cy4ewtvC.d.cts +81 -0
- package/dist/observability-D1Eiz3hh.cjs +369 -0
- package/dist/observability-DQW4up31.js +316 -0
- package/dist/observability-DSlDuE1w.d.ts +81 -0
- package/dist/ollama-DsY6KRGW.cjs +627 -0
- package/dist/ollama-DwavghW6.js +627 -0
- package/dist/openai-compat-4pgUQI_o.cjs +1288 -0
- package/dist/openai-compat-BdWwTQc6.js +1284 -0
- package/dist/prebuilt/index.cjs +1645 -0
- package/dist/prebuilt/index.d.cts +293 -0
- package/dist/prebuilt/index.d.ts +293 -0
- package/dist/prebuilt/index.js +1594 -0
- package/dist/rag/index.cjs +1140 -0
- package/dist/rag/index.d.cts +388 -0
- package/dist/rag/index.d.ts +388 -0
- package/dist/rag/index.js +1122 -0
- package/dist/schema-BBiyhRZk.d.cts +63 -0
- package/dist/schema-BBiyhRZk.d.ts +63 -0
- package/dist/schema-DCaQOk49.js +104 -0
- package/dist/schema-qS-xTTIs.cjs +121 -0
- package/dist/server-B_XDzBbl.d.ts +198 -0
- package/dist/server-C0wyAefS.cjs +680 -0
- package/dist/server-C8hINWgp.d.cts +198 -0
- package/dist/server-CnO0Uj7X.d.cts +280 -0
- package/dist/server-Copv1dWg.js +791 -0
- package/dist/server-Crk1KLvG.cjs +820 -0
- package/dist/server-DVWw6Q6D.d.ts +280 -0
- package/dist/server-zdrObsBn.js +639 -0
- package/dist/tools-4-yoaMWI.d.ts +147 -0
- package/dist/tools-DjzQr-Np.d.cts +147 -0
- package/dist/version-BR38yiy9.js +185 -0
- package/dist/version-cxay-WR-.cjs +292 -0
- package/package.json +71 -1
- package/dist/base-C-SPiVRW.js +0 -728
- package/dist/base-oJ61mpAL.cjs +0 -985
- package/dist/openai-compat-CFXijT4g.js +0 -538
- package/dist/openai-compat-CqvE3LDu.cjs +0 -542
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ erro, structured output com Zod, tools, streaming e custo em cada resposta.
|
|
|
7
7
|
Port da lib Python [`jangada-ai`](https://pypi.org/project/jangada-ai/).
|
|
8
8
|
Documentação: [docs.jangada.dev.br](https://docs.jangada.dev.br).
|
|
9
9
|
|
|
10
|
-
> Versão
|
|
10
|
+
> Versão 1.0.0: paridade com a lib Python (providers, tools, MCP, agentes, RAG, eval, A2A e mais).
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npm install jangada-ai
|
|
@@ -29,7 +29,11 @@ console.log(comp.text, comp.cost);
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Providers: `openai`, `azure`, `groq`, `openrouter`, `deepseek`, `anthropic`,
|
|
32
|
-
`gemini`, `vertex
|
|
32
|
+
`gemini`, `vertex`, `bedrock`, `mistral`, `ollama`.
|
|
33
|
+
|
|
34
|
+
Subpaths: `jangada-ai/node` (arquivos, `.env`, `serveMcp`, `serveA2a`),
|
|
35
|
+
`jangada-ai/mcp`, `jangada-ai/rag`, `jangada-ai/eval`, `jangada-ai/prebuilt` e
|
|
36
|
+
`jangada-ai/a2a`. Exemplos em [`examples/`](examples/).
|
|
33
37
|
|
|
34
38
|
## Desenvolvimento
|
|
35
39
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_server = require("../server-C0wyAefS.cjs");
|
|
3
|
+
exports.A2AHandler = require_server.A2AHandler;
|
|
4
|
+
exports.A2aInvalidParamsError = require_server.A2aInvalidParamsError;
|
|
5
|
+
exports.A2aTaskNotCancelableError = require_server.A2aTaskNotCancelableError;
|
|
6
|
+
exports.A2aTaskNotFoundError = require_server.A2aTaskNotFoundError;
|
|
7
|
+
exports.buildA2aHandler = require_server.buildA2aHandler;
|
|
8
|
+
exports.requestContext = require_server.requestContext;
|
|
9
|
+
exports.textFromParts = require_server.textFromParts;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as JsonRpcResponse, S as JsonRpcError, _ as A2aTask, a as requestContext, b as A2aTaskState, c as A2aAgent, d as A2aHistoryStore, f as A2aInvalidParamsError, g as A2aStreamEvent, h as A2aStatusUpdate, i as buildA2aHandler, l as A2aArtifact, m as A2aPart, n as A2aServed, o as A2AHandler, p as A2aMessage, r as A2aServerOptions, s as A2AHandlerOptions, t as A2aRequestContext, u as A2aCallOptions, v as A2aTaskNotCancelableError, w as textFromParts, x as A2aTaskStatus, y as A2aTaskNotFoundError } from "../server-CnO0Uj7X.cjs";
|
|
2
|
+
export { A2AHandler, type A2AHandlerOptions, type A2aAgent, type A2aArtifact, type A2aCallOptions, type A2aHistoryStore, A2aInvalidParamsError, type A2aMessage, type A2aPart, type A2aRequestContext, type A2aServed, type A2aServerOptions, type A2aStatusUpdate, type A2aStreamEvent, type A2aTask, A2aTaskNotCancelableError, A2aTaskNotFoundError, type A2aTaskState, type A2aTaskStatus, type JsonRpcError, type JsonRpcResponse, buildA2aHandler, requestContext, textFromParts };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as JsonRpcResponse, S as JsonRpcError, _ as A2aTask, a as requestContext, b as A2aTaskState, c as A2aAgent, d as A2aHistoryStore, f as A2aInvalidParamsError, g as A2aStreamEvent, h as A2aStatusUpdate, i as buildA2aHandler, l as A2aArtifact, m as A2aPart, n as A2aServed, o as A2AHandler, p as A2aMessage, r as A2aServerOptions, s as A2AHandlerOptions, t as A2aRequestContext, u as A2aCallOptions, v as A2aTaskNotCancelableError, w as textFromParts, x as A2aTaskStatus, y as A2aTaskNotFoundError } from "../server-DVWw6Q6D.js";
|
|
2
|
+
export { A2AHandler, type A2AHandlerOptions, type A2aAgent, type A2aArtifact, type A2aCallOptions, type A2aHistoryStore, A2aInvalidParamsError, type A2aMessage, type A2aPart, type A2aRequestContext, type A2aServed, type A2aServerOptions, type A2aStatusUpdate, type A2aStreamEvent, type A2aTask, A2aTaskNotCancelableError, A2aTaskNotFoundError, type A2aTaskState, type A2aTaskStatus, type JsonRpcError, type JsonRpcResponse, buildA2aHandler, requestContext, textFromParts };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as A2AHandler, i as A2aInvalidParamsError, a as A2aTaskNotCancelableError, o as A2aTaskNotFoundError, t as buildA2aHandler, n as requestContext, s as textFromParts } from "../server-zdrObsBn.js";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const require_errors = require("./errors-BJIPDLwX.cjs");
|
|
2
|
+
const require_client = require("./client-DgttfmVI.cjs");
|
|
3
|
+
const require_message = require("./message-DCvWw0dF.cjs");
|
|
4
|
+
const require_version = require("./version-cxay-WR-.cjs");
|
|
5
|
+
const require_base = require("./base-DCec5kyg.cjs");
|
|
3
6
|
// src/providers/anthropic.ts
|
|
4
7
|
/**
|
|
5
8
|
* Provider Anthropic (Claude): texto, vision, tools, tools nativas (server tools),
|
|
@@ -10,7 +13,8 @@ const require_env = require("./env-BgCjpek9.cjs");
|
|
|
10
13
|
* Schema. Nos modelos que REJEITAM forced tool use (Opus 5.5, Sonnet 5.5, Fable 5.1,
|
|
11
14
|
* Mythos 5.1) cai para `tool_choice: auto` + strict tool use, a migração oficial.
|
|
12
15
|
*
|
|
13
|
-
*
|
|
16
|
+
* MCP remoto: `mcpServers` com `MCPServer` vai na Messages API (`mcp_servers` +
|
|
17
|
+
* `mcp_toolset`, header beta `mcp-client-2025-11-20`). Sessão client-side não dá.
|
|
14
18
|
*
|
|
15
19
|
* Espelha `jangada_ai/providers/anthropic.py`.
|
|
16
20
|
*/
|
|
@@ -18,6 +22,7 @@ const THINKING_KEY = "anthropic_thinking_blocks";
|
|
|
18
22
|
const CONTENT_KEY = "anthropic_content";
|
|
19
23
|
const CONTAINER_KEY = "anthropic_container";
|
|
20
24
|
const MAX_PAUSE = 5;
|
|
25
|
+
const MCP_BETA = "mcp-client-2025-11-20";
|
|
21
26
|
const NATIVE_VERSIONS = {
|
|
22
27
|
web_search: ["web_search_20250305", "web_search"],
|
|
23
28
|
web_fetch: ["web_fetch_20250910", "web_fetch"],
|
|
@@ -71,6 +76,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
71
76
|
]);
|
|
72
77
|
nativeToolPassthrough = true;
|
|
73
78
|
nativeToolAliases = ["claude"];
|
|
79
|
+
supportsMcp = true;
|
|
74
80
|
async buildClient() {
|
|
75
81
|
let mod;
|
|
76
82
|
try {
|
|
@@ -97,7 +103,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
97
103
|
source: {
|
|
98
104
|
type: "base64",
|
|
99
105
|
media_type: p.mimeType,
|
|
100
|
-
data:
|
|
106
|
+
data: require_message.imageBase64(p)
|
|
101
107
|
}
|
|
102
108
|
});
|
|
103
109
|
else if (p.type === "tool_call") {
|
|
@@ -156,7 +162,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
156
162
|
return out;
|
|
157
163
|
}
|
|
158
164
|
formatTools(tools) {
|
|
159
|
-
const { functions, natives } =
|
|
165
|
+
const { functions, natives } = require_version.splitTools(tools);
|
|
160
166
|
const out = functions.map((t) => ({
|
|
161
167
|
name: t.name,
|
|
162
168
|
description: t.description,
|
|
@@ -175,13 +181,13 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
175
181
|
const tipo = o.version ?? tipoPadrao;
|
|
176
182
|
delete o.version;
|
|
177
183
|
delete o.container;
|
|
178
|
-
if (o.files !== void 0) throw new
|
|
184
|
+
if (o.files !== void 0) throw new require_errors.UnsupportedError("codeExecution({ files }) não existe na Anthropic: envie os arquivos como blocos container_upload (Files API) na mensagem.", { provider: this.name });
|
|
179
185
|
const loc = o.user_location;
|
|
180
186
|
if (loc && typeof loc === "object" && !("type" in loc)) o.user_location = {
|
|
181
187
|
type: "approximate",
|
|
182
188
|
...loc
|
|
183
189
|
};
|
|
184
|
-
if (o.allowed_domains && o.blocked_domains) throw new
|
|
190
|
+
if (o.allowed_domains && o.blocked_domains) throw new require_errors.UnsupportedError(`${nt.kind}: a Anthropic não aceita allowedDomains e blockedDomains juntos (400). Use só um.`, { provider: this.name });
|
|
185
191
|
return {
|
|
186
192
|
type: tipo,
|
|
187
193
|
name: nome,
|
|
@@ -190,7 +196,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
190
196
|
}
|
|
191
197
|
/** Container do code_execution: o explícito ou o último do histórico. */
|
|
192
198
|
static containerFrom(messages, tools) {
|
|
193
|
-
for (const t of tools) if (t instanceof
|
|
199
|
+
for (const t of tools) if (t instanceof require_version.NativeTool && t.kind === "code_execution") {
|
|
194
200
|
const explicito = t.options.container;
|
|
195
201
|
if (typeof explicito === "string" && explicito) return explicito;
|
|
196
202
|
for (const m of [...messages].reverse()) {
|
|
@@ -226,14 +232,45 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
226
232
|
kw.tools = this.formatTools(tools);
|
|
227
233
|
if (options.toolChoice !== void 0 && options.toolChoice !== null) {
|
|
228
234
|
const tc = AnthropicProvider.toolChoice(options.toolChoice);
|
|
229
|
-
if (this.forbidsForcedTools() && (tc.type === "any" || tc.type === "tool")) throw new
|
|
235
|
+
if (this.forbidsForcedTools() && (tc.type === "any" || tc.type === "tool")) throw new require_errors.UnsupportedError(`${this.model} não suporta forced tool use (toolChoice=${JSON.stringify(options.toolChoice)}): a API retorna 400. Use toolChoice 'auto' (com strict tool use, se quiser garantir o schema) ou structured output via parse().`, { provider: this.name });
|
|
230
236
|
kw.tool_choice = tc;
|
|
231
237
|
}
|
|
232
238
|
const container = AnthropicProvider.containerFrom(messages, tools);
|
|
233
239
|
if (container) kw.container = container;
|
|
234
240
|
}
|
|
241
|
+
if (options.mcpServers?.length) this.applyMcp(kw, options.mcpServers);
|
|
235
242
|
return kw;
|
|
236
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* MCP remoto via Messages API (server-side, beta). Sessão client-side não dá.
|
|
246
|
+
* Allowlist no shape `mcp-client-2025-11-20`: `default_config` desabilitado e cada
|
|
247
|
+
* tool permitida habilitada em `configs`.
|
|
248
|
+
*/
|
|
249
|
+
applyMcp(kw, mcpServers) {
|
|
250
|
+
const { remote, sessions } = require_client.splitMcp(mcpServers);
|
|
251
|
+
if (sessions.length) throw new require_errors.UnsupportedError("Anthropic só aceita MCP remoto por URL (passe MCPServer). Para MCP client-side (sessão), use o Gemini ou MCPClient + runAgent.", { provider: this.name });
|
|
252
|
+
kw.mcp_servers = remote.map((s) => ({
|
|
253
|
+
type: "url",
|
|
254
|
+
url: s.url,
|
|
255
|
+
name: s.name,
|
|
256
|
+
...s.authorizationToken ? { authorization_token: s.authorizationToken } : {}
|
|
257
|
+
}));
|
|
258
|
+
const toolsets = remote.map((s) => ({
|
|
259
|
+
type: "mcp_toolset",
|
|
260
|
+
mcp_server_name: s.name,
|
|
261
|
+
...s.allowedTools?.length ? {
|
|
262
|
+
default_config: { enabled: false },
|
|
263
|
+
configs: Object.fromEntries(s.allowedTools.map((t) => [t, { enabled: true }]))
|
|
264
|
+
} : {}
|
|
265
|
+
}));
|
|
266
|
+
kw.tools = [...kw.tools ?? [], ...toolsets];
|
|
267
|
+
}
|
|
268
|
+
/** Opções da requisição: `signal` e, com MCP, o header beta. */
|
|
269
|
+
reqOptions(options) {
|
|
270
|
+
const o = { signal: options.signal };
|
|
271
|
+
if (options.mcpServers?.length) o.headers = { "anthropic-beta": MCP_BETA };
|
|
272
|
+
return o;
|
|
273
|
+
}
|
|
237
274
|
static thinkingBlocks(content) {
|
|
238
275
|
const out = [];
|
|
239
276
|
for (const b of content) {
|
|
@@ -254,8 +291,8 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
254
291
|
try {
|
|
255
292
|
return this.buildCompletion(resp);
|
|
256
293
|
} catch (e) {
|
|
257
|
-
if (e instanceof
|
|
258
|
-
throw new
|
|
294
|
+
if (e instanceof require_errors.LLMError) throw e;
|
|
295
|
+
throw new require_errors.ProviderError(`[${this.name}] resposta em formato inesperado: ${e instanceof Error ? `${e.name}: ${e.message}` : e}`, {
|
|
259
296
|
provider: this.name,
|
|
260
297
|
original: e
|
|
261
298
|
});
|
|
@@ -263,9 +300,9 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
263
300
|
}
|
|
264
301
|
buildCompletion(resp) {
|
|
265
302
|
const content = get(resp, "content");
|
|
266
|
-
if (!Array.isArray(content)) throw new
|
|
303
|
+
if (!Array.isArray(content)) throw new require_errors.ServerError(`[${this.name}] resposta sem conteúdo (content=${content}).`, { provider: this.name });
|
|
267
304
|
const text = content.map((b) => get(b, "type") === "text" ? get(b, "text") ?? "" : "").join("");
|
|
268
|
-
const toolCalls = content.filter((b) => get(b, "type") === "tool_use" && get(b, "name")).map((b) => new
|
|
305
|
+
const toolCalls = content.filter((b) => get(b, "type") === "tool_use" && get(b, "name")).map((b) => new require_message.ToolCall(String(get(b, "id") ?? ""), String(get(b, "name")), { ...get(b, "input") ?? {} }));
|
|
269
306
|
const thinking = AnthropicProvider.thinkingBlocks(content);
|
|
270
307
|
if (thinking.length && toolCalls[0]) toolCalls[0].metadata[THINKING_KEY] = thinking;
|
|
271
308
|
const { citations, serverCalls, preservar } = AnthropicProvider.nativeOutputs(content);
|
|
@@ -295,7 +332,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
295
332
|
}
|
|
296
333
|
}
|
|
297
334
|
const stop = get(resp, "stop_reason") ?? null;
|
|
298
|
-
return new
|
|
335
|
+
return new require_message.Completion({
|
|
299
336
|
text,
|
|
300
337
|
model: this.model,
|
|
301
338
|
provider: this.name,
|
|
@@ -419,7 +456,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
419
456
|
let resp;
|
|
420
457
|
for (let i = 0; i <= MAX_PAUSE; i++) {
|
|
421
458
|
try {
|
|
422
|
-
resp = await client.messages.create(kw,
|
|
459
|
+
resp = await client.messages.create(kw, this.reqOptions(options));
|
|
423
460
|
} catch (e) {
|
|
424
461
|
throw this.err(e, options);
|
|
425
462
|
}
|
|
@@ -434,7 +471,8 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
434
471
|
const kw = this.kwargs(messages, {
|
|
435
472
|
...options,
|
|
436
473
|
tools: void 0,
|
|
437
|
-
toolChoice: void 0
|
|
474
|
+
toolChoice: void 0,
|
|
475
|
+
mcpServers: void 0
|
|
438
476
|
});
|
|
439
477
|
const extract = {
|
|
440
478
|
name: "extract",
|
|
@@ -465,7 +503,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
465
503
|
const comp = this.completion(resp);
|
|
466
504
|
require_base.Provider.checkTruncation(comp, this.name);
|
|
467
505
|
const toolUse = (get(resp, "content") ?? []).find((b) => get(b, "type") === "tool_use");
|
|
468
|
-
if (!toolUse) throw new
|
|
506
|
+
if (!toolUse) throw new require_errors.OutputValidationError(`[${this.name}] o modelo não devolveu o objeto estruturado (stop_reason=${JSON.stringify(comp.finishReason ?? "sem tool_use")}): ${JSON.stringify(comp.text.slice(0, 200))}`, { provider: this.name });
|
|
469
507
|
const input = get(toolUse, "input");
|
|
470
508
|
comp.text = JSON.stringify(input);
|
|
471
509
|
comp.parsed = await schema.validate(input);
|
|
@@ -483,7 +521,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
483
521
|
let resp;
|
|
484
522
|
for (let i = 0; i <= MAX_PAUSE; i++) {
|
|
485
523
|
try {
|
|
486
|
-
const s = client.messages.stream(kw,
|
|
524
|
+
const s = client.messages.stream(kw, this.reqOptions(options));
|
|
487
525
|
for await (const ev of s) {
|
|
488
526
|
if (get(ev, "type") !== "content_block_delta") continue;
|
|
489
527
|
const delta = get(ev, "delta");
|
|
@@ -511,7 +549,7 @@ var AnthropicProvider = class AnthropicProvider extends require_base.Provider {
|
|
|
511
549
|
};
|
|
512
550
|
}
|
|
513
551
|
err(e, options) {
|
|
514
|
-
return options.signal?.aborted ? e :
|
|
552
|
+
return options.signal?.aborted ? e : require_errors.classify(e, this.name);
|
|
515
553
|
}
|
|
516
554
|
};
|
|
517
555
|
exports.AnthropicProvider = AnthropicProvider;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as UnsupportedError, d as ProviderError, l as OutputValidationError, m as ServerError, s as LLMError, v as classify } from "./errors-hp-4UePr.js";
|
|
2
|
+
import { s as splitMcp } from "./client-D2b1IWMA.js";
|
|
3
|
+
import { a as ToolCall, n as Completion, o as imageBase64 } from "./message-0wKCrEp2.js";
|
|
4
|
+
import { c as NativeTool, i as splitTools } from "./version-BR38yiy9.js";
|
|
5
|
+
import { n as applyProfile, t as Provider } from "./base-DINmmIz8.js";
|
|
3
6
|
// src/providers/anthropic.ts
|
|
4
7
|
/**
|
|
5
8
|
* Provider Anthropic (Claude): texto, vision, tools, tools nativas (server tools),
|
|
@@ -10,7 +13,8 @@ import { c as imageBase64, i as Completion, s as ToolCall } from "./env-c3s1IX0t
|
|
|
10
13
|
* Schema. Nos modelos que REJEITAM forced tool use (Opus 5.5, Sonnet 5.5, Fable 5.1,
|
|
11
14
|
* Mythos 5.1) cai para `tool_choice: auto` + strict tool use, a migração oficial.
|
|
12
15
|
*
|
|
13
|
-
*
|
|
16
|
+
* MCP remoto: `mcpServers` com `MCPServer` vai na Messages API (`mcp_servers` +
|
|
17
|
+
* `mcp_toolset`, header beta `mcp-client-2025-11-20`). Sessão client-side não dá.
|
|
14
18
|
*
|
|
15
19
|
* Espelha `jangada_ai/providers/anthropic.py`.
|
|
16
20
|
*/
|
|
@@ -18,6 +22,7 @@ const THINKING_KEY = "anthropic_thinking_blocks";
|
|
|
18
22
|
const CONTENT_KEY = "anthropic_content";
|
|
19
23
|
const CONTAINER_KEY = "anthropic_container";
|
|
20
24
|
const MAX_PAUSE = 5;
|
|
25
|
+
const MCP_BETA = "mcp-client-2025-11-20";
|
|
21
26
|
const NATIVE_VERSIONS = {
|
|
22
27
|
web_search: ["web_search_20250305", "web_search"],
|
|
23
28
|
web_fetch: ["web_fetch_20250910", "web_fetch"],
|
|
@@ -71,6 +76,7 @@ var AnthropicProvider = class AnthropicProvider extends Provider {
|
|
|
71
76
|
]);
|
|
72
77
|
nativeToolPassthrough = true;
|
|
73
78
|
nativeToolAliases = ["claude"];
|
|
79
|
+
supportsMcp = true;
|
|
74
80
|
async buildClient() {
|
|
75
81
|
let mod;
|
|
76
82
|
try {
|
|
@@ -232,8 +238,39 @@ var AnthropicProvider = class AnthropicProvider extends Provider {
|
|
|
232
238
|
const container = AnthropicProvider.containerFrom(messages, tools);
|
|
233
239
|
if (container) kw.container = container;
|
|
234
240
|
}
|
|
241
|
+
if (options.mcpServers?.length) this.applyMcp(kw, options.mcpServers);
|
|
235
242
|
return kw;
|
|
236
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* MCP remoto via Messages API (server-side, beta). Sessão client-side não dá.
|
|
246
|
+
* Allowlist no shape `mcp-client-2025-11-20`: `default_config` desabilitado e cada
|
|
247
|
+
* tool permitida habilitada em `configs`.
|
|
248
|
+
*/
|
|
249
|
+
applyMcp(kw, mcpServers) {
|
|
250
|
+
const { remote, sessions } = splitMcp(mcpServers);
|
|
251
|
+
if (sessions.length) throw new UnsupportedError("Anthropic só aceita MCP remoto por URL (passe MCPServer). Para MCP client-side (sessão), use o Gemini ou MCPClient + runAgent.", { provider: this.name });
|
|
252
|
+
kw.mcp_servers = remote.map((s) => ({
|
|
253
|
+
type: "url",
|
|
254
|
+
url: s.url,
|
|
255
|
+
name: s.name,
|
|
256
|
+
...s.authorizationToken ? { authorization_token: s.authorizationToken } : {}
|
|
257
|
+
}));
|
|
258
|
+
const toolsets = remote.map((s) => ({
|
|
259
|
+
type: "mcp_toolset",
|
|
260
|
+
mcp_server_name: s.name,
|
|
261
|
+
...s.allowedTools?.length ? {
|
|
262
|
+
default_config: { enabled: false },
|
|
263
|
+
configs: Object.fromEntries(s.allowedTools.map((t) => [t, { enabled: true }]))
|
|
264
|
+
} : {}
|
|
265
|
+
}));
|
|
266
|
+
kw.tools = [...kw.tools ?? [], ...toolsets];
|
|
267
|
+
}
|
|
268
|
+
/** Opções da requisição: `signal` e, com MCP, o header beta. */
|
|
269
|
+
reqOptions(options) {
|
|
270
|
+
const o = { signal: options.signal };
|
|
271
|
+
if (options.mcpServers?.length) o.headers = { "anthropic-beta": MCP_BETA };
|
|
272
|
+
return o;
|
|
273
|
+
}
|
|
237
274
|
static thinkingBlocks(content) {
|
|
238
275
|
const out = [];
|
|
239
276
|
for (const b of content) {
|
|
@@ -419,7 +456,7 @@ var AnthropicProvider = class AnthropicProvider extends Provider {
|
|
|
419
456
|
let resp;
|
|
420
457
|
for (let i = 0; i <= MAX_PAUSE; i++) {
|
|
421
458
|
try {
|
|
422
|
-
resp = await client.messages.create(kw,
|
|
459
|
+
resp = await client.messages.create(kw, this.reqOptions(options));
|
|
423
460
|
} catch (e) {
|
|
424
461
|
throw this.err(e, options);
|
|
425
462
|
}
|
|
@@ -434,7 +471,8 @@ var AnthropicProvider = class AnthropicProvider extends Provider {
|
|
|
434
471
|
const kw = this.kwargs(messages, {
|
|
435
472
|
...options,
|
|
436
473
|
tools: void 0,
|
|
437
|
-
toolChoice: void 0
|
|
474
|
+
toolChoice: void 0,
|
|
475
|
+
mcpServers: void 0
|
|
438
476
|
});
|
|
439
477
|
const extract = {
|
|
440
478
|
name: "extract",
|
|
@@ -483,7 +521,7 @@ var AnthropicProvider = class AnthropicProvider extends Provider {
|
|
|
483
521
|
let resp;
|
|
484
522
|
for (let i = 0; i <= MAX_PAUSE; i++) {
|
|
485
523
|
try {
|
|
486
|
-
const s = client.messages.stream(kw,
|
|
524
|
+
const s = client.messages.stream(kw, this.reqOptions(options));
|
|
487
525
|
for await (const ev of s) {
|
|
488
526
|
if (get(ev, "type") !== "content_block_delta") continue;
|
|
489
527
|
const delta = get(ev, "delta");
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
const require_errors = require("./errors-BJIPDLwX.cjs");
|
|
2
|
+
const require_version = require("./version-cxay-WR-.cjs");
|
|
3
|
+
const require_env = require("./env-B1ffNsxb.cjs");
|
|
4
|
+
// src/profiles.ts
|
|
5
|
+
const RULES = [];
|
|
6
|
+
/** Adiciona uma regra de perfil (entra no início: tem prioridade). */
|
|
7
|
+
function registerProfile(provider, pattern, profile) {
|
|
8
|
+
const rx = pattern instanceof RegExp ? new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, "")) : new RegExp(pattern);
|
|
9
|
+
RULES.unshift({
|
|
10
|
+
provider: provider.toLowerCase(),
|
|
11
|
+
rx,
|
|
12
|
+
profile
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const ALIASES = {
|
|
16
|
+
vertex: "gemini",
|
|
17
|
+
azure: "openai"
|
|
18
|
+
};
|
|
19
|
+
/** Faz `provider` herdar as regras de perfil de `target`. */
|
|
20
|
+
function registerAlias(provider, target) {
|
|
21
|
+
ALIASES[provider.toLowerCase()] = target.toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
const has = (o, k) => o[k] !== void 0 && o[k] !== null;
|
|
24
|
+
/**
|
|
25
|
+
* Aplica todas as regras que casam com (provider, model). Devolve uma CÓPIA dos
|
|
26
|
+
* params e os avisos. `profileModel` sobrepõe o nome usado para casar as regras
|
|
27
|
+
* (útil no Azure, onde `model` é o nome do deployment).
|
|
28
|
+
*/
|
|
29
|
+
function applyProfile(provider, model, params, options) {
|
|
30
|
+
const out = { ...params };
|
|
31
|
+
const warnings = [];
|
|
32
|
+
const prov = provider.toLowerCase();
|
|
33
|
+
const provs = /* @__PURE__ */ new Set([prov, ALIASES[prov] ?? prov]);
|
|
34
|
+
const alvo = options?.profileModel ?? model;
|
|
35
|
+
for (const { provider: p, rx, profile } of [...RULES]) {
|
|
36
|
+
if (!provs.has(p) || !rx.test(alvo)) continue;
|
|
37
|
+
const note = profile.note ?? "";
|
|
38
|
+
for (const key of profile.drop ?? []) if (has(out, key)) {
|
|
39
|
+
delete out[key];
|
|
40
|
+
warnings.push(`${model}: '${key}' removido (${note})`);
|
|
41
|
+
}
|
|
42
|
+
for (const [old, novo] of Object.entries(profile.rename ?? {})) if (has(out, old)) {
|
|
43
|
+
out[novo] = out[old];
|
|
44
|
+
delete out[old];
|
|
45
|
+
warnings.push(`${model}: '${old}' -> '${novo}' (${note})`);
|
|
46
|
+
}
|
|
47
|
+
if (profile.transform) warnings.push(...profile.transform(out, alvo));
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
params: out,
|
|
51
|
+
warnings
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const LEVEL_TO_BUDGET = {
|
|
55
|
+
MINIMAL: 0,
|
|
56
|
+
LOW: 1024,
|
|
57
|
+
MEDIUM: 8192,
|
|
58
|
+
HIGH: 24576
|
|
59
|
+
};
|
|
60
|
+
const MIN_BUDGET_25_PRO = 128;
|
|
61
|
+
function gemini3Thinking(params, model) {
|
|
62
|
+
if (!("thinkingBudget" in params)) return [];
|
|
63
|
+
const budget = params.thinkingBudget;
|
|
64
|
+
delete params.thinkingBudget;
|
|
65
|
+
if (!has(params, "thinkingLevel")) {
|
|
66
|
+
let level;
|
|
67
|
+
if (!budget || budget < 0 || budget <= 1024) level = "LOW";
|
|
68
|
+
else if (budget <= 8192 && model.toLowerCase().includes("flash")) level = "MEDIUM";
|
|
69
|
+
else level = "HIGH";
|
|
70
|
+
params.thinkingLevel = level;
|
|
71
|
+
}
|
|
72
|
+
return [`thinkingBudget -> thinkingLevel='${params.thinkingLevel}' (Gemini 3.x não aceita budget)`];
|
|
73
|
+
}
|
|
74
|
+
function gemini25Thinking(params, model) {
|
|
75
|
+
if (!("thinkingLevel" in params)) return [];
|
|
76
|
+
const level = String(params.thinkingLevel).toUpperCase();
|
|
77
|
+
delete params.thinkingLevel;
|
|
78
|
+
if (!has(params, "thinkingBudget")) {
|
|
79
|
+
let budget = LEVEL_TO_BUDGET[level] ?? -1;
|
|
80
|
+
if (budget === 0 && /2\.5-pro/.test(model)) budget = MIN_BUDGET_25_PRO;
|
|
81
|
+
params.thinkingBudget = budget;
|
|
82
|
+
}
|
|
83
|
+
return [`thinkingLevel='${level}' -> thinkingBudget=${params.thinkingBudget} (Gemini 2.5 não aceita level)`];
|
|
84
|
+
}
|
|
85
|
+
const OPENAI_REASONING_DROP = [
|
|
86
|
+
"temperature",
|
|
87
|
+
"top_p",
|
|
88
|
+
"presence_penalty",
|
|
89
|
+
"frequency_penalty",
|
|
90
|
+
"logprobs",
|
|
91
|
+
"logit_bias",
|
|
92
|
+
"n"
|
|
93
|
+
];
|
|
94
|
+
registerProfile("openai", /^gpt-(?:[5-9]|[1-9]\d)(?!\d)(?!.*chat)/, {
|
|
95
|
+
drop: OPENAI_REASONING_DROP,
|
|
96
|
+
rename: { max_tokens: "max_completion_tokens" },
|
|
97
|
+
note: "modelo de raciocínio gpt-5+"
|
|
98
|
+
});
|
|
99
|
+
registerProfile("openai", /^o[134](-|$)/, {
|
|
100
|
+
drop: OPENAI_REASONING_DROP,
|
|
101
|
+
rename: { max_tokens: "max_completion_tokens" },
|
|
102
|
+
note: "modelo de raciocínio série o"
|
|
103
|
+
});
|
|
104
|
+
registerProfile("gemini", /gemini-(?:[3-9]|[1-9]\d)(?!\d)/, {
|
|
105
|
+
drop: [
|
|
106
|
+
"temperature",
|
|
107
|
+
"topP",
|
|
108
|
+
"topK",
|
|
109
|
+
"candidateCount"
|
|
110
|
+
],
|
|
111
|
+
transform: gemini3Thinking,
|
|
112
|
+
note: "Gemini 3.x+/4 usa defaults de sampling"
|
|
113
|
+
});
|
|
114
|
+
registerProfile("gemini", /gemini-2\.5/, {
|
|
115
|
+
transform: gemini25Thinking,
|
|
116
|
+
note: "Gemini 2.5 usa thinkingBudget"
|
|
117
|
+
});
|
|
118
|
+
// src/providers/base.ts
|
|
119
|
+
/**
|
|
120
|
+
* Contrato base do provider: texto, structured output e streaming (tudo async).
|
|
121
|
+
* Espelha `jangada_ai/providers/base.py`, sem as versões sync.
|
|
122
|
+
*
|
|
123
|
+
* Invariantes para quem escreve um adapter:
|
|
124
|
+
* - o SDK só entra via `await import()` dentro de `buildClient()`;
|
|
125
|
+
* - toda chamada ao SDK fica em try/catch e relança com `classify(e, this.name)`;
|
|
126
|
+
* - params: `translate()` (canônico → nativo) e depois `applyProfile()`.
|
|
127
|
+
*/
|
|
128
|
+
var Provider = class {
|
|
129
|
+
/** Variável de ambiente com a chave, usada quando `apiKey` não é passado. */
|
|
130
|
+
envKey = null;
|
|
131
|
+
/** Tipos canônicos que o adapter sabe traduzir (`web_search`, `code_execution`...). */
|
|
132
|
+
nativeToolKinds = /* @__PURE__ */ new Set();
|
|
133
|
+
/** Aceita `nativeTool(<este provider>, spec)` (payload nativo repassado cru)? */
|
|
134
|
+
nativeToolPassthrough = false;
|
|
135
|
+
/** Nomes extras aceitos em `nativeTool(provider, ...)` além de `name`. */
|
|
136
|
+
nativeToolAliases = [];
|
|
137
|
+
/** `parse()` aceita tools nativas junto? */
|
|
138
|
+
nativeToolsWithParse = false;
|
|
139
|
+
/** Aceita `mcpServers` em `complete`/`streamComplete`? */
|
|
140
|
+
supportsMcp = false;
|
|
141
|
+
model;
|
|
142
|
+
apiKey;
|
|
143
|
+
profileModel;
|
|
144
|
+
clientOptions;
|
|
145
|
+
clientPromise = null;
|
|
146
|
+
constructor(model, options = {}) {
|
|
147
|
+
this.model = model;
|
|
148
|
+
this.apiKey = options.apiKey;
|
|
149
|
+
this.profileModel = options.profileModel;
|
|
150
|
+
this.clientOptions = { ...options.clientOptions ?? {} };
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Valida as tools NATIVAS antes de ir ao SDK: tipo não suportado, `nativeTool()`
|
|
154
|
+
* de outro provider ou `parse()` com nativas onde a API não deixa →
|
|
155
|
+
* `UnsupportedError` com dica.
|
|
156
|
+
*/
|
|
157
|
+
checkNativeTools(tools, method = "complete") {
|
|
158
|
+
const natives = (tools ?? []).filter((t) => t instanceof require_version.NativeTool);
|
|
159
|
+
if (!natives.length) return;
|
|
160
|
+
const fail = (msg) => {
|
|
161
|
+
throw new require_errors.UnsupportedError(msg, { provider: this.name });
|
|
162
|
+
};
|
|
163
|
+
if (method === "parse" && !this.nativeToolsWithParse) fail(`${this.name} não aceita tools nativas junto com structured output (parse). Use complete({ tools }) e depois parse() sobre o texto.`);
|
|
164
|
+
const nomes = /* @__PURE__ */ new Set([this.name, ...this.nativeToolAliases]);
|
|
165
|
+
for (const t of natives) {
|
|
166
|
+
if (t.kind === "native") {
|
|
167
|
+
if (t.provider && nomes.has(t.provider)) {
|
|
168
|
+
if (this.nativeToolPassthrough) continue;
|
|
169
|
+
fail(`'${this.name}' não aceita payload nativo de tool (nativeTool): a API não tem tools server-side.`);
|
|
170
|
+
}
|
|
171
|
+
fail(`nativeTool('${t.provider}', ...) não se aplica ao provider '${this.name}' (o payload nativo só vale no provider indicado).`);
|
|
172
|
+
}
|
|
173
|
+
if (!this.nativeToolKinds.has(t.kind)) {
|
|
174
|
+
const suportadas = [...this.nativeToolKinds].sort().join(", ") || "nenhuma";
|
|
175
|
+
fail(`tool nativa '${t.kind}' não é suportada por '${this.name}' (suportadas aqui: ${suportadas}). Use nativeTool('${this.name}', <payload nativo>) se o SDK tiver algo equivalente.`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/** Mensagem do `UnsupportedError` quando o provider não tem MCP. */
|
|
180
|
+
mcpUnsupportedMessage() {
|
|
181
|
+
return `O provider '${this.name}' não suporta MCP (mcpServers). Use Anthropic, OpenAI, Azure, Groq ou Gemini, ou rode o loop client-side com MCPClient + runAgent (funciona em qualquer provider).`;
|
|
182
|
+
}
|
|
183
|
+
/** Recusa `mcpServers` em provider sem suporte (antes de ir ao SDK). */
|
|
184
|
+
checkMcp(mcpServers) {
|
|
185
|
+
if (mcpServers?.length && !this.supportsMcp) throw new require_errors.UnsupportedError(this.mcpUnsupportedMessage(), { provider: this.name });
|
|
186
|
+
}
|
|
187
|
+
/** Cliente nativo, criado uma vez e reaproveitado. */
|
|
188
|
+
client() {
|
|
189
|
+
if (!this.clientPromise) this.clientPromise = this.buildClient().catch((e) => {
|
|
190
|
+
this.clientPromise = null;
|
|
191
|
+
throw e;
|
|
192
|
+
});
|
|
193
|
+
return this.clientPromise;
|
|
194
|
+
}
|
|
195
|
+
/** Para testes: injeta um cliente nativo falso. */
|
|
196
|
+
setClient(client) {
|
|
197
|
+
this.clientPromise = Promise.resolve(client);
|
|
198
|
+
}
|
|
199
|
+
resolveApiKey() {
|
|
200
|
+
if (this.apiKey) return this.apiKey;
|
|
201
|
+
return this.envKey ? require_env.getEnv(this.envKey) : void 0;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Streaming com a resposta completa no fim (texto, tools, usage). Padrão: chamada
|
|
205
|
+
* normal, entregue como um único pedaço de texto + `"done"`. Quem consegue montar
|
|
206
|
+
* a `Completion` a partir do stream sobrescreve.
|
|
207
|
+
*/
|
|
208
|
+
async *streamEvents(messages, options) {
|
|
209
|
+
const comp = await this.complete(messages, options);
|
|
210
|
+
if (comp.text) yield {
|
|
211
|
+
type: "text",
|
|
212
|
+
text: comp.text
|
|
213
|
+
};
|
|
214
|
+
yield {
|
|
215
|
+
type: "done",
|
|
216
|
+
text: "",
|
|
217
|
+
completion: comp
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
transcribe(_audio, _options) {
|
|
221
|
+
return Promise.reject(new require_errors.UnsupportedError(`O provider '${this.name}' não suporta transcrição de áudio.`, { provider: this.name }));
|
|
222
|
+
}
|
|
223
|
+
embed(_texts, _options) {
|
|
224
|
+
return Promise.reject(new require_errors.UnsupportedError(`O provider '${this.name}' não gera embeddings.`, { provider: this.name }));
|
|
225
|
+
}
|
|
226
|
+
ocr(_source, _options) {
|
|
227
|
+
return Promise.reject(new require_errors.UnsupportedError(`O provider '${this.name}' não faz OCR.`, { provider: this.name }));
|
|
228
|
+
}
|
|
229
|
+
/** Fecha o cliente nativo (se ele tiver `close()`). Idempotente. */
|
|
230
|
+
async close() {
|
|
231
|
+
const p = this.clientPromise;
|
|
232
|
+
this.clientPromise = null;
|
|
233
|
+
if (!p) return;
|
|
234
|
+
try {
|
|
235
|
+
const c = await p;
|
|
236
|
+
if (typeof c?.close === "function") await c.close();
|
|
237
|
+
} catch {}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Lança `TruncatedError` quando a resposta foi cortada por maxTokens. Chamado em
|
|
241
|
+
* `parse` ANTES de validar o JSON, para o erro ser claro ("aumente maxTokens").
|
|
242
|
+
*/
|
|
243
|
+
static checkTruncation(comp, provider) {
|
|
244
|
+
if (comp.finishReason === "length") {
|
|
245
|
+
const out = comp.usage?.outputTokens;
|
|
246
|
+
const onde = out ? ` em ${out} tokens de saída` : "";
|
|
247
|
+
throw new require_errors.TruncatedError(`resposta truncada${onde}: o modelo atingiu maxTokens antes de fechar o JSON. Aumente maxTokens (ex.: params: { maxTokens: 8192 }).`, { provider });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
toString() {
|
|
251
|
+
return `<${this.constructor.name} model=${JSON.stringify(this.model)}>`;
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
Object.defineProperty(exports, "Provider", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function() {
|
|
257
|
+
return Provider;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(exports, "applyProfile", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function() {
|
|
263
|
+
return applyProfile;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(exports, "registerAlias", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function() {
|
|
269
|
+
return registerAlias;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(exports, "registerProfile", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
get: function() {
|
|
275
|
+
return registerProfile;
|
|
276
|
+
}
|
|
277
|
+
});
|