@ttt-productions/ttt-core 0.79.103 → 0.79.105

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.
Files changed (44) hide show
  1. package/dist/constants/admin-labels.d.ts +1 -2
  2. package/dist/constants/admin-labels.d.ts.map +1 -1
  3. package/dist/constants/admin-labels.js +1 -2
  4. package/dist/constants/admin-labels.js.map +1 -1
  5. package/dist/constants/business-admin.d.ts +1 -1
  6. package/dist/constants/business-admin.d.ts.map +1 -1
  7. package/dist/constants/business-admin.js +1 -1
  8. package/dist/constants/business-admin.js.map +1 -1
  9. package/dist/constants/craft-skill-statements.d.ts +2 -2
  10. package/dist/constants/craft-skill-statements.d.ts.map +1 -1
  11. package/dist/constants/craft-skill-statements.js +1 -1
  12. package/dist/constants/craft-skill-statements.js.map +1 -1
  13. package/dist/constants/release-flags.d.ts +3 -3
  14. package/dist/constants/release-flags.d.ts.map +1 -1
  15. package/dist/constants/release-flags.js +4 -4
  16. package/dist/constants/release-flags.js.map +1 -1
  17. package/dist/doc-schemas/ncii/config.d.ts.map +1 -1
  18. package/dist/doc-schemas/ncii/config.js +15 -20
  19. package/dist/doc-schemas/ncii/config.js.map +1 -1
  20. package/dist/doc-schemas/ncii/removal.d.ts +0 -1
  21. package/dist/doc-schemas/ncii/removal.d.ts.map +1 -1
  22. package/dist/doc-schemas/ncii/removal.js +13 -27
  23. package/dist/doc-schemas/ncii/removal.js.map +1 -1
  24. package/dist/doc-schemas/ncii/requests.d.ts +0 -4
  25. package/dist/doc-schemas/ncii/requests.d.ts.map +1 -1
  26. package/dist/doc-schemas/registry.d.ts +0 -5
  27. package/dist/doc-schemas/registry.d.ts.map +1 -1
  28. package/dist/doc-schemas/safety/foundation.d.ts +0 -10
  29. package/dist/doc-schemas/safety/foundation.d.ts.map +1 -1
  30. package/dist/doc-schemas/safety/foundation.js +1 -13
  31. package/dist/doc-schemas/safety/foundation.js.map +1 -1
  32. package/dist/doc-schemas/safety/provenance.d.ts +4 -4
  33. package/dist/doc-schemas/safety/provenance.d.ts.map +1 -1
  34. package/dist/doc-schemas/safety/provenance.js +7 -17
  35. package/dist/doc-schemas/safety/provenance.js.map +1 -1
  36. package/dist/ids/chat-ids.d.ts +5 -0
  37. package/dist/ids/chat-ids.d.ts.map +1 -1
  38. package/dist/ids/chat-ids.js +7 -0
  39. package/dist/ids/chat-ids.js.map +1 -1
  40. package/dist/schemas/ncii.d.ts +0 -16
  41. package/dist/schemas/ncii.d.ts.map +1 -1
  42. package/dist/schemas/ncii.js +1 -15
  43. package/dist/schemas/ncii.js.map +1 -1
  44. package/package.json +1 -1
