@ornexus/neocortex 4.61.5 → 4.62.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/release-source.json +1 -1
- package/dist/sbom.cdx.json +1193 -1193
- package/install.ps1 +31 -34
- package/install.sh +1 -1
- package/package.json +5 -2
- package/packages/client/dist/adapters/adapter-registry.js +1 -108
- package/packages/client/dist/adapters/antigravity-adapter.js +2 -77
- package/packages/client/dist/adapters/claude-code-adapter.js +3 -79
- package/packages/client/dist/adapters/codex-adapter.js +2 -80
- package/packages/client/dist/adapters/cursor-adapter.js +4 -115
- package/packages/client/dist/adapters/gemini-adapter.js +2 -71
- package/packages/client/dist/adapters/grok-adapter.js +2 -42
- package/packages/client/dist/adapters/index.js +1 -22
- package/packages/client/dist/adapters/platform-detector.js +1 -220
- package/packages/client/dist/adapters/target-adapter.js +0 -12
- package/packages/client/dist/adapters/vscode-adapter.js +2 -72
- package/packages/client/dist/agent/refresh-stubs.js +2 -443
- package/packages/client/dist/agent/update-agent-yaml.js +1 -102
- package/packages/client/dist/agent/update-description.d.ts +8 -1
- package/packages/client/dist/agent/update-description.js +2 -260
- package/packages/client/dist/cache/crypto-utils.js +1 -78
- package/packages/client/dist/cache/encrypted-cache.js +1 -338
- package/packages/client/dist/cache/in-memory-asset-cache.js +1 -73
- package/packages/client/dist/cache/index.js +1 -13
- package/packages/client/dist/cache/protected-pi-boundary.js +1 -44
- package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -127
- package/packages/client/dist/checkpoint/index.js +1 -11
- package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -32
- package/packages/client/dist/cli.js +5 -364
- package/packages/client/dist/commands/activate.js +8 -394
- package/packages/client/dist/commands/architecture-answers.js +7 -274
- package/packages/client/dist/commands/architecture-memory-terminal.js +4 -253
- package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -100
- package/packages/client/dist/commands/architecture-root-binding.js +1 -51
- package/packages/client/dist/commands/cache-status.js +2 -112
- package/packages/client/dist/commands/config.js +1 -88
- package/packages/client/dist/commands/doctor.js +2 -635
- package/packages/client/dist/commands/invoke.d.ts +17 -0
- package/packages/client/dist/commands/invoke.js +148 -7822
- package/packages/client/dist/commands/legacy-epic-terminal.js +1 -71
- package/packages/client/dist/commands/legacy-story-branch.js +1 -96
- package/packages/client/dist/commands/legacy-story-pr.js +1 -276
- package/packages/client/dist/commands/mutation-qa-checkpoint.js +5 -285
- package/packages/client/dist/commands/mutation-qa-gate.js +1 -54
- package/packages/client/dist/commands/mutation-qa-git.js +1 -41
- package/packages/client/dist/commands/mutation-qa-policy.js +1 -102
- package/packages/client/dist/commands/mutation-qa-run.js +3 -219
- package/packages/client/dist/commands/mutation-qa-verdict.js +1 -149
- package/packages/client/dist/commands/mutation-qa.js +1 -220
- package/packages/client/dist/commands/native-agent.js +2 -136
- package/packages/client/dist/commands/planning-diagnosis.js +1 -43
- package/packages/client/dist/commands/planning-generation.js +1 -53
- package/packages/client/dist/commands/planning-memory.js +1 -40
- package/packages/client/dist/commands/planning-research.js +1 -42
- package/packages/client/dist/commands/private-session.js +1 -75
- package/packages/client/dist/commands/property-qa.js +1 -139
- package/packages/client/dist/commands/qa-control.js +1 -16
- package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -55
- package/packages/client/dist/commands/qa-scan-browser-route.js +1 -28
- package/packages/client/dist/commands/qa-scan-capture.js +5 -663
- package/packages/client/dist/commands/qa-scan-discovery.js +3 -376
- package/packages/client/dist/commands/qa-scan-review.js +5 -826
- package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -266
- package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -297
- package/packages/client/dist/commands/qa-synthetic-backend.js +2 -340
- package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -85
- package/packages/client/dist/commands/qa-synthetic-browser.js +1 -39
- package/packages/client/dist/commands/refactor-characterization.js +21 -671
- package/packages/client/dist/commands/refactor-commit.js +13 -399
- package/packages/client/dist/commands/refactor-control.js +3 -142
- package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -93
- package/packages/client/dist/commands/refactor-review.js +5 -283
- package/packages/client/dist/commands/refactor-root.js +7 -588
- package/packages/client/dist/commands/refresh-memory.js +3 -174
- package/packages/client/dist/commands/shared-architecture-non-ui.js +1 -24
- package/packages/client/dist/commands/story-checkpoint.d.ts +5 -1
- package/packages/client/dist/commands/story-checkpoint.js +1 -203
- package/packages/client/dist/commands/story-worktree.js +5 -258
- package/packages/client/dist/config/host-auth-broker.js +1 -60
- package/packages/client/dist/config/host-auth-reference.js +1 -93
- package/packages/client/dist/config/profile-directory.js +1 -13
- package/packages/client/dist/config/resolver-selection.js +1 -278
- package/packages/client/dist/config/secure-config.js +12 -281
- package/packages/client/dist/config.js +2 -224
- package/packages/client/dist/constants.js +1 -25
- package/packages/client/dist/context/context-collector.js +2 -222
- package/packages/client/dist/context/context-sanitizer.js +1 -145
- package/packages/client/dist/continuity/autonomous-governance.js +1 -285
- package/packages/client/dist/continuity/continuity-client-state-store.js +1 -1587
- package/packages/client/dist/continuity/invoke-hooks.js +1 -129
- package/packages/client/dist/continuity/migrations/001-initial-schema.js +2 -12
- package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +2 -12
- package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +2 -12
- package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +2 -12
- package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +2 -12
- package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +2 -10
- package/packages/client/dist/continuity/native-agent-store.js +1 -69
- package/packages/client/dist/continuity/native-agent-types.js +1 -105
- package/packages/client/dist/continuity/outbox.js +1 -117
- package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -172
- package/packages/client/dist/continuity/sqlite-store.js +81 -2612
- package/packages/client/dist/effects/invoke-effect-gateways.js +1 -62
- package/packages/client/dist/errors/error-messages.js +2 -258
- package/packages/client/dist/errors/frontmatter-diagnostics.d.ts +10 -1
- package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -125
- package/packages/client/dist/evidence/collector.js +1 -347
- package/packages/client/dist/evidence/index.js +1 -1
- package/packages/client/dist/evidence/types.js +0 -2
- package/packages/client/dist/fs/atomic-state-replace.js +1 -152
- package/packages/client/dist/generated/command-registry.generated.js +1 -4076
- package/packages/client/dist/generated/public-projections.generated.js +1 -149
- package/packages/client/dist/git/direct-yolo-c01-retry.js +4 -138
- package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +94 -9
- package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -1592
- package/packages/client/dist/git/epic-operational-state.js +2 -672
- package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -14
- package/packages/client/dist/git/git-lifecycle-store.d.ts +88 -0
- package/packages/client/dist/git/git-lifecycle-store.js +9 -2529
- package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -259
- package/packages/client/dist/git/legacy-story-branch-setup.js +4 -348
- package/packages/client/dist/git/legacy-story-pr.js +70 -3538
- package/packages/client/dist/git/neocortex-trailers.js +2 -53
- package/packages/client/dist/git/release-gate-env.d.ts +62 -0
- package/packages/client/dist/git/release-gate-env.js +1 -0
- package/packages/client/dist/git/secure-filesystem-boundary.d.ts +24 -0
- package/packages/client/dist/git/secure-filesystem-boundary.js +20 -186
- package/packages/client/dist/git/story-worktree-cleanup.js +4 -1058
- package/packages/client/dist/git/story-worktree-integration.d.ts +62 -0
- package/packages/client/dist/git/story-worktree-integration.js +3 -603
- package/packages/client/dist/git/story-worktree-manager.js +3 -843
- package/packages/client/dist/git/story-worktree-paths.js +1 -150
- package/packages/client/dist/git/story-write-set-extension.d.ts +44 -0
- package/packages/client/dist/git/story-write-set-extension.js +1 -0
- package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -284
- package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -237
- package/packages/client/dist/i18n/first-run.js +2 -60
- package/packages/client/dist/index.js +1 -50
- package/packages/client/dist/invocation/invoke-input.js +1 -24
- package/packages/client/dist/license/host-auth-recovery.js +1 -401
- package/packages/client/dist/license/index.js +1 -5
- package/packages/client/dist/license/license-client.js +1 -337
- package/packages/client/dist/machine/fingerprint.js +2 -163
- package/packages/client/dist/machine/index.js +1 -5
- package/packages/client/dist/memory/project-memory-path-scope.js +1 -62
- package/packages/client/dist/memory/project-memory-writer.js +41 -1117
- package/packages/client/dist/memory/shared-project-memory-types.js +2 -259
- package/packages/client/dist/migrations/epic-lifecycle-backfill.js +3 -1060
- package/packages/client/dist/migrations/project-identity-capability.js +1 -50
- package/packages/client/dist/migrations/project-identity.js +7 -493
- package/packages/client/dist/migrations/state-json.js +4 -393
- package/packages/client/dist/policy/architecture-policy.js +2 -184
- package/packages/client/dist/policy/index.js +1 -7
- package/packages/client/dist/policy/shared-policy-types.js +0 -38
- package/packages/client/dist/policy/subagent-approval-policy.js +1 -57
- package/packages/client/dist/private-execution/clean-baseline.js +2 -279
- package/packages/client/dist/private-execution/codex-executor.js +4 -574
- package/packages/client/dist/private-execution/codex-host-runtime.js +1 -137
- package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -97
- package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -128
- package/packages/client/dist/private-execution/delivery.js +13 -410
- package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -294
- package/packages/client/dist/private-execution/frozen-handoff.js +6 -19
- package/packages/client/dist/private-execution/implementation-validation.js +2 -106
- package/packages/client/dist/private-execution/isolated-admission.js +23 -1432
- package/packages/client/dist/private-execution/isolated-session.js +5 -725
- package/packages/client/dist/private-execution/isolated-workspace.js +1 -122
- package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -409
- package/packages/client/dist/private-execution/pact-test-source.js +1 -258
- package/packages/client/dist/private-execution/pact-toolchain.js +3 -290
- package/packages/client/dist/private-execution/pact-write-set.js +1 -172
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -406
- package/packages/client/dist/private-execution/planning-generation-checkpoint.js +5 -462
- package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -139
- package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -325
- package/packages/client/dist/private-execution/private-report-store.js +1 -42
- package/packages/client/dist/private-execution/property-test-candidate.js +1 -103
- package/packages/client/dist/private-execution/property-test-choices.js +3 -147
- package/packages/client/dist/private-execution/property-test-plan.js +7 -271
- package/packages/client/dist/private-execution/property-test-review.js +4 -258
- package/packages/client/dist/private-execution/property-test-runtime.js +9 -372
- package/packages/client/dist/private-execution/property-test-source.js +1 -139
- package/packages/client/dist/private-execution/root-checkpoint.js +1 -80
- package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -135
- package/packages/client/dist/private-execution/root-memory-recovery.js +1 -93
- package/packages/client/dist/private-execution/root-memory-request.js +1 -29
- package/packages/client/dist/private-execution/root-memory-scope.js +1 -178
- package/packages/client/dist/private-execution/root-memory-writer.js +1 -102
- package/packages/client/dist/private-execution/session-lease.js +1 -63
- package/packages/client/dist/private-execution/shared-private-admission-types.js +1 -50
- package/packages/client/dist/private-execution/shared-project-validation.js +1 -66
- package/packages/client/dist/private-execution/shared-root-memory-types.js +1 -61
- package/packages/client/dist/private-execution/ux-source-validation.js +1 -372
- package/packages/client/dist/private-execution/ux-write-set.js +2 -191
- package/packages/client/dist/registry/registry-reconciliation.js +1 -234
- package/packages/client/dist/resilience/circuit-breaker.js +1 -170
- package/packages/client/dist/resilience/degradation-manager.js +1 -164
- package/packages/client/dist/resilience/freshness-indicator.js +1 -100
- package/packages/client/dist/resilience/index.js +1 -8
- package/packages/client/dist/resilience/recovery-detector.js +1 -74
- package/packages/client/dist/resolvers/asset-resolver.js +0 -13
- package/packages/client/dist/resolvers/local-resolver.js +8 -255
- package/packages/client/dist/resolvers/remote-resolver.js +1 -233
- package/packages/client/dist/runner/binary.js +1 -404
- package/packages/client/dist/runner/cli.js +17 -1571
- package/packages/client/dist/runner/epic-background-dispatcher.js +1 -124
- package/packages/client/dist/runner/headless/adapters.js +1 -49
- package/packages/client/dist/runner/headless/background-root.js +1 -85
- package/packages/client/dist/runner/headless/child-env.d.ts +92 -0
- package/packages/client/dist/runner/headless/child-env.js +1 -0
- package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -79
- package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -1776
- package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -69
- package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +2 -111
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +1 -0
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -1464
- package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -357
- package/packages/client/dist/runner/headless/fake-adapter.js +1 -62
- package/packages/client/dist/runner/headless/managed-environment-cleanup.js +1 -274
- package/packages/client/dist/runner/headless/managed-profile.js +1 -149
- package/packages/client/dist/runner/headless/opencode-adapter.js +2 -145
- package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -43
- package/packages/client/dist/runner/headless/resolver.js +1 -231
- package/packages/client/dist/runner/headless/run-yolo.js +1 -886
- package/packages/client/dist/runner/headless/run-yoloop.js +2 -2657
- package/packages/client/dist/runner/headless/types.js +2 -575
- package/packages/client/dist/runner/host-capacity.js +1 -59
- package/packages/client/dist/runner/local-console.js +13 -396
- package/packages/client/dist/runner/portal-sync-worker.js +1 -1487
- package/packages/client/dist/runner/project-identity.js +1 -106
- package/packages/client/dist/runner/scheduler.js +7 -995
- package/packages/client/dist/runner-cli.js +2 -18
- package/packages/client/dist/state/invocation-shape.js +1 -13
- package/packages/client/dist/state/project-state-snapshot.js +1 -1754
- package/packages/client/dist/state/state-json-repair.js +3 -785
- package/packages/client/dist/state/structural-dag-projection.js +1 -118
- package/packages/client/dist/telemetry/index.js +1 -5
- package/packages/client/dist/telemetry/offline-queue.js +1 -131
- package/packages/client/dist/tier/index.js +1 -5
- package/packages/client/dist/tier/tier-aware-client.js +1 -405
- package/packages/client/dist/types/index.js +1 -38
- package/packages/client/dist/version.js +1 -27
- package/packages/client/dist/yolo/change-evidence-collector.d.ts +10 -0
- package/packages/client/dist/yolo/change-evidence-collector.js +1 -262
- package/packages/client/dist/yolo/invoke-envelope-capability.d.ts +2 -0
- package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -65
- package/packages/client/dist/yolo/project-manifest-projection-collector.d.ts +28 -0
- package/packages/client/dist/yolo/project-manifest-projection-collector.js +1 -0
- package/packages/client/dist/yolo/spec-envelope-collector.d.ts +9 -0
- package/packages/client/dist/yolo/spec-envelope-collector.js +5 -184
- package/packages/client/dist/yoloop/discovery-hook.js +2 -300
- package/packages/client/dist/yoloop/index.js +1 -8
- package/packages/client/dist/yoloop/invoke-hooks.js +12 -669
- package/packages/client/dist/yoloop/shared-discover-epics.d.ts +16 -0
- package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1007
- package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -33
- package/packages/client/dist/yoloop/target-normalization.js +1 -180
- package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1920
- package/packages/shared/dist/frontmatter-context-contract.js +164 -52
- package/packages/shared/dist/project-manifest-projection.js +199 -0
- package/packages/shared/dist/project-validation-commands.js +14 -6
- package/packages/shared/dist/yolo/spec-envelope-rules.js +85 -0
- package/packages/shared/dist/yolo/spec-envelope.js +33 -7
- package/packages/shared/dist/yoloop/epic-terminal-git.js +94 -6
- package/packages/shared/dist/yoloop/story-write-scope.js +212 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/install-antigravity.sh +13 -4
- package/targets-stubs/antigravity/skill/SKILL.md +1 -1
- package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex-root.md +2 -2
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +5 -5
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/lib/managed-config-merge.js +77 -1
- package/targets-stubs/lib/managed-profile.sh +7 -0
- package/targets-stubs/opencode/neocortex-root.md +1 -1
- package/targets-stubs/vscode/install-vscode.sh +21 -0
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -1,37 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
* @license FSL-1.1
|
|
4
|
-
* Copyright (c) 2026 OrNexus AI
|
|
5
|
-
*
|
|
6
|
-
* This file is part of Neocortex CLI, licensed under the
|
|
7
|
-
* Functional Source License, Version 1.1 (FSL-1.1).
|
|
8
|
-
*
|
|
9
|
-
* Change Date: February 20, 2029
|
|
10
|
-
* Change License: MIT
|
|
11
|
-
*
|
|
12
|
-
* See the LICENSE file in the project root for full license text.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* @neocortex/client - CLI Entry Point
|
|
16
|
-
*
|
|
17
|
-
* Routes subcommands to their respective handlers:
|
|
18
|
-
* neocortex-client invoke --args "..."
|
|
19
|
-
* neocortex-client activate YOUR-LICENSE-KEY
|
|
20
|
-
* neocortex-client config status
|
|
21
|
-
* neocortex-client cache-status
|
|
22
|
-
* neocortex-client doctor [--offline] [--json]
|
|
23
|
-
* neocortex-client --help
|
|
24
|
-
* neocortex-client --version
|
|
25
|
-
*
|
|
26
|
-
* Story 46.2 - AC1-AC7
|
|
27
|
-
*/
|
|
28
|
-
import { getClientVersion } from './version.js';
|
|
29
|
-
import { spawnSync } from 'node:child_process';
|
|
30
|
-
import { COMMAND_REGISTRY_CHECKSUM, COMMAND_REGISTRY_VERSION, } from './generated/command-registry.generated.js';
|
|
31
|
-
import { readProjectRegistryIdentity, reconcileRegistry, RegistryReconciliationError, REGISTRY_RECONCILIATION_REASON_CODES, } from './registry/registry-reconciliation.js';
|
|
32
|
-
// ── Version Resolution ─────────────────────────────────────────────────────
|
|
33
|
-
// ── Help Text ──────────────────────────────────────────────────────────────
|
|
34
|
-
const HELP_TEXT = `
|
|
2
|
+
import{getClientVersion as l}from"./version.js";import{spawnSync as v}from"node:child_process";import{COMMAND_REGISTRY_CHECKSUM as p,COMMAND_REGISTRY_VERSION as d}from"./generated/command-registry.generated.js";import{readProjectRegistryIdentity as j,reconcileRegistry as m,RegistryReconciliationError as u,REGISTRY_RECONCILIATION_REASON_CODES as h}from"./registry/registry-reconciliation.js";const f=`
|
|
35
3
|
neocortex-client - Neocortex Client CLI
|
|
36
4
|
|
|
37
5
|
Usage:
|
|
@@ -252,334 +220,7 @@ Invocation payload boundary:
|
|
|
252
220
|
|
|
253
221
|
License:
|
|
254
222
|
Licensed under BSL-1.1 (Business Source License 1.1)
|
|
255
|
-
`.trim();
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
// with stray arguments like "pm", "install", "postinstall" etc.
|
|
260
|
-
// Silently ignore these to avoid "Unknown command" warnings during npm install.
|
|
261
|
-
const NPM_LIFECYCLE_ARGS = new Set([
|
|
262
|
-
'pm', 'install', 'postinstall', 'preinstall', 'prepublish',
|
|
263
|
-
'postpublish', 'preuninstall', 'postuninstall', 'preprepare',
|
|
264
|
-
'prepare', 'postprepare',
|
|
265
|
-
]);
|
|
266
|
-
function optionValue(args, name) {
|
|
267
|
-
const index = args.indexOf(name);
|
|
268
|
-
return index >= 0 ? args[index + 1] : undefined;
|
|
269
|
-
}
|
|
270
|
-
function printRegistryReconciliationError(error) {
|
|
271
|
-
if (error instanceof RegistryReconciliationError) {
|
|
272
|
-
process.stderr.write(`[Neocortex] ${error.reasonCode}: ${error.remediation}\n`);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
process.stderr.write(`[Neocortex] ${REGISTRY_RECONCILIATION_REASON_CODES.ARTIFACT_UNAVAILABLE}: registry reconciliation could not be completed safely; no invoke request was sent.\n`);
|
|
276
|
-
}
|
|
277
|
-
function installedRegistryIdentity() {
|
|
278
|
-
return { version: COMMAND_REGISTRY_VERSION, checksum: COMMAND_REGISTRY_CHECKSUM };
|
|
279
|
-
}
|
|
280
|
-
function projectMatchesInstalled(projectRoot) {
|
|
281
|
-
const project = readProjectRegistryIdentity(projectRoot);
|
|
282
|
-
return !project || (project.version === COMMAND_REGISTRY_VERSION && project.checksum === COMMAND_REGISTRY_CHECKSUM);
|
|
283
|
-
}
|
|
284
|
-
function runReconciledInvoke(cliArgs, subArgs) {
|
|
285
|
-
const projectRoot = optionValue(subArgs, '--project-root') || process.cwd();
|
|
286
|
-
try {
|
|
287
|
-
if (process.env.NEOCORTEX_REGISTRY_REEXECUTED === '1' && !projectMatchesInstalled(projectRoot)) {
|
|
288
|
-
throw new RegistryReconciliationError(REGISTRY_RECONCILIATION_REASON_CODES.ARTIFACT_MISMATCH, 'The reinstalled client still does not match the trusted local projection; no invoke request was sent.');
|
|
289
|
-
}
|
|
290
|
-
const result = reconcileRegistry({
|
|
291
|
-
projectRoot,
|
|
292
|
-
installedVersion: getClientVersion(),
|
|
293
|
-
installedIdentity: installedRegistryIdentity(),
|
|
294
|
-
});
|
|
295
|
-
if (result.status !== 'updated')
|
|
296
|
-
return undefined;
|
|
297
|
-
const child = spawnSync(process.execPath, [process.argv[1], ...cliArgs], {
|
|
298
|
-
stdio: 'inherit',
|
|
299
|
-
env: { ...process.env, NEOCORTEX_REGISTRY_REEXECUTED: '1' },
|
|
300
|
-
shell: false,
|
|
301
|
-
});
|
|
302
|
-
return child.error ? 1 : child.status ?? 1;
|
|
303
|
-
}
|
|
304
|
-
catch (error) {
|
|
305
|
-
printRegistryReconciliationError(error);
|
|
306
|
-
return 1;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
async function main() {
|
|
310
|
-
const args = process.argv.slice(2);
|
|
311
|
-
const command = args[0];
|
|
312
|
-
// Silently exit if invoked with npm lifecycle arguments (Epic 67 - Story 67.2)
|
|
313
|
-
if (command && NPM_LIFECYCLE_ARGS.has(command.toLowerCase())) {
|
|
314
|
-
process.exit(0);
|
|
315
|
-
}
|
|
316
|
-
if (!command || command === '--help' || command === '-h') {
|
|
317
|
-
console.log(HELP_TEXT);
|
|
318
|
-
process.exit(0);
|
|
319
|
-
}
|
|
320
|
-
if (command === '--version' || command === '-v') {
|
|
321
|
-
// Epic P72 - Story P72.04: include BSL-1.1 license notice in --version output.
|
|
322
|
-
// Printed to stderr so scripts that parse `neocortex-client --version` continue
|
|
323
|
-
// to work correctly (they consume stdout only).
|
|
324
|
-
console.log(getClientVersion());
|
|
325
|
-
process.stderr.write('Licensed under BSL-1.1 (Business Source License 1.1)\n');
|
|
326
|
-
process.exit(0);
|
|
327
|
-
}
|
|
328
|
-
const subArgs = args.slice(1);
|
|
329
|
-
switch (command) {
|
|
330
|
-
case 'invoke': {
|
|
331
|
-
const reconciledExitCode = runReconciledInvoke(args, subArgs);
|
|
332
|
-
if (reconciledExitCode !== undefined) {
|
|
333
|
-
process.exitCode = reconciledExitCode;
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
const { invokeCliHandler, flushInvokeCliOutput } = await import('./commands/invoke.js');
|
|
337
|
-
const exitCode = await invokeCliHandler(subArgs);
|
|
338
|
-
const outputComplete = await flushInvokeCliOutput();
|
|
339
|
-
// Let pending stdout/stderr writes and HTTP handles finish closing.
|
|
340
|
-
// A forced exit can race libuv's async-handle teardown on Windows.
|
|
341
|
-
process.exitCode = outputComplete ? exitCode : 1;
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
case 'reconcile-registry': {
|
|
345
|
-
const projectRoot = optionValue(subArgs, '--project-root') || process.cwd();
|
|
346
|
-
try {
|
|
347
|
-
reconcileRegistry({
|
|
348
|
-
projectRoot,
|
|
349
|
-
installedVersion: getClientVersion(),
|
|
350
|
-
installedIdentity: installedRegistryIdentity(),
|
|
351
|
-
checkLatest: subArgs.includes('--check-latest'),
|
|
352
|
-
});
|
|
353
|
-
process.exitCode = 0;
|
|
354
|
-
}
|
|
355
|
-
catch (error) {
|
|
356
|
-
printRegistryReconciliationError(error);
|
|
357
|
-
process.exitCode = 1;
|
|
358
|
-
}
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
case 'activate': {
|
|
362
|
-
const { activate } = await import('./commands/activate.js');
|
|
363
|
-
// Parse activate args
|
|
364
|
-
let licenseKey;
|
|
365
|
-
let serverUrl;
|
|
366
|
-
let nonInteractive = false;
|
|
367
|
-
for (let i = 0; i < subArgs.length; i++) {
|
|
368
|
-
const arg = subArgs[i];
|
|
369
|
-
if (arg === '--server-url') {
|
|
370
|
-
serverUrl = subArgs[++i];
|
|
371
|
-
}
|
|
372
|
-
else if (arg === '--non-interactive') {
|
|
373
|
-
nonInteractive = true;
|
|
374
|
-
}
|
|
375
|
-
else if (arg === '--help' || arg === '-h') {
|
|
376
|
-
console.log(HELP_TEXT);
|
|
377
|
-
process.exit(0);
|
|
378
|
-
}
|
|
379
|
-
else if (!arg.startsWith('-')) {
|
|
380
|
-
licenseKey = arg;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (!licenseKey) {
|
|
384
|
-
console.error('Error: License key is required.');
|
|
385
|
-
console.error('Usage: neocortex-client activate <license-key>');
|
|
386
|
-
console.error('Example: neocortex-client activate NX-PRO-ABC-123');
|
|
387
|
-
process.exit(1);
|
|
388
|
-
}
|
|
389
|
-
try {
|
|
390
|
-
const result = await activate({
|
|
391
|
-
licenseKey,
|
|
392
|
-
serverUrl,
|
|
393
|
-
nonInteractive,
|
|
394
|
-
});
|
|
395
|
-
if (result.success) {
|
|
396
|
-
console.log(result.message);
|
|
397
|
-
process.exit(0);
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
console.error(result.message);
|
|
401
|
-
process.exit(1);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
catch (err) {
|
|
405
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
406
|
-
console.error(`Activation failed: ${message}`);
|
|
407
|
-
process.exit(1);
|
|
408
|
-
}
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
case 'cache-status': {
|
|
412
|
-
// cache-status requires initialized circuit breaker and telemetry queue.
|
|
413
|
-
// For CLI use, we provide a simplified status report.
|
|
414
|
-
console.log('Cache status requires an active client session.');
|
|
415
|
-
console.log('Use this command within a running Neocortex client context.');
|
|
416
|
-
process.exit(0);
|
|
417
|
-
break;
|
|
418
|
-
}
|
|
419
|
-
case 'doctor': {
|
|
420
|
-
const { doctorCliHandler } = await import('./commands/doctor.js');
|
|
421
|
-
const exitCode = await doctorCliHandler(subArgs);
|
|
422
|
-
process.exit(exitCode);
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
|
-
case 'config': {
|
|
426
|
-
const { configCliHandler } = await import('./commands/config.js');
|
|
427
|
-
const exitCode = await configCliHandler(subArgs);
|
|
428
|
-
process.exit(exitCode);
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
case 'refresh-memory': {
|
|
432
|
-
const { refreshMemoryCliHandler } = await import('./commands/refresh-memory.js');
|
|
433
|
-
const exitCode = await refreshMemoryCliHandler(subArgs);
|
|
434
|
-
process.exit(exitCode);
|
|
435
|
-
break;
|
|
436
|
-
}
|
|
437
|
-
case 'architecture-memory': {
|
|
438
|
-
const { architectureMemoryTerminalCliHandler } = await import('./commands/architecture-memory-terminal.js');
|
|
439
|
-
const exitCode = await architectureMemoryTerminalCliHandler(subArgs);
|
|
440
|
-
process.exit(exitCode);
|
|
441
|
-
break;
|
|
442
|
-
}
|
|
443
|
-
case 'planning-diagnosis': {
|
|
444
|
-
const { planningDiagnosisCliHandler } = await import('./commands/planning-diagnosis.js');
|
|
445
|
-
const exitCode = await planningDiagnosisCliHandler(subArgs);
|
|
446
|
-
process.exit(exitCode);
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
case 'planning-research': {
|
|
450
|
-
const { planningResearchCliHandler } = await import('./commands/planning-research.js');
|
|
451
|
-
const exitCode = await planningResearchCliHandler(subArgs);
|
|
452
|
-
process.exit(exitCode);
|
|
453
|
-
break;
|
|
454
|
-
}
|
|
455
|
-
case 'private-session': {
|
|
456
|
-
const { privateSessionCliHandler } = await import('./commands/private-session.js');
|
|
457
|
-
const exitCode = await privateSessionCliHandler(subArgs);
|
|
458
|
-
process.exit(exitCode);
|
|
459
|
-
break;
|
|
460
|
-
}
|
|
461
|
-
case 'planning-memory': {
|
|
462
|
-
const { planningMemoryCliHandler } = await import('./commands/planning-memory.js');
|
|
463
|
-
const exitCode = await planningMemoryCliHandler(subArgs);
|
|
464
|
-
process.exit(exitCode);
|
|
465
|
-
break;
|
|
466
|
-
}
|
|
467
|
-
case 'planning-generation': {
|
|
468
|
-
const { planningGenerationCliHandler } = await import('./commands/planning-generation.js');
|
|
469
|
-
const exitCode = await planningGenerationCliHandler(subArgs);
|
|
470
|
-
process.exit(exitCode);
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
case 'story-checkpoint': {
|
|
474
|
-
const { storyCheckpointCliHandler } = await import('./commands/story-checkpoint.js');
|
|
475
|
-
const exitCode = await storyCheckpointCliHandler(subArgs);
|
|
476
|
-
process.exit(exitCode);
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
case 'story-worktree': {
|
|
480
|
-
const { storyWorktreeCliHandler } = await import('./commands/story-worktree.js');
|
|
481
|
-
const exitCode = await storyWorktreeCliHandler(subArgs);
|
|
482
|
-
process.exit(exitCode);
|
|
483
|
-
break;
|
|
484
|
-
}
|
|
485
|
-
case 'legacy-story-branch': {
|
|
486
|
-
const { legacyStoryBranchCliHandler } = await import('./commands/legacy-story-branch.js');
|
|
487
|
-
const exitCode = await legacyStoryBranchCliHandler(subArgs);
|
|
488
|
-
process.exit(exitCode);
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
case 'legacy-story-pr': {
|
|
492
|
-
const { legacyStoryPrCliHandler } = await import('./commands/legacy-story-pr.js');
|
|
493
|
-
const exitCode = await legacyStoryPrCliHandler(subArgs);
|
|
494
|
-
process.exit(exitCode);
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
case 'legacy-epic-terminal': {
|
|
498
|
-
const { legacyEpicTerminalCliHandler } = await import('./commands/legacy-epic-terminal.js');
|
|
499
|
-
const exitCode = await legacyEpicTerminalCliHandler(subArgs);
|
|
500
|
-
process.exit(exitCode);
|
|
501
|
-
break;
|
|
502
|
-
}
|
|
503
|
-
case 'mutation-qa': {
|
|
504
|
-
const { mutationQaCliHandler } = await import('./commands/mutation-qa.js');
|
|
505
|
-
const exitCode = await mutationQaCliHandler(subArgs);
|
|
506
|
-
process.exit(exitCode);
|
|
507
|
-
break;
|
|
508
|
-
}
|
|
509
|
-
case 'property-qa': {
|
|
510
|
-
const { propertyQaCliHandler } = await import('./commands/property-qa.js');
|
|
511
|
-
const exitCode = await propertyQaCliHandler(subArgs);
|
|
512
|
-
process.exit(exitCode);
|
|
513
|
-
break;
|
|
514
|
-
}
|
|
515
|
-
case 'qa-synthetic-backend': {
|
|
516
|
-
const { syntheticBackendCliHandler } = await import('./commands/qa-synthetic-backend.js');
|
|
517
|
-
process.exitCode = await syntheticBackendCliHandler(args.slice(1));
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
case 'qa-scan-review': {
|
|
521
|
-
const { qaScanReviewCliHandler } = await import('./commands/qa-scan-review.js');
|
|
522
|
-
const exitCode = await qaScanReviewCliHandler(subArgs);
|
|
523
|
-
process.exit(exitCode);
|
|
524
|
-
break;
|
|
525
|
-
}
|
|
526
|
-
case 'qa-root': {
|
|
527
|
-
const { qaControlCliHandler } = await import('./commands/qa-control.js');
|
|
528
|
-
process.exit(await qaControlCliHandler(subArgs));
|
|
529
|
-
break;
|
|
530
|
-
}
|
|
531
|
-
case 'refactor-root': {
|
|
532
|
-
if (subArgs[0] === 'control') {
|
|
533
|
-
const { refactorControlCliHandler } = await import('./commands/refactor-control.js');
|
|
534
|
-
process.exit(await refactorControlCliHandler(subArgs));
|
|
535
|
-
}
|
|
536
|
-
if (subArgs[0] === 'characterize') {
|
|
537
|
-
const { refactorCharacterizationCliHandler } = await import('./commands/refactor-characterization.js');
|
|
538
|
-
process.exit(refactorCharacterizationCliHandler(subArgs));
|
|
539
|
-
}
|
|
540
|
-
if (subArgs[0] === 'review-accept' || subArgs[0] === 'review-status') {
|
|
541
|
-
const { refactorReviewCliHandler } = await import('./commands/refactor-review.js');
|
|
542
|
-
process.exit(await refactorReviewCliHandler(subArgs));
|
|
543
|
-
}
|
|
544
|
-
if (subArgs[0]?.startsWith('commit-')) {
|
|
545
|
-
const { refactorCommitCliHandler } = await import('./commands/refactor-commit.js');
|
|
546
|
-
process.exit(refactorCommitCliHandler(subArgs));
|
|
547
|
-
}
|
|
548
|
-
const { refactorRootCliHandler } = await import('./commands/refactor-root.js');
|
|
549
|
-
const exitCode = refactorRootCliHandler(subArgs);
|
|
550
|
-
process.exit(exitCode);
|
|
551
|
-
break;
|
|
552
|
-
}
|
|
553
|
-
case 'native-agent': {
|
|
554
|
-
const { nativeAgentCliHandler } = await import('./commands/native-agent.js');
|
|
555
|
-
const exitCode = await nativeAgentCliHandler(subArgs);
|
|
556
|
-
process.exit(exitCode);
|
|
557
|
-
break;
|
|
558
|
-
}
|
|
559
|
-
case 'architecture-answers': {
|
|
560
|
-
const { architectureAnswersCliHandler } = await import('./commands/architecture-answers.js');
|
|
561
|
-
const exitCode = await architectureAnswersCliHandler(subArgs);
|
|
562
|
-
process.exit(exitCode);
|
|
563
|
-
break;
|
|
564
|
-
}
|
|
565
|
-
case 'update': {
|
|
566
|
-
// P86.08: Redirect to `neocortex update` which handles npm install -g
|
|
567
|
-
console.log('To update Neocortex, run:');
|
|
568
|
-
console.log(' neocortex update');
|
|
569
|
-
console.log('');
|
|
570
|
-
console.log('Or manually:');
|
|
571
|
-
console.log(' npm install -g @ornexus/neocortex@latest');
|
|
572
|
-
process.exit(0);
|
|
573
|
-
break;
|
|
574
|
-
}
|
|
575
|
-
default: {
|
|
576
|
-
console.error(`Unknown command: ${command}`);
|
|
577
|
-
console.error('Run "neocortex-client --help" for usage information.');
|
|
578
|
-
process.exit(1);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
main().catch((err) => {
|
|
583
|
-
console.error(`Fatal error: ${err instanceof Error ? err.message : String(err)}`);
|
|
584
|
-
process.exit(1);
|
|
585
|
-
});
|
|
223
|
+
`.trim(),w=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);function y(r,a){const o=r.indexOf(a);return o>=0?r[o+1]:void 0}function g(r){if(r instanceof u){process.stderr.write(`[Neocortex] ${r.reasonCode}: ${r.remediation}
|
|
224
|
+
`);return}process.stderr.write(`[Neocortex] ${h.ARTIFACT_UNAVAILABLE}: registry reconciliation could not be completed safely; no invoke request was sent.
|
|
225
|
+
`)}function x(){return{version:d,checksum:p}}function b(r){const a=j(r);return!a||a.version===d&&a.checksum===p}function k(r,a){const o=y(a,"--project-root")||process.cwd();try{if(process.env.NEOCORTEX_REGISTRY_REEXECUTED==="1"&&!b(o))throw new u(h.ARTIFACT_MISMATCH,"The reinstalled client still does not match the trusted local projection; no invoke request was sent.");if(m({projectRoot:o,installedVersion:l(),installedIdentity:x()}).status!=="updated")return;const t=v(process.execPath,[process.argv[1],...r],{stdio:"inherit",env:{...process.env,NEOCORTEX_REGISTRY_REEXECUTED:"1"},shell:!1});return t.error?1:t.status??1}catch(e){return g(e),1}}async function C(){const r=process.argv.slice(2),a=r[0];a&&w.has(a.toLowerCase())&&process.exit(0),(!a||a==="--help"||a==="-h")&&(console.log(f),process.exit(0)),(a==="--version"||a==="-v")&&(console.log(l()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
|
|
226
|
+
`),process.exit(0));const o=r.slice(1);switch(a){case"invoke":{const e=k(r,o);if(e!==void 0){process.exitCode=e;break}const{invokeCliHandler:t,flushInvokeCliOutput:c}=await import("./commands/invoke.js"),s=await t(o),n=await c();process.exitCode=n?s:1;break}case"reconcile-registry":{const e=y(o,"--project-root")||process.cwd();try{m({projectRoot:e,installedVersion:l(),installedIdentity:x(),checkLatest:o.includes("--check-latest")}),process.exitCode=0}catch(t){g(t),process.exitCode=1}break}case"activate":{const{activate:e}=await import("./commands/activate.js");let t,c,s=!1;for(let n=0;n<o.length;n++){const i=o[n];i==="--server-url"?c=o[++n]:i==="--non-interactive"?s=!0:i==="--help"||i==="-h"?(console.log(f),process.exit(0)):i.startsWith("-")||(t=i)}t||(console.error("Error: License key is required."),console.error("Usage: neocortex-client activate <license-key>"),console.error("Example: neocortex-client activate NX-PRO-ABC-123"),process.exit(1));try{const n=await e({licenseKey:t,serverUrl:c,nonInteractive:s});n.success?(console.log(n.message),process.exit(0)):(console.error(n.message),process.exit(1))}catch(n){const i=n instanceof Error?n.message:String(n);console.error(`Activation failed: ${i}`),process.exit(1)}break}case"cache-status":{console.log("Cache status requires an active client session."),console.log("Use this command within a running Neocortex client context."),process.exit(0);break}case"doctor":{const{doctorCliHandler:e}=await import("./commands/doctor.js"),t=await e(o);process.exit(t);break}case"config":{const{configCliHandler:e}=await import("./commands/config.js"),t=await e(o);process.exit(t);break}case"refresh-memory":{const{refreshMemoryCliHandler:e}=await import("./commands/refresh-memory.js"),t=await e(o);process.exit(t);break}case"architecture-memory":{const{architectureMemoryTerminalCliHandler:e}=await import("./commands/architecture-memory-terminal.js"),t=await e(o);process.exit(t);break}case"planning-diagnosis":{const{planningDiagnosisCliHandler:e}=await import("./commands/planning-diagnosis.js"),t=await e(o);process.exit(t);break}case"planning-research":{const{planningResearchCliHandler:e}=await import("./commands/planning-research.js"),t=await e(o);process.exit(t);break}case"private-session":{const{privateSessionCliHandler:e}=await import("./commands/private-session.js"),t=await e(o);process.exit(t);break}case"planning-memory":{const{planningMemoryCliHandler:e}=await import("./commands/planning-memory.js"),t=await e(o);process.exit(t);break}case"planning-generation":{const{planningGenerationCliHandler:e}=await import("./commands/planning-generation.js"),t=await e(o);process.exit(t);break}case"story-checkpoint":{const{storyCheckpointCliHandler:e}=await import("./commands/story-checkpoint.js"),t=await e(o);process.exit(t);break}case"story-worktree":{const{storyWorktreeCliHandler:e}=await import("./commands/story-worktree.js"),t=await e(o);process.exit(t);break}case"legacy-story-branch":{const{legacyStoryBranchCliHandler:e}=await import("./commands/legacy-story-branch.js"),t=await e(o);process.exit(t);break}case"legacy-story-pr":{const{legacyStoryPrCliHandler:e}=await import("./commands/legacy-story-pr.js"),t=await e(o);process.exit(t);break}case"legacy-epic-terminal":{const{legacyEpicTerminalCliHandler:e}=await import("./commands/legacy-epic-terminal.js"),t=await e(o);process.exit(t);break}case"mutation-qa":{const{mutationQaCliHandler:e}=await import("./commands/mutation-qa.js"),t=await e(o);process.exit(t);break}case"property-qa":{const{propertyQaCliHandler:e}=await import("./commands/property-qa.js"),t=await e(o);process.exit(t);break}case"qa-synthetic-backend":{const{syntheticBackendCliHandler:e}=await import("./commands/qa-synthetic-backend.js");process.exitCode=await e(r.slice(1));break}case"qa-scan-review":{const{qaScanReviewCliHandler:e}=await import("./commands/qa-scan-review.js"),t=await e(o);process.exit(t);break}case"qa-root":{const{qaControlCliHandler:e}=await import("./commands/qa-control.js");process.exit(await e(o));break}case"refactor-root":{if(o[0]==="control"){const{refactorControlCliHandler:c}=await import("./commands/refactor-control.js");process.exit(await c(o))}if(o[0]==="characterize"){const{refactorCharacterizationCliHandler:c}=await import("./commands/refactor-characterization.js");process.exit(c(o))}if(o[0]==="review-accept"||o[0]==="review-status"){const{refactorReviewCliHandler:c}=await import("./commands/refactor-review.js");process.exit(await c(o))}if(o[0]?.startsWith("commit-")){const{refactorCommitCliHandler:c}=await import("./commands/refactor-commit.js");process.exit(c(o))}const{refactorRootCliHandler:e}=await import("./commands/refactor-root.js"),t=e(o);process.exit(t);break}case"native-agent":{const{nativeAgentCliHandler:e}=await import("./commands/native-agent.js"),t=await e(o);process.exit(t);break}case"architecture-answers":{const{architectureAnswersCliHandler:e}=await import("./commands/architecture-answers.js"),t=await e(o);process.exit(t);break}case"update":{console.log("To update Neocortex, run:"),console.log(" neocortex update"),console.log(""),console.log("Or manually:"),console.log(" npm install -g @ornexus/neocortex@latest"),process.exit(0);break}default:console.error(`Unknown command: ${a}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}C().catch(r=>{console.error(`Fatal error: ${r instanceof Error?r.message:String(r)}`),process.exit(1)});
|