@protolabsai/proto 0.50.0 → 0.51.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 +53 -8
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -168684,7 +168684,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
168684
168684
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
168685
168685
|
});
|
|
168686
168686
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
168687
|
-
const version2 = "0.
|
|
168687
|
+
const version2 = "0.51.0";
|
|
168688
168688
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
168689
168689
|
const baseHeaders = {
|
|
168690
168690
|
"User-Agent": userAgent2
|
|
@@ -196940,6 +196940,7 @@ var init_GoalManager = __esm({
|
|
|
196940
196940
|
}
|
|
196941
196941
|
active;
|
|
196942
196942
|
lastAchieved;
|
|
196943
|
+
lastFailed;
|
|
196943
196944
|
/**
|
|
196944
196945
|
* Set a new goal. Replaces any active goal. Returns the created state.
|
|
196945
196946
|
* Throws if the condition is empty or exceeds the length limit.
|
|
@@ -196991,6 +196992,24 @@ var init_GoalManager = __esm({
|
|
|
196991
196992
|
debugLogger39.info(`Goal achieved after ${achieved.turnCount} turns: "${truncate2(achieved.condition, 60)}".`);
|
|
196992
196993
|
return achieved;
|
|
196993
196994
|
}
|
|
196995
|
+
/**
|
|
196996
|
+
* Mark the active goal as abandoned because the condition is impossible, and
|
|
196997
|
+
* move it to `lastFailed`. Records the evaluator's reason so `/goal` can
|
|
196998
|
+
* report why it stopped. Returns the failed record. No-op if no goal active.
|
|
196999
|
+
*/
|
|
197000
|
+
markImpossible(reason) {
|
|
197001
|
+
if (!this.active)
|
|
197002
|
+
return void 0;
|
|
197003
|
+
const failed = {
|
|
197004
|
+
...this.active,
|
|
197005
|
+
lastReason: reason,
|
|
197006
|
+
failedAt: Date.now()
|
|
197007
|
+
};
|
|
197008
|
+
this.lastFailed = failed;
|
|
197009
|
+
this.active = void 0;
|
|
197010
|
+
debugLogger39.info(`Goal abandoned as impossible after ${failed.turnCount} turns: "${truncate2(failed.condition, 60)}" (${truncate2(reason, 80)}).`);
|
|
197011
|
+
return failed;
|
|
197012
|
+
}
|
|
196994
197013
|
/** Record that the agent completed a turn while the goal was active. */
|
|
196995
197014
|
recordTurn() {
|
|
196996
197015
|
if (this.active) {
|
|
@@ -197016,10 +197035,14 @@ var init_GoalManager = __esm({
|
|
|
197016
197035
|
getLastAchievedGoal() {
|
|
197017
197036
|
return this.lastAchieved ? { ...this.lastAchieved } : void 0;
|
|
197018
197037
|
}
|
|
197019
|
-
|
|
197038
|
+
getLastFailedGoal() {
|
|
197039
|
+
return this.lastFailed ? { ...this.lastFailed } : void 0;
|
|
197040
|
+
}
|
|
197041
|
+
/** Reset active, achieved, and failed state. Used on session clear/end. */
|
|
197020
197042
|
reset() {
|
|
197021
197043
|
this.active = void 0;
|
|
197022
197044
|
this.lastAchieved = void 0;
|
|
197045
|
+
this.lastFailed = void 0;
|
|
197023
197046
|
}
|
|
197024
197047
|
};
|
|
197025
197048
|
__name(truncate2, "truncate");
|
|
@@ -197091,7 +197114,8 @@ function parseEvaluatorJson(text) {
|
|
|
197091
197114
|
const parsed = JSON.parse(jsonObj);
|
|
197092
197115
|
const met = parsed.met === true;
|
|
197093
197116
|
const reason = typeof parsed.reason === "string" && parsed.reason.trim().length > 0 ? parsed.reason.trim() : met ? "Condition met." : "No reason provided.";
|
|
197094
|
-
|
|
197117
|
+
const impossible = !met && parsed.impossible === true;
|
|
197118
|
+
return impossible ? { met, reason, impossible: true } : { met, reason };
|
|
197095
197119
|
} catch {
|
|
197096
197120
|
return {
|
|
197097
197121
|
met: false,
|
|
@@ -197159,13 +197183,17 @@ var init_goalEvaluator = __esm({
|
|
|
197159
197183
|
|
|
197160
197184
|
You only see what the assistant has surfaced in the transcript -- tool calls it ran, their outcomes, and the final assistant message. You do not run commands yourself.
|
|
197161
197185
|
|
|
197162
|
-
Respond ONLY with valid JSON matching
|
|
197163
|
-
{"met":
|
|
197186
|
+
Respond ONLY with valid JSON matching one of these shapes:
|
|
197187
|
+
{"met": true, "reason": "one short sentence quoting the satisfying evidence"}
|
|
197188
|
+
{"met": false, "reason": "one short sentence on what is missing or blocking"}
|
|
197189
|
+
{"met": false, "impossible": true, "reason": "one short sentence on why it can never be satisfied"}
|
|
197164
197190
|
|
|
197165
197191
|
Rules:
|
|
197166
197192
|
- Set "met": true only when the condition is clearly demonstrated by the visible evidence (a test output, an exit code, a file count, an empty queue, etc.).
|
|
197167
197193
|
- If the assistant only claims the work is done without showing evidence, set "met": false and ask for the missing evidence in "reason".
|
|
197168
197194
|
- If the condition cannot be verified from what is shown, set "met": false and explain what would prove it in "reason".
|
|
197195
|
+
- Only set "impossible": true when the condition is genuinely unachievable in this session: it is self-contradictory, depends on an unavailable resource or capability, or the assistant has exhausted reasonable approaches and the transcript confirms there is no path forward. The assistant claiming the goal is impossible is evidence, not proof -- independently confirm it rather than deferring to the assistant's self-assessment. Do NOT set it just because progress is slow or evidence is currently missing. When in doubt, return {"met": false} without "impossible".
|
|
197196
|
+
- "impossible" is only meaningful alongside "met": false. Never set it when "met" is true.
|
|
197169
197197
|
- Keep "reason" to one short sentence. It will be shown to the assistant as guidance for the next turn.`;
|
|
197170
197198
|
__name(evaluateGoal, "evaluateGoal");
|
|
197171
197199
|
__name(buildEvaluatorPrompt, "buildEvaluatorPrompt");
|
|
@@ -197801,6 +197829,9 @@ Please address these issues before finishing.`;
|
|
|
197801
197829
|
goalManager.recordEvaluation(evalResult);
|
|
197802
197830
|
if (evalResult.met) {
|
|
197803
197831
|
goalManager.markAchieved();
|
|
197832
|
+
} else if (evalResult.impossible) {
|
|
197833
|
+
goalManager.markImpossible(evalResult.reason);
|
|
197834
|
+
this.config.getDebugLogger().info(`[goal] abandoned as impossible: ${evalResult.reason.slice(0, 120)}`);
|
|
197804
197835
|
} else {
|
|
197805
197836
|
const continueReason = `Goal not yet met. Evaluator: ${evalResult.reason}
|
|
197806
197837
|
|
|
@@ -416576,7 +416607,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
416576
416607
|
// packages/cli/src/utils/version.ts
|
|
416577
416608
|
async function getCliVersion() {
|
|
416578
416609
|
const pkgJson = await getPackageJson();
|
|
416579
|
-
return "0.
|
|
416610
|
+
return "0.51.0";
|
|
416580
416611
|
}
|
|
416581
416612
|
__name(getCliVersion, "getCliVersion");
|
|
416582
416613
|
|
|
@@ -424776,7 +424807,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
424776
424807
|
|
|
424777
424808
|
// packages/cli/src/generated/git-commit.ts
|
|
424778
424809
|
init_esbuild_shims();
|
|
424779
|
-
var GIT_COMMIT_INFO = "
|
|
424810
|
+
var GIT_COMMIT_INFO = "922a31b17";
|
|
424780
424811
|
|
|
424781
424812
|
// packages/cli/src/utils/systemInfo.ts
|
|
424782
424813
|
async function getNpmVersion() {
|
|
@@ -429087,6 +429118,20 @@ function statusText(manager) {
|
|
|
429087
429118
|
return lines.join("\n");
|
|
429088
429119
|
}
|
|
429089
429120
|
const achieved = manager.getLastAchievedGoal();
|
|
429121
|
+
const failed = manager.getLastFailedGoal();
|
|
429122
|
+
const achievedAt = achieved?.achievedAt ?? 0;
|
|
429123
|
+
const failedAt = failed?.failedAt ?? 0;
|
|
429124
|
+
if (failed && failedAt >= achievedAt && failedAt > 0) {
|
|
429125
|
+
const elapsed = formatElapsed(failedAt - failed.startedAt);
|
|
429126
|
+
const lines = [
|
|
429127
|
+
`Last goal abandoned as impossible after ${elapsed} (${failed.turnCount} turn(s), ${failed.tokensSpent} eval tokens):`,
|
|
429128
|
+
` ${failed.condition}`
|
|
429129
|
+
];
|
|
429130
|
+
if (failed.lastReason) {
|
|
429131
|
+
lines.push(`Reason: ${failed.lastReason}`);
|
|
429132
|
+
}
|
|
429133
|
+
return lines.join("\n");
|
|
429134
|
+
}
|
|
429090
429135
|
if (achieved && achieved.achievedAt) {
|
|
429091
429136
|
const elapsed = formatElapsed(achieved.achievedAt - achieved.startedAt);
|
|
429092
429137
|
return [
|
|
@@ -493554,7 +493599,7 @@ var QwenAgent = class {
|
|
|
493554
493599
|
async initialize(args2) {
|
|
493555
493600
|
this.clientCapabilities = args2.clientCapabilities;
|
|
493556
493601
|
const authMethods = buildAuthMethods();
|
|
493557
|
-
const version2 = "0.
|
|
493602
|
+
const version2 = "0.51.0";
|
|
493558
493603
|
return {
|
|
493559
493604
|
protocolVersion: PROTOCOL_VERSION,
|
|
493560
493605
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.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.51.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|