@ora-ai/cli 0.21.0 → 0.23.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 (108) hide show
  1. package/README.md +96 -1
  2. package/dist/auth-commands.d.ts.map +1 -1
  3. package/dist/auth-commands.js +12 -1
  4. package/dist/auth-commands.js.map +1 -1
  5. package/dist/core/auth.d.ts +24 -13
  6. package/dist/core/auth.d.ts.map +1 -1
  7. package/dist/core/auth.js +26 -15
  8. package/dist/core/auth.js.map +1 -1
  9. package/dist/core/credential-sources.d.ts +45 -0
  10. package/dist/core/credential-sources.d.ts.map +1 -0
  11. package/dist/core/credential-sources.js +65 -0
  12. package/dist/core/credential-sources.js.map +1 -0
  13. package/dist/core/github-actions-sign-in.d.ts +33 -0
  14. package/dist/core/github-actions-sign-in.d.ts.map +1 -0
  15. package/dist/core/github-actions-sign-in.js +54 -0
  16. package/dist/core/github-actions-sign-in.js.map +1 -0
  17. package/dist/core/output.js +14 -1
  18. package/dist/core/output.js.map +1 -1
  19. package/dist/core/run-operation.d.ts +11 -4
  20. package/dist/core/run-operation.d.ts.map +1 -1
  21. package/dist/core/run-operation.js +14 -9
  22. package/dist/core/run-operation.js.map +1 -1
  23. package/dist/core/sign-in.d.ts +34 -0
  24. package/dist/core/sign-in.d.ts.map +1 -0
  25. package/dist/core/sign-in.js +21 -0
  26. package/dist/core/sign-in.js.map +1 -0
  27. package/dist/generated/operations.d.ts +1 -1
  28. package/dist/generated/operations.d.ts.map +1 -1
  29. package/dist/generated/operations.js +1274 -73
  30. package/dist/generated/operations.js.map +1 -1
  31. package/dist/generated/types.d.ts +1445 -10
  32. package/dist/generated/types.d.ts.map +1 -1
  33. package/dist/generated/types.js +1 -1
  34. package/dist/mcp/mcp-call.d.ts +25 -0
  35. package/dist/mcp/mcp-call.d.ts.map +1 -0
  36. package/dist/mcp/mcp-call.js +44 -0
  37. package/dist/mcp/mcp-call.js.map +1 -0
  38. package/dist/mcp/mcp-command.d.ts +26 -0
  39. package/dist/mcp/mcp-command.d.ts.map +1 -0
  40. package/dist/mcp/mcp-command.js +91 -0
  41. package/dist/mcp/mcp-command.js.map +1 -0
  42. package/dist/mcp/mcp-install.d.ts +50 -0
  43. package/dist/mcp/mcp-install.d.ts.map +1 -0
  44. package/dist/mcp/mcp-install.js +71 -0
  45. package/dist/mcp/mcp-install.js.map +1 -0
  46. package/dist/mcp/mcp-protocol.d.ts +69 -0
  47. package/dist/mcp/mcp-protocol.d.ts.map +1 -0
  48. package/dist/mcp/mcp-protocol.js +96 -0
  49. package/dist/mcp/mcp-protocol.js.map +1 -0
  50. package/dist/mcp/mcp-stdio.d.ts +17 -0
  51. package/dist/mcp/mcp-stdio.d.ts.map +1 -0
  52. package/dist/mcp/mcp-stdio.js +39 -0
  53. package/dist/mcp/mcp-stdio.js.map +1 -0
  54. package/dist/mcp/mcp-tools.d.ts +81 -0
  55. package/dist/mcp/mcp-tools.d.ts.map +1 -0
  56. package/dist/mcp/mcp-tools.js +134 -0
  57. package/dist/mcp/mcp-tools.js.map +1 -0
  58. package/dist/program.d.ts +4 -9
  59. package/dist/program.d.ts.map +1 -1
  60. package/dist/program.js +9 -3
  61. package/dist/program.js.map +1 -1
  62. package/dist/render/index.js +6 -0
  63. package/dist/render/index.js.map +1 -1
  64. package/dist/render/study/counting-views.d.ts +46 -0
  65. package/dist/render/study/counting-views.d.ts.map +1 -0
  66. package/dist/render/study/counting-views.js +49 -0
  67. package/dist/render/study/counting-views.js.map +1 -0
  68. package/dist/render/study/gate-views.d.ts +56 -0
  69. package/dist/render/study/gate-views.d.ts.map +1 -0
  70. package/dist/render/study/gate-views.js +64 -0
  71. package/dist/render/study/gate-views.js.map +1 -0
  72. package/dist/render/study/renderers.d.ts +8 -0
  73. package/dist/render/study/renderers.d.ts.map +1 -0
  74. package/dist/render/study/renderers.js +31 -0
  75. package/dist/render/study/renderers.js.map +1 -0
  76. package/dist/render/study/series-views.d.ts +65 -0
  77. package/dist/render/study/series-views.d.ts.map +1 -0
  78. package/dist/render/study/series-views.js +116 -0
  79. package/dist/render/study/series-views.js.map +1 -0
  80. package/dist/render/study/study-format.d.ts +24 -0
  81. package/dist/render/study/study-format.d.ts.map +1 -0
  82. package/dist/render/study/study-format.js +42 -0
  83. package/dist/render/study/study-format.js.map +1 -0
  84. package/dist/study-ci/ci-command.d.ts +40 -0
  85. package/dist/study-ci/ci-command.d.ts.map +1 -0
  86. package/dist/study-ci/ci-command.js +151 -0
  87. package/dist/study-ci/ci-command.js.map +1 -0
  88. package/dist/study-ci/ci-rehearse-command.d.ts +11 -0
  89. package/dist/study-ci/ci-rehearse-command.d.ts.map +1 -0
  90. package/dist/study-ci/ci-rehearse-command.js +83 -0
  91. package/dist/study-ci/ci-rehearse-command.js.map +1 -0
  92. package/dist/study-ci/ci-rehearse.d.ts +62 -0
  93. package/dist/study-ci/ci-rehearse.d.ts.map +1 -0
  94. package/dist/study-ci/ci-rehearse.js +49 -0
  95. package/dist/study-ci/ci-rehearse.js.map +1 -0
  96. package/dist/study-ci/ci-run.d.ts +87 -0
  97. package/dist/study-ci/ci-run.d.ts.map +1 -0
  98. package/dist/study-ci/ci-run.js +131 -0
  99. package/dist/study-ci/ci-run.js.map +1 -0
  100. package/dist/study-ci/gate-report.d.ts +64 -0
  101. package/dist/study-ci/gate-report.d.ts.map +1 -0
  102. package/dist/study-ci/gate-report.js +80 -0
  103. package/dist/study-ci/gate-report.js.map +1 -0
  104. package/dist/study-ci/params.d.ts +8 -0
  105. package/dist/study-ci/params.d.ts.map +1 -0
  106. package/dist/study-ci/params.js +72 -0
  107. package/dist/study-ci/params.js.map +1 -0
  108. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../src/render/study/renderers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,uHAAuH;AAEvH,eAAO,MAAM,mBAAmB,EAAE,QAIjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAIhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAI1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,QAI/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAIjC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { payloadOf } from "../payload.js";
