@getpochi/cli 0.5.51 → 0.5.53
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 +23 -17
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -354504,8 +354504,8 @@ var GoogleVertexModel = v4_default.union([
|
|
|
354504
354504
|
location: v4_default.string()
|
|
354505
354505
|
}),
|
|
354506
354506
|
v4_default.object({
|
|
354507
|
-
issueUrl: v4_default.string().default(process.env.POCHI_VERTEX_ISSUE_URL ?? ""),
|
|
354508
|
-
modelUrl: v4_default.string().default(process.env.POCHI_VERTEX_MODEL_URL ?? "")
|
|
354507
|
+
issueUrl: v4_default.string().optional().default(process.env.POCHI_VERTEX_ISSUE_URL ?? ""),
|
|
354508
|
+
modelUrl: v4_default.string().optional().default(process.env.POCHI_VERTEX_MODEL_URL ?? "")
|
|
354509
354509
|
})
|
|
354510
354510
|
]);
|
|
354511
354511
|
var GoogleVertexTuningModelSettings = BaseModelSettings.extend({
|
|
@@ -368449,7 +368449,7 @@ var {
|
|
|
368449
368449
|
// package.json
|
|
368450
368450
|
var package_default = {
|
|
368451
368451
|
name: "@getpochi/cli",
|
|
368452
|
-
version: "0.5.
|
|
368452
|
+
version: "0.5.53",
|
|
368453
368453
|
type: "module",
|
|
368454
368454
|
bin: {
|
|
368455
368455
|
pochi: "src/cli.ts"
|
|
@@ -386105,6 +386105,12 @@ async function parseWorkflowFrontmatter2(id3) {
|
|
|
386105
386105
|
return parseWorkflowFrontmatter(content3);
|
|
386106
386106
|
}
|
|
386107
386107
|
|
|
386108
|
+
// src/lib/shutdown.ts
|
|
386109
|
+
async function shutdownStoreAndExit(store, exitCode2 = 0) {
|
|
386110
|
+
await store.shutdownPromise();
|
|
386111
|
+
process.exit(exitCode2);
|
|
386112
|
+
}
|
|
386113
|
+
|
|
386108
386114
|
// src/livekit/store.ts
|
|
386109
386115
|
import os9 from "node:os";
|
|
386110
386116
|
import path24 from "node:path";
|
|
@@ -395916,16 +395922,16 @@ var import_node_machine_id = __toESM(require_dist3(), 1);
|
|
|
395916
395922
|
async function createStore3() {
|
|
395917
395923
|
const { jwt: jwt2 = null } = await getPochiCredentials2() || {};
|
|
395918
395924
|
const storeId = await getStoreId(jwt2);
|
|
395919
|
-
const
|
|
395925
|
+
const enableSync = !!process.env.POCHI_LIVEKIT_SYNC_ON;
|
|
395920
395926
|
const adapter4 = makeAdapter({
|
|
395921
|
-
storage:
|
|
395927
|
+
storage: enableSync ? {
|
|
395922
395928
|
type: "fs",
|
|
395923
395929
|
baseDirectory: path24.join(os9.homedir(), ".pochi", "storage")
|
|
395924
|
-
},
|
|
395930
|
+
} : { type: "in-memory" },
|
|
395925
395931
|
devtools: process.env.POCHI_LIVEKIT_DEVTOOLS ? {
|
|
395926
395932
|
schemaPath: "../../packages/livekit/src/livestore/schema.ts"
|
|
395927
395933
|
} : undefined,
|
|
395928
|
-
sync: jwt2 &&
|
|
395934
|
+
sync: jwt2 && enableSync ? {
|
|
395929
395935
|
backend: makeWsSync({
|
|
395930
395936
|
url: getSyncBaseUrl()
|
|
395931
395937
|
})
|
|
@@ -409608,7 +409614,7 @@ ${formatTaskDescription(task, false)}`);
|
|
|
409608
409614
|
return taskCommand.error(`Failed to list tasks: ${error46 instanceof Error ? error46.message : "Unknown error"}`);
|
|
409609
409615
|
}
|
|
409610
409616
|
} finally {
|
|
409611
|
-
await store
|
|
409617
|
+
await shutdownStoreAndExit(store);
|
|
409612
409618
|
}
|
|
409613
409619
|
});
|
|
409614
409620
|
}
|
|
@@ -409693,12 +409699,15 @@ function registerTaskShareCommand(taskCommand) {
|
|
|
409693
409699
|
} else {
|
|
409694
409700
|
console.log(source_default.red("❌ No share URL found for this task"));
|
|
409695
409701
|
}
|
|
409696
|
-
await store
|
|
409702
|
+
await shutdownStoreAndExit(store);
|
|
409697
409703
|
});
|
|
409698
409704
|
}
|
|
409699
409705
|
|
|
409700
409706
|
// src/task/cmd.ts
|
|
409701
409707
|
function registerTaskCommand(program5) {
|
|
409708
|
+
const enableSync = !!process.env.POCHI_LIVEKIT_SYNC_ON;
|
|
409709
|
+
if (!enableSync)
|
|
409710
|
+
return;
|
|
409702
409711
|
const taskCommand = program5.command("task").description("Manage and interact with tasks.").addHelpCommand(true);
|
|
409703
409712
|
registerTaskListCommand(taskCommand);
|
|
409704
409713
|
registerTaskShareCommand(taskCommand);
|
|
@@ -410788,7 +410797,7 @@ function createVertexModel(vertex2, modelId) {
|
|
|
410788
410797
|
fetch: async (_input, requestInit) => {
|
|
410789
410798
|
const resp = await fetch(issueUrl, {
|
|
410790
410799
|
headers: {
|
|
410791
|
-
"
|
|
410800
|
+
"Metadata-Flavor": "Google"
|
|
410792
410801
|
}
|
|
410793
410802
|
}).then((x11) => x11.json());
|
|
410794
410803
|
const headers = new Headers(requestInit?.headers);
|
|
@@ -412388,15 +412397,9 @@ var program5 = new Command().name("pochi").description(`${source_default.bold("P
|
|
|
412388
412397
|
const renderer = new OutputRenderer(runner.state);
|
|
412389
412398
|
await runner.run();
|
|
412390
412399
|
renderer.shutdown();
|
|
412391
|
-
const shareId = runner.shareId;
|
|
412392
|
-
if (shareId) {
|
|
412393
|
-
const shareUrl = source_default.underline(`https://app.getpochi.com/share/${shareId}`);
|
|
412394
|
-
console.log(`
|
|
412395
|
-
${source_default.bold("Task link: ")} ${shareUrl}`);
|
|
412396
|
-
}
|
|
412397
412400
|
mcpHub.dispose();
|
|
412398
412401
|
await waitForSync(store, "2 second").catch(console.error);
|
|
412399
|
-
await store
|
|
412402
|
+
await shutdownStoreAndExit(store);
|
|
412400
412403
|
});
|
|
412401
412404
|
var otherOptionsGroup = "Others:";
|
|
412402
412405
|
program5.optionsGroup(otherOptionsGroup).version(package_default.version, "-V, --version", "Print the version string.").addHelpOption(new Option3("-h, --help", "Print this help message.").helpGroup(otherOptionsGroup)).configureHelp({
|
|
@@ -412531,6 +412534,9 @@ async function createLLMConfigWithProviders(program6, model2) {
|
|
|
412531
412534
|
assertUnreachable2(modelProvider.kind);
|
|
412532
412535
|
}
|
|
412533
412536
|
async function waitForSync(inputStore, timeoutDuration = "1 second") {
|
|
412537
|
+
if (!process.env.POCHI_LIVEKIT_SYNC_ON) {
|
|
412538
|
+
return;
|
|
412539
|
+
}
|
|
412534
412540
|
const store = inputStore || await createStore3();
|
|
412535
412541
|
await exports_Effect2.gen(function* (_8) {
|
|
412536
412542
|
while (true) {
|