codex-workflow-v2 2.0.0-beta.13 → 2.0.0-beta.13.10
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/README.md +6 -1
- package/dist/reviewer-runtime-build.json +44 -20
- package/dist/src/alpha6/failed-step-planning-recovery.d.ts +10 -0
- package/dist/src/alpha6/failed-step-planning-recovery.js +93 -0
- package/dist/src/alpha6/failed-step-planning-recovery.js.map +1 -0
- package/dist/src/alpha6/plan-risk.d.ts +4 -0
- package/dist/src/alpha6/plan-risk.js +50 -13
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/alpha6/preexecution-replan.d.ts +38 -0
- package/dist/src/alpha6/preexecution-replan.js +130 -0
- package/dist/src/alpha6/preexecution-replan.js.map +1 -0
- package/dist/src/alpha6/remediation.d.ts +4 -2
- package/dist/src/alpha6/remediation.js +155 -20
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/alpha6/root-cause-replan-carryover.d.ts +18 -0
- package/dist/src/alpha6/root-cause-replan-carryover.js +396 -0
- package/dist/src/alpha6/root-cause-replan-carryover.js.map +1 -0
- package/dist/src/alpha7/autonomy.d.ts +3 -0
- package/dist/src/alpha7/autonomy.js +89 -42
- package/dist/src/alpha7/autonomy.js.map +1 -1
- package/dist/src/change-explanation.d.ts +64 -0
- package/dist/src/change-explanation.js +150 -0
- package/dist/src/change-explanation.js.map +1 -0
- package/dist/src/cli-actions.d.ts +3 -2
- package/dist/src/cli-actions.js +6 -0
- package/dist/src/cli-actions.js.map +1 -1
- package/dist/src/cli.js +73 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +38 -0
- package/dist/src/dependency-provenance.d.ts +3 -2
- package/dist/src/dependency-provenance.js +33 -2
- package/dist/src/dependency-provenance.js.map +1 -1
- package/dist/src/domain/plan-semantics.d.ts +11 -0
- package/dist/src/domain/plan-semantics.js +49 -0
- package/dist/src/domain/plan-semantics.js.map +1 -0
- package/dist/src/gateway-handshake.js +2 -0
- package/dist/src/gateway-handshake.js.map +1 -1
- package/dist/src/lifecycle/corrective-replan.js +3 -3
- package/dist/src/lifecycle/corrective-replan.js.map +1 -1
- package/dist/src/observed-routes.js +1 -0
- package/dist/src/observed-routes.js.map +1 -1
- package/dist/src/pending-review-update.d.ts +49 -0
- package/dist/src/pending-review-update.js +132 -0
- package/dist/src/pending-review-update.js.map +1 -0
- package/dist/src/repository.js +16 -4
- package/dist/src/repository.js.map +1 -1
- package/dist/src/reviewer.js +4 -1
- package/dist/src/reviewer.js.map +1 -1
- package/dist/src/state/corrective-replan-executor.js +3 -1
- package/dist/src/state/corrective-replan-executor.js.map +1 -1
- package/dist/src/state/corrective-replan-public.js +5 -4
- package/dist/src/state/corrective-replan-public.js.map +1 -1
- package/dist/src/state/corrective-yield-executor.js +12 -3
- package/dist/src/state/corrective-yield-executor.js.map +1 -1
- package/dist/src/state/store.d.ts +1 -1
- package/dist/src/state/store.js +17 -3
- package/dist/src/state/store.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/src/workflow.d.ts +84 -1
- package/dist/src/workflow.js +1616 -355
- package/dist/src/workflow.js.map +1 -1
- package/docs/beta13.2-signal-review-recovery.md +38 -0
- package/docs/change-model.md +118 -0
- package/docs/delegated-approval.md +26 -0
- package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
- package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +9 -1
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +9 -5
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +18 -3
- package/docs/pending-review-update.md +15 -0
- package/docs/release.md +267 -2
- package/docs/updating-existing-project.md +36 -6
- package/docs/validation-report.md +30 -9
- package/package.json +2 -1
- package/plugins/codex-workflow-gateway/references/chat-dispatch.md +204 -0
- package/plugins/codex-workflow-gateway/references/protocol.md +11 -0
- package/plugins/codex-workflow-gateway/scripts/chat-dispatch.mjs +298 -0
- package/plugins/codex-workflow-gateway/scripts/chat-model-policy.mjs +43 -0
- package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +55 -3
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +218 -21
- package/schemas/plan-risk-audit-event.schema.json +1 -0
- package/schemas/preexecution-replan-event.schema.json +45 -0
- package/schemas/task.schema.json +55 -0
package/dist/src/workflow.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { type ChangeExplanationInput } from './change-explanation.js';
|
|
2
|
+
import { type PendingReviewUpdateBinding, type PendingReviewUpdatePreflight } from './pending-review-update.js';
|
|
1
3
|
import { type AdoptionPostureEvent, type AuditedRemediationEvidence, type ContextEnvelope, type CorrectivePlanAuditInput, type DependencyProvenanceRecoveryPreflight, type DelegationGrant, type DelegationGrantGate, type DelegationPolicyInput, type DiscoveryState, type MilestonePlanInput, type MilestoneProgressProjection, type MilestoneState, type KnowledgeSelection, type GraphBinding, type GraphKind, type GraphMode, type GraphRefreshEvidence, type GraphRefreshRequest, type HistoricalStepProvenanceRecoveryPreflight, type PlanRiskAuditEvent, type PublicWriterLease, type PublicWriterLeaseDiagnostic, type PublicWriterLeaseRepairResult, type ProjectKnowledgeMap, type ReviewInput, type StopEscalateOverrideEvent, type StopEscalateOverridePreparation, type TaskPlanInput, type TaskContextRefreshResult, type TaskState, type UpdatePreflightResult, type WriterCredentialResult, type WriterCredentialStatus, type WorkflowObservation, type WorkflowRole, type WorkspaceOwner } from './contracts.js';
|
|
2
4
|
import { appendTaskClaim, appendTaskHandback, readTaskC1Posture } from './alpha6/handoff.js';
|
|
3
5
|
import { prepareDownstreamProofInvalidation, prepareDownstreamProofReplanRecovery } from './alpha6/downstream-proof.js';
|
|
4
6
|
import { type AdoptionPreparation } from './alpha6/adoption.js';
|
|
5
7
|
import { type RecordPlanRiskAuditInput } from './alpha6/plan-risk.js';
|
|
8
|
+
import { type PreExecutionReplanEvent } from './alpha6/preexecution-replan.js';
|
|
6
9
|
import { type ActiveMilestoneAutonomy, type MilestoneAutonomyPreparation } from './alpha7/autonomy.js';
|
|
7
10
|
import { type ExternalStrictStepReviewInput, type ExternalStrictTaskReviewInput, type ReviewMode, type ReviewerCommandRunner } from './reviewer.js';
|
|
8
11
|
import { FileStateStore } from './state/store.js';
|
|
@@ -133,11 +136,18 @@ interface MilestoneInitialAssemblyNavigation {
|
|
|
133
136
|
executionAvailable: false;
|
|
134
137
|
options: MilestoneInitialAssemblyOption[];
|
|
135
138
|
}
|
|
139
|
+
export interface WorkflowTransactionHooks {
|
|
140
|
+
afterPreExecutionReplanTargetWrite?: (index: number, target: {
|
|
141
|
+
path: string;
|
|
142
|
+
content: string | null;
|
|
143
|
+
}) => void;
|
|
144
|
+
}
|
|
136
145
|
export declare class WorkflowService {
|
|
137
146
|
#private;
|
|
138
147
|
readonly store: FileStateStore;
|
|
139
148
|
private readonly now;
|
|
140
|
-
|
|
149
|
+
private readonly transactionHooks;
|
|
150
|
+
constructor(store?: FileStateStore, now?: () => Date, transactionHooks?: WorkflowTransactionHooks);
|
|
141
151
|
inspectWriterLease(repository: string, entityId: string): PublicWriterLeaseDiagnostic | null;
|
|
142
152
|
repairStaleWriterLease(repository: string, entityId: string): PublicWriterLeaseRepairResult;
|
|
143
153
|
prepareTaskStopOverride(repository: string, taskId: string, stepId: string, expectedRevision: number, actor: string, reason: string): StopEscalateOverridePreparation;
|
|
@@ -189,6 +199,7 @@ export declare class WorkflowService {
|
|
|
189
199
|
setMilestonePlan(repository: string, milestoneId: string, expectedRevision: number, plan: MilestonePlanInput): MilestoneState;
|
|
190
200
|
prepareMilestoneScopeChange(repository: string, milestoneId: string, expectedRevision: number, plan: MilestonePlanInput, actor: string): MilestoneScopeChangePreparation;
|
|
191
201
|
applyMilestoneScopeChange(repository: string, milestoneId: string, expectedRevision: number, plan: MilestonePlanInput, actor: string, confirmationCode: string): MilestoneState;
|
|
202
|
+
listDelegations(projectId: string): DelegationGrant[];
|
|
192
203
|
prepareMilestoneAutonomy(repository: string, milestoneId: string, expectedRevision: number, principal: string, delegate: string, expiresAt: string): MilestoneAutonomyPreparation;
|
|
193
204
|
grantMilestoneAutonomy(repository: string, milestoneId: string, expectedRevision: number, principal: string, delegate: string, expiresAt: string, confirmationCode: string): ActiveMilestoneAutonomy;
|
|
194
205
|
evolveMilestonePlanAutonomously(repository: string, milestoneId: string, expectedRevision: number, plan: MilestonePlanInput, actor: string): MilestoneState;
|
|
@@ -201,6 +212,16 @@ export declare class WorkflowService {
|
|
|
201
212
|
refreshTaskContext(repository: string, taskId: string, expectedTaskRevision: number, expectedKnowledgeMapRevision: number, actor: string, delegationGrantId: string | null): TaskContextRefreshResult;
|
|
202
213
|
authorizeTask(repository: string, taskId: string, expectedRevision: number, actor: string, reason?: string, delegationGrantId?: string | null): TaskState;
|
|
203
214
|
recordPlanRiskAudit(repository: string, taskId: string, expectedRevision: number, input: RecordPlanRiskAuditInput): PlanRiskAuditEvent;
|
|
215
|
+
recordPreExecutionReplan(repository: string, taskId: string, expectedRevision: number, actor: string, reason: string, binding: {
|
|
216
|
+
expectedBriefHash: string;
|
|
217
|
+
expectedPlanHash: string;
|
|
218
|
+
expectedPlanRiskAuditEventHash: string;
|
|
219
|
+
expectedHeadCommit: string;
|
|
220
|
+
}, input: RecordPlanRiskAuditInput): {
|
|
221
|
+
task: TaskState;
|
|
222
|
+
audit: PlanRiskAuditEvent;
|
|
223
|
+
event: PreExecutionReplanEvent;
|
|
224
|
+
};
|
|
204
225
|
showTaskHandoff(repository: string, taskId: string): {
|
|
205
226
|
task: TaskState;
|
|
206
227
|
posture: ReturnType<typeof readTaskC1Posture>;
|
|
@@ -280,10 +301,24 @@ export declare class WorkflowService {
|
|
|
280
301
|
};
|
|
281
302
|
prepareAdoption(repository: string): AdoptionPreparation;
|
|
282
303
|
applyAdoption(repository: string, actor: string, confirmationCode: string): AdoptionPostureEvent;
|
|
304
|
+
pendingReviewUpdatePreflight(repository: string, taskId: string): PendingReviewUpdatePreflight;
|
|
305
|
+
pendingReviewDependencyPreflight(repository: string, taskId: string, source: PendingReviewUpdateBinding): {
|
|
306
|
+
readOnly: boolean;
|
|
307
|
+
eligible: boolean;
|
|
308
|
+
blockers: string[];
|
|
309
|
+
taskHead: string;
|
|
310
|
+
baseTransportCommit: string | null;
|
|
311
|
+
};
|
|
312
|
+
recoverPendingReviewDependency(repository: string, taskId: string, expectedRevision: number, source: PendingReviewUpdateBinding, actor: string, reason: string): TaskState;
|
|
283
313
|
updatePreflight(repository: string): UpdatePreflightResult & {
|
|
284
314
|
adoption: AdoptionPreparation | null;
|
|
285
315
|
};
|
|
286
316
|
dependencyProvenanceRecoveryPreflight(repository: string, taskId: string): DependencyProvenanceRecoveryPreflight;
|
|
317
|
+
correctiveCarryoverUpdatePreflight(repository: string, taskId: string, candidate?: {
|
|
318
|
+
plan: TaskPlanInput;
|
|
319
|
+
planRiskAudit: RecordPlanRiskAuditInput;
|
|
320
|
+
} | null): Record<string, unknown>;
|
|
321
|
+
private consumedCarryoverSourceRecoveryPreflight;
|
|
287
322
|
historicalStepProvenanceRecoveryPreflight(repository: string, taskId: string): HistoricalStepProvenanceRecoveryPreflight;
|
|
288
323
|
historicalStepDependencyRecoveryPreflight(repository: string, taskId: string): DependencyProvenanceRecoveryPreflight;
|
|
289
324
|
recoverHistoricalStepProvenance(repository: string, taskId: string, expectedRevision: number, commitSha: string, actor: string, reason: string): TaskState;
|
|
@@ -313,6 +348,53 @@ export declare class WorkflowService {
|
|
|
313
348
|
};
|
|
314
349
|
bindGraph(repository: string, expectedRevision: number | null, request: GraphRefreshRequest, evidence: GraphRefreshEvidence): GraphBinding;
|
|
315
350
|
recordGraphFallback(repository: string, graphKind: GraphKind, mode: GraphMode, expectedRevision: number | null, reason: string): GraphBinding;
|
|
351
|
+
explainChange(repository: string, taskId: string, input: ChangeExplanationInput): {
|
|
352
|
+
kind: string;
|
|
353
|
+
version: number;
|
|
354
|
+
readOnly: boolean;
|
|
355
|
+
authority: string;
|
|
356
|
+
changeKind: string;
|
|
357
|
+
decisionBasis: string;
|
|
358
|
+
binding: {
|
|
359
|
+
projectId: string;
|
|
360
|
+
repositoryRoot: string;
|
|
361
|
+
taskId: string | null;
|
|
362
|
+
revision: number | null;
|
|
363
|
+
planHash: string | null;
|
|
364
|
+
head: string;
|
|
365
|
+
proposedPaths: string[];
|
|
366
|
+
observedDirtyPaths: string[];
|
|
367
|
+
proposedPathBytesHash: string | null;
|
|
368
|
+
requestHash: string;
|
|
369
|
+
existingAction: string;
|
|
370
|
+
};
|
|
371
|
+
proposalHash: string;
|
|
372
|
+
executionContext: {
|
|
373
|
+
state: string;
|
|
374
|
+
externallyEnforced: boolean;
|
|
375
|
+
};
|
|
376
|
+
blockers: {
|
|
377
|
+
layer: string;
|
|
378
|
+
code: string;
|
|
379
|
+
resolution: string;
|
|
380
|
+
}[];
|
|
381
|
+
existingRoute: {
|
|
382
|
+
action: string;
|
|
383
|
+
blockedByExplanation: boolean;
|
|
384
|
+
recheckNextBeforeMutation: boolean;
|
|
385
|
+
};
|
|
386
|
+
proposedPaths: string[];
|
|
387
|
+
outsideCurrentStep: string[];
|
|
388
|
+
boundedAmendment: {
|
|
389
|
+
route: string;
|
|
390
|
+
prerequisite: string | null;
|
|
391
|
+
scopeExtensions: string[];
|
|
392
|
+
effect: unknown;
|
|
393
|
+
} | null;
|
|
394
|
+
requiresUser: boolean | null;
|
|
395
|
+
validationNeeded: string[];
|
|
396
|
+
limitations: string[];
|
|
397
|
+
};
|
|
316
398
|
next(repository: string, taskId?: string | null): Record<string, unknown>;
|
|
317
399
|
private nextFromStatus;
|
|
318
400
|
private delegatedAuthorization;
|
|
@@ -343,6 +425,7 @@ export declare class WorkflowService {
|
|
|
343
425
|
private carriedPostRebindCheckSupportDirtyCarryover;
|
|
344
426
|
private assessPostRebindCheckSupportDirtyCarryover;
|
|
345
427
|
private inspectDependencyProvenanceCandidate;
|
|
428
|
+
private assessCurrentRootCauseReplanDirtyCarryover;
|
|
346
429
|
private inspectHistoricalStepProvenanceCandidate;
|
|
347
430
|
private withTaskNavigationContracts;
|
|
348
431
|
private writerCredentialRecoveryActor;
|