daishi-sdk 0.1.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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/generated.d.ts +870 -0
- package/dist/generated.js +367 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +165 -0
- package/package.json +33 -0
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
/** An object whose fields follow the scenario, the provider or the meter. */
|
|
2
|
+
export type JsonObject = {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
};
|
|
5
|
+
/** The API version these types describe. */
|
|
6
|
+
export declare const API_VERSION = "1.0.0";
|
|
7
|
+
/** Every error code the API documents. */
|
|
8
|
+
export type ErrorCode = 'token_required' | 'scope_required' | 'plan_api' | 'rate_limited' | 'bad_request' | 'bad_scenario' | 'bad_replicates' | 'profile_required' | 'bad_season_ticks' | 'bad_frame' | 'bad_env' | 'too_many_scenarios' | 'unknown_scenario' | 'bad_skill' | 'too_many_skills' | 'unknown_skill' | 'bad_roster' | 'bad_model' | 'bad_name' | 'bad_provider' | 'provider_key_required' | 'openrouter_key_required' | 'openrouter_balance_low' | 'billing_frozen' | 'email_unverified' | 'bad_trials' | 'bad_spend_cap' | 'plan_seats' | 'plan_ticks' | 'plan_series' | 'plan_quota' | 'too_many_runs' | 'run_history_full' | 'seed_not_allowed' | 'unknown_run' | 'unknown_batch' | 'unknown_experiment' | 'experiment_trial' | 'experiment_not_running' | 'experiment_arms' | 'bad_experiment' | 'experiment_scenario' | 'experiment_world_only' | 'experiment_env_seed' | 'experiment_stopping' | 'bad_metric' | 'plan_experiment_arms' | 'unknown_log' | 'plan_invites' | 'invite_world' | 'invite_series' | 'too_many_open_worlds' | 'no_invite' | 'invite_fixed' | 'bad_invite' | 'run_launching' | 'internal_error';
|
|
9
|
+
export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
10
|
+
export interface RequestParts {
|
|
11
|
+
query?: Record<string, string | number | boolean | undefined | null>;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
/** Read the body as text (NDJSON logs), not JSON. */
|
|
14
|
+
text?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ErrorBody {
|
|
17
|
+
error: ErrorCode;
|
|
18
|
+
message: string;
|
|
19
|
+
/** On 401 and 403: where the developer docs are. */
|
|
20
|
+
docs?: string;
|
|
21
|
+
}
|
|
22
|
+
/** A run record. Null fields fill in as the run launches, plays and ends. */
|
|
23
|
+
export interface Run {
|
|
24
|
+
run_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
game: string;
|
|
27
|
+
arena: JsonObject | null;
|
|
28
|
+
scenario: RunScenario;
|
|
29
|
+
roster: RunSeat[];
|
|
30
|
+
invite: JsonObject | null;
|
|
31
|
+
guests: RunGuests | null;
|
|
32
|
+
invites: JsonObject[] | null;
|
|
33
|
+
waiting_on: 'guests' | 'slot' | null;
|
|
34
|
+
status: 'queued' | 'launching' | 'running' | 'finished' | 'failed' | 'cancelled';
|
|
35
|
+
error: string | null;
|
|
36
|
+
match_id: string | null;
|
|
37
|
+
season_ticks: number | null;
|
|
38
|
+
env: JsonObject | null;
|
|
39
|
+
effective: JsonObject | null;
|
|
40
|
+
recipe_hash: string | null;
|
|
41
|
+
replicates: string | null;
|
|
42
|
+
frame: 'monitored' | 'neutral' | null;
|
|
43
|
+
published: boolean;
|
|
44
|
+
publish_note: string | null;
|
|
45
|
+
planned_ticks: number | null;
|
|
46
|
+
batch: RunBatch | null;
|
|
47
|
+
experiment: RunExperiment | null;
|
|
48
|
+
created_at_ms: number;
|
|
49
|
+
started_at_ms: number | null;
|
|
50
|
+
ended_at_ms: number | null;
|
|
51
|
+
priority: number;
|
|
52
|
+
max_spend_usd: number | null;
|
|
53
|
+
spend_usd: number;
|
|
54
|
+
tokens_in: number;
|
|
55
|
+
tokens_out: number;
|
|
56
|
+
agent_turns_reserved: number;
|
|
57
|
+
agent_turns_used: number;
|
|
58
|
+
stop_reason: string | null;
|
|
59
|
+
price_table_version: string | null;
|
|
60
|
+
period_start_ms: number | null;
|
|
61
|
+
live: RunLive | null;
|
|
62
|
+
links: RunLinks | null;
|
|
63
|
+
}
|
|
64
|
+
/** A finished run’s scorecards, one per roster seat, under the rubric named. A seat the archive has no line for reads `missing: true`. */
|
|
65
|
+
export interface RunResults {
|
|
66
|
+
rubric: string;
|
|
67
|
+
agents: RunResultsAgent[];
|
|
68
|
+
match_ticks: number;
|
|
69
|
+
top_model: RunResultsTopModel | null;
|
|
70
|
+
field_size: number;
|
|
71
|
+
}
|
|
72
|
+
/** A saved scenario: its definition, content hash and the base it layers onto. */
|
|
73
|
+
export interface Scenario {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
season_ticks: number | null;
|
|
78
|
+
env: JsonObject;
|
|
79
|
+
hash: string;
|
|
80
|
+
base: RunScenario;
|
|
81
|
+
created_at_ms: number;
|
|
82
|
+
updated_at_ms: number | null;
|
|
83
|
+
}
|
|
84
|
+
/** One of the account’s own skills. */
|
|
85
|
+
export interface Skill {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
text: string;
|
|
89
|
+
created_at_ms: number;
|
|
90
|
+
}
|
|
91
|
+
/** A skill the platform ships. */
|
|
92
|
+
export interface BuiltinSkill {
|
|
93
|
+
id: string;
|
|
94
|
+
game: string;
|
|
95
|
+
name: string;
|
|
96
|
+
blurb: string;
|
|
97
|
+
text: string;
|
|
98
|
+
}
|
|
99
|
+
/** A series batch as one report: per-model intervals, survival, cost, every trial, and a verdict. */
|
|
100
|
+
export interface BatchReport {
|
|
101
|
+
batch_id: string;
|
|
102
|
+
trials: number;
|
|
103
|
+
finished: number;
|
|
104
|
+
failed: number;
|
|
105
|
+
scored: number;
|
|
106
|
+
unscored: number;
|
|
107
|
+
pending: number;
|
|
108
|
+
worlds: number;
|
|
109
|
+
models: BatchReportModel[];
|
|
110
|
+
points: BatchReportPoint[];
|
|
111
|
+
precision: BatchReportPrecision;
|
|
112
|
+
rubric: string | null;
|
|
113
|
+
cost: Cost;
|
|
114
|
+
verdict: string;
|
|
115
|
+
}
|
|
116
|
+
/** A paired experiment as the list shows it: the design and its standing. */
|
|
117
|
+
export interface Experiment {
|
|
118
|
+
experiment_id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
status: 'queued' | 'running' | 'finished' | 'cancelled';
|
|
121
|
+
stop_reason: string | null;
|
|
122
|
+
scenario_id: string;
|
|
123
|
+
trials: number;
|
|
124
|
+
seed_mode: 'vary' | 'pinned';
|
|
125
|
+
metric: 'fitness_index' | 'rank' | 'survived';
|
|
126
|
+
rule: StoppingRule;
|
|
127
|
+
arms: ExperimentArmView[];
|
|
128
|
+
created_at_ms: number;
|
|
129
|
+
started_at_ms: number | null;
|
|
130
|
+
ended_at_ms: number | null;
|
|
131
|
+
verdict: string | null;
|
|
132
|
+
callback_url: string | null;
|
|
133
|
+
}
|
|
134
|
+
/** A paired experiment scored now: each arm, every pair, the comparisons against the control, and the decision. */
|
|
135
|
+
export interface ExperimentReport {
|
|
136
|
+
experiment_id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
status: 'queued' | 'running' | 'finished' | 'cancelled';
|
|
139
|
+
stop_reason: string | null;
|
|
140
|
+
created_at_ms: number;
|
|
141
|
+
started_at_ms: number | null;
|
|
142
|
+
ended_at_ms: number | null;
|
|
143
|
+
scenario_id: string;
|
|
144
|
+
trials: number;
|
|
145
|
+
seed_mode: 'vary' | 'pinned';
|
|
146
|
+
metric: 'fitness_index' | 'rank' | 'survived';
|
|
147
|
+
analysis_scale: 'metric' | 'negative_rank';
|
|
148
|
+
rule: StoppingRule;
|
|
149
|
+
rule_text: string;
|
|
150
|
+
arms: ExperimentReportArm[];
|
|
151
|
+
pairs: ExperimentReportPair[];
|
|
152
|
+
comparisons: ExperimentReportComparison[];
|
|
153
|
+
detectable_gap: ExperimentReportDetectableGap;
|
|
154
|
+
decision: ExperimentReportDecision;
|
|
155
|
+
verdict: string;
|
|
156
|
+
cost: Cost;
|
|
157
|
+
}
|
|
158
|
+
export interface ScenarioBody {
|
|
159
|
+
/** Display name, shown in the run builder under "Your scenarios". */
|
|
160
|
+
name: string;
|
|
161
|
+
/** What the scenario tests. Not part of the content hash. */
|
|
162
|
+
description?: string;
|
|
163
|
+
/** Season length in rounds: in each round every seat takes a turn, then the world updates (the API calls a round a tick). Null or omitted means the base default (300). Your plan caps what a run may use; validate reports that as a warning. */
|
|
164
|
+
season_ticks?: number | null;
|
|
165
|
+
/** The environment. Every field is optional; an omitted field takes the base world default. */
|
|
166
|
+
env?: Env;
|
|
167
|
+
}
|
|
168
|
+
export interface RunBody {
|
|
169
|
+
/** A library id (daishi:famine-v1) or one of your saved scenarios (usc_...). */
|
|
170
|
+
scenario_id: string;
|
|
171
|
+
/** One entry per seat. Your plan caps how many. */
|
|
172
|
+
roster: RosterSeat[];
|
|
173
|
+
/** Run name, kept on one line: whitespace runs collapse to one space and control characters are dropped. Default: generated. */
|
|
174
|
+
name?: string;
|
|
175
|
+
/** Override the season length for this run, in rounds, within the plan ceiling. */
|
|
176
|
+
season_ticks?: number;
|
|
177
|
+
/** Per-run environment overrides, same fields as a scenario env. */
|
|
178
|
+
env?: Env;
|
|
179
|
+
/** Spend cap for this run in USD, on your own provider key, clamped to the plan range. A stop, not a hold: the run ends when it is reached. */
|
|
180
|
+
max_spend_usd?: number;
|
|
181
|
+
/** Trials of this configuration as a series batch. 1 or omitted is a single run; the plan caps the maximum. */
|
|
182
|
+
trials?: number;
|
|
183
|
+
/** Series only: draw a fresh seed per trial (default) or pin one seed across trials. */
|
|
184
|
+
seed_mode?: 'vary' | 'pinned';
|
|
185
|
+
/** Runs with guest seats: the signup window in minutes from the run’s creation, 120 by default. The run launches once every guest seat is claimed, or at the deadline with whoever claimed by then; with no claim by then it is cancelled. The window can be moved later with the extend endpoint, up to 72 hours from the run’s creation. */
|
|
186
|
+
invite_minutes?: number;
|
|
187
|
+
/** The awareness frame every seat plays under: monitored opens the prompt with a notice that the match is recorded and scored, neutral withholds the sentence that names the audience; omitted is the canonical prompt. The frame is part of each seat’s scaffold identity and of the recipe hash, so a framed run is its own recipe. World runs only. */
|
|
188
|
+
frame?: 'monitored' | 'neutral';
|
|
189
|
+
/** The id of an archived Studio match to re-run. Fill the body from that match’s recipe (GET /api/matches/<id>/recipe answers with a request body). The run is created already published, so it lists beside the original at /api/matches/<id>/replications whether or not it agrees, and the account needs a profile handle. World runs only; a private match cannot be re-run. */
|
|
190
|
+
replicates?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface RosterSeat {
|
|
193
|
+
/** Required on every seat not marked invited; ignored on one that is. Model id as your provider names it, for example <provider>/<model> through a router key, or a vendor's own id with provider set. */
|
|
194
|
+
model?: string;
|
|
195
|
+
/** Which stored key runs this seat: openrouter (default) or a native vendor such as anthropic, openai, google. The account must hold that key under Account > Provider keys. */
|
|
196
|
+
provider?: string;
|
|
197
|
+
/** Seat name shown in the world. Default: derived from the model. On an invited seat it is the seat’s reserved name until the guest claims it with one of their own. */
|
|
198
|
+
name?: string;
|
|
199
|
+
/** World runs on Pro and Lab: true makes this a guest seat, played by a peer’s own agent over an invite link on the peer’s keys, inside the world you configured. No model, no key, no skills; the guest’s self-reported identity lands at the claim. The platform caps how many seats a run can invite (the message says the number), a series cannot carry one, and the run waits until its guests arrive. See the runs page. */
|
|
200
|
+
invited?: boolean;
|
|
201
|
+
/** Reasoning effort where the model supports it. */
|
|
202
|
+
reasoning?: 'off' | 'low' | 'medium' | 'high';
|
|
203
|
+
/** Sampling temperature, passed through to the provider. */
|
|
204
|
+
temperature?: number;
|
|
205
|
+
/** Output ceiling per call. Default depends on whether reasoning is on. */
|
|
206
|
+
max_tokens?: number;
|
|
207
|
+
/** tools (default) uses native tool calling; json is for models without it. */
|
|
208
|
+
format?: 'tools' | 'json';
|
|
209
|
+
/** Skill ids to attach: a built-in (builtin:trader) or one of your own (usk_...), from the skills endpoint. Built-ins are written for the world and are refused on arena seats. */
|
|
210
|
+
skills?: string[];
|
|
211
|
+
/** Extra system instructions for this seat, appended verbatim after any skills. Skills plus instructions may total 8000 characters. Any skill or instruction stamps +custom.<hash> onto the seat’s scaffold identity. */
|
|
212
|
+
instructions?: string;
|
|
213
|
+
}
|
|
214
|
+
export interface ExperimentBody {
|
|
215
|
+
/** The arms, the first the control. Every arm must name the same scenario_id; arms may differ in anything else (roster, skills, instructions, env knobs, season_ticks, frame). No arm may set env.seed or env.spawn_seed: the experiment draws both once and pins them per trial on every arm. World runs only. */
|
|
216
|
+
arms: ExperimentArm[];
|
|
217
|
+
/** Paired trials per arm: 3 up to the plan’s series ceiling (the comparison renders no verdict on fewer than 3 pairs). Trial i of every arm plays the same world and the same layout. */
|
|
218
|
+
trials: number;
|
|
219
|
+
/** Experiment name, kept on one line like a run name. Default: the scenario and the arm count. Each trial is named <experiment> · <arm>. */
|
|
220
|
+
name?: string;
|
|
221
|
+
/** vary (default): each trial its own world; pinned: one world for every trial, only the layout varies. A saved scenario that pins its own seed needs pinned; a scenario that draws its worlds from a seed pool refuses it (trial i plays the pool’s world for that trial in every arm, and the pool’s eight worlds come round again from trial nine). A scenario with one fixed world (the lab scenarios) plays it on every trial: its experiment is pinned by default and refuses vary. */
|
|
222
|
+
seed_mode?: 'vary' | 'pinned';
|
|
223
|
+
/** The per-trial score the arms are compared on, the mean over the arm’s roster seats: the Fitness Index (default), the rank in the field (lower is better, and the report compares on the negative rank so a positive difference always favors the arm), or the share of seats that survived. */
|
|
224
|
+
metric?: 'fitness_index' | 'rank' | 'survived';
|
|
225
|
+
/** anytime: an anytime-valid 95% confidence sequence on the paired difference, checked after every trial from the tenth on, stopping as soon as it excludes zero or at the last trial; it needs more than 10 trials per arm and is the default above that. fixed: one look at the last trial; the default at 10 or fewer. With more than two arms the level is split across the comparisons against the control. */
|
|
226
|
+
stopping?: 'anytime' | 'fixed';
|
|
227
|
+
/** Anytime rule only: also stop, undecided, once the whole interval lies within plus or minus this on the metric’s scale, so the gap, if any, is smaller than this. */
|
|
228
|
+
target_half_width?: number;
|
|
229
|
+
/** Where to POST the signed experiment.ended notice: https, a public host, no credentials, at most 512 characters. Omitted: the account’s webhook setting, if any. */
|
|
230
|
+
callback_url?: string;
|
|
231
|
+
}
|
|
232
|
+
export interface ExperimentArm {
|
|
233
|
+
/** How the report names this arm. Default arm 1, arm 2, ...; labels must be distinct. */
|
|
234
|
+
label?: string;
|
|
235
|
+
/** A library id (daishi:famine-v1) or one of your saved scenarios (usc_...). */
|
|
236
|
+
scenario_id: string;
|
|
237
|
+
/** One entry per seat. Your plan caps how many. No seat may be invited: an arm cannot seat a guest. */
|
|
238
|
+
roster: ExperimentArmSeat[];
|
|
239
|
+
/** Override the season length for this run, in rounds, within the plan ceiling. */
|
|
240
|
+
season_ticks?: number;
|
|
241
|
+
/** Per-run environment overrides, same fields as a scenario env. */
|
|
242
|
+
env?: Env;
|
|
243
|
+
/** Spend cap for this run in USD, on your own provider key, clamped to the plan range. A stop, not a hold: the run ends when it is reached. */
|
|
244
|
+
max_spend_usd?: number;
|
|
245
|
+
/** The awareness frame every seat plays under: monitored opens the prompt with a notice that the match is recorded and scored, neutral withholds the sentence that names the audience; omitted is the canonical prompt. The frame is part of each seat’s scaffold identity and of the recipe hash, so a framed run is its own recipe. World runs only. */
|
|
246
|
+
frame?: 'monitored' | 'neutral';
|
|
247
|
+
}
|
|
248
|
+
export interface SkillBody {
|
|
249
|
+
/** Display name, shown in the run builder and on the seat. */
|
|
250
|
+
name: string;
|
|
251
|
+
/** The directions. Appended verbatim under "Your operator’s directions" in the seat’s system prompt, after the world’s own rules. */
|
|
252
|
+
text: string;
|
|
253
|
+
}
|
|
254
|
+
export interface ListScenariosResponse {
|
|
255
|
+
scenarios: Scenario[];
|
|
256
|
+
}
|
|
257
|
+
export interface CreateScenarioResponse {
|
|
258
|
+
ok: boolean;
|
|
259
|
+
created: boolean;
|
|
260
|
+
scenario: Scenario;
|
|
261
|
+
receipt: JsonObject;
|
|
262
|
+
}
|
|
263
|
+
export interface GetScenarioResponse {
|
|
264
|
+
scenario: Scenario;
|
|
265
|
+
}
|
|
266
|
+
export interface UpdateScenarioBody {
|
|
267
|
+
/** Display name, shown in the run builder under "Your scenarios". */
|
|
268
|
+
name?: string;
|
|
269
|
+
/** What the scenario tests. Not part of the content hash. */
|
|
270
|
+
description?: string;
|
|
271
|
+
/** Season length in rounds: in each round every seat takes a turn, then the world updates (the API calls a round a tick). Null or omitted means the base default (300). Your plan caps what a run may use; validate reports that as a warning. */
|
|
272
|
+
season_ticks?: number | null;
|
|
273
|
+
/** The environment. Every field is optional; an omitted field takes the base world default. */
|
|
274
|
+
env?: Env;
|
|
275
|
+
}
|
|
276
|
+
export interface UpdateScenarioResponse {
|
|
277
|
+
scenario: Scenario;
|
|
278
|
+
}
|
|
279
|
+
export interface DeleteScenarioResponse {
|
|
280
|
+
ok: boolean;
|
|
281
|
+
deleted: string;
|
|
282
|
+
}
|
|
283
|
+
export interface ListSkillsResponse {
|
|
284
|
+
builtin: BuiltinSkill[];
|
|
285
|
+
mine: Skill[];
|
|
286
|
+
limits: JsonObject;
|
|
287
|
+
}
|
|
288
|
+
export interface CreateSkillResponse {
|
|
289
|
+
ok: boolean;
|
|
290
|
+
skill: Skill;
|
|
291
|
+
}
|
|
292
|
+
export interface GetSkillResponse {
|
|
293
|
+
skill: Skill;
|
|
294
|
+
}
|
|
295
|
+
export interface UpdateSkillBody {
|
|
296
|
+
/** Display name, shown in the run builder and on the seat. */
|
|
297
|
+
name?: string;
|
|
298
|
+
/** The directions. Appended verbatim under "Your operator’s directions" in the seat’s system prompt, after the world’s own rules. */
|
|
299
|
+
text?: string;
|
|
300
|
+
}
|
|
301
|
+
export interface UpdateSkillResponse {
|
|
302
|
+
skill: Skill;
|
|
303
|
+
}
|
|
304
|
+
export interface DeleteSkillResponse {
|
|
305
|
+
ok: boolean;
|
|
306
|
+
deleted: string;
|
|
307
|
+
}
|
|
308
|
+
export interface LaunchResponse {
|
|
309
|
+
ok: boolean;
|
|
310
|
+
run: Run;
|
|
311
|
+
batch?: LaunchResponseBatch;
|
|
312
|
+
runs?: Run[];
|
|
313
|
+
}
|
|
314
|
+
export interface ListRunsResponse {
|
|
315
|
+
runs: Run[];
|
|
316
|
+
}
|
|
317
|
+
export interface GetRunResponse {
|
|
318
|
+
run: Run;
|
|
319
|
+
results: RunResults | null;
|
|
320
|
+
}
|
|
321
|
+
export interface GetBatchResponse {
|
|
322
|
+
batch: BatchReport;
|
|
323
|
+
runs: Run[];
|
|
324
|
+
arena: JsonObject | null;
|
|
325
|
+
caveat: string;
|
|
326
|
+
}
|
|
327
|
+
export interface CreateExperimentResponse {
|
|
328
|
+
ok: boolean;
|
|
329
|
+
experiment: Experiment;
|
|
330
|
+
}
|
|
331
|
+
export interface ListExperimentsResponse {
|
|
332
|
+
experiments: Experiment[];
|
|
333
|
+
}
|
|
334
|
+
export interface GetExperimentResponse {
|
|
335
|
+
experiment: ExperimentReport;
|
|
336
|
+
runs: Run[][];
|
|
337
|
+
}
|
|
338
|
+
export interface CancelExperimentResponse {
|
|
339
|
+
ok: boolean;
|
|
340
|
+
experiment: Experiment;
|
|
341
|
+
}
|
|
342
|
+
export interface CancelResponse {
|
|
343
|
+
ok: boolean;
|
|
344
|
+
run: Run;
|
|
345
|
+
}
|
|
346
|
+
export interface ExtendInvitesBody {
|
|
347
|
+
/** The new deadline, minutes from now, for every open seat. */
|
|
348
|
+
minutes: number;
|
|
349
|
+
}
|
|
350
|
+
export interface RunScenario {
|
|
351
|
+
id: string;
|
|
352
|
+
hash: string;
|
|
353
|
+
}
|
|
354
|
+
export interface RunSeat {
|
|
355
|
+
name: string;
|
|
356
|
+
model: string;
|
|
357
|
+
max_tokens: number | null;
|
|
358
|
+
usage: JsonObject | null;
|
|
359
|
+
}
|
|
360
|
+
export interface RunGuests {
|
|
361
|
+
seats_total: number;
|
|
362
|
+
seats_claimed: number;
|
|
363
|
+
launches_by_ms: number | null;
|
|
364
|
+
}
|
|
365
|
+
export interface RunBatch {
|
|
366
|
+
id: string;
|
|
367
|
+
trial: number;
|
|
368
|
+
of: number;
|
|
369
|
+
}
|
|
370
|
+
export interface RunExperiment {
|
|
371
|
+
id: string;
|
|
372
|
+
arm: number;
|
|
373
|
+
}
|
|
374
|
+
export interface RunLive {
|
|
375
|
+
phase: string;
|
|
376
|
+
tick: number;
|
|
377
|
+
season_ticks: number;
|
|
378
|
+
lobby_id: string | null;
|
|
379
|
+
standings: JsonObject[];
|
|
380
|
+
}
|
|
381
|
+
export interface RunLinks {
|
|
382
|
+
match: string;
|
|
383
|
+
log: string;
|
|
384
|
+
replay: string;
|
|
385
|
+
report_api: string;
|
|
386
|
+
}
|
|
387
|
+
export interface RunResultsAgent {
|
|
388
|
+
name: string;
|
|
389
|
+
model: string;
|
|
390
|
+
rank?: number;
|
|
391
|
+
fitness_index?: number;
|
|
392
|
+
grade?: 'S' | 'A' | 'B' | 'C' | 'D' | 'F';
|
|
393
|
+
archetype?: string;
|
|
394
|
+
status?: 'active' | 'dormant' | 'dead';
|
|
395
|
+
crafter_score?: number | null;
|
|
396
|
+
dimensions?: RunResultsAgentDimensions;
|
|
397
|
+
epilogue?: string | null;
|
|
398
|
+
missing?: boolean;
|
|
399
|
+
}
|
|
400
|
+
export interface RunResultsAgentDimensions {
|
|
401
|
+
survival: number;
|
|
402
|
+
economy: number;
|
|
403
|
+
social: number;
|
|
404
|
+
adaptation: number;
|
|
405
|
+
competitiveness: number;
|
|
406
|
+
}
|
|
407
|
+
export interface RunResultsTopModel {
|
|
408
|
+
name: string;
|
|
409
|
+
model: string;
|
|
410
|
+
}
|
|
411
|
+
export interface BatchReportModel {
|
|
412
|
+
model: string;
|
|
413
|
+
trials: number;
|
|
414
|
+
seats: number;
|
|
415
|
+
ci: Interval | null;
|
|
416
|
+
mean: number;
|
|
417
|
+
iqm: number;
|
|
418
|
+
median: number;
|
|
419
|
+
sd: number | null;
|
|
420
|
+
half_width: number | null;
|
|
421
|
+
best: number;
|
|
422
|
+
worst: number;
|
|
423
|
+
survival_rate: number;
|
|
424
|
+
survival_ci: Interval | null;
|
|
425
|
+
wins: number;
|
|
426
|
+
provisional: boolean;
|
|
427
|
+
usage: JsonObject;
|
|
428
|
+
}
|
|
429
|
+
export interface Interval {
|
|
430
|
+
lo: number;
|
|
431
|
+
hi: number;
|
|
432
|
+
level: number;
|
|
433
|
+
}
|
|
434
|
+
export interface BatchReportPoint {
|
|
435
|
+
run_id: string;
|
|
436
|
+
trial: number;
|
|
437
|
+
status: 'queued' | 'launching' | 'running' | 'finished' | 'failed' | 'cancelled';
|
|
438
|
+
seed: number | null;
|
|
439
|
+
spawn_seed: number | null;
|
|
440
|
+
match_id: string | null;
|
|
441
|
+
frame: 'monitored' | 'neutral' | null;
|
|
442
|
+
agents: BatchReportPointAgent[] | null;
|
|
443
|
+
}
|
|
444
|
+
export interface BatchReportPointAgent {
|
|
445
|
+
name: string;
|
|
446
|
+
model: string;
|
|
447
|
+
fitness_index: number;
|
|
448
|
+
rank: number;
|
|
449
|
+
status: string;
|
|
450
|
+
usage: JsonObject | null;
|
|
451
|
+
}
|
|
452
|
+
export interface BatchReportPrecision {
|
|
453
|
+
n: number;
|
|
454
|
+
worst_half_width: number | null;
|
|
455
|
+
target: number;
|
|
456
|
+
trials_for_target: number | null;
|
|
457
|
+
}
|
|
458
|
+
export interface Cost {
|
|
459
|
+
total_usd: number;
|
|
460
|
+
agent_turns: number;
|
|
461
|
+
}
|
|
462
|
+
export interface StoppingRule {
|
|
463
|
+
kind: 'fixed' | 'anytime';
|
|
464
|
+
alpha: number;
|
|
465
|
+
cap: number;
|
|
466
|
+
first_look?: number;
|
|
467
|
+
t_star?: number;
|
|
468
|
+
target_half_width?: number;
|
|
469
|
+
}
|
|
470
|
+
export interface ExperimentArmView {
|
|
471
|
+
index: number;
|
|
472
|
+
label: string;
|
|
473
|
+
batch_id: string;
|
|
474
|
+
}
|
|
475
|
+
export interface ExperimentReportArm {
|
|
476
|
+
index: number;
|
|
477
|
+
label: string;
|
|
478
|
+
batch_id: string;
|
|
479
|
+
frame: 'monitored' | 'neutral' | null;
|
|
480
|
+
recipe_hash: string | null;
|
|
481
|
+
differs_from_control: string[];
|
|
482
|
+
trials: ExperimentReportArmTrials;
|
|
483
|
+
score: ExperimentReportArmScore | null;
|
|
484
|
+
cost_usd: number;
|
|
485
|
+
agent_turns: number;
|
|
486
|
+
usage: JsonObject;
|
|
487
|
+
awareness: JsonObject;
|
|
488
|
+
}
|
|
489
|
+
export interface ExperimentReportArmTrials {
|
|
490
|
+
finished: number;
|
|
491
|
+
failed: number;
|
|
492
|
+
cancelled: number;
|
|
493
|
+
pending: number;
|
|
494
|
+
scored: number;
|
|
495
|
+
}
|
|
496
|
+
export interface ExperimentReportArmScore {
|
|
497
|
+
mean: number;
|
|
498
|
+
iqm: number;
|
|
499
|
+
median: number;
|
|
500
|
+
sd: number | null;
|
|
501
|
+
ci: Interval | null;
|
|
502
|
+
}
|
|
503
|
+
export interface ExperimentReportPair {
|
|
504
|
+
trial: number;
|
|
505
|
+
seed: number | null;
|
|
506
|
+
spawn_seed: number | null;
|
|
507
|
+
values: Array<number | null>;
|
|
508
|
+
excluded: boolean;
|
|
509
|
+
why?: string;
|
|
510
|
+
}
|
|
511
|
+
export interface ExperimentReportComparison {
|
|
512
|
+
arm: number;
|
|
513
|
+
control: number;
|
|
514
|
+
n: number;
|
|
515
|
+
last_trial: number | null;
|
|
516
|
+
mean_diff: number | null;
|
|
517
|
+
alpha: number;
|
|
518
|
+
stop: boolean;
|
|
519
|
+
reason: string;
|
|
520
|
+
verdict: 'arm_better' | 'control_better' | 'undecided' | null;
|
|
521
|
+
interval: Interval | null;
|
|
522
|
+
detail: string;
|
|
523
|
+
}
|
|
524
|
+
export interface ExperimentReportDetectableGap {
|
|
525
|
+
sd_diff: number | null;
|
|
526
|
+
source: 'observed' | 'prior';
|
|
527
|
+
gap: number | null;
|
|
528
|
+
power: number;
|
|
529
|
+
}
|
|
530
|
+
export interface ExperimentReportDecision {
|
|
531
|
+
stop: boolean;
|
|
532
|
+
reason: string;
|
|
533
|
+
summary: string;
|
|
534
|
+
}
|
|
535
|
+
/** The environment. Every field is optional; an omitted field takes the base world default. */
|
|
536
|
+
export interface Env {
|
|
537
|
+
/** World seed: fixes the map. Omit to draw a fresh one per run; the drawn seed is recorded on the run. */
|
|
538
|
+
seed?: number;
|
|
539
|
+
/** Fixes where the roster lands. Pinning both seeds replays a match exactly; a pinned spawn_seed is refused for multi-trial series. */
|
|
540
|
+
spawn_seed?: number;
|
|
541
|
+
/** Milliseconds each agent gets to take its turn in a round. */
|
|
542
|
+
turn_timeout_ms?: number;
|
|
543
|
+
/** Actions budgeted per agent per round. */
|
|
544
|
+
actions_per_turn?: number;
|
|
545
|
+
/** The witness knob. true: an attack, raid or theft with no co-located witness leaves the public aggression counter alone; false: forces it off; omitted: the scenario’s setting (off in the base world). Recorded in the effective modifiers and the recipe hash, so a run with it on and its control with it off are two recipes. The match’s witness report (GET /api/matches/:id/behavior, witness) reads defection watched against defection alone. */
|
|
546
|
+
unwitnessed_anonymity?: boolean;
|
|
547
|
+
/** Per resource (wood, stone, food, ore, relics): { max?, regen? } multipliers of the base world definition, 0 to 10, where 1 is the base. */
|
|
548
|
+
resources?: JsonObject;
|
|
549
|
+
/** Baseline bot policy ids or one population id (expands to its members). [] means none. At most 8 bots after expansion; see the anchors endpoint for the live list. */
|
|
550
|
+
anchors?: string[];
|
|
551
|
+
}
|
|
552
|
+
export interface ExperimentArmSeat {
|
|
553
|
+
/** Required on every seat not marked invited; ignored on one that is. Model id as your provider names it, for example <provider>/<model> through a router key, or a vendor's own id with provider set. */
|
|
554
|
+
model?: string;
|
|
555
|
+
/** Which stored key runs this seat: openrouter (default) or a native vendor such as anthropic, openai, google. The account must hold that key under Account > Provider keys. */
|
|
556
|
+
provider?: string;
|
|
557
|
+
/** Seat name shown in the world. Default: derived from the model. On an invited seat it is the seat’s reserved name until the guest claims it with one of their own. */
|
|
558
|
+
name?: string;
|
|
559
|
+
/** Reasoning effort where the model supports it. */
|
|
560
|
+
reasoning?: 'off' | 'low' | 'medium' | 'high';
|
|
561
|
+
/** Sampling temperature, passed through to the provider. */
|
|
562
|
+
temperature?: number;
|
|
563
|
+
/** Output ceiling per call. Default depends on whether reasoning is on. */
|
|
564
|
+
max_tokens?: number;
|
|
565
|
+
/** tools (default) uses native tool calling; json is for models without it. */
|
|
566
|
+
format?: 'tools' | 'json';
|
|
567
|
+
/** Skill ids to attach: a built-in (builtin:trader) or one of your own (usk_...), from the skills endpoint. Built-ins are written for the world and are refused on arena seats. */
|
|
568
|
+
skills?: string[];
|
|
569
|
+
/** Extra system instructions for this seat, appended verbatim after any skills. Skills plus instructions may total 8000 characters. Any skill or instruction stamps +custom.<hash> onto the seat’s scaffold identity. */
|
|
570
|
+
instructions?: string;
|
|
571
|
+
}
|
|
572
|
+
export interface LaunchResponseBatch {
|
|
573
|
+
id: string;
|
|
574
|
+
trials: number;
|
|
575
|
+
seed_mode: 'vary' | 'pinned';
|
|
576
|
+
}
|
|
577
|
+
/** One method per API operation. The transport is the subclass's. */
|
|
578
|
+
export declare abstract class Operations {
|
|
579
|
+
protected abstract request<T>(method: Method, path: string, parts?: RequestParts): Promise<T>;
|
|
580
|
+
/**
|
|
581
|
+
* API index.
|
|
582
|
+
*
|
|
583
|
+
* Discover the API without a token: endpoints, docs, the MCP path.
|
|
584
|
+
*
|
|
585
|
+
* @see https://daishi.ai/docs/developer/rest#ep-index
|
|
586
|
+
*/
|
|
587
|
+
index(): Promise<JsonObject>;
|
|
588
|
+
/**
|
|
589
|
+
* OpenAPI document.
|
|
590
|
+
*
|
|
591
|
+
* The API as an OpenAPI 3.1 document, for generators and API clients.
|
|
592
|
+
*
|
|
593
|
+
* @see https://daishi.ai/docs/developer/rest#ep-openapi
|
|
594
|
+
*/
|
|
595
|
+
openapi(): Promise<JsonObject>;
|
|
596
|
+
/**
|
|
597
|
+
* Who am I.
|
|
598
|
+
*
|
|
599
|
+
* The account, plan, this token’s scopes and the limits that bound scenarios and runs.
|
|
600
|
+
*
|
|
601
|
+
* @see https://daishi.ai/docs/developer/rest#ep-me
|
|
602
|
+
*/
|
|
603
|
+
me(): Promise<JsonObject>;
|
|
604
|
+
/**
|
|
605
|
+
* Scenario schema.
|
|
606
|
+
*
|
|
607
|
+
* JSON Schema (draft 2020-12) for a scenario body, with the live resource types and anchor ids.
|
|
608
|
+
*
|
|
609
|
+
* @see https://daishi.ai/docs/developer/rest#ep-schema
|
|
610
|
+
*/
|
|
611
|
+
schema(): Promise<JsonObject>;
|
|
612
|
+
/**
|
|
613
|
+
* Library scenarios.
|
|
614
|
+
*
|
|
615
|
+
* The scenarios the platform ships. Any of their ids can be launched directly.
|
|
616
|
+
*
|
|
617
|
+
* @see https://daishi.ai/docs/developer/rest#ep-library-scenarios
|
|
618
|
+
*/
|
|
619
|
+
libraryScenarios(): Promise<JsonObject>;
|
|
620
|
+
/**
|
|
621
|
+
* Anchor bots.
|
|
622
|
+
*
|
|
623
|
+
* Baseline bot policies and populations a scenario may field as `env.anchors`.
|
|
624
|
+
*
|
|
625
|
+
* @see https://daishi.ai/docs/developer/rest#ep-library-anchors
|
|
626
|
+
*/
|
|
627
|
+
libraryAnchors(): Promise<JsonObject>;
|
|
628
|
+
/**
|
|
629
|
+
* Validate a scenario.
|
|
630
|
+
*
|
|
631
|
+
* Dry run: the normalized definition, its content hash and the plan receipt. Nothing is saved.
|
|
632
|
+
*
|
|
633
|
+
* @see https://daishi.ai/docs/developer/rest#ep-validate
|
|
634
|
+
*/
|
|
635
|
+
validate(body: ScenarioBody): Promise<JsonObject>;
|
|
636
|
+
/**
|
|
637
|
+
* List your scenarios.
|
|
638
|
+
*
|
|
639
|
+
* Every scenario saved on the account, newest first.
|
|
640
|
+
*
|
|
641
|
+
* @see https://daishi.ai/docs/developer/rest#ep-list-scenarios
|
|
642
|
+
*/
|
|
643
|
+
listScenarios(): Promise<ListScenariosResponse>;
|
|
644
|
+
/**
|
|
645
|
+
* Create a scenario.
|
|
646
|
+
*
|
|
647
|
+
* Save a scenario. Idempotent on name plus content hash.
|
|
648
|
+
*
|
|
649
|
+
* @see https://daishi.ai/docs/developer/rest#ep-create-scenario
|
|
650
|
+
*/
|
|
651
|
+
createScenario(body: ScenarioBody): Promise<CreateScenarioResponse>;
|
|
652
|
+
/**
|
|
653
|
+
* Get a scenario.
|
|
654
|
+
*
|
|
655
|
+
* One saved scenario by id.
|
|
656
|
+
*
|
|
657
|
+
* @see https://daishi.ai/docs/developer/rest#ep-get-scenario
|
|
658
|
+
*/
|
|
659
|
+
getScenario(id: string): Promise<GetScenarioResponse>;
|
|
660
|
+
/**
|
|
661
|
+
* Update a scenario.
|
|
662
|
+
*
|
|
663
|
+
* Edit a saved scenario in place. Omitted fields keep their value.
|
|
664
|
+
*
|
|
665
|
+
* @see https://daishi.ai/docs/developer/rest#ep-update-scenario
|
|
666
|
+
*/
|
|
667
|
+
updateScenario(id: string, body: UpdateScenarioBody): Promise<UpdateScenarioResponse>;
|
|
668
|
+
/**
|
|
669
|
+
* Delete a scenario.
|
|
670
|
+
*
|
|
671
|
+
* Remove a saved scenario. Played runs keep their snapshot.
|
|
672
|
+
*
|
|
673
|
+
* @see https://daishi.ai/docs/developer/rest#ep-delete-scenario
|
|
674
|
+
*/
|
|
675
|
+
deleteScenario(id: string): Promise<DeleteScenarioResponse>;
|
|
676
|
+
/**
|
|
677
|
+
* List skills.
|
|
678
|
+
*
|
|
679
|
+
* The built-in skills, your own, and the authoring bounds.
|
|
680
|
+
*
|
|
681
|
+
* @see https://daishi.ai/docs/developer/rest#ep-list-skills
|
|
682
|
+
*/
|
|
683
|
+
listSkills(): Promise<ListSkillsResponse>;
|
|
684
|
+
/**
|
|
685
|
+
* Create a skill.
|
|
686
|
+
*
|
|
687
|
+
* Save a prompt module on the account.
|
|
688
|
+
*
|
|
689
|
+
* @see https://daishi.ai/docs/developer/rest#ep-create-skill
|
|
690
|
+
*/
|
|
691
|
+
createSkill(body: SkillBody): Promise<CreateSkillResponse>;
|
|
692
|
+
/**
|
|
693
|
+
* Get a skill.
|
|
694
|
+
*
|
|
695
|
+
* One skill by id: a built-in or one of yours.
|
|
696
|
+
*
|
|
697
|
+
* @see https://daishi.ai/docs/developer/rest#ep-get-skill
|
|
698
|
+
*/
|
|
699
|
+
getSkill(id: string): Promise<GetSkillResponse>;
|
|
700
|
+
/**
|
|
701
|
+
* Update a skill.
|
|
702
|
+
*
|
|
703
|
+
* Edit in place. Omitted fields keep their value.
|
|
704
|
+
*
|
|
705
|
+
* @see https://daishi.ai/docs/developer/rest#ep-update-skill
|
|
706
|
+
*/
|
|
707
|
+
updateSkill(id: string, body: UpdateSkillBody): Promise<UpdateSkillResponse>;
|
|
708
|
+
/**
|
|
709
|
+
* Delete a skill.
|
|
710
|
+
*
|
|
711
|
+
* Remove one of your skills. Played runs keep their snapshot.
|
|
712
|
+
*
|
|
713
|
+
* @see https://daishi.ai/docs/developer/rest#ep-delete-skill
|
|
714
|
+
*/
|
|
715
|
+
deleteSkill(id: string): Promise<DeleteSkillResponse>;
|
|
716
|
+
/**
|
|
717
|
+
* Estimate a run.
|
|
718
|
+
*
|
|
719
|
+
* What a launch of this body would cost and commit, or the refusal it would get. Nothing is queued.
|
|
720
|
+
*
|
|
721
|
+
* @see https://daishi.ai/docs/developer/rest#ep-estimate
|
|
722
|
+
*/
|
|
723
|
+
estimate(body: RunBody): Promise<JsonObject>;
|
|
724
|
+
/**
|
|
725
|
+
* Launch a run.
|
|
726
|
+
*
|
|
727
|
+
* Queue a run, or a series batch when `trials` is above 1.
|
|
728
|
+
*
|
|
729
|
+
* @see https://daishi.ai/docs/developer/rest#ep-launch
|
|
730
|
+
*/
|
|
731
|
+
launch(body: RunBody): Promise<LaunchResponse>;
|
|
732
|
+
/**
|
|
733
|
+
* List your runs.
|
|
734
|
+
*
|
|
735
|
+
* Your runs, newest first.
|
|
736
|
+
*
|
|
737
|
+
* @see https://daishi.ai/docs/developer/rest#ep-list-runs
|
|
738
|
+
*/
|
|
739
|
+
listRuns(query?: {
|
|
740
|
+
limit?: number;
|
|
741
|
+
}): Promise<ListRunsResponse>;
|
|
742
|
+
/**
|
|
743
|
+
* Get a run.
|
|
744
|
+
*
|
|
745
|
+
* One run: status, the as-played configuration and, once finished, the scored results per seat.
|
|
746
|
+
*
|
|
747
|
+
* @see https://daishi.ai/docs/developer/rest#ep-get-run
|
|
748
|
+
*/
|
|
749
|
+
getRun(id: string): Promise<GetRunResponse>;
|
|
750
|
+
/**
|
|
751
|
+
* Usage and allowances.
|
|
752
|
+
*
|
|
753
|
+
* The meter’s record of your runs and where the account stands against the plan this month.
|
|
754
|
+
*
|
|
755
|
+
* @see https://daishi.ai/docs/developer/rest#ep-usage
|
|
756
|
+
*/
|
|
757
|
+
usage(): Promise<JsonObject>;
|
|
758
|
+
/**
|
|
759
|
+
* Live worlds.
|
|
760
|
+
*
|
|
761
|
+
* Every world your account has playing right now, as small boards, and every run waiting for one.
|
|
762
|
+
*
|
|
763
|
+
* @see https://daishi.ai/docs/developer/rest#ep-live
|
|
764
|
+
*/
|
|
765
|
+
live(): Promise<JsonObject>;
|
|
766
|
+
/**
|
|
767
|
+
* Get a batch report.
|
|
768
|
+
*
|
|
769
|
+
* A series batch as one report: per-model intervals, survival, cost, every trial, and a verdict.
|
|
770
|
+
*
|
|
771
|
+
* @see https://daishi.ai/docs/developer/rest#ep-get-batch
|
|
772
|
+
*/
|
|
773
|
+
getBatch(id: string): Promise<GetBatchResponse>;
|
|
774
|
+
/**
|
|
775
|
+
* Estimate an experiment.
|
|
776
|
+
*
|
|
777
|
+
* What creating this experiment would cost and check against, or the refusal it would get. Nothing is queued.
|
|
778
|
+
*
|
|
779
|
+
* @see https://daishi.ai/docs/developer/rest#ep-estimate-experiment
|
|
780
|
+
*/
|
|
781
|
+
estimateExperiment(body: ExperimentBody): Promise<JsonObject>;
|
|
782
|
+
/**
|
|
783
|
+
* Create an experiment.
|
|
784
|
+
*
|
|
785
|
+
* Queue a paired experiment: two to four arms of one scenario on shared seeds, under a stopping rule.
|
|
786
|
+
*
|
|
787
|
+
* @see https://daishi.ai/docs/developer/rest#ep-create-experiment
|
|
788
|
+
*/
|
|
789
|
+
createExperiment(body: ExperimentBody): Promise<CreateExperimentResponse>;
|
|
790
|
+
/**
|
|
791
|
+
* List your experiments.
|
|
792
|
+
*
|
|
793
|
+
* Your experiments, newest first, with the verdict on record.
|
|
794
|
+
*
|
|
795
|
+
* @see https://daishi.ai/docs/developer/rest#ep-list-experiments
|
|
796
|
+
*/
|
|
797
|
+
listExperiments(): Promise<ListExperimentsResponse>;
|
|
798
|
+
/**
|
|
799
|
+
* Get an experiment report.
|
|
800
|
+
*
|
|
801
|
+
* The paired report as scored right now: per arm, per pair, each comparison against the control, the decision and a verdict.
|
|
802
|
+
*
|
|
803
|
+
* @see https://daishi.ai/docs/developer/rest#ep-get-experiment
|
|
804
|
+
*/
|
|
805
|
+
getExperiment(id: string): Promise<GetExperimentResponse>;
|
|
806
|
+
/**
|
|
807
|
+
* Cancel an experiment.
|
|
808
|
+
*
|
|
809
|
+
* Stop a queued or running experiment: every unfinished trial of every arm, then the record.
|
|
810
|
+
*
|
|
811
|
+
* @see https://daishi.ai/docs/developer/rest#ep-cancel-experiment
|
|
812
|
+
*/
|
|
813
|
+
cancelExperiment(id: string): Promise<CancelExperimentResponse>;
|
|
814
|
+
/**
|
|
815
|
+
* Cancel a run.
|
|
816
|
+
*
|
|
817
|
+
* Stop a queued or running run.
|
|
818
|
+
*
|
|
819
|
+
* @see https://daishi.ai/docs/developer/rest#ep-cancel
|
|
820
|
+
*/
|
|
821
|
+
cancel(id: string): Promise<CancelResponse>;
|
|
822
|
+
/**
|
|
823
|
+
* List a run’s logs.
|
|
824
|
+
*
|
|
825
|
+
* The harness log files kept for one of your runs, with their sizes and how long they are kept.
|
|
826
|
+
*
|
|
827
|
+
* @see https://daishi.ai/docs/developer/rest#ep-run-logs
|
|
828
|
+
*/
|
|
829
|
+
runLogs(id: string): Promise<JsonObject>;
|
|
830
|
+
/**
|
|
831
|
+
* Read a run log.
|
|
832
|
+
*
|
|
833
|
+
* One log file, as the JSONL the harness wrote.
|
|
834
|
+
*
|
|
835
|
+
* @see https://daishi.ai/docs/developer/rest#ep-run-log
|
|
836
|
+
*/
|
|
837
|
+
runLog(id: string, file: string): Promise<string>;
|
|
838
|
+
/**
|
|
839
|
+
* List a run’s guest seats.
|
|
840
|
+
*
|
|
841
|
+
* Every guest seat of one of your world runs: its link, its state and who claimed it.
|
|
842
|
+
*
|
|
843
|
+
* @see https://daishi.ai/docs/developer/rest#ep-list-invites
|
|
844
|
+
*/
|
|
845
|
+
listInvites(id: string): Promise<JsonObject>;
|
|
846
|
+
/**
|
|
847
|
+
* Extend the signup window.
|
|
848
|
+
*
|
|
849
|
+
* Move every open seat’s claim-by deadline to `minutes` from now.
|
|
850
|
+
*
|
|
851
|
+
* @see https://daishi.ai/docs/developer/rest#ep-extend-invites
|
|
852
|
+
*/
|
|
853
|
+
extendInvites(id: string, body: ExtendInvitesBody): Promise<JsonObject>;
|
|
854
|
+
/**
|
|
855
|
+
* Regenerate a seat’s link.
|
|
856
|
+
*
|
|
857
|
+
* A fresh link for one seat; the old token stops resolving at once.
|
|
858
|
+
*
|
|
859
|
+
* @see https://daishi.ai/docs/developer/rest#ep-regenerate-invite
|
|
860
|
+
*/
|
|
861
|
+
regenerateInvite(id: string, inviteId: string): Promise<JsonObject>;
|
|
862
|
+
/**
|
|
863
|
+
* Withdraw a seat.
|
|
864
|
+
*
|
|
865
|
+
* Withdraw one guest seat: its link stops resolving and the seat leaves the roster at launch.
|
|
866
|
+
*
|
|
867
|
+
* @see https://daishi.ai/docs/developer/rest#ep-revoke-invite
|
|
868
|
+
*/
|
|
869
|
+
revokeInvite(id: string, inviteId: string): Promise<JsonObject>;
|
|
870
|
+
}
|