@tienne/gestalt 0.14.1 → 0.15.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.ko.md +8 -0
- package/README.md +8 -0
- package/dist/package.json +1 -1
- package/dist/role-agents/harness-architect/AGENT.md +210 -0
- package/dist/role-agents/technical-writer/AGENT.md +46 -0
- package/dist/role-agents/technical-writer/references/ai-tell-quick-rules.md +134 -0
- package/dist/skills/agent/SKILL.md +2 -0
- package/package.json +1 -1
- package/role-agents/harness-architect/AGENT.md +210 -0
- package/role-agents/technical-writer/AGENT.md +46 -0
- package/role-agents/technical-writer/references/ai-tell-quick-rules.md +134 -0
- package/skills/agent/SKILL.md +2 -0
- package/dist/skills/seed/SKILL.md +0 -92
- package/dist/src/cli/commands/seed.d.ts +0 -4
- package/dist/src/cli/commands/seed.d.ts.map +0 -1
- package/dist/src/cli/commands/seed.js +0 -34
- package/dist/src/cli/commands/seed.js.map +0 -1
- package/dist/src/interview/ambiguity.d.ts +0 -8
- package/dist/src/interview/ambiguity.d.ts.map +0 -1
- package/dist/src/interview/ambiguity.js +0 -69
- package/dist/src/interview/ambiguity.js.map +0 -1
- package/dist/src/mcp/tools/seed-passthrough.d.ts +0 -5
- package/dist/src/mcp/tools/seed-passthrough.d.ts.map +0 -1
- package/dist/src/mcp/tools/seed-passthrough.js +0 -29
- package/dist/src/mcp/tools/seed-passthrough.js.map +0 -1
- package/dist/src/mcp/tools/seed.d.ts +0 -5
- package/dist/src/mcp/tools/seed.d.ts.map +0 -1
- package/dist/src/mcp/tools/seed.js +0 -19
- package/dist/src/mcp/tools/seed.js.map +0 -1
- package/dist/src/recording/agg-converter.d.ts +0 -25
- package/dist/src/recording/agg-converter.d.ts.map +0 -1
- package/dist/src/recording/agg-converter.js +0 -80
- package/dist/src/recording/agg-converter.js.map +0 -1
- package/dist/src/recording/agg-installer.d.ts +0 -6
- package/dist/src/recording/agg-installer.d.ts.map +0 -1
- package/dist/src/recording/agg-installer.js +0 -50
- package/dist/src/recording/agg-installer.js.map +0 -1
- package/dist/src/recording/asciinema-installer.d.ts +0 -6
- package/dist/src/recording/asciinema-installer.d.ts.map +0 -1
- package/dist/src/recording/asciinema-installer.js +0 -50
- package/dist/src/recording/asciinema-installer.js.map +0 -1
- package/dist/src/recording/asciinema-recorder.d.ts +0 -26
- package/dist/src/recording/asciinema-recorder.d.ts.map +0 -1
- package/dist/src/recording/asciinema-recorder.js +0 -52
- package/dist/src/recording/asciinema-recorder.js.map +0 -1
- package/dist/src/recording/cast-generator.d.ts +0 -7
- package/dist/src/recording/cast-generator.d.ts.map +0 -1
- package/dist/src/recording/cast-generator.js +0 -97
- package/dist/src/recording/cast-generator.js.map +0 -1
- package/dist/src/recording/filename-generator.d.ts +0 -19
- package/dist/src/recording/filename-generator.d.ts.map +0 -1
- package/dist/src/recording/filename-generator.js +0 -67
- package/dist/src/recording/filename-generator.js.map +0 -1
- package/dist/src/recording/gif-generator.d.ts +0 -21
- package/dist/src/recording/gif-generator.d.ts.map +0 -1
- package/dist/src/recording/gif-generator.js +0 -121
- package/dist/src/recording/gif-generator.js.map +0 -1
- package/dist/src/recording/recording-dir.d.ts +0 -5
- package/dist/src/recording/recording-dir.d.ts.map +0 -1
- package/dist/src/recording/recording-dir.js +0 -13
- package/dist/src/recording/recording-dir.js.map +0 -1
- package/dist/src/recording/recording-orchestrator.d.ts +0 -50
- package/dist/src/recording/recording-orchestrator.d.ts.map +0 -1
- package/dist/src/recording/recording-orchestrator.js +0 -98
- package/dist/src/recording/recording-orchestrator.js.map +0 -1
- package/dist/src/recording/resume-detector.d.ts +0 -10
- package/dist/src/recording/resume-detector.d.ts.map +0 -1
- package/dist/src/recording/resume-detector.js +0 -14
- package/dist/src/recording/resume-detector.js.map +0 -1
- package/dist/src/recording/segment-merger.d.ts +0 -27
- package/dist/src/recording/segment-merger.d.ts.map +0 -1
- package/dist/src/recording/segment-merger.js +0 -65
- package/dist/src/recording/segment-merger.js.map +0 -1
- package/dist/src/recording/terminal-recorder.d.ts +0 -31
- package/dist/src/recording/terminal-recorder.d.ts.map +0 -1
- package/dist/src/recording/terminal-recorder.js +0 -111
- package/dist/src/recording/terminal-recorder.js.map +0 -1
- package/dist/src/scripts/postinstall.d.ts +0 -2
- package/dist/src/scripts/postinstall.d.ts.map +0 -1
- package/dist/src/scripts/postinstall.js +0 -29
- package/dist/src/scripts/postinstall.js.map +0 -1
- package/dist/src/seed/extractor.d.ts +0 -15
- package/dist/src/seed/extractor.d.ts.map +0 -1
- package/dist/src/seed/extractor.js +0 -88
- package/dist/src/seed/extractor.js.map +0 -1
- package/dist/src/seed/generator.d.ts +0 -12
- package/dist/src/seed/generator.d.ts.map +0 -1
- package/dist/src/seed/generator.js +0 -66
- package/dist/src/seed/generator.js.map +0 -1
- package/dist/src/seed/passthrough-generator.d.ts +0 -31
- package/dist/src/seed/passthrough-generator.d.ts.map +0 -1
- package/dist/src/seed/passthrough-generator.js +0 -80
- package/dist/src/seed/passthrough-generator.js.map +0 -1
- package/dist/src/seed/schema.d.ts +0 -145
- package/dist/src/seed/schema.d.ts.map +0 -1
- package/dist/src/seed/schema.js +0 -37
- package/dist/src/seed/schema.js.map +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Postinstall script: auto-setup agg for GIF recording support.
|
|
3
|
-
* Runs after: npm install @tienne/gestalt
|
|
4
|
-
*
|
|
5
|
-
* - Silently skips in CI or if GESTALT_SKIP_DEPS=1
|
|
6
|
-
* - Always exits 0 (never fails the install)
|
|
7
|
-
*/
|
|
8
|
-
import { AggInstaller } from '../recording/agg-installer.js';
|
|
9
|
-
async function main() {
|
|
10
|
-
if (process.env['CI'] || process.env['GESTALT_SKIP_DEPS'] === '1') {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const installer = new AggInstaller();
|
|
14
|
-
if (installer.isInstalled())
|
|
15
|
-
return;
|
|
16
|
-
process.stdout.write('\n[gestalt] agg not found — setting up GIF recording support...\n');
|
|
17
|
-
try {
|
|
18
|
-
await installer.ensureInstalled();
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
22
|
-
process.stdout.write(`[gestalt] Skipping agg setup: ${msg}\n`);
|
|
23
|
-
process.stdout.write('[gestalt] Install manually later: https://github.com/asciinema/agg\n\n');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
main()
|
|
27
|
-
.then(() => process.exit(0))
|
|
28
|
-
.catch(() => process.exit(0));
|
|
29
|
-
//# sourceMappingURL=postinstall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../../../src/scripts/postinstall.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,KAAK,UAAU,IAAI;IACjB,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,GAAG,EAAE,CAAC;QAClE,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;IACrC,IAAI,SAAS,CAAC,WAAW,EAAE;QAAE,OAAO;IAEpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;IAE1F,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,GAAG,IAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACjG,CAAC;AACH,CAAC;AAED,IAAI,EAAE;KACH,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC3B,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { InterviewSession, GestaltAnalysis, OntologySchema } from '../core/types.js';
|
|
2
|
-
import type { LLMAdapter } from '../llm/types.js';
|
|
3
|
-
export interface ExtractedData {
|
|
4
|
-
goal: string;
|
|
5
|
-
constraints: string[];
|
|
6
|
-
acceptanceCriteria: string[];
|
|
7
|
-
ontologySchema: OntologySchema;
|
|
8
|
-
gestaltAnalysis: GestaltAnalysis[];
|
|
9
|
-
}
|
|
10
|
-
export declare class SeedExtractor {
|
|
11
|
-
private llm;
|
|
12
|
-
constructor(llm: LLMAdapter);
|
|
13
|
-
extract(session: InterviewSession): Promise<ExtractedData>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/seed/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,EAAE,CAAC;CACpC;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,UAAU;IAE7B,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;CAsBjE"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { buildSeedPrompt, INTERVIEW_SYSTEM_PROMPT } from '../llm/prompts.js';
|
|
2
|
-
import { SeedGenerationError } from '../core/errors.js';
|
|
3
|
-
export class SeedExtractor {
|
|
4
|
-
llm;
|
|
5
|
-
constructor(llm) {
|
|
6
|
-
this.llm = llm;
|
|
7
|
-
}
|
|
8
|
-
async extract(session) {
|
|
9
|
-
const completedRounds = session.rounds
|
|
10
|
-
.filter((r) => r.userResponse)
|
|
11
|
-
.map((r) => ({
|
|
12
|
-
question: r.question,
|
|
13
|
-
response: r.userResponse,
|
|
14
|
-
}));
|
|
15
|
-
if (completedRounds.length === 0) {
|
|
16
|
-
throw new SeedGenerationError('No completed interview rounds to extract from');
|
|
17
|
-
}
|
|
18
|
-
const prompt = buildSeedPrompt(session.topic, completedRounds, session.projectType);
|
|
19
|
-
const response = await this.llm.chat({
|
|
20
|
-
system: INTERVIEW_SYSTEM_PROMPT,
|
|
21
|
-
messages: [{ role: 'user', content: prompt }],
|
|
22
|
-
temperature: 0.3,
|
|
23
|
-
});
|
|
24
|
-
return parseSeedResponse(response.content);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function parseSeedResponse(content) {
|
|
28
|
-
const jsonMatch = content.match(/\{[\s\S]*\}/);
|
|
29
|
-
if (!jsonMatch) {
|
|
30
|
-
throw new SeedGenerationError('Failed to parse LLM response as JSON');
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
const parsed = JSON.parse(jsonMatch[0]);
|
|
34
|
-
return {
|
|
35
|
-
goal: asString(parsed['goal'], 'Undefined goal'),
|
|
36
|
-
constraints: asStringArray(parsed['constraints']),
|
|
37
|
-
acceptanceCriteria: asStringArray(parsed['acceptanceCriteria']),
|
|
38
|
-
ontologySchema: parseOntology(parsed['ontologySchema']),
|
|
39
|
-
gestaltAnalysis: parseGestaltAnalysis(parsed['gestaltAnalysis']),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
if (e instanceof SeedGenerationError)
|
|
44
|
-
throw e;
|
|
45
|
-
throw new SeedGenerationError(`Failed to parse seed data: ${e instanceof Error ? e.message : String(e)}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function asString(value, fallback) {
|
|
49
|
-
return typeof value === 'string' && value.length > 0 ? value : fallback;
|
|
50
|
-
}
|
|
51
|
-
function asStringArray(value) {
|
|
52
|
-
if (!Array.isArray(value))
|
|
53
|
-
return [];
|
|
54
|
-
return value.filter((v) => typeof v === 'string');
|
|
55
|
-
}
|
|
56
|
-
function parseOntology(value) {
|
|
57
|
-
if (!value || typeof value !== 'object') {
|
|
58
|
-
return { entities: [], relations: [] };
|
|
59
|
-
}
|
|
60
|
-
const obj = value;
|
|
61
|
-
const entities = Array.isArray(obj['entities'])
|
|
62
|
-
? obj['entities'].map((e) => ({
|
|
63
|
-
name: asString(e['name'], 'Unknown'),
|
|
64
|
-
description: asString(e['description'], ''),
|
|
65
|
-
attributes: asStringArray(e['attributes']),
|
|
66
|
-
}))
|
|
67
|
-
: [];
|
|
68
|
-
const relations = Array.isArray(obj['relations'])
|
|
69
|
-
? obj['relations'].map((r) => ({
|
|
70
|
-
from: asString(r['from'], ''),
|
|
71
|
-
to: asString(r['to'], ''),
|
|
72
|
-
type: asString(r['type'], ''),
|
|
73
|
-
}))
|
|
74
|
-
: [];
|
|
75
|
-
return { entities, relations };
|
|
76
|
-
}
|
|
77
|
-
function parseGestaltAnalysis(value) {
|
|
78
|
-
if (!Array.isArray(value))
|
|
79
|
-
return [];
|
|
80
|
-
return value
|
|
81
|
-
.filter((v) => typeof v === 'object' && v !== null)
|
|
82
|
-
.map((v) => ({
|
|
83
|
-
principle: asString(v['principle'], 'closure'),
|
|
84
|
-
finding: asString(v['finding'], ''),
|
|
85
|
-
confidence: typeof v['confidence'] === 'number' ? v['confidence']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EAAE,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc;IAC1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,OAAO,KAAK;SACT,MAAM,CAAC,CAAC,CAAC,EAAgC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC;SAChF,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,SAAS,CAAiC;QAC9E,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;QACnC,UAAU,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;KACxE,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { InterviewSession, Seed } from '../core/types.js';
|
|
2
|
-
import { AmbiguityThresholdError, SeedGenerationError } from '../core/errors.js';
|
|
3
|
-
import { type Result } from '../core/result.js';
|
|
4
|
-
import type { LLMAdapter } from '../llm/types.js';
|
|
5
|
-
import { EventStore } from '../events/store.js';
|
|
6
|
-
export declare class SeedGenerator {
|
|
7
|
-
private eventStore;
|
|
8
|
-
private extractor;
|
|
9
|
-
constructor(llm: LLMAdapter, eventStore: EventStore);
|
|
10
|
-
generate(session: InterviewSession, force?: boolean): Promise<Result<Seed, SeedGenerationError | AmbiguityThresholdError>>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/seed/generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,qBAAa,aAAa;IAKtB,OAAO,CAAC,UAAU;IAJpB,OAAO,CAAC,SAAS,CAAgB;gBAG/B,GAAG,EAAE,UAAU,EACP,UAAU,EAAE,UAAU;IAK1B,QAAQ,CACZ,OAAO,EAAE,gBAAgB,EACzB,KAAK,UAAQ,GACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,CAAC,CAAC;CAmExE"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { AmbiguityThresholdError, SeedGenerationError } from '../core/errors.js';
|
|
3
|
-
import { AMBIGUITY_THRESHOLD, MAX_SEED_RETRIES } from '../core/constants.js';
|
|
4
|
-
import { ok, err } from '../core/result.js';
|
|
5
|
-
import { seedSchema } from './schema.js';
|
|
6
|
-
import { SeedExtractor } from './extractor.js';
|
|
7
|
-
import { EventType } from '../events/types.js';
|
|
8
|
-
export class SeedGenerator {
|
|
9
|
-
eventStore;
|
|
10
|
-
extractor;
|
|
11
|
-
constructor(llm, eventStore) {
|
|
12
|
-
this.eventStore = eventStore;
|
|
13
|
-
this.extractor = new SeedExtractor(llm);
|
|
14
|
-
}
|
|
15
|
-
async generate(session, force = false) {
|
|
16
|
-
// Validate ambiguity threshold
|
|
17
|
-
if (!force) {
|
|
18
|
-
const ambiguity = session.ambiguityScore?.overall ?? 1.0;
|
|
19
|
-
if (ambiguity > AMBIGUITY_THRESHOLD) {
|
|
20
|
-
return err(new AmbiguityThresholdError(ambiguity, AMBIGUITY_THRESHOLD));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (session.status !== 'completed') {
|
|
24
|
-
return err(new SeedGenerationError('Interview session must be completed before generating a seed'));
|
|
25
|
-
}
|
|
26
|
-
// Retry up to MAX_SEED_RETRIES
|
|
27
|
-
let lastError = null;
|
|
28
|
-
for (let attempt = 0; attempt < MAX_SEED_RETRIES; attempt++) {
|
|
29
|
-
try {
|
|
30
|
-
const extracted = await this.extractor.extract(session);
|
|
31
|
-
const seed = {
|
|
32
|
-
version: '1.0.0',
|
|
33
|
-
goal: extracted.goal,
|
|
34
|
-
constraints: extracted.constraints,
|
|
35
|
-
acceptanceCriteria: extracted.acceptanceCriteria,
|
|
36
|
-
ontologySchema: extracted.ontologySchema,
|
|
37
|
-
gestaltAnalysis: extracted.gestaltAnalysis,
|
|
38
|
-
metadata: {
|
|
39
|
-
seedId: randomUUID(),
|
|
40
|
-
interviewSessionId: session.sessionId,
|
|
41
|
-
ambiguityScore: session.ambiguityScore?.overall ?? 1.0,
|
|
42
|
-
generatedAt: new Date().toISOString(),
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
// Validate against schema
|
|
46
|
-
const validation = seedSchema.safeParse(seed);
|
|
47
|
-
if (!validation.success) {
|
|
48
|
-
lastError = new SeedGenerationError(`Seed validation failed: ${validation.error.message}`);
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
this.eventStore.append('seed', seed.metadata.seedId, EventType.SEED_SPEC_GENERATED, {
|
|
52
|
-
sessionId: session.sessionId,
|
|
53
|
-
goal: seed.goal,
|
|
54
|
-
constraintCount: seed.constraints.length,
|
|
55
|
-
criteriaCount: seed.acceptanceCriteria.length,
|
|
56
|
-
});
|
|
57
|
-
return ok(seed);
|
|
58
|
-
}
|
|
59
|
-
catch (e) {
|
|
60
|
-
lastError = e instanceof Error ? e : new Error(String(e));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return err(new SeedGenerationError(`Failed after ${MAX_SEED_RETRIES} attempts: ${lastError?.message ?? 'unknown error'}`));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../src/seed/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAe,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,aAAa;IAKd;IAJF,SAAS,CAAgB;IAEjC,YACE,GAAe,EACP,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QAE9B,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAyB,EACzB,KAAK,GAAG,KAAK;QAEb,+BAA+B;QAC/B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,SAAS,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO,IAAI,GAAG,CAAC;YACzD,IAAI,SAAS,GAAG,mBAAmB,EAAE,CAAC;gBACpC,OAAO,GAAG,CAAC,IAAI,uBAAuB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YACnC,OAAO,GAAG,CAAC,IAAI,mBAAmB,CAAC,8DAA8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,CAAC,MAAM;oBACxC,aAAa,EAAE,IAAI,CAAC,kBAAkB,CAAC,MAAM;iBAC9C,CACF,CAAC;gBAEF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,SAAS,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CACR,IAAI,mBAAmB,CACrB,gBAAgB,gBAAgB,cAAc,SAAS,EAAE,OAAO,IAAI,eAAe,EAAE,CACtF,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { InterviewSession, Seed } from '../core/types.js';
|
|
2
|
-
import { AmbiguityThresholdError, SeedGenerationError } from '../core/errors.js';
|
|
3
|
-
import { type Result } from '../core/result.js';
|
|
4
|
-
import { EventStore } from '../events/store.js';
|
|
5
|
-
export interface SeedContext {
|
|
6
|
-
systemPrompt: string;
|
|
7
|
-
seedPrompt: string;
|
|
8
|
-
allRounds: {
|
|
9
|
-
roundNumber: number;
|
|
10
|
-
question: string;
|
|
11
|
-
response: string;
|
|
12
|
-
gestaltFocus: string;
|
|
13
|
-
}[];
|
|
14
|
-
}
|
|
15
|
-
export interface ExternalSeed {
|
|
16
|
-
goal: string;
|
|
17
|
-
constraints: string[];
|
|
18
|
-
acceptanceCriteria: string[];
|
|
19
|
-
ontologySchema: {
|
|
20
|
-
entities: unknown[];
|
|
21
|
-
relations: unknown[];
|
|
22
|
-
};
|
|
23
|
-
gestaltAnalysis: unknown[];
|
|
24
|
-
}
|
|
25
|
-
export declare class PassthroughSeedGenerator {
|
|
26
|
-
private eventStore;
|
|
27
|
-
constructor(eventStore: EventStore);
|
|
28
|
-
buildSeedContext(session: InterviewSession): SeedContext;
|
|
29
|
-
validateAndStore(session: InterviewSession, externalSeed: ExternalSeed, force?: boolean): Result<Seed, SeedGenerationError | AmbiguityThresholdError>;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=passthrough-generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"passthrough-generator.d.ts","sourceRoot":"","sources":["../../../src/seed/passthrough-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAkB,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMhD,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChG;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,cAAc,EAAE;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QAAC,SAAS,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAC9D,eAAe,EAAE,OAAO,EAAE,CAAC;CAC5B;AAID,qBAAa,wBAAwB;IACvB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,WAAW;IAwBxD,gBAAgB,CACd,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,YAAY,EAC1B,KAAK,UAAQ,GACZ,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,CAAC;CA6D/D"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { AmbiguityThresholdError, SeedGenerationError } from '../core/errors.js';
|
|
3
|
-
import { AMBIGUITY_THRESHOLD } from '../core/constants.js';
|
|
4
|
-
import { ok, err } from '../core/result.js';
|
|
5
|
-
import { seedSchema } from './schema.js';
|
|
6
|
-
import { EventType } from '../events/types.js';
|
|
7
|
-
import { INTERVIEW_SYSTEM_PROMPT, buildSeedPrompt } from '../llm/prompts.js';
|
|
8
|
-
// ─── Generator ──────────────────────────────────────────────────
|
|
9
|
-
export class PassthroughSeedGenerator {
|
|
10
|
-
eventStore;
|
|
11
|
-
constructor(eventStore) {
|
|
12
|
-
this.eventStore = eventStore;
|
|
13
|
-
}
|
|
14
|
-
buildSeedContext(session) {
|
|
15
|
-
const answeredRounds = session.rounds
|
|
16
|
-
.filter((r) => r.userResponse !== null)
|
|
17
|
-
.map((r) => ({
|
|
18
|
-
question: r.question,
|
|
19
|
-
response: r.userResponse,
|
|
20
|
-
}));
|
|
21
|
-
const seedPrompt = buildSeedPrompt(session.topic, answeredRounds, session.projectType);
|
|
22
|
-
return {
|
|
23
|
-
systemPrompt: INTERVIEW_SYSTEM_PROMPT,
|
|
24
|
-
seedPrompt,
|
|
25
|
-
allRounds: session.rounds
|
|
26
|
-
.filter((r) => r.userResponse !== null)
|
|
27
|
-
.map((r) => ({
|
|
28
|
-
roundNumber: r.roundNumber,
|
|
29
|
-
question: r.question,
|
|
30
|
-
response: r.userResponse,
|
|
31
|
-
gestaltFocus: r.gestaltFocus,
|
|
32
|
-
})),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
validateAndStore(session, externalSeed, force = false) {
|
|
36
|
-
// Validate ambiguity threshold
|
|
37
|
-
if (!force) {
|
|
38
|
-
const ambiguity = session.ambiguityScore?.overall ?? 1.0;
|
|
39
|
-
if (ambiguity > AMBIGUITY_THRESHOLD) {
|
|
40
|
-
return err(new AmbiguityThresholdError(ambiguity, AMBIGUITY_THRESHOLD));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (session.status !== 'completed') {
|
|
44
|
-
return err(new SeedGenerationError('Interview session must be completed before generating a seed'));
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
const seed = {
|
|
48
|
-
version: '1.0.0',
|
|
49
|
-
goal: externalSeed.goal,
|
|
50
|
-
constraints: externalSeed.constraints,
|
|
51
|
-
acceptanceCriteria: externalSeed.acceptanceCriteria,
|
|
52
|
-
ontologySchema: externalSeed.ontologySchema,
|
|
53
|
-
gestaltAnalysis: externalSeed.gestaltAnalysis,
|
|
54
|
-
metadata: {
|
|
55
|
-
seedId: randomUUID(),
|
|
56
|
-
interviewSessionId: session.sessionId,
|
|
57
|
-
ambiguityScore: session.ambiguityScore?.overall ?? 1.0,
|
|
58
|
-
generatedAt: new Date().toISOString(),
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
// Validate against schema
|
|
62
|
-
const validation = seedSchema.safeParse(seed);
|
|
63
|
-
if (!validation.success) {
|
|
64
|
-
return err(new SeedGenerationError(`Seed validation failed: ${validation.error.message}`));
|
|
65
|
-
}
|
|
66
|
-
this.eventStore.append('seed', seed.metadata.seedId, EventType.SEED_SPEC_GENERATED, {
|
|
67
|
-
sessionId: session.sessionId,
|
|
68
|
-
goal: seed.goal,
|
|
69
|
-
constraintCount: seed.constraints.length,
|
|
70
|
-
criteriaCount: seed.acceptanceCriteria.length,
|
|
71
|
-
source: 'passthrough',
|
|
72
|
-
});
|
|
73
|
-
return ok(seed);
|
|
74
|
-
}
|
|
75
|
-
catch (e) {
|
|
76
|
-
return err(new SeedGenerationError(`Failed to validate seed: ${e instanceof Error ? e.message : String(e)}`));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=passthrough-generator.js.map
|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AC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC9C,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,GAAG,CACR,IAAI,mBAAmB,CACrB,2BAA2B,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CACtD,CACF,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,UAAU,CAAC,MAAM,CACpB,MAAM,EACN,IAAI,CAAC,QAAQ,CAAC,MAAM,EACpB,SAAS,CAAC,mBAAmB,EAC7B;gBACE,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM;gBACxC,aAAa,EAAE,IAAI,CAAC,kBAAkB,CAAC,MAAM;gBAC7C,MAAM,EAAE,aAAa;aACtB,CACF,CAAC;YAEF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,GAAG,CACR,IAAI,mBAAmB,CACrB,4BAA4B,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CACzE,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { GestaltPrinciple } from '../core/types.js';
|
|
3
|
-
export declare const seedSchema: z.ZodObject<{
|
|
4
|
-
version: z.ZodString;
|
|
5
|
-
goal: z.ZodString;
|
|
6
|
-
constraints: z.ZodArray<z.ZodString, "many">;
|
|
7
|
-
acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
|
|
8
|
-
ontologySchema: z.ZodObject<{
|
|
9
|
-
entities: z.ZodArray<z.ZodObject<{
|
|
10
|
-
name: z.ZodString;
|
|
11
|
-
description: z.ZodString;
|
|
12
|
-
attributes: z.ZodArray<z.ZodString, "many">;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
attributes: string[];
|
|
17
|
-
}, {
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
attributes: string[];
|
|
21
|
-
}>, "many">;
|
|
22
|
-
relations: z.ZodArray<z.ZodObject<{
|
|
23
|
-
from: z.ZodString;
|
|
24
|
-
to: z.ZodString;
|
|
25
|
-
type: z.ZodString;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
type: string;
|
|
28
|
-
from: string;
|
|
29
|
-
to: string;
|
|
30
|
-
}, {
|
|
31
|
-
type: string;
|
|
32
|
-
from: string;
|
|
33
|
-
to: string;
|
|
34
|
-
}>, "many">;
|
|
35
|
-
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
entities: {
|
|
37
|
-
name: string;
|
|
38
|
-
description: string;
|
|
39
|
-
attributes: string[];
|
|
40
|
-
}[];
|
|
41
|
-
relations: {
|
|
42
|
-
type: string;
|
|
43
|
-
from: string;
|
|
44
|
-
to: string;
|
|
45
|
-
}[];
|
|
46
|
-
}, {
|
|
47
|
-
entities: {
|
|
48
|
-
name: string;
|
|
49
|
-
description: string;
|
|
50
|
-
attributes: string[];
|
|
51
|
-
}[];
|
|
52
|
-
relations: {
|
|
53
|
-
type: string;
|
|
54
|
-
from: string;
|
|
55
|
-
to: string;
|
|
56
|
-
}[];
|
|
57
|
-
}>;
|
|
58
|
-
gestaltAnalysis: z.ZodArray<z.ZodObject<{
|
|
59
|
-
principle: z.ZodNativeEnum<typeof GestaltPrinciple>;
|
|
60
|
-
finding: z.ZodString;
|
|
61
|
-
confidence: z.ZodNumber;
|
|
62
|
-
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
principle: GestaltPrinciple;
|
|
64
|
-
finding: string;
|
|
65
|
-
confidence: number;
|
|
66
|
-
}, {
|
|
67
|
-
principle: GestaltPrinciple;
|
|
68
|
-
finding: string;
|
|
69
|
-
confidence: number;
|
|
70
|
-
}>, "many">;
|
|
71
|
-
metadata: z.ZodObject<{
|
|
72
|
-
seedId: z.ZodString;
|
|
73
|
-
interviewSessionId: z.ZodString;
|
|
74
|
-
ambiguityScore: z.ZodNumber;
|
|
75
|
-
generatedAt: z.ZodString;
|
|
76
|
-
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
seedId: string;
|
|
78
|
-
interviewSessionId: string;
|
|
79
|
-
ambiguityScore: number;
|
|
80
|
-
generatedAt: string;
|
|
81
|
-
}, {
|
|
82
|
-
seedId: string;
|
|
83
|
-
interviewSessionId: string;
|
|
84
|
-
ambiguityScore: number;
|
|
85
|
-
generatedAt: string;
|
|
86
|
-
}>;
|
|
87
|
-
}, "strip", z.ZodTypeAny, {
|
|
88
|
-
goal: string;
|
|
89
|
-
version: string;
|
|
90
|
-
constraints: string[];
|
|
91
|
-
acceptanceCriteria: string[];
|
|
92
|
-
ontologySchema: {
|
|
93
|
-
entities: {
|
|
94
|
-
name: string;
|
|
95
|
-
description: string;
|
|
96
|
-
attributes: string[];
|
|
97
|
-
}[];
|
|
98
|
-
relations: {
|
|
99
|
-
type: string;
|
|
100
|
-
from: string;
|
|
101
|
-
to: string;
|
|
102
|
-
}[];
|
|
103
|
-
};
|
|
104
|
-
gestaltAnalysis: {
|
|
105
|
-
principle: GestaltPrinciple;
|
|
106
|
-
finding: string;
|
|
107
|
-
confidence: number;
|
|
108
|
-
}[];
|
|
109
|
-
metadata: {
|
|
110
|
-
seedId: string;
|
|
111
|
-
interviewSessionId: string;
|
|
112
|
-
ambiguityScore: number;
|
|
113
|
-
generatedAt: string;
|
|
114
|
-
};
|
|
115
|
-
}, {
|
|
116
|
-
goal: string;
|
|
117
|
-
version: string;
|
|
118
|
-
constraints: string[];
|
|
119
|
-
acceptanceCriteria: string[];
|
|
120
|
-
ontologySchema: {
|
|
121
|
-
entities: {
|
|
122
|
-
name: string;
|
|
123
|
-
description: string;
|
|
124
|
-
attributes: string[];
|
|
125
|
-
}[];
|
|
126
|
-
relations: {
|
|
127
|
-
type: string;
|
|
128
|
-
from: string;
|
|
129
|
-
to: string;
|
|
130
|
-
}[];
|
|
131
|
-
};
|
|
132
|
-
gestaltAnalysis: {
|
|
133
|
-
principle: GestaltPrinciple;
|
|
134
|
-
finding: string;
|
|
135
|
-
confidence: number;
|
|
136
|
-
}[];
|
|
137
|
-
metadata: {
|
|
138
|
-
seedId: string;
|
|
139
|
-
interviewSessionId: string;
|
|
140
|
-
ambiguityScore: number;
|
|
141
|
-
generatedAt: string;
|
|
142
|
-
};
|
|
143
|
-
}>;
|
|
144
|
-
export type ValidatedSeed = z.infer<typeof seedSchema>;
|
|
145
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/seed/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgCpD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/src/seed/schema.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { GestaltPrinciple } from '../core/types.js';
|
|
3
|
-
const ontologyEntitySchema = z.object({
|
|
4
|
-
name: z.string().min(1),
|
|
5
|
-
description: z.string(),
|
|
6
|
-
attributes: z.array(z.string()),
|
|
7
|
-
});
|
|
8
|
-
const ontologyRelationSchema = z.object({
|
|
9
|
-
from: z.string().min(1),
|
|
10
|
-
to: z.string().min(1),
|
|
11
|
-
type: z.string().min(1),
|
|
12
|
-
});
|
|
13
|
-
const ontologySchemaSchema = z.object({
|
|
14
|
-
entities: z.array(ontologyEntitySchema),
|
|
15
|
-
relations: z.array(ontologyRelationSchema),
|
|
16
|
-
});
|
|
17
|
-
const gestaltAnalysisSchema = z.object({
|
|
18
|
-
principle: z.nativeEnum(GestaltPrinciple),
|
|
19
|
-
finding: z.string(),
|
|
20
|
-
confidence: z.number().min(0).max(1),
|
|
21
|
-
});
|
|
22
|
-
const seedMetadataSchema = z.object({
|
|
23
|
-
seedId: z.string(),
|
|
24
|
-
interviewSessionId: z.string(),
|
|
25
|
-
ambiguityScore: z.number().min(0).max(1),
|
|
26
|
-
generatedAt: z.string(),
|
|
27
|
-
});
|
|
28
|
-
export const seedSchema = z.object({
|
|
29
|
-
version: z.string(),
|
|
30
|
-
goal: z.string().min(1),
|
|
31
|
-
constraints: z.array(z.string()),
|
|
32
|
-
acceptanceCriteria: z.array(z.string()),
|
|
33
|
-
ontologySchema: ontologySchemaSchema,
|
|
34
|
-
gestaltAnalysis: z.array(gestaltAnalysisSchema),
|
|
35
|
-
metadata: seedMetadataSchema,
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/seed/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,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