Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@toloka-platform/sdk

Latest version: v0.30.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: toloka-svc
62 Versions
4.6K Downloads

Scan summary

@toloka-platform/sdk was last scanned on 30 Nov 2026 at version 0.30.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 62 versions; the latest 5 were published within 6 days (25–30 Nov 2026).
  • Findings: No rules fired in version 0.30.0.
  • Downloads: 4,635 downloads.

Versions

62 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.30.0 LATEST 30 Nov 2026 No rules fired
0.29.1 30 Nov 2026 No rules fired
0.29.0 27 Nov 2026 No rules fired
0.28.2 26 Nov 2026 Not shown
0.28.1 25 Nov 2026 Not shown

No rules fired in 0.30.0

Findings

Findings for v0.30.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.30.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@toloka-platform/sdk

Build and operate Toloka pipeline projects as TypeScript source.

Use the latest release. The current supported release is published on latest. Because the SDK is still 0.x, the authoring API, CLI surface, and generated source layout can change between minor releases. Read the SDK compatibility notes.

A pipeline project is a graph of nodes that moves items from a dataset through deterministic code and human work and back into the dataset. This package lets you write that project as TypeScript, keep it in version control, and reconcile it onto the platform with one command.

import { code, connect, definePipeline, field, root } from "@toloka-platform/sdk";

const imageUrl = field("image_url", { type: "string", format: "uri" });
const caption = field("caption", { type: "string" });

const start = root({ started: [imageUrl], completed: [caption] });

const describe = code("describe_image", {
  about: { name: "describe_image", description: "Caption each image with a vision model." },
  envVars: [],
  input: [{ field: imageUrl, optional: false }],
  output: [{ field: caption, optional: false }],

  code: {
    code: `from main_types import Inputs, Outputs

async def main(inputs: Inputs) -> Outputs:
    return {"caption": describe(inputs["image_url"])}`,
  },
});

export default definePipeline({
  dataset: "images",
  fields: [imageUrl, caption],
  nodes: [start, describe],
  connections: [connect(start.started, describe.input), connect(describe.output, start.completed)],
});
toloka login
toloka init

Install

Install the CLI:

curl -fsSL https://platform.toloka.ai/cli/install.sh | sh
toloka --version

The installer uses compatible Bun when available, otherwise installs a standalone executable with its runtime included. See CLI setup for --bun / --native, supported platforms, PATH, and updates.

Bun is the recommended runtime and package manager for SDK development. Add the SDK when authoring pipelines:

bun add @toloka-platform/sdk@latest

For an existing project, run bun i to install its dependencies. See Pipelines as code for the full authoring workflow.

For a guided first run, start a fresh coding-agent session and ask it to follow the Toloka agent bootstrap. It points to the Data Labeling runbook and the toloka-build skill.

Documentation

Page What it covers
SDK overview installation, entry points, and 0.x compatibility
Quickstart authenticate, list projects, add dataset rows, and export them
Pipelines as code fields, node constructors, connections, and the check/plan/apply workflow
Local testing Code node tests, labeling-interface scenarios, and toloka check
Client methods SDK resource operations and their API endpoints
Pipeline nodes node types, settings, and behavior
Datasets create datasets, upload rows, define fields, filter, and export
CLI installation, authentication, commands, and the reconciliation loop
SDK errors HTTP failures, polling timeouts, and graph validation
Pipeline troubleshooting diagnose runs by symptom and recover from errors

Examples

Each example is a complete project you can read end to end. See examples.

example shape teaches
face-image-collection 3 nodes, one human-work node collecting original content from experts, regional audience variants
video-pair-rating 16 nodes: 8 code, 3 match, 2 quorum, 2 generation quorum arrays, deterministic resolution, predicate routing with a default branch, human adjudication

How it works

The CLI treats your source tree as the desired state. toloka check runs project types, automatic Task UI types, and required typed node and pipeline-flow tests without platform credentials. toloka plan reads the checked source and live platform state and prints the difference. toloka apply reruns the complete local gate before making the platform match. Running plan again should print No changes.

Identity lives in toloka.json, written when the CLI binds the directory to a platform project. It maps your source directories and dataset names to platform IDs so later runs reconcile the same resources instead of creating new ones. Do not hand-edit it.

Two rules the platform enforces and the SDK will not paper over:

  • Dataset columns are immutable. A column can be added, never altered, never removed. plan reports a schema conflict and apply refuses rather than rewriting data.
  • Nothing is deleted implicitly. A pipeline or dataset that exists live but not in source is reported and refused, not dropped.

Authenticate the client from code

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.

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.

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.

API request URL construction keeps the configured origin, even when the base path starts with //; path content cannot select another host.

A project-scoped token (toloka project token, or POST /api/v2-beta/projects/:id/tokens) acts as its minting user, confined to one or more projects of one team (--projects adds more) and the granted permissions, for at most six hours. Pass it to code as scopedToken and to an agent as TOLOKA_SCOPED_TOKEN. For backward compatibility, an apiKey or TOLOKA_API_KEY value beginning with pst_ is also sent in X-Scoped-Token. toloka project tokens lists the live tokens of the selected project, toloka project revoke-token <id> kills one, and toloka project revoke-tokens kills every live token of the project at once (a token that covers several projects dies as a whole); a token can also end itself with client.projects.revokeCurrentToken(). One user may hold at most 1000 live tokens per project, counted against every project a token covers; past that, minting returns 429 You already hold 1000 live tokens for project <id>; revoke unused tokens first. In code, client.projects.listTokens returns one page and client.projects.listAllTokens iterates them all; client.projects.revokeAllTokens is the bulk revoke.

File downloads differ for a scoped token: ProjectFile.url points at the platform's file proxy, which redirects a human credential to the storage URL but answers a scoped token with 200 {"url": "<storage URL>"}. Read url from that body and fetch it as a plain request, without the X-Scoped-Token header, because HTTP clients replay custom headers across redirects and the token must never reach the storage host.

Agent support

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 bind a checkout from the machine registry's current project. Pass --project-id, set TOLOKA_PROJECT_ID, or run toloka project create first when init must write toloka.json. For an existing project, run toloka import <projectId> before init. Re-running init refreshes only CLI-owned content and removes only Toloka-generated legacy entry points; run it again after updating the standalone CLI. 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, skill discovery, and the installed skill.

Agent evals

The live agent eval harness lives in evals. It is not part of the published package.

Regenerating the client

openapi/openapi.json is produced from the running API (bun run generate:api-v2-openapi in app; a unit test fails when the committed document drifts from what the server serves) and openapi/gen is produced from that document by orval (bun run generate here). Both are committed. After any change to the api-v2 schemas, run both and commit the result; CI runs bun run generate:check and fails when openapi/gen is stale.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @toloka-platform/sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229