Files
lincodex/frontend/src/shared/api/schemas/assessment/assessmentAttempt.zod.ts
T

654 lines
94 KiB
TypeScript

/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const assessmentAttemptOneOneVersionsBankVersionMax = 64;
export const assessmentAttemptOneOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptOneOneVersionsAlgorithmVersionMax = 64;
export const assessmentAttemptOneOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptOneOneSessionsOneUsedMax = 10;
export const assessmentAttemptOneOneSessionsOneMaxMax = 10;
export const assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMin = 60;
export const assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMax = 86400;
export const assessmentAttemptOneOneProgressAnsweredItemsMin = 0;
export const assessmentAttemptOneOneProgressAnsweredItemsMax = 100;
export const assessmentAttemptOneOneProgressMaxItemsMax = 100;
export const assessmentAttemptOneOneCurrentItemOneSequenceMax = 100;
export const assessmentAttemptOneOneCurrentItemOnePromptMax = 20000;
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdMax = 32;
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsMin = 2;
export const assessmentAttemptOneOneCurrentItemOneContentOneOptionsMax = 10;
export const assessmentAttemptOneOneCurrentItemOneContentTwoUnitMax = 32;
export const assessmentAttemptOneOneCurrentItemOneContentThreeMaxLengthMax = 500;
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdMax = 32;
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsItemTextMax = 2000;
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsMin = 2;
export const assessmentAttemptOneOneCurrentItemOneContentFourElementsMax = 20;
export const assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxMax = 32;
export const assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
export const assessmentAttemptOneOneCurrentItemOneContentFiveLinesMax = 500;
export const assessmentAttemptOneOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
export const assessmentAttemptOneOneCurrentItemOneContentSixSyntaxMax = 32;
export const assessmentAttemptOneOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptOneOneCurrentItemOneContentSixInitialConfigMax = 20000;
export const assessmentAttemptOneOneCurrentItemOneContentSixMaxLengthMax = 20000;
export const assessmentAttemptOneOneCurrentItemOneContentSevenLanguagesMax = 2;
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
export const assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesMax = 10;
export const assessmentAttemptOneOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
export const assessmentAttemptOneOneCurrentItemOneContentEightNodesItemNameMax = 15;
export const assessmentAttemptOneOneCurrentItemOneContentEightNodesItemNameRegExp = new RegExp('^[a-z][a-z0-9-]{0,14}$');
export const assessmentAttemptOneOneCurrentItemOneContentEightNodesMax = 8;
export const assessmentAttemptOneOneCurrentItemOneContentEightTimeLimitSecondsMin = 300;
export const assessmentAttemptOneOneCurrentItemOneContentEightTimeLimitSecondsMax = 14400;
export const assessmentAttemptOneOnePracticesItemVerdictOneScoreMin = 0;
export const assessmentAttemptOneOnePracticesItemVerdictOneScoreMax = 3;
export const assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMin = 3;
export const assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMax = 3;
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsMin = 3;
export const assessmentAttemptOneOnePracticesItemVerdictOneGroupsMax = 3;
export const assessmentAttemptOneOnePracticesMax = 5;
export const assessmentAttemptOneOneWatermarkCodeMin = 10;
export const assessmentAttemptOneOneWatermarkCodeMax = 11;
export const assessmentAttemptOneOneWatermarkCodeRegExp = new RegExp('^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$');
export const assessmentAttemptTwoOneVersionsBankVersionMax = 64;
export const assessmentAttemptTwoOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptTwoOneVersionsAlgorithmVersionMax = 64;
export const assessmentAttemptTwoOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptTwoOneSessionsOneUsedMax = 10;
export const assessmentAttemptTwoOneSessionsOneMaxMax = 10;
export const assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMin = 60;
export const assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMax = 86400;
export const assessmentAttemptTwoOneProgressAnsweredItemsMin = 0;
export const assessmentAttemptTwoOneProgressAnsweredItemsMax = 100;
export const assessmentAttemptTwoOneProgressMaxItemsMax = 100;
export const assessmentAttemptTwoOneCurrentItemOneSequenceMax = 100;
export const assessmentAttemptTwoOneCurrentItemOnePromptMax = 20000;
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdMax = 32;
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMin = 2;
export const assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMax = 10;
export const assessmentAttemptTwoOneCurrentItemOneContentTwoUnitMax = 32;
export const assessmentAttemptTwoOneCurrentItemOneContentThreeMaxLengthMax = 500;
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdMax = 32;
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemTextMax = 2000;
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsMin = 2;
export const assessmentAttemptTwoOneCurrentItemOneContentFourElementsMax = 20;
export const assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxMax = 32;
export const assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
export const assessmentAttemptTwoOneCurrentItemOneContentFiveLinesMax = 500;
export const assessmentAttemptTwoOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
export const assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxMax = 32;
export const assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptTwoOneCurrentItemOneContentSixInitialConfigMax = 20000;
export const assessmentAttemptTwoOneCurrentItemOneContentSixMaxLengthMax = 20000;
export const assessmentAttemptTwoOneCurrentItemOneContentSevenLanguagesMax = 2;
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
export const assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesMax = 10;
export const assessmentAttemptTwoOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
export const assessmentAttemptTwoOneCurrentItemOneContentEightNodesItemNameMax = 15;
export const assessmentAttemptTwoOneCurrentItemOneContentEightNodesItemNameRegExp = new RegExp('^[a-z][a-z0-9-]{0,14}$');
export const assessmentAttemptTwoOneCurrentItemOneContentEightNodesMax = 8;
export const assessmentAttemptTwoOneCurrentItemOneContentEightTimeLimitSecondsMin = 300;
export const assessmentAttemptTwoOneCurrentItemOneContentEightTimeLimitSecondsMax = 14400;
export const assessmentAttemptTwoOnePracticesItemVerdictOneScoreMin = 0;
export const assessmentAttemptTwoOnePracticesItemVerdictOneScoreMax = 3;
export const assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMin = 3;
export const assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMax = 3;
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMin = 3;
export const assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMax = 3;
export const assessmentAttemptTwoOnePracticesMax = 5;
export const assessmentAttemptTwoOneWatermarkCodeMin = 10;
export const assessmentAttemptTwoOneWatermarkCodeMax = 11;
export const assessmentAttemptTwoOneWatermarkCodeRegExp = new RegExp('^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$');
export const assessmentAttemptThreeOneVersionsBankVersionMax = 64;
export const assessmentAttemptThreeOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptThreeOneVersionsAlgorithmVersionMax = 64;
export const assessmentAttemptThreeOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentAttemptThreeOneSessionsOneUsedMax = 10;
export const assessmentAttemptThreeOneSessionsOneMaxMax = 10;
export const assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMin = 60;
export const assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMax = 86400;
export const assessmentAttemptThreeOneProgressAnsweredItemsMin = 0;
export const assessmentAttemptThreeOneProgressAnsweredItemsMax = 100;
export const assessmentAttemptThreeOneProgressMaxItemsMax = 100;
export const assessmentAttemptThreeOneCurrentItemOneSequenceMax = 100;
export const assessmentAttemptThreeOneCurrentItemOnePromptMax = 20000;
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdMax = 32;
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemTextMax = 2000;
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMin = 2;
export const assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMax = 10;
export const assessmentAttemptThreeOneCurrentItemOneContentTwoUnitMax = 32;
export const assessmentAttemptThreeOneCurrentItemOneContentThreeMaxLengthMax = 500;
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdMax = 32;
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemTextMax = 2000;
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsMin = 2;
export const assessmentAttemptThreeOneCurrentItemOneContentFourElementsMax = 20;
export const assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxMax = 32;
export const assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemNumberMax = 500;
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemTextMax = 1000;
export const assessmentAttemptThreeOneCurrentItemOneContentFiveLinesMax = 500;
export const assessmentAttemptThreeOneCurrentItemOneContentFiveMaxSelectionsMax = 10;
export const assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxMax = 32;
export const assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxRegExp = new RegExp('^[a-z0-9_+-]+$');
export const assessmentAttemptThreeOneCurrentItemOneContentSixInitialConfigMax = 20000;
export const assessmentAttemptThreeOneCurrentItemOneContentSixMaxLengthMax = 20000;
export const assessmentAttemptThreeOneCurrentItemOneContentSevenLanguagesMax = 2;
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemInputMax = 10000;
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax = 10000;
export const assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesMax = 10;
export const assessmentAttemptThreeOneCurrentItemOneContentSevenMaxSourceLengthMax = 65536;
export const assessmentAttemptThreeOneCurrentItemOneContentEightNodesItemNameMax = 15;
export const assessmentAttemptThreeOneCurrentItemOneContentEightNodesItemNameRegExp = new RegExp('^[a-z][a-z0-9-]{0,14}$');
export const assessmentAttemptThreeOneCurrentItemOneContentEightNodesMax = 8;
export const assessmentAttemptThreeOneCurrentItemOneContentEightTimeLimitSecondsMin = 300;
export const assessmentAttemptThreeOneCurrentItemOneContentEightTimeLimitSecondsMax = 14400;
export const assessmentAttemptThreeOnePracticesItemVerdictOneScoreMin = 0;
export const assessmentAttemptThreeOnePracticesItemVerdictOneScoreMax = 3;
export const assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMin = 3;
export const assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMax = 3;
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsItemGroupMax = 3;
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMin = 3;
export const assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMax = 3;
export const assessmentAttemptThreeOnePracticesMax = 5;
export const assessmentAttemptThreeOneWatermarkCodeMin = 10;
export const assessmentAttemptThreeOneWatermarkCodeMax = 11;
export const assessmentAttemptThreeOneWatermarkCodeRegExp = new RegExp('^[0-9A-HJKMNP-TV-Z]{5}-?[0-9A-HJKMNP-TV-Z]{5}$');
export const AssessmentAttempt = zod.union([zod.object({
"id": zod.uuid().describe('Attempt identifier.'),
"version": zod.int().min(1).describe('Version of an assessment attempt. A new attempt has version 1, and each committed change advances it by exactly one: an accepted answer, a practice submission or resubmission, a verdict, a decision of finalize, an explicit work-session start, and a server-side transition such as expiry or automatic finalization. Reads never change the attempt. A rejected command and a repeat that stores nothing leave it unchanged. Commands send the version they read as `expected_version`.'),
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Present only for a corrective real assessment. It is the immutable deadline derived from the root attempt and is not extended by a lower target grade.'),
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('Method of an assessment attempt. For a real assessment, the server selects demo_basic or adaptive from the published bank. A candidate may explicitly request demo_express, which uses a separate training policy and creates no qualification evidence.\n\n- demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the versioned basic grading policy. It computes no ability estimate, standard error, or probability, so every uncertainty field of its result is null, its thresholds are uncalibrated, and its decision is binary: it never offers an additional practice.\n- adaptive: the adaptive test on task families with an ability estimate, its standard error, and the probability of reaching the grade threshold, as the versioned assessment policy defines them. A probability in the band below confirmation offers one additional practice in the same attempt.\n- demo_express: an interactive 3 to 5 minute training run under a separate policy. It does not assign a category or percentile, count toward the real-assessment quota, or create qualification evidence.\n\nAdding a value is a contract change.'),
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- insufficient_bank: the published bank could not supply the items required for coverage within the limit, and the attempt ended without a confirmed grade instead of repeating families. The result is available.\n\nWhen `expires_at` passes or the session limit is reached, a read returns the stored state without changing it. A command or background transition commits any due outcome and advances the version. A practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize` becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate\'s fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.'),
"versions": zod.object({
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
"bank_version": zod.string().min(1).max(assessmentAttemptOneOneVersionsBankVersionMax).regex(assessmentAttemptOneOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
"algorithm_version": zod.string().min(1).max(assessmentAttemptOneOneVersionsAlgorithmVersionMax).regex(assessmentAttemptOneOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
"sessions": zod.union([zod.object({
"used": zod.int().min(1).max(assessmentAttemptOneOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
"max": zod.int().min(1).max(assessmentAttemptOneOneSessionsOneMaxMax),
"idle_timeout_seconds": zod.int().min(assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptOneOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The session command checks the attempt deadline and `max_sessions`; when either limit has passed, it records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do not change them.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
"progress": zod.object({
"answered_items": zod.int().min(assessmentAttemptOneOneProgressAnsweredItemsMin).max(assessmentAttemptOneOneProgressAnsweredItemsMax),
"max_items": zod.int().min(1).max(assessmentAttemptOneOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
"current_item": zod.union([zod.object({
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"sequence": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
"prompt": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
"content": zod.union([zod.object({
"format": zod.enum(['choice']),
"options": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptOneOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptOneOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
"format": zod.enum(['number']),
"unit": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
}).describe('Enter a number, optionally in the given unit.'),zod.object({
"format": zod.enum(['string']),
"max_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
"format": zod.enum(['order']),
"elements": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptOneOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptOneOneCurrentItemOneContentFourElementsMax)
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
"format": zod.enum(['find_error']),
"syntax": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptOneOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
"lines": zod.array(zod.object({
"number": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemNumberMax),
"text": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesItemTextMax)
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
"max_selections": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
"format": zod.enum(['configuration']),
"syntax": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptOneOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
"initial_config": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
"max_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
"format": zod.enum(['practice']),
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptOneOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
"public_examples": zod.array(zod.object({
"input": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
"expected_output": zod.string().max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptOneOneCurrentItemOneContentSevenPublicExamplesMax),
"max_source_length": zod.int().min(1).max(assessmentAttemptOneOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.'),zod.object({
"format": zod.enum(['lab']),
"nodes": zod.array(zod.object({
"name": zod.string().min(1).max(assessmentAttemptOneOneCurrentItemOneContentEightNodesItemNameMax).regex(assessmentAttemptOneOneCurrentItemOneContentEightNodesItemNameRegExp).describe('Name of a lab node as the task statement uses it, such as `r1` or `srv`. It is a label of the task, not a host name or an address.'),
"kind": zod.enum(['mikrotik', 'ubuntu']).describe('What the console of a node shows.\n\n- mikrotik: a MikroTik router with the RouterOS console.\n- ubuntu: a small Ubuntu server with a Linux login.\n\nAdding a value is a contract change.')
}).describe('A node of a lab by its task name and kind. It never carries an address, a MAC address, a port, a password, a key, or an infrastructure name.')).min(1).max(assessmentAttemptOneOneCurrentItemOneContentEightNodesMax).describe('Nodes of the lab in the order of the statement.'),
"time_limit_seconds": zod.int().min(assessmentAttemptOneOneCurrentItemOneContentEightTimeLimitSecondsMin).max(assessmentAttemptOneOneCurrentItemOneContentEightTimeLimitSecondsMax).describe('Lifetime of a lab of this item from its creation. The lab also ends no later than the attempt deadline.')
}).describe('Practical lab: configure or repair a small network of virtual nodes through their consoles. The candidate starts the lab of the item with CreateMyAssessmentLab, works in the node consoles, and submits with SubmitMyAssessmentLab; the server then checks the state of the nodes. The content lists only the nodes the statement names and the lifetime of the lab, never the checker, its criteria, the seed, or an address. SubmitMyAssessmentAnswer takes no answer to a lab item; its result is submitted only with SubmitMyAssessmentLab.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
"practices": zod.array(zod.object({
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
"item_id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
"verdict": zod.union([zod.object({
"score": zod.int().min(assessmentAttemptOneOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptOneOnePracticesItemVerdictOneScoreMax),
"max_score": zod.int().min(assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptOneOnePracticesItemVerdictOneMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentAttemptOneOnePracticesItemVerdictOneGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptOneOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptOneOnePracticesItemVerdictOneGroupsMax)
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptOneOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.'),
"watermark": zod.object({
"code": zod.string().min(assessmentAttemptOneOneWatermarkCodeMin).max(assessmentAttemptOneOneWatermarkCodeMax).regex(assessmentAttemptOneOneWatermarkCodeRegExp).describe('Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.')
}).exactOptional().describe('Visible mark of a real attempt. The client shows `code` with the current time as a faint tile over the task screen, so that a screenshot or a photo of the screen can be traced back to the attempt by an operator. The code is a keyed pseudonym derived on the server: it carries no name, contact, or identifier of the account, and it cannot be computed without the server secret. The task text of such an attempt also carries an invisible mark and interchangeable wordings chosen by the same secret; they change neither the meaning of a task nor its reference answer, and the client keeps the invisible characters out of the accessibility tree. Training runs (`demo_express`) carry no watermark. It is evidence for a manual review and an appeal, never an automatic decision.')
}).describe('Common state of an assessment attempt. Real assessments have a specialization and target grade; demo_express has neither. The attempt shows its fixed versions, server deadlines, session limit, progress, current item, and practices. It never contains answer keys, answer correctness, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.').and(zod.object({
"kind": zod.enum(['root']),
"mode": zod.enum(['demo_basic', 'adaptive']),
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"target_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"root_attempt_id": zod.null().describe('Root attempts have no parent attempt.'),
"chain_deadline": zod.null().describe('A root attempt has no correction-chain deadline.')
})).and(zod.object({
"kind": zod.enum(['root'])
})),zod.object({
"id": zod.uuid().describe('Attempt identifier.'),
"version": zod.int().min(1).describe('Version of an assessment attempt. A new attempt has version 1, and each committed change advances it by exactly one: an accepted answer, a practice submission or resubmission, a verdict, a decision of finalize, an explicit work-session start, and a server-side transition such as expiry or automatic finalization. Reads never change the attempt. A rejected command and a repeat that stores nothing leave it unchanged. Commands send the version they read as `expected_version`.'),
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Present only for a corrective real assessment. It is the immutable deadline derived from the root attempt and is not extended by a lower target grade.'),
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('Method of an assessment attempt. For a real assessment, the server selects demo_basic or adaptive from the published bank. A candidate may explicitly request demo_express, which uses a separate training policy and creates no qualification evidence.\n\n- demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the versioned basic grading policy. It computes no ability estimate, standard error, or probability, so every uncertainty field of its result is null, its thresholds are uncalibrated, and its decision is binary: it never offers an additional practice.\n- adaptive: the adaptive test on task families with an ability estimate, its standard error, and the probability of reaching the grade threshold, as the versioned assessment policy defines them. A probability in the band below confirmation offers one additional practice in the same attempt.\n- demo_express: an interactive 3 to 5 minute training run under a separate policy. It does not assign a category or percentile, count toward the real-assessment quota, or create qualification evidence.\n\nAdding a value is a contract change.'),
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- insufficient_bank: the published bank could not supply the items required for coverage within the limit, and the attempt ended without a confirmed grade instead of repeating families. The result is available.\n\nWhen `expires_at` passes or the session limit is reached, a read returns the stored state without changing it. A command or background transition commits any due outcome and advances the version. A practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize` becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate\'s fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.'),
"versions": zod.object({
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
"bank_version": zod.string().min(1).max(assessmentAttemptTwoOneVersionsBankVersionMax).regex(assessmentAttemptTwoOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
"algorithm_version": zod.string().min(1).max(assessmentAttemptTwoOneVersionsAlgorithmVersionMax).regex(assessmentAttemptTwoOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
"sessions": zod.union([zod.object({
"used": zod.int().min(1).max(assessmentAttemptTwoOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
"max": zod.int().min(1).max(assessmentAttemptTwoOneSessionsOneMaxMax),
"idle_timeout_seconds": zod.int().min(assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptTwoOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The session command checks the attempt deadline and `max_sessions`; when either limit has passed, it records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do not change them.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
"progress": zod.object({
"answered_items": zod.int().min(assessmentAttemptTwoOneProgressAnsweredItemsMin).max(assessmentAttemptTwoOneProgressAnsweredItemsMax),
"max_items": zod.int().min(1).max(assessmentAttemptTwoOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
"current_item": zod.union([zod.object({
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"sequence": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
"prompt": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
"content": zod.union([zod.object({
"format": zod.enum(['choice']),
"options": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptTwoOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
"format": zod.enum(['number']),
"unit": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
}).describe('Enter a number, optionally in the given unit.'),zod.object({
"format": zod.enum(['string']),
"max_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
"format": zod.enum(['order']),
"elements": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptTwoOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptTwoOneCurrentItemOneContentFourElementsMax)
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
"format": zod.enum(['find_error']),
"syntax": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptTwoOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
"lines": zod.array(zod.object({
"number": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemNumberMax),
"text": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesItemTextMax)
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
"max_selections": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
"format": zod.enum(['configuration']),
"syntax": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptTwoOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
"initial_config": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
"max_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
"format": zod.enum(['practice']),
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptTwoOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
"public_examples": zod.array(zod.object({
"input": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
"expected_output": zod.string().max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptTwoOneCurrentItemOneContentSevenPublicExamplesMax),
"max_source_length": zod.int().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.'),zod.object({
"format": zod.enum(['lab']),
"nodes": zod.array(zod.object({
"name": zod.string().min(1).max(assessmentAttemptTwoOneCurrentItemOneContentEightNodesItemNameMax).regex(assessmentAttemptTwoOneCurrentItemOneContentEightNodesItemNameRegExp).describe('Name of a lab node as the task statement uses it, such as `r1` or `srv`. It is a label of the task, not a host name or an address.'),
"kind": zod.enum(['mikrotik', 'ubuntu']).describe('What the console of a node shows.\n\n- mikrotik: a MikroTik router with the RouterOS console.\n- ubuntu: a small Ubuntu server with a Linux login.\n\nAdding a value is a contract change.')
}).describe('A node of a lab by its task name and kind. It never carries an address, a MAC address, a port, a password, a key, or an infrastructure name.')).min(1).max(assessmentAttemptTwoOneCurrentItemOneContentEightNodesMax).describe('Nodes of the lab in the order of the statement.'),
"time_limit_seconds": zod.int().min(assessmentAttemptTwoOneCurrentItemOneContentEightTimeLimitSecondsMin).max(assessmentAttemptTwoOneCurrentItemOneContentEightTimeLimitSecondsMax).describe('Lifetime of a lab of this item from its creation. The lab also ends no later than the attempt deadline.')
}).describe('Practical lab: configure or repair a small network of virtual nodes through their consoles. The candidate starts the lab of the item with CreateMyAssessmentLab, works in the node consoles, and submits with SubmitMyAssessmentLab; the server then checks the state of the nodes. The content lists only the nodes the statement names and the lifetime of the lab, never the checker, its criteria, the seed, or an address. SubmitMyAssessmentAnswer takes no answer to a lab item; its result is submitted only with SubmitMyAssessmentLab.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
"practices": zod.array(zod.object({
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
"item_id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
"verdict": zod.union([zod.object({
"score": zod.int().min(assessmentAttemptTwoOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneScoreMax),
"max_score": zod.int().min(assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptTwoOnePracticesItemVerdictOneGroupsMax)
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptTwoOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.'),
"watermark": zod.object({
"code": zod.string().min(assessmentAttemptTwoOneWatermarkCodeMin).max(assessmentAttemptTwoOneWatermarkCodeMax).regex(assessmentAttemptTwoOneWatermarkCodeRegExp).describe('Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.')
}).exactOptional().describe('Visible mark of a real attempt. The client shows `code` with the current time as a faint tile over the task screen, so that a screenshot or a photo of the screen can be traced back to the attempt by an operator. The code is a keyed pseudonym derived on the server: it carries no name, contact, or identifier of the account, and it cannot be computed without the server secret. The task text of such an attempt also carries an invisible mark and interchangeable wordings chosen by the same secret; they change neither the meaning of a task nor its reference answer, and the client keeps the invisible characters out of the accessibility tree. Training runs (`demo_express`) carry no watermark. It is evidence for a manual review and an appeal, never an automatic decision.')
}).describe('Common state of an assessment attempt. Real assessments have a specialization and target grade; demo_express has neither. The attempt shows its fixed versions, server deadlines, session limit, progress, current item, and practices. It never contains answer keys, answer correctness, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.').and(zod.object({
"kind": zod.enum(['corrective']),
"mode": zod.enum(['demo_basic', 'adaptive']),
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"target_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"root_attempt_id": zod.uuid(),
"chain_deadline": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.')
})).and(zod.object({
"kind": zod.enum(['corrective'])
})),zod.object({
"id": zod.uuid().describe('Attempt identifier.'),
"version": zod.int().min(1).describe('Version of an assessment attempt. A new attempt has version 1, and each committed change advances it by exactly one: an accepted answer, a practice submission or resubmission, a verdict, a decision of finalize, an explicit work-session start, and a server-side transition such as expiry or automatic finalization. Reads never change the attempt. A rejected command and a repeat that stores nothing leave it unchanged. Commands send the version they read as `expected_version`.'),
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"target_grade": zod.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Null only for demo_express, which has no qualification category.'),
"task_language": zod.union([zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.'),zod.null()]).describe('Task language of the attempt, or null when none is selected.'),
"kind": zod.enum(['root', 'corrective', 'demo_express']).describe('Assessment track that distinguishes root, corrective, and training attempts.'),
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).describe('Present only for a corrective real assessment. It identifies the root attempt whose quota and chain deadline this attempt shares.'),
"chain_deadline": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Present only for a corrective real assessment. It is the immutable deadline derived from the root attempt and is not extended by a lower target grade.'),
"mode": zod.enum(['demo_basic', 'demo_express', 'adaptive']).describe('Method of an assessment attempt. For a real assessment, the server selects demo_basic or adaptive from the published bank. A candidate may explicitly request demo_express, which uses a separate training policy and creates no qualification evidence.\n\n- demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the versioned basic grading policy. It computes no ability estimate, standard error, or probability, so every uncertainty field of its result is null, its thresholds are uncalibrated, and its decision is binary: it never offers an additional practice.\n- adaptive: the adaptive test on task families with an ability estimate, its standard error, and the probability of reaching the grade threshold, as the versioned assessment policy defines them. A probability in the band below confirmation offers one additional practice in the same attempt.\n- demo_express: an interactive 3 to 5 minute training run under a separate policy. It does not assign a category or percentile, count toward the real-assessment quota, or create qualification evidence.\n\nAdding a value is a contract change.'),
"state": zod.enum(['in_progress', 'practice_pending', 'additional_practice_pending', 'ready_to_finalize', 'completed', 'expired', 'insufficient_bank']).describe('Lifecycle state of an attempt and the commands it accepts.\n\n- in_progress: items are being answered; `current_item` is the item to answer. Accepts SubmitMyAssessmentAnswer for that item.\n- practice_pending: the item part is finished, and the main practice has no finished verdict yet: it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished, even when the adaptive stop rule has already ended the item part.\n- additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade in the band below confirmation, so the attempt offers one additional practice without spending a new attempt; it keeps the time and session limits of the attempt. Accepts SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and decides `not_confirmed` with the current evidence.\n- ready_to_finalize: every required part is done, including a submitted additional practice with a finished verdict. Accepts FinalizeMyAssessmentAttempt.\n- completed: a decision was made; the result is available.\n- expired: the time or session limit passed before the candidate finished the required parts. The result is available and confirms no grade.\n- insufficient_bank: the published bank could not supply the items required for coverage within the limit, and the attempt ended without a confirmed grade instead of repeating families. The result is available.\n\nWhen `expires_at` passes or the session limit is reached, a read returns the stored state without changing it. A command or background transition commits any due outcome and advances the version. A practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize` becomes `completed`; `additional_practice_pending` with the additional practice not submitted is finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the reason `sandbox_unavailable`, which is not the candidate\'s fault. `completed`, `expired`, and `insufficient_bank` are terminal and accept no command except the repeat of finalize described on FinalizeMyAssessmentAttempt. Adding a value is a contract change.'),
"versions": zod.object({
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
"bank_version": zod.string().min(1).max(assessmentAttemptThreeOneVersionsBankVersionMax).regex(assessmentAttemptThreeOneVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
"algorithm_version": zod.string().min(1).max(assessmentAttemptThreeOneVersionsAlgorithmVersionMax).regex(assessmentAttemptThreeOneVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
"started_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
"expires_at": zod.iso.datetime({"offset":true}).describe('Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective assessment it does not exceed chain_deadline.'),
"sessions": zod.union([zod.object({
"used": zod.int().min(1).max(assessmentAttemptThreeOneSessionsOneUsedMax).describe('Sessions started so far, including the current one.'),
"max": zod.int().min(1).max(assessmentAttemptThreeOneSessionsOneMaxMax),
"idle_timeout_seconds": zod.int().min(assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMin).max(assessmentAttemptThreeOneSessionsOneIdleTimeoutSecondsMax).describe('Inactivity after which the current session ends.')
}).describe('Work sessions of the attempt, as the policy version limits them, for example two sessions within the time limit.\n\nSession 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The session command checks the attempt deadline and `max_sessions`; when either limit has passed, it records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do not change them.'),zod.null()]).describe('Session limit of the attempt, or null when its policy defines none.'),
"finished_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time the attempt reached a terminal state, or null while it is active.'),
"progress": zod.object({
"answered_items": zod.int().min(assessmentAttemptThreeOneProgressAnsweredItemsMin).max(assessmentAttemptThreeOneProgressAnsweredItemsMax),
"max_items": zod.int().min(1).max(assessmentAttemptThreeOneProgressMaxItemsMax).describe('Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items together in adaptive.')
}).describe('Progress of the item part. It counts seed items like scored ones, so it does not reveal which items are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A finalize refused as premature does not list the unfinished parts; the client reads them here, in `current_item`, and in `practices`.'),
"current_item": zod.union([zod.object({
"id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"sequence": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneSequenceMax).describe('Position of the item in the attempt, from 1.'),
"prompt": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOnePromptMax).describe('Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.'),
"content": zod.union([zod.object({
"format": zod.enum(['choice']),
"options": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdMax).regex(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMin).max(assessmentAttemptThreeOneCurrentItemOneContentOneOptionsMax).describe('Options in the order of this instance.'),
"multiple": zod.boolean().describe('Whether more than one option may be selected. It is a property of the task family, fixed for every variant, and never derived from the key: a multiple-choice variant may have a single correct option.')
}).describe('Choose one option, or several when `multiple` is true. The content never says which options are correct or how many are.'),zod.object({
"format": zod.enum(['number']),
"unit": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentTwoUnitMax).nullable().describe('Unit of the expected value, for example `ms`, or null.')
}).describe('Enter a number, optionally in the given unit.'),zod.object({
"format": zod.enum(['string']),
"max_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentThreeMaxLengthMax).describe('Maximum length of the answer in characters. It is an input limit of the task family, never derived from the key, so it does not reveal the length of the correct answer.')
}).describe('Enter a short string, such as a command, a header name, or an address.'),zod.object({
"format": zod.enum(['order']),
"elements": zod.array(zod.object({
"id": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdMax).regex(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemIdRegExp).describe('Opaque identifier of a choice option or an order element within one item instance. It is unrelated to the position or correctness of the option.'),
"text": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsItemTextMax).describe('Text of the option; the client shows it as text, never as HTML.')
}).describe('Choice option or order element. Plain text.')).min(assessmentAttemptThreeOneCurrentItemOneContentFourElementsMin).max(assessmentAttemptThreeOneCurrentItemOneContentFourElementsMax)
}).describe('Put every element into the right order. The elements arrive in the order of this instance, which is never the answer.'),zod.object({
"format": zod.enum(['find_error']),
"syntax": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxMax).regex(assessmentAttemptThreeOneCurrentItemOneContentFiveSyntaxRegExp).nullable().describe('Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.'),
"lines": zod.array(zod.object({
"number": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemNumberMax),
"text": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesItemTextMax)
}).describe('One numbered line of a code or configuration fragment. Plain text.')).min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveLinesMax).describe('Lines numbered from 1 in order.'),
"max_selections": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentFiveMaxSelectionsMax).describe('Maximum number of lines the answer may select. It is a limit of the task family, fixed for every variant and never derived from the key; it is not the number of wrong lines.')
}).describe('Find the lines with the error in a code or configuration fragment and select up to `max_selections` line numbers.'),zod.object({
"format": zod.enum(['configuration']),
"syntax": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxMax).regex(assessmentAttemptThreeOneCurrentItemOneContentSixSyntaxRegExp).describe('Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.'),
"initial_config": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSixInitialConfigMax).describe('Starting text to edit; empty when the candidate writes it from scratch.'),
"max_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSixMaxLengthMax).describe('Maximum length of the submitted configuration in characters, an input limit of the task family that is never derived from the key.')
}).describe('Write or fix a configuration. The server checks the submitted text with the computed key or reference check of the task family; it never executes it as code.'),zod.object({
"format": zod.enum(['practice']),
"languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(assessmentAttemptThreeOneCurrentItemOneContentSevenLanguagesMax).describe('Languages the solution may use. Empty when the task does not offer a choice; the submission then sends a null language.'),
"public_examples": zod.array(zod.object({
"input": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemInputMax),
"expected_output": zod.string().max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesItemExpectedOutputMax)
}).describe('Public example of the practice task: an input and its expected output. Hidden checks are never listed.')).max(assessmentAttemptThreeOneCurrentItemOneContentSevenPublicExamplesMax),
"max_source_length": zod.int().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentSevenMaxSourceLengthMax).describe('Maximum length of the solution source in characters.')
}).describe('Code practice. The candidate submits one final solution, which runs in the isolated sandbox against three groups of hidden checks. The content lists only the statement, the allowed languages, and public examples; hidden checks, their inputs, and seeds never reach the client.'),zod.object({
"format": zod.enum(['lab']),
"nodes": zod.array(zod.object({
"name": zod.string().min(1).max(assessmentAttemptThreeOneCurrentItemOneContentEightNodesItemNameMax).regex(assessmentAttemptThreeOneCurrentItemOneContentEightNodesItemNameRegExp).describe('Name of a lab node as the task statement uses it, such as `r1` or `srv`. It is a label of the task, not a host name or an address.'),
"kind": zod.enum(['mikrotik', 'ubuntu']).describe('What the console of a node shows.\n\n- mikrotik: a MikroTik router with the RouterOS console.\n- ubuntu: a small Ubuntu server with a Linux login.\n\nAdding a value is a contract change.')
}).describe('A node of a lab by its task name and kind. It never carries an address, a MAC address, a port, a password, a key, or an infrastructure name.')).min(1).max(assessmentAttemptThreeOneCurrentItemOneContentEightNodesMax).describe('Nodes of the lab in the order of the statement.'),
"time_limit_seconds": zod.int().min(assessmentAttemptThreeOneCurrentItemOneContentEightTimeLimitSecondsMin).max(assessmentAttemptThreeOneCurrentItemOneContentEightTimeLimitSecondsMax).describe('Lifetime of a lab of this item from its creation. The lab also ends no later than the attempt deadline.')
}).describe('Practical lab: configure or repair a small network of virtual nodes through their consoles. The candidate starts the lab of the item with CreateMyAssessmentLab, works in the node consoles, and submits with SubmitMyAssessmentLab; the server then checks the state of the nodes. The content lists only the nodes the statement names and the lifetime of the lab, never the checker, its criteria, the seed, or an address. SubmitMyAssessmentAnswer takes no answer to a lab item; its result is submitted only with SubmitMyAssessmentLab.')]).describe('Format-specific part of an item, selected by `format`. It holds only what the candidate needs to answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or the task family and never reveal the key.')
}).describe('Item instance served to the candidate. The variant is fixed when it is first served: a reload, a retried request, or a resumed session returns the same instance with the same text and option order. The item never says whether an earlier answer was correct, and seed items, which are not scored, are indistinguishable from scored ones.'),zod.null()]).describe('Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending` or `additional_practice_pending` while that practice is `not_started` or `failed`, and null otherwise.'),
"practices": zod.array(zod.object({
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
"item_id": zod.uuid().describe('Identifier of an item instance in one attempt. It identifies the fixed variant served to this candidate and reveals neither the task family, its version, nor the variant seed.'),
"status": zod.enum(['not_started', 'pending', 'finished', 'failed']).describe('State of a practice.\n\n- not_started: no solution was submitted yet.\n- pending: the submitted solution is queued or running in the sandbox.\n- finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a memory limit, is `finished` with the affected groups not passed.\n- failed: the sandbox infrastructure could not run the solution, for example because its queue was full or an executor broke, independently of the solution. The failure is not the candidate\'s and consumes nothing; the practice can be submitted again.'),
"submitted_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the latest submission, or null before the first one.'),
"verdict": zod.union([zod.object({
"score": zod.int().min(assessmentAttemptThreeOnePracticesItemVerdictOneScoreMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneScoreMax),
"max_score": zod.int().min(assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMin).max(assessmentAttemptThreeOnePracticesItemVerdictOneGroupsMax)
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.'),zod.null()]).describe('The verdict when `status` is `finished`, otherwise null.'),
"failure_reason": zod.union([zod.enum(['sandbox_busy', 'sandbox_error']).describe('Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full, `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict instead, so a failure never acts as an oracle for hidden checks.'),zod.null()]).describe('The reason when `status` is `failed`, otherwise null.')
}).describe('Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept as a separate label and never enters the ability estimate or the grade decision.')).max(assessmentAttemptThreeOnePracticesMax).describe('Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.'),
"watermark": zod.object({
"code": zod.string().min(assessmentAttemptThreeOneWatermarkCodeMin).max(assessmentAttemptThreeOneWatermarkCodeMax).regex(assessmentAttemptThreeOneWatermarkCodeRegExp).describe('Two groups of five symbols of Crockford base32, such as `7K3QD-9XM2T`.')
}).exactOptional().describe('Visible mark of a real attempt. The client shows `code` with the current time as a faint tile over the task screen, so that a screenshot or a photo of the screen can be traced back to the attempt by an operator. The code is a keyed pseudonym derived on the server: it carries no name, contact, or identifier of the account, and it cannot be computed without the server secret. The task text of such an attempt also carries an invisible mark and interchangeable wordings chosen by the same secret; they change neither the meaning of a task nor its reference answer, and the client keeps the invisible characters out of the accessibility tree. Training runs (`demo_express`) carry no watermark. It is evidence for a manual review and an appeal, never an automatic decision.')
}).describe('Common state of an assessment attempt. Real assessments have a specialization and target grade; demo_express has neither. The attempt shows its fixed versions, server deadlines, session limit, progress, current item, and practices. It never contains answer keys, answer correctness, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.').and(zod.object({
"kind": zod.enum(['demo_express']),
"mode": zod.enum(['demo_express']),
"specialization": zod.null(),
"target_grade": zod.null(),
"task_language": zod.null(),
"root_attempt_id": zod.null(),
"chain_deadline": zod.null()
})).and(zod.object({
"kind": zod.enum(['demo_express'])
}))]).describe('Candidate view of a real assessment, a corrective real assessment, or a demo_express training run. The variants keep training output separate from qualification attempts.')
export type AssessmentAttempt = zod.input<typeof AssessmentAttempt>;
export type AssessmentAttemptOutput = zod.output<typeof AssessmentAttempt>;