@ornexus/neocortex 4.60.59 → 4.60.60
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/sbom.cdx.json +241 -82
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +6 -2
- package/packages/client/dist/cli.js +37 -4
- package/packages/client/dist/commands/architecture-answers.d.ts +26 -0
- package/packages/client/dist/commands/architecture-answers.js +7 -0
- package/packages/client/dist/commands/architecture-memory-terminal.d.ts +21 -0
- package/packages/client/dist/commands/architecture-memory-terminal.js +2 -0
- package/packages/client/dist/commands/architecture-root-binding.d.ts +2 -0
- package/packages/client/dist/commands/architecture-root-binding.js +1 -0
- package/packages/client/dist/commands/invoke.d.ts +43 -2
- package/packages/client/dist/commands/invoke.js +98 -70
- package/packages/client/dist/commands/legacy-story-branch.d.ts +10 -0
- package/packages/client/dist/commands/legacy-story-branch.js +1 -0
- package/packages/client/dist/commands/legacy-story-pr.d.ts +18 -0
- package/packages/client/dist/commands/legacy-story-pr.js +1 -0
- package/packages/client/dist/commands/planning-diagnosis.d.ts +4 -0
- package/packages/client/dist/commands/planning-diagnosis.js +1 -0
- package/packages/client/dist/commands/planning-generation.d.ts +2 -0
- package/packages/client/dist/commands/planning-generation.js +1 -0
- package/packages/client/dist/commands/planning-research.d.ts +3 -0
- package/packages/client/dist/commands/planning-research.js +1 -0
- package/packages/client/dist/commands/refresh-memory.d.ts +10 -0
- package/packages/client/dist/commands/refresh-memory.js +3 -1
- package/packages/client/dist/commands/story-checkpoint.d.ts +1 -1
- package/packages/client/dist/commands/story-checkpoint.js +1 -1
- package/packages/client/dist/config/profile-directory.d.ts +2 -0
- package/packages/client/dist/config/profile-directory.js +1 -0
- package/packages/client/dist/config/secure-config.js +5 -5
- package/packages/client/dist/continuity/runner-bootstrap-policy.d.ts +1 -1
- package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -1
- package/packages/client/dist/generated/command-registry.generated.d.ts +11 -11
- package/packages/client/dist/generated/command-registry.generated.js +1 -1
- package/packages/client/dist/generated/public-projections.generated.d.ts +20 -20
- package/packages/client/dist/generated/public-projections.generated.js +1 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +9 -0
- package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -4
- package/packages/client/dist/git/git-lifecycle-step-ids.d.ts +5 -0
- package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -1
- package/packages/client/dist/git/git-lifecycle-store.d.ts +16 -0
- package/packages/client/dist/git/git-lifecycle-store.js +9 -4
- package/packages/client/dist/git/legacy-story-branch-checkpoint.d.ts +38 -0
- package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -0
- package/packages/client/dist/git/legacy-story-branch-setup.d.ts +56 -0
- package/packages/client/dist/git/legacy-story-branch-setup.js +4 -0
- package/packages/client/dist/git/legacy-story-pr.d.ts +514 -0
- package/packages/client/dist/git/legacy-story-pr.js +62 -0
- package/packages/client/dist/git/secure-filesystem-boundary.d.ts +2 -0
- package/packages/client/dist/git/secure-filesystem-boundary.js +34 -7
- package/packages/client/dist/machine/fingerprint.js +2 -2
- package/packages/client/dist/memory/project-memory-writer.js +17 -17
- package/packages/client/dist/memory/shared-project-memory-types.d.ts +23 -13
- package/packages/client/dist/memory/shared-project-memory-types.js +2 -2
- package/packages/client/dist/migrations/state-json.d.ts +23 -1
- package/packages/client/dist/migrations/state-json.js +4 -4
- package/packages/client/dist/private-execution/delivery.d.ts +131 -3
- package/packages/client/dist/private-execution/delivery.js +2 -2
- package/packages/client/dist/private-execution/isolated-admission.d.ts +28 -1
- package/packages/client/dist/private-execution/isolated-admission.js +11 -2
- package/packages/client/dist/private-execution/isolated-session.js +2 -2
- package/packages/client/dist/private-execution/isolated-workspace.d.ts +8 -0
- package/packages/client/dist/private-execution/isolated-workspace.js +1 -1
- package/packages/client/dist/private-execution/pact-consumer-runtime.d.ts +19 -0
- package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -0
- package/packages/client/dist/private-execution/pact-test-source.d.ts +9 -0
- package/packages/client/dist/private-execution/pact-test-source.js +1 -0
- package/packages/client/dist/private-execution/pact-toolchain.d.ts +37 -0
- package/packages/client/dist/private-execution/pact-toolchain.js +3 -0
- package/packages/client/dist/private-execution/pact-write-set.d.ts +24 -0
- package/packages/client/dist/private-execution/pact-write-set.js +1 -0
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.d.ts +38 -0
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -0
- package/packages/client/dist/private-execution/planning-generation-checkpoint.d.ts +34 -0
- package/packages/client/dist/private-execution/planning-generation-checkpoint.js +4 -0
- package/packages/client/dist/private-execution/planning-research-checkpoint.d.ts +38 -0
- package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -0
- package/packages/client/dist/private-execution/ux-source-validation.d.ts +2 -0
- package/packages/client/dist/private-execution/ux-source-validation.js +1 -0
- package/packages/client/dist/private-execution/ux-write-set.d.ts +30 -0
- package/packages/client/dist/private-execution/ux-write-set.js +2 -0
- package/packages/client/dist/resolvers/remote-resolver.d.ts +5 -22
- package/packages/client/dist/resolvers/remote-resolver.js +1 -1
- package/packages/client/dist/runner/project-identity.js +1 -1
- package/packages/client/dist/runner/scheduler.d.ts +20 -0
- package/packages/client/dist/runner/scheduler.js +7 -7
- package/packages/client/dist/state/project-state-snapshot.js +1 -1
- package/packages/client/dist/yolo/change-evidence-collector.d.ts +8 -0
- package/packages/client/dist/yolo/change-evidence-collector.js +1 -1
- package/packages/client/dist/yolo/spec-envelope-collector.d.ts +2 -0
- package/packages/client/dist/yolo/spec-envelope-collector.js +3 -3
- package/packages/client/dist/yoloop/invoke-hooks.js +7 -7
- package/packages/shared/dist/generated/command-registry.generated.js +12 -10
- package/packages/shared/dist/generated/invocation-schema.generated.js +14 -6
- package/packages/shared/dist/generated/public-projections.generated.js +18 -18
- package/packages/shared/dist/invocation/index.d.ts +1 -1
- package/packages/shared/dist/merge-readiness/c12-remote-observation.js +80 -0
- package/packages/shared/dist/planning/diagnosis-state.js +143 -0
- package/packages/shared/dist/yoloop/branch-unit.js +23 -1
- 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/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.60",
|
|
4
|
+
"description": "Neocortex v4.60.60 - Orquestrador de Desenvolvimento de Epics & Stories para Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
7
7
|
"claude-code",
|
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
"packages/shared/dist/yolo/spec-envelope.js",
|
|
68
68
|
"packages/shared/dist/yolo/change-evidence.js",
|
|
69
69
|
"packages/shared/dist/invocation/",
|
|
70
|
+
"packages/shared/dist/planning/diagnosis-state.js",
|
|
71
|
+
"packages/shared/dist/merge-readiness/c12-remote-observation.js",
|
|
70
72
|
"packages/shared/dist/state/",
|
|
71
73
|
"packages/shared/dist/continuity/goal-operation-authority.js",
|
|
72
74
|
"!packages/shared/dist/**/__tests__/**",
|
|
@@ -148,11 +150,13 @@
|
|
|
148
150
|
"url": "https://github.com/sponsors/ornexus"
|
|
149
151
|
},
|
|
150
152
|
"dependencies": {
|
|
153
|
+
"@babel/parser": "^7.29.7",
|
|
151
154
|
"@clack/prompts": "^1.0.1",
|
|
152
155
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
153
156
|
"execa": "^9.6.1",
|
|
154
157
|
"node-cache": "^5.1.2",
|
|
155
158
|
"picocolors": "^1.1.1",
|
|
159
|
+
"yaml": "^2.8.3",
|
|
156
160
|
"zod": "^4.3.6"
|
|
157
161
|
},
|
|
158
162
|
"optionalDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{getClientVersion as
|
|
2
|
+
import{getClientVersion as p}from"./version.js";const l=`
|
|
3
3
|
neocortex-client - Neocortex Client CLI
|
|
4
4
|
|
|
5
5
|
Usage:
|
|
@@ -8,9 +8,16 @@ Usage:
|
|
|
8
8
|
Commands:
|
|
9
9
|
invoke Send orchestration request to server
|
|
10
10
|
activate Activate license key
|
|
11
|
-
refresh-memory Create/repair canonical
|
|
11
|
+
refresh-memory Create/repair canonical memory; --verify checks all targets without writes
|
|
12
|
+
architecture-memory seal Seal committed Update Memory evidence into local root state
|
|
13
|
+
planning-diagnosis seal Seal an independently reviewed P01 checkpoint from stdin
|
|
14
|
+
planning-research seal Seal an independently reviewed P02 checkpoint from stdin
|
|
15
|
+
planning-generation seal Seal an independently reviewed P03 checkpoint from stdin
|
|
12
16
|
story-checkpoint Root-owned direct-*yolo commit/checkpoint boundary
|
|
17
|
+
legacy-story-branch Root-owned setup and C01 checkpoint for recorded story-branch projects
|
|
18
|
+
legacy-story-pr Root-owned legacy C08/C09 checkpoint, C10 PR, C11 review and C12 merge boundary
|
|
13
19
|
native-agent Reserve and observe authorized native child dispatches
|
|
20
|
+
architecture-answers Save explicit Pact decisions in the local private store
|
|
14
21
|
config Inspect or change managed subagent approval mode
|
|
15
22
|
cache-status Show cache and circuit breaker status
|
|
16
23
|
update Update to latest version (use 'neocortex update' instead)
|
|
@@ -49,6 +56,13 @@ Story Checkpoint Options:
|
|
|
49
56
|
--remote <name> Git remote (default: origin)
|
|
50
57
|
--format json|plain Public result format (default: plain)
|
|
51
58
|
|
|
59
|
+
Architecture Answers:
|
|
60
|
+
save --project-root <path> Read five explicit Pact decisions from bounded JSON stdin.
|
|
61
|
+
status --project-root <path> Revalidate and show only the public receipt.
|
|
62
|
+
Required keys: consumer, provider, brokerUrl (null or HTTPS URL),
|
|
63
|
+
matchersAggressive (boolean), generateProvider (boolean).
|
|
64
|
+
This stores a private local record only; it does not authorize a Pact child.
|
|
65
|
+
|
|
52
66
|
Config Actions:
|
|
53
67
|
status Show requested/effective/source/scope (default)
|
|
54
68
|
max Request managed maximum approvals
|
|
@@ -84,6 +98,25 @@ Examples:
|
|
|
84
98
|
neocortex-client story-checkpoint handoff --story P174.03.913359 --format json
|
|
85
99
|
neocortex-client story-checkpoint begin --story P174.03.913359 --format json
|
|
86
100
|
neocortex-client story-checkpoint finalize --story P174.03.913359 --push --format json
|
|
101
|
+
neocortex-client legacy-story-branch setup --story P174.03.913359 --project-root . --dry-run --format json
|
|
102
|
+
neocortex-client legacy-story-branch accept --story P174.03.913359 --issue-number 123 --project-root . --format json
|
|
103
|
+
neocortex-client legacy-story-pr commit-plan --story P174.03.913359 --project-root . --format json
|
|
104
|
+
neocortex-client legacy-story-pr commit-accept --story P174.03.913359 --authorize-commit --project-root . --format json
|
|
105
|
+
neocortex-client legacy-story-pr sync-plan --story P174.03.913359 --project-root . --format json
|
|
106
|
+
neocortex-client legacy-story-pr sync-accept --story P174.03.913359 --authorize-sync --project-root . --format json
|
|
107
|
+
neocortex-client legacy-story-pr plan --story P174.03.913359 --project-root . --format json
|
|
108
|
+
neocortex-client legacy-story-pr create --story P174.03.913359 --project-root . --body-file /tmp/reviewed-pr-body.md --authorize-pr-create --format json
|
|
109
|
+
neocortex-client legacy-story-pr review-plan --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
110
|
+
neocortex-client legacy-story-pr review-accept --story P174.03.913359 --pr-number 41 --project-root . --report-file /tmp/review-report.json --authorize-review --format json
|
|
111
|
+
neocortex-client legacy-story-pr merge-plan --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
112
|
+
neocortex-client legacy-story-pr merge-prepare --story P174.03.913359 --pr-number 41 --authorize-pr-update --project-root . --format json
|
|
113
|
+
neocortex-client legacy-story-pr merge-decision --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
114
|
+
neocortex-client legacy-story-pr merge-debt-record --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
115
|
+
neocortex-client legacy-story-pr merge-execute --story P174.03.913359 --pr-number 41 --authorize-merge --project-root . --format json
|
|
116
|
+
neocortex-client legacy-story-pr merge-reconcile --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
117
|
+
neocortex-client legacy-story-pr post-merge-plan --story P174.03.913359 --pr-number 41 --project-root . --format json
|
|
118
|
+
neocortex-client legacy-story-pr post-merge-accept --story P174.03.913359 --pr-number 41 --authorize-post-merge --project-root . --format json
|
|
119
|
+
neocortex-client architecture-answers save --project-root . # JSON via stdin; never pass private URLs in argv
|
|
87
120
|
|
|
88
121
|
Command-level watch inside --args:
|
|
89
122
|
Supported: exactly one final unquoted --watch for *goal create/start/resume
|
|
@@ -113,5 +146,5 @@ Invocation payload boundary:
|
|
|
113
146
|
|
|
114
147
|
License:
|
|
115
148
|
Licensed under BSL-1.1 (Business Source License 1.1)
|
|
116
|
-
`.trim(),
|
|
117
|
-
`),process.exit(0));const s
|
|
149
|
+
`.trim(),d=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function m(){const s=process.argv.slice(2),a=s[0];a&&d.has(a.toLowerCase())&&process.exit(0),(!a||a==="--help"||a==="-h")&&(console.log(l),process.exit(0)),(a==="--version"||a==="-v")&&(console.log(p()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
|
|
150
|
+
`),process.exit(0));const o=s.slice(1);switch(a){case"invoke":{const{invokeCliHandler:t}=await import("./commands/invoke.js"),e=await t(o);process.exit(e);break}case"activate":{const{activate:t}=await import("./commands/activate.js");let e,i,c=!1;for(let r=0;r<o.length;r++){const n=o[r];n==="--server-url"?i=o[++r]:n==="--non-interactive"?c=!0:n==="--help"||n==="-h"?(console.log(l),process.exit(0)):n.startsWith("-")||(e=n)}e||(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 r=await t({licenseKey:e,serverUrl:i,nonInteractive:c});r.success?(console.log(r.message),process.exit(0)):(console.error(r.message),process.exit(1))}catch(r){const n=r instanceof Error?r.message:String(r);console.error(`Activation failed: ${n}`),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:t}=await import("./commands/config.js"),e=await t(o);process.exit(e);break}case"refresh-memory":{const{refreshMemoryCliHandler:t}=await import("./commands/refresh-memory.js"),e=await t(o);process.exit(e);break}case"architecture-memory":{const{architectureMemoryTerminalCliHandler:t}=await import("./commands/architecture-memory-terminal.js"),e=await t(o);process.exit(e);break}case"planning-diagnosis":{const{planningDiagnosisCliHandler:t}=await import("./commands/planning-diagnosis.js"),e=await t(o);process.exit(e);break}case"planning-research":{const{planningResearchCliHandler:t}=await import("./commands/planning-research.js"),e=await t(o);process.exit(e);break}case"planning-generation":{const{planningGenerationCliHandler:t}=await import("./commands/planning-generation.js"),e=await t(o);process.exit(e);break}case"story-checkpoint":{const{storyCheckpointCliHandler:t}=await import("./commands/story-checkpoint.js"),e=await t(o);process.exit(e);break}case"legacy-story-branch":{const{legacyStoryBranchCliHandler:t}=await import("./commands/legacy-story-branch.js"),e=await t(o);process.exit(e);break}case"legacy-story-pr":{const{legacyStoryPrCliHandler:t}=await import("./commands/legacy-story-pr.js"),e=await t(o);process.exit(e);break}case"native-agent":{const{nativeAgentCliHandler:t}=await import("./commands/native-agent.js"),e=await t(o);process.exit(e);break}case"architecture-answers":{const{architectureAnswersCliHandler:t}=await import("./commands/architecture-answers.js"),e=await t(o);process.exit(e);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: ${a}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}m().catch(s=>{console.error(`Fatal error: ${s instanceof Error?s.message:String(s)}`),process.exit(1)});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface PactAnswers {
|
|
2
|
+
readonly consumer: string;
|
|
3
|
+
readonly provider: string;
|
|
4
|
+
readonly brokerUrl: string | null;
|
|
5
|
+
readonly matchersAggressive: boolean;
|
|
6
|
+
readonly generateProvider: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface PactAnswerReceipt {
|
|
9
|
+
readonly schemaVersion: 'PactAnswerReceipt/1';
|
|
10
|
+
readonly targetEpicId: string;
|
|
11
|
+
readonly graphRevision: string;
|
|
12
|
+
readonly stateSha256: string;
|
|
13
|
+
readonly answersSha256: string;
|
|
14
|
+
readonly questionIds: readonly string[];
|
|
15
|
+
readonly publicSafe: true;
|
|
16
|
+
}
|
|
17
|
+
/** Store explicit answers without mutating the tracked architecture checkpoint. */
|
|
18
|
+
export declare function savePactAnswers(projectRoot: string, value: unknown): PactAnswerReceipt;
|
|
19
|
+
/** Revalidate the private record against the exact current root checkpoint. Never print answers. */
|
|
20
|
+
export declare function loadPactAnswerReceipt(projectRoot: string): PactAnswerReceipt | undefined;
|
|
21
|
+
/** Internal private handoff only. Callers must never log or return `answers`. */
|
|
22
|
+
export declare function loadPactPrivateAnswers(projectRoot: string): Readonly<{
|
|
23
|
+
receipt: PactAnswerReceipt;
|
|
24
|
+
answers: PactAnswers;
|
|
25
|
+
}> | undefined;
|
|
26
|
+
export declare function architectureAnswersCliHandler(args: readonly string[]): Promise<number>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{createHash as A,randomBytes as T,randomUUID as U}from"node:crypto";import{execFileSync as R}from"node:child_process";import{isDeepStrictEqual as j}from"node:util";import{closeSync as I,existsSync as w,fsyncSync as P,linkSync as L,lstatSync as l,mkdirSync as B,openSync as k,readFileSync as O,realpathSync as b,unlinkSync as q,writeFileSync as D}from"node:fs";import{isAbsolute as F,join as u,resolve as S}from"node:path";const z=4096,m=Object.freeze(["PACT-Q1-CONSUMER","PACT-Q2-PROVIDER","PACT-Q3-BROKER","PACT-Q4-MATCHERS","PACT-Q5-VERIFY"]),N=Object.freeze(["arch-prd","arch-architecture","arch-fitness-functions","arch-api-contracts"]);function d(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function y(e,n){return Object.keys(e).length===n.length&&n.every(r=>Object.hasOwn(e,r))}function x(e){return typeof e=="string"&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$/.test(e)}function Q(e){if(e===null)return!0;if(typeof e!="string"||e.length>512||!e.startsWith("https://")||/[\s\\]/.test(e))return!1;try{const n=new URL(e);return n.protocol==="https:"&&!!n.hostname&&!n.username&&!n.password&&!n.search&&!n.hash}catch{return!1}}function $(e){if(!d(e)||!y(e,["consumer","provider","brokerUrl","matchersAggressive","generateProvider"])||!x(e.consumer)||!x(e.provider)||!Q(e.brokerUrl)||typeof e.matchersAggressive!="boolean"||typeof e.generateProvider!="boolean")throw new Error("architecture-answers-invalid");return{consumer:e.consumer,provider:e.provider,brokerUrl:e.brokerUrl,matchersAggressive:e.matchersAggressive,generateProvider:e.generateProvider}}function C(e,n){const r=S(e),c=R("git",["rev-parse","--show-toplevel"],{cwd:r,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(b(r)!==r||S(c)!==r)throw new Error("architecture-answers-private-store-invalid");const o=R("git",["rev-parse","--git-common-dir"],{cwd:r,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim(),s=F(o)?S(o):S(r,o);if(b(s)!==s||l(s).isSymbolicLink())throw new Error("architecture-answers-private-store-invalid");const a=u(s,"neocortex-architecture");if(!w(a)&&!n)return;n&&B(a,{recursive:!0,mode:448});const t=l(a);if(!t.isDirectory()||t.isSymbolicLink()||t.uid!==process.getuid?.()||(t.mode&63)!==0)throw new Error("architecture-answers-private-store-invalid");return a}function J(e,n){const r=u(e,".neocortex","state.json"),c=l(r);if(!c.isFile()||c.isSymbolicLink())throw new Error("architecture-answers-state-invalid");const o=O(r,"utf8"),s=JSON.parse(o),a=d(s)&&d(s.archPlan)?s.archPlan:void 0,t=a&&d(a.execution)?a.execution:void 0,h=t?.acceptedStages;if(!t||t.schemaVersion!==1||t.owner!=="root"||t.evidencePolicy!=="v2-required"||t.currentStageCommand!=="generate-pacts"||!(t.continuationState==="ask-user"&&JSON.stringify(t.questionIds)===JSON.stringify(m)||n&&t.continuationState==="delegate"&&JSON.stringify(t.questionIds)==="[]")||typeof t.targetEpicId!="string"||!/^P[1-9][0-9]{0,11}$/.test(t.targetEpicId)||!d(s)||!d(s.epics)||!Object.hasOwn(s.epics,t.targetEpicId)||typeof t.graphRevision!="string"||!/^[a-f0-9]{64}$/.test(t.graphRevision)||!Array.isArray(h)||h.length!==N.length||!h.every((f,p)=>d(f)&&f.stageCommand===N[p]&&f.targetEpicId===t.targetEpicId&&d(f.completionEvidence)&&d(f.validationEvidence)))throw new Error("architecture-answers-checkpoint-invalid");const i=t.continuationState==="delegate"?t.pactAnswerReceipt:void 0;if(t.continuationState==="delegate"&&(!d(i)||!y(i,["schemaVersion","targetEpicId","graphRevision","stateSha256","answersSha256","questionIds","publicSafe"])||i.schemaVersion!=="PactAnswerReceipt/1"||i.targetEpicId!==t.targetEpicId||i.graphRevision!==t.graphRevision||typeof i.stateSha256!="string"||!/^[a-f0-9]{64}$/.test(i.stateSha256)||typeof i.answersSha256!="string"||!/^[a-f0-9]{64}$/.test(i.answersSha256)||JSON.stringify(i.questionIds)!==JSON.stringify(m)||i.publicSafe!==!0))throw new Error("architecture-answers-checkpoint-invalid");return{targetEpicId:t.targetEpicId,graphRevision:t.graphRevision,stateSha256:t.continuationState==="ask-user"?A("sha256").update(o).digest("hex"):i.stateSha256,...i?{delegatedReceipt:i}:{}}}function g(e){return{schemaVersion:"PactAnswerReceipt/1",targetEpicId:e.targetEpicId,graphRevision:e.graphRevision,stateSha256:e.stateSha256,answersSha256:e.checksumSha256,questionIds:m,publicSafe:!0}}function V(e,n,r){const c={schemaVersion:r?"PactLocalAnswers/2":"PactLocalAnswers/1",...e,...r?{nonce:r}:{},answers:n};return{...c,checksumSha256:A("sha256").update(`${JSON.stringify(c)}
|
|
2
|
+
`).digest("hex")}}function _(e,n){const r=$(n),c=J(e,!1),o=E(e);if(o){if(!j(o.answers,r))throw new Error("architecture-answers-conflict");return g(o)}const s=V(c,r,T(32).toString("hex")),a=`${JSON.stringify(s)}
|
|
3
|
+
`,t=C(e,!0),h=u(t,`pact-answers-${s.targetEpicId}-${s.graphRevision}.json`);if(w(h))throw new Error("architecture-answers-conflict");const i=u(t,`pact-answers-tmp-${U()}.json`);let f=!1;const p=k(i,"wx",384);try{D(p,a),P(p)}finally{I(p)}try{L(i,h),f=!0;const v=k(t,"r");try{P(v)}finally{I(v)}}finally{if(q(i),!f&&w(h))throw new Error("architecture-answers-conflict")}return g(s)}function E(e,n=!1){const r=J(e,!0);if(n&&!r.delegatedReceipt)throw new Error("architecture-answers-checkpoint-invalid");const c=C(e,!1);if(!c)return;const o=u(c,`pact-answers-${r.targetEpicId}-${r.graphRevision}.json`);if(!w(o))return;const s=l(o);if(!s.isFile()||s.isSymbolicLink()||s.size>8192||s.uid!==process.getuid?.()||(s.mode&63)!==0)throw new Error("architecture-answers-conflict");const a=O(o,"utf8"),t=JSON.parse(a);if(!d(t)||!(t.schemaVersion==="PactLocalAnswers/1"&&y(t,["schemaVersion","targetEpicId","graphRevision","stateSha256","answers","checksumSha256"])||t.schemaVersion==="PactLocalAnswers/2"&&y(t,["schemaVersion","targetEpicId","graphRevision","stateSha256","nonce","answers","checksumSha256"])&&typeof t.nonce=="string"&&/^[a-f0-9]{64}$/.test(t.nonce))||t.targetEpicId!==r.targetEpicId||t.graphRevision!==r.graphRevision||t.stateSha256!==r.stateSha256)throw new Error("architecture-answers-conflict");const h=V({targetEpicId:r.targetEpicId,graphRevision:r.graphRevision,stateSha256:r.stateSha256},$(t.answers),t.schemaVersion==="PactLocalAnswers/2"?t.nonce:void 0),i=`${JSON.stringify(h)}
|
|
4
|
+
`;if(a!==i||r.delegatedReceipt&&JSON.stringify(g(h))!==JSON.stringify(r.delegatedReceipt))throw new Error("architecture-answers-conflict");return h}function H(e){const n=E(e);return n?g(n):void 0}function X(e){const n=E(e,!0);return n?{receipt:g(n),answers:n.answers}:void 0}async function M(){const e=[];let n=0;for await(const r of process.stdin){const c=Buffer.isBuffer(r)?r:Buffer.from(String(r));if(n+=c.length,n>z)throw new Error("architecture-answers-input-too-large");e.push(c)}return JSON.parse(Buffer.concat(e).toString("utf8"))}async function ee(e){if(e[0]!=="save"&&e[0]!=="status"||e.length>1&&(e.length!==3||e[1]!=="--project-root"||!e[2]))return process.stdout.write(`{"ok":false,"reasonCode":"architecture-answers-usage-invalid","publicSafe":true}
|
|
5
|
+
`),1;try{const n=e[2]??process.cwd(),r=e[0]==="save"?_(n,await M()):H(n);return process.stdout.write(`${JSON.stringify({ok:!0,...r,...r?{}:{recorded:!1,publicSafe:!0}})}
|
|
6
|
+
`),0}catch(n){const r=n instanceof Error&&/^architecture-answers-[a-z-]+$/.test(n.message)?n.message:"architecture-answers-failed";return process.stdout.write(`${JSON.stringify({ok:!1,reasonCode:r,publicSafe:!0})}
|
|
7
|
+
`),1}}export{ee as architectureAnswersCliHandler,H as loadPactAnswerReceipt,X as loadPactPrivateAnswers,_ as savePactAnswers};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ArchitectureTerminalMemoryReceiptV1 {
|
|
2
|
+
readonly schemaVersion: 'ArchitectureTerminalMemoryReceipt/1';
|
|
3
|
+
readonly targetEpicId: string;
|
|
4
|
+
readonly graphRevision: string;
|
|
5
|
+
readonly sourceHead: string;
|
|
6
|
+
readonly canonicalSha256: string;
|
|
7
|
+
readonly projectionSha256: string;
|
|
8
|
+
readonly fileCount: number;
|
|
9
|
+
readonly completionReceiptId: string;
|
|
10
|
+
readonly validationReceiptId: string;
|
|
11
|
+
readonly receiptId: string;
|
|
12
|
+
readonly status: 'passed';
|
|
13
|
+
readonly evidenceIds: readonly string[];
|
|
14
|
+
readonly publicSafe: true;
|
|
15
|
+
}
|
|
16
|
+
export declare function acceptedArchitectureTerminalMemoryReceipt(value: unknown, execution: unknown): value is ArchitectureTerminalMemoryReceiptV1;
|
|
17
|
+
/** A root-only physical seal; child output and a copied JSON assertion are insufficient. */
|
|
18
|
+
export declare function deriveArchitectureTerminalMemoryReceipt(projectRoot: string, execution: unknown): ArchitectureTerminalMemoryReceiptV1;
|
|
19
|
+
/** Root-only CAS: seal a committed, verified memory projection into local state. */
|
|
20
|
+
export declare function sealArchitectureTerminalMemory(projectRoot: string): ArchitectureTerminalMemoryReceiptV1;
|
|
21
|
+
export declare function architectureMemoryTerminalCliHandler(args: readonly string[]): Promise<number>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{execFileSync as l}from"node:child_process";import{createHash as F,randomUUID as V}from"node:crypto";import{closeSync as h,fsyncSync as w,lstatSync as b,mkdirSync as J,openSync as y,readFileSync as I,realpathSync as O,renameSync as L,unlinkSync as T,writeFileSync as H}from"node:fs";import{isAbsolute as X,join as p,resolve as S}from"node:path";import{listProjectMemoryTargets as q}from"../memory/shared-project-memory-types.js";import{parseRefreshMemoryArgs as U,verifyProjectMemoryTargets as B}from"./refresh-memory.js";function Z(e,t){if(!c(e)||!c(t)||Object.keys(e).sort().join(",")!==["schemaVersion","targetEpicId","graphRevision","sourceHead","canonicalSha256","projectionSha256","fileCount","completionReceiptId","validationReceiptId","receiptId","status","evidenceIds","publicSafe"].sort().join(",")||e.schemaVersion!=="ArchitectureTerminalMemoryReceipt/1"||e.targetEpicId!==t.targetEpicId||e.graphRevision!==t.graphRevision||e.completionReceiptId!==t.completionEvidence?.receiptId||e.validationReceiptId!==t.validationEvidence?.receiptId||typeof e.sourceHead!="string"||!/^[a-f0-9]{40}$/.test(e.sourceHead)||![e.graphRevision,e.canonicalSha256,e.projectionSha256,e.completionReceiptId,e.validationReceiptId,e.receiptId].every(i=>typeof i=="string"&&/^[a-f0-9]{64}$/.test(i))||!Number.isInteger(e.fileCount)||e.fileCount<1||e.fileCount>64||e.status!=="passed"||e.publicSafe!==!0||!Array.isArray(e.evidenceIds)||e.evidenceIds.length!==1)return!1;const n={schemaVersion:e.schemaVersion,targetEpicId:e.targetEpicId,graphRevision:e.graphRevision,sourceHead:e.sourceHead,canonicalSha256:e.canonicalSha256,projectionSha256:e.projectionSha256,fileCount:e.fileCount,completionReceiptId:e.completionReceiptId,validationReceiptId:e.validationReceiptId},o=C(JSON.stringify(n));return e.receiptId===o&&e.evidenceIds[0]===`memory-physical-${o.slice(0,24)}`}function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function C(e){return F("sha256").update(e).digest("hex")}function M(e,t){if(!c(t)||t.owner!=="root"||t.currentStageCommand!=="update-memory"||t.continuationState!=="delegate"||t.childStatus!=="succeeded"||t.evidencePolicy!=="v2-required"||typeof t.targetEpicId!="string"||!/^P[1-9][0-9]{0,11}$/.test(t.targetEpicId)||typeof t.graphRevision!="string"||!/^[a-f0-9]{64}$/.test(t.graphRevision)||!Array.isArray(t.acceptedStages)||t.acceptedStages.length!==14||!c(t.reviewDecision)||t.reviewDecision.decision!=="approved"||!c(t.completionEvidence)||t.completionEvidence.status!=="succeeded"||t.completionEvidence.stageCommand!=="update-memory"||!c(t.validationEvidence)||t.validationEvidence.status!=="passed"||t.validationEvidence.stageCommand!=="update-memory"||typeof t.completionEvidence.receiptId!="string"||!/^[a-f0-9]{64}$/.test(t.completionEvidence.receiptId)||typeof t.validationEvidence.receiptId!="string"||!/^[a-f0-9]{64}$/.test(t.validationEvidence.receiptId))throw new Error("architecture-terminal-memory-evidence-incomplete");const n=B(U(["--verify","--project-root",e])),o=l("git",["rev-parse","HEAD"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(!/^[a-f0-9]{40}$/.test(o))throw new Error("architecture-terminal-memory-head-invalid");const i=I(p(e,"NEOCORTEX.md")),f=l("git",["show","HEAD:NEOCORTEX.md"],{cwd:e,stdio:["ignore","pipe","ignore"],maxBuffer:65536});if(!i.equals(f)||C(i)!==n.canonicalSha256)throw new Error("architecture-terminal-memory-uncommitted");const v=[...new Set(["NEOCORTEX.md",...q().flatMap(r=>[r.primaryFile,...r.secondaryFiles.filter(d=>d.scope==="project").map(d=>d.path)])])];if(l("git",["diff","--name-only","HEAD","--",...v],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim())throw new Error("architecture-terminal-memory-uncommitted");const m={schemaVersion:"ArchitectureTerminalMemoryReceipt/1",targetEpicId:t.targetEpicId,graphRevision:t.graphRevision,sourceHead:o,canonicalSha256:n.canonicalSha256,projectionSha256:n.projectionSha256,fileCount:n.fileCount,completionReceiptId:t.completionEvidence.receiptId,validationReceiptId:t.validationEvidence.receiptId},s=C(JSON.stringify(m));return{...m,receiptId:s,status:"passed",evidenceIds:[`memory-physical-${s.slice(0,24)}`],publicSafe:!0}}function _(e){const t=S(e),n=l("git",["rev-parse","--show-toplevel"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(O(t)!==t||S(n)!==t)throw new Error("architecture-terminal-memory-project-root-invalid");const o=p(t,".neocortex"),i=p(o,"state.json"),f=p(o,"state.json.architecture.lock"),v=y(f,"wx",384);let a;try{const m=b(i);if(!m.isFile()||m.isSymbolicLink())throw new Error("architecture-terminal-memory-state-invalid");const s=I(i,"utf8"),r=JSON.parse(s);if(!c(r)||!c(r.archPlan)||!c(r.archPlan.execution)||!c(r.epics)||r.scope&&c(r.scope)&&r.scope.kind==="projected"||!Object.hasOwn(r.epics,String(r.archPlan.execution.targetEpicId))||r.archPlan.execution.terminalMemoryCheckpoint!==void 0)throw new Error("architecture-terminal-memory-state-invalid");const d=M(t,r.archPlan.execution),R=l("git",["rev-parse","--git-common-dir"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim(),g=X(R)?S(R):S(t,R);if(O(g)!==g||b(g).isSymbolicLink())throw new Error("architecture-terminal-memory-backup-dir-invalid");const E=p(g,"neocortex-architecture");J(E,{recursive:!0,mode:448});const u=b(E);if(!u.isDirectory()||u.isSymbolicLink()||u.uid!==process.getuid?.()||(u.mode&63)!==0)throw new Error("architecture-terminal-memory-backup-dir-invalid");if(I(i,"utf8")!==s)throw new Error("architecture-terminal-memory-state-conflict");const P=V(),D=p(E,`state-backup-${P}.json`),k=y(D,"wx",384);try{H(k,s),w(k)}finally{h(k)}const A=y(E,"r");try{w(A)}finally{h(A)}const N={...r,archPlan:{...r.archPlan,execution:{...r.archPlan.execution,terminalMemoryCheckpoint:d}}};a=p(o,`state.json.architecture-tmp-${P}`);const j=y(a,"wx",384);try{H(j,`${JSON.stringify(N,null,2)}
|
|
2
|
+
`),w(j)}finally{h(j)}if(I(i,"utf8")!==s)throw new Error("architecture-terminal-memory-state-conflict");if(M(t,r.archPlan.execution).receiptId!==d.receiptId)throw new Error("architecture-terminal-memory-physical-conflict");L(a,i),a=void 0;const $=y(o,"r");try{w($)}finally{h($)}return d}finally{if(a)try{T(a)}catch{}h(v),T(f)}}async function x(e){try{if(e[0]!=="seal"||e.length!==1&&e.length!==3||e.length===3&&e[1]!=="--project-root")throw new Error("usage: architecture-memory seal [--project-root <path>]");const t=_(e.length===3?e[2]:process.cwd());return console.log(`Architecture memory sealed: receipt=${t.receiptId} head=${t.sourceHead} files=${t.fileCount}`),0}catch(t){return console.error(t instanceof Error?t.message:String(t)),1}}export{Z as acceptedArchitectureTerminalMemoryReceipt,x as architectureMemoryTerminalCliHandler,M as deriveArchitectureTerminalMemoryReceipt,_ as sealArchitectureTerminalMemory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash as f}from"node:crypto";import{execFileSync as u}from"node:child_process";import{lstatSync as w,realpathSync as n}from"node:fs";import{join as i,resolve as p}from"node:path";const g=/^P[1-9][0-9]{0,11}$/,v=/^[a-f0-9]{40,64}$/;function x(s){return s.match(/^\s*\*?arch-plan\s+"[^"\n]{1,4096}"\s+@docs\/epics\/epic-(P[1-9][0-9]{0,11})\.md\s*$/)?.[1]}function P(s,r){if(!g.test(r))throw new Error("architecture-root-epic-binding-invalid");const t=p(s),e=`docs/epics/epic-${r}.md`,a=i(t,e);try{if(n(t)!==t)throw new Error("architecture-root-epic-binding-invalid");if(n(i(t,"docs"))!==i(t,"docs")||n(i(t,"docs","epics"))!==i(t,"docs","epics")||n(a)!==a)throw new Error("architecture-root-epic-binding-invalid");const h=w(a);if(!h.isFile()||h.isSymbolicLink()||h.size>256*1024)throw new Error("architecture-root-epic-binding-invalid");const o=l=>u("git",[...l],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"],maxBuffer:1024*1024}).trim();if(p(o(["rev-parse","--show-toplevel"]))!==t)throw new Error("architecture-root-epic-binding-invalid");const c=o(["rev-parse","--verify",`HEAD:${e}`]),d=o(["hash-object","--",e]),m=o(["ls-files","--stage","--",e]).match(/^100644 ([a-f0-9]{40,64}) 0\t/);if(!v.test(c)||d!==c||m?.[1]!==c)throw new Error("architecture-root-epic-binding-invalid");return f("sha256").update(`architecture-committed-epic-v1\0${r}\0${c}`).digest("hex")}catch{throw new Error("architecture-root-epic-binding-invalid")}}export{P as deriveCommittedArchitectureEpicGraphRevision,x as explicitArchitectureEpicTarget};
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
*
|
|
11
11
|
* See the LICENSE file in the project root for full license text.
|
|
12
12
|
*/
|
|
13
|
+
import { type PactAnswerReceipt } from './architecture-answers.js';
|
|
13
14
|
import type { YoloopPersistedState } from '../yoloop/shared-yoloop-types.js';
|
|
15
|
+
import { type StateMigrationAuthorityV1 } from '../migrations/state-json.js';
|
|
14
16
|
import { type RunnerBootstrapPolicyDecision } from '../continuity/runner-bootstrap-policy.js';
|
|
15
|
-
import { type RunnerSchedulerBootstrapOptions, type RunnerSchedulerBootstrapResult } from '../runner/scheduler.js';
|
|
17
|
+
import { observeRunnerOperationalStatus, type RunnerSchedulerBootstrapOptions, type RunnerSchedulerBootstrapResult, type RunnerOperationalStatusV1 } from '../runner/scheduler.js';
|
|
16
18
|
import { type ContinuityProcessingSummaryCursorTarget } from '../continuity/continuity-client-state-store.js';
|
|
17
19
|
import type { ProjectEvidenceEnvelope } from '../evidence/types.js';
|
|
18
20
|
import { detectNativeHostAttestation } from '../adapters/platform-detector.js';
|
|
@@ -23,7 +25,8 @@ import { type InvokeInputEvidenceV1, type InvokeInputEnvelopeV2, type InvokeInpu
|
|
|
23
25
|
import { type P205TransientExecutionAuthority } from '../git/git-lifecycle-store.js';
|
|
24
26
|
export declare const INVOKE_PAYLOAD_LIMIT_BYTES: number;
|
|
25
27
|
export declare const INVOKE_PAYLOAD_WARNING_THRESHOLD_BYTES: number;
|
|
26
|
-
|
|
28
|
+
type EpicClaimCommand = 'create-epic' | 'idea-diagnose';
|
|
29
|
+
export declare function getOrCreatePendingEpicIdempotencyKey(projectRoot: string, args: string, command?: EpicClaimCommand): {
|
|
27
30
|
readonly key: string;
|
|
28
31
|
readonly fingerprint: string;
|
|
29
32
|
};
|
|
@@ -48,6 +51,8 @@ export interface InvokeOptions {
|
|
|
48
51
|
readonly watch?: boolean;
|
|
49
52
|
/** Test/integration seam for runner auto-bootstrap; CLI callers leave unset. */
|
|
50
53
|
readonly runnerBootstrapper?: InvokeRunnerSchedulerBootstrapper;
|
|
54
|
+
/** Test seam for request-only runner status; never selects a scheduler action. */
|
|
55
|
+
readonly runnerObserver?: typeof observeRunnerOperationalStatus;
|
|
51
56
|
/** Test/integration seam for recursion guard env; CLI callers leave unset. */
|
|
52
57
|
readonly environment?: NodeJS.ProcessEnv;
|
|
53
58
|
/** P205.05 exact outer transport policy; never inferred from response metadata. */
|
|
@@ -412,6 +417,10 @@ export interface StateSnapshot {
|
|
|
412
417
|
readonly reserved_ids: readonly string[];
|
|
413
418
|
};
|
|
414
419
|
readonly current_session?: StateSnapshotCurrentSession;
|
|
420
|
+
/** Bounded public architecture continuation checkpoint; never raw project state. */
|
|
421
|
+
readonly archPlan?: {
|
|
422
|
+
readonly execution: Readonly<Record<string, unknown>>;
|
|
423
|
+
};
|
|
415
424
|
/**
|
|
416
425
|
* P141.01 -- request-only scope metadata. Never persisted to state.json.
|
|
417
426
|
* `projected` snapshots mean omitted entries are unknown/out-of-scope for
|
|
@@ -450,12 +459,16 @@ export interface StateSnapshot {
|
|
|
450
459
|
* non-continuity commands.
|
|
451
460
|
*/
|
|
452
461
|
readonly runnerBootstrap?: InvokeRunnerBootstrapMetadata;
|
|
462
|
+
/** P222.21: request-only local scheduler observation, never canonical state. */
|
|
463
|
+
readonly runnerOperationalStatus?: RunnerOperationalStatusV1;
|
|
453
464
|
/**
|
|
454
465
|
* Request-only bounded structural evidence for architecture and UI review.
|
|
455
466
|
* It is never persisted, requires explicit --project-evidence opt-in, and
|
|
456
467
|
* grants no workflow or execution authority.
|
|
457
468
|
*/
|
|
458
469
|
readonly projectEvidence?: ProjectEvidenceEnvelope;
|
|
470
|
+
/** P222.18: complete-file migration proof, separate from projected state. */
|
|
471
|
+
readonly migrationAuthority?: StateMigrationAuthorityV1;
|
|
459
472
|
}
|
|
460
473
|
export declare function shouldCollectProjectEvidenceForInvoke(args: string): boolean;
|
|
461
474
|
interface InvokeResponse {
|
|
@@ -472,6 +485,29 @@ export interface InvokeArgsRef {
|
|
|
472
485
|
interface InvokeRequestBodyBase {
|
|
473
486
|
readonly projectRoot: string;
|
|
474
487
|
readonly stateSnapshot: StateSnapshot;
|
|
488
|
+
readonly architectureAnswerReceipt?: PactAnswerReceipt;
|
|
489
|
+
readonly pactExecutionInput?: {
|
|
490
|
+
readonly schemaVersion: 1;
|
|
491
|
+
readonly targetEpicId: string;
|
|
492
|
+
readonly graphRevision: string;
|
|
493
|
+
readonly answersSha256: string;
|
|
494
|
+
readonly specSha256: string;
|
|
495
|
+
readonly pathsSha256: string;
|
|
496
|
+
readonly endpointCount: number;
|
|
497
|
+
readonly pathCount: number;
|
|
498
|
+
readonly publicSafe: true;
|
|
499
|
+
};
|
|
500
|
+
readonly uxExecutionInput?: {
|
|
501
|
+
readonly schemaVersion: 1;
|
|
502
|
+
readonly targetEpicId: string;
|
|
503
|
+
readonly graphRevision: string;
|
|
504
|
+
readonly adapterId: 'storybook-react-vite' | 'storybook-nextjs-vite';
|
|
505
|
+
readonly authoritySha256: string;
|
|
506
|
+
readonly pathsSha256: string;
|
|
507
|
+
readonly screenCount: number;
|
|
508
|
+
readonly pathCount: number;
|
|
509
|
+
readonly publicSafe: true;
|
|
510
|
+
};
|
|
475
511
|
readonly platformTarget?: string;
|
|
476
512
|
readonly nativeHostAttestation?: ReturnType<typeof detectNativeHostAttestation>;
|
|
477
513
|
readonly privateExecution?: {
|
|
@@ -598,6 +634,11 @@ export declare function isEpicAwareCommandId(commandId: string | null | undefine
|
|
|
598
634
|
*/
|
|
599
635
|
export declare function assertEpicAwareStateShapeBeforeRepair(projectRoot: string, options?: EpicAwareStateShapeOptions): EpicAwareStateShapeResult;
|
|
600
636
|
export declare function collectStateSnapshot(projectRoot: string, options?: StateSnapshotCollectionOptions): StateSnapshot;
|
|
637
|
+
/** Only this immutable second-parent lineage can be projected before later first-parent checkpoints. */
|
|
638
|
+
export declare function boundedP222PremergeCheckpointPositions(projectRoot: string, firstParentHeads: readonly string[]): ReadonlyMap<string, {
|
|
639
|
+
readonly headSha: string;
|
|
640
|
+
readonly position: number;
|
|
641
|
+
}>;
|
|
601
642
|
export declare function collectInvokeP205Authorities(projectRoot: string, args: string, commandId: string | null | undefined): Promise<Readonly<Record<string, P205TransientExecutionAuthority>>>;
|
|
602
643
|
export declare function createFullStateSnapshotScope(trigger: string, snapshot: Pick<StateSnapshot, 'stories' | 'epics'>): FullStateSnapshotScope;
|
|
603
644
|
interface SendResult {
|