@getpochi/cli 0.5.53 → 0.5.55
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/dist/cli.js +46 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -360080,7 +360080,15 @@ function createGeminiCliModel({
|
|
|
360080
360080
|
async transformParams({ params }) {
|
|
360081
360081
|
return {
|
|
360082
360082
|
...params,
|
|
360083
|
-
maxOutputTokens: 32768
|
|
360083
|
+
maxOutputTokens: 32768,
|
|
360084
|
+
providerOptions: {
|
|
360085
|
+
google: {
|
|
360086
|
+
thinkingConfig: {
|
|
360087
|
+
includeThoughts: true,
|
|
360088
|
+
thinkingBudget: 4096
|
|
360089
|
+
}
|
|
360090
|
+
}
|
|
360091
|
+
}
|
|
360084
360092
|
};
|
|
360085
360093
|
}
|
|
360086
360094
|
}
|
|
@@ -368449,7 +368457,7 @@ var {
|
|
|
368449
368457
|
// package.json
|
|
368450
368458
|
var package_default = {
|
|
368451
368459
|
name: "@getpochi/cli",
|
|
368452
|
-
version: "0.5.
|
|
368460
|
+
version: "0.5.55",
|
|
368453
368461
|
type: "module",
|
|
368454
368462
|
bin: {
|
|
368455
368463
|
pochi: "src/cli.ts"
|
|
@@ -386105,6 +386113,24 @@ async function parseWorkflowFrontmatter2(id3) {
|
|
|
386105
386113
|
return parseWorkflowFrontmatter(content3);
|
|
386106
386114
|
}
|
|
386107
386115
|
|
|
386116
|
+
// src/json-renderer.ts
|
|
386117
|
+
class JsonRenderer {
|
|
386118
|
+
state;
|
|
386119
|
+
pendingMessageId = "";
|
|
386120
|
+
constructor(state) {
|
|
386121
|
+
this.state = state;
|
|
386122
|
+
this.state.signal.messages.subscribe((messages) => {
|
|
386123
|
+
const pendingMessageIndex = messages.findIndex((message) => message.id === this.pendingMessageId);
|
|
386124
|
+
const pendingMessages = messages.slice(pendingMessageIndex);
|
|
386125
|
+
for (const message of pendingMessages) {
|
|
386126
|
+
console.log(JSON.stringify(message));
|
|
386127
|
+
}
|
|
386128
|
+
});
|
|
386129
|
+
}
|
|
386130
|
+
shutdown() {}
|
|
386131
|
+
renderSubTask(_task) {}
|
|
386132
|
+
}
|
|
386133
|
+
|
|
386108
386134
|
// src/lib/shutdown.ts
|
|
386109
386135
|
async function shutdownStoreAndExit(store, exitCode2 = 0) {
|
|
386110
386136
|
await store.shutdownPromise();
|
|
@@ -396528,6 +396554,9 @@ function displayProviderModels(providerId, provider) {
|
|
|
396528
396554
|
}
|
|
396529
396555
|
console.log();
|
|
396530
396556
|
}
|
|
396557
|
+
// src/output-renderer.ts
|
|
396558
|
+
import { Console } from "node:console";
|
|
396559
|
+
|
|
396531
396560
|
// ../../node_modules/unist-util-find-after/lib/index.js
|
|
396532
396561
|
var findAfter = function(parent, index3, test3) {
|
|
396533
396562
|
const is6 = convert(test3);
|
|
@@ -409275,6 +409304,8 @@ var Listr = class {
|
|
|
409275
409304
|
};
|
|
409276
409305
|
|
|
409277
409306
|
// src/output-renderer.ts
|
|
409307
|
+
var console4 = new Console(process.stderr);
|
|
409308
|
+
|
|
409278
409309
|
class OutputRenderer {
|
|
409279
409310
|
state;
|
|
409280
409311
|
renderingSubTask = false;
|
|
@@ -409301,9 +409332,9 @@ class OutputRenderer {
|
|
|
409301
409332
|
this.pendingPartIndex = 0;
|
|
409302
409333
|
const name17 = lastMessage.role === "assistant" ? "Pochi" : "You";
|
|
409303
409334
|
if (messages2.length > 1) {
|
|
409304
|
-
|
|
409335
|
+
console4.log("");
|
|
409305
409336
|
}
|
|
409306
|
-
|
|
409337
|
+
console4.log(source_default.bold(source_default.underline(name17)));
|
|
409307
409338
|
this.nextSpinner();
|
|
409308
409339
|
}
|
|
409309
409340
|
while (true) {
|
|
@@ -412281,6 +412312,9 @@ async function downloadAndInstall(program5, release3) {
|
|
|
412281
412312
|
}
|
|
412282
412313
|
}
|
|
412283
412314
|
|
|
412315
|
+
// src/upgrade/version-check.ts
|
|
412316
|
+
import { Console as Console2 } from "node:console";
|
|
412317
|
+
|
|
412284
412318
|
// src/upgrade/release-fetcher.ts
|
|
412285
412319
|
var GITHUB_REPO = "TabbyML/pochi";
|
|
412286
412320
|
function filterCliReleases(releases) {
|
|
@@ -412303,6 +412337,7 @@ async function fetchLatestCliRelease() {
|
|
|
412303
412337
|
}
|
|
412304
412338
|
|
|
412305
412339
|
// src/upgrade/version-check.ts
|
|
412340
|
+
var console5 = new Console2(process.stderr);
|
|
412306
412341
|
async function returnVersionInfo(options6) {
|
|
412307
412342
|
const { timeoutMs } = options6 ?? {};
|
|
412308
412343
|
const latestReleasePromise = fetchLatestCliRelease();
|
|
@@ -412319,14 +412354,14 @@ async function returnVersionInfo(options6) {
|
|
|
412319
412354
|
};
|
|
412320
412355
|
}
|
|
412321
412356
|
async function checkForUpdates() {
|
|
412322
|
-
const { updateAvailable, currentVersion, latestVersion } = await returnVersionInfo({ timeoutMs:
|
|
412357
|
+
const { updateAvailable, currentVersion, latestVersion } = await returnVersionInfo({ timeoutMs: 500 });
|
|
412323
412358
|
const header = `
|
|
412324
412359
|
${source_default.bold("Pochi")} ${source_default.white(currentVersion)}`;
|
|
412325
412360
|
if (updateAvailable) {
|
|
412326
|
-
|
|
412361
|
+
console5.log(`${header} ${source_default.dim("(update available")} ${source_default.green(latestVersion)}${source_default.dim(")")}`);
|
|
412327
412362
|
const columns = process.stdout.columns || 80;
|
|
412328
412363
|
const width3 = Math.max(Math.min(columns, 100), 20);
|
|
412329
|
-
|
|
412364
|
+
console5.log(source_default.yellow("─".repeat(width3)));
|
|
412330
412365
|
}
|
|
412331
412366
|
}
|
|
412332
412367
|
|
|
@@ -412367,7 +412402,7 @@ var parsePositiveInt = (input2) => {
|
|
|
412367
412402
|
}
|
|
412368
412403
|
return result2;
|
|
412369
412404
|
};
|
|
412370
|
-
var program5 = new Command().name("pochi").description(`${source_default.bold("Pochi")} v${package_default.version} - A powerful CLI tool for AI-driven development.`).optionsGroup("Prompt:").option("-p, --prompt <prompt>", "Create a new task with a given prompt. Input can also be piped. For example: `cat my-prompt.md | pochi`. Workflows can be triggered with `/workflow-name`, like `pochi -p /create-pr`.").optionsGroup("Options:").option("--max-steps <number>", "Set the maximum number of steps for a task. The task will stop if it exceeds this limit.", parsePositiveInt, 24).option("--max-retries <number>", "Set the maximum number of retries for a single step in a task.", parsePositiveInt, 3).optionsGroup("Model:").option("-m, --model <model>", "Specify the model to be used for the task.", "qwen/qwen3-coder").action(async (options6) => {
|
|
412405
|
+
var program5 = new Command().name("pochi").description(`${source_default.bold("Pochi")} v${package_default.version} - A powerful CLI tool for AI-driven development.`).optionsGroup("Prompt:").option("-p, --prompt <prompt>", "Create a new task with a given prompt. Input can also be piped. For example: `cat my-prompt.md | pochi`. Workflows can be triggered with `/workflow-name`, like `pochi -p /create-pr`.").optionsGroup("Options:").option("--stream-json", "Stream the output in JSON format. This is useful for parsing the output in scripts.").option("--max-steps <number>", "Set the maximum number of steps for a task. The task will stop if it exceeds this limit.", parsePositiveInt, 24).option("--max-retries <number>", "Set the maximum number of retries for a single step in a task.", parsePositiveInt, 3).optionsGroup("Model:").option("-m, --model <model>", "Specify the model to be used for the task.", "qwen/qwen3-coder").action(async (options6) => {
|
|
412371
412406
|
const { uid, prompt: prompt3 } = await parseTaskInput(options6, program5);
|
|
412372
412407
|
const store = await createStore3();
|
|
412373
412408
|
const llm = await createLLMConfig(program5, options6);
|
|
@@ -412395,6 +412430,9 @@ var program5 = new Command().name("pochi").description(`${source_default.bold("P
|
|
|
412395
412430
|
mcpHub
|
|
412396
412431
|
});
|
|
412397
412432
|
const renderer = new OutputRenderer(runner.state);
|
|
412433
|
+
if (options6.streamJson) {
|
|
412434
|
+
new JsonRenderer(runner.state);
|
|
412435
|
+
}
|
|
412398
412436
|
await runner.run();
|
|
412399
412437
|
renderer.shutdown();
|
|
412400
412438
|
mcpHub.dispose();
|