@myagentroam/protocol 0.9.132 → 0.9.134
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/chatgpt-oauth.d.ts +242 -0
- package/dist/chatgpt-oauth.js +105 -0
- package/dist/direct-transfer.d.ts +14 -14
- package/dist/enterprise.d.ts +8 -8
- package/dist/git-identity.d.ts +26 -26
- package/dist/index.d.ts +1002 -934
- package/dist/index.js +20 -2
- package/dist/mcp.d.ts +8 -8
- package/dist/skill.d.ts +20 -20
- package/dist/terminal-direct.d.ts +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CHATGPT_ISSUER = "https://auth.openai.com";
|
|
3
|
+
export declare const CHATGPT_RESOURCE = "https://api.openai.com/v1";
|
|
4
|
+
export declare const CHATGPT_TOKEN_ENDPOINT = "https://auth.openai.com/api/accounts/oauth/token";
|
|
5
|
+
export declare const CHATGPT_JWKS_ENDPOINT = "https://auth.openai.com/.well-known/jwks.json";
|
|
6
|
+
export declare const CHATGPT_REVOKE_ENDPOINT = "https://auth.openai.com/api/accounts/oauth/revoke";
|
|
7
|
+
export declare const CHATGPT_PLAN_SCOPE = "chatgpt.tokens.use.direct";
|
|
8
|
+
export declare const CHATGPT_REQUESTED_SCOPE = "openid profile email offline_access resource.invoke chatgpt.tokens.use.direct";
|
|
9
|
+
export declare const chatgptTokenResponseSchema: z.ZodObject<{
|
|
10
|
+
access_token: z.ZodString;
|
|
11
|
+
refresh_token: z.ZodOptional<z.ZodString>;
|
|
12
|
+
id_token: z.ZodOptional<z.ZodString>;
|
|
13
|
+
token_type: z.ZodLiteral<"Bearer">;
|
|
14
|
+
expires_in: z.ZodNumber;
|
|
15
|
+
scope: z.ZodString;
|
|
16
|
+
earliest_refresh_at: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
access_token: string;
|
|
19
|
+
token_type: "Bearer";
|
|
20
|
+
expires_in: number;
|
|
21
|
+
scope: string;
|
|
22
|
+
refresh_token?: string | undefined;
|
|
23
|
+
id_token?: string | undefined;
|
|
24
|
+
earliest_refresh_at?: number | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
access_token: string;
|
|
27
|
+
token_type: "Bearer";
|
|
28
|
+
expires_in: number;
|
|
29
|
+
scope: string;
|
|
30
|
+
refresh_token?: string | undefined;
|
|
31
|
+
id_token?: string | undefined;
|
|
32
|
+
earliest_refresh_at?: number | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type ChatgptTokenResponse = z.infer<typeof chatgptTokenResponseSchema>;
|
|
35
|
+
export declare const chatgptLoginStartSchema: z.ZodObject<{
|
|
36
|
+
attemptId: z.ZodString;
|
|
37
|
+
nonce: z.ZodString;
|
|
38
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
40
|
+
socks5Url: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, "strict", z.ZodTypeAny, {
|
|
42
|
+
attemptId: string;
|
|
43
|
+
nonce: string;
|
|
44
|
+
clientId?: string | undefined;
|
|
45
|
+
subject?: string | undefined;
|
|
46
|
+
socks5Url?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
attemptId: string;
|
|
49
|
+
nonce: string;
|
|
50
|
+
clientId?: string | undefined;
|
|
51
|
+
subject?: string | undefined;
|
|
52
|
+
socks5Url?: string | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const chatgptLoginResultSchema: z.ZodObject<{
|
|
55
|
+
attemptId: z.ZodString;
|
|
56
|
+
clientId: z.ZodString;
|
|
57
|
+
hostId: z.ZodString;
|
|
58
|
+
tokens: z.ZodObject<{
|
|
59
|
+
access_token: z.ZodString;
|
|
60
|
+
refresh_token: z.ZodOptional<z.ZodString>;
|
|
61
|
+
id_token: z.ZodOptional<z.ZodString>;
|
|
62
|
+
token_type: z.ZodLiteral<"Bearer">;
|
|
63
|
+
expires_in: z.ZodNumber;
|
|
64
|
+
scope: z.ZodString;
|
|
65
|
+
earliest_refresh_at: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
access_token: string;
|
|
68
|
+
token_type: "Bearer";
|
|
69
|
+
expires_in: number;
|
|
70
|
+
scope: string;
|
|
71
|
+
refresh_token?: string | undefined;
|
|
72
|
+
id_token?: string | undefined;
|
|
73
|
+
earliest_refresh_at?: number | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
access_token: string;
|
|
76
|
+
token_type: "Bearer";
|
|
77
|
+
expires_in: number;
|
|
78
|
+
scope: string;
|
|
79
|
+
refresh_token?: string | undefined;
|
|
80
|
+
id_token?: string | undefined;
|
|
81
|
+
earliest_refresh_at?: number | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
}, "strict", z.ZodTypeAny, {
|
|
84
|
+
attemptId: string;
|
|
85
|
+
clientId: string;
|
|
86
|
+
hostId: string;
|
|
87
|
+
tokens: {
|
|
88
|
+
access_token: string;
|
|
89
|
+
token_type: "Bearer";
|
|
90
|
+
expires_in: number;
|
|
91
|
+
scope: string;
|
|
92
|
+
refresh_token?: string | undefined;
|
|
93
|
+
id_token?: string | undefined;
|
|
94
|
+
earliest_refresh_at?: number | undefined;
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
attemptId: string;
|
|
98
|
+
clientId: string;
|
|
99
|
+
hostId: string;
|
|
100
|
+
tokens: {
|
|
101
|
+
access_token: string;
|
|
102
|
+
token_type: "Bearer";
|
|
103
|
+
expires_in: number;
|
|
104
|
+
scope: string;
|
|
105
|
+
refresh_token?: string | undefined;
|
|
106
|
+
id_token?: string | undefined;
|
|
107
|
+
earliest_refresh_at?: number | undefined;
|
|
108
|
+
};
|
|
109
|
+
}>;
|
|
110
|
+
export type ChatgptLoginResult = z.infer<typeof chatgptLoginResultSchema>;
|
|
111
|
+
export declare const chatgptNodeLoginStatusSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
112
|
+
status: z.ZodLiteral<"PENDING">;
|
|
113
|
+
verificationUri: z.ZodString;
|
|
114
|
+
expiresAt: z.ZodNumber;
|
|
115
|
+
}, "strict", z.ZodTypeAny, {
|
|
116
|
+
status: "PENDING";
|
|
117
|
+
verificationUri: string;
|
|
118
|
+
expiresAt: number;
|
|
119
|
+
}, {
|
|
120
|
+
status: "PENDING";
|
|
121
|
+
verificationUri: string;
|
|
122
|
+
expiresAt: number;
|
|
123
|
+
}>, z.ZodObject<{
|
|
124
|
+
status: z.ZodLiteral<"SUCCEEDED">;
|
|
125
|
+
result: z.ZodObject<{
|
|
126
|
+
attemptId: z.ZodString;
|
|
127
|
+
clientId: z.ZodString;
|
|
128
|
+
hostId: z.ZodString;
|
|
129
|
+
tokens: z.ZodObject<{
|
|
130
|
+
access_token: z.ZodString;
|
|
131
|
+
refresh_token: z.ZodOptional<z.ZodString>;
|
|
132
|
+
id_token: z.ZodOptional<z.ZodString>;
|
|
133
|
+
token_type: z.ZodLiteral<"Bearer">;
|
|
134
|
+
expires_in: z.ZodNumber;
|
|
135
|
+
scope: z.ZodString;
|
|
136
|
+
earliest_refresh_at: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
access_token: string;
|
|
139
|
+
token_type: "Bearer";
|
|
140
|
+
expires_in: number;
|
|
141
|
+
scope: string;
|
|
142
|
+
refresh_token?: string | undefined;
|
|
143
|
+
id_token?: string | undefined;
|
|
144
|
+
earliest_refresh_at?: number | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
access_token: string;
|
|
147
|
+
token_type: "Bearer";
|
|
148
|
+
expires_in: number;
|
|
149
|
+
scope: string;
|
|
150
|
+
refresh_token?: string | undefined;
|
|
151
|
+
id_token?: string | undefined;
|
|
152
|
+
earliest_refresh_at?: number | undefined;
|
|
153
|
+
}>;
|
|
154
|
+
}, "strict", z.ZodTypeAny, {
|
|
155
|
+
attemptId: string;
|
|
156
|
+
clientId: string;
|
|
157
|
+
hostId: string;
|
|
158
|
+
tokens: {
|
|
159
|
+
access_token: string;
|
|
160
|
+
token_type: "Bearer";
|
|
161
|
+
expires_in: number;
|
|
162
|
+
scope: string;
|
|
163
|
+
refresh_token?: string | undefined;
|
|
164
|
+
id_token?: string | undefined;
|
|
165
|
+
earliest_refresh_at?: number | undefined;
|
|
166
|
+
};
|
|
167
|
+
}, {
|
|
168
|
+
attemptId: string;
|
|
169
|
+
clientId: string;
|
|
170
|
+
hostId: string;
|
|
171
|
+
tokens: {
|
|
172
|
+
access_token: string;
|
|
173
|
+
token_type: "Bearer";
|
|
174
|
+
expires_in: number;
|
|
175
|
+
scope: string;
|
|
176
|
+
refresh_token?: string | undefined;
|
|
177
|
+
id_token?: string | undefined;
|
|
178
|
+
earliest_refresh_at?: number | undefined;
|
|
179
|
+
};
|
|
180
|
+
}>;
|
|
181
|
+
}, "strict", z.ZodTypeAny, {
|
|
182
|
+
status: "SUCCEEDED";
|
|
183
|
+
result: {
|
|
184
|
+
attemptId: string;
|
|
185
|
+
clientId: string;
|
|
186
|
+
hostId: string;
|
|
187
|
+
tokens: {
|
|
188
|
+
access_token: string;
|
|
189
|
+
token_type: "Bearer";
|
|
190
|
+
expires_in: number;
|
|
191
|
+
scope: string;
|
|
192
|
+
refresh_token?: string | undefined;
|
|
193
|
+
id_token?: string | undefined;
|
|
194
|
+
earliest_refresh_at?: number | undefined;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
}, {
|
|
198
|
+
status: "SUCCEEDED";
|
|
199
|
+
result: {
|
|
200
|
+
attemptId: string;
|
|
201
|
+
clientId: string;
|
|
202
|
+
hostId: string;
|
|
203
|
+
tokens: {
|
|
204
|
+
access_token: string;
|
|
205
|
+
token_type: "Bearer";
|
|
206
|
+
expires_in: number;
|
|
207
|
+
scope: string;
|
|
208
|
+
refresh_token?: string | undefined;
|
|
209
|
+
id_token?: string | undefined;
|
|
210
|
+
earliest_refresh_at?: number | undefined;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
}>, z.ZodObject<{
|
|
214
|
+
status: z.ZodLiteral<"FAILED">;
|
|
215
|
+
code: z.ZodString;
|
|
216
|
+
}, "strict", z.ZodTypeAny, {
|
|
217
|
+
status: "FAILED";
|
|
218
|
+
code: string;
|
|
219
|
+
}, {
|
|
220
|
+
status: "FAILED";
|
|
221
|
+
code: string;
|
|
222
|
+
}>]>;
|
|
223
|
+
export declare const chatgptLoginCapabilitySchema: z.ZodObject<{
|
|
224
|
+
apiVersion: z.ZodLiteral<1>;
|
|
225
|
+
loopback: z.ZodLiteral<true>;
|
|
226
|
+
}, "strict", z.ZodTypeAny, {
|
|
227
|
+
apiVersion: 1;
|
|
228
|
+
loopback: true;
|
|
229
|
+
}, {
|
|
230
|
+
apiVersion: 1;
|
|
231
|
+
loopback: true;
|
|
232
|
+
}>;
|
|
233
|
+
/** Verify the identity at a trust boundary. Hosts fetch the fixed OpenAI JWKS endpoint. */
|
|
234
|
+
export declare function verifyChatgptIdentity(token: string, jwks: unknown, expected: {
|
|
235
|
+
clientId: string;
|
|
236
|
+
nonce?: string | undefined;
|
|
237
|
+
subject?: string | undefined;
|
|
238
|
+
now?: number | undefined;
|
|
239
|
+
}): Promise<{
|
|
240
|
+
subject: string;
|
|
241
|
+
email?: string;
|
|
242
|
+
}>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const CHATGPT_ISSUER = 'https://auth.openai.com';
|
|
3
|
+
export const CHATGPT_RESOURCE = 'https://api.openai.com/v1';
|
|
4
|
+
export const CHATGPT_TOKEN_ENDPOINT = `${CHATGPT_ISSUER}/api/accounts/oauth/token`;
|
|
5
|
+
export const CHATGPT_JWKS_ENDPOINT = `${CHATGPT_ISSUER}/.well-known/jwks.json`;
|
|
6
|
+
export const CHATGPT_REVOKE_ENDPOINT = `${CHATGPT_ISSUER}/api/accounts/oauth/revoke`;
|
|
7
|
+
export const CHATGPT_PLAN_SCOPE = 'chatgpt.tokens.use.direct';
|
|
8
|
+
export const CHATGPT_REQUESTED_SCOPE = 'openid profile email offline_access resource.invoke chatgpt.tokens.use.direct';
|
|
9
|
+
const identifier = z.string().min(1).max(512);
|
|
10
|
+
export const chatgptTokenResponseSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
access_token: z.string().min(1).max(131_072),
|
|
13
|
+
refresh_token: z.string().min(1).max(131_072).optional(),
|
|
14
|
+
id_token: z.string().min(1).max(131_072).optional(),
|
|
15
|
+
token_type: z.literal('Bearer'),
|
|
16
|
+
expires_in: z.number().int().positive().max(86_400),
|
|
17
|
+
scope: z.string().max(8192),
|
|
18
|
+
earliest_refresh_at: z.number().int().nonnegative().optional()
|
|
19
|
+
})
|
|
20
|
+
.strip();
|
|
21
|
+
export const chatgptLoginStartSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
attemptId: identifier,
|
|
24
|
+
nonce: z.string().min(32).max(256),
|
|
25
|
+
clientId: identifier.optional(),
|
|
26
|
+
subject: identifier.optional(),
|
|
27
|
+
socks5Url: z.string().url().max(2048).optional()
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
30
|
+
export const chatgptLoginResultSchema = z
|
|
31
|
+
.object({
|
|
32
|
+
attemptId: identifier,
|
|
33
|
+
clientId: identifier,
|
|
34
|
+
hostId: identifier,
|
|
35
|
+
tokens: chatgptTokenResponseSchema
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
export const chatgptNodeLoginStatusSchema = z.discriminatedUnion('status', [
|
|
39
|
+
z
|
|
40
|
+
.object({
|
|
41
|
+
status: z.literal('PENDING'),
|
|
42
|
+
verificationUri: z.string().url().max(2048),
|
|
43
|
+
expiresAt: z.number().int().nonnegative()
|
|
44
|
+
})
|
|
45
|
+
.strict(),
|
|
46
|
+
z.object({ status: z.literal('SUCCEEDED'), result: chatgptLoginResultSchema }).strict(),
|
|
47
|
+
z
|
|
48
|
+
.object({ status: z.literal('FAILED'), code: z.string().regex(/^CHATGPT_[A-Z0-9_]{1,64}$/u) })
|
|
49
|
+
.strict()
|
|
50
|
+
]);
|
|
51
|
+
export const chatgptLoginCapabilitySchema = z
|
|
52
|
+
.object({
|
|
53
|
+
apiVersion: z.literal(1),
|
|
54
|
+
loopback: z.literal(true)
|
|
55
|
+
})
|
|
56
|
+
.strict();
|
|
57
|
+
/** Verify the identity at a trust boundary. Hosts fetch the fixed OpenAI JWKS endpoint. */
|
|
58
|
+
export async function verifyChatgptIdentity(token, jwks, expected) {
|
|
59
|
+
try {
|
|
60
|
+
if (token.length > 131_072)
|
|
61
|
+
throw new Error();
|
|
62
|
+
const parts = token.split('.');
|
|
63
|
+
if (parts.length !== 3)
|
|
64
|
+
throw new Error();
|
|
65
|
+
const decode = (part) => Uint8Array.from(atob(part.replaceAll('-', '+').replaceAll('_', '/')), (c) => c.charCodeAt(0));
|
|
66
|
+
const header = z
|
|
67
|
+
.object({ alg: z.literal('RS256'), kid: identifier })
|
|
68
|
+
.parse(JSON.parse(new TextDecoder().decode(decode(parts[0]))));
|
|
69
|
+
const claims = z
|
|
70
|
+
.object({
|
|
71
|
+
iss: z.literal(CHATGPT_ISSUER),
|
|
72
|
+
sub: identifier,
|
|
73
|
+
aud: z.union([identifier, identifier.array().min(1).max(16)]),
|
|
74
|
+
exp: z.number().int(),
|
|
75
|
+
iat: z.number().int().optional(),
|
|
76
|
+
nonce: identifier.optional(),
|
|
77
|
+
email: z.string().max(512).optional()
|
|
78
|
+
})
|
|
79
|
+
.parse(JSON.parse(new TextDecoder().decode(decode(parts[1]))));
|
|
80
|
+
const now = (expected.now ?? Date.now()) / 1000;
|
|
81
|
+
if (claims.exp <= now ||
|
|
82
|
+
(claims.iat !== undefined && claims.iat > now + 60) ||
|
|
83
|
+
!(Array.isArray(claims.aud)
|
|
84
|
+
? claims.aud.includes(expected.clientId)
|
|
85
|
+
: claims.aud === expected.clientId) ||
|
|
86
|
+
(expected.nonce !== undefined && claims.nonce !== expected.nonce) ||
|
|
87
|
+
(expected.subject !== undefined && claims.sub !== expected.subject))
|
|
88
|
+
throw new Error();
|
|
89
|
+
const keyset = z.object({ keys: z.array(z.record(z.unknown())).max(64) }).parse(jwks);
|
|
90
|
+
const matching = keyset.keys.filter((key) => key['kid'] === header.kid &&
|
|
91
|
+
key['kty'] === 'RSA' &&
|
|
92
|
+
(key['alg'] === undefined || key['alg'] === 'RS256') &&
|
|
93
|
+
(key['use'] === undefined || key['use'] === 'sig'));
|
|
94
|
+
if (matching.length !== 1)
|
|
95
|
+
throw new Error();
|
|
96
|
+
const key = await crypto.subtle.importKey('jwk', matching[0], { name: 'RSASSA-PKCS1-v1_5', hash: 'SHA-256' }, false, ['verify']);
|
|
97
|
+
const valid = await crypto.subtle.verify('RSASSA-PKCS1-v1_5', key, decode(parts[2]), new TextEncoder().encode(`${parts[0]}.${parts[1]}`));
|
|
98
|
+
if (!valid)
|
|
99
|
+
throw new Error();
|
|
100
|
+
return { subject: claims.sub, ...(claims.email === undefined ? {} : { email: claims.email }) };
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
throw new Error('CHATGPT_IDENTITY_INVALID');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1439,22 +1439,22 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
1439
1439
|
resumeOffset: z.ZodOptional<z.ZodNumber>;
|
|
1440
1440
|
}, "strict", z.ZodTypeAny, {
|
|
1441
1441
|
type: "direct.prepared";
|
|
1442
|
+
expiresAt: number;
|
|
1442
1443
|
requestId: string;
|
|
1443
1444
|
nodeId: string;
|
|
1444
1445
|
nodeGeneration: string;
|
|
1445
1446
|
purpose: "TRANSPORT" | "TRANSFER";
|
|
1446
1447
|
directSessionId: string;
|
|
1447
|
-
expiresAt: number;
|
|
1448
1448
|
resumeOffset?: number | undefined;
|
|
1449
1449
|
transportSessionId?: string | undefined;
|
|
1450
1450
|
}, {
|
|
1451
1451
|
type: "direct.prepared";
|
|
1452
|
+
expiresAt: number;
|
|
1452
1453
|
requestId: string;
|
|
1453
1454
|
nodeId: string;
|
|
1454
1455
|
nodeGeneration: string;
|
|
1455
1456
|
purpose: "TRANSPORT" | "TRANSFER";
|
|
1456
1457
|
directSessionId: string;
|
|
1457
|
-
expiresAt: number;
|
|
1458
1458
|
resumeOffset?: number | undefined;
|
|
1459
1459
|
transportSessionId?: string | undefined;
|
|
1460
1460
|
}>, z.ZodObject<{
|
|
@@ -1572,14 +1572,14 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
1572
1572
|
expiresAt: z.ZodNumber;
|
|
1573
1573
|
}, "strict", z.ZodTypeAny, {
|
|
1574
1574
|
type: "direct.grant";
|
|
1575
|
-
directSessionId: string;
|
|
1576
1575
|
expiresAt: number;
|
|
1576
|
+
directSessionId: string;
|
|
1577
1577
|
grant: string;
|
|
1578
1578
|
openExpiresAt: number;
|
|
1579
1579
|
}, {
|
|
1580
1580
|
type: "direct.grant";
|
|
1581
|
-
directSessionId: string;
|
|
1582
1581
|
expiresAt: number;
|
|
1582
|
+
directSessionId: string;
|
|
1583
1583
|
grant: string;
|
|
1584
1584
|
openExpiresAt: number;
|
|
1585
1585
|
}>, z.ZodObject<{
|
|
@@ -1590,13 +1590,13 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
1590
1590
|
expiresAt: z.ZodNumber;
|
|
1591
1591
|
}, "strict", z.ZodTypeAny, {
|
|
1592
1592
|
type: "direct.heartbeat";
|
|
1593
|
-
directSessionId: string;
|
|
1594
1593
|
expiresAt: number;
|
|
1594
|
+
directSessionId: string;
|
|
1595
1595
|
alive: true;
|
|
1596
1596
|
}, {
|
|
1597
1597
|
type: "direct.heartbeat";
|
|
1598
|
-
directSessionId: string;
|
|
1599
1598
|
expiresAt: number;
|
|
1599
|
+
directSessionId: string;
|
|
1600
1600
|
alive: true;
|
|
1601
1601
|
}>, z.ZodObject<{
|
|
1602
1602
|
directSessionId: z.ZodString;
|
|
@@ -1667,18 +1667,18 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1667
1667
|
userAuthorization: z.ZodUnknown;
|
|
1668
1668
|
}, "strict", z.ZodTypeAny, {
|
|
1669
1669
|
type: "direct.prepare";
|
|
1670
|
+
expiresAt: number;
|
|
1670
1671
|
nodeGeneration: string;
|
|
1671
1672
|
purpose: "TRANSPORT";
|
|
1672
1673
|
directSessionId: string;
|
|
1673
|
-
expiresAt: number;
|
|
1674
1674
|
workbenchConnectionId: string;
|
|
1675
1675
|
userAuthorization?: unknown;
|
|
1676
1676
|
}, {
|
|
1677
1677
|
type: "direct.prepare";
|
|
1678
|
+
expiresAt: number;
|
|
1678
1679
|
nodeGeneration: string;
|
|
1679
1680
|
purpose: "TRANSPORT";
|
|
1680
1681
|
directSessionId: string;
|
|
1681
|
-
expiresAt: number;
|
|
1682
1682
|
workbenchConnectionId: string;
|
|
1683
1683
|
userAuthorization?: unknown;
|
|
1684
1684
|
}>, z.ZodObject<{
|
|
@@ -1980,6 +1980,7 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1980
1980
|
userAuthorization: z.ZodUnknown;
|
|
1981
1981
|
}, "strict", z.ZodTypeAny, {
|
|
1982
1982
|
type: "direct.prepare";
|
|
1983
|
+
expiresAt: number;
|
|
1983
1984
|
nodeGeneration: string;
|
|
1984
1985
|
purpose: "TRANSFER";
|
|
1985
1986
|
transportSessionId: string;
|
|
@@ -2030,11 +2031,11 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2030
2031
|
} | undefined;
|
|
2031
2032
|
};
|
|
2032
2033
|
directSessionId: string;
|
|
2033
|
-
expiresAt: number;
|
|
2034
2034
|
workbenchConnectionId: string;
|
|
2035
2035
|
userAuthorization?: unknown;
|
|
2036
2036
|
}, {
|
|
2037
2037
|
type: "direct.prepare";
|
|
2038
|
+
expiresAt: number;
|
|
2038
2039
|
nodeGeneration: string;
|
|
2039
2040
|
purpose: "TRANSFER";
|
|
2040
2041
|
transportSessionId: string;
|
|
@@ -2085,7 +2086,6 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2085
2086
|
} | undefined;
|
|
2086
2087
|
};
|
|
2087
2088
|
directSessionId: string;
|
|
2088
|
-
expiresAt: number;
|
|
2089
2089
|
workbenchConnectionId: string;
|
|
2090
2090
|
userAuthorization?: unknown;
|
|
2091
2091
|
}>, z.ZodObject<{
|
|
@@ -2206,18 +2206,18 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2206
2206
|
expiresAt: z.ZodNumber;
|
|
2207
2207
|
}, "strict", z.ZodTypeAny, {
|
|
2208
2208
|
type: "direct.grant";
|
|
2209
|
+
expiresAt: number;
|
|
2209
2210
|
transportSessionId: string;
|
|
2210
2211
|
directSessionId: string;
|
|
2211
|
-
expiresAt: number;
|
|
2212
2212
|
grant: string;
|
|
2213
2213
|
openExpiresAt: number;
|
|
2214
2214
|
browserFingerprint: string;
|
|
2215
2215
|
nodeFingerprint: string;
|
|
2216
2216
|
}, {
|
|
2217
2217
|
type: "direct.grant";
|
|
2218
|
+
expiresAt: number;
|
|
2218
2219
|
transportSessionId: string;
|
|
2219
2220
|
directSessionId: string;
|
|
2220
|
-
expiresAt: number;
|
|
2221
2221
|
grant: string;
|
|
2222
2222
|
openExpiresAt: number;
|
|
2223
2223
|
browserFingerprint: string;
|
|
@@ -2229,12 +2229,12 @@ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2229
2229
|
expiresAt: z.ZodNumber;
|
|
2230
2230
|
}, "strict", z.ZodTypeAny, {
|
|
2231
2231
|
type: "direct.heartbeat";
|
|
2232
|
-
directSessionId: string;
|
|
2233
2232
|
expiresAt: number;
|
|
2233
|
+
directSessionId: string;
|
|
2234
2234
|
}, {
|
|
2235
2235
|
type: "direct.heartbeat";
|
|
2236
|
-
directSessionId: string;
|
|
2237
2236
|
expiresAt: number;
|
|
2237
|
+
directSessionId: string;
|
|
2238
2238
|
}>, z.ZodObject<{
|
|
2239
2239
|
directSessionId: z.ZodString;
|
|
2240
2240
|
} & {
|
package/dist/enterprise.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ export declare const organizationSchema: z.ZodObject<{
|
|
|
31
31
|
createdAt: z.ZodNumber;
|
|
32
32
|
updatedAt: z.ZodNumber;
|
|
33
33
|
}, "strict", z.ZodTypeAny, {
|
|
34
|
-
id: number;
|
|
35
34
|
name: string;
|
|
35
|
+
id: number;
|
|
36
36
|
parentOrganizationId: number | null;
|
|
37
37
|
createdAt: number;
|
|
38
38
|
updatedAt: number;
|
|
39
39
|
}, {
|
|
40
|
-
id: number;
|
|
41
40
|
name: string;
|
|
41
|
+
id: number;
|
|
42
42
|
parentOrganizationId: number | null;
|
|
43
43
|
createdAt: number;
|
|
44
44
|
updatedAt: number;
|
|
@@ -165,9 +165,9 @@ export declare const oauthProviderInputSchema: z.ZodObject<{
|
|
|
165
165
|
displayName?: string | undefined;
|
|
166
166
|
}>;
|
|
167
167
|
}, "strict", z.ZodTypeAny, {
|
|
168
|
+
clientId: string;
|
|
168
169
|
name: string;
|
|
169
170
|
providerKey: string;
|
|
170
|
-
clientId: string;
|
|
171
171
|
authorizationEndpoint: string;
|
|
172
172
|
tokenEndpoint: string;
|
|
173
173
|
userinfoEndpoint: string;
|
|
@@ -182,9 +182,9 @@ export declare const oauthProviderInputSchema: z.ZodObject<{
|
|
|
182
182
|
};
|
|
183
183
|
clientSecret?: string | undefined;
|
|
184
184
|
}, {
|
|
185
|
+
clientId: string;
|
|
185
186
|
name: string;
|
|
186
187
|
providerKey: string;
|
|
187
|
-
clientId: string;
|
|
188
188
|
authorizationEndpoint: string;
|
|
189
189
|
tokenEndpoint: string;
|
|
190
190
|
userinfoEndpoint: string;
|
|
@@ -228,10 +228,10 @@ export declare const auditEventSchema: z.ZodObject<{
|
|
|
228
228
|
hasConversationPayload: z.ZodOptional<z.ZodBoolean>;
|
|
229
229
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
230
230
|
}, "strict", z.ZodTypeAny, {
|
|
231
|
+
result: "FAILED" | "SUCCESS" | "DENIED";
|
|
231
232
|
id: string;
|
|
232
233
|
eventType: string;
|
|
233
234
|
occurredAt: number;
|
|
234
|
-
result: "SUCCESS" | "DENIED" | "FAILED";
|
|
235
235
|
authenticationMethod: "PASSWORD" | "OAUTH2" | "SYSTEM";
|
|
236
236
|
workspaceId?: string | null | undefined;
|
|
237
237
|
requestId?: string | null | undefined;
|
|
@@ -254,10 +254,10 @@ export declare const auditEventSchema: z.ZodObject<{
|
|
|
254
254
|
hasConversationPayload?: boolean | undefined;
|
|
255
255
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
256
256
|
}, {
|
|
257
|
+
result: "FAILED" | "SUCCESS" | "DENIED";
|
|
257
258
|
id: string;
|
|
258
259
|
eventType: string;
|
|
259
260
|
occurredAt: number;
|
|
260
|
-
result: "SUCCESS" | "DENIED" | "FAILED";
|
|
261
261
|
authenticationMethod: "PASSWORD" | "OAUTH2" | "SYSTEM";
|
|
262
262
|
workspaceId?: string | null | undefined;
|
|
263
263
|
requestId?: string | null | undefined;
|
|
@@ -361,10 +361,10 @@ export declare const auditEventDetailSchema: z.ZodObject<{
|
|
|
361
361
|
conversationId?: string | undefined;
|
|
362
362
|
}>>;
|
|
363
363
|
}, "strict", z.ZodTypeAny, {
|
|
364
|
+
result: "FAILED" | "SUCCESS" | "DENIED";
|
|
364
365
|
id: string;
|
|
365
366
|
eventType: string;
|
|
366
367
|
occurredAt: number;
|
|
367
|
-
result: "SUCCESS" | "DENIED" | "FAILED";
|
|
368
368
|
authenticationMethod: "PASSWORD" | "OAUTH2" | "SYSTEM";
|
|
369
369
|
workspaceId?: string | null | undefined;
|
|
370
370
|
requestId?: string | null | undefined;
|
|
@@ -393,10 +393,10 @@ export declare const auditEventDetailSchema: z.ZodObject<{
|
|
|
393
393
|
conversationId?: string | undefined;
|
|
394
394
|
} | undefined;
|
|
395
395
|
}, {
|
|
396
|
+
result: "FAILED" | "SUCCESS" | "DENIED";
|
|
396
397
|
id: string;
|
|
397
398
|
eventType: string;
|
|
398
399
|
occurredAt: number;
|
|
399
|
-
result: "SUCCESS" | "DENIED" | "FAILED";
|
|
400
400
|
authenticationMethod: "PASSWORD" | "OAUTH2" | "SYSTEM";
|
|
401
401
|
workspaceId?: string | null | undefined;
|
|
402
402
|
requestId?: string | null | undefined;
|