@atolis-hq/wake 0.2.70 → 0.2.72
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/src/adapters/claude/claude-runner.js +3 -0
- package/dist/src/adapters/codex/codex-runner.js +9 -1
- package/dist/src/adapters/cursor/cursor-runner.js +3 -0
- package/dist/src/adapters/git/git-workspace-manager.js +5 -2
- package/dist/src/adapters/runner/stage-prompt.js +6 -0
- package/dist/src/core/tick-runner.js +4 -0
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -244,6 +244,9 @@ export function createClaudeRunner(options) {
|
|
|
244
244
|
: { contextOverrides: input.promptContextOverrides }),
|
|
245
245
|
...(input.mergeConflictDetected === true ? { mergeConflictDetected: true } : {}),
|
|
246
246
|
...(input.upstreamChanges === undefined ? {} : { upstreamChanges: input.upstreamChanges }),
|
|
247
|
+
...(input.preExistingUncommittedChanges === true
|
|
248
|
+
? { preExistingUncommittedChanges: true }
|
|
249
|
+
: {}),
|
|
247
250
|
});
|
|
248
251
|
const model = resolveModel({
|
|
249
252
|
action: input.action,
|
|
@@ -152,6 +152,9 @@ export function classifyCodexCliFailure(input) {
|
|
|
152
152
|
}
|
|
153
153
|
const structuredMessage = extractCodexErrorMessage(input.stdout);
|
|
154
154
|
const text = (structuredMessage ?? `${input.stderr}\n${input.stdout}`).toLowerCase();
|
|
155
|
+
if (text.includes('missing bearer or basic authentication')) {
|
|
156
|
+
return 'infra';
|
|
157
|
+
}
|
|
155
158
|
if (text.includes('usage limit') ||
|
|
156
159
|
text.includes('rate limit') ||
|
|
157
160
|
text.includes('quota') ||
|
|
@@ -159,7 +162,9 @@ export function classifyCodexCliFailure(input) {
|
|
|
159
162
|
text.includes('credit') ||
|
|
160
163
|
text.includes('too many requests') ||
|
|
161
164
|
text.includes('unauthorized') ||
|
|
162
|
-
text.includes('authentication')
|
|
165
|
+
text.includes('authentication') ||
|
|
166
|
+
text.includes('not logged in') ||
|
|
167
|
+
text.includes('login required')) {
|
|
163
168
|
return 'quota';
|
|
164
169
|
}
|
|
165
170
|
return 'infra';
|
|
@@ -212,6 +217,9 @@ export function createCodexRunner(options) {
|
|
|
212
217
|
...(input.workspaceMode === undefined ? {} : { workspaceMode: input.workspaceMode }),
|
|
213
218
|
...(input.mergeConflictDetected === true ? { mergeConflictDetected: true } : {}),
|
|
214
219
|
...(input.upstreamChanges === undefined ? {} : { upstreamChanges: input.upstreamChanges }),
|
|
220
|
+
...(input.preExistingUncommittedChanges === true
|
|
221
|
+
? { preExistingUncommittedChanges: true }
|
|
222
|
+
: {}),
|
|
215
223
|
...(toolCapabilityNote !== undefined || input.promptContextOverrides !== undefined
|
|
216
224
|
? {
|
|
217
225
|
contextOverrides: {
|
|
@@ -170,6 +170,9 @@ export function createCursorRunner(options) {
|
|
|
170
170
|
...(input.workspaceMode === undefined ? {} : { workspaceMode: input.workspaceMode }),
|
|
171
171
|
...(input.mergeConflictDetected === true ? { mergeConflictDetected: true } : {}),
|
|
172
172
|
...(input.upstreamChanges === undefined ? {} : { upstreamChanges: input.upstreamChanges }),
|
|
173
|
+
...(input.preExistingUncommittedChanges === true
|
|
174
|
+
? { preExistingUncommittedChanges: true }
|
|
175
|
+
: {}),
|
|
173
176
|
...(toolCapabilityNote !== undefined || input.promptContextOverrides !== undefined
|
|
174
177
|
? {
|
|
175
178
|
contextOverrides: {
|
|
@@ -76,7 +76,7 @@ async function tryUpdateFromDefaultBranch(workspacePath) {
|
|
|
76
76
|
try {
|
|
77
77
|
const { stdout: status } = await git(['status', '--porcelain'], workspacePath);
|
|
78
78
|
if (status.length > 0) {
|
|
79
|
-
return { mergeConflictDetected: false };
|
|
79
|
+
return { mergeConflictDetected: false, preExistingUncommittedChanges: true };
|
|
80
80
|
}
|
|
81
81
|
await git(['fetch', 'origin'], workspacePath);
|
|
82
82
|
const defaultBranch = await detectDefaultBranch(workspacePath);
|
|
@@ -143,7 +143,7 @@ async function validateWorkspace(input) {
|
|
|
143
143
|
if (actualBranch !== input.expectedBranch) {
|
|
144
144
|
failures.push(`expected branch ${input.expectedBranch}, found ${actualBranch}`);
|
|
145
145
|
}
|
|
146
|
-
if (!validation.clean) {
|
|
146
|
+
if (!validation.clean && input.allowUncommittedChanges !== true) {
|
|
147
147
|
failures.push('working tree has uncommitted or untracked changes');
|
|
148
148
|
}
|
|
149
149
|
if (!validation.remoteAvailable) {
|
|
@@ -230,6 +230,9 @@ export function createGitWorkspaceManager(options) {
|
|
|
230
230
|
expectedBranch: branchNameForIssue(issueNumber),
|
|
231
231
|
expectedRemoteUrl: remoteUrlForRepo(repo),
|
|
232
232
|
expectedBaseRef: `origin/${defaultBranch}`,
|
|
233
|
+
...(updateResult.preExistingUncommittedChanges === true
|
|
234
|
+
? { allowUncommittedChanges: true }
|
|
235
|
+
: {}),
|
|
233
236
|
});
|
|
234
237
|
return { workspacePath, ...updateResult, validation };
|
|
235
238
|
}
|
|
@@ -121,6 +121,9 @@ function buildHarnessPrompt(input) {
|
|
|
121
121
|
if (input.upstreamChanges !== undefined && input.upstreamChanges.trim().length > 0) {
|
|
122
122
|
lines.push('', 'Upstream update notice:', 'Before resuming this session, Wake pulled the latest default-branch changes into your workspace. New commits included:', input.upstreamChanges.trimEnd());
|
|
123
123
|
}
|
|
124
|
+
if (input.preExistingUncommittedChanges) {
|
|
125
|
+
lines.push('', 'Pre-existing uncommitted changes notice:', 'This workspace already has uncommitted changes, left over from a previous interrupted attempt at this same issue (e.g. a crash or usage-limit cutoff). They are your own prior partial work, not an unknown or unsafe state - review them with `git status`/`git diff` and continue, amend, or discard as appropriate, then commit when ready.');
|
|
126
|
+
}
|
|
124
127
|
lines.push('', 'Result envelope ABI:', 'Respond concisely. End your response with a fenced `wake-result` JSON block, then on its own line after the closing fence repeat the status word for degraded-mode fallback.', `The JSON \`status\` and final line must be exactly one of: ${sentinelListForApproval(input.skipApproval)}.`, sentinelInstructionsForApproval(input.skipApproval), 'The JSON object must contain only the `status` field. Do not add other fields.', 'This envelope is mandatory, not optional formatting: an automated parser reads only your final lines, and a reply that omits it is discarded and treated as BLOCKED regardless of the work you actually completed.');
|
|
125
128
|
if (input.prTrackingEnabled) {
|
|
126
129
|
lines.push('', 'Artifact reporting:', 'If you created a pull request during this stage, report it before the result envelope by adding a fenced `wake-artifacts` JSON block:', '```wake-artifacts', '{ "artifacts": [{ "kind": "pr", "url": "<the PR URL>" }] }', '```', 'Only report a PR you actually created in this run. Omit the block entirely if you created no PR.');
|
|
@@ -241,6 +244,9 @@ export async function buildStagePrompt(input) {
|
|
|
241
244
|
input.config?.sources.github.pullRequests.enabled === true,
|
|
242
245
|
...(input.mergeConflictDetected === true ? { mergeConflictDetected: true } : {}),
|
|
243
246
|
...(input.upstreamChanges === undefined ? {} : { upstreamChanges: input.upstreamChanges }),
|
|
247
|
+
...(input.preExistingUncommittedChanges === true
|
|
248
|
+
? { preExistingUncommittedChanges: true }
|
|
249
|
+
: {}),
|
|
244
250
|
}),
|
|
245
251
|
allowedTools,
|
|
246
252
|
extraArgs: parseFrontmatterArgs(template.frontmatter.extraArgs),
|
|
@@ -1543,6 +1543,9 @@ export function createTickRunner(deps) {
|
|
|
1543
1543
|
const upstreamChanges = 'upstreamChanges' in prepareResult && typeof prepareResult.upstreamChanges === 'string'
|
|
1544
1544
|
? prepareResult.upstreamChanges
|
|
1545
1545
|
: undefined;
|
|
1546
|
+
const preExistingUncommittedChanges = 'preExistingUncommittedChanges' in prepareResult
|
|
1547
|
+
? prepareResult.preExistingUncommittedChanges
|
|
1548
|
+
: false;
|
|
1546
1549
|
const preparedRecord = (await deps.stateStore.readRunRecord(runId));
|
|
1547
1550
|
await deps.stateStore.writeRunRecord({
|
|
1548
1551
|
...preparedRecord,
|
|
@@ -1573,6 +1576,7 @@ export function createTickRunner(deps) {
|
|
|
1573
1576
|
...(workspacePath === undefined ? {} : { workspacePath }),
|
|
1574
1577
|
...(mergeConflictDetected ? { mergeConflictDetected: true } : {}),
|
|
1575
1578
|
...(upstreamChanges === undefined ? {} : { upstreamChanges }),
|
|
1579
|
+
...(preExistingUncommittedChanges ? { preExistingUncommittedChanges: true } : {}),
|
|
1576
1580
|
onProcessStart: async (identity) => {
|
|
1577
1581
|
await deps.stateStore.updateRunRecordIf(runId, {
|
|
1578
1582
|
expect: (record) => record.status === 'running' &&
|
package/dist/src/version.js
CHANGED