instar 1.3.267 → 1.3.269
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/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/messaging/TelegramAdapter.d.ts +9 -1
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +13 -7
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/monitoring/PromptGate.d.ts +3 -2
- package/dist/monitoring/PromptGate.d.ts.map +1 -1
- package/dist/monitoring/PromptGate.js +77 -0
- package/dist/monitoring/PromptGate.js.map +1 -1
- package/dist/server/DashboardRefreshDiagnostics.d.ts +12 -0
- package/dist/server/DashboardRefreshDiagnostics.d.ts.map +1 -0
- package/dist/server/DashboardRefreshDiagnostics.js +63 -0
- package/dist/server/DashboardRefreshDiagnostics.js.map +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +9 -4
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +73 -73
- package/upgrades/1.3.268.md +55 -0
- package/upgrades/1.3.269.md +24 -0
- package/upgrades/side-effects/dashboard-refresh-diagnostics.md +76 -0
- package/upgrades/side-effects/gemini-interactive-modal-autofill.md +85 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Gemini CLI can still stop on framework-level interactive modals even when an
|
|
9
|
+
autonomous session is otherwise running in YOLO mode. Instar already detected
|
|
10
|
+
and relayed those prompts to Telegram, but the Gemini process remained blocked
|
|
11
|
+
until somebody pressed a key in the tmux pane.
|
|
12
|
+
|
|
13
|
+
Prompt Gate now recognizes Gemini CLI's known safe-default modals before the
|
|
14
|
+
generic relay/classifier path:
|
|
15
|
+
|
|
16
|
+
- loop-detection prompt: keep loop detection enabled;
|
|
17
|
+
- workspace-trust prompt: trust the workspace;
|
|
18
|
+
- install-confirm prompt: accept Gemini CLI's highlighted/default path.
|
|
19
|
+
|
|
20
|
+
The existing Prompt Gate auto-response hook sends the deterministic key directly
|
|
21
|
+
to the session and clears detector state, so autonomous Gemini sessions do not
|
|
22
|
+
freeze on these modals and the prompt does not spam Telegram.
|
|
23
|
+
|
|
24
|
+
Tests cover the loop-detection modal with explicit options and the live no-option
|
|
25
|
+
shape, workspace trust, install confirm, and a generic non-Gemini install prompt
|
|
26
|
+
that must not receive an auto-answer.
|
|
27
|
+
|
|
28
|
+
## What to Tell Your User
|
|
29
|
+
|
|
30
|
+
Gemini should stop freezing on its own safety/setup modals during autonomous
|
|
31
|
+
work. I now answer the known Gemini defaults directly, while generic install or
|
|
32
|
+
human-judgment questions still go through the normal review path.
|
|
33
|
+
|
|
34
|
+
## Summary of New Capabilities
|
|
35
|
+
|
|
36
|
+
- Gemini loop-detection modal is answered by keeping loop detection enabled.
|
|
37
|
+
- Gemini workspace-trust modal is answered by trusting the current workspace.
|
|
38
|
+
- Gemini install-confirm modal uses Gemini CLI's highlighted/default answer.
|
|
39
|
+
|
|
40
|
+
## Evidence
|
|
41
|
+
|
|
42
|
+
Reproduced from the live apprenticeship report: Gemini CLI stopped at the modal
|
|
43
|
+
"A potential loop was detected" and stayed blocked until Justin manually pressed
|
|
44
|
+
Enter. The Prompt Gate path was confirmed in source: detected prompts with
|
|
45
|
+
`autoDismissKey` are answered through `SessionManager.sendKey` before Telegram
|
|
46
|
+
relay/classification.
|
|
47
|
+
|
|
48
|
+
Before: Gemini modals could be relayed to Telegram while the tmux session stayed
|
|
49
|
+
frozen at the modal. After: the known Gemini modal fixtures emit deterministic
|
|
50
|
+
keys in `PromptGate`, so the existing session-send hook answers the modal and
|
|
51
|
+
clears detector state.
|
|
52
|
+
|
|
53
|
+
Verification: focused Prompt Gate/classifier/approver unit tests passed, lint
|
|
54
|
+
passed, the stall-recovery integration suite passed, and Gemini loop/capacity
|
|
55
|
+
e2e lifecycle suites passed.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Dashboard link refresh failures now report actionable diagnostics instead of opaque command failures. The built-in refresh job gate and refresh command use Node's native request support, so they no longer depend on a shell HTTP client being installed. The dashboard-refresh route now reports which layer failed: missing Telegram setup, missing tunnel state, tunnel without a URL, local request failure, or Telegram broadcast failure.
|
|
9
|
+
|
|
10
|
+
The Telegram dashboard broadcast path also stops hiding hard send/edit failures from the scheduled refresh route. Best-effort pinning remains best effort, but failure to deliver the Dashboard message is now visible to the job.
|
|
11
|
+
|
|
12
|
+
## What to Tell Your User
|
|
13
|
+
|
|
14
|
+
Dashboard link refresh failures should now explain what broke and what to check next, instead of showing a vague job failure.
|
|
15
|
+
|
|
16
|
+
## Summary of New Capabilities
|
|
17
|
+
|
|
18
|
+
- The dashboard link refresh job gate and refresh command no longer depend on a shell HTTP client being installed.
|
|
19
|
+
- Dashboard refresh failures include the failed layer, detail, and next step.
|
|
20
|
+
- Telegram dashboard message delivery failures are surfaced to the refresh job instead of being hidden as success.
|
|
21
|
+
|
|
22
|
+
## Evidence
|
|
23
|
+
|
|
24
|
+
Focused diagnostics coverage passed with `tests/unit/dashboard-refresh-diagnostics.test.ts`, and the full TypeScript/lint gate passed.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Side-Effects Review - Dashboard refresh diagnostics
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `dashboard-refresh-diagnostics`
|
|
4
|
+
**Date:** `2026-06-04`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not run - subagent delegation unavailable without explicit user request in this session`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change improves diagnostics for the built-in `dashboard-link-refresh` job and the `/telegram/dashboard-refresh` route. It adds `src/server/DashboardRefreshDiagnostics.ts`, switches the default job gate and command in `src/commands/init.ts` from curl-only shell commands to Node/fetch diagnostic scripts, makes `src/server/routes.ts` return structured failure bodies with stage/detail/nextStep, and makes `src/messaging/TelegramAdapter.ts` throw on hard dashboard broadcast failures instead of swallowing them. Focused coverage lives in `tests/unit/dashboard-refresh-diagnostics.test.ts`.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `src/server/routes.ts` `/telegram/dashboard-refresh` - modified - maps missing Telegram/tunnel state and broadcast failures into explicit HTTP failure responses.
|
|
15
|
+
- `src/messaging/TelegramAdapter.ts` `broadcastDashboardUrl` - modified - treats failure to edit/send the Dashboard message as a hard delivery failure; pinning remains best-effort.
|
|
16
|
+
- `src/commands/init.ts` `dashboard-link-refresh` default job gate and command - modified - chooses diagnostic scripts installed or repaired for built-in legacy jobs.
|
|
17
|
+
- `src/server/DashboardRefreshDiagnostics.ts` generated refresh command - modified - reads the injected auth token from the job environment first and only uses a string-valued config token as fallback.
|
|
18
|
+
|
|
19
|
+
## 1. Over-block
|
|
20
|
+
|
|
21
|
+
The route now returns failure for a hard Telegram dashboard broadcast failure where the previous adapter could log the error and return normally. A legitimate refresh call can therefore fail if Telegram send/edit is unavailable. That is intentional because the job's purpose is delivery of a dashboard link; a false success here is the opaque failure mode being fixed.
|
|
22
|
+
|
|
23
|
+
Named tunnels still skip refresh as before. Agents without Telegram or without a tunnel still receive skipped precondition responses instead of a successful refresh.
|
|
24
|
+
|
|
25
|
+
## 2. Under-block
|
|
26
|
+
|
|
27
|
+
This does not verify that the pinned Telegram message is visible to every user, nor does it validate that the remote tunnel URL actually serves the dashboard after the Telegram message is sent. The route checks local state and Telegram delivery, not end-to-end browser reachability.
|
|
28
|
+
|
|
29
|
+
The diagnostic script reports the response body and common request failures, but it cannot diagnose every OS/network layer beyond the thrown request error. It gives the next local step rather than attempting repair.
|
|
30
|
+
|
|
31
|
+
## 3. Level-of-abstraction fit
|
|
32
|
+
|
|
33
|
+
The change sits at the right layers: the job script diagnoses local execution and HTTP request failures; the route diagnoses server-side preconditions; the Telegram adapter reports hard delivery failure. It does not add a parallel health checker or a new scheduler policy. It uses the existing built-in job repair path in `refreshJobs`, which syncs built-in gate/execute fields while preserving user-tunable schedule/enabled/priority settings.
|
|
34
|
+
|
|
35
|
+
## 4. Signal vs authority compliance
|
|
36
|
+
|
|
37
|
+
Required reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
38
|
+
|
|
39
|
+
- [x] No - this change is structural precondition/request validation, not a brittle judgment gate.
|
|
40
|
+
|
|
41
|
+
The route and script have blocking authority only over malformed or failed infrastructure operations: no Telegram adapter, no tunnel URL, failed HTTP request, or failed Telegram delivery. These are mechanical facts, not semantic judgments about user intent or message meaning. The change does not add a detector that blocks conversational content.
|
|
42
|
+
|
|
43
|
+
## 5. Interactions
|
|
44
|
+
|
|
45
|
+
- **Shadowing:** The route's precondition checks now return structured bodies, but the same preconditions already caused non-success responses. No higher-level authority is bypassed.
|
|
46
|
+
- **Double-fire:** Startup tunnel rebroadcast callers already catch dashboard broadcast failures where they want best-effort behavior. The scheduled refresh route awaits the same adapter method and now receives the hard failure.
|
|
47
|
+
- **Races:** The tunnel URL can disappear between reading `ctx.tunnel.url` and broadcasting; that remains a runtime race. The failure now reports the stage if delivery fails rather than pretending the job succeeded.
|
|
48
|
+
- **Feedback loops:** The built-in legacy job refresh path may update existing built-in `dashboard-link-refresh` execute content on update, which is intended for built-in job implementation details. User-forked job files are not touched by this path.
|
|
49
|
+
|
|
50
|
+
## 6. External surfaces
|
|
51
|
+
|
|
52
|
+
The visible external surface is improved job output and HTTP error JSON for `/telegram/dashboard-refresh`. The Telegram user-facing Dashboard message content is unchanged. The change affects existing agents when the built-in job definition is refreshed, because the built-in `execute.value` is treated as implementation-owned. It does not write persistent state beyond the existing dashboard message ID path when a new Telegram message is successfully sent.
|
|
53
|
+
|
|
54
|
+
The gate and script no longer depend on a shell HTTP client being installed, which improves portability for Gemini/Codex-style environments where the shell path may not include curl.
|
|
55
|
+
|
|
56
|
+
The refresh command now preserves compatibility with externalized auth tokens. Job sessions receive the resolved token in their environment, and the config-file fallback rejects non-string placeholder objects instead of sending them as bearer tokens.
|
|
57
|
+
|
|
58
|
+
## 7. Rollback cost
|
|
59
|
+
|
|
60
|
+
Rollback is a patch revert of the helper, route, adapter, default job command, test, ELI16, release note, and this artifact. No data migration is introduced. Existing agents that already received the improved built-in job command would receive the reverted command on a later update through the same built-in job repair path.
|
|
61
|
+
|
|
62
|
+
## Conclusion
|
|
63
|
+
|
|
64
|
+
The review did not identify a signal-vs-authority violation. The main behavior change is that a dashboard refresh can now fail loudly when Telegram delivery fails; that is the intended correction because silent success was the operationally harmful path. The change is clear to ship with the focused test and lint coverage.
|
|
65
|
+
|
|
66
|
+
## Second-pass review
|
|
67
|
+
|
|
68
|
+
**Reviewer:** `instar-codey separate pass`
|
|
69
|
+
**Independent read of the artifact: concur with constraint**
|
|
70
|
+
|
|
71
|
+
The high-risk checklist would normally call for a delegated reviewer because this touches Telegram delivery. The available subagent tool is policy-limited to explicit user requests for delegation, so no subagent was spawned. A separate read of the code and artifact found the design acceptable: hard delivery failures now surface only for the dashboard refresh operation, while best-effort pinning remains non-fatal and startup callers already catch broadcast errors.
|
|
72
|
+
|
|
73
|
+
## Evidence pointers
|
|
74
|
+
|
|
75
|
+
- `npm test -- --run tests/unit/dashboard-refresh-diagnostics.test.ts` passed.
|
|
76
|
+
- `npm run lint` passed.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Side-effects review — Gemini interactive modal autofill
|
|
2
|
+
|
|
3
|
+
## What changed
|
|
4
|
+
|
|
5
|
+
`PromptGate` now has a structural matcher for known Gemini CLI framework modals
|
|
6
|
+
that block autonomous sessions:
|
|
7
|
+
|
|
8
|
+
- loop detection: sends the explicit "keep loop detection enabled" option when
|
|
9
|
+
visible, otherwise sends `Enter` for the live default path Justin observed;
|
|
10
|
+
- workspace trust: sends the explicit trust/yes/allow option when visible,
|
|
11
|
+
otherwise sends `Enter`;
|
|
12
|
+
- install confirmation: sends `Enter` to accept Gemini CLI's highlighted/default
|
|
13
|
+
response.
|
|
14
|
+
|
|
15
|
+
These matches run before the generic question, selection, and LLM prompt
|
|
16
|
+
detection paths. The existing server wiring already consumes `autoDismissKey` by
|
|
17
|
+
sending that key to the tmux session and skipping the relay/classifier pipeline.
|
|
18
|
+
|
|
19
|
+
## Why
|
|
20
|
+
|
|
21
|
+
The failure mode is a real autonomy wedge. Instar detected the Gemini modal and
|
|
22
|
+
forwarded it to Telegram, but the Gemini CLI process stayed blocked waiting for
|
|
23
|
+
keypress input in the pane. YOLO mode does not suppress these Gemini CLI modals.
|
|
24
|
+
|
|
25
|
+
Loop detection is a safety rail, so the auto-answer keeps it enabled. Workspace
|
|
26
|
+
trust is part of normal agent operation in the bound project. Install-confirm is
|
|
27
|
+
handled as Gemini CLI's own highlighted/default decision, not as a broad "yes to
|
|
28
|
+
any install" rule.
|
|
29
|
+
|
|
30
|
+
## Risk
|
|
31
|
+
|
|
32
|
+
Blast radius is limited to prompt detection. There is no schema, database,
|
|
33
|
+
configuration, route, migration, Telegram adapter, or session-spawn change.
|
|
34
|
+
|
|
35
|
+
The main risk is false positive auto-answering. The patterns are constrained to
|
|
36
|
+
Gemini-specific modal text or Gemini/MCP/tool install context, and the generic
|
|
37
|
+
non-Gemini install fixture proves a plain install question does not receive an
|
|
38
|
+
auto-answer. Existing broad prompt patterns still handle unrelated questions and
|
|
39
|
+
confirmations the same way they did before.
|
|
40
|
+
|
|
41
|
+
The second risk is semantic drift if Gemini CLI changes its wording. The loop
|
|
42
|
+
modal uses the live phrase Justin observed ("A potential loop was detected") and
|
|
43
|
+
falls back to `Enter` when no numbered row is visible. Workspace and install
|
|
44
|
+
patterns also accept option rows where Gemini renders numeric choices.
|
|
45
|
+
|
|
46
|
+
## Framework generality
|
|
47
|
+
|
|
48
|
+
Claude Code and Codex CLI behavior is unchanged. Their existing Prompt Gate
|
|
49
|
+
patterns still run after this new Gemini-specific matcher, and the new matcher
|
|
50
|
+
requires Gemini-specific loop/trust/install context before it emits an
|
|
51
|
+
`autoDismissKey`.
|
|
52
|
+
|
|
53
|
+
This fix is explicitly for `gemini-cli`, and it reaches Gemini sessions through
|
|
54
|
+
the same provider-neutral `PromptGate` and `SessionManager.sendKey` abstraction
|
|
55
|
+
already used by Claude optional-survey dismissal and manual Telegram prompt
|
|
56
|
+
responses.
|
|
57
|
+
|
|
58
|
+
## Tests
|
|
59
|
+
|
|
60
|
+
- Unit: `tests/unit/PromptGate.test.ts` covers Gemini loop detection with
|
|
61
|
+
numbered options, the live no-option loop modal shape, workspace trust,
|
|
62
|
+
install confirmation, and a generic non-Gemini install question that must not
|
|
63
|
+
auto-answer.
|
|
64
|
+
- Unit: existing `InputClassifier` and `AutoApprover` tests stay green, proving
|
|
65
|
+
the normal classification and approval layers were not widened.
|
|
66
|
+
- Focused run: `npm test -- --run tests/unit/PromptGate.test.ts tests/unit/InputClassifier.test.ts tests/unit/AutoApprover.test.ts`
|
|
67
|
+
passed with 95 tests.
|
|
68
|
+
- Integration: `npm test -- --run tests/integration/stall-recovery-e2e.test.ts`
|
|
69
|
+
passed with 12 tests.
|
|
70
|
+
- E2E: `npm test -- --run tests/e2e/gemini-loop-driver-lifecycle.test.ts tests/e2e/gemini-capacity-policy-lifecycle.test.ts`
|
|
71
|
+
passed with 4 tests.
|
|
72
|
+
- Type/lint: `npm run lint` passed.
|
|
73
|
+
|
|
74
|
+
An attempted broader session-management e2e smoke was not used as acceptance
|
|
75
|
+
evidence: `tests/e2e/session-management-e2e.test.ts` hit the existing respawn
|
|
76
|
+
fixture timing/session-loss path (`waitFor timed out after 15000ms`) while 30/31
|
|
77
|
+
tests passed under a longer timeout. That file does not exercise this PromptGate
|
|
78
|
+
matcher and the failure was in tmux respawn injection, not modal detection.
|
|
79
|
+
|
|
80
|
+
## Rollback
|
|
81
|
+
|
|
82
|
+
Revert the PromptGate matcher and tests. No persisted state or migration is
|
|
83
|
+
introduced. Rollback restores the previous behavior where Gemini CLI modals are
|
|
84
|
+
detected/relayed but may remain blocked until a human presses the key in the
|
|
85
|
+
terminal.
|