@withgateway/sdk 0.3.0 → 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 (130) hide show
  1. package/README.md +6 -1
  2. package/dist/cli.js +3971 -2338
  3. package/dist/cli.js.map +1 -1
  4. package/dist/cli.mjs +3950 -2318
  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 +214 -41
  9. package/dist/files/index.js.map +1 -1
  10. package/dist/files/index.mjs +206 -35
  11. package/dist/files/index.mjs.map +1 -1
  12. package/dist/{index-DAb-FCMg.d.ts → index-DUHmS74p.d.ts} +3 -13
  13. package/dist/{index-D6oi1TWE.d.mts → index-mJhG3vZU.d.mts} +3 -13
  14. package/dist/index.d.mts +4 -4
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +1456 -564
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +1433 -557
  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 +211 -38
  25. package/dist/traces/index.js.map +1 -1
  26. package/dist/traces/index.mjs +203 -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 +96 -21
  31. package/dist/tracing/index.js.map +1 -1
  32. package/dist/tracing/index.mjs +96 -21
  33. package/dist/tracing/index.mjs.map +1 -1
  34. package/dist/worlds/index.d.mts +300 -123
  35. package/dist/worlds/index.d.ts +300 -123
  36. package/dist/worlds/index.js +1385 -508
  37. package/dist/worlds/index.js.map +1 -1
  38. package/dist/worlds/index.mjs +1377 -501
  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 -515
  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/cast.py +31 -4
  57. package/runtime/gatewaysdk/environment/schema/compiler.py +334 -158
  58. package/runtime/gatewaysdk/environment/schema/conform.py +8 -12
  59. package/runtime/gatewaysdk/environment/schema/connector.py +27 -62
  60. package/runtime/gatewaysdk/environment/schema/data.py +50 -207
  61. package/runtime/gatewaysdk/environment/schema/database/__init__.py +24 -0
  62. package/runtime/gatewaysdk/environment/schema/database/audit.py +121 -0
  63. package/runtime/gatewaysdk/environment/schema/database/base.py +995 -0
  64. package/runtime/gatewaysdk/environment/schema/database/budget.py +33 -0
  65. package/runtime/gatewaysdk/environment/schema/database/connections.py +101 -0
  66. package/runtime/gatewaysdk/environment/schema/database/engines.py +8 -0
  67. package/runtime/gatewaysdk/environment/schema/database/guard.py +208 -0
  68. package/runtime/gatewaysdk/environment/schema/database/ingest.py +154 -0
  69. package/runtime/gatewaysdk/environment/schema/database/matching.py +58 -0
  70. package/runtime/gatewaysdk/environment/schema/database/provenance.py +30 -0
  71. package/runtime/gatewaysdk/environment/schema/database/rows.py +53 -0
  72. package/runtime/gatewaysdk/environment/schema/database/runtime_rows.py +39 -0
  73. package/runtime/gatewaysdk/environment/schema/database/sqlite.py +367 -0
  74. package/runtime/gatewaysdk/environment/schema/domain_migration.py +236 -0
  75. package/runtime/gatewaysdk/environment/schema/envelope.py +169 -0
  76. package/runtime/gatewaysdk/environment/schema/extract.py +6 -13
  77. package/runtime/gatewaysdk/environment/schema/grading.py +45 -30
  78. package/runtime/gatewaysdk/environment/schema/handler_errors.py +142 -12
  79. package/runtime/gatewaysdk/environment/schema/host.py +158 -250
  80. package/runtime/gatewaysdk/environment/schema/lanes.py +53 -0
  81. package/runtime/gatewaysdk/environment/schema/local.py +44 -71
  82. package/runtime/gatewaysdk/environment/schema/mapping.py +5 -25
  83. package/runtime/gatewaysdk/environment/schema/openapi_import.py +112 -73
  84. package/runtime/gatewaysdk/environment/schema/openapi_paging.py +147 -0
  85. package/runtime/gatewaysdk/environment/schema/openapi_payloads.py +288 -0
  86. package/runtime/gatewaysdk/environment/schema/openapi_routes.py +97 -102
  87. package/runtime/gatewaysdk/environment/schema/openapi_schemas.py +113 -30
  88. package/runtime/gatewaysdk/environment/schema/platform.py +124 -178
  89. package/runtime/gatewaysdk/environment/schema/platform_import.py +2 -3
  90. package/runtime/gatewaysdk/environment/schema/platform_query.py +61 -5
  91. package/runtime/gatewaysdk/environment/schema/primary_key.py +61 -0
  92. package/runtime/gatewaysdk/environment/schema/proof.py +19 -12
  93. package/runtime/gatewaysdk/environment/schema/runtime.py +77 -160
  94. package/runtime/gatewaysdk/environment/schema/served_names.py +58 -0
  95. package/runtime/gatewaysdk/environment/schema/session_files.py +166 -0
  96. package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +2 -2
  97. package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +22 -14
  98. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/ROWS.md +29 -3
  99. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +16 -16
  100. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +18 -18
  101. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +3 -2
  102. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/gotchas.md +15 -0
  103. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/openapi-import.md +50 -21
  104. package/runtime/gatewaysdk/environment/schema/slack.py +4 -8
  105. package/runtime/gatewaysdk/environment/schema/snapshot.py +385 -129
  106. package/runtime/gatewaysdk/environment/schema/store_contract.py +8 -14
  107. package/runtime/gatewaysdk/environment/schema/tasks.py +140 -55
  108. package/runtime/gatewaysdk/environment/schema/tools_world.py +110 -87
  109. package/runtime/gatewaysdk/environment/schema/ui.py +24 -5
  110. package/runtime/gatewaysdk/environment/schema/ui_static/app.js +100 -130
  111. package/runtime/gatewaysdk/environment/schema/ui_static/index.html +1 -8
  112. package/runtime/gatewaysdk/environment/schema/validation.py +166 -40
  113. package/runtime/gatewaysdk/environment/schema/workers.py +142 -57
  114. package/runtime/gatewaysdk/environment/schema/world_sql.py +81 -0
  115. package/runtime/gatewaysdk/environment/schema/world_tests.py +71 -39
  116. package/runtime/gatewaysdk/environment/score.py +57 -0
  117. package/runtime/gatewaysdk/environment/secret_values.py +36 -0
  118. package/runtime/gatewaysdk/environment/world.py +42 -3
  119. package/runtime/gatewaysdk/environment/world_session_contract.py +32 -5
  120. package/skills/benchmarks-getting-started/SKILL.md +2 -2
  121. package/skills/connector-schema-authoring/SKILL.md +22 -14
  122. package/skills/connector-schema-authoring/connector-worlds.md +26 -10
  123. package/skills/connector-schema-authoring/world-schema.md +111 -51
  124. package/skills/world-data-ingestion/ROWS.md +29 -3
  125. package/skills/world-data-ingestion/SKILL.md +16 -16
  126. package/skills/worlds-getting-started/SKILL.md +18 -18
  127. package/skills/worlds-getting-started/references/cli-mcp-map.md +3 -2
  128. package/skills/worlds-getting-started/references/gotchas.md +15 -0
  129. package/skills/worlds-getting-started/references/openapi-import.md +50 -21
  130. 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;
