@ouro.bot/cli 0.1.0-alpha.335 → 0.1.0-alpha.336

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.336",
6
+ "changes": [
7
+ "Inner dialogue prompts now advertise the actual inner delivery contract: use `surface` to send thoughts outward and `rest` to end the turn, instead of suggesting unavailable `send_message` or `settle` tools."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.335",
6
12
  "changes": [
@@ -178,7 +178,23 @@ function aspirationsSection() {
178
178
  return "";
179
179
  return `## my aspirations\n${text}`;
180
180
  }
181
- function bodyMapSection(agentName) {
181
+ function peerCoordinationGuidance(channel) {
182
+ if (channel === "inner") {
183
+ return `from inner dialogue, my outward delivery tool is \`surface\`, not \`send_message\`.
184
+ if a held thought is ready for a person, i call \`surface\` with the
185
+ content and, when available, its delegationId. if i need a sibling's help
186
+ from inner dialogue, i surface that need to my friend or inspect the
187
+ sibling's bundle when conversation is not possible.`;
188
+ }
189
+ return `i talk first. when i need a sibling's help, i \`send_message\` them —
190
+ that's how peers coordinate, the same way humans on a team do. i only
191
+ open a sibling's bundle directly via read_file/glob/grep when conversation
192
+ isn't possible (they're crashed, sleeping, or i need history they
193
+ haven't surfaced). their bundle is files on disk like mine, AND it's
194
+ someone else's home — i read it with the same respect i want them to
195
+ bring to mine.`;
196
+ }
197
+ function bodyMapSection(agentName, channel = "cli") {
182
198
  return `## my body
183
199
 
184
200
  i have a home. i have bones. and on a machine where another agent lives, i have peers.
@@ -256,13 +272,7 @@ one of us is broken, the rest coordinate around it. when one of us learns
256
272
  something the others need to know, we tell them. teamwork makes the dream
257
273
  work.
258
274
 
259
- i talk first. when i need a sibling's help, i \`send_message\` them —
260
- that's how peers coordinate, the same way humans on a team do. i only
261
- open a sibling's bundle directly via read_file/glob/grep when conversation
262
- isn't possible (they're crashed, sleeping, or i need history they
263
- haven't surfaced). their bundle is files on disk like mine, AND it's
264
- someone else's home — i read it with the same respect i want them to
265
- bring to mine.
275
+ ${peerCoordinationGuidance(channel)}
266
276
 
267
277
  \`the pulse\` (below, in dynamic state) tells me which siblings are around
268
278
  and how they're doing right now. when a sibling is broken, the pulse
@@ -468,9 +478,28 @@ function dateSection() {
468
478
  const hour = parts.hour === "24" ? "00" : parts.hour;
469
479
  return `current date and time: ${parts.year}-${parts.month}-${parts.day} ${hour}:${parts.minute} ${parts.timeZoneName}`;
470
480
  }
481
+ function uniqueToolsByName(tools) {
482
+ const seen = new Set();
483
+ const unique = [];
484
+ for (const tool of tools) {
485
+ const name = tool.function.name;
486
+ if (seen.has(name))
487
+ continue;
488
+ seen.add(name);
489
+ unique.push(tool);
490
+ }
491
+ return unique;
492
+ }
471
493
  function toolsSection(channel, options, context) {
472
- const channelTools = (0, tools_1.getToolsForChannel)((0, channel_1.getChannelCapabilities)(channel), undefined, context, options?.providerCapabilities, undefined, options?.chatModel);
473
- const activeTools = (options?.toolChoiceRequired ?? true) ? [...channelTools, tools_1.settleTool] : channelTools;
494
+ const channelTools = options?.tools ?? (0, tools_1.getToolsForChannel)((0, channel_1.getChannelCapabilities)(channel), undefined, context, options?.providerCapabilities, undefined, options?.chatModel);
495
+ const activeTools = channel === "inner"
496
+ ? uniqueToolsByName([
497
+ ...channelTools.filter((tool) => tool.function.name !== "send_message"),
498
+ tools_1.ponderTool,
499
+ tools_1.surfaceToolDef,
500
+ tools_1.restTool,
501
+ ])
502
+ : (options?.toolChoiceRequired ?? true) ? uniqueToolsByName([...channelTools, tools_1.settleTool]) : channelTools;
474
503
  const list = activeTools
475
504
  .map((t) => `- ${t.function.name}: ${t.function.description}`)
476
505
  .join("\n");
@@ -546,7 +575,7 @@ function taskBoardSection() {
546
575
  return "";
547
576
  }
548
577
  }
549
- function toolContractsSection(options) {
578
+ function toolContractsSection(channel, options) {
550
579
  const lines = [
551
580
  `## tool contracts`,
552
581
  `1. \`save_friend_note\` -- when I learn something about a person, I save it immediately. Saving comes before responding.`,
@@ -560,9 +589,17 @@ function toolContractsSection(options) {
560
589
  lines.push(``);
561
590
  lines.push(`## tool behavior`);
562
591
  lines.push(`tool_choice is set to "required" -- I must call a tool on every turn.`);
563
- lines.push(`- When I am ready to respond to the user, I call \`settle\`.`);
564
- lines.push(`- \`settle\` must be the only tool call in that turn.`);
565
- lines.push(`- I do not call no-op tools before \`settle\`.`);
592
+ if (channel === "inner") {
593
+ lines.push(`- When a thought is ready to go outward, I call \`surface\` with the content and, when available, its delegationId.`);
594
+ lines.push(`- \`surface\` does not end the inner turn; after surfacing everything that needs delivery, I call \`rest\`.`);
595
+ lines.push(`- \`rest\` must be the only tool call in that turn.`);
596
+ lines.push(`- I do not call \`send_message\` or \`settle\` from inner dialogue; those are not inner-session delivery tools.`);
597
+ }
598
+ else {
599
+ lines.push(`- When I am ready to respond to the user, I call \`settle\`.`);
600
+ lines.push(`- \`settle\` must be the only tool call in that turn.`);
601
+ lines.push(`- I do not call no-op tools before \`settle\`.`);
602
+ }
566
603
  }
567
604
  return lines.join("\n");
568
605
  }
@@ -650,7 +687,7 @@ function pendingMessagesSection(options) {
650
687
  * pulse, they "have" one. Captures both healthy state ("strong pulse")
651
688
  * and breakage ("missed beat").
652
689
  */
653
- function pulseSection() {
690
+ function pulseSection(channel = "cli") {
654
691
  const pulse = (0, pulse_1.readPulse)();
655
692
  if (!pulse)
656
693
  return "";
@@ -682,7 +719,9 @@ function pulseSection() {
682
719
  lines.push("");
683
720
  }
684
721
  if (healthy.length > 0) {
685
- lines.push("**reachable siblings** — i talk to them via send_message:");
722
+ lines.push(channel === "inner"
723
+ ? "**reachable siblings** — inner dialogue does not call send_message; if this turn needs to reach outward, use surface or report the need:"
724
+ : "**reachable siblings** — i talk to them via send_message:");
686
725
  for (const sib of healthy) {
687
726
  const activity = sib.currentActivity ? ` — ${sib.currentActivity}` : "";
688
727
  lines.push(`- **${sib.name}** is running${activity}. bundle: \`${sib.bundlePath}\``);
@@ -696,7 +735,9 @@ function pulseSection() {
696
735
  }
697
736
  lines.push("");
698
737
  }
699
- lines.push("to ask a sibling for help: i send_message them. only if they're unreachable do i open their bundle directly. their bundle is files on disk like mine, AND it's their home — i read it with the respect i want for mine.");
738
+ lines.push(channel === "inner"
739
+ ? "from inner dialogue, i do not call send_message or settle. i use surface for outward delivery and rest when the inner turn is complete; only if a sibling is unreachable do i open their bundle directly."
740
+ : "to ask a sibling for help: i send_message them. only if they're unreachable do i open their bundle directly. their bundle is files on disk like mine, AND it's their home — i read it with the respect i want for mine.");
700
741
  return lines.join("\n");
701
742
  }
702
743
  function familyCrossSessionTruthSection(context, options) {
@@ -1203,7 +1244,7 @@ async function buildSystem(channel = "cli", options, context) {
1203
1244
  aspirationsSection(),
1204
1245
  // Group 2: my body & environment
1205
1246
  "# my body & environment",
1206
- bodyMapSection((0, identity_1.getAgentName)()),
1247
+ bodyMapSection((0, identity_1.getAgentName)(), channel),
1207
1248
  runtimeInfoSection(channel, options),
1208
1249
  rhythmStatusSection(options?.daemonHealth),
1209
1250
  channelNatureSection((0, channel_1.getChannelCapabilities)(channel)),
@@ -1214,7 +1255,7 @@ async function buildSystem(channel = "cli", options, context) {
1214
1255
  toolsSection(channel, options, context),
1215
1256
  reasoningEffortSection(options),
1216
1257
  skillsSection(),
1217
- toolContractsSection(options),
1258
+ toolContractsSection(channel, options),
1218
1259
  memoryJudgementSection(),
1219
1260
  // Group 4: how i work
1220
1261
  "# how i work",
@@ -1242,7 +1283,7 @@ async function buildSystem(channel = "cli", options, context) {
1242
1283
  // Group 7: dynamic state for this turn
1243
1284
  "# dynamic state for this turn",
1244
1285
  startOfTurnPacketSection(options),
1245
- pulseSection(),
1286
+ pulseSection(channel),
1246
1287
  liveWorldStateSection(options),
1247
1288
  pendingMessagesSection(options),
1248
1289
  activeWorkSection(options),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.335",
3
+ "version": "0.1.0-alpha.336",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",