@ogment-ai/cli-contract 0.4.2 → 0.6.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/v1/auth.d.ts +0 -41
- package/dist/v1/auth.d.ts.map +1 -1
- package/dist/v1/auth.js +0 -31
- package/dist/v1/endpoints.d.ts +0 -5
- package/dist/v1/endpoints.d.ts.map +1 -1
- package/dist/v1/endpoints.js +0 -5
- package/dist/v1/index.d.ts +0 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +0 -1
- package/package.json +1 -1
- package/dist/v1/errors.d.ts +0 -10
- package/dist/v1/errors.d.ts.map +0 -1
- package/dist/v1/errors.js +0 -8
package/dist/v1/auth.d.ts
CHANGED
|
@@ -14,47 +14,6 @@ export declare const deviceTokenApprovedSchema: z.ZodObject<{
|
|
|
14
14
|
api_key: z.ZodString;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
|
-
export declare const oauthClientRegistrationSchema: z.ZodObject<{
|
|
18
|
-
client_id: z.ZodString;
|
|
19
|
-
client_name: z.ZodString;
|
|
20
|
-
client_secret: z.ZodOptional<z.ZodString>;
|
|
21
|
-
redirect_uris: z.ZodArray<z.ZodString>;
|
|
22
|
-
scope: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
export declare const oauthTokenSchema: z.ZodObject<{
|
|
25
|
-
access_token: z.ZodString;
|
|
26
|
-
expires_in: z.ZodNumber;
|
|
27
|
-
scope: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
28
|
-
token_type: z.ZodString;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
export declare const browserAgentCallbackSchema: z.ZodObject<{
|
|
31
|
-
agent_name: z.ZodOptional<z.ZodString>;
|
|
32
|
-
exchange_code: z.ZodString;
|
|
33
|
-
}, z.core.$strip>;
|
|
34
|
-
export declare const cliExchangeRequestSchema: z.ZodObject<{
|
|
35
|
-
exchange_code: z.ZodString;
|
|
36
|
-
}, z.core.$strip>;
|
|
37
|
-
export declare const cliExchangeSuccessSchema: z.ZodObject<{
|
|
38
|
-
data: z.ZodObject<{
|
|
39
|
-
apiKey: z.ZodString;
|
|
40
|
-
name: z.ZodString;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
}, z.core.$strip>;
|
|
43
|
-
export declare const cliExchangeErrorSchema: z.ZodObject<{
|
|
44
|
-
error: z.ZodEnum<{
|
|
45
|
-
authorization_pending: "authorization_pending";
|
|
46
|
-
expired_exchange_code: "expired_exchange_code";
|
|
47
|
-
internal_error: "internal_error";
|
|
48
|
-
invalid_exchange_code: "invalid_exchange_code";
|
|
49
|
-
missing_exchange_code: "missing_exchange_code";
|
|
50
|
-
}>;
|
|
51
|
-
message: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
export type BrowserAgentCallback = z.infer<typeof browserAgentCallbackSchema>;
|
|
54
|
-
export type CliExchangeErrorResponse = z.infer<typeof cliExchangeErrorSchema>;
|
|
55
|
-
export type CliExchangeSuccessResponse = z.infer<typeof cliExchangeSuccessSchema>;
|
|
56
17
|
export type DeviceCodeStartResponse = z.infer<typeof deviceCodeStartSchema>;
|
|
57
18
|
export type DeviceTokenApprovedResponse = z.infer<typeof deviceTokenApprovedSchema>;
|
|
58
|
-
export type OauthClientRegistrationResponse = z.infer<typeof oauthClientRegistrationSchema>;
|
|
59
|
-
export type OauthTokenResponse = z.infer<typeof oauthTokenSchema>;
|
|
60
19
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/v1/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/v1/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/v1/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;iBAQhC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC5E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
package/dist/v1/auth.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { cliExchangeErrorCodeSchema } from "./errors.js";
|
|
3
2
|
export const deviceCodeStartSchema = z.object({
|
|
4
3
|
data: z.object({
|
|
5
4
|
device_code: z.string().min(1),
|
|
@@ -15,33 +14,3 @@ export const deviceTokenApprovedSchema = z.object({
|
|
|
15
14
|
api_key: z.string().min(1),
|
|
16
15
|
}),
|
|
17
16
|
});
|
|
18
|
-
export const oauthClientRegistrationSchema = z.object({
|
|
19
|
-
client_id: z.string().min(1),
|
|
20
|
-
client_name: z.string().min(1),
|
|
21
|
-
client_secret: z.string().optional(),
|
|
22
|
-
redirect_uris: z.array(z.string().min(1)),
|
|
23
|
-
scope: z.string().optional().default(""),
|
|
24
|
-
});
|
|
25
|
-
export const oauthTokenSchema = z.object({
|
|
26
|
-
access_token: z.string().min(1),
|
|
27
|
-
expires_in: z.number().int().positive(),
|
|
28
|
-
scope: z.string().optional().default(""),
|
|
29
|
-
token_type: z.string().min(1),
|
|
30
|
-
});
|
|
31
|
-
export const browserAgentCallbackSchema = z.object({
|
|
32
|
-
agent_name: z.string().optional(),
|
|
33
|
-
exchange_code: z.string().min(1),
|
|
34
|
-
});
|
|
35
|
-
export const cliExchangeRequestSchema = z.object({
|
|
36
|
-
exchange_code: z.string().min(1),
|
|
37
|
-
});
|
|
38
|
-
export const cliExchangeSuccessSchema = z.object({
|
|
39
|
-
data: z.object({
|
|
40
|
-
apiKey: z.string().min(1),
|
|
41
|
-
name: z.string().min(1),
|
|
42
|
-
}),
|
|
43
|
-
});
|
|
44
|
-
export const cliExchangeErrorSchema = z.object({
|
|
45
|
-
error: cliExchangeErrorCodeSchema,
|
|
46
|
-
message: z.string().optional(),
|
|
47
|
-
});
|
package/dist/v1/endpoints.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
export declare const cliV1Endpoints: {
|
|
2
2
|
readonly accountMe: "/api/v1/mcp-auth/me";
|
|
3
|
-
readonly agentSelect: "/cli/agent-select";
|
|
4
|
-
readonly cliExchange: "/api/v1/mcp-auth/cli/exchange";
|
|
5
3
|
readonly cliRevokeSelf: "/api/v1/mcp-auth/cli/revoke-self";
|
|
6
4
|
readonly deviceCode: "/api/v1/mcp-auth/device/code";
|
|
7
5
|
readonly deviceToken: "/api/v1/mcp-auth/device/token";
|
|
8
|
-
readonly oauthAuthorize: "/api/v1/mcp-auth/authorize";
|
|
9
|
-
readonly oauthRegister: "/api/v1/mcp-auth/register";
|
|
10
|
-
readonly oauthToken: "/api/v1/mcp-auth/token";
|
|
11
6
|
};
|
|
12
7
|
export type CliV1EndpointName = keyof typeof cliV1Endpoints;
|
|
13
8
|
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/v1/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/v1/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC"}
|
package/dist/v1/endpoints.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export const cliV1Endpoints = {
|
|
2
2
|
accountMe: "/api/v1/mcp-auth/me",
|
|
3
|
-
agentSelect: "/cli/agent-select",
|
|
4
|
-
cliExchange: "/api/v1/mcp-auth/cli/exchange",
|
|
5
3
|
cliRevokeSelf: "/api/v1/mcp-auth/cli/revoke-self",
|
|
6
4
|
deviceCode: "/api/v1/mcp-auth/device/code",
|
|
7
5
|
deviceToken: "/api/v1/mcp-auth/device/token",
|
|
8
|
-
oauthAuthorize: "/api/v1/mcp-auth/authorize",
|
|
9
|
-
oauthRegister: "/api/v1/mcp-auth/register",
|
|
10
|
-
oauthToken: "/api/v1/mcp-auth/token",
|
|
11
6
|
};
|
package/dist/v1/index.d.ts
CHANGED
package/dist/v1/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/dist/v1/index.js
CHANGED
package/package.json
CHANGED
package/dist/v1/errors.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const cliExchangeErrorCodeSchema: z.ZodEnum<{
|
|
3
|
-
authorization_pending: "authorization_pending";
|
|
4
|
-
expired_exchange_code: "expired_exchange_code";
|
|
5
|
-
internal_error: "internal_error";
|
|
6
|
-
invalid_exchange_code: "invalid_exchange_code";
|
|
7
|
-
missing_exchange_code: "missing_exchange_code";
|
|
8
|
-
}>;
|
|
9
|
-
export type CliExchangeErrorCode = z.infer<typeof cliExchangeErrorCodeSchema>;
|
|
10
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/v1/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/v1/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|