pi-usereq 0.6.0 → 0.7.0

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.
@@ -514,7 +514,7 @@
514
514
  - `registerPromptCommands(...)`: register bundled `req-*` prompt commands [`src/index.ts`]
515
515
  - `registerAgentTools(...)`: register structured agent tools [`src/index.ts`]
516
516
  - `registerConfigCommands(...)`: register configuration commands [`src/index.ts`]
517
- - `registerPiNotifyShortcut(...)`: register the configured successful-run sound shortcut when the runtime supports shortcuts [`src/index.ts`]
517
+ - `registerPiNotifyShortcut(...)`: register the configured sound-level shortcut when the runtime supports shortcuts [`src/index.ts`]
518
518
  - `loadProjectConfig(...)`: load the current project config for shortcut registration [`src/index.ts`]
519
519
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
520
520
  - `loadConfig(...)`: load config or defaults [`src/core/config.ts`]
@@ -561,33 +561,40 @@
561
561
  - `refreshContextUsage(...)`: sync the latest context-usage snapshot [`src/core/extension-status.ts`]
562
562
  - `RecordingCommandContext.getContextUsage(...)`: return the offline context-usage placeholder [`scripts/lib/recording-extension-api.ts`]
563
563
  - `syncPiUsereqStatusTicker(...)`: start or stop the live elapsed ticker [`src/core/extension-status.ts`]
564
- - `renderPiUsereqStatus(...)`: render the base/context/elapsed/beep/sound footer with CLI-theme token overlays [`src/core/extension-status.ts`]
564
+ - `renderPiUsereqStatus(...)`: render the base/context/elapsed/sound footer with CLI-theme token overlays [`src/core/extension-status.ts`]
565
565
  - `createStatusThemeAdapter(...)`: constrain status rendering to CLI-supported `accent`, `warning`, `dim`, and `error` theme tokens [`src/core/extension-status.ts`]
566
566
  - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics [`src/core/extension-status.ts`]
567
567
  - `formatStatusField(...)`: render one colored text field [`src/core/extension-status.ts`]
568
568
  - `formatRenderedStatusField(...)`: render one pre-styled field [`src/core/extension-status.ts`]
569
- - `formatContextUsageBar(...)`: render the 10-cell context bar or threshold-specific overlay [`src/core/extension-status.ts`]
570
- - `resolveContextUsageOverlay(...)`: choose `◀ CLEAR ▶ ` or ` ◀ FULL ▶ ` overlay states with CLI-supported theme tokens [`src/core/extension-status.ts`]
571
- - `formatContextUsageOverlay(...)`: paint the fixed-width overlay with preserved bar background [`src/core/extension-status.ts`]
569
+ - `formatContextUsageBar(...)`: render the icon-based context gauge [`src/core/extension-status.ts`]
570
+ - `resolveContextUsageIconText(...)`: map normalized context usage to the fixed-width gauge icon [`src/core/extension-status.ts`]
572
571
  - `formatElapsedStatusValue(...)`: compose `⏱︎`, `⚑`, and `⌛︎` timer segments [`src/core/extension-status.ts`]
573
572
  - `formatCompletedStatusDuration(...)`: render completed timers or the unset placeholder [`src/core/extension-status.ts`]
574
573
  - `formatStatusDuration(...)`: render `M:SS` durations [`src/core/extension-status.ts`]
575
- - `formatPiNotifyBeepStatus(...)`: serialize enabled beep flags for the footer [`src/core/pi-notify.ts`]
576
- - `runPiNotifyEffects(...)`: dispatch configured terminal beeps and successful-run sound hooks on `agent_end` [`src/core/pi-notify.ts`]
577
- - `classifyPiNotifyOutcome(...)`: map assistant stop reasons to `end`, `esc`, or `err` [`src/core/pi-notify.ts`]
574
+ - `runPiNotifyEffects(...)`: dispatch configured command-notify, sound, and optional Pushover hooks on `agent_end` [`src/core/pi-notify.ts`]
575
+ - `classifyPiNotifyOutcome(...)`: map assistant stop reasons to `completed`, `interrupted`, or `failed` [`src/core/pi-notify.ts`]
578
576
  - `hasAgentEndStopReason(...)`: scan assistant stop reasons inside the `agent_end` payload [`src/core/pi-notify.ts`]
579
- - `buildPiNotifyTitle(...)`: build the stable pi-notify title [`src/core/pi-notify.ts`]
580
- - `buildPiNotifyBody(...)`: build the stable pi-notify body from the classified outcome [`src/core/pi-notify.ts`]
581
- - `notifyPiTerminal(...)`: route terminal notifications by runtime environment when the matching beep flag is enabled [`src/core/pi-notify.ts`]
582
- - `notifyWindows(...)`: emit Windows toast notifications [`src/core/pi-notify.ts`]
583
- - `notifyOSC99(...)`: emit Kitty OSC 99 notifications [`src/core/pi-notify.ts`]
584
- - `notifyOSC9(...)`: emit OSC 9 notifications [`src/core/pi-notify.ts`]
585
- - `notifyOSC777(...)`: emit OSC 777 notifications [`src/core/pi-notify.ts`]
586
- - `runPiNotifySoundCommand(...)`: execute the configured successful-run sound command when sound is enabled [`src/core/pi-notify.ts`]
577
+ - `shouldRunPiNotifyCommand(...)`: validate prompt-scoped command-notify prerequisites [`src/core/pi-notify.ts`]
578
+ - `isPiNotifyOutcomeEnabled(...)`: map `completed|interrupted|failed` to the selected toggle set [`src/core/pi-notify.ts`]
579
+ - `runPiNotifyCommand(...)`: execute `PI_NOTIFY_CMD` with runtime placeholder substitution [`src/core/pi-notify.ts`]
580
+ - `substitutePiNotifyShellTemplate(...)`: replace installation, prompt, base, time, args, and result placeholders inside the shell template [`src/core/pi-notify.ts`]
581
+ - `buildPiNotifyRuntimeTemplateValues(...)`: resolve raw prompt-scoped placeholder values [`src/core/pi-notify.ts`]
582
+ - `formatPiNotifyBasePath(...)`: render `%%BASE%%` as `~`-relative when possible [`src/core/pi-notify.ts`]
583
+ - `formatPiNotifyDuration(...)`: render `%%TIME%%` as `M:SS` [`src/core/pi-notify.ts`]
584
+ - `formatPiNotifyResult(...)`: map prompt-end outcomes to `successed|aborted|failed` [`src/core/pi-notify.ts`]
585
+ - `substitutePiNotifyInstallPath(...)`: replace `%%INSTALLATION_PATH%%` before shell execution [`src/core/pi-notify.ts`]
586
+ - `quotePiNotifyInstallPath(...)`: quote the installation path for shell reuse [`src/core/pi-notify.ts`]
587
+ - `escapePiNotifyShellTemplateValue(...)`: escape prompt-scoped values for double-quoted shell insertion [`src/core/pi-notify.ts`]
588
+ - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
589
+ - `runPiNotifyShellCommand(...)`: spawn one detached shell command [`src/core/pi-notify.ts`]
590
+ - `shouldRunPiNotifySound(...)`: validate sound level plus the matching event toggle [`src/core/pi-notify.ts`]
591
+ - `isPiNotifyOutcomeEnabled(...)`: map `completed|interrupted|failed` to the selected toggle set [`src/core/pi-notify.ts`]
592
+ - `runPiNotifySoundCommand(...)`: execute the configured sound command when the sound level and matching event toggle permit delivery [`src/core/pi-notify.ts`]
587
593
  - `resolvePiNotifySoundCommand(...)`: select the configured command for `low`, `mid`, or `high` [`src/core/pi-notify.ts`]
588
594
  - `substitutePiNotifyInstallPath(...)`: replace `%%INSTALLATION_PATH%%` before shell execution [`src/core/pi-notify.ts`]
589
595
  - `quotePiNotifyInstallPath(...)`: quote the installation path for shell reuse [`src/core/pi-notify.ts`]
590
- - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
596
+ - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
597
+ - `runPiNotifyShellCommand(...)`: spawn one detached shell command [`src/core/pi-notify.ts`]
591
598
  - `replayCommand(...)`: replay a recorded command handler and capture prompt/UI side effects [`scripts/lib/extension-debug-harness.ts`]
592
599
  - `registerExtensionOffline(...)`: rebuild the recorded extension registration surface [`scripts/lib/extension-debug-harness.ts`]
593
600
  - `RecordingCommandContext(...)`: initialize the recorded command-context UI adapter and deterministic theme-color encoding [`scripts/lib/recording-extension-api.ts`]
@@ -600,7 +607,7 @@
600
607
  - External boundaries: `RecordingExtensionAPI.sendUserMessage(...)` records the delivered prompt payload.
601
608
  - `configurePiUsereq(...)`: execute the interactive configuration menu [`src/index.ts`]
602
609
  - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions plus the display-only config-path row [`src/index.ts`]
603
- - `formatProjectConfigPathForMenu(...)`: format the current config path relative to the user home when possible [`src/index.ts`]
610
+ - `formatProjectConfigPathForMenu(...)`: format the current config path and rewrite a leading `$HOME` token to `~` for menu display [`src/index.ts`]
604
611
  - `showPiUsereqSettingsMenu(...)`: render the shared settings-menu UI for top-level and submenu actions [`src/core/settings-menu.ts`]
605
612
  - `formatPiUsereqSettingsMenuTitle(...)`: rebuild the menu title with active-theme semantics [`src/core/settings-menu.ts`]
606
613
  - `buildPiUsereqSettingsListTheme(...)`: prefer shared CLI settings-list theming and fall back during offline replay [`src/core/settings-menu.ts`]
@@ -608,21 +615,27 @@
608
615
  - `buildSettingItems(...)`: map menu choices into settings-list rows and apply optional dim value tones [`src/core/settings-menu.ts`]
609
616
  - `saveProjectConfig(...)`: persist menu updates on save-and-close [`src/index.ts`]
610
617
  - `setPiUsereqStatusConfig(...)`: cache the saved config for footer rendering [`src/core/extension-status.ts`]
611
- - `renderPiUsereqStatus(...)`: render the base/context/elapsed/beep/sound footer after save-and-close with CLI-theme token overlays [`src/core/extension-status.ts`]
618
+ - `renderPiUsereqStatus(...)`: render the base/context/elapsed/sound footer after save-and-close with CLI-theme token overlays [`src/core/extension-status.ts`]
612
619
  - `createStatusThemeAdapter(...)`: constrain status rendering to CLI-supported `accent`, `warning`, `dim`, and `error` theme tokens [`src/core/extension-status.ts`]
613
- - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics [`src/core/extension-status.ts`]
620
+ - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics and sound status fields [`src/core/extension-status.ts`]
614
621
  - `formatStatusField(...)`: render one colored text field [`src/core/extension-status.ts`]
615
622
  - `formatRenderedStatusField(...)`: render one pre-styled field [`src/core/extension-status.ts`]
616
- - `formatContextUsageBar(...)`: render the 10-cell context bar or threshold-specific overlay [`src/core/extension-status.ts`]
623
+ - `formatContextUsageBar(...)`: render the icon-based context gauge [`src/core/extension-status.ts`]
617
624
  - `formatElapsedStatusValue(...)`: compose `⏱︎`, `⚑`, and `⌛︎` timer segments [`src/core/extension-status.ts`]
618
625
  - `formatCompletedStatusDuration(...)`: render completed timers or the unset placeholder [`src/core/extension-status.ts`]
619
626
  - `formatStatusDuration(...)`: render `M:SS` durations [`src/core/extension-status.ts`]
620
- - `formatPiNotifyBeepStatus(...)`: serialize enabled beep flags for the footer [`src/core/pi-notify.ts`]
621
- - `configureStaticCheckMenu(...)`: interactive static-check editor [`src/index.ts`]
622
- - `configurePiUsereqToolsMenu(...)`: interactive active-tool editor [`src/index.ts`]
623
- - `configurePiNotifyMenu(...)`: interactive pi-notify editor [`src/index.ts`]
624
- - `buildPiNotifyMenuChoices(...)`: serialize notification actions for the shared settings menu [`src/index.ts`]
625
- - `togglePiNotifyBeepFlag(...)`: toggle one prompt-end beep flag [`src/index.ts`]
627
+ - `configureStaticCheckMenu(...)`: interactive guided static-check editor [`src/index.ts`]
628
+ - `configurePiUsereqToolsMenu(...)`: interactive active-tool editor without a status-reference action [`src/index.ts`]
629
+ - `configurePiNotifyMenu(...)`: interactive notify, sound, and Pushover editor with dedicated event submenus [`src/index.ts`]
630
+ - `buildPiNotifyMenuChoices(...)`: serialize command-notify, sound, and Pushover blocks plus shared-event submenu launchers [`src/index.ts`]
631
+ - `buildPiNotifyEventLauncherChoice(...)`: serialize one event-submenu launcher row with a compact enabled-toggle summary [`src/index.ts`]
632
+ - `buildPiNotifyPushoverRows(...)`: serialize direct Pushover rows plus the shared event-submenu launcher [`src/index.ts`]
633
+ - `configurePiNotifyEventMenu(...)`: interactive completed/interrupted/failed event editor for one notification transport [`src/index.ts`]
634
+ - `buildPiNotifyEventMenuChoices(...)`: serialize shared event rows plus submenu reset/save actions [`src/index.ts`]
635
+ - `resetPiNotifyEventMenuToDefaults(...)`: restore default event toggles for one notification transport [`src/index.ts`]
636
+ - `resolvePiNotifyEventLabel(...)`: map one event-toggle key to the human-readable menu label [`src/index.ts`]
637
+ - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
638
+ - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
626
639
  - `replayTool(...)`: replay a recorded tool execute handler and capture content/details [`scripts/lib/extension-debug-harness.ts`]
627
640
  - `registerExtensionOffline(...)`: rebuild the recorded extension registration surface [`scripts/lib/extension-debug-harness.ts`]
628
641
  - `RecordingCommandContext(...)`: initialize the recorded command-context UI adapter and deterministic theme-color encoding [`scripts/lib/recording-extension-api.ts`]
@@ -633,6 +646,8 @@
633
646
  - `buildTokenToolPayload(...)`: construct agent-oriented token JSON with separated source facts, metrics, and guidance [`src/core/token-counter.ts`]
634
647
  - `probeRequestedPath(...)`: classify requested paths as readable files, missing inputs, or non-file inputs [`src/core/token-counter.ts`]
635
648
  - `countFilesMetrics(...)`: read readable files and extract token, character, byte, line, heading, and optional Doxygen facts [`src/core/token-counter.ts`]
649
+ - `TokenCounter(...)`: lazily resolve `js-tiktoken` only when token counting executes [`src/core/token-counter.ts`]
650
+ - `loadJsTiktokenModule(...)`: convert missing tokenizer dependencies into deterministic `ReqError` failures [`src/core/token-counter.ts`]
636
651
  - `buildCountFileMetricsResult(...)`: assemble direct-access per-file metrics and metadata [`src/core/token-counter.ts`]
637
652
  - `TokenCounter.countTokens(...)`: encode content and count tokens [`src/core/token-counter.ts`]
638
653
  - `TokenCounter.countChars(...)`: count characters [`src/core/token-counter.ts`]
@@ -644,6 +659,9 @@
644
659
  - `buildTokenToolExecuteResult(...)`: wrap token payloads into tool content and structured details [`src/index.ts`]
645
660
  - `buildTokenToolExecutionStderr(...)`: serialize skipped and error observations into stderr text [`src/index.ts`]
646
661
  - `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
662
+ - `buildFailedTokenToolExecuteResult(...)`: normalize pre-payload token failures into the stable structured token-tool response shape [`src/index.ts`]
663
+ - `normalizeToolFailure(...)`: convert `ReqError` failures into deterministic execution metadata [`src/core/agent-tool-json.ts`]
664
+ - `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
647
665
  - `buildReferenceToolPayload(...)`: construct token-optimized references JSON with repository structure, symbols, and Doxygen fields [`src/core/reference-payload.ts`]
648
666
  - `canonicalizeReferencePath(...)`: normalize request and file paths against the project base [`src/core/reference-payload.ts`]
649
667
  - `analyzeReferenceFile(...)`: analyze one processable file into structured imports, symbols, and comments [`src/core/reference-payload.ts`]
@@ -785,6 +803,8 @@
785
803
  - `buildTokenToolPayload(...)`: construct token-optimized token JSON with direct-access source facts and metrics [`src/core/token-counter.ts`]
786
804
  - `probeRequestedPath(...)`: classify requested paths as readable files, missing inputs, or non-file inputs [`src/core/token-counter.ts`]
787
805
  - `countFilesMetrics(...)`: read readable files and extract token, character, byte, line, heading, and optional Doxygen facts [`src/core/token-counter.ts`]
806
+ - `TokenCounter(...)`: lazily resolve `js-tiktoken` only when token counting executes [`src/core/token-counter.ts`]
807
+ - `loadJsTiktokenModule(...)`: convert missing tokenizer dependencies into deterministic `ReqError` failures [`src/core/token-counter.ts`]
788
808
  - `buildCountFileMetricsResult(...)`: assemble direct-access per-file metrics and metadata [`src/core/token-counter.ts`]
789
809
  - `TokenCounter.countTokens(...)`: encode content and count tokens [`src/core/token-counter.ts`]
790
810
  - `TokenCounter.countChars(...)`: count characters [`src/core/token-counter.ts`]
@@ -796,6 +816,9 @@
796
816
  - `buildTokenToolExecuteResult(...)`: wrap token payloads into tool content and structured details [`src/index.ts`]
797
817
  - `buildTokenToolExecutionStderr(...)`: serialize skipped and error observations into stderr text [`src/index.ts`]
798
818
  - `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
819
+ - `buildFailedTokenToolExecuteResult(...)`: normalize pre-payload token failures into the stable structured token-tool response shape [`src/index.ts`]
820
+ - `normalizeToolFailure(...)`: convert `ReqError` failures into deterministic execution metadata [`src/core/agent-tool-json.ts`]
821
+ - `buildStructuredToolExecuteResult(...)`: mirror the final JSON object into tool content and details [`src/core/agent-tool-json.ts`]
799
822
  - `buildReferenceToolPayload(...)`: construct token-optimized references JSON with repository structure, symbols, and Doxygen fields [`src/core/reference-payload.ts`]
800
823
  - `canonicalizeReferencePath(...)`: normalize request and file paths against the project base [`src/core/reference-payload.ts`]
801
824
  - `analyzeReferenceFile(...)`: analyze one processable file into structured imports, symbols, and comments [`src/core/reference-payload.ts`]
@@ -850,7 +873,7 @@
850
873
  - `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
851
874
  - `resolveGitRoot(...)`: resolve repository root [`src/core/tool-runner.ts`]
