@ornexus/neocortex 4.59.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 (197) hide show
  1. package/LICENSE +56 -0
  2. package/LICENSE-COMMERCIAL.md +70 -0
  3. package/README.md +58 -0
  4. package/dist/sbom.cdx.json +7067 -0
  5. package/docs/install/coderabbit-manual-setup.md +86 -0
  6. package/docs/install/installer-diagnostics.md +107 -0
  7. package/docs/install/linux-global-install.md +97 -0
  8. package/install.js +572 -0
  9. package/install.ps1 +2214 -0
  10. package/install.sh +2013 -0
  11. package/package.json +118 -0
  12. package/packages/client/dist/adapters/adapter-registry.d.ts +61 -0
  13. package/packages/client/dist/adapters/adapter-registry.js +1 -0
  14. package/packages/client/dist/adapters/antigravity-adapter.d.ts +18 -0
  15. package/packages/client/dist/adapters/antigravity-adapter.js +2 -0
  16. package/packages/client/dist/adapters/claude-code-adapter.d.ts +19 -0
  17. package/packages/client/dist/adapters/claude-code-adapter.js +3 -0
  18. package/packages/client/dist/adapters/codex-adapter.d.ts +19 -0
  19. package/packages/client/dist/adapters/codex-adapter.js +2 -0
  20. package/packages/client/dist/adapters/cursor-adapter.d.ts +19 -0
  21. package/packages/client/dist/adapters/cursor-adapter.js +4 -0
  22. package/packages/client/dist/adapters/gemini-adapter.d.ts +18 -0
  23. package/packages/client/dist/adapters/gemini-adapter.js +2 -0
  24. package/packages/client/dist/adapters/index.d.ts +19 -0
  25. package/packages/client/dist/adapters/index.js +1 -0
  26. package/packages/client/dist/adapters/platform-detector.d.ts +48 -0
  27. package/packages/client/dist/adapters/platform-detector.js +1 -0
  28. package/packages/client/dist/adapters/target-adapter.d.ts +70 -0
  29. package/packages/client/dist/adapters/target-adapter.js +0 -0
  30. package/packages/client/dist/adapters/vscode-adapter.d.ts +19 -0
  31. package/packages/client/dist/adapters/vscode-adapter.js +2 -0
  32. package/packages/client/dist/agent/refresh-stubs.d.ts +80 -0
  33. package/packages/client/dist/agent/refresh-stubs.js +2 -0
  34. package/packages/client/dist/agent/update-agent-yaml.d.ts +26 -0
  35. package/packages/client/dist/agent/update-agent-yaml.js +1 -0
  36. package/packages/client/dist/agent/update-description.d.ts +45 -0
  37. package/packages/client/dist/agent/update-description.js +1 -0
  38. package/packages/client/dist/cache/crypto-utils.d.ts +30 -0
  39. package/packages/client/dist/cache/crypto-utils.js +1 -0
  40. package/packages/client/dist/cache/encrypted-cache.d.ts +30 -0
  41. package/packages/client/dist/cache/encrypted-cache.js +1 -0
  42. package/packages/client/dist/cache/in-memory-asset-cache.d.ts +62 -0
  43. package/packages/client/dist/cache/in-memory-asset-cache.js +1 -0
  44. package/packages/client/dist/cache/index.d.ts +13 -0
  45. package/packages/client/dist/cache/index.js +1 -0
  46. package/packages/client/dist/cache/protected-pi-boundary.d.ts +19 -0
  47. package/packages/client/dist/cache/protected-pi-boundary.js +1 -0
  48. package/packages/client/dist/checkpoint/checkpoint-client-reader.d.ts +45 -0
  49. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -0
  50. package/packages/client/dist/checkpoint/index.d.ts +12 -0
  51. package/packages/client/dist/checkpoint/index.js +1 -0
  52. package/packages/client/dist/checkpoint/shared-checkpoint-types.d.ts +85 -0
  53. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -0
  54. package/packages/client/dist/cli.d.ts +14 -0
  55. package/packages/client/dist/cli.js +48 -0
  56. package/packages/client/dist/commands/activate.d.ts +55 -0
  57. package/packages/client/dist/commands/activate.js +8 -0
  58. package/packages/client/dist/commands/cache-status.d.ts +39 -0
  59. package/packages/client/dist/commands/cache-status.js +2 -0
  60. package/packages/client/dist/commands/invoke.d.ts +229 -0
  61. package/packages/client/dist/commands/invoke.js +63 -0
  62. package/packages/client/dist/commands/refresh-memory.d.ts +11 -0
  63. package/packages/client/dist/commands/refresh-memory.js +1 -0
  64. package/packages/client/dist/config/resolver-selection.d.ts +40 -0
  65. package/packages/client/dist/config/resolver-selection.js +1 -0
  66. package/packages/client/dist/config/secure-config.d.ts +78 -0
  67. package/packages/client/dist/config/secure-config.js +12 -0
  68. package/packages/client/dist/constants.d.ts +25 -0
  69. package/packages/client/dist/constants.js +1 -0
  70. package/packages/client/dist/context/context-collector.d.ts +28 -0
  71. package/packages/client/dist/context/context-collector.js +2 -0
  72. package/packages/client/dist/context/context-sanitizer.d.ts +28 -0
  73. package/packages/client/dist/context/context-sanitizer.js +1 -0
  74. package/packages/client/dist/continuity/continuity-client-state-store.d.ts +183 -0
  75. package/packages/client/dist/continuity/continuity-client-state-store.js +1 -0
  76. package/packages/client/dist/continuity/invoke-hooks.d.ts +18 -0
  77. package/packages/client/dist/continuity/invoke-hooks.js +1 -0
  78. package/packages/client/dist/continuity/migrations/001-initial-schema.d.ts +11 -0
  79. package/packages/client/dist/continuity/migrations/001-initial-schema.js +263 -0
  80. package/packages/client/dist/continuity/sqlite-store.d.ts +409 -0
  81. package/packages/client/dist/continuity/sqlite-store.js +226 -0
  82. package/packages/client/dist/errors/error-messages.d.ts +40 -0
  83. package/packages/client/dist/errors/error-messages.js +2 -0
  84. package/packages/client/dist/graph-retrieval/pre-command-hook.d.ts +31 -0
  85. package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -0
  86. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.d.ts +77 -0
  87. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -0
  88. package/packages/client/dist/i18n/first-run.d.ts +23 -0
  89. package/packages/client/dist/i18n/first-run.js +2 -0
  90. package/packages/client/dist/index.d.ts +56 -0
  91. package/packages/client/dist/index.js +1 -0
  92. package/packages/client/dist/license/index.d.ts +5 -0
  93. package/packages/client/dist/license/index.js +1 -0
  94. package/packages/client/dist/license/license-client.d.ts +79 -0
  95. package/packages/client/dist/license/license-client.js +1 -0
  96. package/packages/client/dist/machine/fingerprint.d.ts +34 -0
  97. package/packages/client/dist/machine/fingerprint.js +2 -0
  98. package/packages/client/dist/machine/index.d.ts +5 -0
  99. package/packages/client/dist/machine/index.js +1 -0
  100. package/packages/client/dist/memory/project-memory-writer.d.ts +74 -0
  101. package/packages/client/dist/memory/project-memory-writer.js +36 -0
  102. package/packages/client/dist/memory/shared-project-memory-types.d.ts +370 -0
  103. package/packages/client/dist/memory/shared-project-memory-types.js +2 -0
  104. package/packages/client/dist/policy/architecture-policy.d.ts +40 -0
  105. package/packages/client/dist/policy/architecture-policy.js +2 -0
  106. package/packages/client/dist/policy/index.d.ts +8 -0
  107. package/packages/client/dist/policy/index.js +1 -0
  108. package/packages/client/dist/policy/shared-policy-types.d.ts +89 -0
  109. package/packages/client/dist/policy/shared-policy-types.js +0 -0
  110. package/packages/client/dist/resilience/circuit-breaker.d.ts +70 -0
  111. package/packages/client/dist/resilience/circuit-breaker.js +1 -0
  112. package/packages/client/dist/resilience/degradation-manager.d.ts +67 -0
  113. package/packages/client/dist/resilience/degradation-manager.js +1 -0
  114. package/packages/client/dist/resilience/freshness-indicator.d.ts +59 -0
  115. package/packages/client/dist/resilience/freshness-indicator.js +1 -0
  116. package/packages/client/dist/resilience/index.d.ts +8 -0
  117. package/packages/client/dist/resilience/index.js +1 -0
  118. package/packages/client/dist/resilience/recovery-detector.d.ts +59 -0
  119. package/packages/client/dist/resilience/recovery-detector.js +1 -0
  120. package/packages/client/dist/resolvers/asset-resolver.d.ts +79 -0
  121. package/packages/client/dist/resolvers/asset-resolver.js +0 -0
  122. package/packages/client/dist/resolvers/local-resolver.d.ts +26 -0
  123. package/packages/client/dist/resolvers/local-resolver.js +8 -0
  124. package/packages/client/dist/resolvers/remote-resolver.d.ts +91 -0
  125. package/packages/client/dist/resolvers/remote-resolver.js +1 -0
  126. package/packages/client/dist/runner/cli.d.ts +121 -0
  127. package/packages/client/dist/runner/cli.js +20 -0
  128. package/packages/client/dist/runner/scheduler.d.ts +116 -0
  129. package/packages/client/dist/runner/scheduler.js +6 -0
  130. package/packages/client/dist/runner-cli.d.ts +9 -0
  131. package/packages/client/dist/runner-cli.js +3 -0
  132. package/packages/client/dist/state/project-state-snapshot.d.ts +15 -0
  133. package/packages/client/dist/state/project-state-snapshot.js +1 -0
  134. package/packages/client/dist/state/state-json-repair.d.ts +17 -0
  135. package/packages/client/dist/state/state-json-repair.js +3 -0
  136. package/packages/client/dist/telemetry/index.d.ts +5 -0
  137. package/packages/client/dist/telemetry/index.js +1 -0
  138. package/packages/client/dist/telemetry/offline-queue.d.ts +57 -0
  139. package/packages/client/dist/telemetry/offline-queue.js +1 -0
  140. package/packages/client/dist/tier/index.d.ts +5 -0
  141. package/packages/client/dist/tier/index.js +1 -0
  142. package/packages/client/dist/tier/tier-aware-client.d.ts +105 -0
  143. package/packages/client/dist/tier/tier-aware-client.js +1 -0
  144. package/packages/client/dist/types/index.d.ts +140 -0
  145. package/packages/client/dist/types/index.js +1 -0
  146. package/packages/client/dist/yoloop/discovery-hook.d.ts +85 -0
  147. package/packages/client/dist/yoloop/discovery-hook.js +2 -0
  148. package/packages/client/dist/yoloop/index.d.ts +10 -0
  149. package/packages/client/dist/yoloop/index.js +1 -0
  150. package/packages/client/dist/yoloop/invoke-hooks.d.ts +125 -0
  151. package/packages/client/dist/yoloop/invoke-hooks.js +5 -0
  152. package/packages/client/dist/yoloop/shared-discover-epics.d.ts +289 -0
  153. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -0
  154. package/packages/client/dist/yoloop/shared-yoloop-types.d.ts +172 -0
  155. package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -0
  156. package/packages/client/dist/yoloop/yoloop-client-state-store.d.ts +124 -0
  157. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -0
  158. package/postinstall.js +754 -0
  159. package/targets-stubs/antigravity/README.md +36 -0
  160. package/targets-stubs/antigravity/gemini.md +29 -0
  161. package/targets-stubs/antigravity/install-antigravity.sh +153 -0
  162. package/targets-stubs/antigravity/mcp-config.json +30 -0
  163. package/targets-stubs/antigravity/skill/SKILL.md +159 -0
  164. package/targets-stubs/claude-code/.mcp.json +32 -0
  165. package/targets-stubs/claude-code/README.md +20 -0
  166. package/targets-stubs/claude-code/neocortex-root.agent.yaml +42 -0
  167. package/targets-stubs/claude-code/neocortex-root.md +310 -0
  168. package/targets-stubs/claude-code/neocortex.agent.yaml +42 -0
  169. package/targets-stubs/claude-code/neocortex.md +378 -0
  170. package/targets-stubs/codex/AGENTS.md +244 -0
  171. package/targets-stubs/codex/README.md +47 -0
  172. package/targets-stubs/codex/config-mcp.toml +22 -0
  173. package/targets-stubs/codex/install-codex.sh +63 -0
  174. package/targets-stubs/codex/neocortex.toml +29 -0
  175. package/targets-stubs/cursor/README.md +33 -0
  176. package/targets-stubs/cursor/agent.md +204 -0
  177. package/targets-stubs/cursor/install-cursor.sh +50 -0
  178. package/targets-stubs/cursor/mcp.json +30 -0
  179. package/targets-stubs/gemini-cli/README.md +34 -0
  180. package/targets-stubs/gemini-cli/agent.md +234 -0
  181. package/targets-stubs/gemini-cli/agents/neocortex.md +54 -0
  182. package/targets-stubs/gemini-cli/gemini.md +46 -0
  183. package/targets-stubs/gemini-cli/install-gemini.sh +70 -0
  184. package/targets-stubs/gemini-cli/settings-mcp.json +30 -0
  185. package/targets-stubs/kimi/mcp.json +33 -0
  186. package/targets-stubs/kimi/neocortex.md +54 -0
  187. package/targets-stubs/lib/mcp-merge.js +189 -0
  188. package/targets-stubs/openclaw/README.md +12 -0
  189. package/targets-stubs/openclaw/SKILL.md +88 -0
  190. package/targets-stubs/opencode/neocortex-root.md +261 -0
  191. package/targets-stubs/opencode/neocortex.md +59 -0
  192. package/targets-stubs/opencode/opencode-mcp.json +35 -0
  193. package/targets-stubs/vscode/README.md +34 -0
  194. package/targets-stubs/vscode/copilot-instructions.md +47 -0
  195. package/targets-stubs/vscode/install-vscode.sh +72 -0
  196. package/targets-stubs/vscode/mcp.json +36 -0
  197. package/targets-stubs/vscode/neocortex.agent.md +245 -0
