@neurcode-ai/cli 0.9.64 → 0.9.65

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 (252) hide show
  1. package/LICENSE +201 -0
  2. package/dist/commands/brain.d.ts.map +1 -1
  3. package/dist/commands/brain.js +273 -0
  4. package/dist/commands/brain.js.map +1 -1
  5. package/dist/commands/pilot-report.d.ts +9 -0
  6. package/dist/commands/pilot-report.d.ts.map +1 -0
  7. package/dist/commands/pilot-report.js +176 -0
  8. package/dist/commands/pilot-report.js.map +1 -0
  9. package/dist/commands/remediate-governance.d.ts +54 -0
  10. package/dist/commands/remediate-governance.d.ts.map +1 -0
  11. package/dist/commands/remediate-governance.js +375 -0
  12. package/dist/commands/remediate-governance.js.map +1 -0
  13. package/dist/commands/remediate.d.ts.map +1 -1
  14. package/dist/commands/remediate.js.map +1 -1
  15. package/dist/commands/replay.d.ts.map +1 -1
  16. package/dist/commands/replay.js +30 -0
  17. package/dist/commands/replay.js.map +1 -1
  18. package/dist/commands/verify.d.ts.map +1 -1
  19. package/dist/commands/verify.js +307 -24
  20. package/dist/commands/verify.js.map +1 -1
  21. package/dist/daemon/server.d.ts.map +1 -1
  22. package/dist/daemon/server.js +1078 -0
  23. package/dist/daemon/server.js.map +1 -1
  24. package/dist/explainability/DeterminismClassifier.d.ts +34 -0
  25. package/dist/explainability/DeterminismClassifier.d.ts.map +1 -0
  26. package/dist/explainability/DeterminismClassifier.js +104 -0
  27. package/dist/explainability/DeterminismClassifier.js.map +1 -0
  28. package/dist/explainability/ViolationFormatter.d.ts +32 -0
  29. package/dist/explainability/ViolationFormatter.d.ts.map +1 -0
  30. package/dist/explainability/ViolationFormatter.js +252 -0
  31. package/dist/explainability/ViolationFormatter.js.map +1 -0
  32. package/dist/explainability/index.d.ts +15 -0
  33. package/dist/explainability/index.d.ts.map +1 -0
  34. package/dist/explainability/index.js +94 -0
  35. package/dist/explainability/index.js.map +1 -0
  36. package/dist/explainability/types.d.ts +37 -0
  37. package/dist/explainability/types.d.ts.map +1 -0
  38. package/dist/explainability/types.js +3 -0
  39. package/dist/explainability/types.js.map +1 -0
  40. package/dist/governance/canonical-pipeline.d.ts +38 -0
  41. package/dist/governance/canonical-pipeline.d.ts.map +1 -0
  42. package/dist/governance/canonical-pipeline.js +448 -0
  43. package/dist/governance/canonical-pipeline.js.map +1 -0
  44. package/dist/governance/structural-on-diff.d.ts +13 -0
  45. package/dist/governance/structural-on-diff.d.ts.map +1 -0
  46. package/dist/governance/structural-on-diff.js +35 -0
  47. package/dist/governance/structural-on-diff.js.map +1 -0
  48. package/dist/governance/structural-policy-merge.d.ts +14 -0
  49. package/dist/governance/structural-policy-merge.d.ts.map +1 -0
  50. package/dist/governance/structural-policy-merge.js +25 -0
  51. package/dist/governance/structural-policy-merge.js.map +1 -0
  52. package/dist/index.js +71 -0
  53. package/dist/index.js.map +1 -1
  54. package/dist/integrations/review-compression/index.d.ts +50 -0
  55. package/dist/integrations/review-compression/index.d.ts.map +1 -0
  56. package/dist/integrations/review-compression/index.js +158 -0
  57. package/dist/integrations/review-compression/index.js.map +1 -0
  58. package/dist/intent-engine/domain-taxonomy.d.ts +42 -0
  59. package/dist/intent-engine/domain-taxonomy.d.ts.map +1 -0
  60. package/dist/intent-engine/domain-taxonomy.js +534 -0
  61. package/dist/intent-engine/domain-taxonomy.js.map +1 -0
  62. package/dist/intent-engine/index.d.ts +1 -0
  63. package/dist/intent-engine/index.d.ts.map +1 -1
  64. package/dist/intent-engine/index.js +6 -1
  65. package/dist/intent-engine/index.js.map +1 -1
  66. package/dist/intent-engine/parser.d.ts.map +1 -1
  67. package/dist/intent-engine/parser.js +47 -0
  68. package/dist/intent-engine/parser.js.map +1 -1
  69. package/dist/intent-engine/semantic-expander.d.ts +104 -0
  70. package/dist/intent-engine/semantic-expander.d.ts.map +1 -0
  71. package/dist/intent-engine/semantic-expander.js +480 -0
  72. package/dist/intent-engine/semantic-expander.js.map +1 -0
  73. package/dist/patch-engine/patterns.d.ts.map +1 -1
  74. package/dist/patch-engine/patterns.js +8 -4
  75. package/dist/patch-engine/patterns.js.map +1 -1
  76. package/dist/semantic/index.d.ts +14 -0
  77. package/dist/semantic/index.d.ts.map +1 -0
  78. package/dist/semantic/index.js +30 -0
  79. package/dist/semantic/index.js.map +1 -0
  80. package/dist/semantic/tfidf-engine.d.ts +81 -0
  81. package/dist/semantic/tfidf-engine.d.ts.map +1 -0
  82. package/dist/semantic/tfidf-engine.js +278 -0
  83. package/dist/semantic/tfidf-engine.js.map +1 -0
  84. package/dist/semantic/vector-store.d.ts +108 -0
  85. package/dist/semantic/vector-store.d.ts.map +1 -0
  86. package/dist/semantic/vector-store.js +321 -0
  87. package/dist/semantic/vector-store.js.map +1 -0
  88. package/dist/structural-rules/context-severity.d.ts +46 -0
  89. package/dist/structural-rules/context-severity.d.ts.map +1 -0
  90. package/dist/structural-rules/context-severity.js +115 -0
  91. package/dist/structural-rules/context-severity.js.map +1 -0
  92. package/dist/structural-rules/distributed/DS001-saga-rollback-absence.d.ts +11 -0
  93. package/dist/structural-rules/distributed/DS001-saga-rollback-absence.d.ts.map +1 -0
  94. package/dist/structural-rules/distributed/DS001-saga-rollback-absence.js +212 -0
  95. package/dist/structural-rules/distributed/DS001-saga-rollback-absence.js.map +1 -0
  96. package/dist/structural-rules/distributed/DS002-missing-correlation-id.d.ts +11 -0
  97. package/dist/structural-rules/distributed/DS002-missing-correlation-id.d.ts.map +1 -0
  98. package/dist/structural-rules/distributed/DS002-missing-correlation-id.js +213 -0
  99. package/dist/structural-rules/distributed/DS002-missing-correlation-id.js.map +1 -0
  100. package/dist/structural-rules/distributed/index.d.ts +3 -0
  101. package/dist/structural-rules/distributed/index.d.ts.map +1 -0
  102. package/dist/structural-rules/distributed/index.js +8 -0
  103. package/dist/structural-rules/distributed/index.js.map +1 -0
  104. package/dist/structural-rules/engine.d.ts +25 -0
  105. package/dist/structural-rules/engine.d.ts.map +1 -0
  106. package/dist/structural-rules/engine.js +90 -0
  107. package/dist/structural-rules/engine.js.map +1 -0
  108. package/dist/structural-rules/index.d.ts +41 -0
  109. package/dist/structural-rules/index.d.ts.map +1 -0
  110. package/dist/structural-rules/index.js +141 -0
  111. package/dist/structural-rules/index.js.map +1 -0
  112. package/dist/structural-rules/python/PY001-asyncio-task-without-cancel.d.ts +11 -0
  113. package/dist/structural-rules/python/PY001-asyncio-task-without-cancel.d.ts.map +1 -0
  114. package/dist/structural-rules/python/PY001-asyncio-task-without-cancel.js +66 -0
  115. package/dist/structural-rules/python/PY001-asyncio-task-without-cancel.js.map +1 -0
  116. package/dist/structural-rules/python/PY002-unbounded-dict-singleton.d.ts +11 -0
  117. package/dist/structural-rules/python/PY002-unbounded-dict-singleton.d.ts.map +1 -0
  118. package/dist/structural-rules/python/PY002-unbounded-dict-singleton.js +135 -0
  119. package/dist/structural-rules/python/PY002-unbounded-dict-singleton.js.map +1 -0
  120. package/dist/structural-rules/python/PY003-broad-except-clause.d.ts +11 -0
  121. package/dist/structural-rules/python/PY003-broad-except-clause.d.ts.map +1 -0
  122. package/dist/structural-rules/python/PY003-broad-except-clause.js +86 -0
  123. package/dist/structural-rules/python/PY003-broad-except-clause.js.map +1 -0
  124. package/dist/structural-rules/python/PY004-swallowed-async-exception.d.ts +11 -0
  125. package/dist/structural-rules/python/PY004-swallowed-async-exception.d.ts.map +1 -0
  126. package/dist/structural-rules/python/PY004-swallowed-async-exception.js +167 -0
  127. package/dist/structural-rules/python/PY004-swallowed-async-exception.js.map +1 -0
  128. package/dist/structural-rules/python/PY005-fastapi-without-pydantic.d.ts +11 -0
  129. package/dist/structural-rules/python/PY005-fastapi-without-pydantic.d.ts.map +1 -0
  130. package/dist/structural-rules/python/PY005-fastapi-without-pydantic.js +154 -0
  131. package/dist/structural-rules/python/PY005-fastapi-without-pydantic.js.map +1 -0
  132. package/dist/structural-rules/python/PY006-blocking-io-in-async.d.ts +11 -0
  133. package/dist/structural-rules/python/PY006-blocking-io-in-async.d.ts.map +1 -0
  134. package/dist/structural-rules/python/PY006-blocking-io-in-async.js +130 -0
  135. package/dist/structural-rules/python/PY006-blocking-io-in-async.js.map +1 -0
  136. package/dist/structural-rules/python/PY007-sqlalchemy-session-leak.d.ts +11 -0
  137. package/dist/structural-rules/python/PY007-sqlalchemy-session-leak.d.ts.map +1 -0
  138. package/dist/structural-rules/python/PY007-sqlalchemy-session-leak.js +93 -0
  139. package/dist/structural-rules/python/PY007-sqlalchemy-session-leak.js.map +1 -0
  140. package/dist/structural-rules/python/PY008-celery-task-without-retry.d.ts +11 -0
  141. package/dist/structural-rules/python/PY008-celery-task-without-retry.d.ts.map +1 -0
  142. package/dist/structural-rules/python/PY008-celery-task-without-retry.js +154 -0
  143. package/dist/structural-rules/python/PY008-celery-task-without-retry.js.map +1 -0
  144. package/dist/structural-rules/python/PY009-unsafe-pickle-deserialization.d.ts +11 -0
  145. package/dist/structural-rules/python/PY009-unsafe-pickle-deserialization.d.ts.map +1 -0
  146. package/dist/structural-rules/python/PY009-unsafe-pickle-deserialization.js +133 -0
  147. package/dist/structural-rules/python/PY009-unsafe-pickle-deserialization.js.map +1 -0
  148. package/dist/structural-rules/python/PY010-leaked-aiohttp-session.d.ts +11 -0
  149. package/dist/structural-rules/python/PY010-leaked-aiohttp-session.d.ts.map +1 -0
  150. package/dist/structural-rules/python/PY010-leaked-aiohttp-session.js +80 -0
  151. package/dist/structural-rules/python/PY010-leaked-aiohttp-session.js.map +1 -0
  152. package/dist/structural-rules/rules/SR001-swallowed-async-rejection.d.ts +11 -0
  153. package/dist/structural-rules/rules/SR001-swallowed-async-rejection.d.ts.map +1 -0
  154. package/dist/structural-rules/rules/SR001-swallowed-async-rejection.js +145 -0
  155. package/dist/structural-rules/rules/SR001-swallowed-async-rejection.js.map +1 -0
  156. package/dist/structural-rules/rules/SR002-unbounded-collection.d.ts +11 -0
  157. package/dist/structural-rules/rules/SR002-unbounded-collection.d.ts.map +1 -0
  158. package/dist/structural-rules/rules/SR002-unbounded-collection.js +196 -0
  159. package/dist/structural-rules/rules/SR002-unbounded-collection.js.map +1 -0
  160. package/dist/structural-rules/rules/SR003-timer-without-cleanup.d.ts +11 -0
  161. package/dist/structural-rules/rules/SR003-timer-without-cleanup.d.ts.map +1 -0
  162. package/dist/structural-rules/rules/SR003-timer-without-cleanup.js +148 -0
  163. package/dist/structural-rules/rules/SR003-timer-without-cleanup.js.map +1 -0
  164. package/dist/structural-rules/rules/SR004-request-boundary-no-validation.d.ts +11 -0
  165. package/dist/structural-rules/rules/SR004-request-boundary-no-validation.d.ts.map +1 -0
  166. package/dist/structural-rules/rules/SR004-request-boundary-no-validation.js +162 -0
  167. package/dist/structural-rules/rules/SR004-request-boundary-no-validation.js.map +1 -0
  168. package/dist/structural-rules/rules/SR005-halfopen-probe-gate.d.ts +11 -0
  169. package/dist/structural-rules/rules/SR005-halfopen-probe-gate.d.ts.map +1 -0
  170. package/dist/structural-rules/rules/SR005-halfopen-probe-gate.js +150 -0
  171. package/dist/structural-rules/rules/SR005-halfopen-probe-gate.js.map +1 -0
  172. package/dist/structural-rules/rules/SR006-fanout-error-sanitization.d.ts +11 -0
  173. package/dist/structural-rules/rules/SR006-fanout-error-sanitization.d.ts.map +1 -0
  174. package/dist/structural-rules/rules/SR006-fanout-error-sanitization.js +161 -0
  175. package/dist/structural-rules/rules/SR006-fanout-error-sanitization.js.map +1 -0
  176. package/dist/structural-rules/rules/SR007-cross-request-error.d.ts +11 -0
  177. package/dist/structural-rules/rules/SR007-cross-request-error.d.ts.map +1 -0
  178. package/dist/structural-rules/rules/SR007-cross-request-error.js +175 -0
  179. package/dist/structural-rules/rules/SR007-cross-request-error.js.map +1 -0
  180. package/dist/structural-rules/rules/SR008-background-task-orphan.d.ts +11 -0
  181. package/dist/structural-rules/rules/SR008-background-task-orphan.d.ts.map +1 -0
  182. package/dist/structural-rules/rules/SR008-background-task-orphan.js +176 -0
  183. package/dist/structural-rules/rules/SR008-background-task-orphan.js.map +1 -0
  184. package/dist/structural-rules/rules/SR009-missing-retry-backoff.d.ts +11 -0
  185. package/dist/structural-rules/rules/SR009-missing-retry-backoff.d.ts.map +1 -0
  186. package/dist/structural-rules/rules/SR009-missing-retry-backoff.js +168 -0
  187. package/dist/structural-rules/rules/SR009-missing-retry-backoff.js.map +1 -0
  188. package/dist/structural-rules/rules/SR010-retry-storm.d.ts +11 -0
  189. package/dist/structural-rules/rules/SR010-retry-storm.d.ts.map +1 -0
  190. package/dist/structural-rules/rules/SR010-retry-storm.js +181 -0
  191. package/dist/structural-rules/rules/SR010-retry-storm.js.map +1 -0
  192. package/dist/structural-rules/rules/SR011-event-listener-leak.d.ts +11 -0
  193. package/dist/structural-rules/rules/SR011-event-listener-leak.d.ts.map +1 -0
  194. package/dist/structural-rules/rules/SR011-event-listener-leak.js +208 -0
  195. package/dist/structural-rules/rules/SR011-event-listener-leak.js.map +1 -0
  196. package/dist/structural-rules/rules/SR012-promise-race-leak.d.ts +11 -0
  197. package/dist/structural-rules/rules/SR012-promise-race-leak.d.ts.map +1 -0
  198. package/dist/structural-rules/rules/SR012-promise-race-leak.js +191 -0
  199. package/dist/structural-rules/rules/SR012-promise-race-leak.js.map +1 -0
  200. package/dist/structural-rules/rules/SR013-missing-idempotency-key.d.ts +11 -0
  201. package/dist/structural-rules/rules/SR013-missing-idempotency-key.d.ts.map +1 -0
  202. package/dist/structural-rules/rules/SR013-missing-idempotency-key.js +219 -0
  203. package/dist/structural-rules/rules/SR013-missing-idempotency-key.js.map +1 -0
  204. package/dist/structural-rules/rules/SR014-mutable-closure-async.d.ts +11 -0
  205. package/dist/structural-rules/rules/SR014-mutable-closure-async.d.ts.map +1 -0
  206. package/dist/structural-rules/rules/SR014-mutable-closure-async.js +208 -0
  207. package/dist/structural-rules/rules/SR014-mutable-closure-async.js.map +1 -0
  208. package/dist/structural-rules/rules/SR015-dangling-abort-controller.d.ts +11 -0
  209. package/dist/structural-rules/rules/SR015-dangling-abort-controller.d.ts.map +1 -0
  210. package/dist/structural-rules/rules/SR015-dangling-abort-controller.js +190 -0
  211. package/dist/structural-rules/rules/SR015-dangling-abort-controller.js.map +1 -0
  212. package/dist/structural-rules/rules/SR016-unsafe-json-parse.d.ts +11 -0
  213. package/dist/structural-rules/rules/SR016-unsafe-json-parse.d.ts.map +1 -0
  214. package/dist/structural-rules/rules/SR016-unsafe-json-parse.js +187 -0
  215. package/dist/structural-rules/rules/SR016-unsafe-json-parse.js.map +1 -0
  216. package/dist/structural-rules/suppressions.d.ts +43 -0
  217. package/dist/structural-rules/suppressions.d.ts.map +1 -0
  218. package/dist/structural-rules/suppressions.js +115 -0
  219. package/dist/structural-rules/suppressions.js.map +1 -0
  220. package/dist/structural-rules/types.d.ts +43 -0
  221. package/dist/structural-rules/types.d.ts.map +1 -0
  222. package/dist/structural-rules/types.js +3 -0
  223. package/dist/structural-rules/types.js.map +1 -0
  224. package/dist/utils/brain-cache.d.ts +100 -0
  225. package/dist/utils/brain-cache.d.ts.map +1 -0
  226. package/dist/utils/brain-cache.js +346 -0
  227. package/dist/utils/brain-cache.js.map +1 -0
  228. package/dist/utils/governance-provenance.d.ts +95 -0
  229. package/dist/utils/governance-provenance.d.ts.map +1 -0
  230. package/dist/utils/governance-provenance.js +187 -0
  231. package/dist/utils/governance-provenance.js.map +1 -0
  232. package/dist/utils/pilot-metrics.d.ts +46 -0
  233. package/dist/utils/pilot-metrics.d.ts.map +1 -0
  234. package/dist/utils/pilot-metrics.js +240 -0
  235. package/dist/utils/pilot-metrics.js.map +1 -0
  236. package/dist/utils/replay-runtime.d.ts +34 -0
  237. package/dist/utils/replay-runtime.d.ts.map +1 -1
  238. package/dist/utils/replay-runtime.js +207 -0
  239. package/dist/utils/replay-runtime.js.map +1 -1
  240. package/dist/workspace/cross-repo-graph.d.ts +111 -0
  241. package/dist/workspace/cross-repo-graph.d.ts.map +1 -0
  242. package/dist/workspace/cross-repo-graph.js +450 -0
  243. package/dist/workspace/cross-repo-graph.js.map +1 -0
  244. package/dist/workspace/federated-context.d.ts +144 -0
  245. package/dist/workspace/federated-context.d.ts.map +1 -0
  246. package/dist/workspace/federated-context.js +347 -0
  247. package/dist/workspace/federated-context.js.map +1 -0
  248. package/dist/workspace/index.d.ts +38 -0
  249. package/dist/workspace/index.d.ts.map +1 -0
  250. package/dist/workspace/index.js +48 -0
  251. package/dist/workspace/index.js.map +1 -0
  252. package/package.json +9 -9