2
+ import { carryPlanLines, gateLines, isCarryPlan, isGateAnswer } from "./gate-views.js";
3
+ import { isRunCounting, runCountingLines } from "./counting-views.js";
4
+ import { isSeriesList, isSeriesTrend, seriesListLines, seriesTrendLines } from "./series-views.js";
5
+ /** The Study product's terminal views: a series, a series list, a gate's answer, a carry plan and which runs count. */
6
+ export const seriesTrendRenderer = {
7
+ name: "study-series-trend",
8
+ canRender: (data) => isSeriesTrend(payloadOf(data)),
9
+ render: (data) => seriesTrendLines(payloadOf(data)).join("\n"),
10
+ };
11
+ export const seriesListRenderer = {
12
+ name: "study-series-list",
13
+ canRender: (data) => isSeriesList(payloadOf(data)),
14
+ render: (data) => seriesListLines(payloadOf(data)).join("\n"),
15
+ };
16
+ export const gateRenderer = {
17
+ name: "study-gate",
18
+ canRender: (data) => isGateAnswer(payloadOf(data)),
19
+ render: (data) => gateLines(payloadOf(data)).join("\n"),
20
+ };
21
+ export const carryPlanRenderer = {
22
+ name: "study-carry-plan",
23
+ canRender: (data) => isCarryPlan(payloadOf(data)),
24
+ render: (data) => carryPlanLines(payloadOf(data)).join("\n"),
25
+ };
26
+ export const runCountingRenderer = {
27
+ name: "study-run-counting",
28
+ canRender: (data) => isRunCounting(payloadOf(data)),
29
+ render: (data) => runCountingLines(payloadOf(data)).join("\n"),
30
+ };
31
+ //# sourceMappingURL=renderers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.js","sourceRoot":"","sources":["../../../src/render/study/renderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,E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AAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CAC9E,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAa;IAC3C,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAoB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CAClF,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { type Interval, type MetricLike } from "./study-format.js";
2
+ /**
3
+ * A SERIES IN A TERMINAL — `ora study series` and `ora study series-trend`,
4
+ * drawn for a person. Each group gets a line of blocks across the series'
5
+ * studies, then every study is a row with its figures.
6
+ *
7
+ * It keeps what the pages keep: a study that is not comparable with the one
8
+ * before it starts a new stretch (a `┊` in the blocks, a line in the table), a
9
+ * change is shown only inside a stretch, a direction is marked only when the
10
+ * change's interval excludes zero, and a study with no figure yet says so. It
11
+ * computes nothing: every figure, interval and change is the API's.
12
+ */
13
+ interface GroupPointLike {
14
+ key: string;
15
+ label: string;
16
+ value: number | null;
17
+ interval: Interval | null;
18
+ tasks: number;
19
+ runs: number;
20
+ change: {
21
+ effect: number;
22
+ unit: string;
23
+ interval: Interval;
24
+ tasks: number;
25
+ } | null;
26
+ }
27
+ interface TrendStudyLike {
28
+ studyId: string;
29
+ name: string;
30
+ createdAt: string;
31
+ ref: {
32
+ commit?: string;
33
+ branch?: string;
34
+ pr?: number;
35
+ } | null;
36
+ state: string;
37
+ owed: string[];
38
+ segment: number | null;
39
+ groups: GroupPointLike[];
40
+ }
41
+ export interface SeriesTrendLike {
42
+ series: string;
43
+ metric: MetricLike;
44
+ studies: TrendStudyLike[];
45
+ segments: {
46
+ index: number;
47
+ studyIds: string[];
48
+ differsFromPrevious: string[];
49
+ }[];
50
+ truncated: boolean;
51
+ }
52
+ export interface SeriesListLike {
53
+ series: {
54
+ key: string;
55
+ studies: number;
56
+ newestAt: string;
57
+ }[];
58
+ capped: boolean;
59
+ }
60
+ export declare const isSeriesTrend: (v: unknown) => v is SeriesTrendLike;
61
+ export declare const isSeriesList: (v: unknown) => v is SeriesListLike;
62
+ export declare function seriesTrendLines(trend: SeriesTrendLike): string[];
63
+ export declare function seriesListLines(list: SeriesListLike): string[];
64
+ export {};
65
+ //# sourceMappingURL=series-views.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-views.d.ts","sourceRoot":"","sources":["../../../src/render/study/series-views.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtI;;;;;;;;;;GAUG;AAEH,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACpF;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,mBAAmB,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IACjF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,eACkH,CAAC;AAEnK,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,cAC8H,CAAC;AA2D9K,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAwCjE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,EAAE,CAQ9D"}
@@ -0,0 +1,116 @@
1
+ import { palette } from "../palette.js";
2
+ import { isRecord } from "../payload.js";
3
+ import { columnWidths, padLine } from "../table.js";
4
+ import { blockOf, changeOf, directionOf, figureOf, fullRangeOf, intervalOf } from "./study-format.js";
5
+ export const isSeriesTrend = (v) => isRecord(v) && typeof v.series === "string" && isRecord(v.metric) && typeof v.metric.label === "string" && Array.isArray(v.studies) && Array.isArray(v.segments);
6
+ export const isSeriesList = (v) => isRecord(v) && typeof v.capped === "boolean" && Array.isArray(v.series) && v.series.every((s) => isRecord(s) && typeof s.key === "string" && typeof s.studies === "number");
7
+ const PART = {
8
+ corpus: "the tasks or their checks",
9
+ lenses: "the lenses",
10
+ graders: "the judges",
11
+ classifiers: "the screen",
12
+ countingPolicy: "what is counted",
13
+ agents: "the agents",
14
+ };
15
+ const SHORT_COMMIT = 7;
16
+ const BREAK = "┊";
17
+ const PENDING = "·";
18
+ const whenOf = (iso) => `${iso.slice(0, 10)} ${iso.slice(11, 16)}`;
19
+ function refOf(ref) {
20
+ if (!ref)
21
+ return "";
22
+ return [ref.branch, ref.commit?.slice(0, SHORT_COMMIT), ref.pr !== undefined ? `#${ref.pr}` : undefined].filter((part) => part !== undefined && part !== "").join(" · ");
23
+ }
24
+ /** The groups, in order of first appearance across the series. */
25
+ function groupsOf(trend) {
26
+ const seen = new Map();
27
+ for (const study of trend.studies)
28
+ for (const group of study.groups)
29
+ if (!seen.has(group.key))
30
+ seen.set(group.key, group.label);
31
+ return [...seen].map(([key, label]) => ({ key, label }));
32
+ }
33
+ const measured = (study, key) => {
34
+ if (study.state !== "settled")
35
+ return null;
36
+ const group = study.groups.find((candidate) => candidate.key === key);
37
+ return group && group.value !== null && group.interval !== null ? group : null;
38
+ };
39
+ /** One group's blocks across the series: a block per study, a break mark where a new stretch starts. */
40
+ function blocksOf(trend, key) {
41
+ const full = fullRangeOf(trend.metric);
42
+ let previous;
43
+ let out = "";
44
+ for (const study of trend.studies) {
45
+ if (study.segment !== null && previous !== undefined && previous !== null && study.segment !== previous)
46
+ out += palette.muted(BREAK);
47
+ if (study.segment !== null)
48
+ previous = study.segment;
49
+ const point = measured(study, key);
50
+ out += point === null ? palette.muted(PENDING) : palette.fill(blockOf(point.value / full));
51
+ }
52
+ return out;
53
+ }
54
+ function cellOf(trend, study, key) {
55
+ const point = measured(study, key);
56
+ if (point === null)
57
+ return study.state === "settled" ? "not measured" : "—";
58
+ const figure = `${figureOf(trend.metric, point.value)} (${intervalOf(trend.metric, point.interval)})`;
59
+ if (point.change === null)
60
+ return figure;
61
+ const direction = directionOf(point.change.interval);
62
+ const mark = direction === "up" ? " ▲" : direction === "down" ? " ▼" : "";
63
+ return `${figure} ${changeOf(point.change.effect, point.change.unit)}${mark}`;
64
+ }
65
+ export function seriesTrendLines(trend) {
66
+ const groups = groupsOf(trend);
67
+ const settled = trend.studies.filter((study) => study.state === "settled").length;
68
+ const count = trend.studies.length;
69
+ const lines = [
70
+ `${palette.strong(trend.series)} ${palette.muted(`${trend.metric.label} · ${count} ${count === 1 ? "study" : "studies"}, ${settled} with a figure`)}`,
71
+ "",
72
+ ];
73
+ if (count === 0)
74
+ return [...lines, palette.muted("No study you can open carries this series key.")];
75
+ // The picture: each group's line of blocks, and its newest figure.
76
+ const labelWidth = Math.max(...groups.map((group) => group.label.length));
77
+ for (const group of groups) {
78
+ const newest = [...trend.studies].reverse().map((study) => measured(study, group.key)).find((point) => point !== null);
79
+ lines.push(` ${palette.text(group.label.padEnd(labelWidth))} ${blocksOf(trend, group.key)} ${newest ? palette.strong(figureOf(trend.metric, newest.value)) : palette.muted("no figure yet")}`);
80
+ }
81
+ lines.push(` ${palette.muted(`${" ".repeat(labelWidth)} oldest → newest, on the metric's whole range`)}`, "");
82
+ // The numbers: one row per study.
83
+ const header = ["taken", "ref", ...groups.map((group) => group.label)];
84
+ const rows = trend.studies.map((study) => [
85
+ whenOf(study.createdAt),
86
+ refOf(study.ref) || study.name.slice(0, 28),
87
+ ...(study.state === "settled" ? groups.map((group) => cellOf(trend, study, group.key)) : [`no figure yet: owes ${study.owed.join(" and ") || "work"}`, ...groups.slice(1).map(() => "")]),
88
+ ]);
89
+ const widths = columnWidths(header, rows);
90
+ lines.push(` ${palette.muted(padLine(header, widths))}`);
91
+ const firstOfSegment = new Map(trend.segments.filter((segment) => segment.index > 1 && segment.studyIds[0] !== undefined).map((segment) => [segment.studyIds[0], segment]));
92
+ trend.studies.forEach((study, index) => {
93
+ const boundary = firstOfSegment.get(study.studyId);
94
+ if (boundary) {
95
+ const parts = boundary.differsFromPrevious.map((part) => PART[part] ?? part);
96
+ lines.push(` ${palette.muted(`${BREAK} not comparable with the studies above: ${parts.length > 0 ? `${parts.join(", ")} changed` : "a different measurement"}`)}`);
97
+ }
98
+ lines.push(` ${padLine(rows[index], widths)}`);
99
+ });
100
+ lines.push("", ` ${palette.muted("A change is against the previous study of the same stretch. ▲ ▼ mark a change whose 95% interval excludes zero.")}`);
101
+ if (trend.truncated)
102
+ lines.push(` ${palette.muted("The series has more studies than one trend reads: these are its newest.")}`);
103
+ return lines;
104
+ }
105
+ export function seriesListLines(list) {
106
+ if (list.series.length === 0)
107
+ return [palette.muted("No series yet. Create a study with a `series` key (ora study ci run --series …) and its studies are collected here.")];
108
+ const header = ["series", "studies", "newest"];
109
+ const rows = list.series.map((entry) => [entry.key, String(entry.studies), whenOf(entry.newestAt)]);
110
+ const widths = columnWidths(header, rows);
111
+ const lines = [palette.muted(padLine(header, widths)), ...rows.map((row) => padLine(row, widths)), "", palette.muted("ora study series-trend --series <key> reads one as a trend")];
112
+ if (list.capped)
113
+ lines.push(palette.muted("There are more studies in series than this read counted: each count is at least what is shown."));
114
+ return lines;
115
+ }
116
+ //# sourceMappingURL=series-views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-views.js","sourceRoot":"","sources":["../../../src/render/study/series-views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAkC,MAAM,mBAAmB,CAAC;AAgDtI,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAU,EAAwB,EAAE,CAChE,QAAQ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,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpG,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC,CAAC;IACtL,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gGAAgG,CAAC,CAAC,CAAC;IAC7I,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * How a study's figures are written in a terminal. The same conventions the
3
+ * pages keep: a rate is a percentage and its change is in percentage points
4
+ * (never a percent of a percent); a score is points out of 100 and its change is
5
+ * in points. Pure, and self-contained: the published CLI takes no workspace
6
+ * package for it.
7
+ */
8
+ export interface MetricLike {
9
+ key: string;
10
+ label: string;
11
+ family: string;
12
+ }
13
+ export type Interval = [number, number];
14
+ /** The metric's whole range: a rate runs 0..1, a score 0..100. */
15
+ export declare const fullRangeOf: (metric: Pick<MetricLike, "family">) => number;
16
+ export declare function figureOf(metric: Pick<MetricLike, "family">, value: number): string;
17
+ export declare function intervalOf(metric: Pick<MetricLike, "family">, interval: Interval): string;
18
+ /** "+20pp" / "−4.5pts": the unit is the API's own (`pp` for a rate, points for a score). */
19
+ export declare function changeOf(effect: number, unit: string): string;
20
+ /** Which way a change went, claimed ONLY when its interval excludes zero. */
21
+ export declare function directionOf(interval: Interval): "up" | "down" | "none";
22
+ /** One cell of a sparkline: the figure's height on the metric's WHOLE range (a flat 0% is the lowest block, never stretched). */
23
+ export declare function blockOf(fraction: number): string;
24
+ //# sourceMappingURL=study-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"study-format.d.ts","sourceRoot":"","sources":["../../../src/render/study/study-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAIxC,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,QAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAG,MAAoC,CAAC;AAEtG,wBAAgB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElF;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEzF;AASD,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAItE;AAID,iIAAiI;AACjI,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * How a study's figures are written in a terminal. The same conventions the
3
+ * pages keep: a rate is a percentage and its change is in percentage points
4
+ * (never a percent of a percent); a score is points out of 100 and its change is
5
+ * in points. Pure, and self-contained: the published CLI takes no workspace
6
+ * package for it.
7
+ */
8
+ const isRate = (metric) => metric.family !== "score";
9
+ /** The metric's whole range: a rate runs 0..1, a score 0..100. */
10
+ export const fullRangeOf = (metric) => (isRate(metric) ? 1 : 100);
11
+ export function figureOf(metric, value) {
12
+ return isRate(metric) ? `${Math.round(value * 100)}%` : value.toFixed(1);
13
+ }
14
+ export function intervalOf(metric, interval) {
15
+ return isRate(metric) ? `${Math.round(interval[0] * 100)}–${Math.round(interval[1] * 100)}%` : `${interval[0].toFixed(1)}–${interval[1].toFixed(1)}`;
16
+ }
17
+ const signed = (value, digits) => {
18
+ const rounded = Number(value.toFixed(digits));
19
+ // A change that rounds to nothing is "0", never "-0" or "+0".
20
+ if (rounded === 0)
21
+ return "0";
22
+ return `${rounded > 0 ? "+" : "−"}${Math.abs(rounded).toFixed(digits).replace(/\.0+$/, "")}`;
23
+ };
24
+ /** "+20pp" / "−4.5pts": the unit is the API's own (`pp` for a rate, points for a score). */
25
+ export function changeOf(effect, unit) {
26
+ return `${signed(effect, 1)}${unit === "pp" ? "pp" : "pts"}`;
27
+ }
28
+ /** Which way a change went, claimed ONLY when its interval excludes zero. */
29
+ export function directionOf(interval) {
30
+ if (interval[0] > 0)
31
+ return "up";
32
+ if (interval[1] < 0)
33
+ return "down";
34
+ return "none";
35
+ }
36
+ const BLOCKS = "▁▂▃▄▅▆▇█";
37
+ /** One cell of a sparkline: the figure's height on the metric's WHOLE range (a flat 0% is the lowest block, never stretched). */
38
+ export function blockOf(fraction) {
39
+ const clamped = Math.min(1, Math.max(0, fraction));
40
+ return BLOCKS[Math.round(clamped * (BLOCKS.length - 1))];
41
+ }
42
+ //# sourceMappingURL=study-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"study-format.js","sourceRoot":"","sources":["../../../src/render/study/study-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,MAAM,GAAG,CAAC,MAAkC,EAAW,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC;AAE1F,kEAAkE;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAkC,EAAU,EAAE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,UAAU,QAAQ,CAAC,MAAc,EAAE,IAAY;IACnD,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AAC/D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,QAAkB;IAC5C,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IACnC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,iIAAiI;AACjI,MAAM,UAAU,OAAO,CAAC,QAAgB;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { Command } from "commander";
2
+ import type { ResolvedDeps } from "../program.js";
3
+ import { type CiPaths } from "./ci-run.js";
4
+ /** The CI run's paths, from the manifest. Throws naming the operation this build of the CLI lacks. */
5
+ export declare function ciPathsOf(operations?: readonly {
6
+ id: string;
7
+ pathTemplate: string;
8
+ }[]): CiPaths;
9
+ interface CiRunFlags {
10
+ file: string;
11
+ gate: string;
12
+ param: string[];
13
+ series?: string;
14
+ /** `--carry` is true, `--no-carry` false; neither leaves the body file's own policy. */
15
+ carry?: boolean;
16
+ refCommit?: string;
17
+ refBranch?: string;
18
+ refPr?: string;
19
+ refUrl?: string;
20
+ timeout: string;
21
+ infraReruns: string;
22
+ undecided: string;
23
+ summaryFile?: string;
24
+ commentFile?: string;
25
+ appUrl?: string;
26
+ json?: boolean;
27
+ apiUrl?: string;
28
+ }
29
+ /** The study's `ref`, from the flags, else from what a GitHub Actions job already knows. Empty = no ref. */
30
+ export declare function refOf(flags: Pick<CiRunFlags, "refCommit" | "refBranch" | "refPr" | "refUrl">, env: NodeJS.ProcessEnv): Record<string, unknown>;
31
+ /**
32
+ * THE BODY'S CARRY POLICY UNDER THE FLAG. `--no-carry` drops it, so this one study
33
+ * runs every job (the way to gate a group whose runs would otherwise be carried, or
34
+ * to measure everything again). `--carry` adds the default policy when the body file
35
+ * declares none. Neither flag leaves the body file's own choice.
36
+ */
37
+ export declare function carryChoiceOf(body: Record<string, unknown>, carry: boolean | undefined): Record<string, unknown>;
38
+ export declare function attachStudyCi(program: Command, deps: ResolvedDeps): void;
39
+ export {};
40
+ //# sourceMappingURL=ci-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-command.d.ts","sourceRoot":"","sources":["../../src/study-ci/ci-command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAA4C,KAAK,OAAO,EAAwB,MAAM,aAAa,CAAC;AA0B3G,sGAAsG;AACtG,wBAAgB,SAAS,CAAC,UAAU,GAAE,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAAe,GAAG,OAAO,CAO3G;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,4GAA4G;AAC5G,wBAAgB,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAY9I;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOhH;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAsFxE"}
@@ -0,0 +1,151 @@
1
+ import { readFileSync, writeFileSync } from "node:fs";
2
+ import { renderError } from "../core/output.js";
3
+ import { credentials } from "../core/run-operation.js";
4
+ import { OPERATIONS } from "../generated/operations.js";
5
+ import { CiRunError, EXIT, exitCodeOf, runStudyCi } from "./ci-run.js";
6
+ import { attachStudyCiRehearse } from "./ci-rehearse-command.js";
7
+ import { gateReportMarkdown } from "./gate-report.js";
8
+ import { applyParams, parseParams, StudyParamError } from "./params.js";
9
+ /**
10
+ * `ora study ci run` — the hand-written companion to the generated `ora study
11
+ * …` commands (as `ora tunnel` is to `ora tunnels`): it runs one study from a
12
+ * body file to a gate verdict, for a CI job. See ./ci-run.ts for the sequence
13
+ * and the exit codes.
14
+ *
15
+ * WHERE EACH OPERATION LIVES is read from the generated manifest by id, so a
16
+ * path that moves in the API moves here with the next `yarn regen:openapi`,
17
+ * and an operation that disappears fails this command's own test, never a
18
+ * customer's pipeline.
19
+ */
20
+ const OPERATION_IDS = {
21
+ preflight: "study.preflight",
22
+ create: "study.create",
23
+ get: "study.get",
24
+ launch: "study.launch",
25
+ stream: "study.stream",
26
+ rerunInfraFailures: "study.rerunInfraFailures",
27
+ gate: "study.gate",
28
+ };
29
+ /** The CI run's paths, from the manifest. Throws naming the operation this build of the CLI lacks. */
30
+ export function ciPathsOf(operations = OPERATIONS) {
31
+ const pathOf = (id) => {
32
+ const found = operations.find((op) => op.id === id);
33
+ if (!found)
34
+ throw new Error(`this CLI's API manifest has no '${id}' operation`);
35
+ return found.pathTemplate;
36
+ };
37
+ return Object.fromEntries(Object.entries(OPERATION_IDS).map(([key, id]) => [key, pathOf(id)]));
38
+ }
39
+ const collect = (value, previous) => [...previous, value];
40
+ /** The study's `ref`, from the flags, else from what a GitHub Actions job already knows. Empty = no ref. */
41
+ export function refOf(flags, env) {
42
+ const commit = flags.refCommit ?? env.GITHUB_SHA;
43
+ // On a pull request GITHUB_HEAD_REF is the PR's branch; GITHUB_REF_NAME is `<n>/merge` there.
44
+ const branch = flags.refBranch ?? (env.GITHUB_HEAD_REF || env.GITHUB_REF_NAME);
45
+ const prFromRef = /^refs\/pull\/(\d+)\//.exec(env.GITHUB_REF ?? "")?.[1];
46
+ const pr = Number(flags.refPr ?? prFromRef);
47
+ return {
48
+ ...(commit ? { commit } : {}),
49
+ ...(branch ? { branch } : {}),
50
+ ...(Number.isInteger(pr) && pr > 0 ? { pr } : {}),
51
+ ...(flags.refUrl ? { url: flags.refUrl } : {}),
52
+ };
53
+ }
54
+ /**
55
+ * THE BODY'S CARRY POLICY UNDER THE FLAG. `--no-carry` drops it, so this one study
56
+ * runs every job (the way to gate a group whose runs would otherwise be carried, or
57
+ * to measure everything again). `--carry` adds the default policy when the body file
58
+ * declares none. Neither flag leaves the body file's own choice.
59
+ */
60
+ export function carryChoiceOf(body, carry) {
61
+ if (carry === false) {
62
+ const { carry: _dropped, ...rest } = body;
63
+ return rest;
64
+ }
65
+ if (carry === true && body.carry === undefined)
66
+ return { ...body, carry: { from: "series" } };
67
+ return body;
68
+ }
69
+ export function attachStudyCi(program, deps) {
70
+ const study = program.commands.find((c) => c.name() === "study") ?? program.command("study").description("study commands");
71
+ const ci = study.commands.find((c) => c.name() === "ci") ?? study.command("ci").description("run a study as a CI gate");
72
+ // The step before a run: one real run per group, to prove the design is wired (./ci-rehearse-command.ts).
73
+ attachStudyCiRehearse(ci, deps);
74
+ ci.command("run")
75
+ .description("Create, launch and wait for one study, then answer a gate: exit 0 pass, 1 fail, 2 undecided, 3 error")
76
+ .requiredOption("--file <path>", "the study's create body (JSON); strings may name ${param} placeholders")
77
+ .requiredOption("--gate <path>", "the gate (JSON): a floor and/or a maxDrop against a baseline")
78
+ .option("--param <name=value>", "fill a ${name} placeholder of the body (repeatable)", collect, [])
79
+ .option("--series <key>", "the series this study belongs to (the gate's series baseline is found in it)")
80
+ .option("--carry", "reuse unchanged runs from the series' previous study, when the body file declares no carry policy")
81
+ .option("--no-carry", "run every job: ignore the body file's carry policy for this study")
82
+ .option("--ref-commit <sha>", "the commit under test (default: $GITHUB_SHA)")
83
+ .option("--ref-branch <name>", "the branch under test (default: the GitHub Actions branch)")
84
+ .option("--ref-pr <number>", "the pull request number (default: read from $GITHUB_REF)")
85
+ .option("--ref-url <url>", "a link back to the change")
86
+ .option("--timeout <minutes>", "how long the run may take from launch", "60")
87
+ .option("--infra-reruns <n>", "re-run infra-failed runs in place this many times before giving up", "1")
88
+ .option("--undecided <policy>", "what 'cannot tell yet' exits as: undecided (2), pass (0) or fail (1)", "undecided")
89
+ .option("--summary-file <path>", "append the markdown report here (default: $GITHUB_STEP_SUMMARY when set)")
90
+ .option("--comment-file <path>", "write the pull request comment's markdown here")
91
+ .option("--app-url <url>", "the Study app's origin, to link the report to the study's page")
92
+ .option("--json", "print the gate's JSON answer on stdout")
93
+ .option("--api-url <url>", "override the API base URL")
94
+ .action(async (flags) => {
95
+ const timeoutMinutes = Number(flags.timeout);
96
+ const infraReruns = Number(flags.infraReruns);
97
+ const undecided = flags.undecided;
98
+ if (!(timeoutMinutes > 0) || !Number.isInteger(infraReruns) || infraReruns < 0 || !["undecided", "pass", "fail"].includes(undecided)) {
99
+ deps.errOut("usage: --timeout takes minutes (> 0), --infra-reruns a whole number, --undecided one of undecided|pass|fail");
100
+ process.exitCode = EXIT.error;
101
+ return;
102
+ }
103
+ const creds = credentials(deps, flags.apiUrl);
104
+ if (!creds) {
105
+ process.exitCode = EXIT.error;
106
+ return;
107
+ }
108
+ try {
109
+ const body = applyParams(JSON.parse(readFileSync(flags.file, "utf8")), parseParams(flags.param));
110
+ const ref = refOf(flags, deps.env);
111
+ const gate = JSON.parse(readFileSync(flags.gate, "utf8"));
112
+ const run = await runStudyCi({
113
+ body: carryChoiceOf({
114
+ ...body,
115
+ ...(flags.series ? { series: flags.series } : {}),
116
+ ...(Object.keys(ref).length > 0 ? { ref } : {}),
117
+ }, flags.carry),
118
+ gate,
119
+ timeoutMs: timeoutMinutes * 60_000,
120
+ infraReruns,
121
+ settlePollMs: 10_000,
122
+ }, {
123
+ client: deps.makeClient(creds),
124
+ paths: ciPathsOf(),
125
+ now: deps.now,
126
+ sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
127
+ // Progress goes to stderr: stdout is the answer (JSON under --json), so it stays parseable.
128
+ log: (line) => deps.errOut(`ora study ci: ${line}`),
129
+ });
130
+ const markdown = gateReportMarkdown(run.result, {
131
+ studyName: run.studyName,
132
+ ...(flags.appUrl ? { studyUrl: `${flags.appUrl.replace(/\/+$/, "")}/studies/manage/${run.studyId}` } : {}),
133
+ });
134
+ const summaryFile = flags.summaryFile ?? deps.env.GITHUB_STEP_SUMMARY;
135
+ if (summaryFile)
136
+ writeFileSync(summaryFile, markdown, { flag: "a" });
137
+ if (flags.commentFile)
138
+ writeFileSync(flags.commentFile, markdown);
139
+ deps.out(flags.json
140
+ ? JSON.stringify({ studyId: run.studyId, plannedRunCount: run.plannedRunCount, ...run.result }, null, 2)
141
+ : `${run.result.gate.decision}: ${run.result.gate.reason}\nstudy ${run.studyId}`);
142
+ process.exitCode = exitCodeOf(run.result.gate.decision, undecided);
143
+ }
144
+ catch (err) {
145
+ const hint = err instanceof CiRunError && err.studyId ? ` (study ${err.studyId})` : "";
146
+ deps.errOut(err instanceof StudyParamError || err instanceof CiRunError ? `ora study ci: ${err.message}${hint}` : renderError(err));
147
+ process.exitCode = EXIT.error;
148
+ }
149
+ });
150
+ }
151
+ //# sourceMappingURL=ci-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-command.js","sourceRoot":"","sources":["../../src/study-ci/ci-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAsC,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAExE;;;;;;;;;;GAUG;AACH,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,iBAAiB;IAC5B,MAAM,EAAE,cAAc;IACtB,GAAG,EAAE,WAAW;IAChB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,cAAc;IACt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The rehearsal's paths, from the manifest. Throws naming the operation this build of the CLI lacks. */
5
+ export declare function ciRehearsePathsOf(operations?: readonly {
6
+ id: string;
7
+ pathTemplate: string;
8
+ }[]): CiRehearsePaths;
9
+ /** Attach `rehearse` to the `ora study ci` group. */
10
+ export declare function attachStudyCiRehearse(ci: Command, deps: ResolvedDeps): void;
11
+ //# sourceMappingURL=ci-rehearse-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-rehearse-command.d.ts","sourceRoot":"","sources":["../../src/study-ci/ci-rehearse-command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAA+D,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAkBrH,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,UAAU,GAAE,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAAe,GAAG,eAAe,CAO3H;AAgBD,qDAAqD;AACrD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAiD3E"}