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

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.87",
3
+ "version": "0.1.88",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"
@@ -13,6 +13,10 @@
13
13
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",
14
14
  "dev": "node --disable-warning=DEP0205 --import tsx src/index.ts",
15
15
  "test": "vitest run",
16
+ "test:reminders": "npm run build && vitest run test/reminders_commands.test.ts test/reminders_artifact.test.ts && npm run verify:reminders-artifact",
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",
16
20
  "verify:dev": "node scripts/verify-dev-api.mjs",
17
21
  "benchmark:cli": "node scripts/benchmark-cli.mjs",
18
22
  "postinstall": "node scripts/postinstall-local-bin.mjs"
@@ -380,9 +380,7 @@ const listSeeds = [
380
380
  ["standUps", ["stand-ups", "list", "--page", "1", "--per", "2"]],
381
381
  ["news", ["news", "list", "--page", "1", "--per", "2"]],
382
382
  ["questions", ["questions", "list", "--page", "1", "--per", "2"]],
383
- ["pulse", ["pulse", "list", "--page", "1", "--per", "2"]],
384
383
  ["surveys", ["surveys", "list", "--page", "1", "--per", "2"]],
385
- ["feedbacks", ["feedbacks", "list", "--page", "1", "--per", "2"]],
386
384
  ["accountability", ["accountability", "list", "--page", "1", "--per", "2"]],
387
385
  ["kpis", ["kpis", "list", "--page", "1", "--per", "2"]],
388
386
  ["scorecardGroups", ["scorecard-groups", "list", "--page", "1", "--per", "2"]],
@@ -437,9 +435,7 @@ const contentId = idLookup.knowledge;
437
435
  const standUpId = idLookup.standUps;
438
436
  const headlineId = idLookup.news;
439
437
  const questionId = idLookup.questions;
440
- const pulseId = idLookup.pulse;
441
438
  const surveyId = idLookup.surveys;
442
- const feedbackId = idLookup.feedbacks;
443
439
  const responsibilityId = idLookup.accountability;
444
440
  const kpiId = idLookup.kpis;
445
441
  const kpiSmartKpiViewId = idLookup.kpiSmartKpiViewId;
@@ -456,7 +452,6 @@ const orgMetaOneSentenceSummaryVerify = `Verify Title ${verifyStamp}`;
456
452
  const keyMetricRevenueVerify = String(1000 + Number(verifyStamp.slice(-3)));
457
453
  const questionNameVerify = `CLI Verify Question Update ${verifyStamp}`;
458
454
  const surveyDueDateVerify = "2026-12-31";
459
- const feedbackQuarterVerify = "q3";
460
455
  const accountabilityNameVerify = `CLI Verify Responsibility Update ${verifyStamp}`;
461
456
  const organizationMetaProfileSeed = runWave(
462
457
  ["organizations", "meta-profile", "show", "--id", orgId],
@@ -512,9 +507,7 @@ const probes = [
512
507
  ["stand-ups", "show", "--id", standUpId],
513
508
  ["news", "show", "--id", headlineId],
514
509
  ["questions", "show", "--id", questionId],
515
- ["pulse", "show", "--id", pulseId],
516
510
  ["surveys", "show", "--id", surveyId],
517
- ["feedbacks", "show", "--id", feedbackId],
518
511
  ["accountability", "show", "--id", responsibilityId],
519
512
  ["kpis", "show", "--id", kpiId],
520
513
  ["scorecard-groups", "show", "--id", measurableGroupId],
@@ -567,12 +560,8 @@ const probes = [
567
560
  ["news", "update", "--id", headlineId, "--data-json", payload("headline", { description: "verify-update" })],
568
561
  ["questions", "create", "--data-json", payload("question", { name: "CLI Verify Question", member_id: memberId })],
569
562
  ["questions", "update", "--id", questionId, "--data-json", payload("question", { name: questionNameVerify, description: "verify-update" })],
570
- ["pulse", "create", "--data-json", payload("health_update", { health_updatable_id: projectId, health_updatable_type: "Project", member_id: memberId, value: "on_track", status: "on_track" })],
571
- ["pulse", "update", "--id", pulseId, "--data-json", payload("health_update", { value: "verify-update" })],
572
563
  ["surveys", "create", "--data-json", payload("survey", { name: "engagement", recipient_type: "org_wide" })],
573
564
  ["surveys", "update", "--id", surveyId, "--data-json", payload("survey", { name: "engagement", recipient_type: "org_wide", due_date: surveyDueDateVerify })],
574
- ["feedbacks", "create", "--data-json", payload("feedback", { name: "company_culture", quarter: "q2", year: "2026" })],
575
- ["feedbacks", "update", "--id", feedbackId, "--data-json", payload("feedback", { name: "roadmap_and_strategy", quarter: feedbackQuarterVerify, year: "2026" })],
576
565
  ["accountability", "create", "--data-json", payload("responsibility", { name: "CLI Verify Responsibility", member_id: memberId })],
577
566
  ["accountability", "update", "--id", responsibilityId, "--data-json", payload("responsibility", { name: accountabilityNameVerify })],
578
567
  ["kpis", "create", "--data-json", payload("smart_kpi", { smart_kpi_view_id: kpiSmartKpiViewId, name: kpiCreateName })],
@@ -611,7 +600,6 @@ for (const args of probes) {
611
600
 
612
601
  const validationRemediationEntries = [];
613
602
  let validationRemediationFailures = 0;
614
- let feedbackQuarterExpected = feedbackQuarterVerify;
615
603
 
616
604
  function recordValidationRemediation(entry) {
617
605
  validationRemediationEntries.push(entry);
@@ -717,136 +705,6 @@ function remediateStandupsCreateDuplicateDate() {
717
705
  }
718
706
  }
719
707
 
720
- function remediateFeedbacksUpdateDuplicateName() {
721
- const operation = "feedbacks.update";
722
- const initial = findFirstResultByPrefix(results, ["feedbacks", "update"]);
723
- if (!initial) {
724
- recordValidationRemediation({
725
- operation,
726
- offendingFields: ["feedback.name"],
727
- backendMessage: "initial probe missing",
728
- initialResult: "missing",
729
- remediation: "none",
730
- finalResult: "missing"
731
- });
732
- validationRemediationFailures += 1;
733
- return;
734
- }
735
-
736
- const messages = extractValidationMessages(initial);
737
- const isDuplicateNameValidation =
738
- isValidationErrorResult(initial) &&
739
- messages.some((msg) => /name has already been taken/i.test(msg));
740
-
741
- if (!isDuplicateNameValidation) {
742
- recordValidationRemediation({
743
- operation,
744
- offendingFields: ["feedback.name"],
745
- backendMessage: messages[0] ?? "",
746
- initialResult: summarizeStatus(initial),
747
- remediation: "none_not_required",
748
- finalResult: summarizeStatus(initial)
749
- });
750
- return;
751
- }
752
-
753
- const initialPayload = parseDataJsonFromArgs(initial.args);
754
- const feedbackBody =
755
- initialPayload && typeof initialPayload.feedback === "object" ? initialPayload.feedback : null;
756
- const originalName =
757
- feedbackBody && typeof feedbackBody.name === "string" ? feedbackBody.name : "feedback";
758
-
759
- if (!feedbackBody) {
760
- recordValidationRemediation({
761
- operation,
762
- offendingFields: ["feedback.name"],
763
- backendMessage: messages[0] ?? "",
764
- initialResult: summarizeStatus(initial),
765
- remediation: "failed_missing_feedback_payload",
766
- finalResult: summarizeStatus(initial)
767
- });
768
- validationRemediationFailures += 1;
769
- return;
770
- }
771
-
772
- const feedbackId = getArgValue(initial.args, "--id");
773
- if (!feedbackId) {
774
- recordValidationRemediation({
775
- operation,
776
- offendingFields: ["feedback.name", "feedback.year"],
777
- backendMessage: messages[0] ?? "",
778
- initialResult: summarizeStatus(initial),
779
- remediation: "failed_missing_feedback_id",
780
- finalResult: summarizeStatus(initial)
781
- });
782
- validationRemediationFailures += 1;
783
- return;
784
- }
785
-
786
- const showArgs = ["feedbacks", "show", "--id", String(feedbackId)];
787
- const showResult = runWave(showArgs, env);
788
- results.push(showResult);
789
-
790
- const currentName = firstDefinedValue(showResult?.parsed, [
791
- ["data", "feedback", "attributes", "name"],
792
- ["data", "feedback", "name"]
793
- ]);
794
- const currentQuarter = firstDefinedValue(showResult?.parsed, [
795
- ["data", "feedback", "attributes", "quarter"],
796
- ["data", "feedback", "quarter"]
797
- ]);
798
- const currentYear = firstDefinedValue(showResult?.parsed, [
799
- ["data", "feedback", "attributes", "year"],
800
- ["data", "feedback", "year"]
801
- ]);
802
-
803
- if (!showResult.parsed?.ok || !currentName || !currentQuarter) {
804
- recordValidationRemediation({
805
- operation,
806
- offendingFields: ["feedback.name", "feedback.year"],
807
- backendMessage: messages[0] ?? "",
808
- initialResult: summarizeStatus(initial),
809
- remediation: `failed_feedback_show_lookup id=${feedbackId};lookup=${summarizeStatus(showResult)}`,
810
- finalResult: summarizeStatus(initial)
811
- });
812
- validationRemediationFailures += 1;
813
- return;
814
- }
815
-
816
- const parsedYear = Number.parseInt(String(currentYear ?? ""), 10);
817
- const remediatedYear = Number.isFinite(parsedYear) ? parsedYear + 1 : 2030;
818
- const nextPayload = {
819
- feedback: {
820
- ...feedbackBody,
821
- name: String(currentName),
822
- quarter: String(currentQuarter),
823
- year: String(remediatedYear)
824
- }
825
- };
826
- const retryArgs = withUpdatedDataJson(initial.args, nextPayload);
827
- const finalResult = runWave(retryArgs, env);
828
- results.push(finalResult);
829
-
830
- recordValidationRemediation({
831
- operation,
832
- offendingFields: ["feedback.name", "feedback.year"],
833
- backendMessage: messages[0] ?? "",
834
- initialResult: summarizeStatus(initial),
835
- remediation:
836
- `fallback_non_unique_field original_name=${originalName}` +
837
- ` remediated_name=${String(currentName)}` +
838
- ` remediated_quarter=${String(currentQuarter)}` +
839
- ` remediated_year=${String(remediatedYear)}`,
840
- finalResult: summarizeStatus(finalResult)
841
- });
842
-
843
- if (finalResult.parsed?.ok !== true) {
844
- validationRemediationFailures += 1;
845
- } else {
846
- feedbackQuarterExpected = String(currentQuarter);
847
- }
848
- }
849
-
850
708
  function remediateQuarterlyObjectiveParentMismatch() {
851
709
  const operation = "foundation.quarterly-objectives.create";
852
710
  const initial = findFirstResultByPrefix(results, [
@@ -952,7 +810,6 @@ function remediateQuarterlyObjectiveParentMismatch() {
952
810
  }
953
811
 
954
812
  remediateStandupsCreateDuplicateDate();
955
- remediateFeedbacksUpdateDuplicateName();
956
813
  remediateQuarterlyObjectiveParentMismatch();
957
814
 
958
815
  let deleteVerifyLine = "";
@@ -1119,14 +976,6 @@ verifyFieldWrite({
1119
976
  ]
1120
977
  });
1121
978
 
1122
- verifyFieldWrite({
1123
- label: "feedbacks.update verify quarter",
1124
- showArgs: ["feedbacks", "show", "--id", feedbackId],
1125
- expectedValue: feedbackQuarterExpected,
1126
- requiredSuccessPrefix: ["feedbacks", "update"],
1127
- candidatePaths: [["data", "feedback", "attributes", "quarter"]]
1128
- });
1129
-
1130
979
  verifyFieldWrite({
1131
980
  label: "accountability.update verify name",
1132
981
  showArgs: ["accountability", "show", "--id", responsibilityId],
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
4
+ import { resolve } from "node:path";
5
+
6
+ const entrypoint = resolve("dist/index.js");
7
+ const requiredCommands = ["list", "show", "create", "update", "clear", "destroy"];
8
+
9
+ if (!existsSync(entrypoint)) {
10
+ throw new Error("Missing dist/index.js. Run npm run build before verifying the release artifact.");
11
+ }
12
+
13
+ const result = spawnSync(process.execPath, [entrypoint, "reminders", "--help"], {
14
+ cwd: process.cwd(),
15
+ encoding: "utf8",
16
+ env: process.env
17
+ });
18
+
19
+ if (result.status !== 0) {
20
+ throw new Error(
21
+ `Reminder release artifact failed with exit ${String(result.status)}: ${result.stderr || result.stdout}`
22
+ );
23
+ }
24
+
25
+ const missing = requiredCommands.filter(
26
+ (command) => !new RegExp(`^\\s+${command}(?:\\s|$)`, "m").test(result.stdout)
27
+ );
28
+ if (missing.length > 0) {
29
+ throw new Error(`Reminder release artifact is missing commands: ${missing.join(", ")}`);
30
+ }
31
+
32
+ process.stdout.write(
33
+ `${JSON.stringify({ ok: true, artifact: entrypoint, namespace: "reminders", commands: requiredCommands })}\n`
34
+ );