@neurcode-ai/cli 0.9.66 → 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.
- package/dist/commands/governance.d.ts +3 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +390 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/quickstart.js +3 -3
- package/dist/commands/quickstart.js.map +1 -1
- package/dist/commands/remediate-export.d.ts +5 -0
- package/dist/commands/remediate-export.d.ts.map +1 -1
- package/dist/commands/remediate-export.js +803 -14
- package/dist/commands/remediate-export.js.map +1 -1
- package/dist/commands/replay.d.ts.map +1 -1
- package/dist/commands/replay.js +14 -0
- package/dist/commands/replay.js.map +1 -1
- package/dist/commands/session.d.ts +7 -0
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +156 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/start-intent.d.ts.map +1 -1
- package/dist/commands/start-intent.js +61 -11
- package/dist/commands/start-intent.js.map +1 -1
- package/dist/commands/verify-guidance.d.ts +5 -0
- package/dist/commands/verify-guidance.d.ts.map +1 -0
- package/dist/commands/verify-guidance.js +49 -0
- package/dist/commands/verify-guidance.js.map +1 -0
- package/dist/commands/verify-output.d.ts +37 -0
- package/dist/commands/verify-output.d.ts.map +1 -0
- package/dist/commands/verify-output.js +572 -0
- package/dist/commands/verify-output.js.map +1 -0
- package/dist/commands/verify-render.d.ts +41 -0
- package/dist/commands/verify-render.d.ts.map +1 -0
- package/dist/commands/verify-render.js +457 -0
- package/dist/commands/verify-render.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +278 -1081
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +3 -14
- package/dist/commands/workspace.js.map +1 -1
- package/dist/context-engine/graph.d.ts.map +1 -1
- package/dist/context-engine/graph.js +69 -7
- package/dist/context-engine/graph.js.map +1 -1
- package/dist/context-engine/scanner.d.ts.map +1 -1
- package/dist/context-engine/scanner.js +9 -2
- package/dist/context-engine/scanner.js.map +1 -1
- package/dist/daemon/compatibility/execution.d.ts +42 -0
- package/dist/daemon/compatibility/execution.d.ts.map +1 -0
- package/dist/daemon/compatibility/execution.js +183 -0
- package/dist/daemon/compatibility/execution.js.map +1 -0
- package/dist/daemon/compatibility/mutation.d.ts +24 -0
- package/dist/daemon/compatibility/mutation.d.ts.map +1 -0
- package/dist/daemon/compatibility/mutation.js +724 -0
- package/dist/daemon/compatibility/mutation.js.map +1 -0
- package/dist/daemon/routes.d.ts +19 -0
- package/dist/daemon/routes.d.ts.map +1 -0
- package/dist/daemon/routes.js +123 -0
- package/dist/daemon/routes.js.map +1 -0
- package/dist/daemon/runtime/execution-bus.d.ts +217 -0
- package/dist/daemon/runtime/execution-bus.d.ts.map +1 -0
- package/dist/daemon/runtime/execution-bus.js +1420 -0
- package/dist/daemon/runtime/execution-bus.js.map +1 -0
- package/dist/daemon/runtime/workspace-runtime.d.ts +280 -0
- package/dist/daemon/runtime/workspace-runtime.d.ts.map +1 -0
- package/dist/daemon/runtime/workspace-runtime.js +1473 -0
- package/dist/daemon/runtime/workspace-runtime.js.map +1 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +171 -874
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/shaping.d.ts +11 -0
- package/dist/daemon/shaping.d.ts.map +1 -0
- package/dist/daemon/shaping.js +240 -0
- package/dist/daemon/shaping.js.map +1 -0
- package/dist/governance/canonical-pipeline.d.ts +2 -1
- package/dist/governance/canonical-pipeline.d.ts.map +1 -1
- package/dist/governance/canonical-pipeline.js +259 -84
- package/dist/governance/canonical-pipeline.js.map +1 -1
- package/dist/governance/structural-cache.d.ts.map +1 -1
- package/dist/governance/structural-cache.js +2 -7
- package/dist/governance/structural-cache.js.map +1 -1
- package/dist/index.js +230 -66
- package/dist/index.js.map +1 -1
- package/dist/utils/active-engineering-context.d.ts +12 -0
- package/dist/utils/active-engineering-context.d.ts.map +1 -0
- package/dist/utils/active-engineering-context.js +67 -0
- package/dist/utils/active-engineering-context.js.map +1 -0
- package/dist/utils/artifact-io.d.ts +33 -0
- package/dist/utils/artifact-io.d.ts.map +1 -0
- package/dist/utils/artifact-io.js +183 -0
- package/dist/utils/artifact-io.js.map +1 -0
- package/dist/utils/change-contract.d.ts +6 -2
- package/dist/utils/change-contract.d.ts.map +1 -1
- package/dist/utils/change-contract.js +175 -0
- package/dist/utils/change-contract.js.map +1 -1
- package/dist/utils/context-pack.d.ts +12 -0
- package/dist/utils/context-pack.d.ts.map +1 -0
- package/dist/utils/context-pack.js +147 -0
- package/dist/utils/context-pack.js.map +1 -0
- package/dist/utils/control-plane.d.ts +18 -0
- package/dist/utils/control-plane.d.ts.map +1 -1
- package/dist/utils/control-plane.js +31 -4
- package/dist/utils/control-plane.js.map +1 -1
- package/dist/utils/drift-intelligence.d.ts +47 -0
- package/dist/utils/drift-intelligence.d.ts.map +1 -0
- package/dist/utils/drift-intelligence.js +2099 -0
- package/dist/utils/drift-intelligence.js.map +1 -0
- package/dist/utils/execution-actions.d.ts +22 -0
- package/dist/utils/execution-actions.d.ts.map +1 -0
- package/dist/utils/execution-actions.js +103 -0
- package/dist/utils/execution-actions.js.map +1 -0
- package/dist/utils/execution-bus.d.ts +1 -214
- package/dist/utils/execution-bus.d.ts.map +1 -1
- package/dist/utils/execution-bus.js +15 -1359
- package/dist/utils/execution-bus.js.map +1 -1
- package/dist/utils/git.d.ts +1 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +13 -3
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/governance-decisions.d.ts +75 -0
- package/dist/utils/governance-decisions.d.ts.map +1 -0
- package/dist/utils/governance-decisions.js +412 -0
- package/dist/utils/governance-decisions.js.map +1 -0
- package/dist/utils/governance-provenance.d.ts +1 -1
- package/dist/utils/governance-provenance.d.ts.map +1 -1
- package/dist/utils/governance-provenance.js +5 -7
- package/dist/utils/governance-provenance.js.map +1 -1
- package/dist/utils/governance.d.ts +108 -0
- package/dist/utils/governance.d.ts.map +1 -1
- package/dist/utils/governance.js +209 -7
- package/dist/utils/governance.js.map +1 -1
- package/dist/utils/intelligence-runtime-common.d.ts +30 -0
- package/dist/utils/intelligence-runtime-common.d.ts.map +1 -0
- package/dist/utils/intelligence-runtime-common.js +156 -0
- package/dist/utils/intelligence-runtime-common.js.map +1 -0
- package/dist/utils/intent-contract-diagnostics.d.ts +9 -0
- package/dist/utils/intent-contract-diagnostics.d.ts.map +1 -0
- package/dist/utils/intent-contract-diagnostics.js +322 -0
- package/dist/utils/intent-contract-diagnostics.js.map +1 -0
- package/dist/utils/intent-pack.d.ts +15 -0
- package/dist/utils/intent-pack.d.ts.map +1 -0
- package/dist/utils/intent-pack.js +196 -0
- package/dist/utils/intent-pack.js.map +1 -0
- package/dist/utils/plan-sync.d.ts +1 -0
- package/dist/utils/plan-sync.d.ts.map +1 -1
- package/dist/utils/plan-sync.js +23 -0
- package/dist/utils/plan-sync.js.map +1 -1
- package/dist/utils/policy-decision.d.ts +5 -0
- package/dist/utils/policy-decision.d.ts.map +1 -0
- package/dist/utils/policy-decision.js +17 -0
- package/dist/utils/policy-decision.js.map +1 -0
- package/dist/utils/replay-custody.d.ts +43 -0
- package/dist/utils/replay-custody.d.ts.map +1 -0
- package/dist/utils/replay-custody.js +168 -0
- package/dist/utils/replay-custody.js.map +1 -0
- package/dist/utils/replay-runtime.d.ts +13 -0
- package/dist/utils/replay-runtime.d.ts.map +1 -1
- package/dist/utils/replay-runtime.js +96 -9
- package/dist/utils/replay-runtime.js.map +1 -1
- package/dist/utils/repository-intelligence.d.ts +9 -0
- package/dist/utils/repository-intelligence.d.ts.map +1 -0
- package/dist/utils/repository-intelligence.js +372 -0
- package/dist/utils/repository-intelligence.js.map +1 -0
- package/dist/utils/runtime-events.d.ts.map +1 -1
- package/dist/utils/runtime-events.js +25 -6
- package/dist/utils/runtime-events.js.map +1 -1
- package/dist/utils/semantic-contract-intelligence.d.ts +20 -0
- package/dist/utils/semantic-contract-intelligence.d.ts.map +1 -0
- package/dist/utils/semantic-contract-intelligence.js +825 -0
- package/dist/utils/semantic-contract-intelligence.js.map +1 -0
- package/dist/utils/session-continuity.d.ts +56 -0
- package/dist/utils/session-continuity.d.ts.map +1 -0
- package/dist/utils/session-continuity.js +318 -0
- package/dist/utils/session-continuity.js.map +1 -0
- package/dist/utils/verification-evidence.d.ts.map +1 -1
- package/dist/utils/verification-evidence.js +4 -1
- package/dist/utils/verification-evidence.js.map +1 -1
- package/dist/utils/workspace-runtime.d.ts +1 -266
- package/dist/utils/workspace-runtime.d.ts.map +1 -1
- package/dist/utils/workspace-runtime.js +15 -1412
- package/dist/utils/workspace-runtime.js.map +1 -1
- package/package.json +11 -10
- package/LICENSE +0 -201
package/dist/index.js
CHANGED
|
@@ -64,7 +64,9 @@ const export_1 = require("./commands/export");
|
|
|
64
64
|
const control_plane_1 = require("./commands/control-plane");
|
|
65
65
|
const workspace_1 = require("./commands/workspace");
|
|
66
66
|
const replay_1 = require("./commands/replay");
|
|
67
|
+
const governance_1 = require("./commands/governance");
|
|
67
68
|
const execution_bus_1 = require("./utils/execution-bus");
|
|
69
|
+
const execution_actions_1 = require("./utils/execution-actions");
|
|
68
70
|
// Read version from package.json
|
|
69
71
|
let version = '0.1.2'; // fallback
|
|
70
72
|
try {
|
|
@@ -79,38 +81,87 @@ const program = new commander_1.Command();
|
|
|
79
81
|
const CORE_WORKFLOW_STEPS = [
|
|
80
82
|
{
|
|
81
83
|
command: 'neurcode start "<intent>"',
|
|
82
|
-
description: 'Declare
|
|
84
|
+
description: 'Declare governance context and bounded implementation scope',
|
|
83
85
|
},
|
|
84
86
|
{
|
|
85
|
-
command: 'neurcode verify',
|
|
86
|
-
description: '
|
|
87
|
+
command: 'neurcode verify --evidence',
|
|
88
|
+
description: 'Verify the current diff against intent, policy, and change contracts',
|
|
87
89
|
},
|
|
88
90
|
{
|
|
89
|
-
command: 'neurcode
|
|
90
|
-
description: '
|
|
91
|
+
command: 'neurcode replay --json',
|
|
92
|
+
description: 'Inspect deterministic replay and provenance receipts from the last run',
|
|
91
93
|
},
|
|
92
94
|
{
|
|
93
|
-
command: 'neurcode
|
|
94
|
-
description: '
|
|
95
|
+
command: 'neurcode remediate-export --finding-index 0',
|
|
96
|
+
description: 'Export bounded remediation context for an external remediation tool',
|
|
95
97
|
},
|
|
96
98
|
{
|
|
97
|
-
command: 'neurcode verify',
|
|
98
|
-
description: '
|
|
99
|
+
command: 'neurcode verify --ci',
|
|
100
|
+
description: 'Re-verify in CI with deterministic receipts and governance artifacts',
|
|
99
101
|
},
|
|
100
102
|
];
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
+
const CANONICAL_OPERATOR_COMMAND_NAMES = new Set([
|
|
104
|
+
'start',
|
|
105
|
+
'quickstart',
|
|
103
106
|
'verify',
|
|
104
|
-
'
|
|
107
|
+
'remediate-export',
|
|
108
|
+
'replay',
|
|
109
|
+
]);
|
|
110
|
+
const ENTERPRISE_OPERATIONS_COMMAND_NAMES = new Set([
|
|
111
|
+
'policy',
|
|
112
|
+
'governance',
|
|
113
|
+
'workspace',
|
|
114
|
+
'control-plane',
|
|
115
|
+
'pilot-report',
|
|
116
|
+
'daemon',
|
|
117
|
+
'doctor',
|
|
118
|
+
'compat',
|
|
119
|
+
'login',
|
|
120
|
+
'logout',
|
|
121
|
+
'init',
|
|
122
|
+
'whoami',
|
|
123
|
+
'config',
|
|
124
|
+
'repo',
|
|
125
|
+
'approve',
|
|
126
|
+
'bootstrap-policy',
|
|
127
|
+
]);
|
|
128
|
+
const RUNTIME_ENGINEERING_COMMAND_NAMES = new Set([
|
|
129
|
+
'audit',
|
|
130
|
+
'contract',
|
|
131
|
+
'feedback',
|
|
132
|
+
'guard',
|
|
133
|
+
'bootstrap',
|
|
134
|
+
'map',
|
|
135
|
+
'execute',
|
|
136
|
+
'executions',
|
|
137
|
+
'session',
|
|
138
|
+
'brain',
|
|
139
|
+
]);
|
|
140
|
+
const LEGACY_COMPATIBILITY_COMMAND_NAMES = new Set([
|
|
141
|
+
'check',
|
|
142
|
+
'refactor',
|
|
143
|
+
'security',
|
|
144
|
+
'ask',
|
|
145
|
+
'plan',
|
|
146
|
+
'plan-slo',
|
|
147
|
+
'ship',
|
|
148
|
+
'ship-resume',
|
|
149
|
+
'ship-runs',
|
|
150
|
+
'ship-attestation-verify',
|
|
151
|
+
'apply',
|
|
152
|
+
'allow',
|
|
153
|
+
'simulate',
|
|
154
|
+
'watch',
|
|
155
|
+
'remediate',
|
|
156
|
+
'remediate-validate',
|
|
157
|
+
'remediate-status',
|
|
158
|
+
'generate',
|
|
105
159
|
'patch',
|
|
106
|
-
'
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
];
|
|
111
|
-
function isExecutionActionType(value) {
|
|
112
|
-
return EXECUTION_ACTION_TYPES.includes(value);
|
|
113
|
-
}
|
|
160
|
+
'fix',
|
|
161
|
+
'prompt',
|
|
162
|
+
'revert',
|
|
163
|
+
'export',
|
|
164
|
+
]);
|
|
114
165
|
function shouldRouteJsonLegacyCommandThroughExecutionBus(jsonEnabled) {
|
|
115
166
|
if (!jsonEnabled)
|
|
116
167
|
return false;
|
|
@@ -129,27 +180,31 @@ function emitJsonPayloadWithExitCode(payload, exitCode) {
|
|
|
129
180
|
function formatCoreWorkflowStep(step) {
|
|
130
181
|
return ` * ${step.command.padEnd(28)} ${step.description}`;
|
|
131
182
|
}
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return advancedCommands.sort((left, right) => left.localeCompare(right));
|
|
183
|
+
function collectCommandLayer(root, commandNames, preferredOrder) {
|
|
184
|
+
const visible = new Set(root.commands
|
|
185
|
+
.map((subcommand) => subcommand.name())
|
|
186
|
+
.filter((commandName) => commandName !== 'help' && commandNames.has(commandName)));
|
|
187
|
+
const ordered = preferredOrder.filter((commandName) => visible.has(commandName));
|
|
188
|
+
const remainder = [...visible]
|
|
189
|
+
.filter((commandName) => !preferredOrder.includes(commandName))
|
|
190
|
+
.sort((left, right) => left.localeCompare(right));
|
|
191
|
+
return [...ordered, ...remainder];
|
|
142
192
|
}
|
|
143
193
|
function buildAdvancedLegacyHints(root) {
|
|
144
|
-
|
|
194
|
+
const fallbackCommands = root.commands
|
|
195
|
+
.map((subcommand) => subcommand.name())
|
|
196
|
+
.filter((commandName) => commandName !== 'help'
|
|
197
|
+
&& !CANONICAL_OPERATOR_COMMAND_NAMES.has(commandName))
|
|
198
|
+
.sort((left, right) => left.localeCompare(right));
|
|
199
|
+
return fallbackCommands.map((commandName) => `neurcode ${commandName}`);
|
|
145
200
|
}
|
|
146
201
|
function configurePrimaryHelpView(root) {
|
|
147
|
-
const primaryOrder = ['start', '
|
|
202
|
+
const primaryOrder = ['start', 'quickstart', 'verify', 'remediate-export', 'replay'];
|
|
148
203
|
root.configureHelp({
|
|
149
204
|
visibleCommands: (command) => {
|
|
150
205
|
const filtered = command.commands.filter((subcommand) => {
|
|
151
206
|
const commandName = subcommand.name();
|
|
152
|
-
return commandName === 'help' ||
|
|
207
|
+
return commandName === 'help' || CANONICAL_OPERATOR_COMMAND_NAMES.has(commandName);
|
|
153
208
|
});
|
|
154
209
|
return filtered.sort((left, right) => {
|
|
155
210
|
const leftIndex = primaryOrder.indexOf(left.name());
|
|
@@ -162,28 +217,93 @@ function configurePrimaryHelpView(root) {
|
|
|
162
217
|
});
|
|
163
218
|
}
|
|
164
219
|
function printCoreWorkflowGuide() {
|
|
165
|
-
console.log(chalk.bold.cyan('\n
|
|
166
|
-
console.log(chalk.bold.white('
|
|
220
|
+
console.log(chalk.bold.cyan('\n🛡️ Neurcode Governance Workflow\n'));
|
|
221
|
+
console.log(chalk.bold.white('Canonical Workflow:'));
|
|
167
222
|
CORE_WORKFLOW_STEPS.forEach((step) => console.log(chalk.dim(formatCoreWorkflowStep(step))));
|
|
168
223
|
console.log('');
|
|
169
|
-
console.log(chalk.dim('Run `neurcode --help` to see
|
|
224
|
+
console.log(chalk.dim('Run `neurcode --help` to see enterprise, runtime-engineering, and compatibility commands.\n'));
|
|
225
|
+
}
|
|
226
|
+
function formatCommandList(commandNames) {
|
|
227
|
+
return commandNames.length > 0
|
|
228
|
+
? commandNames.map((commandName) => ` * neurcode ${commandName}`)
|
|
229
|
+
: [' * (none)'];
|
|
170
230
|
}
|
|
171
|
-
function renderHelpFooter(
|
|
172
|
-
const
|
|
231
|
+
function renderHelpFooter(root) {
|
|
232
|
+
const enterpriseOperations = collectCommandLayer(root, ENTERPRISE_OPERATIONS_COMMAND_NAMES, [
|
|
233
|
+
'policy',
|
|
234
|
+
'governance',
|
|
235
|
+
'workspace',
|
|
236
|
+
'control-plane',
|
|
237
|
+
'pilot-report',
|
|
238
|
+
'daemon',
|
|
239
|
+
'doctor',
|
|
240
|
+
'compat',
|
|
241
|
+
'login',
|
|
242
|
+
'logout',
|
|
243
|
+
'init',
|
|
244
|
+
'whoami',
|
|
245
|
+
'config',
|
|
246
|
+
'repo',
|
|
247
|
+
'approve',
|
|
248
|
+
'bootstrap-policy',
|
|
249
|
+
]);
|
|
250
|
+
const runtimeEngineering = collectCommandLayer(root, RUNTIME_ENGINEERING_COMMAND_NAMES, [
|
|
251
|
+
'audit',
|
|
252
|
+
'contract',
|
|
253
|
+
'feedback',
|
|
254
|
+
'guard',
|
|
255
|
+
'bootstrap',
|
|
256
|
+
'map',
|
|
257
|
+
'execute',
|
|
258
|
+
'executions',
|
|
259
|
+
'session',
|
|
260
|
+
'brain',
|
|
261
|
+
]);
|
|
262
|
+
const compatibilityCommands = collectCommandLayer(root, LEGACY_COMPATIBILITY_COMMAND_NAMES, [
|
|
263
|
+
'fix',
|
|
264
|
+
'patch',
|
|
265
|
+
'generate',
|
|
266
|
+
'prompt',
|
|
267
|
+
'plan',
|
|
268
|
+
'ask',
|
|
269
|
+
'remediate',
|
|
270
|
+
'remediate-validate',
|
|
271
|
+
'remediate-status',
|
|
272
|
+
'ship',
|
|
273
|
+
'ship-resume',
|
|
274
|
+
'ship-runs',
|
|
275
|
+
'ship-attestation-verify',
|
|
276
|
+
'apply',
|
|
277
|
+
'export',
|
|
278
|
+
'revert',
|
|
279
|
+
'check',
|
|
280
|
+
'refactor',
|
|
281
|
+
'security',
|
|
282
|
+
'simulate',
|
|
283
|
+
'watch',
|
|
284
|
+
'allow',
|
|
285
|
+
'plan-slo',
|
|
286
|
+
]);
|
|
173
287
|
return [
|
|
174
288
|
'',
|
|
175
289
|
'Core Workflow',
|
|
176
290
|
...CORE_WORKFLOW_STEPS.map((step) => formatCoreWorkflowStep(step)),
|
|
177
291
|
'',
|
|
178
|
-
'
|
|
179
|
-
...(
|
|
292
|
+
'Enterprise Operations',
|
|
293
|
+
...formatCommandList(enterpriseOperations),
|
|
294
|
+
'',
|
|
295
|
+
'Runtime Engineering',
|
|
296
|
+
...formatCommandList(runtimeEngineering),
|
|
297
|
+
'',
|
|
298
|
+
'Compatibility / Legacy',
|
|
299
|
+
...formatCommandList(compatibilityCommands),
|
|
180
300
|
'',
|
|
181
301
|
'Run `neurcode <command> --help` for command-specific details.',
|
|
182
302
|
].join('\n');
|
|
183
303
|
}
|
|
184
304
|
program
|
|
185
305
|
.name('neurcode')
|
|
186
|
-
.description('
|
|
306
|
+
.description('Intent-aware deterministic governance infrastructure for AI-assisted engineering')
|
|
187
307
|
.version(version);
|
|
188
308
|
// Show welcome banner before parsing (for help or unauthenticated users)
|
|
189
309
|
async function showWelcomeIfNeeded() {
|
|
@@ -202,7 +322,7 @@ showWelcomeIfNeeded().catch(() => {
|
|
|
202
322
|
});
|
|
203
323
|
program
|
|
204
324
|
.command('start [intent...]')
|
|
205
|
-
.description('
|
|
325
|
+
.description('Declare governance intent and initialize bounded change context')
|
|
206
326
|
.option('--run-init', 'Run `neurcode init` immediately after showing the guide')
|
|
207
327
|
.option('--json', 'Output machine-readable onboarding metadata')
|
|
208
328
|
.action(async (intentParts, options) => {
|
|
@@ -253,6 +373,7 @@ program
|
|
|
253
373
|
(0, security_1.securityCommand)(program);
|
|
254
374
|
(0, brain_1.brainCommand)(program);
|
|
255
375
|
(0, policy_1.policyCommand)(program);
|
|
376
|
+
(0, governance_1.governanceCommand)(program);
|
|
256
377
|
(0, control_plane_1.controlPlaneCommand)(program);
|
|
257
378
|
(0, workspace_1.workspaceCommand)(program);
|
|
258
379
|
(0, replay_1.replayCommand)(program);
|
|
@@ -438,7 +559,7 @@ program
|
|
|
438
559
|
});
|
|
439
560
|
program
|
|
440
561
|
.command('ask')
|
|
441
|
-
.description('
|
|
562
|
+
.description('Advanced: ask a repo question with grounded, citation-backed answers')
|
|
442
563
|
.argument('<question...>', 'Question about the codebase')
|
|
443
564
|
.option('--project-id <id>', 'Project ID')
|
|
444
565
|
.option('--json', 'Output machine-readable JSON')
|
|
@@ -462,7 +583,7 @@ program
|
|
|
462
583
|
});
|
|
463
584
|
program
|
|
464
585
|
.command('plan')
|
|
465
|
-
.description('
|
|
586
|
+
.description('Legacy: generate an execution plan for a user intent')
|
|
466
587
|
.argument('<intent...>', 'Description of what you want to accomplish')
|
|
467
588
|
.option('--project-id <id>', 'Project ID')
|
|
468
589
|
.option('--ticket <id>', 'Ticket ID from Linear or Jira (e.g., PROJ-123, ABC-123)')
|
|
@@ -527,7 +648,7 @@ planSloCmd
|
|
|
527
648
|
});
|
|
528
649
|
program
|
|
529
650
|
.command('ship')
|
|
530
|
-
.description('
|
|
651
|
+
.description('Legacy: run the older autonomous ship loop and produce a merge confidence card')
|
|
531
652
|
.argument('<goal...>', 'Implementation goal to ship')
|
|
532
653
|
.option('--project-id <id>', 'Project ID')
|
|
533
654
|
.option('--max-fix-attempts <n>', 'Maximum auto-remediation attempts (default: 2)', (val) => parseInt(val, 10))
|
|
@@ -563,7 +684,7 @@ program
|
|
|
563
684
|
});
|
|
564
685
|
program
|
|
565
686
|
.command('ship-resume')
|
|
566
|
-
.description('
|
|
687
|
+
.description('Legacy: resume a previously started ship run from its checkpoint')
|
|
567
688
|
.argument('<run-id>', 'Ship run ID (see neurcode ship-runs)')
|
|
568
689
|
.option('--project-id <id>', 'Project ID override')
|
|
569
690
|
.option('--max-fix-attempts <n>', 'Maximum auto-remediation attempts override', (val) => parseInt(val, 10))
|
|
@@ -593,7 +714,7 @@ program
|
|
|
593
714
|
});
|
|
594
715
|
program
|
|
595
716
|
.command('ship-runs')
|
|
596
|
-
.description('
|
|
717
|
+
.description('Legacy: list persisted ship runs for this repository')
|
|
597
718
|
.option('--limit <n>', 'Maximum runs to show (default: 20)', (val) => parseInt(val, 10))
|
|
598
719
|
.option('--json', 'Output machine-readable JSON')
|
|
599
720
|
.action((options) => {
|
|
@@ -604,7 +725,7 @@ program
|
|
|
604
725
|
});
|
|
605
726
|
program
|
|
606
727
|
.command('ship-attestation-verify')
|
|
607
|
-
.description('
|
|
728
|
+
.description('Legacy: verify a ship release attestation against the referenced merge card artifact')
|
|
608
729
|
.argument('<path>', 'Path to release attestation JSON file')
|
|
609
730
|
.option('--hmac-key <key>', 'HMAC key override for signature verification (defaults to NEURCODE_ATTEST_HMAC_KEY)')
|
|
610
731
|
.option('--json', 'Output machine-readable JSON')
|
|
@@ -616,7 +737,7 @@ program
|
|
|
616
737
|
});
|
|
617
738
|
program
|
|
618
739
|
.command('apply')
|
|
619
|
-
.description('
|
|
740
|
+
.description('Legacy: apply a saved architect plan by generating and writing code files')
|
|
620
741
|
.argument('<planId>', 'Plan ID (UUID) to apply')
|
|
621
742
|
.option('--force', 'Overwrite existing files without confirmation')
|
|
622
743
|
.option('--json', 'Output machine-readable JSON')
|
|
@@ -654,7 +775,7 @@ program
|
|
|
654
775
|
});
|
|
655
776
|
program
|
|
656
777
|
.command('simulate')
|
|
657
|
-
.description('
|
|
778
|
+
.description('Advanced: predict blast radius and likely regressions before merge ("what would have broken?")')
|
|
658
779
|
.option('--staged', 'Analyze staged changes only')
|
|
659
780
|
.option('--head', 'Analyze changes against HEAD')
|
|
660
781
|
.option('--base <ref>', 'Analyze changes against a specific base ref')
|
|
@@ -673,14 +794,14 @@ program
|
|
|
673
794
|
});
|
|
674
795
|
program
|
|
675
796
|
.command('watch')
|
|
676
|
-
.description('
|
|
797
|
+
.description('Legacy: start the local file-change recorder used by Time Machine workflows')
|
|
677
798
|
.action(() => {
|
|
678
799
|
(0, watch_1.watchCommand)();
|
|
679
800
|
});
|
|
680
801
|
// Session management commands
|
|
681
802
|
const sessionCmd = program
|
|
682
803
|
.command('session')
|
|
683
|
-
.description('Manage
|
|
804
|
+
.description('Manage cloud sessions and local intent-runtime continuity');
|
|
684
805
|
sessionCmd
|
|
685
806
|
.command('list')
|
|
686
807
|
.description('List all sessions for the current project')
|
|
@@ -714,9 +835,51 @@ sessionCmd
|
|
|
714
835
|
projectId: options.projectId,
|
|
715
836
|
});
|
|
716
837
|
});
|
|
838
|
+
sessionCmd
|
|
839
|
+
.command('list-local')
|
|
840
|
+
.description('List local intent-runtime session snapshots for this repository')
|
|
841
|
+
.option('--json', 'Output machine-readable JSON')
|
|
842
|
+
.action((options) => {
|
|
843
|
+
(0, session_1.listLocalSessionsCommand)({
|
|
844
|
+
json: options.json === true,
|
|
845
|
+
});
|
|
846
|
+
});
|
|
847
|
+
sessionCmd
|
|
848
|
+
.command('current-local')
|
|
849
|
+
.description('Show the active local intent-runtime session')
|
|
850
|
+
.option('--json', 'Output machine-readable JSON')
|
|
851
|
+
.action((options) => {
|
|
852
|
+
(0, session_1.currentLocalSessionCommand)({
|
|
853
|
+
json: options.json === true,
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
sessionCmd
|
|
857
|
+
.command('resume-local')
|
|
858
|
+
.description('Restore a stored local intent-runtime session snapshot')
|
|
859
|
+
.option('--session-id <id>', 'Local session ID to restore (defaults to the active or latest snapshot)')
|
|
860
|
+
.option('--json', 'Output machine-readable JSON')
|
|
861
|
+
.action((options) => {
|
|
862
|
+
(0, session_1.resumeLocalSessionCommand)({
|
|
863
|
+
sessionId: options.sessionId,
|
|
864
|
+
json: options.json === true,
|
|
865
|
+
});
|
|
866
|
+
});
|
|
867
|
+
sessionCmd
|
|
868
|
+
.command('compare-local')
|
|
869
|
+
.description('Compare the approved scope and boundary expectations of two local intent sessions')
|
|
870
|
+
.requiredOption('--left <id>', 'Left local session ID')
|
|
871
|
+
.requiredOption('--right <id>', 'Right local session ID')
|
|
872
|
+
.option('--json', 'Output machine-readable JSON')
|
|
873
|
+
.action((options) => {
|
|
874
|
+
(0, session_1.compareLocalSessionsCommand)({
|
|
875
|
+
left: options.left,
|
|
876
|
+
right: options.right,
|
|
877
|
+
json: options.json === true,
|
|
878
|
+
});
|
|
879
|
+
});
|
|
717
880
|
program
|
|
718
881
|
.command('remediate')
|
|
719
|
-
.description('
|
|
882
|
+
.description('Legacy: run verify, auto-remediate using the older ship loop, then re-verify')
|
|
720
883
|
.option('--goal <text>', 'Goal text for remediation ship loop')
|
|
721
884
|
.option('--plan-id <id>', 'Plan ID for verify scope checks')
|
|
722
885
|
.option('--project-id <id>', 'Project ID override')
|
|
@@ -776,8 +939,8 @@ program
|
|
|
776
939
|
program
|
|
777
940
|
.command('remediate-export')
|
|
778
941
|
.description('Export a structured deterministic remediation payload for a governance finding.\n' +
|
|
779
|
-
'Pass the output to
|
|
780
|
-
'This command NEVER modifies any file. Neurcode
|
|
942
|
+
'Pass the output to an external remediation tool or coding workflow.\n' +
|
|
943
|
+
'This command NEVER modifies any file. Neurcode verifies. External remediation owns the code change.')
|
|
781
944
|
.option('--finding <id>', 'Export payload for a specific finding ID')
|
|
782
945
|
.option('--finding-id <id>', 'Alias for --finding (backward compatible)')
|
|
783
946
|
.option('--finding-index <n>', 'Export payload for finding at 0-based index')
|
|
@@ -798,6 +961,8 @@ program
|
|
|
798
961
|
out: options.out,
|
|
799
962
|
copy: options.copy === true,
|
|
800
963
|
json: options.json === true,
|
|
964
|
+
verifyOutputFile: options.verifyOutputFile,
|
|
965
|
+
projectRoot: options.projectRoot,
|
|
801
966
|
});
|
|
802
967
|
});
|
|
803
968
|
// ── neurcode remediate validate ────────────────────────────────────────────────
|
|
@@ -833,7 +998,7 @@ program
|
|
|
833
998
|
});
|
|
834
999
|
program
|
|
835
1000
|
.command('generate')
|
|
836
|
-
.description('
|
|
1001
|
+
.description('Legacy: generate governed plan context (reads intent from plan.json if no prompt given)')
|
|
837
1002
|
.argument('[prompt...]', 'Implementation prompt — omit to use intent from plan.json')
|
|
838
1003
|
.option('--plan-id <id>', 'Plan ID override for scope context')
|
|
839
1004
|
.option('--json', 'Output machine-readable JSON')
|
|
@@ -848,7 +1013,7 @@ program
|
|
|
848
1013
|
});
|
|
849
1014
|
program
|
|
850
1015
|
.command('patch')
|
|
851
|
-
.description('
|
|
1016
|
+
.description('Legacy: apply a deterministic fix patch to a file (from neurcode fix suggestions)')
|
|
852
1017
|
.requiredOption('--file <path>', 'Path to the file to patch')
|
|
853
1018
|
.option('--preview-token <token>', 'Preview token generated by deterministic patch preview')
|
|
854
1019
|
.option('--rollback-receipt <id>', 'Rollback a previously applied deterministic patch receipt')
|
|
@@ -886,7 +1051,7 @@ program
|
|
|
886
1051
|
});
|
|
887
1052
|
program
|
|
888
1053
|
.command('fix')
|
|
889
|
-
.description('
|
|
1054
|
+
.description('Review prioritized governance findings and optional legacy patch suggestions')
|
|
890
1055
|
.option('--plan-id <id>', 'Plan ID for verify scope checks')
|
|
891
1056
|
.option('--project-id <id>', 'Project ID override')
|
|
892
1057
|
.option('--ci', 'CI mode: deterministic verification-only flow, no local interactive/runtime assumptions')
|
|
@@ -956,7 +1121,7 @@ program
|
|
|
956
1121
|
});
|
|
957
1122
|
program
|
|
958
1123
|
.command('verify')
|
|
959
|
-
.description('
|
|
1124
|
+
.description('Run intent-aware deterministic verification against policy and bounded change scope')
|
|
960
1125
|
.option('--plan-id <id>', 'Plan ID to verify against (required unless --policy-only)')
|
|
961
1126
|
.option('--project-id <id>', 'Project ID')
|
|
962
1127
|
.option('--ci', 'CI mode: deterministic verification-only flow, no daemon/interactive/local-state assumptions')
|
|
@@ -1101,7 +1266,7 @@ program
|
|
|
1101
1266
|
});
|
|
1102
1267
|
program
|
|
1103
1268
|
.command('prompt [plan-id]')
|
|
1104
|
-
.description('
|
|
1269
|
+
.description('Legacy: generate an external prompt from an Architect Plan (uses last plan if ID not provided)')
|
|
1105
1270
|
.option('--json', 'Output machine-readable JSON')
|
|
1106
1271
|
.option('--output <path>', 'Write prompt output to a file')
|
|
1107
1272
|
.option('--no-copy', 'Do not copy prompt to clipboard')
|
|
@@ -1152,7 +1317,7 @@ revertCmd
|
|
|
1152
1317
|
// ── Export ────────────────────────────────────────────────────────────────────
|
|
1153
1318
|
program
|
|
1154
1319
|
.command('export')
|
|
1155
|
-
.description('
|
|
1320
|
+
.description('Legacy: export current plan as structured JSON for external workflow consumption')
|
|
1156
1321
|
.option('--json', 'Output machine-readable JSON to stdout')
|
|
1157
1322
|
.option('--file <path>', 'Write exported plan to a file (e.g. plan.json)')
|
|
1158
1323
|
.action((options) => {
|
|
@@ -1164,7 +1329,7 @@ program
|
|
|
1164
1329
|
// ── Daemon ────────────────────────────────────────────────────────────────────
|
|
1165
1330
|
program
|
|
1166
1331
|
.command('daemon')
|
|
1167
|
-
.description('Start local
|
|
1332
|
+
.description('Start the local governance bridge for verify, findings, replay, and remediation export (http://localhost:4321)')
|
|
1168
1333
|
.action(() => {
|
|
1169
1334
|
(0, server_1.startDaemon)();
|
|
1170
1335
|
});
|
|
@@ -1182,9 +1347,9 @@ program
|
|
|
1182
1347
|
.option('--no-reverify', 'Skip post-action deterministic reverify stage')
|
|
1183
1348
|
.option('--json', 'Output full execution record as JSON')
|
|
1184
1349
|
.action(async (type, options) => {
|
|
1185
|
-
if (!isExecutionActionType(type)) {
|
|
1350
|
+
if (!(0, execution_actions_1.isExecutionActionType)(type)) {
|
|
1186
1351
|
console.error(`❌ Unsupported execution type: ${type}`);
|
|
1187
|
-
console.error(` Supported: ${EXECUTION_ACTION_TYPES.join(', ')}`);
|
|
1352
|
+
console.error(` Supported: ${execution_actions_1.EXECUTION_ACTION_TYPES.join(', ')}`);
|
|
1188
1353
|
process.exit(1);
|
|
1189
1354
|
}
|
|
1190
1355
|
const run = await (0, execution_bus_1.runExecution)({
|
|
@@ -1270,7 +1435,6 @@ program
|
|
|
1270
1435
|
console.log('');
|
|
1271
1436
|
});
|
|
1272
1437
|
configurePrimaryHelpView(program);
|
|
1273
|
-
|
|
1274
|
-
program.addHelpText('after', renderHelpFooter(advancedLegacyCommands));
|
|
1438
|
+
program.addHelpText('after', renderHelpFooter(program));
|
|
1275
1439
|
program.parse();
|
|
1276
1440
|
//# sourceMappingURL=index.js.map
|