@marinoscar/kvox-eval 0.0.0-bootstrap → 0.1.0-next.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/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +166 -0
- package/dist/ask/index.d.ts +6 -0
- package/dist/ask/index.js +28 -0
- package/dist/ask/question-schema.d.ts +121 -0
- package/dist/ask/question-schema.js +167 -0
- package/dist/ask/report.d.ts +88 -0
- package/dist/ask/report.js +170 -0
- package/dist/ask/scorer.d.ts +104 -0
- package/dist/ask/scorer.js +164 -0
- package/dist/ask-run/ask-command.d.ts +62 -0
- package/dist/ask-run/ask-command.js +254 -0
- package/dist/ask-run/host/app.d.ts +65 -0
- package/dist/ask-run/host/app.js +146 -0
- package/dist/ask-run/host/db.d.ts +38 -0
- package/dist/ask-run/host/db.js +126 -0
- package/dist/ask-run/host/ports.d.ts +35 -0
- package/dist/ask-run/host/ports.js +113 -0
- package/dist/ask-run/index.d.ts +13 -0
- package/dist/ask-run/index.js +35 -0
- package/dist/ask-run/replay.d.ts +128 -0
- package/dist/ask-run/replay.js +212 -0
- package/dist/ask-run/run-ask-eval.d.ts +125 -0
- package/dist/ask-run/run-ask-eval.js +193 -0
- package/dist/ask-run/seed-golden-graph.d.ts +64 -0
- package/dist/ask-run/seed-golden-graph.js +495 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +12 -0
- package/dist/cli/kg-command.d.ts +66 -0
- package/dist/cli/kg-command.js +238 -0
- package/dist/cli/main.d.ts +18 -0
- package/dist/cli/main.js +69 -0
- package/dist/fixtures/domains.d.ts +16 -0
- package/dist/fixtures/domains.js +33 -0
- package/dist/fixtures/fixture-schema.d.ts +323 -0
- package/dist/fixtures/fixture-schema.js +199 -0
- package/dist/fixtures/index.d.ts +16 -0
- package/dist/fixtures/index.js +40 -0
- package/dist/fixtures/load.d.ts +73 -0
- package/dist/fixtures/load.js +137 -0
- package/dist/fixtures/questions.d.ts +15 -0
- package/dist/fixtures/questions.js +26 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +36 -0
- package/dist/kg/gold-runner.d.ts +13 -0
- package/dist/kg/gold-runner.js +57 -0
- package/dist/kg/index.d.ts +17 -0
- package/dist/kg/index.js +65 -0
- package/dist/kg/internals.d.ts +7 -0
- package/dist/kg/internals.js +17 -0
- package/dist/kg/prediction-schema.d.ts +245 -0
- package/dist/kg/prediction-schema.js +102 -0
- package/dist/kg/predictions.d.ts +11 -0
- package/dist/kg/predictions.js +49 -0
- package/dist/kg/report.d.ts +84 -0
- package/dist/kg/report.js +125 -0
- package/dist/kg/run-kg-eval.d.ts +77 -0
- package/dist/kg/run-kg-eval.js +137 -0
- package/dist/kg/runner.d.ts +72 -0
- package/dist/kg/runner.js +51 -0
- package/dist/kg/runners/extract-resolve-runner.d.ts +40 -0
- package/dist/kg/runners/extract-resolve-runner.js +199 -0
- package/dist/kg/runners/extract-runner.d.ts +65 -0
- package/dist/kg/runners/extract-runner.js +243 -0
- package/dist/kg/scorer.d.ts +226 -0
- package/dist/kg/scorer.js +463 -0
- package/dist/kg/targets.d.ts +17 -0
- package/dist/kg/targets.js +16 -0
- package/dist/kg/text.d.ts +45 -0
- package/dist/kg/text.js +100 -0
- package/dist/live/adapters.d.ts +16 -0
- package/dist/live/adapters.js +58 -0
- package/dist/live/env.d.ts +39 -0
- package/dist/live/env.js +56 -0
- package/dist/live/index.d.ts +6 -0
- package/dist/live/index.js +16 -0
- package/dist/live/live-ai.d.ts +104 -0
- package/dist/live/live-ai.js +157 -0
- package/dist/parity/constants.d.ts +79 -0
- package/dist/parity/constants.js +104 -0
- package/dist/parity/index.d.ts +20 -0
- package/dist/parity/index.js +38 -0
- package/dist/parity/internals.d.ts +8 -0
- package/dist/parity/internals.js +16 -0
- package/dist/parity/scenario.d.ts +45 -0
- package/dist/parity/scenario.js +245 -0
- package/dist/parity/script.d.ts +44 -0
- package/dist/parity/script.js +136 -0
- package/dist/parity/snapshot.d.ts +43 -0
- package/dist/parity/snapshot.js +71 -0
- package/dist/real-data/index.d.ts +2 -0
- package/dist/real-data/index.js +12 -0
- package/dist/real-data/real-data.d.ts +76 -0
- package/dist/real-data/real-data.js +156 -0
- package/fixtures/kg-golden/README.md +136 -0
- package/fixtures/kg-golden/ask-questions.json +458 -0
- package/fixtures/kg-golden/meetings/m01-northwind-pilot-kickoff.json +792 -0
- package/fixtures/kg-golden/meetings/m02-halden-migration-planning.json +814 -0
- package/fixtures/kg-golden/meetings/m03-larkspur-weekly-sync.json +601 -0
- package/fixtures/kg-golden/meetings/m04-corvid-intake-discovery.json +690 -0
- package/fixtures/kg-golden/meetings/m05-hosting-vendor-selection.json +631 -0
- package/fixtures/kg-golden/meetings/m06-northwind-floor-data-review.json +649 -0
- package/fixtures/kg-golden/meetings/m07-gullwing-intro-notes.json +428 -0
- package/fixtures/kg-golden/meetings/m08-halden-migration-checkpoint.json +672 -0
- package/fixtures/kg-golden/meetings/m09-northwind-platform-org-update.json +711 -0
- package/fixtures/kg-golden/meetings/m10-corvid-prototype-review.json +623 -0
- package/fixtures/kg-golden/meetings/m11-solvane-grid-dashboard-scoping.json +689 -0
- package/fixtures/kg-golden/meetings/m12-northwind-pilot-replan.json +681 -0
- package/fixtures/kg-golden/meetings/m13-halden-cutover-go-no-go.json +721 -0
- package/fixtures/kg-golden/meetings/m14-gullwing-discovery-readout.json +719 -0
- package/fixtures/kg-golden/meetings/m15-halden-handover-ravi-leaving.json +716 -0
- package/fixtures/kg-golden/meetings/m16-varden-claims-portal-intro.json +704 -0
- package/fixtures/kg-golden/meetings/m17-corvid-usability-debrief.json +572 -0
- package/fixtures/kg-golden/meetings/m18-hosting-decision-revisited.json +655 -0
- package/fixtures/kg-golden/meetings/m19-solvane-integration-kickoff.json +726 -0
- package/fixtures/kg-golden/meetings/m20-northwind-go-live-retro.json +673 -0
- package/fixtures/kg-golden/meetings/m21-quarterly-account-review.json +449 -0
- package/fixtures/kg-golden/meetings/m22-halden-intro-call-2020.json +558 -0
- package/fixtures/kg-golden/meetings/m23-gullwing-model-review.json +702 -0
- package/fixtures/kg-golden/meetings/m24-varden-discovery-midpoint.json +643 -0
- package/fixtures/kg-golden/meetings/m25-corvid-rollout-planning.json +642 -0
- package/fixtures/kg-golden/meetings/m26-larkspur-engineering-prep.json +695 -0
- package/fixtures/kg-golden/meetings/m27-solvane-phase-one-demo.json +649 -0
- package/fixtures/kg-golden/meetings/m28-northwind-building-5-scoping.json +715 -0
- package/fixtures/kg-golden/meetings/m29-halden-southern-cutover-review.json +752 -0
- package/fixtures/kg-golden/meetings/m30-varden-portal-build-kickoff.json +697 -0
- package/fixtures/kg-golden/meetings/m31-gullwing-rollout-renewal.json +681 -0
- package/fixtures/kg-golden/meetings/m32-brambleway-weekly-sync.json +472 -0
- package/fixtures/kg-golden/meetings/m33-nina-oliver-one-on-one.json +342 -0
- package/fixtures/kg-golden/meetings/m34-coffee-with-dana.json +249 -0
- package/fixtures/kg-golden/meetings/m35-brambleway-june-sync.json +553 -0
- package/fixtures/kg-golden/meetings/m36-copenhagen-conference-planning.json +296 -0
- package/host/generated/client.d.ts +1 -0
- package/host/generated/client.js +5 -0
- package/host/generated/default.d.ts +1 -0
- package/host/generated/default.js +5 -0
- package/host/generated/edge.d.ts +1 -0
- package/host/generated/edge.js +1658 -0
- package/host/generated/index-browser.js +1684 -0
- package/host/generated/index.d.ts +192335 -0
- package/host/generated/index.js +1658 -0
- package/host/generated/package.json +139 -0
- package/host/generated/query_compiler_fast_bg.js +2 -0
- package/host/generated/query_compiler_fast_bg.wasm +0 -0
- package/host/generated/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/host/generated/runtime/client.d.ts +3433 -0
- package/host/generated/runtime/client.js +110 -0
- package/host/generated/runtime/index-browser.d.ts +90 -0
- package/host/generated/runtime/index-browser.js +6 -0
- package/host/generated/runtime/wasm-compiler-edge.js +100 -0
- package/host/generated/schema.prisma +6312 -0
- package/host/generated/wasm-edge-light-loader.mjs +5 -0
- package/host/generated/wasm-worker-loader.mjs +5 -0
- package/host/prisma/fragments/kvox.ask.prisma +126 -0
- package/host/prisma/fragments/kvox.graph.prisma +1073 -0
- package/host/prisma/fragments/kvox.notes.prisma +787 -0
- package/host/prisma/fragments/kvox.search.prisma +211 -0
- package/host/prisma/fragments/kvox.transcripts.prisma +790 -0
- package/host/prisma/kvox.lock +101 -0
- package/host/prisma/migrations/20240101000000_initial/migration.sql +297 -0
- package/host/prisma/migrations/20240101000001_add_personal_access_tokens/migration.sql +31 -0
- package/host/prisma/migrations/20240101000002_add_credentials/migration.sql +20 -0
- package/host/prisma/migrations/20240101000003_add_notification_deliveries/migration.sql +27 -0
- package/host/prisma/migrations/20240101000004_drop_stale_uuid_defaults/migration.sql +35 -0
- package/host/prisma/migrations/20240101000005_add_notifications/migration.sql +22 -0
- package/host/prisma/migrations/20240101000006_add_push_subscriptions/migration.sql +25 -0
- package/host/prisma/migrations/20240101000007_add_jobs/migration.sql +110 -0
- package/host/prisma/migrations/20240101000008_add_worker_nodes/migration.sql +90 -0
- package/host/prisma/migrations/20240101000009_add_database_backup_runs/migration.sql +104 -0
- package/host/prisma/migrations/20240101000010_add_notification_broadcasts/migration.sql +57 -0
- package/host/prisma/migrations/20240101000011_add_backup_run_job_link/migration.sql +87 -0
- package/host/prisma/migrations/20240101000012_add_job_node_secrets/migration.sql +61 -0
- package/host/prisma/migrations/20240101000013_add_backup_run_pg_dump_version/migration.sql +26 -0
- package/host/prisma/migrations/20240101000014_add_job_claim_token/migration.sql +92 -0
- package/host/prisma/migrations/20240101000015_add_ai_platform/migration.sql +108 -0
- package/host/prisma/migrations/20240101000016_revoke_viewer_ai_use/migration.sql +32 -0
- package/host/prisma/migrations/20240101000017_add_user_credentials/migration.sql +29 -0
- package/host/prisma/migrations/20240101000018_add_device_session_credential_link/migration.sql +52 -0
- package/host/prisma/migrations/20240101000019_add_worker_node_vitals/migration.sql +3 -0
- package/host/prisma/migrations/20240101000020_add_job_trace_context/migration.sql +6 -0
- package/host/prisma/migrations/20240101000021_add_retention_created_at_indexes/migration.sql +13 -0
- package/host/prisma/migrations/20240101000022_add_organizations/migration.sql +142 -0
- package/host/prisma/migrations/20240101000023_split_system_org_roles/migration.sql +131 -0
- package/host/prisma/migrations/20240101000024_org_scoped_rls/migration.sql +215 -0
- package/host/prisma/migrations/20240101000025_add_groups/migration.sql +165 -0
- package/host/prisma/migrations/20240101000026_add_grants/migration.sql +117 -0
- package/host/prisma/migrations/20240101000027_add_org_settings/migration.sql +49 -0
- package/host/prisma/migrations/20240101000028_add_org_credentials/migration.sql +54 -0
- package/host/prisma/migrations/20240101000029_add_jobs_org_id/migration.sql +18 -0
- package/host/prisma/migrations/20240101000030_add_jobs_org_id_status_index/migration.sql +6 -0
- package/host/prisma/migrations/20240101000031_add_broadcast_target_org/migration.sql +21 -0
- package/host/prisma/migrations/20240101000032_add_android_app/migration.sql +60 -0
- package/host/prisma/migrations/20240101000033_open_job_reason/migration.sql +16 -0
- package/host/prisma/migrations/20240101000034_ai_usage_feature/migration.sql +37 -0
- package/host/prisma/migrations/20240101000035_add_app_metadata/migration.sql +49 -0
- package/host/prisma/migrations/20240101000036_open_sharing_vocabularies/migration.sql +97 -0
- package/host/prisma/migrations/20260914130000_kvox_add_transcripts/migration.sql +322 -0
- package/host/prisma/migrations/20260914140000_kvox_add_notes/migration.sql +311 -0
- package/host/prisma/migrations/20260915120000_kvox_add_search_vectors/migration.sql +150 -0
- package/host/prisma/migrations/20260915130000_kvox_add_search_embeddings/migration.sql +362 -0
- package/host/prisma/migrations/20260915210000_kvox_add_note_title_source/migration.sql +30 -0
- package/host/prisma/migrations/20260923120000_kvox_add_note_generation_context_snapshot/migration.sql +24 -0
- package/host/prisma/migrations/20260923130000_kvox_add_user_hidden_note_templates/migration.sql +35 -0
- package/host/prisma/migrations/20260923140000_kvox_add_transcript_speaker_identities/migration.sql +6 -0
- package/host/prisma/migrations/20260923150000_kvox_transcript_name_checks/migration.sql +95 -0
- package/host/prisma/migrations/20260923160000_kvox_add_note_body_format/migration.sql +27 -0
- package/host/prisma/migrations/20260923170000_kvox_add_note_version_body_format/migration.sql +23 -0
- package/host/prisma/migrations/20260926012548_kvox_add_knowledge_graph/migration.sql +680 -0
- package/host/prisma/migrations/20260926030000_kvox_fix_kg_relations_valid_precision_chk/migration.sql +29 -0
- package/host/prisma/migrations/20260926030100_kvox_add_transcript_recorded_at/migration.sql +9 -0
- package/host/prisma/migrations/20260926030200_kvox_kg_evidence_invariant/migration.sql +60 -0
- package/host/prisma/migrations/20260926040000_kvox_add_kg_graph_layouts/migration.sql +30 -0
- package/host/prisma/migrations/20260926050000_kvox_add_ask_conversations/migration.sql +99 -0
- package/host/prisma/migrations/20260926231512_kvox_add_kg_exports/migration.sql +52 -0
- package/host/prisma/migrations/20261016120000_kvox_transcripts_org_id/migration.sql +49 -0
- package/host/prisma/platform.lock +319 -0
- package/host/prisma/schema/app.kvox.ask.prisma +110 -0
- package/host/prisma/schema/app.kvox.graph.prisma +1030 -0
- package/host/prisma/schema/app.kvox.notes.prisma +746 -0
- package/host/prisma/schema/app.kvox.search.prisma +208 -0
- package/host/prisma/schema/app.kvox.transcripts.prisma +726 -0
- package/host/prisma/schema/platform.ai.prisma +419 -0
- package/host/prisma/schema/platform.android-app.prisma +46 -0
- package/host/prisma/schema/platform.base.prisma +15 -0
- package/host/prisma/schema/platform.credentials.prisma +156 -0
- package/host/prisma/schema/platform.db-backup.prisma +359 -0
- package/host/prisma/schema/platform.identity.prisma +638 -0
- package/host/prisma/schema/platform.jobs.prisma +824 -0
- package/host/prisma/schema/platform.notifications.prisma +641 -0
- package/host/prisma/schema/platform.settings.prisma +53 -0
- package/host/prisma/schema/platform.sharing.prisma +208 -0
- package/host/prisma/schema/platform.storage.prisma +118 -0
- package/package.json +112 -1
- package/parity/requests.ask.json +2681 -0
- package/parity/requests.m01.json +1554 -0
- package/parity/requests.m02.json +1554 -0
- package/parity/requests.m03.json +1554 -0
- package/parity/requests.m04.json +1554 -0
- package/parity/requests.m05.json +1554 -0
- package/parity/requests.m06.json +1554 -0
- package/parity/requests.m07.json +1554 -0
- package/parity/requests.m08.json +1554 -0
- package/parity/requests.m09.json +1554 -0
- package/parity/requests.m10.json +1554 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// GENERATED by kvox-db sync — do not edit
|
|
2
|
+
// source: @marinoscar/kvox-db:schema/kvox.ask.prisma
|
|
3
|
+
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// Ask — saved conversations with the read-only graph agent (issue #376, epic #348)
|
|
6
|
+
// =============================================================================
|
|
7
|
+
//
|
|
8
|
+
// `ask_conversations` is one saved conversation; `ask_messages` is one turn in
|
|
9
|
+
// it. An assistant turn's `content` is the DURABLE STREAM BUFFER the
|
|
10
|
+
// `ask.respond` job (#378) appends to while it streams and the SSE endpoint
|
|
11
|
+
// (#379) reads from — the same "durable buffer, stream is a view" contract
|
|
12
|
+
// `note_generations` established (docs/specs/notes.md), so a turn completes
|
|
13
|
+
// identically whether or not anyone is watching.
|
|
14
|
+
//
|
|
15
|
+
// Ownership: `owner_id` CASCADES (a deleted account leaves no Ask history, and
|
|
16
|
+
// there is deliberately no `ask:read_any` — a conversation derives from the
|
|
17
|
+
// owner's private recordings). `scope_entity_id` is SetNull: forgetting or
|
|
18
|
+
// merging the scoped person drops only the scope link; the conversation text
|
|
19
|
+
// is the user's own content, never graph data. `conversation_id` CASCADES.
|
|
20
|
+
// `job_id` mirrors `TranscriptExport.jobId` exactly (`@unique`/nullable/SetNull).
|
|
21
|
+
//
|
|
22
|
+
// INTENTIONAL SCHEMA DRIFT: `ask_messages_one_running_turn_uniq_idx` — a
|
|
23
|
+
// partial UNIQUE index on `(conversation_id) WHERE role = 'assistant' AND
|
|
24
|
+
// status IN ('pending','streaming')` — exists ONLY in migration.sql, because
|
|
25
|
+
// Prisma cannot express a partial index. It is what enforces "at most one
|
|
26
|
+
// running turn per conversation" (the `database_backup_runs_active_uniq_idx`
|
|
27
|
+
// pattern — never a `findFirst` before the insert, which races). #378 maps a
|
|
28
|
+
// violation to 409 `ask_turn_running`. Do not "fix" the drift with a
|
|
29
|
+
// `@@unique`.
|
|
30
|
+
// =============================================================================
|
|
31
|
+
|
|
32
|
+
enum AskMessageRole {
|
|
33
|
+
user
|
|
34
|
+
assistant
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
enum AskMessageStatus {
|
|
38
|
+
pending
|
|
39
|
+
streaming
|
|
40
|
+
complete
|
|
41
|
+
failed
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
enum AskErrorClass {
|
|
45
|
+
auth
|
|
46
|
+
refusal
|
|
47
|
+
rate_limit
|
|
48
|
+
budget
|
|
49
|
+
timeout
|
|
50
|
+
other
|
|
51
|
+
}
|
|
52
|
+
// Why an assistant turn ended (spec §21.3). Anything but `stop` means the
|
|
53
|
+
// turn hit a cap and ended with its best answer — the UI says "stopped early".
|
|
54
|
+
enum AskFinishReason {
|
|
55
|
+
stop
|
|
56
|
+
step_cap
|
|
57
|
+
token_cap
|
|
58
|
+
time_cap
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
model AskConversation {
|
|
62
|
+
id String @id @default(uuid()) @db.Uuid
|
|
63
|
+
ownerId String @map("owner_id") @db.Uuid
|
|
64
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
65
|
+
// null until the first message; then the first 80 chars of it (#378).
|
|
66
|
+
title String?
|
|
67
|
+
scopeEntityId String? @map("scope_entity_id") @db.Uuid
|
|
68
|
+
// Forgetting a person drops the scope, keeps the conversation.
|
|
69
|
+
scopeEntity KgEntity? @relation(fields: [scopeEntityId], references: [id], onDelete: SetNull)
|
|
70
|
+
messages AskMessage[]
|
|
71
|
+
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
|
72
|
+
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(6)
|
|
73
|
+
|
|
74
|
+
@@index([ownerId, updatedAt(sort: Desc)])
|
|
75
|
+
@@index([ownerId, scopeEntityId])
|
|
76
|
+
@@map("ask_conversations")
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
model AskMessage {
|
|
80
|
+
id String @id @default(uuid()) @db.Uuid
|
|
81
|
+
conversationId String @map("conversation_id") @db.Uuid
|
|
82
|
+
conversation AskConversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)
|
|
83
|
+
role AskMessageRole
|
|
84
|
+
// assistant: the durable stream buffer, APPEND-ONLY while streaming.
|
|
85
|
+
content String @default("") @db.Text
|
|
86
|
+
status AskMessageStatus @default(pending)
|
|
87
|
+
// AskToolCall[] / AskCitation[] — see `apps/api/src/ask/dto/ask.dto.ts`.
|
|
88
|
+
toolCalls Json @default("[]") @map("tool_calls")
|
|
89
|
+
citations Json @default("[]")
|
|
90
|
+
model String?
|
|
91
|
+
provider String?
|
|
92
|
+
promptTokens Int? @map("prompt_tokens")
|
|
93
|
+
completionTokens Int? @map("completion_tokens")
|
|
94
|
+
errorClass AskErrorClass? @map("error_class")
|
|
95
|
+
// spec §21.3: a capped turn ends with its best answer and says so.
|
|
96
|
+
finishReason AskFinishReason? @map("finish_reason")
|
|
97
|
+
// Mirrors TranscriptExport.jobId.
|
|
98
|
+
jobId String? @unique @map("job_id") @db.Uuid
|
|
99
|
+
job Job? @relation(fields: [jobId], references: [id], onDelete: SetNull)
|
|
100
|
+
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
|
101
|
+
|
|
102
|
+
@@index([conversationId, createdAt])
|
|
103
|
+
// HAND-WRITTEN in migration.sql only: `ask_messages_one_running_turn_uniq_idx`
|
|
104
|
+
// — see the section header's "INTENTIONAL SCHEMA DRIFT" note.
|
|
105
|
+
@@map("ask_messages")
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Back-relations onto the platform's User (an `extend model` block holds back-relation fields only).
|
|
109
|
+
extend model User {
|
|
110
|
+
// Ask conversations (issue #376, epic #348). CASCADES — a saved question
|
|
111
|
+
// and its answers are the user's own content, derived from their private
|
|
112
|
+
// recordings, with no read path for anyone else (no `ask:read_any`), so a
|
|
113
|
+
// deleted account leaves no Ask history. See the block comment above
|
|
114
|
+
// `AskConversation`.
|
|
115
|
+
askConversations AskConversation[]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Back-relations onto the platform's Job (an `extend model` block holds back-relation fields only).
|
|
119
|
+
extend model Job {
|
|
120
|
+
// The `ask_messages` assistant turn this job is producing (or produced),
|
|
121
|
+
// when `type` is `'ask.respond'` (epic #348, issues #376/#378). Same
|
|
122
|
+
// one-to-one shape as `noteGeneration` above, for the same reason:
|
|
123
|
+
// `AskMessage.jobId` is `@unique`/nullable/`SetNull` because a saved
|
|
124
|
+
// conversation outlives `job.history.purge`'s schedule for this row.
|
|
125
|
+
askMessage AskMessage?
|
|
126
|
+
}
|