deft-bridge 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Deft Systems
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
- # Temporary Holding Version
1
+ # deft-bridge
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The `bridge` command, packaged for npm.
4
+
5
+ - `bridge` runs Bridge as an ACP agent server (stdio by default; HTTP and Pi RPC via config). See the [Bridge README](https://github.com/deftai/bridge#readme).
6
+ - `bridge mcp` runs Bridge as an MCP server, so an MCP host (Claude Code, Cursor, Codex, Zed, …) can start ACP agents, prompt them, and answer their permission requests. See [`packages/mcp-front`](https://github.com/deftai/bridge/tree/main/packages/mcp-front#readme).
7
+
8
+ It needs Node.js 22.19 or later.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install -g deft-bridge
14
+ ```
15
+
16
+ Or run it without installing, as an ACP client such as Toad would:
17
+
18
+ ```bash
19
+ npx -y deft-bridge --backend claude-sdk
20
+ ```
21
+
22
+ The package installs the command under two names, `bridge` and `deft-bridge` (the same file), so `npx deft-bridge` finds it.
23
+
24
+ To install from a checkout instead, build a tarball:
25
+
26
+ ```bash
27
+ pnpm install
28
+ pnpm --filter deft-bridge pack # bundles and writes ./deft-bridge-<version>.tgz
29
+ npm install -g ./deft-bridge-*.tgz
30
+ ```
31
+
32
+ Then, for example, add it to Claude Code as an MCP server:
33
+
34
+ ```bash
35
+ claude mcp add bridge -- bridge mcp
36
+ ```
37
+
38
+ npm may say it skipped install scripts for `rete`, `protobufjs`, or `@google/genai`. Bridge does not need them: `rete`'s prints a banner, `protobufjs`'s checks how other packages name its version, and `@google/genai`'s does nothing.
39
+
40
+ ## How the package is built
41
+
42
+ Bridge's workspace packages (`@bridge/*`) are not published, so `scripts/bundle.mjs` bundles their TypeScript sources into `dist/bridge.js` with esbuild, so it needs no workspace build. Every other package stays a normal npm dependency. The script fails if an imported package is missing from `dependencies` here, or if its version range differs from the workspace packages that use it (which must also agree with each other); `src/package.test.ts` checks the same without building. `src/bundle.test.ts` builds the bundle in CI and checks that `bridge` and `bridge mcp` both answer `initialize`. Reducer rules come with the `tokenjuice` dependency.
43
+
44
+ `pnpm --filter deft-bridge run bundle` rebuilds the bundle without packing.
45
+
46
+ ## Versions and releases
47
+
48
+ Every `package.json` in the repo, `BRIDGE_VERSION` in `@bridge/core`, and `SERVER_VERSION` in `@bridge/mcp-front` carry the same version; `src/package.test.ts` fails if they differ.
49
+
50
+ The repo's pnpm overrides (in `pnpm-workspace.yaml`) do not reach people who install from npm, and npm ignores a package's own `overrides` on `npm install -g`, so they cannot be carried in this package either. Before publishing, check the tree a fresh install gets:
51
+
52
+ ```bash
53
+ mkdir /tmp/db-audit && cd /tmp/db-audit && npm init -y >/dev/null
54
+ npm install --package-lock-only /path/to/deft-bridge-<version>.tgz
55
+ npm audit --omit=dev
56
+ ```
57
+
58
+ ### Publishing
59
+
60
+ Publish with pnpm, from this folder. pnpm runs `prepack` (the bundle) and rewrites the `workspace:*` dev dependency on `@bridge/cli`; npm would publish it as written.
61
+
62
+ ```bash
63
+ cd packages/deft-bridge
64
+ pnpm pack # optional: inspect deft-bridge-<version>.tgz first
65
+ npm login # once; or check with npm whoami
66
+ pnpm publish --access public # add --no-git-checks to publish from a branch other than main
67
+ ```
68
+
69
+ ## Notes
70
+
71
+ The `ideal prompt-preview` developer command reads files from the repo's `examples/` folder, so it works only from a checkout.