@interf/compiler 0.9.1 → 0.9.4
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 +9 -9
- package/agent-skills/interf-actions/SKILL.md +3 -0
- package/agent-skills/interf-actions/references/cli.md +13 -13
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
- package/dist/cli/commands/check-draft.d.ts +6 -6
- package/dist/cli/commands/check-draft.js +5 -5
- package/dist/cli/commands/compile-controller.d.ts +7 -7
- package/dist/cli/commands/compile-controller.js +35 -38
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +23 -21
- package/dist/cli/commands/compiled-flow.d.ts +11 -11
- package/dist/cli/commands/compiled-flow.js +33 -30
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +44 -45
- package/dist/cli/commands/default.js +1 -1
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +139 -118
- package/dist/cli/commands/list.js +11 -10
- package/dist/cli/commands/preparation-selection.d.ts +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +9 -9
- package/dist/cli/commands/source-config-wizard.js +43 -43
- package/dist/cli/commands/status.js +36 -9
- package/dist/cli/commands/test-flow.d.ts +15 -15
- package/dist/cli/commands/test-flow.js +29 -219
- package/dist/cli/commands/test.d.ts +2 -2
- package/dist/cli/commands/test.js +50 -51
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.js +41 -28
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js} +15 -21
- package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
- package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -3
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/executors.d.ts +13 -13
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/shells.d.ts +25 -24
- package/dist/packages/agents/lib/shells.js +161 -154
- package/dist/packages/agents/lib/types.d.ts +2 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -7
- package/dist/packages/compiler/compiled-paths.js +9 -15
- package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
- package/dist/packages/compiler/compiled-pipeline.js +22 -22
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +8 -8
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
- package/dist/packages/compiler/compiled-stage-runner.js +7 -7
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +62 -247
- package/dist/packages/compiler/lib/schema.js +56 -174
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +4 -4
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +9 -9
- package/dist/packages/compiler/runtime-types.d.ts +8 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -64
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/index.d.ts +2 -2
- package/dist/packages/execution/index.js +1 -1
- package/dist/packages/execution/lib/schema.d.ts +80 -83
- package/dist/packages/execution/lib/schema.js +25 -48
- package/dist/packages/local-service/action-values.d.ts +1 -1
- package/dist/packages/local-service/action-values.js +1 -1
- package/dist/packages/local-service/client.d.ts +4 -4
- package/dist/packages/local-service/client.js +4 -4
- package/dist/packages/local-service/index.d.ts +3 -3
- package/dist/packages/local-service/index.js +2 -2
- package/dist/packages/local-service/lib/schema.d.ts +540 -974
- package/dist/packages/local-service/lib/schema.js +44 -160
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +19 -23
- package/dist/packages/local-service/runtime.js +349 -913
- package/dist/packages/local-service/server.d.ts +1 -0
- package/dist/packages/local-service/server.js +25 -20
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +1 -4
- package/dist/packages/project-model/index.js +0 -3
- package/dist/packages/project-model/interf-detect.d.ts +1 -5
- package/dist/packages/project-model/interf-detect.js +7 -18
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +38 -39
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +2 -66
- package/dist/packages/project-model/lib/schema.js +5 -23
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +11 -18
- package/dist/packages/project-model/source-config.js +42 -60
- package/dist/packages/project-model/source-folders.d.ts +4 -4
- package/dist/packages/project-model/source-folders.js +10 -10
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +6 -6
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +16 -33
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +0 -3
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -457
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -211
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { buildTestSpecFromCompiledPreparationConfig, buildTestSpecFromSourceFolderConfig, fingerprintReadinessChecks, resolveSourcePreparationPath, } from "../project-model/source-config.js";
|
|
4
|
+
import { preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, portableContextPath, } from "../project-model/project-paths.js";
|
|
5
|
+
import { testRootForCompiled } from "../compiler/compiled-paths.js";
|
|
6
|
+
import { readJsonFileWithSchema } from "../shared/parse.js";
|
|
7
|
+
import { resolveMethodId } from "../methods/method-resolution.js";
|
|
8
|
+
import { createCompiledTestTarget, createRawTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
|
|
9
|
+
import { ReadinessCheckRunSchema, } from "./lib/schema.js";
|
|
10
|
+
export function readinessPassRate(outcome) {
|
|
11
|
+
return outcome.result.totalCases > 0
|
|
12
|
+
? Math.round((outcome.result.passedCases / outcome.result.totalCases) * 100)
|
|
13
|
+
: 0;
|
|
14
|
+
}
|
|
15
|
+
function visibleRunPath(outcome) {
|
|
16
|
+
return outcome.displayRunPath ?? outcome.runPath;
|
|
17
|
+
}
|
|
18
|
+
function summarizeSavedTestOutcome(label, outcome) {
|
|
19
|
+
return {
|
|
20
|
+
label,
|
|
21
|
+
run_path: visibleRunPath(outcome),
|
|
22
|
+
ok: outcome.result.ok,
|
|
23
|
+
passed_cases: outcome.result.passedCases,
|
|
24
|
+
total_cases: outcome.result.totalCases,
|
|
25
|
+
passed_checks: outcome.result.passedChecks,
|
|
26
|
+
total_checks: outcome.result.totalChecks,
|
|
27
|
+
target: outcome.target,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function writePreparationTargetRun(options) {
|
|
31
|
+
const dirPath = preparationTestRunsRoot(options.projectPath, options.preparationName, options.target);
|
|
32
|
+
mkdirSync(dirPath, { recursive: true });
|
|
33
|
+
const runPath = preparationTestRunPath(options.projectPath, options.preparationName, options.target, options.generatedAt, options.runId, options.runSuffix);
|
|
34
|
+
writeFileSync(runPath, `${JSON.stringify(options.payload, null, 2)}\n`);
|
|
35
|
+
return runPath;
|
|
36
|
+
}
|
|
37
|
+
function renderLatestSummaryMarkdown(payload) {
|
|
38
|
+
const lines = [
|
|
39
|
+
"# Latest Readiness Results",
|
|
40
|
+
"",
|
|
41
|
+
"| Target | Readiness checks |",
|
|
42
|
+
"| --- | --- |",
|
|
43
|
+
];
|
|
44
|
+
if (payload.raw) {
|
|
45
|
+
lines.push(`| Source files | \`${payload.raw.passed_cases}/${payload.raw.total_cases}\` |`);
|
|
46
|
+
}
|
|
47
|
+
if (payload.compiled) {
|
|
48
|
+
lines.push(`| Portable Context | \`${payload.compiled.passed_cases}/${payload.compiled.total_cases}\` |`);
|
|
49
|
+
}
|
|
50
|
+
lines.push("");
|
|
51
|
+
if (payload.summary.raw_pass_rate != null && payload.summary.compiled_pass_rate != null) {
|
|
52
|
+
const direction = (payload.summary.pass_rate_delta ?? 0) >= 0 ? "improved" : "decreased";
|
|
53
|
+
lines.push(`Readiness-check pass rate ${direction} from ${payload.summary.raw_pass_rate}% to ${payload.summary.compiled_pass_rate}%.`, "");
|
|
54
|
+
}
|
|
55
|
+
if (payload.raw) {
|
|
56
|
+
lines.push(`- Latest source-files run: ${payload.raw.run_path}`);
|
|
57
|
+
}
|
|
58
|
+
if (payload.compiled) {
|
|
59
|
+
lines.push(`- Latest portable-context run: ${payload.compiled.run_path}`);
|
|
60
|
+
}
|
|
61
|
+
return `${lines.join("\n")}\n`;
|
|
62
|
+
}
|
|
63
|
+
export function readSavedReadinessCheckRun(projectPath, preparationName) {
|
|
64
|
+
const latestPath = preparationLatestReadinessRunPath(projectPath, preparationName);
|
|
65
|
+
if (!existsSync(latestPath))
|
|
66
|
+
return null;
|
|
67
|
+
return readReadinessCheckRunAtPath(latestPath, "latest readiness-check run");
|
|
68
|
+
}
|
|
69
|
+
export function parseReadinessCheckRun(value) {
|
|
70
|
+
const parsed = ReadinessCheckRunSchema.safeParse(value);
|
|
71
|
+
return parsed.success ? parsed.data : null;
|
|
72
|
+
}
|
|
73
|
+
export function readReadinessCheckRunAtPath(filePath, label = "readiness-check run") {
|
|
74
|
+
return readJsonFileWithSchema(filePath, label, ReadinessCheckRunSchema);
|
|
75
|
+
}
|
|
76
|
+
export function readCurrentSavedReadinessCheckRun(options) {
|
|
77
|
+
const latestComparison = readSavedReadinessCheckRun(options.projectPath, options.preparationName);
|
|
78
|
+
if (!latestComparison) {
|
|
79
|
+
return { comparison: null, stale: false };
|
|
80
|
+
}
|
|
81
|
+
const currentFingerprint = fingerprintReadinessChecks(options.checks);
|
|
82
|
+
if (!latestComparison.checks_fingerprint || latestComparison.checks_fingerprint !== currentFingerprint) {
|
|
83
|
+
return { comparison: null, stale: true };
|
|
84
|
+
}
|
|
85
|
+
return { comparison: latestComparison, stale: false };
|
|
86
|
+
}
|
|
87
|
+
export function saveReadinessCheckRun(options) {
|
|
88
|
+
const generatedAt = new Date().toISOString();
|
|
89
|
+
const rawSummary = options.rawOutcome
|
|
90
|
+
? summarizeSavedTestOutcome("Source files", options.rawOutcome)
|
|
91
|
+
: null;
|
|
92
|
+
const compiledSummary = options.compiledOutcome
|
|
93
|
+
? summarizeSavedTestOutcome("Portable Context", options.compiledOutcome)
|
|
94
|
+
: null;
|
|
95
|
+
const effectiveMode = rawSummary && compiledSummary
|
|
96
|
+
? "both"
|
|
97
|
+
: rawSummary
|
|
98
|
+
? "raw"
|
|
99
|
+
: "compiled";
|
|
100
|
+
const rawPassRate = rawSummary
|
|
101
|
+
? Math.round((rawSummary.passed_cases / rawSummary.total_cases) * 100)
|
|
102
|
+
: null;
|
|
103
|
+
const compiledPassRate = compiledSummary
|
|
104
|
+
? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
|
|
105
|
+
: null;
|
|
106
|
+
const payload = {
|
|
107
|
+
kind: "interf-readiness-check-run",
|
|
108
|
+
version: 1,
|
|
109
|
+
generated_at: generatedAt,
|
|
110
|
+
mode: effectiveMode,
|
|
111
|
+
source_path: options.sourcePath,
|
|
112
|
+
checks_fingerprint: options.checksFingerprint,
|
|
113
|
+
preparation: {
|
|
114
|
+
name: options.preparationName,
|
|
115
|
+
portable_context_path: options.portableContextPath,
|
|
116
|
+
},
|
|
117
|
+
raw: rawSummary,
|
|
118
|
+
compiled: compiledSummary,
|
|
119
|
+
summary: {
|
|
120
|
+
raw_pass_rate: rawPassRate,
|
|
121
|
+
compiled_pass_rate: compiledPassRate,
|
|
122
|
+
pass_rate_delta: rawPassRate !== null && compiledPassRate !== null ? compiledPassRate - rawPassRate : null,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const latestStatePath = preparationLatestReadinessRunPath(options.sourcePath, options.preparationName);
|
|
126
|
+
mkdirSync(dirname(latestStatePath), { recursive: true });
|
|
127
|
+
writeFileSync(latestStatePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
128
|
+
writeFileSync(preparationLatestReadinessSummaryPath(options.sourcePath, options.preparationName), renderLatestSummaryMarkdown(payload));
|
|
129
|
+
if (options.portableContextPath) {
|
|
130
|
+
mkdirSync(testRootForCompiled(options.portableContextPath), { recursive: true });
|
|
131
|
+
writeFileSync(join(testRootForCompiled(options.portableContextPath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
132
|
+
}
|
|
133
|
+
return latestStatePath;
|
|
134
|
+
}
|
|
135
|
+
export async function runSavedSourceFilesCheck(options) {
|
|
136
|
+
const spec = buildTestSpecFromSourceFolderConfig({
|
|
137
|
+
sourcePath: options.sourcePath,
|
|
138
|
+
targetName: options.preparationConfig.name,
|
|
139
|
+
targetType: "raw",
|
|
140
|
+
});
|
|
141
|
+
if (!spec)
|
|
142
|
+
return null;
|
|
143
|
+
const sourceFolderPath = resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
|
|
144
|
+
const target = createRawTestTarget(sourceFolderPath);
|
|
145
|
+
const artifactRoot = preparationLatestReadinessRunPath(options.sourcePath, options.preparationConfig.name);
|
|
146
|
+
const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
|
|
147
|
+
executor: options.executor,
|
|
148
|
+
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
149
|
+
artifactRootPath: dirname(artifactRoot),
|
|
150
|
+
});
|
|
151
|
+
const result = run.results[0];
|
|
152
|
+
if (!result)
|
|
153
|
+
return null;
|
|
154
|
+
const preparationRunPath = writePreparationTargetRun({
|
|
155
|
+
projectPath: options.sourcePath,
|
|
156
|
+
preparationName: options.preparationConfig.name,
|
|
157
|
+
target: "file-as-is",
|
|
158
|
+
generatedAt: run.generated_at,
|
|
159
|
+
runId: normalizePreparationTestRunId(spec.id),
|
|
160
|
+
runSuffix: options.runSuffix,
|
|
161
|
+
payload: run,
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
runPath: preparationRunPath,
|
|
165
|
+
target,
|
|
166
|
+
result,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
export async function runSavedPortableContextCheck(options) {
|
|
170
|
+
const portableContextPath = options.portableContextPath
|
|
171
|
+
?? portableContextPathForPreparation(options.sourcePath, options.preparationConfig.name);
|
|
172
|
+
const spec = buildTestSpecFromCompiledPreparationConfig({
|
|
173
|
+
compiledPath: portableContextPath,
|
|
174
|
+
targetType: "compiled",
|
|
175
|
+
});
|
|
176
|
+
if (!spec)
|
|
177
|
+
return null;
|
|
178
|
+
const target = createCompiledTestTarget(portableContextPath, options.preparationConfig.name, resolveMethodId(options.preparationConfig));
|
|
179
|
+
if (!target.eligible)
|
|
180
|
+
return null;
|
|
181
|
+
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
182
|
+
executor: options.executor,
|
|
183
|
+
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
184
|
+
artifactRootPath: portableContextPath,
|
|
185
|
+
});
|
|
186
|
+
const result = run.results[0];
|
|
187
|
+
if (!result)
|
|
188
|
+
return null;
|
|
189
|
+
const compiledRunPath = saveTargetTestRun(portableContextPath, run);
|
|
190
|
+
const preparationRunPath = writePreparationTargetRun({
|
|
191
|
+
projectPath: options.sourcePath,
|
|
192
|
+
preparationName: options.preparationConfig.name,
|
|
193
|
+
target: "compiled",
|
|
194
|
+
generatedAt: run.generated_at,
|
|
195
|
+
runId: normalizePreparationTestRunId(spec.id),
|
|
196
|
+
runSuffix: options.runSuffix,
|
|
197
|
+
payload: run,
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
runPath: compiledRunPath,
|
|
201
|
+
displayRunPath: preparationRunPath,
|
|
202
|
+
target,
|
|
203
|
+
result,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export async function runReadinessChecksForExecutor(options) {
|
|
207
|
+
const rawPromise = options.mode === "raw" || options.mode === "both"
|
|
208
|
+
? runSavedSourceFilesCheck({
|
|
209
|
+
sourcePath: options.sourcePath,
|
|
210
|
+
preparationConfig: options.preparationConfig,
|
|
211
|
+
executor: options.executor,
|
|
212
|
+
preserveSandboxes: options.preserveSandboxes,
|
|
213
|
+
runSuffix: options.runSuffix,
|
|
214
|
+
})
|
|
215
|
+
: Promise.resolve(null);
|
|
216
|
+
const compiledPromise = options.mode === "compiled" || options.mode === "both"
|
|
217
|
+
? runSavedPortableContextCheck({
|
|
218
|
+
sourcePath: options.sourcePath,
|
|
219
|
+
preparationConfig: options.preparationConfig,
|
|
220
|
+
executor: options.executor,
|
|
221
|
+
portableContextPath: options.portableContextPath,
|
|
222
|
+
preserveSandboxes: options.preserveSandboxes,
|
|
223
|
+
runSuffix: options.runSuffix,
|
|
224
|
+
})
|
|
225
|
+
: Promise.resolve(null);
|
|
226
|
+
const [rawOutcome, compiledOutcome] = await Promise.all([rawPromise, compiledPromise]);
|
|
227
|
+
const modeSatisfied = (options.mode !== "raw" || Boolean(rawOutcome)) &&
|
|
228
|
+
(options.mode !== "compiled" || Boolean(compiledOutcome)) &&
|
|
229
|
+
(options.mode !== "both" || (Boolean(rawOutcome) && Boolean(compiledOutcome)));
|
|
230
|
+
const shouldSave = options.saveLatest !== false;
|
|
231
|
+
const comparisonRunPath = shouldSave && modeSatisfied
|
|
232
|
+
? saveReadinessCheckRun({
|
|
233
|
+
sourcePath: options.sourcePath,
|
|
234
|
+
portableContextPath: options.portableContextPath,
|
|
235
|
+
preparationName: options.preparationConfig.name,
|
|
236
|
+
checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
|
|
237
|
+
mode: options.mode,
|
|
238
|
+
rawOutcome,
|
|
239
|
+
compiledOutcome,
|
|
240
|
+
})
|
|
241
|
+
: null;
|
|
242
|
+
const comparison = shouldSave && modeSatisfied
|
|
243
|
+
? readSavedReadinessCheckRun(options.sourcePath, options.preparationConfig.name)
|
|
244
|
+
: null;
|
|
245
|
+
return {
|
|
246
|
+
sourcePath: options.sourcePath,
|
|
247
|
+
preparationConfig: options.preparationConfig,
|
|
248
|
+
portableContextPath: options.portableContextPath,
|
|
249
|
+
mode: options.mode,
|
|
250
|
+
rawOutcome,
|
|
251
|
+
compiledOutcome,
|
|
252
|
+
comparisonRunPath,
|
|
253
|
+
comparison,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function portableContextPathForPreparation(sourcePath, preparationName) {
|
|
257
|
+
return portableContextPath(sourcePath, preparationName);
|
|
258
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MethodExecutor } from "../agents/lib/executors.js";
|
|
2
2
|
import type { TestTargetRun, TestTargetCandidate, LoadedTestSpec } from "./test-types.js";
|
|
3
3
|
import { type TestSandboxRetentionMode } from "./test-sandbox.js";
|
|
4
4
|
export declare function runTargetTests(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[]): TestTargetRun;
|
|
5
|
-
export declare function runTargetTestsWithJudge(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], executor:
|
|
5
|
+
export declare function runTargetTestsWithJudge(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], executor: MethodExecutor, options?: {
|
|
6
6
|
preserveSandboxes?: TestSandboxRetentionMode;
|
|
7
7
|
artifactRootPath?: string;
|
|
8
8
|
}): Promise<TestTargetRun>;
|
|
9
9
|
export declare function runTargetTestsAuto(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], options?: {
|
|
10
|
-
executor?:
|
|
10
|
+
executor?: MethodExecutor | null;
|
|
11
11
|
preserveSandboxes?: TestSandboxRetentionMode;
|
|
12
12
|
artifactRootPath?: string;
|
|
13
13
|
}): Promise<TestTargetRun>;
|
|
@@ -197,19 +197,19 @@ async function runTargetTestsJudge(testCase, executor, candidateLabel, candidate
|
|
|
197
197
|
function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
|
|
198
198
|
const header = target.type === "compiled"
|
|
199
199
|
? [
|
|
200
|
-
"You are running an Interf test inside an isolated sandboxed
|
|
200
|
+
"You are running an Interf test inside an isolated sandboxed portable context.",
|
|
201
201
|
"Read `AGENTS.md` first.",
|
|
202
202
|
"Use the local native `interf-query` skill available in this portable context.",
|
|
203
203
|
"Answer the check question the same way you would answer a real user inside this portable context.",
|
|
204
|
-
"Prefer the
|
|
204
|
+
"Prefer the Method-declared portable-context outputs before consulting `raw/`.",
|
|
205
205
|
"This sandbox is self-contained: the copied portable context has sanitized source files under `raw/` via `.interf/interf.json` `source.path`.",
|
|
206
|
-
"The original
|
|
206
|
+
"The original Interf Workspace is intentionally absent from this sandbox. Work only from this sandboxed portable context and its embedded raw files.",
|
|
207
207
|
]
|
|
208
208
|
: [
|
|
209
209
|
"You are running an Interf baseline test inside an isolated raw test shell.",
|
|
210
210
|
"Read `AGENTS.md` first.",
|
|
211
211
|
"Use the local native `interf-query` skill available in this shell.",
|
|
212
|
-
"There is no
|
|
212
|
+
"There is no portable context in this sandbox.",
|
|
213
213
|
"Answer only from `raw/` inside this shell.",
|
|
214
214
|
"The original control plane folder is intentionally absent from this sandbox.",
|
|
215
215
|
];
|
|
@@ -383,7 +383,7 @@ function buildTestTargetResult(target, caseResults, options = {}) {
|
|
|
383
383
|
type: target.type,
|
|
384
384
|
name: target.name,
|
|
385
385
|
path: target.path,
|
|
386
|
-
|
|
386
|
+
method: target.method,
|
|
387
387
|
},
|
|
388
388
|
...(options.sandboxPath ? { sandbox_path: options.sandboxPath } : {}),
|
|
389
389
|
ok: passedCases === caseResults.length,
|
|
@@ -4,12 +4,12 @@ import { targetTestRunsRootForCompiled, targetTestSandboxesRootForCompiled, comp
|
|
|
4
4
|
const TEST_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,79}$/;
|
|
5
5
|
export const TEST_SPEC_EXTENSIONS = new Set([".json"]);
|
|
6
6
|
export function testSpecRootPath(sourcePath) {
|
|
7
|
-
return join(sourcePath, "interf", "tests", "
|
|
7
|
+
return join(sourcePath, "interf", "tests", "specs");
|
|
8
8
|
}
|
|
9
9
|
export function testSpecTypePath(sourcePath, type) {
|
|
10
10
|
return join(testSpecRootPath(sourcePath), type);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function isPreparationTestsRootPath(artifactRootPath) {
|
|
13
13
|
return basename(artifactRootPath) === "tests" &&
|
|
14
14
|
basename(dirname(artifactRootPath)) === ".interf";
|
|
15
15
|
}
|
|
@@ -17,10 +17,10 @@ export function targetTestRunsPath(compiledPath, type) {
|
|
|
17
17
|
if (existsSync(compiledInterfConfigPath(compiledPath))) {
|
|
18
18
|
return join(targetTestRunsRootForCompiled(compiledPath), type);
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
20
|
+
if (isPreparationTestsRootPath(compiledPath)) {
|
|
21
21
|
return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "runs");
|
|
22
22
|
}
|
|
23
|
-
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected
|
|
23
|
+
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
|
|
24
24
|
}
|
|
25
25
|
export function targetTestRunGitignorePath(compiledPath, type) {
|
|
26
26
|
return join(targetTestRunsPath(compiledPath, type), ".gitignore");
|
|
@@ -29,10 +29,10 @@ export function targetTestSandboxesPath(compiledPath, type) {
|
|
|
29
29
|
if (existsSync(compiledInterfConfigPath(compiledPath))) {
|
|
30
30
|
return join(targetTestSandboxesRootForCompiled(compiledPath), type);
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
32
|
+
if (isPreparationTestsRootPath(compiledPath)) {
|
|
33
33
|
return join(compiledPath, type === "raw" ? "file-as-is" : "compiled", "sandboxes");
|
|
34
34
|
}
|
|
35
|
-
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected
|
|
35
|
+
throw new Error(`Unsupported test artifact root: ${compiledPath}. Expected portable context or interf/<preparation>/.interf/tests root.`);
|
|
36
36
|
}
|
|
37
37
|
export function targetTestSandboxGitignorePath(compiledPath, type) {
|
|
38
38
|
return join(targetTestSandboxesPath(compiledPath, type), ".gitignore");
|
|
@@ -25,10 +25,10 @@ export const TestProfilePresets = {
|
|
|
25
25
|
}),
|
|
26
26
|
"release-codex-high": TestProfilePresetValueSchema.parse({
|
|
27
27
|
agent: "codex",
|
|
28
|
-
model: "gpt-5.
|
|
28
|
+
model: "gpt-5.3-codex",
|
|
29
29
|
effort: "high",
|
|
30
30
|
timeout_ms: 480000,
|
|
31
|
-
label: "Codex (GPT-5.
|
|
31
|
+
label: "Codex (GPT-5.3 Codex, high)",
|
|
32
32
|
}),
|
|
33
33
|
"tier1-max-claude": TestProfilePresetValueSchema.parse({
|
|
34
34
|
agent: "claude-code",
|
|
@@ -2,13 +2,13 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, renameSync, rmSync, } from
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join, relative, sep } from "node:path";
|
|
4
4
|
import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
|
|
5
|
-
import { readInterfConfig
|
|
5
|
+
import { readInterfConfig } from "../project-model/interf.js";
|
|
6
6
|
import { projectRawTestQueryShell } from "../agents/lib/shells.js";
|
|
7
|
-
import {
|
|
7
|
+
import { portableContextPath } from "../project-model/project-paths.js";
|
|
8
8
|
import { saveCompiledInterfConfig } from "../project-model/source-config.js";
|
|
9
|
-
import { projectRawSnapshot } from "../compiler/raw-snapshot.js";
|
|
9
|
+
import { projectRawSnapshot, resolveCompiledRawPath } from "../compiler/raw-snapshot.js";
|
|
10
10
|
import { refreshCompiledArtifacts } from "../compiler/state.js";
|
|
11
|
-
import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled,
|
|
11
|
+
import { testRootForCompiled, stageExecutionShellsRoot, targetTestSandboxesRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeLogsRoot, } from "../compiler/compiled-paths.js";
|
|
12
12
|
function toPortableRelativePath(fromPath, toPath) {
|
|
13
13
|
return relative(fromPath, toPath).split(sep).join("/");
|
|
14
14
|
}
|
|
@@ -17,7 +17,7 @@ function sanitizeCompiledArtifacts(compiledPath) {
|
|
|
17
17
|
testRootForCompiled(compiledPath),
|
|
18
18
|
targetTestSandboxesRootForCompiled(compiledPath),
|
|
19
19
|
stageExecutionShellsRoot(compiledPath),
|
|
20
|
-
|
|
20
|
+
methodImprovementLoopsRoot(compiledPath),
|
|
21
21
|
compiledRuntimeLogsRoot(compiledPath),
|
|
22
22
|
compiledQueryAcceptanceRoot(compiledPath),
|
|
23
23
|
]) {
|
|
@@ -28,13 +28,13 @@ export function createTestSandbox(target) {
|
|
|
28
28
|
let sandboxRoot = mkdtempSync(join(tmpdir(), "interf-test-sandbox-"));
|
|
29
29
|
let preserved = false;
|
|
30
30
|
const sandboxCompiledPath = () => (target.type === "compiled"
|
|
31
|
-
?
|
|
31
|
+
? portableContextPath(sandboxRoot, target.name)
|
|
32
32
|
: null);
|
|
33
33
|
const sandboxRawPath = () => (target.type === "compiled"
|
|
34
|
-
? join(
|
|
34
|
+
? join(portableContextPath(sandboxRoot, target.name), "raw")
|
|
35
35
|
: join(sandboxRoot, "raw"));
|
|
36
36
|
const sandboxTargetPath = () => (target.type === "compiled"
|
|
37
|
-
?
|
|
37
|
+
? portableContextPath(sandboxRoot, target.name)
|
|
38
38
|
: sandboxRoot);
|
|
39
39
|
try {
|
|
40
40
|
if (target.type === "compiled") {
|
|
@@ -43,17 +43,16 @@ export function createTestSandbox(target) {
|
|
|
43
43
|
sanitizeCompiledArtifacts(sandboxTargetPath());
|
|
44
44
|
const sandboxConfig = readInterfConfig(sandboxTargetPath());
|
|
45
45
|
if (!sandboxConfig) {
|
|
46
|
-
throw new Error(`Sandbox
|
|
46
|
+
throw new Error(`Sandbox portable context is missing interf.json: ${sandboxTargetPath()}`);
|
|
47
47
|
}
|
|
48
48
|
if (!existsSync(resolveCompiledRawPath(sandboxTargetPath(), sandboxConfig))) {
|
|
49
|
-
throw new Error(`Sandbox
|
|
49
|
+
throw new Error(`Sandbox portable context is missing its local raw snapshot: ${sandboxTargetPath()}. Rebuild the portable context before testing it.`);
|
|
50
50
|
}
|
|
51
51
|
saveCompiledInterfConfig(sandboxTargetPath(), {
|
|
52
52
|
...sandboxConfig,
|
|
53
53
|
checks: [],
|
|
54
54
|
source: {
|
|
55
55
|
path: toPortableRelativePath(sandboxTargetPath(), sandboxRawPath()),
|
|
56
|
-
dataset_path: toPortableRelativePath(sandboxTargetPath(), sandboxRawPath()),
|
|
57
56
|
},
|
|
58
57
|
});
|
|
59
58
|
refreshCompiledBootstrapGuidance(sandboxTargetPath());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TestTargetCandidate } from "./test-types.js";
|
|
2
2
|
export declare function listCompiledTestTargets(sourcePath: string): TestTargetCandidate[];
|
|
3
|
-
export declare function createCompiledTestTarget(compiledPath: string, compiledName: string,
|
|
3
|
+
export declare function createCompiledTestTarget(compiledPath: string, compiledName: string, methodId?: string): TestTargetCandidate;
|
|
4
4
|
export declare function createRawTestTarget(sourcePath: string): TestTargetCandidate;
|
|
5
5
|
export declare function listTestTargets(sourcePath: string): TestTargetCandidate[];
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listPortableContextsForSourceFolder } from "../project-model/interf-detect.js";
|
|
2
2
|
import { computeCompiledHealth } from "../compiler/state.js";
|
|
3
|
+
import { DEFAULT_METHOD_ID, resolveMethodId } from "../methods/method-resolution.js";
|
|
3
4
|
function summarizeTargetSortKey(target) {
|
|
4
|
-
return `${target.name}\u0000${target.
|
|
5
|
+
return `${target.name}\u0000${target.method}`;
|
|
5
6
|
}
|
|
6
7
|
export function listCompiledTestTargets(sourcePath) {
|
|
7
|
-
return
|
|
8
|
-
.map(({ path, config }) => createCompiledTestTarget(path, config.name, config
|
|
8
|
+
return listPortableContextsForSourceFolder(sourcePath)
|
|
9
|
+
.map(({ path, config }) => createCompiledTestTarget(path, config.name, resolveMethodId(config)))
|
|
9
10
|
.sort((left, right) => summarizeTargetSortKey(left).localeCompare(summarizeTargetSortKey(right)));
|
|
10
11
|
}
|
|
11
|
-
export function createCompiledTestTarget(compiledPath, compiledName,
|
|
12
|
+
export function createCompiledTestTarget(compiledPath, compiledName, methodId = DEFAULT_METHOD_ID) {
|
|
12
13
|
const health = computeCompiledHealth(compiledPath);
|
|
13
14
|
return {
|
|
14
15
|
type: "compiled",
|
|
15
16
|
name: compiledName,
|
|
16
17
|
path: compiledPath,
|
|
17
|
-
|
|
18
|
+
method: methodId,
|
|
18
19
|
status: health.status,
|
|
19
20
|
stage: health.stage,
|
|
20
21
|
summary: health.summary,
|
|
@@ -26,7 +27,7 @@ export function createRawTestTarget(sourcePath) {
|
|
|
26
27
|
type: "raw",
|
|
27
28
|
name: "raw",
|
|
28
29
|
path: sourcePath,
|
|
29
|
-
|
|
30
|
+
method: "raw",
|
|
30
31
|
status: "compiled",
|
|
31
32
|
stage: "raw",
|
|
32
33
|
summary: "Run the checks against an isolated sandbox of the raw files.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interf/compiler",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Interf prepares data for agent work. It runs locally, processes your files, shows evidence that your data is ready, and writes portable context: a local folder with verifiable outputs agents can use.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"types": "./dist/packages/compiler/index.d.ts",
|
|
19
19
|
"import": "./dist/packages/compiler/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./
|
|
22
|
-
"types": "./dist/packages/
|
|
23
|
-
"import": "./dist/packages/
|
|
21
|
+
"./method-package": {
|
|
22
|
+
"types": "./dist/packages/method-package/index.d.ts",
|
|
23
|
+
"import": "./dist/packages/method-package/index.js"
|
|
24
24
|
},
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/packages/
|
|
27
|
-
"import": "./dist/packages/
|
|
25
|
+
"./method-authoring": {
|
|
26
|
+
"types": "./dist/packages/method-authoring/index.d.ts",
|
|
27
|
+
"import": "./dist/packages/method-authoring/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./execution": {
|
|
30
30
|
"types": "./dist/packages/execution/index.d.ts",
|
|
@@ -53,43 +53,26 @@
|
|
|
53
53
|
"dev": "tsc --watch",
|
|
54
54
|
"web:dev": "npm --prefix apps/compiler-ui run dev",
|
|
55
55
|
"web:typecheck": "npm --prefix apps/compiler-ui run typecheck",
|
|
56
|
-
"web:build": "node
|
|
57
|
-
"docs:sync-public-test-example": "npm run build && node scripts/docs/sync-public-test-example.mjs",
|
|
56
|
+
"web:build": "node scripts/web/build-compiler-ui.mjs",
|
|
58
57
|
"docs:sync-agent-skill-cli-reference": "npm run build && node scripts/docs/sync-agent-skill-cli-reference.mjs",
|
|
59
58
|
"docs:check-agent-skill-cli-reference": "npm run build && node scripts/docs/sync-agent-skill-cli-reference.mjs --check",
|
|
60
|
-
"test:matrix": "npm run build && node scripts/matrix/run.mjs",
|
|
61
59
|
"test:smoke": "npm run build && node --test test/**/*.test.mjs",
|
|
62
60
|
"test": "npm run test:smoke",
|
|
63
|
-
"test:
|
|
64
|
-
"test:e2e
|
|
65
|
-
"test:e2e:
|
|
66
|
-
"test:e2e:
|
|
67
|
-
"test:
|
|
68
|
-
"test:
|
|
69
|
-
"test:e2e:quick:codex": "npm run test:e2e:quick:agent -- --agent codex",
|
|
70
|
-
"test:e2e:quick:matrix": "npm run test:e2e:quick:claude && npm run test:e2e:quick:codex",
|
|
71
|
-
"test:matrix:cbre:fast": "npm run test:matrix -- --matrix test/matrices/cbre-chart-sanity.json",
|
|
72
|
-
"test:matrix:cbre:fast:keep": "npm run test:matrix -- --matrix test/matrices/cbre-chart-sanity.json --keep-project-clones",
|
|
73
|
-
"test:matrix:cbre:max": "npm run test:matrix -- --matrix test/matrices/cbre-chart-tier1-max.json",
|
|
74
|
-
"test:matrix:cbre:max:keep": "npm run test:matrix -- --matrix test/matrices/cbre-chart-tier1-max.json --keep-project-clones",
|
|
75
|
-
"test:full": "npm test && npm run test:e2e:quick:matrix",
|
|
76
|
-
"test:release:matrix": "npm run test:matrix:cbre:max",
|
|
77
|
-
"test:release": "npm test && npm run test:acceptance-quick:workflow-authoring -- --agent claude-code && npm run test:acceptance-live -- --agent claude-code --with-test && npm run test:acceptance-quick:workflow-authoring -- --agent codex && npm run test:acceptance-live -- --agent codex --with-test",
|
|
61
|
+
"test:full": "npm test && npm run web:build",
|
|
62
|
+
"test:e2e": "npm run test:acceptance",
|
|
63
|
+
"test:e2e:claude": "npm run test:acceptance-live -- --agent claude-code --with-test",
|
|
64
|
+
"test:e2e:codex": "npm run test:acceptance-live -- --agent codex --with-test",
|
|
65
|
+
"test:acceptance": "npm run build && node scripts/acceptance/release.mjs",
|
|
66
|
+
"test:release": "npm run web:typecheck && npm test && node scripts/acceptance/release.mjs && npm run web:build",
|
|
78
67
|
"test:acceptance-live": "npm run build && node scripts/acceptance/live.mjs",
|
|
79
|
-
"test:e2e:quick:refresh-cache": "npm run test:e2e:quick:refresh-cache:claude && npm run test:e2e:quick:refresh-cache:codex",
|
|
80
|
-
"test:e2e:quick:refresh-cache:claude": "node scripts/acceptance/refresh-quick-cache.mjs --agent claude-code",
|
|
81
|
-
"test:e2e:quick:refresh-cache:codex": "node scripts/acceptance/refresh-quick-cache.mjs --agent codex",
|
|
82
68
|
"test:acceptance-quick:create-compiled": "npm run build && node scripts/acceptance/targeted.mjs create-compiled",
|
|
83
69
|
"test:acceptance-quick:compiled-query": "npm run build && node scripts/acceptance/targeted.mjs compiled-query",
|
|
84
|
-
"test:acceptance-quick:workflow-authoring": "npm run build && node scripts/acceptance/targeted.mjs workflow-authoring",
|
|
85
70
|
"test:acceptance-quick:self-improving": "npm run build && node scripts/acceptance/targeted.mjs self-improving-compile",
|
|
86
71
|
"prepublishOnly": "node scripts/release/prepublish-gate.mjs"
|
|
87
72
|
},
|
|
88
73
|
"files": [
|
|
89
74
|
"dist",
|
|
90
|
-
"
|
|
91
|
-
"apps/compiler-ui/.next/static",
|
|
92
|
-
"builtin-workflows",
|
|
75
|
+
"builtin-methods",
|
|
93
76
|
"agent-skills",
|
|
94
77
|
"TRADEMARKS.md"
|
|
95
78
|
],
|
|
@@ -107,7 +90,7 @@
|
|
|
107
90
|
"license": "Apache-2.0",
|
|
108
91
|
"repository": {
|
|
109
92
|
"type": "git",
|
|
110
|
-
"url": "https://github.com/interf-labs/interf"
|
|
93
|
+
"url": "git+https://github.com/interf-labs/interf.git"
|
|
111
94
|
},
|
|
112
95
|
"bugs": {
|
|
113
96
|
"url": "https://github.com/interf-labs/interf/issues"
|