@withgateway/sdk 0.2.4 → 0.2.6

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 (85) hide show
  1. package/dist/cli.js +4304 -2381
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +4266 -2343
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/files/index.js +56 -31
  6. package/dist/files/index.js.map +1 -1
  7. package/dist/files/index.mjs +52 -27
  8. package/dist/files/index.mjs.map +1 -1
  9. package/dist/hooks/index.d.mts +1 -1
  10. package/dist/hooks/index.d.ts +1 -1
  11. package/dist/hooks/index.js +280 -8
  12. package/dist/hooks/index.js.map +1 -1
  13. package/dist/hooks/index.mjs +272 -8
  14. package/dist/hooks/index.mjs.map +1 -1
  15. package/dist/{index-1xnxt0Cc.d.ts → index-BO2SNSgy.d.ts} +12 -1
  16. package/dist/{index-B0R3IgsV.d.mts → index-BaKu5ZSU.d.mts} +124 -2
  17. package/dist/{index-B0R3IgsV.d.ts → index-BaKu5ZSU.d.ts} +124 -2
  18. package/dist/{index-C1wDEwH4.d.mts → index-Cz8Q6Keo.d.mts} +12 -1
  19. package/dist/index.d.mts +4 -4
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.js +1100 -438
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +1079 -424
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/traces/index.js +45 -20
  26. package/dist/traces/index.js.map +1 -1
  27. package/dist/traces/index.mjs +41 -16
  28. package/dist/traces/index.mjs.map +1 -1
  29. package/dist/tracing/index.d.mts +1 -1
  30. package/dist/tracing/index.d.ts +1 -1
  31. package/dist/tracing/index.js +98 -61
  32. package/dist/tracing/index.js.map +1 -1
  33. package/dist/tracing/index.mjs +98 -61
  34. package/dist/tracing/index.mjs.map +1 -1
  35. package/dist/worlds/index.d.mts +179 -25
  36. package/dist/worlds/index.d.ts +179 -25
  37. package/dist/worlds/index.js +639 -284
  38. package/dist/worlds/index.js.map +1 -1
  39. package/dist/worlds/index.mjs +631 -276
  40. package/dist/worlds/index.mjs.map +1 -1
  41. package/package.json +2 -1
  42. package/runtime/gatewaysdk/environment/_bundle.py +15 -25
  43. package/runtime/gatewaysdk/environment/_materialize.py +53 -9
  44. package/runtime/gatewaysdk/environment/_toml.py +13 -0
  45. package/runtime/gatewaysdk/environment/schema/api.py +40 -25
  46. package/runtime/gatewaysdk/environment/schema/batch.py +15 -11
  47. package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +24 -0
  48. package/runtime/gatewaysdk/environment/schema/compiler.py +60 -28
  49. package/runtime/gatewaysdk/environment/schema/conform.py +1 -1
  50. package/runtime/gatewaysdk/environment/schema/connector.py +1 -1
  51. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/readers/merge.ingest.toml +25 -0
  52. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/readers/merge.toml +17 -0
  53. package/runtime/gatewaysdk/environment/schema/data.py +21 -19
  54. package/runtime/gatewaysdk/environment/schema/extract.py +1 -5
  55. package/runtime/gatewaysdk/environment/schema/grading.py +225 -0
  56. package/runtime/gatewaysdk/environment/schema/host.py +156 -546
  57. package/runtime/gatewaysdk/environment/schema/host_surfaces.py +1 -5
  58. package/runtime/gatewaysdk/environment/schema/ingest.py +3 -11
  59. package/runtime/gatewaysdk/environment/schema/local.py +32 -126
  60. package/runtime/gatewaysdk/environment/schema/mapping.py +1 -1
  61. package/runtime/gatewaysdk/environment/schema/platform.py +30 -26
  62. package/runtime/gatewaysdk/environment/schema/proof.py +237 -0
  63. package/runtime/gatewaysdk/environment/schema/redaction.py +1 -1
  64. package/runtime/gatewaysdk/environment/schema/runtime.py +686 -0
  65. package/runtime/gatewaysdk/environment/schema/scaffold.py +9 -2
  66. package/runtime/gatewaysdk/environment/schema/skill.py +1 -0
  67. package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +67 -9
  68. package/runtime/gatewaysdk/environment/schema/skills/hooks-getting-started/SKILL.md +67 -6
  69. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +4 -1
  70. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +11 -11
  71. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +17 -1
  72. package/runtime/gatewaysdk/environment/schema/snapshot.py +1 -5
  73. package/runtime/gatewaysdk/environment/schema/tools_world.py +71 -23
  74. package/runtime/gatewaysdk/environment/schema/ui.py +1 -5
  75. package/runtime/gatewaysdk/environment/schema/verbs.py +136 -0
  76. package/runtime/gatewaysdk/environment/schema/workers.py +14 -0
  77. package/runtime/gatewaysdk/environment/schema/world_tests.py +1 -1
  78. package/runtime/gatewaysdk/environment/world.py +507 -0
  79. package/skills/benchmarks-getting-started/SKILL.md +67 -9
  80. package/skills/connector-schema-authoring/connector-worlds.md +8 -1
  81. package/skills/connector-schema-authoring/world-schema.md +1 -1
  82. package/skills/hooks-getting-started/SKILL.md +67 -6
  83. package/skills/world-data-ingestion/SKILL.md +4 -1
  84. package/skills/worlds-getting-started/SKILL.md +11 -11
  85. package/skills/worlds-getting-started/references/cli-mcp-map.md +17 -1
@@ -587,7 +587,11 @@ type SessionRunReport = {
587
587
  results: SessionRunResult[];
588
588
  /** Mean reward over every task, counting failures as 0. */
589
589
  mean: number;
590
- /** True when `mean >= failUnder` (or no gate was set). */
590
+ /** Tasks that never graded: the session did not open or become ready, the
591
+ * agent threw, or grading failed. Any failure fails the run — a 0 an agent
592
+ * earned and a session that never opened are not the same result. */
593
+ failed: number;
594
+ /** True when no task failed and `mean >= failUnder` (or no gate was set). */
591
595
  passed: boolean;
592
596
  };
