@skyramp/mcp 0.4.4-rc.1 → 0.4.4-rc.2

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 (143) hide show
  1. package/build/index.js +239 -210
  2. package/build/playwright/PlaywrightTraceService.d.ts +1 -1
  3. package/build/playwright/blueprintDigestStore.d.ts +1 -1
  4. package/build/playwright/registerPlaywrightTools.d.ts +1 -1
  5. package/build/playwright/traceRecordingPrompt.d.ts +1 -1
  6. package/build/playwright/traceRecordingPrompt.js +2 -2
  7. package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
  8. package/build/prompts/local-dev/local-dev-prompts.js +2 -2
  9. package/build/prompts/startTraceCollectionPrompts.d.ts +1 -1
  10. package/build/prompts/startTraceCollectionPrompts.js +2 -3
  11. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +1 -1
  12. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +2 -2
  13. package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
  14. package/build/prompts/testbot/testbot-prompts.js +4 -7
  15. package/build/recommendation/answers.d.ts +17 -52
  16. package/build/recommendation/answers.js +29 -99
  17. package/build/recommendation/pullRequestText.d.ts +0 -2
  18. package/build/recommendation/pullRequestText.js +0 -16
  19. package/build/recommendation/registerPlan.d.ts +4 -7
  20. package/build/recommendation/registerPlan.js +11 -37
  21. package/build/recommendation/types.d.ts +4 -21
  22. package/build/recommendation/verifierContracts.d.ts +4 -4
  23. package/build/recommendation/verifierContracts.js +4 -4
  24. package/build/recommendation/verifiers/citedPath.d.ts +2 -2
  25. package/build/recommendation/verifiers/citedPath.js +2 -2
  26. package/build/recommendation/verifiers/issueTraceability.d.ts +5 -1
  27. package/build/recommendation/verifiers/issueTraceability.js +35 -4
  28. package/build/resources/analysisResources.d.ts +1 -1
  29. package/build/resources/analysisResources.js +1 -1
  30. package/build/resources/progressResource.d.ts +1 -1
  31. package/build/resources/sutSetupResource.d.ts +1 -1
  32. package/build/resources/sutSetupResource.js +1 -1
  33. package/build/resources/testbotResource.d.ts +1 -1
  34. package/build/resources/testbotResource.js +1 -1
  35. package/build/services/AnalyticsService.d.ts +1 -1
  36. package/build/services/FleetExecutionService.d.ts +130 -0
  37. package/build/services/FleetExecutionService.js +391 -0
  38. package/build/services/ModularizationService.d.ts +1 -1
  39. package/build/services/TestExecutionService.d.ts +7 -0
  40. package/build/services/TestExecutionService.js +21 -0
  41. package/build/services/TestGenerationService.d.ts +1 -1
  42. package/build/tool-phases.js +2 -0
  43. package/build/tools/auth/loginTool.d.ts +1 -1
  44. package/build/tools/auth/loginTool.js +2 -2
  45. package/build/tools/auth/logoutTool.d.ts +1 -1
  46. package/build/tools/auth/logoutTool.js +2 -2
  47. package/build/tools/code-refactor/alignAssertionsTool.d.ts +1 -1
  48. package/build/tools/code-refactor/alignAssertionsTool.js +1 -1
  49. package/build/tools/code-refactor/assertionSkillTools.d.ts +1 -1
  50. package/build/tools/code-refactor/assertionSkillTools.js +2 -2
  51. package/build/tools/code-refactor/codeReuseTool.d.ts +1 -1
  52. package/build/tools/code-refactor/codeReuseTool.js +2 -2
  53. package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +1 -1
  54. package/build/tools/code-refactor/enhanceAssertionsTool.js +1 -1
  55. package/build/tools/code-refactor/modularizationTool.d.ts +1 -1
  56. package/build/tools/code-refactor/modularizationTool.js +2 -2
  57. package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
  58. package/build/tools/enrichTestWithMocksTool.js +2 -2
  59. package/build/tools/executeFleetTool.d.ts +28 -0
  60. package/build/tools/executeFleetTool.js +107 -0
  61. package/build/tools/executeSkyrampTestTool.d.ts +8 -5
  62. package/build/tools/executeSkyrampTestTool.js +5 -5
  63. package/build/tools/fixErrorTool.d.ts +1 -1
  64. package/build/tools/fixErrorTool.js +1 -1
  65. package/build/tools/generate-tests/batchMockGenerationTool.d.ts +6 -57
  66. package/build/tools/generate-tests/batchMockGenerationTool.js +3 -3
  67. package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +9 -45
  68. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +29 -11
  69. package/build/tools/generate-tests/generateContractRestTool.d.ts +1 -2
  70. package/build/tools/generate-tests/generateContractRestTool.js +1 -1
  71. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -2
  72. package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
  73. package/build/tools/generate-tests/generateFuzzRestTool.d.ts +1 -1
  74. package/build/tools/generate-tests/generateFuzzRestTool.js +1 -1
  75. package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +1 -2
  76. package/build/tools/generate-tests/generateIntegrationRestTool.js +1 -1
  77. package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -2
  78. package/build/tools/generate-tests/generateLoadRestTool.js +2 -1
  79. package/build/tools/generate-tests/generateMockRestTool.d.ts +1 -2
  80. package/build/tools/generate-tests/generateMockRestTool.js +3 -3
  81. package/build/tools/generate-tests/generateSmokeRestTool.d.ts +1 -1
  82. package/build/tools/generate-tests/generateSmokeRestTool.js +1 -1
  83. package/build/tools/generate-tests/generateUILoadRestTool.d.ts +64 -0
  84. package/build/tools/generate-tests/generateUILoadRestTool.js +512 -0
  85. package/build/tools/generate-tests/generateUIRestTool.d.ts +6 -7
  86. package/build/tools/generate-tests/generateUIRestTool.js +1 -1
  87. package/build/tools/generate-tests/loadTestSchema.d.ts +15 -15
  88. package/build/tools/generate-tests/trace-reuse-guard.d.ts +1 -1
  89. package/build/tools/generateEnrichedIntegrationTestTool.d.ts +1 -2
  90. package/build/tools/generateEnrichedIntegrationTestTool.js +1 -1
  91. package/build/tools/localDevWorkerComposeTool.d.ts +1 -1
  92. package/build/tools/localDevWorkerComposeTool.js +2 -2
  93. package/build/tools/one-click/oneClickTool.d.ts +1 -1
  94. package/build/tools/one-click/oneClickTool.js +1 -1
  95. package/build/tools/preflightMockCheckTool.d.ts +1 -1
  96. package/build/tools/preflightMockCheckTool.js +3 -3
  97. package/build/tools/queryProxyMocksTool.d.ts +1 -1
  98. package/build/tools/queryProxyMocksTool.js +3 -3
  99. package/build/tools/submitReportTool.d.ts +111 -414
  100. package/build/tools/submitReportTool.js +32 -134
  101. package/build/tools/test-management/actionsTool.d.ts +1 -1
  102. package/build/tools/test-management/actionsTool.js +7 -7
  103. package/build/tools/test-management/analyzeChangesTool.d.ts +22 -118
  104. package/build/tools/test-management/analyzeChangesTool.js +4 -4
  105. package/build/tools/test-management/analyzeTestHealthTool.d.ts +1 -1
  106. package/build/tools/test-management/analyzeTestHealthTool.js +4 -4
  107. package/build/tools/test-management/registerTestPlanTool.d.ts +111 -743
  108. package/build/tools/test-management/registerTestPlanTool.js +20 -36
  109. package/build/tools/test-management/resolveScreenTool.d.ts +1 -1
  110. package/build/tools/test-management/resolveScreenTool.js +6 -2
  111. package/build/tools/trace/startTraceCollectionTool.d.ts +1 -1
  112. package/build/tools/trace/startTraceCollectionTool.js +4 -4
  113. package/build/tools/trace/stopTraceCollectionTool.d.ts +1 -1
  114. package/build/tools/trace/stopTraceCollectionTool.js +2 -2
  115. package/build/tools/verifyTestDependenciesTool.d.ts +1 -1
  116. package/build/tools/verifyTestDependenciesTool.js +1 -1
  117. package/build/tools/workspace/initScanWorkspaceTool.d.ts +1 -1
  118. package/build/tools/workspace/initScanWorkspaceTool.js +1 -1
  119. package/build/tools/workspace/initializeWorkspaceTool.d.ts +1 -1
  120. package/build/tools/workspace/initializeWorkspaceTool.js +1 -1
  121. package/build/types/RepositoryAnalysis.d.ts +164 -1170
  122. package/build/types/RepositoryAnalysis.js +12 -10
  123. package/build/types/StepMethod.d.ts +24 -1
  124. package/build/types/StepMethod.js +1 -1
  125. package/build/types/TestTypes.d.ts +34 -133
  126. package/build/types/TestTypes.js +3 -3
  127. package/build/utils/docker.d.ts +29 -7
  128. package/build/utils/docker.js +83 -27
  129. package/build/utils/initAgent.d.ts +3 -3
  130. package/build/utils/initAgent.js +58 -26
  131. package/build/utils/progress.d.ts +3 -4
  132. package/build/utils/progress.js +4 -4
  133. package/build/utils/utils.d.ts +1 -1
  134. package/build/utils/versions.d.ts +3 -3
  135. package/build/utils/versions.js +1 -1
  136. package/build/workspace/workspace.d.ts +117 -538
  137. package/build/workspace/workspace.js +2 -2
  138. package/package.json +6 -5
  139. package/plugin/skills/repair-staged-files/SKILL.md +17 -0
  140. package/build/recommendation/blockerProbes.d.ts +0 -13
  141. package/build/recommendation/blockerProbes.js +0 -91
  142. package/build/recommendation/blockers.d.ts +0 -65
  143. package/build/recommendation/blockers.js +0 -135
