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