@atolis-hq/wake 0.3.99 → 0.3.100

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.
@@ -108,4 +108,4 @@ export function resolveWakeVersion(options = {}) {
108
108
  return `g${headHash.slice(0, 7)}`;
109
109
  return '0.1.0-dev';
110
110
  }
111
- export const wakeVersion = "gee137de";
111
+ export const wakeVersion = "g8f9ce65";
@@ -3,14 +3,22 @@ import { GitHubBuiltInCommand } from '../contracts/vocabulary.js';
3
3
  export function isHumanNonWakeReply(actorKind, body) {
4
4
  return actorKind === ReviewActorKind.Human && !body.includes('<!-- wake:');
5
5
  }
6
+ function commandLine(body) {
7
+ const trimmed = body.trim();
8
+ const newlineIndex = trimmed.indexOf('\n');
9
+ const line = newlineIndex === -1 ? trimmed : trimmed.slice(0, newlineIndex);
10
+ return line.trim().toLowerCase();
11
+ }
12
+ function matchesCommand(line, command) {
13
+ return line === command || (line.startsWith(command) && /\s/.test(line.charAt(command.length)));
14
+ }
6
15
  export function recognizedCommand(body) {
7
- const normalized = body.trim().toLowerCase();
8
- if (normalized === GitHubBuiltInCommand.Approved)
16
+ const line = commandLine(body);
17
+ if (matchesCommand(line, GitHubBuiltInCommand.Approved))
9
18
  return GitHubBuiltInCommand.Approved;
10
- if (normalized === GitHubBuiltInCommand.Changes ||
11
- normalized.startsWith(`${GitHubBuiltInCommand.Changes} `))
19
+ if (matchesCommand(line, GitHubBuiltInCommand.Changes))
12
20
  return GitHubBuiltInCommand.Changes;
13
- if (normalized === GitHubBuiltInCommand.Retry)
21
+ if (matchesCommand(line, GitHubBuiltInCommand.Retry))
14
22
  return GitHubBuiltInCommand.Retry;
15
23
  return null;
16
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.99",
3
+ "version": "0.3.100",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {