@neurcode-ai/cli 0.9.65 → 0.10.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 (260) hide show
  1. package/dist/commands/bootstrap-policy.d.ts +29 -0
  2. package/dist/commands/bootstrap-policy.d.ts.map +1 -0
  3. package/dist/commands/bootstrap-policy.js +334 -0
  4. package/dist/commands/bootstrap-policy.js.map +1 -0
  5. package/dist/commands/doctor.d.ts.map +1 -1
  6. package/dist/commands/doctor.js +82 -0
  7. package/dist/commands/doctor.js.map +1 -1
  8. package/dist/commands/governance.d.ts +3 -0
  9. package/dist/commands/governance.d.ts.map +1 -0
  10. package/dist/commands/governance.js +390 -0
  11. package/dist/commands/governance.js.map +1 -0
  12. package/dist/commands/quickstart.d.ts +21 -0
  13. package/dist/commands/quickstart.d.ts.map +1 -0
  14. package/dist/commands/quickstart.js +178 -0
  15. package/dist/commands/quickstart.js.map +1 -0
  16. package/dist/commands/remediate-export.d.ts +36 -0
  17. package/dist/commands/remediate-export.d.ts.map +1 -0
  18. package/dist/commands/remediate-export.js +1072 -0
  19. package/dist/commands/remediate-export.js.map +1 -0
  20. package/dist/commands/replay.d.ts.map +1 -1
  21. package/dist/commands/replay.js +14 -0
  22. package/dist/commands/replay.js.map +1 -1
  23. package/dist/commands/session.d.ts +7 -0
  24. package/dist/commands/session.d.ts.map +1 -1
  25. package/dist/commands/session.js +156 -0
  26. package/dist/commands/session.js.map +1 -1
  27. package/dist/commands/start-intent.d.ts.map +1 -1
  28. package/dist/commands/start-intent.js +61 -11
  29. package/dist/commands/start-intent.js.map +1 -1
  30. package/dist/commands/verify-guidance.d.ts +5 -0
  31. package/dist/commands/verify-guidance.d.ts.map +1 -0
  32. package/dist/commands/verify-guidance.js +49 -0
  33. package/dist/commands/verify-guidance.js.map +1 -0
  34. package/dist/commands/verify-output.d.ts +37 -0
  35. package/dist/commands/verify-output.d.ts.map +1 -0
  36. package/dist/commands/verify-output.js +572 -0
  37. package/dist/commands/verify-output.js.map +1 -0
  38. package/dist/commands/verify-render.d.ts +41 -0
  39. package/dist/commands/verify-render.d.ts.map +1 -0
  40. package/dist/commands/verify-render.js +457 -0
  41. package/dist/commands/verify-render.js.map +1 -0
  42. package/dist/commands/verify.d.ts.map +1 -1
  43. package/dist/commands/verify.js +384 -1091
  44. package/dist/commands/verify.js.map +1 -1
  45. package/dist/commands/workspace.d.ts.map +1 -1
  46. package/dist/commands/workspace.js +3 -14
  47. package/dist/commands/workspace.js.map +1 -1
  48. package/dist/context-engine/graph.d.ts.map +1 -1
  49. package/dist/context-engine/graph.js +69 -7
  50. package/dist/context-engine/graph.js.map +1 -1
  51. package/dist/context-engine/scanner.d.ts.map +1 -1
  52. package/dist/context-engine/scanner.js +9 -2
  53. package/dist/context-engine/scanner.js.map +1 -1
  54. package/dist/daemon/compatibility/execution.d.ts +42 -0
  55. package/dist/daemon/compatibility/execution.d.ts.map +1 -0
  56. package/dist/daemon/compatibility/execution.js +183 -0
  57. package/dist/daemon/compatibility/execution.js.map +1 -0
  58. package/dist/daemon/compatibility/mutation.d.ts +24 -0
  59. package/dist/daemon/compatibility/mutation.d.ts.map +1 -0
  60. package/dist/daemon/compatibility/mutation.js +724 -0
  61. package/dist/daemon/compatibility/mutation.js.map +1 -0
  62. package/dist/daemon/routes.d.ts +19 -0
  63. package/dist/daemon/routes.d.ts.map +1 -0
  64. package/dist/daemon/routes.js +123 -0
  65. package/dist/daemon/routes.js.map +1 -0
  66. package/dist/daemon/runtime/execution-bus.d.ts +217 -0
  67. package/dist/daemon/runtime/execution-bus.d.ts.map +1 -0
  68. package/dist/daemon/runtime/execution-bus.js +1420 -0
  69. package/dist/daemon/runtime/execution-bus.js.map +1 -0
  70. package/dist/daemon/runtime/workspace-runtime.d.ts +280 -0
  71. package/dist/daemon/runtime/workspace-runtime.d.ts.map +1 -0
  72. package/dist/daemon/runtime/workspace-runtime.js +1473 -0
  73. package/dist/daemon/runtime/workspace-runtime.js.map +1 -0
  74. package/dist/daemon/server.d.ts.map +1 -1
  75. package/dist/daemon/server.js +171 -874
  76. package/dist/daemon/server.js.map +1 -1
  77. package/dist/daemon/shaping.d.ts +11 -0
  78. package/dist/daemon/shaping.d.ts.map +1 -0
  79. package/dist/daemon/shaping.js +240 -0
  80. package/dist/daemon/shaping.js.map +1 -0
  81. package/dist/governance/canonical-invariants.d.ts +88 -0
  82. package/dist/governance/canonical-invariants.d.ts.map +1 -0
  83. package/dist/governance/canonical-invariants.js +197 -0
  84. package/dist/governance/canonical-invariants.js.map +1 -0
  85. package/dist/governance/canonical-ordering.d.ts +76 -0
  86. package/dist/governance/canonical-ordering.d.ts.map +1 -0
  87. package/dist/governance/canonical-ordering.js +189 -0
  88. package/dist/governance/canonical-ordering.js.map +1 -0
  89. package/dist/governance/canonical-pipeline.d.ts +9 -1
  90. package/dist/governance/canonical-pipeline.d.ts.map +1 -1
  91. package/dist/governance/canonical-pipeline.js +367 -24
  92. package/dist/governance/canonical-pipeline.js.map +1 -1
  93. package/dist/governance/diff-line-provenance.d.ts +59 -0
  94. package/dist/governance/diff-line-provenance.d.ts.map +1 -0
  95. package/dist/governance/diff-line-provenance.js +118 -0
  96. package/dist/governance/diff-line-provenance.js.map +1 -0
  97. package/dist/governance/pilot-readiness.d.ts +34 -0
  98. package/dist/governance/pilot-readiness.d.ts.map +1 -0
  99. package/dist/governance/pilot-readiness.js +226 -0
  100. package/dist/governance/pilot-readiness.js.map +1 -0
  101. package/dist/governance/policy-parity-validator.d.ts +62 -0
  102. package/dist/governance/policy-parity-validator.d.ts.map +1 -0
  103. package/dist/governance/policy-parity-validator.js +137 -0
  104. package/dist/governance/policy-parity-validator.js.map +1 -0
  105. package/dist/governance/remediation-boundary.d.ts +55 -0
  106. package/dist/governance/remediation-boundary.d.ts.map +1 -0
  107. package/dist/governance/remediation-boundary.js +120 -0
  108. package/dist/governance/remediation-boundary.js.map +1 -0
  109. package/dist/governance/structural-cache.d.ts +103 -0
  110. package/dist/governance/structural-cache.d.ts.map +1 -0
  111. package/dist/governance/structural-cache.js +235 -0
  112. package/dist/governance/structural-cache.js.map +1 -0
  113. package/dist/governance/structural-on-diff.d.ts +22 -2
  114. package/dist/governance/structural-on-diff.d.ts.map +1 -1
  115. package/dist/governance/structural-on-diff.js +36 -4
  116. package/dist/governance/structural-on-diff.js.map +1 -1
  117. package/dist/governance/structural-policy-merge.d.ts +8 -0
  118. package/dist/governance/structural-policy-merge.d.ts.map +1 -1
  119. package/dist/governance/structural-policy-merge.js +7 -0
  120. package/dist/governance/structural-policy-merge.js.map +1 -1
  121. package/dist/governance/verify-runtime-guard.d.ts +99 -0
  122. package/dist/governance/verify-runtime-guard.d.ts.map +1 -0
  123. package/dist/governance/verify-runtime-guard.js +129 -0
  124. package/dist/governance/verify-runtime-guard.js.map +1 -0
  125. package/dist/index.js +277 -77
  126. package/dist/index.js.map +1 -1
  127. package/dist/intent-engine/repo-classifier.d.ts +64 -0
  128. package/dist/intent-engine/repo-classifier.d.ts.map +1 -0
  129. package/dist/intent-engine/repo-classifier.js +178 -0
  130. package/dist/intent-engine/repo-classifier.js.map +1 -0
  131. package/dist/structural-rules/index.d.ts +4 -0
  132. package/dist/structural-rules/index.d.ts.map +1 -1
  133. package/dist/structural-rules/index.js +18 -1
  134. package/dist/structural-rules/index.js.map +1 -1
  135. package/dist/structural-rules/python/PY003-broad-except-clause.d.ts +21 -0
  136. package/dist/structural-rules/python/PY003-broad-except-clause.d.ts.map +1 -1
  137. package/dist/structural-rules/python/PY003-broad-except-clause.js +212 -21
  138. package/dist/structural-rules/python/PY003-broad-except-clause.js.map +1 -1
  139. package/dist/structural-rules/python/PY011-thread-lifecycle.d.ts +11 -0
  140. package/dist/structural-rules/python/PY011-thread-lifecycle.d.ts.map +1 -0
  141. package/dist/structural-rules/python/PY011-thread-lifecycle.js +97 -0
  142. package/dist/structural-rules/python/PY011-thread-lifecycle.js.map +1 -0
  143. package/dist/structural-rules/python/PY012-asyncio-run-misuse.d.ts +11 -0
  144. package/dist/structural-rules/python/PY012-asyncio-run-misuse.d.ts.map +1 -0
  145. package/dist/structural-rules/python/PY012-asyncio-run-misuse.js +83 -0
  146. package/dist/structural-rules/python/PY012-asyncio-run-misuse.js.map +1 -0
  147. package/dist/structural-rules/python/PY013-mutable-default-arg.d.ts +11 -0
  148. package/dist/structural-rules/python/PY013-mutable-default-arg.d.ts.map +1 -0
  149. package/dist/structural-rules/python/PY013-mutable-default-arg.js +73 -0
  150. package/dist/structural-rules/python/PY013-mutable-default-arg.js.map +1 -0
  151. package/dist/structural-rules/python/PY014-fixed-sleep-retry.d.ts +11 -0
  152. package/dist/structural-rules/python/PY014-fixed-sleep-retry.d.ts.map +1 -0
  153. package/dist/structural-rules/python/PY014-fixed-sleep-retry.js +115 -0
  154. package/dist/structural-rules/python/PY014-fixed-sleep-retry.js.map +1 -0
  155. package/dist/structural-rules/types.d.ts +12 -0
  156. package/dist/structural-rules/types.d.ts.map +1 -1
  157. package/dist/utils/active-engineering-context.d.ts +12 -0
  158. package/dist/utils/active-engineering-context.d.ts.map +1 -0
  159. package/dist/utils/active-engineering-context.js +67 -0
  160. package/dist/utils/active-engineering-context.js.map +1 -0
  161. package/dist/utils/artifact-io.d.ts +33 -0
  162. package/dist/utils/artifact-io.d.ts.map +1 -0
  163. package/dist/utils/artifact-io.js +183 -0
  164. package/dist/utils/artifact-io.js.map +1 -0
  165. package/dist/utils/change-contract.d.ts +6 -2
  166. package/dist/utils/change-contract.d.ts.map +1 -1
  167. package/dist/utils/change-contract.js +175 -0
  168. package/dist/utils/change-contract.js.map +1 -1
  169. package/dist/utils/context-pack.d.ts +12 -0
  170. package/dist/utils/context-pack.d.ts.map +1 -0
  171. package/dist/utils/context-pack.js +147 -0
  172. package/dist/utils/context-pack.js.map +1 -0
  173. package/dist/utils/control-plane.d.ts +18 -0
  174. package/dist/utils/control-plane.d.ts.map +1 -1
  175. package/dist/utils/control-plane.js +31 -4
  176. package/dist/utils/control-plane.js.map +1 -1
  177. package/dist/utils/drift-intelligence.d.ts +47 -0
  178. package/dist/utils/drift-intelligence.d.ts.map +1 -0
  179. package/dist/utils/drift-intelligence.js +2099 -0
  180. package/dist/utils/drift-intelligence.js.map +1 -0
  181. package/dist/utils/execution-actions.d.ts +22 -0
  182. package/dist/utils/execution-actions.d.ts.map +1 -0
  183. package/dist/utils/execution-actions.js +103 -0
  184. package/dist/utils/execution-actions.js.map +1 -0
  185. package/dist/utils/execution-bus.d.ts +1 -214
  186. package/dist/utils/execution-bus.d.ts.map +1 -1
  187. package/dist/utils/execution-bus.js +15 -1359
  188. package/dist/utils/execution-bus.js.map +1 -1
  189. package/dist/utils/git.d.ts +1 -0
  190. package/dist/utils/git.d.ts.map +1 -1
  191. package/dist/utils/git.js +13 -3
  192. package/dist/utils/git.js.map +1 -1
  193. package/dist/utils/governance-decisions.d.ts +75 -0
  194. package/dist/utils/governance-decisions.d.ts.map +1 -0
  195. package/dist/utils/governance-decisions.js +412 -0
  196. package/dist/utils/governance-decisions.js.map +1 -0
  197. package/dist/utils/governance-provenance.d.ts +1 -1
  198. package/dist/utils/governance-provenance.d.ts.map +1 -1
  199. package/dist/utils/governance-provenance.js +5 -7
  200. package/dist/utils/governance-provenance.js.map +1 -1
  201. package/dist/utils/governance.d.ts +108 -0
  202. package/dist/utils/governance.d.ts.map +1 -1
  203. package/dist/utils/governance.js +209 -7
  204. package/dist/utils/governance.js.map +1 -1
  205. package/dist/utils/intelligence-runtime-common.d.ts +30 -0
  206. package/dist/utils/intelligence-runtime-common.d.ts.map +1 -0
  207. package/dist/utils/intelligence-runtime-common.js +156 -0
  208. package/dist/utils/intelligence-runtime-common.js.map +1 -0
  209. package/dist/utils/intent-contract-diagnostics.d.ts +9 -0
  210. package/dist/utils/intent-contract-diagnostics.d.ts.map +1 -0
  211. package/dist/utils/intent-contract-diagnostics.js +322 -0
  212. package/dist/utils/intent-contract-diagnostics.js.map +1 -0
  213. package/dist/utils/intent-pack.d.ts +15 -0
  214. package/dist/utils/intent-pack.d.ts.map +1 -0
  215. package/dist/utils/intent-pack.js +196 -0
  216. package/dist/utils/intent-pack.js.map +1 -0
  217. package/dist/utils/plan-sync.d.ts +1 -0
  218. package/dist/utils/plan-sync.d.ts.map +1 -1
  219. package/dist/utils/plan-sync.js +23 -0
  220. package/dist/utils/plan-sync.js.map +1 -1
  221. package/dist/utils/policy-decision.d.ts +5 -0
  222. package/dist/utils/policy-decision.d.ts.map +1 -0
  223. package/dist/utils/policy-decision.js +17 -0
  224. package/dist/utils/policy-decision.js.map +1 -0
  225. package/dist/utils/replay-custody.d.ts +43 -0
  226. package/dist/utils/replay-custody.d.ts.map +1 -0
  227. package/dist/utils/replay-custody.js +168 -0
  228. package/dist/utils/replay-custody.js.map +1 -0
  229. package/dist/utils/replay-runtime.d.ts +13 -0
  230. package/dist/utils/replay-runtime.d.ts.map +1 -1
  231. package/dist/utils/replay-runtime.js +96 -9
  232. package/dist/utils/replay-runtime.js.map +1 -1
  233. package/dist/utils/repository-intelligence.d.ts +9 -0
  234. package/dist/utils/repository-intelligence.d.ts.map +1 -0
  235. package/dist/utils/repository-intelligence.js +372 -0
  236. package/dist/utils/repository-intelligence.js.map +1 -0
  237. package/dist/utils/runtime-events.d.ts.map +1 -1
  238. package/dist/utils/runtime-events.js +25 -6
  239. package/dist/utils/runtime-events.js.map +1 -1
  240. package/dist/utils/semantic-contract-intelligence.d.ts +20 -0
  241. package/dist/utils/semantic-contract-intelligence.d.ts.map +1 -0
  242. package/dist/utils/semantic-contract-intelligence.js +825 -0
  243. package/dist/utils/semantic-contract-intelligence.js.map +1 -0
  244. package/dist/utils/session-continuity.d.ts +56 -0
  245. package/dist/utils/session-continuity.d.ts.map +1 -0
  246. package/dist/utils/session-continuity.js +318 -0
  247. package/dist/utils/session-continuity.js.map +1 -0
  248. package/dist/utils/verification-evidence.d.ts.map +1 -1
  249. package/dist/utils/verification-evidence.js +4 -1
  250. package/dist/utils/verification-evidence.js.map +1 -1
  251. package/dist/utils/verify-runtime-stability.d.ts +142 -0
  252. package/dist/utils/verify-runtime-stability.d.ts.map +1 -0
  253. package/dist/utils/verify-runtime-stability.js +230 -0
  254. package/dist/utils/verify-runtime-stability.js.map +1 -0
  255. package/dist/utils/workspace-runtime.d.ts +1 -266
  256. package/dist/utils/workspace-runtime.d.ts.map +1 -1
  257. package/dist/utils/workspace-runtime.js +15 -1412
  258. package/dist/utils/workspace-runtime.js.map +1 -1
  259. package/package.json +11 -10
  260. package/LICENSE +0 -201
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Verify Runtime Stability (Phase 4 — Verify Runtime Stability)
3
+ *
4
+ * Bounded execution guarantees for enterprise CI environments.
5
+ *
6
+ * Provides:
7
+ * 1. Hard execution timeouts with graceful partial-result preservation
8
+ * 2. Large repo detection and cache-build recommendations
9
+ * 3. Memory pressure tracking with layered degradation
10
+ * 4. Runtime transparency — every degraded mode is explicitly reported
11
+ *
12
+ * Layered degradation order (when memory or time pressure is detected):
13
+ * 1. Semantic layer first (LLM-assisted planning, intent expansion)
14
+ * 2. Advisory systems second (heuristic signals, advisory-only rules)
15
+ * 3. NEVER structural governance — AST-backed structural verification
16
+ * MUST remain operational even under full degradation
17
+ *
18
+ * Design constraints:
19
+ * - All timeouts are configurable via environment variables
20
+ * - Degradation is explicit and reported in verify output
21
+ * - Partial findings are always preserved (never silently dropped)
22
+ * - Structural governance is protected by construction
23
+ */
24
+ /** Local verify max wall-clock time (90s default) */
25
+ export declare const LOCAL_VERIFY_MAX_MS: number;
26
+ /** CI verify max wall-clock time (180s default) */
27
+ export declare const CI_VERIFY_MAX_MS: number;
28
+ /** Repo size threshold for large-repo warning (10,000 files) */
29
+ export declare const LARGE_REPO_FILE_THRESHOLD: number;
30
+ /** Heap usage fraction above which semantic layer is degraded (0.75 = 75%) */
31
+ export declare const MEMORY_DEGRADE_SEMANTIC_THRESHOLD = 0.75;
32
+ /** Heap usage fraction above which advisory layer is degraded (0.90 = 90%) */
33
+ export declare const MEMORY_DEGRADE_ADVISORY_THRESHOLD = 0.9;
34
+ export type DegradedLayer = 'semantic' | 'advisory';
35
+ export interface VerifyRuntimeContext {
36
+ /** Whether running in CI mode */
37
+ isCI: boolean;
38
+ /** Effective timeout in milliseconds */
39
+ timeoutMs: number;
40
+ /** Timestamp when verify started */
41
+ startedAt: number;
42
+ /** Set of layers that have been degraded */
43
+ degradedLayers: Set<DegradedLayer>;
44
+ /** Degradation reasons */
45
+ degradationReasons: string[];
46
+ /** Skipped subsystems due to degradation */
47
+ skippedSubsystems: string[];
48
+ /** Whether large-repo mode was triggered */
49
+ largeRepoMode: boolean;
50
+ /** Estimated file count (if detectable) */
51
+ estimatedFileCount: number | null;
52
+ }
53
+ export interface VerifyRuntimeReport {
54
+ degraded: boolean;
55
+ degradedLayers: DegradedLayer[];
56
+ degradationReasons: string[];
57
+ skippedSubsystems: string[];
58
+ largeRepoMode: boolean;
59
+ estimatedFileCount: number | null;
60
+ elapsedMs: number;
61
+ timeoutMs: number;
62
+ remainingMs: number;
63
+ memoryUsageMb: number;
64
+ heapUsedFraction: number;
65
+ structuralGovernanceOperational: true;
66
+ }
67
+ /**
68
+ * Create a new verify runtime context.
69
+ * Call once at the start of verify execution.
70
+ */
71
+ export declare function createVerifyRuntimeContext(isCI: boolean): VerifyRuntimeContext;
72
+ /**
73
+ * Check if the verify execution has exceeded its time budget.
74
+ *
75
+ * @returns true if timeout has been exceeded
76
+ */
77
+ export declare function isTimedOut(ctx: VerifyRuntimeContext): boolean;
78
+ /**
79
+ * Get elapsed time in milliseconds since verify started.
80
+ */
81
+ export declare function elapsedMs(ctx: VerifyRuntimeContext): number;
82
+ /**
83
+ * Get remaining time in milliseconds before timeout.
84
+ */
85
+ export declare function remainingMs(ctx: VerifyRuntimeContext): number;
86
+ /**
87
+ * Check if remaining time is below a given threshold.
88
+ * Use to preemptively skip expensive operations.
89
+ *
90
+ * @param ctx Runtime context
91
+ * @param thresholdMs Time threshold in ms (default: 5000ms)
92
+ */
93
+ export declare function isTimePressure(ctx: VerifyRuntimeContext, thresholdMs?: number): boolean;
94
+ /**
95
+ * Get current heap usage as a fraction of heap limit.
96
+ * Returns 0 if measurement is unavailable.
97
+ */
98
+ export declare function getHeapUsedFraction(): number;
99
+ /**
100
+ * Check memory pressure and apply layered degradation if needed.
101
+ *
102
+ * Degradation order:
103
+ * 1. 75% heap: degrade semantic layer (LLM intent expansion etc.)
104
+ * 2. 90% heap: degrade advisory layer (heuristic signals etc.)
105
+ * Structural governance is NEVER degraded by memory pressure.
106
+ *
107
+ * @param ctx Runtime context (mutated to record degradation)
108
+ */
109
+ export declare function applyMemoryPressureDegradation(ctx: VerifyRuntimeContext): void;
110
+ /**
111
+ * Estimate the number of tracked files in the git repository.
112
+ * Returns null if git is unavailable or the command fails.
113
+ */
114
+ export declare function estimateRepoFileCount(projectRoot: string): number | null;
115
+ /**
116
+ * Check if the repo qualifies as a large repo and apply appropriate guidance.
117
+ *
118
+ * If file count exceeds LARGE_REPO_FILE_THRESHOLD:
119
+ * - Sets ctx.largeRepoMode = true
120
+ * - Adds a cache-build recommendation to degradationReasons
121
+ * - Does NOT degrade structural governance
122
+ *
123
+ * @param ctx Runtime context (mutated)
124
+ * @param projectRoot Project root path
125
+ */
126
+ export declare function applyLargeRepoProtection(ctx: VerifyRuntimeContext, projectRoot: string): void;
127
+ /**
128
+ * Return true if the semantic layer should be skipped.
129
+ * Call before any LLM-assisted or semantic expansion operations.
130
+ */
131
+ export declare function shouldSkipSemanticLayer(ctx: VerifyRuntimeContext): boolean;
132
+ /**
133
+ * Return true if the advisory layer should be skipped.
134
+ * Call before any heuristic or advisory-only operations.
135
+ */
136
+ export declare function shouldSkipAdvisoryLayer(ctx: VerifyRuntimeContext): boolean;
137
+ /**
138
+ * Build a runtime transparency report from the context.
139
+ * Include this in verify JSON output when --ci flag is set.
140
+ */
141
+ export declare function buildVerifyRuntimeReport(ctx: VerifyRuntimeContext): VerifyRuntimeReport;
142
+ //# sourceMappingURL=verify-runtime-stability.d.ts.map
@@ -0,0 +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terprise CI environments.
6
+ *
7
+ * Provides:
8
+ * 1. Hard execution timeouts with graceful partial-result preservation
9
+ * 2. Large repo detection and cache-build recommendations
10
+ * 3. Memory pressure tracking with layered degradation
11
+ * 4. Runtime transparency — every degraded mode is explicitly reported
12
+ *
13
+ * Layered degradation order (when memory or time pressure is detected):
14
+ * 1. Semantic layer first (LLM-assisted planning, intent expansion)
15
+ * 2. Advisory systems second (heuristic signals, advisory-only rules)
16
+ * 3. NEVER structural governance — AST-backed structural verification
17
+ * MUST remain operational even under full degradation
18
+ *
19
+ * Design constraints:
20
+ * - All timeouts are configurable via environment variables
21
+ * - Degradation is explicit and reported in verify output
22
+ * - Partial findings are always preserved (never silently dropped)
23
+ * - Structural governance is protected by construction
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.MEMORY_DEGRADE_ADVISORY_THRESHOLD = exports.MEMORY_DEGRADE_SEMANTIC_THRESHOLD = exports.LARGE_REPO_FILE_THRESHOLD = exports.CI_VERIFY_MAX_MS = exports.LOCAL_VERIFY_MAX_MS = void 0;
27
+ exports.createVerifyRuntimeContext = createVerifyRuntimeContext;
28
+ exports.isTimedOut = isTimedOut;
29
+ exports.elapsedMs = elapsedMs;
30
+ exports.remainingMs = remainingMs;
31
+ exports.isTimePressure = isTimePressure;
32
+ exports.getHeapUsedFraction = getHeapUsedFraction;
33
+ exports.applyMemoryPressureDegradation = applyMemoryPressureDegradation;
34
+ exports.estimateRepoFileCount = estimateRepoFileCount;
35
+ exports.applyLargeRepoProtection = applyLargeRepoProtection;
36
+ exports.shouldSkipSemanticLayer = shouldSkipSemanticLayer;
37
+ exports.shouldSkipAdvisoryLayer = shouldSkipAdvisoryLayer;
38
+ exports.buildVerifyRuntimeReport = buildVerifyRuntimeReport;
39
+ const child_process_1 = require("child_process");
40
+ // ── Constants ─────────────────────────────────────────────────────────────────
41
+ /** Local verify max wall-clock time (90s default) */
42
+ exports.LOCAL_VERIFY_MAX_MS = parseInt(process.env['NEURCODE_VERIFY_TIMEOUT_LOCAL'] ?? '', 10) || 90_000;
43
+ /** CI verify max wall-clock time (180s default) */
44
+ exports.CI_VERIFY_MAX_MS = parseInt(process.env['NEURCODE_VERIFY_TIMEOUT_CI'] ?? '', 10) || 180_000;
45
+ /** Repo size threshold for large-repo warning (10,000 files) */
46
+ exports.LARGE_REPO_FILE_THRESHOLD = parseInt(process.env['NEURCODE_LARGE_REPO_THRESHOLD'] ?? '', 10) || 10_000;
47
+ /** Heap usage fraction above which semantic layer is degraded (0.75 = 75%) */
48
+ exports.MEMORY_DEGRADE_SEMANTIC_THRESHOLD = 0.75;
49
+ /** Heap usage fraction above which advisory layer is degraded (0.90 = 90%) */
50
+ exports.MEMORY_DEGRADE_ADVISORY_THRESHOLD = 0.90;
51
+ // ── Runtime context ───────────────────────────────────────────────────────────
52
+ /**
53
+ * Create a new verify runtime context.
54
+ * Call once at the start of verify execution.
55
+ */
56
+ function createVerifyRuntimeContext(isCI) {
57
+ return {
58
+ isCI,
59
+ timeoutMs: isCI ? exports.CI_VERIFY_MAX_MS : exports.LOCAL_VERIFY_MAX_MS,
60
+ startedAt: Date.now(),
61
+ degradedLayers: new Set(),
62
+ degradationReasons: [],
63
+ skippedSubsystems: [],
64
+ largeRepoMode: false,
65
+ estimatedFileCount: null,
66
+ };
67
+ }
68
+ // ── Time pressure ─────────────────────────────────────────────────────────────
69
+ /**
70
+ * Check if the verify execution has exceeded its time budget.
71
+ *
72
+ * @returns true if timeout has been exceeded
73
+ */
74
+ function isTimedOut(ctx) {
75
+ return (Date.now() - ctx.startedAt) >= ctx.timeoutMs;
76
+ }
77
+ /**
78
+ * Get elapsed time in milliseconds since verify started.
79
+ */
80
+ function elapsedMs(ctx) {
81
+ return Date.now() - ctx.startedAt;
82
+ }
83
+ /**
84
+ * Get remaining time in milliseconds before timeout.
85
+ */
86
+ function remainingMs(ctx) {
87
+ return Math.max(0, ctx.timeoutMs - elapsedMs(ctx));
88
+ }
89
+ /**
90
+ * Check if remaining time is below a given threshold.
91
+ * Use to preemptively skip expensive operations.
92
+ *
93
+ * @param ctx Runtime context
94
+ * @param thresholdMs Time threshold in ms (default: 5000ms)
95
+ */
96
+ function isTimePressure(ctx, thresholdMs = 5_000) {
97
+ return remainingMs(ctx) < thresholdMs;
98
+ }
99
+ // ── Memory pressure ───────────────────────────────────────────────────────────
100
+ /**
101
+ * Get current heap usage as a fraction of heap limit.
102
+ * Returns 0 if measurement is unavailable.
103
+ */
104
+ function getHeapUsedFraction() {
105
+ try {
106
+ const mem = process.memoryUsage();
107
+ if (mem.heapTotal > 0) {
108
+ return mem.heapUsed / mem.heapTotal;
109
+ }
110
+ }
111
+ catch {
112
+ // Non-fatal
113
+ }
114
+ return 0;
115
+ }
116
+ /**
117
+ * Check memory pressure and apply layered degradation if needed.
118
+ *
119
+ * Degradation order:
120
+ * 1. 75% heap: degrade semantic layer (LLM intent expansion etc.)
121
+ * 2. 90% heap: degrade advisory layer (heuristic signals etc.)
122
+ * Structural governance is NEVER degraded by memory pressure.
123
+ *
124
+ * @param ctx Runtime context (mutated to record degradation)
125
+ */
126
+ function applyMemoryPressureDegradation(ctx) {
127
+ const fraction = getHeapUsedFraction();
128
+ if (fraction >= exports.MEMORY_DEGRADE_ADVISORY_THRESHOLD && !ctx.degradedLayers.has('advisory')) {
129
+ ctx.degradedLayers.add('advisory');
130
+ ctx.degradationReasons.push(`Heap usage at ${Math.round(fraction * 100)}% exceeded advisory threshold ` +
131
+ `(${Math.round(exports.MEMORY_DEGRADE_ADVISORY_THRESHOLD * 100)}%) — advisory layer degraded`);
132
+ ctx.skippedSubsystems.push('advisory-signals', 'heuristic-rules');
133
+ }
134
+ if (fraction >= exports.MEMORY_DEGRADE_SEMANTIC_THRESHOLD && !ctx.degradedLayers.has('semantic')) {
135
+ ctx.degradedLayers.add('semantic');
136
+ ctx.degradationReasons.push(`Heap usage at ${Math.round(fraction * 100)}% exceeded semantic threshold ` +
137
+ `(${Math.round(exports.MEMORY_DEGRADE_SEMANTIC_THRESHOLD * 100)}%) — semantic layer degraded`);
138
+ ctx.skippedSubsystems.push('intent-expansion', 'llm-planning');
139
+ }
140
+ }
141
+ // ── Large repo detection ──────────────────────────────────────────────────────
142
+ /**
143
+ * Estimate the number of tracked files in the git repository.
144
+ * Returns null if git is unavailable or the command fails.
145
+ */
146
+ function estimateRepoFileCount(projectRoot) {
147
+ try {
148
+ const output = (0, child_process_1.execSync)('git ls-files --cached | wc -l', {
149
+ cwd: projectRoot,
150
+ encoding: 'utf-8',
151
+ timeout: 5000,
152
+ stdio: ['ignore', 'pipe', 'ignore'],
153
+ });
154
+ const count = parseInt(output.trim(), 10);
155
+ return Number.isFinite(count) ? count : null;
156
+ }
157
+ catch {
158
+ return null;
159
+ }
160
+ }
161
+ /**
162
+ * Check if the repo qualifies as a large repo and apply appropriate guidance.
163
+ *
164
+ * If file count exceeds LARGE_REPO_FILE_THRESHOLD:
165
+ * - Sets ctx.largeRepoMode = true
166
+ * - Adds a cache-build recommendation to degradationReasons
167
+ * - Does NOT degrade structural governance
168
+ *
169
+ * @param ctx Runtime context (mutated)
170
+ * @param projectRoot Project root path
171
+ */
172
+ function applyLargeRepoProtection(ctx, projectRoot) {
173
+ const count = estimateRepoFileCount(projectRoot);
174
+ ctx.estimatedFileCount = count;
175
+ if (count !== null && count > exports.LARGE_REPO_FILE_THRESHOLD) {
176
+ ctx.largeRepoMode = true;
177
+ ctx.degradationReasons.push(`Large repo detected (${count.toLocaleString()} tracked files, threshold: ` +
178
+ `${exports.LARGE_REPO_FILE_THRESHOLD.toLocaleString()}). ` +
179
+ `Structural cache warm-up recommended: run \`neurcode cache build\` before CI. ` +
180
+ `Semantic state will NOT be rebuilt synchronously in CI mode.`);
181
+ if (ctx.isCI) {
182
+ ctx.skippedSubsystems.push('synchronous-semantic-state-rebuild');
183
+ }
184
+ }
185
+ }
186
+ // ── Degradation guards ────────────────────────────────────────────────────────
187
+ /**
188
+ * Return true if the semantic layer should be skipped.
189
+ * Call before any LLM-assisted or semantic expansion operations.
190
+ */
191
+ function shouldSkipSemanticLayer(ctx) {
192
+ return ctx.degradedLayers.has('semantic') || isTimePressure(ctx, 10_000);
193
+ }
194
+ /**
195
+ * Return true if the advisory layer should be skipped.
196
+ * Call before any heuristic or advisory-only operations.
197
+ */
198
+ function shouldSkipAdvisoryLayer(ctx) {
199
+ return ctx.degradedLayers.has('advisory') || isTimePressure(ctx, 3_000);
200
+ }
201
+ // ── Report generation ─────────────────────────────────────────────────────────
202
+ /**
203
+ * Build a runtime transparency report from the context.
204
+ * Include this in verify JSON output when --ci flag is set.
205
+ */
206
+ function buildVerifyRuntimeReport(ctx) {
207
+ const heapFraction = getHeapUsedFraction();
208
+ let memoryMb = 0;
209
+ try {
210
+ memoryMb = Math.round(process.memoryUsage().heapUsed / 1024 / 1024);
211
+ }
212
+ catch {
213
+ // Non-fatal
214
+ }
215
+ return {
216
+ degraded: ctx.degradedLayers.size > 0 || ctx.largeRepoMode,
217
+ degradedLayers: [...ctx.degradedLayers],
218
+ degradationReasons: [...ctx.degradationReasons],
219
+ skippedSubsystems: [...ctx.skippedSubsystems],
220
+ largeRepoMode: ctx.largeRepoMode,
221
+ estimatedFileCount: ctx.estimatedFileCount,
222
+ elapsedMs: elapsedMs(ctx),
223
+ timeoutMs: ctx.timeoutMs,
224
+ remainingMs: remainingMs(ctx),
225
+ memoryUsageMb: memoryMb,
226
+ heapUsedFraction: Math.round(heapFraction * 1000) / 1000,
227
+ structuralGovernanceOperational: true,
228
+ };
229
+ }
230
+ //# sourceMappingURL=verify-runtime-stability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-runtime-stability.js","sourceRoot":"","sources":["../../src/utils/verify-runtime-stability.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAsEH,gEAWC;AASD,gCAEC;AAKD,8BAEC;AAKD,kCAEC;AASD,wCAEC;AAQD,kDAUC;AAYD,wEAoBC;AAQD,sDAaC;AAaD,4DAoBC;AA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,CAAC,GAAG,GAAG,CAAC,kBAAkB,CAAC;QAC/C,iBAAiB,EAAE,CAAC,GAAG,GAAG,CAAC,iBAAiB,CAAC;QAC7C,aAAa,EAAE,GAAG,CAAC,aAAa;QAChC,kBAAkB,EAAE,GAAG,CAAC,kBAAkB;QAC1C,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC;QACzB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC;QAC7B,aAAa,EAAE,QAAQ;QACvB,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,IAAI;QACxD,+BAA+B,EAAE,IAAI;KACtC,CAAC;AACJ,CAAC"}
@@ -1,267 +1,2 @@
1
- import { type ExecutionActionType, type ExecutionRecord, type ExecutionSource } from './execution-bus';
2
- declare const WORKSPACE_SCHEMA: "neurcode.workspace.v1";
3
- declare const WORKSPACE_RUNTIME_SCHEMA: "neurcode.workspace-runtime.v1";
4
- type GovernanceRiskLevel = 'low' | 'medium' | 'high';
5
- type RepositoryHealthStatus = 'healthy' | 'degraded' | 'critical' | 'unknown';
6
- export type WorkspaceRole = 'workspace_admin' | 'governance_admin' | 'engineer' | 'auditor';
7
- export interface WorkspaceMember {
8
- actor: string;
9
- role: WorkspaceRole;
10
- }
11
- export interface WorkspaceRepository {
12
- id: string;
13
- name: string;
14
- rootPath: string;
15
- services: string[];
16
- policyDomain: string | null;
17
- tags: string[];
18
- enabled: boolean;
19
- }
20
- export interface WorkspaceControlPlaneOverrides {
21
- runtime?: Record<string, unknown>;
22
- remediation?: Record<string, unknown>;
23
- evidence?: Record<string, unknown>;
24
- eventRuntime?: Record<string, unknown>;
25
- ciGovernance?: Record<string, unknown>;
26
- }
27
- export interface WorkspaceDefinition {
28
- schemaVersion: typeof WORKSPACE_SCHEMA;
29
- id: string;
30
- name: string;
31
- description: string | null;
32
- createdAt: string;
33
- updatedAt: string;
34
- repositories: WorkspaceRepository[];
35
- governance: {
36
- posture: {
37
- targetRisk: GovernanceRiskLevel;
38
- enforcement: 'strict' | 'balanced' | 'advisory';
39
- notes: string | null;
40
- };
41
- controlPlane: {
42
- inherit: boolean;
43
- overrides: WorkspaceControlPlaneOverrides;
44
- };
45
- policy: {
46
- workspacePacks: string[];
47
- repositoryPackOverrides: Record<string, string[]>;
48
- precedence: 'workspace-first' | 'repo-first';
49
- };
50
- evidence: {
51
- retentionMaxArtifacts: number;
52
- indexLimit: number;
53
- };
54
- remediation: {
55
- autonomousApplySafe: boolean;
56
- requireManualApprovalAtRisk: 'none' | 'high' | 'critical';
57
- };
58
- runtime: {
59
- executionRetention: number;
60
- eventRetention: number;
61
- };
62
- };
63
- access: {
64
- defaultRole: WorkspaceRole;
65
- members: WorkspaceMember[];
66
- };
67
- }
68
- export interface WorkspaceSummary {
69
- id: string;
70
- name: string;
71
- description: string | null;
72
- updatedAt: string;
73
- repositoryCount: number;
74
- enabledRepositoryCount: number;
75
- posture: WorkspaceDefinition['governance']['posture'];
76
- }
77
- export interface WorkspaceRepositoryHealth {
78
- workspaceId: string;
79
- repositoryId: string;
80
- repositoryName: string;
81
- rootPath: string;
82
- exists: boolean;
83
- status: RepositoryHealthStatus;
84
- riskLevel: GovernanceRiskLevel;
85
- riskScore: number;
86
- runs: number;
87
- passRate: number;
88
- blockRate: number;
89
- averageBlocking: number;
90
- averageAdvisory: number;
91
- regressionRate: number;
92
- coverageScore: number | null;
93
- lastRunAt: string | null;
94
- policyDrift: boolean;
95
- topPolicies: Array<{
96
- policy: string;
97
- occurrences: number;
98
- }>;
99
- topFiles: Array<{
100
- file: string;
101
- occurrences: number;
102
- }>;
103
- services: string[];
104
- policyDomain: string | null;
105
- }
106
- export interface WorkspaceHotspot {
107
- key: string;
108
- kind: 'file' | 'policy' | 'directory';
109
- score: number;
110
- occurrences: number;
111
- repositoryCount: number;
112
- }
113
- export interface WorkspaceRuntimeActivity {
114
- eventCounts: Record<string, number>;
115
- recentEvents: Array<{
116
- cursor: string;
117
- type: string;
118
- timestamp: string;
119
- source: string;
120
- actor: string;
121
- severity: string;
122
- executionId: string;
123
- repositoryId: string;
124
- repositoryName: string;
125
- }>;
126
- }
127
- export interface WorkspacePostureSummary {
128
- workspaceId: string;
129
- workspaceName: string;
130
- repositoryCount: number;
131
- healthyRepositories: number;
132
- degradedRepositories: number;
133
- criticalRepositories: number;
134
- overallRiskLevel: GovernanceRiskLevel;
135
- overallRiskScore: number;
136
- passRate: number;
137
- blockRate: number;
138
- averageCoverageScore: number | null;
139
- regressionConcentration: Array<{
140
- repositoryId: string;
141
- repositoryName: string;
142
- regressionRate: number;
143
- }>;
144
- policyDriftRepositories: number;
145
- unstableServices: string[];
146
- }
147
- export interface WorkspaceRuntimeSnapshot {
148
- schemaVersion: typeof WORKSPACE_RUNTIME_SCHEMA;
149
- generatedAt: string;
150
- rootDir: string;
151
- activeWorkspaceId: string | null;
152
- activeWorkspaceRole: WorkspaceRole;
153
- workspaces: WorkspaceSummary[];
154
- workspace: WorkspaceDefinition | null;
155
- effectiveControlPlane: {
156
- inherited: boolean;
157
- overridesApplied: Array<'runtime' | 'remediation' | 'evidence' | 'eventRuntime' | 'ciGovernance'>;
158
- runtime: Record<string, unknown>;
159
- remediation: Record<string, unknown>;
160
- evidence: Record<string, unknown>;
161
- eventRuntime: Record<string, unknown>;
162
- ciGovernance: Record<string, unknown>;
163
- } | null;
164
- repositoryHealthMatrix: WorkspaceRepositoryHealth[];
165
- hotspots: {
166
- files: WorkspaceHotspot[];
167
- policies: WorkspaceHotspot[];
168
- directories: WorkspaceHotspot[];
169
- };
170
- runtimeActivity: WorkspaceRuntimeActivity;
171
- posture: WorkspacePostureSummary | null;
172
- }
173
- export interface CreateWorkspaceInput {
174
- id?: string;
175
- name: string;
176
- description?: string | null;
177
- repositories?: Array<Partial<WorkspaceRepository>>;
178
- governance?: Partial<WorkspaceDefinition['governance']>;
179
- access?: Partial<WorkspaceDefinition['access']>;
180
- }
181
- export interface WorkspaceMutationResult {
182
- workspace: WorkspaceDefinition;
183
- executionId: string;
184
- }
185
- export interface AddWorkspaceRepositoryInput {
186
- id?: string;
187
- name: string;
188
- rootPath: string;
189
- services?: string[];
190
- policyDomain?: string | null;
191
- tags?: string[];
192
- enabled?: boolean;
193
- }
194
- export interface WorkspaceExecutionRequest {
195
- workspaceId?: string;
196
- repositoryIds?: string[];
197
- type: ExecutionActionType;
198
- source?: ExecutionSource;
199
- actor?: string;
200
- target?: string | null;
201
- intentText?: string | null;
202
- reverify?: boolean;
203
- ciMode?: boolean;
204
- evidenceDir?: string;
205
- dedupeWindowMs?: number;
206
- }
207
- export interface WorkspaceExecutionItem {
208
- repositoryId: string;
209
- repositoryName: string;
210
- rootPath: string;
211
- ok: boolean;
212
- execution: ExecutionRecord | null;
213
- primaryPayload: Record<string, unknown> | null;
214
- verificationPayload: Record<string, unknown> | null;
215
- error: string | null;
216
- }
217
- export interface WorkspaceExecutionResult {
218
- workspaceId: string;
219
- workspaceName: string;
220
- executionId: string;
221
- source: ExecutionSource;
222
- actor: string;
223
- type: ExecutionActionType;
224
- startedAt: string;
225
- completedAt: string;
226
- totals: {
227
- repositories: number;
228
- attempted: number;
229
- succeeded: number;
230
- failed: number;
231
- };
232
- items: WorkspaceExecutionItem[];
233
- }
234
- export declare function listWorkspaces(cwd?: string): WorkspaceSummary[];
235
- export declare function getWorkspaceById(workspaceId: string, cwd?: string): WorkspaceDefinition | null;
236
- export declare function getActiveWorkspace(cwd?: string): WorkspaceDefinition | null;
237
- export declare function createWorkspace(input: CreateWorkspaceInput, options?: {
238
- cwd?: string;
239
- source?: ExecutionSource;
240
- actor?: string;
241
- setActive?: boolean;
242
- }): WorkspaceMutationResult;
243
- export declare function setActiveWorkspace(workspaceId: string, options?: {
244
- cwd?: string;
245
- source?: ExecutionSource;
246
- actor?: string;
247
- }): WorkspaceMutationResult;
248
- export declare function addWorkspaceRepository(workspaceId: string, input: AddWorkspaceRepositoryInput, options?: {
249
- cwd?: string;
250
- source?: ExecutionSource;
251
- actor?: string;
252
- }): WorkspaceMutationResult;
253
- export declare function updateWorkspace(workspaceId: string, patch: Partial<Omit<WorkspaceDefinition, 'schemaVersion' | 'id' | 'createdAt' | 'updatedAt'>>, options?: {
254
- cwd?: string;
255
- source?: ExecutionSource;
256
- actor?: string;
257
- }): WorkspaceMutationResult;
258
- export declare function getWorkspaceRuntimeSnapshot(options?: {
259
- cwd?: string;
260
- workspaceId?: string;
261
- actor?: string | null;
262
- }): WorkspaceRuntimeSnapshot;
263
- export declare function executeWorkspaceAction(request: WorkspaceExecutionRequest, options?: {
264
- cwd?: string;
265
- }): Promise<WorkspaceExecutionResult>;
266
- export {};
1
+ export * from '../daemon/runtime/workspace-runtime';
267
2
  //# sourceMappingURL=workspace-runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-runtime.d.ts","sourceRoot":"","sources":["../../src/utils/workspace-runtime.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,gBAAgB,EAAG,uBAAgC,CAAC;AAE1D,QAAA,MAAM,wBAAwB,EAAG,+BAAwC,CAAC;AAO1E,KAAK,mBAAmB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AACrD,KAAK,sBAAsB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5F,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,E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