@ttt-productions/ttt-core 0.79.67 → 0.79.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/app-mode.d.ts +3 -1
- package/dist/constants/app-mode.d.ts.map +1 -1
- package/dist/constants/app-mode.js +2 -0
- package/dist/constants/app-mode.js.map +1 -1
- package/dist/constants/business-admin.d.ts +6 -0
- package/dist/constants/business-admin.d.ts.map +1 -1
- package/dist/constants/business-admin.js +6 -0
- package/dist/constants/business-admin.js.map +1 -1
- package/dist/constants/business-platform.d.ts +3 -0
- package/dist/constants/business-platform.d.ts.map +1 -1
- package/dist/constants/business-platform.js +4 -1
- package/dist/constants/business-platform.js.map +1 -1
- package/dist/constants/business-user.d.ts +6 -0
- package/dist/constants/business-user.d.ts.map +1 -1
- package/dist/constants/business-user.js +2 -0
- package/dist/constants/business-user.js.map +1 -1
- package/dist/constants/text-fields.d.ts +14 -0
- package/dist/constants/text-fields.d.ts.map +1 -1
- package/dist/constants/text-fields.js +5 -1
- package/dist/constants/text-fields.js.map +1 -1
- package/dist/doc-schemas/commissions.d.ts +4 -4
- package/dist/doc-schemas/content.d.ts +2 -2
- package/dist/doc-schemas/erasure-fates.d.ts +2 -0
- package/dist/doc-schemas/erasure-fates.d.ts.map +1 -1
- package/dist/doc-schemas/erasure-fates.js +3 -0
- package/dist/doc-schemas/erasure-fates.js.map +1 -1
- package/dist/doc-schemas/index.d.ts +1 -0
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +1 -0
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/media-activation-jobs.d.ts +3 -0
- package/dist/doc-schemas/media-activation-jobs.d.ts.map +1 -1
- package/dist/doc-schemas/media-assets.d.ts +11 -2
- package/dist/doc-schemas/media-assets.d.ts.map +1 -1
- package/dist/doc-schemas/media-assets.js +5 -0
- package/dist/doc-schemas/media-assets.js.map +1 -1
- package/dist/doc-schemas/media-copy-intents.d.ts +2 -0
- package/dist/doc-schemas/media-copy-intents.d.ts.map +1 -1
- package/dist/doc-schemas/messaging.d.ts +1 -1
- package/dist/doc-schemas/moderation.d.ts +3 -1
- package/dist/doc-schemas/moderation.d.ts.map +1 -1
- package/dist/doc-schemas/notification-ledger.d.ts +3 -4
- package/dist/doc-schemas/notification-ledger.d.ts.map +1 -1
- package/dist/doc-schemas/notification-ledger.js +3 -2
- package/dist/doc-schemas/notification-ledger.js.map +1 -1
- package/dist/doc-schemas/public-documents.d.ts +5 -5
- package/dist/doc-schemas/registry.d.ts +173 -18
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +3 -0
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/safety/evidence.d.ts +8 -0
- package/dist/doc-schemas/safety/evidence.d.ts.map +1 -1
- package/dist/doc-schemas/safety/report.d.ts +1 -0
- package/dist/doc-schemas/safety/report.d.ts.map +1 -1
- package/dist/doc-schemas/social.d.ts +4 -4
- package/dist/doc-schemas/square-announcement-jobs.d.ts +6 -6
- package/dist/doc-schemas/system-slots.d.ts +50 -0
- package/dist/doc-schemas/system-slots.d.ts.map +1 -0
- package/dist/doc-schemas/system-slots.js +56 -0
- package/dist/doc-schemas/system-slots.js.map +1 -0
- package/dist/doc-schemas/system.d.ts +5 -0
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +4 -1
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/doc-schemas/user.d.ts +5 -5
- package/dist/doc-schemas/work-project.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/media/domain-events-admin.d.ts +28 -0
- package/dist/media/domain-events-admin.d.ts.map +1 -1
- package/dist/media/domain-events-admin.js +24 -0
- package/dist/media/domain-events-admin.js.map +1 -1
- package/dist/media/domain-events.d.ts +26 -0
- package/dist/media/domain-events.d.ts.map +1 -1
- package/dist/media/domain-events.js +3 -1
- package/dist/media/domain-events.js.map +1 -1
- package/dist/media/edge-serving-contract.d.ts +3 -0
- package/dist/media/edge-serving-contract.d.ts.map +1 -1
- package/dist/media/file-origin.d.ts +1 -0
- package/dist/media/file-origin.d.ts.map +1 -1
- package/dist/media/file-origin.js +2 -0
- package/dist/media/file-origin.js.map +1 -1
- package/dist/media/pending-media.d.ts +305 -0
- package/dist/media/pending-media.d.ts.map +1 -1
- package/dist/media/start-upload.d.ts +1 -0
- package/dist/media/start-upload.d.ts.map +1 -1
- package/dist/media/target-info.d.ts +18 -2
- package/dist/media/target-info.d.ts.map +1 -1
- package/dist/media/target-info.js +8 -0
- package/dist/media/target-info.js.map +1 -1
- package/dist/media/ttt-media-specs.d.ts.map +1 -1
- package/dist/media/ttt-media-specs.js +38 -3
- package/dist/media/ttt-media-specs.js.map +1 -1
- package/dist/media/upload-tray-display.d.ts.map +1 -1
- package/dist/media/upload-tray-display.js +1 -0
- package/dist/media/upload-tray-display.js.map +1 -1
- package/dist/paths/collections.d.ts +2 -0
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +4 -0
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +2 -0
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +2 -0
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/admin.d.ts +54 -9
- package/dist/schemas/admin.d.ts.map +1 -1
- package/dist/schemas/admin.js +35 -2
- package/dist/schemas/admin.js.map +1 -1
- package/dist/schemas/notification.d.ts +2 -2
- package/dist/schemas/public-documents.d.ts +2 -2
- package/dist/schemas/safety.d.ts.map +1 -1
- package/dist/schemas/safety.js +6 -3
- package/dist/schemas/safety.js.map +1 -1
- package/dist/schemas/work-project-management.d.ts +8 -8
- package/dist/system-slots/guide-videos.d.ts +36 -0
- package/dist/system-slots/guide-videos.d.ts.map +1 -0
- package/dist/system-slots/guide-videos.js +19 -0
- package/dist/system-slots/guide-videos.js.map +1 -0
- package/dist/system-slots/index.d.ts +3 -0
- package/dist/system-slots/index.d.ts.map +1 -0
- package/dist/system-slots/index.js +3 -0
- package/dist/system-slots/index.js.map +1 -0
- package/dist/system-slots/system-slots.d.ts +92 -0
- package/dist/system-slots/system-slots.d.ts.map +1 -0
- package/dist/system-slots/system-slots.js +55 -0
- package/dist/system-slots/system-slots.js.map +1 -0
- package/dist/types/audit.d.ts +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js.map +1 -1
- package/dist/upload-variables/index.d.ts +1 -0
- package/dist/upload-variables/index.d.ts.map +1 -1
- package/dist/upload-variables/index.js +1 -0
- package/dist/upload-variables/index.js.map +1 -1
- package/dist/upload-variables/upload-system-content-variables.d.ts +34 -0
- package/dist/upload-variables/upload-system-content-variables.d.ts.map +1 -0
- package/dist/upload-variables/upload-system-content-variables.js +14 -0
- package/dist/upload-variables/upload-system-content-variables.js.map +1 -0
- package/dist/utils/display-name-reservation.d.ts +8 -0
- package/dist/utils/display-name-reservation.d.ts.map +1 -0
- package/dist/utils/display-name-reservation.js +11 -0
- package/dist/utils/display-name-reservation.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { WorkProjectType } from '../types/content.js';
|
|
2
|
-
|
|
2
|
+
/** The app's two modes: charter (the pre-funding limits) and full. */
|
|
3
|
+
export declare const APP_MODES: readonly ["charter", "full"];
|
|
4
|
+
export type AppMode = (typeof APP_MODES)[number];
|
|
3
5
|
/** The deployed mode. Changing this constant (and publishing) IS the flip. */
|
|
4
6
|
export declare const APP_MODE: AppMode;
|
|
5
7
|
/** Pick the active value for a mode-varied limit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mode.d.ts","sourceRoot":"","sources":["../../src/constants/app-mode.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,MAAM,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"app-mode.d.ts","sourceRoot":"","sources":["../../src/constants/app-mode.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,sEAAsE;AACtE,eAAO,MAAM,SAAS,8BAA+B,CAAC;AACtD,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,8EAA8E;AAC9E,eAAO,MAAM,QAAQ,EAAE,OAAmB,CAAC;AAE3C,qDAAqD;AACrD,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,KAAG,CACM,CAAC;AAEvD,yDAAyD;AACzD,MAAM,MAAM,eAAe,GAAG,GAAG,MAAM,IAAI,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAE1E,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,cAAc,EAAE,MAAM,CAAC;QACvB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,yBAAyB,EAAE,MAAM,CAAC;KACnC,CAAC;IACF,WAAW,EAAE;QACX,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;QAChC,qBAAqB,EAAE,MAAM,CAAC;QAC9B,WAAW,EAAE,MAAM,CAAC;QACpB,oFAAoF;QACpF,uBAAuB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AAC;QAClC,aAAa,EAAE,cAAc,CAAC;QAC9B,kBAAkB,EAAE,cAAc,CAAC;QACnC,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,UAAU,EAAE,cAAc,CAAC;QAC3B,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;KACjC,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,SAgI5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,SA4FzB,CAAC;AAEF;;;0DAG0D;AAC1D,eAAO,MAAM,aAAa,EAAE,SAA+C,CAAC;AAK5E;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAI3F,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,EACf,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,OAAO,MAAM,KACZ,MAMF,CAAC"}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
// min/max are deliberately mode-invariant — with ONE ruled exception (DJ
|
|
10
10
|
// 2026-07-13): chapter body content (maxChapterContentLength), because it
|
|
11
11
|
// bounds threshold-review reading effort per item during charter season.
|
|
12
|
+
/** The app's two modes: charter (the pre-funding limits) and full. */
|
|
13
|
+
export const APP_MODES = ['charter', 'full'];
|
|
12
14
|
/** The deployed mode. Changing this constant (and publishing) IS the flip. */
|
|
13
15
|
export const APP_MODE = 'charter';
|
|
14
16
|
/** Pick the active value for a mode-varied limit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mode.js","sourceRoot":"","sources":["../../src/constants/app-mode.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,+DAA+D;AAC/D,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,yEAAyE;AACzE,0EAA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;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,OAAe,EACf,KAAa,EACb,IAAY,EACZ,IAAa,EACL,EAAE;IACV,MAAM,IAAI,GAAG,MAAM,CACjB,GAAG,OAAO,8CAA8C,KAAK,IAAI,IAAI,0CAA0C,EAC/G,GAAG,OAAO,+BAA+B,KAAK,IAAI,IAAI,GAAG,CAC1D,CAAC;IACF,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// App mode + the charter/full limit sets — the single published constant that\n// drives the whole app's cost posture. The flip to full-live is: change\n// APP_MODE → publish ttt-core → install in ttt-prod (root + functions) →\n// deploy. There is NO runtime mode flag and NO console toggle.\n// See ttt-prod docs/design/charter-season-and-app-mode.md.\n//\n// Only real cost/abuse drivers vary by mode: media specs (ttt-media-specs.ts),\n// rate-limit values, count caps, batch sizes. Text-length limits and payment\n// min/max are deliberately mode-invariant — with ONE ruled exception (DJ\n// 2026-07-13): chapter body content (maxChapterContentLength), because it\n// bounds threshold-review reading effort per item during charter season.\n\nimport type { WorkProjectType } from '../types/content.js';\n\nexport type AppMode = 'charter' | 'full';\n\n/** The deployed mode. Changing this constant (and publishing) IS the flip. */\nexport const APP_MODE: AppMode = 'charter';\n\n/** Pick the active value for a mode-varied limit. */\nexport const byMode = <T>(charter: T, full: T): T =>\n (APP_MODE as AppMode) === 'charter' ? charter : full;\n\n/** Upstash-style sliding-window duration, e.g. '1 h'. */\nexport type RateLimitWindow = `${number} ${'ms' | 's' | 'm' | 'h' | 'd'}`;\n\nexport interface RateLimitValue {\n maxRequests: number;\n window: RateLimitWindow;\n}\n\nexport interface TttLimits {\n mode: AppMode;\n user: {\n maxCraftSkills: number;\n maxOwnedWorkProjects: number;\n maxAssociatedWorkProjects: number;\n };\n workProject: {\n maxGuildSize: number;\n maxFileFolders: number;\n maxWorkFiles: number;\n maxWorkFileStorageBytes: number;\n maxWorkProjectAuditions: number;\n maxCommissionListings: number;\n maxChapters: number;\n /** Chapter BODY length (chars) — the one mode-varied text limit (DJ 2026-07-13). */\n maxChapterContentLength: number;\n maxTuneTracks: number;\n maxTelevisionEpisodes: number;\n };\n /** Conversation Files container caps — PER CONVERSATION (one guild-invite\n * conversation or one admin-support dispatch thread). Both scopes share one cap\n * set; guild chat channels have no Conversation Files. DJ ruling 2026-07-25. */\n conversation: {\n /** Published active Conversation Files allowed in one conversation. */\n maxConversationFiles: number;\n /** Published STORED-OUTPUT bytes allowed in one conversation. */\n maxConversationFileStorageBytes: number;\n };\n hall: {\n maxSubmitBatch: number;\n };\n batches: {\n trendingFeedProcessLimit: number;\n maxFeedbackSubmitters: number;\n };\n /** Values for the backend rate limiters. Prefixes/factory stay in functions. */\n rateLimits: {\n UPLOAD: RateLimitValue;\n ADMIN_UPLOAD: RateLimitValue;\n CONTENT_WRITE: RateLimitValue;\n VOTE: RateLimitValue;\n MODERATION: RateLimitValue;\n SENSITIVE_ACTION: RateLimitValue;\n DISPLAY_NAME_CHECK: RateLimitValue;\n CHAT_MESSAGE: RateLimitValue;\n ADMIN_TASK: RateLimitValue;\n APPEAL_REVIEW: RateLimitValue;\n BAN_ACTION: RateLimitValue;\n SHARE_TRANSFER: RateLimitValue;\n CONTENT_REPORT: RateLimitValue;\n SHORT_LINK_CLICK: RateLimitValue;\n FOLLOW: RateLimitValue;\n MENTION_HISTORY: RateLimitValue;\n MEDIA_GRANT: RateLimitValue;\n CHAT_GRANT: RateLimitValue;\n OPERATOR_STEP_UP: RateLimitValue;\n ADMIN_MESSAGE_READ: RateLimitValue;\n USER_LOOKUP: RateLimitValue;\n NOTIFICATION_BROADCAST: RateLimitValue;\n NOTIFICATION_ARCHIVE: RateLimitValue;\n NOTIFICATION_MARK_SEEN: RateLimitValue;\n FEEDBACK: RateLimitValue;\n SHORT_LINK_CREATE: RateLimitValue;\n INVITE_ACTION: RateLimitValue;\n LIBRARY_SUBMISSION: RateLimitValue;\n CHANNEL_CREATE: RateLimitValue;\n CHECKOUT_CREATE: RateLimitValue;\n AGE_ATTEST: RateLimitValue;\n HALL_PREFERENCE: RateLimitValue;\n REFUND_DECISION: RateLimitValue;\n };\n}\n\nexport const CHARTER_LIMITS: TttLimits = {\n mode: 'charter',\n user: {\n maxCraftSkills: 8,\n maxOwnedWorkProjects: 3,\n maxAssociatedWorkProjects: 10,\n },\n workProject: {\n maxGuildSize: 25,\n maxFileFolders: 10,\n maxWorkFiles: 100,\n maxWorkFileStorageBytes: 2_684_354_560, // 2.5 GiB\n maxWorkProjectAuditions: 3,\n maxCommissionListings: 3,\n maxChapters: 5,\n // ~5,000 words — a full real chapter, while keeping the human threshold-review\n // reading effort per item bounded during charter season.\n maxChapterContentLength: 30_000,\n maxTuneTracks: 5,\n maxTelevisionEpisodes: 3,\n },\n // Conversation Files are QUOTA'D PER CONVERSATION (DJ ruling 2026-07-25). Counted on\n // STORED OUTPUT bytes (what actually sits in R2 after transcode), never on raw upload\n // bytes. Rationale: a per-file `maxBytes` cap alone bounds one upload but nothing stops\n // unbounded accumulation across a long-running conversation — this is the abuse brake\n // on that, and it is what `startUpload`'s reservation and the publication transfer both\n // check. Charter: 10 files / 500 MiB per conversation.\n conversation: {\n maxConversationFiles: 10,\n maxConversationFileStorageBytes: 524_288_000, // 500 MiB\n },\n hall: { maxSubmitBatch: 10 },\n batches: { trendingFeedProcessLimit: 250, maxFeedbackSubmitters: 25 },\n rateLimits: {\n // Uploads are charged ONCE per upload (in startUpload); the processor-side\n // check is a non-charging guard.\n UPLOAD: { maxRequests: 15, window: '1 h' },\n // A separate HIGHER bucket for uploads performed through the sanctioned admin\n // authority path — never an exemption. Bulk admin setup work (creating 3\n // auditions is ~5 uploads) exhausts the 15/h user bucket; 60/h covers a real\n // bulk admin session while keeping a brake on a compromised admin token and on\n // third-party quota/cost (Vision / Video Intelligence / R2). DJ ruling 2026-07-25.\n ADMIN_UPLOAD: { maxRequests: 60, window: '1 h' },\n // General content-write throttle for the non-upload write callables (text posts,\n // craft-skill edits, support-thread starts) that used to charge UPLOAD. Sharing\n // the 15/h charter upload window meant heavy text posting blocked real uploads\n // and vice versa; a separate 30/h bucket keeps each cost driver on its own\n // ceiling. DJ ruling 2026-07-25.\n CONTENT_WRITE: { maxRequests: 30, window: '1 h' },\n VOTE: { maxRequests: 100, window: '1 h' },\n MODERATION: { maxRequests: 50, window: '1 h' },\n // 30/h: one bucket is shared by ~35 callables (register, become-artisan,\n // create-work, invites, trades, appeals, …) — a real first-hour artisan does\n // 10-15 legitimate sensitive actions; 5/h blocked the intended golden path\n // (proven live by the hosted-dev E2E, 2026-07-07). DJ ruling 2026-07-08.\n SENSITIVE_ACTION: { maxRequests: 30, window: '1 h' },\n // 120/h (charter): checkDisplayNameAvailable is enforceAppCheck:true, so\n // reCAPTCHA-Enterprise attestation is the real abuse gate — this bucket is a\n // cost/DoS ceiling, not the security boundary. It is IP-keyed (pre-registration,\n // no uid yet) and the register form fires it debounced-LIVE as you type, so one\n // legit registrant spends ~3-8 checks and shared NAT/CGNAT multiplies that across\n // everyone on the IP. The old 20/h false-rejected legitimate shared-IP users and\n // could not fit a full hosted-dev E2E suite run on one IP. DJ ruling 2026-07-21.\n DISPLAY_NAME_CHECK: { maxRequests: 120, window: '1 h' },\n CHAT_MESSAGE: { maxRequests: 125, window: '1 h' },\n ADMIN_TASK: { maxRequests: 60, window: '1 h' },\n APPEAL_REVIEW: { maxRequests: 30, window: '1 h' },\n BAN_ACTION: { maxRequests: 20, window: '1 h' },\n SHARE_TRANSFER: { maxRequests: 10, window: '1 h' },\n CONTENT_REPORT: { maxRequests: 5, window: '1 h' },\n SHORT_LINK_CLICK: { maxRequests: 60, window: '1 h' },\n FOLLOW: { maxRequests: 20, window: '1 m' },\n MENTION_HISTORY: { maxRequests: 120, window: '1 h' },\n // Scoped-media grant minting (createMediaGrant). Its OWN bucket — it used to charge\n // MENTION_HISTORY, an unrelated surface, so neither limit meant what its name said and the\n // two shared a budget sized for neither (BACKEND-013). Refresh-driven, not user-initiated:\n // a grant is short-TTL (60 min work media, 15 min chat/folder scopes) and the client re-mints\n // under expiry, so a browsing session naturally spends several per hour PER SCOPE (each work,\n // each private file folder, each conversation). Cheap to serve (a Firestore permission read\n // plus an HMAC sign — no third-party cost), and a false 429 breaks media rendering outright,\n // so the ceiling is generous: it exists to stop a scripted grant-farming sweep, not to pace a\n // real reader. 120/h charter.\n MEDIA_GRANT: { maxRequests: 120, window: '1 h' },\n // Realtime chat grant minting (mintChatGrant) — previously NO limiter at all (BACKEND-013),\n // despite minting signed grants at concurrency: 20. Same refresh-driven shape as MEDIA_GRANT:\n // a 15-minute grant TTL means ~4 mints/hour for the inbox plus ~4 per open channel, doubled\n // again by socket reconnects on a flaky mobile network. It stays behind the per-channel\n // authorizeChannelScope gate, so this bucket is a cost/DoS ceiling rather than the\n // authorization boundary — sized to match MEDIA_GRANT so the two grant surfaces are paced\n // alike and neither can be starved by the other (separate Redis prefixes).\n CHAT_GRANT: { maxRequests: 120, window: '1 h' },\n // Operator step-up TOTP verification (confirmOperatorStepUp / verifyOperatorStepUp) —\n // previously unthrottled, so an attacker holding a stolen full-admin session could\n // brute-force the 6-digit second factor guarding the safety console (BACKEND-013).\n // DELIBERATELY THE TIGHTEST BUCKET IN THE SET: a real operator enrolls once and verifies\n // roughly twice an hour (the grant window is 30 minutes), so 10/h absorbs every legitimate\n // mistype while capping guessing at 10 attempts per hour against a code that rotates every\n // 30 seconds. Mode-INVARIANT — this is an admin security control, not a cost driver, so it\n // never loosens at the full-mode flip (same posture as MODERATION / BAN_ACTION / USER_LOOKUP).\n // The lockout-after-N-failures behaviour is a separate app-side concern; this is the throttle.\n OPERATOR_STEP_UP: { maxRequests: 10, window: '1 h' },\n ADMIN_MESSAGE_READ: { maxRequests: 60, window: '1 h' },\n // Admin exact-account lookup (searchPublicUsers / lookupUserByEmailOrUid) — a read, so a\n // generous per-minute bucket that still backstops a scripted enumeration sweep. Admin-only\n // and not a cost driver, so the value is the same in both modes (like MODERATION/ADMIN_TASK).\n USER_LOOKUP: { maxRequests: 30, window: '1 m' },\n NOTIFICATION_BROADCAST: { maxRequests: 10, window: '1 h' },\n NOTIFICATION_ARCHIVE: { maxRequests: 120, window: '1 h' },\n NOTIFICATION_MARK_SEEN: { maxRequests: 120, window: '1 h' },\n FEEDBACK: { maxRequests: 10, window: '1 h' },\n SHORT_LINK_CREATE: { maxRequests: 30, window: '1 h' },\n INVITE_ACTION: { maxRequests: 30, window: '1 h' },\n LIBRARY_SUBMISSION: { maxRequests: 10, window: '1 h' },\n CHANNEL_CREATE: { maxRequests: 5, window: '1 h' },\n CHECKOUT_CREATE: { maxRequests: 5, window: '1 h' },\n // The registration age step, keyed per hashed client IP (pre-account, no uid). One call per\n // attempt — a corrected date or a retry at most doubles it — so 30/h gives one IP the same\n // registrants per hour as DISPLAY_NAME_CHECK's 120/h at its 3–8 debounced checks each, while a\n // script minting age-attestation records gets far less headroom.\n AGE_ATTEST: { maxRequests: 30, window: '1 h' },\n // A member's own Hall settings, ink marks, hidden Works, reading position, and recently viewed\n // list. Reading position and recently viewed are written as the member reads, so the bucket is\n // sized like NOTIFICATION_MARK_SEEN, the other passive per-member write.\n HALL_PREFERENCE: { maxRequests: 120, window: '1 h' },\n // An admin's approve or deny of a refund request. Admin-only, so mode-invariant like\n // APPEAL_REVIEW, the other admin decision on a member's request.\n REFUND_DECISION: { maxRequests: 30, window: '1 h' },\n },\n};\n\nexport const FULL_LIMITS: TttLimits = {\n mode: 'full',\n user: {\n maxCraftSkills: 24,\n maxOwnedWorkProjects: 25,\n maxAssociatedWorkProjects: 100,\n },\n workProject: {\n maxGuildSize: 250,\n maxFileFolders: 25,\n maxWorkFiles: 1000,\n maxWorkFileStorageBytes: 26_843_545_600, // 25 GiB\n maxWorkProjectAuditions: 10,\n maxCommissionListings: 10,\n maxChapters: 50,\n // The intentional design ceiling (~17,000 words; trivially inside Firestore's\n // 1 MiB doc limit) — the audit trail deliberately stores field LENGTHS, not\n // content, because chapters can be this large (runUpdateChapterDetails).\n maxChapterContentLength: 100_000,\n maxTuneTracks: 50,\n maxTelevisionEpisodes: 25,\n },\n // 20 files / 1 GiB (full): the same per-conversation Conversation Files quota as\n // charter, scaled for a public-launch conversation. Still a hard ceiling on\n // unbounded R2 accumulation. See the CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n conversation: {\n maxConversationFiles: 20,\n maxConversationFileStorageBytes: 1_073_741_824, // 1 GiB\n },\n hall: { maxSubmitBatch: 50 },\n batches: { trendingFeedProcessLimit: 1000, maxFeedbackSubmitters: 100 },\n rateLimits: {\n UPLOAD: { maxRequests: 30, window: '1 h' },\n // 120/h (full): the same sanctioned-admin-path upload bucket as charter, scaled\n // with UPLOAD — always HIGHER than the user bucket, never an exemption, so a\n // compromised admin token and third-party media cost stay bounded. See the\n // CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n ADMIN_UPLOAD: { maxRequests: 120, window: '1 h' },\n // 60/h (full): the same non-upload content-write bucket as charter, scaled with\n // UPLOAD so text writes and media uploads never consume each other's ceiling.\n // See the CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n CONTENT_WRITE: { maxRequests: 60, window: '1 h' },\n VOTE: { maxRequests: 200, window: '1 h' },\n MODERATION: { maxRequests: 50, window: '1 h' },\n // 60/h: full-mode power users managing several works do dozens of legitimate\n // management actions per hour; still a hard backstop against scripts.\n // DJ ruling 2026-07-08 (charter 30 / full 60, single bucket; a bucket split\n // is filed post-launch in ttt-prod docs/post-launch/).\n SENSITIVE_ACTION: { maxRequests: 60, window: '1 h' },\n // 300/h (full): same reasoning as the charter value above (App-Check-gated\n // cost ceiling, IP-keyed, debounced-live). Public-launch CGNAT exposure is far\n // larger — hundreds of concurrent legit registrants can sit behind one carrier\n // IP — so err generous; the only cost of \"too high\" is trivial Firestore reads,\n // while \"too low\" false-rejects real users. Raise on evidence (watch prod logs\n // for legit 429s) rather than pre-emptively tightening. DJ ruling 2026-07-21.\n DISPLAY_NAME_CHECK: { maxRequests: 300, window: '1 h' },\n CHAT_MESSAGE: { maxRequests: 150, window: '1 h' },\n ADMIN_TASK: { maxRequests: 60, window: '1 h' },\n APPEAL_REVIEW: { maxRequests: 30, window: '1 h' },\n BAN_ACTION: { maxRequests: 20, window: '1 h' },\n SHARE_TRANSFER: { maxRequests: 10, window: '1 h' },\n CONTENT_REPORT: { maxRequests: 20, window: '1 h' },\n SHORT_LINK_CLICK: { maxRequests: 60, window: '1 h' },\n FOLLOW: { maxRequests: 60, window: '1 m' },\n MENTION_HISTORY: { maxRequests: 120, window: '1 h' },\n // 240/h (full): the same grant-minting buckets as charter, doubled with the surrounding\n // content limits. Full mode raises the ceilings a grant is minted PER (250-guildmate guilds,\n // 25 file folders, 1000 work files, 10 auditions), so one session legitimately touches more\n // scopes and re-mints more often. See the CHARTER_LIMITS notes above.\n MEDIA_GRANT: { maxRequests: 240, window: '1 h' },\n CHAT_GRANT: { maxRequests: 240, window: '1 h' },\n // Operator step-up stays at 10/h in BOTH modes — an admin second-factor throttle is a\n // security control, not a cost lever, so it never loosens at the flip. See CHARTER_LIMITS.\n OPERATOR_STEP_UP: { maxRequests: 10, window: '1 h' },\n ADMIN_MESSAGE_READ: { maxRequests: 60, window: '1 h' },\n // Admin exact-account lookup — same read bucket in both modes (see CHARTER_LIMITS note).\n USER_LOOKUP: { maxRequests: 30, window: '1 m' },\n NOTIFICATION_BROADCAST: { maxRequests: 10, window: '1 h' },\n NOTIFICATION_ARCHIVE: { maxRequests: 120, window: '1 h' },\n NOTIFICATION_MARK_SEEN: { maxRequests: 120, window: '1 h' },\n FEEDBACK: { maxRequests: 10, window: '1 h' },\n SHORT_LINK_CREATE: { maxRequests: 30, window: '1 h' },\n INVITE_ACTION: { maxRequests: 60, window: '1 h' },\n LIBRARY_SUBMISSION: { maxRequests: 20, window: '1 h' },\n CHANNEL_CREATE: { maxRequests: 20, window: '1 h' },\n CHECKOUT_CREATE: { maxRequests: 20, window: '1 h' },\n // Scaled with DISPLAY_NAME_CHECK's full-mode 300/h — see the CHARTER_LIMITS note.\n AGE_ATTEST: { maxRequests: 75, window: '1 h' },\n // Both stay at their charter values — see the CHARTER_LIMITS notes.\n HALL_PREFERENCE: { maxRequests: 120, window: '1 h' },\n REFUND_DECISION: { maxRequests: 30, window: '1 h' },\n },\n};\n\n/** The resolved limit set for the deployed mode. Import THIS (or the alias\n * constants that re-export from it), never CHARTER_/FULL_ directly. A read bound\n * that must hold whichever mode the data was written under uses\n * HALL_SUB_ITEM_READ_BOUND_BY_WORK_TYPE below instead. */\nexport const ACTIVE_LIMITS: TttLimits = byMode(CHARTER_LIMITS, FULL_LIMITS);\n\nconst largestInAnyMode = (pick: (limits: TttLimits) => number): number =>\n Math.max(pick(CHARTER_LIMITS), pick(FULL_LIMITS));\n\n/**\n * The most sub-items one Hall item can hold of each kind (Tale chapters, Tune tracks, Television\n * episodes) in ANY app mode — each kind's count cap at its largest across CHARTER_LIMITS and\n * FULL_LIMITS. A READ bound, never an enforced limit: a Hall item keeps the sub-items it was\n * published with when the mode changes, so a reader that must see all of them sizes its query\n * from this and treats a read that returns more as uncertain. Enforcement reads the active caps\n * (MAX_CHAPTERS, MAX_TUNE_TRACKS, MAX_TELEVISION_EPISODES).\n */\nexport const HALL_SUB_ITEM_READ_BOUND_BY_WORK_TYPE: Readonly<Record<WorkProjectType, number>> = {\n Tales: largestInAnyMode((limits) => limits.workProject.maxChapters),\n Tunes: largestInAnyMode((limits) => limits.workProject.maxTuneTracks),\n Television: largestInAnyMode((limits) => limits.workProject.maxTelevisionEpisodes),\n};\n\n/**\n * User-facing copy for a reached count cap — the ONE owner of the cap-message\n * shape, beside the limits it describes. Every callable refusing on a\n * mode-varied count cap formats through this. In charter mode the message\n * names Charter Season so the cap reads as the season's limit rather than the\n * platform's permanent shape; full mode stays neutral. `hint` is an optional\n * trailing sentence (e.g. \"Delete a file to add another.\").\n */\nexport const countCapReachedMessage = (\n subject: string,\n limit: number,\n noun: string,\n hint?: string,\n): string => {\n const base = byMode(\n `${subject} already has the Charter Season maximum of ${limit} ${noun} — caps expand when Charter Season ends.`,\n `${subject} already has the maximum of ${limit} ${noun}.`,\n );\n return hint ? `${base} ${hint}` : base;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"app-mode.js","sourceRoot":"","sources":["../../src/constants/app-mode.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,+DAA+D;AAC/D,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AAIzE,sEAAsE;AACtE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,MAAM,CAAU,CAAC;AAGtD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,QAAQ,GAAY,SAAS,CAAC;AAE3C,qDAAqD;AACrD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAI,OAAU,EAAE,IAAO,EAAK,EAAE,CACjD,QAAoB,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAoFvD,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC;QACjB,oBAAoB,EAAE,CAAC;QACvB,yBAAyB,EAAE,EAAE;KAC9B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,GAAG;QACjB,uBAAuB,EAAE,aAAa,EAAE,UAAU;QAClD,uBAAuB,EAAE,CAAC;QAC1B,qBAAqB,EAAE,CAAC;QACxB,WAAW,EAAE,CAAC;QACd,+EAA+E;QAC/E,yDAAyD;QACzD,uBAAuB,EAAE,MAAM;QAC/B,aAAa,EAAE,CAAC;QAChB,qBAAqB,EAAE,CAAC;KACzB;IACD,qFAAqF;IACrF,sFAAsF;IACtF,wFAAwF;I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CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAA8C;IAC9F,KAAK,EAAE,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC;IACnE,KAAK,EAAE,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC;IACrE,UAAU,EAAE,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,qBAAqB,CAAC;CACnF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,OAAe,EACf,KAAa,EACb,IAAY,EACZ,IAAa,EACL,EAAE;IACV,MAAM,IAAI,GAAG,MAAM,CACjB,GAAG,OAAO,8CAA8C,KAAK,IAAI,IAAI,0CAA0C,EAC/G,GAAG,OAAO,+BAA+B,KAAK,IAAI,IAAI,GAAG,CAC1D,CAAC;IACF,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// App mode + the charter/full limit sets — the single published constant that\n// drives the whole app's cost posture. The flip to full-live is: change\n// APP_MODE → publish ttt-core → install in ttt-prod (root + functions) →\n// deploy. There is NO runtime mode flag and NO console toggle.\n// See ttt-prod docs/design/charter-season-and-app-mode.md.\n//\n// Only real cost/abuse drivers vary by mode: media specs (ttt-media-specs.ts),\n// rate-limit values, count caps, batch sizes. Text-length limits and payment\n// min/max are deliberately mode-invariant — with ONE ruled exception (DJ\n// 2026-07-13): chapter body content (maxChapterContentLength), because it\n// bounds threshold-review reading effort per item during charter season.\n\nimport type { WorkProjectType } from '../types/content.js';\n\n/** The app's two modes: charter (the pre-funding limits) and full. */\nexport const APP_MODES = ['charter', 'full'] as const;\nexport type AppMode = (typeof APP_MODES)[number];\n\n/** The deployed mode. Changing this constant (and publishing) IS the flip. */\nexport const APP_MODE: AppMode = 'charter';\n\n/** Pick the active value for a mode-varied limit. */\nexport const byMode = <T>(charter: T, full: T): T =>\n (APP_MODE as AppMode) === 'charter' ? charter : full;\n\n/** Upstash-style sliding-window duration, e.g. '1 h'. */\nexport type RateLimitWindow = `${number} ${'ms' | 's' | 'm' | 'h' | 'd'}`;\n\nexport interface RateLimitValue {\n maxRequests: number;\n window: RateLimitWindow;\n}\n\nexport interface TttLimits {\n mode: AppMode;\n user: {\n maxCraftSkills: number;\n maxOwnedWorkProjects: number;\n maxAssociatedWorkProjects: number;\n };\n workProject: {\n maxGuildSize: number;\n maxFileFolders: number;\n maxWorkFiles: number;\n maxWorkFileStorageBytes: number;\n maxWorkProjectAuditions: number;\n maxCommissionListings: number;\n maxChapters: number;\n /** Chapter BODY length (chars) — the one mode-varied text limit (DJ 2026-07-13). */\n maxChapterContentLength: number;\n maxTuneTracks: number;\n maxTelevisionEpisodes: number;\n };\n /** Conversation Files container caps — PER CONVERSATION (one guild-invite\n * conversation or one admin-support dispatch thread). Both scopes share one cap\n * set; guild chat channels have no Conversation Files. DJ ruling 2026-07-25. */\n conversation: {\n /** Published active Conversation Files allowed in one conversation. */\n maxConversationFiles: number;\n /** Published STORED-OUTPUT bytes allowed in one conversation. */\n maxConversationFileStorageBytes: number;\n };\n hall: {\n maxSubmitBatch: number;\n };\n batches: {\n trendingFeedProcessLimit: number;\n maxFeedbackSubmitters: number;\n };\n /** Values for the backend rate limiters. Prefixes/factory stay in functions. */\n rateLimits: {\n UPLOAD: RateLimitValue;\n ADMIN_UPLOAD: RateLimitValue;\n CONTENT_WRITE: RateLimitValue;\n VOTE: RateLimitValue;\n MODERATION: RateLimitValue;\n SENSITIVE_ACTION: RateLimitValue;\n DISPLAY_NAME_CHECK: RateLimitValue;\n CHAT_MESSAGE: RateLimitValue;\n ADMIN_TASK: RateLimitValue;\n APPEAL_REVIEW: RateLimitValue;\n BAN_ACTION: RateLimitValue;\n SHARE_TRANSFER: RateLimitValue;\n CONTENT_REPORT: RateLimitValue;\n SHORT_LINK_CLICK: RateLimitValue;\n FOLLOW: RateLimitValue;\n MENTION_HISTORY: RateLimitValue;\n MEDIA_GRANT: RateLimitValue;\n CHAT_GRANT: RateLimitValue;\n OPERATOR_STEP_UP: RateLimitValue;\n ADMIN_MESSAGE_READ: RateLimitValue;\n USER_LOOKUP: RateLimitValue;\n NOTIFICATION_BROADCAST: RateLimitValue;\n NOTIFICATION_ARCHIVE: RateLimitValue;\n NOTIFICATION_MARK_SEEN: RateLimitValue;\n FEEDBACK: RateLimitValue;\n SHORT_LINK_CREATE: RateLimitValue;\n INVITE_ACTION: RateLimitValue;\n LIBRARY_SUBMISSION: RateLimitValue;\n CHANNEL_CREATE: RateLimitValue;\n CHECKOUT_CREATE: RateLimitValue;\n AGE_ATTEST: RateLimitValue;\n HALL_PREFERENCE: RateLimitValue;\n REFUND_DECISION: RateLimitValue;\n };\n}\n\nexport const CHARTER_LIMITS: TttLimits = {\n mode: 'charter',\n user: {\n maxCraftSkills: 8,\n maxOwnedWorkProjects: 3,\n maxAssociatedWorkProjects: 10,\n },\n workProject: {\n maxGuildSize: 25,\n maxFileFolders: 10,\n maxWorkFiles: 100,\n maxWorkFileStorageBytes: 2_684_354_560, // 2.5 GiB\n maxWorkProjectAuditions: 3,\n maxCommissionListings: 3,\n maxChapters: 5,\n // ~5,000 words — a full real chapter, while keeping the human threshold-review\n // reading effort per item bounded during charter season.\n maxChapterContentLength: 30_000,\n maxTuneTracks: 5,\n maxTelevisionEpisodes: 3,\n },\n // Conversation Files are QUOTA'D PER CONVERSATION (DJ ruling 2026-07-25). Counted on\n // STORED OUTPUT bytes (what actually sits in R2 after transcode), never on raw upload\n // bytes. Rationale: a per-file `maxBytes` cap alone bounds one upload but nothing stops\n // unbounded accumulation across a long-running conversation — this is the abuse brake\n // on that, and it is what `startUpload`'s reservation and the publication transfer both\n // check. Charter: 10 files / 500 MiB per conversation.\n conversation: {\n maxConversationFiles: 10,\n maxConversationFileStorageBytes: 524_288_000, // 500 MiB\n },\n hall: { maxSubmitBatch: 10 },\n batches: { trendingFeedProcessLimit: 250, maxFeedbackSubmitters: 25 },\n rateLimits: {\n // Uploads are charged ONCE per upload (in startUpload); the processor-side\n // check is a non-charging guard.\n UPLOAD: { maxRequests: 15, window: '1 h' },\n // A separate HIGHER bucket for uploads performed through the sanctioned admin\n // authority path — never an exemption. Bulk admin setup work (creating 3\n // auditions is ~5 uploads) exhausts the 15/h user bucket; 60/h covers a real\n // bulk admin session while keeping a brake on a compromised admin token and on\n // third-party quota/cost (Vision / Video Intelligence / R2). DJ ruling 2026-07-25.\n ADMIN_UPLOAD: { maxRequests: 60, window: '1 h' },\n // General content-write throttle for the non-upload write callables (text posts,\n // craft-skill edits, support-thread starts) that used to charge UPLOAD. Sharing\n // the 15/h charter upload window meant heavy text posting blocked real uploads\n // and vice versa; a separate 30/h bucket keeps each cost driver on its own\n // ceiling. DJ ruling 2026-07-25.\n CONTENT_WRITE: { maxRequests: 30, window: '1 h' },\n VOTE: { maxRequests: 100, window: '1 h' },\n MODERATION: { maxRequests: 50, window: '1 h' },\n // 30/h: one bucket is shared by ~35 callables (register, become-artisan,\n // create-work, invites, trades, appeals, …) — a real first-hour artisan does\n // 10-15 legitimate sensitive actions; 5/h blocked the intended golden path\n // (proven live by the hosted-dev E2E, 2026-07-07). DJ ruling 2026-07-08.\n SENSITIVE_ACTION: { maxRequests: 30, window: '1 h' },\n // 120/h (charter): checkDisplayNameAvailable is enforceAppCheck:true, so\n // reCAPTCHA-Enterprise attestation is the real abuse gate — this bucket is a\n // cost/DoS ceiling, not the security boundary. It is IP-keyed (pre-registration,\n // no uid yet) and the register form fires it debounced-LIVE as you type, so one\n // legit registrant spends ~3-8 checks and shared NAT/CGNAT multiplies that across\n // everyone on the IP. The old 20/h false-rejected legitimate shared-IP users and\n // could not fit a full hosted-dev E2E suite run on one IP. DJ ruling 2026-07-21.\n DISPLAY_NAME_CHECK: { maxRequests: 120, window: '1 h' },\n CHAT_MESSAGE: { maxRequests: 125, window: '1 h' },\n ADMIN_TASK: { maxRequests: 60, window: '1 h' },\n APPEAL_REVIEW: { maxRequests: 30, window: '1 h' },\n BAN_ACTION: { maxRequests: 20, window: '1 h' },\n SHARE_TRANSFER: { maxRequests: 10, window: '1 h' },\n CONTENT_REPORT: { maxRequests: 5, window: '1 h' },\n SHORT_LINK_CLICK: { maxRequests: 60, window: '1 h' },\n FOLLOW: { maxRequests: 20, window: '1 m' },\n MENTION_HISTORY: { maxRequests: 120, window: '1 h' },\n // Scoped-media grant minting (createMediaGrant). Its OWN bucket — it used to charge\n // MENTION_HISTORY, an unrelated surface, so neither limit meant what its name said and the\n // two shared a budget sized for neither (BACKEND-013). Refresh-driven, not user-initiated:\n // a grant is short-TTL (60 min work media, 15 min chat/folder scopes) and the client re-mints\n // under expiry, so a browsing session naturally spends several per hour PER SCOPE (each work,\n // each private file folder, each conversation). Cheap to serve (a Firestore permission read\n // plus an HMAC sign — no third-party cost), and a false 429 breaks media rendering outright,\n // so the ceiling is generous: it exists to stop a scripted grant-farming sweep, not to pace a\n // real reader. 120/h charter.\n MEDIA_GRANT: { maxRequests: 120, window: '1 h' },\n // Realtime chat grant minting (mintChatGrant) — previously NO limiter at all (BACKEND-013),\n // despite minting signed grants at concurrency: 20. Same refresh-driven shape as MEDIA_GRANT:\n // a 15-minute grant TTL means ~4 mints/hour for the inbox plus ~4 per open channel, doubled\n // again by socket reconnects on a flaky mobile network. It stays behind the per-channel\n // authorizeChannelScope gate, so this bucket is a cost/DoS ceiling rather than the\n // authorization boundary — sized to match MEDIA_GRANT so the two grant surfaces are paced\n // alike and neither can be starved by the other (separate Redis prefixes).\n CHAT_GRANT: { maxRequests: 120, window: '1 h' },\n // Operator step-up TOTP verification (confirmOperatorStepUp / verifyOperatorStepUp) —\n // previously unthrottled, so an attacker holding a stolen full-admin session could\n // brute-force the 6-digit second factor guarding the safety console (BACKEND-013).\n // DELIBERATELY THE TIGHTEST BUCKET IN THE SET: a real operator enrolls once and verifies\n // roughly twice an hour (the grant window is 30 minutes), so 10/h absorbs every legitimate\n // mistype while capping guessing at 10 attempts per hour against a code that rotates every\n // 30 seconds. Mode-INVARIANT — this is an admin security control, not a cost driver, so it\n // never loosens at the full-mode flip (same posture as MODERATION / BAN_ACTION / USER_LOOKUP).\n // The lockout-after-N-failures behaviour is a separate app-side concern; this is the throttle.\n OPERATOR_STEP_UP: { maxRequests: 10, window: '1 h' },\n ADMIN_MESSAGE_READ: { maxRequests: 60, window: '1 h' },\n // Admin exact-account lookup (searchPublicUsers / lookupUserByEmailOrUid) — a read, so a\n // generous per-minute bucket that still backstops a scripted enumeration sweep. Admin-only\n // and not a cost driver, so the value is the same in both modes (like MODERATION/ADMIN_TASK).\n USER_LOOKUP: { maxRequests: 30, window: '1 m' },\n NOTIFICATION_BROADCAST: { maxRequests: 10, window: '1 h' },\n NOTIFICATION_ARCHIVE: { maxRequests: 120, window: '1 h' },\n NOTIFICATION_MARK_SEEN: { maxRequests: 120, window: '1 h' },\n FEEDBACK: { maxRequests: 10, window: '1 h' },\n SHORT_LINK_CREATE: { maxRequests: 30, window: '1 h' },\n INVITE_ACTION: { maxRequests: 30, window: '1 h' },\n LIBRARY_SUBMISSION: { maxRequests: 10, window: '1 h' },\n CHANNEL_CREATE: { maxRequests: 5, window: '1 h' },\n CHECKOUT_CREATE: { maxRequests: 5, window: '1 h' },\n // The registration age step, keyed per hashed client IP (pre-account, no uid). One call per\n // attempt — a corrected date or a retry at most doubles it — so 30/h gives one IP the same\n // registrants per hour as DISPLAY_NAME_CHECK's 120/h at its 3–8 debounced checks each, while a\n // script minting age-attestation records gets far less headroom.\n AGE_ATTEST: { maxRequests: 30, window: '1 h' },\n // A member's own Hall settings, ink marks, hidden Works, reading position, and recently viewed\n // list. Reading position and recently viewed are written as the member reads, so the bucket is\n // sized like NOTIFICATION_MARK_SEEN, the other passive per-member write.\n HALL_PREFERENCE: { maxRequests: 120, window: '1 h' },\n // An admin's approve or deny of a refund request. Admin-only, so mode-invariant like\n // APPEAL_REVIEW, the other admin decision on a member's request.\n REFUND_DECISION: { maxRequests: 30, window: '1 h' },\n },\n};\n\nexport const FULL_LIMITS: TttLimits = {\n mode: 'full',\n user: {\n maxCraftSkills: 24,\n maxOwnedWorkProjects: 25,\n maxAssociatedWorkProjects: 100,\n },\n workProject: {\n maxGuildSize: 250,\n maxFileFolders: 25,\n maxWorkFiles: 1000,\n maxWorkFileStorageBytes: 26_843_545_600, // 25 GiB\n maxWorkProjectAuditions: 10,\n maxCommissionListings: 10,\n maxChapters: 50,\n // The intentional design ceiling (~17,000 words; trivially inside Firestore's\n // 1 MiB doc limit) — the audit trail deliberately stores field LENGTHS, not\n // content, because chapters can be this large (runUpdateChapterDetails).\n maxChapterContentLength: 100_000,\n maxTuneTracks: 50,\n maxTelevisionEpisodes: 25,\n },\n // 20 files / 1 GiB (full): the same per-conversation Conversation Files quota as\n // charter, scaled for a public-launch conversation. Still a hard ceiling on\n // unbounded R2 accumulation. See the CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n conversation: {\n maxConversationFiles: 20,\n maxConversationFileStorageBytes: 1_073_741_824, // 1 GiB\n },\n hall: { maxSubmitBatch: 50 },\n batches: { trendingFeedProcessLimit: 1000, maxFeedbackSubmitters: 100 },\n rateLimits: {\n UPLOAD: { maxRequests: 30, window: '1 h' },\n // 120/h (full): the same sanctioned-admin-path upload bucket as charter, scaled\n // with UPLOAD — always HIGHER than the user bucket, never an exemption, so a\n // compromised admin token and third-party media cost stay bounded. See the\n // CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n ADMIN_UPLOAD: { maxRequests: 120, window: '1 h' },\n // 60/h (full): the same non-upload content-write bucket as charter, scaled with\n // UPLOAD so text writes and media uploads never consume each other's ceiling.\n // See the CHARTER_LIMITS note above. DJ ruling 2026-07-25.\n CONTENT_WRITE: { maxRequests: 60, window: '1 h' },\n VOTE: { maxRequests: 200, window: '1 h' },\n MODERATION: { maxRequests: 50, window: '1 h' },\n // 60/h: full-mode power users managing several works do dozens of legitimate\n // management actions per hour; still a hard backstop against scripts.\n // DJ ruling 2026-07-08 (charter 30 / full 60, single bucket; a bucket split\n // is filed post-launch in ttt-prod docs/post-launch/).\n SENSITIVE_ACTION: { maxRequests: 60, window: '1 h' },\n // 300/h (full): same reasoning as the charter value above (App-Check-gated\n // cost ceiling, IP-keyed, debounced-live). Public-launch CGNAT exposure is far\n // larger — hundreds of concurrent legit registrants can sit behind one carrier\n // IP — so err generous; the only cost of \"too high\" is trivial Firestore reads,\n // while \"too low\" false-rejects real users. Raise on evidence (watch prod logs\n // for legit 429s) rather than pre-emptively tightening. DJ ruling 2026-07-21.\n DISPLAY_NAME_CHECK: { maxRequests: 300, window: '1 h' },\n CHAT_MESSAGE: { maxRequests: 150, window: '1 h' },\n ADMIN_TASK: { maxRequests: 60, window: '1 h' },\n APPEAL_REVIEW: { maxRequests: 30, window: '1 h' },\n BAN_ACTION: { maxRequests: 20, window: '1 h' },\n SHARE_TRANSFER: { maxRequests: 10, window: '1 h' },\n CONTENT_REPORT: { maxRequests: 20, window: '1 h' },\n SHORT_LINK_CLICK: { maxRequests: 60, window: '1 h' },\n FOLLOW: { maxRequests: 60, window: '1 m' },\n MENTION_HISTORY: { maxRequests: 120, window: '1 h' },\n // 240/h (full): the same grant-minting buckets as charter, doubled with the surrounding\n // content limits. Full mode raises the ceilings a grant is minted PER (250-guildmate guilds,\n // 25 file folders, 1000 work files, 10 auditions), so one session legitimately touches more\n // scopes and re-mints more often. See the CHARTER_LIMITS notes above.\n MEDIA_GRANT: { maxRequests: 240, window: '1 h' },\n CHAT_GRANT: { maxRequests: 240, window: '1 h' },\n // Operator step-up stays at 10/h in BOTH modes — an admin second-factor throttle is a\n // security control, not a cost lever, so it never loosens at the flip. See CHARTER_LIMITS.\n OPERATOR_STEP_UP: { maxRequests: 10, window: '1 h' },\n ADMIN_MESSAGE_READ: { maxRequests: 60, window: '1 h' },\n // Admin exact-account lookup — same read bucket in both modes (see CHARTER_LIMITS note).\n USER_LOOKUP: { maxRequests: 30, window: '1 m' },\n NOTIFICATION_BROADCAST: { maxRequests: 10, window: '1 h' },\n NOTIFICATION_ARCHIVE: { maxRequests: 120, window: '1 h' },\n NOTIFICATION_MARK_SEEN: { maxRequests: 120, window: '1 h' },\n FEEDBACK: { maxRequests: 10, window: '1 h' },\n SHORT_LINK_CREATE: { maxRequests: 30, window: '1 h' },\n INVITE_ACTION: { maxRequests: 60, window: '1 h' },\n LIBRARY_SUBMISSION: { maxRequests: 20, window: '1 h' },\n CHANNEL_CREATE: { maxRequests: 20, window: '1 h' },\n CHECKOUT_CREATE: { maxRequests: 20, window: '1 h' },\n // Scaled with DISPLAY_NAME_CHECK's full-mode 300/h — see the CHARTER_LIMITS note.\n AGE_ATTEST: { maxRequests: 75, window: '1 h' },\n // Both stay at their charter values — see the CHARTER_LIMITS notes.\n HALL_PREFERENCE: { maxRequests: 120, window: '1 h' },\n REFUND_DECISION: { maxRequests: 30, window: '1 h' },\n },\n};\n\n/** The resolved limit set for the deployed mode. Import THIS (or the alias\n * constants that re-export from it), never CHARTER_/FULL_ directly. A read bound\n * that must hold whichever mode the data was written under uses\n * HALL_SUB_ITEM_READ_BOUND_BY_WORK_TYPE below instead. */\nexport const ACTIVE_LIMITS: TttLimits = byMode(CHARTER_LIMITS, FULL_LIMITS);\n\nconst largestInAnyMode = (pick: (limits: TttLimits) => number): number =>\n Math.max(pick(CHARTER_LIMITS), pick(FULL_LIMITS));\n\n/**\n * The most sub-items one Hall item can hold of each kind (Tale chapters, Tune tracks, Television\n * episodes) in ANY app mode — each kind's count cap at its largest across CHARTER_LIMITS and\n * FULL_LIMITS. A READ bound, never an enforced limit: a Hall item keeps the sub-items it was\n * published with when the mode changes, so a reader that must see all of them sizes its query\n * from this and treats a read that returns more as uncertain. Enforcement reads the active caps\n * (MAX_CHAPTERS, MAX_TUNE_TRACKS, MAX_TELEVISION_EPISODES).\n */\nexport const HALL_SUB_ITEM_READ_BOUND_BY_WORK_TYPE: Readonly<Record<WorkProjectType, number>> = {\n Tales: largestInAnyMode((limits) => limits.workProject.maxChapters),\n Tunes: largestInAnyMode((limits) => limits.workProject.maxTuneTracks),\n Television: largestInAnyMode((limits) => limits.workProject.maxTelevisionEpisodes),\n};\n\n/**\n * User-facing copy for a reached count cap — the ONE owner of the cap-message\n * shape, beside the limits it describes. Every callable refusing on a\n * mode-varied count cap formats through this. In charter mode the message\n * names Charter Season so the cap reads as the season's limit rather than the\n * platform's permanent shape; full mode stays neutral. `hint` is an optional\n * trailing sentence (e.g. \"Delete a file to add another.\").\n */\nexport const countCapReachedMessage = (\n subject: string,\n limit: number,\n noun: string,\n hint?: string,\n): string => {\n const base = byMode(\n `${subject} already has the Charter Season maximum of ${limit} ${noun} — caps expand when Charter Season ends.`,\n `${subject} already has the maximum of ${limit} ${noun}.`,\n );\n return hint ? `${base} ${hint}` : base;\n};\n"]}
|
|
@@ -55,6 +55,8 @@ export declare const MAX_THRESHOLD_REVIEW_NOTES_LENGTH = 2000;
|
|
|
55
55
|
export declare const MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH = 2000;
|
|
56
56
|
/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */
|
|
57
57
|
export declare const MAX_INTERNAL_REASON_LENGTH = 2000;
|
|
58
|
+
/** The optional reason an admin records when closing an account discovered to be under 13. */
|
|
59
|
+
export declare const MAX_UNDER_13_CLOSE_REASON_LENGTH = 1000;
|
|
58
60
|
/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */
|
|
59
61
|
export declare const MAX_USER_FACING_REASON_LENGTH = 280;
|
|
60
62
|
/** Structured close-out summary on report/safety-case resolutions. */
|
|
@@ -78,6 +80,8 @@ export declare const MAX_CHAT_MODERATION_REASON_LENGTH = 1000;
|
|
|
78
80
|
export declare const MAX_BROADCAST_EXPLICIT_UIDS = 2000;
|
|
79
81
|
export declare const STEP_UP_ENROLL_REQUIRED = "OPERATOR_STEP_UP_ENROLL_REQUIRED";
|
|
80
82
|
export declare const STEP_UP_REQUIRED = "OPERATOR_STEP_UP_REQUIRED";
|
|
83
|
+
/** How many digits an operator step-up authenticator code has. */
|
|
84
|
+
export declare const OPERATOR_STEP_UP_CODE_LENGTH = 6;
|
|
81
85
|
/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */
|
|
82
86
|
export declare const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;
|
|
83
87
|
export declare const MAX_FUTURE_PLAN_TITLE_LENGTH = 200;
|
|
@@ -197,4 +201,6 @@ export declare const ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE: {
|
|
|
197
201
|
* untrusted stored task as a string, so an unknown type answers `false` (fails closed).
|
|
198
202
|
*/
|
|
199
203
|
export declare function isAdminTaskResolvedByCheckin(taskType: string): boolean;
|
|
204
|
+
/** The most accounts one `uidList` system slot can name. */
|
|
205
|
+
export declare const MAX_SYSTEM_UID_LIST = 25;
|
|
200
206
|
//# sourceMappingURL=business-admin.d.ts.map
|
|
@@ -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;;uDAEmD;;CAE3C,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/F,mFAAmF;AACnF,eAAO,MAAM,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AAEX;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,uIAQ/B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,uGAAuG;AACvG,eAAO,MAAM,mCAAmC;;;;;;;;;;;;CAYoB,CAAC;AAErE;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKtE;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
|
|
@@ -63,6 +63,8 @@ export const MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH = 2000;
|
|
|
63
63
|
// that carries the field — the numbers must never be re-hardcoded at an enforcement point.
|
|
64
64
|
/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */
|
|
65
65
|
export const MAX_INTERNAL_REASON_LENGTH = 2000;
|
|
66
|
+
/** The optional reason an admin records when closing an account discovered to be under 13. */
|
|
67
|
+
export const MAX_UNDER_13_CLOSE_REASON_LENGTH = 1000;
|
|
66
68
|
/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */
|
|
67
69
|
export const MAX_USER_FACING_REASON_LENGTH = 280;
|
|
68
70
|
/** Structured close-out summary on report/safety-case resolutions. */
|
|
@@ -91,6 +93,8 @@ export const MAX_BROADCAST_EXPLICIT_UIDS = 2000;
|
|
|
91
93
|
// both the callable (functions operatorStepUp.ts) and the frontend hook import these.
|
|
92
94
|
export const STEP_UP_ENROLL_REQUIRED = 'OPERATOR_STEP_UP_ENROLL_REQUIRED';
|
|
93
95
|
export const STEP_UP_REQUIRED = 'OPERATOR_STEP_UP_REQUIRED';
|
|
96
|
+
/** How many digits an operator step-up authenticator code has. */
|
|
97
|
+
export const OPERATOR_STEP_UP_CODE_LENGTH = 6;
|
|
94
98
|
/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */
|
|
95
99
|
export const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;
|
|
96
100
|
// --- Admin console config-content text caps ---
|
|
@@ -229,4 +233,6 @@ export function isAdminTaskResolvedByCheckin(taskType) {
|
|
|
229
233
|
return (Object.hasOwn(ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE, taskType) &&
|
|
230
234
|
ADMIN_TASK_RESOLUTION_OWNER_BY_TYPE[taskType] === 'checkin');
|
|
231
235
|
}
|
|
236
|
+
/** The most accounts one `uidList` system slot can name. */
|
|
237
|
+
export const MAX_SYSTEM_UID_LIST = 25;
|
|
232
238
|
//# sourceMappingURL=business-admin.js.map
|
|
@@ -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;;uDAEmD;IACnD,aAAa,EAAE,IAAI;CACX,CAAC;AAIX,mFAAmF;AACnF,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC,GAAG;IAC5C,CA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mB,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","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. The three anomaly creators that previously\n * hardcoded `priority: 1` (LOW) all write 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 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/** 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;\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/** 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"]}
|
|
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,MA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AE,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. The three anomaly creators that previously\n * hardcoded `priority: 1` (LOW) all write 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;\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/** 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"]}
|
|
@@ -11,6 +11,9 @@ export declare const FIRESTORE_DOCUMENT_ID_MAX_BYTES = 1500;
|
|
|
11
11
|
/** Firestore's published limit on an indexed field value, in UTF-8 bytes: a longer value is
|
|
12
12
|
* truncated in the index, so an equality query on it is not exact. */
|
|
13
13
|
export declare const FIRESTORE_INDEXED_VALUE_MAX_BYTES = 1500;
|
|
14
|
+
/** A notification fanout job's priority tiers, most urgent first: 0 urgent, 1 normal, 2 bulk. */
|
|
15
|
+
export declare const NOTIFICATION_FANOUT_PRIORITIES: readonly [0, 1, 2];
|
|
16
|
+
export type NotificationFanoutPriority = (typeof NOTIFICATION_FANOUT_PRIORITIES)[number];
|
|
14
17
|
/**
|
|
15
18
|
* Minimum pledgePayment amount accepted by the Stripe checkout flow, in cents
|
|
16
19
|
* (USD). $2.50 is the platform's business floor (DJ, 2026-06-11) — above
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-platform.d.ts","sourceRoot":"","sources":["../../src/constants/business-platform.ts"],"names":[],"mappings":"AAKA,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,6DAA6D,CAAC;AAI3F,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;uEACuE;AACvE,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAItD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,WAAa,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAA2B,CAAC;AAExE,uGAAuG;AACvG,eAAO,MAAM,qCAAqC,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"business-platform.d.ts","sourceRoot":"","sources":["../../src/constants/business-platform.ts"],"names":[],"mappings":"AAKA,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,6DAA6D,CAAC;AAI3F,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;uEACuE;AACvE,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAItD,iGAAiG;AACjG,eAAO,MAAM,8BAA8B,oBAAqB,CAAC;AACjE,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAIzF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,WAAa,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAA2B,CAAC;AAExE,uGAAuG;AACvG,eAAO,MAAM,qCAAqC,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Platform-infrastructure business-rule constants — short links, Firestore
|
|
2
|
-
// limits, and payment bounds.
|
|
2
|
+
// limits, notification fanout tiers, and payment bounds.
|
|
3
3
|
// --- Short Links ---
|
|
4
4
|
/** The length of the generated ID for short links. */
|
|
5
5
|
export const SHORT_LINK_LENGTH = 6;
|
|
@@ -15,6 +15,9 @@ export const FIRESTORE_DOCUMENT_ID_MAX_BYTES = 1500;
|
|
|
15
15
|
/** Firestore's published limit on an indexed field value, in UTF-8 bytes: a longer value is
|
|
16
16
|
* truncated in the index, so an equality query on it is not exact. */
|
|
17
17
|
export const FIRESTORE_INDEXED_VALUE_MAX_BYTES = 1500;
|
|
18
|
+
// --- Notification fanout ---
|
|
19
|
+
/** A notification fanout job's priority tiers, most urgent first: 0 urgent, 1 normal, 2 bulk. */
|
|
20
|
+
export const NOTIFICATION_FANOUT_PRIORITIES = [0, 1, 2];
|
|
18
21
|
// --- Payments ---
|
|
19
22
|
/**
|
|
20
23
|
* Minimum pledgePayment amount accepted by the Stripe checkout flow, in cents
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-platform.js","sourceRoot":"","sources":["../../src/constants/business-platform.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"business-platform.js","sourceRoot":"","sources":["../../src/constants/business-platform.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yDAAyD;AAEzD,sBAAsB;AAEtB,sDAAsD;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,wFAAwF;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,0DAA0D,CAAC;AAE3F,2BAA2B;AAE3B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,sEAAsE;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEpD;uEACuE;AACvE,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAEtD,8BAA8B;AAE9B,iGAAiG;AACjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAGjE,mBAAmB;AAEnB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAExE,uGAAuG;AACvG,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAG,CAAC","sourcesContent":["// Platform-infrastructure business-rule constants — short links, Firestore\n// limits, notification fanout tiers, and payment bounds.\n\n// --- Short Links ---\n\n/** The length of the generated ID for short links. */\nexport const SHORT_LINK_LENGTH = 6;\n\n/** The maximum number of attempts to generate a unique short link ID before failing. */\nexport const SHORT_LINK_MAX_ATTEMPTS = 5;\n\n/** Character set for short link IDs. Excludes ambiguous characters (0, O, l, 1, I). */\nexport const SHORT_LINK_CHARS = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789';\n\n// --- Firestore Limits ---\n\n/** Maximum operations in a single Firestore write batch. */\nexport const FIRESTORE_BATCH_LIMIT = 500;\n\n/** Firestore's published limit on one document id, in UTF-8 bytes. */\nexport const FIRESTORE_DOCUMENT_ID_MAX_BYTES = 1500;\n\n/** Firestore's published limit on an indexed field value, in UTF-8 bytes: a longer value is\n * truncated in the index, so an equality query on it is not exact. */\nexport const FIRESTORE_INDEXED_VALUE_MAX_BYTES = 1500;\n\n// --- Notification fanout ---\n\n/** A notification fanout job's priority tiers, most urgent first: 0 urgent, 1 normal, 2 bulk. */\nexport const NOTIFICATION_FANOUT_PRIORITIES = [0, 1, 2] as const;\nexport type NotificationFanoutPriority = (typeof NOTIFICATION_FANOUT_PRIORITIES)[number];\n\n// --- Payments ---\n\n/**\n * Minimum pledgePayment amount accepted by the Stripe checkout flow, in cents\n * (USD). $2.50 is the platform's business floor (DJ, 2026-06-11) — above\n * Stripe's 50¢ technical card-charge floor. Promoted out of the Zod schema so\n * the webhook can re-assert it server-side against the Stripe-confirmed\n * amount, independent of the client input bound. Mode-invariant by design.\n */\nexport const MIN_PLEDGE_PAYMENT_AMOUNT_CENTS = 250;\n\n/**\n * Maximum pledgePayment amount accepted by the Stripe checkout flow, in cents\n * (USD). $500,000.00. Well below Stripe's hard per-charge ceiling, but\n * high enough that legitimate large gifts pass without friction. Anything\n * above this is rejected by the schema before a Stripe session is created\n * or any rate-limit / audit-event side effects are incurred.\n */\nexport const MAX_PLEDGE_PAYMENT_AMOUNT_CENTS = 50_000_000;\n\n/**\n * Eligibility window for a user-initiated pledge refund REQUEST: 60 days from the\n * pledge, in milliseconds. Cross-boundary — the UI shows/hides the \"request refund\"\n * button by comparing `Date.now() - pledge.createdAt` against this, and the\n * requestPledgeRefund callable re-enforces it server-side before creating the request.\n */\nexport const PLEDGE_REFUND_REQUEST_WINDOW_MS = 60 * 24 * 60 * 60 * 1000;\n\n/** Longest Stripe Checkout session id the success-page lookup accepts (Stripe ids are far shorter). */\nexport const MAX_STRIPE_CHECKOUT_SESSION_ID_LENGTH = 256;\n"]}
|
|
@@ -38,6 +38,12 @@ export declare const AGE_TEEN_FLOOR_YEARS = 13;
|
|
|
38
38
|
export declare const AGE_ADULT_FLOOR_YEARS = 18;
|
|
39
39
|
/** The earliest birth year a date of birth may carry; an earlier year is not a real entry. */
|
|
40
40
|
export declare const DATE_OF_BIRTH_MIN_YEAR = 1900;
|
|
41
|
+
/** How many digits each typed part of a date of birth holds — the width of its box. */
|
|
42
|
+
export declare const DATE_OF_BIRTH_PART_DIGITS: {
|
|
43
|
+
readonly month: 2;
|
|
44
|
+
readonly day: 2;
|
|
45
|
+
readonly year: 4;
|
|
46
|
+
};
|
|
41
47
|
/** Maximum number of craft-skills a user can upload to their profile. Mode-varied. */
|
|
42
48
|
export declare const CRAFT_SKILL_LIMIT: number;
|
|
43
49
|
/** Maximum number of work projects an artisan can own (steward) at once. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-user.d.ts","sourceRoot":"","sources":["../../src/constants/business-user.ts"],"names":[],"mappings":"AAKA,0DAA0D;AAC1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;AACtF,eAAO,MAAM,iBAAiB,QAAoC,CAAC;AAInE,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,QAA0C,CAAC;AAE/E,0EAA0E;AAC1E,eAAO,MAAM,4BAA4B,QAA+C,CAAC;AAEzF,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,yFAAyF;AACzF,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAI/C,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAIpC,6DAA6D;AAC7D,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAIrC;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC"}
|
|
@@ -43,6 +43,8 @@ export const AGE_TEEN_FLOOR_YEARS = 13;
|
|
|
43
43
|
export const AGE_ADULT_FLOOR_YEARS = 18;
|
|
44
44
|
/** The earliest birth year a date of birth may carry; an earlier year is not a real entry. */
|
|
45
45
|
export const DATE_OF_BIRTH_MIN_YEAR = 1900;
|
|
46
|
+
/** How many digits each typed part of a date of birth holds — the width of its box. */
|
|
47
|
+
export const DATE_OF_BIRTH_PART_DIGITS = { month: 2, day: 2, year: 4 };
|
|
46
48
|
import { ACTIVE_LIMITS } from './app-mode.js';
|
|
47
49
|
// --- User Profile Craft Skills ---
|
|
48
50
|
/** Maximum number of craft-skills a user can upload to their profile. Mode-varied. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-user.js","sourceRoot":"","sources":["../../src/constants/business-user.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+BAA+B;AAE/B,6BAA6B;AAE7B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC,0DAA0D;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,8EAA8E;AAC9E,MAAM,CAAC,MAA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GAAG,CAAC,CAAC;AAErC,gCAAgC;AAEhC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC","sourcesContent":["// User identity + profile business-rule constants — display names, craft skills,\n// mention history, and search.\n\n// --- User Display Names ---\n\n/** Minimum length for a user display name (inclusive). */\nexport const USERNAME_MIN_LENGTH = 3;\n\n/** Maximum length for a user display name (inclusive). */\nexport const USERNAME_MAX_LENGTH = 20;\n\n/** Maximum length for the name of a theme a member builds in Theme Studio. */\nexport const MAX_THEME_NAME_LENGTH = 50;\n\n/**\n * Display-name sentinel for an erased account (N3 data-deletion / GDPR erasure).\n * The `publicUsers/{uid}` doc is kept (so uid→name resolvers keep working) with\n * `displayName` set to this and `anonymizedAt` stamped; uid-keyed authorship /\n * share-tombstone records render with this label.\n */\nexport const FORMER_MEMBER_DISPLAY_NAME = 'Former member';\n\n/**\n * N3 account deletion / GDPR erasure — the grace window (days) between the deletion\n * request and the destructive scrub. Logging back in during the window is the one cancel.\n * Persisted on each request as `graceDays` (compliance trail) and stated as product policy\n * in the user-facing data-deletion documents — ONE declaration; the callable and the copy\n * both derive from it.\n */\nexport const ACCOUNT_DELETION_GRACE_DAYS = 30;\n\n// --- Account Passwords ---\n\n/**\n * Minimum length (inclusive) for a TTT account password. Counted in JavaScript\n * string length units (UTF-16 code units), consistent with HTML input length\n * behavior and the Firebase Auth SDK. Above Firebase's hard floor of 6 and within\n * the supported hosted password-policy range, which is set from this declaration.\n */\nexport const PASSWORD_MIN_LENGTH = 7;\n\n/**\n * Maximum length (inclusive) for a TTT account password, in the same UTF-16\n * code-unit units as the minimum. Long enough for passphrases and\n * password-manager output while keeping the product input finite.\n */\nexport const PASSWORD_MAX_LENGTH = 64;\n\n// --- Age from a date of birth ---\n\n/** Whole years of age at which a person may hold a (teen) account; younger is refused. */\nexport const AGE_TEEN_FLOOR_YEARS = 13;\n\n/** Whole years of age at which an account is adult. */\nexport const AGE_ADULT_FLOOR_YEARS = 18;\n\n/** The earliest birth year a date of birth may carry; an earlier year is not a real entry. */\nexport const DATE_OF_BIRTH_MIN_YEAR = 1900;\n\nimport { ACTIVE_LIMITS } from './app-mode.js';\n\n// --- User Profile Craft Skills ---\n\n/** Maximum number of craft-skills a user can upload to their profile. Mode-varied. */\nexport const CRAFT_SKILL_LIMIT = ACTIVE_LIMITS.user.maxCraftSkills;\n\n// --- Work-project participation caps (mode-varied, server-enforced) ---\n\n/** Maximum number of work projects an artisan can own (steward) at once. */\nexport const MAX_OWNED_WORK_PROJECTS = ACTIVE_LIMITS.user.maxOwnedWorkProjects;\n\n/** Maximum number of active guild memberships a user can hold at once. */\nexport const MAX_ASSOCIATED_WORK_PROJECTS = ACTIVE_LIMITS.user.maxAssociatedWorkProjects;\n\n/** Maximum number of tags allowed per craftSkill. */\nexport const MAX_CRAFT_SKILL_TAGS = 5;\n\n/** Maximum length for a craft-skill name. */\nexport const MAX_CRAFT_SKILL_NAME_LENGTH = 200;\n\n/** Non-US artisan-interest country/region free-text (input schema + privateData doc). */\nexport const MAX_ARTISAN_LOCATION_LENGTH = 100;\n\n// --- Mention History ---\n\n/** Maximum number of recent mentions kept in the user's mention-history hook. */\nexport const MAX_HISTORY_ITEMS = 10;\n\n// --- Search ---\n\n/** Maximum number of results returned by the search hook. */\nexport const SEARCH_RESULT_LIMIT = 6;\n\n// --- First-visit site tour ---\n\n/**\n * Current first-visit site-tour version. The `updateSiteTourPreference` callable stamps\n * this onto `privateData.siteTour.completedVersion` at completion, and the landing\n * eligibility check suppresses the automatic invitation while a member's\n * `completedVersion` equals it. Bump when the permanent-shell-controls tour changes\n * enough to re-invite every member. See\n * ttt-prod docs/design/landing-backstage-guide-and-first-visit-plan.md §10.\n */\nexport const SITE_TOUR_CURRENT_VERSION = 1;\n"]}
|
|
1
|
+
{"version":3,"file":"business-user.js","sourceRoot":"","sources":["../../src/constants/business-user.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+BAA+B;AAE/B,6BAA6B;AAE7B,0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oB,GAAG,CAAC,CAAC;AAEtC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,yFAAyF;AACzF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,0BAA0B;AAE1B,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,iBAAiB;AAEjB,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC,gCAAgC;AAEhC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC","sourcesContent":["// User identity + profile business-rule constants — display names, craft skills,\n// mention history, and search.\n\n// --- User Display Names ---\n\n/** Minimum length for a user display name (inclusive). */\nexport const USERNAME_MIN_LENGTH = 3;\n\n/** Maximum length for a user display name (inclusive). */\nexport const USERNAME_MAX_LENGTH = 20;\n\n/** Maximum length for the name of a theme a member builds in Theme Studio. */\nexport const MAX_THEME_NAME_LENGTH = 50;\n\n/**\n * Display-name sentinel for an erased account (N3 data-deletion / GDPR erasure).\n * The `publicUsers/{uid}` doc is kept (so uid→name resolvers keep working) with\n * `displayName` set to this and `anonymizedAt` stamped; uid-keyed authorship /\n * share-tombstone records render with this label.\n */\nexport const FORMER_MEMBER_DISPLAY_NAME = 'Former member';\n\n/**\n * N3 account deletion / GDPR erasure — the grace window (days) between the deletion\n * request and the destructive scrub. Logging back in during the window is the one cancel.\n * Persisted on each request as `graceDays` (compliance trail) and stated as product policy\n * in the user-facing data-deletion documents — ONE declaration; the callable and the copy\n * both derive from it.\n */\nexport const ACCOUNT_DELETION_GRACE_DAYS = 30;\n\n// --- Account Passwords ---\n\n/**\n * Minimum length (inclusive) for a TTT account password. Counted in JavaScript\n * string length units (UTF-16 code units), consistent with HTML input length\n * behavior and the Firebase Auth SDK. Above Firebase's hard floor of 6 and within\n * the supported hosted password-policy range, which is set from this declaration.\n */\nexport const PASSWORD_MIN_LENGTH = 7;\n\n/**\n * Maximum length (inclusive) for a TTT account password, in the same UTF-16\n * code-unit units as the minimum. Long enough for passphrases and\n * password-manager output while keeping the product input finite.\n */\nexport const PASSWORD_MAX_LENGTH = 64;\n\n// --- Age from a date of birth ---\n\n/** Whole years of age at which a person may hold a (teen) account; younger is refused. */\nexport const AGE_TEEN_FLOOR_YEARS = 13;\n\n/** Whole years of age at which an account is adult. */\nexport const AGE_ADULT_FLOOR_YEARS = 18;\n\n/** The earliest birth year a date of birth may carry; an earlier year is not a real entry. */\nexport const DATE_OF_BIRTH_MIN_YEAR = 1900;\n\n/** How many digits each typed part of a date of birth holds — the width of its box. */\nexport const DATE_OF_BIRTH_PART_DIGITS = { month: 2, day: 2, year: 4 } as const;\n\nimport { ACTIVE_LIMITS } from './app-mode.js';\n\n// --- User Profile Craft Skills ---\n\n/** Maximum number of craft-skills a user can upload to their profile. Mode-varied. */\nexport const CRAFT_SKILL_LIMIT = ACTIVE_LIMITS.user.maxCraftSkills;\n\n// --- Work-project participation caps (mode-varied, server-enforced) ---\n\n/** Maximum number of work projects an artisan can own (steward) at once. */\nexport const MAX_OWNED_WORK_PROJECTS = ACTIVE_LIMITS.user.maxOwnedWorkProjects;\n\n/** Maximum number of active guild memberships a user can hold at once. */\nexport const MAX_ASSOCIATED_WORK_PROJECTS = ACTIVE_LIMITS.user.maxAssociatedWorkProjects;\n\n/** Maximum number of tags allowed per craftSkill. */\nexport const MAX_CRAFT_SKILL_TAGS = 5;\n\n/** Maximum length for a craft-skill name. */\nexport const MAX_CRAFT_SKILL_NAME_LENGTH = 200;\n\n/** Non-US artisan-interest country/region free-text (input schema + privateData doc). */\nexport const MAX_ARTISAN_LOCATION_LENGTH = 100;\n\n// --- Mention History ---\n\n/** Maximum number of recent mentions kept in the user's mention-history hook. */\nexport const MAX_HISTORY_ITEMS = 10;\n\n// --- Search ---\n\n/** Maximum number of results returned by the search hook. */\nexport const SEARCH_RESULT_LIMIT = 6;\n\n// --- First-visit site tour ---\n\n/**\n * Current first-visit site-tour version. The `updateSiteTourPreference` callable stamps\n * this onto `privateData.siteTour.completedVersion` at completion, and the landing\n * eligibility check suppresses the automatic invitation while a member's\n * `completedVersion` equals it. Bump when the permanent-shell-controls tour changes\n * enough to re-invite every member. See\n * ttt-prod docs/design/landing-backstage-guide-and-first-visit-plan.md §10.\n */\nexport const SITE_TOUR_CURRENT_VERSION = 1;\n"]}
|
|
@@ -322,6 +322,20 @@ export declare const APP_VERSION_INPUT: import("@ttt-productions/input-format-co
|
|
|
322
322
|
readonly min: 1;
|
|
323
323
|
readonly max: 64;
|
|
324
324
|
}>;
|
|
325
|
+
/** The optional milestone evidence an admin records with an app-mode flip. */
|
|
326
|
+
export declare const APP_MODE_FLIP_EVIDENCE_INPUT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
|
|
327
|
+
readonly label: "Milestone evidence";
|
|
328
|
+
readonly format: "none";
|
|
329
|
+
readonly min: 0;
|
|
330
|
+
readonly max: 2000;
|
|
331
|
+
}>;
|
|
332
|
+
/** The optional reason an admin records when closing an account discovered to be under 13. */
|
|
333
|
+
export declare const CLOSE_UNDER_13_REASON_INPUT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
|
|
334
|
+
readonly label: "Reason";
|
|
335
|
+
readonly format: "none";
|
|
336
|
+
readonly min: 0;
|
|
337
|
+
readonly max: 1000;
|
|
338
|
+
}>;
|
|
325
339
|
export declare const TAKE_IT_DOWN_VALIDITY_RATIONALE_INPUT: import("@ttt-productions/input-format-core").DeclaredInputFormat<{
|
|
326
340
|
readonly label: "Rationale";
|
|
327
341
|
readonly format: "none";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-fields.d.ts","sourceRoot":"","sources":["../../src/constants/text-fields.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAcnE,OAAO,EAQL,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACtC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uBAAuB;;;;;;EAAqH,CAAC;AAC1J,eAAO,MAAM,wBAAwB;;;;;;EAA6H,CAAC;AACnK,eAAO,MAAM,wBAAwB;;;;;;EAA6H,CAAC;AACnK,eAAO,MAAM,uBAAuB;;;;;;EAAqH,CAAC;AAI1J,eAAO,MAAM,yBAAyB;;;;;;EAAkI,CAAC;AACzK,eAAO,MAAM,sBAAsB;;;;;;EAA+H,CAAC;AACnK,eAAO,MAAM,kCAAkC;;;;;;EAAkK,CAAC;AAClN,eAAO,MAAM,0BAA0B;;;;;;EAAsI,CAAC;AAC9K,eAAO,MAAM,+BAA+B;;;;;;EAAkI,CAAC;AAC/K,eAAO,MAAM,2BAA2B;;;;;;EAAqI,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { CHAT_MESSAGE_TEXT_INPUT } from '@ttt-productions/chat-schemas';
|
|
|
8
8
|
import { defineInputFormat } from '@ttt-productions/input-format-core';
|
|
9
9
|
import { MAX_CHAPTER_CONTENT_LENGTH, MAX_CHAPTER_TITLE_LENGTH, MAX_FILE_FOLDER_NAME_LENGTH, MAX_TELEVISION_EPISODE_DESCRIPTION_LENGTH, MAX_TELEVISION_EPISODE_TITLE_LENGTH, MAX_TUNE_TRACK_DESCRIPTION_LENGTH, MAX_TUNE_TRACK_TITLE_LENGTH, MAX_WORK_PROJECT_DESCRIPTION_LENGTH, MAX_WORK_PROJECT_TITLE_LENGTH, MAX_WORK_REALM_DESCRIPTION_LENGTH, MAX_WORK_REALM_TITLE_LENGTH, } from './business-work-project.js';
|
|
10
10
|
import { MAX_AUDITION_DESCRIPTION_LENGTH, MAX_AUDITION_TITLE_LENGTH, MAX_COMMISSION_DESCRIPTION_LENGTH, MAX_COMMISSION_TITLE_LENGTH, MAX_GUILD_INVITE_MESSAGE_LENGTH, MAX_HALL_CHANGE_REQUEST_REASON_LENGTH, MAX_POST_LENGTH, } from './business-content.js';
|
|
11
|
-
import { MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH, MAX_ADMIN_DISPATCH_SUBJECT_LENGTH, MAX_AGREEMENT_POINT_LENGTH, MAX_ANNOUNCEMENT_MESSAGE_LENGTH, MAX_APP_VERSION_LENGTH, MAX_APPEAL_MESSAGE_LENGTH, MAX_APPEAL_REVIEW_NOTES_LENGTH, MAX_BROADCAST_TITLE_LENGTH, MAX_CONTENT_PAGE_BODY_LENGTH, MAX_CONTENT_PAGE_HEADING_LENGTH, MAX_DMCA_CONTACT_LABEL_LENGTH, MAX_DMCA_CONTACT_VALUE_LENGTH, MAX_FEEDBACK_SUGGESTION_LENGTH, MAX_FUTURE_PLAN_DESCRIPTION_LENGTH, MAX_FUTURE_PLAN_TITLE_LENGTH, MAX_INTERNAL_REASON_LENGTH, MAX_MAINTENANCE_MESSAGE_LENGTH, MAX_NCII_AUTHORITY_BASIS_LENGTH, MAX_NCII_NONCONSENT_STATEMENT_LENGTH, MAX_NCII_RATIONALE_LENGTH, MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH, MAX_NCII_REQUESTER_NAME_LENGTH, MAX_NCII_SIGNED_NAME_LENGTH, MAX_NCII_SUPPORTING_FACTS_LENGTH, MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH, MAX_NOTIFICATION_MESSAGE_LENGTH, MAX_PLATFORM_RULE_DESCRIPTION_LENGTH, MAX_PLATFORM_RULE_TITLE_LENGTH, MAX_REPORT_COMMENT_LENGTH, MAX_REQUIRE_RETITLE_REASON_LENGTH, MAX_SAFETY_ADMIN_NOTE_LENGTH, MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH, MAX_TAKE_IT_DOWN_COPY_LENGTH, MAX_THRESHOLD_REVIEW_NOTES_LENGTH, MAX_USER_FACING_REASON_DETAIL_LENGTH, MAX_USER_FACING_REASON_LENGTH, MIN_SAFETY_RATIONALE_LENGTH, } from './business-admin.js';
|
|
11
|
+
import { MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH, MAX_ADMIN_DISPATCH_SUBJECT_LENGTH, MAX_AGREEMENT_POINT_LENGTH, MAX_ANNOUNCEMENT_MESSAGE_LENGTH, MAX_APP_VERSION_LENGTH, MAX_APPEAL_MESSAGE_LENGTH, MAX_APPEAL_REVIEW_NOTES_LENGTH, MAX_BROADCAST_TITLE_LENGTH, MAX_CONTENT_PAGE_BODY_LENGTH, MAX_CONTENT_PAGE_HEADING_LENGTH, MAX_DMCA_CONTACT_LABEL_LENGTH, MAX_DMCA_CONTACT_VALUE_LENGTH, MAX_FEEDBACK_SUGGESTION_LENGTH, MAX_FUTURE_PLAN_DESCRIPTION_LENGTH, MAX_FUTURE_PLAN_TITLE_LENGTH, MAX_INTERNAL_REASON_LENGTH, MAX_MAINTENANCE_MESSAGE_LENGTH, MAX_NCII_AUTHORITY_BASIS_LENGTH, MAX_NCII_NONCONSENT_STATEMENT_LENGTH, MAX_NCII_RATIONALE_LENGTH, MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH, MAX_NCII_REQUESTER_NAME_LENGTH, MAX_NCII_SIGNED_NAME_LENGTH, MAX_NCII_SUPPORTING_FACTS_LENGTH, MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH, MAX_NOTIFICATION_MESSAGE_LENGTH, MAX_PLATFORM_RULE_DESCRIPTION_LENGTH, MAX_PLATFORM_RULE_TITLE_LENGTH, MAX_REPORT_COMMENT_LENGTH, MAX_REQUIRE_RETITLE_REASON_LENGTH, MAX_SAFETY_ADMIN_NOTE_LENGTH, MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH, MAX_TAKE_IT_DOWN_COPY_LENGTH, MAX_THRESHOLD_REVIEW_NOTES_LENGTH, MAX_UNDER_13_CLOSE_REASON_LENGTH, MAX_USER_FACING_REASON_DETAIL_LENGTH, MAX_USER_FACING_REASON_LENGTH, MIN_SAFETY_RATIONALE_LENGTH, } from './business-admin.js';
|
|
12
12
|
import { MAX_ARTISAN_LOCATION_LENGTH, MAX_THEME_NAME_LENGTH, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, } from './business-user.js';
|
|
13
13
|
import { MAX_GUILD_CHAT_CHANNEL_DESCRIPTION_LENGTH, MAX_GUILD_CHAT_CHANNEL_NAME_LENGTH, } from './chat.js';
|
|
14
14
|
import { MAX_CURATED_PROFANITY_TERM_LENGTH, MIN_CURATED_PROFANITY_TERM_LENGTH, } from './moderation.js';
|
|
@@ -118,6 +118,10 @@ export const MAINTENANCE_MESSAGE_INPUT = defineInputFormat({ label: 'Maintenance
|
|
|
118
118
|
/** The site announcement banner; empty clears it. */
|
|
119
119
|
export const ANNOUNCEMENT_MESSAGE_INPUT = defineInputFormat({ label: 'Announcement', format: 'none', min: 0, max: MAX_ANNOUNCEMENT_MESSAGE_LENGTH });
|
|
120
120
|
export const APP_VERSION_INPUT = defineInputFormat({ label: 'App version', format: 'none', min: 1, max: MAX_APP_VERSION_LENGTH });
|
|
121
|
+
/** The optional milestone evidence an admin records with an app-mode flip. */
|
|
122
|
+
export const APP_MODE_FLIP_EVIDENCE_INPUT = defineInputFormat({ label: 'Milestone evidence', format: 'none', min: 0, max: MAX_INTERNAL_REASON_LENGTH });
|
|
123
|
+
/** The optional reason an admin records when closing an account discovered to be under 13. */
|
|
124
|
+
export const CLOSE_UNDER_13_REASON_INPUT = defineInputFormat({ label: 'Reason', format: 'none', min: 0, max: MAX_UNDER_13_CLOSE_REASON_LENGTH });
|
|
121
125
|
// --- The safety console ---
|
|
122
126
|
export const TAKE_IT_DOWN_VALIDITY_RATIONALE_INPUT = defineInputFormat({ label: 'Rationale', format: 'none', min: MIN_SAFETY_RATIONALE_LENGTH, max: MAX_NCII_RATIONALE_LENGTH });
|
|
123
127
|
/** An operator's internal reason for reopening a safety case or taking a safety account action. */
|