@ornexus/neocortex 4.66.45 → 4.66.46
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 +1194 -1194
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +2 -2
- package/packages/client/dist/cli.js +0 -0
- package/packages/client/dist/commands/invoke.d.ts +14 -1
- package/packages/client/dist/commands/invoke.js +90 -90
- package/packages/client/dist/runner-cli.js +0 -0
- package/packages/shared/dist/invocation/index.d.ts +1 -0
- package/packages/shared/dist/invocation/index.js +1 -0
- package/packages/shared/dist/invocation/semantic-gate-remediation.d.ts +90 -0
- package/packages/shared/dist/invocation/semantic-gate-remediation.js +249 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/neocortex.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-sentinel.md +1 -1
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +5 -3
- package/targets-stubs/codex/AGENTS.md +3 -1
- package/targets-stubs/codex/neocortex.toml +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/deepseek-harness/SKILL.md +1 -1
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/gemini-cli/agents/neocortex.md +2 -2
- package/targets-stubs/grok/SKILL.md +1 -1
- package/targets-stubs/kimi/neocortex.md +1 -1
- package/targets-stubs/openclaw/SKILL.md +1 -1
- package/targets-stubs/opencode/neocortex-root.md +2 -2
- package/targets-stubs/opencode/neocortex.md +4 -2
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
File without changes
|
|
@@ -8,6 +8,7 @@ export * from './recovery-route-compiler.js';
|
|
|
8
8
|
export * from './executable-policy-recovery.js';
|
|
9
9
|
export * from './explicit-intent-recovery.js';
|
|
10
10
|
export * from './diagnose-degraded-continuation.js';
|
|
11
|
+
export * from './semantic-gate-remediation.js';
|
|
11
12
|
export declare const EXACT_INVOCATION_POLICY: "p205-exact-invocation-v1";
|
|
12
13
|
export declare const INVOCATION_SCHEMA_VERSION: "p205-invocation-schema-v1";
|
|
13
14
|
export declare const INVOCATION_LIMITS: Readonly<{
|
|
@@ -20,6 +20,7 @@ export * from './recovery-route-compiler.js';
|
|
|
20
20
|
export * from './executable-policy-recovery.js';
|
|
21
21
|
export * from './explicit-intent-recovery.js';
|
|
22
22
|
export * from './diagnose-degraded-continuation.js';
|
|
23
|
+
export * from './semantic-gate-remediation.js';
|
|
23
24
|
export const EXACT_INVOCATION_POLICY = 'p205-exact-invocation-v1';
|
|
24
25
|
export const INVOCATION_SCHEMA_VERSION = 'p205-invocation-schema-v1';
|
|
25
26
|
export const INVOCATION_LIMITS = Object.freeze({
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const SEMANTIC_GATE_REMEDIATION_SCHEMA: "SemanticGateRemediation/1.0";
|
|
2
|
+
export declare const SEMANTIC_GATE_TEMPLATE_IDS: readonly ["gate-evidence-recollection-v1", "gate-deterministic-reconciliation-v1", "gate-single-resubmission-v1", "gate-manual-resolution-v1"];
|
|
3
|
+
export type SemanticGateTemplateId = typeof SEMANTIC_GATE_TEMPLATE_IDS[number];
|
|
4
|
+
export type SemanticGateRepairKind = 'recollect-authorized-evidence' | 'reconcile-deterministic-state' | 'resubmit-bound-request' | 'manual-resolution';
|
|
5
|
+
export type SemanticGateEvidenceSource = 'client-yoloop-state' | 'epic-operational-state' | 'original-request-envelope' | 'server-public-gate-metadata';
|
|
6
|
+
export type SemanticGatePlaceholder = 'LOCAL_YOLOOP_EVIDENCE' | 'LOCAL_YOLOOP_POSTIMAGE' | 'ORIGINAL_REQUEST_BINDING';
|
|
7
|
+
export interface SemanticGateBindingV1 {
|
|
8
|
+
readonly requestSha256: string | null;
|
|
9
|
+
readonly sessionId: string | null;
|
|
10
|
+
readonly graphRevision: string | null;
|
|
11
|
+
readonly requestBindingSha256: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SemanticGateRequiredEvidenceV1 {
|
|
14
|
+
readonly source: SemanticGateEvidenceSource;
|
|
15
|
+
readonly freshness: 'current-response' | 'post-repair';
|
|
16
|
+
readonly required: true;
|
|
17
|
+
}
|
|
18
|
+
export interface SemanticGateBoilerplatePlaceholderV1 {
|
|
19
|
+
readonly name: SemanticGatePlaceholder;
|
|
20
|
+
readonly source: SemanticGateEvidenceSource;
|
|
21
|
+
readonly field: 'stateSnapshot.yoloop' | 'request.binding';
|
|
22
|
+
}
|
|
23
|
+
export interface SemanticGateBoilerplateV1 {
|
|
24
|
+
readonly templateId: SemanticGateTemplateId;
|
|
25
|
+
readonly templateVersion: 1;
|
|
26
|
+
readonly placeholders: readonly SemanticGateBoilerplatePlaceholderV1[];
|
|
27
|
+
readonly requestFragment: {
|
|
28
|
+
readonly kind: 'field-replacement' | 'binding-only' | 'inspection-only';
|
|
29
|
+
readonly fields: readonly {
|
|
30
|
+
readonly field: 'stateSnapshot.yoloop' | 'request.binding';
|
|
31
|
+
readonly value: '${LOCAL_YOLOOP_EVIDENCE}' | '${LOCAL_YOLOOP_POSTIMAGE}' | '${ORIGINAL_REQUEST_BINDING}';
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
readonly unchangedFields: readonly ('args' | 'inputEvidence.sha256' | 'registryVersion' | 'registryChecksum' | 'projectId' | 'scope.targetEpicId')[];
|
|
35
|
+
readonly templateDigest: string;
|
|
36
|
+
}
|
|
37
|
+
export interface SemanticGateRemediationV1 {
|
|
38
|
+
readonly schemaVersion: typeof SEMANTIC_GATE_REMEDIATION_SCHEMA;
|
|
39
|
+
readonly reasonCode: string;
|
|
40
|
+
readonly repairKind: SemanticGateRepairKind;
|
|
41
|
+
readonly nextAction: 'collect-and-resubmit' | 'reconcile-and-resubmit' | 'resubmit-once' | 'report-and-stop';
|
|
42
|
+
readonly requiredEvidence: readonly SemanticGateRequiredEvidenceV1[];
|
|
43
|
+
readonly authority: {
|
|
44
|
+
readonly owner: 'client' | 'root-agent';
|
|
45
|
+
readonly operation: 'recollect-local-evidence' | 'cas-reconcile-yoloop-session' | 'resubmit-bound-request' | 'inspect-public-gate';
|
|
46
|
+
readonly effect: 'read-only' | 'local-state-cas' | 'network' | 'none';
|
|
47
|
+
};
|
|
48
|
+
readonly retry: {
|
|
49
|
+
readonly limit: 0 | 1;
|
|
50
|
+
readonly attempt: 0;
|
|
51
|
+
readonly policy: 'none' | 'single-bound-resubmit';
|
|
52
|
+
};
|
|
53
|
+
readonly binding: SemanticGateBindingV1;
|
|
54
|
+
readonly boilerplate: SemanticGateBoilerplateV1;
|
|
55
|
+
readonly contractDigest: string;
|
|
56
|
+
readonly publicSafe: true;
|
|
57
|
+
}
|
|
58
|
+
export interface BuildSemanticGateRemediationInputV1 {
|
|
59
|
+
readonly templateId: SemanticGateTemplateId;
|
|
60
|
+
readonly reasonCode: string;
|
|
61
|
+
readonly requestSha256?: string | null;
|
|
62
|
+
readonly sessionId?: string | null;
|
|
63
|
+
readonly graphRevision?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export interface SemanticGateRequestBindingInputV1 {
|
|
66
|
+
readonly requestSha256: string;
|
|
67
|
+
readonly sessionId: string;
|
|
68
|
+
readonly graphRevision: string;
|
|
69
|
+
}
|
|
70
|
+
export interface SemanticGateCollectedEvidenceV1 {
|
|
71
|
+
readonly source: SemanticGateEvidenceSource;
|
|
72
|
+
readonly requestBindingSha256: string;
|
|
73
|
+
readonly value: unknown;
|
|
74
|
+
}
|
|
75
|
+
export interface SemanticGateMaterializedFieldV1 {
|
|
76
|
+
readonly field: 'stateSnapshot.yoloop' | 'request.binding';
|
|
77
|
+
readonly source: SemanticGateEvidenceSource;
|
|
78
|
+
readonly value: unknown;
|
|
79
|
+
}
|
|
80
|
+
export declare function buildSemanticGateRemediation(input: BuildSemanticGateRemediationInputV1): SemanticGateRemediationV1;
|
|
81
|
+
export declare function parseSemanticGateRemediation(value: unknown): SemanticGateRemediationV1 | null;
|
|
82
|
+
export declare function assertSemanticGateRemediation(value: unknown): asserts value is SemanticGateRemediationV1;
|
|
83
|
+
export declare function validateSemanticGateRemediationBinding(remediation: unknown, expected: SemanticGateRequestBindingInputV1): SemanticGateRemediationV1 | null;
|
|
84
|
+
export declare function materializeSemanticGateBoilerplate(remediation: unknown, collected: readonly SemanticGateCollectedEvidenceV1[]): readonly SemanticGateMaterializedFieldV1[] | null;
|
|
85
|
+
export declare function semanticGateRequestSha256(args: string): string;
|
|
86
|
+
/**
|
|
87
|
+
* Bind a private planning retry to one durable epic claim without exposing the
|
|
88
|
+
* claim identifier as the public semantic session authority.
|
|
89
|
+
*/
|
|
90
|
+
export declare function semanticGatePrivateClaimSessionId(claimId: string): string;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { canonicalizeCommandRegistryJcs } from '../command-registry-contract.js';
|
|
3
|
+
export const SEMANTIC_GATE_REMEDIATION_SCHEMA = 'SemanticGateRemediation/1.0';
|
|
4
|
+
export const SEMANTIC_GATE_TEMPLATE_IDS = Object.freeze([
|
|
5
|
+
'gate-evidence-recollection-v1',
|
|
6
|
+
'gate-deterministic-reconciliation-v1',
|
|
7
|
+
'gate-single-resubmission-v1',
|
|
8
|
+
'gate-manual-resolution-v1',
|
|
9
|
+
]);
|
|
10
|
+
const HASH = /^[a-f0-9]{64}$/;
|
|
11
|
+
const SAFE_REASON = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
12
|
+
const UNCHANGED_FIELDS = Object.freeze([
|
|
13
|
+
'args',
|
|
14
|
+
'inputEvidence.sha256',
|
|
15
|
+
'projectId',
|
|
16
|
+
'registryChecksum',
|
|
17
|
+
'registryVersion',
|
|
18
|
+
'scope.targetEpicId',
|
|
19
|
+
]);
|
|
20
|
+
const DEFINITIONS = Object.freeze({
|
|
21
|
+
'gate-evidence-recollection-v1': Object.freeze({
|
|
22
|
+
repairKind: 'recollect-authorized-evidence',
|
|
23
|
+
nextAction: 'collect-and-resubmit',
|
|
24
|
+
requiredEvidence: Object.freeze([
|
|
25
|
+
Object.freeze({ source: 'client-yoloop-state', freshness: 'current-response', required: true }),
|
|
26
|
+
]),
|
|
27
|
+
authority: Object.freeze({ owner: 'client', operation: 'recollect-local-evidence', effect: 'read-only' }),
|
|
28
|
+
retry: Object.freeze({ limit: 1, attempt: 0, policy: 'single-bound-resubmit' }),
|
|
29
|
+
boilerplate: Object.freeze({
|
|
30
|
+
templateId: 'gate-evidence-recollection-v1', templateVersion: 1,
|
|
31
|
+
placeholders: Object.freeze([
|
|
32
|
+
Object.freeze({ name: 'LOCAL_YOLOOP_EVIDENCE', source: 'client-yoloop-state', field: 'stateSnapshot.yoloop' }),
|
|
33
|
+
]),
|
|
34
|
+
requestFragment: Object.freeze({ kind: 'field-replacement', fields: Object.freeze([
|
|
35
|
+
Object.freeze({ field: 'stateSnapshot.yoloop', value: '${LOCAL_YOLOOP_EVIDENCE}' }),
|
|
36
|
+
]) }),
|
|
37
|
+
unchangedFields: UNCHANGED_FIELDS,
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
'gate-deterministic-reconciliation-v1': Object.freeze({
|
|
41
|
+
repairKind: 'reconcile-deterministic-state',
|
|
42
|
+
nextAction: 'reconcile-and-resubmit',
|
|
43
|
+
requiredEvidence: Object.freeze([
|
|
44
|
+
Object.freeze({ source: 'client-yoloop-state', freshness: 'current-response', required: true }),
|
|
45
|
+
Object.freeze({ source: 'epic-operational-state', freshness: 'post-repair', required: true }),
|
|
46
|
+
]),
|
|
47
|
+
authority: Object.freeze({ owner: 'client', operation: 'cas-reconcile-yoloop-session', effect: 'local-state-cas' }),
|
|
48
|
+
retry: Object.freeze({ limit: 1, attempt: 0, policy: 'single-bound-resubmit' }),
|
|
49
|
+
boilerplate: Object.freeze({
|
|
50
|
+
templateId: 'gate-deterministic-reconciliation-v1', templateVersion: 1,
|
|
51
|
+
placeholders: Object.freeze([
|
|
52
|
+
Object.freeze({ name: 'LOCAL_YOLOOP_POSTIMAGE', source: 'client-yoloop-state', field: 'stateSnapshot.yoloop' }),
|
|
53
|
+
]),
|
|
54
|
+
requestFragment: Object.freeze({ kind: 'field-replacement', fields: Object.freeze([
|
|
55
|
+
Object.freeze({ field: 'stateSnapshot.yoloop', value: '${LOCAL_YOLOOP_POSTIMAGE}' }),
|
|
56
|
+
]) }),
|
|
57
|
+
unchangedFields: UNCHANGED_FIELDS,
|
|
58
|
+
}),
|
|
59
|
+
}),
|
|
60
|
+
'gate-single-resubmission-v1': Object.freeze({
|
|
61
|
+
repairKind: 'resubmit-bound-request',
|
|
62
|
+
nextAction: 'resubmit-once',
|
|
63
|
+
requiredEvidence: Object.freeze([
|
|
64
|
+
Object.freeze({ source: 'original-request-envelope', freshness: 'current-response', required: true }),
|
|
65
|
+
]),
|
|
66
|
+
authority: Object.freeze({ owner: 'client', operation: 'resubmit-bound-request', effect: 'network' }),
|
|
67
|
+
retry: Object.freeze({ limit: 1, attempt: 0, policy: 'single-bound-resubmit' }),
|
|
68
|
+
boilerplate: Object.freeze({
|
|
69
|
+
templateId: 'gate-single-resubmission-v1', templateVersion: 1,
|
|
70
|
+
placeholders: Object.freeze([
|
|
71
|
+
Object.freeze({ name: 'ORIGINAL_REQUEST_BINDING', source: 'original-request-envelope', field: 'request.binding' }),
|
|
72
|
+
]),
|
|
73
|
+
requestFragment: Object.freeze({ kind: 'binding-only', fields: Object.freeze([
|
|
74
|
+
Object.freeze({ field: 'request.binding', value: '${ORIGINAL_REQUEST_BINDING}' }),
|
|
75
|
+
]) }),
|
|
76
|
+
unchangedFields: UNCHANGED_FIELDS,
|
|
77
|
+
}),
|
|
78
|
+
}),
|
|
79
|
+
'gate-manual-resolution-v1': Object.freeze({
|
|
80
|
+
repairKind: 'manual-resolution',
|
|
81
|
+
nextAction: 'report-and-stop',
|
|
82
|
+
requiredEvidence: Object.freeze([
|
|
83
|
+
Object.freeze({ source: 'server-public-gate-metadata', freshness: 'current-response', required: true }),
|
|
84
|
+
]),
|
|
85
|
+
authority: Object.freeze({ owner: 'root-agent', operation: 'inspect-public-gate', effect: 'none' }),
|
|
86
|
+
retry: Object.freeze({ limit: 0, attempt: 0, policy: 'none' }),
|
|
87
|
+
boilerplate: Object.freeze({
|
|
88
|
+
templateId: 'gate-manual-resolution-v1', templateVersion: 1,
|
|
89
|
+
placeholders: Object.freeze([]),
|
|
90
|
+
requestFragment: Object.freeze({ kind: 'inspection-only', fields: Object.freeze([]) }),
|
|
91
|
+
unchangedFields: UNCHANGED_FIELDS,
|
|
92
|
+
}),
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
function hash(domain, value) {
|
|
96
|
+
return createHash('sha256')
|
|
97
|
+
.update(`${domain}\0${canonicalizeCommandRegistryJcs(value)}`, 'utf8')
|
|
98
|
+
.digest('hex');
|
|
99
|
+
}
|
|
100
|
+
function exactKeys(value, keys) {
|
|
101
|
+
return Object.keys(value).sort().join('\0') === [...keys].sort().join('\0');
|
|
102
|
+
}
|
|
103
|
+
function isRecord(value) {
|
|
104
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
105
|
+
}
|
|
106
|
+
function normalizedNullableHash(value) {
|
|
107
|
+
if (value === null || value === undefined)
|
|
108
|
+
return null;
|
|
109
|
+
if (!HASH.test(value))
|
|
110
|
+
throw new Error('semantic-gate-binding-invalid');
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
function normalizedReasonCode(value) {
|
|
114
|
+
if (!SAFE_REASON.test(value))
|
|
115
|
+
throw new Error('semantic-gate-reason-invalid');
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
function binding(input) {
|
|
119
|
+
const requestSha256 = normalizedNullableHash(input.requestSha256);
|
|
120
|
+
const sessionId = normalizedNullableHash(input.sessionId);
|
|
121
|
+
const graphRevision = normalizedNullableHash(input.graphRevision);
|
|
122
|
+
return Object.freeze({
|
|
123
|
+
requestSha256,
|
|
124
|
+
sessionId,
|
|
125
|
+
graphRevision,
|
|
126
|
+
requestBindingSha256: hash('neocortex/semantic-gate/request-binding/v1', {
|
|
127
|
+
graphRevision, requestSha256, sessionId,
|
|
128
|
+
}),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export function buildSemanticGateRemediation(input) {
|
|
132
|
+
const definition = DEFINITIONS[input.templateId];
|
|
133
|
+
if (!definition)
|
|
134
|
+
throw new Error('semantic-gate-template-unknown');
|
|
135
|
+
const gateBinding = binding(input);
|
|
136
|
+
if (definition.retry.limit > 0
|
|
137
|
+
&& (!gateBinding.requestSha256 || !gateBinding.sessionId || !gateBinding.graphRevision)) {
|
|
138
|
+
throw new Error('semantic-gate-executable-binding-incomplete');
|
|
139
|
+
}
|
|
140
|
+
const templateDigest = hash('neocortex/semantic-gate/boilerplate/v1', definition.boilerplate);
|
|
141
|
+
const boilerplate = Object.freeze({ ...definition.boilerplate, templateDigest });
|
|
142
|
+
const body = Object.freeze({
|
|
143
|
+
schemaVersion: SEMANTIC_GATE_REMEDIATION_SCHEMA,
|
|
144
|
+
reasonCode: normalizedReasonCode(input.reasonCode),
|
|
145
|
+
repairKind: definition.repairKind,
|
|
146
|
+
nextAction: definition.nextAction,
|
|
147
|
+
requiredEvidence: definition.requiredEvidence,
|
|
148
|
+
authority: definition.authority,
|
|
149
|
+
retry: definition.retry,
|
|
150
|
+
binding: gateBinding,
|
|
151
|
+
boilerplate,
|
|
152
|
+
publicSafe: true,
|
|
153
|
+
});
|
|
154
|
+
return Object.freeze({
|
|
155
|
+
...body,
|
|
156
|
+
contractDigest: hash('neocortex/semantic-gate/remediation/v1', body),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
export function parseSemanticGateRemediation(value) {
|
|
160
|
+
if (!isRecord(value) || !exactKeys(value, [
|
|
161
|
+
'authority', 'binding', 'boilerplate', 'contractDigest', 'nextAction', 'publicSafe',
|
|
162
|
+
'reasonCode', 'repairKind', 'requiredEvidence', 'retry', 'schemaVersion',
|
|
163
|
+
]))
|
|
164
|
+
return null;
|
|
165
|
+
const boilerplate = value.boilerplate;
|
|
166
|
+
const bindingValue = value.binding;
|
|
167
|
+
if (!isRecord(boilerplate) || !isRecord(bindingValue)
|
|
168
|
+
|| typeof boilerplate.templateId !== 'string'
|
|
169
|
+
|| !SEMANTIC_GATE_TEMPLATE_IDS.includes(boilerplate.templateId)
|
|
170
|
+
|| typeof value.reasonCode !== 'string')
|
|
171
|
+
return null;
|
|
172
|
+
try {
|
|
173
|
+
const rebuilt = buildSemanticGateRemediation({
|
|
174
|
+
templateId: boilerplate.templateId,
|
|
175
|
+
reasonCode: value.reasonCode,
|
|
176
|
+
requestSha256: typeof bindingValue.requestSha256 === 'string' ? bindingValue.requestSha256 : null,
|
|
177
|
+
sessionId: typeof bindingValue.sessionId === 'string' ? bindingValue.sessionId : null,
|
|
178
|
+
graphRevision: typeof bindingValue.graphRevision === 'string' ? bindingValue.graphRevision : null,
|
|
179
|
+
});
|
|
180
|
+
return canonicalizeCommandRegistryJcs(rebuilt) === canonicalizeCommandRegistryJcs(value)
|
|
181
|
+
? rebuilt : null;
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
export function assertSemanticGateRemediation(value) {
|
|
188
|
+
if (!parseSemanticGateRemediation(value))
|
|
189
|
+
throw new Error('semantic-gate-remediation-invalid');
|
|
190
|
+
}
|
|
191
|
+
export function validateSemanticGateRemediationBinding(remediation, expected) {
|
|
192
|
+
const parsed = parseSemanticGateRemediation(remediation);
|
|
193
|
+
if (!parsed || !HASH.test(expected.requestSha256) || !HASH.test(expected.sessionId)
|
|
194
|
+
|| !HASH.test(expected.graphRevision))
|
|
195
|
+
return null;
|
|
196
|
+
return parsed.binding.requestSha256 === expected.requestSha256
|
|
197
|
+
&& parsed.binding.sessionId === expected.sessionId
|
|
198
|
+
&& parsed.binding.graphRevision === expected.graphRevision
|
|
199
|
+
? parsed : null;
|
|
200
|
+
}
|
|
201
|
+
function validCollectedValue(source, value) {
|
|
202
|
+
if (source === 'original-request-envelope')
|
|
203
|
+
return typeof value === 'string' && HASH.test(value);
|
|
204
|
+
if (source === 'client-yoloop-state')
|
|
205
|
+
return isRecord(value)
|
|
206
|
+
&& Object.hasOwn(value, 'lock')
|
|
207
|
+
&& isRecord(value.state)
|
|
208
|
+
&& Object.keys(value).every((key) => [
|
|
209
|
+
'capabilities', 'continuationRecoveryEvidence', 'lock', 'state',
|
|
210
|
+
].includes(key));
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
export function materializeSemanticGateBoilerplate(remediation, collected) {
|
|
214
|
+
const parsed = parseSemanticGateRemediation(remediation);
|
|
215
|
+
if (!parsed || parsed.retry.limit !== 1 || parsed.boilerplate.placeholders.length !== collected.length)
|
|
216
|
+
return null;
|
|
217
|
+
const bySource = new Map();
|
|
218
|
+
for (const item of collected) {
|
|
219
|
+
if (!exactKeys(item, ['requestBindingSha256', 'source', 'value'])
|
|
220
|
+
|| item.requestBindingSha256 !== parsed.binding.requestBindingSha256
|
|
221
|
+
|| bySource.has(item.source)
|
|
222
|
+
|| !validCollectedValue(item.source, item.value))
|
|
223
|
+
return null;
|
|
224
|
+
bySource.set(item.source, item);
|
|
225
|
+
}
|
|
226
|
+
const materialized = [];
|
|
227
|
+
for (const placeholder of parsed.boilerplate.placeholders) {
|
|
228
|
+
const evidence = bySource.get(placeholder.source);
|
|
229
|
+
if (!evidence)
|
|
230
|
+
return null;
|
|
231
|
+
materialized.push(Object.freeze({ field: placeholder.field, source: placeholder.source, value: evidence.value }));
|
|
232
|
+
}
|
|
233
|
+
return Object.freeze(materialized);
|
|
234
|
+
}
|
|
235
|
+
export function semanticGateRequestSha256(args) {
|
|
236
|
+
return createHash('sha256').update(args, 'utf8').digest('hex');
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Bind a private planning retry to one durable epic claim without exposing the
|
|
240
|
+
* claim identifier as the public semantic session authority.
|
|
241
|
+
*/
|
|
242
|
+
export function semanticGatePrivateClaimSessionId(claimId) {
|
|
243
|
+
if (!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(claimId)) {
|
|
244
|
+
throw new Error('semantic-gate-private-claim-invalid');
|
|
245
|
+
}
|
|
246
|
+
return createHash('sha256')
|
|
247
|
+
.update(`neocortex/semantic-gate/private-claim-session/v1\0${claimId}`, 'utf8')
|
|
248
|
+
.digest('hex');
|
|
249
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team — Development orchestrator candidate (native-needs-validation)."
|
|
4
4
|
status: native-needs-validation
|
|
5
5
|
source: https://antigravity.google/docs/subagents
|
|
6
6
|
tools:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.66.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.66.46 | OrNexus Team"
|
|
4
4
|
color: blue
|
|
5
5
|
tools:
|
|
6
6
|
# File operations
|
|
@@ -112,7 +112,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
112
112
|
┌────────────────────────────────────────────────────────────┐
|
|
113
113
|
│ │
|
|
114
114
|
│ ####### N E O C O R T E X │
|
|
115
|
-
│ ### ######## v4.66.
|
|
115
|
+
│ ### ######## v4.66.46 │
|
|
116
116
|
│ ######### ##### │
|
|
117
117
|
│ ## ############## Development Orchestrator │
|
|
118
118
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -101,7 +101,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
101
101
|
┌────────────────────────────────────────────────────────────┐
|
|
102
102
|
│ │
|
|
103
103
|
│ ####### N E O C O R T E X │
|
|
104
|
-
│ ### ######## v4.66.
|
|
104
|
+
│ ### ######## v4.66.46 │
|
|
105
105
|
│ ######### ##### │
|
|
106
106
|
│ ## ############## Development Orchestrator │
|
|
107
107
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team"
|
|
4
4
|
color: blue
|
|
5
5
|
permissionMode: bypassPermissions
|
|
6
6
|
tools:
|
|
@@ -19,7 +19,7 @@ tools:
|
|
|
19
19
|
# Skills
|
|
20
20
|
- Skill # inclui /loop bundled skill (P95.09) -- wrappers loop-ci-watch/loop-deploy-health/loop-flaky-retry invocam Skill('loop') sem permission block
|
|
21
21
|
|
|
22
|
-
# Web
|
|
22
|
+
# Web
|
|
23
23
|
- WebSearch
|
|
24
24
|
- WebFetch
|
|
25
25
|
|
|
@@ -112,7 +112,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
112
112
|
┌────────────────────────────────────────────────────────────┐
|
|
113
113
|
│ │
|
|
114
114
|
│ ####### N E O C O R T E X │
|
|
115
|
-
│ ### ######## v4.66.
|
|
115
|
+
│ ### ######## v4.66.46 │
|
|
116
116
|
│ ######### ##### │
|
|
117
117
|
│ ## ############## Development Orchestrator │
|
|
118
118
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -168,6 +168,8 @@ neocortex-client invoke \
|
|
|
168
168
|
3. **Seguir EXATAMENTE as instrucoes retornadas** pelo thin client no stdout
|
|
169
169
|
4. Se `invoke` recusar com `private-execution-client-required` e
|
|
170
170
|
`next_action: retry-with-private-execution-beta`, repita uma vez com `--private-execution-beta`.
|
|
171
|
+
5. Em `create-epic` privado com `reinvoke-same-command` e claim persistida,
|
|
172
|
+
repita uma vez o payload/flags identicos; nunca selecione outro epico.
|
|
171
173
|
|
|
172
174
|
## Degraded diagnose continuation
|
|
173
175
|
|
|
@@ -28,7 +28,7 @@ returned instructions.
|
|
|
28
28
|
|
|
29
29
|
<!-- END: Plugin Conflict Prevention -->
|
|
30
30
|
|
|
31
|
-
# Neocortex v4.66.
|
|
31
|
+
# Neocortex v4.66.46 | OrNexus Team
|
|
32
32
|
|
|
33
33
|
You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
|
|
34
34
|
|
|
@@ -75,6 +75,8 @@ neocortex-client invoke \
|
|
|
75
75
|
3. **Follow EXACTLY the instructions returned** by the thin client on stdout
|
|
76
76
|
4. If `invoke` returns `private-execution-client-required` and
|
|
77
77
|
`next_action: retry-with-private-execution-beta`, rerun once with `--private-execution-beta`.
|
|
78
|
+
5. On private `create-epic` `reinvoke-same-command` with persisted claim recovery,
|
|
79
|
+
rerun the identical payload/flags once; never select a new epic.
|
|
78
80
|
|
|
79
81
|
## Degraded diagnose continuation
|
|
80
82
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Codex custom agent reference:
|
|
2
2
|
# https://developers.openai.com/codex/subagents
|
|
3
3
|
name = "neocortex"
|
|
4
|
-
description = "🧠 Neocortex v4.66.
|
|
4
|
+
description = "🧠 Neocortex v4.66.46 | OrNexus Team — Development orchestrator for direct @neocortex requests."
|
|
5
5
|
# [P201-EV-CODEX-GEMINI] Approval and sandbox keys are intentionally omitted.
|
|
6
6
|
# Codex reapplies the parent turn's live sandbox/approval settings, including
|
|
7
7
|
# --yolo, when spawning this profile. This profile must not claim child-only max.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team"
|
|
4
4
|
model: inherit
|
|
5
5
|
readonly: false
|
|
6
6
|
is_background: false
|
|
@@ -115,7 +115,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
115
115
|
┌────────────────────────────────────────────────────────────┐
|
|
116
116
|
│ │
|
|
117
117
|
│ ####### N E O C O R T E X │
|
|
118
|
-
│ ### ######## v4.66.
|
|
118
|
+
│ ### ######## v4.66.46 │
|
|
119
119
|
│ ######### ##### │
|
|
120
120
|
│ ## ############## Development Orchestrator │
|
|
121
121
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team — Route explicit Neocortex *commands through the public thin client in DeepSeek Harness."
|
|
4
4
|
user-invocable: true
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
# File operations (Gemini CLI built-ins)
|
|
@@ -73,7 +73,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
73
73
|
┌────────────────────────────────────────────────────────────┐
|
|
74
74
|
│ │
|
|
75
75
|
│ ####### N E O C O R T E X │
|
|
76
|
-
│ ### ######## v4.66.
|
|
76
|
+
│ ### ######## v4.66.46 │
|
|
77
77
|
│ ######### ##### │
|
|
78
78
|
│ ## ############## Development Orchestrator │
|
|
79
79
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
# File operations (Gemini CLI built-ins)
|
|
@@ -72,7 +72,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
72
72
|
┌────────────────────────────────────────────────────────────┐
|
|
73
73
|
│ │
|
|
74
74
|
│ ####### N E O C O R T E X │
|
|
75
|
-
│ ### ######## v4.66.
|
|
75
|
+
│ ### ######## v4.66.46 │
|
|
76
76
|
│ ######### ##### │
|
|
77
77
|
│ ## ############## Development Orchestrator │
|
|
78
78
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team — Run development orchestration commands through the public thin client."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Neocortex for Grok Build
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team — Development orchestrator candidate (native-needs-validation)."
|
|
4
4
|
status: native-needs-validation
|
|
5
5
|
source: https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html
|
|
6
6
|
model_preference: primary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 | OrNexus Team — Run Neocortex commands through the public thin client in OpenClaw."
|
|
4
4
|
status: skill-fallback
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.66.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.66.46 (Pro) | OrNexus Team — Development orchestrator for *yoloop."
|
|
4
4
|
mode: primary
|
|
5
5
|
color: "#00B4FF"
|
|
6
6
|
permission:
|
|
@@ -74,7 +74,7 @@ user's own `*yolo @docs/stories/<id>.story.md` is never refused.
|
|
|
74
74
|
┌────────────────────────────────────────────────────────────┐
|
|
75
75
|
│ │
|
|
76
76
|
│ ####### N E O C O R T E X │
|
|
77
|
-
│ ### ######## v4.66.
|
|
77
|
+
│ ### ######## v4.66.46 │
|
|
78
78
|
│ ######### ##### │
|
|
79
79
|
│ ## ############## Development Orchestrator │
|
|
80
80
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.46 (Pro) | OrNexus Team — Development orchestrator for *yoloop."
|
|
4
4
|
mode: primary
|
|
5
5
|
color: "#00B4FF"
|
|
6
6
|
permission:
|
|
@@ -73,7 +73,7 @@ user's own `*yolo @docs/stories/<id>.story.md` is never refused.
|
|
|
73
73
|
┌────────────────────────────────────────────────────────────┐
|
|
74
74
|
│ │
|
|
75
75
|
│ ####### N E O C O R T E X │
|
|
76
|
-
│ ### ######## v4.66.
|
|
76
|
+
│ ### ######## v4.66.46 │
|
|
77
77
|
│ ######### ##### │
|
|
78
78
|
│ ## ############## Development Orchestrator │
|
|
79
79
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -112,6 +112,8 @@ neocortex-client invoke \
|
|
|
112
112
|
3. **Follow EXACTLY the instructions returned** by the thin client on stdout.
|
|
113
113
|
4. If `invoke` returns `private-execution-client-required` and
|
|
114
114
|
`next_action: retry-with-private-execution-beta`, rerun once with `--private-execution-beta`.
|
|
115
|
+
5. On private `create-epic` `reinvoke-same-command` with persisted claim recovery,
|
|
116
|
+
rerun the identical payload/flags once; never select a new epic.
|
|
115
117
|
|
|
116
118
|
## Degraded diagnose continuation
|
|
117
119
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "neocortex"
|
|
3
|
-
description: "Neocortex v4.66.
|
|
3
|
+
description: "Neocortex v4.66.46 | OrNexus Team"
|
|
4
4
|
tools:
|
|
5
5
|
# Read / Edit (built-in tool sets)
|
|
6
6
|
- read
|
|
@@ -82,7 +82,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
82
82
|
┌────────────────────────────────────────────────────────────┐
|
|
83
83
|
│ │
|
|
84
84
|
│ ####### N E O C O R T E X │
|
|
85
|
-
│ ### ######## v4.66.
|
|
85
|
+
│ ### ######## v4.66.46 │
|
|
86
86
|
│ ######### ##### │
|
|
87
87
|
│ ## ############## Development Orchestrator │
|
|
88
88
|
│ ## ### ###### ## OrNexus Team │
|