@ouro.bot/cli 0.1.0-alpha.706 → 0.1.0-alpha.707

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.707",
6
+ "changes": [
7
+ "Build RSVP BlueBubbles send clients from explicit agent runtime config during native refresh and smoke runs."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.706",
6
12
  "changes": [
package/dist/rsvp/cli.js CHANGED
@@ -211,6 +211,50 @@ function blueBubblesChatFor(config) {
211
211
  participantHandles: [],
212
212
  };
213
213
  }
214
+ function numberField(record, key, fallback) {
215
+ const value = record?.[key];
216
+ return typeof value === "number" && Number.isFinite(value) ? value : fallback;
217
+ }
218
+ function stringArrayField(record, key) {
219
+ const value = record?.[key];
220
+ if (!Array.isArray(value))
221
+ return [];
222
+ return value.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean);
223
+ }
224
+ function recordField(record, key) {
225
+ const value = record[key];
226
+ return value && typeof value === "object" && !Array.isArray(value)
227
+ ? value
228
+ : null;
229
+ }
230
+ function rsvpBlueBubblesClientConfig(nativeConfig, machineRuntimeConfig) {
231
+ if (!machineRuntimeConfig.ok) {
232
+ throw new Error(`BlueBubbles runtime config unavailable at ${machineRuntimeConfig.itemPath}: ${machineRuntimeConfig.error}`);
233
+ }
234
+ const bluebubbles = recordField(machineRuntimeConfig.config, "bluebubbles");
235
+ const bluebubblesChannel = recordField(machineRuntimeConfig.config, "bluebubblesChannel");
236
+ const serverUrl = localText(bluebubbles?.serverUrl);
237
+ const password = localText(bluebubbles?.password);
238
+ if (!serverUrl) {
239
+ throw new Error("bluebubbles.serverUrl is required in this machine's agent-vault runtime config. Run `ouro connect bluebubbles --agent <agent>`.");
240
+ }
241
+ if (!password) {
242
+ throw new Error("bluebubbles.password is required in this machine's agent-vault runtime config. Run `ouro connect bluebubbles --agent <agent>`.");
243
+ }
244
+ return {
245
+ config: {
246
+ serverUrl,
247
+ password,
248
+ accountId: localText(bluebubbles?.accountId) || localText(nativeConfig.bluebubblesRoute.accountId) || "default",
249
+ ownHandles: stringArrayField(bluebubbles, "ownHandles"),
250
+ },
251
+ channelConfig: {
252
+ port: numberField(bluebubblesChannel, "port", 18790),
253
+ webhookPath: localText(bluebubblesChannel?.webhookPath) || "/bluebubbles-webhook",
254
+ requestTimeoutMs: numberField(bluebubblesChannel, "requestTimeoutMs", 30_000),
255
+ },
256
+ };
257
+ }
214
258
  function normalizeDelivery(value) {
215
259
  const record = value && typeof value === "object" && !Array.isArray(value) ? value : {};
216
260
  return {
@@ -552,7 +596,8 @@ async function executeRefresh(command, deps) {
552
596
  const sendAllowed = wantsLiveSend;
553
597
  let delivery;
554
598
  if (sendAllowed) {
555
- const sent = await (0, client_1.createBlueBubblesClient)().sendText({
599
+ const bluebubbles = rsvpBlueBubblesClientConfig(configResult.config, machineRuntimeConfig);
600
+ const sent = await (0, client_1.createBlueBubblesClient)(bluebubbles.config, bluebubbles.channelConfig).sendText({
556
601
  chat: blueBubblesChatFor(configResult.config),
557
602
  text: reportText,
558
603
  tempGuid: outboundDecision.idempotencyKey,
@@ -658,7 +703,8 @@ async function executeSmoke(command, deps) {
658
703
  const sendAllowed = wantsLiveSend;
659
704
  let delivery;
660
705
  if (sendAllowed) {
661
- const sent = await (0, client_1.createBlueBubblesClient)().sendText({
706
+ const bluebubbles = rsvpBlueBubblesClientConfig(configResult.config, await (0, runtime_credentials_1.refreshMachineRuntimeCredentialConfig)(command.agent, machineIdForCli(), { preserveCachedOnFailure: true }));
707
+ const sent = await (0, client_1.createBlueBubblesClient)(bluebubbles.config, bluebubbles.channelConfig).sendText({
662
708
  chat: blueBubblesChatFor(configResult.config),
663
709
  text: answer.text,
664
710
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.706",
3
+ "version": "0.1.0-alpha.707",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",