@opengeni/api-router 5.2.0 → 5.3.0-canary.36927100590001
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/access-grant-rls.d.ts +1 -1
- package/dist/app.d.ts +10 -1
- package/dist/app.js +6 -1
- package/dist/browser-controller-authority.d.ts +1 -61
- package/dist/browser-state-authority.d.ts +1 -27
- package/dist/{chunk-WL3TES6Q.js → chunk-2QCRFD6U.js} +5659 -3636
- package/dist/{chunk-WL3TES6Q.js.map → chunk-2QCRFD6U.js.map} +1 -1
- package/dist/chunk-OGQDXVXY.js +18 -0
- package/dist/chunk-OGQDXVXY.js.map +1 -0
- package/dist/claude-subscription-oauth.d.ts +20 -0
- package/dist/codemode.d.ts +3 -1
- package/dist/editable-artifact-source-session.d.ts +3 -0
- package/dist/editable-artifact-websocket.d.ts +5 -3
- package/dist/http/api-error.d.ts +9 -1
- package/dist/index.js +124 -10
- package/dist/index.js.map +1 -1
- package/dist/integration-endpoint-test.d.ts +20 -0
- package/dist/integrations/api-integrations.d.ts +2 -2
- package/dist/integrations/github-lens-connect.d.ts +23 -1
- package/dist/integrations/marketplace-plugin.d.ts +43 -43
- package/dist/integrations/oauth-client.d.ts +1 -0
- package/dist/integrations/slack-interactions.d.ts +2 -0
- package/dist/interaction-agent-access.d.ts +4 -8
- package/dist/mcp/server.d.ts +4 -4
- package/dist/routes/api-keys.d.ts +4 -7
- package/dist/routes/automations.d.ts +2 -0
- package/dist/routes/browser-sessions.d.ts +2 -0
- package/dist/routes/claude-subscription-oauth.d.ts +3 -0
- package/dist/routes/codex.d.ts +2 -1
- package/dist/routes/session-artifact-associations.d.ts +4 -0
- package/dist/routes/session-history-imports.d.ts +9 -0
- package/dist/routes/usage-allowances.d.ts +12 -0
- package/dist/routes/workspace-integrations.d.ts +6 -1
- package/dist/routes/workspaces.d.ts +1 -1
- package/dist/sandbox/enrollment.d.ts +7 -1
- package/dist/{session-event-view-LHHZAJPE.js → session-event-view-5SPZTQBE.js} +3 -1
- package/dist/{session-event-view-LHHZAJPE.js.map → session-event-view-5SPZTQBE.js.map} +1 -1
- package/package.json +20 -19
- package/src/access-grant-rls.ts +31 -8
- package/src/app.ts +419 -34
- package/src/browser-controller-authority.ts +1 -186
- package/src/browser-state-authority.ts +1 -236
- package/src/claude-subscription-oauth.ts +348 -0
- package/src/claude-subscription-usage.ts +13 -2
- package/src/codemode.ts +26 -5
- package/src/editable-artifact-source-session.ts +123 -0
- package/src/editable-artifact-websocket.ts +16 -3
- package/src/http/api-error.ts +44 -1
- package/src/index.ts +9 -1
- package/src/integration-endpoint-test.ts +291 -0
- package/src/integrations/api-integrations.ts +81 -7
- package/src/integrations/oauth-client.ts +11 -3
- package/src/integrations/slack-interactions.ts +67 -16
- package/src/interaction-agent-access.ts +8 -20
- package/src/mcp/server.ts +174 -53
- package/src/routes/api-integrations.ts +107 -1
- package/src/routes/api-keys.ts +38 -21
- package/src/routes/automations.ts +68 -17
- package/src/routes/browser-sessions.ts +21 -1
- package/src/routes/claude-subscription-oauth.ts +114 -0
- package/src/routes/codex.ts +17 -7
- package/src/routes/connections.ts +21 -0
- package/src/routes/editable-artifacts.ts +63 -2
- package/src/routes/enrollments.ts +17 -0
- package/src/routes/knowledge.ts +29 -12
- package/src/routes/scheduled-tasks.ts +19 -1
- package/src/routes/session-artifact-associations.ts +87 -0
- package/src/routes/session-history-imports.ts +280 -0
- package/src/routes/sessions.ts +92 -9
- package/src/routes/usage-allowances.ts +371 -0
- package/src/routes/workspace-integrations.ts +171 -3
- package/src/routes/workspaces.ts +43 -9
- package/src/sandbox/channel-a.ts +1 -0
- package/src/sandbox/enrollment.ts +66 -3
- package/src/sandbox/viewer.ts +1 -0
- package/src/workspace-webhook-dispatch.ts +4 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AccessGrant } from "@opengeni/contracts";
|
|
2
2
|
import { type ApiRouteDeps } from "@opengeni/core";
|
|
3
|
-
export declare function withAccessGrantSessionRlsContext<T>(deps: ApiRouteDeps, grant: AccessGrant, fn: () => Promise<T>): Promise<T>;
|
|
3
|
+
export declare function withAccessGrantSessionRlsContext<T>(deps: Pick<ApiRouteDeps, "db">, grant: AccessGrant, fn: () => Promise<T>): Promise<T>;
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Settings } from "@opengeni/config";
|
|
2
|
+
import { type AccessGrant, type ErrorCode, type FirstPartyMcpToolName, type Session } from "@opengeni/contracts";
|
|
2
3
|
import { Hono } from "hono";
|
|
3
4
|
import type { ApiRouteDeps, AppDependencies } from "@opengeni/core";
|
|
4
5
|
export { allowedCorsOrigin } from "./http/cors.js";
|
|
@@ -20,6 +21,14 @@ export declare function createAppComposition(deps: AppDependencies): {
|
|
|
20
21
|
};
|
|
21
22
|
export declare function appendVary(current: string | null, value: string): string;
|
|
22
23
|
export declare function workspaceActorContextExempt(method: string, pathname: string): boolean;
|
|
24
|
+
/** Configured SDK credentials cannot regain tools from widened legacy columns. */
|
|
25
|
+
export declare function configuredCodemodeSessionProxyTools(settings: Pick<Settings, "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools">, session: Pick<Session, "agent">): FirstPartyMcpToolName[] | null;
|
|
26
|
+
/**
|
|
27
|
+
* Permissions span capabilities: project_create grants sessions:create,
|
|
28
|
+
* and runtime titling grants sessions:control. Fence the endpoint family
|
|
29
|
+
* too, without changing null-config routing or ordinary REST authorization.
|
|
30
|
+
*/
|
|
31
|
+
export declare function assertConfiguredCodemodeSessionProxyPath(session: Pick<Session, "id" | "agent">, path: string, method: string): void;
|
|
23
32
|
export declare function httpStatusForError(error: unknown): number;
|
|
24
33
|
export declare function errorCodeForStatus(status: number): ErrorCode;
|
|
25
34
|
/**
|
package/dist/app.js
CHANGED
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
apiContractAdmission,
|
|
6
6
|
apiRequestBodyLimitBytes,
|
|
7
7
|
appendVary,
|
|
8
|
+
assertConfiguredCodemodeSessionProxyPath,
|
|
9
|
+
configuredCodemodeSessionProxyTools,
|
|
8
10
|
createApp,
|
|
9
11
|
createAppComposition,
|
|
10
12
|
errorCodeForStatus,
|
|
@@ -26,7 +28,8 @@ import {
|
|
|
26
28
|
withDefaultEnabledCapabilityMcpTools,
|
|
27
29
|
workflowIdForSession,
|
|
28
30
|
workspaceActorContextExempt
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2QCRFD6U.js";
|
|
32
|
+
import "./chunk-OGQDXVXY.js";
|
|
30
33
|
export {
|
|
31
34
|
API_MAX_REQUEST_BODY_BYTES,
|
|
32
35
|
REFUSED_API_CONTRACT_REVISIONS,
|
|
@@ -34,6 +37,8 @@ export {
|
|
|
34
37
|
apiContractAdmission,
|
|
35
38
|
apiRequestBodyLimitBytes,
|
|
36
39
|
appendVary,
|
|
40
|
+
assertConfiguredCodemodeSessionProxyPath,
|
|
41
|
+
configuredCodemodeSessionProxyTools,
|
|
37
42
|
createApp,
|
|
38
43
|
createAppComposition,
|
|
39
44
|
errorCodeForStatus,
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
|
|
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
|
-
/** 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;
|
|
47
|
-
export declare function deriveBrowserViewGrantToken(scope: BrowserSessionAuthorityScope & {
|
|
48
|
-
grantId: string;
|
|
49
|
-
expiresAt: string;
|
|
50
|
-
}): string;
|
|
51
|
-
/** ComputerSession credentials share the placement controller root while using
|
|
52
|
-
* resource-specific domains. Browser and computer authority cannot collide. */
|
|
53
|
-
export declare function deriveComputerSessionControllerTokens(scope: ComputerSessionAuthorityScope): {
|
|
54
|
-
controlToken: string;
|
|
55
|
-
viewToken: string;
|
|
56
|
-
};
|
|
57
|
-
export declare function deriveComputerViewGrantToken(scope: ComputerSessionAuthorityScope & {
|
|
58
|
-
grantId: string;
|
|
59
|
-
expiresAt: string;
|
|
60
|
-
}): string;
|
|
61
|
-
export {};
|
|
1
|
+
export * from "@opengeni/interaction/browser-controller-authority";
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
export
|
|
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;
|
|
1
|
+
export * from "@opengeni/interaction/browser-state-authority";
|