@@ -3,8 +3,8 @@ import { PlanMaintenance, VerifyContext } from "../types.js";
3
3
  /** Whether a `maintains` entry names a file that stays inside the repository and is
4
4
  * present in the repository the entry names.
5
5
  *
6
- * An entry credits its ids only when it is. `coverage:change:` closes only with a
7
- * blocker and `defects:untested:` only with a test, so crediting a file nobody can
6
+ * An entry credits its ids only when it is. `coverage:change:` and
7
+ * `defects:untested:` close only with a blocker, so crediting a file nobody can
8
8
  * open would route around both. */
9
9
  export declare function maintainedFileIsInItsRepository(entry: PlanMaintenance, ctx: VerifyContext): boolean;
10
10
  /** A cited path reduced to the spelling `git diff --name-status` produces: `./`,
@@ -3,8 +3,8 @@ import { escapesRepo } from "./endpointGrounded.js";
3
3
  /** Whether a `maintains` entry names a file that stays inside the repository and is
4
4
  * present in the repository the entry names.
5
5
  *
6
- * An entry credits its ids only when it is. `coverage:change:` closes only with a
7
- * blocker and `defects:untested:` only with a test, so crediting a file nobody can
6
+ * An entry credits its ids only when it is. `coverage:change:` and
7
+ * `defects:untested:` close only with a blocker, so crediting a file nobody can
8
8
  * open would route around both. */
