@protolabsai/proto 0.18.1 → 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 +45 -17
  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.1";
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.1";
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 = "ea801e2ee";
419554
+ var GIT_COMMIT_INFO = "71fd6fa59";
419543
419555
 
419544
419556
  // packages/cli/src/utils/systemInfo.ts
419545
419557
  async function getNpmVersion() {
@@ -474750,20 +474762,23 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
474750
474762
  }
474751
474763
  return new GitService(config2.getProjectRoot(), storage);
474752
474764
  }, [config2, storage]);
474753
- const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(
474765
+ const addItemRef = (0, import_react143.useRef)(addItem);
474766
+ addItemRef.current = addItem;
474767
+ const onCompleteFnRef = (0, import_react143.useRef)(void 0);
474768
+ const stableOnComplete = (0, import_react143.useCallback)(
474754
474769
  async (completedToolCallsFromScheduler) => {
474755
474770
  if (completedToolCallsFromScheduler.length > 0) {
474756
- addItem(
474757
- mapToDisplay(
474758
- completedToolCallsFromScheduler
474759
- ),
474771
+ addItemRef.current(
474772
+ mapToDisplay(completedToolCallsFromScheduler),
474760
474773
  Date.now()
474761
474774
  );
474762
- await handleCompletedTools(
474763
- completedToolCallsFromScheduler
474764
- );
474775
+ await onCompleteFnRef.current?.(completedToolCallsFromScheduler);
474765
474776
  }
474766
474777
  },
474778
+ []
474779
+ );
474780
+ const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(
474781
+ stableOnComplete,
474767
474782
  config2,
474768
474783
  getPreferredEditor,
474769
474784
  onEditorClose
@@ -475760,6 +475775,7 @@ ${verifyResult}` });
475760
475775
  settings?.merged?.tools?.verifyCommand
475761
475776
  ]
475762
475777
  );
475778
+ onCompleteFnRef.current = handleCompletedTools;
475763
475779
  (0, import_react143.useEffect)(() => {
475764
475780
  if (!isResponding && pendingCompletedToolsRef.current.length > 0) {
475765
475781
  const queued = pendingCompletedToolsRef.current.splice(0);
@@ -480586,14 +480602,19 @@ import fs126 from "node:fs";
480586
480602
  // packages/cli/src/services/sttClient.ts
480587
480603
  init_esbuild_shims();
480588
480604
  import fs125 from "node:fs";
480589
- async function transcribe(audioPath, endpoint, model = "whisper-1") {
480605
+ async function transcribe(audioPath, endpoint, model = "whisper-1", apiKey) {
480590
480606
  const audioBuffer = fs125.readFileSync(audioPath);
480591
480607
  const blob = new Blob([audioBuffer], { type: "audio/wav" });
480592
480608
  const form = new FormData();
480593
480609
  form.append("file", blob, "audio.wav");
480594
480610
  form.append("model", model);
480611
+ const headers = {};
480612
+ if (apiKey) {
480613
+ headers["Authorization"] = `Bearer ${apiKey}`;
480614
+ }
480595
480615
  const response = await fetch(endpoint, {
480596
480616
  method: "POST",
480617
+ headers,
480597
480618
  body: form
480598
480619
  });
480599
480620
  if (!response.ok) {
@@ -480607,7 +480628,7 @@ async function transcribe(audioPath, endpoint, model = "whisper-1") {
480607
480628
  __name(transcribe, "transcribe");
480608
480629
 
480609
480630
  // packages/cli/src/ui/hooks/useVoice.ts
480610
- function useVoice(sttEndpoint) {
480631
+ function useVoice(sttEndpoint, sttApiKey) {
480611
480632
  const [voiceState, setVoiceState] = (0, import_react163.useState)("idle");
480612
480633
  const [error40, setError] = (0, import_react163.useState)(null);
480613
480634
  const procRef = (0, import_react163.useRef)(null);
@@ -480634,7 +480655,12 @@ function useVoice(sttEndpoint) {
480634
480655
  const audioPath = audioPathRef.current;
480635
480656
  try {
480636
480657
  await stopRecording(procRef.current);
480637
- const text = await transcribe(audioPath, sttEndpoint);
480658
+ const text = await transcribe(
480659
+ audioPath,
480660
+ sttEndpoint,
480661
+ "whisper-1",
480662
+ sttApiKey
480663
+ );
480638
480664
  setVoiceState("idle");
480639
480665
  fs126.unlink(audioPath, () => {
480640
480666
  });
@@ -480645,7 +480671,7 @@ function useVoice(sttEndpoint) {
480645
480671
  setError(e4 instanceof Error ? e4.message : String(e4));
480646
480672
  return "";
480647
480673
  }
480648
- }, [voiceState, sttEndpoint]);
480674
+ }, [voiceState, sttEndpoint, sttApiKey]);
480649
480675
  const reset = (0, import_react163.useCallback)(() => {
480650
480676
  setVoiceState("idle");
480651
480677
  setError(null);
@@ -481143,7 +481169,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
481143
481169
  const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
481144
481170
  const voiceEnabled = settings.merged.voice?.enabled ?? false;
481145
481171
  const sttEndpoint = settings.merged.voice?.sttEndpoint ?? DEFAULT_STT_ENDPOINT;
481146
- 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);
481147
481175
  const {
481148
481176
  streamingState,
481149
481177
  submitQuery,
@@ -486308,7 +486336,7 @@ var QwenAgent = class {
486308
486336
  async initialize(args2) {
486309
486337
  this.clientCapabilities = args2.clientCapabilities;
486310
486338
  const authMethods = buildAuthMethods();
486311
- const version2 = "0.18.1";
486339
+ const version2 = "0.18.3";
486312
486340
  return {
486313
486341
  protocolVersion: PROTOCOL_VERSION,
486314
486342
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protolabsai/proto",
3
- "version": "0.18.1",
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.1"
24
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.3"
25
25
  },
26
26
  "dependencies": {},
27
27
  "optionalDependencies": {