@mcoda/codali 0.1.135-codali.41 → 0.1.135-codali.42
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/CHANGELOG.md +84 -0
- package/README.md +8 -0
- package/config/skills/testing-and-verification/SKILL.md +5 -5
- package/config/skills/webapp-testing/SKILL.md +13 -0
- package/config/skills/webapp-testing/journey-driver.mjs +85 -0
- package/dist/cli/TerminalCommand.js +2 -2
- package/dist/cli/tui/TerminalPresentation.js +1 -1
- package/dist/config/OrchestrationConfig.d.ts +1 -0
- package/dist/config/OrchestrationConfig.d.ts.map +1 -1
- package/dist/config/OrchestrationConfig.js +3 -1
- package/dist/docdex/DocdexClient.d.ts +11 -0
- package/dist/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/docdex/DocdexClient.js +55 -1
- package/dist/permissions/PermissionGate.d.ts +7 -0
- package/dist/permissions/PermissionGate.d.ts.map +1 -1
- package/dist/permissions/PermissionGate.js +26 -0
- package/dist/providers/ConfiguredProvider.d.ts +2 -0
- package/dist/providers/ConfiguredProvider.d.ts.map +1 -1
- package/dist/providers/ConfiguredProvider.js +29 -0
- package/dist/providers/ModelServiceError.d.ts +2 -2
- package/dist/providers/ModelServiceError.d.ts.map +1 -1
- package/dist/providers/ModelServiceError.js +4 -0
- package/dist/runtime/ContextCompression.d.ts +5 -0
- package/dist/runtime/ContextCompression.d.ts.map +1 -1
- package/dist/runtime/ContextCompression.js +16 -4
- package/dist/runtime/InteractionContract.d.ts +15 -0
- package/dist/runtime/InteractionContract.d.ts.map +1 -1
- package/dist/runtime/InteractionContract.js +33 -0
- package/dist/runtime/InteractionRouter.d.ts +3 -3
- package/dist/runtime/InteractionRouter.d.ts.map +1 -1
- package/dist/runtime/InteractionRouter.js +1 -1
- package/dist/runtime/OutageWait.d.ts +33 -5
- package/dist/runtime/OutageWait.d.ts.map +1 -1
- package/dist/runtime/OutageWait.js +68 -8
- package/dist/runtime/ResearchEvidence.d.ts +14 -0
- package/dist/runtime/ResearchEvidence.d.ts.map +1 -1
- package/dist/runtime/ResearchEvidence.js +60 -0
- package/dist/runtime/ReviewCoordinator.d.ts.map +1 -1
- package/dist/runtime/ReviewCoordinator.js +2 -1
- package/dist/runtime/ReviewSource.d.ts +5 -0
- package/dist/runtime/ReviewSource.d.ts.map +1 -1
- package/dist/runtime/ReviewSource.js +6 -1
- package/dist/runtime/SessionController.d.ts +67 -1
- package/dist/runtime/SessionController.d.ts.map +1 -1
- package/dist/runtime/SessionController.js +443 -39
- package/dist/runtime/TaskReview.d.ts.map +1 -1
- package/dist/runtime/TaskReview.js +17 -2
- package/dist/runtime/VerificationCommand.d.ts +8 -0
- package/dist/runtime/VerificationCommand.d.ts.map +1 -1
- package/dist/runtime/VerificationCommand.js +114 -0
- package/dist/runtime/WorkingStyle.d.ts +20 -0
- package/dist/runtime/WorkingStyle.d.ts.map +1 -0
- package/dist/runtime/WorkingStyle.js +71 -0
- package/dist/tools/ToolRegistry.d.ts.map +1 -1
- package/dist/tools/ToolRegistry.js +19 -2
- package/dist/tools/ToolTypes.d.ts +3 -0
- package/dist/tools/ToolTypes.d.ts.map +1 -1
- package/dist/tools/browser/BrowserTool.d.ts +23 -1
- package/dist/tools/browser/BrowserTool.d.ts.map +1 -1
- package/dist/tools/browser/BrowserTool.js +83 -4
- package/dist/tools/browser/HttpFallback.d.ts +39 -0
- package/dist/tools/browser/HttpFallback.d.ts.map +1 -0
- package/dist/tools/browser/HttpFallback.js +240 -0
- package/dist/tools/calculation/CalculatorTool.d.ts +16 -1
- package/dist/tools/calculation/CalculatorTool.d.ts.map +1 -1
- package/dist/tools/calculation/CalculatorTool.js +147 -20
- package/dist/tools/shell/AsyncProcess.d.ts.map +1 -1
- package/dist/tools/shell/AsyncProcess.js +6 -0
- package/dist/tools/shell/IsolatedExecutor.d.ts.map +1 -1
- package/dist/tools/shell/IsolatedExecutor.js +10 -2
- package/dist/tools/shell/ShellTool.d.ts +2 -0
- package/dist/tools/shell/ShellTool.d.ts.map +1 -1
- package/dist/tools/shell/ShellTool.js +32 -2
- package/dist/tools/verification/VitestTool.d.ts.map +1 -1
- package/dist/tools/verification/VitestTool.js +75 -5
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewCoordinator.d.ts","sourceRoot":"","sources":["../../src/runtime/ReviewCoordinator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAgD,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAiB,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ReviewCoordinator.d.ts","sourceRoot":"","sources":["../../src/runtime/ReviewCoordinator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAgD,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAiB,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAI9F,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MA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|
|
2
2
|
import { prepareReviewContract, reviewContractSources } from "./ReviewContract.js";
|
|
3
3
|
import { reviewPromptContext } from "./TaskReviewContext.js";
|
|
4
4
|
import { runTaskReview } from "./TaskReview.js";
|
|
5
|
+
import { REVIEW_PAGE_CHARS } from "./ReviewSource.js";
|
|
5
6
|
import { validationOutputExcerpt } from "./ValidationOutput.js";
|
|
6
7
|
export function reviewWorkspaceHash(hashes) {
|
|
7
8
|
return createHash("sha256").update(JSON.stringify(Object.fromEntries(Object.entries(hashes)
|
|
@@ -109,7 +110,7 @@ export async function reviewTaskScope(options) {
|
|
|
109
110
|
for (const file of initialPaths) {
|
|
110
111
|
if (remaining <= 0)
|
|
111
112
|
break;
|
|
112
|
-
const evidence = await options.readSource(file, Math.min(
|
|
113
|
+
const evidence = await options.readSource(file, Math.min(REVIEW_PAGE_CHARS, Math.floor(remaining / 2)));
|
|
113
114
|
const addedChars = JSON.stringify({ [file]: evidence.content }).length + 32;
|
|
114
115
|
if (addedChars > remaining)
|
|
115
116
|
continue;
|
|
@@ -4,6 +4,11 @@ export declare const readReviewSource: (root: string, relative: string, expected
|
|
|
4
4
|
content: string;
|
|
5
5
|
truncated: boolean;
|
|
6
6
|
}>;
|
|
7
|
+
/** Characters of one source page. At 8,000 a reviewer needed six or seven
|
|
8
|
+
* requests (a model call each) to read one 50k-character file, and ran into
|
|
9
|
+
* its four-round limit before it could decide; the review prompt is still
|
|
10
|
+
* fitted to the model's context after pages are added. */
|
|
11
|
+
export declare const REVIEW_PAGE_CHARS = 24000;
|
|
7
12
|
/** Page offsets refer to redacted text, so repeated reads cannot reconstruct a secret. */
|
|
8
13
|
export declare function readReviewSourcePage(root: string, relative: string, expectedHash: string, offset: number): Promise<ReviewSourcePage>;
|
|
9
14
|
//# sourceMappingURL=ReviewSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewSource.d.ts","sourceRoot":"","sources":["../../src/runtime/ReviewSource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,GAAU,MAAM,MAAM,EAAE,UAAU,MAAM,EAAE,cAAc,MAAM,EAAE,UAAU,MAAM,KAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAyB9J,CAAC;AAEF,0FAA0F;AAC1F,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAQ1I"}
|
|
1
|
+
{"version":3,"file":"ReviewSource.d.ts","sourceRoot":"","sources":["../../src/runtime/ReviewSource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,GAAU,MAAM,MAAM,EAAE,UAAU,MAAM,EAAE,cAAc,MAAM,EAAE,UAAU,MAAM,KAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAyB9J,CAAC;AAEF;;;0DAG0D;AAC1D,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,0FAA0F;AAC1F,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAQ1I"}
|
|
@@ -39,6 +39,11 @@ export const readReviewSource = async (root, relative, expectedHash, maxChars) =
|
|
|
39
39
|
await handle.close();
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
/** Characters of one source page. At 8,000 a reviewer needed six or seven
|
|
43
|
+
* requests (a model call each) to read one 50k-character file, and ran into
|
|
44
|
+
* its four-round limit before it could decide; the review prompt is still
|
|
45
|
+
* fitted to the model's context after pages are added. */
|
|
46
|
+
export const REVIEW_PAGE_CHARS = 24000;
|
|
42
47
|
/** Page offsets refer to redacted text, so repeated reads cannot reconstruct a secret. */
|
|
43
48
|
export async function readReviewSourcePage(root, relative, expectedHash, offset) {
|
|
44
49
|
if (!Number.isSafeInteger(offset) || offset < 0)
|
|
@@ -48,7 +53,7 @@ export async function readReviewSourcePage(root, relative, expectedHash, offset)
|
|
|
48
53
|
return { path: relative, offset, content: source.content, truncated: true, unavailable: true };
|
|
49
54
|
if (offset > source.content.length)
|
|
50
55
|
throw new Error(`Review source offset exceeds the file length: ${relative}`);
|
|
51
|
-
const content = source.content.slice(offset, offset +
|
|
56
|
+
const content = source.content.slice(offset, offset + REVIEW_PAGE_CHARS);
|
|
52
57
|
const truncated = offset + content.length < source.content.length;
|
|
53
58
|
return { path: relative, offset, content, truncated, ...(truncated ? { nextOffset: offset + content.length } : {}) };
|
|
54
59
|
}
|
|
@@ -34,6 +34,11 @@ export interface SessionControllerOptions {
|
|
|
34
34
|
/** Wall-clock time (epoch ms) at which the host stops this controller. Work
|
|
35
35
|
* winds down before it and ends with a status report instead of an error. */
|
|
36
36
|
deadlineAt?: number;
|
|
37
|
+
/** Share of a research turn's time after which its mid-run draft is written (default RESEARCH_DRAFT_SHARE). */
|
|
38
|
+
researchDraftShare?: number;
|
|
39
|
+
/** Fixed time one model request may stay unanswered before it is abandoned
|
|
40
|
+
* and retried; by default it follows modelStallAllowanceMs. */
|
|
41
|
+
modelStallMs?: number;
|
|
37
42
|
workspaceRoot: string;
|
|
38
43
|
resolved: ResolvedOrchestrationConfig;
|
|
39
44
|
effort?: EffortLevel;
|
|
@@ -50,6 +55,8 @@ export interface SessionControllerOptions {
|
|
|
50
55
|
allowMedia?: boolean;
|
|
51
56
|
allowNetwork?: boolean;
|
|
52
57
|
userInstructionsPath?: string | false;
|
|
58
|
+
/** Follow the user's working style from Docdex personal preferences. Default: config docdex.workingStyle, else on; CODALI_WORKING_STYLE=0 turns it off. Benchmarks pass false. */
|
|
59
|
+
workingStyle?: boolean;
|
|
53
60
|
/** Authenticated host context; repository settings can only narrow tools. */
|
|
54
61
|
runContext?: RunContext;
|
|
55
62
|
projectTaskAuthority?: ProjectTaskAuthority;
|
|
@@ -76,6 +83,18 @@ export declare const searchEngineQuery: (url: unknown) => string | undefined;
|
|
|
76
83
|
/** Time an interactive turn keeps back to write its answer and audit it. Sized
|
|
77
84
|
* from the slowest model call seen: a fixed quarter of the timeout left 45-minute
|
|
78
85
|
* research turns idle for their last 8 minutes while drafting took about 3. */
|
|
86
|
+
/** Share of a research turn's time after which it writes its mid-run draft. */
|
|
87
|
+
export declare const RESEARCH_DRAFT_SHARE = 0.55;
|
|
88
|
+
/** Research goes on after a draft with open points only when at least this much time is left beyond the answer reserve. */
|
|
89
|
+
export declare const RESEARCH_CONTINUE_MIN_MS: number;
|
|
90
|
+
/** Time kept before the limit to hand over the evidence when the final answer did not arrive. */
|
|
91
|
+
export declare const FINAL_DELIVERY_MARGIN_MS = 15000;
|
|
92
|
+
/** Waits before retrying a transcript write the disk had no space for (about 15 minutes in all). */
|
|
93
|
+
export declare const DISK_FULL_WAITS_MS: number[];
|
|
94
|
+
/** A full disk is an outage too: something else filled it and space often comes
|
|
95
|
+
* back (a log rotates, a cache is cleared). The write is retried after waits
|
|
96
|
+
* instead of ending the session on the first ENOSPC; any other error is final. */
|
|
97
|
+
export declare const appendWithSpaceWait: <T>(write: () => Promise<T>, signal?: AbortSignal, waits?: number[]) => Promise<T>;
|
|
79
98
|
export declare const answerReserveMs: (timeoutMs: number, longestModelMs: number) => number;
|
|
80
99
|
/** First-attempt bound for the finalizing call, or undefined when two attempts
|
|
81
100
|
* of at least 1.5x the slowest call (and 90 s) do not fit in the window. */
|
|
@@ -85,6 +104,19 @@ export declare const finalAttemptMs: (windowMs: number, longestModelMs: number)
|
|
|
85
104
|
* expectations, so a tool-less equation review must not overwrite it: in
|
|
86
105
|
* cycle 4 one replaced a verified round-robin simulation with a wrong hand trace. */
|
|
87
106
|
export declare const draftBackedByVerifiedRun: (draft: string, verifiedOutputs: unknown[]) => boolean;
|
|
107
|
+
/** Whether an equation review overturned a draft that was worked out with
|
|
108
|
+
* calculation tools. The review itself has no tools: it re-derives the answer
|
|
109
|
+
* in its head. Across cycles 4-6 it fixed 6 short answers, each time by
|
|
110
|
+
* changing one value; every time it rewrote most of an answer it replaced
|
|
111
|
+
* correct values with wrong ones (cycle 6 case 08: five values from receipts
|
|
112
|
+
* became two wrong numbers and three nulls; the .42 regression pack, case 19:
|
|
113
|
+
* a linear programme solved with a constraint solver, all five values right,
|
|
114
|
+
* all five replaced). The first version of this guard applied only when every
|
|
115
|
+
* drafted number appeared literally in a tool result, which a solver's
|
|
116
|
+
* fractions ("65/4") and dual values do not. A review that adds nulls, or
|
|
117
|
+
* changes two or more values and more than half of them, is rejected whenever
|
|
118
|
+
* the turn used calculation tools at all. */
|
|
119
|
+
export declare const overturnsCalculatedDraft: (draft: string, revised: string, results: string[]) => boolean;
|
|
88
120
|
/** Why a rewritten answer must not replace its draft, if it must not. Every
|
|
89
121
|
* audit is an edit of a usable draft, so a bad edit keeps the draft. */
|
|
90
122
|
export declare const rewriteDefect: (draft: string, response: {
|
|
@@ -116,7 +148,11 @@ export declare class SessionController {
|
|
|
116
148
|
readonly store: SessionStore;
|
|
117
149
|
readonly gate: PermissionGate;
|
|
118
150
|
readonly registry: ToolRegistry;
|
|
119
|
-
|
|
151
|
+
/** Sandbox availability. Probed again at the start of a run or turn while it
|
|
152
|
+
* is unavailable: a sandbox that was missing or overloaded when the session
|
|
153
|
+
* opened must not disable the shell for the rest of it. */
|
|
154
|
+
isolation: import("../tools/shell/IsolatedExecutor.js").ExecutorStatus;
|
|
155
|
+
private refreshIsolation;
|
|
120
156
|
readonly workspaceRoot: string;
|
|
121
157
|
sessionId?: string;
|
|
122
158
|
state?: WorkState;
|
|
@@ -176,11 +212,23 @@ export declare class SessionController {
|
|
|
176
212
|
skills: SkillCatalog;
|
|
177
213
|
private inspectionDocdexStart?;
|
|
178
214
|
private inspectionAnswerReserve;
|
|
215
|
+
/** The turn's own time limit, not a user's cancellation, aborted it: deliver what it gathered. */
|
|
216
|
+
private timeLimitFallback;
|
|
217
|
+
/** An answer turn that did not finish (a crash, a host restart, an outage it
|
|
218
|
+
* could not outlast), found on resume: its request and what it had gathered. */
|
|
219
|
+
private unfinished;
|
|
220
|
+
/** What the running answer turn has gathered so far, if it is a research turn. */
|
|
221
|
+
private turnProgress;
|
|
222
|
+
/** Gathered research handed to the next answer turn when it continues an unfinished one. */
|
|
223
|
+
private continuation;
|
|
224
|
+
/** What an answer turn can still deliver if its time limit aborts it mid-step. */
|
|
225
|
+
private turnFallback;
|
|
179
226
|
private finalAttempts;
|
|
180
227
|
private docdex?;
|
|
181
228
|
private docdexNames;
|
|
182
229
|
private docdexReady;
|
|
183
230
|
private memoryContext;
|
|
231
|
+
private workingStyleLoad?;
|
|
184
232
|
private preparingEdit;
|
|
185
233
|
private lastRequestEstimate;
|
|
186
234
|
private feedbackRound;
|
|
@@ -254,6 +302,8 @@ export declare class SessionController {
|
|
|
254
302
|
private shellWritePaths;
|
|
255
303
|
private validationReserve;
|
|
256
304
|
private validationContext;
|
|
305
|
+
/** Time one model request may stay unanswered; a method so a host or a test can scale it. */
|
|
306
|
+
protected stallAllowanceMs(inputTokens: number, maxOutputTokens: number, longestModelMs: number, stalledAttempts: number): number;
|
|
257
307
|
private provider;
|
|
258
308
|
private beforeTool;
|
|
259
309
|
private afterTool;
|
|
@@ -268,8 +318,24 @@ export declare class SessionController {
|
|
|
268
318
|
private verify;
|
|
269
319
|
private auditModelRequest;
|
|
270
320
|
private applyVerificationGuide;
|
|
321
|
+
/** Loaded once per session and mode; an unavailable Docdex or tool adds nothing. */
|
|
322
|
+
private workingStyle;
|
|
271
323
|
private loadInstructions;
|
|
272
324
|
/** Route natural-language turns before creating work, indexing, or loading tool schemas. */
|
|
325
|
+
/** Whether the resumed session ends with an answer turn that never delivered. */
|
|
326
|
+
get unfinishedInteraction(): {
|
|
327
|
+
prompt: string;
|
|
328
|
+
evidence: number;
|
|
329
|
+
draft: boolean;
|
|
330
|
+
} | undefined;
|
|
331
|
+
/** Continue the unfinished answer turn of a resumed session from what it had
|
|
332
|
+
* gathered (evidence and, when one was saved, its draft) instead of starting
|
|
333
|
+
* the research again. */
|
|
334
|
+
continueInteraction(): Promise<{
|
|
335
|
+
content: string;
|
|
336
|
+
completed: boolean;
|
|
337
|
+
mode: InteractionDecision["mode"];
|
|
338
|
+
}>;
|
|
273
339
|
interact(prompt: string): Promise<{
|
|
274
340
|
content: string;
|
|
275
341
|
completed: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionController.d.ts","sourceRoot":"","sources":["../../src/runtime/SessionController.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAqC,MAAM,+BAA+B,CAAC;AAClH,OAAO,EAAwD,KAAK,WAAW,EAAqB,KAAK,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/K,OAAO,EAAE,cAAc,EAA8D,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAM7K,OAAO,EAA4e,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionController.d.ts","sourceRoot":"","sources":["../../src/runtime/SessionController.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,yBAAyB,CAAC;A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