@ouro.bot/cli 0.1.0-alpha.1070 → 0.1.0-alpha.1071

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/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1071",
6
+ "changes": [
7
+ "The daemon's provider check loads only the pinged provider's SDK; the benchmark shows what each process loads"
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1070",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1070",
2
+ "runtimeVersion": "0.1.0-alpha.1071",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1070</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1071</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.sanitizeErrorMessage = sanitizeErrorMessage;
4
37
  exports.pingGithubCopilotModel = pingGithubCopilotModel;
@@ -6,12 +39,7 @@ exports.createProviderRuntimeForConfig = createProviderRuntimeForConfig;
6
39
  exports.pingProvider = pingProvider;
7
40
  exports.runHealthInventory = runHealthInventory;
8
41
  const identity_1 = require("./identity");
9
- const anthropic_1 = require("./providers/anthropic");
10
- const azure_1 = require("./providers/azure");
11
- const minimax_1 = require("./providers/minimax");
12
- const openai_codex_1 = require("./providers/openai-codex");
13
- const github_copilot_1 = require("./providers/github-copilot");
14
- const openai_compatible_1 = require("./providers/openai-compatible");
42
+ const error_classification_1 = require("./providers/error-classification");
15
43
  const provider_models_1 = require("./provider-models");
16
44
  const runtime_1 = require("../nerves/runtime");
17
45
  const provider_attempt_1 = require("./provider-attempt");
@@ -126,7 +154,7 @@ async function pingGithubCopilotModel(baseUrl, token, model, fetchImpl = fetch)
126
154
  operation: "model-ping",
127
155
  provider: "github-copilot",
128
156
  model,
129
- classifyError: github_copilot_1.classifyGithubCopilotError,
157
+ classifyError: error_classification_1.classifyHttpError,
130
158
  policy: {
131
159
  maxAttempts: 3,
132
160
  baseDelayMs: 0,
@@ -160,28 +188,32 @@ function hasEmptyCredentials(provider, config) {
160
188
  const requirements = identity_1.PROVIDER_CREDENTIALS[provider];
161
189
  return ![requirements.required, ...(requirements.alternativeRequired ?? [])].some((fields) => fields.every((key) => !!record[key]));
162
190
  }
163
- function createProviderRuntimeForConfig(provider, config, options = {}) {
191
+ /**
192
+ * Each provider's module (and the SDK it wraps) loads only when that provider
193
+ * is pinged, so a daemon checking one agent's provider loads one SDK, not all.
194
+ */
195
+ async function createProviderRuntimeForConfig(provider, config, options = {}) {
164
196
  // Use the same provider defaults as auth switch and hatch so verification
165
197
  // cannot drift to stale provider/model pairings, and pass the checked
166
198
  // credentials directly so daemon-side pings do not depend on --agent globals.
167
199
  const resolvedModel = options.model ?? (0, provider_models_1.getDefaultModelForProvider)(provider);
168
200
  switch (provider) {
169
201
  case "anthropic":
170
- return (0, anthropic_1.createAnthropicProviderRuntime)(resolvedModel, config);
202
+ return (await Promise.resolve().then(() => __importStar(require("./providers/anthropic")))).createAnthropicProviderRuntime(resolvedModel, config);
171
203
  case "azure":
172
- return (0, azure_1.createAzureProviderRuntime)(resolvedModel, {
204
+ return (await Promise.resolve().then(() => __importStar(require("./providers/azure")))).createAzureProviderRuntime(resolvedModel, {
173
205
  ...config,
174
206
  apiVersion: config.apiVersion ?? DEFAULT_AZURE_API_VERSION,
175
207
  });
176
208
  case "minimax":
177
- return (0, minimax_1.createMinimaxProviderRuntime)(resolvedModel, config);
209
+ return (await Promise.resolve().then(() => __importStar(require("./providers/minimax")))).createMinimaxProviderRuntime(resolvedModel, config);
178
210
  case "openai-codex":
179
- return (0, openai_codex_1.createOpenAICodexProviderRuntime)(resolvedModel, config);
211
+ return (await Promise.resolve().then(() => __importStar(require("./providers/openai-codex")))).createOpenAICodexProviderRuntime(resolvedModel, config);
180
212
  case "github-copilot":
181
- return (0, github_copilot_1.createGithubCopilotProviderRuntime)(resolvedModel, config);
213
+ return (await Promise.resolve().then(() => __importStar(require("./providers/github-copilot")))).createGithubCopilotProviderRuntime(resolvedModel, config);
182
214
  case "openai-compatible":
183
215
  case "openai-compatible-gemini":
184
- return (0, openai_compatible_1.createOpenAICompatibleProviderRuntime)(provider, resolvedModel, config);
216
+ return (await Promise.resolve().then(() => __importStar(require("./providers/openai-compatible")))).createOpenAICompatibleProviderRuntime(provider, resolvedModel, config);
185
217
  default:
186
218
  throw new Error(`unsupported provider for ping: ${provider}`);
187
219
  }
@@ -192,7 +224,7 @@ async function pingProvider(provider, config, options = {}) {
192
224
  }
193
225
  let runtime;
194
226
  try {
195
- runtime = createProviderRuntimeForConfig(provider, config, { model: options.model });
227
+ runtime = await createProviderRuntimeForConfig(provider, config, { model: options.model });
196
228
  /* v8 ignore start -- factory creation failure: tested via individual provider init tests @preserve */
197
229
  }
198
230
  catch (error) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1070",
3
+ "version": "0.1.0-alpha.1071",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1070",
9
+ "version": "0.1.0-alpha.1071",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@ouro.bot/friends": "0.1.0-alpha.18",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1070",
3
+ "version": "0.1.0-alpha.1071",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },