@offerpilot/axiomruntime 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -179,7 +179,7 @@ Telegram Bot 集成说明:
179
179
 
180
180
  - 多 Bot 使用 `ai telegram add <name>` 创建,并以统一的 `--bot <name>` 选择目标;例如 `ai telegram edit --bot ops`、`start|stop|status --bot ops`、`delete --bot ops`。裸 `ai telegram` 会先选操作再选 Bot,删除有二次确认;批量生命周期操作使用 `--all`。
181
181
  - `ai telegram config set <key> <value> --bot <name>` 只修改指定 Bot;旧位置参数写法继续兼容。
182
- - 如果本机不能直连 Telegram API,可设置 `ai telegram config set proxyUrl http://127.0.0.1:7890 --bot <name>`。
182
+ - 如果本机不能直连 Telegram API,可设置 `ai telegram config set proxyUrl http://127.0.0.1:7890 --bot <name>`;代理地址需包含协议,交互式新增或编辑 Bot 时也会显示该完整示例。
183
183
  - Bot 首次 `/start` 或 `/reset` 会先选择工作路径,再选择 Claude Code/Codex,并展示当前会话、provider 和模型卡片。
184
184
  - Bot 会记录选择过的工作路径;自定义路径会按 `~/输入名称` 创建或复用。
185
185
  - Telegram 默认命令菜单只保留 `/claude`、`/codex`、`/reset`、`/cwd` 和 `/help`;选择 CLI 后,会在当前 chat 的 `/` 菜单追加该 CLI 的 slash 命令映射。
@@ -8,6 +8,7 @@ import { botExists, isBotRunning, isValidBotName, listBots, migrateLegacyConfig,
8
8
  import { ensureTelegramLogFile, readRecentTelegramLogLines } from "../../telegram/log.js";
9
9
  import { checkTelegramApi, getTelegramProxyUrl } from "../../telegram/network.js";
10
10
  import { promptConfirm, promptSelect, promptText } from "../prompts/prompt.js";
11
+ export const TELEGRAM_PROXY_URL_PROMPT = "Proxy URL (include protocol, e.g. http://127.0.0.1:7890)";
11
12
  export async function runTelegramCommand(args) {
12
13
  const target = parseTelegramTargetArgs(args);
13
14
  const [subcommand, ...rest] = target.args;
@@ -202,7 +203,7 @@ async function addBot(nameArg) {
202
203
  if (!token.trim())
203
204
  throw new Error("Token is required.");
204
205
  const allowedUserIds = await promptText("Allowed user IDs (comma-separated, empty for allowAll)");
205
- const proxyUrl = await promptText("Proxy URL (empty to skip)", { defaultValue: "" });
206
+ const proxyUrl = await promptText(`${TELEGRAM_PROXY_URL_PROMPT} (empty to skip)`, { defaultValue: "" });
206
207
  const config = {
207
208
  token: token.trim(),
208
209
  ...(proxyUrl.trim() ? { proxyUrl: proxyUrl.trim() } : {})
@@ -494,7 +495,7 @@ async function editBotConfigInteractive(name) {
494
495
  const current = String(config[field] ?? "");
495
496
  const value = field === "token"
496
497
  ? await promptText("token (leave empty to keep current)") || current
497
- : await promptText(field, { defaultValue: current });
498
+ : await promptText(field === "proxyUrl" ? TELEGRAM_PROXY_URL_PROMPT : field, { defaultValue: current });
498
499
  config = await setBotConfigValue(name, field, value);
499
500
  }
500
501
  }
@@ -539,7 +540,7 @@ async function editTelegramConfigInteractive() {
539
540
  const current = String(config[field] ?? "");
540
541
  const value = field === "token"
541
542
  ? await promptText("token (leave empty to keep current)") || current
542
- : await promptText(field, { defaultValue: current });
543
+ : await promptText(field === "proxyUrl" ? TELEGRAM_PROXY_URL_PROMPT : field, { defaultValue: current });
543
544
  config = await setTelegramConfigValue(field, value);
544
545
  }
545
546
  }
@@ -138,7 +138,6 @@ export function buildCodexProviderConfig(current, provider, providerId, model =
138
138
  `name = ${tomlString(provider.name)}`,
139
139
  `base_url = ${tomlString(provider.baseUrl.trim().replace(/\/+$/, ""))}`,
140
140
  `env_key = ${tomlString("OPENAI_API_KEY")}`,
141
- "requires_openai_auth = true",
142
141
  `wire_api = ${tomlString("responses")}`
143
142
  ].join(eol);
144
143
  return `${next.trimEnd()}${eol}${eol}${table}${eol}`;
@@ -78,8 +78,6 @@ registerRunnerEngine({
78
78
  "-c",
79
79
  `model_providers.${providerId}.env_key=${tomlString("OPENAI_API_KEY")}`,
80
80
  "-c",
81
- `model_providers.${providerId}.requires_openai_auth=true`,
82
- "-c",
83
81
  `model_providers.${providerId}.wire_api=${tomlString("responses")}`,
84
82
  "--model",
85
83
  model
@@ -169,8 +169,6 @@ function buildCodexProviderOverrideArgs(providerOverride) {
169
169
  "-c",
170
170
  `model_providers.${providerId}.env_key=${tomlString("OPENAI_API_KEY")}`,
171
171
  "-c",
172
- `model_providers.${providerId}.requires_openai_auth=true`,
173
- "-c",
174
172
  `model_providers.${providerId}.wire_api=${tomlString("responses")}`
175
173
  ];
176
174
  }
package/docs/USAGE.html CHANGED
@@ -753,7 +753,7 @@ ai telegram status --all</pre>
753
753
  <li><code>/provider</code> 以按钮列出全部 AI Provider,可编辑名称、Base URL、API Key、默认模型、模式和优先级,二次确认后删除,或从列表底部添加。操作复用 <code>ai provider</code> 的核心 CRUD 和检查逻辑。</li>
754
754
  <li>Provider API Key 在详情中只显示“已配置”,不会写入 Bot 应用日志;输入后 Bot 会尽力立即删除该 Telegram 消息。未完成表单在 Bot 重启后需要重新开始。</li>
755
755
  <li>Telegram Codex 执行会自动走本地 OpenAI 兼容代理记录 provider usage;<code>/usage</code> 有 provider cost 时直接展示,否则按 <code>model-pricing.json</code> 估算。</li>
756
- <li>如果本机不能直连 <code>api.telegram.org</code>,设置 <code>proxyUrl</code> 或环境变量 <code>HTTPS_PROXY</code> / <code>ALL_PROXY</code>。</li>
756
+ <li>如果本机不能直连 <code>api.telegram.org</code>,设置 <code>proxyUrl</code> 或环境变量 <code>HTTPS_PROXY</code> / <code>ALL_PROXY</code>。交互式新增或编辑 Bot 时,<code>proxyUrl</code> 输入提示会展示完整 URL 示例;地址请包含协议,例如 <code>http://127.0.0.1:7890</code>。</li>
757
757
  </ul>
758
758
  </div>
759
759
  </details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@offerpilot/axiomruntime",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "CLI-first foundation for an enterprise AI Runtime with provider routing and governed execution.",
5
5
  "homepage": "https://gitlab.com/linlangli/agent-router",
6
6
  "repository": {