@ouro.bot/cli 0.1.0-alpha.536 → 0.1.0-alpha.538

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,20 @@
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.538",
6
+ "changes": [
7
+ "The publish workflow now repairs a stale prerelease-polluted npm `latest` dist-tag to the just-published alpha while leaving future stable `latest` releases untouched.",
8
+ "Adds tested npm dist-tag policy helpers so prerelease publishes continue using `alpha` and default npm installs cannot quietly drift behind the supported alpha channel."
9
+ ]
10
+ },
11
+ {
12
+ "version": "0.1.0-alpha.537",
13
+ "changes": [
14
+ "Agents now render a trip-ledger truth section when structured travel plans exist, making the trip ledger outrank stale friend notes, old handoffs, and memory for itinerary and gap questions.",
15
+ "`trip_calendar` now explicitly tells agents to use the ledger before answering current itinerary, travel gap, or what-changed questions so mail-backed travel facts stay reachable in live conversations."
16
+ ]
17
+ },
4
18
  {
5
19
  "version": "0.1.0-alpha.536",
6
20
  "changes": [
@@ -40,6 +40,7 @@ exports.bodyMapSection = bodyMapSection;
40
40
  exports.runtimeInfoSection = runtimeInfoSection;
41
41
  exports.toolRestrictionSection = toolRestrictionSection;
42
42
  exports.startOfTurnPacketSection = startOfTurnPacketSection;
43
+ exports.tripLedgerTruthSection = tripLedgerTruthSection;
43
44
  exports.pulseSection = pulseSection;
44
45
  exports.centerOfGravitySteeringSection = centerOfGravitySteeringSection;
45
46
  exports.commitmentsSection = commitmentsSection;
@@ -83,6 +84,7 @@ const daemon_health_1 = require("../heart/daemon/daemon-health");
83
84
  const scrutiny_1 = require("./scrutiny");
84
85
  const pulse_1 = require("../heart/daemon/pulse");
85
86
  const provider_visibility_1 = require("../heart/provider-visibility");
87
+ const store_1 = require("../trips/store");
86
88
  function flattenSystemPrompt(sp) {
87
89
  const parts = [sp.stable, sp.volatile].filter(Boolean);
88
90
  return parts.join("\n\n");
@@ -713,6 +715,53 @@ function pendingMessagesSection(options) {
713
715
  }
714
716
  return lines.join("\n");
715
717
  }
718
+ function tripPromptAccessAllowed(channel, context) {
719
+ const senseType = (0, channel_1.getChannelCapabilities)(channel).senseType;
720
+ if (senseType === "local" || senseType === "internal")
721
+ return true;
722
+ return !!context?.friend && (0, types_1.isTrustedLevel)(context.friend.trustLevel);
723
+ }
724
+ function tripRecordDateRange(trip) {
725
+ if (trip.startDate && trip.endDate)
726
+ return `${trip.startDate} -> ${trip.endDate}`;
727
+ return trip.startDate ?? trip.endDate ?? "undated";
728
+ }
729
+ function renderTripLedgerSummary(trip) {
730
+ return `- ${trip.tripId} :: "${trip.name}" [${trip.status}; ${tripRecordDateRange(trip)}; legs: ${trip.legs.length}; updated: ${trip.updatedAt}]`;
731
+ }
732
+ function tripLedgerTruthSection(channel, context) {
733
+ if (!tripPromptAccessAllowed(channel, context))
734
+ return "";
735
+ let tripIds;
736
+ try {
737
+ tripIds = (0, store_1.listTripIds)((0, identity_1.getAgentName)());
738
+ }
739
+ catch {
740
+ return "";
741
+ }
742
+ if (tripIds.length === 0)
743
+ return "";
744
+ const lines = [
745
+ "## trip ledger truth",
746
+ "The trip ledger is the canonical structured source for travel plans. It outranks friend notes, old handoffs, and memory when those disagree.",
747
+ "When asked about travel plans, bookings, itinerary gaps, or what changed, I check `trip_status`, `trip_get`, or `trip_calendar` before answering from memory. I use `mail_search`/`mail_body` when the ledger is missing a needed fact or when verifying a claimed absence.",
748
+ "If a leg is `tentative`, I say it is tentative/inferred. I do not call it a booking or a gap unless the mail evidence supports that.",
749
+ "known trips:",
750
+ ];
751
+ const visibleTripIds = tripIds.slice(0, 8);
752
+ for (const tripId of visibleTripIds) {
753
+ try {
754
+ lines.push(renderTripLedgerSummary((0, store_1.readTripRecord)((0, identity_1.getAgentName)(), tripId)));
755
+ }
756
+ catch {
757
+ lines.push(`- ${tripId} :: unreadable right now; use trip_get before reasoning from it.`);
758
+ }
759
+ }
760
+ if (tripIds.length > visibleTripIds.length) {
761
+ lines.push(`- ${tripIds.length - visibleTripIds.length} more trip(s); use trip_status for the full list.`);
762
+ }
763
+ return lines.join("\n");
764
+ }
716
765
  /**
717
766
  * The pulse section: machine-wide situational awareness shared across all
718
767
  * peer agents on this machine. Reads ~/.ouro-cli/pulse.json (written by
@@ -1358,6 +1407,7 @@ async function buildSystem(channel = "cli", options, context) {
1358
1407
  "# dynamic state for this turn",
1359
1408
  startOfTurnPacketSection(options),
1360
1409
  pulseSection(channel),
1410
+ tripLedgerTruthSection(channel, context),
1361
1411
  liveWorldStateSection(options),
1362
1412
  pendingMessagesSection(options),
1363
1413
  activeWorkSection(options),
@@ -541,7 +541,7 @@ exports.tripToolDefinitions = [
541
541
  type: "function",
542
542
  function: {
543
543
  name: "trip_calendar",
544
- description: "Render a chronological calendar/agenda projection from the trip ledger. Use this after extracting mail-backed trip facts so the agent can track dates across lodging, travel, events, and local transport.",
544
+ description: "Render a chronological calendar/agenda projection from the trip ledger. Use this before answering current itinerary, travel gap, or what-changed questions; friend notes and old handoffs may be stale. Also use this after extracting mail-backed trip facts so the agent can track dates across lodging, travel, events, and local transport.",
545
545
  parameters: {
546
546
  type: "object",
547
547
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.536",
3
+ "version": "0.1.0-alpha.538",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",