backeer-codex 0.2.1 → 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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backeer-codex",
3
- "version": "0.2.1",
4
- "description": "Approve Codex permission requests from Backeer and receive task lifecycle notifications.",
3
+ "version": "0.3.0",
4
+ "description": "Backeer approvals, lifecycle notifications and chat-scoped OpenCode connections.",
5
5
  "author": {
6
6
  "name": "Backeer"
7
7
  },
@@ -15,8 +15,8 @@
15
15
  "skills": "./skills/",
16
16
  "interface": {
17
17
  "displayName": "Backeer Codex",
18
- "shortDescription": "Remote Codex approvals and lifecycle alerts.",
19
- "longDescription": "Backeer Codex securely forwards approval requests and task completion events to Backeer without exposing source credentials to the iOS application.",
18
+ "shortDescription": "Approvals and OpenCode links",
19
+ "longDescription": "Keep Backeer approvals and notifications, and connect each Codex chat to an exact existing OpenCode session over an authenticated local SSH tunnel.",
20
20
  "developerName": "Backeer",
21
21
  "category": "Productivity",
22
22
  "capabilities": [
package/README.md CHANGED
@@ -11,6 +11,62 @@ It provides:
11
11
  - Optional failed-tool notifications (disabled by default).
12
12
  - `status`, `doctor`, `test`, and interactive token configuration commands.
13
13
  - Safe fallback to the normal Codex permission prompt when Backeer is unavailable or not configured.
14
+ - Saved OpenCode connections and an independent exact-session binding for each chat, with live SSE output.
15
+
16
+ ## OpenCode connection per chat
17
+
18
+ The bundled local MCP server uses the existing Backeer OpenCode bridge through
19
+ your existing SSH tunnel (Termius forwarding is supported). No extra hosted
20
+ server, public port or OpenAI API key is required. Install the **0.6.0 or newer**
21
+ bridge in the intended OpenCode project; legacy single-connection tools remain
22
+ compatible, but managed connections require its project verification metadata.
23
+
24
+ Configure each computer once using the existing protected **live-control** token
25
+ file, which is distinct from the mobile ingest credential:
26
+
27
+ ```sh
28
+ backeer-codex opencode add dev http://127.0.0.1:43871 /absolute/private/live-control.token /srv/project
29
+ backeer-codex opencode connections
30
+ backeer-codex opencode sessions dev
31
+ ```
32
+
33
+ Then tell Codex in a new chat: **“Connect this chat to dev, session ses_….”**
34
+ The tools validate the project and session, then return a unique binding for
35
+ that chat. Other chats can select different sessions without changing it. Each
36
+ binding has its own stream/cursor, including when multiple chats follow the same
37
+ session. Commands require that binding; no global default or automatic fallback
38
+ exists. Prompt delivery keeps the existing request-ID deduplication rules.
39
+
40
+ `mcp.json` registers `scripts/opencode-mcp.mjs` when the updated plugin is enabled.
41
+ Node must be available to the host. An alternative manual stdio command is
42
+ `backeer-codex opencode mcp`; do not register both copies unnecessarily. Profiles
43
+ default to `~/.config/backeer-codex/opencode-connections.json`; override with
44
+ `BACKEER_LIVE_PROFILES_FILE` or `BACKEER_CODEX_CONFIG_DIR`. Missing profiles do
45
+ not prevent MCP startup: `list_connections` returns an empty list. No token is
46
+ embedded in the package, MCP registration or chat. Existing approvals and mobile
47
+ notification settings are kept separate and unchanged.
48
+
49
+ SSE heartbeats keep hours-long quiet work connected. Transport failures retry
50
+ every three seconds indefinitely; a bounded tool wait ending does not stop SSE.
51
+ Disconnecting a binding releases its local resources without stopping OpenCode.
52
+ At most 16 local bindings can be open per MCP process. Bindings intentionally
53
+ live in memory: after restarting the app/MCP process, reconnect to the same
54
+ existing session. This does not restart its work. Replay gaps are explicit.
55
+
56
+ The plugin does not create SSH tunnels or change SSH permissions. Keep the saved
57
+ tunnel running; a dropped tunnel is handled by SSE reconnection once it returns.
58
+ On Windows, token ownership/ACL is checked using built-in PowerShell; allow only
59
+ the current owner, SYSTEM and Administrators. Local profiles and tunnel setup
60
+ are per device. A normal ChatGPT browser/mobile chat cannot run this local stdio
61
+ plugin without a compatible local executor.
62
+
63
+ ### Build the two source projects
64
+
65
+ Keep the sibling `opencode-plugin` checkout beside `backeer-codex`, then run
66
+ `npm ci`, `npm run check`, and `npm test` in this directory. `npm pack` bundles
67
+ the shared OpenCode client and MCP dependencies in `dist/opencode.mjs`; installed
68
+ plugins do not need the sibling checkout or development dependencies. The
69
+ existing `backeer-codex install` flow includes this bundle and `mcp.json`.
14
70
 
15
71
  ## Approval behavior and limitations
16
72
 
@@ -0,0 +1,260 @@
1
+ zod@4.6.7 (MIT)
2
+ MIT License
3
+
4
+ Copyright (c) 2025 Colin McDonnell
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+
24
+
25
+ ---
26
+
27
+ @modelcontextprotocol/sdk@1.32.2 (MIT)
28
+ MIT License
29
+
30
+ Copyright (c) 2024 Anthropic, PBC
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ of this software and associated documentation files (the "Software"), to deal
34
+ in the Software without restriction, including without limitation the rights
35
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ copies of the Software, and to permit persons to whom the Software is
37
+ furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all
40
+ copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.
49
+
50
+
51
+ ---
52
+
53
+ zod-to-json-schema@3.25.2 (ISC)
54
+ ISC License
55
+
56
+ Copyright (c) 2020, Stefan Terdell
57
+
58
+ Permission to use, copy, modify, and/or distribute this software for any
59
+ purpose with or without fee is hereby granted, provided that the above
60
+ copyright notice and this permission notice appear in all copies.
61
+
62
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
63
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
64
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
65
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
66
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
67
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
68
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
69
+
70
+ ---
71
+
72
+ ajv@8.20.0 (MIT)
73
+ The MIT License (MIT)
74
+
75
+ Copyright (c) 2015-2021 Evgeny Poberezkin
76
+
77
+ Permission is hereby granted, free of charge, to any person obtaining a copy
78
+ of this software and associated documentation files (the "Software"), to deal
79
+ in the Software without restriction, including without limitation the rights
80
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
81
+ copies of the Software, and to permit persons to whom the Software is
82
+ furnished to do so, subject to the following conditions:
83
+
84
+ The above copyright notice and this permission notice shall be included in all
85
+ copies or substantial portions of the Software.
86
+
87
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
90
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
91
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
92
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
93
+ SOFTWARE.
94
+
95
+
96
+
97
+ ---
98
+
99
+ fast-deep-equal@3.1.3 (MIT)
100
+ MIT License
101
+
102
+ Copyright (c) 2017 Evgeny Poberezkin
103
+
104
+ Permission is hereby granted, free of charge, to any person obtaining a copy
105
+ of this software and associated documentation files (the "Software"), to deal
106
+ in the Software without restriction, including without limitation the rights
107
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
108
+ copies of the Software, and to permit persons to whom the Software is
109
+ furnished to do so, subject to the following conditions:
110
+
111
+ The above copyright notice and this permission notice shall be included in all
112
+ copies or substantial portions of the Software.
113
+
114
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
115
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
116
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
117
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
118
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
119
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
120
+ SOFTWARE.
121
+
122
+
123
+ ---
124
+
125
+ json-schema-traverse@1.0.0 (MIT)
126
+ MIT License
127
+
128
+ Copyright (c) 2017 Evgeny Poberezkin
129
+
130
+ Permission is hereby granted, free of charge, to any person obtaining a copy
131
+ of this software and associated documentation files (the "Software"), to deal
132
+ in the Software without restriction, including without limitation the rights
133
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
134
+ copies of the Software, and to permit persons to whom the Software is
135
+ furnished to do so, subject to the following conditions:
136
+
137
+ The above copyright notice and this permission notice shall be included in all
138
+ copies or substantial portions of the Software.
139
+
140
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
141
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
142
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
143
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
144
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
145
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
146
+ SOFTWARE.
147
+
148
+
149
+ ---
150
+
151
+ fast-uri@3.1.9 (BSD-3-Clause)
152
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
153
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
154
+ All rights reserved.
155
+
156
+ Redistribution and use in source and binary forms, with or without
157
+ modification, are permitted provided that the following conditions are met:
158
+ * Redistributions of source code must retain the above copyright
159
+ notice, this list of conditions and the following disclaimer.
160
+ * Redistributions in binary form must reproduce the above copyright
161
+ notice, this list of conditions and the following disclaimer in the
162
+ documentation and/or other materials provided with the distribution.
163
+ * The names of any contributors may not be used to endorse or promote
164
+ products derived from this software without specific prior written
165
+ permission.
166
+
167
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
168
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
169
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
170
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
171
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
172
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
173
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
174
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
175
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
176
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
177
+
178
+ * * *
179
+
180
+ The complete list of contributors can be found at:
181
+ - https://github.com/garycourt/uri-js/graphs/contributors
182
+
183
+ ---
184
+
185
+ ajv-formats@3.0.1 (MIT)
186
+ MIT License
187
+
188
+ Copyright (c) 2020 Evgeny Poberezkin
189
+
190
+ Permission is hereby granted, free of charge, to any person obtaining a copy
191
+ of this software and associated documentation files (the "Software"), to deal
192
+ in the Software without restriction, including without limitation the rights
193
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
194
+ copies of the Software, and to permit persons to whom the Software is
195
+ furnished to do so, subject to the following conditions:
196
+
197
+ The above copyright notice and this permission notice shall be included in all
198
+ copies or substantial portions of the Software.
199
+
200
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
201
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
202
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
203
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
204
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
205
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
206
+ SOFTWARE.
207
+
208
+
209
+ ---
210
+
211
+ ajv@8.20.0 (MIT)
212
+ The MIT License (MIT)
213
+
214
+ Copyright (c) 2015-2021 Evgeny Poberezkin
215
+
216
+ Permission is hereby granted, free of charge, to any person obtaining a copy
217
+ of this software and associated documentation files (the "Software"), to deal
218
+ in the Software without restriction, including without limitation the rights
219
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
220
+ copies of the Software, and to permit persons to whom the Software is
221
+ furnished to do so, subject to the following conditions:
222
+
223
+ The above copyright notice and this permission notice shall be included in all
224
+ copies or substantial portions of the Software.
225
+
226
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
227
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
228
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
229
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
230
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
231
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
232
+ SOFTWARE.
233
+
234
+
235
+
236
+ ---
237
+
238
+ json-schema-traverse@1.0.0 (MIT)
239
+ MIT License
240
+
241
+ Copyright (c) 2017 Evgeny Poberezkin
242
+
243
+ Permission is hereby granted, free of charge, to any person obtaining a copy
244
+ of this software and associated documentation files (the "Software"), to deal
245
+ in the Software without restriction, including without limitation the rights
246
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
247
+ copies of the Software, and to permit persons to whom the Software is
248
+ furnished to do so, subject to the following conditions:
249
+
250
+ The above copyright notice and this permission notice shall be included in all
251
+ copies or substantial portions of the Software.
252
+
253
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
254
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
255
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
256
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
257
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
258
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
259
+ SOFTWARE.
260
+