agents 0.11.4 → 0.11.5

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/dist/utils.js CHANGED
@@ -1,5 +1,40 @@
1
1
  //#region src/utils.ts
2
2
  /**
3
+ * Property keys that JavaScript runtimes and test frameworks probe
4
+ * on arbitrary objects (serialization, thenable check, inspection,
5
+ * matcher duck-typing). When an RPC-stub Proxy is accessed by
6
+ * `JSON.stringify`, `console.log`, `await`, Vitest matchers, etc.,
7
+ * it hits one of these — we must return `undefined` instead of a
8
+ * call-wrapper to avoid firing a bogus RPC for a method the child
9
+ * doesn't implement.
10
+ *
11
+ * @internal
12
+ */
13
+ const INTERNAL_JS_STUB_PROPS = new Set([
14
+ "toJSON",
15
+ "then",
16
+ "catch",
17
+ "finally",
18
+ "valueOf",
19
+ "toString",
20
+ "constructor",
21
+ "prototype",
22
+ "$$typeof",
23
+ "@@toStringTag",
24
+ "asymmetricMatch",
25
+ "nodeType"
26
+ ]);
27
+ /**
28
+ * True when the property access is a JS-internal probe that must
29
+ * NOT dispatch an RPC call. Catches all symbol keys plus the named
30
+ * set above.
31
+ *
32
+ * @internal
33
+ */
34
+ function isInternalJsStubProp(prop) {
35
+ return typeof prop === "symbol" || INTERNAL_JS_STUB_PROPS.has(prop);
36
+ }
37
+ /**
3
38
  * Convert a camelCase string to a kebab-case string
4
39
  * @param str The string to convert
5
40
  * @returns The kebab-case string
@@ -11,6 +46,6 @@ function camelCaseToKebabCase(str) {
11
46
  return kebabified.replace(/_/g, "-").replace(/-$/, "");
12
47
  }
13
48
  //#endregion
14
- export { camelCaseToKebabCase };
49
+ export { INTERNAL_JS_STUB_PROPS, camelCaseToKebabCase, isInternalJsStubProp };
15
50
 
16
51
  //# sourceMappingURL=utils.js.map
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../src/utils.ts"],"sourcesContent":["/**\n * Convert a camelCase string to a kebab-case string\n * @param str The string to convert\n * @returns The kebab-case string\n */\nexport function camelCaseToKebabCase(str: string): string {\n // If string is all uppercase, convert to lowercase\n if (str === str.toUpperCase() && str !== str.toLowerCase()) {\n return str.toLowerCase().replace(/_/g, \"-\");\n }\n\n // Otherwise handle camelCase to kebab-case\n let kebabified = str.replace(\n /[A-Z]/g,\n (letter) => `-${letter.toLowerCase()}`\n );\n kebabified = kebabified.startsWith(\"-\") ? kebabified.slice(1) : kebabified;\n // Convert any remaining underscores to hyphens and remove trailing -'s\n return kebabified.replace(/_/g, \"-\").replace(/-$/, \"\");\n}\n"],"mappings":";;;;;;AAKA,SAAgB,qBAAqB,KAAqB;AAExD,KAAI,QAAQ,IAAI,aAAa,IAAI,QAAQ,IAAI,aAAa,CACxD,QAAO,IAAI,aAAa,CAAC,QAAQ,MAAM,IAAI;CAI7C,IAAI,aAAa,IAAI,QACnB,WACC,WAAW,IAAI,OAAO,aAAa,GACrC;AACD,cAAa,WAAW,WAAW,IAAI,GAAG,WAAW,MAAM,EAAE,GAAG;AAEhE,QAAO,WAAW,QAAQ,MAAM,IAAI,CAAC,QAAQ,MAAM,GAAG"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../src/utils.ts"],"sourcesContent":["/**\n * Property keys that JavaScript runtimes and test frameworks probe\n * on arbitrary objects (serialization, thenable check, inspection,\n * matcher duck-typing). When an RPC-stub Proxy is accessed by\n * `JSON.stringify`, `console.log`, `await`, Vitest matchers, etc.,\n * it hits one of these — we must return `undefined` instead of a\n * call-wrapper to avoid firing a bogus RPC for a method the child\n * doesn't implement.\n *\n * @internal\n */\nexport const INTERNAL_JS_STUB_PROPS: ReadonlySet<string> = new Set([\n \"toJSON\",\n \"then\",\n \"catch\",\n \"finally\",\n \"valueOf\",\n \"toString\",\n \"constructor\",\n \"prototype\",\n \"$$typeof\",\n \"@@toStringTag\",\n \"asymmetricMatch\",\n \"nodeType\"\n]);\n\n/**\n * True when the property access is a JS-internal probe that must\n * NOT dispatch an RPC call. Catches all symbol keys plus the named\n * set above.\n *\n * @internal\n */\nexport function isInternalJsStubProp(prop: string | symbol): boolean {\n return typeof prop === \"symbol\" || INTERNAL_JS_STUB_PROPS.has(prop);\n}\n\n/**\n * Convert a camelCase string to a kebab-case string\n * @param str The string to convert\n * @returns The kebab-case string\n */\nexport function camelCaseToKebabCase(str: string): string {\n // If string is all uppercase, convert to lowercase\n if (str === str.toUpperCase() && str !== str.toLowerCase()) {\n return str.toLowerCase().replace(/_/g, \"-\");\n }\n\n // Otherwise handle camelCase to kebab-case\n let kebabified = str.replace(\n /[A-Z]/g,\n (letter) => `-${letter.toLowerCase()}`\n );\n kebabified = kebabified.startsWith(\"-\") ? kebabified.slice(1) : kebabified;\n // Convert any remaining underscores to hyphens and remove trailing -'s\n return kebabified.replace(/_/g, \"-\").replace(/-$/, \"\");\n}\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,yBAA8C,IAAI,IAAI;CACjE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;AASF,SAAgB,qBAAqB,MAAgC;AACnE,QAAO,OAAO,SAAS,YAAY,uBAAuB,IAAI,KAAK;;;;;;;AAQrE,SAAgB,qBAAqB,KAAqB;AAExD,KAAI,QAAQ,IAAI,aAAa,IAAI,QAAQ,IAAI,aAAa,CACxD,QAAO,IAAI,aAAa,CAAC,QAAQ,MAAM,IAAI;CAI7C,IAAI,aAAa,IAAI,QACnB,WACC,WAAW,IAAI,OAAO,aAAa,GACrC;AACD,cAAa,WAAW,WAAW,IAAI,GAAG,WAAW,MAAM,EAAE,GAAG;AAEhE,QAAO,WAAW,QAAQ,MAAM,IAAI,CAAC,QAAQ,MAAM,GAAG"}
@@ -1,4 +1,4 @@
1
- import { r as Agent } from "./index-D9qo_Inc.js";
1
+ import { r as Agent } from "./index-DabjI66m.js";
2
2
  import {
3
3
  S as WorkflowTrackingRow,
4
4
  _ as WorkflowPage,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "durable objects"
10
10
  ],
11
11
  "type": "module",
12
- "version": "0.11.4",
12
+ "version": "0.11.5",
13
13
  "license": "MIT",
14
14
  "repository": {
15
15
  "directory": "packages/agents",
@@ -29,20 +29,15 @@
29
29
  "@modelcontextprotocol/sdk": "1.29.0",
30
30
  "@rolldown/plugin-babel": "^0.2.3",
31
31
  "cron-schedule": "^6.0.0",
32
- "json-schema": "^0.4.0",
33
- "json-schema-to-typescript": "^15.0.4",
34
32
  "mimetext": "^3.0.28",
35
33
  "nanoid": "^5.1.9",
36
34
  "partyserver": "^0.4.1",
37
- "partysocket": "1.1.16",
38
- "picomatch": "^4.0.4",
35
+ "partysocket": "1.1.18",
39
36
  "yargs": "^18.0.0"
40
37
  },
41
38
  "devDependencies": {
42
- "@ai-sdk/openai": "^3.0.53",
43
39
  "@ai-sdk/react": "^3.0.170",
44
- "@cloudflare/workers-oauth-provider": "^0.4.0",
45
- "@tanstack/ai": "^0.10.3",
40
+ "@tanstack/ai": "^0.11.0",
46
41
  "@types/react": "^19.2.14",
47
42
  "@types/yargs": "^17.0.35",
48
43
  "@vitest/browser-playwright": "^4.1.4",
@@ -54,22 +49,17 @@
54
49
  "zod": "^4.3.6"
55
50
  },
56
51
  "peerDependencies": {
57
- "@ai-sdk/react": "^3.0.0",
58
52
  "@cloudflare/ai-chat": ">=0.0.8 <1.0.0",
59
53
  "@cloudflare/codemode": ">=0.0.7 <1.0.0",
60
- "@tanstack/ai": "^0.10.2",
54
+ "@tanstack/ai": ">=0.10.2 <1.0.0",
61
55
  "@x402/core": "^2.0.0",
62
56
  "@x402/evm": "^2.0.0",
63
57
  "ai": "^6.0.0",
64
58
  "react": "^19.0.0",
65
- "viem": ">=2.0.0",
66
59
  "vite": ">=6.0.0 <9.0.0",
67
60
  "zod": "^4.0.0"
68
61
  },
69
62
  "peerDependenciesMeta": {
70
- "@ai-sdk/react": {
71
- "optional": true
72
- },
73
63
  "@cloudflare/ai-chat": {
74
64
  "optional": true
75
65
  },
@@ -85,9 +75,6 @@
85
75
  "@x402/evm": {
86
76
  "optional": true
87
77
  },
88
- "viem": {
89
- "optional": true
90
- },
91
78
  "vite": {
92
79
  "optional": true
93
80
  }