@koda-sl/baker-bridge 0.109.0 → 0.110.0-dev.6a86a7961
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/README.md +19 -19
- package/dist/hono/agent-session.d.ts +0 -1
- package/dist/hono/agent-session.d.ts.map +1 -1
- package/dist/hono/agent-session.js +2 -13
- package/dist/hono/agent-session.js.map +1 -1
- package/dist/hono/agent-session.test.js +0 -37
- package/dist/hono/agent-session.test.js.map +1 -1
- package/dist/hono/agent-tasks.d.ts.map +1 -1
- package/dist/hono/agent-tasks.js +3 -7
- package/dist/hono/agent-tasks.js.map +1 -1
- package/dist/hono/agent-tasks.test.js +0 -15
- package/dist/hono/agent-tasks.test.js.map +1 -1
- package/dist/hono/agent.d.ts.map +1 -1
- package/dist/hono/agent.js +9 -12
- package/dist/hono/agent.js.map +1 -1
- package/dist/hono/attachments.d.ts +1 -6
- package/dist/hono/attachments.d.ts.map +1 -1
- package/dist/hono/attachments.js +4 -9
- package/dist/hono/attachments.js.map +1 -1
- package/dist/hono/attachments.test.js +0 -5
- package/dist/hono/attachments.test.js.map +1 -1
- package/dist/hono/bridge-job.d.ts +12 -31
- package/dist/hono/bridge-job.d.ts.map +1 -1
- package/dist/hono/bridge-job.js +68 -130
- package/dist/hono/bridge-job.js.map +1 -1
- package/dist/hono/bridge-job.test.js +170 -227
- package/dist/hono/bridge-job.test.js.map +1 -1
- package/dist/hono/main-sync.d.ts +46 -0
- package/dist/hono/main-sync.d.ts.map +1 -0
- package/dist/hono/main-sync.js +422 -0
- package/dist/hono/main-sync.js.map +1 -0
- package/dist/hono/main-sync.test.d.ts +2 -0
- package/dist/hono/main-sync.test.d.ts.map +1 -0
- package/dist/hono/main-sync.test.js +288 -0
- package/dist/hono/main-sync.test.js.map +1 -0
- package/dist/hono/session-continuity.d.ts +1 -0
- package/dist/hono/session-continuity.d.ts.map +1 -1
- package/dist/hono/session-continuity.js +5 -2
- package/dist/hono/session-continuity.js.map +1 -1
- package/dist/hono/types.d.ts +6 -7
- package/dist/hono/types.d.ts.map +1 -1
- package/dist/review/digest.d.ts +1 -7
- package/dist/review/digest.d.ts.map +1 -1
- package/dist/review/digest.js +16 -80
- package/dist/review/digest.js.map +1 -1
- package/dist/review/digest.test.js +0 -83
- package/dist/review/digest.test.js.map +1 -1
- package/package.json +1 -2
- package/dist/hono/workspace-settle.d.ts +0 -20
- package/dist/hono/workspace-settle.d.ts.map +0 -1
- package/dist/hono/workspace-settle.js +0 -46
- package/dist/hono/workspace-settle.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koda-sl/baker-bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0-dev.6a86a7961",
|
|
4
4
|
"description": "HTTP server wrapping the Claude Agent SDK. Persists chat events to Convex; the dashboard subscribes via Convex realtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"@latitude-data/claude-code-telemetry": "0.0.15",
|
|
45
45
|
"@t3-oss/env-core": "^0.13.10",
|
|
46
46
|
"hono": "^4.12.25",
|
|
47
|
-
"image-size": "^2.0.2",
|
|
48
47
|
"zod": "^4.3.6"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The end-of-turn steps the scaffold's Stop hooks take, run by the bridge.
|
|
3
|
-
*
|
|
4
|
-
* Those hooks skip a Stop given while background work still runs and act on
|
|
5
|
-
* the turn's last Stop instead. A background task can settle without waking the
|
|
6
|
-
* model, and then the turn ends with no further Stop: the markdown edit lock
|
|
7
|
-
* stays held and a stalled background publish is never reported. So once a turn
|
|
8
|
-
* that ran tasks has really ended, the bridge runs the same scripts itself —
|
|
9
|
-
* with no background work in their input, which is now true. Each is
|
|
10
|
-
* idempotent, so a last Stop that did fire costs nothing extra.
|
|
11
|
-
*
|
|
12
|
-
* Not the autorender hook: it asks the model to re-render, and there is no
|
|
13
|
-
* model left to ask. Its marker survives to the next turn's Stop, and the
|
|
14
|
-
* workspace's verify refuses to publish a stale render.
|
|
15
|
-
*
|
|
16
|
-
* Source of truth: __tooling__/hooks/base/flush-format-on-stop.mjs, and
|
|
17
|
-
* recover-stalled-publish.mjs through `recoverStalledPublish`.
|
|
18
|
-
*/
|
|
19
|
-
export declare function settleWorkspaceAfterTasks(cwd?: string): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=workspace-settle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-settle.d.ts","sourceRoot":"","sources":["../../src/hono/workspace-settle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAUH,wBAAsB,yBAAyB,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlF"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The end-of-turn steps the scaffold's Stop hooks take, run by the bridge.
|
|
3
|
-
*
|
|
4
|
-
* Those hooks skip a Stop given while background work still runs and act on
|
|
5
|
-
* the turn's last Stop instead. A background task can settle without waking the
|
|
6
|
-
* model, and then the turn ends with no further Stop: the markdown edit lock
|
|
7
|
-
* stays held and a stalled background publish is never reported. So once a turn
|
|
8
|
-
* that ran tasks has really ended, the bridge runs the same scripts itself —
|
|
9
|
-
* with no background work in their input, which is now true. Each is
|
|
10
|
-
* idempotent, so a last Stop that did fire costs nothing extra.
|
|
11
|
-
*
|
|
12
|
-
* Not the autorender hook: it asks the model to re-render, and there is no
|
|
13
|
-
* model left to ask. Its marker survives to the next turn's Stop, and the
|
|
14
|
-
* workspace's verify refuses to publish a stale render.
|
|
15
|
-
*
|
|
16
|
-
* Source of truth: __tooling__/hooks/base/flush-format-on-stop.mjs, and
|
|
17
|
-
* recover-stalled-publish.mjs through `recoverStalledPublish`.
|
|
18
|
-
*/
|
|
19
|
-
import { execFile } from "node:child_process";
|
|
20
|
-
import { existsSync } from "node:fs";
|
|
21
|
-
import { join } from "node:path";
|
|
22
|
-
import { recoverStalledPublish } from "./publish-recovery.js";
|
|
23
|
-
const FLUSH_FORMAT_SCRIPT = "__tooling__/hooks/base/flush-format-on-stop.mjs";
|
|
24
|
-
const SCRIPT_TIMEOUT_MS = 35_000;
|
|
25
|
-
export async function settleWorkspaceAfterTasks(cwd = process.cwd()) {
|
|
26
|
-
await runStopScript(cwd, FLUSH_FORMAT_SCRIPT);
|
|
27
|
-
await recoverStalledPublish(cwd);
|
|
28
|
-
}
|
|
29
|
-
async function runStopScript(cwd, script) {
|
|
30
|
-
const path = join(cwd, script);
|
|
31
|
-
if (!existsSync(path)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
await new Promise((resolve) => {
|
|
35
|
-
const child = execFile("node", [path], { cwd, timeout: SCRIPT_TIMEOUT_MS }, (err) => {
|
|
36
|
-
if (err) {
|
|
37
|
-
console.error(`[workspace-settle] ${script} failed:`, err.message);
|
|
38
|
-
}
|
|
39
|
-
resolve();
|
|
40
|
-
});
|
|
41
|
-
child.stdin?.end(JSON.stringify({ hook_event_name: "Stop", background_tasks: [] }));
|
|
42
|
-
child.stdout?.resume();
|
|
43
|
-
child.stderr?.resume();
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=workspace-settle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-settle.js","sourceRoot":"","sources":["../../src/hono/workspace-settle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,C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