@ornexus/neocortex 4.60.68 → 4.60.70

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 (232) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1194 -1194
  3. package/install.ps1 +1 -1
  4. package/install.sh +1 -1
  5. package/package.json +3 -3
  6. package/packages/client/dist/adapters/adapter-registry.js +1 -108
  7. package/packages/client/dist/adapters/antigravity-adapter.js +2 -77
  8. package/packages/client/dist/adapters/claude-code-adapter.js +3 -79
  9. package/packages/client/dist/adapters/codex-adapter.js +2 -80
  10. package/packages/client/dist/adapters/cursor-adapter.js +4 -115
  11. package/packages/client/dist/adapters/gemini-adapter.js +2 -71
  12. package/packages/client/dist/adapters/grok-adapter.js +2 -42
  13. package/packages/client/dist/adapters/index.js +1 -22
  14. package/packages/client/dist/adapters/platform-detector.js +1 -212
  15. package/packages/client/dist/adapters/target-adapter.js +0 -12
  16. package/packages/client/dist/adapters/vscode-adapter.js +2 -72
  17. package/packages/client/dist/agent/refresh-stubs.js +2 -417
  18. package/packages/client/dist/agent/update-agent-yaml.js +1 -102
  19. package/packages/client/dist/agent/update-description.js +1 -251
  20. package/packages/client/dist/cache/crypto-utils.js +1 -78
  21. package/packages/client/dist/cache/encrypted-cache.js +1 -108
  22. package/packages/client/dist/cache/in-memory-asset-cache.js +1 -73
  23. package/packages/client/dist/cache/index.js +1 -13
  24. package/packages/client/dist/cache/protected-pi-boundary.js +1 -44
  25. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -127
  26. package/packages/client/dist/checkpoint/index.js +1 -11
  27. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -32
  28. package/packages/client/dist/cli.js +3 -290
  29. package/packages/client/dist/commands/activate.js +8 -394
  30. package/packages/client/dist/commands/architecture-answers.js +7 -274
  31. package/packages/client/dist/commands/architecture-memory-terminal.js +4 -253
  32. package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -100
  33. package/packages/client/dist/commands/architecture-root-binding.js +1 -51
  34. package/packages/client/dist/commands/cache-status.js +2 -112
  35. package/packages/client/dist/commands/config.js +1 -88
  36. package/packages/client/dist/commands/doctor.js +2 -635
  37. package/packages/client/dist/commands/invoke.d.ts +6 -0
  38. package/packages/client/dist/commands/invoke.js +142 -7140
  39. package/packages/client/dist/commands/legacy-epic-terminal.js +1 -71
  40. package/packages/client/dist/commands/legacy-story-branch.js +1 -96
  41. package/packages/client/dist/commands/legacy-story-pr.js +1 -276
  42. package/packages/client/dist/commands/mutation-qa-checkpoint.js +5 -285
  43. package/packages/client/dist/commands/mutation-qa-gate.js +1 -54
  44. package/packages/client/dist/commands/mutation-qa-git.js +1 -41
  45. package/packages/client/dist/commands/mutation-qa-policy.js +1 -102
  46. package/packages/client/dist/commands/mutation-qa-run.js +3 -219
  47. package/packages/client/dist/commands/mutation-qa-verdict.js +1 -149
  48. package/packages/client/dist/commands/mutation-qa.js +1 -220
  49. package/packages/client/dist/commands/native-agent.js +2 -136
  50. package/packages/client/dist/commands/planning-diagnosis.js +1 -43
  51. package/packages/client/dist/commands/planning-generation.js +1 -53
  52. package/packages/client/dist/commands/planning-memory.js +1 -40
  53. package/packages/client/dist/commands/planning-research.js +1 -42
  54. package/packages/client/dist/commands/private-session.js +1 -75
  55. package/packages/client/dist/commands/property-qa.js +1 -139
  56. package/packages/client/dist/commands/qa-control.js +1 -16
  57. package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -55
  58. package/packages/client/dist/commands/qa-scan-browser-route.js +1 -28
  59. package/packages/client/dist/commands/qa-scan-capture.js +5 -663
  60. package/packages/client/dist/commands/qa-scan-discovery.js +3 -376
  61. package/packages/client/dist/commands/qa-scan-review.js +5 -826
  62. package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -266
  63. package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -297
  64. package/packages/client/dist/commands/qa-synthetic-backend.js +2 -340
  65. package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -85
  66. package/packages/client/dist/commands/qa-synthetic-browser.js +1 -39
  67. package/packages/client/dist/commands/refactor-characterization.js +21 -671
  68. package/packages/client/dist/commands/refactor-commit.js +13 -399
  69. package/packages/client/dist/commands/refactor-control.js +3 -142
  70. package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -93
  71. package/packages/client/dist/commands/refactor-review.js +5 -283
  72. package/packages/client/dist/commands/refactor-root.js +7 -588
  73. package/packages/client/dist/commands/refresh-memory.js +3 -156
  74. package/packages/client/dist/commands/shared-architecture-non-ui.js +1 -24
  75. package/packages/client/dist/commands/story-checkpoint.js +1 -171
  76. package/packages/client/dist/config/profile-directory.js +1 -13
  77. package/packages/client/dist/config/resolver-selection.js +1 -278
  78. package/packages/client/dist/config/secure-config.js +12 -281
  79. package/packages/client/dist/config.js +2 -223
  80. package/packages/client/dist/constants.js +1 -25
  81. package/packages/client/dist/context/context-collector.js +2 -222
  82. package/packages/client/dist/context/context-sanitizer.js +1 -145
  83. package/packages/client/dist/continuity/autonomous-governance.js +1 -285
  84. package/packages/client/dist/continuity/continuity-client-state-store.js +1 -1587
  85. package/packages/client/dist/continuity/invoke-hooks.js +1 -129
  86. package/packages/client/dist/continuity/migrations/001-initial-schema.js +2 -12
  87. package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +2 -12
  88. package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +2 -12
  89. package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +2 -12
  90. package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +2 -12
  91. package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +2 -10
  92. package/packages/client/dist/continuity/native-agent-store.js +1 -69
  93. package/packages/client/dist/continuity/native-agent-types.js +1 -90
  94. package/packages/client/dist/continuity/outbox.js +1 -117
  95. package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -172
  96. package/packages/client/dist/continuity/sqlite-store.js +81 -2536
  97. package/packages/client/dist/effects/invoke-effect-gateways.js +1 -62
  98. package/packages/client/dist/errors/error-messages.js +2 -228
  99. package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -125
  100. package/packages/client/dist/evidence/collector.js +1 -347
  101. package/packages/client/dist/evidence/index.js +1 -1
  102. package/packages/client/dist/evidence/types.js +0 -2
  103. package/packages/client/dist/fs/atomic-state-replace.js +1 -152
  104. package/packages/client/dist/generated/command-registry.generated.js +1 -4076
  105. package/packages/client/dist/generated/public-projections.generated.js +1 -149
  106. package/packages/client/dist/git/direct-yolo-c01-retry.js +4 -138
  107. package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -1234
  108. package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -14
  109. package/packages/client/dist/git/git-lifecycle-store.js +9 -1938
  110. package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -259
  111. package/packages/client/dist/git/legacy-story-branch-setup.js +4 -348
  112. package/packages/client/dist/git/legacy-story-pr.js +70 -3538
  113. package/packages/client/dist/git/secure-filesystem-boundary.js +5 -182
  114. package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -284
  115. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -237
  116. package/packages/client/dist/i18n/first-run.js +2 -60
  117. package/packages/client/dist/index.js +1 -47
  118. package/packages/client/dist/invocation/invoke-input.js +1 -24
  119. package/packages/client/dist/license/index.js +1 -5
  120. package/packages/client/dist/license/license-client.js +1 -304
  121. package/packages/client/dist/machine/fingerprint.js +2 -163
  122. package/packages/client/dist/machine/index.js +1 -5
  123. package/packages/client/dist/memory/project-memory-path-scope.js +1 -62
  124. package/packages/client/dist/memory/project-memory-writer.js +40 -1007
  125. package/packages/client/dist/memory/shared-project-memory-types.js +2 -253
  126. package/packages/client/dist/migrations/project-identity-capability.js +1 -50
  127. package/packages/client/dist/migrations/project-identity.js +7 -493
  128. package/packages/client/dist/migrations/state-json.js +4 -344
  129. package/packages/client/dist/policy/architecture-policy.js +2 -184
  130. package/packages/client/dist/policy/index.js +1 -7
  131. package/packages/client/dist/policy/shared-policy-types.js +0 -38
  132. package/packages/client/dist/policy/subagent-approval-policy.js +1 -55
  133. package/packages/client/dist/private-execution/clean-baseline.js +2 -279
  134. package/packages/client/dist/private-execution/codex-executor.js +4 -574
  135. package/packages/client/dist/private-execution/codex-host-runtime.js +1 -137
  136. package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -97
  137. package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -128
  138. package/packages/client/dist/private-execution/delivery.js +13 -410
  139. package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -294
  140. package/packages/client/dist/private-execution/frozen-handoff.js +6 -19
  141. package/packages/client/dist/private-execution/implementation-validation.js +2 -106
  142. package/packages/client/dist/private-execution/isolated-admission.js +23 -1432
  143. package/packages/client/dist/private-execution/isolated-session.js +5 -725
  144. package/packages/client/dist/private-execution/isolated-workspace.js +1 -122
  145. package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -409
  146. package/packages/client/dist/private-execution/pact-test-source.js +1 -258
  147. package/packages/client/dist/private-execution/pact-toolchain.js +3 -290
  148. package/packages/client/dist/private-execution/pact-write-set.js +1 -172
  149. package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -406
  150. package/packages/client/dist/private-execution/planning-generation-checkpoint.js +5 -462
  151. package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -139
  152. package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -325
  153. package/packages/client/dist/private-execution/private-report-store.js +1 -42
  154. package/packages/client/dist/private-execution/property-test-candidate.js +1 -103
  155. package/packages/client/dist/private-execution/property-test-choices.js +3 -147
  156. package/packages/client/dist/private-execution/property-test-plan.js +7 -271
  157. package/packages/client/dist/private-execution/property-test-review.js +4 -258
  158. package/packages/client/dist/private-execution/property-test-runtime.js +9 -372
  159. package/packages/client/dist/private-execution/property-test-source.js +1 -139
  160. package/packages/client/dist/private-execution/root-checkpoint.js +1 -80
  161. package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -135
  162. package/packages/client/dist/private-execution/root-memory-recovery.js +1 -93
  163. package/packages/client/dist/private-execution/root-memory-request.js +1 -29
  164. package/packages/client/dist/private-execution/root-memory-scope.js +1 -178
  165. package/packages/client/dist/private-execution/root-memory-writer.js +1 -102
  166. package/packages/client/dist/private-execution/session-lease.js +1 -63
  167. package/packages/client/dist/private-execution/shared-private-admission-types.js +1 -50
  168. package/packages/client/dist/private-execution/shared-project-validation.js +1 -66
  169. package/packages/client/dist/private-execution/shared-root-memory-types.js +1 -61
  170. package/packages/client/dist/private-execution/ux-source-validation.js +1 -372
  171. package/packages/client/dist/private-execution/ux-write-set.js +2 -191
  172. package/packages/client/dist/resilience/circuit-breaker.js +1 -170
  173. package/packages/client/dist/resilience/degradation-manager.js +1 -164
  174. package/packages/client/dist/resilience/freshness-indicator.js +1 -100
  175. package/packages/client/dist/resilience/index.js +1 -8
  176. package/packages/client/dist/resilience/recovery-detector.js +1 -74
  177. package/packages/client/dist/resolvers/asset-resolver.js +0 -13
  178. package/packages/client/dist/resolvers/local-resolver.js +8 -255
  179. package/packages/client/dist/resolvers/remote-resolver.js +1 -233
  180. package/packages/client/dist/runner/binary.js +1 -404
  181. package/packages/client/dist/runner/cli.js +17 -1571
  182. package/packages/client/dist/runner/headless/adapters.js +1 -49
  183. package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -79
  184. package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -1628
  185. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -69
  186. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +2 -110
  187. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +8 -1236
  188. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -318
  189. package/packages/client/dist/runner/headless/fake-adapter.js +1 -62
  190. package/packages/client/dist/runner/headless/managed-profile.js +1 -132
  191. package/packages/client/dist/runner/headless/opencode-adapter.js +2 -145
  192. package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -43
  193. package/packages/client/dist/runner/headless/resolver.js +1 -231
  194. package/packages/client/dist/runner/headless/run-yolo.js +1 -885
  195. package/packages/client/dist/runner/headless/run-yoloop.js +2 -2574
  196. package/packages/client/dist/runner/headless/types.js +2 -574
  197. package/packages/client/dist/runner/local-console.js +13 -396
  198. package/packages/client/dist/runner/portal-sync-worker.js +1 -1487
  199. package/packages/client/dist/runner/project-identity.js +1 -106
  200. package/packages/client/dist/runner/scheduler.js +7 -995
  201. package/packages/client/dist/runner-cli.js +2 -18
  202. package/packages/client/dist/state/invocation-shape.js +1 -13
  203. package/packages/client/dist/state/project-state-snapshot.js +1 -1677
  204. package/packages/client/dist/state/state-json-repair.js +3 -785
  205. package/packages/client/dist/state/structural-dag-projection.js +1 -118
  206. package/packages/client/dist/telemetry/index.js +1 -5
  207. package/packages/client/dist/telemetry/offline-queue.js +1 -131
  208. package/packages/client/dist/tier/index.js +1 -5
  209. package/packages/client/dist/tier/tier-aware-client.js +1 -405
  210. package/packages/client/dist/types/index.js +1 -38
  211. package/packages/client/dist/version.js +1 -27
  212. package/packages/client/dist/yolo/change-evidence-collector.js +1 -126
  213. package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -62
  214. package/packages/client/dist/yolo/spec-envelope-collector.js +5 -185
  215. package/packages/client/dist/yoloop/discovery-hook.js +2 -300
  216. package/packages/client/dist/yoloop/index.js +1 -8
  217. package/packages/client/dist/yoloop/invoke-hooks.js +12 -669
  218. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1007
  219. package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -33
  220. package/packages/client/dist/yoloop/target-normalization.js +1 -180
  221. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1723
  222. package/targets-stubs/antigravity/gemini.md +1 -1
  223. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  224. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  225. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  226. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  227. package/targets-stubs/claude-code/neocortex.md +2 -2
  228. package/targets-stubs/codex/AGENTS.md +1 -1
  229. package/targets-stubs/cursor/agent.md +2 -2
  230. package/targets-stubs/gemini-cli/agent.md +2 -2
  231. package/targets-stubs/opencode/neocortex-root.md +1 -1
  232. package/targets-stubs/vscode/neocortex.agent.md +2 -2