852
875
  - `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
853
- - `registerPiNotifyShortcut(...)`: register the configured successful-run sound shortcut when the runtime supports shortcuts [`src/index.ts`]
876
+ - `registerPiNotifyShortcut(...)`: register the configured sound-level shortcut when the runtime supports shortcuts [`src/index.ts`]
854
877
  - `loadProjectConfig(...)`: load config for shortcut registration [`src/index.ts`]
855
878
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
856
879
  - `loadConfig(...)`: load config or defaults [`src/core/config.ts`]
@@ -884,38 +907,56 @@
884
907
  - `updateExtensionStatus(...)`: refresh stored context usage, elapsed timers, prompt-request state, cumulative runtime, and rendered status text [`src/core/extension-status.ts`]
885
908
  - `refreshContextUsage(...)`: sync the latest context-usage snapshot [`src/core/extension-status.ts`]
886
909
  - `syncPiUsereqStatusTicker(...)`: start or stop the live elapsed ticker [`src/core/extension-status.ts`]
887
- - `renderPiUsereqStatus(...)`: render the base/context/elapsed/beep/sound/pushover footer with CLI-theme token overlays [`src/core/extension-status.ts`]
910
+ - `renderPiUsereqStatus(...)`: render the base/context/elapsed/sound footer with CLI-theme token overlays [`src/core/extension-status.ts`]
888
911
  - `createStatusThemeAdapter(...)`: constrain status rendering to CLI-supported `accent`, `warning`, `dim`, and `error` theme tokens [`src/core/extension-status.ts`]
889
- - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics plus the Pushover enable field [`src/core/extension-status.ts`]
912
+ - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics and sound status fields [`src/core/extension-status.ts`]
890
913
  - `formatStatusField(...)`: render one colored text field [`src/core/extension-status.ts`]
891
914
  - `formatRenderedStatusField(...)`: render one pre-styled field [`src/core/extension-status.ts`]
892
- - `formatContextUsageBar(...)`: render the 10-cell context bar or threshold-specific overlay [`src/core/extension-status.ts`]
893
- - `resolveContextUsageOverlay(...)`: choose `◀ CLEAR ▶ ` or ` ◀ FULL ▶ ` overlay states with CLI-supported theme tokens [`src/core/extension-status.ts`]
894
- - `formatContextUsageOverlay(...)`: paint the fixed-width overlay with preserved bar background [`src/core/extension-status.ts`]
915
+ - `formatContextUsageBar(...)`: render the icon-based context gauge [`src/core/extension-status.ts`]
916
+ - `resolveContextUsageIconText(...)`: map normalized context usage to the fixed-width gauge icon [`src/core/extension-status.ts`]
895
917
  - `formatElapsedStatusValue(...)`: compose `⏱︎`, `⚑`, and `⌛︎` timer segments [`src/core/extension-status.ts`]
896
918
  - `formatCompletedStatusDuration(...)`: render completed timers or the unset placeholder [`src/core/extension-status.ts`]
897
919
  - `formatStatusDuration(...)`: render `M:SS` durations [`src/core/extension-status.ts`]
898
- - `formatPiNotifyBeepStatus(...)`: serialize enabled beep flags for the footer [`src/core/pi-notify.ts`]
899
- - `formatPiNotifyPushoverStatus(...)`: serialize the dedicated Pushover enable flag for the footer [`src/core/pi-notify.ts`]
900
- - `runPiNotifyEffects(...)`: dispatch configured terminal beeps, successful-run sound hooks, and optional Pushover API requests on `agent_end` [`src/core/pi-notify.ts`]
901
- - `classifyPiNotifyOutcome(...)`: map assistant stop reasons to `end`, `esc`, or `err` [`src/core/pi-notify.ts`]
920
+ - `runPiNotifyEffects(...)`: dispatch configured command-notify, sound, and optional Pushover API requests on `agent_end` [`src/core/pi-notify.ts`]
921
+ - `classifyPiNotifyOutcome(...)`: map assistant stop reasons to `completed`, `interrupted`, or `failed` [`src/core/pi-notify.ts`]
902
922
  - `hasAgentEndStopReason(...)`: scan assistant stop reasons inside the `agent_end` payload [`src/core/pi-notify.ts`]
903
- - `buildPiNotifyTitle(...)`: build the stable pi-notify title [`src/core/pi-notify.ts`]
904
- - `buildPiNotifyBody(...)`: build the stable pi-notify body from the classified outcome [`src/core/pi-notify.ts`]
905
- - `notifyPiTerminal(...)`: route terminal notifications by runtime environment when the matching beep flag is enabled [`src/core/pi-notify.ts`]
906
- - `notifyWindows(...)`: emit Windows toast notifications [`src/core/pi-notify.ts`]
907
- - `notifyOSC99(...)`: emit Kitty OSC 99 notifications [`src/core/pi-notify.ts`]
908
- - `notifyOSC9(...)`: emit OSC 9 notifications [`src/core/pi-notify.ts`]
909
- - `notifyOSC777(...)`: emit OSC 777 notifications [`src/core/pi-notify.ts`]
910
- - `runPiNotifySoundCommand(...)`: execute the configured successful-run sound command when sound is enabled [`src/core/pi-notify.ts`]
923
+ - `shouldRunPiNotifyCommand(...)`: validate prompt-scoped command-notify prerequisites [`src/core/pi-notify.ts`]
924
+ - `isPiNotifyOutcomeEnabled(...)`: map `completed|interrupted|failed` to the selected toggle set [`src/core/pi-notify.ts`]
925
+ - `runPiNotifyCommand(...)`: execute `PI_NOTIFY_CMD` with runtime placeholder substitution [`src/core/pi-notify.ts`]
926
+ - `substitutePiNotifyShellTemplate(...)`: replace installation, prompt, base, time, args, and result placeholders inside the shell template [`src/core/pi-notify.ts`]
927
+ - `buildPiNotifyRuntimeTemplateValues(...)`: resolve raw prompt-scoped placeholder values [`src/core/pi-notify.ts`]
928
+ - `formatPiNotifyBasePath(...)`: render `%%BASE%%` as `~`-relative when possible [`src/core/pi-notify.ts`]
929
+ - `formatPiNotifyDuration(...)`: render `%%TIME%%` as `M:SS` [`src/core/pi-notify.ts`]
930
+ - `formatPiNotifyResult(...)`: map prompt-end outcomes to `successed|aborted|failed` [`src/core/pi-notify.ts`]
931
+ - `substitutePiNotifyInstallPath(...)`: replace `%%INSTALLATION_PATH%%` before shell execution [`src/core/pi-notify.ts`]
932
+ - `quotePiNotifyInstallPath(...)`: quote the installation path for shell reuse [`src/core/pi-notify.ts`]
933
+ - `escapePiNotifyShellTemplateValue(...)`: escape prompt-scoped values for double-quoted shell insertion [`src/core/pi-notify.ts`]
934
+ - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
935
+ - `runPiNotifyShellCommand(...)`: spawn one detached shell command [`src/core/pi-notify.ts`]
936
+ - `shouldRunPiNotifySound(...)`: validate sound level plus the matching event toggle [`src/core/pi-notify.ts`]
937
+ - `isPiNotifyOutcomeEnabled(...)`: map `completed|interrupted|failed` to the selected toggle set [`src/core/pi-notify.ts`]
938
+ - `runPiNotifySoundCommand(...)`: execute the configured sound command when the sound level and matching event toggle permit delivery [`src/core/pi-notify.ts`]
911
939
  - `resolvePiNotifySoundCommand(...)`: select the configured command for `low`, `mid`, or `high` [`src/core/pi-notify.ts`]
912
940
  - `substitutePiNotifyInstallPath(...)`: replace `%%INSTALLATION_PATH%%` before shell execution [`src/core/pi-notify.ts`]
913
941
  - `quotePiNotifyInstallPath(...)`: quote the installation path for shell reuse [`src/core/pi-notify.ts`]
914
- - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
915
- - `runPiNotifyPushoverRequest(...)`: POST the successful prompt payload to the Pushover Message API when credentials and flags permit delivery [`src/core/pi-notify.ts`]
942
+ - `getInstallationPath(...)`: resolve the installed extension root [`src/core/path-context.ts`]
943
+ - `runPiNotifyShellCommand(...)`: spawn one detached shell command [`src/core/pi-notify.ts`]
944
+ - `shouldRunPiNotifyPushover(...)`: validate global Pushover enablement, the matching event toggle, and required credentials [`src/core/pi-notify.ts`]
945
+ - `isPiNotifyOutcomeEnabled(...)`: map `completed|interrupted|failed` to the selected toggle set [`src/core/pi-notify.ts`]
946
+ - `runPiNotifyPushoverRequest(...)`: POST the prompt-end payload to the Pushover Message API when credentials and flags permit delivery [`src/core/pi-notify.ts`]
916
947
  - `buildPiNotifyPushoverPayload(...)`: serialize token, user, title, priority, and message fields [`src/core/pi-notify.ts`]
917
- - `buildPiNotifyPushoverTitle(...)`: compose `<prompt> @ <base-path> [<time>]` for successful completion [`src/core/pi-notify.ts`]
918
- - `buildPiNotifyPushoverBody(...)`: reuse the raw prompt argument payload [`src/core/pi-notify.ts`]
948
+ - `buildPiNotifyPushoverTitle(...)`: resolve the configured Pushover title template [`src/core/pi-notify.ts`]
949
+ - `substitutePiNotifyTextTemplate(...)`: replace prompt-scoped placeholders inside the title template [`src/core/pi-notify.ts`]
950
+ - `buildPiNotifyRuntimeTemplateValues(...)`: resolve raw prompt-scoped placeholder values [`src/core/pi-notify.ts`]
951
+ - `formatPiNotifyBasePath(...)`: render `%%BASE%%` as `~`-relative when possible [`src/core/pi-notify.ts`]
952
+ - `formatPiNotifyDuration(...)`: render `%%TIME%%` as `M:SS` [`src/core/pi-notify.ts`]
953
+ - `formatPiNotifyResult(...)`: map prompt-end outcomes to `successed|aborted|failed` [`src/core/pi-notify.ts`]
954
+ - `buildPiNotifyPushoverBody(...)`: resolve the configured Pushover text template [`src/core/pi-notify.ts`]
955
+ - `substitutePiNotifyTextTemplate(...)`: replace prompt-scoped placeholders inside the text template [`src/core/pi-notify.ts`]
956
+ - `buildPiNotifyRuntimeTemplateValues(...)`: resolve raw prompt-scoped placeholder values [`src/core/pi-notify.ts`]
957
+ - `formatPiNotifyBasePath(...)`: render `%%BASE%%` as `~`-relative when possible [`src/core/pi-notify.ts`]
958
+ - `formatPiNotifyDuration(...)`: render `%%TIME%%` as `M:SS` [`src/core/pi-notify.ts`]
959
+ - `formatPiNotifyResult(...)`: map prompt-end outcomes to `successed|aborted|failed` [`src/core/pi-notify.ts`]
919
960
  - `configurePiUsereq(...)`: interactive configuration menu runtime root [`src/index.ts`]
920
961
  - `loadProjectConfig(...)`: load config and normalize persisted directory paths for command context [`src/index.ts`]
921
962
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
@@ -929,7 +970,7 @@
929
970
  - `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
