@interf/compiler 0.9.1 → 0.9.3
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/13g~4mamjft.c.css → dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css} +1 -1
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js} +15 -21
- 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 +0 -1
- package/dist/packages/local-service/action-values.js +0 -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 +536 -974
- package/dist/packages/local-service/lib/schema.js +43 -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 +302 -880
- 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/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 → 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/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_ssgManifest.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
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { mkdirSync, existsSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { basename, join, relative, sep } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getCompiledMethod } from "../method-package/method-definitions.js";
|
|
4
|
+
import { loadMethodDefinitionFromDir, seedLocalDefaultMethod } from "../method-package/local-methods.js";
|
|
5
5
|
import { initializeCompiledRuntimeState, } from "../compiler/state.js";
|
|
6
6
|
import { refreshCompiledBootstrapGuidance } from "../agents/lib/compiled-bootstrap.js";
|
|
7
7
|
import { syncCompiledRawSnapshot } from "../compiler/raw-snapshot.js";
|
|
8
8
|
import { assertCompiledContainer, assertCompiledName, } from "./interf-detect.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { seedCompiledMethodPackage } from "../method-package/interf-method-package.js";
|
|
10
|
+
import { portableContextPath } from "./project-paths.js";
|
|
11
11
|
import { ensureCompiledZoneTargets, readCompiledSchemaFile } from "../compiler/compiled-schema.js";
|
|
12
|
-
import {
|
|
13
|
-
import { defaultControlPathForCompiled, testRootForCompiled,
|
|
12
|
+
import { findSourcePreparationConfig, listSourcePreparationConfigs, loadSourceFolderConfig, methodIdForSourcePreparationConfig, resolveSourcePreparationPath, saveCompiledInterfConfig, } from "./source-config.js";
|
|
13
|
+
import { defaultControlPathForCompiled, testRootForCompiled, methodPackagePathForCompiled } from "../compiler/compiled-paths.js";
|
|
14
|
+
import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
|
|
14
15
|
const DEFAULT_INTERFIGNORE = [
|
|
15
16
|
".claude/",
|
|
16
17
|
".codex/",
|
|
@@ -32,7 +33,7 @@ function renderUncompiledCompiledFile(compiledName, relativePath, about) {
|
|
|
32
33
|
].join("\n");
|
|
33
34
|
}
|
|
34
35
|
function compiledGitignoreEntries(compiledPath) {
|
|
35
|
-
const schema = readCompiledSchemaFile(
|
|
36
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
36
37
|
const zoneEntries = (schema?.zones ?? [])
|
|
37
38
|
.filter((zone) => zone.kind !== "runtime")
|
|
38
39
|
.map((zone) => zone.kind === "file" ? zone.path : `${zone.path}/`);
|
|
@@ -48,9 +49,9 @@ function compiledGitignoreEntries(compiledPath) {
|
|
|
48
49
|
];
|
|
49
50
|
}
|
|
50
51
|
function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
|
|
51
|
-
const schema = readCompiledSchemaFile(
|
|
52
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
52
53
|
if (!schema) {
|
|
53
|
-
throw new Error(`Missing
|
|
54
|
+
throw new Error(`Missing Method schema at ${methodPackagePathForCompiled(compiledPath)}.`);
|
|
54
55
|
}
|
|
55
56
|
ensureCompiledZoneTargets(compiledPath, schema);
|
|
56
57
|
for (const zone of schema.zones) {
|
|
@@ -62,25 +63,25 @@ function scaffoldCompiledOutputs(compiledPath, compiledName, about) {
|
|
|
62
63
|
writeFileSync(targetPath, renderUncompiledCompiledFile(compiledName, zone.path, about));
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return
|
|
66
|
+
function localMethodMatches(compiledPath, methodId) {
|
|
67
|
+
const localMethod = loadMethodDefinitionFromDir(methodPackagePathForCompiled(compiledPath));
|
|
68
|
+
return localMethod?.id === methodId;
|
|
68
69
|
}
|
|
69
|
-
export function ensurePortableContextScaffold(sourcePath,
|
|
70
|
-
assertCompiledName(
|
|
70
|
+
export function ensurePortableContextScaffold(sourcePath, preparationName, methodId = DEFAULT_METHOD_ID) {
|
|
71
|
+
assertCompiledName(preparationName, "Portable context");
|
|
71
72
|
assertCompiledContainer(sourcePath);
|
|
72
|
-
const compiledPath =
|
|
73
|
+
const compiledPath = portableContextPath(sourcePath, preparationName);
|
|
73
74
|
mkdirSync(compiledPath, { recursive: true });
|
|
74
75
|
mkdirSync(testRootForCompiled(compiledPath), { recursive: true });
|
|
75
|
-
if (
|
|
76
|
-
|
|
76
|
+
if (methodId === "interf-default") {
|
|
77
|
+
seedLocalDefaultMethod({ sourcePath });
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
|
|
79
|
+
const selectedMethod = getCompiledMethod(methodId, { sourcePath });
|
|
80
|
+
if (!localMethodMatches(compiledPath, selectedMethod.id)) {
|
|
81
|
+
seedCompiledMethodPackage({
|
|
81
82
|
compiledPath,
|
|
82
83
|
sourcePath,
|
|
83
|
-
|
|
84
|
+
methodId: selectedMethod.id,
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
if (!existsSync(join(compiledPath, ".gitignore"))) {
|
|
@@ -88,25 +89,23 @@ export function ensurePortableContextScaffold(sourcePath, datasetName, workflowI
|
|
|
88
89
|
}
|
|
89
90
|
return compiledPath;
|
|
90
91
|
}
|
|
91
|
-
export function createCompiled(name, sourcePath,
|
|
92
|
+
export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath) {
|
|
92
93
|
assertCompiledName(name, "Portable context");
|
|
93
|
-
const savedCompiled =
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const selectedWorkflow = getCompiledWorkflow(effectiveWorkflowId, { sourcePath });
|
|
98
|
-
const compiledPath = ensurePortableContextScaffold(sourcePath, name, selectedWorkflow.id);
|
|
94
|
+
const savedCompiled = findSourcePreparationConfig(loadSourceFolderConfig(sourcePath), name);
|
|
95
|
+
const effectiveMethodId = methodIdForSourcePreparationConfig(savedCompiled) ?? methodId;
|
|
96
|
+
const selectedMethod = getCompiledMethod(effectiveMethodId, { sourcePath });
|
|
97
|
+
const compiledPath = ensurePortableContextScaffold(sourcePath, name, selectedMethod.id);
|
|
99
98
|
const resolvedAbout = about ?? savedCompiled?.about;
|
|
100
|
-
const
|
|
99
|
+
const resolvedSourceFolderPath = (() => {
|
|
101
100
|
if (savedCompiled) {
|
|
102
|
-
return
|
|
101
|
+
return resolveSourcePreparationPath(sourcePath, savedCompiled);
|
|
103
102
|
}
|
|
104
|
-
if (
|
|
105
|
-
return
|
|
103
|
+
if (sourceFolderPath) {
|
|
104
|
+
return sourceFolderPath;
|
|
106
105
|
}
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
106
|
+
const configuredPreparations = listSourcePreparationConfigs(loadSourceFolderConfig(sourcePath));
|
|
107
|
+
if (configuredPreparations.length === 1) {
|
|
108
|
+
return resolveSourcePreparationPath(sourcePath, configuredPreparations[0]);
|
|
110
109
|
}
|
|
111
110
|
throw new Error("Cannot infer the source folder for this portable context. Select a source folder first or pass an explicit source folder path.");
|
|
112
111
|
})();
|
|
@@ -114,7 +113,7 @@ export function createCompiled(name, sourcePath, workflowId = "interf", about, d
|
|
|
114
113
|
type: "compiled",
|
|
115
114
|
name,
|
|
116
115
|
...(resolvedAbout ? { about: resolvedAbout } : {}),
|
|
117
|
-
method:
|
|
116
|
+
method: selectedMethod.id,
|
|
118
117
|
...(typeof savedCompiled?.max_attempts === "number"
|
|
119
118
|
? { max_attempts: savedCompiled.max_attempts }
|
|
120
119
|
: {}),
|
|
@@ -123,17 +122,17 @@ export function createCompiled(name, sourcePath, workflowId = "interf", about, d
|
|
|
123
122
|
: {}),
|
|
124
123
|
checks: savedCompiled?.checks ?? [],
|
|
125
124
|
method_origin: {
|
|
126
|
-
selected:
|
|
125
|
+
selected: selectedMethod.id,
|
|
127
126
|
local_draft: false,
|
|
128
127
|
},
|
|
129
128
|
source: {
|
|
130
129
|
path: "./raw",
|
|
131
130
|
control_path: defaultControlPathForCompiled(compiledPath),
|
|
132
|
-
preparation_path: relative(compiledPath,
|
|
131
|
+
preparation_path: relative(compiledPath, resolvedSourceFolderPath).split(sep).join("/") || ".",
|
|
133
132
|
},
|
|
134
133
|
});
|
|
135
134
|
mkdirSync(join(compiledPath, "raw"), { recursive: true });
|
|
136
|
-
syncCompiledRawSnapshot(compiledPath,
|
|
135
|
+
syncCompiledRawSnapshot(compiledPath, resolvedSourceFolderPath);
|
|
137
136
|
writeFileSync(join(compiledPath, ".interfignore"), DEFAULT_INTERFIGNORE);
|
|
138
137
|
scaffoldCompiledOutputs(compiledPath, name, about);
|
|
139
138
|
refreshCompiledBootstrapGuidance(compiledPath);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME,
|
|
1
|
+
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
2
2
|
export type { InterfConfig, ResolvedCompiled } from "./interf-detect.js";
|
|
3
|
-
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
4
3
|
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
5
4
|
export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME,
|
|
2
|
-
export { ensureCompiledRawBinding, resolveCompiledRawPath, syncCompiledRawSnapshot, } from "./compiled-raw.js";
|
|
1
|
+
export { INTERF_CONTAINER_NAME, METHOD_CONTAINER_NAME, TEST_CONTAINER_NAME, INTERF_CONFIG_FILE, METHOD_PACKAGE_DIR, readInterfConfig, detectInterf, resolveCompiled, resolveSourceFolderPath, resolveSourceControlPath, resolveSourceInputPath, listPortableContextsForSourceFolder, hasSourceFolderInput, assertCompiledContainer, assertWritableTargetDir, assertCompiledName, } from "./interf-detect.js";
|
|
3
2
|
export { refreshCompiledBootstrapGuidance, renderClaudeBootstrap, } from "./interf-bootstrap.js";
|
|
4
3
|
export { createCompiled, defaultCompiledNameForSource, ensurePortableContextScaffold, } from "./interf-scaffold.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const MethodIdSchema: z.ZodString;
|
|
2
|
+
import { MethodIdSchema, PreparationNameSchema } from "../../contracts/lib/schema.js";
|
|
3
|
+
export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
5
4
|
export declare const SourceReadinessCheckSchema: z.ZodObject<{
|
|
6
5
|
id: z.ZodOptional<z.ZodString>;
|
|
7
6
|
question: z.ZodString;
|
|
@@ -21,30 +20,6 @@ export declare const SourcePreparationConfigSchema: z.ZodObject<{
|
|
|
21
20
|
path: z.ZodString;
|
|
22
21
|
about: z.ZodOptional<z.ZodString>;
|
|
23
22
|
method: z.ZodOptional<z.ZodString>;
|
|
24
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
25
|
-
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
27
|
-
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
28
|
-
id: z.ZodOptional<z.ZodString>;
|
|
29
|
-
question: z.ZodString;
|
|
30
|
-
answer: z.ZodOptional<z.ZodString>;
|
|
31
|
-
expect: z.ZodOptional<z.ZodObject<{
|
|
32
|
-
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
-
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
34
|
-
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
-
min_words: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
max_words: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
}, z.core.$strip>>;
|
|
38
|
-
strictness: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, z.core.$strict>>>;
|
|
40
|
-
}, z.core.$strict>;
|
|
41
|
-
export declare const SourceDatasetConfigSchema: z.ZodObject<{
|
|
42
|
-
id: z.ZodOptional<z.ZodString>;
|
|
43
|
-
name: z.ZodString;
|
|
44
|
-
path: z.ZodString;
|
|
45
|
-
about: z.ZodOptional<z.ZodString>;
|
|
46
|
-
method: z.ZodOptional<z.ZodString>;
|
|
47
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
48
23
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
49
24
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
50
25
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -69,7 +44,6 @@ export declare const CompiledInterfConfigSchema: z.ZodObject<{
|
|
|
69
44
|
name: z.ZodString;
|
|
70
45
|
about: z.ZodOptional<z.ZodString>;
|
|
71
46
|
method: z.ZodString;
|
|
72
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
73
47
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
74
48
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
75
49
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -89,16 +63,10 @@ export declare const CompiledInterfConfigSchema: z.ZodObject<{
|
|
|
89
63
|
selected: z.ZodString;
|
|
90
64
|
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
91
65
|
}, z.core.$strip>>;
|
|
92
|
-
workflow_origin: z.ZodOptional<z.ZodObject<{
|
|
93
|
-
selected: z.ZodString;
|
|
94
|
-
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
-
}, z.core.$strip>>;
|
|
96
66
|
source: z.ZodObject<{
|
|
97
67
|
path: z.ZodString;
|
|
98
68
|
control_path: z.ZodOptional<z.ZodString>;
|
|
99
69
|
preparation_path: z.ZodOptional<z.ZodString>;
|
|
100
|
-
source_folder_path: z.ZodOptional<z.ZodString>;
|
|
101
|
-
dataset_path: z.ZodOptional<z.ZodString>;
|
|
102
70
|
}, z.core.$strip>;
|
|
103
71
|
}, z.core.$loose>;
|
|
104
72
|
export declare const InterfConfigSchema: z.ZodObject<{
|
|
@@ -106,7 +74,6 @@ export declare const InterfConfigSchema: z.ZodObject<{
|
|
|
106
74
|
name: z.ZodString;
|
|
107
75
|
about: z.ZodOptional<z.ZodString>;
|
|
108
76
|
method: z.ZodString;
|
|
109
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
110
77
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
111
78
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
112
79
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -126,16 +93,10 @@ export declare const InterfConfigSchema: z.ZodObject<{
|
|
|
126
93
|
selected: z.ZodString;
|
|
127
94
|
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
128
95
|
}, z.core.$strip>>;
|
|
129
|
-
workflow_origin: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
selected: z.ZodString;
|
|
131
|
-
local_draft: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
-
}, z.core.$strip>>;
|
|
133
96
|
source: z.ZodObject<{
|
|
134
97
|
path: z.ZodString;
|
|
135
98
|
control_path: z.ZodOptional<z.ZodString>;
|
|
136
99
|
preparation_path: z.ZodOptional<z.ZodString>;
|
|
137
|
-
source_folder_path: z.ZodOptional<z.ZodString>;
|
|
138
|
-
dataset_path: z.ZodOptional<z.ZodString>;
|
|
139
100
|
}, z.core.$strip>;
|
|
140
101
|
}, z.core.$loose>;
|
|
141
102
|
export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
@@ -148,30 +109,6 @@ export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
|
148
109
|
path: z.ZodString;
|
|
149
110
|
about: z.ZodOptional<z.ZodString>;
|
|
150
111
|
method: z.ZodOptional<z.ZodString>;
|
|
151
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
152
|
-
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
155
|
-
id: z.ZodOptional<z.ZodString>;
|
|
156
|
-
question: z.ZodString;
|
|
157
|
-
answer: z.ZodOptional<z.ZodString>;
|
|
158
|
-
expect: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
-
must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
161
|
-
must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
|
-
min_words: z.ZodOptional<z.ZodNumber>;
|
|
163
|
-
max_words: z.ZodOptional<z.ZodNumber>;
|
|
164
|
-
}, z.core.$strip>>;
|
|
165
|
-
strictness: z.ZodOptional<z.ZodString>;
|
|
166
|
-
}, z.core.$strict>>>;
|
|
167
|
-
}, z.core.$strict>>>;
|
|
168
|
-
datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
169
|
-
id: z.ZodOptional<z.ZodString>;
|
|
170
|
-
name: z.ZodString;
|
|
171
|
-
path: z.ZodString;
|
|
172
|
-
about: z.ZodOptional<z.ZodString>;
|
|
173
|
-
method: z.ZodOptional<z.ZodString>;
|
|
174
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
175
112
|
max_attempts: z.ZodOptional<z.ZodNumber>;
|
|
176
113
|
max_loops: z.ZodOptional<z.ZodNumber>;
|
|
177
114
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -191,7 +128,6 @@ export declare const SourceFolderConfigSchema: z.ZodObject<{
|
|
|
191
128
|
}, z.core.$strict>;
|
|
192
129
|
export type SourceFolderBinding = z.infer<typeof SourceFolderBindingSchema>;
|
|
193
130
|
export type SourceReadinessCheck = z.infer<typeof SourceReadinessCheckSchema>;
|
|
194
|
-
export type SourceDatasetConfig = z.infer<typeof SourceDatasetConfigSchema>;
|
|
195
131
|
export type PreparationName = z.infer<typeof PreparationNameSchema>;
|
|
196
132
|
export type MethodId = z.infer<typeof MethodIdSchema>;
|
|
197
133
|
export type SourcePreparationConfig = z.infer<typeof SourcePreparationConfigSchema>;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const RESERVED_DATASET_NAMES = new Set(["tests", "methods", "workflows"]);
|
|
5
|
-
export const DatasetNameSchema = z
|
|
6
|
-
.string()
|
|
7
|
-
.regex(DatasetNamePattern, "Preparation names must use lowercase letters, numbers, and dashes only.")
|
|
8
|
-
.refine((value) => !RESERVED_DATASET_NAMES.has(value), "Preparation name is reserved.");
|
|
9
|
-
export const PreparationNameSchema = DatasetNameSchema;
|
|
10
|
-
export const MethodIdSchema = WorkflowIdSchema;
|
|
2
|
+
import { InterfIdPattern, MethodIdSchema, PreparationNameSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, } from "../../contracts/lib/schema.js";
|
|
3
|
+
export { MethodIdSchema, PreparationNameSchema, } from "../../contracts/lib/schema.js";
|
|
11
4
|
export const SourceReadinessCheckSchema = z.object({
|
|
12
|
-
id: z.string().regex(
|
|
5
|
+
id: z.string().regex(InterfIdPattern).optional(),
|
|
13
6
|
question: z.string().min(1),
|
|
14
7
|
answer: z.string().min(1).optional(),
|
|
15
8
|
expect: TestCaseExpectSchema.optional(),
|
|
@@ -24,26 +17,23 @@ export const SourceReadinessCheckSchema = z.object({
|
|
|
24
17
|
}
|
|
25
18
|
});
|
|
26
19
|
export const SourcePreparationConfigSchema = z.object({
|
|
27
|
-
id: z.string().regex(
|
|
20
|
+
id: z.string().regex(InterfIdPattern).optional(),
|
|
28
21
|
name: PreparationNameSchema,
|
|
29
22
|
path: z.string().min(1),
|
|
30
23
|
about: z.string().min(1).optional(),
|
|
31
24
|
method: MethodIdSchema.optional(),
|
|
32
|
-
workflow: WorkflowIdSchema.optional(),
|
|
33
25
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
34
26
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
35
27
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
36
28
|
}).strict();
|
|
37
|
-
export const SourceDatasetConfigSchema = SourcePreparationConfigSchema;
|
|
38
29
|
export const SourceFolderBindingSchema = z.object({
|
|
39
30
|
path: z.string().min(1),
|
|
40
31
|
}).strict();
|
|
41
32
|
export const CompiledInterfConfigSchema = z.object({
|
|
42
33
|
type: z.literal("compiled"),
|
|
43
|
-
name:
|
|
34
|
+
name: PreparationNameSchema,
|
|
44
35
|
about: z.string().optional(),
|
|
45
36
|
method: MethodIdSchema,
|
|
46
|
-
workflow: WorkflowIdSchema.optional(),
|
|
47
37
|
max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
|
|
48
38
|
max_loops: SourceCompiledMaxLoopsSchema.optional(),
|
|
49
39
|
checks: z.array(SourceReadinessCheckSchema).default([]),
|
|
@@ -51,22 +41,14 @@ export const CompiledInterfConfigSchema = z.object({
|
|
|
51
41
|
selected: MethodIdSchema,
|
|
52
42
|
local_draft: z.boolean().optional(),
|
|
53
43
|
}).optional(),
|
|
54
|
-
workflow_origin: z.object({
|
|
55
|
-
selected: WorkflowIdSchema,
|
|
56
|
-
local_draft: z.boolean().optional(),
|
|
57
|
-
}).optional(),
|
|
58
44
|
source: z.object({
|
|
59
45
|
path: z.string(),
|
|
60
46
|
control_path: z.string().optional(),
|
|
61
47
|
preparation_path: z.string().optional(),
|
|
62
|
-
source_folder_path: z.string().optional(),
|
|
63
|
-
dataset_path: z.string().optional(),
|
|
64
48
|
}),
|
|
65
49
|
}).passthrough();
|
|
66
50
|
export const InterfConfigSchema = CompiledInterfConfigSchema;
|
|
67
51
|
export const SourceFolderConfigSchema = z.object({
|
|
68
52
|
source_folder: SourceFolderBindingSchema.optional(),
|
|
69
53
|
preparations: z.array(SourcePreparationConfigSchema).default([]),
|
|
70
|
-
// Legacy config array. Read for compatibility; new writes use `preparations`.
|
|
71
|
-
datasets: z.array(SourceDatasetConfigSchema).optional(),
|
|
72
54
|
}).strict();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export declare const PROJECT_INTERF_DIR = "interf";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
|
|
3
3
|
export declare const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
4
4
|
export declare function projectInterfRoot(projectPath: string): string;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function datasetTestRunPath(projectPath: string, datasetName: string, target: DatasetTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
5
|
+
export declare function portableContextPath(projectPath: string, preparationName: string): string;
|
|
6
|
+
export declare function preparationTestsRoot(projectPath: string, preparationName: string): string;
|
|
7
|
+
export type PreparationTestTargetLabel = "file-as-is" | "compiled";
|
|
8
|
+
export declare function preparationTestRunsRoot(projectPath: string, preparationName: string, target: PreparationTestTargetLabel): string;
|
|
9
|
+
export declare function preparationLatestReadinessRunPath(projectPath: string, preparationName: string): string;
|
|
10
|
+
export declare function preparationLatestReadinessSummaryPath(projectPath: string, preparationName: string): string;
|
|
11
|
+
export declare function normalizePreparationTestRunId(input: string): string;
|
|
12
|
+
export declare function preparationTestRunPath(projectPath: string, preparationName: string, target: PreparationTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
export const PROJECT_INTERF_DIR = "interf";
|
|
3
|
-
export const
|
|
3
|
+
export const PORTABLE_CONTEXT_INTERF_DIR = ".interf";
|
|
4
4
|
export const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
5
5
|
export function projectInterfRoot(projectPath) {
|
|
6
6
|
return join(projectPath, PROJECT_INTERF_DIR);
|
|
7
7
|
}
|
|
8
|
-
export function
|
|
9
|
-
return join(projectInterfRoot(projectPath),
|
|
8
|
+
export function portableContextPath(projectPath, preparationName) {
|
|
9
|
+
return join(projectInterfRoot(projectPath), preparationName);
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
12
|
-
return
|
|
11
|
+
export function preparationTestsRoot(projectPath, preparationName) {
|
|
12
|
+
return join(portableContextPath(projectPath, preparationName), PORTABLE_CONTEXT_INTERF_DIR, PORTABLE_CONTEXT_TESTS_DIR);
|
|
13
13
|
}
|
|
14
|
-
export function
|
|
15
|
-
return join(
|
|
14
|
+
export function preparationTestRunsRoot(projectPath, preparationName, target) {
|
|
15
|
+
return join(preparationTestsRoot(projectPath, preparationName), target, "runs");
|
|
16
16
|
}
|
|
17
|
-
export function
|
|
18
|
-
return join(
|
|
17
|
+
export function preparationLatestReadinessRunPath(projectPath, preparationName) {
|
|
18
|
+
return join(preparationTestsRoot(projectPath, preparationName), "latest.json");
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
21
|
-
return join(
|
|
20
|
+
export function preparationLatestReadinessSummaryPath(projectPath, preparationName) {
|
|
21
|
+
return join(preparationTestsRoot(projectPath, preparationName), "latest.md");
|
|
22
22
|
}
|
|
23
|
-
export function
|
|
24
|
-
return join(datasetTestsRoot(projectPath, datasetName), "latest.md");
|
|
25
|
-
}
|
|
26
|
-
export function normalizeDatasetTestRunId(input) {
|
|
23
|
+
export function normalizePreparationTestRunId(input) {
|
|
27
24
|
return input
|
|
28
25
|
.toLowerCase()
|
|
29
26
|
.trim()
|
|
@@ -31,6 +28,6 @@ export function normalizeDatasetTestRunId(input) {
|
|
|
31
28
|
.replace(/^-+|-+$/g, "")
|
|
32
29
|
.slice(0, 80);
|
|
33
30
|
}
|
|
34
|
-
export function
|
|
35
|
-
return join(
|
|
31
|
+
export function preparationTestRunPath(projectPath, preparationName, target, generatedAt, runId, runSuffix) {
|
|
32
|
+
return join(preparationTestRunsRoot(projectPath, preparationName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${runSuffix ? `-${normalizePreparationTestRunId(runSuffix)}` : ""}.json`);
|
|
36
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type
|
|
1
|
+
import { type InterfConfig, type SourceFolderBinding, type SourceReadinessCheck, type SourcePreparationConfig, type SourceFolderConfig } from "./lib/schema.js";
|
|
2
2
|
import type { TestSpec, TestTargetType } from "../testing/lib/schema.js";
|
|
3
3
|
export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
|
|
4
4
|
export declare const SOURCE_FOLDER_CONFIG_PATH = "interf/interf.json";
|
|
@@ -13,40 +13,33 @@ export declare function loadSourceFolderConfig(sourcePath: string): SourceFolder
|
|
|
13
13
|
export interface WritableSourceProjectConfig {
|
|
14
14
|
source_folder?: SourceFolderBinding;
|
|
15
15
|
preparations?: SourcePreparationConfig[];
|
|
16
|
-
datasets?: SourceDatasetConfig[];
|
|
17
16
|
}
|
|
18
|
-
export
|
|
17
|
+
export { DEFAULT_METHOD_ID, methodIdForSourcePreparationConfig } from "../methods/method-resolution.js";
|
|
19
18
|
export declare function listSourcePreparationConfigs(config: SourceFolderConfig | null): SourcePreparationConfig[];
|
|
20
|
-
export declare
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function resolveDatasetCompileMaxLoops(datasetConfig: Pick<SourceDatasetConfig, "max_loops">, override?: number | null): number | null;
|
|
19
|
+
export declare function resolvePreparationCompileMaxAttempts(preparationConfig: Pick<SourcePreparationConfig, "max_attempts">, override?: number | null): number | null;
|
|
20
|
+
export declare function resolvePreparationCompileMaxLoops(preparationConfig: Pick<SourcePreparationConfig, "max_loops">, override?: number | null): number | null;
|
|
23
21
|
export declare function getDefaultSourcePreparationConfig(config: SourceFolderConfig | null): SourcePreparationConfig | null;
|
|
24
|
-
export declare const getDefaultSourceDatasetConfig: typeof getDefaultSourcePreparationConfig;
|
|
25
22
|
export declare function findSourcePreparationConfig(config: SourceFolderConfig | null, preparationName: string): SourcePreparationConfig | null;
|
|
26
|
-
export declare const findSourceDatasetConfig: typeof findSourcePreparationConfig;
|
|
27
23
|
export declare function configuredSourceFolderPath(config: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
28
24
|
export declare function resolveConfiguredSourceFolderPath(sourcePath: string, config?: SourceFolderConfig | WritableSourceProjectConfig | null | undefined): string | null;
|
|
29
25
|
export declare function saveSourceFolderConfig(sourcePath: string, config: WritableSourceProjectConfig): void;
|
|
30
|
-
export declare function
|
|
31
|
-
export declare
|
|
32
|
-
export declare function upsertSourceDatasetConfig(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
|
|
26
|
+
export declare function appendSourcePreparationChecks(sourcePath: string, preparationName: string, checks: SourceReadinessCheck[]): void;
|
|
27
|
+
export declare function upsertSourcePreparationConfig(sourcePath: string, preparationConfig: SourcePreparationConfig, options?: {
|
|
33
28
|
matchName?: string;
|
|
34
29
|
}): void;
|
|
35
|
-
export declare const upsertSourcePreparationConfig: typeof upsertSourceDatasetConfig;
|
|
36
30
|
export declare function compiledMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
|
|
37
31
|
export declare function compiledMaxLoops(maxLoops: number | null | undefined): number | undefined;
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
32
|
+
export declare function sourcePreparationConfigFromInterfConfig(config: InterfConfig, preparationPath?: string): SourcePreparationConfig;
|
|
33
|
+
export declare function loadCompiledPreparationConfig(compiledPath: string): SourcePreparationConfig | null;
|
|
40
34
|
export declare function saveCompiledInterfConfig(compiledPath: string, config: InterfConfig): InterfConfig;
|
|
41
|
-
export declare function
|
|
35
|
+
export declare function syncCompiledInterfConfigFromSourcePreparationConfig(compiledPath: string, preparationConfig: SourcePreparationConfig): InterfConfig;
|
|
42
36
|
export declare function buildTestSpecFromSourceFolderConfig(options: {
|
|
43
37
|
sourcePath: string;
|
|
44
38
|
targetName?: string | null;
|
|
45
39
|
targetType?: TestTargetType;
|
|
46
40
|
}): LoadedSourceTestSpec | null;
|
|
47
|
-
export declare function
|
|
41
|
+
export declare function buildTestSpecFromCompiledPreparationConfig(options: {
|
|
48
42
|
compiledPath: string;
|
|
49
43
|
targetType?: TestTargetType;
|
|
50
44
|
}): LoadedSourceTestSpec | null;
|
|
51
|
-
export declare function
|
|
52
|
-
export declare const resolveSourcePreparationPath: typeof resolveSourceDatasetPath;
|
|
45
|
+
export declare function resolveSourcePreparationPath(projectPath: string, preparationConfig: Pick<SourcePreparationConfig, "path">): string;
|