@opengeni/api-router 2.5.0 → 2.6.4
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/app.js +1 -1
- package/dist/auth/managed-auth-attempt-context.d.ts +5 -1
- package/dist/auth/managed-auth.d.ts +24 -1
- package/dist/{chunk-QESX7HDK.js → chunk-XTLI3CBH.js} +2236 -387
- package/dist/chunk-XTLI3CBH.js.map +1 -0
- package/dist/http/sse.d.ts +9 -0
- package/dist/index.js +104 -4
- package/dist/index.js.map +1 -1
- package/dist/interaction-metrics.d.ts +2 -0
- package/dist/mcp/company-brain-governed-writes.d.ts +1 -1
- package/dist/mcp/company-profile-agent-admin.d.ts +6 -6
- package/dist/mcp/remember.d.ts +2 -2
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/session-view.d.ts +1 -0
- package/dist/mcp/session-wait.d.ts +19 -0
- package/dist/routes/api-keys.d.ts +2 -0
- package/dist/routes/browser-sessions.d.ts +1 -0
- package/dist/routes/computer-sessions.d.ts +12 -0
- package/dist/routes/managed-auth-session-sets.d.ts +7 -0
- package/dist/routes/workspaces.d.ts +1 -1
- package/dist/sandbox/metrics-ingestion.d.ts +16 -0
- package/dist/workspace-delete-observability.d.ts +10 -0
- package/package.json +15 -15
- package/src/app.ts +172 -20
- package/src/auth/managed-auth-attempt-context.ts +40 -3
- package/src/auth/managed-auth-session-adapter.ts +1 -0
- package/src/auth/managed-auth.ts +164 -4
- package/src/http/sse.ts +279 -45
- package/src/integrations/oauth-client.ts +8 -1
- package/src/integrations/provider-oauth.ts +12 -2
- package/src/interaction-metrics.ts +30 -0
- package/src/mcp/company-brain-governed-writes.ts +38 -23
- package/src/mcp/company-profile-agent-admin.ts +7 -7
- package/src/mcp/remember.ts +19 -8
- package/src/mcp/server.ts +318 -26
- package/src/mcp/session-wait.ts +56 -8
- package/src/routes/api-integrations.ts +2 -2
- package/src/routes/api-keys.ts +149 -7
- package/src/routes/browser-sessions.ts +10 -2
- package/src/routes/capabilities.ts +3 -3
- package/src/routes/codex.ts +483 -74
- package/src/routes/company-profile.ts +64 -0
- package/src/routes/computer-sessions.ts +103 -1
- package/src/routes/integration-facets.ts +8 -5
- package/src/routes/interaction-resources.ts +7 -1
- package/src/routes/managed-auth-session-sets.ts +199 -2
- package/src/routes/organization-memberships.ts +28 -8
- package/src/routes/packs.ts +5 -5
- package/src/routes/plugins.ts +2 -2
- package/src/routes/scheduled-tasks.ts +9 -0
- package/src/routes/sessions.ts +3 -6
- package/src/routes/skills.ts +3 -3
- package/src/routes/workspaces.ts +293 -54
- package/src/sandbox/channel-a.ts +10 -4
- package/src/sandbox/machines.ts +13 -6
- package/src/sandbox/metrics-ingestion.ts +157 -3
- package/src/sandbox/viewer.ts +20 -1
- package/src/workspace-delete-observability.ts +75 -0
- package/dist/chunk-QESX7HDK.js.map +0 -1
package/dist/app.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export declare function runManagedAuthAttempt<T>(transactionId: string, action: () => T): T;
|
|
1
|
+
export declare function runManagedAuthAttempt<T>(transactionId: string, providerId: "credential" | "google" | "github", action: () => T): T;
|
|
2
|
+
export declare function runManagedAuthProvider<T>(providerId: "credential" | "google" | "github", action: () => T): T;
|
|
2
3
|
export declare function runManagedAuthDiscardedProviderSession<T>(action: () => T): T;
|
|
3
4
|
export declare function currentManagedAuthAttemptId(): string | null;
|
|
5
|
+
export declare function currentManagedAuthProviderId(): "credential" | "google" | "github";
|
|
6
|
+
export declare function recordCurrentManagedAuthSession(authSessionId: string): void;
|
|
7
|
+
export declare function currentManagedAuthCreatedSessionId(): string | null;
|
|
4
8
|
export declare function shouldDiscardCurrentManagedAuthProviderSession(): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Settings } from "@opengeni/config";
|
|
2
2
|
import { type ManagedAuth, type ManagedEmailMessage, type ManagedEmailTransport } from "@opengeni/core";
|
|
3
3
|
import type { Database } from "@opengeni/db";
|
|
4
4
|
export type { ManagedAuth };
|
|
@@ -8,7 +8,30 @@ export declare function managedAuthUserCreateOverride(settings: Pick<Settings, "
|
|
|
8
8
|
} & Record<string, unknown>): {
|
|
9
9
|
data: typeof user;
|
|
10
10
|
} | undefined;
|
|
11
|
+
export declare function managedAuthUserCreateAdmission(settings: Pick<Settings, "environment">, user: {
|
|
12
|
+
emailVerified: boolean;
|
|
13
|
+
} & Record<string, unknown>, providerId: string): {
|
|
14
|
+
data: typeof user;
|
|
15
|
+
} | false | undefined;
|
|
11
16
|
/** Keep Better Auth password policy and storage format behind this boundary. */
|
|
12
17
|
export declare function hashManagedAuthPassword(password: string): Promise<string>;
|
|
13
18
|
export declare function createManagedAuth(settings: Settings, db: Database, managedEmailTransport: ManagedEmailTransport): ManagedAuth | null;
|
|
19
|
+
export type ManagedAuthOAuthAttempt = {
|
|
20
|
+
transactionId: string;
|
|
21
|
+
provider: "google" | "github";
|
|
22
|
+
authorityHash: string;
|
|
23
|
+
transactionSecretHash: string;
|
|
24
|
+
expectedGeneration: string;
|
|
25
|
+
expectedActorEpoch: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Resolve OpenGeni's server-only login transaction proof from Better Auth's
|
|
29
|
+
* database-backed OAuth state before the provider callback consumes it.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveManagedAuthOAuthAttempt(auth: ManagedAuth, request: Request, provider: "google" | "github", publicBaseUrl: string): Promise<ManagedAuthOAuthAttempt | null>;
|
|
32
|
+
export declare function isolatedManagedAuthOAuthCallbackRequest(auth: ManagedAuth, request: Request): Promise<{
|
|
33
|
+
request: Request;
|
|
34
|
+
stateCookieName: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function managedAuthOAuthReturnMatches(raw: string, expectedOrigin: string, transactionId: string, outcome: "complete" | "error"): boolean;
|
|
14
37
|
export declare function sendManagedAuthEmail(transport: ManagedEmailTransport, input: Omit<ManagedEmailMessage, "from">): Promise<void>;
|