@blunking/codexlink 0.1.2 → 0.1.10
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 +67 -49
- package/package.json +40 -38
- package/start-codex-agent.ps1 +179 -71
- package/telegram-doctor.ps1 +34 -20
- package/telegram-plugin/.env.example +1 -0
- package/telegram-plugin/README.md +3 -0
- package/telegram-plugin/dispatcher.js +4 -0
- package/telegram-plugin/lib/bridge.js +1550 -86
- package/telegram-plugin/lib/codex.js +142 -21
- package/telegram-plugin/lib/env.js +29 -1
- package/telegram-plugin/lib/paths.js +7 -1
- package/telegram-plugin/lib/sidecars.js +12 -1
- package/telegram-plugin/lib/singleton.js +66 -0
- package/telegram-plugin/lib/storage.js +66 -25
- package/telegram-plugin/lib/telegram.js +8 -0
- package/telegram-plugin/poller.js +4 -0
- package/telegram-plugin/responder.js +4 -0
- package/telegram-setup.ps1 +217 -58
- package/telegram-status.ps1 +292 -182
- package/telegram-title-embed.ps1 +442 -0
- package/telegram-title-watcher.ps1 +454 -0
|
@@ -11,6 +11,7 @@ It is intentionally **not** an autonomous answer bot.
|
|
|
11
11
|
- keeps private chats and group threads separated
|
|
12
12
|
- binds a live thread id
|
|
13
13
|
- injects the next queued Telegram message into that exact live thread only after the session is idle
|
|
14
|
+
- keeps injected Telegram messages visible as pending until the matching answer is sent
|
|
14
15
|
- sends explicit manual replies from the visible operator session
|
|
15
16
|
- keeps ambient group noise queued unless it is relevant to that operator
|
|
16
17
|
- lets escalation-style messages bypass the normal idle queue
|
|
@@ -51,6 +52,8 @@ Copy `.env.example` to `.env` in the state directory or export env vars:
|
|
|
51
52
|
- `BLUN_TELEGRAM_THREAD_ID`
|
|
52
53
|
- `BLUN_TELEGRAM_RESUME_TIMEOUT_MS`
|
|
53
54
|
- `BLUN_TELEGRAM_IDLE_COOLDOWN_MS`
|
|
55
|
+
- `BLUN_TELEGRAM_PENDING_REPLY_TIMEOUT_MS`
|
|
56
|
+
- `BLUN_TELEGRAM_PROGRESS_RELAY` (`status` by default, `commentary` to mirror commentary updates, `off` to disable progress notices)
|
|
54
57
|
- `BLUN_TELEGRAM_DISPATCH_MODE` (`deferred` by default, `legacy` to restore eager dispatch)
|
|
55
58
|
|
|
56
59
|
## Tools
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { injectNext } from "./lib/bridge.js";
|
|
3
|
+
import { isCurrentSidecarPid } from "./lib/singleton.js";
|
|
3
4
|
|
|
4
5
|
const intervalMs = Number.parseInt(process.env.BLUN_TELEGRAM_INJECT_INTERVAL_MS || "1500", 10) || 1500;
|
|
5
6
|
let stopping = false;
|
|
@@ -18,6 +19,9 @@ process.on("SIGTERM", () => {
|
|
|
18
19
|
|
|
19
20
|
async function main() {
|
|
20
21
|
while (!stopping) {
|
|
22
|
+
if (!isCurrentSidecarPid("dispatcher")) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
21
25
|
try {
|
|
22
26
|
const result = await injectNext("", { auto: true });
|
|
23
27
|
if (!["empty", "deferred"].includes(result.status)) {
|