@artinet/cruiser 0.1.1 → 0.1.2
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 +23 -25
- package/dist/claude/index.d.ts +24 -16
- package/dist/claude/index.js +18 -14
- package/dist/corsair.d.ts +52 -10
- package/dist/corsair.js +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/langchain/index.d.ts +16 -12
- package/dist/langchain/index.js +16 -12
- package/dist/mastra/index.d.ts +16 -12
- package/dist/mastra/index.js +16 -12
- package/dist/openai/index.d.ts +23 -15
- package/dist/openai/index.js +17 -13
- package/dist/strands/index.d.ts +16 -12
- package/dist/strands/index.js +16 -12
- package/dist/volt/index.d.ts +1 -1
- package/dist/volt/index.js +1 -1
- package/package.json +1 -1
package/dist/strands/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @artinet/cruiser/strands
|
|
5
5
|
* @description
|
|
6
|
-
* This adapter "
|
|
6
|
+
* This adapter "docks" {@link StrandsAgent | Strands Agents} (from `@strands-agents/sdk`) into the
|
|
7
7
|
* artinet, enabling them to participate in multi-agent workflows.
|
|
8
8
|
* Strands is AWS's open-source agent framework with native Bedrock integration.
|
|
9
9
|
*
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
* ```typescript
|
|
27
27
|
* import { Agent } from "@strands-agents/sdk";
|
|
28
|
-
* import {
|
|
28
|
+
* import { dock } from "@artinet/cruiser/strands";
|
|
29
29
|
* import { serve } from "@artinet/sdk";
|
|
30
30
|
*
|
|
31
31
|
* const strandsAgent = new Agent({
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* systemPrompt: "You are a helpful assistant",
|
|
34
34
|
* });
|
|
35
35
|
*
|
|
36
|
-
* const artinetAgent = await
|
|
36
|
+
* const artinetAgent = await dock(strandsAgent, { name: "Strands Bot" });
|
|
37
37
|
* serve({agent: artinetAgent, port: 3000 });
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
import * as sdk from "@artinet/sdk";
|
|
43
43
|
import { getAgentCard, createStrandsMessage } from "./utils.js";
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Docks a {@link StrandsAgent} into artinet.
|
|
46
46
|
*
|
|
47
47
|
* Transforms a Strands Agent instance into an {@link sdk.Agent | A2A-compatible agent}
|
|
48
48
|
* that can be deployed on artinet.
|
|
49
49
|
*
|
|
50
|
-
* @param agent - The {@link StrandsAgent} to
|
|
50
|
+
* @param agent - The {@link StrandsAgent} to dock
|
|
51
51
|
* @param card - Optional {@link sdk.A2A.AgentCardParams} configuration to customize identity and capabilities
|
|
52
52
|
*
|
|
53
53
|
* @returns A Promise resolving to an {@link sdk.Agent} ready for deployment
|
|
54
54
|
*
|
|
55
55
|
* @example Basic Usage
|
|
56
56
|
* ```typescript
|
|
57
|
-
* import {
|
|
57
|
+
* import { dock } from "@artinet/cruiser/strands";
|
|
58
58
|
* import { Agent } from "@strands-agents/sdk";
|
|
59
59
|
*
|
|
60
60
|
* const agent = new Agent({
|
|
@@ -62,12 +62,12 @@ import { getAgentCard, createStrandsMessage } from "./utils.js";
|
|
|
62
62
|
* systemPrompt: "Be helpful and concise",
|
|
63
63
|
* });
|
|
64
64
|
*
|
|
65
|
-
* const artinetAgent = await
|
|
65
|
+
* const artinetAgent = await dock(agent, { name: "Quick Helper" });
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
68
|
* @example With Custom Tools
|
|
69
69
|
* ```typescript
|
|
70
|
-
* import {
|
|
70
|
+
* import { dock } from "@artinet/cruiser/strands";
|
|
71
71
|
* import { Agent, tool } from "@strands-agents/sdk";
|
|
72
72
|
*
|
|
73
73
|
* const agent = new Agent({
|
|
@@ -76,7 +76,7 @@ import { getAgentCard, createStrandsMessage } from "./utils.js";
|
|
|
76
76
|
* tools: [calculatorTool, converterTool],
|
|
77
77
|
* });
|
|
78
78
|
*
|
|
79
|
-
* const artinetAgent = await
|
|
79
|
+
* const artinetAgent = await dock(agent, {
|
|
80
80
|
* name: "Math Helper",
|
|
81
81
|
* description: "Calculator and unit conversion assistant",
|
|
82
82
|
* });
|
|
@@ -84,7 +84,7 @@ import { getAgentCard, createStrandsMessage } from "./utils.js";
|
|
|
84
84
|
*
|
|
85
85
|
* @example With AWS Bedrock Configuration
|
|
86
86
|
* ```typescript
|
|
87
|
-
* import {
|
|
87
|
+
* import { dock } from "@artinet/cruiser/strands";
|
|
88
88
|
* import { Agent } from "@strands-agents/sdk";
|
|
89
89
|
*
|
|
90
90
|
* const agent = new Agent({
|
|
@@ -93,10 +93,10 @@ import { getAgentCard, createStrandsMessage } from "./utils.js";
|
|
|
93
93
|
* region: "us-west-2",
|
|
94
94
|
* });
|
|
95
95
|
*
|
|
96
|
-
* const artinetAgent = await
|
|
96
|
+
* const artinetAgent = await dock(agent, { name: "Enterprise Bot" });
|
|
97
97
|
* ```
|
|
98
98
|
*/
|
|
99
|
-
export const
|
|
99
|
+
export const dock = async (agent, card) => {
|
|
100
100
|
const agentCard = await getAgentCard({ agent, card });
|
|
101
101
|
sdk.logger.debug(`Strands[${agentCard.name}]:[card:${JSON.stringify(agentCard)}]`);
|
|
102
102
|
return sdk.cr8(agentCard).from(async function* (context) {
|
|
@@ -139,3 +139,7 @@ export const park = async (agent, card) => {
|
|
|
139
139
|
yield completedUpdate;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Use {@link dock} instead.
|
|
144
|
+
*/
|
|
145
|
+
export const park = dock;
|
package/dist/volt/index.d.ts
CHANGED
package/dist/volt/index.js
CHANGED