@holokai/holo-test 1.4.2 → 1.5.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 (169) hide show
  1. package/README.md +217 -80
  2. package/dist/conformance/audit-tests.d.ts +4 -0
  3. package/dist/conformance/audit-tests.d.ts.map +1 -0
  4. package/dist/conformance/audit-tests.js +55 -0
  5. package/dist/conformance/audit-tests.js.map +1 -0
  6. package/dist/conformance/datastore-tests.d.ts +13 -0
  7. package/dist/conformance/datastore-tests.d.ts.map +1 -0
  8. package/dist/conformance/datastore-tests.js +121 -0
  9. package/dist/conformance/datastore-tests.js.map +1 -0
  10. package/dist/conformance/holo-fixture-loader.d.ts +4 -0
  11. package/dist/conformance/holo-fixture-loader.d.ts.map +1 -0
  12. package/dist/conformance/holo-fixture-loader.js +79 -0
  13. package/dist/conformance/holo-fixture-loader.js.map +1 -0
  14. package/dist/conformance/holo-fixture-tests.d.ts +4 -0
  15. package/dist/conformance/holo-fixture-tests.d.ts.map +1 -0
  16. package/dist/conformance/holo-fixture-tests.js +273 -0
  17. package/dist/conformance/holo-fixture-tests.js.map +1 -0
  18. package/dist/conformance/holo-fixture-types.d.ts +93 -0
  19. package/dist/conformance/holo-fixture-types.d.ts.map +1 -0
  20. package/dist/conformance/holo-fixture-types.js +2 -0
  21. package/dist/conformance/holo-fixture-types.js.map +1 -0
  22. package/dist/conformance/loader.d.ts +7 -0
  23. package/dist/conformance/loader.d.ts.map +1 -0
  24. package/dist/conformance/loader.js +71 -0
  25. package/dist/conformance/loader.js.map +1 -0
  26. package/dist/conformance/pipeline-tests.d.ts +4 -0
  27. package/dist/conformance/pipeline-tests.d.ts.map +1 -0
  28. package/dist/conformance/pipeline-tests.js +73 -0
  29. package/dist/conformance/pipeline-tests.js.map +1 -0
  30. package/dist/conformance/runner.d.ts +2 -0
  31. package/dist/conformance/runner.d.ts.map +1 -0
  32. package/dist/conformance/runner.js +102 -0
  33. package/dist/conformance/runner.js.map +1 -0
  34. package/dist/conformance/sdk-tests.d.ts +12 -0
  35. package/dist/conformance/sdk-tests.d.ts.map +1 -0
  36. package/dist/{services/http-fixture-server.js → conformance/sdk-tests.js} +56 -17
  37. package/dist/conformance/sdk-tests.js.map +1 -0
  38. package/dist/conformance/translator-tests.d.ts +4 -0
  39. package/dist/conformance/translator-tests.d.ts.map +1 -0
  40. package/dist/conformance/translator-tests.js +49 -0
  41. package/dist/conformance/translator-tests.js.map +1 -0
  42. package/dist/conformance/types.d.ts +81 -0
  43. package/dist/conformance/types.d.ts.map +1 -0
  44. package/dist/conformance/types.js +2 -0
  45. package/dist/conformance/types.js.map +1 -0
  46. package/dist/conformance/wire-tests.d.ts +4 -0
  47. package/dist/conformance/wire-tests.d.ts.map +1 -0
  48. package/dist/conformance/wire-tests.js +52 -0
  49. package/dist/conformance/wire-tests.js.map +1 -0
  50. package/dist/fixtures/plugin.d.ts +27 -0
  51. package/dist/fixtures/plugin.d.ts.map +1 -0
  52. package/dist/fixtures/plugin.js +110 -0
  53. package/dist/fixtures/plugin.js.map +1 -0
  54. package/dist/helpers/env.d.ts +2 -0
  55. package/dist/helpers/env.d.ts.map +1 -1
  56. package/dist/helpers/env.js +5 -0
  57. package/dist/helpers/env.js.map +1 -1
  58. package/dist/helpers/ids.d.ts +2 -0
  59. package/dist/helpers/ids.d.ts.map +1 -0
  60. package/dist/helpers/ids.js +5 -0
  61. package/dist/helpers/ids.js.map +1 -0
  62. package/dist/helpers/matrix.d.ts +9 -1
  63. package/dist/helpers/matrix.d.ts.map +1 -1
  64. package/dist/helpers/matrix.js +8 -3
  65. package/dist/helpers/matrix.js.map +1 -1
  66. package/dist/helpers/mocks.d.ts +4 -0
  67. package/dist/helpers/mocks.d.ts.map +1 -0
  68. package/dist/helpers/mocks.js +37 -0
  69. package/dist/helpers/mocks.js.map +1 -0
  70. package/dist/helpers/polling.d.ts +3 -0
  71. package/dist/helpers/polling.d.ts.map +1 -0
  72. package/dist/helpers/polling.js +24 -0
  73. package/dist/helpers/polling.js.map +1 -0
  74. package/dist/helpers/vitest-helpers.d.ts +1 -1
  75. package/dist/helpers/vitest-helpers.d.ts.map +1 -1
  76. package/dist/index.d.ts +26 -23
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +22 -21
  79. package/dist/index.js.map +1 -1
  80. package/dist/live/assertions.d.ts.map +1 -1
  81. package/dist/live/assertions.js +54 -21
  82. package/dist/live/assertions.js.map +1 -1
  83. package/dist/live/error-payloads.d.ts +5 -0
  84. package/dist/live/error-payloads.d.ts.map +1 -0
  85. package/dist/live/error-payloads.js +47 -0
  86. package/dist/live/error-payloads.js.map +1 -0
  87. package/dist/live/error-tester.d.ts +3 -0
  88. package/dist/live/error-tester.d.ts.map +1 -0
  89. package/dist/live/error-tester.js +121 -0
  90. package/dist/live/error-tester.js.map +1 -0
  91. package/dist/live/index.d.ts +3 -1
  92. package/dist/live/index.d.ts.map +1 -1
  93. package/dist/live/index.js +2 -0
  94. package/dist/live/index.js.map +1 -1
  95. package/dist/live/live-tester.d.ts.map +1 -1
  96. package/dist/live/live-tester.js +17 -3
  97. package/dist/live/live-tester.js.map +1 -1
  98. package/dist/live/types.d.ts +9 -0
  99. package/dist/live/types.d.ts.map +1 -1
  100. package/dist/services/plugin-loader.d.ts +4 -2
  101. package/dist/services/plugin-loader.d.ts.map +1 -1
  102. package/dist/services/plugin-loader.js +14 -2
  103. package/dist/services/plugin-loader.js.map +1 -1
  104. package/dist/types.d.ts +0 -37
  105. package/dist/types.d.ts.map +1 -1
  106. package/package.json +3 -6
  107. package/dist/cli.d.ts +0 -3
  108. package/dist/cli.d.ts.map +0 -1
  109. package/dist/cli.js +0 -83
  110. package/dist/cli.js.map +0 -1
  111. package/dist/contracts/audit-contract.d.ts +0 -3
  112. package/dist/contracts/audit-contract.d.ts.map +0 -1
  113. package/dist/contracts/audit-contract.js +0 -11
  114. package/dist/contracts/audit-contract.js.map +0 -1
  115. package/dist/contracts/pipeline-contract.d.ts +0 -3
  116. package/dist/contracts/pipeline-contract.d.ts.map +0 -1
  117. package/dist/contracts/pipeline-contract.js +0 -9
  118. package/dist/contracts/pipeline-contract.js.map +0 -1
  119. package/dist/contracts/roundtrip-contract.d.ts +0 -3
  120. package/dist/contracts/roundtrip-contract.d.ts.map +0 -1
  121. package/dist/contracts/roundtrip-contract.js +0 -9
  122. package/dist/contracts/roundtrip-contract.js.map +0 -1
  123. package/dist/contracts/wire-contract.d.ts +0 -3
  124. package/dist/contracts/wire-contract.d.ts.map +0 -1
  125. package/dist/contracts/wire-contract.js +0 -9
  126. package/dist/contracts/wire-contract.js.map +0 -1
  127. package/dist/dsl/assertions.d.ts +0 -6
  128. package/dist/dsl/assertions.d.ts.map +0 -1
  129. package/dist/dsl/assertions.js +0 -54
  130. package/dist/dsl/assertions.js.map +0 -1
  131. package/dist/dsl/suite-builder.d.ts +0 -25
  132. package/dist/dsl/suite-builder.d.ts.map +0 -1
  133. package/dist/dsl/suite-builder.js +0 -96
  134. package/dist/dsl/suite-builder.js.map +0 -1
  135. package/dist/factories/worker-request-factory.d.ts +0 -5
  136. package/dist/factories/worker-request-factory.d.ts.map +0 -1
  137. package/dist/factories/worker-request-factory.js +0 -19
  138. package/dist/factories/worker-request-factory.js.map +0 -1
  139. package/dist/fixtures/fixture-loader.d.ts +0 -6
  140. package/dist/fixtures/fixture-loader.d.ts.map +0 -1
  141. package/dist/fixtures/fixture-loader.js +0 -23
  142. package/dist/fixtures/fixture-loader.js.map +0 -1
  143. package/dist/runner/test-reporter.d.ts +0 -3
  144. package/dist/runner/test-reporter.d.ts.map +0 -1
  145. package/dist/runner/test-reporter.js +0 -43
  146. package/dist/runner/test-reporter.js.map +0 -1
  147. package/dist/runner/test-runner.d.ts +0 -12
  148. package/dist/runner/test-runner.d.ts.map +0 -1
  149. package/dist/runner/test-runner.js +0 -37
  150. package/dist/runner/test-runner.js.map +0 -1
  151. package/dist/services/http-fixture-server.d.ts +0 -14
  152. package/dist/services/http-fixture-server.d.ts.map +0 -1
  153. package/dist/services/http-fixture-server.js.map +0 -1
  154. package/dist/testers/audit-tester.d.ts +0 -4
  155. package/dist/testers/audit-tester.d.ts.map +0 -1
  156. package/dist/testers/audit-tester.js +0 -74
  157. package/dist/testers/audit-tester.js.map +0 -1
  158. package/dist/testers/pipeline-tester.d.ts +0 -4
  159. package/dist/testers/pipeline-tester.d.ts.map +0 -1
  160. package/dist/testers/pipeline-tester.js +0 -62
  161. package/dist/testers/pipeline-tester.js.map +0 -1
  162. package/dist/testers/roundtrip-tester.d.ts +0 -3
  163. package/dist/testers/roundtrip-tester.d.ts.map +0 -1
  164. package/dist/testers/roundtrip-tester.js +0 -77
  165. package/dist/testers/roundtrip-tester.js.map +0 -1
  166. package/dist/testers/wire-tester.d.ts +0 -4
  167. package/dist/testers/wire-tester.d.ts.map +0 -1
  168. package/dist/testers/wire-tester.js +0 -87
  169. package/dist/testers/wire-tester.js.map +0 -1
