agent-relay 8.7.2 → 8.8.0
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/auto/classifier.d.ts +29 -0
- package/dist/auto/classifier.d.ts.map +1 -0
- package/dist/auto/classifier.js +126 -0
- package/dist/auto/classifier.js.map +1 -0
- package/dist/auto/composer.d.ts +105 -0
- package/dist/auto/composer.d.ts.map +1 -0
- package/dist/auto/composer.js +439 -0
- package/dist/auto/composer.js.map +1 -0
- package/dist/auto/director-prompt.d.ts +25 -0
- package/dist/auto/director-prompt.d.ts.map +1 -0
- package/dist/auto/director-prompt.js +53 -0
- package/dist/auto/director-prompt.js.map +1 -0
- package/dist/auto/index.d.ts +15 -0
- package/dist/auto/index.d.ts.map +1 -0
- package/dist/auto/index.js +13 -0
- package/dist/auto/index.js.map +1 -0
- package/dist/cli/agent-relay-mcp.d.ts +1 -1
- package/dist/cli/agent-relay-mcp.d.ts.map +1 -1
- package/dist/cli/agent-relay-mcp.js +428 -518
- package/dist/cli/agent-relay-mcp.js.map +1 -1
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +2 -0
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/commands/core.d.ts +1 -0
- package/dist/cli/commands/core.d.ts.map +1 -1
- package/dist/cli/commands/core.js +1 -1
- package/dist/cli/commands/core.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts +16 -0
- package/dist/cli/commands/fleet.d.ts.map +1 -0
- package/dist/cli/commands/fleet.js +188 -0
- package/dist/cli/commands/fleet.js.map +1 -0
- package/dist/cli/commands/local-agent.d.ts.map +1 -1
- package/dist/cli/commands/local-agent.js +43 -11
- package/dist/cli/commands/local-agent.js.map +1 -1
- package/dist/cli/lib/broker-lifecycle.d.ts +5 -1
- package/dist/cli/lib/broker-lifecycle.d.ts.map +1 -1
- package/dist/cli/lib/broker-lifecycle.js +32 -2
- package/dist/cli/lib/broker-lifecycle.js.map +1 -1
- package/dist/cli/lib/fleet-sidecar.d.ts +53 -0
- package/dist/cli/lib/fleet-sidecar.d.ts.map +1 -0
- package/dist/cli/lib/fleet-sidecar.js +400 -0
- package/dist/cli/lib/fleet-sidecar.js.map +1 -0
- package/dist/index.cjs +2545 -16773
- package/package.json +10 -8
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task classifier for auto-routing.
|
|
3
|
+
*
|
|
4
|
+
* Assesses a task description and returns a structured assessment that drives
|
|
5
|
+
* model-tier selection and team composition. Phase 1 uses a heuristic approach
|
|
6
|
+
* (no extra LLM call). Replace with an LLM call if heuristic accuracy is
|
|
7
|
+
* insufficient for production workloads.
|
|
8
|
+
*/
|
|
9
|
+
export interface TaskAssessment {
|
|
10
|
+
complexity: 'low' | 'medium' | 'high';
|
|
11
|
+
parallelizable: boolean;
|
|
12
|
+
/** Inferred natural sub-units (max 6). */
|
|
13
|
+
subtasks: string[];
|
|
14
|
+
/** Domain labels inferred from the task description. */
|
|
15
|
+
domains: string[];
|
|
16
|
+
/** How many parallel workers would help (1 = serial). Capped at 6. */
|
|
17
|
+
estimatedWorkers: number;
|
|
18
|
+
/** Short explanation for transparency / debugging. */
|
|
19
|
+
reasoning: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Classify a task using heuristics — no LLM call, <1ms, zero API cost.
|
|
23
|
+
*
|
|
24
|
+
* Accuracy is sufficient for routing (low/medium/high is a 3-bucket decision).
|
|
25
|
+
* Replace the body with an LLM call for finer-grained subtask extraction if
|
|
26
|
+
* accuracy data shows heuristics under-perform.
|
|
27
|
+
*/
|
|
28
|
+
export declare function classifyTask(task: string): TaskAssessment;
|
|
29
|
+
//# sourceMappingURL=classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../src/auto/classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,cAAc,EAAE,OAAO,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,wDAAwD;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB;AA4FD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAmCzD"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task classifier for auto-routing.
|
|
3
|
+
*
|
|
4
|
+
* Assesses a task description and returns a structured assessment that drives
|
|
5
|
+
* model-tier selection and team composition. Phase 1 uses a heuristic approach
|
|
6
|
+
* (no extra LLM call). Replace with an LLM call if heuristic accuracy is
|
|
7
|
+
* insufficient for production workloads.
|
|
8
|
+
*/
|
|
9
|
+
// ── Complexity keywords ───────────────────────────────────────────────────────
|
|
10
|
+
const HIGH_COMPLEXITY_KEYWORDS = [
|
|
11
|
+
'audit',
|
|
12
|
+
'refactor',
|
|
13
|
+
'migrate',
|
|
14
|
+
'redesign',
|
|
15
|
+
'overhaul',
|
|
16
|
+
'architecture',
|
|
17
|
+
'security review',
|
|
18
|
+
'performance analysis',
|
|
19
|
+
'comprehensive',
|
|
20
|
+
'full ',
|
|
21
|
+
'entire ',
|
|
22
|
+
'across all',
|
|
23
|
+
'end-to-end',
|
|
24
|
+
'investigation',
|
|
25
|
+
'root cause',
|
|
26
|
+
'diagnose',
|
|
27
|
+
'large-scale',
|
|
28
|
+
'multi-phase',
|
|
29
|
+
'research',
|
|
30
|
+
];
|
|
31
|
+
const MEDIUM_COMPLEXITY_KEYWORDS = [
|
|
32
|
+
'implement',
|
|
33
|
+
'build',
|
|
34
|
+
'add',
|
|
35
|
+
'create',
|
|
36
|
+
'update',
|
|
37
|
+
'fix',
|
|
38
|
+
'debug',
|
|
39
|
+
'integrate',
|
|
40
|
+
'configure',
|
|
41
|
+
'deploy',
|
|
42
|
+
'analyse',
|
|
43
|
+
'analyze',
|
|
44
|
+
'review',
|
|
45
|
+
'test',
|
|
46
|
+
'document',
|
|
47
|
+
'optimize',
|
|
48
|
+
'optimise',
|
|
49
|
+
];
|
|
50
|
+
// ── Parallelism signals ───────────────────────────────────────────────────────
|
|
51
|
+
const PARALLEL_PHRASES = [
|
|
52
|
+
' and ',
|
|
53
|
+
' also ',
|
|
54
|
+
'at the same time',
|
|
55
|
+
'in parallel',
|
|
56
|
+
'simultaneously',
|
|
57
|
+
'concurrently',
|
|
58
|
+
'both ',
|
|
59
|
+
'each ',
|
|
60
|
+
'all ',
|
|
61
|
+
'multiple ',
|
|
62
|
+
];
|
|
63
|
+
// ── Domain detection ─────────────────────────────────────────────────────────
|
|
64
|
+
const DOMAIN_KEYWORDS = {
|
|
65
|
+
backend: ['api', 'server', 'service', 'database', 'db', 'query', 'endpoint', 'rest', 'graphql'],
|
|
66
|
+
frontend: ['ui', 'ux', 'component', 'page', 'react', 'vue', 'css', 'style', 'layout', 'interface'],
|
|
67
|
+
testing: ['test', 'spec', 'coverage', 'unit', 'integration', 'e2e', 'qa'],
|
|
68
|
+
security: ['auth', 'authentication', 'security', 'vulnerability', 'permission', 'access', 'credential'],
|
|
69
|
+
devops: ['deploy', 'ci', 'cd', 'pipeline', 'docker', 'kubernetes', 'infra', 'cloud', 'monitor'],
|
|
70
|
+
data: ['data', 'etl', 'pipeline', 'schema', 'migration', 'report', 'analytics'],
|
|
71
|
+
docs: ['document', 'readme', 'wiki', 'guide', 'changelog'],
|
|
72
|
+
mobile: ['mobile', 'ios', 'android', 'react native', 'flutter'],
|
|
73
|
+
};
|
|
74
|
+
// ── Classifier ────────────────────────────────────────────────────────────────
|
|
75
|
+
function detectDomains(task) {
|
|
76
|
+
const lower = task.toLowerCase();
|
|
77
|
+
return Object.entries(DOMAIN_KEYWORDS)
|
|
78
|
+
.filter(([, kw]) => kw.some((k) => lower.includes(k)))
|
|
79
|
+
.map(([domain]) => domain);
|
|
80
|
+
}
|
|
81
|
+
function countParallelSignals(task) {
|
|
82
|
+
const lower = task.toLowerCase();
|
|
83
|
+
return PARALLEL_PHRASES.filter((p) => lower.includes(p)).length;
|
|
84
|
+
}
|
|
85
|
+
function wordCount(task) {
|
|
86
|
+
return task.trim().split(/\s+/).length;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Classify a task using heuristics — no LLM call, <1ms, zero API cost.
|
|
90
|
+
*
|
|
91
|
+
* Accuracy is sufficient for routing (low/medium/high is a 3-bucket decision).
|
|
92
|
+
* Replace the body with an LLM call for finer-grained subtask extraction if
|
|
93
|
+
* accuracy data shows heuristics under-perform.
|
|
94
|
+
*/
|
|
95
|
+
export function classifyTask(task) {
|
|
96
|
+
const lower = task.toLowerCase();
|
|
97
|
+
const words = wordCount(task);
|
|
98
|
+
const domains = detectDomains(task);
|
|
99
|
+
const parallelSignals = countParallelSignals(task);
|
|
100
|
+
const parallelizable = parallelSignals >= 2 || domains.length >= 3;
|
|
101
|
+
// ── Complexity ──────────────────────────────────────────────────────────────
|
|
102
|
+
let complexity;
|
|
103
|
+
const highHit = HIGH_COMPLEXITY_KEYWORDS.some((kw) => lower.includes(kw));
|
|
104
|
+
const medHit = MEDIUM_COMPLEXITY_KEYWORDS.some((kw) => lower.includes(kw));
|
|
105
|
+
if (highHit || words > 100 || domains.length >= 4) {
|
|
106
|
+
complexity = 'high';
|
|
107
|
+
}
|
|
108
|
+
else if (medHit || words > 40 || domains.length >= 2) {
|
|
109
|
+
complexity = 'medium';
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
complexity = 'low';
|
|
113
|
+
}
|
|
114
|
+
// ── Subtask estimation ──────────────────────────────────────────────────────
|
|
115
|
+
// Heuristic: one subtask per domain detected, min 1, max 6.
|
|
116
|
+
const estimatedWorkers = Math.min(Math.max(domains.length, 1), 6);
|
|
117
|
+
// ── Subtask labels ──────────────────────────────────────────────────────────
|
|
118
|
+
const subtasks = domains.length > 0 ? domains.map((d) => `${d} work`) : ['primary task'];
|
|
119
|
+
// ── Reasoning ──────────────────────────────────────────────────────────────
|
|
120
|
+
const reasoning = `${words}-word task; complexity=${complexity} (` +
|
|
121
|
+
`highKw=${highHit}, medKw=${medHit}, words=${words}, domains=${domains.length}); ` +
|
|
122
|
+
`parallelizable=${parallelizable} (signals=${parallelSignals}, domains=${domains.length}); ` +
|
|
123
|
+
`domains=[${domains.join(', ')}]`;
|
|
124
|
+
return { complexity, parallelizable, subtasks, domains, estimatedWorkers, reasoning };
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=classifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifier.js","sourceRoot":"","sources":["../../src/auto/classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH,iFAAiF;AAEjF,MAAM,wBAAwB,GAAG;IAC/B,OAAO;IACP,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,cAAc;IACd,iBAAiB;IACjB,sBAAsB;IACtB,eAAe;IACf,OAAO;IACP,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,UAAU;IACV,aAAa;IACb,aAAa;IACb,UAAU;CACX,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,WAAW;IACX,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,OAAO;IACP,WAAW;IACX,WAAW;IACX,QAAQ;IACR,SAAS;IACT,SAAS;IACT,QAAQ;IACR,MAAM;IACN,UAAU;IACV,UAAU;IACV,UAAU;CACX,CAAC;AAEF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG;IACvB,OAAO;IACP,QAAQ;IACR,kBAAkB;IAClB,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,OAAO;IACP,OAA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K,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QAClD,UAAU,GAAG,MAAM,CAAC;IACtB,CAAC;SAAM,IAAI,MAAM,IAAI,KAAK,GAAG,EAAE,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACvD,UAAU,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,+EAA+E;IAC/E,4DAA4D;IAC5D,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAElE,+EAA+E;IAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAEzF,8EAA8E;IAC9E,MAAM,SAAS,GACb,GAAG,KAAK,0BAA0B,UAAU,IAAI;QAChD,UAAU,OAAO,WAAW,MAAM,WAAW,KAAK,aAAa,OAAO,CAAC,MAAM,KAAK;QAClF,kBAAkB,cAAc,aAAa,eAAe,aAAa,OAAO,CAAC,MAAM,KAAK;QAC5F,YAAY,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAEpC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team composer for auto-routing.
|
|
3
|
+
*
|
|
4
|
+
* Maps a TaskAssessment to a concrete TeamSpec using a routing table derived
|
|
5
|
+
* from lifecycle eval data (s01–s04). The routing table is a pure data
|
|
6
|
+
* structure — update it as eval pass rates change.
|
|
7
|
+
*
|
|
8
|
+
* Key invariants (empirically verified by eval suite):
|
|
9
|
+
* - Haiku is worker-only. It is never selected as lead.
|
|
10
|
+
* - Sonnet + one-liner onboarding = 100% lifecycle reliability → default lead.
|
|
11
|
+
* - Opus lead only for high complexity (capable but verbose/expensive).
|
|
12
|
+
* - Worker model matches subtask complexity, not overall task complexity.
|
|
13
|
+
* - For codex workers, prefer gpt-5.5 or gpt-5.4-mini. See CODEX_MODEL_TIERS.
|
|
14
|
+
*/
|
|
15
|
+
import type { TaskAssessment } from './classifier.js';
|
|
16
|
+
export type ModelTier = 'haiku' | 'sonnet' | 'opus';
|
|
17
|
+
export type OnboardingVariant = 'bare' | 'one-liner' | 'brief' | 'skill';
|
|
18
|
+
/**
|
|
19
|
+
* Which CLI harness to use for an agent.
|
|
20
|
+
* Extend as opencode model evals complete and confirm role fitness.
|
|
21
|
+
*/
|
|
22
|
+
export type WorkerCli = 'claude' | 'codex' | 'opencode' | 'gemini' | 'droid';
|
|
23
|
+
/**
|
|
24
|
+
* Roles from the choosing-swarm-patterns skill.
|
|
25
|
+
* Each role slot in a pattern is filled by a harness+model with confirmed fitness.
|
|
26
|
+
*/
|
|
27
|
+
export type AgentRole = 'lead' | 'coordinator' | 'worker' | 'planner' | 'reviewer' | 'critic' | 'verifier' | 'judge' | 'mapper' | 'reducer' | 'supervisor' | 'debater';
|
|
28
|
+
/**
|
|
29
|
+
* Role fitness for a harness+model combination.
|
|
30
|
+
* Derived from lifecycle eval pass rates (s01–s06).
|
|
31
|
+
*
|
|
32
|
+
* Fitness levels:
|
|
33
|
+
* 'confirmed' — s03+s04 ≥5 full-repeat runs pass reliably
|
|
34
|
+
* 'provisional' — passes but with caveats (phantom rate, onboarding dependency)
|
|
35
|
+
* 'not-viable' — fails lifecycle or not relay-native
|
|
36
|
+
* 'untested' — eval not yet run
|
|
37
|
+
*/
|
|
38
|
+
export type RoleFitness = 'confirmed' | 'provisional' | 'not-viable' | 'untested';
|
|
39
|
+
export interface RoleFitEntry {
|
|
40
|
+
fitness: RoleFitness;
|
|
41
|
+
notes?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface HarnessRoleMap {
|
|
44
|
+
harness: string;
|
|
45
|
+
defaultModel?: string;
|
|
46
|
+
roles: Partial<Record<AgentRole, RoleFitEntry>>;
|
|
47
|
+
bestOnboarding: OnboardingVariant;
|
|
48
|
+
relayNative: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface WorkerSpec {
|
|
51
|
+
role: AgentRole | string;
|
|
52
|
+
model: ModelTier;
|
|
53
|
+
task: string;
|
|
54
|
+
/** Override CLI harness. Defaults to 'claude'. */
|
|
55
|
+
cli?: WorkerCli;
|
|
56
|
+
/** For codex workers: the OpenAI model name to pass via --model. */
|
|
57
|
+
codexModel?: string;
|
|
58
|
+
/** For opencode workers: the opencode model suffix. */
|
|
59
|
+
opencodeModel?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface TeamSpec {
|
|
62
|
+
lead: {
|
|
63
|
+
model: ModelTier;
|
|
64
|
+
onboarding: OnboardingVariant;
|
|
65
|
+
};
|
|
66
|
+
workers: WorkerSpec[];
|
|
67
|
+
}
|
|
68
|
+
export declare const CODEX_MODEL_TIERS: {
|
|
69
|
+
/**
|
|
70
|
+
* gpt-5.5 — best. 16/16 scenarios PASS, 100% s03 one-liner+, 100% s04 all.
|
|
71
|
+
* Recommended default for codex workers.
|
|
72
|
+
*/
|
|
73
|
+
readonly recommended: "gpt-5.5";
|
|
74
|
+
/**
|
|
75
|
+
* gpt-5.4-mini — viable budget tier. 15/16 scenarios PASS (only s03:skill fails).
|
|
76
|
+
* 100% s03 bare/one-liner, 80% brief/skill. 80–100% s04. Use bare or one-liner
|
|
77
|
+
* onboarding for best results. phantom=31% (slightly noisy).
|
|
78
|
+
*/
|
|
79
|
+
readonly budget: "gpt-5.4-mini";
|
|
80
|
+
/**
|
|
81
|
+
* gpt-5.4 — avoid. 16/16 scenarios PASS on majority-vote but phantom=52% (14
|
|
82
|
+
* phantom agents) and per-run reliability is 60% across s03/s04 variants.
|
|
83
|
+
* The config migration alias `gpt-5.4 → gpt-5.5` does NOT apply at runtime —
|
|
84
|
+
* these are distinct models with significantly different behaviour.
|
|
85
|
+
*/
|
|
86
|
+
readonly avoid: "gpt-5.4";
|
|
87
|
+
/**
|
|
88
|
+
* gpt-5.3-codex-spark — not viable. 6/16 scenarios PASS. Fails s03 one-liner/
|
|
89
|
+
* brief/skill, s04 one-liner/brief. Ultra-fast but sacrifices relay reliability.
|
|
90
|
+
*/
|
|
91
|
+
readonly notViable: "gpt-5.3-codex-spark";
|
|
92
|
+
};
|
|
93
|
+
export declare const HARNESS_ONBOARDING: Record<string, OnboardingVariant>;
|
|
94
|
+
export declare const HARNESS_ROLE_MAP: HarnessRoleMap[];
|
|
95
|
+
/**
|
|
96
|
+
* Look up which harnesses can fill a given role at 'confirmed' or better fitness.
|
|
97
|
+
* Use to populate role slots when composing teams for specific swarm patterns.
|
|
98
|
+
*/
|
|
99
|
+
export declare function harnessesForRole(role: AgentRole): HarnessRoleMap[];
|
|
100
|
+
/**
|
|
101
|
+
* Map a TaskAssessment to a TeamSpec using the routing table.
|
|
102
|
+
* Pure function — no I/O, no LLM call.
|
|
103
|
+
*/
|
|
104
|
+
export declare function composeTeam(assessment: TaskAssessment, originalTask: string): TeamSpec;
|
|
105
|
+
//# sourceMappingURL=composer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer.d.ts","sourceRoot":"","sources":["../../src/auto/composer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAEzE;;;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