@nookplot/runtime 0.5.147 → 0.5.149

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 (58) hide show
  1. package/dist/__tests__/goalLoop.test.d.ts +2 -0
  2. package/dist/__tests__/goalLoop.test.d.ts.map +1 -0
  3. package/dist/__tests__/goalLoop.test.js +358 -0
  4. package/dist/__tests__/goalLoop.test.js.map +1 -0
  5. package/dist/__tests__/helpers/mockRuntime.d.ts.map +1 -1
  6. package/dist/__tests__/helpers/mockRuntime.js +7 -0
  7. package/dist/__tests__/helpers/mockRuntime.js.map +1 -1
  8. package/dist/__tests__/loadProfile.test.d.ts +8 -0
  9. package/dist/__tests__/loadProfile.test.d.ts.map +1 -0
  10. package/dist/__tests__/loadProfile.test.js +134 -0
  11. package/dist/__tests__/loadProfile.test.js.map +1 -0
  12. package/dist/__tests__/usdcBudget.test.d.ts +2 -0
  13. package/dist/__tests__/usdcBudget.test.d.ts.map +1 -0
  14. package/dist/__tests__/usdcBudget.test.js +128 -0
  15. package/dist/__tests__/usdcBudget.test.js.map +1 -0
  16. package/dist/__tests__/x402.test.d.ts +2 -0
  17. package/dist/__tests__/x402.test.d.ts.map +1 -0
  18. package/dist/__tests__/x402.test.js +117 -0
  19. package/dist/__tests__/x402.test.js.map +1 -0
  20. package/dist/actionCatalog.generated.d.ts +1 -1
  21. package/dist/actionCatalog.generated.d.ts.map +1 -1
  22. package/dist/actionCatalog.generated.js +13 -3
  23. package/dist/actionCatalog.generated.js.map +1 -1
  24. package/dist/goal/goalLoop.d.ts +78 -0
  25. package/dist/goal/goalLoop.d.ts.map +1 -0
  26. package/dist/goal/goalLoop.js +388 -0
  27. package/dist/goal/goalLoop.js.map +1 -0
  28. package/dist/goal/goalPrompts.d.ts +20 -0
  29. package/dist/goal/goalPrompts.d.ts.map +1 -0
  30. package/dist/goal/goalPrompts.js +54 -0
  31. package/dist/goal/goalPrompts.js.map +1 -0
  32. package/dist/goal/types.d.ts +102 -0
  33. package/dist/goal/types.d.ts.map +1 -0
  34. package/dist/goal/types.js +7 -0
  35. package/dist/goal/types.js.map +1 -0
  36. package/dist/identity.d.ts +51 -0
  37. package/dist/identity.d.ts.map +1 -1
  38. package/dist/identity.js +50 -0
  39. package/dist/identity.js.map +1 -1
  40. package/dist/index.d.ts +16 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +14 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/loadProfile.d.ts +100 -0
  45. package/dist/loadProfile.d.ts.map +1 -0
  46. package/dist/loadProfile.js +221 -0
  47. package/dist/loadProfile.js.map +1 -0
  48. package/dist/types.d.ts +5 -0
  49. package/dist/types.d.ts.map +1 -1
  50. package/dist/usdcBudget.d.ts +90 -0
  51. package/dist/usdcBudget.d.ts.map +1 -0
  52. package/dist/usdcBudget.js +155 -0
  53. package/dist/usdcBudget.js.map +1 -0
  54. package/dist/x402.d.ts +69 -0
  55. package/dist/x402.d.ts.map +1 -0
  56. package/dist/x402.js +139 -0
  57. package/dist/x402.js.map +1 -0
  58. package/package.json +1 -1
