@makaio/adapter-anthropic-sdk 1.0.0-dev-1785409369816 → 1.0.0-dev-1789404058608
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 +1 -1
- package/dist/adapter.d.ts +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-wChURkif.mjs → package-CYLUpLS-.mjs} +7 -6
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ import { createAnthropicSdkAdapter } from '@makaio/adapter-anthropic-sdk';
|
|
|
9
9
|
import { MakaioBus } from '@makaio/bus-core';
|
|
10
10
|
import { AdapterSubjects } from '@makaio/contracts';
|
|
11
11
|
|
|
12
|
-
const adapter = await createAnthropicSdkAdapter();
|
|
12
|
+
const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
13
13
|
|
|
14
14
|
const result = await MakaioBus.request(AdapterSubjects.startAgent, {
|
|
15
15
|
adapterId: adapter.adapterId,
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AIAdapter, type
|
|
1
|
+
import { AIAdapter, type AIAdapterRuntimeConfig } from '@makaio/framework/adapters';
|
|
2
2
|
import { AnthropicSdkAgent } from './agent.js';
|
|
3
3
|
import { AnthropicSdkConnector } from './connector.js';
|
|
4
4
|
import { type AnthropicSdkConnectorBus } from './namespaces/index.js';
|
|
@@ -24,29 +24,29 @@ export { AnthropicSdkAdapterName };
|
|
|
24
24
|
* @example
|
|
25
25
|
* ```typescript
|
|
26
26
|
* // Using the class directly
|
|
27
|
-
* const adapter = new AnthropicSdkAdapter();
|
|
27
|
+
* const adapter = new AnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
28
28
|
* await adapter.init();
|
|
29
29
|
*
|
|
30
30
|
* // Using the convenience factory
|
|
31
|
-
* const adapter = await createAnthropicSdkAdapter();
|
|
31
|
+
* const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export declare class AnthropicSdkAdapter extends AIAdapter<AnthropicSdkConnectorBus, AnthropicSdkConnector, AnthropicSdkAgent> {
|
|
35
|
-
constructor(config
|
|
35
|
+
constructor(config: AIAdapterRuntimeConfig);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Factory function to create and initialize an Anthropic SDK adapter.
|
|
39
39
|
*
|
|
40
40
|
* Convenience wrapper that creates the adapter and calls init() for you.
|
|
41
|
-
* @param config -
|
|
41
|
+
* @param config - Runtime configuration, including the owning authority.
|
|
42
42
|
* @returns Initialized AnthropicSdkAdapter instance
|
|
43
43
|
* @example
|
|
44
44
|
* ```typescript
|
|
45
|
-
* const adapter = await createAnthropicSdkAdapter();
|
|
45
|
+
* const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
46
46
|
*
|
|
47
47
|
* // Adapter is ready to handle requests via bus
|
|
48
48
|
* // e.g., MakaioBus.request(AdapterSubjects.startAgent, { adapterId: adapter.adapterId, ... })
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
export declare function createAnthropicSdkAdapter(config
|
|
51
|
+
export declare function createAnthropicSdkAdapter(config: AIAdapterRuntimeConfig): Promise<AnthropicSdkAdapter>;
|
|
52
52
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* import { AnthropicSdkAdapter, createAnthropicSdkAdapter } from '@makaio/adapter-anthropic-sdk';
|
|
11
11
|
*
|
|
12
12
|
* // Using the class-based adapter
|
|
13
|
-
* const adapter = new AnthropicSdkAdapter();
|
|
13
|
+
* const adapter = new AnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
14
14
|
* await adapter.init();
|
|
15
15
|
*
|
|
16
16
|
* // Or using the convenience factory
|
|
17
|
-
* const adapter = await createAnthropicSdkAdapter();
|
|
17
|
+
* const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
18
18
|
*
|
|
19
19
|
* // Adapter is ready to handle adapter.startAgent RPC via bus
|
|
20
20
|
* // Start agents via MakaioBus.request(AdapterSubjects.startAgent, { adapterId, ... })
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import { a as AnthropicSdkAdapterName, c as AnthropicSdkAgent, d as ANTHROPIC_SDK_NAMESPACE, i as AnthropicSdkConnector, l as AnthropicSdkConnectorNamespace, n as AnthropicSdkAdapter, o as AnthropicSdkSession, r as createAnthropicSdkAdapter, s as AnthropicSdkConnectorTurn, t as anthropicSdkPackage, u as AnthropicSdkConnectorSubjects } from "./package-
|
|
2
|
+
import { a as AnthropicSdkAdapterName, c as AnthropicSdkAgent, d as ANTHROPIC_SDK_NAMESPACE, i as AnthropicSdkConnector, l as AnthropicSdkConnectorNamespace, n as AnthropicSdkAdapter, o as AnthropicSdkSession, r as createAnthropicSdkAdapter, s as AnthropicSdkConnectorTurn, t as anthropicSdkPackage, u as AnthropicSdkConnectorSubjects } from "./package-CYLUpLS-.mjs";
|
|
3
3
|
import { UserMessageQueue } from "@makaio/framework/adapters";
|
|
4
4
|
|
|
5
5
|
export { ANTHROPIC_SDK_NAMESPACE, AnthropicSdkAdapter, AnthropicSdkAdapterName, AnthropicSdkAgent, AnthropicSdkConnector, AnthropicSdkConnectorNamespace, AnthropicSdkConnectorSubjects, AnthropicSdkConnectorTurn, AnthropicSdkSession, UserMessageQueue, anthropicSdkPackage, createAnthropicSdkAdapter };
|
|
@@ -1919,16 +1919,17 @@ const AnthropicSdkConfig = createAdapterConfigFactory(() => ({
|
|
|
1919
1919
|
* @example
|
|
1920
1920
|
* ```typescript
|
|
1921
1921
|
* // Using the class directly
|
|
1922
|
-
* const adapter = new AnthropicSdkAdapter();
|
|
1922
|
+
* const adapter = new AnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
1923
1923
|
* await adapter.init();
|
|
1924
1924
|
*
|
|
1925
1925
|
* // Using the convenience factory
|
|
1926
|
-
* const adapter = await createAnthropicSdkAdapter();
|
|
1926
|
+
* const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
1927
1927
|
* ```
|
|
1928
1928
|
*/
|
|
1929
1929
|
var AnthropicSdkAdapter = class extends AIAdapter {
|
|
1930
1930
|
constructor(config) {
|
|
1931
1931
|
super({
|
|
1932
|
+
...config,
|
|
1932
1933
|
name: AnthropicSdkAdapterName,
|
|
1933
1934
|
capabilities: [
|
|
1934
1935
|
"tools",
|
|
@@ -1937,14 +1938,14 @@ var AnthropicSdkAdapter = class extends AIAdapter {
|
|
|
1937
1938
|
"systemPrompt:append",
|
|
1938
1939
|
"structuredOutput"
|
|
1939
1940
|
],
|
|
1940
|
-
|
|
1941
|
+
nativeTools: [],
|
|
1941
1942
|
namespace: AnthropicSdkConnectorNamespace,
|
|
1942
1943
|
agentFactory: (agentConfig) => {
|
|
1943
1944
|
return new AnthropicSdkAgent(agentConfig);
|
|
1944
1945
|
},
|
|
1945
1946
|
configFactory: AnthropicSdkConfig.getConfig,
|
|
1946
1947
|
connectorFactory: (fullConfig) => new AnthropicSdkConnector(fullConfig),
|
|
1947
|
-
definitionProviders: config
|
|
1948
|
+
definitionProviders: config.definitionProviders
|
|
1948
1949
|
});
|
|
1949
1950
|
}
|
|
1950
1951
|
};
|
|
@@ -1952,11 +1953,11 @@ var AnthropicSdkAdapter = class extends AIAdapter {
|
|
|
1952
1953
|
* Factory function to create and initialize an Anthropic SDK adapter.
|
|
1953
1954
|
*
|
|
1954
1955
|
* Convenience wrapper that creates the adapter and calls init() for you.
|
|
1955
|
-
* @param config -
|
|
1956
|
+
* @param config - Runtime configuration, including the owning authority.
|
|
1956
1957
|
* @returns Initialized AnthropicSdkAdapter instance
|
|
1957
1958
|
* @example
|
|
1958
1959
|
* ```typescript
|
|
1959
|
-
* const adapter = await createAnthropicSdkAdapter();
|
|
1960
|
+
* const adapter = await createAnthropicSdkAdapter({ machineId: 'runtime-machine', ownerInstanceId: 'runtime-owner' });
|
|
1960
1961
|
*
|
|
1961
1962
|
* // Adapter is ready to handle requests via bus
|
|
1962
1963
|
* // e.g., MakaioBus.request(AdapterSubjects.startAgent, { adapterId: adapter.adapterId, ... })
|
package/dist/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import { t as anthropicSdkPackage } from "./package-
|
|
2
|
+
import { t as anthropicSdkPackage } from "./package-CYLUpLS-.mjs";
|
|
3
3
|
|
|
4
4
|
export { anthropicSdkPackage as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makaio/adapter-anthropic-sdk",
|
|
3
3
|
"description": "Anthropic SDK adapter using the official @anthropic-ai/sdk streaming API.",
|
|
4
|
-
"version": "1.0.0-dev-
|
|
4
|
+
"version": "1.0.0-dev-1789404058608",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|