@shipd-ai/cli 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +172 -42
  2. package/dist/auth.d.ts +9 -5
  3. package/dist/auth.js +43 -10
  4. package/dist/author.d.ts +11 -0
  5. package/dist/author.js +43 -0
  6. package/dist/backend.d.ts +4 -0
  7. package/dist/backend.js +51 -0
  8. package/dist/checks-view.d.ts +10 -0
  9. package/dist/checks-view.js +12 -0
  10. package/dist/client.d.ts +0 -8
  11. package/dist/client.js +0 -7
  12. package/dist/commands/auth.d.ts +9 -4
  13. package/dist/commands/auth.js +29 -41
  14. package/dist/commands/author-checks.d.ts +306 -0
  15. package/dist/commands/author-checks.js +430 -0
  16. package/dist/commands/author-content.d.ts +198 -0
  17. package/dist/commands/author-content.js +102 -0
  18. package/dist/commands/checks.d.ts +0 -2
  19. package/dist/commands/checks.js +21 -17
  20. package/dist/commands/problems.d.ts +1 -0
  21. package/dist/commands/problems.js +196 -0
  22. package/dist/commands/quests.d.ts +0 -1
  23. package/dist/commands/quests.js +0 -1
  24. package/dist/commands/runs.d.ts +54 -0
  25. package/dist/commands/runs.js +143 -0
  26. package/dist/content.d.ts +105 -0
  27. package/dist/content.js +240 -0
  28. package/dist/contract.d.ts +0 -1
  29. package/dist/contract.js +0 -7
  30. package/dist/errors.d.ts +3 -1
  31. package/dist/errors.js +6 -5
  32. package/dist/format.d.ts +2 -4
  33. package/dist/format.js +29 -7
  34. package/dist/harbor.d.ts +0 -8
  35. package/dist/harbor.js +0 -11
  36. package/dist/index-gate.d.ts +1 -0
  37. package/dist/index-gate.js +5 -0
  38. package/dist/index.js +15 -10
  39. package/dist/model.d.ts +128 -0
  40. package/dist/model.js +68 -0
  41. package/dist/plan.d.ts +0 -15
  42. package/dist/plan.js +0 -21
  43. package/dist/prompt.d.ts +5 -0
  44. package/dist/prompt.js +26 -0
  45. package/dist/quests.d.ts +2 -10
  46. package/dist/quests.js +51 -34
  47. package/dist/report.d.ts +0 -9
  48. package/dist/report.js +1 -7
  49. package/dist/runs.d.ts +36 -0
  50. package/dist/runs.js +59 -0
  51. package/dist/usage.d.ts +2 -0
  52. package/dist/usage.js +16 -0
  53. package/package.json +3 -2
