poe-code 3.0.47 → 3.0.49

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/index.js CHANGED
@@ -16178,6 +16178,7 @@ var claudeCodeSpawnConfig = {
16178
16178
  adapter: "claude",
16179
16179
  promptFlag: "-p",
16180
16180
  modelFlag: "--model",
16181
+ modelStripProviderPrefix: true,
16181
16182
  defaultArgs: [
16182
16183
  "--output-format",
16183
16184
  "stream-json",
@@ -16206,6 +16207,7 @@ var codexSpawnConfig = {
16206
16207
  adapter: "codex",
16207
16208
  promptFlag: "exec",
16208
16209
  modelFlag: "--model",
16210
+ modelStripProviderPrefix: true,
16209
16211
  defaultArgs: ["--skip-git-repo-check", "--json"],
16210
16212
  modes: {
16211
16213
  yolo: ["-s", "danger-full-access"],
@@ -16232,8 +16234,11 @@ var openCodeSpawnConfig = {
16232
16234
  adapter: "opencode",
16233
16235
  promptFlag: "run",
16234
16236
  modelFlag: "--model",
16235
- // TODO: remove once opencode accepts dotted model IDs (e.g. claude-opus-4.6)
16236
- modelTransform: (model) => model === "claude-opus-4.6" ? "claude-opus-4-6" : model,
16237
+ modelStripProviderPrefix: false,
16238
+ modelTransform: (model) => {
16239
+ const fixed = model.replace("claude-opus-4.6", "claude-opus-4-6");
16240
+ return fixed.startsWith("poe/") ? fixed : `poe/${fixed}`;
16241
+ },
16237
16242
  defaultArgs: ["--format", "json"],
16238
16243
  modes: {
16239
16244
  yolo: [],
@@ -16256,6 +16261,7 @@ var kimiSpawnConfig = {
16256
16261
  // (no `{ event, ... }` field), so it needs the Kimi adapter (not "native").
16257
16262
  adapter: "kimi",
16258
16263
  promptFlag: "-p",
16264
+ modelStripProviderPrefix: true,
16259
16265
  defaultArgs: ["--print", "--output-format", "stream-json"],
16260
16266
  modes: {
16261
16267
  yolo: ["--yolo"],
@@ -16341,7 +16347,7 @@ function buildCliArgs(config2, options, stdinMode) {
16341
16347
  ...stdinMode.extraArgs
16342
16348
  ] : [config2.promptFlag, options.prompt];
16343
16349
  if (options.model && config2.modelFlag) {
16344
- let model = stripModelNamespace2(options.model);
16350
+ let model = config2.modelStripProviderPrefix ? stripModelNamespace2(options.model) : options.model;
16345
16351
  if (config2.modelTransform) model = config2.modelTransform(model);
16346
16352
  args.push(config2.modelFlag, model);
16347
16353
  }
@@ -16436,7 +16442,7 @@ async function spawnInteractive(agentId, options) {
16436
16442
  }
16437
16443
  }
16438
16444
  if (options.model && spawnConfig.modelFlag) {
16439
- let model = stripModelNamespace2(options.model);
16445
+ let model = spawnConfig.modelStripProviderPrefix ? stripModelNamespace2(options.model) : options.model;
16440
16446
  if (spawnConfig.modelTransform) model = spawnConfig.modelTransform(model);
16441
16447
  args.push(spawnConfig.modelFlag, model);
16442
16448
  }
@@ -17014,7 +17020,9 @@ function spawnStreaming(options) {
17014
17020
  args.push(options.prompt);
17015
17021
  }
17016
17022
  if (options.model && spawnConfig.modelFlag) {
17017
- args.push(spawnConfig.modelFlag, stripModelNamespace2(options.model));
17023
+ let model = spawnConfig.modelStripProviderPrefix ? stripModelNamespace2(options.model) : options.model;
17024
+ if (spawnConfig.modelTransform) model = spawnConfig.modelTransform(model);
17025
+ args.push(spawnConfig.modelFlag, model);
17018
17026
  }
17019
17027
  args.push(...spawnConfig.defaultArgs);
17020
17028
  const mode = options.mode ?? "yolo";
@@ -17594,9 +17602,9 @@ var openCodeService = createProvider({
17594
17602
  };
17595
17603
  }
17596
17604
  }),
17597
- fileMutation.ensureDirectory({ path: "~/.opencode-data" }),
17605
+ fileMutation.ensureDirectory({ path: "~/.local/share/opencode" }),
17598
17606
  configMutation.merge({
17599
- target: "~/.opencode-data/auth.json",
17607
+ target: "~/.local/share/opencode/auth.json",
17600
17608
  value: (ctx) => {
17601
17609
  const { apiKey } = ctx ?? {};
17602
17610
  return {
@@ -17614,7 +17622,7 @@ var openCodeService = createProvider({
17614
17622
  shape: { enabled_providers: true }
17615
17623
  }),
17616
17624
  configMutation.prune({
17617
- target: "~/.opencode-data/auth.json",
17625
+ target: "~/.local/share/opencode/auth.json",
17618
17626
  shape: { [PROVIDER_NAME]: true }
17619
17627
  })
17620
17628
  ]
@@ -36281,7 +36289,7 @@ function registerModelsCommand(program, container) {
36281
36289
  // package.json
36282
36290
  var package_default = {
36283
36291
  name: "poe-code",
36284
- version: "3.0.47",
36292
+ version: "3.0.49",
36285
36293
  description: "CLI tool to configure Poe API for developer workflows.",
36286
36294
  type: "module",
36287
36295
  workspaces: [