@juicesharp/rpiv-voice 2.13.8 → 2.13.9

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to `@juicesharp/rpiv-voice` are documented here.
5
5
  Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
  Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.13.9] - 2026-10-17
9
+
10
+ ### Changed
11
+
12
+ - Faster extension startup: relative imports now name the published `.ts` files instead of nonexistent `.js` targets, so Pi's loader (jiti) no longer runs fallback resolution for each of them on every launch. Runtime behavior is unchanged. Thanks @ry4nyu for #306, and @szastupov for #304.
13
+
8
14
  ## [2.13.8] - 2026-10-12
9
15
 
10
16
  ## [2.13.7] - 2026-10-12
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from "node:events";
2
- import { appendDiagnosticLog } from "./error-log.js";
3
- import { computeRmsInt16 } from "./pcm.js";
4
- import { Int16LinearResampler } from "./resampler.js";
2
+ import { appendDiagnosticLog } from "./error-log.ts";
3
+ import { computeRmsInt16 } from "./pcm.ts";
4
+ import { Int16LinearResampler } from "./resampler.ts";
5
5
 
6
6
  // Public 16 kHz target — Whisper's input rate, also the only rate the
7
7
  // downstream pipeline understands (segment caps, RMS thresholds, etc. are
@@ -20,7 +20,7 @@ import { join } from "node:path";
20
20
  import { Readable, Transform } from "node:stream";
21
21
  import { pipeline } from "node:stream/promises";
22
22
  import { promisify } from "node:util";
23
- import { t } from "../state/i18n-bridge.js";
23
+ import { t } from "../state/i18n-bridge.ts";
24
24
 
25
25
  const execFileAsync = promisify(execFile);
26
26
 
@@ -33,7 +33,7 @@
33
33
  */
34
34
 
35
35
  import type { Config } from "sherpa-onnx-node";
36
- import { DEFAULT_NUM_THREADS } from "../config/voice-config.js";
36
+ import { DEFAULT_NUM_THREADS } from "../config/voice-config.ts";
37
37
 
38
38
  // ── Whisper fixed input contract ─────────────────────────────────────────────
39
39
  // 16 kHz mono PCM. featureDim 80 matches the model's mel-spectrogram output.
@@ -1,11 +1,11 @@
1
- import { appendDiagnosticLog, appendErrorLog } from "../audio/error-log.js";
2
- import { isHallucination } from "../audio/hallucination-filter.js";
3
- import type { DecibriLike } from "../audio/mic-source.js";
4
- import { TARGET_SAMPLE_RATE } from "../audio/mic-source.js";
5
- import { bufferToFloat32, computeRmsFloat32, computeRmsInt16, samplesInInt16Chunk } from "../audio/pcm.js";
6
- import type { SttEngine } from "../audio/stt-engine.js";
7
- import { isHallucinationFilterEnabled } from "../config/voice-config.js";
8
- import type { VoiceSession } from "../state/voice-session.js";
1
+ import { appendDiagnosticLog, appendErrorLog } from "../audio/error-log.ts";
2
+ import { isHallucination } from "../audio/hallucination-filter.ts";
3
+ import type { DecibriLike } from "../audio/mic-source.ts";
4
+ import { TARGET_SAMPLE_RATE } from "../audio/mic-source.ts";
5
+ import { bufferToFloat32, computeRmsFloat32, computeRmsInt16, samplesInInt16Chunk } from "../audio/pcm.ts";
6
+ import type { SttEngine } from "../audio/stt-engine.ts";
7
+ import { isHallucinationFilterEnabled } from "../config/voice-config.ts";
8
+ import type { VoiceSession } from "../state/voice-session.ts";
9
9
 
10
10
  // 12 s soft cap: Whisper trains on 30 s windows and degrades on very short
11
11
  // inputs; 5 s force-flushes routinely bisect a clause mid-word. 12 s is the
@@ -4,7 +4,7 @@ import {
4
4
  SPLASH_FRAMES,
5
5
  type SplashPhase,
6
6
  SplashView,
7
- } from "../view/components/splash-view.js";
7
+ } from "../view/components/splash-view.ts";
8
8
 
