codex-workflow-v2 2.0.0-alpha.6.1 → 2.0.0-alpha.6.2
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 +29 -1
- package/dist/src/alpha6/remediation.d.ts +20 -0
- package/dist/src/alpha6/remediation.js +139 -4
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/cli.js +7 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +5 -0
- package/dist/src/state/lock.d.ts +3 -1
- package/dist/src/state/lock.js +5 -2
- package/dist/src/state/lock.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflow.d.ts +39 -3
- package/dist/src/workflow.js +490 -62
- package/dist/src/workflow.js.map +1 -1
- package/docs/release.md +4 -0
- package/docs/updating-existing-project.md +18 -0
- package/docs/validation-report.md +19 -10
- package/package.json +2 -2
- package/schemas/context-envelope.schema.json +10 -0
- package/schemas/corrective-plan-audit-record.schema.json +47 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../src/state/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAExC,MAAM,O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AAC;YACzD,MAAM,IAAI,aAAa,CAAC,kBAAkB,EAAE,wBAAwB,QAAQ,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;IACvD,CAAC;CACF"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "codex-workflow-v2";
|
|
2
|
-
export declare const PACKAGE_VERSION = "2.0.0-alpha.6.
|
|
2
|
+
export declare const PACKAGE_VERSION = "2.0.0-alpha.6.2";
|
package/dist/src/version.js
CHANGED
package/dist/src/workflow.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AdoptionPostureEvent, type ContextEnvelope, type CorrectivePlanAuditInput, type DelegationGrant, type DelegationGrantGate, type DelegationPolicyInput, type DiscoveryState, type MilestonePlanInput, type MilestoneState, type KnowledgeSelection, type GraphBinding, type GraphKind, type GraphMode, type GraphRefreshEvidence, type GraphRefreshRequest, type PlanRiskAuditEvent, type ProjectKnowledgeMap, type ReviewInput, type TaskPlanInput, type TaskContextRefreshResult, type TaskState, type UpdatePreflightResult, type WriterLease, type WorkflowRole, type WorkspaceOwner } from './contracts.js';
|
|
1
|
+
import { type AdoptionPostureEvent, type ContextEnvelope, type CorrectiveDecisionEvent, type CorrectivePlanAuditInput, type DelegationGrant, type DelegationGrantGate, type DelegationPolicyInput, type DiscoveryState, type MilestonePlanInput, type MilestoneState, type KnowledgeSelection, type GraphBinding, type GraphKind, type GraphMode, type GraphRefreshEvidence, type GraphRefreshRequest, type PlanRiskAuditEvent, type ProjectKnowledgeMap, type ReviewInput, type TaskPlanInput, type TaskContextRefreshResult, type TaskState, type UpdatePreflightResult, type WriterLease, 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';
|
|
@@ -85,10 +85,38 @@ export interface Alpha6C1StrictReviewRescuePreflight {
|
|
|
85
85
|
requiresBoundWriterToken: true;
|
|
86
86
|
} | null;
|
|
87
87
|
}
|
|
88
|
+
export interface Alpha6CorrectiveRescuePreflight {
|
|
89
|
+
eligible: boolean;
|
|
90
|
+
mutationFree: true;
|
|
91
|
+
runnerPackageVersion: string;
|
|
92
|
+
requiredProjectPackageVersion: '2.0.0-alpha.6';
|
|
93
|
+
declaredProjectPackageVersion: string | null;
|
|
94
|
+
requiredHead: string;
|
|
95
|
+
currentHead: string;
|
|
96
|
+
clean: boolean;
|
|
97
|
+
candidate: {
|
|
98
|
+
taskId: string;
|
|
99
|
+
taskRevision: 14;
|
|
100
|
+
taskStatus: 'ready';
|
|
101
|
+
stepId: 'STEP-001';
|
|
102
|
+
stepStatus: 'failed';
|
|
103
|
+
attemptCount: 2;
|
|
104
|
+
briefHash: string;
|
|
105
|
+
planHash: string;
|
|
106
|
+
claimant: string;
|
|
107
|
+
lease: Omit<WriterLease, 'token'> & {
|
|
108
|
+
stale: boolean;
|
|
109
|
+
tokenBound: true;
|
|
110
|
+
};
|
|
111
|
+
milestoneScopeHash: string | null;
|
|
112
|
+
} | null;
|
|
113
|
+
blockers: string[];
|
|
114
|
+
}
|
|
88
115
|
export declare class WorkflowService {
|
|
89
116
|
readonly store: FileStateStore;
|
|
90
117
|
private readonly now;
|
|
91
|
-
|
|
118
|
+
private readonly alpha6CorrectiveRescueHead;
|
|
119
|
+
constructor(store?: FileStateStore, now?: () => Date, alpha6CorrectiveRescueHead?: string);
|
|
92
120
|
context(repository: string): WorkflowContext;
|
|
93
121
|
prepareDelegation(repository: string, input: DelegationPolicyInput): DelegationGrantGate;
|
|
94
122
|
grantDelegation(repository: string, input: DelegationPolicyInput, confirmationCode: string): DelegationGrant;
|
|
@@ -150,7 +178,7 @@ export declare class WorkflowService {
|
|
|
150
178
|
private reviewStepWithKnowledgePolicy;
|
|
151
179
|
submitTask(repository: string, taskId: string, expectedRevision: number, writerToken: string, actor?: string): TaskState;
|
|
152
180
|
recordReview(repository: string, taskId: string, expectedRevision: number, review: ReviewInput, actor?: string, writerToken?: string | null): TaskState;
|
|
153
|
-
recordStepCorrectiveDecision(repository: string, taskId: string, stepId: string, expectedRevision: number, correctiveAudit: CorrectivePlanAuditInput, actor?: string, writerToken?: string | null):
|
|
181
|
+
recordStepCorrectiveDecision(repository: string, taskId: string, stepId: string, expectedRevision: number, correctiveAudit: CorrectivePlanAuditInput, actor?: string, writerToken?: string | null): CorrectiveDecisionEvent;
|
|
154
182
|
setTaskResult(repository: string, taskId: string, expectedRevision: number, summary: string, limitations: string[]): TaskState;
|
|
155
183
|
acceptTask(repository: string, taskId: string, expectedRevision: number, actor: string, delegationGrantId?: string | null): TaskState;
|
|
156
184
|
syncTaskBase(repository: string, taskId: string, expectedRevision: number): TaskState;
|
|
@@ -173,6 +201,14 @@ export declare class WorkflowService {
|
|
|
173
201
|
updatePreflight(repository: string): UpdatePreflightResult & {
|
|
174
202
|
adoption: AdoptionPreparation;
|
|
175
203
|
};
|
|
204
|
+
alpha6CorrectiveRescuePreflight(repository: string): Alpha6CorrectiveRescuePreflight;
|
|
205
|
+
alpha6CorrectiveRescueApply(repository: string, taskId: string, expectedRevision: number, actor: string, writerToken: string, plan: TaskPlanInput, decisionAudit: CorrectivePlanAuditInput, correctivePlanAudit: CorrectivePlanAuditInput): {
|
|
206
|
+
task: TaskState;
|
|
207
|
+
decision: CorrectiveDecisionEvent;
|
|
208
|
+
lease: Omit<WriterLease, 'token'> & {
|
|
209
|
+
tokenRetained: true;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
176
212
|
scanKnowledgeMap(repository: string): ProjectKnowledgeMap;
|
|
177
213
|
showKnowledgeMap(repository: string): ProjectKnowledgeMap;
|
|
178
214
|
knowledgeMapStatus(repository: string): ProjectKnowledgeMap;
|