agentcash 0.8.2 → 0.8.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/cjs/run-server.cjs +262 -68
- package/dist/esm/{chunk-RD4Y3CJX.js → chunk-AFAWW7YZ.js} +2 -2
- package/dist/esm/{chunk-EQTHURHC.js → chunk-BDGWC3Y4.js} +2 -2
- package/dist/esm/chunk-DKMBMJQA.js +7 -0
- package/dist/esm/{chunk-FFYCYLF4.js → chunk-S5HW6SFM.js} +3 -3
- package/dist/esm/{chunk-3WG74L5Z.js → chunk-W65V5DL2.js} +3 -3
- package/dist/esm/{commands-ZBVUG2Q5.js → commands-D4LB6MQN.js} +7 -7
- package/dist/esm/index.js +21 -21
- package/dist/esm/{install-LUCT7K6W.js → install-3EASO5YD.js} +3 -3
- package/dist/esm/{server-EH7FWUSW.js → server-P5FI6GYD.js} +6 -6
- package/dist/esm/shared/operations/index.js +3 -3
- package/package.json +4 -4
- package/dist/esm/chunk-I7DEUXBL.js +0 -7
- /package/dist/esm/{chunk-RD4Y3CJX.js.map → chunk-AFAWW7YZ.js.map} +0 -0
- /package/dist/esm/{chunk-EQTHURHC.js.map → chunk-BDGWC3Y4.js.map} +0 -0
- /package/dist/esm/{chunk-I7DEUXBL.js.map → chunk-DKMBMJQA.js.map} +0 -0
- /package/dist/esm/{chunk-FFYCYLF4.js.map → chunk-S5HW6SFM.js.map} +0 -0
- /package/dist/esm/{chunk-3WG74L5Z.js.map → chunk-W65V5DL2.js.map} +0 -0
- /package/dist/esm/{commands-ZBVUG2Q5.js.map → commands-D4LB6MQN.js.map} +0 -0
- /package/dist/esm/{install-LUCT7K6W.js.map → install-3EASO5YD.js.map} +0 -0
- /package/dist/esm/{server-EH7FWUSW.js.map → server-P5FI6GYD.js.map} +0 -0
package/dist/cjs/run-server.cjs
CHANGED
|
@@ -3010,7 +3010,7 @@ var require_compile = __commonJS({
|
|
|
3010
3010
|
}
|
|
3011
3011
|
}
|
|
3012
3012
|
exports2.compileSchema = compileSchema;
|
|
3013
|
-
function
|
|
3013
|
+
function resolveRef2(root, baseId, ref) {
|
|
3014
3014
|
var _a2;
|
|
3015
3015
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
3016
3016
|
const schOrFunc = root.refs[ref];
|
|
@@ -3027,7 +3027,7 @@ var require_compile = __commonJS({
|
|
|
3027
3027
|
return;
|
|
3028
3028
|
return root.refs[ref] = inlineOrCompile.call(this, _sch);
|
|
3029
3029
|
}
|
|
3030
|
-
exports2.resolveRef =
|
|
3030
|
+
exports2.resolveRef = resolveRef2;
|
|
3031
3031
|
function inlineOrCompile(sch) {
|
|
3032
3032
|
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
|
3033
3033
|
return sch.schema;
|
|
@@ -64749,6 +64749,195 @@ var require_content_type = __commonJS({
|
|
|
64749
64749
|
}
|
|
64750
64750
|
});
|
|
64751
64751
|
|
|
64752
|
+
// ../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/types.js
|
|
64753
|
+
var require_types3 = __commonJS({
|
|
64754
|
+
"../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/types.js"(exports2) {
|
|
64755
|
+
"use strict";
|
|
64756
|
+
init_cjs_shims();
|
|
64757
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
64758
|
+
value: true
|
|
64759
|
+
});
|
|
64760
|
+
}
|
|
64761
|
+
});
|
|
64762
|
+
|
|
64763
|
+
// ../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/klona.js
|
|
64764
|
+
var require_klona = __commonJS({
|
|
64765
|
+
"../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/klona.js"(exports2) {
|
|
64766
|
+
"use strict";
|
|
64767
|
+
init_cjs_shims();
|
|
64768
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
64769
|
+
value: true
|
|
64770
|
+
});
|
|
64771
|
+
Object.defineProperty(exports2, "klona", {
|
|
64772
|
+
enumerable: true,
|
|
64773
|
+
get: function() {
|
|
64774
|
+
return klona;
|
|
64775
|
+
}
|
|
64776
|
+
});
|
|
64777
|
+
function klona(val, seen) {
|
|
64778
|
+
if (!seen) seen = /* @__PURE__ */ new Map();
|
|
64779
|
+
var index2, out, tmp;
|
|
64780
|
+
if (Array.isArray(val)) {
|
|
64781
|
+
if (seen.has(val)) return seen.get(val);
|
|
64782
|
+
out = Array(index2 = val.length);
|
|
64783
|
+
seen.set(val, out);
|
|
64784
|
+
while (index2--) out[index2] = (tmp = val[index2]) && typeof tmp === "object" ? klona(tmp, seen) : tmp;
|
|
64785
|
+
return out;
|
|
64786
|
+
}
|
|
64787
|
+
if (Object.prototype.toString.call(val) === "[object Object]") {
|
|
64788
|
+
if (seen.has(val)) return seen.get(val);
|
|
64789
|
+
out = {};
|
|
64790
|
+
seen.set(val, out);
|
|
64791
|
+
for (index2 in val) {
|
|
64792
|
+
if (index2 === "__proto__") {
|
|
64793
|
+
Object.defineProperty(out, index2, {
|
|
64794
|
+
value: klona(val[index2], seen),
|
|
64795
|
+
configurable: true,
|
|
64796
|
+
enumerable: true,
|
|
64797
|
+
writable: true
|
|
64798
|
+
});
|
|
64799
|
+
} else {
|
|
64800
|
+
out[index2] = (tmp = val[index2]) && typeof tmp === "object" ? klona(tmp, seen) : tmp;
|
|
64801
|
+
}
|
|
64802
|
+
}
|
|
64803
|
+
return out;
|
|
64804
|
+
}
|
|
64805
|
+
return val;
|
|
64806
|
+
}
|
|
64807
|
+
}
|
|
64808
|
+
});
|
|
64809
|
+
|
|
64810
|
+
// ../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/resolveRef.js
|
|
64811
|
+
var require_resolveRef = __commonJS({
|
|
64812
|
+
"../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/resolveRef.js"(exports2) {
|
|
64813
|
+
"use strict";
|
|
64814
|
+
init_cjs_shims();
|
|
64815
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
64816
|
+
value: true
|
|
64817
|
+
});
|
|
64818
|
+
Object.defineProperty(exports2, "resolveRefSync", {
|
|
64819
|
+
enumerable: true,
|
|
64820
|
+
get: function() {
|
|
64821
|
+
return resolveRefSync2;
|
|
64822
|
+
}
|
|
64823
|
+
});
|
|
64824
|
+
var cache = /* @__PURE__ */ new Map();
|
|
64825
|
+
var resolveRefSync2 = function(schema, ref) {
|
|
64826
|
+
if (!cache.has(schema)) {
|
|
64827
|
+
cache.set(schema, /* @__PURE__ */ new Map());
|
|
64828
|
+
}
|
|
64829
|
+
var schemaCache = cache.get(schema);
|
|
64830
|
+
if (schemaCache.has(ref)) {
|
|
64831
|
+
return schemaCache.get(ref);
|
|
64832
|
+
}
|
|
64833
|
+
var path2 = ref.split("/").slice(1);
|
|
64834
|
+
var current = schema;
|
|
64835
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
64836
|
+
try {
|
|
64837
|
+
for (var _iterator = path2[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
64838
|
+
var segment = _step.value;
|
|
64839
|
+
if (!current || typeof current !== "object") {
|
|
64840
|
+
current = null;
|
|
64841
|
+
}
|
|
64842
|
+
var _current_segment;
|
|
64843
|
+
current = (_current_segment = current[segment]) !== null && _current_segment !== void 0 ? _current_segment : null;
|
|
64844
|
+
}
|
|
64845
|
+
} catch (err3) {
|
|
64846
|
+
_didIteratorError = true;
|
|
64847
|
+
_iteratorError = err3;
|
|
64848
|
+
} finally {
|
|
64849
|
+
try {
|
|
64850
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
64851
|
+
_iterator.return();
|
|
64852
|
+
}
|
|
64853
|
+
} finally {
|
|
64854
|
+
if (_didIteratorError) {
|
|
64855
|
+
throw _iteratorError;
|
|
64856
|
+
}
|
|
64857
|
+
}
|
|
64858
|
+
}
|
|
64859
|
+
schemaCache.set(ref, current);
|
|
64860
|
+
return current;
|
|
64861
|
+
};
|
|
64862
|
+
}
|
|
64863
|
+
});
|
|
64864
|
+
|
|
64865
|
+
// ../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/dereference.js
|
|
64866
|
+
var require_dereference = __commonJS({
|
|
64867
|
+
"../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/dereference.js"(exports2) {
|
|
64868
|
+
"use strict";
|
|
64869
|
+
init_cjs_shims();
|
|
64870
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
64871
|
+
value: true
|
|
64872
|
+
});
|
|
64873
|
+
Object.defineProperty(exports2, "dereferenceSync", {
|
|
64874
|
+
enumerable: true,
|
|
64875
|
+
get: function() {
|
|
64876
|
+
return dereferenceSync;
|
|
64877
|
+
}
|
|
64878
|
+
});
|
|
64879
|
+
var _klona = require_klona();
|
|
64880
|
+
var _resolveRef = require_resolveRef();
|
|
64881
|
+
var cache = /* @__PURE__ */ new Map();
|
|
64882
|
+
var dereferenceSync = function(schema) {
|
|
64883
|
+
if (cache.has(schema)) {
|
|
64884
|
+
return cache.get(schema);
|
|
64885
|
+
}
|
|
64886
|
+
var visitedNodes = /* @__PURE__ */ new Set();
|
|
64887
|
+
var cloned = (0, _klona.klona)(schema);
|
|
64888
|
+
var resolve2 = function(current, path2) {
|
|
64889
|
+
if (typeof current === "object" && current !== null) {
|
|
64890
|
+
if (visitedNodes.has(current)) {
|
|
64891
|
+
return current;
|
|
64892
|
+
}
|
|
64893
|
+
visitedNodes.add(current);
|
|
64894
|
+
if (Array.isArray(current)) {
|
|
64895
|
+
for (var index2 = 0; index2 < current.length; index2++) {
|
|
64896
|
+
current[index2] = resolve2(current[index2], "".concat(path2, "/").concat(index2));
|
|
64897
|
+
}
|
|
64898
|
+
} else {
|
|
64899
|
+
if ("$ref" in current && typeof current["$ref"] === "string") {
|
|
64900
|
+
return (0, _resolveRef.resolveRefSync)(cloned, current["$ref"]);
|
|
64901
|
+
}
|
|
64902
|
+
for (var key in current) {
|
|
64903
|
+
current[key] = resolve2(current[key], "".concat(path2, "/").concat(key));
|
|
64904
|
+
}
|
|
64905
|
+
}
|
|
64906
|
+
}
|
|
64907
|
+
return current;
|
|
64908
|
+
};
|
|
64909
|
+
var result = resolve2(cloned, "#");
|
|
64910
|
+
cache.set(schema, result);
|
|
64911
|
+
return result;
|
|
64912
|
+
};
|
|
64913
|
+
}
|
|
64914
|
+
});
|
|
64915
|
+
|
|
64916
|
+
// ../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/index.js
|
|
64917
|
+
var require_dereference_json_schema = __commonJS({
|
|
64918
|
+
"../../../node_modules/.pnpm/dereference-json-schema@0.2.2/node_modules/dereference-json-schema/index.js"(exports2) {
|
|
64919
|
+
"use strict";
|
|
64920
|
+
init_cjs_shims();
|
|
64921
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
64922
|
+
value: true
|
|
64923
|
+
});
|
|
64924
|
+
_exportStar(require_types3(), exports2);
|
|
64925
|
+
_exportStar(require_dereference(), exports2);
|
|
64926
|
+
_exportStar(require_resolveRef(), exports2);
|
|
64927
|
+
function _exportStar(from25, to2) {
|
|
64928
|
+
Object.keys(from25).forEach(function(k) {
|
|
64929
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to2, k)) Object.defineProperty(to2, k, {
|
|
64930
|
+
enumerable: true,
|
|
64931
|
+
get: function() {
|
|
64932
|
+
return from25[k];
|
|
64933
|
+
}
|
|
64934
|
+
});
|
|
64935
|
+
});
|
|
64936
|
+
return from25;
|
|
64937
|
+
}
|
|
64938
|
+
}
|
|
64939
|
+
});
|
|
64940
|
+
|
|
64752
64941
|
// src/run-server.ts
|
|
64753
64942
|
init_cjs_shims();
|
|
64754
64943
|
|
|
@@ -113816,13 +114005,13 @@ var import_path2 = require("path");
|
|
|
113816
114005
|
var import_url = require("url");
|
|
113817
114006
|
function getVersion2() {
|
|
113818
114007
|
if (true) {
|
|
113819
|
-
return "0.8.
|
|
114008
|
+
return "0.8.3";
|
|
113820
114009
|
}
|
|
113821
114010
|
const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
113822
|
-
const
|
|
114011
|
+
const pkg2 = JSON.parse(
|
|
113823
114012
|
(0, import_fs3.readFileSync)((0, import_path2.join)(__dirname3, "../../package.json"), "utf-8")
|
|
113824
114013
|
);
|
|
113825
|
-
return
|
|
114014
|
+
return pkg2.version;
|
|
113826
114015
|
}
|
|
113827
114016
|
var MCP_VERSION = getVersion2();
|
|
113828
114017
|
var DIST_TAG = MCP_VERSION.includes("-beta") ? "beta" : "latest";
|
|
@@ -113979,7 +114168,7 @@ var TEMPO_TOKEN_ADDRESS = "0x20c0000000000000000000000000000000000000";
|
|
|
113979
114168
|
|
|
113980
114169
|
// src/shared/mpp-enabled.ts
|
|
113981
114170
|
init_cjs_shims();
|
|
113982
|
-
var isMppEnabled = () => "0.8.
|
|
114171
|
+
var isMppEnabled = () => "0.8.3".includes("-mpp");
|
|
113983
114172
|
|
|
113984
114173
|
// src/shared/operations/fetch-with-payment.ts
|
|
113985
114174
|
init_cjs_shims();
|
|
@@ -116057,8 +116246,9 @@ init_cjs_shims();
|
|
|
116057
116246
|
// src/shared/operations/check-endpoint.ts
|
|
116058
116247
|
init_cjs_shims();
|
|
116059
116248
|
|
|
116060
|
-
// ../../../node_modules/.pnpm/@agentcash+discovery@1.0
|
|
116249
|
+
// ../../../node_modules/.pnpm/@agentcash+discovery@1.1.0/node_modules/@agentcash/discovery/dist/index.js
|
|
116061
116250
|
init_cjs_shims();
|
|
116251
|
+
var import_dereference_json_schema = __toESM(require_dereference_json_schema(), 1);
|
|
116062
116252
|
|
|
116063
116253
|
// ../../../node_modules/.pnpm/@x402+core@2.6.0/node_modules/@x402/core/dist/esm/schemas/index.mjs
|
|
116064
116254
|
init_cjs_shims();
|
|
@@ -116136,7 +116326,7 @@ var PaymentPayloadSchema = external_exports4.discriminatedUnion("x402Version", [
|
|
|
116136
116326
|
PaymentPayloadV2Schema
|
|
116137
116327
|
]);
|
|
116138
116328
|
|
|
116139
|
-
// ../../../node_modules/.pnpm/@agentcash+discovery@1.0
|
|
116329
|
+
// ../../../node_modules/.pnpm/@agentcash+discovery@1.1.0/node_modules/@agentcash/discovery/dist/index.js
|
|
116140
116330
|
var OpenApiPaymentInfoSchema = external_exports3.object({
|
|
116141
116331
|
pricingMode: external_exports3.enum(["fixed", "range", "quote"]),
|
|
116142
116332
|
price: external_exports3.string().optional(),
|
|
@@ -116184,6 +116374,7 @@ var OpenApiDocSchema = external_exports3.object({
|
|
|
116184
116374
|
description: external_exports3.string().optional(),
|
|
116185
116375
|
guidance: external_exports3.string().optional()
|
|
116186
116376
|
}),
|
|
116377
|
+
security: external_exports3.array(external_exports3.record(external_exports3.string(), external_exports3.array(external_exports3.string()))).optional(),
|
|
116187
116378
|
servers: external_exports3.array(external_exports3.object({ url: external_exports3.string() })).optional(),
|
|
116188
116379
|
tags: external_exports3.array(external_exports3.object({ name: external_exports3.string() })).optional(),
|
|
116189
116380
|
components: external_exports3.object({ securitySchemes: external_exports3.record(external_exports3.string(), external_exports3.unknown()).optional() }).optional(),
|
|
@@ -116211,20 +116402,31 @@ var WellKnownParsedSchema = external_exports3.object({
|
|
|
116211
116402
|
function isRecord(value) {
|
|
116212
116403
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
116213
116404
|
}
|
|
116214
|
-
function
|
|
116215
|
-
|
|
116216
|
-
|
|
116217
|
-
|
|
116218
|
-
|
|
116405
|
+
function resolveSecurityFlags(requirements, securitySchemes) {
|
|
116406
|
+
let hasApiKey = false;
|
|
116407
|
+
let hasSiwx = false;
|
|
116408
|
+
for (const requirement of requirements) {
|
|
116409
|
+
for (const schemeName of Object.keys(requirement)) {
|
|
116410
|
+
if (schemeName === "siwx") {
|
|
116411
|
+
hasSiwx = true;
|
|
116412
|
+
continue;
|
|
116413
|
+
}
|
|
116414
|
+
if (schemeName === "apiKey") {
|
|
116415
|
+
hasApiKey = true;
|
|
116416
|
+
continue;
|
|
116417
|
+
}
|
|
116418
|
+
const def = securitySchemes[schemeName];
|
|
116419
|
+
if (isRecord(def) && def["type"] === "apiKey") hasApiKey = true;
|
|
116420
|
+
}
|
|
116421
|
+
}
|
|
116422
|
+
return { hasApiKey, hasSiwx };
|
|
116219
116423
|
}
|
|
116220
|
-
function inferAuthMode(operation) {
|
|
116424
|
+
function inferAuthMode(operation, globalSecurity, securitySchemes) {
|
|
116221
116425
|
const hasXPaymentInfo = Boolean(operation["x-payment-info"]);
|
|
116222
|
-
const
|
|
116223
|
-
const hasApiKey =
|
|
116224
|
-
|
|
116225
|
-
if (hasPayment && hasApiKey) return "apiKey+paid";
|
|
116426
|
+
const effectiveSecurity = operation.security !== void 0 && operation.security.length > 0 ? operation.security : globalSecurity ?? [];
|
|
116427
|
+
const { hasApiKey, hasSiwx } = resolveSecurityFlags(effectiveSecurity, securitySchemes ?? {});
|
|
116428
|
+
if (hasXPaymentInfo && hasApiKey) return "apiKey+paid";
|
|
116226
116429
|
if (hasXPaymentInfo) return "paid";
|
|
116227
|
-
if (hasPayment) return hasSiwx ? "siwx" : "paid";
|
|
116228
116430
|
if (hasApiKey) return "apiKey";
|
|
116229
116431
|
if (hasSiwx) return "siwx";
|
|
116230
116432
|
return void 0;
|
|
@@ -116240,10 +116442,12 @@ var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
|
116240
116442
|
"TRACE"
|
|
116241
116443
|
]);
|
|
116242
116444
|
var DEFAULT_MISSING_METHOD = "POST";
|
|
116243
|
-
function
|
|
116445
|
+
function ensureProtocol(target) {
|
|
116244
116446
|
const trimmed = target.trim();
|
|
116245
|
-
|
|
116246
|
-
|
|
116447
|
+
return /^https?:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
|
|
116448
|
+
}
|
|
116449
|
+
function normalizeOrigin(target) {
|
|
116450
|
+
const url3 = new URL(ensureProtocol(target));
|
|
116247
116451
|
url3.pathname = "";
|
|
116248
116452
|
url3.search = "";
|
|
116249
116453
|
url3.hash = "";
|
|
@@ -116277,22 +116481,20 @@ function toFetchError(err3) {
|
|
|
116277
116481
|
function fetchSafe(url3, init) {
|
|
116278
116482
|
return ResultAsync.fromPromise(fetch(url3, init), toFetchError);
|
|
116279
116483
|
}
|
|
116280
|
-
var isMmmEnabled = () => "1.0
|
|
116484
|
+
var isMmmEnabled = () => "1.1.0".includes("-mmm");
|
|
116281
116485
|
var OpenApiParsedSchema = OpenApiDocSchema.transform((doc) => {
|
|
116282
116486
|
const routes = [];
|
|
116283
116487
|
for (const [rawPath, pathItem] of Object.entries(doc.paths)) {
|
|
116284
116488
|
for (const httpMethod of [...HTTP_METHODS]) {
|
|
116285
116489
|
const operation = pathItem[httpMethod.toLowerCase()];
|
|
116286
116490
|
if (!operation) continue;
|
|
116287
|
-
const authMode = inferAuthMode(operation) ?? void 0;
|
|
116491
|
+
const authMode = inferAuthMode(operation, doc.security, doc.components?.securitySchemes) ?? void 0;
|
|
116288
116492
|
if (!authMode) continue;
|
|
116289
116493
|
const p = operation["x-payment-info"];
|
|
116290
116494
|
const protocols = (p?.protocols ?? []).filter(
|
|
116291
116495
|
(proto) => proto !== "mpp" || isMmmEnabled()
|
|
116292
116496
|
);
|
|
116293
|
-
|
|
116294
|
-
if (authMode === "paid" && protocols.length === 0) continue;
|
|
116295
|
-
const pricing = authMode === "paid" && p ? {
|
|
116497
|
+
const pricing = (authMode === "paid" || authMode === "apiKey+paid") && p ? {
|
|
116296
116498
|
pricingMode: p.pricingMode,
|
|
116297
116499
|
...p.price ? { price: p.price } : {},
|
|
116298
116500
|
...p.minPrice ? { minPrice: p.minPrice } : {},
|
|
@@ -116755,53 +116957,29 @@ function extractPaymentOptions4(wwwAuthenticate) {
|
|
|
116755
116957
|
}
|
|
116756
116958
|
return options;
|
|
116757
116959
|
}
|
|
116758
|
-
|
|
116759
|
-
|
|
116760
|
-
|
|
116761
|
-
for (const [specPath, entry] of Object.entries(paths)) {
|
|
116762
|
-
if (!isRecord(entry)) continue;
|
|
116763
|
-
const pattern = specPath.replace(/\{[^}]+\}/g, "[^/]+");
|
|
116764
|
-
const regex = new RegExp(`^${pattern}$`);
|
|
116765
|
-
if (regex.test(targetPath)) {
|
|
116766
|
-
return { matchedPath: specPath, pathItem: entry };
|
|
116767
|
-
}
|
|
116768
|
-
}
|
|
116769
|
-
return null;
|
|
116770
|
-
}
|
|
116771
|
-
function resolveRef2(document2, ref, seen) {
|
|
116772
|
-
if (!ref.startsWith("#/")) return void 0;
|
|
116773
|
-
if (seen.has(ref)) return { $circular: ref };
|
|
116774
|
-
seen.add(ref);
|
|
116775
|
-
const parts = ref.slice(2).split("/");
|
|
116776
|
-
let current = document2;
|
|
116777
|
-
for (const part of parts) {
|
|
116778
|
-
if (!isRecord(current)) return void 0;
|
|
116779
|
-
current = current[part];
|
|
116780
|
-
if (current === void 0) return void 0;
|
|
116781
|
-
}
|
|
116782
|
-
if (isRecord(current)) return resolveRefs(document2, current, seen);
|
|
116783
|
-
return current;
|
|
116960
|
+
var { resolveRefSync } = import_dereference_json_schema.default;
|
|
116961
|
+
function isRecord2(value) {
|
|
116962
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
116784
116963
|
}
|
|
116785
|
-
function
|
|
116786
|
-
if (depth > 4) return obj;
|
|
116964
|
+
function deepResolveRefs(document2, obj) {
|
|
116787
116965
|
const resolved = {};
|
|
116788
116966
|
for (const [key, value] of Object.entries(obj)) {
|
|
116789
116967
|
if (key === "$ref" && typeof value === "string") {
|
|
116790
|
-
const deref =
|
|
116791
|
-
if (
|
|
116792
|
-
Object.assign(resolved, deref);
|
|
116968
|
+
const deref = resolveRefSync(document2, value);
|
|
116969
|
+
if (isRecord2(deref)) {
|
|
116970
|
+
Object.assign(resolved, deepResolveRefs(document2, deref));
|
|
116793
116971
|
} else {
|
|
116794
116972
|
resolved[key] = value;
|
|
116795
116973
|
}
|
|
116796
116974
|
continue;
|
|
116797
116975
|
}
|
|
116798
|
-
if (
|
|
116799
|
-
resolved[key] =
|
|
116976
|
+
if (isRecord2(value)) {
|
|
116977
|
+
resolved[key] = deepResolveRefs(document2, value);
|
|
116800
116978
|
continue;
|
|
116801
116979
|
}
|
|
116802
116980
|
if (Array.isArray(value)) {
|
|
116803
116981
|
resolved[key] = value.map(
|
|
116804
|
-
(item) =>
|
|
116982
|
+
(item) => isRecord2(item) ? deepResolveRefs(document2, item) : item
|
|
116805
116983
|
);
|
|
116806
116984
|
continue;
|
|
116807
116985
|
}
|
|
@@ -116809,6 +116987,22 @@ function resolveRefs(document2, obj, seen, depth = 0) {
|
|
|
116809
116987
|
}
|
|
116810
116988
|
return resolved;
|
|
116811
116989
|
}
|
|
116990
|
+
function resolveRefs(obj, document2) {
|
|
116991
|
+
return deepResolveRefs(document2, obj);
|
|
116992
|
+
}
|
|
116993
|
+
function findMatchingOpenApiPath(paths, targetPath) {
|
|
116994
|
+
const exact = paths[targetPath];
|
|
116995
|
+
if (isRecord(exact)) return { matchedPath: targetPath, pathItem: exact };
|
|
116996
|
+
for (const [specPath, entry] of Object.entries(paths)) {
|
|
116997
|
+
if (!isRecord(entry)) continue;
|
|
116998
|
+
const pattern = specPath.replace(/\{[^}]+\}/g, "[^/]+");
|
|
116999
|
+
const regex = new RegExp(`^${pattern}$`);
|
|
117000
|
+
if (regex.test(targetPath)) {
|
|
117001
|
+
return { matchedPath: specPath, pathItem: entry };
|
|
117002
|
+
}
|
|
117003
|
+
}
|
|
117004
|
+
return null;
|
|
117005
|
+
}
|
|
116812
117006
|
function extractRequestBodySchema(operationSchema) {
|
|
116813
117007
|
const requestBody = operationSchema.requestBody;
|
|
116814
117008
|
if (!isRecord(requestBody)) return void 0;
|
|
@@ -116888,7 +117082,7 @@ function getL3ForOpenAPI(openApi, path2, method) {
|
|
|
116888
117082
|
if (!matched) return null;
|
|
116889
117083
|
const operation = matched.pathItem[method.toLowerCase()];
|
|
116890
117084
|
if (!isRecord(operation)) return null;
|
|
116891
|
-
const resolvedOperation = resolveRefs(
|
|
117085
|
+
const resolvedOperation = resolveRefs(operation, document2);
|
|
116892
117086
|
const summary = typeof resolvedOperation.summary === "string" ? resolvedOperation.summary : typeof resolvedOperation.description === "string" ? resolvedOperation.description : void 0;
|
|
116893
117087
|
return {
|
|
116894
117088
|
source: "openapi",
|
|
@@ -116932,12 +117126,12 @@ function getAdvisoriesForProbe(probe, path2) {
|
|
|
116932
117126
|
});
|
|
116933
117127
|
}
|
|
116934
117128
|
async function checkEndpointSchema(options) {
|
|
116935
|
-
const endpoint = new URL(options.url);
|
|
117129
|
+
const endpoint = new URL(ensureProtocol(options.url));
|
|
116936
117130
|
const origin = normalizeOrigin(endpoint.origin);
|
|
116937
117131
|
const path2 = normalizePath(endpoint.pathname || "/");
|
|
116938
117132
|
if (options.sampleInputBody !== void 0) {
|
|
116939
117133
|
const probeResult2 = await getProbe(
|
|
116940
|
-
|
|
117134
|
+
endpoint.href,
|
|
116941
117135
|
options.headers,
|
|
116942
117136
|
options.signal,
|
|
116943
117137
|
options.sampleInputBody
|
|
@@ -116962,7 +117156,7 @@ async function checkEndpointSchema(options) {
|
|
|
116962
117156
|
if (advisories2.length > 0) return { found: true, origin, path: path2, advisories: advisories2 };
|
|
116963
117157
|
return { found: false, origin, path: path2, cause: "not_found" };
|
|
116964
117158
|
}
|
|
116965
|
-
const probeResult = await getProbe(
|
|
117159
|
+
const probeResult = await getProbe(endpoint.href, options.headers, options.signal);
|
|
116966
117160
|
if (probeResult.isErr()) {
|
|
116967
117161
|
return {
|
|
116968
117162
|
found: false,
|
|
@@ -117886,13 +118080,13 @@ var import_path3 = require("path");
|
|
|
117886
118080
|
var import_url2 = require("url");
|
|
117887
118081
|
function getVersion3() {
|
|
117888
118082
|
if (true) {
|
|
117889
|
-
return "0.8.
|
|
118083
|
+
return "0.8.3";
|
|
117890
118084
|
}
|
|
117891
118085
|
const __dirname3 = (0, import_path3.dirname)((0, import_url2.fileURLToPath)(importMetaUrl));
|
|
117892
|
-
const
|
|
118086
|
+
const pkg2 = JSON.parse(
|
|
117893
118087
|
(0, import_fs8.readFileSync)((0, import_path3.join)(__dirname3, "../../../package.json"), "utf-8")
|
|
117894
118088
|
);
|
|
117895
|
-
return
|
|
118089
|
+
return pkg2.version;
|
|
117896
118090
|
}
|
|
117897
118091
|
var MCP_VERSION2 = getVersion3();
|
|
117898
118092
|
var DIST_TAG2 = MCP_VERSION2.includes("-beta") ? "beta" : "latest";
|
|
@@ -4,7 +4,7 @@ import { dirname, join } from "path";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
function getVersion() {
|
|
6
6
|
if (true) {
|
|
7
|
-
return "0.8.
|
|
7
|
+
return "0.8.3";
|
|
8
8
|
}
|
|
9
9
|
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
const pkg = JSON.parse(
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
MCP_VERSION,
|
|
20
20
|
DIST_TAG
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-AFAWW7YZ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KAEAFW3A.js";
|
|
4
4
|
import {
|
|
5
5
|
DIST_TAG
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AFAWW7YZ.js";
|
|
7
7
|
import {
|
|
8
8
|
wait
|
|
9
9
|
} from "./chunk-DZNSJ2BA.js";
|
|
@@ -596,4 +596,4 @@ export {
|
|
|
596
596
|
tryAddServer,
|
|
597
597
|
addServer
|
|
598
598
|
};
|
|
599
|
-
//# sourceMappingURL=chunk-
|
|
599
|
+
//# sourceMappingURL=chunk-BDGWC3Y4.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMppEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DKMBMJQA.js";
|
|
4
4
|
import {
|
|
5
5
|
MCP_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AFAWW7YZ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBalance,
|
|
9
9
|
getBaseUrl,
|
|
@@ -138,4 +138,4 @@ export {
|
|
|
138
138
|
getWalletInfo,
|
|
139
139
|
submitErrorReport
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
141
|
+
//# sourceMappingURL=chunk-S5HW6SFM.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-4ALGXM6F.js";
|
|
4
4
|
import {
|
|
5
5
|
getTempoBalance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S5HW6SFM.js";
|
|
7
7
|
import {
|
|
8
8
|
isMppEnabled
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DKMBMJQA.js";
|
|
10
10
|
import {
|
|
11
11
|
getBalance
|
|
12
12
|
} from "./chunk-B2JUF6FK.js";
|
|
@@ -587,4 +587,4 @@ export {
|
|
|
587
587
|
getInputSchema,
|
|
588
588
|
createFetchWithAuth
|
|
589
589
|
};
|
|
590
|
-
//# sourceMappingURL=chunk-
|
|
590
|
+
//# sourceMappingURL=chunk-W65V5DL2.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getSettings,
|
|
10
10
|
requestSchema,
|
|
11
11
|
setSettings
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W65V5DL2.js";
|
|
13
13
|
import {
|
|
14
14
|
ORIGIN_METADATA,
|
|
15
15
|
PRIMARY_ORIGINS,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
getOnboardingCta,
|
|
23
23
|
getWalletInfo,
|
|
24
24
|
submitErrorReport
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-S5HW6SFM.js";
|
|
26
|
+
import "./chunk-DKMBMJQA.js";
|
|
27
27
|
import {
|
|
28
28
|
checkEndpoint,
|
|
29
29
|
discoverResources
|
|
@@ -31,11 +31,11 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
getPlatformPath,
|
|
33
33
|
tryAddServer
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BDGWC3Y4.js";
|
|
35
35
|
import "./chunk-KAEAFW3A.js";
|
|
36
36
|
import {
|
|
37
37
|
MCP_VERSION
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AFAWW7YZ.js";
|
|
39
39
|
import "./chunk-DZNSJ2BA.js";
|
|
40
40
|
import {
|
|
41
41
|
DEFAULT_NETWORK,
|
|
@@ -1029,7 +1029,7 @@ async function serverCommand(flags) {
|
|
|
1029
1029
|
"MCP server started. If you meant to explore the CLI, run: npx agentcash --help\n"
|
|
1030
1030
|
);
|
|
1031
1031
|
}
|
|
1032
|
-
const { startServer } = await import("./server-
|
|
1032
|
+
const { startServer } = await import("./server-P5FI6GYD.js");
|
|
1033
1033
|
await startServer(flags);
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
@@ -1743,4 +1743,4 @@ export {
|
|
|
1743
1743
|
walletInfoCommand,
|
|
1744
1744
|
walletRedeemCommand
|
|
1745
1745
|
};
|
|
1746
|
-
//# sourceMappingURL=commands-
|
|
1746
|
+
//# sourceMappingURL=commands-D4LB6MQN.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-4ALGXM6F.js";
|
|
7
7
|
import {
|
|
8
8
|
isMppEnabled
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DKMBMJQA.js";
|
|
10
10
|
import "./chunk-KAEAFW3A.js";
|
|
11
11
|
import {
|
|
12
12
|
MCP_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AFAWW7YZ.js";
|
|
14
14
|
import "./chunk-5GVHLIVV.js";
|
|
15
15
|
import "./chunk-CM4BCEDY.js";
|
|
16
16
|
|
|
@@ -91,7 +91,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
91
91
|
description: "Maximum amount (USD) to pay per request. Aborts if the endpoint requests more. Defaults to $5."
|
|
92
92
|
}).epilogue(DESCRIPTIONS.fetch.epilogue),
|
|
93
93
|
async (args) => {
|
|
94
|
-
const { fetchCommand } = await import("./commands-
|
|
94
|
+
const { fetchCommand } = await import("./commands-D4LB6MQN.js");
|
|
95
95
|
await fetchCommand(
|
|
96
96
|
{
|
|
97
97
|
url: args.url,
|
|
@@ -127,7 +127,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
127
127
|
description: "Additional headers as JSON object"
|
|
128
128
|
}).epilogue(DESCRIPTIONS.fetchWithAuth.epilogue),
|
|
129
129
|
async (args) => {
|
|
130
|
-
const { fetchAuthCommand } = await import("./commands-
|
|
130
|
+
const { fetchAuthCommand } = await import("./commands-D4LB6MQN.js");
|
|
131
131
|
await fetchAuthCommand(
|
|
132
132
|
{
|
|
133
133
|
url: args.url,
|
|
@@ -160,7 +160,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
160
160
|
description: "Additional headers as JSON object"
|
|
161
161
|
}).epilogue(DESCRIPTIONS.checkEndpointSchema.epilogue),
|
|
162
162
|
async (args) => {
|
|
163
|
-
const { checkCommand } = await import("./commands-
|
|
163
|
+
const { checkCommand } = await import("./commands-D4LB6MQN.js");
|
|
164
164
|
await checkCommand(
|
|
165
165
|
{
|
|
166
166
|
url: args.url,
|
|
@@ -180,7 +180,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
180
180
|
demandOption: true
|
|
181
181
|
}),
|
|
182
182
|
async (args) => {
|
|
183
|
-
const { tryCommand } = await import("./commands-
|
|
183
|
+
const { tryCommand } = await import("./commands-D4LB6MQN.js");
|
|
184
184
|
await tryCommand({ url: args.url }, args);
|
|
185
185
|
}
|
|
186
186
|
).command(
|
|
@@ -195,7 +195,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
195
195
|
description: "Guidance override: true=always include, false=never include, omitted=auto by threshold"
|
|
196
196
|
}).epilogue(DESCRIPTIONS.discoverApiEndpoints.epilogue),
|
|
197
197
|
async (args) => {
|
|
198
|
-
const { discoverCommand } = await import("./commands-
|
|
198
|
+
const { discoverCommand } = await import("./commands-D4LB6MQN.js");
|
|
199
199
|
await discoverCommand(
|
|
200
200
|
{ url: args.url, includeGuidance: args.includeGuidance },
|
|
201
201
|
args
|
|
@@ -210,7 +210,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
210
210
|
demandOption: true
|
|
211
211
|
}),
|
|
212
212
|
async (args) => {
|
|
213
|
-
const { registerCommand } = await import("./commands-
|
|
213
|
+
const { registerCommand } = await import("./commands-D4LB6MQN.js");
|
|
214
214
|
await registerCommand({ url: args.url }, args);
|
|
215
215
|
}
|
|
216
216
|
).command(
|
|
@@ -222,7 +222,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
222
222
|
demandOption: true
|
|
223
223
|
}),
|
|
224
224
|
async (args) => {
|
|
225
|
-
const { addSkillCommand } = await import("./commands-
|
|
225
|
+
const { addSkillCommand } = await import("./commands-D4LB6MQN.js");
|
|
226
226
|
await addSkillCommand({ url: args.url }, args);
|
|
227
227
|
}
|
|
228
228
|
).command(
|
|
@@ -237,7 +237,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
237
237
|
demandOption: true
|
|
238
238
|
}),
|
|
239
239
|
async (args) => {
|
|
240
|
-
const { originsAddCommand } = await import("./commands-
|
|
240
|
+
const { originsAddCommand } = await import("./commands-D4LB6MQN.js");
|
|
241
241
|
await originsAddCommand({ url: args.url }, args);
|
|
242
242
|
}
|
|
243
243
|
).command(
|
|
@@ -245,7 +245,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
245
245
|
"List all registered origins",
|
|
246
246
|
(yargs3) => yargs3,
|
|
247
247
|
async (args) => {
|
|
248
|
-
const { originsListCommand } = await import("./commands-
|
|
248
|
+
const { originsListCommand } = await import("./commands-D4LB6MQN.js");
|
|
249
249
|
originsListCommand({}, args);
|
|
250
250
|
}
|
|
251
251
|
).command(
|
|
@@ -257,7 +257,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
257
257
|
demandOption: true
|
|
258
258
|
}),
|
|
259
259
|
async (args) => {
|
|
260
|
-
const { originsRemoveCommand } = await import("./commands-
|
|
260
|
+
const { originsRemoveCommand } = await import("./commands-D4LB6MQN.js");
|
|
261
261
|
originsRemoveCommand({ url: args.url }, args);
|
|
262
262
|
}
|
|
263
263
|
).demandCommand(1, "You must specify an origins subcommand").strict(),
|
|
@@ -271,7 +271,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
271
271
|
description: "The invite code to redeem (optional)"
|
|
272
272
|
}),
|
|
273
273
|
async (args) => {
|
|
274
|
-
const { onboardCommand } = await import("./commands-
|
|
274
|
+
const { onboardCommand } = await import("./commands-D4LB6MQN.js");
|
|
275
275
|
await onboardCommand({ code: args.code ?? args.invite }, args);
|
|
276
276
|
}
|
|
277
277
|
).command(
|
|
@@ -282,7 +282,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
282
282
|
DESCRIPTIONS.getWalletInfo.cli,
|
|
283
283
|
(yargs3) => yargs3,
|
|
284
284
|
async (args) => {
|
|
285
|
-
const { walletInfoCommand } = await import("./commands-
|
|
285
|
+
const { walletInfoCommand } = await import("./commands-D4LB6MQN.js");
|
|
286
286
|
await walletInfoCommand({}, args);
|
|
287
287
|
}
|
|
288
288
|
).command(
|
|
@@ -294,7 +294,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
294
294
|
demandOption: true
|
|
295
295
|
}),
|
|
296
296
|
async (args) => {
|
|
297
|
-
const { walletRedeemCommand } = await import("./commands-
|
|
297
|
+
const { walletRedeemCommand } = await import("./commands-D4LB6MQN.js");
|
|
298
298
|
await walletRedeemCommand({ code: args.code }, args);
|
|
299
299
|
}
|
|
300
300
|
).command(
|
|
@@ -302,7 +302,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
302
302
|
"Get wallet address",
|
|
303
303
|
(yargs3) => yargs3,
|
|
304
304
|
async (args) => {
|
|
305
|
-
const { walletAddressCommand } = await import("./commands-
|
|
305
|
+
const { walletAddressCommand } = await import("./commands-D4LB6MQN.js");
|
|
306
306
|
await walletAddressCommand({}, args);
|
|
307
307
|
}
|
|
308
308
|
).demandCommand(1, "You must specify a wallet subcommand").strict(),
|
|
@@ -316,7 +316,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
316
316
|
"Show current settings",
|
|
317
317
|
(yargs3) => yargs3,
|
|
318
318
|
async (args) => {
|
|
319
|
-
const { settingsGetCommand } = await import("./commands-
|
|
319
|
+
const { settingsGetCommand } = await import("./commands-D4LB6MQN.js");
|
|
320
320
|
settingsGetCommand({}, args);
|
|
321
321
|
}
|
|
322
322
|
).command(
|
|
@@ -332,7 +332,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
332
332
|
demandOption: true
|
|
333
333
|
}),
|
|
334
334
|
async (args) => {
|
|
335
|
-
const { settingsSetCommand } = await import("./commands-
|
|
335
|
+
const { settingsSetCommand } = await import("./commands-D4LB6MQN.js");
|
|
336
336
|
settingsSetCommand(
|
|
337
337
|
{ key: args.key, value: args.value },
|
|
338
338
|
args
|
|
@@ -367,7 +367,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
367
367
|
description: "Detailed report with context and repro steps"
|
|
368
368
|
}),
|
|
369
369
|
async (args) => {
|
|
370
|
-
const { reportErrorCommand } = await import("./commands-
|
|
370
|
+
const { reportErrorCommand } = await import("./commands-D4LB6MQN.js");
|
|
371
371
|
await reportErrorCommand(
|
|
372
372
|
{
|
|
373
373
|
tool: args.tool,
|
|
@@ -385,7 +385,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
385
385
|
"Start the MCP server (default when no command specified)",
|
|
386
386
|
(yargs2) => yargs2,
|
|
387
387
|
async (args) => {
|
|
388
|
-
const { serverCommand } = await import("./commands-
|
|
388
|
+
const { serverCommand } = await import("./commands-D4LB6MQN.js");
|
|
389
389
|
await serverCommand(args);
|
|
390
390
|
}
|
|
391
391
|
).command(
|
|
@@ -398,7 +398,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
|
|
|
398
398
|
default: isClaudeCode ? "claude-code" /* ClaudeCode */ : void 0
|
|
399
399
|
}),
|
|
400
400
|
async (args) => {
|
|
401
|
-
const { installMcpServer } = await import("./install-
|
|
401
|
+
const { installMcpServer } = await import("./install-3EASO5YD.js");
|
|
402
402
|
await installMcpServer(args);
|
|
403
403
|
}
|
|
404
404
|
).command(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BDGWC3Y4.js";
|
|
4
4
|
import {
|
|
5
5
|
Clients,
|
|
6
6
|
clientMetadata
|
|
7
7
|
} from "./chunk-KAEAFW3A.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-AFAWW7YZ.js";
|
|
9
9
|
import {
|
|
10
10
|
promptDeposit
|
|
11
11
|
} from "./chunk-NCBPOUV6.js";
|
|
@@ -178,4 +178,4 @@ var installMcpServer = async (flags) => {
|
|
|
178
178
|
export {
|
|
179
179
|
installMcpServer
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=install-
|
|
181
|
+
//# sourceMappingURL=install-3EASO5YD.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
safeGetMppChallenge,
|
|
11
11
|
safeGetPaymentRequired,
|
|
12
12
|
setSettings
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W65V5DL2.js";
|
|
14
14
|
import {
|
|
15
15
|
DESCRIPTIONS,
|
|
16
16
|
ORIGINS,
|
|
@@ -24,17 +24,17 @@ import {
|
|
|
24
24
|
getTempoBalance,
|
|
25
25
|
getWalletInfo,
|
|
26
26
|
submitErrorReport
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-S5HW6SFM.js";
|
|
28
28
|
import {
|
|
29
29
|
isMppEnabled
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DKMBMJQA.js";
|
|
31
31
|
import {
|
|
32
32
|
checkEndpoint,
|
|
33
33
|
discoverResources
|
|
34
34
|
} from "./chunk-LKZJ456N.js";
|
|
35
35
|
import {
|
|
36
36
|
MCP_VERSION
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-AFAWW7YZ.js";
|
|
38
38
|
import {
|
|
39
39
|
DEFAULT_NETWORK,
|
|
40
40
|
getWallet,
|
|
@@ -1281,7 +1281,7 @@ import { dirname, join } from "path";
|
|
|
1281
1281
|
import { fileURLToPath } from "url";
|
|
1282
1282
|
function getVersion() {
|
|
1283
1283
|
if (true) {
|
|
1284
|
-
return "0.8.
|
|
1284
|
+
return "0.8.3";
|
|
1285
1285
|
}
|
|
1286
1286
|
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
1287
1287
|
const pkg = JSON.parse(
|
|
@@ -1365,4 +1365,4 @@ var startServer = async (flags) => {
|
|
|
1365
1365
|
export {
|
|
1366
1366
|
startServer
|
|
1367
1367
|
};
|
|
1368
|
-
//# sourceMappingURL=server-
|
|
1368
|
+
//# sourceMappingURL=server-P5FI6GYD.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWalletInfo,
|
|
3
3
|
submitErrorReport
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-S5HW6SFM.js";
|
|
5
|
+
import "../../chunk-DKMBMJQA.js";
|
|
6
6
|
import {
|
|
7
7
|
SUPPORTED_METHODS,
|
|
8
8
|
checkEndpoint,
|
|
9
9
|
discoverResources
|
|
10
10
|
} from "../../chunk-LKZJ456N.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-AFAWW7YZ.js";
|
|
12
12
|
import "../../chunk-B2JUF6FK.js";
|
|
13
13
|
import "../../chunk-36KCO2CQ.js";
|
|
14
14
|
import "../../chunk-CM4BCEDY.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentcash",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Generic MCP server for calling x402-protected APIs with automatic payment handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/lib.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agentcash/discovery": "1.0
|
|
25
|
+
"@agentcash/discovery": "1.1.0",
|
|
26
26
|
"@clack/prompts": "^0.11.0",
|
|
27
27
|
"@iarna/toml": "^2.2.5",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"tsx": "^4.21.0",
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
51
|
"vitest": "^4.0.18",
|
|
52
|
+
"@agentcash/typescript-config": "0.0.1",
|
|
52
53
|
"@agentcash/eslint-config": "0.0.1",
|
|
53
|
-
"@agentcash/neverthrow": "1.0.1"
|
|
54
|
-
"@agentcash/typescript-config": "0.0.1"
|
|
54
|
+
"@agentcash/neverthrow": "1.0.1"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|