@@ -1,62 +1 @@
1
- import { assertDeclaredNetworkTransport, resolveClosedProcessProfile, StrictReadOnlyError, } from '../../../shared/dist/strict-readonly.js';
2
- export function createCapabilityCache(authority, delegate, category) {
3
- const descriptor = { phase: 'client-preflight', domain: 'client-persistence', category, operation: 'update' };
4
- return Object.freeze({
5
- get: (key) => delegate.get(key),
6
- set: (key, value, ttlMs) => authority.executeAsync(descriptor, () => delegate.set(key, value, ttlMs), async () => undefined),
7
- clear: () => authority.executeAsync(descriptor, () => delegate.clear(), async () => undefined),
8
- });
9
- }
10
- export function executeClosedProcess(authority, profileName, cwd, writer, phase = 'engine') {
11
- const profile = resolveClosedProcessProfile(profileName, cwd);
12
- return authority.execute({ phase, domain: 'external-effect', category: 'process', operation: 'spawn' }, () => writer(profile), () => ({ status: null, stdout: '', stderr: '', projected: true }));
13
- }
14
- export function executeClosedGitInspection(authority, profileName, cwd, writer, phase = 'engine') {
15
- const profile = resolveClosedProcessProfile(profileName, cwd);
16
- return authority.execute({ phase, domain: 'external-effect', category: 'git', operation: 'spawn' }, () => writer(profile), () => ({ status: null, stdout: '', stderr: '', projected: true }));
17
- }
18
- export function executeSchedulerManifestWrite(authority, writer) {
19
- return authority.execute({ phase: 'client-preflight', domain: 'client-persistence', category: 'scheduler-session', operation: 'create' }, () => { writer(); return true; }, () => false);
20
- }
21
- export function executeSchedulerProcess(authority, command, writer, projected) {
22
- if (!isClosedSchedulerCommand(command)) {
23
- throw new StrictReadOnlyError('readonly-physical-boundary-unsafe', 'boundary');
24
- }
25
- return authority.execute({ phase: 'client-preflight', domain: 'external-effect', category: 'process', operation: 'spawn' }, writer, projected);
26
- }
27
- function isClosedSchedulerCommand(command) {
28
- if (command.args.length > 8
29
- || command.args.some((arg) => arg.length > 512 || /[\r\n\0]/u.test(arg)))
30
- return false;
31
- const args = command.args;
32
- const safeName = (value) => Boolean(value && /^[A-Za-z0-9_.:@-]{1,180}$/u.test(value));
33
- const safePath = (value) => Boolean(value
34
- && (value.startsWith('/') || /^[A-Za-z]:[\\/]/u.test(value))
35
- && !value.split(/[\\/]/u).includes('..'));
36
- if (command.command === 'systemctl') {
37
- return args[0] === '--user' && ((args.length === 2 && args[1] === 'daemon-reload')
38
- || (args.length === 4 && args[1] === 'enable' && args[2] === '--now' && safeName(args[3]))
39
- || (args.length === 3 && (args[1] === 'start' || args[1] === 'stop') && safeName(args[2]))
40
- || (args.length === 4 && args[1] === 'status' && safeName(args[2]) && args[3] === '--no-pager'));
41
- }
42
- if (command.command === 'launchctl') {
43
- return (args.length === 3 && (args[0] === 'load' || args[0] === 'unload') && args[1] === '-w' && safePath(args[2]))
44
- || (args.length === 2 && args[0] === 'list' && safeName(args[1]));
45
- }
46
- if (command.command === 'schtasks') {
47
- return (args.length === 6 && args[0] === '/Create' && args[1] === '/TN' && safeName(args[2]) && args[3] === '/XML' && safePath(args[4]) && args[5] === '/F')
48
- || (args.length === 3 && (args[0] === '/Run' || args[0] === '/End') && args[1] === '/TN' && safeName(args[2]))
49
- || (args.length === 5 && args[0] === '/Query' && args[1] === '/TN' && safeName(args[2]) && args[3] === '/FO' && args[4] === 'LIST');
50
- }
51
- return command.command === 'crontab' && args.length === 1 && args[0] === '-l';
52
- }
53
- /** The primary invoke request is a declared query transport, not a mutation. */
54
- export async function executeInvokeQueryTransport(transportKind, writer) {
55
- assertDeclaredNetworkTransport(transportKind);
56
- return writer();
57
- }
58
- export async function executeSecondaryNetworkMutation(authority, transportKind, writer, projected) {
59
- if (transportKind !== 'secondary-mutation')
60
- throw new StrictReadOnlyError('readonly-physical-boundary-unsafe', 'boundary');
61
- return authority.executeAsync({ phase: 'client-preflight', domain: 'external-effect', category: 'network-mutation', operation: 'send' }, writer, projected);
62
- }
1
+ import{assertDeclaredNetworkTransport as i,resolveClosedProcessProfile as a,StrictReadOnlyError as c}from"../../../shared/dist/strict-readonly.js";function d(t,e,r){const o={phase:"client-preflight",domain:"client-persistence",category:r,operation:"update"};return Object.freeze({get:n=>e.get(n),set:(n,s,u)=>t.executeAsync(o,()=>e.set(n,s,u),async()=>{}),clear:()=>t.executeAsync(o,()=>e.clear(),async()=>{})})}function f(t,e,r,o,n="engine"){const s=a(e,r);return t.execute({phase:n,domain:"external-effect",category:"process",operation:"spawn"},()=>o(s),()=>({status:null,stdout:"",stderr:"",projected:!0}))}function h(t,e,r,o,n="engine"){const s=a(e,r);return t.execute({phase:n,domain:"external-effect",category:"git",operation:"spawn"},()=>o(s),()=>({status:null,stdout:"",stderr:"",projected:!0}))}function g(t,e){return t.execute({phase:"client-preflight",domain:"client-persistence",category:"scheduler-session",operation:"create"},()=>(e(),!0),()=>!1)}function y(t,e,r,o){if(!l(e))throw new c("readonly-physical-boundary-unsafe","boundary");return t.execute({phase:"client-preflight",domain:"external-effect",category:"process",operation:"spawn"},r,o)}function l(t){if(t.args.length>8||t.args.some(n=>n.length>512||/[\r\n\0]/u.test(n)))return!1;const e=t.args,r=n=>!!(n&&/^[A-Za-z0-9_.:@-]{1,180}$/u.test(n)),o=n=>!!(n&&(n.startsWith("/")||/^[A-Za-z]:[\\/]/u.test(n))&&!n.split(/[\\/]/u).includes(".."));return t.command==="systemctl"?e[0]==="--user"&&(e.length===2&&e[1]==="daemon-reload"||e.length===4&&e[1]==="enable"&&e[2]==="--now"&&r(e[3])||e.length===3&&(e[1]==="start"||e[1]==="stop")&&r(e[2])||e.length===4&&e[1]==="status"&&r(e[2])&&e[3]==="--no-pager"):t.command==="launchctl"?e.length===3&&(e[0]==="load"||e[0]==="unload")&&e[1]==="-w"&&o(e[2])||e.length===2&&e[0]==="list"&&r(e[1]):t.command==="schtasks"?e.length===6&&e[0]==="/Create"&&e[1]==="/TN"&&r(e[2])&&e[3]==="/XML"&&o(e[4])&&e[5]==="/F"||e.length===3&&(e[0]==="/Run"||e[0]==="/End")&&e[1]==="/TN"&&r(e[2])||e.length===5&&e[0]==="/Query"&&e[1]==="/TN"&&r(e[2])&&e[3]==="/FO"&&e[4]==="LIST":t.command==="crontab"&&e.length===1&&e[0]==="-l"}async function x(t,e){return i(t),e()}async function m(t,e,r,o){if(e!=="secondary-mutation")throw new c("readonly-physical-boundary-unsafe","boundary");return t.executeAsync({phase:"client-preflight",domain:"external-effect",category:"network-mutation",operation:"send"},r,o)}export{d as createCapabilityCache,h as executeClosedGitInspection,f as executeClosedProcess,x as executeInvokeQueryTransport,g as executeSchedulerManifestWrite,y as executeSchedulerProcess,m as executeSecondaryNetworkMutation};
@@ -1,228 +1,2 @@
1
- /**
2
- * @license FSL-1.1
3
- * Copyright (c) 2026 OrNexus AI
4
- *
5
- * Central, localized error message helpers for CLI output. Turns
6
- * server error codes and low-level exceptions into friendly, actionable
7
- * messages with "What happened" + "What to do" + support email.
8
- *
9
- * Story P76.06.
10
- */
11
- const SUPPORT_EMAIL = 'support@neocortex.sh';
12
- /** Localized copy per error code. */
13
- const MESSAGES = {
14
- AUTH_REFRESH_REQUIRED: {
15
- en: {
16
- summary: 'Authentication must be refreshed.',
17
- whatHappened: 'Credentials are configured, but a valid authentication token is unavailable. The token may have expired or the authentication service may be unreachable. Strict read-only commands do not refresh tokens.',
18
- whatToDo: 'Check the server connection and retry. If authentication remains unavailable, re-activate outside strict read-only mode.',
19
- command: 'neocortex activate YOUR-LICENSE-KEY',
20
- url: 'https://neocortex.sh/portal',
21
- },
22
- 'pt-BR': {
23
- summary: 'A autenticação precisa ser renovada.',
24
- whatHappened: 'As credenciais estão configuradas, mas não há um token de autenticação válido disponível. O token pode ter expirado ou o serviço de autenticação pode estar inacessível. Comandos estritamente somente leitura não renovam tokens.',
25
- whatToDo: 'Verifique a conexão com o servidor e tente novamente. Se a autenticação continuar indisponível, reative fora do modo estritamente somente leitura.',
26
- command: 'neocortex activate SUA-LICENSE-KEY',
27
- url: 'https://neocortex.sh/portal',
28
- },
29
- },
30
- AUTH_EXPIRED: {
31
- en: {
32
- summary: 'Your session has expired.',
33
- whatHappened: 'The token we use to authenticate your CLI has expired. This is normal and happens every few hours.',
34
- whatToDo: 'Re-activate with the license key that was emailed to you.',
35
- command: 'neocortex activate YOUR-LICENSE-KEY',
36
- url: 'https://neocortex.sh/portal',
37
- },
38
- 'pt-BR': {
39
- summary: 'Sua sessão expirou.',
40
- whatHappened: 'O token de autenticação do CLI expirou. Isso é normal e acontece a cada poucas horas.',
41
- whatToDo: 'Reative o CLI com a license key que você recebeu por email.',
42
- command: 'neocortex activate SUA-LICENSE-KEY',
43
- url: 'https://neocortex.sh/portal',
44
- },
45
- },
46
- UPGRADE_REQUIRED: {
47
- en: {
48
- summary: 'Your CLI version is outdated.',
49
- whatHappened: 'The server requires a newer CLI version. Older versions are not allowed for security and compatibility reasons.',
50
- whatToDo: 'Install the latest CLI globally with npm.',
51
- command: 'npm install -g @ornexus/neocortex@latest',
52
- },
53
- 'pt-BR': {
54
- summary: 'Sua versão do CLI está desatualizada.',
55
- whatHappened: 'O servidor exige uma versão mais recente do CLI. Versões antigas não são permitidas por motivos de segurança e compatibilidade.',
56
- whatToDo: 'Instale a versão mais recente globalmente via npm.',
57
- command: 'npm install -g @ornexus/neocortex@latest',
58
- },
59
- },
60
- RATE_LIMITED: {
61
- en: {
62
- summary: 'You sent too many requests in a short window.',
63
- whatHappened: 'You hit the rate limit for your plan. This protects the service from abuse and keeps it fast for everyone.',
64
- whatToDo: 'Wait a few seconds and try again. If you hit this often, upgrading your plan raises the limit.',
65
- url: 'https://neocortex.sh/portal/plans',
66
- },
67
- 'pt-BR': {
68
- summary: 'Você fez muitas requisições em pouco tempo.',
69
- whatHappened: 'O limite de taxa do seu plano foi atingido. Isso protege o serviço contra abuso e mantém a velocidade para todos.',
70
- whatToDo: 'Espere alguns segundos e tente novamente. Se isso acontece com frequência, fazer upgrade do seu plano aumenta o limite.',
71
- url: 'https://neocortex.sh/portal/plans',
72
- },
73
- },
74
- TRIGGER_NOT_ALLOWED: {
75
- en: {
76
- summary: 'This command is not available on your current plan.',
77
- whatHappened: 'You tried to use a trigger that requires a paid plan (Pro or Enterprise).',
78
- whatToDo: 'See the full comparison and upgrade in the portal.',
79
- url: 'https://neocortex.sh/portal/plans',
80
- },
81
- 'pt-BR': {
82
- summary: 'Este comando não está disponível no seu plano atual.',
83
- whatHappened: 'Você tentou usar um trigger que requer um plano pago (Pro ou Enterprise).',
84
- whatToDo: 'Veja a comparação completa e faça upgrade no portal.',
85
- url: 'https://neocortex.sh/portal/plans',
86
- },
87
- },
88
- QUOTA_EXCEEDED: {
89
- en: {
90
- summary: 'Daily quota reached.',
91
- whatHappened: 'You have used all invocations allowed by your plan today. Quotas reset at midnight UTC.',
92
- whatToDo: 'Wait for the daily reset, or upgrade your plan for a higher quota.',
93
- url: 'https://neocortex.sh/portal/plans',
94
- },
95
- 'pt-BR': {
96
- summary: 'Quota diária atingida.',
97
- whatHappened: 'Você usou todas as invocações permitidas pelo seu plano hoje. As quotas são resetadas à meia-noite UTC.',
98
- whatToDo: 'Aguarde o reset diário ou faça upgrade do plano para uma quota maior.',
99
- url: 'https://neocortex.sh/portal/plans',
100
- },
101
- },
102
- SERVER_ERROR: {
103
- en: {
104
- summary: 'Server error.',
105
- whatHappened: 'Something went wrong on our side. We have logged the error and will investigate.',
106
- whatToDo: `Try again in a minute. If the problem persists, please contact ${SUPPORT_EMAIL} with the details.`,
107
- },
108
- 'pt-BR': {
109
- summary: 'Erro do servidor.',
110
- whatHappened: 'Algo deu errado no nosso lado. O erro foi registrado e vamos investigar.',
111
- whatToDo: `Tente novamente em um minuto. Se o problema persistir, entre em contato: ${SUPPORT_EMAIL}.`,
112
- },
113
- },
114
- ECONNREFUSED: {
115
- en: {
116
- summary: 'Cannot reach the Neocortex server.',
117
- whatHappened: 'We could not open a connection to the server. This is usually a network problem on your side.',
118
- whatToDo: 'Check your internet connection, any VPN or corporate proxy, and try again.',
119
- },
120
- 'pt-BR': {
121
- summary: 'Não foi possível alcançar o servidor Neocortex.',
122
- whatHappened: 'Não conseguimos abrir uma conexão com o servidor. Isso geralmente é um problema de rede do seu lado.',
123
- whatToDo: 'Verifique sua conexão, qualquer VPN ou proxy corporativo, e tente novamente.',
124
- },
125
- },
126
- MACHINE_LIMIT_EXCEEDED: {
127
- en: {
128
- summary: 'Machine limit reached.',
129
- whatHappened: 'Your plan allows a limited number of active machines, and this one would exceed it.',
130
- whatToDo: 'Deactivate a machine you no longer use from the portal, then re-run activate here.',
131
- url: 'https://neocortex.sh/portal/machines',
132
- },
133
- 'pt-BR': {
134
- summary: 'Limite de máquinas atingido.',
135
- whatHappened: 'Seu plano permite um número limitado de máquinas ativas, e esta ultrapassaria o limite.',
136
- whatToDo: 'Desative uma máquina que você não usa mais no portal e rode activate aqui de novo.',
137
- url: 'https://neocortex.sh/portal/machines',
138
- },
139
- },
140
- NOT_CONFIGURED: {
141
- en: {
142
- summary: 'Neocortex is not configured on this machine.',
143
- whatHappened: 'No license key was found. You need to run `neocortex activate` once before using the CLI.',
144
- whatToDo: 'Get a license key from the portal and activate.',
145
- command: 'neocortex activate YOUR-LICENSE-KEY',
146
- url: 'https://neocortex.sh/portal',
147
- },
148
- 'pt-BR': {
149
- summary: 'Neocortex não está configurado nesta máquina.',
150
- whatHappened: 'Nenhuma license key encontrada. Você precisa rodar `neocortex activate` uma vez antes de usar o CLI.',
151
- whatToDo: 'Pegue uma license key no portal e ative.',
152
- command: 'neocortex activate SUA-LICENSE-KEY',
153
- url: 'https://neocortex.sh/portal',
154
- },
155
- },
156
- };
157
- /** Detect the best locale from LC_ALL / LANG. Falls back to 'en'. */
158
- export function detectErrorLocale(env = process.env) {
159
- const raw = (env.LC_ALL ?? env.LANG ?? '').toLowerCase();
160
- if (raw.startsWith('pt'))
161
- return 'pt-BR';
162
- return 'en';
163
- }
164
- /**
165
- * Look up a humanized message for an error code.
166
- * Returns null if the code is unknown -- caller should fall back to the
167
- * raw server message.
168
- */
169
- export function humanizeError(code, locale = detectErrorLocale()) {
170
- const group = MESSAGES[code];
171
- if (!group)
172
- return null;
173
- return group[locale] ?? group.en ?? null;
174
- }
175
- /**
176
- * Format a humanized error for stderr. Always ends with the support email.
177
- */
178
- export function formatHumanizedError(humanized, locale = detectErrorLocale()) {
179
- const lines = [];
180
- lines.push('');
181
- lines.push(`[Neocortex] ${humanized.summary}`);
182
- lines.push('');
183
- const whatHappenedLabel = locale === 'pt-BR' ? 'O que aconteceu' : 'What happened';
184
- const whatToDoLabel = locale === 'pt-BR' ? 'O que fazer' : 'What to do';
185
- const needHelpLabel = locale === 'pt-BR'
186
- ? `Precisa de ajuda? ${SUPPORT_EMAIL}`
187
- : `Need help? ${SUPPORT_EMAIL}`;
188
- lines.push(`${whatHappenedLabel}: ${humanized.whatHappened}`);
189
- lines.push(`${whatToDoLabel}: ${humanized.whatToDo}`);
190
- if (humanized.command) {
191
- lines.push('');
192
- lines.push(` ${humanized.command}`);
193
- }
194
- if (humanized.url) {
195
- lines.push('');
196
- lines.push(` ${humanized.url}`);
197
- }
198
- lines.push('');
199
- lines.push(needHelpLabel);
200
- lines.push('');
201
- return lines.join('\n');
202
- }
203
- /**
204
- * Infer an error code from a low-level error object (e.g., Node.js error
205
- * thrown by fetch / dns / pg). Returns null if we cannot classify it.
206
- */
207
- export function inferErrorCodeFromException(err) {
208
- if (!err || typeof err !== 'object')
209
- return null;
210
- const e = err;
211
- if (typeof e.code === 'string') {
212
- if (e.code === 'ECONNREFUSED')
213
- return 'ECONNREFUSED';
214
- if (e.code === 'ENOTFOUND')
215
- return 'ECONNREFUSED';
216
- if (e.code === 'ETIMEDOUT')
217
- return 'ECONNREFUSED';
218
- if (e.code === 'ECONNRESET')
219
- return 'ECONNREFUSED';
220
- }
221
- if (typeof e.message === 'string') {
222
- if (/connect/i.test(e.message) && /refus/i.test(e.message))
223
- return 'ECONNREFUSED';
224
- if (/fetch failed/i.test(e.message))
225
- return 'ECONNREFUSED';
226
- }
227
- return null;
228
- }
1
+ const t="support@neocortex.sh",u={AUTH_REFRESH_REQUIRED:{en:{summary:"Authentication must be refreshed.",whatHappened:"Credentials are configured, but a valid authentication token is unavailable. The token may have expired or the authentication service may be unreachable. Strict read-only commands do not refresh tokens.",whatToDo:"Check the server connection and retry. If authentication remains unavailable, re-activate outside strict read-only mode.",command:"neocortex activate YOUR-LICENSE-KEY",url:"https://neocortex.sh/portal"},"pt-BR":{summary:"A autentica\xE7\xE3o precisa ser renovada.",whatHappened:"As credenciais est\xE3o configuradas, mas n\xE3o h\xE1 um token de autentica\xE7\xE3o v\xE1lido dispon\xEDvel. O token pode ter expirado ou o servi\xE7o de autentica\xE7\xE3o pode estar inacess\xEDvel. Comandos estritamente somente leitura n\xE3o renovam tokens.",whatToDo:"Verifique a conex\xE3o com o servidor e tente novamente. Se a autentica\xE7\xE3o continuar indispon\xEDvel, reative fora do modo estritamente somente leitura.",command:"neocortex activate SUA-LICENSE-KEY",url:"https://neocortex.sh/portal"}},AUTH_EXPIRED:{en:{summary:"Your session has expired.",whatHappened:"The token we use to authenticate your CLI has expired. This is normal and happens every few hours.",whatToDo:"Re-activate with the license key that was emailed to you.",command:"neocortex activate YOUR-LICENSE-KEY",url:"https://neocortex.sh/portal"},"pt-BR":{summary:"Sua sess\xE3o expirou.",whatHappened:"O token de autentica\xE7\xE3o do CLI expirou. Isso \xE9 normal e acontece a cada poucas horas.",whatToDo:"Reative o CLI com a license key que voc\xEA recebeu por email.",command:"neocortex activate SUA-LICENSE-KEY",url:"https://neocortex.sh/portal"}},UPGRADE_REQUIRED:{en:{summary:"Your CLI version is outdated.",whatHappened:"The server requires a newer CLI version. Older versions are not allowed for security and compatibility reasons.",whatToDo:"Install the latest CLI globally with npm.",command:"npm install -g @ornexus/neocortex@latest"},"pt-BR":{summary:"Sua vers\xE3o do CLI est\xE1 desatualizada.",whatHappened:"O servidor exige uma vers\xE3o mais recente do CLI. Vers\xF5es antigas n\xE3o s\xE3o permitidas por motivos de seguran\xE7a e compatibilidade.",whatToDo:"Instale a vers\xE3o mais recente globalmente via npm.",command:"npm install -g @ornexus/neocortex@latest"}},RATE_LIMITED:{en:{summary:"You sent too many requests in a short window.",whatHappened:"You hit the rate limit for your plan. This protects the service from abuse and keeps it fast for everyone.",whatToDo:"Wait a few seconds and try again. If you hit this often, upgrading your plan raises the limit.",url:"https://neocortex.sh/portal/plans"},"pt-BR":{summary:"Voc\xEA fez muitas requisi\xE7\xF5es em pouco tempo.",whatHappened:"O limite de taxa do seu plano foi atingido. Isso protege o servi\xE7o contra abuso e mant\xE9m a velocidade para todos.",whatToDo:"Espere alguns segundos e tente novamente. Se isso acontece com frequ\xEAncia, fazer upgrade do seu plano aumenta o limite.",url:"https://neocortex.sh/portal/plans"}},TRIGGER_NOT_ALLOWED:{en:{summary:"This command is not available on your current plan.",whatHappened:"You tried to use a trigger that requires a paid plan (Pro or Enterprise).",whatToDo:"See the full comparison and upgrade in the portal.",url:"https://neocortex.sh/portal/plans"},"pt-BR":{summary:"Este comando n\xE3o est\xE1 dispon\xEDvel no seu plano atual.",whatHappened:"Voc\xEA tentou usar um trigger que requer um plano pago (Pro ou Enterprise).",whatToDo:"Veja a compara\xE7\xE3o completa e fa\xE7a upgrade no portal.",url:"https://neocortex.sh/portal/plans"}},QUOTA_EXCEEDED:{en:{summary:"Daily quota reached.",whatHappened:"You have used all invocations allowed by your plan today. Quotas reset at midnight UTC.",whatToDo:"Wait for the daily reset, or upgrade your plan for a higher quota.",url:"https://neocortex.sh/portal/plans"},"pt-BR":{summary:"Quota di\xE1ria atingida.",whatHappened:"Voc\xEA usou todas as invoca\xE7\xF5es permitidas pelo seu plano hoje. As quotas s\xE3o resetadas \xE0 meia-noite UTC.",whatToDo:"Aguarde o reset di\xE1rio ou fa\xE7a upgrade do plano para uma quota maior.",url:"https://neocortex.sh/portal/plans"}},SERVER_ERROR:{en:{summary:"Server error.",whatHappened:"Something went wrong on our side. We have logged the error and will investigate.",whatToDo:`Try again in a minute. If the problem persists, please contact ${t} with the details.`},"pt-BR":{summary:"Erro do servidor.",whatHappened:"Algo deu errado no nosso lado. O erro foi registrado e vamos investigar.",whatToDo:`Tente novamente em um minuto. Se o problema persistir, entre em contato: ${t}.`}},ECONNREFUSED:{en:{summary:"Cannot reach the Neocortex server.",whatHappened:"We could not open a connection to the server. This is usually a network problem on your side.",whatToDo:"Check your internet connection, any VPN or corporate proxy, and try again."},"pt-BR":{summary:"N\xE3o foi poss\xEDvel alcan\xE7ar o servidor Neocortex.",whatHappened:"N\xE3o conseguimos abrir uma conex\xE3o com o servidor. Isso geralmente \xE9 um problema de rede do seu lado.",whatToDo:"Verifique sua conex\xE3o, qualquer VPN ou proxy corporativo, e tente novamente."}},MACHINE_LIMIT_EXCEEDED:{en:{summary:"Machine limit reached.",whatHappened:"Your plan allows a limited number of active machines, and this one would exceed it.",whatToDo:"Deactivate a machine you no longer use from the portal, then re-run activate here.",url:"https://neocortex.sh/portal/machines"},"pt-BR":{summary:"Limite de m\xE1quinas atingido.",whatHappened:"Seu plano permite um n\xFAmero limitado de m\xE1quinas ativas, e esta ultrapassaria o limite.",whatToDo:"Desative uma m\xE1quina que voc\xEA n\xE3o usa mais no portal e rode activate aqui de novo.",url:"https://neocortex.sh/portal/machines"}},NOT_CONFIGURED:{en:{summary:"Neocortex is not configured on this machine.",whatHappened:"No license key was found. You need to run `neocortex activate` once before using the CLI.",whatToDo:"Get a license key from the portal and activate.",command:"neocortex activate YOUR-LICENSE-KEY",url:"https://neocortex.sh/portal"},"pt-BR":{summary:"Neocortex n\xE3o est\xE1 configurado nesta m\xE1quina.",whatHappened:"Nenhuma license key encontrada. Voc\xEA precisa rodar `neocortex activate` uma vez antes de usar o CLI.",whatToDo:"Pegue uma license key no portal e ative.",command:"neocortex activate SUA-LICENSE-KEY",url:"https://neocortex.sh/portal"}}};function r(o=process.env){return(o.LC_ALL??o.LANG??"").toLowerCase().startsWith("pt")?"pt-BR":"en"}function p(o,a=r()){const e=u[o];return e?e[a]??e.en??null:null}function c(o,a=r()){const e=[];e.push(""),e.push(`[Neocortex] ${o.summary}`),e.push("");const n=a==="pt-BR"?"O que aconteceu":"What happened",s=a==="pt-BR"?"O que fazer":"What to do",i=a==="pt-BR"?`Precisa de ajuda? ${t}`:`Need help? ${t}`;return e.push(`${n}: ${o.whatHappened}`),e.push(`${s}: ${o.whatToDo}`),o.command&&(e.push(""),e.push(` ${o.command}`)),o.url&&(e.push(""),e.push(` ${o.url}`)),e.push(""),e.push(i),e.push(""),e.join(`
2
+ `)}function m(o){if(!o||typeof o!="object")return null;const a=o;return typeof a.code=="string"&&(a.code==="ECONNREFUSED"||a.code==="ENOTFOUND"||a.code==="ETIMEDOUT"||a.code==="ECONNRESET")||typeof a.message=="string"&&(/connect/i.test(a.message)&&/refus/i.test(a.message)||/fetch failed/i.test(a.message))?"ECONNREFUSED":null}export{r as detectErrorLocale,c as formatHumanizedError,p as humanizeError,m as inferErrorCodeFromException};
@@ -1,125 +1 @@
1
- /**
2
- * Public-safe diagnostics for the P204 frontmatter boundary.
3
- *
4
- * Diagnostic construction intentionally accepts a reason code only. Rejected
5
- * source text, wrapper bodies, argv and filesystem paths are never inputs, so
6
- * callers cannot accidentally reflect private content into logs.
7
- */
8
- export const FRONTMATTER_DIAGNOSTIC_CATEGORIES = [
9
- 'payload-selection',
10
- 'target-normalization',
11
- 'metadata-frontmatter',
12
- ];
13
- export const FRONTMATTER_DIAGNOSTIC_REASON_CODES = [
14
- 'payload-selection-ambiguous',
15
- 'payload-selection-unavailable',
16
- 'markdown-link-target-malformed',
17
- 'markdown-link-target-ambiguous',
18
- 'markdown-link-target-external',
19
- 'markdown-link-target-unsafe-path',
20
- 'raw-target-malformed',
21
- 'raw-target-external',
22
- 'raw-target-unsafe-path',
23
- 'frontmatter-malformed',
24
- 'frontmatter-oversized',
25
- 'frontmatter-unsupported-value',
26
- 'frontmatter-explicit-selection-required',
27
- ];
28
- const TARGET_EXAMPLE = '*yoloop @docs/epics/epic-P204.md';
29
- const FRONTMATTER_EXAMPLE = 'docs/epics/epic-P204.md';
30
- const DIAGNOSTICS = Object.freeze({
31
- 'payload-selection-ambiguous': Object.freeze({
32
- category: 'payload-selection',
33
- summary: 'The explicit Neocortex command could not be selected unambiguously.',
34
- remediation: 'Pass exactly one explicit trigger and its project-local arguments; keep host wrapper metadata outside the selected payload.',
35
- }),
36
- 'payload-selection-unavailable': Object.freeze({
37
- category: 'payload-selection',
38
- summary: 'The explicit Neocortex command could not be selected safely.',
39
- remediation: 'Retry with one explicit trigger. Do not include wrapper frontmatter, conversation history or delegated prompt text.',
40
- }),
41
- 'markdown-link-target-malformed': Object.freeze({
42
- category: 'target-normalization',
43
- summary: 'The Markdown target is malformed or is not a supported Markdown path.',
44
- remediation: 'Use one complete Markdown link to a project-relative .md file or a trailing-slash directory.',
45
- example: TARGET_EXAMPLE,
46
- }),
47
- 'markdown-link-target-ambiguous': Object.freeze({
48
- category: 'target-normalization',
49
- summary: 'More than one target or mixed target syntax was supplied.',
50
- remediation: 'Pass exactly one raw path or one Markdown link target.',
51
- example: TARGET_EXAMPLE,
52
- }),
53
- 'markdown-link-target-external': Object.freeze({
54
- category: 'target-normalization',
55
- summary: 'External Markdown targets are not supported.',
56
- remediation: 'Reference a file already inside the project with a project-relative path.',
57
- example: TARGET_EXAMPLE,
58
- }),
59
- 'markdown-link-target-unsafe-path': Object.freeze({
60
- category: 'target-normalization',
61
- summary: 'The Markdown target is outside the supported project-relative path boundary.',
62
- remediation: 'Remove absolute, home, drive, backslash or traversal segments and use a project-relative path.',
63
- example: TARGET_EXAMPLE,
64
- }),
65
- 'raw-target-malformed': Object.freeze({
66
- category: 'target-normalization',
67
- summary: 'The raw target is not a supported Markdown path.',
68
- remediation: 'Use one project-relative .md file or a trailing-slash directory.',
69
- example: TARGET_EXAMPLE,
70
- }),
71
- 'raw-target-external': Object.freeze({
72
- category: 'target-normalization',
73
- summary: 'External raw targets are not supported.',
74
- remediation: 'Reference a file already inside the project with a project-relative path.',
75
- example: TARGET_EXAMPLE,
76
- }),
77
- 'raw-target-unsafe-path': Object.freeze({
78
- category: 'target-normalization',
79
- summary: 'The raw target is outside the supported project-relative path boundary.',
80
- remediation: 'Remove absolute, home, drive, backslash or traversal segments and use a project-relative path.',
81
- example: TARGET_EXAMPLE,
82
- }),
83
- 'frontmatter-malformed': Object.freeze({
84
- category: 'metadata-frontmatter',
85
- summary: 'The leading YAML frontmatter envelope is malformed.',
86
- remediation: 'Repair the bounded leading --- envelope and keep generated metadata fields scalar or string-list values.',
87
- example: FRONTMATTER_EXAMPLE,
88
- }),
89
- 'frontmatter-oversized': Object.freeze({
90
- category: 'metadata-frontmatter',
91
- summary: 'The leading YAML frontmatter exceeds the public parsing limits.',
92
- remediation: 'Reduce the metadata header and keep descriptive content in the Markdown body.',
93
- example: FRONTMATTER_EXAMPLE,
94
- }),
95
- 'frontmatter-unsupported-value': Object.freeze({
96
- category: 'metadata-frontmatter',
97
- summary: 'A frontmatter field uses an unsupported value shape.',
98
- remediation: 'Use allowlisted scalar fields and bounded string lists only.',
99
- example: FRONTMATTER_EXAMPLE,
100
- }),
101
- 'frontmatter-explicit-selection-required': Object.freeze({
102
- category: 'metadata-frontmatter',
103
- summary: 'Target metadata cannot be projected before explicit file selection.',
104
- remediation: 'Select one project-relative epic or story target before metadata discovery.',
105
- example: FRONTMATTER_EXAMPLE,
106
- }),
107
- });
108
- const UNKNOWN_DIAGNOSTIC = Object.freeze({
109
- category: 'metadata-frontmatter',
110
- reasonCode: 'frontmatter-diagnostic-unclassified',
111
- summary: 'The frontmatter operation could not be classified safely.',
112
- remediation: 'Retry with one explicit project-relative target and a bounded YAML header.',
113
- example: FRONTMATTER_EXAMPLE,
114
- });
115
- export function getFrontmatterDiagnostic(reasonCode) {
116
- const definition = DIAGNOSTICS[reasonCode];
117
- if (!definition)
118
- return UNKNOWN_DIAGNOSTIC;
119
- return Object.freeze({ reasonCode: reasonCode, ...definition });
120
- }
121
- export function formatFrontmatterDiagnostic(reasonCode) {
122
- const diagnostic = getFrontmatterDiagnostic(reasonCode);
123
- const example = diagnostic.example ? ` Example: ${diagnostic.example}.` : '';
124
- return `${diagnostic.reasonCode} [${diagnostic.category}]: ${diagnostic.summary} Remediation: ${diagnostic.remediation}${example}`;
125
- }
1
+ const l=["payload-selection","target-normalization","metadata-frontmatter"],d=["payload-selection-ambiguous","payload-selection-unavailable","markdown-link-target-malformed","markdown-link-target-ambiguous","markdown-link-target-external","markdown-link-target-unsafe-path","raw-target-malformed","raw-target-external","raw-target-unsafe-path","frontmatter-malformed","frontmatter-oversized","frontmatter-unsupported-value","frontmatter-explicit-selection-required"],t="*yoloop @docs/epics/epic-P204.md",a="docs/epics/epic-P204.md",n=Object.freeze({"payload-selection-ambiguous":Object.freeze({category:"payload-selection",summary:"The explicit Neocortex command could not be selected unambiguously.",remediation:"Pass exactly one explicit trigger and its project-local arguments; keep host wrapper metadata outside the selected payload."}),"payload-selection-unavailable":Object.freeze({category:"payload-selection",summary:"The explicit Neocortex command could not be selected safely.",remediation:"Retry with one explicit trigger. Do not include wrapper frontmatter, conversation history or delegated prompt text."}),"markdown-link-target-malformed":Object.freeze({category:"target-normalization",summary:"The Markdown target is malformed or is not a supported Markdown path.",remediation:"Use one complete Markdown link to a project-relative .md file or a trailing-slash directory.",example:t}),"markdown-link-target-ambiguous":Object.freeze({category:"target-normalization",summary:"More than one target or mixed target syntax was supplied.",remediation:"Pass exactly one raw path or one Markdown link target.",example:t}),"markdown-link-target-external":Object.freeze({category:"target-normalization",summary:"External Markdown targets are not supported.",remediation:"Reference a file already inside the project with a project-relative path.",example:t}),"markdown-link-target-unsafe-path":Object.freeze({category:"target-normalization",summary:"The Markdown target is outside the supported project-relative path boundary.",remediation:"Remove absolute, home, drive, backslash or traversal segments and use a project-relative path.",example:t}),"raw-target-malformed":Object.freeze({category:"target-normalization",summary:"The raw target is not a supported Markdown path.",remediation:"Use one project-relative .md file or a trailing-slash directory.",example:t}),"raw-target-external":Object.freeze({category:"target-normalization",summary:"External raw targets are not supported.",remediation:"Reference a file already inside the project with a project-relative path.",example:t}),"raw-target-unsafe-path":Object.freeze({category:"target-normalization",summary:"The raw target is outside the supported project-relative path boundary.",remediation:"Remove absolute, home, drive, backslash or traversal segments and use a project-relative path.",example:t}),"frontmatter-malformed":Object.freeze({category:"metadata-frontmatter",summary:"The leading YAML frontmatter envelope is malformed.",remediation:"Repair the bounded leading --- envelope and keep generated metadata fields scalar or string-list values.",example:a}),"frontmatter-oversized":Object.freeze({category:"metadata-frontmatter",summary:"The leading YAML frontmatter exceeds the public parsing limits.",remediation:"Reduce the metadata header and keep descriptive content in the Markdown body.",example:a}),"frontmatter-unsupported-value":Object.freeze({category:"metadata-frontmatter",summary:"A frontmatter field uses an unsupported value shape.",remediation:"Use allowlisted scalar fields and bounded string lists only.",example:a}),"frontmatter-explicit-selection-required":Object.freeze({category:"metadata-frontmatter",summary:"Target metadata cannot be projected before explicit file selection.",remediation:"Select one project-relative epic or story target before metadata discovery.",example:a})}),i=Object.freeze({category:"metadata-frontmatter",reasonCode:"frontmatter-diagnostic-unclassified",summary:"The frontmatter operation could not be classified safely.",remediation:"Retry with one explicit project-relative target and a bounded YAML header.",example:a});function m(r){const e=n[r];return e?Object.freeze({reasonCode:r,...e}):i}function s(r){const e=m(r),o=e.example?` Example: ${e.example}.`:"";return`${e.reasonCode} [${e.category}]: ${e.summary} Remediation: ${e.remediation}${o}`}export{l as FRONTMATTER_DIAGNOSTIC_CATEGORIES,d as FRONTMATTER_DIAGNOSTIC_REASON_CODES,s as formatFrontmatterDiagnostic,m as getFrontmatterDiagnostic};