@invarn/cli 0.1.8 → 0.2.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/README.md +39 -0
- package/dist/invarn.cjs +7 -7
- package/dist/sdk.mjs +9375 -0
- package/package.json +17 -2
package/README.md
CHANGED
|
@@ -153,6 +153,45 @@ invarn secrets rm STRIPE_KEY
|
|
|
153
153
|
|
|
154
154
|
There is no read command — once set, values cannot be retrieved through the CLI or MCP.
|
|
155
155
|
|
|
156
|
+
## In-process SDK (for agent hosts)
|
|
157
|
+
|
|
158
|
+
If you're embedding Claude in your own Node application via `@anthropic-ai/claude-agent-sdk`, skip the subprocess and register invarn as an in-process MCP server instead:
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
import { query } from '@anthropic-ai/claude-agent-sdk'
|
|
162
|
+
import { createInvarnMcpServer } from '@invarn/cli/sdk'
|
|
163
|
+
|
|
164
|
+
const invarn = createInvarnMcpServer({
|
|
165
|
+
token: process.env.INVARN_API_KEY, // or INVARN_TOKEN env / disk profile
|
|
166
|
+
tools: ['invarn_build_list', 'invarn_agent_run', 'invarn_agent_result'],
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
for await (const msg of query({
|
|
170
|
+
prompt: 'Build the iOS app and report status.',
|
|
171
|
+
options: {
|
|
172
|
+
mcpServers: { invarn },
|
|
173
|
+
allowedTools: [
|
|
174
|
+
'mcp__invarn__invarn_build_list',
|
|
175
|
+
'mcp__invarn__invarn_agent_run',
|
|
176
|
+
'mcp__invarn__invarn_agent_result',
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
})) { /* ... */ }
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Options**
|
|
183
|
+
|
|
184
|
+
| Option | Default | Notes |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| `token` | `process.env.INVARN_TOKEN` → disk profile | Invarn human API key (`inv_human_...`) |
|
|
187
|
+
| `baseUrl` | `process.env.INVARN_URL` → `https://invarn.com` | Override for self-hosted deployments |
|
|
188
|
+
| `tools` | all 13 | Allowlist by tool name. |
|
|
189
|
+
| `version` | CLI version | Reported as the MCP server version |
|
|
190
|
+
|
|
191
|
+
Responses from the SDK path are JSON (`JSON.stringify(result, null, 2)` in a single text block), not the formatted prose the stdio CLI emits — LLMs parse structured data more reliably. The stdio server (`invarn mcp serve`) is unchanged.
|
|
192
|
+
|
|
193
|
+
The Agent SDK is a **peer dependency**; the consuming host resolves its version.
|
|
194
|
+
|
|
156
195
|
## Requirements
|
|
157
196
|
|
|
158
197
|
- Node.js 22+
|