sailfork 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/AGENTS.md +228 -0
  2. package/LICENSE +19 -0
  3. package/README.md +42 -2
  4. package/dist/index.cjs +3855 -0
  5. package/dist/index.js +3813 -0
  6. package/dist/tools.cjs +8513 -0
  7. package/dist/tools.js +8471 -0
  8. package/dist/types/core/agent.d.ts +2 -0
  9. package/dist/types/core/client.d.ts +19 -0
  10. package/dist/types/core/env.d.ts +2 -0
  11. package/dist/types/core/errors.d.ts +59 -0
  12. package/dist/types/core/sse.d.ts +3 -0
  13. package/dist/types/core/token.d.ts +7 -0
  14. package/dist/types/core/types.d.ts +65 -0
  15. package/dist/types/core/version.d.ts +2 -0
  16. package/dist/types/core/waits.d.ts +43 -0
  17. package/dist/types/generated/api.d.ts +1216 -0
  18. package/dist/types/generated/index.d.ts +5 -0
  19. package/dist/types/generated/ops.d.ts +1784 -0
  20. package/dist/types/generated/tools.d.ts +21 -0
  21. package/dist/types/generated/types.d.ts +4241 -0
  22. package/dist/types/index.d.ts +26 -0
  23. package/dist/types/tools.d.ts +7 -0
  24. package/dist/types-cjs/core/agent.d.ts +2 -0
  25. package/dist/types-cjs/core/client.d.ts +19 -0
  26. package/dist/types-cjs/core/env.d.ts +2 -0
  27. package/dist/types-cjs/core/errors.d.ts +59 -0
  28. package/dist/types-cjs/core/sse.d.ts +3 -0
  29. package/dist/types-cjs/core/token.d.ts +7 -0
  30. package/dist/types-cjs/core/types.d.ts +65 -0
  31. package/dist/types-cjs/core/version.d.ts +2 -0
  32. package/dist/types-cjs/core/waits.d.ts +43 -0
  33. package/dist/types-cjs/generated/api.d.ts +1216 -0
  34. package/dist/types-cjs/generated/index.d.ts +5 -0
  35. package/dist/types-cjs/generated/ops.d.ts +1784 -0
  36. package/dist/types-cjs/generated/tools.d.ts +21 -0
  37. package/dist/types-cjs/generated/types.d.ts +4241 -0
  38. package/dist/types-cjs/index.d.ts +26 -0
  39. package/dist/types-cjs/package.json +1 -0
  40. package/dist/types-cjs/tools.d.ts +7 -0
  41. package/llms.txt +211 -0
  42. package/package.json +58 -9
  43. package/index.js +0 -1