930
971
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
931
972
  - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions plus the display-only config-path row [`src/index.ts`]
932
- - `formatProjectConfigPathForMenu(...)`: format the current config path relative to the user home when possible [`src/index.ts`]
973
+ - `formatProjectConfigPathForMenu(...)`: format the current config path and rewrite a leading `$HOME` token to `~` for menu display [`src/index.ts`]
933
974
  - `showPiUsereqSettingsMenu(...)`: render the shared settings-menu UI for top-level and submenu actions [`src/core/settings-menu.ts`]
934
975
  - `formatPiUsereqSettingsMenuTitle(...)`: rebuild the menu title with active-theme semantics [`src/core/settings-menu.ts`]
935
976
  - `buildPiUsereqSettingsListTheme(...)`: prefer shared CLI settings-list theming and fall back during offline replay [`src/core/settings-menu.ts`]
@@ -940,40 +981,28 @@
940
981
  - `saveConfig(...)`: persist config JSON [`src/core/config.ts`]
941
982
  - `getProjectConfigPath(...)`: resolve config file path [`src/core/config.ts`]
942
983
  - `setPiUsereqStatusConfig(...)`: cache the just-saved docs/tests/src and pi-notify values for status rendering [`src/core/extension-status.ts`]
943
- - `renderPiUsereqStatus(...)`: render the base/context/elapsed/beep/sound/pushover footer after save-and-close with CLI-theme token overlays [`src/core/extension-status.ts`]
984
+ - `renderPiUsereqStatus(...)`: render the base/context/elapsed/sound footer after save-and-close with CLI-theme token overlays [`src/core/extension-status.ts`]
944
985
  - `createStatusThemeAdapter(...)`: constrain status rendering to CLI-supported `accent`, `warning`, `dim`, and `error` theme tokens [`src/core/extension-status.ts`]
945
- - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics plus the Pushover enable field [`src/core/extension-status.ts`]
986
+ - `buildPiUsereqStatusText(...)`: compose the single-line footer payload with consolidated elapsed semantics and sound status fields [`src/core/extension-status.ts`]
946
987
  - `formatStatusField(...)`: render one colored text field [`src/core/extension-status.ts`]
947
988
  - `formatRenderedStatusField(...)`: render one pre-styled field [`src/core/extension-status.ts`]
948
- - `formatContextUsageBar(...)`: render the 10-cell context bar or threshold-specific overlay [`src/core/extension-status.ts`]
949
- - `resolveContextUsageOverlay(...)`: choose `◀ CLEAR ▶ ` or ` ◀ FULL ▶ ` overlay states with CLI-supported theme tokens [`src/core/extension-status.ts`]
950
- - `formatContextUsageOverlay(...)`: paint the fixed-width overlay with preserved bar background [`src/core/extension-status.ts`]
989
+ - `formatContextUsageBar(...)`: render the icon-based context gauge [`src/core/extension-status.ts`]
990
+ - `resolveContextUsageIconText(...)`: map normalized context usage to the fixed-width gauge icon [`src/core/extension-status.ts`]
951
991
  - `formatElapsedStatusValue(...)`: compose `⏱︎`, `⚑`, and `⌛︎` timer segments [`src/core/extension-status.ts`]
952
992
  - `formatCompletedStatusDuration(...)`: render completed timers or the unset placeholder [`src/core/extension-status.ts`]
953
993
  - `formatStatusDuration(...)`: render `M:SS` durations [`src/core/extension-status.ts`]
954
- - `formatPiNotifyBeepStatus(...)`: serialize enabled beep flags for the footer [`src/core/pi-notify.ts`]
955
- - `configureStaticCheckMenu(...)`: interactive static-check editor [`src/index.ts`]
994
+ - `configureStaticCheckMenu(...)`: interactive guided static-check editor [`src/index.ts`]
956
995
  - `formatStaticCheckLanguagesSummary(...)`: summarize configured checker languages [`src/index.ts`]
957
- - `renderStaticCheckReference(...)`: render static-check reference text [`src/index.ts`]
958
- - `formatStaticCheckLanguagesSummary(...)`: summarize configured checker languages [`src/index.ts`]
959
- - `formatStaticCheckEntry(...)`: format one configured checker entry [`src/index.ts`]
996
+ - `buildStaticCheckMenuChoices(...)`: serialize guided add/remove/reset static-check actions [`src/index.ts`]
997
+ - `buildSupportedStaticCheckLanguageChoices(...)`: serialize supported languages with configured counts [`src/index.ts`]
960
998
  - `getSupportedStaticCheckLanguageSupport(...)`: enumerate supported languages and extensions [`src/core/static-check.ts`]
