veryfront 0.1.955 → 0.1.957

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 (53) hide show
  1. package/esm/cli/commands/eval/command-help.d.ts.map +1 -1
  2. package/esm/cli/commands/eval/command-help.js +5 -0
  3. package/esm/cli/commands/eval/command.d.ts +15 -2
  4. package/esm/cli/commands/eval/command.d.ts.map +1 -1
  5. package/esm/cli/commands/eval/command.js +158 -14
  6. package/esm/cli/commands/eval/handler.d.ts +2 -0
  7. package/esm/cli/commands/eval/handler.d.ts.map +1 -1
  8. package/esm/cli/commands/eval/handler.js +2 -0
  9. package/esm/deno.js +1 -1
  10. package/esm/extensions/ext-llm-openai/src/openai-chat-stream.d.ts.map +1 -1
  11. package/esm/extensions/ext-llm-openai/src/openai-chat-stream.js +25 -0
  12. package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
  13. package/esm/extensions/ext-llm-openai/src/openai-provider.js +25 -0
  14. package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +1 -1
  15. package/esm/src/agent/ag-ui/browser-chunk-encoder.js +32 -0
  16. package/esm/src/agent/ag-ui/browser-encoder.d.ts +6 -0
  17. package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -1
  18. package/esm/src/agent/ag-ui/browser-encoder.js +70 -0
  19. package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +1 -1
  20. package/esm/src/agent/ag-ui/browser-finalize-tracker.js +18 -0
  21. package/esm/src/agent/runtime/chat-stream-handler.d.ts +16 -0
  22. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  23. package/esm/src/agent/runtime/chat-stream-handler.js +24 -0
  24. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  25. package/esm/src/agent/runtime/index.js +8 -0
  26. package/esm/src/agent/runtime/input-utils.d.ts +16 -0
  27. package/esm/src/agent/runtime/input-utils.d.ts.map +1 -1
  28. package/esm/src/agent/runtime/input-utils.js +29 -0
  29. package/esm/src/agent/runtime/runtime-tool-types.d.ts +16 -0
  30. package/esm/src/agent/runtime/runtime-tool-types.d.ts.map +1 -1
  31. package/esm/src/agent/schemas/agent.schema.d.ts +8 -0
  32. package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
  33. package/esm/src/agent/schemas/agent.schema.js +8 -0
  34. package/esm/src/eval/agent-service.d.ts.map +1 -1
  35. package/esm/src/eval/agent-service.js +39 -1
  36. package/esm/src/eval/index.d.ts +1 -1
  37. package/esm/src/eval/index.d.ts.map +1 -1
  38. package/esm/src/eval/metrics.d.ts.map +1 -1
  39. package/esm/src/eval/metrics.js +7 -2
  40. package/esm/src/eval/model-comparison.d.ts.map +1 -1
  41. package/esm/src/eval/model-comparison.js +229 -7
  42. package/esm/src/eval/report.d.ts.map +1 -1
  43. package/esm/src/eval/report.js +42 -4
  44. package/esm/src/eval/studio.d.ts +22 -0
  45. package/esm/src/eval/studio.d.ts.map +1 -1
  46. package/esm/src/eval/studio.js +11 -0
  47. package/esm/src/eval/types.d.ts +52 -0
  48. package/esm/src/eval/types.d.ts.map +1 -1
  49. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  50. package/esm/src/runtime/runtime-bridge.js +60 -0
  51. package/esm/src/utils/version-constant.d.ts +1 -1
  52. package/esm/src/utils/version-constant.js +1 -1
  53. package/package.json +1 -1
@@ -102,6 +102,8 @@ function normalizeUsage(usage) {
102
102
  };
103
103
  }
104
104
  const flatUsage = usage;
