@zeroxyz/sdk 0.7.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.7.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(),
@@ -2454,8 +2463,33 @@ var capabilityResponseSchema = z.object({
2454
2463
  example: z.object({ request: z.unknown(), response: z.unknown() }).nullable(),
2455
2464
  tags: z.array(z.string()).nullable(),
2456
2465
  exampleAgentPrompt: z.string().nullable().optional(),
2466
+ whatItDoes: z.string().nullable().optional(),
2467
+ resultDescription: z.string().nullable().optional(),
2468
+ failureModes: z.array(z.string()).nullable().optional(),
2469
+ whenToPreferThis: z.string().nullable().optional(),
2470
+ // Agent-facing execution guide (markdown). Covers usage patterns, input
2471
+ // field guidance, cross-cap composition, and known failure modes.
2472
+ // Named after MCP tool convention: description = what it is, instructions = how to use it.
2473
+ instructions: z.string().nullable().optional(),
2457
2474
  displayCostAmount: z.string(),
2458
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(),
2459
2493
  reviewCount: z.number(),
2460
2494
  rating: ratingSchema,
2461
2495
  priceObserved: z.object({
@@ -2478,9 +2512,27 @@ var capabilityResponseSchema = z.object({
2478
2512
  mode: z.string(),
2479
2513
  costAmount: z.string(),
2480
2514
  costPer: z.string(),
2481
- 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()
2482
2521
  })
2483
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(),
2484
2536
  availabilityStatus: z.enum(["healthy", "unknown", "down"]).nullable().optional(),
2485
2537
  /**
2486
2538
  * @deprecated The API no longer emits `displayStatus`; it has been replaced
@@ -2911,6 +2963,11 @@ var searchResultSchema = z.object({
2911
2963
  url: z.string(),
2912
2964
  urlTemplate: z.string().nullable().optional(),
2913
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(),
2914
2971
  reviewCount: z.number().optional(),
2915
2972
  rating: ratingSchema,
2916
2973
  // All-time activation count (non-deleted runs), mirroring capabilities.ts.
@@ -3308,5 +3365,5 @@ var ZeroClient = class _ZeroClient {
3308
3365
  };
3309
3366
 
3310
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 };
3311
- //# sourceMappingURL=chunk-26IHUYNK.js.map
3312
- //# sourceMappingURL=chunk-26IHUYNK.js.map
3368
+ //# sourceMappingURL=chunk-T6JT5NV5.js.map
3369
+ //# sourceMappingURL=chunk-T6JT5NV5.js.map