9
9
  export function maintainedFileIsInItsRepository(entry, ctx) {
10
10
  const path = entry.file.trim();
@@ -46,7 +46,11 @@ export interface TraceabilityLane {
46
46
  * accepted that entry — the same claim a planned test makes. See
47
47
  * {@link maintainedDefects} for how that acceptance is read.
48
48
  * `deliveredMatchesPlan:maintains:` checks separately that the edit landed.
49
- */
49
+ *
50
+ * A declared `defectId` also counts when the agent answered `defects:untested:<id>`
51
+ * at plan time (or closed it with a blocker). The plan-time verifier asked why no
52
+ * test proves that defect and the agent said; asking again here is the same
53
+ * question twice, and the answer is already published with the plan. */
50
54
  export declare function checkIssueTraceability(plan: Plan, delivered: DeliveredForTraceability[], issues: ReportedIssueForTraceability[], lane?: TraceabilityLane): Objection[];
51
55
  /** Report-time. Every defect the plan declared is an `issuesFound` entry that
52
56
  * names it by `defectId`. The review found it; the report must show it. */
@@ -31,6 +31,30 @@ function quote(description) {
31
31
  .replace(/\s+/g, " ");
32
32
  return text.length > QUOTE_LENGTH ? `${text.slice(0, QUOTE_LENGTH)}…` : text;
33
33
  }
34
+ /** The plan-time `defects:untested:<id>` objection, as the plan-time verifier ids it. */
35
+ const UNTESTED_PREFIX = "defects:untested:";
36
+ /** Defect ids whose `defects:untested:<id>` objection the agent closed when it
37
+ * registered the plan, by an answer or by a blocker. Both buckets: a blocker
38
+ * close is stored apart from an answer and is a close all the same. Read
39
+ * defensively: the plan comes off disk. */
40
+ function answeredUntested(plan) {
41
+ const closed = [
42
+ ...(Array.isArray(plan?.answeredObjections) ? plan.answeredObjections : []),
43
+ ...(Array.isArray(plan?.unverifiedCloses) ? plan.unverifiedCloses : []),
44
+ ];
45
+ const ids = new Set();
46
+ for (const entry of closed) {
47
+ const objectionId = idKey(entry?.objection?.objectionId);
48
+ if (!objectionId.startsWith(UNTESTED_PREFIX))
49
+ continue;
50
+ if (idKey(entry?.answer).length === 0)
51
+ continue;
52
+ const id = idKey(objectionId.slice(UNTESTED_PREFIX.length));
53
+ if (id)
54
+ ids.add(id);
55
+ }
56
+ return ids;
57
+ }
34
58
  /** The declared defect ids a `maintains` entry proves, as plan time judged them.
35
59
  * Report time has no VerifyContext, so it reads plan time's own verdict on the
36
60
  * entry's file, `existingCoverage:maintains:<file>`, rather than resolving the path
@@ -98,7 +122,11 @@ function locate(defect) {
98
122
  * accepted that entry — the same claim a planned test makes. See
99
123
  * {@link maintainedDefects} for how that acceptance is read.
100
124
  * `deliveredMatchesPlan:maintains:` checks separately that the edit landed.
101
- */
125
+ *
126
+ * A declared `defectId` also counts when the agent answered `defects:untested:<id>`
127
+ * at plan time (or closed it with a blocker). The plan-time verifier asked why no
128
+ * test proves that defect and the agent said; asking again here is the same
129
+ * question twice, and the answer is already published with the plan. */
102
130
  export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LANE) {
103
131
  const shipped = new Set(delivered.map((test) => idKey(test?.plannedTestId)).filter(Boolean));
104
132
  const plannedTests = Array.isArray(plan?.plannedTests)
@@ -145,6 +173,7 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
145
173
  bucket.set(defectId, [...(bucket.get(defectId) ?? []), id]);
146
174
  }
147
175
  }
