@0xmaxma/claude-gateway 1.8.3 → 1.8.5
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 +58 -1
- package/config.template.json +5 -3
- package/dist/agent/model-catalog.d.ts.map +1 -1
- package/dist/agent/model-catalog.js +5 -13
- package/dist/agent/model-catalog.js.map +1 -1
- package/dist/agent/runner.d.ts +1 -1
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +22 -3
- package/dist/agent/runner.js.map +1 -1
- package/dist/api/apps-router.d.ts.map +1 -1
- package/dist/api/apps-router.js +31 -9
- package/dist/api/apps-router.js.map +1 -1
- package/dist/api/gateway-router.js +1 -1
- package/dist/api/gateway-router.js.map +1 -1
- package/dist/api/share-router.d.ts +8 -0
- package/dist/api/share-router.d.ts.map +1 -1
- package/dist/api/share-router.js +100 -10
- package/dist/api/share-router.js.map +1 -1
- package/dist/apps/agent-manager.d.ts +35 -2
- package/dist/apps/agent-manager.d.ts.map +1 -1
- package/dist/apps/agent-manager.js +131 -15
- package/dist/apps/agent-manager.js.map +1 -1
- package/dist/apps/installer.d.ts +41 -1
- package/dist/apps/installer.d.ts.map +1 -1
- package/dist/apps/installer.js +52 -3
- package/dist/apps/installer.js.map +1 -1
- package/dist/cli/commands/debug-bundle.d.ts.map +1 -1
- package/dist/cli/commands/debug-bundle.js +9 -52
- package/dist/cli/commands/debug-bundle.js.map +1 -1
- package/dist/cli/commands/gateway.d.ts +6 -1
- package/dist/cli/commands/gateway.d.ts.map +1 -1
- package/dist/cli/commands/gateway.js +14 -3
- package/dist/cli/commands/gateway.js.map +1 -1
- package/dist/cli/commands/logs.d.ts +37 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js +429 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +21 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/logs-dir.d.ts +69 -0
- package/dist/cli/logs-dir.d.ts.map +1 -0
- package/dist/cli/logs-dir.js +166 -0
- package/dist/cli/logs-dir.js.map +1 -0
- package/dist/cli/output.d.ts +34 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +56 -10
- package/dist/cli/output.js.map +1 -1
- package/dist/config/claude-settings.d.ts +41 -0
- package/dist/config/claude-settings.d.ts.map +1 -0
- package/dist/config/claude-settings.js +102 -0
- package/dist/config/claude-settings.js.map +1 -0
- package/dist/config/watcher.d.ts.map +1 -1
- package/dist/config/watcher.js +5 -0
- package/dist/config/watcher.js.map +1 -1
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +52 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +264 -2
- package/dist/logger.js.map +1 -1
- package/dist/session/process.d.ts +43 -1
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +154 -9
- package/dist/session/process.js.map +1 -1
- package/dist/share/share-store.d.ts +45 -4
- package/dist/share/share-store.d.ts.map +1 -1
- package/dist/share/share-store.js +127 -23
- package/dist/share/share-store.js.map +1 -1
- package/dist/shell/bypass-dialog.d.ts +104 -12
- package/dist/shell/bypass-dialog.d.ts.map +1 -1
- package/dist/shell/bypass-dialog.js +146 -14
- package/dist/shell/bypass-dialog.js.map +1 -1
- package/dist/shell/claude-pty-shell.js +29 -4
- package/dist/shell/claude-pty-shell.js.map +1 -1
- package/dist/shell/screen.d.ts +15 -11
- package/dist/shell/screen.d.ts.map +1 -1
- package/dist/shell/screen.js +42 -33
- package/dist/shell/screen.js.map +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -1
- package/mcp/server.ts +2 -2
- package/mcp/tools/image/module.ts +10 -3
- package/mcp/tools/share-file/module.ts +169 -0
- package/mcp/tools/shared/share-client.ts +8 -4
- package/mcp/tools/telegram/receiver-server.ts +12 -2
- package/package.json +1 -1
- package/mcp/tools/share-image/module.ts +0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AAC,MAAM,CAAC;YACP,oBAAoB;QACtB,CAAC;IACH,CAAC;IAEO,cAAc,CAAC,GAAW;QAChC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC1C,IAAI,GAAG,GAAG,KAAK,CAAC,UAAU,IAAI,6BAAqB,IAAI,KAAK,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC;gBAChF,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA/SD,gCA+SC"}
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
* reordering must not send us to "No, exit"), and anything unparseable or
|
|
27
27
|
* ambiguous produces no keystroke at all.
|
|
28
28
|
*
|
|
29
|
-
* This module is the pure decision — kept free of node-pty / screen
|
|
30
|
-
* it is cheap to unit-test in isolation, same pattern as
|
|
31
|
-
* decideProbeAttempt and menu-cancel.ts's decideMenuCancel.
|
|
29
|
+
* This module is the pure detection + decision — kept free of node-pty / screen
|
|
30
|
+
* imports so it is cheap to unit-test in isolation, same pattern as
|
|
31
|
+
* menu-probe.ts's decideProbeAttempt and menu-cancel.ts's decideMenuCancel.
|
|
32
|
+
* ScreenModel.detectDialog() calls isBypassDialogOnScreen() below; see
|
|
32
33
|
* Driver.maybeHandleDialog() in claude-pty-shell.ts for where it is wired in.
|
|
33
34
|
*/
|
|
34
35
|
/**
|
|
@@ -40,6 +41,40 @@
|
|
|
40
41
|
*/
|
|
41
42
|
export declare const BYPASS_ACCEPT_LABEL = "Yes, I accept";
|
|
42
43
|
export declare const BYPASS_DECLINE_LABEL = "No, exit";
|
|
44
|
+
/**
|
|
45
|
+
* The dialog's own confirm affordance, rendered a line or two below the option
|
|
46
|
+
* rows ("Enter to confirm · Esc to cancel"). Only the stable prefix is matched.
|
|
47
|
+
*
|
|
48
|
+
* Required by {@link isBypassDialogOnScreen} for the same reason
|
|
49
|
+
* TUI_REQUEST_TOO_LARGE_DISMISS is required by detectRequestTooLarge(): the
|
|
50
|
+
* labels alone appear in ordinary prose (this very dialog's warning text, a
|
|
51
|
+
* chat reply explaining it, re-injected history quoting it), whereas the
|
|
52
|
+
* footer is the affordance the live overlay renders — and it is exactly the
|
|
53
|
+
* affordance the accepting keystroke relies on, so gating on it keeps
|
|
54
|
+
* detection and the action consistent.
|
|
55
|
+
*/
|
|
56
|
+
export declare const BYPASS_CONFIRM_FOOTER = "Enter to confirm";
|
|
57
|
+
/**
|
|
58
|
+
* The dialog's heading — the same string screen.ts lists first in
|
|
59
|
+
* TUI_BYPASS_PERMS, repeated here for the dependency-free reason above, with a
|
|
60
|
+
* unit test asserting the two never drift apart.
|
|
61
|
+
*
|
|
62
|
+
* Required by {@link isBypassDialogOnScreen} so that predicate is the COMPLETE
|
|
63
|
+
* rule rather than half of one split across two files. See the note there.
|
|
64
|
+
*/
|
|
65
|
+
export declare const BYPASS_HEADING = "Bypass Permissions mode";
|
|
66
|
+
/**
|
|
67
|
+
* How far apart the dialog's own rows may sit before they stop being one block.
|
|
68
|
+
*
|
|
69
|
+
* The real capture has the two options on adjacent rows and the footer two rows
|
|
70
|
+
* below them (one blank row between). These bounds allow a little repaint slack
|
|
71
|
+
* while still requiring the elements to be visually together: without them the
|
|
72
|
+
* "structure" was only an ordering, so an option row, a second option row 15
|
|
73
|
+
* lines further down and any sentence containing "Enter to confirm" below that
|
|
74
|
+
* satisfied it — on a screen of ordinary conversation (review round 2, M3).
|
|
75
|
+
*/
|
|
76
|
+
export declare const BYPASS_MAX_ROW_GAP = 2;
|
|
77
|
+
export declare const BYPASS_MAX_FOOTER_GAP = 3;
|
|
43
78
|
/** Arrow keystrokes used to walk the caret onto the accept row. */
|
|
44
79
|
export declare const BYPASS_KEY_DOWN = "\u001B[B";
|
|
45
80
|
export declare const BYPASS_KEY_UP = "\u001B[A";
|
|
@@ -73,12 +108,12 @@ export declare const BYPASS_MAX_KEYS = 60;
|
|
|
73
108
|
* Consecutive rounds with no dialog on screen before the keystroke ceiling is
|
|
74
109
|
* considered spent on a dialog that is gone.
|
|
75
110
|
*
|
|
76
|
-
* Not 1: detection
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* miss would zero the counter mid-dialog —
|
|
80
|
-
* exists for. Requiring sustained absence costs
|
|
81
|
-
* cooldown round at most.
|
|
111
|
+
* Not 1: detection is structural (see isBypassDialogOnScreen), so a mid-repaint
|
|
112
|
+
* frame — the option rows drawn but the footer not yet, or the caret momentarily
|
|
113
|
+
* on neither row — reads as "no dialog" for a single round while the dialog is
|
|
114
|
+
* still very much up. Resetting on one miss would zero the counter mid-dialog —
|
|
115
|
+
* precisely the case the ceiling exists for. Requiring sustained absence costs
|
|
116
|
+
* the next dialog one extra cooldown round at most.
|
|
82
117
|
*/
|
|
83
118
|
export declare const BYPASS_RESET_AFTER_MISSES = 2;
|
|
84
119
|
export type BypassDialogAction =
|
|
@@ -117,17 +152,74 @@ export interface BypassDialogState {
|
|
|
117
152
|
* Record a round in which no dialog was detected, clearing the keystroke count
|
|
118
153
|
* once the dialog has been absent for BYPASS_RESET_AFTER_MISSES consecutive
|
|
119
154
|
* rounds so the next dialog starts with a full allowance. Tolerating a single
|
|
120
|
-
* miss keeps a one-round detection flicker (a repaint
|
|
121
|
-
*
|
|
155
|
+
* miss keeps a one-round detection flicker (a repaint catching the dialog
|
|
156
|
+
* half-drawn) from silently refilling the allowance mid-dialog.
|
|
122
157
|
*/
|
|
123
158
|
export declare function noteDialogAbsent(state: BypassDialogState): void;
|
|
124
159
|
/** Record a round in which the dialog *was* detected, restarting the miss run. */
|
|
125
160
|
export declare function noteDialogPresent(state: BypassDialogState): void;
|
|
126
161
|
/** Exported only so a unit test can prove the escaping above. */
|
|
127
162
|
export declare function rowPattern(label: string): RegExp;
|
|
163
|
+
/**
|
|
164
|
+
* Is a live, drivable bypass-permissions dialog on this screen?
|
|
165
|
+
*
|
|
166
|
+
* This replaced a positional test — "both marker substrings inside the bottom
|
|
167
|
+
* 20 rows" — which assumed a modal is always anchored to the bottom. This
|
|
168
|
+
* dialog is not: it renders at boot, before there is any conversation to push
|
|
169
|
+
* it down, so on a clean start it sits at the TOP of the screen with the rest
|
|
170
|
+
* blank. Both markers then fall outside the window, detection returns null,
|
|
171
|
+
* nothing is pressed, and the session dies at the 120 s startup timeout and
|
|
172
|
+
* respawns into the same dialog (issue #436). Whether a given boot emitted
|
|
173
|
+
* enough output to push the dialog into the window is what made the wedge look
|
|
174
|
+
* random.
|
|
175
|
+
*
|
|
176
|
+
* The window was never really about position, though — it was a cheap proxy for
|
|
177
|
+
* "this is the live modal, not text that quotes it". Quoted text is a genuine
|
|
178
|
+
* hazard: an agent explaining this dialog, or re-injected conversation history,
|
|
179
|
+
* puts the same characters on the same screen, and a mis-aimed Enter can land on
|
|
180
|
+
* "No, exit" and kill Claude Code unrecoverably. So the proxy is replaced with
|
|
181
|
+
* the thing it was proxying for — structural properties, all position-
|
|
182
|
+
* independent, all read off a verbatim capture of the real dialog:
|
|
183
|
+
*
|
|
184
|
+
* 1. The dialog's heading is somewhere on screen. Cheap substring reject.
|
|
185
|
+
* 2. Both option labels occupy a WHOLE row (findRow's anchored patterns), so
|
|
186
|
+
* prose that mentions them mid-sentence never qualifies.
|
|
187
|
+
* 3. Exactly ONE of those two rows carries the ❯ caret. Zero means the frame
|
|
188
|
+
* is still rendering (or is not a live select); two is a shape we do not
|
|
189
|
+
* understand.
|
|
190
|
+
* 4. The rows and the footer form one BLOCK — the options within
|
|
191
|
+
* BYPASS_MAX_ROW_GAP rows of each other, the footer within
|
|
192
|
+
* BYPASS_MAX_FOOTER_GAP below them. Without this the three elements only
|
|
193
|
+
* had to appear in order, so an option row, an unrelated option row 15
|
|
194
|
+
* lines later and a sentence containing "Enter to confirm" further down
|
|
195
|
+
* still qualified (review round 2, finding M3).
|
|
196
|
+
* 5. The dialog's own confirm footer renders BELOW the option rows.
|
|
197
|
+
* 6. Nothing but blank rows renders below that footer.
|
|
198
|
+
*
|
|
199
|
+
* (6) is the load-bearing one, and it is what the old bottom-region test was
|
|
200
|
+
* actually encoding: a live modal owns the screen. Quoted text never can — the
|
|
201
|
+
* input box, its border and the status bar always render underneath it — so
|
|
202
|
+
* scrollback, a pasted dialog, and re-injected history all fail (6) no matter
|
|
203
|
+
* where on the screen they land.
|
|
204
|
+
*
|
|
205
|
+
* (6) is deliberately ZERO-tolerance: not even a box border may follow the
|
|
206
|
+
* footer. A future Claude Code that draws this dialog inside a box, or paints a
|
|
207
|
+
* status line beneath it, would therefore stop being detected. That is the
|
|
208
|
+
* intended direction of the trade — a miss is fail-safe (the operator sees the
|
|
209
|
+
* dialog, and maybeHandleDialog() now logs a warning naming this exact case),
|
|
210
|
+
* whereas relaxing (6) to tolerate border rows would admit a quoted dialog
|
|
211
|
+
* sitting above an EMPTY input box, whose rows are themselves nothing but
|
|
212
|
+
* border characters. Given "No, exit" is unrecoverable and a visible dialog is
|
|
213
|
+
* not, a miss beats a false accept (review round 2, finding M2 — accepted as
|
|
214
|
+
* accurate, resolved this way rather than by relaxing the rule).
|
|
215
|
+
*
|
|
216
|
+
* Fail-safe in the same direction as before: anything unrecognised reads as "no
|
|
217
|
+
* dialog", which means no keystroke and an operator who simply sees the dialog.
|
|
218
|
+
*/
|
|
219
|
+
export declare function isBypassDialogOnScreen(screenText: string): boolean;
|
|
128
220
|
/**
|
|
129
221
|
* Decide the single keystroke to send at a bypass-permissions dialog, given
|
|
130
|
-
* the screen
|
|
222
|
+
* the screen text the dialog was detected on.
|
|
131
223
|
*
|
|
132
224
|
* Callers send at most one key per call and re-read the screen before the
|
|
133
225
|
* next one (the DIALOG_ACTION_COOLDOWN_MS re-entry in maybeHandleDialog()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bypass-dialog.d.ts","sourceRoot":"","sources":["../../src/shell/bypass-dialog.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bypass-dialog.d.ts","sourceRoot":"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gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAG/D;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAEhE;AAmCD,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAuBlE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,iBAAiB,GACvB,kBAAkB,CA4DpB"}
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
* reordering must not send us to "No, exit"), and anything unparseable or
|
|
28
28
|
* ambiguous produces no keystroke at all.
|
|
29
29
|
*
|
|
30
|
-
* This module is the pure decision — kept free of node-pty / screen
|
|
31
|
-
* it is cheap to unit-test in isolation, same pattern as
|
|
32
|
-
* decideProbeAttempt and menu-cancel.ts's decideMenuCancel.
|
|
30
|
+
* This module is the pure detection + decision — kept free of node-pty / screen
|
|
31
|
+
* imports so it is cheap to unit-test in isolation, same pattern as
|
|
32
|
+
* menu-probe.ts's decideProbeAttempt and menu-cancel.ts's decideMenuCancel.
|
|
33
|
+
* ScreenModel.detectDialog() calls isBypassDialogOnScreen() below; see
|
|
33
34
|
* Driver.maybeHandleDialog() in claude-pty-shell.ts for where it is wired in.
|
|
34
35
|
*/
|
|
35
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.BYPASS_RESET_AFTER_MISSES = exports.BYPASS_MAX_KEYS = exports.BYPASS_KEY_ENTER = exports.BYPASS_KEY_UP = exports.BYPASS_KEY_DOWN = exports.BYPASS_DECLINE_LABEL = exports.BYPASS_ACCEPT_LABEL = void 0;
|
|
37
|
+
exports.BYPASS_RESET_AFTER_MISSES = exports.BYPASS_MAX_KEYS = exports.BYPASS_KEY_ENTER = exports.BYPASS_KEY_UP = exports.BYPASS_KEY_DOWN = exports.BYPASS_MAX_FOOTER_GAP = exports.BYPASS_MAX_ROW_GAP = exports.BYPASS_HEADING = exports.BYPASS_CONFIRM_FOOTER = exports.BYPASS_DECLINE_LABEL = exports.BYPASS_ACCEPT_LABEL = void 0;
|
|
37
38
|
exports.noteDialogAbsent = noteDialogAbsent;
|
|
38
39
|
exports.noteDialogPresent = noteDialogPresent;
|
|
39
40
|
exports.rowPattern = rowPattern;
|
|
41
|
+
exports.isBypassDialogOnScreen = isBypassDialogOnScreen;
|
|
40
42
|
exports.decideBypassDialogAction = decideBypassDialogAction;
|
|
41
43
|
/**
|
|
42
44
|
* The dialog's two option labels. BYPASS_ACCEPT_LABEL is the same string
|
|
@@ -47,6 +49,40 @@ exports.decideBypassDialogAction = decideBypassDialogAction;
|
|
|
47
49
|
*/
|
|
48
50
|
exports.BYPASS_ACCEPT_LABEL = 'Yes, I accept';
|
|
49
51
|
exports.BYPASS_DECLINE_LABEL = 'No, exit';
|
|
52
|
+
/**
|
|
53
|
+
* The dialog's own confirm affordance, rendered a line or two below the option
|
|
54
|
+
* rows ("Enter to confirm · Esc to cancel"). Only the stable prefix is matched.
|
|
55
|
+
*
|
|
56
|
+
* Required by {@link isBypassDialogOnScreen} for the same reason
|
|
57
|
+
* TUI_REQUEST_TOO_LARGE_DISMISS is required by detectRequestTooLarge(): the
|
|
58
|
+
* labels alone appear in ordinary prose (this very dialog's warning text, a
|
|
59
|
+
* chat reply explaining it, re-injected history quoting it), whereas the
|
|
60
|
+
* footer is the affordance the live overlay renders — and it is exactly the
|
|
61
|
+
* affordance the accepting keystroke relies on, so gating on it keeps
|
|
62
|
+
* detection and the action consistent.
|
|
63
|
+
*/
|
|
64
|
+
exports.BYPASS_CONFIRM_FOOTER = 'Enter to confirm';
|
|
65
|
+
/**
|
|
66
|
+
* The dialog's heading — the same string screen.ts lists first in
|
|
67
|
+
* TUI_BYPASS_PERMS, repeated here for the dependency-free reason above, with a
|
|
68
|
+
* unit test asserting the two never drift apart.
|
|
69
|
+
*
|
|
70
|
+
* Required by {@link isBypassDialogOnScreen} so that predicate is the COMPLETE
|
|
71
|
+
* rule rather than half of one split across two files. See the note there.
|
|
72
|
+
*/
|
|
73
|
+
exports.BYPASS_HEADING = 'Bypass Permissions mode';
|
|
74
|
+
/**
|
|
75
|
+
* How far apart the dialog's own rows may sit before they stop being one block.
|
|
76
|
+
*
|
|
77
|
+
* The real capture has the two options on adjacent rows and the footer two rows
|
|
78
|
+
* below them (one blank row between). These bounds allow a little repaint slack
|
|
79
|
+
* while still requiring the elements to be visually together: without them the
|
|
80
|
+
* "structure" was only an ordering, so an option row, a second option row 15
|
|
81
|
+
* lines further down and any sentence containing "Enter to confirm" below that
|
|
82
|
+
* satisfied it — on a screen of ordinary conversation (review round 2, M3).
|
|
83
|
+
*/
|
|
84
|
+
exports.BYPASS_MAX_ROW_GAP = 2;
|
|
85
|
+
exports.BYPASS_MAX_FOOTER_GAP = 3;
|
|
50
86
|
/** Arrow keystrokes used to walk the caret onto the accept row. */
|
|
51
87
|
exports.BYPASS_KEY_DOWN = '\x1b[B';
|
|
52
88
|
exports.BYPASS_KEY_UP = '\x1b[A';
|
|
@@ -80,20 +116,20 @@ exports.BYPASS_MAX_KEYS = 60;
|
|
|
80
116
|
* Consecutive rounds with no dialog on screen before the keystroke ceiling is
|
|
81
117
|
* considered spent on a dialog that is gone.
|
|
82
118
|
*
|
|
83
|
-
* Not 1: detection
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* miss would zero the counter mid-dialog —
|
|
87
|
-
* exists for. Requiring sustained absence costs
|
|
88
|
-
* cooldown round at most.
|
|
119
|
+
* Not 1: detection is structural (see isBypassDialogOnScreen), so a mid-repaint
|
|
120
|
+
* frame — the option rows drawn but the footer not yet, or the caret momentarily
|
|
121
|
+
* on neither row — reads as "no dialog" for a single round while the dialog is
|
|
122
|
+
* still very much up. Resetting on one miss would zero the counter mid-dialog —
|
|
123
|
+
* precisely the case the ceiling exists for. Requiring sustained absence costs
|
|
124
|
+
* the next dialog one extra cooldown round at most.
|
|
89
125
|
*/
|
|
90
126
|
exports.BYPASS_RESET_AFTER_MISSES = 2;
|
|
91
127
|
/**
|
|
92
128
|
* Record a round in which no dialog was detected, clearing the keystroke count
|
|
93
129
|
* once the dialog has been absent for BYPASS_RESET_AFTER_MISSES consecutive
|
|
94
130
|
* rounds so the next dialog starts with a full allowance. Tolerating a single
|
|
95
|
-
* miss keeps a one-round detection flicker (a repaint
|
|
96
|
-
*
|
|
131
|
+
* miss keeps a one-round detection flicker (a repaint catching the dialog
|
|
132
|
+
* half-drawn) from silently refilling the allowance mid-dialog.
|
|
97
133
|
*/
|
|
98
134
|
function noteDialogAbsent(state) {
|
|
99
135
|
state.misses++;
|
|
@@ -133,7 +169,7 @@ function rowPattern(label) {
|
|
|
133
169
|
const ACCEPT_ROW_RE = rowPattern(exports.BYPASS_ACCEPT_LABEL);
|
|
134
170
|
const DECLINE_ROW_RE = rowPattern(exports.BYPASS_DECLINE_LABEL);
|
|
135
171
|
/**
|
|
136
|
-
* Find the option row nearest the bottom of the
|
|
172
|
+
* Find the option row nearest the bottom of the screen. A live modal is the
|
|
137
173
|
* bottom-most thing on screen, so scanning upward from the end means quoted
|
|
138
174
|
* scrollback above it can never be the row we act on.
|
|
139
175
|
*/
|
|
@@ -145,9 +181,93 @@ function findRow(lines, re) {
|
|
|
145
181
|
}
|
|
146
182
|
return null;
|
|
147
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Is a live, drivable bypass-permissions dialog on this screen?
|
|
186
|
+
*
|
|
187
|
+
* This replaced a positional test — "both marker substrings inside the bottom
|
|
188
|
+
* 20 rows" — which assumed a modal is always anchored to the bottom. This
|
|
189
|
+
* dialog is not: it renders at boot, before there is any conversation to push
|
|
190
|
+
* it down, so on a clean start it sits at the TOP of the screen with the rest
|
|
191
|
+
* blank. Both markers then fall outside the window, detection returns null,
|
|
192
|
+
* nothing is pressed, and the session dies at the 120 s startup timeout and
|
|
193
|
+
* respawns into the same dialog (issue #436). Whether a given boot emitted
|
|
194
|
+
* enough output to push the dialog into the window is what made the wedge look
|
|
195
|
+
* random.
|
|
196
|
+
*
|
|
197
|
+
* The window was never really about position, though — it was a cheap proxy for
|
|
198
|
+
* "this is the live modal, not text that quotes it". Quoted text is a genuine
|
|
199
|
+
* hazard: an agent explaining this dialog, or re-injected conversation history,
|
|
200
|
+
* puts the same characters on the same screen, and a mis-aimed Enter can land on
|
|
201
|
+
* "No, exit" and kill Claude Code unrecoverably. So the proxy is replaced with
|
|
202
|
+
* the thing it was proxying for — structural properties, all position-
|
|
203
|
+
* independent, all read off a verbatim capture of the real dialog:
|
|
204
|
+
*
|
|
205
|
+
* 1. The dialog's heading is somewhere on screen. Cheap substring reject.
|
|
206
|
+
* 2. Both option labels occupy a WHOLE row (findRow's anchored patterns), so
|
|
207
|
+
* prose that mentions them mid-sentence never qualifies.
|
|
208
|
+
* 3. Exactly ONE of those two rows carries the ❯ caret. Zero means the frame
|
|
209
|
+
* is still rendering (or is not a live select); two is a shape we do not
|
|
210
|
+
* understand.
|
|
211
|
+
* 4. The rows and the footer form one BLOCK — the options within
|
|
212
|
+
* BYPASS_MAX_ROW_GAP rows of each other, the footer within
|
|
213
|
+
* BYPASS_MAX_FOOTER_GAP below them. Without this the three elements only
|
|
214
|
+
* had to appear in order, so an option row, an unrelated option row 15
|
|
215
|
+
* lines later and a sentence containing "Enter to confirm" further down
|
|
216
|
+
* still qualified (review round 2, finding M3).
|
|
217
|
+
* 5. The dialog's own confirm footer renders BELOW the option rows.
|
|
218
|
+
* 6. Nothing but blank rows renders below that footer.
|
|
219
|
+
*
|
|
220
|
+
* (6) is the load-bearing one, and it is what the old bottom-region test was
|
|
221
|
+
* actually encoding: a live modal owns the screen. Quoted text never can — the
|
|
222
|
+
* input box, its border and the status bar always render underneath it — so
|
|
223
|
+
* scrollback, a pasted dialog, and re-injected history all fail (6) no matter
|
|
224
|
+
* where on the screen they land.
|
|
225
|
+
*
|
|
226
|
+
* (6) is deliberately ZERO-tolerance: not even a box border may follow the
|
|
227
|
+
* footer. A future Claude Code that draws this dialog inside a box, or paints a
|
|
228
|
+
* status line beneath it, would therefore stop being detected. That is the
|
|
229
|
+
* intended direction of the trade — a miss is fail-safe (the operator sees the
|
|
230
|
+
* dialog, and maybeHandleDialog() now logs a warning naming this exact case),
|
|
231
|
+
* whereas relaxing (6) to tolerate border rows would admit a quoted dialog
|
|
232
|
+
* sitting above an EMPTY input box, whose rows are themselves nothing but
|
|
233
|
+
* border characters. Given "No, exit" is unrecoverable and a visible dialog is
|
|
234
|
+
* not, a miss beats a false accept (review round 2, finding M2 — accepted as
|
|
235
|
+
* accurate, resolved this way rather than by relaxing the rule).
|
|
236
|
+
*
|
|
237
|
+
* Fail-safe in the same direction as before: anything unrecognised reads as "no
|
|
238
|
+
* dialog", which means no keystroke and an operator who simply sees the dialog.
|
|
239
|
+
*/
|
|
240
|
+
function isBypassDialogOnScreen(screenText) {
|
|
241
|
+
// The heading gate lives HERE rather than in ScreenModel.detectDialog() so
|
|
242
|
+
// that this predicate is the whole rule. When detectDialog() held it, the
|
|
243
|
+
// action layer re-applied only the structural half, and a screen carrying a
|
|
244
|
+
// perfect dialog shape without the heading produced a live Enter if
|
|
245
|
+
// decideBypassDialogAction() was ever called from anywhere else — the exact
|
|
246
|
+
// drift the two-layer design claimed to prevent (review round 2, finding H1).
|
|
247
|
+
if (!screenText.includes(exports.BYPASS_HEADING))
|
|
248
|
+
return false;
|
|
249
|
+
const lines = screenText.split('\n');
|
|
250
|
+
const accept = findRow(lines, ACCEPT_ROW_RE);
|
|
251
|
+
const decline = findRow(lines, DECLINE_ROW_RE);
|
|
252
|
+
if (!accept || !decline)
|
|
253
|
+
return false;
|
|
254
|
+
// Exactly one caret: equal flags mean either none (still rendering) or both
|
|
255
|
+
// (unrecognised shape). Same rule decideBypassDialogAction() acts on.
|
|
256
|
+
if (accept.caret === decline.caret)
|
|
257
|
+
return false;
|
|
258
|
+
if (Math.abs(accept.line - decline.line) > exports.BYPASS_MAX_ROW_GAP)
|
|
259
|
+
return false;
|
|
260
|
+
const lastOptionRow = Math.max(accept.line, decline.line);
|
|
261
|
+
const footer = lines.findIndex((l, i) => i > lastOptionRow && l.includes(exports.BYPASS_CONFIRM_FOOTER));
|
|
262
|
+
if (footer === -1)
|
|
263
|
+
return false;
|
|
264
|
+
if (footer - lastOptionRow > exports.BYPASS_MAX_FOOTER_GAP)
|
|
265
|
+
return false;
|
|
266
|
+
return lines.slice(footer + 1).every((l) => l.trim() === '');
|
|
267
|
+
}
|
|
148
268
|
/**
|
|
149
269
|
* Decide the single keystroke to send at a bypass-permissions dialog, given
|
|
150
|
-
* the screen
|
|
270
|
+
* the screen text the dialog was detected on.
|
|
151
271
|
*
|
|
152
272
|
* Callers send at most one key per call and re-read the screen before the
|
|
153
273
|
* next one (the DIALOG_ACTION_COOLDOWN_MS re-entry in maybeHandleDialog()),
|
|
@@ -166,6 +286,18 @@ function decideBypassDialogAction(dialogText, state) {
|
|
|
166
286
|
if (state.keys >= exports.BYPASS_MAX_KEYS) {
|
|
167
287
|
return { kind: 'wait', reason: `keystroke budget exhausted after ${state.keys} keys` };
|
|
168
288
|
}
|
|
289
|
+
// The caller only gets here after detectDialog() fired, and both now read the
|
|
290
|
+
// whole screen — so "act only on what was detected" can no longer be enforced
|
|
291
|
+
// by handing this function a narrow region. It is enforced by applying the
|
|
292
|
+
// same structural rule here instead, which also keeps the two layers from
|
|
293
|
+
// drifting apart if either is edited alone.
|
|
294
|
+
if (!isBypassDialogOnScreen(dialogText)) {
|
|
295
|
+
return { kind: 'wait', reason: 'no live bypass dialog on screen' };
|
|
296
|
+
}
|
|
297
|
+
// The checks below are reached only for a screen that already satisfies that
|
|
298
|
+
// rule, so several are belt-and-braces. They are kept deliberately: each one
|
|
299
|
+
// states an invariant this decision depends on, and a keystroke sent on a
|
|
300
|
+
// wrong assumption here can pick "No, exit" and end the session for good.
|
|
169
301
|
const lines = dialogText.split('\n');
|
|
170
302
|
const accept = findRow(lines, ACCEPT_ROW_RE);
|
|
171
303
|
if (!accept)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bypass-dialog.js","sourceRoot":"","sources":["../../src/shell/bypass-dialog.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"bypass-dialog.js","sourceRoot":"","sources":["../../src/shell/bypass-dialog.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;AA0HH,4CAGC;AAGD,8CAEC;AAoCD,gCAIC;AA0ED,wDAuBC;AAeD,4DA+DC;AAvVD;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,eAAe,CAAC;AACtC,QAAA,oBAAoB,GAAG,UAAU,CAAC;AAE/C;;;;;;;;;;;GAWG;AACU,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAExD;;;;;;;GAOG;AACU,QAAA,cAAc,GAAG,yBAAyB,CAAC;AAExD;;;;;;;;;GASG;AACU,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAEvC,mEAAmE;AACtD,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,aAAa,GAAG,QAAQ,CAAC;AACtC,qFAAqF;AACxE,QAAA,gBAAgB,GAAG,IAAI,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACU,QAAA,eAAe,GAAG,EAAE,CAAC;AAElC;;;;;;;;;;GAUG;AACU,QAAA,yBAAyB,GAAG,CAAC,CAAC;AAwB3C;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,KAAwB;IACvD,KAAK,CAAC,MAAM,EAAE,CAAC;IACf,IAAI,KAAK,CAAC,MAAM,IAAI,iCAAyB;QAAE,KAAK,CAAC,IAAI,GA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AAC;IAED,8DAA8D;IAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,wBAAgB,EAAE,CAAC;IAEvF,0EAA0E;IAC1E,2EAA2E;IAC3E,wEAAwE;IACxE,+DAA+D;IAC/D,EAAE;IACF,6EAA6E;IAC7E,wEAAwE;IACxE,4EAA4E;IAC5E,2EAA2E;IAC3E,mCAAmC;IACnC,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACpC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,yCAAyC,EAAE,CAAC;IAC7E,CAAC;IACD,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAe,CAAC,CAAC,CAAC,qBAAa;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -159,6 +159,9 @@ class Driver {
|
|
|
159
159
|
// whose dialog has no row numbers, and the key that accepts (see
|
|
160
160
|
// bypass-dialog.ts). Reset once the dialog leaves the screen.
|
|
161
161
|
this.bypassDialog = { keys: 0, misses: 0 };
|
|
162
|
+
// Latch for the "markers on screen but the dialog did not validate" warning
|
|
163
|
+
// below, so it is reported once per run of such rounds rather than every 2 s.
|
|
164
|
+
this.bypassMarkerWarned = false;
|
|
162
165
|
// In-flight behavioral probe round, advanced synchronously by tick() at a
|
|
163
166
|
// single chokepoint — the same tick-driven pattern as menuCancel and
|
|
164
167
|
// interrupting (review round 2, finding 6; replaced a detached async
|
|
@@ -981,14 +984,36 @@ class Driver {
|
|
|
981
984
|
const dialog = this.screen.detectDialog();
|
|
982
985
|
if (!dialog) {
|
|
983
986
|
// No dialog this round. The keystroke allowance is only refilled once it
|
|
984
|
-
// has been absent for several consecutive rounds:
|
|
985
|
-
//
|
|
986
|
-
//
|
|
987
|
-
//
|
|
987
|
+
// has been absent for several consecutive rounds: detection is structural
|
|
988
|
+
// (see isBypassDialogOnScreen), so a mid-repaint frame can read as absent
|
|
989
|
+
// for a single round while the dialog is still very much up, and refilling
|
|
990
|
+
// there would defeat the allowance entirely.
|
|
988
991
|
(0, bypass_dialog_1.noteDialogAbsent)(this.bypassDialog);
|
|
992
|
+
// A detector that returns null without a word is how #436 stayed hidden:
|
|
993
|
+
// the symptom (a 120 s startup timeout) is three layers away from the
|
|
994
|
+
// cause (detection that never fired), with no breadcrumb in between.
|
|
995
|
+
//
|
|
996
|
+
// Gated on the SAME substring test detectDialog() uses, not on one marker:
|
|
997
|
+
// "Bypass Permissions mode" alone appears in this repo's own README and in
|
|
998
|
+
// any reply discussing the dialog, so warning on it would be noise. Both
|
|
999
|
+
// markers present means we cleared the cheap gate and it was the structural
|
|
1000
|
+
// test that refused — the case actually worth a line. Warned once per run
|
|
1001
|
+
// of such rounds; the common cause is a reply quoting the dialog, which is
|
|
1002
|
+
// precisely what must not attract a keystroke.
|
|
1003
|
+
if (screen_1.TUI_BYPASS_PERMS.every((s) => this.screen.dialogText().includes(s))) {
|
|
1004
|
+
if (!this.bypassMarkerWarned) {
|
|
1005
|
+
this.bypassMarkerWarned = true;
|
|
1006
|
+
logWarn('Bypass Permissions markers on screen but no live dialog validated — not acting ' +
|
|
1007
|
+
'(quoted text, or a dialog shape this build does not recognise)');
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
else {
|
|
1011
|
+
this.bypassMarkerWarned = false;
|
|
1012
|
+
}
|
|
989
1013
|
return;
|
|
990
1014
|
}
|
|
991
1015
|
(0, bypass_dialog_1.noteDialogPresent)(this.bypassDialog);
|
|
1016
|
+
this.bypassMarkerWarned = false;
|
|
992
1017
|
this.lastDialogActionAt = now;
|
|
993
1018
|
if (dialog === 'bypass-permissions') {
|
|
994
1019
|
// --dangerously-skip-permissions is built into the wrapper, so the
|