@dsh-cc/progress-rebuild 0.0.0-stage → 0.9.1-rc.1
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/LICENSE +201 -0
- package/README.i18n.yaml +6 -0
- package/README.md +29 -2
- package/README.zh.md +30 -0
- package/lib/brief.d.ts +59 -0
- package/lib/brief.d.ts.map +1 -0
- package/lib/brief.js +141 -0
- package/lib/brief.js.map +1 -0
- package/lib/delivery.d.ts +32 -0
- package/lib/delivery.d.ts.map +1 -0
- package/lib/delivery.js +225 -0
- package/lib/delivery.js.map +1 -0
- package/lib/events.d.ts +45 -0
- package/lib/events.d.ts.map +1 -0
- package/lib/events.js +29 -0
- package/lib/events.js.map +1 -0
- package/lib/index.d.ts +48 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +55 -0
- package/lib/index.js.map +1 -0
- package/lib/settings.d.ts +35 -0
- package/lib/settings.d.ts.map +1 -0
- package/lib/settings.js +69 -0
- package/lib/settings.js.map +1 -0
- package/lib/state.d.ts +85 -0
- package/lib/state.d.ts.map +1 -0
- package/lib/state.js +234 -0
- package/lib/state.js.map +1 -0
- package/package.json +54 -3
package/lib/delivery.js
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery (design docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md
|
|
3
|
+
* §3.3 steps 1-4): Listener B (the `compaction/end` trigger with the
|
|
4
|
+
* in-turn / idle path split), Listener C (the `agent/pre-step` splice),
|
|
5
|
+
* the idle deferred inject, and the delivery ACK observer with the
|
|
6
|
+
* `progress-rebuild/injected` measurement append.
|
|
7
|
+
*
|
|
8
|
+
* All paths no-op unless `progress-rebuild.enabled` (§3.3 round-9 gate);
|
|
9
|
+
* every fault degrades to a debug log — delivery failure carries no
|
|
10
|
+
* user-facing error (§3.6).
|
|
11
|
+
*
|
|
12
|
+
* @module @dsh-cc/progress-rebuild/delivery
|
|
13
|
+
*/
|
|
14
|
+
import { createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
15
|
+
import { renderBrief } from "./brief.js";
|
|
16
|
+
import { appendProgressRebuildInjected } from "./events.js";
|
|
17
|
+
/** Bounded path-stash capacity (§3.3 step 4). */
|
|
18
|
+
export const PATH_STASH_CAPACITY = 64;
|
|
19
|
+
/** Max length of one debug line — never log full briefs. */
|
|
20
|
+
const DEBUG_HEAD = 120;
|
|
21
|
+
/** Debug notice (fail-soft, advisor pattern). */
|
|
22
|
+
function debug(ctx, message) {
|
|
23
|
+
try {
|
|
24
|
+
ctx.logger.debug(`progress-rebuild: ${message.slice(0, DEBUG_HEAD)}`);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Never throw into a hot path.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Register the delivery listeners. Plain listeners — never throw into a
|
|
32
|
+
* waterfall or an observer callback.
|
|
33
|
+
* @param ctx - the plug context (needs `agents`, `sessionProjections`, `logger`).
|
|
34
|
+
* @param readSettings - live settings reader (gate for B, C, and measurement).
|
|
35
|
+
*/
|
|
36
|
+
export function registerDelivery(ctx, readSettings) {
|
|
37
|
+
/** In-turn path: one pending brief per session id, cleared on splice (in-memory only, §3.3). */
|
|
38
|
+
const pendingBrief = new Set();
|
|
39
|
+
/** Path stash: brief messageId → delivery path (§3.3 step 4). */
|
|
40
|
+
const pathStash = new Map();
|
|
41
|
+
const rememberPath = (messageId, path) => {
|
|
42
|
+
if (pathStash.size >= PATH_STASH_CAPACITY) {
|
|
43
|
+
const oldest = pathStash.keys().next().value;
|
|
44
|
+
if (oldest !== undefined)
|
|
45
|
+
pathStash.delete(oldest);
|
|
46
|
+
}
|
|
47
|
+
pathStash.set(messageId, path);
|
|
48
|
+
};
|
|
49
|
+
/** Resolve the live agent for one session (registry is sessionId-keyed). */
|
|
50
|
+
const agentOf = (session) => {
|
|
51
|
+
try {
|
|
52
|
+
return ctx.get('agents')
|
|
53
|
+
?.get(session.header.id);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/** Build the brief message from the CURRENT projection state. */
|
|
60
|
+
const buildBriefMessage = (session) => {
|
|
61
|
+
try {
|
|
62
|
+
const projections = ctx.get('sessionProjections');
|
|
63
|
+
if (projections === undefined)
|
|
64
|
+
return undefined;
|
|
65
|
+
const state = projections.stateOf(session, 'progress-rebuild');
|
|
66
|
+
if (state === undefined)
|
|
67
|
+
return undefined;
|
|
68
|
+
const settings = readSettings();
|
|
69
|
+
const brief = renderBrief(state, { maxLines: settings.maxLines, includeVerified: settings.includeVerified });
|
|
70
|
+
const text = brief.text;
|
|
71
|
+
return {
|
|
72
|
+
message: createUserMessage({
|
|
73
|
+
content: [{ type: 'text', text }],
|
|
74
|
+
source: { kind: 'progress-rebuild' },
|
|
75
|
+
}),
|
|
76
|
+
sections: brief.sections,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
debug(ctx, `brief build failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
// Listener B (§3.3 step 1): the compaction/end trigger with the path split.
|
|
85
|
+
ctx.on('session/event', (session, event) => {
|
|
86
|
+
try {
|
|
87
|
+
// `compaction/end` is declared by the compaction plugin's augmentation
|
|
88
|
+
// (not the core session map) — compare as a widened string (the
|
|
89
|
+
// register-events.ts:277-283 in-repo precedent).
|
|
90
|
+
if (event.type !== 'compaction/end')
|
|
91
|
+
return;
|
|
92
|
+
const settings = readSettings();
|
|
93
|
+
if (!settings.enabled)
|
|
94
|
+
return;
|
|
95
|
+
// Skip failed compactions FIRST: nothing was amputated, so no resume
|
|
96
|
+
// brief (a resume label on intact history would mislead).
|
|
97
|
+
if (event.data.error !== undefined)
|
|
98
|
+
return;
|
|
99
|
+
const agent = agentOf(session);
|
|
100
|
+
if (agent === undefined) {
|
|
101
|
+
debug(ctx, 'compaction/end with no resolvable agent; skipping');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const turn = event.data.turn;
|
|
105
|
+
if (turn === null) {
|
|
106
|
+
// Idle path: DEFERRED durable inject — a synchronous agent.inject
|
|
107
|
+
// appends `agent/inbox/spliced` inside the publication window and
|
|
108
|
+
// throws reentry, silently contained (§3.3 step 1).
|
|
109
|
+
queueMicrotask(() => {
|
|
110
|
+
try {
|
|
111
|
+
const brief = buildBriefMessage(session);
|
|
112
|
+
if (brief === undefined)
|
|
113
|
+
return;
|
|
114
|
+
rememberPath(brief.message.id, 'inject');
|
|
115
|
+
agent.inject(brief.message);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
debug(ctx, `idle inject failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
// In-turn path: the step's inbox claim already happened before the
|
|
124
|
+
// pre-step waterfall — deliver via Listener C, never inject here.
|
|
125
|
+
pendingBrief.add(String(session.header.id));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
debug(ctx, `listener B failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
// Listener C (§3.3): in-turn delivery on the pre-step waterfall. `await
|
|
133
|
+
// next()` resolves after the whole chain (compaction included) ran, so a
|
|
134
|
+
// pendingBrief set by an in-flight compaction is visible regardless of
|
|
135
|
+
// registration order.
|
|
136
|
+
ctx.on('agent/pre-step', async ({ agent }, next) => {
|
|
137
|
+
// `await next()` sits OUTSIDE the try: if the downstream chain already
|
|
138
|
+
// threw, the waterfall is failing — re-invoking next() here would run
|
|
139
|
+
// every downstream hook a second time. Only our post-processing is
|
|
140
|
+
// fail-soft (it degrades to the unspliced decision).
|
|
141
|
+
const decision = await next();
|
|
142
|
+
try {
|
|
143
|
+
const sessionId = String(agent.session.header.id);
|
|
144
|
+
if (!pendingBrief.has(sessionId))
|
|
145
|
+
return decision;
|
|
146
|
+
if (decision.kind !== 'enter')
|
|
147
|
+
return decision; // reject leaves the flag set (next step delivers)
|
|
148
|
+
const brief = buildBriefMessage(agent.session);
|
|
149
|
+
if (brief === undefined)
|
|
150
|
+
return decision;
|
|
151
|
+
pendingBrief.delete(sessionId);
|
|
152
|
+
rememberPath(brief.message.id, 'pre-step');
|
|
153
|
+
return { ...decision, messages: [...decision.messages, brief.message] };
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
debug(ctx, `listener C failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
157
|
+
return decision;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// Delivery ACK (§3.3 step 4): fires only when a progress-rebuild-sourced
|
|
161
|
+
// user/message is COMMITTED — both delivery paths end in that append; a
|
|
162
|
+
// cancelled step between splice and append yields no row. The append is
|
|
163
|
+
// DEFERRED out of the observer callback (session.append reentry inside
|
|
164
|
+
// the publication window throws, silently).
|
|
165
|
+
ctx.on('session/event', (session, event) => {
|
|
166
|
+
try {
|
|
167
|
+
if (event.type !== 'user/message')
|
|
168
|
+
return;
|
|
169
|
+
if (!readSettings().enabled)
|
|
170
|
+
return;
|
|
171
|
+
const message = event.data;
|
|
172
|
+
if (message.source?.kind !== 'progress-rebuild' || typeof message.id !== 'string')
|
|
173
|
+
return;
|
|
174
|
+
const path = pathStash.get(message.id);
|
|
175
|
+
if (path === undefined)
|
|
176
|
+
return;
|
|
177
|
+
const text = event.data.content
|
|
178
|
+
?.find((block) => block?.type === 'text')?.text;
|
|
179
|
+
if (typeof text !== 'string')
|
|
180
|
+
return;
|
|
181
|
+
const payload = {
|
|
182
|
+
bytes: Buffer.byteLength(text, 'utf8'),
|
|
183
|
+
sections: countSections(text),
|
|
184
|
+
path,
|
|
185
|
+
};
|
|
186
|
+
queueMicrotask(() => {
|
|
187
|
+
try {
|
|
188
|
+
appendProgressRebuildInjected(session, payload);
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
debug(ctx, `measurement append failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
debug(ctx, `ack observer failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
// Cleanup: a disposed session leaves no pending flag behind.
|
|
200
|
+
ctx.on('session/disposed', (session) => {
|
|
201
|
+
try {
|
|
202
|
+
pendingBrief.delete(String(session.header.id));
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
// Never throw from cleanup.
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Count the brief's top-level sections for the measurement event — the same
|
|
211
|
+
* accounting as {@link renderBrief} (goal / verified / todos / last-user).
|
|
212
|
+
*/
|
|
213
|
+
export function countSections(text) {
|
|
214
|
+
let sections = 0;
|
|
215
|
+
if (/^- Goal: /m.test(text))
|
|
216
|
+
sections += 1;
|
|
217
|
+
if (text.includes('Verified commands (executed, exit 0'))
|
|
218
|
+
sections += 1;
|
|
219
|
+
if (text.includes('- Todo snapshot (verbatim):'))
|
|
220
|
+
sections += 1;
|
|
221
|
+
if (/^- Last user instruction at /m.test(text))
|
|
222
|
+
sections += 1;
|
|
223
|
+
return sections;
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAA;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,6BAA6B,EAAyC,M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lib/events.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event-face wiring for the progress-rebuild package:
|
|
3
|
+
* the host-only `progress-rebuild` projection key (SessionProjectionStateMap
|
|
4
|
+
* augmentation — no wire/SessionProjectionMap entry, §3.1) and the durable
|
|
5
|
+
* `progress-rebuild/injected` session event type (runtime registration +
|
|
6
|
+
* widened-append face, session-cwd precedent).
|
|
7
|
+
*
|
|
8
|
+
* @module @dsh-cc/progress-rebuild/events
|
|
9
|
+
*/
|
|
10
|
+
import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
|
|
11
|
+
import type { ProgressRebuildState } from './state.ts';
|
|
12
|
+
/** The session event type carrying a post-compact rebuild brief. */
|
|
13
|
+
export declare const PROGRESS_REBUILD_INJECTED_EVENT = "progress-rebuild/injected";
|
|
14
|
+
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
15
|
+
interface SessionProjectionStateMap {
|
|
16
|
+
/** Host-only progress-state projection owned by @dsh-cc/progress-rebuild. */
|
|
17
|
+
'progress-rebuild': ProgressRebuildState;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** The `progress-rebuild/injected` payload: dogfood measurement (§3.3 step 4). */
|
|
21
|
+
export interface ProgressRebuildInjectedEventData {
|
|
22
|
+
/** UTF-8 byte size of the delivered brief text. */
|
|
23
|
+
bytes: number;
|
|
24
|
+
/** Number of top-level sections rendered. */
|
|
25
|
+
sections: number;
|
|
26
|
+
/** Which delivery path landed the brief. */
|
|
27
|
+
path: 'pre-step' | 'inject';
|
|
28
|
+
}
|
|
29
|
+
/** Wire face of one log event that may or may not be a `progress-rebuild/injected`. */
|
|
30
|
+
interface ProgressRebuildInjectedWire {
|
|
31
|
+
readonly type: string;
|
|
32
|
+
readonly data: ProgressRebuildInjectedEventData;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Append one durable `progress-rebuild/injected` event (widened-append face:
|
|
36
|
+
* the typed event map gains this key only when the host types it; here the
|
|
37
|
+
* append goes through the runtime-registered type).
|
|
38
|
+
* @param session - the session the brief belongs to.
|
|
39
|
+
* @param payload - the rendered brief payload.
|
|
40
|
+
*/
|
|
41
|
+
export declare function appendProgressRebuildInjected(session: Session, payload: ProgressRebuildInjectedEventData): void;
|
|
42
|
+
/** Read a log event through the extended `progress-rebuild/injected` face. */
|
|
43
|
+
export declare function asInjectedEvent(event: SessionEvent): ProgressRebuildInjectedWire;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEtD,oEAAoE;AACpE,eAAO,MAAM,+BAA+B,8BAA8B,CAEzE;AAED,OAAO,QAAQ,2CAA2C,CAAC;IACzD,UAAU,yBAAyB;QACjC,6EAA6E;QAC7E,kBAAkB,EAAE,oBAAoB,CAAA;KACzC;CACF;AAED,kFAAkF;AAClF,MAAM,WAAW,gCAAgC;IAC/C,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAA;CAC5B;AAED,uFAAuF;AACvF,UAAU,2BAA2B;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAA;CAChD;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gCAAgC,GAAG,IAAI,CAK/G;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,2BAA2B,CAEhF"}
|
package/lib/events.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event-face wiring for the progress-rebuild package:
|
|
3
|
+
* the host-only `progress-rebuild` projection key (SessionProjectionStateMap
|
|
4
|
+
* augmentation — no wire/SessionProjectionMap entry, §3.1) and the durable
|
|
5
|
+
* `progress-rebuild/injected` session event type (runtime registration +
|
|
6
|
+
* widened-append face, session-cwd precedent).
|
|
7
|
+
*
|
|
8
|
+
* @module @dsh-cc/progress-rebuild/events
|
|
9
|
+
*/
|
|
10
|
+
import { KNOWN_SESSION_EVENT_TYPES } from '@deepseek-ai/dsh-session';
|
|
11
|
+
/** The session event type carrying a post-compact rebuild brief. */
|
|
12
|
+
export const PROGRESS_REBUILD_INJECTED_EVENT = 'progress-rebuild/injected';
|
|
13
|
+
KNOWN_SESSION_EVENT_TYPES.add(PROGRESS_REBUILD_INJECTED_EVENT);
|
|
14
|
+
/**
|
|
15
|
+
* Append one durable `progress-rebuild/injected` event (widened-append face:
|
|
16
|
+
* the typed event map gains this key only when the host types it; here the
|
|
17
|
+
* append goes through the runtime-registered type).
|
|
18
|
+
* @param session - the session the brief belongs to.
|
|
19
|
+
* @param payload - the rendered brief payload.
|
|
20
|
+
*/
|
|
21
|
+
export function appendProgressRebuildInjected(session, payload) {
|
|
22
|
+
;
|
|
23
|
+
session.append(PROGRESS_REBUILD_INJECTED_EVENT, payload);
|
|
24
|
+
}
|
|
25
|
+
/** Read a log event through the extended `progress-rebuild/injected` face. */
|
|
26
|
+
export function asInjectedEvent(event) {
|
|
27
|
+
return event;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAIpE,oEAAoE;AACpE,MAAM,CAAC,MAAM,+BAA+B,GAAG,2BAA2B,CAEzE;AAAC,yBAAyC,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAA;AAyBhF;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAAC,OAAgB,EAAE,OAAyC;IACvG,CAAC;IAAC,OAAO,CAAC,MAA0F,CAClG,+BAA+B,EAC/B,OAAO,CACR,CAAA;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,eAAe,CAAC,KAAmB;IACjD,OAAO,KAA+C,CAAA;AACxD,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured progress state + post-compact context rebuild (design
|
|
3
|
+
* docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md):
|
|
4
|
+
* derives a typed, per-session progress brief from already-recorded session
|
|
5
|
+
* events (goal fold, todo snapshot, verified bash receipts, last user
|
|
6
|
+
* message) and re-injects it into the first model request built after a
|
|
7
|
+
* successful `compaction/end`.
|
|
8
|
+
*
|
|
9
|
+
* Slice B (derivation): registers the `progress-rebuild` Session projection
|
|
10
|
+
* unit from state.ts. Slice C (delivery) lands here.
|
|
11
|
+
* Ship-dark: `progress-rebuild.enabled` defaults to false.
|
|
12
|
+
*
|
|
13
|
+
* @module @dsh-cc/progress-rebuild
|
|
14
|
+
*/
|
|
15
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
16
|
+
import type { ProgressRebuildSettings } from './settings.ts';
|
|
17
|
+
export { SETTINGS_NAMESPACE, SettingsSchema, DEFAULT_PROGRESS_REBUILD_SETTINGS, registerSettings, type ProgressRebuildSettings, } from './settings.ts';
|
|
18
|
+
export { PROGRESS_REBUILD_INJECTED_EVENT, appendProgressRebuildInjected, asInjectedEvent, type ProgressRebuildInjectedEventData, } from './events.ts';
|
|
19
|
+
export { registerDelivery, countSections, PATH_STASH_CAPACITY, type DeliveryPath, } from './delivery.ts';
|
|
20
|
+
export { renderBrief, renderGoalLine, applyBudget, truncateLine, STUB_MARKER_NOTE, NOT_VERIFIED_NOTE, BRIEF_HEADER, VERIFIED_HEADER, MAX_LINE_CHARS, BRIEF_MAX_BYTES, type RenderedBrief, type BriefOptions, } from './brief.ts';
|
|
21
|
+
export { applyProgressRebuild, progressRebuildProjection, progressRebuildStateSchema, VERIFIED_RING_CAP, CALL_INDEX_CAP, FAILURE_MARKERS, type ProgressRebuildState, type VerifiedReceipt, type RecordedCall, type LastUserMessage, } from './state.ts';
|
|
22
|
+
/** Cordis plugin id. */
|
|
23
|
+
export declare const name = "progress-rebuild";
|
|
24
|
+
/** The projection registry this plugin registers its unit into (§3.1). */
|
|
25
|
+
export declare const inject: string[];
|
|
26
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
27
|
+
interface MessageSourceMap {
|
|
28
|
+
/** Source kind of this package's injected post-compact rebuild brief. */
|
|
29
|
+
'progress-rebuild': {
|
|
30
|
+
kind: 'progress-rebuild';
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** Additive apply option (test seam). */
|
|
35
|
+
export interface ProgressRebuildPluginConfig {
|
|
36
|
+
/** Test seam: inject a live settings reader instead of the namespace one. */
|
|
37
|
+
readonly readSettings?: () => ProgressRebuildSettings;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Mount the plugin: register the settings namespace (for /config UX), the
|
|
41
|
+
* `progress-rebuild` projection unit (slice B), and the delivery listeners
|
|
42
|
+
* (slice C — Listener B, Listener C, the ACK observer; all gated on
|
|
43
|
+
* `progress-rebuild.enabled`, ship-dark default false).
|
|
44
|
+
* @param ctx - the plug context (declares `sessionProjections` via inject).
|
|
45
|
+
* @param config - optional config seam (tests inject a settings reader).
|
|
46
|
+
*/
|
|
47
|
+
export declare function apply(ctx: Context, config?: ProgressRebuildPluginConfig): void;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @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Y,CAAC,EAAE,MAAM,uBAAuB,CAAA;CACtD;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,2BAAgC,GAAG,IAAI,CAmBlF"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured progress state + post-compact context rebuild (design
|
|
3
|
+
* docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md):
|
|
4
|
+
* derives a typed, per-session progress brief from already-recorded session
|
|
5
|
+
* events (goal fold, todo snapshot, verified bash receipts, last user
|
|
6
|
+
* message) and re-injects it into the first model request built after a
|
|
7
|
+
* successful `compaction/end`.
|
|
8
|
+
*
|
|
9
|
+
* Slice B (derivation): registers the `progress-rebuild` Session projection
|
|
10
|
+
* unit from state.ts. Slice C (delivery) lands here.
|
|
11
|
+
* Ship-dark: `progress-rebuild.enabled` defaults to false.
|
|
12
|
+
*
|
|
13
|
+
* @module @dsh-cc/progress-rebuild
|
|
14
|
+
*/
|
|
15
|
+
import { registerDelivery } from "./delivery.js";
|
|
16
|
+
import { DEFAULT_PROGRESS_REBUILD_SETTINGS, registerSettings } from "./settings.js";
|
|
17
|
+
import { progressRebuildProjection } from "./state.js";
|
|
18
|
+
export { SETTINGS_NAMESPACE, SettingsSchema, DEFAULT_PROGRESS_REBUILD_SETTINGS, registerSettings, } from "./settings.js";
|
|
19
|
+
export { PROGRESS_REBUILD_INJECTED_EVENT, appendProgressRebuildInjected, asInjectedEvent, } from "./events.js";
|
|
20
|
+
export { registerDelivery, countSections, PATH_STASH_CAPACITY, } from "./delivery.js";
|
|
21
|
+
export { renderBrief, renderGoalLine, applyBudget, truncateLine, STUB_MARKER_NOTE, NOT_VERIFIED_NOTE, BRIEF_HEADER, VERIFIED_HEADER, MAX_LINE_CHARS, BRIEF_MAX_BYTES, } from "./brief.js";
|
|
22
|
+
export { applyProgressRebuild, progressRebuildProjection, progressRebuildStateSchema, VERIFIED_RING_CAP, CALL_INDEX_CAP, FAILURE_MARKERS, } from "./state.js";
|
|
23
|
+
/** Cordis plugin id. */
|
|
24
|
+
export const name = 'progress-rebuild';
|
|
25
|
+
/** The projection registry this plugin registers its unit into (§3.1). */
|
|
26
|
+
export const inject = ['sessionProjections'];
|
|
27
|
+
/**
|
|
28
|
+
* Mount the plugin: register the settings namespace (for /config UX), the
|
|
29
|
+
* `progress-rebuild` projection unit (slice B), and the delivery listeners
|
|
30
|
+
* (slice C — Listener B, Listener C, the ACK observer; all gated on
|
|
31
|
+
* `progress-rebuild.enabled`, ship-dark default false).
|
|
32
|
+
* @param ctx - the plug context (declares `sessionProjections` via inject).
|
|
33
|
+
* @param config - optional config seam (tests inject a settings reader).
|
|
34
|
+
*/
|
|
35
|
+
export function apply(ctx, config = {}) {
|
|
36
|
+
const namespaceReader = registerSettings(ctx);
|
|
37
|
+
// inject: ['sessionProjections'] above; throw on absence (§3.1 explicit-fail).
|
|
38
|
+
const projections = ctx.get('sessionProjections');
|
|
39
|
+
if (projections === undefined)
|
|
40
|
+
throw new Error('progress-rebuild requires the sessionProjections registry');
|
|
41
|
+
projections.register(progressRebuildProjection);
|
|
42
|
+
// Gate reader (§3.3 round-9): the injected test seam, else the namespace
|
|
43
|
+
// reader, else ship-dark defaults (no settings provider → enabled false).
|
|
44
|
+
const readSettings = config.readSettings
|
|
45
|
+
?? (() => {
|
|
46
|
+
try {
|
|
47
|
+
return namespaceReader?.() ?? DEFAULT_PROGRESS_REBUILD_SETTINGS;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return DEFAULT_PROGRESS_REBUILD_SETTINGS;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
registerDelivery(ctx, readSettings);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":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yE;IACzE,0EAA0E;IAC1E,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY;WACnC,CAAC,GAA4B,EAAE;YAChC,IAAI,CAAC;gBACH,OAAO,eAAe,EAAE,EAAE,IAAI,iCAAiC,CAAA;YACjE,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,iCAAiC,CAAA;YAC1C,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;AACrC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings for the progress-rebuild plugin (design
|
|
3
|
+
* docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md §3.5),
|
|
4
|
+
* namespace-registration half only for this slice (advisor-watchdog dual-half
|
|
5
|
+
* pattern, packages/interaction/advisor-watchdog/src/settings.ts — the raw
|
|
6
|
+
* user-layer read lands with slice B, when a consumer needs it).
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
+
import type { SettingsNamespace } from '@dsh-cc/settings-provider';
|
|
12
|
+
import z from '@deepseek-ai/schemastery';
|
|
13
|
+
/** The settings namespace carrying the progress-rebuild flags. */
|
|
14
|
+
export declare const SETTINGS_NAMESPACE: SettingsNamespace;
|
|
15
|
+
/** Resolved settings shape. */
|
|
16
|
+
export interface ProgressRebuildSettings {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
maxLines: number;
|
|
19
|
+
includeVerified: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Namespace schema. Wrapped in the z.const(undefined) union (turn-rules
|
|
23
|
+
* convention) so a genuinely absent namespace value stays absent instead of
|
|
24
|
+
* materializing defaults into the cascade.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SettingsSchema: z<Record<string, unknown>>;
|
|
27
|
+
/** Ship-dark defaults (§3.1/§3.5): enabled false. */
|
|
28
|
+
export declare const DEFAULT_PROGRESS_REBUILD_SETTINGS: ProgressRebuildSettings;
|
|
29
|
+
/**
|
|
30
|
+
* Register the settings namespace (for /config UX and validation only).
|
|
31
|
+
* Returns the live reader, or `undefined` when the host has no settings
|
|
32
|
+
* provider.
|
|
33
|
+
*/
|
|
34
|
+
export declare function registerSettings(ctx: Context): (() => ProgressRebuildSettings) | undefined;
|
|
35
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAGxC,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,EAAyB,iBAAiB,CAAA;AAEzE,+BAA+B;AAC/B,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;CACzB;AAWD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACQ,CAAA;AAE9D,qDAAqD;AACrD,eAAO,MAAM,iCAAiC,EAAE,uBAI/C,CAAA;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,MAAM,uBAAuB,CAAC,GAAG,SAAS,CAkB1F"}
|
package/lib/settings.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings for the progress-rebuild plugin (design
|
|
3
|
+
* docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md §3.5),
|
|
4
|
+
* namespace-registration half only for this slice (advisor-watchdog dual-half
|
|
5
|
+
* pattern, packages/interaction/advisor-watchdog/src/settings.ts — the raw
|
|
6
|
+
* user-layer read lands with slice B, when a consumer needs it).
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import z from '@deepseek-ai/schemastery';
|
|
11
|
+
import { registerNamespaceSafe } from '@dsh-cc/settings-ns';
|
|
12
|
+
/** The settings namespace carrying the progress-rebuild flags. */
|
|
13
|
+
export const SETTINGS_NAMESPACE = 'progress-rebuild';
|
|
14
|
+
const opt = (t) => z.union([t, z.const(undefined)]);
|
|
15
|
+
/** Inner object shape (kebab keys). Absence resolves to defaults via schemastery. */
|
|
16
|
+
const SettingsObject = z.object({
|
|
17
|
+
enabled: z.boolean().default(false),
|
|
18
|
+
'max-lines': z.number().min(1).default(120),
|
|
19
|
+
'include-verified': z.boolean().default(true),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Namespace schema. Wrapped in the z.const(undefined) union (turn-rules
|
|
23
|
+
* convention) so a genuinely absent namespace value stays absent instead of
|
|
24
|
+
* materializing defaults into the cascade.
|
|
25
|
+
*/
|
|
26
|
+
export const SettingsSchema = opt(SettingsObject);
|
|
27
|
+
/** Ship-dark defaults (§3.1/§3.5): enabled false. */
|
|
28
|
+
export const DEFAULT_PROGRESS_REBUILD_SETTINGS = {
|
|
29
|
+
enabled: false,
|
|
30
|
+
maxLines: 120,
|
|
31
|
+
includeVerified: true,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Register the settings namespace (for /config UX and validation only).
|
|
35
|
+
* Returns the live reader, or `undefined` when the host has no settings
|
|
36
|
+
* provider.
|
|
37
|
+
*/
|
|
38
|
+
export function registerSettings(ctx) {
|
|
39
|
+
const settings = ctx.get('settings');
|
|
40
|
+
if (settings === undefined)
|
|
41
|
+
return undefined;
|
|
42
|
+
const read = registerNamespaceSafe(ctx, SETTINGS_NAMESPACE, SettingsSchema);
|
|
43
|
+
return () => {
|
|
44
|
+
try {
|
|
45
|
+
const value = read();
|
|
46
|
+
if (value === undefined)
|
|
47
|
+
return DEFAULT_PROGRESS_REBUILD_SETTINGS;
|
|
48
|
+
return resolveSection(value);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Malformed live scope → ship defaults; never throw into a hot path.
|
|
52
|
+
return DEFAULT_PROGRESS_REBUILD_SETTINGS;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Resolve one raw section into the settings shape with defaults. */
|
|
57
|
+
function resolveSection(section) {
|
|
58
|
+
const resolved = SettingsObject(section);
|
|
59
|
+
const asInt = (value, fallback) => {
|
|
60
|
+
const n = typeof value === 'number' && Number.isFinite(value) ? Math.trunc(value) : fallback;
|
|
61
|
+
return n;
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
enabled: resolved.enabled,
|
|
65
|
+
maxLines: asInt(resolved['max-lines'], 120),
|
|
66
|
+
includeVerified: resolved['include-verified'] ?? true,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,kEAAkE;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAuC,CAAA;AASzE,MAAM,GAAG,GAAG,CAAI,CAAO,EAAoB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAqB,CAAA;AAElG,qFAAqF;AACrF,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,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K,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC5F,OAAO,CAAC,CAAA;IACV,CAAC,CAAA;IACD,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,OAAkB;QACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC;QAC3C,eAAe,EAAG,QAAQ,CAAC,kBAAkB,CAAa,IAAI,IAAI;KACnE,CAAA;AACH,CAAC"}
|
package/lib/state.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M1 progress-state projection (design
|
|
3
|
+
* docs/plans/2026-10-09-structured-progress-and-post-compact-rebuild.md §3.2):
|
|
4
|
+
* one registered Session projection unit whose `apply` fold consumes EVERY
|
|
5
|
+
* committed session event, self-filtering per arm (goal / todos / verified /
|
|
6
|
+
* lastUser). Registered under the host-only key `progress-rebuild` (§3.1).
|
|
7
|
+
*
|
|
8
|
+
* The fold NEVER THROWS — the projection registry's `drive` has no try/catch
|
|
9
|
+
* (upstream session-projection/src/index.ts:681-684), so every parse is caught
|
|
10
|
+
* and every arm is individually contained: a throw inside an arm leaves that
|
|
11
|
+
* arm unchanged. State is plain JSON (arrays, no Map/Set) so the persisted
|
|
12
|
+
* projection cache can restore it.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import type { ZodType } from 'zod';
|
|
17
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
18
|
+
import type { ProjectionDefinition } from '@deepseek-ai/dsh-session-projection';
|
|
19
|
+
import { type GoalProjectionState } from '@deepseek-ai/dsh-goal';
|
|
20
|
+
/** One verified bash receipt: command head + execution evidence (exit 0). */
|
|
21
|
+
export interface VerifiedReceipt {
|
|
22
|
+
/** Unix epoch ms of the `tool/result` event. */
|
|
23
|
+
ts: number;
|
|
24
|
+
/** `tool/call`/`tool/result` pairing id. */
|
|
25
|
+
callId: string;
|
|
26
|
+
/** First 200 chars of the bash command. */
|
|
27
|
+
commandHead: string;
|
|
28
|
+
}
|
|
29
|
+
/** One recorded `tool/call`, doubling as the receipt dedupe set. */
|
|
30
|
+
export interface RecordedCall {
|
|
31
|
+
callId: string;
|
|
32
|
+
name: string;
|
|
33
|
+
commandHead: string;
|
|
34
|
+
/** Whether the command passed the conservative eligibility scan. */
|
|
35
|
+
eligible: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Last genuine user message reference. */
|
|
38
|
+
export interface LastUserMessage {
|
|
39
|
+
ts: number;
|
|
40
|
+
/** Session log seq of the `user/message` event (as decimal string — plain JSON). */
|
|
41
|
+
seq: string;
|
|
42
|
+
/** First 200 chars of the first non-empty text block. */
|
|
43
|
+
text: string;
|
|
44
|
+
}
|
|
45
|
+
/** The whole `progress-rebuild` projection state (plain JSON). */
|
|
46
|
+
export interface ProgressRebuildState {
|
|
47
|
+
/** Harness canonical goal fold (§3.2 goal row). */
|
|
48
|
+
goal: GoalProjectionState;
|
|
49
|
+
/** Latest `todo/write` snapshot verbatim; null before the first write. */
|
|
50
|
+
todos: {
|
|
51
|
+
content: string;
|
|
52
|
+
status: string;
|
|
53
|
+
}[] | null;
|
|
54
|
+
/** Verified bash receipts, newest LAST, ring-capped at 20. */
|
|
55
|
+
verified: VerifiedReceipt[];
|
|
56
|
+
/** Recent `tool/call` records, oldest first, LRU-capped at 512; FIRST occurrence kept per callId. */
|
|
57
|
+
callIndex: RecordedCall[];
|
|
58
|
+
/** Last genuine user message, or null. */
|
|
59
|
+
lastUser: LastUserMessage | null;
|
|
60
|
+
}
|
|
61
|
+
/** Verified-receipt ring capacity. */
|
|
62
|
+
export declare const VERIFIED_RING_CAP = 20;
|
|
63
|
+
/** Recent-calls index capacity (also the receipt dedupe set). */
|
|
64
|
+
export declare const CALL_INDEX_CAP = 512;
|
|
65
|
+
/**
|
|
66
|
+
* Fixed exit/interrupt marker vocabulary rendered by the bash tool
|
|
67
|
+
* (upstream tool-bash/src/render.ts): marker ABSENCE in the result tail is
|
|
68
|
+
* the success signal. Note the exit marker appears only for NON-ZERO exits,
|
|
69
|
+
* so a clean exit-0 result carries no marker at all.
|
|
70
|
+
*/
|
|
71
|
+
export declare const FAILURE_MARKERS: readonly ["[exit code: ", "[killed by signal: ", "[timed out after ", "[stopped: ", "[still running after ", "[sandbox: file access denied under ", "[sandbox: the sandbox runner itself failed under "];
|
|
72
|
+
/**
|
|
73
|
+
* The fold: previous state + one committed event → next state. Returns the
|
|
74
|
+
* SAME reference when the event touches nothing (the registry's zero-work
|
|
75
|
+
* contract). Consumes every session event; each arm self-filters.
|
|
76
|
+
*/
|
|
77
|
+
export declare function applyProgressRebuild(state: ProgressRebuildState, event: SessionEvent): ProgressRebuildState;
|
|
78
|
+
/** Validates persisted state before it seeds a fold (plain-JSON shape). */
|
|
79
|
+
export declare const progressRebuildStateSchema: ZodType<ProgressRebuildState>;
|
|
80
|
+
/**
|
|
81
|
+
* The registered projection unit (§3.1): host-only key `progress-rebuild`,
|
|
82
|
+
* no wire face, stateVersion 1.
|
|
83
|
+
*/
|
|
84
|
+
export declare const progressRebuildProjection: ProjectionDefinition<'progress-rebuild', ProgressRebuildState>;
|
|
85
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAmC,MAAM,0BAA0B,CAAA;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAErF,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,E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