@nodetool-ai/provider-anthropic 0.0.0-stage → 0.8.9-beta.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 +26 -2
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -4
package/README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Anthropic provider
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install `@nodetool-ai/provider-anthropic` alongside the minimal server to add
|
|
4
|
+
text generation through the official Anthropic SDK. The minimal server does
|
|
5
|
+
not depend on this package.
|
|
6
|
+
|
|
7
|
+
For the executable, set
|
|
8
|
+
`NODETOOL_FEATURES=provider-anthropic=@nodetool-ai/provider-anthropic` and store
|
|
9
|
+
`ANTHROPIC_API_KEY` through the authenticated secrets route. The default feature
|
|
10
|
+
resolves the credential for the tenant running the workflow.
|
|
11
|
+
|
|
12
|
+
Configure the feature explicitly in the administrator's composition:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { AnthropicTextProvider, createAnthropicFeature } from "@nodetool-ai/provider-anthropic";
|
|
16
|
+
|
|
17
|
+
const features = [{
|
|
18
|
+
id: "provider-anthropic",
|
|
19
|
+
load: async () => createAnthropicFeature(new AnthropicTextProvider({
|
|
20
|
+
apiKey: process.env.ANTHROPIC_API_KEY ?? ""
|
|
21
|
+
}))
|
|
22
|
+
}];
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Pass `features` to `createMinimalServer`. The feature registers
|
|
26
|
+
`anthropic.text.ChatComplete` and advertises `provider:anthropic`. A provider
|
|
27
|
+
factory can resolve a different credential for each authenticated tenant.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2026-10-31T09:11:05.344Z
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type TextChunk, type TextProvider, type TextRequest } from "@nodetool-ai/runtime-core";
|
|
2
|
+
import type { CoreNodeDefinition } from "@nodetool-ai/nodes-core";
|
|
3
|
+
import type { ServerFeature } from "@nodetool-ai/server-features";
|
|
4
|
+
export interface AnthropicTextOptions {
|
|
5
|
+
readonly apiKey: string;
|
|
6
|
+
readonly baseURL?: string;
|
|
7
|
+
readonly maxTokens?: number;
|
|
8
|
+
readonly fetch?: typeof fetch;
|
|
9
|
+
}
|
|
10
|
+
/** Optional official-SDK text adapter using the shared egress policy. */
|
|
11
|
+
export declare class AnthropicTextProvider implements TextProvider {
|
|
12
|
+
private readonly client;
|
|
13
|
+
private readonly maxTokens;
|
|
14
|
+
constructor(options: AnthropicTextOptions);
|
|
15
|
+
stream(request: TextRequest): AsyncIterable<TextChunk>;
|
|
16
|
+
}
|
|
17
|
+
export interface InstalledAnthropicFeatureHost extends AnthropicFeatureHost {
|
|
18
|
+
readonly readSecret: (userId: string, key: string) => Promise<string | undefined>;
|
|
19
|
+
}
|
|
20
|
+
declare const installedFeature: ServerFeature<InstalledAnthropicFeatureHost>;
|
|
21
|
+
export default installedFeature;
|
|
22
|
+
export interface AnthropicFeatureHost {
|
|
23
|
+
readonly execution: {
|
|
24
|
+
readonly register: (definition: CoreNodeDefinition) => void;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Register the text node only when this installed feature is explicitly configured. */
|
|
28
|
+
export declare function createAnthropicFeature(provider: TextProvider | ((userId: string) => TextProvider | Promise<TextProvider>)): ServerFeature<AnthropicFeatureHost>;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAkB,MAAM,2BAA2B,CAAC;AAC3H,OAAO,KAA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1
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
2
|
+
import { safeFetch } from "@nodetool-ai/runtime-core";
|
|
3
|
+
/** Optional official-SDK text adapter using the shared egress policy. */
|
|
4
|
+
export class AnthropicTextProvider {
|
|
5
|
+
client;
|
|
6
|
+
maxTokens;
|
|
7
|
+
constructor(options) {
|
|
8
|
+
this.maxTokens = options.maxTokens ?? 4096;
|
|
9
|
+
if (!Number.isSafeInteger(this.maxTokens) || this.maxTokens < 1) {
|
|
10
|
+
throw new Error("Anthropic maxTokens must be a positive integer");
|
|
11
|
+
}
|
|
12
|
+
const transport = options.fetch ?? globalThis.fetch;
|
|
13
|
+
const clientOptions = {
|
|
14
|
+
apiKey: options.apiKey,
|
|
15
|
+
maxRetries: 0,
|
|
16
|
+
fetch: async (input, init) => {
|
|
17
|
+
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
|
18
|
+
return safeFetch(url, init, 5, transport);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
if (options.baseURL) {
|
|
22
|
+
clientOptions.baseURL = options.baseURL;
|
|
23
|
+
}
|
|
24
|
+
this.client = new Anthropic(clientOptions);
|
|
25
|
+
}
|
|
26
|
+
async *stream(request) {
|
|
27
|
+
request.signal.throwIfAborted();
|
|
28
|
+
const system = request.messages.filter(message => message.role === "system").map(message => message.content).join("\n\n");
|
|
29
|
+
const messages = request.messages.filter(message => message.role !== "system").map(message => ({
|
|
30
|
+
role: message.role === "assistant" ? "assistant" : "user",
|
|
31
|
+
content: message.content
|
|
32
|
+
}));
|
|
33
|
+
const parameters = {
|
|
34
|
+
model: request.model,
|
|
35
|
+
max_tokens: this.maxTokens,
|
|
36
|
+
messages,
|
|
37
|
+
stream: true
|
|
38
|
+
};
|
|
39
|
+
if (system) {
|
|
40
|
+
parameters.system = system;
|
|
41
|
+
}
|
|
42
|
+
const stream = await this.client.messages.create(parameters, { signal: request.signal });
|
|
43
|
+
let usage = { inputTokens: 0, outputTokens: 0 };
|
|
44
|
+
let stopped = false;
|
|
45
|
+
for await (const event of stream) {
|
|
46
|
+
request.signal.throwIfAborted();
|
|
47
|
+
if (event.type === "message_start") {
|
|
48
|
+
usage = { inputTokens: event.message.usage.input_tokens, outputTokens: event.message.usage.output_tokens };
|
|
49
|
+
}
|
|
50
|
+
else if (event.type === "message_delta") {
|
|
51
|
+
usage = { ...usage, outputTokens: event.usage.output_tokens };
|
|
52
|
+
}
|
|
53
|
+
else if (event.type === "content_block_delta" && event.delta.type === "text_delta") {
|
|
54
|
+
yield { done: false, text: event.delta.text };
|
|
55
|
+
}
|
|
56
|
+
else if (event.type === "message_stop") {
|
|
57
|
+
stopped = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
request.signal.throwIfAborted();
|
|
61
|
+
if (!stopped) {
|
|
62
|
+
throw new Error("Anthropic stream ended without a terminal message");
|
|
63
|
+
}
|
|
64
|
+
yield { done: true, usage };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const installedFeature = {
|
|
68
|
+
descriptor: { id: "provider-anthropic", apiVersion: 1, capabilities: ["provider:anthropic"], nodeTypes: ["anthropic.text.ChatComplete"] },
|
|
69
|
+
activate: host => createAnthropicFeature(async (userId) => {
|
|
70
|
+
const apiKey = await host.readSecret(userId, "ANTHROPIC_API_KEY");
|
|
71
|
+
if (!apiKey) {
|
|
72
|
+
throw new Error("Configure ANTHROPIC_API_KEY in the authenticated user's secrets");
|
|
73
|
+
}
|
|
74
|
+
return new AnthropicTextProvider({ apiKey });
|
|
75
|
+
}).activate(host)
|
|
76
|
+
};
|
|
77
|
+
export default installedFeature;
|
|
78
|
+
/** Register the text node only when this installed feature is explicitly configured. */
|
|
79
|
+
export function createAnthropicFeature(provider) {
|
|
80
|
+
return {
|
|
81
|
+
descriptor: { id: "provider-anthropic", apiVersion: 1, capabilities: ["provider:anthropic"], nodeTypes: ["anthropic.text.ChatComplete"] },
|
|
82
|
+
activate: host => {
|
|
83
|
+
host.execution.register({
|
|
84
|
+
type: { nodeType: "anthropic.text.ChatComplete", supportsDynamicInputs: true, outputs: { output: "str" }, descriptorDefaults: { input_mode: "buffered", is_streaming_output: true } },
|
|
85
|
+
create: (_node, request) => ({
|
|
86
|
+
process: async () => { throw new Error("Remote text nodes require streaming execution"); },
|
|
87
|
+
async *genProcess(inputs, context) {
|
|
88
|
+
const selected = typeof provider === "function" ? await provider(request.userId) : provider;
|
|
89
|
+
const model = typeof inputs.model === "object" && inputs.model !== null && "id" in inputs.model ? String(inputs.model.id) : String(inputs.model ?? "");
|
|
90
|
+
let output = "";
|
|
91
|
+
for await (const chunk of selected.stream({ model, messages: [{ role: "user", content: String(inputs.prompt ?? inputs.text ?? "") }], signal: context?.signal ?? request.signal })) {
|
|
92
|
+
if (!chunk.done) {
|
|
93
|
+
output += chunk.text;
|
|
94
|
+
yield { output };
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
request.recordUsage?.(chunk.usage);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAiC,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,SAAS,EAAuE,MAAM,2BAA2B,CAAC;AAW3H,yEAAyE;AACzE,MAAM,OAAO,qBAAqB;IACf,MAAM,CAAY;IAClB,SAAS,CAAS;IAEnC,YAAY,OAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,gDA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C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;4BACnL,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;gCAChB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC;gCACrB,MAAM,EAAE,MAAM,EAAE,CAAC;4BACnB,CAAC;iCAAM,CAAC;gCACN,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;4BACrC,CAAC;wBACH,CAAC;oBACH,CAAC;iBACF,CAAC;aACH,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodetool-ai/provider-anthropic",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.8.9-beta.1",
|
|
4
|
+
"description": "Optional Anthropic text provider and execution feature",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22.0.0"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"nodetool-dev": "./src/index.ts",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "node ../../scripts/build-typescript-workspace.mjs",
|
|
21
|
+
"test": "node ../../scripts/run-vitest.mjs run",
|
|
22
|
+
"lint": "node ../../scripts/run-tsc.mjs --noEmit"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
26
|
+
"vitest": "^5.0.1"
|
|
27
|
+
},
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/nodetool-ai/nodetool.git",
|
|
32
|
+
"directory": "packages/provider-anthropic"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@anthropic-ai/sdk": "^0.105.0",
|
|
43
|
+
"@nodetool-ai/runtime-core": "0.8.9-beta.1",
|
|
44
|
+
"@nodetool-ai/nodes-core": "0.8.9-beta.1",
|
|
45
|
+
"@nodetool-ai/server-features": "0.8.9-beta.1"
|
|
46
|
+
}
|
|
47
|
+
}
|