@ouro.bot/cli 0.1.0-alpha.1554 → 0.1.0-alpha.1556

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": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1556",
6
+ "changes": [
7
+ "`diary_write` no longer drops a new entry because a short old entry shares a few of its words. Its near-duplicate check now divides the words two entries share by all their distinct words (Jaccard). Before, it divided by the smaller entry's words, so a 3-word entry matched any long entry that contained two of its words. When the tool does skip an entry, it now says \"not saved\" and names the earlier entry that already says it, instead of \"saved diary entry (added=0, skipped=1)\"."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.1555",
12
+ "changes": [
13
+ "Update the Ouro UI files to Ouro UI v1.3.540."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.1554",
6
18
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1554",
2
+ "runtimeVersion": "0.1.0-alpha.1556",
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.1554</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1556</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -86,7 +86,9 @@ function overlapScore(left, right) {
86
86
  if (rightWords.has(word))
87
87
  common++;
88
88
  }
89
- return common / Math.min(leftWords.size, rightWords.size);
89
+ // Shared words over all distinct words (Jaccard). Dividing by the smaller entry's words instead made any short entry
90
+ // a "duplicate" of every long one that contained two of its three words.
91
+ return common / (leftWords.size + rightWords.size - common);
90
92
  }
91
93
  function readExistingEntries(factsPath) {
92
94
  if (!fs.existsSync(factsPath))
@@ -160,9 +162,10 @@ function appendEntriesWithDedup(stores, incoming, options) {
160
162
  const all = [...existing];
161
163
  let added = 0;
162
164
  let skipped = 0;
165
+ const duplicates = [];
163
166
  const semanticThreshold = options?.semanticThreshold;
164
167
  for (const fact of cappedIncoming) {
165
- const duplicate = all.some((prior) => {
168
+ const duplicate = all.find((prior) => {
166
169
  if (overlapScore(prior.text, fact.text) > DEDUP_THRESHOLD)
167
170
  return true;
168
171
  if (semanticThreshold !== undefined &&
@@ -175,6 +178,7 @@ function appendEntriesWithDedup(stores, incoming, options) {
175
178
  });
176
179
  if (duplicate) {
177
180
  skipped++;
181
+ duplicates.push({ id: duplicate.id, createdAt: duplicate.createdAt });
178
182
  continue;
179
183
  }
180
184
  all.push(fact);
@@ -189,7 +193,7 @@ function appendEntriesWithDedup(stores, incoming, options) {
189
193
  message: "diary write completed",
190
194
  meta: { added, skipped },
191
195
  });
192
- return { added, skipped };
196
+ return duplicates.length > 0 ? { added, skipped, duplicates } : { added, skipped };
193
197
  }
194
198
  async function buildEmbedding(text, embeddingProvider) {
195
199
  const provider = embeddingProvider ?? (0, embedding_provider_1.createDefaultEmbeddingProvider)();
@@ -357,6 +357,10 @@ exports.notesToolDefinitions = [
357
357
  locator: bundleRelativeLocator(path.join((0, record_paths_1.resolveRecordDiaryRoot)(), "facts.jsonl"), ctx),
358
358
  });
359
359
  }
360
+ const match = result.added === 0 ? result.duplicates?.[0] : undefined;
361
+ if (match) {
362
+ return `not saved: my diary already has this, entry ${match.id} from ${match.createdAt}. Read it with consult_diary; if this entry adds something, write only what is new.`;
363
+ }
360
364
  return `saved diary entry (added=${result.added}, skipped=${result.skipped})`;
361
365
  },
362
366
  summaryKeys: ["entry", "about"],
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1554",
3
+ "version": "0.1.0-alpha.1556",
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.1554",
9
+ "version": "0.1.0-alpha.1556",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1554",
3
+ "version": "0.1.0-alpha.1556",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {