@ornexus/neocortex 4.65.1 → 4.66.1
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 +1206 -1193
- package/install.ps1 +243 -77
- package/install.sh +221 -102
- package/package.json +2 -2
- package/packages/client/dist/adapters/platform-detector.js +1 -1
- package/packages/client/dist/agent/refresh-stubs.d.ts +50 -0
- package/packages/client/dist/agent/refresh-stubs.js +2 -2
- package/packages/client/dist/cli.js +5 -4
- package/packages/client/dist/commands/doctor.d.ts +26 -1
- package/packages/client/dist/commands/doctor.js +2 -2
- package/packages/client/dist/commands/invoke.d.ts +183 -5
- package/packages/client/dist/commands/invoke.js +94 -87
- package/packages/client/dist/commands/planning-qa.d.ts +64 -0
- package/packages/client/dist/commands/planning-qa.js +1 -0
- package/packages/client/dist/commands/refactor-control.js +3 -3
- package/packages/client/dist/commands/story-checkpoint.d.ts +3 -1
- package/packages/client/dist/commands/story-checkpoint.js +1 -1
- package/packages/client/dist/commands/story-worktree.d.ts +1 -1
- package/packages/client/dist/commands/story-worktree.js +1 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +64 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -3
- package/packages/client/dist/git/epic-lifecycle-evidence.d.ts +184 -0
- package/packages/client/dist/git/epic-lifecycle-evidence.js +6 -0
- package/packages/client/dist/git/git-lifecycle-store.d.ts +23 -0
- package/packages/client/dist/git/git-lifecycle-store.js +9 -8
- package/packages/client/dist/git/governance-runtime-store.d.ts +172 -0
- package/packages/client/dist/git/governance-runtime-store.js +3 -0
- package/packages/client/dist/git/story-worktree-cleanup.js +1 -1
- package/packages/client/dist/git/story-worktree-integration.js +3 -3
- package/packages/client/dist/git/story-worktree-manager.d.ts +39 -0
- package/packages/client/dist/git/story-worktree-manager.js +3 -3
- package/packages/client/dist/git/story-write-set-extension.d.ts +62 -0
- package/packages/client/dist/git/story-write-set-extension.js +1 -1
- package/packages/client/dist/memory/shared-project-memory-types.d.ts +39 -2
- package/packages/client/dist/memory/shared-project-memory-types.js +2 -2
- package/packages/client/dist/policy/subagent-approval-policy.js +1 -1
- package/packages/client/dist/private-execution/codex-executor.d.ts +21 -1
- package/packages/client/dist/private-execution/codex-executor.js +4 -4
- package/packages/client/dist/private-execution/delivery.d.ts +17 -11
- package/packages/client/dist/private-execution/delivery.js +8 -6
- package/packages/client/dist/private-execution/diagnosis-root-review.d.ts +89 -0
- package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -2
- package/packages/client/dist/private-execution/frozen-handoff.js +3 -3
- package/packages/client/dist/private-execution/harness-adapters/antigravity.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/antigravity.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/claude-code.d.ts +8 -0
- package/packages/client/dist/private-execution/harness-adapters/claude-code.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/codex.d.ts +7 -0
- package/packages/client/dist/private-execution/harness-adapters/codex.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/copilot-cli.d.ts +8 -0
- package/packages/client/dist/private-execution/harness-adapters/copilot-cli.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/cursor.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/cursor.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/deepseek.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/deepseek.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/gemini.d.ts +8 -0
- package/packages/client/dist/private-execution/harness-adapters/gemini.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/grok.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/grok.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/index.d.ts +73 -0
- package/packages/client/dist/private-execution/harness-adapters/index.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/kimi.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/kimi.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/openclaw.d.ts +9 -0
- package/packages/client/dist/private-execution/harness-adapters/openclaw.js +1 -0
- package/packages/client/dist/private-execution/harness-adapters/opencode.d.ts +7 -0
- package/packages/client/dist/private-execution/harness-adapters/opencode.js +1 -0
- package/packages/client/dist/private-execution/harness-ephemeral-home.d.ts +19 -0
- package/packages/client/dist/private-execution/harness-ephemeral-home.js +1 -0
- package/packages/client/dist/private-execution/harness-executor.d.ts +79 -0
- package/packages/client/dist/private-execution/harness-executor.js +1 -0
- package/packages/client/dist/private-execution/harness-process.d.ts +43 -0
- package/packages/client/dist/private-execution/harness-process.js +1 -0
- package/packages/client/dist/private-execution/isolated-admission.js +12 -12
- package/packages/client/dist/private-execution/isolated-workspace.d.ts +16 -1
- package/packages/client/dist/private-execution/isolated-workspace.js +1 -1
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.d.ts +75 -1
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -5
- package/packages/client/dist/private-execution/planning-generation-checkpoint.d.ts +9 -1
- package/packages/client/dist/private-execution/planning-generation-checkpoint.js +4 -4
- package/packages/client/dist/private-execution/planning-research-checkpoint.d.ts +9 -1
- package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -4
- package/packages/client/dist/private-execution/root-memory-request.d.ts +4 -1
- package/packages/client/dist/private-execution/root-memory-request.js +1 -1
- package/packages/client/dist/runner/epic-background-dispatcher.d.ts +3 -1
- package/packages/client/dist/runner/epic-background-dispatcher.js +1 -1
- package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -1
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +1 -22
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +6 -10
- package/packages/client/dist/runner/headless/managed-profile.d.ts +20 -0
- package/packages/client/dist/runner/headless/managed-profile.js +1 -1
- package/packages/client/dist/runner/headless/opencode-adapter.js +2 -2
- package/packages/client/dist/runner/headless/run-yoloop.d.ts +40 -0
- package/packages/client/dist/runner/headless/run-yoloop.js +2 -2
- package/packages/client/dist/runner/headless/types.d.ts +20 -0
- package/packages/client/dist/runner/headless/types.js +2 -2
- package/packages/client/dist/state/project-state-snapshot.d.ts +10 -0
- package/packages/client/dist/state/project-state-snapshot.js +1 -1
- package/packages/client/dist/state/structural-dag-projection.d.ts +26 -0
- package/packages/client/dist/state/structural-dag-projection.js +1 -1
- package/packages/client/dist/yoloop/target-normalization.js +1 -1
- package/packages/client/dist/yoloop/yoloop-client-state-store.d.ts +67 -0
- package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1
- package/packages/shared/dist/compatibility/index.js +96 -0
- package/packages/shared/dist/planning/diagnosis-state.js +105 -1
- package/packages/shared/dist/project-memory-targets.js +36 -5
- package/targets-stubs/antigravity/README.md +1 -1
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/install-antigravity.sh +1 -1
- package/targets-stubs/antigravity/mcp-config.json +0 -3
- package/targets-stubs/antigravity/neocortex.md +25 -13
- package/targets-stubs/antigravity/skill/SKILL.md +4 -4
- package/targets-stubs/claude-code/.mcp.json +0 -4
- package/targets-stubs/claude-code/neocortex-root.agent.yaml +2 -4
- package/targets-stubs/claude-code/neocortex-root.md +33 -43
- package/targets-stubs/claude-code/neocortex-sentinel.md +261 -0
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -3
- package/targets-stubs/claude-code/neocortex.md +61 -84
- package/targets-stubs/codex/AGENTS.md +19 -18
- package/targets-stubs/codex/README.md +1 -1
- package/targets-stubs/codex/config-mcp.toml +0 -3
- package/targets-stubs/codex/neocortex-sentinel.toml +87 -0
- package/targets-stubs/codex/neocortex.toml +23 -44
- package/targets-stubs/cursor/README.md +1 -1
- package/targets-stubs/cursor/agent.md +26 -15
- package/targets-stubs/cursor/mcp.json +0 -3
- package/targets-stubs/deepseek-harness/SKILL.md +11 -8
- package/targets-stubs/gemini-cli/README.md +1 -1
- package/targets-stubs/gemini-cli/agent.md +25 -12
- package/targets-stubs/gemini-cli/agents/neocortex-sentinel.md +75 -0
- package/targets-stubs/gemini-cli/agents/neocortex.md +280 -49
- package/targets-stubs/gemini-cli/settings-mcp.json +0 -3
- package/targets-stubs/grok/SKILL.md +13 -1
- package/targets-stubs/grok/agents/neocortex-sentinel.md +64 -0
- package/targets-stubs/grok/config-mcp.toml +0 -3
- package/targets-stubs/grok/install-grok.sh +51 -1
- package/targets-stubs/kimi/mcp.json +0 -6
- package/targets-stubs/kimi/neocortex.md +21 -8
- package/targets-stubs/lib/managed-config-merge.js +301 -6
- package/targets-stubs/lib/managed-profile.sh +12 -1
- package/targets-stubs/lib/mcp-merge.js +122 -8
- package/targets-stubs/openclaw/SKILL.md +33 -4
- package/targets-stubs/opencode/neocortex-root.md +41 -41
- package/targets-stubs/opencode/neocortex-sentinel.md +115 -0
- package/targets-stubs/opencode/neocortex.md +292 -67
- package/targets-stubs/opencode/opencode-mcp.json +0 -7
- package/targets-stubs/vscode/README.md +1 -1
- package/targets-stubs/vscode/mcp.json +0 -4
- package/targets-stubs/vscode/neocortex.agent.md +29 -18
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PrivateYoloSkippedPredecessor, type PrivateQaSkippedPredecessor, type PrivateQaStructuralAdmission } from './shared-private-admission-types.js';
|
|
2
|
+
import { type PrivateExecutionHostKind } from '../../../shared/dist/compatibility/index.js';
|
|
2
3
|
export declare const PRIVATE_EXECUTION_PUBLIC_INSTRUCTION_V1 = "# Neocortex private execution pending\n\nThe authorized Codex CLI executor must consume the one-time delivery and produce a physical receipt.";
|
|
3
4
|
export declare const PRIVATE_REPORT_PUBLIC_INSTRUCTION_V1 = "# Private review report ready\n\nThe compatible local client must consume the one-time report and save it in owner-private storage. No report content is included in this public response.";
|
|
4
5
|
/** Public token only; the protected QA step identifier never ships in the client. */
|
|
@@ -36,6 +37,11 @@ export declare function isPrivatePlanningRootPublicEnvelope(value: unknown, expe
|
|
|
36
37
|
readonly epicId: string;
|
|
37
38
|
readonly memoryReceiptId?: string;
|
|
38
39
|
}): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* P228.09 expand/contract (DEC-02): the server emits only the native-research wording;
|
|
42
|
+
* the client also keeps reading the legacy wording so it can ship before the server.
|
|
43
|
+
*/
|
|
44
|
+
export declare function planningNativeResearchPreparation(epicId: string): string;
|
|
39
45
|
/** Reject a prompt-shaped server regression before any CLI output or writeback. */
|
|
40
46
|
export declare function isPrivateExecutionPublicEnvelope(value: unknown): boolean;
|
|
41
47
|
export interface PrivateExecutionPublicBindingV1 {
|
|
@@ -45,7 +51,7 @@ export interface PrivateExecutionPublicBindingV1 {
|
|
|
45
51
|
readonly graphRevision: string;
|
|
46
52
|
readonly generationId: string;
|
|
47
53
|
readonly inputSha256: string;
|
|
48
|
-
readonly hostKind:
|
|
54
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
49
55
|
readonly hostVersion: string;
|
|
50
56
|
}
|
|
51
57
|
export interface PrivateExecutionPublicStepBindingV2 {
|
|
@@ -58,7 +64,7 @@ export interface PrivateExecutionPublicStepBindingV2 {
|
|
|
58
64
|
readonly stateSnapshotSha256: string;
|
|
59
65
|
readonly generationId: string;
|
|
60
66
|
readonly inputSha256: string;
|
|
61
|
-
readonly hostKind:
|
|
67
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
62
68
|
readonly hostVersion: string;
|
|
63
69
|
}
|
|
64
70
|
export interface PrivateExecutionPublicEpicClaimBindingV3 {
|
|
@@ -73,7 +79,7 @@ export interface PrivateExecutionPublicEpicClaimBindingV3 {
|
|
|
73
79
|
readonly stateSnapshotSha256: string;
|
|
74
80
|
readonly generationId: string;
|
|
75
81
|
readonly inputSha256: string;
|
|
76
|
-
readonly hostKind:
|
|
82
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
77
83
|
readonly hostVersion: string;
|
|
78
84
|
}
|
|
79
85
|
export interface PrivateExecutionPublicProjectStepBindingV4 {
|
|
@@ -86,7 +92,7 @@ export interface PrivateExecutionPublicProjectStepBindingV4 {
|
|
|
86
92
|
readonly stateSnapshotSha256: string;
|
|
87
93
|
readonly generationId: string;
|
|
88
94
|
readonly inputSha256: string;
|
|
89
|
-
readonly hostKind:
|
|
95
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
90
96
|
readonly hostVersion: string;
|
|
91
97
|
}
|
|
92
98
|
export interface PrivateExecutionPublicArchitectureStageBindingV5 {
|
|
@@ -101,7 +107,7 @@ export interface PrivateExecutionPublicArchitectureStageBindingV5 {
|
|
|
101
107
|
readonly stateSnapshotSha256: string;
|
|
102
108
|
readonly generationId: string;
|
|
103
109
|
readonly inputSha256: string;
|
|
104
|
-
readonly hostKind:
|
|
110
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
105
111
|
readonly hostVersion: string;
|
|
106
112
|
}
|
|
107
113
|
export interface PrivateExecutionPublicPactStageBindingV6 {
|
|
@@ -120,7 +126,7 @@ export interface PrivateExecutionPublicPactStageBindingV6 {
|
|
|
120
126
|
readonly stateSnapshotSha256: string;
|
|
121
127
|
readonly generationId: string;
|
|
122
128
|
readonly inputSha256: string;
|
|
123
|
-
readonly hostKind:
|
|
129
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
124
130
|
readonly hostVersion: string;
|
|
125
131
|
}
|
|
126
132
|
export interface PrivateExecutionPublicUxStageBindingV7 {
|
|
@@ -139,7 +145,7 @@ export interface PrivateExecutionPublicUxStageBindingV7 {
|
|
|
139
145
|
readonly stateSnapshotSha256: string;
|
|
140
146
|
readonly generationId: string;
|
|
141
147
|
readonly inputSha256: string;
|
|
142
|
-
readonly hostKind:
|
|
148
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
143
149
|
readonly hostVersion: string;
|
|
144
150
|
}
|
|
145
151
|
export interface PrivateExecutionPublicPlanningStageBindingV8 {
|
|
@@ -157,7 +163,7 @@ export interface PrivateExecutionPublicPlanningStageBindingV8 {
|
|
|
157
163
|
readonly stateSnapshotSha256: string;
|
|
158
164
|
readonly generationId: string;
|
|
159
165
|
readonly inputSha256: string;
|
|
160
|
-
readonly hostKind:
|
|
166
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
161
167
|
readonly hostVersion: string;
|
|
162
168
|
}
|
|
163
169
|
export interface PrivateExecutionPublicPlanningGenerationBindingV9 {
|
|
@@ -176,7 +182,7 @@ export interface PrivateExecutionPublicPlanningGenerationBindingV9 {
|
|
|
176
182
|
readonly stateSnapshotSha256: string;
|
|
177
183
|
readonly generationId: string;
|
|
178
184
|
readonly inputSha256: string;
|
|
179
|
-
readonly hostKind:
|
|
185
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
180
186
|
readonly hostVersion: string;
|
|
181
187
|
}
|
|
182
188
|
export interface PrivateExecutionPublicPropertyTestBindingV10 {
|
|
@@ -197,7 +203,7 @@ export interface PrivateExecutionPublicPropertyTestBindingV10 {
|
|
|
197
203
|
readonly stateSnapshotSha256: string;
|
|
198
204
|
readonly generationId: string;
|
|
199
205
|
readonly inputSha256: string;
|
|
200
|
-
readonly hostKind:
|
|
206
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
201
207
|
readonly hostVersion: string;
|
|
202
208
|
}
|
|
203
209
|
export interface PrivateExecutionPublicReportBindingV11 {
|
|
@@ -210,7 +216,7 @@ export interface PrivateExecutionPublicReportBindingV11 {
|
|
|
210
216
|
readonly stateSnapshotSha256: string;
|
|
211
217
|
readonly generationId: string;
|
|
212
218
|
readonly inputSha256: string;
|
|
213
|
-
readonly hostKind:
|
|
219
|
+
readonly hostKind: PrivateExecutionHostKind;
|
|
214
220
|
readonly hostVersion: string;
|
|
215
221
|
}
|
|
216
222
|
export type PrivateExecutionPublicBinding = PrivateExecutionPublicBindingV1 | PrivateExecutionPublicStepBindingV2 | PrivateExecutionPublicEpicClaimBindingV3 | PrivateExecutionPublicProjectStepBindingV4 | PrivateExecutionPublicArchitectureStageBindingV5 | PrivateExecutionPublicPactStageBindingV6 | PrivateExecutionPublicUxStageBindingV7 | PrivateExecutionPublicPlanningStageBindingV8 | PrivateExecutionPublicPlanningGenerationBindingV9 | PrivateExecutionPublicPropertyTestBindingV10 | PrivateExecutionPublicReportBindingV11;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import{isPrivateYoloSkippedPredecessors as
|
|
1
|
+
import{isPrivateYoloSkippedPredecessors as V,isPrivateQaSkippedPredecessors as x,isPrivateQaStructuralAdmission as C}from"./shared-private-admission-types.js";import{createHash as y}from"node:crypto";import{isPrivateExecutionHostKind as R}from"../../../shared/dist/compatibility/index.js";const v=`# Neocortex private execution pending
|
|
2
2
|
|
|
3
|
-
The authorized Codex CLI executor must consume the one-time delivery and produce a physical receipt.`,
|
|
3
|
+
The authorized Codex CLI executor must consume the one-time delivery and produce a physical receipt.`,b=`# Private review report ready
|
|
4
4
|
|
|
5
|
-
The compatible local client must consume the one-time report and save it in owner-private storage. No report content is included in this public response.`,
|
|
5
|
+
The compatible local client must consume the one-time report and save it in owner-private storage. No report content is included in this public response.`,P="step-8721319d";function K(o,r){const i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c)?c:void 0,e=i(o),s=i(e?.metadata),t=i(s?.planningRootContinuation);if(!e||Object.keys(e).sort().join("|")!=="instructions|metadata"||!s||Object.keys(s).sort().join("|")!=="epicId|mode|planningRootContinuation|resolvedTrigger"||s.mode!=="continuity"||s.resolvedTrigger!=="create-epic"||!t||Object.keys(t).sort().join("|")!==["schemaVersion","owner","claimId","epicId","nextAction","nextCommand","planningComplete","publicSafe",...t.planningComplete===!0?["memoryReceiptId"]:[]].sort().join("|")||t.schemaVersion!==1||t.owner!=="root"||t.nextAction!==(t.nextCommand==="none"?"complete":t.nextCommand==="refresh-memory"?"root-memory":"delegate-stage")||t.planningComplete!==(t.nextCommand==="none")||t.publicSafe!==!0||t.claimId!==r.claimId||t.epicId!==r.epicId||s.epicId!==r.epicId||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(r.claimId)||!/^P[1-9][0-9]{0,11}$/.test(r.epicId)||!["idea-research","generate-epic","refresh-memory","none"].includes(String(t.nextCommand)))return!1;if(t.planningComplete===!0)return typeof r.memoryReceiptId=="string"&&/^[a-f0-9]{64}$/.test(r.memoryReceiptId)&&t.memoryReceiptId===r.memoryReceiptId&&e.instructions===`# Root planning complete
|
|
6
6
|
|
|
7
7
|
P01-P04 planning checkpoints were independently accepted. The client must acknowledge the same durable creation claim with the verified memory checkpoint. Stories, physical QA, provider and terminal accounting remain pending.`;if(t.nextCommand==="refresh-memory")return e.instructions===`# Root planning memory checkpoint
|
|
8
8
|
|
|
9
|
-
Reopen the committed P03 with planning-generation verify. Run local refresh-memory with an accurate note about the accepted plan; verify every project-memory target with refresh-memory --verify. Independently review and seal the physical memory checkpoint before resuming the original create-epic request. Do not implement stories or release quota.`;const a
|
|
9
|
+
Reopen the committed P03 with planning-generation verify. Run local refresh-memory with an accurate note about the accepted plan; verify every project-memory target with refresh-memory --verify. Independently review and seal the physical memory checkpoint before resuming the original create-epic request. Do not implement stories or release quota.`;const a=`Run *${t.nextCommand} ${t.epicId}. Independently review and seal its physical artifacts before resuming the original create-epic request. No story execution or terminal effect is authorized.`;return(t.nextCommand==="idea-research"?[T(t.epicId),A(t.epicId)]:[""]).some(c=>e.instructions===`# Root planning continuation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
${c}${a}`)}function T(o){return`Before P02, the root must research this epic with the harness's native research tools (web search/fetch, built-in documentation) and record official sources, queries and provenance in docs/research/epic-${o}/root-sources.md and root-sources.json. Keep private material out of external queries. The private executor has no web or MCP access.
|
|
12
12
|
|
|
13
|
-
${a}Run *${t.nextCommand} ${t.epicId}. Independently review and seal its physical artifacts before resuming the original create-epic request. No story execution or terminal effect is authorized.`}function T(o){if(!o||typeof o!="object"||Array.isArray(o))return!1;const n=o,i=n.metadata;if(Object.keys(n).sort().join(",")!=="instructions,metadata"||n.instructions!==l&&n.instructions!==v||!i||typeof i!="object"||Array.isArray(i))return!1;const e=i,s=e.privateExecution;let t;try{t=f(s)}catch{return!1}if(t.schemaVersion!==11&&n.instructions!==l)return!1;if(t.schemaVersion===2)return Object.keys(e).sort().join(",")===["mode","storyId","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&(e.mode==="step"&&(e.resolvedTrigger==="research"||e.resolvedTrigger==="write-spec"||e.resolvedTrigger==="create-tasks"||e.resolvedTrigger==="implement")&&t.binding.commandId===e.resolvedTrigger||e.mode==="pipeline"&&e.resolvedTrigger==="exec"&&t.binding.commandId==="exec")&&e.storyId===t.binding.storyId&&e.stepId===t.binding.stepId;if(t.schemaVersion===3){const g=e.epicClaim,p=g&&typeof g=="object"&&!Array.isArray(g)?g:void 0;return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution","epicClaim"].sort().join(",")&&(e.mode==="create-epic"&&e.resolvedTrigger==="create-epic"&&t.binding.commandId==="create-epic"&&(t.binding.writeSetId===void 0||t.binding.writeSetId==="idea-diagnosis-v1"&&t.binding.stepId==="step-acd455ed")||e.mode==="step"&&e.resolvedTrigger==="idea-diagnose"&&t.binding.commandId==="idea-diagnose"&&t.binding.writeSetId==="idea-diagnosis-v1")&&e.stepId===t.binding.stepId&&!!p&&Object.keys(p).sort().join(",")===["schemaVersion","claimId","epicId","outcome","publicSafe"].sort().join(",")&&p.schemaVersion===1&&p.outcome==="reserved"&&p.publicSafe===!0&&p.claimId===t.binding.claimId&&p.epicId===t.binding.epicId}if(t.schemaVersion===4){const g=e.mode==="utility"&&e.resolvedTrigger==="sync-openapi"&&t.binding.commandId==="sync-openapi"&&t.binding.writeSetId==="sync-openapi-contract-v1"||e.mode==="utility"&&e.resolvedTrigger==="chaos-plan"&&t.binding.commandId==="chaos-plan"&&t.binding.writeSetId==="chaos-quarterly-v1"||e.mode==="tech-debt"&&e.resolvedTrigger==="tech-debt"&&t.binding.commandId==="tech-debt"&&t.binding.writeSetId==="tech-debt-registry-v1";return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.stepId===t.binding.stepId&&g}if(t.schemaVersion===11)return n.instructions===v&&Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="ui-ux-review"&&e.resolvedTrigger==="ui-ux-review"&&e.stepId===t.binding.stepId;if(t.schemaVersion===5)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger===t.binding.commandId&&e.stepId===t.binding.stepId&&(t.binding.commandId==="arch-prd"&&t.binding.writeSetId==="arch-prd-docs-v1"||t.binding.commandId==="arch-architecture"&&t.binding.writeSetId==="arch-architecture-doc-v1"||t.binding.commandId==="arch-fitness-functions"&&t.binding.writeSetId==="arch-fitness-tools-v1"||t.binding.commandId==="arch-api-contracts"&&t.binding.writeSetId==="arch-api-contracts-docs-v1"||t.binding.commandId==="arch-api-integrations"&&t.binding.writeSetId==="arch-api-integrations-doc-v1"||t.binding.commandId==="arch-database"&&t.binding.writeSetId==="arch-database-doc-v1"||t.binding.commandId==="arch-security"&&t.binding.writeSetId==="arch-security-doc-v1"||t.binding.commandId==="arch-design-system"&&t.binding.writeSetId==="arch-design-system-doc-v1"||t.binding.commandId==="arch-performance"&&t.binding.writeSetId==="arch-performance-doc-v1"||t.binding.commandId==="arch-testing"&&t.binding.writeSetId==="arch-testing-doc-v1"||t.binding.commandId==="arch-infrastructure"&&t.binding.writeSetId==="arch-infrastructure-doc-v1"||t.binding.commandId==="arch-review"&&t.binding.writeSetId==="arch-review-doc-v1"||t.binding.commandId==="update-memory"&&t.binding.writeSetId==="arch-memory-canonical-v1");if(t.schemaVersion===6)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="generate-pacts"&&e.stepId===t.binding.stepId;if(t.schemaVersion===7)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="arch-ux-design"&&e.stepId===t.binding.stepId;if(t.schemaVersion===8)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="idea-research"&&e.stepId===t.binding.stepId&&t.binding.commandId==="idea-research"&&t.binding.writeSetId==="idea-research-v1";if(t.schemaVersion===9)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="generate-epic"&&e.stepId===t.binding.stepId&&t.binding.commandId==="generate-epic"&&t.binding.writeSetId==="generate-epic-v1";if(t.schemaVersion===10)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="utility"&&e.resolvedTrigger==="property-test"&&e.stepId===t.binding.stepId&&t.binding.commandId==="property-test";const a=e.privateExecutionRootAction,d=e.stepId===j,h=e.mutationQaFeature,m=h&&typeof h=="object"&&!Array.isArray(h)?h:void 0,y=["mode","storyId","stepId","resolvedTrigger","gitLifecycleGraphAuthority","privateExecution",...d?["mutationQaFeature"]:[],...a===void 0?[]:["privateExecutionRootAction"]],u=e.gitLifecycleGraphAuthority,c=u&&typeof u=="object"&&!Array.isArray(u)?u:void 0,r=a&&typeof a=="object"&&!Array.isArray(a)?a:void 0;return(!d||!!m&&Object.keys(m).sort().join(",")===["schemaVersion","id","enabled","publicSafe"].sort().join(",")&&m.schemaVersion===1&&m.id==="mutation-testing"&&typeof m.enabled=="boolean"&&m.publicSafe===!0)&&Object.keys(e).sort().join(",")===y.sort().join(",")&&e.mode==="yolo"&&e.resolvedTrigger==="yolo"&&typeof e.storyId=="string"&&typeof e.stepId=="string"&&!!c&&c.storyId===e.storyId&&c.graphRevision===t.binding.graphRevision&&t.binding.commandId==="yolo"&&t.binding.stepId===e.stepId&&(a===void 0||!!r&&Object.keys(r).sort().join(",")===["schemaVersion","action","storyId","executionBranch","graphRevision","publicSafe",...r.action!=="prepare-epic-checkout"?["stepId"]:[],...r.action==="review-test-validation-candidate"?["skippedPredecessors"]:[],...r.action==="review-qa-candidate"?["skippedPredecessors","structuralPrecheck"]:[]].sort().join(",")&&r.schemaVersion===1&&(r.action==="prepare-epic-checkout"||r.action==="checkpoint-epic-story"||r.action==="review-diagnosis-candidate"&&e.stepId==="step-50224b19"||r.action==="review-project-memory-candidate"&&e.stepId==="step-638cc252"||r.action==="review-research-candidate"&&e.stepId==="step-f757f6bf"||r.action==="review-specification-candidate"&&e.stepId==="step-9cd927d0"||r.action==="review-tasks-candidate"&&e.stepId==="step-a3f880e8"||r.action==="review-implementation-candidate"&&e.stepId==="step-41803e35"||r.action==="review-refactor-advisory-candidate"&&e.stepId==="step-fe2e4997"||r.action==="review-test-validation-candidate"&&e.stepId==="step-b2fe7cb5"&&b(r.skippedPredecessors)||r.action==="review-qa-candidate"&&e.stepId==="step-8721319d"&&S(r.skippedPredecessors)&&w(r.structuralPrecheck)&&r.structuralPrecheck.graphRevision===c.graphRevision&&r.structuralPrecheck.generationId===t.binding.generationId)&&(r.action==="prepare-epic-checkout"||r.stepId===e.stepId)&&r.publicSafe===!0&&r.storyId===e.storyId&&r.storyId===c.storyId&&r.executionBranch===c.executionBranch&&r.graphRevision===c.graphRevision)}function A(o){return I("sha256").update("private-step-state-v1\0").update(JSON.stringify(o)).digest("hex")}function f(o,n){if(!o||typeof o!="object"||Array.isArray(o))throw new Error("private-execution-descriptor-invalid");const i=o,e=i.binding,s=i.schemaVersion===2||i.schemaVersion===3||i.schemaVersion===4||i.schemaVersion===5||i.schemaVersion===6||i.schemaVersion===7||i.schemaVersion===8||i.schemaVersion===9||i.schemaVersion===10||i.schemaVersion===11,t=s?["schemaVersion","authorityKind","projectId","commandId","stepId",...i.schemaVersion===3?["claimId","epicId",...e?.commandId==="idea-diagnose"||e?.writeSetId!==void 0?["writeSetId"]:[]]:i.schemaVersion===4?["writeSetId"]:i.schemaVersion===5?["targetEpicId","graphRevision","writeSetId"]:i.schemaVersion===6?["targetEpicId","graphRevision","answersSha256","specSha256","pathsSha256","endpointCount","pathCount"]:i.schemaVersion===7?["targetEpicId","graphRevision","adapterId","authoritySha256","pathsSha256","screenCount","pathCount"]:i.schemaVersion===8?["claimId","epicId","diagnosisReceiptId","intakeRevision","physicalAcceptanceReceiptId","writeSetId"]:i.schemaVersion===9?["claimId","epicId","diagnosisReceiptId","researchReceiptId","intakeRevision","physicalAcceptanceReceiptId","writeSetId"]:i.schemaVersion===10?["prdPath","prdSha256","planSha256","pathsSha256","aggregateCount","invariantCount","pathCount","language","numRuns"]:i.schemaVersion===11?["format"]:["storyId"],"stateSnapshotSha256","generationId","inputSha256","hostKind","hostVersion"]:["commandId","generationId","graphRevision","hostKind","hostVersion","inputSha256","projectId","stepId"];if(Object.keys(i).sort().join(",")!==["schemaVersion","leaseId","materialSha256","byteLength","expiresAt","delivery","publicSafe","binding"].sort().join(",")||i.schemaVersion!==1&&!s||i.delivery!=="private-one-time"||i.publicSafe!==!0||typeof i.leaseId!="string"||!/^px_[a-f0-9]{48}$/.test(i.leaseId)||typeof i.materialSha256!="string"||!/^[a-f0-9]{64}$/.test(i.materialSha256)||!Number.isSafeInteger(i.byteLength)||i.byteLength<1||i.byteLength>256*1024||typeof i.expiresAt!="string"||!Number.isFinite(Date.parse(i.expiresAt))||!e||Object.keys(e).sort().join(",")!==t.sort().join(",")||Object.entries(e).some(([a,d])=>a!=="schemaVersion"&&a!=="endpointCount"&&a!=="screenCount"&&a!=="pathCount"&&a!=="aggregateCount"&&a!=="invariantCount"&&a!=="numRuns"&&(typeof d!="string"||d.length<1||d.length>256))||!/^[a-f0-9]{64}$/.test(String(e.inputSha256))||e.hostKind!=="codex-cli"||s&&!/^[a-f0-9]{64}$/.test(String(e.stateSnapshotSha256))||i.schemaVersion===2&&(e.schemaVersion!==2||e.authorityKind!=="state-snapshot"||!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(String(e.storyId)))||i.schemaVersion===3&&(e.schemaVersion!==3||e.authorityKind!=="epic-claim"||!(e.commandId==="create-epic"&&(e.writeSetId===void 0||e.writeSetId==="idea-diagnosis-v1"&&e.stepId==="step-acd455ed")||e.commandId==="idea-diagnose"&&e.writeSetId==="idea-diagnosis-v1")||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]*$/.test(String(e.epicId)))||i.schemaVersion===4&&(e.schemaVersion!==4||e.authorityKind!=="project-snapshot"||!(e.commandId==="sync-openapi"&&e.writeSetId==="sync-openapi-contract-v1"||e.commandId==="tech-debt"&&e.writeSetId==="tech-debt-registry-v1"||e.commandId==="chaos-plan"&&e.writeSetId==="chaos-quarterly-v1"))||i.schemaVersion===11&&(e.schemaVersion!==11||e.authorityKind!=="private-report"||e.commandId!=="ui-ux-review"||!["markdown","json"].includes(String(e.format))||!/^sha256:[a-f0-9]{64}$/.test(String(e.generationId))||i.materialSha256!==String(e.generationId).slice(7))||i.schemaVersion===5&&(e.schemaVersion!==5||e.authorityKind!=="architecture-stage"||!(e.commandId==="arch-prd"&&e.writeSetId==="arch-prd-docs-v1"||e.commandId==="arch-architecture"&&e.writeSetId==="arch-architecture-doc-v1"||e.commandId==="arch-fitness-functions"&&e.writeSetId==="arch-fitness-tools-v1"||e.commandId==="arch-api-contracts"&&e.writeSetId==="arch-api-contracts-docs-v1"||e.commandId==="arch-api-integrations"&&e.writeSetId==="arch-api-integrations-doc-v1"||e.commandId==="arch-database"&&e.writeSetId==="arch-database-doc-v1"||e.commandId==="arch-security"&&e.writeSetId==="arch-security-doc-v1"||e.commandId==="arch-design-system"&&e.writeSetId==="arch-design-system-doc-v1"||e.commandId==="arch-performance"&&e.writeSetId==="arch-performance-doc-v1"||e.commandId==="arch-testing"&&e.writeSetId==="arch-testing-doc-v1"||e.commandId==="arch-infrastructure"&&e.writeSetId==="arch-infrastructure-doc-v1"||e.commandId==="arch-review"&&e.writeSetId==="arch-review-doc-v1"||e.commandId==="update-memory"&&e.writeSetId==="arch-memory-canonical-v1")||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision)))||i.schemaVersion===6&&(e.schemaVersion!==6||e.authorityKind!=="pact-stage"||e.commandId!=="generate-pacts"||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision))||!/^[a-f0-9]{64}$/.test(String(e.answersSha256))||!/^[a-f0-9]{64}$/.test(String(e.specSha256))||!/^[a-f0-9]{64}$/.test(String(e.pathsSha256))||!Number.isSafeInteger(e.endpointCount)||e.endpointCount<1||e.endpointCount>256||!Number.isSafeInteger(e.pathCount)||e.pathCount<e.endpointCount||e.pathCount>e.endpointCount+1)||i.schemaVersion===7&&(e.schemaVersion!==7||e.authorityKind!=="ux-stage"||e.commandId!=="arch-ux-design"||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision))||!["storybook-react-vite","storybook-nextjs-vite"].includes(String(e.adapterId))||!/^[a-f0-9]{64}$/.test(String(e.authoritySha256))||!/^[a-f0-9]{64}$/.test(String(e.pathsSha256))||!Number.isSafeInteger(e.screenCount)||e.screenCount<1||e.screenCount>48||!Number.isSafeInteger(e.pathCount)||e.pathCount!==e.screenCount*6+3)||i.schemaVersion===8&&(e.schemaVersion!==8||e.authorityKind!=="planning-stage"||e.commandId!=="idea-research"||e.writeSetId!=="idea-research-v1"||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]{0,11}$/.test(String(e.epicId))||[e.diagnosisReceiptId,e.intakeRevision,e.physicalAcceptanceReceiptId].some(a=>!/^[a-f0-9]{64}$/.test(String(a))))||i.schemaVersion===9&&(e.schemaVersion!==9||e.authorityKind!=="planning-generation"||e.commandId!=="generate-epic"||e.writeSetId!=="generate-epic-v1"||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]{0,11}$/.test(String(e.epicId))||[e.diagnosisReceiptId,e.researchReceiptId,e.intakeRevision,e.physicalAcceptanceReceiptId].some(a=>!/^[a-f0-9]{64}$/.test(String(a))))||i.schemaVersion===10&&(e.schemaVersion!==10||e.authorityKind!=="property-test-plan"||e.commandId!=="property-test"||!["prd.md","docs/architecture/prd.md"].includes(String(e.prdPath))||[e.prdSha256,e.planSha256,e.pathsSha256].some(a=>!/^[a-f0-9]{64}$/.test(String(a)))||!Number.isSafeInteger(e.aggregateCount)||e.aggregateCount<1||e.aggregateCount>64||!Number.isSafeInteger(e.invariantCount)||e.invariantCount<e.aggregateCount||e.invariantCount>1024||e.pathCount!==e.aggregateCount||!["typescript","python"].includes(String(e.language))||![100,1e3,1e4].includes(e.numRuns))||n&&Object.entries(n).some(([a,d])=>e[a]!==d))throw new Error("private-execution-descriptor-invalid");return i}function V(o,n,i=Date.now()){if(typeof n!="string"||i>=Date.parse(o.expiresAt)||Buffer.byteLength(n,"utf8")!==o.byteLength||I("sha256").update(n,"utf8").digest("hex")!==o.materialSha256)throw new Error("private-execution-material-invalid");return n}async function k(o,n,i,e=Date.now()){const s=f(o,n);if(e>=Date.parse(s.expiresAt))throw new Error("private-execution-material-expired");const t=await i({leaseId:s.leaseId,...s.binding});if(!t||typeof t!="object"||Array.isArray(t)||Object.keys(t).sort().join(",")!=="material,schemaVersion"||t.schemaVersion!==1)throw new Error("private-execution-delivery-invalid");return V(s,t.material,Math.max(e,Date.now()))}export{l as PRIVATE_EXECUTION_PUBLIC_INSTRUCTION_V1,j as PRIVATE_MUTATION_QA_GATE_STEP_TOKEN,v as PRIVATE_REPORT_PUBLIC_INSTRUCTION_V1,k as consumePrivateExecutionDelivery,T as isPrivateExecutionPublicEnvelope,R as isPrivatePlanningRootPublicEnvelope,f as parsePrivateExecutionDescriptor,A as privateExecutionStateSnapshotSha256,V as verifyPrivateExecutionMaterial};
|
|
13
|
+
`}function A(o){return`Before P02, the root must collect public Context7 and official web references for this epic and record provenance in docs/research/epic-${o}/root-sources.md and root-sources.json. Keep private material out of external queries. The private executor has no web or MCP access.
|
|
14
|
+
|
|
15
|
+
`}const S=["schemaVersion","stage","epicId","stepId","claimId","revision","issuedAt","keyId","signature"];function I(o,r,i){const e=o.planningStepBinding;if(e===void 0)return[];if(!i||!e||typeof e!="object"||Array.isArray(e))return;const s=e;return Object.keys(s).sort().join(",")===[...S].sort().join(",")&&S.every(t=>typeof s[t]=="string"&&s[t].length>0&&s[t].length<=256)&&s.schemaVersion==="PlanningStepBinding/1"&&s.stage===r&&s.stepId===o.stepId?["planningStepBinding"]:void 0}function N(o){if(!o||typeof o!="object"||Array.isArray(o))return!1;const r=o,i=r.metadata;if(Object.keys(r).sort().join(",")!=="instructions,metadata"||r.instructions!==v&&r.instructions!==b||!i||typeof i!="object"||Array.isArray(i))return!1;const e=i,s=e.privateExecution;let t;try{t=w(s)}catch{return!1}if(t.schemaVersion!==11&&r.instructions!==v)return!1;if(t.schemaVersion===2)return Object.keys(e).sort().join(",")===["mode","storyId","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&(e.mode==="step"&&(e.resolvedTrigger==="research"||e.resolvedTrigger==="write-spec"||e.resolvedTrigger==="create-tasks"||e.resolvedTrigger==="implement")&&t.binding.commandId===e.resolvedTrigger||e.mode==="pipeline"&&e.resolvedTrigger==="exec"&&t.binding.commandId==="exec")&&e.storyId===t.binding.storyId&&e.stepId===t.binding.stepId;if(t.schemaVersion===3){const d=e.epicClaim,g=d&&typeof d=="object"&&!Array.isArray(d)?d:void 0,f=I(e,"P01",t.binding.writeSetId==="idea-diagnosis-v1");return!!f&&Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution","epicClaim",...f].sort().join(",")&&(e.mode==="create-epic"&&e.resolvedTrigger==="create-epic"&&t.binding.commandId==="create-epic"&&(t.binding.writeSetId===void 0||t.binding.writeSetId==="idea-diagnosis-v1"&&t.binding.stepId==="step-acd455ed")||e.mode==="step"&&e.resolvedTrigger==="idea-diagnose"&&t.binding.commandId==="idea-diagnose"&&t.binding.writeSetId==="idea-diagnosis-v1")&&e.stepId===t.binding.stepId&&!!g&&Object.keys(g).sort().join(",")===["schemaVersion","claimId","epicId","outcome","publicSafe"].sort().join(",")&&g.schemaVersion===1&&g.outcome==="reserved"&&g.publicSafe===!0&&g.claimId===t.binding.claimId&&g.epicId===t.binding.epicId}if(t.schemaVersion===4){const d=e.mode==="utility"&&e.resolvedTrigger==="sync-openapi"&&t.binding.commandId==="sync-openapi"&&t.binding.writeSetId==="sync-openapi-contract-v1"||e.mode==="utility"&&e.resolvedTrigger==="chaos-plan"&&t.binding.commandId==="chaos-plan"&&t.binding.writeSetId==="chaos-quarterly-v1"||e.mode==="tech-debt"&&e.resolvedTrigger==="tech-debt"&&t.binding.commandId==="tech-debt"&&t.binding.writeSetId==="tech-debt-registry-v1";return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.stepId===t.binding.stepId&&d}if(t.schemaVersion===11)return r.instructions===b&&Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="ui-ux-review"&&e.resolvedTrigger==="ui-ux-review"&&e.stepId===t.binding.stepId;if(t.schemaVersion===5)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger===t.binding.commandId&&e.stepId===t.binding.stepId&&(t.binding.commandId==="arch-prd"&&t.binding.writeSetId==="arch-prd-docs-v1"||t.binding.commandId==="arch-architecture"&&t.binding.writeSetId==="arch-architecture-doc-v1"||t.binding.commandId==="arch-fitness-functions"&&t.binding.writeSetId==="arch-fitness-tools-v1"||t.binding.commandId==="arch-api-contracts"&&t.binding.writeSetId==="arch-api-contracts-docs-v1"||t.binding.commandId==="arch-api-integrations"&&t.binding.writeSetId==="arch-api-integrations-doc-v1"||t.binding.commandId==="arch-database"&&t.binding.writeSetId==="arch-database-doc-v1"||t.binding.commandId==="arch-security"&&t.binding.writeSetId==="arch-security-doc-v1"||t.binding.commandId==="arch-design-system"&&t.binding.writeSetId==="arch-design-system-doc-v1"||t.binding.commandId==="arch-performance"&&t.binding.writeSetId==="arch-performance-doc-v1"||t.binding.commandId==="arch-testing"&&t.binding.writeSetId==="arch-testing-doc-v1"||t.binding.commandId==="arch-infrastructure"&&t.binding.writeSetId==="arch-infrastructure-doc-v1"||t.binding.commandId==="arch-review"&&t.binding.writeSetId==="arch-review-doc-v1"||t.binding.commandId==="update-memory"&&t.binding.writeSetId==="arch-memory-canonical-v1");if(t.schemaVersion===6)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="generate-pacts"&&e.stepId===t.binding.stepId;if(t.schemaVersion===7)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="arch-ux-design"&&e.stepId===t.binding.stepId;if(t.schemaVersion===8){const d=I(e,"P02",!0);return!!d&&Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution",...d].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="idea-research"&&e.stepId===t.binding.stepId&&t.binding.commandId==="idea-research"&&t.binding.writeSetId==="idea-research-v1"}if(t.schemaVersion===9){const d=I(e,"P03",!0);return!!d&&Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution",...d].sort().join(",")&&e.mode==="step"&&e.resolvedTrigger==="generate-epic"&&e.stepId===t.binding.stepId&&t.binding.commandId==="generate-epic"&&t.binding.writeSetId==="generate-epic-v1"}if(t.schemaVersion===10)return Object.keys(e).sort().join(",")===["mode","stepId","resolvedTrigger","privateExecution"].sort().join(",")&&e.mode==="utility"&&e.resolvedTrigger==="property-test"&&e.stepId===t.binding.stepId&&t.binding.commandId==="property-test";const a=e.privateExecutionRootAction,p=e.stepId===P,c=e.mutationQaFeature,h=c&&typeof c=="object"&&!Array.isArray(c)?c:void 0,l=I(e,"memory",!!a&&typeof a=="object"&&a.action==="review-project-memory-candidate");if(!l)return!1;const j=["mode","storyId","stepId","resolvedTrigger","gitLifecycleGraphAuthority","privateExecution",...p?["mutationQaFeature"]:[],...a===void 0?[]:["privateExecutionRootAction"],...l],u=e.gitLifecycleGraphAuthority,m=u&&typeof u=="object"&&!Array.isArray(u)?u:void 0,n=a&&typeof a=="object"&&!Array.isArray(a)?a:void 0;return(!p||!!h&&Object.keys(h).sort().join(",")===["schemaVersion","id","enabled","publicSafe"].sort().join(",")&&h.schemaVersion===1&&h.id==="mutation-testing"&&typeof h.enabled=="boolean"&&h.publicSafe===!0)&&Object.keys(e).sort().join(",")===j.sort().join(",")&&e.mode==="yolo"&&e.resolvedTrigger==="yolo"&&typeof e.storyId=="string"&&typeof e.stepId=="string"&&!!m&&m.storyId===e.storyId&&m.graphRevision===t.binding.graphRevision&&t.binding.commandId==="yolo"&&t.binding.stepId===e.stepId&&(a===void 0||!!n&&Object.keys(n).sort().join(",")===["schemaVersion","action","storyId","executionBranch","graphRevision","publicSafe",...n.action!=="prepare-epic-checkout"?["stepId"]:[],...n.action==="review-test-validation-candidate"?["skippedPredecessors"]:[],...n.action==="review-qa-candidate"?["skippedPredecessors","structuralPrecheck"]:[]].sort().join(",")&&n.schemaVersion===1&&(n.action==="prepare-epic-checkout"||n.action==="checkpoint-epic-story"||n.action==="review-diagnosis-candidate"&&e.stepId==="step-50224b19"||n.action==="review-project-memory-candidate"&&e.stepId==="step-638cc252"||n.action==="review-research-candidate"&&e.stepId==="step-f757f6bf"||n.action==="review-specification-candidate"&&e.stepId==="step-9cd927d0"||n.action==="review-tasks-candidate"&&e.stepId==="step-a3f880e8"||n.action==="review-implementation-candidate"&&e.stepId==="step-41803e35"||n.action==="review-refactor-advisory-candidate"&&e.stepId==="step-fe2e4997"||n.action==="review-test-validation-candidate"&&e.stepId==="step-b2fe7cb5"&&V(n.skippedPredecessors)||n.action==="review-qa-candidate"&&e.stepId==="step-8721319d"&&x(n.skippedPredecessors)&&C(n.structuralPrecheck)&&n.structuralPrecheck.graphRevision===m.graphRevision&&n.structuralPrecheck.generationId===t.binding.generationId)&&(n.action==="prepare-epic-checkout"||n.stepId===e.stepId)&&n.publicSafe===!0&&n.storyId===e.storyId&&n.storyId===m.storyId&&n.executionBranch===m.executionBranch&&n.graphRevision===m.graphRevision)}function B(o){return y("sha256").update("private-step-state-v1\0").update(JSON.stringify(o)).digest("hex")}function w(o,r){if(!o||typeof o!="object"||Array.isArray(o))throw new Error("private-execution-descriptor-invalid");const i=o,e=i.binding,s=i.schemaVersion===2||i.schemaVersion===3||i.schemaVersion===4||i.schemaVersion===5||i.schemaVersion===6||i.schemaVersion===7||i.schemaVersion===8||i.schemaVersion===9||i.schemaVersion===10||i.schemaVersion===11,t=s?["schemaVersion","authorityKind","projectId","commandId","stepId",...i.schemaVersion===3?["claimId","epicId",...e?.commandId==="idea-diagnose"||e?.writeSetId!==void 0?["writeSetId"]:[]]:i.schemaVersion===4?["writeSetId"]:i.schemaVersion===5?["targetEpicId","graphRevision","writeSetId"]:i.schemaVersion===6?["targetEpicId","graphRevision","answersSha256","specSha256","pathsSha256","endpointCount","pathCount"]:i.schemaVersion===7?["targetEpicId","graphRevision","adapterId","authoritySha256","pathsSha256","screenCount","pathCount"]:i.schemaVersion===8?["claimId","epicId","diagnosisReceiptId","intakeRevision","physicalAcceptanceReceiptId","writeSetId"]:i.schemaVersion===9?["claimId","epicId","diagnosisReceiptId","researchReceiptId","intakeRevision","physicalAcceptanceReceiptId","writeSetId"]:i.schemaVersion===10?["prdPath","prdSha256","planSha256","pathsSha256","aggregateCount","invariantCount","pathCount","language","numRuns"]:i.schemaVersion===11?["format"]:["storyId"],"stateSnapshotSha256","generationId","inputSha256","hostKind","hostVersion"]:["commandId","generationId","graphRevision","hostKind","hostVersion","inputSha256","projectId","stepId"];if(Object.keys(i).sort().join(",")!==["schemaVersion","leaseId","materialSha256","byteLength","expiresAt","delivery","publicSafe","binding"].sort().join(",")||i.schemaVersion!==1&&!s||i.delivery!=="private-one-time"||i.publicSafe!==!0||typeof i.leaseId!="string"||!/^px_[a-f0-9]{48}$/.test(i.leaseId)||typeof i.materialSha256!="string"||!/^[a-f0-9]{64}$/.test(i.materialSha256)||!Number.isSafeInteger(i.byteLength)||i.byteLength<1||i.byteLength>256*1024||typeof i.expiresAt!="string"||!Number.isFinite(Date.parse(i.expiresAt))||!e||Object.keys(e).sort().join(",")!==t.sort().join(",")||Object.entries(e).some(([a,p])=>a!=="schemaVersion"&&a!=="endpointCount"&&a!=="screenCount"&&a!=="pathCount"&&a!=="aggregateCount"&&a!=="invariantCount"&&a!=="numRuns"&&(typeof p!="string"||p.length<1||p.length>256))||!/^[a-f0-9]{64}$/.test(String(e.inputSha256))||!R(e.hostKind)||s&&!/^[a-f0-9]{64}$/.test(String(e.stateSnapshotSha256))||i.schemaVersion===2&&(e.schemaVersion!==2||e.authorityKind!=="state-snapshot"||!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(String(e.storyId)))||i.schemaVersion===3&&(e.schemaVersion!==3||e.authorityKind!=="epic-claim"||!(e.commandId==="create-epic"&&(e.writeSetId===void 0||e.writeSetId==="idea-diagnosis-v1"&&e.stepId==="step-acd455ed")||e.commandId==="idea-diagnose"&&e.writeSetId==="idea-diagnosis-v1")||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]*$/.test(String(e.epicId)))||i.schemaVersion===4&&(e.schemaVersion!==4||e.authorityKind!=="project-snapshot"||!(e.commandId==="sync-openapi"&&e.writeSetId==="sync-openapi-contract-v1"||e.commandId==="tech-debt"&&e.writeSetId==="tech-debt-registry-v1"||e.commandId==="chaos-plan"&&e.writeSetId==="chaos-quarterly-v1"))||i.schemaVersion===11&&(e.schemaVersion!==11||e.authorityKind!=="private-report"||e.commandId!=="ui-ux-review"||!["markdown","json"].includes(String(e.format))||!/^sha256:[a-f0-9]{64}$/.test(String(e.generationId))||i.materialSha256!==String(e.generationId).slice(7))||i.schemaVersion===5&&(e.schemaVersion!==5||e.authorityKind!=="architecture-stage"||!(e.commandId==="arch-prd"&&e.writeSetId==="arch-prd-docs-v1"||e.commandId==="arch-architecture"&&e.writeSetId==="arch-architecture-doc-v1"||e.commandId==="arch-fitness-functions"&&e.writeSetId==="arch-fitness-tools-v1"||e.commandId==="arch-api-contracts"&&e.writeSetId==="arch-api-contracts-docs-v1"||e.commandId==="arch-api-integrations"&&e.writeSetId==="arch-api-integrations-doc-v1"||e.commandId==="arch-database"&&e.writeSetId==="arch-database-doc-v1"||e.commandId==="arch-security"&&e.writeSetId==="arch-security-doc-v1"||e.commandId==="arch-design-system"&&e.writeSetId==="arch-design-system-doc-v1"||e.commandId==="arch-performance"&&e.writeSetId==="arch-performance-doc-v1"||e.commandId==="arch-testing"&&e.writeSetId==="arch-testing-doc-v1"||e.commandId==="arch-infrastructure"&&e.writeSetId==="arch-infrastructure-doc-v1"||e.commandId==="arch-review"&&e.writeSetId==="arch-review-doc-v1"||e.commandId==="update-memory"&&e.writeSetId==="arch-memory-canonical-v1")||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision)))||i.schemaVersion===6&&(e.schemaVersion!==6||e.authorityKind!=="pact-stage"||e.commandId!=="generate-pacts"||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision))||!/^[a-f0-9]{64}$/.test(String(e.answersSha256))||!/^[a-f0-9]{64}$/.test(String(e.specSha256))||!/^[a-f0-9]{64}$/.test(String(e.pathsSha256))||!Number.isSafeInteger(e.endpointCount)||e.endpointCount<1||e.endpointCount>256||!Number.isSafeInteger(e.pathCount)||e.pathCount<e.endpointCount||e.pathCount>e.endpointCount+1)||i.schemaVersion===7&&(e.schemaVersion!==7||e.authorityKind!=="ux-stage"||e.commandId!=="arch-ux-design"||!/^P[1-9][0-9]{0,11}$/.test(String(e.targetEpicId))||!/^[a-f0-9]{64}$/.test(String(e.graphRevision))||!["storybook-react-vite","storybook-nextjs-vite"].includes(String(e.adapterId))||!/^[a-f0-9]{64}$/.test(String(e.authoritySha256))||!/^[a-f0-9]{64}$/.test(String(e.pathsSha256))||!Number.isSafeInteger(e.screenCount)||e.screenCount<1||e.screenCount>48||!Number.isSafeInteger(e.pathCount)||e.pathCount!==e.screenCount*6+3)||i.schemaVersion===8&&(e.schemaVersion!==8||e.authorityKind!=="planning-stage"||e.commandId!=="idea-research"||e.writeSetId!=="idea-research-v1"||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]{0,11}$/.test(String(e.epicId))||[e.diagnosisReceiptId,e.intakeRevision,e.physicalAcceptanceReceiptId].some(a=>!/^[a-f0-9]{64}$/.test(String(a))))||i.schemaVersion===9&&(e.schemaVersion!==9||e.authorityKind!=="planning-generation"||e.commandId!=="generate-epic"||e.writeSetId!=="generate-epic-v1"||!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(String(e.claimId))||!/^P[1-9][0-9]{0,11}$/.test(String(e.epicId))||[e.diagnosisReceiptId,e.researchReceiptId,e.intakeRevision,e.physicalAcceptanceReceiptId].some(a=>!/^[a-f0-9]{64}$/.test(String(a))))||i.schemaVersion===10&&(e.schemaVersion!==10||e.authorityKind!=="property-test-plan"||e.commandId!=="property-test"||!["prd.md","docs/architecture/prd.md"].includes(String(e.prdPath))||[e.prdSha256,e.planSha256,e.pathsSha256].some(a=>!/^[a-f0-9]{64}$/.test(String(a)))||!Number.isSafeInteger(e.aggregateCount)||e.aggregateCount<1||e.aggregateCount>64||!Number.isSafeInteger(e.invariantCount)||e.invariantCount<e.aggregateCount||e.invariantCount>1024||e.pathCount!==e.aggregateCount||!["typescript","python"].includes(String(e.language))||![100,1e3,1e4].includes(e.numRuns))||r&&Object.entries(r).some(([a,p])=>e[a]!==p))throw new Error("private-execution-descriptor-invalid");return i}function E(o,r,i=Date.now()){if(typeof r!="string"||i>=Date.parse(o.expiresAt)||Buffer.byteLength(r,"utf8")!==o.byteLength||y("sha256").update(r,"utf8").digest("hex")!==o.materialSha256)throw new Error("private-execution-material-invalid");return r}async function _(o,r,i,e=Date.now()){const s=w(o,r);if(e>=Date.parse(s.expiresAt))throw new Error("private-execution-material-expired");const t=await i({leaseId:s.leaseId,...s.binding});if(!t||typeof t!="object"||Array.isArray(t)||Object.keys(t).sort().join(",")!=="material,schemaVersion"||t.schemaVersion!==1)throw new Error("private-execution-delivery-invalid");return E(s,t.material,Math.max(e,Date.now()))}export{v as PRIVATE_EXECUTION_PUBLIC_INSTRUCTION_V1,P as PRIVATE_MUTATION_QA_GATE_STEP_TOKEN,b as PRIVATE_REPORT_PUBLIC_INSTRUCTION_V1,_ as consumePrivateExecutionDelivery,N as isPrivateExecutionPublicEnvelope,K as isPrivatePlanningRootPublicEnvelope,w as parsePrivateExecutionDescriptor,T as planningNativeResearchPreparation,B as privateExecutionStateSnapshotSha256,E as verifyPrivateExecutionMaterial};
|
|
@@ -1,3 +1,86 @@
|
|
|
1
|
+
declare const profiles: {
|
|
2
|
+
readonly diagnosis: {
|
|
3
|
+
readonly schema: "PrivateYoloDiagnosisAcceptance/1";
|
|
4
|
+
readonly token: "step-50224b19";
|
|
5
|
+
readonly digest: "50224b193dae7ba2a066e54f7091d2656302b849ea7a145a3a4c556d85f3fe3c";
|
|
6
|
+
readonly status: "diagnose";
|
|
7
|
+
readonly previousStatus: "branch-ready";
|
|
8
|
+
readonly predecessorCount: 1;
|
|
9
|
+
readonly artifact: "diagnosis";
|
|
10
|
+
readonly checks: readonly ["analysisComplete", "enrichmentReviewed", "implementationBoundaryReviewed", "dependenciesReviewed", "smellsReviewed", "warningsReviewed", "mandatoryRequirementsResolved", "noImplementationChange"];
|
|
11
|
+
};
|
|
12
|
+
readonly research: {
|
|
13
|
+
readonly schema: "PrivateYoloResearchAcceptance/1";
|
|
14
|
+
readonly token: "step-f757f6bf";
|
|
15
|
+
readonly digest: "f757f6bf1182f23e5d7acbe47cbce9f0fa12f211d290b486892c6722bc42b4e8";
|
|
16
|
+
readonly status: "research";
|
|
17
|
+
readonly previousStatus: "diagnose";
|
|
18
|
+
readonly predecessorCount: 2;
|
|
19
|
+
readonly artifact: "research";
|
|
20
|
+
readonly checks: readonly ["researchComplete", "officialSourcesReviewed", "nativeResearchAttributed", "existingPatternsReviewed", "mockStrategyReviewed", "requirementsTraced", "mandatoryRequirementsResolved", "noImplementationChange"];
|
|
21
|
+
readonly legacyChecks: readonly ["researchComplete", "officialSourcesReviewed", "context7AvailabilityReviewed", "existingPatternsReviewed", "mockStrategyReviewed", "requirementsTraced", "mandatoryRequirementsResolved", "noImplementationChange"];
|
|
22
|
+
};
|
|
23
|
+
readonly specification: {
|
|
24
|
+
readonly schema: "PrivateYoloSpecificationAcceptance/1";
|
|
25
|
+
readonly token: "step-9cd927d0";
|
|
26
|
+
readonly digest: "9cd927d02ff5979b5077e75b09cb34be275eca0e1c955403235b9ba0fb7a55eb";
|
|
27
|
+
readonly status: "write-spec";
|
|
28
|
+
readonly previousStatus: "research";
|
|
29
|
+
readonly predecessorCount: 3;
|
|
30
|
+
readonly artifact: "spec";
|
|
31
|
+
readonly checks: readonly ["specificationComplete", "acceptedResearchReviewed", "acceptanceExamplesReviewed", "contractsAndNonGoalsReviewed", "implementationPlanReviewed", "validationPlanReviewed", "mandatoryRequirementsResolved", "noImplementationChange"];
|
|
32
|
+
};
|
|
33
|
+
readonly tasks: {
|
|
34
|
+
readonly schema: "PrivateYoloTasksAcceptance/1";
|
|
35
|
+
readonly token: "step-a3f880e8";
|
|
36
|
+
readonly digest: "a3f880e8d5bca9158a88c46f88754c0948237a3e8516c83a762ba1ee22c27d46";
|
|
37
|
+
readonly status: "create-tasks";
|
|
38
|
+
readonly previousStatus: "write-spec";
|
|
39
|
+
readonly predecessorCount: 4;
|
|
40
|
+
readonly artifact: "tasks";
|
|
41
|
+
readonly checks: readonly ["tasksComplete", "acceptedSpecificationReviewed", "acceptanceTraceabilityReviewed", "causalTestSequenceReviewed", "implementationScopeReviewed", "validationPlanReviewed", "mandatoryRequirementsResolved", "noImplementationChange"];
|
|
42
|
+
};
|
|
43
|
+
readonly implementation: {
|
|
44
|
+
readonly schema: "PrivateYoloImplementationAcceptance/1";
|
|
45
|
+
readonly token: "step-41803e35";
|
|
46
|
+
readonly digest: "41803e35aae66fedeb7f3d7086f234b7d8894fa31c93088d510fd9bd1ea6a3ab";
|
|
47
|
+
readonly status: "implemented";
|
|
48
|
+
readonly previousStatus: "create-tasks";
|
|
49
|
+
readonly predecessorCount: 5;
|
|
50
|
+
readonly artifact: "validation-evidence";
|
|
51
|
+
readonly checks: readonly ["implementationComplete", "acceptedPlanningReviewed", "acceptanceTraceabilityReviewed", "causalTestsReviewed", "implementationScopeReviewed", "contractsReviewed", "mandatoryRequirementsResolved", "rootValidationReviewed"];
|
|
52
|
+
};
|
|
53
|
+
readonly 'refactor-advisory': {
|
|
54
|
+
readonly schema: "PrivateYoloRefactorAdvisoryAcceptance/1";
|
|
55
|
+
readonly token: "step-fe2e4997";
|
|
56
|
+
readonly digest: "fe2e499748a0a6ffa5f952b0e7f6eb0f42361b6f304722aaa9eae736ca9565e7";
|
|
57
|
+
readonly status: "refactor-suggest-done";
|
|
58
|
+
readonly previousStatus: "implemented";
|
|
59
|
+
readonly predecessorCount: 6;
|
|
60
|
+
readonly artifact: "validation-evidence";
|
|
61
|
+
readonly checks: readonly ["advisoryComplete", "registryReviewed", "tierAndGatesReviewed", "scopeReviewed", "suggestionsReviewed", "nonBlockingWarningsReviewed", "traceabilityReviewed", "noImplementationChange"];
|
|
62
|
+
};
|
|
63
|
+
readonly 'test-validation': {
|
|
64
|
+
readonly schema: "PrivateYoloTestValidationAcceptance/1";
|
|
65
|
+
readonly token: "step-b2fe7cb5";
|
|
66
|
+
readonly digest: "b2fe7cb5d577eecef3f9da45f9f4f11487b5a1ac27dfdf6c425a0cc5a9c9db3d";
|
|
67
|
+
readonly status: "tests-validated";
|
|
68
|
+
readonly previousStatus: "property-tests-emitted";
|
|
69
|
+
readonly predecessorCount: 8;
|
|
70
|
+
readonly artifact: "validation-evidence";
|
|
71
|
+
readonly checks: readonly ["testCoverageComplete", "acceptedPlanningReviewed", "acceptanceTraceabilityReviewed", "literalCommandsReviewed", "skippedCoverageReviewed", "contractsReviewed", "mandatoryRequirementsResolved", "rootValidationReviewed"];
|
|
72
|
+
};
|
|
73
|
+
readonly qa: {
|
|
74
|
+
readonly schema: "PrivateYoloQaAcceptance/1";
|
|
75
|
+
readonly token: "step-8721319d";
|
|
76
|
+
readonly digest: "8721319de90ade506bc9b72a908d8296856b34a11bc640629178bed3fe32e373";
|
|
77
|
+
readonly status: "qa-gate-passed";
|
|
78
|
+
readonly previousStatus: "tests-validated";
|
|
79
|
+
readonly predecessorCount: 9;
|
|
80
|
+
readonly artifact: "qa-gate-result";
|
|
81
|
+
readonly checks: readonly ["requirementsReviewed", "examplesReviewed", "contractsReviewed", "securityAndDataReviewed", "structuralIntegrityReviewed", "skippedAndDeferredCoverageReviewed", "findingsResolved", "implementationScopeReviewed"];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
1
84
|
export declare function acceptPrivateYoloQaRootReview(projectRoot: string, request: unknown): Promise<{
|
|
2
85
|
independentStoryQaAccepted: boolean;
|
|
3
86
|
terminalAccepted: boolean;
|
|
@@ -110,3 +193,9 @@ export declare function acceptPrivateYoloTasksRootReview(projectRoot: string, re
|
|
|
110
193
|
reused: boolean;
|
|
111
194
|
sourceStateUnchanged: boolean;
|
|
112
195
|
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Exact root-review check set for a phase: every key `true`, no extra or missing key.
|
|
198
|
+
* A phase may also accept one exact legacy set (read-only compatibility); mixed sets fail closed.
|
|
199
|
+
*/
|
|
200
|
+
export declare function privateYoloReviewChecksAccepted(phase: keyof typeof profiles, checks: unknown): boolean;
|
|
201
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isPrivateYoloSkippedPredecessors as ue,isPrivateQaSkippedPredecessors as qe,isPrivateQaStructuralAdmission as ve}from"./shared-private-admission-types.js";import{readPrivateYoloImplementationValidation as me}from"./implementation-validation.js";import{createHash as Ae}from"node:crypto";import{execFileSync as F}from"node:child_process";import{existsSync as xe,lstatSync as ye,readFileSync as S}from"node:fs";import{join as u,resolve as Ce}from"node:path";import{acquireGitLifecyclePhysicalIntegrationLock as $e,applyGitLifecycleRuntimeOverlay as De,ensureGitLifecyclePrivateChildDirectory as he,gitLifecycleRuntimeDirectory as we,mutateGitLifecycleRuntime as _e,readGitLifecycleRuntime as Ye,releaseGitLifecyclePhysicalIntegrationLock as je,assertGitLifecyclePrivateFile as ge}from"../git/git-lifecycle-store.js";import{anchoredAtomicWriteFile as Oe}from"../git/secure-filesystem-boundary.js";import{privateYoloRootOnlySetupReady as Se}from"./clean-baseline.js";import{resumePrivateYoloIsolatedSession as Ve}from"./isolated-session.js";const Ne=["analysisComplete","enrichmentReviewed","implementationBoundaryReviewed","dependenciesReviewed","smellsReviewed","warningsReviewed","mandatoryRequirementsResolved","noImplementationChange"],C=r=>Ae("sha256").update(r).digest("hex"),J={diagnosis:{schema:"PrivateYoloDiagnosisAcceptance/1",token:"step-50224b19",digest:"50224b193dae7ba2a066e54f7091d2656302b849ea7a145a3a4c556d85f3fe3c",status:"diagnose",previousStatus:"branch-ready",predecessorCount:1,artifact:"diagnosis",checks:Ne},research:{schema:"PrivateYoloResearchAcceptance/1",token:"step-f757f6bf",digest:"f757f6bf1182f23e5d7acbe47cbce9f0fa12f211d290b486892c6722bc42b4e8",status:"research",previousStatus:"diagnose",predecessorCount:2,artifact:"research",checks:["researchComplete","officialSourcesReviewed","context7AvailabilityReviewed","existingPatternsReviewed","mockStrategyReviewed","requirementsTraced","mandatoryRequirementsResolved","noImplementationChange"]},specification:{schema:"PrivateYoloSpecificationAcceptance/1",token:"step-9cd927d0",digest:"9cd927d02ff5979b5077e75b09cb34be275eca0e1c955403235b9ba0fb7a55eb",status:"write-spec",previousStatus:"research",predecessorCount:3,artifact:"spec",checks:["specificationComplete","acceptedResearchReviewed","acceptanceExamplesReviewed","contractsAndNonGoalsReviewed","implementationPlanReviewed","validationPlanReviewed","mandatoryRequirementsResolved","noImplementationChange"]},tasks:{schema:"PrivateYoloTasksAcceptance/1",token:"step-a3f880e8",digest:"a3f880e8d5bca9158a88c46f88754c0948237a3e8516c83a762ba1ee22c27d46",status:"create-tasks",previousStatus:"write-spec",predecessorCount:4,artifact:"tasks",checks:["tasksComplete","acceptedSpecificationReviewed","acceptanceTraceabilityReviewed","causalTestSequenceReviewed","implementationScopeReviewed","validationPlanReviewed","mandatoryRequirementsResolved","noImplementationChange"]},implementation:{schema:"PrivateYoloImplementationAcceptance/1",token:"step-41803e35",digest:"41803e35aae66fedeb7f3d7086f234b7d8894fa31c93088d510fd9bd1ea6a3ab",status:"implemented",previousStatus:"create-tasks",predecessorCount:5,artifact:"validation-evidence",checks:["implementationComplete","acceptedPlanningReviewed","acceptanceTraceabilityReviewed","causalTestsReviewed","implementationScopeReviewed","contractsReviewed","mandatoryRequirementsResolved","rootValidationReviewed"]},"refactor-advisory":{schema:"PrivateYoloRefactorAdvisoryAcceptance/1",token:"step-fe2e4997",digest:"fe2e499748a0a6ffa5f952b0e7f6eb0f42361b6f304722aaa9eae736ca9565e7",status:"refactor-suggest-done",previousStatus:"implemented",predecessorCount:6,artifact:"validation-evidence",checks:["advisoryComplete","registryReviewed","tierAndGatesReviewed","scopeReviewed","suggestionsReviewed","nonBlockingWarningsReviewed","traceabilityReviewed","noImplementationChange"]},"test-validation":{schema:"PrivateYoloTestValidationAcceptance/1",token:"step-b2fe7cb5",digest:"b2fe7cb5d577eecef3f9da45f9f4f11487b5a1ac27dfdf6c425a0cc5a9c9db3d",status:"tests-validated",previousStatus:"property-tests-emitted",predecessorCount:8,artifact:"validation-evidence",checks:["testCoverageComplete","acceptedPlanningReviewed","acceptanceTraceabilityReviewed","literalCommandsReviewed","skippedCoverageReviewed","contractsReviewed","mandatoryRequirementsResolved","rootValidationReviewed"]},qa:{schema:"PrivateYoloQaAcceptance/1",token:"step-8721319d",digest:"8721319de90ade506bc9b72a908d8296856b34a11bc640629178bed3fe32e373",status:"qa-gate-passed",previousStatus:"tests-validated",predecessorCount:9,artifact:"qa-gate-result",checks:["requirementsReviewed","examplesReviewed","contractsReviewed","securityAndDataReviewed","structuralIntegrityReviewed","skippedAndDeferredCoverageReviewed","findingsResolved","implementationScopeReviewed"]}};async function Ee(r,n){return R(r,n,"qa")}async function We(r,n){return R(r,n,"test-validation")}async function Ke(r,n){return R(r,n,"refactor-advisory")}async function Me(r,n){return R(r,n,"implementation")}async function Xe(r,n){return R(r,n,"diagnosis")}async function Ze(r,n){return R(r,n,"research")}async function et(r,n){return R(r,n,"specification")}async function tt(r,n){return R(r,n,"tasks")}async function R(r,n,e){const c=J[e],I=`${e}Sha256`,o=()=>{throw new Error(`private-execution-${e}-root-review-unverified`)},v=l=>l!==null&&typeof l=="object"&&!Array.isArray(l)?l:void 0,q=v(n),a=v(q?.directive),t=v(q?.review),B=a?.structuralPrecheck,$=(l,D)=>Object.keys(l).sort().join("|")===D.sort().join("|");(!q||!a||!t||!$(q,["schemaVersion","executorStopped","directive","review"])||q.schemaVersion!==c.schema||q.executorStopped!==!0||!$(a,["schemaVersion","action","storyId","executionBranch","graphRevision","stepId","publicSafe",...e==="test-validation"?["skippedPredecessors"]:[],...e==="qa"?["skippedPredecessors","structuralPrecheck"]:[]])||a.schemaVersion!==1||a.action!==`review-${e}-candidate`||e==="test-validation"&&!ue(a.skippedPredecessors)||e==="qa"&&(!qe(a.skippedPredecessors)||!ve(B)||B.graphRevision!==a.graphRevision||a.skippedPredecessors.some(l=>l.tier!==B.tier))||a.stepId!==c.token||a.publicSafe!==!0||typeof a.storyId!="string"||!/^P[1-9][0-9]*\.[0-9]+$/.test(a.storyId)||typeof a.graphRevision!="string"||!/^[a-f0-9]{64}$/.test(a.graphRevision)||!$(t,["reviewer","decision","snapshotSha",I,"sourceStateSha256","rawStepId","reviewedAt","checks",...["implementation","test-validation","qa"].includes(e)?["validationReceiptId"]:[],...["refactor-advisory","test-validation","qa"].includes(e)?["previousPhaseReceiptId"]:[]])||t.reviewer!=="root"||t.decision!==`approve-${e}`||typeof t.snapshotSha!="string"||!/^[a-f0-9]{40,64}$/.test(t.snapshotSha)||typeof t[I]!="string"||!/^[a-f0-9]{64}$/.test(t[I])||typeof t.sourceStateSha256!="string"||!/^[a-f0-9]{64}$/.test(t.sourceStateSha256)||typeof t.rawStepId!="string"||C(t.rawStepId)!==c.digest||typeof t.reviewedAt!="string"||!Number.isFinite(Date.parse(t.reviewedAt))||Date.parse(t.reviewedAt)>Date.now()||Date.now()-Date.parse(t.reviewedAt)>10*6e4||!v(t.checks)||!$(v(t.checks),[...c.checks])||c.checks.some(l=>v(t.checks)[l]!==!0))&&o();const z=e==="test-validation"&&a.skippedPredecessors.length===1,ee=c.predecessorCount-(z?1:0),te=z?"refactor-suggest-done":c.previousStatus;let k,se=[];const d=Ce(r),s=a.storyId,A=a.graphRevision,ie=s.split(".")[0],N=await Ye(d,{required:!0}),U=N.epics[ie],m=v(U?.branch_lease);(!m||typeof m.sessionId!="string"||m.ownerStoryId!==s||m.idempotencyKey!==m.sessionId||U?.graph_revision!==A||typeof m.expiresAt!="string"||!Number.isFinite(Date.parse(m.expiresAt))||Date.parse(m.expiresAt)<=Date.now())&&o();const H=await $e(d,{kind:"direct",storyId:s,sessionId:m.sessionId,idempotencyKey:m.sessionId,expiresAt:new Date(Date.now()+5*6e4).toISOString(),persistent:!1});if(!H.ok)throw new Error(`private-execution-${e}-root-review-unverified`);try{const l=async()=>{const i=await Ve(d,s,A);(i.snapshotSha!==t.snapshotSha||i.sequence<1||i.workspace.executionBranch!==a.executionBranch)&&o();const g=JSON.parse(S(u(d,".neocortex/state.json"),"utf8")),j=c.predecessorCount>=5?g.stories?.[s]?.files_to_modify:[];(!Array.isArray(j)||j.some(p=>typeof p!="string"))&&o();const K=[...j,".neocortex/state.json",`docs/stories/${s}.story.md`,`.neocortex/stories/${s}/diagnosis.md`,`.neocortex/stories/${s}/diagnose.md`,...c.predecessorCount>=2?[`.neocortex/stories/${s}/research.md`,`docs/stories/${s}.research.md`]:[],...c.predecessorCount>=3?[`docs/stories/${s}.spec.md`,`docs/stories/${s}.rtm.md`]:[],...c.predecessorCount>=4?[`docs/stories/${s}.tasks.md`]:[]];F("git",["diff","--name-only","-z",i.workspace.baseSha,i.snapshotSha,"--"],{cwd:i.workspace.workspacePath,env:Object.fromEntries(Object.entries(process.env).filter(([p])=>!p.startsWith("GIT_"))),encoding:"utf8",timeout:3e4,maxBuffer:1024*1024,stdio:["ignore","pipe","ignore"]}).split("\0").filter(Boolean).some(p=>!K.includes(p))&&o();const O=e==="qa"?u(d,".neocortex","stories",s,"qa-gate-result.json"):c.artifact==="validation-evidence"?u(d,".neocortex","stories",s,"validation-evidence.md"):c.predecessorCount<3?u(d,".neocortex","stories",s,`${c.artifact}.md`):u(d,"docs","stories",`${s}.${c.artifact}.md`),y=ye(O);if((!y.isFile()||y.isSymbolicLink()||y.nlink!==1||y.size<128||y.size>262144||C(S(O))!==t[I]||C(S(u(d,".neocortex/state.json")))!==t.sourceStateSha256)&&o(),c.predecessorCount>=5&&(F("git",["show",`${i.workspace.baseSha}:.neocortex/state.json`],{cwd:i.workspace.workspacePath,timeout:3e4,stdio:["ignore","pipe","ignore"]}).equals(S(u(d,".neocortex/state.json")))||o(),F("git",["diff","--check",i.workspace.baseSha,i.snapshotSha],{cwd:i.workspace.workspacePath,timeout:3e4,stdio:"ignore"}),(e==="implementation"||e==="test-validation"||e==="qa")&&await me(d,t.validationReceiptId,{storyId:s,graphRevision:A,snapshotSha:i.snapshotSha,sourceHeadSha:i.workspace.baseSha}),e==="refactor-advisory"||e==="test-validation"||e==="qa")){const G=t.previousPhaseReceiptId;(typeof G!="string"||!/^[a-f0-9]{64}$/.test(G))&&o();const ce=await he(await we(d),"private-execution"),ne=e==="qa"?a.skippedPredecessors:[],V=ne.some(w=>w.stepId==="step-b2fe7cb5"),M=ne.some(w=>w.stepId==="step-a8ce5c64"),de=e==="qa"?V?M?"refactor-advisory":"property-tests":"test-validation":e==="refactor-advisory"?"implementation":z?"refactor-advisory":"property-tests",pe=u(ce,`${de}-review-${G}.json`);await ge(pe,ce);const X=S(pe);(X.length>16384||C(X)!==G)&&o();const h=JSON.parse(X.toString());(h.kind!==`private-${de}-root-review`||h.storyId!==s||h.sourceHeadSha!==i.workspace.baseSha||!/^[a-f0-9]{40,64}$/.test(h.snapshotSha)||h.independentStoryQaAccepted!==!1||h.terminalAccepted!==!1)&&o();const le=(...w)=>F("git",w,{cwd:i.workspace.workspacePath,timeout:3e4,encoding:"utf8",stdio:["ignore","pipe","ignore"]});le("merge-base","--is-ancestor",h.snapshotSha,i.snapshotSha);const Pe=le("diff","--name-only","-z",h.snapshotSha,i.snapshotSha).split("\0").filter(Boolean),Ie=[...e==="qa"?[`.neocortex/stories/${s}/qa-gate-result.json`]:[],`.neocortex/stories/${s}/validation-evidence.md`,`.neocortex/stories/${s}/tdd-evidence.md`,`docs/stories/${s}.rtm.md`];if(Pe.some(w=>!Ie.includes(w))&&o(),e==="qa"){!V&&!ue(h.skippedPredecessors)&&o();const w=V?M:h.skippedPredecessors.length===1,fe=[...["diagnosis","research","specification","tasks","implementation","refactor-advisory"].map(x=>J[x].digest),...w?[]:["a8ce5c6462803364cabab06cd41304a578ca2f1d50627c7f162020159670dedf"],...V?[]:[J["test-validation"].digest]];k={digests:fe,count:fe.length+1,status:V?M?"refactor-suggest-done":"property-tests-emitted":"tests-validated"};const Q=await me(d,t.validationReceiptId,{storyId:s,graphRevision:A,snapshotSha:i.snapshotSha,sourceHeadSha:i.workspace.baseSha});(Q.structuralIntegrity?.schemaVersion!==1||Q.structuralIntegrity?.scope!=="project-snapshot"||Q.structuralIntegrity.canonicalStateParsed!==!0||Q.structuralIntegrity.trackedInputsUnchanged!==!0)&&o();const f=JSON.parse(S(O,"utf8"));(f.schemaVersion!==3||f.candidate!==!0||f.stageComplete!==!1||f.status!=="qa-review-pending"||f.independentStoryQaAccepted!==!1||!Array.isArray(f.blockingChecks)||f.blockingChecks.length!==0||!ve(f.structuralPrecheck)||["schemaVersion","kind","stepId","generationId","graphRevision","topologyGenerationId","tier","publicSafe"].some(x=>f.structuralPrecheck[x]!==a.structuralPrecheck[x])||!Array.isArray(f.followUpDebt)||f.followUpDebt.length>50)&&o();for(const x of f.followUpDebt){const P=v(x);(!P||!$(P,["id","reasonCode","ownerArea","severity","description","trigger","publicSafe"])||P.publicSafe!==!0||!["P2","P3"].includes(String(P.severity))||["id","reasonCode","ownerArea","description","trigger"].some(Z=>typeof P[Z]!="string"||P[Z].length<1||P[Z].length>1e3))&&o()}se=f.followUpDebt}}if(e==="tasks"||c.predecessorCount>=5){const p=ye(u(d,"docs/stories",`${s}.rtm.md`));(!p.isFile()||p.isSymbolicLink()||p.nlink!==1||p.size<128||p.size>262144)&&o()}return i},D=await l(),Re=JSON.parse(S(u(d,".neocortex/state.json"),"utf8")),ke=De(Re,N),b=v(v(ke.stories)?.[s]);(!b||b.checkpoint!==void 0)&&o();const L=t.rawStepId,ae=i=>{if(e==="diagnosis")return Se(i);const g=i.steps_completed,j=[...["diagnosis","research","specification","tasks","implementation","refactor-advisory"].map(y=>J[y].digest),"a8ce5c6462803364cabab06cd41304a578ca2f1d50627c7f162020159670dedf"];if(e==="qa"&&!k)return!1;const K=e==="qa"?k.status:te,re=e==="qa"?k.count:ee,O=e==="qa"?k.digests:j;return i.status===K&&Array.isArray(g)&&g.length===re&&i.last_step===g.at(-1)&&g.slice(1).every((y,p)=>typeof y=="string"&&C(y)===O[p])&&Se({status:"branch-ready",last_step:g[0],steps_completed:[g[0]]})},_=b.steps_completed,E=b?.status===c.status&&b.last_step===L&&Array.isArray(_)&&_.length===(e==="qa"?k.count:ee)+1&&_.at(-1)===L&&ae({status:e==="qa"?k.status:te,last_step:_.at(-2),steps_completed:_.slice(0,-1)});!E&&!ae(b)&&o();const be={schemaVersion:1,kind:`private-${e}-root-review`,storyId:s,graphRevision:A,sourceHeadSha:D.workspace.baseSha,snapshotSha:D.snapshotSha,[I]:t[I],sourceStateSha256:t.sourceStateSha256,reviewedAt:t.reviewedAt,checks:t.checks,...["implementation","test-validation","qa"].includes(e)?{validationReceiptId:t.validationReceiptId}:{},...["refactor-advisory","test-validation","qa"].includes(e)?{previousPhaseReceiptId:t.previousPhaseReceiptId}:{},...["test-validation","qa"].includes(e)?{skippedPredecessors:a.skippedPredecessors}:{},...e==="qa"?{structuralPrecheck:a.structuralPrecheck,precommitQaAccepted:!0,optionalDebt:se}:{},independentStoryQaAccepted:!1,terminalAccepted:!1},W=JSON.stringify(be)+`
|
|
2
|
-
`,oe=C(W),
|
|
1
|
+
import{isPrivateYoloSkippedPredecessors as ue,isPrivateQaSkippedPredecessors as Ie,isPrivateQaStructuralAdmission as ve}from"./shared-private-admission-types.js";import{readPrivateYoloImplementationValidation as me}from"./implementation-validation.js";import{createHash as qe}from"node:crypto";import{execFileSync as J}from"node:child_process";import{existsSync as xe,lstatSync as ye,readFileSync as k}from"node:fs";import{join as f,resolve as Ce}from"node:path";import{acquireGitLifecyclePhysicalIntegrationLock as $e,applyGitLifecycleRuntimeOverlay as De,ensureGitLifecyclePrivateChildDirectory as ge,gitLifecycleRuntimeDirectory as we,mutateGitLifecycleRuntime as je,readGitLifecycleRuntime as Ye,releaseGitLifecyclePhysicalIntegrationLock as _e,assertGitLifecyclePrivateFile as he}from"../git/git-lifecycle-store.js";import{anchoredAtomicWriteFile as Oe}from"../git/secure-filesystem-boundary.js";import{privateYoloRootOnlySetupReady as Se}from"./clean-baseline.js";import{resumePrivateYoloIsolatedSession as Ve}from"./isolated-session.js";const Ne=["analysisComplete","enrichmentReviewed","implementationBoundaryReviewed","dependenciesReviewed","smellsReviewed","warningsReviewed","mandatoryRequirementsResolved","noImplementationChange"],C=n=>qe("sha256").update(n).digest("hex"),V={diagnosis:{schema:"PrivateYoloDiagnosisAcceptance/1",token:"step-50224b19",digest:"50224b193dae7ba2a066e54f7091d2656302b849ea7a145a3a4c556d85f3fe3c",status:"diagnose",previousStatus:"branch-ready",predecessorCount:1,artifact:"diagnosis",checks:Ne},research:{schema:"PrivateYoloResearchAcceptance/1",token:"step-f757f6bf",digest:"f757f6bf1182f23e5d7acbe47cbce9f0fa12f211d290b486892c6722bc42b4e8",status:"research",previousStatus:"diagnose",predecessorCount:2,artifact:"research",checks:["researchComplete","officialSourcesReviewed","nativeResearchAttributed","existingPatternsReviewed","mockStrategyReviewed","requirementsTraced","mandatoryRequirementsResolved","noImplementationChange"],legacyChecks:["researchComplete","officialSourcesReviewed","context7AvailabilityReviewed","existingPatternsReviewed","mockStrategyReviewed","requirementsTraced","mandatoryRequirementsResolved","noImplementationChange"]},specification:{schema:"PrivateYoloSpecificationAcceptance/1",token:"step-9cd927d0",digest:"9cd927d02ff5979b5077e75b09cb34be275eca0e1c955403235b9ba0fb7a55eb",status:"write-spec",previousStatus:"research",predecessorCount:3,artifact:"spec",checks:["specificationComplete","acceptedResearchReviewed","acceptanceExamplesReviewed","contractsAndNonGoalsReviewed","implementationPlanReviewed","validationPlanReviewed","mandatoryRequirementsResolved","noImplementationChange"]},tasks:{schema:"PrivateYoloTasksAcceptance/1",token:"step-a3f880e8",digest:"a3f880e8d5bca9158a88c46f88754c0948237a3e8516c83a762ba1ee22c27d46",status:"create-tasks",previousStatus:"write-spec",predecessorCount:4,artifact:"tasks",checks:["tasksComplete","acceptedSpecificationReviewed","acceptanceTraceabilityReviewed","causalTestSequenceReviewed","implementationScopeReviewed","validationPlanReviewed","mandatoryRequirementsResolved","noImplementationChange"]},implementation:{schema:"PrivateYoloImplementationAcceptance/1",token:"step-41803e35",digest:"41803e35aae66fedeb7f3d7086f234b7d8894fa31c93088d510fd9bd1ea6a3ab",status:"implemented",previousStatus:"create-tasks",predecessorCount:5,artifact:"validation-evidence",checks:["implementationComplete","acceptedPlanningReviewed","acceptanceTraceabilityReviewed","causalTestsReviewed","implementationScopeReviewed","contractsReviewed","mandatoryRequirementsResolved","rootValidationReviewed"]},"refactor-advisory":{schema:"PrivateYoloRefactorAdvisoryAcceptance/1",token:"step-fe2e4997",digest:"fe2e499748a0a6ffa5f952b0e7f6eb0f42361b6f304722aaa9eae736ca9565e7",status:"refactor-suggest-done",previousStatus:"implemented",predecessorCount:6,artifact:"validation-evidence",checks:["advisoryComplete","registryReviewed","tierAndGatesReviewed","scopeReviewed","suggestionsReviewed","nonBlockingWarningsReviewed","traceabilityReviewed","noImplementationChange"]},"test-validation":{schema:"PrivateYoloTestValidationAcceptance/1",token:"step-b2fe7cb5",digest:"b2fe7cb5d577eecef3f9da45f9f4f11487b5a1ac27dfdf6c425a0cc5a9c9db3d",status:"tests-validated",previousStatus:"property-tests-emitted",predecessorCount:8,artifact:"validation-evidence",checks:["testCoverageComplete","acceptedPlanningReviewed","acceptanceTraceabilityReviewed","literalCommandsReviewed","skippedCoverageReviewed","contractsReviewed","mandatoryRequirementsResolved","rootValidationReviewed"]},qa:{schema:"PrivateYoloQaAcceptance/1",token:"step-8721319d",digest:"8721319de90ade506bc9b72a908d8296856b34a11bc640629178bed3fe32e373",status:"qa-gate-passed",previousStatus:"tests-validated",predecessorCount:9,artifact:"qa-gate-result",checks:["requirementsReviewed","examplesReviewed","contractsReviewed","securityAndDataReviewed","structuralIntegrityReviewed","skippedAndDeferredCoverageReviewed","findingsResolved","implementationScopeReviewed"]}};async function We(n,r){return b(n,r,"qa")}async function Ke(n,r){return b(n,r,"test-validation")}async function Me(n,r){return b(n,r,"refactor-advisory")}async function Xe(n,r){return b(n,r,"implementation")}async function Ze(n,r){return b(n,r,"diagnosis")}async function et(n,r){return b(n,r,"research")}async function tt(n,r){return b(n,r,"specification")}async function st(n,r){return b(n,r,"tasks")}function Te(n,r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;const e=r,c=V[n],h="legacyChecks"in c?[c.checks,c.legacyChecks]:[c.checks],a=Object.keys(e).sort().join("|");return h.some(v=>[...v].sort().join("|")===a&&v.every(S=>e[S]===!0))}async function b(n,r,e){const c=V[e],h=`${e}Sha256`,a=()=>{throw new Error(`private-execution-${e}-root-review-unverified`)},v=u=>u!==null&&typeof u=="object"&&!Array.isArray(u)?u:void 0,S=v(r),o=v(S?.directive),s=v(S?.review),B=o?.structuralPrecheck,N=(u,$)=>Object.keys(u).sort().join("|")===$.sort().join("|");(!S||!o||!s||!N(S,["schemaVersion","executorStopped","directive","review"])||S.schemaVersion!==c.schema||S.executorStopped!==!0||!N(o,["schemaVersion","action","storyId","executionBranch","graphRevision","stepId","publicSafe",...e==="test-validation"?["skippedPredecessors"]:[],...e==="qa"?["skippedPredecessors","structuralPrecheck"]:[]])||o.schemaVersion!==1||o.action!==`review-${e}-candidate`||e==="test-validation"&&!ue(o.skippedPredecessors)||e==="qa"&&(!Ie(o.skippedPredecessors)||!ve(B)||B.graphRevision!==o.graphRevision||o.skippedPredecessors.some(u=>u.tier!==B.tier))||o.stepId!==c.token||o.publicSafe!==!0||typeof o.storyId!="string"||!/^P[1-9][0-9]*\.[0-9]+$/.test(o.storyId)||typeof o.graphRevision!="string"||!/^[a-f0-9]{64}$/.test(o.graphRevision)||!N(s,["reviewer","decision","snapshotSha",h,"sourceStateSha256","rawStepId","reviewedAt","checks",...["implementation","test-validation","qa"].includes(e)?["validationReceiptId"]:[],...["refactor-advisory","test-validation","qa"].includes(e)?["previousPhaseReceiptId"]:[]])||s.reviewer!=="root"||s.decision!==`approve-${e}`||typeof s.snapshotSha!="string"||!/^[a-f0-9]{40,64}$/.test(s.snapshotSha)||typeof s[h]!="string"||!/^[a-f0-9]{64}$/.test(s[h])||typeof s.sourceStateSha256!="string"||!/^[a-f0-9]{64}$/.test(s.sourceStateSha256)||typeof s.rawStepId!="string"||C(s.rawStepId)!==c.digest||typeof s.reviewedAt!="string"||!Number.isFinite(Date.parse(s.reviewedAt))||Date.parse(s.reviewedAt)>Date.now()||Date.now()-Date.parse(s.reviewedAt)>10*6e4||!Te(e,s.checks))&&a();const z=e==="test-validation"&&o.skippedPredecessors.length===1,ee=c.predecessorCount-(z?1:0),te=z?"refactor-suggest-done":c.previousStatus;let P,se=[];const d=Ce(n),t=o.storyId,q=o.graphRevision,ie=t.split(".")[0],T=await Ye(d,{required:!0}),U=T.epics[ie],m=v(U?.branch_lease);(!m||typeof m.sessionId!="string"||m.ownerStoryId!==t||m.idempotencyKey!==m.sessionId||U?.graph_revision!==q||typeof m.expiresAt!="string"||!Number.isFinite(Date.parse(m.expiresAt))||Date.parse(m.expiresAt)<=Date.now())&&a();const H=await $e(d,{kind:"direct",storyId:t,sessionId:m.sessionId,idempotencyKey:m.sessionId,expiresAt:new Date(Date.now()+5*6e4).toISOString(),persistent:!1});if(!H.ok)throw new Error(`private-execution-${e}-root-review-unverified`);try{const u=async()=>{const i=await Ve(d,t,q);(i.snapshotSha!==s.snapshotSha||i.sequence<1||i.workspace.executionBranch!==o.executionBranch)&&a();const R=JSON.parse(k(f(d,".neocortex/state.json"),"utf8")),Y=c.predecessorCount>=5?R.stories?.[t]?.files_to_modify:[];(!Array.isArray(Y)||Y.some(p=>typeof p!="string"))&&a();const K=[...Y,".neocortex/state.json",`docs/stories/${t}.story.md`,`.neocortex/stories/${t}/diagnosis.md`,`.neocortex/stories/${t}/diagnose.md`,...c.predecessorCount>=2?[`.neocortex/stories/${t}/research.md`,`docs/stories/${t}.research.md`]:[],...c.predecessorCount>=3?[`docs/stories/${t}.spec.md`,`docs/stories/${t}.rtm.md`]:[],...c.predecessorCount>=4?[`docs/stories/${t}.tasks.md`]:[]];J("git",["diff","--name-only","-z",i.workspace.baseSha,i.snapshotSha,"--"],{cwd:i.workspace.workspacePath,env:Object.fromEntries(Object.entries(process.env).filter(([p])=>!p.startsWith("GIT_"))),encoding:"utf8",timeout:3e4,maxBuffer:1024*1024,stdio:["ignore","pipe","ignore"]}).split("\0").filter(Boolean).some(p=>!K.includes(p))&&a();const _=e==="qa"?f(d,".neocortex","stories",t,"qa-gate-result.json"):c.artifact==="validation-evidence"?f(d,".neocortex","stories",t,"validation-evidence.md"):c.predecessorCount<3?f(d,".neocortex","stories",t,`${c.artifact}.md`):f(d,"docs","stories",`${t}.${c.artifact}.md`),y=ye(_);if((!y.isFile()||y.isSymbolicLink()||y.nlink!==1||y.size<128||y.size>262144||C(k(_))!==s[h]||C(k(f(d,".neocortex/state.json")))!==s.sourceStateSha256)&&a(),c.predecessorCount>=5&&(J("git",["show",`${i.workspace.baseSha}:.neocortex/state.json`],{cwd:i.workspace.workspacePath,timeout:3e4,stdio:["ignore","pipe","ignore"]}).equals(k(f(d,".neocortex/state.json")))||a(),J("git",["diff","--check",i.workspace.baseSha,i.snapshotSha],{cwd:i.workspace.workspacePath,timeout:3e4,stdio:"ignore"}),(e==="implementation"||e==="test-validation"||e==="qa")&&await me(d,s.validationReceiptId,{storyId:t,graphRevision:q,snapshotSha:i.snapshotSha,sourceHeadSha:i.workspace.baseSha}),e==="refactor-advisory"||e==="test-validation"||e==="qa")){const Q=s.previousPhaseReceiptId;(typeof Q!="string"||!/^[a-f0-9]{64}$/.test(Q))&&a();const ce=await ge(await we(d),"private-execution"),ne=e==="qa"?o.skippedPredecessors:[],O=ne.some(w=>w.stepId==="step-b2fe7cb5"),M=ne.some(w=>w.stepId==="step-a8ce5c64"),de=e==="qa"?O?M?"refactor-advisory":"property-tests":"test-validation":e==="refactor-advisory"?"implementation":z?"refactor-advisory":"property-tests",pe=f(ce,`${de}-review-${Q}.json`);await he(pe,ce);const X=k(pe);(X.length>16384||C(X)!==Q)&&a();const g=JSON.parse(X.toString());(g.kind!==`private-${de}-root-review`||g.storyId!==t||g.sourceHeadSha!==i.workspace.baseSha||!/^[a-f0-9]{40,64}$/.test(g.snapshotSha)||g.independentStoryQaAccepted!==!1||g.terminalAccepted!==!1)&&a();const le=(...w)=>J("git",w,{cwd:i.workspace.workspacePath,timeout:3e4,encoding:"utf8",stdio:["ignore","pipe","ignore"]});le("merge-base","--is-ancestor",g.snapshotSha,i.snapshotSha);const Pe=le("diff","--name-only","-z",g.snapshotSha,i.snapshotSha).split("\0").filter(Boolean),Ae=[...e==="qa"?[`.neocortex/stories/${t}/qa-gate-result.json`]:[],`.neocortex/stories/${t}/validation-evidence.md`,`.neocortex/stories/${t}/tdd-evidence.md`,`docs/stories/${t}.rtm.md`];if(Pe.some(w=>!Ae.includes(w))&&a(),e==="qa"){!O&&!ue(g.skippedPredecessors)&&a();const w=O?M:g.skippedPredecessors.length===1,fe=[...["diagnosis","research","specification","tasks","implementation","refactor-advisory"].map(x=>V[x].digest),...w?[]:["a8ce5c6462803364cabab06cd41304a578ca2f1d50627c7f162020159670dedf"],...O?[]:[V["test-validation"].digest]];P={digests:fe,count:fe.length+1,status:O?M?"refactor-suggest-done":"property-tests-emitted":"tests-validated"};const F=await me(d,s.validationReceiptId,{storyId:t,graphRevision:q,snapshotSha:i.snapshotSha,sourceHeadSha:i.workspace.baseSha});(F.structuralIntegrity?.schemaVersion!==1||F.structuralIntegrity?.scope!=="project-snapshot"||F.structuralIntegrity.canonicalStateParsed!==!0||F.structuralIntegrity.trackedInputsUnchanged!==!0)&&a();const l=JSON.parse(k(_,"utf8"));(l.schemaVersion!==3||l.candidate!==!0||l.stageComplete!==!1||l.status!=="qa-review-pending"||l.independentStoryQaAccepted!==!1||!Array.isArray(l.blockingChecks)||l.blockingChecks.length!==0||!ve(l.structuralPrecheck)||["schemaVersion","kind","stepId","generationId","graphRevision","topologyGenerationId","tier","publicSafe"].some(x=>l.structuralPrecheck[x]!==o.structuralPrecheck[x])||!Array.isArray(l.followUpDebt)||l.followUpDebt.length>50)&&a();for(const x of l.followUpDebt){const I=v(x);(!I||!N(I,["id","reasonCode","ownerArea","severity","description","trigger","publicSafe"])||I.publicSafe!==!0||!["P2","P3"].includes(String(I.severity))||["id","reasonCode","ownerArea","description","trigger"].some(Z=>typeof I[Z]!="string"||I[Z].length<1||I[Z].length>1e3))&&a()}se=l.followUpDebt}}if(e==="tasks"||c.predecessorCount>=5){const p=ye(f(d,"docs/stories",`${t}.rtm.md`));(!p.isFile()||p.isSymbolicLink()||p.nlink!==1||p.size<128||p.size>262144)&&a()}return i},$=await u(),Re=JSON.parse(k(f(d,".neocortex/state.json"),"utf8")),ke=De(Re,T),A=v(v(ke.stories)?.[t]);(!A||A.checkpoint!==void 0)&&a();const L=s.rawStepId,ae=i=>{if(e==="diagnosis")return Se(i);const R=i.steps_completed,Y=[...["diagnosis","research","specification","tasks","implementation","refactor-advisory"].map(y=>V[y].digest),"a8ce5c6462803364cabab06cd41304a578ca2f1d50627c7f162020159670dedf"];if(e==="qa"&&!P)return!1;const K=e==="qa"?P.status:te,re=e==="qa"?P.count:ee,_=e==="qa"?P.digests:Y;return i.status===K&&Array.isArray(R)&&R.length===re&&i.last_step===R.at(-1)&&R.slice(1).every((y,p)=>typeof y=="string"&&C(y)===_[p])&&Se({status:"branch-ready",last_step:R[0],steps_completed:[R[0]]})},D=A.steps_completed,E=A?.status===c.status&&A.last_step===L&&Array.isArray(D)&&D.length===(e==="qa"?P.count:ee)+1&&D.at(-1)===L&&ae({status:e==="qa"?P.status:te,last_step:D.at(-2),steps_completed:D.slice(0,-1)});!E&&!ae(A)&&a();const be={schemaVersion:1,kind:`private-${e}-root-review`,storyId:t,graphRevision:q,sourceHeadSha:$.workspace.baseSha,snapshotSha:$.snapshotSha,[h]:s[h],sourceStateSha256:s.sourceStateSha256,reviewedAt:s.reviewedAt,checks:s.checks,...["implementation","test-validation","qa"].includes(e)?{validationReceiptId:s.validationReceiptId}:{},...["refactor-advisory","test-validation","qa"].includes(e)?{previousPhaseReceiptId:s.previousPhaseReceiptId}:{},...["test-validation","qa"].includes(e)?{skippedPredecessors:o.skippedPredecessors}:{},...e==="qa"?{structuralPrecheck:o.structuralPrecheck,precommitQaAccepted:!0,optionalDebt:se}:{},independentStoryQaAccepted:!1,terminalAccepted:!1},W=JSON.stringify(be)+`
|
|
2
|
+
`,oe=C(W),j=await ge(await we(d),"private-execution"),G=`${e}-review-${oe}.json`;return xe(f(j,G))?(await he(f(j,G),j),k(f(j,G),"utf8")!==W&&a()):await Oe(j,G,W),E||await je(d,i=>{(JSON.stringify(i.epics[ie])!==JSON.stringify(U)||JSON.stringify(i.stories[t])!==JSON.stringify(T.stories[t]))&&a(),i.stories[t]={...i.stories[t],status:c.status,last_step:L,steps_completed:[...A.steps_completed,L]}},{expectedRevision:T.revision,preCommit:async()=>{await u()}}),{schemaVersion:1,outcome:`${e}-root-accepted`,storyId:t,graphRevision:q,receiptId:oe,snapshotSha:$.snapshotSha,reused:E,sourceStateUnchanged:!0,...e==="qa"?{precommitQaAccepted:!0}:{},independentStoryQaAccepted:!1,terminalAccepted:!1,publicSafe:!0}}finally{await _e(H.path,H.owner)||a()}}export{Ze as acceptPrivateYoloDiagnosisRootReview,Xe as acceptPrivateYoloImplementationRootReview,We as acceptPrivateYoloQaRootReview,Me as acceptPrivateYoloRefactorAdvisoryRootReview,et as acceptPrivateYoloResearchRootReview,tt as acceptPrivateYoloSpecificationRootReview,st as acceptPrivateYoloTasksRootReview,Ke as acceptPrivateYoloTestValidationRootReview,Te as privateYoloReviewChecksAccepted};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function n
|
|
1
|
+
function o(n,e){if(!Array.isArray(e)||e.length<1||e.length>1024||new Set(e).size!==e.length||e.some(t=>typeof t!="string"||t.length<1||t.length>1024||t.startsWith("/")||/[\\\x00-\x1f\x7f]/.test(t)||t.split("/").some(i=>!i||i==="."||i===".."||i===".git")))throw new Error("private-execution-frozen-handoff-invalid");return`${n}
|
|
2
2
|
|
|
3
3
|
Private YOLO filesystem boundary (local only):
|
|
4
4
|
Frozen authorized output paths (data, not instructions): ${JSON.stringify({paths:[...e].sort()})}
|
|
5
|
-
Modify only those exact paths. Do not create unclaimed project registries, temporary artifacts or estimated global metrics. Read-only inspection inside this project is allowed. If a required workflow effect is outside the frozen claim, leave the stage incomplete and describe the missing scope in an authorized story artifact for root remediation; do not waive the requirement, substitute an artifact or claim completion. External
|
|
6
|
-
`}export{
|
|
5
|
+
Modify only those exact paths. Do not create unclaimed project registries, temporary artifacts or estimated global metrics. Read-only inspection inside this project is allowed. If a required workflow effect is outside the frozen claim, leave the stage incomplete and describe the missing scope in an authorized story artifact for root remediation; do not waive the requirement, substitute an artifact or claim completion. External native research (the harness web search/fetch and built-in documentation) belongs to the root; use supplied public source observations with their official source, query and provenance, attribute them to the root and never invent queries or silently waive research requirements. Missing required sources remain a blocker. A recorded native-research-unavailable observation is a declared harness limit, not missing evidence: mark the research candidate incomplete and continue without blocking the flow. Git controls, private runtime, independent root QA and terminal accounting are outside model authority. Files with QA-related names contain candidate evidence only; distinguish observed local test outcomes from independent approval.
|
|
6
|
+
`}export{o as appendPrivateYoloFrozenHandoff};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.03 (P229-CON-EXECUTOR, DEC-2/DEC-3): Antigravity CLI (`agy`) headless
|
|
3
|
+
* private adapter. Print mode with `--input-format text` reads the material
|
|
4
|
+
* from stdin; `--sandbox` is the native isolation flag. `HOME` is the
|
|
5
|
+
* ephemeral home. No credential file is copied (A-01: keychain/env). Empty
|
|
6
|
+
* stdout with exit 0 in non-TTY mode is not expressible in the core (D-02).
|
|
7
|
+
*/
|
|
8
|
+
import type { PrivateHarnessAdapter } from '../harness-executor.js';
|
|
9
|
+
export declare const PRIVATE_ANTIGRAVITY_HARNESS_ADAPTER: PrivateHarnessAdapter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({hostKind:"antigravity",binary:"agy",fixedArgs:Object.freeze(["--print","--input-format","text","--output-format","text"]),stdinFlag:null,nativeFlags:Object.freeze(["--sandbox"]),configDirEnv:null,configDirEnvs:Object.freeze({HOME:""}),credentialFiles:Object.freeze([]),environmentKeys:Object.freeze(["PATH","HOME","LANG","LC_ALL","TERM"]),versionArgs:Object.freeze(["--version"]),versionPattern:/^(?:(?:agy|antigravity)\s+)?v?(\d+\.\d+\.\d+)$/,minimumVersion:"0.0.1",platforms:Object.freeze(["linux","darwin","win32"])});export{e as PRIVATE_ANTIGRAVITY_HARNESS_ADAPTER};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.02 (P229-CON-EXECUTOR, AC1): Claude Code headless private adapter. The
|
|
3
|
+
* protected material is read from stdin by print mode; argv carries only fixed
|
|
4
|
+
* flags and `--no-session-persistence`. `CLAUDE_CONFIG_DIR` points at the
|
|
5
|
+
* ephemeral home, where the declared credential is mirrored.
|
|
6
|
+
*/
|
|
7
|
+
import type { PrivateHarnessAdapter } from '../harness-executor.js';
|
|
8
|
+
export declare const PRIVATE_CLAUDE_CODE_HARNESS_ADAPTER: PrivateHarnessAdapter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({hostKind:"claude-code",binary:"claude",fixedArgs:Object.freeze(["-p","--strict-mcp-config","--agent","neocortex-sentinel","--output-format","json"]),stdinFlag:null,nativeFlags:Object.freeze(["--no-session-persistence"]),configDirEnv:null,configDirEnvs:Object.freeze({CLAUDE_CONFIG_DIR:".claude"}),credentialFiles:Object.freeze([".claude/.credentials.json"]),credentialSource:Object.freeze({homeRelative:""}),environmentKeys:Object.freeze(["PATH","HOME","LANG","LC_ALL","TERM"]),versionArgs:Object.freeze(["--version"]),versionPattern:/^(\d+\.\d+\.\d+) \(Claude Code\)$/,minimumVersion:"2.1.0",platforms:Object.freeze(["linux","darwin","win32"])});export{e as PRIVATE_CLAUDE_CODE_HARNESS_ADAPTER};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.02 (AC3, D-002): the Codex adapter is the single declaration integrated
|
|
3
|
+
* by P229.01 in `codex-executor.ts`; it is re-exported here, never copied.
|
|
4
|
+
* darwin/win32 run through the host-neutral core port; the Linux v6 path in
|
|
5
|
+
* `codex-executor.ts` is unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export { PRIVATE_CODEX_DATA_CONTROLS, PRIVATE_CODEX_HARNESS_ADAPTER } from '../codex-executor.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PRIVATE_CODEX_DATA_CONTROLS as _,PRIVATE_CODEX_HARNESS_ADAPTER as R}from"../codex-executor.js";export{_ as PRIVATE_CODEX_DATA_CONTROLS,R as PRIVATE_CODEX_HARNESS_ADAPTER};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.03 (P229-CON-EXECUTOR, DEC-2/DEC-3): GitHub Copilot CLI headless private
|
|
3
|
+
* adapter. Silent mode without `-p` reads the material from piped stdin and
|
|
4
|
+
* never asks the user; auto-update is disabled natively. `COPILOT_HOME` points
|
|
5
|
+
* at the ephemeral home. No credential file is copied (A-01: keychain/env).
|
|
6
|
+
*/
|
|
7
|
+
import type { PrivateHarnessAdapter } from '../harness-executor.js';
|
|
8
|
+
export declare const PRIVATE_COPILOT_CLI_HARNESS_ADAPTER: PrivateHarnessAdapter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({hostKind:"github-copilot-cli",binary:"copilot",fixedArgs:Object.freeze(["-s","--no-ask-user"]),stdinFlag:null,nativeFlags:Object.freeze(["--no-auto-update"]),configDirEnv:"COPILOT_HOME",credentialFiles:Object.freeze([]),environmentKeys:Object.freeze(["PATH","HOME","LANG","LC_ALL","TERM"]),versionArgs:Object.freeze(["--version"]),versionPattern:/^(?:copilot\s+)?v?(\d+\.\d+\.\d+)$/,minimumVersion:"0.0.1",platforms:Object.freeze(["linux","darwin","win32"])});export{e as PRIVATE_COPILOT_CLI_HARNESS_ADAPTER};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.03 (P229-CON-REFUSAL, DEC-2, Q-01): Cursor has no adapter. The research
|
|
3
|
+
* (SRC-03..SRC-07) documents its headless prompt only as an argv argument, never
|
|
4
|
+
* through stdin, so private material would reach argv. It is a declared refusal
|
|
5
|
+
* until stdin is documented; `createPrivateHarnessExecutorPort` returns
|
|
6
|
+
* `undefined` and invoke refuses before any HTTP call.
|
|
7
|
+
*/
|
|
8
|
+
import type { PrivateHarnessRefusalDecision } from './index.js';
|
|
9
|
+
export declare const PRIVATE_CURSOR_HARNESS_DECISION: PrivateHarnessRefusalDecision;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({kind:"refusal",reasonCode:"private-executor-headless-unavailable"});export{e as PRIVATE_CURSOR_HARNESS_DECISION};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.03 (P229-CON-REFUSAL, DEC-2, Q-01): DeepSeek has no adapter. The research
|
|
3
|
+
* (SRC-03..SRC-07) documents its headless prompt only as an argv argument, never
|
|
4
|
+
* through stdin, so private material would reach argv. It is a declared refusal
|
|
5
|
+
* until stdin is documented; `createPrivateHarnessExecutorPort` returns
|
|
6
|
+
* `undefined` and invoke refuses before any HTTP call.
|
|
7
|
+
*/
|
|
8
|
+
import type { PrivateHarnessRefusalDecision } from './index.js';
|
|
9
|
+
export declare const PRIVATE_DEEPSEEK_HARNESS_DECISION: PrivateHarnessRefusalDecision;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({kind:"refusal",reasonCode:"private-executor-headless-unavailable"});export{e as PRIVATE_DEEPSEEK_HARNESS_DECISION};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.02 (P229-CON-EXECUTOR, AC1): Gemini CLI headless private adapter. Piped
|
|
3
|
+
* stdin without a TTY forces non-interactive mode, so argv has no prompt.
|
|
4
|
+
* `GEMINI_CLI_HOME` points at the ephemeral home (checkpointing stays off by
|
|
5
|
+
* default there).
|
|
6
|
+
*/
|
|
7
|
+
import type { PrivateHarnessAdapter } from '../harness-executor.js';
|
|
8
|
+
export declare const PRIVATE_GEMINI_HARNESS_ADAPTER: PrivateHarnessAdapter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({hostKind:"gemini",binary:"gemini",fixedArgs:Object.freeze(["--output-format","json","--approval-mode","auto_edit"]),stdinFlag:null,nativeFlags:Object.freeze([]),configDirEnv:"GEMINI_CLI_HOME",credentialFiles:Object.freeze([".gemini/oauth_creds.json"]),credentialSource:Object.freeze({homeRelative:""}),environmentKeys:Object.freeze(["PATH","HOME","LANG","LC_ALL","TERM"]),versionArgs:Object.freeze(["--version"]),versionPattern:/^v?(\d+\.\d+\.\d+)$/,minimumVersion:"0.16.0",platforms:Object.freeze(["linux","darwin","win32"])});export{e as PRIVATE_GEMINI_HARNESS_ADAPTER};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P229.03 (P229-CON-REFUSAL, DEC-2, Q-01): Grok has no adapter. The research
|
|
3
|
+
* (SRC-03..SRC-07) documents its headless prompt only as an argv argument, never
|
|
4
|
+
* through stdin, so private material would reach argv. It is a declared refusal
|
|
5
|
+
* until stdin is documented; `createPrivateHarnessExecutorPort` returns
|
|
6
|
+
* `undefined` and invoke refuses before any HTTP call.
|
|
7
|
+
*/
|
|
8
|
+
import type { PrivateHarnessRefusalDecision } from './index.js';
|
|
9
|
+
export declare const PRIVATE_GROK_HARNESS_DECISION: PrivateHarnessRefusalDecision;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze({kind:"refusal",reasonCode:"private-executor-headless-unavailable"});export{e as PRIVATE_GROK_HARNESS_DECISION};
|