@atolis-hq/wake 0.2.69 → 0.2.71

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.
@@ -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,
@@ -212,6 +212,9 @@ export function createCodexRunner(options) {
212
212
  ...(input.workspaceMode === undefined ? {} : { workspaceMode: input.workspaceMode }),
213
213
  ...(input.mergeConflictDetected === true ? { mergeConflictDetected: true } : {}),
214
214
  ...(input.upstreamChanges === undefined ? {} : { upstreamChanges: input.upstreamChanges }),
215
+ ...(input.preExistingUncommittedChanges === true
216
+ ? { preExistingUncommittedChanges: true }
217
+ : {}),
215
218
  ...(toolCapabilityNote !== undefined || input.promptContextOverrides !== undefined
216
219
  ? {
217
220
  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),
@@ -123,6 +123,9 @@ export function createPolicyEngine() {
123
123
  if (issue.latestComment !== undefined &&
124
124
  !issue.latestComment.isBotAuthored &&
125
125
  issue.latestComment.id !== handledCommentId) {
126
+ if (lastRunSentinel === failedRunnerSentinel) {
127
+ return belowFailureRetryLimit(issue, config);
128
+ }
126
129
  return true;
127
130
  }
128
131
  if (isAwaitingApproval(issue)) {
@@ -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' &&
@@ -124,4 +124,4 @@ export function resolveWakeVersion(options = {}) {
124
124
  }
125
125
  return '0.1.0-dev';
126
126
  }
127
- export const wakeVersion = "gf13e2d4";
127
+ export const wakeVersion = "g9536c3a";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {