@ornexus/neocortex 4.60.63 → 4.60.64
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 +23 -23
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +7 -2
- package/packages/client/dist/cli.js +8 -3
- package/packages/client/dist/commands/activate.js +8 -8
- package/packages/client/dist/commands/architecture-memory-terminal.js +4 -2
- package/packages/client/dist/commands/architecture-non-ui-continuation.d.ts +3 -0
- package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -0
- package/packages/client/dist/commands/invoke.d.ts +19 -16
- package/packages/client/dist/commands/invoke.js +85 -80
- package/packages/client/dist/commands/planning-generation.js +1 -1
- package/packages/client/dist/commands/planning-memory.d.ts +1 -0
- package/packages/client/dist/commands/planning-memory.js +1 -0
- package/packages/client/dist/commands/private-session.d.ts +1 -0
- package/packages/client/dist/commands/private-session.js +1 -0
- package/packages/client/dist/commands/qa-control.d.ts +4 -0
- package/packages/client/dist/commands/qa-control.js +1 -0
- package/packages/client/dist/commands/qa-scan-browser-launch.d.ts +8 -0
- package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -0
- package/packages/client/dist/commands/qa-scan-browser-route.d.ts +3 -0
- package/packages/client/dist/commands/qa-scan-browser-route.js +1 -0
- package/packages/client/dist/commands/qa-scan-capture.d.ts +43 -0
- package/packages/client/dist/commands/qa-scan-capture.js +5 -5
- package/packages/client/dist/commands/qa-scan-discovery.d.ts +7 -0
- package/packages/client/dist/commands/qa-scan-discovery.js +3 -3
- package/packages/client/dist/commands/qa-scan-review.d.ts +8 -1
- package/packages/client/dist/commands/qa-scan-review.js +5 -5
- package/packages/client/dist/commands/qa-synthetic-backend-capture.d.ts +62 -0
- package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -0
- package/packages/client/dist/commands/qa-synthetic-backend-review.d.ts +104 -0
- package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -0
- package/packages/client/dist/commands/qa-synthetic-backend.d.ts +52 -0
- package/packages/client/dist/commands/qa-synthetic-backend.js +7 -0
- package/packages/client/dist/commands/qa-synthetic-broker-port.d.ts +30 -0
- package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -0
- package/packages/client/dist/commands/qa-synthetic-browser.d.ts +1 -0
- package/packages/client/dist/commands/qa-synthetic-browser.js +1 -0
- package/packages/client/dist/commands/refactor-characterization.d.ts +12 -3
- package/packages/client/dist/commands/refactor-characterization.js +21 -12
- package/packages/client/dist/commands/refactor-control.d.ts +17 -0
- package/packages/client/dist/commands/refactor-control.js +3 -0
- package/packages/client/dist/commands/refactor-cpp-assertions.d.ts +4 -0
- package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -0
- package/packages/client/dist/commands/refactor-review.d.ts +13 -0
- package/packages/client/dist/commands/refactor-review.js +6 -5
- package/packages/client/dist/commands/refactor-root.d.ts +165 -1
- package/packages/client/dist/commands/refactor-root.js +12 -7
- package/packages/client/dist/commands/refresh-memory.d.ts +1 -0
- package/packages/client/dist/commands/refresh-memory.js +3 -3
- package/packages/client/dist/commands/shared-architecture-non-ui-contract.d.ts +19 -0
- package/packages/client/dist/commands/shared-architecture-non-ui-contract.js +1 -0
- package/packages/client/dist/errors/error-messages.js +1 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -4
- package/packages/client/dist/git/git-lifecycle-store.js +7 -7
- package/packages/client/dist/license/license-client.d.ts +3 -1
- package/packages/client/dist/license/license-client.js +1 -1
- package/packages/client/dist/memory/project-memory-path-scope.d.ts +4 -0
- package/packages/client/dist/memory/project-memory-path-scope.js +1 -0
- package/packages/client/dist/memory/project-memory-writer.d.ts +4 -1
- package/packages/client/dist/memory/project-memory-writer.js +16 -16
- package/packages/client/dist/private-execution/clean-baseline.d.ts +6 -0
- package/packages/client/dist/private-execution/clean-baseline.js +2 -2
- package/packages/client/dist/private-execution/codex-executor.d.ts +48 -4
- package/packages/client/dist/private-execution/codex-executor.js +9 -2
- package/packages/client/dist/private-execution/codex-host-runtime.d.ts +10 -0
- package/packages/client/dist/private-execution/codex-host-runtime.js +1 -0
- package/packages/client/dist/private-execution/codex-lifecycle-guard.d.ts +4 -0
- package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -0
- package/packages/client/dist/private-execution/codex-scoped-permissions.d.ts +8 -0
- package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -0
- package/packages/client/dist/private-execution/delivery.d.ts +18 -1
- package/packages/client/dist/private-execution/delivery.js +11 -3
- package/packages/client/dist/private-execution/diagnosis-root-review.d.ts +112 -0
- package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -0
- package/packages/client/dist/private-execution/frozen-handoff.d.ts +2 -0
- package/packages/client/dist/private-execution/frozen-handoff.js +7 -0
- package/packages/client/dist/private-execution/implementation-validation.d.ts +24 -0
- package/packages/client/dist/private-execution/implementation-validation.js +2 -0
- package/packages/client/dist/private-execution/isolated-admission.d.ts +11 -7
- package/packages/client/dist/private-execution/isolated-admission.js +17 -10
- package/packages/client/dist/private-execution/isolated-session.d.ts +68 -0
- package/packages/client/dist/private-execution/isolated-session.js +5 -2
- package/packages/client/dist/private-execution/pact-test-source.d.ts +1 -1
- package/packages/client/dist/private-execution/pact-test-source.js +1 -1
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.d.ts +2 -0
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -5
- package/packages/client/dist/private-execution/planning-generation-checkpoint.d.ts +13 -0
- package/packages/client/dist/private-execution/planning-generation-checkpoint.js +4 -3
- package/packages/client/dist/private-execution/planning-memory-checkpoint.d.ts +32 -0
- package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -0
- package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -4
- package/packages/client/dist/private-execution/root-checkpoint.js +1 -1
- package/packages/client/dist/private-execution/root-memory-git-evidence.d.ts +30 -0
- package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -0
- package/packages/client/dist/private-execution/root-memory-recovery.d.ts +16 -0
- package/packages/client/dist/private-execution/root-memory-recovery.js +1 -0
- package/packages/client/dist/private-execution/root-memory-request.d.ts +28 -0
- package/packages/client/dist/private-execution/root-memory-request.js +1 -0
- package/packages/client/dist/private-execution/root-memory-scope.d.ts +28 -0
- package/packages/client/dist/private-execution/root-memory-scope.js +1 -0
- package/packages/client/dist/private-execution/root-memory-writer.d.ts +22 -0
- package/packages/client/dist/private-execution/root-memory-writer.js +1 -0
- package/packages/client/dist/private-execution/session-lease.d.ts +19 -0
- package/packages/client/dist/private-execution/session-lease.js +1 -0
- package/packages/client/dist/private-execution/ux-source-validation.js +1 -1
- package/packages/client/dist/runner-cli.js +0 -0
- package/packages/client/dist/yolo/change-evidence-collector.d.ts +2 -2
- package/packages/client/dist/yolo/change-evidence-collector.js +1 -1
- package/packages/client/dist/yolo/spec-envelope-collector.js +2 -2
- package/packages/shared/dist/invocation/index.js +4 -2
- package/packages/shared/dist/invocation/packed-invoke.d.ts +12 -0
- package/packages/shared/dist/invocation/packed-invoke.js +58 -0
- package/packages/shared/dist/invocation/packed-invoke.test.d.ts +1 -0
- package/packages/shared/dist/invocation/packed-invoke.test.js +21 -0
- package/packages/shared/dist/planning/diagnosis-state.js +5 -2
- package/packages/shared/dist/private-qa-structural-admission.js +14 -0
- package/packages/shared/dist/private-yolo-predecessor-decision.js +32 -0
- package/packages/shared/dist/project-memory-targets.js +243 -0
- package/packages/shared/dist/project-validation-commands.js +96 -0
- package/packages/shared/dist/yolo/change-evidence.js +35 -0
- package/packages/shared/dist/yoloop/branch-unit.js +10 -1
- package/packages/shared/dist/yoloop/root-memory-effect.js +57 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- 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 +2 -2
- 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/opencode/neocortex-root.md +1 -1
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
package/dist/release-source.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"sourceRevision":"
|
|
1
|
+
{"schemaVersion":1,"sourceRevision":"679552f191d498e43109ae2dda12ef9b940e969a","version":"4.60.64"}
|
package/dist/sbom.cdx.json
CHANGED
|
@@ -1159,7 +1159,7 @@
|
|
|
1159
1159
|
"version": "1.31.0"
|
|
1160
1160
|
},
|
|
1161
1161
|
{
|
|
1162
|
-
"bom-ref": "@neocortex/client@4.60.
|
|
1162
|
+
"bom-ref": "@neocortex/client@4.60.64",
|
|
1163
1163
|
"group": "@neocortex",
|
|
1164
1164
|
"name": "client",
|
|
1165
1165
|
"properties": [
|
|
@@ -1168,9 +1168,9 @@
|
|
|
1168
1168
|
"value": "node_modules/@neocortex/client"
|
|
1169
1169
|
}
|
|
1170
1170
|
],
|
|
1171
|
-
"purl": "pkg:npm/%40neocortex/client@4.60.
|
|
1171
|
+
"purl": "pkg:npm/%40neocortex/client@4.60.64",
|
|
1172
1172
|
"type": "library",
|
|
1173
|
-
"version": "4.60.
|
|
1173
|
+
"version": "4.60.64"
|
|
1174
1174
|
},
|
|
1175
1175
|
{
|
|
1176
1176
|
"bom-ref": "@neocortex/core@0.1.0",
|
|
@@ -1187,7 +1187,7 @@
|
|
|
1187
1187
|
"version": "0.1.0"
|
|
1188
1188
|
},
|
|
1189
1189
|
{
|
|
1190
|
-
"bom-ref": "@neocortex/server@4.60.
|
|
1190
|
+
"bom-ref": "@neocortex/server@4.60.64",
|
|
1191
1191
|
"group": "@neocortex",
|
|
1192
1192
|
"name": "server",
|
|
1193
1193
|
"properties": [
|
|
@@ -1196,12 +1196,12 @@
|
|
|
1196
1196
|
"value": "node_modules/@neocortex/server"
|
|
1197
1197
|
}
|
|
1198
1198
|
],
|
|
1199
|
-
"purl": "pkg:npm/%40neocortex/server@4.60.
|
|
1199
|
+
"purl": "pkg:npm/%40neocortex/server@4.60.64",
|
|
1200
1200
|
"type": "library",
|
|
1201
|
-
"version": "4.60.
|
|
1201
|
+
"version": "4.60.64"
|
|
1202
1202
|
},
|
|
1203
1203
|
{
|
|
1204
|
-
"bom-ref": "@neocortex/shared@4.60.
|
|
1204
|
+
"bom-ref": "@neocortex/shared@4.60.64",
|
|
1205
1205
|
"group": "@neocortex",
|
|
1206
1206
|
"name": "shared",
|
|
1207
1207
|
"properties": [
|
|
@@ -1210,9 +1210,9 @@
|
|
|
1210
1210
|
"value": "node_modules/@neocortex/shared"
|
|
1211
1211
|
}
|
|
1212
1212
|
],
|
|
1213
|
-
"purl": "pkg:npm/%40neocortex/shared@4.60.
|
|
1213
|
+
"purl": "pkg:npm/%40neocortex/shared@4.60.64",
|
|
1214
1214
|
"type": "library",
|
|
1215
|
-
"version": "4.60.
|
|
1215
|
+
"version": "4.60.64"
|
|
1216
1216
|
},
|
|
1217
1217
|
{
|
|
1218
1218
|
"bom-ref": "@opentelemetry/api-logs@0.214.0",
|
|
@@ -9660,10 +9660,10 @@
|
|
|
9660
9660
|
"@clack/prompts@0.11.0",
|
|
9661
9661
|
"@hono/node-server@1.19.17",
|
|
9662
9662
|
"@modelcontextprotocol/sdk@1.31.0",
|
|
9663
|
-
"@neocortex/client@4.60.
|
|
9663
|
+
"@neocortex/client@4.60.64",
|
|
9664
9664
|
"@neocortex/core@0.1.0",
|
|
9665
|
-
"@neocortex/server@4.60.
|
|
9666
|
-
"@neocortex/shared@4.60.
|
|
9665
|
+
"@neocortex/server@4.60.64",
|
|
9666
|
+
"@neocortex/shared@4.60.64",
|
|
9667
9667
|
"axe-core@4.14.0",
|
|
9668
9668
|
"better-sqlite3@11.10.0",
|
|
9669
9669
|
"execa@9.6.1",
|
|
@@ -9674,12 +9674,12 @@
|
|
|
9674
9674
|
"yaml@2.9.0",
|
|
9675
9675
|
"zod@4.4.3"
|
|
9676
9676
|
],
|
|
9677
|
-
"ref": "@ornexus/neocortex@4.60.
|
|
9677
|
+
"ref": "@ornexus/neocortex@4.60.64"
|
|
9678
9678
|
},
|
|
9679
9679
|
{
|
|
9680
9680
|
"dependsOn": [
|
|
9681
9681
|
"@babel/parser@7.29.7",
|
|
9682
|
-
"@neocortex/shared@4.60.
|
|
9682
|
+
"@neocortex/shared@4.60.64",
|
|
9683
9683
|
"axe-core@4.14.0",
|
|
9684
9684
|
"better-sqlite3@11.10.0",
|
|
9685
9685
|
"jose@6.2.2",
|
|
@@ -9687,7 +9687,7 @@
|
|
|
9687
9687
|
"playwright-core@1.55.0",
|
|
9688
9688
|
"yaml@2.9.0"
|
|
9689
9689
|
],
|
|
9690
|
-
"ref": "@neocortex/client@4.60.
|
|
9690
|
+
"ref": "@neocortex/client@4.60.64"
|
|
9691
9691
|
},
|
|
9692
9692
|
{
|
|
9693
9693
|
"dependsOn": [
|
|
@@ -9742,7 +9742,7 @@
|
|
|
9742
9742
|
"@fastify/jwt@10.2.2",
|
|
9743
9743
|
"@fastify/rate-limit@10.3.0",
|
|
9744
9744
|
"@fastify/static@10.1.3",
|
|
9745
|
-
"@neocortex/shared@4.60.
|
|
9745
|
+
"@neocortex/shared@4.60.64",
|
|
9746
9746
|
"@sentry/node@10.62.0",
|
|
9747
9747
|
"bcryptjs@3.0.3",
|
|
9748
9748
|
"drizzle-orm@0.45.2",
|
|
@@ -9755,7 +9755,7 @@
|
|
|
9755
9755
|
"stripe@20.4.1",
|
|
9756
9756
|
"yaml@2.9.0"
|
|
9757
9757
|
],
|
|
9758
|
-
"ref": "@neocortex/server@4.60.
|
|
9758
|
+
"ref": "@neocortex/server@4.60.64"
|
|
9759
9759
|
},
|
|
9760
9760
|
{
|
|
9761
9761
|
"dependsOn": [
|
|
@@ -9876,7 +9876,7 @@
|
|
|
9876
9876
|
},
|
|
9877
9877
|
{
|
|
9878
9878
|
"dependsOn": [
|
|
9879
|
-
"@neocortex/shared@4.60.
|
|
9879
|
+
"@neocortex/shared@4.60.64"
|
|
9880
9880
|
],
|
|
9881
9881
|
"ref": "@neocortex/core@0.1.0"
|
|
9882
9882
|
},
|
|
@@ -10936,7 +10936,7 @@
|
|
|
10936
10936
|
"ref": "@lukeed/ms@2.0.2"
|
|
10937
10937
|
},
|
|
10938
10938
|
{
|
|
10939
|
-
"ref": "@neocortex/shared@4.60.
|
|
10939
|
+
"ref": "@neocortex/shared@4.60.64"
|
|
10940
10940
|
},
|
|
10941
10941
|
{
|
|
10942
10942
|
"ref": "@opentelemetry/api@1.9.1"
|
|
@@ -11425,8 +11425,8 @@
|
|
|
11425
11425
|
"metadata": {
|
|
11426
11426
|
"component": {
|
|
11427
11427
|
"author": "OrNexus Team",
|
|
11428
|
-
"bom-ref": "@ornexus/neocortex@4.60.
|
|
11429
|
-
"description": "Neocortex v4.60.
|
|
11428
|
+
"bom-ref": "@ornexus/neocortex@4.60.64",
|
|
11429
|
+
"description": "Neocortex v4.60.64 - Orquestrador de Desenvolvimento de Epics & Stories para Claude Code",
|
|
11430
11430
|
"externalReferences": [
|
|
11431
11431
|
{
|
|
11432
11432
|
"comment": "as detected from PackageJson property \"bugs.url\"",
|
|
@@ -11459,9 +11459,9 @@
|
|
|
11459
11459
|
"value": ""
|
|
11460
11460
|
}
|
|
11461
11461
|
],
|
|
11462
|
-
"purl": "pkg:npm/%40ornexus/neocortex@4.60.
|
|
11462
|
+
"purl": "pkg:npm/%40ornexus/neocortex@4.60.64?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FOrNexus-AI%2Fneocortex.git",
|
|
11463
11463
|
"type": "application",
|
|
11464
|
-
"version": "4.60.
|
|
11464
|
+
"version": "4.60.64"
|
|
11465
11465
|
},
|
|
11466
11466
|
"tools": {
|
|
11467
11467
|
"components": [
|
package/install.ps1
CHANGED
package/install.sh
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornexus/neocortex",
|
|
3
|
-
"version": "4.60.
|
|
4
|
-
"description": "Neocortex v4.60.
|
|
3
|
+
"version": "4.60.64",
|
|
4
|
+
"description": "Neocortex v4.60.64 - Orquestrador de Desenvolvimento de Epics & Stories para Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
7
7
|
"claude-code",
|
|
@@ -78,7 +78,12 @@
|
|
|
78
78
|
"packages/shared/dist/generated/invocation-schema.generated.js",
|
|
79
79
|
"packages/shared/dist/generated/public-projections.generated.js",
|
|
80
80
|
"packages/shared/dist/executable-graph-catalog/contracts.js",
|
|
81
|
+
"packages/shared/dist/private-yolo-predecessor-decision.js",
|
|
82
|
+
"packages/shared/dist/private-qa-structural-admission.js",
|
|
83
|
+
"packages/shared/dist/project-memory-targets.js",
|
|
84
|
+
"packages/shared/dist/project-validation-commands.js",
|
|
81
85
|
"packages/shared/dist/yoloop/branch-unit.js",
|
|
86
|
+
"packages/shared/dist/yoloop/root-memory-effect.js",
|
|
82
87
|
"packages/shared/dist/yoloop/canonical.js",
|
|
83
88
|
"packages/shared/dist/yoloop/epic-terminal-git.js",
|
|
84
89
|
"packages/shared/dist/yoloop/operational-budget.js",
|
|
@@ -12,7 +12,9 @@ Commands:
|
|
|
12
12
|
architecture-memory seal Seal committed Update Memory evidence into local root state
|
|
13
13
|
planning-diagnosis seal Seal an independently reviewed P01 checkpoint from stdin
|
|
14
14
|
planning-research seal Seal an independently reviewed P02 checkpoint from stdin
|
|
15
|
-
planning-generation seal Seal
|
|
15
|
+
planning-generation <seal|verify> Seal a reviewed P03 or verify its committed evidence from stdin
|
|
16
|
+
planning-memory <seal|verify> Seal reviewed committed memory or reopen its physical receipt
|
|
17
|
+
private-session <inspect-rejected|discard-rejected|renew-lease|accept-diagnosis|accept-research|accept-specification|accept-tasks|validate-implementation|accept-implementation|accept-refactor-advisory|accept-test-validation|accept-qa|accept-project-memory> Root recovery and phase validation
|
|
16
18
|
story-checkpoint Root-owned direct-*yolo commit/checkpoint boundary
|
|
17
19
|
legacy-story-branch Root-owned setup and C01 checkpoint for recorded story-branch projects
|
|
18
20
|
legacy-story-pr Root-owned legacy C08/C09 checkpoint, C10 PR, C11 review and C12 merge boundary
|
|
@@ -20,6 +22,8 @@ Commands:
|
|
|
20
22
|
mutation-qa Root-owned mutation-test scope, Stryker checkpoint and local QA decision
|
|
21
23
|
property-qa Local-only property-test preflight, sandbox proof and root semantic QA review
|
|
22
24
|
qa-scan-review Root-only loopback browser capture, physical QA review and multi-surface reconciliation
|
|
25
|
+
qa-synthetic-backend Separately granted no-network synthetic backend observations; JSON stdin
|
|
26
|
+
qa-root Authenticated control of an operator-registered isolated QA worker
|
|
23
27
|
refactor-root Root-only scope, Node characterization, semantic QA and Git checkpoint
|
|
24
28
|
native-agent Reserve and observe authorized native child dispatches
|
|
25
29
|
architecture-answers Save explicit Pact decisions in the local private store
|
|
@@ -40,6 +44,7 @@ Invoke Options:
|
|
|
40
44
|
--watch Keep invoke open and poll local continuity summaries
|
|
41
45
|
--server-url <url> Server URL override
|
|
42
46
|
--platform-target <id> Explicit host override (default: fail-closed runtime detection)
|
|
47
|
+
--private-execution-model <id> Explicit model for private beta; no fallback or global config change
|
|
43
48
|
|
|
44
49
|
Refresh Memory Options:
|
|
45
50
|
--project-root <path> Project root directory (default: cwd)
|
|
@@ -196,5 +201,5 @@ Invocation payload boundary:
|
|
|
196
201
|
|
|
197
202
|
License:
|
|
198
203
|
Licensed under BSL-1.1 (Business Source License 1.1)
|
|
199
|
-
`.trim(),m=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function d(){const
|
|
200
|
-
`),process.exit(0));const
|
|
204
|
+
`.trim(),m=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function d(){const s=process.argv.slice(2),n=s[0];n&&m.has(n.toLowerCase())&&process.exit(0),(!n||n==="--help"||n==="-h")&&(console.log(l),process.exit(0)),(n==="--version"||n==="-v")&&(console.log(p()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
|
|
205
|
+
`),process.exit(0));const o=s.slice(1);switch(n){case"invoke":{const{invokeCliHandler:e,flushInvokeCliOutput:t}=await import("./commands/invoke.js"),r=await e(o),i=await t();process.exitCode=i?r:1;break}case"activate":{const{activate:e}=await import("./commands/activate.js");let t,r,i=!1;for(let a=0;a<o.length;a++){const c=o[a];c==="--server-url"?r=o[++a]:c==="--non-interactive"?i=!0:c==="--help"||c==="-h"?(console.log(l),process.exit(0)):c.startsWith("-")||(t=c)}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 a=await e({licenseKey:t,serverUrl:r,nonInteractive:i});a.success?(console.log(a.message),process.exit(0)):(console.error(a.message),process.exit(1))}catch(a){const c=a instanceof Error?a.message:String(a);console.error(`Activation failed: ${c}`),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"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"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(s.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:r}=await import("./commands/refactor-control.js");process.exit(await r(o))}if(o[0]==="characterize"){const{refactorCharacterizationCliHandler:r}=await import("./commands/refactor-characterization.js");process.exit(r(o))}if(o[0]==="review-accept"||o[0]==="review-status"){const{refactorReviewCliHandler:r}=await import("./commands/refactor-review.js");process.exit(await r(o))}if(o[0]?.startsWith("commit-")){const{refactorCommitCliHandler:r}=await import("./commands/refactor-commit.js");process.exit(r(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: ${n}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}d().catch(s=>{console.error(`Fatal error: ${s instanceof Error?s.message:String(s)}`),process.exit(1)});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{existsSync as
|
|
2
|
-
`,"utf-8")}}async function
|
|
3
|
-
`)};const n=t.trim();if(n.startsWith("nxk_")){const
|
|
4
|
-
`)}}const p=m.tier??
|
|
5
|
-
`),tier:p,serverUrl:r,configPath:c}}const
|
|
6
|
-
`)}}if(!
|
|
7
|
-
`)};const
|
|
8
|
-
`),tier:u,serverUrl:r,configPath:c}}export{
|
|
1
|
+
import{existsSync as Y,mkdirSync as x,writeFileSync as X,readFileSync as I}from"node:fs";import{join as i,dirname as C}from"node:path";import{homedir as W}from"node:os";import{fileURLToPath as J}from"node:url";import{LicenseClient as B}from"../license/license-client.js";import{EncryptedCache as P}from"../cache/encrypted-cache.js";import{getMachineFingerprint as S}from"../machine/fingerprint.js";import{updateAgentDescription as E}from"../agent/update-description.js";import{refreshStubs as h}from"../agent/refresh-stubs.js";import{updateAgentYaml as N}from"../agent/update-agent-yaml.js";import{saveSecureConfig as G,setSecureDirPermissions as _}from"../config/secure-config.js";import{DEFAULT_SERVER_URL as z}from"../constants.js";function b(){try{const e=J(import.meta.url);let t=C(e);for(let r=0;r<5;r++){try{const n=JSON.parse(I(i(t,"package.json"),"utf-8"));if(n.name==="@ornexus/neocortex"||n.name==="@neocortex/client")return n.version??"0.0.0"}catch{}t=C(t)}}catch{}return"0.0.0"}const o=i(W(),".neocortex"),c=i(o,"config.json"),q=/^NX-(F|P|E)-[a-f0-9]+-[a-f0-9]+$/i,H=/^nxk_(?:[a-z]+_)?[a-f0-9]+_[a-f0-9]+$/;function Q(e){if(!e||e.trim().length===0)return{valid:!1,error:"License key cannot be empty"};const t=e.trim().toUpperCase();return t.startsWith("NX-")?q.test(t)?{valid:!0}:{valid:!1,error:"Invalid license key format. Expected: NX-{TIER}-{ID} (e.g., NX-PRO-ABC-123)"}:{valid:!1,error:'License key must start with "NX-"'}}function Z(e){if(!e||e.trim().length===0)return{valid:!1,error:"API key cannot be empty"};const t=e.trim();return t.startsWith("nxk_")?t.length<20?{valid:!1,error:"API key is too short"}:H.test(t)?{valid:!0}:{valid:!1,error:"Invalid API key format. Expected: nxk_{id}_{check} (e.g., nxk_abc123def456...)"}:{valid:!1,error:'API key must start with "nxk_"'}}function he(){try{if(Y(c)){const e=I(c,"utf-8");return JSON.parse(e)}}catch{}return null}function A(e){x(o,{recursive:!0}),_(o);const t=i(o,"cache");if(x(t,{recursive:!0}),_(t),e.licenseKey||e.apiKey)G({serverUrl:e.serverUrl,mode:e.mode,machineId:e.machineId,activatedAt:e.activatedAt,tier:e.tier,licenseKey:e.licenseKey??e.apiKey});else{const r={configVersion:1,...e};X(c,JSON.stringify(r,null,2)+`
|
|
2
|
+
`,"utf-8")}}async function ye(e){const{licenseKey:t,serverUrl:r=z}=e;if(!t)return{success:!1,message:["No key provided.","","Get your license key at https://neocortex.sh/portal/login","","Usage:"," neocortex activate YOUR-LICENSE-KEY"," neocortex activate YOUR-API-KEY"].join(`
|
|
3
|
+
`)};const n=t.trim();if(n.startsWith("nxk_")){const s=Z(n);if(!s.valid)return{success:!1,message:`Invalid API key: ${s.error}`};const k=n.match(/^nxk_(free|pro|ent)_/),T={free:"free",pro:"pro",ent:"enterprise"},L=k?.[1]?T[k[1]]??"unknown":"unknown",w=S(),l=b();let m;try{const a=await fetch(`${r}/api/v1/license/activate-key`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:n,machine_id:w,client_version:l})});if(!a.ok)return{success:!1,message:`API key activation failed: ${(await a.json().catch(()=>({}))).message??`HTTP ${a.status}`}`};m=await a.json()}catch{return{success:!1,message:["Failed to connect to IP Protection Server.","","Possible causes:",` - Server at ${r} is unreachable`," - Network connectivity issue","","Workaround: Use --local flag to run in local mode"].join(`
|
|
4
|
+
`)}}const p=m.tier??L,$=i(o,"cache");try{await new P({cacheDir:$,passphrase:n}).set("neocortex:jwt:token",m.token,m.expires_in*1e3)}catch{}const M={serverUrl:r,mode:"remote",machineId:w,activatedAt:new Date().toISOString(),tier:p,apiKey:n};try{A(M)}catch(a){return{success:!1,message:`Failed to save configuration: ${a instanceof Error?a.message:"unknown error"}`}}const V=h(l,{forceCreate:!0,targetFilter:"claude-code"})+h(l);return E(l,p),N(l,p),{success:!0,message:["Neocortex activated successfully.","","Open your preferred platform (Claude Code, Cursor, VS Code, etc.)","and reference the Neocortex agent.",...V>0?["","Managed agent wrappers were refreshed while preserving existing Markdown frontmatter and unrelated platform files."]:[],"","Use *menu to see available commands or check the Docs in your Dashboard."].join(`
|
|
5
|
+
`),tier:p,serverUrl:r,configPath:c}}const v=Q(n);if(!v.valid)return{success:!1,message:`Invalid license key: ${v.error}`};const d=n,g=d.match(/^NX-(F|P|E)-/i),F={F:"free",P:"pro",E:"enterprise"},K=g?.[1]?F[g[1].toUpperCase()]??"unknown":"unknown",U=i(o,"cache"),j=new P({cacheDir:U,passphrase:d}),D=new B({serverUrl:r,licenseKey:d,cacheProvider:j});let y;try{y=await D.activate()}catch{return{success:!1,message:["Failed to connect to IP Protection Server.","","Possible causes:",` - Server at ${r} is unreachable`," - Network connectivity issue"," - Server is still being deployed","","Workaround: Use --local flag to run in local mode"].join(`
|
|
6
|
+
`)}}if(!y)return{success:!1,message:["License activation failed.","","Possible causes:"," - Invalid or expired license key"," - License already activated on another machine"," - Server rejected the activation request","","Check your license key and try again.","Contact support if the problem persists."].join(`
|
|
7
|
+
`)};const u=y.tier??K,O={serverUrl:r,mode:"remote",machineId:S(),activatedAt:new Date().toISOString(),tier:u,licenseKey:d};try{A(O)}catch(s){return{success:!1,message:`Failed to save config to ${c}: ${s instanceof Error?s.message:String(s)}`}}const f=b(),R=h(f,{forceCreate:!0,targetFilter:"claude-code"})+h(f);return E(f,u),N(f,u),{success:!0,message:["Neocortex activated successfully.","","Open your preferred platform (Claude Code, Cursor, VS Code, etc.)","and reference the Neocortex agent.",...R>0?["","Managed agent wrappers were refreshed while preserving existing Markdown frontmatter and unrelated platform files."]:[],"","Use *menu to see available commands or check the Docs in your Dashboard."].join(`
|
|
8
|
+
`),tier:u,serverUrl:r,configPath:c}}export{ye as activate,Z as validateApiKeyFormat,Q as validateLicenseKeyFormat};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import{execFileSync as
|
|
2
|
-
`)
|
|
1
|
+
import{architectureMemoryPredecessorCount as F}from"./architecture-non-ui-continuation.js";import{execFileSync as g}from"node:child_process";import{createHash as V,randomUUID as B}from"node:crypto";import{closeSync as w,fsyncSync as I,lstatSync as j,mkdirSync as J,openSync as E,readFileSync as S,realpathSync as M,renameSync as L,unlinkSync as H,writeFileSync as O}from"node:fs";import{isAbsolute as X,join as f,resolve as v}from"node:path";import{listProjectMemoryTargets as q}from"../memory/shared-project-memory-types.js";import{parseRefreshMemoryArgs as U,verifyProjectMemoryTargets as _}from"./refresh-memory.js";function z(r,e){if(!c(r)||!c(e)||Object.keys(r).sort().join(",")!==["schemaVersion","targetEpicId","graphRevision","sourceHead","canonicalSha256","projectionSha256","fileCount","completionReceiptId","validationReceiptId","receiptId","status","evidenceIds","publicSafe"].sort().join(",")||r.schemaVersion!=="ArchitectureTerminalMemoryReceipt/1"||r.targetEpicId!==e.targetEpicId||r.graphRevision!==e.graphRevision||r.completionReceiptId!==e.completionEvidence?.receiptId||r.validationReceiptId!==e.validationEvidence?.receiptId||typeof r.sourceHead!="string"||!/^[a-f0-9]{40}$/.test(r.sourceHead)||![r.graphRevision,r.canonicalSha256,r.projectionSha256,r.completionReceiptId,r.validationReceiptId,r.receiptId].every(n=>typeof n=="string"&&/^[a-f0-9]{64}$/.test(n))||!Number.isInteger(r.fileCount)||r.fileCount<1||r.fileCount>64||r.status!=="passed"||r.publicSafe!==!0||!Array.isArray(r.evidenceIds)||r.evidenceIds.length!==1)return!1;const s={schemaVersion:r.schemaVersion,targetEpicId:r.targetEpicId,graphRevision:r.graphRevision,sourceHead:r.sourceHead,canonicalSha256:r.canonicalSha256,projectionSha256:r.projectionSha256,fileCount:r.fileCount,completionReceiptId:r.completionReceiptId,validationReceiptId:r.validationReceiptId},i=b(JSON.stringify(s));return r.receiptId===i&&r.evidenceIds[0]===`memory-physical-${i.slice(0,24)}`}function c(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function b(r){return V("sha256").update(r).digest("hex")}function T(r,e){if(!c(e)||e.owner!=="root"||e.currentStageCommand!=="update-memory"||e.continuationState!=="delegate"||e.childStatus!=="succeeded"||e.evidencePolicy!=="v2-required"||typeof e.targetEpicId!="string"||!/^P[1-9][0-9]{0,11}$/.test(e.targetEpicId)||typeof e.graphRevision!="string"||!/^[a-f0-9]{64}$/.test(e.graphRevision)||!Array.isArray(e.acceptedStages)||e.acceptedStages.length!==F(e)||!c(e.reviewDecision)||e.reviewDecision.decision!=="approved"||!c(e.completionEvidence)||e.completionEvidence.status!=="succeeded"||e.completionEvidence.stageCommand!=="update-memory"||!c(e.validationEvidence)||e.validationEvidence.status!=="passed"||e.validationEvidence.stageCommand!=="update-memory"||typeof e.completionEvidence.receiptId!="string"||!/^[a-f0-9]{64}$/.test(e.completionEvidence.receiptId)||typeof e.validationEvidence.receiptId!="string"||!/^[a-f0-9]{64}$/.test(e.validationEvidence.receiptId))throw new Error("architecture-terminal-memory-evidence-incomplete");const s=_(U(["--verify","--project-root",r])),i=g("git",["rev-parse","HEAD"],{cwd:r,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(!/^[a-f0-9]{40}$/.test(i))throw new Error("architecture-terminal-memory-head-invalid");const n=S(f(r,"NEOCORTEX.md")),u=g("git",["show","HEAD:NEOCORTEX.md"],{cwd:r,stdio:["ignore","pipe","ignore"],maxBuffer:65536});if(!n.equals(u)||b(n)!==s.canonicalSha256)throw new Error("architecture-terminal-memory-uncommitted");const k=[...new Set(["NEOCORTEX.md",...q().flatMap(a=>[a.primaryFile,...a.secondaryFiles.filter(o=>o.scope==="project").map(o=>o.path)])])];if(g("git",["diff","--name-only","HEAD","--",...k],{cwd:r,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim())throw new Error("architecture-terminal-memory-uncommitted");let p=i;if(e.terminalMemoryCheckpoint!==void 0){if(!z(e.terminalMemoryCheckpoint,e))throw new Error("architecture-terminal-memory-checkpoint-invalid");p=e.terminalMemoryCheckpoint.sourceHead;const a=o=>g("git",o,{cwd:r,encoding:"utf8",stdio:["ignore","pipe","ignore"],maxBuffer:1024*1024}).trim();try{a(["merge-base","--is-ancestor",p,i]);const o=a(["rev-list","--max-count=257","--reverse","--parents",`${p}..${i}`]).split(`
|
|
2
|
+
`).filter(Boolean);if(o.length>256)throw new Error("checkpoint-range-too-large");for(const y of o){const l=y.split(" ");if(l.length!==2)throw new Error("checkpoint-merge-unverified");const h=a(["diff-tree","--no-commit-id","--name-only","-r",l[0]]).split(`
|
|
3
|
+
`).filter(Boolean);if(h.length!==1||h[0]!==".neocortex/state.json")throw new Error("checkpoint-range-not-state-only")}}catch{throw new Error("architecture-terminal-memory-checkpoint-range-invalid")}}const m={schemaVersion:"ArchitectureTerminalMemoryReceipt/1",targetEpicId:e.targetEpicId,graphRevision:e.graphRevision,sourceHead:p,canonicalSha256:s.canonicalSha256,projectionSha256:s.projectionSha256,fileCount:s.fileCount,completionReceiptId:e.completionEvidence.receiptId,validationReceiptId:e.validationEvidence.receiptId},t=b(JSON.stringify(m));return{...m,receiptId:t,status:"passed",evidenceIds:[`memory-physical-${t.slice(0,24)}`],publicSafe:!0}}function G(r){const e=v(r),s=g("git",["rev-parse","--show-toplevel"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(M(e)!==e||v(s)!==e)throw new Error("architecture-terminal-memory-project-root-invalid");const i=f(e,".neocortex"),n=f(i,"state.json"),u=f(i,"state.json.architecture.lock"),k=E(u,"wx",384);let d;try{const p=j(n);if(!p.isFile()||p.isSymbolicLink())throw new Error("architecture-terminal-memory-state-invalid");const m=S(n,"utf8"),t=JSON.parse(m);if(!c(t)||!c(t.archPlan)||!c(t.archPlan.execution)||!c(t.epics)||t.scope&&c(t.scope)&&t.scope.kind==="projected"||!Object.hasOwn(t.epics,String(t.archPlan.execution.targetEpicId))||t.archPlan.execution.terminalMemoryCheckpoint!==void 0)throw new Error("architecture-terminal-memory-state-invalid");const a=T(e,t.archPlan.execution),o=g("git",["rev-parse","--git-common-dir"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim(),y=X(o)?v(o):v(e,o);if(M(y)!==y||j(y).isSymbolicLink())throw new Error("architecture-terminal-memory-backup-dir-invalid");const l=f(y,"neocortex-architecture");J(l,{recursive:!0,mode:448});const h=j(l);if(!h.isDirectory()||h.isSymbolicLink()||h.uid!==process.getuid?.()||(h.mode&63)!==0)throw new Error("architecture-terminal-memory-backup-dir-invalid");if(S(n,"utf8")!==m)throw new Error("architecture-terminal-memory-state-conflict");const P=B(),D=f(l,`state-backup-${P}.json`),R=E(D,"wx",384);try{O(R,m),I(R)}finally{w(R)}const A=E(l,"r");try{I(A)}finally{w(A)}const N={...t,archPlan:{...t.archPlan,execution:{...t.archPlan.execution,terminalMemoryCheckpoint:a}}};d=f(i,`state.json.architecture-tmp-${P}`);const C=E(d,"wx",384);try{O(C,`${JSON.stringify(N,null,2)}
|
|
4
|
+
`),I(C)}finally{w(C)}if(S(n,"utf8")!==m)throw new Error("architecture-terminal-memory-state-conflict");if(T(e,t.archPlan.execution).receiptId!==a.receiptId)throw new Error("architecture-terminal-memory-physical-conflict");L(d,n),d=void 0;const $=E(i,"r");try{I($)}finally{w($)}return a}finally{if(d)try{H(d)}catch{}w(k),H(u)}}async function re(r){try{if(r[0]!=="seal"||r.length!==1&&r.length!==3||r.length===3&&r[1]!=="--project-root")throw new Error("usage: architecture-memory seal [--project-root <path>]");const e=G(r.length===3?r[2]:process.cwd());return console.log(`Architecture memory sealed: receipt=${e.receiptId} head=${e.sourceHead} files=${e.fileCount}`),0}catch(e){return console.error(e instanceof Error?e.message:String(e)),1}}export{z as acceptedArchitectureTerminalMemoryReceipt,re as architectureMemoryTerminalCliHandler,T as deriveArchitectureTerminalMemoryReceipt,G as sealArchitectureTerminalMemory};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function architectureMemoryPredecessorCount(execution: Record<string, unknown>): number;
|
|
2
|
+
export type NonUiClientTransition = 'advance' | 'delegate' | 'ask-user' | 'complete' | 'complete-replay';
|
|
3
|
+
export declare function classifyNonUiArchitectureTransition(request: Record<string, unknown>, execution: Record<string, unknown>, memoryReceiptValid?: boolean): NonUiClientTransition | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isDeepStrictEqual as d}from"node:util";import{ARCHITECTURE_PUBLIC_STAGE_COMMANDS as A,NON_UI_ARCHITECTURE_STAGE_COMMANDS as R,parseArchitectureNonUiScopeReceipt as y}from"./shared-architecture-non-ui-contract.js";const a=e=>!!e&&typeof e=="object"&&!Array.isArray(e),r=R;function C(e){const t=y(e.nonUiScopeReceipt);return t&&t.targetEpicId===e.targetEpicId&&t.graphRevision===e.graphRevision&&a(e.accounting)&&t.accountingId===e.accounting.accountingId&&a(e.evidenceExpectation)&&t.rootInputSha256===e.evidenceExpectation.inputHash?t:void 0}function D(e){if(e.nonUiScopeReceipt===void 0)return A.length-1;if(!C(e))throw new Error("architecture-non-ui-scope-invalid");return r.length-1}function f(e,t,c,n){return Array.isArray(e)&&e.length===t&&e.every((i,o)=>a(i)&&i.targetEpicId===c&&i.stageCommand===r[o]&&a(i.completionEvidence)&&a(i.validationEvidence)&&i.completionEvidence.stageCommand===i.stageCommand&&i.completionEvidence.status==="succeeded"&&i.validationEvidence.stageCommand===i.stageCommand&&i.validationEvidence.status==="passed"&&i.completionEvidence.targetEpicId===c&&i.validationEvidence.targetEpicId===c&&i.completionEvidence.artifactHash===i.validationEvidence.artifactHash&&a(i.validationEvidence.isolated)&&a(i.validationEvidence.regression)&&i.validationEvidence.isolated.graphHash===n&&i.validationEvidence.regression.graphHash===n)}function H(e){const t=e.reviewDecision,c=e.completionEvidence,n=e.validationEvidence;return a(t)&&a(c)&&a(n)&&t.schemaVersion==="ArchitectureReviewDecision/1"&&t.decision==="approved"&&t.targetEpicId===e.targetEpicId&&t.graphRevision===e.graphRevision&&t.artifactHash===c.artifactHash&&t.artifactHash===n.artifactHash&&t.completionReceiptId===c.receiptId&&t.validationReceiptId===n.receiptId}function O(e,t,c=!1){const n=t.checkpoint;if(!a(n))return;const i=C(n);if(!i||i.targetEpicId!==e.targetEpicId||i.graphRevision!==e.graphRevision||!a(e.evidenceExpectation)||i.rootInputSha256!==e.evidenceExpectation.inputHash||!a(e.accounting)||i.accountingId!==e.accounting.accountingId||e.nonUiScopeReceipt!==void 0&&!d(e.nonUiScopeReceipt,i))return;const o=e.acceptedStages,s=n.acceptedStages,l=r.indexOf(String(e.currentStageCommand)),p=e.targetEpicId,u=e.graphRevision,g=S=>d(n[S],e[S]),h=e.childStatus===void 0&&e.completionEvidence===void 0&&e.validationEvidence===void 0,E=n.childStatus===void 0&&n.completionEvidence===void 0&&n.validationEvidence===void 0;if(e.currentStageCommand==="arch-design-system"&&e.continuationState==="advance"&&h&&E&&n.currentStageCommand==="arch-performance"&&n.continuationState==="advance"&&t.nextAction==="resume"&&f(o,r.indexOf("arch-performance"),p,u)&&d(s,o))return"advance";if(l<r.indexOf("arch-security")||e.nonUiScopeReceipt===void 0&&e.currentStageCommand!=="arch-security")return;if(e.continuationState==="complete"&&e.currentStageCommand==="update-memory"&&n.continuationState==="complete"&&n.currentStageCommand==="update-memory"&&t.nextAction==="complete"&&f(o,r.length,p,u)&&d(s,o)&&["childStatus","completionEvidence","validationEvidence","reviewDecision","terminalMemoryCheckpoint"].every(g)&&c)return"complete-replay";if(!f(o,l,p,u))return;if(h&&E&&["advance","delegate"].includes(String(e.continuationState))&&n.currentStageCommand===e.currentStageCommand&&n.continuationState==="delegate"&&t.nextAction==="delegate"&&d(s,o)&&g("reviewDecision"))return"delegate";const m=e.completionEvidence,v=e.validationEvidence;if(e.childStatus!=="succeeded"||!a(m)||!a(v)||m.status!=="succeeded"||v.status!=="passed"||m.stageCommand!==e.currentStageCommand||v.stageCommand!==e.currentStageCommand||m.targetEpicId!==p||v.targetEpicId!==p||m.artifactHash!==v.artifactHash)return;if(e.currentStageCommand==="arch-review"&&!H(e))return n.currentStageCommand==="arch-review"&&n.continuationState==="ask-user"&&t.nextAction==="ask-user"&&d(s,o)&&["childStatus","completionEvidence","validationEvidence"].every(g)&&d(n.questionIds,["ARCH-REVIEW-A09-APPROVAL"])&&e.reviewDecision===void 0?"ask-user":void 0;if(e.currentStageCommand==="arch-review"&&(e.continuationState!=="ask-user"||!d(e.questionIds,["ARCH-REVIEW-A09-APPROVAL"])))return;const I=[...o,{targetEpicId:p,stageCommand:e.currentStageCommand,completionEvidence:m,validationEvidence:v}];if(!(!d(s,I)||!g("reviewDecision"))){if(e.currentStageCommand==="update-memory")return n.currentStageCommand==="update-memory"&&n.continuationState==="complete"&&t.nextAction==="complete"&&["childStatus","completionEvidence","validationEvidence","terminalMemoryCheckpoint"].every(g)&&c?"complete":void 0;if(E&&n.currentStageCommand===r[l+1]&&n.continuationState==="advance"&&t.nextAction==="resume")return"advance"}}export{D as architectureMemoryPredecessorCount,O as classifyNonUiArchitectureTransition};
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license FSL-1.1
|
|
3
|
-
* Copyright (c) 2026 OrNexus AI
|
|
4
|
-
*
|
|
5
|
-
* This file is part of Neocortex CLI, licensed under the
|
|
6
|
-
* Functional Source License, Version 1.1 (FSL-1.1).
|
|
7
|
-
*
|
|
8
|
-
* Change Date: February 20, 2029
|
|
9
|
-
* Change License: MIT
|
|
10
|
-
*
|
|
11
|
-
* See the LICENSE file in the project root for full license text.
|
|
12
|
-
*/
|
|
13
1
|
import { type PactAnswerReceipt } from './architecture-answers.js';
|
|
14
2
|
import type { YoloopPersistedState } from '../yoloop/shared-yoloop-types.js';
|
|
15
3
|
import { type StateMigrationAuthorityV1 } from '../migrations/state-json.js';
|
|
@@ -19,7 +7,7 @@ import { type ContinuityProcessingSummaryCursorTarget } from '../continuity/cont
|
|
|
19
7
|
import type { ProjectEvidenceEnvelope } from '../evidence/types.js';
|
|
20
8
|
import { detectNativeHostAttestation } from '../adapters/platform-detector.js';
|
|
21
9
|
import type { YoloSpecEnvelopeV1 } from '../../../shared/dist/yolo/spec-envelope.js';
|
|
22
|
-
import type {
|
|
10
|
+
import type { YoloChangeEvidence } from '../../../shared/dist/yolo/change-evidence.js';
|
|
23
11
|
import { type InvokeEffectContext, type StrictReadOnlyInvokeEnvelope } from '../../../shared/dist/strict-readonly.js';
|
|
24
12
|
import { type InvokeInputEvidenceV1, type InvokeInputEnvelopeV2, type InvokeInputSourceV2, type InvocationMalformedInputReasonV1, type InvocationAdmissionResultV1, type ProjectIdentityMigrationRequestV1 } from '../../../shared/dist/invocation/index.js';
|
|
25
13
|
import { type P205TransientExecutionAuthority } from '../git/git-lifecycle-store.js';
|
|
@@ -31,7 +19,7 @@ export declare function getOrCreatePendingEpicIdempotencyKey(projectRoot: string
|
|
|
31
19
|
readonly fingerprint: string;
|
|
32
20
|
};
|
|
33
21
|
export declare function clearPendingEpicIdempotencyKey(projectRoot: string, fingerprint: string): void;
|
|
34
|
-
export declare function recordPendingEpicReservation(projectRoot: string, fingerprint: string, claimId: string, epicId: string): void;
|
|
22
|
+
export declare function recordPendingEpicReservation(projectRoot: string, fingerprint: string, claimId: string, epicId: string, planningProtocol?: 'root-staged-v1'): void;
|
|
35
23
|
export interface InvokeOptions {
|
|
36
24
|
/** Raw args from the user (e.g., "*yolo @docs/stories/1.1.story.md") */
|
|
37
25
|
readonly args: string;
|
|
@@ -59,6 +47,10 @@ export interface InvokeOptions {
|
|
|
59
47
|
readonly strictReadOnly?: boolean;
|
|
60
48
|
/** Explicit P222.16 beta; never inferred from Codex being installed. */
|
|
61
49
|
readonly privateExecutionBeta?: boolean;
|
|
50
|
+
/** Explicit local subscription model override; never part of server args or a fallback. */
|
|
51
|
+
readonly privateExecutionModel?: string;
|
|
52
|
+
/** Host-only safe failure observation; never serialized to HTTP or agent input. */
|
|
53
|
+
readonly onPrivateExecutionWorkspaceFailure?: (observation: import('../private-execution/codex-executor.js').PrivateCodexWorkspaceEffectFailureV1) => void;
|
|
62
54
|
/** Test-only parent for root-owned private YOLO/planning clones; CLI leaves unset. */
|
|
63
55
|
readonly privateExecutionWorkspaceParent?: string;
|
|
64
56
|
}
|
|
@@ -245,6 +237,7 @@ export interface InvokeCliParsedOptions {
|
|
|
245
237
|
readonly platformTarget?: string;
|
|
246
238
|
readonly strictReadOnly: boolean;
|
|
247
239
|
readonly privateExecutionBeta: boolean;
|
|
240
|
+
readonly privateExecutionModel?: string;
|
|
248
241
|
}
|
|
249
242
|
type InvokeCommandLevelWatchCommand = 'goal' | 'loop' | 'jobs';
|
|
250
243
|
type InvokeCommandLevelWatchOperation = 'create' | 'start' | 'resume' | 'run-once' | 'watch';
|
|
@@ -516,7 +509,7 @@ interface InvokeRequestBodyBase {
|
|
|
516
509
|
readonly hostKind: 'codex-cli';
|
|
517
510
|
readonly hostVersion: string;
|
|
518
511
|
readonly sandboxProof: {
|
|
519
|
-
readonly schemaVersion:
|
|
512
|
+
readonly schemaVersion: 6;
|
|
520
513
|
readonly trust: 'client-self-attested';
|
|
521
514
|
readonly credentialKind: 'chatgpt-subscription';
|
|
522
515
|
readonly authIsolation: 'passed';
|
|
@@ -526,6 +519,7 @@ interface InvokeRequestBodyBase {
|
|
|
526
519
|
readonly mcpIsolation: 'passed';
|
|
527
520
|
readonly environmentIsolation: 'passed';
|
|
528
521
|
readonly networkDenied: 'passed';
|
|
522
|
+
readonly webSearchDisabled: 'passed';
|
|
529
523
|
readonly observedAtMs: number;
|
|
530
524
|
};
|
|
531
525
|
};
|
|
@@ -538,7 +532,7 @@ interface InvokeRequestBodyBase {
|
|
|
538
532
|
readonly registryChecksum: string;
|
|
539
533
|
readonly strictReadOnly?: StrictReadOnlyInvokeEnvelope;
|
|
540
534
|
readonly yoloSpecEnvelope?: YoloSpecEnvelopeV1;
|
|
541
|
-
readonly yoloChangeEvidence?:
|
|
535
|
+
readonly yoloChangeEvidence?: YoloChangeEvidence;
|
|
542
536
|
}
|
|
543
537
|
export type InvokeRequestBody = InvokeRequestBodyBase & ({
|
|
544
538
|
readonly args: string;
|
|
@@ -612,6 +606,8 @@ export declare function __resetSchemaDriftWarnedForTests(): void;
|
|
|
612
606
|
export interface StateSnapshotCollectionOptions {
|
|
613
607
|
readonly epicAware?: boolean;
|
|
614
608
|
readonly projectless?: boolean;
|
|
609
|
+
/** Opt-in physical P03 reopening for private root planning, never ordinary dashboards. */
|
|
610
|
+
readonly verifyPlanningGeneration?: boolean;
|
|
615
611
|
/** Process-local proof keyed by story; never read from or written to JSON. */
|
|
616
612
|
readonly p205Authorities?: Readonly<Record<string, P205TransientExecutionAuthority>>;
|
|
617
613
|
}
|
|
@@ -699,6 +695,10 @@ export declare function sendEpicClaimAcknowledgement(serverUrl: string, authToke
|
|
|
699
695
|
readonly projectId: string;
|
|
700
696
|
readonly epicId: string;
|
|
701
697
|
readonly status: 'materialized' | 'abandoned';
|
|
698
|
+
readonly planningCheckpoint?: {
|
|
699
|
+
readonly memoryReceiptId: string;
|
|
700
|
+
readonly snapshot: Record<string, unknown>;
|
|
701
|
+
};
|
|
702
702
|
}, retryOptions?: InvokePhysicalRetryOptions): Promise<boolean>;
|
|
703
703
|
export declare function acknowledgeMaterializedPendingEpicClaims(projectRoot: string, stateSnapshot: StateSnapshot, serverUrl: string, authToken: string, projectId: string | undefined, retryOptions?: InvokePhysicalRetryOptions): Promise<number>;
|
|
704
704
|
/**
|
|
@@ -723,6 +723,9 @@ export declare function extractPreFlightTrigger(args: string): string | null;
|
|
|
723
723
|
export declare const INVOKE_HELP_TEXT: string;
|
|
724
724
|
export declare function parseInvokeCliOptions(argv: string[], readers?: InvokeCliInputReaders): InvokeCliParsedOptions;
|
|
725
725
|
export declare function writeInvokeCliSuccessOutput(result: InvokeResult, parsed: Pick<InvokeCliParsedOptions, 'format' | 'watch' | 'commandLevelWatch'>, stdout?: InvokeWatchWritable, stderr?: InvokeWatchWritable): void;
|
|
726
|
+
/** P222.26 T2.5: process.exit must wait for sanitized pipe output to finish.
|
|
727
|
+
* A failed or stalled output stream cannot produce a successful CLI receipt. */
|
|
728
|
+
export declare function flushInvokeCliOutput(stdout?: NodeJS.WritableStream, stderr?: NodeJS.WritableStream): Promise<boolean>;
|
|
726
729
|
/**
|
|
727
730
|
* CLI handler for the invoke command.
|
|
728
731
|
* Parses CLI args and delegates to invoke().
|