@zeroxyz/sdk 0.8.0 → 0.9.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.
@@ -1836,7 +1836,7 @@ var clientFetch = async (client, url, opts = {}) => {
1836
1836
 
1837
1837
  // package.json
1838
1838
  var package_default = {
1839
- version: "0.8.0"};
1839
+ version: "0.9.0"};
1840
1840
 
1841
1841
  // src/version.ts
1842
1842
  var SDK_VERSION = package_default.version;
@@ -2440,6 +2440,15 @@ var ratingSchema = z.object({
2440
2440
  });
2441
2441
 
2442
2442
  // src/schemas/capabilities.ts
2443
+ var pricingOptionSchema = z.object({
2444
+ kind: z.string(),
2445
+ protocol: z.string(),
2446
+ network: z.string().nullable(),
2447
+ amountUsd: z.string().nullable(),
2448
+ per: z.string(),
2449
+ confidence: z.string(),
2450
+ depositUsd: z.string().optional()
2451
+ });
2443
2452
  var capabilityResponseSchema = z.object({
2444
2453
  uid: z.string(),
2445
2454
  slug: z.string(),
@@ -2464,6 +2473,23 @@ var capabilityResponseSchema = z.object({
2464
2473
  instructions: z.string().nullable().optional(),
2465
2474
  displayCostAmount: z.string(),
2466
2475
  displayCostAsset: z.string(),
2476
+ // Whether the upstream advertises variable/usage-based pricing, and the raw
2477
+ // hint string (e.g. "$0.01/result"). The server emits both; without them an
2478
+ // agent sees a single scalar with no signal that the price scales with input
2479
+ // (ZERO-199). Optional so an older API deploy still parses.
2480
+ priceDynamic: z.boolean().optional(),
2481
+ priceHint: z.string().nullable().optional(),
2482
+ // ZERO-199: the authoritative price classification. Only `proven_free` may be
2483
+ // rendered "Free"; `unknown_unparsed` is a parse miss (never free); a parse
2484
+ // miss must not become "0"→Free. Optional so older deploys still parse.
2485
+ priceStatus: z.enum([
2486
+ "priced",
2487
+ "proven_free",
2488
+ "free_handshake",
2489
+ "unknown_unparsed",
2490
+ "unprobed"
2491
+ ]).optional(),
2492
+ requiresHandshake: z.boolean().optional(),
2467
2493
  reviewCount: z.number(),
2468
2494
  rating: ratingSchema,
2469
2495
  priceObserved: z.object({
@@ -2486,9 +2512,27 @@ var capabilityResponseSchema = z.object({
2486
2512
  mode: z.string(),
2487
2513
  costAmount: z.string(),
2488
2514
  costPer: z.string(),
2489
- priority: z.number()
2515
+ priority: z.number(),
2516
+ // ZERO-199 rail-union fields (optional; older deploys omit them).
2517
+ asset: z.string().nullable().optional(),
2518
+ unit: z.string().optional(),
2519
+ depositMicros: z.number().nullable().optional(),
2520
+ planRef: z.string().nullable().optional()
2490
2521
  })
2491
2522
  ).nullable(),
2523
+ // Recommended channel deposit for a `mode='session'` cap (the seller's
2524
+ // advertised `suggestedDeposit`). Without it an agent can't size an MPP
2525
+ // session channel. The server emits it; optional for older-deploy parsing
2526
+ // (ZERO-199).
2527
+ sessionDeposit: z.object({ amountUsd: z.string(), asset: z.string() }).nullable().optional(),
2528
+ // ZERO-199 P-B — the single resolved price. Prefer `pricing.summary`/`kind`
2529
+ // over re-deriving from the legacy fields. Optional so older deploys parse.
2530
+ pricing: z.object({
2531
+ kind: z.string(),
2532
+ summary: z.string(),
2533
+ primary: pricingOptionSchema.nullable(),
2534
+ accepted: z.array(pricingOptionSchema)
2535
+ }).optional(),
2492
2536
  availabilityStatus: z.enum(["healthy", "unknown", "down"]).nullable().optional(),
2493
2537
  /**
2494
2538
  * @deprecated The API no longer emits `displayStatus`; it has been replaced
@@ -2919,6 +2963,11 @@ var searchResultSchema = z.object({
2919
2963
  url: z.string(),
2920
2964
  urlTemplate: z.string().nullable().optional(),
2921
2965
  cost: z.object({ amount: z.string(), asset: z.string() }),
2966
+ // Payment protocol (x402 | mpp) for this result. The server emits it; the SDK
2967
+ // previously stripped it, leaving an agent unable to tell which handshake to
2968
+ // engage from a search row. Optional/nullable so older deploys still parse
2969
+ // (ZERO-199).
2970
+ protocol: z.string().nullable().optional(),
2922
2971
  reviewCount: z.number().optional(),
2923
2972
  rating: ratingSchema,
2924
2973
  // All-time activation count (non-deleted runs), mirroring capabilities.ts.
@@ -3316,5 +3365,5 @@ var ZeroClient = class _ZeroClient {
3316
3365
  };
3317
3366
 
3318
3367
  export { Auth, AuthDevice, BUG_REPORT_CATEGORIES, BugReports, Capabilities, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, FETCH_SKIP_REASONS, FETCH_WARNINGS, Payments, Runs, SDK_VERSION, TEMPO_CHAIN_ID, TEMPO_TESTNET_CHAIN_ID, Wallet, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, asSchemaNode, coerceTempoChainId, createManagedAccount, extractInputEnvelope, isShortToken, normalizeTransportEnvelopeRequest, paymentHasAnchor, tempoChainLabelFromId, unwrapTransportEnvelope };
3319
- //# sourceMappingURL=chunk-NUBD543C.js.map
3320
- //# sourceMappingURL=chunk-NUBD543C.js.map
3368
+ //# sourceMappingURL=chunk-T6JT5NV5.js.map
3369
+ //# sourceMappingURL=chunk-T6JT5NV5.js.map