@@ -0,0 +1,86 @@
1
+ # CodeRabbit manual setup
2
+
3
+ Story: `P177.04`
4
+
5
+ Evidence placeholder: `[P177-EV-CODERABBIT-OPTIN]`
6
+
7
+ This guide documents the public-safe CodeRabbit setup boundary for Neocortex
8
+ installs. CodeRabbit is an optional third-party tool. Neocortex default npm
9
+ install, global postinstall, `install.sh`, and `install.ps1` do not install it or
10
+ run vendor onboarding flows.
11
+
12
+ ## Default Neocortex install behavior
13
+
14
+ Default installation only reports CodeRabbit status as an informational optional
15
+ tool check:
16
+
17
+ ```text
18
+ CodeRabbit CLI optional setup skipped: P177_OPTIONAL_TOOL_SKIPPED_NONINTERACTIVE
19
+ ```
20
+
21
+ The exact installer output can vary by platform and quiet mode, but the contract
22
+ is stable:
23
+
24
+ - no CodeRabbit network installer is invoked by default;
25
+ - no shell-piped vendor installer, package-manager install, doctor check, auth
26
+ flow, browser flow, or shell profile mutation is started by Neocortex;
27
+ - absence of CodeRabbit is non-blocking for Neocortex installation;
28
+ - CI and non-interactive runs use public reason codes such as
29
+ `P177_OPTIONAL_TOOL_SKIPPED_CI` or
30
+ `P177_OPTIONAL_TOOL_SKIPPED_NONINTERACTIVE`.
31
+
32
+ ## Manual setup boundary
33
+
34
+ If a user wants CodeRabbit, they must install and authenticate it outside the
35
+ Neocortex npm lifecycle by following CodeRabbit's own current public
36
+ documentation. Review any third-party installer before running it because it may
37
+ change `PATH`, inspect the local environment, run doctor checks, or require
38
+ browser authentication.
39
+
40
+ Neocortex does not define a default CodeRabbit opt-in flag for npm `postinstall`.
41
+ Until a future public contract adds one, setup is manual: install the third-party
42
+ tool separately, authenticate with the vendor separately, and then rerun
43
+ Neocortex commands. Keep vendor output out of Neocortex issues and release
44
+ evidence; summarize only public reason codes and synthetic paths.
45
+
46
+ After manual setup, Neocortex may detect that a `coderabbit` command is already
47
+ available and report it as an optional/manual tool. Neocortex still does not run
48
+ CodeRabbit installation or onboarding during default install.
49
+
50
+ ## Public-safe diagnostics
51
+
52
+ Use synthetic summaries and reason codes in support reports:
53
+
54
+ ```json
55
+ {
56
+ "tool": "coderabbit",
57
+ "phase": "optional-tool-setup",
58
+ "status": "skipped",
59
+ "reasonCode": "P177_OPTIONAL_TOOL_OPT_IN_REQUIRED",
60
+ "summary": "Optional CodeRabbit setup is manual and outside default Neocortex install."
61
+ }
62
+ ```
63
+
64
+ Installer stdout may render the same information as bounded key/value text, for
65
+ example `reasonCode=P177_OPTIONAL_TOOL_SKIPPED_CI` with `code=null`,
66
+ `signal=null`, `timedOut=false` and `redactionReasonCode=P177_PUBLIC_SAFE_LOG_REDACTED`.
67
+ See `docs/install/installer-diagnostics.md` for the shared diagnostics contract.
68
+
69
+ If support asks whether CodeRabbit was installed by default, answer with the
70
+ diagnostic reason code and this contract: default Neocortex postinstall skips
71
+ third-party installers and reports only optional/manual status. Do not paste raw
72
+ CodeRabbit onboarding, browser-auth prompts, shell profile diffs, or terminal
73
+ transcripts.
74
+
75
+ Do not paste raw vendor onboarding output, terminal transcripts, private paths,
76
+ license keys, tokens, customer data, or browser-auth details into issues, docs,
77
+ tests, or project memory.
78
+
79
+ ## Traceability
80
+
81
+ | Story item | Contract | Validation |
82
+ | --- | --- | --- |
83
+ | `P177-REQ-04` | `P177-CON-OPT-01`, `P177-CON-DIAG-01`, `P177-CON-TARBALL-01` | `P177-VAL-04` / `[P177-EV-CODERABBIT-OPTIN]` |
84
+ | T2 / AC1 | Default postinstall does not invoke CodeRabbit installers. | Fake `curl`, `npm`, and `coderabbit` tests under `scripts/test-tier3-install.sh`. |
85
+ | T3 / AC2 / AC3 | Setup is manual, CI/non-interactive skips emit public reason codes. | This document and installer script diagnostics. |
86
+ | T4 / AC4 | Missing CodeRabbit is informational and non-blocking. | Installer scripts return success from the optional status check. |
@@ -0,0 +1,107 @@
1
+ # Installer diagnostics and optional-tool skips
2
+
3
+ Story: `P177.05`
4
+
5
+ Evidence placeholder: `[P177-EV-DIAGNOSTICS]`
6
+
7
+ Neocortex installer diagnostics are public-safe summaries. They use stable P177
8
+ reason codes and bounded metadata only. Do not attach raw npm lifecycle logs,
9
+ third-party onboarding output, private local paths, tokens, license keys or
10
+ customer data to support issues.
11
+
12
+ ## Optional tool diagnostics
13
+
14
+ Default npm lifecycle installs do not run CodeRabbit or similar third-party
15
+ installers. CI and non-interactive runs report a skip summary such as:
16
+
17
+ ```text
18
+ [neocortex-installer] tool=coderabbit phase=optional-tool-setup status=skipped reasonCode=P177_OPTIONAL_TOOL_SKIPPED_CI code=null signal=null timedOut=false retryAttempt=0 timeoutMs=0 docPath=docs/install/coderabbit-manual-setup.md redactionReasonCode=P177_PUBLIC_SAFE_LOG_REDACTED summary=optional_tool_setup_skipped
19
+ ```
20
+
21
+ Stable skip and opt-in reason codes:
22
+
23
+ - `P177_OPTIONAL_TOOL_SKIPPED_CI`
24
+ - `P177_OPTIONAL_TOOL_SKIPPED_NONINTERACTIVE`
25
+ - `P177_OPTIONAL_TOOL_OPT_IN_REQUIRED`
26
+ - `P177_OPTIONAL_TOOL_DETECTED_MANUAL`
27
+
28
+ Optional child failures, if a future explicit opt-in path runs one, remain
29
+ fail-open and use bounded summaries such as `P177_OPTIONAL_TOOL_SIGNAL`,
30
+ `P177_OPTIONAL_TOOL_TIMEOUT` or `P177_OPTIONAL_TOOL_SPAWN_ERROR`.
31
+
32
+ ## Enterprise continuity SQLite adapter
33
+
34
+ Enterprise continuity commands use a project-local SQLite store only when the
35
+ optional `better-sqlite3` adapter is available. Base `neocortex-client` commands
36
+ continue to start without this native adapter. If an Enterprise continuity command
37
+ needs durable SQLite and the adapter is missing or cannot load, it must stop before
38
+ creating or mutating `.neocortex/continuity` and return public reason code
39
+ `sqlite-adapter-unavailable` with bounded guidance:
40
+
41
+ ```text
42
+ npm install --workspace packages/client better-sqlite3 --include=optional
43
+ ```
44
+
45
+ Doctor output must remain public-safe: report only the adapter status, SQLite file
46
+ relative path, WAL/integrity status and reason codes such as
47
+ `sqlite-adapter-unavailable` or `sqlite-integrity-failed`. Do not paste native
48
+ build logs, private local paths, raw stderr, tokens, license keys or customer data
49
+ into support issues.
50
+
51
+ ## Child signal, timeout and spawn diagnostics
52
+
53
+ Postinstall child diagnostics include only these safe fields: tool, phase,
54
+ status, reason code, numeric code or `null`, signal or `null`, timeout flag,
55
+ retry attempt, optional timeout metadata and sanitized error code. Raw child
56
+ stdout/stderr is intentionally excluded from diagnostic helpers.
57
+
58
+ ### Public reason-code reference
59
+
60
+ Use these codes in issues, release notes and support handoffs instead of raw
61
+ terminal output:
62
+
63
+ | Reason code | Symptom summary | Safe next action |
64
+ | --- | --- | --- |
65
+ | `P177_CHILD_SIGNAL` | A mandatory first-party child closed with a signal such as `SIGINT`. | Retry from a fresh user-owned shell; keep the bounded `signal` field and omit child output. |
66
+ | `P177_CHILD_TIMEOUT` | A mandatory first-party child exceeded its bounded timeout. | Retry once after checking local shell health; attach only `timeoutMs`, `timedOut=true` and the public code. |
67
+ | `P177_PARENT_INTERRUPTED` | The npm lifecycle parent received an interruption and cleaned up a live child. | Confirm whether the user or terminal interrupted the install, then rerun without elevated `HOME`. |
68
+ | `P177_OPTIONAL_TOOL_SIGNAL` | An explicitly opted-in optional tool child closed with a signal. | Treat optional tool setup as fail-open; install or troubleshoot that tool manually outside Neocortex. |
69
+ | `P177_OPTIONAL_TOOL_TIMEOUT` | An explicitly opted-in optional tool child timed out. | Skip optional setup for the Neocortex install and continue with manual vendor setup later. |
70
+ | `P177_OPTIONAL_TOOL_SKIPPED_CI` | CI/non-interactive install skipped optional third-party setup. | No action required for Neocortex install; this is expected in CI. |
71
+ | `P177_OPTIONAL_TOOL_SKIPPED_NONINTERACTIVE` | Non-interactive install skipped optional third-party setup. | Run manual vendor setup separately only if the user wants the optional tool. |
72
+ | `P177_OPTIONAL_TOOL_OPT_IN_REQUIRED` | CodeRabbit or a similar tool is not installed by default. | Follow `docs/install/coderabbit-manual-setup.md` outside the npm lifecycle. |
73
+ | `P177_ROOT_HOME_DETECTED` | Linux root/sudo context may write user config under an elevated account. | Stop using sudo-first install; move to a Node version manager or npm user prefix and use synthetic recovery steps. |
74
+ | `P177_PUBLIC_SAFE_LOG_REDACTED` | Raw child/vendor output or local paths were intentionally omitted. | Share the reason code and bounded fields only; do not paste raw logs. |
75
+ | `sqlite-adapter-unavailable` | Enterprise continuity SQLite adapter is not installed or cannot be loaded. | Reinstall with optional dependencies or install `better-sqlite3` for the client workspace; keep only bounded reason-code evidence. |
76
+ | `sqlite-integrity-failed` | Continuity SQLite integrity/corruption check failed. | Stop durable mutation and use future doctor/repair guidance with public-safe backup/audit evidence only. |
77
+
78
+ ### Sanitized SIGINT/lifecycle troubleshooting
79
+
80
+ For a sanitized SIGINT npm lifecycle interruption or timeout after optional tool
81
+ status text:
82
+
83
+ 1. Retry in a fresh non-sudo shell.
84
+ 2. Prefer a Node version manager or npm user prefix for global installs.
85
+ 3. Treat CodeRabbit output as optional/manual unless a user explicitly opted into
86
+ third-party setup outside the Neocortex npm lifecycle.
87
+ 4. If the summary includes `P177_CHILD_SIGNAL`, `P177_CHILD_TIMEOUT` or
88
+ `P177_PARENT_INTERRUPTED`, keep only the bounded `code`, `signal`, `timedOut`,
89
+ `timeoutMs` and retry metadata.
90
+ 5. If the summary includes `P177_OPTIONAL_TOOL_SIGNAL` or
91
+ `P177_OPTIONAL_TOOL_TIMEOUT`, continue the Neocortex install and handle the
92
+ optional tool manually later.
93
+ 6. If the summary includes `P177_ROOT_HOME_DETECTED`, follow the no-sudo recovery
94
+ guide with placeholders such as `<root-home>` and `<user-home>`.
95
+
96
+ ## Root HOME warning
97
+
98
+ Linux root/sudo contexts emit `P177_ROOT_HOME_DETECTED` when the install may write
99
+ user/global config under an elevated account. The warning uses synthetic path
100
+ examples only; see `docs/install/linux-global-install.md` for recovery guidance.
101
+
102
+ ## Traceability
103
+
104
+ | Requirement | Contract | Validation |
105
+ | --- | --- | --- |
106
+ | `P177-REQ-05` | `P177-CON-DIAG-01`, `P177-CON-INSTALLER-01`, `P177-CON-OPT-01` | `P177-VAL-05` / `[P177-EV-DIAGNOSTICS]` |
107
+ | `P177-REQ-07` | `P177-CON-CLI-01`, `P177-CON-OPT-01`, `P177-CON-DIAG-01` | `P177-VAL-07` / `[P177-EV-DOCS]` |
@@ -0,0 +1,97 @@
1
+ # Linux global install without sudo
2
+
3
+ Story: `P177.03`
4
+
5
+ Evidence placeholder: `[P177-EV-NOSUDO]`
6
+
7
+ This guide explains the public-safe Linux install path for Neocortex global npm
8
+ installs. It intentionally uses synthetic paths and placeholders only.
9
+
10
+ Public npm guidance recommends Node version managers for global-package
11
+ permission issues and lists an npm user prefix as the no-sudo fallback. This
12
+ Neocortex guide follows that order so the default path stays user-owned and does
13
+ not require root `HOME`.
14
+
15
+ ## Preferred install paths
16
+
17
+ Prefer a Node version manager first. npm documents this as the recommended way to
18
+ avoid global-package permission errors because Node and npm are installed under a
19
+ user-owned location.
20
+
21
+ ```bash
22
+ npm install -g @ornexus/neocortex
23
+ ```
24
+
25
+ If a Node version manager is not available, configure an npm user prefix before
26
+ installing globally:
27
+
28
+ ```bash
29
+ npm config set prefix ~/.local
30
+ export PATH="$HOME/.local/bin:$PATH"
31
+ npm install -g @ornexus/neocortex
32
+ ```
33
+
34
+ Persist the `PATH` line in the user's shell profile only after reviewing the
35
+ shell startup files for that account.
36
+
37
+ ## Why sudo-first installs are risky
38
+
39
+ Avoid starting with elevated installs such as a root shell or `sudo npm install
40
+ -g`. When the installer runs with root `HOME`, Neocortex user-scoped config and
41
+ agent targets can be written below the elevated account instead of the intended
42
+ user. Linux installer paths emit `P177_ROOT_HOME_DETECTED` when they detect a
43
+ root/sudo context before writing user-scoped config or targets.
44
+
45
+ The warning does not print real usernames or home directories. It summarizes the
46
+ risk and points to no-sudo remediation first.
47
+
48
+ ## Recovery from root-owned Neocortex config
49
+
50
+ Use reviewable, placeholder-based steps. Replace placeholders after validating
51
+ the source and destination paths for the affected machine.
52
+
53
+ 1. Inspect what exists under the elevated account:
54
+
55
+ ```bash
56
+ sudo ls -ld <root-home>/.neocortex <root-home>/.claude/agents/neocortex
57
+ ```
58
+
59
+ 2. Back up before changing ownership or copying anything:
60
+
61
+ ```bash
62
+ sudo tar -czf <reviewed-backup-path>/neocortex-root-config.tgz \
63
+ <root-home>/.neocortex \
64
+ <root-home>/.claude/agents/neocortex
65
+ ```
66
+
67
+ 3. Reinstall as the intended user using a Node version manager or npm user
68
+ prefix. If an existing activation config must be migrated, copy only reviewed
69
+ files with explicit owner/group placeholders:
70
+
71
+ ```bash
72
+ sudo install -d -m 700 -o <user> -g <group> <user-home>/.neocortex
73
+ sudo install -m 600 -o <user> -g <group> \
74
+ <root-home>/.neocortex/config.json \
75
+ <user-home>/.neocortex/config.json
76
+ ```
77
+
78
+ Do not run broad destructive cleanup commands from this guide. Remove or archive
79
+ root-owned files only after a human reviews the backup and confirms the intended
80
+ user install works.
81
+
82
+ ## Troubleshooting quick checks
83
+
84
+ - `P177_NOSUDO_EACCES_GUIDANCE`: update/install hit an npm permission error;
85
+ switch to a Node version manager or npm user prefix before retrying.
86
+ - `P177_ROOT_HOME_DETECTED`: Linux root/sudo context was detected; rerun as the
87
+ intended user or configure that user's npm prefix.
88
+ - `P177_PUBLIC_SAFE_LOG_REDACTED`: installer diagnostics intentionally omitted
89
+ raw local paths or child output; use the public reason code rather than a raw
90
+ terminal transcript in support evidence.
91
+ - Windows `USERPROFILE` behavior is not changed by this Linux guidance.
92
+
93
+ If a sanitized npm lifecycle interruption is reported after optional-tool status
94
+ text, do not assume CodeRabbit or another third-party tool is part of the default
95
+ install. Cross-check `docs/install/installer-diagnostics.md` for
96
+ `P177_CHILD_SIGNAL`, `P177_CHILD_TIMEOUT`, `P177_PARENT_INTERRUPTED` and optional
97
+ tool reason codes, then retry from a fresh user-owned shell.