@valon-technologies/gestalt 0.0.1-alpha.28 → 0.0.1-alpha.30
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/README.md +2 -2
- package/package.json +1 -1
- package/src/agent-access.ts +2 -2
- package/src/agent-conversions.ts +1 -29
- package/src/agent.ts +0 -2
- package/src/api.ts +0 -24
- package/src/app.ts +1 -70
- package/src/index.ts +0 -3
- package/src/indexeddb.ts +20 -18
- package/src/internal/gen/v1/app_pb.ts +20 -203
- package/src/provider-kind.ts +1 -1
- package/src/runtime.ts +0 -100
package/README.md
CHANGED
|
@@ -118,13 +118,13 @@ Gestalt catalog.
|
|
|
118
118
|
Source-mode runtime:
|
|
119
119
|
|
|
120
120
|
```sh
|
|
121
|
-
gestalt-ts-runtime ROOT
|
|
121
|
+
gestalt-ts-runtime ROOT app:./provider.ts#app
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
Release build:
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
gestalt-ts-build ROOT
|
|
127
|
+
gestalt-ts-build ROOT app:./provider.ts#app OUTPUT PROVIDER_NAME GOOS GOARCH
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
The build entrypoint compiles a standalone executable with Bun and bundles the
|
package/package.json
CHANGED
package/src/agent-access.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface AgentWorkspace {
|
|
|
63
63
|
|
|
64
64
|
/** Shape accepted when creating an agent session through the agent facade. */
|
|
65
65
|
export interface AgentCreateSession {
|
|
66
|
-
providerName
|
|
66
|
+
providerName?: string | undefined;
|
|
67
67
|
model?: string | undefined;
|
|
68
68
|
clientRef?: string | undefined;
|
|
69
69
|
metadata?: JsonObjectInput | undefined;
|
|
@@ -198,7 +198,7 @@ class AgentImpl implements Agent {
|
|
|
198
198
|
): Promise<AgentSession> {
|
|
199
199
|
return agentSessionFromProto(
|
|
200
200
|
await this.client.createSession({
|
|
201
|
-
providerName: request.providerName,
|
|
201
|
+
providerName: request.providerName ?? "",
|
|
202
202
|
model: request.model ?? "",
|
|
203
203
|
clientRef: request.clientRef ?? "",
|
|
204
204
|
metadata: optionalStruct(request.metadata),
|
package/src/agent-conversions.ts
CHANGED
|
@@ -24,10 +24,8 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
SubjectContextSchema,
|
|
26
26
|
AgentToolRefSchema,
|
|
27
|
-
ExternalIdentityContextSchema,
|
|
28
27
|
type SubjectContext as ProtoSubjectContext,
|
|
29
28
|
type AgentToolRef as ProtoAgentToolRef,
|
|
30
|
-
type ExternalIdentityContext as ProtoExternalIdentityContext,
|
|
31
29
|
} from "./internal/gen/v1/app_pb.ts";
|
|
32
30
|
import {
|
|
33
31
|
jsonFromValue,
|
|
@@ -48,7 +46,7 @@ import type {
|
|
|
48
46
|
AgentTurnOutput,
|
|
49
47
|
AgentTurnDisplay,
|
|
50
48
|
} from "./agent.ts";
|
|
51
|
-
import type {
|
|
49
|
+
import type { Subject, SubjectInput } from "./api.ts";
|
|
52
50
|
|
|
53
51
|
export function agentTurnDisplayFromProto(
|
|
54
52
|
display?: ProtoAgentTurnDisplay | undefined,
|
|
@@ -306,7 +304,6 @@ export function agentToolRefFromProto(ref: ProtoAgentToolRef): AgentToolRef {
|
|
|
306
304
|
description: ref.description,
|
|
307
305
|
system: ref.system,
|
|
308
306
|
runAs: agentRunAsSubjectFromProto(ref.runAs),
|
|
309
|
-
runAsExternalIdentity: externalIdentityFromProto(ref.runAsExternalIdentity),
|
|
310
307
|
};
|
|
311
308
|
}
|
|
312
309
|
|
|
@@ -320,7 +317,6 @@ export function agentToolRefToProto(ref: AgentToolRef): ProtoAgentToolRef {
|
|
|
320
317
|
description: ref.description ?? "",
|
|
321
318
|
system: ref.system ?? "",
|
|
322
319
|
runAs: agentRunAsSubjectToProto(ref.runAs),
|
|
323
|
-
runAsExternalIdentity: externalIdentityToProto(ref.runAsExternalIdentity),
|
|
324
320
|
});
|
|
325
321
|
}
|
|
326
322
|
|
|
@@ -355,27 +351,3 @@ function agentRunAsSubjectToProto(
|
|
|
355
351
|
email: subject.email ?? "",
|
|
356
352
|
});
|
|
357
353
|
}
|
|
358
|
-
|
|
359
|
-
function externalIdentityFromProto(
|
|
360
|
-
identity?: ProtoExternalIdentityContext | undefined,
|
|
361
|
-
): ExternalIdentity | undefined {
|
|
362
|
-
if (identity === undefined) {
|
|
363
|
-
return undefined;
|
|
364
|
-
}
|
|
365
|
-
return {
|
|
366
|
-
type: identity.type,
|
|
367
|
-
id: identity.id,
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
function externalIdentityToProto(
|
|
372
|
-
identity?: ExternalIdentity | undefined,
|
|
373
|
-
): ProtoExternalIdentityContext | undefined {
|
|
374
|
-
if (identity === undefined) {
|
|
375
|
-
return undefined;
|
|
376
|
-
}
|
|
377
|
-
return create(ExternalIdentityContextSchema, {
|
|
378
|
-
type: identity.type,
|
|
379
|
-
id: identity.id,
|
|
380
|
-
});
|
|
381
|
-
}
|
package/src/agent.ts
CHANGED
|
@@ -75,7 +75,6 @@ import {
|
|
|
75
75
|
} from "./internal/gen/v1/app_pb.ts";
|
|
76
76
|
import {
|
|
77
77
|
errorMessage,
|
|
78
|
-
type ExternalIdentity,
|
|
79
78
|
type MaybePromise,
|
|
80
79
|
type Subject,
|
|
81
80
|
type SubjectInput,
|
|
@@ -217,7 +216,6 @@ export interface AgentToolRef {
|
|
|
217
216
|
description?: string | undefined;
|
|
218
217
|
system?: string | undefined;
|
|
219
218
|
runAs?: SubjectInput | undefined;
|
|
220
|
-
runAsExternalIdentity?: ExternalIdentity | undefined;
|
|
221
219
|
}
|
|
222
220
|
|
|
223
221
|
export interface ResolvedAgentTool {
|
package/src/api.ts
CHANGED
|
@@ -24,14 +24,6 @@ export interface SubjectInput {
|
|
|
24
24
|
email?: string | undefined;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Provider-owned external identity attached to an incoming provider request.
|
|
29
|
-
*/
|
|
30
|
-
export interface ExternalIdentity {
|
|
31
|
-
type: string;
|
|
32
|
-
id: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
27
|
/**
|
|
36
28
|
* Describes the credential Gestalt used to authorize the current request.
|
|
37
29
|
*/
|
|
@@ -65,8 +57,6 @@ export interface Request {
|
|
|
65
57
|
connectionParams: Record<string, string>;
|
|
66
58
|
subject: Subject;
|
|
67
59
|
agentSubject: Subject;
|
|
68
|
-
externalIdentity: ExternalIdentity;
|
|
69
|
-
agentExternalIdentity: ExternalIdentity;
|
|
70
60
|
credential: Credential;
|
|
71
61
|
access: Access;
|
|
72
62
|
host: Host;
|
|
@@ -157,8 +147,6 @@ export function request(
|
|
|
157
147
|
idempotencyKey = "",
|
|
158
148
|
host: Partial<Host> = {},
|
|
159
149
|
agentSubject: Partial<Subject> = {},
|
|
160
|
-
externalIdentity: Partial<ExternalIdentity> = {},
|
|
161
|
-
agentExternalIdentity: Partial<ExternalIdentity> = {},
|
|
162
150
|
toolRefs: readonly AgentToolRef[] = [],
|
|
163
151
|
toolRefsSet = false,
|
|
164
152
|
): Request {
|
|
@@ -183,14 +171,6 @@ export function request(
|
|
|
183
171
|
authSource: agentSubject.authSource ?? "",
|
|
184
172
|
email: agentSubject.email ?? "",
|
|
185
173
|
},
|
|
186
|
-
externalIdentity: {
|
|
187
|
-
type: externalIdentity.type ?? "",
|
|
188
|
-
id: externalIdentity.id ?? "",
|
|
189
|
-
},
|
|
190
|
-
agentExternalIdentity: {
|
|
191
|
-
type: agentExternalIdentity.type ?? "",
|
|
192
|
-
id: agentExternalIdentity.id ?? "",
|
|
193
|
-
},
|
|
194
174
|
credential: {
|
|
195
175
|
mode: credential.mode ?? "",
|
|
196
176
|
subjectId: credential.subjectId ?? "",
|
|
@@ -207,10 +187,6 @@ export function request(
|
|
|
207
187
|
toolRefs: toolRefs.map((ref) => ({
|
|
208
188
|
...ref,
|
|
209
189
|
runAs: ref.runAs === undefined ? undefined : { ...ref.runAs },
|
|
210
|
-
runAsExternalIdentity:
|
|
211
|
-
ref.runAsExternalIdentity === undefined
|
|
212
|
-
? undefined
|
|
213
|
-
: { ...ref.runAsExternalIdentity },
|
|
214
190
|
})),
|
|
215
191
|
toolRefsSet,
|
|
216
192
|
host: {
|
package/src/app.ts
CHANGED
|
@@ -39,8 +39,7 @@ const JSON_CONTENT_TYPE = "application/json";
|
|
|
39
39
|
export type ConnectionMode =
|
|
40
40
|
| "unspecified"
|
|
41
41
|
| "none"
|
|
42
|
-
| "subject"
|
|
43
|
-
| "user";
|
|
42
|
+
| "subject";
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
45
|
* Metadata for a single connection parameter exposed by a provider.
|
|
@@ -90,34 +89,6 @@ export type SessionCatalogHandler = (
|
|
|
90
89
|
request: Request,
|
|
91
90
|
) => MaybePromise<SessionCatalog | null | undefined>;
|
|
92
91
|
|
|
93
|
-
/**
|
|
94
|
-
* Host-managed connection payload passed into a provider post-connect hook.
|
|
95
|
-
*/
|
|
96
|
-
export interface ConnectedToken {
|
|
97
|
-
id: string;
|
|
98
|
-
subjectId: string;
|
|
99
|
-
integration: string;
|
|
100
|
-
connection: string;
|
|
101
|
-
instance: string;
|
|
102
|
-
accessToken: string;
|
|
103
|
-
refreshToken: string;
|
|
104
|
-
scopes: string;
|
|
105
|
-
expiresAt?: Date | undefined;
|
|
106
|
-
lastRefreshedAt?: Date | undefined;
|
|
107
|
-
refreshErrorCount: number;
|
|
108
|
-
metadataJson: string;
|
|
109
|
-
metadata: Record<string, string>;
|
|
110
|
-
createdAt?: Date | undefined;
|
|
111
|
-
updatedAt?: Date | undefined;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Callback used to add derived metadata after a connection is established.
|
|
116
|
-
*/
|
|
117
|
-
export type PostConnectHandler = (
|
|
118
|
-
token: ConnectedToken,
|
|
119
|
-
) => MaybePromise<Record<string, string> | null | undefined>;
|
|
120
|
-
|
|
121
92
|
/**
|
|
122
93
|
* Runtime hooks required to implement an app provider.
|
|
123
94
|
*/
|
|
@@ -126,7 +97,6 @@ export interface AppDefinitionOptions extends ProviderBaseOptions {
|
|
|
126
97
|
authTypes?: string[];
|
|
127
98
|
connectionParams?: Record<string, ConnectionParamDefinition>;
|
|
128
99
|
resolveHTTPSubject?: HTTPSubjectResolver;
|
|
129
|
-
postConnect?: PostConnectHandler;
|
|
130
100
|
iconSvg?: string;
|
|
131
101
|
operations: Array<OperationDefinition<any, any>>;
|
|
132
102
|
sessionCatalog?: SessionCatalogHandler;
|
|
@@ -199,7 +169,6 @@ export class AppProvider extends ProviderBase {
|
|
|
199
169
|
|
|
200
170
|
private readonly sessionCatalogHandler: SessionCatalogHandler | undefined;
|
|
201
171
|
private readonly httpSubjectResolver: HTTPSubjectResolver | undefined;
|
|
202
|
-
private readonly postConnectHandler: PostConnectHandler | undefined;
|
|
203
172
|
private readonly operations = new Map<string, OperationDefinition<any, any>>();
|
|
204
173
|
|
|
205
174
|
constructor(options: AppDefinitionOptions) {
|
|
@@ -209,7 +178,6 @@ export class AppProvider extends ProviderBase {
|
|
|
209
178
|
this.authTypes = [...(options.authTypes ?? [])];
|
|
210
179
|
this.connectionParams = normalizeConnectionParams(options.connectionParams);
|
|
211
180
|
this.httpSubjectResolver = options.resolveHTTPSubject;
|
|
212
|
-
this.postConnectHandler = options.postConnect;
|
|
213
181
|
this.sessionCatalogHandler = options.sessionCatalog;
|
|
214
182
|
|
|
215
183
|
for (const rawEntry of options.operations) {
|
|
@@ -240,22 +208,6 @@ export class AppProvider extends ProviderBase {
|
|
|
240
208
|
return await this.sessionCatalogHandler?.(request);
|
|
241
209
|
}
|
|
242
210
|
|
|
243
|
-
/**
|
|
244
|
-
* Reports whether the provider exposes a connect-time metadata hook.
|
|
245
|
-
*/
|
|
246
|
-
supportsPostConnect(): boolean {
|
|
247
|
-
return this.postConnectHandler !== undefined;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Computes additional connection metadata after a successful connect flow.
|
|
252
|
-
*/
|
|
253
|
-
async postConnectMetadata(
|
|
254
|
-
token: ConnectedToken,
|
|
255
|
-
): Promise<Record<string, string> | null | undefined> {
|
|
256
|
-
return await this.postConnectHandler?.(cloneConnectedToken(token));
|
|
257
|
-
}
|
|
258
|
-
|
|
259
211
|
/**
|
|
260
212
|
* Resolves the concrete Gestalt subject for a verified hosted HTTP request,
|
|
261
213
|
* if the app opts into subject resolution.
|
|
@@ -423,10 +375,6 @@ export function isAppProvider(
|
|
|
423
375
|
typeof (value as { supportsSessionCatalog?: unknown }).supportsSessionCatalog === "function" &&
|
|
424
376
|
"catalogForRequest" in value &&
|
|
425
377
|
typeof (value as { catalogForRequest?: unknown }).catalogForRequest === "function" &&
|
|
426
|
-
"supportsPostConnect" in value &&
|
|
427
|
-
typeof (value as { supportsPostConnect?: unknown }).supportsPostConnect === "function" &&
|
|
428
|
-
"postConnectMetadata" in value &&
|
|
429
|
-
typeof (value as { postConnectMetadata?: unknown }).postConnectMetadata === "function" &&
|
|
430
378
|
"resolveHTTPSubject" in value &&
|
|
431
379
|
typeof (value as { resolveHTTPSubject?: unknown }).resolveHTTPSubject === "function")
|
|
432
380
|
);
|
|
@@ -458,21 +406,6 @@ function normalizeConnectionParams(
|
|
|
458
406
|
return output;
|
|
459
407
|
}
|
|
460
408
|
|
|
461
|
-
function cloneConnectedToken(token: ConnectedToken): ConnectedToken {
|
|
462
|
-
return {
|
|
463
|
-
...token,
|
|
464
|
-
metadata: {
|
|
465
|
-
...(token.metadata ?? {}),
|
|
466
|
-
},
|
|
467
|
-
expiresAt: token.expiresAt ? new Date(token.expiresAt) : undefined,
|
|
468
|
-
lastRefreshedAt: token.lastRefreshedAt
|
|
469
|
-
? new Date(token.lastRefreshedAt)
|
|
470
|
-
: undefined,
|
|
471
|
-
createdAt: token.createdAt ? new Date(token.createdAt) : undefined,
|
|
472
|
-
updatedAt: token.updatedAt ? new Date(token.updatedAt) : undefined,
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
|
|
476
409
|
function isResponse(value: unknown): value is Response<unknown> {
|
|
477
410
|
if (typeof value !== "object" || value === null) {
|
|
478
411
|
return false;
|
|
@@ -538,8 +471,6 @@ export function encodeConnectionMode(mode: ConnectionMode): number {
|
|
|
538
471
|
return 1;
|
|
539
472
|
case "subject":
|
|
540
473
|
return 2;
|
|
541
|
-
case "user":
|
|
542
|
-
return 2;
|
|
543
474
|
case "unspecified":
|
|
544
475
|
default:
|
|
545
476
|
return 0;
|
package/src/index.ts
CHANGED
|
@@ -103,7 +103,6 @@ export {
|
|
|
103
103
|
type Host,
|
|
104
104
|
type MaybePromise,
|
|
105
105
|
type Credential,
|
|
106
|
-
type ExternalIdentity,
|
|
107
106
|
type OperationResult,
|
|
108
107
|
type Request,
|
|
109
108
|
type Response,
|
|
@@ -229,7 +228,6 @@ export {
|
|
|
229
228
|
type SecretsProviderOptions,
|
|
230
229
|
} from "./secrets.ts";
|
|
231
230
|
export {
|
|
232
|
-
type ConnectedToken,
|
|
233
231
|
AppProvider,
|
|
234
232
|
defineApp,
|
|
235
233
|
isAppProvider,
|
|
@@ -238,7 +236,6 @@ export {
|
|
|
238
236
|
type ConnectionParamDefinition,
|
|
239
237
|
type OperationDefinition,
|
|
240
238
|
type OperationOptions,
|
|
241
|
-
type PostConnectHandler,
|
|
242
239
|
type AppDefinitionOptions,
|
|
243
240
|
type SessionCatalog,
|
|
244
241
|
type SessionCatalogHandler,
|
package/src/indexeddb.ts
CHANGED
|
@@ -927,23 +927,25 @@ class IndexedDBImpl implements IndexedDB {
|
|
|
927
927
|
name: string,
|
|
928
928
|
schema?: ObjectStoreSchema,
|
|
929
929
|
): Promise<ObjectStore> {
|
|
930
|
-
await
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
930
|
+
await rpc(() =>
|
|
931
|
+
this.client.createObjectStore({
|
|
932
|
+
name,
|
|
933
|
+
schema: {
|
|
934
|
+
indexes: (schema?.indexes ?? []).map((idx) => ({
|
|
935
|
+
name: idx.name,
|
|
936
|
+
keyPath: idx.keyPath,
|
|
937
|
+
unique: idx.unique ?? false,
|
|
938
|
+
})),
|
|
939
|
+
columns: (schema?.columns ?? []).map((col) => ({
|
|
940
|
+
name: col.name,
|
|
941
|
+
type: col.type ?? ColumnType.String,
|
|
942
|
+
primaryKey: col.primaryKey ?? false,
|
|
943
|
+
notNull: col.notNull ?? false,
|
|
944
|
+
unique: col.unique ?? false,
|
|
945
|
+
})),
|
|
946
|
+
},
|
|
947
|
+
}),
|
|
948
|
+
);
|
|
947
949
|
return this.objectStore(name);
|
|
948
950
|
}
|
|
949
951
|
|
|
@@ -951,7 +953,7 @@ class IndexedDBImpl implements IndexedDB {
|
|
|
951
953
|
* Deletes an object store.
|
|
952
954
|
*/
|
|
953
955
|
async deleteObjectStore(name: string): Promise<void> {
|
|
954
|
-
await this.client.deleteObjectStore({ name });
|
|
956
|
+
await rpc(() => this.client.deleteObjectStore({ name }));
|
|
955
957
|
}
|
|
956
958
|
|
|
957
959
|
/**
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
6
|
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
-
import type { EmptySchema,
|
|
8
|
-
import { file_google_protobuf_empty, file_google_protobuf_struct
|
|
7
|
+
import type { EmptySchema, Value } from "@bufbuild/protobuf/wkt";
|
|
8
|
+
import { file_google_protobuf_empty, file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
|
|
9
9
|
import type { JsonObject, Message } from "@bufbuild/protobuf";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Describes the file v1/app.proto.
|
|
13
13
|
*/
|
|
14
14
|
export const file_v1_app: GenFile = /*@__PURE__*/
|
|
15
|
-
fileDesc("
|
|
15
|
+
fileDesc("Cgx2MS9hcHAucHJvdG8SE2dlc3RhbHQucHJvdmlkZXIudjEifgoQQ2F0YWxvZ1BhcmFtZXRlchIMCgRuYW1lGAEgASgJEgwKBHR5cGUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSEAoIcmVxdWlyZWQYBCABKAgSJwoHZGVmYXVsdBgFIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSLeAQoUT3BlcmF0aW9uQW5ub3RhdGlvbnMSGwoOcmVhZF9vbmx5X2hpbnQYASABKAhIAIgBARIcCg9pZGVtcG90ZW50X2hpbnQYAiABKAhIAYgBARIdChBkZXN0cnVjdGl2ZV9oaW50GAMgASgISAKIAQESHAoPb3Blbl93b3JsZF9oaW50GAQgASgISAOIAQFCEQoPX3JlYWRfb25seV9oaW50QhIKEF9pZGVtcG90ZW50X2hpbnRCEwoRX2Rlc3RydWN0aXZlX2hpbnRCEgoQX29wZW5fd29ybGRfaGludCKAAwoQQ2F0YWxvZ09wZXJhdGlvbhIKCgJpZBgBIAEoCRIOCgZtZXRob2QYAiABKAkSDQoFdGl0bGUYAyABKAkSEwoLZGVzY3JpcHRpb24YBCABKAkSFAoMaW5wdXRfc2NoZW1hGAUgASgJEhUKDW91dHB1dF9zY2hlbWEYBiABKAkSPgoLYW5ub3RhdGlvbnMYByABKAsyKS5nZXN0YWx0LnByb3ZpZGVyLnYxLk9wZXJhdGlvbkFubm90YXRpb25zEjkKCnBhcmFtZXRlcnMYCCADKAsyJS5nZXN0YWx0LnByb3ZpZGVyLnYxLkNhdGFsb2dQYXJhbWV0ZXISFwoPcmVxdWlyZWRfc2NvcGVzGAkgAygJEgwKBHRhZ3MYCiADKAkSEQoJcmVhZF9vbmx5GAsgASgIEhQKB3Zpc2libGUYD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ZpZGVyUmVxdWVzdBoqLmdlc3RhbHQucHJvdmlkZXIudjEuU3RhcnRQcm92aWRlclJlc3BvbnNlElQKB0V4ZWN1dGUSIy5nZXN0YWx0LnByb3ZpZGVyLnYxLkV4ZWN1dGVSZXF1ZXN0GiQuZ2VzdGFsdC5wcm92aWRlci52MS5PcGVyYXRpb25SZXN1bHQSdQoSUmVzb2x2ZUhUVFBTdWJqZWN0Ei4uZ2VzdGFsdC5wcm92aWRlci52MS5SZXNvbHZlSFRUUFN1YmplY3RSZXF1ZXN0Gi8uZ2VzdGFsdC5wcm92aWRlci52MS5SZXNvbHZlSFRUUFN1YmplY3RSZXNwb25zZRJyChFHZXRTZXNzaW9uQ2F0YWxvZxItLmdlc3RhbHQucHJvdmlkZXIudjEuR2V0U2Vzc2lvbkNhdGFsb2dSZXF1ZXN0Gi4uZ2VzdGFsdC5wcm92aWRlci52MS5HZXRTZXNzaW9uQ2F0YWxvZ1Jlc3BvbnNlMsgCCgNBcHAShAEKF0V4Y2hhbmdlSW52b2NhdGlvblRva2VuEjMuZ2VzdGFsdC5wcm92aWRlci52MS5FeGNoYW5nZUludm9jYXRpb25Ub2tlblJlcXVlc3QaNC5nZXN0YWx0LnByb3ZpZGVyLnYxLkV4Y2hhbmdlSW52b2NhdGlvblRva2VuUmVzcG9uc2USVQoGSW52b2tlEiUuZ2VzdGFsdC5wcm92aWRlci52MS5BcHBJbnZva2VSZXF1ZXN0GiQuZ2VzdGFsdC5wcm92aWRlci52MS5PcGVyYXRpb25SZXN1bHQSYwoNSW52b2tlR3JhcGhRTBIsLmdlc3RhbHQucHJvdmlkZXIudjEuQXBwSW52b2tlR3JhcGhRTFJlcXVlc3QaJC5nZXN0YWx0LnByb3ZpZGVyLnYxLk9wZXJhdGlvblJlc3VsdGIGcHJvdG8z", [file_google_protobuf_empty, file_google_protobuf_struct]);
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* CatalogParameter describes one input parameter surfaced in the generated
|
|
@@ -299,11 +299,6 @@ export type ProviderMetadata = Message<"gestalt.provider.v1.ProviderMetadata"> &
|
|
|
299
299
|
*/
|
|
300
300
|
supportsSessionCatalog: boolean;
|
|
301
301
|
|
|
302
|
-
/**
|
|
303
|
-
* @generated from field: bool supports_post_connect = 9;
|
|
304
|
-
*/
|
|
305
|
-
supportsPostConnect: boolean;
|
|
306
|
-
|
|
307
302
|
/**
|
|
308
303
|
* @generated from field: int32 min_protocol_version = 11;
|
|
309
304
|
*/
|
|
@@ -544,93 +539,6 @@ export type AppInvokeGraphQLRequest = Message<"gestalt.provider.v1.AppInvokeGrap
|
|
|
544
539
|
export const AppInvokeGraphQLRequestSchema: GenMessage<AppInvokeGraphQLRequest> = /*@__PURE__*/
|
|
545
540
|
messageDesc(file_v1_app, 11);
|
|
546
541
|
|
|
547
|
-
/**
|
|
548
|
-
* PostConnectCredential is the host-managed credential payload passed into
|
|
549
|
-
* post-connect hooks. Field numbers intentionally match the legacy
|
|
550
|
-
* post-connect credential payload so older compiled providers can still decode
|
|
551
|
-
* the request during rolling upgrades.
|
|
552
|
-
*
|
|
553
|
-
* @generated from message gestalt.provider.v1.PostConnectCredential
|
|
554
|
-
*/
|
|
555
|
-
export type PostConnectCredential = Message<"gestalt.provider.v1.PostConnectCredential"> & {
|
|
556
|
-
/**
|
|
557
|
-
* @generated from field: string id = 1;
|
|
558
|
-
*/
|
|
559
|
-
id: string;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* @generated from field: string subject_id = 2;
|
|
563
|
-
*/
|
|
564
|
-
subjectId: string;
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* @generated from field: string integration = 3;
|
|
568
|
-
*/
|
|
569
|
-
integration: string;
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* @generated from field: string instance = 4;
|
|
573
|
-
*/
|
|
574
|
-
instance: string;
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* @generated from field: string access_token = 5;
|
|
578
|
-
*/
|
|
579
|
-
accessToken: string;
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* @generated from field: string refresh_token = 6;
|
|
583
|
-
*/
|
|
584
|
-
refreshToken: string;
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* @generated from field: string scopes = 7;
|
|
588
|
-
*/
|
|
589
|
-
scopes: string;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* @generated from field: google.protobuf.Timestamp expires_at = 8;
|
|
593
|
-
*/
|
|
594
|
-
expiresAt?: Timestamp | undefined;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* @generated from field: google.protobuf.Timestamp last_refreshed_at = 9;
|
|
598
|
-
*/
|
|
599
|
-
lastRefreshedAt?: Timestamp | undefined;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @generated from field: int32 refresh_error_count = 10;
|
|
603
|
-
*/
|
|
604
|
-
refreshErrorCount: number;
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* @generated from field: string metadata_json = 11;
|
|
608
|
-
*/
|
|
609
|
-
metadataJson: string;
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* @generated from field: google.protobuf.Timestamp created_at = 12;
|
|
613
|
-
*/
|
|
614
|
-
createdAt?: Timestamp | undefined;
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* @generated from field: google.protobuf.Timestamp updated_at = 13;
|
|
618
|
-
*/
|
|
619
|
-
updatedAt?: Timestamp | undefined;
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* @generated from field: string connection = 14;
|
|
623
|
-
*/
|
|
624
|
-
connection: string;
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* Describes the message gestalt.provider.v1.PostConnectCredential.
|
|
629
|
-
* Use `create(PostConnectCredentialSchema)` to create a new message.
|
|
630
|
-
*/
|
|
631
|
-
export const PostConnectCredentialSchema: GenMessage<PostConnectCredential> = /*@__PURE__*/
|
|
632
|
-
messageDesc(file_v1_app, 12);
|
|
633
|
-
|
|
634
542
|
/**
|
|
635
543
|
* SubjectContext identifies the caller that initiated an operation.
|
|
636
544
|
*
|
|
@@ -673,32 +581,7 @@ export type SubjectContext = Message<"gestalt.provider.v1.SubjectContext"> & {
|
|
|
673
581
|
* Use `create(SubjectContextSchema)` to create a new message.
|
|
674
582
|
*/
|
|
675
583
|
export const SubjectContextSchema: GenMessage<SubjectContext> = /*@__PURE__*/
|
|
676
|
-
messageDesc(file_v1_app,
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* ExternalIdentityContext identifies the caller in a provider-owned external
|
|
680
|
-
* identity namespace, as discovered from that caller's stored connection.
|
|
681
|
-
*
|
|
682
|
-
* @generated from message gestalt.provider.v1.ExternalIdentityContext
|
|
683
|
-
*/
|
|
684
|
-
export type ExternalIdentityContext = Message<"gestalt.provider.v1.ExternalIdentityContext"> & {
|
|
685
|
-
/**
|
|
686
|
-
* @generated from field: string type = 1;
|
|
687
|
-
*/
|
|
688
|
-
type: string;
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @generated from field: string id = 2;
|
|
692
|
-
*/
|
|
693
|
-
id: string;
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Describes the message gestalt.provider.v1.ExternalIdentityContext.
|
|
698
|
-
* Use `create(ExternalIdentityContextSchema)` to create a new message.
|
|
699
|
-
*/
|
|
700
|
-
export const ExternalIdentityContextSchema: GenMessage<ExternalIdentityContext> = /*@__PURE__*/
|
|
701
|
-
messageDesc(file_v1_app, 14);
|
|
584
|
+
messageDesc(file_v1_app, 12);
|
|
702
585
|
|
|
703
586
|
/**
|
|
704
587
|
* @generated from message gestalt.provider.v1.AgentToolRef
|
|
@@ -743,11 +626,6 @@ export type AgentToolRef = Message<"gestalt.provider.v1.AgentToolRef"> & {
|
|
|
743
626
|
* @generated from field: gestalt.provider.v1.SubjectContext run_as = 9;
|
|
744
627
|
*/
|
|
745
628
|
runAs?: SubjectContext | undefined;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* @generated from field: gestalt.provider.v1.ExternalIdentityContext run_as_external_identity = 10;
|
|
749
|
-
*/
|
|
750
|
-
runAsExternalIdentity?: ExternalIdentityContext | undefined;
|
|
751
629
|
};
|
|
752
630
|
|
|
753
631
|
/**
|
|
@@ -755,7 +633,7 @@ export type AgentToolRef = Message<"gestalt.provider.v1.AgentToolRef"> & {
|
|
|
755
633
|
* Use `create(AgentToolRefSchema)` to create a new message.
|
|
756
634
|
*/
|
|
757
635
|
export const AgentToolRefSchema: GenMessage<AgentToolRef> = /*@__PURE__*/
|
|
758
|
-
messageDesc(file_v1_app,
|
|
636
|
+
messageDesc(file_v1_app, 13);
|
|
759
637
|
|
|
760
638
|
/**
|
|
761
639
|
* StringList is a helper map value for repeated HTTP header and query values.
|
|
@@ -774,7 +652,7 @@ export type StringList = Message<"gestalt.provider.v1.StringList"> & {
|
|
|
774
652
|
* Use `create(StringListSchema)` to create a new message.
|
|
775
653
|
*/
|
|
776
654
|
export const StringListSchema: GenMessage<StringList> = /*@__PURE__*/
|
|
777
|
-
messageDesc(file_v1_app,
|
|
655
|
+
messageDesc(file_v1_app, 14);
|
|
778
656
|
|
|
779
657
|
/**
|
|
780
658
|
* CredentialContext describes the resolved credential used for an operation.
|
|
@@ -808,7 +686,7 @@ export type CredentialContext = Message<"gestalt.provider.v1.CredentialContext">
|
|
|
808
686
|
* Use `create(CredentialContextSchema)` to create a new message.
|
|
809
687
|
*/
|
|
810
688
|
export const CredentialContextSchema: GenMessage<CredentialContext> = /*@__PURE__*/
|
|
811
|
-
messageDesc(file_v1_app,
|
|
689
|
+
messageDesc(file_v1_app, 15);
|
|
812
690
|
|
|
813
691
|
/**
|
|
814
692
|
* AccessContext describes the host-side access decision for an operation.
|
|
@@ -832,7 +710,7 @@ export type AccessContext = Message<"gestalt.provider.v1.AccessContext"> & {
|
|
|
832
710
|
* Use `create(AccessContextSchema)` to create a new message.
|
|
833
711
|
*/
|
|
834
712
|
export const AccessContextSchema: GenMessage<AccessContext> = /*@__PURE__*/
|
|
835
|
-
messageDesc(file_v1_app,
|
|
713
|
+
messageDesc(file_v1_app, 16);
|
|
836
714
|
|
|
837
715
|
/**
|
|
838
716
|
* HostContext describes stable public host metadata available to provider code.
|
|
@@ -851,7 +729,7 @@ export type HostContext = Message<"gestalt.provider.v1.HostContext"> & {
|
|
|
851
729
|
* Use `create(HostContextSchema)` to create a new message.
|
|
852
730
|
*/
|
|
853
731
|
export const HostContextSchema: GenMessage<HostContext> = /*@__PURE__*/
|
|
854
|
-
messageDesc(file_v1_app,
|
|
732
|
+
messageDesc(file_v1_app, 17);
|
|
855
733
|
|
|
856
734
|
/**
|
|
857
735
|
* RequestContext bundles the caller, credential, access, and host metadata for
|
|
@@ -892,20 +770,6 @@ export type RequestContext = Message<"gestalt.provider.v1.RequestContext"> & {
|
|
|
892
770
|
*/
|
|
893
771
|
agentSubject?: SubjectContext | undefined;
|
|
894
772
|
|
|
895
|
-
/**
|
|
896
|
-
* The original agent caller's provider-owned external identity, when known.
|
|
897
|
-
*
|
|
898
|
-
* @generated from field: gestalt.provider.v1.ExternalIdentityContext agent_external_identity = 7;
|
|
899
|
-
*/
|
|
900
|
-
agentExternalIdentity?: ExternalIdentityContext | undefined;
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* Provider-owned external identity the invocation is authorized to assume.
|
|
904
|
-
*
|
|
905
|
-
* @generated from field: gestalt.provider.v1.ExternalIdentityContext external_identity = 8;
|
|
906
|
-
*/
|
|
907
|
-
externalIdentity?: ExternalIdentityContext | undefined;
|
|
908
|
-
|
|
909
773
|
/**
|
|
910
774
|
* Agent tool refs granted to the operation request, when the request is
|
|
911
775
|
* executing as an agent tool.
|
|
@@ -928,7 +792,7 @@ export type RequestContext = Message<"gestalt.provider.v1.RequestContext"> & {
|
|
|
928
792
|
* Use `create(RequestContextSchema)` to create a new message.
|
|
929
793
|
*/
|
|
930
794
|
export const RequestContextSchema: GenMessage<RequestContext> = /*@__PURE__*/
|
|
931
|
-
messageDesc(file_v1_app,
|
|
795
|
+
messageDesc(file_v1_app, 18);
|
|
932
796
|
|
|
933
797
|
/**
|
|
934
798
|
* HTTPSubjectRequest carries one verified hosted HTTP request into an optional
|
|
@@ -998,7 +862,7 @@ export type HTTPSubjectRequest = Message<"gestalt.provider.v1.HTTPSubjectRequest
|
|
|
998
862
|
* Use `create(HTTPSubjectRequestSchema)` to create a new message.
|
|
999
863
|
*/
|
|
1000
864
|
export const HTTPSubjectRequestSchema: GenMessage<HTTPSubjectRequest> = /*@__PURE__*/
|
|
1001
|
-
messageDesc(file_v1_app,
|
|
865
|
+
messageDesc(file_v1_app, 19);
|
|
1002
866
|
|
|
1003
867
|
/**
|
|
1004
868
|
* ResolveHTTPSubjectRequest asks a provider to map a verified hosted HTTP
|
|
@@ -1024,7 +888,7 @@ export type ResolveHTTPSubjectRequest = Message<"gestalt.provider.v1.ResolveHTTP
|
|
|
1024
888
|
* Use `create(ResolveHTTPSubjectRequestSchema)` to create a new message.
|
|
1025
889
|
*/
|
|
1026
890
|
export const ResolveHTTPSubjectRequestSchema: GenMessage<ResolveHTTPSubjectRequest> = /*@__PURE__*/
|
|
1027
|
-
messageDesc(file_v1_app,
|
|
891
|
+
messageDesc(file_v1_app, 20);
|
|
1028
892
|
|
|
1029
893
|
/**
|
|
1030
894
|
* ResolveHTTPSubjectResponse returns the concrete Gestalt subject a hosted HTTP
|
|
@@ -1056,7 +920,7 @@ export type ResolveHTTPSubjectResponse = Message<"gestalt.provider.v1.ResolveHTT
|
|
|
1056
920
|
* Use `create(ResolveHTTPSubjectResponseSchema)` to create a new message.
|
|
1057
921
|
*/
|
|
1058
922
|
export const ResolveHTTPSubjectResponseSchema: GenMessage<ResolveHTTPSubjectResponse> = /*@__PURE__*/
|
|
1059
|
-
messageDesc(file_v1_app,
|
|
923
|
+
messageDesc(file_v1_app, 21);
|
|
1060
924
|
|
|
1061
925
|
/**
|
|
1062
926
|
* ExecuteRequest invokes one executable operation.
|
|
@@ -1110,7 +974,7 @@ export type ExecuteRequest = Message<"gestalt.provider.v1.ExecuteRequest"> & {
|
|
|
1110
974
|
* Use `create(ExecuteRequestSchema)` to create a new message.
|
|
1111
975
|
*/
|
|
1112
976
|
export const ExecuteRequestSchema: GenMessage<ExecuteRequest> = /*@__PURE__*/
|
|
1113
|
-
messageDesc(file_v1_app,
|
|
977
|
+
messageDesc(file_v1_app, 22);
|
|
1114
978
|
|
|
1115
979
|
/**
|
|
1116
980
|
* GetSessionCatalogRequest asks a provider for request-scoped catalog
|
|
@@ -1145,7 +1009,7 @@ export type GetSessionCatalogRequest = Message<"gestalt.provider.v1.GetSessionCa
|
|
|
1145
1009
|
* Use `create(GetSessionCatalogRequestSchema)` to create a new message.
|
|
1146
1010
|
*/
|
|
1147
1011
|
export const GetSessionCatalogRequestSchema: GenMessage<GetSessionCatalogRequest> = /*@__PURE__*/
|
|
1148
|
-
messageDesc(file_v1_app,
|
|
1012
|
+
messageDesc(file_v1_app, 23);
|
|
1149
1013
|
|
|
1150
1014
|
/**
|
|
1151
1015
|
* GetSessionCatalogResponse returns request-scoped catalog extensions.
|
|
@@ -1164,46 +1028,7 @@ export type GetSessionCatalogResponse = Message<"gestalt.provider.v1.GetSessionC
|
|
|
1164
1028
|
* Use `create(GetSessionCatalogResponseSchema)` to create a new message.
|
|
1165
1029
|
*/
|
|
1166
1030
|
export const GetSessionCatalogResponseSchema: GenMessage<GetSessionCatalogResponse> = /*@__PURE__*/
|
|
1167
|
-
messageDesc(file_v1_app,
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* PostConnectRequest notifies a provider that a connection has completed.
|
|
1171
|
-
*
|
|
1172
|
-
* @generated from message gestalt.provider.v1.PostConnectRequest
|
|
1173
|
-
*/
|
|
1174
|
-
export type PostConnectRequest = Message<"gestalt.provider.v1.PostConnectRequest"> & {
|
|
1175
|
-
/**
|
|
1176
|
-
* @generated from field: gestalt.provider.v1.PostConnectCredential token = 1;
|
|
1177
|
-
*/
|
|
1178
|
-
token?: PostConnectCredential | undefined;
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Describes the message gestalt.provider.v1.PostConnectRequest.
|
|
1183
|
-
* Use `create(PostConnectRequestSchema)` to create a new message.
|
|
1184
|
-
*/
|
|
1185
|
-
export const PostConnectRequestSchema: GenMessage<PostConnectRequest> = /*@__PURE__*/
|
|
1186
|
-
messageDesc(file_v1_app, 27);
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* PostConnectResponse returns provider-defined metadata captured after
|
|
1190
|
-
* connection.
|
|
1191
|
-
*
|
|
1192
|
-
* @generated from message gestalt.provider.v1.PostConnectResponse
|
|
1193
|
-
*/
|
|
1194
|
-
export type PostConnectResponse = Message<"gestalt.provider.v1.PostConnectResponse"> & {
|
|
1195
|
-
/**
|
|
1196
|
-
* @generated from field: map<string, string> metadata = 1;
|
|
1197
|
-
*/
|
|
1198
|
-
metadata: { [key: string]: string };
|
|
1199
|
-
};
|
|
1200
|
-
|
|
1201
|
-
/**
|
|
1202
|
-
* Describes the message gestalt.provider.v1.PostConnectResponse.
|
|
1203
|
-
* Use `create(PostConnectResponseSchema)` to create a new message.
|
|
1204
|
-
*/
|
|
1205
|
-
export const PostConnectResponseSchema: GenMessage<PostConnectResponse> = /*@__PURE__*/
|
|
1206
|
-
messageDesc(file_v1_app, 28);
|
|
1031
|
+
messageDesc(file_v1_app, 24);
|
|
1207
1032
|
|
|
1208
1033
|
/**
|
|
1209
1034
|
* StartProviderRequest configures an integration provider for one runtime
|
|
@@ -1233,7 +1058,7 @@ export type StartProviderRequest = Message<"gestalt.provider.v1.StartProviderReq
|
|
|
1233
1058
|
* Use `create(StartProviderRequestSchema)` to create a new message.
|
|
1234
1059
|
*/
|
|
1235
1060
|
export const StartProviderRequestSchema: GenMessage<StartProviderRequest> = /*@__PURE__*/
|
|
1236
|
-
messageDesc(file_v1_app,
|
|
1061
|
+
messageDesc(file_v1_app, 25);
|
|
1237
1062
|
|
|
1238
1063
|
/**
|
|
1239
1064
|
* StartProviderResponse confirms the protocol version the provider is serving.
|
|
@@ -1252,7 +1077,7 @@ export type StartProviderResponse = Message<"gestalt.provider.v1.StartProviderRe
|
|
|
1252
1077
|
* Use `create(StartProviderResponseSchema)` to create a new message.
|
|
1253
1078
|
*/
|
|
1254
1079
|
export const StartProviderResponseSchema: GenMessage<StartProviderResponse> = /*@__PURE__*/
|
|
1255
|
-
messageDesc(file_v1_app,
|
|
1080
|
+
messageDesc(file_v1_app, 26);
|
|
1256
1081
|
|
|
1257
1082
|
/**
|
|
1258
1083
|
* ConnectionMode describes which credential sources a provider accepts.
|
|
@@ -1271,9 +1096,9 @@ export enum ConnectionMode {
|
|
|
1271
1096
|
NONE = 1,
|
|
1272
1097
|
|
|
1273
1098
|
/**
|
|
1274
|
-
* @generated from enum value:
|
|
1099
|
+
* @generated from enum value: CONNECTION_MODE_SUBJECT = 2;
|
|
1275
1100
|
*/
|
|
1276
|
-
|
|
1101
|
+
SUBJECT = 2,
|
|
1277
1102
|
}
|
|
1278
1103
|
|
|
1279
1104
|
/**
|
|
@@ -1328,14 +1153,6 @@ export const AppProvider: GenService<{
|
|
|
1328
1153
|
input: typeof GetSessionCatalogRequestSchema;
|
|
1329
1154
|
output: typeof GetSessionCatalogResponseSchema;
|
|
1330
1155
|
},
|
|
1331
|
-
/**
|
|
1332
|
-
* @generated from rpc gestalt.provider.v1.AppProvider.PostConnect
|
|
1333
|
-
*/
|
|
1334
|
-
postConnect: {
|
|
1335
|
-
methodKind: "unary";
|
|
1336
|
-
input: typeof PostConnectRequestSchema;
|
|
1337
|
-
output: typeof PostConnectResponseSchema;
|
|
1338
|
-
},
|
|
1339
1156
|
}> = /*@__PURE__*/
|
|
1340
1157
|
serviceDesc(file_v1_app, 0);
|
|
1341
1158
|
|
package/src/provider-kind.ts
CHANGED
|
@@ -21,7 +21,7 @@ const PROVIDER_KIND_DEFINITIONS = {
|
|
|
21
21
|
label: "authentication provider",
|
|
22
22
|
},
|
|
23
23
|
authorization: {
|
|
24
|
-
tokens: ["authorization"
|
|
24
|
+
tokens: ["authorization"],
|
|
25
25
|
formatToken: "authorization",
|
|
26
26
|
defaultExportNames: ["authorization", "provider"],
|
|
27
27
|
label: "authorization provider",
|
package/src/runtime.ts
CHANGED
|
@@ -47,12 +47,10 @@ import {
|
|
|
47
47
|
ConnectionMode as ProviderConnectionMode,
|
|
48
48
|
GetSessionCatalogResponseSchema,
|
|
49
49
|
OperationAnnotationsSchema as ProtoOperationAnnotationsSchema,
|
|
50
|
-
PostConnectResponseSchema,
|
|
51
50
|
ResolveHTTPSubjectResponseSchema,
|
|
52
51
|
OperationResultSchema,
|
|
53
52
|
ProviderMetadataSchema,
|
|
54
53
|
type HTTPSubjectRequest as ProtoHTTPSubjectRequest,
|
|
55
|
-
type PostConnectCredential as ProtoPostConnectCredential,
|
|
56
54
|
type RequestContext as ProtoRequestContext,
|
|
57
55
|
type ResolveHTTPSubjectRequest as ProtoResolveHTTPSubjectRequest,
|
|
58
56
|
AppProvider as AppProviderService,
|
|
@@ -108,7 +106,6 @@ import {
|
|
|
108
106
|
type HTTPSubjectResolutionContext,
|
|
109
107
|
} from "./http-subject.ts";
|
|
110
108
|
import {
|
|
111
|
-
type ConnectedToken,
|
|
112
109
|
AppProvider,
|
|
113
110
|
encodeConnectionMode,
|
|
114
111
|
encodeConnectionParam,
|
|
@@ -561,7 +558,6 @@ export function createProviderService(
|
|
|
561
558
|
),
|
|
562
559
|
staticCatalog: catalogToProto(provider.staticCatalog()),
|
|
563
560
|
supportsSessionCatalog: provider.supportsSessionCatalog(),
|
|
564
|
-
supportsPostConnect: provider.supportsPostConnect(),
|
|
565
561
|
minProtocolVersion: CURRENT_PROTOCOL_VERSION,
|
|
566
562
|
maxProtocolVersion: CURRENT_PROTOCOL_VERSION,
|
|
567
563
|
});
|
|
@@ -656,30 +652,6 @@ export function createProviderService(
|
|
|
656
652
|
catalog: catalogToProto(catalog),
|
|
657
653
|
});
|
|
658
654
|
},
|
|
659
|
-
async postConnect(request) {
|
|
660
|
-
if (!provider.supportsPostConnect()) {
|
|
661
|
-
throw new ConnectError(
|
|
662
|
-
"provider does not support post connect",
|
|
663
|
-
Code.Unimplemented,
|
|
664
|
-
);
|
|
665
|
-
}
|
|
666
|
-
let metadata: Record<string, string> | null | undefined;
|
|
667
|
-
try {
|
|
668
|
-
metadata = await provider.postConnectMetadata(
|
|
669
|
-
providerConnectedToken(request.token),
|
|
670
|
-
);
|
|
671
|
-
} catch (error) {
|
|
672
|
-
throw new ConnectError(
|
|
673
|
-
`post connect: ${errorMessage(error)}`,
|
|
674
|
-
Code.Unknown,
|
|
675
|
-
);
|
|
676
|
-
}
|
|
677
|
-
return create(PostConnectResponseSchema, {
|
|
678
|
-
metadata: {
|
|
679
|
-
...(metadata ?? {}),
|
|
680
|
-
},
|
|
681
|
-
});
|
|
682
|
-
},
|
|
683
655
|
};
|
|
684
656
|
}
|
|
685
657
|
|
|
@@ -853,8 +825,6 @@ function providerRequest(
|
|
|
853
825
|
): Request {
|
|
854
826
|
const subject = requestContext?.subject;
|
|
855
827
|
const agentSubject = requestContext?.agentSubject;
|
|
856
|
-
const externalIdentity = requestContext?.externalIdentity;
|
|
857
|
-
const agentExternalIdentity = requestContext?.agentExternalIdentity;
|
|
858
828
|
const credential = requestContext?.credential;
|
|
859
829
|
const access = requestContext?.access;
|
|
860
830
|
const host = requestContext?.host;
|
|
@@ -879,14 +849,6 @@ function providerRequest(
|
|
|
879
849
|
authSource: agentSubject?.authSource ?? "",
|
|
880
850
|
email: agentSubject?.email ?? "",
|
|
881
851
|
},
|
|
882
|
-
externalIdentity: {
|
|
883
|
-
type: externalIdentity?.type ?? "",
|
|
884
|
-
id: externalIdentity?.id ?? "",
|
|
885
|
-
},
|
|
886
|
-
agentExternalIdentity: {
|
|
887
|
-
type: agentExternalIdentity?.type ?? "",
|
|
888
|
-
id: agentExternalIdentity?.id ?? "",
|
|
889
|
-
},
|
|
890
852
|
credential: {
|
|
891
853
|
mode: credential?.mode ?? "",
|
|
892
854
|
subjectId: credential?.subjectId ?? "",
|
|
@@ -949,29 +911,6 @@ function providerHTTPSubjectResolutionContext(
|
|
|
949
911
|
};
|
|
950
912
|
}
|
|
951
913
|
|
|
952
|
-
function providerConnectedToken(
|
|
953
|
-
token?: ProtoPostConnectCredential,
|
|
954
|
-
): ConnectedToken {
|
|
955
|
-
const metadataJson = token?.metadataJson ?? "";
|
|
956
|
-
return {
|
|
957
|
-
id: token?.id ?? "",
|
|
958
|
-
subjectId: token?.subjectId ?? "",
|
|
959
|
-
integration: token?.integration ?? "",
|
|
960
|
-
connection: token?.connection ?? "",
|
|
961
|
-
instance: token?.instance ?? "",
|
|
962
|
-
accessToken: token?.accessToken ?? "",
|
|
963
|
-
refreshToken: token?.refreshToken ?? "",
|
|
964
|
-
scopes: token?.scopes ?? "",
|
|
965
|
-
expiresAt: timestampToDate(token?.expiresAt),
|
|
966
|
-
lastRefreshedAt: timestampToDate(token?.lastRefreshedAt),
|
|
967
|
-
refreshErrorCount: token?.refreshErrorCount ?? 0,
|
|
968
|
-
metadataJson,
|
|
969
|
-
metadata: stringRecordFromJSON(metadataJson),
|
|
970
|
-
createdAt: timestampToDate(token?.createdAt),
|
|
971
|
-
updatedAt: timestampToDate(token?.updatedAt),
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
|
|
975
914
|
function operationResultToProto(result: OperationResult) {
|
|
976
915
|
return create(OperationResultSchema, {
|
|
977
916
|
status: result.status,
|
|
@@ -1107,45 +1046,6 @@ function normalizeBigInt(value: number | bigint): bigint {
|
|
|
1107
1046
|
return BigInt(Math.max(0, Math.trunc(value)));
|
|
1108
1047
|
}
|
|
1109
1048
|
|
|
1110
|
-
function timestampToDate(
|
|
1111
|
-
value: { seconds: bigint; nanos: number } | undefined,
|
|
1112
|
-
): Date | undefined {
|
|
1113
|
-
if (!value) {
|
|
1114
|
-
return undefined;
|
|
1115
|
-
}
|
|
1116
|
-
const seconds = Number(value.seconds ?? 0n);
|
|
1117
|
-
const nanos = Number(value.nanos ?? 0);
|
|
1118
|
-
if (!Number.isFinite(seconds) || !Number.isFinite(nanos)) {
|
|
1119
|
-
return undefined;
|
|
1120
|
-
}
|
|
1121
|
-
const millis = (seconds * 1000) + Math.trunc(nanos / 1_000_000);
|
|
1122
|
-
if (!Number.isFinite(millis)) {
|
|
1123
|
-
return undefined;
|
|
1124
|
-
}
|
|
1125
|
-
return new Date(millis);
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
function stringRecordFromJSON(value: string): Record<string, string> {
|
|
1129
|
-
if (!value.trim()) {
|
|
1130
|
-
return {};
|
|
1131
|
-
}
|
|
1132
|
-
try {
|
|
1133
|
-
const parsed = JSON.parse(value) as unknown;
|
|
1134
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
1135
|
-
return {};
|
|
1136
|
-
}
|
|
1137
|
-
const output: Record<string, string> = {};
|
|
1138
|
-
for (const [key, entry] of Object.entries(parsed)) {
|
|
1139
|
-
if (typeof entry === "string") {
|
|
1140
|
-
output[key] = entry;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
return output;
|
|
1144
|
-
} catch {
|
|
1145
|
-
return {};
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
1049
|
function cloneUint8Array(value: Uint8Array | undefined): Uint8Array {
|
|
1150
1050
|
if (!value) {
|
|
1151
1051
|
return new Uint8Array();
|