@sandboxrouter/sdk 0.2.0 → 0.3.1
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 +229 -50
- package/dist/bench.js +4 -4
- package/dist/catalog.d.ts +159 -0
- package/dist/catalog.js +450 -15
- package/dist/check.d.ts +28 -0
- package/dist/check.js +185 -0
- package/dist/cli.js +171 -12
- package/dist/computers.d.ts +55 -13
- package/dist/computers.js +132 -6
- package/dist/conformance.d.ts +46 -0
- package/dist/conformance.js +65 -0
- package/dist/cost.d.ts +67 -0
- package/dist/cost.js +153 -0
- package/dist/gc.d.ts +29 -0
- package/dist/gc.js +54 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.js +28 -2
- package/dist/leaderboard.d.ts +6 -0
- package/dist/leaderboard.js +5 -4
- package/dist/ledger.d.ts +38 -0
- package/dist/ledger.js +89 -0
- package/dist/providers/agent37.d.ts +40 -0
- package/dist/providers/agent37.js +224 -0
- package/dist/providers/agentcore.d.ts +71 -0
- package/dist/providers/agentcore.js +446 -0
- package/dist/providers/alibaba.d.ts +18 -0
- package/dist/providers/alibaba.js +106 -0
- package/dist/providers/azure.d.ts +43 -0
- package/dist/providers/azure.js +330 -0
- package/dist/providers/beam.d.ts +11 -0
- package/dist/providers/beam.js +179 -0
- package/dist/providers/blaxel.d.ts +3 -1
- package/dist/providers/blaxel.js +32 -22
- package/dist/providers/boat.js +8 -3
- package/dist/providers/cloudflare.js +8 -3
- package/dist/providers/codesandbox.d.ts +59 -0
- package/dist/providers/codesandbox.js +287 -0
- package/dist/providers/daytona.d.ts +25 -4
- package/dist/providers/daytona.js +449 -28
- package/dist/providers/dedalus.d.ts +12 -0
- package/dist/providers/dedalus.js +244 -0
- package/dist/providers/deno.d.ts +50 -0
- package/dist/providers/deno.js +170 -0
- package/dist/providers/docker.js +11 -5
- package/dist/providers/e2b.d.ts +70 -3
- package/dist/providers/e2b.js +376 -8
- package/dist/providers/exedev.js +17 -5
- package/dist/providers/freestyle.d.ts +49 -0
- package/dist/providers/freestyle.js +261 -0
- package/dist/providers/hopx.js +27 -18
- package/dist/providers/instabox.d.ts +76 -0
- package/dist/providers/instabox.js +360 -0
- package/dist/providers/koyeb.d.ts +71 -0
- package/dist/providers/koyeb.js +379 -0
- package/dist/providers/lambda.d.ts +51 -0
- package/dist/providers/lambda.js +467 -0
- package/dist/providers/langsmith.d.ts +16 -0
- package/dist/providers/langsmith.js +149 -0
- package/dist/providers/limrun.d.ts +77 -0
- package/dist/providers/limrun.js +626 -0
- package/dist/providers/maritime.d.ts +5 -1
- package/dist/providers/maritime.js +39 -8
- package/dist/providers/mobilerun.d.ts +44 -0
- package/dist/providers/mobilerun.js +417 -0
- package/dist/providers/modal.js +12 -4
- package/dist/providers/morph.js +12 -4
- package/dist/providers/northflank.js +11 -13
- package/dist/providers/novita.d.ts +12 -0
- package/dist/providers/novita.js +81 -0
- package/dist/providers/openscale.d.ts +17 -0
- package/dist/providers/openscale.js +87 -0
- package/dist/providers/orgo.d.ts +45 -0
- package/dist/providers/orgo.js +414 -0
- package/dist/providers/sail.d.ts +32 -0
- package/dist/providers/sail.js +372 -0
- package/dist/providers/superserve.d.ts +25 -0
- package/dist/providers/superserve.js +337 -0
- package/dist/providers/tensorlake.js +17 -14
- package/dist/providers/upstash.d.ts +30 -0
- package/dist/providers/upstash.js +258 -0
- package/dist/providers/vercel.js +14 -3
- package/dist/providers/workspaces.d.ts +60 -0
- package/dist/providers/workspaces.js +662 -0
- package/dist/router.d.ts +41 -5
- package/dist/router.js +179 -23
- package/dist/server.d.ts +1 -1
- package/dist/server.js +22 -3
- package/dist/types.d.ts +13 -5
- package/dist/util.d.ts +28 -1
- package/dist/util.js +56 -7
- package/package.json +81 -5
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ComputerOs, ComputerProvider, ComputerSpec, ProviderComputer } from "../computers.js";
|
|
2
|
+
/**
|
|
3
|
+
* Limrun: cloud Android emulators and iOS simulators, driven through `@limrun/api`.
|
|
4
|
+
* Control plane: `new Limrun({ apiKey })` -> androidInstances / iosInstances (create, get, delete).
|
|
5
|
+
* Device: createInstanceClient (Android) / Ios.createInstanceClient, built from the instance's
|
|
6
|
+
* status.apiUrl + status.token (a WebSocket; no API key needed).
|
|
7
|
+
* Docs: https://docs.limrun.com/docs/reference/sdk.md
|
|
8
|
+
*
|
|
9
|
+
* Canonical action mapping (coordinates are in the last screenshot's frame; iOS screenshots are
|
|
10
|
+
* the SDK's default "scaled" size, i.e. tap points, so they line up with taps):
|
|
11
|
+
*
|
|
12
|
+
* screenshot Android client.screenshot() (data URI) | iOS screenshot({ format: "png" })
|
|
13
|
+
* left_click tap(x, y); with `duration` (s) > 0 it is a long press of that length
|
|
14
|
+
* right_click long press (800 ms), the phone's context-menu gesture
|
|
15
|
+
* double/triple_click 2 or 3 quick taps (Android: one `input tap` shell line; iOS: one performActions batch)
|
|
16
|
+
* left_click_drag swipe startCoordinate -> coordinate (Android `input swipe`; iOS touchDown/touchMove/touchUp)
|
|
17
|
+
* scroll Android scrollScreen / scrollElement({x, y}) with amount = steps;
|
|
18
|
+
* iOS scroll(direction, steps x 100 points, { coordinate })
|
|
19
|
+
* type Android setText(focused input) | iOS typeText(requireFocus: false)
|
|
20
|
+
* key xdotool-style chords, see KEYS below; `repeat` presses it again
|
|
21
|
+
* wait sleep `duration` seconds (default 1)
|
|
22
|
+
* cursor_position, mouse_move, middle_click, left_mouse_down/up, hold_key, zoom
|
|
23
|
+
* error result: phones have no cursor, hover or held keys, and there is no
|
|
24
|
+
* in-process image crop
|
|
25
|
+
*
|
|
26
|
+
* Key table (case-insensitive xdotool names -> Android pressKey | iOS):
|
|
27
|
+
* Return, Enter, KP_Enter ENTER | pressKey("enter")
|
|
28
|
+
* BackSpace DEL | pressKey("backspace")
|
|
29
|
+
* Delete FORWARD_DEL | pressKey("delete")
|
|
30
|
+
* Tab TAB | pressKey("tab")
|
|
31
|
+
* Escape, Esc BACK | pressKey("escape")
|
|
32
|
+
* Back BACK | error (no Back button on iOS)
|
|
33
|
+
* Home, Super, XF86HomePage HOME | home button
|
|
34
|
+
* Up/Down/Left/Right DPAD_* | pressKey("up" ...)
|
|
35
|
+
* space SPACE | pressKey("space")
|
|
36
|
+
* XF86AudioRaiseVolume VOLUME_UP | volumeUp button
|
|
37
|
+
* XF86AudioLowerVolume VOLUME_DOWN | volumeDown button
|
|
38
|
+
* XF86AudioMute VOLUME_MUTE | error
|
|
39
|
+
* Power, XF86PowerOff, Lock POWER | lock button
|
|
40
|
+
* Menu MENU | error
|
|
41
|
+
* a single digit KEYCODE_<d> | the digit (Android reads a bare "4" as keycode 4 = BACK)
|
|
42
|
+
* anything else passed through | passed through, lowercased
|
|
43
|
+
* Modifiers in a chord (ctrl+a): ctrl/control, shift, alt/option, super/meta/cmd/command.
|
|
44
|
+
*/
|
|
45
|
+
export declare class LimrunProvider implements ComputerProvider {
|
|
46
|
+
private apiKey;
|
|
47
|
+
private opts;
|
|
48
|
+
readonly id = "limrun";
|
|
49
|
+
/** Android emulators and iPhone simulators. Limrun also offers tablets/iPads, not routed here. */
|
|
50
|
+
readonly computerOs: ComputerOs[];
|
|
51
|
+
private sdk?;
|
|
52
|
+
constructor(apiKey?: string | undefined, opts?: {
|
|
53
|
+
/** e.g. "10m", up to "24h". Unset uses the organization default (Limrun's own default is 3m). */
|
|
54
|
+
inactivityTimeout?: string;
|
|
55
|
+
/** Region or region group, e.g. "us-west1" or "eu". Unset lets Limrun pick by proximity. */
|
|
56
|
+
region?: string;
|
|
57
|
+
baseURL?: string;
|
|
58
|
+
});
|
|
59
|
+
configured(): boolean;
|
|
60
|
+
/** @internal */
|
|
61
|
+
client(): Promise<{
|
|
62
|
+
mod: LimrunModule;
|
|
63
|
+
lim: LimrunClient;
|
|
64
|
+
}>;
|
|
65
|
+
createComputer(spec: ComputerSpec): Promise<ProviderComputer>;
|
|
66
|
+
/** Limrun ids don't say which platform they belong to, so try Android, then iOS. */
|
|
67
|
+
connectComputer(nativeId: string): Promise<ProviderComputer>;
|
|
68
|
+
}
|
|
69
|
+
type LimrunModule = typeof import("@limrun/api");
|
|
70
|
+
type LimrunClient = InstanceType<LimrunModule["Limrun"]>;
|
|
71
|
+
/** @internal "ctrl+Return" on android -> { key: "ENTER", modifiers: ["ctrl"] }. Throws if unavailable. */
|
|
72
|
+
export declare function limrunKey(chord: string, os: "android" | "ios"): {
|
|
73
|
+
key: string;
|
|
74
|
+
modifiers: string[];
|
|
75
|
+
button?: string;
|
|
76
|
+
};
|
|
77
|
+
export {};
|