marona 0.5.1 → 0.6.0
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/CHANGELOG.md +13 -0
- package/README.md +106 -117
- package/dist/index.d.ts +98 -85
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +249 -85
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
- Return a provider-neutral MCP connection from `hub.connect()`.
|
|
6
|
+
- Add `responses.create()` for the Marona-managed model and governed tool loop.
|
|
7
|
+
- Expose `listTools()`, `callTool()`, `serverUrl`, and `session` for external agent adapters.
|
|
8
|
+
- Remove legacy client, message, sync, pairing, identity-token, Skill-builder, and vendor-tool exports.
|
|
9
|
+
- Remove global model selection; choose the model per response request.
|
|
10
|
+
|
|
11
|
+
## 0.5.2
|
|
12
|
+
|
|
13
|
+
- Let the model select lightweight Skill and App functions before Marona reveals one exact capability schema.
|
|
14
|
+
- Keep local capability routing model-led without exposing the complete MCP catalog.
|
|
15
|
+
|
|
3
16
|
## 0.5.1
|
|
4
17
|
|
|
5
18
|
- Keep the TypeScript release aligned with the unified runtime patch release.
|
package/README.md
CHANGED
|
@@ -1,94 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Marona TypeScript SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Provider-neutral AI runtime and MCP/Skill gateway for Marona Hub connections,
|
|
4
|
+
managed responses, and bring-your-own-agent integrations.
|
|
4
5
|
|
|
5
6
|
```bash
|
|
6
7
|
npm install marona
|
|
7
8
|
```
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
request, and `input` contains the user's request. Apps, Skills, discovery,
|
|
11
|
-
identity, permissions, approvals, service connections, and MCP execution remain
|
|
12
|
-
inside Marona.
|
|
10
|
+
## 1. Marona Hub
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`MARONA_API_KEY` authenticates your application with Marona. Configure only the
|
|
17
|
-
model providers you use: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`,
|
|
18
|
-
`GEMINI_API_KEY`, `LITELLM_API_BASE`, `LITELLM_API_KEY`, or
|
|
19
|
-
`OLLAMA_API_BASE`.
|
|
12
|
+
Connect Apps and governed Skills as one neutral MCP tool collection.
|
|
20
13
|
|
|
21
14
|
```ts
|
|
22
15
|
import { Marona } from "marona";
|
|
23
16
|
|
|
24
|
-
const identityToken = process.env.MARONA_IDENTITY_TOKEN;
|
|
25
17
|
const marona = new Marona({
|
|
26
18
|
apiKey: process.env.MARONA_API_KEY,
|
|
27
|
-
mode: "online",
|
|
28
19
|
});
|
|
29
20
|
|
|
30
|
-
await marona.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
model: "marona/default",
|
|
34
|
-
input: [{ role: "user", content: "What is my group fund?" }],
|
|
35
|
-
interfaceName: "web",
|
|
36
|
-
identityToken,
|
|
21
|
+
const connection = await marona.hub.connect({
|
|
22
|
+
apps: ["sda-books"],
|
|
23
|
+
skills: ["download-book"],
|
|
37
24
|
});
|
|
38
25
|
|
|
39
|
-
|
|
26
|
+
const tools = connection.listTools();
|
|
27
|
+
const result = await connection.callTool("skill__download_book", {
|
|
28
|
+
request: "Download Steps to Christ",
|
|
29
|
+
});
|
|
40
30
|
```
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
`MCPConnection` is not tied to OpenAI, LangGraph, CrewAI, or another model
|
|
33
|
+
vendor. It exposes:
|
|
43
34
|
|
|
44
35
|
```ts
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
role: "user",
|
|
51
|
-
content: [
|
|
52
|
-
{ type: "input_text", text: "Compare the image and report." },
|
|
53
|
-
{ type: "input_image", image_url: "https://example.com/match.jpg" },
|
|
54
|
-
{
|
|
55
|
-
type: "input_file",
|
|
56
|
-
filename: "report.pdf",
|
|
57
|
-
file_data: "data:application/pdf;base64,...",
|
|
58
|
-
detail: "high",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
interfaceName: "web",
|
|
64
|
-
identityToken,
|
|
65
|
-
});
|
|
36
|
+
connection.listTools();
|
|
37
|
+
await connection.callTool(name, argumentsValue);
|
|
38
|
+
connection.serverUrl;
|
|
39
|
+
connection.serverUrls;
|
|
40
|
+
connection.session;
|
|
66
41
|
```
|
|
67
42
|
|
|
68
|
-
|
|
43
|
+
Marona Hub owns discovery, identity, permissions, App and Skill resolution,
|
|
44
|
+
approvals, governed execution, and online, offline, or hybrid availability.
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
## 2. Marona Runtime
|
|
47
|
+
|
|
48
|
+
Use `responses.create(...)` when Marona should manage model reasoning, tool
|
|
49
|
+
selection, permission and approval checks, execution, and the final response.
|
|
71
50
|
|
|
72
51
|
```ts
|
|
73
|
-
"marona
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
52
|
+
import { Marona } from "marona";
|
|
53
|
+
|
|
54
|
+
const marona = new Marona({
|
|
55
|
+
apiKey: process.env.MARONA_API_KEY,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const tools = await marona.hub.connect({
|
|
59
|
+
apps: ["sda-books"],
|
|
60
|
+
skills: ["download-book"],
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const response = await marona.responses.create({
|
|
64
|
+
model: "gpt-5.6",
|
|
65
|
+
tools,
|
|
66
|
+
input: "Download Steps to Christ",
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
console.log(response.outputText);
|
|
81
70
|
```
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
in-process model:
|
|
72
|
+
The same request supports managed, direct-provider, private, and local models:
|
|
85
73
|
|
|
86
74
|
```ts
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
model: "gpt-5.6" // Marona-managed model
|
|
76
|
+
model: "openai/gpt-5.6"
|
|
77
|
+
model: "anthropic/claude-sonnet"
|
|
78
|
+
model: "google/gemini"
|
|
79
|
+
model: "ollama/qwen3"
|
|
80
|
+
model: "litellm/local-qwen"
|
|
81
|
+
model: "local/qwen"
|
|
82
|
+
```
|
|
91
83
|
|
|
84
|
+
Register only custom providers or downloaded in-process models:
|
|
85
|
+
|
|
86
|
+
```ts
|
|
92
87
|
await marona.models.register({
|
|
93
88
|
name: "office/company-assistant",
|
|
94
89
|
provider: "custom",
|
|
@@ -99,81 +94,75 @@ await marona.models.register({
|
|
|
99
94
|
});
|
|
100
95
|
|
|
101
96
|
await marona.models.register({
|
|
102
|
-
name: "local/
|
|
103
|
-
executor:
|
|
104
|
-
contextWindow:
|
|
105
|
-
maxOutputTokens:
|
|
97
|
+
name: "local/qwen",
|
|
98
|
+
executor: qwenExecutor,
|
|
99
|
+
contextWindow: 8192,
|
|
100
|
+
maxOutputTokens: 512,
|
|
106
101
|
});
|
|
107
102
|
```
|
|
108
103
|
|
|
109
|
-
|
|
110
|
-
`message(...)`. `models.use(...)` is deprecated.
|
|
111
|
-
|
|
112
|
-
## Marona Tools In Any Agent
|
|
104
|
+
### Images And Documents
|
|
113
105
|
|
|
114
106
|
```ts
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
107
|
+
const response = await marona.responses.create({
|
|
108
|
+
model: "openai/gpt-5.6",
|
|
109
|
+
input: [
|
|
110
|
+
{
|
|
111
|
+
role: "user",
|
|
112
|
+
content: [
|
|
113
|
+
{ type: "input_text", text: "Summarize this document and image." },
|
|
114
|
+
{ type: "input_image", image_url: "https://example.com/image.jpg" },
|
|
115
|
+
{
|
|
116
|
+
type: "input_file",
|
|
117
|
+
filename: "report.pdf",
|
|
118
|
+
file_data: "data:application/pdf;base64,...",
|
|
119
|
+
detail: "high",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
124
|
});
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
approves, with `{ request: "Yes", approved: true }`.
|
|
129
|
-
|
|
130
|
-
App tools execute their MCP target. Skill tools execute through Marona's
|
|
131
|
-
governed runtime. Internal Skill steps and Skill-managed raw capabilities are
|
|
132
|
-
not exported.
|
|
127
|
+
## 3. Bring Your Own Agent
|
|
133
128
|
|
|
134
|
-
|
|
129
|
+
The external framework owns its Agent, reasoning, and orchestration. Marona
|
|
130
|
+
supplies neutral MCP tools and retains authorization, approvals, and execution.
|
|
135
131
|
|
|
136
132
|
```ts
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
id: "understand-request",
|
|
141
|
-
type: "reasoning",
|
|
142
|
-
instruction: "Extract the group name and currency.",
|
|
143
|
-
inputs: { message: "{{ context.user_message }}" },
|
|
144
|
-
outputs: { name: "string", currency: "string" },
|
|
145
|
-
});
|
|
146
|
-
const permission = step({
|
|
147
|
-
id: "confirm-create",
|
|
148
|
-
type: "approval",
|
|
149
|
-
message: `Create '${request.output("name")}' in ${request.output("currency")}?`,
|
|
150
|
-
outputs: { approved: "boolean" },
|
|
151
|
-
});
|
|
152
|
-
const create = step({
|
|
153
|
-
id: "create-group",
|
|
154
|
-
type: "app",
|
|
155
|
-
app: "group-fund",
|
|
156
|
-
capability: "group-fund.create_group",
|
|
157
|
-
instruction: "Create the approved group.",
|
|
158
|
-
condition: permission.output("approved"),
|
|
159
|
-
inputs: { name: request.output("name"), currency: request.output("currency") },
|
|
160
|
-
outputs: { group_id: "string", name: "string" },
|
|
133
|
+
const connection = await marona.hub.connect({
|
|
134
|
+
apps: ["sda-books"],
|
|
135
|
+
skills: ["download-book"],
|
|
161
136
|
});
|
|
162
137
|
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
138
|
+
const frameworkTools = yourFrameworkMcpAdapter(connection);
|
|
139
|
+
|
|
140
|
+
const agent = new YourAgent({
|
|
141
|
+
name: "Book Assistant",
|
|
142
|
+
model: "gpt-5.6",
|
|
143
|
+
instructions: "Help users find and download books.",
|
|
144
|
+
tools: frameworkTools,
|
|
168
145
|
});
|
|
169
146
|
|
|
170
|
-
await
|
|
147
|
+
const result = await agent.run("Download Steps to Christ");
|
|
171
148
|
```
|
|
172
149
|
|
|
173
|
-
|
|
150
|
+
An MCP-compatible framework can map its standard list-tools and call-tool hooks
|
|
151
|
+
directly to `connection.listTools()` and `connection.callTool(...)`. One
|
|
152
|
+
JavaScript object cannot automatically satisfy every framework's proprietary
|
|
153
|
+
tool interface, so any framework-specific conversion belongs at that boundary.
|
|
154
|
+
|
|
155
|
+
## Execution Modes
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
const marona = new Marona({
|
|
159
|
+
apiKey: process.env.MARONA_API_KEY,
|
|
160
|
+
mode: "hybrid",
|
|
161
|
+
});
|
|
162
|
+
```
|
|
174
163
|
|
|
175
164
|
- `online`: network models and online MCP targets are allowed.
|
|
176
|
-
- `hybrid`:
|
|
177
|
-
- `offline`:
|
|
165
|
+
- `hybrid`: local/private execution may fall back to online execution.
|
|
166
|
+
- `offline`: only installed local Apps, Skills, data, and local models run.
|
|
178
167
|
|
|
179
168
|
Changing `model` never changes App, Skill, permission, approval, or MCP rules.
|