@agentcash/discovery 0.1.0
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/.claude/CLAUDE.md +24 -0
- package/AGENTS.md +23 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/bin/discovery.js +6 -0
- package/dist/cli.cjs +1825 -0
- package/dist/cli.d.cts +15 -0
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +1798 -0
- package/dist/flags.cjs +44 -0
- package/dist/flags.d.cts +6 -0
- package/dist/flags.d.ts +6 -0
- package/dist/flags.js +17 -0
- package/dist/index.cjs +1448 -0
- package/dist/index.d.cts +106 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +1415 -0
- package/dist/schemas.cjs +58 -0
- package/dist/schemas.d.cts +40 -0
- package/dist/schemas.d.ts +40 -0
- package/dist/schemas.js +28 -0
- package/package.json +95 -0
package/dist/schemas.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schemas.ts
|
|
21
|
+
var schemas_exports = {};
|
|
22
|
+
__export(schemas_exports, {
|
|
23
|
+
AgentcashAuthSchema: () => AgentcashAuthSchema,
|
|
24
|
+
AgentcashGuidanceSchema: () => AgentcashGuidanceSchema,
|
|
25
|
+
AgentcashProvenanceSchema: () => AgentcashProvenanceSchema,
|
|
26
|
+
AuthModeSchema: () => AuthModeSchema,
|
|
27
|
+
PaymentInfoSchema: () => PaymentInfoSchema,
|
|
28
|
+
PricingModeSchema: () => PricingModeSchema
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
31
|
+
var import_zod = require("zod");
|
|
32
|
+
var AuthModeSchema = import_zod.z.enum(["paid", "siwx", "apiKey", "unprotected"]);
|
|
33
|
+
var PricingModeSchema = import_zod.z.enum(["fixed", "range", "quote"]);
|
|
34
|
+
var AgentcashAuthSchema = import_zod.z.object({
|
|
35
|
+
mode: AuthModeSchema
|
|
36
|
+
});
|
|
37
|
+
var PaymentInfoSchema = import_zod.z.object({
|
|
38
|
+
protocols: import_zod.z.array(import_zod.z.string()).nonempty().optional(),
|
|
39
|
+
pricingMode: PricingModeSchema.optional(),
|
|
40
|
+
price: import_zod.z.string().optional(),
|
|
41
|
+
minPrice: import_zod.z.string().optional(),
|
|
42
|
+
maxPrice: import_zod.z.string().optional()
|
|
43
|
+
});
|
|
44
|
+
var AgentcashProvenanceSchema = import_zod.z.object({
|
|
45
|
+
ownershipProofs: import_zod.z.array(import_zod.z.string()).optional()
|
|
46
|
+
});
|
|
47
|
+
var AgentcashGuidanceSchema = import_zod.z.object({
|
|
48
|
+
llmsTxtUrl: import_zod.z.string().url().optional()
|
|
49
|
+
});
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
AgentcashAuthSchema,
|
|
53
|
+
AgentcashGuidanceSchema,
|
|
54
|
+
AgentcashProvenanceSchema,
|
|
55
|
+
AuthModeSchema,
|
|
56
|
+
PaymentInfoSchema,
|
|
57
|
+
PricingModeSchema
|
|
58
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const AuthModeSchema: z.ZodEnum<{
|
|
4
|
+
paid: "paid";
|
|
5
|
+
siwx: "siwx";
|
|
6
|
+
apiKey: "apiKey";
|
|
7
|
+
unprotected: "unprotected";
|
|
8
|
+
}>;
|
|
9
|
+
declare const PricingModeSchema: z.ZodEnum<{
|
|
10
|
+
fixed: "fixed";
|
|
11
|
+
range: "range";
|
|
12
|
+
quote: "quote";
|
|
13
|
+
}>;
|
|
14
|
+
declare const AgentcashAuthSchema: z.ZodObject<{
|
|
15
|
+
mode: z.ZodEnum<{
|
|
16
|
+
paid: "paid";
|
|
17
|
+
siwx: "siwx";
|
|
18
|
+
apiKey: "apiKey";
|
|
19
|
+
unprotected: "unprotected";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const PaymentInfoSchema: z.ZodObject<{
|
|
23
|
+
protocols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
pricingMode: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
fixed: "fixed";
|
|
26
|
+
range: "range";
|
|
27
|
+
quote: "quote";
|
|
28
|
+
}>>;
|
|
29
|
+
price: z.ZodOptional<z.ZodString>;
|
|
30
|
+
minPrice: z.ZodOptional<z.ZodString>;
|
|
31
|
+
maxPrice: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
declare const AgentcashProvenanceSchema: z.ZodObject<{
|
|
34
|
+
ownershipProofs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
declare const AgentcashGuidanceSchema: z.ZodObject<{
|
|
37
|
+
llmsTxtUrl: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
|
|
40
|
+
export { AgentcashAuthSchema, AgentcashGuidanceSchema, AgentcashProvenanceSchema, AuthModeSchema, PaymentInfoSchema, PricingModeSchema };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const AuthModeSchema: z.ZodEnum<{
|
|
4
|
+
paid: "paid";
|
|
5
|
+
siwx: "siwx";
|
|
6
|
+
apiKey: "apiKey";
|
|
7
|
+
unprotected: "unprotected";
|
|
8
|
+
}>;
|
|
9
|
+
declare const PricingModeSchema: z.ZodEnum<{
|
|
10
|
+
fixed: "fixed";
|
|
11
|
+
range: "range";
|
|
12
|
+
quote: "quote";
|
|
13
|
+
}>;
|
|
14
|
+
declare const AgentcashAuthSchema: z.ZodObject<{
|
|
15
|
+
mode: z.ZodEnum<{
|
|
16
|
+
paid: "paid";
|
|
17
|
+
siwx: "siwx";
|
|
18
|
+
apiKey: "apiKey";
|
|
19
|
+
unprotected: "unprotected";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const PaymentInfoSchema: z.ZodObject<{
|
|
23
|
+
protocols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
pricingMode: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
fixed: "fixed";
|
|
26
|
+
range: "range";
|
|
27
|
+
quote: "quote";
|
|
28
|
+
}>>;
|
|
29
|
+
price: z.ZodOptional<z.ZodString>;
|
|
30
|
+
minPrice: z.ZodOptional<z.ZodString>;
|
|
31
|
+
maxPrice: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
declare const AgentcashProvenanceSchema: z.ZodObject<{
|
|
34
|
+
ownershipProofs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
declare const AgentcashGuidanceSchema: z.ZodObject<{
|
|
37
|
+
llmsTxtUrl: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
|
|
40
|
+
export { AgentcashAuthSchema, AgentcashGuidanceSchema, AgentcashProvenanceSchema, AuthModeSchema, PaymentInfoSchema, PricingModeSchema };
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/schemas.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var AuthModeSchema = z.enum(["paid", "siwx", "apiKey", "unprotected"]);
|
|
4
|
+
var PricingModeSchema = z.enum(["fixed", "range", "quote"]);
|
|
5
|
+
var AgentcashAuthSchema = z.object({
|
|
6
|
+
mode: AuthModeSchema
|
|
7
|
+
});
|
|
8
|
+
var PaymentInfoSchema = z.object({
|
|
9
|
+
protocols: z.array(z.string()).nonempty().optional(),
|
|
10
|
+
pricingMode: PricingModeSchema.optional(),
|
|
11
|
+
price: z.string().optional(),
|
|
12
|
+
minPrice: z.string().optional(),
|
|
13
|
+
maxPrice: z.string().optional()
|
|
14
|
+
});
|
|
15
|
+
var AgentcashProvenanceSchema = z.object({
|
|
16
|
+
ownershipProofs: z.array(z.string()).optional()
|
|
17
|
+
});
|
|
18
|
+
var AgentcashGuidanceSchema = z.object({
|
|
19
|
+
llmsTxtUrl: z.string().url().optional()
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
AgentcashAuthSchema,
|
|
23
|
+
AgentcashGuidanceSchema,
|
|
24
|
+
AgentcashProvenanceSchema,
|
|
25
|
+
AuthModeSchema,
|
|
26
|
+
PaymentInfoSchema,
|
|
27
|
+
PricingModeSchema
|
|
28
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentcash/discovery",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Canonical OpenAPI-first discovery runtime for the agentcash ecosystem",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": "./bin/discovery.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"./schemas": {
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/schemas.d.ts",
|
|
24
|
+
"default": "./dist/schemas.js"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/schemas.d.cts",
|
|
28
|
+
"default": "./dist/schemas.cjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"./flags": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/flags.d.ts",
|
|
34
|
+
"default": "./dist/flags.js"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/flags.d.cts",
|
|
38
|
+
"default": "./dist/flags.cjs"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"bin",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
".claude/CLAUDE.md",
|
|
48
|
+
"AGENTS.md"
|
|
49
|
+
],
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=20"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"agentcash",
|
|
55
|
+
"discovery",
|
|
56
|
+
"x402",
|
|
57
|
+
"mpp",
|
|
58
|
+
"openapi"
|
|
59
|
+
],
|
|
60
|
+
"license": "MIT",
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "https://github.com/merit-systems/agentcash-discovery"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"zod": "^4.1.13"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@changesets/cli": "^2.29.8",
|
|
73
|
+
"@eslint/js": "^10.0.1",
|
|
74
|
+
"@types/node": "^22.18.0",
|
|
75
|
+
"eslint": "^10.0.0",
|
|
76
|
+
"prettier": "^3.8.1",
|
|
77
|
+
"tsup": "^8.5.0",
|
|
78
|
+
"typescript": "^5.9.2",
|
|
79
|
+
"typescript-eslint": "^8.43.0",
|
|
80
|
+
"vitest": "^3.2.4"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsup",
|
|
84
|
+
"typecheck": "tsc --noEmit",
|
|
85
|
+
"lint": "eslint src/ tests/",
|
|
86
|
+
"lint:fix": "eslint src/ tests/ --fix",
|
|
87
|
+
"format": "prettier --write 'src/**/*.ts' 'tests/**/*.ts' 'scripts/**/*.mjs' '*.json' '*.mjs' '*.md'",
|
|
88
|
+
"format:check": "prettier --check 'src/**/*.ts' 'tests/**/*.ts' 'scripts/**/*.mjs' '*.json' '*.mjs' '*.md'",
|
|
89
|
+
"test": "vitest run",
|
|
90
|
+
"test:watch": "vitest",
|
|
91
|
+
"audit:registry": "pnpm build && node scripts/audit-registry.mjs",
|
|
92
|
+
"audit:registry:quick": "pnpm build && node scripts/audit-registry.mjs --origin-limit 50 --resource-limit 500",
|
|
93
|
+
"check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm build && pnpm test"
|
|
94
|
+
}
|
|
95
|
+
}
|