@renseiai/agentfactory 0.8.13 → 0.8.15

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.
Files changed (49) hide show
  1. package/dist/src/orchestrator/completion-contracts.d.ts +89 -0
  2. package/dist/src/orchestrator/completion-contracts.d.ts.map +1 -0
  3. package/dist/src/orchestrator/completion-contracts.js +228 -0
  4. package/dist/src/orchestrator/completion-contracts.test.d.ts +2 -0
  5. package/dist/src/orchestrator/completion-contracts.test.d.ts.map +1 -0
  6. package/dist/src/orchestrator/completion-contracts.test.js +195 -0
  7. package/dist/src/orchestrator/index.d.ts +4 -0
  8. package/dist/src/orchestrator/index.d.ts.map +1 -1
  9. package/dist/src/orchestrator/index.js +3 -0
  10. package/dist/src/orchestrator/orchestrator.d.ts +32 -0
  11. package/dist/src/orchestrator/orchestrator.d.ts.map +1 -1
  12. package/dist/src/orchestrator/orchestrator.js +178 -26
  13. package/dist/src/orchestrator/session-backstop.d.ts +67 -0
  14. package/dist/src/orchestrator/session-backstop.d.ts.map +1 -0
  15. package/dist/src/orchestrator/session-backstop.js +394 -0
  16. package/dist/src/orchestrator/session-backstop.test.d.ts +2 -0
  17. package/dist/src/orchestrator/session-backstop.test.d.ts.map +1 -0
  18. package/dist/src/orchestrator/session-backstop.test.js +245 -0
  19. package/dist/src/orchestrator/worktree-checks.test.d.ts +2 -0
  20. package/dist/src/orchestrator/worktree-checks.test.d.ts.map +1 -0
  21. package/dist/src/orchestrator/worktree-checks.test.js +159 -0
  22. package/dist/src/providers/a2a-provider.d.ts +4 -0
  23. package/dist/src/providers/a2a-provider.d.ts.map +1 -1
  24. package/dist/src/providers/a2a-provider.js +4 -0
  25. package/dist/src/providers/amp-provider.d.ts +4 -0
  26. package/dist/src/providers/amp-provider.d.ts.map +1 -1
  27. package/dist/src/providers/amp-provider.js +4 -0
  28. package/dist/src/providers/claude-provider.d.ts +4 -0
  29. package/dist/src/providers/claude-provider.d.ts.map +1 -1
  30. package/dist/src/providers/claude-provider.js +6 -0
  31. package/dist/src/providers/codex-provider.d.ts +4 -0
  32. package/dist/src/providers/codex-provider.d.ts.map +1 -1
  33. package/dist/src/providers/codex-provider.js +4 -0
  34. package/dist/src/providers/index.d.ts +1 -1
  35. package/dist/src/providers/index.d.ts.map +1 -1
  36. package/dist/src/providers/spring-ai-provider.d.ts +4 -0
  37. package/dist/src/providers/spring-ai-provider.d.ts.map +1 -1
  38. package/dist/src/providers/spring-ai-provider.js +4 -0
  39. package/dist/src/providers/types.d.ts +22 -0
  40. package/dist/src/providers/types.d.ts.map +1 -1
  41. package/dist/src/templates/types.d.ts +3 -0
  42. package/dist/src/templates/types.d.ts.map +1 -1
  43. package/dist/src/templates/types.js +2 -0
  44. package/dist/src/tools/index.d.ts +1 -0
  45. package/dist/src/tools/index.d.ts.map +1 -1
  46. package/dist/src/tools/registry.d.ts +6 -1
  47. package/dist/src/tools/registry.d.ts.map +1 -1
  48. package/dist/src/tools/registry.js +5 -1
  49. package/package.json +2 -2
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Completion Contracts
3
+ *
4
+ * Typed definitions of what each work type must produce before a session
5
+ * is considered successful. The orchestrator validates these after the
6
+ * agent session ends and runs deterministic backstop actions for any
7
+ * missing fields that can be recovered programmatically.
8
+ *
9
+ * Design principles:
10
+ * - Contracts are provider-agnostic (same expectations regardless of LLM)
11
+ * - Fields marked `backstopCapable` can be filled by deterministic code
12
+ * - Fields not backstop-capable require agent judgment (flagged for follow-up)
13
+ * - Contracts drive both validation AND recovery
14
+ */
15
+ import type { AgentWorkType } from './work-types.js';
16
+ /** A field the agent session should produce */
17
+ export type CompletionFieldType = 'pr_url' | 'branch_pushed' | 'commits_present' | 'work_result' | 'issue_updated' | 'comment_posted' | 'sub_issues_created' | 'pr_merged';
18
+ /** A single required or optional field in a completion contract */
19
+ export interface CompletionField {
20
+ type: CompletionFieldType;
21
+ /** Human-readable description for diagnostic messages */
22
+ label: string;
23
+ /**
24
+ * Whether the orchestrator can fill this field deterministically
25
+ * after the session ends (e.g., push a branch, create a PR).
26
+ * Fields that require agent judgment (work_result) are NOT backstop-capable.
27
+ */
28
+ backstopCapable: boolean;
29
+ }
30
+ export interface CompletionContract {
31
+ workType: AgentWorkType;
32
+ /** Fields that MUST be present for the session to be considered complete */
33
+ required: CompletionField[];
34
+ /** Fields that SHOULD be present but won't block completion */
35
+ optional: CompletionField[];
36
+ }
37
+ export interface CompletionValidationResult {
38
+ /** Whether all required fields are satisfied */
39
+ satisfied: boolean;
40
+ /** Required fields that are present */
41
+ presentFields: CompletionFieldType[];
42
+ /** Required fields that are missing */
43
+ missingFields: CompletionFieldType[];
44
+ /** Missing fields that the backstop can fill deterministically */
45
+ backstopRecoverable: CompletionFieldType[];
46
+ /** Missing fields that require agent judgment or manual intervention */
47
+ manualRequired: CompletionFieldType[];
48
+ }
49
+ /** Structured data extracted from the agent session */
50
+ export interface SessionOutputs {
51
+ prUrl?: string;
52
+ branchPushed?: boolean;
53
+ commitsPresent?: boolean;
54
+ workResult?: 'passed' | 'failed' | 'unknown';
55
+ issueUpdated?: boolean;
56
+ commentPosted?: boolean;
57
+ subIssuesCreated?: boolean;
58
+ prMerged?: boolean;
59
+ }
60
+ /** Record of a deterministic action taken by the backstop */
61
+ export interface BackstopAction {
62
+ field: CompletionFieldType;
63
+ action: string;
64
+ success: boolean;
65
+ detail?: string;
66
+ }
67
+ /** Result of running the backstop */
68
+ export interface BackstopResult {
69
+ /** Actions the backstop attempted */
70
+ actions: BackstopAction[];
71
+ /** Whether all required fields are now satisfied */
72
+ fullyRecovered: boolean;
73
+ /** Fields that still need manual intervention */
74
+ remainingGaps: CompletionFieldType[];
75
+ }
76
+ /**
77
+ * Get the completion contract for a work type.
78
+ * Returns undefined for unknown work types (caller should treat as no contract).
79
+ */
80
+ export declare function getCompletionContract(workType: AgentWorkType): CompletionContract | undefined;
81
+ /**
82
+ * Validate session outputs against a completion contract.
83
+ */
84
+ export declare function validateCompletion(contract: CompletionContract, outputs: SessionOutputs): CompletionValidationResult;
85
+ /**
86
+ * Format missing fields into a human-readable diagnostic message.
87
+ */
88
+ export declare function formatMissingFields(contract: CompletionContract, validation: CompletionValidationResult): string;
89
+ //# sourceMappingURL=completion-contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-contracts.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/completion-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAMpD,+CAA+C;AAC/C,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,eAAe,GACf,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,oBAAoB,GACpB,WAAW,CAAA;AAEf,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAA;IACzB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAA;CACzB;AAMD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,aAAa,CAAA;IACvB,4EAA4E;IAC5E,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B,+DAA+D;IAC/D,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAMD,MAAM,WAAW,0BAA0B;IACzC,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAA;IAClB,uCAAuC;IACvC,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,uCAAuC;IACvC,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,kEAAkE;IAClE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;IAC1C,wEAAwE;IACxE,cAAc,EAAE,mBAAmB,EAAE,CAAA;CACtC;AAMD,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAMD,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qCAAqC;AACrC,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,oDAAoD;IACpD,cAAc,EAAE,OAAO,CAAA;IACvB,iDAAiD;IACjD,aAAa,EAAE,mBAAmB,EAAE,CAAA;CACrC;AAwID;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,kBAAkB,GAAG,SAAS,CAE7F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,cAAc,GACtB,0BAA0B,CA0B5B;AA4BD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,kBAAkB,EAC5B,UAAU,EAAE,0BAA0B,GACrC,MAAM,CA6BR"}
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Completion Contracts
3
+ *
4
+ * Typed definitions of what each work type must produce before a session
5
+ * is considered successful. The orchestrator validates these after the
6
+ * agent session ends and runs deterministic backstop actions for any
7
+ * missing fields that can be recovered programmatically.
8
+ *
9
+ * Design principles:
10
+ * - Contracts are provider-agnostic (same expectations regardless of LLM)
11
+ * - Fields marked `backstopCapable` can be filled by deterministic code
12
+ * - Fields not backstop-capable require agent judgment (flagged for follow-up)
13
+ * - Contracts drive both validation AND recovery
14
+ */
15
+ // ---------------------------------------------------------------------------
16
+ // Shared field definitions (DRY)
17
+ // ---------------------------------------------------------------------------
18
+ const FIELD = {
19
+ prUrl: {
20
+ type: 'pr_url',
21
+ label: 'Pull request URL',
22
+ backstopCapable: true,
23
+ },
24
+ branchPushed: {
25
+ type: 'branch_pushed',
26
+ label: 'Branch pushed to remote',
27
+ backstopCapable: true,
28
+ },
29
+ commitsPresent: {
30
+ type: 'commits_present',
31
+ label: 'Commits on branch',
32
+ backstopCapable: false,
33
+ },
34
+ workResult: {
35
+ type: 'work_result',
36
+ label: 'Structured work result (passed/failed)',
37
+ backstopCapable: false,
38
+ },
39
+ issueUpdated: {
40
+ type: 'issue_updated',
41
+ label: 'Issue description updated',
42
+ backstopCapable: false,
43
+ },
44
+ commentPosted: {
45
+ type: 'comment_posted',
46
+ label: 'Comment posted to issue',
47
+ backstopCapable: false,
48
+ },
49
+ subIssuesCreated: {
50
+ type: 'sub_issues_created',
51
+ label: 'Sub-issues created',
52
+ backstopCapable: false,
53
+ },
54
+ prMerged: {
55
+ type: 'pr_merged',
56
+ label: 'Pull request merged',
57
+ backstopCapable: false,
58
+ },
59
+ };
60
+ // ---------------------------------------------------------------------------
61
+ // Per-work-type contract definitions
62
+ // ---------------------------------------------------------------------------
63
+ const CONTRACTS = {
64
+ // --- Code-producing work types ---
65
+ development: {
66
+ workType: 'development',
67
+ required: [FIELD.commitsPresent, FIELD.branchPushed, FIELD.prUrl],
68
+ optional: [],
69
+ },
70
+ inflight: {
71
+ workType: 'inflight',
72
+ required: [FIELD.commitsPresent, FIELD.branchPushed, FIELD.prUrl],
73
+ optional: [],
74
+ },
75
+ // --- Result-sensitive work types ---
76
+ qa: {
77
+ workType: 'qa',
78
+ required: [FIELD.workResult, FIELD.commentPosted],
79
+ optional: [],
80
+ },
81
+ 'qa-coordination': {
82
+ workType: 'qa-coordination',
83
+ required: [FIELD.workResult, FIELD.commentPosted],
84
+ optional: [],
85
+ },
86
+ acceptance: {
87
+ workType: 'acceptance',
88
+ required: [FIELD.workResult],
89
+ optional: [FIELD.prMerged],
90
+ },
91
+ 'acceptance-coordination': {
92
+ workType: 'acceptance-coordination',
93
+ required: [FIELD.workResult],
94
+ optional: [FIELD.prMerged],
95
+ },
96
+ // --- Coordination work types ---
97
+ coordination: {
98
+ workType: 'coordination',
99
+ required: [FIELD.commitsPresent, FIELD.branchPushed, FIELD.prUrl, FIELD.workResult],
100
+ optional: [],
101
+ },
102
+ 'inflight-coordination': {
103
+ workType: 'inflight-coordination',
104
+ required: [FIELD.commitsPresent, FIELD.branchPushed, FIELD.prUrl, FIELD.workResult],
105
+ optional: [],
106
+ },
107
+ // --- Triage/analysis work types ---
108
+ refinement: {
109
+ workType: 'refinement',
110
+ required: [FIELD.commentPosted],
111
+ optional: [FIELD.issueUpdated],
112
+ },
113
+ 'refinement-coordination': {
114
+ workType: 'refinement-coordination',
115
+ required: [FIELD.commentPosted],
116
+ optional: [],
117
+ },
118
+ research: {
119
+ workType: 'research',
120
+ required: [FIELD.issueUpdated],
121
+ optional: [FIELD.commentPosted],
122
+ },
123
+ // --- Issue creation work types ---
124
+ 'backlog-creation': {
125
+ workType: 'backlog-creation',
126
+ required: [FIELD.subIssuesCreated],
127
+ optional: [FIELD.commentPosted],
128
+ },
129
+ // --- Merge work types ---
130
+ merge: {
131
+ workType: 'merge',
132
+ required: [FIELD.prMerged],
133
+ optional: [],
134
+ },
135
+ };
136
+ // ---------------------------------------------------------------------------
137
+ // Public API
138
+ // ---------------------------------------------------------------------------
139
+ /**
140
+ * Get the completion contract for a work type.
141
+ * Returns undefined for unknown work types (caller should treat as no contract).
142
+ */
143
+ export function getCompletionContract(workType) {
144
+ return CONTRACTS[workType];
145
+ }
146
+ /**
147
+ * Validate session outputs against a completion contract.
148
+ */
149
+ export function validateCompletion(contract, outputs) {
150
+ const presentFields = [];
151
+ const missingFields = [];
152
+ const backstopRecoverable = [];
153
+ const manualRequired = [];
154
+ for (const field of contract.required) {
155
+ if (isFieldPresent(field.type, outputs)) {
156
+ presentFields.push(field.type);
157
+ }
158
+ else {
159
+ missingFields.push(field.type);
160
+ if (field.backstopCapable) {
161
+ backstopRecoverable.push(field.type);
162
+ }
163
+ else {
164
+ manualRequired.push(field.type);
165
+ }
166
+ }
167
+ }
168
+ return {
169
+ satisfied: missingFields.length === 0,
170
+ presentFields,
171
+ missingFields,
172
+ backstopRecoverable,
173
+ manualRequired,
174
+ };
175
+ }
176
+ /**
177
+ * Check whether a specific field is present in the session outputs.
178
+ */
179
+ function isFieldPresent(fieldType, outputs) {
180
+ switch (fieldType) {
181
+ case 'pr_url':
182
+ return !!outputs.prUrl;
183
+ case 'branch_pushed':
184
+ return !!outputs.branchPushed;
185
+ case 'commits_present':
186
+ return !!outputs.commitsPresent;
187
+ case 'work_result':
188
+ return outputs.workResult === 'passed' || outputs.workResult === 'failed';
189
+ case 'issue_updated':
190
+ return !!outputs.issueUpdated;
191
+ case 'comment_posted':
192
+ return !!outputs.commentPosted;
193
+ case 'sub_issues_created':
194
+ return !!outputs.subIssuesCreated;
195
+ case 'pr_merged':
196
+ return !!outputs.prMerged;
197
+ default:
198
+ return false;
199
+ }
200
+ }
201
+ /**
202
+ * Format missing fields into a human-readable diagnostic message.
203
+ */
204
+ export function formatMissingFields(contract, validation) {
205
+ const lines = [
206
+ `Session completion check for ${contract.workType}:`,
207
+ ];
208
+ if (validation.satisfied) {
209
+ lines.push('All required outputs are present.');
210
+ return lines.join('\n');
211
+ }
212
+ lines.push('');
213
+ lines.push('Missing required outputs:');
214
+ for (const fieldType of validation.missingFields) {
215
+ const field = contract.required.find(f => f.type === fieldType);
216
+ const recoverable = validation.backstopRecoverable.includes(fieldType);
217
+ lines.push(` - ${field?.label ?? fieldType}${recoverable ? ' (auto-recoverable)' : ' (requires manual action)'}`);
218
+ }
219
+ if (validation.backstopRecoverable.length > 0) {
220
+ lines.push('');
221
+ lines.push(`The orchestrator will attempt to recover ${validation.backstopRecoverable.length} field(s) automatically.`);
222
+ }
223
+ if (validation.manualRequired.length > 0) {
224
+ lines.push('');
225
+ lines.push(`${validation.manualRequired.length} field(s) require manual intervention or re-triggering the agent.`);
226
+ }
227
+ return lines.join('\n');
228
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=completion-contracts.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-contracts.test.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/completion-contracts.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,195 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { getCompletionContract, validateCompletion, formatMissingFields, } from './completion-contracts.js';
3
+ describe('getCompletionContract', () => {
4
+ it('returns a contract for development work type', () => {
5
+ const contract = getCompletionContract('development');
6
+ expect(contract).toBeDefined();
7
+ expect(contract.workType).toBe('development');
8
+ expect(contract.required.map(f => f.type)).toContain('pr_url');
9
+ expect(contract.required.map(f => f.type)).toContain('branch_pushed');
10
+ expect(contract.required.map(f => f.type)).toContain('commits_present');
11
+ });
12
+ it('returns a contract for qa work type', () => {
13
+ const contract = getCompletionContract('qa');
14
+ expect(contract).toBeDefined();
15
+ expect(contract.required.map(f => f.type)).toContain('work_result');
16
+ expect(contract.required.map(f => f.type)).toContain('comment_posted');
17
+ });
18
+ it('returns a contract for acceptance work type', () => {
19
+ const contract = getCompletionContract('acceptance');
20
+ expect(contract).toBeDefined();
21
+ expect(contract.required.map(f => f.type)).toContain('work_result');
22
+ });
23
+ it('returns a contract for refinement work type', () => {
24
+ const contract = getCompletionContract('refinement');
25
+ expect(contract).toBeDefined();
26
+ expect(contract.required.map(f => f.type)).toContain('comment_posted');
27
+ });
28
+ it('returns a contract for research work type', () => {
29
+ const contract = getCompletionContract('research');
30
+ expect(contract).toBeDefined();
31
+ expect(contract.required.map(f => f.type)).toContain('issue_updated');
32
+ });
33
+ it('returns a contract for backlog-creation work type', () => {
34
+ const contract = getCompletionContract('backlog-creation');
35
+ expect(contract).toBeDefined();
36
+ expect(contract.required.map(f => f.type)).toContain('sub_issues_created');
37
+ });
38
+ it('returns a contract for coordination work type', () => {
39
+ const contract = getCompletionContract('coordination');
40
+ expect(contract).toBeDefined();
41
+ const required = contract.required.map(f => f.type);
42
+ expect(required).toContain('pr_url');
43
+ expect(required).toContain('work_result');
44
+ });
45
+ it('returns a contract for merge work type', () => {
46
+ const contract = getCompletionContract('merge');
47
+ expect(contract).toBeDefined();
48
+ expect(contract.required.map(f => f.type)).toContain('pr_merged');
49
+ });
50
+ it('returns contracts for all coordination variants', () => {
51
+ expect(getCompletionContract('qa-coordination')).toBeDefined();
52
+ expect(getCompletionContract('acceptance-coordination')).toBeDefined();
53
+ expect(getCompletionContract('inflight-coordination')).toBeDefined();
54
+ expect(getCompletionContract('refinement-coordination')).toBeDefined();
55
+ });
56
+ });
57
+ describe('validateCompletion', () => {
58
+ it('marks satisfied when all required fields present (development)', () => {
59
+ const contract = getCompletionContract('development');
60
+ const outputs = {
61
+ prUrl: 'https://github.com/org/repo/pull/1',
62
+ branchPushed: true,
63
+ commitsPresent: true,
64
+ };
65
+ const result = validateCompletion(contract, outputs);
66
+ expect(result.satisfied).toBe(true);
67
+ expect(result.missingFields).toHaveLength(0);
68
+ });
69
+ it('detects missing PR URL (development)', () => {
70
+ const contract = getCompletionContract('development');
71
+ const outputs = {
72
+ branchPushed: true,
73
+ commitsPresent: true,
74
+ };
75
+ const result = validateCompletion(contract, outputs);
76
+ expect(result.satisfied).toBe(false);
77
+ expect(result.missingFields).toContain('pr_url');
78
+ expect(result.backstopRecoverable).toContain('pr_url');
79
+ });
80
+ it('detects missing branch push (development)', () => {
81
+ const contract = getCompletionContract('development');
82
+ const outputs = {
83
+ prUrl: 'https://github.com/org/repo/pull/1',
84
+ branchPushed: false,
85
+ commitsPresent: true,
86
+ };
87
+ const result = validateCompletion(contract, outputs);
88
+ expect(result.satisfied).toBe(false);
89
+ expect(result.missingFields).toContain('branch_pushed');
90
+ expect(result.backstopRecoverable).toContain('branch_pushed');
91
+ });
92
+ it('marks commits_present as not backstop-capable', () => {
93
+ const contract = getCompletionContract('development');
94
+ const outputs = {
95
+ prUrl: 'https://github.com/org/repo/pull/1',
96
+ branchPushed: true,
97
+ commitsPresent: false,
98
+ };
99
+ const result = validateCompletion(contract, outputs);
100
+ expect(result.satisfied).toBe(false);
101
+ expect(result.manualRequired).toContain('commits_present');
102
+ expect(result.backstopRecoverable).not.toContain('commits_present');
103
+ });
104
+ it('marks satisfied for QA with work result passed', () => {
105
+ const contract = getCompletionContract('qa');
106
+ const outputs = {
107
+ workResult: 'passed',
108
+ commentPosted: true,
109
+ };
110
+ const result = validateCompletion(contract, outputs);
111
+ expect(result.satisfied).toBe(true);
112
+ });
113
+ it('marks satisfied for QA with work result failed', () => {
114
+ const contract = getCompletionContract('qa');
115
+ const outputs = {
116
+ workResult: 'failed',
117
+ commentPosted: true,
118
+ };
119
+ const result = validateCompletion(contract, outputs);
120
+ expect(result.satisfied).toBe(true);
121
+ });
122
+ it('marks unsatisfied for QA with unknown work result', () => {
123
+ const contract = getCompletionContract('qa');
124
+ const outputs = {
125
+ workResult: 'unknown',
126
+ commentPosted: true,
127
+ };
128
+ const result = validateCompletion(contract, outputs);
129
+ expect(result.satisfied).toBe(false);
130
+ expect(result.missingFields).toContain('work_result');
131
+ expect(result.manualRequired).toContain('work_result');
132
+ });
133
+ it('marks unsatisfied for QA without comment', () => {
134
+ const contract = getCompletionContract('qa');
135
+ const outputs = {
136
+ workResult: 'passed',
137
+ commentPosted: false,
138
+ };
139
+ const result = validateCompletion(contract, outputs);
140
+ expect(result.satisfied).toBe(false);
141
+ expect(result.missingFields).toContain('comment_posted');
142
+ });
143
+ it('marks satisfied for refinement with comment posted', () => {
144
+ const contract = getCompletionContract('refinement');
145
+ const outputs = {
146
+ commentPosted: true,
147
+ };
148
+ const result = validateCompletion(contract, outputs);
149
+ expect(result.satisfied).toBe(true);
150
+ });
151
+ it('marks satisfied for backlog-creation with sub-issues', () => {
152
+ const contract = getCompletionContract('backlog-creation');
153
+ const outputs = {
154
+ subIssuesCreated: true,
155
+ };
156
+ const result = validateCompletion(contract, outputs);
157
+ expect(result.satisfied).toBe(true);
158
+ });
159
+ it('handles empty outputs gracefully', () => {
160
+ const contract = getCompletionContract('development');
161
+ const outputs = {};
162
+ const result = validateCompletion(contract, outputs);
163
+ expect(result.satisfied).toBe(false);
164
+ expect(result.missingFields).toHaveLength(3);
165
+ });
166
+ });
167
+ describe('formatMissingFields', () => {
168
+ it('formats satisfied contract', () => {
169
+ const contract = getCompletionContract('development');
170
+ const validation = validateCompletion(contract, {
171
+ prUrl: 'https://github.com/org/repo/pull/1',
172
+ branchPushed: true,
173
+ commitsPresent: true,
174
+ });
175
+ const message = formatMissingFields(contract, validation);
176
+ expect(message).toContain('All required outputs are present');
177
+ });
178
+ it('formats missing fields with recovery info', () => {
179
+ const contract = getCompletionContract('development');
180
+ const validation = validateCompletion(contract, {
181
+ commitsPresent: true,
182
+ });
183
+ const message = formatMissingFields(contract, validation);
184
+ expect(message).toContain('Missing required outputs');
185
+ expect(message).toContain('auto-recoverable');
186
+ expect(message).toContain('Pull request URL');
187
+ expect(message).toContain('Branch pushed to remote');
188
+ });
189
+ it('formats manual-required fields', () => {
190
+ const contract = getCompletionContract('qa');
191
+ const validation = validateCompletion(contract, {});
192
+ const message = formatMissingFields(contract, validation);
193
+ expect(message).toContain('requires manual action');
194
+ });
195
+ });
@@ -21,6 +21,10 @@ export { getAgentDir, getStatePath, getHeartbeatPath, getTodosPath, isHeartbeatF
21
21
  export { getLogAnalysisConfig, isSessionLoggingEnabled, isAutoAnalyzeEnabled, } from './log-config.js';
22
22
  export { SessionLogger, createSessionLogger, readSessionMetadata, readSessionEvents, } from './session-logger.js';
23
23
  export { parseWorkResult } from './parse-work-result.js';
24
+ export { getCompletionContract, validateCompletion, formatMissingFields, } from './completion-contracts.js';
25
+ export type { CompletionContract, CompletionField, CompletionFieldType, CompletionValidationResult, SessionOutputs, BackstopAction, BackstopResult, } from './completion-contracts.js';
26
+ export { runBackstop, collectSessionOutputs, formatBackstopComment, } from './session-backstop.js';
27
+ export type { SessionContext, BackstopOptions, BackstopRunResult, } from './session-backstop.js';
24
28
  export { LogAnalyzer, createLogAnalyzer } from './log-analyzer.js';
25
29
  export { ArtifactTracker, } from './artifact-tracker.js';
26
30
  export type { TrackedFileAction, TrackedFile, ArtifactIndex, } from './artifact-tracker.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,YAAY,GACb,MAAM,2BAA2B,CAAA;AAGlC,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,GAChB,MAAM,YAAY,CAAA;AAGnB,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAG3B,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAGlE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAG5F,YAAY,EACV,aAAa,EACb,cAA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AC7B,aAAa,EACb,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAGxD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAGlE,OAAO,EACL,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,YAAY,GACb,MAAM,2BAA2B,CAAA;AAGlC,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,GAChB,MAAM,YAAY,CA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,MAAM,sBAAsB,CAAA;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -20,6 +20,9 @@ export { getLogAnalysisConfig, isSessionLoggingEnabled, isAutoAnalyzeEnabled, }
20
20
  export { SessionLogger, createSessionLogger, readSessionMetadata, readSessionEvents, } from './session-logger.js';
21
21
  // Work Result Parser (for QA/acceptance pass/fail detection)
22
22
  export { parseWorkResult } from './parse-work-result.js';
23
+ // Completion Contracts & Session Backstop
24
+ export { getCompletionContract, validateCompletion, formatMissingFields, } from './completion-contracts.js';
25
+ export { runBackstop, collectSessionOutputs, formatBackstopComment, } from './session-backstop.js';
23
26
  // Log Analyzer
24
27
  export { LogAnalyzer, createLogAnalyzer } from './log-analyzer.js';
25
28
  // Artifact Tracker (for context window management)
@@ -28,6 +28,32 @@ export declare function validateGitRemote(expectedRepo: string, cwd?: string): v
28
28
  * '.worktrees' + branch 'SUP-123' → '/path/to/repo/.worktrees/SUP-123'
29
29
  */
30
30
  export declare function resolveWorktreePath(template: string, gitRoot: string, branch?: string): string;
31
+ /**
32
+ * Result of checking for incomplete work in a worktree
33
+ */
34
+ export interface IncompleteWorkCheck {
35
+ hasIncompleteWork: boolean;
36
+ reason?: 'uncommitted_changes' | 'unpushed_commits';
37
+ details?: string;
38
+ }
39
+ /**
40
+ * Check if a worktree has uncommitted changes or unpushed commits
41
+ *
42
+ * @param worktreePath - Path to the git worktree
43
+ * @returns Check result with reason if incomplete work is found
44
+ */
45
+ export declare function checkForIncompleteWork(worktreePath: string): IncompleteWorkCheck;
46
+ /**
47
+ * Check if a worktree branch has been pushed to remote with commits ahead of main
48
+ * but no PR was created. This catches the case where an agent pushes code and exits
49
+ * before running `gh pr create`.
50
+ */
51
+ export interface PushedWorkCheck {
52
+ hasPushedWork: boolean;
53
+ branch?: string;
54
+ details?: string;
55
+ }
56
+ export declare function checkForPushedWorkWithoutPR(worktreePath: string): PushedWorkCheck;
31
57
  /**
32
58
  * Generate a worktree identifier that includes the work type suffix
33
59
  *
@@ -64,6 +90,7 @@ export declare class AgentOrchestrator {
64
90
  private readonly progressLoggers;
65
91
  private readonly sessionLoggers;
66
92
  private readonly contextManagers;
93
+ private readonly sessionOutputFlags;
67
94
  private readonly templateRegistry;
68
95
  private allowedProjects?;
69
96
  private repoConfig?;
@@ -253,6 +280,11 @@ export declare class AgentOrchestrator {
253
280
  /**
254
281
  * Extract GitHub PR URL from text (typically from gh pr create output)
255
282
  */
283
+ /**
284
+ * Track session output signals from tool calls for completion contract validation.
285
+ * Detects when agents call Linear CLI or MCP tools that produce required outputs.
286
+ */
287
+ private trackSessionOutputSignal;
256
288
  private extractPullRequestUrl;
257
289
  /**
258
290
  * Update the Linear session with the PR URL
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmCH,OAAO,KAAK,EAAE,aAAa,EAA0B,MAAM,iBAAiB,CAAA;AAa5E,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAElB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,YAAY,CAAA;AAmBnB;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CA6B1E;AAqGD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAOR;AAwpBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,aAAa,GACtB,MAAM,CAGR;AAED;;;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