@withgateway/sdk 0.3.1 → 0.3.3

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 (129) hide show
  1. package/README.md +4 -3
  2. package/dist/cli.js +2880 -2032
  3. package/dist/cli.js.map +1 -1
  4. package/dist/cli.mjs +2982 -2135
  5. package/dist/cli.mjs.map +1 -1
  6. package/dist/files/index.d.mts +1 -1
  7. package/dist/files/index.d.ts +1 -1
  8. package/dist/files/index.js +180 -41
  9. package/dist/files/index.js.map +1 -1
  10. package/dist/files/index.mjs +172 -35
  11. package/dist/files/index.mjs.map +1 -1
  12. package/dist/{index-CBqbB_0J.d.ts → index-DUHmS74p.d.ts} +1 -1
  13. package/dist/{index-D-AMnAMa.d.mts → index-mJhG3vZU.d.mts} +1 -1
  14. package/dist/index.d.mts +4 -4
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +1309 -540
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +1287 -532
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/{media-CbcAfQvd.d.mts → media-BIApiPzS.d.mts} +21 -2
  21. package/dist/{media-CbcAfQvd.d.ts → media-BIApiPzS.d.ts} +21 -2
  22. package/dist/traces/index.d.mts +1 -1
  23. package/dist/traces/index.d.ts +1 -1
  24. package/dist/traces/index.js +177 -38
  25. package/dist/traces/index.js.map +1 -1
  26. package/dist/traces/index.mjs +169 -32
  27. package/dist/traces/index.mjs.map +1 -1
  28. package/dist/tracing/index.d.mts +2 -2
  29. package/dist/tracing/index.d.ts +2 -2
  30. package/dist/tracing/index.js +69 -13
  31. package/dist/tracing/index.js.map +1 -1
  32. package/dist/tracing/index.mjs +69 -13
  33. package/dist/tracing/index.mjs.map +1 -1
  34. package/dist/worlds/index.d.mts +249 -120
  35. package/dist/worlds/index.d.ts +249 -120
  36. package/dist/worlds/index.js +1240 -484
  37. package/dist/worlds/index.js.map +1 -1
  38. package/dist/worlds/index.mjs +1231 -476
  39. package/dist/worlds/index.mjs.map +1 -1
  40. package/package.json +1 -1
  41. package/runtime/gatewaysdk/environment/_bundle.py +2 -27
  42. package/runtime/gatewaysdk/environment/_materialize.py +49 -69
  43. package/runtime/gatewaysdk/environment/_world.py +122 -197
  44. package/runtime/gatewaysdk/environment/backing.py +137 -0
  45. package/runtime/gatewaysdk/environment/core.py +1 -1
  46. package/runtime/gatewaysdk/environment/legacy_sqlite.py +301 -0
  47. package/runtime/gatewaysdk/environment/reward_keys.py +25 -0
  48. package/runtime/gatewaysdk/environment/runtime.py +8 -13
  49. package/runtime/gatewaysdk/environment/schema/__init__.py +4 -4
  50. package/runtime/gatewaysdk/environment/schema/admin_routes.py +86 -0
  51. package/runtime/gatewaysdk/environment/schema/api.py +266 -514
  52. package/runtime/gatewaysdk/environment/schema/batch.py +42 -37
  53. package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +17 -5
  54. package/runtime/gatewaysdk/environment/schema/call_log.py +291 -0
  55. package/runtime/gatewaysdk/environment/schema/call_redaction.py +344 -0
  56. package/runtime/gatewaysdk/environment/schema/compiler.py +334 -158
  57. package/runtime/gatewaysdk/environment/schema/conform.py +8 -12
  58. package/runtime/gatewaysdk/environment/schema/connector.py +27 -62
  59. package/runtime/gatewaysdk/environment/schema/data.py +50 -207
  60. package/runtime/gatewaysdk/environment/schema/database/__init__.py +24 -0
  61. package/runtime/gatewaysdk/environment/schema/database/audit.py +121 -0
  62. package/runtime/gatewaysdk/environment/schema/database/base.py +995 -0
  63. package/runtime/gatewaysdk/environment/schema/database/budget.py +33 -0
  64. package/runtime/gatewaysdk/environment/schema/database/connections.py +101 -0
  65. package/runtime/gatewaysdk/environment/schema/database/engines.py +8 -0
  66. package/runtime/gatewaysdk/environment/schema/database/guard.py +208 -0
  67. package/runtime/gatewaysdk/environment/schema/database/ingest.py +154 -0
  68. package/runtime/gatewaysdk/environment/schema/database/matching.py +58 -0
  69. package/runtime/gatewaysdk/environment/schema/database/provenance.py +30 -0
  70. package/runtime/gatewaysdk/environment/schema/database/rows.py +53 -0
  71. package/runtime/gatewaysdk/environment/schema/database/runtime_rows.py +39 -0
  72. package/runtime/gatewaysdk/environment/schema/database/sqlite.py +367 -0
  73. package/runtime/gatewaysdk/environment/schema/domain_migration.py +236 -0
  74. package/runtime/gatewaysdk/environment/schema/envelope.py +169 -0
  75. package/runtime/gatewaysdk/environment/schema/extract.py +6 -13
  76. package/runtime/gatewaysdk/environment/schema/grading.py +45 -30
  77. package/runtime/gatewaysdk/environment/schema/handler_errors.py +142 -12
  78. package/runtime/gatewaysdk/environment/schema/host.py +158 -250
  79. package/runtime/gatewaysdk/environment/schema/lanes.py +53 -0
  80. package/runtime/gatewaysdk/environment/schema/local.py +44 -71
  81. package/runtime/gatewaysdk/environment/schema/mapping.py +5 -25
  82. package/runtime/gatewaysdk/environment/schema/openapi_import.py +112 -73
  83. package/runtime/gatewaysdk/environment/schema/openapi_paging.py +147 -0
  84. package/runtime/gatewaysdk/environment/schema/openapi_payloads.py +288 -0
  85. package/runtime/gatewaysdk/environment/schema/openapi_routes.py +97 -102
  86. package/runtime/gatewaysdk/environment/schema/openapi_schemas.py +113 -30
  87. package/runtime/gatewaysdk/environment/schema/platform.py +123 -171
  88. package/runtime/gatewaysdk/environment/schema/platform_import.py +2 -3
  89. package/runtime/gatewaysdk/environment/schema/platform_query.py +61 -5
  90. package/runtime/gatewaysdk/environment/schema/primary_key.py +61 -0
  91. package/runtime/gatewaysdk/environment/schema/proof.py +19 -12
  92. package/runtime/gatewaysdk/environment/schema/runtime.py +77 -160
  93. package/runtime/gatewaysdk/environment/schema/served_names.py +58 -0
  94. package/runtime/gatewaysdk/environment/schema/session_files.py +166 -0
  95. package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +2 -2
  96. package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +19 -11
  97. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/ROWS.md +29 -3
  98. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +14 -14
  99. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +12 -12
  100. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +3 -2
  101. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/gotchas.md +15 -0
  102. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/openapi-import.md +50 -21
  103. package/runtime/gatewaysdk/environment/schema/slack.py +4 -8
  104. package/runtime/gatewaysdk/environment/schema/snapshot.py +385 -129
  105. package/runtime/gatewaysdk/environment/schema/store_contract.py +8 -14
  106. package/runtime/gatewaysdk/environment/schema/tasks.py +140 -55
  107. package/runtime/gatewaysdk/environment/schema/tools_world.py +110 -87
  108. package/runtime/gatewaysdk/environment/schema/ui.py +24 -5
  109. package/runtime/gatewaysdk/environment/schema/ui_static/app.js +100 -130
  110. package/runtime/gatewaysdk/environment/schema/ui_static/index.html +1 -8
  111. package/runtime/gatewaysdk/environment/schema/validation.py +166 -40
  112. package/runtime/gatewaysdk/environment/schema/workers.py +142 -57
  113. package/runtime/gatewaysdk/environment/schema/world_sql.py +81 -0
  114. package/runtime/gatewaysdk/environment/schema/world_tests.py +71 -39
  115. package/runtime/gatewaysdk/environment/score.py +57 -0
  116. package/runtime/gatewaysdk/environment/secret_values.py +36 -0
  117. package/runtime/gatewaysdk/environment/world.py +42 -3
  118. package/runtime/gatewaysdk/environment/world_session_contract.py +32 -5
  119. package/skills/benchmarks-getting-started/SKILL.md +2 -2
  120. package/skills/connector-schema-authoring/SKILL.md +19 -11
  121. package/skills/connector-schema-authoring/connector-worlds.md +13 -4
  122. package/skills/connector-schema-authoring/world-schema.md +103 -51
  123. package/skills/world-data-ingestion/ROWS.md +29 -3
  124. package/skills/world-data-ingestion/SKILL.md +14 -14
  125. package/skills/worlds-getting-started/SKILL.md +12 -12
  126. package/skills/worlds-getting-started/references/cli-mcp-map.md +3 -2
  127. package/skills/worlds-getting-started/references/gotchas.md +15 -0
  128. package/skills/worlds-getting-started/references/openapi-import.md +50 -21
  129. package/runtime/gatewaysdk/environment/schema/store.py +0 -1013