@@ -1,9 +0,0 @@
1
- import { loadPlugin } from '../services/plugin-loader.js';
2
- import { testPipeline } from '../testers/pipeline-tester.js';
3
- import { assertTestResult } from '../helpers/vitest-helpers.js';
4
- export async function runPipelineContract(family, fixture) {
5
- const plugin = await loadPlugin(family);
6
- const result = await testPipeline(plugin, fixture);
7
- assertTestResult(result);
8
- }
9
- //# sourceMappingURL=pipeline-contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pipeline-contract.js","sourceRoot":"","sources":["../../src/contracts/pipeline-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAc,EAAE,OAAwB;IAC9E,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { FixtureScenario, SdkAdapter } from '../types.js';
2
- export declare function runRoundTripContract(fixture: FixtureScenario, adapter: SdkAdapter): Promise<void>;
3
- //# sourceMappingURL=roundtrip-contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roundtrip-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/roundtrip-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAI7D,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvG"}
@@ -1,9 +0,0 @@
1
- import { testRoundTrip } from '../testers/roundtrip-tester.js';
2
- import { assertTestResult } from '../helpers/vitest-helpers.js';
3
- export async function runRoundTripContract(fixture, adapter) {
4
- if (!fixture.sdkRequest || !fixture.expectedSdkResult)
5
- return;
6
- const result = await testRoundTrip(fixture, adapter);
7
- assertTestResult(result);
8
- }
9
- //# sourceMappingURL=roundtrip-contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roundtrip-contract.js","sourceRoot":"","sources":["../../src/contracts/roundtrip-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAwB,EAAE,OAAmB;IACpF,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,OAAO,CAAC,iBAAiB;QAAE,OAAO;IAC9D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrD,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { FixtureScenario } from '../types.js';
2
- export declare function runWireContract(family: string, fixture: FixtureScenario): Promise<void>;
3
- //# sourceMappingURL=wire-contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wire-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/wire-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAKjD,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7F"}
@@ -1,9 +0,0 @@
1
- import { loadPlugin } from '../services/plugin-loader.js';
2
- import { testWire } from '../testers/wire-tester.js';
3
- import { assertTestResult } from '../helpers/vitest-helpers.js';
4
- export async function runWireContract(family, fixture) {
5
- const plugin = await loadPlugin(family);
6
- const result = await testWire(plugin, fixture);
7
- assertTestResult(result);
8
- }
9
- //# sourceMappingURL=wire-contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wire-contract.js","sourceRoot":"","sources":["../../src/contracts/wire-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,OAAwB;IAC1E,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { AssertionError } from '../types.js';
2
- export declare function assertEqual(field: string, actual: any, expected: any): AssertionError | null;
3
- export declare function assertDeepEqual(field: string, actual: any, expected: any): AssertionError | null;
4
- export declare function assertPartialMatch(field: string, actual: Record<string, any>, expected: Record<string, any>): AssertionError | null;
5
- export declare function assertArrayEqual(field: string, actual: string[], expected: string[]): AssertionError[];
6
- //# sourceMappingURL=assertions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["../../src/dsl/assertions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAEhD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,cAAc,GAAG,IAAI,CAG5F;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,cAAc,GAAG,IAAI,CAYhG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,cAAc,GAAG,IAAI,CAMnI;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CA8BtG"}
@@ -1,54 +0,0 @@
1
- import { diffLines } from 'diff';
2
- export function assertEqual(field, actual, expected) {
3
- if (actual === expected)
4
- return null;
5
- return { field, expected, actual };
6
- }
7
- export function assertDeepEqual(field, actual, expected) {
8
- const actualStr = JSON.stringify(actual, null, 2);
9
- const expectedStr = JSON.stringify(expected, null, 2);
10
- if (actualStr === expectedStr)
11
- return null;
12
- const changes = diffLines(expectedStr, actualStr);
13
- const diffStr = changes.map(c => {
14
- const prefix = c.added ? '+' : c.removed ? '-' : ' ';
15
- return c.value.split('\n').filter(l => l).map(l => `${prefix} ${l}`).join('\n');
16
- }).join('\n');
17
- return { field, expected, actual, diff: diffStr };
18
- }
19
- export function assertPartialMatch(field, actual, expected) {
20
- for (const [key, value] of Object.entries(expected)) {
21
- const err = assertDeepEqual(`${field}.${key}`, actual?.[key], value);
22
- if (err)
23
- return err;
24
- }
25
- return null;
26
- }
27
- export function assertArrayEqual(field, actual, expected) {
28
- const errors = [];
29
- if (actual.length !== expected.length) {
30
- errors.push({
31
- field: `${field}.length`,
32
- expected: expected.length,
33
- actual: actual.length,
34
- });
35
- }
36
- const len = Math.min(actual.length, expected.length);
37
- for (let i = 0; i < len; i++) {
38
- if (actual[i] !== expected[i]) {
39
- const changes = diffLines(expected[i], actual[i]);
40
- const diffStr = changes.map(c => {
41
- const prefix = c.added ? '+' : c.removed ? '-' : ' ';
42
- return c.value.split('\n').filter(l => l).map(l => `${prefix} ${l}`).join('\n');
43
- }).join('\n');
44
- errors.push({
45
- field: `${field}[${i}]`,
46
- expected: expected[i],
47
- actual: actual[i],
48
- diff: diffStr,
49
- });
50
- }
51
- }
52
- return errors;
53
- }
54
- //# sourceMappingURL=assertions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertions.js","sourceRoot":"","sources":["../../src/dsl/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAG/B,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAW,EAAE,QAAa;IACjE,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,MAAW,EAAE,QAAa;IACrE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,IAAI,CAAC,S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;gBACvB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;gBACrB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;gBACjB,IAAI,EAAE,OAAO;aAChB,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1,25 +0,0 @@
1
- import type { FixtureScenario } from '../types.js';
2
- declare class SuiteBuilder {
3
- private _plugin?;
4
- private _protocol?;
5
- private _streaming?;
6
- private _fixtureDir?;
7
- private _fixtures?;
8
- private _categories;
9
- private _verbose;
10
- forPlugin(plugin: string): SuiteBuilder;
11
- protocol(protocol: string): SuiteBuilder;
12
- streaming(streaming?: boolean): SuiteBuilder;
13
- fixtureDir(dir: string): SuiteBuilder;
14
- withFixtures(fixtures: FixtureScenario[]): SuiteBuilder;
15
- wire(): SuiteBuilder;
16
- audit(): SuiteBuilder;
17
- pipeline(): SuiteBuilder;
18
- roundTrip(): SuiteBuilder;
19
- allFixtures(): SuiteBuilder;
20
- verbose(verbose?: boolean): SuiteBuilder;
21
- run(): Promise<boolean>;
22
- }
23
- export declare function suite(): SuiteBuilder;
24
- export {};
25
- //# sourceMappingURL=suite-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suite-builder.d.ts","sourceRoot":"","sources":["../../src/dsl/suite-builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,eAAe,EAAa,MAAM,aAAa,CAAC;AAE7D,cAAM,YAAY;IACd,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAU;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAC,CAAoB;IACtC,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,QAAQ,CAAS;IAEzB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAKvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY;IAKxC,SAAS,CAAC,SAAS,UAAO,GAAG,YAAY;IAKzC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY;IAKrC,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,YAAY;IAKvD,IAAI,IAAI,YAAY;IAKpB,KAAK,IAAI,YAAY;IAKrB,QAAQ,IAAI,YAAY;IAKxB,SAAS,IAAI,YAAY;IAKzB,WAAW,IAAI,YAAY;IAI3B,OAAO,CAAC,OAAO,UAAO,GAAG,YAAY;IAK/B,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;CAsChC;AAED,wBAAgB,KAAK,IAAI,YAAY,CAEpC"}
@@ -1,96 +0,0 @@
1
- import { loadFixtures } from '../fixtures/fixture-loader.js';
2
- import { loadPlugin } from '../services/plugin-loader.js';
3
- import { testWire } from '../testers/wire-tester.js';
4
- import { testAudit } from '../testers/audit-tester.js';
5
- import { testPipeline } from '../testers/pipeline-tester.js';
6
- import { testRoundTrip } from '../testers/roundtrip-tester.js';
7
- import { reportResults } from '../runner/test-reporter.js';
8
- class SuiteBuilder {
9
- _plugin;
10
- _protocol;
11
- _streaming;
12
- _fixtureDir;
13
- _fixtures;
14
- _categories = new Set();
15
- _verbose = false;
16
- forPlugin(plugin) {
17
- this._plugin = plugin;
18
- return this;
19
- }
20
- protocol(protocol) {
21
- this._protocol = protocol;
22
- return this;
23
- }
24
- streaming(streaming = true) {
25
- this._streaming = streaming;
26
- return this;
27
- }
28
- fixtureDir(dir) {
29
- this._fixtureDir = dir;
30
- return this;
31
- }
32
- withFixtures(fixtures) {
33
- this._fixtures = fixtures;
34
- return this;
35
- }
36
- wire() {
37
- this._categories.add('wire');
38
- return this;
39
- }
40
- audit() {
41
- this._categories.add('audit');
42
- return this;
43
- }
44
- pipeline() {
45
- this._categories.add('pipeline');
46
- return this;
47
- }
48
- roundTrip() {
49
- this._categories.add('roundtrip');
50
- return this;
51
- }
52
- allFixtures() {
53
- return this;
54
- }
55
- verbose(verbose = true) {
56
- this._verbose = verbose;
57
- return this;
58
- }
59
- async run() {
60
- let fixtures = this._fixtures;
61
- if (!fixtures) {
62
- const dir = this._fixtureDir || process.cwd();
63
- fixtures = await loadFixtures(dir, { plugin: this._plugin });
64
- }
65
- if (this._protocol) {
66
- fixtures = fixtures.filter(f => f.protocol === this._protocol);
67
- }
68
- if (this._streaming !== undefined) {
69
- fixtures = fixtures.filter(f => f.streaming === this._streaming);
70
- }
71
- const runAll = this._categories.size === 0;
72
- const results = [];
73
- for (const fixture of fixtures) {
74
- const pluginImpl = await loadPlugin(fixture.plugin);
75
- if (runAll || this._categories.has('wire')) {
76
- results.push(await testWire(pluginImpl, fixture));
77
- }
78
- if (runAll || this._categories.has('audit')) {
79
- if (fixture.expectedAudit) {
80
- results.push(await testAudit(pluginImpl, fixture));
81
- }
82
- }
83
- if (runAll || this._categories.has('pipeline')) {
84
- results.push(await testPipeline(pluginImpl, fixture));
85
- }
86
- if (this._categories.has('roundtrip') && fixture.sdkAdapter && fixture.sdkRequest) {
87
- results.push(await testRoundTrip(fixture, fixture.sdkAdapter));
88
- }
89
- }
90
- return reportResults(results, this._verbose);
91
- }
92
- }
93
- export function suite() {
94
- return new SuiteBuilder();
95
- }
96
- //# sourceMappingURL=suite-builder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suite-builder.js","sourceRoot":"","sources":["../../src/dsl/suite-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAA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W,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1C,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;oBACxB,OAAO,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;gBACvD,CAAC;YACL,CAAC;YACD,IAAI,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC7C,OAAO,CAAC,IAAI,CAAC,MAAM,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1D,CAAC;YACD,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBAChF,OAAO,CAAC,IAAI,CAAC,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;YACnE,CAAC;QACL,CAAC;QAED,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;CACJ;AAED,MAAM,UAAU,KAAK;IACjB,OAAO,IAAI,YAAY,EAAE,CAAC;AAC9B,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { HoloWorkerRequest } from '@holokai/holo-types/worker';
2
- import type { FixtureScenario } from '../types.js';
3
- export declare function createTestWorkerRequest(fixture: FixtureScenario): HoloWorkerRequest;
4
- export declare function createTestEnvelope(fixture: FixtureScenario, request: HoloWorkerRequest): import("@holokai/holo-types/worker").WorkerResponseEnvelope;
5
- //# sourceMappingURL=worker-request-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-request-factory.d.ts","sourceRoot":"","sources":["../../src/factories/worker-request-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAGlE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAGjD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAYnF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,+DAEtF"}
@@ -1,19 +0,0 @@
1
- import { createWorkerRequest, createResponseEnvelope } from '@holokai/holo-sdk/provider';
2
- import { v4 as uuidv4 } from 'uuid';
3
- export function createTestWorkerRequest(fixture) {
4
- const protocol = { id: fixture.protocolId ?? uuidv4(), name: fixture.protocol, capability: 'chat' };
5
- return createWorkerRequest({
6
- provider: { id: fixture.providerId ?? uuidv4(), name: fixture.plugin },
7
- protocol,
8
- payload: fixture.payload ?? {},
9
- sourceId: fixture.sourceId ?? uuidv4(),
10
- requestId: fixture.requestId ?? uuidv4(),
11
- organizationId: fixture.organizationId ?? 'test-org',
12
- isStreaming: fixture.streaming,
13
- httpRequestDetails: { path: '/test', method: 'POST' },
14
- });
15
- }
16
- export function createTestEnvelope(fixture, request) {
17
- return createResponseEnvelope(request, fixture.expectedAudit?.access_model ?? 'unknown');
18
- }
19
- //# sourceMappingURL=worker-request-factory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-request-factory.js","sourceRoot":"","sources":["../../src/factories/worker-request-factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAEvF,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,MAAM,CAAC;AAElC,MAAM,UAAU,uBAAuB,CAAC,OAAwB;IAC5D,MAAM,QAAQ,GAAqB,EAAC,EAAE,EAAE,OAAO,CAAC,UAAU,IAAI,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;IACpH,OAAO,mBAAmB,CAAC;QACvB,QAAQ,EAAE,EAAC,EAAE,EAAE,OAAO,CAAC,UAAU,IAAI,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAQ;QAC3E,QAAQ;QACR,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,MAAM,EAAE;QACtC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM,EAAE;QACxC,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,UAAU;QACpD,WAAW,EAAE,OAAO,CAAC,SAAS;QAC9B,kBAAkB,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAC;KACtD,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAwB,EAAE,OAA0B;IACnF,OAAO,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,YAAY,IAAI,SAAS,CAAC,CAAC;AAC7F,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { FixtureScenario } from '../types.js';
2
- export declare function loadFixtures(baseDir: string, filter?: {
3
- plugin?: string | undefined;
4
- tag?: string | undefined;
5
- }): Promise<FixtureScenario[]>;
6
- //# sourceMappingURL=fixture-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixture-loader.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixture-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAEjD,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IACzD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAqB7B"}
@@ -1,23 +0,0 @@
1
- import { glob } from 'node:fs/promises';
2
- import { pathToFileURL } from 'node:url';
3
- export async function loadFixtures(baseDir, filter) {
4
- const pattern = `${baseDir}/**/*.fixture.{ts,js}`;
5
- const files = [];
6
- for await (const file of glob(pattern)) {
7
- files.push(file);
8
- }
9
- const fixtures = [];
10
- for (const file of files.sort()) {
11
- const mod = await import(pathToFileURL(file).href);
12
- const scenario = mod.default ?? mod.fixture;
13
- if (!scenario)
14
- continue;
15
- if (filter?.plugin && scenario.plugin !== filter.plugin)
16
- continue;
17
- if (filter?.tag && !scenario.tags?.includes(filter.tag))
18
- continue;
19
- fixtures.push(scenario);
20
- }
21
- return fixtures;
22
- }
23
- //# sourceMappingURL=fixture-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixture-loader.js","sourceRoot":"","sources":["../../src/fixtures/fixture-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAGvC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe,EAAE,MAGnD;IACG,MAAM,OAAO,GAAG,GAAG,OAAO,uBAAuB,CAAC;IAClD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,MAAM,QAAQ,GAAsB,EAAE,CAAC;IAEvC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAoB,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC;QAC7D,IAAI,CAAC,QAAQ;YAAE,SAAS;QAExB,IAAI,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;YAAE,SAAS;QAClE,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;YAAE,SAAS;QAElE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { TestResult } from '../types.js';
2
- export declare function reportResults(results: TestResult[], verbose: boolean): boolean;
3
- //# sourceMappingURL=test-reporter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-reporter.d.ts","sourceRoot":"","sources":["../../src/runner/test-reporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAwC9E"}
@@ -1,43 +0,0 @@
1
- export function reportResults(results, verbose) {
2
- const passed = results.filter(r => r.passed);
3
- const failed = results.filter(r => !r.passed);
4
- console.log('');
5
- console.log('='.repeat(60));
6
- console.log(` Test Results: ${passed.length} passed, ${failed.length} failed, ${results.length} total`);
7
- console.log('='.repeat(60));
8
- console.log('');
9
- for (const result of results) {
10
- const icon = result.passed ? '\x1b[32mPASS\x1b[0m' : '\x1b[31mFAIL\x1b[0m';
11
- const duration = result.duration.toFixed(1);
12
- console.log(` ${icon} [${result.category}] ${result.name} (${duration}ms)`);
13
- if (!result.passed && (verbose || failed.length <= 5)) {
14
- for (const err of result.errors) {
15
- console.log(` \x1b[31m${err.field}: expected ${format(err.expected)}, got ${format(err.actual)}\x1b[0m`);
16
- if (err.diff && verbose) {
17
- console.log(' diff:');
18
- for (const line of err.diff.split('\n')) {
19
- const color = line.startsWith('+') ? '\x1b[32m' : line.startsWith('-') ? '\x1b[31m' : '';
20
- const reset = color ? '\x1b[0m' : '';
21
- console.log(` ${color}${line}${reset}`);
22
- }
23
- }
24
- }
25
- }
26
- }
27
- console.log('');
28
- if (failed.length === 0) {
29
- console.log('\x1b[32mAll tests passed.\x1b[0m');
30
- }
31
- else {
32
- console.log(`\x1b[31m${failed.length} test(s) failed.\x1b[0m`);
33
- }
34
- console.log('');
35
- return failed.length === 0;
36
- }
37
- function format(val) {
38
- if (typeof val === 'string') {
39
- return val.length > 80 ? `"${val.slice(0, 80)}..."` : `"${val}"`;
40
- }
41
- return JSON.stringify(val);
42
- }
43
- //# sourceMappingURL=test-reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-reporter.js","sourceRoot":"","sources":["../../src/runner/test-reporter.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,OAAqB,EAAE,OAAgB;IACjE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE9C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,MAAM,YAAY,MAAM,CAAC,MAAM,YAAY,OAAO,CAAC,MAAM,QAAQ,CAAC,CAAC;IACzG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAC;QAC3E,MAAM,QAAQ,G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E,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IACpD,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,GAAG,CAAC,WAAW,MAAM,CAAC,MAAM,yBAAyB,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACpB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC;IACrE,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC"}
@@ -1,12 +0,0 @@
1
- export interface RunOptions {
2
- fixtureDir: string;
3
- plugin?: string | undefined;
4
- tag?: string | undefined;
5
- wire?: boolean | undefined;
6
- audit?: boolean | undefined;
7
- pipeline?: boolean | undefined;
8
- roundtrip?: boolean | undefined;
9
- verbose?: boolean | undefined;
10
- }
11
- export declare function runTests(options: RunOptions): Promise<boolean>;
12
- //# sourceMappingURL=test-runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-runner.d.ts","sourceRoot":"","sources":["../../src/runner/test-runner.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAsCpE"}
@@ -1,37 +0,0 @@
1
- import { loadFixtures } from '../fixtures/fixture-loader.js';
2
- import { loadPlugin } from '../services/plugin-loader.js';
3
- import { testWire } from '../testers/wire-tester.js';
4
- import { testAudit } from '../testers/audit-tester.js';
5
- import { testPipeline } from '../testers/pipeline-tester.js';
6
- import { testRoundTrip } from '../testers/roundtrip-tester.js';
7
- import { reportResults } from './test-reporter.js';
8
- export async function runTests(options) {
9
- const { fixtureDir, plugin, tag, verbose = false } = options;
10
- const runAll = !options.wire && !options.audit && !options.pipeline && !options.roundtrip;
11
- const fixtures = await loadFixtures(fixtureDir, { plugin, tag });
12
- if (fixtures.length === 0) {
13
- console.log('No fixtures found.');
14
- return true;
15
- }
16
- console.log(`Found ${fixtures.length} fixture(s)`);
17
- const results = [];
18
- for (const fixture of fixtures) {
19
- const pluginImpl = await loadPlugin(fixture.plugin);
20
- if (runAll || options.wire) {
21
- results.push(await testWire(pluginImpl, fixture));
22
- }
23
- if (runAll || options.audit) {
24
- if (fixture.expectedAudit) {
25
- results.push(await testAudit(pluginImpl, fixture));
26
- }
27
- }
28
- if (runAll || options.pipeline) {
29
- results.push(await testPipeline(pluginImpl, fixture));
30
- }
31
- if (options.roundtrip && fixture.sdkAdapter && fixture.sdkRequest) {
32
- results.push(await testRoundTrip(fixture, fixture.sdkAdapter));
33
- }
34
- }
35
- return reportResults(results, verbose);
36
- }
37
- //# sourceMappingURL=test-runner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-runner.js","sourceRoot":"","sources":["../../src/runner/test-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AA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AED,IAAI,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAC1B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;YACvD,CAAC;QACL,CAAC;QAED,IAAI,MAAM,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,MAAM,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,MAAM,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QACnE,CAAC;IACL,CAAC;IAED,OAAO,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { IProviderPlugin } from '@holokai/holo-types/plugin';
2
- import type { FixtureScenario, SdkAdapter } from '../types.js';
3
- export interface FixtureServerOptions {
4
- port?: number | undefined;
5
- }
6
- export declare class HttpFixtureServer {
7
- private server;
8
- private app;
9
- constructor();
10
- mount(fixture: FixtureScenario, plugin: IProviderPlugin, adapter: SdkAdapter): void;
11
- start(options?: FixtureServerOptions): Promise<number>;
12
- stop(): Promise<void>;
13
- }
14
- //# sourceMappingURL=http-fixture-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-fixture-server.d.ts","sourceRoot":"","sources":["../../src/services/http-fixture-server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAEhE,OAAO,KAAK,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAE7D,MAAM,WAAW,oBAAoB;IACjC,IAAI,CAAC,E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AAO;YACH,IAAI,EAAE,cAAc;YACpB,SAAS,EAAE,eAAe;YAC1B,GAAG,EAAE,CAAC;YACN,KAAK,EAAE,KAAK;YACZ,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;SACA,CAAC;IACvB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { IProviderPlugin } from '@holokai/holo-types/plugin';
2
- import type { FixtureScenario, TestResult } from '../types.js';
3
- export declare function testAudit(plugin: IProviderPlugin, fixture: FixtureScenario): Promise<TestResult>;
4
- //# sourceMappingURL=audit-tester.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit-tester.d.ts","sourceRoot":"","sources":["../../src/testers/audit-tester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAGhE,OAAO,KAAK,EAAC,eAAe,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAC;AAG7E,wBAAsB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CAyEtG"}
@@ -1,74 +0,0 @@
1
- import { assertEqual, assertPartialMatch } from '../dsl/assertions.js';
2
- export async function testAudit(plugin, fixture) {
3
- const start = performance.now();
4
- const errors = [];
5
- if (!fixture.expectedAudit) {
6
- return {
7
- name: fixture.name,
8
- category: 'audit',
9
- passed: true,
10
- errors: [],
11
- duration: performance.now() - start,
12
- };
13
- }
14
- const auditor = await resolveAuditor(plugin);
15
- const lastChunk = fixture.providerChunks[fixture.providerChunks.length - 1];
16
- const doneEvent = {
17
- type: 'done',
18
- requestId: 'test-req',
19
- seq: fixture.providerChunks.length - 1,
20
- message: lastChunk,
21
- text: fixture.expectedText,
22
- ts: Date.now(),
23
- metrics: {
24
- inputTokens: fixture.expectedAudit.input_tokens ?? 0,
25
- outputTokens: fixture.expectedAudit.output_tokens ?? 0,
26
- totalTokens: (fixture.expectedAudit.input_tokens ?? 0) + (fixture.expectedAudit.output_tokens ?? 0),
27
- timeToFirstToken: 0,
28
- totalProcessingTime: 0,
29
- startTime: Date.now(),
30
- },
31
- };
32
- const envelope = {
33
- source_id: 'test-source-id',
34
- request_id: 'test-req',
35
- organization_id: 'test-org',
36
- provider: { id: 'test-provider-id', name: 'test' },
37
- protocol: { id: 'test-protocol-id', name: fixture.protocol, capability: 'chat' },
38
- access_model: fixture.expectedAudit.access_model
39
- };
40
- const responseRecord = await auditor.auditResponse(envelope, doneEvent);
41
- const modelErr = assertEqual('access_model', responseRecord.access_model, fixture.expectedAudit.access_model);
42
- if (modelErr)
43
- errors.push(modelErr);
44
- if (fixture.expectedAudit.input_tokens !== undefined) {
45
- const err = assertEqual('input_tokens', responseRecord.input_tokens, fixture.expectedAudit.input_tokens);
46
- if (err)
47
- errors.push(err);
48
- }
49
- if (fixture.expectedAudit.output_tokens !== undefined) {
50
- const err = assertEqual('output_tokens', responseRecord.output_tokens, fixture.expectedAudit.output_tokens);
51
- if (err)
52
- errors.push(err);
53
- }
54
- const statusErr = assertEqual('status', responseRecord.status, fixture.expectedAudit.status);
55
- if (statusErr)
56
- errors.push(statusErr);
57
- if (fixture.expectedAudit.metadata) {
58
- const metaErr = assertPartialMatch('metadata', responseRecord.metadata, fixture.expectedAudit.metadata);
59
- if (metaErr)
60
- errors.push(metaErr);
61
- }
62
- return {
63
- name: fixture.name,
64
- category: 'audit',
65
- passed: errors.length === 0,
66
- errors,
67
- duration: performance.now() - start,
68
- };
69
- }
70
- async function resolveAuditor(plugin) {
71
- const provider = await plugin.createProvider('test-id', 'test', { apiKey: 'test-key' });
72
- return provider.auditor;
73
- }
74
- //# sourceMappingURL=audit-tester.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit-tester.js","sourceRoot":"","sources":["../../src/testers/audit-tester.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,KAA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AI,CAAC,SAAS,CAAC,CAAC;IAEtC,IAAI,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,OAAO,GAAG,kBAAkB,CAAC,UAAU,EAAE,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACxG,IAAI,OAAO;YAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC3B,MAAM;QACN,QAAQ,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;KACtC,CAAC;AACN,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,MAAuB;IACjD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,EAAC,MAAM,EAAE,UAAU,EAAC,CAAC,CAAC;IACtF,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC5B,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { IProviderPlugin } from '@holokai/holo-types/plugin';
2
- import type { FixtureScenario, TestResult } from '../types.js';
3
- export declare function testPipeline(plugin: IProviderPlugin, fixture: FixtureScenario): Promise<TestResult>;
4
- //# sourceMappingURL=pipeline-tester.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pipeline-tester.d.ts","sourceRoot":"","sources":["../../src/testers/pipeline-tester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAC,eAAe,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAC;AAI7E,wBAAsB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CA2DzG"}