crewly 1.20.217 → 1.20.218

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.
Files changed (139) hide show
  1. package/config/skills/agent/core/project-tickets/SKILL.md +17 -1
  2. package/config/skills/agent/core/project-tickets/execute.sh +14 -4
  3. package/config/skills/agent/core/project-tickets/execute.test.sh +6 -0
  4. package/dist/backend/backend/src/constants.d.ts +30 -0
  5. package/dist/backend/backend/src/constants.d.ts.map +1 -1
  6. package/dist/backend/backend/src/constants.js +30 -0
  7. package/dist/backend/backend/src/constants.js.map +1 -1
  8. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.controller.d.ts +2 -2
  9. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.controller.d.ts.map +1 -1
  10. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.controller.js +4 -2
  11. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.controller.js.map +1 -1
  12. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.routes.d.ts +1 -1
  13. package/dist/backend/backend/src/controllers/project-tickets/project-tickets.routes.js +1 -1
  14. package/dist/backend/backend/src/index.d.ts.map +1 -1
  15. package/dist/backend/backend/src/index.js +29 -3
  16. package/dist/backend/backend/src/index.js.map +1 -1
  17. package/dist/backend/backend/src/models/Team.d.ts +17 -0
  18. package/dist/backend/backend/src/models/Team.d.ts.map +1 -1
  19. package/dist/backend/backend/src/models/Team.js +28 -10
  20. package/dist/backend/backend/src/models/Team.js.map +1 -1
  21. package/dist/backend/backend/src/scripts/input-guard-classify.d.ts +24 -0
  22. package/dist/backend/backend/src/scripts/input-guard-classify.d.ts.map +1 -1
  23. package/dist/backend/backend/src/scripts/input-guard-classify.js +38 -5
  24. package/dist/backend/backend/src/scripts/input-guard-classify.js.map +1 -1
  25. package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.d.ts +26 -0
  26. package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.d.ts.map +1 -1
  27. package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.js +41 -0
  28. package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.js.map +1 -1
  29. package/dist/backend/backend/src/services/project-tickets/project-ticket.service.d.ts +2 -0
  30. package/dist/backend/backend/src/services/project-tickets/project-ticket.service.d.ts.map +1 -1
  31. package/dist/backend/backend/src/services/project-tickets/project-ticket.service.js +9 -0
  32. package/dist/backend/backend/src/services/project-tickets/project-ticket.service.js.map +1 -1
  33. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-decision.d.ts +17 -0
  34. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-decision.d.ts.map +1 -1
  35. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-decision.js +21 -0
  36. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-decision.js.map +1 -1
  37. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-messages.d.ts.map +1 -1
  38. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-messages.js +1 -0
  39. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-messages.js.map +1 -1
  40. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.js +2 -2
  41. package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.js.map +1 -1
  42. package/dist/backend/backend/src/services/project-tickets/ticket-file.d.ts.map +1 -1
  43. package/dist/backend/backend/src/services/project-tickets/ticket-file.js +20 -1
  44. package/dist/backend/backend/src/services/project-tickets/ticket-file.js.map +1 -1
  45. package/dist/backend/backend/src/services/reconciler/reconciler.service.d.ts.map +1 -1
  46. package/dist/backend/backend/src/services/reconciler/reconciler.service.js +7 -0
  47. package/dist/backend/backend/src/services/reconciler/reconciler.service.js.map +1 -1
  48. package/dist/backend/backend/src/services/session/input-circuit-breaker.d.ts +130 -0
  49. package/dist/backend/backend/src/services/session/input-circuit-breaker.d.ts.map +1 -0
  50. package/dist/backend/backend/src/services/session/input-circuit-breaker.js +180 -0
  51. package/dist/backend/backend/src/services/session/input-circuit-breaker.js.map +1 -0
  52. package/dist/backend/backend/src/services/session/input-guard-known-screens.d.ts +41 -0
  53. package/dist/backend/backend/src/services/session/input-guard-known-screens.d.ts.map +1 -0
  54. package/dist/backend/backend/src/services/session/input-guard-known-screens.js +168 -0
  55. package/dist/backend/backend/src/services/session/input-guard-known-screens.js.map +1 -0
  56. package/dist/backend/backend/src/services/session/input-ledger.d.ts +2 -1
  57. package/dist/backend/backend/src/services/session/input-ledger.d.ts.map +1 -1
  58. package/dist/backend/backend/src/services/session/input-ledger.js +5 -1
  59. package/dist/backend/backend/src/services/session/input-ledger.js.map +1 -1
  60. package/dist/backend/backend/src/services/session/session-command-helper.d.ts +52 -0
  61. package/dist/backend/backend/src/services/session/session-command-helper.d.ts.map +1 -1
  62. package/dist/backend/backend/src/services/session/session-command-helper.js +155 -3
  63. package/dist/backend/backend/src/services/session/session-command-helper.js.map +1 -1
  64. package/dist/backend/backend/src/services/session/tui-input-guard.d.ts +81 -1
  65. package/dist/backend/backend/src/services/session/tui-input-guard.d.ts.map +1 -1
  66. package/dist/backend/backend/src/services/session/tui-input-guard.js +238 -45
  67. package/dist/backend/backend/src/services/session/tui-input-guard.js.map +1 -1
  68. package/dist/backend/backend/src/services/system/input-guard-release-check.d.ts +10 -1
  69. package/dist/backend/backend/src/services/system/input-guard-release-check.d.ts.map +1 -1
  70. package/dist/backend/backend/src/services/system/input-guard-release-check.js +15 -2
  71. package/dist/backend/backend/src/services/system/input-guard-release-check.js.map +1 -1
  72. package/dist/backend/backend/src/types/project-ticket.types.d.ts +5 -0
  73. package/dist/backend/backend/src/types/project-ticket.types.d.ts.map +1 -1
  74. package/dist/backend/backend/src/types/project-ticket.types.js +1 -0
  75. package/dist/backend/backend/src/types/project-ticket.types.js.map +1 -1
  76. package/dist/backend/backend/src/types/ticket-autopilot.types.d.ts +9 -0
  77. package/dist/backend/backend/src/types/ticket-autopilot.types.d.ts.map +1 -1
  78. package/dist/backend/backend/src/types/ticket-autopilot.types.js +28 -0
  79. package/dist/backend/backend/src/types/ticket-autopilot.types.js.map +1 -1
  80. package/dist/backend/build-info.json +2 -2
  81. package/dist/cli/backend/src/constants.d.ts +30 -0
  82. package/dist/cli/backend/src/constants.d.ts.map +1 -1
  83. package/dist/cli/backend/src/constants.js +30 -0
  84. package/dist/cli/backend/src/constants.js.map +1 -1
  85. package/dist/cli/backend/src/models/Team.d.ts +17 -0
  86. package/dist/cli/backend/src/models/Team.d.ts.map +1 -1
  87. package/dist/cli/backend/src/models/Team.js +28 -10
  88. package/dist/cli/backend/src/models/Team.js.map +1 -1
  89. package/dist/cli/backend/src/scripts/input-guard-classify.d.ts +24 -0
  90. package/dist/cli/backend/src/scripts/input-guard-classify.d.ts.map +1 -1
  91. package/dist/cli/backend/src/scripts/input-guard-classify.js +38 -5
  92. package/dist/cli/backend/src/scripts/input-guard-classify.js.map +1 -1
  93. package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.d.ts +26 -0
  94. package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.d.ts.map +1 -1
  95. package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.js +41 -0
  96. package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.js.map +1 -1
  97. package/dist/cli/backend/src/services/project-tickets/project-ticket.service.d.ts +2 -0
  98. package/dist/cli/backend/src/services/project-tickets/project-ticket.service.d.ts.map +1 -1
  99. package/dist/cli/backend/src/services/project-tickets/project-ticket.service.js +9 -0
  100. package/dist/cli/backend/src/services/project-tickets/project-ticket.service.js.map +1 -1
  101. package/dist/cli/backend/src/services/project-tickets/ticket-file.d.ts.map +1 -1
  102. package/dist/cli/backend/src/services/project-tickets/ticket-file.js +20 -1
  103. package/dist/cli/backend/src/services/project-tickets/ticket-file.js.map +1 -1
  104. package/dist/cli/backend/src/services/session/input-circuit-breaker.d.ts +130 -0
  105. package/dist/cli/backend/src/services/session/input-circuit-breaker.d.ts.map +1 -0
  106. package/dist/cli/backend/src/services/session/input-circuit-breaker.js +180 -0
  107. package/dist/cli/backend/src/services/session/input-circuit-breaker.js.map +1 -0
  108. package/dist/cli/backend/src/services/session/input-guard-known-screens.d.ts +41 -0
  109. package/dist/cli/backend/src/services/session/input-guard-known-screens.d.ts.map +1 -0
  110. package/dist/cli/backend/src/services/session/input-guard-known-screens.js +168 -0
  111. package/dist/cli/backend/src/services/session/input-guard-known-screens.js.map +1 -0
  112. package/dist/cli/backend/src/services/session/input-ledger.d.ts +2 -1
  113. package/dist/cli/backend/src/services/session/input-ledger.d.ts.map +1 -1
  114. package/dist/cli/backend/src/services/session/input-ledger.js +5 -1
  115. package/dist/cli/backend/src/services/session/input-ledger.js.map +1 -1
  116. package/dist/cli/backend/src/services/session/session-command-helper.d.ts +52 -0
  117. package/dist/cli/backend/src/services/session/session-command-helper.d.ts.map +1 -1
  118. package/dist/cli/backend/src/services/session/session-command-helper.js +155 -3
  119. package/dist/cli/backend/src/services/session/session-command-helper.js.map +1 -1
  120. package/dist/cli/backend/src/services/session/tui-input-guard.d.ts +81 -1
  121. package/dist/cli/backend/src/services/session/tui-input-guard.d.ts.map +1 -1
  122. package/dist/cli/backend/src/services/session/tui-input-guard.js +238 -45
  123. package/dist/cli/backend/src/services/session/tui-input-guard.js.map +1 -1
  124. package/dist/cli/backend/src/services/system/input-guard-release-check.d.ts +10 -1
  125. package/dist/cli/backend/src/services/system/input-guard-release-check.d.ts.map +1 -1
  126. package/dist/cli/backend/src/services/system/input-guard-release-check.js +15 -2
  127. package/dist/cli/backend/src/services/system/input-guard-release-check.js.map +1 -1
  128. package/dist/cli/backend/src/types/project-ticket.types.d.ts +5 -0
  129. package/dist/cli/backend/src/types/project-ticket.types.d.ts.map +1 -1
  130. package/dist/cli/backend/src/types/project-ticket.types.js +1 -0
  131. package/dist/cli/backend/src/types/project-ticket.types.js.map +1 -1
  132. package/dist/cli/backend/src/types/ticket-autopilot.types.d.ts +9 -0
  133. package/dist/cli/backend/src/types/ticket-autopilot.types.d.ts.map +1 -1
  134. package/dist/cli/backend/src/types/ticket-autopilot.types.js +28 -0
  135. package/dist/cli/backend/src/types/ticket-autopilot.types.js.map +1 -1
  136. package/dist/cli/cli/src/commands/doctor.d.ts.map +1 -1
  137. package/dist/cli/cli/src/commands/doctor.js +10 -3
  138. package/dist/cli/cli/src/commands/doctor.js.map +1 -1
  139. package/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Input circuit breaker — stops redelivery storms against an input box the
