crewly 1.20.230 → 1.20.232
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/config/hooks/agent-status/report.sh +7 -2
- package/config/skills/agent/core/send-message/SKILL.md +6 -2
- package/config/skills/agent/core/send-message/execute.sh +4 -3
- package/config/skills/agent/core/send-message/execute.test.sh +1 -1
- package/config/skills/orchestrator/send-message/SKILL.md +21 -7
- package/config/skills/orchestrator/send-message/execute.sh +20 -3
- package/config/skills/orchestrator/send-message/execute.test.sh +11 -1
- package/dist/backend/backend/src/constants.d.ts +38 -0
- package/dist/backend/backend/src/constants.d.ts.map +1 -1
- package/dist/backend/backend/src/constants.js +38 -0
- package/dist/backend/backend/src/constants.js.map +1 -1
- package/dist/backend/backend/src/controllers/agent-hooks/agent-hooks.controller.d.ts +4 -1
- package/dist/backend/backend/src/controllers/agent-hooks/agent-hooks.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/agent-hooks/agent-hooks.controller.js +21 -5
- package/dist/backend/backend/src/controllers/agent-hooks/agent-hooks.controller.js.map +1 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.d.ts +1 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.js +52 -3
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +10 -5
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/routes/modules/terminal.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/routes/modules/terminal.routes.js +3 -1
- package/dist/backend/backend/src/routes/modules/terminal.routes.js.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts +34 -0
- package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.js +52 -0
- package/dist/backend/backend/src/services/agent/agent-registration.service.js.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.d.ts +8 -0
- package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.d.ts.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.js +15 -2
- package/dist/backend/backend/src/services/ai/prompt-modules/communication.module.js.map +1 -1
- package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.d.ts +17 -1
- package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.js +39 -2
- package/dist/backend/backend/src/services/messaging/input-blocked-retry.service.js.map +1 -1
- package/dist/backend/backend/src/services/messaging/owner-hook-message.d.ts +49 -0
- package/dist/backend/backend/src/services/messaging/owner-hook-message.d.ts.map +1 -0
- package/dist/backend/backend/src/services/messaging/owner-hook-message.js +82 -0
- package/dist/backend/backend/src/services/messaging/owner-hook-message.js.map +1 -0
- package/dist/backend/backend/src/services/messaging/queue-priority.d.ts +24 -0
- package/dist/backend/backend/src/services/messaging/queue-priority.d.ts.map +1 -1
- package/dist/backend/backend/src/services/messaging/queue-priority.js +39 -0
- package/dist/backend/backend/src/services/messaging/queue-priority.js.map +1 -1
- package/dist/backend/backend/src/services/messaging/sub-agent-message-queue.service.d.ts +65 -1
- package/dist/backend/backend/src/services/messaging/sub-agent-message-queue.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/messaging/sub-agent-message-queue.service.js +118 -2
- package/dist/backend/backend/src/services/messaging/sub-agent-message-queue.service.js.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/dist/cli/backend/src/constants.d.ts +38 -0
- package/dist/cli/backend/src/constants.d.ts.map +1 -1
- package/dist/cli/backend/src/constants.js +38 -0
- package/dist/cli/backend/src/constants.js.map +1 -1
- package/dist/cli/backend/src/services/agent/agent-registration.service.d.ts +34 -0
- package/dist/cli/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/agent-registration.service.js +52 -0
- package/dist/cli/backend/src/services/agent/agent-registration.service.js.map +1 -1
- package/dist/cli/backend/src/services/ai/prompt-modules/communication.module.d.ts +8 -0
- package/dist/cli/backend/src/services/ai/prompt-modules/communication.module.d.ts.map +1 -1
- package/dist/cli/backend/src/services/ai/prompt-modules/communication.module.js +15 -2
- package/dist/cli/backend/src/services/ai/prompt-modules/communication.module.js.map +1 -1
- package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.d.ts +17 -1
- package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.js +39 -2
- package/dist/cli/backend/src/services/messaging/input-blocked-retry.service.js.map +1 -1
- package/dist/cli/backend/src/services/messaging/queue-priority.d.ts +24 -0
- package/dist/cli/backend/src/services/messaging/queue-priority.d.ts.map +1 -1
- package/dist/cli/backend/src/services/messaging/queue-priority.js +39 -0
- package/dist/cli/backend/src/services/messaging/queue-priority.js.map +1 -1
- package/dist/cli/backend/src/services/messaging/sub-agent-message-queue.service.d.ts +65 -1
- package/dist/cli/backend/src/services/messaging/sub-agent-message-queue.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/messaging/sub-agent-message-queue.service.js +118 -2
- package/dist/cli/backend/src/services/messaging/sub-agent-message-queue.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,14 @@ import { PromptModule, ModuleConfig } from './prompt-module.interface.js';
|
|
|
5
5
|
* the newest question's answer).
|
|
6
6
|
*/
|
|
7
7
|
export declare const SLACK_THREAD_RULE_SECTION: string;
|
|
8
|
+
/**
|
|
9
|
+
* How a Claude Code agent receives an owner message mid-turn (the
|
|
10
|
+
* agent-status PostToolUse hook's note). Without it the model may take the
|
|
11
|
+
* note for a prompt injection in the tool output and ignore it (scratch
|
|
12
|
+
* tests 2026-10-05, Haiku: 1 of 3 answered without this section; with it
|
|
13
|
+
* 6 of 6 for a plain question — see specs/2026-10-05-owner-message-via-hook.md).
|
|
14
|
+
*/
|
|
15
|
+
export declare const OWNER_MESSAGE_MID_TURN_SECTION: string;
|
|
8
16
|
/**
|
|
9
17
|
* Communication module — defines how agents communicate across channels.
|
|
10
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication.module.d.ts","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/communication.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,8BAA8B,CAAC;AAG5F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,QAAiE,CAAC;AAExG;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACvD,IAAI,SAAmB;IACvB,QAAQ,SAAK;IACb,SAAS,SAAQ;IACjB,WAAW,UAAQ;IAEnB;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI7C;;;;;;;OAOG;IACG,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"communication.module.d.ts","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/communication.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,8BAA8B,CAAC;AAG5F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,QAAiE,CAAC;AAExG;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,QAID,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACvD,IAAI,SAAmB;IACvB,QAAQ,SAAK;IACb,SAAS,SAAQ;IACjB,WAAW,UAAQ;IAEnB;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI7C;;;;;;;OAOG;IACG,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAMlD;;;;;OAKG;YACW,gBAAgB;IA2B9B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,iBAAiB;IAqBzB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,sBAAsB;IAgB9B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,oBAAoB;IAiB5B;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAgFlC;;OAEG;IACH,OAAO,CAAC,YAAY;IAkCpB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CA6BxB"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
2
|
import { loadRoleFragment } from './prompt-module.interface.js';
|
|
3
|
-
import { SLACK_THREAD_KEY_CONSTANTS } from '../../../constants.js';
|
|
3
|
+
import { OWNER_HOOK_MESSAGE_CONSTANTS, SLACK_THREAD_KEY_CONSTANTS } from '../../../constants.js';
|
|
4
4
|
/**
|
|
5
5
|
* The one-thread-per-answer rule every role gets (2026-09-28: an agent
|
|
6
6
|
* answered an earlier thread's request inside the newest thread, bundled with
|
|
7
7
|
* the newest question's answer).
|
|
8
8
|
*/
|
|
9
9
|
export const SLACK_THREAD_RULE_SECTION = `### Slack Threads\n${SLACK_THREAD_KEY_CONSTANTS.PROMPT_RULE}`;
|
|
10
|
+
/**
|
|
11
|
+
* How a Claude Code agent receives an owner message mid-turn (the
|
|
12
|
+
* agent-status PostToolUse hook's note). Without it the model may take the
|
|
13
|
+
* note for a prompt injection in the tool output and ignore it (scratch
|
|
14
|
+
* tests 2026-10-05, Haiku: 1 of 3 answered without this section; with it
|
|
15
|
+
* 6 of 6 for a plain question — see specs/2026-10-05-owner-message-via-hook.md).
|
|
16
|
+
*/
|
|
17
|
+
export const OWNER_MESSAGE_MID_TURN_SECTION = '### Owner Messages During a Turn\n' +
|
|
18
|
+
`When the owner writes to you while you are in the middle of a task, Crewly hands you the message right after one of your tool calls, as a note that starts with ${OWNER_HOOK_MESSAGE_CONSTANTS.TAG}. ` +
|
|
19
|
+
"It comes from Crewly's hook, not from the tool's output, and it is a real message from the owner: answer it right away, in the conversation it names, then carry on with your task. " +
|
|
20
|
+
'Do not wait until the task is finished.';
|
|
10
21
|
/**
|
|
11
22
|
* Communication module — defines how agents communicate across channels.
|
|
12
23
|
*
|
|
@@ -39,7 +50,9 @@ export class CommunicationModule {
|
|
|
39
50
|
* @returns Formatted markdown communication section
|
|
40
51
|
*/
|
|
41
52
|
async build(config) {
|
|
42
|
-
|
|
53
|
+
// First, so a budget trim (which cuts from the end) keeps it.
|
|
54
|
+
const ownerMidTurn = !config.runtimeType || config.runtimeType === 'claude-code' ? `${OWNER_MESSAGE_MID_TURN_SECTION}\n\n` : '';
|
|
55
|
+
return `${ownerMidTurn}${await this.buildRoleSection(config)}\n\n${SLACK_THREAD_RULE_SECTION}`;
|
|
43
56
|
}
|
|
44
57
|
/**
|
|
45
58
|
* The role-specific part of the section.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication.module.js","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/communication.module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAA8B,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"communication.module.js","sourceRoot":"","sources":["../../../../../../../backend/src/services/ai/prompt-modules/communication.module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAA8B,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEjG;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,0BAA0B,CAAC,WAAW,EAAE,CAAC;AAExG;;;;;;G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A8D,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,IAAI,CAAC;QACzK,MAAM,eAAe,GAAG,sCAAsC,CAAC;QAC/D,MAAM,cAAc,GAAG,cAAc,MAAM,CAAC,WAAW,0DAA0D,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,GAAG,CAAC;QAC7J,MAAM,YAAY,GAAG,oCAAoC,CAAC;QAC1D,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAC7G,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;QAEvG,OAAO;;;;EAIP,aAAa;;;;EAIb,WAAW;;;;;;;;;;;uCAW0B,CAAC;IACvC,CAAC;CACD"}
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* - after a few minutes or a few refusals, tells the owner/orchestrator once
|
|
15
15
|
* per blocked episode what kind of content blocks it (never the text: a
|
|
16
16
|
* box can hold a password or a code);
|
|
17
|
-
* - clears its state when a delivery to the agent succeeds
|
|
17
|
+
* - clears its state when a delivery to the agent succeeds;
|
|
18
|
+
* - sends at most one alert per agent per NOTIFY_COOLDOWN_MS (30 min). The
|
|
19
|
+
* one exception: an alert the owner must act on (box unreadable or holding
|
|
20
|
+
* someone's text) still goes out once after an informational "busy in a
|
|
21
|
+
* long turn" alert in the same window — the FYI must not hide a real block.
|
|
18
22
|
*
|
|
19
23
|
* @module services/messaging/input-blocked-retry.service
|
|
20
24
|
*/
|
|
@@ -68,6 +72,8 @@ export declare class InputBlockedRetryService {
|
|
|
68
72
|
private readonly busyHoldNotified;
|
|
69
73
|
/** Agents whose blocked input was already reported via the circuit breaker (until a delivery) */
|
|
70
74
|
private readonly circuitNotified;
|
|
75
|
+
/** Last alert sent per agent, for the per-agent cooldown (survives deliveries) */
|
|
76
|
+
private readonly lastAlert;
|
|
71
77
|
private readonly logger;
|
|
72
78
|
private readonly now;
|
|
73
79
|
/**
|
|
@@ -167,6 +173,16 @@ export declare class InputBlockedRetryService {
|
|
|
167
173
|
* @param ep - Its episode
|
|
168
174
|
*/
|
|
169
175
|
private retry;
|
|
176
|
+
/**
|
|
177
|
+
* Whether an alert about this agent may go out now, and if so record it.
|
|
178
|
+
* One alert per agent per NOTIFY_COOLDOWN_MS; an actionable alert may
|
|
179
|
+
* still follow an informational one (a long-turn notice) in that window.
|
|
180
|
+
*
|
|
181
|
+
* @param sessionName - The agent
|
|
182
|
+
* @param actionable - The owner has to do something (vs. busy in a long turn)
|
|
183
|
+
* @returns True when the alert may be sent
|
|
184
|
+
*/
|
|
185
|
+
private claimAlert;
|
|
170
186
|
/**
|
|
171
187
|
* Tell someone once per episode, after long enough or often enough.
|
|
172
188
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-blocked-retry.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/input-blocked-retry.service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"input-blocked-retry.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/input-blocked-retry.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC5B,gHAAgH;IAChH,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE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;;;;;;;;;OASG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAU3E;;;;;;;;OAQG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ7E;;;;;;;;;OASG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAwBhI;;;;OAIG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAUxC;;;;;OAKG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAYhB;;;;;OAKG;YACW,KAAK;IAqBnB;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IAelB;;;;;OAKG;YACW,WAAW;CAyBzB"}
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* - after a few minutes or a few refusals, tells the owner/orchestrator once
|
|
15
15
|
* per blocked episode what kind of content blocks it (never the text: a
|
|
16
16
|
* box can hold a password or a code);
|
|
17
|
-
* - clears its state when a delivery to the agent succeeds
|
|
17
|
+
* - clears its state when a delivery to the agent succeeds;
|
|
18
|
+
* - sends at most one alert per agent per NOTIFY_COOLDOWN_MS (30 min). The
|
|
19
|
+
* one exception: an alert the owner must act on (box unreadable or holding
|
|
20
|
+
* someone's text) still goes out once after an informational "busy in a
|
|
21
|
+
* long turn" alert in the same window — the FYI must not hide a real block.
|
|
18
22
|
*
|
|
19
23
|
* @module services/messaging/input-blocked-retry.service
|
|
20
24
|
*/
|
|
@@ -31,6 +35,8 @@ export class InputBlockedRetryService {
|
|
|
31
35
|
busyHoldNotified = new Set();
|
|
32
36
|
/** Agents whose blocked input was already reported via the circuit breaker (until a delivery) */
|
|
33
37
|
circuitNotified = new Set();
|
|
38
|
+
/** Last alert sent per agent, for the per-agent cooldown (survives deliveries) */
|
|
39
|
+
lastAlert = new Map();
|
|
34
40
|
logger;
|
|
35
41
|
now;
|
|
36
42
|
/**
|
|
@@ -103,6 +109,8 @@ export class InputBlockedRetryService {
|
|
|
103
109
|
if (heldForMs < TUI_INPUT_GUARD.BUSY_HOLD_NOTIFY_MS || this.busyHoldNotified.has(sessionName) || !this.deps)
|
|
104
110
|
return;
|
|
105
111
|
this.busyHoldNotified.add(sessionName);
|
|
112
|
+
if (!this.claimAlert(sessionName, false))
|
|
113
|
+
return;
|
|
106
114
|
this.logger.warn('Messages held for a long time: the agent has looked mid-turn throughout', { sessionName, heldForMs });
|
|
107
115
|
void this.deps
|
|
108
116
|
.notify({ sessionName, state: 'busy', inputLength: 0, refusals: 0, blockedForMs: heldForMs, message })
|
|
@@ -120,6 +128,8 @@ export class InputBlockedRetryService {
|
|
|
120
128
|
noteStuckInput(sessionName, inputLength, forMs) {
|
|
121
129
|
if (!this.deps)
|
|
122
130
|
return;
|
|
131
|
+
if (!this.claimAlert(sessionName, true))
|
|
132
|
+
return;
|
|
123
133
|
void this.deps
|
|
124
134
|
.notify({ sessionName, state: 'stuck', inputLength, refusals: 0, blockedForMs: forMs, message: '' })
|
|
125
135
|
.catch(() => undefined);
|
|
@@ -143,9 +153,11 @@ export class InputBlockedRetryService {
|
|
|
143
153
|
if (ep)
|
|
144
154
|
ep.notified = true;
|
|
145
155
|
this.circuitNotified.add(sessionName);
|
|
146
|
-
this.logger.error('Agent input blocked — automatic redelivery slowed, telling the owner', { sessionName, ...info });
|
|
147
156
|
if (!this.deps)
|
|
148
157
|
return;
|
|
158
|
+
if (!this.claimAlert(sessionName, true))
|
|
159
|
+
return;
|
|
160
|
+
this.logger.error('Agent input blocked — automatic redelivery slowed, telling the owner', { sessionName, ...info });
|
|
149
161
|
void this.deps
|
|
150
162
|
.notify({
|
|
151
163
|
sessionName,
|
|
@@ -238,6 +250,29 @@ export class InputBlockedRetryService {
|
|
|
238
250
|
this.schedule(sessionName, ep);
|
|
239
251
|
}
|
|
240
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Whether an alert about this agent may go out now, and if so record it.
|
|
255
|
+
* One alert per agent per NOTIFY_COOLDOWN_MS; an actionable alert may
|
|
256
|
+
* still follow an informational one (a long-turn notice) in that window.
|
|
257
|
+
*
|
|
258
|
+
* @param sessionName - The agent
|
|
259
|
+
* @param actionable - The owner has to do something (vs. busy in a long turn)
|
|
260
|
+
* @returns True when the alert may be sent
|
|
261
|
+
*/
|
|
262
|
+
claimAlert(sessionName, actionable) {
|
|
263
|
+
const now = this.now();
|
|
264
|
+
const last = this.lastAlert.get(sessionName);
|
|
265
|
+
if (last && now - last.at < INPUT_BLOCKED_RETRY_CONSTANTS.NOTIFY_COOLDOWN_MS && (last.actionable || !actionable)) {
|
|
266
|
+
this.logger.info('Input-blocked alert not sent: one already went out for this agent recently', {
|
|
267
|
+
sessionName,
|
|
268
|
+
actionable,
|
|
269
|
+
sinceLastMs: now - last.at,
|
|
270
|
+
});
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
this.lastAlert.set(sessionName, { at: now, actionable });
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
241
276
|
/**
|
|
242
277
|
* Tell someone once per episode, after long enough or often enough.
|
|
243
278
|
*
|
|
@@ -255,6 +290,8 @@ export class InputBlockedRetryService {
|
|
|
255
290
|
if (blockedForMs < INPUT_BLOCKED_RETRY_CONSTANTS.NOTIFY_AFTER_MS && ep.refusals < INPUT_BLOCKED_RETRY_CONSTANTS.NOTIFY_AFTER_REFUSALS)
|
|
256
291
|
return;
|
|
257
292
|
ep.notified = true;
|
|
293
|
+
if (!this.claimAlert(sessionName, true))
|
|
294
|
+
return;
|
|
258
295
|
const notice = {
|
|
259
296
|
sessionName,
|
|
260
297
|
state: ep.last.state,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-blocked-retry.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/input-blocked-retry.service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"input-blocked-retry.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/input-blocked-retry.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,aAAa,EAAwB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAuDpF;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAC5B,MAAM,CAAC,QAAQ,GAAoC,IAAI,CAAC;IACxD,IAAI,GAAiC,IAAI,CAAC;IACjC,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IACvD,0EAA0E;IACzD,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IACtD,iGAAiG;IAChF,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IACrD,kFAAkF;IACjE,SAAS,GAAG,IAAI,GAAG,EAA+C,CAAC;IACnE,MAAM,CAAkB;IACxB,GAAG,CAAe;IAEnC;;OAEG;IACH,YAAY,MAAoB,IAAI,CAAC,GAAG;QACvC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;QACrF,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,WAAW;QACjB,IAAI,CAAC,wBAAwB,CAAC,QAAQ;YAAE,wBAAwB,CAAC,QAAQ,GAAG,IAAI,wBAAwB,EAAE,CAAC;QAC3G,OAAO,wBAAwB,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED;;;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CAAC;YACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,yCAAyC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvI,CAAC;IACF,CAAC"}
|
|
@@ -99,7 +99,31 @@ export declare class AgentPostLog {
|
|
|
99
99
|
* @returns True when the agent spoke there after `since`
|
|
100
100
|
*/
|
|
101
101
|
postedSince(session: string, where: QueueConversation, since: number): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the agent answered in a conversation after it was explicitly
|
|
104
|
+
* shown a message from there (an owner message surfaced at a tool
|
|
105
|
+
* boundary). Unlike {@link postedSince}, a top-level DM counts: the agent
|
|
106
|
+
* was told to answer that message first, so its next top-level post there
|
|
107
|
+
* is taken as the answer (see {@link answersConversation}).
|
|
108
|
+
*
|
|
109
|
+
* @param session - The agent
|
|
110
|
+
* @param where - The message's conversation
|
|
111
|
+
* @param since - When the agent was shown it
|
|
112
|
+
* @returns True when the agent posted there after `since`
|
|
113
|
+
*/
|
|
114
|
+
answeredSince(session: string, where: QueueConversation, since: number): boolean;
|
|
102
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Whether a post answers a message the agent was explicitly shown: the same
|
|
118
|
+
* thread when the message sits in a thread; otherwise a top-level post in the
|
|
119
|
+
* same chat channel (or Slack channel). A post in some other thread of the
|
|
120
|
+
* channel does not count.
|
|
121
|
+
*
|
|
122
|
+
* @param post - Where the agent posted
|
|
123
|
+
* @param message - Where the message's answer belongs
|
|
124
|
+
* @returns True on a match
|
|
125
|
+
*/
|
|
126
|
+
export declare function answersConversation(post: QueueConversation, message: QueueConversation): boolean;
|
|
103
127
|
/**
|
|
104
128
|
* Whether a post landed in the conversation (and thread) a queued message belongs to.
|
|
105
129
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-pri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AE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,GAAE,MAAmB,GAAG,IAAI;IAS9E;;;;;;;;;OASG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"queue-priority.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/queue-priority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAChC,mGAAmG;IACnG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0IAA0I;IAC1I,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,yGAAyG;IACzG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAeD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEtG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAG5F;AAiBD;;;GAGG;AACH,qBAAa,YAAY;IACxB,OAAO,C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
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Whether the agent answered in a conversation after it was explicitly
|
|
106
|
+
* shown a message from there (an owner message surfaced at a tool
|
|
107
|
+
* boundary). Unlike {@link postedSince}, a top-level DM counts: the agent
|
|
108
|
+
* was told to answer that message first, so its next top-level post there
|
|
109
|
+
* is taken as the answer (see {@link answersConversation}).
|
|
110
|
+
*
|
|
111
|
+
* @param session - The agent
|
|
112
|
+
* @param where - The message's conversation
|
|
113
|
+
* @param since - When the agent was shown it
|
|
114
|
+
* @returns True when the agent posted there after `since`
|
|
115
|
+
*/
|
|
116
|
+
answeredSince(session, where, since) {
|
|
117
|
+
const list = this.posts.get(session);
|
|
118
|
+
if (!list)
|
|
119
|
+
return false;
|
|
120
|
+
return list.some((p) => p.at > since && answersConversation(p.where, where));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Whether a post answers a message the agent was explicitly shown: the same
|
|
125
|
+
* thread when the message sits in a thread; otherwise a top-level post in the
|
|
126
|
+
* same chat channel (or Slack channel). A post in some other thread of the
|
|
127
|
+
* channel does not count.
|
|
128
|
+
*
|
|
129
|
+
* @param post - Where the agent posted
|
|
130
|
+
* @param message - Where the message's answer belongs
|
|
131
|
+
* @returns True on a match
|
|
132
|
+
*/
|
|
133
|
+
export function answersConversation(post, message) {
|
|
134
|
+
if (sameConversation(post, message))
|
|
135
|
+
return true;
|
|
136
|
+
if (message.chatThreadId || message.threadTs)
|
|
137
|
+
return false;
|
|
138
|
+
if (message.chatChannelId && post.chatChannelId === message.chatChannelId && !post.chatThreadId)
|
|
139
|
+
return true;
|
|
140
|
+
if (message.slackChannelId && post.slackChannelId === message.slackChannelId && !post.threadTs)
|
|
141
|
+
return true;
|
|
142
|
+
return false;
|
|
104
143
|
}
|
|
105
144
|
/**
|
|
106
145
|
* Whether a post landed in the conversation (and thread) a queued message belongs to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-priority.js","sourceRo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Ac,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnE,CAAC,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"queue-priority.js","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/queue-priority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA2ChD,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAa,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAI,OAAe,EAAE,IAAY,EAAE,IAAsB,EAAE,EAAW;IAClG,OAAO,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,IAAY;IAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACjC,OAAO,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3F,CAAC;AAYD,oGAAoG;AACpG,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACzC,kCAAkC;AAClC,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;;GAGG;AACH,MAAM,OAAO,YAAY;IAChB,MAAM,CAAC,QAAQ,GAAwB,IAAI,CAAC;IACnC,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAExD,oCAAoC;IACpC,MAAM,CAAC,WAAW;QACjB,IAAI,CAAC,YAAY,CAAC,QAAQ;YAAE,YAAY,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QACvE,OAAO,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eta;
|
|
49
|
+
/**
|
|
50
|
+
* When the owner message was last handed to the busy agent at a tool
|
|
51
|
+
* boundary ({@link SubAgentMessageQueue.takeOwnerMessageForHook}). It
|
|
52
|
+
* stays queued until the agent posts in its conversation after this.
|
|
53
|
+
*/
|
|
54
|
+
surfacedAt?: number;
|
|
55
|
+
/** How many times it was handed over at a tool boundary */
|
|
56
|
+
surfaceCount?: number;
|
|
57
|
+
}
|
|
58
|
+
/** An owner message handed to a busy agent at a tool boundary. */
|
|
59
|
+
export interface SurfacedOwnerMessage {
|
|
60
|
+
/** The queued text (it already carries where and how to reply) */
|
|
61
|
+
data: string;
|
|
62
|
+
/** When it was queued */
|
|
63
|
+
queuedAt: number;
|
|
64
|
+
/** 1 the first time, 2 for the reminder */
|
|
65
|
+
surfaceCount: number;
|
|
49
66
|
}
|
|
50
67
|
/**
|
|
51
68
|
* Owner messages first, each group in its existing order (stable).
|
|
@@ -54,8 +71,17 @@ export interface QueuedAgentMessage {
|
|
|
54
71
|
* @returns The queue in delivery order
|
|
55
72
|
*/
|
|
56
73
|
export declare function ownerFirst(list: QueuedAgentMessage[]): QueuedAgentMessage[];
|
|
74
|
+
/**
|
|
75
|
+
* The text an idle delivery writes: an owner message the agent was already
|
|
76
|
+
* shown at a tool boundary (and has not answered in its conversation) gets
|
|
77
|
+
* a one-line notice, so an agent that did answer elsewhere does not answer twice.
|
|
78
|
+
*
|
|
79
|
+
* @param m - Queued message
|
|
80
|
+
* @returns Text to deliver
|
|
81
|
+
*/
|
|
82
|
+
export declare function withSurfacedNotice(m: QueuedAgentMessage): string;
|
|
57
83
|
/** Why a queued message was dropped before delivery as no longer needed. */
|
|
58
|
-
export type QueuePruneReason = 'answered-in-thread' | 'duplicate-owner-message' | 'superseded';
|
|
84
|
+
export type QueuePruneReason = 'answered-in-thread' | 'answered-after-surfacing' | 'duplicate-owner-message' | 'superseded';
|
|
59
85
|
/** A hand-over prepared for a queued WorkItem brief (see {@link SubAgentMessageQueue.setHandOverPreparer}). */
|
|
60
86
|
export interface QueuedHandOver {
|
|
61
87
|
/** Text to write */
|
|
@@ -171,6 +197,16 @@ export declare class SubAgentMessageQueue {
|
|
|
171
197
|
* @param check - The stale check, or null to deliver everything
|
|
172
198
|
*/
|
|
173
199
|
setStaleMessageCheck(check: StaleMessageCheck | null): void;
|
|
200
|
+
/**
|
|
201
|
+
* Where a queued message stands in its session's queue: 1 is next.
|
|
202
|
+
* Owner messages go ahead of the rest, so this is the delivery order,
|
|
203
|
+
* not the order of arrival.
|
|
204
|
+
*
|
|
205
|
+
* @param sessionName - The agent session
|
|
206
|
+
* @param data - The queued message
|
|
207
|
+
* @returns 1-based position of its last copy, or null when it is not queued
|
|
208
|
+
*/
|
|
209
|
+
positionOf(sessionName: string, data: string): number | null;
|
|
174
210
|
/**
|
|
175
211
|
* The messages waiting for a session, oldest first (read only).
|
|
176
212
|
*
|
|
@@ -293,6 +329,34 @@ export declare class SubAgentMessageQueue {
|
|
|
293
329
|
* @returns The messages still to deliver, in order
|
|
294
330
|
*/
|
|
295
331
|
private pruneNoLongerNeeded;
|
|
332
|
+
/**
|
|
333
|
+
* Hand the next owner message waiting for a busy agent to its PostToolUse
|
|
334
|
+
* hook, so it reaches the agent at the next tool boundary instead of at
|
|
335
|
+
* the end of the turn. At most one per call.
|
|
336
|
+
*
|
|
337
|
+
* The message is NOT removed: it is marked surfaced (time and count) and
|
|
338
|
+
* stays queued until the agent posts in its conversation after that time
|
|
339
|
+
* (then it is dropped here or at the flush). Unanswered after
|
|
340
|
+
* {@link OWNER_HOOK_MESSAGE_CONSTANTS.RESURFACE_AFTER_MS} it is shown once
|
|
341
|
+
* more; after {@link OWNER_HOOK_MESSAGE_CONSTANTS.MAX_SURFACES} only the
|
|
342
|
+
* normal idle delivery remains. Nothing is lost; at worst it arrives twice.
|
|
343
|
+
*
|
|
344
|
+
* Only the owner's own messages (and the owner's decision answers) that
|
|
345
|
+
* name a conversation — not harness reminders, not other traffic.
|
|
346
|
+
*
|
|
347
|
+
* @param sessionName - The agent whose hook is asking
|
|
348
|
+
* @param now - Clock
|
|
349
|
+
* @returns The message to show, or null
|
|
350
|
+
*/
|
|
351
|
+
takeOwnerMessageForHook(sessionName: string, now?: number): SurfacedOwnerMessage | null;
|
|
352
|
+
/**
|
|
353
|
+
* Whether a surfaced owner message was answered: the agent posted in its
|
|
354
|
+
* conversation after it was shown it.
|
|
355
|
+
*
|
|
356
|
+
* @param m - Queued message
|
|
357
|
+
* @returns True when it was answered
|
|
358
|
+
*/
|
|
359
|
+
private answeredAfterSurfacing;
|
|
296
360
|
/**
|
|
297
361
|
* Whether the agent has already posted in the thread a queued message
|
|
298
362
|
* belongs to, after it was queued — it was answered (the agent read the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent-message-queue.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/sub-agent-message-queue.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5F;;GAEG;AACH,oDAAoD;AACpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AAEtH,MAAM,WAAW,kBAAkB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sub-agent-message-queue.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/messaging/sub-agent-message-queue.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5F;;GAEG;AACH,oDAAoD;AACpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AAEtH,MAAM,WAAW,kBAAkB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,kEAAkE;AAClE,MAAM,WAAW,oBAAoB;IACpC,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,YAAY,EAAE,MAAM,CAAC;CACrB;AAYD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,EAAE,CAI3E;AAgBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAIhE;AAED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