@opengeni/api-router 0.23.1 → 0.26.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 +2 -2
- package/dist/app.js +1 -1
- package/dist/browser-controller-authority.d.ts +43 -0
- package/dist/browser-state-authority.d.ts +27 -0
- package/dist/{chunk-T4T2PGU4.js → chunk-JIKNR5YL.js} +26181 -14408
- package/dist/chunk-JIKNR5YL.js.map +1 -0
- package/dist/codemode.d.ts +23 -0
- package/dist/editable-artifact-live-hints.d.ts +11 -0
- package/dist/editable-artifact-native-kernel.d.ts +37 -0
- package/dist/editable-artifact-office-import.d.ts +22 -0
- package/dist/editable-artifact-production.d.ts +29 -0
- package/dist/editable-artifact-websocket.d.ts +49 -0
- package/dist/editable-artifact-workspace-files.d.ts +23 -0
- package/dist/github-browser-flow.d.ts +6 -0
- package/dist/http/cors.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1796 -22
- package/dist/index.js.map +1 -1
- package/dist/integrations/api-integrations.d.ts +24 -0
- package/dist/integrations/atlassian.d.ts +176 -0
- package/dist/integrations/github-skill-source.d.ts +5 -0
- package/dist/integrations/google-drive.d.ts +85 -0
- package/dist/integrations/oauth-client.d.ts +22 -1
- package/dist/integrations/provider-oauth.d.ts +19 -0
- package/dist/integrations/slack-bot.d.ts +4 -0
- package/dist/integrations/slack-interactions.d.ts +8 -2
- package/dist/integrations/social-api.d.ts +2 -1
- package/dist/mcp/editable-artifact-query-schema.d.ts +4 -0
- package/dist/mcp/editable-artifacts.d.ts +13 -0
- package/dist/mcp/scheduled-task-view.d.ts +168 -0
- package/dist/mcp/server.d.ts +14 -3
- package/dist/memory-slack-delivery.d.ts +9 -0
- package/dist/routes/api-integrations.d.ts +8 -0
- package/dist/routes/browser-identities.d.ts +5 -0
- package/dist/routes/browser-sessions.d.ts +6 -0
- package/dist/routes/company-profile.d.ts +3 -0
- package/dist/routes/computer-sessions.d.ts +6 -0
- package/dist/routes/editable-artifacts.d.ts +44 -0
- package/dist/routes/integration-features.d.ts +3 -0
- package/dist/routes/memory-slack-publications.d.ts +6 -0
- package/dist/routes/plugins.d.ts +8 -0
- package/dist/routes/sessions.d.ts +17 -2
- package/dist/routes/skills.d.ts +6 -0
- package/dist/routes/video-generation.d.ts +3 -0
- package/dist/sandbox/channel-a.d.ts +55 -2
- package/dist/sandbox/metrics-ingestion.d.ts +6 -1
- package/dist/sandbox/viewer.d.ts +4 -2
- package/dist/temporal-schedule-cleanup.d.ts +26 -0
- package/package.json +19 -14
- package/src/app.ts +274 -37
- package/src/browser-controller-authority.ts +137 -0
- package/src/browser-state-authority.ts +236 -0
- package/src/codemode.ts +186 -0
- package/src/editable-artifact-live-hints.ts +64 -0
- package/src/editable-artifact-native-kernel.ts +659 -0
- package/src/editable-artifact-office-import.ts +230 -0
- package/src/editable-artifact-production.ts +419 -0
- package/src/editable-artifact-websocket.ts +311 -0
- package/src/editable-artifact-workspace-files.ts +186 -0
- package/src/github-browser-flow.ts +35 -6
- package/src/http/auth.ts +2 -0
- package/src/http/cors.ts +3 -0
- package/src/index.ts +119 -20
- package/src/integrations/api-integrations.ts +350 -0
- package/src/integrations/atlassian.ts +1621 -0
- package/src/integrations/github-skill-source.ts +142 -0
- package/src/integrations/google-drive.ts +1000 -64
- package/src/integrations/oauth-client.ts +123 -33
- package/src/integrations/provider-oauth.ts +777 -0
- package/src/integrations/slack-bot.ts +31 -2
- package/src/integrations/slack-interactions.ts +487 -27
- package/src/integrations/social-api.ts +11 -0
- package/src/mcp/documents.ts +32 -1
- package/src/mcp/editable-artifact-query-schema.ts +236 -0
- package/src/mcp/editable-artifacts.ts +448 -0
- package/src/mcp/scheduled-task-view.ts +34 -0
- package/src/mcp/server.ts +923 -145
- package/src/memory-slack-delivery.ts +209 -0
- package/src/routes/api-integrations.ts +407 -0
- package/src/routes/browser-identities.ts +136 -0
- package/src/routes/browser-sessions.ts +2543 -0
- package/src/routes/company-profile.ts +255 -0
- package/src/routes/computer-sessions.ts +1247 -0
- package/src/routes/connections.ts +284 -99
- package/src/routes/documents.ts +22 -3
- package/src/routes/editable-artifacts.ts +1159 -0
- package/src/routes/files.ts +106 -4
- package/src/routes/github.ts +18 -2
- package/src/routes/install.ts +7 -1
- package/src/routes/integration-features.ts +258 -0
- package/src/routes/memory-slack-publications.ts +216 -0
- package/src/routes/packs.ts +437 -7
- package/src/routes/plugins.ts +751 -0
- package/src/routes/rigs.ts +77 -20
- package/src/routes/scheduled-tasks.ts +67 -40
- package/src/routes/sessions.ts +421 -245
- package/src/routes/skills.ts +174 -0
- package/src/routes/video-generation.ts +132 -0
- package/src/routes/workspaces.ts +46 -24
- package/src/sandbox/channel-a.ts +723 -116
- package/src/sandbox/metrics-ingestion.ts +121 -3
- package/src/sandbox/rematerialize.ts +35 -47
- package/src/sandbox/viewer.ts +29 -9
- package/src/temporal-schedule-cleanup.ts +135 -0
- package/dist/chunk-T4T2PGU4.js.map +0 -1
- package/dist/mcp/toolspace.d.ts +0 -71
- package/src/mcp/toolspace.ts +0 -1190
package/dist/app.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ErrorCode } from "@opengeni/contracts";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
3
|
import type { ApiRouteDeps, AppDependencies } from "@opengeni/core";
|
|
4
|
+
export { allowedCorsOrigin } from "./http/cors.js";
|
|
4
5
|
export type { ApiRouteDeps, AppDependencies, DocumentIndexClient, ObjectStorageDependency, SessionWorkflowClient, } from "@opengeni/core";
|
|
5
6
|
export { mergeResourceRefs, mergeToolRefs, normalizeResources, validateFileResources, validateGitHubRepositorySelection, validateGitHubRepositorySelectionShape, validateGitHubRepositorySelectionShapes, validateToolRefs, withDefaultEnabledCapabilityMcpTools, } from "@opengeni/core";
|
|
6
7
|
export { workflowIdForSession } from "@opengeni/core";
|
|
7
|
-
export { replaySessionEvents, sseSessionStream, sseWorkspaceControlStream } from "./http/sse";
|
|
8
|
+
export { replaySessionEvents, sseSessionStream, sseWorkspaceControlStream } from "./http/sse.js";
|
|
8
9
|
export declare const API_MAX_REQUEST_BODY_BYTES: number;
|
|
9
10
|
/** Effective Hono bodyLimit — API JSON ceiling or voice multipart + multipart overhead. */
|
|
10
11
|
export declare function apiRequestBodyLimitBytes(settings: {
|
|
@@ -17,7 +18,6 @@ export declare function createAppComposition(deps: AppDependencies): {
|
|
|
17
18
|
routeDeps: ApiRouteDeps;
|
|
18
19
|
};
|
|
19
20
|
export declare function appendVary(current: string | null, value: string): string;
|
|
20
|
-
export declare function allowedCorsOrigin(pattern: string, origin: string): boolean;
|
|
21
21
|
export declare function httpStatusForError(error: unknown): number;
|
|
22
22
|
export declare function errorCodeForStatus(status: number): ErrorCode;
|
|
23
23
|
export declare function routeLabel(pathname: string): string;
|
package/dist/app.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { InteractionPlacement } from "@opengeni/contracts";
|
|
2
|
+
type BrowserControllerAuthorityScope = {
|
|
3
|
+
rootSecret: string;
|
|
4
|
+
accountId: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
placement: InteractionPlacement;
|
|
7
|
+
placementInstanceId: string;
|
|
8
|
+
};
|
|
9
|
+
type BrowserSessionAuthorityScope = BrowserControllerAuthorityScope & {
|
|
10
|
+
browserSessionId: string;
|
|
11
|
+
controllerGeneration: string;
|
|
12
|
+
tokenGeneration: number;
|
|
13
|
+
};
|
|
14
|
+
type ComputerSessionAuthorityScope = BrowserControllerAuthorityScope & {
|
|
15
|
+
computerSessionId: string;
|
|
16
|
+
controllerGeneration: string;
|
|
17
|
+
tokenGeneration: number;
|
|
18
|
+
};
|
|
19
|
+
/** Stable placement-admin authority. This token is installed owner-only inside
|
|
20
|
+
* the exact placement and is never persisted or returned by the public API. */
|
|
21
|
+
export declare function deriveBrowserControllerAdminToken(scope: BrowserControllerAuthorityScope): string;
|
|
22
|
+
/** Deterministic controller credentials. The durable generations are the only
|
|
23
|
+
* stored authority; plaintext tokens can be reconstructed only by API replicas
|
|
24
|
+
* holding the deployment HMAC root. */
|
|
25
|
+
export declare function deriveBrowserSessionControllerTokens(scope: BrowserSessionAuthorityScope): {
|
|
26
|
+
controlToken: string;
|
|
27
|
+
viewToken: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function deriveBrowserViewGrantToken(scope: BrowserSessionAuthorityScope & {
|
|
30
|
+
grantId: string;
|
|
31
|
+
expiresAt: string;
|
|
32
|
+
}): string;
|
|
33
|
+
/** ComputerSession credentials share the placement controller root while using
|
|
34
|
+
* resource-specific domains. Browser and computer authority cannot collide. */
|
|
35
|
+
export declare function deriveComputerSessionControllerTokens(scope: ComputerSessionAuthorityScope): {
|
|
36
|
+
controlToken: string;
|
|
37
|
+
viewToken: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function deriveComputerViewGrantToken(scope: ComputerSessionAuthorityScope & {
|
|
40
|
+
grantId: string;
|
|
41
|
+
expiresAt: string;
|
|
42
|
+
}): string;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type BrowserStateOperationScope = {
|
|
2
|
+
accountId: string;
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
browserSessionId: string;
|
|
5
|
+
operationId: string;
|
|
6
|
+
objectKey: string;
|
|
7
|
+
};
|
|
8
|
+
export type BrowserStateArtifactScope = {
|
|
9
|
+
accountId: string;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
objectKey: string;
|
|
12
|
+
artifactDigest: string;
|
|
13
|
+
contentDigest: string;
|
|
14
|
+
};
|
|
15
|
+
/** Deterministic only within one idempotent publication operation. This lets a
|
|
16
|
+
* control-plane retry present browserd with exactly the same secret authority
|
|
17
|
+
* without storing a plaintext key or placing it in an operation row. */
|
|
18
|
+
export declare function deriveBrowserStateDataKey(rootKey: Uint8Array, scopeInput: BrowserStateOperationScope): Buffer;
|
|
19
|
+
/** Associated data for the encrypted profile object. It is reproducible from
|
|
20
|
+
* durable non-secret artifact authority during restore. */
|
|
21
|
+
export declare function browserStateArtifactAad(scopeInput: Pick<BrowserStateArtifactScope, "accountId" | "workspaceId" | "objectKey">): Buffer;
|
|
22
|
+
/** Wrap a 32-byte artifact data key under the operator-held root key. The
|
|
23
|
+
* ciphertext is bound to workspace, object, and both integrity digests. */
|
|
24
|
+
export declare function wrapBrowserStateDataKey(rootKey: Uint8Array, dataKeyInput: Uint8Array, scopeInput: BrowserStateArtifactScope): string;
|
|
25
|
+
export declare function unwrapBrowserStateDataKey(rootKey: Uint8Array, wrapped: string, scopeInput: BrowserStateArtifactScope): Buffer;
|
|
26
|
+
export declare function browserStateObjectKey(workspaceIdInput: string, operationIdInput: string): string;
|
|
27
|
+
export declare function browserStateManifestDigest(manifest: unknown): string;
|