@ornexus/neocortex 4.61.6 → 4.64.0
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 +1193 -1193
- package/install.ps1 +31 -34
- package/install.sh +28 -5
- package/package.json +6 -4
- package/packages/client/dist/agent/refresh-stubs.d.ts +6 -0
- package/packages/client/dist/agent/refresh-stubs.js +2 -2
- package/packages/client/dist/agent/update-description.d.ts +8 -1
- package/packages/client/dist/agent/update-description.js +2 -1
- package/packages/client/dist/commands/invoke.d.ts +24 -0
- package/packages/client/dist/commands/invoke.js +73 -73
- package/packages/client/dist/commands/refresh-memory.d.ts +10 -0
- package/packages/client/dist/commands/refresh-memory.js +5 -3
- package/packages/client/dist/errors/frontmatter-diagnostics.d.ts +10 -1
- package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +110 -10
- package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -4
- package/packages/client/dist/git/git-lifecycle-store.d.ts +96 -2
- package/packages/client/dist/git/git-lifecycle-store.js +8 -7
- package/packages/client/dist/git/legacy-branch-mode-conversion.d.ts +58 -0
- package/packages/client/dist/git/legacy-branch-mode-conversion.js +4 -0
- package/packages/client/dist/git/release-gate-env.d.ts +23 -0
- package/packages/client/dist/git/release-gate-env.js +1 -0
- package/packages/client/dist/git/secure-filesystem-boundary.d.ts +24 -0
- package/packages/client/dist/git/secure-filesystem-boundary.js +20 -9
- package/packages/client/dist/git/state-json-field-merge.d.ts +76 -0
- package/packages/client/dist/git/state-json-field-merge.js +2 -0
- package/packages/client/dist/git/story-worktree-cleanup.d.ts +22 -1
- package/packages/client/dist/git/story-worktree-cleanup.js +4 -4
- package/packages/client/dist/git/story-worktree-integration.d.ts +48 -0
- package/packages/client/dist/git/story-worktree-integration.js +3 -3
- package/packages/client/dist/git/story-worktree-manager.d.ts +57 -0
- package/packages/client/dist/git/story-worktree-manager.js +3 -3
- package/packages/client/dist/git/story-worktree-paths.d.ts +23 -1
- package/packages/client/dist/git/story-worktree-paths.js +1 -1
- package/packages/client/dist/git/story-write-set-extension.d.ts +3 -0
- package/packages/client/dist/git/story-write-set-extension.js +1 -1
- package/packages/client/dist/private-execution/root-memory-writer.js +1 -1
- package/packages/client/dist/runner/headless/child-env.d.ts +92 -0
- package/packages/client/dist/runner/headless/child-env.js +1 -0
- package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -11
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +31 -0
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -10
- package/packages/client/dist/runner/headless/run-yolo.d.ts +15 -0
- package/packages/client/dist/runner/headless/run-yolo.js +1 -1
- package/packages/client/dist/runner/headless/run-yoloop.d.ts +55 -0
- package/packages/client/dist/runner/headless/run-yoloop.js +2 -2
- package/packages/client/dist/runner/headless/types.d.ts +9 -1
- package/packages/client/dist/runner/headless/types.js +2 -2
- package/packages/client/dist/state/project-state-snapshot.js +1 -1
- package/packages/client/dist/state/state-json-repair.d.ts +23 -0
- package/packages/client/dist/state/state-json-repair.js +4 -3
- package/packages/client/dist/yolo/change-evidence-collector.js +1 -1
- package/packages/client/dist/yolo/invoke-envelope-capability.d.ts +2 -0
- package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -1
- package/packages/client/dist/yolo/project-manifest-projection-collector.d.ts +28 -0
- package/packages/client/dist/yolo/project-manifest-projection-collector.js +1 -0
- package/packages/client/dist/yolo/spec-envelope-collector.d.ts +9 -0
- package/packages/client/dist/yolo/spec-envelope-collector.js +3 -3
- package/packages/client/dist/yoloop/discovery-hook.d.ts +2 -0
- package/packages/client/dist/yoloop/discovery-hook.js +2 -2
- package/packages/client/dist/yoloop/invoke-hooks.d.ts +17 -0
- package/packages/client/dist/yoloop/invoke-hooks.js +14 -10
- package/packages/client/dist/yoloop/legacy-story-scope.d.ts +23 -0
- package/packages/client/dist/yoloop/legacy-story-scope.js +1 -0
- package/packages/client/dist/yoloop/legacy-yoloop-adoption.d.ts +69 -0
- package/packages/client/dist/yoloop/legacy-yoloop-adoption.js +1 -0
- package/packages/client/dist/yoloop/shared-discover-epics.d.ts +62 -1
- package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1
- package/packages/client/dist/yoloop/yoloop-client-state-store.d.ts +23 -0
- package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1
- package/packages/client/dist/yoloop/yoloop-start-origin-binding.d.ts +92 -0
- package/packages/client/dist/yoloop/yoloop-start-origin-binding.js +1 -0
- package/packages/shared/dist/compatibility/index.js +6 -0
- package/packages/shared/dist/frontmatter-context-contract.js +164 -52
- package/packages/shared/dist/project-manifest-projection.js +202 -0
- package/packages/shared/dist/project-validation-commands.js +14 -6
- package/packages/shared/dist/release-gate-env-contract.js +129 -0
- package/packages/shared/dist/yolo/spec-envelope-rules.js +85 -0
- package/packages/shared/dist/yolo/spec-envelope.js +33 -7
- package/packages/shared/dist/yoloop/branch-unit.js +119 -3
- package/packages/shared/dist/yoloop/epic-terminal-git.js +98 -6
- package/packages/shared/dist/yoloop/story-write-scope.js +212 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/install-antigravity.sh +13 -4
- 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 +5 -5
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/codex/install-codex.sh +12 -4
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/lib/managed-config-merge.js +459 -5
- package/targets-stubs/lib/managed-profile.sh +54 -7
- package/targets-stubs/opencode/neocortex-root.md +1 -1
- package/targets-stubs/vscode/install-vscode.sh +21 -0
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type EpicAggregateQaReceipt, type EpicHeadReconciliationReceiptV1 } from '../../../shared/dist/yoloop/epic-terminal-git.js';
|
|
2
2
|
import { type AnchoredDirectoryIdentity } from './secure-filesystem-boundary.js';
|
|
3
|
+
import { type ReleaseGateEnvContract } from './release-gate-env.js';
|
|
3
4
|
export declare const GIT_LIFECYCLE_RUNTIME_DIRECTORY = "neocortex-yoloop";
|
|
4
5
|
export declare const GIT_LIFECYCLE_RUNTIME_FILE = "runtime.json";
|
|
5
6
|
export declare const P205_COMPLETE_COMMAND: "node scripts/test-root.mjs --gate complete";
|
|
@@ -157,6 +158,63 @@ export interface EpicHeadReconciliationAuthority {
|
|
|
157
158
|
readonly __epicHeadReconciliationOpaqueAuthority: never;
|
|
158
159
|
}
|
|
159
160
|
export type EpicTerminalReleaseAuthority = P205TransientExecutionAuthority | EpicHeadReconciliationAuthority;
|
|
161
|
+
/** Canonical P205-CI-02 gate budgets, used when a manifest omits `budgets` (P226.02 D3). */
|
|
162
|
+
export declare const P205_DEFAULT_COMPLETE_GATE_WORST_CASE_MS = 2700000;
|
|
163
|
+
export declare const P205_DEFAULT_CANCELLATION_GRACE_MS = 300000;
|
|
164
|
+
export interface P205GateBudget {
|
|
165
|
+
readonly completeGateWorstCaseMs: number;
|
|
166
|
+
readonly cancellationGraceMs: number;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* P226-CON-GATE-REASONS closed allowlist. Only these typed gate reasons may
|
|
170
|
+
* cross `publicReason` and the invoke snapshot projection verbatim.
|
|
171
|
+
*/
|
|
172
|
+
export declare function isP226GateReasonCode(value: unknown): value is string;
|
|
173
|
+
/**
|
|
174
|
+
* Strict gate stderr parser (P226.02 D4). Only the last non-empty line of the
|
|
175
|
+
* bounded tail is inspected; anything else is `p205-gate-failed:unknown`. The
|
|
176
|
+
* input is never echoed, persisted or included in the result.
|
|
177
|
+
*/
|
|
178
|
+
export declare function parseP205GateFailureReason(stderrTail: string | undefined): string;
|
|
179
|
+
/** Budget from the committed manifest; absent → canonical defaults, invalid → fail closed. */
|
|
180
|
+
export declare function readP205GateBudget(raw: unknown): P205GateBudget;
|
|
181
|
+
/**
|
|
182
|
+
* Bind the working `P205-CI-02-ENV` contract to its committed bytes. Absent in
|
|
183
|
+
* both → `null` (minimal environment + undeclared debt); present only in the
|
|
184
|
+
* checkout, or differing from the commit → `p205-transient-producer-dirty`;
|
|
185
|
+
* unreadable/unsafe/malformed → `p205-gate-env-contract-invalid`.
|
|
186
|
+
*/
|
|
187
|
+
export declare function bindCommittedReleaseGateEnvContract(projectRoot: string, committedContractText: string | null): ReleaseGateEnvContract | null;
|
|
188
|
+
/**
|
|
189
|
+
* Environment handed to the P205 gate process (P226.02 AC1, P226-CON-GATE-ENV).
|
|
190
|
+
* The P226.01 `P205-CI-02-ENV` sibling contract must be byte-for-byte the
|
|
191
|
+
* committed one at `headSha` (like the manifest and runner); its projection is
|
|
192
|
+
* the fixed minimal environment plus the declared names present in the parent
|
|
193
|
+
* environment. A missing required name throws `p205-datasource-missing:<NAME>`
|
|
194
|
+
* and an invalid contract `p205-gate-env-contract-invalid`, both before any
|
|
195
|
+
* gate process starts. Both execution paths receive exactly the returned object.
|
|
196
|
+
*/
|
|
197
|
+
export declare function projectP205GateEnvironment(projectRoot: string, committedContractText: string | null, parentEnv?: Readonly<Record<string, string | undefined>>, platform?: string): Readonly<Record<string, string>>;
|
|
198
|
+
/** Names never handed to the gate: the fixed list above plus every `GIT_*` variable. */
|
|
199
|
+
export declare function isP205GateEnvDenied(name: string, caseInsensitive?: boolean): boolean;
|
|
200
|
+
/** Injectable process primitives for the gate terminator (tests only swap these). */
|
|
201
|
+
export interface P205GateTerminatorDeps {
|
|
202
|
+
readonly platform: NodeJS.Platform;
|
|
203
|
+
readonly killProcess: (pid: number, signal: NodeJS.Signals) => void;
|
|
204
|
+
readonly spawnDetached: (command: string, args: readonly string[]) => {
|
|
205
|
+
once(event: 'error', listener: () => void): unknown;
|
|
206
|
+
unref(): void;
|
|
207
|
+
};
|
|
208
|
+
readonly systemRoot?: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Terminate the gate process tree for one timeout phase (P226.02 AC3, D-001).
|
|
212
|
+
* POSIX signals the whole process group (`-pid`). win32 has no process groups,
|
|
213
|
+
* so the first (`term`) phase already runs `taskkill /PID <pid> /T /F` while
|
|
214
|
+
* the root is still alive and the tree is still reachable; the `kill` phase is
|
|
215
|
+
* a direct-child fallback.
|
|
216
|
+
*/
|
|
217
|
+
export declare function terminateP205GateTree(pid: number, phase: 'term' | 'kill', deps?: P205GateTerminatorDeps): void;
|
|
160
218
|
export declare function executeP205TransientAuthority(projectRoot: string, input: {
|
|
161
219
|
readonly headSha: string;
|
|
162
220
|
readonly graphRevision: string;
|
|
@@ -222,11 +280,21 @@ export interface StoryWriteSetExtension {
|
|
|
222
280
|
readonly approvedAt: string;
|
|
223
281
|
readonly approvedBy: 'root_agent';
|
|
224
282
|
}
|
|
225
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* P227.06 (ADR-1): an extension entry is an exact path, a `dir/` scope or a
|
|
285
|
+
* bounded glob of the shared P226.05 grammar. Governance surfaces
|
|
286
|
+
* (`.neocortex`, `.claude`, `.git*`, `docs/stories`) are never extendable in
|
|
287
|
+
* any form, and a glob first segment (`*`, `**`, `*.ts`) is refused so an
|
|
288
|
+
* extension cannot become repository-wide.
|
|
289
|
+
*/
|
|
226
290
|
export declare function isStoryWriteSetExtensionPath(value: unknown): value is string;
|
|
227
291
|
export declare function storyWriteSetExtensionDigest(paths: readonly string[]): string;
|
|
228
292
|
export declare function isStoryWriteSetExtension(value: unknown): value is StoryWriteSetExtension;
|
|
229
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Authorized extension paths of an effective/runtime story record, or none
|
|
295
|
+
* (fail closed on malformed). Legacy 4.61.6 entries that the current grammar
|
|
296
|
+
* refuses (newly governed or now-invalid spellings) are dropped, never thrown.
|
|
297
|
+
*/
|
|
230
298
|
export declare function storyWriteSetExtensionPaths(story: Record<string, unknown> | undefined): readonly string[];
|
|
231
299
|
export declare function applyGitLifecycleRuntimeOverlay(tracked: Record<string, unknown>, runtime: GitLifecycleRuntimeDocument): Record<string, unknown>;
|
|
232
300
|
/** Return (creating when absent) the mutable P225.05 story-worktree journal. */
|
|
@@ -327,8 +395,16 @@ export declare function consumeEpicTerminalReleaseAuthority(authority: EpicTermi
|
|
|
327
395
|
readonly aggregateQaReceipt: EpicAggregateQaReceipt;
|
|
328
396
|
readonly headReconciliationReceipt?: EpicHeadReconciliationReceiptV1 | null;
|
|
329
397
|
}): boolean;
|
|
398
|
+
/**
|
|
399
|
+
* P226.05 (WS-05/F2): ordered claim candidates for a story write-set -- the
|
|
400
|
+
* authored set first, then (when valid and different) its expansion with the
|
|
401
|
+
* five control files. Every claim verifier tries them in this order.
|
|
402
|
+
*/
|
|
403
|
+
export declare function gitLifecycleStoryClaimCandidates(storyId: string, authorizedWriteSet: readonly string[]): readonly (readonly string[])[];
|
|
330
404
|
/** Reconstruct the same closed claim used by the direct or continuous planner. */
|
|
331
405
|
export declare function gitLifecycleStoryWriteSet(storyId: string, story: Record<string, unknown> | undefined, checkpoint: Record<string, unknown> | undefined): readonly string[];
|
|
406
|
+
/** P226.05: the lifecycle store's coverage decision, exported for parity tests. */
|
|
407
|
+
export declare function gitLifecycleWriteSetCovers(scope: string, path: string): boolean;
|
|
332
408
|
/** Pre-P205 admission for only the exact seven immutable P174 migrations. */
|
|
333
409
|
export declare function verifyLegacyCheckpointMigrationCandidateSync(projectRoot: string, value: unknown, storyId: string, epicId: string, executionBranch: string, authorizedWriteSet: readonly string[]): boolean;
|
|
334
410
|
export declare function computeImmutableStoryQaEvidenceDigest(input: {
|
|
@@ -413,6 +489,24 @@ export declare function acquireGitLifecyclePhysicalIntegrationLock(projectRoot:
|
|
|
413
489
|
readonly createdAt?: string;
|
|
414
490
|
readonly ownerNonce?: string;
|
|
415
491
|
}): Promise<GitLifecyclePhysicalIntegrationLockResult>;
|
|
492
|
+
/** P227.06 (ADR-3): bounded, jittered wait on the physical integration lock. */
|
|
493
|
+
export interface GitLifecyclePhysicalIntegrationLockWait {
|
|
494
|
+
/** Total scheduled wait in ms; default 2000, clamped to [0, 5000]. */
|
|
495
|
+
readonly budgetMs?: number;
|
|
496
|
+
readonly sleep?: (ms: number) => Promise<void>;
|
|
497
|
+
/** Jitter source in [0, 1); out-of-range values are clamped. */
|
|
498
|
+
readonly random?: () => number;
|
|
499
|
+
}
|
|
500
|
+
export declare const GIT_LIFECYCLE_INTEGRATION_LOCK_WAIT_DEFAULT_MS = 2000;
|
|
501
|
+
export declare const GIT_LIFECYCLE_INTEGRATION_LOCK_WAIT_MAX_MS = 5000;
|
|
502
|
+
/**
|
|
503
|
+
* Retries only `git-lifecycle-integration-backpressure` within a fixed budget
|
|
504
|
+
* (delays 25, 50, 100, 200, 400, 400... ms, each x[0.8, 1.2] jitter, truncated to
|
|
505
|
+
* the remaining budget). `lock-failed` returns at once. The budget counts
|
|
506
|
+
* scheduled delays, not wall clock, so exhaustion is deterministic; it ends in
|
|
507
|
+
* the same typed backpressure. `budgetMs: 0` is the single legacy attempt.
|
|
508
|
+
*/
|
|
509
|
+
export declare function acquireGitLifecyclePhysicalIntegrationLockWithin(projectRoot: string, requested: Parameters<typeof acquireGitLifecyclePhysicalIntegrationLock>[1], wait?: GitLifecyclePhysicalIntegrationLockWait): Promise<GitLifecyclePhysicalIntegrationLockResult>;
|
|
416
510
|
export declare function verifyGitLifecyclePhysicalIntegrationLock(path: string, expected: GitLifecyclePhysicalIntegrationLockOwner): Promise<boolean>;
|
|
417
511
|
export declare function releaseGitLifecyclePhysicalIntegrationLock(path: string, expected: GitLifecyclePhysicalIntegrationLockOwner): Promise<boolean>;
|
|
418
512
|
export declare function computeGitLifecyclePhysicalIntegrationLockOwnerDigest(owner: GitLifecyclePhysicalIntegrationLockOwner): string;
|