@getpochi/cli 0.5.45 → 0.5.47

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/dist/cli.js +43 -27
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -46324,7 +46324,7 @@ var TypeId39, schemaBodyJson = (schema2, options) => {
46324
46324
  }, schemaHeaders = (schema2, options) => {
46325
46325
  const parse9 = decodeUnknown3(schema2, options);
46326
46326
  return (self2) => parse9(self2.headers);
46327
- }, MaxBodySize, withMaxBodySize, inspect2 = (self2, that) => {
46327
+ }, MaxBodySize, withMaxBodySize, inspect = (self2, that) => {
46328
46328
  const contentType = self2.headers["content-type"] ?? "";
46329
46329
  let body;
46330
46330
  if (contentType.includes("application/json")) {
@@ -46579,7 +46579,7 @@ var init_httpClientResponse = __esm(() => {
46579
46579
  this[TypeId41] = TypeId41;
46580
46580
  }
46581
46581
  toJSON() {
46582
- return inspect2(this, {
46582
+ return inspect(this, {
46583
46583
  _id: "@effect/platform/HttpClientResponse",
46584
46584
  request: this.request.toJSON(),
46585
46585
  status: this.status
@@ -54724,7 +54724,7 @@ var init_httpServerRequest = __esm(() => {
54724
54724
  this[TypeId39] = TypeId39;
54725
54725
  }
54726
54726
  toJSON() {
54727
- return inspect2(this, {
54727
+ return inspect(this, {
54728
54728
  _id: "@effect/platform/HttpServerRequest",
54729
54729
  method: this.method,
54730
54730
  url: this.originalUrl
@@ -92720,7 +92720,7 @@ var init_httpClient3 = __esm(() => {
92720
92720
  });
92721
92721
  }
92722
92722
  toJSON() {
92723
- return inspect2(this, {
92723
+ return inspect(this, {
92724
92724
  _id: "@effect/platform/HttpClientResponse",
92725
92725
  request: this.request.toJSON(),
92726
92726
  status: this.status
@@ -95948,7 +95948,7 @@ var require_data_url = __commonJS((exports, module) => {
95948
95948
 
95949
95949
  // ../../node_modules/@effect/platform-node/node_modules/undici/lib/web/webidl/index.js
95950
95950
  var require_webidl = __commonJS((exports, module) => {
95951
- var { types: types8, inspect: inspect3 } = __require("node:util");
95951
+ var { types: types8, inspect: inspect2 } = __require("node:util");
95952
95952
  var { markAsUncloneable } = __require("node:worker_threads");
95953
95953
  var UNDEFINED = 1;
95954
95954
  var BOOLEAN = 2;
@@ -96139,7 +96139,7 @@ var require_webidl = __commonJS((exports, module) => {
96139
96139
  case SYMBOL:
96140
96140
  return `Symbol(${V.description})`;
96141
96141
  case OBJECT:
96142
- return inspect3(V);
96142
+ return inspect2(V);
96143
96143
  case STRING:
96144
96144
  return `"${V}"`;
96145
96145
  case BIGINT:
@@ -112206,7 +112206,7 @@ var init_httpClientUndici = __esm(() => {
112206
112206
  }).pipe(cached4, runSync);
112207
112207
  }
112208
112208
  toJSON() {
112209
- return inspect2(this, {
112209
+ return inspect(this, {
112210
112210
  _id: "@effect/platform/HttpClientResponse",
112211
112211
  request: this.request.toJSON(),
112212
112212
  status: this.status
@@ -116546,7 +116546,7 @@ var init_httpServer2 = __esm(() => {
116546
116546
  return `ServerRequest(${this.method} ${this.url})`;
116547
116547
  }
116548
116548
  toJSON() {
116549
- return inspect2(this, {
116549
+ return inspect(this, {
116550
116550
  _id: "@effect/platform/HttpServerRequest",
116551
116551
  method: this.method,
116552
116552
  url: this.originalUrl
@@ -283562,7 +283562,7 @@ import fs9, { existsSync as existsSync5, promises as promises4, readFileSync as
283562
283562
  import path20, { basename as basename5, dirname as dirname8, extname as extname4, isAbsolute as isAbsolute6, join as join18, normalize as normalize4, posix as posix5, relative as relative6, resolve as resolve11, sep as sep3 } from "node:path";
283563
283563
  import fsp, { constants as constants6 } from "node:fs/promises";
283564
283564
  import { URL as URL$1, fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "node:url";
283565
- import { format as format10, inspect as inspect3, promisify as promisify3, stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
283565
+ import { format as format10, inspect as inspect2, promisify as promisify3, stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
283566
283566
  import { performance as performance$1 } from "node:perf_hooks";
283567
283567
  import crypto8 from "node:crypto";
283568
283568
  import os8 from "node:os";
@@ -288999,9 +288999,9 @@ function determineSpecificType(value$1) {
288999
288999
  if (typeof value$1 === "object") {
289000
289000
  if (value$1.constructor && value$1.constructor.name)
289001
289001
  return `an instance of ${value$1.constructor.name}`;
289002
- return `${inspect3(value$1, { depth: -1 })}`;
289002
+ return `${inspect2(value$1, { depth: -1 })}`;
289003
289003
  }
289004
- let inspected = inspect3(value$1, { colors: false });
289004
+ let inspected = inspect2(value$1, { colors: false });
289005
289005
  if (inspected.length > 28)
289006
289006
  inspected = `${inspected.slice(0, 25)}...`;
289007
289007
  return `type ${typeof value$1} (${inspected})`;
@@ -307264,7 +307264,7 @@ Error: ${e$1.message}`);
307264
307264
  return `Unknown file extension "${extension$1}" for ${path$13}`;
307265
307265
  }, TypeError);
307266
307266
  codes$1.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name17, value$1, reason = "is invalid") => {
307267
- let inspected = inspect3(value$1);
307267
+ let inspected = inspect2(value$1);
307268
307268
  if (inspected.length > 128)
307269
307269
  inspected = `${inspected.slice(0, 128)}...`;
307270
307270
  const type3 = name17.includes(".") ? "property" : "argument";
@@ -354502,6 +354502,10 @@ var GoogleVertexModel = v4_default.union([
354502
354502
  accessToken: v4_default.string(),
354503
354503
  projectId: v4_default.string(),
354504
354504
  location: v4_default.string()
354505
+ }),
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 ?? "")
354505
354509
  })
354506
354510
  ]);
354507
354511
  var GoogleVertexTuningModelSettings = BaseModelSettings.extend({
@@ -354784,8 +354788,6 @@ var {
354784
354788
  updateConfig,
354785
354789
  getVendorConfig,
354786
354790
  updateVendorConfig,
354787
- inspect,
354788
- setWorkspacePath,
354789
354791
  getConfigFilePath,
354790
354792
  watchKeys
354791
354793
  } = new PochiConfigManager;
@@ -368447,7 +368449,7 @@ var {
368447
368449
  // package.json
368448
368450
  var package_default = {
368449
368451
  name: "@getpochi/cli",
368450
- version: "0.5.45",
368452
+ version: "0.5.47",
368451
368453
  type: "module",
368452
368454
  bin: {
368453
368455
  pochi: "src/cli.ts"
@@ -385882,13 +385884,9 @@ class McpHub {
385882
385884
  return addedNames;
385883
385885
  }
385884
385886
  async saveConfig(newConfig) {
385885
- for (const [name17, config4] of Object.entries(newConfig)) {
385886
- const { effectiveTargets } = inspect(`mcp.${name17}`);
385887
- const editTarget = effectiveTargets[0] || "user";
385888
- await updateConfig({ mcp: { [name17]: config4 } }, editTarget).catch((error42) => {
385889
- logger16.error("Failed to persist MCP configuration changes", error42);
385890
- });
385891
- }
385887
+ await updateConfig({ mcp: newConfig }).catch((error42) => {
385888
+ logger16.error("Failed to persist MCP configuration changes", error42);
385889
+ });
385892
385890
  }
385893
385891
  async onConfigChanged() {
385894
385892
  const newConfig = this.config.value;
@@ -396444,7 +396442,7 @@ async function initializeMcp(mcpHub) {
396444
396442
  const readyConnections = connections.filter((conn) => conn.status === "ready").length;
396445
396443
  const errorConnections = connections.filter((conn) => conn.status === "error").length;
396446
396444
  if (connections.length > 0) {
396447
- if (readyConnections + errorConnections >= connections.length && attempts > 3) {
396445
+ if (readyConnections + errorConnections >= connections.length) {
396448
396446
  break;
396449
396447
  }
396450
396448
  }
@@ -410776,6 +410774,24 @@ function createVertexModel(vertex2, modelId) {
410776
410774
  fetch: createPatchedFetchForFinetune(accessToken)
410777
410775
  })(modelId);
410778
410776
  }
410777
+ if ("issueUrl" in vertex2) {
410778
+ const { issueUrl, modelUrl } = vertex2;
410779
+ return createVertex({
410780
+ project: "placeholder",
410781
+ location: "placeholder",
410782
+ baseURL: "placeholder",
410783
+ fetch: async (_input, requestInit) => {
410784
+ const resp = await fetch(issueUrl, {
410785
+ headers: {
410786
+ "Metdata-Flavor": "Google"
410787
+ }
410788
+ }).then((x11) => x11.json());
410789
+ const headers = new Headers(requestInit?.headers);
410790
+ headers.append("Authorization", `Bearer ${resp.access_token}`);
410791
+ return fetch(modelUrl, { ...requestInit, headers });
410792
+ }
410793
+ })("placeholder");
410794
+ }
410779
410795
  return;
410780
410796
  }
410781
410797
 
@@ -411011,7 +411027,7 @@ function prepareMessages(inputMessages, environment2) {
411011
411027
  function isWellKnownReasoningModel(model2) {
411012
411028
  if (!model2)
411013
411029
  return false;
411014
- const models = [/glm-4.5/, /qwen3.*thinking/];
411030
+ const models = [/glm-4.*/, /qwen3.*thinking/];
411015
411031
  const x11 = model2.toLowerCase();
411016
411032
  for (const m13 of models) {
411017
411033
  if (x11.match(m13)?.length) {
@@ -412386,8 +412402,7 @@ program5.optionsGroup(otherOptionsGroup).version(package_default.version, "-V, -
412386
412402
  program5.hook("preAction", async () => {
412387
412403
  await Promise.all([
412388
412404
  checkForUpdates().catch(() => {}),
412389
- waitForSync().catch(console.error),
412390
- setWorkspacePath(process.cwd()).catch(() => {})
412405
+ waitForSync().catch(console.error)
412391
412406
  ]);
412392
412407
  });
412393
412408
  registerAuthCommand(program5);
@@ -412493,7 +412508,8 @@ async function createLLMConfigWithProviders(program6, model2) {
412493
412508
  modelId,
412494
412509
  vertex: modelProvider.vertex,
412495
412510
  contextWindow: modelSetting.contextWindow ?? exports_constants.DefaultContextWindow,
412496
- maxOutputTokens: modelSetting.maxTokens ?? exports_constants.DefaultMaxOutputTokens
412511
+ maxOutputTokens: modelSetting.maxTokens ?? exports_constants.DefaultMaxOutputTokens,
412512
+ useToolCallMiddleware: modelSetting.useToolCallMiddleware
412497
412513
  };
412498
412514
  }
412499
412515
  if (modelProvider.kind === undefined || modelProvider.kind === "openai" || modelProvider.kind === "openai-responses" || modelProvider.kind === "anthropic") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpochi/cli",
3
- "version": "0.5.45",
3
+ "version": "0.5.47",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pochi": "dist/cli.js"