@@ -0,0 +1,430 @@
1
+ import { defineCommand } from "citty";
2
+ import { api, backend, connectAuthor, requireProblemVersion } from "../author.js";
3
+ import { buildChecksViewPayload } from "../checks-view.js";
4
+ import { RefusedError, UsageError } from "../errors.js";
5
+ import { dim, paint, printJson, statusBadge, text, truncate } from "../format.js";
6
+ import { formatDynamicCheckLabel, getDynamicCheckEntries, precheckStages, } from "../model.js";
7
+ import { DEFAULT_QUEST } from "../quests.js";
8
+ export const questArg = {
9
+ quest: {
10
+ type: "string",
11
+ description: `Quest to talk to (default: ${DEFAULT_QUEST})`,
12
+ default: DEFAULT_QUEST,
13
+ },
14
+ };
15
+ const color = () => Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;
16
+ export const RUN_ALL_CHECK_KEYS = [
17
+ "verifyTests",
18
+ "verifySolution",
19
+ "verifyFlakiness",
20
+ "descriptionQuality",
21
+ "solutionQuality",
22
+ "rewardHacking",
23
+ "verifyFairness",
24
+ ];
25
+ function printWaiting(result) {
26
+ if (typeof result !== "object" || result === null)
27
+ return;
28
+ const { waiting, running } = result;
29
+ if (Array.isArray(waiting) && waiting.length > 0) {
30
+ console.log(` Waiting for a prerequisite: ${text(waiting.join(", "))}`);
31
+ }
32
+ if (Array.isArray(running) && running.length > 0) {
33
+ console.log(` Still running (not started again): ${text(running.join(", "))}`);
34
+ }
35
+ }
36
+ function formatCheckVerdict(check) {
37
+ const verdict = check.output?.verdict ??
38
+ check.output?.evaluation?.verdict;
39
+ return verdict ?? null;
40
+ }
41
+ function formatCheckMessage(check) {
42
+ const message = check.output?.message ??
43
+ check.output?.summary ??
44
+ check.output?.evaluation?.summary;
45
+ return message ?? null;
46
+ }
47
+ export function printPrechecks(results, c, emptyLine = true) {
48
+ const stageList = precheckStages(results);
49
+ if (stageList.length === 0) {
50
+ if (emptyLine)
51
+ console.log(` Prechecks:\n ${dim("No prechecks yet.", c)}`);
52
+ return;
53
+ }
54
+ console.log(" Prechecks:");
55
+ for (const stage of stageList) {
56
+ const stale = stage.stale ? ` ${paint("yellow", "(stale)", c)}` : "";
57
+ console.log(` ${statusBadge(String(stage.status ?? "").toLowerCase(), c)} ${text(stage.name ?? stage.id)}${stale}`);
58
+ for (const check of stage.checks ?? []) {
59
+ const msg = check.message ? ` ${truncate(text(check.message), 70)}` : "";
60
+ console.log(` ${statusBadge(String(check.status ?? "").toLowerCase(), c)} ${text(check.description ?? check.id)}${msg}`);
61
+ }
62
+ }
63
+ }
64
+ export function printQualityChecks(dynamicChecks, c, emptyLine = true) {
65
+ const checks = getDynamicCheckEntries(dynamicChecks);
66
+ if (checks.length === 0) {
67
+ if (emptyLine)
68
+ console.log(`\n Quality Checks:\n ${dim("No quality checks yet.", c)}`);
69
+ return;
70
+ }
71
+ console.log("\n Quality Checks:");
72
+ for (const check of checks) {
73
+ const stale = check.stale ? ` ${paint("yellow", "(stale)", c)}` : "";
74
+ const overridden = check.overridden ? ` ${paint("yellow", "(overridden)", c)}` : "";
75
+ const verdict = formatCheckVerdict(check);
76
+ const message = formatCheckMessage(check);
77
+ const suffix = `${verdict ? ` [${text(verdict)}]` : ""}${message ? ` ${truncate(text(message), 70)}` : ""}`;
78
+ const key = text(check.key);
79
+ console.log(` ${statusBadge(check.status, c)} ${text(formatDynamicCheckLabel(check.key))} (${key})${suffix}${stale}${overridden}`);
80
+ if (check.error) {
81
+ console.log(` ${paint("red", `Error: ${truncate(text(check.error), 90)}`, c)}`);
82
+ }
83
+ }
84
+ }
85
+ export function printTrialQa(trialQa, c) {
86
+ if (!trialQa)
87
+ return;
88
+ const parts = [`${statusBadge(trialQa.state, c)} Trial QA`];
89
+ if (trialQa.state === "running" && trialQa.currentStep) {
90
+ parts.push(` ${truncate(text(trialQa.currentStep), 60)}`);
91
+ }
92
+ if (trialQa.runRuleWaitsOn)
93
+ parts.push(` ${truncate(text(trialQa.runRuleWaitsOn), 70)}`);
94
+ if (trialQa.runsChangedSinceCheck) {
95
+ parts.push(` ${paint("yellow", "(runs changed since the check)", c)}`);
96
+ }
97
+ if (trialQa.warnings?.length) {
98
+ parts.push(` ${paint("yellow", `(${text(trialQa.warnings.join(", "))})`, c)}`);
99
+ }
100
+ console.log(`\n Trial QA:\n ${parts.join("")}`);
101
+ if (trialQa.canRun && trialQa.hasEligibleRuns && trialQa.state !== "running") {
102
+ console.log(` ${dim(`${trialQa.tokenCost ?? 0} tokens to run`, c)}`);
103
+ }
104
+ }
105
+ export function printScopeGate(gate, c) {
106
+ if (!gate)
107
+ return;
108
+ const verdict = gate.latestVerdict ?? (gate.inFlight ? "running" : "not_run");
109
+ const stale = gate.latestVerdict && !gate.fresh
110
+ ? ` ${paint("yellow", gate.staleReason === "series" ? "(stale: a task on this repository changed)" : "(stale: edited since)", c)}`
111
+ : "";
112
+ const inFlight = gate.inFlight ? ` ${dim("(a run is in flight)", c)}` : "";
113
+ console.log(`\n Scope Gate:\n ${statusBadge(verdict, c)} Scope Gate${stale}${inFlight}`);
114
+ const output = gate.verdictRun?.output;
115
+ if (output?.reasoning) {
116
+ console.log(` ${truncate(text(output.reasoning), 160)}`);
117
+ }
118
+ for (const finding of output?.findings ?? []) {
119
+ const label = [finding.category, finding.severity].filter(Boolean).map(text).join(" / ");
120
+ const summary = finding.summary ? ` ${truncate(text(finding.summary), 120)}` : "";
121
+ if (label || summary)
122
+ console.log(` - ${label}${summary}`);
123
+ }
124
+ const error = gate.current?.error ?? gate.verdictRun?.error;
125
+ if (error)
126
+ console.log(` ${paint("red", `Error: ${truncate(text(error), 90)}`, c)}`);
127
+ }
128
+ export function printReadiness(readiness, c) {
129
+ if (!readiness)
130
+ return;
131
+ console.log("\n Submission Readiness:");
132
+ for (const criterion of readiness.criteria) {
133
+ const detail = criterion.detail ? ` ${text(criterion.detail)}` : "";
134
+ const stale = criterion.stale ? ` ${paint("yellow", "(stale)", c)}` : "";
135
+ console.log(` ${statusBadge(criterion.status, c)} ${text(criterion.label)}${detail}${stale}`);
136
+ }
137
+ }
138
+ function printNextCommands(problemId, quest) {
139
+ const questFlag = quest === DEFAULT_QUEST ? "" : ` --quest ${quest}`;
140
+ console.log("\n Commands:");
141
+ console.log(` shipd problems view ${problemId}${questFlag} Full challenge detail`);
142
+ console.log(` shipd checks run-prechecks ${problemId}${questFlag} Run the prechecks`);
143
+ console.log(` shipd checks run-scope-gate ${problemId}${questFlag} Run the Scope Gate`);
144
+ console.log(` shipd checks run-all ${problemId}${questFlag} Run the quality checks`);
145
+ console.log(` shipd checks run-trial-qa ${problemId}${questFlag} Run Trial QA`);
146
+ console.log(` shipd checks wait ${problemId}${questFlag} Watch active checks`);
147
+ }
148
+ async function readChecks(quest, problemId) {
149
+ const client = await connectAuthor(quest);
150
+ const { problem, version } = await requireProblemVersion(client, problemId);
151
+ const [stages, scopeGate, dynamicChecks, trialQa, readiness] = await backend(() => Promise.all([
152
+ client.query(api.stages.getValidationResults, {
153
+ itemId: problemId,
154
+ versionId: version._id,
155
+ }),
156
+ client.query(api.scopeGate.getScopeGate, {
157
+ versionId: version._id,
158
+ }),
159
+ client.query(api.runDynamicChecks.getDynamicChecks, { versionId: version._id }),
160
+ client.query(api.fpReview.getFpCheckForVersion, { versionId: version._id }),
161
+ client.query(api.submissionReadiness.getSubmissionReadiness, { problemId }),
162
+ ]));
163
+ return { client, problem, version, stages, scopeGate, dynamicChecks, trialQa, readiness };
164
+ }
165
+ const tokensArg = {
166
+ "use-general-tokens": {
167
+ type: "boolean",
168
+ description: "Charge general tokens instead of revision tokens",
169
+ },
170
+ };
171
+ export const view = defineCommand({
172
+ meta: {
173
+ name: "view",
174
+ description: "View a challenge's prechecks, quality checks, Trial QA and readiness",
175
+ },
176
+ args: {
177
+ id: { type: "positional", description: "Challenge ID", required: true },
178
+ ...questArg,
179
+ json: { type: "boolean", description: "Output as JSON" },
180
+ },
181
+ run: async ({ args }) => {
182
+ const { version, stages, scopeGate, dynamicChecks, trialQa, readiness } = await readChecks(args.quest, args.id);
183
+ if (args.json) {
184
+ printJson(buildChecksViewPayload({
185
+ version: version.version,
186
+ prechecks: stages,
187
+ scopeGate,
188
+ dynamicChecks,
189
+ trialQa,
190
+ readiness,
191
+ }));
192
+ return;
193
+ }
194
+ const c = color();
195
+ console.log(`\n Checks for v${version.version}\n`);
196
+ printPrechecks(stages, c);
197
+ printScopeGate(scopeGate, c);
198
+ printQualityChecks(dynamicChecks, c);
199
+ printTrialQa(trialQa, c);
200
+ printReadiness(readiness, c);
201
+ printNextCommands(args.id, args.quest);
202
+ console.log(`\n ${dim("Use --json for the full check payload.", c)}\n`);
203
+ },
204
+ });
205
+ export const runCheck = defineCommand({
206
+ meta: { name: "run-check", description: "Run one of a challenge's quality checks" },
207
+ args: {
208
+ id: { type: "positional", description: "Challenge ID", required: true },
209
+ ...questArg,
210
+ check: {
211
+ type: "string",
212
+ description: `Check key: ${RUN_ALL_CHECK_KEYS.join(", ")}`,
213
+ required: true,
214
+ },
215
+ ...tokensArg,
216
+ json: { type: "boolean", description: "Output as JSON" },
217
+ },
218
+ run: async ({ args }) => {
219
+ if (!RUN_ALL_CHECK_KEYS.includes(args.check)) {
220
+ throw new UsageError(`Not a check the page runs: ${args.check}. One of: ${RUN_ALL_CHECK_KEYS.join(", ")}.`);
221
+ }
222
+ const client = await connectAuthor(args.quest);
223
+ const { version } = await requireProblemVersion(client, args.id);
224
+ const result = await backend(() => client.action(api.runDynamicChecks.triggerDynamicCheck, {
225
+ versionId: version._id,
226
+ checkKey: args.check,
227
+ useGeneralTokens: args["use-general-tokens"],
228
+ }));
229
+ if (args.json) {
230
+ printJson(result);
231
+ return;
232
+ }
233
+ const c = color();
234
+ console.log(`\n Triggered ${args.check} on v${version.version}`);
235
+ printWaiting(result);
236
+ console.log(` ${dim("Use `shipd checks wait <id>` to watch active checks.", c)}\n`);
237
+ },
238
+ });
239
+ export const runAll = defineCommand({
240
+ meta: {
241
+ name: "run-all",
242
+ description: "Run the quality checks the page's Run Checks runs",
243
+ },
244
+ args: {
245
+ id: { type: "positional", description: "Challenge ID", required: true },
246
+ ...questArg,
247
+ ...tokensArg,
248
+ json: { type: "boolean", description: "Output as JSON" },
249
+ },
250
+ run: async ({ args }) => {
251
+ const client = await connectAuthor(args.quest);
252
+ const { version } = await requireProblemVersion(client, args.id);
253
+ const result = await backend(() => client.action(api.runDynamicChecks.triggerAllDynamicChecks, {
254
+ versionId: version._id,
255
+ checkKeys: [...RUN_ALL_CHECK_KEYS],
256
+ useGeneralTokens: args["use-general-tokens"],
257
+ }));
258
+ if (args.json) {
259
+ printJson({ result, checkKeys: RUN_ALL_CHECK_KEYS });
260
+ return;
261
+ }
262
+ const c = color();
263
+ console.log(`\n Triggered ${RUN_ALL_CHECK_KEYS.length} quality checks on v${version.version}`);
264
+ printWaiting(result);
265
+ console.log(` ${dim("Use `shipd checks wait <id>` to watch active checks.", c)}\n`);
266
+ },
267
+ });
268
+ export const runPrechecks = defineCommand({
269
+ meta: { name: "run-prechecks", description: "Run the prechecks on the saved version" },
270
+ args: {
271
+ id: { type: "positional", description: "Challenge ID", required: true },
272
+ ...questArg,
273
+ ...tokensArg,
274
+ json: { type: "boolean", description: "Output as JSON" },
275
+ },
276
+ run: async ({ args }) => {
277
+ const client = await connectAuthor(args.quest);
278
+ const { version } = await requireProblemVersion(client, args.id);
279
+ const result = await backend(() => client.action(api.contributorTokens.runAllChecksWithToken, {
280
+ problemId: args.id,
281
+ versionId: version._id,
282
+ useGeneralTokens: args["use-general-tokens"],
283
+ }));
284
+ if (args.json) {
285
+ printJson(result);
286
+ return;
287
+ }
288
+ const c = color();
289
+ console.log(`\n Ran the prechecks on v${version.version}\n`);
290
+ printPrechecks(result, c);
291
+ console.log(`\n ${dim("Use `shipd checks view <id>` for the stored results.", c)}\n`);
292
+ },
293
+ });
294
+ export const runTrialQa = defineCommand({
295
+ meta: { name: "run-trial-qa", description: "Run Trial QA on the current rollouts" },
296
+ args: {
297
+ id: { type: "positional", description: "Challenge ID", required: true },
298
+ ...questArg,
299
+ ...tokensArg,
300
+ json: { type: "boolean", description: "Output as JSON" },
301
+ },
302
+ run: async ({ args }) => {
303
+ const client = await connectAuthor(args.quest);
304
+ const { version } = await requireProblemVersion(client, args.id);
305
+ const result = await backend(() => client.action(api.fpReview.requestFpCheck, {
306
+ versionId: version._id,
307
+ useGeneralTokens: args["use-general-tokens"],
308
+ }));
309
+ if (args.json) {
310
+ printJson(result);
311
+ return;
312
+ }
313
+ const c = color();
314
+ console.log(`\n Started Trial QA on v${version.version}`);
315
+ console.log(` ${dim("Use `shipd checks wait <id>` to watch it.", c)}\n`);
316
+ },
317
+ });
318
+ export const runScopeGate = defineCommand({
319
+ meta: {
320
+ name: "run-scope-gate",
321
+ description: "Run the Scope Gate on the saved version (after the prechecks pass)",
322
+ },
323
+ args: {
324
+ id: { type: "positional", description: "Challenge ID", required: true },
325
+ ...questArg,
326
+ ...tokensArg,
327
+ json: { type: "boolean", description: "Output as JSON" },
328
+ },
329
+ run: async ({ args }) => {
330
+ const client = await connectAuthor(args.quest);
331
+ const { version } = await requireProblemVersion(client, args.id);
332
+ const result = (await backend(() => client.action(api.scopeGate.triggerScopeGate, {
333
+ versionId: version._id,
334
+ useGeneralTokens: args["use-general-tokens"] || undefined,
335
+ })));
336
+ if (args.json) {
337
+ printJson(result);
338
+ return;
339
+ }
340
+ const c = color();
341
+ console.log(`\n Started the Scope Gate on v${version.version}`);
342
+ if (result?.jobId)
343
+ console.log(` ${dim(`Job ${text(result.jobId)}`, c)}`);
344
+ console.log(` ${dim(`Use \`shipd checks wait ${text(args.id)}\` to watch it; the quality checks unlock on a pass.`, c)}\n`);
345
+ },
346
+ });
347
+ export const wait = defineCommand({
348
+ meta: { name: "wait", description: "Wait for a challenge's active checks to finish" },
349
+ args: {
350
+ id: { type: "positional", description: "Challenge ID", required: true },
351
+ ...questArg,
352
+ interval: { type: "string", description: "Poll interval in seconds (default 10)" },
353
+ timeout: { type: "string", description: "Timeout in minutes (default 30)" },
354
+ json: { type: "boolean", description: "Output final result as JSON" },
355
+ },
356
+ run: async ({ args }) => {
357
+ const client = await connectAuthor(args.quest);
358
+ const clamp = (value, fallback, min, max) => Math.min(max, Math.max(min, Number.parseInt(value ?? "", 10) || fallback));
359
+ const intervalMs = clamp(args.interval, 10, 1, 60 * 60) * 1000;
360
+ const timeoutMs = clamp(args.timeout, 30, 1, 24 * 60) * 60 * 1000;
361
+ const startedAt = Date.now();
362
+ const problemId = args.id;
363
+ const { version } = await requireProblemVersion(client, problemId);
364
+ console.error(` Waiting for active checks on v${version.version}...`);
365
+ while (Date.now() - startedAt < timeoutMs) {
366
+ const [dynamicChecks, order, trialQa, stages, scopeGate] = await backend(() => Promise.all([
367
+ client.query(api.runDynamicChecks.getDynamicChecks, { versionId: version._id }),
368
+ client.query(api.runDynamicChecks.getCheckOrder, { versionId: version._id }),
369
+ client.query(api.fpReview.getFpCheckForVersion, {
370
+ versionId: version._id,
371
+ }),
372
+ client.query(api.stages.getValidationResults, {
373
+ itemId: problemId,
374
+ versionId: version._id,
375
+ }),
376
+ client.query(api.scopeGate.getScopeGate, {
377
+ versionId: version._id,
378
+ }),
379
+ ]));
380
+ const checks = getDynamicCheckEntries(dynamicChecks);
381
+ const waitingCount = order?.waiting?.length ?? 0;
382
+ const running = checks.filter((check) => check.status === "pending" || check.status === "running");
383
+ const trialQaActive = trialQa?.state === "running" ? 1 : 0;
384
+ const pendingPrechecks = precheckStages(stages).filter((stage) => String(stage.status ?? "").toLowerCase() === "pending").length;
385
+ const gateActive = scopeGate?.inFlight ? 1 : 0;
386
+ const activeCount = running.length + waitingCount + trialQaActive + pendingPrechecks + gateActive;
387
+ const terminal = checks.filter((check) => check.status === "completed" || check.status === "failed");
388
+ const elapsed = Math.round((Date.now() - startedAt) / 1000);
389
+ process.stderr.write(`\r ${terminal.length} complete, ${activeCount} active, ${checks.length + trialQaActive + pendingPrechecks + gateActive} total (${elapsed}s)`);
390
+ if (activeCount === 0) {
391
+ console.error("");
392
+ const readiness = await backend(() => client.query(api.submissionReadiness.getSubmissionReadiness, { problemId }));
393
+ if (args.json) {
394
+ printJson({
395
+ prechecks: stages,
396
+ scopeGate,
397
+ dynamicChecks,
398
+ trialQa,
399
+ readiness,
400
+ version: version.version,
401
+ });
402
+ }
403
+ else {
404
+ const c = color();
405
+ console.log("");
406
+ printPrechecks(stages, c, false);
407
+ printScopeGate(scopeGate, c);
408
+ printQualityChecks(dynamicChecks, c);
409
+ printTrialQa(trialQa, c);
410
+ printReadiness(readiness, c);
411
+ printNextCommands(problemId, args.quest);
412
+ console.log("");
413
+ }
414
+ return;
415
+ }
416
+ await new Promise((resolve) => setTimeout(resolve, intervalMs));
417
+ }
418
+ console.error("");
419
+ throw new RefusedError("Timed out waiting for checks.");
420
+ },
421
+ });
422
+ export const authorChecks = {
423
+ view,
424
+ "run-check": runCheck,
425
+ "run-all": runAll,
426
+ "run-prechecks": runPrechecks,
427
+ "run-scope-gate": runScopeGate,
428
+ "run-trial-qa": runTrialQa,
429
+ wait,
430
+ };
@@ -0,0 +1,198 @@
1
+ export declare const create: import("citty").CommandDef<{
2
+ readonly json: {
3
+ readonly type: "boolean";
4
+ readonly description: "Output the new ids as JSON";
5
+ };
6
+ readonly quest: {
7
+ readonly type: "string";
8
+ readonly description: "Quest to talk to (default: olympus)";
9
+ readonly default: "olympus";
10
+ };
11
+ readonly title: {
12
+ readonly type: "string";
13
+ readonly description: "Title";
14
+ };
15
+ readonly language: {
16
+ readonly type: "string";
17
+ readonly description: "Language (as the page lists it)";
18
+ };
19
+ readonly category: {
20
+ readonly type: "string";
21
+ readonly description: "Category (as the page lists it)";
22
+ };
23
+ readonly difficulty: {
24
+ readonly type: "string";
25
+ readonly description: "Difficulty (as the page lists it)";
26
+ };
27
+ readonly repo: {
28
+ readonly type: "string";
29
+ readonly description: "GitHub repository URL";
30
+ };
31
+ readonly commit: {
32
+ readonly type: "string";
33
+ readonly description: "Commit hash";
34
+ };
35
+ readonly issue: {
36
+ readonly type: "string";
37
+ readonly description: "GitHub issue URL";
38
+ };
39
+ readonly "test-output-mode": {
40
+ readonly type: "string";
41
+ readonly description: `Test output mode: ${string}`;
42
+ };
43
+ readonly "estimated-loc": {
44
+ readonly type: "string";
45
+ readonly description: "Estimated lines of code (whole number)";
46
+ };
47
+ readonly "description-file": {
48
+ readonly type: "string";
49
+ readonly description: "File holding the description (- = stdin)";
50
+ };
51
+ readonly "dockerfile-file": {
52
+ readonly type: "string";
53
+ readonly description: "File holding the Dockerfile (- = stdin)";
54
+ };
55
+ readonly "test-patch-file": {
56
+ readonly type: "string";
57
+ readonly description: "File holding the test patch (- = stdin)";
58
+ };
59
+ readonly "solution-patch-file": {
60
+ readonly type: "string";
61
+ readonly description: "File holding the solution patch (- = stdin)";
62
+ };
63
+ readonly "approach-file": {
64
+ readonly type: "string";
65
+ readonly description: "File holding the solution approach (- = stdin)";
66
+ };
67
+ readonly "env-file": {
68
+ readonly type: "string";
69
+ readonly description: "File holding the environment description (- = stdin)";
70
+ };
71
+ readonly "hint-file": {
72
+ readonly type: "string";
73
+ readonly description: "File holding the hint (- = stdin)";
74
+ };
75
+ readonly "hint-justification-file": {
76
+ readonly type: "string";
77
+ readonly description: "File holding the hint justification (- = stdin)";
78
+ };
79
+ readonly dir: {
80
+ readonly type: "string";
81
+ readonly alias: "d";
82
+ readonly description: `Directory of content files (task.json, ${string})`;
83
+ };
84
+ }>;
85
+ export declare const pull: import("citty").CommandDef<{
86
+ readonly json: {
87
+ readonly type: "boolean";
88
+ readonly description: "Print the content as JSON instead of writing files";
89
+ };
90
+ readonly quest: {
91
+ readonly type: "string";
92
+ readonly description: "Quest to talk to (default: olympus)";
93
+ readonly default: "olympus";
94
+ };
95
+ readonly id: {
96
+ readonly type: "positional";
97
+ readonly description: "Challenge ID";
98
+ readonly required: true;
99
+ };
100
+ readonly dir: {
101
+ readonly type: "string";
102
+ readonly alias: "d";
103
+ readonly description: "Directory to write (default: the id)";
104
+ };
105
+ }>;
106
+ export declare const push: import("citty").CommandDef<{
107
+ readonly json: {
108
+ readonly type: "boolean";
109
+ readonly description: "Output the saved ids as JSON";
110
+ };
111
+ readonly quest: {
112
+ readonly type: "string";
113
+ readonly description: "Quest to talk to (default: olympus)";
114
+ readonly default: "olympus";
115
+ };
116
+ readonly clear: {
117
+ readonly type: "string";
118
+ readonly description: "Comma-separated text fields to empty (e.g. hintText,githubIssueUrl)";
119
+ };
120
+ readonly title: {
121
+ readonly type: "string";
122
+ readonly description: "Title";
123
+ };
124
+ readonly language: {
125
+ readonly type: "string";
126
+ readonly description: "Language (as the page lists it)";
127
+ };
128
+ readonly category: {
129
+ readonly type: "string";
130
+ readonly description: "Category (as the page lists it)";
131
+ };
132
+ readonly difficulty: {
133
+ readonly type: "string";
134
+ readonly description: "Difficulty (as the page lists it)";
135
+ };
136
+ readonly repo: {
137
+ readonly type: "string";
138
+ readonly description: "GitHub repository URL";
139
+ };
140
+ readonly commit: {
141
+ readonly type: "string";
142
+ readonly description: "Commit hash";
143
+ };
144
+ readonly issue: {
145
+ readonly type: "string";
146
+ readonly description: "GitHub issue URL";
147
+ };
148
+ readonly "test-output-mode": {
149
+ readonly type: "string";
150
+ readonly description: `Test output mode: ${string}`;
151
+ };
152
+ readonly "estimated-loc": {
153
+ readonly type: "string";
154
+ readonly description: "Estimated lines of code (whole number)";
155
+ };
156
+ readonly "description-file": {
157
+ readonly type: "string";
158
+ readonly description: "File holding the description (- = stdin)";
159
+ };
160
+ readonly "dockerfile-file": {
161
+ readonly type: "string";
162
+ readonly description: "File holding the Dockerfile (- = stdin)";
163
+ };
164
+ readonly "test-patch-file": {
165
+ readonly type: "string";
166
+ readonly description: "File holding the test patch (- = stdin)";
167
+ };
168
+ readonly "solution-patch-file": {
169
+ readonly type: "string";
170
+ readonly description: "File holding the solution patch (- = stdin)";
171
+ };
172
+ readonly "approach-file": {
173
+ readonly type: "string";
174
+ readonly description: "File holding the solution approach (- = stdin)";
175
+ };
176
+ readonly "env-file": {
177
+ readonly type: "string";
178
+ readonly description: "File holding the environment description (- = stdin)";
179
+ };
180
+ readonly "hint-file": {
181
+ readonly type: "string";
182
+ readonly description: "File holding the hint (- = stdin)";
183
+ };
184
+ readonly "hint-justification-file": {
185
+ readonly type: "string";
186
+ readonly description: "File holding the hint justification (- = stdin)";
187
+ };
188
+ readonly dir: {
189
+ readonly type: "string";
190
+ readonly alias: "d";
191
+ readonly description: `Directory of content files (task.json, ${string})`;
192
+ };
193
+ readonly id: {
194
+ readonly type: "positional";
195
+ readonly description: "Challenge ID";
196
+ readonly required: true;
197
+ };
198
+ }>;