@atolis-hq/wake 0.3.50 → 0.3.51

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 = "g562f222";
111
+ export const wakeVersion = "gc813fba";
@@ -13,7 +13,7 @@ export function parseWakeCommand(arguments_) {
13
13
  workItemId: requiredArgument(second, 'correlate work item'),
14
14
  };
15
15
  case 'validate-state':
16
- return parseValidateState(first, second);
16
+ return parseValidateState(arguments_.slice(1));
17
17
  case 'api':
18
18
  case 'ui':
19
19
  return { kind: command, ...parseHostOptions(arguments_.slice(1)) };
@@ -33,11 +33,27 @@ export function parseWakeCommand(arguments_) {
33
33
  throw new Error(`Unknown wake command: ${command ?? ''}`);
34
34
  }
35
35
  }
36
- function parseValidateState(first, second) {
37
- const allowed = first === undefined || first === '--rebuild-projections';
38
- if (!allowed || second !== undefined)
39
- throw new Error('validate-state accepts only --rebuild-projections');
40
- return { kind: 'validate-state', rebuildProjections: first === '--rebuild-projections' };
36
+ function parseValidateState(arguments_) {
37
+ let rebuildProjections = false;
38
+ let wakeRoot;
39
+ for (let index = 0; index < arguments_.length; index += 1) {
40
+ const argument = arguments_[index];
41
+ if (argument === '--rebuild-projections' && !rebuildProjections) {
42
+ rebuildProjections = true;
43
+ continue;
44
+ }
45
+ if (argument === '--wake-root') {
46
+ wakeRoot = requiredArgument(arguments_[index + 1], 'value for --wake-root');
47
+ index += 1;
48
+ continue;
49
+ }
50
+ throw new Error('validate-state accepts only --rebuild-projections and --wake-root <path>');
51
+ }
52
+ return {
53
+ kind: 'validate-state',
54
+ rebuildProjections,
55
+ ...(wakeRoot === undefined ? {} : { wakeRoot }),
56
+ };
41
57
  }
42
58
  function parseResidentCommand(kind, arguments_) {
43
59
  const options = parseHostOptions(arguments_, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.50",
3
+ "version": "0.3.51",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {