@protolabsai/proto 0.18.2 → 0.18.3

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.
Files changed (2) hide show
  1. package/cli.js +33 -9
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -148519,6 +148519,8 @@ var init_tokenLimits = __esm({
148519
148519
  // -------------------
148520
148520
  // MiniMax
148521
148521
  // -------------------
148522
+ [/^minimax-m2\.7/i, LIMITS["200k"]],
148523
+ // MiniMax-M2.7: 200K
148522
148524
  [/^minimax-m2\.5/i, LIMITS["192k"]],
148523
148525
  // MiniMax-M2.5: 196,608
148524
148526
  [/^minimax-/i, LIMITS["200k"]],
@@ -148567,6 +148569,7 @@ var init_tokenLimits = __esm({
148567
148569
  [/^glm-5/, LIMITS["16k"]],
148568
148570
  [/^glm-4\.7/, LIMITS["16k"]],
148569
148571
  // MiniMax
148572
+ [/^minimax-m2\.7/i, LIMITS["64k"]],
148570
148573
  [/^minimax-m2\.5/i, LIMITS["64k"]],
148571
148574
  // Kimi
148572
148575
  [/^kimi-k2\.5/, LIMITS["32k"]]
@@ -170762,7 +170765,7 @@ __export(geminiContentGenerator_exports, {
170762
170765
  createGeminiContentGenerator: () => createGeminiContentGenerator
170763
170766
  });
170764
170767
  function createGeminiContentGenerator(config2, gcConfig) {
170765
- const version2 = "0.18.2";
170768
+ const version2 = "0.18.3";
170766
170769
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
170767
170770
  const baseHeaders = {
170768
170771
  "User-Agent": userAgent2
@@ -402591,6 +402594,15 @@ var SETTINGS_SCHEMA = {
402591
402594
  default: "http://localhost:8000/v1/audio/transcriptions",
402592
402595
  description: "OpenAI-compatible speech-to-text endpoint URL (e.g. a local faster-whisper server).",
402593
402596
  showInDialog: true
402597
+ },
402598
+ sttEnvKey: {
402599
+ type: "string",
402600
+ label: "STT API Key Env Var",
402601
+ category: "Voice",
402602
+ requiresRestart: false,
402603
+ default: void 0,
402604
+ description: "Name of the environment variable holding the API key for the STT endpoint (e.g. GATEWAY_API_KEY).",
402605
+ showInDialog: true
402594
402606
  }
402595
402607
  }
402596
402608
  },
@@ -411767,7 +411779,7 @@ __name(getPackageJson, "getPackageJson");
411767
411779
  // packages/cli/src/utils/version.ts
411768
411780
  async function getCliVersion() {
411769
411781
  const pkgJson = await getPackageJson();
411770
- return "0.18.2";
411782
+ return "0.18.3";
411771
411783
  }
411772
411784
  __name(getCliVersion, "getCliVersion");
411773
411785
 
@@ -419539,7 +419551,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
419539
419551
 
419540
419552
  // packages/cli/src/generated/git-commit.ts
419541
419553
  init_esbuild_shims();
419542
- var GIT_COMMIT_INFO = "df5bba11d";
419554
+ var GIT_COMMIT_INFO = "71fd6fa59";
419543
419555
 
419544
419556
  // packages/cli/src/utils/systemInfo.ts
419545
419557
  async function getNpmVersion() {
@@ -480590,14 +480602,19 @@ import fs126 from "node:fs";
480590
480602
  // packages/cli/src/services/sttClient.ts
480591
480603
  init_esbuild_shims();
480592
480604
  import fs125 from "node:fs";
480593
- async function transcribe(audioPath, endpoint, model = "whisper-1") {
480605
+ async function transcribe(audioPath, endpoint, model = "whisper-1", apiKey) {
480594
480606
  const audioBuffer = fs125.readFileSync(audioPath);
480595
480607
  const blob = new Blob([audioBuffer], { type: "audio/wav" });
480596
480608
  const form = new FormData();
480597
480609
  form.append("file", blob, "audio.wav");
480598
480610
  form.append("model", model);
480611
+ const headers = {};
480612
+ if (apiKey) {
480613
+ headers["Authorization"] = `Bearer ${apiKey}`;
480614
+ }
480599
480615
  const response = await fetch(endpoint, {
480600
480616
  method: "POST",
480617
+ headers,
480601
480618
  body: form
480602
480619
  });
480603
480620
  if (!response.ok) {
@@ -480611,7 +480628,7 @@ async function transcribe(audioPath, endpoint, model = "whisper-1") {
480611
480628
  __name(transcribe, "transcribe");
480612
480629
 
480613
480630
  // packages/cli/src/ui/hooks/useVoice.ts
480614
- function useVoice(sttEndpoint) {
480631
+ function useVoice(sttEndpoint, sttApiKey) {
480615
480632
  const [voiceState, setVoiceState] = (0, import_react163.useState)("idle");
480616
480633
  const [error40, setError] = (0, import_react163.useState)(null);
480617
480634
  const procRef = (0, import_react163.useRef)(null);
@@ -480638,7 +480655,12 @@ function useVoice(sttEndpoint) {
480638
480655
  const audioPath = audioPathRef.current;
480639
480656
  try {
480640
480657
  await stopRecording(procRef.current);
480641
- const text = await transcribe(audioPath, sttEndpoint);
480658
+ const text = await transcribe(
480659
+ audioPath,
480660
+ sttEndpoint,
480661
+ "whisper-1",
480662
+ sttApiKey
480663
+ );
480642
480664
  setVoiceState("idle");
480643
480665
  fs126.unlink(audioPath, () => {
480644
480666
  });
@@ -480649,7 +480671,7 @@ function useVoice(sttEndpoint) {
480649
480671
  setError(e4 instanceof Error ? e4.message : String(e4));
480650
480672
  return "";
480651
480673
  }
480652
- }, [voiceState, sttEndpoint]);
480674
+ }, [voiceState, sttEndpoint, sttApiKey]);
480653
480675
  const reset = (0, import_react163.useCallback)(() => {
480654
480676
  setVoiceState("idle");
480655
480677
  setError(null);
@@ -481147,7 +481169,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
481147
481169
  const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
481148
481170
  const voiceEnabled = settings.merged.voice?.enabled ?? false;
481149
481171
  const sttEndpoint = settings.merged.voice?.sttEndpoint ?? DEFAULT_STT_ENDPOINT;
481150
- const voice = useVoice(sttEndpoint);
481172
+ const sttEnvKey = settings.merged.voice?.sttEnvKey;
481173
+ const sttApiKey = sttEnvKey ? process47.env[sttEnvKey] : void 0;
481174
+ const voice = useVoice(sttEndpoint, sttApiKey);
481151
481175
  const {
481152
481176
  streamingState,
481153
481177
  submitQuery,
@@ -486312,7 +486336,7 @@ var QwenAgent = class {
486312
486336
  async initialize(args2) {
486313
486337
  this.clientCapabilities = args2.clientCapabilities;
486314
486338
  const authMethods = buildAuthMethods();
486315
- const version2 = "0.18.2";
486339
+ const version2 = "0.18.3";
486316
486340
  return {
486317
486341
  protocolVersion: PROTOCOL_VERSION,
486318
486342
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protolabsai/proto",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "proto - AI-powered coding agent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "bundled"
22
22
  ],
23
23
  "config": {
24
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.2"
24
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.3"
25
25
  },
26
26
  "dependencies": {},
27
27
  "optionalDependencies": {