961
999
  - `getSupportedStaticCheckLanguages(...)`: enumerate canonical supported languages [`src/core/static-check.ts`]
962
- - `buildSupportedStaticCheckLanguageChoices(...)`: serialize supported languages with configured counts [`src/index.ts`]
963
1000
  - `shellSplit(...)`: parse optional parameter input [`src/core/utils.ts`]
964
- - `parseEnableStaticCheck(...)`: parse `LANG=Command,CMD[,PARAM...]` specification [`src/core/static-check.ts`]
965
- - `splitCsvLikeTokens(...)`: split comma-like spec payload with quoting support [`src/core/static-check.ts`]
966
- - `formatStaticCheckModules(...)`: render valid user modules for error paths [`src/core/static-check.ts`]
967
- - `configurePiUsereqToolsMenu(...)`: interactive active-tool editor [`src/index.ts`]
1001
+ - `configurePiUsereqToolsMenu(...)`: interactive active-tool editor without a status-reference action [`src/index.ts`]
968
1002
  - `applyConfiguredPiUsereqTools(...)`: enforce configured active-tool set [`src/index.ts`]
969
1003
  - `getConfiguredEnabledPiUsereqTools(...)`: canonicalize configured enabled tools [`src/index.ts`]
970
1004
  - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
971
1005
  - `getPiUsereqStartupTools(...)`: enumerate configurable tools from runtime inventory [`src/index.ts`]
972
- - `renderPiUsereqToolsReference(...)`: render configurable active-tool reference text [`src/index.ts`]
973
- - `getPiUsereqStartupTools(...)`: enumerate configurable tools from runtime inventory [`src/index.ts`]
974
- - `getConfiguredEnabledPiUsereqTools(...)`: canonicalize configured enabled tools [`src/index.ts`]
975
- - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
976
- - `getPiUsereqToolKind(...)`: classify builtin versus extension tools for UI rendering [`src/index.ts`]
977
1006
  - `setConfiguredPiUsereqTools(...)`: persist selected enabled tools in memory [`src/index.ts`]
978
1007
  - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
979
1008
  - `applyConfiguredPiUsereqTools(...)`: enforce configured active-tool set [`src/index.ts`]
@@ -981,13 +1010,19 @@
981
1010
  - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
982
1011
  - `getPiUsereqStartupTools(...)`: enumerate configurable tools from runtime inventory [`src/index.ts`]
983
1012
  - `buildPiUsereqToolToggleChoices(...)`: serialize per-tool startup-toggle rows [`src/index.ts`]
984
- - `getPiUsereqToolKind(...)`: classify builtin versus extension tools for UI rendering [`src/index.ts`]
985
- - `configurePiNotifyMenu(...)`: interactive pi-notify editor [`src/index.ts`]
986
- - `buildPiNotifyMenuChoices(...)`: serialize notification actions plus the nested Pushover submenu entry for the shared settings menu [`src/index.ts`]
987
- - `togglePiNotifyBeepFlag(...)`: toggle one prompt-end beep flag [`src/index.ts`]
988
- - `configurePiNotifyPushoverMenu(...)`: interactive Pushover editor nested under the notifications menu [`src/index.ts`]
989
- - `buildPiNotifyPushoverMenuChoices(...)`: serialize Pushover global-disable, enable, credential, and priority actions [`src/index.ts`]
990
- - `selectPiNotifyPushoverPriority(...)`: present the `0=Normal` and `1=High Priority` selector [`src/index.ts`]
1013
+ - `configurePiNotifyMenu(...)`: interactive notify, sound, and Pushover editor with dedicated event submenus [`src/index.ts`]
1014
+ - `buildPiNotifyMenuChoices(...)`: serialize command-notify, sound, and Pushover blocks plus shared-event submenu launchers [`src/index.ts`]
1015
+ - `buildPiNotifyEventLauncherChoice(...)`: serialize one event-submenu launcher row with a compact enabled-toggle summary [`src/index.ts`]
1016
+ - `buildPiNotifyPushoverRows(...)`: serialize direct Pushover rows plus the shared event-submenu launcher [`src/index.ts`]
1017
+ - `configurePiNotifyEventMenu(...)`: interactive completed/interrupted/failed event editor for one notification transport [`src/index.ts`]
1018
+ - `buildPiNotifyEventMenuChoices(...)`: serialize shared event rows plus submenu reset/save actions [`src/index.ts`]
1019
+ - `resetPiNotifyEventMenuToDefaults(...)`: restore default event toggles for one notification transport [`src/index.ts`]
1020
+ - `resolvePiNotifyEventLabel(...)`: map one event-toggle key to the human-readable menu label [`src/index.ts`]
1021
+ - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
1022
+ - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
1023
+ - `selectPiNotifySoundLevel(...)`: present the `Enable sound` selector [`src/index.ts`]
1024
+ - `selectPiNotifyPushoverPriority(...)`: present the `Normal|High` priority selector [`src/index.ts`]
1025
+ - `resetPiNotifyConfigToDefaults(...)`: restore notification settings to documented defaults [`src/index.ts`]
991
1026
  - `getDefaultConfig(...)`: restore default config on reset [`src/core/config.ts`]
992
1027
  - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
993
1028
  - `applyConfiguredPiUsereqTools(...)`: re-apply active tools after reset [`src/index.ts`]
@@ -14,6 +14,9 @@ import {
14
14
  getConfigPath,
15
15
  } from "./path-context.js";
