@protolabsai/proto 0.30.0 → 0.31.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.
- package/cli.js +39 -9
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -155944,7 +155944,7 @@ var init_pipeline = __esm({
|
|
|
155944
155944
|
this.converter = new OpenAIContentConverter(this.contentGeneratorConfig.model, this.contentGeneratorConfig.schemaCompliance, this.contentGeneratorConfig.modalities ?? {});
|
|
155945
155945
|
}
|
|
155946
155946
|
async execute(request3, userPromptId) {
|
|
155947
|
-
const effectiveModel = this.
|
|
155947
|
+
const effectiveModel = this.resolveEffectiveModel(request3);
|
|
155948
155948
|
this.converter.setModel(effectiveModel);
|
|
155949
155949
|
this.converter.setModalities(this.contentGeneratorConfig.modalities ?? {});
|
|
155950
155950
|
return this.executeWithErrorHandling(request3, userPromptId, false, effectiveModel, async (openaiRequest) => {
|
|
@@ -155956,7 +155956,7 @@ var init_pipeline = __esm({
|
|
|
155956
155956
|
});
|
|
155957
155957
|
}
|
|
155958
155958
|
async executeStream(request3, userPromptId) {
|
|
155959
|
-
const effectiveModel = this.
|
|
155959
|
+
const effectiveModel = this.resolveEffectiveModel(request3);
|
|
155960
155960
|
this.converter.setModel(effectiveModel);
|
|
155961
155961
|
this.converter.setModalities(this.contentGeneratorConfig.modalities ?? {});
|
|
155962
155962
|
return this.executeWithErrorHandling(request3, userPromptId, true, effectiveModel, async (openaiRequest, context2) => {
|
|
@@ -156306,6 +156306,22 @@ var init_pipeline = __esm({
|
|
|
156306
156306
|
context2.duration = Date.now() - context2.startTime;
|
|
156307
156307
|
this.config.errorHandler.handle(error40, context2, request3);
|
|
156308
156308
|
}
|
|
156309
|
+
/**
|
|
156310
|
+
* Resolve which model to actually send to the upstream. Defaults to the
|
|
156311
|
+
* configured model. Callers may opt into using `request.model` instead by
|
|
156312
|
+
* setting `request.config.allowModelOverride = true` — the request.model
|
|
156313
|
+
* string is used verbatim and the caller takes responsibility for it being
|
|
156314
|
+
* valid/available on the backend (e.g. recap → "protolabs/fast" alias).
|
|
156315
|
+
*/
|
|
156316
|
+
resolveEffectiveModel(request3) {
|
|
156317
|
+
const configured = this.contentGeneratorConfig.model;
|
|
156318
|
+
const allowOverride = request3.config?.["allowModelOverride"] === true;
|
|
156319
|
+
const requested = request3.model;
|
|
156320
|
+
if (allowOverride && typeof requested === "string" && requested.length > 0) {
|
|
156321
|
+
return requested;
|
|
156322
|
+
}
|
|
156323
|
+
return configured;
|
|
156324
|
+
}
|
|
156309
156325
|
/**
|
|
156310
156326
|
* Create request context with common properties
|
|
156311
156327
|
*/
|
|
@@ -169067,7 +169083,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
169067
169083
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
169068
169084
|
});
|
|
169069
169085
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
169070
|
-
const version2 = "0.
|
|
169086
|
+
const version2 = "0.31.0";
|
|
169071
169087
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
169072
169088
|
const baseHeaders = {
|
|
169073
169089
|
"User-Agent": userAgent2
|
|
@@ -284998,6 +285014,13 @@ var init_followup = __esm({
|
|
|
284998
285014
|
});
|
|
284999
285015
|
|
|
285000
285016
|
// packages/core/dist/src/recap/recapGenerator.js
|
|
285017
|
+
function pickRecapModel(config2) {
|
|
285018
|
+
const available = config2.getModelsConfig().getAllConfiguredModels();
|
|
285019
|
+
if (available.some((m3) => m3.id === PREFERRED_RECAP_MODEL_ID)) {
|
|
285020
|
+
return { model: PREFERRED_RECAP_MODEL_ID, isOverride: true };
|
|
285021
|
+
}
|
|
285022
|
+
return { model: config2.getModel(), isOverride: false };
|
|
285023
|
+
}
|
|
285001
285024
|
async function generateRecap(config2, conversationHistory, abortSignal) {
|
|
285002
285025
|
if (conversationHistory.length === 0)
|
|
285003
285026
|
return null;
|
|
@@ -285007,9 +285030,10 @@ async function generateRecap(config2, conversationHistory, abortSignal) {
|
|
|
285007
285030
|
...recent,
|
|
285008
285031
|
{ role: "user", parts: [{ text: RECAP_PROMPT }] }
|
|
285009
285032
|
];
|
|
285033
|
+
const { model, isOverride } = pickRecapModel(config2);
|
|
285010
285034
|
const generator = config2.getContentGenerator();
|
|
285011
285035
|
const response = await generator.generateContent({
|
|
285012
|
-
model
|
|
285036
|
+
model,
|
|
285013
285037
|
contents,
|
|
285014
285038
|
config: {
|
|
285015
285039
|
abortSignal,
|
|
@@ -285018,7 +285042,11 @@ async function generateRecap(config2, conversationHistory, abortSignal) {
|
|
|
285018
285042
|
// tool-stripping path. Without this, assistant turns containing
|
|
285019
285043
|
// tool_calls — i.e. most of the agent's actual work — are dropped
|
|
285020
285044
|
// before the request leaves, starving the recap of context.
|
|
285021
|
-
tools: []
|
|
285045
|
+
tools: [],
|
|
285046
|
+
// Opt into the model override path in the OpenAI pipeline. Pipeline
|
|
285047
|
+
// ignores request.model by default for safety; for recap we know the
|
|
285048
|
+
// alias resolves on the gateway, so honor it.
|
|
285049
|
+
...isOverride ? { allowModelOverride: true } : {}
|
|
285022
285050
|
}
|
|
285023
285051
|
}, "recap");
|
|
285024
285052
|
const text = response.candidates?.[0]?.content?.parts?.map((p2) => p2.text ?? "").join("").trim();
|
|
@@ -285032,7 +285060,7 @@ async function generateRecap(config2, conversationHistory, abortSignal) {
|
|
|
285032
285060
|
return null;
|
|
285033
285061
|
}
|
|
285034
285062
|
}
|
|
285035
|
-
var debugLogger99, RECENT_MESSAGE_WINDOW, RECAP_PROMPT;
|
|
285063
|
+
var debugLogger99, RECENT_MESSAGE_WINDOW, PREFERRED_RECAP_MODEL_ID, RECAP_PROMPT;
|
|
285036
285064
|
var init_recapGenerator = __esm({
|
|
285037
285065
|
"packages/core/dist/src/recap/recapGenerator.js"() {
|
|
285038
285066
|
"use strict";
|
|
@@ -285040,11 +285068,13 @@ var init_recapGenerator = __esm({
|
|
|
285040
285068
|
init_debugLogger();
|
|
285041
285069
|
debugLogger99 = createDebugLogger("RECAP");
|
|
285042
285070
|
RECENT_MESSAGE_WINDOW = 30;
|
|
285071
|
+
PREFERRED_RECAP_MODEL_ID = "protolabs/fast";
|
|
285043
285072
|
RECAP_PROMPT = `That last agent turn was long. Summarize where we are so the user can pick back up cold.
|
|
285044
285073
|
|
|
285045
285074
|
Write exactly 1-3 short sentences. Lead with the high-level goal \u2014 what they're building or debugging, not implementation details. Then state the concrete current status or next step. No status reports, no commit recaps, no apologies.
|
|
285046
285075
|
|
|
285047
285076
|
Reply with ONLY the recap text \u2014 no headers, no quotes, no preamble.`;
|
|
285077
|
+
__name(pickRecapModel, "pickRecapModel");
|
|
285048
285078
|
__name(generateRecap, "generateRecap");
|
|
285049
285079
|
}
|
|
285050
285080
|
});
|
|
@@ -414963,7 +414993,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
414963
414993
|
// packages/cli/src/utils/version.ts
|
|
414964
414994
|
async function getCliVersion() {
|
|
414965
414995
|
const pkgJson = await getPackageJson();
|
|
414966
|
-
return "0.
|
|
414996
|
+
return "0.31.0";
|
|
414967
414997
|
}
|
|
414968
414998
|
__name(getCliVersion, "getCliVersion");
|
|
414969
414999
|
|
|
@@ -422735,7 +422765,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
422735
422765
|
|
|
422736
422766
|
// packages/cli/src/generated/git-commit.ts
|
|
422737
422767
|
init_esbuild_shims();
|
|
422738
|
-
var GIT_COMMIT_INFO = "
|
|
422768
|
+
var GIT_COMMIT_INFO = "d77ab4b1b";
|
|
422739
422769
|
|
|
422740
422770
|
// packages/cli/src/utils/systemInfo.ts
|
|
422741
422771
|
async function getNpmVersion() {
|
|
@@ -490901,7 +490931,7 @@ var QwenAgent = class {
|
|
|
490901
490931
|
async initialize(args2) {
|
|
490902
490932
|
this.clientCapabilities = args2.clientCapabilities;
|
|
490903
490933
|
const authMethods = buildAuthMethods();
|
|
490904
|
-
const version2 = "0.
|
|
490934
|
+
const version2 = "0.31.0";
|
|
490905
490935
|
return {
|
|
490906
490936
|
protocolVersion: PROTOCOL_VERSION,
|
|
490907
490937
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
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.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.31.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|