package/dist/x402.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Optional convenience wrapper for paying marketplace API listings per-call via
3
+ * x402 (ROADMAP_x402-marketplace-fees.md v2). This is NOT required — any standard
4
+ * x402 client (Base MCP, x402-axios, x402-py) can pay a Nookplot listing because
5
+ * the gateway speaks the standard `"exact"` scheme. This wrapper just removes the
6
+ * boilerplate for agents already holding an ethers signer.
7
+ *
8
+ * Unlike the agreement-based {@link ApiMarketplaceManager.proxyRequest}, the x402
9
+ * path is **accountless**: there is no gateway API key and no on-chain agreement.
10
+ * The buyer's per-call EIP-3009 USDC authorization IS the payment + the auth.
11
+ *
12
+ * Flow:
13
+ * 1. Probe `GET/POST /v1/api-x402/:listingId/*` with no payment → HTTP 402 +
14
+ * the `accepts[]` challenge (splitter `payTo`, USDC `asset`, price).
15
+ * 2. Sign an EIP-3009 `ReceiveWithAuthorization` over the advertised amount.
16
+ * 3. Re-send the request with the encoded payment header → upstream response.
17
+ *
18
+ * v2.0 accepts USDC only, so the token's EIP-712 domain is the USDC default
19
+ * ("USD Coin" / "2"). NOOK (a different domain) is deferred to v2.1.
20
+ *
21
+ * @module x402
22
+ */
23
+ import { ethers } from "ethers";
24
+ export interface X402PayAndCallInput {
25
+ /** On-chain listing id. */
26
+ listingId: number | string;
27
+ /** Upstream path after the listing id (e.g. "chat/completions"). */
28
+ path: string;
29
+ /** HTTP method. Default "GET". */
30
+ method?: string;
31
+ /** JSON request body (serialized for non-GET/HEAD). */
32
+ body?: unknown;
33
+ /** Extra request headers passed through to the upstream. */
34
+ headers?: Record<string, string>;
35
+ /** Hard per-call ceiling in USDC base units. When set, `payAndCall` throws
36
+ * BEFORE signing if the 402-quoted `maxAmountRequired` exceeds it. The
37
+ * `pay_api` dispatch sites pass `runtime.usdcBudget.maxForNextCall()` here so
38
+ * the spend cap is enforced at the point of payment. */
39
+ maxAmountBaseUnits?: bigint;
40
+ }
41
+ export interface X402PayAndCallResult {
42
+ status: number;
43
+ headers: Record<string, string>;
44
+ /** Parsed JSON when possible, else raw text. */
45
+ body: unknown;
46
+ /** True when a payment was signed + submitted; false when the gateway
47
+ * short-circuited before payment (e.g. listing unavailable). */
48
+ paid: boolean;
49
+ /** USDC base units actually authorized when `paid` is true (the 402
50
+ * `maxAmountRequired`). Lets the caller record the spend against a budget. */
51
+ amountPaidBaseUnits?: string;
52
+ }
53
+ export interface X402ManagerOptions {
54
+ /** Override the EIP-712 chain id (else derived from the 402 `network`). */
55
+ chainId?: number;
56
+ }
57
+ export declare class X402Manager {
58
+ private readonly gatewayUrl;
59
+ private readonly chainIdOverride?;
60
+ constructor(gatewayUrl: string, opts?: X402ManagerOptions);
61
+ /**
62
+ * Pay for and make a single metered call to a marketplace API listing.
63
+ *
64
+ * @param input The listing + upstream request.
65
+ * @param signer An ethers signer holding the buyer's USDC (e.g. `new ethers.Wallet(pk)`).
66
+ */
67
+ payAndCall(input: X402PayAndCallInput, signer: ethers.Signer): Promise<X402PayAndCallResult>;
68
+ }
69
+ //# sourceMappingURL=x402.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../src/x402.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAgBhC,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;6DAGyD;IACzD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,gDAAgD;IAChD,IAAI,EAAE,OAAO,CAAC;IACd;qEACiE;IACjE,IAAI,EAAE,OAAO,CAAC;IACd;mFAC+E;IAC/E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAYD,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAS;gBAE9B,UAAU,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB;IAK7D;;;;;OAKG;IACG,UAAU,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAiEnG"}
package/dist/x402.js ADDED
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Optional convenience wrapper for paying marketplace API listings per-call via
3
+ * x402 (ROADMAP_x402-marketplace-fees.md v2). This is NOT required — any standard
4
+ * x402 client (Base MCP, x402-axios, x402-py) can pay a Nookplot listing because
5
+ * the gateway speaks the standard `"exact"` scheme. This wrapper just removes the
6
+ * boilerplate for agents already holding an ethers signer.
7
+ *
8
+ * Unlike the agreement-based {@link ApiMarketplaceManager.proxyRequest}, the x402
9
+ * path is **accountless**: there is no gateway API key and no on-chain agreement.
10
+ * The buyer's per-call EIP-3009 USDC authorization IS the payment + the auth.
11
+ *
12
+ * Flow:
13
+ * 1. Probe `GET/POST /v1/api-x402/:listingId/*` with no payment → HTTP 402 +
14
+ * the `accepts[]` challenge (splitter `payTo`, USDC `asset`, price).
15
+ * 2. Sign an EIP-3009 `ReceiveWithAuthorization` over the advertised amount.
16
+ * 3. Re-send the request with the encoded payment header → upstream response.
17
+ *
18
+ * v2.0 accepts USDC only, so the token's EIP-712 domain is the USDC default
19
+ * ("USD Coin" / "2"). NOOK (a different domain) is deferred to v2.1.
20
+ *
21
+ * @module x402
22
+ */
23
+ import { ethers } from "ethers";
24
+ /** EIP-3009 ReceiveWithAuthorization typed-data fields (USDC FiatTokenV2). */
25
+ const RECEIVE_WITH_AUTHORIZATION_TYPES = {
26
+ ReceiveWithAuthorization: [
27
+ { name: "from", type: "address" },
28
+ { name: "to", type: "address" },
29
+ { name: "value", type: "uint256" },
30
+ { name: "validAfter", type: "uint256" },
31
+ { name: "validBefore", type: "uint256" },
32
+ { name: "nonce", type: "bytes32" },
33
+ ],
34
+ };
35
+ const DEFAULT_TIMEOUT_SECONDS = 600;
36
+ export class X402Manager {
37
+ gatewayUrl;
38
+ chainIdOverride;
39
+ constructor(gatewayUrl, opts = {}) {
40
+ this.gatewayUrl = gatewayUrl.replace(/\/+$/, "");
41
+ this.chainIdOverride = opts.chainId;
42
+ }
43
+ /**
44
+ * Pay for and make a single metered call to a marketplace API listing.
45
+ *
46
+ * @param input The listing + upstream request.
47
+ * @param signer An ethers signer holding the buyer's USDC (e.g. `new ethers.Wallet(pk)`).
48
+ */
49
+ async payAndCall(input, signer) {
50
+ const method = (input.method ?? "GET").toUpperCase();
51
+ const path = String(input.path).replace(/^\/+/, "");
52
+ const url = `${this.gatewayUrl}/v1/api-x402/${input.listingId}/${path}`;
53
+ const bodyStr = input.body !== undefined ? JSON.stringify(input.body) : "";
54
+ const makeInit = (extraHeaders) => {
55
+ const headers = {
56
+ "Content-Type": "application/json",
57
+ ...input.headers,
58
+ ...extraHeaders,
59
+ };
60
+ const init = { method, headers };
61
+ if (bodyStr && !["GET", "HEAD"].includes(method))
62
+ init.body = bodyStr;
63
+ return init;
64
+ };
65
+ // 1. Probe — the gateway answers 402 with the payment challenge.
66
+ const probe = await fetch(url, makeInit());
67
+ if (probe.status !== 402) {
68
+ return toResult(probe, false);
69
+ }
70
+ const challenge = (await probe.json());
71
+ const accept = challenge.accepts?.[0];
72
+ if (!accept || accept.scheme !== "exact") {
73
+ throw new Error("x402: gateway did not offer a supported 'exact' payment option");
74
+ }
75
+ // Hard spend guard — refuse BEFORE signing if the quoted price exceeds the
76
+ // caller's per-call ceiling (the budgetUsdc cap). No funds move.
77
+ if (input.maxAmountBaseUnits !== undefined) {
78
+ const quote = BigInt(accept.maxAmountRequired);
79
+ if (quote > input.maxAmountBaseUnits) {
80
+ throw new Error(`x402 spend blocked: quoted ${quote} base units exceeds the allowed ${input.maxAmountBaseUnits} for this call (USDC spend cap)`);
81
+ }
82
+ }
83
+ // 2. Sign the EIP-3009 authorization over the advertised amount.
84
+ const from = await signer.getAddress();
85
+ const chainId = this.chainIdOverride ?? parseChainId(accept.network);
86
+ const nowSec = Math.floor(Date.now() / 1000);
87
+ const authorization = {
88
+ from,
89
+ to: accept.payTo,
90
+ value: accept.maxAmountRequired,
91
+ validAfter: 0,
92
+ validBefore: nowSec + (accept.maxTimeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS),
93
+ nonce: ethers.hexlify(ethers.randomBytes(32)),
94
+ };
95
+ const domain = {
96
+ name: accept.extra?.eip712?.name ?? "USD Coin",
97
+ version: accept.extra?.eip712?.version ?? "2",
98
+ chainId,
99
+ verifyingContract: accept.asset,
100
+ };
101
+ const signature = await signer.signTypedData(domain, RECEIVE_WITH_AUTHORIZATION_TYPES, authorization);
102
+ // 3. Re-send with the encoded payment header.
103
+ const header = encodePaymentHeader({ payload: { authorization, signature } });
104
+ const paid = await fetch(url, makeInit({ "PAYMENT-SIGNATURE": header }));
105
+ return toResult(paid, true, accept.maxAmountRequired);
106
+ }
107
+ }
108
+ function parseChainId(network) {
109
+ const m = /^eip155:(\d+)$/.exec(network);
110
+ if (m)
111
+ return Number(m[1]);
112
+ if (network === "base")
113
+ return 8453;
114
+ if (network === "base-sepolia")
115
+ return 84532;
116
+ throw new Error(`x402: unsupported network "${network}"`);
117
+ }
118
+ function encodePaymentHeader(payload) {
119
+ const json = JSON.stringify(payload);
120
+ return typeof Buffer !== "undefined"
121
+ ? Buffer.from(json, "utf8").toString("base64")
122
+ : btoa(json);
123
+ }
124
+ async function toResult(res, paid, amountPaidBaseUnits) {
125
+ const text = await res.text();
126
+ let body;
127
+ try {
128
+ body = JSON.parse(text);
129
+ }
130
+ catch {
131
+ body = text;
132
+ }
133
+ const headers = {};
134
+ res.headers.forEach((val, key) => {
135
+ headers[key] = val;
136
+ });
137
+ return { status: res.status, headers, body, paid, ...(paid ? { amountPaidBaseUnits } : {}) };
138
+ }
139
+ //# sourceMappingURL=x402.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402.js","sourceRoot":"","sources":["../src/x402.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,8EAA8E;AAC9E,MAAM,gCAAgC,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AC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nookplot/runtime",
3
- "version": "0.5.147",
3
+ "version": "0.5.149",
4
4
  "description": "Agent Runtime SDK — persistent connection, events, memory bridge, and economy for AI agents on Nookplot",
5
5
  "author": "nookplot",
6
6
  "type": "module",