@atolis-hq/wake 0.3.18 → 0.3.19

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.
@@ -2,9 +2,10 @@ import { readFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import YAML from 'yaml';
4
4
  import { parseRootConfig } from './root-schema.js';
5
- export async function loadConfig(wakeRoot) {
6
- const main = await readYaml(join(wakeRoot, 'config.yaml'));
7
- const workflows = await readYamlIfPresent(join(wakeRoot, 'config.workflows.yaml'));
5
+ const nodeFileReader = { readFile: (path) => readFile(path, 'utf8') };
6
+ export async function loadConfig(wakeRoot, fileSystem = nodeFileReader) {
7
+ const main = await readYaml(join(wakeRoot, 'config.yaml'), fileSystem);
8
+ const workflows = await readYamlIfPresent(join(wakeRoot, 'config.workflows.yaml'), fileSystem);
8
9
  const merged = merge(main, workflows === undefined ? {} : normalizeWorkflowFile(workflows));
9
10
  try {
10
11
  return parseRootConfig(merged);
@@ -17,12 +18,12 @@ export async function loadConfig(wakeRoot) {
17
18
  throw error;
18
19
  }
19
20
  }
20
- async function readYaml(path) {
21
- return YAML.parse(await readFile(path, 'utf8')) ?? {};
21
+ async function readYaml(path, fileSystem) {
22
+ return YAML.parse(await fileSystem.readFile(path)) ?? {};
22
23
  }
23
- async function readYamlIfPresent(path) {
24
+ async function readYamlIfPresent(path, fileSystem) {
24
25
  try {
25
- return await readYaml(path);
26
+ return await readYaml(path, fileSystem);
26
27
  }
27
28
  catch (error) {
28
29
  if (error.code === 'ENOENT')
@@ -2,11 +2,12 @@ import { readFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import YAML from 'yaml';
4
4
  import { emptyFakeScenarios, parseFakeScenarios, } from '../execution/index.js';
5
- export async function loadFakeScenarios(wakeRoot) {
5
+ const nodeFileReader = { readFile: (path) => readFile(path, 'utf8') };
6
+ export async function loadFakeScenarios(wakeRoot, fileSystem = nodeFileReader) {
6
7
  const path = join(wakeRoot, 'fake-scenarios.yaml');
7
8
  let source;
8
9
  try {
9
- source = await readFile(path, 'utf8');
10
+ source = await fileSystem.readFile(path);
10
11
  }
11
12
  catch (error) {
12
13
  if (error.code === 'ENOENT')
@@ -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 = "gaebb12d";
111
+ export const wakeVersion = "g9501a05";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -34,11 +34,12 @@
34
34
  "scripts": {
35
35
  "build": "tsc -p tsconfig.json && node scripts/embed-version.mjs && node scripts/check-cli-entrypoint.mjs",
36
36
  "prepack": "npm run build && npm run build:web",
37
- "test": "vitest run",
37
+ "test": "npm run test:unit",
38
38
  "test:fast": "npm run test:unit",
39
39
  "check:catalogue": "node scripts/check-functional-catalogue.mjs",
40
40
  "check:scenarios": "node scripts/check-scenario-coverage.mjs",
41
41
  "check:specs": "node scripts/check-specs.mjs",
42
+ "check:specs:report": "node scripts/report-spec-drift.mjs",
42
43
  "lint:architecture": "node scripts/check-module-manifests.mjs && node scripts/check-contract-vocabulary.mjs && depcruise --config dependency-cruiser.config.mjs src",
43
44
  "build:docker": "tsc -p tsconfig.docker.json && node scripts/embed-version.mjs && npm run build:web",
44
45
  "build:web": "npm --workspace @atolis-hq/wake-web run build",
@@ -62,7 +63,8 @@
62
63
  "smoke:claude": "tsx src/main.ts smoke claude",
63
64
  "smoke:codex": "tsx src/main.ts smoke codex",
64
65
  "smoke:cursor": "tsx src/main.ts smoke cursor",
65
- "verify": "npm run check:catalogue && npm run check:scenarios && npm run lint:architecture && npm run lint && npm run format:check && npm run build && npm test"
66
+ "verify": "npm run check:catalogue && npm run check:scenarios && npm run check:specs:report && npm run lint:architecture && npm run lint && npm run format:check && npm run build && npm run test:unit",
67
+ "verify:ci": "npm run verify && npm run test:architecture && npm run test:integration && npm run test:e2e && npm run knip && npm run test:web"
66
68
  },
67
69
  "dependencies": {
68
70
  "@octokit/rest": "^22.0.0",