ai-evaluate 2.1.8 → 2.3.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.
Files changed (74) hide show
  1. package/README.md +16 -0
  2. package/dist/evaluate.d.ts.map +1 -1
  3. package/dist/evaluate.js +10 -10
  4. package/dist/evaluate.js.map +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/miniflare-pool.d.ts.map +1 -1
  8. package/dist/miniflare-pool.js +1 -1
  9. package/dist/miniflare-pool.js.map +1 -1
  10. package/dist/node.d.ts.map +1 -1
  11. package/dist/node.js.map +1 -1
  12. package/dist/repl.js +6 -6
  13. package/dist/repl.js.map +1 -1
  14. package/dist/shared.d.ts.map +1 -1
  15. package/dist/shared.js +5 -2
  16. package/dist/shared.js.map +1 -1
  17. package/dist/static/index.d.ts +111 -0
  18. package/dist/static/index.d.ts.map +1 -0
  19. package/dist/static/index.js +347 -0
  20. package/dist/static/index.js.map +1 -0
  21. package/dist/type-guards.d.ts.map +1 -1
  22. package/dist/type-guards.js +64 -62
  23. package/dist/type-guards.js.map +1 -1
  24. package/dist/worker-template/core.d.ts.map +1 -1
  25. package/dist/worker-template/core.js +1 -1
  26. package/dist/worker-template/core.js.map +1 -1
  27. package/package.json +19 -6
  28. package/public/capnweb.mjs +220 -0
  29. package/public/index.mjs +426 -0
  30. package/public/scaffold.mjs +198 -0
  31. package/.turbo/turbo-build.log +0 -4
  32. package/.turbo/turbo-test.log +0 -54
  33. package/.turbo/turbo-typecheck.log +0 -4
  34. package/CHANGELOG.md +0 -48
  35. package/dist/worker-template.d.ts +0 -41
  36. package/dist/worker-template.d.ts.map +0 -1
  37. package/dist/worker-template.js +0 -3748
  38. package/dist/worker-template.js.map +0 -1
  39. package/example/package.json +0 -20
  40. package/example/src/index.ts +0 -221
  41. package/example/wrangler.jsonc +0 -25
  42. package/src/capnweb-bundle.ts +0 -2596
  43. package/src/evaluate.ts +0 -329
  44. package/src/index.ts +0 -23
  45. package/src/miniflare-pool.ts +0 -395
  46. package/src/node.ts +0 -245
  47. package/src/repl.ts +0 -228
  48. package/src/shared.ts +0 -186
  49. package/src/type-guards.ts +0 -323
  50. package/src/types.ts +0 -196
  51. package/src/validation.ts +0 -120
  52. package/src/worker-template/code-transforms.ts +0 -32
  53. package/src/worker-template/core.ts +0 -557
  54. package/src/worker-template/helpers.ts +0 -90
  55. package/src/worker-template/index.ts +0 -23
  56. package/src/worker-template/sdk-generator.ts +0 -2515
  57. package/src/worker-template/test-generator.ts +0 -358
  58. package/test/evaluate-extended.test.js +0 -429
  59. package/test/evaluate-extended.test.ts +0 -469
  60. package/test/evaluate.test.js +0 -235
  61. package/test/evaluate.test.ts +0 -253
  62. package/test/index.test.js +0 -77
  63. package/test/index.test.ts +0 -95
  64. package/test/miniflare-pool.test.ts +0 -246
  65. package/test/node.test.ts +0 -467
  66. package/test/security.test.ts +0 -1009
  67. package/test/shared.test.ts +0 -105
  68. package/test/type-guards.test.ts +0 -303
  69. package/test/validation.test.ts +0 -240
  70. package/test/worker-template.test.js +0 -365
  71. package/test/worker-template.test.ts +0 -432
  72. package/tsconfig.json +0 -22
  73. package/vitest.config.js +0 -21
  74. package/vitest.config.ts +0 -28
package/CHANGELOG.md DELETED
@@ -1,48 +0,0 @@
1
- # ai-evaluate
2
-
3
- ## 2.1.3
4
-
5
- ### Patch Changes
6
-
7
- - Documentation and testing improvements
8
- - Add deterministic AI testing suite with self-validating patterns
9
- - Apply StoryBrand narrative to all package READMEs
10
- - Update TESTING.md with four principles of deterministic AI testing
11
- - Fix duplicate examples package name conflict
12
-
13
- - Updated dependencies
14
- - ai-functions@2.1.3
15
- - ai-tests@2.1.3
16
-
17
- ## 2.1.1
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies [6beb531]
22
- - ai-functions@2.1.1
23
- - ai-tests@2.1.1
24
-
25
- ## 2.0.3
26
-
27
- ### Patch Changes
28
-
29
- - Updated dependencies
30
- - rpc.do@0.2.0
31
- - ai-functions@2.0.3
32
- - ai-tests@2.0.3
33
-
34
- ## 2.0.2
35
-
36
- ### Patch Changes
37
-
38
- - Updated dependencies
39
- - ai-functions@2.0.2
40
- - ai-tests@2.0.2
41
-
42
- ## 2.0.1
43
-
44
- ### Patch Changes
45
-
46
- - Updated dependencies
47
- - ai-functions@2.0.1
48
- - ai-tests@2.0.1
@@ -1,41 +0,0 @@
1
- /**
2
- * Worker template for sandbox execution
3
- *
4
- * This code is stringified and sent to the worker loader.
5
- * It uses the TEST service binding (ai-tests) for assertions and test running.
6
- *
7
- * The user's code (module, tests, script) is embedded directly into
8
- * the worker source - no eval() or new Function() needed. The security
9
- * comes from running in an isolated V8 context via worker_loaders.
10
- *
11
- * Routes:
12
- * - POST /execute - Run tests and scripts, return results
13
- * - POST /rpc or WebSocket upgrade - capnweb RPC to module exports
14
- * - GET / - Return info about available exports
15
- */
16
- import type { SDKConfig, FetchConfig } from './types.js';
17
- /**
18
- * Generate worker code for production (uses RPC to ai-tests)
19
- */
20
- export declare function generateWorkerCode(options: {
21
- module?: string | undefined;
22
- tests?: string | undefined;
23
- script?: string | undefined;
24
- sdk?: SDKConfig | boolean | undefined;
25
- imports?: string[] | undefined;
26
- }): string;
27
- /**
28
- * Generate worker code for development (embedded test framework)
29
- *
30
- * This version bundles the test framework directly into the worker,
31
- * avoiding the need for RPC service bindings in local development.
32
- */
33
- export declare function generateDevWorkerCode(options: {
34
- module?: string | undefined;
35
- tests?: string | undefined;
36
- script?: string | undefined;
37
- sdk?: SDKConfig | boolean | undefined;
38
- imports?: string[] | undefined;
39
- fetch?: null | FetchConfig | undefined;
40
- }): string;
41
- //# sourceMappingURL=worker-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-template.d.ts","sourceRoot":"","sources":["../src/worker-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA23FxD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACrC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAC/B,GAAG,MAAM,CAoQT;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACrC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,SAAS,CAAA;CACvC,GAAG,MAAM,CAikBT"}