@@ -1,5 +1,5 @@
1
- import { i as MediaUploader, c as PlatformMethod } from '../media-CbcAfQvd.mjs';
2
- export { P as PLATFORM_TIMEOUT_DEFAULT_MS, a as PLATFORM_TIMEOUT_ENV, b as PlatformEndpoint, d as PlatformReply, e as PlatformTransport, T as TransportCause, U as UnreachableError, p as platformTimeoutMs } from '../media-CbcAfQvd.mjs';
1
+ import { i as MediaUploader, R as RetryPolicy, c as PlatformMethod } from '../media-BIApiPzS.mjs';
2
+ export { P as PLATFORM_TIMEOUT_DEFAULT_MS, a as PLATFORM_TIMEOUT_ENV, b as PlatformEndpoint, d as PlatformReply, e as PlatformTransport, T as TransportCause, U as UnreachableError, p as platformTimeoutMs } from '../media-BIApiPzS.mjs';
3
3
 
4
4
  /**
5
5
  * A HOSTED BROWSER THAT COMES BACK. A World Host session's browser is a pool
@@ -698,6 +698,70 @@ declare function validateTask(taskId: string, target?: {
698
698
  versionId?: string;
699
699
  }, options?: WorldsClientOptions): Promise<WorldTaskValidation>;
700
700
 
701
+ /**
702
+ * A world's grade as the SDK reads it, by the one score rule every grader
703
+ * answers by: a finite number from 0 to 1, a passed check 1, a failed one 0,
704
+ * null ungraded. The World Host's twin is `gatewaysdk/environment/score.py`;
705
+ * both are pinned by `gatewaysdk/fixtures/tasks/grade-vectors.json`.
706
+ */
707
+ declare const messageOf: (error: unknown) => string;
708
+ type GradeResult = {
709
+ reward: number | null;
710
+ rewards: Record<string, number>;
711
+ /** Why there is no reward: `no grader` on an exploratory session. */
712
+ reason?: string;
713
+ /** Why this world could not grade; the task's grade is then that error. */
714
+ error?: string;
715
+ /** The task's cross-world verifiers anchored on this session, by name:
716
+ * each its own reward and named rewards, or `error` when it could not
717
+ * grade (evidence missing, verify.py failed) — null, never zero. */
718
+ verifiers?: Record<string, VerifierGrade>;
719
+ raw: unknown;
720
+ };
721
+ type VerifierGrade = {
722
+ reward: number | null;
723
+ rewards: Record<string, number>;
724
+ error?: string;
725
+ };
726
+ declare class Score {
727
+ static readonly RULE = "a score is a number from 0 to 1";
728
+ static admits(value: number): boolean;
729
+ /** Every number among `scores` that is not a score, as `'<key>' = <value>`
730
+ * and the rule, or null when all of them are. Pairs, not a map, so that no
731
+ * key hides another. */
732
+ static problem(scores: Iterable<[string, unknown]>): string | null;
733
+ }
734
+ /** A world's grade that is never filed: it is not an object, a number in it
735
+ * is not a score (a World Host older than the rule), a check is named both
736
+ * beside and inside its rewards, or its rewards or verifiers are not objects
737
+ * by name. */
738
+ declare class GradeRefused extends Error {
739
+ readonly name = "GradeRefused";
740
+ }
741
+ declare class GradePayload {
742
+ /** A grade payload's numbers, checked: every number in it must be a score,
743
+ * and its rewards and verifiers objects by name, or the grade is refused; a
744
+ * cross-world verifier's grade that breaks either rule is that verifier's
745
+ * error, the way the World Host answers one that could not grade. */
746
+ static read(raw: unknown): Omit<GradeResult, "raw">;
747
+ /** A world whose grade call failed (the platform refused it, the host had
748
+ * lost the session): that world's error, never a score. */
749
+ static failedCall(error: unknown): GradeResult;
750
+ private static problem;
751
+ private static twice;
752
+ private static verifiersProblem;
753
+ private static scores;
754
+ private static isRecord;
755
+ private static objectOrAbsent;
756
+ private static record;
757
+ /** `reward`, and every numeric key under `rewards` (the host's shape) or at
758
+ * the top level (a bundled verifier's). */
759
+ private static numbers;
760
+ private static verifiers;
761
+ private static verifier;
762
+ private static failed;
763
+ }
764
+
701
765
  /**
702
766
  * The three shapes a task reaches `openSession` in — a bundled scenario's
703
767
  * name, a stored task's `{ id, version? }`, an inline spec — and how each is
@@ -713,6 +777,20 @@ declare const taskLabel: (task: WorldTaskRef, info?: WorldSessionTask | null) =>
713
777
  /** A task given to `openSession` must be one of the three shapes. */