105
+ const costSource = flatUsage.costSource;
106
+ const usageCaptureStatus = flatUsage.usageCaptureStatus;
105
107
  return {
106
108
  inputTokens: flatUsage.inputTokens,
107
109
  outputTokens: flatUsage.outputTokens,
@@ -120,6 +122,28 @@ function normalizeUsage(usage) {
120
122
  ...(typeof flatUsage.reasoningTokens === "number"
121
123
  ? { reasoningTokens: flatUsage.reasoningTokens }
122
124
  : {}),
125
+ ...(typeof flatUsage.billableInputTokens === "number"
126
+ ? { billableInputTokens: flatUsage.billableInputTokens }
127
+ : {}),
128
+ ...(typeof flatUsage.billableOutputTokens === "number"
129
+ ? { billableOutputTokens: flatUsage.billableOutputTokens }
130
+ : {}),
131
+ ...(typeof flatUsage.costUsd === "number" ? { costUsd: flatUsage.costUsd } : {}),
132
+ ...(typeof flatUsage.providerCostUsd === "number"
133
+ ? { providerCostUsd: flatUsage.providerCostUsd }
134
+ : {}),
135
+ ...(typeof flatUsage.veryfrontChargeUsd === "number"
136
+ ? { veryfrontChargeUsd: flatUsage.veryfrontChargeUsd }
137
+ : {}),
138
+ ...(typeof flatUsage.costCredits === "number" ? { costCredits: flatUsage.costCredits } : {}),
139
+ ...(costSource === "gateway" || costSource === "missing" || costSource === "partial"
140
+ ? { costSource }
141
+ : {}),
142
+ ...(usageCaptureStatus === "complete" ||
143
+ usageCaptureStatus === "missing" ||
144
+ usageCaptureStatus === "partial"
145
+ ? { usageCaptureStatus }
146
+ : {}),
123
147
  };
124
148
  }
125
149
  function normalizeFinishReason(finishReason) {
@@ -306,6 +330,24 @@ function streamUsageToGenerateUsage(totalUsage) {
306
330
  ...(totalUsage.reasoningTokens !== undefined
307
331
  ? { reasoningTokens: totalUsage.reasoningTokens }
308
332
  : {}),
333
+ ...(totalUsage.billableInputTokens !== undefined
334
+ ? { billableInputTokens: totalUsage.billableInputTokens }
335
+ : {}),
336
+ ...(totalUsage.billableOutputTokens !== undefined
337
+ ? { billableOutputTokens: totalUsage.billableOutputTokens }
338
+ : {}),
339
+ ...(totalUsage.costUsd !== undefined ? { costUsd: totalUsage.costUsd } : {}),
340
+ ...(totalUsage.providerCostUsd !== undefined
341
+ ? { providerCostUsd: totalUsage.providerCostUsd }
342
+ : {}),
343
+ ...(totalUsage.veryfrontChargeUsd !== undefined
344
+ ? { veryfrontChargeUsd: totalUsage.veryfrontChargeUsd }
345
+ : {}),
346
+ ...(totalUsage.costCredits !== undefined ? { costCredits: totalUsage.costCredits } : {}),
347
+ ...(totalUsage.costSource !== undefined ? { costSource: totalUsage.costSource } : {}),
348
+ ...(totalUsage.usageCaptureStatus !== undefined
349
+ ? { usageCaptureStatus: totalUsage.usageCaptureStatus }
350
+ : {}),
309
351
  };
310
352
  }
311
353
  async function buildGenerateResultFromStream(stream) {
@@ -444,6 +486,24 @@ function normalizeStreamPart(part) {
444
486
  ...(usage.reasoningTokens !== undefined
445
487
  ? { reasoningTokens: usage.reasoningTokens }
446
488
  : {}),
489
+ ...(usage.billableInputTokens !== undefined
490
+ ? { billableInputTokens: usage.billableInputTokens }
491
+ : {}),
492
+ ...(usage.billableOutputTokens !== undefined
493
+ ? { billableOutputTokens: usage.billableOutputTokens }
494
+ : {}),
495
+ ...(usage.costUsd !== undefined ? { costUsd: usage.costUsd } : {}),
496
+ ...(usage.providerCostUsd !== undefined
497
+ ? { providerCostUsd: usage.providerCostUsd }
498
+ : {}),
499
+ ...(usage.veryfrontChargeUsd !== undefined
500
+ ? { veryfrontChargeUsd: usage.veryfrontChargeUsd }
501
+ : {}),
502
+ ...(usage.costCredits !== undefined ? { costCredits: usage.costCredits } : {}),
503
+ ...(usage.costSource !== undefined ? { costSource: usage.costSource } : {}),
504
+ ...(usage.usageCaptureStatus !== undefined
505
+ ? { usageCaptureStatus: usage.usageCaptureStatus }
506
+ : {}),
447
507
  },
448
508
  }
449
509
  : {}),
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.955";
2
+ export declare const VERSION = "0.1.957";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.955";
4
+ export const VERSION = "0.1.957";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.955",
3
+ "version": "0.1.957",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",