@try-works/dsh-recursive-mode 0.1.14 → 0.1.15

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/lib/index.js CHANGED
@@ -6116,10 +6116,11 @@ function makeRecursiveRoutes(host) {
6116
6116
  "cache-control": "no-cache",
6117
6117
  connection: "keep-alive"
6118
6118
  });
6119
- const push = () => {
6119
+ const push = async () => {
6120
+ const projection = await host.snapshot(root);
6120
6121
  const payload = {
6121
6122
  root,
6122
- projection: host.snapshot(root),
6123
+ projection,
6123
6124
  revision: host.revision(root)
6124
6125
  };
6125
6126
  res.write("data: " + JSON.stringify(payload) + "\n\n");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@try-works/dsh-recursive-mode",
3
3
  "description": "recursive-mode workflow as a DeepSeek Harness bundle: RecursiveRuntime service + recursive_status tool",
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
package/src/live-route.ts CHANGED
@@ -97,8 +97,9 @@ export function makeRecursiveRoutes(host: RecursiveRouteHost): readonly { kind:
97
97
  const root = sessionId === undefined && cwd === '' ? null : await host.resolveRoot(sessionId, cwd)
98
98
  if (root === null) { res.writeHead(200, { 'content-type': 'text/event-stream; charset=utf-8', 'cache-control': 'no-cache', connection: 'keep-alive' }); res.write('data: {"root":null,"projection":{},"revision":0}\n\n'); res.end(); return }
99
99
  res.writeHead(200, { 'content-type': 'text/event-stream; charset=utf-8', 'cache-control': 'no-cache', connection: 'keep-alive' })
100
- const push = (): void => {
101
- const payload = { root, projection: host.snapshot(root), revision: host.revision(root) }
100
+ const push = async (): Promise<void> => {
101
+ const projection = await host.snapshot(root)
102
+ const payload = { root, projection, revision: host.revision(root) }
102
103
  res.write('data: ' + JSON.stringify(payload) + '\n\n')
103
104
  }
104
105
  const heartbeat = setInterval(() => { res.write(': ping\n\n') }, HEARTBEAT_MS)