714
778
  declare const assertTaskRef: (task: WorldTaskRef) => void;
715
779
 
780
+ declare class WorldSessionTimeout extends Error {
781
+ }
782
+ declare class WorldSessionCallError extends Error {
783
+ }
784
+ /** The session ended before it was ready: it FAILED to open, or was STOPPED.
785
+ * `code` is the platform's when it named one; `browser_capacity` and
786
+ * `host_unavailable` are worth opening again. */
787
+ declare class WorldSessionOpenFailed extends WorldSessionCallError {
788
+ readonly sessionId: string;
789
+ readonly state: string;
790
+ readonly code: string | null;
791
+ constructor(sessionId: string, state: string, code: string | null, reason: string | null);
792
+ }
793
+
716
794
  /**
717
795
  * LIVE WORLD SESSIONS from TypeScript: your agent, the platform's container.
718
796
  *
@@ -957,6 +1035,11 @@ type WorldSessionState = {
957
1035
  * schema worlds are the supported shape), with what to run instead. Empty
958
1036
  * for a schema world; absent on platforms that predate the notice. */
959
1037
  deprecations?: WorldDeprecation[];
1038
+ /** Why a FAILED session failed to open, when the platform named it. */
1039
+ failure?: {
1040
+ code: string | null;
1041
+ message: string;
1042
+ } | null;
960
1043
  };
961
1044
  /** One notice a worlds-path answer carries: a deprecated shape or layout
962
1045
  * and the command that replaces it. A retired shape is refused instead,
@@ -966,22 +1049,7 @@ type WorldDeprecation = {
966
1049
  message: string;
967
1050
  replacement: string;
968
1051
  };
969
- type GradeResult = {
970
- reward: number | null;
971
- rewards: Record<string, number>;
972
- /** Why there is no reward: `no grader` on an exploratory session. */
973
- reason?: string;
974
- /** The task's cross-world verifiers anchored on this session, by name:
975
- * each its own reward and named rewards, or `error` when it could not
976
- * grade (evidence missing, verify.py failed) — null, never zero. */
977
- verifiers?: Record<string, VerifierGrade>;
978
- raw: unknown;
979
- };
980
- type VerifierGrade = {
981
- reward: number | null;
982
- rewards: Record<string, number>;
983
- error?: string;
984
- };
1052
+
985
1053
  declare const modelToolName: (name: string) => string;
986
1054
  /**
987
1055
  * Turn a world's Python signature into a JSON schema the model can call.
@@ -1001,10 +1069,6 @@ declare function schemaFromSignature(spec: WorldToolSpec): {
1001
1069
  parameters: Record<string, unknown>;
1002
1070
  };
1003
1071
  };
1004
- declare class WorldSessionTimeout extends Error {
1005
- }
1006
- declare class WorldSessionCallError extends Error {
1007
- }
1008
1072
  declare class WorldSession {
1009
1073
  readonly sessionId: string;
1010
1074
  private current;
@@ -1076,8 +1140,11 @@ declare class WorldSession {
1076
1140
  /** The session's latest platform state (one request, no waiting). */
1077
1141
  status(): Promise<WorldSessionState>;
1078
1142
  /**
1079
- * Wait until the container is warm — meaning the process inside it has
1080
- * asked the platform for work, not merely that a job was accepted.
1143
+ * Wait until the session answers calls: a World Host holds it, or the
1144
+ * process inside a pod has asked the platform for work. Throws
1145
+ * `WorldSessionOpenFailed` (with the platform's reason) when it ended
1146
+ * first, and `WorldSessionTimeout` when `timeoutMs` (default ten minutes)
1147
+ * ran out while it was still starting.
1081
1148
  */