@@ -1689,13 +1758,11 @@ type ListSessionsFilter = {
1689
1758
  slug?: string;
1690
1759
  limit?: number;
1691
1760
  };
1692
- /** The project's live sessions, newest first — the ones an agent can attach to. */
1761
+ /** The project's sessions in every state, newest first; `state` narrows to one. */
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,10 +1803,33 @@ 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;
1742
1811
 
1812
+ /** Where a session answers, in the shape `session open` prints and a
1813
+ * `task up` manifest keeps per world. */
1814
+ type SurfaceDescriptor = {
1815
+ surfaces: WorldSurfaceKind[];
1816
+ api?: {
1817
+ url: string;
1818
+ token?: string;
1819
+ };
1820
+ ui?: {
1821
+ url: string;
1822
+ entry: string;
1823
+ apiPath: string | null;
1824
+ };
1825
+ browser?: {
1826
+ wsUrl: string;
1827
+ viewport?: unknown;
1828
+ tier?: BrowserTier;
1829
+ };
1830
+ };
1831
+ declare function surfaceDescriptor(s: SessionSurfaces): SurfaceDescriptor;
1832
+
1743
1833
  /** The per-world entry of a `WorldTaskSpec.worlds` table. */
1744
1834
  type WorldTaskWorld = {
1745
1835
  slug: string;
@@ -1785,21 +1875,7 @@ type TaskManifestSession = {
1785
1875
  sessionId: string;
1786
1876
  ready: boolean;
1787
1877
  state: string;
1788
- surfaces: WorldSurfaceKind[];
1789
- api?: {
1790
- url: string;
1791
- token?: string;
1792
- };
1793
- ui?: {
1794
- url: string;
1795
- entry: string;
1796
- apiPath: string | null;
1797
- };
1798
- browser?: {
1799
- wsUrl: string;
1800
- viewport?: unknown;
1801
- };
1802
- };
1878
+ } & SurfaceDescriptor;
1803
1879
  /** The manifest: every session of the task, keyed by alias. The file
1804
1880
  * `task up --out` writes and `task down|status|grade|export` read. */
1805
1881
  type TaskManifest = {
@@ -1828,22 +1904,28 @@ type LiveTaskSession = {
1828
1904
  * is listed under `ungraded` (a verifier as `x.<name>`), never counted as
1829
1905
  * 0. `rewards` flattens each world's named rewards as `<alias>.<key>`
1830
1906
  * beside `<alias>` for the world's own reward, and a verifier's as
1831
- * `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. */
1832
1910
  type TaskGrade = {
1833
1911
  reward: number | null;
1834
1912
  rewards: Record<string, number>;
1835
1913
  worlds: Record<string, GradeResult>;
1836
1914
  ungraded: string[];
1837
1915
  verifiers: Record<string, VerifierGrade>;
1916
+ errors: Record<string, string>;
1838
1917
  };
1839
- /** A cross-world verifier's rewards flatten under `x.<name>`; no alias
1840
- * 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. */
1841
1921
  declare const VERIFIER_REWARD_PREFIX = "x.";
1842
1922
  /** Every world's call log, keyed by alias. */
1843
1923
  type TaskExport = Record<string, WorldSessionCall[]>;
1844
1924
  /** Combine per-world grades into the task's. Pure, so the CLI and the tests
1845
1925
  * share it with `TaskSessions.grade()`. */
1846
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;
1847
1929
  declare class TaskSessions {
1848
1930
  /** The stored task's id, or null for a task given as a spec. */
1849
1931
  readonly taskId: string | null;
@@ -1890,7 +1972,9 @@ declare class TaskSessions {
1890
1972
  * agent's own account of the whole investigation) goes to every world's
1891
1973
  * judge; a world graded by assertions or python ignores it. Each grade
1892
1974
  * names the task's other sessions by alias, so the cross-world verifiers
1893
- * 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. */
1894
1978
  grade(opts?: {
1895
1979
  timeoutMs?: number;
1896
1980
  report?: string;
@@ -1945,6 +2029,76 @@ declare function attachManifest(manifest: TaskManifest, options?: WorldsClientOp
1945
2029
  * rather than a task spec. */
1946
2030
  declare function isTaskManifest(value: unknown): value is TaskManifest;
1947
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
+
1948
2102
  declare class TaskRun {
1949
2103
  readonly runId: string;
1950
2104
  readonly instruction: string;
@@ -1969,7 +2123,12 @@ type RunTaskOptions = {
1969
2123
  surfaces?: WorldSurfaceKind[];
1970
2124
  /** Directory the run's own `<runId>/` folder is created under. Default `"runs"`. */
1971
2125
  outDir?: string;
1972
- /** Initialize tracing when GATEWAY_* credentials are configured. Default `true`. */
2126
+ /**
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.
2131
+ */
1973
2132
  trace?: boolean;
1974
2133
  /** File one rollout when the run ends. Default `true`. */
1975
2134
  file?: boolean;
@@ -1981,33 +2140,22 @@ type RunTaskOptions = {
1981
2140
  setRunId?: string;
1982
2141
  options?: WorldsClientOptions;
1983
2142
  };
1984
- type RunTaskSummary = {
1985
- runId: string;
1986
- taskId: string | null;
1987
- taskVersion: number | null;
1988
- name: string | null;
1989
- instruction: string;
1990
- model: string;
1991
- aliases: string[];
1992
- reward: number | null;
1993
- rewards: Record<string, number>;
1994
- ungraded: string[];
1995
- agentError: string | null;
1996
- report: string | null;
1997
- traced: boolean;
1998
- runDir: string;
1999
- durationSeconds: number;
2000
- notes: Record<string, unknown>;
2001
- filed: boolean;
2002
- evaluationId?: string;
2003
- [extra: string]: unknown;
2004
- };
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;
2005
2147
  type TaskRunResult = string | {
2006
2148
  report?: unknown;
2007
2149
  [key: string]: unknown;
2008
2150
  } | null | undefined;
2009
- /** Mirrors `gatewaysdk.world_tasks.run_task`. Sessions close unless `keepUp: true`, even when the agent throws, so grading and filing
2010
- * 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. */
2011
2159
  declare function runTask(ref: string | WorldTaskIdRef | WorldTaskSpec, agent: (run: TaskRun) => TaskRunResult | Promise<TaskRunResult>, opts: RunTaskOptions): Promise<RunTaskSummary>;
2012
2160
 
2013
2161
  type Checkout = {
@@ -2065,6 +2213,9 @@ type SetRunDoc = {
2065
2213
  sampleId: string | null;
2066
2214
  status: "pending" | "completed" | "failed";
2067
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;
2068
2219
  checks: Array<{
2069
2220
  key: string;
2070
2221
  outcome: "passed" | "failed" | "ungraded";
@@ -2085,7 +2236,7 @@ type RunSetOptions = {
2085
2236
  onTask?: (summary: RunTaskSummary) => void;
2086
2237
  options?: WorldsClientOptions;
2087
2238
  };
2088
- /** `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. */
2089
2240
  type RunSetResult = {
2090
2241
  setRun: SetRunDoc;
2091
2242
  tasks: RunTaskSummary[];
@@ -2095,35 +2246,42 @@ type RunSetResult = {
2095
2246
  /** A low or missing reward is a result, not a failure; every task runs even after one fails. */
2096
2247
  declare function runSet(datasetId: string, agent: (run: TaskRun) => TaskRunResult | Promise<TaskRunResult>, opts: RunSetOptions): Promise<RunSetResult>;
2097
2248
 
2098
- type EvalSample = {
2099
- exampleId: string;
2100
- task?: string;
2101
- rolloutIndex?: number;
2102
- prompt?: unknown;
2103
- completion?: unknown;
2104
- reward?: number;
2105
- score?: number;
2106
- correct?: boolean;
2107
- rewards?: Record<string, number>;
2108
- info?: Record<string, unknown>;
2109
- };
2110
- type CreateEvaluationOptions = {
2111
- model?: string;
2112
- /** A set run to file under; the platform refuses a run that does not admit this result. */
2113
- runId?: string;
2114
- rolloutsPerExample?: number;
2115
- metadata?: Record<string, unknown>;
2116
- };
2117
- type FinalizeEvaluationOptions = {
2118
- status?: "COMPLETED" | "FAILED";
2119
- metrics?: Record<string, unknown>;
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]`. */
2253
+ type WorldRequest = {
2254
+ seq: number;
2255
+ at?: string;
2256
+ operation?: string;
2257
+ method?: string | null;
2258
+ path?: string | null;
2259
+ args?: unknown;
2260
+ query?: unknown;
2261
+ body?: unknown;
2262
+ via?: string;
2263
+ status?: number;
2264
+ rows?: number | null;
2265
+ found?: boolean | null;
2120
2266
  };
2121
- declare class GatewayEvalsClient {
2122
- private readonly options;
2123
- constructor(options?: WorldsClientOptions);
2124
- createEvaluation(versionId: string, opts?: CreateEvaluationOptions): Promise<string>;
2125
- pushSamples(evaluationId: string, samples: EvalSample[]): Promise<number>;
2126
- finalizeEvaluation(evaluationId: string, opts?: FinalizeEvaluationOptions): Promise<string>;
2267
+ /**
2268
+ * The world's own request log, read from a live session's state. The platform's
2269
+ * call ledger (`export()`) holds what it brokered — tool calls, seeds, grades;
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.
2274
+ */
2275
+ declare class WorldRequestLog {
2276
+ readonly requests: WorldRequest[];
2277
+ private constructor();
2278
+ static read(session: WorldSession): Promise<WorldRequestLog | null>;
2279
+ /** How many older requests the world no longer keeps (its log is bounded): the gap
2280
+ * before the first entry it still holds. */
2281
+ get dropped(): number;
2282
+ /** Each request in the shape of a ledger line, `kind: "request"`, so one JSONL
2283
+ * file holds both. */
2284
+ asCalls(): WorldSessionCall[];
2127
2285
  }
2128
2286
 
2129
2287
  /** One entry the archive rules dropped: a whole directory (`name/`, `files`
@@ -2455,6 +2613,8 @@ type WorldField = {
2455
2613
  required: boolean;
2456
2614
  /** How the store holds it; null means in the clear (queryable by plaintext as given). */
2457
2615
  redaction: Redaction | null;
2616
+ /** The values the schema allows; absent when it lists none. */
2617
+ enum?: unknown[];
2458
2618
  };
2459
2619
  type WorldRelationship = {
2460
2620
  fields: string[];
@@ -2563,26 +2723,6 @@ declare function parseTransform(name: string): Transform;
2563
2723
  */
2564
2724
  declare function applyTransforms(value: string | number, chain: readonly string[]): string;
2565
2725
 
2566
- /**
2567
- * `queryRows(slug[@ref], entity, {where, resolve, limit, offset})` — the rows
2568
- * of one entity that match a predicate, from
2569
- * `GET /api/public/worlds/{slug}/data?ref=&entity=&where=&limit=&offset=&resolve=`.
2570
- * `where` is field → value, or field → list of values (any of); values match
2571
- * the STORED form as given. With `resolve: true` the values are plaintext and
2572
- * the runtime maps each to its stored form under the world's `[redact]`
2573
- * policy first (a hashed `email` becomes its slug-salted digest; a dropped
2574
- * field resolves to nothing and matches no row — the answer's `resolved`
2575
- * says so). The CLI twin is `gateway worlds data query <slug> <entity>`.
2576
- *
2577
- * `across: true` runs the same plaintext in every world this one links to
2578
- * whose `[dependencies.<alias>.entities]` mapping covers a `where` field;
2579
- * each linked world recomputes its own stored form (after the mapping's
2580
- * transform) at query time — no join on disk, no shared salt. The answer
2581
- * is then {@link WorldQueryAcrossResult}: one group per world, the root
2582
- * first, and with `compare: true` a parity report saying, per field and
2583
- * per world, `matched`, `no match` or `unmapped`.
2584
- */
2585
-
2586
2726
  type WorldQueryWhere = Record<string, Plaintext | Plaintext[]>;
2587
2727
  type WorldQueryOptions = {
2588
2728
  where?: WorldQueryWhere;
@@ -2683,6 +2823,22 @@ declare function queryRowsSearch(entity: string, opts?: WorldQueryOptions, ref?:
2683
2823
  * the head). With `across: true` the answer is the groups shape. */
2684
2824
  declare function queryRows(slug: string, entity: string, opts: WorldQueryAcrossOptions, options?: WorldsClientOptions): Promise<WorldQueryAcrossResult>;
2685
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>;
2686
2842
 
2687
2843
  /**
2688
2844
  * `migrateWorld(slug)` — convert a stored world into a schema world, from
@@ -3479,6 +3635,25 @@ declare class DryRunOutcome {
3479
3635
  passed(): boolean;
3480
3636
  }
3481
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
+
3482
3657
  type WorldsClientOptions = {
3483
3658
  host?: string;
3484
3659
  publicKey?: string;
@@ -3518,9 +3693,11 @@ declare function parseErrorBody(text: string, limit?: number): {
3518
3693
  };
3519
3694
  /** Authenticated JSON request against the platform API — the primitive the
3520
3695
  * worlds helpers and the TS CLI share. `init.timeoutMs` is the request's own
3521
- * 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. */
3522
3698
  declare function apiRequest<T>(options: WorldsClientOptions, method: PlatformMethod, path: string, body?: unknown, init?: {
3523
3699
  timeoutMs?: number;
3700
+ retry?: RetryPolicy;
3524
3701
  }): Promise<T>;
3525
3702
  /** Set (or rotate) one environment secret — write-only: no API returns it. */
3526
3703
  declare function setEnvSecret(slug: string, key: string, value: string, options?: WorldsClientOptions): Promise<{
@@ -3712,4 +3889,4 @@ declare function openWorld(slugRef: string, options?: WorldsClientOptions): Prom
3712
3889
  */
3713
3890
  declare function openWorldVersion(slug: string, versionId: string, options?: WorldsClientOptions): Promise<WorldSet>;
3714
3891
 
3715
- 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, 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, 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, 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 };