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

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,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.1076",
6
+ "changes": [
7
+ "The daemon pings providers from a short-lived child, so the provider SDK doesn't stay resident"
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.1075",
12
+ "changes": [
13
+ "A Teams message from an ouro msg, habit or private-runtime turn (send_message or surface) goes out now on the machine that runs the Teams sense, instead of waiting for the friend's next Teams message; the same text is not sent twice within 15 minutes"
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.1071",
6
18
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1071",
2
+ "runtimeVersion": "0.1.0-alpha.1076",
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.1071</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1076</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -64,6 +64,7 @@ const container_runtime_1 = require("./container-runtime");
64
64
  const supercronic_supervisor_1 = require("./supercronic-supervisor");
65
65
  const daemon_tombstone_1 = require("./daemon-tombstone");
66
66
  const agent_config_check_1 = require("./agent-config-check");
67
+ const provider_ping_child_1 = require("../provider-ping-child");
67
68
  const pulse_1 = require("./pulse");
68
69
  const socket_client_1 = require("./socket-client");
69
70
  const portable_git_1 = require("./portable-git");
@@ -719,7 +720,8 @@ async function prepareProviderRuntime() {
719
720
  // Read from the same vault listing: whether this machine has config or not, the
720
721
  // daemon then knows, and its bootstrap spares each worker and sense a vault CLI run.
721
722
  await (0, runtime_credentials_1.refreshMachineRuntimeCredentialConfig)(agent, daemonMachineId, { preserveCachedOnFailure: true });
722
- const result = await (0, agent_config_check_1.checkAgentConfigWithProviderHealth)(agent, bundlesRoot);
723
+ // The ping runs in a child process, so the provider SDK it loads doesn't stay in the daemon.
724
+ const result = await (0, agent_config_check_1.checkAgentConfigWithProviderHealth)(agent, bundlesRoot, { pingProvider: provider_ping_child_1.pingProviderInChild });
723
725
  if (result.ok)
724
726
  return null;
725
727
  (0, runtime_1.emitNervesEvent)({
@@ -0,0 +1,125 @@
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
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.runProviderPingChild = runProviderPingChild;
37
+ exports.pingProviderInChild = pingProviderInChild;
38
+ exports.serveProviderPingChild = serveProviderPingChild;
39
+ const child_process_1 = require("child_process");
40
+ const path = __importStar(require("path"));
41
+ const runtime_1 = require("../nerves/runtime");
42
+ const PING_ENTRY = path.join(__dirname, "provider-ping-entry.js");
43
+ // Three attempts of the 10 s ping, plus startup, with room to spare.
44
+ const CHILD_TIMEOUT_MS = 60_000;
45
+ const pingInThisProcess = async (provider, config, options) => (await Promise.resolve().then(() => __importStar(require("./provider-ping")))).pingProvider(provider, config, options);
46
+ /** Run the ping entry with the request on stdin; resolve with its exit code and stdout. */
47
+ function runProviderPingChild(request, entry = PING_ENTRY, timeoutMs = CHILD_TIMEOUT_MS) {
48
+ return new Promise((resolve, reject) => {
49
+ const child = (0, child_process_1.spawn)(process.execPath, [entry], { stdio: ["pipe", "pipe", "ignore"], env: process.env });
50
+ let stdout = "";
51
+ const timer = setTimeout(() => child.kill("SIGKILL"), timeoutMs);
52
+ child.stdout.setEncoding("utf8");
53
+ child.stdout.on("data", (chunk) => { stdout += chunk; });
54
+ /* v8 ignore next -- spawn of this same node binary only fails if the host can't start a process @preserve */
55
+ child.on("error", (error) => { clearTimeout(timer); reject(error); });
56
+ child.on("close", (code) => { clearTimeout(timer); resolve({ code, stdout }); });
57
+ /* v8 ignore next -- EPIPE when the child dies before reading; the close handler reports it @preserve */
58
+ child.stdin.on("error", () => undefined);
59
+ child.stdin.end(request);
60
+ });
61
+ }
62
+ function parsePingResult(stdout) {
63
+ try {
64
+ const value = JSON.parse(stdout.trim());
65
+ return value && typeof value === "object" && typeof value.ok === "boolean" ? value : null;
66
+ }
67
+ catch {
68
+ return null;
69
+ }
70
+ }
71
+ /**
72
+ * Ping a provider from a short-lived child process, so the provider SDK it
73
+ * loads (about 11 MB for openai) leaves with the child instead of staying in a
74
+ * long-lived daemon. Progress callbacks can't cross a process boundary, so a
75
+ * ping that asks for them runs here. If the child can't produce a result, the
76
+ * ping runs here too: this changes where the ping runs, never its answer.
77
+ */
78
+ async function pingProviderInChild(provider, config, options = {}, deps = {}) {
79
+ const pingInProcess = deps.pingInProcess ?? pingInThisProcess;
80
+ if (options.sleep || options.onAttemptStart || options.onRetry)
81
+ return pingInProcess(provider, config, options);
82
+ const request = {
83
+ provider,
84
+ config,
85
+ options: { model: options.model, timeoutMs: options.timeoutMs, attemptPolicy: options.attemptPolicy },
86
+ };
87
+ let failure;
88
+ try {
89
+ const outcome = await (deps.runChild ?? runProviderPingChild)(JSON.stringify(request));
90
+ const result = parsePingResult(outcome.stdout);
91
+ if (result) {
92
+ (0, runtime_1.emitNervesEvent)({ component: "engine", event: "engine.provider_ping_child_done", message: "provider ping ran in a child process", meta: { provider, ok: result.ok } });
93
+ return result;
94
+ }
95
+ failure = `exit ${outcome.code} without a result`;
96
+ }
97
+ catch (error) {
98
+ failure = error instanceof Error ? error.message : String(error);
99
+ }
100
+ (0, runtime_1.emitNervesEvent)({
101
+ level: "warn",
102
+ component: "engine",
103
+ event: "engine.provider_ping_child_fallback",
104
+ message: "provider ping child gave no result; pinging in this process",
105
+ meta: { provider, failure },
106
+ });
107
+ return pingInProcess(provider, config, options);
108
+ }
109
+ /** The child's side: read one request, ping, write the result as one JSON line. */
110
+ async function serveProviderPingChild(input, write, ping = pingInThisProcess) {
111
+ let raw = "";
112
+ for await (const chunk of input)
113
+ raw += chunk.toString();
114
+ let request;
115
+ try {
116
+ request = JSON.parse(raw);
117
+ }
118
+ catch {
119
+ (0, runtime_1.emitNervesEvent)({ level: "error", component: "engine", event: "engine.provider_ping_child_bad_request", message: "provider ping child got an unreadable request", meta: {} });
120
+ return 2;
121
+ }
122
+ const result = await ping(request.provider, request.config, request.options);
123
+ write(`${JSON.stringify(result)}\n`);
124
+ return 0;
125
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const runtime_1 = require("../nerves/runtime");
4
+ const provider_ping_child_1 = require("./provider-ping-child");
5
+ /* v8 ignore start -- process entry: serveProviderPingChild is unit-tested, and the edge benchmark runs this end to end @preserve */
6
+ (0, runtime_1.emitNervesEvent)({ component: "engine", event: "engine.provider_ping_child_start", message: "provider ping child started", meta: {} });
7
+ void (0, provider_ping_child_1.serveProviderPingChild)(process.stdin, (text) => { process.stdout.write(text); }).then((code) => { process.exitCode = code; });
8
+ /* v8 ignore stop */
@@ -1044,23 +1044,38 @@ exports.sessionToolDefinitions = [
1044
1044
  };
1045
1045
  },
1046
1046
  teams: async (request) => {
1047
- if (!ctx?.botApi) {
1047
+ let result;
1048
+ if (ctx?.botApi) {
1049
+ const { sendProactiveTeamsMessageToSession } = await Promise.resolve().then(() => __importStar(require("../senses/teams")));
1050
+ result = await sendProactiveTeamsMessageToSession({
1051
+ friendId: request.friendId,
1052
+ sessionKey: request.key,
1053
+ text: request.content,
1054
+ intent: request.intent,
1055
+ authorizingSession: request.authorizingSession,
1056
+ origin: "send_message",
1057
+ }, {
1058
+ botApi: ctx.botApi,
1059
+ });
1060
+ }
1061
+ else {
1062
+ // Not a Teams turn (ouro msg, a habit, a private-runtime turn): send now where the Teams sense runs.
1063
+ const { sendTeamsOffTurn } = await Promise.resolve().then(() => __importStar(require("../senses/teams-off-turn")));
1064
+ result = await sendTeamsOffTurn({
1065
+ friendId: request.friendId,
1066
+ key: request.key,
1067
+ text: request.content,
1068
+ intent: request.intent,
1069
+ authorizingSession: request.authorizingSession,
1070
+ origin: "send_message",
1071
+ }, { agentRoot: (0, identity_1.getAgentRoot)() });
1072
+ }
1073
+ if (!result) {
1048
1074
  return {
1049
1075
  status: "unavailable",
1050
1076
  detail: "live delivery unavailable right now; queued for the next active turn",
1051
1077
  };
1052
1078
  }
1053
- const { sendProactiveTeamsMessageToSession } = await Promise.resolve().then(() => __importStar(require("../senses/teams")));
1054
- const result = await sendProactiveTeamsMessageToSession({
1055
- friendId: request.friendId,
1056
- sessionKey: request.key,
1057
- text: request.content,
1058
- intent: request.intent,
1059
- authorizingSession: request.authorizingSession,
1060
- origin: "send_message",
1061
- }, {
1062
- botApi: ctx.botApi,
1063
- });
1064
1079
  if (result.delivered) {
1065
1080
  return {
1066
1081
  status: "delivered_now",
@@ -183,6 +183,16 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
183
183
  ? { status: "delivered", detail: "sent to Telegram now" }
184
184
  : queueToSession(target, detail);
185
185
  };
186
+ const deliverTeamsOrQueue = async (target, detail) => {
187
+ const { sendTeamsOffTurn } = await Promise.resolve().then(() => __importStar(require("../senses/teams-off-turn")));
188
+ const sent = await sendTeamsOffTurn({ friendId: target.friendId, key: target.key, text: content, origin: "proactive" }, { agentRoot });
189
+ return sent?.delivered ? { status: "delivered", detail: "sent to Teams now" } : queueToSession(target, detail);
190
+ };
191
+ const deliverOrQueue = (target, detail) => target.channel === "telegram"
192
+ ? deliverTelegramOrQueue(target, detail)
193
+ : target.channel === "teams"
194
+ ? deliverTeamsOrQueue(target, detail)
195
+ : queueToSession(target, detail);
186
196
  // Resolve friend name → UUID if needed (agents may pass name instead of UUID)
187
197
  let resolvedFriendId = friendId;
188
198
  if (!fs.existsSync(path.join(sessionsDir, friendId))) {
@@ -224,9 +234,7 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
224
234
  && bridge.attachedSessions.some((s) => s.friendId === activity.friendId && s.channel === activity.channel && s.key === activity.key));
225
235
  if (bridgeTarget) {
226
236
  const detail = `for next interaction via ${bridgeTarget.channel}`;
227
- return bridgeTarget.channel === "telegram"
228
- ? deliverTelegramOrQueue(bridgeTarget, detail)
229
- : queueToSession(bridgeTarget, detail);
237
+ return deliverOrQueue(bridgeTarget, detail);
230
238
  }
231
239
  }
232
240
  }
@@ -237,9 +245,7 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
237
245
  if (queueItem?.channel && queueItem.key && queueItem.channel !== "inner") {
238
246
  const target = { friendId, channel: queueItem.channel, key: queueItem.key };
239
247
  const detail = `for originating ${queueItem.channel} session`;
240
- return queueItem.channel === "telegram"
241
- ? deliverTelegramOrQueue(target, detail)
242
- : queueToSession(target, detail);
248
+ return deliverOrQueue(target, detail);
243
249
  }
244
250
  // Priority 2: Try proactive delivery first, then queue to freshest session
245
251
  const allFriendSessions = (0, session_activity_1.listSessionActivity)({ sessionsDir, friendsDir, agentName, activeThresholdMs: Number.MAX_SAFE_INTEGER })
@@ -248,9 +254,7 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
248
254
  const freshest = allFriendSessions[0];
249
255
  if (freshest) {
250
256
  const detail = `for next interaction via ${freshest.channel}`;
251
- return freshest.channel === "telegram"
252
- ? deliverTelegramOrQueue(freshest, detail)
253
- : queueToSession(freshest, detail);
257
+ return deliverOrQueue(freshest, detail);
254
258
  }
255
259
  // Priority 3: Deferred — no active session found
256
260
  const { getDeferredReturnDir } = await Promise.resolve().then(() => __importStar(require("../mind/pending")));
@@ -42,6 +42,7 @@ exports.readEnabledReachChannels = readEnabledReachChannels;
42
42
  exports.resolveNoticeTargets = resolveNoticeTargets;
43
43
  exports.noticeDeliveryId = noticeDeliveryId;
44
44
  exports.chooseTeamsBot = chooseTeamsBot;
45
+ exports.liveBotApi = liveBotApi;
45
46
  exports.createNoticeSender = createNoticeSender;
46
47
  exports.createOwnerNotifier = createOwnerNotifier;
47
48
  const node_crypto_1 = require("node:crypto");
@@ -0,0 +1,158 @@
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
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.OFF_TURN_REPEAT_WINDOW_MS = void 0;
37
+ exports.resetOffTurnTeamsBots = resetOffTurnTeamsBots;
38
+ exports.offTurnTeamsBotApi = offTurnTeamsBotApi;
39
+ exports.sendTeamsOffTurn = sendTeamsOffTurn;
40
+ const crypto_1 = require("crypto");
41
+ const fs = __importStar(require("fs"));
42
+ const path = __importStar(require("path"));
43
+ const friends_1 = require("@ouro.bot/friends");
44
+ const config_1 = require("../heart/config");
45
+ const identity_1 = require("../heart/identity");
46
+ const presence_1 = require("../heart/daemon/presence");
47
+ const machine_identity_1 = require("../heart/machine-identity");
48
+ const runtime_1 = require("../nerves/runtime");
49
+ const owner_notice_1 = require("./shepherd/owner-notice");
50
+ const bots = new Map();
51
+ /** Forget built clients (tests). */
52
+ function resetOffTurnTeamsBots() {
53
+ bots.clear();
54
+ }
55
+ function skip(friendId, reason, level = "info", detail) {
56
+ (0, runtime_1.emitNervesEvent)({
57
+ level,
58
+ component: "senses",
59
+ event: "senses.teams_off_turn_unavailable",
60
+ message: "no Teams bot client for a send from outside a Teams turn; the message stays queued",
61
+ meta: { friendId, reason, ...(detail ? { detail } : {}) },
62
+ });
63
+ return null;
64
+ }
65
+ async function friendTenantFromStore(agentRoot, friendId) {
66
+ const friend = await new friends_1.FileFriendStore(path.join(agentRoot, "friends")).get(friendId).catch(() => null);
67
+ return friend?.externalIds.find((identity) => identity.provider === "aad" && !identity.externalId.startsWith("group:"))?.tenantId;
68
+ }
69
+ async function offTurnTeamsBotApi(deps) {
70
+ const enabled = deps.teamsEnabled ? deps.teamsEnabled() : (0, identity_1.loadAgentConfig)().senses?.teams?.enabled === true;
71
+ if (!enabled)
72
+ return skip(deps.friendId, "teams_disabled");
73
+ const presence = deps.presence ? deps.presence() : (0, presence_1.readPresenceForAgent)(deps.agentRoot);
74
+ if (presence) {
75
+ const machineId = deps.machineId ? deps.machineId() : (0, machine_identity_1.readMachineIdentity)()?.machineId ?? null;
76
+ if (!machineId || !(0, presence_1.mayRunSense)(presence, machineId, "teams"))
77
+ return skip(deps.friendId, "teams_runs_elsewhere");
78
+ }
79
+ const tenantId = await (deps.friendTenant ?? ((id) => friendTenantFromStore(deps.agentRoot, id)))(deps.friendId);
80
+ const config = (0, owner_notice_1.chooseTeamsBot)(tenantId, (deps.primary ?? config_1.getTeamsConfig)(), (deps.secondary ?? config_1.getTeamsSecondaryConfig)());
81
+ if (!config)
82
+ return skip(deps.friendId, "no_teams_bot");
83
+ let bot = bots.get(config.clientId);
84
+ if (!bot) {
85
+ bot = (deps.botApi ?? owner_notice_1.liveBotApi)(config);
86
+ bots.set(config.clientId, bot);
87
+ }
88
+ try {
89
+ return await bot;
90
+ }
91
+ catch (error) {
92
+ // A client that could not be built is built again for the next send.
93
+ bots.delete(config.clientId);
94
+ return skip(deps.friendId, "bot_client_failed", "warn", error instanceof Error ? error.message : String(error));
95
+ }
96
+ }
97
+ /** A retried turn sends the same text again; within this window it counts as already sent. */
98
+ exports.OFF_TURN_REPEAT_WINDOW_MS = 15 * 60_000;
99
+ function ledgerPath(agentRoot) {
100
+ return path.join(agentRoot, "state", "teams", "off-turn-sent.json");
101
+ }
102
+ function readLedger(agentRoot, now) {
103
+ try {
104
+ const parsed = JSON.parse(fs.readFileSync(ledgerPath(agentRoot), "utf-8"));
105
+ const kept = {};
106
+ for (const [key, at] of Object.entries(parsed)) {
107
+ if (typeof at === "number" && now - at < exports.OFF_TURN_REPEAT_WINDOW_MS)
108
+ kept[key] = at;
109
+ }
110
+ return kept;
111
+ }
112
+ catch {
113
+ return {};
114
+ }
115
+ }
116
+ function writeLedger(agentRoot, ledger) {
117
+ const target = ledgerPath(agentRoot);
118
+ fs.mkdirSync(path.dirname(target), { recursive: true });
119
+ const temp = `${target}.${process.pid}.tmp`;
120
+ fs.writeFileSync(temp, `${JSON.stringify(ledger)}\n`, { mode: 0o600 });
121
+ fs.renameSync(temp, target);
122
+ }
123
+ /**
124
+ * Sends to a Teams friend from outside a Teams turn. Null when this machine has no Teams client to send with, so
125
+ * the caller queues as before. The same text to the same friend within the repeat window is not sent twice.
126
+ */
127
+ async function sendTeamsOffTurn(request, deps) {
128
+ const now = (deps.now ?? Date.now)();
129
+ const repeatKey = (0, crypto_1.createHash)("sha256").update(`${request.friendId}\0${request.text}`).digest("hex").slice(0, 32);
130
+ const ledger = readLedger(deps.agentRoot, now);
131
+ if (ledger[repeatKey] !== undefined) {
132
+ (0, runtime_1.emitNervesEvent)({
133
+ component: "senses",
134
+ event: "senses.teams_off_turn_repeat_skipped",
135
+ message: "the same Teams message went to this friend moments ago; not sending it twice",
136
+ meta: { friendId: request.friendId },
137
+ });
138
+ return { delivered: true };
139
+ }
140
+ const botApi = await offTurnTeamsBotApi({ ...deps, friendId: request.friendId });
141
+ if (!botApi)
142
+ return null;
143
+ const send = deps.send ?? (await Promise.resolve().then(() => __importStar(require("./teams")))).sendProactiveTeamsMessageToSession;
144
+ const result = await send({
145
+ friendId: request.friendId,
146
+ sessionKey: request.key,
147
+ text: request.text,
148
+ intent: request.intent ?? "generic_outreach",
149
+ ...(request.authorizingSession ? { authorizingSession: request.authorizingSession } : {}),
150
+ deliveryId: `off-turn:${repeatKey}`,
151
+ origin: request.origin,
152
+ }, { botApi });
153
+ if (result.delivered) {
154
+ ledger[repeatKey] = now;
155
+ writeLedger(deps.agentRoot, ledger);
156
+ }
157
+ return result;
158
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1071",
3
+ "version": "0.1.0-alpha.1076",
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.1071",
9
+ "version": "0.1.0-alpha.1076",
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.1071",
3
+ "version": "0.1.0-alpha.1076",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },