@interf/compiler 0.9.4 → 0.13.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.
- package/README.md +96 -91
- package/TRADEMARKS.md +2 -13
- package/agent-skills/interf-actions/SKILL.md +97 -32
- package/agent-skills/interf-actions/references/cli.md +124 -71
- package/builtin-methods/interf-default/README.md +3 -4
- package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +2 -2
- package/builtin-methods/interf-default/compile/stages/summarize/SKILL.md +2 -1
- package/builtin-methods/interf-default/improve/SKILL.md +1 -1
- package/builtin-methods/interf-default/method.json +10 -4
- package/builtin-methods/interf-default/method.schema.json +0 -9
- package/builtin-methods/interf-default/use/query/SKILL.md +5 -5
- package/dist/cli/commands/compile.d.ts +9 -31
- package/dist/cli/commands/compile.js +75 -388
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/login.d.ts +7 -0
- package/dist/cli/commands/login.js +39 -0
- package/dist/cli/commands/logout.d.ts +2 -0
- package/dist/cli/commands/logout.js +16 -0
- package/dist/cli/commands/method.d.ts +2 -0
- package/dist/cli/commands/method.js +113 -0
- package/dist/cli/commands/prep.d.ts +2 -0
- package/dist/cli/commands/prep.js +134 -0
- package/dist/cli/commands/reset.d.ts +8 -1
- package/dist/cli/commands/reset.js +47 -15
- package/dist/cli/commands/runs.d.ts +2 -0
- package/dist/cli/commands/runs.js +120 -0
- package/dist/cli/commands/status.d.ts +6 -1
- package/dist/cli/commands/status.js +61 -220
- package/dist/cli/commands/test.d.ts +6 -15
- package/dist/cli/commands/test.js +63 -342
- package/dist/cli/commands/web.d.ts +0 -9
- package/dist/cli/commands/web.js +140 -367
- package/dist/cli/commands/wizard.d.ts +9 -0
- package/dist/cli/commands/wizard.js +442 -0
- package/dist/cli/index.d.ts +7 -6
- package/dist/cli/index.js +13 -10
- package/dist/compiler-ui/404.html +1 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
- package/dist/compiler-ui/__next._full.txt +3 -3
- package/dist/compiler-ui/__next._head.txt +1 -1
- package/dist/compiler-ui/__next._index.txt +2 -2
- package/dist/compiler-ui/__next._tree.txt +2 -2
- package/dist/compiler-ui/_next/static/chunks/045gole2ojo3g.css +3 -0
- package/dist/compiler-ui/_next/static/chunks/17t-lulmyawg5.js +89 -0
- package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
- package/dist/compiler-ui/_not-found.html +1 -1
- package/dist/compiler-ui/_not-found.txt +2 -2
- package/dist/compiler-ui/index.html +1 -1
- package/dist/compiler-ui/index.txt +3 -3
- package/dist/index.d.ts +0 -23
- package/dist/index.js +0 -16
- package/dist/packages/agents/lib/shells.d.ts +1 -1
- package/dist/packages/agents/lib/shells.js +113 -54
- package/dist/packages/agents/lib/user-config.d.ts +4 -2
- package/dist/packages/agents/lib/user-config.js +15 -7
- package/dist/packages/compiler/compiled-paths.d.ts +9 -2
- package/dist/packages/compiler/compiled-paths.js +30 -15
- package/dist/packages/compiler/compiled-pipeline.js +23 -3
- package/dist/packages/compiler/compiled-stage-plan.js +4 -0
- package/dist/packages/compiler/compiled-target.d.ts +1 -1
- package/dist/packages/compiler/compiled-target.js +1 -1
- package/dist/packages/compiler/index.d.ts +1 -0
- package/dist/packages/compiler/index.js +1 -0
- package/dist/packages/compiler/lib/schema.d.ts +27 -32
- package/dist/packages/compiler/lib/schema.js +2 -13
- package/dist/packages/compiler/method-runs.d.ts +2 -3
- package/dist/packages/compiler/method-runs.js +2 -3
- package/dist/packages/compiler/reset.js +3 -1
- package/dist/packages/compiler/runtime-contracts.js +0 -3
- package/dist/packages/compiler/runtime-prompt.js +1 -1
- package/dist/packages/compiler/source-files.d.ts +46 -0
- package/dist/packages/compiler/source-files.js +149 -0
- package/dist/packages/compiler/state-artifacts.d.ts +3 -2
- package/dist/packages/compiler/state-artifacts.js +4 -3
- package/dist/packages/compiler/state-io.d.ts +3 -2
- package/dist/packages/compiler/state-io.js +11 -5
- package/dist/packages/compiler/state-paths.d.ts +2 -1
- package/dist/packages/compiler/state-paths.js +6 -3
- package/dist/packages/compiler/state-view.d.ts +3 -2
- package/dist/packages/compiler/state-view.js +18 -28
- package/dist/packages/compiler/state.d.ts +4 -4
- package/dist/packages/compiler/state.js +3 -3
- package/dist/packages/contracts/index.d.ts +1 -1
- package/dist/packages/contracts/lib/preparation-paths.d.ts +117 -0
- package/dist/packages/contracts/lib/preparation-paths.js +177 -0
- package/dist/packages/contracts/lib/schema.d.ts +85 -6
- package/dist/packages/contracts/lib/schema.js +46 -2
- package/dist/packages/execution/lib/schema.d.ts +50 -57
- package/dist/packages/execution/lib/schema.js +1 -2
- package/dist/packages/local-service/action-definitions.d.ts +246 -0
- package/dist/packages/local-service/action-definitions.js +1147 -0
- package/dist/packages/local-service/action-planner.d.ts +9 -0
- package/dist/packages/local-service/action-planner.js +135 -0
- package/dist/packages/local-service/action-values.d.ts +1 -23
- package/dist/packages/local-service/action-values.js +1 -31
- package/dist/packages/local-service/client.d.ts +76 -46
- package/dist/packages/local-service/client.js +184 -149
- package/dist/packages/local-service/connection-config.d.ts +38 -0
- package/dist/packages/local-service/connection-config.js +75 -0
- package/dist/packages/local-service/index.d.ts +14 -7
- package/dist/packages/local-service/index.js +8 -4
- package/dist/packages/local-service/instance-paths.d.ts +100 -0
- package/dist/packages/local-service/instance-paths.js +165 -0
- package/dist/packages/local-service/lib/schema.d.ts +689 -2575
- package/dist/packages/local-service/lib/schema.js +260 -101
- package/dist/packages/local-service/native-run-handlers.d.ts +23 -0
- package/dist/{cli/commands/compile-controller.js → packages/local-service/native-run-handlers.js} +204 -20
- package/dist/packages/local-service/preparation-store.d.ts +92 -0
- package/dist/packages/local-service/preparation-store.js +171 -0
- package/dist/{cli/commands/check-draft.d.ts → packages/local-service/readiness-check-draft.d.ts} +2 -2
- package/dist/packages/local-service/routes.d.ts +33 -11
- package/dist/packages/local-service/routes.js +44 -15
- package/dist/packages/local-service/run-observability.js +25 -27
- package/dist/packages/local-service/runtime-caches.d.ts +76 -0
- package/dist/packages/local-service/runtime-caches.js +191 -0
- package/dist/packages/local-service/runtime-event-applier.d.ts +12 -0
- package/dist/packages/local-service/runtime-event-applier.js +177 -0
- package/dist/packages/local-service/runtime-persistence.d.ts +47 -0
- package/dist/packages/local-service/runtime-persistence.js +137 -0
- package/dist/packages/local-service/runtime-proposal-helpers.d.ts +35 -0
- package/dist/packages/local-service/runtime-proposal-helpers.js +251 -0
- package/dist/packages/local-service/runtime-resource-builders.d.ts +52 -0
- package/dist/packages/local-service/runtime-resource-builders.js +149 -0
- package/dist/packages/local-service/runtime.d.ts +201 -44
- package/dist/packages/local-service/runtime.js +1062 -1106
- package/dist/packages/local-service/server.d.ts +15 -0
- package/dist/packages/local-service/server.js +651 -233
- package/dist/packages/local-service/service-registry.d.ts +47 -0
- package/dist/packages/local-service/service-registry.js +137 -0
- package/dist/packages/method-authoring/method-authoring.d.ts +1 -1
- package/dist/packages/method-authoring/method-authoring.js +2 -2
- package/dist/packages/method-authoring/method-improvement.js +1 -1
- package/dist/packages/method-package/builtin-compiled-method.d.ts +4 -5
- package/dist/packages/method-package/builtin-compiled-method.js +8 -14
- package/dist/packages/method-package/context-interface.d.ts +4 -40
- package/dist/packages/method-package/context-interface.js +1 -23
- package/dist/packages/method-package/interf-method-package.d.ts +4 -4
- package/dist/packages/method-package/interf-method-package.js +21 -33
- package/dist/packages/method-package/local-methods.d.ts +10 -6
- package/dist/packages/method-package/local-methods.js +57 -39
- package/dist/packages/method-package/method-definitions.d.ts +8 -34
- package/dist/packages/method-package/method-definitions.js +49 -37
- package/dist/packages/method-package/method-helpers.d.ts +1 -13
- package/dist/packages/method-package/method-helpers.js +8 -42
- package/dist/packages/method-package/method-review-paths.d.ts +1 -1
- package/dist/packages/method-package/method-review-paths.js +5 -5
- package/dist/packages/method-package/method-stage-runner.js +2 -2
- package/dist/packages/method-package/user-methods.d.ts +17 -0
- package/dist/packages/method-package/user-methods.js +77 -0
- package/dist/packages/project-model/index.d.ts +1 -1
- package/dist/packages/project-model/index.js +1 -1
- package/dist/packages/project-model/interf-detect.d.ts +8 -3
- package/dist/packages/project-model/interf-detect.js +34 -34
- package/dist/packages/project-model/interf-scaffold.d.ts +3 -3
- package/dist/packages/project-model/interf-scaffold.js +23 -32
- package/dist/packages/project-model/lib/schema.js +38 -1
- package/dist/packages/project-model/preparation-entries.d.ts +11 -0
- package/dist/packages/project-model/preparation-entries.js +49 -0
- package/dist/packages/project-model/source-config.d.ts +11 -10
- package/dist/packages/project-model/source-config.js +83 -44
- package/dist/packages/project-model/source-folders.d.ts +5 -5
- package/dist/packages/project-model/source-folders.js +14 -14
- package/dist/packages/shared/filesystem.d.ts +7 -0
- package/dist/packages/shared/filesystem.js +97 -10
- package/dist/packages/testing/lib/schema.d.ts +12 -13
- package/dist/packages/testing/lib/schema.js +4 -5
- package/dist/packages/testing/readiness-check-run.d.ts +7 -7
- package/dist/packages/testing/readiness-check-run.js +46 -51
- package/dist/packages/testing/test-execution.js +6 -6
- package/dist/packages/testing/test-paths.js +4 -3
- package/dist/packages/testing/test-sandbox.d.ts +0 -1
- package/dist/packages/testing/test-sandbox.js +14 -30
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +6 -6
- package/dist/packages/testing/test.d.ts +1 -1
- package/dist/packages/testing/test.js +1 -1
- package/package.json +6 -26
- package/LICENSE +0 -183
- package/dist/cli/commands/compile-controller.d.ts +0 -17
- package/dist/cli/commands/compiled-flow.d.ts +0 -25
- package/dist/cli/commands/compiled-flow.js +0 -112
- package/dist/cli/commands/control-path.d.ts +0 -11
- package/dist/cli/commands/control-path.js +0 -72
- package/dist/cli/commands/create-method-wizard.d.ts +0 -76
- package/dist/cli/commands/create-method-wizard.js +0 -465
- package/dist/cli/commands/create.d.ts +0 -8
- package/dist/cli/commands/create.js +0 -189
- package/dist/cli/commands/default.d.ts +0 -2
- package/dist/cli/commands/default.js +0 -39
- package/dist/cli/commands/executor-flow.d.ts +0 -29
- package/dist/cli/commands/executor-flow.js +0 -163
- package/dist/cli/commands/init.d.ts +0 -11
- package/dist/cli/commands/init.js +0 -784
- package/dist/cli/commands/list.d.ts +0 -2
- package/dist/cli/commands/list.js +0 -30
- package/dist/cli/commands/preparation-selection.d.ts +0 -6
- package/dist/cli/commands/preparation-selection.js +0 -11
- package/dist/cli/commands/source-config-wizard.d.ts +0 -52
- package/dist/cli/commands/source-config-wizard.js +0 -680
- package/dist/cli/commands/test-flow.d.ts +0 -58
- package/dist/cli/commands/test-flow.js +0 -231
- package/dist/cli/commands/verify.d.ts +0 -2
- package/dist/cli/commands/verify.js +0 -94
- package/dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js +0 -118
- package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +0 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -49
- package/dist/packages/compiler/raw-snapshot.js +0 -101
- package/dist/packages/method-package/index.d.ts +0 -11
- package/dist/packages/method-package/index.js +0 -11
- package/dist/packages/method-package/method-stage-policy.d.ts +0 -5
- package/dist/packages/method-package/method-stage-policy.js +0 -31
- package/dist/packages/project-model/project-paths.d.ts +0 -12
- package/dist/packages/project-model/project-paths.js +0 -33
- /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → C6vVfy3aeYuIO3d2AoNvC}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → C6vVfy3aeYuIO3d2AoNvC}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{j7pdoqWrl4YJrJUVnksbl → C6vVfy3aeYuIO3d2AoNvC}/_ssgManifest.js +0 -0
- /package/dist/{cli/commands/check-draft.js → packages/local-service/readiness-check-draft.js} +0 -0
package/dist/{cli/commands/compile-controller.js → packages/local-service/native-run-handlers.js}
RENAMED
|
@@ -2,16 +2,22 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
5
|
+
import { compileCompiled, } from "../compiler/method-runs.js";
|
|
6
|
+
import { readInterfConfig } from "../project-model/interf.js";
|
|
7
|
+
import { resolveLocalExecutor, } from "../agents/lib/executors.js";
|
|
8
|
+
import { formatMethodExecutionProfile } from "../agents/lib/execution-profile.js";
|
|
9
|
+
import { clearCompiledRuntimeDerivedArtifacts, } from "../compiler/reset.js";
|
|
10
|
+
import { formatActiveCompiledMethodStageStep, resolveRequiredCompiledMethodFromConfig, } from "../method-package/method-definitions.js";
|
|
11
|
+
import { loadCompiledPreparationConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../project-model/source-config.js";
|
|
12
|
+
import { runMethodImprovementLoop } from "../method-authoring/method-improvement.js";
|
|
13
|
+
import { stageExecutionShellsRoot, methodPackagePathForCompiled, } from "../compiler/compiled-paths.js";
|
|
14
|
+
import { readCompiledSchemaFile } from "../compiler/compiled-schema.js";
|
|
15
|
+
import { initializeCompiledRuntimeState } from "../compiler/state.js";
|
|
16
|
+
import { readinessPassRate, runReadinessChecksForExecutor, runSavedPortableContextCheck, } from "../testing/readiness-check-run.js";
|
|
17
|
+
import { runMethodAuthoringDraft, } from "../method-authoring/method-authoring.js";
|
|
18
|
+
import { draftReadinessChecks, } from "./readiness-check-draft.js";
|
|
19
|
+
import { planActionProposalWithExecutor, } from "./action-planner.js";
|
|
20
|
+
import { ActionProposalPlanSchema, } from "./lib/schema.js";
|
|
15
21
|
function printCompileFailure(compiledPath, failedStage) {
|
|
16
22
|
resolveRequiredCompiledMethodFromConfig(readInterfConfig(compiledPath), `.interf/interf.json for ${compiledPath}`);
|
|
17
23
|
let failedStageLabel = failedStage ? `Stage "${failedStage}"` : "Compile";
|
|
@@ -26,10 +32,59 @@ function printCompileFailure(compiledPath, failedStage) {
|
|
|
26
32
|
function testScore(outcome) {
|
|
27
33
|
return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
|
|
28
34
|
}
|
|
35
|
+
async function compileCompiledWithReporter(executor, compiledPath, options = {}) {
|
|
36
|
+
console.log();
|
|
37
|
+
console.log(chalk.bold(` ${options.heading ?? "Building Portable Context..."}`));
|
|
38
|
+
const profileLabel = formatMethodExecutionProfile(executor.executionProfile);
|
|
39
|
+
if (profileLabel) {
|
|
40
|
+
console.log(chalk.dim(` Execution profile: ${profileLabel}`));
|
|
41
|
+
}
|
|
42
|
+
console.log();
|
|
43
|
+
const reporter = {
|
|
44
|
+
line: (message) => console.log(chalk.dim(` ${message}`)),
|
|
45
|
+
blankLine: () => console.log(),
|
|
46
|
+
};
|
|
47
|
+
const result = await compileCompiled({
|
|
48
|
+
executor,
|
|
49
|
+
compiledPath,
|
|
50
|
+
reporter,
|
|
51
|
+
preserveStageShells: options.preserveStageShells,
|
|
52
|
+
runId: options.runId,
|
|
53
|
+
events: options.events,
|
|
54
|
+
});
|
|
55
|
+
if (!result.ok)
|
|
56
|
+
return result;
|
|
57
|
+
console.log();
|
|
58
|
+
console.log(chalk.green(` ${options.successMessage ?? "Portable Context ready."}`));
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
function printSavedReadinessOutcome(prefix, outcome) {
|
|
62
|
+
const color = outcome.result.ok ? chalk.green : chalk.red;
|
|
63
|
+
const status = outcome.result.ok ? chalk.green("PASS") : chalk.red("FAIL");
|
|
64
|
+
console.log(chalk.bold(` ${prefix}`));
|
|
65
|
+
console.log();
|
|
66
|
+
console.log(color(` ${status} ${outcome.result.passedCases}/${outcome.result.totalCases} readiness checks`));
|
|
67
|
+
console.log();
|
|
68
|
+
for (const [index, caseResult] of outcome.result.caseResults.entries()) {
|
|
69
|
+
const caseStatus = caseResult.ok ? chalk.green("PASS") : chalk.red("FAIL");
|
|
70
|
+
console.log(` ${caseStatus} Check ${index + 1}`);
|
|
71
|
+
console.log(chalk.dim(` ${caseResult.question}`));
|
|
72
|
+
const failedChecks = caseResult.checks.filter((entry) => !entry.ok).slice(0, 3);
|
|
73
|
+
for (const failedCheck of failedChecks) {
|
|
74
|
+
console.log(chalk.dim(` Failed criterion: ${failedCheck.label}: ${failedCheck.detail}`));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
console.log();
|
|
78
|
+
if (outcome.result.sandbox_path) {
|
|
79
|
+
console.log(chalk.dim(` Preserved sandbox: ${outcome.result.sandbox_path}`));
|
|
80
|
+
console.log();
|
|
81
|
+
}
|
|
82
|
+
console.log(chalk.dim(` Saved run: ${outcome.displayRunPath ?? outcome.runPath}`));
|
|
83
|
+
}
|
|
29
84
|
function bestVariationRestorePaths(compiledPath) {
|
|
30
85
|
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
31
86
|
const zonePaths = (schema?.zones ?? [])
|
|
32
|
-
.filter((zone) => zone.
|
|
87
|
+
.filter((zone) => zone.kind !== "runtime")
|
|
33
88
|
.map((zone) => zone.path);
|
|
34
89
|
return [
|
|
35
90
|
"AGENTS.md",
|
|
@@ -107,12 +162,11 @@ async function runMethodVariation(options) {
|
|
|
107
162
|
fatalError: null,
|
|
108
163
|
};
|
|
109
164
|
}
|
|
110
|
-
const outcome = await
|
|
165
|
+
const outcome = await runSavedPortableContextCheck({
|
|
111
166
|
sourcePath: options.sourcePath,
|
|
112
167
|
preparationConfig: options.compiledConfig,
|
|
113
168
|
executor: options.testExecutor,
|
|
114
|
-
|
|
115
|
-
compiledPath: options.compiledPath,
|
|
169
|
+
portableContextPath: options.compiledPath,
|
|
116
170
|
preserveSandboxes: options.preserveStageShells === "always" ? "always" : "on-failure",
|
|
117
171
|
});
|
|
118
172
|
if (!outcome) {
|
|
@@ -123,11 +177,11 @@ async function runMethodVariation(options) {
|
|
|
123
177
|
bestOutcome,
|
|
124
178
|
bestSnapshotPath,
|
|
125
179
|
bestAttempt,
|
|
126
|
-
fatalError: "Could not run the
|
|
180
|
+
fatalError: "Could not run saved readiness checks against the Portable Context after prepare.",
|
|
127
181
|
};
|
|
128
182
|
}
|
|
129
183
|
console.log();
|
|
130
|
-
|
|
184
|
+
printSavedReadinessOutcome(`${options.variationLabel} · attempt ${attempt}/${options.maxAttempts}`, outcome);
|
|
131
185
|
if (!bestOutcome || testScore(outcome) > testScore(bestOutcome)) {
|
|
132
186
|
if (bestSnapshotPath) {
|
|
133
187
|
rmSync(bestSnapshotPath, { recursive: true, force: true });
|
|
@@ -185,7 +239,7 @@ function summarizeMethodVariation(options) {
|
|
|
185
239
|
: options.result.bestOutcome
|
|
186
240
|
? `Best result: ${passedChecks}/${totalChecks} readiness checks passed.`
|
|
187
241
|
: options.result.failedStage
|
|
188
|
-
? `
|
|
242
|
+
? `Prepare failed at stage ${options.result.failedStage} before any saved readiness result.`
|
|
189
243
|
: "Method variation did not produce a passing result.";
|
|
190
244
|
return {
|
|
191
245
|
variation: options.variation,
|
|
@@ -219,10 +273,10 @@ function printPostCompileNextStep(options) {
|
|
|
219
273
|
return;
|
|
220
274
|
}
|
|
221
275
|
if (options.testedDuringCompile) {
|
|
222
|
-
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf test` if you also want
|
|
276
|
+
console.log(chalk.dim(" Next: inspect the Portable Context agents will use, or run `interf test` if you also want readiness evidence for source files and Portable Context."));
|
|
223
277
|
return;
|
|
224
278
|
}
|
|
225
|
-
console.log(chalk.dim(" Next: run `interf test` to
|
|
279
|
+
console.log(chalk.dim(" Next: run `interf test` to collect readiness evidence for source files and Portable Context."));
|
|
226
280
|
}
|
|
227
281
|
function formatVariationReadinessSummary(summary) {
|
|
228
282
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
@@ -300,7 +354,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
300
354
|
const compiledConfig = options.compiledConfig
|
|
301
355
|
?? loadCompiledPreparationConfig(options.compiledPath)
|
|
302
356
|
?? {
|
|
303
|
-
name: readInterfConfig(options.compiledPath)?.name ?? "
|
|
357
|
+
name: readInterfConfig(options.compiledPath)?.name ?? "preparation",
|
|
304
358
|
path: "./source-folder",
|
|
305
359
|
checks: [],
|
|
306
360
|
};
|
|
@@ -443,3 +497,133 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
443
497
|
}
|
|
444
498
|
}
|
|
445
499
|
}
|
|
500
|
+
function resolveHandlerExecutor(configured) {
|
|
501
|
+
if (configured)
|
|
502
|
+
return configured;
|
|
503
|
+
const resolved = resolveLocalExecutor({ preflight: true });
|
|
504
|
+
if (!resolved.executor) {
|
|
505
|
+
throw new Error(resolved.error ?? "No local agent detected.");
|
|
506
|
+
}
|
|
507
|
+
return resolved.executor;
|
|
508
|
+
}
|
|
509
|
+
export function createNativeLocalServiceRunHandlers(options = {}) {
|
|
510
|
+
return {
|
|
511
|
+
async planActionProposal(request, context) {
|
|
512
|
+
const resolved = options.executor
|
|
513
|
+
? { executor: options.executor, error: null }
|
|
514
|
+
: resolveLocalExecutor({ preflight: true });
|
|
515
|
+
if (!resolved.executor) {
|
|
516
|
+
return ActionProposalPlanSchema.parse({
|
|
517
|
+
action_type: "clarification",
|
|
518
|
+
preparation: request.preparation,
|
|
519
|
+
assistant_message: resolved.error ?? "No local agent detected for action planning.",
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
return planActionProposalWithExecutor({
|
|
523
|
+
request,
|
|
524
|
+
context,
|
|
525
|
+
executor: resolved.executor,
|
|
526
|
+
});
|
|
527
|
+
},
|
|
528
|
+
async createCompileRun(request, context) {
|
|
529
|
+
const executor = resolveHandlerExecutor(options.executor);
|
|
530
|
+
const testExecutor = resolveHandlerExecutor(options.testExecutor ?? options.executor);
|
|
531
|
+
const ok = await runConfiguredCompiledCompile({
|
|
532
|
+
executor,
|
|
533
|
+
testExecutor,
|
|
534
|
+
compiledPath: context.compiledPath,
|
|
535
|
+
sourcePath: context.sourcePath,
|
|
536
|
+
compiledConfig: context.preparationConfig,
|
|
537
|
+
maxAttemptsOverride: request.max_attempts ?? null,
|
|
538
|
+
maxLoopsOverride: request.max_loops ?? null,
|
|
539
|
+
preserveStageShells: request.preserve_stage_shells,
|
|
540
|
+
runId: context.runId,
|
|
541
|
+
events: context.events,
|
|
542
|
+
});
|
|
543
|
+
return { ok };
|
|
544
|
+
},
|
|
545
|
+
async createTestRun(request, context) {
|
|
546
|
+
const executor = resolveHandlerExecutor(options.testExecutor ?? options.executor);
|
|
547
|
+
const result = await runReadinessChecksForExecutor({
|
|
548
|
+
sourcePath: context.sourcePath,
|
|
549
|
+
preparationConfig: context.preparationConfig,
|
|
550
|
+
portableContextPath: context.compiledPath,
|
|
551
|
+
mode: request.mode,
|
|
552
|
+
executor,
|
|
553
|
+
});
|
|
554
|
+
const missingSourceFiles = (request.mode === "source-files" || request.mode === "both") && !result.sourceFilesOutcome;
|
|
555
|
+
const missingPortableContext = (request.mode === "compiled" || request.mode === "both") && !result.compiledOutcome;
|
|
556
|
+
if (missingSourceFiles || missingPortableContext) {
|
|
557
|
+
return {
|
|
558
|
+
ok: false,
|
|
559
|
+
readiness_run: result.readinessRun,
|
|
560
|
+
error: missingPortableContext
|
|
561
|
+
? "Portable Context is not ready for readiness checks."
|
|
562
|
+
: "Source files are not ready for readiness checks.",
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
return {
|
|
566
|
+
ok: true,
|
|
567
|
+
readiness_run: result.readinessRun,
|
|
568
|
+
};
|
|
569
|
+
},
|
|
570
|
+
async createReadinessCheckDraft(request, context) {
|
|
571
|
+
const executor = resolveHandlerExecutor(options.executor);
|
|
572
|
+
context.emit({
|
|
573
|
+
type: "log.appended",
|
|
574
|
+
step_id: "agent-draft",
|
|
575
|
+
message: `Using ${executor.displayName} to draft readiness checks.`,
|
|
576
|
+
});
|
|
577
|
+
const drafted = await draftReadinessChecks({
|
|
578
|
+
preparationName: request.preparation,
|
|
579
|
+
sourceFolderPath: request.source_folder_path,
|
|
580
|
+
about: request.about,
|
|
581
|
+
executor,
|
|
582
|
+
targetCount: request.target_count,
|
|
583
|
+
onStatus: (line) => context.emit({
|
|
584
|
+
type: "log.appended",
|
|
585
|
+
step_id: "agent-draft",
|
|
586
|
+
message: line,
|
|
587
|
+
}),
|
|
588
|
+
});
|
|
589
|
+
if (!drafted.checks) {
|
|
590
|
+
throw new Error(drafted.error ?? "Could not draft readiness checks from this Source Folder.");
|
|
591
|
+
}
|
|
592
|
+
return {
|
|
593
|
+
checks: drafted.checks,
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
async createMethodAuthoringRun(request, context) {
|
|
597
|
+
const executor = resolveHandlerExecutor(options.executor);
|
|
598
|
+
context.emit({
|
|
599
|
+
type: "log.appended",
|
|
600
|
+
step_id: "draft-package",
|
|
601
|
+
message: `Using ${executor.displayName} for Method authoring.`,
|
|
602
|
+
});
|
|
603
|
+
const result = await runMethodAuthoringDraft({
|
|
604
|
+
prepDataDir: context.sourcePath,
|
|
605
|
+
sourceFolderPath: request.source_folder_path,
|
|
606
|
+
baseMethodId: request.reference_method_id ?? request.base_method_id,
|
|
607
|
+
methodId: request.method_id,
|
|
608
|
+
label: request.label,
|
|
609
|
+
hint: request.hint,
|
|
610
|
+
taskPrompt: request.task_prompt,
|
|
611
|
+
checks: request.checks,
|
|
612
|
+
executor,
|
|
613
|
+
onStatus: (line) => context.emit({
|
|
614
|
+
type: "log.appended",
|
|
615
|
+
step_id: "draft-package",
|
|
616
|
+
message: line,
|
|
617
|
+
}),
|
|
618
|
+
});
|
|
619
|
+
return {
|
|
620
|
+
status: result.status,
|
|
621
|
+
changed: result.changed,
|
|
622
|
+
summary: result.summary,
|
|
623
|
+
validation: result.validation,
|
|
624
|
+
method_path: result.methodPath,
|
|
625
|
+
shell_path: result.shellPath,
|
|
626
|
+
};
|
|
627
|
+
},
|
|
628
|
+
};
|
|
629
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.13 preparation store.
|
|
3
|
+
*
|
|
4
|
+
* Each preparation lives at `~/.interf/preparations/<id>/` and is also
|
|
5
|
+
* registered with the runtime as a synthetic workspace so the existing
|
|
6
|
+
* compile / test / readiness machinery (preparation-keyed under the hood)
|
|
7
|
+
* keeps working without a parallel implementation.
|
|
8
|
+
*
|
|
9
|
+
* ~/.interf/preparations/<id>/
|
|
10
|
+
* interf.json ← preparation config, single preparation entry name=<id>
|
|
11
|
+
* <id>/ ← portable context (matches preparation name)
|
|
12
|
+
*
|
|
13
|
+
* NOTE: We keep the synthetic `interf.json` shape (with a `preparations[]`
|
|
14
|
+
* array of length 1, name=id, path=id) so the existing compile/test
|
|
15
|
+
* machinery stays functional. The doc-shape `config.json` /
|
|
16
|
+
* `portable-context/` from `instance-paths.ts` is aspirational; transitioning
|
|
17
|
+
* the entire compile pipeline to read those names is out of scope for the
|
|
18
|
+
* 0.13 cutover.
|
|
19
|
+
*
|
|
20
|
+
* Public callers reach this through the preparation-keyed HTTP routes.
|
|
21
|
+
*/
|
|
22
|
+
import type { SourcePreparationConfig } from "../project-model/lib/schema.js";
|
|
23
|
+
import type { LocalServiceRuntime } from "./runtime.js";
|
|
24
|
+
export interface PreparationCreateInput {
|
|
25
|
+
id: string;
|
|
26
|
+
source: {
|
|
27
|
+
kind: "local-folder";
|
|
28
|
+
locator: string;
|
|
29
|
+
};
|
|
30
|
+
method_id: string;
|
|
31
|
+
about?: string;
|
|
32
|
+
checks?: Array<{
|
|
33
|
+
question: string;
|
|
34
|
+
answer?: string;
|
|
35
|
+
strictness?: string;
|
|
36
|
+
expect?: string;
|
|
37
|
+
}>;
|
|
38
|
+
max_attempts?: number;
|
|
39
|
+
max_loops?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface StoredPreparation {
|
|
42
|
+
id: string;
|
|
43
|
+
prepDataDir: string;
|
|
44
|
+
source: {
|
|
45
|
+
kind: "local-folder";
|
|
46
|
+
locator: string;
|
|
47
|
+
};
|
|
48
|
+
methodId: string;
|
|
49
|
+
about: string | null;
|
|
50
|
+
config: SourcePreparationConfig;
|
|
51
|
+
portableContextPath: string;
|
|
52
|
+
configPath: string;
|
|
53
|
+
}
|
|
54
|
+
/** List every preparation registered under `~/.interf/preparations/`. */
|
|
55
|
+
export declare function listStoredPreparations(): StoredPreparation[];
|
|
56
|
+
/** Read one preparation by id. Returns null when missing. */
|
|
57
|
+
export declare function getStoredPreparation(prepId: string): StoredPreparation | null;
|
|
58
|
+
/**
|
|
59
|
+
* Create a preparation: scaffold its data dir, write the synthetic
|
|
60
|
+
* workspace config, and register it with the runtime so subsequent
|
|
61
|
+
* compile / test / readiness calls find it.
|
|
62
|
+
*
|
|
63
|
+
* Throws on validation errors (bad id, bad method id, source missing).
|
|
64
|
+
*/
|
|
65
|
+
export declare function createStoredPreparation(runtime: LocalServiceRuntime, input: PreparationCreateInput): StoredPreparation;
|
|
66
|
+
/**
|
|
67
|
+
* Delete a preparation: deregister its synthetic workspace and remove
|
|
68
|
+
* `~/.interf/preparations/<id>/` from disk. Returns true when something
|
|
69
|
+
* was actually removed.
|
|
70
|
+
*/
|
|
71
|
+
export declare function deleteStoredPreparation(runtime: LocalServiceRuntime, prepId: string): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Re-register every preparation directory with the runtime on startup so
|
|
74
|
+
* synthetic workspaces survive a `interf web` restart.
|
|
75
|
+
*/
|
|
76
|
+
export declare function rehydratePreparations(runtime: LocalServiceRuntime): void;
|
|
77
|
+
/** Build the wire shape for `GET /v1/preparations/<id>` given a stored preparation. */
|
|
78
|
+
export declare function preparationWireShape(stored: StoredPreparation): {
|
|
79
|
+
id: string;
|
|
80
|
+
source: {
|
|
81
|
+
kind: string;
|
|
82
|
+
locator: string;
|
|
83
|
+
};
|
|
84
|
+
method_id: string;
|
|
85
|
+
about: string | null;
|
|
86
|
+
config_path: string;
|
|
87
|
+
portable_context: {
|
|
88
|
+
kind: "local-path";
|
|
89
|
+
value: string;
|
|
90
|
+
};
|
|
91
|
+
checks: SourcePreparationConfig["checks"];
|
|
92
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.13 preparation store.
|
|
3
|
+
*
|
|
4
|
+
* Each preparation lives at `~/.interf/preparations/<id>/` and is also
|
|
5
|
+
* registered with the runtime as a synthetic workspace so the existing
|
|
6
|
+
* compile / test / readiness machinery (preparation-keyed under the hood)
|
|
7
|
+
* keeps working without a parallel implementation.
|
|
8
|
+
*
|
|
9
|
+
* ~/.interf/preparations/<id>/
|
|
10
|
+
* interf.json ← preparation config, single preparation entry name=<id>
|
|
11
|
+
* <id>/ ← portable context (matches preparation name)
|
|
12
|
+
*
|
|
13
|
+
* NOTE: We keep the synthetic `interf.json` shape (with a `preparations[]`
|
|
14
|
+
* array of length 1, name=id, path=id) so the existing compile/test
|
|
15
|
+
* machinery stays functional. The doc-shape `config.json` /
|
|
16
|
+
* `portable-context/` from `instance-paths.ts` is aspirational; transitioning
|
|
17
|
+
* the entire compile pipeline to read those names is out of scope for the
|
|
18
|
+
* 0.13 cutover.
|
|
19
|
+
*
|
|
20
|
+
* Public callers reach this through the preparation-keyed HTTP routes.
|
|
21
|
+
*/
|
|
22
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, } from "node:fs";
|
|
23
|
+
import { join, resolve } from "node:path";
|
|
24
|
+
import { PreparationNameSchema, MethodIdSchema, } from "../contracts/lib/schema.js";
|
|
25
|
+
import { preparationDataDir, preparationsRoot, } from "./instance-paths.js";
|
|
26
|
+
import { saveSourceFolderConfig, loadSourceFolderConfig, } from "../project-model/source-config.js";
|
|
27
|
+
function ensurePreparationsRoot() {
|
|
28
|
+
mkdirSync(preparationsRoot(), { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
function readSourceFolderBindingFromInterfJson(prepDataDir) {
|
|
31
|
+
const filePath = join(prepDataDir, "interf.json");
|
|
32
|
+
if (!existsSync(filePath))
|
|
33
|
+
return null;
|
|
34
|
+
try {
|
|
35
|
+
const raw = JSON.parse(readFileSync(filePath, "utf8"));
|
|
36
|
+
const sourceFolder = raw.source_folder;
|
|
37
|
+
if (!sourceFolder?.path)
|
|
38
|
+
return null;
|
|
39
|
+
return { path: sourceFolder.path, about: sourceFolder.about ?? null };
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function loadStoredPreparation(prepId) {
|
|
46
|
+
const prepDataDir = preparationDataDir(prepId);
|
|
47
|
+
if (!existsSync(prepDataDir) || !statSync(prepDataDir).isDirectory())
|
|
48
|
+
return null;
|
|
49
|
+
const config = loadSourceFolderConfig(prepDataDir);
|
|
50
|
+
if (!config)
|
|
51
|
+
return null;
|
|
52
|
+
const preparation = config.preparations?.find((p) => p.name === prepId);
|
|
53
|
+
if (!preparation)
|
|
54
|
+
return null;
|
|
55
|
+
const binding = readSourceFolderBindingFromInterfJson(prepDataDir);
|
|
56
|
+
if (!binding?.path)
|
|
57
|
+
return null;
|
|
58
|
+
return {
|
|
59
|
+
id: prepId,
|
|
60
|
+
prepDataDir,
|
|
61
|
+
source: { kind: "local-folder", locator: binding.path },
|
|
62
|
+
methodId: preparation.method ?? "interf-default",
|
|
63
|
+
about: binding.about ?? null,
|
|
64
|
+
config: preparation,
|
|
65
|
+
portableContextPath: join(prepDataDir, prepId),
|
|
66
|
+
configPath: join(prepDataDir, "interf.json"),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** List every preparation registered under `~/.interf/preparations/`. */
|
|
70
|
+
export function listStoredPreparations() {
|
|
71
|
+
const root = preparationsRoot();
|
|
72
|
+
if (!existsSync(root))
|
|
73
|
+
return [];
|
|
74
|
+
const entries = readdirSync(root, { withFileTypes: true });
|
|
75
|
+
const out = [];
|
|
76
|
+
for (const entry of entries) {
|
|
77
|
+
if (!entry.isDirectory())
|
|
78
|
+
continue;
|
|
79
|
+
const stored = loadStoredPreparation(entry.name);
|
|
80
|
+
if (stored)
|
|
81
|
+
out.push(stored);
|
|
82
|
+
}
|
|
83
|
+
return out.sort((a, b) => a.id.localeCompare(b.id));
|
|
84
|
+
}
|
|
85
|
+
/** Read one preparation by id. Returns null when missing. */
|
|
86
|
+
export function getStoredPreparation(prepId) {
|
|
87
|
+
return loadStoredPreparation(prepId);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create a preparation: scaffold its data dir, write the synthetic
|
|
91
|
+
* workspace config, and register it with the runtime so subsequent
|
|
92
|
+
* compile / test / readiness calls find it.
|
|
93
|
+
*
|
|
94
|
+
* Throws on validation errors (bad id, bad method id, source missing).
|
|
95
|
+
*/
|
|
96
|
+
export function createStoredPreparation(runtime, input) {
|
|
97
|
+
PreparationNameSchema.parse(input.id);
|
|
98
|
+
MethodIdSchema.parse(input.method_id);
|
|
99
|
+
const sourceLocator = resolve(input.source.locator);
|
|
100
|
+
if (!existsSync(sourceLocator)) {
|
|
101
|
+
throw new Error(`Source folder does not exist: ${sourceLocator}`);
|
|
102
|
+
}
|
|
103
|
+
if (!statSync(sourceLocator).isDirectory()) {
|
|
104
|
+
throw new Error(`Source folder is not a directory: ${sourceLocator}`);
|
|
105
|
+
}
|
|
106
|
+
ensurePreparationsRoot();
|
|
107
|
+
const prepDataDir = preparationDataDir(input.id);
|
|
108
|
+
if (existsSync(prepDataDir) && loadStoredPreparation(input.id)) {
|
|
109
|
+
throw new Error(`Preparation already exists: ${input.id}`);
|
|
110
|
+
}
|
|
111
|
+
mkdirSync(prepDataDir, { recursive: true });
|
|
112
|
+
const preparation = {
|
|
113
|
+
name: input.id,
|
|
114
|
+
path: input.id,
|
|
115
|
+
method: input.method_id,
|
|
116
|
+
checks: (input.checks ?? []).map((check) => ({
|
|
117
|
+
question: check.question,
|
|
118
|
+
...(check.answer ? { answer: check.answer } : {}),
|
|
119
|
+
...(check.strictness ? { strictness: check.strictness } : {}),
|
|
120
|
+
...(check.expect ? { expect: check.expect } : {}),
|
|
121
|
+
})),
|
|
122
|
+
...(input.about ? { about: input.about } : {}),
|
|
123
|
+
...(input.max_attempts ? { max_attempts: input.max_attempts } : {}),
|
|
124
|
+
...(input.max_loops ? { max_loops: input.max_loops } : {}),
|
|
125
|
+
};
|
|
126
|
+
saveSourceFolderConfig(prepDataDir, {
|
|
127
|
+
source_folder: { path: sourceLocator, ...(input.about ? { about: input.about } : {}) },
|
|
128
|
+
preparations: [preparation],
|
|
129
|
+
});
|
|
130
|
+
// Hand the synthetic workspace to the runtime so the existing
|
|
131
|
+
// compile/test/readiness paths see it.
|
|
132
|
+
runtime.registerPreparation(prepDataDir);
|
|
133
|
+
const stored = loadStoredPreparation(input.id);
|
|
134
|
+
if (!stored)
|
|
135
|
+
throw new Error(`Failed to load freshly-created preparation ${input.id}`);
|
|
136
|
+
return stored;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Delete a preparation: deregister its synthetic workspace and remove
|
|
140
|
+
* `~/.interf/preparations/<id>/` from disk. Returns true when something
|
|
141
|
+
* was actually removed.
|
|
142
|
+
*/
|
|
143
|
+
export function deleteStoredPreparation(runtime, prepId) {
|
|
144
|
+
const prepDataDir = preparationDataDir(prepId);
|
|
145
|
+
if (!existsSync(prepDataDir))
|
|
146
|
+
return false;
|
|
147
|
+
runtime.deregisterPreparation(prepDataDir);
|
|
148
|
+
rmSync(prepDataDir, { recursive: true, force: true });
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Re-register every preparation directory with the runtime on startup so
|
|
153
|
+
* synthetic workspaces survive a `interf web` restart.
|
|
154
|
+
*/
|
|
155
|
+
export function rehydratePreparations(runtime) {
|
|
156
|
+
for (const stored of listStoredPreparations()) {
|
|
157
|
+
runtime.registerPreparation(stored.prepDataDir);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Build the wire shape for `GET /v1/preparations/<id>` given a stored preparation. */
|
|
161
|
+
export function preparationWireShape(stored) {
|
|
162
|
+
return {
|
|
163
|
+
id: stored.id,
|
|
164
|
+
source: stored.source,
|
|
165
|
+
method_id: stored.methodId,
|
|
166
|
+
about: stored.about,
|
|
167
|
+
config_path: stored.configPath,
|
|
168
|
+
portable_context: { kind: "local-path", value: stored.portableContextPath },
|
|
169
|
+
checks: stored.config.checks ?? [],
|
|
170
|
+
};
|
|
171
|
+
}
|
package/dist/{cli/commands/check-draft.d.ts → packages/local-service/readiness-check-draft.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MethodExecutor } from "
|
|
2
|
-
import type { SourceReadinessCheck } from "
|
|
1
|
+
import type { MethodExecutor } from "../agents/lib/executors.js";
|
|
2
|
+
import type { SourceReadinessCheck } from "../project-model/lib/schema.js";
|
|
3
3
|
export declare function buildReadinessCheckDraftPrompt(options: {
|
|
4
4
|
preparationName: string;
|
|
5
5
|
sourceFolderPath: string;
|
|
@@ -1,27 +1,49 @@
|
|
|
1
1
|
export declare const LOCAL_SERVICE_DEFAULT_HOST = "127.0.0.1";
|
|
2
2
|
export declare const LOCAL_SERVICE_DEFAULT_PORT = 4873;
|
|
3
|
-
export declare const LOCAL_SERVICE_INSTANCE_POINTER_PATH: readonly ["interf", ".service", "local-instance.json"];
|
|
4
3
|
export declare const LOCAL_SERVICE_ROUTES: {
|
|
5
4
|
readonly root: "/";
|
|
6
5
|
readonly api: "/v1";
|
|
7
6
|
readonly health: "/health";
|
|
7
|
+
readonly instance: "/v1/instance";
|
|
8
8
|
readonly preparations: "/v1/preparations";
|
|
9
|
-
readonly workspaceFiles: "/v1/workspace-files";
|
|
10
|
-
readonly sourceFiles: "/v1/source-files";
|
|
11
9
|
readonly methods: "/v1/methods";
|
|
12
|
-
readonly jobs: "/v1/jobs";
|
|
13
|
-
readonly readinessCheckDrafts: "/v1/readiness-check-drafts";
|
|
14
|
-
readonly methodAuthoringRuns: "/v1/method-authoring-runs";
|
|
15
10
|
readonly runs: "/v1/runs";
|
|
16
|
-
readonly executor: "/v1/executor";
|
|
17
11
|
readonly actionProposals: "/v1/action-proposals";
|
|
18
|
-
readonly
|
|
19
|
-
readonly testRuns: "/v1/test-runs";
|
|
20
|
-
readonly portableContexts: "/v1/portable-contexts";
|
|
21
|
-
readonly readiness: "/v1/readiness";
|
|
12
|
+
readonly executor: "/v1/executor";
|
|
22
13
|
readonly openPath: "/v1/open-path";
|
|
23
14
|
};
|
|
15
|
+
/** Preparation-scoped sub-resources (relative to /v1/preparations/<id>/). */
|
|
16
|
+
export declare const PREPARATION_SUBRESOURCES: {
|
|
17
|
+
readonly compileRuns: "compile-runs";
|
|
18
|
+
readonly testRuns: "test-runs";
|
|
19
|
+
readonly methodAuthoringRuns: "method-authoring-runs";
|
|
20
|
+
readonly methodImprovementRuns: "method-improvement-runs";
|
|
21
|
+
readonly readinessCheckDrafts: "readiness-check-drafts";
|
|
22
|
+
readonly changes: "changes";
|
|
23
|
+
readonly reset: "reset";
|
|
24
|
+
readonly runs: "runs";
|
|
25
|
+
readonly readiness: "readiness";
|
|
26
|
+
readonly sourceFiles: "source-files";
|
|
27
|
+
readonly portableContext: "portable-context";
|
|
28
|
+
};
|
|
29
|
+
/** Run-scoped sub-resources (relative to /v1/runs/<run-id>/). */
|
|
30
|
+
export declare const RUN_SUBRESOURCES: {
|
|
31
|
+
readonly events: "events";
|
|
32
|
+
readonly cancel: "cancel";
|
|
33
|
+
readonly proof: "proof";
|
|
34
|
+
readonly artifacts: "artifacts";
|
|
35
|
+
};
|
|
24
36
|
export declare function buildLocalServiceUrl(options?: {
|
|
25
37
|
host?: string;
|
|
26
38
|
port?: number;
|
|
27
39
|
}): string;
|
|
40
|
+
/** Path builder: /v1/preparations/<id>. */
|
|
41
|
+
export declare function preparationResourcePath(prepId: string): string;
|
|
42
|
+
/** Path builder: /v1/preparations/<id>/<subresource>. */
|
|
43
|
+
export declare function preparationSubresourcePath(prepId: string, sub: keyof typeof PREPARATION_SUBRESOURCES): string;
|
|
44
|
+
/** Path builder: /v1/runs/<run-id>. */
|
|
45
|
+
export declare function runResourcePath(runId: string): string;
|
|
46
|
+
/** Path builder: /v1/runs/<run-id>/<subresource>. */
|
|
47
|
+
export declare function runSubresourcePath(runId: string, sub: keyof typeof RUN_SUBRESOURCES): string;
|
|
48
|
+
/** Path builder: /v1/methods/<id>. */
|
|
49
|
+
export declare function methodResourcePath(methodId: string): string;
|