593
597
  /**
@@ -1223,8 +1227,10 @@ type RunTaskSummary = {
1223
1227
  evaluationId?: string;
1224
1228
  [extra: string]: unknown;
1225
1229
  };
1226
- /** The report an agent callable may return: a string, or an object with a
1227
- * `report` key (any other keys are kept in `run.json` as-is). */
1230
+ /** The report an agent callable may return: a string, or an object with an
1231
+ * optional string `report` key (any other keys are kept in `run.json` as-is),
1232
+ * or nothing. Anything else is an agent error — a number, a bigint or an
1233
+ * array is never stringified into a graded completion. */
1228
1234
  type TaskRunResult = string | {
1229
1235
  report?: unknown;
1230
1236
  [key: string]: unknown;
@@ -1285,13 +1291,10 @@ declare class GatewayEvalsClient {
1285
1291
  * branch / tag / propose — a faithful port of the Python client
1286
1292
  * (`gatewaysdk/benchmark_hub/client.py` + `_archive.py`).
1287
1293
  *
1288
- * LOCKSTEP WARNING — the content hash is the version's identity and is
1289
- * byte-compatible with Prime Intellect. It now has FOUR implementations that
1290
- * must stay identical: worker `environmentAgent/tar.ts`, web
1291
- * `benchmark-hub/server/benchmarkContentHash.ts`, Python `_archive.py`, and
1292
- * this file. This one is a line-for-line port of the WEB TypeScript
1293
- * implementation (same language, same crypto) — if the rule ever changes,
1294
- * change all four or push identity splits by client.
1294
+ * The content hash is the version's identity and is byte-compatible with
1295
+ * Prime Intellect: `WorldDir.contentHash` (./worldDir.ts) computes it here,
1296
+ * `WorldTree.contentHash` on the platform and `_archive.compute_content_hash`
1297
+ * in the Python SDK; the conformance corpus pins the three to the same bytes.
1295
1298
  *
1296
1299
  * One deliberate refusal, same policy as the web upload path: a bundle with
1297
1300
  * a ROOT `.gitignore` is refused rather than mis-hashed — the Python CLI
@@ -1299,11 +1302,11 @@ declare class GatewayEvalsClient {
1299
1302
  * would produce a wrong, Prime-incompatible hash silently.
1300
1303
  */
1301
1304
  declare const DEFAULT_BRANCH = "main";
1302
- declare function isIncludedInContentHash(relPath: string, includeAllRootFiles: boolean): boolean;
1303
- /** The archive-visible files of a working dir, as sorted relpaths. Throws on
1304
- * a root .gitignore (see the header). */
1305
+ /** The archive-visible files of a working dir, as sorted relpaths
1306
+ * (`WorldDir.archivePaths`). Throws on a root .gitignore (see the header). */
1305
1307
  declare function collectArchiveRelPaths(dir: string): string[];
1306
1308
  declare function computeContentHash(dir: string): string;
1309
+ declare function archiveMode(mode: number): number;
1307
1310
  /** A deterministic .tar.gz of the source files (node's gzip stamps no mtime,
1308
1311
  * matching the Python's mtime=0 gzip). */
1309
1312
  declare function buildSourceTarball(dir: string): Buffer;
@@ -1320,6 +1323,39 @@ declare function readLocalMeta(dir: string): LocalMeta | null;
1320
1323
  * name, else the directory's name — so a tracked checkout never creates a
1321
1324
  * second world named after its folder. */
1322
1325
  declare function pushSlug(dir: string, explicit?: string): string;
1326
+ type SlugDeclaration = {
1327
+ source: string;
1328
+ slug: string;
1329
+ };
1330
+ type PushSlugResolution = {
1331
+ slug: string;
1332
+ /** Where the slug came from (`--slug`, `.gateway metadata`, `benchmark.json`, `pyproject.toml`, `directory name`). */
1333
+ source: string;
1334
+ /** The slug the dir's `.gateway/.env-metadata.json` tracks from an earlier push or pull, if any. */
1335
+ tracked: string | null;
1336
+ /** What the tree itself declares (a caller's benchmark.json, then pyproject.toml), in precedence order. */
1337
+ declared: SlugDeclaration[];
1338
+ /** A declaration the tracked slug does not match — set only when the tracked slug won without `--slug`. */
1339
+ conflict: SlugDeclaration | null;
1340
+ };
1341
+ /** `pushSlug` with its provenance. `declared` are the caller's own slug sources
1342
+ * (e.g. `{ "benchmark.json": "x" }`), consulted before pyproject. A tracked slug
1343
+ * that disagrees with what the tree declares is reported as `conflict` so a
1344
+ * front door can refuse: that is how a directory pushed once with `--slug X`
1345
+ * silently landed every later push on X while its benchmark.json said Y. The
1346
+ * platform's collision suffix (`acme-2` minted for a taken `acme`) is not a
1347
+ * conflict; any other difference is (`acme-e2e` for `acme` was the mix-up). */
1348
+ declare function resolvePushSlug(dir: string, opts?: {
1349
+ explicit?: string;
1350
+ declared?: Record<string, string | null | undefined>;
1351
+ }): PushSlugResolution;
1352
+ /** The refusal a front door raises on `PushSlugResolution.conflict`: both slugs, both sources, every way out. */
1353
+ declare class PushSlugConflict extends Error {
1354
+ readonly dir: string;
1355
+ readonly tracked: string;
1356
+ readonly declared: SlugDeclaration;
1357
+ constructor(dir: string, tracked: string, declared: SlugDeclaration);
1358
+ }
1323
1359
  declare function writeLocalMeta(dir: string, meta: LocalMeta): void;
1324
1360
  declare function snapshotTreeHashes(dir: string): Record<string, string>;
1325
1361
  declare function localTreeState(dir: string): {
@@ -1327,6 +1363,16 @@ declare function localTreeState(dir: string): {
1327
1363
  dirty: string[];
1328
1364
  clean: boolean;
1329
1365
  };
1366
+ /** The rows the platform previews for a pushed DRAFT: the archive set, one
1367
+ * entry per file the content hash covers, so hash, tarball, manifest and
1368
+ * `pull` agree on what the world is. Finalize replaces them with rows
1369
+ * derived from the stored bytes. */
1370
+ declare function buildFileManifest(dir: string): {
1371
+ path: string;
1372
+ isDirectory: boolean;
1373
+ size: number;
1374
+ sha256: string;
1375
+ }[];
1330
1376
  declare function push(dir: string, opts?: {
1331
1377
  slug?: string;
1332
1378
  branch?: string;
@@ -1356,6 +1402,8 @@ declare function push(dir: string, opts?: {
1356
1402
  state: string | null;
1357
1403
  alreadyUploaded: boolean;
1358
1404
  }>;
1405
+ /** Extract a downloaded bundle into `dir` (paths sanitized, executable bit kept). */
1406
+ declare function extractBundle(bundle: Buffer, dir: string): number;
1359
1407
  declare function pull(slugRef: string, target?: string, options?: WorldsClientOptions): Promise<{
1360
1408
  slug: string;
1361
1409
  dir: string;
@@ -1634,9 +1682,9 @@ declare function parseTransform(name: string): Transform;
1634
1682
  declare function applyTransforms(value: string | number, chain: readonly string[]): string;
1635
1683
 
1636
1684
  /**
1637
- * `queryRows(slug, entity, {where, resolve, limit, offset})` — the rows of
1638
- * one entity that match a predicate, from
1639
- * `GET /api/public/worlds/{slug}/data?entity=&where=&limit=&offset=&resolve=`.
1685
+ * `queryRows(slug[@ref], entity, {where, resolve, limit, offset})` — the rows
1686
+ * of one entity that match a predicate, from
1687
+ * `GET /api/public/worlds/{slug}/data?ref=&entity=&where=&limit=&offset=&resolve=`.
1640
1688
  * `where` is field → value, or field → list of values (any of); values match
1641
1689
  * the STORED form as given. With `resolve: true` the values are plaintext and
1642
1690
  * the runtime maps each to its stored form under the world's `[redact]`
@@ -1744,11 +1792,13 @@ type WorldQueryAcrossResult = {
1744
1792
  entityCounts: Record<string, number>;
1745
1793
  snapshot: WorldQuerySnapshot | null;
1746
1794
  };
1747
- /** The query string the route reads; `where` travels as URL-encoded JSON. */
1748
- declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions): string;
1749
- /** The world's head version, queried. The route reads the head only, so a
1750
- * `slug@ref` is refused rather than silently served as the head. With
1751
- * `across: true` the answer is the groups shape. */
1795
+ /** The query string the route reads; `where` travels as URL-encoded JSON and
1796
+ * `ref` (the `@ref` of `slug@ref`) picks the version. */
1797
+ declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions, ref?: string): string;
1798
+ /** One version of the world, queried: the main tip for a bare slug, or the
1799
+ * version `slug@ref` names (branch, tag, semver pin or hash prefix — the
1800
+ * `bench pull` grammar; a ref nothing answers to is the platform's 404, never
1801
+ * the head). With `across: true` the answer is the groups shape. */
1752
1802
  declare function queryRows(slug: string, entity: string, opts: WorldQueryAcrossOptions, options?: WorldsClientOptions): Promise<WorldQueryAcrossResult>;
1753
1803
  declare function queryRows(slug: string, entity: string, opts?: WorldQueryOptions, options?: WorldsClientOptions): Promise<WorldQueryResult>;
1754
1804
 
@@ -1956,7 +2006,11 @@ declare function captureToolCalls<T extends ToolFunctions>(tools: T, sink: ToolC
1956
2006
  source?: string;
1957
2007
  }): T;
1958
2008
  /** What a TOOL observation carries, as `GET /api/public/observations` and
1959
- * `GET /api/public/sessions/{id}?includeIO=true` return it. */
2009
+ * `GET /api/public/sessions/{id}?includeIO=true` return it. Both routes decode
2010
+ * stored JSON text once on the way out (`parseIoAsJson` defaults to true on the
2011
+ * v1 route; the session route renders with the same default), so `input` and
2012
+ * `output` arrive as the values the tool saw — an object, or a string when the
2013
+ * tool really produced text. Nothing here parses them again. */
1960
2014
  type ObservationLike = {
1961
2015
  id?: string;
1962
2016
  traceId?: string | null;
@@ -1978,8 +2032,10 @@ type ObservationConversion = {
1978
2032
  /**
1979
2033
  * TOOL observations → tool-call records: `name` is the tool, `input` the args,
1980
2034
  * `output` the result, `startTime` the time, `trace:<traceId>/<id>` the source.
1981
- * A serialized `input`/`output` (the SDK stores JSON text) is parsed back;
1982
- * an `input` that is not an object leaves `args` empty rather than guessed.
2035
+ * `input`/`output` arrive from the public API already decoded (it parses the
2036
+ * stored text once), so they are taken as they are: a string `output` stays a
2037
+ * string even when it looks like JSON; an `input` that is not an object leaves
2038
+ * `args` empty rather than guessed.
1983
2039
  * Only `type: "TOOL"` converts. With `tools` (the world's operation names) an
1984
2040
  * observation for any other tool is counted in `unknownTools`, not converted.
1985
2041
  * An `ERROR`-level observation converts with `error` set, so ingest counts it
@@ -2084,6 +2140,97 @@ declare function ingestToolCalls(world: string, records: unknown[], options?: In
2084
2140
  /** The TOOL observations of one session, every trace's, from `GET /api/public/sessions/{id}?includeIO=true`. */
2085
2141
  declare function sessionToolObservations(sessionId: string, options?: WorldsClientOptions): Promise<ObservationLike[]>;
2086
2142
 
2143
+ /**
2144
+ * The CLI sandbox: a server-side workspace opened on a READY version of a
2145
+ * world (`/workspace/env` in the console agent's sandbox), edited and run
2146
+ * there, and committed straight into the version service — the source
2147
+ * never lands on the caller's disk. One client under both `gateway worlds
2148
+ * sandbox …` and `gateway bench sandbox …`; the Python twin is
2149
+ * `gatewaysdk.benchmark_hub.sandbox.WorldSandboxClient`.
2150
+ */
2151
+ /** Mirrors `SandboxSummaryResponse` (web/features/public-api/types/world-sandboxes.ts). */
2152
+ type SandboxSummary = {
2153
+ sandboxId: string;
2154
+ slug: string;
2155
+ containerId: string;
2156
+ /** The version the next commit is validated against; advances on commit. */
2157
+ baseVersionId: string;
2158
+ status: "open" | "closed";
2159
+ lastCommitVersionId: string | null;
2160
+ createdAt: string;
2161
+ };
2162
+ type SandboxOpened = SandboxSummary & {
2163
+ baseContentHash: string;
2164
+ branch: string;
2165
+ dataSnapshotId: string | null;
2166
+ fileCount: number;
2167
+ workdir: string;
2168
+ };
2169
+ type SandboxExecResult = {
2170
+ exitCode: number;
2171
+ stdout: string;
2172
+ stderr: string;
2173
+ timedOut: boolean;
2174
+ truncated: boolean;
2175
+ durationMs: number;
2176
+ };
2177
+ type SandboxChanges = {
2178
+ added: string[];
2179
+ modified: string[];
2180
+ removed: string[];
2181
+ };
2182
+ type SandboxCheckResult = {
2183
+ ok: boolean;
2184
+ contentHash: string | null;
2185
+ noChange: boolean;
2186
+ fileCount: number;
2187
+ changes: SandboxChanges;
2188
+ warnings: string[];
2189
+ error: string | null;
2190
+ };
2191
+ type SandboxCommitResult = {
2192
+ versionId: string;
2193
+ contentHash: string;
2194
+ branch: string;
2195
+ deduped: boolean;
2196
+ noChange: boolean;
2197
+ changes: SandboxChanges;
2198
+ };
2199
+ /** `slug` or `slug@ref` → the open body; a bare slug opens the latest READY version. */
2200
+ declare function parseSlugRef(slugRef: string): {
2201
+ slug: string;
2202
+ ref?: string;
2203
+ };
2204
+ declare class WorldSandboxClient {
2205
+ private readonly options;
2206
+ constructor(options?: WorldsClientOptions);
2207
+ open(target: {
2208
+ slug: string;
2209
+ ref?: string;
2210
+ }): Promise<SandboxOpened>;
2211
+ status(sandboxId: string): Promise<SandboxSummary>;
2212
+ read(sandboxId: string, filePath: string): Promise<{
2213
+ path: string;
2214
+ size: number;
2215
+ bytes: Buffer;
2216
+ }>;
2217
+ write(sandboxId: string, filePath: string, bytes: Buffer): Promise<{
2218
+ path: string;
2219
+ size: number;
2220
+ }>;
2221
+ exec(sandboxId: string, input: {
2222
+ command: string;
2223
+ cwd?: string;
2224
+ timeoutMs?: number;
2225
+ }): Promise<SandboxExecResult>;
2226
+ check(sandboxId: string): Promise<SandboxCheckResult>;
2227
+ commit(sandboxId: string, input: {
2228
+ message: string;
2229
+ branch?: string;
2230
+ }): Promise<SandboxCommitResult>;
2231
+ close(sandboxId: string): Promise<SandboxSummary>;
2232
+ }
2233
+
2087
2234
  type WorldsClientOptions = {
2088
2235
  host?: string;
2089
2236
  publicKey?: string;
@@ -2268,5 +2415,12 @@ declare class WorldSet {
2268
2415
  * (`tasks/<name>/task.toml`), so it needs no bundle download.
2269
2416
  */
2270
2417
  declare function openWorld(slugRef: string, options?: WorldsClientOptions): Promise<WorldSet>;
2418
+ /**
2419
+ * Resolve `slug` at one pinned READY `versionId` — the task list is THAT
2420
+ * version's, never the branch tip's. `worlds run|ci --version-id` come
2421
+ * through here; a version of another container, a draft or an unknown id
2422
+ * is a 404 from the platform, not a silent fall-through to head.
2423
+ */
2424
+ declare function openWorldVersion(slug: string, versionId: string, options?: WorldsClientOptions): Promise<WorldSet>;
2271
2425
 
2272
- export { ApiError, type BrowserActionEvent, BrowserActionRecorder, type BrowserMode, type BrowserPage, COMPUTER_USE_SPECS, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, type DispatchedRun, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, type GradeResult, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, type ObservationConversion, type ObservationLike, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, type Plaintext, type PlaywrightBrowserLike, type PlaywrightLike, type RedactMode, type RedactPolicy, type Redaction, type ResolvedWorldVersion, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunTaskOptions, type RunTaskSummary, STRIP_PREFIX, SURFACE_KINDS, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, TRANSFORMS, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, type ValidateReport, type ValidatedRun, WHITESPACE, WorldBrowser, type WorldDependency, type WorldDeprecation, type WorldDescription, type WorldEntity, type WorldEntityMapping, type WorldField, type WorldMigrationRefusal, type WorldMigrationReport, type WorldQueryAcrossOptions, type WorldQueryAcrossResult, type WorldQueryCompare, type WorldQueryCompareStatus, type WorldQueryGroup, type WorldQueryOptions, type WorldQueryResult, type WorldQuerySnapshot, type WorldQueryWhere, type WorldRelationship, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionState, type WorldSessionTask, WorldSessionTimeout, WorldSet, type WorldSurfaceKind, WorldSurfaceUnavailable, WorldTask, type WorldTaskCheck, type WorldTaskDetail, type WorldTaskFieldOp, type WorldTaskGrader, type WorldTaskIdRef, type WorldTaskInfo, type WorldTaskPage, type WorldTaskRef, type WorldTaskRubricCriterion, type WorldTaskRubricGrader, type WorldTaskScalar, type WorldTaskSeed, type WorldTaskSpec, type WorldTaskSummary, type WorldTaskValidation, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, attachManifest, attachSession, attachTask, buildSourceTarball, captureToolCalls, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, getRun, getTask, hashForm, ingest, ingestToolCalls, isIncludedInContentHash, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listTaskSessions, listTasks, localTreeState, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, parseToolCallRecord, parseTransform, parseWorldTaskRefs, preserveForm, propose, pull, push, pushSlug, pyText, queryRows, queryRowsSearch, readLocalMeta, readToolCallRecords, redactActionArgs, redactionOf, resolveBrowserMode, roundForm, runSessions, runTask, schemaFromSignature, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, storedForms, surfaceKinds, taskLabel, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };
2426
+ export { ApiError, type BrowserActionEvent, BrowserActionRecorder, type BrowserMode, type BrowserPage, COMPUTER_USE_SPECS, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, type DispatchedRun, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, type GradeResult, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, type ObservationConversion, type ObservationLike, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, type Plaintext, type PlaywrightBrowserLike, type PlaywrightLike, PushSlugConflict, type PushSlugResolution, type RedactMode, type RedactPolicy, type Redaction, type ResolvedWorldVersion, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunTaskOptions, type RunTaskSummary, STRIP_PREFIX, SURFACE_KINDS, type SandboxChanges, type SandboxCheckResult, type SandboxCommitResult, type SandboxExecResult, type SandboxOpened, type SandboxSummary, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, type SlugDeclaration, TRANSFORMS, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, type ValidateReport, type ValidatedRun, WHITESPACE, WorldBrowser, type WorldDependency, type WorldDeprecation, type WorldDescription, type WorldEntity, type WorldEntityMapping, type WorldField, type WorldMigrationRefusal, type WorldMigrationReport, type WorldQueryAcrossOptions, type WorldQueryAcrossResult, type WorldQueryCompare, type WorldQueryCompareStatus, type WorldQueryGroup, type WorldQueryOptions, type WorldQueryResult, type WorldQuerySnapshot, type WorldQueryWhere, type WorldRelationship, WorldSandboxClient, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionState, type WorldSessionTask, WorldSessionTimeout, WorldSet, type WorldSurfaceKind, WorldSurfaceUnavailable, WorldTask, type WorldTaskCheck, type WorldTaskDetail, type WorldTaskFieldOp, type WorldTaskGrader, type WorldTaskIdRef, type WorldTaskInfo, type WorldTaskPage, type WorldTaskRef, type WorldTaskRubricCriterion, type WorldTaskRubricGrader, type WorldTaskScalar, type WorldTaskSeed, type WorldTaskSpec, type WorldTaskSummary, type WorldTaskValidation, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, archiveMode, attachManifest, attachSession, attachTask, buildFileManifest, buildSourceTarball, captureToolCalls, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, extractBundle, getRun, getTask, hashForm, ingest, ingestToolCalls, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listTaskSessions, listTasks, localTreeState, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, openWorldVersion, parseSlugRef, parseToolCallRecord, parseTransform, parseWorldTaskRefs, preserveForm, propose, pull, push, pushSlug, pyText, queryRows, queryRowsSearch, readLocalMeta, readToolCallRecords, redactActionArgs, redactionOf, resolveBrowserMode, resolvePushSlug, roundForm, runSessions, runTask, schemaFromSignature, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, storedForms, surfaceKinds, taskLabel, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };
@@ -587,7 +587,11 @@ type SessionRunReport = {
587
587
  results: SessionRunResult[];
588
588
  /** Mean reward over every task, counting failures as 0. */
589
589
  mean: number;
590
- /** True when `mean >= failUnder` (or no gate was set). */
590
+ /** Tasks that never graded: the session did not open or become ready, the
591
+ * agent threw, or grading failed. Any failure fails the run — a 0 an agent
592
+ * earned and a session that never opened are not the same result. */
593
+ failed: number;
594
+ /** True when no task failed and `mean >= failUnder` (or no gate was set). */
591
595
  passed: boolean;
592
596
  };
593
597
  /**
@@ -1223,8 +1227,10 @@ type RunTaskSummary = {
1223
1227
  evaluationId?: string;
1224
1228
  [extra: string]: unknown;
1225
1229
  };
1226
- /** The report an agent callable may return: a string, or an object with a
1227
- * `report` key (any other keys are kept in `run.json` as-is). */
1230
+ /** The report an agent callable may return: a string, or an object with an
1231
+ * optional string `report` key (any other keys are kept in `run.json` as-is),
1232
+ * or nothing. Anything else is an agent error — a number, a bigint or an
1233
+ * array is never stringified into a graded completion. */
1228
1234
  type TaskRunResult = string | {
1229
1235
  report?: unknown;
1230
1236
  [key: string]: unknown;
@@ -1285,13 +1291,10 @@ declare class GatewayEvalsClient {
1285
1291
  * branch / tag / propose — a faithful port of the Python client
1286
1292
  * (`gatewaysdk/benchmark_hub/client.py` + `_archive.py`).
1287
1293
  *
1288
- * LOCKSTEP WARNING — the content hash is the version's identity and is
1289
- * byte-compatible with Prime Intellect. It now has FOUR implementations that
1290
- * must stay identical: worker `environmentAgent/tar.ts`, web
1291
- * `benchmark-hub/server/benchmarkContentHash.ts`, Python `_archive.py`, and
1292
- * this file. This one is a line-for-line port of the WEB TypeScript
1293
- * implementation (same language, same crypto) — if the rule ever changes,
1294
- * change all four or push identity splits by client.
1294
+ * The content hash is the version's identity and is byte-compatible with
1295
+ * Prime Intellect: `WorldDir.contentHash` (./worldDir.ts) computes it here,
1296
+ * `WorldTree.contentHash` on the platform and `_archive.compute_content_hash`
1297
+ * in the Python SDK; the conformance corpus pins the three to the same bytes.
1295
1298
  *
1296
1299
  * One deliberate refusal, same policy as the web upload path: a bundle with
1297
1300
  * a ROOT `.gitignore` is refused rather than mis-hashed — the Python CLI
@@ -1299,11 +1302,11 @@ declare class GatewayEvalsClient {
1299
1302
  * would produce a wrong, Prime-incompatible hash silently.
1300
1303
  */
1301
1304
  declare const DEFAULT_BRANCH = "main";
1302
- declare function isIncludedInContentHash(relPath: string, includeAllRootFiles: boolean): boolean;
1303
- /** The archive-visible files of a working dir, as sorted relpaths. Throws on
1304
- * a root .gitignore (see the header). */
1305
+ /** The archive-visible files of a working dir, as sorted relpaths
1306
+ * (`WorldDir.archivePaths`). Throws on a root .gitignore (see the header). */
1305
1307
  declare function collectArchiveRelPaths(dir: string): string[];
1306
1308
  declare function computeContentHash(dir: string): string;
1309
+ declare function archiveMode(mode: number): number;
1307
1310
  /** A deterministic .tar.gz of the source files (node's gzip stamps no mtime,
1308
1311
  * matching the Python's mtime=0 gzip). */
1309
1312
  declare function buildSourceTarball(dir: string): Buffer;
@@ -1320,6 +1323,39 @@ declare function readLocalMeta(dir: string): LocalMeta | null;
1320
1323
  * name, else the directory's name — so a tracked checkout never creates a
1321
1324
  * second world named after its folder. */
1322
1325
  declare function pushSlug(dir: string, explicit?: string): string;
1326
+ type SlugDeclaration = {
1327
+ source: string;
1328
+ slug: string;
1329
+ };
1330
+ type PushSlugResolution = {
1331
+ slug: string;
1332
+ /** Where the slug came from (`--slug`, `.gateway metadata`, `benchmark.json`, `pyproject.toml`, `directory name`). */
1333
+ source: string;
1334
+ /** The slug the dir's `.gateway/.env-metadata.json` tracks from an earlier push or pull, if any. */
1335
+ tracked: string | null;
1336
+ /** What the tree itself declares (a caller's benchmark.json, then pyproject.toml), in precedence order. */
1337
+ declared: SlugDeclaration[];
1338
+ /** A declaration the tracked slug does not match — set only when the tracked slug won without `--slug`. */
1339
+ conflict: SlugDeclaration | null;
1340
+ };
1341
+ /** `pushSlug` with its provenance. `declared` are the caller's own slug sources
1342
+ * (e.g. `{ "benchmark.json": "x" }`), consulted before pyproject. A tracked slug
1343
+ * that disagrees with what the tree declares is reported as `conflict` so a
1344
+ * front door can refuse: that is how a directory pushed once with `--slug X`
1345
+ * silently landed every later push on X while its benchmark.json said Y. The
1346
+ * platform's collision suffix (`acme-2` minted for a taken `acme`) is not a
1347
+ * conflict; any other difference is (`acme-e2e` for `acme` was the mix-up). */
1348
+ declare function resolvePushSlug(dir: string, opts?: {
1349
+ explicit?: string;
1350
+ declared?: Record<string, string | null | undefined>;
1351
+ }): PushSlugResolution;
1352
+ /** The refusal a front door raises on `PushSlugResolution.conflict`: both slugs, both sources, every way out. */
1353
+ declare class PushSlugConflict extends Error {
1354
+ readonly dir: string;
1355
+ readonly tracked: string;
1356
+ readonly declared: SlugDeclaration;
1357
+ constructor(dir: string, tracked: string, declared: SlugDeclaration);
1358
+ }
1323
1359
  declare function writeLocalMeta(dir: string, meta: LocalMeta): void;
1324
1360
  declare function snapshotTreeHashes(dir: string): Record<string, string>;
1325
1361
  declare function localTreeState(dir: string): {
@@ -1327,6 +1363,16 @@ declare function localTreeState(dir: string): {
1327
1363
  dirty: string[];
1328
1364
  clean: boolean;
1329
1365
  };
1366
+ /** The rows the platform previews for a pushed DRAFT: the archive set, one
1367
+ * entry per file the content hash covers, so hash, tarball, manifest and
1368
+ * `pull` agree on what the world is. Finalize replaces them with rows
1369
+ * derived from the stored bytes. */
1370
+ declare function buildFileManifest(dir: string): {
1371
+ path: string;
1372
+ isDirectory: boolean;
1373
+ size: number;
1374
+ sha256: string;
1375
+ }[];
1330
1376
  declare function push(dir: string, opts?: {
1331
1377
  slug?: string;
1332
1378
  branch?: string;
@@ -1356,6 +1402,8 @@ declare function push(dir: string, opts?: {
1356
1402
  state: string | null;
1357
1403
  alreadyUploaded: boolean;
1358
1404
  }>;
1405
+ /** Extract a downloaded bundle into `dir` (paths sanitized, executable bit kept). */
1406
+ declare function extractBundle(bundle: Buffer, dir: string): number;
1359
1407
  declare function pull(slugRef: string, target?: string, options?: WorldsClientOptions): Promise<{
1360
1408
  slug: string;
1361
1409
  dir: string;
@@ -1634,9 +1682,9 @@ declare function parseTransform(name: string): Transform;
1634
1682
  declare function applyTransforms(value: string | number, chain: readonly string[]): string;
1635
1683
 
1636
1684
  /**
1637
- * `queryRows(slug, entity, {where, resolve, limit, offset})` — the rows of
1638
- * one entity that match a predicate, from
1639
- * `GET /api/public/worlds/{slug}/data?entity=&where=&limit=&offset=&resolve=`.
1685
+ * `queryRows(slug[@ref], entity, {where, resolve, limit, offset})` — the rows
1686
+ * of one entity that match a predicate, from
1687
+ * `GET /api/public/worlds/{slug}/data?ref=&entity=&where=&limit=&offset=&resolve=`.
1640
1688
  * `where` is field → value, or field → list of values (any of); values match
1641
1689
  * the STORED form as given. With `resolve: true` the values are plaintext and
1642
1690
  * the runtime maps each to its stored form under the world's `[redact]`
@@ -1744,11 +1792,13 @@ type WorldQueryAcrossResult = {
1744
1792
  entityCounts: Record<string, number>;
1745
1793
  snapshot: WorldQuerySnapshot | null;
1746
1794
  };
1747
- /** The query string the route reads; `where` travels as URL-encoded JSON. */
1748
- declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions): string;
1749
- /** The world's head version, queried. The route reads the head only, so a
1750
- * `slug@ref` is refused rather than silently served as the head. With
1751
- * `across: true` the answer is the groups shape. */
1795
+ /** The query string the route reads; `where` travels as URL-encoded JSON and
1796
+ * `ref` (the `@ref` of `slug@ref`) picks the version. */
1797
+ declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions, ref?: string): string;
1798
+ /** One version of the world, queried: the main tip for a bare slug, or the
1799
+ * version `slug@ref` names (branch, tag, semver pin or hash prefix — the
1800
+ * `bench pull` grammar; a ref nothing answers to is the platform's 404, never
1801
+ * the head). With `across: true` the answer is the groups shape. */
1752
1802
  declare function queryRows(slug: string, entity: string, opts: WorldQueryAcrossOptions, options?: WorldsClientOptions): Promise<WorldQueryAcrossResult>;
1753
1803
  declare function queryRows(slug: string, entity: string, opts?: WorldQueryOptions, options?: WorldsClientOptions): Promise<WorldQueryResult>;
1754
1804
 
@@ -1956,7 +2006,11 @@ declare function captureToolCalls<T extends ToolFunctions>(tools: T, sink: ToolC
1956
2006
  source?: string;
1957
2007
  }): T;
1958
2008
  /** What a TOOL observation carries, as `GET /api/public/observations` and
1959
- * `GET /api/public/sessions/{id}?includeIO=true` return it. */
2009
+ * `GET /api/public/sessions/{id}?includeIO=true` return it. Both routes decode
2010
+ * stored JSON text once on the way out (`parseIoAsJson` defaults to true on the
2011
+ * v1 route; the session route renders with the same default), so `input` and
2012
+ * `output` arrive as the values the tool saw — an object, or a string when the
2013
+ * tool really produced text. Nothing here parses them again. */
1960
2014
  type ObservationLike = {
1961
2015
  id?: string;
1962
2016
  traceId?: string | null;
@@ -1978,8 +2032,10 @@ type ObservationConversion = {
1978
2032
  /**
1979
2033
  * TOOL observations → tool-call records: `name` is the tool, `input` the args,
1980
2034
  * `output` the result, `startTime` the time, `trace:<traceId>/<id>` the source.
1981
- * A serialized `input`/`output` (the SDK stores JSON text) is parsed back;
1982
- * an `input` that is not an object leaves `args` empty rather than guessed.
2035
+ * `input`/`output` arrive from the public API already decoded (it parses the
2036
+ * stored text once), so they are taken as they are: a string `output` stays a
2037
+ * string even when it looks like JSON; an `input` that is not an object leaves
2038
+ * `args` empty rather than guessed.
1983
2039
  * Only `type: "TOOL"` converts. With `tools` (the world's operation names) an
1984
2040
  * observation for any other tool is counted in `unknownTools`, not converted.
1985
2041
  * An `ERROR`-level observation converts with `error` set, so ingest counts it
@@ -2084,6 +2140,97 @@ declare function ingestToolCalls(world: string, records: unknown[], options?: In
2084
2140
  /** The TOOL observations of one session, every trace's, from `GET /api/public/sessions/{id}?includeIO=true`. */
2085
2141
  declare function sessionToolObservations(sessionId: string, options?: WorldsClientOptions): Promise<ObservationLike[]>;
2086
2142
 
2143
+ /**
2144
+ * The CLI sandbox: a server-side workspace opened on a READY version of a
2145
+ * world (`/workspace/env` in the console agent's sandbox), edited and run
2146
+ * there, and committed straight into the version service — the source
2147
+ * never lands on the caller's disk. One client under both `gateway worlds
2148
+ * sandbox …` and `gateway bench sandbox …`; the Python twin is
2149
+ * `gatewaysdk.benchmark_hub.sandbox.WorldSandboxClient`.
2150
+ */
2151
+ /** Mirrors `SandboxSummaryResponse` (web/features/public-api/types/world-sandboxes.ts). */
2152
+ type SandboxSummary = {
2153
+ sandboxId: string;
2154
+ slug: string;
2155
+ containerId: string;
2156
+ /** The version the next commit is validated against; advances on commit. */
2157
+ baseVersionId: string;
2158
+ status: "open" | "closed";
2159
+ lastCommitVersionId: string | null;
2160
+ createdAt: string;
2161
+ };
2162
+ type SandboxOpened = SandboxSummary & {
2163
+ baseContentHash: string;
2164
+ branch: string;
2165
+ dataSnapshotId: string | null;
2166
+ fileCount: number;
2167
+ workdir: string;
2168
+ };
2169
+ type SandboxExecResult = {
2170
+ exitCode: number;
2171
+ stdout: string;
2172
+ stderr: string;
2173
+ timedOut: boolean;
2174
+ truncated: boolean;
2175
+ durationMs: number;
2176
+ };
2177
+ type SandboxChanges = {
2178
+ added: string[];
2179
+ modified: string[];
2180
+ removed: string[];
2181
+ };
2182
+ type SandboxCheckResult = {
2183
+ ok: boolean;
2184
+ contentHash: string | null;
2185
+ noChange: boolean;
2186
+ fileCount: number;
2187
+ changes: SandboxChanges;
2188
+ warnings: string[];
2189
+ error: string | null;
2190
+ };
2191
+ type SandboxCommitResult = {
2192
+ versionId: string;
2193
+ contentHash: string;
2194
+ branch: string;
2195
+ deduped: boolean;
2196
+ noChange: boolean;
2197
+ changes: SandboxChanges;
2198
+ };
2199
+ /** `slug` or `slug@ref` → the open body; a bare slug opens the latest READY version. */
2200
+ declare function parseSlugRef(slugRef: string): {
2201
+ slug: string;
2202
+ ref?: string;
2203
+ };
2204
+ declare class WorldSandboxClient {
2205
+ private readonly options;
2206
+ constructor(options?: WorldsClientOptions);
2207
+ open(target: {
2208
+ slug: string;
2209
+ ref?: string;
2210
+ }): Promise<SandboxOpened>;
2211
+ status(sandboxId: string): Promise<SandboxSummary>;
2212
+ read(sandboxId: string, filePath: string): Promise<{
2213
+ path: string;
2214
+ size: number;
2215
+ bytes: Buffer;
2216
+ }>;
2217
+ write(sandboxId: string, filePath: string, bytes: Buffer): Promise<{
2218
+ path: string;
2219
+ size: number;
2220
+ }>;
2221
+ exec(sandboxId: string, input: {
2222
+ command: string;
2223
+ cwd?: string;
2224
+ timeoutMs?: number;
2225
+ }): Promise<SandboxExecResult>;
2226
+ check(sandboxId: string): Promise<SandboxCheckResult>;
2227
+ commit(sandboxId: string, input: {
2228
+ message: string;
2229
+ branch?: string;
2230
+ }): Promise<SandboxCommitResult>;
2231
+ close(sandboxId: string): Promise<SandboxSummary>;
2232
+ }
2233
+
2087
2234
  type WorldsClientOptions = {
2088
2235
  host?: string;
2089
2236
  publicKey?: string;
@@ -2268,5 +2415,12 @@ declare class WorldSet {
2268
2415
  * (`tasks/<name>/task.toml`), so it needs no bundle download.
2269
2416
  */
2270
2417
  declare function openWorld(slugRef: string, options?: WorldsClientOptions): Promise<WorldSet>;
2418
+ /**
2419
+ * Resolve `slug` at one pinned READY `versionId` — the task list is THAT
2420
+ * version's, never the branch tip's. `worlds run|ci --version-id` come
2421
+ * through here; a version of another container, a draft or an unknown id
2422
+ * is a 404 from the platform, not a silent fall-through to head.
2423
+ */
2424
+ declare function openWorldVersion(slug: string, versionId: string, options?: WorldsClientOptions): Promise<WorldSet>;
2271
2425
 
2272
- export { ApiError, type BrowserActionEvent, BrowserActionRecorder, type BrowserMode, type BrowserPage, COMPUTER_USE_SPECS, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, type DispatchedRun, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, type GradeResult, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, type ObservationConversion, type ObservationLike, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, type Plaintext, type PlaywrightBrowserLike, type PlaywrightLike, type RedactMode, type RedactPolicy, type Redaction, type ResolvedWorldVersion, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunTaskOptions, type RunTaskSummary, STRIP_PREFIX, SURFACE_KINDS, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, TRANSFORMS, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, type ValidateReport, type ValidatedRun, WHITESPACE, WorldBrowser, type WorldDependency, type WorldDeprecation, type WorldDescription, type WorldEntity, type WorldEntityMapping, type WorldField, type WorldMigrationRefusal, type WorldMigrationReport, type WorldQueryAcrossOptions, type WorldQueryAcrossResult, type WorldQueryCompare, type WorldQueryCompareStatus, type WorldQueryGroup, type WorldQueryOptions, type WorldQueryResult, type WorldQuerySnapshot, type WorldQueryWhere, type WorldRelationship, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionState, type WorldSessionTask, WorldSessionTimeout, WorldSet, type WorldSurfaceKind, WorldSurfaceUnavailable, WorldTask, type WorldTaskCheck, type WorldTaskDetail, type WorldTaskFieldOp, type WorldTaskGrader, type WorldTaskIdRef, type WorldTaskInfo, type WorldTaskPage, type WorldTaskRef, type WorldTaskRubricCriterion, type WorldTaskRubricGrader, type WorldTaskScalar, type WorldTaskSeed, type WorldTaskSpec, type WorldTaskSummary, type WorldTaskValidation, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, attachManifest, attachSession, attachTask, buildSourceTarball, captureToolCalls, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, getRun, getTask, hashForm, ingest, ingestToolCalls, isIncludedInContentHash, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listTaskSessions, listTasks, localTreeState, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, parseToolCallRecord, parseTransform, parseWorldTaskRefs, preserveForm, propose, pull, push, pushSlug, pyText, queryRows, queryRowsSearch, readLocalMeta, readToolCallRecords, redactActionArgs, redactionOf, resolveBrowserMode, roundForm, runSessions, runTask, schemaFromSignature, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, storedForms, surfaceKinds, taskLabel, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };
2426
+ export { ApiError, type BrowserActionEvent, BrowserActionRecorder, type BrowserMode, type BrowserPage, COMPUTER_USE_SPECS, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, type DispatchedRun, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, type GradeResult, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, type ObservationConversion, type ObservationLike, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, type Plaintext, type PlaywrightBrowserLike, type PlaywrightLike, PushSlugConflict, type PushSlugResolution, type RedactMode, type RedactPolicy, type Redaction, type ResolvedWorldVersion, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunTaskOptions, type RunTaskSummary, STRIP_PREFIX, SURFACE_KINDS, type SandboxChanges, type SandboxCheckResult, type SandboxCommitResult, type SandboxExecResult, type SandboxOpened, type SandboxSummary, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, type SlugDeclaration, TRANSFORMS, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, type ValidateReport, type ValidatedRun, WHITESPACE, WorldBrowser, type WorldDependency, type WorldDeprecation, type WorldDescription, type WorldEntity, type WorldEntityMapping, type WorldField, type WorldMigrationRefusal, type WorldMigrationReport, type WorldQueryAcrossOptions, type WorldQueryAcrossResult, type WorldQueryCompare, type WorldQueryCompareStatus, type WorldQueryGroup, type WorldQueryOptions, type WorldQueryResult, type WorldQuerySnapshot, type WorldQueryWhere, type WorldRelationship, WorldSandboxClient, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionState, type WorldSessionTask, WorldSessionTimeout, WorldSet, type WorldSurfaceKind, WorldSurfaceUnavailable, WorldTask, type WorldTaskCheck, type WorldTaskDetail, type WorldTaskFieldOp, type WorldTaskGrader, type WorldTaskIdRef, type WorldTaskInfo, type WorldTaskPage, type WorldTaskRef, type WorldTaskRubricCriterion, type WorldTaskRubricGrader, type WorldTaskScalar, type WorldTaskSeed, type WorldTaskSpec, type WorldTaskSummary, type WorldTaskValidation, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, archiveMode, attachManifest, attachSession, attachTask, buildFileManifest, buildSourceTarball, captureToolCalls, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, extractBundle, getRun, getTask, hashForm, ingest, ingestToolCalls, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listTaskSessions, listTasks, localTreeState, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, openWorldVersion, parseSlugRef, parseToolCallRecord, parseTransform, parseWorldTaskRefs, preserveForm, propose, pull, push, pushSlug, pyText, queryRows, queryRowsSearch, readLocalMeta, readToolCallRecords, redactActionArgs, redactionOf, resolveBrowserMode, resolvePushSlug, roundForm, runSessions, runTask, schemaFromSignature, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, storedForms, surfaceKinds, taskLabel, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };