@invarn/cli 0.2.0 → 0.2.1

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/dist/sdk.d.mts ADDED
@@ -0,0 +1,36 @@
1
+ import type { McpSdkServerConfigWithInstance } from '@anthropic-ai/claude-agent-sdk';
2
+
3
+ export interface CreateInvarnMcpServerOptions {
4
+ /**
5
+ * Invarn human API key (`inv_human_…`). When omitted, resolves from the
6
+ * `INVARN_TOKEN` env var, then the on-disk profile at
7
+ * `~/.config/invarn/config.json`. Factory throws at construction time if
8
+ * none of these yield a token.
9
+ */
10
+ token?: string;
11
+ /**
12
+ * API base URL. Defaults to the `INVARN_URL` env var or `https://invarn.com`.
13
+ * Override for self-hosted deployments.
14
+ */
15
+ baseUrl?: string;
16
+ /**
17
+ * Allowlist by tool name. Default: all 13 tools. See the package README
18
+ * for the full list of tool names.
19
+ */
20
+ tools?: string[];
21
+ /** Reported as the MCP server version. Defaults to the CLI version. */
22
+ version?: string;
23
+ }
24
+
25
+ /**
26
+ * Build an in-process MCP server exposing invarn's tools to the Claude
27
+ * Agent SDK. The returned object plugs straight into `mcpServers` on the
28
+ * agent's `query()` options.
29
+ *
30
+ * Responses are structured JSON (`JSON.stringify(result, null, 2)` in a
31
+ * single text block) so the LLM parses fields reliably. The stdio CLI
32
+ * (`invarn mcp serve`) keeps its formatted prose for interactive use.
33
+ */
34
+ export function createInvarnMcpServer(
35
+ options?: CreateInvarnMcpServerOptions,
36
+ ): McpSdkServerConfigWithInstance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invarn/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Invarn CLI — run builds, check artifacts, and ship from your terminal",
5
5
  "type": "module",
6
6
  "main": "dist/invarn.cjs",
@@ -9,11 +9,15 @@
9
9
  },
10
10
  "exports": {
11
11
  ".": "./dist/invarn.cjs",
12
- "./sdk": "./dist/sdk.mjs"
12
+ "./sdk": {
13
+ "types": "./dist/sdk.d.mts",
14
+ "default": "./dist/sdk.mjs"
15
+ }
13
16
  },
14
17
  "files": [
15
18
  "dist/invarn.cjs",
16
19
  "dist/sdk.mjs",
20
+ "dist/sdk.d.mts",
17
21
  "README.md"
18
22
  ],
19
23
  "scripts": {