offrouter-adapter-claude 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +27 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # offrouter-adapter-claude
2
+
3
+ Claude Code adapter for OffRouter. Installs into a Claude Code profile as a `UserPromptSubmit` hook with automatic rollback support.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install offrouter-adapter-claude
9
+ ```
10
+
11
+ Then register with the CLI:
12
+
13
+ ```bash
14
+ offrouter install claude --profile claude-personal
15
+ ```
16
+
17
+ This writes the hook config into the profile's `~/.claude/claude-personal.json` and creates a rollback backup.
18
+
19
+ ### How it works
20
+
21
+ OffRouter intercepts every `UserPromptSubmit` event, evaluates routing policy, and either routes to the selected provider or lets the Claude Code primary model handle it. The primary model is unchanged in V1 — OffRouter only routes delegated sub-tasks.
22
+
23
+ ## Links
24
+
25
+ - [offrouter.com](https://offrouter.com)
26
+ - [GitHub](https://github.com/pooriaarab/offrouter)
27
+ - [Docs](https://offrouter.com/docs/quickstart.html)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "offrouter-adapter-claude",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "test": "vitest run --root ../.. packages/adapter-claude/src"
10
10
  },
11
11
  "dependencies": {
12
- "offrouter-core": "0.3.0",
12
+ "offrouter-core": "0.4.0",
13
13
  "zod": "^3.23.0"
14
14
  },
15
15
  "files": [