@opengeni/api-router 1.3.0 → 1.4.2
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 +7 -0
- package/dist/app.d.ts +2 -2
- package/dist/app.js +1 -1
- package/dist/azure-live.d.ts +28 -0
- package/dist/{chunk-IZEGLLKZ.js → chunk-F3LQ6VWR.js} +1334 -486
- package/dist/{chunk-IZEGLLKZ.js.map → chunk-F3LQ6VWR.js.map} +1 -1
- package/dist/codemode.d.ts +3 -3
- package/dist/http/api-error.d.ts +14 -0
- package/dist/index.js +1 -1
- package/dist/integrations/oauth-profiles.d.ts +3 -1
- package/dist/routes/sessions.d.ts +2 -0
- package/dist/transcription/billing-refusal.d.ts +8 -0
- package/dist/transcription/normalize.d.ts +23 -0
- package/dist/transcription/providers/azure-mai.d.ts +12 -0
- package/dist/transcription/providers/azure-openai.d.ts +4 -0
- package/dist/transcription/providers/openai.d.ts +16 -0
- package/dist/transcription/service.d.ts +10 -1
- package/dist/transcription/wav-duration.d.ts +8 -0
- package/package.json +20 -20
- package/src/access-grant-rls.ts +18 -10
- package/src/app.ts +62 -8
- package/src/azure-live.ts +103 -0
- package/src/codemode.ts +3 -5
- package/src/gateway-realtime.ts +11 -7
- package/src/http/api-error.ts +36 -1
- package/src/integrations/oauth-client.ts +9 -17
- package/src/integrations/oauth-profiles.ts +17 -6
- package/src/routes/editable-artifacts.ts +8 -0
- package/src/routes/session-artifact-associations.ts +80 -6
- package/src/routes/sessions.ts +263 -66
- package/src/routes/transcription-recordings.ts +71 -4
- package/src/routes/transcriptions.ts +26 -2
- package/src/routes/workspaces.ts +49 -7
- package/src/sandbox/channel-a.ts +22 -0
- package/src/transcription/billing-refusal.ts +14 -0
- package/src/transcription/normalize.ts +77 -0
- package/src/transcription/providers/azure-mai.ts +98 -0
- package/src/transcription/providers/azure-openai.ts +16 -7
- package/src/transcription/providers/openai.ts +79 -5
- package/src/transcription/segmenter.ts +7 -1
- package/src/transcription/service.ts +215 -10
- package/src/transcription/wav-duration.ts +39 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { AccessGrant } from "@opengeni/contracts";
|
|
2
2
|
import { type ApiRouteDeps } from "@opengeni/core";
|
|
3
|
+
import { type CreditDebitAttribution } from "@opengeni/db";
|
|
4
|
+
/**
|
|
5
|
+
* Trusted payer for a non-agent grant: an authenticated human session pays as
|
|
6
|
+
* that human; keys and services are service work. An agent attempt must be
|
|
7
|
+
* resolved through the validated middleware context installed below.
|
|
8
|
+
*/
|
|
9
|
+
export declare function creditDebitAttributionForGrant(grant: AccessGrant): CreditDebitAttribution;
|
|
3
10
|
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,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type FirstPartyMcpToolPolicySettings } from "@opengeni/config";
|
|
2
2
|
import { type AccessGrant, type ErrorCode, type FirstPartyMcpToolName, type Session } from "@opengeni/contracts";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
4
|
import type { ApiRouteDeps, AppDependencies } from "@opengeni/core";
|
|
@@ -22,7 +22,7 @@ export declare function createAppComposition(deps: AppDependencies): {
|
|
|
22
22
|
export declare function appendVary(current: string | null, value: string): string;
|
|
23
23
|
export declare function workspaceActorContextExempt(method: string, pathname: string): boolean;
|
|
24
24
|
/** Configured SDK credentials cannot regain tools from widened legacy columns. */
|
|
25
|
-
export declare function configuredCodemodeSessionProxyTools(settings:
|
|
25
|
+
export declare function configuredCodemodeSessionProxyTools(settings: FirstPartyMcpToolPolicySettings, session: Pick<Session, "agent">): FirstPartyMcpToolName[] | null;
|
|
26
26
|
/**
|
|
27
27
|
* Permissions span capabilities: project_create grants sessions:create,
|
|
28
28
|
* and runtime titling grants sessions:control. Fence the endpoint family
|
package/dist/app.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Settings } from "@opengeni/config";
|
|
2
|
+
import type { CodexRealtimeWebrtcRequest } from "@opengeni/contracts";
|
|
3
|
+
import { type Database } from "@opengeni/db";
|
|
4
|
+
export declare const AZURE_LIVE_MODEL_ID: "opengeni-azure/gpt-live-1";
|
|
5
|
+
export declare function azureLiveConfigured(settings: Settings): boolean;
|
|
6
|
+
/** Server-authenticated SDP exchange. Never returns provider credentials. */
|
|
7
|
+
export declare function brokerAzureLive(input: {
|
|
8
|
+
settings: Settings;
|
|
9
|
+
request: Pick<CodexRealtimeWebrtcRequest, "sdp" | "instructions" | "voice">;
|
|
10
|
+
initialItems: Array<{
|
|
11
|
+
role: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}>;
|
|
14
|
+
signal?: AbortSignal | undefined;
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
sdp: string;
|
|
18
|
+
version: "v3";
|
|
19
|
+
model: "opengeni-azure/gpt-live-1";
|
|
20
|
+
}>;
|
|
21
|
+
export declare function buildSessionAzureLiveBroker(db: Database, settings: Settings, workspaceId: string, sessionId: string, fetchImpl?: typeof fetch): (input: {
|
|
22
|
+
request: Pick<CodexRealtimeWebrtcRequest, "sdp" | "instructions" | "voice">;
|
|
23
|
+
signal?: AbortSignal | undefined;
|
|
24
|
+
}) => Promise<{
|
|
25
|
+
sdp: string;
|
|
26
|
+
version: "v3";
|
|
27
|
+
model: "opengeni-azure/gpt-live-1";
|
|
28
|
+
}>;
|