@artinet/cruiser 0.1.2 → 0.1.5

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 CHANGED
@@ -18,18 +18,18 @@ Universal adapters for multi-agent interoperability.
18
18
 
19
19
  ### Supported Frameworks
20
20
 
21
- | Framework | Import Path | Status |
22
- | -------------------- | ---------------------------- | ------------------------ |
23
- | **OpenAI Agents** | `@artinet/cruiser/openai` | Text ✅ Files ⚠️ Data ⚠️ |
24
- | **Mastra** | `@artinet/cruiser/mastra` | Text ✅ Files ⚠️ Data ⚠️ |
25
- | **Claude Agent SDK** | `@artinet/cruiser/claude` | Text ✅ Files ⚠️ Data ⚠️ |
26
- | **LangChain** | `@artinet/cruiser/langchain` | Text ✅ Files ⚠️ Data ⚠️ |
27
- | **Strands (AWS)** | `@artinet/cruiser/strands` | Text ✅ Files ⚠️ Data ⚠️ |
21
+ | Framework | Import Path | Status |
22
+ | -------------------- | ---------------------------- | ------- |
23
+ | **OpenAI Agents** | `@artinet/cruiser/openai` | Text ✅ |
24
+ | **Mastra** | `@artinet/cruiser/mastra` | Text ✅ |
25
+ | **Claude Agent SDK** | `@artinet/cruiser/claude` | Text ✅ |
26
+ | **LangChain** | `@artinet/cruiser/langchain` | Text ✅ |
27
+ | **Strands (AWS)** | `@artinet/cruiser/strands` | Text ✅ |
28
28
 
29
29
  ## Installation
30
30
 
31
31
  ```bash
32
- npm install @artinet/cruiser @artinet/sdk
32
+ npm install @artinet/cruiser @artinet/sdk @modelcontextprotocol/sdk @a2a-js/sdk
33
33
  ```
34
34
 
35
35
  Install your preferred agent framework:
@@ -55,7 +55,7 @@ npm install @strands-agents/sdk
55
55
 
56
56
  ### Single Agent
57
57
 
58
- Create an agent from any of the supported frameworks and dock it on artinet:
58
+ Create an agent from any of the supported frameworks and dock it onto artinet:
59
59
 
60
60
  ```typescript
61
61
  import { Agent } from "@openai/agents";
@@ -75,7 +75,9 @@ const artinetAgent = await dock(agent, { name: "My Assistant" });
75
75
  serve({ agent: artinetAgent, port: 3000 });
76
76
  ```
77
77
 
78
- ### Multi-Agent System
78
+ ### Multi-Agent Systems
79
+
80
+ > _Experimental_
79
81
 
80
82
  Create interoperable multi-agent systems:
81
83
 
