@opengeni/api-router 0.26.1 → 0.30.1
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.d.ts +1 -0
- package/dist/app.js +5 -3
- package/dist/auth/canonical-human-session-admission.d.ts +27 -0
- package/dist/browser-auth-broker.d.ts +20 -0
- package/dist/browser-controller-authority.d.ts +19 -1
- package/dist/browser-network-route.d.ts +8 -0
- package/dist/{chunk-JIKNR5YL.js → chunk-2PQMSRCB.js} +15518 -6863
- package/dist/chunk-2PQMSRCB.js.map +1 -0
- package/dist/controller-data-plane.d.ts +12 -0
- package/dist/http/auth.d.ts +1 -1
- package/dist/http/sse.d.ts +18 -1
- package/dist/index.js +1 -1
- package/dist/integrations/api-integrations.d.ts +2 -2
- package/dist/integrations/fiken.d.ts +233 -0
- package/dist/integrations/google-drive.d.ts +6 -6
- package/dist/integrations/provider-oauth.d.ts +0 -2
- package/dist/integrations/slack-bot.d.ts +171 -1
- package/dist/integrations/slack-interactions.d.ts +17 -5
- package/dist/interaction-holder-heartbeat.d.ts +17 -0
- package/dist/interaction-metrics.d.ts +11 -0
- package/dist/mcp/server.d.ts +3 -2
- package/dist/model-catalog.d.ts +1 -0
- package/dist/routes/canonical-human-identities.d.ts +3 -0
- package/dist/routes/channels.d.ts +3 -0
- package/dist/routes/integration-facets.d.ts +3 -0
- package/dist/routes/interaction-resources.d.ts +5 -0
- package/dist/routes/organization-memberships.d.ts +3 -0
- package/dist/routes/sessions.d.ts +2 -1
- package/dist/routes/slack-task-policy.d.ts +3 -0
- package/dist/routes/supergrok.d.ts +3 -0
- package/dist/sandbox/channel-a.d.ts +8 -1
- package/dist/sandbox/machines.d.ts +2 -2
- package/dist/sandbox/viewer.d.ts +3 -1
- package/dist/slack-reaction-files.d.ts +27 -0
- package/dist/transcription/providers/xai-subscription.d.ts +8 -0
- package/dist/xai-realtime.d.ts +26 -0
- package/dist/xai-subscription-auth.d.ts +23 -0
- package/package.json +17 -16
- package/src/app.ts +352 -49
- package/src/auth/canonical-human-session-admission.ts +116 -0
- package/src/auth/managed-auth.ts +101 -0
- package/src/browser-auth-broker.ts +155 -0
- package/src/browser-controller-authority.ts +50 -1
- package/src/browser-network-route.ts +34 -0
- package/src/controller-data-plane.ts +35 -0
- package/src/http/auth.ts +27 -9
- package/src/http/sse.ts +229 -5
- package/src/integrations/api-integrations.ts +57 -42
- package/src/integrations/fiken.ts +1230 -0
- package/src/integrations/google-drive.ts +31 -26
- package/src/integrations/provider-oauth.ts +70 -91
- package/src/integrations/slack-bot.ts +638 -9
- package/src/integrations/slack-interactions.ts +1583 -73
- package/src/interaction-holder-heartbeat.ts +95 -0
- package/src/interaction-metrics.ts +159 -0
- package/src/mcp/documents.ts +115 -6
- package/src/mcp/server.ts +865 -242
- package/src/model-catalog.ts +19 -6
- package/src/routes/api-integrations.ts +32 -29
- package/src/routes/browser-identities.ts +24 -0
- package/src/routes/browser-sessions.ts +2122 -183
- package/src/routes/canonical-human-identities.ts +156 -0
- package/src/routes/channels.ts +90 -0
- package/src/routes/computer-sessions.ts +441 -86
- package/src/routes/connections.ts +141 -4
- package/src/routes/{integration-features.ts → integration-facets.ts} +63 -63
- package/src/routes/interaction-resources.ts +595 -0
- package/src/routes/organization-memberships.ts +53 -0
- package/src/routes/plugins.ts +2 -1
- package/src/routes/sessions.ts +419 -43
- package/src/routes/skills.ts +92 -10
- package/src/routes/slack-task-policy.ts +115 -0
- package/src/routes/supergrok.ts +717 -0
- package/src/routes/transcription-recordings.ts +9 -2
- package/src/routes/transcriptions.ts +2 -1
- package/src/routes/video-generation.ts +34 -4
- package/src/routes/workspaces.ts +22 -4
- package/src/sandbox/channel-a.ts +29 -2
- package/src/sandbox/machines.ts +5 -5
- package/src/sandbox/viewer.ts +10 -3
- package/src/slack-reaction-files.ts +181 -0
- package/src/transcription/providers/xai-subscription.ts +110 -0
- package/src/transcription/service.ts +17 -2
- package/src/xai-realtime.ts +216 -0
- package/src/xai-subscription-auth.ts +132 -0
- package/dist/chunk-JIKNR5YL.js.map +0 -1
- package/dist/routes/integration-features.d.ts +0 -3
package/dist/app.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare function createAppComposition(deps: AppDependencies): {
|
|
|
18
18
|
routeDeps: ApiRouteDeps;
|
|
19
19
|
};
|
|
20
20
|
export declare function appendVary(current: string | null, value: string): string;
|
|
21
|
+
export declare function workspaceActorContextExempt(method: string, pathname: string): boolean;
|
|
21
22
|
export declare function httpStatusForError(error: unknown): number;
|
|
22
23
|
export declare function errorCodeForStatus(status: number): ErrorCode;
|
|
23
24
|
export declare function routeLabel(pathname: string): string;
|
package/dist/app.js
CHANGED
|
@@ -21,8 +21,9 @@ import {
|
|
|
21
21
|
validateGitHubRepositorySelectionShapes,
|
|
22
22
|
validateToolRefs,
|
|
23
23
|
withDefaultEnabledCapabilityMcpTools,
|
|
24
|
-
workflowIdForSession
|
|
25
|
-
|
|
24
|
+
workflowIdForSession,
|
|
25
|
+
workspaceActorContextExempt
|
|
26
|
+
} from "./chunk-2PQMSRCB.js";
|
|
26
27
|
export {
|
|
27
28
|
API_MAX_REQUEST_BODY_BYTES,
|
|
28
29
|
allowedCorsOrigin,
|
|
@@ -46,6 +47,7 @@ export {
|
|
|
46
47
|
validateGitHubRepositorySelectionShapes,
|
|
47
48
|
validateToolRefs,
|
|
48
49
|
withDefaultEnabledCapabilityMcpTools,
|
|
49
|
-
workflowIdForSession
|
|
50
|
+
workflowIdForSession,
|
|
51
|
+
workspaceActorContextExempt
|
|
50
52
|
};
|
|
51
53
|
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CanonicalHumanIdentityStatus, CanonicalHumanLoginBindingStatus, CanonicalHumanRecoveryState } from "@opengeni/contracts/canonical-human-identities";
|
|
2
|
+
export type CanonicalHumanSessionAdmissionIntent = "ordinary_session" | "binding_synchronization" | "recovery_completion";
|
|
3
|
+
export type CanonicalHumanIdentityAdmissionSnapshot = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly status: CanonicalHumanIdentityStatus;
|
|
6
|
+
readonly recoveryState: CanonicalHumanRecoveryState;
|
|
7
|
+
readonly activeLoginBindingId: string | null;
|
|
8
|
+
};
|
|
9
|
+
export type CanonicalHumanLoginBindingAdmissionSnapshot = {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly identityId: string;
|
|
12
|
+
readonly status: CanonicalHumanLoginBindingStatus;
|
|
13
|
+
};
|
|
14
|
+
export type CanonicalHumanSessionAdmissionDenialCode = "identity_binding_mismatch" | "ordinary_identity_not_active" | "ordinary_identity_not_ready" | "ordinary_binding_missing" | "ordinary_binding_not_active" | "ordinary_active_binding_missing" | "recovery_identity_not_required" | "recovery_state_not_required" | "recovery_active_binding_present" | "recovery_binding_missing" | "recovery_binding_not_pending";
|
|
15
|
+
export type CanonicalHumanSessionAdmissionDecision = {
|
|
16
|
+
allowed: true;
|
|
17
|
+
intent: CanonicalHumanSessionAdmissionIntent;
|
|
18
|
+
} | {
|
|
19
|
+
allowed: false;
|
|
20
|
+
intent: CanonicalHumanSessionAdmissionIntent;
|
|
21
|
+
code: CanonicalHumanSessionAdmissionDenialCode;
|
|
22
|
+
};
|
|
23
|
+
export declare function decideCanonicalHumanSessionAdmission(input: {
|
|
24
|
+
intent: CanonicalHumanSessionAdmissionIntent;
|
|
25
|
+
identity: CanonicalHumanIdentityAdmissionSnapshot;
|
|
26
|
+
binding: CanonicalHumanLoginBindingAdmissionSnapshot | null;
|
|
27
|
+
}): CanonicalHumanSessionAdmissionDecision;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BrowserProtectedAuthFieldValue, ProtectedAuthField, SiteAuthAuthority } from "@opengeni/contracts";
|
|
2
|
+
type ConnectionFieldsAuthority = Extract<SiteAuthAuthority, {
|
|
3
|
+
kind: "connection_fields";
|
|
4
|
+
}>;
|
|
5
|
+
export declare class BrowserAuthCredentialError extends Error {
|
|
6
|
+
readonly name = "BrowserAuthCredentialError";
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveProtectedAuthFieldValues(input: {
|
|
9
|
+
authority: ConnectionFieldsAuthority;
|
|
10
|
+
requestedFields: readonly ProtectedAuthField[];
|
|
11
|
+
credential: Readonly<Record<string, unknown>>;
|
|
12
|
+
nowMs?: number;
|
|
13
|
+
}): BrowserProtectedAuthFieldValue[];
|
|
14
|
+
export declare function totpCode(secretValue: string, options?: {
|
|
15
|
+
digits?: number;
|
|
16
|
+
periodSeconds?: number;
|
|
17
|
+
algorithm?: "sha1" | "sha256" | "sha512";
|
|
18
|
+
nowMs?: number;
|
|
19
|
+
}): string;
|
|
20
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InteractionPlacement } from "@opengeni/contracts";
|
|
1
|
+
import type { InteractionPlacement, NetworkRouteConfiguration, NetworkRouteConsistency } from "@opengeni/contracts";
|
|
2
2
|
type BrowserControllerAuthorityScope = {
|
|
3
3
|
rootSecret: string;
|
|
4
4
|
accountId: string;
|
|
@@ -26,6 +26,24 @@ export declare function deriveBrowserSessionControllerTokens(scope: BrowserSessi
|
|
|
26
26
|
controlToken: string;
|
|
27
27
|
viewToken: string;
|
|
28
28
|
};
|
|
29
|
+
/** Secret-safe durable identity for one exact route launch. The digest binds
|
|
30
|
+
* the route snapshot and proxy credential without making a password-verifier
|
|
31
|
+
* hash available to database readers. */
|
|
32
|
+
export declare function deriveBrowserNetworkRouteAuthorityDigest(scope: {
|
|
33
|
+
rootSecret: string;
|
|
34
|
+
accountId: string;
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
browserSessionId: string;
|
|
37
|
+
routeId: string;
|
|
38
|
+
routeVersion: number;
|
|
39
|
+
credentialVersion: number | null;
|
|
40
|
+
configuration: NetworkRouteConfiguration;
|
|
41
|
+
consistency: NetworkRouteConsistency;
|
|
42
|
+
proxyCredential: {
|
|
43
|
+
username: string;
|
|
44
|
+
password: string;
|
|
45
|
+
} | null;
|
|
46
|
+
}): string;
|
|
29
47
|
export declare function deriveBrowserViewGrantToken(scope: BrowserSessionAuthorityScope & {
|
|
30
48
|
grantId: string;
|
|
31
49
|
expiresAt: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InteractionPlacement, NetworkRouteConfiguration, NetworkRouteConsistency } from "@opengeni/contracts";
|
|
2
|
+
import type { PlacementBrowserNetworkRoute } from "@opengeni/runtime/sandbox";
|
|
3
|
+
/** Resolve one provider-neutral managed route into the exact private selector
|
|
4
|
+
* accepted by the chosen external browser placement. Unsupported guarantees
|
|
5
|
+
* fail before lifecycle dispatch; no provider API key enters this value. */
|
|
6
|
+
export declare function managedNetworkRouteForPlacement(configuration: Extract<NetworkRouteConfiguration, {
|
|
7
|
+
kind: "managed";
|
|
8
|
+
}>, consistency: NetworkRouteConsistency, placement: InteractionPlacement): NonNullable<PlacementBrowserNetworkRoute["providerRoute"]>;
|