@hopgoldy/agent-bridge 0.1.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/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # agent-bridge
2
+
3
+ `agent-bridge` connects IM channel (feishu, weixin, weicom...) to local coding agent (pi, codex, opencode...) using a dual-adapter architecture.
4
+
5
+ The design stays intentionally simple and compact: no harness layer, no extra tools, no extra skills, just forwarding messages from IM to the local agent.
6
+
7
+ ## Current support
8
+
9
+ Client side: `FeiShu`.
10
+
11
+ Agent side: `PI Coding Agent`.
12
+
13
+ The current built-in support is intentionally small, but the architecture is designed for straightforward horizontal extension. The project will primarily maintain the integrations used in practice today, and contributions for additional client or agent adapters are welcome through forks and PRs.
14
+
15
+ ## Quick Start
16
+
17
+ Install the CLI:
18
+
19
+ ```bash
20
+ npm install -g agent-bridge
21
+ ```
22
+
23
+ The CLI currently provides these commands:
24
+
25
+ - `agent-bridge add`
26
+ - `agent-bridge ls`
27
+ - `agent-bridge remove <channel-name>`
28
+ - `agent-bridge start <channel-name>`
29
+
30
+ Create a channel interactively:
31
+
32
+ ```bash
33
+ agent-bridge add
34
+ ```
35
+
36
+ The prompt flow currently asks for:
37
+
38
+ - channel name
39
+ - select client module type
40
+ - set client config...
41
+ - select agent module type
42
+ - set agent config...
43
+
44
+ Start the configured channel:
45
+
46
+ ```bash
47
+ agent-bridge start <channel-name>
48
+ ```
49
+
50
+ List configured channels:
51
+
52
+ ```bash
53
+ agent-bridge ls
54
+ ```
55
+
56
+ Remove a configured channel:
57
+
58
+ ```bash
59
+ agent-bridge remove <channel-name>
60
+ ```
61
+
62
+ Config file: `~/.config/agent-bridge/config.json`
63
+
64
+ ## Development
65
+
66
+ ```bash
67
+ npm install
68
+ npm run build
69
+ npm test
70
+ npm run dev -- --help
71
+ ```
72
+
73
+ ## Q&A
74
+
75
+ ### Why not implement this directly as a `pi-feishu`, `pi-wechat`, or similar plugin?
76
+
77
+ Because plugin-style integrations for Pi or similar local agents do not provide enough control over session lifecycle, channel behavior, and local runtime isolation.
78
+
79
+ In practice, this shows up in a few ways:
80
+
81
+ - It is hard to implement a real `/new` that cleanly resets the remote conversation while keeping channel-side routing predictable.
82
+ - Connecting the same local agent cleanly to multiple channels is much harder when each integration is embedded as a plugin inside the agent runtime.
83
+ - Different channels have very different behavior, and existing integrations are often maintained independently without a shared contract.
84
+ - The local development and runtime experience becomes much more invasive: starting Pi for normal local work can also start multiple channel-facing plugins and inject extra tools that are unrelated to the task at hand.
85
+
86
+ `agent-bridge` takes the opposite approach: keep the local agent runtime focused, keep channel integration outside the agent process, and make session routing explicit at the bridge layer.
87
+
88
+ ## License
89
+
90
+ MIT.