@constal/sdk 6.10.0 → 6.12.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/package.json +1 -1
- package/publish/api.json +42 -26
- package/publish/index.d.ts +571 -338
- package/publish/index.js +296 -302
package/publish/index.d.ts
CHANGED
|
@@ -1479,7 +1479,30 @@ interface PriceTableRef {
|
|
|
1479
1479
|
version: string;
|
|
1480
1480
|
hash: Hash;
|
|
1481
1481
|
}
|
|
1482
|
-
|
|
1482
|
+
interface UsageReport {
|
|
1483
|
+
cpuMs: number | null;
|
|
1484
|
+
wallMs: number;
|
|
1485
|
+
providerUnits?: Record<string, number>;
|
|
1486
|
+
priceTable: PriceTableRef;
|
|
1487
|
+
microUsd: number;
|
|
1488
|
+
quality: "reported" | "measured" | "estimated";
|
|
1489
|
+
/** The provider the usage ran on, where the Resource's configuration names several (a sandbox pool's `providers`): the
|
|
1490
|
+
* report is priced at that provider's rates under `priceTable`. */
|
|
1491
|
+
provider?: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Usage the invocation goes on incurring after its outcome - a sandbox's idle tail - priced as forecast. The
|
|
1494
|
+
* platform holds each item for this invocation's Run until no later report of the same Resource can still revise
|
|
1495
|
+
* it, then settles it once, by id.
|
|
1496
|
+
*/
|
|
1497
|
+
deferred?: DeferredUsageReport[];
|
|
1498
|
+
/** Final, smaller amounts for deferred items earlier invocations of the same Resource reported, by id. */
|
|
1499
|
+
revisions?: DeferredUsageReport[];
|
|
1500
|
+
}
|
|
1501
|
+
interface DeferredUsageReport {
|
|
1502
|
+
id: string;
|
|
1503
|
+
usage: UsageReport;
|
|
1504
|
+
}
|
|
1505
|
+
type SandboxNetworkMode = "block-all" | "cidr-allow" | "domain-allow" | "unrestricted";
|
|
1483
1506
|
type SandboxNetworkPolicy = {
|
|
1484
1507
|
mode: "block-all";
|
|
1485
1508
|
} | {
|
|
@@ -1488,15 +1511,6 @@ type SandboxNetworkPolicy = {
|
|
|
1488
1511
|
} | {
|
|
1489
1512
|
mode: "domain-allow";
|
|
1490
1513
|
domains: string[];
|
|
1491
|
-
} | {
|
|
1492
|
-
mode: "managed-http";
|
|
1493
|
-
transport: "bridge";
|
|
1494
|
-
egress: CRN;
|
|
1495
|
-
} | {
|
|
1496
|
-
mode: "managed-http";
|
|
1497
|
-
transport: "proxy";
|
|
1498
|
-
egress: CRN;
|
|
1499
|
-
domains: string[];
|
|
1500
1514
|
} | {
|
|
1501
1515
|
mode: "unrestricted";
|
|
1502
1516
|
};
|
|
@@ -1752,18 +1766,14 @@ interface SandboxGovernanceControls {
|
|
|
1752
1766
|
command_timeout_ms: number;
|
|
1753
1767
|
cpu: number;
|
|
1754
1768
|
disk_gib: number;
|
|
1755
|
-
idle_stop_ms: number;
|
|
1756
|
-
max_concurrent_commands: number;
|
|
1757
1769
|
max_file_bytes: number;
|
|
1758
1770
|
memory_gib: number;
|
|
1759
1771
|
network_cidrs: string[];
|
|
1760
1772
|
network_domains: string[];
|
|
1761
|
-
|
|
1762
|
-
network_mode: "block-all" | "cidr-allow" | "domain-allow" | "managed-http" | "unrestricted";
|
|
1763
|
-
network_transport: "bridge" | "proxy" | null;
|
|
1773
|
+
network_mode: "block-all" | "cidr-allow" | "domain-allow" | "unrestricted";
|
|
1764
1774
|
permitted_paths: string[];
|
|
1765
1775
|
}
|
|
1766
|
-
type SandboxGovernanceMeter = "commands" | "
|
|
1776
|
+
type SandboxGovernanceMeter = "commands" | "requests";
|
|
1767
1777
|
|
|
1768
1778
|
interface GovernanceContractRef {
|
|
1769
1779
|
id: string;
|
|
@@ -1869,13 +1879,6 @@ type PolicyInvocationOrigin = {
|
|
|
1869
1879
|
kind: "channel";
|
|
1870
1880
|
channel: CRN;
|
|
1871
1881
|
phase: "receive" | "respond" | "send" | "failed" | "authorize-subscription" | "presence" | "fetch";
|
|
1872
|
-
} | {
|
|
1873
|
-
kind: "sandbox";
|
|
1874
|
-
agent: CRN;
|
|
1875
|
-
sandbox: {
|
|
1876
|
-
crn: CRN;
|
|
1877
|
-
hash: Hash;
|
|
1878
|
-
};
|
|
1879
1882
|
} | {
|
|
1880
1883
|
kind: "system";
|
|
1881
1884
|
};
|
|
@@ -1959,359 +1962,537 @@ interface AnalyticsClient {
|
|
|
1959
1962
|
}
|
|
1960
1963
|
declare function analyticsEvent<Dimension extends string, Metric extends string>(definition: AnalyticsEventDefinition<Dimension, Metric>): AnalyticsEventDefinition<Dimension, Metric>;
|
|
1961
1964
|
|
|
1962
|
-
interface
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
digest: string | null;
|
|
1967
|
-
reference: string;
|
|
1965
|
+
interface SandboxResources {
|
|
1966
|
+
cpu: number;
|
|
1967
|
+
memoryGib: number;
|
|
1968
|
+
diskGib: number;
|
|
1968
1969
|
}
|
|
1969
|
-
/**
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1970
|
+
/**
|
|
1971
|
+
* Sandbox sizes: provider-neutral allocations a pool names with `size` (vCPU, memory in GiB, disk in GB), on any provider.
|
|
1972
|
+
* A pool that names one states the same allocation as its `resources`, which is what its usage is metered and priced on;
|
|
1973
|
+
* the provider decides what it starts to provide it (its nearest shape at or above the size's allocation). Every size has
|
|
1974
|
+
* its own disk, so a report's disk axis alone tells which size it was measured on.
|
|
1975
|
+
*/
|
|
1976
|
+
declare const SANDBOX_SIZES: {
|
|
1977
|
+
readonly xs: {
|
|
1978
|
+
readonly cpu: 0.0625;
|
|
1979
|
+
readonly memoryGib: 0.25;
|
|
1980
|
+
readonly diskGib: 2;
|
|
1979
1981
|
};
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1982
|
+
readonly s: {
|
|
1983
|
+
readonly cpu: 0.25;
|
|
1984
|
+
readonly memoryGib: 1;
|
|
1985
|
+
readonly diskGib: 4;
|
|
1986
|
+
};
|
|
1987
|
+
readonly m: {
|
|
1988
|
+
readonly cpu: 0.5;
|
|
1989
|
+
readonly memoryGib: 4;
|
|
1990
|
+
readonly diskGib: 8;
|
|
1991
|
+
};
|
|
1992
|
+
readonly l: {
|
|
1993
|
+
readonly cpu: 1;
|
|
1994
|
+
readonly memoryGib: 6;
|
|
1995
|
+
readonly diskGib: 12;
|
|
1996
|
+
};
|
|
1997
|
+
readonly xl: {
|
|
1998
|
+
readonly cpu: 2;
|
|
1999
|
+
readonly memoryGib: 8;
|
|
2000
|
+
readonly diskGib: 16;
|
|
2001
|
+
};
|
|
2002
|
+
readonly "2xl": {
|
|
2003
|
+
readonly cpu: 4;
|
|
2004
|
+
readonly memoryGib: 12;
|
|
2005
|
+
readonly diskGib: 20;
|
|
1989
2006
|
};
|
|
2007
|
+
};
|
|
2008
|
+
type SandboxSize = keyof typeof SANDBOX_SIZES;
|
|
2009
|
+
|
|
2010
|
+
/**
|
|
2011
|
+
* The events of a deployment's sandbox service:
|
|
2012
|
+
*
|
|
2013
|
+
* - `sandbox.lifecycle` and `sandbox.usage`, written by the sandbox's coordinator in the transaction that changed its view
|
|
2014
|
+
* or metered its time or its egress, numbered per sandbox (`seq`) across both types. The coordinator keeps them for the sandbox's
|
|
2015
|
+
* lifetime, its history (the door's history operation), and its alarm delivers each to its namespace's sandbox index
|
|
2016
|
+
* after the call that wrote it answered, again until the index takes it, so a failed delivery loses none. Delivery is at
|
|
2017
|
+
* least once and in no order: the index keeps a sandbox's newest view by `seq`, and counts a usage item once by its `id`;
|
|
2018
|
+
* - `sandbox.orphan` and `sandbox.orphan.withdrawn`, written by the watcher of a provider account (one per tenant,
|
|
2019
|
+
* namespace and provider account) and delivered so to the same index, which keeps an orphan by its `provider`,
|
|
2020
|
+
* `account` and `instance` as the one of their events with the latest `at` says, a withdrawal winning a tie.
|
|
2021
|
+
*
|
|
2022
|
+
* The index answers the door's list and usage operations (packages/sdk/src/sandbox-door.ts).
|
|
2023
|
+
*/
|
|
2024
|
+
/**
|
|
2025
|
+
* What a sandbox's coordinator metered, as it settles it with the platform; `id` makes its debit once. Its `usage` carries
|
|
2026
|
+
* both egress units, `egress_bytes` (SANDBOX_EGRESS_METER) and `proxy_egress_bytes` (SANDBOX_PROXY_EGRESS_UNIT), among its
|
|
2027
|
+
* `providerUnits`:
|
|
2028
|
+
*
|
|
2029
|
+
* - `running:<fromAt>`, one stretch of its running time, on its size's allocation, with no egress;
|
|
2030
|
+
* - `egress:<fromAt>`, the bytes it sent out that one read of its egress found, with no running time (`wallMs` 0): on its
|
|
2031
|
+
* own network, from its provider's metrics, and through an egress proxy, as the proxy reported them.
|
|
2032
|
+
*/
|
|
2033
|
+
interface SandboxUsageItem {
|
|
2034
|
+
id: string;
|
|
2035
|
+
fromAt: number;
|
|
2036
|
+
untilAt: number;
|
|
2037
|
+
usage: UsageReport;
|
|
1990
2038
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2039
|
+
/** What a sandbox's coordinator writes of its sandbox: the sandbox as the door names it, its labels then, and its number. */
|
|
2040
|
+
interface SandboxCoordinatorEvent {
|
|
2041
|
+
version: 1;
|
|
2042
|
+
/** 1, 2, 3 …: the order the coordinator wrote its sandbox's lifecycle and usage events in. */
|
|
2043
|
+
seq: number;
|
|
2044
|
+
/** Epoch milliseconds when the coordinator wrote it. */
|
|
2045
|
+
at: number;
|
|
2046
|
+
tenant: string;
|
|
2047
|
+
namespace: string;
|
|
2048
|
+
pool: string;
|
|
2049
|
+
/** The sandbox's door id. */
|
|
2050
|
+
sandbox: string;
|
|
2051
|
+
labels: SandboxLabels;
|
|
1995
2052
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
/**
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2053
|
+
/**
|
|
2054
|
+
* A change to a sandbox's view (its state, its provider instance, or a field a create or update set) or to the pool account
|
|
2055
|
+
* it runs under.
|
|
2056
|
+
*/
|
|
2057
|
+
interface SandboxLifecycleEvent extends SandboxCoordinatorEvent {
|
|
2058
|
+
type: "sandbox.lifecycle";
|
|
2059
|
+
/** The sandbox once changed, as the door answers it, but for its environment, which may hold secrets. */
|
|
2060
|
+
view: Omit<SandboxView, "env">;
|
|
2061
|
+
/** The pool account's Credential (its CRN) the sandbox runs under, null for the deployment's own account of its provider. */
|
|
2062
|
+
account: string | null;
|
|
2063
|
+
}
|
|
2064
|
+
/** Running time or egress the coordinator metered, as it settles it with the platform. */
|
|
2065
|
+
interface SandboxUsageEvent extends SandboxCoordinatorEvent {
|
|
2066
|
+
type: "sandbox.usage";
|
|
2067
|
+
item: SandboxUsageItem;
|
|
2068
|
+
}
|
|
2069
|
+
/**
|
|
2070
|
+
* A provider instance tagged with the tenant and namespace that none of their sandboxes on that provider account holds (its
|
|
2071
|
+
* tags name no sandbox, or the sandbox they name answers it is none of its), which the account's watcher found listing it,
|
|
2072
|
+
* settled (neither starting nor stopping), a relist apart, and reports once. Nothing deletes it: the account's owner decides
|
|
2073
|
+
* what it is. It names the pool account and not a pool because the instance carries only its tenant's, namespace's,
|
|
2074
|
+
* account's and claimed sandbox's tags, and so no pool can be known for it.
|
|
2075
|
+
*
|
|
2076
|
+
* One watcher lists one pool account of a namespace, and knows only that account's sandboxes. So where two of a
|
|
2077
|
+
* namespace's accounts reach one account at the provider (two Credentials of one provider key or team, or a Credential and
|
|
2078
|
+
* the deployment's own account), each watcher lists the other's sandboxes too, and reports them as its orphans.
|
|
2079
|
+
*/
|
|
2080
|
+
interface SandboxOrphanEvent {
|
|
2081
|
+
type: "sandbox.orphan";
|
|
2082
|
+
version: 1;
|
|
2083
|
+
/** Epoch milliseconds when the watcher found it. */
|
|
2084
|
+
at: number;
|
|
2085
|
+
tenant: string;
|
|
2086
|
+
namespace: string;
|
|
2087
|
+
/** The provider's name, as SandboxView's `provider.name` has it. */
|
|
2088
|
+
provider: string;
|
|
2089
|
+
/** The pool account's Credential (its CRN), or null for the deployment's own account of the provider. */
|
|
2090
|
+
account: string | null;
|
|
2091
|
+
/** The provider's own id for the instance. */
|
|
2092
|
+
instance: string;
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* An orphan reported before (SandboxOrphanEvent) that is an orphan no more. Either the sandbox its tags name then answered
|
|
2096
|
+
* the account's watcher that it is its own: the report was of an instance that sandbox's create had made and not yet
|
|
2097
|
+
* answered. Or the provider has it no more: it is gone, its account's owner having deleted it, say. Or the account's key
|
|
2098
|
+
* was removed, and its watcher watches it no more. Each report is withdrawn at most once, by the watcher that made it. The
|
|
2099
|
+
* index keeps the withdrawal, so a report no later than it, delivered after it, does not bring the orphan back.
|
|
2100
|
+
*/
|
|
2101
|
+
interface SandboxOrphanWithdrawnEvent extends Omit<SandboxOrphanEvent, "type" | "at"> {
|
|
2102
|
+
type: "sandbox.orphan.withdrawn";
|
|
2103
|
+
/** Epoch milliseconds when the watcher was told the instance is a sandbox's, found it gone, or stopped watching its account. */
|
|
2104
|
+
at: number;
|
|
2105
|
+
}
|
|
2106
|
+
/** A sandbox's own events, as its coordinator keeps them: its history. */
|
|
2107
|
+
type SandboxHistoryEvent = SandboxLifecycleEvent | SandboxUsageEvent;
|
|
2108
|
+
/** The events a namespace's sandbox index takes: its coordinators' and its account watchers'. */
|
|
2109
|
+
type SandboxIndexedEvent = SandboxHistoryEvent | SandboxOrphanEvent | SandboxOrphanWithdrawnEvent;
|
|
2013
2110
|
|
|
2014
|
-
/** Canonicalize one provider-neutral path and keep it inside the logical workspace. */
|
|
2015
|
-
declare function normalizeSandboxWorkspacePath(path: string, cwd?: string): string;
|
|
2016
2111
|
/**
|
|
2017
|
-
* A sandbox's
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2112
|
+
* A sandbox's state: the provider's own (`starting`, `running`, `stopping`, `stopped`, and `failed` when the provider
|
|
2113
|
+
* reports the sandbox broken) and the two the platform owns: `deleted`, and `failed` for a create or start the coordinator
|
|
2114
|
+
* gave up on.
|
|
2020
2115
|
*/
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2116
|
+
declare const SANDBOX_STATES: readonly ["starting", "running", "stopping", "stopped", "failed", "deleted"];
|
|
2117
|
+
type SandboxState = typeof SANDBOX_STATES[number];
|
|
2118
|
+
/**
|
|
2119
|
+
* A sandbox's egress, enforced by its provider's own network API: every destination, none, or only those listed. A
|
|
2120
|
+
* provider without one takes only `all` (SandboxCapabilities.egress).
|
|
2121
|
+
*/
|
|
2122
|
+
type SandboxEgress = {
|
|
2123
|
+
mode: "all";
|
|
2124
|
+
} | {
|
|
2125
|
+
mode: "none";
|
|
2126
|
+
} | {
|
|
2127
|
+
mode: "allow";
|
|
2128
|
+
allow: SandboxEgressDestination[];
|
|
2129
|
+
};
|
|
2130
|
+
/**
|
|
2131
|
+
* One destination an `allow` egress admits: a host name, exact or `*.example.com` (the apex and every name under it), or
|
|
2132
|
+
* an IPv4 or IPv6 range in CIDR notation (one address is a /32 or /128), on the ports it names. Without `ports`: every port
|
|
2133
|
+
* the provider matches that kind of destination on (SandboxEgressCapabilities.domains.ports).
|
|
2134
|
+
*/
|
|
2135
|
+
type SandboxEgressDestination = {
|
|
2136
|
+
domain: string;
|
|
2137
|
+
ports?: number[];
|
|
2138
|
+
} | {
|
|
2139
|
+
cidr: string;
|
|
2140
|
+
ports?: number[];
|
|
2141
|
+
};
|
|
2142
|
+
/** The paths a file operation reaches: any path, or only those under these absolute directories. */
|
|
2143
|
+
type SandboxFileScope = "any" | {
|
|
2144
|
+
under: string[];
|
|
2145
|
+
};
|
|
2146
|
+
/**
|
|
2147
|
+
* What the provider's exec API takes, each a field of SandboxExecRequest or a behavior of the door's exec: output while the
|
|
2148
|
+
* command runs (`streaming`), one-shot standard input (`stdin`), a pseudo-terminal (`pty`), a command that outlives the
|
|
2149
|
+
* request that started it and is read again or cancelled by its id (`detach`), per-command variables (`env`), a working
|
|
2150
|
+
* directory (`cwd`) and a time limit the provider enforces (`timeout`).
|
|
2151
|
+
*/
|
|
2152
|
+
interface SandboxExecCapabilities {
|
|
2153
|
+
streaming: boolean;
|
|
2154
|
+
stdin: boolean;
|
|
2155
|
+
pty: boolean;
|
|
2156
|
+
detach: boolean;
|
|
2157
|
+
env: boolean;
|
|
2158
|
+
cwd: boolean;
|
|
2159
|
+
timeout: boolean;
|
|
2160
|
+
}
|
|
2161
|
+
/** The provider's file API, per operation: the paths it reaches, or null when it has no such operation. */
|
|
2162
|
+
interface SandboxFileCapabilities {
|
|
2163
|
+
read: SandboxFileScope | null;
|
|
2164
|
+
write: SandboxFileScope | null;
|
|
2165
|
+
delete: SandboxFileScope | null;
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2168
|
+
* The egress vocabulary the provider's network API enforces: its modes; domain destinations (whether `*.` names match, and
|
|
2169
|
+
* the only ports a domain is matched on, null when it is matched on the ports the destination names); CIDR destinations by
|
|
2170
|
+
* IP version; whether a destination may name ports; whether one policy may list domains and CIDRs together; and whether a
|
|
2171
|
+
* running sandbox's egress can be replaced (otherwise only at create, or on a stopped sandbox, taking effect at its start).
|
|
2172
|
+
*/
|
|
2173
|
+
interface SandboxEgressCapabilities {
|
|
2174
|
+
modes: ("all" | "none" | "allow")[];
|
|
2175
|
+
domains: {
|
|
2176
|
+
wildcards: boolean;
|
|
2177
|
+
ports: number[] | null;
|
|
2178
|
+
} | null;
|
|
2179
|
+
cidrs: {
|
|
2180
|
+
ipv4: boolean;
|
|
2181
|
+
ipv6: boolean;
|
|
2182
|
+
} | null;
|
|
2183
|
+
ports: boolean;
|
|
2184
|
+
mixed: boolean;
|
|
2185
|
+
live: boolean;
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* How a sandbox's ports are reached: at a URL the provider serves itself (GET …/ports/{port} answers it with the
|
|
2189
|
+
* authorization it needs; `maxPorts`: how many ports one sandbox can have reachable, null for any), or only from inside
|
|
2190
|
+
* Constal's sandbox service, through the door's forward route (`door`).
|
|
2191
|
+
*/
|
|
2192
|
+
type SandboxPortCapabilities = {
|
|
2193
|
+
via: "provider";
|
|
2194
|
+
maxPorts: number | null;
|
|
2195
|
+
} | {
|
|
2196
|
+
via: "door";
|
|
2197
|
+
};
|
|
2198
|
+
/** The provider's own snapshots: whether one keeps memory (a create from it resumes its processes), and what taking one does to the sandbox. */
|
|
2199
|
+
interface SandboxSnapshotCapabilities {
|
|
2200
|
+
memory: boolean;
|
|
2201
|
+
effect: "none" | "pause" | "stop";
|
|
2202
|
+
}
|
|
2203
|
+
/**
|
|
2204
|
+
* What survives the door's stop on this provider, which is the provider's own: memory, processes and disk (its stop is a
|
|
2205
|
+
* pause, and a start resumes them); the disk, all of it (`only` null) or only under `only`, without what it names in
|
|
2206
|
+
* `except`, which a start boots again; or nothing (its stop destroys the instance, and a start boots the image afresh).
|
|
2207
|
+
*/
|
|
2208
|
+
type SandboxPersistence = {
|
|
2209
|
+
kind: "memory";
|
|
2210
|
+
} | {
|
|
2211
|
+
kind: "disk";
|
|
2212
|
+
only: string[] | null;
|
|
2213
|
+
except: string[];
|
|
2214
|
+
} | {
|
|
2215
|
+
kind: "none";
|
|
2216
|
+
};
|
|
2217
|
+
/**
|
|
2218
|
+
* How the secrets layer (connectors' Credentials, sign-ins and Logins, added by Constal's egress gateway) reaches a
|
|
2219
|
+
* sandbox's traffic, by the provider's own egress feature: its egress proxy (`proxy`), its forwarding of requests to a URL
|
|
2220
|
+
* (`forwarding`), its interception of them (`interception`), or headers it sets itself (`header-injection`). Nothing in the
|
|
2221
|
+
* sandbox carries it, and a feature that needs anything installed in the sandbox does not count. `none`: a sandbox on this
|
|
2222
|
+
* provider takes no `connectionKeys`.
|
|
2223
|
+
*/
|
|
2224
|
+
type SandboxSecretsRoute = "proxy" | "forwarding" | "interception" | "header-injection" | "none";
|
|
2225
|
+
/**
|
|
2226
|
+
* The provider's own labels of a sandbox: it keeps those its create is given, and its list answers them, so what it holds,
|
|
2227
|
+
* a change of its own or its dashboard's among it, is the sandbox's `provider.labels`; `write`: it changes them on a
|
|
2228
|
+
* sandbox it made, so an update's `labels` reach it too. The sandbox's own `labels` are its caller's on every provider.
|
|
2229
|
+
* Where it keeps none (SandboxCapabilities.labels null), there are no provider labels.
|
|
2230
|
+
*/
|
|
2231
|
+
interface SandboxLabelCapabilities {
|
|
2232
|
+
write: boolean;
|
|
2233
|
+
}
|
|
2234
|
+
/**
|
|
2235
|
+
* What a provider's own API offers, as its adapter declares it: what a create takes besides its image and size (`create`),
|
|
2236
|
+
* exec, files, egress, ports and snapshots (null where the provider has none), what survives a stop (`persistence`),
|
|
2237
|
+
* whether the provider can also pause a sandbox with its memory (`pauseWithMemory`), how secrets reach its traffic,
|
|
2238
|
+
* whether its own metrics API keeps a sandbox's resource usage over time (`metrics`), whether its API lists an account's
|
|
2239
|
+
* sandboxes by the tags each create writes (`list`), which is how what the provider does to a sandbox is observed, and
|
|
2240
|
+
* whether it keeps a sandbox's labels and changes them (`labels`). A request that needs what is absent is refused with
|
|
2241
|
+
* `Unsupported` and `capability` naming the path, such as `exec.cwd`, `egress.live`, `files.write`, `secrets`, `metrics`
|
|
2242
|
+
* or `labels.write`.
|
|
2243
|
+
*/
|
|
2244
|
+
interface SandboxCapabilities {
|
|
2245
|
+
/** Whether a create takes the image's start command (`command`) and environment (`env`). */
|
|
2246
|
+
create: {
|
|
2247
|
+
command: boolean;
|
|
2248
|
+
env: boolean;
|
|
2249
|
+
};
|
|
2250
|
+
exec: SandboxExecCapabilities | null;
|
|
2251
|
+
files: SandboxFileCapabilities | null;
|
|
2252
|
+
egress: SandboxEgressCapabilities | null;
|
|
2253
|
+
ports: SandboxPortCapabilities | null;
|
|
2254
|
+
snapshots: SandboxSnapshotCapabilities | null;
|
|
2255
|
+
persistence: SandboxPersistence;
|
|
2256
|
+
pauseWithMemory: boolean;
|
|
2257
|
+
secrets: SandboxSecretsRoute;
|
|
2258
|
+
/** Whether the provider's own metrics API answers a sandbox's resource usage over time: the door's metrics operation. */
|
|
2259
|
+
metrics: boolean;
|
|
2260
|
+
/**
|
|
2261
|
+
* Whether the provider's API lists one account's sandboxes by the tags each create writes (its tenant's, namespace's,
|
|
2262
|
+
* account's and sandbox's), so one list per account, at its pool's relist interval, right after a create and on the
|
|
2263
|
+
* provider's webhook where it sends one, observes what changed at the provider, a sandbox it stopped, failed or deleted
|
|
2264
|
+
* itself among them; without it, each sandbox's own object at the provider observes what its sandbox did on its own. No
|
|
2265
|
+
* request needs it, so none is refused for its absence.
|
|
2266
|
+
*/
|
|
2267
|
+
list: boolean;
|
|
2268
|
+
/** The provider's own labels of a sandbox (SandboxLabelCapabilities); null where it keeps none. */
|
|
2269
|
+
labels: SandboxLabelCapabilities | null;
|
|
2270
|
+
}
|
|
2271
|
+
/** POST /sandboxes. */
|
|
2272
|
+
interface SandboxCreateRequest {
|
|
2273
|
+
/** The sandbox's id (SANDBOX_DOOR_ID), one the caller chose; omitted: one the door mints, kept under the create's key. */
|
|
2274
|
+
id?: string;
|
|
2275
|
+
/**
|
|
2276
|
+
* The sandbox-pool Resource it runs on (its provider, account, region, and default image and size), by its CRN; the
|
|
2277
|
+
* sandbox keeps the name sandboxDoorPoolName gives it.
|
|
2278
|
+
*/
|
|
2279
|
+
pool: CRN;
|
|
2280
|
+
/**
|
|
2281
|
+
* What the provider boots: an image reference it can boot, or a snapshot's `image`; omitted: the pool's, which a pool one of
|
|
2282
|
+
* whose providers has no default image refuses (Invalid, `image`).
|
|
2283
|
+
*/
|
|
2284
|
+
image?: string;
|
|
2285
|
+
/** A SANDBOX_SIZES name or an allocation, which usage is priced on; the provider gives its nearest shape at or above it. Omitted: the pool's. */
|
|
2286
|
+
size?: SandboxSize | SandboxResources;
|
|
2287
|
+
/** The command the image starts with, in place of its own (`create.command`). */
|
|
2288
|
+
command?: string[];
|
|
2289
|
+
/** The sandbox's environment (`create.env`). */
|
|
2290
|
+
env?: Record<string, string>;
|
|
2291
|
+
/** Omitted: `{ mode: "all" }`. */
|
|
2292
|
+
network?: SandboxEgress;
|
|
2293
|
+
/** Kept by the coordinator and answered with the sandbox; given to the provider as its labels where it takes them. */
|
|
2030
2294
|
labels?: SandboxLabels;
|
|
2295
|
+
/** The tenant's owner connections (binding keys) the secrets layer adds to the sandbox's requests; omitted or []: none. */
|
|
2296
|
+
connectionKeys?: string[];
|
|
2031
2297
|
/**
|
|
2032
|
-
*
|
|
2033
|
-
*
|
|
2034
|
-
* createSandbox with `entry` works in it, its files kept from one Run to the next, and the Session's calls that name no
|
|
2035
|
-
* sandbox (`workspace()`) go there until a createSandbox without it. No Session's end releases it: it is deleted 6 h
|
|
2036
|
-
* after it was last used, and the next createSandbox makes a new one. Make it a Run's first call to the pool: a Run's fast
|
|
2037
|
-
* calls keep the sandbox their grant found.
|
|
2298
|
+
* How long it runs idle before its coordinator stops it (SandboxView.idleStopMs), in milliseconds; omitted: it is never
|
|
2299
|
+
* stopped when idle, whatever its pool's `idleStopMs`, which prices the idle tail.
|
|
2038
2300
|
*/
|
|
2039
|
-
|
|
2301
|
+
idleStopMs?: number;
|
|
2040
2302
|
}
|
|
2041
|
-
/** CreateSandboxOptions `scope`. */
|
|
2042
|
-
type SandboxScope = "session" | "entry";
|
|
2043
2303
|
/**
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2304
|
+
* PATCH /sandboxes/{id}: each field replaces its value whole. `network` on a running sandbox needs `egress.live`;
|
|
2305
|
+
* `labels` are the sandbox's own on every provider, and on one that writes them (`labels.write`) reach the provider
|
|
2306
|
+
* before the update answers; `connectionKeys` and `idleStopMs` apply at once.
|
|
2047
2307
|
*/
|
|
2048
|
-
interface
|
|
2049
|
-
|
|
2308
|
+
interface SandboxUpdateRequest {
|
|
2309
|
+
network?: SandboxEgress;
|
|
2310
|
+
labels?: SandboxLabels;
|
|
2311
|
+
connectionKeys?: string[];
|
|
2312
|
+
idleStopMs?: number;
|
|
2050
2313
|
}
|
|
2051
|
-
|
|
2314
|
+
/** POST /sandboxes/{id}/exec: `cmd` and `args` are the argv; each other field needs its `exec` capability. */
|
|
2315
|
+
interface SandboxExecRequest {
|
|
2052
2316
|
cmd: string;
|
|
2053
2317
|
args?: string[];
|
|
2054
2318
|
cwd?: string;
|
|
2055
2319
|
env?: Record<string, string>;
|
|
2056
2320
|
stdin?: string;
|
|
2057
2321
|
timeoutMs?: number;
|
|
2058
|
-
outputs?: string[];
|
|
2059
|
-
/** Upload stdout and stderr to content-addressed storage even when
|
|
2060
|
-
* `stdoutPreview` holds them completely. By default output stays on the
|
|
2061
|
-
* sandbox disk and `stdoutRef`/`stderrRef` are null unless the preview was
|
|
2062
|
-
* truncated or outputs were declared. */
|
|
2063
|
-
retain?: boolean;
|
|
2064
|
-
/** Keep stdin open for governed process I/O until EOF or process termination. */
|
|
2065
|
-
interactive?: boolean;
|
|
2066
|
-
/** Stable caller-owned name for one interactive process in this Run. */
|
|
2067
|
-
processKey?: string;
|
|
2068
|
-
credentials?: SandboxProcessCredentials;
|
|
2069
|
-
}
|
|
2070
|
-
interface SandboxProcessCredentials {
|
|
2071
|
-
/** Variable receives the Credential value. */
|
|
2072
|
-
env?: Record<string, ResourceCredentialBinding>;
|
|
2073
|
-
/** Variable receives a memory-backed file path containing the value. */
|
|
2074
|
-
files?: Record<string, ResourceCredentialBinding>;
|
|
2075
|
-
}
|
|
2076
|
-
declare const SANDBOX_PROCESS_IO_OPERATIONS: readonly ["process.status", "process.read", "process.write", "process.close"];
|
|
2077
|
-
declare const SANDBOX_PROCESS_OPERATIONS: readonly ["process.resolve", "process.status", "process.read", "process.write", "process.close", "process.stop"];
|
|
2078
|
-
type SandboxProcessIoOperation = typeof SANDBOX_PROCESS_IO_OPERATIONS[number];
|
|
2079
|
-
type SandboxProcessOperation = typeof SANDBOX_PROCESS_OPERATIONS[number];
|
|
2080
|
-
interface SandboxProcessReadInput {
|
|
2081
|
-
stream: "stdout" | "stderr";
|
|
2082
|
-
offset: number;
|
|
2083
|
-
limit: number;
|
|
2084
|
-
}
|
|
2085
|
-
interface SandboxProcessReadResult {
|
|
2086
|
-
/** Base64 bytes, which may split a UTF-8 character or application frame. */
|
|
2087
|
-
data: string;
|
|
2088
|
-
bytes: number;
|
|
2089
|
-
offset: number;
|
|
2090
|
-
returnedBytes: number;
|
|
2091
|
-
nextOffset: number;
|
|
2092
|
-
eof: boolean;
|
|
2093
2322
|
}
|
|
2094
|
-
|
|
2323
|
+
/**
|
|
2324
|
+
* What a provider allocated a sandbox, as it answered it: its vCPUs, memory in GiB and disk in GB (SandboxResources' fields),
|
|
2325
|
+
* each null where the provider's answer left it out.
|
|
2326
|
+
*/
|
|
2327
|
+
type SandboxProviderAllocation = {
|
|
2328
|
+
[K in keyof SandboxResources]: number | null;
|
|
2329
|
+
};
|
|
2330
|
+
/** A sandbox as the door answers it. */
|
|
2331
|
+
interface SandboxView {
|
|
2095
2332
|
id: string;
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2333
|
+
namespace: string;
|
|
2334
|
+
pool: string;
|
|
2335
|
+
state: SandboxState;
|
|
2336
|
+
/**
|
|
2337
|
+
* Why it stopped, failed or was deleted, when that was said: its caller's stop, its idle stop (idleStopMs), the tenant's
|
|
2338
|
+
* balance running out, the provider's own stop (its time limit), a create or start that failed, or a stop, failure or
|
|
2339
|
+
* deletion at its provider that its provider's observer saw. Null otherwise.
|
|
2340
|
+
*/
|
|
2341
|
+
reason: string | null;
|
|
2342
|
+
image: string;
|
|
2343
|
+
/** The allocation its size states, which usage is priced on. */
|
|
2344
|
+
resources: SandboxResources;
|
|
2345
|
+
command: string[] | null;
|
|
2346
|
+
env: Record<string, string>;
|
|
2347
|
+
network: SandboxEgress;
|
|
2348
|
+
/** Its labels: those its create or update named, its caller's alone; what its provider holds is `provider.labels`. */
|
|
2349
|
+
labels: SandboxLabels;
|
|
2350
|
+
connectionKeys: string[];
|
|
2351
|
+
/**
|
|
2352
|
+
* How long it runs idle before its coordinator stops it: its create's or update's; null when neither named one, and it is
|
|
2353
|
+
* never stopped when idle. It is idle from its start, or from the end of the last call on its instance (an exec and its
|
|
2354
|
+
* reads and cancel, a file, a snapshot, a port), while no such call is in flight and no command it ran still runs; a get,
|
|
2355
|
+
* an update or a lifecycle call is not one.
|
|
2356
|
+
*/
|
|
2357
|
+
idleStopMs: number | null;
|
|
2358
|
+
/**
|
|
2359
|
+
* Where it runs: the provider, its own id for the sandbox (null until it has one), the allocation it gave (its create's
|
|
2360
|
+
* answer, then as last observed at the provider; a field the provider left out null), beside `resources` asked for, the
|
|
2361
|
+
* labels it holds (its create's answer, a label write's, then as last observed, but for Constal's own tags; null where it
|
|
2362
|
+
* keeps none, `capabilities.labels`, and until a sandbox made before them is next observed), and what it offers.
|
|
2363
|
+
*/
|
|
2364
|
+
provider: {
|
|
2365
|
+
name: string;
|
|
2366
|
+
id: string | null;
|
|
2367
|
+
allocation: SandboxProviderAllocation | null;
|
|
2368
|
+
labels: SandboxLabels | null;
|
|
2369
|
+
capabilities: SandboxCapabilities;
|
|
2370
|
+
};
|
|
2371
|
+
createdAt: number;
|
|
2372
|
+
startedAt: number | null;
|
|
2373
|
+
stoppedAt: number | null;
|
|
2103
2374
|
}
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
/** Process facts, independent of whether the caller considers the exit code successful. */
|
|
2114
|
-
interface SandboxCommandExecution {
|
|
2375
|
+
type SandboxExecutionState = "running" | "exited" | "timed-out" | "cancelled" | "failed";
|
|
2376
|
+
/**
|
|
2377
|
+
* One command and its result. `stdout` and `stderr` are whole, as the provider answered them (while it runs, what it has
|
|
2378
|
+
* answered so far); Constal cuts nothing, and a provider that keeps only part of a stream answers that part. `error`: why
|
|
2379
|
+
* it `failed` (the provider could not run it, or lost it).
|
|
2380
|
+
*/
|
|
2381
|
+
interface SandboxExecution {
|
|
2382
|
+
id: string;
|
|
2383
|
+
state: SandboxExecutionState;
|
|
2115
2384
|
exitCode: number | null;
|
|
2116
|
-
/** The terminating signal, when reported by the runner. */
|
|
2117
2385
|
signal: string | null;
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2386
|
+
stdout: string;
|
|
2387
|
+
stderr: string;
|
|
2388
|
+
error: string | null;
|
|
2389
|
+
startedAt: number;
|
|
2390
|
+
endedAt: number | null;
|
|
2123
2391
|
}
|
|
2124
|
-
|
|
2392
|
+
/** A file a call wrote or deleted: its path, and its size when written. */
|
|
2393
|
+
interface SandboxFile {
|
|
2125
2394
|
path: string;
|
|
2126
|
-
|
|
2127
|
-
message: string;
|
|
2395
|
+
bytes: number | null;
|
|
2128
2396
|
}
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
/** Null when no process outcome was established; absent on older sandbox results. A resolved invocation may contain an execution error or a nonzero exit. */
|
|
2136
|
-
execution?: SandboxCommandExecution | null;
|
|
2137
|
-
/** Failures retaining streams or declared outputs, separate from process execution. Absent on older results. */
|
|
2138
|
-
collectionErrors?: SandboxCommandCollectionError[];
|
|
2139
|
-
/**
|
|
2140
|
-
* The stream's output, or its start: up to 100 KiB per stream. On pool versions with the sandbox fast path, an exec it
|
|
2141
|
-
* answers holds complete output up to 512 KiB for stdout and stderr together (`stdoutTruncated` false); a stream beyond
|
|
2142
|
-
* that budget keeps a 100 KiB preview with `…Truncated` true, its size in `…Bytes` and its content in `…Ref`. Read
|
|
2143
|
-
* `…Truncated` rather than assuming a preview size.
|
|
2144
|
-
*/
|
|
2145
|
-
stdoutPreview: string;
|
|
2146
|
-
/** As `stdoutPreview`, for stderr; it shares the same 512 KiB inline budget, after stdout. */
|
|
2147
|
-
stderrPreview: string;
|
|
2148
|
-
stdoutRef: Ref | null;
|
|
2149
|
-
stderrRef: Ref | null;
|
|
2150
|
-
/** Whether the stream holds more than its preview shows. Absent from results that predate it. */
|
|
2151
|
-
stdoutTruncated?: boolean;
|
|
2152
|
-
stderrTruncated?: boolean;
|
|
2153
|
-
/** The stream's size in bytes; null when it was truncated and not retained. Absent from results that predate it. */
|
|
2154
|
-
stdoutBytes?: number | null;
|
|
2155
|
-
stderrBytes?: number | null;
|
|
2156
|
-
outputs: {
|
|
2157
|
-
path: string;
|
|
2158
|
-
ref: Ref;
|
|
2159
|
-
bytes: number;
|
|
2160
|
-
}[];
|
|
2161
|
-
sandbox: {
|
|
2162
|
-
id: string;
|
|
2163
|
-
generation: number;
|
|
2164
|
-
fresh: boolean;
|
|
2165
|
-
};
|
|
2166
|
-
reason?: string;
|
|
2397
|
+
/** A snapshot the provider took: its id, the image a create boots it from, and whether it kept memory. */
|
|
2398
|
+
interface SandboxSnapshot {
|
|
2399
|
+
id: string;
|
|
2400
|
+
image: string;
|
|
2401
|
+
memory: boolean;
|
|
2402
|
+
createdAt: number;
|
|
2167
2403
|
}
|
|
2168
|
-
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* A sandbox-pool Resource's operations: the sandbox door's (SANDBOX_DOOR_OPERATIONS in sandbox-door.ts), each one call to it
|
|
2407
|
+
* with the Run's own authority, named as the door names them. The door's port routes are not among them: an endpoint
|
|
2408
|
+
* answers the provider's own authorization, and a forward is the port's stream. Nor are its command and snapshot lists: an
|
|
2409
|
+
* operation more would be another sandbox governance contract (its `requests` meter governs every operation here), which Policies pin.
|
|
2410
|
+
*/
|
|
2411
|
+
declare const SANDBOX_POOL_OPERATIONS: readonly ["create", "get", "start", "stop", "delete", "update", "exec", "execution", "cancel", "readFile", "writeFile", "deleteFile", "snapshot", "deleteSnapshot"];
|
|
2412
|
+
type SandboxPoolOperation = typeof SANDBOX_POOL_OPERATIONS[number];
|
|
2413
|
+
/** A create through a pool: the door's create request, whose pool is the pool's own Resource. */
|
|
2414
|
+
type SandboxPoolCreateRequest = Omit<SandboxCreateRequest, "pool">;
|
|
2415
|
+
/** A file readFile answered: its path, and its bytes, whole, stored by reference. */
|
|
2416
|
+
interface SandboxFileContent {
|
|
2169
2417
|
path: string;
|
|
2170
2418
|
ref: Ref;
|
|
2171
2419
|
bytes: number;
|
|
2172
2420
|
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2421
|
+
/** What writeFile writes: UTF-8 text, or a stored value's bytes. */
|
|
2422
|
+
type SandboxFileBody = string | {
|
|
2423
|
+
ref: Ref;
|
|
2424
|
+
};
|
|
2425
|
+
/** A wait a call long-polls with, in milliseconds, for as long as it asks; omitted or 0 answers at once. */
|
|
2426
|
+
interface SandboxWaitOptions {
|
|
2427
|
+
waitMs?: number;
|
|
2176
2428
|
invoke?: InvokeOpts;
|
|
2177
2429
|
}
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
content: string;
|
|
2181
|
-
contentHash: Ref;
|
|
2182
|
-
bytes: number;
|
|
2183
|
-
offset: number;
|
|
2184
|
-
returnedBytes: number;
|
|
2185
|
-
nextOffset: number | null;
|
|
2186
|
-
}
|
|
2187
|
-
interface SandboxWriteFileResult {
|
|
2188
|
-
path: string;
|
|
2189
|
-
contentHash: Ref;
|
|
2190
|
-
bytes: number;
|
|
2191
|
-
}
|
|
2192
|
-
interface SandboxMutationResult {
|
|
2193
|
-
ok: boolean;
|
|
2194
|
-
}
|
|
2195
|
-
/** Immutable image handle owned by exactly one SandboxPool Resource. */
|
|
2196
|
-
interface SandboxImage {
|
|
2430
|
+
/** One sandbox of a pool, addressed by its id: each method is one door call. */
|
|
2431
|
+
interface Sandbox {
|
|
2197
2432
|
readonly id: string;
|
|
2198
2433
|
readonly pool: SandboxPool;
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
readonly agent: CRN;
|
|
2207
|
-
readonly session: string;
|
|
2434
|
+
get(options?: SandboxWaitOptions): Promise<SandboxView>;
|
|
2435
|
+
/** Answers once the start settles, or the sandbox as it is when the wait ends (`starting`). */
|
|
2436
|
+
start(opts?: InvokeOpts): Promise<SandboxView>;
|
|
2437
|
+
/** What survives a stop is the provider's own (SandboxCapabilities.persistence). */
|
|
2438
|
+
stop(opts?: InvokeOpts): Promise<SandboxView>;
|
|
2439
|
+
delete(opts?: InvokeOpts): Promise<SandboxView>;
|
|
2440
|
+
update(patch: SandboxUpdateRequest, opts?: InvokeOpts): Promise<SandboxView>;
|
|
2208
2441
|
/**
|
|
2209
|
-
* Run one command. `await
|
|
2210
|
-
*
|
|
2211
|
-
* delivers the result through the Handle. `opts.wait` (`"inline"` | `"async"`) overrides that choice and passes through
|
|
2212
|
-
* unchanged; it never changes the Handle id or the operation's identity.
|
|
2442
|
+
* Run one command through the provider's exec API. `await sandbox.exec(...)` waits for it inline; `start()` first, or
|
|
2443
|
+
* racing it with a durable wait, answers once the door admitted it and delivers the result through the Handle.
|
|
2213
2444
|
*/
|
|
2214
|
-
exec(
|
|
2215
|
-
/**
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
/**
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
invoke?: InvokeOpts;
|
|
2232
|
-
}): InvocationHandle<SandboxMutationResult>;
|
|
2233
|
-
deleteFile(path: string, opts?: InvokeOpts): InvocationHandle<SandboxMutationResult>;
|
|
2234
|
-
}
|
|
2235
|
-
/** A retained disk's identity and activation fence, separate from any portable checkpoint of its contents. */
|
|
2236
|
-
interface SandboxWorkspaceReceipt {
|
|
2237
|
-
storageId: string;
|
|
2238
|
-
epoch: number;
|
|
2239
|
-
coordinator: string;
|
|
2240
|
-
/** Opaque provider identity; capabilities are expressed by retained and paths. */
|
|
2241
|
-
provider: string;
|
|
2242
|
-
paths: string[];
|
|
2243
|
-
retained: boolean;
|
|
2244
|
-
mutationEpoch: number;
|
|
2245
|
-
}
|
|
2246
|
-
interface SandboxWorkspacePreparation {
|
|
2247
|
-
/** Reuse this key when retrying the same lifecycle action, even across Runs. */
|
|
2248
|
-
key: string;
|
|
2249
|
-
paths: string[];
|
|
2250
|
-
expected?: SandboxWorkspaceReceipt;
|
|
2251
|
-
}
|
|
2252
|
-
interface SandboxWorkspaceInspection {
|
|
2253
|
-
workspace: SandboxWorkspaceReceipt | null;
|
|
2254
|
-
state: "active" | "stopping" | "checkpoint" | "stopped" | "missing" | "untracked";
|
|
2255
|
-
/** Admitted work may still be writing; the mutation counter alone does not prove backup consistency. */
|
|
2256
|
-
busy: boolean;
|
|
2257
|
-
/** A lifecycle call whose answer is still uncertain, so an owning Run can join it after recovery. */
|
|
2258
|
-
pending?: {
|
|
2259
|
-
key: string;
|
|
2260
|
-
operation: "resume" | "checkpoint" | "stop" | "discard";
|
|
2261
|
-
};
|
|
2262
|
-
}
|
|
2263
|
-
/** Explicit physical handle used only for lifecycle/image selection controls. */
|
|
2264
|
-
interface Sandbox extends SandboxWorkspace {
|
|
2265
|
-
readonly id: string;
|
|
2266
|
-
/** Replace this sandbox's narrowing of its pool's network, live; null removes it. */
|
|
2267
|
-
updateNetwork(network: SandboxEgressPolicy | null, opts?: InvokeOpts): Promise<void>;
|
|
2268
|
-
suspend(opts?: InvokeOpts): Promise<void>;
|
|
2269
|
-
resume(opts?: InvokeOpts): Promise<void>;
|
|
2270
|
-
delete(opts?: InvokeOpts): Promise<void>;
|
|
2271
|
-
/** Materialize or resume a workspace, verifying expected storage before reusing it. Unsupported paths retain the archive fallback. */
|
|
2272
|
-
prepareWorkspace(input: SandboxWorkspacePreparation, opts?: InvokeOpts): Promise<{
|
|
2273
|
-
workspace: SandboxWorkspaceReceipt;
|
|
2274
|
-
reused: boolean;
|
|
2275
|
-
}>;
|
|
2276
|
-
/** Fence admission, drain/cancel work, flush and stop a provider that retains these paths. */
|
|
2277
|
-
stopWorkspace(input: {
|
|
2278
|
-
key: string;
|
|
2279
|
-
expected: SandboxWorkspaceReceipt;
|
|
2280
|
-
discard?: boolean;
|
|
2281
|
-
}, opts?: InvokeOpts): Promise<{
|
|
2282
|
-
workspace: SandboxWorkspaceReceipt;
|
|
2283
|
-
}>;
|
|
2284
|
-
/** Revoke direct calls and drain work, allowing only the returned Run to export a checkpoint before stop/delete. */
|
|
2285
|
-
quiesceWorkspace(input: {
|
|
2286
|
-
key: string;
|
|
2287
|
-
expected: SandboxWorkspaceReceipt;
|
|
2288
|
-
}, opts?: InvokeOpts): Promise<{
|
|
2289
|
-
workspace: SandboxWorkspaceReceipt;
|
|
2290
|
-
run: string;
|
|
2291
|
-
}>;
|
|
2292
|
-
inspectWorkspace(input?: {
|
|
2293
|
-
expected?: SandboxWorkspaceReceipt;
|
|
2294
|
-
probe?: boolean;
|
|
2295
|
-
}, opts?: InvokeOpts): Promise<SandboxWorkspaceInspection>;
|
|
2296
|
-
/** Explicitly discard a retained workspace; the current activation receipt is required. */
|
|
2297
|
-
deleteWorkspace(expected: SandboxWorkspaceReceipt, opts?: InvokeOpts): Promise<void>;
|
|
2298
|
-
}
|
|
2299
|
-
/** Provider-neutral factory and owner for images and logical sandboxes. */
|
|
2445
|
+
exec(request: SandboxExecRequest, opts?: InvokeOpts): InvocationHandle<SandboxExecution>;
|
|
2446
|
+
/** An execution by its id, such as one another caller started. */
|
|
2447
|
+
execution(id: string, options?: SandboxWaitOptions): Promise<SandboxExecution>;
|
|
2448
|
+
cancelExecution(id: string, opts?: InvokeOpts): Promise<SandboxExecution>;
|
|
2449
|
+
readFile(path: string, opts?: InvokeOpts): Promise<SandboxFileContent>;
|
|
2450
|
+
writeFile(path: string, body: SandboxFileBody, opts?: InvokeOpts): Promise<SandboxFile>;
|
|
2451
|
+
deleteFile(path: string, opts?: InvokeOpts): Promise<SandboxFile>;
|
|
2452
|
+
/** The provider's own snapshot; a later createSandbox names its `image`. */
|
|
2453
|
+
snapshot(opts?: InvokeOpts): Promise<SandboxSnapshot>;
|
|
2454
|
+
deleteSnapshot(id: string, opts?: InvokeOpts): Promise<SandboxSnapshot>;
|
|
2455
|
+
}
|
|
2456
|
+
/** A sandbox createSandbox made, or found again on a replay: its handle, and the sandbox as the door answered it. */
|
|
2457
|
+
interface CreatedSandbox {
|
|
2458
|
+
sandbox: Sandbox;
|
|
2459
|
+
view: SandboxView;
|
|
2460
|
+
}
|
|
2461
|
+
/** A provider-neutral pool of sandboxes, each addressed by id. */
|
|
2300
2462
|
interface SandboxPool {
|
|
2301
2463
|
readonly resource: CRN;
|
|
2302
|
-
/**
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2464
|
+
/**
|
|
2465
|
+
* Create a sandbox on the pool, answered once it settles (`running`, `failed`, or the provider's refusal); without an `id`,
|
|
2466
|
+
* the door names it from the invocation's idempotency key.
|
|
2467
|
+
*/
|
|
2468
|
+
createSandbox(request?: SandboxPoolCreateRequest, opts?: InvokeOpts): Promise<CreatedSandbox>;
|
|
2469
|
+
/** Address a sandbox of the pool by its id, such as one the Session keeps. No invocation. */
|
|
2470
|
+
sandbox(id: string): Sandbox;
|
|
2471
|
+
}
|
|
2472
|
+
/** The code a sandbox operation fails with when its pool's provider cannot provide a sandbox now (see `sandboxProviderUnavailable`). */
|
|
2473
|
+
declare const SANDBOX_PROVIDER_UNAVAILABLE = "ProviderUnavailable";
|
|
2474
|
+
/**
|
|
2475
|
+
* Why a provider cannot provide a sandbox now: out of capacity, rate limiting the account, the account's quota spent, the
|
|
2476
|
+
* pool's region unavailable, or an outage (any other provider failure that persisted).
|
|
2477
|
+
*/
|
|
2478
|
+
declare const SANDBOX_PROVIDER_FAILURE_CLASSES: readonly ["capacity", "rate_limited", "quota", "region", "outage"];
|
|
2479
|
+
type SandboxProviderFailureClass = typeof SANDBOX_PROVIDER_FAILURE_CLASSES[number];
|
|
2480
|
+
/**
|
|
2481
|
+
* A pool's provider could not provide a sandbox (the door's `ProviderUnavailable`). `retryAfterMs` is when the same provider
|
|
2482
|
+
* is worth asking again. A caller that routes between pools fails over on it.
|
|
2483
|
+
*/
|
|
2484
|
+
interface SandboxProviderUnavailable {
|
|
2485
|
+
code: typeof SANDBOX_PROVIDER_UNAVAILABLE;
|
|
2486
|
+
reason: SandboxProviderFailureClass;
|
|
2487
|
+
retryAfterMs: number;
|
|
2488
|
+
message: string;
|
|
2314
2489
|
}
|
|
2490
|
+
/**
|
|
2491
|
+
* ProviderUnavailable from whatever carries it, or null for any other failure: the door's refusal (`{ code, message, reason,
|
|
2492
|
+
* retryAfterMs }`), a failed Handle's error (`{ code, message, reason, retryAfterMs, cause }`), or the Error an invocation
|
|
2493
|
+
* rejects with, which keeps `code`, `retryAfterMs` and `cause` (`cause.code` is the reason) across every boundary.
|
|
2494
|
+
*/
|
|
2495
|
+
declare function sandboxProviderUnavailable(value: unknown): SandboxProviderUnavailable | null;
|
|
2315
2496
|
|
|
2316
2497
|
/**
|
|
2317
2498
|
* Model evaluation: one shared state judged against a map of typed questions,
|
|
@@ -3320,7 +3501,7 @@ interface InvokeOpts {
|
|
|
3320
3501
|
* called before it is awaited or it is raced with a durable wait, spawn, approval or any other Handle.
|
|
3321
3502
|
*
|
|
3322
3503
|
* A transport hint, not part of the operation: it never changes the operation hash, the Handle id, the journal or the
|
|
3323
|
-
* result, and a platform
|
|
3504
|
+
* result, and a platform that does not take it ignores it. Any other value is a TypeError.
|
|
3324
3505
|
*/
|
|
3325
3506
|
wait?: "inline" | "async";
|
|
3326
3507
|
}
|
|
@@ -3475,10 +3656,10 @@ declare function race<T>(handles: Handle<T>[], opts?: {
|
|
|
3475
3656
|
|
|
3476
3657
|
/**
|
|
3477
3658
|
* The find, read and run Tools over one bound skills Resource, named from its binding (`.` and `-` become `_`).
|
|
3478
|
-
* find and read are the library's catalog operations; run copies the skill's folder into
|
|
3659
|
+
* find and read are the library's catalog operations; run copies the skill's folder into a sandbox of the bound pool once per
|
|
3479
3660
|
* bundle and runs one command there.
|
|
3480
3661
|
*/
|
|
3481
|
-
declare function skills(binding?: string,
|
|
3662
|
+
declare function skills(binding?: string, pool?: string): Record<string, Tool>;
|
|
3482
3663
|
|
|
3483
3664
|
declare function validateTool(tool: Tool, path?: string): Tool;
|
|
3484
3665
|
declare function validateView<V extends ViewDef<any, any>>(view: V, path?: string): V;
|
|
@@ -5364,6 +5545,58 @@ declare function credentialProviderSetupMetadata(value: unknown, slots: string[]
|
|
|
5364
5545
|
/** Defines and validates a Credential Provider package. */
|
|
5365
5546
|
declare function credentialProvider<C>(definition: CredentialProviderDefinition<C>): CredentialProviderPackage<C>;
|
|
5366
5547
|
|
|
5548
|
+
interface ContainerImageReference {
|
|
5549
|
+
registry: string;
|
|
5550
|
+
repository: string;
|
|
5551
|
+
tag: string | null;
|
|
5552
|
+
digest: string | null;
|
|
5553
|
+
reference: string;
|
|
5554
|
+
}
|
|
5555
|
+
/** Immutable OCI identity before any provider-specific preparation. */
|
|
5556
|
+
interface ContainerImageSource {
|
|
5557
|
+
reference: string;
|
|
5558
|
+
digest: `sha256:${string}`;
|
|
5559
|
+
mediaType: string;
|
|
5560
|
+
bytes: number;
|
|
5561
|
+
platform: {
|
|
5562
|
+
os: string;
|
|
5563
|
+
architecture: string;
|
|
5564
|
+
variant?: string;
|
|
5565
|
+
};
|
|
5566
|
+
}
|
|
5567
|
+
/** Digest-pinned image selected for one Linux execution environment. Manifest
|
|
5568
|
+
* metadata is resolved by the runtime pull and recorded in its receipt. */
|
|
5569
|
+
interface ContainerImageSelection {
|
|
5570
|
+
reference: string;
|
|
5571
|
+
platform: {
|
|
5572
|
+
os: string;
|
|
5573
|
+
architecture: string;
|
|
5574
|
+
variant?: string;
|
|
5575
|
+
};
|
|
5576
|
+
}
|
|
5577
|
+
interface ContainerRegistryResponse {
|
|
5578
|
+
status: number;
|
|
5579
|
+
headers: Record<string, string>;
|
|
5580
|
+
body: Uint8Array;
|
|
5581
|
+
}
|
|
5582
|
+
type ContainerRegistryRequest = (request: {
|
|
5583
|
+
url: string;
|
|
5584
|
+
method: "GET";
|
|
5585
|
+
headers: Record<string, string>;
|
|
5586
|
+
maximumBytes: number;
|
|
5587
|
+
}) => Promise<ContainerRegistryResponse>;
|
|
5588
|
+
/** Canonical Docker/OCI distribution reference. Tags remain mutable until the
|
|
5589
|
+
* owning registry resolver pins them; digests are preserved exactly. */
|
|
5590
|
+
declare function containerImageReference(value: string): ContainerImageReference;
|
|
5591
|
+
declare function immutableContainerImageReference(value: string): ContainerImageReference & {
|
|
5592
|
+
digest: `sha256:${string}`;
|
|
5593
|
+
};
|
|
5594
|
+
declare function containerImageSource(value: unknown): ContainerImageSource;
|
|
5595
|
+
declare function containerImageSelection(value: unknown): ContainerImageSelection;
|
|
5596
|
+
/** Resolve a mutable tag or multi-platform index exactly once to one immutable
|
|
5597
|
+
* manifest. The caller owns registry authentication and transport Policy. */
|
|
5598
|
+
declare function resolveContainerImageSource(reference: string, platform: ContainerImageSource["platform"], request: ContainerRegistryRequest, authorization?: string): Promise<ContainerImageSource>;
|
|
5599
|
+
|
|
5367
5600
|
declare const MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
5368
5601
|
interface McpClientState {
|
|
5369
5602
|
protocolVersion: string;
|
|
@@ -5642,5 +5875,5 @@ declare function parseLedgerAddress(value: unknown): LedgerAddressParts | null;
|
|
|
5642
5875
|
/** Formats ledger address parts; throws when a part breaks its id rule. */
|
|
5643
5876
|
declare function formatLedgerAddress(parts: LedgerAddressParts): LedgerAddress;
|
|
5644
5877
|
|
|
5645
|
-
export { AGENT_UI_DEFAULTS, AfterYield, ApiError, CHAT_FORMAT_CAPABILITY, CONSTAL_API_CAPABILITY, CONSTAL_API_GET_KINDS, CONSTAL_API_MODEL_TOOL_DESCRIPTIONS, CONSTAL_API_OPERATIONS, CONSTAL_API_OPERATION_SCHEMAS, CONSTAL_API_QUERY_KINDS, CONSTAL_API_VERSION, CommitConflict, CommitGateRejected, CredentialRevoked, CredentialUnavailable, DATA_SHARE_FEE_BPS, DirectNetworkDenied, EVALUATION_LIMITS, EffectCeilingExceeded, EmptyJoin, GENERAL_QUALITY_JUDGE, GateExhausted, IntegrationRequestNotSent, LeaseLost, MCP_CLIENT_CAPABILITY, MCP_PROTOCOL_VERSION, MEMORY_OPERATION_DECLARATIONS, MODEL_CHECKPOINT_IMPORT_CAPABILITY, MODEL_COMPLETION_CAPABILITY, MODEL_EVALUATION_CAPABILITY, McpClient, NondeterministicReplay, NotAppendOnly, OutcomeUnknown, PolicyConstraintFailed, PolicyDecisionFailed, RESOURCE_CREDENTIAL_BINDING_SCHEMA, RESOURCE_KINDS, ResourceDisabled, ResourceInvalid, ResourceUnbound, RollbackTargetInvalid, SANDBOX_EGRESS_LIMITS, SessionDeleted, SpawnCardinality, SwallowedYield, TRAINING_PROVIDER_CAPABILITY, TRAINING_RECIPE_DEFAULTS, TerminalIntegrationFailure, ToolUnavailable, UI_ASSET_CONTENT_TYPES, UI_BUNDLE_BOUNDS, UnknownTool, WEB_FETCH_ARGUMENT_SCHEMA, WEB_SEARCH_ARGUMENT_SCHEMA, action, actionPattern, agent, agentLimit, agentResourceBinding, agentSetupMetadata, agentSetupRequirements, agentUiBundleManifest, agentUiDeclaration, all, analyticsEvent, approximateTokens, authProvider, authProviderName, bindingName, bucketFor, canonicalJson, capabilityContractRef, casTool, channel, channelIngressRequest, channelIngressSource, channelSourceEvidence, channelSubscriptionRequest, channelTarget, chatFormat, chatFormatMetadata, chatFormatPin, chatParseInput, chatParsed, chatRenderInput, chatRenderRequest, chatRendering, checkpointArtifactRef, checkpointDeploymentRequest, checkpointImportMetadata, checkpointImportRequest, codeScorerIR, containerImageReference, containerImageSelection, containerImageSource, credentialEvidence, credentialInteractionAction, credentialInteractionEvent, credentialInteractionResult, credentialName, credentialProvider, credentialProviderConfigSchema, credentialProviderName, credentialProviderSetupMetadata, credentialRotationDefaults, credentialSetupState, customerTenantName, cutBatches, cutPartitions, dataShareEarningMicroUsd, datasetName, evaluateCodeScorer, evaluatePolicyDefinition, evaluationArguments, evaluationProtocolRequest, evaluationProtocolResult, formatLedgerAddress, gateway, gatewayModelOffer, gatewayPackageMetadata, hash, hashValue, immutableContainerImageReference, integrationEgressPolicy, invocationCredentialUses, judgeAgent, labelSelector, matchesAction, matchesLabelSelector, matchesResource, mcpToolDescription, mcpToolResult, memoryStoreBinding, modelAdvertisedPricing, modelControls, modelGatewayBinding, modelGatewayEndpoint, modelGenerationOptions, modelLimit, modelMessages, modelPrompt, modelProtocolRequest, modelProtocolResult, murmur3_32, normalizeCredentialDestinations, normalizeModelGatewayConfig, normalizeSandboxConnectionKeys, normalizeSandboxEgressPolicy, normalizeSandboxLabels, normalizeSandboxNetworkPolicy,
|
|
5646
|
-
export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeployPolicy, AgentGovernanceMeter, AgentSetupMetadata, AgentSetupRequirement, AgentSetupWorkflow, AgentUiDeclaration, AnalyticsClient, AnalyticsDimensionValue, AnalyticsEventDefinition, AnalyticsIntent, AnalyticsValues, AuthProvider, AuthProviderCRN, AuthProviderContext, AuthProviderRequest, AuthProviderResult, AwaitOpts, AwaitPresentation, BatchSpec, BindingCRN, BindingOwnerContext, BindingOwnerScope, BoundOperation, BoundResourceCapabilities, BranchRef, CRN, CRNKind, CanonicalEvent, CanonicalEventDraft, CapabilityContractRef, CapabilityGrant, CapabilityRef, CaptureCaseRequest, CaseRow, CatalogTool, Channel, ChannelContext, ChannelDeliveryError, ChannelDeliveryEvent, ChannelDeliveryOutcome, ChannelDeliveryReport, ChannelFailure, ChannelFetchRequest, ChannelFetchResult, ChannelIngressEvent, ChannelIngressSource, ChannelMessage, ChannelObject, ChannelPresence, ChannelPresenceReceipt, ChannelProtocol, ChannelReceiveResult, ChannelRequest, ChannelResponse, ChannelSourceEvidence, ChannelSubscriptionRequest, ChannelTarget, ChatFormatDefinition, ChatFormatMetadata, ChatFormatPin, ChatMessage, ChatParseRequest, ChatParsed, ChatRenderRequest, ChatRendering, ChatSpan, ChatTool, CheckpointDeploymentRequest, CheckpointImportMetadata, CheckpointImportRequest, ChoiceAnswer, ChoiceQuestion, CodeScoreResult, CodeScorerIR, CodeScorerRule, CommitOpts, CompareSuitesRequest, Compensation, ConnectionCancelRequest, ConnectionIdentity, ConnectionOperation, ConnectionRecoveryRequest, ConnectionRecoveryResult, ConnectionRequest, ConnectionUsageReport, ConstalApiApplyRequest, ConstalApiChangePlan, ConstalApiChangePlanRef, ConstalApiChangePlanRequest, ConstalApiChangeReceipt, ConstalApiOperationReceipt, ContainerImageReference, ContainerImageSelection, ContainerImageSource, ContainerRegistryRequest, ContainerRegistryResponse, ControlEvent, Cost,
|
|
5878
|
+
export { AGENT_UI_DEFAULTS, AfterYield, ApiError, CHAT_FORMAT_CAPABILITY, CONSTAL_API_CAPABILITY, CONSTAL_API_GET_KINDS, CONSTAL_API_MODEL_TOOL_DESCRIPTIONS, CONSTAL_API_OPERATIONS, CONSTAL_API_OPERATION_SCHEMAS, CONSTAL_API_QUERY_KINDS, CONSTAL_API_VERSION, CommitConflict, CommitGateRejected, CredentialRevoked, CredentialUnavailable, DATA_SHARE_FEE_BPS, DirectNetworkDenied, EVALUATION_LIMITS, EffectCeilingExceeded, EmptyJoin, GENERAL_QUALITY_JUDGE, GateExhausted, IntegrationRequestNotSent, LeaseLost, MCP_CLIENT_CAPABILITY, MCP_PROTOCOL_VERSION, MEMORY_OPERATION_DECLARATIONS, MODEL_CHECKPOINT_IMPORT_CAPABILITY, MODEL_COMPLETION_CAPABILITY, MODEL_EVALUATION_CAPABILITY, McpClient, NondeterministicReplay, NotAppendOnly, OutcomeUnknown, PolicyConstraintFailed, PolicyDecisionFailed, RESOURCE_CREDENTIAL_BINDING_SCHEMA, RESOURCE_KINDS, ResourceDisabled, ResourceInvalid, ResourceUnbound, RollbackTargetInvalid, SANDBOX_EGRESS_LIMITS, SANDBOX_POOL_OPERATIONS, SANDBOX_PROVIDER_FAILURE_CLASSES, SANDBOX_PROVIDER_UNAVAILABLE, SessionDeleted, SpawnCardinality, SwallowedYield, TRAINING_PROVIDER_CAPABILITY, TRAINING_RECIPE_DEFAULTS, TerminalIntegrationFailure, ToolUnavailable, UI_ASSET_CONTENT_TYPES, UI_BUNDLE_BOUNDS, UnknownTool, WEB_FETCH_ARGUMENT_SCHEMA, WEB_SEARCH_ARGUMENT_SCHEMA, action, actionPattern, agent, agentLimit, agentResourceBinding, agentSetupMetadata, agentSetupRequirements, agentUiBundleManifest, agentUiDeclaration, all, analyticsEvent, approximateTokens, authProvider, authProviderName, bindingName, bucketFor, canonicalJson, capabilityContractRef, casTool, channel, channelIngressRequest, channelIngressSource, channelSourceEvidence, channelSubscriptionRequest, channelTarget, chatFormat, chatFormatMetadata, chatFormatPin, chatParseInput, chatParsed, chatRenderInput, chatRenderRequest, chatRendering, checkpointArtifactRef, checkpointDeploymentRequest, checkpointImportMetadata, checkpointImportRequest, codeScorerIR, containerImageReference, containerImageSelection, containerImageSource, credentialEvidence, credentialInteractionAction, credentialInteractionEvent, credentialInteractionResult, credentialName, credentialProvider, credentialProviderConfigSchema, credentialProviderName, credentialProviderSetupMetadata, credentialRotationDefaults, credentialSetupState, customerTenantName, cutBatches, cutPartitions, dataShareEarningMicroUsd, datasetName, evaluateCodeScorer, evaluatePolicyDefinition, evaluationArguments, evaluationProtocolRequest, evaluationProtocolResult, formatLedgerAddress, gateway, gatewayModelOffer, gatewayPackageMetadata, hash, hashValue, immutableContainerImageReference, integrationEgressPolicy, invocationCredentialUses, judgeAgent, labelSelector, matchesAction, matchesLabelSelector, matchesResource, mcpToolDescription, mcpToolResult, memoryStoreBinding, modelAdvertisedPricing, modelControls, modelGatewayBinding, modelGatewayEndpoint, modelGenerationOptions, modelLimit, modelMessages, modelPrompt, modelProtocolRequest, modelProtocolResult, murmur3_32, normalizeCredentialDestinations, normalizeModelGatewayConfig, normalizeSandboxConnectionKeys, normalizeSandboxEgressPolicy, normalizeSandboxLabels, normalizeSandboxNetworkPolicy, noulDecision, opTool, opTools, parseLedgerAddress, parseResourceName, policy, policyName, race, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, runLabels, sandboxControls, sandboxEgressDecision, sandboxEgressHostMatches, sandboxLimit, sandboxProviderUnavailable, scopedBindingKey, scopedCredentialRef, scopedResourceRef, scoreLevel, scorerDraftHash, scorerName, select, selectableResourceLabels, setupAwait, setupCredentialReceipt, setupPanelProviderIsCrn, setupScreen, setupScreenView, setupSubmission, sha256Hex, shareContributionRequest, shareContributionReview, shareEvaluation, sharePrices, shareRequest, skills, stageOutput, startTrainingRequest, subtask, tableDescribe, tableQuery, trainingCorrection, trainingProvider, trainingProviderMetadata, trainingRecipe, uiAssetContentType, uiBundle, uiBundleManifest, uiLimit, uiName, validateBatchSpec, validateFoldFn, validateJsonSchema, validateJsonSchemaDefinition, validatePartitionFn, validatePartitionSpec, validateStageOutputSpec, validateTool, validateView, webFetch, webSearch };
|
|
5879
|
+
export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeployPolicy, AgentGovernanceMeter, AgentSetupMetadata, AgentSetupRequirement, AgentSetupWorkflow, AgentUiDeclaration, AnalyticsClient, AnalyticsDimensionValue, AnalyticsEventDefinition, AnalyticsIntent, AnalyticsValues, AuthProvider, AuthProviderCRN, AuthProviderContext, AuthProviderRequest, AuthProviderResult, AwaitOpts, AwaitPresentation, BatchSpec, BindingCRN, BindingOwnerContext, BindingOwnerScope, BoundOperation, BoundResourceCapabilities, BranchRef, CRN, CRNKind, CanonicalEvent, CanonicalEventDraft, CapabilityContractRef, CapabilityGrant, CapabilityRef, CaptureCaseRequest, CaseRow, CatalogTool, Channel, ChannelContext, ChannelDeliveryError, ChannelDeliveryEvent, ChannelDeliveryOutcome, ChannelDeliveryReport, ChannelFailure, ChannelFetchRequest, ChannelFetchResult, ChannelIngressEvent, ChannelIngressSource, ChannelMessage, ChannelObject, ChannelPresence, ChannelPresenceReceipt, ChannelProtocol, ChannelReceiveResult, ChannelRequest, ChannelResponse, ChannelSourceEvidence, ChannelSubscriptionRequest, ChannelTarget, ChatFormatDefinition, ChatFormatMetadata, ChatFormatPin, ChatMessage, ChatParseRequest, ChatParsed, ChatRenderRequest, ChatRendering, ChatSpan, ChatTool, CheckpointDeploymentRequest, CheckpointImportMetadata, CheckpointImportRequest, ChoiceAnswer, ChoiceQuestion, CodeScoreResult, CodeScorerIR, CodeScorerRule, CommitOpts, CompareSuitesRequest, Compensation, ConnectionCancelRequest, ConnectionIdentity, ConnectionOperation, ConnectionRecoveryRequest, ConnectionRecoveryResult, ConnectionRequest, ConnectionUsageReport, ConstalApiApplyRequest, ConstalApiChangePlan, ConstalApiChangePlanRef, ConstalApiChangePlanRequest, ConstalApiChangeReceipt, ConstalApiOperationReceipt, ContainerImageReference, ContainerImageSelection, ContainerImageSource, ContainerRegistryRequest, ContainerRegistryResponse, ControlEvent, Cost, CreatedSandbox, CredentialCRN, CredentialDestination, CredentialDestroyResult, CredentialEvidence, CredentialInteractionAction, CredentialInteractionAdvanceRequest, CredentialInteractionEvent, CredentialInteractionPrimaryAction, CredentialInteractionProof, CredentialInteractionResult, CredentialInteractionStartRequest, CredentialMaterialRequest, CredentialMintRequest, CredentialMintResult, CredentialPresentation, CredentialProviderCRN, CredentialProviderConfigEgressBinding, CredentialProviderContext, CredentialProviderCredentialSlotSetup, CredentialProviderDefinition, CredentialProviderPackage, CredentialProviderPackageMetadata, CredentialProviderSecretInput, CredentialProviderSetupMetadata, CredentialSetupState, CredentialUninstallRequest, CredentialUninstallResult, CredentialVerifyResult, Ctx, CustomerTenantCRN, DataManifest, DataSharingScope, DatasetCRN, DatasetDraft, DatasetRef, DelegatedGrant, DelegationCeiling, DeliveryMode, DeliveryReceipt, DispatchResult, EffectClass, EvalComparison, EvalDivergence, EvalMode, EvalSubject, EvalSubjectSource, EvalSuiteCase, EvalSuiteCasePage, EvalSuiteCaseScore, EvalSuiteCaseState, EvalSuiteScoreState, EvaluationAnswer, EvaluationAnswerFor, EvaluationAnswers, EvaluationEntry, EvaluationInvocationArgs, EvaluationInvocationResult, EvaluationProtocol, EvaluationQuestion, EvaluationQuestions, EvaluationRecord, EvaluationSpec, EventBase, Fact, FactRef, FileEntry, FixedMemoryStoreRef, FixedModelGatewayRef, FoldFn, GateEvidence, GateResult, GateVerdict, GatewayCancelRequest, GatewayConfigEgressBinding, GatewayContext, GatewayCredentialSlotSetup, GatewayDefinition, GatewayDiscoverySetup, GatewayModelOffer, GatewayOperation, GatewayPackage, GatewayPackageMetadata, GatewayRecoveryRequest, GatewayRecoveryResult, GatewayRequest, GovernanceContractRef, Handle, HandleOutcome, Hash, HistoryPage, HistoryView, HmacVerification, IgnoredChannelEvent, IngressRequest, IngressTarget, IntegrationArtifactEgressRequest, IntegrationArtifactEgressResponse, IntegrationAttachment, IntegrationContext, IntegrationEgressPolicy, IntegrationEgressRequest, IntegrationEgressResponse, IntegrationEgressRule, IntegrationLifecycle, IntegrationReleaseContext, IntegrationSecret, IntegrationState, InvocationCredentialUse, InvocationHandle, InvokableKind, InvokeOpts, JoinOutcome, JsonScalar, JsonValue, JudgeRubric, LabelRequest, LabelSelector, LabelSelectorOperator, LabelSelectorRequirement, LedgerAddress, LedgerAddressParts, LedgerEvent, ListSchedulesOptions, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, ModelCacheHint, ModelCompletion, ModelContentPart, ModelCredentialHeader, ModelFilePart, ModelGatewayBinding, ModelGatewayConfig, ModelGatewayProtocol, ModelGenerationOptions, ModelGovernanceControls, ModelGovernanceMeter, ModelHistoryMessage, ModelHistoryToolCall, ModelInvocationArgs, ModelInvocationResult, ModelProtocolRequestOptions, ModelTechnicalCapabilities, ModelTextPart, ModelTool, NormalizedModelGatewayConfig, NoulAnswer, NoulQuestion, Out, Over, PartitionFn, PartitionSpec, Partitioning, PolicyCRN, PolicyConstraint, PolicyContextValue, PolicyDefinition, PolicyInput, PolicyInvocationOrigin, PolicyOutcome, Principal, PrincipalKind, Provenance, RawModelProtocol, Recovery, ReduceFact, ReduceOpts, Ref, RequestLabelRequest, ResourceContractRef, ResourceControlsConstraint, ResourceCredentialBinding, ResourceDependencyRef, ResourceKind, ResourceName, ResourceNameParts, ResourceNeed, ResourcePattern, ResourceSelector, RollbackReport, RunIdentityView, RunInfo, RunReport, RunStatusDetail, RunSuiteRequest, Sandbox, SandboxCapabilities, SandboxCreateRequest, SandboxEgress, SandboxEgressCapabilities, SandboxEgressDestination, SandboxEgressPolicy, SandboxEgressRule, SandboxExecCapabilities, SandboxExecRequest, SandboxExecution, SandboxExecutionState, SandboxFile, SandboxFileBody, SandboxFileCapabilities, SandboxFileContent, SandboxFileScope, SandboxGovernanceControls, SandboxGovernanceMeter, SandboxHistoryEvent, SandboxIndexedEvent, SandboxLabelCapabilities, SandboxLabels, SandboxLifecycleEvent, SandboxNetworkMode, SandboxNetworkPolicy, SandboxOrphanEvent, SandboxOrphanWithdrawnEvent, SandboxPersistence, SandboxPool, SandboxPoolCreateRequest, SandboxPoolOperation, SandboxPortCapabilities, SandboxProviderAllocation, SandboxProviderFailureClass, SandboxProviderUnavailable, SandboxSecretsRoute, SandboxSnapshot, SandboxSnapshotCapabilities, SandboxState, SandboxUpdateRequest, SandboxUsageEvent, SandboxUsageItem, SandboxView, SandboxWaitOptions, Schedule, ScheduleCancellation, ScheduleDuration, ScheduleMissed, ScheduleOccurrence, ScheduleOccurrencePage, ScheduleOptions, SchedulePage, ScheduleState, ScheduleTarget, ScheduleTiming, ScheduleTrigger, ScheduleWhen, ScopedBindingKey, ScopedCredentialRef, ScopedMemoryStoreRef, ScopedModelGatewayRef, ScopedResourceRef, ScoreAnswer, ScoreQuestion, ScoreRequest, ScorerApplies, ScorerCRN, ScorerDef, ScorerDraft, ScorerEvaluation, ScorerKind, ScorerRef, ScorerVerdictIntent, SetEvalBaselineRequest, SetupAction, SetupCredentialCandidate, SetupCredentialInteractionPanel, SetupCredentialReceipt, SetupFormPanel, SetupPanel, SetupProgressPanel, SetupReviewPanel, SetupScreen, SetupStepStatus, SetupStepSummary, SetupSubmission, SetupTerminalPanel, SetupWorkflowStatus, Share, ShareAction, ShareContribution, ShareContributionImport, ShareContributionRequest, ShareContributionReview, ShareContributionReviewRequest, ShareContributionStatus, ShareEvaluation, ShareEvaluationPin, ShareEvaluationRequest, ShareEvaluationVerdict, ShareEvaluationView, ShareHistory, SharePrice, ShareRequest, ShareReviewDecision, SortField, SpawnAttenuation, SpawnBudget, SpawnHandle, SpawnOpts, SqlFold, StageInfo, StageOutputSpec, StartTrainingRequest, SteerEvent, StepJournal, SuiteFact, TableAggregate, TableDescribeArgs, TableFilter, TableFilterOperation, TableOrder, TableQueryArgs, TableQueryPlan, TableQueryResult, TableScalar, TableSnapshotDescription, Task, Tier, Tool, ToolCallRecord, TrainingCorrection, TrainingJobFact, TrainingJobReference, TrainingJobState, TrainingJobStatus, TrainingMethod, TrainingModelOffer, TrainingPreparation, TrainingProviderDefinition, TrainingProviderMetadata, TrainingProviderPin, TrainingRecipe, TrainingResumePoint, TrainingStep, TrainingUsageUnits, TurnDraft, TurnGate, TurnHistoryMessage, TurnRecord, TurnSpec, UiAccess, UiBundle, UiBundleManifest, UiCRN, UiCapability, UiExecution, UiGovernanceMeter, UiHandler, UiResource, UiRuntimeContext, UiSource, UiSqlResult, UiState, UpstreamPayer, Verdict, VerdictSamplingMode, ViewDef, WaitResolvedEvent };
|