@blunking/codexlink 0.1.18 → 0.1.20
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 +239 -230
- package/blun-codex.ps1 +140 -140
- package/package.json +37 -37
- package/start-codex-agent.ps1 +715 -715
- package/telegram-doctor.ps1 +330 -213
- package/telegram-plugin/lib/bridge.js +20 -5
- package/telegram-plugin/lib/storage.js +25 -25
- package/telegram-setup.ps1 +143 -143
- package/telegram-status.ps1 +256 -256
- package/telegram-title-embed.ps1 +98 -98
- package/telegram-title-watcher.ps1 +102 -102
package/README.md
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# CodexLink
|
|
4
|
-
|
|
5
|
-
**Your agent in your pocket.**
|
|
6
|
-
|
|
7
|
-
[](LICENSE)
|
|
8
|
-
[](https://blun.ai)
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
CodexLink is the BLUN launcher for one visible CLI session with optional Telegram delivery.
|
|
13
|
-
|
|
14
|
-
It keeps transport and queueing around the operator, without spinning up a hidden second session.
|
|
15
|
-
|
|
16
|
-
Telegram delivery is serial by default:
|
|
17
|
-
|
|
18
|
-
- inbound messages land in queue first
|
|
19
|
-
- active work is not interrupted immediately
|
|
20
|
-
- direct messages wait until the visible session is quiet
|
|
21
|
-
- ambient group noise stays queued until it is relevant or manually drained
|
|
22
|
-
- escalation-style messages can still jump the line
|
|
23
|
-
- stale pending replies time out automatically, so the queue cannot block forever
|
|
24
|
-
|
|
25
|
-
## Install
|
|
26
|
-
|
|
27
|
-
From GitHub:
|
|
28
|
-
|
|
29
|
-
```powershell
|
|
30
|
-
npm install -g github:maykbiletti/codexlink
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
From npm:
|
|
34
|
-
|
|
35
|
-
```powershell
|
|
36
|
-
npm install -g @blunking/codexlink
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Local development:
|
|
40
|
-
|
|
41
|
-
```powershell
|
|
42
|
-
cd codexlink
|
|
43
|
-
npm install
|
|
44
|
-
npm link
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Schnellstart
|
|
48
|
-
|
|
49
|
-
Normal starten:
|
|
50
|
-
|
|
51
|
-
```powershell
|
|
52
|
-
blun-codex
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Telegram aktivieren:
|
|
56
|
-
|
|
57
|
-
```powershell
|
|
58
|
-
blun-codex telegram-plugin
|
|
59
|
-
```
|
|
60
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# CodexLink
|
|
4
|
+
|
|
5
|
+
**Your agent in your pocket.**
|
|
6
|
+
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://blun.ai)
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
CodexLink is the BLUN launcher for one visible CLI session with optional Telegram delivery.
|
|
13
|
+
|
|
14
|
+
It keeps transport and queueing around the operator, without spinning up a hidden second session.
|
|
15
|
+
|
|
16
|
+
Telegram delivery is serial by default:
|
|
17
|
+
|
|
18
|
+
- inbound messages land in queue first
|
|
19
|
+
- active work is not interrupted immediately
|
|
20
|
+
- direct messages wait until the visible session is quiet
|
|
21
|
+
- ambient group noise stays queued until it is relevant or manually drained
|
|
22
|
+
- escalation-style messages can still jump the line
|
|
23
|
+
- stale pending replies time out automatically, so the queue cannot block forever
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
From GitHub:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
npm install -g github:maykbiletti/codexlink
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
From npm:
|
|
34
|
+
|
|
35
|
+
```powershell
|
|
36
|
+
npm install -g @blunking/codexlink
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Local development:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
cd codexlink
|
|
43
|
+
npm install
|
|
44
|
+
npm link
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Schnellstart
|
|
48
|
+
|
|
49
|
+
Normal starten:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
blun-codex
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Telegram aktivieren:
|
|
56
|
+
|
|
57
|
+
```powershell
|
|
58
|
+
blun-codex telegram-plugin
|
|
59
|
+
```
|
|
60
|
+
|
|
61
61
|
Wenn Telegram noch nicht eingerichtet ist, startet automatisch ein kurzer Setup-Flow und fragt:
|
|
62
62
|
|
|
63
63
|
- Telegram Bot Token
|
|
64
64
|
|
|
65
65
|
Danach oeffnest du Telegram und sendest eine Nachricht an den Bot. CodexLink erkennt Chat oder Gruppe automatisch und schreibt alles lokal an die richtige Stelle. Du musst keine Chat-ID suchen und keine `.env`-Datei bearbeiten.
|
|
66
|
-
|
|
67
|
-
Pruefen:
|
|
68
|
-
|
|
69
|
-
```powershell
|
|
70
|
-
blun-codex telegram-doctor
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Commands
|
|
74
|
-
|
|
75
|
-
Normal startup:
|
|
76
|
-
|
|
77
|
-
```powershell
|
|
78
|
-
blun-codex
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Alias:
|
|
82
|
-
|
|
83
|
-
```powershell
|
|
84
|
-
codexlink
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Telegram mode:
|
|
88
|
-
|
|
89
|
-
```powershell
|
|
90
|
-
blun-codex telegram-plugin
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Manual setup:
|
|
94
|
-
|
|
95
|
-
```powershell
|
|
96
|
-
blun-codex telegram-setup
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Legacy equivalent:
|
|
100
|
-
|
|
101
|
-
```powershell
|
|
102
|
-
blun-codex --telegram plugin
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Status:
|
|
106
|
-
|
|
107
|
-
```powershell
|
|
66
|
+
|
|
67
|
+
Pruefen:
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
blun-codex telegram-doctor
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Commands
|
|
74
|
+
|
|
75
|
+
Normal startup:
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
blun-codex
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Alias:
|
|
82
|
+
|
|
83
|
+
```powershell
|
|
84
|
+
codexlink
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Telegram mode:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
blun-codex telegram-plugin
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Manual setup:
|
|
94
|
+
|
|
95
|
+
```powershell
|
|
96
|
+
blun-codex telegram-setup
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Legacy equivalent:
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
blun-codex --telegram plugin
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Status:
|
|
106
|
+
|
|
107
|
+
```powershell
|
|
108
108
|
blun-codex telegram-status
|
|
109
109
|
```
|
|
110
110
|
|
|
@@ -114,6 +114,8 @@ Der automatische Progress-Hinweis ist bewusst defensiv: standardmaessig sendet T
|
|
|
114
114
|
|
|
115
115
|
CodexLink injiziert Nachrichten standardmaessig ueber den App-Server in den aktiven Thread. Der alte Windows-Tastaturmodus, der Text sichtbar ins Eingabefeld schreibt, ist absichtlich deaktiviert, weil einzelne Terminals Enter nicht zuverlaessig absenden. Wer ihn fuer Debugging trotzdem erzwingen will, muss explizit `BLUN_TELEGRAM_VISIBLE_CONSOLE_INJECT=force` setzen.
|
|
116
116
|
|
|
117
|
+
Kurze Namens-Pings wie `Otto` oder `Alfred` werden standardmaessig ebenfalls als echte Nachricht in den aktiven Thread injiziert. Das macht Reachability-Tests sichtbar und vermeidet, dass Telegram wie ein separater Hintergrundbot wirkt. Wer den alten Ack-only-Modus fuer solche Pings braucht, kann `BLUN_TELEGRAM_PING_ACK_ONLY=1` setzen.
|
|
118
|
+
|
|
117
119
|
Wichtig bei mehreren Profilen: ein Telegram-Bot-Token darf nicht gleichzeitig von alten oder fremden Pollern abgefragt werden. Sonst meldet Telegram `Conflict: terminated by other getUpdates request`, und Nachrichten koennen verspaetet oder gar nicht in der sichtbaren CLI landen. Aktuelle Versionen pollen non-blocking und schneller; wenn trotzdem Conflicts auftauchen, alle alten `blun-codex telegram-plugin` Fenster fuer denselben Bot schliessen und genau eine aktuelle Session starten.
|
|
118
120
|
|
|
119
121
|
Wenn mehrere Agents denselben Gruppenchat nutzen, kann ein Agent andere Agent-Namen als Fremdroute markieren. Dann werden Owner-Nachrichten wie `Frida mach weiter` nicht in Ottos Session gezogen:
|
|
@@ -124,126 +126,133 @@ BLUN_TELEGRAM_OTHER_AGENT_NAMES=frida,angel,dieter,alfred
|
|
|
124
126
|
```
|
|
125
127
|
|
|
126
128
|
Doctor:
|
|
127
|
-
|
|
128
|
-
```powershell
|
|
129
|
-
blun-codex telegram-doctor
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
```powershell
|
|
135
|
-
blun-codex telegram-doctor --
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
##
|
|
246
|
-
|
|
129
|
+
|
|
130
|
+
```powershell
|
|
131
|
+
blun-codex telegram-doctor
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Runtime automatisch bereinigen, wenn mehrere Threads geladen sind oder eine alte Bindung klemmt:
|
|
135
|
+
|
|
136
|
+
```powershell
|
|
137
|
+
blun-codex telegram-doctor --fix
|
|
138
|
+
blun-codex telegram-plugin
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
JSON doctor output:
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
blun-codex telegram-doctor --json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Dry run:
|
|
148
|
+
|
|
149
|
+
```powershell
|
|
150
|
+
blun-codex telegram-plugin --print-only
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Eigene Profile
|
|
154
|
+
|
|
155
|
+
Der normale Start braucht kein eigenes Profil.
|
|
156
|
+
|
|
157
|
+
Wenn du nur einen Slot auf deinem Rechner brauchst, reicht:
|
|
158
|
+
|
|
159
|
+
```powershell
|
|
160
|
+
blun-codex telegram-plugin
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Ein eigenes Profil brauchst du nur fuer Fortgeschrittene oder Parallelbetrieb, zum Beispiel wenn mehrere Operatoren auf demselben Rechner laufen.
|
|
164
|
+
|
|
165
|
+
Beispiel:
|
|
166
|
+
|
|
167
|
+
```powershell
|
|
168
|
+
blun-codex --profile alfred telegram-plugin
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Private internal profiles
|
|
172
|
+
|
|
173
|
+
If you run more than one internal operator on the same machine, do not start all of them on the shared `default` slot.
|
|
174
|
+
|
|
175
|
+
Use a dedicated private profile per operator:
|
|
176
|
+
|
|
177
|
+
```powershell
|
|
178
|
+
blun-codex --profile frida telegram-plugin
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Why this matters:
|
|
182
|
+
|
|
183
|
+
- `blun-codex telegram-plugin` without `--profile` uses the shared `default` runtime slot
|
|
184
|
+
- starting a second operator on `default` will replace the first `default` runtime
|
|
185
|
+
- a private profile gives that operator a separate runtime slot, state directory, and Mnemo binding
|
|
186
|
+
|
|
187
|
+
For internal/private profiles:
|
|
188
|
+
|
|
189
|
+
- keep the profile local on the machine
|
|
190
|
+
- give it its own `agent_name`
|
|
191
|
+
- give it its own Telegram state directory
|
|
192
|
+
- do not ship internal agent profiles in the public package
|
|
193
|
+
|
|
194
|
+
Local private profiles are loaded from:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
%USERPROFILE%\.codex\profiles\codexlink\<name>.json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example:
|
|
201
|
+
|
|
202
|
+
```powershell
|
|
203
|
+
blun-codex --profile frida telegram-plugin
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
looks for:
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
%USERPROFILE%\.codex\profiles\codexlink\frida.json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## What it does
|
|
213
|
+
|
|
214
|
+
- starts one consistent local CLI runtime
|
|
215
|
+
- writes a launch record into `.codex/runtimes/default/`
|
|
216
|
+
- keeps Telegram queue state under `.codex/channels/telegram-default/`
|
|
217
|
+
- attaches Telegram delivery to the same visible session
|
|
218
|
+
- defers automatic Telegram delivery until the foreground session is idle
|
|
219
|
+
- keeps poller, dispatcher, and reply relay separate from the foreground operator
|
|
220
|
+
|
|
221
|
+
## What it does not do
|
|
222
|
+
|
|
223
|
+
- no hidden autonomous answer bot
|
|
224
|
+
- no second shadow session
|
|
225
|
+
- no per-agent internal company presets in the public package
|
|
226
|
+
|
|
227
|
+
## Public profile
|
|
228
|
+
|
|
229
|
+
The shipped default profile is intentionally generic:
|
|
230
|
+
|
|
231
|
+
- display name: `CodexLink`
|
|
232
|
+
- lane: `general`
|
|
233
|
+
- workspace: current directory by default
|
|
234
|
+
- model: inherited from the local host unless explicitly set
|
|
235
|
+
|
|
236
|
+
If you need custom paths or lane rules, add your own profile JSON next to `profiles/default.json`.
|
|
237
|
+
|
|
238
|
+
## Telegram plugin folder
|
|
239
|
+
|
|
240
|
+
The bundled plugin lives under `telegram-plugin/` and contains:
|
|
241
|
+
|
|
242
|
+
- `.codex-plugin/plugin.json`
|
|
243
|
+
- `.mcp.json`
|
|
244
|
+
- `server.js`
|
|
245
|
+
- sidecars and bridge helpers
|
|
246
|
+
|
|
247
|
+
## Requirements
|
|
248
|
+
|
|
249
|
+
- Windows PowerShell
|
|
250
|
+
- Node.js 20+
|
|
251
|
+
- a working local `codex` command in `PATH`
|
|
252
|
+
- a Telegram bot token when Telegram mode is enabled
|
|
253
|
+
|
|
254
|
+
## First-run behavior
|
|
255
|
+
|
|
247
256
|
`blun-codex telegram-plugin` now behaves like a guided setup for normal users:
|
|
248
257
|
|
|
249
258
|
1. check whether Telegram is already configured
|
|
@@ -256,8 +265,8 @@ Allowed Chat ID(s) are no longer typed by hand. To pair a different chat or grou
|
|
|
256
265
|
|
|
257
266
|
```powershell
|
|
258
267
|
blun-codex telegram-setup
|
|
259
|
-
```
|
|
260
|
-
|
|
268
|
+
```
|
|
269
|
+
|
|
261
270
|
If something is missing later, `blun-codex telegram-doctor` tells you exactly what is missing and what to run next.
|
|
262
271
|
|
|
263
272
|
Inbound Telegram messages are mirrored into the visible Codex console by default,
|
|
@@ -265,9 +274,9 @@ so the operator can see that the message arrived. Queue summaries and outbound
|
|
|
265
274
|
reply notices stay out of the console to avoid input-line spam. Set
|
|
266
275
|
`BLUN_TELEGRAM_CONSOLE_UI_NOTICES=off` to disable console mirroring, or `all` to
|
|
267
276
|
also mirror outbound notices for debugging.
|
|
268
|
-
|
|
269
|
-
## Notes
|
|
270
|
-
|
|
271
|
-
- the package currently targets local Windows operators first
|
|
272
|
-
- the package is installable from GitHub before registry publishing
|
|
273
|
-
- once an npm token is available, the same package can be published without changing the command shape
|
|
277
|
+
|
|
278
|
+
## Notes
|
|
279
|
+
|
|
280
|
+
- the package currently targets local Windows operators first
|
|
281
|
+
- the package is installable from GitHub before registry publishing
|
|
282
|
+
- once an npm token is available, the same package can be published without changing the command shape
|