@webless/agent 0.10.4 → 0.12.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webless/agent",
3
- "version": "0.10.4",
3
+ "version": "0.12.0",
4
4
  "description": "Webless Agent SDK — Eve runtime client, React UI, and embed bundle.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -52,7 +52,8 @@
52
52
  "dependencies": {
53
53
  "esbuild": "^0.28.1",
54
54
  "eve": "0.40.0",
55
- "streamdown": "^2.6.0"
55
+ "streamdown": "^2.6.0",
56
+ "zod": "^4.6.2"
56
57
  },
57
58
  "peerDependencies": {
58
59
  "react": ">=18",
@@ -0,0 +1,18 @@
1
+ import { readFile, writeFile } from "node:fs/promises";
2
+ import { createHash } from "node:crypto";
3
+
4
+ const source = process.argv[2];
5
+ if (!source) {
6
+ throw new Error("Pass Console's packages/contracts/src/agent-runtime-handoff.ts path.");
7
+ }
8
+ const schema = await readFile(source, "utf8");
9
+ const digest = createHash("sha256").update(schema).digest("hex");
10
+ const output = `// Generated from console/packages/contracts/src/agent-runtime-handoff.ts.\n// Source SHA-256: ${digest}\n// Regenerate with scripts/sync-handoff-contract.mjs; do not edit here.\n${schema}`;
11
+ const target = new URL("../src/runtime/generated/handoff-contract.ts", import.meta.url);
12
+ if (process.argv.includes("--check")) {
13
+ if ((await readFile(target, "utf8")) !== output) {
14
+ throw new Error("The SDK handoff contract differs from the canonical Console schema.");
15
+ }
16
+ } else {
17
+ await writeFile(target, output);
18
+ }