solvdex 1.0.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 (113) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +274 -0
  3. package/dist/hooks/error-lookup.d.ts +4 -0
  4. package/dist/hooks/error-lookup.d.ts.map +1 -0
  5. package/dist/hooks/error-lookup.js +92 -0
  6. package/dist/hooks/error-lookup.js.map +1 -0
  7. package/dist/hooks/post-task.d.ts +15 -0
  8. package/dist/hooks/post-task.d.ts.map +1 -0
  9. package/dist/hooks/post-task.js +246 -0
  10. package/dist/hooks/post-task.js.map +1 -0
  11. package/dist/hooks/prompt-enrich.d.ts +16 -0
  12. package/dist/hooks/prompt-enrich.d.ts.map +1 -0
  13. package/dist/hooks/prompt-enrich.js +141 -0
  14. package/dist/hooks/prompt-enrich.js.map +1 -0
  15. package/dist/hooks/session-start-cli.d.ts +3 -0
  16. package/dist/hooks/session-start-cli.d.ts.map +1 -0
  17. package/dist/hooks/session-start-cli.js +81 -0
  18. package/dist/hooks/session-start-cli.js.map +1 -0
  19. package/dist/hooks/session-start.d.ts +4 -0
  20. package/dist/hooks/session-start.d.ts.map +1 -0
  21. package/dist/hooks/session-start.js +134 -0
  22. package/dist/hooks/session-start.js.map +1 -0
  23. package/dist/src/audit.d.ts +63 -0
  24. package/dist/src/audit.d.ts.map +1 -0
  25. package/dist/src/audit.js +229 -0
  26. package/dist/src/audit.js.map +1 -0
  27. package/dist/src/cache.d.ts +54 -0
  28. package/dist/src/cache.d.ts.map +1 -0
  29. package/dist/src/cache.js +167 -0
  30. package/dist/src/cache.js.map +1 -0
  31. package/dist/src/config.d.ts +52 -0
  32. package/dist/src/config.d.ts.map +1 -0
  33. package/dist/src/config.js +175 -0
  34. package/dist/src/config.js.map +1 -0
  35. package/dist/src/entry.d.ts +154 -0
  36. package/dist/src/entry.d.ts.map +1 -0
  37. package/dist/src/entry.js +469 -0
  38. package/dist/src/entry.js.map +1 -0
  39. package/dist/src/errors.d.ts +65 -0
  40. package/dist/src/errors.d.ts.map +1 -0
  41. package/dist/src/errors.js +121 -0
  42. package/dist/src/errors.js.map +1 -0
  43. package/dist/src/frontmatter.d.ts +28 -0
  44. package/dist/src/frontmatter.d.ts.map +1 -0
  45. package/dist/src/frontmatter.js +111 -0
  46. package/dist/src/frontmatter.js.map +1 -0
  47. package/dist/src/index.d.ts +35 -0
  48. package/dist/src/index.d.ts.map +1 -0
  49. package/dist/src/index.js +188 -0
  50. package/dist/src/index.js.map +1 -0
  51. package/dist/src/maturity.d.ts +31 -0
  52. package/dist/src/maturity.d.ts.map +1 -0
  53. package/dist/src/maturity.js +96 -0
  54. package/dist/src/maturity.js.map +1 -0
  55. package/dist/src/quality.d.ts +23 -0
  56. package/dist/src/quality.d.ts.map +1 -0
  57. package/dist/src/quality.js +236 -0
  58. package/dist/src/quality.js.map +1 -0
  59. package/dist/src/search.d.ts +35 -0
  60. package/dist/src/search.d.ts.map +1 -0
  61. package/dist/src/search.js +263 -0
  62. package/dist/src/search.js.map +1 -0
  63. package/dist/src/similarity.d.ts +42 -0
  64. package/dist/src/similarity.d.ts.map +1 -0
  65. package/dist/src/similarity.js +111 -0
  66. package/dist/src/similarity.js.map +1 -0
  67. package/dist/src/stats.d.ts +56 -0
  68. package/dist/src/stats.d.ts.map +1 -0
  69. package/dist/src/stats.js +198 -0
  70. package/dist/src/stats.js.map +1 -0
  71. package/dist/src/templates.d.ts +63 -0
  72. package/dist/src/templates.d.ts.map +1 -0
  73. package/dist/src/templates.js +347 -0
  74. package/dist/src/templates.js.map +1 -0
  75. package/dist/src/transfer.d.ts +92 -0
  76. package/dist/src/transfer.d.ts.map +1 -0
  77. package/dist/src/transfer.js +215 -0
  78. package/dist/src/transfer.js.map +1 -0
  79. package/dist/src/types.d.ts +270 -0
  80. package/dist/src/types.d.ts.map +1 -0
  81. package/dist/src/types.js +153 -0
  82. package/dist/src/types.js.map +1 -0
  83. package/dist/src/validate.d.ts +90 -0
  84. package/dist/src/validate.d.ts.map +1 -0
  85. package/dist/src/validate.js +295 -0
  86. package/dist/src/validate.js.map +1 -0
  87. package/hooks/error-lookup.ts +110 -0
  88. package/hooks/hooks.json +49 -0
  89. package/hooks/post-task.ts +309 -0
  90. package/hooks/prompt-enrich.ts +162 -0
  91. package/hooks/session-start-cli.ts +96 -0
  92. package/hooks/session-start.ts +159 -0
  93. package/package.json +40 -0
  94. package/scripts/error-lookup.py +64 -0
  95. package/scripts/post-task.py +60 -0
  96. package/scripts/prompt-enrich.py +64 -0
  97. package/scripts/session-start.py +64 -0
  98. package/skills/wiki/SKILL.md +61 -0
  99. package/skills/wiki-add/SKILL.md +90 -0
  100. package/skills/wiki-browse/SKILL.md +108 -0
  101. package/skills/wiki-capture/SKILL.md +265 -0
  102. package/skills/wiki-explorer/SKILL.md +223 -0
  103. package/skills/wiki-export/SKILL.md +101 -0
  104. package/skills/wiki-fix/SKILL.md +86 -0
  105. package/skills/wiki-flag/SKILL.md +47 -0
  106. package/skills/wiki-import/SKILL.md +128 -0
  107. package/skills/wiki-init/SKILL.md +72 -0
  108. package/skills/wiki-scan/SKILL.md +98 -0
  109. package/skills/wiki-search/SKILL.md +86 -0
  110. package/skills/wiki-stats/SKILL.md +129 -0
  111. package/skills/wiki-status/SKILL.md +78 -0
  112. package/skills/wiki-test-trigger/SKILL.md +173 -0
  113. package/skills/wiki-validate/SKILL.md +62 -0
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getDefaultConfidence = getDefaultConfidence;
40
+ exports.getDefaultConfig = getDefaultConfig;
41
+ exports.getWikiPath = getWikiPath;
42
+ exports.getConfigPath = getConfigPath;
43
+ exports.wikiExists = wikiExists;
44
+ exports.readConfig = readConfig;
45
+ exports.writeConfig = writeConfig;
46
+ exports.addCategory = addCategory;
47
+ // src/config.ts
48
+ const fs = __importStar(require("fs"));
49
+ const path = __importStar(require("path"));
50
+ const yaml_1 = __importDefault(require("yaml"));
51
+ const types_js_1 = require("./types.js");
52
+ const errors_js_1 = require("./errors.js");
53
+ const CONFIG_FILE = '.wiki-config.yaml';
54
+ /**
55
+ * Get the default confidence level for a category.
56
+ * Returns 80 (HIGH) for gotchas, 50 (MEDIUM) for everything else.
57
+ * @param category - The category name
58
+ * @returns The default confidence level (0-100) for that category
59
+ */
60
+ function getDefaultConfidence(category) {
61
+ return category === 'gotchas' ? types_js_1.CONFIDENCE.HIGH : types_js_1.CONFIDENCE.MEDIUM;
62
+ }
63
+ const WIKI_DIR = '.wiki';
64
+ /**
65
+ * Returns the default configuration for a new wiki project.
66
+ * @param projectName - The name of the project
67
+ * @returns Default WikiConfig with all standard settings
68
+ */
69
+ function getDefaultConfig(projectName) {
70
+ return {
71
+ version: 1,
72
+ project: projectName,
73
+ categories: [...types_js_1.DEFAULT_CATEGORIES],
74
+ auto_capture: {
75
+ enabled: true,
76
+ signals: [
77
+ 'error_resolved',
78
+ 'user_confirmation',
79
+ 'repeated_pattern',
80
+ 'explicit_save',
81
+ 'architecture_discussion',
82
+ 'long_debugging_session',
83
+ 'external_doc_reference',
84
+ 'config_change',
85
+ 'first_time_setup',
86
+ 'workaround_applied',
87
+ 'performance_fix'
88
+ ]
89
+ },
90
+ auto_lookup: {
91
+ on_task_start: true,
92
+ on_uncertainty: true,
93
+ on_error: true,
94
+ confidence_threshold: types_js_1.CONFIDENCE.MEDIUM
95
+ },
96
+ validation: {
97
+ auto_flag_broken_refs: true,
98
+ auto_flag_failed_solutions: true
99
+ }
100
+ };
101
+ }
102
+ /**
103
+ * Returns the path to the .wiki directory for a project.
104
+ * @param projectRoot - The root directory of the project
105
+ * @returns The path to the .wiki directory
106
+ */
107
+ function getWikiPath(projectRoot) {
108
+ return path.join(projectRoot, WIKI_DIR);
109
+ }
110
+ /**
111
+ * Returns the path to the wiki config file.
112
+ * @param projectRoot - The root directory of the project
113
+ * @returns The path to the .wiki-config.yaml file
114
+ */
115
+ function getConfigPath(projectRoot) {
116
+ return path.join(getWikiPath(projectRoot), CONFIG_FILE);
117
+ }
118
+ /**
119
+ * Checks if a wiki has been initialized for the project.
120
+ * @param projectRoot - The root directory of the project
121
+ * @returns True if the .wiki directory exists
122
+ */
123
+ function wikiExists(projectRoot) {
124
+ return fs.existsSync(getWikiPath(projectRoot));
125
+ }
126
+ /**
127
+ * Reads the wiki configuration from the project.
128
+ * @param projectRoot - The root directory of the project
129
+ * @returns The WikiConfig if it exists, or null if not
130
+ */
131
+ function readConfig(projectRoot) {
132
+ const configPath = getConfigPath(projectRoot);
133
+ if (!fs.existsSync(configPath)) {
134
+ return null;
135
+ }
136
+ const content = (0, errors_js_1.wrapFileOperation)('read', configPath, () => fs.readFileSync(configPath, 'utf-8'));
137
+ try {
138
+ return yaml_1.default.parse(content);
139
+ }
140
+ catch (error) {
141
+ throw new errors_js_1.ConfigError(`Failed to parse wiki config: ${error instanceof Error ? error.message : String(error)}`, configPath);
142
+ }
143
+ }
144
+ /**
145
+ * Writes the wiki configuration to the project.
146
+ * @param projectRoot - The root directory of the project
147
+ * @param config - The WikiConfig to write
148
+ */
149
+ function writeConfig(projectRoot, config) {
150
+ const configPath = getConfigPath(projectRoot);
151
+ const wikiPath = getWikiPath(projectRoot);
152
+ // Ensure .wiki directory exists before writing config
153
+ if (!fs.existsSync(wikiPath)) {
154
+ (0, errors_js_1.wrapFileOperation)('create', wikiPath, () => fs.mkdirSync(wikiPath, { recursive: true }));
155
+ }
156
+ const content = yaml_1.default.stringify(config);
157
+ (0, errors_js_1.wrapFileOperation)('write', configPath, () => fs.writeFileSync(configPath, content, 'utf-8'));
158
+ }
159
+ /**
160
+ * Adds a new category to the wiki configuration.
161
+ * @param projectRoot - The root directory of the project
162
+ * @param category - The category name to add
163
+ * @throws Error if the wiki is not initialized
164
+ */
165
+ function addCategory(projectRoot, category) {
166
+ const config = readConfig(projectRoot);
167
+ if (!config) {
168
+ throw new errors_js_1.ConfigError('Wiki not initialized', getConfigPath(projectRoot));
169
+ }
170
+ if (!config.categories.includes(category)) {
171
+ config.categories.push(category);
172
+ writeConfig(projectRoot, config);
173
+ }
174
+ }
175
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,oDAEC;AAQD,4CAgCC;AAOD,kCAEC;AAOD,sCAEC;AAOD,gCAEC;AAOD,gCAmBC;AAOD,kCAeC;AAQD,k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cAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACvC,IAAA,6BAAiB,EAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,CAC1C,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAC/C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,WAAmB,EAAE,QAAgB;IAC/D,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,uBAAW,CAAC,sBAAsB,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;AACH,CAAC"}
@@ -0,0 +1,154 @@
1
+ import { WikiEntry, EntryStatus } from './types.js';
2
+ import { QualityIssue } from './quality.js';
3
+ import { DuplicateCheckResult } from './similarity.js';
4
+ /**
5
+ * Options for creating a new wiki entry.
6
+ */
7
+ export interface CreateEntryOptions {
8
+ category: string;
9
+ title: string;
10
+ tags: string[];
11
+ content: Record<string, string>;
12
+ trigger?: string;
13
+ autoCapture?: boolean;
14
+ stub?: boolean;
15
+ source?: string;
16
+ confidence?: number;
17
+ context?: string;
18
+ skipDuplicateCheck?: boolean;
19
+ relatedEntries?: string[];
20
+ }
21
+ /**
22
+ * Options for updating an existing wiki entry.
23
+ */
24
+ export interface UpdateEntryOptions {
25
+ title?: string;
26
+ tags?: string[];
27
+ content?: string;
28
+ status?: EntryStatus;
29
+ confidence?: number;
30
+ trigger?: string;
31
+ }
32
+ /**
33
+ * Context for audit trail entries.
34
+ */
35
+ export interface AuditContext {
36
+ by: string;
37
+ reason?: string;
38
+ context?: string;
39
+ }
40
+ /**
41
+ * Options for filtering entries when listing.
42
+ */
43
+ export interface ListEntriesOptions {
44
+ category?: string;
45
+ status?: EntryStatus;
46
+ tags?: string[];
47
+ }
48
+ /**
49
+ * Converts a title to a URL-friendly slug.
50
+ *
51
+ * @param title - The title to convert
52
+ * @returns A lowercase, hyphenated slug
53
+ */
54
+ export declare function slugify(title: string): string;
55
+ /**
56
+ * Creates a new wiki entry.
57
+ *
58
+ * @param projectRoot - The root directory of the project
59
+ * @param options - Options for creating the entry
60
+ * @returns The created WikiEntry
61
+ * @throws Error if wiki is not initialized or category is invalid
62
+ */
63
+ export declare function createEntry(projectRoot: string, options: CreateEntryOptions): WikiEntry;
64
+ /**
65
+ * Reads an existing wiki entry.
66
+ *
67
+ * @param projectRoot - The root directory of the project
68
+ * @param entryPath - Relative path to the entry from the wiki directory
69
+ * @returns The WikiEntry if found, null otherwise
70
+ */
71
+ export declare function readEntry(projectRoot: string, entryPath: string): WikiEntry | null;
72
+ /**
73
+ * Updates an existing wiki entry.
74
+ *
75
+ * @param projectRoot - The root directory of the project
76
+ * @param entryPath - Relative path to the entry from the wiki directory
77
+ * @param updates - Fields to update
78
+ * @param auditContext - Context for the audit trail entry
79
+ * @returns The updated WikiEntry
80
+ * @throws Error if entry does not exist
81
+ */
82
+ export declare function updateEntry(projectRoot: string, entryPath: string, updates: UpdateEntryOptions, auditContext: AuditContext): WikiEntry;
83
+ /**
84
+ * Lists all wiki entries with optional filtering.
85
+ *
86
+ * @param projectRoot - The root directory of the project
87
+ * @param options - Optional filters for category, status, or tags
88
+ * @returns Array of WikiEntry objects matching the filters
89
+ */
90
+ export declare function listEntries(projectRoot: string, options?: ListEntriesOptions): Promise<WikiEntry[]>;
91
+ /**
92
+ * Deletes a wiki entry.
93
+ *
94
+ * @param projectRoot - The root directory of the project
95
+ * @param entryPath - Relative path to the entry from the wiki directory
96
+ * @returns True if the entry was deleted, false if it didn't exist
97
+ */
98
+ export declare function deleteEntry(projectRoot: string, entryPath: string): boolean;
99
+ /**
100
+ * Result of creating an entry with validation.
101
+ */
102
+ export interface CreateEntryResult {
103
+ entry: WikiEntry;
104
+ qualityIssues: QualityIssue[];
105
+ duplicateCheck?: DuplicateCheckResult;
106
+ }
107
+ /**
108
+ * Checks for duplicate entries before creating.
109
+ *
110
+ * @param projectRoot - The root directory of the project
111
+ * @param title - The title of the new entry
112
+ * @param tags - The tags of the new entry
113
+ * @param category - The category of the new entry
114
+ * @returns DuplicateCheckResult
115
+ */
116
+ export declare function checkDuplicate(projectRoot: string, title: string, tags: string[], category: string): Promise<DuplicateCheckResult>;
117
+ /**
118
+ * Records that an entry was used/accessed.
119
+ * Updates last_used timestamp, increments use_count, and checks for maturity promotion.
120
+ *
121
+ * @param projectRoot - The root directory of the project
122
+ * @param entryPath - Relative path to the entry
123
+ * @returns Updated WikiEntry
124
+ */
125
+ export declare function recordEntryUsage(projectRoot: string, entryPath: string): WikiEntry | null;
126
+ /**
127
+ * Finds and returns related entries for a given entry.
128
+ *
129
+ * @param projectRoot - The root directory of the project
130
+ * @param entryPath - Relative path to the entry
131
+ * @param maxResults - Maximum number of related entries
132
+ * @returns Array of related entry paths
133
+ */
134
+ export declare function getRelatedEntries(projectRoot: string, entryPath: string, maxResults?: number): Promise<string[]>;
135
+ /**
136
+ * Updates the related_entries field for an entry.
137
+ *
138
+ * @param projectRoot - The root directory of the project
139
+ * @param entryPath - Relative path to the entry
140
+ * @param relatedPaths - Array of related entry paths
141
+ */
142
+ export declare function setRelatedEntries(projectRoot: string, entryPath: string, _relatedPaths: string[]): WikiEntry;
143
+ /**
144
+ * Creates a new wiki entry and validates its quality.
145
+ * This is a convenience wrapper around createEntry that also runs quality checks.
146
+ * Optionally checks for duplicates before creating.
147
+ *
148
+ * @param projectRoot - The root directory of the project
149
+ * @param options - Options for creating the entry
150
+ * @returns The created WikiEntry, quality issues, and duplicate check result
151
+ * @throws Error if wiki is not initialized
152
+ */
153
+ export declare function createEntryWithValidation(projectRoot: string, options: CreateEntryOptions): Promise<CreateEntryResult>;
154
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/entry.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EAGT,WAAW,EACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAwB,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAqB,oBAAoB,EAAsB,MAAM,iBAAiB,CAAC;AAa9F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,C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