@toloka-platform/sdk 0.1.0-preview.6 → 0.1.0-preview.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -15
- package/dist/cli/toloka.js +209 -121
- package/dist/cli/toloka.js.jsc +0 -0
- package/dist/cli/toloka.js.jsc.sha256 +1 -1
- package/dist/cli/toloka.js.sha256 +1 -1
- package/docs/authoring.md +20 -9
- package/docs/cli-v2.md +3 -3
- package/docs/cli.md +44 -16
- package/docs/getting-started.md +7 -12
- package/docs/limitations.md +6 -6
- package/docs/testing-examples.md +248 -0
- package/docs/testing.md +115 -0
- package/examples/face-image-collection/README.md +7 -1
- package/examples/face-image-collection/fields.ts +20 -8
- package/examples/face-image-collection/nodes/annotate-faces/node.ts +1 -9
- package/examples/face-image-collection/nodes/order-faces/node.ts +3 -5
- package/examples/face-image-collection/pipeline.browser.integration.spec.ts +78 -0
- package/examples/video-pair-rating/README.md +14 -6
- package/examples/video-pair-rating/nodes/adjudicate/node.ts +1 -3
- package/examples/video-pair-rating/nodes/adjudicate_op/node.ts +1 -3
- package/examples/video-pair-rating/nodes/adjudication_match/node.ts +15 -17
- package/examples/video-pair-rating/nodes/assemble/node.ts +25 -27
- package/examples/video-pair-rating/nodes/cascade/node.ts +24 -26
- package/examples/video-pair-rating/nodes/finalize_overall/node.ts +17 -19
- package/examples/video-pair-rating/nodes/merge_adjudication/node.ts +13 -15
- package/examples/video-pair-rating/nodes/merge_op_adjudication/node.ts +12 -14
- package/examples/video-pair-rating/nodes/op_quorum_resolve/node.ts +13 -15
- package/examples/video-pair-rating/nodes/overall_preference_pick/node.ts +1 -1
- package/examples/video-pair-rating/nodes/rate_pair/node.ts +1 -1
- package/examples/video-pair-rating/nodes/route_adjudication/node.ts +1 -3
- package/examples/video-pair-rating/nodes/route_op_adjudication/node.ts +5 -7
- package/examples/video-pair-rating/nodes/route_overall/node.ts +1 -3
- package/examples/video-pair-rating/nodes/shuffle_ab/node.ts +11 -13
- package/examples/video-pair-rating/pipeline.browser.integration.spec.ts +267 -0
- package/openapi/gen/api.ts +48 -11
- package/openapi/gen/models/createDatasetExportBody.ts +3 -3
- package/openapi/gen/models/createDatasetExportBodyOneOf.ts +6 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfFormat.ts +2 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThree.ts +10 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeContract.ts +2 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeFormat.ts +2 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilter.ts +9 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItem.ts +6 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItem.ts +12 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemOperator.ts +2 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemValue.ts +2 -0
- package/openapi/gen/models/datasetExportReport.ts +9 -0
- package/openapi/gen/models/datasetExportReportErrorsItem.ts +5 -0
- package/openapi/gen/models/datasetExportReportTokens.ts +7 -0
- package/openapi/gen/models/datasetItem.ts +0 -2
- package/openapi/gen/models/exportJob.ts +2 -0
- package/openapi/gen/models/exportJobReport.ts +3 -0
- package/openapi/gen/models/index.ts +48 -1
- package/openapi/gen/models/sampleDatasetItemsBody.ts +4 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOf.ts +8 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilter.ts +9 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem.ts +6 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem.ts +12 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemOperator.ts +2 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemValue.ts +2 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethree.ts +8 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilter.ts +9 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem.ts +6 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem.ts +12 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemOperator.ts +2 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemValue.ts +2 -0
- package/openapi/gen/models/sampleJob.ts +13 -0
- package/openapi/gen/models/sampleJobStatus.ts +2 -0
- package/openapi/gen/models/sampleResult.ts +5 -0
- package/package.json +23 -2
- package/skills/catalog.json +14 -6
- package/skills/toloka-build/SKILL.md +35 -12
- package/skills/toloka-build/references/node-semantics.md +32 -29
- package/skills/toloka-build/references/workflow-and-cli.md +61 -27
- package/skills/toloka-report-issue/references/report-template.md +1 -1
- package/src/authoring/index.ts +27 -26
- package/src/checks/ast.ts +32 -0
- package/src/checks/index.ts +14 -0
- package/src/checks/postprocess-collisions.ts +145 -0
- package/src/checks/task-ui-declarations.generated.ts +19 -0
- package/src/checks/task-ui-typecheck.ts +345 -0
- package/src/checks/typescript-vfs.d.ts +26 -0
- package/src/checks/typescript-vfs.js +5 -0
- package/src/cli/analytics.ts +9 -19
- package/src/cli/auto-update.ts +367 -0
- package/src/cli/boolean-flag.ts +13 -0
- package/src/cli/check.ts +977 -0
- package/src/cli/credentials.ts +3 -0
- package/src/cli/program.ts +184 -20
- package/src/cli/project-context.ts +14 -4
- package/src/cli/runs.ts +21 -11
- package/src/cli/settings.ts +93 -0
- package/src/cli/skill.ts +17 -6
- package/src/importer.ts +12 -16
- package/src/testing/code-node.ts +160 -0
- package/src/testing/index.ts +15 -0
- package/src/testing/task-ui-browser.ts +120 -0
- package/src/testing/task-ui-validation.ts +135 -0
- package/src/testing/task-ui.ts +557 -0
- package/src/testing/test-evidence.ts +170 -0
- package/src/testing/types.ts +141 -0
- package/openapi/gen/models/datasetItemDuplicateOfSubmissionId.ts +0 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DatasetExportReportErrorsItem } from './datasetExportReportErrorsItem';
|
|
2
|
+
import type { DatasetExportReportTokens } from './datasetExportReportTokens';
|
|
3
|
+
|
|
4
|
+
export interface DatasetExportReport {
|
|
5
|
+
validCount: number;
|
|
6
|
+
invalidCount: number;
|
|
7
|
+
errors: DatasetExportReportErrorsItem[];
|
|
8
|
+
tokens: DatasetExportReportTokens;
|
|
9
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { DatasetItemId } from './datasetItemId';
|
|
2
2
|
import type { DatasetItemCurrentSubmissionId } from './datasetItemCurrentSubmissionId';
|
|
3
|
-
import type { DatasetItemDuplicateOfSubmissionId } from './datasetItemDuplicateOfSubmissionId';
|
|
4
3
|
|
|
5
4
|
export interface DatasetItem {
|
|
6
5
|
id: DatasetItemId;
|
|
7
6
|
index: number;
|
|
8
7
|
createdAt: string;
|
|
9
8
|
currentSubmissionId: DatasetItemCurrentSubmissionId;
|
|
10
|
-
duplicateOfSubmissionId: DatasetItemDuplicateOfSubmissionId;
|
|
11
9
|
}
|
|
@@ -2,6 +2,7 @@ import type { ExportId } from './exportId';
|
|
|
2
2
|
import type { DatasetId } from './datasetId';
|
|
3
3
|
import type { ExportJobStatus } from './exportJobStatus';
|
|
4
4
|
import type { ExportJobResult } from './exportJobResult';
|
|
5
|
+
import type { ExportJobReport } from './exportJobReport';
|
|
5
6
|
|
|
6
7
|
export interface ExportJob {
|
|
7
8
|
id: ExportId;
|
|
@@ -9,4 +10,5 @@ export interface ExportJob {
|
|
|
9
10
|
status: ExportJobStatus;
|
|
10
11
|
createdAt: string;
|
|
11
12
|
result: ExportJobResult;
|
|
13
|
+
report: ExportJobReport;
|
|
12
14
|
}
|
|
@@ -73,6 +73,22 @@ export * from './copyPipelineBody';
|
|
|
73
73
|
export * from './createDatasetBody';
|
|
74
74
|
export * from './createDatasetBodyProfile';
|
|
75
75
|
export * from './createDatasetExportBody';
|
|
76
|
+
export * from './createDatasetExportBodyOneOf';
|
|
77
|
+
export * from './createDatasetExportBodyOneOfFormat';
|
|
78
|
+
export * from './createDatasetExportBodyOneOfThree';
|
|
79
|
+
export * from './createDatasetExportBodyOneOfThreeContract';
|
|
80
|
+
export * from './createDatasetExportBodyOneOfThreeFormat';
|
|
81
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilter';
|
|
82
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItem';
|
|
83
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItem';
|
|
84
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
85
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
86
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItem';
|
|
87
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemOperator';
|
|
88
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItem';
|
|
89
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItemOneOf';
|
|
90
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
91
|
+
export * from './createDatasetExportBodyOneOfThreeItemFilterFieldValuesItemValue';
|
|
76
92
|
export * from './createDatasetField200';
|
|
77
93
|
export * from './createDatasetFieldBody';
|
|
78
94
|
export * from './createDatasetFieldBodyAnyOf';
|
|
@@ -105,6 +121,9 @@ export * from './createdDatasetFields';
|
|
|
105
121
|
export * from './currentUser';
|
|
106
122
|
export * from './currentUserEmail';
|
|
107
123
|
export * from './dataset';
|
|
124
|
+
export * from './datasetExportReport';
|
|
125
|
+
export * from './datasetExportReportErrorsItem';
|
|
126
|
+
export * from './datasetExportReportTokens';
|
|
108
127
|
export * from './datasetField';
|
|
109
128
|
export * from './datasetFieldDescription';
|
|
110
129
|
export * from './datasetFieldId';
|
|
@@ -115,7 +134,6 @@ export * from './datasetFieldJsonSchemaTypeAnyOfItem';
|
|
|
115
134
|
export * from './datasetId';
|
|
116
135
|
export * from './datasetItem';
|
|
117
136
|
export * from './datasetItemCurrentSubmissionId';
|
|
118
|
-
export * from './datasetItemDuplicateOfSubmissionId';
|
|
119
137
|
export * from './datasetItemId';
|
|
120
138
|
export * from './datasetProfile';
|
|
121
139
|
export * from './datasetProfileStamp';
|
|
@@ -134,6 +152,7 @@ export * from './estimatePipelineCostBodyItemFilterFieldValuesItemSourcesItemOne
|
|
|
134
152
|
export * from './estimatePipelineCostBodyItemFilterFieldValuesItemValue';
|
|
135
153
|
export * from './exportId';
|
|
136
154
|
export * from './exportJob';
|
|
155
|
+
export * from './exportJobReport';
|
|
137
156
|
export * from './exportJobResult';
|
|
138
157
|
export * from './exportJobResultDownloadUrl';
|
|
139
158
|
export * from './exportJobStatus';
|
|
@@ -731,6 +750,34 @@ export * from './runJobError';
|
|
|
731
750
|
export * from './runJobStatus';
|
|
732
751
|
export * from './runStats';
|
|
733
752
|
export * from './runSummary';
|
|
753
|
+
export * from './sampleDatasetItemsBody';
|
|
754
|
+
export * from './sampleDatasetItemsBodyAnyOf';
|
|
755
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilter';
|
|
756
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem';
|
|
757
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem';
|
|
758
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
759
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
760
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem';
|
|
761
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemOperator';
|
|
762
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem';
|
|
763
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOf';
|
|
764
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
765
|
+
export * from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemValue';
|
|
766
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethree';
|
|
767
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilter';
|
|
768
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem';
|
|
769
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem';
|
|
770
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
771
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
772
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem';
|
|
773
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemOperator';
|
|
774
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem';
|
|
775
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOf';
|
|
776
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
777
|
+
export * from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemValue';
|
|
778
|
+
export * from './sampleJob';
|
|
779
|
+
export * from './sampleJobStatus';
|
|
780
|
+
export * from './sampleResult';
|
|
734
781
|
export * from './setProjectSecretBody';
|
|
735
782
|
export * from './updatePipelineBody';
|
|
736
783
|
export * from './updateProjectBody';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOf } from './sampleDatasetItemsBodyAnyOf';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfOnethree } from './sampleDatasetItemsBodyAnyOfOnethree';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBody = SampleDatasetItemsBodyAnyOf | SampleDatasetItemsBodyAnyOfOnethree;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilter } from './sampleDatasetItemsBodyAnyOfItemFilter';
|
|
2
|
+
|
|
3
|
+
export type SampleDatasetItemsBodyAnyOf = {
|
|
4
|
+
markField: string;
|
|
5
|
+
markValue: string;
|
|
6
|
+
itemFilter?: SampleDatasetItemsBodyAnyOfItemFilter;
|
|
7
|
+
count: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem } from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfItemFilter = {
|
|
5
|
+
fieldValues?: SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem[];
|
|
6
|
+
fieldSources?: SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem[];
|
|
7
|
+
missingRevisionFields?: string[];
|
|
8
|
+
createdBefore?: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem } from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem';
|
|
2
|
+
|
|
3
|
+
export type SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItem = {
|
|
4
|
+
fieldId: string;
|
|
5
|
+
sources: SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem[];
|
|
6
|
+
};
|
package/openapi/gen/models/sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOf } from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOfTwo } from './sampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItem = SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOf | SampleDatasetItemsBodyAnyOfItemFilterFieldSourcesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemOperator } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemOperator';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemValue } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemValue';
|
|
3
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem';
|
|
4
|
+
|
|
5
|
+
export type SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItem = {
|
|
6
|
+
jsonPath: string;
|
|
7
|
+
operator: SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemOperator;
|
|
8
|
+
value: SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemValue;
|
|
9
|
+
fieldId: string;
|
|
10
|
+
latestOnly?: boolean;
|
|
11
|
+
sources?: SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOf } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOf';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOfTwo } from './sampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItem = SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOf | SampleDatasetItemsBodyAnyOfItemFilterFieldValuesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilter } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilter';
|
|
2
|
+
|
|
3
|
+
export type SampleDatasetItemsBodyAnyOfOnethree = {
|
|
4
|
+
markField: string;
|
|
5
|
+
markValue: string;
|
|
6
|
+
itemFilter?: SampleDatasetItemsBodyAnyOfOnethreeItemFilter;
|
|
7
|
+
fraction: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfOnethreeItemFilter = {
|
|
5
|
+
fieldValues?: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem[];
|
|
6
|
+
fieldSources?: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem[];
|
|
7
|
+
missingRevisionFields?: string[];
|
|
8
|
+
createdBefore?: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem';
|
|
2
|
+
|
|
3
|
+
export type SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItem = {
|
|
4
|
+
fieldId: string;
|
|
5
|
+
sources: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem[];
|
|
6
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOf } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOfTwo } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItem = SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOf | SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldSourcesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemOperator } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemOperator';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemValue } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemValue';
|
|
3
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem';
|
|
4
|
+
|
|
5
|
+
export type SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItem = {
|
|
6
|
+
jsonPath: string;
|
|
7
|
+
operator: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemOperator;
|
|
8
|
+
value: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemValue;
|
|
9
|
+
fieldId: string;
|
|
10
|
+
latestOnly?: boolean;
|
|
11
|
+
sources?: SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOf } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOf';
|
|
2
|
+
import type { SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOfTwo } from './sampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItem = SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOf | SampleDatasetItemsBodyAnyOfOnethreeItemFilterFieldValuesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DatasetId } from './datasetId';
|
|
2
|
+
import type { SampleJobStatus } from './sampleJobStatus';
|
|
3
|
+
|
|
4
|
+
export interface SampleJob {
|
|
5
|
+
id: string;
|
|
6
|
+
datasetId: DatasetId;
|
|
7
|
+
fieldId: string;
|
|
8
|
+
markerValue: string;
|
|
9
|
+
status: SampleJobStatus;
|
|
10
|
+
target: number;
|
|
11
|
+
marked: number;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toloka-platform/sdk",
|
|
3
|
-
"version": "0.1.0-preview.
|
|
3
|
+
"version": "0.1.0-preview.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Preview. Build, inspect, and operate Toloka pipeline projects as TypeScript source. The public API may change.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"main": "./src/index.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": "./src/index.ts",
|
|
24
|
+
"./testing": "./src/testing/index.ts",
|
|
25
|
+
"./checks": "./src/checks/index.ts",
|
|
24
26
|
"./examples/face-image-collection": "./examples/face-image-collection/pipeline.ts"
|
|
25
27
|
},
|
|
26
28
|
"publishConfig": {
|
|
@@ -33,24 +35,43 @@
|
|
|
33
35
|
"generate": "orval --config ./openapi/orval.config.js",
|
|
34
36
|
"prepack": "bun run build",
|
|
35
37
|
"sync-skill-catalog": "bun ./scripts/sync-skill-catalog.ts",
|
|
38
|
+
"sync-task-ui-declarations": "bun ./scripts/sync-task-ui-declarations.ts",
|
|
36
39
|
"test": "vitest run",
|
|
40
|
+
"test:browser": "vitest run --config vitest.browser.config.ts",
|
|
37
41
|
"typecheck": "tsc --noEmit"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
44
|
"@inquirer/select": "5.2.1",
|
|
45
|
+
"@typescript/vfs": "1.6.2",
|
|
41
46
|
"ajv": "8.17.1",
|
|
42
47
|
"ajv-formats": "3.0.1",
|
|
43
48
|
"commander": "15.0.0",
|
|
44
49
|
"es-toolkit": "1.42.0",
|
|
45
|
-
"
|
|
50
|
+
"jsonpath-rfc9535": "1.3.0",
|
|
51
|
+
"oxc-parser": "0.138.0",
|
|
52
|
+
"posthog-node": "5.46.1",
|
|
53
|
+
"typescript-api": "npm:typescript@6.0.3"
|
|
46
54
|
},
|
|
47
55
|
"devDependencies": {
|
|
48
56
|
"@types/node": "24.10.1",
|
|
49
57
|
"orval": "7.17.0",
|
|
58
|
+
"playwright": "1.56.1",
|
|
50
59
|
"typescript": "7.0.2",
|
|
51
60
|
"vitest": "4.1.0",
|
|
52
61
|
"yaml": "2.9.0"
|
|
53
62
|
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"playwright": ">=1.56.1 <2",
|
|
65
|
+
"vitest": ">=4.1.0 <5"
|
|
66
|
+
},
|
|
67
|
+
"peerDependenciesMeta": {
|
|
68
|
+
"playwright": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"vitest": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
54
75
|
"engines": {
|
|
55
76
|
"bun": "1.4.0"
|
|
56
77
|
}
|
package/skills/catalog.json
CHANGED
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
{
|
|
4
4
|
"id": "toloka-build",
|
|
5
5
|
"name": "Build Toloka pipelines as code",
|
|
6
|
-
"description": "
|
|
7
|
-
"tags": [
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"description": "Onboard users and build, test, inspect, or change Toloka platform pipeline projects as TypeScript source with @toloka-platform/sdk, toloka check, and toloka apply. Use when the user wants to get started, create, adopt, inspect, plan, apply, test, check, or run a pipeline project as code.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"pipelines",
|
|
9
|
+
"authoring",
|
|
10
|
+
"sdk",
|
|
11
|
+
"onboarding",
|
|
12
|
+
"getting-started",
|
|
13
|
+
"testing",
|
|
14
|
+
"checks"
|
|
15
|
+
],
|
|
16
|
+
"version": "0.1.0-preview.8",
|
|
17
|
+
"digest": "87dca7b1cc0cf3d61f54ab27703ea4b60622355ec07e289ce1242bb3c2233482",
|
|
10
18
|
"files": ["SKILL.md", "references/node-semantics.md", "references/workflow-and-cli.md"]
|
|
11
19
|
},
|
|
12
20
|
{
|
|
@@ -14,8 +22,8 @@
|
|
|
14
22
|
"name": "Report a Toloka problem",
|
|
15
23
|
"description": "Report a problem with the Toloka platform, CLI, or SDK as a redacted Markdown issue report sent through the toloka CLI only after explicit approval. Use when the user hits unexpected behavior, an error, or a bug and wants Toloka engineers to investigate.",
|
|
16
24
|
"tags": ["support", "issue", "bug", "report"],
|
|
17
|
-
"version": "0.1.0-preview.
|
|
18
|
-
"digest": "
|
|
25
|
+
"version": "0.1.0-preview.8",
|
|
26
|
+
"digest": "044f8e63faf2a236931a78d3555e6808563199b5f5a06741ca3f2ee9063a71fa",
|
|
19
27
|
"files": ["SKILL.md", "references/report-template.md"]
|
|
20
28
|
}
|
|
21
29
|
]
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: toloka-build
|
|
3
|
-
description:
|
|
3
|
+
description: Onboard users and build, test, inspect, or change Toloka platform pipeline projects as TypeScript source with @toloka-platform/sdk, toloka check, and toloka apply. Use when the user wants to get started, create, adopt, inspect, plan, apply, test, check, or run a pipeline project as code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Build Toloka pipelines as code
|
|
7
7
|
|
|
8
8
|
This SDK is Preview software. The authoring API, the CLI, and generated source can change. Do not invent helpers or flags that are not in the installed package.
|
|
9
9
|
|
|
10
|
-
Use this skill when the user wants to create, inspect, or change a Toloka pipeline project as code. Work in the project source tree; do not translate the request into direct platform API calls.
|
|
10
|
+
Use this skill when the user wants to get started or to create, inspect, test, or change a Toloka pipeline project as code. Work in the project source tree; do not translate the request into direct platform API calls.
|
|
11
|
+
|
|
12
|
+
## Guide a first-time user
|
|
13
|
+
|
|
14
|
+
When the user asks to get started or points to `https://platform.toloka.ai/onboarding.md`, read that guide before acting. The guide owns the session order and its user checkpoints. This skill owns authoring semantics, local test requirements, recovery, and evidence reporting.
|
|
15
|
+
|
|
16
|
+
Do not replace the guide's quick demo with another example, and do not run the demo when the user chooses their own task. Never cross its API-key, project-creation, plan, or run-cost checkpoint without the user's required action or approval.
|
|
11
17
|
|
|
12
18
|
## Follow the reconciliation loop
|
|
13
19
|
|
|
14
20
|
1. Read `toloka.json` when present, then read the relevant `pipelines/**/pipeline.ts` module and everything it imports.
|
|
15
21
|
2. Edit the TypeScript source. Treat it as authoritative desired state.
|
|
16
|
-
3. Run the
|
|
22
|
+
3. Run the complete local gate, then validate each changed pipeline against the platform:
|
|
17
23
|
```sh
|
|
18
|
-
|
|
24
|
+
toloka check
|
|
19
25
|
toloka validate
|
|
20
26
|
```
|
|
21
27
|
4. Run `toloka plan`. Read the complete diff and resolve every conflict or missing prerequisite.
|
|
22
|
-
5. Run `toloka apply`. Apply only after the plan matches the request.
|
|
28
|
+
5. Run `toloka apply`. Apply reruns the complete local gate and proceeds only when it passes. Apply only after the plan matches the request.
|
|
23
29
|
6. Run `toloka plan` again and require `No changes.`
|
|
24
30
|
|
|
25
31
|
The CLI reads source, compares it with live state, and reconciles the platform. Edit files; never mutate a pipeline through raw HTTP, SDK client methods, or internal platform tool calls. Do not make a live edit and then reverse-engineer it into source.
|
|
@@ -28,17 +34,23 @@ The CLI reads source, compares it with live state, and reconciles the platform.
|
|
|
28
34
|
|
|
29
35
|
Use the directory containing `toloka.json` as the source root. Commands default to the current directory; use `--source-root <directory>` from elsewhere.
|
|
30
36
|
|
|
31
|
-
- If `toloka.json` exists, read it as CLI-managed identity state. It maps the project, pipeline source directories, and dataset names to live IDs. Do not hand-edit it.
|
|
32
|
-
- If it is absent and the user is adopting an existing project, run `toloka project add <alias> <projectId>`, then `toloka import
|
|
33
|
-
-
|
|
37
|
+
- If `toloka.json` exists, read it as CLI-managed identity state and confirm its `projectId` matches `toloka project current` before any plan or apply. It maps the project, pipeline source directories, and dataset names to live IDs. Do not hand-edit it.
|
|
38
|
+
- If it is absent and the user is adopting an existing project, run `toloka project add <alias> <projectId>`, then run `toloka import <projectId>` in the intended source root before `toloka init`. Import refuses an existing `pipelines/` directory unless you pass `--force`.
|
|
39
|
+
- After importing an existing project, run `toloka plan` before editing and require `No changes.`. Resolve importer or live-state drift separately so it cannot be mistaken for your change.
|
|
40
|
+
- If it is absent and the user is authoring from scratch, run `toloka project create <alias>` before `toloka init`. Confirm `toloka project current` and the generated `toloka.json` name the new project before authoring.
|
|
41
|
+
|
|
42
|
+
If `toloka project current` reports `from toloka.json` for a project you did not select in this checkout, stop: project create/add/switch does not rebind an existing checkout. A newly generated state file with empty `pipelines` and `datasets` can be removed before selecting the intended project and rerunning `toloka init`; any state file with live bindings may be someone else's checkout and must not be deleted without user approval.
|
|
34
43
|
|
|
35
44
|
Never assume a project ID from conversation context. Resolve it from `--project-id`, `TOLOKA_PROJECT_ID` / `POTATO_PROJECT_ID`, `toloka.json`, or `toloka project current`.
|
|
36
45
|
|
|
46
|
+
`project create`, `project add`, and `project switch` also change the machine-level current-project registry used outside a source root. For temporary or evaluation projects, record the previous alias and restore it before finishing. If create requires `--team-id`, use the team from `toloka status --project-id <authorized-project>` only when that project is known to share the intended owner; state the assumption and confirm the new project's team in `toloka project url`. With no such project, ask the user for the team ID.
|
|
47
|
+
|
|
37
48
|
## Author with the typed graph API
|
|
38
49
|
|
|
39
50
|
Import authoring helpers from `@toloka-platform/sdk`.
|
|
40
51
|
|
|
41
52
|
- Declare every data contract once with `field(name, jsonSchema)`.
|
|
53
|
+
- Do not invent enum, length, range, format, label-precedence, tie-break, default, exact-phrase, or conditional-requiredness rules absent from the request or observed data. Before apply, list every authored rule the request did not fix—including criteria, quiz answers, and UI validation—as an assumption; choose the least surprising option and carry that list into the final report.
|
|
42
54
|
- Use exactly these constructors: `root`, `code`, `generation`, `match`, and `quorum`.
|
|
43
55
|
- Connect typed ports with `connect(from, to)`: `started`, `completed`, `input`, `output`, `matchNode.matched(0)`, and `default`.
|
|
44
56
|
- Export a default `definePipeline({ dataset, fields, nodes, connections })` from every `pipelines/**/pipeline.ts`.
|
|
@@ -54,19 +66,24 @@ These are server rules that `definePipeline` does not check. Each one costs an a
|
|
|
54
66
|
|
|
55
67
|
- **Do not pair `projectType: 'general'` with `verifiedExperts: false`.** The server answers `General projects require an ID-verified audience`. Specializations also require a verified audience.
|
|
56
68
|
- **Training is part of the node, not extra.** A quorum node requires `onboarding`, and while it is enabled the platform wants at least three steps and at least one quiz block. Preserve an explicit `enabled: false` that a user or `toloka import` put there; never switch Training on to satisfy your own sense of completeness.
|
|
69
|
+
- **Do not author placeholder optional settings.** Omit `exam`, non-default QA, audience reuse, and smart-search blocks unless the user requested them or imported source already controls them. An empty disabled block is still authored state.
|
|
57
70
|
- **Run scope belongs to the platform.** `itemFilter` and `itemLimit` on the root node are set from the platform, and apply preserves whatever is live unless source declares its own value. Do not add an item limit to source to "restore" one you saw in the UI.
|
|
58
71
|
|
|
59
72
|
## Know the validation boundary
|
|
60
73
|
|
|
61
74
|
`definePipeline` and typed ports check local declaration and connection invariants. The published JSON contract is still available as `validate(graph)` for importer and fixture tests; it makes no server call.
|
|
62
75
|
|
|
63
|
-
`toloka
|
|
76
|
+
`toloka check` is the required local gate. It runs the project TypeScript compiler, typechecks every authored Task UI against declarations bundled with this SDK version, runs Vitest, and requires passing typed `test.code`, `test.ui`, and `test.pipeline` evidence for every checkable node and pipeline. Use `toloka check <pipeline> --node <name-or-id>` while iterating, then run the unfiltered command before plan or run. Status `missing` means required test evidence does not exist; `failed` means a check ran and failed; `partial` means hardware-backed behavior remains unverified; `infrastructure_error` means the checker could not run. All four block apply.
|
|
64
77
|
|
|
65
|
-
|
|
78
|
+
`toloka validate` posts each bound graph to the platform. Treat source/spec errors as blocking and warnings as informational. `not_ran_node_check` concerns a separate Remote Node Check and does not invalidate a passing Local Check Gate. A pipeline not yet on the platform is skipped until `toloka apply` creates it. When a reviewed plan adds a dataset field already bound by an existing live pipeline, pre-apply validation can report that exact field as missing; apply only the reviewed additive plan, then require post-apply validation to clear source/spec errors. Never rewrite valid source for a missing Remote Node Check.
|
|
79
|
+
|
|
80
|
+
Before choosing Task UI components, call `ui.componentDocumentation()` from a local `@toloka-platform/sdk/testing` scenario. A component's usable contract is the returned `propsType` plus its returned `valueType` and `example`; shared `Field` props such as `path`, `label`, `hint`, and `validation` can be confirmed from any current `Field.*` example, but do not invent any other prop. For structured or array-valued Fields, derive the dataset field schema from `valueType`, then feed the documented example value through `setValue`, `getValue`, and `submit` in the UI scenario so upstream contract drift fails locally. Never translate undocumented property names or replace missing values with defaults. Every identifier in `ui.code` must be a returned component or documented `actions` API, and JSX must have one root element. Register each required UI scenario with `test.ui(pipeline, node, name, callback)` and submit through its bound `render` helper. Run `toloka check <pipeline> --node <name-or-id>` after every Task UI edit; require passing UI types, empty browser validation errors, valid postprocessed entity output, and visual inspection where relevant. Never weaken authored validation merely to make a test pass.
|
|
81
|
+
|
|
82
|
+
Register code behavior with `test.code(pipeline, node, name, callback)` and execute the bound `run` helper. Add at least one `test.pipeline(pipeline, name, callback)` scenario. When a local dataset file is available, use its first row as the initial item state; redact sensitive values while preserving field names, nesting, optionality, and media/value shapes. Use synthetic input only when no local row exists. Treat the fixture as `root.started` item state, execute connected nodes in order with the callback's bound code and UI helpers, merge only each node's declared outputs, and assert the final `root.completed` fields. One scenario is appropriate for a linear happy path; use separate scenarios for different match branches, optional paths, and failures.
|
|
66
83
|
|
|
67
84
|
## Keep data and credentials out of source
|
|
68
85
|
|
|
69
|
-
- Never put dataset items in pipeline source or `toloka.json`. After apply has created or resolved the dataset, upload `.json`, `.jsonl`, or `.csv` rows with `toloka dataset upload <dataset> <file>`. If a later upload fails as schema-incompatible,
|
|
86
|
+
- Never put dataset items in pipeline source or `toloka.json`. After apply has created or resolved the dataset, upload `.json`, `.jsonl`, or `.csv` rows with `toloka dataset upload <dataset> <file>`. If a later upload fails as schema-incompatible, inspect `toloka dataset fields <dataset>` for stored names and base types, but preserve stricter authored constraints; the printed inference can omit enum, length, range, and format constraints.
|
|
70
87
|
- Put secret references in node settings, but never secret values. Set values through stdin with `toloka secret set <name>`, or use `toloka secret set <name> --from-env <variable>`.
|
|
71
88
|
|
|
72
89
|
## Credentials
|
|
@@ -76,19 +93,25 @@ A successful `toloka validate` is necessary, not proof the pipeline can be launc
|
|
|
76
93
|
that file. `toloka auth-status` reports what is in effect and where it came from; `toloka logout`
|
|
77
94
|
removes it. If a command reports missing credentials, run `toloka login`; never invent a key.
|
|
78
95
|
Anonymous command telemetry is on by default; set `TOLOKA_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable it.
|
|
96
|
+
A globally installed CLI auto-updates by default; turn that off with `toloka config set auto-update false`.
|
|
79
97
|
|
|
80
98
|
## Recover from expected failures
|
|
81
99
|
|
|
82
100
|
- **Dataset field schema conflict:** Stop trying to edit the field. Dataset fields are immutable after creation: they can be added, never altered or removed. Declare a new column name with the wanted schema, or bind the pipeline to a new dataset, then plan again.
|
|
83
101
|
- **Missing secret:** Set every name listed by plan with `toloka secret set <name>`, keep the value out of files and shell arguments, then rerun plan and apply.
|
|
84
102
|
- **409 stale version:** Another writer changed the graph after it was read. Do not retry blindly. Run `toloka plan` to re-read live state, review the new diff, preserve intentional remote changes in source when needed, then run `toloka apply` again.
|
|
103
|
+
- **Server 400 after partial apply:** Dataset and field writes can land before pipeline import is rejected. Fix the source and run `toloka plan` again. Continue from the remaining diff; do not recreate resources that remain valid. If the rejection means a newly created field schema is wrong, that field is already immutable: apply the field-conflict rule by choosing a new column name or a new dataset, prefer the option that preserves names fixed by the request, and report the orphan instead of deleting it.
|
|
85
104
|
|
|
86
105
|
## Run a deployed pipeline
|
|
87
106
|
|
|
107
|
+
Before starting a run, require a passing `toloka check` and no blocking source/spec error from `toloka validate`. Do not block on `not_ran_node_check`, which concerns separate Remote Node Checks. Run `toloka pipeline cost <name>` when pricing evidence is needed; if it skips a billed node, report the authored rate and a labeled labor floor instead of presenting `$0.00` as the price.
|
|
108
|
+
|
|
88
109
|
Start a run with `toloka pipeline run <name> --wait --timeout <ms>`, then read its exit code: `0` succeeded, `1` reached a failed terminal state, `2` still running when the window closed. Without `--wait`, exit `0` only means the run was accepted. Nothing reports back later, so never describe a started run as a finished one. Name the live pipeline; there is no implicit only-pipeline.
|
|
89
110
|
|
|
90
111
|
Always bound the wait. A queue with no one working it stays in progress indefinitely, so an unbounded poll loop ends with you killed and reporting nothing. On exit `2`, stop waiting and report what you observed: item counts, current states, and that the run had not finished. A bounded honest report beats an unbounded silent wait. Use `toloka pipeline status <name>` and `toloka pipeline results <runId> --failed` for counts, states, and errors. `toloka status` (no prefix) is project health, not the latest run.
|
|
91
112
|
|
|
113
|
+
## Report with evidence
|
|
114
|
+
|
|
92
115
|
Deliver that report in the same reply that does the work. There is no later turn and no background poller that will speak for you: if you end by promising to report once a window closes, the observation is lost and the work counts for nothing. Poll in the foreground, then state what you saw before you finish.
|
|
93
116
|
|
|
94
|
-
|
|
117
|
+
For an autonomous or audited platform change, save stdout, stderr, and exit status for skill discovery and every networked mutation, check, and project-registry change outside authored source, then cite those records for counts, exit codes, and convergence claims. If skill installation fails, record the failure and identify the exact skill path and version or digest followed instead. Every reported defect or guidance gap must cite a saved record or be labeled `unrecorded`; mark recurrences from earlier work. Classify each as a skill rule, a rule present but not followed, a documentation gap, or a CLI/platform defect; use the bundled `toloka-report-issue` skill for product defects instead of teaching a workaround as normal workflow. Report every authored rule not fixed by the request as an assumption. For visual evidence, list every saved screenshot as inspected or uninspected and limit appearance claims to the inspected set.
|