aipanel-cli 0.1.2 → 0.2.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/README.md +77 -43
- package/dist/src/app/AipanelApp.d.ts +6 -3
- package/dist/src/app/AipanelApp.js +22 -14
- package/dist/src/app/AipanelApp.js.map +1 -1
- package/dist/src/app/CommandRouter.js +27 -6
- package/dist/src/app/CommandRouter.js.map +1 -1
- package/dist/src/app/ProfileLoader.d.ts +3 -2
- package/dist/src/app/ProfileLoader.js +6 -5
- package/dist/src/app/ProfileLoader.js.map +1 -1
- package/dist/src/artifact/ArtifactRepository.d.ts +4 -9
- package/dist/src/artifact/ArtifactRepository.js +24 -60
- package/dist/src/artifact/ArtifactRepository.js.map +1 -1
- package/dist/src/cli/aipanel.js +2 -1
- package/dist/src/cli/aipanel.js.map +1 -1
- package/dist/src/compare/ComparisonEngine.d.ts +10 -1
- package/dist/src/compare/ComparisonEngine.js.map +1 -1
- package/dist/src/compare/ResponseNormalizer.d.ts +3 -2
- package/dist/src/compare/ResponseNormalizer.js +4 -2
- package/dist/src/compare/ResponseNormalizer.js.map +1 -1
- package/dist/src/context/ContextCollector.d.ts +5 -4
- package/dist/src/context/ContextCollector.js +4 -2
- package/dist/src/context/ContextCollector.js.map +1 -1
- package/dist/src/domain/artifact.d.ts +3 -2
- package/dist/src/domain/artifact.js +7 -7
- package/dist/src/domain/base.d.ts +0 -1
- package/dist/src/domain/base.js +1 -7
- package/dist/src/domain/base.js.map +1 -1
- package/dist/src/domain/run.d.ts +11 -23
- package/dist/src/domain/run.js +59 -51
- package/dist/src/domain/run.js.map +1 -1
- package/dist/src/domain/session.d.ts +6 -5
- package/dist/src/domain/session.js +9 -7
- package/dist/src/domain/session.js.map +1 -1
- package/dist/src/domain/value-objects.js +3 -1
- package/dist/src/domain/value-objects.js.map +1 -1
- package/dist/src/output/ResultRenderer.d.ts +3 -2
- package/dist/src/output/ResultRenderer.js +3 -0
- package/dist/src/output/ResultRenderer.js.map +1 -1
- package/dist/src/providers/ClaudeCodeAdapter.d.ts +1 -0
- package/dist/src/providers/ClaudeCodeAdapter.js +3 -0
- package/dist/src/providers/ClaudeCodeAdapter.js.map +1 -1
- package/dist/src/providers/CodexExecAdapter.d.ts +5 -0
- package/dist/src/providers/CodexExecAdapter.js +128 -0
- package/dist/src/providers/CodexExecAdapter.js.map +1 -0
- package/dist/src/providers/ProviderAdapter.d.ts +2 -0
- package/dist/src/providers/ProviderRegistry.d.ts +3 -2
- package/dist/src/providers/ProviderRegistry.js +3 -3
- package/dist/src/providers/ProviderRegistry.js.map +1 -1
- package/dist/src/run/RunCoordinator.d.ts +10 -16
- package/dist/src/run/RunCoordinator.js +5 -20
- package/dist/src/run/RunCoordinator.js.map +1 -1
- package/dist/src/run/RunRepository.d.ts +3 -7
- package/dist/src/run/RunRepository.js +9 -45
- package/dist/src/run/RunRepository.js.map +1 -1
- package/dist/src/session/SessionManager.d.ts +5 -3
- package/dist/src/session/SessionManager.js +5 -6
- package/dist/src/session/SessionManager.js.map +1 -1
- package/dist/src/session/SessionRepository.d.ts +3 -5
- package/dist/src/session/SessionRepository.js +14 -28
- package/dist/src/session/SessionRepository.js.map +1 -1
- package/dist/src/shared/clock.d.ts +0 -1
- package/dist/src/shared/clock.js +0 -3
- package/dist/src/shared/clock.js.map +1 -1
- package/dist/src/shared/file-system.d.ts +0 -6
- package/dist/src/shared/file-system.js +1 -23
- package/dist/src/shared/file-system.js.map +1 -1
- package/dist/src/usecases/ConsultUseCase.d.ts +4 -1
- package/dist/src/usecases/ConsultUseCase.js +10 -6
- package/dist/src/usecases/ConsultUseCase.js.map +1 -1
- package/dist/src/usecases/DebugUseCase.d.ts +4 -1
- package/dist/src/usecases/DebugUseCase.js +25 -6
- package/dist/src/usecases/DebugUseCase.js.map +1 -1
- package/dist/src/usecases/FollowupUseCase.js.map +1 -1
- package/package.json +19 -63
- package/dist/src/app/WorkflowSelector.d.ts +0 -4
- package/dist/src/app/WorkflowSelector.js +0 -6
- package/dist/src/app/WorkflowSelector.js.map +0 -1
- package/dist/src/app/index.d.ts +0 -4
- package/dist/src/app/index.js +0 -5
- package/dist/src/app/index.js.map +0 -1
- package/dist/src/app/types.d.ts +0 -36
- package/dist/src/app/types.js +0 -2
- package/dist/src/app/types.js.map +0 -1
- package/dist/src/artifact/index.d.ts +0 -1
- package/dist/src/artifact/index.js +0 -2
- package/dist/src/artifact/index.js.map +0 -1
- package/dist/src/compare/index.d.ts +0 -3
- package/dist/src/compare/index.js +0 -3
- package/dist/src/compare/index.js.map +0 -1
- package/dist/src/context/index.d.ts +0 -2
- package/dist/src/context/index.js +0 -2
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/domain/index.d.ts +0 -5
- package/dist/src/domain/index.js +0 -6
- package/dist/src/domain/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -16
- package/dist/src/index.js +0 -16
- package/dist/src/index.js.map +0 -1
- package/dist/src/orchestrator/PlanBuilder.d.ts +0 -6
- package/dist/src/orchestrator/PlanBuilder.js +0 -59
- package/dist/src/orchestrator/PlanBuilder.js.map +0 -1
- package/dist/src/orchestrator/ResultMerger.d.ts +0 -10
- package/dist/src/orchestrator/ResultMerger.js +0 -19
- package/dist/src/orchestrator/ResultMerger.js.map +0 -1
- package/dist/src/orchestrator/TaskExecutor.d.ts +0 -20
- package/dist/src/orchestrator/TaskExecutor.js +0 -81
- package/dist/src/orchestrator/TaskExecutor.js.map +0 -1
- package/dist/src/orchestrator/TaskScheduler.d.ts +0 -4
- package/dist/src/orchestrator/TaskScheduler.js +0 -19
- package/dist/src/orchestrator/TaskScheduler.js.map +0 -1
- package/dist/src/orchestrator/ValidationRunner.d.ts +0 -4
- package/dist/src/orchestrator/ValidationRunner.js +0 -22
- package/dist/src/orchestrator/ValidationRunner.js.map +0 -1
- package/dist/src/orchestrator/index.d.ts +0 -5
- package/dist/src/orchestrator/index.js +0 -6
- package/dist/src/orchestrator/index.js.map +0 -1
- package/dist/src/output/index.d.ts +0 -1
- package/dist/src/output/index.js +0 -2
- package/dist/src/output/index.js.map +0 -1
- package/dist/src/providers/index.d.ts +0 -3
- package/dist/src/providers/index.js +0 -4
- package/dist/src/providers/index.js.map +0 -1
- package/dist/src/run/index.d.ts +0 -2
- package/dist/src/run/index.js +0 -3
- package/dist/src/run/index.js.map +0 -1
- package/dist/src/session/index.d.ts +0 -2
- package/dist/src/session/index.js +0 -3
- package/dist/src/session/index.js.map +0 -1
- package/dist/src/shared/contracts.d.ts +0 -254
- package/dist/src/shared/contracts.js +0 -2
- package/dist/src/shared/contracts.js.map +0 -1
- package/dist/src/shared/errors.d.ts +0 -9
- package/dist/src/shared/errors.js +0 -11
- package/dist/src/shared/errors.js.map +0 -1
- package/dist/src/shared/index.d.ts +0 -4
- package/dist/src/shared/index.js +0 -5
- package/dist/src/shared/index.js.map +0 -1
- package/dist/src/usecases/CompareUseCase.d.ts +0 -6
- package/dist/src/usecases/CompareUseCase.js +0 -9
- package/dist/src/usecases/CompareUseCase.js.map +0 -1
- package/dist/src/usecases/helpers.d.ts +0 -9
- package/dist/src/usecases/helpers.js +0 -31
- package/dist/src/usecases/helpers.js.map +0 -1
- package/dist/src/usecases/index.d.ts +0 -5
- package/dist/src/usecases/index.js +0 -6
- package/dist/src/usecases/index.js.map +0 -1
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export class PlanBuilder {
|
|
2
|
-
buildDirectPlan(question, contextBundle, provider) {
|
|
3
|
-
return [
|
|
4
|
-
{
|
|
5
|
-
taskKind: "consultation",
|
|
6
|
-
role: "provider-reviewer",
|
|
7
|
-
provider,
|
|
8
|
-
prompt: this.#buildPrompt("Consultation", question, contextBundle),
|
|
9
|
-
},
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
buildDebugPlan(question, contextBundle, provider) {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
taskKind: "root-cause-analysis",
|
|
16
|
-
role: "planner",
|
|
17
|
-
provider,
|
|
18
|
-
prompt: this.#buildPrompt("Root Cause Analysis", `Find the most likely root causes for the following problem.\n\n${question}`, contextBundle),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
taskKind: "risk-review",
|
|
22
|
-
role: "provider-reviewer",
|
|
23
|
-
provider,
|
|
24
|
-
prompt: this.#buildPrompt("Risk Review", `Review the implementation and identify likely regressions, edge cases, and hidden risks.\n\n${question}`, contextBundle),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
taskKind: "fix-proposal",
|
|
28
|
-
role: "provider-reviewer",
|
|
29
|
-
provider,
|
|
30
|
-
prompt: this.#buildPrompt("Fix Proposal", `Propose a pragmatic fix plan with the smallest safe change set.\n\n${question}`, contextBundle),
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
#buildPrompt(label, question, contextBundle) {
|
|
35
|
-
const sections = [
|
|
36
|
-
`Task: ${label}`,
|
|
37
|
-
`Question:\n${question.trim()}`,
|
|
38
|
-
`Context Summary:\n${contextBundle.summary}`,
|
|
39
|
-
];
|
|
40
|
-
if ((contextBundle.files?.length ?? 0) > 0) {
|
|
41
|
-
sections.push(contextBundle.files
|
|
42
|
-
.map((file) => `File: ${file.path}\n${file.content ?? ""}`.trim())
|
|
43
|
-
.join("\n\n"));
|
|
44
|
-
}
|
|
45
|
-
if ((contextBundle.diffs?.length ?? 0) > 0) {
|
|
46
|
-
sections.push(contextBundle.diffs
|
|
47
|
-
.map((diff) => `Diff: ${diff.path}\n${diff.content ?? ""}`.trim())
|
|
48
|
-
.join("\n\n"));
|
|
49
|
-
}
|
|
50
|
-
if ((contextBundle.logs?.length ?? 0) > 0) {
|
|
51
|
-
sections.push(contextBundle.logs
|
|
52
|
-
.map((log) => `Log: ${log.path}\n${log.content ?? ""}`.trim())
|
|
53
|
-
.join("\n\n"));
|
|
54
|
-
}
|
|
55
|
-
sections.push("Return a concise answer with findings, reasoning, and a short actionable recommendation.");
|
|
56
|
-
return sections.join("\n\n");
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=PlanBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlanBuilder.js","sourceRoot":"","sources":["../../../src/orchestrator/PlanBuilder.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,WAAW;IACtB,eAAe,CAAC,QAAgB,EAAE,aAAgC,EAAE,QAAgB;QAClF,OAAO;YACL;gBACE,QAAQ,EAAE,cAAc;gBACxB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ;gBACR,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,aAAa,CAAC;aACnE;SACF,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,QAAgB,EAAE,aAAgC,EAAE,QAAgB;QACjF,OAAO;YACL;gBACE,QAAQ,EAAE,qBAAqB;gBAC/B,IAAI,EAAE,SAAS;gBACf,QAAQ;gBACR,MAAM,EAAE,IAAI,CAAC,YAAY,CACvB,qBAAqB,EACrB,kEAAkE,QAAQ,EAAE,EAC5E,aAAa,CACd;aACF;YACD;gBACE,QAAQ,EAAE,aAAa;gBACvB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ;gBACR,MAAM,EAAE,IAAI,CAAC,YAAY,CACvB,aAAa,EACb,+FAA+F,QAAQ,EAAE,EACzG,aAAa,CACd;aACF;YACD;gBACE,QAAQ,EAAE,cAAc;gBACxB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ;gBACR,MAAM,EAAE,IAAI,CAAC,YAAY,CACvB,cAAc,EACd,sEAAsE,QAAQ,EAAE,EAChF,aAAa,CACd;aACF;SACF,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,KAAa,EAAE,QAAgB,EAAE,aAAgC;QAC5E,MAAM,QAAQ,GAAG;YACf,SAAS,KAAK,EAAE;YAChB,cAAc,QAAQ,CAAC,IAAI,EAAE,EAAE;YAC/B,qBAAqB,aAAa,CAAC,OAAO,EAAE;SAC7C,C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type { ComparisonEngine } from "../compare/ComparisonEngine.js";
|
|
3
|
-
export declare class ResultMerger {
|
|
4
|
-
#private;
|
|
5
|
-
constructor(comparisonEngine: ComparisonEngine);
|
|
6
|
-
merge(topic: string, run: RunData, normalizedResponses: NormalizedResponseData[]): {
|
|
7
|
-
finalSummary: string;
|
|
8
|
-
comparisonReport: ComparisonReportData;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export class ResultMerger {
|
|
2
|
-
#comparisonEngine;
|
|
3
|
-
constructor(comparisonEngine) {
|
|
4
|
-
this.#comparisonEngine = comparisonEngine;
|
|
5
|
-
}
|
|
6
|
-
merge(topic, run, normalizedResponses) {
|
|
7
|
-
const comparisonReport = this.#comparisonEngine.compare(topic, normalizedResponses);
|
|
8
|
-
comparisonReport.runId = run.runId;
|
|
9
|
-
const parts = normalizedResponses.map((response) => {
|
|
10
|
-
const findings = response.findings.slice(0, 3).join("; ");
|
|
11
|
-
return `[${response.provider}/${response.taskId}] ${response.summary}${findings ? ` Findings: ${findings}` : ""}`;
|
|
12
|
-
});
|
|
13
|
-
return {
|
|
14
|
-
finalSummary: parts.join("\n"),
|
|
15
|
-
comparisonReport,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=ResultMerger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResultMerger.js","sourceRoot":"","sources":["../../../src/orchestrator/ResultMerger.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,YAAY;IACd,iBAAiB,CAAmB;IAE7C,YAAY,gBAAkC;QAC5C,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,KAAa,EAAE,GAAY,EAAE,mBAA6C;QAI9E,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;QACpF,gBAAgB,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEnC,MAAM,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjD,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1D,OAAO,IAAI,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,cAAc,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACpH,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,gBAAgB;SACjB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ArtifactRepositoryPort, NormalizedResponseData, PlanTaskSpec, ProviderRegistryPort, RunCoordinatorPort, RunData, SessionData } from "../shared/contracts.js";
|
|
2
|
-
import type { ResponseNormalizer } from "../compare/ResponseNormalizer.js";
|
|
3
|
-
export interface TaskExecutorDependencies {
|
|
4
|
-
providerRegistry: ProviderRegistryPort;
|
|
5
|
-
artifactRepository: ArtifactRepositoryPort;
|
|
6
|
-
responseNormalizer: ResponseNormalizer;
|
|
7
|
-
runCoordinator: RunCoordinatorPort;
|
|
8
|
-
}
|
|
9
|
-
export declare class TaskExecutor {
|
|
10
|
-
#private;
|
|
11
|
-
constructor(dependencies: TaskExecutorDependencies);
|
|
12
|
-
executePlan(input: {
|
|
13
|
-
session: SessionData;
|
|
14
|
-
run: RunData;
|
|
15
|
-
taskSpecs: PlanTaskSpec[];
|
|
16
|
-
}): Promise<{
|
|
17
|
-
run: RunData;
|
|
18
|
-
normalizedResponses: NormalizedResponseData[];
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export class TaskExecutor {
|
|
2
|
-
#providerRegistry;
|
|
3
|
-
#artifactRepository;
|
|
4
|
-
#responseNormalizer;
|
|
5
|
-
#runCoordinator;
|
|
6
|
-
constructor(dependencies) {
|
|
7
|
-
this.#providerRegistry = dependencies.providerRegistry;
|
|
8
|
-
this.#artifactRepository = dependencies.artifactRepository;
|
|
9
|
-
this.#responseNormalizer = dependencies.responseNormalizer;
|
|
10
|
-
this.#runCoordinator = dependencies.runCoordinator;
|
|
11
|
-
}
|
|
12
|
-
async executePlan(input) {
|
|
13
|
-
const normalizedResponses = [];
|
|
14
|
-
let currentRun = input.run;
|
|
15
|
-
for (const spec of input.taskSpecs) {
|
|
16
|
-
const task = await this.#runCoordinator.appendTask({
|
|
17
|
-
runId: currentRun.runId,
|
|
18
|
-
taskKind: spec.taskKind,
|
|
19
|
-
role: spec.role,
|
|
20
|
-
provider: spec.provider ?? null,
|
|
21
|
-
dependsOn: spec.dependsOn ?? [],
|
|
22
|
-
prompt: spec.prompt,
|
|
23
|
-
});
|
|
24
|
-
const { updatedRun, normalizedResponse } = await this.#executeTask({
|
|
25
|
-
session: input.session,
|
|
26
|
-
run: currentRun,
|
|
27
|
-
task,
|
|
28
|
-
prompt: spec.prompt,
|
|
29
|
-
});
|
|
30
|
-
currentRun = updatedRun;
|
|
31
|
-
normalizedResponses.push(normalizedResponse);
|
|
32
|
-
}
|
|
33
|
-
return { run: currentRun, normalizedResponses };
|
|
34
|
-
}
|
|
35
|
-
async #executeTask(input) {
|
|
36
|
-
const provider = input.task.provider ?? "claude-code";
|
|
37
|
-
const adapter = this.#providerRegistry.get(provider);
|
|
38
|
-
const providerRef = input.session.providerRefs.find((ref) => ref.provider === provider) ?? null;
|
|
39
|
-
const providerResponse = await adapter.call({
|
|
40
|
-
provider,
|
|
41
|
-
prompt: input.prompt,
|
|
42
|
-
sessionHint: providerRef,
|
|
43
|
-
mode: input.run.mode,
|
|
44
|
-
});
|
|
45
|
-
const rawTextArtifact = await this.#artifactRepository.saveArtifact({
|
|
46
|
-
kind: "provider-raw-text",
|
|
47
|
-
runId: input.run.runId,
|
|
48
|
-
sessionId: input.session.sessionId,
|
|
49
|
-
taskId: input.task.taskId,
|
|
50
|
-
extension: "txt",
|
|
51
|
-
content: providerResponse.rawText ?? "",
|
|
52
|
-
});
|
|
53
|
-
const rawJsonArtifact = await this.#artifactRepository.saveArtifact({
|
|
54
|
-
kind: "provider-raw-json",
|
|
55
|
-
runId: input.run.runId,
|
|
56
|
-
sessionId: input.session.sessionId,
|
|
57
|
-
taskId: input.task.taskId,
|
|
58
|
-
extension: "json",
|
|
59
|
-
content: JSON.stringify(providerResponse.rawJson ?? {}, null, 2),
|
|
60
|
-
});
|
|
61
|
-
providerResponse.rawTextRef = rawTextArtifact.path;
|
|
62
|
-
providerResponse.rawJsonRef = rawJsonArtifact.path;
|
|
63
|
-
const normalizedResponse = this.#responseNormalizer.normalize({
|
|
64
|
-
taskId: input.task.taskId,
|
|
65
|
-
providerResponse,
|
|
66
|
-
});
|
|
67
|
-
const updatedRun = await this.#runCoordinator.appendTaskResult({
|
|
68
|
-
runId: input.run.runId,
|
|
69
|
-
taskId: input.task.taskId,
|
|
70
|
-
summary: normalizedResponse.summary,
|
|
71
|
-
findings: normalizedResponse.findings,
|
|
72
|
-
citations: normalizedResponse.citations,
|
|
73
|
-
confidence: normalizedResponse.confidence,
|
|
74
|
-
sourceArtifactIds: [rawTextArtifact.artifactId, rawJsonArtifact.artifactId],
|
|
75
|
-
providerResponse,
|
|
76
|
-
normalizedResponse,
|
|
77
|
-
});
|
|
78
|
-
return { updatedRun, normalizedResponse };
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=TaskExecutor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskExecutor.js","sourceRoot":"","sources":["../../../src/orchestrator/TaskExecutor.ts"],"names":[],"mappings":"AAmBA,MAAM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OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;SACjE,CAAC,CAAC;QAEH,gBAAgB,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC;QACnD,gBAAgB,CAAC,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC;QAEnD,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC;YAC5D,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM;YACzB,gBAAgB;SACjB,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC;YAC7D,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK;YACtB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM;YACzB,OAAO,EAAE,kBAAkB,CAAC,OAAO;YACnC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;YACrC,SAAS,EAAE,kBAAkB,CAAC,SAAS;YACvC,UAAU,EAAE,kBAAkB,CAAC,UAAU;YACzC,iBAAiB,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;YAC3E,gBAAgB;YAChB,kBAAkB;SACnB,CAAC,CAAC;QAEH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export class TaskScheduler {
|
|
2
|
-
order(tasks) {
|
|
3
|
-
const remaining = [...tasks];
|
|
4
|
-
const ordered = [];
|
|
5
|
-
const seen = new Set();
|
|
6
|
-
while (remaining.length > 0) {
|
|
7
|
-
const nextIndex = remaining.findIndex((task) => (task.dependsOn ?? []).every((dependency) => seen.has(dependency)));
|
|
8
|
-
const indexToUse = nextIndex >= 0 ? nextIndex : 0;
|
|
9
|
-
const [task] = remaining.splice(indexToUse, 1);
|
|
10
|
-
if (!task) {
|
|
11
|
-
break;
|
|
12
|
-
}
|
|
13
|
-
ordered.push(task);
|
|
14
|
-
seen.add(task.taskKind);
|
|
15
|
-
}
|
|
16
|
-
return ordered;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=TaskScheduler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskScheduler.js","sourceRoot":"","sources":["../../../src/orchestrator/TaskScheduler.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,KAAqB;QACzB,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QAC7B,MAAM,OAAO,GAAmB,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAE/B,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CACnE,CAAC;YAEF,MAAM,UAAU,GAAG,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM;YACR,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class ValidationRunner {
|
|
2
|
-
validate(normalizedResponses) {
|
|
3
|
-
if (normalizedResponses.length === 0) {
|
|
4
|
-
return {
|
|
5
|
-
status: "failed",
|
|
6
|
-
notes: ["No normalized responses were produced."],
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
const lowConfidence = normalizedResponses.filter((response) => response.confidence.level === "low");
|
|
10
|
-
if (lowConfidence.length > 0) {
|
|
11
|
-
return {
|
|
12
|
-
status: "partial",
|
|
13
|
-
notes: lowConfidence.map((response) => `Low confidence response from ${response.provider}/${response.taskId}: ${response.confidence.reason}`),
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
status: "validated",
|
|
18
|
-
notes: ["All task responses reached the minimum validation threshold for phase 1."],
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=ValidationRunner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationRunner.js","sourceRoot":"","sources":["../../../src/orchestrator/ValidationRunner.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,gBAAgB;IAC3B,QAAQ,CAAC,mBAA6C;QACpD,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACrC,OAAO;gBACL,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,CAAC,wCAAwC,CAAC;aAClD,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,mBAAmB,CAAC,MAAM,CAC9C,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,KAAK,KAAK,CAClD,CAAC;QAEF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO;gBACL,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE,aAAa,CAAC,GAAG,CACtB,CAAC,QAAQ,EAAE,EAAE,CACX,gCAAgC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,CACxG;aACF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,CAAC,0EAA0E,CAAC;SACpF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { PlanBuilder } from "./PlanBuilder.js";
|
|
2
|
-
export { TaskScheduler } from "./TaskScheduler.js";
|
|
3
|
-
export { TaskExecutor } from "./TaskExecutor.js";
|
|
4
|
-
export { ResultMerger } from "./ResultMerger.js";
|
|
5
|
-
export { ValidationRunner } from "./ValidationRunner.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ResultRenderer.js";
|
package/dist/src/output/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
|
package/dist/src/run/index.d.ts
DELETED
package/dist/src/run/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/run/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/session/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
export type Role = "system" | "user" | "assistant";
|
|
2
|
-
export type RunMode = "direct" | "orchestrated";
|
|
3
|
-
export type RunStatus = "created" | "planned" | "running" | "merged" | "validated" | "completed" | "failed" | "partial";
|
|
4
|
-
export interface ProviderRef {
|
|
5
|
-
provider: string;
|
|
6
|
-
providerSessionId: string;
|
|
7
|
-
workingDirectory: string;
|
|
8
|
-
lastUsedAt: string;
|
|
9
|
-
}
|
|
10
|
-
export interface SessionTurnData {
|
|
11
|
-
turnId: string;
|
|
12
|
-
sessionId: string;
|
|
13
|
-
role: Role;
|
|
14
|
-
content: string;
|
|
15
|
-
artifactIds: string[];
|
|
16
|
-
createdAt: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SessionData {
|
|
19
|
-
sessionId: string;
|
|
20
|
-
title: string;
|
|
21
|
-
status?: string;
|
|
22
|
-
createdAt: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
providerRefs: ProviderRef[];
|
|
25
|
-
turns: SessionTurnData[];
|
|
26
|
-
}
|
|
27
|
-
export interface FileRef {
|
|
28
|
-
path: string;
|
|
29
|
-
absolutePath?: string;
|
|
30
|
-
purpose: string;
|
|
31
|
-
checksum?: string;
|
|
32
|
-
content?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface DiffRef {
|
|
35
|
-
path: string;
|
|
36
|
-
summary?: string;
|
|
37
|
-
content?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface LogRef {
|
|
40
|
-
path: string;
|
|
41
|
-
source: string;
|
|
42
|
-
capturedAt: string;
|
|
43
|
-
content?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface ContextBundleData {
|
|
46
|
-
contextId: string;
|
|
47
|
-
runId: string | null;
|
|
48
|
-
summary: string;
|
|
49
|
-
files: FileRef[];
|
|
50
|
-
diffs: DiffRef[];
|
|
51
|
-
logs: LogRef[];
|
|
52
|
-
metadata: Record<string, unknown>;
|
|
53
|
-
}
|
|
54
|
-
export interface ProviderCallPlan {
|
|
55
|
-
provider: string;
|
|
56
|
-
prompt: string;
|
|
57
|
-
sessionHint?: ProviderRef | null;
|
|
58
|
-
timeoutMs?: number;
|
|
59
|
-
mode: RunMode;
|
|
60
|
-
}
|
|
61
|
-
export interface UsageData {
|
|
62
|
-
inputTokens?: number | null;
|
|
63
|
-
outputTokens?: number | null;
|
|
64
|
-
costUsd?: number | null;
|
|
65
|
-
latencyMs?: number | null;
|
|
66
|
-
}
|
|
67
|
-
export interface ExternalRef {
|
|
68
|
-
system: string;
|
|
69
|
-
id: string;
|
|
70
|
-
scope?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface ProviderResponseData {
|
|
73
|
-
responseId: string;
|
|
74
|
-
taskId: string;
|
|
75
|
-
provider: string;
|
|
76
|
-
rawText?: string;
|
|
77
|
-
rawJson?: unknown;
|
|
78
|
-
rawTextRef?: string | null;
|
|
79
|
-
rawJsonRef?: string | null;
|
|
80
|
-
usage?: UsageData | null;
|
|
81
|
-
latencyMs?: number;
|
|
82
|
-
externalRefs: ExternalRef[];
|
|
83
|
-
citations?: CitationData[];
|
|
84
|
-
isError?: boolean;
|
|
85
|
-
subtype?: string | null;
|
|
86
|
-
}
|
|
87
|
-
export interface ConfidenceScoreData {
|
|
88
|
-
level: "low" | "medium" | "high";
|
|
89
|
-
reason?: string | null;
|
|
90
|
-
}
|
|
91
|
-
export interface CitationData {
|
|
92
|
-
kind: string;
|
|
93
|
-
label?: string | null;
|
|
94
|
-
pathOrUrl?: string | null;
|
|
95
|
-
line?: number | null;
|
|
96
|
-
}
|
|
97
|
-
export interface NormalizedResponseData {
|
|
98
|
-
normalizedResponseId: string;
|
|
99
|
-
taskId: string;
|
|
100
|
-
provider: string;
|
|
101
|
-
summary: string;
|
|
102
|
-
findings: string[];
|
|
103
|
-
suggestions: string[];
|
|
104
|
-
citations: CitationData[];
|
|
105
|
-
confidence: ConfidenceScoreData;
|
|
106
|
-
}
|
|
107
|
-
export interface RunTaskData {
|
|
108
|
-
taskId: string;
|
|
109
|
-
runId: string;
|
|
110
|
-
taskKind: string;
|
|
111
|
-
role: string;
|
|
112
|
-
provider?: string | null;
|
|
113
|
-
dependsOn: string[];
|
|
114
|
-
status: RunStatus | "queued";
|
|
115
|
-
prompt?: string;
|
|
116
|
-
summary?: string;
|
|
117
|
-
}
|
|
118
|
-
export interface TaskResultData {
|
|
119
|
-
resultId: string;
|
|
120
|
-
taskId: string;
|
|
121
|
-
summary: string;
|
|
122
|
-
findings: string[];
|
|
123
|
-
citations: CitationData[];
|
|
124
|
-
confidence: ConfidenceScoreData;
|
|
125
|
-
sourceArtifactIds: string[];
|
|
126
|
-
}
|
|
127
|
-
export interface ComparisonReportData {
|
|
128
|
-
reportId: string | null;
|
|
129
|
-
runId: string | null;
|
|
130
|
-
topic: string;
|
|
131
|
-
responseIds: string[];
|
|
132
|
-
agreements: string[];
|
|
133
|
-
differences: string[];
|
|
134
|
-
recommendation: string | null;
|
|
135
|
-
}
|
|
136
|
-
export interface RunData {
|
|
137
|
-
runId: string;
|
|
138
|
-
sessionId: string;
|
|
139
|
-
command: string;
|
|
140
|
-
mode: RunMode;
|
|
141
|
-
status: RunStatus;
|
|
142
|
-
planVersion?: string;
|
|
143
|
-
finalSummary?: string;
|
|
144
|
-
validationStatus?: string;
|
|
145
|
-
tasks: RunTaskData[];
|
|
146
|
-
taskResults: TaskResultData[];
|
|
147
|
-
contextBundles?: ContextBundleData[];
|
|
148
|
-
providerResponses?: ProviderResponseData[];
|
|
149
|
-
normalizedResponses?: NormalizedResponseData[];
|
|
150
|
-
comparisonReport?: ComparisonReportData | null;
|
|
151
|
-
createdAt: string;
|
|
152
|
-
updatedAt: string;
|
|
153
|
-
}
|
|
154
|
-
export interface ArtifactData {
|
|
155
|
-
artifactId: string;
|
|
156
|
-
kind: string;
|
|
157
|
-
path: string;
|
|
158
|
-
sessionId?: string | null;
|
|
159
|
-
runId?: string | null;
|
|
160
|
-
turnId?: string | null;
|
|
161
|
-
taskId?: string | null;
|
|
162
|
-
createdAt: string;
|
|
163
|
-
}
|
|
164
|
-
export interface SessionManagerPort {
|
|
165
|
-
startSession(input: {
|
|
166
|
-
title?: string;
|
|
167
|
-
}): Promise<SessionData>;
|
|
168
|
-
loadSession(sessionId: string): Promise<SessionData | null>;
|
|
169
|
-
appendTurn(input: {
|
|
170
|
-
sessionId: string;
|
|
171
|
-
role: Role;
|
|
172
|
-
content: string;
|
|
173
|
-
artifactIds?: string[];
|
|
174
|
-
}): Promise<SessionData>;
|
|
175
|
-
updateProviderRef(input: {
|
|
176
|
-
sessionId: string;
|
|
177
|
-
providerRef: ProviderRef;
|
|
178
|
-
}): Promise<SessionData>;
|
|
179
|
-
}
|
|
180
|
-
export interface RunCoordinatorPort {
|
|
181
|
-
startRun(input: {
|
|
182
|
-
sessionId: string;
|
|
183
|
-
command: string;
|
|
184
|
-
mode: RunMode;
|
|
185
|
-
}): Promise<RunData>;
|
|
186
|
-
attachContextBundle(input: {
|
|
187
|
-
runId: string;
|
|
188
|
-
contextBundle: ContextBundleData;
|
|
189
|
-
}): Promise<RunData>;
|
|
190
|
-
appendTask(input: {
|
|
191
|
-
runId: string;
|
|
192
|
-
taskKind: string;
|
|
193
|
-
role: string;
|
|
194
|
-
provider?: string | null;
|
|
195
|
-
dependsOn?: string[];
|
|
196
|
-
prompt?: string;
|
|
197
|
-
}): Promise<RunTaskData>;
|
|
198
|
-
appendTaskResult(input: {
|
|
199
|
-
runId: string;
|
|
200
|
-
taskId: string;
|
|
201
|
-
summary: string;
|
|
202
|
-
findings: string[];
|
|
203
|
-
citations?: CitationData[];
|
|
204
|
-
confidence: ConfidenceScoreData;
|
|
205
|
-
sourceArtifactIds?: string[];
|
|
206
|
-
providerResponse?: ProviderResponseData;
|
|
207
|
-
normalizedResponse?: NormalizedResponseData;
|
|
208
|
-
}): Promise<RunData>;
|
|
209
|
-
finalizeRun(input: {
|
|
210
|
-
runId: string;
|
|
211
|
-
finalSummary: string;
|
|
212
|
-
validationStatus: string;
|
|
213
|
-
comparisonReport?: ComparisonReportData | null;
|
|
214
|
-
}): Promise<RunData>;
|
|
215
|
-
markRunFailed(input: {
|
|
216
|
-
runId: string;
|
|
217
|
-
errorMessage: string;
|
|
218
|
-
}): Promise<RunData>;
|
|
219
|
-
loadRun(runId: string): Promise<RunData | null>;
|
|
220
|
-
}
|
|
221
|
-
export interface ArtifactRepositoryPort {
|
|
222
|
-
saveArtifact(input: {
|
|
223
|
-
kind: string;
|
|
224
|
-
runId?: string | null;
|
|
225
|
-
sessionId?: string | null;
|
|
226
|
-
turnId?: string | null;
|
|
227
|
-
taskId?: string | null;
|
|
228
|
-
extension?: string;
|
|
229
|
-
content: string;
|
|
230
|
-
}): Promise<ArtifactData>;
|
|
231
|
-
}
|
|
232
|
-
export interface ProviderAdapterPort {
|
|
233
|
-
readonly name: string;
|
|
234
|
-
call(plan: ProviderCallPlan): Promise<ProviderResponseData>;
|
|
235
|
-
}
|
|
236
|
-
export interface ProviderRegistryPort {
|
|
237
|
-
list(): string[];
|
|
238
|
-
get(name?: string): ProviderAdapterPort;
|
|
239
|
-
}
|
|
240
|
-
export interface PlanTaskSpec {
|
|
241
|
-
taskKind: string;
|
|
242
|
-
role: string;
|
|
243
|
-
provider?: string | null;
|
|
244
|
-
prompt: string;
|
|
245
|
-
dependsOn?: string[];
|
|
246
|
-
}
|
|
247
|
-
export interface ValidationResult {
|
|
248
|
-
status: string;
|
|
249
|
-
notes: string[];
|
|
250
|
-
}
|
|
251
|
-
export interface RenderResult {
|
|
252
|
-
text: string;
|
|
253
|
-
json: Record<string, unknown>;
|
|
254
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/shared/contracts.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export class AipanelError extends Error {
|
|
2
|
-
code;
|
|
3
|
-
details;
|
|
4
|
-
constructor(message, { code = "AIPANEL_ERROR", details = null, cause = null } = {}) {
|
|
5
|
-
super(message, cause ? { cause } : undefined);
|
|
6
|
-
this.name = "AipanelError";
|
|
7
|
-
this.code = code;
|
|
8
|
-
this.details = details;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,IAAI,CAAS;IAEb,OAAO,CAAU;IAEjB,YACE,OAAe,EACf,EAAE,IAAI,GAAG,eAAe,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,KAA4D,EAAE;QAEpH,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
package/dist/src/shared/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
|