176
+ const answered = answeredUntested(plan);
148
177
  const maintained = maintainedDefects(plan);
149
178
  const objections = [];
150
179
  issues.forEach((issue, index) => {
@@ -158,7 +187,9 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
158
187
  const defectId = idKey(issue?.defectId);
159
188
  const declaredDefect = defectId.length > 0 && known.has(defectId);
160
189
  if (declaredDefect &&
161
- ((provenBy.get(defectId) ?? []).length > 0 || maintained.has(defectId))) {
190
+ ((provenBy.get(defectId) ?? []).length > 0 ||
191
+ maintained.has(defectId) ||
192
+ answered.has(defectId))) {
162
193
  return;
163
194
  }
164
195
  const named = [];
@@ -173,7 +204,7 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
173
204
  named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail: ${(citedWeakly.get(defectId) ?? []).join(", ")} cite it and the plan declares each as expecting to pass`);
174
205
  }
175
206
  else {
176
- named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail, no accepted \`maintains\` entry proves it — an entry naming a file that is not in the checkout is refused`);
207
+ named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail, no accepted \`maintains\` entry proves it — an entry naming a file that is not in the checkout is refused — and no plan-time answer closed ${UNTESTED_PREFIX}${defectId}`);
177
208
  }
178
209
  }
179
210
  const where = String(issue?.sourceFile ?? "").trim() || "no sourceFile";
@@ -186,7 +217,7 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
186
217
  verifier: "issueTraceability",
187
218
  message: `No test proves this bug: "${quote(issue?.description)}" (${where}).`,
188
219
  evidence: `issuesFound[${index}]: ${named.length > 0 ? named.join("; ") : "no plannedTestId and no defectId"}.`,
189
- suggestion: "Set `plannedTestId` to the delivered test that proves this bug — one the plan declares with `expected.outcome: fail`, so it stays red until the bug is fixed — or set `defectId` to a declared plan defect such a test cites. If something stopped the test — a service that is not running, the one credential the run holds — answer and set `blocker` to it. A reason the bug is not worth testing is not a blocker.",
220
+ suggestion: "Set `plannedTestId` to the delivered test that proves this bug — one the plan declares with `expected.outcome: fail`, so it stays red until the bug is fixed — or set `defectId` to a declared plan defect such a test cites. If no test proves it, answer in one line why.",
190
221
  });