1082
1149
  ready(opts?: {
1083
1150
  timeoutMs?: number;
@@ -1119,7 +1186,9 @@ declare class WorldSession {
1119
1186
  * calls); assertions and python graders ignore it. `worlds` names the
1120
1187
  * task's other sessions by alias (`{alias: sessionId}`): the platform
1121
1188
  * reads each one's evidence and hands it to the cross-world verifiers
1122
- * anchored on this session, whose grades come back under `verifiers`. */
1189
+ * anchored on this session, whose grades come back under `verifiers`. A
1190
+ * score that is not a number from 0 to 1 is refused by key and value
1191
+ * (`GradeRefused`); a verifier's is that verifier's `error`. */
1123
1192
  grade(opts?: {
1124
1193
  timeoutMs?: number;
1125
1194
  report?: string;
@@ -1693,9 +1762,7 @@ type ListSessionsFilter = {
1693
1762
  declare function listSessions(filter?: ListSessionsFilter, options?: WorldsClientOptions): Promise<WorldSessionListItem[]>;
1694
1763
 
1695
1764
  /**
1696
- * THE NUMBERS AND WORDS A WORLD SESSION PROMISES — the TypeScript SDK twin.
1697
- *
1698
- * The platform declares them once in
1765
+ * The platform declares these once in
1699
1766
  * `gateway/packages/shared/src/server/services/worldSessionContract.ts`; this
1700
1767
  * module and `gatewaysdk/environment/world_session_contract.py` repeat them, and each is
1701
1768
  * pinned to `conformance/world-sessions.json` by a test, so the route, the
@@ -1736,6 +1803,8 @@ declare class WorldCallTooLarge extends Error {
1736
1803
  /** Measure a call body the way the route will and refuse an oversized one
1737
1804
  * before it leaves the machine. Returns the serialized body. */
1738
1805
  declare function serializeCallBody(body: unknown): string;
1806
+ /** What `session open` adds when its wait ran out: the session keeps opening. */
1807
+ declare const stillStartingHint: (sessionId: string) => string;
1739
1808
  /** The line `session status` prints when an unpinned session has under
1740
1809
  * `IDLE_WARNING_MINUTES` left, else null. `now` is for tests. */
1741
1810
  declare function idleWarning(idleExpiresAt: string | null | undefined, now?: Date): string | null;
@@ -1835,22 +1904,28 @@ type LiveTaskSession = {
1835
1904
  * is listed under `ungraded` (a verifier as `x.<name>`), never counted as
1836
1905
  * 0. `rewards` flattens each world's named rewards as `<alias>.<key>`
1837
1906
  * beside `<alias>` for the world's own reward, and a verifier's as
1838
- * `x.<name>` / `x.<name>.<key>`. */
1907
+ * `x.<name>` / `x.<name>.<key>`. `errors` names, by key, each world or
1908
+ * verifier that could not grade and each key two rewards claimed; any error
1909
+ * makes `reward` null, never the mean of the rest. */
1839
1910
  type TaskGrade = {
1840
1911
  reward: number | null;
1841
1912
  rewards: Record<string, number>;
1842
1913
  worlds: Record<string, GradeResult>;
1843
1914
  ungraded: string[];
1844
1915
  verifiers: Record<string, VerifierGrade>;
1916
+ errors: Record<string, string>;
1845
1917
  };
1846
- /** A cross-world verifier's rewards flatten under `x.<name>`; no alias
1847
- * starts with `x.`. */
1918
+ /** A cross-world verifier's rewards flatten under `x.<name>`. The platform
1919
+ * refuses `x` and `x.<…>` as a world alias, and the fold refuses a key two
1920
+ * rewards claim, so a world's check never scores as a verifier. */
1848
1921
  declare const VERIFIER_REWARD_PREFIX = "x.";
1849
1922
  /** Every world's call log, keyed by alias. */
1850
1923
  type TaskExport = Record<string, WorldSessionCall[]>;
1851
1924
  /** Combine per-world grades into the task's. Pure, so the CLI and the tests
1852
1925
  * share it with `TaskSessions.grade()`. */
1853
1926
  declare function aggregateTaskGrade(worlds: Record<string, GradeResult>): TaskGrade;
1927
+ /** Every error of a task's grade on one line (`<key>: <why>; …`), or null. */
1928
+ declare function taskGradeError(grade: TaskGrade): string | null;
1854
1929
  declare class TaskSessions {
1855
1930
  /** The stored task's id, or null for a task given as a spec. */
1856
1931
  readonly taskId: string | null;
@@ -1897,7 +1972,9 @@ declare class TaskSessions {
1897
1972
  * agent's own account of the whole investigation) goes to every world's
1898
1973
  * judge; a world graded by assertions or python ignores it. Each grade
1899
1974
  * names the task's other sessions by alias, so the cross-world verifiers
1900
- * anchored on that world can read them. */
1975
+ * anchored on that world can read them. A world whose grade call fails is
1976
+ * that world's error: the task's grade names it and keeps every other
1977
+ * world's grade. */
1901
1978
  grade(opts?: {
1902
1979
  timeoutMs?: number;
1903
1980
  report?: string;
@@ -1952,6 +2029,76 @@ declare function attachManifest(manifest: TaskManifest, options?: WorldsClientOp
1952
2029
  * rather than a task spec. */
1953
2030
  declare function isTaskManifest(value: unknown): value is TaskManifest;
1954
2031
 
2032
+ type EvalSample = {
2033
+ exampleId: string;
2034
+ task?: string;
2035
+ rolloutIndex?: number;
2036
+ prompt?: unknown;
2037
+ completion?: unknown;
2038
+ reward?: number;
2039
+ score?: number;
2040
+ correct?: boolean;
2041
+ /** A number, or null for a check that answered nothing; the platform refuses anything else. */
2042
+ rewards?: Record<string, number | null>;
2043
+ info?: Record<string, unknown>;
2044
+ };
2045
+ type CreateEvaluationOptions = {
2046
+ model?: string;
2047
+ /** A set run to file under; the platform refuses a run that does not admit this result. */
2048
+ runId?: string;
2049
+ rolloutsPerExample?: number;
2050
+ metadata?: Record<string, unknown>;
2051
+ /** Keys the filing: a repeated create answers the first evaluation, and every step of it is retried on a gateway
2052
+ * 5xx or no answer, since the platform answers a repeated step with the first one. */
2053
+ idempotencyKey?: string;
2054
+ };
2055
+ type FinalizeEvaluationOptions = {
2056
+ status?: "COMPLETED" | "FAILED";
2057
+ metrics?: Record<string, unknown>;
2058
+ };
2059
+ declare class GatewayEvalsClient {
2060
+ private readonly options;
2061
+ private readonly retry;
2062
+ private readonly keyed;
2063
+ constructor(options?: WorldsClientOptions, retry?: RetryPolicy);
2064
+ createEvaluation(versionId: string, opts?: CreateEvaluationOptions): Promise<string>;
2065
+ pushSamples(evaluationId: string, samples: EvalSample[]): Promise<number>;
2066
+ finalizeEvaluation(evaluationId: string, opts?: FinalizeEvaluationOptions): Promise<string>;
2067
+ private retryFor;
2068
+ }
2069
+
2070
+ type RunTaskSummary = {
2071
+ runId: string;
2072
+ taskId: string | null;
2073
+ taskVersion: number | null;
2074
+ name: string | null;
2075
+ instruction: string;
2076
+ model: string;
2077
+ aliases: string[];
2078
+ reward: number | null;
2079
+ rewards: Record<string, number>;
2080
+ ungraded: string[];
2081
+ agentError: string | null;
2082
+ /** Why the run stopped short of a grade: a world that never came up, an
2083
+ * interrupt. Filed failed with this as its reason. */
2084
+ runError: string | null;
2085
+ /** The grade's errors on one line: a world or verifier that could not
2086
+ * grade, or two rewards under one key. Filed failed with this as its reason. */
2087
+ gradeError: string | null;
2088
+ /** Why the evaluation could not be filed; `filed` is then false. */
2089
+ fileError: string | null;
2090
+ /** The status the platform settled the filed evaluation at; null when nothing was filed. */
2091
+ evaluationStatus: string | null;
2092
+ report: string | null;
2093
+ traced: boolean;
2094
+ runDir: string;
2095
+ durationSeconds: number;
2096
+ notes: Record<string, unknown>;
2097
+ filed: boolean;
2098
+ evaluationId?: string;
2099
+ [extra: string]: unknown;
2100
+ };
2101
+
1955
2102
  declare class TaskRun {
1956
2103
  readonly runId: string;
1957
2104
  readonly instruction: string;
@@ -1977,9 +2124,10 @@ type RunTaskOptions = {
1977
2124
  /** Directory the run's own `<runId>/` folder is created under. Default `"runs"`. */
1978
2125
  outDir?: string;
1979
2126
  /**
1980
- * Initialize tracing when GATEWAY_* credentials are configured. Default `true`.
1981
- * When it cannot start (e.g. the optional `@opentelemetry/*` peers are missing),
1982
- * the run goes on untraced and the process warns once.
2127
+ * Trace the agent's own spans with the host and keys the run's requests use (`options`, then
2128
+ * `GATEWAY_*`). Default `true`. A `GATEWAY_OTLP_ENDPOINT` on another host is followed only with the
2129
+ * environment's own keys. When tracing cannot start (the optional `@opentelemetry/*` peers are
2130
+ * missing, or a redirect would carry other keys), the run goes on untraced and the process warns once.
1983
2131
  */
1984
2132
  trace?: boolean;
1985
2133
  /** File one rollout when the run ends. Default `true`. */
@@ -1992,33 +2140,22 @@ type RunTaskOptions = {
1992
2140
  setRunId?: string;
1993
2141
  options?: WorldsClientOptions;
1994
2142
  };
1995
- type RunTaskSummary = {
1996
- runId: string;
1997
- taskId: string | null;
1998
- taskVersion: number | null;
1999
- name: string | null;
2000
- instruction: string;
2001
- model: string;
2002
- aliases: string[];
2003
- reward: number | null;
2004
- rewards: Record<string, number>;
2005
- ungraded: string[];
2006
- agentError: string | null;
2007
- report: string | null;
2008
- traced: boolean;
2009
- runDir: string;
2010
- durationSeconds: number;
2011
- notes: Record<string, unknown>;
2012
- filed: boolean;
2013
- evaluationId?: string;
2014
- [extra: string]: unknown;
2015
- };
2143
+ /** The line a CLI prints before exiting 1 on a task run: the agent raised,
2144
+ * the run stopped short of a grade, the task could not be graded, the run
2145
+ * could not be filed, or the platform settled it failed; null when none. */
2146
+ declare function taskRunFailure(summary: RunTaskSummary): string | null;
2016
2147
  type TaskRunResult = string | {
2017
2148
  report?: unknown;
2018
2149
  [key: string]: unknown;
2019
2150
  } | null | undefined;
2020
- /** Mirrors `gatewaysdk.world_tasks.run_task`. Sessions close unless `keepUp: true`, even when the agent throws, so grading and filing
2021
- * still happen with the error recorded. */
2151
+ /** Mirrors `gatewaysdk.world_tasks.run_task`. Every run whose sessions opened
2152
+ * writes `run.json` and, unless `file: false`, files one evaluation: FAILED
2153
+ * with the reason when the agent raised, a world never came up, or the task
2154
+ * could not be graded; a failure that stops filing is `fileError`. Sessions
2155
+ * close unless `keepUp: true`. SIGINT or SIGTERM, from the open on, closes
2156
+ * them first (a signal during the open waits for the platform's answer) and
2157
+ * exits 128 + the signal's number. A world whose tools the platform could not
2158
+ * read throws `WorldToolsUnread` before the agent runs, and nothing is filed. */
2022
2159
  declare function runTask(ref: string | WorldTaskIdRef | WorldTaskSpec, agent: (run: TaskRun) => TaskRunResult | Promise<TaskRunResult>, opts: RunTaskOptions): Promise<RunTaskSummary>;
2023
2160
 
2024
2161
  type Checkout = {
@@ -2076,6 +2213,9 @@ type SetRunDoc = {
2076
2213
  sampleId: string | null;
2077
2214
  status: "pending" | "completed" | "failed";
2078
2215
  reward: number | null;
2216
+ /** Why a failed task failed: its filing's error, or the reason this run
2217
+ * gave when it closed for a task that filed nothing. */
2218
+ error: string | null;
2079
2219
  checks: Array<{
2080
2220
  key: string;
2081
2221
  outcome: "passed" | "failed" | "ungraded";
@@ -2096,7 +2236,7 @@ type RunSetOptions = {
2096
2236
  onTask?: (summary: RunTaskSummary) => void;
2097
2237
  options?: WorldsClientOptions;
2098
2238
  };
2099
- /** `failed`: an agent raised, a task could not run, or the platform stored the run as anything but completed. */
2239
+ /** `failed`: an agent raised, a task could not run or be graded, or the platform stored the run as anything but completed. */
2100
2240
  type RunSetResult = {
2101
2241
  setRun: SetRunDoc;
2102
2242
  tasks: RunTaskSummary[];
@@ -2106,59 +2246,31 @@ type RunSetResult = {
2106
2246
  /** A low or missing reward is a result, not a failure; every task runs even after one fails. */
2107
2247
  declare function runSet(datasetId: string, agent: (run: TaskRun) => TaskRunResult | Promise<TaskRunResult>, opts: RunSetOptions): Promise<RunSetResult>;
2108
2248
 
2109
- type EvalSample = {
2110
- exampleId: string;
2111
- task?: string;
2112
- rolloutIndex?: number;
2113
- prompt?: unknown;
2114
- completion?: unknown;
2115
- reward?: number;
2116
- score?: number;
2117
- correct?: boolean;
2118
- rewards?: Record<string, number>;
2119
- info?: Record<string, unknown>;
2120
- };
2121
- type CreateEvaluationOptions = {
2122
- model?: string;
2123
- /** A set run to file under; the platform refuses a run that does not admit this result. */
2124
- runId?: string;
2125
- rolloutsPerExample?: number;
2126
- metadata?: Record<string, unknown>;
2127
- };
2128
- type FinalizeEvaluationOptions = {
2129
- status?: "COMPLETED" | "FAILED";
2130
- metrics?: Record<string, unknown>;
2131
- };
2132
- declare class GatewayEvalsClient {
2133
- private readonly options;
2134
- constructor(options?: WorldsClientOptions);
2135
- createEvaluation(versionId: string, opts?: CreateEvaluationOptions): Promise<string>;
2136
- pushSamples(evaluationId: string, samples: EvalSample[]): Promise<number>;
2137
- finalizeEvaluation(evaluationId: string, opts?: FinalizeEvaluationOptions): Promise<string>;
2138
- }
2139
-
2140
- /** One vendor-route request the world answered, as its own log keeps it: the
2141
- * `calls` a grader reads, with the door it came in by (`via`: api, ui, tool). */
2249
+ /** One call the world answered, as its own log keeps it: a vendor-route
2250
+ * request, or a tool called by name (`method` and `path` null). The `calls` a
2251
+ * grader reads, with the door it came in by (`via`: api, ui, tool) and every
2252
+ * credential-named field `[redacted]`. */
2142
2253
  type WorldRequest = {
2143
2254
  seq: number;
2144
2255
  at?: string;
2145
2256
  operation?: string;
2146
- method?: string;
2147
- path?: string;
2257
+ method?: string | null;
2258
+ path?: string | null;
2148
2259
  args?: unknown;
2149
2260
  query?: unknown;
2150
2261
  body?: unknown;
2151
2262
  via?: string;
2152
2263
  status?: number;
2153
2264
  rows?: number | null;
2154
- found?: boolean;
2265
+ found?: boolean | null;
2155
2266
  };
2156
2267
  /**
2157
2268
  * The world's own request log, read from a live session's state. The platform's
2158
2269
  * call ledger (`export()`) holds what it brokered — tool calls, seeds, grades;
2159
- * this holds the requests the world answered on its routes, the browser's and a
2160
- * direct `api.url` client's included. A world without HTTP routes, or not on the
2161
- * World Host, keeps none.
2270
+ * this holds every call the world answered: the requests on its routes, the
2271
+ * browser's and a direct `api.url` client's included, and the tools called by
2272
+ * name. Every World Host session keeps one, a world of tools alone included;
2273
+ * a session elsewhere keeps none.
2162
2274
  */
2163
2275
  declare class WorldRequestLog {
2164
2276
  readonly requests: WorldRequest[];
@@ -2611,26 +2723,6 @@ declare function parseTransform(name: string): Transform;
2611
2723
  */
2612
2724
  declare function applyTransforms(value: string | number, chain: readonly string[]): string;
2613
2725
 
2614
- /**
2615
- * `queryRows(slug[@ref], entity, {where, resolve, limit, offset})` — the rows
2616
- * of one entity that match a predicate, from
2617
- * `GET /api/public/worlds/{slug}/data?ref=&entity=&where=&limit=&offset=&resolve=`.
2618
- * `where` is field → value, or field → list of values (any of); values match
2619
- * the STORED form as given. With `resolve: true` the values are plaintext and
2620
- * the runtime maps each to its stored form under the world's `[redact]`
2621
- * policy first (a hashed `email` becomes its slug-salted digest; a dropped
2622
- * field resolves to nothing and matches no row — the answer's `resolved`
2623
- * says so). The CLI twin is `gateway worlds data query <slug> <entity>`.
2624
- *
2625
- * `across: true` runs the same plaintext in every world this one links to
2626
- * whose `[dependencies.<alias>.entities]` mapping covers a `where` field;
2627
- * each linked world recomputes its own stored form (after the mapping's
2628
- * transform) at query time — no join on disk, no shared salt. The answer
2629
- * is then {@link WorldQueryAcrossResult}: one group per world, the root
2630
- * first, and with `compare: true` a parity report saying, per field and
2631
- * per world, `matched`, `no match` or `unmapped`.
2632
- */
2633
-
2634
2726
  type WorldQueryWhere = Record<string, Plaintext | Plaintext[]>;
2635
2727
  type WorldQueryOptions = {
2636
2728
  where?: WorldQueryWhere;
@@ -2731,6 +2823,22 @@ declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions, ref?:
2731
2823
  * the head). With `across: true` the answer is the groups shape. */
2732
2824
  declare function queryRows(slug: string, entity: string, opts: WorldQueryAcrossOptions, options?: WorldsClientOptions): Promise<WorldQueryAcrossResult>;
2733
2825
  declare function queryRows(slug: string, entity: string, opts?: WorldQueryOptions, options?: WorldsClientOptions): Promise<WorldQueryResult>;
2826
+ type WorldSqlOptions = {
2827
+ limit?: number;
2828
+ scenario?: string;
2829
+ };
2830
+ type WorldSqlResult = {
2831
+ slug: string;
2832
+ versionId: string;
2833
+ kind: string | null;
2834
+ engine: string;
2835
+ columns: string[];
2836
+ rows: unknown[][];
2837
+ count: number;
2838
+ limit: number;
2839
+ truncated: boolean;
2840
+ };
2841
+ declare function sqlRows(slugRef: string, sql: string, opts?: WorldSqlOptions, options?: WorldsClientOptions): Promise<WorldSqlResult>;
2734
2842
 
2735
2843
  /**
2736
2844
  * `migrateWorld(slug)` — convert a stored world into a schema world, from
@@ -3527,6 +3635,25 @@ declare class DryRunOutcome {
3527
3635
  passed(): boolean;
3528
3636
  }
3529
3637
 
3638
+ declare const TOOL_CONTRACT_UNREAD = "tool-contract-unread";
3639
+ /** One notice from a world answer's `deprecations`, as the CLI prints it (`fixtures/tasks/world-notice-vectors.json`). */
3640
+ declare class WorldNotice {
3641
+ readonly notice: WorldDeprecation;
3642
+ private readonly kind;
3643
+ private constructor();
3644
+ static of(notice: WorldDeprecation): WorldNotice;
3645
+ get refusesRun(): boolean;
3646
+ line(): string;
3647
+ }
3648
+ /** A run refused before its agent started: the platform could not read a world's tools. */
3649
+ declare class WorldToolsUnread extends Error {
3650
+ readonly world: string;
3651
+ readonly notice: WorldNotice;
3652
+ readonly code: string;
3653
+ constructor(world: string, notice: WorldNotice);
3654
+ static refuse(world: string, notices: WorldDeprecation[]): void;
3655
+ }
3656
+
3530
3657
  type WorldsClientOptions = {
3531
3658
  host?: string;
3532
3659
  publicKey?: string;
@@ -3566,9 +3693,11 @@ declare function parseErrorBody(text: string, limit?: number): {
3566
3693
  };
3567
3694
  /** Authenticated JSON request against the platform API — the primitive the
3568
3695
  * worlds helpers and the TS CLI share. `init.timeoutMs` is the request's own
3569
- * budget when it legitimately outlasts `GATEWAY_TIMEOUT_MS`. */
3696
+ * budget when it legitimately outlasts `GATEWAY_TIMEOUT_MS`; `init.retry` is
3697
+ * for a request whose repeat is harmless. */
3570
3698
  declare function apiRequest<T>(options: WorldsClientOptions, method: PlatformMethod, path: string, body?: unknown, init?: {
3571
3699
  timeoutMs?: number;
3700
+ retry?: RetryPolicy;
3572
3701
  }): Promise<T>;
3573
3702
  /** Set (or rotate) one environment secret — write-only: no API returns it. */
3574
3703
  declare function setEnvSecret(slug: string, key: string, value: string, options?: WorldsClientOptions): Promise<{
@@ -3760,4 +3889,4 @@ declare function openWorld(slugRef: string, options?: WorldsClientOptions): Prom
3760
3889
  */
3761
3890
  declare function openWorldVersion(slug: string, versionId: string, options?: WorldsClientOptions): Promise<WorldSet>;
3762
3891
 
3763
- export { ACTION_NAMES, type ActionArgs, type ActionResult, ActionTracer, type AiSdkAnthropicOutput, type AiSdkComputerCall, type AiSdkComputerOutput, type AiSdkModelOutput, AnthropicComputer, AnthropicComputer20251124, type AnthropicToolResult, ApiError, BROWSER_GONE_PATTERNS, BROWSER_TIERS, type BrowserActionEvent, BrowserActionRecorder, type BrowserConnection, type BrowserMode, type BrowserPage, BrowserReconnected, BrowserReconnector, type BrowserTier, BrowserUnrecoverable, CALL_BODY_LIMIT_BYTES, CALL_BODY_LIMIT_LABEL, COMPUTER_USE_SPECS, type Checkout, CheckoutProvenance, ComputerAction, type ComputerCallOutput, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, DRY_RUN_AGENT, DRY_RUN_KIND, DetachedPushError, type DispatchedRun, Display, type DryRunImageDecision, DryRunOutcome, type DryRunSettlement, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, EXPLORATORY_TASK, EXPLORATORY_TASK_SOURCE, type EditSessionCloseInput, type EditSessionList, type EditSessionListQuery, type EditSessionResult, type EditSessionRollbackInput, type EditSessionSummary, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, type GradeResult, HostedDryRunClient, type HostedDryRunDispatch, type HostedDryRunStatus, type HostedDryRunVerdict, IDLE_WARNING_MINUTES, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, KEY_NAMES, KeyChord, type ListRunsFilter, type ListSessionsFilter, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, NOT_EXECUTED, NO_GRADER_REASON, NativeComputer, type NativeComputerKinds, type NativeComputerOptions, type NativeComputerProvider, type NativePage, type ObservationConversion, type ObservationLike, OpenAIComputer, OpenAIPreviewComputer, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, PendingSafetyChecks, type Plaintext, PlatformMethod, type PlaywrightBrowserLike, type PlaywrightLike, PushSlugConflict, type PushSlugResolution, RECOVER_BUDGET_MS, type RebaseConflictPath, type RecoveryResult, type RedactMode, type RedactPolicy, type Redaction, type RepairAnswer, type ResolvedWorldVersion, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunSetOptions, type RunSetResult, type RunSummary, type RunTaskOptions, type RunTaskSummary, SANDBOX_REQUEST_TIMEOUT_MS, SECRET_KEY, SESSION_STATES, SPAN_PREFIX, STATUS_WAIT_CAP_SECONDS, STRIP_PREFIX, SURFACE_KINDS, type SafetyCheck, type SandboxChanges, type SandboxCheckResult, type SandboxCommitInput, type SandboxCommitResult, type SandboxExecResult, type SandboxImportInput, type SandboxImportPending, type SandboxImportResult, type SandboxListFilter, type SandboxOpenExisting, type SandboxOpenNew, type SandboxOpenTarget, type SandboxOpened, type SandboxSummary, Screen, type ScreenBrowser, SecretScrubber, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, type SetRunDoc, type SettleOptions, type SlugDeclaration, type SurfaceDescriptor, TRANSFORMS, TaskEditClient, type TaskEditCloseInput, type TaskEditCloseResult, type TaskEditRollbackInput, type TaskEditRollbackResult, type TaskEditSealed, type TaskEditStatus, type TaskEditTarget, type TaskEditTaskRef, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldRef, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, VERIFIER_REWARD_PREFIX, type ValidateReport, type ValidatedRun, type VerifierGrade, WHITESPACE, WorldBrowser, WorldCallTooLarge, type WorldDependency, type WorldDeprecation, type WorldDescription, WorldEditClient, 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, type WorldRequest, WorldRequestLog, WorldSandboxClient, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionListItem, 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 WorldTaskVerifier, type WorldTaskVerifierRow, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, archiveMode, assertBrowserTier, assertTaskRef, attachManifest, attachSession, attachTask, buildFileManifest, buildSourceTarball, captureToolCalls, checkoutIdentity, closeConnection, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, extractBundle, getRun, getTask, hashForm, idleWarning, ingest, ingestToolCalls, isBrowserGone, isSandboxImportPending, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listRuns, listSessions, listTaskSessions, listTasks, localTreeState, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, openWorldVersion, parseErrorBody, parseSlugRef, parseToolCallRecord, parseTransform, parseWorldTaskRefs, playwrightKey, preserveForm, propose, pull, push, pushBranch, pushSlug, pyText, queryRows, queryRowsSearch, readField, readLocalMeta, readToolCallRecords, rebaseConflicts, redactActionArgs, redactionOf, releaseConnection, resolveBrowserMode, resolvePushSlug, roundForm, runSessions, runSet, runTask, schemaFromSignature, serializeCallBody, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, storedForms, surfaceDescriptor, surfaceKinds, taskLabel, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, uncommittedPaths, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };
3892
+ export { ACTION_NAMES, type ActionArgs, type ActionResult, ActionTracer, type AiSdkAnthropicOutput, type AiSdkComputerCall, type AiSdkComputerOutput, type AiSdkModelOutput, AnthropicComputer, AnthropicComputer20251124, type AnthropicToolResult, ApiError, BROWSER_GONE_PATTERNS, BROWSER_TIERS, type BrowserActionEvent, BrowserActionRecorder, type BrowserConnection, type BrowserMode, type BrowserPage, BrowserReconnected, BrowserReconnector, type BrowserTier, BrowserUnrecoverable, CALL_BODY_LIMIT_BYTES, CALL_BODY_LIMIT_LABEL, COMPUTER_USE_SPECS, type Checkout, CheckoutProvenance, ComputerAction, type ComputerCallOutput, type CreateEvaluationOptions, DEFAULT_BRANCH, DEFAULT_VIEWPORT, DRY_RUN_AGENT, DRY_RUN_KIND, DetachedPushError, type DispatchedRun, Display, type DryRunImageDecision, DryRunOutcome, type DryRunSettlement, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, EXPLORATORY_TASK, EXPLORATORY_TASK_SOURCE, type EditSessionCloseInput, type EditSessionList, type EditSessionListQuery, type EditSessionResult, type EditSessionRollbackInput, type EditSessionSummary, type EvalSample, type FinalizeEvaluationOptions, GatewayEvalsClient, GradePayload, GradeRefused, type GradeResult, HostedDryRunClient, type HostedDryRunDispatch, type HostedDryRunStatus, type HostedDryRunVerdict, IDLE_WARNING_MINUTES, type IngestExplode, type IngestFieldSpec, type IngestMapping, type IngestMode, type IngestOptions, type IngestRefusal, type IngestReport, type IngestSource, type IngestSourceReport, type IngestToolCallsOptions, type IngestToolCallsReport, KEY_NAMES, KeyChord, type ListRunsFilter, type ListSessionsFilter, type LiveTaskSession, type LocalMeta, type MigrateWorldOptions, NOT_EXECUTED, NO_GRADER_REASON, NativeComputer, type NativeComputerKinds, type NativeComputerOptions, type NativeComputerProvider, type NativePage, type ObservationConversion, type ObservationLike, OpenAIComputer, OpenAIPreviewComputer, type OpenSessionOptions, type OpenTaskOptions, type ParsedToolCall, PendingSafetyChecks, type Plaintext, PlatformMethod, type PlaywrightBrowserLike, type PlaywrightLike, PushSlugConflict, type PushSlugResolution, RECOVER_BUDGET_MS, type RebaseConflictPath, type RecoveryResult, type RedactMode, type RedactPolicy, type Redaction, type RepairAnswer, type ResolvedWorldVersion, RetryPolicy, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunSetOptions, type RunSetResult, type RunSummary, type RunTaskOptions, type RunTaskSummary, SANDBOX_REQUEST_TIMEOUT_MS, SECRET_KEY, SESSION_STATES, SPAN_PREFIX, STATUS_WAIT_CAP_SECONDS, STRIP_PREFIX, SURFACE_KINDS, type SafetyCheck, type SandboxChanges, type SandboxCheckResult, type SandboxCommitInput, type SandboxCommitResult, type SandboxExecResult, type SandboxImportInput, type SandboxImportPending, type SandboxImportResult, type SandboxListFilter, type SandboxOpenExisting, type SandboxOpenNew, type SandboxOpenTarget, type SandboxOpened, type SandboxSummary, Score, Screen, type ScreenBrowser, SecretScrubber, type SeedResult, type SessionRunReport, type SessionRunResult, type SessionSurfaces, type SetRunDoc, type SettleOptions, type SlugDeclaration, type SurfaceDescriptor, TOOL_CONTRACT_UNREAD, TRANSFORMS, TaskEditClient, type TaskEditCloseInput, type TaskEditCloseResult, type TaskEditRollbackInput, type TaskEditRollbackResult, type TaskEditSealed, type TaskEditStatus, type TaskEditTarget, type TaskEditTaskRef, type TaskExport, type TaskGrade, type TaskManifest, type TaskManifestSession, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskWorldRef, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, VERIFIER_REWARD_PREFIX, type ValidateReport, type ValidatedRun, type VerifierGrade, WHITESPACE, WorldBrowser, WorldCallTooLarge, type WorldDependency, type WorldDeprecation, type WorldDescription, WorldEditClient, type WorldEntity, type WorldEntityMapping, type WorldField, type WorldMigrationRefusal, type WorldMigrationReport, WorldNotice, type WorldQueryAcrossOptions, type WorldQueryAcrossResult, type WorldQueryCompare, type WorldQueryCompareStatus, type WorldQueryGroup, type WorldQueryOptions, type WorldQueryResult, type WorldQuerySnapshot, type WorldQueryWhere, type WorldRelationship, type WorldRequest, WorldRequestLog, WorldSandboxClient, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionListItem, WorldSessionOpenFailed, type WorldSessionState, type WorldSessionTask, WorldSessionTimeout, WorldSet, type WorldSqlOptions, type WorldSqlResult, 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 WorldTaskVerifier, type WorldTaskVerifierRow, type WorldTaskVersionSummary, type WorldTaskWorld, type WorldTaskWorldValidation, type WorldToolSpec, type WorldToolkit, WorldToolsUnread, type WorldsClientOptions, aggregateTaskGrade, apiRequest, applyTransforms, archiveMode, assertBrowserTier, assertTaskRef, attachManifest, attachSession, attachTask, buildFileManifest, buildSourceTarball, captureToolCalls, checkoutIdentity, closeConnection, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, extractBundle, getRun, getTask, hashForm, idleWarning, ingest, ingestToolCalls, isBrowserGone, isSandboxImportPending, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listRuns, listSessions, listTaskSessions, listTasks, localTreeState, messageOf, migrateProjectWorlds, migrateWorld, modelToolName, openBrowser, openSession, openTask, openWorld, openWorldVersion, parseErrorBody, parseSlugRef, parseToolCallRecord, parseTransform, parseWorldTaskRefs, playwrightKey, preserveForm, propose, pull, push, pushBranch, pushSlug, pyText, queryRows, queryRowsSearch, readField, readLocalMeta, readToolCallRecords, rebaseConflicts, redactActionArgs, redactionOf, releaseConnection, resolveBrowserMode, resolvePushSlug, roundForm, runSessions, runSet, runTask, schemaFromSignature, serializeCallBody, sessionToolObservations, setEnvSecret, shapeText, snapshotTreeHashes, sqlRows, stillStartingHint, storedForms, surfaceDescriptor, surfaceKinds, taskGradeError, taskLabel, taskRunFailure, toolCallRecordsIn, toolCallsFromObservations, uiEntryUrl, uiUrl, uncommittedPaths, updateTask, upsertRunConfig, validateTask, validateWorld, waitForRun, withoutUiToken, writeLocalMeta };