dsh-tg-bridge 1.3.1 → 1.3.2
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/package.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// `steer()` — next-step input, not a queued next turn — which is what makes
|
|
7
7
|
// "добавь ещё вот это" land inside the current work instead of after it.
|
|
8
8
|
import { mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, appendFileSync } from 'node:fs';
|
|
9
|
+
import { randomUUID } from 'node:crypto';
|
|
9
10
|
import { homedir } from 'node:os';
|
|
10
11
|
import { join } from 'node:path';
|
|
11
12
|
|
|
@@ -83,6 +84,12 @@ function apply(ctx, config = {}) {
|
|
|
83
84
|
'Then continue the work and include this addition. Do not repeat that line in the final answer.',
|
|
84
85
|
].join('\n');
|
|
85
86
|
agent.steer({
|
|
87
|
+
// DSH stores the steered message verbatim and validates the session
|
|
88
|
+
// log on load: an event whose message has no `id`/`role` makes every
|
|
89
|
+
// later turn fail with "event at seq N lacks an identified message",
|
|
90
|
+
// and the whole topic dies until the log is repaired by hand.
|
|
91
|
+
id: randomUUID(),
|
|
92
|
+
role: 'user',
|
|
86
93
|
content: [{ type: 'text', text: `${String(job.text ?? '')}${line}` }],
|
|
87
94
|
source: { kind: 'tg-bridge' },
|
|
88
95
|
});
|