@jmanuelcorral/openteam 0.1.34 → 0.1.35
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/dist/cli.js +1 -0
- package/dist/index.js +1 -0
- package/dist/orchestrator/coordinator.d.ts +3 -0
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/ledger.d.ts +47 -0
- package/dist/orchestrator/ledger.d.ts.map +1 -0
- package/dist/orchestrator/permissions.d.ts.map +1 -1
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/orchestrator/sdd.d.ts +90 -0
- package/dist/orchestrator/sdd.d.ts.map +1 -0
- package/dist/telemetry/events.d.ts +2 -0
- package/dist/telemetry/events.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -751,6 +751,7 @@ var RouteEventSchema = EventBaseSchema.extend({
|
|
|
751
751
|
agent: z4.string().min(1).optional(),
|
|
752
752
|
success: z4.boolean().optional(),
|
|
753
753
|
batchID: z4.string().min(1).optional(),
|
|
754
|
+
taskID: z4.string().min(1).optional(),
|
|
754
755
|
failureReason: z4.string().min(1).optional(),
|
|
755
756
|
failureStage: z4.string().min(1).optional()
|
|
756
757
|
});
|
package/dist/index.js
CHANGED
|
@@ -949,6 +949,7 @@ var RouteEventSchema = EventBaseSchema.extend({
|
|
|
949
949
|
agent: z3.string().min(1).optional(),
|
|
950
950
|
success: z3.boolean().optional(),
|
|
951
951
|
batchID: z3.string().min(1).optional(),
|
|
952
|
+
taskID: z3.string().min(1).optional(),
|
|
952
953
|
failureReason: z3.string().min(1).optional(),
|
|
953
954
|
failureStage: z3.string().min(1).optional()
|
|
954
955
|
});
|
|
@@ -18,6 +18,8 @@ export type RoleTaskInput = {
|
|
|
18
18
|
title?: string;
|
|
19
19
|
systemPrompt?: string;
|
|
20
20
|
directory?: string;
|
|
21
|
+
/** Correlación opcional con una tarea del loop SDD/backlog (Fase D). */
|
|
22
|
+
taskID?: string;
|
|
21
23
|
};
|
|
22
24
|
export type CoordinatorDeps = {
|
|
23
25
|
client: OpencodeSessionClient;
|
|
@@ -31,6 +33,7 @@ export type CorrelatedCostRecord = CostRecord & {
|
|
|
31
33
|
agent: string;
|
|
32
34
|
success: boolean;
|
|
33
35
|
batchID?: string;
|
|
36
|
+
taskID?: string;
|
|
34
37
|
failureReason?: string;
|
|
35
38
|
failureStage?: SubsessionResult["failureStage"];
|
|
36
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,OAAO,EACL,KAAK,qBAAqB,EAG1B,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,cAAc,CAAC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|
|
3
|
+
* Ledger de progreso durable del orquestador.
|
|
4
|
+
*
|
|
5
|
+
* Registra, una línea por tarea, el estado de las tareas ya procesadas para que
|
|
6
|
+
* un flujo largo (loop SDD, `openteam loop`) pueda **reanudarse** tras una
|
|
7
|
+
* compactación de contexto o un reinicio sin repetir trabajo hecho. Vive detrás
|
|
8
|
+
* del `StorageProvider` (misma fuente de verdad que roster/decisions/telemetría)
|
|
9
|
+
* y es **privacy-safe**: solo `taskID`, estado y un `detail` ya redactado; nunca
|
|
10
|
+
* prompts ni datos sensibles.
|
|
11
|
+
*
|
|
12
|
+
* Formato de línea (Markdown, inspirado en obra/superpowers):
|
|
13
|
+
* `- <taskID>: complete (<detail>)`
|
|
14
|
+
* `- <taskID>: failed (<detail>)`
|
|
15
|
+
*
|
|
16
|
+
* Las funciones de parse/format son puras; el I/O se hace vía un
|
|
17
|
+
* `StorageProvider` inyectado.
|
|
18
|
+
*/
|
|
19
|
+
/** Ruta por defecto del ledger (estado derivado del equipo). */
|
|
20
|
+
export declare const DEFAULT_LEDGER_PATH = ".opencode/openteam/progress.md";
|
|
21
|
+
export type LedgerStatus = "complete" | "failed";
|
|
22
|
+
export type LedgerEntry = {
|
|
23
|
+
taskID: string;
|
|
24
|
+
status: LedgerStatus;
|
|
25
|
+
/** Metadatos redactados (modelo, tier, resultado de review). Nunca prompts. */
|
|
26
|
+
detail?: string;
|
|
27
|
+
};
|
|
28
|
+
/** Serializa una entrada a su línea Markdown canónica. Puro. */
|
|
29
|
+
export declare function formatLedgerEntry(entry: LedgerEntry): string;
|
|
30
|
+
/** Parsea una línea; `undefined` si no es una entrada de ledger válida. Puro. */
|
|
31
|
+
export declare function parseLedgerLine(line: string): LedgerEntry | undefined;
|
|
32
|
+
/** Parsea todo el ledger, saltando cabeceras/blancos/líneas inválidas. Puro. */
|
|
33
|
+
export declare function parseLedger(text: string): LedgerEntry[];
|
|
34
|
+
/**
|
|
35
|
+
* Estado más reciente por `taskID` (las líneas posteriores sobrescriben a las
|
|
36
|
+
* anteriores: un `failed` seguido de `complete` cuenta como `complete`). Puro.
|
|
37
|
+
*/
|
|
38
|
+
export declare function latestStatuses(entries: readonly LedgerEntry[]): Map<string, LedgerStatus>;
|
|
39
|
+
/** `true` si el último estado registrado para la tarea es `complete`. Puro. */
|
|
40
|
+
export declare function isTaskComplete(entries: readonly LedgerEntry[], taskID: string): boolean;
|
|
41
|
+
/** Conjunto de `taskID` cuyo estado más reciente es `complete`. Puro. */
|
|
42
|
+
export declare function completedTaskIDs(entries: readonly LedgerEntry[]): Set<string>;
|
|
43
|
+
/** Lee y parsea el ledger; `[]` si el fichero no existe. */
|
|
44
|
+
export declare function readLedger(storage: StorageProvider, path?: string): Promise<LedgerEntry[]>;
|
|
45
|
+
/** Añade una entrada al ledger (crea el fichero si no existe). */
|
|
46
|
+
export declare function appendLedgerEntry(storage: StorageProvider, entry: LedgerEntry, path?: string): Promise<void>;
|
|
47
|
+
//# sourceMappingURL=ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../src/orchestrator/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AAEH,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,mCAAmC,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IACrB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAM5D;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBrE;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CASvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,WAAW,EAAE,GAC9B,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAM3B;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,MAAM,EAAE,MAAM,GACb,OAAO,CAET;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQ7E;AAED,4DAA4D;AAC5D,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,IAAI,GAAE,MAA4B,GACjC,OAAO,CAAC,WAAW,EAAE,CAAC,CAGxB;AAED,kEAAkE;AAClE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,WAAW,EAClB,IAAI,GAAE,MAA4B,GACjC,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/orchestrator/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,MAAM,GACN,eAAe,GACf,aAAa,GACb,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/orchestrator/permissions.ts"],"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AAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE3E;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,WAAW,EACjB,IAAI,CAAC,EAAE,cAAc,GACpB,qBAAqB,CAevB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { OpenTeamConfig } from "../config/schema";
|
|
2
|
+
import type { TaskSignals } from "../router/types";
|
|
3
|
+
import type { StorageProvider } from "../storage/provider";
|
|
4
|
+
import { type CoordinatorDeps, type RoleTaskResult } from "./coordinator";
|
|
5
|
+
/**
|
|
6
|
+
* Loop de **subagent-driven-development** (SDD), adaptado de obra/superpowers al
|
|
7
|
+
* boundary de openteam. Por cada tarea:
|
|
8
|
+
*
|
|
9
|
+
* 1. Reanuda desde el ledger: si la tarea ya está `complete`, la salta.
|
|
10
|
+
* 2. Persiste un **task brief** como fichero (higiene de contexto: el
|
|
11
|
+
* implementer recibe solo su tarea, no el historial acumulado).
|
|
12
|
+
* 3. Despacha el **implementer** con el brief.
|
|
13
|
+
* 4. Despacha el **reviewer** (rol con alto code-quality) para revisar el
|
|
14
|
+
* cambio; la generación del diff vive en el propio agente reviewer.
|
|
15
|
+
* 5. Si el veredicto pide arreglos, despacha **UN** fix subagent con TODOS los
|
|
16
|
+
* findings (no uno por finding), con un número de rondas acotado.
|
|
17
|
+
* 6. Escribe el resultado en el ledger durable.
|
|
18
|
+
*
|
|
19
|
+
* Es una capa de orquestación **inyectable y determinista**: cliente opencode,
|
|
20
|
+
* storage, reloj, generadores de id y el intérprete de review se inyectan, así
|
|
21
|
+
* que se prueba con fakes/memory provider. No hace I/O de git ni shell: los
|
|
22
|
+
* artefactos persistidos son metadatos **redactados** (nunca prompts ni la
|
|
23
|
+
* respuesta cruda del modelo).
|
|
24
|
+
*/
|
|
25
|
+
/** Directorio de artefactos del loop SDD (estado derivado). */
|
|
26
|
+
export declare const DEFAULT_SDD_WORKSPACE_DIR = ".opencode/openteam/sdd";
|
|
27
|
+
/** Rol reviewer por defecto. */
|
|
28
|
+
export declare const DEFAULT_REVIEWER_ROLE_ID = "reviewer";
|
|
29
|
+
export type SddTask = {
|
|
30
|
+
/** Id estable y sin `:` (kebab-case) usado para ledger y artefactos. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Rol que implementa (y arregla) la tarea. */
|
|
33
|
+
implementerRoleID: string;
|
|
34
|
+
/** Título humano corto. */
|
|
35
|
+
title: string;
|
|
36
|
+
/** Brief accionable de la tarea (cuerpo del prompt del implementer). */
|
|
37
|
+
brief: string;
|
|
38
|
+
/** Señales de routing para la tarea. */
|
|
39
|
+
task: TaskSignals;
|
|
40
|
+
/** Rol reviewer específico (sobreescribe `deps.reviewerRoleID`). */
|
|
41
|
+
reviewerRoleID?: string;
|
|
42
|
+
};
|
|
43
|
+
export type ReviewVerdict = {
|
|
44
|
+
needsFix: boolean;
|
|
45
|
+
/** Resumen redactado de findings para el fix dispatch. */
|
|
46
|
+
findings?: string;
|
|
47
|
+
};
|
|
48
|
+
export type SddDeps = CoordinatorDeps & {
|
|
49
|
+
storage: StorageProvider;
|
|
50
|
+
config: OpenTeamConfig;
|
|
51
|
+
workspaceDir?: string;
|
|
52
|
+
ledgerPath?: string;
|
|
53
|
+
reviewerRoleID?: string;
|
|
54
|
+
interpretReview?: (review: RoleTaskResult) => ReviewVerdict;
|
|
55
|
+
/** Máximo de rondas de fix+re-review (def: 1). */
|
|
56
|
+
maxFixRounds?: number;
|
|
57
|
+
parentSessionID?: string;
|
|
58
|
+
directory?: string;
|
|
59
|
+
};
|
|
60
|
+
export type SddTaskStatus = "complete" | "failed" | "skipped";
|
|
61
|
+
export type SddTaskOutcome = {
|
|
62
|
+
taskID: string;
|
|
63
|
+
status: SddTaskStatus;
|
|
64
|
+
implement?: RoleTaskResult;
|
|
65
|
+
review?: RoleTaskResult;
|
|
66
|
+
fixes: RoleTaskResult[];
|
|
67
|
+
};
|
|
68
|
+
export type SddPlanResult = {
|
|
69
|
+
outcomes: SddTaskOutcome[];
|
|
70
|
+
completed: string[];
|
|
71
|
+
failed: string[];
|
|
72
|
+
skipped: string[];
|
|
73
|
+
};
|
|
74
|
+
/** Extrae texto de una respuesta opaca del modelo (best-effort). Puro. */
|
|
75
|
+
export declare function extractResponseText(response: unknown): string;
|
|
76
|
+
/**
|
|
77
|
+
* Veredicto por defecto: escanea el texto de la review en busca de marcadores de
|
|
78
|
+
* severidad. Conservador y determinista; los llamadores pueden inyectar su
|
|
79
|
+
* propio intérprete vía `deps.interpretReview`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function defaultReviewVerdict(review: RoleTaskResult): ReviewVerdict;
|
|
82
|
+
/** Ejecuta una única tarea del loop SDD (con reanudación desde el ledger). */
|
|
83
|
+
export declare function runSddTask(task: SddTask, deps: SddDeps): Promise<SddTaskOutcome>;
|
|
84
|
+
/**
|
|
85
|
+
* Ejecuta un plan SDD **en orden** (las tareas son secuenciales por diseño; la
|
|
86
|
+
* paralelización de tareas independientes es otra capa). Reanuda saltando las ya
|
|
87
|
+
* completas y resume el resultado por estado.
|
|
88
|
+
*/
|
|
89
|
+
export declare function runSddPlan(tasks: readonly SddTask[], deps: SddDeps): Promise<SddPlanResult>;
|
|
90
|
+
//# sourceMappingURL=sdd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdd.d.ts","sourceRoot":"","sources":["../../src/orchestrator/sdd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,cAAc,EAEpB,MAAM,eAAe,CAAC;AASvB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+DAA+D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AC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA2FF,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAuB7D;AAKD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,aAAa,CAO1E;AAuBD,8EAA8E;AAC9E,wBAAsB,UAAU,CAC9B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,cAAc,CAAC,CAyHzB;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,aAAa,CAAC,CAoBxB"}
|
|
@@ -42,6 +42,7 @@ export declare const RouteEventSchema: z.ZodObject<{
|
|
|
42
42
|
agent: z.ZodOptional<z.ZodString>;
|
|
43
43
|
success: z.ZodOptional<z.ZodBoolean>;
|
|
44
44
|
batchID: z.ZodOptional<z.ZodString>;
|
|
45
|
+
taskID: z.ZodOptional<z.ZodString>;
|
|
45
46
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
46
47
|
failureStage: z.ZodOptional<z.ZodString>;
|
|
47
48
|
}, z.core.$strip>;
|
|
@@ -162,6 +163,7 @@ export declare const OpenTeamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
162
163
|
agent: z.ZodOptional<z.ZodString>;
|
|
163
164
|
success: z.ZodOptional<z.ZodBoolean>;
|
|
164
165
|
batchID: z.ZodOptional<z.ZodString>;
|
|
166
|
+
taskID: z.ZodOptional<z.ZodString>;
|
|
165
167
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
166
168
|
failureStage: z.ZodOptional<z.ZodString>;
|
|
167
169
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/telemetry/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAG,CAAU,CAAC;AAW/C,yEAAyE;AACzE,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/telemetry/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAG,CAAU,CAAC;AAW/C,yEAAyE;AACzE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB3B,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAc7B,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAS9B,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB;;;;;;;;;iBAM7B,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;iBAK9B,CAAC;AAEH,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAK9B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;iBAMrC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAQ9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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