@paydlux/agent 0.1.19 → 0.1.20

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.
package/dist/cli.js CHANGED
@@ -24,9 +24,9 @@ import { StellarVault, USDC_ISSUER, passphrase } from "./vault.js";
24
24
  import { Gateway } from "./gateway.js";
25
25
  import { newPortalKey } from "./desk.js";
26
26
  import { PolicyEngine } from "./policy.js";
27
- import { PUBLIC_HOST, TUNNEL_NAME, runTunnel, tunnelLive, tunnelProblem, tunnelRunning, tunnelServes } from "./tunnel";
28
- import { DEMO_HOST, DEMO_ROUTE, startDemo } from "./showcase";
29
- import { DONATE_HOST, DONATE_PORT, startDonate } from "./donate";
27
+ import { PUBLIC_HOST, TUNNEL_NAME, runTunnel, tunnelLive, tunnelProblem, tunnelRunning, tunnelServes } from "./tunnel.js";
28
+ import { DEMO_HOST, DEMO_ROUTE, startDemo } from "./showcase.js";
29
+ import { DONATE_HOST, DONATE_PORT, startDonate } from "./donate.js";
30
30
  export const VAULT_FILE_DEFAULT = "paydlux-vault.json";
31
31
  const arg = (name) => {
32
32
  const i = process.argv.indexOf(`--${name}`);
@@ -879,6 +879,13 @@ const HELP = `paydlux — get paid by AI agents, with a human in the loop.
879
879
  --max / --daily are your spending mandate: no single payment above --max,
880
880
  and nothing past --daily in a day. The desk refuses at the approve button,
881
881
  so a runaway agent cannot drain the vault even if you approve in error.
882
+ paydlux donate [--file ./paydlux-vault.json] [--usdc] [--price 1] [--tls]
883
+ a public door where other agents pay YOU from THEIR vault.
884
+ --usdc prices the door in Circle USDC. It refuses to start unless the
885
+ vault already holds a USDC trustline: without one every payment bounces
886
+ with OP_NO_TRUST and the page looks broken forever.
887
+ paydlux usdc [--file ./paydlux-vault.json]
888
+ add that USDC trustline — one claimable, so the human half signs it.
882
889
  paydlux status
883
890
  balances, signers, live mandates, ledger rent.
884
891
  paydlux approver [--forget]
@@ -908,6 +915,22 @@ one file holds it all: ./paydlux-vault.json (0600, never commit it)
908
915
  * seller's money. Fewer moving parts means less that can leak.
909
916
  */
910
917
  async function donate() {
918
+ if (flag("help") || process.argv.includes("-h")) {
919
+ console.log(`paydlux donate [--file ./paydlux-vault.json] [--usdc] [--price 1]
920
+ [--tls] [--port ${DONATE_PORT}]
921
+ a public door where other agents pay YOU from THEIR vault.
922
+
923
+ --usdc price the door in Circle USDC instead of the vault file's
924
+ token. Refuses to start unless the vault already holds a
925
+ USDC trustline (run: paydlux usdc) — without one every
926
+ payment bounces with OP_NO_TRUST and the page looks broken.
927
+ --price N what a donation costs, in the asset's own units.
928
+ --tls required in practice: an order and its memo over plain HTTP
929
+ can be taken by anyone on the path.
930
+ --port N local port (default ${DONATE_PORT}); the public name is
931
+ ${DONATE_HOST}, routed by the tunnel.`);
932
+ return;
933
+ }
911
934
  const path = arg("file") ?? VAULT_FILE_DEFAULT;
912
935
  if (!existsSync(path))
913
936
  bad(`no vault file at ${path}. Run: paydlux setup`);
package/dist/donate.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Network } from "./receive";
1
+ import type { Network } from "./receive.ts";
2
2
  export declare const DONATE_HOST = "donate.paydlux.com";
3
3
  export declare const DONATE_PORT = 4024;
4
4
  export type DonatePageConfig = {
@@ -43,6 +43,6 @@ export declare function startDonate(cfg: {
43
43
  } | null>;
44
44
  }): {
45
45
  server: import("node:http").Server<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>;
46
- book: import("./receive").OrderBook;
46
+ book: import("./receive.ts").OrderBook;
47
47
  listen: (port: number) => Promise<void>;
48
48
  };
package/dist/donate.js CHANGED
@@ -13,8 +13,8 @@
13
13
  //
14
14
  // Nothing here holds a buyer key. We publish terms; they sign at home; the
15
15
  // ledger is the only witness we accept.
16
- import { startReceive } from "./receive";
17
- import { qrSvg } from "./qr";
16
+ import { startReceive } from "./receive.js";
17
+ import { qrSvg } from "./qr.js";
18
18
  export const DONATE_HOST = "donate.paydlux.com";
19
19
  export const DONATE_PORT = 4024;
20
20
  /**
@@ -1,5 +1,5 @@
1
1
  import { type Server } from "node:http";
2
- import type { Gateway } from "./gateway";
2
+ import type { Gateway } from "./gateway.ts";
3
3
  export declare const DEMO_HOST = "demo.paydlux.com";
4
4
  export declare const DEMO_ROUTE = "/demo/data";
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paydlux/agent",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Payments for AI agents that a human approves. Spending mandates enforced on the Stellar ledger: 2-of-2 vault, pre-authorised transaction envelopes, HTTP 402, USDC.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,6 +33,7 @@
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsc -p tsconfig.build.json",
36
+ "test:dist": "npm run build && tsx stellar/dist-check.ts",
36
37
  "demo": "node sdk/demo.ts",
37
38
  "demo:stellar": "tsx stellar/demo.ts",
38
39
  "setup:stellar": "tsx stellar/onboard.ts",