@atolis-hq/wake 0.2.86 → 0.2.87

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.
@@ -239,6 +239,7 @@ export function formatWakeComment(payload, controlPlaneUrl) {
239
239
  const cost = typeof payload.cost === 'string' ? payload.cost : undefined;
240
240
  const workspacePath = typeof payload.workspacePath === 'string' ? payload.workspacePath : undefined;
241
241
  const idempotencyMarker = wakeIdempotencyMarker(payload.idempotencyKey);
242
+ const outcomeLine = formatOutcomeLine(payload);
242
243
  const details = [
243
244
  action === undefined ? undefined : `stage \`${action}\``,
244
245
  runnerName === undefined ? undefined : `runner \`${runnerName}\``,
@@ -254,7 +255,7 @@ export function formatWakeComment(payload, controlPlaneUrl) {
254
255
  ? defaultAgentIdentity
255
256
  : `[${defaultAgentIdentity}](${controlPlaneUrl})`;
256
257
  const header = `**${name}** _(Wake ${wakeVersion}${details.length > 0 ? ` · ${details.join(' · ')}` : ''})_`;
257
- const sections = [wakeCommentMarker, idempotencyMarker, header, body].filter((section) => section !== undefined);
258
+ const sections = [wakeCommentMarker, idempotencyMarker, header, outcomeLine, body].filter((section) => section !== undefined);
258
259
  if (kind === 'approval-request') {
259
260
  sections.push('_To approve this work, reply with `/approved`. To request changes, reply with `/changes` followed by your feedback. To ask a question without requesting changes, reply with `/ask` followed by your question._');
260
261
  }
@@ -286,6 +287,26 @@ export function formatWakeComment(payload, controlPlaneUrl) {
286
287
  }
287
288
  return sections.join('\n\n');
288
289
  }
290
+ function formatOutcomeLine(payload) {
291
+ const sentinel = typeof payload.sentinel === 'string' ? payload.sentinel : undefined;
292
+ const kind = typeof payload.kind === 'string' ? payload.kind : undefined;
293
+ if (kind === 'approval-request') {
294
+ return '**Outcome:** 🟡 Awaiting Approval';
295
+ }
296
+ if (sentinel === 'DONE') {
297
+ return '**Outcome:** ✅ Done';
298
+ }
299
+ if (sentinel === 'REJECTED') {
300
+ return '**Outcome:** 🔴 Changes Requested';
301
+ }
302
+ if (sentinel === 'BLOCKED' || kind === 'question') {
303
+ return '**Outcome:** 🟠 Blocked';
304
+ }
305
+ if (sentinel === 'FAILED' || kind === 'failure') {
306
+ return '**Outcome:** ❌ Failed';
307
+ }
308
+ return undefined;
309
+ }
289
310
  function createIssueCommentPublishedEvent(input) {
290
311
  return createEventEnvelope({
291
312
  eventId: `${input.event.eventId}-published`,
@@ -124,4 +124,4 @@ export function resolveWakeVersion(options = {}) {
124
124
  }
125
125
  return '0.1.0-dev';
126
126
  }
127
- export const wakeVersion = "g2df6fd8";
127
+ export const wakeVersion = "g48415cd";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.2.86",
3
+ "version": "0.2.87",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {