@neurcode-ai/cli 0.14.0 → 0.15.1

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 (189) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +60 -8
  3. package/dist/api-client.d.ts +284 -0
  4. package/dist/api-client.d.ts.map +1 -1
  5. package/dist/api-client.js +111 -0
  6. package/dist/api-client.js.map +1 -1
  7. package/dist/commands/activate.d.ts +82 -0
  8. package/dist/commands/activate.d.ts.map +1 -0
  9. package/dist/commands/activate.js +551 -0
  10. package/dist/commands/activate.js.map +1 -0
  11. package/dist/commands/admission.d.ts +67 -0
  12. package/dist/commands/admission.d.ts.map +1 -0
  13. package/dist/commands/admission.js +350 -0
  14. package/dist/commands/admission.js.map +1 -0
  15. package/dist/commands/agent.d.ts +3 -0
  16. package/dist/commands/agent.d.ts.map +1 -0
  17. package/dist/commands/agent.js +2045 -0
  18. package/dist/commands/agent.js.map +1 -0
  19. package/dist/commands/demo.d.ts +3 -0
  20. package/dist/commands/demo.d.ts.map +1 -0
  21. package/dist/commands/demo.js +102 -0
  22. package/dist/commands/demo.js.map +1 -0
  23. package/dist/commands/init.d.ts.map +1 -1
  24. package/dist/commands/init.js +58 -44
  25. package/dist/commands/init.js.map +1 -1
  26. package/dist/commands/login.d.ts +1 -1
  27. package/dist/commands/login.d.ts.map +1 -1
  28. package/dist/commands/login.js +44 -22
  29. package/dist/commands/login.js.map +1 -1
  30. package/dist/commands/profile.d.ts +14 -0
  31. package/dist/commands/profile.d.ts.map +1 -0
  32. package/dist/commands/profile.js +118 -0
  33. package/dist/commands/profile.js.map +1 -0
  34. package/dist/commands/quickstart.d.ts +2 -2
  35. package/dist/commands/quickstart.d.ts.map +1 -1
  36. package/dist/commands/quickstart.js +31 -30
  37. package/dist/commands/quickstart.js.map +1 -1
  38. package/dist/commands/remediate-export.d.ts +6 -1
  39. package/dist/commands/remediate-export.d.ts.map +1 -1
  40. package/dist/commands/remediate-export.js +359 -7
  41. package/dist/commands/remediate-export.js.map +1 -1
  42. package/dist/commands/replay.d.ts.map +1 -1
  43. package/dist/commands/replay.js +84 -0
  44. package/dist/commands/replay.js.map +1 -1
  45. package/dist/commands/run.d.ts +3 -0
  46. package/dist/commands/run.d.ts.map +1 -0
  47. package/dist/commands/run.js +98 -0
  48. package/dist/commands/run.js.map +1 -0
  49. package/dist/commands/runtime-adapter.d.ts +8 -0
  50. package/dist/commands/runtime-adapter.d.ts.map +1 -0
  51. package/dist/commands/runtime-adapter.js +375 -0
  52. package/dist/commands/runtime-adapter.js.map +1 -0
  53. package/dist/commands/runtime-doctor.d.ts +6 -0
  54. package/dist/commands/runtime-doctor.d.ts.map +1 -0
  55. package/dist/commands/runtime-doctor.js +478 -0
  56. package/dist/commands/runtime-doctor.js.map +1 -0
  57. package/dist/commands/runtime-report.d.ts +13 -0
  58. package/dist/commands/runtime-report.d.ts.map +1 -0
  59. package/dist/commands/runtime-report.js +81 -0
  60. package/dist/commands/runtime-report.js.map +1 -0
  61. package/dist/commands/runtime-sync.d.ts +17 -0
  62. package/dist/commands/runtime-sync.d.ts.map +1 -0
  63. package/dist/commands/runtime-sync.js +656 -0
  64. package/dist/commands/runtime-sync.js.map +1 -0
  65. package/dist/commands/runtime.d.ts +16 -0
  66. package/dist/commands/runtime.d.ts.map +1 -0
  67. package/dist/commands/runtime.js +380 -0
  68. package/dist/commands/runtime.js.map +1 -0
  69. package/dist/commands/session-hook.d.ts +35 -0
  70. package/dist/commands/session-hook.d.ts.map +1 -0
  71. package/dist/commands/session-hook.js +1297 -0
  72. package/dist/commands/session-hook.js.map +1 -0
  73. package/dist/commands/session.d.ts +91 -0
  74. package/dist/commands/session.d.ts.map +1 -1
  75. package/dist/commands/session.js +1226 -0
  76. package/dist/commands/session.js.map +1 -1
  77. package/dist/commands/whoami.d.ts +7 -4
  78. package/dist/commands/whoami.d.ts.map +1 -1
  79. package/dist/commands/whoami.js +59 -34
  80. package/dist/commands/whoami.js.map +1 -1
  81. package/dist/config.d.ts.map +1 -1
  82. package/dist/config.js +24 -5
  83. package/dist/config.js.map +1 -1
  84. package/dist/daemon/routes.d.ts.map +1 -1
  85. package/dist/daemon/routes.js +8 -0
  86. package/dist/daemon/routes.js.map +1 -1
  87. package/dist/daemon/server.d.ts.map +1 -1
  88. package/dist/daemon/server.js +88 -0
  89. package/dist/daemon/server.js.map +1 -1
  90. package/dist/governance/impact-analysis.d.ts +27 -0
  91. package/dist/governance/impact-analysis.d.ts.map +1 -0
  92. package/dist/governance/impact-analysis.js +274 -0
  93. package/dist/governance/impact-analysis.js.map +1 -0
  94. package/dist/index.js +472 -29
  95. package/dist/index.js.map +1 -1
  96. package/dist/intent-engine/matcher.d.ts.map +1 -1
  97. package/dist/intent-engine/matcher.js +3 -12
  98. package/dist/intent-engine/matcher.js.map +1 -1
  99. package/dist/utils/admission-artifact.d.ts +59 -0
  100. package/dist/utils/admission-artifact.d.ts.map +1 -0
  101. package/dist/utils/admission-artifact.js +410 -0
  102. package/dist/utils/admission-artifact.js.map +1 -0
  103. package/dist/utils/agent-adapter-setup.d.ts +80 -0
  104. package/dist/utils/agent-adapter-setup.d.ts.map +1 -0
  105. package/dist/utils/agent-adapter-setup.js +577 -0
  106. package/dist/utils/agent-adapter-setup.js.map +1 -0
  107. package/dist/utils/agent-guard-supervisor.d.ts +75 -0
  108. package/dist/utils/agent-guard-supervisor.d.ts.map +1 -0
  109. package/dist/utils/agent-guard-supervisor.js +388 -0
  110. package/dist/utils/agent-guard-supervisor.js.map +1 -0
  111. package/dist/utils/agent-guard.d.ts +92 -0
  112. package/dist/utils/agent-guard.d.ts.map +1 -0
  113. package/dist/utils/agent-guard.js +326 -0
  114. package/dist/utils/agent-guard.js.map +1 -0
  115. package/dist/utils/agent-session-launcher.d.ts +89 -0
  116. package/dist/utils/agent-session-launcher.d.ts.map +1 -0
  117. package/dist/utils/agent-session-launcher.js +308 -0
  118. package/dist/utils/agent-session-launcher.js.map +1 -0
  119. package/dist/utils/bash-command-analysis.d.ts +19 -0
  120. package/dist/utils/bash-command-analysis.d.ts.map +1 -0
  121. package/dist/utils/bash-command-analysis.js +295 -0
  122. package/dist/utils/bash-command-analysis.js.map +1 -0
  123. package/dist/utils/consequence-nudges.d.ts +30 -0
  124. package/dist/utils/consequence-nudges.d.ts.map +1 -0
  125. package/dist/utils/consequence-nudges.js +313 -0
  126. package/dist/utils/consequence-nudges.js.map +1 -0
  127. package/dist/utils/drift-intelligence.d.ts.map +1 -1
  128. package/dist/utils/drift-intelligence.js +29 -7
  129. package/dist/utils/drift-intelligence.js.map +1 -1
  130. package/dist/utils/git-coverage.d.ts +57 -0
  131. package/dist/utils/git-coverage.d.ts.map +1 -0
  132. package/dist/utils/git-coverage.js +302 -0
  133. package/dist/utils/git-coverage.js.map +1 -0
  134. package/dist/utils/gitignore.d.ts.map +1 -1
  135. package/dist/utils/gitignore.js +2 -1
  136. package/dist/utils/gitignore.js.map +1 -1
  137. package/dist/utils/governed-intent.d.ts +10 -0
  138. package/dist/utils/governed-intent.d.ts.map +1 -0
  139. package/dist/utils/governed-intent.js +108 -0
  140. package/dist/utils/governed-intent.js.map +1 -0
  141. package/dist/utils/hook-heartbeat.d.ts +55 -0
  142. package/dist/utils/hook-heartbeat.d.ts.map +1 -0
  143. package/dist/utils/hook-heartbeat.js +116 -0
  144. package/dist/utils/hook-heartbeat.js.map +1 -0
  145. package/dist/utils/intent-continuity.d.ts +21 -0
  146. package/dist/utils/intent-continuity.d.ts.map +1 -0
  147. package/dist/utils/intent-continuity.js +192 -0
  148. package/dist/utils/intent-continuity.js.map +1 -0
  149. package/dist/utils/messages.d.ts +1 -1
  150. package/dist/utils/messages.d.ts.map +1 -1
  151. package/dist/utils/messages.js +24 -21
  152. package/dist/utils/messages.js.map +1 -1
  153. package/dist/utils/runtime-companion.d.ts +137 -0
  154. package/dist/utils/runtime-companion.d.ts.map +1 -0
  155. package/dist/utils/runtime-companion.js +231 -0
  156. package/dist/utils/runtime-companion.js.map +1 -0
  157. package/dist/utils/runtime-connection.d.ts +46 -0
  158. package/dist/utils/runtime-connection.d.ts.map +1 -0
  159. package/dist/utils/runtime-connection.js +148 -0
  160. package/dist/utils/runtime-connection.js.map +1 -0
  161. package/dist/utils/runtime-evidence.d.ts +68 -0
  162. package/dist/utils/runtime-evidence.d.ts.map +1 -0
  163. package/dist/utils/runtime-evidence.js +248 -0
  164. package/dist/utils/runtime-evidence.js.map +1 -0
  165. package/dist/utils/runtime-live.d.ts +33 -0
  166. package/dist/utils/runtime-live.d.ts.map +1 -0
  167. package/dist/utils/runtime-live.js +361 -0
  168. package/dist/utils/runtime-live.js.map +1 -0
  169. package/dist/utils/runtime-outbox.d.ts +76 -0
  170. package/dist/utils/runtime-outbox.d.ts.map +1 -0
  171. package/dist/utils/runtime-outbox.js +410 -0
  172. package/dist/utils/runtime-outbox.js.map +1 -0
  173. package/dist/utils/runtime-receipt.d.ts +50 -0
  174. package/dist/utils/runtime-receipt.d.ts.map +1 -0
  175. package/dist/utils/runtime-receipt.js +223 -0
  176. package/dist/utils/runtime-receipt.js.map +1 -0
  177. package/dist/utils/state.d.ts +21 -0
  178. package/dist/utils/state.d.ts.map +1 -1
  179. package/dist/utils/state.js +30 -0
  180. package/dist/utils/state.js.map +1 -1
  181. package/dist/utils/structural-understanding.d.ts +334 -0
  182. package/dist/utils/structural-understanding.d.ts.map +1 -0
  183. package/dist/utils/structural-understanding.js +2316 -0
  184. package/dist/utils/structural-understanding.js.map +1 -0
  185. package/dist/utils/v0-governance.d.ts +197 -0
  186. package/dist/utils/v0-governance.d.ts.map +1 -0
  187. package/dist/utils/v0-governance.js +904 -0
  188. package/dist/utils/v0-governance.js.map +1 -0
  189. package/package.json +11 -12
@@ -0,0 +1,231 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RUNTIME_COMPANION_SCHEMA_VERSION = void 0;
4
+ exports.invalidateRuntimeCompanionFreshness = invalidateRuntimeCompanionFreshness;
5
+ exports.buildRuntimeCompanionSnapshot = buildRuntimeCompanionSnapshot;
6
+ exports.approveRuntimeCompanionPath = approveRuntimeCompanionPath;
7
+ exports.refreshRuntimeCompanionProfile = refreshRuntimeCompanionProfile;
8
+ exports.runtimeCompanionSession = runtimeCompanionSession;
9
+ const governance_runtime_1 = require("@neurcode-ai/governance-runtime");
10
+ const v0_governance_1 = require("./v0-governance");
11
+ const agent_session_launcher_1 = require("./agent-session-launcher");
12
+ const runtime_outbox_1 = require("./runtime-outbox");
13
+ const runtime_connection_1 = require("./runtime-connection");
14
+ exports.RUNTIME_COMPANION_SCHEMA_VERSION = 'neurcode.runtime-companion.v1';
15
+ const PROFILE_FRESHNESS_CACHE_MS = 5_000;
16
+ const freshnessCache = new Map();
17
+ function pendingAmendments(session) {
18
+ return (session.contract.planAmendmentProposals ?? [])
19
+ .filter((proposal) => proposal.status === 'pending')
20
+ .map((proposal) => ({
21
+ proposalId: proposal.proposalId,
22
+ action: proposal.action,
23
+ proposedBy: proposal.proposedBy,
24
+ reason: proposal.reason,
25
+ riskLevel: proposal.risk.level,
26
+ addedFiles: [...proposal.risk.addedFiles],
27
+ addedGlobs: [...proposal.risk.addedGlobs],
28
+ removedConstraints: [...proposal.risk.removedConstraints],
29
+ createdAt: proposal.createdAt,
30
+ }));
31
+ }
32
+ function shapePlan(session) {
33
+ const plan = session.contract.agentPlan;
34
+ if (!plan)
35
+ return null;
36
+ return {
37
+ revision: session.contract.agentPlanRevision ?? 1,
38
+ summary: plan.summary,
39
+ steps: [...plan.steps],
40
+ expectedFiles: [...plan.expectedFiles],
41
+ expectedGlobs: [...plan.expectedGlobs],
42
+ constraints: [...plan.constraints],
43
+ risks: [...plan.risks],
44
+ capturedAt: plan.capturedAt,
45
+ source: plan.source,
46
+ confidence: plan.confidence,
47
+ pendingAmendments: pendingAmendments(session),
48
+ };
49
+ }
50
+ function shapeWaivers(waivers) {
51
+ return waivers.map((waiver) => ({
52
+ obligationId: waiver.obligationId,
53
+ reason: waiver.reason,
54
+ waivedAt: waiver.waivedAt,
55
+ expiresAt: waiver.expiresAt,
56
+ waivedBy: waiver.waivedBy,
57
+ }));
58
+ }
59
+ function shapeObligations(session) {
60
+ const items = session.contract.architectureObligations ?? [];
61
+ const waivers = (0, governance_runtime_1.activeArchitectureObligationWaivers)(session.contract.architectureObligationWaivers ?? []);
62
+ return {
63
+ policy: (0, governance_runtime_1.normalizeArchitectureObligationPolicy)(session.contract.architectureObligationPolicy),
64
+ summary: (0, governance_runtime_1.summarizeArchitectureObligations)(items),
65
+ items: items.map((item) => ({
66
+ id: item.id,
67
+ category: item.category,
68
+ title: item.title,
69
+ description: item.description,
70
+ severity: item.severity,
71
+ status: item.status,
72
+ requiredEvidence: [...item.requiredEvidence],
73
+ observedEvidence: item.observedEvidence.map((evidence) => ({ ...evidence })),
74
+ ...(item.requiredPath ? { requiredPath: item.requiredPath } : {}),
75
+ ...(item.effectiveMode ? { effectiveMode: item.effectiveMode } : {}),
76
+ })),
77
+ activeWaivers: shapeWaivers(waivers),
78
+ };
79
+ }
80
+ function extractApprovalContext(event) {
81
+ const raw = event.detail?.approvalContext;
82
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
83
+ return {
84
+ owners: [],
85
+ suggestedApprovalPath: event.filePath ?? '',
86
+ };
87
+ }
88
+ const context = raw;
89
+ return {
90
+ owners: Array.isArray(context.owners)
91
+ ? context.owners.filter((owner) => typeof owner === 'string')
92
+ : [],
93
+ suggestedApprovalPath: typeof context.suggestedApprovalPath === 'string'
94
+ ? context.suggestedApprovalPath
95
+ : (typeof context.blockedPath === 'string' ? context.blockedPath : event.filePath ?? ''),
96
+ };
97
+ }
98
+ function shapeLatestBlock(session) {
99
+ const block = [...session.events].reverse().find((event) => event.type === 'check_block');
100
+ if (!block?.filePath)
101
+ return null;
102
+ const context = extractApprovalContext(block);
103
+ return {
104
+ filePath: block.filePath,
105
+ message: block.message ?? 'Edit is blocked by an approval-required boundary.',
106
+ owners: context.owners,
107
+ suggestedApprovalPath: context.suggestedApprovalPath || block.filePath,
108
+ exactPathApproved: (0, governance_runtime_1.activeApprovalPaths)(session.contract).includes(context.suggestedApprovalPath || block.filePath),
109
+ };
110
+ }
111
+ function shapeRecentEvents(session) {
112
+ return session.events.slice(-20).map((event) => ({
113
+ type: event.type,
114
+ ts: event.ts,
115
+ ...(event.filePath ? { filePath: event.filePath } : {}),
116
+ ...(event.verdict ? { verdict: event.verdict } : {}),
117
+ ...(event.decision ? { decision: event.decision } : {}),
118
+ ...(event.message ? { message: event.message } : {}),
119
+ }));
120
+ }
121
+ function shapeLauncher(session) {
122
+ const state = (0, agent_session_launcher_1.latestAgentLauncherState)(session);
123
+ if (!state)
124
+ return null;
125
+ return {
126
+ agent: state.agent.normalized,
127
+ adapter: state.agent.adapter,
128
+ enforcementLevel: state.agent.enforcementLevel,
129
+ automatic: state.agent.automatic,
130
+ hardDeny: state.agent.hardDeny,
131
+ handshakeStatus: state.handshakeStatus,
132
+ ...(state.launchedAt ? { launchedAt: state.launchedAt } : {}),
133
+ ...(state.promptSeenAt ? { promptSeenAt: state.promptSeenAt } : {}),
134
+ };
135
+ }
136
+ function freshnessFor(repoRoot, session, force) {
137
+ const cached = freshnessCache.get(repoRoot);
138
+ if (!force && cached && cached.expiresAt > Date.now())
139
+ return cached.signal;
140
+ const staleness = (0, v0_governance_1.getProfileStaleness)(repoRoot);
141
+ const action = (0, v0_governance_1.profileFreshnessActionForSession)(staleness, session?.profileHash);
142
+ const signal = (0, v0_governance_1.buildProfileFreshnessSignal)(staleness, action);
143
+ freshnessCache.set(repoRoot, { expiresAt: Date.now() + PROFILE_FRESHNESS_CACHE_MS, signal });
144
+ return signal;
145
+ }
146
+ function invalidateRuntimeCompanionFreshness(repoRoot) {
147
+ freshnessCache.delete(repoRoot);
148
+ }
149
+ function buildRuntimeCompanionSnapshot(repoRoot, options = {}) {
150
+ const session = (0, governance_runtime_1.loadActiveSession)(repoRoot);
151
+ const profileFreshness = freshnessFor(repoRoot, session, options.forceFreshness === true);
152
+ const transport = (0, runtime_outbox_1.inspectRuntimeOutbox)(repoRoot);
153
+ return {
154
+ schemaVersion: exports.RUNTIME_COMPANION_SCHEMA_VERSION,
155
+ generatedAt: new Date().toISOString(),
156
+ repoRoot,
157
+ privacy: {
158
+ metadataOnly: true,
159
+ sourceIncluded: false,
160
+ sourceUploaded: false,
161
+ },
162
+ enforcement: {
163
+ adapter: 'vscode-extension',
164
+ level: 'observe_only',
165
+ automatic: false,
166
+ hardDenyAvailable: false,
167
+ detail: 'The VS Code companion reflects CLI runtime state. Claude Code hooks provide pre-write hard deny; editor observation does not.',
168
+ },
169
+ profileFreshness: {
170
+ ...profileFreshness,
171
+ sessionProfileHash: session?.profileHash ?? null,
172
+ },
173
+ transport: {
174
+ ...transport,
175
+ connected: Boolean((0, runtime_connection_1.loadRuntimeConnection)(repoRoot)),
176
+ },
177
+ session: session
178
+ ? {
179
+ sessionId: session.sessionId,
180
+ status: session.status,
181
+ repoName: session.repoName,
182
+ goal: session.contract.goal,
183
+ profileHash: session.profileHash,
184
+ scopeMode: session.contract.scopeMode,
185
+ planCoherenceMode: session.contract.planCoherenceMode ?? 'warn',
186
+ allowedGlobs: [...session.contract.allowedGlobs],
187
+ approvalRequiredGlobs: [...session.contract.approvalRequiredGlobs],
188
+ approvedPaths: (0, governance_runtime_1.activeApprovalPaths)(session.contract),
189
+ launcher: shapeLauncher(session),
190
+ plan: shapePlan(session),
191
+ obligations: shapeObligations(session),
192
+ latestBlock: shapeLatestBlock(session),
193
+ recentEvents: shapeRecentEvents(session),
194
+ }
195
+ : null,
196
+ };
197
+ }
198
+ function approveRuntimeCompanionPath(repoRoot, input) {
199
+ if (!input.path?.trim())
200
+ throw new Error('path is required');
201
+ if (!input.reason?.trim())
202
+ throw new Error('reason is required');
203
+ if (/[*?[\]{}!]/.test(input.path)) {
204
+ throw new Error('VS Code runtime companion approvals must target one exact file path.');
205
+ }
206
+ const approval = (0, governance_runtime_1.approveSession)(repoRoot, input.path.trim(), {
207
+ reason: input.reason.trim(),
208
+ sessionId: input.sessionId,
209
+ source: 'vscode',
210
+ approvedBy: input.approvedBy ?? null,
211
+ requestId: input.requestId ?? null,
212
+ });
213
+ invalidateRuntimeCompanionFreshness(repoRoot);
214
+ return {
215
+ schemaVersion: exports.RUNTIME_COMPANION_SCHEMA_VERSION,
216
+ sessionId: approval.sessionId,
217
+ approvedPath: approval.approvedPath,
218
+ eventId: approval.eventId,
219
+ expiresAt: approval.expiresAt,
220
+ snapshot: buildRuntimeCompanionSnapshot(repoRoot, { forceFreshness: true }),
221
+ };
222
+ }
223
+ function refreshRuntimeCompanionProfile(repoRoot) {
224
+ (0, v0_governance_1.ensureFreshGovernanceProfile)(repoRoot, { force: true });
225
+ invalidateRuntimeCompanionFreshness(repoRoot);
226
+ return buildRuntimeCompanionSnapshot(repoRoot, { forceFreshness: true });
227
+ }
228
+ function runtimeCompanionSession(repoRoot, sessionId) {
229
+ return (0, governance_runtime_1.loadSession)(repoRoot, sessionId);
230
+ }
231
+ //# sourceMappingURL=runtime-companion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-companion.js","sourceRoot":"","sources":["../../src/utils/runtime-companion.ts"],"names":[],"mappings":";;;AA+SA,kFAEC;AAED,sEAmDC;AAED,kEAyBC;AAED,wEAIC;AAED,0DAEC;AA3YD,wEAcyC;AACzC,mDAMyB;AACzB,qEAAoE;AACpE,qDAAkF;AAClF,6DAA6D;AAEhD,QAAA,gCAAgC,GAAG,+BAAwC,CAAC;AACzF,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAsIzC,MAAM,cAAc,GAAG,IAAI,GAAG,EAG1B,CAAC;AAEL,SAAS,iBAAiB,CAAC,OAA0B;IACnD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,IAAI,EAAE,CAAC;SACnD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,CAAC;SACnD,GAAG,CAAC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A,mCAAc,EAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;QAC3D,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;QAC3B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,IAAI;QACpC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI;KACnC,CAAC,CAAC;IACH,mCAAmC,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO;QACL,aAAa,EAAE,wCAAgC;QAC/C,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,QAAQ,EAAE,6BAA6B,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;KAC5E,CAAC;AACJ,CAAC;AAED,SAAgB,8BAA8B,CAAC,QAAgB;IAC7D,IAAA,4CAA4B,EAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,mCAAmC,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,6BAA6B,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED,SAAgB,uBAAuB,CAAC,QAAgB,EAAE,SAAiB;IACzE,OAAO,IAAA,gCAAW,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { ProfileFreshnessSignal } from './v0-governance';
2
+ export interface RuntimeConnection {
3
+ schemaVersion: 1;
4
+ apiUrl: string;
5
+ organizationId: string;
6
+ projectId?: string | null;
7
+ repo: {
8
+ id: string;
9
+ name: string;
10
+ repoKey: string;
11
+ };
12
+ profileHash?: string;
13
+ topologyHash?: string;
14
+ keyPrefix?: string;
15
+ connectedAt: string;
16
+ autoSync: {
17
+ enabled: boolean;
18
+ lastQueuedAt?: string;
19
+ lastAttemptAt?: string;
20
+ lastSyncedAt?: string;
21
+ lastStatus?: 'queued' | 'ok' | 'failed' | 'skipped';
22
+ lastUploaded?: number;
23
+ lastSkipped?: number;
24
+ lastFailed?: number;
25
+ lastError?: string;
26
+ };
27
+ }
28
+ export interface RuntimeRepoMetadata {
29
+ name: string;
30
+ rootHash: string;
31
+ remoteHash?: string;
32
+ profileHash?: string;
33
+ topologyHash?: string;
34
+ profileFreshness?: ProfileFreshnessSignal;
35
+ source: 'local';
36
+ }
37
+ export declare function runtimeConnectionPath(repoRoot: string): string;
38
+ export declare function collectRuntimeRepoMetadata(repoRoot: string, profileFreshness?: ProfileFreshnessSignal): RuntimeRepoMetadata;
39
+ export declare function loadRuntimeConnection(repoRoot: string): RuntimeConnection | null;
40
+ export declare function saveRuntimeConnection(repoRoot: string, connection: RuntimeConnection): void;
41
+ export declare function updateRuntimeConnection(repoRoot: string, update: (connection: RuntimeConnection) => RuntimeConnection): RuntimeConnection | null;
42
+ export declare function triggerRuntimeAutoSync(repoRoot: string): {
43
+ started: boolean;
44
+ reason?: string;
45
+ };
46
+ //# sourceMappingURL=runtime-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-connection.d.ts","sourceRoot":"","sources":["../../src/utils/runtime-connection.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MA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AE,CAAC,UAAU,EAAE,iBAAiB,KAAK,iBAAiB,GAC3D,iBAAiB,GAAG,IAAI,CAM1B;AAOD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CA+CA"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runtimeConnectionPath = runtimeConnectionPath;
4
+ exports.collectRuntimeRepoMetadata = collectRuntimeRepoMetadata;
5
+ exports.loadRuntimeConnection = loadRuntimeConnection;
6
+ exports.saveRuntimeConnection = saveRuntimeConnection;
7
+ exports.updateRuntimeConnection = updateRuntimeConnection;
8
+ exports.triggerRuntimeAutoSync = triggerRuntimeAutoSync;
9
+ const child_process_1 = require("child_process");
10
+ const crypto_1 = require("crypto");
11
+ const fs_1 = require("fs");
12
+ const path_1 = require("path");
13
+ const gitignore_1 = require("./gitignore");
14
+ const CONNECTION_FILE = 'connection.json';
15
+ function connectionDir(repoRoot) {
16
+ return (0, path_1.join)(repoRoot, '.neurcode');
17
+ }
18
+ function runtimeConnectionPath(repoRoot) {
19
+ return (0, path_1.join)(connectionDir(repoRoot), CONNECTION_FILE);
20
+ }
21
+ function readJsonFile(path) {
22
+ try {
23
+ if (!(0, fs_1.existsSync)(path))
24
+ return null;
25
+ return JSON.parse((0, fs_1.readFileSync)(path, 'utf8'));
26
+ }
27
+ catch {
28
+ return null;
29
+ }
30
+ }
31
+ function sha256(input) {
32
+ return (0, crypto_1.createHash)('sha256').update(input).digest('hex').slice(0, 32);
33
+ }
34
+ function gitValue(repoRoot, args) {
35
+ try {
36
+ const value = (0, child_process_1.execFileSync)('git', args, {
37
+ cwd: repoRoot,
38
+ stdio: ['ignore', 'pipe', 'ignore'],
39
+ encoding: 'utf8',
40
+ }).trim();
41
+ return value || null;
42
+ }
43
+ catch {
44
+ return null;
45
+ }
46
+ }
47
+ function ensureConnectionDir(repoRoot) {
48
+ const dir = connectionDir(repoRoot);
49
+ if (!(0, fs_1.existsSync)(dir)) {
50
+ (0, fs_1.mkdirSync)(dir, { recursive: true });
51
+ }
52
+ (0, gitignore_1.ensureNeurcodeInGitignore)(repoRoot);
53
+ }
54
+ function runtimeSafeProfileFreshness(signal) {
55
+ return {
56
+ ...signal,
57
+ profilePath: '.neurcode/profile.json',
58
+ };
59
+ }
60
+ function collectRuntimeRepoMetadata(repoRoot, profileFreshness) {
61
+ const profile = readJsonFile((0, path_1.join)(repoRoot, '.neurcode', 'profile.json'));
62
+ const remote = gitValue(repoRoot, ['config', '--get', 'remote.origin.url']);
63
+ const repoName = typeof profile?.repo?.name === 'string' && profile.repo.name.trim()
64
+ ? profile.repo.name.trim()
65
+ : (0, path_1.basename)(repoRoot);
66
+ return {
67
+ name: repoName,
68
+ rootHash: sha256(repoRoot),
69
+ remoteHash: remote ? sha256(remote) : undefined,
70
+ profileHash: typeof profile?.profileHash === 'string' ? profile.profileHash : undefined,
71
+ topologyHash: typeof profile?.topology?.hash === 'string' ? profile.topology.hash : undefined,
72
+ ...(profileFreshness ? { profileFreshness: runtimeSafeProfileFreshness(profileFreshness) } : {}),
73
+ source: 'local',
74
+ };
75
+ }
76
+ function loadRuntimeConnection(repoRoot) {
77
+ const data = readJsonFile(runtimeConnectionPath(repoRoot));
78
+ if (!data || data.schemaVersion !== 1)
79
+ return null;
80
+ if (typeof data.apiUrl !== 'string' || typeof data.organizationId !== 'string')
81
+ return null;
82
+ if (!data.repo || typeof data.repo !== 'object')
83
+ return null;
84
+ return data;
85
+ }
86
+ function saveRuntimeConnection(repoRoot, connection) {
87
+ ensureConnectionDir(repoRoot);
88
+ (0, fs_1.writeFileSync)(runtimeConnectionPath(repoRoot), JSON.stringify(connection, null, 2) + '\n', 'utf8');
89
+ }
90
+ function updateRuntimeConnection(repoRoot, update) {
91
+ const current = loadRuntimeConnection(repoRoot);
92
+ if (!current)
93
+ return null;
94
+ const next = update(current);
95
+ saveRuntimeConnection(repoRoot, next);
96
+ return next;
97
+ }
98
+ function envFlag(value) {
99
+ if (!value)
100
+ return false;
101
+ return ['1', 'true', 'yes', 'on'].includes(value.trim().toLowerCase());
102
+ }
103
+ function triggerRuntimeAutoSync(repoRoot) {
104
+ const connection = loadRuntimeConnection(repoRoot);
105
+ if (!connection)
106
+ return { started: false, reason: 'not connected' };
107
+ if (!connection.autoSync?.enabled)
108
+ return { started: false, reason: 'disabled' };
109
+ if (envFlag(process.env.NEURCODE_DISABLE_AUTO_SYNC))
110
+ return { started: false, reason: 'disabled by env' };
111
+ if (envFlag(process.env.NEURCODE_AUTO_SYNC_CHILD))
112
+ return { started: false, reason: 'already in sync child' };
113
+ const cliEntry = process.argv[1];
114
+ if (!cliEntry)
115
+ return { started: false, reason: 'missing cli entrypoint' };
116
+ updateRuntimeConnection(repoRoot, (current) => ({
117
+ ...current,
118
+ autoSync: {
119
+ ...current.autoSync,
120
+ enabled: current.autoSync?.enabled !== false,
121
+ lastQueuedAt: new Date().toISOString(),
122
+ lastStatus: 'queued',
123
+ lastError: undefined,
124
+ },
125
+ }));
126
+ if (envFlag(process.env.NEURCODE_AUTO_SYNC_DRY_RUN)) {
127
+ return { started: true, reason: 'dry run' };
128
+ }
129
+ const child = (0, child_process_1.spawn)(process.execPath, [
130
+ cliEntry,
131
+ 'sync',
132
+ '--runtime',
133
+ '--dir',
134
+ repoRoot,
135
+ '--json',
136
+ ], {
137
+ cwd: repoRoot,
138
+ detached: true,
139
+ stdio: 'ignore',
140
+ env: {
141
+ ...process.env,
142
+ NEURCODE_AUTO_SYNC_CHILD: '1',
143
+ },
144
+ });
145
+ child.unref();
146
+ return { started: true };
147
+ }
148
+ //# sourceMappingURL=runtime-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-connection.js","sourceRoot":"","sources":["../../src/utils/runtime-connection.ts"],"names":[],"mappings":";;AAuDA,sDAEC;AA2CD,gEAmBC;AAED,sDAMC;AAED,s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AAC,QAAQ,EAAE,OAAO,KAAK,KAAK;YAC5C,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACtC,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,SAAS;SACrB;KACF,CAAC,CAAC,CAAC;IAEJ,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC9C,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,qBAAK,EACjB,OAAO,CAAC,QAAQ,EAChB;QACE,QAAQ;QACR,MAAM;QACN,WAAW;QACX,OAAO;QACP,QAAQ;QACR,QAAQ;KACT,EACD;QACE,GAAG,EAAE,QAAQ;QACb,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE;YACH,GAAG,OAAO,CAAC,GAAG;YACd,wBAAwB,EAAE,GAAG;SAC9B;KACF,CACF,CAAC;IACF,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { type GovernanceSession } from '@neurcode-ai/governance-runtime';
2
+ export interface LocalGovernanceSessionRecord {
3
+ session: GovernanceSession;
4
+ path: string;
5
+ startedAt: string | null;
6
+ blockCount: number;
7
+ warnCount: number;
8
+ okCount: number;
9
+ approvalCount: number;
10
+ }
11
+ export interface RuntimeEvidenceReport {
12
+ repoRoot: string;
13
+ generatedAt: string;
14
+ since: string | null;
15
+ profile: {
16
+ status: string;
17
+ profilePath: string;
18
+ reasons: string[];
19
+ };
20
+ summary: {
21
+ sessions: number;
22
+ activeSessions: number;
23
+ finishedSessions: number;
24
+ totalChecks: number;
25
+ blockedEdits: number;
26
+ warnedSensitiveEdits: number;
27
+ allowedWithAdvisories: number;
28
+ allowedEdits: number;
29
+ approvalsGranted: number;
30
+ };
31
+ topBlockedPaths: Array<{
32
+ path: string;
33
+ count: number;
34
+ }>;
35
+ topOwners: Array<{
36
+ owner: string;
37
+ count: number;
38
+ }>;
39
+ approvalRequiredBoundariesTouched: Array<{
40
+ boundary: string;
41
+ count: number;
42
+ }>;
43
+ sessions: Array<{
44
+ sessionId: string;
45
+ status: GovernanceSession['status'];
46
+ goal: string;
47
+ scopeMode: GovernanceSession['contract']['scopeMode'];
48
+ blockCount: number;
49
+ warnCount: number;
50
+ okCount: number;
51
+ approvalCount: number;
52
+ approvedPaths: string[];
53
+ replayHash?: string;
54
+ recordPath: string;
55
+ }>;
56
+ }
57
+ export declare function parseSinceDuration(input?: string): {
58
+ cutoffMs: number | null;
59
+ label: string | null;
60
+ };
61
+ export declare function listRuntimeSessions(repoRoot: string, options?: {
62
+ since?: string;
63
+ }): LocalGovernanceSessionRecord[];
64
+ export declare function buildRuntimeEvidenceReport(repoRoot: string, options?: {
65
+ since?: string;
66
+ }): RuntimeEvidenceReport;
67
+ export declare function renderRuntimeEvidenceMarkdown(report: RuntimeEvidenceReport): string;
68
+ //# sourceMappingURL=runtime-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-evidence.d.ts","sourceRoot":"","sources":["../../src/utils/runtime-evidence.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,iCAAiC,CAAC;AAGzC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,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