@@ -0,0 +1,347 @@
1
+ "use strict";
2
+ /**
3
+ * Federated Context Builder
4
+ *
5
+ * Answers the question: "When a developer changes files in repo-A, what is the
6
+ * complete blast radius across ALL repos in the workspace?"
7
+ *
8
+ * This is the enterprise multi-repo answer that single-repo context engines cannot
9
+ * provide. The federated context:
10
+ *
11
+ * 1. Builds the PRIMARY context from the repo where changes are occurring
12
+ * (full depth — constraints, advisory, uncertainty)
13
+ *
14
+ * 2. Resolves SECONDARY context for every repo transitively affected
15
+ * via cross-repo edges (lighter weight — impacted files + why)
16
+ *
17
+ * 3. Returns BLIND SPOTS — coupling that cannot be detected structurally
18
+ * (config coupling, runtime service discovery, infra-level routing)
19
+ *
20
+ * The output is deterministic: same changed files + same workspace topology
21
+ * + same cross-repo graph → identical FederatedContextPackage.
22
+ *
23
+ * Design constraint: this layer is ADDITIVE. It never replaces the primary
24
+ * single-repo context engine. It extends it with cross-repo intelligence.
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.buildFederatedContext = buildFederatedContext;
28
+ exports.formatFederatedContextSummary = formatFederatedContextSummary;
29
+ const cross_repo_graph_1 = require("./cross-repo-graph");
30
+ /** Hard ceilings for cross-repo expansion — deterministic caps, never silent. */
31
+ const MAX_FEDERATED_DOWNSTREAM_REPOS = 24;
32
+ const MAX_FEDERATED_UPSTREAM_REPOS = 24;
33
+ const MAX_FEDERATED_TOTAL_EDGES = 400;
34
+ /**
35
+ * Build the federated context package for a multi-repo workspace.
36
+ *
37
+ * This is the core function that answers: "What is the blast radius
38
+ * of this change across the entire service mesh?"
39
+ */
40
+ function buildFederatedContext(input) {
41
+ const { workspaceName, repos, primaryRepoName, changedFiles, brainMaps = {}, } = input;
42
+ const truncationReasons = [];
43
+ const changedFilesSorted = [...changedFiles].sort((a, b) => a.localeCompare(b));
44
+ // Step 1: Build the cross-repo graph (or use pre-built)
45
+ const crossRepoGraph = (0, cross_repo_graph_1.buildCrossRepoGraph)({ repos, brainMaps });
46
+ // Step 2: Find all edges FROM changed files in the primary repo
47
+ // These edges tell us: "this file couples to another repo"
48
+ const allEdgesFromChanges = [];
49
+ for (const changedFile of changedFilesSorted) {
50
+ const edges = (0, cross_repo_graph_1.getEdgesForFile)(crossRepoGraph, primaryRepoName, changedFile);
51
+ allEdgesFromChanges.push(...edges);
52
+ }
53
+ // Step 3: Identify all edges pointing TO the primary repo's changed files
54
+ // These tell us: "another repo imports THIS file we just changed"
55
+ const inboundEdgesFromChanges = [];
56
+ for (const changedFile of changedFilesSorted) {
57
+ const edges = (0, cross_repo_graph_1.getEdgesPointingToFile)(crossRepoGraph, primaryRepoName, changedFile);
58
+ inboundEdgesFromChanges.push(...edges);
59
+ }
60
+ const combinedEdges = [...allEdgesFromChanges, ...inboundEdgesFromChanges];
61
+ if (combinedEdges.length > MAX_FEDERATED_TOTAL_EDGES) {
62
+ truncationReasons.push(`total cross-repo edges capped at ${MAX_FEDERATED_TOTAL_EDGES} (had ${combinedEdges.length})`);
63
+ }
64
+ // Step 4: Resolve downstream repos — repos that DEPEND ON the primary repo
65
+ // When the primary repo's API/contract changes, these are at risk
66
+ const downstreamRepoNames = (0, cross_repo_graph_1.getDownstreamRepos)(crossRepoGraph, primaryRepoName);
67
+ const affectedDownstreamRepos = downstreamRepoNames
68
+ .map((repoName) => {
69
+ const repoConfig = repos.find((r) => r.name === repoName);
70
+ if (!repoConfig)
71
+ return null;
72
+ const relevantEdges = inboundEdgesFromChanges
73
+ .filter((e) => e.fromRepo === repoName)
74
+ .sort((a, b) => confidenceRank(b.confidence) - confidenceRank(a.confidence));
75
+ // Find file-level affected files in this downstream repo
76
+ const affectedFiles = resolveAffectedFilesInRepo(repoConfig, relevantEdges, brainMaps[repoName] ?? null);
77
+ const riskLevel = deriveRiskLevel(relevantEdges);
78
+ const requiresCoordinatedDeploy = relevantEdges.some((e) => e.confidence === 'high' &&
79
+ ['shared-contract', 'grpc-client', 'openapi-client'].includes(e.via));
80
+ return {
81
+ repoName,
82
+ repoRoot: repoConfig.rootPath,
83
+ affectedFiles,
84
+ couplingEdges: relevantEdges,
85
+ riskLevel,
86
+ requiresCoordinatedDeploy,
87
+ };
88
+ })
89
+ .filter((r) => r !== null);
90
+ // Step 5: Resolve upstream repos — repos that the primary repo calls
91
+ // When changed files touch those call sites, upstream context matters
92
+ const upstreamRepoNames = (0, cross_repo_graph_1.getUpstreamRepos)(crossRepoGraph, primaryRepoName);
93
+ const relevantUpstreamRepos = upstreamRepoNames
94
+ .filter((repoName) => !repoName.startsWith('external:'))
95
+ .map((repoName) => {
96
+ const repoConfig = repos.find((r) => r.name === repoName);
97
+ if (!repoConfig)
98
+ return null;
99
+ const relevantEdges = allEdgesFromChanges
100
+ .filter((e) => e.toRepo === repoName)
101
+ .sort((a, b) => confidenceRank(b.confidence) - confidenceRank(a.confidence));
102
+ if (relevantEdges.length === 0)
103
+ return null; // upstream but no edge from changed files
104
+ const affectedFiles = resolveAffectedFilesInRepo(repoConfig, relevantEdges, brainMaps[repoName] ?? null);
105
+ const riskLevel = deriveRiskLevel(relevantEdges);
106
+ const requiresCoordinatedDeploy = relevantEdges.some((e) => e.confidence === 'high' &&
107
+ ['shared-contract', 'grpc-client', 'openapi-client'].includes(e.via));
108
+ return {
109
+ repoName,
110
+ repoRoot: repoConfig.rootPath,
111
+ affectedFiles,
112
+ couplingEdges: relevantEdges,
113
+ riskLevel,
114
+ requiresCoordinatedDeploy,
115
+ };
116
+ })
117
+ .filter((r) => r !== null);
118
+ // Step 6: Compute federated blindspots
119
+ const federatedBlindSpots = computeFederatedBlindSpots(repos, primaryRepoName, changedFilesSorted, crossRepoGraph);
120
+ let downstreamExport = affectedDownstreamRepos;
121
+ if (downstreamExport.length > MAX_FEDERATED_DOWNSTREAM_REPOS) {
122
+ truncationReasons.push(`downstream repos capped at ${MAX_FEDERATED_DOWNSTREAM_REPOS} (had ${downstreamExport.length})`);
123
+ downstreamExport = downstreamExport
124
+ .slice()
125
+ .sort((a, b) => a.repoName.localeCompare(b.repoName))
126
+ .slice(0, MAX_FEDERATED_DOWNSTREAM_REPOS);
127
+ }
128
+ let upstreamExport = relevantUpstreamRepos;
129
+ if (upstreamExport.length > MAX_FEDERATED_UPSTREAM_REPOS) {
130
+ truncationReasons.push(`upstream repos capped at ${MAX_FEDERATED_UPSTREAM_REPOS} (had ${upstreamExport.length})`);
131
+ upstreamExport = upstreamExport
132
+ .slice()
133
+ .sort((a, b) => a.repoName.localeCompare(b.repoName))
134
+ .slice(0, MAX_FEDERATED_UPSTREAM_REPOS);
135
+ }
136
+ const edgeTotal = Math.min(combinedEdges.length, MAX_FEDERATED_TOTAL_EDGES);
137
+ const coordinatedExport = [
138
+ ...downstreamExport.filter((r) => r.requiresCoordinatedDeploy).map((r) => r.repoName),
139
+ ...upstreamExport.filter((r) => r.requiresCoordinatedDeploy).map((r) => r.repoName),
140
+ ];
141
+ const summary = {
142
+ totalCrossRepoEdgesFromChangedFiles: edgeTotal,
143
+ downstreamRepoCount: downstreamExport.length,
144
+ upstreamRepoCount: upstreamExport.length,
145
+ highConfidenceEdgeCount: combinedEdges
146
+ .filter((e) => e.confidence === 'high')
147
+ .slice(0, MAX_FEDERATED_TOTAL_EDGES)
148
+ .length,
149
+ requiresCoordinatedDeploy: coordinatedExport.length > 0,
150
+ coordinatedDeployRepos: [...new Set(coordinatedExport)].sort(),
151
+ };
152
+ const federationBoundary = {
153
+ maxCrossRepoDepth: 1,
154
+ maxDownstreamReposIncluded: MAX_FEDERATED_DOWNSTREAM_REPOS,
155
+ maxUpstreamReposIncluded: MAX_FEDERATED_UPSTREAM_REPOS,
156
+ maxTotalEdges: MAX_FEDERATED_TOTAL_EDGES,
157
+ traversalOrdering: 'deterministic-alpha',
158
+ truncated: truncationReasons.length > 0,
159
+ truncationReasons,
160
+ };
161
+ return {
162
+ generatedAt: new Date().toISOString(),
163
+ workspaceName,
164
+ primaryRepo: primaryRepoName,
165
+ changedFiles: changedFilesSorted,
166
+ crossRepoGraph,
167
+ affectedDownstreamRepos: downstreamExport,
168
+ relevantUpstreamRepos: upstreamExport,
169
+ federatedBlindSpots,
170
+ summary,
171
+ federationBoundary,
172
+ };
173
+ }
174
+ // ── Helpers ───────────────────────────────────────────────────────────────────
175
+ function confidenceRank(c) {
176
+ return c === 'high' ? 3 : c === 'medium' ? 2 : 1;
177
+ }
178
+ function deriveRiskLevel(edges) {
179
+ if (edges.some((e) => e.confidence === 'high'))
180
+ return 'high';
181
+ if (edges.some((e) => e.confidence === 'medium'))
182
+ return 'medium';
183
+ return 'low';
184
+ }
185
+ /**
186
+ * Given edges pointing to/from a repo and its brain map,
187
+ * identify specific files in that repo that are likely affected.
188
+ */
189
+ function resolveAffectedFilesInRepo(repoConfig, edges, brainMap) {
190
+ const result = [];
191
+ const seen = new Set();
192
+ for (const edge of edges) {
193
+ // If the edge pins a specific file in this repo, include it
194
+ if (edge.toFile && !seen.has(edge.toFile)) {
195
+ seen.add(edge.toFile);
196
+ result.push({
197
+ file: edge.toFile,
198
+ reason: edge.impactSummary,
199
+ });
200
+ }
201
+ // For shared-contract edges, find the defining file in brain map
202
+ if (edge.via === 'shared-contract' && brainMap) {
203
+ const contractKeyword = edge.evidence[0]
204
+ ?.match(/['"]([^'"]+)['"]/)?.[1]
205
+ ?.split('/')
206
+ .pop()
207
+ ?.replace(/-/g, '') ?? '';
208
+ if (contractKeyword) {
209
+ for (const filePath of Object.keys(brainMap.files)) {
210
+ const norm = filePath.toLowerCase().replace(/[-./]/g, '');
211
+ if (norm.includes(contractKeyword.toLowerCase()) && !seen.has(filePath)) {
212
+ seen.add(filePath);
213
+ result.push({
214
+ file: filePath,
215
+ reason: `Shared contract type definition affected by upstream change`,
216
+ });
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ return result;
223
+ }
224
+ /**
225
+ * Compute structural blindspots in federated context.
226
+ *
227
+ * These are coupling patterns that exist at infrastructure/config level
228
+ * and cannot be detected by scanning source code.
229
+ */
230
+ function computeFederatedBlindSpots(repos, primaryRepoName, changedFiles, graph) {
231
+ const spots = [];
232
+ const allRepoNames = repos.filter((r) => r.name !== primaryRepoName).map((r) => r.name);
233
+ // Blindspot 1: Infrastructure-level service routing
234
+ // API gateways, service meshes (Istio/Envoy), and load balancers route
235
+ // traffic based on config files that are not in source code
236
+ const hasApiRouteChanges = changedFiles.some((f) => /route|controller|handler|endpoint/i.test(f));
237
+ if (hasApiRouteChanges) {
238
+ spots.push({
239
+ description: 'API route changes may affect service mesh routing rules (Istio VirtualServices, ' +
240
+ 'Kong routes, nginx upstreams) that are defined in infrastructure repos not scanned here.',
241
+ potentialRepos: allRepoNames,
242
+ structuralGap: 'infra-routing-config',
243
+ });
244
+ }
245
+ // Blindspot 2: Runtime service discovery
246
+ // Services registered in consul/etcd/k8s service registry are resolved at runtime.
247
+ // Code scanning cannot see this registration.
248
+ const detectedEnvServiceUrls = graph.edges.filter((e) => e.fromRepo === primaryRepoName && e.via === 'env-service-url');
249
+ if (detectedEnvServiceUrls.length > 0) {
250
+ spots.push({
251
+ description: 'Service URLs resolved via environment variables at runtime — the actual target ' +
252
+ 'service depends on deployment configuration (Kubernetes ConfigMaps, Vault, ' +
253
+ 'cloud parameter stores) not visible to static analysis.',
254
+ potentialRepos: allRepoNames,
255
+ structuralGap: 'runtime-service-discovery',
256
+ });
257
+ }
258
+ // Blindspot 3: Sidecar proxy / service mesh config
259
+ const hasAuthChanges = changedFiles.some((f) => /auth|jwt|token|session|rbac|permission/i.test(f));
260
+ if (hasAuthChanges) {
261
+ spots.push({
262
+ description: 'Authentication changes may affect sidecar proxy config (Envoy JWT filters, ' +
263
+ 'Istio AuthorizationPolicies) applied at the mesh level across ALL services ' +
264
+ 'without code-level imports.',
265
+ potentialRepos: allRepoNames,
266
+ structuralGap: 'sidecar-proxy-config',
267
+ });
268
+ }
269
+ // Blindspot 4: Feature flag routing
270
+ // Feature flags can route traffic to different service versions at runtime
271
+ const hasFeatureFlagChanges = changedFiles.some((f) => /feature|flag|experiment|variant|rollout|toggle/i.test(f));
272
+ if (hasFeatureFlagChanges) {
273
+ spots.push({
274
+ description: 'Feature flag changes may affect runtime traffic routing across services ' +
275
+ '(LaunchDarkly, Unleash, custom flag evaluators). The set of affected services ' +
276
+ 'depends on flag evaluation trees not visible in source code.',
277
+ potentialRepos: allRepoNames,
278
+ structuralGap: 'feature-flag-routing',
279
+ });
280
+ }
281
+ // Blindspot 5: Shared DB state (services sharing a database)
282
+ const hasDbChanges = changedFiles.some((f) => /migration|schema|entity|model|repository|prisma/i.test(f));
283
+ if (hasDbChanges) {
284
+ const dbEdgeRepos = graph.edges
285
+ .filter((e) => e.fromRepo === primaryRepoName && e.via === 'db-shared-schema')
286
+ .map((e) => e.toRepo);
287
+ spots.push({
288
+ description: 'Database schema/migration changes may affect other services that share the ' +
289
+ 'same database. Without explicit db-shared-schema edges detected in code, ' +
290
+ 'the full set of affected services cannot be determined statically.',
291
+ potentialRepos: dbEdgeRepos.length > 0 ? dbEdgeRepos : allRepoNames,
292
+ structuralGap: 'db-shared-state',
293
+ });
294
+ }
295
+ // Blindspot 6: Compiled proto drift
296
+ const hasProtoChanges = changedFiles.some((f) => /\.proto$|proto\//i.test(f));
297
+ if (hasProtoChanges) {
298
+ spots.push({
299
+ description: 'Proto schema changes require regenerating clients in ALL consuming services. ' +
300
+ 'Services that import generated stubs from a registry (npm, artifact store) ' +
301
+ 'may not have a code-level import that traces back to this proto file.',
302
+ potentialRepos: allRepoNames,
303
+ structuralGap: 'compiled-proto-drift',
304
+ });
305
+ }
306
+ return spots;
307
+ }
308
+ // ── Formatting Helpers (for CLI / dashboard rendering) ────────────────────────
309
+ function formatFederatedContextSummary(pkg) {
310
+ const lines = [];
311
+ lines.push(`Federated Context: ${pkg.workspaceName}`);
312
+ lines.push(`Primary repo: ${pkg.primaryRepo}`);
313
+ lines.push(`Changed files: ${pkg.changedFiles.length}`);
314
+ lines.push('');
315
+ if (pkg.summary.requiresCoordinatedDeploy) {
316
+ lines.push(`⚠️ Coordinated deploy required: ${pkg.summary.coordinatedDeployRepos.join(', ')}`);
317
+ lines.push('');
318
+ }
319
+ if (pkg.affectedDownstreamRepos.length > 0) {
320
+ lines.push(`Downstream repos affected (${pkg.affectedDownstreamRepos.length}):`);
321
+ for (const repo of pkg.affectedDownstreamRepos) {
322
+ const risk = repo.riskLevel === 'high' ? '🔴' : repo.riskLevel === 'medium' ? '🟡' : '🟢';
323
+ const coordFlag = repo.requiresCoordinatedDeploy ? ' [coordinated-deploy]' : '';
324
+ lines.push(` ${risk} ${repo.repoName}${coordFlag}`);
325
+ for (const edge of repo.couplingEdges.slice(0, 2)) {
326
+ lines.push(` via ${edge.via} (${edge.confidence}) — ${edge.impactSummary}`);
327
+ }
328
+ }
329
+ lines.push('');
330
+ }
331
+ if (pkg.relevantUpstreamRepos.length > 0) {
332
+ lines.push(`Upstream repos in scope (${pkg.relevantUpstreamRepos.length}):`);
333
+ for (const repo of pkg.relevantUpstreamRepos) {
334
+ const risk = repo.riskLevel === 'high' ? '🔴' : repo.riskLevel === 'medium' ? '🟡' : '🟢';
335
+ lines.push(` ${risk} ${repo.repoName}`);
336
+ }
337
+ lines.push('');
338
+ }
339
+ if (pkg.federatedBlindSpots.length > 0) {
340
+ lines.push(`Structural blindspots (${pkg.federatedBlindSpots.length}):`);
341
+ for (const spot of pkg.federatedBlindSpots) {
342
+ lines.push(` ⚡ [${spot.structuralGap}] ${spot.description.slice(0, 120)}...`);
343
+ }
344
+ }
345
+ return lines.join('\n');
346
+ }
347
+ //# sourceMappingURL=federated-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"federated-context.js","sourceRoot":"","sources":["../../src/workspace/federated-context.ts"],"names":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AK,CAAC,IAAI,CAAC,0BAA0B,GAAG,CAAC,mBAAmB,CAAC,MAAM,IAAI,CAAC,CAAC;QACzE,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,mBAAmB,EAAE,CAAC;YAC3C,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Neurcode Workspace Intelligence Layer
3
+ *
4
+ * Provides cross-repo context building for multi-service architectures.
5
+ *
6
+ * Architecture overview:
7
+ *
8
+ * WorkspaceDefinition (workspace-runtime.ts)
9
+ * └─ repos: WorkspaceRepository[] ← topology declaration
10
+ *
11
+ * CrossRepoGraph (cross-repo-graph.ts)
12
+ * └─ edges: CrossRepoEdge[] ← detected coupling (code-level)
13
+ * via: http-client | grpc-client | event-publish | event-subscribe
14
+ * | shared-contract | env-service-url | openapi-client | db-shared-schema
15
+ * confidence: high | medium | low
16
+ *
17
+ * FederatedContextPackage (federated-context.ts)
18
+ * └─ affectedDownstreamRepos[] ← repos that call the changed files
19
+ * └─ relevantUpstreamRepos[] ← repos being called by changed code
20
+ * └─ federatedBlindSpots[] ← coupling invisible to code scanning
21
+ * └─ summary.requiresCoordinatedDeploy ← true = must deploy together
22
+ *
23
+ * Usage:
24
+ * import { buildFederatedContext } from '@neurcode-ai/cli/workspace';
25
+ *
26
+ * const context = buildFederatedContext({
27
+ * workspaceName: 'platform',
28
+ * repos: workspaceDefinition.repositories,
29
+ * primaryRepoName: 'auth-service',
30
+ * changedFiles: ['src/auth/jwt.service.ts'],
31
+ * brainMaps: { 'auth-service': authBrain, 'billing-service': billingBrain },
32
+ * });
33
+ *
34
+ * console.log(formatFederatedContextSummary(context));
35
+ */
36
+ export { buildCrossRepoGraph, getDownstreamRepos, getEdgesForFile, getEdgesPointingToFile, getUpstreamRepos, type CrossRepoBuildOptions, type CrossRepoEdge, type CrossRepoEdgeConfidence, type CrossRepoEdgeVia, type CrossRepoGraph, } from './cross-repo-graph';
37
+ export { buildFederatedContext, formatFederatedContextSummary, type AffectedRepoContext, type FederatedBlindSpot, type FederatedContextBuildInput, type FederatedContextPackage, type FederatedExpansionBoundary, } from './federated-context';
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,GAChC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Neurcode Workspace Intelligence Layer
4
+ *
5
+ * Provides cross-repo context building for multi-service architectures.
6
+ *
7
+ * Architecture overview:
8
+ *
9
+ * WorkspaceDefinition (workspace-runtime.ts)
10
+ * └─ repos: WorkspaceRepository[] ← topology declaration
11
+ *
12
+ * CrossRepoGraph (cross-repo-graph.ts)
13
+ * └─ edges: CrossRepoEdge[] ← detected coupling (code-level)
14
+ * via: http-client | grpc-client | event-publish | event-subscribe
15
+ * | shared-contract | env-service-url | openapi-client | db-shared-schema
16
+ * confidence: high | medium | low
17
+ *
18
+ * FederatedContextPackage (federated-context.ts)
19
+ * └─ affectedDownstreamRepos[] ← repos that call the changed files
20
+ * └─ relevantUpstreamRepos[] ← repos being called by changed code
21
+ * └─ federatedBlindSpots[] ← coupling invisible to code scanning
22
+ * └─ summary.requiresCoordinatedDeploy ← true = must deploy together
23
+ *
24
+ * Usage:
25
+ * import { buildFederatedContext } from '@neurcode-ai/cli/workspace';
26
+ *
27
+ * const context = buildFederatedContext({
28
+ * workspaceName: 'platform',
29
+ * repos: workspaceDefinition.repositories,
30
+ * primaryRepoName: 'auth-service',
31
+ * changedFiles: ['src/auth/jwt.service.ts'],
32
+ * brainMaps: { 'auth-service': authBrain, 'billing-service': billingBrain },
33
+ * });
34
+ *
35
+ * console.log(formatFederatedContextSummary(context));
36
+ */
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.formatFederatedContextSummary = exports.buildFederatedContext = exports.getUpstreamRepos = exports.getEdgesPointingToFile = exports.getEdgesForFile = exports.getDownstreamRepos = exports.buildCrossRepoGraph = void 0;
39
+ var cross_repo_graph_1 = require("./cross-repo-graph");
40
+ Object.defineProperty(exports, "buildCrossRepoGraph", { enumerable: true, get: function () { return cross_repo_graph_1.buildCrossRepoGraph; } });
41
+ Object.defineProperty(exports, "getDownstreamRepos", { enumerable: true, get: function () { return cross_repo_graph_1.getDownstreamRepos; } });
42
+ Object.defineProperty(exports, "getEdgesForFile", { enumerable: true, get: function () { return cross_repo_graph_1.getEdgesForFile; } });
43
+ Object.defineProperty(exports, "getEdgesPointingToFile", { enumerable: true, get: function () { return cross_repo_graph_1.getEdgesPointingToFile; } });
44
+ Object.defineProperty(exports, "getUpstreamRepos", { enumerable: true, get: function () { return cross_repo_graph_1.getUpstreamRepos; } });
45
+ var federated_context_1 = require("./federated-context");
46
+ Object.defineProperty(exports, "buildFederatedContext", { enumerable: true, get: function () { return federated_context_1.buildFederatedContext; } });
47
+ Object.defineProperty(exports, "formatFederatedContextSummary", { enumerable: true, get: function () { return federated_context_1.formatFederatedContextSummary; } });
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;AAEH,uDAW4B;AAV1B,uHAAA,mBAAmB,OAAA;AACnB,sHAAA,kBAAkB,OAAA;AAClB,mHAAA,eAAe,OAAA;AACf,0HAAA,sBAAsB,OAAA;AACtB,oHAAA,gBAAgB,OAAA;AAQlB,yDAQ6B;AAP3B,0HAAA,qBAAqB,OAAA;AACrB,kIAAA,6BAA6B,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neurcode-ai/cli",
3
- "version": "0.9.64",
3
+ "version": "0.9.65",
4
4
  "description": "Neurcode CLI - AI code governance and diff analysis",
5
5
  "bin": {
6
6
  "neurcode": "dist/index.js"
@@ -11,12 +11,6 @@
11
11
  "dist",
12
12
  "README.md"
13
13
  ],
14
- "scripts": {
15
- "build": "rm -rf dist && tsc && chmod +x dist/index.js",
16
- "dev": "tsc --watch",
17
- "start": "node dist/index.js",
18
- "prepublishOnly": "npm run build"
19
- },
20
14
  "keywords": [
21
15
  "cli",
22
16
  "code-governance",
@@ -56,7 +50,8 @@
56
50
  "open": "^10.1.0",
57
51
  "ts-morph": "^24.0.0",
58
52
  "uuid": "^9.0.1",
59
- "zod": "^4.3.5"
53
+ "zod": "^4.3.5",
54
+ "@neurcode-ai/telemetry": "0.1.0"
60
55
  },
61
56
  "publishConfig": {
62
57
  "access": "public"
@@ -67,5 +62,10 @@
67
62
  "@types/node": "^20.10.0",
68
63
  "@types/uuid": "^9.0.8",
69
64
  "typescript": "^5.3.0"
65
+ },
66
+ "scripts": {
67
+ "build": "rm -rf dist && tsc && chmod +x dist/index.js",
68
+ "dev": "tsc --watch",
69
+ "start": "node dist/index.js"
70
70
  }
71
- }
71
+ }