@vapi-network/core 0.2.1 → 0.2.3

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/config.d.ts CHANGED
@@ -3,8 +3,8 @@ export declare const DEFAULT_REGISTRY_URL = "https://api.vapinetwork.ai";
3
3
  export declare const DEFAULT_DISCOVERY_URL = "https://api.vapinetwork.ai/api/call/services";
4
4
  export declare const DEFAULT_MARKETPLACE_DISCOVERY_URL = "https://api.vapinetwork.ai/api/call/discovery";
5
5
  export declare const DEFAULT_REGISTRY_FALLBACKS: readonly [{
6
- readonly discoveryUrl: "https://console.vapinetwork.ai/api/call/services";
7
- readonly marketplaceDiscoveryUrl: "https://console.vapinetwork.ai/api/call/discovery";
6
+ readonly discoveryUrl: "https://api.vapinetwork.ai/api/call/services";
7
+ readonly marketplaceDiscoveryUrl: "https://api.vapinetwork.ai/api/call/discovery";
8
8
  }];
9
9
  export declare const DEFAULT_SPEND_CAPS: {
10
10
  readonly perCallAtomic: "100000";
@@ -65,11 +65,40 @@ export type MigrationOptions = {
65
65
  * either side. Returns the copied destination paths.
66
66
  */
67
67
  export declare function migrateLegacyVapiHome(options?: MigrationOptions): Promise<string[]>;
68
+ export type LegacyRegistryRewrite = {
69
+ field: string;
70
+ from: string;
71
+ to: string;
72
+ };
73
+ /**
74
+ * Rewrites one retired registry URL to its canonical form. Anything that is not
75
+ * a legacy vAPI registry URL — including self-hosted registries on the old
76
+ * paths — is returned byte for byte, so this is safe to run over any config.
77
+ */
78
+ export declare function rewriteLegacyRegistryUrl(value: string): string;
79
+ /**
80
+ * Pure counterpart of {@link rewriteLegacyRegistryUrl} over a whole config. The
81
+ * input is never mutated, and an untouched config is returned as-is.
82
+ */
83
+ export declare function rewriteLegacyRegistryUrls(config: VapiConfig): {
84
+ config: VapiConfig;
85
+ changes: LegacyRegistryRewrite[];
86
+ };
87
+ export declare function formatLegacyRegistryRewrites(changes: readonly LegacyRegistryRewrite[]): string;
88
+ /**
89
+ * Rewrites retired registry URLs in `config.json` on disk. Returns what changed
90
+ * so the caller can report it; an absent or already-current file is a no-op.
91
+ */
92
+ export declare function migrateLegacyRegistryConfig(path?: string): Promise<LegacyRegistryRewrite[]>;
68
93
  export type DefaultConfigOptions = {
69
94
  networks?: readonly string[];
70
95
  };
71
96
  export declare function getDefaultConfig(source?: NodeJS.ProcessEnv, options?: DefaultConfigOptions): VapiConfig;
72
- export declare function loadConfig(path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
97
+ export type LoadConfigOptions = {
98
+ /** Sink for the one-line legacy-URL notice; omitted means stay silent. */
99
+ notice?: (message: string) => void;
100
+ };
101
+ export declare function loadConfig(path?: string, source?: NodeJS.ProcessEnv, options?: LoadConfigOptions): Promise<VapiConfig>;
73
102
  export declare function writeDefaultConfig(path?: string, source?: NodeJS.ProcessEnv, options?: DefaultConfigOptions): Promise<VapiConfig>;
74
103
  export declare function enableDefaultNetwork(network: "solana", path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
75
104
  export declare function isMissingFile(error: unknown): error is NodeJS.ErrnoException;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,eAAO,MAAM,qBAAqB,iDAA8C,CAAC;AACjF,eAAO,MAAM,iCAAiC,kDAA+C,CAAC;AAC9F,eAAO,MAAM,0BAA0B;;;EAK7B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CA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,CAC9B,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,OAAO,GAAE,oBAAyB,GACjC,UAAU,CAsCZ;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0EAA0E;IAC1E,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,wBAAsB,UAAU,CAC9B,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,CA2DrB;AAiBD,wBAAsB,kBAAkB,CACtC,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,UAAU,CAAC,CAQrB;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,QAAQ,EACjB,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,GACtC,OAAO,CAAC,UAAU,CAAC,CAUrB;AAuBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAE5E"}
package/dist/index.js CHANGED
@@ -45360,8 +45360,8 @@ var DEFAULT_DISCOVERY_URL = `${DEFAULT_REGISTRY_URL}/api/call/services`;
45360
45360
  var DEFAULT_MARKETPLACE_DISCOVERY_URL = `${DEFAULT_REGISTRY_URL}/api/call/discovery`;
45361
45361
  var DEFAULT_REGISTRY_FALLBACKS = [
45362
45362
  {
45363
- discoveryUrl: "https://console.vapinetwork.ai/api/call/services",
45364
- marketplaceDiscoveryUrl: "https://console.vapinetwork.ai/api/call/discovery"
45363
+ discoveryUrl: DEFAULT_DISCOVERY_URL,
45364
+ marketplaceDiscoveryUrl: DEFAULT_MARKETPLACE_DISCOVERY_URL
45365
45365
  }
45366
45366
  ];
45367
45367
  var DEFAULT_SPEND_CAPS = {
@@ -45466,6 +45466,83 @@ async function migrateLegacyVapiHome(options = {}) {
45466
45466
  }
45467
45467
  return copied;
45468
45468
  }
45469
+ var LEGACY_REGISTRY_HOSTS = /* @__PURE__ */ new Map([
45470
+ ["console.vapinetwork.ai", "api.vapinetwork.ai"],
45471
+ ["console-staging.vapinetwork.ai", "api-staging.vapinetwork.ai"]
45472
+ ]);
45473
+ var LEGACY_REGISTRY_PATHS = /* @__PURE__ */ new Map([
45474
+ ["/api/network/services", "/api/call/services"],
45475
+ ["/api/marketplace/discovery", "/api/call/discovery"]
45476
+ ]);
45477
+ var REGISTRY_DOMAIN = "vapinetwork.ai";
45478
+ function rewriteLegacyRegistryUrl(value) {
45479
+ let url2;
45480
+ try {
45481
+ url2 = new URL(value);
45482
+ } catch {
45483
+ return value;
45484
+ }
45485
+ let rewritten = false;
45486
+ const host = LEGACY_REGISTRY_HOSTS.get(url2.hostname.toLowerCase());
45487
+ if (host) {
45488
+ url2.hostname = host;
45489
+ rewritten = true;
45490
+ }
45491
+ const hostname3 = url2.hostname.toLowerCase();
45492
+ if (hostname3 === REGISTRY_DOMAIN || hostname3.endsWith(`.${REGISTRY_DOMAIN}`)) {
45493
+ const path = LEGACY_REGISTRY_PATHS.get(url2.pathname.replace(/\/+$/, ""));
45494
+ if (path) {
45495
+ url2.pathname = path;
45496
+ rewritten = true;
45497
+ }
45498
+ }
45499
+ return rewritten ? url2.href : value;
45500
+ }
45501
+ function rewriteLegacyRegistryUrls(config2) {
45502
+ const changes = [];
45503
+ const rewrite = (field, from16) => {
45504
+ const to = rewriteLegacyRegistryUrl(from16);
45505
+ if (to !== from16) changes.push({ field, from: from16, to });
45506
+ return to;
45507
+ };
45508
+ const next = {
45509
+ ...config2,
45510
+ discoveryUrl: rewrite("discoveryUrl", config2.discoveryUrl),
45511
+ marketplaceDiscoveryUrl: rewrite("marketplaceDiscoveryUrl", config2.marketplaceDiscoveryUrl),
45512
+ ...config2.registryFallbacks ? {
45513
+ registryFallbacks: config2.registryFallbacks.map((fallback, index2) => ({
45514
+ discoveryUrl: rewrite(
45515
+ `registryFallbacks[${index2}].discoveryUrl`,
45516
+ fallback.discoveryUrl
45517
+ ),
45518
+ marketplaceDiscoveryUrl: rewrite(
45519
+ `registryFallbacks[${index2}].marketplaceDiscoveryUrl`,
45520
+ fallback.marketplaceDiscoveryUrl
45521
+ )
45522
+ }))
45523
+ } : {}
45524
+ };
45525
+ return changes.length === 0 ? { config: config2, changes } : { config: next, changes };
45526
+ }
45527
+ function formatLegacyRegistryRewrites(changes) {
45528
+ return [
45529
+ "Rewrote retired vAPI registry URLs in the local config:",
45530
+ ...changes.map((change) => ` ${change.field}: ${change.from} -> ${change.to}`)
45531
+ ].join("\n");
45532
+ }
45533
+ async function migrateLegacyRegistryConfig(path = getVapiPaths().config) {
45534
+ let raw;
45535
+ try {
45536
+ raw = await readFile(path, "utf8");
45537
+ } catch (error61) {
45538
+ if (isMissingFile(error61)) return [];
45539
+ throw error61;
45540
+ }
45541
+ const { config: config2, changes } = rewriteLegacyRegistryUrls(configSchema.parse(JSON.parse(raw)));
45542
+ if (changes.length === 0) return [];
45543
+ await writeConfigFile(path, config2);
45544
+ return changes;
45545
+ }
45469
45546
  function getDefaultConfig(source = process.env, options = {}) {
45470
45547
  const registry2 = registryEndpoints(source.VAPI_REGISTRY_URL?.trim() || DEFAULT_REGISTRY_URL);
45471
45548
  const requested = new Set(options.networks ?? ["base"]);
@@ -45504,7 +45581,7 @@ function getDefaultConfig(source = process.env, options = {}) {
45504
45581
  spendCaps: { ...DEFAULT_SPEND_CAPS }
45505
45582
  };
45506
45583
  }
45507
- async function loadConfig(path = getVapiPaths().config, source = process.env) {
45584
+ async function loadConfig(path = getVapiPaths().config, source = process.env, options = {}) {
45508
45585
  if (!process.env.VAPI_HOME?.trim() && path === getVapiPaths(join(homedir(), ".vapi")).config) {
45509
45586
  await migrateLegacyVapiHome({ targetDirectory: join(homedir(), ".vapi") });
45510
45587
  }
@@ -45515,8 +45592,16 @@ async function loadConfig(path = getVapiPaths().config, source = process.env) {
45515
45592
  if (isMissingFile(error61)) return getDefaultConfig(source);
45516
45593
  throw error61;
45517
45594
  }
45518
- const config2 = configSchema.parse(JSON.parse(raw));
45519
- config2.registryFallbacks ??= DEFAULT_REGISTRY_FALLBACKS.map((fallback) => ({ ...fallback }));
45595
+ const parsed = configSchema.parse(JSON.parse(raw));
45596
+ parsed.registryFallbacks ??= DEFAULT_REGISTRY_FALLBACKS.map((fallback) => ({ ...fallback }));
45597
+ const migrated = rewriteLegacyRegistryUrls(parsed);
45598
+ const config2 = migrated.config;
45599
+ if (migrated.changes.length > 0 && options.notice) {
45600
+ options.notice(
45601
+ `${formatLegacyRegistryRewrites(migrated.changes)}
45602
+ Run vapi init to write the new URLs to ${path}.`
45603
+ );
45604
+ }
45520
45605
  const baseRpcUrl = source.BASE_RPC_URL?.trim();
45521
45606
  const arcRpcUrl = source.ARC_TESTNET_RPC_URL?.trim();
45522
45607
  const solanaRpcUrl = source.SOLANA_RPC_URL?.trim();
@@ -45572,15 +45657,7 @@ async function writeDefaultConfig(path = getVapiPaths().config, source = process
45572
45657
  if (copied.includes(path)) return await loadConfig(path, source);
45573
45658
  }
45574
45659
  const config2 = getDefaultConfig(source, options);
45575
- await mkdir(dirname(path), { recursive: true, mode: 448 });
45576
- const temporaryPath = `${path}.${process.pid}.tmp`;
45577
- await writeFile(temporaryPath, `${JSON.stringify(config2, null, 2)}
45578
- `, {
45579
- encoding: "utf8",
45580
- mode: 384,
45581
- flag: "wx"
45582
- });
45583
- await rename(temporaryPath, path);
45660
+ await writeConfigFile(path, config2);
45584
45661
  return config2;
45585
45662
  }
45586
45663
  async function enableDefaultNetwork(network, path = getVapiPaths().config, source = process.env) {
@@ -45591,6 +45668,10 @@ async function enableDefaultNetwork(network, path = getVapiPaths().config, sourc
45591
45668
  usdc: NETWORKS[SOLANA_MAINNET_CAIP2].usdc
45592
45669
  };
45593
45670
  }
45671
+ await writeConfigFile(path, config2);
45672
+ return config2;
45673
+ }
45674
+ async function writeConfigFile(path, config2) {
45594
45675
  await mkdir(dirname(path), { recursive: true, mode: 448 });
45595
45676
  const temporaryPath = `${path}.${process.pid}.tmp`;
45596
45677
  await writeFile(temporaryPath, `${JSON.stringify(config2, null, 2)}
@@ -45600,7 +45681,6 @@ async function enableDefaultNetwork(network, path = getVapiPaths().config, sourc
45600
45681
  flag: "wx"
45601
45682
  });
45602
45683
  await rename(temporaryPath, path);
45603
- return config2;
45604
45684
  }
45605
45685
  async function pathExists(path) {
45606
45686
  try {
@@ -46157,6 +46237,49 @@ async function unlockKeystore(passphrase, path = getVapiPaths().keystore) {
46157
46237
  }
46158
46238
  return await paymentAccountFromKeys(keys);
46159
46239
  }
46240
+ async function readKeystoreAddress(path = getVapiPaths().keystore) {
46241
+ let raw;
46242
+ try {
46243
+ raw = await readFile3(path, "utf8");
46244
+ } catch {
46245
+ return void 0;
46246
+ }
46247
+ let parsed;
46248
+ try {
46249
+ parsed = JSON.parse(raw);
46250
+ } catch {
46251
+ return void 0;
46252
+ }
46253
+ const address2 = typeof parsed === "object" && parsed !== null ? Reflect.get(parsed, "address") : void 0;
46254
+ return typeof address2 === "string" ? address2 : void 0;
46255
+ }
46256
+ async function exportKeystoreKeys(passphrase, path = getVapiPaths().keystore) {
46257
+ let raw;
46258
+ try {
46259
+ raw = await readFile3(path, "utf8");
46260
+ } catch (error61) {
46261
+ if (isMissingFile(error61)) {
46262
+ throw new KeystoreError(`No vAPI keystore found at ${path}. Run vapi init.`);
46263
+ }
46264
+ throw error61;
46265
+ }
46266
+ const keys = await decryptKeys(parseAnyKeystore(JSON.parse(raw)), passphrase);
46267
+ const evmPrivateKey = keys.evm;
46268
+ const exported = {
46269
+ evm: { address: privateKeyToAccount(evmPrivateKey).address, privateKey: evmPrivateKey }
46270
+ };
46271
+ if (!keys.solana) return exported;
46272
+ const seed = Uint8Array.from(Buffer.from(keys.solana, "base64"));
46273
+ const signer = await createSolanaSigner(Uint8Array.from(seed));
46274
+ const publicKey = Uint8Array.from(getBase58Encoder().encode(signer.address));
46275
+ const secretKey = new Uint8Array(seed.length + publicKey.length);
46276
+ secretKey.set(seed);
46277
+ secretKey.set(publicKey, seed.length);
46278
+ const encoded = getBase58Decoder().decode(secretKey);
46279
+ seed.fill(0);
46280
+ secretKey.fill(0);
46281
+ return { ...exported, solana: { address: signer.address, secretKey: encoded } };
46282
+ }
46160
46283
  async function enableSolanaKey(passphrase, path = getVapiPaths().keystore) {
46161
46284
  let raw;
46162
46285
  try {
@@ -46856,7 +46979,7 @@ function csvCell(value) {
46856
46979
  import { mkdir as mkdir6, writeFile as writeFile4 } from "node:fs/promises";
46857
46980
  import { arch, platform, release } from "node:os";
46858
46981
  import { join as join2 } from "node:path";
46859
- var VAPI_CLIENT_VERSION = "0.2.1";
46982
+ var VAPI_CLIENT_VERSION = "0.2.3";
46860
46983
  async function createSupportReport(options) {
46861
46984
  const message = options.message.trim();
46862
46985
  if (!message) throw new Error("Support report message must not be empty.");
@@ -47360,8 +47483,10 @@ export {
47360
47483
  enableSolanaKey,
47361
47484
  encryptPrivateKey,
47362
47485
  executionModeSchema,
47486
+ exportKeystoreKeys,
47363
47487
  filterReceiptsByRange,
47364
47488
  firstPartyProvenanceSchema,
47489
+ formatLegacyRegistryRewrites,
47365
47490
  formatUsdc,
47366
47491
  getAgentCashPaths,
47367
47492
  getArcGasHeadroomAtomic,
@@ -47395,6 +47520,7 @@ export {
47395
47520
  marketplaceKindSchema,
47396
47521
  marketplacePublicFactSchema,
47397
47522
  mergeListings,
47523
+ migrateLegacyRegistryConfig,
47398
47524
  migrateLegacyVapiHome,
47399
47525
  normalizeResourceUrl,
47400
47526
  openRequestMarketplaceHitSchema,
@@ -47410,6 +47536,7 @@ export {
47410
47536
  parseSettlementResponse,
47411
47537
  pinnedLookup,
47412
47538
  provenanceSchema,
47539
+ readKeystoreAddress,
47413
47540
  readReceipts,
47414
47541
  readSearchEvents,
47415
47542
  readSolanaGasBalance,
@@ -47419,6 +47546,8 @@ export {
47419
47546
  receiptsToCsv,
47420
47547
  requireRpcUrl,
47421
47548
  reserveSpend,
47549
+ rewriteLegacyRegistryUrl,
47550
+ rewriteLegacyRegistryUrls,
47422
47551
  searchServicesResponseSchema,
47423
47552
  serviceOfferMarketplaceHitSchema,
47424
47553
  serviceSummarySchema,