@ornexus/neocortex 4.60.62 → 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 +77 -50
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +12 -5
- 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 +86 -79
- 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/package.json +1 -0
- package/packages/client/dist/private-execution/clean-baseline.d.ts +7 -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/package.json +1 -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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** Bounded project command declarations from the submitted story/spec artifacts.
|
|
2
|
+
* These are planning data, never permission to execute or independent QA.
|
|
3
|
+
*/
|
|
4
|
+
export const PROJECT_VALIDATION_KINDS = ['unit', 'integration', 'contract', 'bdd-example', 'e2e'];
|
|
5
|
+
export function readProjectValidationCommands(storyId, sources) {
|
|
6
|
+
const byKind = new Map();
|
|
7
|
+
const preparation = [];
|
|
8
|
+
let preparationOwner;
|
|
9
|
+
let declared = false, invalid = false;
|
|
10
|
+
const safeCommand = (command) => /^[A-Za-z0-9_./-]+(?: [A-Za-z0-9_./:@%+=,-]+)*$/.test(command)
|
|
11
|
+
&& !/(?:token|password|license_key|secret|credential)=|(?:https?|ssh):\/\/|@[^ /]+\.[A-Za-z]/i.test(command)
|
|
12
|
+
&& !command.split(' ').some(arg => arg.split('/').includes('..'));
|
|
13
|
+
const allowedPaths = new Set(['story', 'spec', 'tasks'].map(suffix => `docs/stories/${storyId}.${suffix}.md`));
|
|
14
|
+
if (sources.length > 3 || new Set(sources.map(source => source.path)).size !== sources.length) {
|
|
15
|
+
return { declared: true, invalid: true, preparation, commands: [] };
|
|
16
|
+
}
|
|
17
|
+
for (const source of sources) {
|
|
18
|
+
if (!allowedPaths.has(source.path) || Buffer.byteLength(source.content) > 131072) {
|
|
19
|
+
invalid = true;
|
|
20
|
+
declared = true;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
let active, fenced = false, headings = 0, entries = 0;
|
|
24
|
+
for (const raw of source.content.split(/\r?\n/)) {
|
|
25
|
+
const line = raw.trim();
|
|
26
|
+
if (/^(?:```|~~~)/.test(line)) {
|
|
27
|
+
fenced = !fenced;
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (fenced)
|
|
31
|
+
continue;
|
|
32
|
+
if (/^##\s+/.test(line)) {
|
|
33
|
+
if (active && entries === 0)
|
|
34
|
+
invalid = true;
|
|
35
|
+
active = line === '## Validation Commands' ? 'commands'
|
|
36
|
+
: line === '## Validation Preparation' ? 'preparation' : undefined;
|
|
37
|
+
if (active) {
|
|
38
|
+
declared = true;
|
|
39
|
+
entries = 0;
|
|
40
|
+
if (active === 'commands') {
|
|
41
|
+
headings++;
|
|
42
|
+
if (headings > 1)
|
|
43
|
+
invalid = true;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (preparationOwner !== undefined)
|
|
47
|
+
invalid = true;
|
|
48
|
+
preparationOwner = source.path;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (!active || !line)
|
|
54
|
+
continue;
|
|
55
|
+
if (active === 'preparation') {
|
|
56
|
+
const match = /^- prepare: `([^`]{1,220})`$/.exec(line);
|
|
57
|
+
if (!match || !safeCommand(match[1]) || preparation.length >= 8
|
|
58
|
+
|| preparation.some(item => item.command === match[1])) {
|
|
59
|
+
invalid = true;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
entries++;
|
|
63
|
+
preparation.push({ command: match[1], sourcePath: source.path });
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const match = /^- (unit|integration|contract|bdd-example|e2e): `([^`]{1,220})`$/.exec(line);
|
|
67
|
+
if (!match) {
|
|
68
|
+
invalid = true;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const kind = match[1], command = match[2];
|
|
72
|
+
// No shell language, quoted substitutions, inline secrets or private URLs.
|
|
73
|
+
// A command stays a literal argv-shaped string throughout this planner.
|
|
74
|
+
if (!safeCommand(command)) {
|
|
75
|
+
invalid = true;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
entries++;
|
|
79
|
+
const prior = byKind.get(kind);
|
|
80
|
+
if (prior && prior.command !== command) {
|
|
81
|
+
invalid = true;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (prior?.sourcePaths.includes(source.path)) {
|
|
85
|
+
invalid = true;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
byKind.set(kind, { kind, command, sourcePaths: [...(prior?.sourcePaths ?? []), source.path] });
|
|
89
|
+
}
|
|
90
|
+
if (active && entries === 0)
|
|
91
|
+
invalid = true;
|
|
92
|
+
}
|
|
93
|
+
if (declared && !byKind.has('unit'))
|
|
94
|
+
invalid = true;
|
|
95
|
+
return { declared, invalid, preparation, commands: [...byKind.values()] };
|
|
96
|
+
}
|
|
@@ -42,3 +42,38 @@ export function assertYoloChangeEvidenceV1(value, expectedHeadSha) {
|
|
|
42
42
|
|| record.pathsSha256 !== digest(record.changedPaths))
|
|
43
43
|
fail();
|
|
44
44
|
}
|
|
45
|
+
/** Select a lossless transport; never truncate, filter or relabel v1 evidence. */
|
|
46
|
+
export function createYoloChangeEvidence(input) {
|
|
47
|
+
if (!Array.isArray(input.changedPaths))
|
|
48
|
+
fail();
|
|
49
|
+
const paths = [...new Set(input.changedPaths)].sort();
|
|
50
|
+
if (paths.length <= 256)
|
|
51
|
+
return createYoloChangeEvidenceV1(input);
|
|
52
|
+
const evidence = {
|
|
53
|
+
schemaVersion: 2, source: 'git-diff-base-and-worktree',
|
|
54
|
+
baseSha: input.baseSha, headSha: input.headSha, changedPaths: paths,
|
|
55
|
+
pathsSha256: digest(paths), encodedPathsBytes: Buffer.byteLength(JSON.stringify(paths), 'utf8'),
|
|
56
|
+
};
|
|
57
|
+
assertYoloChangeEvidence(evidence, input.headSha);
|
|
58
|
+
return evidence;
|
|
59
|
+
}
|
|
60
|
+
export function assertYoloChangeEvidence(value, expectedHeadSha) {
|
|
61
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
62
|
+
fail();
|
|
63
|
+
const record = value;
|
|
64
|
+
if (record.schemaVersion === 1)
|
|
65
|
+
return assertYoloChangeEvidenceV1(value, expectedHeadSha);
|
|
66
|
+
const expected = ['schemaVersion', 'source', 'baseSha', 'headSha', 'changedPaths', 'pathsSha256', 'encodedPathsBytes'].sort();
|
|
67
|
+
const keys = Object.keys(record).sort();
|
|
68
|
+
if (keys.length !== expected.length || keys.some((key, index) => key !== expected[index])
|
|
69
|
+
|| record.schemaVersion !== 2 || record.source !== 'git-diff-base-and-worktree'
|
|
70
|
+
|| typeof record.baseSha !== 'string' || !SHA.test(record.baseSha)
|
|
71
|
+
|| record.headSha !== expectedHeadSha || typeof record.headSha !== 'string' || !SHA.test(record.headSha)
|
|
72
|
+
|| !Array.isArray(record.changedPaths) || record.changedPaths.length <= 256 || record.changedPaths.length > 512
|
|
73
|
+
|| record.changedPaths.some(path => !validPath(path))
|
|
74
|
+
|| JSON.stringify([...new Set(record.changedPaths)].sort()) !== JSON.stringify(record.changedPaths)
|
|
75
|
+
|| record.pathsSha256 !== digest(record.changedPaths)
|
|
76
|
+
|| record.encodedPathsBytes !== Buffer.byteLength(JSON.stringify(record.changedPaths), 'utf8')
|
|
77
|
+
|| !Number.isSafeInteger(record.encodedPathsBytes) || Number(record.encodedPathsBytes) > 16_384)
|
|
78
|
+
fail();
|
|
79
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canonicalRootMemoryEffectJson, isRootProjectMemoryEffect } from './root-memory-effect.js';
|
|
1
2
|
/**
|
|
2
3
|
* Public, deterministic branch-unit contract for epic-owned YOLO/YOLOOP runs.
|
|
3
4
|
* Pure data/functions only: callers own Git and filesystem effects.
|
|
@@ -72,7 +73,10 @@ export function reconcileStoryCheckpoint(current, requested) {
|
|
|
72
73
|
current.claimRevision === requested.claimRevision &&
|
|
73
74
|
sameEvidenceReceipt(current.qaReceipt, requested.qaReceipt) &&
|
|
74
75
|
sameEvidenceReceipt(current.reviewReceipt, requested.reviewReceipt) &&
|
|
75
|
-
JSON.stringify(current.reviewReconciliation ?? null) === JSON.stringify(requested.reviewReconciliation ?? null)
|
|
76
|
+
JSON.stringify(current.reviewReconciliation ?? null) === JSON.stringify(requested.reviewReconciliation ?? null) &&
|
|
77
|
+
(current.rootMemoryEffect === undefined && requested.rootMemoryEffect === undefined
|
|
78
|
+
|| current.rootMemoryEffect !== undefined && requested.rootMemoryEffect !== undefined
|
|
79
|
+
&& canonicalRootMemoryEffectJson(current.rootMemoryEffect) === canonicalRootMemoryEffectJson(requested.rootMemoryEffect)))
|
|
76
80
|
return { kind: 'reused', checkpoint: current };
|
|
77
81
|
return { kind: 'blocked', reasonCode: 'checkpoint-idempotency-conflict' };
|
|
78
82
|
}
|
|
@@ -147,6 +151,11 @@ export function validateStoryCheckpoint(checkpoint, resolution) {
|
|
|
147
151
|
errors.push('checkpoint-claim-revision-required');
|
|
148
152
|
else if (!isHash(checkpoint.claimRevision))
|
|
149
153
|
errors.push('checkpoint-claim-revision-invalid');
|
|
154
|
+
if (checkpoint.rootMemoryEffect !== undefined && (!isRootProjectMemoryEffect(checkpoint.rootMemoryEffect)
|
|
155
|
+
|| checkpoint.rootMemoryEffect.storyId !== checkpoint.storyId || checkpoint.rootMemoryEffect.executionBranch !== checkpoint.branch
|
|
156
|
+
|| checkpoint.rootMemoryEffect.sourceHeadSha !== checkpoint.baseSha || checkpoint.rootMemoryEffect.childClaimRevision !== checkpoint.claimRevision)) {
|
|
157
|
+
errors.push('checkpoint-root-memory-effect-invalid');
|
|
158
|
+
}
|
|
150
159
|
if (!Array.isArray(checkpoint.receiptRefs) || checkpoint.receiptRefs.length === 0 || checkpoint.receiptRefs.some((ref) => !nonEmpty(ref))) {
|
|
151
160
|
errors.push('checkpoint-receipts-missing');
|
|
152
161
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { listProjectMemoryTargets } from '../project-memory-targets.js';
|
|
2
|
+
/** Stable identity across schema-preserving JSON serializers. Array order stays explicit. */
|
|
3
|
+
export function canonicalRootMemoryEffectJson(effect) {
|
|
4
|
+
const ordered = (value) => Array.isArray(value) ? value.map(ordered)
|
|
5
|
+
: value !== null && typeof value === 'object'
|
|
6
|
+
? Object.fromEntries(Object.keys(value).sort().map(key => [key, ordered(value[key])]))
|
|
7
|
+
: value;
|
|
8
|
+
return JSON.stringify(ordered(effect));
|
|
9
|
+
}
|
|
10
|
+
export function rootProjectMemoryPaths() {
|
|
11
|
+
return [...new Set(['NEOCORTEX.md', ...listProjectMemoryTargets().flatMap(target => [target.primaryFile,
|
|
12
|
+
...target.secondaryFiles.filter(file => file.scope === 'project').map(file => file.path)])])].sort();
|
|
13
|
+
}
|
|
14
|
+
export function isRootProjectMemoryEffect(value) {
|
|
15
|
+
const record = (v) => v !== null && typeof v === 'object' && !Array.isArray(v) ? v : undefined;
|
|
16
|
+
const r = record(value);
|
|
17
|
+
const keys = ['schemaVersion', 'producer', 'storyId', 'epicId', 'executionBranch', 'sourceHeadSha',
|
|
18
|
+
'sourceSnapshotSha', 'memorySnapshotSha', 'graphRevision', 'childClaimRevision', 'setupSessionId',
|
|
19
|
+
'rootQaReceiptId', 'proposalSha256', 'canonicalSha256', 'projectionSha256', 'projectionFileCount', 'files', 'recordedAt', 'publicSafe'];
|
|
20
|
+
if (!r || Object.keys(r).sort().join('|') !== keys.sort().join('|')
|
|
21
|
+
|| r.schemaVersion !== 'RootProjectMemoryEffect/1' || r.producer !== 'root-project-memory' || r.publicSafe !== true
|
|
22
|
+
|| typeof r.storyId !== 'string' || !/^P[1-9][0-9]*\.[0-9]+$/.test(r.storyId) || r.epicId !== r.storyId.split('.')[0]
|
|
23
|
+
|| r.executionBranch !== `epic/${r.epicId}`
|
|
24
|
+
|| ['sourceHeadSha', 'sourceSnapshotSha', 'memorySnapshotSha'].some(key => typeof r[key] !== 'string' || !/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(r[key]))
|
|
25
|
+
|| ['graphRevision', 'childClaimRevision', 'rootQaReceiptId', 'proposalSha256', 'canonicalSha256', 'projectionSha256'].some(key => typeof r[key] !== 'string' || !/^[a-f0-9]{64}$/.test(r[key]))
|
|
26
|
+
|| typeof r.setupSessionId !== 'string' || !/^setup-[a-f0-9]{64}$/.test(r.setupSessionId)
|
|
27
|
+
|| typeof r.recordedAt !== 'string' || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(r.recordedAt)
|
|
28
|
+
|| !Number.isFinite(Date.parse(r.recordedAt)) || new Date(r.recordedAt).toISOString() !== r.recordedAt
|
|
29
|
+
|| !Number.isSafeInteger(r.projectionFileCount) || r.projectionFileCount < 1 || r.projectionFileCount > 128
|
|
30
|
+
|| !Array.isArray(r.files) || r.files.length > 128)
|
|
31
|
+
return false;
|
|
32
|
+
const allowed = new Set(rootProjectMemoryPaths()), seen = new Set();
|
|
33
|
+
const state = (v, path, after) => {
|
|
34
|
+
const s = record(v);
|
|
35
|
+
if (!s || !['absent', 'regular', 'symlink'].includes(String(s.kind))
|
|
36
|
+
|| Object.keys(s).sort().join('|') !== ['kind', 'sha256', ...(s.kind === 'symlink' ? ['linkTarget'] : [])].sort().join('|'))
|
|
37
|
+
return false;
|
|
38
|
+
if (s.kind === 'absent')
|
|
39
|
+
return !after && s.sha256 === null;
|
|
40
|
+
if (typeof s.sha256 !== 'string' || !/^[a-f0-9]{64}$/.test(s.sha256))
|
|
41
|
+
return false;
|
|
42
|
+
if (path === 'NEOCORTEX.md' && s.kind !== 'regular')
|
|
43
|
+
return false;
|
|
44
|
+
const canonicalTarget = '../'.repeat(path.split('/').length - 1) + 'NEOCORTEX.md';
|
|
45
|
+
return s.kind !== 'symlink' || typeof s.linkTarget === 'string' && s.linkTarget.length <= 1024
|
|
46
|
+
&& (after ? s.linkTarget === canonicalTarget
|
|
47
|
+
: s.linkTarget.split('/').filter(part => part !== '.').join('/') === canonicalTarget);
|
|
48
|
+
};
|
|
49
|
+
return r.files.every(value => {
|
|
50
|
+
const file = record(value);
|
|
51
|
+
if (!file || Object.keys(file).sort().join('|') !== 'after|before|path' || typeof file.path !== 'string'
|
|
52
|
+
|| !allowed.has(file.path) || seen.has(file.path) || !state(file.before, file.path, false) || !state(file.after, file.path, true))
|
|
53
|
+
return false;
|
|
54
|
+
seen.add(file.path);
|
|
55
|
+
return true;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.60.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.60.64 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
tools:
|
|
@@ -108,7 +108,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
108
108
|
┌────────────────────────────────────────────────────────────┐
|
|
109
109
|
│ │
|
|
110
110
|
│ ####### N E O C O R T E X │
|
|
111
|
-
│ ### ######## v4.60.
|
|
111
|
+
│ ### ######## v4.60.64 │
|
|
112
112
|
│ ######### ##### │
|
|
113
113
|
│ ## ############## Development Orchestrator │
|
|
114
114
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.60.
|
|
3
|
+
description: "🧠 Neocortex v4.60.64 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
permissionMode: bypassPermissions
|
|
@@ -104,7 +104,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
104
104
|
┌────────────────────────────────────────────────────────────┐
|
|
105
105
|
│ │
|
|
106
106
|
│ ####### N E O C O R T E X │
|
|
107
|
-
│ ### ######## v4.60.
|
|
107
|
+
│ ### ######## v4.60.64 │
|
|
108
108
|
│ ######### ##### │
|
|
109
109
|
│ ## ############## Development Orchestrator │
|
|
110
110
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -28,7 +28,7 @@ Codex built-in commands or actions.
|
|
|
28
28
|
|
|
29
29
|
<!-- END: Plugin Conflict Prevention -->
|
|
30
30
|
|
|
31
|
-
# Neocortex v4.60.
|
|
31
|
+
# Neocortex v4.60.64 | OrNexus Team
|
|
32
32
|
|
|
33
33
|
You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
|
|
34
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.60.
|
|
3
|
+
description: "🧠 Neocortex v4.60.64 | OrNexus Team"
|
|
4
4
|
model: inherit
|
|
5
5
|
readonly: false
|
|
6
6
|
is_background: false
|
|
@@ -64,7 +64,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
64
64
|
┌────────────────────────────────────────────────────────────┐
|
|
65
65
|
│ │
|
|
66
66
|
│ ####### N E O C O R T E X │
|
|
67
|
-
│ ### ######## v4.60.
|
|
67
|
+
│ ### ######## v4.60.64 │
|
|
68
68
|
│ ######### ##### │
|
|
69
69
|
│ ## ############## Development Orchestrator │
|
|
70
70
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex v4.60.
|
|
3
|
+
description: "🧠 Neocortex v4.60.64 | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
# File operations (Gemini CLI built-ins)
|
|
@@ -62,7 +62,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
62
62
|
┌────────────────────────────────────────────────────────────┐
|
|
63
63
|
│ │
|
|
64
64
|
│ ####### N E O C O R T E X │
|
|
65
|
-
│ ### ######## v4.60.
|
|
65
|
+
│ ### ######## v4.60.64 │
|
|
66
66
|
│ ######### ##### │
|
|
67
67
|
│ ## ############## Development Orchestrator │
|
|
68
68
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -58,7 +58,7 @@ explicit server opt-in rather than a local assumption.
|
|
|
58
58
|
┌────────────────────────────────────────────────────────────┐
|
|
59
59
|
│ │
|
|
60
60
|
│ ####### N E O C O R T E X │
|
|
61
|
-
│ ### ######## v4.60.
|
|
61
|
+
│ ### ######## v4.60.64 │
|
|
62
62
|
│ ######### ##### │
|
|
63
63
|
│ ## ############## Development Orchestrator │
|
|
64
64
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "neocortex"
|
|
3
|
-
description: "Neocortex v4.60.
|
|
3
|
+
description: "Neocortex v4.60.64 | OrNexus Team"
|
|
4
4
|
tools:
|
|
5
5
|
# Read / Edit (built-in tool sets)
|
|
6
6
|
- read
|
|
@@ -68,7 +68,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
68
68
|
┌────────────────────────────────────────────────────────────┐
|
|
69
69
|
│ │
|
|
70
70
|
│ ####### N E O C O R T E X │
|
|
71
|
-
│ ### ######## v4.60.
|
|
71
|
+
│ ### ######## v4.60.64 │
|
|
72
72
|
│ ######### ##### │
|
|
73
73
|
│ ## ############## Development Orchestrator │
|
|
74
74
|
│ ## ### ###### ## OrNexus Team │
|