191
222
  });
192
223
  return objections;
@@ -1,4 +1,4 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare const ANALYSIS_URI_PREFIX = "skyramp://analysis";
3
3
  /**
4
4
  * Register MCP Resources for analysis data access.
@@ -1,5 +1,5 @@
1
1
  import * as fs from "fs";
2
- import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ResourceTemplate } from "@modelcontextprotocol/server";
3
3
  import { StateManager, getSessionFilePath, getRegisteredSessions, hasSessionData, getSessionData, normalizeRecommendationState, } from "../utils/AnalysisStateManager.js";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { AnalysisScope } from "../types/RepositoryAnalysis.js";
@@ -1,2 +1,2 @@
1
- import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import type { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerProgressResource(server: McpServer): void;
@@ -1,2 +1,2 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerSutSetupResource(server: McpServer): void;
@@ -1,4 +1,4 @@
1
- import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { ResourceTemplate } from "@modelcontextprotocol/server";
2
2
  import { logger } from "../utils/logger.js";
3
3
  import { resourceText } from "../utils/utils.js";
4
4
  import { AnalyticsService } from "../services/AnalyticsService.js";
@@ -1,2 +1,2 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerTestbotResource(server: McpServer): void;
@@ -1,4 +1,4 @@
1
- import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { ResourceTemplate } from "@modelcontextprotocol/server";
2
2
  import { logger } from "../utils/logger.js";
3
3
  import { AnalyticsService } from "../services/AnalyticsService.js";
4
4
  import { getTestbotPrompt, parseRelatedRepositories, } from "../prompts/testbot/testbot-prompts.js";
@@ -1,4 +1,4 @@
1
- import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
1
+ import { CallToolResult } from "@modelcontextprotocol/server";
2
2
  export declare class AnalyticsService {
3
3
  /**
4
4
  * Only the fields named here reach the analytics backend. The tool's own
@@ -0,0 +1,130 @@
1
+ import Docker from "dockerode";
2
+ /**
3
+ * Where the mounted pieces live inside the executor, per container platform.
4
+ *
5
+ * The two images are the same shape on purpose -- /app/classes, /app/lib, the work
6
+ * directory -- so the only real differences are the path separator, the classpath
7
+ * separator and the shell. Keeping them in one table is what stops those three leaking
8
+ * into the rest of the file.
9
+ */
10
+ export type ContainerPlatform = "linux" | "windows";
11
+ interface Layout {
12
+ work: string;
13
+ certs: string;
14
+ /** The directory a branch-built library jar is mounted from. */
15
+ overrideDir: string;
16
+ /** The directory a credential pool outside the work directory is mounted from. */
17
+ poolDir: string;
18
+ imageClasses: string;
19
+ imageLibDir: string;
20
+ classpathSep: string;
21
+ /** Path separator inside the container. */
22
+ sep: string;
23
+ }
24
+ /**
25
+ * A path inside the container's work directory.
26
+ *
27
+ * Everything the run reads or writes lives under the mount, so this is the only place a
28
+ * container path is spelled out -- which is the point of the table above. Writing them
29
+ * longhand per platform put the separator back in the call sites it was meant to keep it
30
+ * out of.
31
+ */
32
+ export declare function workPath(l: Layout, ...parts: string[]): string;
33
+ export declare const LAYOUT: Record<ContainerPlatform, Layout>;
34
+ /**
35
+ * Which platform the executor runs as. The Docker daemon that will run the container
36
+ * decides, not the image name: a released executor is one tag carrying both operating
37
+ * systems, and a daemon pulls and starts the image for its own.
38
+ *
39
+ * Asked of `docker`, the client that creates the container. The image check and pull go
40
+ * through the default client (docker.ts), which is the same daemon for every caller today:
41
+ * skyramp_execute_fleet passes no client. A daemon whose OS cannot be read fails the run
42
+ * here with that error as the cause: guessing linux on a Windows daemon would fail later
43
+ * with a mount or pull error that says nothing about why. An explicit platform must match
44
+ * the daemon; a mismatch would pull or start an image the engine cannot run.
45
+ */
46
+ export declare function resolvePlatform(docker: Docker, explicit?: ContainerPlatform): Promise<ContainerPlatform>;
47
+ export interface FleetExecutionOptions {
48
+ directory: string;
49
+ executorImage?: string;
50
+ platform?: ContainerPlatform;
51
+ entryClass?: string;
52
+ certsDir: string;
53
+ credentials?: string;
54
+ libraryJar?: string;
55
+ timeoutSec?: number;
56
+ env?: Record<string, string>;
57
+ }
58
+ export interface FleetExecutionResult {
59
+ passed: boolean;
60
+ executorImage: string;
61
+ platform: ContainerPlatform;
62
+ entryClass: string;
63
+ exitCode: number | null;
64
+ report: string;
65
+ output: string;
66
+ result?: unknown;
67
+ timedOut?: boolean;
68
+ }
69
+ /** A simple (unqualified) Java class name. */
70
+ export declare const JAVA_CLASS_NAME: RegExp;
71
+ /**
72
+ * The generated fleet manager: the one class in the directory that JUnit runs. The journey
73
+ * and the load class travel with it because they sit beside it, and they are compiled but
74
+ * never selected -- the journey is an input the fleet ships to the worker, and the load
75
+ * class only supplies the scenario.
76
+ */
77
+ export declare function findEntryClass(directory: string, explicit?: string): string;
78
+ /**
79
+ * A fleet file that pins its worker image is refused.
80
+ *
81
+ * The library picks the image from the commit it was built from, and that pairing is what a
82
+ * run through this tool exercises. A pinned image proves the image is good and hides the
83
+ * case where the library asks for one that does not exist.
84
+ */
85
+ export declare function assertNoPinnedImage(fleetFile: string): void;
86
+ /**
87
+ * The fleet reaches the worker it deployed at an address derived from the Docker daemon:
88
+ * the daemon's host for a remote engine, `localhost` for a local socket. Inside this
89
+ * container `localhost` is the container, so a local-socket fleet cannot reach the worker it
90
+ * just deployed and would hang until the timeout instead of failing.
91
+ */
92
+ export declare function assertRemoteDaemon(fleetFile: string): void;
93
+ /**
94
+ * The image the run happens in.
95
+ *
96
+ * The released executor is named by version, and a branch build of it carries no commit in
97
+ * its name the way the worker images do -- `RUNNER_IMAGE` defaults to a constant tag. So a
98
+ * caller testing an unreleased library either names its image here, or mounts the jar.
99
+ */
100
+ export declare function resolveExecutorImage(explicit?: string): string;
101
+ /** What the container is told to run: the argv, and the script it ends with. */
102
+ export interface ContainerCommand {
103
+ /** Passed to Docker as `Cmd`. */
104
+ argv: string[];
105
+ /** The shell script argv ends with -- named, because its index differs per platform. */
106
+ script: string;
107
+ }
108
+ /** javac, then the JUnit console runner, both against the image's classpath. */
109
+ export declare function buildCommand(entryClass: string, overrideJar: string | undefined, platform?: ContainerPlatform): ContainerCommand;
110
+ /** The lines the fleet printed, which is what a reader wants out of the JUnit noise. */
111
+ export declare function extractReport(output: string): string;
112
+ /**
113
+ * Where a path inside the container lands on the host.
114
+ *
115
+ * The work directory is a bind mount of `directory`, so anything written under it appears
116
+ * there. Deriving the host path from the container path keeps the two ends of
117
+ * SKYRAMP_FLEET_REPORT_JSON as one fact: the value handed to the JVM is the value read
118
+ * back, rather than a second hardcoded guess that happens to agree.
119
+ *
120
+ * Returns undefined when the path is not under the work directory -- a caller may point
121
+ * the variable anywhere, and nothing outside the mount is visible from here.
122
+ */
123
+ export declare function hostPathForContainerPath(directory: string, workDir: string, containerPath: string): string | undefined;
124
+ /**
125
+ * Compiles and runs a generated fleet trio in the executor image, and returns what the run
126
+ * reported. The container is the same one every other generated test runs in; only the
127
+ * command and the mounts differ.
128
+ */
129
+ export declare function executeFleet(options: FleetExecutionOptions, docker?: Docker): Promise<FleetExecutionResult>;
130
+ export {};