@interf/compiler 0.9.5 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -92
- package/TRADEMARKS.md +2 -13
- package/agent-skills/interf-actions/SKILL.md +95 -36
- package/agent-skills/interf-actions/references/cli.md +118 -51
- package/builtin-methods/interf-default/README.md +3 -4
- package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +2 -2
- package/builtin-methods/interf-default/compile/stages/summarize/SKILL.md +2 -1
- package/builtin-methods/interf-default/improve/SKILL.md +1 -1
- package/builtin-methods/interf-default/method.json +10 -4
- package/builtin-methods/interf-default/method.schema.json +0 -9
- package/builtin-methods/interf-default/use/query/SKILL.md +5 -5
- package/dist/cli/commands/compile.d.ts +8 -25
- package/dist/cli/commands/compile.js +75 -360
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/login.d.ts +7 -0
- package/dist/cli/commands/login.js +39 -0
- package/dist/cli/commands/logout.d.ts +2 -0
- package/dist/cli/commands/logout.js +16 -0
- package/dist/cli/commands/method.d.ts +2 -0
- package/dist/cli/commands/method.js +113 -0
- package/dist/cli/commands/prep.d.ts +2 -0
- package/dist/cli/commands/prep.js +134 -0
- package/dist/cli/commands/reset.d.ts +8 -1
- package/dist/cli/commands/reset.js +47 -26
- package/dist/cli/commands/runs.d.ts +2 -0
- package/dist/cli/commands/runs.js +120 -0
- package/dist/cli/commands/status.d.ts +6 -1
- package/dist/cli/commands/status.js +68 -111
- package/dist/cli/commands/test.d.ts +6 -14
- package/dist/cli/commands/test.js +65 -181
- package/dist/cli/commands/web.d.ts +0 -9
- package/dist/cli/commands/web.js +147 -120
- package/dist/cli/commands/wizard.d.ts +9 -0
- package/dist/cli/commands/wizard.js +442 -0
- package/dist/cli/index.d.ts +7 -6
- package/dist/cli/index.js +13 -10
- package/dist/compiler-ui/404.html +1 -1
- package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
- package/dist/compiler-ui/__next._full.txt +3 -3
- package/dist/compiler-ui/__next._head.txt +1 -1
- package/dist/compiler-ui/__next._index.txt +2 -2
- package/dist/compiler-ui/__next._tree.txt +2 -2
- package/dist/compiler-ui/_next/static/chunks/{18a8f2jkv3z.c.css → 045gole2ojo3g.css} +1 -1
- package/dist/compiler-ui/_next/static/chunks/{177mvn4rse235.js → 17t-lulmyawg5.js} +9 -9
- package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
- package/dist/compiler-ui/_not-found.html +1 -1
- package/dist/compiler-ui/_not-found.txt +2 -2
- package/dist/compiler-ui/index.html +1 -1
- package/dist/compiler-ui/index.txt +3 -3
- package/dist/packages/agents/lib/shells.d.ts +1 -1
- package/dist/packages/agents/lib/shells.js +111 -52
- package/dist/packages/agents/lib/user-config.d.ts +4 -2
- package/dist/packages/agents/lib/user-config.js +15 -7
- package/dist/packages/compiler/compiled-paths.d.ts +9 -2
- package/dist/packages/compiler/compiled-paths.js +30 -15
- package/dist/packages/compiler/compiled-pipeline.js +23 -3
- package/dist/packages/compiler/compiled-stage-plan.js +4 -0
- package/dist/packages/compiler/compiled-target.d.ts +1 -1
- package/dist/packages/compiler/compiled-target.js +1 -1
- package/dist/packages/compiler/index.d.ts +1 -0
- package/dist/packages/compiler/index.js +1 -0
- package/dist/packages/compiler/lib/schema.d.ts +26 -31
- package/dist/packages/compiler/lib/schema.js +1 -12
- package/dist/packages/compiler/method-runs.d.ts +2 -3
- package/dist/packages/compiler/method-runs.js +2 -3
- package/dist/packages/compiler/reset.js +3 -1
- package/dist/packages/compiler/runtime-contracts.js +0 -3
- package/dist/packages/compiler/runtime-prompt.js +1 -1
- package/dist/packages/compiler/source-files.d.ts +46 -0
- package/dist/packages/compiler/source-files.js +149 -0
- package/dist/packages/compiler/state-artifacts.d.ts +3 -2
- package/dist/packages/compiler/state-artifacts.js +4 -3
- package/dist/packages/compiler/state-io.d.ts +3 -2
- package/dist/packages/compiler/state-io.js +11 -5
- package/dist/packages/compiler/state-paths.d.ts +2 -1
- package/dist/packages/compiler/state-paths.js +6 -3
- package/dist/packages/compiler/state-view.d.ts +3 -2
- package/dist/packages/compiler/state-view.js +18 -28
- package/dist/packages/compiler/state.d.ts +4 -4
- package/dist/packages/compiler/state.js +3 -3
- package/dist/packages/contracts/index.d.ts +1 -1
- package/dist/packages/contracts/lib/preparation-paths.d.ts +117 -0
- package/dist/packages/contracts/lib/preparation-paths.js +177 -0
- package/dist/packages/contracts/lib/schema.d.ts +85 -5
- package/dist/packages/contracts/lib/schema.js +46 -1
- package/dist/packages/execution/lib/schema.d.ts +50 -50
- package/dist/packages/execution/lib/schema.js +1 -1
- package/dist/packages/local-service/action-definitions.d.ts +14 -14
- package/dist/packages/local-service/action-definitions.js +27 -28
- package/dist/packages/local-service/action-planner.js +2 -1
- package/dist/packages/local-service/client.d.ts +51 -52
- package/dist/packages/local-service/client.js +132 -140
- package/dist/packages/local-service/connection-config.d.ts +38 -0
- package/dist/packages/local-service/connection-config.js +75 -0
- package/dist/packages/local-service/index.d.ts +11 -7
- package/dist/packages/local-service/index.js +6 -4
- package/dist/packages/local-service/instance-paths.d.ts +100 -0
- package/dist/packages/local-service/instance-paths.js +165 -0
- package/dist/packages/local-service/lib/schema.d.ts +405 -2297
- package/dist/packages/local-service/lib/schema.js +146 -62
- package/dist/packages/local-service/native-run-handlers.js +3 -3
- package/dist/packages/local-service/preparation-store.d.ts +92 -0
- package/dist/packages/local-service/preparation-store.js +171 -0
- package/dist/packages/local-service/routes.d.ts +33 -16
- package/dist/packages/local-service/routes.js +44 -20
- package/dist/packages/local-service/run-observability.js +11 -11
- package/dist/packages/local-service/runtime-caches.d.ts +76 -0
- package/dist/packages/local-service/runtime-caches.js +191 -0
- package/dist/packages/local-service/runtime-event-applier.d.ts +12 -0
- package/dist/packages/local-service/runtime-event-applier.js +177 -0
- package/dist/packages/local-service/runtime-persistence.d.ts +47 -0
- package/dist/packages/local-service/runtime-persistence.js +137 -0
- package/dist/packages/local-service/runtime-proposal-helpers.d.ts +35 -0
- package/dist/packages/local-service/runtime-proposal-helpers.js +251 -0
- package/dist/packages/local-service/runtime-resource-builders.d.ts +52 -0
- package/dist/packages/local-service/runtime-resource-builders.js +149 -0
- package/dist/packages/local-service/runtime.d.ts +197 -43
- package/dist/packages/local-service/runtime.js +800 -974
- package/dist/packages/local-service/server.d.ts +15 -0
- package/dist/packages/local-service/server.js +641 -273
- package/dist/packages/local-service/service-registry.d.ts +47 -0
- package/dist/packages/local-service/service-registry.js +137 -0
- package/dist/packages/method-authoring/method-authoring.d.ts +1 -1
- package/dist/packages/method-authoring/method-authoring.js +2 -2
- package/dist/packages/method-authoring/method-improvement.js +1 -1
- package/dist/packages/method-package/builtin-compiled-method.d.ts +4 -5
- package/dist/packages/method-package/builtin-compiled-method.js +8 -14
- package/dist/packages/method-package/context-interface.d.ts +4 -40
- package/dist/packages/method-package/context-interface.js +1 -23
- package/dist/packages/method-package/interf-method-package.d.ts +4 -4
- package/dist/packages/method-package/interf-method-package.js +21 -33
- package/dist/packages/method-package/local-methods.d.ts +10 -6
- package/dist/packages/method-package/local-methods.js +57 -39
- package/dist/packages/method-package/method-definitions.d.ts +8 -34
- package/dist/packages/method-package/method-definitions.js +49 -37
- package/dist/packages/method-package/method-helpers.d.ts +1 -13
- package/dist/packages/method-package/method-helpers.js +8 -42
- package/dist/packages/method-package/method-stage-runner.js +2 -2
- package/dist/packages/method-package/user-methods.d.ts +17 -0
- package/dist/packages/method-package/user-methods.js +77 -0
- package/dist/packages/project-model/index.d.ts +0 -1
- package/dist/packages/project-model/index.js +0 -1
- package/dist/packages/project-model/interf-detect.d.ts +8 -3
- package/dist/packages/project-model/interf-detect.js +34 -34
- package/dist/packages/project-model/interf-scaffold.d.ts +3 -3
- package/dist/packages/project-model/interf-scaffold.js +23 -32
- package/dist/packages/project-model/lib/schema.js +38 -1
- package/dist/packages/project-model/preparation-entries.d.ts +5 -5
- package/dist/packages/project-model/preparation-entries.js +14 -14
- package/dist/packages/project-model/source-config.d.ts +11 -11
- package/dist/packages/project-model/source-config.js +74 -46
- package/dist/packages/project-model/source-folders.d.ts +5 -5
- package/dist/packages/project-model/source-folders.js +14 -14
- package/dist/packages/shared/filesystem.d.ts +7 -0
- package/dist/packages/shared/filesystem.js +97 -10
- package/dist/packages/testing/lib/schema.d.ts +10 -10
- package/dist/packages/testing/lib/schema.js +2 -2
- package/dist/packages/testing/readiness-check-run.d.ts +4 -4
- package/dist/packages/testing/readiness-check-run.js +36 -36
- package/dist/packages/testing/test-execution.js +6 -6
- package/dist/packages/testing/test-paths.js +4 -3
- package/dist/packages/testing/test-sandbox.d.ts +0 -1
- package/dist/packages/testing/test-sandbox.js +14 -30
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +6 -6
- package/dist/packages/testing/test.d.ts +1 -1
- package/dist/packages/testing/test.js +1 -1
- package/package.json +3 -4
- package/CHANGELOG.md +0 -93
- package/LICENSE +0 -183
- package/dist/cli/commands/action-input-cli.d.ts +0 -25
- package/dist/cli/commands/action-input-cli.js +0 -73
- package/dist/cli/commands/control-path.d.ts +0 -11
- package/dist/cli/commands/control-path.js +0 -72
- package/dist/cli/commands/create-method-wizard.d.ts +0 -64
- package/dist/cli/commands/create-method-wizard.js +0 -434
- package/dist/cli/commands/create.d.ts +0 -6
- package/dist/cli/commands/create.js +0 -183
- package/dist/cli/commands/default.d.ts +0 -2
- package/dist/cli/commands/default.js +0 -39
- package/dist/cli/commands/executor-flow.d.ts +0 -29
- package/dist/cli/commands/executor-flow.js +0 -163
- package/dist/cli/commands/init.d.ts +0 -26
- package/dist/cli/commands/init.js +0 -771
- package/dist/cli/commands/list.d.ts +0 -2
- package/dist/cli/commands/list.js +0 -30
- package/dist/cli/commands/preparation-action.d.ts +0 -8
- package/dist/cli/commands/preparation-action.js +0 -29
- package/dist/cli/commands/preparation-picker.d.ts +0 -5
- package/dist/cli/commands/preparation-picker.js +0 -36
- package/dist/cli/commands/preparation-selection.d.ts +0 -6
- package/dist/cli/commands/preparation-selection.js +0 -11
- package/dist/cli/commands/service-action-flow.d.ts +0 -9
- package/dist/cli/commands/service-action-flow.js +0 -19
- package/dist/cli/commands/source-config-wizard.d.ts +0 -51
- package/dist/cli/commands/source-config-wizard.js +0 -670
- package/dist/cli/commands/verify.d.ts +0 -2
- package/dist/cli/commands/verify.js +0 -94
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -49
- package/dist/packages/compiler/raw-snapshot.js +0 -101
- package/dist/packages/method-package/index.d.ts +0 -11
- package/dist/packages/method-package/index.js +0 -11
- package/dist/packages/method-package/method-stage-policy.d.ts +0 -5
- package/dist/packages/method-package/method-stage-policy.js +0 -31
- package/dist/packages/project-model/project-paths.d.ts +0 -12
- package/dist/packages/project-model/project-paths.js +0 -33
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_buildManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_clientMiddlewareManifest.js +0 -0
- /package/dist/compiler-ui/_next/static/{84FaeF3EzBF9kKTMjSEVN → C6vVfy3aeYuIO3d2AoNvC}/_ssgManifest.js +0 -0
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { basename
|
|
2
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { discoverSourceFiles } from "./discovery.js";
|
|
1
|
+
import { basename } from "node:path";
|
|
4
2
|
import { readInterfConfig, resolveSourceFolderPath } from "../project-model/interf-detect.js";
|
|
5
|
-
import { loadCompiledViewSpec, saveCompiledViewSpec, } from "./state-io.js";
|
|
6
|
-
import {
|
|
7
|
-
import { compiledRuntimeRoot, methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
3
|
+
import { loadCompiledSourceSnapshot, loadCompiledViewSpec, saveCompiledViewSpec, } from "./state-io.js";
|
|
4
|
+
import { methodPackagePathForCompiled } from "./compiled-paths.js";
|
|
8
5
|
import { readCompiledSchemaFile } from "./compiled-schema.js";
|
|
9
6
|
import { getActiveCompiledMethod, resolveRequiredCompiledMethodFromConfig } from "../method-package/method-definitions.js";
|
|
7
|
+
import { writeCompiledSourceFiles, writeCompiledSourceSnapshot, } from "./source-files.js";
|
|
10
8
|
export function ensureCompiledViewSpec(dirPath) {
|
|
11
9
|
const existing = loadCompiledViewSpec(dirPath);
|
|
12
10
|
const now = new Date().toISOString();
|
|
@@ -22,29 +20,21 @@ export function ensureCompiledViewSpec(dirPath) {
|
|
|
22
20
|
saveCompiledViewSpec(dirPath, defaults);
|
|
23
21
|
return defaults;
|
|
24
22
|
}
|
|
25
|
-
export function
|
|
26
|
-
const now = new Date().toISOString();
|
|
23
|
+
export function ensureCompiledSourceFiles(dirPath) {
|
|
27
24
|
const config = readInterfConfig(dirPath);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
raw_root: sourceRoot,
|
|
42
|
-
source_total: discovery.totalCount,
|
|
43
|
-
sample_files: sampleFiles,
|
|
44
|
-
};
|
|
45
|
-
mkdirSync(compiledRuntimeRoot(dirPath), { recursive: true });
|
|
46
|
-
writeFileSync(rawSnapshotPath(dirPath), JSON.stringify(artifact, null, 2) + "\n");
|
|
47
|
-
return artifact;
|
|
25
|
+
return writeCompiledSourceFiles(dirPath, resolveSourceFolderPath(dirPath, config));
|
|
26
|
+
}
|
|
27
|
+
export function ensureCompiledSourceSnapshot(dirPath, sourceFiles) {
|
|
28
|
+
const existing = loadCompiledSourceSnapshot(dirPath);
|
|
29
|
+
if (existing)
|
|
30
|
+
return existing;
|
|
31
|
+
const config = readInterfConfig(dirPath);
|
|
32
|
+
const resolvedSourceFiles = sourceFiles ?? writeCompiledSourceFiles(dirPath, resolveSourceFolderPath(dirPath, config));
|
|
33
|
+
return writeCompiledSourceSnapshot({
|
|
34
|
+
compiledPath: dirPath,
|
|
35
|
+
sourceFiles: resolvedSourceFiles,
|
|
36
|
+
runId: null,
|
|
37
|
+
});
|
|
48
38
|
}
|
|
49
39
|
export function normalizeCompiledViewSpec(existing, defaults) {
|
|
50
40
|
const resolvedDefaults = defaults ?? existing;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { RuntimeStatus, CompiledStage, CompiledState, CompiledHealth, ViewSection, ViewCard, CompiledViewSpec,
|
|
2
|
-
export { statePath, healthPath, viewSpecPath,
|
|
3
|
-
export { loadState, saveState, loadCompiledHealth, saveCompiledHealth, loadCompiledViewSpec,
|
|
1
|
+
export type { RuntimeStatus, CompiledStage, CompiledState, CompiledHealth, ViewSection, ViewCard, CompiledViewSpec, SourceFiles, SourceSnapshot, StageInputs, } from "./lib/schema.js";
|
|
2
|
+
export { statePath, healthPath, viewSpecPath, sourceFilesPath, sourceSnapshotPath, } from "./state-paths.js";
|
|
3
|
+
export { loadState, saveState, loadCompiledHealth, saveCompiledHealth, loadCompiledViewSpec, loadCompiledSourceFiles, loadCompiledSourceSnapshot, saveCompiledViewSpec, initCompiledState, } from "./state-io.js";
|
|
4
4
|
export { refreshCompiledArtifacts, } from "./state-artifacts.js";
|
|
5
5
|
export { computeCompiledHealth, resolveCompiledStatus, resolveCompiledStage, } from "./state-health.js";
|
|
6
|
-
export { ensureCompiledViewSpec,
|
|
6
|
+
export { ensureCompiledViewSpec, ensureCompiledSourceFiles, ensureCompiledSourceSnapshot, normalizeCompiledViewSpec, } from "./state-view.js";
|
|
7
7
|
export declare function initializeCompiledRuntimeState(dirPath: string): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { statePath, healthPath, viewSpecPath,
|
|
2
|
-
export { loadState, saveState, loadCompiledHealth, saveCompiledHealth, loadCompiledViewSpec,
|
|
1
|
+
export { statePath, healthPath, viewSpecPath, sourceFilesPath, sourceSnapshotPath, } from "./state-paths.js";
|
|
2
|
+
export { loadState, saveState, loadCompiledHealth, saveCompiledHealth, loadCompiledViewSpec, loadCompiledSourceFiles, loadCompiledSourceSnapshot, saveCompiledViewSpec, initCompiledState, } from "./state-io.js";
|
|
3
3
|
export { refreshCompiledArtifacts, } from "./state-artifacts.js";
|
|
4
4
|
export { computeCompiledHealth, resolveCompiledStatus, resolveCompiledStage, } from "./state-health.js";
|
|
5
|
-
export { ensureCompiledViewSpec,
|
|
5
|
+
export { ensureCompiledViewSpec, ensureCompiledSourceFiles, ensureCompiledSourceSnapshot, normalizeCompiledViewSpec, } from "./state-view.js";
|
|
6
6
|
import { saveEmptyCompiledInventory, initCompiledState, saveState } from "./state-io.js";
|
|
7
7
|
import { refreshCompiledArtifacts } from "./state-artifacts.js";
|
|
8
8
|
export function initializeCompiledRuntimeState(dirPath) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * as schema from "./lib/schema.js";
|
|
2
|
-
export type { MethodId, PreparationName, ReadinessCheck, ReadinessGate, ReadinessState, ReadinessStatus, ReadinessTargetResult, RuntimeContractType, RuntimeExecutorInfo, RuntimeStage, RuntimeTargetType, TestCaseExpect, TestTargetType, } from "./lib/schema.js";
|
|
2
|
+
export type { MethodId, PreparationName, ReadinessCheck, ReadinessGate, ReadinessState, ReadinessStatus, ReadinessTargetResult, RuntimeContractType, RuntimeExecutorInfo, RuntimeStage, RuntimeTargetType, Source, SourceFile, SourceFiles, SourceKind, SourceSnapshot, StageInput, StageInputs, TestCaseExpect, TestTargetType, } from "./lib/schema.js";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source of truth for every Interf path on disk.
|
|
3
|
+
*
|
|
4
|
+
* Two roots, one helper per named location. Code never string-concatenates
|
|
5
|
+
* path segments to product locations; it calls the helper here.
|
|
6
|
+
*
|
|
7
|
+
* Branded string types catch "passed a Source Folder where I expected a
|
|
8
|
+
* Preparation Data Dir" at the type-checker level instead of at runtime.
|
|
9
|
+
*
|
|
10
|
+
* Two roots:
|
|
11
|
+
* - **Interf Home** (`~/.interf/`): per-user, cross-preparation state. Holds
|
|
12
|
+
* the user-level Method library and the central service registry.
|
|
13
|
+
* - **Preparation Data Dir**: a directory that IS a preparation's state
|
|
14
|
+
* root. Holds `interf.json`, `methods/`, the portable context output, and
|
|
15
|
+
* the service-internal `.service/` scratch dir. The user's Source Folders
|
|
16
|
+
* are passed as `--source <path>` — they are inputs, not part of the
|
|
17
|
+
* preparation data dir.
|
|
18
|
+
*
|
|
19
|
+
* No nested `interf/` namespace. The data dir IS the state root, full stop.
|
|
20
|
+
*/
|
|
21
|
+
/** Absolute path to `~/.interf/` (overridable via `INTERF_USER_HOME`). */
|
|
22
|
+
export type InterfHomeRoot = string & {
|
|
23
|
+
readonly __brand: "InterfHomeRoot";
|
|
24
|
+
};
|
|
25
|
+
/** Absolute path to a directory that IS a preparation's state root. */
|
|
26
|
+
export type PreparationDataDir = string & {
|
|
27
|
+
readonly __brand: "PreparationDataDir";
|
|
28
|
+
};
|
|
29
|
+
/** Absolute path to a Source Folder — the user's input. Read-only by default. */
|
|
30
|
+
export type SourceFolderPath = string & {
|
|
31
|
+
readonly __brand: "SourceFolderPath";
|
|
32
|
+
};
|
|
33
|
+
/** Absolute path to a portable-context output directory. */
|
|
34
|
+
export type PortableContextPath = string & {
|
|
35
|
+
readonly __brand: "PortableContextPath";
|
|
36
|
+
};
|
|
37
|
+
/** Preparation config filename. Kept as `interf.json` for back-compat with existing fixtures. */
|
|
38
|
+
export declare const PREPARATION_CONFIG_FILENAME = "interf.json";
|
|
39
|
+
/** The portable-context state directory name (lives at `<portable-context>/.interf/`). */
|
|
40
|
+
export declare const PORTABLE_CONTEXT_STATE_DIR = ".interf";
|
|
41
|
+
/** Method packages directory name (preparation drafts and user library). */
|
|
42
|
+
export declare const METHODS_DIR = "methods";
|
|
43
|
+
/** Service-internal directory inside a preparation data dir. */
|
|
44
|
+
export declare const SERVICE_DIR = ".service";
|
|
45
|
+
/** Service registry filename inside Interf Home. */
|
|
46
|
+
export declare const SERVICE_REGISTRY_FILENAME = "services.json";
|
|
47
|
+
/** Service jobs subdir. */
|
|
48
|
+
export declare const SERVICE_JOBS_DIR = "jobs";
|
|
49
|
+
/** Service action-proposals subdir. */
|
|
50
|
+
export declare const SERVICE_ACTION_PROPOSALS_DIR = "action-proposals";
|
|
51
|
+
/** Service action-plans subdir. */
|
|
52
|
+
export declare const SERVICE_ACTION_PLANS_DIR = "action-plans";
|
|
53
|
+
/** Tests directory inside a preparation data dir. */
|
|
54
|
+
export declare const PREPARATION_TESTS_DIR = "tests";
|
|
55
|
+
/** Tests-spec subdir. */
|
|
56
|
+
export declare const PREPARATION_TESTS_SPECS_DIR = "specs";
|
|
57
|
+
/** Per-portable-context tests directory. */
|
|
58
|
+
export declare const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
59
|
+
/** Per-portable-context runtime directory. */
|
|
60
|
+
export declare const PORTABLE_CONTEXT_RUNTIME_DIR = "runtime";
|
|
61
|
+
/** Per-portable-context method package directory. */
|
|
62
|
+
export declare const PORTABLE_CONTEXT_METHOD_DIR = "method";
|
|
63
|
+
/** Environment variable that overrides Interf Home for tests. */
|
|
64
|
+
export declare const INTERF_USER_HOME_ENV = "INTERF_USER_HOME";
|
|
65
|
+
export declare function asPreparationDataDir(path: string): PreparationDataDir;
|
|
66
|
+
/** `~/.interf/` (or `INTERF_USER_HOME` override). */
|
|
67
|
+
export declare function interfHomeRoot(): InterfHomeRoot;
|
|
68
|
+
/** `~/.interf/methods/` — user-level Method library root. */
|
|
69
|
+
export declare function userMethodsRoot(): string;
|
|
70
|
+
/** `~/.interf/methods/<id>/` — a specific user-library Method package. */
|
|
71
|
+
export declare function userMethodPackagePath(methodId: string): string;
|
|
72
|
+
/** `~/.interf/services.json` — central service registry. */
|
|
73
|
+
export declare function serviceRegistryPath(): string;
|
|
74
|
+
/** `~/.interf/<basename>/` — per-source-folder default preparation data dir. */
|
|
75
|
+
export declare function defaultPreparationDataDirForSourceBasename(basename: string): PreparationDataDir;
|
|
76
|
+
/** `<prep-data>/interf.json` — preparation config source of truth. */
|
|
77
|
+
export declare function preparationConfigPath(prepDataDir: PreparationDataDir): string;
|
|
78
|
+
/** `<prep-data>/methods/` — preparation-draft Method packages root. */
|
|
79
|
+
export declare function preparationMethodsRoot(prepDataDir: PreparationDataDir): string;
|
|
80
|
+
/** `<prep-data>/methods/<id>/` — a preparation-draft Method package. */
|
|
81
|
+
export declare function preparationMethodPackagePath(prepDataDir: PreparationDataDir, methodId: string): string;
|
|
82
|
+
/** `<prep-data>/<preparation-name>/` — a preparation's portable context root. */
|
|
83
|
+
export declare function preparationPortableContextPath(prepDataDir: PreparationDataDir, preparationName: string): PortableContextPath;
|
|
84
|
+
/** `<prep-data>/.service/` — service-owned scratch dir for jobs and proposals. */
|
|
85
|
+
export declare function preparationServiceRoot(prepDataDir: PreparationDataDir): string;
|
|
86
|
+
/** `<prep-data>/.service/jobs/`. */
|
|
87
|
+
export declare function preparationServiceJobsRoot(prepDataDir: PreparationDataDir): string;
|
|
88
|
+
/** `<prep-data>/.service/action-proposals/`. */
|
|
89
|
+
export declare function preparationServiceActionProposalsRoot(prepDataDir: PreparationDataDir): string;
|
|
90
|
+
/** `<prep-data>/.service/action-plans/`. */
|
|
91
|
+
export declare function preparationServiceActionPlansRoot(prepDataDir: PreparationDataDir): string;
|
|
92
|
+
/** `<prep-data>/tests/specs/` — saved readiness check specs. */
|
|
93
|
+
export declare function preparationTestsSpecsRoot(prepDataDir: PreparationDataDir): string;
|
|
94
|
+
/** `<portable-context>/.interf/`. */
|
|
95
|
+
export declare function portableContextStateRoot(portableContext: PortableContextPath): string;
|
|
96
|
+
/** `<portable-context>/.interf/interf.json` — runtime contract. */
|
|
97
|
+
export declare function portableContextConfigPath(portableContext: PortableContextPath): string;
|
|
98
|
+
/** `<portable-context>/.interf/method/` — active Method package inside portable context. */
|
|
99
|
+
export declare function portableContextMethodPath(portableContext: PortableContextPath): string;
|
|
100
|
+
/** `<portable-context>/.interf/runtime/`. */
|
|
101
|
+
export declare function portableContextRuntimeRoot(portableContext: PortableContextPath): string;
|
|
102
|
+
/** `<portable-context>/.interf/tests/`. */
|
|
103
|
+
export declare function portableContextTestsRoot(portableContext: PortableContextPath): string;
|
|
104
|
+
/** Test target labels: source-files (raw input) vs compiled (portable context). */
|
|
105
|
+
export type PreparationTestTargetLabel = "source-files" | "compiled";
|
|
106
|
+
/** `<prep-data>/<prep>/.interf/tests/`. */
|
|
107
|
+
export declare function preparationTestsRoot(prepDataDir: PreparationDataDir, preparationName: string): string;
|
|
108
|
+
/** `<prep-data>/<prep>/.interf/tests/<target>/runs/`. */
|
|
109
|
+
export declare function preparationTestRunsRoot(prepDataDir: PreparationDataDir, preparationName: string, target: PreparationTestTargetLabel): string;
|
|
110
|
+
/** `<prep-data>/<prep>/.interf/tests/latest.json`. */
|
|
111
|
+
export declare function preparationLatestReadinessRunPath(prepDataDir: PreparationDataDir, preparationName: string): string;
|
|
112
|
+
/** `<prep-data>/<prep>/.interf/tests/latest.md`. */
|
|
113
|
+
export declare function preparationLatestReadinessSummaryPath(prepDataDir: PreparationDataDir, preparationName: string): string;
|
|
114
|
+
/** Normalize a free-form string into a stable, kebab-cased id (≤80 chars). */
|
|
115
|
+
export declare function normalizePreparationTestRunId(input: string): string;
|
|
116
|
+
/** `<prep-data>/<prep>/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
|
|
117
|
+
export declare function preparationTestRunPath(prepDataDir: PreparationDataDir, preparationName: string, target: PreparationTestTargetLabel, generatedAt: string, runId: string, runSuffix?: string | null): string;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source of truth for every Interf path on disk.
|
|
3
|
+
*
|
|
4
|
+
* Two roots, one helper per named location. Code never string-concatenates
|
|
5
|
+
* path segments to product locations; it calls the helper here.
|
|
6
|
+
*
|
|
7
|
+
* Branded string types catch "passed a Source Folder where I expected a
|
|
8
|
+
* Preparation Data Dir" at the type-checker level instead of at runtime.
|
|
9
|
+
*
|
|
10
|
+
* Two roots:
|
|
11
|
+
* - **Interf Home** (`~/.interf/`): per-user, cross-preparation state. Holds
|
|
12
|
+
* the user-level Method library and the central service registry.
|
|
13
|
+
* - **Preparation Data Dir**: a directory that IS a preparation's state
|
|
14
|
+
* root. Holds `interf.json`, `methods/`, the portable context output, and
|
|
15
|
+
* the service-internal `.service/` scratch dir. The user's Source Folders
|
|
16
|
+
* are passed as `--source <path>` — they are inputs, not part of the
|
|
17
|
+
* preparation data dir.
|
|
18
|
+
*
|
|
19
|
+
* No nested `interf/` namespace. The data dir IS the state root, full stop.
|
|
20
|
+
*/
|
|
21
|
+
import { homedir } from "node:os";
|
|
22
|
+
import { join } from "node:path";
|
|
23
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
24
|
+
// Constants — every named segment lives here, nowhere else
|
|
25
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
26
|
+
/** Preparation config filename. Kept as `interf.json` for back-compat with existing fixtures. */
|
|
27
|
+
export const PREPARATION_CONFIG_FILENAME = "interf.json";
|
|
28
|
+
/** The portable-context state directory name (lives at `<portable-context>/.interf/`). */
|
|
29
|
+
export const PORTABLE_CONTEXT_STATE_DIR = ".interf";
|
|
30
|
+
/** Method packages directory name (preparation drafts and user library). */
|
|
31
|
+
export const METHODS_DIR = "methods";
|
|
32
|
+
/** Service-internal directory inside a preparation data dir. */
|
|
33
|
+
export const SERVICE_DIR = ".service";
|
|
34
|
+
/** Service registry filename inside Interf Home. */
|
|
35
|
+
export const SERVICE_REGISTRY_FILENAME = "services.json";
|
|
36
|
+
/** Service jobs subdir. */
|
|
37
|
+
export const SERVICE_JOBS_DIR = "jobs";
|
|
38
|
+
/** Service action-proposals subdir. */
|
|
39
|
+
export const SERVICE_ACTION_PROPOSALS_DIR = "action-proposals";
|
|
40
|
+
/** Service action-plans subdir. */
|
|
41
|
+
export const SERVICE_ACTION_PLANS_DIR = "action-plans";
|
|
42
|
+
/** Tests directory inside a preparation data dir. */
|
|
43
|
+
export const PREPARATION_TESTS_DIR = "tests";
|
|
44
|
+
/** Tests-spec subdir. */
|
|
45
|
+
export const PREPARATION_TESTS_SPECS_DIR = "specs";
|
|
46
|
+
/** Per-portable-context tests directory. */
|
|
47
|
+
export const PORTABLE_CONTEXT_TESTS_DIR = "tests";
|
|
48
|
+
/** Per-portable-context runtime directory. */
|
|
49
|
+
export const PORTABLE_CONTEXT_RUNTIME_DIR = "runtime";
|
|
50
|
+
/** Per-portable-context method package directory. */
|
|
51
|
+
export const PORTABLE_CONTEXT_METHOD_DIR = "method";
|
|
52
|
+
/** Environment variable that overrides Interf Home for tests. */
|
|
53
|
+
export const INTERF_USER_HOME_ENV = "INTERF_USER_HOME";
|
|
54
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
55
|
+
// Brand constructors — convert untyped strings at boundaries
|
|
56
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
57
|
+
export function asPreparationDataDir(path) {
|
|
58
|
+
return path;
|
|
59
|
+
}
|
|
60
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
61
|
+
// Interf Home (~/.interf/) paths
|
|
62
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
63
|
+
/** `~/.interf/` (or `INTERF_USER_HOME` override). */
|
|
64
|
+
export function interfHomeRoot() {
|
|
65
|
+
const override = process.env[INTERF_USER_HOME_ENV]?.trim();
|
|
66
|
+
if (override && override.length > 0)
|
|
67
|
+
return override;
|
|
68
|
+
return join(homedir(), ".interf");
|
|
69
|
+
}
|
|
70
|
+
/** `~/.interf/methods/` — user-level Method library root. */
|
|
71
|
+
export function userMethodsRoot() {
|
|
72
|
+
return join(interfHomeRoot(), METHODS_DIR);
|
|
73
|
+
}
|
|
74
|
+
/** `~/.interf/methods/<id>/` — a specific user-library Method package. */
|
|
75
|
+
export function userMethodPackagePath(methodId) {
|
|
76
|
+
return join(userMethodsRoot(), methodId);
|
|
77
|
+
}
|
|
78
|
+
/** `~/.interf/services.json` — central service registry. */
|
|
79
|
+
export function serviceRegistryPath() {
|
|
80
|
+
return join(interfHomeRoot(), SERVICE_REGISTRY_FILENAME);
|
|
81
|
+
}
|
|
82
|
+
/** `~/.interf/<basename>/` — per-source-folder default preparation data dir. */
|
|
83
|
+
export function defaultPreparationDataDirForSourceBasename(basename) {
|
|
84
|
+
return asPreparationDataDir(join(interfHomeRoot(), basename || "source-folder"));
|
|
85
|
+
}
|
|
86
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
87
|
+
// Preparation Data Dir paths (the data dir IS the state root)
|
|
88
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
89
|
+
/** `<prep-data>/interf.json` — preparation config source of truth. */
|
|
90
|
+
export function preparationConfigPath(prepDataDir) {
|
|
91
|
+
return join(prepDataDir, PREPARATION_CONFIG_FILENAME);
|
|
92
|
+
}
|
|
93
|
+
/** `<prep-data>/methods/` — preparation-draft Method packages root. */
|
|
94
|
+
export function preparationMethodsRoot(prepDataDir) {
|
|
95
|
+
return join(prepDataDir, METHODS_DIR);
|
|
96
|
+
}
|
|
97
|
+
/** `<prep-data>/methods/<id>/` — a preparation-draft Method package. */
|
|
98
|
+
export function preparationMethodPackagePath(prepDataDir, methodId) {
|
|
99
|
+
return join(preparationMethodsRoot(prepDataDir), methodId);
|
|
100
|
+
}
|
|
101
|
+
/** `<prep-data>/<preparation-name>/` — a preparation's portable context root. */
|
|
102
|
+
export function preparationPortableContextPath(prepDataDir, preparationName) {
|
|
103
|
+
return join(prepDataDir, preparationName);
|
|
104
|
+
}
|
|
105
|
+
/** `<prep-data>/.service/` — service-owned scratch dir for jobs and proposals. */
|
|
106
|
+
export function preparationServiceRoot(prepDataDir) {
|
|
107
|
+
return join(prepDataDir, SERVICE_DIR);
|
|
108
|
+
}
|
|
109
|
+
/** `<prep-data>/.service/jobs/`. */
|
|
110
|
+
export function preparationServiceJobsRoot(prepDataDir) {
|
|
111
|
+
return join(preparationServiceRoot(prepDataDir), SERVICE_JOBS_DIR);
|
|
112
|
+
}
|
|
113
|
+
/** `<prep-data>/.service/action-proposals/`. */
|
|
114
|
+
export function preparationServiceActionProposalsRoot(prepDataDir) {
|
|
115
|
+
return join(preparationServiceRoot(prepDataDir), SERVICE_ACTION_PROPOSALS_DIR);
|
|
116
|
+
}
|
|
117
|
+
/** `<prep-data>/.service/action-plans/`. */
|
|
118
|
+
export function preparationServiceActionPlansRoot(prepDataDir) {
|
|
119
|
+
return join(preparationServiceRoot(prepDataDir), SERVICE_ACTION_PLANS_DIR);
|
|
120
|
+
}
|
|
121
|
+
/** `<prep-data>/tests/specs/` — saved readiness check specs. */
|
|
122
|
+
export function preparationTestsSpecsRoot(prepDataDir) {
|
|
123
|
+
return join(prepDataDir, PREPARATION_TESTS_DIR, PREPARATION_TESTS_SPECS_DIR);
|
|
124
|
+
}
|
|
125
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
126
|
+
// Portable Context paths (one per Preparation, lives under prep data dir state)
|
|
127
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
128
|
+
/** `<portable-context>/.interf/`. */
|
|
129
|
+
export function portableContextStateRoot(portableContext) {
|
|
130
|
+
return join(portableContext, PORTABLE_CONTEXT_STATE_DIR);
|
|
131
|
+
}
|
|
132
|
+
/** `<portable-context>/.interf/interf.json` — runtime contract. */
|
|
133
|
+
export function portableContextConfigPath(portableContext) {
|
|
134
|
+
return join(portableContextStateRoot(portableContext), PREPARATION_CONFIG_FILENAME);
|
|
135
|
+
}
|
|
136
|
+
/** `<portable-context>/.interf/method/` — active Method package inside portable context. */
|
|
137
|
+
export function portableContextMethodPath(portableContext) {
|
|
138
|
+
return join(portableContextStateRoot(portableContext), PORTABLE_CONTEXT_METHOD_DIR);
|
|
139
|
+
}
|
|
140
|
+
/** `<portable-context>/.interf/runtime/`. */
|
|
141
|
+
export function portableContextRuntimeRoot(portableContext) {
|
|
142
|
+
return join(portableContextStateRoot(portableContext), PORTABLE_CONTEXT_RUNTIME_DIR);
|
|
143
|
+
}
|
|
144
|
+
/** `<portable-context>/.interf/tests/`. */
|
|
145
|
+
export function portableContextTestsRoot(portableContext) {
|
|
146
|
+
return join(portableContextStateRoot(portableContext), PORTABLE_CONTEXT_TESTS_DIR);
|
|
147
|
+
}
|
|
148
|
+
/** `<prep-data>/<prep>/.interf/tests/`. */
|
|
149
|
+
export function preparationTestsRoot(prepDataDir, preparationName) {
|
|
150
|
+
return portableContextTestsRoot(preparationPortableContextPath(prepDataDir, preparationName));
|
|
151
|
+
}
|
|
152
|
+
/** `<prep-data>/<prep>/.interf/tests/<target>/runs/`. */
|
|
153
|
+
export function preparationTestRunsRoot(prepDataDir, preparationName, target) {
|
|
154
|
+
return join(preparationTestsRoot(prepDataDir, preparationName), target, "runs");
|
|
155
|
+
}
|
|
156
|
+
/** `<prep-data>/<prep>/.interf/tests/latest.json`. */
|
|
157
|
+
export function preparationLatestReadinessRunPath(prepDataDir, preparationName) {
|
|
158
|
+
return join(preparationTestsRoot(prepDataDir, preparationName), "latest.json");
|
|
159
|
+
}
|
|
160
|
+
/** `<prep-data>/<prep>/.interf/tests/latest.md`. */
|
|
161
|
+
export function preparationLatestReadinessSummaryPath(prepDataDir, preparationName) {
|
|
162
|
+
return join(preparationTestsRoot(prepDataDir, preparationName), "latest.md");
|
|
163
|
+
}
|
|
164
|
+
/** Normalize a free-form string into a stable, kebab-cased id (≤80 chars). */
|
|
165
|
+
export function normalizePreparationTestRunId(input) {
|
|
166
|
+
return input
|
|
167
|
+
.toLowerCase()
|
|
168
|
+
.trim()
|
|
169
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
170
|
+
.replace(/^-+|-+$/g, "")
|
|
171
|
+
.slice(0, 80);
|
|
172
|
+
}
|
|
173
|
+
/** `<prep-data>/<prep>/.interf/tests/<target>/runs/<timestamp>-<run-id>[-<suffix>].json`. */
|
|
174
|
+
export function preparationTestRunPath(prepDataDir, preparationName, target, generatedAt, runId, runSuffix) {
|
|
175
|
+
const suffix = runSuffix ? `-${normalizePreparationTestRunId(runSuffix)}` : "";
|
|
176
|
+
return join(preparationTestRunsRoot(prepDataDir, preparationName, target), `${generatedAt.replace(/[:.]/g, "-")}-${runId}${suffix}.json`);
|
|
177
|
+
}
|
|
@@ -9,9 +9,82 @@ export declare const RuntimeTargetTypeSchema: z.ZodEnum<{
|
|
|
9
9
|
compiled: "compiled";
|
|
10
10
|
}>;
|
|
11
11
|
export declare const TestTargetTypeSchema: z.ZodEnum<{
|
|
12
|
+
"source-files": "source-files";
|
|
12
13
|
compiled: "compiled";
|
|
13
|
-
raw: "raw";
|
|
14
14
|
}>;
|
|
15
|
+
export declare const SourceKindSchema: z.ZodEnum<{
|
|
16
|
+
"local-folder": "local-folder";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const SourceSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
kind: z.ZodEnum<{
|
|
21
|
+
"local-folder": "local-folder";
|
|
22
|
+
}>;
|
|
23
|
+
locator: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const SourceFileSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
path: z.ZodString;
|
|
28
|
+
locator: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export declare const SourceFilesSchema: z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"interf-source-files">;
|
|
32
|
+
version: z.ZodLiteral<1>;
|
|
33
|
+
generated_at: z.ZodString;
|
|
34
|
+
source: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
kind: z.ZodEnum<{
|
|
37
|
+
"local-folder": "local-folder";
|
|
38
|
+
}>;
|
|
39
|
+
locator: z.ZodString;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
source_total: z.ZodNumber;
|
|
42
|
+
files: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
path: z.ZodString;
|
|
45
|
+
locator: z.ZodString;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
export declare const SourceSnapshotSchema: z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"interf-source-snapshot">;
|
|
50
|
+
version: z.ZodLiteral<1>;
|
|
51
|
+
snapshot_id: z.ZodString;
|
|
52
|
+
generated_at: z.ZodString;
|
|
53
|
+
run_id: z.ZodNullable<z.ZodString>;
|
|
54
|
+
source: z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
kind: z.ZodEnum<{
|
|
57
|
+
"local-folder": "local-folder";
|
|
58
|
+
}>;
|
|
59
|
+
locator: z.ZodString;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
source_total: z.ZodNumber;
|
|
62
|
+
files: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
locator: z.ZodString;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
export declare const StageInputSchema: z.ZodObject<{
|
|
69
|
+
source_file_id: z.ZodString;
|
|
70
|
+
path: z.ZodString;
|
|
71
|
+
locator: z.ZodString;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
export declare const StageInputsSchema: z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"interf-stage-inputs">;
|
|
75
|
+
version: z.ZodLiteral<1>;
|
|
76
|
+
generated_at: z.ZodString;
|
|
77
|
+
run_id: z.ZodNullable<z.ZodString>;
|
|
78
|
+
method: z.ZodString;
|
|
79
|
+
stage: z.ZodString;
|
|
80
|
+
source_snapshot_id: z.ZodString;
|
|
81
|
+
input_total: z.ZodNumber;
|
|
82
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
83
|
+
source_file_id: z.ZodString;
|
|
84
|
+
path: z.ZodString;
|
|
85
|
+
locator: z.ZodString;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
}, z.core.$strict>;
|
|
15
88
|
export declare const SourceCompiledMaxAttemptsSchema: z.ZodNumber;
|
|
16
89
|
export declare const SourceCompiledMaxLoopsSchema: z.ZodNumber;
|
|
17
90
|
export declare const ReadinessStatusSchema: z.ZodEnum<{
|
|
@@ -26,8 +99,8 @@ export declare const ReadinessStatusSchema: z.ZodEnum<{
|
|
|
26
99
|
failed: "failed";
|
|
27
100
|
}>;
|
|
28
101
|
export declare const ReadinessGateSchema: z.ZodEnum<{
|
|
29
|
-
"preparation-config": "preparation-config";
|
|
30
102
|
"portable-context": "portable-context";
|
|
103
|
+
"preparation-config": "preparation-config";
|
|
31
104
|
"compile-run": "compile-run";
|
|
32
105
|
"readiness-checks": "readiness-checks";
|
|
33
106
|
"source-baseline": "source-baseline";
|
|
@@ -36,8 +109,8 @@ export declare const ReadinessGateSchema: z.ZodEnum<{
|
|
|
36
109
|
}>;
|
|
37
110
|
export declare const ReadinessCheckSchema: z.ZodObject<{
|
|
38
111
|
gate: z.ZodEnum<{
|
|
39
|
-
"preparation-config": "preparation-config";
|
|
40
112
|
"portable-context": "portable-context";
|
|
113
|
+
"preparation-config": "preparation-config";
|
|
41
114
|
"compile-run": "compile-run";
|
|
42
115
|
"readiness-checks": "readiness-checks";
|
|
43
116
|
"source-baseline": "source-baseline";
|
|
@@ -93,8 +166,8 @@ export declare const ReadinessStateSchema: z.ZodObject<{
|
|
|
93
166
|
latest_test_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
167
|
compile: z.ZodNullable<z.ZodObject<{
|
|
95
168
|
gate: z.ZodEnum<{
|
|
96
|
-
"preparation-config": "preparation-config";
|
|
97
169
|
"portable-context": "portable-context";
|
|
170
|
+
"preparation-config": "preparation-config";
|
|
98
171
|
"compile-run": "compile-run";
|
|
99
172
|
"readiness-checks": "readiness-checks";
|
|
100
173
|
"source-baseline": "source-baseline";
|
|
@@ -142,8 +215,8 @@ export declare const ReadinessStateSchema: z.ZodObject<{
|
|
|
142
215
|
}, z.core.$strict>;
|
|
143
216
|
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
144
217
|
gate: z.ZodEnum<{
|
|
145
|
-
"preparation-config": "preparation-config";
|
|
146
218
|
"portable-context": "portable-context";
|
|
219
|
+
"preparation-config": "preparation-config";
|
|
147
220
|
"compile-run": "compile-run";
|
|
148
221
|
"readiness-checks": "readiness-checks";
|
|
149
222
|
"source-baseline": "source-baseline";
|
|
@@ -195,6 +268,13 @@ export type RuntimeStage = z.infer<typeof RuntimeStageSchema>;
|
|
|
195
268
|
export type RuntimeContractType = z.infer<typeof RuntimeContractTypeSchema>;
|
|
196
269
|
export type RuntimeTargetType = z.infer<typeof RuntimeTargetTypeSchema>;
|
|
197
270
|
export type TestTargetType = z.infer<typeof TestTargetTypeSchema>;
|
|
271
|
+
export type SourceKind = z.infer<typeof SourceKindSchema>;
|
|
272
|
+
export type Source = z.infer<typeof SourceSchema>;
|
|
273
|
+
export type SourceFile = z.infer<typeof SourceFileSchema>;
|
|
274
|
+
export type SourceFiles = z.infer<typeof SourceFilesSchema>;
|
|
275
|
+
export type SourceSnapshot = z.infer<typeof SourceSnapshotSchema>;
|
|
276
|
+
export type StageInput = z.infer<typeof StageInputSchema>;
|
|
277
|
+
export type StageInputs = z.infer<typeof StageInputsSchema>;
|
|
198
278
|
export type ReadinessStatus = z.infer<typeof ReadinessStatusSchema>;
|
|
199
279
|
export type ReadinessGate = z.infer<typeof ReadinessGateSchema>;
|
|
200
280
|
export type ReadinessCheck = z.infer<typeof ReadinessCheckSchema>;
|
|
@@ -10,7 +10,52 @@ export const MethodIdSchema = z.string().regex(InterfIdPattern);
|
|
|
10
10
|
export const RuntimeStageSchema = z.string().regex(InterfIdPattern);
|
|
11
11
|
export const RuntimeContractTypeSchema = z.string().regex(InterfIdPattern);
|
|
12
12
|
export const RuntimeTargetTypeSchema = z.enum(["compiled"]);
|
|
13
|
-
export const TestTargetTypeSchema = z.enum(["compiled", "
|
|
13
|
+
export const TestTargetTypeSchema = z.enum(["compiled", "source-files"]);
|
|
14
|
+
export const SourceKindSchema = z.enum(["local-folder"]);
|
|
15
|
+
export const SourceSchema = z.object({
|
|
16
|
+
id: z.string().regex(InterfIdPattern),
|
|
17
|
+
kind: SourceKindSchema,
|
|
18
|
+
locator: z.string().min(1),
|
|
19
|
+
}).strict();
|
|
20
|
+
export const SourceFileSchema = z.object({
|
|
21
|
+
id: z.string().min(1),
|
|
22
|
+
path: z.string().min(1),
|
|
23
|
+
locator: z.string().min(1),
|
|
24
|
+
}).strict();
|
|
25
|
+
export const SourceFilesSchema = z.object({
|
|
26
|
+
kind: z.literal("interf-source-files"),
|
|
27
|
+
version: z.literal(1),
|
|
28
|
+
generated_at: z.string().min(1),
|
|
29
|
+
source: SourceSchema,
|
|
30
|
+
source_total: z.number().int().min(0),
|
|
31
|
+
files: z.array(SourceFileSchema),
|
|
32
|
+
}).strict();
|
|
33
|
+
export const SourceSnapshotSchema = z.object({
|
|
34
|
+
kind: z.literal("interf-source-snapshot"),
|
|
35
|
+
version: z.literal(1),
|
|
36
|
+
snapshot_id: z.string().min(1),
|
|
37
|
+
generated_at: z.string().min(1),
|
|
38
|
+
run_id: z.string().min(1).nullable(),
|
|
39
|
+
source: SourceSchema,
|
|
40
|
+
source_total: z.number().int().min(0),
|
|
41
|
+
files: z.array(SourceFileSchema),
|
|
42
|
+
}).strict();
|
|
43
|
+
export const StageInputSchema = z.object({
|
|
44
|
+
source_file_id: z.string().min(1),
|
|
45
|
+
path: z.string().min(1),
|
|
46
|
+
locator: z.string().min(1),
|
|
47
|
+
}).strict();
|
|
48
|
+
export const StageInputsSchema = z.object({
|
|
49
|
+
kind: z.literal("interf-stage-inputs"),
|
|
50
|
+
version: z.literal(1),
|
|
51
|
+
generated_at: z.string().min(1),
|
|
52
|
+
run_id: z.string().min(1).nullable(),
|
|
53
|
+
method: MethodIdSchema,
|
|
54
|
+
stage: RuntimeStageSchema,
|
|
55
|
+
source_snapshot_id: z.string().min(1),
|
|
56
|
+
input_total: z.number().int().min(0),
|
|
57
|
+
inputs: z.array(StageInputSchema),
|
|
58
|
+
}).strict();
|
|
14
59
|
export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
|
|
15
60
|
export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
|
|
16
61
|
export const ReadinessStatusSchema = z.enum([
|