package/dist/index.js ADDED
@@ -0,0 +1,3813 @@
1
+ // src/core/env.ts
2
+ function readEnv(name) {
3
+ try {
4
+ const value = typeof process !== "undefined" && process?.env ? process.env[name] : typeof Deno !== "undefined" ? Deno?.env?.get(name) : undefined;
5
+ return value === "" ? undefined : value;
6
+ } catch {
7
+ return;
8
+ }
9
+ }
10
+ function builtin(id) {
11
+ try {
12
+ return typeof process !== "undefined" ? process?.getBuiltinModule?.(id) : undefined;
13
+ } catch {
14
+ return;
15
+ }
16
+ }
17
+
18
+ // src/core/agent.ts
19
+ var MARKERS = [
20
+ ["AMP_CURRENT_THREAD_ID", "amp"],
21
+ ["CODEBUDDY", "codebuddy"],
22
+ ["CODEBUDDY_SESSION_ID", "codebuddy"],
23
+ ["CLAUDECODE", "claude-code"],
24
+ ["CLAUDE_CODE", "claude-code"],
25
+ ["CLAUDE_CODE_ENTRYPOINT", "claude-code"],
26
+ ["CLAUDE_CODE_SESSION_ID", "claude-code"],
27
+ ["CURSOR_AGENT", "cursor"],
28
+ ["CURSOR_SANDBOX", "cursor"],
29
+ ["QWEN_CODE", "qwen-code"],
30
+ ["GEMINI_CLI", "gemini-cli"],
31
+ ["CODEX_THREAD_ID", "codex"],
32
+ ["CODEX_SANDBOX", "codex"],
33
+ ["CODEX_SANDBOX_NETWORK_DISABLED", "codex"],
34
+ ["CODEX_CI", "codex"],
35
+ ["ANTIGRAVITY_AGENT", "antigravity"],
36
+ ["AUGMENT_AGENT", "augment"],
37
+ ["CLINE_ACTIVE", "cline"],
38
+ ["CLINE_TASK_ID", "cline"],
39
+ ["ROO_CODE_TASK_ID", "roo-code"],
40
+ ["CRUSH", "crush"],
41
+ ["GROK_AGENT", "grok"],
42
+ ["OZ_RUN_ID", "warp"],
43
+ ["KIRO_AGENT_PATH", "kiro"],
44
+ ["FIREBENDER_TERMINAL", "firebender"],
45
+ ["TRAE_AI_SHELL_ID", "trae"],
46
+ ["GOOSE_TERMINAL", "goose"],
47
+ ["OPENCODE_CLIENT", "opencode"],
48
+ ["OPENCODE_PID", "opencode"],
49
+ ["OPENCODE_BIN_PATH", "opencode"],
50
+ ["OPENCODE_SERVER", "opencode"],
51
+ ["COPILOT_AGENT_SESSION_ID", "github-copilot"],
52
+ ["COPILOT_AGENT_JOB_ID", "github-copilot"],
53
+ ["COPILOT_AGENT", "github-copilot"],
54
+ ["COPILOT_CLI", "github-copilot"],
55
+ ["COPILOT_MODEL", "github-copilot"],
56
+ ["COPILOT_ALLOW_ALL", "github-copilot"]
57
+ ];
58
+ var SESSIONS = [
59
+ "SAILFORK_SESSION",
60
+ "AMP_CURRENT_THREAD_ID",
61
+ "CODEBUDDY_SESSION_ID",
62
+ "CLAUDE_CODE_SESSION_ID",
63
+ "CODEX_THREAD_ID",
64
+ "CLINE_TASK_ID",
65
+ "ROO_CODE_TASK_ID",
66
+ "COPILOT_AGENT_SESSION_ID",
67
+ "OZ_RUN_ID",
68
+ "TRAE_AI_SHELL_ID"
69
+ ];
70
+ var BRANDS = [
71
+ ["claudecode", "claude-code"],
72
+ ["claudecli", "claude-code"],
73
+ ["codebuddy", "codebuddy"],
74
+ ["cursor", "cursor"],
75
+ ["codex", "codex"],
76
+ ["qwen", "qwen-code"],
77
+ ["gemini", "gemini-cli"],
78
+ ["copilot", "github-copilot"],
79
+ ["windsurf", "windsurf"],
80
+ ["codeium", "windsurf"],
81
+ ["roocode", "roo-code"],
82
+ ["roocline", "roo-code"],
83
+ ["cline", "cline"],
84
+ ["opencode", "opencode"],
85
+ ["antigravity", "antigravity"],
86
+ ["augment", "augment"],
87
+ ["auggie", "augment"],
88
+ ["firebender", "firebender"],
89
+ ["openhands", "openhands"],
90
+ ["devin", "devin"],
91
+ ["claude", "claude"]
92
+ ];
93
+ var FIRST_WORDS = [
94
+ ["amp", "amp"],
95
+ ["ampcode", "amp"],
96
+ ["goose", "goose"],
97
+ ["crush", "crush"],
98
+ ["kiro", "kiro"],
99
+ ["aider", "aider"],
100
+ ["warp", "warp"],
101
+ ["zed", "zed"],
102
+ ["trae", "trae"],
103
+ ["grok", "grok"],
104
+ ["continue", "continue"],
105
+ ["replit", "replit"],
106
+ ["jules", "jules"],
107
+ ["vscode", "vscode"]
108
+ ];
109
+ function unversioned(raw) {
110
+ for (let i = 0;i < raw.length; i++) {
111
+ if (" /@-_".includes(raw.charAt(i))) {
112
+ const rest = raw.slice(i + 1);
113
+ const digits = rest.startsWith("v") ? rest.slice(1) : rest;
114
+ if (/^[0-9]/.test(digits))
115
+ return raw.slice(0, i).trimEnd();
116
+ }
117
+ }
118
+ return raw;
119
+ }
120
+ function knownAgent(raw) {
121
+ const name = unversioned(raw.trim());
122
+ const key = name.replace(/[^A-Za-z0-9]/g, "").toLowerCase();
123
+ const brand = BRANDS.find(([word]) => key.includes(word));
124
+ if (brand)
125
+ return brand[1];
126
+ if (key === "visualstudiocode")
127
+ return "vscode";
128
+ const first = (name.split(/[^A-Za-z0-9]/)[0] ?? "").toLowerCase();
129
+ return FIRST_WORDS.find(([word]) => word === first)?.[1];
130
+ }
131
+ function canonicalAgent(raw) {
132
+ const trimmed = raw.trim();
133
+ const lower = trimmed.toLowerCase();
134
+ if (["", "0", "none", "false", "off", "no", "null"].includes(lower))
135
+ return;
136
+ if (["1", "true", "yes", "on"].includes(lower))
137
+ return "agent";
138
+ const known = knownAgent(trimmed);
139
+ if (known)
140
+ return known;
141
+ let slug = "";
142
+ for (const c of unversioned(trimmed).toLowerCase()) {
143
+ if (/[a-z0-9._]/.test(c))
144
+ slug += c;
145
+ else if (slug !== "" && !slug.endsWith("-"))
146
+ slug += "-";
147
+ }
148
+ slug = slug.slice(0, 64).replace(/-+$/, "");
149
+ return slug === "" ? "agent" : slug;
150
+ }
151
+ function devinPresent() {
152
+ const fs = builtin("node:fs");
153
+ return fs?.existsSync?.("/opt/.devin") ?? false;
154
+ }
155
+ function detectAgent() {
156
+ const explicit = readEnv("SAILFORK_AGENT");
157
+ if (explicit !== undefined)
158
+ return canonicalAgent(explicit);
159
+ const set = (name) => {
160
+ const value = readEnv(name)?.trim();
161
+ return value === undefined || ["", "0", "false"].includes(value.toLowerCase()) ? undefined : value;
162
+ };
163
+ const marker = MARKERS.find(([name]) => set(name) !== undefined);
164
+ if (marker)
165
+ return marker[1];
166
+ if (set("CURSOR_EXTENSION_HOST_ROLE") === "agent-exec")
167
+ return "cursor";
168
+ if (set("OPENCODE") === "1")
169
+ return "opencode";
170
+ if (set("AWS_EXECUTION_ENV")?.includes("AmazonQ-For-CLI"))
171
+ return "amazon-q";
172
+ if (devinPresent())
173
+ return "devin";
174
+ const generic = set("AI_AGENT");
175
+ const fromGeneric = generic === undefined ? undefined : canonicalAgent(generic);
176
+ if (fromGeneric)
177
+ return fromGeneric;
178
+ const plain = set("AGENT");
179
+ return plain === undefined ? undefined : knownAgent(plain);
180
+ }
181
+ function detectSession() {
182
+ for (const name of SESSIONS) {
183
+ const raw = readEnv(name);
184
+ if (raw === undefined)
185
+ continue;
186
+ const id = raw.replace(/[^A-Za-z0-9\-_.:]/g, "").slice(0, 128);
187
+ if (id !== "")
188
+ return id;
189
+ }
190
+ return;
191
+ }
192
+
193
+ // src/core/errors.ts
194
+ var ERROR_CODES = [
195
+ "invalid_request",
196
+ "unauthenticated",
197
+ "invalid_token",
198
+ "insufficient_scope",
199
+ "forbidden",
200
+ "not_found",
201
+ "conflict",
202
+ "file_changed",
203
+ "idempotency_in_progress",
204
+ "precondition_failed",
205
+ "payload_too_large",
206
+ "unsupported_media_type",
207
+ "rate_limited",
208
+ "internal",
209
+ "unavailable",
210
+ "busy",
211
+ "agent_policy",
212
+ "agent_change_cap",
213
+ "held_declined",
214
+ "bypass_needs_person",
215
+ "suspended",
216
+ "blocked",
217
+ "private_fork_stays_private",
218
+ "private_forks_off",
219
+ "private_fork_outside_org",
220
+ "sso_deactivated",
221
+ "sso_invite",
222
+ "sso_name_taken",
223
+ "sso_account_linked",
224
+ "sso_expired",
225
+ "disabled",
226
+ "region_blocked"
227
+ ];
228
+
229
+ class SailforkError extends Error {
230
+ status;
231
+ code;
232
+ hint;
233
+ param;
234
+ requestId;
235
+ docUrl;
236
+ retryAfter;
237
+ body;
238
+ constructor(details) {
239
+ super(details.message);
240
+ this.name = new.target.name;
241
+ this.status = details.status;
242
+ this.code = details.code;
243
+ this.hint = details.hint;
244
+ this.param = details.param;
245
+ this.requestId = details.requestId;
246
+ this.docUrl = details.docUrl;
247
+ this.retryAfter = details.retryAfter;
248
+ this.body = details.body;
249
+ }
250
+ toString() {
251
+ const parts = [`${this.name}: ${this.code}: ${this.message}`];
252
+ if (this.hint)
253
+ parts.push(`hint: ${this.hint}`);
254
+ if (this.requestId)
255
+ parts.push(`request: ${this.requestId}`);
256
+ if (this.docUrl)
257
+ parts.push(`docs: ${this.docUrl}`);
258
+ return parts.join(" | ");
259
+ }
260
+ }
261
+
262
+ class ConnectionError extends SailforkError {
263
+ constructor(message, cause) {
264
+ super({ status: 0, code: "connection_failed", message });
265
+ if (cause !== undefined)
266
+ this.cause = cause;
267
+ }
268
+ }
269
+
270
+ class TimeoutError extends SailforkError {
271
+ constructor(ms) {
272
+ super({ status: 0, code: "timeout", message: `no answer within ${ms} ms` });
273
+ }
274
+ }
275
+
276
+ class InvalidRequestError extends SailforkError {
277
+ }
278
+
279
+ class AuthenticationError extends SailforkError {
280
+ }
281
+
282
+ class PermissionError extends SailforkError {
283
+ }
284
+
285
+ class AgentPolicyError extends SailforkError {
286
+ }
287
+
288
+ class NotFoundError extends SailforkError {
289
+ }
290
+
291
+ class ConflictError extends SailforkError {
292
+ }
293
+
294
+ class RateLimitError extends SailforkError {
295
+ }
296
+
297
+ class ServerError extends SailforkError {
298
+ }
299
+
300
+ class UnavailableForLegalReasonsError extends SailforkError {
301
+ }
302
+ var FAMILY = {
303
+ invalid_request: InvalidRequestError,
304
+ payload_too_large: InvalidRequestError,
305
+ unsupported_media_type: InvalidRequestError,
306
+ unauthenticated: AuthenticationError,
307
+ invalid_token: AuthenticationError,
308
+ insufficient_scope: PermissionError,
309
+ forbidden: PermissionError,
310
+ suspended: PermissionError,
311
+ blocked: PermissionError,
312
+ private_fork_stays_private: PermissionError,
313
+ private_forks_off: PermissionError,
314
+ private_fork_outside_org: PermissionError,
315
+ sso_deactivated: PermissionError,
316
+ sso_invite: PermissionError,
317
+ sso_name_taken: PermissionError,
318
+ sso_account_linked: PermissionError,
319
+ sso_expired: PermissionError,
320
+ agent_policy: AgentPolicyError,
321
+ agent_change_cap: AgentPolicyError,
322
+ held_declined: AgentPolicyError,
323
+ bypass_needs_person: AgentPolicyError,
324
+ not_found: NotFoundError,
325
+ conflict: ConflictError,
326
+ file_changed: ConflictError,
327
+ idempotency_in_progress: ConflictError,
328
+ precondition_failed: ConflictError,
329
+ rate_limited: RateLimitError,
330
+ internal: ServerError,
331
+ unavailable: ServerError,
332
+ busy: ServerError,
333
+ disabled: UnavailableForLegalReasonsError,
334
+ region_blocked: UnavailableForLegalReasonsError
335
+ };
336
+ function byStatus(status) {
337
+ if (status === 401)
338
+ return AuthenticationError;
339
+ if (status === 402)
340
+ return AgentPolicyError;
341
+ if (status === 403)
342
+ return PermissionError;
343
+ if (status === 404)
344
+ return NotFoundError;
345
+ if (status === 409 || status === 412)
346
+ return ConflictError;
347
+ if (status === 429)
348
+ return RateLimitError;
349
+ if (status === 451)
350
+ return UnavailableForLegalReasonsError;
351
+ if (status >= 500)
352
+ return ServerError;
353
+ return status >= 400 && status < 500 ? InvalidRequestError : SailforkError;
354
+ }
355
+ function text(value) {
356
+ return typeof value === "string" && value !== "" ? value : undefined;
357
+ }
358
+ function errorFromResponse(status, body, headers, retryAfter) {
359
+ const record = typeof body === "object" && body !== null ? body : {};
360
+ const code = text(record["code"]) ?? `http_${status}`;
361
+ const message = text(record["error"]) ?? text(record["message"]) ?? (typeof body === "string" && body !== "" ? body : undefined) ?? `the server answered ${status}`;
362
+ const family = Object.hasOwn(FAMILY, code) ? FAMILY[code] : byStatus(status);
363
+ return new family({
364
+ status,
365
+ code,
366
+ message,
367
+ hint: text(record["hint"]),
368
+ param: text(record["param"]),
369
+ requestId: text(record["requestId"]) ?? headers.get("sailfork-request-id") ?? undefined,
370
+ docUrl: text(record["docUrl"]),
371
+ retryAfter,
372
+ body
373
+ });
374
+ }
375
+
376
+ // src/core/sse.ts
377
+ function parseData(data) {
378
+ try {
379
+ return JSON.parse(data);
380
+ } catch {
381
+ return data;
382
+ }
383
+ }
384
+ async function* lines(body, signal) {
385
+ const reader = body.getReader();
386
+ const onAbort = () => void reader.cancel(signal?.reason).catch(() => {
387
+ return;
388
+ });
389
+ if (signal?.aborted)
390
+ onAbort();
391
+ signal?.addEventListener("abort", onAbort, { once: true });
392
+ const decoder = new TextDecoder;
393
+ let buffer = "";
394
+ try {
395
+ for (;; ) {
396
+ const { done, value } = await reader.read();
397
+ if (done)
398
+ break;
399
+ buffer += decoder.decode(value, { stream: true });
400
+ let at = buffer.search(/\r\n|\r|\n/);
401
+ while (at !== -1) {
402
+ const eol = buffer.startsWith(`\r
403
+ `, at) ? 2 : 1;
404
+ const next = buffer.slice(at + eol);
405
+ if (buffer.charAt(at) === "\r" && eol === 1 && next === "")
406
+ break;
407
+ yield buffer.slice(0, at);
408
+ buffer = next;
409
+ at = buffer.search(/\r\n|\r|\n/);
410
+ }
411
+ }
412
+ buffer += decoder.decode();
413
+ if (buffer !== "")
414
+ yield buffer.replace(/\r$/, "");
415
+ } finally {
416
+ signal?.removeEventListener("abort", onAbort);
417
+ await reader.cancel().catch(() => {
418
+ return;
419
+ });
420
+ }
421
+ }
422
+ async function* sseEvents(body, signal) {
423
+ let id;
424
+ let event = "";
425
+ let data = [];
426
+ for await (const line of lines(body, signal)) {
427
+ if (line === "") {
428
+ if (data.length > 0)
429
+ yield { id, event: event || "message", data: parseData(data.join(`
430
+ `)) };
431
+ event = "";
432
+ data = [];
433
+ continue;
434
+ }
435
+ if (line.startsWith(":"))
436
+ continue;
437
+ const colon = line.indexOf(":");
438
+ const field = colon === -1 ? line : line.slice(0, colon);
439
+ let value = colon === -1 ? "" : line.slice(colon + 1);
440
+ if (value.startsWith(" "))
441
+ value = value.slice(1);
442
+ if (field === "id" && !value.includes("\x00"))
443
+ id = value;
444
+ else if (field === "event")
445
+ event = value;
446
+ else if (field === "data")
447
+ data.push(value);
448
+ }
449
+ if (data.length > 0)
450
+ yield { id, event: event || "message", data: parseData(data.join(`
451
+ `)) };
452
+ }
453
+ async function* ndjsonLines(body, signal) {
454
+ for await (const line of lines(body, signal)) {
455
+ if (line.trim() !== "")
456
+ yield JSON.parse(line);
457
+ }
458
+ }
459
+
460
+ // src/core/token.ts
461
+ var DEFAULT_HOST = "https://sailfork.com";
462
+ function normalizeHost(input) {
463
+ const trimmed = input.trim().replace(/\/+$/, "");
464
+ const withScheme = trimmed.includes("://") ? trimmed : trimmed.startsWith("localhost") || trimmed.startsWith("127.0.0.1") ? `http://${trimmed}` : `https://${trimmed}`;
465
+ try {
466
+ const url = new URL(withScheme);
467
+ return url.protocol === "http:" || url.protocol === "https:" ? url.origin : undefined;
468
+ } catch {
469
+ return;
470
+ }
471
+ }
472
+ function envHost() {
473
+ for (const name of ["SAILFORK_HOST", "SAILFORK_URL"]) {
474
+ const value = readEnv(name);
475
+ const host = value === undefined ? undefined : normalizeHost(value);
476
+ if (host !== undefined)
477
+ return host;
478
+ }
479
+ return DEFAULT_HOST;
480
+ }
481
+ function cliToken(host) {
482
+ const child = builtin("node:child_process");
483
+ if (!child?.execFile)
484
+ return Promise.resolve(undefined);
485
+ return new Promise((resolve) => {
486
+ try {
487
+ child.execFile("sailfork", ["auth", "token", "--host", host], { timeout: 5000, encoding: "utf8" }, (error, stdout) => resolve(error ? undefined : stdout.trim() || undefined));
488
+ } catch {
489
+ resolve(undefined);
490
+ }
491
+ });
492
+ }
493
+ async function resolveToken(host, option) {
494
+ if (option !== undefined && option !== "")
495
+ return option;
496
+ const fromEnv = readEnv("SAILFORK_TOKEN");
497
+ if (fromEnv !== undefined && envHost().toLowerCase() === host.toLowerCase())
498
+ return fromEnv;
499
+ return cliToken(host);
500
+ }
501
+
502
+ // src/core/version.ts
503
+ var VERSION = "0.1.1";
504
+ var API_VERSION = "2026-12-01";
505
+
506
+ // src/core/client.ts
507
+ var MAX_RETRY_AFTER_S = 60;
508
+ var MAX_IN_PROGRESS_RETRIES = 10;
509
+ var TIMEOUT = Symbol("timeout");
510
+ function sleep(ms, signal) {
511
+ return new Promise((resolve, reject) => {
512
+ if (signal?.aborted)
513
+ return reject(signal.reason);
514
+ const timer = setTimeout(() => {
515
+ signal?.removeEventListener("abort", onAbort);
516
+ resolve();
517
+ }, ms);
518
+ const onAbort = () => {
519
+ clearTimeout(timer);
520
+ reject(signal?.reason);
521
+ };
522
+ signal?.addEventListener("abort", onAbort, { once: true });
523
+ });
524
+ }
525
+ function parseRetryAfter(value) {
526
+ if (value === null)
527
+ return;
528
+ const seconds = Number(value);
529
+ if (Number.isFinite(seconds) && seconds >= 0)
530
+ return seconds;
531
+ const at = Date.parse(value);
532
+ return Number.isNaN(at) ? undefined : Math.max(0, (at - Date.now()) / 1000);
533
+ }
534
+ function appendQuery(search, key, value) {
535
+ if (value === undefined || value === null)
536
+ return;
537
+ if (Array.isArray(value)) {
538
+ for (const item of value)
539
+ appendQuery(search, key, item);
540
+ } else if (value instanceof Date) {
541
+ search.append(key, value.toISOString());
542
+ } else if (typeof value === "object") {
543
+ search.append(key, JSON.stringify(value));
544
+ } else {
545
+ search.append(key, String(value));
546
+ }
547
+ }
548
+ async function readBody(response) {
549
+ if (response.status === 204 || response.status === 205)
550
+ return;
551
+ const text = await response.text();
552
+ if (text === "")
553
+ return;
554
+ const type = response.headers.get("content-type") ?? "";
555
+ if (!type.includes("json"))
556
+ return text;
557
+ try {
558
+ return JSON.parse(text);
559
+ } catch {
560
+ return text;
561
+ }
562
+ }
563
+ function record(value) {
564
+ return typeof value === "object" && value !== null ? value : {};
565
+ }
566
+ function toPage(body) {
567
+ if (Array.isArray(body))
568
+ return { items: body, nextCursor: null };
569
+ const fields = record(body);
570
+ const items = fields["items"] ?? fields["events"];
571
+ if (!Array.isArray(items)) {
572
+ throw new SailforkError({
573
+ status: 200,
574
+ code: "unexpected_response",
575
+ message: "a paginated operation answered without an `items` array",
576
+ body
577
+ });
578
+ }
579
+ const next = fields["nextCursor"];
580
+ const cursor = fields["cursor"];
581
+ const nextCursor = typeof next === "string" && next !== "" ? next : fields["more"] === true && typeof cursor === "string" ? cursor : null;
582
+ return { items, nextCursor };
583
+ }
584
+
585
+ class Core {
586
+ host;
587
+ #fetch;
588
+ #maxRetries;
589
+ #headers;
590
+ #tokenOption;
591
+ #token;
592
+ constructor(options = {}) {
593
+ const host = options.host === undefined ? envHost() : normalizeHost(options.host);
594
+ if (host === undefined) {
595
+ throw new TypeError(`host must be a site origin such as https://sailfork.com, not ${options.host}`);
596
+ }
597
+ this.host = host;
598
+ this.#fetch = options.fetch ?? ((input, init) => fetch(input, init));
599
+ this.#maxRetries = options.maxRetries ?? 2;
600
+ this.#tokenOption = options.token;
601
+ const agent = options.agent === undefined ? detectAgent() : options.agent || undefined;
602
+ const session = options.session ?? detectSession();
603
+ this.#headers = {
604
+ accept: "application/json",
605
+ "sailfork-version": API_VERSION,
606
+ "user-agent": `sailfork-ts/${VERSION}`,
607
+ ...agent === undefined ? {} : { "x-sailfork-agent": agent },
608
+ ...session === undefined || agent === undefined ? {} : { "x-sailfork-session": session },
609
+ ...Object.fromEntries(Object.entries(options.headers ?? {}).map(([name, value]) => [name.toLowerCase(), value]))
610
+ };
611
+ }
612
+ request(op, params, opts = {}) {
613
+ return this.#request(op, params, opts);
614
+ }
615
+ paginate(op, params, opts = {}) {
616
+ const paged = op.queryParams.includes("cursor") ? op : { ...op, queryParams: [...op.queryParams, "cursor"] };
617
+ const first = typeof params["cursor"] === "string" ? params["cursor"] : undefined;
618
+ const read = async (cursor) => {
619
+ const { body } = await this.#call(paged, cursor === undefined ? params : { ...params, cursor }, opts);
620
+ return toPage(body);
621
+ };
622
+ return {
623
+ page: () => read(first),
624
+ async* [Symbol.asyncIterator]() {
625
+ let cursor = first;
626
+ do {
627
+ const page = await read(cursor);
628
+ yield* page.items;
629
+ cursor = page.nextCursor ?? undefined;
630
+ } while (cursor !== undefined);
631
+ }
632
+ };
633
+ }
634
+ async* stream(op, params, opts = {}) {
635
+ let lastId;
636
+ let failures = 0;
637
+ const max = opts.maxRetries ?? this.#maxRetries;
638
+ for (;; ) {
639
+ try {
640
+ const headers = lastId === undefined ? opts.headers : { ...opts.headers, "last-event-id": lastId };
641
+ const { response } = await this.#call(op, params, { ...opts, ...headers === undefined ? {} : { headers } }, { accept: "text/event-stream", stream: true });
642
+ if (response.body === null)
643
+ throw new ConnectionError("the event stream had no body");
644
+ for await (const event of sseEvents(response.body, opts.signal)) {
645
+ failures = 0;
646
+ if (event.id !== undefined)
647
+ lastId = event.id;
648
+ yield event;
649
+ if (event.event === "end")
650
+ return;
651
+ }
652
+ if (opts.signal?.aborted)
653
+ throw opts.signal.reason;
654
+ } catch (error) {
655
+ if (opts.signal?.aborted || !(error instanceof ConnectionError))
656
+ throw error;
657
+ if (++failures > max)
658
+ throw error;
659
+ }
660
+ await sleep(this.#backoff(failures), opts.signal);
661
+ }
662
+ }
663
+ async* ndjson(op, params, opts = {}) {
664
+ const { response } = await this.#call(op, params, opts, {
665
+ accept: "application/x-ndjson",
666
+ stream: true
667
+ });
668
+ if (response.body === null)
669
+ throw new ConnectionError("the response had no body");
670
+ for await (const line of ndjsonLines(response.body, opts.signal))
671
+ yield line;
672
+ if (opts.signal?.aborted)
673
+ throw opts.signal.reason;
674
+ }
675
+ async#request(op, params, opts) {
676
+ const { response, body } = await this.#call(op, params, opts);
677
+ if (!op.held)
678
+ return body;
679
+ const fields = record(body);
680
+ if (response.status === 202 && typeof fields["held"] === "string") {
681
+ const held = {
682
+ status: "held",
683
+ held: fields["held"],
684
+ url: new URL(String(fields["url"] ?? "/requests"), this.host).href,
685
+ message: String(fields["message"] ?? "")
686
+ };
687
+ return held;
688
+ }
689
+ return { status: "done", value: body };
690
+ }
691
+ #resolveToken() {
692
+ this.#token ??= resolveToken(this.host, this.#tokenOption);
693
+ return this.#token;
694
+ }
695
+ async#prepare(op, params, opts, accept, key) {
696
+ const path = op.path.replace(/\{(\*?)([^}]+)\}/g, (_, wildcard, name) => {
697
+ const value = params[name];
698
+ if (value === undefined || value === null || value === "") {
699
+ throw new TypeError(`${op.id} needs the path parameter \`${name}\``);
700
+ }
701
+ const text = String(value);
702
+ return wildcard === "*" ? text.split("/").map(encodeURIComponent).join("/") : encodeURIComponent(text);
703
+ });
704
+ const search = new URLSearchParams;
705
+ for (const name of op.queryParams)
706
+ appendQuery(search, name, params[name]);
707
+ const query = search.toString();
708
+ const headers = { ...this.#headers };
709
+ if (accept !== undefined)
710
+ headers["accept"] = accept;
711
+ const token = await this.#resolveToken();
712
+ if (token !== undefined)
713
+ headers["authorization"] = `Bearer ${token}`;
714
+ if (key !== undefined)
715
+ headers["idempotency-key"] = key;
716
+ for (const [name, value] of Object.entries(opts.headers ?? {}))
717
+ headers[name.toLowerCase()] = value;
718
+ const init = { method: op.method, headers };
719
+ if (op.method !== "GET" && op.bodyParams.length > 0) {
720
+ const body = {};
721
+ for (const name of op.bodyParams) {
722
+ if (params[name] !== undefined)
723
+ body[name] = params[name];
724
+ }
725
+ init.body = JSON.stringify(body);
726
+ headers["content-type"] = "application/json";
727
+ }
728
+ return { url: `${this.host}${path}${query === "" ? "" : `?${query}`}`, init };
729
+ }
730
+ async#call(op, params, opts, mode = {}) {
731
+ const key = op.effect === "read" ? undefined : opts.idempotencyKey ?? globalThis.crypto.randomUUID();
732
+ const prepared = await this.#prepare(op, params, opts, mode.accept, key);
733
+ const retryable = op.retry === "safe" || op.retry === "idempotent";
734
+ const retries = !retryable ? 0 : opts.maxRetries ?? this.#maxRetries;
735
+ const timeout = opts.timeout ?? (op.long ? 300000 : 60000);
736
+ let attempt = 0;
737
+ let waiting = 0;
738
+ for (;; ) {
739
+ let failure;
740
+ try {
741
+ return await this.#once(prepared, timeout, opts.signal, mode.stream === true);
742
+ } catch (error) {
743
+ if (!(error instanceof SailforkError))
744
+ throw error;
745
+ failure = error;
746
+ }
747
+ const inProgress = failure.code === "idempotency_in_progress";
748
+ const budgeted = inProgress ? waiting < MAX_IN_PROGRESS_RETRIES : attempt < retries;
749
+ const wait = budgeted && retryable ? this.#retryDelay(failure, attempt) : undefined;
750
+ if (wait === undefined)
751
+ throw failure;
752
+ if (inProgress)
753
+ waiting++;
754
+ else
755
+ attempt++;
756
+ await sleep(wait, opts.signal);
757
+ }
758
+ }
759
+ async#once(prepared, timeout, signal, stream) {
760
+ const control = new AbortController;
761
+ const onAbort = () => control.abort(signal?.reason);
762
+ if (signal?.aborted)
763
+ throw signal.reason;
764
+ signal?.addEventListener("abort", onAbort, { once: true });
765
+ let timer = setTimeout(() => control.abort(TIMEOUT), timeout);
766
+ try {
767
+ let response;
768
+ try {
769
+ response = await this.#fetch(prepared.url, { ...prepared.init, signal: control.signal });
770
+ } catch (error) {
771
+ throw this.#transportError(error, control.signal, timeout);
772
+ }
773
+ if (stream && response.ok) {
774
+ clearTimeout(timer);
775
+ timer = undefined;
776
+ return { response, body: undefined };
777
+ }
778
+ let body;
779
+ try {
780
+ body = await readBody(response);
781
+ } catch (error) {
782
+ throw this.#transportError(error, control.signal, timeout);
783
+ }
784
+ if (!response.ok) {
785
+ throw errorFromResponse(response.status, body, response.headers, parseRetryAfter(response.headers.get("retry-after")));
786
+ }
787
+ return { response, body };
788
+ } finally {
789
+ if (timer !== undefined)
790
+ clearTimeout(timer);
791
+ signal?.removeEventListener("abort", onAbort);
792
+ }
793
+ }
794
+ #transportError(error, signal, timeout) {
795
+ if (signal.aborted) {
796
+ return signal.reason === TIMEOUT ? new TimeoutError(timeout) : signal.reason;
797
+ }
798
+ return new ConnectionError(error instanceof Error ? error.message : String(error), error);
799
+ }
800
+ #retryDelay(failure, attempt) {
801
+ const { status, code } = failure;
802
+ const retriable = status === 0 || status === 408 || status === 429 || status >= 500 || code === "idempotency_in_progress";
803
+ if (!retriable)
804
+ return;
805
+ if (failure.retryAfter !== undefined) {
806
+ if (failure.retryAfter > MAX_RETRY_AFTER_S)
807
+ return;
808
+ return failure.retryAfter * 1000 + Math.random() * 250;
809
+ }
810
+ return this.#backoff(attempt + 1);
811
+ }
812
+ #backoff(attempt) {
813
+ const base = Math.min(500 * 2 ** (attempt - 1), 8000);
814
+ return base * (0.5 + Math.random() / 2);
815
+ }
816
+ }
817
+
818
+ // src/core/waits.ts
819
+ var WAITS = {
820
+ id: "waits.wait",
821
+ method: "POST",
822
+ path: "/api/waits",
823
+ pathParams: [],
824
+ queryParams: [],
825
+ bodyParams: ["target", "until", "timeout", "waited", "baseline"],
826
+ effect: "read",
827
+ retry: "safe",
828
+ held: false,
829
+ long: true,
830
+ paginated: false
831
+ };
832
+ var WINDOW_S = 55;
833
+ async function wait(core, target, options = {}) {
834
+ const { until, within = 600, ...request } = options;
835
+ let waited = 0;
836
+ let baseline;
837
+ for (;; ) {
838
+ const window = Math.max(1, Math.min(WINDOW_S, within - waited));
839
+ const answer = await core.request(WAITS, { target, until, timeout: window, waited, baseline }, { ...request, timeout: request.timeout ?? (window + 15) * 1000 });
840
+ if (answer.state !== "pending" || waited + window >= within) {
841
+ return answer;
842
+ }
843
+ waited += window;
844
+ baseline = answer.baseline;
845
+ }
846
+ }
847
+
848
+ // src/generated/ops.ts
849
+ var ops = {
850
+ "caissons.affected": {
851
+ id: "caissons.affected",
852
+ method: "GET",
853
+ path: "/api/orgs/{org}/caissons/{id}/affected",
854
+ pathParams: ["org", "id"],
855
+ queryParams: [],
856
+ bodyParams: [],
857
+ effect: "read",
858
+ retry: "safe",
859
+ held: false,
860
+ long: false,
861
+ paginated: false
862
+ },
863
+ "caissons.ast_grep": {
864
+ id: "caissons.ast_grep",
865
+ method: "POST",
866
+ path: "/api/orgs/{org}/caissons/{id}/ast-grep",
867
+ pathParams: ["org", "id"],
868
+ queryParams: [],
869
+ bodyParams: ["pattern", "language", "path", "glob", "limit"],
870
+ effect: "read",
871
+ retry: "safe",
872
+ held: false,
873
+ long: false,
874
+ paginated: false
875
+ },
876
+ "caissons.ast_rewrite": {
877
+ id: "caissons.ast_rewrite",
878
+ method: "POST",
879
+ path: "/api/orgs/{org}/caissons/{id}/ast-grep/rewrite",
880
+ pathParams: ["org", "id"],
881
+ queryParams: [],
882
+ bodyParams: ["pattern", "rewrite", "language", "path", "glob", "apply"],
883
+ effect: "write",
884
+ retry: "none",
885
+ held: false,
886
+ long: false,
887
+ paginated: false
888
+ },
889
+ "caissons.bash": {
890
+ id: "caissons.bash",
891
+ method: "POST",
892
+ path: "/api/orgs/{org}/caissons/{id}/bash",
893
+ pathParams: ["org", "id"],
894
+ queryParams: [],
895
+ bodyParams: ["script", "saveOnFailure", "dryRun"],
896
+ effect: "write",
897
+ retry: "none",
898
+ held: false,
899
+ long: true,
900
+ paginated: false
901
+ },
902
+ "caissons.batch": {
903
+ id: "caissons.batch",
904
+ method: "POST",
905
+ path: "/api/orgs/{org}/caissons/{id}/batch",
906
+ pathParams: ["org", "id"],
907
+ queryParams: [],
908
+ bodyParams: ["changes", "dryRun"],
909
+ effect: "write",
910
+ retry: "idempotent",
911
+ held: false,
912
+ long: false,
913
+ paginated: false
914
+ },
915
+ "caissons.commit": {
916
+ id: "caissons.commit",
917
+ method: "POST",
918
+ path: "/api/orgs/{org}/caissons/{id}/commit",
919
+ pathParams: ["org", "id"],
920
+ queryParams: [],
921
+ bodyParams: ["message"],
922
+ effect: "write",
923
+ retry: "idempotent",
924
+ held: false,
925
+ long: false,
926
+ paginated: false
927
+ },
928
+ "caissons.diff": {
929
+ id: "caissons.diff",
930
+ method: "GET",
931
+ path: "/api/orgs/{org}/caissons/{id}/diff",
932
+ pathParams: ["org", "id"],
933
+ queryParams: [],
934
+ bodyParams: [],
935
+ effect: "read",
936
+ retry: "safe",
937
+ held: false,
938
+ long: false,
939
+ paginated: false
940
+ },
941
+ "caissons.fork": {
942
+ id: "caissons.fork",
943
+ method: "POST",
944
+ path: "/api/orgs/{org}/caissons/{id}/fork",
945
+ pathParams: ["org", "id"],
946
+ queryParams: [],
947
+ bodyParams: ["title"],
948
+ effect: "write",
949
+ retry: "idempotent",
950
+ held: false,
951
+ long: false,
952
+ paginated: false
953
+ },
954
+ "caissons.get": {
955
+ id: "caissons.get",
956
+ method: "GET",
957
+ path: "/api/orgs/{org}/caissons/{id}",
958
+ pathParams: ["org", "id"],
959
+ queryParams: [],
960
+ bodyParams: [],
961
+ effect: "read",
962
+ retry: "safe",
963
+ held: false,
964
+ long: false,
965
+ paginated: false
966
+ },
967
+ "caissons.glob": {
968
+ id: "caissons.glob",
969
+ method: "GET",
970
+ path: "/api/orgs/{org}/caissons/{id}/glob",
971
+ pathParams: ["org", "id"],
972
+ queryParams: ["pattern", "path", "limit"],
973
+ bodyParams: [],
974
+ effect: "read",
975
+ retry: "safe",
976
+ held: false,
977
+ long: false,
978
+ paginated: false
979
+ },
980
+ "caissons.grep": {
981
+ id: "caissons.grep",
982
+ method: "GET",
983
+ path: "/api/orgs/{org}/caissons/{id}/grep",
984
+ pathParams: ["org", "id"],
985
+ queryParams: ["pattern", "path", "glob", "ignoreCase", "literal", "full", "mode", "context", "before", "after", "limit"],
986
+ bodyParams: [],
987
+ effect: "read",
988
+ retry: "safe",
989
+ held: false,
990
+ long: false,
991
+ paginated: false
992
+ },
993
+ "caissons.list": {
994
+ id: "caissons.list",
995
+ method: "GET",
996
+ path: "/api/orgs/{org}/caissons",
997
+ pathParams: ["org"],
998
+ queryParams: ["repo", "state", "limit", "cursor", "brief", "full"],
999
+ bodyParams: [],
1000
+ effect: "read",
1001
+ retry: "safe",
1002
+ held: false,
1003
+ long: false,
1004
+ paginated: false
1005
+ },
1006
+ "caissons.locate": {
1007
+ id: "caissons.locate",
1008
+ method: "GET",
1009
+ path: "/api/caissons/{id}",
1010
+ pathParams: ["id"],
1011
+ queryParams: [],
1012
+ bodyParams: [],
1013
+ effect: "read",
1014
+ retry: "safe",
1015
+ held: false,
1016
+ long: false,
1017
+ paginated: false
1018
+ },
1019
+ "caissons.lsp": {
1020
+ id: "caissons.lsp",
1021
+ method: "POST",
1022
+ path: "/api/orgs/{org}/caissons/{id}/lsp",
1023
+ pathParams: ["org", "id"],
1024
+ queryParams: [],
1025
+ bodyParams: ["op", "path", "line", "column", "limit", "language", "setup", "vcpus", "memoryMb", "wait"],
1026
+ effect: "write",
1027
+ retry: "safe",
1028
+ held: false,
1029
+ long: false,
1030
+ paginated: false
1031
+ },
1032
+ "caissons.lsp_rename": {
1033
+ id: "caissons.lsp_rename",
1034
+ method: "POST",
1035
+ path: "/api/orgs/{org}/caissons/{id}/lsp/rename",
1036
+ pathParams: ["org", "id"],
1037
+ queryParams: [],
1038
+ bodyParams: ["path", "line", "column", "newName", "dryRun", "language", "setup", "vcpus", "memoryMb", "wait"],
1039
+ effect: "write",
1040
+ retry: "none",
1041
+ held: false,
1042
+ long: false,
1043
+ paginated: false
1044
+ },
1045
+ "caissons.lsp_stop": {
1046
+ id: "caissons.lsp_stop",
1047
+ method: "POST",
1048
+ path: "/api/orgs/{org}/caissons/{id}/lsp/stop",
1049
+ pathParams: ["org", "id"],
1050
+ queryParams: [],
1051
+ bodyParams: ["language"],
1052
+ effect: "delete",
1053
+ retry: "idempotent",
1054
+ held: false,
1055
+ long: false,
1056
+ paginated: false
1057
+ },
1058
+ "caissons.open": {
1059
+ id: "caissons.open",
1060
+ method: "POST",
1061
+ path: "/api/orgs/{org}/caissons",
1062
+ pathParams: ["org"],
1063
+ queryParams: [],
1064
+ bodyParams: ["repo", "title", "scope", "branch", "base", "carryEdits", "widenScope"],
1065
+ effect: "write",
1066
+ retry: "idempotent",
1067
+ held: false,
1068
+ long: false,
1069
+ paginated: false
1070
+ },
1071
+ "caissons.patch": {
1072
+ id: "caissons.patch",
1073
+ method: "POST",
1074
+ path: "/api/orgs/{org}/caissons/{id}/patch",
1075
+ pathParams: ["org", "id"],
1076
+ queryParams: [],
1077
+ bodyParams: ["diff", "dryRun"],
1078
+ effect: "write",
1079
+ retry: "idempotent",
1080
+ held: false,
1081
+ long: false,
1082
+ paginated: false
1083
+ },
1084
+ "caissons.policy": {
1085
+ id: "caissons.policy",
1086
+ method: "GET",
1087
+ path: "/api/orgs/{org}/caissons/policy",
1088
+ pathParams: ["org"],
1089
+ queryParams: [],
1090
+ bodyParams: [],
1091
+ effect: "read",
1092
+ retry: "safe",
1093
+ held: false,
1094
+ long: false,
1095
+ paginated: false
1096
+ },
1097
+ "caissons.pull": {
1098
+ id: "caissons.pull",
1099
+ method: "POST",
1100
+ path: "/api/orgs/{org}/caissons/{id}/pull",
1101
+ pathParams: ["org", "id"],
1102
+ queryParams: [],
1103
+ bodyParams: ["title", "body", "stopForks"],
1104
+ effect: "write",
1105
+ retry: "idempotent",
1106
+ held: false,
1107
+ long: false,
1108
+ paginated: false
1109
+ },
1110
+ "caissons.read": {
1111
+ id: "caissons.read",
1112
+ method: "POST",
1113
+ path: "/api/orgs/{org}/caissons/{id}/read",
1114
+ pathParams: ["org", "id"],
1115
+ queryParams: [],
1116
+ bodyParams: ["paths", "lines", "head", "tail", "numbered"],
1117
+ effect: "read",
1118
+ retry: "safe",
1119
+ held: false,
1120
+ long: false,
1121
+ paginated: false
1122
+ },
1123
+ "caissons.review": {
1124
+ id: "caissons.review",
1125
+ method: "GET",
1126
+ path: "/api/orgs/{org}/caissons/{id}/review",
1127
+ pathParams: ["org", "id"],
1128
+ queryParams: ["full"],
1129
+ bodyParams: [],
1130
+ effect: "read",
1131
+ retry: "safe",
1132
+ held: false,
1133
+ long: false,
1134
+ paginated: false
1135
+ },
1136
+ "caissons.review_resolve": {
1137
+ id: "caissons.review_resolve",
1138
+ method: "POST",
1139
+ path: "/api/orgs/{org}/caissons/{id}/review/resolve",
1140
+ pathParams: ["org", "id"],
1141
+ queryParams: [],
1142
+ bodyParams: ["finding", "note"],
1143
+ effect: "write",
1144
+ retry: "none",
1145
+ held: false,
1146
+ long: false,
1147
+ paginated: false
1148
+ },
1149
+ "caissons.review_status": {
1150
+ id: "caissons.review_status",
1151
+ method: "GET",
1152
+ path: "/api/orgs/{org}/caissons/{id}/review/status",
1153
+ pathParams: ["org", "id"],
1154
+ queryParams: [],
1155
+ bodyParams: [],
1156
+ effect: "read",
1157
+ retry: "safe",
1158
+ held: false,
1159
+ long: false,
1160
+ paginated: false
1161
+ },
1162
+ "caissons.review_submit": {
1163
+ id: "caissons.review_submit",
1164
+ method: "POST",
1165
+ path: "/api/orgs/{org}/caissons/{id}/review",
1166
+ pathParams: ["org", "id"],
1167
+ queryParams: [],
1168
+ bodyParams: ["head", "verdict", "summary", "findings"],
1169
+ effect: "write",
1170
+ retry: "none",
1171
+ held: false,
1172
+ long: false,
1173
+ paginated: false
1174
+ },
1175
+ "caissons.ship": {
1176
+ id: "caissons.ship",
1177
+ method: "POST",
1178
+ path: "/api/orgs/{org}/caissons/{id}/ship",
1179
+ pathParams: ["org", "id"],
1180
+ queryParams: [],
1181
+ bodyParams: ["message", "title", "body", "closes", "refs", "stopForks"],
1182
+ effect: "write",
1183
+ retry: "idempotent",
1184
+ held: false,
1185
+ long: true,
1186
+ paginated: false
1187
+ },
1188
+ "caissons.stop": {
1189
+ id: "caissons.stop",
1190
+ method: "POST",
1191
+ path: "/api/orgs/{org}/caissons/{id}/stop",
1192
+ pathParams: ["org", "id"],
1193
+ queryParams: [],
1194
+ bodyParams: ["reason", "deleteBranch"],
1195
+ effect: "delete",
1196
+ retry: "none",
1197
+ held: false,
1198
+ long: false,
1199
+ paginated: false
1200
+ },
1201
+ "caissons.symbol_refs": {
1202
+ id: "caissons.symbol_refs",
1203
+ method: "GET",
1204
+ path: "/api/orgs/{org}/caissons/{id}/symbols/refs",
1205
+ pathParams: ["org", "id"],
1206
+ queryParams: ["name", "path", "ref", "limit"],
1207
+ bodyParams: [],
1208
+ effect: "read",
1209
+ retry: "safe",
1210
+ held: false,
1211
+ long: false,
1212
+ paginated: false
1213
+ },
1214
+ "caissons.symbols": {
1215
+ id: "caissons.symbols",
1216
+ method: "GET",
1217
+ path: "/api/orgs/{org}/caissons/{id}/symbols",
1218
+ pathParams: ["org", "id"],
1219
+ queryParams: ["q", "kind", "path", "ref", "limit"],
1220
+ bodyParams: [],
1221
+ effect: "read",
1222
+ retry: "safe",
1223
+ held: false,
1224
+ long: false,
1225
+ paginated: false
1226
+ },
1227
+ "caissons.test": {
1228
+ id: "caissons.test",
1229
+ method: "POST",
1230
+ path: "/api/orgs/{org}/caissons/{id}/test",
1231
+ pathParams: ["org", "id"],
1232
+ queryParams: [],
1233
+ bodyParams: ["command", "argv", "image", "minutes", "vcpus", "memoryMb", "host", "env", "waitSeconds", "timeoutSeconds", "freshWorkspace", "token"],
1234
+ effect: "write",
1235
+ retry: "idempotent",
1236
+ held: false,
1237
+ long: true,
1238
+ paginated: false
1239
+ },
1240
+ "check_runs.create": {
1241
+ id: "check_runs.create",
1242
+ method: "POST",
1243
+ path: "/api/repos/{owner}/{repo}/check-runs",
1244
+ pathParams: ["owner", "repo"],
1245
+ queryParams: [],
1246
+ bodyParams: ["name", "headSha", "status", "conclusion", "startedAt", "completedAt", "detailsUrl", "externalId", "output", "annotations", "actions"],
1247
+ effect: "write",
1248
+ retry: "idempotent",
1249
+ held: false,
1250
+ long: false,
1251
+ paginated: false
1252
+ },
1253
+ "check_runs.get": {
1254
+ id: "check_runs.get",
1255
+ method: "GET",
1256
+ path: "/api/repos/{owner}/{repo}/check-runs/{id}",
1257
+ pathParams: ["owner", "repo", "id"],
1258
+ queryParams: [],
1259
+ bodyParams: [],
1260
+ effect: "read",
1261
+ retry: "safe",
1262
+ held: false,
1263
+ long: false,
1264
+ paginated: false
1265
+ },
1266
+ "check_runs.list": {
1267
+ id: "check_runs.list",
1268
+ method: "GET",
1269
+ path: "/api/repos/{owner}/{repo}/commits/{sha}/check-runs",
1270
+ pathParams: ["owner", "repo", "sha"],
1271
+ queryParams: ["filter"],
1272
+ bodyParams: [],
1273
+ effect: "read",
1274
+ retry: "safe",
1275
+ held: false,
1276
+ long: false,
1277
+ paginated: false
1278
+ },
1279
+ "check_runs.update": {
1280
+ id: "check_runs.update",
1281
+ method: "PATCH",
1282
+ path: "/api/repos/{owner}/{repo}/check-runs/{id}",
1283
+ pathParams: ["owner", "repo", "id"],
1284
+ queryParams: [],
1285
+ bodyParams: ["name", "status", "conclusion", "startedAt", "completedAt", "detailsUrl", "externalId", "output", "annotations", "actions"],
1286
+ effect: "write",
1287
+ retry: "idempotent",
1288
+ held: false,
1289
+ long: false,
1290
+ paginated: false
1291
+ },
1292
+ "ci.approve_pull": {
1293
+ id: "ci.approve_pull",
1294
+ method: "POST",
1295
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/ci/approve",
1296
+ pathParams: ["owner", "repo", "number"],
1297
+ queryParams: [],
1298
+ bodyParams: ["sha"],
1299
+ effect: "write",
1300
+ retry: "idempotent",
1301
+ held: false,
1302
+ long: false,
1303
+ paginated: false
1304
+ },
1305
+ "ci.artifacts": {
1306
+ id: "ci.artifacts",
1307
+ method: "GET",
1308
+ path: "/api/repos/{owner}/{repo}/runs/{id}/artifacts",
1309
+ pathParams: ["owner", "repo", "id"],
1310
+ queryParams: [],
1311
+ bodyParams: [],
1312
+ effect: "read",
1313
+ retry: "safe",
1314
+ held: false,
1315
+ long: false,
1316
+ paginated: false
1317
+ },
1318
+ "ci.cancel": {
1319
+ id: "ci.cancel",
1320
+ method: "POST",
1321
+ path: "/api/repos/{owner}/{repo}/runs/{id}/cancel",
1322
+ pathParams: ["owner", "repo", "id"],
1323
+ queryParams: [],
1324
+ bodyParams: [],
1325
+ effect: "write",
1326
+ retry: "idempotent",
1327
+ held: false,
1328
+ long: false,
1329
+ paginated: false
1330
+ },
1331
+ "ci.dispatch": {
1332
+ id: "ci.dispatch",
1333
+ method: "POST",
1334
+ path: "/api/repos/{owner}/{repo}/ci/workflows/{file}/dispatches",
1335
+ pathParams: ["owner", "repo", "file"],
1336
+ queryParams: [],
1337
+ bodyParams: ["ref", "inputs"],
1338
+ effect: "write",
1339
+ retry: "idempotent",
1340
+ held: false,
1341
+ long: false,
1342
+ paginated: false
1343
+ },
1344
+ "ci.failures": {
1345
+ id: "ci.failures",
1346
+ method: "GET",
1347
+ path: "/api/repos/{owner}/{repo}/runs/{id}/failures",
1348
+ pathParams: ["owner", "repo", "id"],
1349
+ queryParams: ["lines"],
1350
+ bodyParams: [],
1351
+ effect: "read",
1352
+ retry: "safe",
1353
+ held: false,
1354
+ long: false,
1355
+ paginated: false
1356
+ },
1357
+ "ci.logs": {
1358
+ id: "ci.logs",
1359
+ method: "GET",
1360
+ path: "/api/repos/{owner}/{repo}/runs/{id}/logs",
1361
+ pathParams: ["owner", "repo", "id"],
1362
+ queryParams: ["job"],
1363
+ bodyParams: [],
1364
+ effect: "read",
1365
+ retry: "safe",
1366
+ held: false,
1367
+ long: false,
1368
+ paginated: false
1369
+ },
1370
+ "ci.rerun": {
1371
+ id: "ci.rerun",
1372
+ method: "POST",
1373
+ path: "/api/repos/{owner}/{repo}/runs/{id}/rerun",
1374
+ pathParams: ["owner", "repo", "id"],
1375
+ queryParams: [],
1376
+ bodyParams: ["failedOnly", "jobs"],
1377
+ effect: "write",
1378
+ retry: "idempotent",
1379
+ held: false,
1380
+ long: false,
1381
+ paginated: false
1382
+ },
1383
+ "ci.run": {
1384
+ id: "ci.run",
1385
+ method: "GET",
1386
+ path: "/api/repos/{owner}/{repo}/runs/{id}",
1387
+ pathParams: ["owner", "repo", "id"],
1388
+ queryParams: ["logs"],
1389
+ bodyParams: [],
1390
+ effect: "read",
1391
+ retry: "safe",
1392
+ held: false,
1393
+ long: false,
1394
+ paginated: false
1395
+ },
1396
+ "ci.runs": {
1397
+ id: "ci.runs",
1398
+ method: "GET",
1399
+ path: "/api/repos/{owner}/{repo}/runs",
1400
+ pathParams: ["owner", "repo"],
1401
+ queryParams: ["view"],
1402
+ bodyParams: [],
1403
+ effect: "read",
1404
+ retry: "safe",
1405
+ held: false,
1406
+ long: false,
1407
+ paginated: false
1408
+ },
1409
+ "ci.step_log": {
1410
+ id: "ci.step_log",
1411
+ method: "GET",
1412
+ path: "/api/repos/{owner}/{repo}/runs/{id}/jobs/{job}/steps/{n}/log",
1413
+ pathParams: ["owner", "repo", "id", "job", "n"],
1414
+ queryParams: ["after"],
1415
+ bodyParams: [],
1416
+ effect: "read",
1417
+ retry: "safe",
1418
+ held: false,
1419
+ long: false,
1420
+ paginated: false
1421
+ },
1422
+ "event_subscriptions.advance": {
1423
+ id: "event_subscriptions.advance",
1424
+ method: "POST",
1425
+ path: "/api/event-subscriptions/{name}/cursor",
1426
+ pathParams: ["name"],
1427
+ queryParams: [],
1428
+ bodyParams: ["cursor"],
1429
+ effect: "write",
1430
+ retry: "idempotent",
1431
+ held: false,
1432
+ long: false,
1433
+ paginated: false
1434
+ },
1435
+ "event_subscriptions.create": {
1436
+ id: "event_subscriptions.create",
1437
+ method: "POST",
1438
+ path: "/api/event-subscriptions",
1439
+ pathParams: [],
1440
+ queryParams: [],
1441
+ bodyParams: ["name", "repo", "org", "types", "number", "pull"],
1442
+ effect: "write",
1443
+ retry: "none",
1444
+ held: false,
1445
+ long: false,
1446
+ paginated: false
1447
+ },
1448
+ "event_subscriptions.delete": {
1449
+ id: "event_subscriptions.delete",
1450
+ method: "DELETE",
1451
+ path: "/api/event-subscriptions/{name}",
1452
+ pathParams: ["name"],
1453
+ queryParams: [],
1454
+ bodyParams: [],
1455
+ effect: "delete",
1456
+ retry: "idempotent",
1457
+ held: false,
1458
+ long: false,
1459
+ paginated: false
1460
+ },
1461
+ "event_subscriptions.get": {
1462
+ id: "event_subscriptions.get",
1463
+ method: "GET",
1464
+ path: "/api/event-subscriptions/{name}",
1465
+ pathParams: ["name"],
1466
+ queryParams: [],
1467
+ bodyParams: [],
1468
+ effect: "read",
1469
+ retry: "safe",
1470
+ held: false,
1471
+ long: false,
1472
+ paginated: false
1473
+ },
1474
+ "event_subscriptions.list": {
1475
+ id: "event_subscriptions.list",
1476
+ method: "GET",
1477
+ path: "/api/event-subscriptions",
1478
+ pathParams: [],
1479
+ queryParams: [],
1480
+ bodyParams: [],
1481
+ effect: "read",
1482
+ retry: "safe",
1483
+ held: false,
1484
+ long: false,
1485
+ paginated: false
1486
+ },
1487
+ "events.list": {
1488
+ id: "events.list",
1489
+ method: "GET",
1490
+ path: "/api/events",
1491
+ pathParams: [],
1492
+ queryParams: ["repo", "org", "types", "after", "since", "limit", "number"],
1493
+ bodyParams: [],
1494
+ effect: "read",
1495
+ retry: "safe",
1496
+ held: false,
1497
+ long: false,
1498
+ paginated: false
1499
+ },
1500
+ "github.install_url": {
1501
+ id: "github.install_url",
1502
+ method: "GET",
1503
+ path: "/api/github/install-url",
1504
+ pathParams: [],
1505
+ queryParams: [],
1506
+ bodyParams: [],
1507
+ effect: "read",
1508
+ retry: "safe",
1509
+ held: false,
1510
+ long: false,
1511
+ paginated: false
1512
+ },
1513
+ "github.installation_repos": {
1514
+ id: "github.installation_repos",
1515
+ method: "GET",
1516
+ path: "/api/github/installations/{id}/repos",
1517
+ pathParams: ["id"],
1518
+ queryParams: [],
1519
+ bodyParams: [],
1520
+ effect: "read",
1521
+ retry: "safe",
1522
+ held: false,
1523
+ long: false,
1524
+ paginated: false
1525
+ },
1526
+ "github.installations": {
1527
+ id: "github.installations",
1528
+ method: "GET",
1529
+ path: "/api/github/installations",
1530
+ pathParams: [],
1531
+ queryParams: [],
1532
+ bodyParams: [],
1533
+ effect: "read",
1534
+ retry: "safe",
1535
+ held: false,
1536
+ long: false,
1537
+ paginated: false
1538
+ },
1539
+ "held.get": {
1540
+ id: "held.get",
1541
+ method: "GET",
1542
+ path: "/api/held/{id}",
1543
+ pathParams: ["id"],
1544
+ queryParams: [],
1545
+ bodyParams: [],
1546
+ effect: "read",
1547
+ retry: "safe",
1548
+ held: false,
1549
+ long: false,
1550
+ paginated: false
1551
+ },
1552
+ "held.mine": {
1553
+ id: "held.mine",
1554
+ method: "GET",
1555
+ path: "/api/me/held",
1556
+ pathParams: [],
1557
+ queryParams: [],
1558
+ bodyParams: [],
1559
+ effect: "read",
1560
+ retry: "safe",
1561
+ held: false,
1562
+ long: false,
1563
+ paginated: false
1564
+ },
1565
+ "held.org": {
1566
+ id: "held.org",
1567
+ method: "GET",
1568
+ path: "/api/orgs/{org}/held",
1569
+ pathParams: ["org"],
1570
+ queryParams: [],
1571
+ bodyParams: [],
1572
+ effect: "read",
1573
+ retry: "safe",
1574
+ held: false,
1575
+ long: false,
1576
+ paginated: false
1577
+ },
1578
+ "inbox.list": {
1579
+ id: "inbox.list",
1580
+ method: "GET",
1581
+ path: "/api/me/notifications",
1582
+ pathParams: [],
1583
+ queryParams: ["tab", "owner", "items"],
1584
+ bodyParams: [],
1585
+ effect: "read",
1586
+ retry: "safe",
1587
+ held: false,
1588
+ long: false,
1589
+ paginated: false
1590
+ },
1591
+ "inbox.read": {
1592
+ id: "inbox.read",
1593
+ method: "POST",
1594
+ path: "/api/me/notifications/read",
1595
+ pathParams: [],
1596
+ queryParams: [],
1597
+ bodyParams: ["ids", "tab", "owner"],
1598
+ effect: "write",
1599
+ retry: "idempotent",
1600
+ held: false,
1601
+ long: false,
1602
+ paginated: false
1603
+ },
1604
+ "issues.claim": {
1605
+ id: "issues.claim",
1606
+ method: "POST",
1607
+ path: "/api/repos/{owner}/{repo}/issues/{number}/claim",
1608
+ pathParams: ["owner", "repo", "number"],
1609
+ queryParams: [],
1610
+ bodyParams: ["minutes"],
1611
+ effect: "write",
1612
+ retry: "idempotent",
1613
+ held: false,
1614
+ long: false,
1615
+ paginated: false
1616
+ },
1617
+ "issues.close": {
1618
+ id: "issues.close",
1619
+ method: "POST",
1620
+ path: "/api/repos/{owner}/{repo}/issues/{number}/close",
1621
+ pathParams: ["owner", "repo", "number"],
1622
+ queryParams: [],
1623
+ bodyParams: ["reason", "duplicateOf", "comment"],
1624
+ effect: "delete",
1625
+ retry: "idempotent",
1626
+ held: false,
1627
+ long: false,
1628
+ paginated: false
1629
+ },
1630
+ "issues.comment": {
1631
+ id: "issues.comment",
1632
+ method: "POST",
1633
+ path: "/api/repos/{owner}/{repo}/issues/{number}/comments",
1634
+ pathParams: ["owner", "repo", "number"],
1635
+ queryParams: [],
1636
+ bodyParams: ["body", "update"],
1637
+ effect: "write",
1638
+ retry: "idempotent",
1639
+ held: false,
1640
+ long: false,
1641
+ paginated: false
1642
+ },
1643
+ "issues.comment_delete": {
1644
+ id: "issues.comment_delete",
1645
+ method: "DELETE",
1646
+ path: "/api/repos/{owner}/{repo}/issues/{number}/comments/{id}",
1647
+ pathParams: ["owner", "repo", "number", "id"],
1648
+ queryParams: [],
1649
+ bodyParams: [],
1650
+ effect: "delete",
1651
+ retry: "none",
1652
+ held: false,
1653
+ long: false,
1654
+ paginated: false
1655
+ },
1656
+ "issues.comment_edit": {
1657
+ id: "issues.comment_edit",
1658
+ method: "PATCH",
1659
+ path: "/api/repos/{owner}/{repo}/issues/{number}/comments/{id}",
1660
+ pathParams: ["owner", "repo", "number", "id"],
1661
+ queryParams: [],
1662
+ bodyParams: ["body"],
1663
+ effect: "write",
1664
+ retry: "idempotent",
1665
+ held: false,
1666
+ long: false,
1667
+ paginated: false
1668
+ },
1669
+ "issues.comment_react": {
1670
+ id: "issues.comment_react",
1671
+ method: "PUT",
1672
+ path: "/api/repos/{owner}/{repo}/issues/{number}/comments/{id}/reactions/{reaction}",
1673
+ pathParams: ["owner", "repo", "number", "id", "reaction"],
1674
+ queryParams: [],
1675
+ bodyParams: [],
1676
+ effect: "write",
1677
+ retry: "idempotent",
1678
+ held: false,
1679
+ long: false,
1680
+ paginated: false
1681
+ },
1682
+ "issues.comment_unreact": {
1683
+ id: "issues.comment_unreact",
1684
+ method: "DELETE",
1685
+ path: "/api/repos/{owner}/{repo}/issues/{number}/comments/{id}/reactions/{reaction}",
1686
+ pathParams: ["owner", "repo", "number", "id", "reaction"],
1687
+ queryParams: [],
1688
+ bodyParams: [],
1689
+ effect: "write",
1690
+ retry: "idempotent",
1691
+ held: false,
1692
+ long: false,
1693
+ paginated: false
1694
+ },
1695
+ "issues.context": {
1696
+ id: "issues.context",
1697
+ method: "PUT",
1698
+ path: "/api/repos/{owner}/{repo}/issues/{number}/context",
1699
+ pathParams: ["owner", "repo", "number"],
1700
+ queryParams: [],
1701
+ bodyParams: ["state", "decisions", "tried", "verified", "files", "next", "questions", "branch", "visibility", "clear"],
1702
+ effect: "write",
1703
+ retry: "idempotent",
1704
+ held: false,
1705
+ long: false,
1706
+ paginated: false
1707
+ },
1708
+ "issues.create": {
1709
+ id: "issues.create",
1710
+ method: "POST",
1711
+ path: "/api/repos/{owner}/{repo}/issues",
1712
+ pathParams: ["owner", "repo"],
1713
+ queryParams: [],
1714
+ bodyParams: ["title", "labels", "body", "priority", "estimate", "due", "milestone", "parent", "blockedBy", "assignee", "assignees", "stage", "status"],
1715
+ effect: "write",
1716
+ retry: "idempotent",
1717
+ held: false,
1718
+ long: false,
1719
+ paginated: false
1720
+ },
1721
+ "issues.create_batch": {
1722
+ id: "issues.create_batch",
1723
+ method: "POST",
1724
+ path: "/api/repos/{owner}/{repo}/issues/batch",
1725
+ pathParams: ["owner", "repo"],
1726
+ queryParams: [],
1727
+ bodyParams: ["items", "parent", "milestone", "labels"],
1728
+ effect: "write",
1729
+ retry: "idempotent",
1730
+ held: false,
1731
+ long: false,
1732
+ paginated: false
1733
+ },
1734
+ "issues.get": {
1735
+ id: "issues.get",
1736
+ method: "GET",
1737
+ path: "/api/repos/{owner}/{repo}/issues/{number}",
1738
+ pathParams: ["owner", "repo", "number"],
1739
+ queryParams: [],
1740
+ bodyParams: [],
1741
+ effect: "read",
1742
+ retry: "safe",
1743
+ held: false,
1744
+ long: false,
1745
+ paginated: false
1746
+ },
1747
+ "issues.list": {
1748
+ id: "issues.list",
1749
+ method: "GET",
1750
+ path: "/api/repos/{owner}/{repo}/issues",
1751
+ pathParams: ["owner", "repo"],
1752
+ queryParams: ["state", "stage", "status", "label", "assignee", "author", "mentions", "priority", "milestone", "parent", "q", "sort", "cursor", "limit"],
1753
+ bodyParams: [],
1754
+ effect: "read",
1755
+ retry: "safe",
1756
+ held: false,
1757
+ long: false,
1758
+ paginated: false
1759
+ },
1760
+ "issues.mine": {
1761
+ id: "issues.mine",
1762
+ method: "GET",
1763
+ path: "/api/me/issues",
1764
+ pathParams: [],
1765
+ queryParams: ["q", "limit"],
1766
+ bodyParams: [],
1767
+ effect: "read",
1768
+ retry: "safe",
1769
+ held: false,
1770
+ long: false,
1771
+ paginated: false
1772
+ },
1773
+ "issues.next": {
1774
+ id: "issues.next",
1775
+ method: "GET",
1776
+ path: "/api/repos/{owner}/{repo}/issues/next",
1777
+ pathParams: ["owner", "repo"],
1778
+ queryParams: ["stage", "status", "label", "milestone", "claim", "minutes"],
1779
+ bodyParams: [],
1780
+ effect: "write",
1781
+ retry: "none",
1782
+ held: false,
1783
+ long: false,
1784
+ paginated: false
1785
+ },
1786
+ "issues.react": {
1787
+ id: "issues.react",
1788
+ method: "PUT",
1789
+ path: "/api/repos/{owner}/{repo}/issues/{number}/reactions/{reaction}",
1790
+ pathParams: ["owner", "repo", "number", "reaction"],
1791
+ queryParams: [],
1792
+ bodyParams: [],
1793
+ effect: "write",
1794
+ retry: "idempotent",
1795
+ held: false,
1796
+ long: false,
1797
+ paginated: false
1798
+ },
1799
+ "issues.related": {
1800
+ id: "issues.related",
1801
+ method: "GET",
1802
+ path: "/api/repos/{owner}/{repo}/issues/related",
1803
+ pathParams: ["owner", "repo"],
1804
+ queryParams: ["paths", "query", "limit"],
1805
+ bodyParams: [],
1806
+ effect: "read",
1807
+ retry: "safe",
1808
+ held: false,
1809
+ long: false,
1810
+ paginated: false
1811
+ },
1812
+ "issues.release": {
1813
+ id: "issues.release",
1814
+ method: "POST",
1815
+ path: "/api/repos/{owner}/{repo}/issues/{number}/release",
1816
+ pathParams: ["owner", "repo", "number"],
1817
+ queryParams: [],
1818
+ bodyParams: ["note"],
1819
+ effect: "write",
1820
+ retry: "idempotent",
1821
+ held: false,
1822
+ long: false,
1823
+ paginated: false
1824
+ },
1825
+ "issues.similar": {
1826
+ id: "issues.similar",
1827
+ method: "GET",
1828
+ path: "/api/repos/{owner}/{repo}/issues/similar",
1829
+ pathParams: ["owner", "repo"],
1830
+ queryParams: ["title"],
1831
+ bodyParams: [],
1832
+ effect: "read",
1833
+ retry: "safe",
1834
+ held: false,
1835
+ long: false,
1836
+ paginated: false
1837
+ },
1838
+ "issues.start": {
1839
+ id: "issues.start",
1840
+ method: "POST",
1841
+ path: "/api/repos/{owner}/{repo}/issues/{number}/start",
1842
+ pathParams: ["owner", "repo", "number"],
1843
+ queryParams: [],
1844
+ bodyParams: ["minutes"],
1845
+ effect: "write",
1846
+ retry: "idempotent",
1847
+ held: false,
1848
+ long: true,
1849
+ paginated: false
1850
+ },
1851
+ "issues.subscribe": {
1852
+ id: "issues.subscribe",
1853
+ method: "POST",
1854
+ path: "/api/repos/{owner}/{repo}/issues/{number}/subscribe",
1855
+ pathParams: ["owner", "repo", "number"],
1856
+ queryParams: [],
1857
+ bodyParams: ["subscribed"],
1858
+ effect: "write",
1859
+ retry: "idempotent",
1860
+ held: false,
1861
+ long: false,
1862
+ paginated: false
1863
+ },
1864
+ "issues.unreact": {
1865
+ id: "issues.unreact",
1866
+ method: "DELETE",
1867
+ path: "/api/repos/{owner}/{repo}/issues/{number}/reactions/{reaction}",
1868
+ pathParams: ["owner", "repo", "number", "reaction"],
1869
+ queryParams: [],
1870
+ bodyParams: [],
1871
+ effect: "write",
1872
+ retry: "idempotent",
1873
+ held: false,
1874
+ long: false,
1875
+ paginated: false
1876
+ },
1877
+ "issues.update": {
1878
+ id: "issues.update",
1879
+ method: "PATCH",
1880
+ path: "/api/repos/{owner}/{repo}/issues/{number}",
1881
+ pathParams: ["owner", "repo", "number"],
1882
+ queryParams: [],
1883
+ bodyParams: ["stage", "labels", "addLabels", "removeLabels", "title", "body", "state", "closeReason", "duplicateOf", "priority", "estimate", "due", "milestone", "parent", "blockedBy", "assignees", "status", "assignee", "snoozedUntil", "delegateRequest", "locked"],
1884
+ effect: "write",
1885
+ retry: "idempotent",
1886
+ held: false,
1887
+ long: false,
1888
+ paginated: false
1889
+ },
1890
+ "keys.add": {
1891
+ id: "keys.add",
1892
+ method: "POST",
1893
+ path: "/api/keys",
1894
+ pathParams: [],
1895
+ queryParams: [],
1896
+ bodyParams: ["title", "kind", "key", "signature", "readOnly", "repos"],
1897
+ effect: "write",
1898
+ retry: "none",
1899
+ held: false,
1900
+ long: false,
1901
+ paginated: false
1902
+ },
1903
+ "keys.list": {
1904
+ id: "keys.list",
1905
+ method: "GET",
1906
+ path: "/api/keys",
1907
+ pathParams: [],
1908
+ queryParams: [],
1909
+ bodyParams: [],
1910
+ effect: "read",
1911
+ retry: "safe",
1912
+ held: false,
1913
+ long: false,
1914
+ paginated: false
1915
+ },
1916
+ "keys.proof": {
1917
+ id: "keys.proof",
1918
+ method: "GET",
1919
+ path: "/api/keys/proof",
1920
+ pathParams: [],
1921
+ queryParams: [],
1922
+ bodyParams: [],
1923
+ effect: "read",
1924
+ retry: "safe",
1925
+ held: false,
1926
+ long: false,
1927
+ paginated: false
1928
+ },
1929
+ "keys.remove": {
1930
+ id: "keys.remove",
1931
+ method: "DELETE",
1932
+ path: "/api/keys/{id}",
1933
+ pathParams: ["id"],
1934
+ queryParams: [],
1935
+ bodyParams: [],
1936
+ effect: "delete",
1937
+ retry: "idempotent",
1938
+ held: false,
1939
+ long: false,
1940
+ paginated: false
1941
+ },
1942
+ "labels.create": {
1943
+ id: "labels.create",
1944
+ method: "POST",
1945
+ path: "/api/repos/{owner}/{repo}/labels",
1946
+ pathParams: ["owner", "repo"],
1947
+ queryParams: [],
1948
+ bodyParams: ["name", "description"],
1949
+ effect: "write",
1950
+ retry: "none",
1951
+ held: false,
1952
+ long: false,
1953
+ paginated: false
1954
+ },
1955
+ "labels.delete": {
1956
+ id: "labels.delete",
1957
+ method: "DELETE",
1958
+ path: "/api/repos/{owner}/{repo}/labels/{label}",
1959
+ pathParams: ["owner", "repo", "label"],
1960
+ queryParams: [],
1961
+ bodyParams: [],
1962
+ effect: "delete",
1963
+ retry: "idempotent",
1964
+ held: false,
1965
+ long: false,
1966
+ paginated: false
1967
+ },
1968
+ "labels.list": {
1969
+ id: "labels.list",
1970
+ method: "GET",
1971
+ path: "/api/repos/{owner}/{repo}/labels",
1972
+ pathParams: ["owner", "repo"],
1973
+ queryParams: [],
1974
+ bodyParams: [],
1975
+ effect: "read",
1976
+ retry: "safe",
1977
+ held: false,
1978
+ long: false,
1979
+ paginated: false
1980
+ },
1981
+ "labels.update": {
1982
+ id: "labels.update",
1983
+ method: "PATCH",
1984
+ path: "/api/repos/{owner}/{repo}/labels/{label}",
1985
+ pathParams: ["owner", "repo", "label"],
1986
+ queryParams: [],
1987
+ bodyParams: ["name", "description"],
1988
+ effect: "write",
1989
+ retry: "idempotent",
1990
+ held: false,
1991
+ long: false,
1992
+ paginated: false
1993
+ },
1994
+ "me.agent_tracking": {
1995
+ id: "me.agent_tracking",
1996
+ method: "GET",
1997
+ path: "/api/me/agent-tracking",
1998
+ pathParams: [],
1999
+ queryParams: [],
2000
+ bodyParams: [],
2001
+ effect: "read",
2002
+ retry: "safe",
2003
+ held: false,
2004
+ long: false,
2005
+ paginated: false
2006
+ },
2007
+ "me.onboarded": {
2008
+ id: "me.onboarded",
2009
+ method: "POST",
2010
+ path: "/api/me/onboarding",
2011
+ pathParams: [],
2012
+ queryParams: [],
2013
+ bodyParams: [],
2014
+ effect: "write",
2015
+ retry: "idempotent",
2016
+ held: false,
2017
+ long: false,
2018
+ paginated: false
2019
+ },
2020
+ "me.update": {
2021
+ id: "me.update",
2022
+ method: "PATCH",
2023
+ path: "/api/me",
2024
+ pathParams: [],
2025
+ queryParams: [],
2026
+ bodyParams: ["name", "bio", "location", "website", "timeZone", "workStart", "workEnd", "showTide", "signupSource"],
2027
+ effect: "write",
2028
+ retry: "idempotent",
2029
+ held: false,
2030
+ long: false,
2031
+ paginated: false
2032
+ },
2033
+ "merge_queue.status": {
2034
+ id: "merge_queue.status",
2035
+ method: "GET",
2036
+ path: "/api/repos/{owner}/{repo}/merge-queue/entries",
2037
+ pathParams: ["owner", "repo"],
2038
+ queryParams: [],
2039
+ bodyParams: [],
2040
+ effect: "read",
2041
+ retry: "safe",
2042
+ held: false,
2043
+ long: false,
2044
+ paginated: false
2045
+ },
2046
+ "milestones.create": {
2047
+ id: "milestones.create",
2048
+ method: "POST",
2049
+ path: "/api/repos/{owner}/{repo}/milestones",
2050
+ pathParams: ["owner", "repo"],
2051
+ queryParams: [],
2052
+ bodyParams: ["title", "description", "due"],
2053
+ effect: "write",
2054
+ retry: "none",
2055
+ held: false,
2056
+ long: false,
2057
+ paginated: false
2058
+ },
2059
+ "milestones.delete": {
2060
+ id: "milestones.delete",
2061
+ method: "DELETE",
2062
+ path: "/api/repos/{owner}/{repo}/milestones/{milestone}",
2063
+ pathParams: ["owner", "repo", "milestone"],
2064
+ queryParams: [],
2065
+ bodyParams: [],
2066
+ effect: "delete",
2067
+ retry: "idempotent",
2068
+ held: false,
2069
+ long: false,
2070
+ paginated: false
2071
+ },
2072
+ "milestones.list": {
2073
+ id: "milestones.list",
2074
+ method: "GET",
2075
+ path: "/api/repos/{owner}/{repo}/milestones",
2076
+ pathParams: ["owner", "repo"],
2077
+ queryParams: [],
2078
+ bodyParams: [],
2079
+ effect: "read",
2080
+ retry: "safe",
2081
+ held: false,
2082
+ long: false,
2083
+ paginated: false
2084
+ },
2085
+ "milestones.update": {
2086
+ id: "milestones.update",
2087
+ method: "PATCH",
2088
+ path: "/api/repos/{owner}/{repo}/milestones/{milestone}",
2089
+ pathParams: ["owner", "repo", "milestone"],
2090
+ queryParams: [],
2091
+ bodyParams: ["title", "description", "due", "state"],
2092
+ effect: "write",
2093
+ retry: "idempotent",
2094
+ held: false,
2095
+ long: false,
2096
+ paginated: false
2097
+ },
2098
+ "notes.create": {
2099
+ id: "notes.create",
2100
+ method: "POST",
2101
+ path: "/api/repos/{owner}/{repo}/notes",
2102
+ pathParams: ["owner", "repo"],
2103
+ queryParams: [],
2104
+ bodyParams: ["body"],
2105
+ effect: "write",
2106
+ retry: "none",
2107
+ held: false,
2108
+ long: false,
2109
+ paginated: false
2110
+ },
2111
+ "notes.delete": {
2112
+ id: "notes.delete",
2113
+ method: "DELETE",
2114
+ path: "/api/repos/{owner}/{repo}/notes/{id}",
2115
+ pathParams: ["owner", "repo", "id"],
2116
+ queryParams: [],
2117
+ bodyParams: [],
2118
+ effect: "delete",
2119
+ retry: "idempotent",
2120
+ held: false,
2121
+ long: false,
2122
+ paginated: false
2123
+ },
2124
+ "notes.list": {
2125
+ id: "notes.list",
2126
+ method: "GET",
2127
+ path: "/api/repos/{owner}/{repo}/notes",
2128
+ pathParams: ["owner", "repo"],
2129
+ queryParams: [],
2130
+ bodyParams: [],
2131
+ effect: "read",
2132
+ retry: "safe",
2133
+ held: false,
2134
+ long: false,
2135
+ paginated: false
2136
+ },
2137
+ "notes.update": {
2138
+ id: "notes.update",
2139
+ method: "PUT",
2140
+ path: "/api/repos/{owner}/{repo}/notes/{id}",
2141
+ pathParams: ["owner", "repo", "id"],
2142
+ queryParams: [],
2143
+ bodyParams: ["body"],
2144
+ effect: "write",
2145
+ retry: "idempotent",
2146
+ held: false,
2147
+ long: false,
2148
+ paginated: false
2149
+ },
2150
+ "pulls.auto_merge": {
2151
+ id: "pulls.auto_merge",
2152
+ method: "GET",
2153
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/auto-merge",
2154
+ pathParams: ["owner", "repo", "number"],
2155
+ queryParams: [],
2156
+ bodyParams: [],
2157
+ effect: "read",
2158
+ retry: "safe",
2159
+ held: false,
2160
+ long: false,
2161
+ paginated: false
2162
+ },
2163
+ "pulls.auto_merge_disable": {
2164
+ id: "pulls.auto_merge_disable",
2165
+ method: "DELETE",
2166
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/auto-merge",
2167
+ pathParams: ["owner", "repo", "number"],
2168
+ queryParams: [],
2169
+ bodyParams: [],
2170
+ effect: "write",
2171
+ retry: "idempotent",
2172
+ held: false,
2173
+ long: false,
2174
+ paginated: false
2175
+ },
2176
+ "pulls.auto_merge_enable": {
2177
+ id: "pulls.auto_merge_enable",
2178
+ method: "PUT",
2179
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/auto-merge",
2180
+ pathParams: ["owner", "repo", "number"],
2181
+ queryParams: [],
2182
+ bodyParams: ["method", "deleteBranch", "expectedHead", "stack"],
2183
+ effect: "write",
2184
+ retry: "idempotent",
2185
+ held: true,
2186
+ long: false,
2187
+ paginated: false
2188
+ },
2189
+ "pulls.checks": {
2190
+ id: "pulls.checks",
2191
+ method: "GET",
2192
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/checks",
2193
+ pathParams: ["owner", "repo", "number"],
2194
+ queryParams: ["waited"],
2195
+ bodyParams: [],
2196
+ effect: "read",
2197
+ retry: "safe",
2198
+ held: false,
2199
+ long: false,
2200
+ paginated: false
2201
+ },
2202
+ "pulls.comment": {
2203
+ id: "pulls.comment",
2204
+ method: "POST",
2205
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/comments",
2206
+ pathParams: ["owner", "repo", "number"],
2207
+ queryParams: [],
2208
+ bodyParams: ["thread", "path", "line", "startLine", "side", "startColumn", "endColumn", "body", "proof"],
2209
+ effect: "write",
2210
+ retry: "idempotent",
2211
+ held: false,
2212
+ long: false,
2213
+ paginated: false
2214
+ },
2215
+ "pulls.conflicts": {
2216
+ id: "pulls.conflicts",
2217
+ method: "GET",
2218
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/conflicts",
2219
+ pathParams: ["owner", "repo", "number"],
2220
+ queryParams: [],
2221
+ bodyParams: [],
2222
+ effect: "read",
2223
+ retry: "safe",
2224
+ held: false,
2225
+ long: false,
2226
+ paginated: false
2227
+ },
2228
+ "pulls.create": {
2229
+ id: "pulls.create",
2230
+ method: "POST",
2231
+ path: "/api/repos/{owner}/{repo}/pulls",
2232
+ pathParams: ["owner", "repo"],
2233
+ queryParams: [],
2234
+ bodyParams: ["title", "branch", "base", "body", "draft", "reviewer"],
2235
+ effect: "write",
2236
+ retry: "idempotent",
2237
+ held: false,
2238
+ long: false,
2239
+ paginated: false
2240
+ },
2241
+ "pulls.delete_comment": {
2242
+ id: "pulls.delete_comment",
2243
+ method: "DELETE",
2244
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/threads/{thread}/comments/{index}",
2245
+ pathParams: ["owner", "repo", "number", "thread", "index"],
2246
+ queryParams: ["at"],
2247
+ bodyParams: [],
2248
+ effect: "delete",
2249
+ retry: "idempotent",
2250
+ held: false,
2251
+ long: false,
2252
+ paginated: false
2253
+ },
2254
+ "pulls.dismiss": {
2255
+ id: "pulls.dismiss",
2256
+ method: "POST",
2257
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/dismiss",
2258
+ pathParams: ["owner", "repo", "number"],
2259
+ queryParams: [],
2260
+ bodyParams: [],
2261
+ effect: "write",
2262
+ retry: "idempotent",
2263
+ held: false,
2264
+ long: false,
2265
+ paginated: false
2266
+ },
2267
+ "pulls.edit_comment": {
2268
+ id: "pulls.edit_comment",
2269
+ method: "PATCH",
2270
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/threads/{thread}/comments/{index}",
2271
+ pathParams: ["owner", "repo", "number", "thread", "index"],
2272
+ queryParams: [],
2273
+ bodyParams: ["at", "body"],
2274
+ effect: "write",
2275
+ retry: "idempotent",
2276
+ held: false,
2277
+ long: false,
2278
+ paginated: false
2279
+ },
2280
+ "pulls.get": {
2281
+ id: "pulls.get",
2282
+ method: "GET",
2283
+ path: "/api/repos/{owner}/{repo}/pulls/{number}",
2284
+ pathParams: ["owner", "repo", "number"],
2285
+ queryParams: [],
2286
+ bodyParams: [],
2287
+ effect: "read",
2288
+ retry: "safe",
2289
+ held: false,
2290
+ long: false,
2291
+ paginated: false
2292
+ },
2293
+ "pulls.hide_comment": {
2294
+ id: "pulls.hide_comment",
2295
+ method: "PUT",
2296
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/threads/{thread}/comments/{index}/hidden",
2297
+ pathParams: ["owner", "repo", "number", "thread", "index"],
2298
+ queryParams: [],
2299
+ bodyParams: ["at", "reason"],
2300
+ effect: "write",
2301
+ retry: "idempotent",
2302
+ held: false,
2303
+ long: false,
2304
+ paginated: false
2305
+ },
2306
+ "pulls.list": {
2307
+ id: "pulls.list",
2308
+ method: "GET",
2309
+ path: "/api/repos/{owner}/{repo}/pulls",
2310
+ pathParams: ["owner", "repo"],
2311
+ queryParams: ["state", "q", "author", "head", "base", "cursor", "limit", "brief"],
2312
+ bodyParams: [],
2313
+ effect: "read",
2314
+ retry: "safe",
2315
+ held: false,
2316
+ long: false,
2317
+ paginated: false
2318
+ },
2319
+ "pulls.merge": {
2320
+ id: "pulls.merge",
2321
+ method: "POST",
2322
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/merge",
2323
+ pathParams: ["owner", "repo", "number"],
2324
+ queryParams: [],
2325
+ bodyParams: ["method", "deleteBranch", "expectedHead"],
2326
+ effect: "write",
2327
+ retry: "idempotent",
2328
+ held: true,
2329
+ long: false,
2330
+ paginated: false
2331
+ },
2332
+ "pulls.resolve_conflicts": {
2333
+ id: "pulls.resolve_conflicts",
2334
+ method: "POST",
2335
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/conflicts",
2336
+ pathParams: ["owner", "repo", "number"],
2337
+ queryParams: [],
2338
+ bodyParams: ["head", "base", "files"],
2339
+ effect: "delete",
2340
+ retry: "none",
2341
+ held: false,
2342
+ long: false,
2343
+ paginated: false
2344
+ },
2345
+ "pulls.resolve_thread": {
2346
+ id: "pulls.resolve_thread",
2347
+ method: "POST",
2348
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/threads/{thread}/resolve",
2349
+ pathParams: ["owner", "repo", "number", "thread"],
2350
+ queryParams: [],
2351
+ bodyParams: ["resolved"],
2352
+ effect: "write",
2353
+ retry: "idempotent",
2354
+ held: false,
2355
+ long: false,
2356
+ paginated: false
2357
+ },
2358
+ "pulls.review": {
2359
+ id: "pulls.review",
2360
+ method: "POST",
2361
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/reviews",
2362
+ pathParams: ["owner", "repo", "number"],
2363
+ queryParams: [],
2364
+ bodyParams: ["verdict", "body", "comments", "commit"],
2365
+ effect: "write",
2366
+ retry: "idempotent",
2367
+ held: false,
2368
+ long: false,
2369
+ paginated: false
2370
+ },
2371
+ "pulls.stack": {
2372
+ id: "pulls.stack",
2373
+ method: "GET",
2374
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/stack",
2375
+ pathParams: ["owner", "repo", "number"],
2376
+ queryParams: [],
2377
+ bodyParams: [],
2378
+ effect: "read",
2379
+ retry: "safe",
2380
+ held: false,
2381
+ long: false,
2382
+ paginated: false
2383
+ },
2384
+ "pulls.update": {
2385
+ id: "pulls.update",
2386
+ method: "PATCH",
2387
+ path: "/api/repos/{owner}/{repo}/pulls/{number}",
2388
+ pathParams: ["owner", "repo", "number"],
2389
+ queryParams: [],
2390
+ bodyParams: ["title", "body", "state", "reviewer", "locked", "base"],
2391
+ effect: "write",
2392
+ retry: "idempotent",
2393
+ held: false,
2394
+ long: false,
2395
+ paginated: false
2396
+ },
2397
+ "pulls.update_branch": {
2398
+ id: "pulls.update_branch",
2399
+ method: "POST",
2400
+ path: "/api/repos/{owner}/{repo}/pulls/{number}/update-branch",
2401
+ pathParams: ["owner", "repo", "number"],
2402
+ queryParams: [],
2403
+ bodyParams: [],
2404
+ effect: "write",
2405
+ retry: "idempotent",
2406
+ held: false,
2407
+ long: false,
2408
+ paginated: false
2409
+ },
2410
+ "repos.create": {
2411
+ id: "repos.create",
2412
+ method: "POST",
2413
+ path: "/api/repos",
2414
+ pathParams: [],
2415
+ queryParams: [],
2416
+ bodyParams: ["name", "about", "visibility", "org", "readme", "objectFormat"],
2417
+ effect: "write",
2418
+ retry: "none",
2419
+ held: false,
2420
+ long: false,
2421
+ paginated: false
2422
+ },
2423
+ "repos.get": {
2424
+ id: "repos.get",
2425
+ method: "GET",
2426
+ path: "/api/repos/{owner}/{repo}",
2427
+ pathParams: ["owner", "repo"],
2428
+ queryParams: ["branches"],
2429
+ bodyParams: [],
2430
+ effect: "read",
2431
+ retry: "safe",
2432
+ held: false,
2433
+ long: false,
2434
+ paginated: false
2435
+ },
2436
+ "repos.list": {
2437
+ id: "repos.list",
2438
+ method: "GET",
2439
+ path: "/api/repos",
2440
+ pathParams: [],
2441
+ queryParams: [],
2442
+ bodyParams: [],
2443
+ effect: "read",
2444
+ retry: "safe",
2445
+ held: false,
2446
+ long: false,
2447
+ paginated: false
2448
+ },
2449
+ "repos.update": {
2450
+ id: "repos.update",
2451
+ method: "PATCH",
2452
+ path: "/api/repos/{owner}/{repo}",
2453
+ pathParams: ["owner", "repo"],
2454
+ queryParams: [],
2455
+ bodyParams: ["about", "visibility", "defaultBranch", "queueWeight", "ciMaxRunning", "ciHostLabels", "cloneDefaults", "topics"],
2456
+ effect: "write",
2457
+ retry: "idempotent",
2458
+ held: false,
2459
+ long: false,
2460
+ paginated: false
2461
+ },
2462
+ "sandboxes.create": {
2463
+ id: "sandboxes.create",
2464
+ method: "POST",
2465
+ path: "/api/orgs/{org}/sandboxes",
2466
+ pathParams: ["org"],
2467
+ queryParams: [],
2468
+ bodyParams: ["image", "vcpus", "memoryMb", "diskGb", "network", "minutes", "host", "env", "repo", "ref", "sparse", "caisson", "waitSeconds", "cache", "labels", "stop", "keepPaths", "class", "freshWorkspace", "token"],
2469
+ effect: "write",
2470
+ retry: "idempotent",
2471
+ held: false,
2472
+ long: false,
2473
+ paginated: false
2474
+ },
2475
+ "sandboxes.delete": {
2476
+ id: "sandboxes.delete",
2477
+ method: "DELETE",
2478
+ path: "/api/sandboxes/{id}",
2479
+ pathParams: ["id"],
2480
+ queryParams: [],
2481
+ bodyParams: [],
2482
+ effect: "delete",
2483
+ retry: "idempotent",
2484
+ held: false,
2485
+ long: false,
2486
+ paginated: false
2487
+ },
2488
+ "sandboxes.exec": {
2489
+ id: "sandboxes.exec",
2490
+ method: "POST",
2491
+ path: "/api/sandboxes/{id}/exec",
2492
+ pathParams: ["id"],
2493
+ queryParams: [],
2494
+ bodyParams: ["command", "argv", "cwd", "env", "timeoutSeconds", "stdin"],
2495
+ effect: "write",
2496
+ retry: "idempotent",
2497
+ held: false,
2498
+ long: true,
2499
+ paginated: false
2500
+ },
2501
+ "sandboxes.get": {
2502
+ id: "sandboxes.get",
2503
+ method: "GET",
2504
+ path: "/api/sandboxes/{id}",
2505
+ pathParams: ["id"],
2506
+ queryParams: [],
2507
+ bodyParams: [],
2508
+ effect: "read",
2509
+ retry: "safe",
2510
+ held: false,
2511
+ long: false,
2512
+ paginated: false
2513
+ },
2514
+ "sandboxes.list": {
2515
+ id: "sandboxes.list",
2516
+ method: "GET",
2517
+ path: "/api/orgs/{org}/sandboxes",
2518
+ pathParams: ["org"],
2519
+ queryParams: ["state", "limit", "cursor", "caisson", "kind"],
2520
+ bodyParams: [],
2521
+ effect: "read",
2522
+ retry: "safe",
2523
+ held: false,
2524
+ long: false,
2525
+ paginated: false
2526
+ },
2527
+ "sandboxes.stop": {
2528
+ id: "sandboxes.stop",
2529
+ method: "POST",
2530
+ path: "/api/sandboxes/{id}/stop",
2531
+ pathParams: ["id"],
2532
+ queryParams: [],
2533
+ bodyParams: ["mode"],
2534
+ effect: "write",
2535
+ retry: "idempotent",
2536
+ held: false,
2537
+ long: false,
2538
+ paginated: false
2539
+ },
2540
+ "search.code": {
2541
+ id: "search.code",
2542
+ method: "GET",
2543
+ path: "/api/search",
2544
+ pathParams: [],
2545
+ queryParams: ["q", "repo", "path", "lang", "limit", "regex", "case", "ref", "lines", "budget"],
2546
+ bodyParams: [],
2547
+ effect: "read",
2548
+ retry: "safe",
2549
+ held: false,
2550
+ long: false,
2551
+ paginated: false
2552
+ },
2553
+ "symbols.find": {
2554
+ id: "symbols.find",
2555
+ method: "GET",
2556
+ path: "/api/repos/{owner}/{repo}/symbols",
2557
+ pathParams: ["owner", "repo"],
2558
+ queryParams: ["q", "kind", "path", "ref", "limit"],
2559
+ bodyParams: [],
2560
+ effect: "read",
2561
+ retry: "safe",
2562
+ held: false,
2563
+ long: false,
2564
+ paginated: false
2565
+ },
2566
+ "symbols.refs": {
2567
+ id: "symbols.refs",
2568
+ method: "GET",
2569
+ path: "/api/repos/{owner}/{repo}/symbols/refs",
2570
+ pathParams: ["owner", "repo"],
2571
+ queryParams: ["name", "path", "ref", "limit"],
2572
+ bodyParams: [],
2573
+ effect: "read",
2574
+ retry: "safe",
2575
+ held: false,
2576
+ long: false,
2577
+ paginated: false
2578
+ },
2579
+ "tokens.create": {
2580
+ id: "tokens.create",
2581
+ method: "POST",
2582
+ path: "/api/tokens",
2583
+ pathParams: [],
2584
+ queryParams: [],
2585
+ bodyParams: ["name", "scopes", "expires", "repos", "branches", "paths", "agent"],
2586
+ effect: "write",
2587
+ retry: "none",
2588
+ held: false,
2589
+ long: false,
2590
+ paginated: false
2591
+ },
2592
+ "tokens.list": {
2593
+ id: "tokens.list",
2594
+ method: "GET",
2595
+ path: "/api/tokens",
2596
+ pathParams: [],
2597
+ queryParams: [],
2598
+ bodyParams: [],
2599
+ effect: "read",
2600
+ retry: "safe",
2601
+ held: false,
2602
+ long: false,
2603
+ paginated: false
2604
+ },
2605
+ "tokens.revoke": {
2606
+ id: "tokens.revoke",
2607
+ method: "DELETE",
2608
+ path: "/api/tokens/{id}",
2609
+ pathParams: ["id"],
2610
+ queryParams: [],
2611
+ bodyParams: [],
2612
+ effect: "delete",
2613
+ retry: "idempotent",
2614
+ held: false,
2615
+ long: false,
2616
+ paginated: false
2617
+ },
2618
+ "waits.wait": {
2619
+ id: "waits.wait",
2620
+ method: "POST",
2621
+ path: "/api/waits",
2622
+ pathParams: [],
2623
+ queryParams: [],
2624
+ bodyParams: ["target", "until", "timeout", "waited", "baseline"],
2625
+ effect: "read",
2626
+ retry: "safe",
2627
+ held: false,
2628
+ long: true,
2629
+ paginated: false
2630
+ }
2631
+ };
2632
+
2633
+ // src/generated/api.ts
2634
+ class CaissonsResource {
2635
+ core;
2636
+ constructor(core) {
2637
+ this.core = core;
2638
+ }
2639
+ affected(input, opts) {
2640
+ return this.core.request(ops["caissons.affected"], input, opts);
2641
+ }
2642
+ astGrep(input, opts) {
2643
+ return this.core.request(ops["caissons.ast_grep"], input, opts);
2644
+ }
2645
+ astRewrite(input, opts) {
2646
+ return this.core.request(ops["caissons.ast_rewrite"], input, opts);
2647
+ }
2648
+ bash(input, opts) {
2649
+ return this.core.request(ops["caissons.bash"], input, opts);
2650
+ }
2651
+ batch(input, opts) {
2652
+ return this.core.request(ops["caissons.batch"], input, opts);
2653
+ }
2654
+ commit(input, opts) {
2655
+ return this.core.request(ops["caissons.commit"], input, opts);
2656
+ }
2657
+ diff(input, opts) {
2658
+ return this.core.request(ops["caissons.diff"], input, opts);
2659
+ }
2660
+ fork(input, opts) {
2661
+ return this.core.request(ops["caissons.fork"], input, opts);
2662
+ }
2663
+ get(input, opts) {
2664
+ return this.core.request(ops["caissons.get"], input, opts);
2665
+ }
2666
+ glob(input, opts) {
2667
+ return this.core.request(ops["caissons.glob"], input, opts);
2668
+ }
2669
+ grep(input, opts) {
2670
+ return this.core.request(ops["caissons.grep"], input, opts);
2671
+ }
2672
+ list(input, opts) {
2673
+ return this.core.request(ops["caissons.list"], input, opts);
2674
+ }
2675
+ locate(input, opts) {
2676
+ return this.core.request(ops["caissons.locate"], input, opts);
2677
+ }
2678
+ lsp(input, opts) {
2679
+ return this.core.request(ops["caissons.lsp"], input, opts);
2680
+ }
2681
+ lspRename(input, opts) {
2682
+ return this.core.request(ops["caissons.lsp_rename"], input, opts);
2683
+ }
2684
+ lspStop(input, opts) {
2685
+ return this.core.request(ops["caissons.lsp_stop"], input, opts);
2686
+ }
2687
+ open(input, opts) {
2688
+ return this.core.request(ops["caissons.open"], input, opts);
2689
+ }
2690
+ patch(input, opts) {
2691
+ return this.core.request(ops["caissons.patch"], input, opts);
2692
+ }
2693
+ policy(input, opts) {
2694
+ return this.core.request(ops["caissons.policy"], input, opts);
2695
+ }
2696
+ pull(input, opts) {
2697
+ return this.core.request(ops["caissons.pull"], input, opts);
2698
+ }
2699
+ read(input, opts) {
2700
+ return this.core.request(ops["caissons.read"], input, opts);
2701
+ }
2702
+ review(input, opts) {
2703
+ return this.core.request(ops["caissons.review"], input, opts);
2704
+ }
2705
+ reviewResolve(input, opts) {
2706
+ return this.core.request(ops["caissons.review_resolve"], input, opts);
2707
+ }
2708
+ reviewStatus(input, opts) {
2709
+ return this.core.request(ops["caissons.review_status"], input, opts);
2710
+ }
2711
+ reviewSubmit(input, opts) {
2712
+ return this.core.request(ops["caissons.review_submit"], input, opts);
2713
+ }
2714
+ async ship(input, opts) {
2715
+ const out = await this.core.request(ops["caissons.ship"], input, opts);
2716
+ return new PullRequest(this.core, { number: out["pull"]["number"], owner: input["org"], repo: out["repo"] });
2717
+ }
2718
+ stop(input, opts) {
2719
+ return this.core.request(ops["caissons.stop"], input, opts);
2720
+ }
2721
+ symbolRefs(input, opts) {
2722
+ return this.core.request(ops["caissons.symbol_refs"], input, opts);
2723
+ }
2724
+ symbols(input, opts) {
2725
+ return this.core.request(ops["caissons.symbols"], input, opts);
2726
+ }
2727
+ test(input, opts) {
2728
+ return this.core.request(ops["caissons.test"], input, opts);
2729
+ }
2730
+ }
2731
+
2732
+ class Check_runsResource {
2733
+ core;
2734
+ constructor(core) {
2735
+ this.core = core;
2736
+ }
2737
+ create(input, opts) {
2738
+ return this.core.request(ops["check_runs.create"], input, opts);
2739
+ }
2740
+ get(input, opts) {
2741
+ return this.core.request(ops["check_runs.get"], input, opts);
2742
+ }
2743
+ list(input, opts) {
2744
+ return this.core.request(ops["check_runs.list"], input, opts);
2745
+ }
2746
+ update(input, opts) {
2747
+ return this.core.request(ops["check_runs.update"], input, opts);
2748
+ }
2749
+ }
2750
+
2751
+ class CiResource {
2752
+ core;
2753
+ constructor(core) {
2754
+ this.core = core;
2755
+ }
2756
+ approvePull(input, opts) {
2757
+ return this.core.request(ops["ci.approve_pull"], input, opts);
2758
+ }
2759
+ artifacts(input, opts) {
2760
+ return this.core.request(ops["ci.artifacts"], input, opts);
2761
+ }
2762
+ cancel(input, opts) {
2763
+ return this.core.request(ops["ci.cancel"], input, opts);
2764
+ }
2765
+ dispatch(input, opts) {
2766
+ return this.core.request(ops["ci.dispatch"], input, opts);
2767
+ }
2768
+ failures(input, opts) {
2769
+ return this.core.request(ops["ci.failures"], input, opts);
2770
+ }
2771
+ logs(input, opts) {
2772
+ return this.core.request(ops["ci.logs"], input, opts);
2773
+ }
2774
+ rerun(input, opts) {
2775
+ return this.core.request(ops["ci.rerun"], input, opts);
2776
+ }
2777
+ run(input, opts) {
2778
+ return this.core.request(ops["ci.run"], input, opts);
2779
+ }
2780
+ runs(input, opts) {
2781
+ return this.core.request(ops["ci.runs"], input, opts);
2782
+ }
2783
+ stepLog(input, opts) {
2784
+ return this.core.request(ops["ci.step_log"], input, opts);
2785
+ }
2786
+ }
2787
+
2788
+ class Event_subscriptionsResource {
2789
+ core;
2790
+ constructor(core) {
2791
+ this.core = core;
2792
+ }
2793
+ advance(input, opts) {
2794
+ return this.core.request(ops["event_subscriptions.advance"], input, opts);
2795
+ }
2796
+ create(input, opts) {
2797
+ return this.core.request(ops["event_subscriptions.create"], input, opts);
2798
+ }
2799
+ delete(input, opts) {
2800
+ return this.core.request(ops["event_subscriptions.delete"], input, opts);
2801
+ }
2802
+ get(input, opts) {
2803
+ return this.core.request(ops["event_subscriptions.get"], input, opts);
2804
+ }
2805
+ list(input = {}, opts) {
2806
+ return this.core.request(ops["event_subscriptions.list"], input, opts);
2807
+ }
2808
+ }
2809
+
2810
+ class EventsResource {
2811
+ core;
2812
+ constructor(core) {
2813
+ this.core = core;
2814
+ }
2815
+ list(input = {}, opts) {
2816
+ return this.core.request(ops["events.list"], input, opts);
2817
+ }
2818
+ }
2819
+
2820
+ class GithubResource {
2821
+ core;
2822
+ constructor(core) {
2823
+ this.core = core;
2824
+ }
2825
+ installUrl(input = {}, opts) {
2826
+ return this.core.request(ops["github.install_url"], input, opts);
2827
+ }
2828
+ installationRepos(input, opts) {
2829
+ return this.core.request(ops["github.installation_repos"], input, opts);
2830
+ }
2831
+ installations(input = {}, opts) {
2832
+ return this.core.request(ops["github.installations"], input, opts);
2833
+ }
2834
+ }
2835
+
2836
+ class HeldResource {
2837
+ core;
2838
+ constructor(core) {
2839
+ this.core = core;
2840
+ }
2841
+ get(input, opts) {
2842
+ return this.core.request(ops["held.get"], input, opts);
2843
+ }
2844
+ mine(input = {}, opts) {
2845
+ return this.core.request(ops["held.mine"], input, opts);
2846
+ }
2847
+ org(input, opts) {
2848
+ return this.core.request(ops["held.org"], input, opts);
2849
+ }
2850
+ }
2851
+
2852
+ class InboxResource {
2853
+ core;
2854
+ constructor(core) {
2855
+ this.core = core;
2856
+ }
2857
+ list(input = {}, opts) {
2858
+ return this.core.request(ops["inbox.list"], input, opts);
2859
+ }
2860
+ read(input = {}, opts) {
2861
+ return this.core.request(ops["inbox.read"], input, opts);
2862
+ }
2863
+ }
2864
+
2865
+ class IssuesResource {
2866
+ core;
2867
+ constructor(core) {
2868
+ this.core = core;
2869
+ }
2870
+ claim(input, opts) {
2871
+ return this.core.request(ops["issues.claim"], input, opts);
2872
+ }
2873
+ close(input, opts) {
2874
+ return this.core.request(ops["issues.close"], input, opts);
2875
+ }
2876
+ comment(input, opts) {
2877
+ return this.core.request(ops["issues.comment"], input, opts);
2878
+ }
2879
+ commentDelete(input, opts) {
2880
+ return this.core.request(ops["issues.comment_delete"], input, opts);
2881
+ }
2882
+ commentEdit(input, opts) {
2883
+ return this.core.request(ops["issues.comment_edit"], input, opts);
2884
+ }
2885
+ commentReact(input, opts) {
2886
+ return this.core.request(ops["issues.comment_react"], input, opts);
2887
+ }
2888
+ commentUnreact(input, opts) {
2889
+ return this.core.request(ops["issues.comment_unreact"], input, opts);
2890
+ }
2891
+ context(input, opts) {
2892
+ return this.core.request(ops["issues.context"], input, opts);
2893
+ }
2894
+ create(input, opts) {
2895
+ return this.core.request(ops["issues.create"], input, opts);
2896
+ }
2897
+ createBatch(input, opts) {
2898
+ return this.core.request(ops["issues.create_batch"], input, opts);
2899
+ }
2900
+ get(input, opts) {
2901
+ return this.core.request(ops["issues.get"], input, opts);
2902
+ }
2903
+ list(input, opts) {
2904
+ return this.core.request(ops["issues.list"], input, opts);
2905
+ }
2906
+ mine(input = {}, opts) {
2907
+ return this.core.request(ops["issues.mine"], input, opts);
2908
+ }
2909
+ next(input, opts) {
2910
+ return this.core.request(ops["issues.next"], input, opts);
2911
+ }
2912
+ react(input, opts) {
2913
+ return this.core.request(ops["issues.react"], input, opts);
2914
+ }
2915
+ related(input, opts) {
2916
+ return this.core.request(ops["issues.related"], input, opts);
2917
+ }
2918
+ release(input, opts) {
2919
+ return this.core.request(ops["issues.release"], input, opts);
2920
+ }
2921
+ similar(input, opts) {
2922
+ return this.core.request(ops["issues.similar"], input, opts);
2923
+ }
2924
+ async start(input, opts) {
2925
+ const out = await this.core.request(ops["issues.start"], input, opts);
2926
+ return new Caisson(this.core, { id: out["caisson"]["id"], owner: input["owner"], repo: input["repo"] });
2927
+ }
2928
+ subscribe(input, opts) {
2929
+ return this.core.request(ops["issues.subscribe"], input, opts);
2930
+ }
2931
+ unreact(input, opts) {
2932
+ return this.core.request(ops["issues.unreact"], input, opts);
2933
+ }
2934
+ update(input, opts) {
2935
+ return this.core.request(ops["issues.update"], input, opts);
2936
+ }
2937
+ }
2938
+
2939
+ class KeysResource {
2940
+ core;
2941
+ constructor(core) {
2942
+ this.core = core;
2943
+ }
2944
+ add(input, opts) {
2945
+ return this.core.request(ops["keys.add"], input, opts);
2946
+ }
2947
+ list(input = {}, opts) {
2948
+ return this.core.request(ops["keys.list"], input, opts);
2949
+ }
2950
+ proof(input = {}, opts) {
2951
+ return this.core.request(ops["keys.proof"], input, opts);
2952
+ }
2953
+ remove(input, opts) {
2954
+ return this.core.request(ops["keys.remove"], input, opts);
2955
+ }
2956
+ }
2957
+
2958
+ class LabelsResource {
2959
+ core;
2960
+ constructor(core) {
2961
+ this.core = core;
2962
+ }
2963
+ create(input, opts) {
2964
+ return this.core.request(ops["labels.create"], input, opts);
2965
+ }
2966
+ delete(input, opts) {
2967
+ return this.core.request(ops["labels.delete"], input, opts);
2968
+ }
2969
+ list(input, opts) {
2970
+ return this.core.request(ops["labels.list"], input, opts);
2971
+ }
2972
+ update(input, opts) {
2973
+ return this.core.request(ops["labels.update"], input, opts);
2974
+ }
2975
+ }
2976
+
2977
+ class MeResource {
2978
+ core;
2979
+ constructor(core) {
2980
+ this.core = core;
2981
+ }
2982
+ agentTracking(input = {}, opts) {
2983
+ return this.core.request(ops["me.agent_tracking"], input, opts);
2984
+ }
2985
+ onboarded(input = {}, opts) {
2986
+ return this.core.request(ops["me.onboarded"], input, opts);
2987
+ }
2988
+ update(input = {}, opts) {
2989
+ return this.core.request(ops["me.update"], input, opts);
2990
+ }
2991
+ }
2992
+
2993
+ class Merge_queueResource {
2994
+ core;
2995
+ constructor(core) {
2996
+ this.core = core;
2997
+ }
2998
+ status(input, opts) {
2999
+ return this.core.request(ops["merge_queue.status"], input, opts);
3000
+ }
3001
+ }
3002
+
3003
+ class MilestonesResource {
3004
+ core;
3005
+ constructor(core) {
3006
+ this.core = core;
3007
+ }
3008
+ create(input, opts) {
3009
+ return this.core.request(ops["milestones.create"], input, opts);
3010
+ }
3011
+ delete(input, opts) {
3012
+ return this.core.request(ops["milestones.delete"], input, opts);
3013
+ }
3014
+ list(input, opts) {
3015
+ return this.core.request(ops["milestones.list"], input, opts);
3016
+ }
3017
+ update(input, opts) {
3018
+ return this.core.request(ops["milestones.update"], input, opts);
3019
+ }
3020
+ }
3021
+
3022
+ class NotesResource {
3023
+ core;
3024
+ constructor(core) {
3025
+ this.core = core;
3026
+ }
3027
+ create(input, opts) {
3028
+ return this.core.request(ops["notes.create"], input, opts);
3029
+ }
3030
+ delete(input, opts) {
3031
+ return this.core.request(ops["notes.delete"], input, opts);
3032
+ }
3033
+ list(input, opts) {
3034
+ return this.core.request(ops["notes.list"], input, opts);
3035
+ }
3036
+ update(input, opts) {
3037
+ return this.core.request(ops["notes.update"], input, opts);
3038
+ }
3039
+ }
3040
+
3041
+ class PullsResource {
3042
+ core;
3043
+ constructor(core) {
3044
+ this.core = core;
3045
+ }
3046
+ autoMerge(input, opts) {
3047
+ return this.core.request(ops["pulls.auto_merge"], input, opts);
3048
+ }
3049
+ autoMergeDisable(input, opts) {
3050
+ return this.core.request(ops["pulls.auto_merge_disable"], input, opts);
3051
+ }
3052
+ autoMergeEnable(input, opts) {
3053
+ return this.core.request(ops["pulls.auto_merge_enable"], input, opts);
3054
+ }
3055
+ checks(input, opts) {
3056
+ return this.core.request(ops["pulls.checks"], input, opts);
3057
+ }
3058
+ comment(input, opts) {
3059
+ return this.core.request(ops["pulls.comment"], input, opts);
3060
+ }
3061
+ conflicts(input, opts) {
3062
+ return this.core.request(ops["pulls.conflicts"], input, opts);
3063
+ }
3064
+ async create(input, opts) {
3065
+ const out = await this.core.request(ops["pulls.create"], input, opts);
3066
+ return new PullRequest(this.core, { number: out["number"], owner: input["owner"], repo: input["repo"] });
3067
+ }
3068
+ deleteComment(input, opts) {
3069
+ return this.core.request(ops["pulls.delete_comment"], input, opts);
3070
+ }
3071
+ dismiss(input, opts) {
3072
+ return this.core.request(ops["pulls.dismiss"], input, opts);
3073
+ }
3074
+ editComment(input, opts) {
3075
+ return this.core.request(ops["pulls.edit_comment"], input, opts);
3076
+ }
3077
+ get(input, opts) {
3078
+ return this.core.request(ops["pulls.get"], input, opts);
3079
+ }
3080
+ hideComment(input, opts) {
3081
+ return this.core.request(ops["pulls.hide_comment"], input, opts);
3082
+ }
3083
+ list(input, opts) {
3084
+ return this.core.request(ops["pulls.list"], input, opts);
3085
+ }
3086
+ merge(input, opts) {
3087
+ return this.core.request(ops["pulls.merge"], input, opts);
3088
+ }
3089
+ resolveConflicts(input, opts) {
3090
+ return this.core.request(ops["pulls.resolve_conflicts"], input, opts);
3091
+ }
3092
+ resolveThread(input, opts) {
3093
+ return this.core.request(ops["pulls.resolve_thread"], input, opts);
3094
+ }
3095
+ review(input, opts) {
3096
+ return this.core.request(ops["pulls.review"], input, opts);
3097
+ }
3098
+ stack(input, opts) {
3099
+ return this.core.request(ops["pulls.stack"], input, opts);
3100
+ }
3101
+ update(input, opts) {
3102
+ return this.core.request(ops["pulls.update"], input, opts);
3103
+ }
3104
+ updateBranch(input, opts) {
3105
+ return this.core.request(ops["pulls.update_branch"], input, opts);
3106
+ }
3107
+ }
3108
+
3109
+ class ReposResource {
3110
+ core;
3111
+ constructor(core) {
3112
+ this.core = core;
3113
+ }
3114
+ create(input, opts) {
3115
+ return this.core.request(ops["repos.create"], input, opts);
3116
+ }
3117
+ get(input, opts) {
3118
+ return this.core.request(ops["repos.get"], input, opts);
3119
+ }
3120
+ list(input = {}, opts) {
3121
+ return this.core.request(ops["repos.list"], input, opts);
3122
+ }
3123
+ update(input, opts) {
3124
+ return this.core.request(ops["repos.update"], input, opts);
3125
+ }
3126
+ }
3127
+
3128
+ class SandboxesResource {
3129
+ core;
3130
+ constructor(core) {
3131
+ this.core = core;
3132
+ }
3133
+ create(input, opts) {
3134
+ return this.core.request(ops["sandboxes.create"], input, opts);
3135
+ }
3136
+ delete(input, opts) {
3137
+ return this.core.request(ops["sandboxes.delete"], input, opts);
3138
+ }
3139
+ exec(input, opts) {
3140
+ return this.core.request(ops["sandboxes.exec"], input, opts);
3141
+ }
3142
+ get(input, opts) {
3143
+ return this.core.request(ops["sandboxes.get"], input, opts);
3144
+ }
3145
+ list(input, opts) {
3146
+ return this.core.request(ops["sandboxes.list"], input, opts);
3147
+ }
3148
+ stop(input, opts) {
3149
+ return this.core.request(ops["sandboxes.stop"], input, opts);
3150
+ }
3151
+ }
3152
+
3153
+ class SearchResource {
3154
+ core;
3155
+ constructor(core) {
3156
+ this.core = core;
3157
+ }
3158
+ code(input = {}, opts) {
3159
+ return this.core.request(ops["search.code"], input, opts);
3160
+ }
3161
+ }
3162
+
3163
+ class SymbolsResource {
3164
+ core;
3165
+ constructor(core) {
3166
+ this.core = core;
3167
+ }
3168
+ find(input, opts) {
3169
+ return this.core.request(ops["symbols.find"], input, opts);
3170
+ }
3171
+ refs(input, opts) {
3172
+ return this.core.request(ops["symbols.refs"], input, opts);
3173
+ }
3174
+ }
3175
+
3176
+ class TokensResource {
3177
+ core;
3178
+ constructor(core) {
3179
+ this.core = core;
3180
+ }
3181
+ create(input, opts) {
3182
+ return this.core.request(ops["tokens.create"], input, opts);
3183
+ }
3184
+ list(input = {}, opts) {
3185
+ return this.core.request(ops["tokens.list"], input, opts);
3186
+ }
3187
+ revoke(input, opts) {
3188
+ return this.core.request(ops["tokens.revoke"], input, opts);
3189
+ }
3190
+ }
3191
+
3192
+ class WaitsResource {
3193
+ core;
3194
+ constructor(core) {
3195
+ this.core = core;
3196
+ }
3197
+ wait(input, opts) {
3198
+ return this.core.request(ops["waits.wait"], input, opts);
3199
+ }
3200
+ }
3201
+
3202
+ class Caisson {
3203
+ core;
3204
+ bound;
3205
+ constructor(core, bound) {
3206
+ this.core = core;
3207
+ this.bound = bound;
3208
+ }
3209
+ affected(input = {}, opts) {
3210
+ return this.core.request(ops["caissons.affected"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3211
+ }
3212
+ astGrep(input, opts) {
3213
+ return this.core.request(ops["caissons.ast_grep"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3214
+ }
3215
+ astRewrite(input, opts) {
3216
+ return this.core.request(ops["caissons.ast_rewrite"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3217
+ }
3218
+ bash(input, opts) {
3219
+ return this.core.request(ops["caissons.bash"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3220
+ }
3221
+ batch(input, opts) {
3222
+ return this.core.request(ops["caissons.batch"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3223
+ }
3224
+ commit(input, opts) {
3225
+ return this.core.request(ops["caissons.commit"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3226
+ }
3227
+ diff(input = {}, opts) {
3228
+ return this.core.request(ops["caissons.diff"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3229
+ }
3230
+ fork(input = {}, opts) {
3231
+ return this.core.request(ops["caissons.fork"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3232
+ }
3233
+ get(input = {}, opts) {
3234
+ return this.core.request(ops["caissons.get"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3235
+ }
3236
+ glob(input, opts) {
3237
+ return this.core.request(ops["caissons.glob"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3238
+ }
3239
+ grep(input, opts) {
3240
+ return this.core.request(ops["caissons.grep"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3241
+ }
3242
+ locate(input = {}, opts) {
3243
+ return this.core.request(ops["caissons.locate"], { ...input, id: this.bound["id"] }, opts);
3244
+ }
3245
+ lsp(input, opts) {
3246
+ return this.core.request(ops["caissons.lsp"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3247
+ }
3248
+ lspRename(input, opts) {
3249
+ return this.core.request(ops["caissons.lsp_rename"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3250
+ }
3251
+ lspStop(input = {}, opts) {
3252
+ return this.core.request(ops["caissons.lsp_stop"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3253
+ }
3254
+ patch(input, opts) {
3255
+ return this.core.request(ops["caissons.patch"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3256
+ }
3257
+ pull(input = {}, opts) {
3258
+ return this.core.request(ops["caissons.pull"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3259
+ }
3260
+ read(input, opts) {
3261
+ return this.core.request(ops["caissons.read"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3262
+ }
3263
+ review(input = {}, opts) {
3264
+ return this.core.request(ops["caissons.review"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3265
+ }
3266
+ reviewResolve(input, opts) {
3267
+ return this.core.request(ops["caissons.review_resolve"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3268
+ }
3269
+ reviewStatus(input = {}, opts) {
3270
+ return this.core.request(ops["caissons.review_status"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3271
+ }
3272
+ reviewSubmit(input, opts) {
3273
+ return this.core.request(ops["caissons.review_submit"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3274
+ }
3275
+ async ship(input, opts) {
3276
+ const out = await this.core.request(ops["caissons.ship"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3277
+ return new PullRequest(this.core, { number: out["pull"]["number"], owner: this.bound["owner"], repo: out["repo"] });
3278
+ }
3279
+ stop(input = {}, opts) {
3280
+ return this.core.request(ops["caissons.stop"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3281
+ }
3282
+ symbolRefs(input = {}, opts) {
3283
+ return this.core.request(ops["caissons.symbol_refs"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3284
+ }
3285
+ symbols(input = {}, opts) {
3286
+ return this.core.request(ops["caissons.symbols"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3287
+ }
3288
+ test(input = {}, opts) {
3289
+ return this.core.request(ops["caissons.test"], { ...input, org: this.bound["owner"], id: this.bound["id"] }, opts);
3290
+ }
3291
+ }
3292
+
3293
+ class OrgCaissonsResource {
3294
+ core;
3295
+ bound;
3296
+ constructor(core, bound) {
3297
+ this.core = core;
3298
+ this.bound = bound;
3299
+ }
3300
+ list(input = {}, opts) {
3301
+ return this.core.request(ops["caissons.list"], { ...input, org: this.bound["org"] }, opts);
3302
+ }
3303
+ open(input, opts) {
3304
+ return this.core.request(ops["caissons.open"], { ...input, org: this.bound["org"] }, opts);
3305
+ }
3306
+ policy(input = {}, opts) {
3307
+ return this.core.request(ops["caissons.policy"], { ...input, org: this.bound["org"] }, opts);
3308
+ }
3309
+ }
3310
+
3311
+ class OrgHeldResource {
3312
+ core;
3313
+ bound;
3314
+ constructor(core, bound) {
3315
+ this.core = core;
3316
+ this.bound = bound;
3317
+ }
3318
+ org(input = {}, opts) {
3319
+ return this.core.request(ops["held.org"], { ...input, org: this.bound["org"] }, opts);
3320
+ }
3321
+ }
3322
+
3323
+ class OrgSandboxesResource {
3324
+ core;
3325
+ bound;
3326
+ constructor(core, bound) {
3327
+ this.core = core;
3328
+ this.bound = bound;
3329
+ }
3330
+ create(input = {}, opts) {
3331
+ return this.core.request(ops["sandboxes.create"], { ...input, org: this.bound["org"] }, opts);
3332
+ }
3333
+ list(input = {}, opts) {
3334
+ return this.core.request(ops["sandboxes.list"], { ...input, org: this.bound["org"] }, opts);
3335
+ }
3336
+ }
3337
+
3338
+ class Org {
3339
+ core;
3340
+ bound;
3341
+ caissons;
3342
+ held;
3343
+ sandboxes;
3344
+ constructor(core, bound) {
3345
+ this.core = core;
3346
+ this.bound = bound;
3347
+ this.caissons = new OrgCaissonsResource(core, bound);
3348
+ this.held = new OrgHeldResource(core, bound);
3349
+ this.sandboxes = new OrgSandboxesResource(core, bound);
3350
+ }
3351
+ }
3352
+
3353
+ class PullRequest {
3354
+ core;
3355
+ bound;
3356
+ constructor(core, bound) {
3357
+ this.core = core;
3358
+ this.bound = bound;
3359
+ }
3360
+ approvePull(input = {}, opts) {
3361
+ return this.core.request(ops["ci.approve_pull"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3362
+ }
3363
+ autoMerge(input = {}, opts) {
3364
+ return this.core.request(ops["pulls.auto_merge"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3365
+ }
3366
+ autoMergeDisable(input = {}, opts) {
3367
+ return this.core.request(ops["pulls.auto_merge_disable"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3368
+ }
3369
+ autoMergeEnable(input = {}, opts) {
3370
+ return this.core.request(ops["pulls.auto_merge_enable"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3371
+ }
3372
+ checks(input = {}, opts) {
3373
+ return this.core.request(ops["pulls.checks"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3374
+ }
3375
+ comment(input, opts) {
3376
+ return this.core.request(ops["pulls.comment"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3377
+ }
3378
+ conflicts(input = {}, opts) {
3379
+ return this.core.request(ops["pulls.conflicts"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3380
+ }
3381
+ deleteComment(input, opts) {
3382
+ return this.core.request(ops["pulls.delete_comment"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3383
+ }
3384
+ dismiss(input = {}, opts) {
3385
+ return this.core.request(ops["pulls.dismiss"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3386
+ }
3387
+ editComment(input, opts) {
3388
+ return this.core.request(ops["pulls.edit_comment"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3389
+ }
3390
+ get(input = {}, opts) {
3391
+ return this.core.request(ops["pulls.get"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3392
+ }
3393
+ hideComment(input, opts) {
3394
+ return this.core.request(ops["pulls.hide_comment"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3395
+ }
3396
+ merge(input = {}, opts) {
3397
+ return this.core.request(ops["pulls.merge"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3398
+ }
3399
+ resolveConflicts(input, opts) {
3400
+ return this.core.request(ops["pulls.resolve_conflicts"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3401
+ }
3402
+ resolveThread(input, opts) {
3403
+ return this.core.request(ops["pulls.resolve_thread"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3404
+ }
3405
+ review(input, opts) {
3406
+ return this.core.request(ops["pulls.review"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3407
+ }
3408
+ stack(input = {}, opts) {
3409
+ return this.core.request(ops["pulls.stack"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3410
+ }
3411
+ update(input = {}, opts) {
3412
+ return this.core.request(ops["pulls.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3413
+ }
3414
+ updateBranch(input = {}, opts) {
3415
+ return this.core.request(ops["pulls.update_branch"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"], number: this.bound["number"] }, opts);
3416
+ }
3417
+ }
3418
+
3419
+ class RepoCheck_runsResource {
3420
+ core;
3421
+ bound;
3422
+ constructor(core, bound) {
3423
+ this.core = core;
3424
+ this.bound = bound;
3425
+ }
3426
+ create(input, opts) {
3427
+ return this.core.request(ops["check_runs.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3428
+ }
3429
+ get(input, opts) {
3430
+ return this.core.request(ops["check_runs.get"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3431
+ }
3432
+ list(input, opts) {
3433
+ return this.core.request(ops["check_runs.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3434
+ }
3435
+ update(input, opts) {
3436
+ return this.core.request(ops["check_runs.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3437
+ }
3438
+ }
3439
+
3440
+ class RepoCiResource {
3441
+ core;
3442
+ bound;
3443
+ constructor(core, bound) {
3444
+ this.core = core;
3445
+ this.bound = bound;
3446
+ }
3447
+ artifacts(input, opts) {
3448
+ return this.core.request(ops["ci.artifacts"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3449
+ }
3450
+ cancel(input, opts) {
3451
+ return this.core.request(ops["ci.cancel"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3452
+ }
3453
+ dispatch(input, opts) {
3454
+ return this.core.request(ops["ci.dispatch"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3455
+ }
3456
+ failures(input, opts) {
3457
+ return this.core.request(ops["ci.failures"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3458
+ }
3459
+ logs(input, opts) {
3460
+ return this.core.request(ops["ci.logs"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3461
+ }
3462
+ rerun(input, opts) {
3463
+ return this.core.request(ops["ci.rerun"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3464
+ }
3465
+ run(input, opts) {
3466
+ return this.core.request(ops["ci.run"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3467
+ }
3468
+ runs(input = {}, opts) {
3469
+ return this.core.request(ops["ci.runs"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3470
+ }
3471
+ stepLog(input, opts) {
3472
+ return this.core.request(ops["ci.step_log"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3473
+ }
3474
+ }
3475
+
3476
+ class RepoIssuesResource {
3477
+ core;
3478
+ bound;
3479
+ constructor(core, bound) {
3480
+ this.core = core;
3481
+ this.bound = bound;
3482
+ }
3483
+ claim(input, opts) {
3484
+ return this.core.request(ops["issues.claim"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3485
+ }
3486
+ close(input, opts) {
3487
+ return this.core.request(ops["issues.close"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3488
+ }
3489
+ comment(input, opts) {
3490
+ return this.core.request(ops["issues.comment"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3491
+ }
3492
+ commentDelete(input, opts) {
3493
+ return this.core.request(ops["issues.comment_delete"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3494
+ }
3495
+ commentEdit(input, opts) {
3496
+ return this.core.request(ops["issues.comment_edit"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3497
+ }
3498
+ commentReact(input, opts) {
3499
+ return this.core.request(ops["issues.comment_react"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3500
+ }
3501
+ commentUnreact(input, opts) {
3502
+ return this.core.request(ops["issues.comment_unreact"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3503
+ }
3504
+ context(input, opts) {
3505
+ return this.core.request(ops["issues.context"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3506
+ }
3507
+ create(input, opts) {
3508
+ return this.core.request(ops["issues.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3509
+ }
3510
+ createBatch(input, opts) {
3511
+ return this.core.request(ops["issues.create_batch"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3512
+ }
3513
+ get(input, opts) {
3514
+ return this.core.request(ops["issues.get"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3515
+ }
3516
+ list(input = {}, opts) {
3517
+ return this.core.request(ops["issues.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3518
+ }
3519
+ next(input = {}, opts) {
3520
+ return this.core.request(ops["issues.next"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3521
+ }
3522
+ react(input, opts) {
3523
+ return this.core.request(ops["issues.react"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3524
+ }
3525
+ related(input = {}, opts) {
3526
+ return this.core.request(ops["issues.related"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3527
+ }
3528
+ release(input, opts) {
3529
+ return this.core.request(ops["issues.release"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3530
+ }
3531
+ similar(input, opts) {
3532
+ return this.core.request(ops["issues.similar"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3533
+ }
3534
+ async start(input, opts) {
3535
+ const out = await this.core.request(ops["issues.start"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3536
+ return new Caisson(this.core, { id: out["caisson"]["id"], owner: this.bound["owner"], repo: this.bound["repo"] });
3537
+ }
3538
+ subscribe(input, opts) {
3539
+ return this.core.request(ops["issues.subscribe"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3540
+ }
3541
+ unreact(input, opts) {
3542
+ return this.core.request(ops["issues.unreact"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3543
+ }
3544
+ update(input, opts) {
3545
+ return this.core.request(ops["issues.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3546
+ }
3547
+ }
3548
+
3549
+ class RepoLabelsResource {
3550
+ core;
3551
+ bound;
3552
+ constructor(core, bound) {
3553
+ this.core = core;
3554
+ this.bound = bound;
3555
+ }
3556
+ create(input, opts) {
3557
+ return this.core.request(ops["labels.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3558
+ }
3559
+ delete(input, opts) {
3560
+ return this.core.request(ops["labels.delete"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3561
+ }
3562
+ list(input = {}, opts) {
3563
+ return this.core.request(ops["labels.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3564
+ }
3565
+ update(input, opts) {
3566
+ return this.core.request(ops["labels.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3567
+ }
3568
+ }
3569
+
3570
+ class RepoMerge_queueResource {
3571
+ core;
3572
+ bound;
3573
+ constructor(core, bound) {
3574
+ this.core = core;
3575
+ this.bound = bound;
3576
+ }
3577
+ status(input = {}, opts) {
3578
+ return this.core.request(ops["merge_queue.status"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3579
+ }
3580
+ }
3581
+
3582
+ class RepoMilestonesResource {
3583
+ core;
3584
+ bound;
3585
+ constructor(core, bound) {
3586
+ this.core = core;
3587
+ this.bound = bound;
3588
+ }
3589
+ create(input, opts) {
3590
+ return this.core.request(ops["milestones.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3591
+ }
3592
+ delete(input, opts) {
3593
+ return this.core.request(ops["milestones.delete"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3594
+ }
3595
+ list(input = {}, opts) {
3596
+ return this.core.request(ops["milestones.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3597
+ }
3598
+ update(input, opts) {
3599
+ return this.core.request(ops["milestones.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3600
+ }
3601
+ }
3602
+
3603
+ class RepoNotesResource {
3604
+ core;
3605
+ bound;
3606
+ constructor(core, bound) {
3607
+ this.core = core;
3608
+ this.bound = bound;
3609
+ }
3610
+ create(input, opts) {
3611
+ return this.core.request(ops["notes.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3612
+ }
3613
+ delete(input, opts) {
3614
+ return this.core.request(ops["notes.delete"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3615
+ }
3616
+ list(input = {}, opts) {
3617
+ return this.core.request(ops["notes.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3618
+ }
3619
+ update(input, opts) {
3620
+ return this.core.request(ops["notes.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3621
+ }
3622
+ }
3623
+
3624
+ class RepoPullsResource {
3625
+ core;
3626
+ bound;
3627
+ constructor(core, bound) {
3628
+ this.core = core;
3629
+ this.bound = bound;
3630
+ }
3631
+ async create(input, opts) {
3632
+ const out = await this.core.request(ops["pulls.create"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3633
+ return new PullRequest(this.core, { number: out["number"], owner: this.bound["owner"], repo: this.bound["repo"] });
3634
+ }
3635
+ list(input = {}, opts) {
3636
+ return this.core.request(ops["pulls.list"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3637
+ }
3638
+ }
3639
+
3640
+ class RepoReposResource {
3641
+ core;
3642
+ bound;
3643
+ constructor(core, bound) {
3644
+ this.core = core;
3645
+ this.bound = bound;
3646
+ }
3647
+ get(input = {}, opts) {
3648
+ return this.core.request(ops["repos.get"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3649
+ }
3650
+ update(input = {}, opts) {
3651
+ return this.core.request(ops["repos.update"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3652
+ }
3653
+ }
3654
+
3655
+ class RepoSymbolsResource {
3656
+ core;
3657
+ bound;
3658
+ constructor(core, bound) {
3659
+ this.core = core;
3660
+ this.bound = bound;
3661
+ }
3662
+ find(input = {}, opts) {
3663
+ return this.core.request(ops["symbols.find"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3664
+ }
3665
+ refs(input = {}, opts) {
3666
+ return this.core.request(ops["symbols.refs"], { ...input, owner: this.bound["owner"], repo: this.bound["repo"] }, opts);
3667
+ }
3668
+ }
3669
+
3670
+ class Repo {
3671
+ core;
3672
+ bound;
3673
+ check_runs;
3674
+ ci;
3675
+ issues;
3676
+ labels;
3677
+ merge_queue;
3678
+ milestones;
3679
+ notes;
3680
+ pulls;
3681
+ repos;
3682
+ symbols;
3683
+ constructor(core, bound) {
3684
+ this.core = core;
3685
+ this.bound = bound;
3686
+ this.check_runs = new RepoCheck_runsResource(core, bound);
3687
+ this.ci = new RepoCiResource(core, bound);
3688
+ this.issues = new RepoIssuesResource(core, bound);
3689
+ this.labels = new RepoLabelsResource(core, bound);
3690
+ this.merge_queue = new RepoMerge_queueResource(core, bound);
3691
+ this.milestones = new RepoMilestonesResource(core, bound);
3692
+ this.notes = new RepoNotesResource(core, bound);
3693
+ this.pulls = new RepoPullsResource(core, bound);
3694
+ this.repos = new RepoReposResource(core, bound);
3695
+ this.symbols = new RepoSymbolsResource(core, bound);
3696
+ }
3697
+ caisson(id) {
3698
+ return new Caisson(this.core, { ...this.bound, id });
3699
+ }
3700
+ pull(number) {
3701
+ return new PullRequest(this.core, { ...this.bound, number });
3702
+ }
3703
+ }
3704
+ function resources(core) {
3705
+ return {
3706
+ caissons: new CaissonsResource(core),
3707
+ check_runs: new Check_runsResource(core),
3708
+ ci: new CiResource(core),
3709
+ event_subscriptions: new Event_subscriptionsResource(core),
3710
+ events: new EventsResource(core),
3711
+ github: new GithubResource(core),
3712
+ held: new HeldResource(core),
3713
+ inbox: new InboxResource(core),
3714
+ issues: new IssuesResource(core),
3715
+ keys: new KeysResource(core),
3716
+ labels: new LabelsResource(core),
3717
+ me: new MeResource(core),
3718
+ merge_queue: new Merge_queueResource(core),
3719
+ milestones: new MilestonesResource(core),
3720
+ notes: new NotesResource(core),
3721
+ pulls: new PullsResource(core),
3722
+ repos: new ReposResource(core),
3723
+ sandboxes: new SandboxesResource(core),
3724
+ search: new SearchResource(core),
3725
+ symbols: new SymbolsResource(core),
3726
+ tokens: new TokensResource(core),
3727
+ waits: new WaitsResource(core)
3728
+ };
3729
+ }
3730
+
3731
+ // src/index.ts
3732
+ class Sailfork {
3733
+ core;
3734
+ constructor(options = {}) {
3735
+ this.core = new Core(options);
3736
+ Object.assign(this, resources(this.core));
3737
+ }
3738
+ repo(name) {
3739
+ const [owner, repo, ...rest] = name.split("/");
3740
+ if (!owner || !repo || rest.length > 0)
3741
+ throw new Error(`a repository is owner/name, got ${name}`);
3742
+ return new Repo(this.core, { owner, repo });
3743
+ }
3744
+ org(handle) {
3745
+ return new Org(this.core, { org: handle });
3746
+ }
3747
+ wait(target, options) {
3748
+ return wait(this.core, target, options);
3749
+ }
3750
+ }
3751
+ var src_default = Sailfork;
3752
+ export {
3753
+ API_VERSION,
3754
+ AgentPolicyError,
3755
+ AuthenticationError,
3756
+ Caisson,
3757
+ CaissonsResource,
3758
+ Check_runsResource,
3759
+ CiResource,
3760
+ ConflictError,
3761
+ ConnectionError,
3762
+ Core,
3763
+ ERROR_CODES,
3764
+ Event_subscriptionsResource,
3765
+ EventsResource,
3766
+ GithubResource,
3767
+ HeldResource,
3768
+ InboxResource,
3769
+ InvalidRequestError,
3770
+ IssuesResource,
3771
+ KeysResource,
3772
+ LabelsResource,
3773
+ MeResource,
3774
+ Merge_queueResource,
3775
+ MilestonesResource,
3776
+ NotFoundError,
3777
+ NotesResource,
3778
+ Org,
3779
+ OrgCaissonsResource,
3780
+ OrgHeldResource,
3781
+ OrgSandboxesResource,
3782
+ PermissionError,
3783
+ PullRequest,
3784
+ PullsResource,
3785
+ RateLimitError,
3786
+ Repo,
3787
+ RepoCheck_runsResource,
3788
+ RepoCiResource,
3789
+ RepoIssuesResource,
3790
+ RepoLabelsResource,
3791
+ RepoMerge_queueResource,
3792
+ RepoMilestonesResource,
3793
+ RepoNotesResource,
3794
+ RepoPullsResource,
3795
+ RepoReposResource,
3796
+ RepoSymbolsResource,
3797
+ ReposResource,
3798
+ Sailfork,
3799
+ SailforkError,
3800
+ SandboxesResource,
3801
+ SearchResource,
3802
+ ServerError,
3803
+ SymbolsResource,
3804
+ TimeoutError,
3805
+ TokensResource,
3806
+ UnavailableForLegalReasonsError,
3807
+ VERSION,
3808
+ WaitsResource,
3809
+ src_default as default,
3810
+ detectAgent,
3811
+ detectSession,
3812
+ resources
3813
+ };