@opengeni/db 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/canonical-human-identities.js +3 -3
- package/dist/capability-reconciliation.js +2 -2
- package/dist/{chunk-7QWWTVYH.js → chunk-5ROHLEN6.js} +29 -4
- package/dist/chunk-5ROHLEN6.js.map +1 -0
- package/dist/{chunk-AQMH2ZEH.js → chunk-A4J7EECR.js} +2 -2
- package/dist/{chunk-VQX54TK3.js → chunk-B5C5SBSI.js} +3 -3
- package/dist/{chunk-OI6YZXTU.js → chunk-DKFEUGM4.js} +2 -2
- package/dist/{chunk-HYBQABBJ.js → chunk-HUKBIZGH.js} +2 -2
- package/dist/{chunk-LRSIODCQ.js → chunk-IT3EYY2C.js} +6 -4
- package/dist/{chunk-LRSIODCQ.js.map → chunk-IT3EYY2C.js.map} +1 -1
- package/dist/{chunk-DSNEIW5E.js → chunk-JL6TBB76.js} +2 -1
- package/dist/chunk-JL6TBB76.js.map +1 -0
- package/dist/{chunk-OEFNTGR3.js → chunk-JWBEE4CL.js} +4 -4
- package/dist/{chunk-BRVBLQAL.js → chunk-K5MTNKJU.js} +4 -4
- package/dist/{chunk-6UKNJ43T.js → chunk-NZ2SP55O.js} +2 -2
- package/dist/{chunk-3XHC5KC5.js → chunk-OKCBARX6.js} +2 -2
- package/dist/{chunk-PNWWNEDM.js → chunk-OV5AUIBA.js} +2 -2
- package/dist/{chunk-BID3CNN3.js → chunk-TODVDGMO.js} +36 -18
- package/dist/{chunk-BID3CNN3.js.map → chunk-TODVDGMO.js.map} +1 -1
- package/dist/{chunk-6S5T6FSP.js → chunk-W75DRYG3.js} +5 -5
- package/dist/{chunk-7S3O33NM.js → chunk-Y72DP3JF.js} +2 -2
- package/dist/codemode-approvals.d.ts +7 -1
- package/dist/connect-attempts.js +3 -3
- package/dist/connection-metadata.d.ts +416 -0
- package/dist/credit-balances.d.ts +25 -4
- package/dist/database.d.ts +7 -1
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/index.d.ts +51 -8
- package/dist/index.js +10826 -10129
- package/dist/index.js.map +1 -1
- package/dist/legacy-tool-action-reviews.d.ts +75 -0
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-operations.js +2 -2
- package/dist/modal-native-live-origin.d.ts +75 -0
- package/dist/organization-integration-policy.js +3 -3
- package/dist/organization-slack-bots.d.ts +1 -1
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.d.ts +21 -21
- package/dist/retained-provider-commands.js +6 -6
- package/dist/runtime-posture.d.ts +1 -1
- package/dist/sandbox-interaction-idle.d.ts +22 -0
- package/dist/schema.js +1 -1
- package/dist/session-background-commands.js +4 -4
- package/dist/session-command-output.js +5 -5
- package/dist/session-event-slices.js +3 -3
- package/dist/session-mcp-credential-rotation.js +5 -5
- package/dist/session-realtime-billing.d.ts +48 -0
- package/dist/session-realtime.d.ts +8 -2
- package/dist/session-tenancy.js +3 -3
- package/dist/video-generation.js +3 -3
- package/dist/voice-transcription-settlement.d.ts +36 -0
- package/dist/workspace-tool-defaults.js +4 -4
- package/drizzle/0623_voice_transcription_attribution.sql +128 -0
- package/drizzle/0624_azure_live_realtime_model.sql +30 -0
- package/drizzle/0625_transcription_billing_refusal_codes.sql +29 -0
- package/drizzle/0632_modal_native_live_origin.sql +239 -0
- package/package.json +7 -7
- package/src/codemode-approvals.ts +52 -22
- package/src/codemode-operations.ts +198 -181
- package/src/connection-metadata.ts +166 -0
- package/src/credit-balances.ts +58 -17
- package/src/database.ts +9 -0
- package/src/index.ts +540 -412
- package/src/insights-unified.ts +2 -1
- package/src/legacy-tool-action-reviews.ts +242 -0
- package/src/modal-native-live-origin.ts +148 -0
- package/src/organization-slack-bots.ts +1 -1
- package/src/provision-roles.ts +12 -0
- package/src/runtime-posture.ts +32 -3
- package/src/sandbox-interaction-idle.ts +91 -0
- package/src/schema.ts +1 -0
- package/src/session-realtime-billing.ts +135 -0
- package/src/session-realtime-ledger.ts +9 -4
- package/src/session-realtime.ts +20 -2
- package/src/tool-action-reviews.ts +129 -18
- package/src/transcription-recordings.ts +3 -1
- package/src/voice-transcription-settlement.ts +94 -0
- package/dist/chunk-7QWWTVYH.js.map +0 -1
- package/dist/chunk-DSNEIW5E.js.map +0 -1
- /package/dist/{chunk-AQMH2ZEH.js.map → chunk-A4J7EECR.js.map} +0 -0
- /package/dist/{chunk-VQX54TK3.js.map → chunk-B5C5SBSI.js.map} +0 -0
- /package/dist/{chunk-OI6YZXTU.js.map → chunk-DKFEUGM4.js.map} +0 -0
- /package/dist/{chunk-HYBQABBJ.js.map → chunk-HUKBIZGH.js.map} +0 -0
- /package/dist/{chunk-OEFNTGR3.js.map → chunk-JWBEE4CL.js.map} +0 -0
- /package/dist/{chunk-BRVBLQAL.js.map → chunk-K5MTNKJU.js.map} +0 -0
- /package/dist/{chunk-6UKNJ43T.js.map → chunk-NZ2SP55O.js.map} +0 -0
- /package/dist/{chunk-3XHC5KC5.js.map → chunk-OKCBARX6.js.map} +0 -0
- /package/dist/{chunk-PNWWNEDM.js.map → chunk-OV5AUIBA.js.map} +0 -0
- /package/dist/{chunk-6S5T6FSP.js.map → chunk-W75DRYG3.js.map} +0 -0
- /package/dist/{chunk-7S3O33NM.js.map → chunk-Y72DP3JF.js.map} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type Database } from "./database.js";
|
|
2
|
+
/** Read-only presentation for SDK approvals created before durable connector
|
|
3
|
+
* reviews. Neither current catalogs nor display labels establish a provider.
|
|
4
|
+
* This never creates a request, changes a policy, or resumes an operation. */
|
|
5
|
+
export declare function legacyToolActionReview(db: Database, input: {
|
|
6
|
+
accountId: string;
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
sessionId: string;
|
|
9
|
+
approvalId: string;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
args: Record<string, unknown>;
|
|
12
|
+
context: {
|
|
13
|
+
kind: "generic" | "gmail";
|
|
14
|
+
title?: string | undefined;
|
|
15
|
+
accountLabel?: string | undefined;
|
|
16
|
+
fieldLabels?: Record<string, string> | undefined;
|
|
17
|
+
protectedFields?: string[] | undefined;
|
|
18
|
+
email?: {
|
|
19
|
+
from: string;
|
|
20
|
+
to: string;
|
|
21
|
+
cc: string;
|
|
22
|
+
bcc: string;
|
|
23
|
+
subject: string;
|
|
24
|
+
textBody: string;
|
|
25
|
+
htmlBody: string;
|
|
26
|
+
contentSha256: string;
|
|
27
|
+
attachments: {
|
|
28
|
+
name: string;
|
|
29
|
+
mediaType: string;
|
|
30
|
+
bytes: number;
|
|
31
|
+
}[];
|
|
32
|
+
} | undefined;
|
|
33
|
+
samples?: {
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
subtitle?: string | undefined;
|
|
37
|
+
provenance: "provider_metadata";
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
};
|
|
40
|
+
proven: boolean;
|
|
41
|
+
review: {
|
|
42
|
+
version: 1;
|
|
43
|
+
id: string;
|
|
44
|
+
actionDigest: string;
|
|
45
|
+
revision: string;
|
|
46
|
+
status: "approved" | "blocked" | "cancelled" | "completed" | "executing" | "expired" | "failed" | "partial" | "pending" | "rejected" | "revoked" | "stale" | "unavailable" | "unknown";
|
|
47
|
+
title: string;
|
|
48
|
+
accountLabel?: string | undefined;
|
|
49
|
+
consequence?: string | undefined;
|
|
50
|
+
effects: string[];
|
|
51
|
+
selectionCount?: number | undefined;
|
|
52
|
+
selectionKind?: "messages" | "threads" | undefined;
|
|
53
|
+
samples?: {
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
subtitle?: string | undefined;
|
|
57
|
+
provenance: "provider_metadata";
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
fields: {
|
|
60
|
+
path: string;
|
|
61
|
+
label: string;
|
|
62
|
+
preview: string;
|
|
63
|
+
count?: number | undefined;
|
|
64
|
+
truncated: boolean;
|
|
65
|
+
protected?: boolean | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
moreFields: number;
|
|
68
|
+
reason: string;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
approveLabel: string;
|
|
72
|
+
availableActions: ("approve" | "reject")[];
|
|
73
|
+
detailsAvailable: boolean;
|
|
74
|
+
};
|
|
75
|
+
} | null>;
|
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
reapManagedAuthIsolatedSessions,
|
|
21
21
|
releaseManagedAuthActorMutationLease,
|
|
22
22
|
validateManagedAuthActorMutationLease
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-Y72DP3JF.js";
|
|
24
|
+
import "./chunk-IT3EYY2C.js";
|
|
25
|
+
import "./chunk-JL6TBB76.js";
|
|
26
26
|
import "./chunk-P7YDM2RI.js";
|
|
27
27
|
import "./chunk-PZ5AY32C.js";
|
|
28
28
|
export {
|
package/dist/mcp-operations.js
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type Database } from "./database.js";
|
|
2
|
+
/** Structural V2 correlation scope. This is deliberately NOT an actor/grant. */
|
|
3
|
+
export type ModalNativeLiveOriginScope = Readonly<{
|
|
4
|
+
version: 2;
|
|
5
|
+
declarationId: string;
|
|
6
|
+
planId: string;
|
|
7
|
+
creatorId: string;
|
|
8
|
+
accountId: string;
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
sessionId: string;
|
|
11
|
+
turnId: string;
|
|
12
|
+
attemptId: string;
|
|
13
|
+
executionGeneration: number;
|
|
14
|
+
triggerEventId: string;
|
|
15
|
+
sandboxGroupId: string;
|
|
16
|
+
routeKind: "home";
|
|
17
|
+
routeTargetId: null;
|
|
18
|
+
routeEpoch: number;
|
|
19
|
+
}>;
|
|
20
|
+
export type ModalNativeLiveOriginProjection = Readonly<{
|
|
21
|
+
version: 1;
|
|
22
|
+
scope: ModalNativeLiveOriginScope;
|
|
23
|
+
initiator: {
|
|
24
|
+
kind: "subject" | "service";
|
|
25
|
+
subjectId: string;
|
|
26
|
+
initiatingHumanSubjectId: string;
|
|
27
|
+
};
|
|
28
|
+
membership: {
|
|
29
|
+
id: string;
|
|
30
|
+
authorizationRevision: string;
|
|
31
|
+
basis: "workspace_membership" | "personal_workspace";
|
|
32
|
+
};
|
|
33
|
+
acceptedAuthority: {
|
|
34
|
+
epoch: number;
|
|
35
|
+
visibility: "user_private" | "workspace_shared";
|
|
36
|
+
ownerOrganizationMembershipId: string | null;
|
|
37
|
+
};
|
|
38
|
+
currentAuthority: {
|
|
39
|
+
epoch: number;
|
|
40
|
+
executionEpoch: number;
|
|
41
|
+
visibility: "user_private" | "workspace_shared";
|
|
42
|
+
ownerSubjectId: string | null;
|
|
43
|
+
ownerOrganizationMembershipId: string | null;
|
|
44
|
+
};
|
|
45
|
+
control: {
|
|
46
|
+
workspaceRevision: string;
|
|
47
|
+
sessionVersion: string;
|
|
48
|
+
};
|
|
49
|
+
execution: {
|
|
50
|
+
workflowId: string;
|
|
51
|
+
workflowRunId: string;
|
|
52
|
+
activityId: string;
|
|
53
|
+
};
|
|
54
|
+
providerRecoveryCount: 0 | 1 | 2 | 3 | 4 | 5;
|
|
55
|
+
checkedAt: string;
|
|
56
|
+
}>;
|
|
57
|
+
export type ModalNativeLiveOriginResult = {
|
|
58
|
+
kind: "live";
|
|
59
|
+
projection: ModalNativeLiveOriginProjection;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "fenced";
|
|
62
|
+
} | {
|
|
63
|
+
kind: "unsupported";
|
|
64
|
+
reason: "invalid_scope" | "human_unavailable" | "external_authority" | "not_premodel";
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Private-server integration primitive, NOT host authentication or a grant.
|
|
68
|
+
* The caller must authenticate the exact host request separately and consume
|
|
69
|
+
* this projection in this SAME transaction. No native/provider awaits here.
|
|
70
|
+
* Enter before taking any tenancy/control/session/lease lock: SQL acquires the
|
|
71
|
+
* organization-membership -> tenancy -> canonical control/row prefix itself.
|
|
72
|
+
* Preserves all subject and tenant GUCs. SQL uncertainty propagates (including
|
|
73
|
+
* 55P03); no failed/aborted transaction is reported as successful admission.
|
|
74
|
+
*/
|
|
75
|
+
export declare function lockLiveNativeOriginalOriginTx(scopedTx: Database, scope: ModalNativeLiveOriginScope): Promise<ModalNativeLiveOriginResult>;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
updateOrganizationIntegrationPolicy,
|
|
4
4
|
withOrganizationIntegrationAcquisition,
|
|
5
5
|
withOrganizationIntegrationPolicyFence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A4J7EECR.js";
|
|
7
7
|
import "./chunk-4UJCXBR2.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IT3EYY2C.js";
|
|
9
|
+
import "./chunk-JL6TBB76.js";
|
|
10
10
|
import "./chunk-P7YDM2RI.js";
|
|
11
11
|
import "./chunk-PZ5AY32C.js";
|
|
12
12
|
export {
|
|
@@ -48,7 +48,7 @@ export declare function availableSlackBotConnectionMetadata(db: Database, scope:
|
|
|
48
48
|
metadata: {
|
|
49
49
|
organizationSharingGeneration: number;
|
|
50
50
|
};
|
|
51
|
-
} | import("./
|
|
51
|
+
} | import("./connection-metadata.js").ConnectionMetadataWithVerification)[]>;
|
|
52
52
|
/** Canonical organization-administrator authentication is supplied by a trusted
|
|
53
53
|
* HTTP adapter. SQL separately rechecks live authority and exact bot identity. */
|
|
54
54
|
export declare function setOrganizationSlackBotAccess(db: Database, input: {
|
package/dist/provision-roles.js
CHANGED
|
@@ -18,24 +18,6 @@ export declare function retainedProviderCommandPersistence(db: Database, scope:
|
|
|
18
18
|
requestCancellation: (reason: "provider_deadline" | "explicit_stop") => Promise<void>;
|
|
19
19
|
cancellationRequested: () => Promise<boolean>;
|
|
20
20
|
load: () => Promise<{
|
|
21
|
-
kind: "modal-control-v1";
|
|
22
|
-
sandboxId: string;
|
|
23
|
-
taskId: string;
|
|
24
|
-
execId: string;
|
|
25
|
-
pty?: boolean | undefined;
|
|
26
|
-
streams: {
|
|
27
|
-
stdout: {
|
|
28
|
-
batchIndex: number;
|
|
29
|
-
utf8Remainder: string;
|
|
30
|
-
exitCode: number | null;
|
|
31
|
-
};
|
|
32
|
-
stderr: {
|
|
33
|
-
batchIndex: number;
|
|
34
|
-
utf8Remainder: string;
|
|
35
|
-
exitCode: number | null;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
} | {
|
|
39
21
|
kind: "modal-router-v1";
|
|
40
22
|
sandboxId: string;
|
|
41
23
|
taskId: string;
|
|
@@ -61,8 +43,7 @@ export declare function retainedProviderCommandPersistence(db: Database, scope:
|
|
|
61
43
|
exitCode: number | null;
|
|
62
44
|
};
|
|
63
45
|
};
|
|
64
|
-
} |
|
|
65
|
-
acknowledge: (command: SandboxProviderCommand) => Promise<{
|
|
46
|
+
} | {
|
|
66
47
|
kind: "modal-control-v1";
|
|
67
48
|
sandboxId: string;
|
|
68
49
|
taskId: string;
|
|
@@ -80,7 +61,8 @@ export declare function retainedProviderCommandPersistence(db: Database, scope:
|
|
|
80
61
|
exitCode: number | null;
|
|
81
62
|
};
|
|
82
63
|
};
|
|
83
|
-
} |
|
|
64
|
+
} | null>;
|
|
65
|
+
acknowledge: (command: SandboxProviderCommand) => Promise<{
|
|
84
66
|
kind: "modal-router-v1";
|
|
85
67
|
sandboxId: string;
|
|
86
68
|
taskId: string;
|
|
@@ -106,6 +88,24 @@ export declare function retainedProviderCommandPersistence(db: Database, scope:
|
|
|
106
88
|
exitCode: number | null;
|
|
107
89
|
};
|
|
108
90
|
};
|
|
91
|
+
} | {
|
|
92
|
+
kind: "modal-control-v1";
|
|
93
|
+
sandboxId: string;
|
|
94
|
+
taskId: string;
|
|
95
|
+
execId: string;
|
|
96
|
+
pty?: boolean | undefined;
|
|
97
|
+
streams: {
|
|
98
|
+
stdout: {
|
|
99
|
+
batchIndex: number;
|
|
100
|
+
utf8Remainder: string;
|
|
101
|
+
exitCode: number | null;
|
|
102
|
+
};
|
|
103
|
+
stderr: {
|
|
104
|
+
batchIndex: number;
|
|
105
|
+
utf8Remainder: string;
|
|
106
|
+
exitCode: number | null;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
109
|
}>;
|
|
110
110
|
reserveInput: (byteLength?: number) => Promise<number>;
|
|
111
111
|
captureRouterPage: (page: RetainedRouterOutputPage) => Promise<{
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
retainedProviderCommandPersistence,
|
|
15
15
|
supervisedCommandProtocolReady,
|
|
16
16
|
validateRouterOutputAdvance
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-W75DRYG3.js";
|
|
18
|
+
import "./chunk-K5MTNKJU.js";
|
|
19
|
+
import "./chunk-JWBEE4CL.js";
|
|
20
|
+
import "./chunk-TODVDGMO.js";
|
|
21
21
|
import "./chunk-4UJCXBR2.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-IT3EYY2C.js";
|
|
23
|
+
import "./chunk-JL6TBB76.js";
|
|
24
24
|
import "./chunk-P7YDM2RI.js";
|
|
25
25
|
import "./chunk-PZ5AY32C.js";
|
|
26
26
|
export {
|
|
@@ -7,7 +7,7 @@ export declare const SLACK_FILE_UPLOAD_OPERATIONS_TABLE = "slack_file_upload_ope
|
|
|
7
7
|
export declare const WORK_CLAIM_CAPABILITY_ROUTINES: readonly ["upsert_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text, text, text, text, text)", "release_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)"];
|
|
8
8
|
export declare const CLAUDE_SUBSCRIPTION_CAPABILITY_ROUTINES: string[];
|
|
9
9
|
export declare const SUBSCRIPTION_ACCOUNT_CAPABILITY_ROUTINES: string[];
|
|
10
|
-
export declare const RUNTIME_TARGET_SCHEMA_CAPABILITY_ROUTINES: readonly [...string[], "open_private_session_create_capability(uuid, uuid, uuid, text)", "open_private_child_session_create_capability(uuid, uuid, uuid, uuid, uuid, uuid, integer)", "close_private_session_create_capability(uuid)", "resolve_session_attempt_personal_resources(uuid, uuid, uuid)", "list_owned_connection_accounts(uuid, uuid)", "accept_turn_personal_resource_attachment(uuid, uuid, uuid, uuid, text, integer, boolean, integer)", "list_self_user_resource_authorities(uuid, uuid, text, uuid, integer)", "issue_self_user_resource_grant(uuid, uuid, uuid, text, text, text, uuid, integer, boolean)", "revoke_self_user_resource_grant(uuid, uuid, uuid)", "authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid)", "preference_registry_create_knowledge_proposal_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, uuid, text, text, text, text, integer, text, jsonb, timestamp with time zone, text)", "create_scoped_variable_set(uuid, uuid, text, text, text, jsonb, boolean)", "list_scoped_variable_sets(uuid, uuid, uuid, text, text)", "count_scoped_variable_sets(uuid, uuid, text)", "mutate_scoped_variable_set(uuid, uuid, uuid, text, text, boolean, text, boolean, text, text, boolean)", "read_scoped_variable_set_secret(uuid, uuid, uuid, text, text, text, uuid, uuid, uuid, integer)", "materialize_scoped_variable_set_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "materialize_scoped_variable_set_for_session(uuid, uuid, uuid, uuid)", "connection_authority_convergence_audit_capability_active(uuid)", "resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text)", "inspect_organization_connection_authority_convergence(uuid, integer, uuid)", "get_self_personal_github_repository_selection(uuid, uuid, text, uuid)", "mutate_self_personal_github_repository_selection(uuid, uuid, text, uuid, bigint, bigint, text, jsonb, boolean)", "create_personal_document_authority(uuid, uuid, uuid)", "resolve_document_original_file(uuid, uuid, text, uuid)", "resolve_session_attempt_personal_document_reads(uuid, uuid, uuid, uuid)", "list_document_authority_reclassifications(uuid, uuid, text, uuid, integer, timestamp with time zone, uuid)", "reclassify_document_authority(jsonb)", "run_document_default_collection_backfill(jsonb)", "list_document_default_collection_backfill_runs(jsonb)", "get_document_default_collection_backfill_audit(jsonb)", "list_organization_document_authority_reclassifications(jsonb)", "create_scoped_rig(uuid, uuid, text, text, text, text, jsonb, boolean)", "list_scoped_rigs(uuid, uuid, uuid, text, text)", "count_scoped_rigs(uuid, uuid, text)", "mutate_scoped_rig(uuid, uuid, uuid, text, text, boolean, text, boolean, boolean)", "finalize_scoped_enrollment(uuid, uuid, text, text, boolean, boolean, text, text, text, boolean)", "list_scoped_enrollments(uuid, uuid, uuid, text)", "get_scoped_sandbox(uuid, uuid, uuid)", "authorize_scoped_sandbox_attach(uuid, uuid, uuid)", "materialize_scoped_rig_version_for_attempt(uuid, uuid, uuid, uuid, uuid, integer)", "authorize_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "assert_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid, boolean)", "list_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "detach_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "freeze_scheduled_task_personal_resources(uuid, uuid, uuid, bigint)", "clone_scheduled_task_personal_resource_authority(uuid, uuid, uuid, bigint, bigint)", "create_scheduled_agent_run_with_admission(uuid, uuid, uuid, uuid, bigint, text, text, text, timestamp with time zone, timestamp with time zone, jsonb)", "materialize_scheduled_task_reusable_session_from_run(uuid, uuid, uuid, uuid, uuid, bigint, text)", "scheduled_task_run_personal_resource_authority(uuid, uuid, uuid)", "scheduled_task_run_connection_authority_subject(uuid, uuid, uuid)", "scheduled_task_personal_resource_authority_subject(uuid, uuid, uuid, bigint)", "record_scheduled_task_revision_authority(uuid, uuid, uuid, bigint)", "clone_scheduled_task_revision_authority(uuid, uuid, uuid, bigint, bigint)", "scheduled_task_revision_authority_subject(uuid, uuid, uuid, bigint)", "scheduled_task_revision_authority_snapshot(uuid, uuid, uuid, bigint)", "validate_scheduled_agent_run_live_authority(uuid, uuid, uuid)", "scheduled_scoped_rig_version_metadata(uuid, uuid, text, uuid, uuid)", "scheduled_variable_set_expected_generation_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "bind_scheduled_task_run_session(uuid, uuid, uuid, uuid)", "transition_scheduled_agent_run(uuid, uuid, uuid, uuid, uuid, text, text)", "mutate_managed_sign_in_method(text, text, jsonb)", "assert_managed_sign_in_recovery(text, text, uuid, jsonb)", "replay_managed_sign_in_method(text, text, jsonb)", "claim_managed_sign_in_notification(uuid, text, text, integer)", "settle_managed_sign_in_notification(uuid, uuid, text)", "ensure_canonical_human_identity(text, text)", "validate_canonical_human_session(text, text, boolean)", "get_canonical_human_identity_projection(text)", "apply_canonical_human_identity_operation(uuid, text, bigint, text, uuid, text, text, text)", "get_canonical_human_exact_login_binding(text, text)", "managed_auth_session_set_authority_state(text)", "managed_auth_session_set_snapshot(text, text, boolean, boolean, boolean)", "managed_auth_session_set_bootstrap(text, text, text, text, uuid, text, bigint, bigint)", "managed_auth_session_set_begin_transaction(text, text, text, uuid, text, bigint, uuid, bigint, text, text, uuid, uuid, text, timestamp with time zone)", "managed_auth_session_set_complete_transaction(text, text, uuid, text, bigint, bigint, uuid, text, text, text)", "managed_auth_session_set_mutate(text, text, uuid, text, bigint, bigint, text, uuid, uuid, uuid, text, text)", "managed_auth_actor_mutation_fence(text, bigint, uuid)", "managed_auth_actor_mutation_lease_acquire(text, bigint, uuid, integer)", "managed_auth_actor_mutation_lease_release(text, uuid)", "managed_auth_actor_mutation_lease_validate(text, bigint, uuid)", "managed_auth_adopted_session_snapshot(text)", "managed_auth_isolated_session_reap(integer)", "managed_auth_expired_session_set_reap(integer)", "managed_auth_session_set_operation_receipt(text, uuid, text, text)", "get_organization_recovery_overview(uuid, text, jsonb, text, text)", "organization_recovery_command(jsonb)", "create_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, integer)", "archive_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "list_task_notes_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, boolean, integer)", "replace_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, uuid, uuid, integer, text, text, integer, text)", "resolve_task_note_knowledge_promotion_source(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text)", "upsert_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text, text, text, text, text)", "release_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "session_private_actor_visible(uuid, uuid, uuid, text)", "session_reference_visible(uuid, uuid, uuid)", "session_visibility_lifecycle_capability_held()", "transition_session_visibility(uuid, uuid, uuid, text, text, integer, text, text, integer)", "xai_subscription_pool_visible(uuid, uuid, text, text, uuid)", "resolve_xai_authority_pool(uuid, uuid, text, jsonb)", "revalidate_xai_subscription_authority(uuid, text, uuid, jsonb)", "xai_provider_account_authority_snapshot_v1_valid(jsonb)"];
|
|
10
|
+
export declare const RUNTIME_TARGET_SCHEMA_CAPABILITY_ROUTINES: readonly ["lock_live_native_original_origin_v2(jsonb)", "modal_native_origin_member_read_active(uuid, text)", ...string[], "open_private_session_create_capability(uuid, uuid, uuid, text)", "open_private_child_session_create_capability(uuid, uuid, uuid, uuid, uuid, uuid, integer)", "close_private_session_create_capability(uuid)", "resolve_session_attempt_personal_resources(uuid, uuid, uuid)", "list_owned_connection_accounts(uuid, uuid)", "accept_turn_personal_resource_attachment(uuid, uuid, uuid, uuid, text, integer, boolean, integer)", "list_self_user_resource_authorities(uuid, uuid, text, uuid, integer)", "issue_self_user_resource_grant(uuid, uuid, uuid, text, text, text, uuid, integer, boolean)", "revoke_self_user_resource_grant(uuid, uuid, uuid)", "authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid)", "preference_registry_create_knowledge_proposal_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, uuid, text, text, text, text, integer, text, jsonb, timestamp with time zone, text)", "create_scoped_variable_set(uuid, uuid, text, text, text, jsonb, boolean)", "list_scoped_variable_sets(uuid, uuid, uuid, text, text)", "count_scoped_variable_sets(uuid, uuid, text)", "mutate_scoped_variable_set(uuid, uuid, uuid, text, text, boolean, text, boolean, text, text, boolean)", "read_scoped_variable_set_secret(uuid, uuid, uuid, text, text, text, uuid, uuid, uuid, integer)", "materialize_scoped_variable_set_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "materialize_scoped_variable_set_for_session(uuid, uuid, uuid, uuid)", "connection_authority_convergence_audit_capability_active(uuid)", "resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text)", "inspect_organization_connection_authority_convergence(uuid, integer, uuid)", "get_self_personal_github_repository_selection(uuid, uuid, text, uuid)", "mutate_self_personal_github_repository_selection(uuid, uuid, text, uuid, bigint, bigint, text, jsonb, boolean)", "create_personal_document_authority(uuid, uuid, uuid)", "resolve_document_original_file(uuid, uuid, text, uuid)", "resolve_session_attempt_personal_document_reads(uuid, uuid, uuid, uuid)", "list_document_authority_reclassifications(uuid, uuid, text, uuid, integer, timestamp with time zone, uuid)", "reclassify_document_authority(jsonb)", "run_document_default_collection_backfill(jsonb)", "list_document_default_collection_backfill_runs(jsonb)", "get_document_default_collection_backfill_audit(jsonb)", "list_organization_document_authority_reclassifications(jsonb)", "create_scoped_rig(uuid, uuid, text, text, text, text, jsonb, boolean)", "list_scoped_rigs(uuid, uuid, uuid, text, text)", "count_scoped_rigs(uuid, uuid, text)", "mutate_scoped_rig(uuid, uuid, uuid, text, text, boolean, text, boolean, boolean)", "finalize_scoped_enrollment(uuid, uuid, text, text, boolean, boolean, text, text, text, boolean)", "list_scoped_enrollments(uuid, uuid, uuid, text)", "get_scoped_sandbox(uuid, uuid, uuid)", "authorize_scoped_sandbox_attach(uuid, uuid, uuid)", "materialize_scoped_rig_version_for_attempt(uuid, uuid, uuid, uuid, uuid, integer)", "authorize_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "assert_session_attempt_personal_machine(uuid, uuid, uuid, uuid, uuid, integer, uuid, boolean)", "list_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "detach_scoped_machine_dependent_sessions(uuid, uuid, uuid)", "freeze_scheduled_task_personal_resources(uuid, uuid, uuid, bigint)", "clone_scheduled_task_personal_resource_authority(uuid, uuid, uuid, bigint, bigint)", "create_scheduled_agent_run_with_admission(uuid, uuid, uuid, uuid, bigint, text, text, text, timestamp with time zone, timestamp with time zone, jsonb)", "materialize_scheduled_task_reusable_session_from_run(uuid, uuid, uuid, uuid, uuid, bigint, text)", "scheduled_task_run_personal_resource_authority(uuid, uuid, uuid)", "scheduled_task_run_connection_authority_subject(uuid, uuid, uuid)", "scheduled_task_personal_resource_authority_subject(uuid, uuid, uuid, bigint)", "record_scheduled_task_revision_authority(uuid, uuid, uuid, bigint)", "clone_scheduled_task_revision_authority(uuid, uuid, uuid, bigint, bigint)", "scheduled_task_revision_authority_subject(uuid, uuid, uuid, bigint)", "scheduled_task_revision_authority_snapshot(uuid, uuid, uuid, bigint)", "validate_scheduled_agent_run_live_authority(uuid, uuid, uuid)", "scheduled_scoped_rig_version_metadata(uuid, uuid, text, uuid, uuid)", "scheduled_variable_set_expected_generation_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid)", "bind_scheduled_task_run_session(uuid, uuid, uuid, uuid)", "transition_scheduled_agent_run(uuid, uuid, uuid, uuid, uuid, text, text)", "mutate_managed_sign_in_method(text, text, jsonb)", "assert_managed_sign_in_recovery(text, text, uuid, jsonb)", "replay_managed_sign_in_method(text, text, jsonb)", "claim_managed_sign_in_notification(uuid, text, text, integer)", "settle_managed_sign_in_notification(uuid, uuid, text)", "ensure_canonical_human_identity(text, text)", "validate_canonical_human_session(text, text, boolean)", "get_canonical_human_identity_projection(text)", "apply_canonical_human_identity_operation(uuid, text, bigint, text, uuid, text, text, text)", "get_canonical_human_exact_login_binding(text, text)", "managed_auth_session_set_authority_state(text)", "managed_auth_session_set_snapshot(text, text, boolean, boolean, boolean)", "managed_auth_session_set_bootstrap(text, text, text, text, uuid, text, bigint, bigint)", "managed_auth_session_set_begin_transaction(text, text, text, uuid, text, bigint, uuid, bigint, text, text, uuid, uuid, text, timestamp with time zone)", "managed_auth_session_set_complete_transaction(text, text, uuid, text, bigint, bigint, uuid, text, text, text)", "managed_auth_session_set_mutate(text, text, uuid, text, bigint, bigint, text, uuid, uuid, uuid, text, text)", "managed_auth_actor_mutation_fence(text, bigint, uuid)", "managed_auth_actor_mutation_lease_acquire(text, bigint, uuid, integer)", "managed_auth_actor_mutation_lease_release(text, uuid)", "managed_auth_actor_mutation_lease_validate(text, bigint, uuid)", "managed_auth_adopted_session_snapshot(text)", "managed_auth_isolated_session_reap(integer)", "managed_auth_expired_session_set_reap(integer)", "managed_auth_session_set_operation_receipt(text, uuid, text, text)", "get_organization_recovery_overview(uuid, text, jsonb, text, text)", "organization_recovery_command(jsonb)", "create_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, integer)", "archive_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "list_task_notes_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, boolean, integer)", "replace_task_note_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, uuid, uuid, integer, text, text, integer, text)", "resolve_task_note_knowledge_promotion_source(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text)", "upsert_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, integer, text, text, text, text, text, text, text)", "release_session_work_claim_for_attempt(uuid, uuid, uuid, uuid, uuid, integer, uuid, uuid, integer, text)", "session_private_actor_visible(uuid, uuid, uuid, text)", "session_reference_visible(uuid, uuid, uuid)", "session_visibility_lifecycle_capability_held()", "transition_session_visibility(uuid, uuid, uuid, text, text, integer, text, text, integer)", "xai_subscription_pool_visible(uuid, uuid, text, text, uuid)", "resolve_xai_authority_pool(uuid, uuid, text, jsonb)", "revalidate_xai_subscription_authority(uuid, text, uuid, jsonb)", "xai_provider_account_authority_snapshot_v1_valid(jsonb)"];
|
|
11
11
|
/**
|
|
12
12
|
* Boolean-only predicates that shared-table RLS policies must be able to
|
|
13
13
|
* evaluate under table owners and SECURITY DEFINER roles unknown at migration
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Database } from "./database.js";
|
|
2
|
+
export declare const INTERACTION_ONLY_IDLE_BUCKETS: readonly ["lt_30m", "30m_2h", "2h_6h", "gte_6h"];
|
|
3
|
+
export type InteractionOnlyIdleBucket = (typeof INTERACTION_ONLY_IDLE_BUCKETS)[number];
|
|
4
|
+
export type InteractionOnlyLeaseCandidate = {
|
|
5
|
+
accountId: string;
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
sandboxGroupId: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function interactionOnlyIdleBucket(idleMs: number): InteractionOnlyIdleBucket;
|
|
10
|
+
/**
|
|
11
|
+
* Read-only inventory of warm leases whose ONLY holders are Browser/Computer
|
|
12
|
+
* interaction holders, bucketed by time since the newest interaction activity
|
|
13
|
+
* (holder heartbeat, controller heartbeat, or last use). Interaction holders
|
|
14
|
+
* deliberately never expire by timestamp, so such a box stays warm until its
|
|
15
|
+
* session ends or the provider deadline; this makes that visible. Candidates
|
|
16
|
+
* come from the sanctioned cross-workspace warm-lease list; each workspace is
|
|
17
|
+
* then read under its own RLS scope. No lock beyond the snapshot is taken.
|
|
18
|
+
*/
|
|
19
|
+
export declare function countInteractionOnlyWarmLeasesByIdle(db: Database, candidates: InteractionOnlyLeaseCandidate[], options?: {
|
|
20
|
+
now?: Date;
|
|
21
|
+
maxWorkspaces?: number;
|
|
22
|
+
}): Promise<Record<InteractionOnlyIdleBucket, number>>;
|
package/dist/schema.js
CHANGED
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
settleConnectedMachineSessionBackgroundCommandWithMutation,
|
|
28
28
|
settleSessionBackgroundCommandForRetainedProcessInTransaction,
|
|
29
29
|
unobservableRetainedProcessOutcomeSql
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-JWBEE4CL.js";
|
|
31
|
+
import "./chunk-TODVDGMO.js";
|
|
32
32
|
import "./chunk-4UJCXBR2.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-IT3EYY2C.js";
|
|
34
|
+
import "./chunk-JL6TBB76.js";
|
|
35
35
|
import "./chunk-P7YDM2RI.js";
|
|
36
36
|
import "./chunk-PZ5AY32C.js";
|
|
37
37
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendSessionCommandOutput
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-K5MTNKJU.js";
|
|
4
|
+
import "./chunk-JWBEE4CL.js";
|
|
5
|
+
import "./chunk-TODVDGMO.js";
|
|
6
6
|
import "./chunk-4UJCXBR2.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-IT3EYY2C.js";
|
|
8
|
+
import "./chunk-JL6TBB76.js";
|
|
9
9
|
import "./chunk-P7YDM2RI.js";
|
|
10
10
|
import "./chunk-PZ5AY32C.js";
|
|
11
11
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listSessionEventSlices,
|
|
3
3
|
readSessionMessageSliceInScope
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-B5C5SBSI.js";
|
|
5
|
+
import "./chunk-IT3EYY2C.js";
|
|
6
|
+
import "./chunk-JL6TBB76.js";
|
|
7
7
|
import "./chunk-P7YDM2RI.js";
|
|
8
8
|
import "./chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connectionMetadataMatchesBinding
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OV5AUIBA.js";
|
|
4
4
|
import {
|
|
5
5
|
lockSessionEventWriteRows,
|
|
6
6
|
organizationApiKeyAllowsWorkspace
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-JWBEE4CL.js";
|
|
8
|
+
import "./chunk-TODVDGMO.js";
|
|
9
9
|
import "./chunk-4UJCXBR2.js";
|
|
10
10
|
import {
|
|
11
11
|
rawRows,
|
|
12
12
|
setSubjectRlsContext,
|
|
13
13
|
withRlsContext
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IT3EYY2C.js";
|
|
15
15
|
import {
|
|
16
16
|
apiKeys,
|
|
17
17
|
sessionCommandReceipts,
|
|
18
18
|
sessionMcpServers,
|
|
19
19
|
sessions
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JL6TBB76.js";
|
|
21
21
|
import "./chunk-P7YDM2RI.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
23
23
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SessionRealtimeModel } from "@opengeni/contracts";
|
|
2
|
+
import { type Database } from "./database.js";
|
|
3
|
+
/** One provider connection of a live-voice mode, bounded by server observation. */
|
|
4
|
+
export type SessionRealtimeBillableConnection = {
|
|
5
|
+
id: string;
|
|
6
|
+
startedAt: Date;
|
|
7
|
+
observedUntil: Date;
|
|
8
|
+
};
|
|
9
|
+
export type SessionRealtimeBillingFacts = {
|
|
10
|
+
accountId: string;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
realtimeId: string;
|
|
14
|
+
model: SessionRealtimeModel;
|
|
15
|
+
ownerSubjectId: string;
|
|
16
|
+
state: "active" | "ended";
|
|
17
|
+
connections: SessionRealtimeBillableConnection[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The last instant the server itself observed the voice owner alive. An
|
|
21
|
+
* explicit owner-proven end is observed at `endedAt`; an expired lease only up
|
|
22
|
+
* to its last heartbeat (late lazy settlement never extends the bill); an
|
|
23
|
+
* active mode up to `now`, bounded by its lease.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sessionRealtimeObservedUntil(mode: {
|
|
26
|
+
state: string;
|
|
27
|
+
endReason: string | null;
|
|
28
|
+
endedAt: Date | null;
|
|
29
|
+
lastHeartbeatAt: Date;
|
|
30
|
+
leaseExpiresAt: Date;
|
|
31
|
+
}, now: Date): Date;
|
|
32
|
+
/**
|
|
33
|
+
* Server-observed lifetime of every provider connection that was actually
|
|
34
|
+
* issued (an SDP answer or a minted client secret was returned). Failed or
|
|
35
|
+
* never-completed negotiations issued nothing billable.
|
|
36
|
+
*/
|
|
37
|
+
export declare function loadSessionRealtimeBillingFacts(db: Database, input: {
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
sessionId: string;
|
|
40
|
+
realtimeId: string;
|
|
41
|
+
now?: Date;
|
|
42
|
+
}): Promise<SessionRealtimeBillingFacts | null>;
|
|
43
|
+
/** Which of these usage idempotency keys are already recorded for the account. */
|
|
44
|
+
export declare function existingUsageEventIdempotencyKeys(db: Database, input: {
|
|
45
|
+
accountId: string;
|
|
46
|
+
workspaceId: string;
|
|
47
|
+
keys: readonly string[];
|
|
48
|
+
}): Promise<Set<string>>;
|
|
@@ -34,11 +34,17 @@ export type RenewSessionRealtimeInput = {
|
|
|
34
34
|
expectedVersion: number;
|
|
35
35
|
now?: Date;
|
|
36
36
|
leaseMs?: number;
|
|
37
|
+
/**
|
|
38
|
+
* False keeps the current lease unchanged (owner still proven). Used when a
|
|
39
|
+
* deployment-funded call ran out of credits: the client drains and ends
|
|
40
|
+
* inside the remaining lease, and an ignoring client lapses on its own.
|
|
41
|
+
*/
|
|
42
|
+
extendLease?: boolean;
|
|
37
43
|
};
|
|
38
|
-
export type EndSessionRealtimeInput = Omit<RenewSessionRealtimeInput, "leaseMs"> & {
|
|
44
|
+
export type EndSessionRealtimeInput = Omit<RenewSessionRealtimeInput, "leaseMs" | "extendLease"> & {
|
|
39
45
|
reason: Extract<SessionRealtimeEndReason, "user_stop" | "browser_unload">;
|
|
40
46
|
};
|
|
41
|
-
export type AssertSessionRealtimeOwnerInput = Omit<RenewSessionRealtimeInput, "leaseMs">;
|
|
47
|
+
export type AssertSessionRealtimeOwnerInput = Omit<RenewSessionRealtimeInput, "leaseMs" | "extendLease">;
|
|
42
48
|
export type SessionRealtimeMutationResult = {
|
|
43
49
|
mode: SessionRealtimeMode;
|
|
44
50
|
replay: boolean;
|
package/dist/session-tenancy.js
CHANGED
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
openPrivateSessionCreateCapability,
|
|
14
14
|
replayAppliedSessionFork,
|
|
15
15
|
transitionSessionVisibility
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-DKFEUGM4.js";
|
|
17
|
+
import "./chunk-IT3EYY2C.js";
|
|
18
|
+
import "./chunk-JL6TBB76.js";
|
|
19
19
|
import "./chunk-P7YDM2RI.js";
|
|
20
20
|
import "./chunk-PZ5AY32C.js";
|
|
21
21
|
export {
|
package/dist/video-generation.js
CHANGED
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
settleVideoGenerationFailure,
|
|
30
30
|
settleVideoGenerationReady,
|
|
31
31
|
updateWorkspaceVideoGenerationPolicy
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-TODVDGMO.js";
|
|
33
33
|
import "./chunk-4UJCXBR2.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-IT3EYY2C.js";
|
|
35
|
+
import "./chunk-JL6TBB76.js";
|
|
36
36
|
import "./chunk-P7YDM2RI.js";
|
|
37
37
|
import "./chunk-PZ5AY32C.js";
|
|
38
38
|
export {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CreditDebitAttribution } from "./credit-debit-attribution.js";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
/** Usage source and credit debit type of deployment-funded voice transcription. */
|
|
4
|
+
export declare const VOICE_TRANSCRIPTION_SOURCE_TYPE = "voice_transcription";
|
|
5
|
+
export declare const VOICE_TRANSCRIPTION_DEBIT_TYPE = "voice_transcription_debit";
|
|
6
|
+
/**
|
|
7
|
+
* Idempotency keys for one settled voice-transcription unit. Both derive from
|
|
8
|
+
* the workspace and the server-built unit id only, so an inline settlement, its
|
|
9
|
+
* in-process retry, and a later reconciliation converge on the same rows.
|
|
10
|
+
*/
|
|
11
|
+
export declare function voiceTranscriptionSettlementKeys(input: {
|
|
12
|
+
workspaceId: string;
|
|
13
|
+
sourceId: string;
|
|
14
|
+
}): {
|
|
15
|
+
usageIdempotencyKey: string;
|
|
16
|
+
debitIdempotencyKey: string;
|
|
17
|
+
};
|
|
18
|
+
export type UnsettledVoiceTranscriptionCharge = {
|
|
19
|
+
sourceId: string;
|
|
20
|
+
amountMicros: number;
|
|
21
|
+
attribution: CreditDebitAttribution;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Voice usage receipts in one workspace whose credit debit never committed
|
|
25
|
+
* (the debit transaction failed after the receipt was durable). Bounded and
|
|
26
|
+
* ordered oldest first; `minAgeMilliseconds` leaves an in-flight inline
|
|
27
|
+
* settlement to finish with its full ledger metadata first. The scan walks the
|
|
28
|
+
* workspace's `model.cost` index range, so the window is short (3 days) and
|
|
29
|
+
* the statement is capped at 2 s; a timeout only defers reconciliation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function listUnsettledVoiceTranscriptionCharges(db: Database, input: {
|
|
32
|
+
accountId: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
limit?: number;
|
|
35
|
+
minAgeMilliseconds?: number;
|
|
36
|
+
}): Promise<UnsettledVoiceTranscriptionCharge[]>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lockWorkspaceInferenceControl
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JWBEE4CL.js";
|
|
4
|
+
import "./chunk-TODVDGMO.js";
|
|
5
5
|
import "./chunk-4UJCXBR2.js";
|
|
6
6
|
import {
|
|
7
7
|
withWorkspaceRls
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-IT3EYY2C.js";
|
|
9
|
+
import "./chunk-JL6TBB76.js";
|
|
10
10
|
import "./chunk-P7YDM2RI.js";
|
|
11
11
|
import "./chunk-PZ5AY32C.js";
|
|
12
12
|
|