@opengeni/db 0.28.9 → 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-VHBFHMPC.js → chunk-YHZXQ7HP.js} +754 -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/generated-images.d.ts +139 -0
- package/dist/index.d.ts +698 -111
- package/dist/index.js +27573 -10322
- 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/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 +18 -6
- package/dist/schema.d.ts +18342 -9099
- package/dist/schema.js +165 -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 +1 -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.d.ts +2 -2
- 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/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 +427 -23
- 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 +5917 -1182
- 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/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 +4 -7
- 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 +508 -5
- package/src/schema.ts +5117 -3119
- package/src/scoped-knowledge-schema.ts +1 -1
- package/src/scoped-knowledge.ts +655 -3
- package/src/session-control.ts +8 -5
- package/src/session-queue-commands.ts +187 -14
- 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-tool-call-settlement.ts +9 -0
- package/src/slack-user-link-access.ts +702 -0
- 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-P6CUHXQZ.js +0 -7248
- package/dist/chunk-P6CUHXQZ.js.map +0 -1
- package/dist/chunk-VHBFHMPC.js.map +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { sql } from "drizzle-orm";
|
|
2
|
+
import type { CompanyProfileSnapshotEntry } from "@opengeni/contracts";
|
|
3
|
+
import {
|
|
4
|
+
bigint,
|
|
5
|
+
check,
|
|
6
|
+
index,
|
|
7
|
+
integer,
|
|
8
|
+
jsonb,
|
|
9
|
+
pgTable,
|
|
10
|
+
text,
|
|
11
|
+
timestamp,
|
|
12
|
+
uniqueIndex,
|
|
13
|
+
uuid,
|
|
14
|
+
} from "drizzle-orm/pg-core";
|
|
15
|
+
|
|
16
|
+
export const companyProfileRevisions = pgTable(
|
|
17
|
+
"company_profile_revisions",
|
|
18
|
+
{
|
|
19
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
20
|
+
operationId: uuid("operation_id").notNull(),
|
|
21
|
+
requestFingerprint: text("request_fingerprint").notNull(),
|
|
22
|
+
accountId: uuid("account_id").notNull(),
|
|
23
|
+
revision: bigint("revision", { mode: "number" })
|
|
24
|
+
.notNull()
|
|
25
|
+
.default(sql`nextval('company_profile_revision_seq')`),
|
|
26
|
+
intent: text("intent").notNull(),
|
|
27
|
+
contentJson: text("content_json").notNull(),
|
|
28
|
+
contentHash: text("content_hash").notNull(),
|
|
29
|
+
provenanceSource: text("provenance_source").notNull(),
|
|
30
|
+
provenanceSourceId: text("provenance_source_id"),
|
|
31
|
+
supersedesRevisionId: uuid("supersedes_revision_id"),
|
|
32
|
+
createdBySubjectId: text("created_by_subject_id").notNull(),
|
|
33
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
34
|
+
},
|
|
35
|
+
(table) => ({
|
|
36
|
+
accountOperation: uniqueIndex("company_profile_revisions_account_operation_uq").on(
|
|
37
|
+
table.accountId,
|
|
38
|
+
table.operationId,
|
|
39
|
+
),
|
|
40
|
+
accountRevision: uniqueIndex("company_profile_revisions_account_revision_uq").on(
|
|
41
|
+
table.accountId,
|
|
42
|
+
table.revision,
|
|
43
|
+
),
|
|
44
|
+
accountHistory: index("company_profile_revisions_account_history_idx").on(
|
|
45
|
+
table.accountId,
|
|
46
|
+
table.revision,
|
|
47
|
+
),
|
|
48
|
+
receipt: check(
|
|
49
|
+
"company_profile_revisions_receipt_chk",
|
|
50
|
+
sql`${table.requestFingerprint} ~ '^[0-9a-f]{64}$'`,
|
|
51
|
+
),
|
|
52
|
+
intent: check(
|
|
53
|
+
"company_profile_revisions_intent_chk",
|
|
54
|
+
sql`${table.intent} in ('active', 'proposal')`,
|
|
55
|
+
),
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export const companyProfileHeads = pgTable("company_profile_heads", {
|
|
60
|
+
accountId: uuid("account_id").primaryKey(),
|
|
61
|
+
revisionId: uuid("revision_id").notNull(),
|
|
62
|
+
revision: bigint("revision", { mode: "number" }).notNull(),
|
|
63
|
+
contentHash: text("content_hash").notNull(),
|
|
64
|
+
activationVersion: bigint("activation_version", { mode: "number" }).notNull(),
|
|
65
|
+
activatedAt: timestamp("activated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const companyProfileActivationEvents = pgTable(
|
|
69
|
+
"company_profile_activation_events",
|
|
70
|
+
{
|
|
71
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
72
|
+
operationId: uuid("operation_id").notNull(),
|
|
73
|
+
requestFingerprint: text("request_fingerprint").notNull(),
|
|
74
|
+
accountId: uuid("account_id").notNull(),
|
|
75
|
+
type: text("type").notNull(),
|
|
76
|
+
activationVersion: bigint("activation_version", { mode: "number" }).notNull(),
|
|
77
|
+
oldRevisionId: uuid("old_revision_id"),
|
|
78
|
+
oldRevision: bigint("old_revision", { mode: "number" }),
|
|
79
|
+
oldContentHash: text("old_content_hash"),
|
|
80
|
+
newRevisionId: uuid("new_revision_id"),
|
|
81
|
+
newRevision: bigint("new_revision", { mode: "number" }),
|
|
82
|
+
newContentHash: text("new_content_hash"),
|
|
83
|
+
actorSubjectId: text("actor_subject_id").notNull(),
|
|
84
|
+
reason: text("reason").notNull(),
|
|
85
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
86
|
+
},
|
|
87
|
+
(table) => ({
|
|
88
|
+
accountOperation: uniqueIndex("company_profile_events_account_operation_uq").on(
|
|
89
|
+
table.accountId,
|
|
90
|
+
table.operationId,
|
|
91
|
+
),
|
|
92
|
+
accountActivationVersion: uniqueIndex("company_profile_events_account_version_uq").on(
|
|
93
|
+
table.accountId,
|
|
94
|
+
table.activationVersion,
|
|
95
|
+
),
|
|
96
|
+
accountTimeline: index("company_profile_events_account_time_idx").on(
|
|
97
|
+
table.accountId,
|
|
98
|
+
table.createdAt,
|
|
99
|
+
table.id,
|
|
100
|
+
),
|
|
101
|
+
receipt: check(
|
|
102
|
+
"company_profile_events_receipt_chk",
|
|
103
|
+
sql`${table.requestFingerprint} ~ '^[0-9a-f]{64}$'`,
|
|
104
|
+
),
|
|
105
|
+
type: check("company_profile_events_type_chk", sql`${table.type} in ('activate', 'rollback')`),
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
export const companyProfileSnapshots = pgTable(
|
|
110
|
+
"company_profile_snapshots",
|
|
111
|
+
{
|
|
112
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
113
|
+
accountId: uuid("account_id").notNull(),
|
|
114
|
+
workspaceId: uuid("workspace_id").notNull(),
|
|
115
|
+
sessionId: uuid("session_id").notNull(),
|
|
116
|
+
turnId: uuid("turn_id").notNull(),
|
|
117
|
+
attemptId: uuid("attempt_id").notNull(),
|
|
118
|
+
executionGeneration: integer("execution_generation").notNull(),
|
|
119
|
+
profile: jsonb("profile").$type<CompanyProfileSnapshotEntry | null>(),
|
|
120
|
+
snapshotHash: text("snapshot_hash").notNull(),
|
|
121
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
122
|
+
},
|
|
123
|
+
(table) => ({
|
|
124
|
+
attempt: uniqueIndex("company_profile_snapshots_attempt_uq").on(
|
|
125
|
+
table.accountId,
|
|
126
|
+
table.workspaceId,
|
|
127
|
+
table.attemptId,
|
|
128
|
+
),
|
|
129
|
+
workspaceTimeline: index("company_profile_snapshots_workspace_time_idx").on(
|
|
130
|
+
table.workspaceId,
|
|
131
|
+
table.createdAt,
|
|
132
|
+
table.id,
|
|
133
|
+
),
|
|
134
|
+
generation: check(
|
|
135
|
+
"company_profile_snapshots_generation_chk",
|
|
136
|
+
sql`${table.executionGeneration} > 0`,
|
|
137
|
+
),
|
|
138
|
+
hash: check(
|
|
139
|
+
"company_profile_snapshots_hash_chk",
|
|
140
|
+
sql`${table.snapshotHash} ~ '^[0-9a-f]{64}$'`,
|
|
141
|
+
),
|
|
142
|
+
}),
|
|
143
|
+
);
|