16
16
  import {
17
+ DEFAULT_PI_NOTIFY_CMD,
18
+ DEFAULT_PI_NOTIFY_PUSHOVER_TEXT,
19
+ DEFAULT_PI_NOTIFY_PUSHOVER_TITLE,
17
20
  DEFAULT_PI_NOTIFY_SOUND_HIGH_CMD,
18
21
  DEFAULT_PI_NOTIFY_SOUND_LOW_CMD,
19
22
  DEFAULT_PI_NOTIFY_SOUND_MID_CMD,
@@ -23,6 +26,7 @@ import {
23
26
  normalizePiNotifyPushoverPriority,
24
27
  normalizePiNotifyShortcut,
25
28
  normalizePiNotifySoundLevel,
29
+ normalizePiNotifyTemplateValue,
26
30
  } from "./pi-notify.js";
27
31
  import { normalizeEnabledPiUsereqTools } from "./pi-usereq-tools.js";
28
32
  import { makeRelativeIfContainsProject } from "./utils.js";
@@ -47,16 +51,25 @@ export interface UseReqConfig {
47
51
  "src-dir": string[];
48
52
  "static-check": Record<string, StaticCheckEntry[]>;
49
53
  "enabled-tools": string[];
50
- "notify-beep-on-end": boolean;
51
- "notify-beep-on-esc": boolean;
52
- "notify-beep-on-error": boolean;
54
+ "notify-enabled": boolean;
55
+ "notify-on-completed": boolean;
56
+ "notify-on-interrupted": boolean;
57
+ "notify-on-failed": boolean;
53
58
  "notify-sound": "none" | "low" | "mid" | "high";
59
+ "notify-sound-on-completed": boolean;
60
+ "notify-sound-on-interrupted": boolean;
61
+ "notify-sound-on-failed": boolean;
54
62
  "notify-sound-toggle-shortcut": string;
55
- "notify-pushover-global-disable": boolean;
56
- "notify-pushover-on-success": boolean;
63
+ "notify-pushover-enabled": boolean;
64
+ "notify-pushover-on-completed": boolean;
65
+ "notify-pushover-on-interrupted": boolean;
66
+ "notify-pushover-on-failed": boolean;
57
67
  "notify-pushover-user-key": string;
58
68
  "notify-pushover-api-token": string;
59
69
  "notify-pushover-priority": 0 | 1;
70
+ "notify-pushover-title": string;
71
+ "notify-pushover-text": string;
72
+ PI_NOTIFY_CMD: string;
60
73
  PI_NOTIFY_SOUND_LOW_CMD: string;
61
74
  PI_NOTIFY_SOUND_MID_CMD: string;
62
75
  PI_NOTIFY_SOUND_HIGH_CMD: string;
@@ -90,10 +103,10 @@ export function getProjectConfigPath(projectBase: string): string {
90
103
 
91
104
  /**
92
105
  * @brief Builds the default project configuration.
93
- * @details Populates canonical docs/test/source directories, the default startup tool set, default pi-notify fields, and default Pushover settings while excluding runtime-derived path metadata. Time complexity is O(n) in default tool count. No filesystem side effects occur.
106
+ * @details Populates canonical docs/test/source directories, the default startup tool set, default command-notify, sound, and Pushover fields, and excludes runtime-derived path metadata. Time complexity is O(n) in default tool count. No filesystem side effects occur.
94
107
  * @param[in] projectBase {string} Absolute project root path.
95
108
  * @return {UseReqConfig} Fresh default configuration object.
96
- * @satisfies CTN-001, CTN-012, REQ-066, REQ-129, REQ-146, REQ-163
109
+ * @satisfies CTN-001, CTN-012, REQ-066, REQ-146, REQ-163, REQ-174, REQ-178, REQ-184, REQ-185, REQ-196
97
110
  */
98
111
  export function getDefaultConfig(_projectBase: string): UseReqConfig {
99
112
  return {
@@ -102,16 +115,25 @@ export function getDefaultConfig(_projectBase: string): UseReqConfig {
102
115
  "src-dir": [...DEFAULT_SRC_DIRS],
103
116
  "static-check": {},
104
117
  "enabled-tools": normalizeEnabledPiUsereqTools(undefined),
105
- "notify-beep-on-end": true,
106
- "notify-beep-on-esc": true,
107
- "notify-beep-on-error": true,
118
+ "notify-enabled": false,
119
+ "notify-on-completed": true,
120
+ "notify-on-interrupted": false,
121
+ "notify-on-failed": false,
108
122
  "notify-sound": "none",
123
+ "notify-sound-on-completed": true,
124
+ "notify-sound-on-interrupted": false,
125
+ "notify-sound-on-failed": false,
109
126
  "notify-sound-toggle-shortcut": DEFAULT_PI_NOTIFY_SOUND_TOGGLE_SHORTCUT,
110
- "notify-pushover-global-disable": false,
111
- "notify-pushover-on-success": false,
127
+ "notify-pushover-enabled": false,
128
+ "notify-pushover-on-completed": true,
129
+ "notify-pushover-on-interrupted": false,
130
+ "notify-pushover-on-failed": false,
112
131
  "notify-pushover-user-key": "",
113
132
  "notify-pushover-api-token": "",
114
133
  "notify-pushover-priority": 0,
134
+ "notify-pushover-title": DEFAULT_PI_NOTIFY_PUSHOVER_TITLE,
135
+ "notify-pushover-text": DEFAULT_PI_NOTIFY_PUSHOVER_TEXT,
136
+ PI_NOTIFY_CMD: DEFAULT_PI_NOTIFY_CMD,
115
137
  PI_NOTIFY_SOUND_LOW_CMD: DEFAULT_PI_NOTIFY_SOUND_LOW_CMD,
116
138
  PI_NOTIFY_SOUND_MID_CMD: DEFAULT_PI_NOTIFY_SOUND_MID_CMD,
117
139
  PI_NOTIFY_SOUND_HIGH_CMD: DEFAULT_PI_NOTIFY_SOUND_HIGH_CMD,
@@ -120,11 +142,11 @@ export function getDefaultConfig(_projectBase: string): UseReqConfig {
120
142
 
121
143
  /**
122
144
  * @brief Loads and sanitizes the persisted project configuration.
123
- * @details Returns defaults when the config file does not exist. Otherwise parses JSON, validates directory and static-check field shapes, normalizes enabled tool names plus pi-notify and Pushover fields, applies enabled beep defaults for missing flag payloads, and ignores removed or runtime-derived path metadata. Runtime is O(n) in config size. Side effects are limited to filesystem reads.
145
+ * @details Returns defaults when the config file does not exist. Otherwise parses JSON, validates directory and static-check field shapes, normalizes enabled tool names plus notify, sound, and Pushover fields, applies documented per-flag defaults for missing payloads, and ignores removed or runtime-derived path metadata. Runtime is O(n) in config size. Side effects are limited to filesystem reads.
124
146
  * @param[in] projectBase {string} Absolute project root path.
125
147
  * @return {UseReqConfig} Sanitized effective configuration.
126
148
  * @throws {ReqError} Throws with exit code `11` when the config file contains invalid JSON or a non-object payload.
127
- * @satisfies CTN-012, REQ-066, REQ-129, REQ-146, REQ-163
149
+ * @satisfies CTN-012, REQ-066, REQ-146, REQ-163, REQ-174, REQ-178, REQ-184, REQ-185, REQ-196
128
150
  */
129
151
  export function loadConfig(projectBase: string): UseReqConfig {
130
152
  const configPath = getProjectConfigPath(projectBase);
@@ -152,16 +174,31 @@ export function loadConfig(projectBase: string): UseReqConfig {
152
174
  ? (data["static-check"] as Record<string, StaticCheckEntry[]>)
153
175
  : {};
154
176
  const enabledTools = normalizeEnabledPiUsereqTools(data["enabled-tools"]);
155
- const notifyBeepOnEnd = data["notify-beep-on-end"] !== false;
156
- const notifyBeepOnEsc = data["notify-beep-on-esc"] !== false;
157
- const notifyBeepOnError = data["notify-beep-on-error"] !== false;
177
+ const notifyEnabled = data["notify-enabled"] === true;
178
+ const notifyOnCompleted = data["notify-on-completed"] !== false;
179
+ const notifyOnInterrupted = data["notify-on-interrupted"] === true;
180
+ const notifyOnFailed = data["notify-on-failed"] === true;
158
181
  const notifySound = normalizePiNotifySoundLevel(data["notify-sound"]);
182
+ const notifySoundOnCompleted = data["notify-sound-on-completed"] !== false;
183
+ const notifySoundOnInterrupted = data["notify-sound-on-interrupted"] === true;
184
+ const notifySoundOnFailed = data["notify-sound-on-failed"] === true;
159
185
  const notifySoundToggleShortcut = normalizePiNotifyShortcut(data["notify-sound-toggle-shortcut"]);
160
- const pushoverGlobalDisable = data["notify-pushover-global-disable"] === true;
161
- const pushoverOnSuccess = data["notify-pushover-on-success"] === true;
186
+ const pushoverEnabled = data["notify-pushover-enabled"] === true;
187
+ const pushoverOnCompleted = data["notify-pushover-on-completed"] !== false;
188
+ const pushoverOnInterrupted = data["notify-pushover-on-interrupted"] === true;
189
+ const pushoverOnFailed = data["notify-pushover-on-failed"] === true;
162
190
  const pushoverUserKey = normalizePiNotifyPushoverCredential(data["notify-pushover-user-key"]);
163
191
  const pushoverApiToken = normalizePiNotifyPushoverCredential(data["notify-pushover-api-token"]);
164
192
  const pushoverPriority = normalizePiNotifyPushoverPriority(data["notify-pushover-priority"]);
193
+ const pushoverTitle = normalizePiNotifyTemplateValue(
194
+ data["notify-pushover-title"],
195
+ DEFAULT_PI_NOTIFY_PUSHOVER_TITLE,
196
+ );
197
+ const pushoverText = normalizePiNotifyTemplateValue(
198
+ data["notify-pushover-text"],
199
+ DEFAULT_PI_NOTIFY_PUSHOVER_TEXT,
200
+ );
201
+ const notifyCommand = normalizePiNotifyCommand(data.PI_NOTIFY_CMD, DEFAULT_PI_NOTIFY_CMD);
165
202
  const lowSoundCommand = normalizePiNotifyCommand(data.PI_NOTIFY_SOUND_LOW_CMD, DEFAULT_PI_NOTIFY_SOUND_LOW_CMD);
166
203
  const midSoundCommand = normalizePiNotifyCommand(data.PI_NOTIFY_SOUND_MID_CMD, DEFAULT_PI_NOTIFY_SOUND_MID_CMD);
167
204
  const highSoundCommand = normalizePiNotifyCommand(data.PI_NOTIFY_SOUND_HIGH_CMD, DEFAULT_PI_NOTIFY_SOUND_HIGH_CMD);
@@ -172,16 +209,25 @@ export function loadConfig(projectBase: string): UseReqConfig {
172
209
  "src-dir": srcDir,
173
210
  "static-check": staticCheck,
174
211
  "enabled-tools": enabledTools,
175
- "notify-beep-on-end": notifyBeepOnEnd,
176
- "notify-beep-on-esc": notifyBeepOnEsc,
177
- "notify-beep-on-error": notifyBeepOnError,
212
+ "notify-enabled": notifyEnabled,
213
+ "notify-on-completed": notifyOnCompleted,
214
+ "notify-on-interrupted": notifyOnInterrupted,
215
+ "notify-on-failed": notifyOnFailed,
178
216
  "notify-sound": notifySound,
217
+ "notify-sound-on-completed": notifySoundOnCompleted,
218
+ "notify-sound-on-interrupted": notifySoundOnInterrupted,
219
+ "notify-sound-on-failed": notifySoundOnFailed,
179
220
  "notify-sound-toggle-shortcut": notifySoundToggleShortcut,
180
- "notify-pushover-global-disable": pushoverGlobalDisable,
181
- "notify-pushover-on-success": pushoverOnSuccess,
221
+ "notify-pushover-enabled": pushoverEnabled,
222
+ "notify-pushover-on-completed": pushoverOnCompleted,
223
+ "notify-pushover-on-interrupted": pushoverOnInterrupted,
224
+ "notify-pushover-on-failed": pushoverOnFailed,
182
225
  "notify-pushover-user-key": pushoverUserKey,
183
226
  "notify-pushover-api-token": pushoverApiToken,
184
227
  "notify-pushover-priority": pushoverPriority,
228
+ "notify-pushover-title": pushoverTitle,
229
+ "notify-pushover-text": pushoverText,
230
+ PI_NOTIFY_CMD: notifyCommand,
185
231
  PI_NOTIFY_SOUND_LOW_CMD: lowSoundCommand,
186
232
  PI_NOTIFY_SOUND_MID_CMD: midSoundCommand,
187
233
  PI_NOTIFY_SOUND_HIGH_CMD: highSoundCommand,
@@ -211,16 +257,25 @@ function buildPersistedConfig(config: UseReqConfig): UseReqConfig {
211
257
  ]),
212
258
  ),
213
259
  "enabled-tools": [...config["enabled-tools"]],
214
- "notify-beep-on-end": config["notify-beep-on-end"],
215
- "notify-beep-on-esc": config["notify-beep-on-esc"],
216
- "notify-beep-on-error": config["notify-beep-on-error"],
260
+ "notify-enabled": config["notify-enabled"],
261
+ "notify-on-completed": config["notify-on-completed"],
262
+ "notify-on-interrupted": config["notify-on-interrupted"],
263
+ "notify-on-failed": config["notify-on-failed"],
217
264
  "notify-sound": config["notify-sound"],
265
+ "notify-sound-on-completed": config["notify-sound-on-completed"],
266
+ "notify-sound-on-interrupted": config["notify-sound-on-interrupted"],
267
+ "notify-sound-on-failed": config["notify-sound-on-failed"],
218
268
  "notify-sound-toggle-shortcut": config["notify-sound-toggle-shortcut"],
219
- "notify-pushover-global-disable": config["notify-pushover-global-disable"],
220
- "notify-pushover-on-success": config["notify-pushover-on-success"],
269
+ "notify-pushover-enabled": config["notify-pushover-enabled"],
270
+ "notify-pushover-on-completed": config["notify-pushover-on-completed"],
271
+ "notify-pushover-on-interrupted": config["notify-pushover-on-interrupted"],
272
+ "notify-pushover-on-failed": config["notify-pushover-on-failed"],
221
273
  "notify-pushover-user-key": config["notify-pushover-user-key"],
222
274
  "notify-pushover-api-token": config["notify-pushover-api-token"],
223
275
  "notify-pushover-priority": config["notify-pushover-priority"],
276
+ "notify-pushover-title": config["notify-pushover-title"],
277
+ "notify-pushover-text": config["notify-pushover-text"],
278
+ PI_NOTIFY_CMD: config.PI_NOTIFY_CMD,
224
279
  PI_NOTIFY_SOUND_LOW_CMD: config.PI_NOTIFY_SOUND_LOW_CMD,
225
280
  PI_NOTIFY_SOUND_MID_CMD: config.PI_NOTIFY_SOUND_MID_CMD,
226
281
  PI_NOTIFY_SOUND_HIGH_CMD: config.PI_NOTIFY_SOUND_HIGH_CMD,