@opengeni/db 0.28.9 → 0.36.0
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 +299 -0
- package/dist/browser-downloads.d.ts +51 -0
- package/dist/browser-identities.d.ts +137 -0
- package/dist/browser-sessions.d.ts +354 -0
- package/dist/browser-state-artifacts.d.ts +91 -0
- package/dist/canonical-human-identities.d.ts +48 -0
- package/dist/canonical-human-identities.js +28 -0
- package/dist/canonical-human-identities.js.map +1 -0
- package/dist/capability-components.d.ts +37 -0
- package/dist/capability-integrations.d.ts +194 -0
- package/dist/chunk-5KTIEDX7.js +13200 -0
- package/dist/chunk-5KTIEDX7.js.map +1 -0
- package/dist/chunk-CQZ4QSP5.js +995 -0
- package/dist/chunk-CQZ4QSP5.js.map +1 -0
- package/dist/chunk-F32YT7MP.js +117 -0
- package/dist/chunk-F32YT7MP.js.map +1 -0
- package/dist/chunk-JC5QPLUM.js +666 -0
- package/dist/chunk-JC5QPLUM.js.map +1 -0
- package/dist/chunk-P3RE4D2B.js +3535 -0
- package/dist/chunk-P3RE4D2B.js.map +1 -0
- package/dist/chunk-TAUTWOS5.js +259 -0
- package/dist/chunk-TAUTWOS5.js.map +1 -0
- package/dist/chunk-VKLB2ZGI.js +2389 -0
- package/dist/chunk-VKLB2ZGI.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 +57 -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/generated-images.d.ts +139 -0
- package/dist/index.d.ts +1122 -126
- package/dist/index.js +42329 -18407
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +73 -10
- package/dist/integration-bindings.d.ts +70 -0
- package/dist/integration-facets.d.ts +99 -0
- package/dist/interaction-revisions.d.ts +14 -0
- package/dist/interaction-schema.d.ts +6036 -0
- package/dist/knowledge-source-sync-schema.d.ts +1679 -0
- package/dist/knowledge-source-sync.d.ts +274 -0
- 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 +3 -3
- 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 +19 -6
- package/dist/schema.d.ts +22654 -9359
- package/dist/schema.js +209 -3
- package/dist/scoped-knowledge.d.ts +97 -1
- package/dist/session-control.d.ts +33 -7
- 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 +1 -1
- package/dist/session-realtime.d.ts +7 -7
- package/dist/session-tenancy.d.ts +44 -0
- package/dist/session-tenancy.js +16 -0
- package/dist/session-tenancy.js.map +1 -0
- package/dist/session-tool-call-settlement.d.ts +1 -1
- package/dist/slack-task-policy-schema.d.ts +847 -0
- package/dist/slack-task-policy.d.ts +65 -0
- package/dist/slack-user-link-access.d.ts +54 -0
- package/dist/task-notes-schema.d.ts +924 -0
- package/dist/task-notes.d.ts +85 -0
- package/dist/transcription-recordings.d.ts +2 -2
- package/dist/turn-initiator.d.ts +2 -2
- package/dist/video-generation.d.ts +225 -0
- package/dist/video-generation.js +68 -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/dist/xai-subscription.d.ts +326 -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_browser_state_transfer_hardening.sql +560 -0
- package/drizzle/0212_slack_installation_bindings.sql +348 -0
- package/drizzle/0213_browser_interaction_authority.sql +67 -0
- package/drizzle/0213_slack_user_link_access_requests.sql +177 -0
- package/drizzle/0214_browser_download_saves.sql +34 -0
- package/drizzle/0214_session_activity_commit_gate.sql +262 -0
- package/drizzle/0215_browser_controller_host.sql +385 -0
- package/drizzle/0215_capabilities_platform.sql +980 -0
- package/drizzle/0216_browser_auth_health_evidence.sql +137 -0
- package/drizzle/0216_pack_component_ownership.sql +235 -0
- package/drizzle/0217_capability_definition_delete_authority.sql +32 -0
- package/drizzle/0217_external_browser_auth_operations.sql +22 -0
- package/drizzle/0218_organization_tenancy_foundation.sql +299 -0
- package/drizzle/0219_organization_tenancy_managed_human_provisioning.sql +317 -0
- package/drizzle/0219_site_auth_maintenance_sessions.sql +234 -0
- package/drizzle/0220_memory_slack_append_only_cascade.sql +38 -0
- package/drizzle/0220_session_channels.sql +54 -0
- package/drizzle/0221_sessions_channel_index.sql +5 -0
- package/drizzle/0222_session_visibility_authority_epochs.sql +158 -0
- package/drizzle/0222_sessions_channel_fk.sql +89 -0
- package/drizzle/0223_pending_tool_event_output.sql +55 -0
- package/drizzle/0223_sessions_channel_fk_validate.sql +118 -0
- package/drizzle/0224_slack_post_outcome_reconciliation.sql +123 -0
- package/drizzle/0225_session_visibility_fork_activation.sql +1363 -0
- package/drizzle/0226_personal_codex_authority_foundation.sql +365 -0
- package/drizzle/0227_slack_native_actions.sql +145 -0
- package/drizzle/0228_interaction_controller_data_plane.sql +14 -0
- package/drizzle/0228_slack_task_policy.sql +400 -0
- package/drizzle/0229_slack_inbox_file_fact.sql +10 -0
- package/drizzle/0230_user_scoped_variable_sets_rigs.sql +84 -0
- package/drizzle/0231_integration_definition_identity_cutover.sql +271 -0
- package/drizzle/0232_integration_facet_authority_cutover.sql +610 -0
- package/drizzle/0233_skill_and_integration_authority_cutover.sql +1162 -0
- package/drizzle/0234_xai_subscription_authority.sql +1139 -0
- package/drizzle/0235_canonical_human_login_bindings.sql +920 -0
- package/drizzle/0236_browser_identity_lifecycle.sql +39 -0
- package/drizzle/0236_session_visibility_slack_policy.sql +72 -0
- package/drizzle/0237_interaction_transition_reaper.sql +263 -0
- package/drizzle/0238_goal_persistence_policy.sql +471 -0
- package/drizzle/0238_supergrok_realtime_model.sql +29 -0
- package/drizzle/0239_supergrok_video_funding.sql +50 -0
- package/drizzle/0239_task_tree_notes.sql +990 -0
- package/package.json +26 -5
- package/src/attached-browser-devices.ts +371 -0
- package/src/attempt-tool-catalogs.ts +131 -0
- package/src/browser-auth.ts +4373 -0
- package/src/browser-downloads.ts +517 -0
- package/src/browser-identities.ts +1385 -0
- package/src/browser-sessions.ts +2294 -0
- package/src/browser-state-artifacts.ts +449 -0
- package/src/canonical-human-identities.ts +317 -0
- package/src/capability-components.ts +166 -0
- package/src/capability-integrations.ts +1571 -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 +468 -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/generated-images.ts +740 -0
- package/src/index.ts +9963 -1465
- package/src/insights.ts +251 -23
- package/src/integration-bindings.ts +455 -0
- package/src/integration-facets.ts +862 -0
- package/src/interaction-revisions.ts +70 -0
- package/src/interaction-schema.ts +1606 -0
- package/src/knowledge-source-sync-schema.ts +192 -0
- package/src/knowledge-source-sync.ts +1922 -0
- package/src/memory-slack-delivery.ts +801 -0
- package/src/pack-components.ts +954 -0
- package/src/pack-installations.ts +886 -0
- package/src/persistence-errors.ts +4 -7
- package/src/plugin-packages.ts +1186 -0
- package/src/provision-roles.ts +534 -1
- package/src/runtime-posture-cli.ts +9 -0
- package/src/runtime-posture.ts +721 -5
- package/src/schema.ts +6270 -3159
- package/src/scoped-knowledge-schema.ts +1 -1
- package/src/scoped-knowledge.ts +655 -3
- package/src/session-control.ts +130 -42
- package/src/session-queue-commands.ts +265 -15
- package/src/session-realtime-context.ts +2 -2
- package/src/session-realtime-ledger.ts +3 -3
- package/src/session-realtime.ts +7 -7
- package/src/session-tenancy.ts +188 -0
- package/src/session-tool-call-settlement.ts +18 -3
- package/src/slack-task-policy-schema.ts +130 -0
- package/src/slack-task-policy.ts +341 -0
- package/src/slack-user-link-access.ts +702 -0
- package/src/task-notes-schema.ts +135 -0
- package/src/task-notes.ts +178 -0
- package/src/video-generation.ts +1530 -0
- package/src/workspace-artifacts.ts +1 -1
- package/src/workspace-learning-policy-schema.ts +139 -0
- package/src/workspace-learning-policy.ts +595 -0
- package/src/xai-subscription.ts +1887 -0
- package/dist/chunk-P6CUHXQZ.js +0 -7248
- package/dist/chunk-P6CUHXQZ.js.map +0 -1
- package/dist/chunk-VHBFHMPC.js +0 -1219
- package/dist/chunk-VHBFHMPC.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type TaskNoteKind as TaskNoteKindType } from "@opengeni/contracts";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
export type TaskNoteAttemptClaims = {
|
|
4
|
+
accountId: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
turnId: string;
|
|
8
|
+
attemptId: string;
|
|
9
|
+
executionGeneration: number;
|
|
10
|
+
};
|
|
11
|
+
export type CreateTaskNoteInput = TaskNoteAttemptClaims & {
|
|
12
|
+
operationId: string;
|
|
13
|
+
kind: TaskNoteKindType;
|
|
14
|
+
text: string;
|
|
15
|
+
expiresInDays: number;
|
|
16
|
+
};
|
|
17
|
+
export type ArchiveTaskNoteInput = TaskNoteAttemptClaims & {
|
|
18
|
+
operationId: string;
|
|
19
|
+
noteId: string;
|
|
20
|
+
expectedVersion: number;
|
|
21
|
+
reason: string;
|
|
22
|
+
};
|
|
23
|
+
export type ListTaskNotesInput = TaskNoteAttemptClaims & {
|
|
24
|
+
includeArchived?: boolean;
|
|
25
|
+
limit?: number;
|
|
26
|
+
};
|
|
27
|
+
export declare function createTaskNote(db: Database, input: CreateTaskNoteInput): Promise<{
|
|
28
|
+
note: {
|
|
29
|
+
id: string;
|
|
30
|
+
rootSessionId: string;
|
|
31
|
+
kind: "artifact" | "blocker" | "decision" | "finding" | "handoff" | "ownership";
|
|
32
|
+
text: string;
|
|
33
|
+
status: "active" | "archived";
|
|
34
|
+
version: number;
|
|
35
|
+
expiresAt: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
archivedAt: string | null;
|
|
39
|
+
provenance: {
|
|
40
|
+
actorKind: "human" | "service";
|
|
41
|
+
sourceSessionId: string;
|
|
42
|
+
sourceTurnId: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
replayed: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function archiveTaskNote(db: Database, input: ArchiveTaskNoteInput): Promise<{
|
|
48
|
+
note: {
|
|
49
|
+
id: string;
|
|
50
|
+
rootSessionId: string;
|
|
51
|
+
kind: "artifact" | "blocker" | "decision" | "finding" | "handoff" | "ownership";
|
|
52
|
+
text: string;
|
|
53
|
+
status: "active" | "archived";
|
|
54
|
+
version: number;
|
|
55
|
+
expiresAt: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
archivedAt: string | null;
|
|
59
|
+
provenance: {
|
|
60
|
+
actorKind: "human" | "service";
|
|
61
|
+
sourceSessionId: string;
|
|
62
|
+
sourceTurnId: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
replayed: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
export declare function listTaskNotes(db: Database, input: ListTaskNotesInput): Promise<{
|
|
68
|
+
notes: {
|
|
69
|
+
id: string;
|
|
70
|
+
rootSessionId: string;
|
|
71
|
+
kind: "artifact" | "blocker" | "decision" | "finding" | "handoff" | "ownership";
|
|
72
|
+
text: string;
|
|
73
|
+
status: "active" | "archived";
|
|
74
|
+
version: number;
|
|
75
|
+
expiresAt: string;
|
|
76
|
+
createdAt: string;
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
archivedAt: string | null;
|
|
79
|
+
provenance: {
|
|
80
|
+
actorKind: "human" | "service";
|
|
81
|
+
sourceSessionId: string;
|
|
82
|
+
sourceTurnId: string;
|
|
83
|
+
};
|
|
84
|
+
}[];
|
|
85
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TranscriptionRecording, TranscriptionRecordingErrorCode, TranscriptionRecordingResponse } from "@opengeni/contracts";
|
|
2
|
-
import type { Database } from "./database";
|
|
3
|
-
import * as schema from "./schema";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
import * as schema from "./schema.js";
|
|
4
4
|
type ChunkRow = typeof schema.transcriptionRecordingChunks.$inferSelect;
|
|
5
5
|
type SegmentRow = typeof schema.transcriptionRecordingSegments.$inferSelect;
|
|
6
6
|
export declare class TranscriptionRecordingNotFoundError extends Error {
|
package/dist/turn-initiator.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TurnInitiator, type TurnInitiatorContext } from "@opengeni/contracts";
|
|
2
|
-
import type { Database } from "./database";
|
|
3
|
-
import type { SessionCommandActor } from "./session-control";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
import type { SessionCommandActor } from "./session-control.js";
|
|
4
4
|
export declare const UNATTRIBUTED_LEGACY_INITIATOR: TurnInitiator;
|
|
5
5
|
export type FrozenTurnInitiator = {
|
|
6
6
|
initiator: TurnInitiator;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { type GeneratedVideoFacts, type MediaGenerationResult, type VideoGenerationFundingSource, type VideoGenerationPolicy as VideoGenerationPolicyValue } from "@opengeni/contracts";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
import * as schema from "./schema.js";
|
|
4
|
+
export declare const ACTIVE_VIDEO_GENERATION_STATUSES: readonly ["preparing", "prepared", "accepted", "submission_uncertain", "provider_started", "retaining"];
|
|
5
|
+
export type VideoGenerationOperation = typeof schema.videoGenerationOperations.$inferSelect;
|
|
6
|
+
export type VideoGenerationReference = typeof schema.videoGenerationReferences.$inferSelect;
|
|
7
|
+
export type GeneratedVideoArtifact = typeof schema.generatedVideoArtifacts.$inferSelect;
|
|
8
|
+
export type VideoGenerationOperationWithReferences = VideoGenerationOperation & {
|
|
9
|
+
references: VideoGenerationReference[];
|
|
10
|
+
};
|
|
11
|
+
export declare class VideoGenerationConflictError extends Error {
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class VideoGenerationCapacityError extends Error {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
17
|
+
export declare class VideoGenerationCreditError extends Error {
|
|
18
|
+
constructor(message?: string);
|
|
19
|
+
}
|
|
20
|
+
export declare function getWorkspaceVideoGenerationPolicy(db: Database, workspaceId: string): Promise<VideoGenerationPolicyValue>;
|
|
21
|
+
export declare function updateWorkspaceVideoGenerationPolicy(db: Database, input: {
|
|
22
|
+
accountId: string;
|
|
23
|
+
workspaceId: string;
|
|
24
|
+
subjectId: string;
|
|
25
|
+
expectedRevision: number;
|
|
26
|
+
fundingSource: VideoGenerationFundingSource;
|
|
27
|
+
enabledModelIds: string[];
|
|
28
|
+
defaultModelId: string | null;
|
|
29
|
+
}): Promise<VideoGenerationPolicyValue>;
|
|
30
|
+
export type AdmitVideoGenerationOperationInput = {
|
|
31
|
+
id: string;
|
|
32
|
+
accountId: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
sessionId: string;
|
|
35
|
+
turnId: string;
|
|
36
|
+
attemptId: string;
|
|
37
|
+
toolCallId: string;
|
|
38
|
+
admissionKey: string;
|
|
39
|
+
requestDigest: string;
|
|
40
|
+
promptDigest: string;
|
|
41
|
+
requestEncrypted: string;
|
|
42
|
+
modelId: string;
|
|
43
|
+
sourceMode: string;
|
|
44
|
+
capabilityRevision: string;
|
|
45
|
+
policyRevision: number;
|
|
46
|
+
fundingSource: VideoGenerationFundingSource;
|
|
47
|
+
pricedCostMicros: number;
|
|
48
|
+
connectionId: string | null;
|
|
49
|
+
credentialVersion: number;
|
|
50
|
+
credentialEncrypted: string;
|
|
51
|
+
providerIdempotencyKey: string;
|
|
52
|
+
expectedArtifactId: string;
|
|
53
|
+
expectedFileId: string;
|
|
54
|
+
reservedBytes?: number;
|
|
55
|
+
workspaceQuotaBytes: number;
|
|
56
|
+
maxConcurrentPerWorkspace: number;
|
|
57
|
+
recoveryDeadlineAt: Date;
|
|
58
|
+
references: Array<{
|
|
59
|
+
ordinal: number;
|
|
60
|
+
role: string;
|
|
61
|
+
contentType: string;
|
|
62
|
+
sizeBytes: number;
|
|
63
|
+
sha256: string;
|
|
64
|
+
stagingObjectKey: string;
|
|
65
|
+
grantExpiresAt?: Date | null;
|
|
66
|
+
cleanupAfter: Date;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
export declare function admitVideoGenerationOperation(db: Database, input: AdmitVideoGenerationOperationInput): Promise<{
|
|
70
|
+
operation: VideoGenerationOperation;
|
|
71
|
+
created: boolean;
|
|
72
|
+
}>;
|
|
73
|
+
/** Persist a rotated provider token before it is used for another remote call. */
|
|
74
|
+
export declare function rotateVideoGenerationCredential(db: Database, input: {
|
|
75
|
+
accountId: string;
|
|
76
|
+
workspaceId: string;
|
|
77
|
+
operationId: string;
|
|
78
|
+
requestDigest: string;
|
|
79
|
+
expectedCredentialEncrypted: string;
|
|
80
|
+
credentialEncrypted: string;
|
|
81
|
+
}): Promise<VideoGenerationOperation>;
|
|
82
|
+
/**
|
|
83
|
+
* Seal a reference-bearing operation only after every immutable staging object
|
|
84
|
+
* has been uploaded and independently verified by the worker. The source
|
|
85
|
+
* sandbox path is intentionally not stored, so a failed preparation can only
|
|
86
|
+
* be retried by the same logical tool call while its sandbox still exists.
|
|
87
|
+
*/
|
|
88
|
+
export declare function markVideoGenerationPrepared(db: Database, input: OperationMutationInput): Promise<VideoGenerationOperation>;
|
|
89
|
+
/** Final authorization fence. Call only after the accepted function output is durable. */
|
|
90
|
+
export declare function markVideoGenerationAccepted(db: Database, input: {
|
|
91
|
+
accountId: string;
|
|
92
|
+
workspaceId: string;
|
|
93
|
+
operationId: string;
|
|
94
|
+
requestDigest: string;
|
|
95
|
+
}): Promise<VideoGenerationOperation>;
|
|
96
|
+
/**
|
|
97
|
+
* Transactional half of acceptance. The pending function result and this
|
|
98
|
+
* transition must commit together: the provider reconciler never observes an
|
|
99
|
+
* accepted operation whose model-visible `accepted` receipt was lost.
|
|
100
|
+
*/
|
|
101
|
+
export declare function markVideoGenerationAcceptedInTransaction(tx: Database, input: {
|
|
102
|
+
workspaceId: string;
|
|
103
|
+
operation: VideoGenerationOperation;
|
|
104
|
+
toolCallId?: string;
|
|
105
|
+
}): Promise<VideoGenerationOperation>;
|
|
106
|
+
export declare function cancelVideoGenerationBeforeSubmit(db: Database, input: {
|
|
107
|
+
accountId: string;
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
operationId: string;
|
|
110
|
+
requestDigest: string;
|
|
111
|
+
reason: string;
|
|
112
|
+
}): Promise<VideoGenerationOperation>;
|
|
113
|
+
/**
|
|
114
|
+
* Turn-interruption half of pre-submit cancellation. It runs under the same
|
|
115
|
+
* session/turn transaction that closes unresolved tool calls, so an accepted
|
|
116
|
+
* receipt can never race a cancellation of its operation.
|
|
117
|
+
*/
|
|
118
|
+
export declare function cancelUnacceptedVideoGenerationsForToolCallsInTransaction(tx: Database, input: {
|
|
119
|
+
workspaceId: string;
|
|
120
|
+
sessionId: string;
|
|
121
|
+
turnId: string;
|
|
122
|
+
toolCallIds: readonly string[];
|
|
123
|
+
reason: string;
|
|
124
|
+
now: Date;
|
|
125
|
+
}): Promise<string[]>;
|
|
126
|
+
export declare function claimVideoGenerationOperations(db: Database, input: {
|
|
127
|
+
owner: string;
|
|
128
|
+
leaseSeconds: number;
|
|
129
|
+
limit: number;
|
|
130
|
+
}): Promise<Array<{
|
|
131
|
+
operationId: string;
|
|
132
|
+
accountId: string;
|
|
133
|
+
workspaceId: string;
|
|
134
|
+
}>>;
|
|
135
|
+
export declare function getVideoGenerationOperation(db: Database, workspaceId: string, operationId: string): Promise<VideoGenerationOperationWithReferences | null>;
|
|
136
|
+
export declare function markVideoGenerationSubmissionUncertain(db: Database, input: OperationMutationInput & {
|
|
137
|
+
nextReconcileAt: Date;
|
|
138
|
+
error: string;
|
|
139
|
+
}): Promise<VideoGenerationOperation>;
|
|
140
|
+
/**
|
|
141
|
+
* Freeze the exact provider start body before issuing the request. If the
|
|
142
|
+
* worker disappears after this transaction, recovery replays the same body
|
|
143
|
+
* and idempotency key rather than reminting URLs or changing request bytes.
|
|
144
|
+
*/
|
|
145
|
+
export declare function markVideoGenerationSubmissionIntent(db: Database, input: OperationMutationInput & {
|
|
146
|
+
encryptedProviderRequest: string;
|
|
147
|
+
providerRequestExpiresAt: Date;
|
|
148
|
+
nextReconcileAt: Date;
|
|
149
|
+
}): Promise<VideoGenerationOperation>;
|
|
150
|
+
export declare function markVideoGenerationProviderStarted(db: Database, input: OperationMutationInput & {
|
|
151
|
+
providerJobId: string;
|
|
152
|
+
nextReconcileAt: Date;
|
|
153
|
+
}): Promise<VideoGenerationOperation>;
|
|
154
|
+
export declare function rescheduleVideoGenerationOperation(db: Database, input: OperationMutationInput & {
|
|
155
|
+
owner?: string;
|
|
156
|
+
nextReconcileAt: Date;
|
|
157
|
+
error?: string;
|
|
158
|
+
}): Promise<boolean>;
|
|
159
|
+
export declare function markVideoGenerationRetaining(db: Database, input: OperationMutationInput): Promise<VideoGenerationOperation>;
|
|
160
|
+
export declare function settleVideoGenerationFailure(db: Database, input: OperationMutationInput & {
|
|
161
|
+
status: "provider_failed" | "retention_failed" | "outcome_unknown";
|
|
162
|
+
publicReason: string;
|
|
163
|
+
privateError?: string;
|
|
164
|
+
}): Promise<VideoGenerationOperation>;
|
|
165
|
+
export type SettleVideoGenerationReadyInput = OperationMutationInput & {
|
|
166
|
+
fileId: string;
|
|
167
|
+
bucket: string;
|
|
168
|
+
objectKey: string;
|
|
169
|
+
sizeBytes: number;
|
|
170
|
+
sha256: string;
|
|
171
|
+
facts: GeneratedVideoFacts;
|
|
172
|
+
};
|
|
173
|
+
export declare function settleVideoGenerationReady(db: Database, input: SettleVideoGenerationReadyInput): Promise<{
|
|
174
|
+
operation: VideoGenerationOperation;
|
|
175
|
+
artifact: GeneratedVideoArtifact;
|
|
176
|
+
}>;
|
|
177
|
+
export declare function getGeneratedVideoArtifact(db: Database, workspaceId: string, artifactId: string): Promise<{
|
|
178
|
+
artifact: GeneratedVideoArtifact;
|
|
179
|
+
file: typeof schema.files.$inferSelect;
|
|
180
|
+
} | null>;
|
|
181
|
+
export declare function listSessionGeneratedVideoArtifacts(db: Database, workspaceId: string, sessionId: string): Promise<Array<{
|
|
182
|
+
artifact: GeneratedVideoArtifact;
|
|
183
|
+
file: typeof schema.files.$inferSelect;
|
|
184
|
+
}>>;
|
|
185
|
+
/**
|
|
186
|
+
* Record one staging object as erased only after the object-store delete has
|
|
187
|
+
* succeeded. Deleting first is safe because object deletion is idempotent; a
|
|
188
|
+
* crash before this CAS simply repeats the same delete on recovery.
|
|
189
|
+
*/
|
|
190
|
+
export declare function markVideoGenerationReferenceCleaned(db: Database, input: {
|
|
191
|
+
accountId: string;
|
|
192
|
+
workspaceId: string;
|
|
193
|
+
operationId: string;
|
|
194
|
+
ordinal: number;
|
|
195
|
+
stagingObjectKey: string;
|
|
196
|
+
}): Promise<boolean>;
|
|
197
|
+
export declare function markVideoGenerationTerminalUpdate(db: Database, input: {
|
|
198
|
+
accountId: string;
|
|
199
|
+
workspaceId: string;
|
|
200
|
+
operationId: string;
|
|
201
|
+
state: "leased" | "delivered" | "suppressed";
|
|
202
|
+
updateId?: string;
|
|
203
|
+
}): Promise<boolean>;
|
|
204
|
+
export declare function markVideoGenerationTerminalUpdateInTransaction(tx: Database, input: {
|
|
205
|
+
workspaceId: string;
|
|
206
|
+
operationId: string;
|
|
207
|
+
state: "leased" | "delivered" | "suppressed";
|
|
208
|
+
updateId?: string;
|
|
209
|
+
}): Promise<boolean>;
|
|
210
|
+
export declare function mediaGenerationResultForOperation(input: {
|
|
211
|
+
operation: VideoGenerationOperation;
|
|
212
|
+
readyReceipt?: Extract<MediaGenerationResult, {
|
|
213
|
+
status: "ready";
|
|
214
|
+
}>["receipt"];
|
|
215
|
+
}): MediaGenerationResult;
|
|
216
|
+
/** Build the compact public/model terminal envelope from durable canonical rows. */
|
|
217
|
+
export declare function mediaGenerationResultForStoredOperation(db: Database, operation: VideoGenerationOperation): Promise<MediaGenerationResult>;
|
|
218
|
+
export declare function getVideoGenerationOperationSummary(db: Database, workspaceId: string, operationId: string): Promise<import("@opengeni/contracts").VideoGenerationOperationSummary | null>;
|
|
219
|
+
type OperationMutationInput = {
|
|
220
|
+
accountId: string;
|
|
221
|
+
workspaceId: string;
|
|
222
|
+
operationId: string;
|
|
223
|
+
requestDigest: string;
|
|
224
|
+
};
|
|
225
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTIVE_VIDEO_GENERATION_STATUSES,
|
|
3
|
+
VideoGenerationCapacityError,
|
|
4
|
+
VideoGenerationConflictError,
|
|
5
|
+
VideoGenerationCreditError,
|
|
6
|
+
admitVideoGenerationOperation,
|
|
7
|
+
cancelUnacceptedVideoGenerationsForToolCallsInTransaction,
|
|
8
|
+
cancelVideoGenerationBeforeSubmit,
|
|
9
|
+
claimVideoGenerationOperations,
|
|
10
|
+
getGeneratedVideoArtifact,
|
|
11
|
+
getVideoGenerationOperation,
|
|
12
|
+
getVideoGenerationOperationSummary,
|
|
13
|
+
getWorkspaceVideoGenerationPolicy,
|
|
14
|
+
listSessionGeneratedVideoArtifacts,
|
|
15
|
+
markVideoGenerationAccepted,
|
|
16
|
+
markVideoGenerationAcceptedInTransaction,
|
|
17
|
+
markVideoGenerationPrepared,
|
|
18
|
+
markVideoGenerationProviderStarted,
|
|
19
|
+
markVideoGenerationReferenceCleaned,
|
|
20
|
+
markVideoGenerationRetaining,
|
|
21
|
+
markVideoGenerationSubmissionIntent,
|
|
22
|
+
markVideoGenerationSubmissionUncertain,
|
|
23
|
+
markVideoGenerationTerminalUpdate,
|
|
24
|
+
markVideoGenerationTerminalUpdateInTransaction,
|
|
25
|
+
mediaGenerationResultForOperation,
|
|
26
|
+
mediaGenerationResultForStoredOperation,
|
|
27
|
+
rescheduleVideoGenerationOperation,
|
|
28
|
+
rotateVideoGenerationCredential,
|
|
29
|
+
settleVideoGenerationFailure,
|
|
30
|
+
settleVideoGenerationReady,
|
|
31
|
+
updateWorkspaceVideoGenerationPolicy
|
|
32
|
+
} from "./chunk-CQZ4QSP5.js";
|
|
33
|
+
import "./chunk-JC5QPLUM.js";
|
|
34
|
+
import "./chunk-5KTIEDX7.js";
|
|
35
|
+
import "./chunk-PZ5AY32C.js";
|
|
36
|
+
export {
|
|
37
|
+
ACTIVE_VIDEO_GENERATION_STATUSES,
|
|
38
|
+
VideoGenerationCapacityError,
|
|
39
|
+
VideoGenerationConflictError,
|
|
40
|
+
VideoGenerationCreditError,
|
|
41
|
+
admitVideoGenerationOperation,
|
|
42
|
+
cancelUnacceptedVideoGenerationsForToolCallsInTransaction,
|
|
43
|
+
cancelVideoGenerationBeforeSubmit,
|
|
44
|
+
claimVideoGenerationOperations,
|
|
45
|
+
getGeneratedVideoArtifact,
|
|
46
|
+
getVideoGenerationOperation,
|
|
47
|
+
getVideoGenerationOperationSummary,
|
|
48
|
+
getWorkspaceVideoGenerationPolicy,
|
|
49
|
+
listSessionGeneratedVideoArtifacts,
|
|
50
|
+
markVideoGenerationAccepted,
|
|
51
|
+
markVideoGenerationAcceptedInTransaction,
|
|
52
|
+
markVideoGenerationPrepared,
|
|
53
|
+
markVideoGenerationProviderStarted,
|
|
54
|
+
markVideoGenerationReferenceCleaned,
|
|
55
|
+
markVideoGenerationRetaining,
|
|
56
|
+
markVideoGenerationSubmissionIntent,
|
|
57
|
+
markVideoGenerationSubmissionUncertain,
|
|
58
|
+
markVideoGenerationTerminalUpdate,
|
|
59
|
+
markVideoGenerationTerminalUpdateInTransaction,
|
|
60
|
+
mediaGenerationResultForOperation,
|
|
61
|
+
mediaGenerationResultForStoredOperation,
|
|
62
|
+
rescheduleVideoGenerationOperation,
|
|
63
|
+
rotateVideoGenerationCredential,
|
|
64
|
+
settleVideoGenerationFailure,
|
|
65
|
+
settleVideoGenerationReady,
|
|
66
|
+
updateWorkspaceVideoGenerationPolicy
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=video-generation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceArtifact, WorkspaceArtifactDetailResponse, WorkspaceArtifactMutationResponse, WorkspaceArtifactVersion } from "@opengeni/contracts";
|
|
2
|
-
import type { Database } from "./database";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
3
|
type ArtifactMutationToolName = "artifacts_create" | "artifacts_publish" | "artifacts_rollback";
|
|
4
4
|
export declare class WorkspaceArtifactNotFoundError extends Error {
|
|
5
5
|
readonly name = "WorkspaceArtifactNotFoundError";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorkspaceInstructionPolicySnapshot } from "@opengeni/contracts";
|
|
2
2
|
import type { WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyListQuery, WorkspaceInstructionPolicyListResponse, WorkspaceInstructionPolicyOnboardingProposal, WorkspaceInstructionPolicyOnboardingProposalListQuery, WorkspaceInstructionPolicyOnboardingProposalListResponse, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyTarget } from "@opengeni/contracts";
|
|
3
|
-
import type { Database } from "./database";
|
|
3
|
+
import type { Database } from "./database.js";
|
|
4
4
|
type DraftRequestInput = WorkspaceInstructionPolicyTarget & {
|
|
5
5
|
operationId: string;
|
|
6
6
|
accountId: string;
|