@wave-ai-os/wave-cli 0.1.88 → 0.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.88",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"
@@ -15,8 +15,9 @@
15
15
  "test": "vitest run",
16
16
  "test:reminders": "npm run build && vitest run test/reminders_commands.test.ts test/reminders_artifact.test.ts && npm run verify:reminders-artifact",
17
17
  "verify:reminders-artifact": "node scripts/verify-reminder-artifact.mjs",
18
- "prepack": "npm run build && npm run verify:reminders-artifact",
19
- "prepublishOnly": "npm run verify:reminders-artifact",
18
+ "verify:goals-artifact": "node scripts/verify-goals-artifact.mjs",
19
+ "prepack": "npm run build && npm run verify:reminders-artifact && npm run verify:goals-artifact",
20
+ "prepublishOnly": "npm run verify:reminders-artifact && npm run verify:goals-artifact",
20
21
  "verify:dev": "node scripts/verify-dev-api.mjs",
21
22
  "benchmark:cli": "node scripts/benchmark-cli.mjs",
22
23
  "postinstall": "node scripts/postinstall-local-bin.mjs"
@@ -0,0 +1,35 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { existsSync } from 'node:fs';
3
+ import { dirname, resolve } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
7
+ // These are migration, immutable history, compatibility, or negative-control
8
+ // sources. They intentionally retain old identifiers; active contracts must not.
9
+ const exceptions = [
10
+ "test/goals_contract.test.ts",
11
+ "scripts/verify-goals-artifact.mjs"
12
+ ];
13
+ const self = 'scripts/check-goals-domain.mjs';
14
+ const legacy = /(?<![A-Za-z])rocks?(?=[^a-z]|$)|(?<=\\b)rocks?(?=[^a-z]|$)|Rocks?(?![a-z])|ROCKS?(?![A-Z])/;
15
+ const excepted = (path) => path === self || exceptions.some((entry) => entry.endsWith('/') ? path.startsWith(entry) : path === entry);
16
+ let output = '';
17
+ try {
18
+ output = execFileSync('git', ['grep', '--untracked', '-I', '-n', '-i', 'rock', '--', '.'], { cwd: root, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024 });
19
+ } catch (error) {
20
+ if (error.status !== 1) throw error;
21
+ }
22
+ const failures = output.split('\n').filter(Boolean).filter((line) => {
23
+ const separator = line.indexOf(':');
24
+ return !excepted(line.slice(0, separator)) && legacy.test(line.slice(separator + 1));
25
+ });
26
+ const files = execFileSync('git', ['ls-files', '--cached', '--others', '--exclude-standard', '-z'], { cwd: root, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024 }).split('\0').filter(Boolean);
27
+ for (const path of new Set(files)) {
28
+ if (!excepted(path) && existsSync(resolve(root, path)) && legacy.test(path)) failures.push(`Legacy domain filename: ${path}`);
29
+ }
30
+ if (failures.length) {
31
+ process.stderr.write(failures.join('\n') + '\n');
32
+ process.exitCode = 1;
33
+ } else {
34
+ process.stdout.write('Goals domain guard passed: no retired feature identifiers outside declared compatibility/history boundaries.\n');
35
+ }
@@ -365,7 +365,7 @@ const idLookup = {};
365
365
  const listSeeds = [
366
366
  ["projects", ["projects", "list", "--page", "1", "--per", "2"]],
367
367
  ["tasks", ["tasks", "list", "--page", "1", "--per", "2"]],
368
- ["rocks", ["rocks", "list", "--page", "1", "--per", "2"]],
368
+ ["goals", ["goals", "list", "--page", "1", "--per", "2"]],
369
369
  ["meetings", ["meetings", "list", "--per", "2"]],
370
370
  ["members", ["members", "list", "--page", "1", "--per", "2"]],
371
371
  ["teams", ["teams", "list", "--page", "1", "--per", "2"]],
@@ -375,7 +375,7 @@ const listSeeds = [
375
375
  ["issueGroups", ["issue-groups", "list", "--page", "1", "--per", "2"]],
376
376
  ["todoGroups", ["todo-groups", "list", "--page", "1", "--per", "2"]],
377
377
  ["todos", ["todos", "list", "--page", "1", "--per", "2"]],
378
- ["rockCollections", ["rock-collections", "list", "--page", "1", "--per", "2"]],
378
+ ["goalCollections", ["goal-collections", "list", "--page", "1", "--per", "2"]],
379
379
  ["knowledge", ["knowledge", "list", "--page", "1", "--per", "2"]],
380
380
  ["standUps", ["stand-ups", "list", "--page", "1", "--per", "2"]],
381
381
  ["news", ["news", "list", "--page", "1", "--per", "2"]],
@@ -420,7 +420,7 @@ for (const [key, args] of listSeeds) {
420
420
 
421
421
  const projectId = idLookup.projects;
422
422
  const taskId = idLookup.tasks;
423
- const rockId = idLookup.rocks;
423
+ const goalId = idLookup.goals;
424
424
  const meetingId = idLookup.meetings;
425
425
  const memberId = idLookup.members;
426
426
  const teamId = idLookup.teams;
@@ -430,7 +430,7 @@ const listId = idLookup.lists;
430
430
  const listItemId = idLookup.listItems;
431
431
  const todoGroupId = idLookup.todoGroups;
432
432
  const todoId = idLookup.todos;
433
- const rockCollectionId = idLookup.rockCollections;
433
+ const goalCollectionId = idLookup.goalCollections;
434
434
  const contentId = idLookup.knowledge;
435
435
  const standUpId = idLookup.standUps;
436
436
  const headlineId = idLookup.news;
@@ -492,7 +492,7 @@ const meetingCreatePayload = teamId
492
492
  const probes = [
493
493
  ["projects", "show", "--id", projectId],
494
494
  ["tasks", "show", "--id", taskId],
495
- ["rocks", "show", "--id", rockId],
495
+ ["goals", "show", "--id", goalId],
496
496
  ["meetings", "show", "--id", meetingId],
497
497
  ["members", "show", "--id", memberId],
498
498
  ["teams", "show", "--id", teamId],
@@ -502,7 +502,7 @@ const probes = [
502
502
  ["issue-groups", "show", "--id", issueGroupId],
503
503
  ["todo-groups", "show", "--id", todoGroupId],
504
504
  ["todos", "show", "--id", todoId],
505
- ["rock-collections", "show", "--id", rockCollectionId],
505
+ ["goal-collections", "show", "--id", goalCollectionId],
506
506
  ["knowledge", "show", "--id", contentId],
507
507
  ["stand-ups", "show", "--id", standUpId],
508
508
  ["news", "show", "--id", headlineId],
@@ -525,9 +525,9 @@ const probes = [
525
525
  ["projects", "update", "--id", projectId, "--data-json", payload("project", { description: "verify-update" })],
526
526
  ["tasks", "create", "--project-id", projectId, "--summary", "CLI verify task"],
527
527
  ["tasks", "update", "--id", taskId, "--summary", "CLI verify task update"],
528
- ["rocks", "update-status", "--id", rockId, "--status", "on_track"],
529
- ["rocks", "create", "--data-json", payload("rock", { name: "CLI Verify Rock", rock_collection_id: rockCollectionId, status: "on_track", priority: "no_priority", rock_type: "individual" })],
530
- ["rocks", "update", "--id", rockId, "--data-json", payload("rock", { description: "verify-update" })],
528
+ ["goals", "update-status", "--id", goalId, "--status", "on_track"],
529
+ ["goals", "create", "--data-json", payload("goal", { name: "CLI Verify Goal", goal_collection_id: goalCollectionId, status: "on_track", priority: "no_priority", goal_type: "individual" })],
530
+ ["goals", "update", "--id", goalId, "--data-json", payload("goal", { description: "verify-update" })],
531
531
  ["meetings", "notes", "--id", meetingId, "--content", "CLI verify notes"],
532
532
  ["meetings", "create", "--data-json", payload("meeting", meetingCreatePayload)],
533
533
  ["meetings", "update", "--id", meetingId, "--data-json", payload("meeting", { notes: "verify-update" })],
@@ -550,8 +550,8 @@ const probes = [
550
550
  ["todo-groups", "update", "--id", todoGroupId, "--data-json", payload("todo_group", { description: "verify-update" })],
551
551
  ["todos", "create", "--data-json", payload("todo", { todo_group_id: todoGroupId, name: "CLI Verify Todo", status: "open", priority: "no_priority" })],
552
552
  ["todos", "update", "--id", todoId, "--data-json", payload("todo", { description: "verify-update" })],
553
- ["rock-collections", "create", "--data-json", payload("rock_collection", { name: "CLI Verify Rock Collection", status: "in_progress", priority: "no_priority" })],
554
- ["rock-collections", "update", "--id", rockCollectionId, "--data-json", payload("rock_collection", { description: "verify-update" })],
553
+ ["goal-collections", "create", "--data-json", payload("goal_collection", { name: "CLI Verify Goal Collection", status: "in_progress", priority: "no_priority" })],
554
+ ["goal-collections", "update", "--id", goalCollectionId, "--data-json", payload("goal_collection", { description: "verify-update" })],
555
555
  ["knowledge", "create", "--data-json", payload("content", { content_type: "process", status: "draft", name: "CLI Verify Doc", member_id: memberId })],
556
556
  ["knowledge", "update", "--id", contentId, "--data-json", payload("content", { name: "CLI Verify Doc Update" })],
557
557
  ["stand-ups", "create", "--data-json", payload("stand_up", { member_id: memberId, completed_date: "2026-04-06" })],
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ import assert from "node:assert/strict";
3
+ import { spawnSync } from "node:child_process";
4
+ import { resolve } from "node:path";
5
+
6
+ const entrypoint = resolve(process.env.GOALS_PROOF_CLI_BIN || "dist/index.js");
7
+ const run = (...args) => {
8
+ const result = spawnSync(process.execPath, [entrypoint, ...args], { encoding: "utf8", timeout: 15000 });
9
+ assert.ifError(result.error);
10
+ assert.equal(result.status, 0, result.stderr);
11
+ return result.stdout;
12
+ };
13
+ const discovery = run("api", "ls", "--readable");
14
+ const operations = [];
15
+ for (const namespace of ["goals", "goal-collections"]) {
16
+ const commands = ["list", "show", "search", "create", "update", "schema", "examples"];
17
+ if (namespace === "goals") commands.push("update-status");
18
+ const help = run(namespace, "--help");
19
+ assert.match(help, new RegExp(`^Usage: wave ${namespace} `));
20
+ for (const command of commands) {
21
+ assert.match(help, new RegExp(`^\\s+${command}(?:\\s|$)`, "m"));
22
+ assert.ok(discovery.split("\n").some(line => line.trim() === `wave ${namespace} ${command}`), `${namespace}.${command} missing from discovery`);
23
+ operations.push(`${namespace}.${command}`);
24
+ }
25
+ for (const command of ["schema", "examples"]) {
26
+ const output = JSON.parse(run(namespace, command));
27
+ assert.equal(output.ok, true);
28
+ assert.equal(output.command, `${namespace}.${command}`);
29
+ if (command === "schema") assert.equal(output.data.namespace.name, namespace);
30
+ else assert.ok(output.data.examples.every(example => example.startsWith(`wave ${namespace} `)));
31
+ }
32
+ }
33
+ assert.match(run("goals", "list", "--help"), /--goal-collection-id/);
34
+ assert.match(run("goals", "list", "--help"), /--goal-type/);
35
+ assert.match(run("milestones", "list", "--help"), /--goal-id/);
36
+ assert.doesNotMatch(discovery, /\brocks?\b|rock[_-]/i);
37
+ process.stdout.write(`${JSON.stringify({ ok: true, artifact: entrypoint, operations })}\n`);