@withgateway/sdk 0.3.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/cli.js +3005 -1401
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2996 -1392
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +128 -37
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +126 -35
- package/dist/files/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +124 -11
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +124 -11
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/{index-C3UzD0G3.d.mts → index-CDPQBsU5.d.mts} +19 -3
- package/dist/{index-C3UzD0G3.d.ts → index-CDPQBsU5.d.ts} +19 -3
- package/dist/{index-mJhG3vZU.d.mts → index-Di9nNqOY.d.mts} +26 -3
- package/dist/{index-DUHmS74p.d.ts → index-LA-PMRJT.d.ts} +26 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1078 -260
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1040 -251
- package/dist/index.mjs.map +1 -1
- package/dist/replay/index.d.mts +1 -1
- package/dist/replay/index.d.ts +1 -1
- package/dist/replay/index.js.map +1 -1
- package/dist/replay/index.mjs.map +1 -1
- package/dist/traces/index.js +125 -34
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +123 -32
- package/dist/traces/index.mjs.map +1 -1
- package/dist/tracing/index.d.mts +1 -1
- package/dist/tracing/index.d.ts +1 -1
- package/dist/tracing/index.js +7 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +7 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +819 -438
- package/dist/worlds/index.d.ts +819 -438
- package/dist/worlds/index.js +912 -236
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +908 -232
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/gatewaysdk/environment/_bundle.py +4 -6
- package/runtime/gatewaysdk/environment/_materialize.py +5 -25
- package/runtime/gatewaysdk/environment/_world.py +82 -66
- package/runtime/gatewaysdk/environment/backing.py +20 -24
- package/runtime/gatewaysdk/environment/core.py +1 -16
- package/runtime/gatewaysdk/environment/legacy_sqlite.py +14 -27
- package/runtime/gatewaysdk/environment/runtime.py +45 -2
- package/runtime/gatewaysdk/environment/schema/admission.py +174 -0
- package/runtime/gatewaysdk/environment/schema/api.py +198 -474
- package/runtime/gatewaysdk/environment/schema/assertions.py +458 -0
- package/runtime/gatewaysdk/environment/schema/batch.py +3 -3
- package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +1 -0
- package/runtime/gatewaysdk/environment/schema/cache_layout.py +5 -0
- package/runtime/gatewaysdk/environment/schema/call_capture.py +321 -0
- package/runtime/gatewaysdk/environment/schema/call_log.py +276 -18
- package/runtime/gatewaysdk/environment/schema/call_redaction.py +207 -19
- package/runtime/gatewaysdk/environment/schema/cast.py +15 -35
- package/runtime/gatewaysdk/environment/schema/compiler.py +4 -1
- package/runtime/gatewaysdk/environment/schema/conform.py +38 -35
- package/runtime/gatewaysdk/environment/schema/connector.py +94 -152
- package/runtime/gatewaysdk/environment/schema/connectors/confluence/connector.toml +1 -12
- package/runtime/gatewaysdk/environment/schema/connectors/custom/handlers.py +2 -1
- package/runtime/gatewaysdk/environment/schema/connectors/github/api/handlers.py +217 -58
- package/runtime/gatewaysdk/environment/schema/connectors/github/connector.toml +10 -19
- package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_webhooks.json +10 -2
- package/runtime/gatewaysdk/environment/schema/connectors/github/tests/webhooks.json +47 -0
- package/runtime/gatewaysdk/environment/schema/connectors/github/world.json +21 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/api/handlers.py +185 -18
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/connector.toml +29 -14
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/provenance.json +43 -12
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_webhooks.json +2 -2
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scope.toml +4 -17
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/tests/webhooks.json +107 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/vendor-openapi.json +1 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/api/handlers.py +85 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/connector.toml +19 -31
- package/runtime/gatewaysdk/environment/schema/connectors/linear/provenance.json +18 -8
- package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/webhooks.json +19 -3
- package/runtime/gatewaysdk/environment/schema/connectors/linear/tests/test_webhooks.py +71 -0
- package/runtime/gatewaysdk/environment/schema/connectors/servicenow/connector.toml +2 -5
- package/runtime/gatewaysdk/environment/schema/cors.py +54 -0
- package/runtime/gatewaysdk/environment/schema/credentials.py +313 -8
- package/runtime/gatewaysdk/environment/schema/data.py +14 -13
- package/runtime/gatewaysdk/environment/schema/database/base.py +106 -165
- package/runtime/gatewaysdk/environment/schema/database/guard.py +45 -37
- package/runtime/gatewaysdk/environment/schema/database/reads.py +169 -0
- package/runtime/gatewaysdk/environment/schema/database/sqlite.py +57 -31
- package/runtime/gatewaysdk/environment/schema/declared_routes.py +210 -0
- package/runtime/gatewaysdk/environment/schema/door.py +899 -0
- package/runtime/gatewaysdk/environment/schema/envelope.py +86 -28
- package/runtime/gatewaysdk/environment/schema/grading.py +58 -86
- package/runtime/gatewaysdk/environment/schema/handler_errors.py +52 -5
- package/runtime/gatewaysdk/environment/schema/host.py +229 -1695
- package/runtime/gatewaysdk/environment/schema/host_control.py +144 -0
- package/runtime/gatewaysdk/environment/schema/host_handoff.py +370 -0
- package/runtime/gatewaysdk/environment/schema/host_loops.py +97 -0
- package/runtime/gatewaysdk/environment/schema/host_owners.py +121 -0
- package/runtime/gatewaysdk/environment/schema/host_proxy.py +111 -0
- package/runtime/gatewaysdk/environment/schema/host_requests.py +6 -0
- package/runtime/gatewaysdk/environment/schema/host_session.py +126 -0
- package/runtime/gatewaysdk/environment/schema/host_surfaces.py +79 -21
- package/runtime/gatewaysdk/environment/schema/host_transfers.py +127 -0
- package/runtime/gatewaysdk/environment/schema/host_versions.py +242 -0
- package/runtime/gatewaysdk/environment/schema/host_workers.py +577 -0
- package/runtime/gatewaysdk/environment/schema/journal.py +438 -0
- package/runtime/gatewaysdk/environment/schema/ledger_spill.py +828 -0
- package/runtime/gatewaysdk/environment/schema/local.py +32 -116
- package/runtime/gatewaysdk/environment/schema/openapi_schemas.py +20 -5
- package/runtime/gatewaysdk/environment/schema/platform.py +29 -234
- package/runtime/gatewaysdk/environment/schema/request_body.py +238 -0
- package/runtime/gatewaysdk/environment/schema/request_ledger.py +958 -0
- package/runtime/gatewaysdk/environment/schema/route_bindings.py +25 -3
- package/runtime/gatewaysdk/environment/schema/route_miss.py +54 -0
- package/runtime/gatewaysdk/environment/schema/runtime.py +136 -176
- package/runtime/gatewaysdk/environment/schema/scaffold.py +2 -1
- package/runtime/gatewaysdk/environment/schema/session_files.py +133 -24
- package/runtime/gatewaysdk/environment/schema/session_move.py +275 -0
- package/runtime/gatewaysdk/environment/schema/skills/agents/connector-template-author.md +5 -1
- package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +8 -9
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +50 -28
- package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/ROWS.md +12 -8
- package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +20 -22
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +25 -25
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +24 -16
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/gotchas.md +71 -7
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/journal-checks.md +182 -0
- package/runtime/gatewaysdk/environment/schema/snapshot.py +150 -30
- package/runtime/gatewaysdk/environment/schema/spill_files.py +228 -0
- package/runtime/gatewaysdk/environment/schema/tasks.py +229 -323
- package/runtime/gatewaysdk/environment/schema/tools_world.py +103 -203
- package/runtime/gatewaysdk/environment/schema/validation.py +69 -1
- package/runtime/gatewaysdk/environment/schema/verbs.py +38 -36
- package/runtime/gatewaysdk/environment/schema/webhooks.py +687 -0
- package/runtime/gatewaysdk/environment/schema/worker.py +6 -4
- package/runtime/gatewaysdk/environment/schema/workers.py +203 -39
- package/runtime/gatewaysdk/environment/schema/world_host.py +970 -0
- package/runtime/gatewaysdk/environment/schema/world_tests.py +83 -11
- package/runtime/gatewaysdk/environment/world.py +1 -1
- package/runtime/gatewaysdk/environment/world_session_contract.py +14 -0
- package/skills/agents/connector-template-author.md +5 -1
- package/skills/benchmarks-getting-started/SKILL.md +8 -9
- package/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/skills/connector-schema-authoring/SKILL.md +50 -28
- package/skills/connector-schema-authoring/connector-worlds.md +282 -18
- package/skills/connector-schema-authoring/world-schema.md +7 -6
- package/skills/world-data-ingestion/ROWS.md +12 -8
- package/skills/world-data-ingestion/SKILL.md +20 -22
- package/skills/worlds-getting-started/SKILL.md +25 -25
- package/skills/worlds-getting-started/references/cli-mcp-map.md +24 -16
- package/skills/worlds-getting-started/references/gotchas.md +71 -7
- package/skills/worlds-getting-started/references/journal-checks.md +182 -0
package/dist/worlds/index.d.ts
CHANGED
|
@@ -283,6 +283,15 @@ type NativeComputerOptions = {
|
|
|
283
283
|
* screenshots with the `GATEWAY_*` keys when tracing is initialized. */
|
|
284
284
|
tracer?: ActionTracer;
|
|
285
285
|
};
|
|
286
|
+
/** The major version of the `ai` package the tools are handed to. */
|
|
287
|
+
type AiSdkMajor = 6 | 7;
|
|
288
|
+
type AiSdkOptions<V extends AiSdkMajor = 6> = {
|
|
289
|
+
/** The Anthropic kinds' screenshot part. Default 6: `image-data`, which
|
|
290
|
+
* AI SDK 7 still accepts with a deprecation warning. 7: the `file` part with
|
|
291
|
+
* `{ type: "data", data }`, which AI SDK 6 does not accept. The OpenAI kinds
|
|
292
|
+
* return the provider's own `computer_screenshot` output and ignore it. */
|
|
293
|
+
version?: V;
|
|
294
|
+
};
|
|
286
295
|
type Kind = new (browser: ScreenBrowser, options?: NativeComputerOptions) => NativeComputer;
|
|
287
296
|
/** `item[name]` for the first spelling that is set (`scroll_x`, `scrollX`). */
|
|
288
297
|
declare function readField(item: unknown, ...names: string[]): unknown;
|
|
@@ -305,7 +314,7 @@ declare abstract class NativeComputer {
|
|
|
305
314
|
abstract parse(raw: unknown): ComputerAction;
|
|
306
315
|
/** The options to spread into the Vercel AI SDK's provider-defined computer
|
|
307
316
|
* tool (`execute` and its companions), backed by this computer. */
|
|
308
|
-
abstract aiSdk(): object;
|
|
317
|
+
abstract aiSdk(options?: AiSdkOptions<AiSdkMajor>): object;
|
|
309
318
|
/** Run one provider-shaped action (an OpenAI action object, or an Anthropic
|
|
310
319
|
* `{ action: "left_click", ... }` input) and return what it produced: the
|
|
311
320
|
* door for any agent framework that hands actions over one at a time. */
|
|
@@ -345,12 +354,6 @@ declare class KeyChord {
|
|
|
345
354
|
}
|
|
346
355
|
|
|
347
356
|
/**
|
|
348
|
-
* Anthropic's computer use: the `computer_toolset_20260801` toolset (GA, no
|
|
349
|
-
* beta header) and the older `computer_20251124` tool as a second kind.
|
|
350
|
-
* With the toolset each action is its own `tool_use` block named after the
|
|
351
|
-
* action and marked `"toolset_name": "computer"`; a turn may carry several.
|
|
352
|
-
* They run in order; the first failure is reported with `is_error` and every
|
|
353
|
-
* later block in the turn is answered as not executed.
|
|
354
357
|
* Docs: https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool
|
|
355
358
|
* Twin of `gatewaysdk/native_computer/anthropic.py`.
|
|
356
359
|
*/
|
|
@@ -361,16 +364,28 @@ type AiSdkAnthropicOutput = {
|
|
|
361
364
|
type: "image";
|
|
362
365
|
data: string;
|
|
363
366
|
} | string;
|
|
364
|
-
type
|
|
367
|
+
type ImageParts = {
|
|
368
|
+
6: {
|
|
369
|
+
type: "image-data";
|
|
370
|
+
data: string;
|
|
371
|
+
mediaType: "image/png";
|
|
372
|
+
};
|
|
373
|
+
7: {
|
|
374
|
+
type: "file";
|
|
375
|
+
mediaType: "image/png";
|
|
376
|
+
data: {
|
|
377
|
+
type: "data";
|
|
378
|
+
data: string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
type AiSdkImagePart<V extends AiSdkMajor = AiSdkMajor> = ImageParts[V];
|
|
383
|
+
type AiSdkModelOutput<V extends AiSdkMajor = 6> = {
|
|
365
384
|
type: "text";
|
|
366
385
|
value: string;
|
|
367
386
|
} | {
|
|
368
387
|
type: "content";
|
|
369
|
-
value:
|
|
370
|
-
type: "image-data";
|
|
371
|
-
data: string;
|
|
372
|
-
mediaType: "image/png";
|
|
373
|
-
}[];
|
|
388
|
+
value: AiSdkImagePart<V>[];
|
|
374
389
|
};
|
|
375
390
|
type AnthropicContent = {
|
|
376
391
|
type: "text";
|
|
@@ -412,23 +427,27 @@ declare class AnthropicComputer extends NativeComputer {
|
|
|
412
427
|
execute(content: Iterable<unknown>): Promise<AnthropicToolResult[]>;
|
|
413
428
|
/** The content an `ActionResult` goes back to the model as. */
|
|
414
429
|
static content(result: ActionResult): AnthropicContent[];
|
|
415
|
-
/** For `anthropic.tools.computerToolset_20260801(
|
|
416
|
-
* (or `computer_20251124` with the legacy kind
|
|
417
|
-
* and returns `{ type: "image", data }` or
|
|
418
|
-
* into the tool result
|
|
430
|
+
/** For `anthropic.tools.computerToolset_20260801(computer.aiSdk({ version: 7 }))`
|
|
431
|
+
* (AI SDK 7 only), or `computer_20251124` with the legacy kind (AI SDK 6
|
|
432
|
+
* and 7): `execute` runs one action and returns `{ type: "image", data }` or
|
|
433
|
+
* text; `toModelOutput` turns that into the tool result in the part shape
|
|
434
|
+
* of `options.version`. Calls run one at a time, and once a call fails the
|
|
419
435
|
* rest of that step's calls answer as not executed. */
|
|
420
|
-
aiSdk(): {
|
|
436
|
+
aiSdk<V extends AiSdkMajor = 6>(options?: AiSdkOptions<V>): {
|
|
421
437
|
execute: (input: unknown, options?: {
|
|
422
438
|
messages?: readonly unknown[];
|
|
423
439
|
}) => Promise<AiSdkAnthropicOutput>;
|
|
424
440
|
toModelOutput: (options: {
|
|
425
441
|
output: AiSdkAnthropicOutput;
|
|
426
|
-
}) => AiSdkModelOutput
|
|
442
|
+
}) => AiSdkModelOutput<V>;
|
|
427
443
|
};
|
|
428
444
|
static aiSdkOutput(result: ActionResult): AiSdkAnthropicOutput;
|
|
429
|
-
/**
|
|
430
|
-
*
|
|
431
|
-
|
|
445
|
+
/** A screenshot as the image part of AI SDK `options.version`:
|
|
446
|
+
* `image-data` for 6 (the default), `file` with `{ type: "data", data }`
|
|
447
|
+
* for 7. */
|
|
448
|
+
static aiSdkModelOutput<V extends AiSdkMajor = 6>(output: AiSdkAnthropicOutput, options?: AiSdkOptions<V>): AiSdkModelOutput<V>;
|
|
449
|
+
private static imagePart;
|
|
450
|
+
private static modelOutput;
|
|
432
451
|
protected envelope(block: unknown, content: AnthropicContent[] | string, isError?: boolean): AnthropicToolResult;
|
|
433
452
|
private runBlock;
|
|
434
453
|
}
|
|
@@ -522,13 +541,7 @@ declare class OpenAIPreviewComputer extends OpenAIComputer {
|
|
|
522
541
|
tool(): Record<string, unknown>;
|
|
523
542
|
}
|
|
524
543
|
|
|
525
|
-
/**
|
|
526
|
-
* Native computer use: Anthropic's and OpenAI's pixel-based computer-use
|
|
527
|
-
* tools served by a world session's browser. Kinds: `anthropic`
|
|
528
|
-
* (`computer_toolset_20260801`), `anthropic-computer-20251124`, `openai`
|
|
529
|
-
* (Responses `computer`) and `openai-preview` (`computer_use_preview`).
|
|
530
|
-
* Python twin: `gatewaysdk/native_computer/`.
|
|
531
|
-
*/
|
|
544
|
+
/** Python twin: `gatewaysdk/native_computer/`. */
|
|
532
545
|
|
|
533
546
|
/** The class each provider name builds, so a caller gets the kind's own
|
|
534
547
|
* `execute` without a cast. */
|
|
@@ -622,10 +635,6 @@ type WorldTaskWorldValidation = {
|
|
|
622
635
|
slug: string;
|
|
623
636
|
ref: string;
|
|
624
637
|
versionId: string;
|
|
625
|
-
/** True when the caller's open edit session's tip stood in for `main`;
|
|
626
|
-
* null when the alias did not resolve; absent from a platform that does
|
|
627
|
-
* not report it. */
|
|
628
|
-
private?: boolean | null;
|
|
629
638
|
ok: boolean;
|
|
630
639
|
checked: "entities" | "none";
|
|
631
640
|
problems: string[];
|
|
@@ -637,10 +646,6 @@ type WorldTaskValidation = {
|
|
|
637
646
|
/** The world version the task was checked against; null for a task with
|
|
638
647
|
* `worlds`, whose versions are per alias under `worlds`. */
|
|
639
648
|
versionId: string | null;
|
|
640
|
-
/** True when the caller's open edit session's tip stood in for `main`;
|
|
641
|
-
* null for a task with `worlds` (per alias there); absent from a platform
|
|
642
|
-
* that does not report it. */
|
|
643
|
-
private?: boolean | null;
|
|
644
649
|
ok: boolean;
|
|
645
650
|
/** `entities` when the world's contract was read and every seed and check
|
|
646
651
|
* entity was matched against it; `none` when the version has no contract
|
|
@@ -698,6 +703,155 @@ declare function validateTask(taskId: string, target?: {
|
|
|
698
703
|
versionId?: string;
|
|
699
704
|
}, options?: WorldsClientOptions): Promise<WorldTaskValidation>;
|
|
700
705
|
|
|
706
|
+
declare const modelToolName: (name: string) => string;
|
|
707
|
+
/**
|
|
708
|
+
* Turn a world's Python signature into a JSON schema the model can call.
|
|
709
|
+
*
|
|
710
|
+
* `crm_update_deal(id, stage=None, owner=None, amount=None)` becomes an
|
|
711
|
+
* object with `id` required and the rest optional. Types are read from the
|
|
712
|
+
* DEFAULTS the world declares — a numeric default means a number, a boolean
|
|
713
|
+
* default a boolean — because that is the only type information a signature
|
|
714
|
+
* actually carries. Everything else is a string, which is what a tool CLI
|
|
715
|
+
* receives anyway.
|
|
716
|
+
*/
|
|
717
|
+
declare function schemaFromSignature(spec: WorldToolSpec): {
|
|
718
|
+
type: "function";
|
|
719
|
+
function: {
|
|
720
|
+
name: string;
|
|
721
|
+
description: string;
|
|
722
|
+
parameters: Record<string, unknown>;
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
declare const WORLD_REQUEST_VIAS: readonly ["api", "ui", "tool", "webhook"];
|
|
727
|
+
/** One request with its exchange: the request's headers (credentials `[redacted]`) and the first 64 KB of each body, `null` for a body that is not text. */
|
|
728
|
+
type WorldRequestEntry = Omit<WorldRequest, "request" | "response"> & {
|
|
729
|
+
request: WorldRequest["request"] & {
|
|
730
|
+
headers: Record<string, string>;
|
|
731
|
+
body: string | null;
|
|
732
|
+
};
|
|
733
|
+
response: WorldRequest["response"] & {
|
|
734
|
+
body: string | null;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
type WorldRequestFilter = {
|
|
738
|
+
session?: string;
|
|
739
|
+
version?: string;
|
|
740
|
+
via?: string;
|
|
741
|
+
operation?: string;
|
|
742
|
+
status?: string;
|
|
743
|
+
since?: string;
|
|
744
|
+
until?: string;
|
|
745
|
+
cursor?: string;
|
|
746
|
+
limit?: number;
|
|
747
|
+
};
|
|
748
|
+
declare class WorldRequestFilterError extends Error {
|
|
749
|
+
}
|
|
750
|
+
/** The platform's 409 `requests_not_recorded`: the session's engine keeps no request ledger, only World Host
|
|
751
|
+
* sessions record requests. Its message is the platform's own sentence. */
|
|
752
|
+
declare class WorldRequestsNotRecorded extends Error {
|
|
753
|
+
static from(error: unknown): unknown;
|
|
754
|
+
static mapped<T>(read: Promise<T>): Promise<T>;
|
|
755
|
+
}
|
|
756
|
+
/** The filters of a request-ledger read, checked and put in the platform's form: `via` and `status` lower-cased,
|
|
757
|
+
* `since`/`until` as UTC instants (a date alone is its midnight, a time without a zone is UTC). Twin of
|
|
758
|
+
* `gatewaysdk.world_requests.WorldRequestQuery`; both run `conformance/world-request-cli.json`. */
|
|
759
|
+
declare class WorldRequestQuery {
|
|
760
|
+
private readonly entries;
|
|
761
|
+
private constructor();
|
|
762
|
+
static parse(filter?: WorldRequestFilter): WorldRequestQuery;
|
|
763
|
+
private static via;
|
|
764
|
+
private static status;
|
|
765
|
+
get filtered(): boolean;
|
|
766
|
+
params(): [string, string][];
|
|
767
|
+
search(): string;
|
|
768
|
+
}
|
|
769
|
+
/** A world's request ledger: every request the world received, from every session and version, through every
|
|
770
|
+
* door (`via`: api, ui, tool, webhook), kept for the world's life. Reading it records nothing. Twin of
|
|
771
|
+
* `gatewaysdk.world_requests.WorldRequestLedger`. */
|
|
772
|
+
declare class WorldRequestLedger {
|
|
773
|
+
private readonly options;
|
|
774
|
+
constructor(options?: WorldsClientOptions);
|
|
775
|
+
/** A page of the world's requests, newest first; `nextCursor` reads the page after it. Narrowed to a session
|
|
776
|
+
* whose engine records none: `WorldRequestsNotRecorded`. */
|
|
777
|
+
list(slug: string, query?: WorldRequestQuery): Promise<WorldRequestPage>;
|
|
778
|
+
/** One of the world's requests, with its headers and bodies. */
|
|
779
|
+
get(slug: string, requestId: string): Promise<WorldRequestEntry>;
|
|
780
|
+
/** A page of one session's requests, newest first; `WorldRequestsNotRecorded` when its engine records none. */
|
|
781
|
+
forSession(sessionId: string, query?: WorldRequestQuery): Promise<WorldRequestPage>;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/** One entry of a world's request ledger as a list carries it: what was asked
|
|
785
|
+
* and what came back, without its headers and bodies. */
|
|
786
|
+
type WorldRequest = {
|
|
787
|
+
id: string;
|
|
788
|
+
seq: number;
|
|
789
|
+
at: string;
|
|
790
|
+
durationMs: number | null;
|
|
791
|
+
worldSlug: string;
|
|
792
|
+
sessionId: string;
|
|
793
|
+
versionId: string;
|
|
794
|
+
via: (typeof WORLD_REQUEST_VIAS)[number] | null;
|
|
795
|
+
operation: string | null;
|
|
796
|
+
method: string | null;
|
|
797
|
+
path: string | null;
|
|
798
|
+
query: Record<string, unknown>;
|
|
799
|
+
request: {
|
|
800
|
+
bodyBytes: number | null;
|
|
801
|
+
truncated: boolean;
|
|
802
|
+
contentType: string | null;
|
|
803
|
+
};
|
|
804
|
+
response: {
|
|
805
|
+
status: number;
|
|
806
|
+
bodyBytes: number | null;
|
|
807
|
+
truncated: boolean;
|
|
808
|
+
contentType: string | null;
|
|
809
|
+
};
|
|
810
|
+
rows: number | null;
|
|
811
|
+
found: boolean | null;
|
|
812
|
+
};
|
|
813
|
+
/** One page of a ledger list, newest first, with what its scope did not record: `shed` requests kept without
|
|
814
|
+
* their headers and bodies, `lost` requests a host counted as never recorded or the platform refused, and
|
|
815
|
+
* `hostsLost` hosts lost before they stored every request, whose unsent requests no count holds; none of them on
|
|
816
|
+
* a page whose filters narrow past its world, session or version. */
|
|
817
|
+
type WorldRequestPage = {
|
|
818
|
+
requests: WorldRequest[];
|
|
819
|
+
nextCursor: string | null;
|
|
820
|
+
shed?: number;
|
|
821
|
+
lost?: number;
|
|
822
|
+
hostsLost?: number;
|
|
823
|
+
};
|
|
824
|
+
/** The one line every reader shows for a page's `shed`, `lost` and `hostsLost`, none when all are 0; twin of
|
|
825
|
+
* `worldRequestsUnrecorded` in the platform and `unrecorded` in `gatewaysdk/world_requests.py`, all pinned to
|
|
826
|
+
* `conformance/world-request-log.json` `unrecorded`. */
|
|
827
|
+
declare function worldRequestsUnrecorded(counts: {
|
|
828
|
+
shed?: unknown;
|
|
829
|
+
lost?: unknown;
|
|
830
|
+
hostsLost?: unknown;
|
|
831
|
+
}): string | null;
|
|
832
|
+
/**
|
|
833
|
+
* A session's entries in its world's request ledger: every request the world
|
|
834
|
+
* received, through every door (`via`: api, ui, tool, webhook), kept for the life of
|
|
835
|
+
* the world. Read page by page without recording anything in the session; the
|
|
836
|
+
* platform's call ledger (`export()`) holds what it brokered — tool calls,
|
|
837
|
+
* seeds, grades. One entry's headers and bodies are `GET
|
|
838
|
+
* worlds/{slug}/requests/{requestId}`.
|
|
839
|
+
*/
|
|
840
|
+
declare class WorldRequestLog {
|
|
841
|
+
readonly requests: WorldRequest[];
|
|
842
|
+
readonly notRecorded: string | null;
|
|
843
|
+
readonly unrecorded: string | null;
|
|
844
|
+
private constructor();
|
|
845
|
+
/** Every entry the ledger holds for the session, oldest first, and the line for what it did not record;
|
|
846
|
+
* for a session the World Host did not serve, none, and `notRecorded` says why. */
|
|
847
|
+
static load(session: WorldSession): Promise<WorldRequestLog>;
|
|
848
|
+
private static pages;
|
|
849
|
+
/** Each entry in the shape of a ledger line, `kind: "request"`, so one JSONL
|
|
850
|
+
* file holds both: `args` what was asked, `result` what came back under the
|
|
851
|
+
* entry's `requestId`. */
|
|
852
|
+
asCalls(): WorldSessionCall[];
|
|
853
|
+
}
|
|
854
|
+
|
|
701
855
|
/**
|
|
702
856
|
* A world's grade as the SDK reads it, by the one score rule every grader
|
|
703
857
|
* answers by: a finite number from 0 to 1, a passed check 1, a failed one 0,
|
|
@@ -762,99 +916,6 @@ declare class GradePayload {
|
|
|
762
916
|
private static failed;
|
|
763
917
|
}
|
|
764
918
|
|
|
765
|
-
/**
|
|
766
|
-
* The three shapes a task reaches `openSession` in — a bundled scenario's
|
|
767
|
-
* name, a stored task's `{ id, version? }`, an inline spec — and how each is
|
|
768
|
-
* told apart, labelled and checked. No task at all (`undefined`) is the
|
|
769
|
-
* fourth case, an exploratory session, and is not a ref.
|
|
770
|
-
*/
|
|
771
|
-
declare const isTaskIdRef: (task: WorldTaskRef) => task is WorldTaskIdRef;
|
|
772
|
-
declare const isTaskSpec: (task: WorldTaskRef) => task is WorldTaskSpec;
|
|
773
|
-
/** The label a task goes by in results: its name, `inline:<hash>` for an
|
|
774
|
-
* unnamed inline task once the platform has hashed it, or the stored task's
|
|
775
|
-
* name (its id until the platform has answered). */
|
|
776
|
-
declare const taskLabel: (task: WorldTaskRef, info?: WorldSessionTask | null) => string;
|
|
777
|
-
/** A task given to `openSession` must be one of the three shapes. */
|
|
778
|
-
declare const assertTaskRef: (task: WorldTaskRef) => void;
|
|
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
|
-
|
|
794
|
-
/**
|
|
795
|
-
* LIVE WORLD SESSIONS from TypeScript: your agent, the platform's container.
|
|
796
|
-
*
|
|
797
|
-
* The other two ways of running a world each give up something. Pulling the
|
|
798
|
-
* bundle and executing it locally tests your agent against a COPY — your
|
|
799
|
-
* python, your sqlite, your machine's idea of the environment. Dispatching a
|
|
800
|
-
* hosted run gives you the real container but runs the platform's agent
|
|
801
|
-
* inside it, so your agent never touches the world.
|
|
802
|
-
*
|
|
803
|
-
* A session is both: the platform boots the task's container and holds it
|
|
804
|
-
* warm, and every `call()` here executes inside THAT container. Your agent
|
|
805
|
-
* stays where it is — this file is just the wire.
|
|
806
|
-
*
|
|
807
|
-
* const world = await openWorld("revenue-ops-sim@main");
|
|
808
|
-
* const session = await openSession(world.slug, { task: "revops-mara-dedupe-contacts" });
|
|
809
|
-
* await session.ready(); // wait for the container
|
|
810
|
-
* await session.call("crm_search", { entity: "deals" });
|
|
811
|
-
* await session.withTraceContext(() => myAgent(session)); // traced under session.sessionId
|
|
812
|
-
* const { reward, rewards } = await session.grade();
|
|
813
|
-
* await session.close({ keepWarm: true }); // hand it back to the pool
|
|
814
|
-
*
|
|
815
|
-
* The task can also be YOURS rather than the bundle's — an instruction, the
|
|
816
|
-
* rows the session starts with and how it is graded, for one end user:
|
|
817
|
-
*
|
|
818
|
-
* const session = await openSession("acme-billing@main", {
|
|
819
|
-
* task: {
|
|
820
|
-
* instruction: "Mark invoice INV-7 as paid.",
|
|
821
|
-
* seed: { rows: { invoices: [{ id: "INV-7", status: "open" }] } },
|
|
822
|
-
* grader: { kind: "assertions", checks: [
|
|
823
|
-
* { entity: "invoices", where: { id: "INV-7", status: "paid" } },
|
|
824
|
-
* ] },
|
|
825
|
-
* metadata: { externalUserId: "u_42" },
|
|
826
|
-
* },
|
|
827
|
-
* surfaces: ["api"],
|
|
828
|
-
* });
|
|
829
|
-
*
|
|
830
|
-
* Every call is a row on the platform before it is an effect in a container,
|
|
831
|
-
* so the episode is on the record — and the platform traces the session
|
|
832
|
-
* itself, which is why these sessions show up under Sessions without the
|
|
833
|
-
* caller instrumenting anything.
|
|
834
|
-
*/
|
|
835
|
-
type WorldToolSpec = {
|
|
836
|
-
name: string;
|
|
837
|
-
/** The world's own signature, e.g. `crm_search(q=None, entity="deals")`. */
|
|
838
|
-
signature: string;
|
|
839
|
-
doc: string | null;
|
|
840
|
-
inputSchema?: Record<string, unknown>;
|
|
841
|
-
};
|
|
842
|
-
/** What a model needs to call a world: the schemas to advertise, and the
|
|
843
|
-
* implementations that run them in the container. */
|
|
844
|
-
type WorldToolkit = {
|
|
845
|
-
/** OpenAI-shaped tool definitions, derived from the world's signatures. */
|
|
846
|
-
schemas: {
|
|
847
|
-
type: "function";
|
|
848
|
-
function: {
|
|
849
|
-
name: string;
|
|
850
|
-
description: string;
|
|
851
|
-
parameters: Record<string, unknown>;
|
|
852
|
-
};
|
|
853
|
-
}[];
|
|
854
|
-
/** name -> implementation, each one a call into THIS session. */
|
|
855
|
-
impls: Record<string, (args: Record<string, unknown>) => Promise<unknown>>;
|
|
856
|
-
specs: WorldToolSpec[];
|
|
857
|
-
};
|
|
858
919
|
/** A JSON scalar: what `where` filters and field predicates compare against. */
|
|
859
920
|
type WorldTaskScalar = string | number | boolean | null;
|
|
860
921
|
/** The rows a task starts the session with — the `seed()` contract, applied
|
|
@@ -896,6 +957,10 @@ type WorldTaskCheck = {
|
|
|
896
957
|
field?: string;
|
|
897
958
|
op?: WorldTaskFieldOp;
|
|
898
959
|
value?: WorldTaskScalar | WorldTaskScalar[];
|
|
960
|
+
/** On `gateway_requests` or `calls`: only the requests before the first one this matches. */
|
|
961
|
+
before?: Record<string, WorldTaskScalar>;
|
|
962
|
+
/** On `gateway_requests` or `calls`: only the requests after the first one this matches. */
|
|
963
|
+
after?: Record<string, WorldTaskScalar>;
|
|
899
964
|
};
|
|
900
965
|
/** One thing a rubric judge scores in [0, 1]; `id` names its entry in
|
|
901
966
|
* `rewards`, `weight` (default 1) its share of the task's reward. */
|
|
@@ -928,6 +993,8 @@ type WorldTaskGrader = {
|
|
|
928
993
|
kind: "python";
|
|
929
994
|
source: string;
|
|
930
995
|
timeoutSeconds?: number;
|
|
996
|
+
readsJournal?: boolean;
|
|
997
|
+
acceptsIncompleteJournal?: boolean;
|
|
931
998
|
} | WorldTaskRubricGrader;
|
|
932
999
|
/** A task supplied at open, for one session, instead of a bundled scenario.
|
|
933
1000
|
* `instruction` is what the agent is told; without `seed` the session starts
|
|
@@ -995,6 +1062,101 @@ type WorldSessionTask = {
|
|
|
995
1062
|
version?: number | null;
|
|
996
1063
|
metadata: Record<string, unknown>;
|
|
997
1064
|
};
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* The three shapes a task reaches `openSession` in — a bundled scenario's
|
|
1068
|
+
* name, a stored task's `{ id, version? }`, an inline spec — and how each is
|
|
1069
|
+
* told apart, labelled and checked. No task at all (`undefined`) is the
|
|
1070
|
+
* fourth case, an exploratory session, and is not a ref.
|
|
1071
|
+
*/
|
|
1072
|
+
declare const isTaskIdRef: (task: WorldTaskRef) => task is WorldTaskIdRef;
|
|
1073
|
+
declare const isTaskSpec: (task: WorldTaskRef) => task is WorldTaskSpec;
|
|
1074
|
+
/** The label a task goes by in results: its name, `inline:<hash>` for an
|
|
1075
|
+
* unnamed inline task once the platform has hashed it, or the stored task's
|
|
1076
|
+
* name (its id until the platform has answered). */
|
|
1077
|
+
declare const taskLabel: (task: WorldTaskRef, info?: WorldSessionTask | null) => string;
|
|
1078
|
+
/** A task given to `openSession` must be one of the three shapes. */
|
|
1079
|
+
declare const assertTaskRef: (task: WorldTaskRef) => void;
|
|
1080
|
+
|
|
1081
|
+
declare class WorldSessionTimeout extends Error {
|
|
1082
|
+
}
|
|
1083
|
+
declare class WorldSessionCallError extends Error {
|
|
1084
|
+
}
|
|
1085
|
+
/** The session ended before it was ready: it FAILED to open, or was STOPPED.
|
|
1086
|
+
* `code` is the platform's when it named one; `browser_capacity` and
|
|
1087
|
+
* `host_unavailable` are worth opening again. */
|
|
1088
|
+
declare class WorldSessionOpenFailed extends WorldSessionCallError {
|
|
1089
|
+
readonly sessionId: string;
|
|
1090
|
+
readonly state: string;
|
|
1091
|
+
readonly code: string | null;
|
|
1092
|
+
constructor(sessionId: string, state: string, code: string | null, reason: string | null);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* LIVE WORLD SESSIONS from TypeScript: your agent, the platform's container.
|
|
1097
|
+
*
|
|
1098
|
+
* The other two ways of running a world each give up something. Pulling the
|
|
1099
|
+
* bundle and executing it locally tests your agent against a COPY — your
|
|
1100
|
+
* python, your sqlite, your machine's idea of the environment. Dispatching a
|
|
1101
|
+
* hosted run gives you the real container but runs the platform's agent
|
|
1102
|
+
* inside it, so your agent never touches the world.
|
|
1103
|
+
*
|
|
1104
|
+
* A session is both: the platform boots the task's container and holds it
|
|
1105
|
+
* warm, and every `call()` here executes inside THAT container. Your agent
|
|
1106
|
+
* stays where it is — this file is just the wire.
|
|
1107
|
+
*
|
|
1108
|
+
* const world = await openWorld("revenue-ops-sim@main");
|
|
1109
|
+
* const session = await openSession(world.slug, { task: "revops-mara-dedupe-contacts" });
|
|
1110
|
+
* await session.ready(); // wait for the container
|
|
1111
|
+
* await session.call("crm_search", { entity: "deals" });
|
|
1112
|
+
* await session.withTraceContext(() => myAgent(session)); // traced under session.sessionId
|
|
1113
|
+
* const { reward, rewards } = await session.grade();
|
|
1114
|
+
* await session.close({ keepWarm: true }); // hand it back to the pool
|
|
1115
|
+
*
|
|
1116
|
+
* The task can also be YOURS rather than the bundle's — an instruction, the
|
|
1117
|
+
* rows the session starts with and how it is graded, for one end user:
|
|
1118
|
+
*
|
|
1119
|
+
* const session = await openSession("acme-billing@main", {
|
|
1120
|
+
* task: {
|
|
1121
|
+
* instruction: "Mark invoice INV-7 as paid.",
|
|
1122
|
+
* seed: { rows: { invoices: [{ id: "INV-7", status: "open" }] } },
|
|
1123
|
+
* grader: { kind: "assertions", checks: [
|
|
1124
|
+
* { entity: "invoices", where: { id: "INV-7", status: "paid" } },
|
|
1125
|
+
* ] },
|
|
1126
|
+
* metadata: { externalUserId: "u_42" },
|
|
1127
|
+
* },
|
|
1128
|
+
* surfaces: ["api"],
|
|
1129
|
+
* });
|
|
1130
|
+
*
|
|
1131
|
+
* Every call is a row on the platform before it is an effect in a container,
|
|
1132
|
+
* so the episode is on the record — and the platform traces the session
|
|
1133
|
+
* itself, which is why these sessions show up under Sessions without the
|
|
1134
|
+
* caller instrumenting anything.
|
|
1135
|
+
*/
|
|
1136
|
+
type WorldToolSpec = {
|
|
1137
|
+
name: string;
|
|
1138
|
+
/** The world's own signature, e.g. `crm_search(q=None, entity="deals")`. */
|
|
1139
|
+
signature: string;
|
|
1140
|
+
doc: string | null;
|
|
1141
|
+
inputSchema?: Record<string, unknown>;
|
|
1142
|
+
};
|
|
1143
|
+
/** What a model needs to call a world: the schemas to advertise, and the
|
|
1144
|
+
* implementations that run them in the container. */
|
|
1145
|
+
type WorldToolkit = {
|
|
1146
|
+
/** OpenAI-shaped tool definitions, derived from the world's signatures. */
|
|
1147
|
+
schemas: {
|
|
1148
|
+
type: "function";
|
|
1149
|
+
function: {
|
|
1150
|
+
name: string;
|
|
1151
|
+
description: string;
|
|
1152
|
+
parameters: Record<string, unknown>;
|
|
1153
|
+
};
|
|
1154
|
+
}[];
|
|
1155
|
+
/** name -> implementation, each one a call into THIS session. */
|
|
1156
|
+
impls: Record<string, (args: Record<string, unknown>) => Promise<unknown>>;
|
|
1157
|
+
specs: WorldToolSpec[];
|
|
1158
|
+
};
|
|
1159
|
+
|
|
998
1160
|
type SeedResult = {
|
|
999
1161
|
seeded: number;
|
|
1000
1162
|
mode: "append" | "replace";
|
|
@@ -1041,6 +1203,17 @@ type WorldSessionState = {
|
|
|
1041
1203
|
message: string;
|
|
1042
1204
|
} | null;
|
|
1043
1205
|
};
|
|
1206
|
+
/** A request the old world received has an `at` before `boundaryAt`; one the new world received, after it. */
|
|
1207
|
+
type WorldSessionRestart = {
|
|
1208
|
+
previousVersionId: string;
|
|
1209
|
+
versionId: string;
|
|
1210
|
+
pin: {
|
|
1211
|
+
ref: string | null;
|
|
1212
|
+
versionId: string | null;
|
|
1213
|
+
};
|
|
1214
|
+
boundarySeq: number;
|
|
1215
|
+
boundaryAt: string;
|
|
1216
|
+
};
|
|
1044
1217
|
/** One notice a worlds-path answer carries: a deprecated shape or layout
|
|
1045
1218
|
* and the command that replaces it. A retired shape is refused instead,
|
|
1046
1219
|
* with the stable message prefix `world_kind_retired:`. */
|
|
@@ -1050,25 +1223,6 @@ type WorldDeprecation = {
|
|
|
1050
1223
|
replacement: string;
|
|
1051
1224
|
};
|
|
1052
1225
|
|
|
1053
|
-
declare const modelToolName: (name: string) => string;
|
|
1054
|
-
/**
|
|
1055
|
-
* Turn a world's Python signature into a JSON schema the model can call.
|
|
1056
|
-
*
|
|
1057
|
-
* `crm_update_deal(id, stage=None, owner=None, amount=None)` becomes an
|
|
1058
|
-
* object with `id` required and the rest optional. Types are read from the
|
|
1059
|
-
* DEFAULTS the world declares — a numeric default means a number, a boolean
|
|
1060
|
-
* default a boolean — because that is the only type information a signature
|
|
1061
|
-
* actually carries. Everything else is a string, which is what a tool CLI
|
|
1062
|
-
* receives anyway.
|
|
1063
|
-
*/
|
|
1064
|
-
declare function schemaFromSignature(spec: WorldToolSpec): {
|
|
1065
|
-
type: "function";
|
|
1066
|
-
function: {
|
|
1067
|
-
name: string;
|
|
1068
|
-
description: string;
|
|
1069
|
-
parameters: Record<string, unknown>;
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
1226
|
declare class WorldSession {
|
|
1073
1227
|
readonly sessionId: string;
|
|
1074
1228
|
private current;
|
|
@@ -1102,9 +1256,9 @@ declare class WorldSession {
|
|
|
1102
1256
|
surfaces(): Promise<SessionSurfaces>;
|
|
1103
1257
|
/** Base URL of the world's own HTTP API for this session. */
|
|
1104
1258
|
api(): Promise<string>;
|
|
1105
|
-
/** Headers every request to `api()` needs
|
|
1106
|
-
*
|
|
1107
|
-
* world's own declared auth
|
|
1259
|
+
/** Headers every request to `api()` needs: a World Host session's token in the
|
|
1260
|
+
* platform's `X-World-Session` header, which every world takes; `{}` for a pod
|
|
1261
|
+
* or hosted twin, which answers with the world's own declared auth. */
|
|
1108
1262
|
apiHeaders(): Promise<Record<string, string>>;
|
|
1109
1263
|
/** URL of the world's UI entry page for this session. */
|
|
1110
1264
|
ui(): Promise<string>;
|
|
@@ -1139,6 +1293,14 @@ declare class WorldSession {
|
|
|
1139
1293
|
nativeComputer<P extends NativeComputerProvider = "anthropic">(browser: WorldBrowser, provider?: P, options?: NativeComputerOptions): NativeComputerKinds[P];
|
|
1140
1294
|
/** The session's latest platform state (one request, no waiting). */
|
|
1141
1295
|
status(): Promise<WorldSessionState>;
|
|
1296
|
+
/** The world started over under the same id, URLs and token, on what its pin (or `version`, which becomes
|
|
1297
|
+
* its pin) resolves to now: base data plus the task's seed. A grade then reads only the new world's requests. */
|
|
1298
|
+
restart(opts?: {
|
|
1299
|
+
version?: string;
|
|
1300
|
+
}): Promise<WorldSessionState & {
|
|
1301
|
+
restart: WorldSessionRestart;
|
|
1302
|
+
}>;
|
|
1303
|
+
private refresh;
|
|
1142
1304
|
/**
|
|
1143
1305
|
* Wait until the session answers calls: a World Host holds it, or the
|
|
1144
1306
|
* process inside a pod has asked the platform for work. Throws
|
|
@@ -1220,6 +1382,14 @@ declare class WorldSession {
|
|
|
1220
1382
|
reset(opts?: {
|
|
1221
1383
|
timeoutMs?: number;
|
|
1222
1384
|
}): Promise<void>;
|
|
1385
|
+
/** One page of the session's entries in its world's request ledger, newest
|
|
1386
|
+
* first and without bodies: at most `limit` after `cursor` (the last page's
|
|
1387
|
+
* `nextCursor`). Reading it records nothing in the session. */
|
|
1388
|
+
requests(opts?: {
|
|
1389
|
+
cursor?: string;
|
|
1390
|
+
limit?: number;
|
|
1391
|
+
}): Promise<WorldRequestPage>;
|
|
1392
|
+
private page;
|
|
1223
1393
|
/** The session's call log, oldest first: every tool call, seed, reset,
|
|
1224
1394
|
* grade with its result — the record of the episode. */
|
|
1225
1395
|
export(): Promise<WorldSessionCall[]>;
|
|
@@ -1274,6 +1444,10 @@ type OpenSessionOptions = {
|
|
|
1274
1444
|
/** Capacity for a World Host session's browser: `standard` (spot, may be
|
|
1275
1445
|
* reclaimed) or `premium` (on-demand). Unset, the organization's default. */
|
|
1276
1446
|
browserTier?: BrowserTier;
|
|
1447
|
+
/** `open`: the session asks for no credential; its api and ui answer on a
|
|
1448
|
+
* capability hostname whose url is the secret. Unset, the world's
|
|
1449
|
+
* `[auth] mode`. World Host sessions only. */
|
|
1450
|
+
auth?: SessionAuthMode;
|
|
1277
1451
|
options?: WorldsClientOptions;
|
|
1278
1452
|
};
|
|
1279
1453
|
/**
|
|
@@ -1409,6 +1583,15 @@ declare function runSessions(opts: {
|
|
|
1409
1583
|
*/
|
|
1410
1584
|
declare const SURFACE_KINDS: readonly ["tools", "api", "ui", "browser"];
|
|
1411
1585
|
type WorldSurfaceKind = (typeof SURFACE_KINDS)[number];
|
|
1586
|
+
/** The platform's own header for a session's token, which a World Host takes on
|
|
1587
|
+
* every world whatever its vendor's auth; no vendor's client sends it. */
|
|
1588
|
+
declare const PLATFORM_SESSION_HEADER = "X-World-Session";
|
|
1589
|
+
declare const SESSION_AUTH_MODES: readonly ["vendor", "open"];
|
|
1590
|
+
/** `open`: the session asks for no credential, reached on its capability
|
|
1591
|
+
* hostname alone; `vendor`: the session's token, the way the world's `[auth]`
|
|
1592
|
+
* says its vendor takes a key. Unset, the world's `[auth] mode`. */
|
|
1593
|
+
type SessionAuthMode = (typeof SESSION_AUTH_MODES)[number];
|
|
1594
|
+
declare function assertSessionAuthMode(value: unknown): asserts value is SessionAuthMode;
|
|
1412
1595
|
/** Capacity behind a World Host session's browser. `standard` runs on spot
|
|
1413
1596
|
* capacity first (about half the price) and may be reclaimed with two
|
|
1414
1597
|
* minutes' notice, ending the browser but never the world; `premium` is
|
|
@@ -1436,11 +1619,14 @@ type SessionSurfaces = {
|
|
|
1436
1619
|
};
|
|
1437
1620
|
api?: {
|
|
1438
1621
|
url: string;
|
|
1439
|
-
/** Per-session credential of a World Host session: send it
|
|
1440
|
-
* `
|
|
1441
|
-
*
|
|
1442
|
-
* itself answers with its declared auth (a pod or a customer-hosted twin)
|
|
1622
|
+
/** Per-session credential of a World Host session: send it in the
|
|
1623
|
+
* platform's `X-World-Session` header (`apiHeaders()`), or the way the
|
|
1624
|
+
* world's `[auth]` says its vendor takes a key. Absent when the world
|
|
1625
|
+
* itself answers with its declared auth (a pod or a customer-hosted twin),
|
|
1626
|
+
* and for an open session, whose url is its secret. */
|
|
1443
1627
|
token?: string;
|
|
1628
|
+
/** `open`: `url` is the session's capability hostname; send no credential. */
|
|
1629
|
+
auth?: "open";
|
|
1444
1630
|
};
|
|
1445
1631
|
ui?: {
|
|
1446
1632
|
url: string;
|
|
@@ -1450,8 +1636,10 @@ type SessionSurfaces = {
|
|
|
1450
1636
|
apiPath?: string | null;
|
|
1451
1637
|
/** Per-session credential of a World Host UI. A browser navigation cannot
|
|
1452
1638
|
* carry a header, so the first page load presents it once as `?token=`
|
|
1453
|
-
* and the host answers with an HttpOnly cookie. Absent for pod UIs
|
|
1639
|
+
* and the host answers with an HttpOnly cookie. Absent for pod UIs and
|
|
1640
|
+
* open sessions. */
|
|
1454
1641
|
token?: string;
|
|
1642
|
+
auth?: "open";
|
|
1455
1643
|
};
|
|
1456
1644
|
browser?: {
|
|
1457
1645
|
wsUrl: string;
|
|
@@ -1529,10 +1717,10 @@ type BrowserActionEvent = {
|
|
|
1529
1717
|
/** base64 JPEG of the screen after the action; null if it could not be taken. */
|
|
1530
1718
|
screenshot: string | null;
|
|
1531
1719
|
};
|
|
1532
|
-
/**
|
|
1533
|
-
*
|
|
1534
|
-
*
|
|
1535
|
-
|
|
1720
|
+
/** The secret label of an open session's capability hostname in `url`
|
|
1721
|
+
* (`o-<sid>-<label>[-api].<domain>`), else null: a credential, scrubbed from
|
|
1722
|
+
* everything a browser records. Twin of the Python `capability_label`. */
|
|
1723
|
+
declare function capabilityLabel(url: string | null | undefined): string | null;
|
|
1536
1724
|
declare function redactActionArgs(action: string, args: Record<string, unknown>): Record<string, unknown>;
|
|
1537
1725
|
/**
|
|
1538
1726
|
* Ships browser action events to the platform, off the action's hot path.
|
|
@@ -1775,6 +1963,12 @@ declare const CALL_BODY_LIMIT_BYTES: number;
|
|
|
1775
1963
|
declare const CALL_BODY_LIMIT_LABEL = "4mb";
|
|
1776
1964
|
/** `session status` warns once an unpinned session has less than this left. */
|
|
1777
1965
|
declare const IDLE_WARNING_MINUTES = 5;
|
|
1966
|
+
/** The most entries one page of a world's request ledger holds. */
|
|
1967
|
+
declare const REQUEST_LOG_PAGE_MAX = 200;
|
|
1968
|
+
/** How much of each body the request ledger keeps: the first this many bytes of its text. */
|
|
1969
|
+
declare const REQUEST_BODY_CAPTURE_BYTES: number;
|
|
1970
|
+
/** The code a session the World Host did not serve answers its request ledger read with. */
|
|
1971
|
+
declare const REQUESTS_NOT_RECORDED = "requests_not_recorded";
|
|
1778
1972
|
/** The task an exploratory session runs on when the caller names none, and
|
|
1779
1973
|
* the `task.source` the platform reports for it. */
|
|
1780
1974
|
declare const EXPLORATORY_TASK: Readonly<{
|
|
@@ -1809,6 +2003,101 @@ declare const stillStartingHint: (sessionId: string) => string;
|
|
|
1809
2003
|
* `IDLE_WARNING_MINUTES` left, else null. `now` is for tests. */
|
|
1810
2004
|
declare function idleWarning(idleExpiresAt: string | null | undefined, now?: Date): string | null;
|
|
1811
2005
|
|
|
2006
|
+
type TaskTrialRequest = {
|
|
2007
|
+
seq: number;
|
|
2008
|
+
at: string;
|
|
2009
|
+
via: string | null;
|
|
2010
|
+
operation: string | null;
|
|
2011
|
+
method: string | null;
|
|
2012
|
+
path: string | null;
|
|
2013
|
+
status: number;
|
|
2014
|
+
};
|
|
2015
|
+
type TaskTrialCheck = {
|
|
2016
|
+
passed: boolean;
|
|
2017
|
+
reason?: string;
|
|
2018
|
+
matched: TaskTrialRequest[];
|
|
2019
|
+
maybe: TaskTrialRequest[];
|
|
2020
|
+
};
|
|
2021
|
+
type GradedJournal = {
|
|
2022
|
+
complete: boolean;
|
|
2023
|
+
reason: string | null;
|
|
2024
|
+
requests: number;
|
|
2025
|
+
throughSeq: number | null;
|
|
2026
|
+
};
|
|
2027
|
+
/** A task's grader over one stored World Host session, filed nowhere. */
|
|
2028
|
+
type TaskTrial = {
|
|
2029
|
+
sessionId: string;
|
|
2030
|
+
taskId: string | null;
|
|
2031
|
+
version: number | null;
|
|
2032
|
+
graded: "live" | "checkpoint" | "journal";
|
|
2033
|
+
reward: number | null;
|
|
2034
|
+
rewards: Record<string, number | null>;
|
|
2035
|
+
reasons: Record<string, string>;
|
|
2036
|
+
reason: string | null;
|
|
2037
|
+
checks: Record<string, TaskTrialCheck>;
|
|
2038
|
+
journal: GradedJournal | null;
|
|
2039
|
+
summary: {
|
|
2040
|
+
via: string | null;
|
|
2041
|
+
operation: string | null;
|
|
2042
|
+
method: string | null;
|
|
2043
|
+
status: number;
|
|
2044
|
+
count: number;
|
|
2045
|
+
path: string | null;
|
|
2046
|
+
}[];
|
|
2047
|
+
};
|
|
2048
|
+
type RegradedRollout = {
|
|
2049
|
+
sampleId: string;
|
|
2050
|
+
sessionId: string | null;
|
|
2051
|
+
state: "regraded" | "skipped";
|
|
2052
|
+
reward: number | null;
|
|
2053
|
+
previous: {
|
|
2054
|
+
reward: number | null;
|
|
2055
|
+
verifierVersion: number | null;
|
|
2056
|
+
};
|
|
2057
|
+
reason?: string;
|
|
2058
|
+
graded?: TaskTrial["graded"];
|
|
2059
|
+
rewards?: Record<string, number | null>;
|
|
2060
|
+
reasons?: Record<string, string>;
|
|
2061
|
+
};
|
|
2062
|
+
type TaskRegrade = {
|
|
2063
|
+
taskId: string;
|
|
2064
|
+
version: number;
|
|
2065
|
+
runs: {
|
|
2066
|
+
evaluationId: string;
|
|
2067
|
+
verifierVersions: number[];
|
|
2068
|
+
verifiers: string | null;
|
|
2069
|
+
reward: number | null;
|
|
2070
|
+
rollouts: RegradedRollout[];
|
|
2071
|
+
}[];
|
|
2072
|
+
regraded: number;
|
|
2073
|
+
skipped: number;
|
|
2074
|
+
};
|
|
2075
|
+
type TaskTrialTarget = {
|
|
2076
|
+
taskId: string;
|
|
2077
|
+
version?: number;
|
|
2078
|
+
} | {
|
|
2079
|
+
spec: WorldTaskSpec;
|
|
2080
|
+
};
|
|
2081
|
+
type TaskRegradeScope = {
|
|
2082
|
+
version?: number;
|
|
2083
|
+
runs?: string[];
|
|
2084
|
+
allRuns?: boolean;
|
|
2085
|
+
sessions?: string[];
|
|
2086
|
+
limit?: number;
|
|
2087
|
+
};
|
|
2088
|
+
/**
|
|
2089
|
+
* A stored task's grader over stored World Host sessions: `try` grades one
|
|
2090
|
+
* session and files nothing (each check with the journal requests it
|
|
2091
|
+
* matched), `regrade` grades a task's past runs again by one of its versions
|
|
2092
|
+
* and files the grades in place. Twin of the Python `TaskGrades`.
|
|
2093
|
+
*/
|
|
2094
|
+
declare class TaskGrades {
|
|
2095
|
+
private readonly options;
|
|
2096
|
+
constructor(options?: WorldsClientOptions);
|
|
2097
|
+
try(sessionId: string, target: TaskTrialTarget): Promise<TaskTrial>;
|
|
2098
|
+
regrade(taskId: string, scope?: TaskRegradeScope): Promise<TaskRegrade>;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
1812
2101
|
/** Where a session answers, in the shape `session open` prints and a
|
|
1813
2102
|
* `task up` manifest keeps per world. */
|
|
1814
2103
|
type SurfaceDescriptor = {
|
|
@@ -1816,6 +2105,7 @@ type SurfaceDescriptor = {
|
|
|
1816
2105
|
api?: {
|
|
1817
2106
|
url: string;
|
|
1818
2107
|
token?: string;
|
|
2108
|
+
auth?: "open";
|
|
1819
2109
|
};
|
|
1820
2110
|
ui?: {
|
|
1821
2111
|
url: string;
|
|
@@ -1838,23 +2128,17 @@ type WorldTaskWorld = {
|
|
|
1838
2128
|
grader?: WorldTaskSpec["grader"];
|
|
1839
2129
|
tools?: string[];
|
|
1840
2130
|
};
|
|
1841
|
-
/** One world's session as the platform answered it at up.
|
|
1842
|
-
* world came up on the caller's own unsealed edits (its edit session's tip
|
|
1843
|
-
* answered `main`). */
|
|
2131
|
+
/** One world's session as the platform answered it at up. */
|
|
1844
2132
|
type TaskWorldSessionState = WorldSessionState & {
|
|
1845
2133
|
alias: string;
|
|
1846
2134
|
slug: string;
|
|
1847
2135
|
ref: string;
|
|
1848
|
-
private: boolean;
|
|
1849
2136
|
reusedWarm: boolean;
|
|
1850
2137
|
};
|
|
1851
|
-
/** Which world an alias is, as recorded at up or attach.
|
|
1852
|
-
* when it is not known (attached by task id, or a manifest written before
|
|
1853
|
-
* the platform reported it). */
|
|
2138
|
+
/** Which world an alias is, as recorded at up or attach. */
|
|
1854
2139
|
type TaskWorldRef = {
|
|
1855
2140
|
slug: string;
|
|
1856
2141
|
ref: string | null;
|
|
1857
|
-
private: boolean | null;
|
|
1858
2142
|
};
|
|
1859
2143
|
/** What `POST /world-task-sessions` answers. */
|
|
1860
2144
|
type TaskSessionsResponse = {
|
|
@@ -1870,7 +2154,6 @@ type TaskSessionsResponse = {
|
|
|
1870
2154
|
type TaskManifestSession = {
|
|
1871
2155
|
slug: string;
|
|
1872
2156
|
ref: string | null;
|
|
1873
|
-
private: boolean | null;
|
|
1874
2157
|
versionId: string;
|
|
1875
2158
|
sessionId: string;
|
|
1876
2159
|
ready: boolean;
|
|
@@ -2079,11 +2362,9 @@ type RunTaskSummary = {
|
|
|
2079
2362
|
rewards: Record<string, number>;
|
|
2080
2363
|
ungraded: string[];
|
|
2081
2364
|
agentError: string | null;
|
|
2082
|
-
/** Why the run stopped short of a grade
|
|
2083
|
-
* interrupt. Filed failed with this as its reason. */
|
|
2365
|
+
/** Why the run stopped short of a grade (a world that never came up, an interrupt); filed FAILED with it. */
|
|
2084
2366
|
runError: string | null;
|
|
2085
|
-
/** The grade's errors on one line
|
|
2086
|
-
* grade, or two rewards under one key. Filed failed with this as its reason. */
|
|
2367
|
+
/** The grade's errors on one line (a world or verifier that could not grade, two rewards under one key); filed FAILED with it. */
|
|
2087
2368
|
gradeError: string | null;
|
|
2088
2369
|
/** Why the evaluation could not be filed; `filed` is then false. */
|
|
2089
2370
|
fileError: string | null;
|
|
@@ -2168,20 +2449,180 @@ type Checkout = {
|
|
|
2168
2449
|
title?: string;
|
|
2169
2450
|
};
|
|
2170
2451
|
};
|
|
2171
|
-
type Env = Record<string, string | undefined>;
|
|
2172
|
-
/** Labels for the reader, never used to authorize. The PR comes from `GATEWAY_PR_URL`
|
|
2173
|
-
* (+ `GATEWAY_PR_TITLE`), else GitHub Actions' `GITHUB_REF=refs/pull/<n>/merge`. */
|
|
2174
|
-
declare class CheckoutProvenance {
|
|
2175
|
-
private readonly cwd;
|
|
2176
|
-
private readonly env;
|
|
2177
|
-
constructor(cwd: string, env: Env);
|
|
2178
|
-
static read(cwd?: string, env?: Env): Checkout;
|
|
2179
|
-
checkout(): Checkout;
|
|
2180
|
-
/** Security: credentials are stripped; scp-style `git@host:org/repo` has none and is kept. */
|
|
2181
|
-
static withoutCredentials(url: string): string;
|
|
2182
|
-
private withPr;
|
|
2183
|
-
private pullRequest;
|
|
2184
|
-
private git;
|
|
2452
|
+
type Env = Record<string, string | undefined>;
|
|
2453
|
+
/** Labels for the reader, never used to authorize. The PR comes from `GATEWAY_PR_URL`
|
|
2454
|
+
* (+ `GATEWAY_PR_TITLE`), else GitHub Actions' `GITHUB_REF=refs/pull/<n>/merge`. */
|
|
2455
|
+
declare class CheckoutProvenance {
|
|
2456
|
+
private readonly cwd;
|
|
2457
|
+
private readonly env;
|
|
2458
|
+
constructor(cwd: string, env: Env);
|
|
2459
|
+
static read(cwd?: string, env?: Env): Checkout;
|
|
2460
|
+
checkout(): Checkout;
|
|
2461
|
+
/** Security: credentials are stripped; scp-style `git@host:org/repo` has none and is kept. */
|
|
2462
|
+
static withoutCredentials(url: string): string;
|
|
2463
|
+
private withPr;
|
|
2464
|
+
private pullRequest;
|
|
2465
|
+
private git;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Edit sessions: the version control unit for a world. Every write this
|
|
2470
|
+
* credential makes to a world (push, sandbox commit, data import, MCP, the
|
|
2471
|
+
* console editor) joins ONE open session per world per credential and lands
|
|
2472
|
+
* on that session's private branch; `close` seals the session into a version
|
|
2473
|
+
* on `main`, and a session nobody touches for an hour seals itself. Sessions
|
|
2474
|
+
* replace product-level proposals/PRs: `rollback` undoes a sealed session
|
|
2475
|
+
* (source + data together) as a new, itself-reversible session.
|
|
2476
|
+
*
|
|
2477
|
+
* One client under both `gateway worlds edit …` and `gateway bench edit …`;
|
|
2478
|
+
* the Python twin is `gatewaysdk.benchmark_hub.edit_sessions.WorldEditClient`.
|
|
2479
|
+
*/
|
|
2480
|
+
/** The person behind a credential: named while a member of the organization, otherwise a former member with no id. */
|
|
2481
|
+
type ActingUser = {
|
|
2482
|
+
status: "member";
|
|
2483
|
+
id: string;
|
|
2484
|
+
name: string | null;
|
|
2485
|
+
} | {
|
|
2486
|
+
status: "former";
|
|
2487
|
+
};
|
|
2488
|
+
/** Mirrors `WorldEditSessionSchema` (web/features/public-api/types/world-edits.ts). */
|
|
2489
|
+
type EditSessionSummary = {
|
|
2490
|
+
id: string;
|
|
2491
|
+
containerId: string;
|
|
2492
|
+
/** `apikey:<id>` for CLI/sandbox/MCP, `user:<id>` for the console, `agent:<id>` for the platform agent. */
|
|
2493
|
+
actor: string;
|
|
2494
|
+
/** The person behind `actor`, for a secret key or a member; null for a public key or when unknown. */
|
|
2495
|
+
actingUser: ActingUser | null;
|
|
2496
|
+
door: string;
|
|
2497
|
+
status: "open" | "sealing" | "sealed" | "conflict" | "expired" | "discarded" | string;
|
|
2498
|
+
baseVersionId: string | null;
|
|
2499
|
+
tipVersionId: string | null;
|
|
2500
|
+
sealedVersionId: string | null;
|
|
2501
|
+
editCount: number;
|
|
2502
|
+
startedAt: string;
|
|
2503
|
+
lastEditAt: string;
|
|
2504
|
+
expiresAt: string;
|
|
2505
|
+
closedAt: string | null;
|
|
2506
|
+
closeReason: string | null;
|
|
2507
|
+
conflictPaths: string[] | null;
|
|
2508
|
+
rollbackOfId: string | null;
|
|
2509
|
+
message: string | null;
|
|
2510
|
+
/** Set when `task edit close` sealed this session together with a task's other worlds. */
|
|
2511
|
+
sealGroupId: string | null;
|
|
2512
|
+
};
|
|
2513
|
+
type EditSessionList = {
|
|
2514
|
+
slug: string;
|
|
2515
|
+
containerId: string;
|
|
2516
|
+
/** This credential's open session, or null. */
|
|
2517
|
+
current: EditSessionSummary | null;
|
|
2518
|
+
sessions: EditSessionSummary[];
|
|
2519
|
+
};
|
|
2520
|
+
/** What close/discard/rollback return. */
|
|
2521
|
+
type EditSessionResult = {
|
|
2522
|
+
slug: string;
|
|
2523
|
+
session: EditSessionSummary;
|
|
2524
|
+
};
|
|
2525
|
+
type EditSessionListQuery = {
|
|
2526
|
+
status?: string;
|
|
2527
|
+
limit?: number;
|
|
2528
|
+
};
|
|
2529
|
+
type EditSessionCloseInput = {
|
|
2530
|
+
sessionId?: string;
|
|
2531
|
+
force?: boolean;
|
|
2532
|
+
message?: string;
|
|
2533
|
+
};
|
|
2534
|
+
type EditSessionRollbackInput = {
|
|
2535
|
+
sessionId: string;
|
|
2536
|
+
force?: boolean;
|
|
2537
|
+
message?: string;
|
|
2538
|
+
};
|
|
2539
|
+
declare class WorldEditClient {
|
|
2540
|
+
private readonly options;
|
|
2541
|
+
constructor(options?: WorldsClientOptions);
|
|
2542
|
+
/** The credential's current session and the world's newest-first sessions. */
|
|
2543
|
+
list(slug: string, query?: EditSessionListQuery): Promise<EditSessionList>;
|
|
2544
|
+
/** Seal a session into a version on main (the credential's current one when `sessionId` is omitted). */
|
|
2545
|
+
close(slug: string, input?: EditSessionCloseInput): Promise<EditSessionResult>;
|
|
2546
|
+
/** Drop the session's private branch without making a version. */
|
|
2547
|
+
discard(slug: string, input?: {
|
|
2548
|
+
sessionId?: string;
|
|
2549
|
+
}): Promise<EditSessionResult>;
|
|
2550
|
+
/** Undo a sealed session (source and data) as a new sealed session. */
|
|
2551
|
+
rollback(slug: string, input: EditSessionRollbackInput): Promise<EditSessionResult>;
|
|
2552
|
+
}
|
|
2553
|
+
/** A stored task (`{id, version?}`) or a spec with `worlds`, as `task up` takes it. */
|
|
2554
|
+
type TaskEditTarget = WorldTaskIdRef | WorldTaskSpec;
|
|
2555
|
+
/** The task the platform resolved: stored id and version, or the spec's hash. */
|
|
2556
|
+
type TaskEditTaskRef = {
|
|
2557
|
+
taskId: string | null;
|
|
2558
|
+
taskVersion: number | null;
|
|
2559
|
+
name: string | null;
|
|
2560
|
+
hash: string;
|
|
2561
|
+
};
|
|
2562
|
+
/** Mirrors `TaskEditStatusResponseSchema` (web/features/public-api/types/world-task-edits.ts). */
|
|
2563
|
+
type TaskEditStatus = {
|
|
2564
|
+
task: TaskEditTaskRef;
|
|
2565
|
+
worlds: Record<string, {
|
|
2566
|
+
slug: string;
|
|
2567
|
+
ref: string;
|
|
2568
|
+
problem: string | null;
|
|
2569
|
+
session: EditSessionSummary | null;
|
|
2570
|
+
/** This credential's sessions parked in `conflict` on the world: unsealed too. */
|
|
2571
|
+
parked: EditSessionSummary[];
|
|
2572
|
+
mainVersionId: string | null;
|
|
2573
|
+
sealNow: "fast-forward" | "rebase" | "conflict" | null;
|
|
2574
|
+
conflictPaths: string[];
|
|
2575
|
+
}>;
|
|
2576
|
+
/** Aliases whose world holds edits only this credential sees. */
|
|
2577
|
+
unsealed: string[];
|
|
2578
|
+
hint: string | null;
|
|
2579
|
+
};
|
|
2580
|
+
type TaskEditSealed = {
|
|
2581
|
+
slug: string;
|
|
2582
|
+
session: EditSessionSummary;
|
|
2583
|
+
};
|
|
2584
|
+
type TaskEditCloseResult = {
|
|
2585
|
+
task: TaskEditTaskRef;
|
|
2586
|
+
groupId: string | null;
|
|
2587
|
+
worlds: Record<string, TaskEditSealed>;
|
|
2588
|
+
skipped: Record<string, {
|
|
2589
|
+
slug: string;
|
|
2590
|
+
reason: string;
|
|
2591
|
+
}>;
|
|
2592
|
+
};
|
|
2593
|
+
type TaskEditRollbackResult = {
|
|
2594
|
+
task: TaskEditTaskRef;
|
|
2595
|
+
groupId: string;
|
|
2596
|
+
rollbackOf: string;
|
|
2597
|
+
worlds: Record<string, TaskEditSealed>;
|
|
2598
|
+
/** Members whose seal left `main` where it was: nothing to undo there. */
|
|
2599
|
+
skipped: Record<string, {
|
|
2600
|
+
slug: string;
|
|
2601
|
+
reason: string;
|
|
2602
|
+
}>;
|
|
2603
|
+
};
|
|
2604
|
+
type TaskEditCloseInput = {
|
|
2605
|
+
requireAll?: boolean;
|
|
2606
|
+
force?: boolean;
|
|
2607
|
+
message?: string;
|
|
2608
|
+
};
|
|
2609
|
+
type TaskEditRollbackInput = {
|
|
2610
|
+
groupId: string;
|
|
2611
|
+
force?: boolean;
|
|
2612
|
+
message?: string;
|
|
2613
|
+
};
|
|
2614
|
+
/**
|
|
2615
|
+
* This credential's edit sessions on every world a task names, together:
|
|
2616
|
+
* `close` seals them onto their mains in ONE platform transaction (all or
|
|
2617
|
+
* none), `rollback` undoes the seal group as one. Python twin:
|
|
2618
|
+
* `gatewaysdk.benchmark_hub.edit_sessions.TaskEditClient`.
|
|
2619
|
+
*/
|
|
2620
|
+
declare class TaskEditClient {
|
|
2621
|
+
private readonly options;
|
|
2622
|
+
constructor(options?: WorldsClientOptions);
|
|
2623
|
+
status(task: TaskEditTarget): Promise<TaskEditStatus>;
|
|
2624
|
+
close(task: TaskEditTarget, input?: TaskEditCloseInput): Promise<TaskEditCloseResult>;
|
|
2625
|
+
rollback(task: TaskEditTarget, input: TaskEditRollbackInput): Promise<TaskEditRollbackResult>;
|
|
2185
2626
|
}
|
|
2186
2627
|
|
|
2187
2628
|
type SetRunDoc = {
|
|
@@ -2193,7 +2634,7 @@ type SetRunDoc = {
|
|
|
2193
2634
|
actor: {
|
|
2194
2635
|
kind: string;
|
|
2195
2636
|
id: string;
|
|
2196
|
-
|
|
2637
|
+
actingUser: ActingUser | null;
|
|
2197
2638
|
} | null;
|
|
2198
2639
|
git: Checkout | null;
|
|
2199
2640
|
progress: {
|
|
@@ -2246,42 +2687,90 @@ type RunSetResult = {
|
|
|
2246
2687
|
/** A low or missing reward is a result, not a failure; every task runs even after one fails. */
|
|
2247
2688
|
declare function runSet(datasetId: string, agent: (run: TaskRun) => TaskRunResult | Promise<TaskRunResult>, opts: RunSetOptions): Promise<RunSetResult>;
|
|
2248
2689
|
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2690
|
+
declare const WORLD_WEBHOOK_PAGE_MAX = 100;
|
|
2691
|
+
type WorldWebhookSubscription = {
|
|
2692
|
+
key: Record<string, unknown>;
|
|
2693
|
+
url: string | null;
|
|
2694
|
+
events: string[];
|
|
2695
|
+
scope: Record<string, string[]>;
|
|
2696
|
+
enabled: boolean;
|
|
2697
|
+
/** Deliveries this subscription was sent since the session's feed began. */
|
|
2698
|
+
sent: number;
|
|
2699
|
+
};
|
|
2700
|
+
type WorldWebhookDelivery = {
|
|
2254
2701
|
seq: number;
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2702
|
+
id: string;
|
|
2703
|
+
eventId: string;
|
|
2704
|
+
eventType: string;
|
|
2705
|
+
subscription: Record<string, unknown>;
|
|
2706
|
+
url: string;
|
|
2707
|
+
headers: Record<string, string>;
|
|
2708
|
+
payload: string;
|
|
2709
|
+
at: number;
|
|
2710
|
+
};
|
|
2711
|
+
type WorldWebhookPage = {
|
|
2712
|
+
declared: boolean;
|
|
2713
|
+
subscriptions: WorldWebhookSubscription[];
|
|
2714
|
+
truncated: boolean;
|
|
2715
|
+
epoch: string;
|
|
2716
|
+
reset: boolean;
|
|
2717
|
+
deliveries: WorldWebhookDelivery[];
|
|
2718
|
+
next: number;
|
|
2719
|
+
more: boolean;
|
|
2720
|
+
missed: number;
|
|
2721
|
+
answered: number;
|
|
2722
|
+
};
|
|
2723
|
+
/** A page as the read key sees it: which event went to which subscription and when. */
|
|
2724
|
+
type WorldWebhookListing = Omit<WorldWebhookPage, "deliveries"> & {
|
|
2725
|
+
deliveries: Pick<WorldWebhookDelivery, "seq" | "id" | "eventType" | "subscription" | "at">[];
|
|
2726
|
+
};
|
|
2727
|
+
type WorldWebhookAnswer = {
|
|
2728
|
+
id: string;
|
|
2729
|
+
status: number;
|
|
2730
|
+
durationMs: number;
|
|
2731
|
+
error: string | null;
|
|
2732
|
+
};
|
|
2733
|
+
type ForwardedDelivery = {
|
|
2734
|
+
delivery: WorldWebhookDelivery;
|
|
2735
|
+
answer: WorldWebhookAnswer;
|
|
2266
2736
|
};
|
|
2737
|
+
/** The webhooks a World Host session's world declares and has sent, without their signed headers. */
|
|
2738
|
+
declare function listWebhooks(options: WorldsClientOptions, sessionId: string, page?: {
|
|
2739
|
+
after?: number;
|
|
2740
|
+
limit?: number;
|
|
2741
|
+
epoch?: string;
|
|
2742
|
+
tail?: boolean;
|
|
2743
|
+
}): Promise<WorldWebhookListing>;
|
|
2267
2744
|
/**
|
|
2268
|
-
* The
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
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.
|
|
2745
|
+
* The forward lane: polls a session's deliveries (secret key), replays each to `forwardTo` exactly as signed,
|
|
2746
|
+
* so a receiver on this machine verifies it as it would the vendor's, and hands each receiver's answer back
|
|
2747
|
+
* on the next poll, where the world's request ledger keeps it beside the delivery.
|
|
2274
2748
|
*/
|
|
2275
|
-
declare class
|
|
2276
|
-
readonly
|
|
2277
|
-
private
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2749
|
+
declare class WorldWebhookForwarder {
|
|
2750
|
+
private readonly options;
|
|
2751
|
+
private readonly sessionId;
|
|
2752
|
+
private readonly forwardTo;
|
|
2753
|
+
private after;
|
|
2754
|
+
private epoch;
|
|
2755
|
+
private answers;
|
|
2756
|
+
private readonly send;
|
|
2757
|
+
constructor(options: WorldsClientOptions, sessionId: string, forwardTo: string, opts?: {
|
|
2758
|
+
fetch?: typeof fetch;
|
|
2759
|
+
});
|
|
2760
|
+
get cursor(): number;
|
|
2761
|
+
/** Where forwarding begins: the deliveries the session still holds (`replay`), or only those it sends from now. */
|
|
2762
|
+
start(replay: boolean): Promise<WorldWebhookPage | null>;
|
|
2763
|
+
/** One poll: the answers held so far sent, the next page forwarded. A poll that fails keeps its answers for the next. */
|
|
2764
|
+
round(): Promise<{
|
|
2765
|
+
page: WorldWebhookPage;
|
|
2766
|
+
forwarded: ForwardedDelivery[];
|
|
2767
|
+
}>;
|
|
2768
|
+
/** Sends the answers still held; the cursor stays, so a delivery this poll returns is forwarded by the next round. */
|
|
2769
|
+
settle(): Promise<number>;
|
|
2770
|
+
private follow;
|
|
2771
|
+
private withAnswers;
|
|
2772
|
+
private poll;
|
|
2773
|
+
private forward;
|
|
2285
2774
|
}
|
|
2286
2775
|
|
|
2287
2776
|
/** One entry the archive rules dropped: a whole directory (`name/`, `files`
|
|
@@ -2384,8 +2873,6 @@ declare function buildFileManifest(dir: string): {
|
|
|
2384
2873
|
size: number;
|
|
2385
2874
|
sha256: string;
|
|
2386
2875
|
}[];
|
|
2387
|
-
/** The refusal `push` raises from a tag checkout: tags never move, so the
|
|
2388
|
-
* push needs a branch named explicitly. */
|
|
2389
2876
|
declare class DetachedPushError extends Error {
|
|
2390
2877
|
constructor(dir: string, tag: string);
|
|
2391
2878
|
}
|
|
@@ -3203,6 +3690,7 @@ type SandboxSummary = {
|
|
|
3203
3690
|
pendingSlug: string | null;
|
|
3204
3691
|
status: "open" | "closed";
|
|
3205
3692
|
lastCommitVersionId: string | null;
|
|
3693
|
+
pendingBatchId?: string | null;
|
|
3206
3694
|
createdAt: string;
|
|
3207
3695
|
};
|
|
3208
3696
|
type SandboxOpened = SandboxSummary & {
|
|
@@ -3229,6 +3717,12 @@ type SandboxExecResult = {
|
|
|
3229
3717
|
/** Why `gateway`/`sqlite3` were not on PATH for this command; empty when the runtime is staged. */
|
|
3230
3718
|
warnings: string[];
|
|
3231
3719
|
};
|
|
3720
|
+
/** A command still running after the request's `waitMs` (202); wait on it with `execId`. */
|
|
3721
|
+
type SandboxExecRunning = {
|
|
3722
|
+
state: "running";
|
|
3723
|
+
execId: string;
|
|
3724
|
+
warnings: string[];
|
|
3725
|
+
};
|
|
3232
3726
|
type SandboxChanges = {
|
|
3233
3727
|
added: string[];
|
|
3234
3728
|
modified: string[];
|
|
@@ -3242,9 +3736,18 @@ type SandboxCheckResult = {
|
|
|
3242
3736
|
changes: SandboxChanges;
|
|
3243
3737
|
/** Working-tree paths left out of the version: `.gatewayignore`, default scratch, credential-shaped files, links. */
|
|
3244
3738
|
ignored: string[];
|
|
3245
|
-
/** Why a listed path was held back (credential-shaped, a link,
|
|
3739
|
+
/** Why a listed path was held back (credential-shaped, a link), a data migration the commit will run, or a rehash; paths only. */
|
|
3246
3740
|
warnings: string[];
|
|
3247
3741
|
error: string | null;
|
|
3742
|
+
baseMoved?: {
|
|
3743
|
+
baseVersionId: string;
|
|
3744
|
+
tipVersionId: string;
|
|
3745
|
+
} | null;
|
|
3746
|
+
pendingBatch?: {
|
|
3747
|
+
batchId: string;
|
|
3748
|
+
kind: string;
|
|
3749
|
+
state: string;
|
|
3750
|
+
} | null;
|
|
3248
3751
|
};
|
|
3249
3752
|
type SandboxCommitResult = {
|
|
3250
3753
|
/** The world the commit landed on. */
|
|
@@ -3260,7 +3763,24 @@ type SandboxCommitResult = {
|
|
|
3260
3763
|
warnings: string[];
|
|
3261
3764
|
/** The API key's edit session the commit joined; `gateway worlds edit close <slug>` moves main. */
|
|
3262
3765
|
editSessionId?: string;
|
|
3766
|
+
rebasedOnto?: string | null;
|
|
3767
|
+
batchId?: string;
|
|
3768
|
+
};
|
|
3769
|
+
type SandboxCommitPending = {
|
|
3770
|
+
slug: string;
|
|
3771
|
+
batchId: string;
|
|
3772
|
+
state: string;
|
|
3773
|
+
migration: {
|
|
3774
|
+
fromSnapshotId: string;
|
|
3775
|
+
adds: string[];
|
|
3776
|
+
};
|
|
3777
|
+
changes: SandboxChanges;
|
|
3778
|
+
ignored: string[];
|
|
3779
|
+
warnings: string[];
|
|
3780
|
+
rebasedOnto: string | null;
|
|
3781
|
+
hint: string;
|
|
3263
3782
|
};
|
|
3783
|
+
declare const isSandboxCommitPending: (answer: SandboxCommitResult | SandboxCommitPending) => answer is SandboxCommitPending;
|
|
3264
3784
|
/** Mirrors `PostSandboxImportBody`. */
|
|
3265
3785
|
type SandboxImportInput = {
|
|
3266
3786
|
/** A .json/.jsonl/.ndjson/.csv/.tsv (optionally .gz) relative to the world root. */
|
|
@@ -3293,6 +3813,7 @@ type SandboxImportResult = {
|
|
|
3293
3813
|
chunkCount: number;
|
|
3294
3814
|
/** `sandbox:<id>/<path>`. */
|
|
3295
3815
|
source: string;
|
|
3816
|
+
warnings?: string[];
|
|
3296
3817
|
};
|
|
3297
3818
|
/** Mirrors `PostSandboxImportPendingResponse` (202): poll `worlds data batches`. */
|
|
3298
3819
|
type SandboxImportPending = {
|
|
@@ -3301,6 +3822,7 @@ type SandboxImportPending = {
|
|
|
3301
3822
|
rowCount: number;
|
|
3302
3823
|
chunkCount: number;
|
|
3303
3824
|
source: string;
|
|
3825
|
+
warnings?: string[];
|
|
3304
3826
|
};
|
|
3305
3827
|
declare const isSandboxImportPending: (answer: SandboxImportResult | SandboxImportPending) => answer is SandboxImportPending;
|
|
3306
3828
|
/** Mirrors `PostSandboxOpenBody`: an existing world at a ref, or a new world seeded from a template. */
|
|
@@ -3315,8 +3837,34 @@ type SandboxOpenNew = {
|
|
|
3315
3837
|
type SandboxOpenTarget = SandboxOpenExisting | SandboxOpenNew;
|
|
3316
3838
|
/** `slug` or `slug@ref` → the open body; a bare slug opens the latest READY version. */
|
|
3317
3839
|
declare function parseSlugRef(slugRef: string): SandboxOpenExisting;
|
|
3318
|
-
/**
|
|
3319
|
-
|
|
3840
|
+
/** How long one sandbox request waits for its answer: under the 300 s Node's fetch waits before it cuts a request, so
|
|
3841
|
+
* this budget, not fetch, ends a slow one. The Python twin and both MCP proxies wait the same
|
|
3842
|
+
* (`conformance/world-sandbox-limits.json`). */
|
|
3843
|
+
declare const SANDBOX_REQUEST_TIMEOUT_MS = 290000;
|
|
3844
|
+
/** The most one write request carries (`WORLD_SANDBOX_WRITE_CHUNK_BYTES`); a larger file goes up in parts of this size. */
|
|
3845
|
+
declare const SANDBOX_WRITE_CHUNK_BYTES: number;
|
|
3846
|
+
/** The largest file a sandbox write lands (`WORLD_SANDBOX_FILE_MAX_BYTES`). */
|
|
3847
|
+
declare const SANDBOX_FILE_MAX_BYTES: number;
|
|
3848
|
+
/** What writing a directory never uploads: a checkout's metadata and the scratch the platform never versions
|
|
3849
|
+
* (`conformance/world-ignore-defaults.json`). A name with a trailing slash is a directory at any depth, any
|
|
3850
|
+
* other a file name glob. */
|
|
3851
|
+
declare const SANDBOX_WRITE_SKIPPED: readonly string[];
|
|
3852
|
+
/** Which directory entries writing a directory leaves out, by `SANDBOX_WRITE_SKIPPED`. */
|
|
3853
|
+
declare class WriteTreeFilter {
|
|
3854
|
+
private readonly directories;
|
|
3855
|
+
private readonly files;
|
|
3856
|
+
skipsDirectory(name: string): boolean;
|
|
3857
|
+
skipsFile(name: string): boolean;
|
|
3858
|
+
}
|
|
3859
|
+
/** How long one exec request waits on its command before the platform answers `running`; a longer command is
|
|
3860
|
+
* waited on again by `execId`, so no request outlives the edge in front of the platform. */
|
|
3861
|
+
declare const SANDBOX_EXEC_WAIT_MS = 40000;
|
|
3862
|
+
/** The longest timeout an exec may ask for (`WORLD_SANDBOX_EXEC_TIMEOUT_MAX_MS`); a longer one is refused, never clamped. */
|
|
3863
|
+
declare const SANDBOX_EXEC_TIMEOUT_MAX_S = 600;
|
|
3864
|
+
/** How long past its timeout a command may go without a result before the client stops waiting on it. */
|
|
3865
|
+
declare const SANDBOX_EXEC_REPORT_MARGIN_MS = 35000;
|
|
3866
|
+
/** How many times a start the platform deferred (`sandbox_exec_deferred`: nothing ran) is sent. */
|
|
3867
|
+
declare const SANDBOX_EXEC_START_ATTEMPTS = 3;
|
|
3320
3868
|
/** Mirrors `PostSandboxCommitBody`: `rebase` replays the sandbox's edits onto the branch head when the base moved. */
|
|
3321
3869
|
type SandboxCommitInput = {
|
|
3322
3870
|
message: string;
|
|
@@ -3332,6 +3880,22 @@ type RebaseConflictPath = {
|
|
|
3332
3880
|
declare function rebaseConflicts(error: unknown): RebaseConflictPath[] | null;
|
|
3333
3881
|
/** A 409 `sandbox_uncommitted` from `close`: the paths a commit would keep. Null for any other failure. */
|
|
3334
3882
|
declare function uncommittedPaths(error: unknown): string[] | null;
|
|
3883
|
+
/**
|
|
3884
|
+
* The warnings an exec had collected before it failed (a deferral's, a running answer's) and the failing answer's
|
|
3885
|
+
* own, which its message holds only up to the detail's cut: no later call reports them. Those the message already
|
|
3886
|
+
* shows whole are left out, so each is printed once.
|
|
3887
|
+
*/
|
|
3888
|
+
declare function carriedWarnings(error: unknown): string[];
|
|
3889
|
+
/** A 400 `rows_refused` from `import`: the summary, every refusal counted, the first records and the full report. */
|
|
3890
|
+
type RowsRefusal = {
|
|
3891
|
+
message: string;
|
|
3892
|
+
batchId: string;
|
|
3893
|
+
refusalCount: number;
|
|
3894
|
+
refusals: Record<string, unknown>[];
|
|
3895
|
+
reportUrl: string | null;
|
|
3896
|
+
};
|
|
3897
|
+
/** The refusal a sandbox import answered, or null for any other failure. */
|
|
3898
|
+
declare function rowsRefusal(error: unknown): RowsRefusal | null;
|
|
3335
3899
|
/** `sandbox list` narrows: status, world, count (newest first). */
|
|
3336
3900
|
type SandboxListFilter = {
|
|
3337
3901
|
status?: "open" | "closed";
|
|
@@ -3357,18 +3921,24 @@ declare class WorldSandboxClient {
|
|
|
3357
3921
|
size: number;
|
|
3358
3922
|
bytes: Buffer;
|
|
3359
3923
|
}>;
|
|
3924
|
+
/** A file past one chunk goes up in parts under one upload id; the platform lands it whole once the last part's
|
|
3925
|
+
* size and SHA-256 check out. */
|
|
3360
3926
|
write(sandboxId: string, filePath: string, bytes: Buffer): Promise<{
|
|
3361
3927
|
path: string;
|
|
3362
3928
|
size: number;
|
|
3363
3929
|
}>;
|
|
3930
|
+
private putFile;
|
|
3931
|
+
/** Runs as a job on the platform: a command that outlasts one request is waited on again until its result. */
|
|
3364
3932
|
exec(sandboxId: string, input: {
|
|
3365
3933
|
command: string;
|
|
3366
3934
|
cwd?: string;
|
|
3367
3935
|
timeoutMs?: number;
|
|
3368
3936
|
}): Promise<SandboxExecResult>;
|
|
3937
|
+
private startExec;
|
|
3938
|
+
private execStep;
|
|
3369
3939
|
check(sandboxId: string): Promise<SandboxCheckResult>;
|
|
3370
3940
|
/** With `rebase`, a moved base is replayed onto; a 409 then names the conflicting paths (`rebaseConflicts`). */
|
|
3371
|
-
commit(sandboxId: string, input: SandboxCommitInput): Promise<SandboxCommitResult>;
|
|
3941
|
+
commit(sandboxId: string, input: SandboxCommitInput): Promise<SandboxCommitResult | SandboxCommitPending>;
|
|
3372
3942
|
/**
|
|
3373
3943
|
* A rows file already in the sandbox tree into the PLATFORM world the
|
|
3374
3944
|
* sandbox was opened on (201 with the version, 202 with the batch to poll,
|
|
@@ -3382,156 +3952,6 @@ declare class WorldSandboxClient {
|
|
|
3382
3952
|
}): Promise<SandboxSummary>;
|
|
3383
3953
|
}
|
|
3384
3954
|
|
|
3385
|
-
/**
|
|
3386
|
-
* Edit sessions: the version control unit for a world. Every write this
|
|
3387
|
-
* credential makes to a world (push, sandbox commit, data import, MCP, the
|
|
3388
|
-
* console editor) joins ONE open session per world per credential and lands
|
|
3389
|
-
* on that session's private branch; `close` seals the session into a version
|
|
3390
|
-
* on `main`, and a session nobody touches for an hour seals itself. Sessions
|
|
3391
|
-
* replace product-level proposals/PRs: `rollback` undoes a sealed session
|
|
3392
|
-
* (source + data together) as a new, itself-reversible session.
|
|
3393
|
-
*
|
|
3394
|
-
* One client under both `gateway worlds edit …` and `gateway bench edit …`;
|
|
3395
|
-
* the Python twin is `gatewaysdk.benchmark_hub.edit_sessions.WorldEditClient`.
|
|
3396
|
-
*/
|
|
3397
|
-
/** Mirrors `WorldEditSessionSchema` (web/features/public-api/types/world-edits.ts). */
|
|
3398
|
-
type EditSessionSummary = {
|
|
3399
|
-
id: string;
|
|
3400
|
-
containerId: string;
|
|
3401
|
-
/** `apikey:<id>` for CLI/sandbox/MCP, `user:<id>` for the console, `agent:<id>` for the platform agent. */
|
|
3402
|
-
actor: string;
|
|
3403
|
-
door: string;
|
|
3404
|
-
status: "open" | "sealing" | "sealed" | "conflict" | "expired" | "discarded" | string;
|
|
3405
|
-
baseVersionId: string | null;
|
|
3406
|
-
tipVersionId: string | null;
|
|
3407
|
-
sealedVersionId: string | null;
|
|
3408
|
-
editCount: number;
|
|
3409
|
-
startedAt: string;
|
|
3410
|
-
lastEditAt: string;
|
|
3411
|
-
expiresAt: string;
|
|
3412
|
-
closedAt: string | null;
|
|
3413
|
-
closeReason: string | null;
|
|
3414
|
-
conflictPaths: string[] | null;
|
|
3415
|
-
rollbackOfId: string | null;
|
|
3416
|
-
message: string | null;
|
|
3417
|
-
/** Set when `task edit close` sealed this session together with a task's other worlds. */
|
|
3418
|
-
sealGroupId: string | null;
|
|
3419
|
-
};
|
|
3420
|
-
type EditSessionList = {
|
|
3421
|
-
slug: string;
|
|
3422
|
-
containerId: string;
|
|
3423
|
-
/** This credential's open session, or null. */
|
|
3424
|
-
current: EditSessionSummary | null;
|
|
3425
|
-
sessions: EditSessionSummary[];
|
|
3426
|
-
};
|
|
3427
|
-
/** What close/discard/rollback return. */
|
|
3428
|
-
type EditSessionResult = {
|
|
3429
|
-
slug: string;
|
|
3430
|
-
session: EditSessionSummary;
|
|
3431
|
-
};
|
|
3432
|
-
type EditSessionListQuery = {
|
|
3433
|
-
status?: string;
|
|
3434
|
-
limit?: number;
|
|
3435
|
-
};
|
|
3436
|
-
type EditSessionCloseInput = {
|
|
3437
|
-
sessionId?: string;
|
|
3438
|
-
force?: boolean;
|
|
3439
|
-
message?: string;
|
|
3440
|
-
};
|
|
3441
|
-
type EditSessionRollbackInput = {
|
|
3442
|
-
sessionId: string;
|
|
3443
|
-
force?: boolean;
|
|
3444
|
-
message?: string;
|
|
3445
|
-
};
|
|
3446
|
-
declare class WorldEditClient {
|
|
3447
|
-
private readonly options;
|
|
3448
|
-
constructor(options?: WorldsClientOptions);
|
|
3449
|
-
/** The credential's current session and the world's newest-first sessions. */
|
|
3450
|
-
list(slug: string, query?: EditSessionListQuery): Promise<EditSessionList>;
|
|
3451
|
-
/** Seal a session into a version on main (the credential's current one when `sessionId` is omitted). */
|
|
3452
|
-
close(slug: string, input?: EditSessionCloseInput): Promise<EditSessionResult>;
|
|
3453
|
-
/** Drop the session's private branch without making a version. */
|
|
3454
|
-
discard(slug: string, input?: {
|
|
3455
|
-
sessionId?: string;
|
|
3456
|
-
}): Promise<EditSessionResult>;
|
|
3457
|
-
/** Undo a sealed session (source and data) as a new sealed session. */
|
|
3458
|
-
rollback(slug: string, input: EditSessionRollbackInput): Promise<EditSessionResult>;
|
|
3459
|
-
}
|
|
3460
|
-
/** A stored task (`{id, version?}`) or a spec with `worlds`, as `task up` takes it. */
|
|
3461
|
-
type TaskEditTarget = WorldTaskIdRef | WorldTaskSpec;
|
|
3462
|
-
/** The task the platform resolved: stored id and version, or the spec's hash. */
|
|
3463
|
-
type TaskEditTaskRef = {
|
|
3464
|
-
taskId: string | null;
|
|
3465
|
-
taskVersion: number | null;
|
|
3466
|
-
name: string | null;
|
|
3467
|
-
hash: string;
|
|
3468
|
-
};
|
|
3469
|
-
/** Mirrors `TaskEditStatusResponseSchema` (web/features/public-api/types/world-task-edits.ts). */
|
|
3470
|
-
type TaskEditStatus = {
|
|
3471
|
-
task: TaskEditTaskRef;
|
|
3472
|
-
worlds: Record<string, {
|
|
3473
|
-
slug: string;
|
|
3474
|
-
ref: string;
|
|
3475
|
-
problem: string | null;
|
|
3476
|
-
session: EditSessionSummary | null;
|
|
3477
|
-
/** This credential's sessions parked in `conflict` on the world: unsealed too. */
|
|
3478
|
-
parked: EditSessionSummary[];
|
|
3479
|
-
mainVersionId: string | null;
|
|
3480
|
-
sealNow: "fast-forward" | "rebase" | "conflict" | null;
|
|
3481
|
-
conflictPaths: string[];
|
|
3482
|
-
}>;
|
|
3483
|
-
/** Aliases whose world holds edits only this credential sees. */
|
|
3484
|
-
unsealed: string[];
|
|
3485
|
-
hint: string | null;
|
|
3486
|
-
};
|
|
3487
|
-
type TaskEditSealed = {
|
|
3488
|
-
slug: string;
|
|
3489
|
-
session: EditSessionSummary;
|
|
3490
|
-
};
|
|
3491
|
-
type TaskEditCloseResult = {
|
|
3492
|
-
task: TaskEditTaskRef;
|
|
3493
|
-
groupId: string | null;
|
|
3494
|
-
worlds: Record<string, TaskEditSealed>;
|
|
3495
|
-
skipped: Record<string, {
|
|
3496
|
-
slug: string;
|
|
3497
|
-
reason: string;
|
|
3498
|
-
}>;
|
|
3499
|
-
};
|
|
3500
|
-
type TaskEditRollbackResult = {
|
|
3501
|
-
task: TaskEditTaskRef;
|
|
3502
|
-
groupId: string;
|
|
3503
|
-
rollbackOf: string;
|
|
3504
|
-
worlds: Record<string, TaskEditSealed>;
|
|
3505
|
-
/** Members whose seal left `main` where it was: nothing to undo there. */
|
|
3506
|
-
skipped: Record<string, {
|
|
3507
|
-
slug: string;
|
|
3508
|
-
reason: string;
|
|
3509
|
-
}>;
|
|
3510
|
-
};
|
|
3511
|
-
type TaskEditCloseInput = {
|
|
3512
|
-
requireAll?: boolean;
|
|
3513
|
-
force?: boolean;
|
|
3514
|
-
message?: string;
|
|
3515
|
-
};
|
|
3516
|
-
type TaskEditRollbackInput = {
|
|
3517
|
-
groupId: string;
|
|
3518
|
-
force?: boolean;
|
|
3519
|
-
message?: string;
|
|
3520
|
-
};
|
|
3521
|
-
/**
|
|
3522
|
-
* This credential's edit sessions on every world a task names, together:
|
|
3523
|
-
* `close` seals them onto their mains in ONE platform transaction (all or
|
|
3524
|
-
* none), `rollback` undoes the seal group as one. Python twin:
|
|
3525
|
-
* `gatewaysdk.benchmark_hub.edit_sessions.TaskEditClient`.
|
|
3526
|
-
*/
|
|
3527
|
-
declare class TaskEditClient {
|
|
3528
|
-
private readonly options;
|
|
3529
|
-
constructor(options?: WorldsClientOptions);
|
|
3530
|
-
status(task: TaskEditTarget): Promise<TaskEditStatus>;
|
|
3531
|
-
close(task: TaskEditTarget, input?: TaskEditCloseInput): Promise<TaskEditCloseResult>;
|
|
3532
|
-
rollback(task: TaskEditTarget, input: TaskEditRollbackInput): Promise<TaskEditRollbackResult>;
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
3955
|
/**
|
|
3536
3956
|
* The hosted one-task dry run: `POST /api/public/environments/{id}/dry-run`
|
|
3537
3957
|
* and the run-status read that settles it. The runner runs ONE named task of a
|
|
@@ -3675,26 +4095,23 @@ type DispatchedRun = {
|
|
|
3675
4095
|
ok: boolean;
|
|
3676
4096
|
error?: string;
|
|
3677
4097
|
};
|
|
3678
|
-
/** A platform answer
|
|
3679
|
-
* code (a 409 on a name already taken) instead of parsing the message. A JSON
|
|
3680
|
-
* body renders as `<message> (<code>)` — the stable public `code`, never the
|
|
3681
|
-
* server's error class name. */
|
|
4098
|
+
/** A non-2xx platform answer: act on `status` or the stable public `code` (never the server's error class) rather than parsing the message. */
|
|
3682
4099
|
declare class ApiError extends Error {
|
|
3683
4100
|
readonly status: number;
|
|
3684
4101
|
readonly text: string;
|
|
3685
4102
|
readonly code: string | null;
|
|
3686
4103
|
constructor(status: number, method: string, path: string, text: string);
|
|
3687
4104
|
}
|
|
3688
|
-
/**
|
|
3689
|
-
* Python twin: `gatewaysdk.api_errors.error_detail`. */
|
|
3690
|
-
declare function parseErrorBody(text: string,
|
|
4105
|
+
/** The detail and stable code of a non-2xx body; an HTML page or a bare 5xx is named, never printed.
|
|
4106
|
+
* Python twin: `gatewaysdk.api_errors.error_detail`; both run `conformance/platform-error-bodies.json`. */
|
|
4107
|
+
declare function parseErrorBody(text: string, status?: number): {
|
|
3691
4108
|
detail: string;
|
|
3692
4109
|
code: string | null;
|
|
3693
4110
|
};
|
|
3694
|
-
/**
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
* for a request whose repeat is harmless. */
|
|
4111
|
+
/** `<path>: <message>` per issue of a validation error; empty when it carries none. Python twin: `gatewaysdk.api_errors.invalid_fields`. */
|
|
4112
|
+
declare function invalidFields(error: unknown): string;
|
|
4113
|
+
/** Authenticated JSON request to the platform API. `init.timeoutMs` replaces the `GATEWAY_TIMEOUT_MS` budget for a request that
|
|
4114
|
+
* legitimately outlasts it; `init.retry` is only for a request whose repeat is harmless. */
|
|
3698
4115
|
declare function apiRequest<T>(options: WorldsClientOptions, method: PlatformMethod, path: string, body?: unknown, init?: {
|
|
3699
4116
|
timeoutMs?: number;
|
|
3700
4117
|
retry?: RetryPolicy;
|
|
@@ -3720,13 +4137,10 @@ type RunConfigSummary = {
|
|
|
3720
4137
|
autoRunOnPush: boolean;
|
|
3721
4138
|
agent: string | null;
|
|
3722
4139
|
};
|
|
3723
|
-
/**
|
|
4140
|
+
/** The project's run configs; CI resolves one by name and dispatches it by id. */
|
|
3724
4141
|
declare function listRunConfigs(options?: WorldsClientOptions): Promise<RunConfigSummary[]>;
|
|
3725
|
-
/**
|
|
3726
|
-
*
|
|
3727
|
-
* project's stored tasks (`worldTasks`, api worlds only) — never both. A
|
|
3728
|
-
* stored task ref without `version` runs the task's current version at
|
|
3729
|
-
* dispatch time; with it, that version forever. */
|
|
4142
|
+
/** Either the bundle's own scenarios (`taskNames`, `taskSetDatasetId`) or stored tasks (`worldTasks`, schema worlds only), never both;
|
|
4143
|
+
* a stored task ref without `version` runs the task's current version at dispatch time, with it that version forever. */
|
|
3730
4144
|
type RunConfigInput = {
|
|
3731
4145
|
id?: string;
|
|
3732
4146
|
name: string;
|
|
@@ -3743,8 +4157,7 @@ type RunConfigInput = {
|
|
|
3743
4157
|
};
|
|
3744
4158
|
/** Create a run config, or update the one named by `id`. */
|
|
3745
4159
|
declare function upsertRunConfig(input: RunConfigInput, options?: WorldsClientOptions): Promise<RunConfigSummary>;
|
|
3746
|
-
/** `id[@version]` items
|
|
3747
|
-
* the spelling `bench run-configs create --world-tasks` takes. */
|
|
4160
|
+
/** `id[@version]` items, comma-separated or an array, as `bench run-configs create --world-tasks` takes them. */
|
|
3748
4161
|
declare function parseWorldTaskRefs(spec: string | string[]): WorldTaskIdRef[];
|
|
3749
4162
|
type RunReport = {
|
|
3750
4163
|
id: string;
|
|
@@ -3771,11 +4184,9 @@ type RunReport = {
|
|
|
3771
4184
|
sessionId: string | null;
|
|
3772
4185
|
}[];
|
|
3773
4186
|
};
|
|
3774
|
-
/** The read half of dispatch: status, score, per-shard evaluations
|
|
3775
|
-
* per-task rewards — everything a CI gate needs. */
|
|
4187
|
+
/** The read half of dispatch: status, score, per-shard evaluations and per-task rewards. */
|
|
3776
4188
|
declare function getRun(runId: string, options?: WorldsClientOptions): Promise<RunReport>;
|
|
3777
|
-
/**
|
|
3778
|
-
* the gate's view — no logs, samples or links; `getRun` has those. */
|
|
4189
|
+
/** A run as `bench runs list` prints it: no logs, samples or links (`getRun` has those). */
|
|
3779
4190
|
type RunSummary = {
|
|
3780
4191
|
id: string;
|
|
3781
4192
|
status: string;
|
|
@@ -3801,7 +4212,7 @@ type ListRunsFilter = {
|
|
|
3801
4212
|
};
|
|
3802
4213
|
/** The project's runs, newest first. */
|
|
3803
4214
|
declare function listRuns(filter?: ListRunsFilter, options?: WorldsClientOptions): Promise<RunSummary[]>;
|
|
3804
|
-
/** Poll a run to terminal (default
|
|
4215
|
+
/** Poll a run to terminal every `intervalSeconds` (default 20) for up to `timeoutMinutes` (default 45). */
|
|
3805
4216
|
declare function waitForRun(runId: string, opts?: {
|
|
3806
4217
|
timeoutMinutes?: number;
|
|
3807
4218
|
intervalSeconds?: number;
|
|
@@ -3819,12 +4230,7 @@ type RunProvenance = {
|
|
|
3819
4230
|
kind?: string;
|
|
3820
4231
|
};
|
|
3821
4232
|
};
|
|
3822
|
-
/**
|
|
3823
|
-
* Where a dispatch comes from, DETECTED rather than configured: the CI
|
|
3824
|
-
* checkout's branch/commit/actor under GitHub Actions, else the developer's
|
|
3825
|
-
* own git checkout. A run nobody can trace to a branch is a score with no
|
|
3826
|
-
* code attached, so every dispatch carries this unless overridden.
|
|
3827
|
-
*/
|
|
4233
|
+
/** A dispatch's branch, commit and actor: from GitHub Actions under CI, else the local git checkout; every dispatch carries it unless overridden. */
|
|
3828
4234
|
declare function detectProvenance(): RunProvenance;
|
|
3829
4235
|
/** One scenario of a world, as data. */
|
|
3830
4236
|
declare class WorldTask {
|
|
@@ -3833,13 +4239,7 @@ declare class WorldTask {
|
|
|
3833
4239
|
readonly variant: string | null;
|
|
3834
4240
|
constructor(world: WorldSet, name: string, variant: string | null);
|
|
3835
4241
|
}
|
|
3836
|
-
/**
|
|
3837
|
-
* THE world, from a TS process: pinned identity + its tasks + hosted runs.
|
|
3838
|
-
*
|
|
3839
|
-
* const world = await openWorld("google-drive-sim@main");
|
|
3840
|
-
* console.log(world.version.semanticVersion, world.tasks.length);
|
|
3841
|
-
* const runs = await world.dispatch(runConfigId);
|
|
3842
|
-
*/
|
|
4242
|
+
/** A world pinned to one version, with its tasks and hosted runs, as `openWorld` and `openWorldVersion` return it. */
|
|
3843
4243
|
declare class WorldSet {
|
|
3844
4244
|
readonly slugRef: string;
|
|
3845
4245
|
readonly slug: string;
|
|
@@ -3849,44 +4249,25 @@ declare class WorldSet {
|
|
|
3849
4249
|
private readonly options;
|
|
3850
4250
|
constructor(slugRef: string, slug: string, ref: string | null, version: ResolvedWorldVersion, tasks: WorldTask[], options: WorldsClientOptions);
|
|
3851
4251
|
task(variant: string): WorldTask;
|
|
3852
|
-
/**
|
|
3853
|
-
* Open a LIVE session against one of this world's tasks — a bundled task's
|
|
3854
|
-
* name or an inline `WorldTaskSpec`: the platform boots (or reuses) a warm
|
|
3855
|
-
* container, and your agent calls its tools through the platform. See
|
|
3856
|
-
* worlds/session.ts.
|
|
3857
|
-
*/
|
|
4252
|
+
/** Open a live session on a bundled task's name or an inline `WorldTaskSpec`; the platform boots or reuses a warm container. */
|
|
3858
4253
|
open(task: WorldTaskRef, opts?: {
|
|
3859
4254
|
reuseWarm?: boolean;
|
|
3860
4255
|
surfaces?: WorldSurfaceKind[];
|
|
3861
4256
|
browserTier?: BrowserTier;
|
|
3862
4257
|
}): Promise<WorldSession>;
|
|
3863
|
-
/**
|
|
3864
|
-
* Start a HOSTED run of a run config against this world — the platform
|
|
3865
|
-
* executes the (Python) world in parallel containers per the config's
|
|
3866
|
-
* `parallelism` and files one graded run per model. Returns those runs.
|
|
3867
|
-
*/
|
|
4258
|
+
/** Start a hosted run of a run config on this version (or `opts.versionId`): one graded run per model, provenance detected unless given. */
|
|
3868
4259
|
dispatch(runConfigId: string, opts?: {
|
|
3869
4260
|
containerId?: string;
|
|
3870
4261
|
versionId?: string;
|
|
3871
|
-
/** Override the auto-detected branch/commit/actor. */
|
|
3872
4262
|
provenance?: RunProvenance;
|
|
3873
4263
|
}): Promise<{
|
|
3874
4264
|
versionLabel: string;
|
|
3875
4265
|
runs: DispatchedRun[];
|
|
3876
4266
|
}>;
|
|
3877
4267
|
}
|
|
3878
|
-
/**
|
|
3879
|
-
* Resolve `slug` / `slug@branch|tag|semver|hash` to its pinned version and
|
|
3880
|
-
* task list. The task list comes from the version's file manifest
|
|
3881
|
-
* (`tasks/<name>/task.toml`), so it needs no bundle download.
|
|
3882
|
-
*/
|
|
4268
|
+
/** Resolve `slug` or `slug@branch|tag|semver|hash` to its pinned version and task list, without downloading the bundle. */
|
|
3883
4269
|
declare function openWorld(slugRef: string, options?: WorldsClientOptions): Promise<WorldSet>;
|
|
3884
|
-
/**
|
|
3885
|
-
* Resolve `slug` at one pinned READY `versionId` — the task list is THAT
|
|
3886
|
-
* version's, never the branch tip's. `worlds run|ci --version-id` come
|
|
3887
|
-
* through here; a version of another container, a draft or an unknown id
|
|
3888
|
-
* is a 404 from the platform, not a silent fall-through to head.
|
|
3889
|
-
*/
|
|
4270
|
+
/** Resolve `slug` at one READY `versionId`, with that version's task list; another world's version, a draft or an unknown id is a 404, never the head. */
|
|
3890
4271
|
declare function openWorldVersion(slug: string, versionId: string, options?: WorldsClientOptions): Promise<WorldSet>;
|
|
3891
4272
|
|
|
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 };
|
|
4273
|
+
export { ACTION_NAMES, type ActingUser, type ActionArgs, type ActionResult, ActionTracer, type AiSdkAnthropicOutput, type AiSdkComputerCall, type AiSdkComputerOutput, type AiSdkImagePart, type AiSdkMajor, type AiSdkModelOutput, type AiSdkOptions, 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, type ForwardedDelivery, GatewayEvalsClient, GradePayload, GradeRefused, type GradeResult, type GradedJournal, 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, PLATFORM_SESSION_HEADER, type ParsedToolCall, PendingSafetyChecks, type Plaintext, PlatformMethod, type PlaywrightBrowserLike, type PlaywrightLike, PushSlugConflict, type PushSlugResolution, RECOVER_BUDGET_MS, REQUESTS_NOT_RECORDED, REQUEST_BODY_CAPTURE_BYTES, REQUEST_LOG_PAGE_MAX, type RebaseConflictPath, type RecoveryResult, type RedactMode, type RedactPolicy, type Redaction, type RegradedRollout, type RepairAnswer, type ResolvedWorldVersion, RetryPolicy, type RowsRefusal, type RunConfigInput, type RunConfigSummary, type RunProvenance, type RunReport, type RunSetOptions, type RunSetResult, type RunSummary, type RunTaskOptions, type RunTaskSummary, SANDBOX_EXEC_REPORT_MARGIN_MS, SANDBOX_EXEC_START_ATTEMPTS, SANDBOX_EXEC_TIMEOUT_MAX_S, SANDBOX_EXEC_WAIT_MS, SANDBOX_FILE_MAX_BYTES, SANDBOX_REQUEST_TIMEOUT_MS, SANDBOX_WRITE_CHUNK_BYTES, SANDBOX_WRITE_SKIPPED, SECRET_KEY, SESSION_AUTH_MODES, SESSION_STATES, SPAN_PREFIX, STATUS_WAIT_CAP_SECONDS, STRIP_PREFIX, SURFACE_KINDS, type SafetyCheck, type SandboxChanges, type SandboxCheckResult, type SandboxCommitInput, type SandboxCommitPending, type SandboxCommitResult, type SandboxExecResult, type SandboxExecRunning, 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 SessionAuthMode, 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, TaskGrades, type TaskManifest, type TaskManifestSession, type TaskRegrade, type TaskRegradeScope, TaskRun, type TaskRunResult, TaskSessions, type TaskSessionsResponse, type TaskTrial, type TaskTrialCheck, type TaskTrialRequest, type TaskTrialTarget, type TaskWorldRef, type TaskWorldSessionState, type ToolCallRecord, type ToolCallSink, type ToolFunctions, type Transform, VERIFIER_REWARD_PREFIX, type ValidateReport, type ValidatedRun, type VerifierGrade, WHITESPACE, WORLD_REQUEST_VIAS, WORLD_WEBHOOK_PAGE_MAX, 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, type WorldRequestEntry, type WorldRequestFilter, WorldRequestFilterError, WorldRequestLedger, WorldRequestLog, type WorldRequestPage, WorldRequestQuery, WorldRequestsNotRecorded, WorldSandboxClient, WorldSession, type WorldSessionCall, WorldSessionCallError, type WorldSessionListItem, WorldSessionOpenFailed, type WorldSessionRestart, 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 WorldWebhookAnswer, type WorldWebhookDelivery, WorldWebhookForwarder, type WorldWebhookListing, type WorldWebhookPage, type WorldWebhookSubscription, type WorldsClientOptions, WriteTreeFilter, aggregateTaskGrade, apiRequest, applyTransforms, archiveMode, assertBrowserTier, assertSessionAuthMode, assertTaskRef, attachManifest, attachSession, attachTask, buildFileManifest, buildSourceTarball, capabilityLabel, captureToolCalls, carriedWarnings, checkoutIdentity, closeConnection, collectArchiveRelPaths, computeContentHash, computerUseToolkit, createRef, createTask, deleteEnvSecret, deleteTask, describeWorld, detectProvenance, extractBundle, getRun, getTask, hashForm, idleWarning, ingest, ingestToolCalls, invalidFields, isBrowserGone, isSandboxCommitPending, isSandboxImportPending, isTaskIdRef, isTaskManifest, isTaskSpec, listEnvSecretKeys, listRunConfigs, listRuns, listSessions, listTaskSessions, listTasks, listWebhooks, 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, rowsRefusal, 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, worldRequestsUnrecorded, writeLocalMeta };
|