usepaso 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/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const commander_1 = require("commander");
5
+ const path_1 = require("path");
6
+ const fs_1 = require("fs");
7
+ const parser_1 = require("./parser");
8
+ const validator_1 = require("./validator");
9
+ const mcp_1 = require("./generators/mcp");
10
+ const program = new commander_1.Command();
11
+ program
12
+ .name('usepaso')
13
+ .description('Make your API agent-ready in minutes')
14
+ .version('0.1.0');
15
+ program
16
+ .command('init')
17
+ .description('Create a paso.yaml template in the current directory')
18
+ .option('-n, --name <name>', 'Service name')
19
+ .action((opts) => {
20
+ const outPath = (0, path_1.resolve)('paso.yaml');
21
+ if ((0, fs_1.existsSync)(outPath)) {
22
+ console.error('paso.yaml already exists in this directory.');
23
+ process.exit(1);
24
+ }
25
+ const name = opts.name || 'MyService';
26
+ const template = `version: "1.0"
27
+
28
+ service:
29
+ name: ${name}
30
+ description: TODO — describe what your service does
31
+ base_url: https://api.example.com
32
+ auth:
33
+ type: bearer
34
+
35
+ capabilities:
36
+ - name: example_action
37
+ description: TODO — describe what this action does
38
+ method: GET
39
+ path: /example
40
+ permission: read
41
+ inputs:
42
+ id:
43
+ type: string
44
+ required: true
45
+ description: TODO — describe this parameter
46
+ in: query
47
+ output:
48
+ result:
49
+ type: string
50
+ description: TODO — describe the output
51
+
52
+ permissions:
53
+ read:
54
+ - example_action
55
+ `;
56
+ (0, fs_1.writeFileSync)(outPath, template, 'utf-8');
57
+ console.log(`Created paso.yaml for "${name}"`);
58
+ console.log('Edit the file to declare your API capabilities, then run: usepaso serve');
59
+ });
60
+ program
61
+ .command('validate')
62
+ .description('Validate a paso.yaml file')
63
+ .option('-f, --file <path>', 'Path to paso.yaml', 'paso.yaml')
64
+ .action((opts) => {
65
+ const filePath = (0, path_1.resolve)(opts.file);
66
+ if (!(0, fs_1.existsSync)(filePath)) {
67
+ console.error(`File not found: ${filePath}`);
68
+ process.exit(1);
69
+ }
70
+ try {
71
+ const decl = (0, parser_1.parseFile)(filePath);
72
+ const errors = (0, validator_1.validate)(decl);
73
+ if (errors.length === 0) {
74
+ console.log(`${filePath} is valid.`);
75
+ console.log(`Service: ${decl.service.name}`);
76
+ console.log(`Capabilities: ${decl.capabilities.length}`);
77
+ }
78
+ else {
79
+ console.error(`Found ${errors.length} error(s):`);
80
+ for (const err of errors) {
81
+ console.error(` ${err.path}: ${err.message}`);
82
+ }
83
+ process.exit(1);
84
+ }
85
+ }
86
+ catch (err) {
87
+ console.error(`Failed to parse: ${err instanceof Error ? err.message : err}`);
88
+ process.exit(1);
89
+ }
90
+ });
91
+ program
92
+ .command('serve')
93
+ .description('Start an MCP server from a paso.yaml declaration')
94
+ .option('-f, --file <path>', 'Path to paso.yaml', 'paso.yaml')
95
+ .action(async (opts) => {
96
+ const filePath = (0, path_1.resolve)(opts.file);
97
+ if (!(0, fs_1.existsSync)(filePath)) {
98
+ console.error(`File not found: ${filePath}`);
99
+ process.exit(1);
100
+ }
101
+ try {
102
+ const decl = (0, parser_1.parseFile)(filePath);
103
+ const errors = (0, validator_1.validate)(decl);
104
+ if (errors.length > 0) {
105
+ console.error(`Validation failed with ${errors.length} error(s):`);
106
+ for (const err of errors) {
107
+ console.error(` ${err.path}: ${err.message}`);
108
+ }
109
+ process.exit(1);
110
+ }
111
+ console.error(`Paso MCP server starting for "${decl.service.name}"...`);
112
+ console.error(`Capabilities: ${decl.capabilities.length}`);
113
+ console.error('Transport: stdio');
114
+ console.error('Waiting for MCP client connection...');
115
+ await (0, mcp_1.serveMcp)(decl);
116
+ }
117
+ catch (err) {
118
+ console.error(`Failed to start: ${err instanceof Error ? err.message : err}`);
119
+ process.exit(1);
120
+ }
121
+ });
122
+ program.parse();
123
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,+BAAqC;AACrC,2BAA+C;AAC/C,qCAAqC;AACrC,2CAAuC;AACvC,0CAA4C;AAE5C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,sCAAsC,CAAC;KACnD,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,sDAAsD,CAAC;KACnE,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC;KAC3C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;IACf,MAAM,OAAO,GAAG,IAAA,cAAO,EAAC,WAAW,CAAC,CAAC;IACrC,IAAI,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC;IACtC,MAAM,QAAQ,GAAG;;;UAGX,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Bb,CAAC;IAEE,IAAA,kBAAa,EAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,GAAG,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;AACzF,CAAC,CAAC,CAAC;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AO,CAAC,KAAK,CAAC,iBAAiB,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3D,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAEtD,MAAM,IAAA,cAAQ,EAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { PasoDeclaration } from '../types';
3
+ /**
4
+ * Generate and return an McpServer from a Paso declaration.
5
+ * Each capability becomes an MCP tool.
6
+ */
7
+ export declare function generateMcpServer(decl: PasoDeclaration): McpServer;
8
+ /**
9
+ * Start the MCP server on stdio transport.
10
+ */
11
+ export declare function serveMcp(decl: PasoDeclaration): Promise<void>;
12
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/generators/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,eAAe,EAA6B,MAAM,UAAU,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,SAAS,CA0BlE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAInE"}
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateMcpServer = generateMcpServer;
4
+ exports.serveMcp = serveMcp;
5
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
6
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
7
+ const zod_1 = require("zod");
8
+ /**
9
+ * Generate and return an McpServer from a Paso declaration.
10
+ * Each capability becomes an MCP tool.
11
+ */
12
+ function generateMcpServer(decl) {
13
+ const server = new mcp_js_1.McpServer({
14
+ name: decl.service.name,
15
+ version: decl.service.version || '1.0.0',
16
+ });
17
+ const forbidden = new Set(decl.permissions?.forbidden || []);
18
+ for (const cap of decl.capabilities) {
19
+ if (forbidden.has(cap.name))
20
+ continue;
21
+ const inputSchema = buildZodSchema(cap);
22
+ const description = buildToolDescription(cap, decl);
23
+ if (inputSchema) {
24
+ server.tool(cap.name, description, inputSchema, async (args) => {
25
+ return await executeCapability(cap, args, decl);
26
+ });
27
+ }
28
+ else {
29
+ server.tool(cap.name, description, async () => {
30
+ return await executeCapability(cap, {}, decl);
31
+ });
32
+ }
33
+ }
34
+ return server;
35
+ }
36
+ /**
37
+ * Start the MCP server on stdio transport.
38
+ */
39
+ async function serveMcp(decl) {
40
+ const server = generateMcpServer(decl);
41
+ const transport = new stdio_js_1.StdioServerTransport();
42
+ await server.connect(transport);
43
+ }
44
+ /**
45
+ * Build a Zod schema from a capability's inputs.
46
+ * Returns undefined if the capability has no inputs.
47
+ */
48
+ function buildZodSchema(cap) {
49
+ if (!cap.inputs || Object.keys(cap.inputs).length === 0)
50
+ return undefined;
51
+ const shape = {};
52
+ for (const [name, input] of Object.entries(cap.inputs)) {
53
+ let field = inputToZod(input);
54
+ if (!input.required) {
55
+ field = field.optional();
56
+ }
57
+ if (input.description) {
58
+ field = field.describe(input.description);
59
+ }
60
+ shape[name] = field;
61
+ }
62
+ return shape;
63
+ }
64
+ /**
65
+ * Convert a PasoInput to a Zod type.
66
+ */
67
+ function inputToZod(input) {
68
+ switch (input.type) {
69
+ case 'string':
70
+ return zod_1.z.string();
71
+ case 'integer':
72
+ return zod_1.z.number().int();
73
+ case 'number':
74
+ return zod_1.z.number();
75
+ case 'boolean':
76
+ return zod_1.z.boolean();
77
+ case 'enum':
78
+ if (input.values && input.values.length > 0) {
79
+ const vals = input.values.map(v => String(v));
80
+ return zod_1.z.enum(vals);
81
+ }
82
+ return zod_1.z.string();
83
+ case 'array':
84
+ return zod_1.z.array(zod_1.z.unknown());
85
+ case 'object':
86
+ return zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
87
+ default:
88
+ return zod_1.z.unknown();
89
+ }
90
+ }
91
+ /**
92
+ * Build a rich tool description from the capability and service info.
93
+ */
94
+ function buildToolDescription(cap, decl) {
95
+ let desc = cap.description;
96
+ if (cap.consent_required) {
97
+ desc += '\n\n⚠️ REQUIRES USER CONSENT: You must confirm this action with the user before executing.';
98
+ }
99
+ if (cap.constraints && cap.constraints.length > 0) {
100
+ desc += '\n\nConstraints:';
101
+ for (const c of cap.constraints) {
102
+ if (c.description)
103
+ desc += `\n- ${c.description}`;
104
+ if (c.max_per_hour)
105
+ desc += `\n- Rate limit: ${c.max_per_hour}/hour`;
106
+ if (c.max_value)
107
+ desc += `\n- Max value: ${c.max_value}`;
108
+ if (c.max_per_request)
109
+ desc += `\n- Max per request: ${c.max_per_request}`;
110
+ }
111
+ }
112
+ return desc;
113
+ }
114
+ /**
115
+ * Execute a capability by making the actual HTTP request to the service.
116
+ */
117
+ async function executeCapability(cap, args, decl) {
118
+ // Build the URL
119
+ let path = cap.path;
120
+ const queryParams = {};
121
+ const bodyParams = {};
122
+ if (cap.inputs) {
123
+ for (const [name, input] of Object.entries(cap.inputs)) {
124
+ const value = args[name];
125
+ if (value === undefined)
126
+ continue;
127
+ const location = input.in || (['POST', 'PUT', 'PATCH'].includes(cap.method) ? 'body' : 'query');
128
+ switch (location) {
129
+ case 'path':
130
+ path = path.replace(`{${name}}`, encodeURIComponent(String(value)));
131
+ break;
132
+ case 'query':
133
+ queryParams[name] = String(value);
134
+ break;
135
+ case 'header':
136
+ // Headers handled separately
137
+ break;
138
+ case 'body':
139
+ default:
140
+ bodyParams[name] = value;
141
+ break;
142
+ }
143
+ }
144
+ }
145
+ const url = new URL(path, decl.service.base_url);
146
+ for (const [k, v] of Object.entries(queryParams)) {
147
+ url.searchParams.set(k, v);
148
+ }
149
+ // Build headers
150
+ const headers = {
151
+ 'Content-Type': 'application/json',
152
+ 'Accept': 'application/json',
153
+ };
154
+ if (decl.service.auth) {
155
+ // Auth token comes from environment variable: PASO_AUTH_TOKEN
156
+ const token = process.env.PASO_AUTH_TOKEN;
157
+ if (token) {
158
+ const authHeader = decl.service.auth.header || 'Authorization';
159
+ const prefix = decl.service.auth.prefix ?? (decl.service.auth.type === 'bearer' ? 'Bearer' : '');
160
+ headers[authHeader] = prefix ? `${prefix} ${token}` : token;
161
+ }
162
+ }
163
+ // Add any header-type inputs
164
+ if (cap.inputs) {
165
+ for (const [name, input] of Object.entries(cap.inputs)) {
166
+ if (input.in === 'header' && args[name] !== undefined) {
167
+ headers[name] = String(args[name]);
168
+ }
169
+ }
170
+ }
171
+ try {
172
+ const fetchOptions = {
173
+ method: cap.method,
174
+ headers,
175
+ };
176
+ if (['POST', 'PUT', 'PATCH'].includes(cap.method) && Object.keys(bodyParams).length > 0) {
177
+ fetchOptions.body = JSON.stringify(bodyParams);
178
+ }
179
+ const response = await fetch(url.toString(), fetchOptions);
180
+ const text = await response.text();
181
+ let result;
182
+ try {
183
+ const json = JSON.parse(text);
184
+ result = JSON.stringify(json, null, 2);
185
+ }
186
+ catch {
187
+ result = text;
188
+ }
189
+ if (!response.ok) {
190
+ return {
191
+ content: [{ type: 'text', text: `Error ${response.status}: ${result}` }],
192
+ };
193
+ }
194
+ return {
195
+ content: [{ type: 'text', text: result }],
196
+ };
197
+ }
198
+ catch (error) {
199
+ return {
200
+ content: [{ type: 'text', text: `Request failed: ${error instanceof Error ? error.message : String(error)}` }],
201
+ };
202
+ }
203
+ }
204
+ //# sourceMappingURL=mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/generators/mcp.ts"],"names":[],"mappings":";;AASA,8CA0BC;AAKD,4BAIC;AA5CD,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AAGxB;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,IAAqB;IACrD,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QAC3B,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;QACvB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO;KACzC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;IAE7D,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACpC,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAEtC,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,WAAW,GAAG,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEpD,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC7D,OAAO,MAAM,iBAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAClD,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,EAAE;gBAC5C,OAAO,MAAM,iBAAiB,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAChD,CAAC,CA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AAE,SAAS,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,EAAE,CAAC;aACzE,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SAC1C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;SAC/G,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { parseFile, parseString } from './parser';
2
+ export { validate } from './validator';
3
+ export { generateMcpServer } from './generators/mcp';
4
+ export type { PasoDeclaration, PasoService, PasoAuth, PasoCapability, PasoInput, PasoOutput, PasoConstraint, PasoPermissions, ValidationError, } from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateMcpServer = exports.validate = exports.parseString = exports.parseFile = void 0;
4
+ var parser_1 = require("./parser");
5
+ Object.defineProperty(exports, "parseFile", { enumerable: true, get: function () { return parser_1.parseFile; } });
6
+ Object.defineProperty(exports, "parseString", { enumerable: true, get: function () { return parser_1.parseString; } });
7
+ var validator_1 = require("./validator");
8
+ Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validator_1.validate; } });
9
+ var mcp_1 = require("./generators/mcp");
10
+ Object.defineProperty(exports, "generateMcpServer", { enumerable: true, get: function () { return mcp_1.generateMcpServer; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkD;AAAzC,mGAAA,SAAS,OAAA;AAAE,qGAAA,WAAW,OAAA;AAC/B,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,wCAAqD;AAA5C,wGAAA,iBAAiB,OAAA"}
@@ -0,0 +1,11 @@
1
+ import { PasoDeclaration } from './types';
2
+ /**
3
+ * Parse a paso.yaml file from disk and return the raw declaration object.
4
+ * Does NOT validate — call validate() separately.
5
+ */
6
+ export declare function parseFile(filePath: string): PasoDeclaration;
7
+ /**
8
+ * Parse a YAML string into a PasoDeclaration.
9
+ */
10
+ export declare function parseString(content: string): PasoDeclaration;
11
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAG3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAM5D"}
package/dist/parser.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseFile = parseFile;
4
+ exports.parseString = parseString;
5
+ const fs_1 = require("fs");
6
+ const yaml_1 = require("yaml");
7
+ /**
8
+ * Parse a paso.yaml file from disk and return the raw declaration object.
9
+ * Does NOT validate — call validate() separately.
10
+ */
11
+ function parseFile(filePath) {
12
+ const content = (0, fs_1.readFileSync)(filePath, 'utf-8');
13
+ return parseString(content);
14
+ }
15
+ /**
16
+ * Parse a YAML string into a PasoDeclaration.
17
+ */
18
+ function parseString(content) {
19
+ const parsed = (0, yaml_1.parse)(content);
20
+ if (!parsed || typeof parsed !== 'object') {
21
+ throw new Error('Invalid YAML: expected an object');
22
+ }
23
+ return parsed;
24
+ }
25
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;AAQA,8BAGC;AAKD,kCAMC;AAtBD,2BAAkC;AAClC,+BAA0C;AAG1C;;;GAGG;AACH,SAAgB,SAAS,CAAC,QAAgB;IACxC,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChD,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,OAAe;IACzC,MAAM,MAAM,GAAG,IAAA,YAAS,EAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,MAAyB,CAAC;AACnC,CAAC"}
@@ -0,0 +1,60 @@
1
+ export interface PasoDeclaration {
2
+ version: string;
3
+ service: PasoService;
4
+ capabilities: PasoCapability[];
5
+ permissions?: PasoPermissions;
6
+ }
7
+ export interface PasoService {
8
+ name: string;
9
+ description: string;
10
+ base_url: string;
11
+ version?: string;
12
+ auth?: PasoAuth;
13
+ }
14
+ export interface PasoAuth {
15
+ type: 'api_key' | 'bearer' | 'oauth2' | 'none';
16
+ header?: string;
17
+ prefix?: string;
18
+ }
19
+ export interface PasoCapability {
20
+ name: string;
21
+ description: string;
22
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
23
+ path: string;
24
+ permission: 'read' | 'write' | 'admin';
25
+ consent_required?: boolean;
26
+ inputs?: Record<string, PasoInput>;
27
+ output?: Record<string, PasoOutput>;
28
+ constraints?: PasoConstraint[];
29
+ }
30
+ export interface PasoInput {
31
+ type: 'string' | 'integer' | 'number' | 'boolean' | 'enum' | 'array' | 'object';
32
+ required?: boolean;
33
+ description: string;
34
+ values?: (string | number)[];
35
+ default?: unknown;
36
+ in?: 'query' | 'path' | 'body' | 'header';
37
+ }
38
+ export interface PasoOutput {
39
+ type: 'string' | 'integer' | 'number' | 'boolean' | 'object' | 'array';
40
+ description?: string;
41
+ }
42
+ export interface PasoConstraint {
43
+ max_per_hour?: number;
44
+ max_per_request?: number;
45
+ max_value?: number;
46
+ allowed_values?: unknown[];
47
+ requires_field?: string;
48
+ description?: string;
49
+ }
50
+ export interface PasoPermissions {
51
+ read?: string[];
52
+ write?: string[];
53
+ admin?: string[];
54
+ forbidden?: string[];
55
+ }
56
+ export interface ValidationError {
57
+ path: string;
58
+ message: string;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB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CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { PasoDeclaration, ValidationError } from './types';
2
+ /**
3
+ * Validate a parsed PasoDeclaration against the spec.
4
+ * Returns an array of errors. Empty array = valid.
5
+ */
6
+ export declare function validate(decl: PasoDeclaration): ValidationError[];
7
+ //# sourceMappingURL=validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../src/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAC;AAU3E;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,EAAE,CAsFjE"}