dsh-plugin-soulbridge 0.0.108 → 0.0.109
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 +4 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -37,6 +37,8 @@ import {
|
|
|
37
37
|
readVerification,
|
|
38
38
|
escapeAttr,
|
|
39
39
|
escapeBlockText,
|
|
40
|
+
INFERRED_MARKER,
|
|
41
|
+
SOURCE_NOTES,
|
|
40
42
|
} from 'soulbridge';
|
|
41
43
|
|
|
42
44
|
export const name = 'dsh-plugin-soulbridge';
|
|
@@ -502,7 +504,7 @@ export function buildFactHooks(text, options = {}) {
|
|
|
502
504
|
const when = fact.atText ?? (fact.at ? new Date(fact.at).toISOString().slice(0, 10) : '');
|
|
503
505
|
// ADR 0035: a fact from my side of the exchange is inferred. Two characters plus one
|
|
504
506
|
// explanation below the block, because a per-line sentence would double the text.
|
|
505
|
-
const marker = fact.source === 'inferred' ?
|
|
507
|
+
const marker = fact.source === 'inferred' ? INFERRED_MARKER : '';
|
|
506
508
|
if (marker) sawInferred = true;
|
|
507
509
|
lines.push(`- ${marker}[${fact.id}] ${escapeBlockText(fact.statement)}${when ? `(${escapeBlockText(when)})` : ''}`);
|
|
508
510
|
used.push(fact.id);
|
|
@@ -515,11 +517,7 @@ export function buildFactHooks(text, options = {}) {
|
|
|
515
517
|
log(`prestep: hooks failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
516
518
|
}
|
|
517
519
|
if (parts.length === 0) return '';
|
|
518
|
-
if (sawInferred)
|
|
519
|
-
parts.push(
|
|
520
|
-
'<source-notes>以「我:」开头的是我上一轮说的话,未经用户确认;没标的都是用户说的。</source-notes>',
|
|
521
|
-
);
|
|
522
|
-
}
|
|
520
|
+
if (sawInferred) parts.push(SOURCE_NOTES);
|
|
523
521
|
return { text: parts.join('\n\n'), used };
|
|
524
522
|
}
|
|
525
523
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-soulbridge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.109",
|
|
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.106 <0.1.0"
|
|
46
46
|
}
|
|
47
47
|
}
|