@agentlogin/mcp 0.0.0-stage → 0.2.0-beta.1

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.
@@ -0,0 +1,365 @@
1
+ import { z } from 'zod';
2
+ export declare const CatalogSchema: z.ZodObject<{
3
+ version: z.ZodLiteral<1>;
4
+ kind: z.ZodEnum<{
5
+ applications: "applications";
6
+ providers: "providers";
7
+ }>;
8
+ updatedAt: z.ZodString;
9
+ entries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
10
+ kind: z.ZodLiteral<"provider">;
11
+ issuer: z.ZodString;
12
+ handleDomains: z.ZodArray<z.ZodString>;
13
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
14
+ specRevision: z.ZodString;
15
+ evidence: z.ZodArray<z.ZodObject<{
16
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
17
+ revision: z.ZodString;
18
+ kind: z.ZodEnum<{
19
+ domain_control: "domain_control";
20
+ protocol_test: "protocol_test";
21
+ independent_interop: "independent_interop";
22
+ operational_review: "operational_review";
23
+ }>;
24
+ url: z.ZodString;
25
+ observedAt: z.ZodString;
26
+ expiresAt: z.ZodString;
27
+ reviewer: z.ZodString;
28
+ }, z.core.$strict>>;
29
+ id: z.ZodString;
30
+ name: z.ZodString;
31
+ operator: z.ZodString;
32
+ homepage: z.ZodString;
33
+ status: z.ZodEnum<{
34
+ candidate: "candidate";
35
+ reviewed: "reviewed";
36
+ suspended: "suspended";
37
+ }>;
38
+ updatedAt: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ protocol: z.ZodLiteral<"agentid">;
41
+ protocolReference: z.ZodString;
42
+ evidence: z.ZodArray<z.ZodObject<{
43
+ protocol: z.ZodLiteral<"agentid">;
44
+ reference: z.ZodString;
45
+ kind: z.ZodEnum<{
46
+ domain_control: "domain_control";
47
+ protocol_test: "protocol_test";
48
+ independent_interop: "independent_interop";
49
+ operational_review: "operational_review";
50
+ }>;
51
+ url: z.ZodString;
52
+ observedAt: z.ZodString;
53
+ expiresAt: z.ZodString;
54
+ reviewer: z.ZodString;
55
+ }, z.core.$strict>>;
56
+ kind: z.ZodLiteral<"provider">;
57
+ issuer: z.ZodString;
58
+ handleDomains: z.ZodArray<z.ZodString>;
59
+ id: z.ZodString;
60
+ name: z.ZodString;
61
+ operator: z.ZodString;
62
+ homepage: z.ZodString;
63
+ status: z.ZodEnum<{
64
+ candidate: "candidate";
65
+ reviewed: "reviewed";
66
+ suspended: "suspended";
67
+ }>;
68
+ updatedAt: z.ZodString;
69
+ }, z.core.$strict>, z.ZodObject<{
70
+ clientType: z.ZodDefault<z.ZodLiteral<"open">>;
71
+ clientId: z.ZodString;
72
+ kind: z.ZodLiteral<"application">;
73
+ initiateLoginUri: z.ZodString;
74
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
75
+ specRevision: z.ZodString;
76
+ evidence: z.ZodArray<z.ZodObject<{
77
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
78
+ revision: z.ZodString;
79
+ kind: z.ZodEnum<{
80
+ domain_control: "domain_control";
81
+ protocol_test: "protocol_test";
82
+ independent_interop: "independent_interop";
83
+ operational_review: "operational_review";
84
+ }>;
85
+ url: z.ZodString;
86
+ observedAt: z.ZodString;
87
+ expiresAt: z.ZodString;
88
+ reviewer: z.ZodString;
89
+ }, z.core.$strict>>;
90
+ id: z.ZodString;
91
+ name: z.ZodString;
92
+ operator: z.ZodString;
93
+ homepage: z.ZodString;
94
+ status: z.ZodEnum<{
95
+ candidate: "candidate";
96
+ reviewed: "reviewed";
97
+ suspended: "suspended";
98
+ }>;
99
+ updatedAt: z.ZodString;
100
+ }, z.core.$strict>, z.ZodObject<{
101
+ clientType: z.ZodLiteral<"registered">;
102
+ clientId: z.ZodString;
103
+ issuer: z.ZodString;
104
+ kind: z.ZodLiteral<"application">;
105
+ initiateLoginUri: z.ZodString;
106
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
107
+ specRevision: z.ZodString;
108
+ evidence: z.ZodArray<z.ZodObject<{
109
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
110
+ revision: z.ZodString;
111
+ kind: z.ZodEnum<{
112
+ domain_control: "domain_control";
113
+ protocol_test: "protocol_test";
114
+ independent_interop: "independent_interop";
115
+ operational_review: "operational_review";
116
+ }>;
117
+ url: z.ZodString;
118
+ observedAt: z.ZodString;
119
+ expiresAt: z.ZodString;
120
+ reviewer: z.ZodString;
121
+ }, z.core.$strict>>;
122
+ id: z.ZodString;
123
+ name: z.ZodString;
124
+ operator: z.ZodString;
125
+ homepage: z.ZodString;
126
+ status: z.ZodEnum<{
127
+ candidate: "candidate";
128
+ reviewed: "reviewed";
129
+ suspended: "suspended";
130
+ }>;
131
+ updatedAt: z.ZodString;
132
+ }, z.core.$strict>]>>;
133
+ }, z.core.$strict>;
134
+ export type Catalog = z.infer<typeof CatalogSchema>;
135
+ /** Editor schema; protocol URL and cross-record checks remain in CatalogSchema. */
136
+ export declare function catalogJsonSchema(): z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
137
+ version: z.ZodLiteral<1>;
138
+ kind: z.ZodEnum<{
139
+ applications: "applications";
140
+ providers: "providers";
141
+ }>;
142
+ updatedAt: z.ZodString;
143
+ entries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
144
+ kind: z.ZodLiteral<"provider">;
145
+ issuer: z.ZodString;
146
+ handleDomains: z.ZodArray<z.ZodString>;
147
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
148
+ specRevision: z.ZodString;
149
+ evidence: z.ZodArray<z.ZodObject<{
150
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
151
+ revision: z.ZodString;
152
+ kind: z.ZodEnum<{
153
+ domain_control: "domain_control";
154
+ protocol_test: "protocol_test";
155
+ independent_interop: "independent_interop";
156
+ operational_review: "operational_review";
157
+ }>;
158
+ url: z.ZodString;
159
+ observedAt: z.ZodString;
160
+ expiresAt: z.ZodString;
161
+ reviewer: z.ZodString;
162
+ }, z.core.$strict>>;
163
+ id: z.ZodString;
164
+ name: z.ZodString;
165
+ operator: z.ZodString;
166
+ homepage: z.ZodString;
167
+ status: z.ZodEnum<{
168
+ candidate: "candidate";
169
+ reviewed: "reviewed";
170
+ suspended: "suspended";
171
+ }>;
172
+ updatedAt: z.ZodString;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ protocol: z.ZodLiteral<"agentid">;
175
+ protocolReference: z.ZodString;
176
+ evidence: z.ZodArray<z.ZodObject<{
177
+ protocol: z.ZodLiteral<"agentid">;
178
+ reference: z.ZodString;
179
+ kind: z.ZodEnum<{
180
+ domain_control: "domain_control";
181
+ protocol_test: "protocol_test";
182
+ independent_interop: "independent_interop";
183
+ operational_review: "operational_review";
184
+ }>;
185
+ url: z.ZodString;
186
+ observedAt: z.ZodString;
187
+ expiresAt: z.ZodString;
188
+ reviewer: z.ZodString;
189
+ }, z.core.$strict>>;
190
+ kind: z.ZodLiteral<"provider">;
191
+ issuer: z.ZodString;
192
+ handleDomains: z.ZodArray<z.ZodString>;
193
+ id: z.ZodString;
194
+ name: z.ZodString;
195
+ operator: z.ZodString;
196
+ homepage: z.ZodString;
197
+ status: z.ZodEnum<{
198
+ candidate: "candidate";
199
+ reviewed: "reviewed";
200
+ suspended: "suspended";
201
+ }>;
202
+ updatedAt: z.ZodString;
203
+ }, z.core.$strict>, z.ZodObject<{
204
+ clientType: z.ZodDefault<z.ZodLiteral<"open">>;
205
+ clientId: z.ZodString;
206
+ kind: z.ZodLiteral<"application">;
207
+ initiateLoginUri: z.ZodString;
208
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
209
+ specRevision: z.ZodString;
210
+ evidence: z.ZodArray<z.ZodObject<{
211
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
212
+ revision: z.ZodString;
213
+ kind: z.ZodEnum<{
214
+ domain_control: "domain_control";
215
+ protocol_test: "protocol_test";
216
+ independent_interop: "independent_interop";
217
+ operational_review: "operational_review";
218
+ }>;
219
+ url: z.ZodString;
220
+ observedAt: z.ZodString;
221
+ expiresAt: z.ZodString;
222
+ reviewer: z.ZodString;
223
+ }, z.core.$strict>>;
224
+ id: z.ZodString;
225
+ name: z.ZodString;
226
+ operator: z.ZodString;
227
+ homepage: z.ZodString;
228
+ status: z.ZodEnum<{
229
+ candidate: "candidate";
230
+ reviewed: "reviewed";
231
+ suspended: "suspended";
232
+ }>;
233
+ updatedAt: z.ZodString;
234
+ }, z.core.$strict>, z.ZodObject<{
235
+ clientType: z.ZodLiteral<"registered">;
236
+ clientId: z.ZodString;
237
+ issuer: z.ZodString;
238
+ kind: z.ZodLiteral<"application">;
239
+ initiateLoginUri: z.ZodString;
240
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
241
+ specRevision: z.ZodString;
242
+ evidence: z.ZodArray<z.ZodObject<{
243
+ protocol: z.ZodOptional<z.ZodLiteral<"agent-login">>;
244
+ revision: z.ZodString;
245
+ kind: z.ZodEnum<{
246
+ domain_control: "domain_control";
247
+ protocol_test: "protocol_test";
248
+ independent_interop: "independent_interop";
249
+ operational_review: "operational_review";
250
+ }>;
251
+ url: z.ZodString;
252
+ observedAt: z.ZodString;
253
+ expiresAt: z.ZodString;
254
+ reviewer: z.ZodString;
255
+ }, z.core.$strict>>;
256
+ id: z.ZodString;
257
+ name: z.ZodString;
258
+ operator: z.ZodString;
259
+ homepage: z.ZodString;
260
+ status: z.ZodEnum<{
261
+ candidate: "candidate";
262
+ reviewed: "reviewed";
263
+ suspended: "suspended";
264
+ }>;
265
+ updatedAt: z.ZodString;
266
+ }, z.core.$strict>]>>;
267
+ }, z.core.$strict>>;
268
+ export declare function readCatalog(file: string): Catalog;
269
+ /** Listings are information, never automatic enrollment, endpoint pinning or issuer acceptance. */
270
+ export declare function catalogView(catalogs: Catalog[], now?: number): ({
271
+ protocol: "agent-login" | "agentid";
272
+ effectiveStatus: string;
273
+ automaticTrust: boolean;
274
+ kind: "provider";
275
+ issuer: string;
276
+ handleDomains: string[];
277
+ specRevision: string;
278
+ evidence: {
279
+ revision: string;
280
+ kind: "domain_control" | "protocol_test" | "independent_interop" | "operational_review";
281
+ url: string;
282
+ observedAt: string;
283
+ expiresAt: string;
284
+ reviewer: string;
285
+ protocol?: "agent-login" | undefined;
286
+ }[];
287
+ id: string;
288
+ name: string;
289
+ operator: string;
290
+ homepage: string;
291
+ status: "candidate" | "reviewed" | "suspended";
292
+ updatedAt: string;
293
+ } | {
294
+ protocol: "agent-login" | "agentid";
295
+ effectiveStatus: string;
296
+ automaticTrust: boolean;
297
+ protocolReference: string;
298
+ evidence: {
299
+ protocol: "agentid";
300
+ reference: string;
301
+ kind: "domain_control" | "protocol_test" | "independent_interop" | "operational_review";
302
+ url: string;
303
+ observedAt: string;
304
+ expiresAt: string;
305
+ reviewer: string;
306
+ }[];
307
+ kind: "provider";
308
+ issuer: string;
309
+ handleDomains: string[];
310
+ id: string;
311
+ name: string;
312
+ operator: string;
313
+ homepage: string;
314
+ status: "candidate" | "reviewed" | "suspended";
315
+ updatedAt: string;
316
+ } | {
317
+ protocol: "agent-login" | "agentid";
318
+ effectiveStatus: string;
319
+ automaticTrust: boolean;
320
+ clientType: "open";
321
+ clientId: string;
322
+ kind: "application";
323
+ initiateLoginUri: string;
324
+ specRevision: string;
325
+ evidence: {
326
+ revision: string;
327
+ kind: "domain_control" | "protocol_test" | "independent_interop" | "operational_review";
328
+ url: string;
329
+ observedAt: string;
330
+ expiresAt: string;
331
+ reviewer: string;
332
+ protocol?: "agent-login" | undefined;
333
+ }[];
334
+ id: string;
335
+ name: string;
336
+ operator: string;
337
+ homepage: string;
338
+ status: "candidate" | "reviewed" | "suspended";
339
+ updatedAt: string;
340
+ } | {
341
+ protocol: "agent-login" | "agentid";
342
+ effectiveStatus: string;
343
+ automaticTrust: boolean;
344
+ clientType: "registered";
345
+ clientId: string;
346
+ issuer: string;
347
+ kind: "application";
348
+ initiateLoginUri: string;
349
+ specRevision: string;
350
+ evidence: {
351
+ revision: string;
352
+ kind: "domain_control" | "protocol_test" | "independent_interop" | "operational_review";
353
+ url: string;
354
+ observedAt: string;
355
+ expiresAt: string;
356
+ reviewer: string;
357
+ protocol?: "agent-login" | undefined;
358
+ }[];
359
+ id: string;
360
+ name: string;
361
+ operator: string;
362
+ homepage: string;
363
+ status: "candidate" | "reviewed" | "suspended";
364
+ updatedAt: string;
365
+ })[];
@@ -0,0 +1,126 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { isIP } from 'node:net';
3
+ import { z } from 'zod';
4
+ import { identifier } from './config.js';
5
+ function httpsUrl(value) {
6
+ try {
7
+ const u = new URL(value);
8
+ if (u.protocol !== 'https:' || !/^https:\/\/[^/?#]+(?:[/?#]|$)/i.test(value) || u.username || u.password || value.includes('#') || /[\\\x00-\x20\x7f]/.test(value) || /^https:\/\/[^/?#]*@/i.test(value))
9
+ return;
10
+ return u;
11
+ }
12
+ catch {
13
+ return;
14
+ }
15
+ }
16
+ // z.string().url() trims inputs; identifiers here must retain exact string identity.
17
+ const https = z.string().refine((value) => Boolean(httpsUrl(value)), 'Use HTTPS without credentials or a fragment').meta({ format: 'uri' });
18
+ const issuerIdentifier = https.refine((value) => !value.includes('?'), 'Issuer identifiers cannot contain a query');
19
+ const openClientId = https.refine((value) => {
20
+ const u = httpsUrl(value);
21
+ const path = /^https:\/\/[^/?#]+(\/[^?#]*)/i.exec(value)?.[1];
22
+ return Boolean(u && !isIP(u.hostname.replace(/^\[|\]$/g, '')) && path &&
23
+ !path.split('/').some((segment) => /^(?:\.|%2e){1,2}$/i.test(segment)));
24
+ }, 'Use a Client ID Metadata Document URL with a domain and a path, without dot path segments');
25
+ const instant = z.string().datetime({ offset: true });
26
+ const evidenceFields = {
27
+ kind: z.enum(['domain_control', 'protocol_test', 'independent_interop', 'operational_review']),
28
+ url: https,
29
+ observedAt: instant,
30
+ expiresAt: instant,
31
+ reviewer: z.string().min(1).max(200),
32
+ };
33
+ const evidenceDates = (e) => Date.parse(e.observedAt) < Date.parse(e.expiresAt);
34
+ const coreEvidence = z.object({
35
+ ...evidenceFields,
36
+ protocol: z.literal('agent-login').optional(),
37
+ revision: z.string().regex(/^[a-f0-9]{40}$/),
38
+ }).strict().refine(evidenceDates, 'Evidence expiry must follow observation');
39
+ const agentIdEvidence = z.object({
40
+ ...evidenceFields,
41
+ protocol: z.literal('agentid'),
42
+ reference: https,
43
+ }).strict().refine(evidenceDates, 'Evidence expiry must follow observation');
44
+ const common = {
45
+ id: identifier,
46
+ name: z.string().min(1).max(128),
47
+ operator: z.string().min(1).max(200),
48
+ homepage: https,
49
+ status: z.enum(['candidate', 'reviewed', 'suspended']),
50
+ updatedAt: instant,
51
+ };
52
+ const coreFields = {
53
+ ...common,
54
+ // Legacy records omit protocol; that continues to mean Agent Login Core.
55
+ protocol: z.literal('agent-login').optional(),
56
+ specRevision: z.string().regex(/^[a-f0-9]{40}$/),
57
+ evidence: z.array(coreEvidence).max(20),
58
+ };
59
+ const providerFields = {
60
+ kind: z.literal('provider'), issuer: issuerIdentifier,
61
+ handleDomains: z.array(z.string().regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/)).min(1).max(128),
62
+ };
63
+ const provider = z.object({ ...coreFields, ...providerFields }).strict();
64
+ const agentIdProvider = z.object({
65
+ ...common, ...providerFields,
66
+ protocol: z.literal('agentid'),
67
+ protocolReference: https,
68
+ evidence: z.array(agentIdEvidence).max(20),
69
+ }).strict();
70
+ const applicationFields = { ...coreFields, kind: z.literal('application'), initiateLoginUri: https };
71
+ const openApplication = z.object({ ...applicationFields, clientType: z.literal('open').default('open'), clientId: openClientId }).strict();
72
+ const registeredApplication = z.object({
73
+ ...applicationFields,
74
+ clientType: z.literal('registered'),
75
+ clientId: z.string().min(1).max(2048).regex(/^[\x20-\x7e]+$/, 'Use the exact opaque registered client identifier'),
76
+ issuer: issuerIdentifier,
77
+ }).strict();
78
+ export const CatalogSchema = z.object({
79
+ version: z.literal(1),
80
+ kind: z.enum(['providers', 'applications']),
81
+ updatedAt: instant,
82
+ entries: z.array(z.union([provider, agentIdProvider, openApplication, registeredApplication])).max(10_000),
83
+ }).strict().superRefine((c, ctx) => {
84
+ const ids = new Set();
85
+ const subjects = new Set();
86
+ for (const [index, e] of c.entries.entries()) {
87
+ const issue = (message) => ctx.addIssue({ code: 'custom', path: ['entries', index], message });
88
+ if ((c.kind === 'providers') !== (e.kind === 'provider'))
89
+ issue('Catalog kind does not match entry');
90
+ const subject = e.kind === 'provider' ? JSON.stringify(['provider', e.issuer])
91
+ : e.clientType === 'registered' ? JSON.stringify(['registered', e.issuer, e.clientId])
92
+ : JSON.stringify(['open', e.clientId]);
93
+ if (ids.has(e.id) || subjects.has(subject))
94
+ issue('Duplicate identifier or subject');
95
+ ids.add(e.id);
96
+ subjects.add(subject);
97
+ if (e.protocol === 'agentid') {
98
+ if (e.evidence.some((v) => v.reference !== e.protocolReference))
99
+ issue('AgentID evidence must refer to the listed protocol reference');
100
+ }
101
+ else if (e.evidence.some((v) => v.revision !== e.specRevision))
102
+ issue('Evidence must refer to the listed specification revision');
103
+ if (e.status === 'reviewed' && !['domain_control', 'protocol_test'].every((kind) => e.evidence.some((v) => v.kind === kind)))
104
+ issue('Reviewed entries require domain-control and protocol-test evidence');
105
+ }
106
+ });
107
+ /** Editor schema; protocol URL and cross-record checks remain in CatalogSchema. */
108
+ export function catalogJsonSchema() {
109
+ return z.toJSONSchema(CatalogSchema, { io: 'input' });
110
+ }
111
+ export function readCatalog(file) {
112
+ const data = readFileSync(file);
113
+ if (data.length > 2 * 1024 * 1024)
114
+ throw new Error('Catalog exceeds 2 MiB');
115
+ return CatalogSchema.parse(JSON.parse(data.toString('utf8')));
116
+ }
117
+ /** Listings are information, never automatic enrollment, endpoint pinning or issuer acceptance. */
118
+ export function catalogView(catalogs, now = Date.now()) {
119
+ return catalogs.flatMap((catalog) => catalog.entries.map((entry) => ({
120
+ ...entry,
121
+ protocol: entry.protocol ?? 'agent-login',
122
+ effectiveStatus: entry.status === 'reviewed' && entry.evidence.some((e) => Date.parse(e.observedAt) > now || Date.parse(e.expiresAt) <= now) ? 'review_expired' : entry.status,
123
+ automaticTrust: false,
124
+ })));
125
+ }
126
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,SAAS,QAAQ,CAAC,KAAa;IAC7B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO;QACjN,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO;IAAC,CAAC;AACrB,CAAC;AACD,qFAAqF;AACrF,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,6CAA6C,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5I,MA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c,EAAE,KAAK;KACtB,CAAC,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function main(args?: string[]): Promise<void>;
package/dist/cli.js ADDED
@@ -0,0 +1,48 @@
1
+ import { serveStdio } from '@modelcontextprotocol/server/stdio';
2
+ import { readPrivateConfig } from './config.js';
3
+ import { readCatalog, catalogView } from './catalog.js';
4
+ import { LoginRuntime } from './runtime.js';
5
+ import { createServer } from './server.js';
6
+ import { acquireStateLease } from './private-state.js';
7
+ export async function main(args = process.argv.slice(2)) {
8
+ if (args.includes('--help')) {
9
+ process.stdout.write('Usage: agentlogin-mcp [--config /absolute/config.json]\n agentlogin-mcp --check-config /absolute/config.json\n agentlogin-mcp --check-catalog /absolute/catalog.json\n\nThe local stdio helper uses AGENTLOGIN_MCP_CONFIG when --config is absent.\nIt never reads credentials from tool arguments.\n');
10
+ return;
11
+ }
12
+ try {
13
+ if (args[0] === '--check-catalog' && args.length === 2) {
14
+ const catalog = readCatalog(args[1]);
15
+ process.stdout.write(JSON.stringify({ valid: true, kind: catalog.kind, entries: catalogView([catalog]).length }) + '\n');
16
+ return;
17
+ }
18
+ const checking = args[0] === '--check-config';
19
+ if (args.length && !((args[0] === '--config' || checking) && args.length === 2))
20
+ throw new Error('Invalid arguments; use --help');
21
+ const file = args[1] ?? process.env.AGENTLOGIN_MCP_CONFIG;
22
+ if (!file)
23
+ throw new Error('Set AGENTLOGIN_MCP_CONFIG to an operator-owned config file; see --help');
24
+ const config = readPrivateConfig(file);
25
+ const runtime = new LoginRuntime(config);
26
+ if (checking) {
27
+ process.stdout.write('Configuration valid. No network requests made.\n');
28
+ return;
29
+ }
30
+ const release = acquireStateLease(config.stateDirectory);
31
+ const handle = serveStdio(() => {
32
+ const server = createServer(runtime);
33
+ // Closing the local host ends pending work too. Release only as this process exits;
34
+ // another helper must never overlap a still-running background sign-in.
35
+ server.server.onclose = () => { release(); process.exit(0); };
36
+ return server;
37
+ });
38
+ process.once('exit', release);
39
+ for (const signal of ['SIGTERM', 'SIGINT'])
40
+ process.once(signal, () => { void handle.close().finally(() => { release(); process.exit(0); }); });
41
+ }
42
+ catch {
43
+ // Config validation may include a mistakenly pasted secret. Never print exception values.
44
+ process.stderr.write('agentlogin-mcp: configuration or startup failed. Check the private config, catalog schemas, and state-directory lock; use --help.\n');
45
+ process.exitCode = 1;
46
+ }
47
+ }
48
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mTAAmT,CAAC,CAAC;QAC1U,OAAO;IACT,CAAC;IACD,IAAI,CAAC;QACH,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAAC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC;YAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO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,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,KAAK,MAAM,MAAM,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAU;YAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3J,CAAC;IAAC,MAAM,CAAC;QACP,0FAA0F;QAC1F,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qIAAqI,CAAC,CAAC;QAC5J,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ export declare const identifier: z.ZodString;
3
+ export declare const ConfigSchema: z.ZodObject<{
4
+ version: z.ZodLiteral<1>;
5
+ stateDirectory: z.ZodString;
6
+ developmentLoopback: z.ZodDefault<z.ZodBoolean>;
7
+ signInTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
8
+ identities: z.ZodRecord<z.ZodString, z.ZodObject<{
9
+ handle: z.ZodString;
10
+ issuer: z.ZodOptional<z.ZodString>;
11
+ ownerPortal: z.ZodOptional<z.ZodString>;
12
+ ownerApprovalPath: z.ZodOptional<z.ZodString>;
13
+ enrollmentEndpoint: z.ZodOptional<z.ZodString>;
14
+ enrollmentCredentialEnv: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strict>>;
16
+ applications: z.ZodRecord<z.ZodString, z.ZodObject<{
17
+ name: z.ZodString;
18
+ origin: z.ZodString;
19
+ loginPath: z.ZodString;
20
+ sessionCheck: z.ZodObject<{
21
+ path: z.ZodString;
22
+ handlePointer: z.ZodString;
23
+ issuerPointer: z.ZodString;
24
+ subjectPointer: z.ZodString;
25
+ }, z.core.$strict>;
26
+ logoutPath: z.ZodOptional<z.ZodString>;
27
+ operations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
28
+ description: z.ZodString;
29
+ method: z.ZodEnum<{
30
+ GET: "GET";
31
+ POST: "POST";
32
+ PUT: "PUT";
33
+ PATCH: "PATCH";
34
+ DELETE: "DELETE";
35
+ }>;
36
+ path: z.ZodString;
37
+ inputFields: z.ZodDefault<z.ZodArray<z.ZodString>>;
38
+ queryFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
+ output: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
40
+ }, z.core.$strict>>>;
41
+ }, z.core.$strict>>;
42
+ catalogFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
43
+ }, z.core.$strict>;
44
+ export type Config = z.infer<typeof ConfigSchema>;
45
+ export type Application = Config['applications'][string];
46
+ export type Identity = Config['identities'][string];
47
+ export declare function checkedUrl(value: string, developmentLoopback?: boolean): URL;
48
+ export declare function parseConfig(value: unknown): Config;
49
+ export declare const sensitiveName: (name: string) => boolean;
50
+ /** Open first and inspect the descriptor, so replacement with a symbolic link cannot race validation. */
51
+ export declare function readPrivateConfig(file: string): Config;
52
+ export declare function atPointer(value: unknown, pointer: string): unknown;