codex-workflow-v2 2.0.0-beta.12 → 2.0.0-beta.12.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/README.md +4 -3
- package/dist/src/alpha6/remediation.d.ts +6 -1
- package/dist/src/alpha6/remediation.js +356 -7
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/cli.js +18 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +42 -0
- package/dist/src/dependency-provenance.js +5 -3
- package/dist/src/dependency-provenance.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 +4 -1
- package/dist/src/workflow.js +113 -13
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +22 -1
- 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 +16 -5
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +10 -8
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +25 -11
- package/docs/release.md +6 -1
- package/docs/updating-existing-project.md +25 -0
- package/docs/validation-report.md +82 -81
- package/package.json +1 -1
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
- package/plugins/codex-workflow-gateway/references/protocol.md +15 -1
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +17 -0
- package/schemas/stop-escalate-override-event.schema.json +45 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-provenance.js","sourceRoot":"","sources":["../../src/dependency-provenance.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7D,OA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|
|
2
|
-
export declare const PACKAGE_VERSION = "2.0.0-beta.12";
|
|
2
|
+
export declare const PACKAGE_VERSION = "2.0.0-beta.12.1";
|
package/dist/src/version.js
CHANGED
package/dist/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC"}
|
package/dist/src/workflow.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AdoptionPostureEvent, 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 PlanRiskAuditEvent, type PublicWriterLease, type PublicWriterLeaseDiagnostic, type PublicWriterLeaseRepairResult, type ProjectKnowledgeMap, type ReviewInput, type TaskPlanInput, type TaskContextRefreshResult, type TaskState, type UpdatePreflightResult, type WriterCredentialResult, type WriterCredentialStatus, type WorkflowObservation, type WorkflowRole, type WorkspaceOwner } from './contracts.js';
|
|
1
|
+
import { type AdoptionPostureEvent, 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 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
2
|
import { appendTaskClaim, appendTaskHandback, readTaskC1Posture } from './alpha6/handoff.js';
|
|
3
3
|
import { type AdoptionPreparation } from './alpha6/adoption.js';
|
|
4
4
|
import { type RecordPlanRiskAuditInput } from './alpha6/plan-risk.js';
|
|
@@ -99,6 +99,8 @@ export declare class WorkflowService {
|
|
|
99
99
|
constructor(store?: FileStateStore, now?: () => Date);
|
|
100
100
|
inspectWriterLease(repository: string, entityId: string): PublicWriterLeaseDiagnostic | null;
|
|
101
101
|
repairStaleWriterLease(repository: string, entityId: string): PublicWriterLeaseRepairResult;
|
|
102
|
+
prepareTaskStopOverride(repository: string, taskId: string, stepId: string, expectedRevision: number, actor: string, reason: string): StopEscalateOverridePreparation;
|
|
103
|
+
applyTaskStopOverride(repository: string, taskId: string, stepId: string, expectedRevision: number, actor: string, reason: string, confirmationCode: string): StopEscalateOverrideEvent;
|
|
102
104
|
prepareCorrectiveReplan(repository: string, taskId: string, candidate: CorrectiveReplanPublicCandidate): CorrectiveReplanHumanGateResult;
|
|
103
105
|
confirmCorrectiveReplan(repository: string, taskId: string, candidate: CorrectiveReplanPublicCandidate, gate: CorrectiveReplanHumanGate, confirmationCode: string): CorrectiveReplanPublicCredential;
|
|
104
106
|
executeCorrectiveReplan(repository: string, taskId: string, candidate: CorrectiveReplanPublicCandidate, credential: CorrectiveReplanPublicCredential): CorrectiveReplanExecutionResult;
|
|
@@ -246,6 +248,7 @@ export declare class WorkflowService {
|
|
|
246
248
|
private assertTaskContextChangeAllowed;
|
|
247
249
|
private taskHasTerminalCorrectiveDecision;
|
|
248
250
|
private taskTerminalCorrectivePosture;
|
|
251
|
+
private assertStopOverrideRepositoryBoundary;
|
|
249
252
|
private delegatedApprovalOptions;
|
|
250
253
|
private delegatedContextRefreshOptions;
|
|
251
254
|
private findDelegatedContextRefreshOwner;
|
package/dist/src/workflow.js
CHANGED
|
@@ -13,7 +13,7 @@ import { inspectLocalDependency, inspectWorkflowVersions } from './diagnostics.j
|
|
|
13
13
|
import { appendTaskClaim, appendTaskHandback, appendTaskHandoff, appendTaskWriterCredentialReplacement, assertTaskClaimAllowed, assertTaskMutationAllowedByC1, defaultTaskWorkerActor, readTaskC1Posture, } from './alpha6/handoff.js';
|
|
14
14
|
import { applyAdoptionPosture, assertAdoptionBaselinePreserved, buildAdoptionPreparation, initializeProjectRegistrationAdoption, readCurrentAdoptionPosture, } from './alpha6/adoption.js';
|
|
15
15
|
import { appendCurrentPlanRiskAudit, appendReboundPlanRiskAudit, readCurrentPlanRiskAudit, validatePlanRiskAuditCandidate, } from './alpha6/plan-risk.js';
|
|
16
|
-
import { appendCorrectiveDecisionEvent, appendPlanIntegrityRecoveryDecision, appendRemediationEvent, appendRemediationModeRecovery, assertCorrectiveAuditorIndependence, assertGuardedRemediationAttemptAllowed, defaultCorrectiveAuditorActor, findCurrentGuardedRemediationPosture, findRemediationModeRecoveryCandidate, findFailedGuardedStepRequiringCorrectiveDecision, readGuardedRemediationPostureForStep, readCorrectiveDecisionEvents, readRemediationEvents, } from './alpha6/remediation.js';
|
|
16
|
+
import { appendCorrectiveDecisionEvent, appendPlanIntegrityRecoveryDecision, appendRemediationEvent, appendRemediationModeRecovery, appendStopEscalateOverride, assertCorrectiveAuditorIndependence, assertGuardedRemediationAttemptAllowed, defaultCorrectiveAuditorActor, findCurrentGuardedRemediationPosture, findRemediationModeRecoveryCandidate, findFailedGuardedStepRequiringCorrectiveDecision, readGuardedRemediationPostureForStep, readCorrectiveDecisionEvents, readRemediationEvents, prepareStopEscalateOverride, stopEscalateOverrideDecisionEventIds, } from './alpha6/remediation.js';
|
|
17
17
|
import { assessPlanIntegrityRecovery, defaultPlanIntegrityRecoveryActor, } from './alpha6/plan-integrity.js';
|
|
18
18
|
import { assertMechanicalFeasibilityFresh, evaluateMechanicalFeasibility, hashMechanicalFeasibilityEvidence, } from './alpha6/mechanical-feasibility.js';
|
|
19
19
|
import { assessMilestoneInitialAssembly, applyInitialMilestonePlanTransaction, applyMilestoneScopeChangeTransaction, assertMilestoneDependenciesDeclared, assertMilestoneTaskRunnable, assessMilestoneTaskDependencies, assertMilestoneMembershipIntegrity, assertMilestoneScopeChangeStatusAllowed, inspectMilestoneWithIntegrity, normalizeMilestonePlan, prepareMilestoneScopeChangeCandidate, prepareMilestoneScopeChangeBundle, readMilestoneForScopeChange, readMilestoneWithIntegrity, } from './alpha6/milestone.js';
|
|
@@ -110,6 +110,31 @@ export class WorkflowService {
|
|
|
110
110
|
repaired: true,
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
prepareTaskStopOverride(repository, taskId, stepId, expectedRevision, actor, reason) {
|
|
114
|
+
const snapshot = this.observationSnapshot(repository);
|
|
115
|
+
if (snapshot.observation.kind !== 'assessment') {
|
|
116
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Stop override requires a coherent observation boundary.', {
|
|
117
|
+
observation: snapshot.observation,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const task = snapshot.tasks.find((candidate) => candidate.id === taskId) ?? null;
|
|
121
|
+
if (!task)
|
|
122
|
+
throw new WorkflowError('NOT_FOUND', `Task ${taskId} was not found in this repository.`);
|
|
123
|
+
this.assertStopOverrideRepositoryBoundary(snapshot.identity, task);
|
|
124
|
+
return prepareStopEscalateOverride(this.store, task, stepId, expectedRevision, actor, reason, headCommit(snapshot.identity.repositoryRoot));
|
|
125
|
+
}
|
|
126
|
+
applyTaskStopOverride(repository, taskId, stepId, expectedRevision, actor, reason, confirmationCode) {
|
|
127
|
+
const snapshot = this.observationSnapshot(repository);
|
|
128
|
+
if (snapshot.observation.kind !== 'assessment') {
|
|
129
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Stop override requires a coherent observation boundary.', {
|
|
130
|
+
observation: snapshot.observation,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
const context = this.#mutationContext(repository);
|
|
134
|
+
const task = context.store.readTask(context.identity.projectId, taskId);
|
|
135
|
+
this.assertStopOverrideRepositoryBoundary(context.identity, task, context.locks.list());
|
|
136
|
+
return appendStopEscalateOverride(context.store, task, stepId, expectedRevision, actor, reason, headCommit(context.identity.repositoryRoot), confirmationCode, this.now());
|
|
137
|
+
}
|
|
113
138
|
prepareCorrectiveReplan(repository, taskId, candidate) {
|
|
114
139
|
return this.correctiveReplanController(repository).prepare({ taskId, candidate });
|
|
115
140
|
}
|
|
@@ -1038,7 +1063,9 @@ export class WorkflowService {
|
|
|
1038
1063
|
const passedBoundary = latestPassedVerifiedStepReviewEvent(this.store, task, event.stepId);
|
|
1039
1064
|
return !passedBoundary || passedBoundary.recordedAt <= event.recordedAt;
|
|
1040
1065
|
});
|
|
1041
|
-
const
|
|
1066
|
+
const overriddenStopDecisionEventIds = stopEscalateOverrideDecisionEventIds(this.store, task);
|
|
1067
|
+
const currentHardBlockingDecisions = currentPlanCorrectiveDecisions.filter((event) => event.decision === 'split-required'
|
|
1068
|
+
|| (event.decision === 'stop-escalate' && !overriddenStopDecisionEventIds.has(event.eventId)));
|
|
1042
1069
|
const currentPlanRiskAudit = task.status === 'needs_fix' || currentReplanDecisions.length > 0
|
|
1043
1070
|
? readCurrentPlanRiskAudit(this.store, task)
|
|
1044
1071
|
: null;
|
|
@@ -1758,8 +1785,11 @@ export class WorkflowService {
|
|
|
1758
1785
|
throw new WorkflowError('TRANSITION_BLOCKED', `Task ${taskId} cannot run a Step while ${task.status}.`);
|
|
1759
1786
|
}
|
|
1760
1787
|
this.assertExecutionAuthorizationFresh(task, context.identity.repositoryRoot);
|
|
1788
|
+
const overriddenStopDecisionEventIds = stopEscalateOverrideDecisionEventIds(this.store, task);
|
|
1761
1789
|
const currentPlanBlockingDecisions = readCorrectiveDecisionEvents(this.store, task)
|
|
1762
|
-
.filter((event) => event.planHash === task.planHash
|
|
1790
|
+
.filter((event) => event.planHash === task.planHash
|
|
1791
|
+
&& event.decision !== 'continue-fix'
|
|
1792
|
+
&& !(event.decision === 'stop-escalate' && overriddenStopDecisionEventIds.has(event.eventId)));
|
|
1763
1793
|
if (currentPlanBlockingDecisions.length > 0) {
|
|
1764
1794
|
throw new WorkflowError('TRANSITION_BLOCKED', `Task ${taskId} cannot run any Step while the current Plan has active blocking corrective decisions.`, {
|
|
1765
1795
|
taskId,
|
|
@@ -4039,16 +4069,50 @@ export class WorkflowService {
|
|
|
4039
4069
|
}
|
|
4040
4070
|
break;
|
|
4041
4071
|
case 'stop-escalate':
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4072
|
+
try {
|
|
4073
|
+
this.assertStopOverrideRepositoryBoundary(resolveRepositoryIdentity(repositoryRoot), task);
|
|
4074
|
+
prepareStopEscalateOverride(this.store, task, guardedCorrectivePosture.stepId, task.revision, 'user', 'navigation eligibility probe', headCommit(repositoryRoot));
|
|
4075
|
+
guardedCorrectiveOverlay = {
|
|
4076
|
+
action: 'task stop-override-prepare',
|
|
4077
|
+
blockedAction: 'task run',
|
|
4078
|
+
stepId: guardedCorrectivePosture.stepId,
|
|
4079
|
+
correctiveDecisionGate: {
|
|
4080
|
+
attemptCount: guardedCorrectivePosture.attemptCount,
|
|
4081
|
+
decision: guardedCorrectivePosture.correctiveDecision?.decision ?? null,
|
|
4082
|
+
decisionEventId: guardedCorrectivePosture.correctiveDecision?.eventId ?? null,
|
|
4083
|
+
humanApprovalRequired: true,
|
|
4084
|
+
delegatedApprovalAllowed: false,
|
|
4085
|
+
},
|
|
4086
|
+
stopOverride: {
|
|
4087
|
+
state: 'eligible',
|
|
4088
|
+
policy: 'beta11-attempt4-stop-compatibility-v1',
|
|
4089
|
+
prepareCommand: 'task stop-override-prepare',
|
|
4090
|
+
applyCommand: 'task stop-override-apply',
|
|
4091
|
+
expectedRevision: task.revision,
|
|
4092
|
+
appendOnly: true,
|
|
4093
|
+
preservesOriginalDecision: true,
|
|
4094
|
+
requiredAction: 'Prepare with an explicit human actor and reason, then apply the exact confirmation code in a later user turn.',
|
|
4095
|
+
},
|
|
4096
|
+
};
|
|
4097
|
+
}
|
|
4098
|
+
catch (error) {
|
|
4099
|
+
guardedCorrectiveOverlay = {
|
|
4100
|
+
action: 'doctor',
|
|
4101
|
+
blockedAction: 'task stop-override-prepare',
|
|
4102
|
+
stepId: guardedCorrectivePosture.stepId,
|
|
4103
|
+
correctiveDecisionGate: {
|
|
4104
|
+
attemptCount: guardedCorrectivePosture.attemptCount,
|
|
4105
|
+
decision: guardedCorrectivePosture.correctiveDecision?.decision ?? null,
|
|
4106
|
+
decisionEventId: guardedCorrectivePosture.correctiveDecision?.eventId ?? null,
|
|
4107
|
+
humanApprovalRequired: true,
|
|
4108
|
+
},
|
|
4109
|
+
stopOverride: {
|
|
4110
|
+
state: 'blocked',
|
|
4111
|
+
policy: 'beta11-attempt4-stop-compatibility-v1',
|
|
4112
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
4113
|
+
},
|
|
4114
|
+
};
|
|
4115
|
+
}
|
|
4052
4116
|
break;
|
|
4053
4117
|
default:
|
|
4054
4118
|
break;
|
|
@@ -4184,6 +4248,42 @@ export class WorkflowService {
|
|
|
4184
4248
|
? posture
|
|
4185
4249
|
: null;
|
|
4186
4250
|
}
|
|
4251
|
+
assertStopOverrideRepositoryBoundary(identity, task, observedLeases) {
|
|
4252
|
+
const blockers = [];
|
|
4253
|
+
const dirty = changedFiles(identity.repositoryRoot);
|
|
4254
|
+
if (dirty.length > 0)
|
|
4255
|
+
blockers.push('Repository checkout must be clean.');
|
|
4256
|
+
if (task.workspaceOwner !== 'local')
|
|
4257
|
+
blockers.push('Stop override is limited to a local Task workspace.');
|
|
4258
|
+
if (!task.taskBranch || currentBranch(identity.repositoryRoot) !== task.taskBranch) {
|
|
4259
|
+
blockers.push('The current branch must be the recorded Task branch.');
|
|
4260
|
+
}
|
|
4261
|
+
if (task.steps.some((step) => step.status === 'in_progress'))
|
|
4262
|
+
blockers.push('No Step may be in progress.');
|
|
4263
|
+
const leases = observedLeases
|
|
4264
|
+
?? new WriterLockManager(this.store.lockRoot(identity.projectId), this.now, this.store.root).list();
|
|
4265
|
+
if (leases.some((lease) => lease.entityId === task.id))
|
|
4266
|
+
blockers.push('No active or stale Task writer lease may exist.');
|
|
4267
|
+
const projectRoot = this.store.projectRoot(identity.projectId);
|
|
4268
|
+
const replanTransactions = inspectCorrectiveReplanTaskTransactions(projectRoot, this.store.root);
|
|
4269
|
+
const yieldTransactions = inspectCorrectiveYieldTaskTransactions(projectRoot, this.store.root);
|
|
4270
|
+
if (replanTransactions.pending.some((transaction) => transaction.taskId === task.id)
|
|
4271
|
+
|| replanTransactions.corrupt.some((transaction) => transaction.taskId === task.id)
|
|
4272
|
+
|| yieldTransactions.pending.some((transaction) => transaction.taskId === task.id)
|
|
4273
|
+
|| yieldTransactions.corrupt.some((transaction) => transaction.taskId === task.id)) {
|
|
4274
|
+
blockers.push('No pending or corrupt Task transaction may exist.');
|
|
4275
|
+
}
|
|
4276
|
+
if (listCoreTaskOperationMutexes(this.store.lockRoot(identity.projectId), this.store.root)
|
|
4277
|
+
.some((operation) => operation.entityId === task.id)) {
|
|
4278
|
+
blockers.push('No Core Task operation may exist.');
|
|
4279
|
+
}
|
|
4280
|
+
if (blockers.length > 0) {
|
|
4281
|
+
throw new WorkflowError('TRANSITION_BLOCKED', 'Stop override repository preconditions are not satisfied.', {
|
|
4282
|
+
taskId: task.id,
|
|
4283
|
+
blockers,
|
|
4284
|
+
});
|
|
4285
|
+
}
|
|
4286
|
+
}
|
|
4187
4287
|
delegatedApprovalOptions(projectId, transition, target) {
|
|
4188
4288
|
return this.store.listDelegations(projectId)
|
|
4189
4289
|
.filter((grant) => {
|