opencrowd 0.8.0 → 0.8.1

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.
@@ -57169,6 +57169,8 @@ var init_discovery = __esm({
57169
57169
  payable: !!offer,
57170
57170
  authMode: advisory.authMode,
57171
57171
  network: offer?.network_name ? NETWORK_CAIP2[offer.network_name] : void 0,
57172
+ // The payee of the selected offer: receipts on some rails (x402 Solana) omit it, and reviews need it.
57173
+ ...offer?.pay_to ? { pay_to: offer.pay_to } : {},
57172
57174
  price_usd: offer ? ceiling ?? 0 : read ? 0 : void 0,
57173
57175
  ...offers.length ? { offers: offers.map((candidate) => ({
57174
57176
  network: candidate.network_name ?? candidate.network,
@@ -58084,11 +58086,13 @@ var init_gateway = __esm({
58084
58086
  const evidence = await this.serviceEvidence(endpoint);
58085
58087
  const rail = railFromSchema(schema.data);
58086
58088
  const priceCeilingCents = priceCeilingFromSchema(schema.data);
58089
+ const payTo = schema.data && typeof schema.data === "object" && typeof schema.data.pay_to === "string" ? schema.data.pay_to : void 0;
58087
58090
  await this.rememberInspection(inspectionKey(endpoint, method), {
58088
58091
  endpoint,
58089
58092
  method,
58090
58093
  rail,
58091
58094
  priceCeilingCents,
58095
+ ...payTo ? { payTo } : {},
58092
58096
  evidence,
58093
58097
  inspectedAt: (/* @__PURE__ */ new Date()).toISOString()
58094
58098
  });
@@ -58218,7 +58222,9 @@ var init_gateway = __esm({
58218
58222
  // Confirmed paid successes AND paid failures require reviews; free,
58219
58223
  // SIWX, and unknown outcomes create no paid receipt to review.
58220
58224
  review_required: paid && supportedRail && await this.crowdcodeEnabled(),
58221
- evidence: result.payment,
58225
+ // x402 Solana receipts carry no payee; CrowdCode needs it to verify a new
58226
+ // service, so use the inspected offer's when the payment settled on that rail.
58227
+ evidence: result.payment && !result.payment.payTo && inspection.payTo && railUsed === inspection.rail ? { ...result.payment, payTo: inspection.payTo } : result.payment,
58222
58228
  notes: result.ambiguous ? `${result.ambiguityReason ?? "ambiguous"}: payment state unknown; never auto-retried` : result.error
58223
58229
  };
58224
58230
  await appendPurchase(session, record3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencrowd",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "A CLI agent with its own wallet — discovers x402 services, pays in USDC, and completes tasks under a local budget",
5
5
  "type": "module",
6
6
  "license": "MIT",