@@ -91,8 +91,7 @@ export interface UserFacingReasonOption {
91
91
  /** User-facing reason picklist for the guided case-resolution flow — the affected user sees the
92
92
  * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own
93
93
  * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by
94
- * importing from here. Final user-/legal-facing wording is subject to lawyer review; these are
95
- * functional defaults. */
94
+ * importing from here. */
96
95
  export declare const USER_FACING_REASON_OPTIONS: readonly [{
97
96
  readonly code: "harassment";
98
97
  readonly label: "Harassment or bullying";
@@ -1 +1 @@
1
- {"version":3,"file":"admin-labels.d.ts","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,C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,CAAC,mBAAmB,EAAE,MAAM,CAK7E,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,CAMhF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,+EACwC,CAAC;AAE/E,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAEjD,gGAAgG;AAChG,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,oGAAoG;AACpG,eAAO,MAAM,oCAAoC,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAQtF,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAQtE,CAAC"}
@@ -119,8 +119,7 @@ export const REPORT_DISPOSITION_OPTIONS = [
119
119
  /** User-facing reason picklist for the guided case-resolution flow — the affected user sees the
120
120
  * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own
121
121
  * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by
122
- * importing from here. Final user-/legal-facing wording is subject to lawyer review; these are
123
- * functional defaults. */
122
+ * importing from here. */
124
123
  export const USER_FACING_REASON_OPTIONS = [
125
124
  {
126
125
  code: 'harassment',
@@ -1 +1 @@
1
- {"version":3,"file":"admin-labels.js","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,8CAA8C;AAC9C,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,iCAAiC;AACjC,+EAA+E;AAmB/E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGnE,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAsC;IAC3E,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACj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,6BAA6B,GAAwC;IAChF,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,UAAU,EAAE,YAAY;IACxB,mBAAmB,EAAE,YAAY;CAClC,CAAC;AAEF,qGAAqG;AACrG,MAAM,CAAC,MAAM,4BAA4B,GAA4C;IACnF,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,eAAe,EAAE,UAAU;IAC3B,iBAAiB,EAAE,QAAQ;CAC5B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GACpC,4EAA4E,CAAC;AAE/E,0FAA0F;AAC1F,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,gGAAgG;AAChG,MAAM,CAAC,MAAM,kCAAkC,GAAG,QAAQ,CAAC;AAE3D,oGAAoG;AACpG,MAAM,CAAC,MAAM,oCAAoC,GAA0C;IACzF,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,qBAAqB,EAAE,uBAAuB;CAC/C,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAuC;IACzE,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["// ============================================================================\n// ADMIN-SURFACE DISPLAY LABELS — the ONE home for business display copy keyed\n// by canonical ttt-core enums (ARCH-102). Any client (web, phone, TV, admin app)\n// renders the same labels by importing these.\n//\n// A few entries here are copy for ADMIN-MANAGED content that a PUBLIC surface also\n// renders (the Rules & Agreements section titles). The organizing principle is one\n// declaration, not one consumer.\n// ============================================================================\n\nimport type { UserAccountStatus } from '../doc-schemas/user.js';\nimport type { HallContentTextSurface } from '../doc-schemas/content.js';\nimport type { ReportDisposition, NciiInternalStatus } from '../doc-schemas/safety/foundation.js';\nimport type { ChildSafetyWorkStatus } from '../doc-schemas/safety/case.js';\nimport type { AdminDispatch } from '../doc-schemas/messaging.js';\nimport type { Audition } from '../doc-schemas/commissions.js';\nimport type { FeedbackType } from './business-admin.js';\nimport type { ClearableTextFieldName } from './business-content.js';\n// Value import: the per-surface override type below indexes this map to restrict each surface's\n// override keys to the fields that surface actually exposes.\nimport { HALL_CONTENT_TEXT_FIELDS } from './business-content.js';\nimport type { BroadcastAudienceSelector } from '../schemas/notification.js';\nimport type { DeadLetterCollection } from '../schemas/admin.js';\nimport type { GuildInviteConversationStatus, ShortLinkTargetType } from '../schemas/atoms.js';\nimport type { CommissionProposalStatus } from '../schemas/commissions.js';\nimport type { InviteSourceType } from '../schemas/work-project-management.js';\nimport type { HallWingType, RuleGroup, WorkProjectType } from '../types/content.js';\nimport { HALL_WING_TYPES, WORK_PROJECT_TYPES } from './options.js';\nimport type { HallSubItemStatus } from '../utils/hall-content.js';\n\n/** Moderation status labels (user-management view, status badges). */\nexport const USER_ACCOUNT_STATUS_LABELS: Record<UserAccountStatus, string> = {\n active: 'Active',\n suspended: 'Suspended',\n banned: 'Banned',\n};\n\n/** Broadcast audience selector labels (announcement composer). */\nexport const BROADCAST_AUDIENCE_KIND_LABELS: Record<BroadcastAudienceSelector['kind'], string> = {\n allActiveUsers: 'All active users',\n allArtisans: 'All artisan creators',\n explicitUids: 'Specific users (paste uids)',\n workMembers: \"A Work's guild members\",\n realmMembers: \"A Realm's members\",\n};\n\n/** Human labels for the canonical feedback types — the admin feedback-suggestions views and\n * the user-facing feedback-submission surface render these instead of restating copy. Keyed\n * by FeedbackType, so a new FEEDBACK_TYPES member fails the build until its label exists.\n * UI copy uses the SHORT settled terms (Trade → \"Trades\", Craft → \"Craft Tags\", Genre →\n * \"<Kind> Genres\"), never the compound code identifiers (ARCH-107). */\nexport const FEEDBACK_TYPE_LABELS: Record<FeedbackType, string> = {\n tradeProfessionSuggestions: 'Trades',\n craftSkillTagSuggestions: 'Craft Tags',\n talesWorkGenreSuggestions: 'Tales Genres',\n tunesWorkGenreSuggestions: 'Tunes Genres',\n televisionWorkGenreSuggestions: 'Television Genres',\n};\n\n/**\n * Human labels for the raw clearable/changeable TEXT-FIELD names the moderation text-clear\n * remedy and the published \"Update details\" change-request flow work in. The backend stores and\n * validates the raw doc field names (`workingTitle`, `description`, `content`); these are the\n * only display strings for them — rendered by the member-facing \"text removed by moderation\"\n * banners, every admin clear-text field picker, the change-request dialog, and the admin\n * change-request work view. Keyed by the derived ClearableTextFieldName union, so a new\n * clearable field fails the build here until it has a label (ARCH-102).\n *\n * The `working*` pair belongs to the Work shell and the Realm doc; the labels stay the plain\n * short terms (ARCH-107 — the code identifier carries `working`, the UI never shows it).\n */\nexport const CLEARABLE_TEXT_FIELD_LABELS: Record<ClearableTextFieldName, string> = {\n workingTitle: 'Title',\n workingDescription: 'Description',\n title: 'Title',\n description: 'Description',\n content: 'Content',\n};\n\n/**\n * Per-surface label overrides for the field labels above: `[surface][field] → label`. Only a\n * surface that genuinely names a field differently appears here; everything else resolves to the\n * base map. Each surface's override keys are restricted to the fields THAT surface exposes\n * (indexed off `HALL_CONTENT_TEXT_FIELDS`), so an override for a field the surface does not have\n * is a compile error — as is an override for a surface outside `HallContentTextSurface`.\n */\nexport type ClearableTextFieldLabelOverrides = {\n [S in HallContentTextSurface]?: {\n [F in (typeof HALL_CONTENT_TEXT_FIELDS)[S][number]]?: string;\n };\n};\n\n/**\n * A Realm's identity field is called **Name** on every Realm surface. The `workingTitle` doc\n * field is shared with the Work shell, where it IS a Title — so the difference is per-surface, not\n * per-field, and lives here rather than flattening one of the two settled terms.\n */\nexport const CLEARABLE_TEXT_FIELD_LABEL_OVERRIDES = {\n workRealm: { workingTitle: 'Name' },\n} as const satisfies ClearableTextFieldLabelOverrides;\n\n/**\n * The display label for one raw clearable text-field name: the surface's override when it has\n * one, otherwise the base label, otherwise the raw name. This is the ONE accessor every surface\n * calls — pass the surface whenever the caller knows it (a Realm surface must, or it renders\n * \"Title\" for a Name); omit it only for a genuinely surface-agnostic caller.\n *\n * Both parameters tolerate a plain `string` because callers read field names off stored documents\n * (`moderationClearedFields`) and callable payloads, and the surface may be the `workProject`\n * shell — which is a clearable surface but not a `HallContentTextSurface`, so it simply has no\n * overrides and falls through to the base map.\n */\nexport function clearableTextFieldLabel(field: string, surface?: string): string {\n const overrides = surface\n ? (CLEARABLE_TEXT_FIELD_LABEL_OVERRIDES as Record<string, Record<string, string> | undefined>)[\n surface\n ]\n : undefined;\n return (\n overrides?.[field] ?? (CLEARABLE_TEXT_FIELD_LABELS as Record<string, string>)[field] ?? field\n );\n}\n\n/** What the admin screens show for a thread whose `awaitingAdminReply` is set. */\nexport const ADMIN_DISPATCH_AWAITING_REPLY_LABEL = 'Awaiting reply';\n\n/** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */\nexport const DEAD_LETTER_COLLECTION_LABELS: Record<DeadLetterCollection, string> = {\n chatSyncEvents: 'Chat sync event',\n chatAdminActionCommands: 'Chat moderation command',\n notificationDeliveries: 'Notification delivery',\n chatMessageOutbox: 'Chat message publish',\n squareAnnouncementJobs: 'Square announcement',\n chatSyncFanoutJobs: 'Chat access fanout',\n mediaAssets: 'Media authority sync',\n quarantineSagaJobs: 'Quarantine saga',\n nciiRemovalJobs: 'NCII removal',\n safetyEvidenceJobs: 'Safety evidence job',\n accountActionCommands: 'Account safety action',\n activeReportGroups: 'Report edge sync',\n hallSubItemEdgeSync: 'Hall sub-item edge sync',\n chatParkedDeliveries: 'Chat room delivery',\n};\n\n/** Operator-settable report dispositions with their console copy. 'undetermined' is the\n * initial state, never a settable target, so it carries no option entry. */\nexport const REPORT_DISPOSITION_OPTIONS: readonly {\n value: Exclude<ReportDisposition, 'undetermined'>;\n label: string;\n description: string;\n}[] = [\n {\n value: 'reportRequired',\n label: 'Report required (NCMEC)',\n description:\n 'Apparent CSAM — a report is legally required. Establishes actual knowledge + arms the clock.',\n },\n {\n value: 'notRequired',\n label: 'No report required',\n description: 'No reporting obligation ever arose. Disallowed once there is a validated match.',\n },\n {\n value: 'correctedNoApparentViolation',\n label: 'False positive — correct it',\n description: 'There was a triggering signal but on review it is a false positive.',\n },\n];\n\n/** One user-facing reason option (shown to the affected user for any user-affecting action). */\nexport interface UserFacingReasonOption {\n code: string;\n label: string;\n description: string;\n}\n\n/** User-facing reason picklist for the guided case-resolution flow — the affected user sees the\n * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own\n * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by\n * importing from here. Final user-/legal-facing wording is subject to lawyer review; these are\n * functional defaults. */\nexport const USER_FACING_REASON_OPTIONS = [\n {\n code: 'harassment',\n label: 'Harassment or bullying',\n description: 'Targeted abuse, threats, or sustained harassment of a person.',\n },\n {\n code: 'hate',\n label: 'Hate speech',\n description: 'Attacks on people based on a protected characteristic.',\n },\n {\n code: 'adult-content',\n label: 'Explicit / adult content',\n description: 'Sexual or graphic content not allowed on the platform.',\n },\n {\n code: 'violence',\n label: 'Violence or threats',\n description: 'Threats of violence, or content glorifying or inciting it.',\n },\n {\n code: 'spam',\n label: 'Spam or scam',\n description: 'Unsolicited bulk content, deceptive links, or fraud.',\n },\n {\n code: 'impersonation',\n label: 'Impersonation',\n description: 'Pretending to be another person, brand, or entity.',\n },\n {\n code: 'ip',\n label: 'Intellectual property',\n description: 'Use of someone else’s work without the right to do so.',\n },\n {\n code: 'nonconsensual',\n label: 'Nonconsensual intimate imagery',\n description: 'Intimate or sexual imagery shared without the subject’s consent.',\n },\n {\n code: 'safety',\n label: 'Safety violation',\n description: 'A serious safety violation handled under our safety policies.',\n },\n {\n code: 'other',\n label: 'Other (explain)',\n description: 'A policy violation not covered above — describe it in the detail box.',\n },\n] as const satisfies readonly UserFacingReasonOption[];\n\n/** One user-facing reason code — the codes the picklist owns, never a free string. */\nexport type UserFacingReasonCode = (typeof USER_FACING_REASON_OPTIONS)[number]['code'];\n\n/** Every user-facing reason code, in picklist order. */\nexport const USER_FACING_REASON_CODES = USER_FACING_REASON_OPTIONS.map((o) => o.code) as [\n UserFacingReasonCode,\n ...UserFacingReasonCode[],\n];\n\n/** The user-facing label for a reason code (undefined when the code is unknown/absent). */\nexport function userFacingReasonLabel(code: string | undefined): string | undefined {\n return USER_FACING_REASON_OPTIONS.find((o) => o.code === code)?.label;\n}\n\n// --- Rules & Agreements section titles and type labels ---\n// The admin rules editor and the public rules page both render these (ENG-002).\n\n/** Each fixed rule group's heading. */\nexport const RULE_GROUP_TITLES: Record<RuleGroup, string> = {\n generic: 'General Site Rules',\n merchandising: 'Merchandising, Endorsements & Revenue Sharing',\n hallWing: 'Hall Wing Rules',\n workRealm: 'Realm Rules',\n};\nexport const ARTISAN_AGREEMENTS_TITLE = 'Artisan Agreements';\n\n/**\n * The label for a rule or agreement point narrowed to one type (\"Tales only\", \"Educational wing\n * only\", \"Tales, Educational wing only\"); undefined when it applies to every type.\n */\nexport function appliesToTypeLabel(entry: {\n workProjectType?: WorkProjectType;\n hallWingType?: HallWingType;\n}): string | undefined {\n const parts = [\n entry.workProjectType && WORK_PROJECT_TYPES[entry.workProjectType].label,\n entry.hallWingType && `${HALL_WING_TYPES[entry.hallWingType].label} wing`,\n ].filter((part): part is string => Boolean(part));\n return parts.length > 0 ? `${parts.join(', ')} only` : undefined;\n}\n\n// --- Stored-enum display labels ---\n// What a screen shows for a stored enum value, keyed by the canonical union so a new member fails\n// the build until it has its text. A screen renders the label, never the raw value.\n\n/** Guild invite statuses (a Work's invited-users list and an invite conversation's status line). */\nexport const GUILD_INVITE_STATUS_LABELS: Record<GuildInviteConversationStatus, string> = {\n pending: 'Pending',\n accepted: 'Accepted',\n declined: 'Declined',\n cancelled: 'Cancelled',\n finalized: 'Finalized',\n};\n\n/** Commission proposal statuses (a Work's proposals table). */\nexport const COMMISSION_PROPOSAL_STATUS_LABELS: Record<CommissionProposalStatus, string> = {\n open: 'Open',\n invited: 'Invited',\n accepted: 'Accepted',\n rejected: 'Rejected',\n};\n\n/** Chapter, track, and episode review statuses (the Tale, Tune, and Television section tables). */\nexport const HALL_SUB_ITEM_STATUS_LABELS: Record<HallSubItemStatus, string> = {\n unpublished: 'unpublished',\n pending_approval: 'Pending approval',\n published: 'published',\n};\n\n/** Audition statuses (the audition page). */\nexport const AUDITION_STATUS_LABELS: Record<Audition['status'], string> = {\n open: 'Open',\n closed: 'Closed',\n pendingReview: 'PendingReview',\n};\n\n/** Work types (Work lists, the Work overview, the Works popover). */\nexport const WORK_PROJECT_TYPE_LABELS: Record<WorkProjectType, string> = {\n Tales: 'Tales',\n Tunes: 'Tunes',\n Television: 'Television',\n};\n\n/** Invite source types, as the invite dialog names the context an invite was sent from. */\nexport const INVITE_SOURCE_TYPE_LABELS: Record<InviteSourceType, string> = {\n standalone: 'standalone',\n craftSkill: 'craftSkill',\n commission: 'commission',\n audition: 'audition',\n};\n\n/** Short-link target types (the admin Short Links list), in the target-type enum's order. */\nexport const SHORT_LINK_TARGET_TYPE_LABELS: Record<ShortLinkTargetType, string> = {\n audition: 'Audition',\n 'audition-entry': 'Audition entry',\n commission: 'Commission',\n 'hall-library-item': 'Hall entry',\n};\n\n/** Support-thread statuses (a member's Messages, a Work's Correspondence, the admin browse list). */\nexport const ADMIN_DISPATCH_STATUS_LABELS: Record<AdminDispatch['status'], string> = {\n open: 'Open',\n user_reply: 'User replied',\n admin_reply: 'Admin replied',\n closed_resolved: 'Resolved',\n closed_unresolved: 'Closed',\n};\n\n/**\n * Why a full admin cannot remove their own Admin standing: the server refuses it, and the roster\n * panel withholds the control with the same words. Another full admin removes it.\n */\nexport const ADMIN_SELF_REVOKE_REFUSAL =\n \"You can't revoke your own admin standing. Ask another full admin to do it.\";\n\n/** The marker beside the sender of a support-thread message sent with admin authority. */\nexport const ADMIN_SENDER_MARKER_LABEL = 'Admin';\n\n/** The sender label on a support thread's system line (a close notice) in the admin preview. */\nexport const ADMIN_DISPATCH_SYSTEM_SENDER_LABEL = 'System';\n\n/** Child-safety case work statuses (the safety case console's case rows and closed-case lookup). */\nexport const CHILD_SAFETY_CASE_WORK_STATUS_LABELS: Record<ChildSafetyWorkStatus, string> = {\n new: 'new',\n triaged: 'triaged',\n reporting: 'reporting',\n actioning: 'actioning',\n processing: 'processing',\n failed: 'failed',\n operationallyResolved: 'operationallyResolved',\n};\n\n/** NCII case statuses (the safety case console's case rows and closed-case lookup). */\nexport const NCII_CASE_STATUS_LABELS: Record<NciiInternalStatus, string> = {\n open: 'open',\n removalInProgress: 'removalInProgress',\n processing: 'processing',\n failed: 'failed',\n removed: 'removed',\n rejected: 'rejected',\n closed: 'closed',\n};\n"]}
1
+ {"version":3,"file":"admin-labels.js","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,8CAA8C;AAC9C,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,iCAAiC;AACjC,+EAA+E;AAmB/E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGnE,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAsC;IAC3E,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,8BAA8B,GAAsD;IAC/F,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,6BAA6B;IAC3C,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,mBAAmB;CAClC,CAAC;AAEF;;;;uEAIuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAiC;IAChE,0BAA0B,EAAE,QAAQ;IACpC,wBAAwB,EAAE,YA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5B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GACpC,4EAA4E,CAAC;AAE/E,0FAA0F;AAC1F,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,gGAAgG;AAChG,MAAM,CAAC,MAAM,kCAAkC,GAAG,QAAQ,CAAC;AAE3D,oGAAoG;AACpG,MAAM,CAAC,MAAM,oCAAoC,GAA0C;IACzF,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,qBAAqB,EAAE,uBAAuB;CAC/C,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAuC;IACzE,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["// ============================================================================\n// ADMIN-SURFACE DISPLAY LABELS — the ONE home for business display copy keyed\n// by canonical ttt-core enums (ARCH-102). Any client (web, phone, TV, admin app)\n// renders the same labels by importing these.\n//\n// A few entries here are copy for ADMIN-MANAGED content that a PUBLIC surface also\n// renders (the Rules & Agreements section titles). The organizing principle is one\n// declaration, not one consumer.\n// ============================================================================\n\nimport type { UserAccountStatus } from '../doc-schemas/user.js';\nimport type { HallContentTextSurface } from '../doc-schemas/content.js';\nimport type { ReportDisposition, NciiInternalStatus } from '../doc-schemas/safety/foundation.js';\nimport type { ChildSafetyWorkStatus } from '../doc-schemas/safety/case.js';\nimport type { AdminDispatch } from '../doc-schemas/messaging.js';\nimport type { Audition } from '../doc-schemas/commissions.js';\nimport type { FeedbackType } from './business-admin.js';\nimport type { ClearableTextFieldName } from './business-content.js';\n// Value import: the per-surface override type below indexes this map to restrict each surface's\n// override keys to the fields that surface actually exposes.\nimport { HALL_CONTENT_TEXT_FIELDS } from './business-content.js';\nimport type { BroadcastAudienceSelector } from '../schemas/notification.js';\nimport type { DeadLetterCollection } from '../schemas/admin.js';\nimport type { GuildInviteConversationStatus, ShortLinkTargetType } from '../schemas/atoms.js';\nimport type { CommissionProposalStatus } from '../schemas/commissions.js';\nimport type { InviteSourceType } from '../schemas/work-project-management.js';\nimport type { HallWingType, RuleGroup, WorkProjectType } from '../types/content.js';\nimport { HALL_WING_TYPES, WORK_PROJECT_TYPES } from './options.js';\nimport type { HallSubItemStatus } from '../utils/hall-content.js';\n\n/** Moderation status labels (user-management view, status badges). */\nexport const USER_ACCOUNT_STATUS_LABELS: Record<UserAccountStatus, string> = {\n active: 'Active',\n suspended: 'Suspended',\n banned: 'Banned',\n};\n\n/** Broadcast audience selector labels (announcement composer). */\nexport const BROADCAST_AUDIENCE_KIND_LABELS: Record<BroadcastAudienceSelector['kind'], string> = {\n allActiveUsers: 'All active users',\n allArtisans: 'All artisan creators',\n explicitUids: 'Specific users (paste uids)',\n workMembers: \"A Work's guild members\",\n realmMembers: \"A Realm's members\",\n};\n\n/** Human labels for the canonical feedback types — the admin feedback-suggestions views and\n * the user-facing feedback-submission surface render these instead of restating copy. Keyed\n * by FeedbackType, so a new FEEDBACK_TYPES member fails the build until its label exists.\n * UI copy uses the SHORT settled terms (Trade → \"Trades\", Craft → \"Craft Tags\", Genre →\n * \"<Kind> Genres\"), never the compound code identifiers (ARCH-107). */\nexport const FEEDBACK_TYPE_LABELS: Record<FeedbackType, string> = {\n tradeProfessionSuggestions: 'Trades',\n craftSkillTagSuggestions: 'Craft Tags',\n talesWorkGenreSuggestions: 'Tales Genres',\n tunesWorkGenreSuggestions: 'Tunes Genres',\n televisionWorkGenreSuggestions: 'Television Genres',\n};\n\n/**\n * Human labels for the raw clearable/changeable TEXT-FIELD names the moderation text-clear\n * remedy and the published \"Update details\" change-request flow work in. The backend stores and\n * validates the raw doc field names (`workingTitle`, `description`, `content`); these are the\n * only display strings for them — rendered by the member-facing \"text removed by moderation\"\n * banners, every admin clear-text field picker, the change-request dialog, and the admin\n * change-request work view. Keyed by the derived ClearableTextFieldName union, so a new\n * clearable field fails the build here until it has a label (ARCH-102).\n *\n * The `working*` pair belongs to the Work shell and the Realm doc; the labels stay the plain\n * short terms (ARCH-107 — the code identifier carries `working`, the UI never shows it).\n */\nexport const CLEARABLE_TEXT_FIELD_LABELS: Record<ClearableTextFieldName, string> = {\n workingTitle: 'Title',\n workingDescription: 'Description',\n title: 'Title',\n description: 'Description',\n content: 'Content',\n};\n\n/**\n * Per-surface label overrides for the field labels above: `[surface][field] → label`. Only a\n * surface that genuinely names a field differently appears here; everything else resolves to the\n * base map. Each surface's override keys are restricted to the fields THAT surface exposes\n * (indexed off `HALL_CONTENT_TEXT_FIELDS`), so an override for a field the surface does not have\n * is a compile error — as is an override for a surface outside `HallContentTextSurface`.\n */\nexport type ClearableTextFieldLabelOverrides = {\n [S in HallContentTextSurface]?: {\n [F in (typeof HALL_CONTENT_TEXT_FIELDS)[S][number]]?: string;\n };\n};\n\n/**\n * A Realm's identity field is called **Name** on every Realm surface. The `workingTitle` doc\n * field is shared with the Work shell, where it IS a Title — so the difference is per-surface, not\n * per-field, and lives here rather than flattening one of the two settled terms.\n */\nexport const CLEARABLE_TEXT_FIELD_LABEL_OVERRIDES = {\n workRealm: { workingTitle: 'Name' },\n} as const satisfies ClearableTextFieldLabelOverrides;\n\n/**\n * The display label for one raw clearable text-field name: the surface's override when it has\n * one, otherwise the base label, otherwise the raw name. This is the ONE accessor every surface\n * calls — pass the surface whenever the caller knows it (a Realm surface must, or it renders\n * \"Title\" for a Name); omit it only for a genuinely surface-agnostic caller.\n *\n * Both parameters tolerate a plain `string` because callers read field names off stored documents\n * (`moderationClearedFields`) and callable payloads, and the surface may be the `workProject`\n * shell — which is a clearable surface but not a `HallContentTextSurface`, so it simply has no\n * overrides and falls through to the base map.\n */\nexport function clearableTextFieldLabel(field: string, surface?: string): string {\n const overrides = surface\n ? (CLEARABLE_TEXT_FIELD_LABEL_OVERRIDES as Record<string, Record<string, string> | undefined>)[\n surface\n ]\n : undefined;\n return (\n overrides?.[field] ?? (CLEARABLE_TEXT_FIELD_LABELS as Record<string, string>)[field] ?? field\n );\n}\n\n/** What the admin screens show for a thread whose `awaitingAdminReply` is set. */\nexport const ADMIN_DISPATCH_AWAITING_REPLY_LABEL = 'Awaiting reply';\n\n/** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */\nexport const DEAD_LETTER_COLLECTION_LABELS: Record<DeadLetterCollection, string> = {\n chatSyncEvents: 'Chat sync event',\n chatAdminActionCommands: 'Chat moderation command',\n notificationDeliveries: 'Notification delivery',\n chatMessageOutbox: 'Chat message publish',\n squareAnnouncementJobs: 'Square announcement',\n chatSyncFanoutJobs: 'Chat access fanout',\n mediaAssets: 'Media authority sync',\n quarantineSagaJobs: 'Quarantine saga',\n nciiRemovalJobs: 'NCII removal',\n safetyEvidenceJobs: 'Safety evidence job',\n accountActionCommands: 'Account safety action',\n activeReportGroups: 'Report edge sync',\n hallSubItemEdgeSync: 'Hall sub-item edge sync',\n chatParkedDeliveries: 'Chat room delivery',\n};\n\n/** Operator-settable report dispositions with their console copy. 'undetermined' is the\n * initial state, never a settable target, so it carries no option entry. */\nexport const REPORT_DISPOSITION_OPTIONS: readonly {\n value: Exclude<ReportDisposition, 'undetermined'>;\n label: string;\n description: string;\n}[] = [\n {\n value: 'reportRequired',\n label: 'Report required (NCMEC)',\n description:\n 'Apparent CSAM — a report is legally required. Establishes actual knowledge + arms the clock.',\n },\n {\n value: 'notRequired',\n label: 'No report required',\n description: 'No reporting obligation ever arose. Disallowed once there is a validated match.',\n },\n {\n value: 'correctedNoApparentViolation',\n label: 'False positive — correct it',\n description: 'There was a triggering signal but on review it is a false positive.',\n },\n];\n\n/** One user-facing reason option (shown to the affected user for any user-affecting action). */\nexport interface UserFacingReasonOption {\n code: string;\n label: string;\n description: string;\n}\n\n/** User-facing reason picklist for the guided case-resolution flow — the affected user sees the\n * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own\n * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by\n * importing from here. */\nexport const USER_FACING_REASON_OPTIONS = [\n {\n code: 'harassment',\n label: 'Harassment or bullying',\n description: 'Targeted abuse, threats, or sustained harassment of a person.',\n },\n {\n code: 'hate',\n label: 'Hate speech',\n description: 'Attacks on people based on a protected characteristic.',\n },\n {\n code: 'adult-content',\n label: 'Explicit / adult content',\n description: 'Sexual or graphic content not allowed on the platform.',\n },\n {\n code: 'violence',\n label: 'Violence or threats',\n description: 'Threats of violence, or content glorifying or inciting it.',\n },\n {\n code: 'spam',\n label: 'Spam or scam',\n description: 'Unsolicited bulk content, deceptive links, or fraud.',\n },\n {\n code: 'impersonation',\n label: 'Impersonation',\n description: 'Pretending to be another person, brand, or entity.',\n },\n {\n code: 'ip',\n label: 'Intellectual property',\n description: 'Use of someone else’s work without the right to do so.',\n },\n {\n code: 'nonconsensual',\n label: 'Nonconsensual intimate imagery',\n description: 'Intimate or sexual imagery shared without the subject’s consent.',\n },\n {\n code: 'safety',\n label: 'Safety violation',\n description: 'A serious safety violation handled under our safety policies.',\n },\n {\n code: 'other',\n label: 'Other (explain)',\n description: 'A policy violation not covered above — describe it in the detail box.',\n },\n] as const satisfies readonly UserFacingReasonOption[];\n\n/** One user-facing reason code — the codes the picklist owns, never a free string. */\nexport type UserFacingReasonCode = (typeof USER_FACING_REASON_OPTIONS)[number]['code'];\n\n/** Every user-facing reason code, in picklist order. */\nexport const USER_FACING_REASON_CODES = USER_FACING_REASON_OPTIONS.map((o) => o.code) as [\n UserFacingReasonCode,\n ...UserFacingReasonCode[],\n];\n\n/** The user-facing label for a reason code (undefined when the code is unknown/absent). */\nexport function userFacingReasonLabel(code: string | undefined): string | undefined {\n return USER_FACING_REASON_OPTIONS.find((o) => o.code === code)?.label;\n}\n\n// --- Rules & Agreements section titles and type labels ---\n// The admin rules editor and the public rules page both render these (ENG-002).\n\n/** Each fixed rule group's heading. */\nexport const RULE_GROUP_TITLES: Record<RuleGroup, string> = {\n generic: 'General Site Rules',\n merchandising: 'Merchandising, Endorsements & Revenue Sharing',\n hallWing: 'Hall Wing Rules',\n workRealm: 'Realm Rules',\n};\nexport const ARTISAN_AGREEMENTS_TITLE = 'Artisan Agreements';\n\n/**\n * The label for a rule or agreement point narrowed to one type (\"Tales only\", \"Educational wing\n * only\", \"Tales, Educational wing only\"); undefined when it applies to every type.\n */\nexport function appliesToTypeLabel(entry: {\n workProjectType?: WorkProjectType;\n hallWingType?: HallWingType;\n}): string | undefined {\n const parts = [\n entry.workProjectType && WORK_PROJECT_TYPES[entry.workProjectType].label,\n entry.hallWingType && `${HALL_WING_TYPES[entry.hallWingType].label} wing`,\n ].filter((part): part is string => Boolean(part));\n return parts.length > 0 ? `${parts.join(', ')} only` : undefined;\n}\n\n// --- Stored-enum display labels ---\n// What a screen shows for a stored enum value, keyed by the canonical union so a new member fails\n// the build until it has its text. A screen renders the label, never the raw value.\n\n/** Guild invite statuses (a Work's invited-users list and an invite conversation's status line). */\nexport const GUILD_INVITE_STATUS_LABELS: Record<GuildInviteConversationStatus, string> = {\n pending: 'Pending',\n accepted: 'Accepted',\n declined: 'Declined',\n cancelled: 'Cancelled',\n finalized: 'Finalized',\n};\n\n/** Commission proposal statuses (a Work's proposals table). */\nexport const COMMISSION_PROPOSAL_STATUS_LABELS: Record<CommissionProposalStatus, string> = {\n open: 'Open',\n invited: 'Invited',\n accepted: 'Accepted',\n rejected: 'Rejected',\n};\n\n/** Chapter, track, and episode review statuses (the Tale, Tune, and Television section tables). */\nexport const HALL_SUB_ITEM_STATUS_LABELS: Record<HallSubItemStatus, string> = {\n unpublished: 'unpublished',\n pending_approval: 'Pending approval',\n published: 'published',\n};\n\n/** Audition statuses (the audition page). */\nexport const AUDITION_STATUS_LABELS: Record<Audition['status'], string> = {\n open: 'Open',\n closed: 'Closed',\n pendingReview: 'PendingReview',\n};\n\n/** Work types (Work lists, the Work overview, the Works popover). */\nexport const WORK_PROJECT_TYPE_LABELS: Record<WorkProjectType, string> = {\n Tales: 'Tales',\n Tunes: 'Tunes',\n Television: 'Television',\n};\n\n/** Invite source types, as the invite dialog names the context an invite was sent from. */\nexport const INVITE_SOURCE_TYPE_LABELS: Record<InviteSourceType, string> = {\n standalone: 'standalone',\n craftSkill: 'craftSkill',\n commission: 'commission',\n audition: 'audition',\n};\n\n/** Short-link target types (the admin Short Links list), in the target-type enum's order. */\nexport const SHORT_LINK_TARGET_TYPE_LABELS: Record<ShortLinkTargetType, string> = {\n audition: 'Audition',\n 'audition-entry': 'Audition entry',\n commission: 'Commission',\n 'hall-library-item': 'Hall entry',\n};\n\n/** Support-thread statuses (a member's Messages, a Work's Correspondence, the admin browse list). */\nexport const ADMIN_DISPATCH_STATUS_LABELS: Record<AdminDispatch['status'], string> = {\n open: 'Open',\n user_reply: 'User replied',\n admin_reply: 'Admin replied',\n closed_resolved: 'Resolved',\n closed_unresolved: 'Closed',\n};\n\n/**\n * Why a full admin cannot remove their own Admin standing: the server refuses it, and the roster\n * panel withholds the control with the same words. Another full admin removes it.\n */\nexport const ADMIN_SELF_REVOKE_REFUSAL =\n \"You can't revoke your own admin standing. Ask another full admin to do it.\";\n\n/** The marker beside the sender of a support-thread message sent with admin authority. */\nexport const ADMIN_SENDER_MARKER_LABEL = 'Admin';\n\n/** The sender label on a support thread's system line (a close notice) in the admin preview. */\nexport const ADMIN_DISPATCH_SYSTEM_SENDER_LABEL = 'System';\n\n/** Child-safety case work statuses (the safety case console's case rows and closed-case lookup). */\nexport const CHILD_SAFETY_CASE_WORK_STATUS_LABELS: Record<ChildSafetyWorkStatus, string> = {\n new: 'new',\n triaged: 'triaged',\n reporting: 'reporting',\n actioning: 'actioning',\n processing: 'processing',\n failed: 'failed',\n operationallyResolved: 'operationallyResolved',\n};\n\n/** NCII case statuses (the safety case console's case rows and closed-case lookup). */\nexport const NCII_CASE_STATUS_LABELS: Record<NciiInternalStatus, string> = {\n open: 'open',\n removalInProgress: 'removalInProgress',\n processing: 'processing',\n failed: 'failed',\n removed: 'removed',\n rejected: 'rejected',\n closed: 'closed',\n};\n"]}
@@ -149,7 +149,7 @@ export declare const MAX_EVIDENCE_VAULT_KEY_LENGTH = 1024;
149
149
  export declare const MAX_NCII_REQUESTER_NAME_LENGTH = 256;
150
150
  /** Name of the depicted person a representative files on behalf of. */
151
151
  export declare const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;
152
- /** Representative's stated basis of authority (parent/guardian/counsel etc.). */
152
+ /** Representative's stated basis of authority (parent/guardian/lawyer etc.). */
153
153
  export declare const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;
154
154
  /** Optional pointer/reference to authority evidence supplied by a representative. */
155
155
  export declare const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;
@@ -1 +1 @@
1
- {"version":3,"file":"business-admin.d.ts","sourceRoot":"","sources":["../../src/constants/business-admin.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAEnF,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;IAK9B;+FAC2F;;CAEnF,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/F,mFAAmF;AACnF,eAAO,MAAM,4BAA4B;;;;;CAK/B,CAAC;AAIX,yDAAyD;AACzD,eAAO,MAAM,iCAAiC,MAAM,CAAC;AAErD,qEAAqE;AACrE,eAAO,MAAM,sCAAsC,OAAO,CAAC;AAI3D,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,OA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167
167
  /** Name of the depicted person a representative files on behalf of. */
168
168
  export const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;
169
- /** Representative's stated basis of authority (parent/guardian/counsel etc.). */
169
+ /** Representative's stated basis of authority (parent/guardian/lawyer etc.). */
170
170
  export const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;
171
171
  /** Optional pointer/reference to authority evidence supplied by a representative. */
172
172
  export const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;
@@ -1 +1 @@
1
- {"version":3,"file":"business-admin.js","sourceRoot":"","sources":["../../src/constants/business-admin.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAG3E,qCAAqC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,KAAK;CACA,CAAC;AAEX;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,IAAI;IACd;+FAC2F;IAC3F,aAAa,EAAE,IAAI;CACX,CAAC;AAIX,mFAAmF;AACnF,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC,GAAG;IAC5C,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC,MAAM;IAClD,CAAC,aAAa,CAAC,I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qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW;CACd,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,SAAS;IACT,kBAAkB;IAClB,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,qBAAqB;IACrB,eAAe;CACP,CAAC;AAGX,uGAAuG;AACvG,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,aAAa,EAAE,eAAe;IAC9B,sBAAsB,EAAE,iBAAiB;IACzC,UAAU,EAAE,kBAAkB;IAC9B,gBAAgB,EAAE,cAAc;IAChC,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,yBAAyB,EAAE,SAAS;IACpC,mBAAmB,EAAE,SAAS;IAC9B,qBAAqB,EAAE,gBAAgB;IACvC,kBAAkB,EAAE,gBAAgB;IACpC,wBAAwB,EAAE,qBAAqB;CACmB,CAAC;AAErE;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAAgB;IAC3D,OAAO,CACL,MAAM,CAAC,MAAM,CAAC,mCAAmC,EAAE,QAAQ,CAAC;QAC5D,mCAAmC,CAAC,QAAyB,CAAC,KAAK,SAAS,CAC7E,CAAC;AACJ,CAAC;AAED,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC","sourcesContent":["// Admin + content-moderation business-rule constants — task priority, dispatches,\n// the moderation/feedback workflow, and admin-task lifecycle.\nimport { ACTIVE_LIMITS } from './app-mode.js';\nimport { MAX_WORK_PROJECT_TITLE_LENGTH } from './business-work-project.js';\nimport type { AdminTaskType } from '../doc-schemas/report-docs.js';\n\n// --- Admin Task Priority System ---\n\nexport const TASK_PRIORITY = {\n CRITICAL: 4,\n HIGH: 3,\n NORMAL: 2,\n LOW: 1,\n} as const;\n\nexport type TaskPriorityLevel = (typeof TASK_PRIORITY)[keyof typeof TASK_PRIORITY];\n\nexport const TASK_PRIORITY_LABELS = {\n 4: 'CRITICAL',\n 3: 'HIGH',\n 2: 'NORMAL',\n 1: 'LOW',\n} as const;\n\n/**\n * Canonical NUMERIC priority scale for `adminTasks.priority`, shared by BOTH\n * priority systems so `checkoutNextImportantTask` (orderBy priority desc across all\n * task types) compares commensurable values. The userReport report-core score formula\n * already writes on this scale (≈40–2250); the level-based types (thresholdLibraryReview,\n * content-appeal, adminDispatch) map their TASK_PRIORITY level onto these numbers instead\n * of writing the raw 1–4.\n *\n * Resulting order: safety reports (1200–2250) > money anomalies (1100) >\n * CRITICAL (1000) > HIGH (800) > routine reports interleave below > spam-tier (~80).\n */\nexport const TASK_PRIORITY_SCORE = {\n LOW: 50,\n NORMAL: 200,\n HIGH: 800,\n CRITICAL: 1000,\n /** Money-integrity anomaly (stake-share / pledge-ledger corruption signal) — outranks\n * everything except safety-class reports. Every money-anomaly task creator writes this. */\n MONEY_ANOMALY: 1100,\n} as const;\n\nexport type TaskPriorityScore = (typeof TASK_PRIORITY_SCORE)[keyof typeof TASK_PRIORITY_SCORE];\n\n/** Maps a level-based TASK_PRIORITY value (1–4) to its canonical numeric score. */\nexport const TASK_PRIORITY_LEVEL_TO_SCORE = {\n [TASK_PRIORITY.LOW]: TASK_PRIORITY_SCORE.LOW,\n [TASK_PRIORITY.NORMAL]: TASK_PRIORITY_SCORE.NORMAL,\n [TASK_PRIORITY.HIGH]: TASK_PRIORITY_SCORE.HIGH,\n [TASK_PRIORITY.CRITICAL]: TASK_PRIORITY_SCORE.CRITICAL,\n} as const;\n\n// --- Admin Dispatches ---\n\n/** Maximum length for an admin-dispatch subject line. */\nexport const MAX_ADMIN_DISPATCH_SUBJECT_LENGTH = 100;\n\n/** Maximum length for the initial body text of an admin dispatch. */\nexport const MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH = 1000;\n\n// --- Content Moderation Workflow ---\n\n/** Maximum length for a content-violation appeal message. */\nexport const MAX_APPEAL_MESSAGE_LENGTH = 1000;\n\n/** Threshold-review reviewer notes (revision notes shown to the author). One owner for\n * the review callable schema AND the admin work-view input. */\nexport const MAX_THRESHOLD_REVIEW_NOTES_LENGTH = 2000;\n\n/** Operator-facing reason stamped on a threshold item whose publish parked terminally\n * (`publishParkedReason`). Server-authored text, bounded so a long copy-failure message\n * cannot grow the doc without limit. */\nexport const MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH = 2000;\n\n// --- Moderation / safety operator text caps ---\n// Each is declared ONCE here and derived by every input schema AND persisted doc schema\n// that carries the field — the numbers must never be re-hardcoded at an enforcement point.\n\n/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */\nexport const MAX_INTERNAL_REASON_LENGTH = 2000;\n\n/** The optional reason an admin records when closing an account discovered to be under 13. */\nexport const MAX_UNDER_13_CLOSE_REASON_LENGTH = 1000;\n\n/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */\nexport const MAX_USER_FACING_REASON_LENGTH = 280;\n\n/** Structured close-out summary on report/safety-case resolutions. */\nexport const MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH = 2000;\n\n/** Optional operator note attached to a close-out. */\nexport const MAX_SAFETY_ADMIN_NOTE_LENGTH = 4000;\n\n// --- Report intake text caps ---\n\n/** Reporter free-text narrative/comment (segregated private doc; never on the root). */\nexport const MAX_REPORT_NARRATIVE_LENGTH = 4000;\n\n/** The ids a client names as the target of a report — the item, its parent reference, and the\n * owner hint. They are hints the server re-derives, so the cap only bounds what is read. */\nexport const MAX_REPORT_TARGET_ID_LENGTH = 256;\n\n/** The report DIALOG's comment field cap (the client-side compose bound — tighter than\n * the server narrative cap above, which also absorbs upgrade concatenations). */\nexport const MAX_REPORT_COMMENT_LENGTH = 1000;\n\n/** Minimum operator rationale/reason length on safety-console staged actions. */\nexport const MIN_SAFETY_RATIONALE_LENGTH = 10;\n\n/** Operator reason on an admin chat-moderation action (adminModerateChatMessage /\n * adminReadChannelContext). ONE owner for both callables' `reason` bound. */\nexport const MAX_CHAT_MODERATION_REASON_LENGTH = 1000;\n\n/** Broadcast explicitUids selector audience cap (schema + composer both derive). */\nexport const MAX_BROADCAST_EXPLICIT_UIDS = 2000;\n\n// --- Operator step-up sentinel error codes ---\n// The two backend HttpsError messages the operator TOTP step-up throws; the frontend\n// matches them to open the step-up dialog in ENROLL vs VERIFY mode. ONE declaration —\n// both the callable (functions operatorStepUp.ts) and the frontend hook import these.\nexport const STEP_UP_ENROLL_REQUIRED = 'OPERATOR_STEP_UP_ENROLL_REQUIRED';\nexport const STEP_UP_REQUIRED = 'OPERATOR_STEP_UP_REQUIRED';\n\n/** How many digits an operator step-up authenticator code has. */\nexport const OPERATOR_STEP_UP_CODE_LENGTH = 6;\n\n/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */\nexport const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;\n\n// --- Admin console config-content text caps ---\n// Every number the system uses lives HERE — even a field only one surface consumes\n// today, because any future client (TV / phone / admin app) reads ttt-core.\n\nexport const MAX_FUTURE_PLAN_TITLE_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_DESCRIPTION_LENGTH = 4000;\nexport const MAX_PLATFORM_RULE_TITLE_LENGTH = 200;\nexport const MAX_PLATFORM_RULE_DESCRIPTION_LENGTH = 4000;\nexport const MAX_AGREEMENT_POINT_LENGTH = 2000;\n/** A public document page's intro (Future Plans, Rules & Agreements). */\nexport const MAX_PUBLIC_DOCUMENT_INTRO_LENGTH = 4000;\n/** A public document section's intention line (a Future Plans group, a rule group, Artisan Agreements). */\nexport const MAX_PUBLIC_DOCUMENT_INTENTION_LENGTH = 1000;\nexport const MAX_FUTURE_PLAN_GROUP_NAME_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_GROUPS = 50;\nexport const MAX_FUTURE_PLANS = 200;\nexport const MAX_PLATFORM_RULES = 500;\nexport const MAX_AGREEMENT_POINTS = 200;\nexport const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;\nexport const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;\n/** Sections in one long-form content page (Terms, Privacy, the DMCA policy's process text). */\nexport const MAX_CONTENT_PAGE_SECTIONS = 300;\nexport const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;\n/** DMCA policy page: the labeled contact blocks (service provider, designated agent) and their rows. */\nexport const MAX_DMCA_CONTACT_BLOCKS = 10;\nexport const MAX_DMCA_CONTACT_ROWS = 20;\nexport const MAX_DMCA_CONTACT_LABEL_LENGTH = 100;\nexport const MAX_DMCA_CONTACT_VALUE_LENGTH = 500;\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\n\n/** `_appConfig/app.appVersion` — the force-refresh version string VersionGate compares. */\nexport const MAX_APP_VERSION_LENGTH = 64;\n\n/** Announcement-banner copy on `_appConfig/app.announcementMessage`. Deliberately far\n * shorter than the maintenance message: the announcement renders as a one-line banner\n * on the landing page and login screen, not a full-page takeover. */\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n\n/** Admin notes on a content-appeal review (reviewContentAppeal). */\nexport const MAX_APPEAL_REVIEW_NOTES_LENGTH = 2000;\n\n/** Admin reason on a Work/Realm forced-retitle remedy. */\nexport const MAX_REQUIRE_RETITLE_REASON_LENGTH = 500;\n\n/** Optional user-facing DETAIL text on a normal-report resolution. */\nexport const MAX_USER_FACING_REASON_DETAIL_LENGTH = 2000;\n\n/** Admin broadcast / user notification message body. */\nexport const MAX_NOTIFICATION_MESSAGE_LENGTH = 2000;\n\n/** Admin broadcast title — the same length as a Work title. */\nexport const MAX_BROADCAST_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;\n\n/** Admin user-search query input. */\nexport const MAX_USER_SEARCH_QUERY_LENGTH = 100;\n\n// --- NCII / child-safety statutory + operator text caps ---\n\n/** Operator written rationale on a TAKE IT DOWN validity decision (immutable row). */\nexport const MAX_NCII_RATIONALE_LENGTH = 4000;\n\n/** Requester's statement of nonconsent (statutory intake — in-app and no-login). */\nexport const MAX_NCII_NONCONSENT_STATEMENT_LENGTH = 4000;\n\n/** Typed-name electronic signature on a statutory request. */\nexport const MAX_NCII_SIGNED_NAME_LENGTH = 256;\n\n/** Requester's optional supporting facts (statutory intake). */\nexport const MAX_NCII_SUPPORTING_FACTS_LENGTH = 8000;\n\n/** Bounded, non-sensitive summary on an NCII request action row. */\nexport const MAX_NCII_ACTION_SUMMARY_LENGTH = 280;\n\n/** Operator description of a registered evidence artifact (e.g. portal screenshot). */\nexport const MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH = 500;\n\n/** Operator proof note on a manual NCMEC portal filing. */\nexport const MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH = 2000;\n\n/** The report number NCMEC assigns a manual-portal filing, as the operator copies it. */\nexport const MAX_NCMEC_REPORT_NUMBER_LENGTH = 64;\n\n/** The key of an object in the restricted evidence vault — Cloud Storage caps an object name at\n * 1,024 bytes. */\nexport const MAX_EVIDENCE_VAULT_KEY_LENGTH = 1024;\n\n/** Requester's typed name on the no-login TAKE IT DOWN statutory intake. */\nexport const MAX_NCII_REQUESTER_NAME_LENGTH = 256;\n\n/** Name of the depicted person a representative files on behalf of. */\nexport const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;\n\n/** Representative's stated basis of authority (parent/guardian/counsel etc.). */\nexport const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;\n\n/** Optional pointer/reference to authority evidence supplied by a representative. */\nexport const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;\n\n/** The external URL a no-login statutory request names as the content to remove. */\nexport const MAX_NCII_LOCATOR_URL_LENGTH = 2048;\n\n/** The client-generated idempotency key of a statutory request: a retried submit carries the same\n * key, and the server derives the request id from it. */\nexport const NCII_IDEMPOTENCY_KEY_MIN_LENGTH = 8;\nexport const NCII_IDEMPOTENCY_KEY_MAX_LENGTH = 256;\n\n/** A statutory requester's contact email (the address-length ceiling of an email). */\nexport const MAX_NCII_CONTACT_EMAIL_LENGTH = 320;\n\n/** A statutory requester's contact phone number. */\nexport const NCII_CONTACT_PHONE_MIN_LENGTH = 3;\nexport const NCII_CONTACT_PHONE_MAX_LENGTH = 64;\n\n/** Maximum length for a feedback suggestion. */\nexport const MAX_FEEDBACK_SUGGESTION_LENGTH = 100;\n\n/** Maximum number of distinct submitters tracked per feedback suggestion. Mode-varied. */\nexport const MAX_FEEDBACK_SUBMITTERS = ACTIVE_LIMITS.batches.maxFeedbackSubmitters;\n\n/**\n * Canonical list of feedback types accepted by `submitFeedback`. Used both\n * for runtime validation in the schema (`SubmitFeedbackInputSchema`) and\n * for type-safe consumer props on the frontend `<FeedbackSubmission />`\n * component. Adding a new type here is the single source of truth — no\n * mirroring in callers required.\n */\nexport const FEEDBACK_TYPES = [\n 'tradeProfessionSuggestions',\n 'craftSkillTagSuggestions',\n 'talesWorkGenreSuggestions',\n 'tunesWorkGenreSuggestions',\n 'televisionWorkGenreSuggestions',\n] as const;\n\n/** Union of canonical feedback types. */\nexport type FeedbackType = (typeof FEEDBACK_TYPES)[number];\n\n/** Maximum number of items submitted in a single hallLibrary-review submission. Mode-varied. */\nexport const MAX_HALL_LIBRARY_SUBMIT_BATCH = ACTIVE_LIMITS.hall.maxSubmitBatch;\n\n// --- Admin Tasks ---\n\n/** Admin task lifecycle statuses. */\nexport const ADMIN_TASK_STATUS = {\n PENDING: 'pending',\n CHECKED_OUT: 'checkedOut',\n WORK_LATER: 'workLater',\n COMPLETED: 'completed',\n} as const;\n\n/**\n * Who resolves each kind of admin task. `checkin` means the generic queue check-in completes it\n * (the task carries no decision of its own). Every other owner is the domain decision that closes\n * the task — and deletes it in the same transaction — so a generic check-in must never mark one\n * of those tasks resolved: that would drop the decision it exists to collect.\n */\nexport const ADMIN_TASK_RESOLUTION_OWNERS = [\n 'checkin',\n 'reportResolution',\n 'thresholdReview',\n 'appealReview',\n 'refundDecision',\n 'changeRequestReview',\n 'dispatchClose',\n] as const;\nexport type AdminTaskResolutionOwner = (typeof ADMIN_TASK_RESOLUTION_OWNERS)[number];\n\n/** The resolution owner of every admin task type. A new task type fails the build until classified. */\nexport const ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE = {\n adminDispatch: 'dispatchClose',\n thresholdLibraryReview: 'thresholdReview',\n userReport: 'reportResolution',\n 'content-appeal': 'appealReview',\n stakeShareAnomaly: 'checkin',\n pledgeLedgerAnomaly: 'checkin',\n pledgePaymentRepairNeeded: 'checkin',\n pledgeDisputeOpened: 'checkin',\n pledgeRefundRequested: 'refundDecision',\n pledgeRefundFailed: 'refundDecision',\n hallContentChangeRequest: 'changeRequestReview',\n} as const satisfies Record<AdminTaskType, AdminTaskResolutionOwner>;\n\n/**\n * Whether a generic check-in may mark a task of this stored type resolved. The type is read off an\n * untrusted stored task as a string, so an unknown type answers `false` (fails closed).\n */\nexport function isAdminTaskResolvedByCheckin(taskType: string): boolean {\n return (\n Object.hasOwn(ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE, taskType) &&\n ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE[taskType as AdminTaskType] === 'checkin'\n );\n}\n\n/** The most accounts one `uidList` system slot can name. */\nexport const MAX_SYSTEM_UID_LIST = 25;\n"]}
1
+ {"version":3,"file":"business-admin.js","sourceRoot":"","sources":["../../src/constants/business-admin.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAG3E,qCAAqC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,CAAC,EAAE,UAAU;IACb,CAAC,E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AAM,CAAC,MAAM,CAAC,mCAAmC,EAAE,QAAQ,CAAC;QAC5D,mCAAmC,CAAC,QAAyB,CAAC,KAAK,SAAS,CAC7E,CAAC;AACJ,CAAC;AAED,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC","sourcesContent":["// Admin + content-moderation business-rule constants — task priority, dispatches,\n// the moderation/feedback workflow, and admin-task lifecycle.\nimport { ACTIVE_LIMITS } from './app-mode.js';\nimport { MAX_WORK_PROJECT_TITLE_LENGTH } from './business-work-project.js';\nimport type { AdminTaskType } from '../doc-schemas/report-docs.js';\n\n// --- Admin Task Priority System ---\n\nexport const TASK_PRIORITY = {\n CRITICAL: 4,\n HIGH: 3,\n NORMAL: 2,\n LOW: 1,\n} as const;\n\nexport type TaskPriorityLevel = (typeof TASK_PRIORITY)[keyof typeof TASK_PRIORITY];\n\nexport const TASK_PRIORITY_LABELS = {\n 4: 'CRITICAL',\n 3: 'HIGH',\n 2: 'NORMAL',\n 1: 'LOW',\n} as const;\n\n/**\n * Canonical NUMERIC priority scale for `adminTasks.priority`, shared by BOTH\n * priority systems so `checkoutNextImportantTask` (orderBy priority desc across all\n * task types) compares commensurable values. The userReport report-core score formula\n * already writes on this scale (≈40–2250); the level-based types (thresholdLibraryReview,\n * content-appeal, adminDispatch) map their TASK_PRIORITY level onto these numbers instead\n * of writing the raw 1–4.\n *\n * Resulting order: safety reports (1200–2250) > money anomalies (1100) >\n * CRITICAL (1000) > HIGH (800) > routine reports interleave below > spam-tier (~80).\n */\nexport const TASK_PRIORITY_SCORE = {\n LOW: 50,\n NORMAL: 200,\n HIGH: 800,\n CRITICAL: 1000,\n /** Money-integrity anomaly (stake-share / pledge-ledger corruption signal) — outranks\n * everything except safety-class reports. Every money-anomaly task creator writes this. */\n MONEY_ANOMALY: 1100,\n} as const;\n\nexport type TaskPriorityScore = (typeof TASK_PRIORITY_SCORE)[keyof typeof TASK_PRIORITY_SCORE];\n\n/** Maps a level-based TASK_PRIORITY value (1–4) to its canonical numeric score. */\nexport const TASK_PRIORITY_LEVEL_TO_SCORE = {\n [TASK_PRIORITY.LOW]: TASK_PRIORITY_SCORE.LOW,\n [TASK_PRIORITY.NORMAL]: TASK_PRIORITY_SCORE.NORMAL,\n [TASK_PRIORITY.HIGH]: TASK_PRIORITY_SCORE.HIGH,\n [TASK_PRIORITY.CRITICAL]: TASK_PRIORITY_SCORE.CRITICAL,\n} as const;\n\n// --- Admin Dispatches ---\n\n/** Maximum length for an admin-dispatch subject line. */\nexport const MAX_ADMIN_DISPATCH_SUBJECT_LENGTH = 100;\n\n/** Maximum length for the initial body text of an admin dispatch. */\nexport const MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH = 1000;\n\n// --- Content Moderation Workflow ---\n\n/** Maximum length for a content-violation appeal message. */\nexport const MAX_APPEAL_MESSAGE_LENGTH = 1000;\n\n/** Threshold-review reviewer notes (revision notes shown to the author). One owner for\n * the review callable schema AND the admin work-view input. */\nexport const MAX_THRESHOLD_REVIEW_NOTES_LENGTH = 2000;\n\n/** Operator-facing reason stamped on a threshold item whose publish parked terminally\n * (`publishParkedReason`). Server-authored text, bounded so a long copy-failure message\n * cannot grow the doc without limit. */\nexport const MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH = 2000;\n\n// --- Moderation / safety operator text caps ---\n// Each is declared ONCE here and derived by every input schema AND persisted doc schema\n// that carries the field — the numbers must never be re-hardcoded at an enforcement point.\n\n/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */\nexport const MAX_INTERNAL_REASON_LENGTH = 2000;\n\n/** The optional reason an admin records when closing an account discovered to be under 13. */\nexport const MAX_UNDER_13_CLOSE_REASON_LENGTH = 1000;\n\n/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */\nexport const MAX_USER_FACING_REASON_LENGTH = 280;\n\n/** Structured close-out summary on report/safety-case resolutions. */\nexport const MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH = 2000;\n\n/** Optional operator note attached to a close-out. */\nexport const MAX_SAFETY_ADMIN_NOTE_LENGTH = 4000;\n\n// --- Report intake text caps ---\n\n/** Reporter free-text narrative/comment (segregated private doc; never on the root). */\nexport const MAX_REPORT_NARRATIVE_LENGTH = 4000;\n\n/** The ids a client names as the target of a report — the item, its parent reference, and the\n * owner hint. They are hints the server re-derives, so the cap only bounds what is read. */\nexport const MAX_REPORT_TARGET_ID_LENGTH = 256;\n\n/** The report DIALOG's comment field cap (the client-side compose bound — tighter than\n * the server narrative cap above, which also absorbs upgrade concatenations). */\nexport const MAX_REPORT_COMMENT_LENGTH = 1000;\n\n/** Minimum operator rationale/reason length on safety-console staged actions. */\nexport const MIN_SAFETY_RATIONALE_LENGTH = 10;\n\n/** Operator reason on an admin chat-moderation action (adminModerateChatMessage /\n * adminReadChannelContext). ONE owner for both callables' `reason` bound. */\nexport const MAX_CHAT_MODERATION_REASON_LENGTH = 1000;\n\n/** Broadcast explicitUids selector audience cap (schema + composer both derive). */\nexport const MAX_BROADCAST_EXPLICIT_UIDS = 2000;\n\n// --- Operator step-up sentinel error codes ---\n// The two backend HttpsError messages the operator TOTP step-up throws; the frontend\n// matches them to open the step-up dialog in ENROLL vs VERIFY mode. ONE declaration —\n// both the callable (functions operatorStepUp.ts) and the frontend hook import these.\nexport const STEP_UP_ENROLL_REQUIRED = 'OPERATOR_STEP_UP_ENROLL_REQUIRED';\nexport const STEP_UP_REQUIRED = 'OPERATOR_STEP_UP_REQUIRED';\n\n/** How many digits an operator step-up authenticator code has. */\nexport const OPERATOR_STEP_UP_CODE_LENGTH = 6;\n\n/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */\nexport const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;\n\n// --- Admin console config-content text caps ---\n// Every number the system uses lives HERE — even a field only one surface consumes\n// today, because any future client (TV / phone / admin app) reads ttt-core.\n\nexport const MAX_FUTURE_PLAN_TITLE_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_DESCRIPTION_LENGTH = 4000;\nexport const MAX_PLATFORM_RULE_TITLE_LENGTH = 200;\nexport const MAX_PLATFORM_RULE_DESCRIPTION_LENGTH = 4000;\nexport const MAX_AGREEMENT_POINT_LENGTH = 2000;\n/** A public document page's intro (Future Plans, Rules & Agreements). */\nexport const MAX_PUBLIC_DOCUMENT_INTRO_LENGTH = 4000;\n/** A public document section's intention line (a Future Plans group, a rule group, Artisan Agreements). */\nexport const MAX_PUBLIC_DOCUMENT_INTENTION_LENGTH = 1000;\nexport const MAX_FUTURE_PLAN_GROUP_NAME_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_GROUPS = 50;\nexport const MAX_FUTURE_PLANS = 200;\nexport const MAX_PLATFORM_RULES = 500;\nexport const MAX_AGREEMENT_POINTS = 200;\nexport const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;\nexport const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;\n/** Sections in one long-form content page (Terms, Privacy, the DMCA policy's process text). */\nexport const MAX_CONTENT_PAGE_SECTIONS = 300;\nexport const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;\n/** DMCA policy page: the labeled contact blocks (service provider, designated agent) and their rows. */\nexport const MAX_DMCA_CONTACT_BLOCKS = 10;\nexport const MAX_DMCA_CONTACT_ROWS = 20;\nexport const MAX_DMCA_CONTACT_LABEL_LENGTH = 100;\nexport const MAX_DMCA_CONTACT_VALUE_LENGTH = 500;\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\n\n/** `_appConfig/app.appVersion` — the force-refresh version string VersionGate compares. */\nexport const MAX_APP_VERSION_LENGTH = 64;\n\n/** Announcement-banner copy on `_appConfig/app.announcementMessage`. Deliberately far\n * shorter than the maintenance message: the announcement renders as a one-line banner\n * on the landing page and login screen, not a full-page takeover. */\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n\n/** Admin notes on a content-appeal review (reviewContentAppeal). */\nexport const MAX_APPEAL_REVIEW_NOTES_LENGTH = 2000;\n\n/** Admin reason on a Work/Realm forced-retitle remedy. */\nexport const MAX_REQUIRE_RETITLE_REASON_LENGTH = 500;\n\n/** Optional user-facing DETAIL text on a normal-report resolution. */\nexport const MAX_USER_FACING_REASON_DETAIL_LENGTH = 2000;\n\n/** Admin broadcast / user notification message body. */\nexport const MAX_NOTIFICATION_MESSAGE_LENGTH = 2000;\n\n/** Admin broadcast title — the same length as a Work title. */\nexport const MAX_BROADCAST_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;\n\n/** Admin user-search query input. */\nexport const MAX_USER_SEARCH_QUERY_LENGTH = 100;\n\n// --- NCII / child-safety statutory + operator text caps ---\n\n/** Operator written rationale on a TAKE IT DOWN validity decision (immutable row). */\nexport const MAX_NCII_RATIONALE_LENGTH = 4000;\n\n/** Requester's statement of nonconsent (statutory intake — in-app and no-login). */\nexport const MAX_NCII_NONCONSENT_STATEMENT_LENGTH = 4000;\n\n/** Typed-name electronic signature on a statutory request. */\nexport const MAX_NCII_SIGNED_NAME_LENGTH = 256;\n\n/** Requester's optional supporting facts (statutory intake). */\nexport const MAX_NCII_SUPPORTING_FACTS_LENGTH = 8000;\n\n/** Bounded, non-sensitive summary on an NCII request action row. */\nexport const MAX_NCII_ACTION_SUMMARY_LENGTH = 280;\n\n/** Operator description of a registered evidence artifact (e.g. portal screenshot). */\nexport const MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH = 500;\n\n/** Operator proof note on a manual NCMEC portal filing. */\nexport const MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH = 2000;\n\n/** The report number NCMEC assigns a manual-portal filing, as the operator copies it. */\nexport const MAX_NCMEC_REPORT_NUMBER_LENGTH = 64;\n\n/** The key of an object in the restricted evidence vault — Cloud Storage caps an object name at\n * 1,024 bytes. */\nexport const MAX_EVIDENCE_VAULT_KEY_LENGTH = 1024;\n\n/** Requester's typed name on the no-login TAKE IT DOWN statutory intake. */\nexport const MAX_NCII_REQUESTER_NAME_LENGTH = 256;\n\n/** Name of the depicted person a representative files on behalf of. */\nexport const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;\n\n/** Representative's stated basis of authority (parent/guardian/lawyer etc.). */\nexport const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;\n\n/** Optional pointer/reference to authority evidence supplied by a representative. */\nexport const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;\n\n/** The external URL a no-login statutory request names as the content to remove. */\nexport const MAX_NCII_LOCATOR_URL_LENGTH = 2048;\n\n/** The client-generated idempotency key of a statutory request: a retried submit carries the same\n * key, and the server derives the request id from it. */\nexport const NCII_IDEMPOTENCY_KEY_MIN_LENGTH = 8;\nexport const NCII_IDEMPOTENCY_KEY_MAX_LENGTH = 256;\n\n/** A statutory requester's contact email (the address-length ceiling of an email). */\nexport const MAX_NCII_CONTACT_EMAIL_LENGTH = 320;\n\n/** A statutory requester's contact phone number. */\nexport const NCII_CONTACT_PHONE_MIN_LENGTH = 3;\nexport const NCII_CONTACT_PHONE_MAX_LENGTH = 64;\n\n/** Maximum length for a feedback suggestion. */\nexport const MAX_FEEDBACK_SUGGESTION_LENGTH = 100;\n\n/** Maximum number of distinct submitters tracked per feedback suggestion. Mode-varied. */\nexport const MAX_FEEDBACK_SUBMITTERS = ACTIVE_LIMITS.batches.maxFeedbackSubmitters;\n\n/**\n * Canonical list of feedback types accepted by `submitFeedback`. Used both\n * for runtime validation in the schema (`SubmitFeedbackInputSchema`) and\n * for type-safe consumer props on the frontend `<FeedbackSubmission />`\n * component. Adding a new type here is the single source of truth — no\n * mirroring in callers required.\n */\nexport const FEEDBACK_TYPES = [\n 'tradeProfessionSuggestions',\n 'craftSkillTagSuggestions',\n 'talesWorkGenreSuggestions',\n 'tunesWorkGenreSuggestions',\n 'televisionWorkGenreSuggestions',\n] as const;\n\n/** Union of canonical feedback types. */\nexport type FeedbackType = (typeof FEEDBACK_TYPES)[number];\n\n/** Maximum number of items submitted in a single hallLibrary-review submission. Mode-varied. */\nexport const MAX_HALL_LIBRARY_SUBMIT_BATCH = ACTIVE_LIMITS.hall.maxSubmitBatch;\n\n// --- Admin Tasks ---\n\n/** Admin task lifecycle statuses. */\nexport const ADMIN_TASK_STATUS = {\n PENDING: 'pending',\n CHECKED_OUT: 'checkedOut',\n WORK_LATER: 'workLater',\n COMPLETED: 'completed',\n} as const;\n\n/**\n * Who resolves each kind of admin task. `checkin` means the generic queue check-in completes it\n * (the task carries no decision of its own). Every other owner is the domain decision that closes\n * the task — and deletes it in the same transaction — so a generic check-in must never mark one\n * of those tasks resolved: that would drop the decision it exists to collect.\n */\nexport const ADMIN_TASK_RESOLUTION_OWNERS = [\n 'checkin',\n 'reportResolution',\n 'thresholdReview',\n 'appealReview',\n 'refundDecision',\n 'changeRequestReview',\n 'dispatchClose',\n] as const;\nexport type AdminTaskResolutionOwner = (typeof ADMIN_TASK_RESOLUTION_OWNERS)[number];\n\n/** The resolution owner of every admin task type. A new task type fails the build until classified. */\nexport const ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE = {\n adminDispatch: 'dispatchClose',\n thresholdLibraryReview: 'thresholdReview',\n userReport: 'reportResolution',\n 'content-appeal': 'appealReview',\n stakeShareAnomaly: 'checkin',\n pledgeLedgerAnomaly: 'checkin',\n pledgePaymentRepairNeeded: 'checkin',\n pledgeDisputeOpened: 'checkin',\n pledgeRefundRequested: 'refundDecision',\n pledgeRefundFailed: 'refundDecision',\n hallContentChangeRequest: 'changeRequestReview',\n} as const satisfies Record<AdminTaskType, AdminTaskResolutionOwner>;\n\n/**\n * Whether a generic check-in may mark a task of this stored type resolved. The type is read off an\n * untrusted stored task as a string, so an unknown type answers `false` (fails closed).\n */\nexport function isAdminTaskResolvedByCheckin(taskType: string): boolean {\n return (\n Object.hasOwn(ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE, taskType) &&\n ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE[taskType as AdminTaskType] === 'checkin'\n );\n}\n\n/** The most accounts one `uidList` system slot can name. */\nexport const MAX_SYSTEM_UID_LIST = 25;\n"]}
@@ -11,7 +11,7 @@ export declare const CRAFT_SKILL_KIND_ORDER: CraftSkillKind[];
11
11
  * Why "Mimicked work from outside TTT Productions" cannot be chosen yet: the picker shows it
12
12
  * when a person selects that kind, and the upload callable refuses the kind with the same words.
13
13
  */
14
- export declare const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE = "This option isn't available yet: sharing covers or recreations of work from outside TTT needs legal review first.";
14
+ export declare const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE = "This option isn't allowed yet. Sharing covers or recreations of work from outside TTT stays off until I've talked with a lawyer and gotten approval.";
15
15
  /**
16
16
  * The ONE owner of which craft kinds are blocked at launch, with each one's refusal copy. A
17
17
  * blocked kind still renders in the picker (so people see it is coming) but selecting it stops
@@ -19,7 +19,7 @@ export declare const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE = "This optio
19
19
  * kind is removing its entry here.
20
20
  */
21
21
  export declare const CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES: {
22
- readonly mimicOffTtt: "This option isn't available yet: sharing covers or recreations of work from outside TTT needs legal review first.";
22
+ readonly mimicOffTtt: "This option isn't allowed yet. Sharing covers or recreations of work from outside TTT stays off until I've talked with a lawyer and gotten approval.";
23
23
  };
24
24
  /** A craft kind that is blocked at launch. */
25
25
  export type BlockedCraftSkillKind = keyof typeof CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES;
@@ -1 +1 @@
1
- {"version":3,"file":"craft-skill-statements.d.ts","sourceRoot":"","sources":["../../src/constants/craft-skill-statements.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D;kEACkE;AAClE,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAIlE,CAAC;AAEF,kE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O,qCAAqC,CAAC;AAEvF,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,EAEjC,SAAS,qBAAqB,EAAE,CAAC;AAEtC,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,qBAAqB,CAE3F"}
@@ -30,7 +30,7 @@ export const CRAFT_SKILL_KIND_ORDER = ['original', 'mimicOnTtt', 'mimicOffTtt'];
30
30
  * Why "Mimicked work from outside TTT Productions" cannot be chosen yet: the picker shows it
31
31
  * when a person selects that kind, and the upload callable refuses the kind with the same words.
32
32
  */
33
- export const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE = "This option isn't available yet: sharing covers or recreations of work from outside TTT needs legal review first.";
33
+ export const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE = "This option isn't allowed yet. Sharing covers or recreations of work from outside TTT stays off until I've talked with a lawyer and gotten approval.";
34
34
  /**
35
35
  * The ONE owner of which craft kinds are blocked at launch, with each one's refusal copy. A
36
36
  * blocked kind still renders in the picker (so people see it is coming) but selecting it stops
@@ -1 +1 @@
1
- {"version":3,"file":"craft-skill-statements.js","sourceRoot":"","sources":["../../src/constants/craft-skill-statements.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAI/E;kEACkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,uBAAuB,GAAmC;IACrE,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,oCAAoC;IAChD,WAAW,EAAE,4CAA4C;CAC1D,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAmC;IAC3E,QAAQ,EAAE,sCAAsC;IAChD,UAAU,EAAE,gFAAgF;IAC5F,WAAW,EAAE,iFAAiF;CAC/F,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAmC;IACpE,QAAQ,EACN,qJAAqJ;IACvJ,UAAU,EACR,oRAAoR;IACtR,WAAW,EACT,iYAAiY;CACpY,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAqB,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAElG;;;GAGG;AACH,MAAM,CAAC,MAAM,6CAA6C,GACxD,mHAAmH,CAAC;AAEtH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,WAAW,EAAE,6CAA6C;CACA,CAAC;AAK7D,0FAA0F;AAC1F,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAClD,qCAAqC,CACF,CAAC;AAEtC,mFAAmF;AACnF,MAAM,UAAU,uBAAuB,CAAC,IAAoB;IAC1D,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["// ============================================================================\n// CRAFT-SKILL ATTESTATION — the ONE home for the three-kind upload flow's\n// statement version, VERBATIM agreement statements, kind labels/descriptions,\n// picker order, and the refusal copy for a kind that is not available yet. The\n// client displays these and the user must explicitly agree before the file\n// picker unlocks; the backend records only `{ statementKind, statementVersion,\n// agreedAt }` and validates the version against CRAFT_SKILL_STATEMENT_VERSION.\n// ============================================================================\n\nimport type { CraftSkillKind } from '../doc-schemas/user.js';\n\n/** Bump when any VERBATIM statement below changes; the version is recorded on every\n * craft-skill doc so we know which wording the user agreed to. */\nexport const CRAFT_SKILL_STATEMENT_VERSION = 1;\n\nexport const CRAFT_SKILL_KIND_LABELS: Record<CraftSkillKind, string> = {\n original: 'My own work',\n mimicOnTtt: 'Mimicked work from TTT Productions',\n mimicOffTtt: 'Mimicked work from outside TTT Productions',\n};\n\n/** One-line helper shown under each kind option in the picker. */\nexport const CRAFT_SKILL_KIND_DESCRIPTIONS: Record<CraftSkillKind, string> = {\n original: 'Entirely your own original creation.',\n mimicOnTtt: 'Your performance or recreation of another member’s TTT work (link the source).',\n mimicOffTtt: 'A cover or recreation of work from outside TTT (including public-domain works).',\n};\n\nexport const CRAFT_SKILL_STATEMENTS: Record<CraftSkillKind, string> = {\n original:\n 'I certify this craft skill is entirely my own original creation and I own all rights to it. No part of it copies or imitates another person’s work.',\n mimicOnTtt:\n 'This craft skill is my performance or recreation of work created by a member of the TTT Productions community, shown here to demonstrate my abilities. I have linked the original artisan or work below. The original work belongs to its creator, and I claim no ownership of it.',\n mimicOffTtt:\n 'This craft skill is my performance or recreation of a work that did not originate on TTT Productions (including public-domain or out-of-copyright works), shown only to demonstrate my abilities. The underlying work belongs to its owner, and I claim no ownership of it. I understand TTT Productions may remove this content at any time, including in response to a rights-holder request.',\n};\n\nexport const CRAFT_SKILL_KIND_ORDER: CraftSkillKind[] = ['original', 'mimicOnTtt', 'mimicOffTtt'];\n\n/**\n * Why \"Mimicked work from outside TTT Productions\" cannot be chosen yet: the picker shows it\n * when a person selects that kind, and the upload callable refuses the kind with the same words.\n */\nexport const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE =\n \"This option isn't available yet: sharing covers or recreations of work from outside TTT needs legal review first.\";\n\n/**\n * The ONE owner of which craft kinds are blocked at launch, with each one's refusal copy. A\n * blocked kind still renders in the picker (so people see it is coming) but selecting it stops\n * the flow with this copy, and the upload callable refuses it with the same words. Unblocking a\n * kind is removing its entry here.\n */\nexport const CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES = {\n mimicOffTtt: CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE,\n} as const satisfies Partial<Record<CraftSkillKind, string>>;\n\n/** A craft kind that is blocked at launch. */\nexport type BlockedCraftSkillKind = keyof typeof CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES;\n\n/** Every craft kind blocked at launch — derived from the refusal copy, never restated. */\nexport const BLOCKED_CRAFT_SKILL_KINDS = Object.keys(\n CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES,\n) as readonly BlockedCraftSkillKind[];\n\n/** True when `kind` is blocked at launch; narrows it to index its refusal copy. */\nexport function isBlockedCraftSkillKind(kind: CraftSkillKind): kind is BlockedCraftSkillKind {\n return Object.prototype.hasOwnProperty.call(CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES, kind);\n}\n"]}
1
+ {"version":3,"file":"craft-skill-statements.js","sourceRoot":"","sources":["../../src/constants/craft-skill-statements.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAI/E;kEACkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,uBAAuB,GAAmC;IACrE,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,oCAAoC;IAChD,WAAW,EAAE,4CAA4C;CAC1D,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAmC;IAC3E,QAAQ,EAAE,sCAAsC;IAChD,UAAU,EAAE,gFAAgF;IAC5F,WAAW,EAAE,iFAAiF;CAC/F,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAmC;IACpE,QAAQ,EACN,qJAAqJ;IACvJ,UAAU,EACR,oRAAoR;IACtR,WAAW,EACT,iYAAiY;CACpY,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAqB,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAElG;;;GAGG;AACH,MAAM,CAAC,MAAM,6CAA6C,GACxD,sJAAsJ,CAAC;AAEzJ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,WAAW,EAAE,6CAA6C;CACA,CAAC;AAK7D,0FAA0F;AAC1F,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAClD,qCAAqC,CACF,CAAC;AAEtC,mFAAmF;AACnF,MAAM,UAAU,uBAAuB,CAAC,IAAoB;IAC1D,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["// ============================================================================\n// CRAFT-SKILL ATTESTATION — the ONE home for the three-kind upload flow's\n// statement version, VERBATIM agreement statements, kind labels/descriptions,\n// picker order, and the refusal copy for a kind that is not available yet. The\n// client displays these and the user must explicitly agree before the file\n// picker unlocks; the backend records only `{ statementKind, statementVersion,\n// agreedAt }` and validates the version against CRAFT_SKILL_STATEMENT_VERSION.\n// ============================================================================\n\nimport type { CraftSkillKind } from '../doc-schemas/user.js';\n\n/** Bump when any VERBATIM statement below changes; the version is recorded on every\n * craft-skill doc so we know which wording the user agreed to. */\nexport const CRAFT_SKILL_STATEMENT_VERSION = 1;\n\nexport const CRAFT_SKILL_KIND_LABELS: Record<CraftSkillKind, string> = {\n original: 'My own work',\n mimicOnTtt: 'Mimicked work from TTT Productions',\n mimicOffTtt: 'Mimicked work from outside TTT Productions',\n};\n\n/** One-line helper shown under each kind option in the picker. */\nexport const CRAFT_SKILL_KIND_DESCRIPTIONS: Record<CraftSkillKind, string> = {\n original: 'Entirely your own original creation.',\n mimicOnTtt: 'Your performance or recreation of another member’s TTT work (link the source).',\n mimicOffTtt: 'A cover or recreation of work from outside TTT (including public-domain works).',\n};\n\nexport const CRAFT_SKILL_STATEMENTS: Record<CraftSkillKind, string> = {\n original:\n 'I certify this craft skill is entirely my own original creation and I own all rights to it. No part of it copies or imitates another person’s work.',\n mimicOnTtt:\n 'This craft skill is my performance or recreation of work created by a member of the TTT Productions community, shown here to demonstrate my abilities. I have linked the original artisan or work below. The original work belongs to its creator, and I claim no ownership of it.',\n mimicOffTtt:\n 'This craft skill is my performance or recreation of a work that did not originate on TTT Productions (including public-domain or out-of-copyright works), shown only to demonstrate my abilities. The underlying work belongs to its owner, and I claim no ownership of it. I understand TTT Productions may remove this content at any time, including in response to a rights-holder request.',\n};\n\nexport const CRAFT_SKILL_KIND_ORDER: CraftSkillKind[] = ['original', 'mimicOnTtt', 'mimicOffTtt'];\n\n/**\n * Why \"Mimicked work from outside TTT Productions\" cannot be chosen yet: the picker shows it\n * when a person selects that kind, and the upload callable refuses the kind with the same words.\n */\nexport const CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE =\n \"This option isn't allowed yet. Sharing covers or recreations of work from outside TTT stays off until I've talked with a lawyer and gotten approval.\";\n\n/**\n * The ONE owner of which craft kinds are blocked at launch, with each one's refusal copy. A\n * blocked kind still renders in the picker (so people see it is coming) but selecting it stops\n * the flow with this copy, and the upload callable refuses it with the same words. Unblocking a\n * kind is removing its entry here.\n */\nexport const CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES = {\n mimicOffTtt: CRAFT_SKILL_MIMIC_OFF_TTT_UNAVAILABLE_MESSAGE,\n} as const satisfies Partial<Record<CraftSkillKind, string>>;\n\n/** A craft kind that is blocked at launch. */\nexport type BlockedCraftSkillKind = keyof typeof CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES;\n\n/** Every craft kind blocked at launch — derived from the refusal copy, never restated. */\nexport const BLOCKED_CRAFT_SKILL_KINDS = Object.keys(\n CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES,\n) as readonly BlockedCraftSkillKind[];\n\n/** True when `kind` is blocked at launch; narrows it to index its refusal copy. */\nexport function isBlockedCraftSkillKind(kind: CraftSkillKind): kind is BlockedCraftSkillKind {\n return Object.prototype.hasOwnProperty.call(CRAFT_SKILL_KIND_UNAVAILABLE_MESSAGES, kind);\n}\n"]}
@@ -1,10 +1,10 @@
1
- /** Theme Studio save & share (ttt-prod docs/charter-season/theme-sharing.md). */
1
+ /** Theme Studio save & share. */
2
2
  export declare const THEME_SHARING_LIVE = false;
3
- /** Bouquet stage 1 — buy, give, see (ttt-prod docs/charter-season/bouquet-staging.md). */
3
+ /** Bouquet stage 1 — buy, give, see. */
4
4
  export declare const BOUQUET_STAGE_1_LIVE = false;
5
5
  /** Bouquet stage 2 — artisan earnings views. */
6
6
  export declare const BOUQUET_STAGE_2_LIVE = false;
7
- /** Bouquet stage 3 — payouts (counsel-gated). */
7
+ /** Bouquet stage 3 — payouts (post Charter Season). */
8
8
  export declare const BOUQUET_STAGE_3_LIVE = false;
9
9
  /** Bouquet stage 4 — Garden + Greenhouse display surfaces. */
10
10
  export declare const BOUQUET_STAGE_4_LIVE = false;
@@ -1 +1 @@
1
- {"version":3,"file":"release-flags.d.ts","sourceRoot":"","sources":["../../src/constants/release-flags.ts"],"names":[],"mappings":"AAYA,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,gDAAgD;AAChD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,iDAAiD;AACjD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;gFACgF;AAChF,eAAO,MAAM,iBAAiB,QAAQ,CAAC"}
1
+ {"version":3,"file":"release-flags.d.ts","sourceRoot":"","sources":["../../src/constants/release-flags.ts"],"names":[],"mappings":"AAYA,iCAAiC;AACjC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,wCAAwC;AACxC,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,gDAAgD;AAChD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;gFACgF;AAChF,eAAO,MAAM,iBAAiB,QAAQ,CAAC"}
@@ -8,14 +8,14 @@
8
8
  // The admin Ready-for-Launch tab renders a READ-ONLY panel of these values,
9
9
  // and the public phase page renders live/coming per deliverable from the same
10
10
  // constants — the flags that gate the features ARE the display data source,
11
- // so neither surface can drift. See ttt-prod docs/charter-season/README.md.
12
- /** Theme Studio save & share (ttt-prod docs/charter-season/theme-sharing.md). */
11
+ // so neither surface can drift.
12
+ /** Theme Studio save & share. */
13
13
  export const THEME_SHARING_LIVE = false;
14
- /** Bouquet stage 1 — buy, give, see (ttt-prod docs/charter-season/bouquet-staging.md). */
14
+ /** Bouquet stage 1 — buy, give, see. */
15
15
  export const BOUQUET_STAGE_1_LIVE = false;
16
16
  /** Bouquet stage 2 — artisan earnings views. */
17
17
  export const BOUQUET_STAGE_2_LIVE = false;
18
- /** Bouquet stage 3 — payouts (counsel-gated). */
18
+ /** Bouquet stage 3 — payouts (post Charter Season). */
19
19
  export const BOUQUET_STAGE_3_LIVE = false;
20
20
  /** Bouquet stage 4 — Garden + Greenhouse display surfaces. */
21
21
  export const BOUQUET_STAGE_4_LIVE = false;
@@ -1 +1 @@
1
- {"version":3,"file":"release-flags.js","sourceRoot":"","sources":["../../src/constants/release-flags.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,6DAA6D;AAC7D,6EAA6E;AAC7E,gEAAgE;AAChE,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,4EAA4E;AAE5E,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAExC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;gFACgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC","sourcesContent":["// Charter-season release flags — one boolean per flip deliverable, default\n// false. Flipped ONLY in code: change the constant → publish ttt-core →\n// install (root + functions) → deploy IS the release, exactly like APP_MODE.\n// Never a console toggle. Server-side gating in callables is\n// `flag || caller is admin` so admins can live-test a hidden feature in prod\n// before its release moment; UI hiding alone is never the gate.\n//\n// The admin Ready-for-Launch tab renders a READ-ONLY panel of these values,\n// and the public phase page renders live/coming per deliverable from the same\n// constants — the flags that gate the features ARE the display data source,\n// so neither surface can drift. See ttt-prod docs/charter-season/README.md.\n\n/** Theme Studio save & share (ttt-prod docs/charter-season/theme-sharing.md). */\nexport const THEME_SHARING_LIVE = false;\n\n/** Bouquet stage 1 — buy, give, see (ttt-prod docs/charter-season/bouquet-staging.md). */\nexport const BOUQUET_STAGE_1_LIVE = false;\n\n/** Bouquet stage 2 — artisan earnings views. */\nexport const BOUQUET_STAGE_2_LIVE = false;\n\n/** Bouquet stage 3 — payouts (counsel-gated). */\nexport const BOUQUET_STAGE_3_LIVE = false;\n\n/** Bouquet stage 4 — Garden + Greenhouse display surfaces. */\nexport const BOUQUET_STAGE_4_LIVE = false;\n\n/** Bill the Understudy's flip upgrade (new lines / visual refresh). Display-only\n * flag — nothing server-side to gate; exists so the phase page stays honest. */\nexport const BILL_UPGRADE_LIVE = false;\n"]}
1
+ {"version":3,"file":"release-flags.js","sourceRoot":"","sources":["../../src/constants/release-flags.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,6DAA6D;AAC7D,6EAA6E;AAC7E,gEAAgE;AAChE,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,gCAAgC;AAEhC,iCAAiC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAExC,wCAAwC;AACxC,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,uDAAuD;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;gFACgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC","sourcesContent":["// Charter-season release flags — one boolean per flip deliverable, default\n// false. Flipped ONLY in code: change the constant → publish ttt-core →\n// install (root + functions) → deploy IS the release, exactly like APP_MODE.\n// Never a console toggle. Server-side gating in callables is\n// `flag || caller is admin` so admins can live-test a hidden feature in prod\n// before its release moment; UI hiding alone is never the gate.\n//\n// The admin Ready-for-Launch tab renders a READ-ONLY panel of these values,\n// and the public phase page renders live/coming per deliverable from the same\n// constants — the flags that gate the features ARE the display data source,\n// so neither surface can drift.\n\n/** Theme Studio save & share. */\nexport const THEME_SHARING_LIVE = false;\n\n/** Bouquet stage 1 — buy, give, see. */\nexport const BOUQUET_STAGE_1_LIVE = false;\n\n/** Bouquet stage 2 — artisan earnings views. */\nexport const BOUQUET_STAGE_2_LIVE = false;\n\n/** Bouquet stage 3 — payouts (post Charter Season). */\nexport const BOUQUET_STAGE_3_LIVE = false;\n\n/** Bouquet stage 4 — Garden + Greenhouse display surfaces. */\nexport const BOUQUET_STAGE_4_LIVE = false;\n\n/** Bill the Understudy's flip upgrade (new lines / visual refresh). Display-only\n * flag — nothing server-side to gate; exists so the phase page stays honest. */\nexport const BILL_UPGRADE_LIVE = false;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/config.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,8EAA8E;AAC9E,eAAO,MAAM,oCAAoC,yCAAuC,CAAC;AACzF,MAAM,MAAM,8BAA8B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;;;;;;;;;;;;;;;kBAqC1B,CAAC;AACZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAAoB,CAAC;AAE9D,mEAAmE;AACnE,eAAO,MAAM,mCAAmC,IAAI,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,6BAA6B,EAAE,kBAoC3C,CAAC;AAYF;6CAC6C;AAC7C,eAAO,MAAM,oCAAoC,iCAA+B,CAAC;AACjF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG;qCACqC;AACrC,eAAO,MAAM,uCAAuC;;;;;;;EAOlD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAC;AAEF;gFACgF;AAChF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;kBAmB3C,CAAC;AACZ,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,+CAA+C,EAAE,mCAiB3D,CAAC"}
@@ -1,4 +1,4 @@
1
- // Trust & Safety — NCII config singletons (Appendix A §A11 [H6] / [H-17] / [H-18]).
1
+ // Trust & Safety — NCII config singletons.
2
2
  //
3
3
  // Two Admin-SDK-only `_serverData` singleton documents, wired into COLLECTIONS,
4
4
  // PATH_BUILDERS, and the doc-schema registry:
@@ -9,16 +9,12 @@
9
9
  // a reader falls back to the frozen DEFAULT when the stored doc is absent. Any change
10
10
  // increments the policy version and triggers a retention/configuration review.
11
11
  //
12
- // Every value in the DEFAULT consts below is transcribed verbatim from the frozen
13
- // Trust & Safety spec (Appendix A §A11 [H6] / [H-17] / [H-18]) — no invented values,
14
- // no placeholders; the durable design owner is ttt-prod
15
- // docs/design/nonconsensual-intimate-imagery-and-take-it-down.md. The schemas pin
16
- // each literal-defaulted field where the spec fixes a single literal value
17
- // (`policyVersion`, `approvedBy`, the security-profile string literals, etc.) so a
18
- // config write cannot silently drift from the frozen posture.
12
+ // The schemas pin each field that has a single fixed value (`policyVersion`,
13
+ // `approvedBy`, the security-profile string literals, etc.) so a config write cannot
14
+ // silently drift from the frozen posture.
19
15
  import { z } from 'zod';
20
16
  // ===========================================================================
21
- // §A11 [H6] — NciiPolicyConfigV1 + DEFAULT_NCII_POLICY_CONFIG_V1
17
+ // NciiPolicyConfigV1 + DEFAULT_NCII_POLICY_CONFIG_V1
22
18
  // `_serverData/nciiPolicy`
23
19
  // ===========================================================================
24
20
  /** Blocked-hash retention policy — indefinite until an appeal reverses it. */
@@ -36,22 +32,21 @@ export const NciiPolicyConfigV1Schema = z
36
32
  maxEvidenceTotalBytesPerRequest: z.number(),
37
33
  uploadReservationMinutes: z.number(),
38
34
  abandonedUploadCleanupHours: z.number(),
39
- // [H1/M3] temp-hold values:
35
+ // temp-hold values:
40
36
  tempHoldInitialHours: z.number(),
41
37
  tempHoldPendingValidityExtensionHours: z.number(),
42
38
  tempHoldMaxTotalHours: z.number(),
43
39
  incompleteInvalidReleaseDelayHours: z.number(),
44
- // [NCII route rate-limit hardening — 2026-07-01, OPERATIONAL operator defaults, not legal-retention
45
- // values; counsel may tune]. The public intake route returns 429 + Retry-After and NEVER discards a
46
- // submission. App-Check is the PRIMARY defense with only a GENEROUS per-IP burst backstop (generous
47
- // enough not to throttle a real VPN/shared-IP victim — per-IP was rejected for the evidence BYTES
48
- // path; this is the HTTP route only). (The supplement route + status token were removed with the
49
- // public post-submission tracking tail — the public flow is submit-only.)
40
+ // Intake route rate limit — OPERATIONAL operator defaults, not legal-retention values. The public
41
+ // intake route returns 429 + Retry-After and NEVER discards a submission. App-Check is the PRIMARY
42
+ // defense with only a GENEROUS per-IP burst backstop (generous enough not to throttle a real
43
+ // VPN/shared-IP victim; the evidence BYTES path carries no per-IP limit — this is the HTTP route
44
+ // only).
50
45
  intakeRateLimitWindowSeconds: z.number(),
51
46
  intakeRateLimitMaxPerIp: z.number(),
52
- // [H-07] dedup window for the deterministic initial-intake idempotency key
47
+ // dedup window for the deterministic initial-intake idempotency key
53
48
  idempotencyWindowHours: z.number(),
54
- // [M-10] evidence parser-hardening budgets (attacker-controlled bytes):
49
+ // evidence parser-hardening budgets (attacker-controlled bytes):
55
50
  maxEvidenceDecodePixels: z.number(),
56
51
  maxEvidenceImageDimension: z.number(),
57
52
  maxEvidenceVideoFrames: z.number(),
@@ -95,7 +90,7 @@ export const DEFAULT_NCII_POLICY_CONFIG_V1 = {
95
90
  tempHoldPendingValidityExtensionHours: 48,
96
91
  tempHoldMaxTotalHours: 336,
97
92
  incompleteInvalidReleaseDelayHours: 24,
98
- // [NCII route rate-limit hardening — 2026-07-01 operator defaults; generous, counsel may tune]
93
+ // intake route rate limit — generous operator defaults
99
94
  intakeRateLimitWindowSeconds: 3600, // per source IP (secondary flood guard; App-Check is primary)
100
95
  intakeRateLimitMaxPerIp: 20, // generous so a shared/VPN IP with several genuine victims isn't throttled
101
96
  idempotencyWindowHours: 72,
@@ -110,7 +105,7 @@ export const DEFAULT_NCII_POLICY_CONFIG_V1 = {
110
105
  approvedBy: 'operatorLaunchDefault',
111
106
  };
112
107
  // ===========================================================================
113
- // §A11 [H-17] — PrivilegedReviewerSecurityProfileV1 +
108
+ // PrivilegedReviewerSecurityProfileV1 +
114
109
  // DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1
115
110
  // `_serverData/privilegedReviewerSecurity`
116
111
  //
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/config.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,EAAE;AACF,gFAAgF;AAChF,8CAA8C;AAC9C,iEAAiE;AACjE,qFAAqF;AACrF,EAAE;AACF,wFAAwF;AACxF,sFAAsF;AACtF,+EAA+E;AA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AO,CAAC,kDAAkD,CAAC;IAC9E,uGAAuG;IACvG,gCAAgC,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7C,mIAAmI;IACnI,sBAAsB,EAAE,CAAC,CAAC,OAAO,EAAE;CACpC,CAAC;KACD,MAAM,EAAE,CAAC;AAKZ,8EAA8E;AAC9E,MAAM,CAAC,MAAM,+CAA+C,GAC1D;IACE,oBAAoB,EAAE,iBAAiB;IACvC,0BAA0B,EAAE,GAAG;IAC/B,4BAA4B,EAAE,IAAI;IAClC,yBAAyB,EAAE;QACzB,gBAAgB;QAChB,oBAAoB;QACpB,kBAAkB;QAClB,kBAAkB;QAClB,yBAAyB;QACzB,qBAAqB;KACtB;IACD,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,kDAAkD;IACnE,gCAAgC,EAAE,IAAI;IACtC,sBAAsB,EAAE,IAAI;CAC7B,CAAC","sourcesContent":["// Trust & Safety — NCII config singletons (Appendix A §A11 [H6] / [H-17] / [H-18]).\n//\n// Two Admin-SDK-only `_serverData` singleton documents, wired into COLLECTIONS,\n// PATH_BUILDERS, and the doc-schema registry:\n// - `_serverData/nciiPolicy` → NciiPolicyConfigV1\n// - `_serverData/privilegedReviewerSecurity` → PrivilegedReviewerSecurityProfileV1\n//\n// These are VERSIONED operator launch defaults (`approvedBy: 'operatorLaunchDefault'`);\n// a reader falls back to the frozen DEFAULT when the stored doc is absent. Any change\n// increments the policy version and triggers a retention/configuration review.\n//\n// Every value in the DEFAULT consts below is transcribed verbatim from the frozen\n// Trust & Safety spec (Appendix A §A11 [H6] / [H-17] / [H-18]) — no invented values,\n// no placeholders; the durable design owner is ttt-prod\n// docs/design/nonconsensual-intimate-imagery-and-take-it-down.md. The schemas pin\n// each literal-defaulted field where the spec fixes a single literal value\n// (`policyVersion`, `approvedBy`, the security-profile string literals, etc.) so a\n// config write cannot silently drift from the frozen posture.\n\nimport { z } from 'zod';\n\n// ===========================================================================\n// §A11 [H6] — NciiPolicyConfigV1 + DEFAULT_NCII_POLICY_CONFIG_V1\n// `_serverData/nciiPolicy`\n// ===========================================================================\n\n/** Blocked-hash retention policy — indefinite until an appeal reverses it. */\nexport const NciiBlockedHashRetentionPolicySchema = z.literal('indefiniteUntilReversed');\nexport type NciiBlockedHashRetentionPolicy = z.infer<typeof NciiBlockedHashRetentionPolicySchema>;\n\n/** `_serverData/nciiPolicy` = `NciiPolicyConfigV1` — the operator launch defaults. */\nexport const NciiPolicyConfigV1Schema = z\n .object({\n policyVersion: z.literal('ncii.2026-06-23.v1'),\n requesterPiiRetentionDays: z.number(),\n evidenceRetentionDays: z.number(),\n blockedHashRetentionPolicy: NciiBlockedHashRetentionPolicySchema,\n allowedEvidenceMimeTypes: z.array(z.string().min(1)),\n maxEvidenceFileBytes: z.number(),\n maxEvidenceFilesPerRequest: z.number(),\n maxEvidenceTotalBytesPerRequest: z.number(),\n uploadReservationMinutes: z.number(),\n abandonedUploadCleanupHours: z.number(),\n // [H1/M3] temp-hold values:\n tempHoldInitialHours: z.number(),\n tempHoldPendingValidityExtensionHours: z.number(),\n tempHoldMaxTotalHours: z.number(),\n incompleteInvalidReleaseDelayHours: z.number(),\n // [NCII route rate-limit hardening — 2026-07-01, OPERATIONAL operator defaults, not legal-retention\n // values; counsel may tune]. The public intake route returns 429 + Retry-After and NEVER discards a\n // submission. App-Check is the PRIMARY defense with only a GENEROUS per-IP burst backstop (generous\n // enough not to throttle a real VPN/shared-IP victim — per-IP was rejected for the evidence BYTES\n // path; this is the HTTP route only). (The supplement route + status token were removed with the\n // public post-submission tracking tail — the public flow is submit-only.)\n intakeRateLimitWindowSeconds: z.number(),\n intakeRateLimitMaxPerIp: z.number(),\n // [H-07] dedup window for the deterministic initial-intake idempotency key\n idempotencyWindowHours: z.number(),\n // [M-10] evidence parser-hardening budgets (attacker-controlled bytes):\n maxEvidenceDecodePixels: z.number(),\n maxEvidenceImageDimension: z.number(),\n maxEvidenceVideoFrames: z.number(),\n maxEvidenceVideoDurationSec: z.number(),\n evidenceParserTimeoutSec: z.number(),\n evidenceScanCpuBudgetMs: z.number(),\n evidenceScanMemoryBudgetMb: z.number(),\n rejectArchiveAndPolyglotPayloads: z.boolean(),\n approvedBy: z.literal('operatorLaunchDefault'),\n })\n .strict();\nexport type NciiPolicyConfigV1 = z.infer<typeof NciiPolicyConfigV1Schema>;\n\n/**\n * The largest single evidence file a take-it-down request may attach: the evidence-scan trigger\n * downloads the whole object into a ~512 MiB Function before scanning, so an allowed file must fit\n * in memory. storage.rules restates this per-file cap because rules cannot import TypeScript; the\n * app's storage-rules cap test fails on a mismatch.\n */\nexport const NCII_EVIDENCE_MAX_FILE_BYTES = 100 * 1024 * 1024;\n\n/** The most evidence files one take-it-down request may attach. */\nexport const NCII_EVIDENCE_MAX_FILES_PER_REQUEST = 3;\n\n/** The frozen launch default for `_serverData/nciiPolicy`. */\nexport const DEFAULT_NCII_POLICY_CONFIG_V1: NciiPolicyConfigV1 = {\n policyVersion: 'ncii.2026-06-23.v1',\n requesterPiiRetentionDays: 90,\n evidenceRetentionDays: 60,\n blockedHashRetentionPolicy: 'indefiniteUntilReversed',\n allowedEvidenceMimeTypes: [\n 'image/jpeg',\n 'image/png',\n 'image/webp',\n 'image/gif',\n 'video/mp4',\n 'video/webm',\n ],\n maxEvidenceFileBytes: NCII_EVIDENCE_MAX_FILE_BYTES,\n maxEvidenceFilesPerRequest: NCII_EVIDENCE_MAX_FILES_PER_REQUEST,\n maxEvidenceTotalBytesPerRequest:\n NCII_EVIDENCE_MAX_FILES_PER_REQUEST * NCII_EVIDENCE_MAX_FILE_BYTES,\n uploadReservationMinutes: 30,\n abandonedUploadCleanupHours: 24,\n tempHoldInitialHours: 72,\n tempHoldPendingValidityExtensionHours: 48,\n tempHoldMaxTotalHours: 336,\n incompleteInvalidReleaseDelayHours: 24,\n // [NCII route rate-limit hardening — 2026-07-01 operator defaults; generous, counsel may tune]\n intakeRateLimitWindowSeconds: 3600, // per source IP (secondary flood guard; App-Check is primary)\n intakeRateLimitMaxPerIp: 20, // generous so a shared/VPN IP with several genuine victims isn't throttled\n idempotencyWindowHours: 72,\n maxEvidenceDecodePixels: 40000000,\n maxEvidenceImageDimension: 12000,\n maxEvidenceVideoFrames: 600,\n maxEvidenceVideoDurationSec: 600,\n evidenceParserTimeoutSec: 60,\n evidenceScanCpuBudgetMs: 30000,\n evidenceScanMemoryBudgetMb: 512,\n rejectArchiveAndPolyglotPayloads: true,\n approvedBy: 'operatorLaunchDefault',\n};\n\n// ===========================================================================\n// §A11 [H-17] — PrivilegedReviewerSecurityProfileV1 +\n// DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1\n// `_serverData/privilegedReviewerSecurity`\n//\n// \"fresh reauth\" / \"two-step reauth\" for ANY privileged-reviewer capability means\n// a reauth that satisfies THIS profile — NEVER a bare password re-prompt. Enforced\n// even though one solo operator holds every capability at launch.\n// ===========================================================================\n\n/** The phishing-resistant second factor — password-only, SMS, and TOTP are NEVER\n * sufficient for a privileged capability. */\nexport const PrivilegedReviewerSecondFactorSchema = z.literal('passkeyWebAuthn');\nexport type PrivilegedReviewerSecondFactor = z.infer<typeof PrivilegedReviewerSecondFactorSchema>;\n\n/** The capabilities that require the passkey assertion + an explicit typed\n * confirmation (two-step reauth). */\nexport const PrivilegedTwoStepReauthCapabilitySchema = z.enum([\n 'evidenceReveal',\n 'ncmecCredentialUse',\n 'reverseHashBlock',\n 'legalDisposition',\n 'falsePositiveCorrection',\n 'ncmecManualFallback',\n]);\nexport type PrivilegedTwoStepReauthCapability = z.infer<\n typeof PrivilegedTwoStepReauthCapabilitySchema\n>;\n\n/** `_serverData/privilegedReviewerSecurity` = `PrivilegedReviewerSecurityProfileV1` —\n * what \"fresh reauth\" actually means for any privileged-reviewer capability. */\nexport const PrivilegedReviewerSecurityProfileV1Schema = z\n .object({\n // phishing-resistant; password-only, SMS, and TOTP are NEVER sufficient for a privileged capability\n requiredSecondFactor: PrivilegedReviewerSecondFactorSchema,\n // a capability invocation needs a WebAuthn assertion at least this fresh; older → re-prompt\n privilegedReauthTtlSeconds: z.number(),\n // the privileged session is bound to the enrolled authenticator/device; separate from the ordinary app session\n privilegedSessionDeviceBound: z.boolean(),\n // these require the passkey assertion + an explicit typed confirmation\n twoStepReauthCapabilities: z.array(PrivilegedTwoStepReauthCapabilitySchema),\n // offline one-time break-glass codes, generated at enrollment, stored physically offline\n recoveryCodeCount: z.number(),\n // using one is logged, fires the external critical alarm, and forces enrolling a fresh passkey\n recoveryCodeUse: z.literal('auditedHighSeverity+forcesReenroll+criticalAlarm'),\n // lost-device: revoke ALL privileged sessions → forces re-enrollment before any capability works again\n allowPrivilegedSessionRevocation: z.boolean(),\n // each privileged-capability use writes an audit event (actor, capability, caseId, reauth method, before/after for evidence reads)\n everyInvocationAudited: z.boolean(),\n })\n .strict();\nexport type PrivilegedReviewerSecurityProfileV1 = z.infer<\n typeof PrivilegedReviewerSecurityProfileV1Schema\n>;\n\n/** The frozen launch default for `_serverData/privilegedReviewerSecurity`. */\nexport const DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1: PrivilegedReviewerSecurityProfileV1 =\n {\n requiredSecondFactor: 'passkeyWebAuthn',\n privilegedReauthTtlSeconds: 300,\n privilegedSessionDeviceBound: true,\n twoStepReauthCapabilities: [\n 'evidenceReveal',\n 'ncmecCredentialUse',\n 'reverseHashBlock',\n 'legalDisposition',\n 'falsePositiveCorrection',\n 'ncmecManualFallback',\n ],\n recoveryCodeCount: 10,\n recoveryCodeUse: 'auditedHighSeverity+forcesReenroll+criticalAlarm',\n allowPrivilegedSessionRevocation: true,\n everyInvocationAudited: true,\n };\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/doc-schemas/ncii/config.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,EAAE;AACF,gFAAgF;AAChF,8CAA8C;AAC9C,iEAAiE;AACjE,qFAAqF;AACrF,EAAE;AACF,wFAAwF;AACxF,sFAAsF;AACtF,+EAA+E;AAC/E,EAA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7C,mIAAmI;IACnI,sBAAsB,EAAE,CAAC,CAAC,OAAO,EAAE;CACpC,CAAC;KACD,MAAM,EAAE,CAAC;AAKZ,8EAA8E;AAC9E,MAAM,CAAC,MAAM,+CAA+C,GAC1D;IACE,oBAAoB,EAAE,iBAAiB;IACvC,0BAA0B,EAAE,GAAG;IAC/B,4BAA4B,EAAE,IAAI;IAClC,yBAAyB,EAAE;QACzB,gBAAgB;QAChB,oBAAoB;QACpB,kBAAkB;QAClB,kBAAkB;QAClB,yBAAyB;QACzB,qBAAqB;KACtB;IACD,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,kDAAkD;IACnE,gCAAgC,EAAE,IAAI;IACtC,sBAAsB,EAAE,IAAI;CAC7B,CAAC","sourcesContent":["// Trust & Safety — NCII config singletons.\n//\n// Two Admin-SDK-only `_serverData` singleton documents, wired into COLLECTIONS,\n// PATH_BUILDERS, and the doc-schema registry:\n// - `_serverData/nciiPolicy` → NciiPolicyConfigV1\n// - `_serverData/privilegedReviewerSecurity` → PrivilegedReviewerSecurityProfileV1\n//\n// These are VERSIONED operator launch defaults (`approvedBy: 'operatorLaunchDefault'`);\n// a reader falls back to the frozen DEFAULT when the stored doc is absent. Any change\n// increments the policy version and triggers a retention/configuration review.\n//\n// The schemas pin each field that has a single fixed value (`policyVersion`,\n// `approvedBy`, the security-profile string literals, etc.) so a config write cannot\n// silently drift from the frozen posture.\n\nimport { z } from 'zod';\n\n// ===========================================================================\n// NciiPolicyConfigV1 + DEFAULT_NCII_POLICY_CONFIG_V1\n// `_serverData/nciiPolicy`\n// ===========================================================================\n\n/** Blocked-hash retention policy — indefinite until an appeal reverses it. */\nexport const NciiBlockedHashRetentionPolicySchema = z.literal('indefiniteUntilReversed');\nexport type NciiBlockedHashRetentionPolicy = z.infer<typeof NciiBlockedHashRetentionPolicySchema>;\n\n/** `_serverData/nciiPolicy` = `NciiPolicyConfigV1` — the operator launch defaults. */\nexport const NciiPolicyConfigV1Schema = z\n .object({\n policyVersion: z.literal('ncii.2026-06-23.v1'),\n requesterPiiRetentionDays: z.number(),\n evidenceRetentionDays: z.number(),\n blockedHashRetentionPolicy: NciiBlockedHashRetentionPolicySchema,\n allowedEvidenceMimeTypes: z.array(z.string().min(1)),\n maxEvidenceFileBytes: z.number(),\n maxEvidenceFilesPerRequest: z.number(),\n maxEvidenceTotalBytesPerRequest: z.number(),\n uploadReservationMinutes: z.number(),\n abandonedUploadCleanupHours: z.number(),\n // temp-hold values:\n tempHoldInitialHours: z.number(),\n tempHoldPendingValidityExtensionHours: z.number(),\n tempHoldMaxTotalHours: z.number(),\n incompleteInvalidReleaseDelayHours: z.number(),\n // Intake route rate limit — OPERATIONAL operator defaults, not legal-retention values. The public\n // intake route returns 429 + Retry-After and NEVER discards a submission. App-Check is the PRIMARY\n // defense with only a GENEROUS per-IP burst backstop (generous enough not to throttle a real\n // VPN/shared-IP victim; the evidence BYTES path carries no per-IP limit — this is the HTTP route\n // only).\n intakeRateLimitWindowSeconds: z.number(),\n intakeRateLimitMaxPerIp: z.number(),\n // dedup window for the deterministic initial-intake idempotency key\n idempotencyWindowHours: z.number(),\n // evidence parser-hardening budgets (attacker-controlled bytes):\n maxEvidenceDecodePixels: z.number(),\n maxEvidenceImageDimension: z.number(),\n maxEvidenceVideoFrames: z.number(),\n maxEvidenceVideoDurationSec: z.number(),\n evidenceParserTimeoutSec: z.number(),\n evidenceScanCpuBudgetMs: z.number(),\n evidenceScanMemoryBudgetMb: z.number(),\n rejectArchiveAndPolyglotPayloads: z.boolean(),\n approvedBy: z.literal('operatorLaunchDefault'),\n })\n .strict();\nexport type NciiPolicyConfigV1 = z.infer<typeof NciiPolicyConfigV1Schema>;\n\n/**\n * The largest single evidence file a take-it-down request may attach: the evidence-scan trigger\n * downloads the whole object into a ~512 MiB Function before scanning, so an allowed file must fit\n * in memory. storage.rules restates this per-file cap because rules cannot import TypeScript; the\n * app's storage-rules cap test fails on a mismatch.\n */\nexport const NCII_EVIDENCE_MAX_FILE_BYTES = 100 * 1024 * 1024;\n\n/** The most evidence files one take-it-down request may attach. */\nexport const NCII_EVIDENCE_MAX_FILES_PER_REQUEST = 3;\n\n/** The frozen launch default for `_serverData/nciiPolicy`. */\nexport const DEFAULT_NCII_POLICY_CONFIG_V1: NciiPolicyConfigV1 = {\n policyVersion: 'ncii.2026-06-23.v1',\n requesterPiiRetentionDays: 90,\n evidenceRetentionDays: 60,\n blockedHashRetentionPolicy: 'indefiniteUntilReversed',\n allowedEvidenceMimeTypes: [\n 'image/jpeg',\n 'image/png',\n 'image/webp',\n 'image/gif',\n 'video/mp4',\n 'video/webm',\n ],\n maxEvidenceFileBytes: NCII_EVIDENCE_MAX_FILE_BYTES,\n maxEvidenceFilesPerRequest: NCII_EVIDENCE_MAX_FILES_PER_REQUEST,\n maxEvidenceTotalBytesPerRequest:\n NCII_EVIDENCE_MAX_FILES_PER_REQUEST * NCII_EVIDENCE_MAX_FILE_BYTES,\n uploadReservationMinutes: 30,\n abandonedUploadCleanupHours: 24,\n tempHoldInitialHours: 72,\n tempHoldPendingValidityExtensionHours: 48,\n tempHoldMaxTotalHours: 336,\n incompleteInvalidReleaseDelayHours: 24,\n // intake route rate limit — generous operator defaults\n intakeRateLimitWindowSeconds: 3600, // per source IP (secondary flood guard; App-Check is primary)\n intakeRateLimitMaxPerIp: 20, // generous so a shared/VPN IP with several genuine victims isn't throttled\n idempotencyWindowHours: 72,\n maxEvidenceDecodePixels: 40000000,\n maxEvidenceImageDimension: 12000,\n maxEvidenceVideoFrames: 600,\n maxEvidenceVideoDurationSec: 600,\n evidenceParserTimeoutSec: 60,\n evidenceScanCpuBudgetMs: 30000,\n evidenceScanMemoryBudgetMb: 512,\n rejectArchiveAndPolyglotPayloads: true,\n approvedBy: 'operatorLaunchDefault',\n};\n\n// ===========================================================================\n// PrivilegedReviewerSecurityProfileV1 +\n// DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1\n// `_serverData/privilegedReviewerSecurity`\n//\n// \"fresh reauth\" / \"two-step reauth\" for ANY privileged-reviewer capability means\n// a reauth that satisfies THIS profile — NEVER a bare password re-prompt. Enforced\n// even though one solo operator holds every capability at launch.\n// ===========================================================================\n\n/** The phishing-resistant second factor — password-only, SMS, and TOTP are NEVER\n * sufficient for a privileged capability. */\nexport const PrivilegedReviewerSecondFactorSchema = z.literal('passkeyWebAuthn');\nexport type PrivilegedReviewerSecondFactor = z.infer<typeof PrivilegedReviewerSecondFactorSchema>;\n\n/** The capabilities that require the passkey assertion + an explicit typed\n * confirmation (two-step reauth). */\nexport const PrivilegedTwoStepReauthCapabilitySchema = z.enum([\n 'evidenceReveal',\n 'ncmecCredentialUse',\n 'reverseHashBlock',\n 'legalDisposition',\n 'falsePositiveCorrection',\n 'ncmecManualFallback',\n]);\nexport type PrivilegedTwoStepReauthCapability = z.infer<\n typeof PrivilegedTwoStepReauthCapabilitySchema\n>;\n\n/** `_serverData/privilegedReviewerSecurity` = `PrivilegedReviewerSecurityProfileV1` —\n * what \"fresh reauth\" actually means for any privileged-reviewer capability. */\nexport const PrivilegedReviewerSecurityProfileV1Schema = z\n .object({\n // phishing-resistant; password-only, SMS, and TOTP are NEVER sufficient for a privileged capability\n requiredSecondFactor: PrivilegedReviewerSecondFactorSchema,\n // a capability invocation needs a WebAuthn assertion at least this fresh; older → re-prompt\n privilegedReauthTtlSeconds: z.number(),\n // the privileged session is bound to the enrolled authenticator/device; separate from the ordinary app session\n privilegedSessionDeviceBound: z.boolean(),\n // these require the passkey assertion + an explicit typed confirmation\n twoStepReauthCapabilities: z.array(PrivilegedTwoStepReauthCapabilitySchema),\n // offline one-time break-glass codes, generated at enrollment, stored physically offline\n recoveryCodeCount: z.number(),\n // using one is logged, fires the external critical alarm, and forces enrolling a fresh passkey\n recoveryCodeUse: z.literal('auditedHighSeverity+forcesReenroll+criticalAlarm'),\n // lost-device: revoke ALL privileged sessions → forces re-enrollment before any capability works again\n allowPrivilegedSessionRevocation: z.boolean(),\n // each privileged-capability use writes an audit event (actor, capability, caseId, reauth method, before/after for evidence reads)\n everyInvocationAudited: z.boolean(),\n })\n .strict();\nexport type PrivilegedReviewerSecurityProfileV1 = z.infer<\n typeof PrivilegedReviewerSecurityProfileV1Schema\n>;\n\n/** The frozen launch default for `_serverData/privilegedReviewerSecurity`. */\nexport const DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1: PrivilegedReviewerSecurityProfileV1 =\n {\n requiredSecondFactor: 'passkeyWebAuthn',\n privilegedReauthTtlSeconds: 300,\n privilegedSessionDeviceBound: true,\n twoStepReauthCapabilities: [\n 'evidenceReveal',\n 'ncmecCredentialUse',\n 'reverseHashBlock',\n 'legalDisposition',\n 'falsePositiveCorrection',\n 'ncmecManualFallback',\n ],\n recoveryCodeCount: 10,\n recoveryCodeUse: 'auditedHighSeverity+forcesReenroll+criticalAlarm',\n allowPrivilegedSessionRevocation: true,\n everyInvocationAudited: true,\n };\n"]}