deft-bridge 0.0.0-stage → 0.3.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 +21 -0
- package/README.md +71 -2
- package/dist/bridge.js +33461 -0
- package/dist/graphs/acp-anthropic.json +187 -0
- package/dist/graphs/acp-claude-sdk.json +149 -0
- package/dist/graphs/acp-codex-app-server.json +182 -0
- package/dist/graphs/acp-grok.json +179 -0
- package/dist/graphs/acp-ideal.json +34 -0
- package/dist/graphs/acp-openai.json +203 -0
- package/dist/graphs/acp-pi.json +45 -0
- package/dist/graphs/acp-proxy.json +87 -0
- package/dist/graphs/mcp.json +73 -0
- package/dist/graphs/pi-anthropic.json +176 -0
- package/dist/graphs/pi-grok.json +168 -0
- package/dist/graphs/pi-openai.json +180 -0
- package/package.json +65 -3
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,72 @@
|
|
|
1
|
-
#
|
|
1
|
+
# deft-bridge
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
npx -y deft-bridge --backend codex-app-server
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The package installs the command under two names, `bridge` and `deft-bridge` (the same file), so `npx deft-bridge` finds it.
|
|
24
|
+
|
|
25
|
+
To install from a checkout instead, build a tarball:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm install
|
|
29
|
+
pnpm --filter deft-bridge pack # bundles and writes ./deft-bridge-<version>.tgz
|
|
30
|
+
npm install -g ./deft-bridge-*.tgz
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then, for example, add it to Claude Code as an MCP server:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
claude mcp add bridge -- bridge mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
## How the package is built
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
`pnpm --filter deft-bridge run bundle` rebuilds the bundle without packing.
|
|
46
|
+
|
|
47
|
+
## Versions and releases
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
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:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
mkdir /tmp/db-audit && cd /tmp/db-audit && npm init -y >/dev/null
|
|
55
|
+
npm install --package-lock-only /path/to/deft-bridge-<version>.tgz
|
|
56
|
+
npm audit --omit=dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Publishing
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cd packages/deft-bridge
|
|
65
|
+
pnpm pack # optional: inspect deft-bridge-<version>.tgz first
|
|
66
|
+
npm login # once; or check with npm whoami
|
|
67
|
+
pnpm publish --access public # add --no-git-checks to publish from a branch other than main
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Notes
|
|
71
|
+
|
|
72
|
+
The `ideal prompt-preview` developer command reads files from the repo's `examples/` folder, so it works only from a checkout.
|