9
9
  export interface SplashController {
10
10
  setPhase(phase: SplashPhase): void;
@@ -1,6 +1,6 @@
1
1
  import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
- import { appendErrorLog } from "../audio/error-log.js";
3
- import { createMic, type DecibriLike } from "../audio/mic-source.js";
2
+ import { appendErrorLog } from "../audio/error-log.ts";
3
+ import { createMic, type DecibriLike } from "../audio/mic-source.ts";
4
4
  import {
5
5
  assertModelIntact,
6
6
  ensureModelDownloaded,
@@ -8,21 +8,21 @@ import {
8
8
  isModelDownloaded,
9
9
  ModelInstallError,
10
10
  removeModelInstall,
11
- } from "../audio/model-download.js";
12
- import { createSttEngine, type SttEngine } from "../audio/stt-engine.js";
11
+ } from "../audio/model-download.ts";
12
+ import { createSttEngine, type SttEngine } from "../audio/stt-engine.ts";
13
13
  import {
14
14
  isHallucinationFilterEnabled,
15
15
  loadVoiceConfig,
16
16
  resolveNumThreads,
17
17
  type VoiceConfig,
18
- } from "../config/voice-config.js";
19
- import { getActiveLocale, t } from "../state/i18n-bridge.js";
20
- import type { VoiceResult } from "../state/state-reducer.js";
21
- import { VoiceSession } from "../state/voice-session.js";
22
- import type { SplashPhase } from "../view/components/splash-view.js";
23
- import { STATUS_BAR_PULSE_FRAME_INTERVAL_MS } from "../view/components/status-bar-view.js";
24
- import { type PipelineHandle, startDictationPipeline } from "./pipeline-runner.js";
25
- import { runWithSplash } from "./splash-runner.js";
18
+ } from "../config/voice-config.ts";
19
+ import { getActiveLocale, t } from "../state/i18n-bridge.ts";
20
+ import type { VoiceResult } from "../state/state-reducer.ts";
21
+ import { VoiceSession } from "../state/voice-session.ts";
22
+ import type { SplashPhase } from "../view/components/splash-view.ts";
23
+ import { STATUS_BAR_PULSE_FRAME_INTERVAL_MS } from "../view/components/status-bar-view.ts";
24
+ import { type PipelineHandle, startDictationPipeline } from "./pipeline-runner.ts";
25
+ import { runWithSplash } from "./splash-runner.ts";
26
26
 
27
27
  export const VOICE_COMMAND_NAME = "voice";
28
28
 
package/index.ts CHANGED
@@ -16,8 +16,8 @@
16
16
  */
17
17
 
18
18
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
19
- import { registerVoiceCommand } from "./command/voice-command.js";
20
- import { I18N_NAMESPACE } from "./state/i18n-bridge.js";
19
+ import { registerVoiceCommand } from "./command/voice-command.ts";
20
+ import { I18N_NAMESPACE } from "./state/i18n-bridge.ts";
21
21
 
22
22
  type I18nLoader = {
23
23
  registerLocalesFromDir: (namespace: string, packageUrl: string, options?: { label?: string }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-voice",
3
- "version": "2.13.8",
3
+ "version": "2.13.9",
4
4
  "private": false,
5
5
  "description": "Pi extension. Voice dictation via /voice — local on-device STT with sherpa-onnx Whisper (base multilingual int8), microphone capture via decibri.",
6
6
  "keywords": [
@@ -83,7 +83,7 @@
83
83
  ]
84
84
  },
85
85
  "dependencies": {
86
- "@juicesharp/rpiv-config": "^2.13.8",
86
+ "@juicesharp/rpiv-config": "^2.13.9",
87
87
  "sherpa-onnx-node": "^1.13.0",
88
88
  "decibri": "^3.4.0"
89
89
  },
@@ -1,5 +1,5 @@
1
1
  import { Key, matchesKey } from "@earendil-works/pi-tui";
2
- import type { VoiceRuntime, VoiceState } from "./state.js";
2
+ import type { VoiceRuntime, VoiceState } from "./state.ts";
3
3
 
4
4
  const KEYBIND_CONFIRM = "tui.select.confirm";
5
5
  // Mirrors the rpiv-ask-user-question peer pattern — cancel goes through the
@@ -1,4 +1,4 @@
1
- import type { ScreenKind } from "./state.js";
1
+ import type { ScreenKind } from "./state.ts";
2
2
 
3
3
  export type FooterHintKey =
4
4
  | "enter_paste"
@@ -1,5 +1,5 @@
1
- import type { ActiveView } from "../../view/stateful-view.js";
2
- import type { ScreenKind, VoiceState } from "../state.js";
1
+ import type { ActiveView } from "../../view/stateful-view.ts";
2
+ import type { ScreenKind, VoiceState } from "../state.ts";
3
3
 
4
4
  export interface BindingContext {
5
5
  readonly activeView: ActiveView;
@@ -1,5 +1,5 @@
1
- import type { ActiveView } from "../../view/stateful-view.js";
2
- import type { VoiceState } from "../state.js";
1
+ import type { ActiveView } from "../../view/stateful-view.ts";
2
+ import type { VoiceState } from "../state.ts";
3
3
 
4
4
  export function selectActiveView(state: VoiceState): ActiveView {
5
5
  return state.currentScreen === "settings" ? "settings" : "dictation";
@@ -1,11 +1,11 @@
1
- import type { EqualizerViewProps } from "../../view/components/equalizer-view.js";
2
- import type { SettingsFieldViewProps } from "../../view/components/settings-field-view.js";
3
- import type { StatusBarViewProps } from "../../view/components/status-bar-view.js";
4
- import type { TranscriptViewProps } from "../../view/components/transcript-view.js";
5
- import { getActiveLocale, t } from "../i18n-bridge.js";
6
- import type { FooterHintKey } from "../screen-intent.js";
7
- import { SCREEN_META } from "../screen-intent.js";
8
- import type { GlobalSelector } from "./contract.js";
1
+ import type { EqualizerViewProps } from "../../view/components/equalizer-view.ts";
2
+ import type { SettingsFieldViewProps } from "../../view/components/settings-field-view.ts";
3
+ import type { StatusBarViewProps } from "../../view/components/status-bar-view.ts";
4
+ import type { TranscriptViewProps } from "../../view/components/transcript-view.ts";
5
+ import { getActiveLocale, t } from "../i18n-bridge.ts";
6
+ import type { FooterHintKey } from "../screen-intent.ts";
7
+ import { SCREEN_META } from "../screen-intent.ts";
8
+ import type { GlobalSelector } from "./contract.ts";
9
9
 
10
10
  // Locales the bundled Whisper base multilingual model recognizes well. Mirror
11
11
  // of WHISPER_SUPPORTED_LANGUAGES in voice-command.ts — duplicated rather than
@@ -1,8 +1,8 @@
1
- import { isEqualizerEnabled, isHallucinationFilterEnabled, type VoiceConfig } from "../config/voice-config.js";
2
- import { t } from "./i18n-bridge.js";
3
- import type { VoiceAction } from "./key-router.js";
4
- import { SETTINGS_FIELD_ORDER, type SettingsDraft, type SettingsFieldKey, type VoiceState } from "./state.js";
5
- import { STATUS_META } from "./status-intent.js";
1
+ import { isEqualizerEnabled, isHallucinationFilterEnabled, type VoiceConfig } from "../config/voice-config.ts";
2
+ import { t } from "./i18n-bridge.ts";
3
+ import type { VoiceAction } from "./key-router.ts";
4
+ import { SETTINGS_FIELD_ORDER, type SettingsDraft, type SettingsFieldKey, type VoiceState } from "./state.ts";
5
+ import { STATUS_META } from "./status-intent.ts";
6
6
 
7
7
  export interface ApplyContext {
8
8
  /**
package/state/state.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DEFAULT_NUM_THREADS } from "../config/voice-config.js";
1
+ import { DEFAULT_NUM_THREADS } from "../config/voice-config.ts";
2
2
 
3
3
  export type RecordingStatus = "recording" | "paused";
4
4
  export type ScreenKind = "dictation" | "settings";
@@ -1,4 +1,4 @@
1
- import type { RecordingStatus } from "./state.js";
1
+ import type { RecordingStatus } from "./state.ts";
2
2
 
3
3
  export interface StatusIntentMeta {
4
4
  glyph: string;
@@ -1,18 +1,18 @@
1
1
  import { DynamicBorder, type Theme } from "@earendil-works/pi-coding-agent";
2
2
  import { getKeybindings } from "@earendil-works/pi-tui";
3
- import type { VoiceConfig } from "../config/voice-config.js";
4
- import { loadVoiceConfig, resolveNumThreads, saveVoiceConfig } from "../config/voice-config.js";
5
- import { globalBinding } from "../view/component-binding.js";
6
- import { EqualizerView } from "../view/components/equalizer-view.js";
7
- import { SettingsFieldView } from "../view/components/settings-field-view.js";
8
- import { SettingsFormView } from "../view/components/settings-form-view.js";
9
- import { StatusBarView } from "../view/components/status-bar-view.js";
10
- import { TranscriptView } from "../view/components/transcript-view.js";
11
- import { OverlayView } from "../view/overlay-view.js";
12
- import { VoiceOverlayPropsAdapter } from "../view/props-adapter.js";
13
- import { DictationScreenStrategy, SettingsScreenStrategy } from "../view/screen-content-strategy.js";
14
- import { t } from "./i18n-bridge.js";
15
- import { routeKey, type VoiceAction } from "./key-router.js";
3
+ import type { VoiceConfig } from "../config/voice-config.ts";
4
+ import { loadVoiceConfig, resolveNumThreads, saveVoiceConfig } from "../config/voice-config.ts";
5
+ import { globalBinding } from "../view/component-binding.ts";
6
+ import { EqualizerView } from "../view/components/equalizer-view.ts";
7
+ import { SettingsFieldView } from "../view/components/settings-field-view.ts";
8
+ import { SettingsFormView } from "../view/components/settings-form-view.ts";
9
+ import { StatusBarView } from "../view/components/status-bar-view.ts";
10
+ import { TranscriptView } from "../view/components/transcript-view.ts";
11
+ import { OverlayView } from "../view/overlay-view.ts";
12
+ import { VoiceOverlayPropsAdapter } from "../view/props-adapter.ts";
13
+ import { DictationScreenStrategy, SettingsScreenStrategy } from "../view/screen-content-strategy.ts";
14
+ import { t } from "./i18n-bridge.ts";
15
+ import { routeKey, type VoiceAction } from "./key-router.ts";
16
16
  import {
17
17
  selectEqualizerFieldProps,
18
18
  selectEqualizerProps,
@@ -22,9 +22,9 @@ import {
22
22
  selectNumThreadsReadonlyFieldProps,
23
23
  selectStatusBarProps,
24
24
  selectTranscriptProps,
25
- } from "./selectors/projections.js";
26
- import { initialVoiceState, type VoiceState } from "./state.js";
27
- import { type ApplyContext, draftFromConfig, type Effect, reduce, type VoiceResult } from "./state-reducer.js";
25
+ } from "./selectors/projections.ts";
26
+ import { initialVoiceState, type VoiceState } from "./state.ts";
27
+ import { type ApplyContext, draftFromConfig, type Effect, reduce, type VoiceResult } from "./state-reducer.ts";
28
28
 
29
29
  export interface VoiceSessionDeps {
30
30
  pasteToEditor: (text: string) => void;
@@ -1,6 +1,6 @@
1
- import type { BindingContext, GlobalSelector } from "../state/selectors/contract.js";
2
- import type { VoiceState } from "../state/state.js";
3
- import type { StatefulView } from "./stateful-view.js";
1
+ import type { BindingContext, GlobalSelector } from "../state/selectors/contract.ts";
2
+ import type { VoiceState } from "../state/state.ts";
3
+ import type { StatefulView } from "./stateful-view.ts";
4
4
 
5
5
  export interface ComponentBinding<P> {
6
6
  readonly component: StatefulView<P>;
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
- import type { RecordingStatus } from "../../state/state.js";
3
- import type { StatefulView } from "../stateful-view.js";
2
+ import type { RecordingStatus } from "../../state/state.ts";
3
+ import type { StatefulView } from "../stateful-view.ts";
4
4
 
5
5
  const COLOR_ACCENT = "accent";
6
6
  const COLOR_DIM = "dim";
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
2
  import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
3
- import type { StatefulView } from "../stateful-view.js";
3
+ import type { StatefulView } from "../stateful-view.ts";
4
4
 
5
5
  // Rows start at col 0 so the settings surface aligns with dictation
6
6
  // (transcript + status bar are also flush-left). The pointer occupies a fixed
@@ -1,5 +1,5 @@
1
- import type { StatefulView } from "../stateful-view.js";
2
- import type { SettingsFieldView } from "./settings-field-view.js";
1
+ import type { StatefulView } from "../stateful-view.ts";
2
+ import type { SettingsFieldView } from "./settings-field-view.ts";
3
3
 
4
4
  // The settings screen is a flat stack of rows: a read-only mic line and a
5
5
  // hallucination-filter toggle. No tabs — too few rows to justify chrome.
@@ -1,7 +1,7 @@
1
1
  import { DynamicBorder, type Theme } from "@earendil-works/pi-coding-agent";
2
2
  import { truncateToWidth } from "@earendil-works/pi-tui";
3
- import { t } from "../../state/i18n-bridge.js";
4
- import type { StatefulView } from "../stateful-view.js";
3
+ import { t } from "../../state/i18n-bridge.ts";
4
+ import type { StatefulView } from "../stateful-view.ts";
5
5
 
6
6
  export const SPLASH_FRAMES = ["⠴", "⠦", "⠖", "⠲"] as const;
7
7
  export const SPLASH_FRAME_INTERVAL_MS = 160;
@@ -1,8 +1,8 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
2
  import { truncateToWidth } from "@earendil-works/pi-tui";
3
- import type { RecordingStatus } from "../../state/state.js";
4
- import { STATUS_META } from "../../state/status-intent.js";
5
- import type { StatefulView } from "../stateful-view.js";
3
+ import type { RecordingStatus } from "../../state/state.ts";
4
+ import { STATUS_META } from "../../state/status-intent.ts";
5
+ import type { StatefulView } from "../stateful-view.ts";
6
6
 
7
7
  const GAP = " ";
8
8
  const TRUNCATE_ELLIPSIS = "…";
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
2
  import { wrapTextWithAnsi } from "@earendil-works/pi-tui";
3
- import type { StatefulView } from "../stateful-view.js";
3
+ import type { StatefulView } from "../stateful-view.ts";
4
4
 
5
5
  const COLOR_MUTED = "muted";
6
6
  const COLOR_DIM = "dim";
@@ -1,8 +1,8 @@
1
1
  import { Container } from "@earendil-works/pi-tui";
2
- import { clipToTerminalHeight } from "../state/selectors/derivations.js";
3
- import type { VoiceState } from "../state/state.js";
4
- import type { ScreenContentStrategy } from "./screen-content-strategy.js";
5
- import type { StatefulView } from "./stateful-view.js";
2
+ import { clipToTerminalHeight } from "../state/selectors/derivations.ts";
3
+ import type { VoiceState } from "../state/state.ts";
4
+ import type { ScreenContentStrategy } from "./screen-content-strategy.ts";
5
+ import type { StatefulView } from "./stateful-view.ts";
6
6
 
7
7
  const FALLBACK_TERMINAL_ROWS = 24;
8
8
 
@@ -1,7 +1,7 @@
1
- import type { BindingContext } from "../state/selectors/contract.js";
2
- import { selectActiveView } from "../state/selectors/focus.js";
3
- import type { VoiceState } from "../state/state.js";
4
- import type { BoundGlobalBinding } from "./component-binding.js";
1
+ import type { BindingContext } from "../state/selectors/contract.ts";
2
+ import { selectActiveView } from "../state/selectors/focus.ts";
3
+ import type { VoiceState } from "../state/state.ts";
4
+ import type { BoundGlobalBinding } from "./component-binding.ts";
5
5
 
6
6
  export interface VoiceOverlayPropsAdapterConfig {
7
7
  tui: { requestRender(): void };
@@ -1,9 +1,9 @@
1
1
  import type { Component } from "@earendil-works/pi-tui";
2
- import type { EqualizerViewProps } from "./components/equalizer-view.js";
3
- import type { SettingsFormViewProps } from "./components/settings-form-view.js";
4
- import type { StatusBarViewProps } from "./components/status-bar-view.js";
5
- import type { TranscriptViewProps } from "./components/transcript-view.js";
6
- import type { StatefulView } from "./stateful-view.js";
2
+ import type { EqualizerViewProps } from "./components/equalizer-view.ts";
3
+ import type { SettingsFormViewProps } from "./components/settings-form-view.ts";
4
+ import type { StatusBarViewProps } from "./components/status-bar-view.ts";
5
+ import type { TranscriptViewProps } from "./components/transcript-view.ts";
6
+ import type { StatefulView } from "./stateful-view.ts";
7
7
 
8
8
  /**
9
9
  * Per-screen layout. Returns the ordered list of pi-tui Components that the