@xemahq/kernel-contracts 0.36.0 → 0.37.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/agent-composition/lib/agent-workspace-sharing.d.ts +2 -1
- package/dist/agent-composition/lib/agent-workspace-sharing.d.ts.map +1 -1
- package/dist/agent-composition/lib/agent-workspace-sharing.js +1 -0
- package/dist/agent-composition/lib/agent-workspace-sharing.js.map +1 -1
- package/dist/agent-composition/lib/agent.d.ts +6 -0
- package/dist/agent-composition/lib/agent.d.ts.map +1 -1
- package/dist/connector/index.d.ts +1 -0
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +1 -0
- package/dist/connector/index.js.map +1 -1
- package/dist/connector/lib/oauth-endpoints.d.ts +7 -0
- package/dist/connector/lib/oauth-endpoints.d.ts.map +1 -0
- package/dist/connector/lib/oauth-endpoints.js +12 -0
- package/dist/connector/lib/oauth-endpoints.js.map +1 -0
- package/package.json +1 -1
- package/src/agent-composition/lib/agent-workspace-sharing.ts +13 -0
- package/src/agent-composition/lib/agent.ts +51 -0
- package/src/connector/index.ts +1 -0
- package/src/connector/lib/oauth-endpoints.ts +50 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare enum WorkspaceSharingPolicy {
|
|
2
2
|
Isolated = "isolated",
|
|
3
|
-
Shareable = "shareable"
|
|
3
|
+
Shareable = "shareable",
|
|
4
|
+
Shared = "shared"
|
|
4
5
|
}
|
|
5
6
|
export declare const WORKSPACE_SHARING_DEFAULT: WorkspaceSharingPolicy;
|
|
6
7
|
//# sourceMappingURL=agent-workspace-sharing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-workspace-sharing.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/agent-workspace-sharing.ts"],"names":[],"mappings":"AAoBA,oBAAY,sBAAsB;IAMhC,QAAQ,aAAa;IAOrB,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"agent-workspace-sharing.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/agent-workspace-sharing.ts"],"names":[],"mappings":"AAoBA,oBAAY,sBAAsB;IAMhC,QAAQ,aAAa;IAOrB,SAAS,cAAc;IAavB,MAAM,WAAW;CAClB;AAOD,eAAO,MAAM,yBAAyB,EAAE,sBACP,CAAC"}
|
|
@@ -5,6 +5,7 @@ var WorkspaceSharingPolicy;
|
|
|
5
5
|
(function (WorkspaceSharingPolicy) {
|
|
6
6
|
WorkspaceSharingPolicy["Isolated"] = "isolated";
|
|
7
7
|
WorkspaceSharingPolicy["Shareable"] = "shareable";
|
|
8
|
+
WorkspaceSharingPolicy["Shared"] = "shared";
|
|
8
9
|
})(WorkspaceSharingPolicy || (exports.WorkspaceSharingPolicy = WorkspaceSharingPolicy = {}));
|
|
9
10
|
exports.WORKSPACE_SHARING_DEFAULT = WorkspaceSharingPolicy.Isolated;
|
|
10
11
|
//# sourceMappingURL=agent-workspace-sharing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-workspace-sharing.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/agent-workspace-sharing.ts"],"names":[],"mappings":";;;AAoBA,IAAY,
|
|
1
|
+
{"version":3,"file":"agent-workspace-sharing.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/agent-workspace-sharing.ts"],"names":[],"mappings":";;;AAoBA,IAAY,sBA2BX;AA3BD,WAAY,sBAAsB;IAMhC,+CAAqB,CAAA;IAOrB,iDAAuB,CAAA;IAavB,2CAAiB,CAAA;AACnB,CAAC,EA3BW,sBAAsB,sCAAtB,sBAAsB,QA2BjC;AAOY,QAAA,yBAAyB,GACpC,sBAAsB,CAAC,QAAQ,CAAC"}
|
|
@@ -39,6 +39,10 @@ export interface AgentNode extends NodeOverlayFragment, BiomeAvailabilityScoped
|
|
|
39
39
|
export interface StandingSessionRef {
|
|
40
40
|
readonly pinKey: string;
|
|
41
41
|
}
|
|
42
|
+
export type WorkspaceRef = string;
|
|
43
|
+
export interface DurableWorkspaceRef {
|
|
44
|
+
readonly workspaceRef: WorkspaceRef;
|
|
45
|
+
}
|
|
42
46
|
export interface Agent {
|
|
43
47
|
readonly slug: string;
|
|
44
48
|
readonly version: string;
|
|
@@ -52,6 +56,7 @@ export interface Agent {
|
|
|
52
56
|
readonly workspace?: AgentWorkspaceConfig;
|
|
53
57
|
readonly workspaceSharing?: WorkspaceSharingPolicy;
|
|
54
58
|
readonly standingSession?: StandingSessionRef;
|
|
59
|
+
readonly durableWorkspace?: DurableWorkspaceRef;
|
|
55
60
|
}
|
|
56
61
|
export interface ResolvedAgentNode extends NodeOverlayFragment, BiomeAvailabilityScoped {
|
|
57
62
|
readonly kernel: Required<AgentKernelRef>;
|
|
@@ -71,5 +76,6 @@ export interface ResolvedAgent {
|
|
|
71
76
|
readonly workspace?: AgentWorkspaceConfig;
|
|
72
77
|
readonly workspaceSharing?: WorkspaceSharingPolicy;
|
|
73
78
|
readonly standingSession?: StandingSessionRef;
|
|
79
|
+
readonly durableWorkspace?: DurableWorkspaceRef;
|
|
74
80
|
}
|
|
75
81
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/agent.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBA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;CACjD"}
|
|
@@ -6,6 +6,7 @@ export * from './lib/credential-kind';
|
|
|
6
6
|
export * from './lib/credential-strategy-contribution';
|
|
7
7
|
export * from './lib/onboarding-manifest';
|
|
8
8
|
export * from './lib/provider-descriptor';
|
|
9
|
+
export * from './lib/oauth-endpoints';
|
|
9
10
|
export * from './lib/connector-descriptor';
|
|
10
11
|
export * from './lib/envelope-schema';
|
|
11
12
|
export * from './lib/filter-expr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC"}
|
package/dist/connector/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./lib/credential-kind"), exports);
|
|
|
22
22
|
__exportStar(require("./lib/credential-strategy-contribution"), exports);
|
|
23
23
|
__exportStar(require("./lib/onboarding-manifest"), exports);
|
|
24
24
|
__exportStar(require("./lib/provider-descriptor"), exports);
|
|
25
|
+
__exportStar(require("./lib/oauth-endpoints"), exports);
|
|
25
26
|
__exportStar(require("./lib/connector-descriptor"), exports);
|
|
26
27
|
__exportStar(require("./lib/envelope-schema"), exports);
|
|
27
28
|
__exportStar(require("./lib/filter-expr"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,+DAA6C;AAC7C,+DAA6C;AAC7C,mDAAiC;AACjC,wDAAsC;AACtC,yEAAuD;AACvD,4DAA0C;AAC1C,4DAA0C;AAC1C,6DAA2C;AAC3C,wDAAsC;AACtC,oDAAkC;AAClC,2DAAyC;AACzC,6DAA2C;AAC3C,0EAAwD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,+DAA6C;AAC7C,+DAA6C;AAC7C,mDAAiC;AACjC,wDAAsC;AACtC,yEAAuD;AACvD,4DAA0C;AAC1C,4DAA0C;AAC1C,wDAAsC;AACtC,6DAA2C;AAC3C,wDAAsC;AACtC,oDAAkC;AAClC,2DAAyC;AACzC,6DAA2C;AAC3C,0EAAwD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface OAuthAuthorityEndpoints {
|
|
2
|
+
readonly authorizationUrl: string;
|
|
3
|
+
readonly tokenUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const GOOGLE_OAUTH_ENDPOINTS: OAuthAuthorityEndpoints;
|
|
6
|
+
export declare const MICROSOFT_OAUTH_ENDPOINTS: OAuthAuthorityEndpoints;
|
|
7
|
+
//# sourceMappingURL=oauth-endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-endpoints.d.ts","sourceRoot":"","sources":["../../../src/connector/lib/oauth-endpoints.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAMD,eAAO,MAAM,sBAAsB,EAAE,uBAG3B,CAAC;AAOX,eAAO,MAAM,yBAAyB,EAAE,uBAI9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MICROSOFT_OAUTH_ENDPOINTS = exports.GOOGLE_OAUTH_ENDPOINTS = void 0;
|
|
4
|
+
exports.GOOGLE_OAUTH_ENDPOINTS = {
|
|
5
|
+
authorizationUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
6
|
+
tokenUrl: 'https://oauth2.googleapis.com/token',
|
|
7
|
+
};
|
|
8
|
+
exports.MICROSOFT_OAUTH_ENDPOINTS = {
|
|
9
|
+
authorizationUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
|
|
10
|
+
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=oauth-endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-endpoints.js","sourceRoot":"","sources":["../../../src/connector/lib/oauth-endpoints.ts"],"names":[],"mappings":";;;AAmCa,QAAA,sBAAsB,GAA4B;IAC7D,gBAAgB,EAAE,8CAA8C;IAChE,QAAQ,EAAE,qCAAqC;CACvC,CAAC;AAOE,QAAA,yBAAyB,GAA4B;IAChE,gBAAgB,EACd,gEAAgE;IAClE,QAAQ,EAAE,4DAA4D;CAC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/kernel-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Consolidated Xema OS kernel wire contracts — pure types + zod schemas for the kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework/runtime deps.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -32,6 +32,19 @@ export enum WorkspaceSharingPolicy {
|
|
|
32
32
|
* / chat-style agents.
|
|
33
33
|
*/
|
|
34
34
|
Shareable = 'shareable',
|
|
35
|
+
/**
|
|
36
|
+
* N INDEPENDENT sessions/pods operate on ONE durable, named workspace whose
|
|
37
|
+
* files are the source of truth (a session is a disposable cache; a lost
|
|
38
|
+
* session re-reads the files). Unlike {@link Shareable} — which pools
|
|
39
|
+
* multiple threads onto ONE pod's `/workspace` — `shared` binds SEPARATE
|
|
40
|
+
* pods to the same durable storage identified by a
|
|
41
|
+
* {@link DurableWorkspaceRef}, coordinated by an advisory single-writer
|
|
42
|
+
* cross-session write-lease (readers free; one in-flight mutating turn at a
|
|
43
|
+
* time across the sharing sessions). This is the multi-pod tier; it engages
|
|
44
|
+
* only for an agent that also binds a `durableWorkspace`. OPTIONAL +
|
|
45
|
+
* additive: absent ⇒ today's behaviour.
|
|
46
|
+
*/
|
|
47
|
+
Shared = 'shared',
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
/**
|
|
@@ -153,6 +153,42 @@ export interface StandingSessionRef {
|
|
|
153
153
|
readonly pinKey: string;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
/**
|
|
157
|
+
* A stable, opaque identifier for a DURABLE, NAMED workspace whose files are
|
|
158
|
+
* the source of truth and which MANY independent sessions/pods may attach to
|
|
159
|
+
* (the multi-pod {@link WorkspaceSharingPolicy.Shared} tier). Unlike the
|
|
160
|
+
* default sessionId-derived, per-session workspace path, a durable workspace
|
|
161
|
+
* lives at a `workspaceRef`-keyed storage sub-path shared across every session
|
|
162
|
+
* that binds the same ref, and cross-session writes are serialized by an
|
|
163
|
+
* advisory single-writer write-lease keyed on the ref.
|
|
164
|
+
*
|
|
165
|
+
* OPTIONAL + additive: when an agent declares none, each session gets its own
|
|
166
|
+
* private, sessionId-derived workspace exactly as today.
|
|
167
|
+
*/
|
|
168
|
+
export type WorkspaceRef = string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Declares that an agent/composition binds to a DURABLE, NAMED workspace shared
|
|
172
|
+
* across N independent sessions (separate pods), instead of a private
|
|
173
|
+
* per-session workspace. When present, the session layer stores the
|
|
174
|
+
* {@link workspaceRef} on the session and the storage layer resolves a
|
|
175
|
+
* `workspaceRef`-keyed shared sub-path (not the sessionId-derived one); a
|
|
176
|
+
* cross-session write-lease keyed on the ref serializes mutating turns across
|
|
177
|
+
* the sharing sessions (readers free).
|
|
178
|
+
*
|
|
179
|
+
* OPTIONAL + additive: absent ⇒ today's private per-session workspace. Pairs
|
|
180
|
+
* with {@link WorkspaceSharingPolicy.Shared}.
|
|
181
|
+
*/
|
|
182
|
+
export interface DurableWorkspaceRef {
|
|
183
|
+
/**
|
|
184
|
+
* Stable, opaque durable-workspace identity. Two sessions that carry the same
|
|
185
|
+
* `workspaceRef` (within the same `(orgId, projectId)`) attach to the SAME
|
|
186
|
+
* durable storage sub-path and coordinate through ONE cross-session
|
|
187
|
+
* write-lease.
|
|
188
|
+
*/
|
|
189
|
+
readonly workspaceRef: WorkspaceRef;
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
/**
|
|
157
193
|
* A named, versioned, reusable Agent.
|
|
158
194
|
*/
|
|
@@ -204,6 +240,14 @@ export interface Agent {
|
|
|
204
240
|
* {@link StandingSessionRef}.
|
|
205
241
|
*/
|
|
206
242
|
readonly standingSession?: StandingSessionRef;
|
|
243
|
+
/**
|
|
244
|
+
* When set, sessions running this agent attach to a DURABLE, NAMED workspace
|
|
245
|
+
* shared across independent pods (the multi-pod
|
|
246
|
+
* {@link WorkspaceSharingPolicy.Shared} tier) instead of a private
|
|
247
|
+
* per-session workspace. OPTIONAL + additive: absent ⇒ today's private
|
|
248
|
+
* per-session workspace. See {@link DurableWorkspaceRef}.
|
|
249
|
+
*/
|
|
250
|
+
readonly durableWorkspace?: DurableWorkspaceRef;
|
|
207
251
|
}
|
|
208
252
|
|
|
209
253
|
/**
|
|
@@ -274,4 +318,11 @@ export interface ResolvedAgent {
|
|
|
274
318
|
* without re-fetching the definition. Absent ⇒ a fresh session per launch.
|
|
275
319
|
*/
|
|
276
320
|
readonly standingSession?: StandingSessionRef;
|
|
321
|
+
/**
|
|
322
|
+
* Resolved durable-workspace binding — carried from the source `Agent` so the
|
|
323
|
+
* session layer can store the `workspaceRef` and the storage layer can
|
|
324
|
+
* resolve the shared, `workspaceRef`-keyed sub-path. Absent ⇒ today's private
|
|
325
|
+
* per-session workspace. See {@link DurableWorkspaceRef}.
|
|
326
|
+
*/
|
|
327
|
+
readonly durableWorkspace?: DurableWorkspaceRef;
|
|
277
328
|
}
|
package/src/connector/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './lib/credential-kind';
|
|
|
6
6
|
export * from './lib/credential-strategy-contribution';
|
|
7
7
|
export * from './lib/onboarding-manifest';
|
|
8
8
|
export * from './lib/provider-descriptor';
|
|
9
|
+
export * from './lib/oauth-endpoints';
|
|
9
10
|
export * from './lib/connector-descriptor';
|
|
10
11
|
export * from './lib/envelope-schema';
|
|
11
12
|
export * from './lib/filter-expr';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
3
|
+
* Stable OAuth authority endpoints — single source of truth
|
|
4
|
+
*
|
|
5
|
+
* The authorization-code + token-exchange endpoints for the well-known OAuth
|
|
6
|
+
* authorities (Google, Microsoft Entra "common" tenant) are STABLE — they do
|
|
7
|
+
* not change per consumer and are not secrets. Before this module they were
|
|
8
|
+
* hardcoded independently in every OAuth consumer (gmail-connector,
|
|
9
|
+
* ms365-connector, mailops), inviting drift. They are now declared ONCE here.
|
|
10
|
+
*
|
|
11
|
+
* SCOPE — authority endpoints ONLY. `scopes`, `extraAuthorizeParams`
|
|
12
|
+
* (e.g. Google's `access_type=offline` / `prompt=consent`, Microsoft's
|
|
13
|
+
* `prompt`), redirect URIs, client credentials, and connector slugs
|
|
14
|
+
* legitimately DIFFER per consumer and MUST stay local to each consumer. Do
|
|
15
|
+
* NOT add any of those here — this file carries the two URLs and nothing else.
|
|
16
|
+
*
|
|
17
|
+
* The shape is value-compatible with the required fields of
|
|
18
|
+
* {@link ProviderOAuthEndpoints} (`authorizationUrl` + `tokenUrl`), so a
|
|
19
|
+
* consumer can spread these into a full `ProviderOAuthEndpoints` and add its
|
|
20
|
+
* own scopes/params.
|
|
21
|
+
* ─────────────────────────────────────────────────────────────────────────
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** The stable authority endpoints of one OAuth provider — no scopes, no params. */
|
|
25
|
+
export interface OAuthAuthorityEndpoints {
|
|
26
|
+
/** Authorization-code consent endpoint (where the user is redirected). */
|
|
27
|
+
readonly authorizationUrl: string;
|
|
28
|
+
/** Token-exchange endpoint (code→token, refresh-token rotation). */
|
|
29
|
+
readonly tokenUrl: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Google OAuth 2.0 authority endpoints (v2 auth + token). Stable across all
|
|
34
|
+
* Google APIs; consumers supply their own scopes and authorize params.
|
|
35
|
+
*/
|
|
36
|
+
export const GOOGLE_OAUTH_ENDPOINTS: OAuthAuthorityEndpoints = {
|
|
37
|
+
authorizationUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
38
|
+
tokenUrl: 'https://oauth2.googleapis.com/token',
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Microsoft Entra ID (Azure AD) OAuth 2.0 authority endpoints on the multi-
|
|
43
|
+
* tenant `common` authority. Consumers that must pin a single tenant build
|
|
44
|
+
* their own URLs; this constant is the shared multi-tenant default.
|
|
45
|
+
*/
|
|
46
|
+
export const MICROSOFT_OAUTH_ENDPOINTS: OAuthAuthorityEndpoints = {
|
|
47
|
+
authorizationUrl:
|
|
48
|
+
'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
|
|
49
|
+
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
|
|
50
|
+
} as const;
|