@autohq/cli 0.1.508 → 0.1.510

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.
@@ -30866,7 +30866,7 @@ Object.assign(lookup, {
30866
30866
  // package.json
30867
30867
  var package_default = {
30868
30868
  name: "@autohq/cli",
30869
- version: "0.1.508",
30869
+ version: "0.1.510",
30870
30870
  license: "SEE LICENSE IN README.md",
30871
30871
  publishConfig: {
30872
30872
  access: "public"
@@ -38444,11 +38444,6 @@ var SessionAttributionEpochCreateSchema = external_exports.object({
38444
38444
  providerGrantId: ProviderGrantIdSchema.nullable(),
38445
38445
  userModelSubscriptionId: UserSubscriptionCredentialIdSchema.nullable()
38446
38446
  }).strict();
38447
- var SessionAttributionEpochAssertionSchema = SessionAttributionEpochCreateSchema.omit({
38448
- fundingSource: true,
38449
- providerGrantId: true,
38450
- userModelSubscriptionId: true
38451
- }).strict();
38452
38447
  var SessionAttributionEpochRecordSchema = SessionAttributionEpochCreateSchema.extend({
38453
38448
  id: SessionAttributionEpochIdSchema,
38454
38449
  createdAt: external_exports.string().datetime()
@@ -38776,39 +38771,10 @@ var ProjectUsageResponseSchema = external_exports.object({
38776
38771
  byRequester: external_exports.array(ProjectUsageRequesterSummarySchema),
38777
38772
  sharedSessions: external_exports.array(ProjectUsageSharedSessionSchema),
38778
38773
  daily: external_exports.array(ProjectUsageDayPointSchema)
38779
- }).superRefine((usage, context) => {
38780
- if (!billedCostUsdReconciles(usage.byRequester, usage.totals.billedCostUsd)) {
38781
- context.addIssue({
38782
- code: "custom",
38783
- message: "Requester spend must reconcile to project spend",
38784
- path: ["byRequester"]
38785
- });
38786
- }
38787
- usage.sharedSessions.forEach((session, index) => {
38788
- if (!billedCostUsdReconciles(
38789
- session.requesters,
38790
- session.totals.billedCostUsd
38791
- )) {
38792
- context.addIssue({
38793
- code: "custom",
38794
- message: "Requester spend must reconcile to shared-session spend",
38795
- path: ["sharedSessions", index, "requesters"]
38796
- });
38797
- }
38798
- });
38799
38774
  });
38800
- var USD_RECONCILIATION_TOLERANCE = 1e-8;
38801
- function billedCostUsdReconciles(rows, expectedTotal) {
38802
- return Math.abs(sumBilledCostUsd(rows) - roundUsd(expectedTotal)) <= USD_RECONCILIATION_TOLERANCE;
38803
- }
38804
- function sumBilledCostUsd(rows) {
38805
- return roundUsd(rows.reduce((total, row) => total + row.billedCostUsd, 0));
38806
- }
38807
- function roundUsd(value2) {
38808
- return Number(value2.toFixed(10));
38809
- }
38810
38775
 
38811
38776
  // ../../packages/schemas/src/user-subscriptions.ts
38777
+ var ATTRIBUTION_COLD_BOUNDARY_IDLE_MS = 5 * 6e4;
38812
38778
  var USER_SUBSCRIPTION_PROVIDERS = ["openai"];
38813
38779
  var UserSubscriptionProviderSchema = external_exports.enum(
38814
38780
  USER_SUBSCRIPTION_PROVIDERS