3
+ * harness will not touch.
4
+ *
5
+ * Why (crewly#1028, ce-vera 2026-10-03/04): Claude Code collapsed the
6
+ * harness's own paste into markers the guard could not attribute, so every
7
+ * delivery was refused (`input_not_ours`). The reconciler's fast loop kept
8
+ * redelivering and waking the agent every few seconds — ~1,100 failed
9
+ * redeliveries and ~1,100 failed wakes in 2h45m — with no backoff and only a
10
+ * generic notice.
11
+ *
12
+ * The rule: once every delivery to an agent has been refused for
13
+ * OPEN_AFTER_MS, the circuit opens. While open, automatic redelivery/wake
14
+ * for that agent is allowed only as a probe, one per window, the window
15
+ * doubling from PROBE_FIRST_MS up to PROBE_MAX_MS. Opening tells the owner
16
+ * once (listener wired in index.ts). A delivery that goes through closes the
17
+ * circuit; outside input into the terminal (the owner acting on it) allows
18
+ * the next probe at once; a session restart forgets it.
19
+ *
20
+ * Module-level and dependency-free (constants only) so the session helper,
21
+ * the input ledger and the reconciler can share it without import cycles.
22
+ * In memory: a restart starts with every circuit closed.
23
+ *
24
+ * @module services/session/input-circuit-breaker
25
+ */
26
+ /** What the guard saw on a refusal. */
27
+ export interface InputRefusalInfo {
28
+ /** Guard reading: `foreign` (text not ours) or `unknown` (unreadable) */
29
+ state: string;
30
+ /** Characters in the box (never the text) */
31
+ inputLength: number;
32
+ }
33
+ /** Passed to the listener when a circuit opens. */
34
+ export interface InputCircuitOpenInfo extends InputRefusalInfo {
35
+ sessionName: string;
36
+ /** Refusals since the box was first refused */
37
+ refusals: number;
38
+ /** How long every delivery has been refused (ms) */
39
+ blockedForMs: number;
40
+ /** Wait before the first probe (ms) */
41
+ nextProbeInMs: number;
42
+ }
43
+ /** One open circuit, as reported. */
44
+ export interface OpenCircuitView {
45
+ sessionName: string;
46
+ state: string;
47
+ inputLength: number;
48
+ refusals: number;
49
+ blockedForMs: number;
50
+ /** Automatic redeliveries/wakes skipped while open */
51
+ suppressed: number;
52
+ probes: number;
53
+ nextProbeInMs: number;
54
+ }
55
+ /** Counters since the process started, plus the open circuits. */
56
+ export interface InputCircuitStats {
57
+ open: OpenCircuitView[];
58
+ totals: {
59
+ /** Circuits opened */
60
+ opened: number;
61
+ /** Automatic redeliveries/wakes skipped by an open circuit */
62
+ suppressed: number;
63
+ /** Probe attempts let through while open */
64
+ probes: number;
65
+ /** Open circuits closed by a delivery that went through */
66
+ closed: number;
67
+ };
68
+ }
69
+ /**
70
+ * Set who is told when a circuit opens (once per blocked episode).
71
+ *
72
+ * @param listener - The listener, or null
73
+ */
74
+ export declare function setInputCircuitOpenListener(listener: ((info: InputCircuitOpenInfo) => void) | null): void;
75
+ /**
76
+ * The guard refused a delivery to this session.
77
+ *
78
+ * @param sessionName - The session
79
+ * @param info - What the guard saw
80
+ * @param now - Clock (ms)
81
+ */
82
+ export declare function noteInputRefused(sessionName: string, info: InputRefusalInfo, now?: number): void;
83
+ /**
84
+ * A delivery to this session went through: its circuit closes.
85
+ *
86
+ * @param sessionName - The session
87
+ * @param _now - Clock (ms), unused
88
+ */
89
+ export declare function noteInputDelivered(sessionName: string, _now?: number): void;
90
+ /**
91
+ * Someone typed into the session's terminal (likely acting on the alert):
92
+ * let the next automatic delivery through at once.
93
+ *
94
+ * @param sessionName - The session
95
+ */
96
+ export declare function noteInputTouched(sessionName: string): void;
97
+ /**
98
+ * Forget a session's circuit (session created, killed or relaunched).
99
+ *
100
+ * @param sessionName - The session
101
+ */
102
+ export declare function forgetInputCircuit(sessionName: string): void;
103
+ /**
104
+ * Whether an automatic redelivery/wake into this session may go ahead. Always
105
+ * true while the circuit is closed. While open, true once per probe window
106
+ * (and the window doubles, up to PROBE_MAX_MS); otherwise false, counted as
107
+ * suppressed.
108
+ *
109
+ * @param sessionName - The session
110
+ * @param now - Clock (ms)
111
+ * @returns True to attempt the delivery
112
+ */
113
+ export declare function shouldAttemptDelivery(sessionName: string, now?: number): boolean;
114
+ /**
115
+ * Whether a session's circuit is open.
116
+ *
117
+ * @param sessionName - The session
118
+ * @returns True while open
119
+ */
120
+ export declare function isInputCircuitOpen(sessionName: string): boolean;
121
+ /**
122
+ * Open circuits and counters (for /health and diagnostics).
123
+ *
124
+ * @param now - Clock (ms)
125
+ * @returns The stats
126
+ */
127
+ export declare function inputCircuitStats(now?: number): InputCircuitStats;
128
+ /** Clear every circuit and counter (tests). */
129
+ export declare function resetInputCircuitsForTesting(): void;
130
+ //# sourceMappingURL=input-circuit-breaker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-circuit-breaker.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAChC,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,mDAAmD;AACnD,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,UAAU,EAAE,M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nD"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Input circuit breaker — stops redelivery storms against an input box the
3
+ * harness will not touch.
4
+ *
5
+ * Why (crewly#1028, ce-vera 2026-10-03/04): Claude Code collapsed the
6
+ * harness's own paste into markers the guard could not attribute, so every
7
+ * delivery was refused (`input_not_ours`). The reconciler's fast loop kept
8
+ * redelivering and waking the agent every few seconds — ~1,100 failed
9
+ * redeliveries and ~1,100 failed wakes in 2h45m — with no backoff and only a
10
+ * generic notice.
11
+ *
12
+ * The rule: once every delivery to an agent has been refused for
13
+ * OPEN_AFTER_MS, the circuit opens. While open, automatic redelivery/wake
14
+ * for that agent is allowed only as a probe, one per window, the window
15
+ * doubling from PROBE_FIRST_MS up to PROBE_MAX_MS. Opening tells the owner
16
+ * once (listener wired in index.ts). A delivery that goes through closes the
17
+ * circuit; outside input into the terminal (the owner acting on it) allows
18
+ * the next probe at once; a session restart forgets it.
19
+ *
20
+ * Module-level and dependency-free (constants only) so the session helper,
21
+ * the input ledger and the reconciler can share it without import cycles.
22
+ * In memory: a restart starts with every circuit closed.
23
+ *
24
+ * @module services/session/input-circuit-breaker
25
+ */
26
+ import { INPUT_CIRCUIT_CONSTANTS } from '../../constants.js';
27
+ const circuits = new Map();
28
+ const totals = { opened: 0, suppressed: 0, probes: 0, closed: 0 };
29
+ let openListener = null;
30
+ /**
31
+ * Set who is told when a circuit opens (once per blocked episode).
32
+ *
33
+ * @param listener - The listener, or null
34
+ */
35
+ export function setInputCircuitOpenListener(listener) {
36
+ openListener = listener;
37
+ }
38
+ /**
39
+ * The guard refused a delivery to this session.
40
+ *
41
+ * @param sessionName - The session
42
+ * @param info - What the guard saw
43
+ * @param now - Clock (ms)
44
+ */
45
+ export function noteInputRefused(sessionName, info, now = Date.now()) {
46
+ const c = circuits.get(sessionName) ?? {
47
+ since: now,
48
+ refusals: 0,
49
+ state: info.state,
50
+ inputLength: info.inputLength,
51
+ open: false,
52
+ probes: 0,
53
+ nextProbeAt: 0,
54
+ suppressed: 0,
55
+ };
56
+ c.refusals += 1;
57
+ c.state = info.state;
58
+ c.inputLength = info.inputLength;
59
+ circuits.set(sessionName, c);
60
+ if (c.open || now - c.since < INPUT_CIRCUIT_CONSTANTS.OPEN_AFTER_MS)
61
+ return;
62
+ c.open = true;
63
+ c.openedAt = now;
64
+ c.nextProbeAt = now + INPUT_CIRCUIT_CONSTANTS.PROBE_FIRST_MS;
65
+ totals.opened += 1;
66
+ try {
67
+ openListener?.({
68
+ sessionName,
69
+ state: c.state,
70
+ inputLength: c.inputLength,
71
+ refusals: c.refusals,
72
+ blockedForMs: now - c.since,
73
+ nextProbeInMs: INPUT_CIRCUIT_CONSTANTS.PROBE_FIRST_MS,
74
+ });
75
+ }
76
+ catch {
77
+ // The notice is best effort; the circuit is open either way.
78
+ }
79
+ }
80
+ /**
81
+ * A delivery to this session went through: its circuit closes.
82
+ *
83
+ * @param sessionName - The session
84
+ * @param _now - Clock (ms), unused
85
+ */
86
+ export function noteInputDelivered(sessionName, _now = Date.now()) {
87
+ const c = circuits.get(sessionName);
88
+ if (!c)
89
+ return;
90
+ if (c.open)
91
+ totals.closed += 1;
92
+ circuits.delete(sessionName);
93
+ }
94
+ /**
95
+ * Someone typed into the session's terminal (likely acting on the alert):
96
+ * let the next automatic delivery through at once.
97
+ *
98
+ * @param sessionName - The session
99
+ */
100
+ export function noteInputTouched(sessionName) {
101
+ const c = circuits.get(sessionName);
102
+ if (c?.open)
103
+ c.nextProbeAt = 0;
104
+ }
105
+ /**
106
+ * Forget a session's circuit (session created, killed or relaunched).
107
+ *
108
+ * @param sessionName - The session
109
+ */
110
+ export function forgetInputCircuit(sessionName) {
111
+ circuits.delete(sessionName);
112
+ }
113
+ /**
114
+ * Whether an automatic redelivery/wake into this session may go ahead. Always
115
+ * true while the circuit is closed. While open, true once per probe window
116
+ * (and the window doubles, up to PROBE_MAX_MS); otherwise false, counted as
117
+ * suppressed.
118
+ *
119
+ * @param sessionName - The session
120
+ * @param now - Clock (ms)
121
+ * @returns True to attempt the delivery
122
+ */
123
+ export function shouldAttemptDelivery(sessionName, now = Date.now()) {
124
+ const c = circuits.get(sessionName);
125
+ if (!c?.open)
126
+ return true;
127
+ if (now >= c.nextProbeAt) {
128
+ c.probes += 1;
129
+ totals.probes += 1;
130
+ const wait = Math.min(INPUT_CIRCUIT_CONSTANTS.PROBE_FIRST_MS * 2 ** c.probes, INPUT_CIRCUIT_CONSTANTS.PROBE_MAX_MS);
131
+ c.nextProbeAt = now + wait;
132
+ return true;
133
+ }
134
+ c.suppressed += 1;
135
+ totals.suppressed += 1;
136
+ return false;
137
+ }
138
+ /**
139
+ * Whether a session's circuit is open.
140
+ *
141
+ * @param sessionName - The session
142
+ * @returns True while open
143
+ */
144
+ export function isInputCircuitOpen(sessionName) {
145
+ return circuits.get(sessionName)?.open === true;
146
+ }
147
+ /**
148
+ * Open circuits and counters (for /health and diagnostics).
149
+ *
150
+ * @param now - Clock (ms)
151
+ * @returns The stats
152
+ */
153
+ export function inputCircuitStats(now = Date.now()) {
154
+ const open = [];
155
+ for (const [sessionName, c] of circuits) {
156
+ if (!c.open)
157
+ continue;
158
+ open.push({
159
+ sessionName,
160
+ state: c.state,
161
+ inputLength: c.inputLength,
162
+ refusals: c.refusals,
163
+ blockedForMs: now - c.since,
164
+ suppressed: c.suppressed,
165
+ probes: c.probes,
166
+ nextProbeInMs: Math.max(0, c.nextProbeAt - now),
167
+ });
168
+ }
169
+ return { open, totals: { ...totals } };
170
+ }
171
+ /** Clear every circuit and counter (tests). */
172
+ export function resetInputCircuitsForTesting() {
173
+ circuits.clear();
174
+ totals.opened = 0;
175
+ totals.suppressed = 0;
176
+ totals.probes = 0;
177
+ totals.closed = 0;
178
+ openListener = null;
179
+ }
180
+ //# sourceMappingURL=input-circuit-breaker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-circuit-breaker.js","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;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GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,WAAW,GAAG,GAAG,CAAC;SAC/C,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;AACxC,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,CAAC;IACjB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;IACtB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,YAAY,GAAG,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Known input-box screens the input guard must keep reading right — run by
3
+ * the release input-guard check (`npm run check:input-guard` /
4
+ * `crewly doctor --input-guard`) against the NEW build's classifier,
5
+ * alongside the live agent screens.
6
+ *
7
+ * The views are rendered from the recorded Claude Code 2.1.288 frames in
8
+ * `__fixtures__/tui/claude-code-2.1.288/` (the same bytes the unit tests
9
+ * replay), kept here as plain screen rows because the `.ansi` fixtures are
10
+ * not part of a build. The split-paste frames reproduce the screen of
11
+ * crewly#1028 (ce-vera, Claude Code 2.1.288/289): one harness paste that
12
+ * Claude Code showed as two markers on one line,
13
+ * `❯ [Pasted text #3 +7 lines][Pasted text #4 +6 lines]`, idle and mid-turn.
14
+ *
15
+ * @module services/session/input-guard-known-screens
16
+ */
17
+ import type { TuiInputStage, TuiInputState, TuiInputView } from './tui-input-guard.js';
18
+ /** One known screen and how the guard must read it. */
19
+ export interface KnownInputScreen {
20
+ /** Short name (reported as `fixture:<name>`) */
21
+ name: string;
22
+ /** Runtime and version the frame was recorded from */
23
+ runtime: string;
24
+ view: TuiInputView;
25
+ /** The message being delivered (or '' for none) */
26
+ message: string;
27
+ stage: TuiInputStage;
28
+ /** Harness pastes since the last outside input (the input ledger), oldest first */
29
+ pastes: string[];
30
+ /** The reading the guard must give */
31
+ expect: TuiInputState;
32
+ /** Why this screen matters */
33
+ why: string;
34
+ }
35
+ /** A 15-line brief (14 line breaks), like the CE-93 brief of crewly#1028. */
36
+ export declare const SPLIT_BRIEF: string;
37
+ /** A 5-line message (4 line breaks). */
38
+ export declare const FIVE_LINES: string;
39
+ /** The screens, in report order. */
40
+ export declare const KNOWN_INPUT_SCREENS: readonly KnownInputScreen[];
41
+ //# sourceMappingURL=input-guard-known-screens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-guard-known-screens.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-guard-known-screens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEvF,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAChC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC;IACrB,mFAAmF;IACnF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sCAAsC;IACtC,MAAM,EAAE,aAAa,CAAC;IACtB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,6EAA6E;AAC7E,eAAO,MAAM,WAAW,QAgBZ,CAAC;AAEb,wCAAwC;AACxC,eAAO,MAAM,UAAU,QAAsF,CAAC;AA0E9G,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EA6D1D,CAAC"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Known input-box screens the input guard must keep reading right — run by
3
+ * the release input-guard check (`npm run check:input-guard` /
4
+ * `crewly doctor --input-guard`) against the NEW build's classifier,
5
+ * alongside the live agent screens.
6
+ *
7
+ * The views are rendered from the recorded Claude Code 2.1.288 frames in
8
+ * `__fixtures__/tui/claude-code-2.1.288/` (the same bytes the unit tests
9
+ * replay), kept here as plain screen rows because the `.ansi` fixtures are
10
+ * not part of a build. The split-paste frames reproduce the screen of
11
+ * crewly#1028 (ce-vera, Claude Code 2.1.288/289): one harness paste that
12
+ * Claude Code showed as two markers on one line,
13
+ * `❯ [Pasted text #3 +7 lines][Pasted text #4 +6 lines]`, idle and mid-turn.
14
+ *
15
+ * @module services/session/input-guard-known-screens
16
+ */
17
+ /** A 15-line brief (14 line breaks), like the CE-93 brief of crewly#1028. */
18
+ export const SPLIT_BRIEF = [
19
+ '[TASK] CE-93: brand preview page',
20
+ '',
21
+ '## Goal',
22
+ 'Ship the brand preview page behind /preview-brand.',
23
+ '',
24
+ '## Steps',
25
+ '1. Read the design notes.',
26
+ '2. Build the page.',
27
+ '3. Add the locale paths.',
28
+ '4. Run the tests.',
29
+ '',
30
+ '## Done when',
31
+ '- the page renders in both locales',
32
+ '- the ticket has a screenshot',
33
+ 'Reply with report-status when done.',
34
+ ].join('\n');
35
+ /** A 5-line message (4 line breaks). */
36
+ export const FIVE_LINES = ['M1-MARK line one', 'line two', 'line three', 'line four', 'line five'].join('\n');
37
+ /** `labelled-rule-empty.ansi` */
38
+ const LABELLED_EMPTY = {
39
+ lines: [
40
+ ' ▐▛███▛█ Claude Code v2.1.288',
41
+ '▝▜██████▀ Opus 5.5 · Claude Max',
42
+ ' ▝▝ ▝▝ @fixture-agent · /…/7573773a-4098-43b3-a9f9-af36146453a7/scratchpad/cap2/cc',
43
+ '',
44
+ '',
45
+ '──────────────────────────────────────────────────────────────────────────────────── fixture-agent ─',
46
+ '❯',
47
+ '────────────────────────────────────────────────────────────────────────────────────────────────────',
48
+ ' ⏵⏵ auto mode on (shift+tab to cycle) · ← for agents ◐ medium · /effort',
49
+ ],
50
+ cursorRow: 6,
51
+ };
52
+ /** `labelled-rule-pasted-marker.ansi` */
53
+ const LABELLED_ONE_MARKER = {
54
+ lines: [
55
+ ' ▐▛███▛█ Claude Code v2.1.288',
56
+ '▝▜██████▀ Opus 5.5 · Claude Max',
57
+ ' ▝▝ ▝▝ @fixture-agent · /…/7573773a-4098-43b3-a9f9-af36146453a7/scratchpad/cap2/cc',
58
+ '',
59
+ '',
60
+ '──────────────────────────────────────────────────────────────────────────────────── fixture-agent ─',
61
+ '❯\u00a0[Pasted text #1 +4 lines]',
62
+ '────────────────────────────────────────────────────────────────────────────────────────────────────',
63
+ ' paste again to expand ◐ medium · /effort',
64
+ ],
65
+ cursorRow: 6,
66
+ };
67
+ /** `split-paste-two-markers.ansi` */
68
+ const SPLIT_TWO_MARKERS = {
69
+ lines: [
70
+ ' ▐▛███▛█ Claude Code v2.1.288',
71
+ '▝▜██████▀ Opus 5.5 · Claude Max',
72
+ ' ▝▝ ▝▝ @fixture-agent · /…/7573773a-4098-43b3-a9f9-af36146453a7/scratchpad/cap2/cc',
73
+ '',
74
+ '',
75
+ '──────────────────────────────────────────────────────────────────────────────────── fixture-agent ─',
76
+ '❯\u00a0[Pasted text #3 +7 lines][Pasted text #4 +6 lines]',
77
+ '────────────────────────────────────────────────────────────────────────────────────────────────────',
78
+ ' paste again to expand ◐ medium · /effort',
79
+ ],
80
+ cursorRow: 6,
81
+ };
82
+ /** `busy-split-paste-two-markers.ansi` */
83
+ const BUSY_SPLIT_TWO_MARKERS = {
84
+ lines: [
85
+ ' ▐▛███▛█ Claude Code v2.1.288',
86
+ '▝▜██████▀ Opus 5.5 · Claude Max',
87
+ ' ▝▝ ▝▝ @fixture-agent · /…/7573773a-4098-43b3-a9f9-af36146453a7/scratchpad/cap2/cc',
88
+ '',
89
+ '',
90
+ '❯ M1-MARK line one',
91
+ ' line two',
92
+ ' line three',
93
+ ' line four',
94
+ ' line five',
95
+ '',
96
+ '✳ Flambéing…',
97
+ '',
98
+ '──────────────────────────────────────────────────────────────────────────────────── fixture-agent ─',
99
+ '❯\u00a0[Pasted text #4 +7 lines][Pasted text #5 +6 lines]',
100
+ '────────────────────────────────────────────────────────────────────────────────────────────────────',
101
+ ' paste again to expand',
102
+ ],
103
+ cursorRow: 14,
104
+ };
105
+ /** The screens, in report order. */
106
+ export const KNOWN_INPUT_SCREENS = [
107
+ {
108
+ name: 'labelled-empty',
109
+ runtime: 'claude-code-2.1.288',
110
+ view: LABELLED_EMPTY,
111
+ message: SPLIT_BRIEF,
112
+ stage: 'before-write',
113
+ pastes: [],
114
+ expect: 'empty',
115
+ why: 'an empty box under a labelled top rule reads empty',
116
+ },
117
+ {
118
+ name: 'own-single-marker',
119
+ runtime: 'claude-code-2.1.288',
120
+ view: LABELLED_ONE_MARKER,
121
+ message: '',
122
+ stage: 'recovery',
123
+ pastes: [FIVE_LINES],
124
+ expect: 'ours',
125
+ why: 'our own collapsed paste ("[Pasted text #1 +4 lines]") is ours',
126
+ },
127
+ {
128
+ name: 'own-split-paste',
129
+ runtime: 'claude-code-2.1.288',
130
+ view: SPLIT_TWO_MARKERS,
131
+ message: '',
132
+ stage: 'recovery',
133
+ pastes: [SPLIT_BRIEF],
134
+ expect: 'ours',
135
+ why: 'crewly#1028: one paste of ours shown as two markers is ours (Enter, not a redelivery storm)',
136
+ },
137
+ {
138
+ name: 'own-split-paste-busy',
139
+ runtime: 'claude-code-2.1.288',
140
+ view: BUSY_SPLIT_TWO_MARKERS,
141
+ message: '',
142
+ stage: 'recovery',
143
+ pastes: [SPLIT_BRIEF],
144
+ expect: 'ours',
145
+ why: 'crewly#1028 mid-turn: the split paste stays ours while the agent works',
146
+ },
147
+ {
148
+ name: 'owner-split-paste',
149
+ runtime: 'claude-code-2.1.288',
150
+ view: SPLIT_TWO_MARKERS,
151
+ message: SPLIT_BRIEF,
152
+ stage: 'before-write',
153
+ pastes: [],
154
+ expect: 'foreign',
155
+ why: 'the same markers with no paste of ours on record (the owner pasted) are never ours',
156
+ },
157
+ {
158
+ name: 'split-paste-wrong-shape',
159
+ runtime: 'claude-code-2.1.288',
160
+ view: SPLIT_TWO_MARKERS,
161
+ message: '',
162
+ stage: 'recovery',
163
+ pastes: [FIVE_LINES],
164
+ expect: 'foreign',
165
+ why: 'markers that do not add up to any paste of ours are not ours',
166
+ },
167
+ ];
168
+ //# sourceMappingURL=input-guard-known-screens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-guard-known-screens.js","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-guard-known-screens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAsBH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,kCAAkC;IAClC,EAAE;IACF,SAAS;IACT,oDAAoD;IACpD,EAAE;IACF,UAAU;IACV,2BAA2B;IAC3B,oBAAoB;IACpB,0BAA0B;IAC1B,mBAAmB;IACnB,EAAE;IACF,cAAc;IACd,oCAAoC;IACpC,+BAA+B;IAC/B,qCAAqC;CACrC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,wCAAwC;AACxC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE9G,iCAAiC;AACjC,MAAM,cAAc,GAAiB;IACpC,KAAK,EAAE;QACN,iCAAiC;QACjC,kCAAkC;QAClC,wFAAwF;QACxF,EAAE;QACF,EAAE;QACF,sGAAsG;QACtG,GAAG;QACH,sGAAsG;QACtG,oGAAoG;KACpG;IACD,SAAS,EAAE,CAAC;CACZ,CAAC;AAEF,yCAAyC;AACzC,MAAM,mBAAmB,GAAiB;IACzC,KAAK,EAAE;QACN,iCAAiC;QACjC,kCAAkC;QAClC,wFAAwF;QACxF,EAAE;QACF,EAAE;QACF,sGAAsG;QACtG,kCAAkC;QAClC,sGAAsG;QACtG,oGAAoG;KACpG;IACD,SAAS,EAAE,CAAC;CACZ,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AG,EAAE,6FAA6F;KAClG;IACD;QACC,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,qBAAqB;QAC9B,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,UAAU;QACjB,MAAM,EAAE,CAAC,WAAW,CAAC;QACrB,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,wEAAwE;KAC7E;IACD;QACC,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,qBAAqB;QAC9B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,SAAS;QACjB,GAAG,EAAE,oFAAoF;KACzF;IACD;QACC,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,qBAAqB;QAC9B,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,UAAU;QACjB,MAAM,EAAE,CAAC,UAAU,CAAC;QACpB,MAAM,EAAE,SAAS;QACjB,GAAG,EAAE,8DAA8D;KACnE;CACD,CAAC"}
@@ -18,7 +18,8 @@
18
18
  * Other harness writes (OAuth relogin, runtime-terms answers, `/clear`) are
19
19
  * submitted at once and leave nothing in the box; they are neither.
20
20
  *
21
- * Module-level and dependency-free so the gateway, controllers and the
21
+ * Module-level and nearly dependency-free (only the input circuit breaker,
22
+ * itself dependency-free) so the gateway, controllers and the
22
23
  * session helper can share it without import cycles. In memory: a restart
23
24
  * recreates every session, which starts a new ledger.
24
25
  *
@@ -1 +1 @@
1
- {"version":3,"file":"input-ledger.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,yBAAyB;AACzB,MAAM,WAAW,YAAY;IAC5B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,EAAE,EAAE,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,IAAI,CAEjD"}
1
+ {"version":3,"file":"input-ledger.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,yBAAyB;AACzB,MAAM,WAAW,YAAY;IAC5B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;CACX;AAcD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAE,MAAmB,GAAG,IAAI,CAKpG;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,GAAE,MAAmB,GAAG,IAAI,CAOnF;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,EAAE,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,CAI/F;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAK1F;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAE5F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,GAAG,IAAI,CAGrH;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,EAAE,CAEpD;AAED,kCAAkC;AAClC,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
@@ -18,12 +18,14 @@
18
18
  * Other harness writes (OAuth relogin, runtime-terms answers, `/clear`) are
19
19
  * submitted at once and leave nothing in the box; they are neither.
20
20
  *
21
- * Module-level and dependency-free so the gateway, controllers and the
21
+ * Module-level and nearly dependency-free (only the input circuit breaker,
22
+ * itself dependency-free) so the gateway, controllers and the
22
23
  * session helper can share it without import cycles. In memory: a restart
23
24
  * recreates every session, which starts a new ledger.
24
25
  *
25
26
  * @module services/session/input-ledger
26
27
  */
28
+ import { noteInputTouched } from './input-circuit-breaker.js';
27
29
  /** Most pastes remembered per session */
28
30
  const MAX_PASTES = 10;
29
31
  const ledgers = new Map();
@@ -54,6 +56,8 @@ export function noteOutsideInput(sessionName, at = Date.now()) {
54
56
  ledger.lastOutsideInputAt = at;
55
57
  ledger.pastes = [];
56
58
  ledgers.set(sessionName, ledger);
59
+ // Someone is acting on the terminal: an open delivery circuit probes at once.
60
+ noteInputTouched(sessionName);
57
61
  }
58
62
  /**
59
63
  * The harness pastes made since the last outside input, oldest first.
@@ -1 +1 @@
1
- {"version":3,"file":"input-ledger.js","sourceRoot":"","sources":["../../../../../../backend/src/services/session/input-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAiBH,yCAAyC;AACzC,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB,EAAE,OAAe,EAA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