@toloka-platform/sdk 0.1.0-preview.3 → 0.1.0-preview.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +2 -2
  2. package/bin/toloka.js +7 -0
  3. package/dist/cli/toloka.js +119 -114
  4. package/dist/cli/toloka.js.jsc +0 -0
  5. package/dist/cli/toloka.js.jsc.sha256 +1 -1
  6. package/dist/cli/toloka.js.sha256 +1 -1
  7. package/docs/cli-v2.md +4 -0
  8. package/docs/cli.md +56 -5
  9. package/docs/getting-started.md +3 -3
  10. package/docs/limitations.md +1 -1
  11. package/openapi/gen/api.ts +22 -0
  12. package/openapi/gen/models/createDatasetBody.ts +2 -0
  13. package/openapi/gen/models/createDatasetBodyProfile.ts +2 -0
  14. package/openapi/gen/models/createDatasetUploadBodyFormat.ts +1 -1
  15. package/openapi/gen/models/dataset.ts +2 -0
  16. package/openapi/gen/models/datasetProfile.ts +3 -0
  17. package/openapi/gen/models/datasetProfileStamp.ts +6 -0
  18. package/openapi/gen/models/datasetProfileStampName.ts +2 -0
  19. package/openapi/gen/models/index.ts +5 -0
  20. package/openapi/gen/models/runCost.ts +7 -0
  21. package/package.json +4 -2
  22. package/skills/catalog.json +22 -0
  23. package/skills/{SKILL.md → toloka-build/SKILL.md} +1 -1
  24. package/skills/{references → toloka-build/references}/workflow-and-cli.md +14 -4
  25. package/skills/toloka-report-issue/SKILL.md +25 -0
  26. package/skills/toloka-report-issue/references/report-template.md +34 -0
  27. package/src/authoring/index.ts +216 -171
  28. package/src/cli/analytics.ts +53 -1
  29. package/src/cli/auth.ts +5 -5
  30. package/src/cli/credentials.ts +8 -2
  31. package/src/cli/file-system.ts +34 -0
  32. package/src/cli/format-error.ts +19 -0
  33. package/src/cli/init.ts +149 -194
  34. package/src/cli/program.ts +103 -21
  35. package/src/cli/report.ts +144 -0
  36. package/src/cli/skill.ts +363 -0
  37. package/src/pipeline-graph-v1.contract.json +5 -1
  38. /package/skills/{references → toloka-build/references}/node-semantics.md +0 -0
package/README.md CHANGED
@@ -58,7 +58,7 @@ curl -fsSL https://platform.toloka.ai/cli/install.sh | sh
58
58
  bun add @toloka-platform/sdk@preview
59
59
  ```
60
60
 
61
- The installer writes `toloka` to `~/.local/bin` and uses an isolated Bun 1.4 runtime with precompiled bytecode. The project install makes `@toloka-platform/sdk` imports resolvable.
61
+ The installer requires Bun 1.4.0, installs `@toloka-platform/sdk` globally, and exposes `toloka` through Bun's global binary directory. The published CLI includes matching precompiled bytecode. The project install makes SDK imports resolvable.
62
62
 
63
63
  ## Documentation
64
64
 
@@ -94,7 +94,7 @@ Two rules the platform enforces and the SDK will not paper over:
94
94
 
95
95
  ## Agent support
96
96
 
97
- `toloka init` initializes the current directory with agent entry points: a Claude skill at `.claude/skills/toloka-build/SKILL.md`, a Cursor rule when `.cursor/rules/` exists, and a marked block in `AGENTS.md`. It does not require a selected platform project. When one is already selected, it also writes `toloka.json`. Re-running it refreshes only SDK-owned content. Then open your coding agent in that directory and ask it to create the project you need; the installed skill guides project creation, authoring, validation, planning, and apply.
97
+ `toloka init` initializes the current directory with one managed `<toloka>` Agent Bootstrap block in `AGENTS.md` plus minimal pointers to it: a Claude skill at `.claude/skills/toloka-bootstrap/SKILL.md` and, when `.cursor/rules/` exists, an always-applied Cursor rule at `.cursor/rules/toloka-bootstrap.mdc`. It does not require a selected platform project. When one is already selected, it also writes `toloka.json`. Re-running it refreshes only SDK-owned content and removes only Toloka-generated legacy entry points. Then open your coding agent in that directory and ask it to create the project you need; the bootstrap directs the agent to `toloka --help` and the bundled Skill Catalog (`toloka skill search`, `toloka skill install`), and the installed skill guides project creation, authoring, validation, planning, and apply.
98
98
 
99
99
  ## Agent evals
100
100
 
package/bin/toloka.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bun
2
+ import { existsSync } from "node:fs";
3
+
4
+ const compiledEntry = new URL("../dist/cli/toloka.js", import.meta.url);
5
+ const sourceEntry = new URL("../src/cli/bin.ts", import.meta.url);
6
+
7
+ await import(existsSync(compiledEntry) ? compiledEntry.href : sourceEntry.href);