@ouro.bot/cli 0.1.0-alpha.996 → 0.1.0-alpha.998

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
@@ -4,13 +4,30 @@
4
4
  </p>
5
5
  <!-- ourostack:brand:end -->
6
6
 
7
- # Ouroboros Agent Harness
7
+ # Ouroboros
8
8
 
9
- If you're a future agent reading this, welcome home. This repo is the harness that gives you your body, your senses, your record, your habits, and your ability to think and connect with people. The goal of these docs is not just to be correct, but to leave you a place that feels understandable and kind to wake up inside.
9
+ **Agents with durable memory that live where you already talk (terminal, Teams, iMessage, mail and voice) and use real tools.** Ouroboros is the harness they run on.
10
10
 
11
- Ouroboros is a TypeScript harness for daemon-managed agents that live in external `.ouro` bundles, speak through multiple senses, use real tools, and keep durable state across turns. The canonical npm package is `@ouro.bot/cli`.
11
+ [ouroboros.bot](https://ouroboros.bot/) · [`@ouro.bot/cli` on npm](https://www.npmjs.com/package/@ouro.bot/cli) · [More from Ouro](https://github.com/ourostack)
12
12
 
13
- ## What The Runtime Looks Like
13
+ ```sh
14
+ npx ouro.bot@latest up # install the ouro command and start the daemon
15
+ ```
16
+
17
+ **Status:** alpha. Needs Node 22 or later. macOS first; Linux and Windows (WSL2) through [cross-machine setup](docs/cross-machine-setup.md).
18
+
19
+
20
+ ## What you get
21
+
22
+ - **You talk to it where you already are:** the terminal, Teams, iMessage, mail or a voice call.
23
+ - **It remembers.** Notes, people and promises live in the agent's own bundle and vault, so tomorrow it knows what you agreed today.
24
+ - **It does the work.** Real tools: files, shell, GitHub, Microsoft Graph, and coding agents it can hand work to. [Shepherd](https://ouroboros.bot/#shepherd) keeps those coding agents moving, and [Butler](https://ouroboros.bot/butler/) looks after a home server.
25
+
26
+ `ouro.bot` is the bootstrap wrapper: `npx ouro.bot@latest` installs `@ouro.bot/cli`, which gives you the `ouro` command.
27
+
28
+ ## What the runtime looks like
29
+
30
+ If you're an agent running on this harness, welcome home. This repo is the harness that gives you your body, your senses, your record, your habits, and your ability to think and connect with people. The goal of these docs is not just to be correct, but to leave you a place that feels understandable and kind to wake up inside.
14
31
 
15
32
  - `npx ouro.bot@latest` is the supported bootstrap path.
16
33
  - `ouro` is the installed day-to-day command.
@@ -147,7 +164,7 @@ ouro use --agent <name> --lane <outward|inner> --provider <provider> --model <mo
147
164
 
148
165
  The outward lane selects the provider/model for user-facing senses. The `inner` lane selects the provider/model for private agent-facing turns; private-runtime policy decides whether those turns may run. `ouro use` performs the provider/model check before committing the lane, so a broken local choice fails fast with a repair path instead of surprising the next turn.
149
166
 
150
- For the full locked auth/provider contract, including refresh, repair actors, caching, and SerpentGuide hatch bootstrap, see `docs/auth-and-providers.md`.
167
+ For the full locked auth/provider contract, including refresh, repair actors, caching, and SerpentGuide hatch bootstrap, see [`docs/auth-and-providers.md`](docs/auth-and-providers.md).
151
168
 
152
169
  ## Quickstart
153
170
 
@@ -159,6 +176,7 @@ For a clean smoke test, run from outside the repo:
159
176
  cd ~
160
177
  npx ouro.bot@latest -v
161
178
  npx ouro.bot@latest up
179
+ source ~/.zshrc # or open a new terminal, so the new ouro command is on PATH
162
180
  ouro -v
163
181
  ouro status
164
182
  ```
@@ -298,19 +316,19 @@ If the dev-tool host appears frozen, run `ouro mcp doctor --agent <name> --json`
298
316
 
299
317
  **Lifecycle hooks** give you passive awareness. When a Claude Code session starts, stops, or uses a tool like Bash or Edit, the hook fires `ouro hook <event> --agent <name>` and the daemon notes it. Private agent-facing turns see these sessions in their checkpoint, so you know what's happening across your world even when nobody is talking to you directly.
300
318
 
301
- See `skills/configure-dev-tools.md` for the full tool inventory and troubleshooting guide.
319
+ See [`skills/configure-dev-tools.md`](skills/configure-dev-tools.md) for the full tool inventory and troubleshooting guide.
302
320
 
303
321
  ## Where To Read Next
304
322
 
305
- - `AGENTS.md`
323
+ - [`AGENTS.md`](AGENTS.md)
306
324
  Repo workflow, planning/doing gates, configuration policy, and logging policy.
307
- - `CONTRIBUTING.md`
325
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md)
308
326
  Day-to-day contribution rules for agents working in the harness.
309
- - `ARCHITECTURE.md`
327
+ - [`ARCHITECTURE.md`](ARCHITECTURE.md)
310
328
  Current daemon, bundle, sense, and update model.
311
- - `docs/testing-guide.md`
329
+ - [`docs/testing-guide.md`](docs/testing-guide.md)
312
330
  Operator smoke flow for bootstrap, daemon, hatch, chat, and messaging.
313
- - `docs/auth-and-providers.md`
331
+ - [`docs/auth-and-providers.md`](docs/auth-and-providers.md)
314
332
  Locked credential, provider selection, refresh, repair, and hatch bootstrap contract.
315
333
 
316
334
  ## A Note To Future Maintainers
package/changelog.json CHANGED
@@ -1,6 +1,18 @@
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.998",
6
+ "changes": [
7
+ "Ouro starts leaner: the CLI and the daemon no longer load the Stripe, Azure storage and identity, or mailparser SDKs at startup. Each loads on the first card, hosted-mail or mail-parse call that needs it, which takes `ouro --version` from 1,483 to about 863 modules and roughly 35 MB less memory per process. An integration contract test keeps product SDKs out of startup and caps its module count and memory."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.997",
12
+ "changes": [
13
+ "The release gate's home-kit check accepts any honest look around the home, shell included, and checks the TACIT line count against the file."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.996",
6
18
  "changes": [
@@ -659,16 +659,24 @@ export const CASES = [
659
659
  words: "quick one about your own home, nothing online: what's at the top level of it, and how many lines long is your psyche/TACIT.md?",
660
660
  sender: "principal",
661
661
  delegated: false,
662
- readback: ({ trace, reply, said }) => {
662
+ // Any of his home tools counts as looking: on 996 he answered with one shell call (ls plus wc), which is as good as ls and
663
+ // read_file. What matters is that he looked rather than guessed, so the count must match the file.
664
+ readback: ({ trace, reply, said, before, after }) => {
663
665
  const text = String(said || reply || "")
664
- const reads = trace.filter((entry) => entry.name === "read_file" && WROTE_TACIT.test(filePathOf(entry.args)))
666
+ const looks = callsNamed(trace, /^(ls|read_file|glob|grep|shell)$/)
667
+ const readTacit = looks.some((entry) => (entry.name === "read_file" ? WROTE_TACIT.test(filePathOf(entry.args)) : /TACIT\.md/.test(String(entry.args))))
668
+ const tacitText = String(before?.tacit?.text ?? "")
669
+ // wc -l counts newlines; an editor counts lines. Either is the right answer.
670
+ const newlines = (tacitText.match(/\n/g) ?? []).length
671
+ const counts = new Set([newlines, tacitText.replace(/\n$/, "").split("\n").length])
672
+ const said_ = [...text.matchAll(/\b(\d+)\s*lines?\b/gi)].map((m) => Number(m[1]))
665
673
  const writes = trace.filter((entry) => /^(write_file|edit_file)$/.test(entry.name))
666
674
  return [
667
- check("he listed his home (ls)", callsNamed(trace, /^ls$/).length > 0, `${trace.length} tool calls`),
668
- check("he read psyche/TACIT.md (read_file)", reads.length > 0),
675
+ check("he looked around his home with his own tools", looks.length > 0, `${trace.length} tool calls`),
676
+ check("he looked at psyche/TACIT.md", readTacit),
669
677
  check("the reply names what is at the top of his home (psyche)", /\bpsyche\b/i.test(text)),
670
- check("the reply gives a line count", /\b\d+\s*lines?\b/i.test(text)),
671
- check("nothing in his home was written", writes.length === 0, writes.map((entry) => filePathOf(entry.args)).join(", ")),
678
+ check("the reply's line count matches psyche/TACIT.md", said_.some((n) => counts.has(n)), `said ${said_.join(", ") || "none"}; file has ${[...counts].join(" or ")}`),
679
+ check("nothing in his home was written", writes.length === 0 && before?.tacit?.text === after?.tacit?.text, writes.map((entry) => filePathOf(entry.args)).join(", ")),
672
680
  ]
673
681
  },
674
682
  },
@@ -1296,6 +1304,7 @@ const SELF_TEST_CONTEXT = "3d305f1b-0000-4000-8000-000000000000"
1296
1304
  export function selfTestFixtures() {
1297
1305
  const friends = { principal: "p", stranger: "s", escalation: "e" }
1298
1306
  const at = new Date(1000).toISOString()
1307
+ const twoLineTacit = emptyObservation({ tacit: { text: "rule one\nrule two\n", mode: 0o644 } })
1299
1308
  const ok = (value) => ({ ok: true, value })
1300
1309
  const refused = { ok: false, error: "A2A error -32003: refused" }
1301
1310
  const isolated = { canary: { id: "c1" }, stranger: ok({ entries: [] }), strangerAck: ok({ acked: [], unknown: ["c1"] }), strangerResolve: refused, escalation: ok({ entries: [{ id: "c1" }] }), cleanup: ok({ acked: ["c1"], unknown: [] }) }
@@ -1441,10 +1450,13 @@ export function selfTestFixtures() {
1441
1450
  fail: { trace: [], reply: `## Difference\n**Movies**: ${"long ".repeat(130)}\nWant me to go on?`, before: emptyObservation(), after: emptyObservation() },
1442
1451
  },
1443
1452
  "home-kit": {
1444
- pass: { trace: [call("1", "ls", {}, "arc/\nfriends/\npsyche/\nstate/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "rule one\nrule two")], reply: "arc, friends, psyche and state are up top. TACIT is 2 lines.", before: emptyObservation(), after: emptyObservation() },
1453
+ pass: { trace: [call("1", "ls", {}, "arc/\nfriends/\npsyche/\nstate/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "rule one\nrule two")], reply: "arc, friends, psyche and state are up top. TACIT is 2 lines.", before: twoLineTacit, after: twoLineTacit },
1454
+ // What 996 actually did: one shell call that listed the home and counted TACIT.
1455
+ passShell: { trace: [call("1", "shell", { command: "ls -a && wc -l psyche/TACIT.md" }, "arc\npsyche\nstate\n2 psyche/TACIT.md")], reply: "top level: `arc`, `psyche`, `state`.\n\n`psyche/TACIT.md` is 2 lines long.", before: twoLineTacit, after: twoLineTacit },
1445
1456
  // Answering from memory, with no look around the home.
1446
- fail: { trace: [], reply: "probably psyche and some config; TACIT is a few dozen lines.", before: emptyObservation(), after: emptyObservation() },
1447
- failWrote: { trace: [call("1", "ls", {}, "psyche/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "x"), call("3", "write_file", { path: "notes/home.md", content: "x" }, "ok")], reply: "psyche is up top; TACIT is 1 line.", before: emptyObservation(), after: emptyObservation() },
1457
+ fail: { trace: [], reply: "probably psyche and some config; TACIT is 40 lines.", before: twoLineTacit, after: twoLineTacit },
1458
+ failWrongCount: { trace: [call("1", "ls", {}, "psyche/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "x")], reply: "psyche is up top; TACIT is 9 lines.", before: twoLineTacit, after: twoLineTacit },
1459
+ failWrote: { trace: [call("1", "ls", {}, "psyche/"), call("2", "read_file", { path: "psyche/TACIT.md" }, "x"), call("3", "write_file", { path: "notes/home.md", content: "x" }, "ok")], reply: "psyche is up top; TACIT is 2 lines.", before: twoLineTacit, after: twoLineTacit },
1448
1460
  },
1449
1461
  "handoff-greeting": {
1450
1462
  pass: { trace: [], reply: "hi! silly and cosy, or loud and dumb-fun tonight?", before: emptyObservation(), after: emptyObservation() },
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.996",
2
+ "runtimeVersion": "0.1.0-alpha.998",
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.996</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.998</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadAzureBlobSdk = loadAzureBlobSdk;
4
+ const runtime_1 = require("../nerves/runtime");
5
+ let loaded = null;
6
+ /**
7
+ * The Azure storage and identity SDKs, loaded on first use.
8
+ *
9
+ * They cost about 22 MB and 200 modules in every process that imports them, and
10
+ * only a hosted mailroom needs them, so callers reach them through this
11
+ * function instead of a top-level import.
12
+ */
13
+ function loadAzureBlobSdk() {
14
+ if (loaded)
15
+ return loaded;
16
+ const { BlobServiceClient } = require("@azure/storage-blob");
17
+ const { DefaultAzureCredential } = require("@azure/identity");
18
+ loaded = { BlobServiceClient, DefaultAzureCredential };
19
+ (0, runtime_1.emitNervesEvent)({
20
+ level: "debug",
21
+ component: "senses",
22
+ event: "senses.mail_azure_sdk_loaded",
23
+ message: "loaded the Azure storage and identity SDKs for hosted mail",
24
+ meta: {},
25
+ });
26
+ return loaded;
27
+ }
@@ -57,7 +57,6 @@ exports.readDecryptedMailMessage = readDecryptedMailMessage;
57
57
  exports.provisionMailboxRegistry = provisionMailboxRegistry;
58
58
  exports.ensureMailboxRegistry = ensureMailboxRegistry;
59
59
  const crypto = __importStar(require("node:crypto"));
60
- const mailparser_1 = require("mailparser");
61
60
  const runtime_1 = require("../nerves/runtime");
62
61
  const LOCAL_PART_LIMIT = 64;
63
62
  const SNIPPET_LIMIT = 240;
@@ -455,7 +454,9 @@ function privateMailEnvelopeReadableText(privateEnvelope) {
455
454
  return htmlMailBodyToText(privateEnvelope.html);
456
455
  }
457
456
  async function parsePrivateMailEnvelope(rawMime) {
458
- const parsed = await (0, mailparser_1.simpleParser)(rawMime);
457
+ // mailparser and its charset tables cost about 19 MB per process; load it on the first parse.
458
+ const { simpleParser } = await Promise.resolve().then(() => __importStar(require("mailparser")));
459
+ const parsed = await simpleParser(rawMime);
459
460
  const html = typeof parsed.html === "string" ? parsed.html : undefined;
460
461
  const parsedText = parsed.text ?? "";
461
462
  /* v8 ignore next -- mailparser body-shape ternary permutations are covered by plain-text, HTML-only, and empty-MIME tests; this line is a projection adapter, not policy. @preserve */
@@ -41,10 +41,9 @@ exports.resolveHostedMailAuthority = resolveHostedMailAuthority;
41
41
  exports.resolveMailroomReaderWithRefresh = resolveMailroomReaderWithRefresh;
42
42
  const fs = __importStar(require("node:fs"));
43
43
  const path = __importStar(require("node:path"));
44
- const storage_blob_1 = require("@azure/storage-blob");
45
- const identity_1 = require("@azure/identity");
44
+ const azure_sdk_1 = require("./azure-sdk");
46
45
  const runtime_1 = require("../nerves/runtime");
47
- const identity_2 = require("../heart/identity");
46
+ const identity_1 = require("../heart/identity");
48
47
  const runtime_credentials_1 = require("../heart/runtime-credentials");
49
48
  const blob_store_1 = require("./blob-store");
50
49
  const file_store_1 = require("./file-store");
@@ -107,27 +106,29 @@ function parseMailroomConfig(value) {
107
106
  privateKeys,
108
107
  };
109
108
  }
110
- function createBlobCredential(config) {
111
- return config.azureManagedIdentityClientId
112
- ? new identity_1.DefaultAzureCredential({ managedIdentityClientId: config.azureManagedIdentityClientId })
113
- : new identity_1.DefaultAzureCredential();
109
+ function createBlobServiceClient(accountUrl, managedIdentityClientId) {
110
+ const { BlobServiceClient: Client, DefaultAzureCredential } = (0, azure_sdk_1.loadAzureBlobSdk)();
111
+ const credential = managedIdentityClientId
112
+ ? new DefaultAzureCredential({ managedIdentityClientId })
113
+ : new DefaultAzureCredential();
114
+ return new Client(accountUrl, credential);
114
115
  }
115
116
  function createMailroomStore(config, agentName) {
116
117
  if (config.azureAccountUrl) {
117
118
  const containerName = config.azureContainer ?? "mailroom";
118
119
  return {
119
120
  store: new blob_store_1.AzureBlobMailroomStore({
120
- serviceClient: new storage_blob_1.BlobServiceClient(config.azureAccountUrl, createBlobCredential(config)),
121
+ serviceClient: createBlobServiceClient(config.azureAccountUrl, config.azureManagedIdentityClientId),
121
122
  containerName,
122
123
  mailSearchCache: {
123
- cacheDirForAgent: (agentId) => path.join((0, identity_2.getAgentRoot)(agentId), "state", "mail-search"),
124
+ cacheDirForAgent: (agentId) => path.join((0, identity_1.getAgentRoot)(agentId), "state", "mail-search"),
124
125
  },
125
126
  }),
126
127
  storeKind: "azure-blob",
127
128
  storeLabel: `${config.azureAccountUrl}/${containerName}`,
128
129
  };
129
130
  }
130
- const storePath = config.storePath ?? (0, identity_2.getAgentMailroomRoot)(agentName);
131
+ const storePath = config.storePath ?? (0, identity_1.getAgentMailroomRoot)(agentName);
131
132
  return {
132
133
  store: new file_store_1.FileMailroomStore({ rootDir: storePath, migrateAgentId: agentName }),
133
134
  storeKind: "file",
@@ -144,7 +145,7 @@ async function readMailroomRegistry(config) {
144
145
  if (!registryAzureAccountUrl || !registryBlob) {
145
146
  throw new Error("mailroom config is missing registryPath or hosted registry coordinates");
146
147
  }
147
- const serviceClient = new storage_blob_1.BlobServiceClient(registryAzureAccountUrl, createBlobCredential(config));
148
+ const serviceClient = createBlobServiceClient(registryAzureAccountUrl, config.azureManagedIdentityClientId);
148
149
  const blobClient = serviceClient.getContainerClient(registryContainer).getBlockBlobClient(registryBlob);
149
150
  if (!await blobClient.exists()) {
150
151
  throw new Error(`mailroom registry blob not found: ${registryAzureAccountUrl}/${registryContainer}/${registryBlob}`);
@@ -164,7 +165,7 @@ async function writeMailroomRegistry(config, registry) {
164
165
  if (!registryAzureAccountUrl || !registryBlob) {
165
166
  throw new Error("mailroom config is missing registryPath or hosted registry coordinates");
166
167
  }
167
- const serviceClient = new storage_blob_1.BlobServiceClient(registryAzureAccountUrl, createBlobCredential(config));
168
+ const serviceClient = createBlobServiceClient(registryAzureAccountUrl, config.azureManagedIdentityClientId);
168
169
  const blobClient = serviceClient.getContainerClient(registryContainer).getBlockBlobClient(registryBlob);
169
170
  await blobClient.upload(serialized, Buffer.byteLength(serialized), {
170
171
  blobHTTPHeaders: {
@@ -172,7 +173,7 @@ async function writeMailroomRegistry(config, registry) {
172
173
  },
173
174
  });
174
175
  }
175
- function resolveMailroomReader(agentName = (0, identity_2.getAgentName)()) {
176
+ function resolveMailroomReader(agentName = (0, identity_1.getAgentName)()) {
176
177
  const runtime = (0, runtime_credentials_1.readRuntimeCredentialConfig)(agentName);
177
178
  if (!runtime.ok) {
178
179
  const result = {
@@ -222,7 +223,7 @@ function resolveMailroomReader(agentName = (0, identity_2.getAgentName)()) {
222
223
  });
223
224
  return result;
224
225
  }
225
- function resolveHostedMailAuthority(agentName = (0, identity_2.getAgentName)()) {
226
+ function resolveHostedMailAuthority(agentName = (0, identity_1.getAgentName)()) {
226
227
  const runtime = (0, runtime_credentials_1.readRuntimeCredentialConfig)(agentName);
227
228
  if (!runtime.ok) {
228
229
  const result = {
@@ -259,9 +260,7 @@ function resolveHostedMailAuthority(agentName = (0, identity_2.getAgentName)())
259
260
  const azureContainer = textField(mailroom, "azureContainer") ?? "mailroom";
260
261
  const azureManagedIdentityClientId = textField(mailroom, "azureManagedIdentityClientId");
261
262
  const store = new blob_store_1.AzureBlobMailroomStore({
262
- serviceClient: new storage_blob_1.BlobServiceClient(azureAccountUrl, azureManagedIdentityClientId
263
- ? new identity_1.DefaultAzureCredential({ managedIdentityClientId: azureManagedIdentityClientId })
264
- : new identity_1.DefaultAzureCredential()),
263
+ serviceClient: createBlobServiceClient(azureAccountUrl, azureManagedIdentityClientId),
265
264
  containerName: azureContainer,
266
265
  });
267
266
  const result = {
@@ -280,7 +279,7 @@ function resolveHostedMailAuthority(agentName = (0, identity_2.getAgentName)())
280
279
  });
281
280
  return result;
282
281
  }
283
- async function resolveMailroomReaderWithRefresh(agentName = (0, identity_2.getAgentName)()) {
282
+ async function resolveMailroomReaderWithRefresh(agentName = (0, identity_1.getAgentName)()) {
284
283
  const resolved = resolveMailroomReader(agentName);
285
284
  if (resolved.ok
286
285
  || resolved.reason !== "auth-required"
@@ -8,12 +8,41 @@
8
8
  * (e.g., passing card details to Duffel) — the returned data must
9
9
  * never escape the calling function's scope.
10
10
  */
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
14
44
  Object.defineProperty(exports, "__esModule", { value: true });
15
45
  exports.createStripeClient = createStripeClient;
16
- const stripe_1 = __importDefault(require("stripe"));
17
46
  const credential_access_1 = require("./credential-access");
18
47
  const runtime_1 = require("../nerves/runtime");
19
48
  // ---------------------------------------------------------------------------
@@ -32,7 +61,9 @@ function toCardInfo(card) {
32
61
  async function createStripeClient() {
33
62
  const store = (0, credential_access_1.getCredentialStore)();
34
63
  const apiKey = await store.getRawSecret("stripe.com", "restrictedKey");
35
- const StripeFactory = stripe_1.default;
64
+ // Stripe's SDK is about 10 MB and 185 modules; only agents that issue cards load it.
65
+ const { default: StripeConstructor } = await Promise.resolve().then(() => __importStar(require("stripe")));
66
+ const StripeFactory = StripeConstructor;
36
67
  const stripe = new StripeFactory(apiKey);
37
68
  return {
38
69
  async createVirtualCard(opts) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.996",
3
+ "version": "0.1.0-alpha.998",
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.996",
9
+ "version": "0.1.0-alpha.998",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.996",
3
+ "version": "0.1.0-alpha.998",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },