@opengeni/db 0.28.1 → 0.31.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/attached-browser-devices.d.ts +42 -0
- package/dist/attempt-tool-catalogs.d.ts +16 -0
- package/dist/browser-auth.d.ts +91 -0
- package/dist/browser-identities.d.ts +128 -0
- package/dist/browser-sessions.d.ts +272 -0
- package/dist/browser-state-artifacts.d.ts +17 -0
- package/dist/capability-components.d.ts +37 -0
- package/dist/capability-integrations.d.ts +192 -0
- package/dist/chunk-F5FT7BEZ.js +3535 -0
- package/dist/chunk-F5FT7BEZ.js.map +1 -0
- package/dist/chunk-ISI2TIUG.js +639 -0
- package/dist/chunk-ISI2TIUG.js.map +1 -0
- package/dist/chunk-MWDVXQOL.js +11639 -0
- package/dist/chunk-MWDVXQOL.js.map +1 -0
- package/dist/chunk-NBE6CHRI.js +955 -0
- package/dist/chunk-NBE6CHRI.js.map +1 -0
- package/dist/{chunk-DBS5HPEW.js → chunk-YHZXQ7HP.js} +760 -11
- package/dist/chunk-YHZXQ7HP.js.map +1 -0
- package/dist/codemode-operations.d.ts +117 -0
- package/dist/codex-token-resolver.d.ts +2 -2
- package/dist/company-profile-schema.d.ts +798 -0
- package/dist/company-profile.d.ts +268 -0
- package/dist/computer-sessions.d.ts +109 -0
- package/dist/connection-token-resolver.d.ts +9 -4
- package/dist/database.d.ts +52 -3
- package/dist/editable-artifact-durable-export.d.ts +153 -0
- package/dist/editable-artifact-durable-export.js +788 -0
- package/dist/editable-artifact-durable-export.js.map +1 -0
- package/dist/editable-artifact-materialization.d.ts +123 -0
- package/dist/editable-artifacts-schema.d.ts +4152 -0
- package/dist/editable-artifacts.d.ts +610 -0
- package/dist/editable-artifacts.js +26 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/environment-crypto.d.ts +8 -4
- package/dist/generated-images.d.ts +139 -0
- package/dist/index.d.ts +958 -126
- package/dist/index.js +31204 -12172
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +51 -4
- package/dist/integration-bindings.d.ts +70 -0
- package/dist/integration-features.d.ts +99 -0
- package/dist/interaction-revisions.d.ts +3 -0
- package/dist/interaction-schema.d.ts +5372 -0
- package/dist/knowledge-source-sync-schema.d.ts +1679 -0
- package/dist/knowledge-source-sync.d.ts +274 -0
- package/dist/lossless-columns.d.ts +58 -0
- package/dist/lossless-json.d.ts +39 -0
- package/dist/memory-domain.d.ts +3 -6
- package/dist/memory-governance.d.ts +2 -2
- package/dist/memory-slack-delivery.d.ts +101 -0
- package/dist/new-session-drafts.d.ts +2 -2
- package/dist/pack-components.d.ts +76 -0
- package/dist/pack-installations.d.ts +86 -0
- package/dist/persistence-errors.d.ts +7 -14
- package/dist/plugin-packages.d.ts +126 -0
- package/dist/preference-registry.d.ts +1 -1
- package/dist/provision-roles.d.ts +9 -1
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +18 -6
- package/dist/schema.d.ts +19122 -8731
- package/dist/schema.js +173 -1
- package/dist/scoped-knowledge.d.ts +97 -1
- package/dist/session-control.d.ts +4 -4
- package/dist/session-queue-commands.d.ts +19 -11
- package/dist/session-realtime-context.d.ts +2 -2
- package/dist/session-realtime-ledger.d.ts +4 -4
- package/dist/session-realtime-mirror.d.ts +2 -2
- package/dist/session-realtime-state.d.ts +1 -1
- package/dist/session-realtime-terminal.d.ts +8 -1
- package/dist/session-realtime.d.ts +7 -7
- package/dist/session-tool-call-settlement.d.ts +1 -1
- package/dist/slack-user-link-access.d.ts +54 -0
- package/dist/transcription-recordings-schema.d.ts +44 -6
- package/dist/transcription-recordings.d.ts +3 -3
- package/dist/turn-initiator.d.ts +2 -2
- package/dist/video-generation.d.ts +216 -0
- package/dist/video-generation.js +66 -0
- package/dist/video-generation.js.map +1 -0
- package/dist/workspace-artifacts.d.ts +1 -1
- package/dist/workspace-instruction-policies.d.ts +1 -1
- package/dist/workspace-learning-policy-schema.d.ts +932 -0
- package/dist/workspace-learning-policy.d.ts +161 -0
- package/drizzle/0065_enrollment_credential_generation.sql +10 -0
- package/drizzle/0140_retained_screenshot_artifacts.sql +192 -0
- package/drizzle/0176_lossless_canonical_json.sql +975 -0
- package/drizzle/0177_session_events_workspace_turn_type_index.sql +5 -0
- package/drizzle/0178_permissioned_secret_reads.sql +14 -0
- package/drizzle/0179_slack_private_shortcut_delivery_gate.sql +85 -0
- package/drizzle/0180_retained_screenshot_lifecycle_fences.sql +273 -0
- package/drizzle/0181_connected_machine_removal.sql +52 -0
- package/drizzle/0182_connected_machine_remove_session_default.sql +77 -0
- package/drizzle/0183_model_call_provider_cost_estimates.sql +39 -0
- package/drizzle/0184_sandbox_drain_teardown_fence.sql +682 -0
- package/drizzle/0185_temporal_schedule_cleanup_outbox.sql +168 -0
- package/drizzle/0186_sandbox_capture_provider_contract.sql +400 -0
- package/drizzle/0187_generated_image_artifacts.sql +173 -0
- package/drizzle/0188_image_generation_retention_failure.sql +25 -0
- package/drizzle/0189_retained_session_image_formats.sql +13 -0
- package/drizzle/0190_timeline_annotations.sql +31 -0
- package/drizzle/0191_editable_artifact_engine.sql +3853 -0
- package/drizzle/0192_editable_artifact_live_tickets.sql +338 -0
- package/drizzle/0193_editable_artifact_authorization.sql +190 -0
- package/drizzle/0194_editable_artifact_durable_exports.sql +160 -0
- package/drizzle/0195_editable_artifact_import_authorization.sql +203 -0
- package/drizzle/0196_rig_provider_images.sql +152 -0
- package/drizzle/0197_knowledge_source_sync_schedules.sql +523 -0
- package/drizzle/0198_memory_slack_publication_delivery.sql +393 -0
- package/drizzle/0199_workspace_learning_policy.sql +980 -0
- package/drizzle/0201_company_profile_authority.sql +849 -0
- package/drizzle/0202_document_index_checkpoints.sql +85 -0
- package/drizzle/0203_durable_video_generation.sql +353 -0
- package/drizzle/0204_video_generation_funding.sql +44 -0
- package/drizzle/0205_attempt_tool_catalogs.sql +230 -0
- package/drizzle/0206_browser_sessions.sql +646 -0
- package/drizzle/0207_browser_identities.sql +379 -0
- package/drizzle/0208_attached_browser_devices.sql +165 -0
- package/drizzle/0209_computer_sessions.sql +575 -0
- package/drizzle/0210_browser_auth_network_interventions.sql +441 -0
- package/drizzle/0211_editable_artifact_session_links.sql +58 -0
- package/drizzle/0212_slack_installation_bindings.sql +348 -0
- package/drizzle/0213_slack_user_link_access_requests.sql +177 -0
- package/drizzle/0214_session_activity_commit_gate.sql +262 -0
- package/drizzle/0215_capabilities_platform.sql +980 -0
- package/drizzle/0216_pack_component_ownership.sql +235 -0
- package/drizzle/0217_capability_definition_delete_authority.sql +32 -0
- package/package.json +18 -5
- package/src/attached-browser-devices.ts +371 -0
- package/src/attempt-tool-catalogs.ts +131 -0
- package/src/browser-auth.ts +1896 -0
- package/src/browser-identities.ts +1168 -0
- package/src/browser-sessions.ts +2005 -0
- package/src/browser-state-artifacts.ts +59 -0
- package/src/capability-components.ts +166 -0
- package/src/capability-integrations.ts +1663 -0
- package/src/codemode-operations.ts +674 -0
- package/src/company-profile-schema.ts +143 -0
- package/src/company-profile.ts +968 -0
- package/src/computer-sessions.ts +1130 -0
- package/src/connection-token-resolver.ts +270 -25
- package/src/database.ts +434 -24
- package/src/editable-artifact-durable-export.ts +1201 -0
- package/src/editable-artifact-materialization.ts +893 -0
- package/src/editable-artifacts-schema.ts +879 -0
- package/src/editable-artifacts.ts +5404 -0
- package/src/environment-crypto.ts +22 -9
- package/src/generated-images.ts +740 -0
- package/src/index.ts +10117 -2730
- package/src/insights.ts +160 -13
- package/src/integration-bindings.ts +455 -0
- package/src/integration-features.ts +859 -0
- package/src/interaction-revisions.ts +40 -0
- package/src/interaction-schema.ts +1303 -0
- package/src/knowledge-source-sync-schema.ts +192 -0
- package/src/knowledge-source-sync.ts +1922 -0
- package/src/lossless-columns.ts +35 -0
- package/src/lossless-json.ts +322 -0
- package/src/memory-domain.ts +5 -44
- package/src/memory-slack-delivery.ts +801 -0
- package/src/pack-components.ts +954 -0
- package/src/pack-installations.ts +929 -0
- package/src/persistence-errors.ts +26 -34
- package/src/plugin-packages.ts +1186 -0
- package/src/provision-roles.ts +302 -1
- package/src/runtime-posture-cli.ts +9 -0
- package/src/runtime-posture.ts +514 -5
- package/src/schema.ts +5177 -2957
- package/src/scoped-knowledge-schema.ts +1 -1
- package/src/scoped-knowledge.ts +655 -3
- package/src/session-control.ts +133 -81
- package/src/session-queue-commands.ts +511 -247
- package/src/session-realtime-context.ts +20 -7
- package/src/session-realtime-ledger.ts +32 -10
- package/src/session-realtime-mirror.ts +4 -2
- package/src/session-realtime-terminal.ts +89 -21
- package/src/session-realtime.ts +10 -9
- package/src/session-tool-call-settlement.ts +38 -15
- package/src/slack-user-link-access.ts +702 -0
- package/src/transcription-recordings-schema.ts +5 -2
- package/src/transcription-recordings.ts +70 -40
- package/src/video-generation.ts +1452 -0
- package/src/workspace-learning-policy-schema.ts +139 -0
- package/src/workspace-learning-policy.ts +595 -0
- package/dist/chunk-DBS5HPEW.js.map +0 -1
- package/dist/chunk-HT5T62CC.js +0 -6803
- package/dist/chunk-HT5T62CC.js.map +0 -1
- package/dist/event-payload-sanitizer.d.ts +0 -32
- package/src/event-payload-sanitizer.ts +0 -377
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { sql } from "drizzle-orm";
|
|
2
|
+
import { losslessCodecVersion, losslessText } from "./lossless-columns";
|
|
2
3
|
import {
|
|
3
4
|
boolean,
|
|
4
5
|
check,
|
|
@@ -51,7 +52,8 @@ export const transcriptionRecordings = pgTable(
|
|
|
51
52
|
totalDurationMilliseconds: integer("total_duration_milliseconds").notNull().default(0),
|
|
52
53
|
segmentCount: integer("segment_count").notNull().default(0),
|
|
53
54
|
completedSegmentCount: integer("completed_segment_count").notNull().default(0),
|
|
54
|
-
transcriptText:
|
|
55
|
+
transcriptText: losslessText("transcript_text"),
|
|
56
|
+
transcriptTextCodecVersion: losslessCodecVersion("transcript_text_codec_version"),
|
|
55
57
|
languages: jsonb("languages").$type<string[]>().notNull().default([]),
|
|
56
58
|
errorCode: text("error_code"),
|
|
57
59
|
retryable: boolean("retryable").notNull().default(false),
|
|
@@ -209,7 +211,8 @@ export const transcriptionRecordingSegments = pgTable(
|
|
|
209
211
|
attemptId: uuid("attempt_id"),
|
|
210
212
|
attemptStartedAt: timestamp("attempt_started_at", { withTimezone: true }),
|
|
211
213
|
attemptDeadlineAt: timestamp("attempt_deadline_at", { withTimezone: true }),
|
|
212
|
-
transcriptText:
|
|
214
|
+
transcriptText: losslessText("transcript_text"),
|
|
215
|
+
transcriptTextCodecVersion: losslessCodecVersion("transcript_text_codec_version"),
|
|
213
216
|
languages: jsonb("languages").$type<string[]>().notNull().default([]),
|
|
214
217
|
providerId: text("provider_id"),
|
|
215
218
|
errorCode: text("error_code"),
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
import { and, asc, desc, eq, gt, inArray, isNull, ne, or, sql } from "drizzle-orm";
|
|
8
8
|
import type { Database } from "./database";
|
|
9
9
|
import { withWorkspaceSubjectRls } from "./database";
|
|
10
|
+
import { fromPostgresLosslessText, withLosslessContentWriteVersion } from "./lossless-json";
|
|
10
11
|
import * as schema from "./schema";
|
|
11
12
|
|
|
12
13
|
type RecordingRow = typeof schema.transcriptionRecordings.$inferSelect;
|
|
@@ -107,7 +108,10 @@ function recordingFromRow(row: RecordingRow): TranscriptionRecording {
|
|
|
107
108
|
totalDurationMilliseconds: row.totalDurationMilliseconds,
|
|
108
109
|
segmentCount: row.segmentCount,
|
|
109
110
|
completedSegmentCount: row.completedSegmentCount,
|
|
110
|
-
transcriptText:
|
|
111
|
+
transcriptText:
|
|
112
|
+
row.transcriptText === null
|
|
113
|
+
? null
|
|
114
|
+
: fromPostgresLosslessText(row.transcriptText, row.transcriptTextCodecVersion),
|
|
111
115
|
languages: languages(row.languages),
|
|
112
116
|
errorCode: (row.errorCode as TranscriptionRecordingErrorCode | null) ?? null,
|
|
113
117
|
retryable: row.retryable,
|
|
@@ -580,20 +584,26 @@ export async function claimTranscriptionRecordingAssembly(
|
|
|
580
584
|
const now = new Date();
|
|
581
585
|
const [updated] = await scopedDb
|
|
582
586
|
.update(schema.transcriptionRecordings)
|
|
583
|
-
.set(
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
587
|
+
.set(
|
|
588
|
+
withLosslessContentWriteVersion(
|
|
589
|
+
{
|
|
590
|
+
state: "segmenting",
|
|
591
|
+
processingGeneration: generation,
|
|
592
|
+
processingOwner: input.owner,
|
|
593
|
+
processingStartedAt: now,
|
|
594
|
+
segmentCount: 0,
|
|
595
|
+
completedSegmentCount: 0,
|
|
596
|
+
transcriptText: null,
|
|
597
|
+
languages: [],
|
|
598
|
+
errorCode: null,
|
|
599
|
+
retryable: false,
|
|
600
|
+
objectsCleanedAt: null,
|
|
601
|
+
updatedAt: now,
|
|
602
|
+
},
|
|
603
|
+
"transcriptText",
|
|
604
|
+
"transcriptTextCodecVersion",
|
|
605
|
+
),
|
|
606
|
+
)
|
|
597
607
|
.where(eq(schema.transcriptionRecordings.id, input.recordingId))
|
|
598
608
|
.returning();
|
|
599
609
|
if (!updated) throw new TranscriptionRecordingStateError("Assembly claim was lost");
|
|
@@ -1060,11 +1070,19 @@ export async function startTranscriptionRecordingSegmentProviderCall(
|
|
|
1060
1070
|
}
|
|
1061
1071
|
|
|
1062
1072
|
export function assembleTranscriptionSegments(
|
|
1063
|
-
segments: readonly Pick<SegmentRow, "segmentNumber" | "transcriptText" | "languages">
|
|
1073
|
+
segments: readonly (Pick<SegmentRow, "segmentNumber" | "transcriptText" | "languages"> &
|
|
1074
|
+
Partial<Pick<SegmentRow, "transcriptTextCodecVersion">>)[],
|
|
1064
1075
|
): { text: string; languages: string[] } {
|
|
1065
1076
|
const ordered = [...segments].sort((left, right) => left.segmentNumber - right.segmentNumber);
|
|
1066
1077
|
const text = ordered
|
|
1067
|
-
.map((segment) =>
|
|
1078
|
+
.map((segment) =>
|
|
1079
|
+
segment.transcriptText === null
|
|
1080
|
+
? ""
|
|
1081
|
+
: fromPostgresLosslessText(
|
|
1082
|
+
segment.transcriptText,
|
|
1083
|
+
segment.transcriptTextCodecVersion,
|
|
1084
|
+
).trim(),
|
|
1085
|
+
)
|
|
1068
1086
|
.filter(Boolean)
|
|
1069
1087
|
.join("\n\n");
|
|
1070
1088
|
const seen = new Set<string>();
|
|
@@ -1106,18 +1124,24 @@ export async function completeTranscriptionRecordingSegment(
|
|
|
1106
1124
|
const now = new Date();
|
|
1107
1125
|
const [completed] = await scopedDb
|
|
1108
1126
|
.update(schema.transcriptionRecordingSegments)
|
|
1109
|
-
.set(
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1127
|
+
.set(
|
|
1128
|
+
withLosslessContentWriteVersion(
|
|
1129
|
+
{
|
|
1130
|
+
state: "complete",
|
|
1131
|
+
attemptId: null,
|
|
1132
|
+
attemptStartedAt: null,
|
|
1133
|
+
attemptDeadlineAt: null,
|
|
1134
|
+
transcriptText: input.text,
|
|
1135
|
+
languages: input.languages,
|
|
1136
|
+
providerId: input.providerId,
|
|
1137
|
+
errorCode: null,
|
|
1138
|
+
retryable: false,
|
|
1139
|
+
updatedAt: now,
|
|
1140
|
+
},
|
|
1141
|
+
"transcriptText",
|
|
1142
|
+
"transcriptTextCodecVersion",
|
|
1143
|
+
),
|
|
1144
|
+
)
|
|
1121
1145
|
.where(
|
|
1122
1146
|
and(
|
|
1123
1147
|
eq(schema.transcriptionRecordingSegments.recordingId, input.recordingId),
|
|
@@ -1138,17 +1162,23 @@ export async function completeTranscriptionRecordingSegment(
|
|
|
1138
1162
|
const assembled = allComplete ? assembleTranscriptionSegments(segments) : null;
|
|
1139
1163
|
const [updated] = await scopedDb
|
|
1140
1164
|
.update(schema.transcriptionRecordings)
|
|
1141
|
-
.set(
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1165
|
+
.set(
|
|
1166
|
+
withLosslessContentWriteVersion(
|
|
1167
|
+
{
|
|
1168
|
+
state: allComplete ? "complete" : "ready",
|
|
1169
|
+
completedSegmentCount: completedCount,
|
|
1170
|
+
transcriptText: assembled?.text ?? null,
|
|
1171
|
+
languages: assembled?.languages ?? [],
|
|
1172
|
+
processingOwner: null,
|
|
1173
|
+
processingStartedAt: null,
|
|
1174
|
+
errorCode: null,
|
|
1175
|
+
retryable: false,
|
|
1176
|
+
updatedAt: now,
|
|
1177
|
+
},
|
|
1178
|
+
"transcriptText",
|
|
1179
|
+
"transcriptTextCodecVersion",
|
|
1180
|
+
),
|
|
1181
|
+
)
|
|
1152
1182
|
.where(
|
|
1153
1183
|
and(
|
|
1154
1184
|
eq(schema.transcriptionRecordings.id, input.recordingId),
|