instar 1.2.18 → 1.2.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/dist/commands/setup-wizard/codex-driver.d.ts +26 -1
- package/dist/commands/setup-wizard/codex-driver.d.ts.map +1 -1
- package/dist/commands/setup-wizard/codex-driver.js +341 -38
- package/dist/commands/setup-wizard/codex-driver.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.2.19.md +76 -0
- package/upgrades/1.2.20.md +113 -0
- package/upgrades/side-effects/feat-wizard-audit-bundle.md +109 -0
- package/upgrades/side-effects/fix-telegram-privacy-topics-intros.md +98 -0
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* conversational behavior is no longer expected here — Codex is
|
|
18
18
|
* driving the browser, that's its strength).
|
|
19
19
|
*/
|
|
20
|
+
import { type WizardAnswers } from './state-machine.js';
|
|
20
21
|
export interface CodexDriverOptions {
|
|
21
22
|
codexPath: string;
|
|
22
23
|
projectDir: string;
|
|
@@ -32,8 +33,19 @@ export interface CodexDriverOptions {
|
|
|
32
33
|
* Build the prompt for Codex's Playwright-driven Telegram setup.
|
|
33
34
|
* Exported for testing (we can assert the prompt's shape includes
|
|
34
35
|
* the verification sentinels and the success criterion).
|
|
36
|
+
*
|
|
37
|
+
* `ctx.agentName` / `ctx.userName` / `ctx.agentRole` come from the
|
|
38
|
+
* earlier conversational phases of the wizard. They feed the bot's
|
|
39
|
+
* display name (so it shows up as "Codey" in Telegram instead of
|
|
40
|
+
* the v1.2.19 hardcoded "Instar Agent"), the bot description, and
|
|
41
|
+
* the system-topic intro texts.
|
|
35
42
|
*/
|
|
36
|
-
export
|
|
43
|
+
export interface TelegramAgenticContext {
|
|
44
|
+
agentName?: string;
|
|
45
|
+
userName?: string;
|
|
46
|
+
agentRole?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function buildTelegramAgenticPrompt(projectDir: string, ctx?: TelegramAgenticContext): string;
|
|
37
49
|
/**
|
|
38
50
|
* Verify that .instar/config.json has a fully-populated Telegram
|
|
39
51
|
* messaging entry. Used by runTelegramAgentic to confirm the
|
|
@@ -41,6 +53,19 @@ export declare function buildTelegramAgenticPrompt(projectDir: string): string;
|
|
|
41
53
|
* declaring success. Exported for testing.
|
|
42
54
|
*/
|
|
43
55
|
export declare function verifyTelegramConfig(projectDir: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Send the agent's personal "first hello" to the Lifeline topic
|
|
58
|
+
* after the server has started. This is SKILL.md's "magic moment"
|
|
59
|
+
* — the agent's first words to the user, in voice, using their
|
|
60
|
+
* actual name + role + the user's name.
|
|
61
|
+
*
|
|
62
|
+
* Reads token + chatId + lifelineTopicId from the just-written
|
|
63
|
+
* config.json. Silently no-ops if any are missing (Telegram wasn't
|
|
64
|
+
* configured, or the manual backstop didn't write lifelineTopicId).
|
|
65
|
+
*
|
|
66
|
+
* Exported for testing.
|
|
67
|
+
*/
|
|
68
|
+
export declare function runSendLifelineGreeting(answers: WizardAnswers, options: CodexDriverOptions): Promise<Partial<WizardAnswers>>;
|
|
44
69
|
/**
|
|
45
70
|
* Entry point — runs the wizard from the initial state to completion.
|
|
46
71
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-driver.d.ts","sourceRoot":"","sources":["../../../src/commands/setup-wizard/codex-driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"codex-driver.d.ts","sourceRoot":"","sources":["../../../src/commands/setup-wizard/codex-driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,EAIL,KAAK,aAAa,EAGnB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAyeD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,sBAA2B,GAC/B,MAAM,CAqXR;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAYhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CA+DjC;AAuLD;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC/E"}
|
|
@@ -352,7 +352,7 @@ async function runAction(action, answers, options) {
|
|
|
352
352
|
// instar-native readline flow when Codex returns the
|
|
353
353
|
// PLAYWRIGHT_UNAVAILABLE sentinel, when the spawn fails, or
|
|
354
354
|
// when the config write didn't actually land.
|
|
355
|
-
const agentic = await runTelegramAgentic(options);
|
|
355
|
+
const agentic = await runTelegramAgentic(options, answers);
|
|
356
356
|
if (agentic.telegramConfigured)
|
|
357
357
|
return agentic;
|
|
358
358
|
console.log();
|
|
@@ -370,9 +370,18 @@ async function runAction(action, answers, options) {
|
|
|
370
370
|
return {};
|
|
371
371
|
}
|
|
372
372
|
case 'send-greeting': {
|
|
373
|
-
//
|
|
374
|
-
//
|
|
375
|
-
|
|
373
|
+
// The "magic moment" — agent's first words to the user in the
|
|
374
|
+
// Lifeline topic, in the agent's voice, after the server is
|
|
375
|
+
// alive. SKILL.md devotes Phase 5b to this; the v1.2.20 audit
|
|
376
|
+
// surfaced that this action was a no-op.
|
|
377
|
+
//
|
|
378
|
+
// Reads token + chatId + lifelineTopicId from the just-written
|
|
379
|
+
// config.json (the agentic Telegram step wrote them), and
|
|
380
|
+
// sends a 2-3 sentence personalized greeting via sendMessage.
|
|
381
|
+
// Silently skips if any of the three fields are missing
|
|
382
|
+
// (Telegram wasn't configured, or the user took the manual
|
|
383
|
+
// backstop without lifelineTopicId).
|
|
384
|
+
return await runSendLifelineGreeting(answers, options);
|
|
376
385
|
}
|
|
377
386
|
case 'github-backup': {
|
|
378
387
|
// Out of scope for v1.2.12 minimum. Future PR.
|
|
@@ -405,11 +414,15 @@ async function runAction(action, answers, options) {
|
|
|
405
414
|
* never to ~/.codex/config.toml. With v1.2.17 it does both, and
|
|
406
415
|
* this action exercises the Codex side of that registration.
|
|
407
416
|
*/
|
|
408
|
-
async function runTelegramAgentic(options) {
|
|
417
|
+
async function runTelegramAgentic(options, answers) {
|
|
409
418
|
console.log();
|
|
410
419
|
console.log(pc.bold(' Telegram setup'));
|
|
411
420
|
console.log();
|
|
412
|
-
const prompt = buildTelegramAgenticPrompt(options.projectDir
|
|
421
|
+
const prompt = buildTelegramAgenticPrompt(options.projectDir, {
|
|
422
|
+
agentName: answers.agentName,
|
|
423
|
+
userName: answers.userName,
|
|
424
|
+
agentRole: answers.agentRole,
|
|
425
|
+
});
|
|
413
426
|
// 10-minute spawn timeout — the first-time user might need to
|
|
414
427
|
// install Telegram on their phone before they can scan the QR.
|
|
415
428
|
// Codex itself enforces a tighter login-wait via the prompt
|
|
@@ -440,12 +453,14 @@ async function runTelegramAgentic(options) {
|
|
|
440
453
|
console.log(pc.green(' ✓ Telegram is set up (via Codex + Playwright).'));
|
|
441
454
|
return { telegramConfigured: true };
|
|
442
455
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
456
|
+
export function buildTelegramAgenticPrompt(projectDir, ctx = {}) {
|
|
457
|
+
// Defensive fallbacks: project basename for agent name, "friend"
|
|
458
|
+
// for user. The state-machine's validators guarantee these are
|
|
459
|
+
// populated in practice; defaults exist for tests and the
|
|
460
|
+
// pathological "Codex prompt invoked without prior state" case.
|
|
461
|
+
const agentName = (ctx.agentName || projectDir.split('/').filter(Boolean).pop() || 'agent').trim();
|
|
462
|
+
const userName = (ctx.userName || 'friend').trim();
|
|
463
|
+
const agentRole = (ctx.agentRole || 'persistent AI agent').trim();
|
|
449
464
|
return `
|
|
450
465
|
You are the instar setup wizard's Telegram phase. The user is sitting
|
|
451
466
|
at the terminal RIGHT NOW reading what you print. You also have
|
|
@@ -455,6 +470,13 @@ browser_type, browser_press_key, browser_wait_for, etc).
|
|
|
455
470
|
|
|
456
471
|
TASK: Set up a Telegram bot for an instar agent at ${projectDir}.
|
|
457
472
|
|
|
473
|
+
AGENT CONTEXT (use this for the bot's identity throughout):
|
|
474
|
+
- Agent name: "${agentName}" (use as the BotFather display name,
|
|
475
|
+
bot description, group name, intro voice)
|
|
476
|
+
- User name: "${userName}" (address the user by this name in
|
|
477
|
+
intros and the final greeting)
|
|
478
|
+
- Agent role: "${agentRole}" (use in /setdescription text)
|
|
479
|
+
|
|
458
480
|
CRITICAL CONVERSATIONAL RULES:
|
|
459
481
|
- You are talking to a real person, not running a job. Speak to
|
|
460
482
|
them warmly and clearly at every step. They cannot see your
|
|
@@ -470,6 +492,15 @@ CRITICAL CONVERSATIONAL RULES:
|
|
|
470
492
|
other internal-state language. The user doesn't care about your
|
|
471
493
|
polling cadence; they care about what to do.
|
|
472
494
|
|
|
495
|
+
CRITICAL CREDENTIAL HYGIENE:
|
|
496
|
+
- NEVER print the bot token to the terminal, even in error
|
|
497
|
+
messages. The token pattern is \\d+:[A-Za-z0-9_-]{35}.
|
|
498
|
+
- If an error response from the Bot API mentions the token,
|
|
499
|
+
redact to "Token: [REDACTED]" before narrating to the user.
|
|
500
|
+
- stdio is inherited from the calling instar process — anything
|
|
501
|
+
you print lands on the user's terminal AND their shell
|
|
502
|
+
scrollback. Treat every print as a permanent record.
|
|
503
|
+
|
|
473
504
|
SUCCESS CRITERION (verified by the caller after you exit):
|
|
474
505
|
.instar/config.json's messaging[] contains exactly one entry
|
|
475
506
|
shaped as:
|
|
@@ -529,13 +560,17 @@ STEPS:
|
|
|
529
560
|
|
|
530
561
|
5. Send /newbot. Wait for the reply.
|
|
531
562
|
|
|
532
|
-
6. When BotFather asks for the bot's display name, type
|
|
533
|
-
|
|
563
|
+
6. When BotFather asks for the bot's display name, type the
|
|
564
|
+
AGENT NAME from the context above: "${agentName}".
|
|
565
|
+
(This is what appears as the bot's name in ${userName}'s
|
|
566
|
+
Telegram contact list and message header — it MUST match the
|
|
567
|
+
identity the user chose earlier in the wizard, not a generic
|
|
568
|
+
"Instar Agent" placeholder.)
|
|
534
569
|
|
|
535
570
|
7. When BotFather asks for the bot's username, generate one ending
|
|
536
|
-
in "bot"
|
|
537
|
-
ASCII-only
|
|
538
|
-
|
|
571
|
+
in "bot". Recommended form: "${agentName.toLowerCase().replace(/[^a-z0-9]/g, '')}_instar_bot"
|
|
572
|
+
(lower-case ASCII-only). If taken, append random digits and
|
|
573
|
+
retry up to 5 times.
|
|
539
574
|
|
|
540
575
|
8. Read BotFather's reply containing the token. Extract the token
|
|
541
576
|
from the message body. Token format: \\d+:[A-Za-z0-9_-]+
|
|
@@ -551,41 +586,239 @@ STEPS:
|
|
|
551
586
|
AGENTIC_FAILED: token-invalid
|
|
552
587
|
and exit.
|
|
553
588
|
|
|
554
|
-
|
|
555
|
-
"
|
|
589
|
+
9b. Set the bot description (what appears in the "What can this
|
|
590
|
+
bot do?" panel when someone opens the bot's profile). In the
|
|
591
|
+
BotFather chat:
|
|
592
|
+
a. Send /setdescription
|
|
593
|
+
b. Select the bot you just created.
|
|
594
|
+
c. Send this exact text (or close to it, in the agent's voice):
|
|
595
|
+
"I'm ${agentName}, a ${agentRole} for ${userName}. Talk to me here for anything you'd ask an assistant — questions, tasks, status checks. I'll respond from this chat."
|
|
596
|
+
d. BotFather confirms with "Success!" or similar.
|
|
597
|
+
|
|
598
|
+
If BotFather rejects the description (length, content), shorten
|
|
599
|
+
and retry once. If it still fails, narrate "Couldn't set the
|
|
600
|
+
description, moving on" and continue — this is non-fatal, NOT
|
|
601
|
+
AGENTIC_FAILED. The bot works without a description.
|
|
602
|
+
|
|
603
|
+
9c. Set the bot's About text (the short line shown under the bot's
|
|
604
|
+
name in the chat header). In the BotFather chat:
|
|
605
|
+
a. Send /setabouttext
|
|
606
|
+
b. Select the same bot.
|
|
607
|
+
c. Send a SHORT line (cap is 120 chars) in the agent's voice:
|
|
608
|
+
"${agentRole} • here for ${userName}"
|
|
609
|
+
d. BotFather confirms.
|
|
610
|
+
|
|
611
|
+
Same non-fatal handling as 9b — narrate and continue if BotFather
|
|
612
|
+
rejects.
|
|
613
|
+
|
|
614
|
+
10. CRITICAL — disable the bot's privacy mode via BotFather. Without
|
|
615
|
+
this, the bot can't see normal messages in a group (only direct
|
|
616
|
+
@mentions and replies to its own messages). New bots have
|
|
617
|
+
privacy mode ON by default, which BREAKS messaging entirely.
|
|
618
|
+
|
|
619
|
+
Tell the user briefly: "Bot's ready. Disabling its privacy mode
|
|
620
|
+
so it can read messages in the group."
|
|
621
|
+
|
|
622
|
+
In the BotFather chat:
|
|
623
|
+
a. Send /setprivacy
|
|
624
|
+
b. BotFather lists your bots. Click the bot you just created.
|
|
625
|
+
c. BotFather asks "Enable or disable privacy?" Click "Disable".
|
|
626
|
+
|
|
627
|
+
Verify via the Bot API:
|
|
628
|
+
curl -s "https://api.telegram.org/bot<TOKEN>/getMe"
|
|
629
|
+
Confirm result.can_read_all_group_messages === true. If not,
|
|
630
|
+
retry the Disable step once. If still wrong after the retry,
|
|
631
|
+
tell the user "Couldn't disable bot privacy — switching to
|
|
632
|
+
manual." Output AGENTIC_FAILED: privacy-not-disabled and exit.
|
|
633
|
+
|
|
634
|
+
11. Tell the user briefly:
|
|
635
|
+
"Creating a group chat now and adding ${agentName}."
|
|
556
636
|
Then create a new group chat:
|
|
557
637
|
a. Click the "new message" / pencil icon.
|
|
558
638
|
b. Choose "New Group".
|
|
559
639
|
c. Search for and add the bot you just created.
|
|
560
|
-
d. Name the group "
|
|
640
|
+
d. Name the group "${userName} + ${agentName}" (or
|
|
641
|
+
"${agentName} + ${userName}" — whichever reads more naturally
|
|
642
|
+
to you given the wizard's tone).
|
|
561
643
|
e. Create the group.
|
|
562
|
-
f. Send a message inside the group: "first contact".
|
|
563
644
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
645
|
+
12. CRITICAL — enable Topics (Forum mode) on the new group. This
|
|
646
|
+
converts the basic group to a supergroup with topic threads.
|
|
647
|
+
instar organizes different conversation contexts via topics
|
|
648
|
+
(Lifeline, Updates, Dashboard, Attention). Without this, all
|
|
649
|
+
messages collapse into one stream.
|
|
650
|
+
|
|
651
|
+
The Bot API CANNOT enable Forum mode — must be done via UI:
|
|
652
|
+
a. Tell the user briefly: "Enabling topics so we can organize
|
|
653
|
+
different conversation threads."
|
|
654
|
+
b. Open the group you just created (click it in the chat list).
|
|
655
|
+
c. Click the group title at the top to open Group Info.
|
|
656
|
+
d. Click the pencil/edit icon to edit group settings.
|
|
657
|
+
e. Find the "Topics" toggle (sometimes labelled "Forum"). Turn
|
|
658
|
+
it ON.
|
|
659
|
+
f. Save / confirm.
|
|
660
|
+
|
|
661
|
+
Send a probe message in the group's General topic:
|
|
662
|
+
"first contact"
|
|
663
|
+
Then flush stale long-poll backlog FIRST (in case another
|
|
664
|
+
instar instance is polling the same bot) and re-probe:
|
|
665
|
+
curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates?offset=-1" > /dev/null
|
|
666
|
+
sleep 1
|
|
667
|
+
curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates?timeout=5"
|
|
668
|
+
Confirm message.chat.type === "supergroup" AND
|
|
669
|
+
message.chat.is_forum === true. The chat.id will have CHANGED
|
|
670
|
+
from the original basic-group id to a -100-prefixed supergroup
|
|
671
|
+
id — use this NEW id going forward (call it FORUM_CHAT_ID).
|
|
672
|
+
|
|
673
|
+
If is_forum is not true after 2 retries (enable + re-probe),
|
|
674
|
+
tell the user "Couldn't enable topic threads — switching to
|
|
675
|
+
manual." Output AGENTIC_FAILED: forum-mode-not-enabled.
|
|
676
|
+
|
|
677
|
+
12b. CRITICAL — promote the bot to group admin. Without admin
|
|
678
|
+
rights, several capabilities silently degrade: the bot can't
|
|
679
|
+
pin messages, can't manage topics (rename / delete / reopen),
|
|
680
|
+
and Telegram's evolving group-permission rules may further
|
|
681
|
+
restrict it.
|
|
682
|
+
|
|
683
|
+
The Bot API does NOT let a bot self-promote — must be done
|
|
684
|
+
via Playwright UI:
|
|
685
|
+
a. Tell the user briefly: "Promoting ${agentName} to admin
|
|
686
|
+
so it can pin messages and manage topics."
|
|
687
|
+
b. Open the group, click the group title to open Group Info.
|
|
688
|
+
c. Click "Administrators" (sometimes nested under
|
|
689
|
+
"Permissions" or "Members").
|
|
690
|
+
d. Click "Add Admin" / "Add Administrator".
|
|
691
|
+
e. Search for and select the bot you created.
|
|
692
|
+
f. Save / confirm. (No permission tweaks needed — defaults
|
|
693
|
+
are fine.)
|
|
694
|
+
|
|
695
|
+
Verify via the Bot API:
|
|
696
|
+
curl -s "https://api.telegram.org/bot<TOKEN>/getChatMember?chat_id=<FORUM_CHAT_ID>&user_id=<BOT_ID>"
|
|
697
|
+
(BOT_ID is result.id from the /getMe call earlier.) Confirm
|
|
698
|
+
result.status === "administrator". If not after one retry,
|
|
699
|
+
narrate "Couldn't promote ${agentName} to admin, moving on
|
|
700
|
+
— pinning and topic management may not work." This is
|
|
701
|
+
NON-fatal — continue with the rest of setup. NOT AGENTIC_FAILED.
|
|
702
|
+
|
|
703
|
+
13. Create the 4 system topics. Each via createForumTopic:
|
|
704
|
+
|
|
705
|
+
a. Lifeline (color 9367192 — green):
|
|
706
|
+
curl -s -X POST "https://api.telegram.org/bot<TOKEN>/createForumTopic" \\
|
|
707
|
+
-H 'Content-Type: application/json' \\
|
|
708
|
+
-d '{"chat_id": "<FORUM_CHAT_ID>",
|
|
709
|
+
"name": "🛡️ Lifeline",
|
|
710
|
+
"icon_color": 9367192}'
|
|
711
|
+
Capture result.message_thread_id as LIFELINE_TOPIC_ID.
|
|
712
|
+
|
|
713
|
+
b. Updates (color 7322096 — blue):
|
|
714
|
+
Same call with name "📢 Updates", icon_color 7322096.
|
|
715
|
+
Capture as UPDATES_TOPIC_ID.
|
|
716
|
+
|
|
717
|
+
c. Dashboard (color 7322096 — blue):
|
|
718
|
+
Same with name "📊 Dashboard". Capture as DASHBOARD_TOPIC_ID.
|
|
719
|
+
|
|
720
|
+
d. Attention (color 16766590 — yellow):
|
|
721
|
+
Same with name "🔔 Attention". Capture as ATTENTION_TOPIC_ID.
|
|
722
|
+
|
|
723
|
+
If any createForumTopic call returns !ok, tell the user
|
|
724
|
+
"Couldn't create the system topics — switching to manual."
|
|
725
|
+
Output AGENTIC_FAILED: topics-create-failed and exit.
|
|
726
|
+
|
|
727
|
+
14. Seed each topic with one orienting message via sendMessage +
|
|
728
|
+
message_thread_id. These are NEUTRAL channel-purpose blurbs,
|
|
729
|
+
not the agent's personal greeting (that's a separate step
|
|
730
|
+
after server start — see Phase 5 of the wizard). Use the
|
|
731
|
+
agent's first-person voice in plain text. Adapt wording as
|
|
732
|
+
needed for the agent's personality, but keep meaning intact.
|
|
733
|
+
|
|
734
|
+
a. Lifeline (LIFELINE_TOPIC_ID) — this one is RICHER because
|
|
735
|
+
new users see it first and need to understand how topics
|
|
736
|
+
work:
|
|
737
|
+
|
|
738
|
+
text: |
|
|
739
|
+
Hey ${userName} — I'm ${agentName}. This is the **Lifeline** topic.
|
|
740
|
+
|
|
741
|
+
Quick orientation: each topic is a separate conversation
|
|
742
|
+
thread (like Slack channels). Lifeline is the main
|
|
743
|
+
channel between us — anything that doesn't fit elsewhere,
|
|
744
|
+
send it here.
|
|
745
|
+
|
|
746
|
+
You can ask me to create new topics for different tasks
|
|
747
|
+
("create a topic for deployment issues") and I'll
|
|
748
|
+
proactively create topics when something's worth a
|
|
749
|
+
dedicated thread.
|
|
750
|
+
|
|
751
|
+
I'll send my proper hello once the server's up — should
|
|
752
|
+
only be a few seconds.
|
|
753
|
+
|
|
754
|
+
b. Updates (UPDATES_TOPIC_ID):
|
|
755
|
+
"Updates is where I'll post automated status — job runs,
|
|
756
|
+
sync notifications, anything informational that doesn't
|
|
757
|
+
need a response from you."
|
|
568
758
|
|
|
569
|
-
|
|
759
|
+
c. Dashboard (DASHBOARD_TOPIC_ID):
|
|
760
|
+
"Dashboard is where I'll post the link to my web dashboard
|
|
761
|
+
once a tunnel is up. You'll be able to monitor sessions
|
|
762
|
+
from your phone."
|
|
763
|
+
|
|
764
|
+
d. Attention (ATTENTION_TOPIC_ID):
|
|
765
|
+
"Attention is for things you need to look at — failed jobs,
|
|
766
|
+
missing credentials, anything urgent. I'll only post here
|
|
767
|
+
when something actually needs you."
|
|
768
|
+
|
|
769
|
+
All four via:
|
|
770
|
+
curl -s -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \\
|
|
771
|
+
-H 'Content-Type: application/json' \\
|
|
772
|
+
-d '{"chat_id": "<FORUM_CHAT_ID>",
|
|
773
|
+
"message_thread_id": <TOPIC_ID>,
|
|
774
|
+
"text": "<intro text>"}'
|
|
775
|
+
|
|
776
|
+
Capture the Lifeline intro's result.message_id as
|
|
777
|
+
LIFELINE_INTRO_MESSAGE_ID — used in 14b for pinning.
|
|
778
|
+
|
|
779
|
+
14b. Pin the Lifeline intro so users scrolling back later don't
|
|
780
|
+
lose the orientation. Requires admin rights from step 12b;
|
|
781
|
+
non-fatal if 12b skipped.
|
|
782
|
+
|
|
783
|
+
curl -s -X POST "https://api.telegram.org/bot<TOKEN>/pinChatMessage" \\
|
|
784
|
+
-H 'Content-Type: application/json' \\
|
|
785
|
+
-d '{"chat_id": "<FORUM_CHAT_ID>",
|
|
786
|
+
"message_id": <LIFELINE_INTRO_MESSAGE_ID>,
|
|
787
|
+
"disable_notification": true}'
|
|
788
|
+
|
|
789
|
+
If response.ok is false, narrate "Couldn't pin the Lifeline
|
|
790
|
+
intro" and continue. NOT AGENTIC_FAILED.
|
|
791
|
+
|
|
792
|
+
15. Write the config. Read the existing .instar/config.json. Filter
|
|
570
793
|
out any existing { type: "telegram" } entries. Push:
|
|
571
794
|
{ type: "telegram", enabled: true,
|
|
572
|
-
config: {
|
|
573
|
-
|
|
795
|
+
config: {
|
|
796
|
+
token: "<TOKEN>",
|
|
797
|
+
chatId: "<FORUM_CHAT_ID>",
|
|
798
|
+
lifelineTopicId: <LIFELINE_TOPIC_ID>,
|
|
799
|
+
pollIntervalMs: 2000,
|
|
800
|
+
stallTimeoutMinutes: 5
|
|
801
|
+
} }
|
|
574
802
|
Write the file back (atomic-ish: tmp file + rename is fine).
|
|
575
803
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
804
|
+
15b. chmod the config file to 0600 since it now contains the bot
|
|
805
|
+
token (credential material). Default umask leaves it
|
|
806
|
+
world-readable.
|
|
807
|
+
|
|
808
|
+
chmod 0600 .instar/config.json
|
|
809
|
+
|
|
810
|
+
16. Verify your write succeeded by re-reading the file and confirming
|
|
811
|
+
the messaging entry has token, chatId, AND lifelineTopicId all
|
|
812
|
+
populated. If not, tell the user "Couldn't save the Telegram
|
|
813
|
+
config — switching to manual." Output:
|
|
581
814
|
AGENTIC_FAILED: config-write-failed
|
|
582
815
|
and exit.
|
|
583
816
|
|
|
584
|
-
|
|
585
|
-
"Telegram is connected.
|
|
586
|
-
you in
|
|
587
|
-
|
|
588
|
-
|
|
817
|
+
17. Tell the user briefly:
|
|
818
|
+
"Telegram is connected. ${agentName}'s ready in the group —
|
|
819
|
+
you'll see its proper hello in the Lifeline topic once the
|
|
820
|
+
server starts."
|
|
821
|
+
Then exit cleanly.
|
|
589
822
|
|
|
590
823
|
FAILURE MODE: at ANY step you cannot recover from, FIRST tell the
|
|
591
824
|
user in plain English what happened (one sentence, no jargon), THEN
|
|
@@ -616,6 +849,76 @@ export function verifyTelegramConfig(projectDir) {
|
|
|
616
849
|
return false;
|
|
617
850
|
}
|
|
618
851
|
}
|
|
852
|
+
/**
|
|
853
|
+
* Send the agent's personal "first hello" to the Lifeline topic
|
|
854
|
+
* after the server has started. This is SKILL.md's "magic moment"
|
|
855
|
+
* — the agent's first words to the user, in voice, using their
|
|
856
|
+
* actual name + role + the user's name.
|
|
857
|
+
*
|
|
858
|
+
* Reads token + chatId + lifelineTopicId from the just-written
|
|
859
|
+
* config.json. Silently no-ops if any are missing (Telegram wasn't
|
|
860
|
+
* configured, or the manual backstop didn't write lifelineTopicId).
|
|
861
|
+
*
|
|
862
|
+
* Exported for testing.
|
|
863
|
+
*/
|
|
864
|
+
export async function runSendLifelineGreeting(answers, options) {
|
|
865
|
+
const configPath = path.join(options.projectDir, '.instar', 'config.json');
|
|
866
|
+
let token = '';
|
|
867
|
+
let chatId = '';
|
|
868
|
+
let lifelineTopicId = 0;
|
|
869
|
+
try {
|
|
870
|
+
const raw = fs.readFileSync(configPath, 'utf-8');
|
|
871
|
+
const config = JSON.parse(raw);
|
|
872
|
+
const tg = (config.messaging || []).find((m) => m.type === 'telegram');
|
|
873
|
+
if (!tg?.config)
|
|
874
|
+
return {};
|
|
875
|
+
token = tg.config.token ?? '';
|
|
876
|
+
chatId = tg.config.chatId ?? '';
|
|
877
|
+
lifelineTopicId = tg.config.lifelineTopicId ?? 0;
|
|
878
|
+
}
|
|
879
|
+
catch {
|
|
880
|
+
return {};
|
|
881
|
+
}
|
|
882
|
+
if (!token || !chatId || !lifelineTopicId) {
|
|
883
|
+
// No Telegram configured, or partial config (manual backstop
|
|
884
|
+
// didn't capture chat id). Silent skip.
|
|
885
|
+
return {};
|
|
886
|
+
}
|
|
887
|
+
const agentName = (answers.agentName || 'your agent').trim();
|
|
888
|
+
const userName = (answers.userName || 'there').trim();
|
|
889
|
+
const autonomy = answers.autonomy || 'proactive';
|
|
890
|
+
const autonomyBlurb = autonomy === 'guided'
|
|
891
|
+
? 'I\'ll check with you before doing things.'
|
|
892
|
+
: autonomy === 'autonomous'
|
|
893
|
+
? 'I\'ll own outcomes end-to-end and report back when something needs you.'
|
|
894
|
+
: 'I\'ll take initiative on obvious next steps and ask when uncertain.';
|
|
895
|
+
const greeting = `Hey ${userName}, ${agentName} here — server's up and I'm online.\n\n${autonomyBlurb}\n\nAnything we set up just now — name, focus, autonomy, messaging — you can change anytime just by chatting me. What would you like to work on first?`;
|
|
896
|
+
try {
|
|
897
|
+
// RULE 3: EXEMPT — this is a fire-and-forget POST to send a
|
|
898
|
+
// wizard-completion greeting, NOT a state-detection probe.
|
|
899
|
+
// Failure is silently swallowed (non-fatal) so there's no
|
|
900
|
+
// detection-result branching to canary against.
|
|
901
|
+
const res = await fetch(`https://api.telegram.org/bot${encodeURIComponent(token)}/sendMessage`, {
|
|
902
|
+
method: 'POST',
|
|
903
|
+
headers: { 'Content-Type': 'application/json' },
|
|
904
|
+
body: JSON.stringify({
|
|
905
|
+
chat_id: chatId,
|
|
906
|
+
message_thread_id: lifelineTopicId,
|
|
907
|
+
text: greeting,
|
|
908
|
+
}),
|
|
909
|
+
});
|
|
910
|
+
const data = (await res.json());
|
|
911
|
+
if (data.ok) {
|
|
912
|
+
console.log();
|
|
913
|
+
console.log(pc.green(` ✓ ${agentName} said hello in the Lifeline topic.`));
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
catch {
|
|
917
|
+
// Non-fatal — server is up, agent will reach out on its own
|
|
918
|
+
// schedule. Don't block the wizard's completion.
|
|
919
|
+
}
|
|
920
|
+
return {};
|
|
921
|
+
}
|
|
619
922
|
/**
|
|
620
923
|
* Telegram setup — instar-native readline backstop (v1.2.15 flow).
|
|
621
924
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-driver.js","sourceRoot":"","sources":["../../../src/commands/setup-wizard/codex-driver.ts"],"names":[],"mappings":"AAAA;;;;;;;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AAK,CAAC,QAAQ,CAAC,CAAC,CAAC;YACtC,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5B,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAChE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAChC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAChC,SAAS;QACX,CAAC;QAED,wBAAwB;QACxB,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACnE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/D,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChC,SAAS,GAAG,MAAM,CAAC;IACrB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.2.
|
|
4
|
+
"generatedAt": "2026-05-22T03:32:05.394Z",
|
|
5
|
+
"instarVersion": "1.2.20",
|
|
6
6
|
"entryCount": 191,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Upgrade Guide — v1.2.19 (Telegram: privacy off, Forum mode, topics, intros)
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
<!-- patch = bug fixes, refactors, test additions, doc updates -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
**Fix: the Codex agentic Telegram path now produces a working
|
|
9
|
+
messaging configuration end-to-end.**
|
|
10
|
+
|
|
11
|
+
v1.2.18 got Codex to walk through setup conversationally but the
|
|
12
|
+
resulting bot+group combination didn't actually work for
|
|
13
|
+
messaging. Three root causes uncovered on real-user retest:
|
|
14
|
+
|
|
15
|
+
1. Bot privacy mode left ON by BotFather default →
|
|
16
|
+
`can_read_all_group_messages: false` → bot can't see user
|
|
17
|
+
messages in the group.
|
|
18
|
+
2. Group created as "basic group", not "supergroup" → Forum mode
|
|
19
|
+
impossible → server-side `ensureLifelineTopic` etc. fail
|
|
20
|
+
silently.
|
|
21
|
+
3. No system topics created → no Lifeline → no agent presence
|
|
22
|
+
in the group.
|
|
23
|
+
|
|
24
|
+
Three new steps in the Codex prompt:
|
|
25
|
+
|
|
26
|
+
1. **Disable privacy** via /setprivacy in BotFather. Verifies via
|
|
27
|
+
`bot<TOKEN>/getMe` (confirms
|
|
28
|
+
`can_read_all_group_messages === true`).
|
|
29
|
+
2. **Enable Forum/Topics** on the group via Telegram Web UI
|
|
30
|
+
(group title → edit → Topics toggle). Auto-converts to
|
|
31
|
+
supergroup and changes chatId to -100-prefixed. Verifies via
|
|
32
|
+
`getUpdates` (confirms `chat.is_forum === true`).
|
|
33
|
+
3. **Create 4 system topics + seed intros** via Bot API:
|
|
34
|
+
- 🛡️ Lifeline (color 9367192) — main channel.
|
|
35
|
+
- 📢 Updates (color 7322096) — automated status.
|
|
36
|
+
- 📊 Dashboard (color 7322096) — web dashboard link.
|
|
37
|
+
- 🔔 Attention (color 16766590) — urgent things.
|
|
38
|
+
Each topic gets a 1-2 sentence first-person intro via
|
|
39
|
+
`sendMessage` with `message_thread_id`.
|
|
40
|
+
|
|
41
|
+
Config write now persists `lifelineTopicId` alongside
|
|
42
|
+
`token`/`chatId`. Server's `ensureLifelineTopic` reuses the
|
|
43
|
+
existing topic instead of creating a duplicate.
|
|
44
|
+
|
|
45
|
+
Each new step has an explicit failure sentinel
|
|
46
|
+
(`privacy-not-disabled`, `forum-mode-not-enabled`,
|
|
47
|
+
`topics-create-failed`) for fast-fail to the readline backstop.
|
|
48
|
+
|
|
49
|
+
Spec: `specs/dev-infrastructure/telegram-privacy-topics-intros.md`.
|
|
50
|
+
ELI16: `specs/dev-infrastructure/telegram-privacy-topics-intros.eli16.md`.
|
|
51
|
+
Side-effects: `upgrades/side-effects/fix-telegram-privacy-topics-intros.md`.
|
|
52
|
+
|
|
53
|
+
## What to Tell Your User
|
|
54
|
+
|
|
55
|
+
After setup, your bot can read messages in the group (privacy is
|
|
56
|
+
disabled), the group has organized topic threads, and each
|
|
57
|
+
system topic starts with a friendly intro from your agent
|
|
58
|
+
explaining what it's for. The first message you send in Lifeline
|
|
59
|
+
will reach the agent and get a real response.
|
|
60
|
+
|
|
61
|
+
## Summary of New Capabilities
|
|
62
|
+
|
|
63
|
+
Same agentic flow; now produces a fully-working result instead
|
|
64
|
+
of a half-configured one.
|
|
65
|
+
|
|
66
|
+
## Evidence
|
|
67
|
+
|
|
68
|
+
Reproduction prior: v1.2.18 install left the bot with
|
|
69
|
+
`can_read_all_group_messages: false`. User messaged the group;
|
|
70
|
+
`getUpdates` returned empty results array. No server-side
|
|
71
|
+
delivery confirmation.
|
|
72
|
+
|
|
73
|
+
After fix: 5 new unit canary tests cover the privacy-off
|
|
74
|
+
+ Forum + topics + intros + lifelineTopicId additions. All 25
|
|
75
|
+
codex-playwright-telegram tests pass; existing 37 wizard tests
|
|
76
|
+
also pass.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Upgrade Guide — v1.2.20 (wizard audit bundle — 10 items)
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
<!-- patch = bug fixes, refactors, test additions, doc updates -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
**Consolidated 10-item bundle from the v1.2.19 audit of the
|
|
9
|
+
Claude SKILL.md vs the Codex agentic Telegram prompt.**
|
|
10
|
+
|
|
11
|
+
After v1.2.19 closed the three end-to-end-blocker issues
|
|
12
|
+
(privacy off, Forum mode, system topics + intros), an audit
|
|
13
|
+
catalogued 14 gaps where the Codex prompt fell short of the
|
|
14
|
+
Claude wizard's coverage. This release ships 10 of those
|
|
15
|
+
(5 high-priority UX/identity, 5 medium-priority polish +
|
|
16
|
+
security). The 4 deferred items need separate decisions
|
|
17
|
+
(images, command vocabulary, etc.).
|
|
18
|
+
|
|
19
|
+
### High-priority (5)
|
|
20
|
+
|
|
21
|
+
1. **Agent name flows into the prompt as the bot display
|
|
22
|
+
name.** Pre-fix bots were named "Instar Agent" in the
|
|
23
|
+
user's Telegram contacts regardless of what they named
|
|
24
|
+
their agent in the wizard. New `TelegramAgenticContext`
|
|
25
|
+
plumbs `agentName`, `userName`, `agentRole` from the
|
|
26
|
+
conversational phases into the prompt; step 6 uses
|
|
27
|
+
`agentName` instead of hardcoded text.
|
|
28
|
+
|
|
29
|
+
2. **Richer Lifeline orientation message.** Pre-fix the first
|
|
30
|
+
message in the Lifeline topic was a one-line label. Now a
|
|
31
|
+
multi-paragraph greeting addresses the user by name,
|
|
32
|
+
explains how topics work, invites them to ask for new
|
|
33
|
+
topics, and hints at the post-server-start "magic moment"
|
|
34
|
+
greeting.
|
|
35
|
+
|
|
36
|
+
3. **Post-server "magic moment" agent greeting** (the state-
|
|
37
|
+
machine `send-greeting` action was a no-op). Now sends a
|
|
38
|
+
personalized 3-paragraph greeting in the Lifeline topic
|
|
39
|
+
AFTER the server starts. Uses the agent's name, the user's
|
|
40
|
+
name, the autonomy choice, and the "settings can be
|
|
41
|
+
changed by chatting me" promise. Per SKILL.md Phase 5b:
|
|
42
|
+
"this is the magic moment — the agent comes alive."
|
|
43
|
+
|
|
44
|
+
4. **Bot promoted to group admin** via Playwright UI. Without
|
|
45
|
+
admin rights, pinning + topic management silently fail.
|
|
46
|
+
Non-fatal: if promotion fails, narrate and continue.
|
|
47
|
+
|
|
48
|
+
5. **CRITICAL CREDENTIAL HYGIENE rule** in prompt preamble.
|
|
49
|
+
Forbids printing the bot token to the terminal even in
|
|
50
|
+
error messages; gives the regex pattern; demands
|
|
51
|
+
`[REDACTED]` substitution.
|
|
52
|
+
|
|
53
|
+
### Medium-priority (5)
|
|
54
|
+
|
|
55
|
+
6. **/setdescription** — bot profile description in agent
|
|
56
|
+
voice + role.
|
|
57
|
+
|
|
58
|
+
7. **/setabouttext** — short identity line in chat header
|
|
59
|
+
(120-char cap).
|
|
60
|
+
|
|
61
|
+
8. **Pin Lifeline orientation message** so users scrolling
|
|
62
|
+
back later don't lose context. Requires admin rights from
|
|
63
|
+
#4; non-fatal if missing.
|
|
64
|
+
|
|
65
|
+
9. **chmod 0600 on .instar/config.json** after writing the
|
|
66
|
+
token. Default umask leaves it world-readable.
|
|
67
|
+
|
|
68
|
+
10. **Two-call /getUpdates flush** pattern in step 12 — drain
|
|
69
|
+
stale long-poll backlog before verifying Forum mode.
|
|
70
|
+
Robust against the re-install case where another instar
|
|
71
|
+
instance is polling the same bot.
|
|
72
|
+
|
|
73
|
+
### Deferred (4 items)
|
|
74
|
+
|
|
75
|
+
Bot profile picture, group photo, `/setcommands`, group
|
|
76
|
+
description, browser-close — all need separate decisions
|
|
77
|
+
before they can ship. Tracked in the spec's "out of scope"
|
|
78
|
+
section.
|
|
79
|
+
|
|
80
|
+
Spec: `specs/dev-infrastructure/wizard-audit-bundle.md`.
|
|
81
|
+
ELI16: `specs/dev-infrastructure/wizard-audit-bundle.eli16.md`.
|
|
82
|
+
Side-effects: `upgrades/side-effects/feat-wizard-audit-bundle.md`.
|
|
83
|
+
|
|
84
|
+
## What to Tell Your User
|
|
85
|
+
|
|
86
|
+
The Telegram setup is now feature-complete versus the Claude
|
|
87
|
+
wizard's coverage. Your bot's contact name matches the agent
|
|
88
|
+
name you picked. The first message in Lifeline is a real
|
|
89
|
+
orienting greeting, and your agent says hello in voice once
|
|
90
|
+
the server's up. The bot has admin rights so it can manage
|
|
91
|
+
topics. Token never gets printed to your terminal, and the
|
|
92
|
+
config file is mode 0600.
|
|
93
|
+
|
|
94
|
+
## Summary of New Capabilities
|
|
95
|
+
|
|
96
|
+
10 distinct upgrades to the Codex agentic Telegram path. No
|
|
97
|
+
new modules or abstractions — all changes live inside the
|
|
98
|
+
existing `codex-driver.ts`.
|
|
99
|
+
|
|
100
|
+
## Evidence
|
|
101
|
+
|
|
102
|
+
Audit: 14 findings catalogued by research subagent, published
|
|
103
|
+
via tunnel and reviewed by Justin pre-implementation.
|
|
104
|
+
|
|
105
|
+
Implementation: 81 wizard tests pass locally (11 new for
|
|
106
|
+
v1.2.20 additions, including coverage of agentName-as-display-
|
|
107
|
+
name, /setdescription, /setabouttext, admin promotion, pin,
|
|
108
|
+
chmod, getUpdates flush, credential hygiene rule, defensive
|
|
109
|
+
defaults, and the new `runSendLifelineGreeting` helper for
|
|
110
|
+
the magic-moment greeting).
|
|
111
|
+
|
|
112
|
+
Manual end-to-end re-test on Codex install path pending on
|
|
113
|
+
publish.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Side-effects review — Wizard audit bundle (v1.2.20)
|
|
2
|
+
|
|
3
|
+
Per L6. Seven dimensions.
|
|
4
|
+
|
|
5
|
+
## 1. Over-block / under-block
|
|
6
|
+
|
|
7
|
+
Before: UNDER on 10 distinct items surfaced by the audit. Each
|
|
8
|
+
was a separate UX/security gap with its own failure mode (wrong
|
|
9
|
+
bot name in contacts, missing "agent comes alive" moment, no
|
|
10
|
+
admin rights, no token redaction, etc).
|
|
11
|
+
|
|
12
|
+
After: precisely targeted. Each of the 10 audit items adds a
|
|
13
|
+
scoped step to the Codex prompt or wires a state-machine no-op.
|
|
14
|
+
Every step has explicit non-fatal vs AGENTIC_FAILED semantics:
|
|
15
|
+
core identity steps (agentName as display name, admin promotion)
|
|
16
|
+
fail fast; polish steps (/setdescription, /setabouttext, pin)
|
|
17
|
+
narrate and continue. The verifier-based dispatch is unchanged.
|
|
18
|
+
|
|
19
|
+
## 2. Level-of-abstraction fit
|
|
20
|
+
|
|
21
|
+
One new exported interface (`TelegramAgenticContext`), one
|
|
22
|
+
function-signature change (`buildTelegramAgenticPrompt(projectDir,
|
|
23
|
+
ctx)`), one new exported helper (`runSendLifelineGreeting`). All
|
|
24
|
+
within the existing `src/commands/setup-wizard/codex-driver.ts`
|
|
25
|
+
module. No new modules, no new abstractions.
|
|
26
|
+
|
|
27
|
+
The 10 audit items map cleanly into existing structural slots:
|
|
28
|
+
- 8 are prompt-content additions (steps 9b/9c/12b/14a-rewrite/
|
|
29
|
+
14b/15b + the AGENT CONTEXT preamble + CRITICAL CREDENTIAL
|
|
30
|
+
HYGIENE preamble + two-call getUpdates flush in step 12).
|
|
31
|
+
- 1 is the state-machine `send-greeting` action's wiring
|
|
32
|
+
(formerly a no-op).
|
|
33
|
+
- 1 is the action dispatcher passing `answers` into
|
|
34
|
+
`runTelegramAgentic`.
|
|
35
|
+
|
|
36
|
+
## 3. Signal vs Authority compliance
|
|
37
|
+
|
|
38
|
+
- `TelegramAgenticContext` (agentName / userName / agentRole) is
|
|
39
|
+
a SIGNAL flowing from the conversational phases of the
|
|
40
|
+
state-machine to the Codex prompt. Fully derived from user
|
|
41
|
+
answers.
|
|
42
|
+
- The Bot API's `getMe`, `getChatMember`, and `createForumTopic`
|
|
43
|
+
responses are AUTHORITIES for "did this step take effect."
|
|
44
|
+
The prompt explicitly verifies state from these.
|
|
45
|
+
- `verifyTelegramConfig` reading `.instar/config.json` after
|
|
46
|
+
spawn end remains the AUTHORITY for "did the agentic path
|
|
47
|
+
succeed."
|
|
48
|
+
- Token redaction is a behavioral SIGNAL; the actual leak risk
|
|
49
|
+
AUTHORITY is whether any prose Codex generates contains the
|
|
50
|
+
pattern. Tests assert the prompt contains the rule; a future
|
|
51
|
+
audit could add a stdout-scrub pass for defense-in-depth.
|
|
52
|
+
|
|
53
|
+
## 4. Interactions with adjacent systems
|
|
54
|
+
|
|
55
|
+
- **State-machine `send-greeting` action**: previously
|
|
56
|
+
`return {};`. Now calls `runSendLifelineGreeting`. No
|
|
57
|
+
state-graph change.
|
|
58
|
+
- **`runTelegramAgentic` signature**: gained `answers` parameter.
|
|
59
|
+
Only caller is the dispatcher in `runAction` — already passes
|
|
60
|
+
`answers` to other actions.
|
|
61
|
+
- **`buildTelegramAgenticPrompt`**: signature changed (added
|
|
62
|
+
optional `ctx`). Existing call site updated. The exported test
|
|
63
|
+
ID-checked the no-context-passed default path.
|
|
64
|
+
- **`writeTelegramConfig`** (used by readline backstop):
|
|
65
|
+
unchanged.
|
|
66
|
+
- **`verifyTelegramConfig`**: unchanged.
|
|
67
|
+
- **TOPIC_STYLE constants in TelegramAdapter.ts**: still hard-
|
|
68
|
+
coded in the prompt (audit's drift item to revisit later;
|
|
69
|
+
out-of-scope for v1.2.20).
|
|
70
|
+
- **Existing test suite**: one test wording update ("intro
|
|
71
|
+
message" → "orienting message"). 11 new tests for v1.2.20
|
|
72
|
+
additions. 81 wizard-related tests total, all green.
|
|
73
|
+
|
|
74
|
+
## 5. Rollback cost
|
|
75
|
+
|
|
76
|
+
Low-medium. 10 scoped additions inside one file; one new helper;
|
|
77
|
+
one state-machine wiring. `git revert` restores v1.2.19
|
|
78
|
+
behavior. No state migration; no config schema change.
|
|
79
|
+
|
|
80
|
+
## 6. Backwards compatibility / drift surface
|
|
81
|
+
|
|
82
|
+
Fully backwards-compatible.
|
|
83
|
+
|
|
84
|
+
- Codex-runtime users on existing installs: when they re-run
|
|
85
|
+
setup, get the v1.2.20 prompt with correct display name +
|
|
86
|
+
greeting + topics. Existing config carries forward.
|
|
87
|
+
- Claude-runtime users: zero change.
|
|
88
|
+
- Readline backstop (`runTelegramSetup`): zero change.
|
|
89
|
+
- Tests: all existing tests pass; new tests cover new behavior.
|
|
90
|
+
|
|
91
|
+
Drift surface: hard-coded `TOPIC_STYLE` color codes in the
|
|
92
|
+
prompt (from v1.2.19). Canary tests verify; if a future PR
|
|
93
|
+
changes the constants in TelegramAdapter.ts, the prompt drifts.
|
|
94
|
+
Tracked in spec as "out of scope" — could be tightened to
|
|
95
|
+
import from the source of truth.
|
|
96
|
+
|
|
97
|
+
## 7. Authorization / Trust posture
|
|
98
|
+
|
|
99
|
+
No change. Codex spawn flags unchanged. Bot API access
|
|
100
|
+
unchanged. The chmod 0600 step strictly tightens the file
|
|
101
|
+
permission posture (good direction, no new privilege).
|
|
102
|
+
|
|
103
|
+
## Outcome
|
|
104
|
+
|
|
105
|
+
Ship. Closes 10 of the 14 audit-surfaced gaps in one
|
|
106
|
+
consolidated update. Each item independently small; together
|
|
107
|
+
they bring the Codex agentic path to feature parity with the
|
|
108
|
+
Claude wizard's Telegram phase on every dimension Justin
|
|
109
|
+
flagged. 81 wizard tests pass; lint + tsc clean.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Side-effects review — Telegram privacy + Forum + topics + intros
|
|
2
|
+
|
|
3
|
+
Per L6. Seven dimensions.
|
|
4
|
+
|
|
5
|
+
## 1. Over-block / under-block
|
|
6
|
+
|
|
7
|
+
Before: UNDER on three counts.
|
|
8
|
+
- Bot privacy mode left ON → `can_read_all_group_messages: false`
|
|
9
|
+
→ no group messages reach the bot → server polling sees nothing
|
|
10
|
+
→ user message sits in the void.
|
|
11
|
+
- Group is "basic" not "supergroup" → topic threads impossible
|
|
12
|
+
→ instar's server-side topic-ensure functions silently fail.
|
|
13
|
+
- No system topics created → no Lifeline → server can't seed
|
|
14
|
+
agent's first greeting → no "agent comes alive" moment.
|
|
15
|
+
|
|
16
|
+
After: precisely targeted. Three new prompt steps + their failure
|
|
17
|
+
sentinels. The agentic path either reaches a fully-working state
|
|
18
|
+
(privacy off + Forum enabled + 4 topics + intros + config
|
|
19
|
+
persisted) or it bails to the readline backstop. No silent partial-
|
|
20
|
+
success states.
|
|
21
|
+
|
|
22
|
+
## 2. Level-of-abstraction fit
|
|
23
|
+
|
|
24
|
+
Pure prompt-content change. All new behavior described in the
|
|
25
|
+
prompt's natural language + curl/UI instructions Codex already
|
|
26
|
+
understands. No new helper functions, no new abstractions.
|
|
27
|
+
|
|
28
|
+
The `writeTelegramConfig` helper used by the readline backstop is
|
|
29
|
+
unchanged (it still writes token + chatId only). The agentic path
|
|
30
|
+
writes its own config inline via curl-like bash steps in the
|
|
31
|
+
prompt — which is fine because the verifier checks the result
|
|
32
|
+
authoritatively.
|
|
33
|
+
|
|
34
|
+
## 3. Signal vs Authority compliance
|
|
35
|
+
|
|
36
|
+
- The user's intent SIGNAL (run the Telegram agentic flow) is
|
|
37
|
+
unchanged.
|
|
38
|
+
- The bot's privacy state, the group's forum state, and the
|
|
39
|
+
topic-creation results are all AUTHORITATIVE Telegram API
|
|
40
|
+
responses. The prompt's verification steps query them directly
|
|
41
|
+
(`getMe`, `getUpdates`, `createForumTopic` response.ok).
|
|
42
|
+
- `verifyTelegramConfig` is the final AUTHORITY for "did the
|
|
43
|
+
agentic path succeed." Unchanged contract.
|
|
44
|
+
- The TOPIC_STYLE constants in `src/messaging/TelegramAdapter.ts`
|
|
45
|
+
are the AUTHORITY for the canonical topic names + colors. The
|
|
46
|
+
prompt hard-codes them. Drift risk: the canary test verifies
|
|
47
|
+
the prompt contains the same color codes the source uses.
|
|
48
|
+
|
|
49
|
+
## 4. Interactions with adjacent systems
|
|
50
|
+
|
|
51
|
+
- **`src/messaging/TelegramAdapter.ts` server-side topic-ensure
|
|
52
|
+
functions** (`ensureLifelineTopic`, `ensureDashboardTopic`,
|
|
53
|
+
`ensureAgentAttentionTopic`, `ensureAgentUpdatesTopic`):
|
|
54
|
+
unchanged. They now find pre-existing topics created by the
|
|
55
|
+
agentic flow rather than creating duplicates. `lifelineTopicId`
|
|
56
|
+
in config tells `ensureLifelineTopic` to reuse the existing
|
|
57
|
+
topic.
|
|
58
|
+
- **Server boot Telegram polling**: now works because privacy is
|
|
59
|
+
off and chatId is the supergroup id.
|
|
60
|
+
- **Readline backstop (`runTelegramSetup`)**: unchanged. Still
|
|
61
|
+
serves as fallback if the agentic path fails. Note: the
|
|
62
|
+
backstop doesn't drive privacy-off or Forum-enable; users on
|
|
63
|
+
the backstop path will hit the same problems Justin hit. A
|
|
64
|
+
follow-up should extend the readline flow with explicit
|
|
65
|
+
manual instructions for the same three steps.
|
|
66
|
+
- **`verifyTelegramConfig`**: unchanged. Still checks token +
|
|
67
|
+
chatId.
|
|
68
|
+
|
|
69
|
+
## 5. Rollback cost
|
|
70
|
+
|
|
71
|
+
Trivial. Prompt content + 5 new test cases. Revert restores the
|
|
72
|
+
v1.2.18 prompt (which doesn't disable privacy / enable Forum /
|
|
73
|
+
create topics).
|
|
74
|
+
|
|
75
|
+
## 6. Backwards compatibility / drift surface
|
|
76
|
+
|
|
77
|
+
Fully backwards-compatible.
|
|
78
|
+
|
|
79
|
+
- Codex-runtime users: get full end-to-end working messaging.
|
|
80
|
+
Previously got bot+group with broken delivery.
|
|
81
|
+
- Claude-runtime users: unchanged.
|
|
82
|
+
- Drift surface: the TOPIC_STYLE colors. If they change in
|
|
83
|
+
`TelegramAdapter.ts`, the prompt's hard-coded values drift.
|
|
84
|
+
Canary catches the divergence. Could be tightened in a follow-
|
|
85
|
+
up by importing TOPIC_STYLE and string-templating the prompt.
|
|
86
|
+
|
|
87
|
+
## 7. Authorization / Trust posture
|
|
88
|
+
|
|
89
|
+
No change. Codex spawn flags and Playwright permissions unchanged.
|
|
90
|
+
Bot API access unchanged.
|
|
91
|
+
|
|
92
|
+
## Outcome
|
|
93
|
+
|
|
94
|
+
Ship. Closes the three real-user blockers from the v1.2.18
|
|
95
|
+
retest. Verifier + sentinels keep the manual backstop reachable
|
|
96
|
+
on any failure. Topic-style colors match the server-side
|
|
97
|
+
canonical TOPIC_STYLE so `ensureLifelineTopic` etc. see existing
|
|
98
|
+
topics on boot.
|