dsh-plugin-soulbridge 0.0.115 → 0.0.117
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/index.js +15 -5
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -763,11 +763,14 @@ export function renderRulesBlock(rules) {
|
|
|
763
763
|
/** How many facts one window may put in the prompt before it is cut. */
|
|
764
764
|
const TIME_WINDOW_LIMIT = 10;
|
|
765
765
|
|
|
766
|
-
/**
|
|
766
|
+
/**
|
|
767
|
+
* A calendar day in the unit the store writes: the UTC date of a day instant.
|
|
768
|
+
*
|
|
769
|
+
* Not the local date: facts store days as UTC midnights, so the local reading would
|
|
770
|
+
* disagree in any timezone west of UTC — and agree only by luck in ours.
|
|
771
|
+
*/
|
|
767
772
|
function isoDay(ms) {
|
|
768
|
-
|
|
769
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
770
|
-
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
773
|
+
return new Date(ms).toISOString().slice(0, 10);
|
|
771
774
|
}
|
|
772
775
|
|
|
773
776
|
/** When a fact happened, as the injection may say it: a located date, or the words said. */
|
|
@@ -1423,7 +1426,7 @@ async function runExtraction(text, turnId, turnNo, origin = 'live', thread = nul
|
|
|
1423
1426
|
const inferred = result.facts.filter((fact) => fact.source === 'inferred').length;
|
|
1424
1427
|
log(
|
|
1425
1428
|
`extract ok: by=${draft.by} reason=${draft.reason ?? '-'} entities=${result.entities.length} facts=${result.facts.length}` +
|
|
1426
|
-
` gaps=${result.gaps.length} skipped=${result.skipped.length}` +
|
|
1429
|
+
` gaps=${result.gaps.length} skipped=${result.skipped.length} draftSkipped=${(draft.skipped ?? []).length}` +
|
|
1427
1430
|
` slots->text=${result.droppedSlots.length} holder->world=${result.holderFallbacks.length}` +
|
|
1428
1431
|
` inferred=${inferred}` +
|
|
1429
1432
|
` unit=${turns ? `${turns.length}turns` : '1turn'} threadId=${thread?.id ?? '-'}` +
|
|
@@ -1435,6 +1438,12 @@ async function runExtraction(text, turnId, turnNo, origin = 'live', thread = nul
|
|
|
1435
1438
|
for (const skipped of result.skipped.slice(0, 3)) {
|
|
1436
1439
|
log(` extract skipped: ${skipped.what} (${skipped.reason})`);
|
|
1437
1440
|
}
|
|
1441
|
+
// Draft-level drops are the extractor's own decisions (a sentence it could not
|
|
1442
|
+
// structure, an item the model wrote and the gate refused). Visible here so the
|
|
1443
|
+
// floor cannot throw work away silently.
|
|
1444
|
+
for (const dropped of (draft.skipped ?? []).slice(0, 3)) {
|
|
1445
|
+
log(` extract dropped: ${dropped.what} (${dropped.reason})`);
|
|
1446
|
+
}
|
|
1438
1447
|
for (const slot of result.droppedSlots.slice(0, 3)) {
|
|
1439
1448
|
log(` extract slot kept as text: ${slot.slot}=${slot.value} (undeclared)`);
|
|
1440
1449
|
}
|
|
@@ -1447,6 +1456,7 @@ async function runExtraction(text, turnId, turnNo, origin = 'live', thread = nul
|
|
|
1447
1456
|
facts: result.facts.length,
|
|
1448
1457
|
gaps: result.gaps.length,
|
|
1449
1458
|
skipped: result.skipped,
|
|
1459
|
+
draftSkipped: (draft.skipped ?? []).slice(0, 5),
|
|
1450
1460
|
droppedSlots: result.droppedSlots,
|
|
1451
1461
|
holderFallbacks: result.holderFallbacks,
|
|
1452
1462
|
thread: attribution.threadId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-soulbridge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.117",
|
|
4
4
|
"description": "Inject soulbridge context into DSH sessions and feed user turns back as observations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"setup": "node scripts/install-hooks.mjs"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"soulbridge": ">=0.0.
|
|
45
|
+
"soulbridge": ">=0.0.116 <0.1.0"
|
|
46
46
|
}
|
|
47
47
|
}
|