@vfarcic/dot-ai 0.116.0 → 0.117.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.
Files changed (129) hide show
  1. package/README.md +21 -18
  2. package/dist/core/ai-provider-factory.d.ts +4 -2
  3. package/dist/core/ai-provider-factory.d.ts.map +1 -1
  4. package/dist/core/ai-provider-factory.js +17 -6
  5. package/dist/core/capability-operations.js +1 -1
  6. package/dist/core/generic-session-manager.d.ts +67 -0
  7. package/dist/core/generic-session-manager.d.ts.map +1 -0
  8. package/dist/core/generic-session-manager.js +192 -0
  9. package/dist/core/pattern-operations.js +1 -1
  10. package/dist/core/providers/noop-provider.d.ts +47 -0
  11. package/dist/core/providers/noop-provider.d.ts.map +1 -0
  12. package/dist/core/providers/noop-provider.js +63 -0
  13. package/dist/core/schema.d.ts.map +1 -1
  14. package/dist/core/schema.js +13 -13
  15. package/dist/core/session-utils.d.ts +3 -6
  16. package/dist/core/session-utils.d.ts.map +1 -1
  17. package/dist/core/session-utils.js +5 -13
  18. package/dist/core/shared-prompt-loader.d.ts +15 -3
  19. package/dist/core/shared-prompt-loader.d.ts.map +1 -1
  20. package/dist/core/shared-prompt-loader.js +67 -14
  21. package/dist/core/unified-creation-session.d.ts +3 -10
  22. package/dist/core/unified-creation-session.d.ts.map +1 -1
  23. package/dist/core/unified-creation-session.js +34 -75
  24. package/dist/core/unified-creation-types.d.ts +31 -22
  25. package/dist/core/unified-creation-types.d.ts.map +1 -1
  26. package/dist/interfaces/mcp.d.ts.map +1 -1
  27. package/dist/interfaces/mcp.js +9 -34
  28. package/dist/tools/answer-question.d.ts.map +1 -1
  29. package/dist/tools/answer-question.js +12 -12
  30. package/dist/tools/choose-solution.js +1 -1
  31. package/dist/tools/generate-manifests.d.ts.map +1 -1
  32. package/dist/tools/generate-manifests.js +9 -10
  33. package/dist/tools/index.d.ts +1 -1
  34. package/dist/tools/index.d.ts.map +1 -1
  35. package/dist/tools/index.js +6 -6
  36. package/dist/tools/organizational-data.js +12 -12
  37. package/dist/tools/project-setup/discovery.d.ts +15 -0
  38. package/dist/tools/project-setup/discovery.d.ts.map +1 -0
  39. package/dist/tools/project-setup/discovery.js +104 -0
  40. package/dist/tools/project-setup/generate-scope.d.ts +15 -0
  41. package/dist/tools/project-setup/generate-scope.d.ts.map +1 -0
  42. package/dist/tools/project-setup/generate-scope.js +237 -0
  43. package/dist/tools/project-setup/report-scan.d.ts +15 -0
  44. package/dist/tools/project-setup/report-scan.d.ts.map +1 -0
  45. package/dist/tools/project-setup/report-scan.js +156 -0
  46. package/dist/tools/project-setup/types.d.ts +111 -0
  47. package/dist/tools/project-setup/types.d.ts.map +1 -0
  48. package/dist/tools/project-setup/types.js +8 -0
  49. package/dist/tools/project-setup.d.ts +28 -0
  50. package/dist/tools/project-setup.d.ts.map +1 -0
  51. package/dist/tools/project-setup.js +134 -0
  52. package/dist/tools/recommend.js +1 -1
  53. package/dist/tools/remediate.js +1 -1
  54. package/dist/tools/version.d.ts +0 -7
  55. package/dist/tools/version.d.ts.map +1 -1
  56. package/dist/tools/version.js +5 -34
  57. package/package.json +4 -2
  58. package/prompts/capability-inference.md +2 -2
  59. package/prompts/infrastructure-trigger-expansion.md +2 -2
  60. package/prompts/intent-analysis.md +2 -2
  61. package/prompts/kyverno-generation.md +14 -14
  62. package/prompts/manifest-generation.md +5 -5
  63. package/prompts/map-intent-to-operation.md +2 -2
  64. package/prompts/pattern-complete-error.md +1 -1
  65. package/prompts/pattern-complete-success.md +4 -4
  66. package/prompts/pattern-rationale.md +1 -1
  67. package/prompts/pattern-resources.md +1 -1
  68. package/prompts/pattern-review.md +5 -5
  69. package/prompts/policy-complete-apply.md +4 -4
  70. package/prompts/policy-complete-discard.md +1 -1
  71. package/prompts/policy-complete-error.md +1 -1
  72. package/prompts/policy-complete-save.md +4 -4
  73. package/prompts/policy-complete-success.md +4 -4
  74. package/prompts/policy-namespace-scope.md +1 -1
  75. package/prompts/question-generation.md +5 -5
  76. package/prompts/resource-analysis.md +3 -3
  77. package/prompts/resource-selection.md +3 -3
  78. package/prompts/solution-enhancement.md +4 -4
  79. package/scripts/anthropic.nu +9 -13
  80. package/scripts/common.nu +31 -33
  81. package/scripts/ingress.nu +5 -4
  82. package/scripts/kubernetes.nu +38 -53
  83. package/dist/core/doc-discovery.d.ts +0 -38
  84. package/dist/core/doc-discovery.d.ts.map +0 -1
  85. package/dist/core/doc-discovery.js +0 -231
  86. package/dist/core/doc-testing-session.d.ts +0 -109
  87. package/dist/core/doc-testing-session.d.ts.map +0 -1
  88. package/dist/core/doc-testing-session.js +0 -696
  89. package/dist/core/doc-testing-types.d.ts +0 -127
  90. package/dist/core/doc-testing-types.d.ts.map +0 -1
  91. package/dist/core/doc-testing-types.js +0 -53
  92. package/dist/core/nushell-runtime.d.ts +0 -39
  93. package/dist/core/nushell-runtime.d.ts.map +0 -1
  94. package/dist/core/nushell-runtime.js +0 -103
  95. package/dist/core/platform-operations.d.ts +0 -70
  96. package/dist/core/platform-operations.d.ts.map +0 -1
  97. package/dist/core/platform-operations.js +0 -294
  98. package/dist/tools/build-platform.d.ts +0 -25
  99. package/dist/tools/build-platform.d.ts.map +0 -1
  100. package/dist/tools/build-platform.js +0 -277
  101. package/dist/tools/test-docs.d.ts +0 -22
  102. package/dist/tools/test-docs.d.ts.map +0 -1
  103. package/dist/tools/test-docs.js +0 -351
  104. package/prompts/doc-testing-done.md +0 -51
  105. package/prompts/doc-testing-fix.md +0 -120
  106. package/prompts/doc-testing-scan.md +0 -140
  107. package/prompts/doc-testing-test-section.md +0 -169
  108. package/prompts/platform-operations-parse-script-help.md +0 -68
  109. package/scripts/ack.nu +0 -195
  110. package/scripts/argo-workflows.nu +0 -47
  111. package/scripts/argocd.nu +0 -85
  112. package/scripts/aso.nu +0 -74
  113. package/scripts/backstage.nu +0 -349
  114. package/scripts/cert-manager.nu +0 -13
  115. package/scripts/cnpg.nu +0 -14
  116. package/scripts/dot.nu +0 -32
  117. package/scripts/external-secrets.nu +0 -110
  118. package/scripts/gatekeeper.nu +0 -19
  119. package/scripts/github.nu +0 -42
  120. package/scripts/image.nu +0 -67
  121. package/scripts/kro.nu +0 -11
  122. package/scripts/kubevela.nu +0 -22
  123. package/scripts/port.nu +0 -71
  124. package/scripts/prometheus.nu +0 -21
  125. package/scripts/registry.nu +0 -55
  126. package/scripts/storage.nu +0 -210
  127. package/scripts/tests.nu +0 -12
  128. package/scripts/velero.nu +0 -45
  129. package/shared-prompts/validate-docs.md +0 -22
@@ -1,127 +0,0 @@
1
- /**
2
- * Documentation Testing Types
3
- *
4
- * Flexible TypeScript interfaces for the documentation testing system.
5
- * Designed to let AI agents dynamically identify and categorize testable content.
6
- */
7
- /**
8
- * Main session object that tracks a documentation validation workflow
9
- */
10
- export interface ValidationSession {
11
- sessionId: string;
12
- filePath: string;
13
- startTime: string;
14
- currentPhase: ValidationPhase;
15
- status: SessionStatus;
16
- metadata: SessionMetadata;
17
- sections?: DocumentSection[];
18
- sectionResults?: Record<string, SectionTestResult>;
19
- }
20
- /**
21
- * Session metadata with counters and summary information
22
- */
23
- export interface SessionMetadata {
24
- totalSections: number;
25
- completedSections: number;
26
- sectionStatus: Record<string, SectionStatus>;
27
- nextItemId: number;
28
- sessionDir: string;
29
- lastUpdated: string;
30
- }
31
- /**
32
- * The five phases of documentation validation workflow
33
- */
34
- export declare enum ValidationPhase {
35
- SCAN = "scan",// Find all testable items in the documentation
36
- TEST = "test",// Execute tests on the found items
37
- ANALYZE = "analyze",// Analyze results and categorize issues
38
- FIX = "fix",// Generate fixes for identified problems
39
- DONE = "done"
40
- }
41
- /**
42
- * Overall status of a validation session
43
- */
44
- export declare enum SessionStatus {
45
- ACTIVE = "active",// Session is currently being worked on
46
- COMPLETED = "completed",// All phases completed successfully
47
- FAILED = "failed",// Session failed due to errors
48
- PAUSED = "paused"
49
- }
50
- /**
51
- * Status of a document section during validation
52
- */
53
- export declare enum SectionStatus {
54
- PENDING = "pending",// Section not yet processed
55
- SCANNING = "scanning",// Currently identifying testable items
56
- TESTING = "testing",// Currently executing validation items
57
- ANALYZING = "analyzing",// Currently analyzing test results
58
- FIXING = "fixing",// Currently generating fixes
59
- COMPLETED = "completed",// Section validation completed successfully
60
- FAILED = "failed"
61
- }
62
- /**
63
- * Logical section of a document for validation
64
- */
65
- export interface DocumentSection {
66
- id: string;
67
- title: string;
68
- }
69
- /**
70
- * Individual issue or recommendation with tracking
71
- */
72
- export interface FixableItem {
73
- id: number;
74
- text: string;
75
- status: 'pending' | 'fixed' | 'deferred' | 'failed';
76
- explanation?: string;
77
- }
78
- /**
79
- * Structured test results for a section (JSON format from client agent)
80
- *
81
- * Note: Format was consolidated in PRD #34 - issues now contain both problems and solutions
82
- * in format "[Location]: [Problem]. Fix: [Solution]"
83
- */
84
- export interface SectionTestResult {
85
- whatWasDone: string;
86
- issues: FixableItem[];
87
- }
88
- /**
89
- * Workflow step returned by MCP interface to guide AI agents
90
- */
91
- export interface WorkflowStep {
92
- sessionId: string;
93
- phase: ValidationPhase;
94
- prompt: string;
95
- nextPhase?: ValidationPhase;
96
- nextAction?: string;
97
- instruction?: string;
98
- agentInstructions?: string;
99
- workflow: {
100
- completed: ValidationPhase[];
101
- current: ValidationPhase;
102
- remaining: ValidationPhase[];
103
- };
104
- data?: any;
105
- }
106
- /**
107
- * Phase-specific result tracking
108
- */
109
- export interface PhaseResult {
110
- phase: ValidationPhase;
111
- startTime: string;
112
- endTime?: string;
113
- status: PhaseStatus;
114
- summary: string;
115
- nextPhase?: ValidationPhase;
116
- aiInsights?: string;
117
- }
118
- /**
119
- * Status of a validation phase
120
- */
121
- export declare enum PhaseStatus {
122
- PENDING = "pending",
123
- IN_PROGRESS = "in_progress",
124
- COMPLETED = "completed",
125
- FAILED = "failed"
126
- }
127
- //# sourceMappingURL=doc-testing-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doc-testing-types.d.ts","sourceRoot":"","sources":["../../src/core/doc-testing-types.ts"],"names":[],"mappings":"AAAA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 -1,53 +0,0 @@
1
- "use strict";
2
- /**
3
- * Documentation Testing Types
4
- *
5
- * Flexible TypeScript interfaces for the documentation testing system.
6
- * Designed to let AI agents dynamically identify and categorize testable content.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.PhaseStatus = exports.SectionStatus = exports.SessionStatus = exports.ValidationPhase = void 0;
10
- /**
11
- * The five phases of documentation validation workflow
12
- */
13
- var ValidationPhase;
14
- (function (ValidationPhase) {
15
- ValidationPhase["SCAN"] = "scan";
16
- ValidationPhase["TEST"] = "test";
17
- ValidationPhase["ANALYZE"] = "analyze";
18
- ValidationPhase["FIX"] = "fix";
19
- ValidationPhase["DONE"] = "done"; // Mark session as completed
20
- })(ValidationPhase || (exports.ValidationPhase = ValidationPhase = {}));
21
- /**
22
- * Overall status of a validation session
23
- */
24
- var SessionStatus;
25
- (function (SessionStatus) {
26
- SessionStatus["ACTIVE"] = "active";
27
- SessionStatus["COMPLETED"] = "completed";
28
- SessionStatus["FAILED"] = "failed";
29
- SessionStatus["PAUSED"] = "paused"; // Session temporarily paused
30
- })(SessionStatus || (exports.SessionStatus = SessionStatus = {}));
31
- /**
32
- * Status of a document section during validation
33
- */
34
- var SectionStatus;
35
- (function (SectionStatus) {
36
- SectionStatus["PENDING"] = "pending";
37
- SectionStatus["SCANNING"] = "scanning";
38
- SectionStatus["TESTING"] = "testing";
39
- SectionStatus["ANALYZING"] = "analyzing";
40
- SectionStatus["FIXING"] = "fixing";
41
- SectionStatus["COMPLETED"] = "completed";
42
- SectionStatus["FAILED"] = "failed"; // Section validation failed
43
- })(SectionStatus || (exports.SectionStatus = SectionStatus = {}));
44
- /**
45
- * Status of a validation phase
46
- */
47
- var PhaseStatus;
48
- (function (PhaseStatus) {
49
- PhaseStatus["PENDING"] = "pending";
50
- PhaseStatus["IN_PROGRESS"] = "in_progress";
51
- PhaseStatus["COMPLETED"] = "completed";
52
- PhaseStatus["FAILED"] = "failed";
53
- })(PhaseStatus || (exports.PhaseStatus = PhaseStatus = {}));
@@ -1,39 +0,0 @@
1
- /**
2
- * Nushell Runtime Checker
3
- *
4
- * Detects Nushell installation and provides installation guidance.
5
- */
6
- export interface NushellVersionInfo {
7
- installed: boolean;
8
- version: string | null;
9
- error?: string;
10
- }
11
- export declare class NushellRuntime {
12
- /**
13
- * Check if Nushell is installed on the system
14
- */
15
- checkInstalled(): Promise<boolean>;
16
- /**
17
- * Get the installed Nushell version
18
- * Returns null if Nushell is not installed
19
- */
20
- getVersion(): Promise<string | null>;
21
- /**
22
- * Get comprehensive version information
23
- */
24
- getVersionInfo(): Promise<NushellVersionInfo>;
25
- /**
26
- * Get the official installation documentation URL
27
- */
28
- getInstallationUrl(): string;
29
- /**
30
- * Validate Nushell installation and return detailed status
31
- */
32
- validateRuntime(): Promise<{
33
- ready: boolean;
34
- message: string;
35
- versionInfo?: NushellVersionInfo;
36
- installationUrl?: string;
37
- }>;
38
- }
39
- //# sourceMappingURL=nushell-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nushell-runtime.d.ts","sourceRoot":"","sources":["../../src/core/nushell-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,qBAAa,cAAc;IACzB;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IASxC;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAW1C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA2BnD;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC;QAC/B,KAAK,EAAE,OAAO,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,kBAAkB,CAAC;QACjC,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CA2BH"}
@@ -1,103 +0,0 @@
1
- "use strict";
2
- /**
3
- * Nushell Runtime Checker
4
- *
5
- * Detects Nushell installation and provides installation guidance.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.NushellRuntime = void 0;
9
- const child_process_1 = require("child_process");
10
- const util_1 = require("util");
11
- const execAsync = (0, util_1.promisify)(child_process_1.exec);
12
- /**
13
- * Official Nushell installation documentation
14
- */
15
- const INSTALL_URL = 'https://www.nushell.sh/book/installation.html';
16
- class NushellRuntime {
17
- /**
18
- * Check if Nushell is installed on the system
19
- */
20
- async checkInstalled() {
21
- try {
22
- await execAsync('nu --version');
23
- return true;
24
- }
25
- catch (error) {
26
- return false;
27
- }
28
- }
29
- /**
30
- * Get the installed Nushell version
31
- * Returns null if Nushell is not installed
32
- */
33
- async getVersion() {
34
- try {
35
- const { stdout } = await execAsync('nu --version');
36
- // Parse version from output like "0.95.0" or "nushell 0.95.0"
37
- const versionMatch = stdout.trim().match(/(\d+\.\d+\.\d+)/);
38
- return versionMatch ? versionMatch[1] : null;
39
- }
40
- catch (error) {
41
- return null;
42
- }
43
- }
44
- /**
45
- * Get comprehensive version information
46
- */
47
- async getVersionInfo() {
48
- const installed = await this.checkInstalled();
49
- if (!installed) {
50
- return {
51
- installed: false,
52
- version: null,
53
- error: 'Nushell is not installed'
54
- };
55
- }
56
- const version = await this.getVersion();
57
- if (!version) {
58
- return {
59
- installed: true,
60
- version: null,
61
- error: 'Unable to determine Nushell version'
62
- };
63
- }
64
- return {
65
- installed: true,
66
- version
67
- };
68
- }
69
- /**
70
- * Get the official installation documentation URL
71
- */
72
- getInstallationUrl() {
73
- return INSTALL_URL;
74
- }
75
- /**
76
- * Validate Nushell installation and return detailed status
77
- */
78
- async validateRuntime() {
79
- const versionInfo = await this.getVersionInfo();
80
- if (!versionInfo.installed) {
81
- return {
82
- ready: false,
83
- message: `Nushell is not installed. Please install Nushell from: ${INSTALL_URL}`,
84
- versionInfo,
85
- installationUrl: INSTALL_URL
86
- };
87
- }
88
- if (!versionInfo.version) {
89
- return {
90
- ready: false,
91
- message: `Unable to determine Nushell version. Please ensure Nushell is properly installed from: ${INSTALL_URL}`,
92
- versionInfo,
93
- installationUrl: INSTALL_URL
94
- };
95
- }
96
- return {
97
- ready: true,
98
- message: `Nushell ${versionInfo.version} is ready`,
99
- versionInfo
100
- };
101
- }
102
- }
103
- exports.NushellRuntime = NushellRuntime;
@@ -1,70 +0,0 @@
1
- /**
2
- * Platform Operations Discovery
3
- *
4
- * Orchestrates tool-based discovery and mapping of Nu shell script operations.
5
- * All data fetching logic lives in tools, this module handles orchestration.
6
- */
7
- import { AIProvider } from './ai-provider.interface';
8
- import { Logger } from './error-handling';
9
- export { Operation, OperationCommand } from '../tools/platform/discover-operations.tool';
10
- import { Operation } from '../tools/platform/discover-operations.tool';
11
- export interface MatchedOperation {
12
- tool: string;
13
- operation: string;
14
- command: string[];
15
- description: string;
16
- }
17
- export interface IntentMapping {
18
- matched: boolean;
19
- operation?: MatchedOperation;
20
- reason?: string;
21
- }
22
- export interface ParameterMetadata {
23
- name: string;
24
- type: 'string' | 'number' | 'boolean' | 'choice';
25
- required: boolean;
26
- description: string;
27
- default?: any;
28
- choices?: string[];
29
- }
30
- export interface PlatformSession {
31
- sessionId: string;
32
- intent: string;
33
- matchedOperation: MatchedOperation;
34
- parameters: ParameterMetadata[];
35
- answers: Record<string, any>;
36
- currentStep: 'collectParameters' | 'confirm' | 'execute' | 'complete';
37
- createdAt: string;
38
- updatedAt: string;
39
- }
40
- /**
41
- * Discover available operations from Nu shell scripts
42
- * Uses tool for data fetching and prompt injection for AI parsing
43
- */
44
- export declare function discoverOperations(aiProvider: AIProvider, logger: Logger): Promise<Operation[]>;
45
- /**
46
- * Map user intent to a specific operation using AI
47
- */
48
- export declare function mapIntentToOperation(intent: string, operations: Operation[], aiProvider: AIProvider, logger: Logger): Promise<IntentMapping>;
49
- /**
50
- * Get parameters for a specific operation using Nushell's structured JSON output
51
- */
52
- export declare function getOperationParameters(command: string[], logger: Logger): Promise<ParameterMetadata[]>;
53
- /**
54
- * Create and persist a platform session
55
- */
56
- export declare function createSession(sessionId: string, intent: string, matchedOperation: MatchedOperation, parameters: ParameterMetadata[], logger: Logger): Promise<PlatformSession>;
57
- /**
58
- * Load a platform session from file
59
- */
60
- export declare function loadSession(sessionId: string, logger: Logger): PlatformSession | null;
61
- /**
62
- * Execute a platform operation with collected parameters
63
- */
64
- export declare function executeOperation(session: PlatformSession, answers: Record<string, any>, logger: Logger): Promise<{
65
- success: boolean;
66
- message?: string;
67
- error?: string;
68
- missingParameters?: string[];
69
- }>;
70
- //# sourceMappingURL=platform-operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform-operations.d.ts","sourceRoot":"","sources":["../../src/core/platform-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM1C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAGzF,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC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