@toloka-platform/sdk 0.27.0 → 0.28.0

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 (37) hide show
  1. package/README.md +5 -3
  2. package/dist/cli/toloka.js +179 -190
  3. package/dist/cli/toloka.js.jsc +0 -0
  4. package/dist/cli/toloka.js.jsc.sha256 +1 -1
  5. package/dist/cli/toloka.js.sha256 +1 -1
  6. package/examples/video-pair-rating/nodes/adjudicate/node.ts +1 -1
  7. package/examples/video-pair-rating/nodes/adjudicate_op/node.ts +1 -1
  8. package/examples/video-pair-rating/nodes/overall_preference_pick/node.ts +5 -1
  9. package/examples/video-pair-rating/nodes/rate_pair/node.ts +5 -1
  10. package/openapi/gen/api.schemas.ts +51 -758
  11. package/openapi/gen/api.ts +0 -860
  12. package/package.json +2 -2
  13. package/skills/catalog.json +6 -40
  14. package/skills/toloka-build/references/human-work.md +15 -6
  15. package/skills/toloka-build/references/local-setup.md +2 -2
  16. package/skills/toloka-build/references/workflow-and-cli.md +3 -22
  17. package/skills/toloka-get-started/SKILL.md +9 -13
  18. package/src/cli/analytics.ts +0 -31
  19. package/src/cli/auth.ts +15 -7
  20. package/src/cli/config.ts +67 -3
  21. package/src/cli/context.ts +3 -124
  22. package/src/cli/credentials.ts +11 -10
  23. package/src/cli/init.ts +1 -1
  24. package/src/cli/program.ts +0 -6
  25. package/src/cli/project.ts +9 -1
  26. package/src/client.ts +3 -261
  27. package/src/importer.ts +12 -2
  28. package/src/index.ts +0 -2
  29. package/src/pipeline-graph-v1.contract.json +130 -128
  30. package/skills/toloka-fine-tuning/SKILL.md +0 -177
  31. package/skills/toloka-gisting/SKILL.md +0 -186
  32. package/src/cli/batch-inference.ts +0 -267
  33. package/src/cli/commands/batch-inference.ts +0 -116
  34. package/src/cli/commands/models.ts +0 -121
  35. package/src/cli/commands/training.ts +0 -275
  36. package/src/cli/models.ts +0 -304
  37. package/src/cli/trainings.ts +0 -880
package/README.md CHANGED
@@ -58,9 +58,9 @@ The installer uses compatible Bun when available, otherwise installs a standalon
58
58
  bun add @toloka-platform/sdk@latest
59
59
  ```
60
60
 
61
- For an existing project, run `bun i` to install its dependencies. Training-only workflows need neither the SDK nor a separate runtime. See [Pipelines as code](https://platform.toloka.ai/docs/sdk/pipelines) for the full authoring workflow.
61
+ For an existing project, run `bun i` to install its dependencies. See [Pipelines as code](https://platform.toloka.ai/docs/sdk/pipelines) for the full authoring workflow.
62
62
 
63
- For a guided first run, start a fresh coding-agent session and ask it to follow the [Toloka agent bootstrap](https://platform.toloka.ai/agents/SKILL.md). It routes to the data-labeling, fine-tuning, or gisting runbook and the matching packaged skill.
63
+ For a guided first run, start a fresh coding-agent session and ask it to follow the [Toloka agent bootstrap](https://platform.toloka.ai/agents/SKILL.md). It points to the Data Labeling runbook and the `toloka-build` skill.
64
64
 
65
65
  ## Documentation
66
66
 
@@ -99,7 +99,9 @@ Two rules the platform enforces and the SDK will not paper over:
99
99
 
100
100
  ## Authenticate the client from code
101
101
 
102
- `createClient` takes the platform URL and one credential. `{ baseUrl, apiKey }` sends the key with the `ApiKey` authorization scheme on every request; the key does not expire until it is deleted in the Business Console. `{ baseUrl, scopedToken }` always sends the credential in `X-Scoped-Token`, including placeholders such as `dtn_secret_…` whose value is supplied by a trusted egress proxy. `{ baseUrl, accessToken }` calls the `accessToken` function before every request and sends its result as a Bearer token, so a renewable session can back the client. The three forms are exclusive. The CLI uses the last form for its browser sign-in.
102
+ `createClient()` without arguments uses the sign-in `toloka login` saved on this machine, or `TOLOKA_API_KEY` for a script that runs without a person; see [client and credentials](https://platform.toloka.ai/docs/sdk/client).
103
+
104
+ To choose the credential in code, `createClient` takes the platform URL and one credential. `{ baseUrl, apiKey }` sends the key with the `ApiKey` authorization scheme on every request; the key does not expire until it is deleted in the Business Console. `{ baseUrl, scopedToken }` always sends the credential in `X-Scoped-Token`, including placeholders such as `dtn_secret_…` whose value is supplied by a trusted egress proxy. `{ baseUrl, accessToken }` calls the `accessToken` function before every request and sends its result as a Bearer token, so a renewable session can back the client. The three forms are exclusive. The CLI uses the last form for its browser sign-in.
103
105
 
104
106
  `baseUrl` may carry a path, for a gateway that serves the platform under a prefix: every request keeps that path, so `https://gateway.example/ss/pp.1` sends `GET /api/v2-beta/projects/pp.1` to `https://gateway.example/ss/pp.1/api/v2-beta/projects/pp.1`. A trailing slash makes no difference. A plain origin such as `https://platform.toloka.ai` behaves as it always has.
105
107