@@ -101,12 +103,12 @@ const writer = await dockMastra(
101
103
  // Chain them together
102
104
  const agent = cr8("Orchestrator Agent")
103
105
  // The researcher will receive the incoming user message
104
- .sendMessage(researcher)
106
+ .sendMessage({ agent: researcher })
105
107
  // The results are passed to the writer with additional instructions
106
- .sendMessage(
107
- writer,
108
- "use the research results to create a publishable article"
109
- ).agent;
108
+ .sendMessage({
109
+ agent: writer,
110
+ message: "use the research results to create a publishable article",
111
+ }).agent;
110
112
 
111
113
  console.log(await agent.sendMessage("I want to learn about the Roman Empire."));
112
114
  ```
package/dist/corsair.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * ## Naming Convention
11
11
  *
12
12
  * - **Dock**: The adapter function that transforms a framework-specific agent
13
- * into an {@link sdk.Agent | artinet-compatible agent}
13
+ * into an {@link sdk.Agent}
14
14
  * - **Corsair**: The module containing the core type definitions (cruiser's helm)
15
15
  *
16
16
  * @example
@@ -30,7 +30,7 @@ import type * as sdk from "@artinet/sdk";
30
30
  *
31
31
  * All Cruiser adapters implement this interface to ensure consistent behavior
32
32
  * across different agent frameworks. The dock function transforms a framework-
33
- * specific agent into an {@link sdk.Agent | A2A-compatible agent} that can be deployed on Artinet.
33
+ * specific agent into an {@link sdk.Agent} that can be deployed on Artinet.
34
34
  *
35
35
  * @typeParam TAgent - The framework-specific agent type (e.g., {@link OpenAIAgent}, {@link MastraAgent})
36
36
  * @typeParam TOptions - Optional configuration type for the adapter (defaults to unknown)
@@ -72,7 +72,7 @@ export type Dock<TAgent, TOptions = unknown> = (agent: TAgent, card?: sdk.A2A.Ag
72
72
  *
73
73
  * All Cruiser adapters implement this interface to ensure consistent behavior
74
74
  * across different agent frameworks. The dock function transforms a framework-
75
- * specific agent into an {@link sdk.Agent | A2A-compatible agent} that can be deployed on Artinet.
75
+ * specific agent into an {@link sdk.Agent} that can be deployed on Artinet.
76
76
  *
77
77
  * @typeParam TAgent - The framework-specific agent type (e.g., {@link OpenAIAgent}, {@link MastraAgent})
78
78
  * @typeParam TOptions - Optional configuration type for the adapter (defaults to unknown)
package/dist/corsair.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * ## Naming Convention
11
11
  *
12
12
  * - **Dock**: The adapter function that transforms a framework-specific agent
13
- * into an {@link sdk.Agent | artinet-compatible agent}
13
+ * into an {@link sdk.Agent}
14
14
  * - **Corsair**: The module containing the core type definitions (cruiser's helm)
15
15
  *
16
16
  * @example
@@ -109,12 +109,13 @@ export const dock = async (agent, card, options) => {
109
109
  ...result,
110
110
  },
111
111
  };
112
- yield sdk.describe.update.completed({
112
+ const completedUpdate = sdk.describe.update.completed({
113
113
  taskId: task.id,
114
114
  contextId: task.contextId,
115
115
  message: responseMessage,
116
116
  metadata,
117
117
  });
118
+ yield completedUpdate;
118
119
  });
119
120
  };
120
121
  /**
@@ -180,7 +180,7 @@ export function extractA2AMessage(taskId, contextId, result, _agent) {
180
180
  if (typeof message.content === "string") {
181
181
  parts.push(sdk.describe.part.text(message.content));
182
182
  }
183
- else {
183
+ else if (message.type === "ai") {
184
184
  /**Pop the last block which belongs to the assistant */
185
185
  const block = message.content.pop();
186
186
  if (block && block.type === "text") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artinet/cruiser",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "A library for building A2A enabled runtime Agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -50,8 +50,8 @@
50
50
  "clean": "rimraf dist",
51
51
  "rebuild": "rimraf dist node_modules/ package-lock.json && npm i && npm run build",
52
52
  "lint": "eslint src --ext .ts",
53
- "package-test": "npm run build && npm pack && sync && sleep 1 && docker build --no-cache -f ./deployment/test.dockerfile -t cruiser-test . && docker run --env-file .env --rm cruiser-test && rm artinet-cruiser-*.tgz",
54
- "prepublishOnly": "npm run package-test && rimraf dist && npm run build && npm run lint && npm test",
53
+ "package-test": "npm run build && npm pack && sync && sleep 1 && docker build -f ./deployment/test.dockerfile -t cruiser-test . && docker run --env-file .env --rm cruiser-test && rm artinet-cruiser-*.tgz",
54
+ "prepublishOnly": "rimraf dist && npm run build && npm run lint && npm test",
55
55
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
56
56
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
57
57
  "test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage"
@@ -80,21 +80,21 @@
80
80
  },
81
81
  "homepage": "https://artinet.io",
82
82
  "dependencies": {
83
- "@artinet/sdk": "^0.6.2",
84
- "@artinet/types": "^0.0.9",
83
+ "@artinet/sdk": "^0.6.4",
84
+ "@artinet/types": "^0.1.4",
85
85
  "uuid": "^13.0.0"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@a2a-js/sdk": "^0.3.7",
89
- "express": "^5.1.0",
90
- "@modelcontextprotocol/sdk": "^1.24.3",
91
- "openai": "^6.15.0",
92
- "langchain": "^1.2.7",
89
+ "@anthropic-ai/claude-agent-sdk": "^0.2.2",
90
+ "@anthropic-ai/sdk": "^0.71.2",
93
91
  "@mastra/core": "^0.24.9",
94
92
  "@mastra/server": "^0.24.9",
93
+ "@modelcontextprotocol/sdk": "^1.24.3",
95
94
  "@strands-agents/sdk": "^0.1.4",
96
- "@anthropic-ai/claude-agent-sdk": "^0.2.2",
97
- "@anthropic-ai/sdk": "^0.71.2"
95
+ "express": "^5.1.0",
96
+ "langchain": "^1.2.7",
97
+ "openai": "^6.15.0"
98
98
  },
99
99
  "peerDependenciesMeta": {
100
100
  "@a2a-js/sdk": {
@@ -108,33 +108,33 @@
108
108
  }
109
109
  },
110
110
  "devDependencies": {
111
+ "@openrouter/ai-sdk-provider": "^1.5.4",
111
112
  "@a2a-js/sdk": "^0.3.7",
112
- "@ai-sdk/openai": "^2.0.53",
113
113
  "@anthropic-ai/claude-agent-sdk": "^0.2.2",
114
114
  "@anthropic-ai/sdk": "^0.71.2",
115
- "@eslint/js": "^9.25.1",
115
+ "@eslint/js": "^9.39.2",
116
116
  "@langchain/openai": "^1.2.1",
117
117
  "@mastra/core": "^0.24.9",
118
- "@mastra/server": "^0.24.9",
118
+ "@mastra/server": "^2.0.4",
119
119
  "@openai/agents": "^0.3.7",
120
120
  "@strands-agents/sdk": "^0.1.4",
121
- "@types/jest": "^30.0.0",
122
- "@types/node": "^25.0.3",
123
- "@types/uuid": "^11.0.0",
124
- "ai": "^4.3.19",
125
- "eslint": "^9.25.1",
121
+ "@types/jest": "^29.5.14",
122
+ "@types/node": "^25.0.9",
123
+ "@types/uuid": "^10.0.0",
124
+ "ai": "^5.0.10",
125
+ "eslint": "^9.39.2",
126
126
  "globals": "^17.0.0",
127
- "jest": "^30.2.0",
128
- "langchain": "^1.2.7",
127
+ "jest": "29.7.0",
128
+ "langchain": "^1.2.10",
129
129
  "rimraf": "^6.1.2",
130
- "ts-jest": "^29.3.2",
131
- "ts-node": "^10.9.1",
132
- "tsx": "^4.20.4",
133
- "typescript": "^5.2.2",
134
- "typescript-eslint": "^8.31.0"
130
+ "ts-jest": "^29.4.6",
131
+ "ts-node": "^10.9.2",
132
+ "tsx": "^4.21.0",
133
+ "typescript": "^5.9.3",
134
+ "typescript-eslint": "^8.53.0"
135
135
  },
136
136
  "engines": {
137
- "node": ">=18.9.1"
137
+ "node": ">=20.0.0"
138
138
  },
139
139
  "directories": {
140
140
  "test": "tests"