@interf/compiler 0.3.4 → 0.4.1
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 +128 -149
- package/builtin-workflows/interf/README.md +19 -0
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +28 -0
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +18 -0
- package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -0
- package/builtin-workflows/interf/improve/SKILL.md +18 -0
- package/builtin-workflows/interf/use/query/SKILL.md +28 -0
- package/builtin-workflows/interf/workflow.json +120 -0
- package/builtin-workflows/interf/workspace.schema.json +75 -0
- package/dist/bin.d.ts +0 -1
- package/dist/bin.js +0 -1
- package/dist/commands/compile-controller.d.ts +14 -0
- package/dist/commands/compile-controller.js +409 -0
- package/dist/commands/compile.d.ts +8 -9
- package/dist/commands/compile.js +151 -153
- package/dist/commands/create-workflow-wizard.d.ts +4 -2
- package/dist/commands/create-workflow-wizard.js +33 -31
- package/dist/commands/create.d.ts +0 -1
- package/dist/commands/create.js +15 -11
- package/dist/commands/default.d.ts +0 -1
- package/dist/commands/default.js +0 -1
- package/dist/commands/doctor.d.ts +0 -1
- package/dist/commands/doctor.js +1 -16
- package/dist/commands/executor-flow.d.ts +0 -1
- package/dist/commands/executor-flow.js +0 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +71 -14
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.js +0 -1
- package/dist/commands/reset.d.ts +0 -1
- package/dist/commands/reset.js +0 -1
- package/dist/commands/source-config-wizard.d.ts +28 -7
- package/dist/commands/source-config-wizard.js +159 -63
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.js +0 -1
- package/dist/commands/test-flow.d.ts +20 -10
- package/dist/commands/test-flow.js +89 -23
- package/dist/commands/test.d.ts +0 -1
- package/dist/commands/test.js +36 -72
- package/dist/commands/verify.d.ts +0 -1
- package/dist/commands/verify.js +0 -1
- package/dist/commands/workspace-flow.d.ts +3 -3
- package/dist/commands/workspace-flow.js +30 -12
- package/dist/index.d.ts +5 -6
- package/dist/index.js +3 -4
- package/dist/lib/agent-args.d.ts +0 -1
- package/dist/lib/agent-args.js +0 -1
- package/dist/lib/agent-constants.d.ts +0 -1
- package/dist/lib/agent-constants.js +0 -1
- package/dist/lib/agent-detection.d.ts +0 -1
- package/dist/lib/agent-detection.js +0 -1
- package/dist/lib/agent-execution.d.ts +0 -1
- package/dist/lib/agent-execution.js +47 -12
- package/dist/lib/agent-logs.d.ts +0 -1
- package/dist/lib/agent-logs.js +0 -1
- package/dist/lib/agent-preflight.d.ts +0 -1
- package/dist/lib/agent-preflight.js +1 -2
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +30 -3
- package/dist/lib/agent-shells.js +517 -54
- package/dist/lib/agent-status.d.ts +0 -1
- package/dist/lib/agent-status.js +0 -1
- package/dist/lib/agent-types.d.ts +0 -1
- package/dist/lib/agent-types.js +0 -1
- package/dist/lib/agents.d.ts +0 -9
- package/dist/lib/agents.js +0 -9
- package/dist/lib/chart-guidance.d.ts +1 -0
- package/dist/lib/chart-guidance.js +8 -0
- package/dist/lib/config.d.ts +0 -3
- package/dist/lib/config.js +0 -5
- package/dist/lib/discovery.d.ts +0 -1
- package/dist/lib/discovery.js +0 -1
- package/dist/lib/execution-profile.d.ts +0 -1
- package/dist/lib/execution-profile.js +0 -1
- package/dist/lib/executors.d.ts +0 -1
- package/dist/lib/executors.js +0 -1
- package/dist/lib/filesystem.d.ts +0 -1
- package/dist/lib/filesystem.js +0 -1
- package/dist/lib/interf-bootstrap.d.ts +0 -1
- package/dist/lib/interf-bootstrap.js +6 -2
- package/dist/lib/interf-detect.d.ts +2 -2
- package/dist/lib/interf-detect.js +25 -8
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +54 -21
- package/dist/lib/interf-workflow-package.d.ts +18 -1
- package/dist/lib/interf-workflow-package.js +164 -23
- package/dist/lib/interf.d.ts +1 -2
- package/dist/lib/interf.js +1 -2
- package/dist/lib/local-workflows.d.ts +10 -5
- package/dist/lib/local-workflows.js +208 -97
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/obsidian.d.ts +0 -1
- package/dist/lib/obsidian.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/registry.d.ts +0 -1
- package/dist/lib/registry.js +0 -1
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +1 -2
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +14 -8
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +5 -10
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +8 -23
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +7 -3
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +4 -5
- package/dist/lib/runtime-types.d.ts +0 -1
- package/dist/lib/runtime-types.js +0 -1
- package/dist/lib/runtime.d.ts +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/schema.d.ts +356 -51
- package/dist/lib/schema.js +189 -54
- package/dist/lib/source-config.d.ts +17 -8
- package/dist/lib/source-config.js +125 -11
- package/dist/lib/state-artifacts.d.ts +0 -1
- package/dist/lib/state-artifacts.js +0 -1
- package/dist/lib/state-health.d.ts +0 -1
- package/dist/lib/state-health.js +2 -3
- package/dist/lib/state-io.d.ts +1 -1
- package/dist/lib/state-io.js +9 -10
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +5 -11
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +7 -8
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/summarize-plan.d.ts +0 -1
- package/dist/lib/summarize-plan.js +3 -3
- package/dist/lib/test-execution.d.ts +14 -0
- package/dist/lib/{benchmark-execution.js → test-execution.js} +122 -120
- package/dist/lib/test-matrices.d.ts +90 -0
- package/dist/lib/test-matrices.js +96 -0
- package/dist/lib/test-paths.d.ts +12 -0
- package/dist/lib/test-paths.js +44 -0
- package/dist/lib/test-profile-presets.d.ts +57 -0
- package/dist/lib/test-profile-presets.js +50 -0
- package/dist/lib/test-sandbox.d.ts +11 -0
- package/dist/lib/{benchmark-sandbox.js → test-sandbox.js} +18 -13
- package/dist/lib/test-specs.d.ts +7 -0
- package/dist/lib/test-specs.js +114 -0
- package/dist/lib/test-targets.d.ts +5 -0
- package/dist/lib/test-targets.js +38 -0
- package/dist/lib/test-types.d.ts +17 -0
- package/dist/lib/test-types.js +1 -0
- package/dist/lib/test.d.ts +4 -0
- package/dist/lib/test.js +3 -0
- package/dist/lib/user-config.d.ts +0 -1
- package/dist/lib/user-config.js +0 -1
- package/dist/lib/util.d.ts +0 -2
- package/dist/lib/util.js +0 -2
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate-workspace.d.ts +0 -1
- package/dist/lib/validate-workspace.js +34 -25
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +55 -9
- package/dist/lib/workflow-abi.d.ts +138 -0
- package/dist/lib/workflow-abi.js +181 -0
- package/dist/lib/workflow-definitions.d.ts +26 -5
- package/dist/lib/workflow-definitions.js +105 -168
- package/dist/lib/workflow-helpers.d.ts +1 -2
- package/dist/lib/workflow-helpers.js +32 -21
- package/dist/lib/workflow-improvement.d.ts +22 -0
- package/dist/lib/workflow-improvement.js +396 -0
- package/dist/lib/workflow-review-paths.d.ts +10 -0
- package/dist/lib/workflow-review-paths.js +27 -0
- package/dist/lib/workflow-stage-runner.d.ts +1 -1
- package/dist/lib/workflow-stage-runner.js +4 -1
- package/dist/lib/workflows.d.ts +1 -2
- package/dist/lib/workflows.js +1 -2
- package/dist/lib/workspace-compile.d.ts +0 -1
- package/dist/lib/workspace-compile.js +146 -109
- package/dist/lib/workspace-home.d.ts +5 -0
- package/dist/lib/workspace-home.js +32 -0
- package/dist/lib/workspace-layout.d.ts +2 -0
- package/dist/lib/workspace-layout.js +60 -0
- package/dist/lib/workspace-paths.d.ts +41 -0
- package/dist/lib/workspace-paths.js +107 -0
- package/dist/lib/workspace-raw.d.ts +20 -2
- package/dist/lib/workspace-raw.js +6 -8
- package/dist/lib/workspace-reset.d.ts +0 -1
- package/dist/lib/workspace-reset.js +27 -5
- package/dist/lib/workspace-schema.d.ts +1 -10
- package/dist/lib/workspace-schema.js +16 -74
- package/package.json +16 -15
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/create-workflow-wizard.d.ts.map +0 -1
- package/dist/commands/create-workflow-wizard.js.map +0 -1
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/default.d.ts.map +0 -1
- package/dist/commands/default.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/executor-flow.d.ts.map +0 -1
- package/dist/commands/executor-flow.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/reset.d.ts.map +0 -1
- package/dist/commands/reset.js.map +0 -1
- package/dist/commands/source-config-wizard.d.ts.map +0 -1
- package/dist/commands/source-config-wizard.js.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/test-flow.d.ts.map +0 -1
- package/dist/commands/test-flow.js.map +0 -1
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js.map +0 -1
- package/dist/commands/workspace-flow.d.ts.map +0 -1
- package/dist/commands/workspace-flow.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-args.d.ts.map +0 -1
- package/dist/lib/agent-args.js.map +0 -1
- package/dist/lib/agent-constants.d.ts.map +0 -1
- package/dist/lib/agent-constants.js.map +0 -1
- package/dist/lib/agent-detection.d.ts.map +0 -1
- package/dist/lib/agent-detection.js.map +0 -1
- package/dist/lib/agent-execution.d.ts.map +0 -1
- package/dist/lib/agent-execution.js.map +0 -1
- package/dist/lib/agent-logs.d.ts.map +0 -1
- package/dist/lib/agent-logs.js.map +0 -1
- package/dist/lib/agent-preflight.d.ts.map +0 -1
- package/dist/lib/agent-preflight.js.map +0 -1
- package/dist/lib/agent-render.d.ts.map +0 -1
- package/dist/lib/agent-render.js.map +0 -1
- package/dist/lib/agent-shells.d.ts.map +0 -1
- package/dist/lib/agent-shells.js.map +0 -1
- package/dist/lib/agent-skills.d.ts +0 -21
- package/dist/lib/agent-skills.d.ts.map +0 -1
- package/dist/lib/agent-skills.js +0 -215
- package/dist/lib/agent-skills.js.map +0 -1
- package/dist/lib/agent-status.d.ts.map +0 -1
- package/dist/lib/agent-status.js.map +0 -1
- package/dist/lib/agent-types.d.ts.map +0 -1
- package/dist/lib/agent-types.js.map +0 -1
- package/dist/lib/agents.d.ts.map +0 -1
- package/dist/lib/agents.js.map +0 -1
- package/dist/lib/benchmark-execution.d.ts +0 -13
- package/dist/lib/benchmark-execution.d.ts.map +0 -1
- package/dist/lib/benchmark-execution.js.map +0 -1
- package/dist/lib/benchmark-paths.d.ts +0 -13
- package/dist/lib/benchmark-paths.d.ts.map +0 -1
- package/dist/lib/benchmark-paths.js +0 -44
- package/dist/lib/benchmark-paths.js.map +0 -1
- package/dist/lib/benchmark-sandbox.d.ts +0 -12
- package/dist/lib/benchmark-sandbox.d.ts.map +0 -1
- package/dist/lib/benchmark-sandbox.js.map +0 -1
- package/dist/lib/benchmark-specs.d.ts +0 -8
- package/dist/lib/benchmark-specs.d.ts.map +0 -1
- package/dist/lib/benchmark-specs.js +0 -115
- package/dist/lib/benchmark-specs.js.map +0 -1
- package/dist/lib/benchmark-targets.d.ts +0 -5
- package/dist/lib/benchmark-targets.d.ts.map +0 -1
- package/dist/lib/benchmark-targets.js +0 -38
- package/dist/lib/benchmark-targets.js.map +0 -1
- package/dist/lib/benchmark-types.d.ts +0 -18
- package/dist/lib/benchmark-types.d.ts.map +0 -1
- package/dist/lib/benchmark-types.js +0 -2
- package/dist/lib/benchmark-types.js.map +0 -1
- package/dist/lib/benchmark.d.ts +0 -5
- package/dist/lib/benchmark.d.ts.map +0 -1
- package/dist/lib/benchmark.js +0 -4
- package/dist/lib/benchmark.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/discovery.d.ts.map +0 -1
- package/dist/lib/discovery.js.map +0 -1
- package/dist/lib/eval-packs.d.ts +0 -158
- package/dist/lib/eval-packs.d.ts.map +0 -1
- package/dist/lib/eval-packs.js +0 -149
- package/dist/lib/eval-packs.js.map +0 -1
- package/dist/lib/execution-profile.d.ts.map +0 -1
- package/dist/lib/execution-profile.js.map +0 -1
- package/dist/lib/executors.d.ts.map +0 -1
- package/dist/lib/executors.js.map +0 -1
- package/dist/lib/filesystem.d.ts.map +0 -1
- package/dist/lib/filesystem.js.map +0 -1
- package/dist/lib/interf-bootstrap.d.ts.map +0 -1
- package/dist/lib/interf-bootstrap.js.map +0 -1
- package/dist/lib/interf-detect.d.ts.map +0 -1
- package/dist/lib/interf-detect.js.map +0 -1
- package/dist/lib/interf-scaffold.d.ts.map +0 -1
- package/dist/lib/interf-scaffold.js.map +0 -1
- package/dist/lib/interf-workflow-package.d.ts.map +0 -1
- package/dist/lib/interf-workflow-package.js.map +0 -1
- package/dist/lib/interf.d.ts.map +0 -1
- package/dist/lib/interf.js.map +0 -1
- package/dist/lib/local-workflows.d.ts.map +0 -1
- package/dist/lib/local-workflows.js.map +0 -1
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/logger.js.map +0 -1
- package/dist/lib/obsidian.d.ts.map +0 -1
- package/dist/lib/obsidian.js.map +0 -1
- package/dist/lib/parse.d.ts.map +0 -1
- package/dist/lib/parse.js.map +0 -1
- package/dist/lib/registry.d.ts.map +0 -1
- package/dist/lib/registry.js.map +0 -1
- package/dist/lib/runtime-acceptance.d.ts.map +0 -1
- package/dist/lib/runtime-acceptance.js.map +0 -1
- package/dist/lib/runtime-contracts.d.ts.map +0 -1
- package/dist/lib/runtime-contracts.js.map +0 -1
- package/dist/lib/runtime-paths.d.ts.map +0 -1
- package/dist/lib/runtime-paths.js.map +0 -1
- package/dist/lib/runtime-prompt.d.ts.map +0 -1
- package/dist/lib/runtime-prompt.js.map +0 -1
- package/dist/lib/runtime-reconcile.d.ts.map +0 -1
- package/dist/lib/runtime-reconcile.js.map +0 -1
- package/dist/lib/runtime-runs.d.ts.map +0 -1
- package/dist/lib/runtime-runs.js.map +0 -1
- package/dist/lib/runtime-types.d.ts.map +0 -1
- package/dist/lib/runtime-types.js.map +0 -1
- package/dist/lib/runtime.d.ts.map +0 -1
- package/dist/lib/runtime.js.map +0 -1
- package/dist/lib/schema.d.ts.map +0 -1
- package/dist/lib/schema.js.map +0 -1
- package/dist/lib/source-config.d.ts.map +0 -1
- package/dist/lib/source-config.js.map +0 -1
- package/dist/lib/state-artifacts.d.ts.map +0 -1
- package/dist/lib/state-artifacts.js.map +0 -1
- package/dist/lib/state-health.d.ts.map +0 -1
- package/dist/lib/state-health.js.map +0 -1
- package/dist/lib/state-io.d.ts.map +0 -1
- package/dist/lib/state-io.js.map +0 -1
- package/dist/lib/state-paths.d.ts.map +0 -1
- package/dist/lib/state-paths.js.map +0 -1
- package/dist/lib/state-view.d.ts.map +0 -1
- package/dist/lib/state-view.js.map +0 -1
- package/dist/lib/state.d.ts.map +0 -1
- package/dist/lib/state.js.map +0 -1
- package/dist/lib/summarize-plan.d.ts.map +0 -1
- package/dist/lib/summarize-plan.js.map +0 -1
- package/dist/lib/user-config.d.ts.map +0 -1
- package/dist/lib/user-config.js.map +0 -1
- package/dist/lib/util.d.ts.map +0 -1
- package/dist/lib/util.js.map +0 -1
- package/dist/lib/validate-helpers.d.ts.map +0 -1
- package/dist/lib/validate-helpers.js.map +0 -1
- package/dist/lib/validate-workspace.d.ts.map +0 -1
- package/dist/lib/validate-workspace.js.map +0 -1
- package/dist/lib/validate.d.ts.map +0 -1
- package/dist/lib/validate.js.map +0 -1
- package/dist/lib/workflow-definitions.d.ts.map +0 -1
- package/dist/lib/workflow-definitions.js.map +0 -1
- package/dist/lib/workflow-helpers.d.ts.map +0 -1
- package/dist/lib/workflow-helpers.js.map +0 -1
- package/dist/lib/workflow-stage-runner.d.ts.map +0 -1
- package/dist/lib/workflow-stage-runner.js.map +0 -1
- package/dist/lib/workflow-starter-docs.d.ts +0 -7
- package/dist/lib/workflow-starter-docs.d.ts.map +0 -1
- package/dist/lib/workflow-starter-docs.js +0 -3
- package/dist/lib/workflow-starter-docs.js.map +0 -1
- package/dist/lib/workflows.d.ts.map +0 -1
- package/dist/lib/workflows.js.map +0 -1
- package/dist/lib/workspace-compile.d.ts.map +0 -1
- package/dist/lib/workspace-compile.js.map +0 -1
- package/dist/lib/workspace-docs.d.ts +0 -3
- package/dist/lib/workspace-docs.d.ts.map +0 -1
- package/dist/lib/workspace-docs.js +0 -82
- package/dist/lib/workspace-docs.js.map +0 -1
- package/dist/lib/workspace-raw.d.ts.map +0 -1
- package/dist/lib/workspace-raw.js.map +0 -1
- package/dist/lib/workspace-reset.d.ts.map +0 -1
- package/dist/lib/workspace-reset.js.map +0 -1
- package/dist/lib/workspace-schema.d.ts.map +0 -1
- package/dist/lib/workspace-schema.js.map +0 -1
- package/skills/benchmark/SKILL.md +0 -122
- package/skills/workflow/create/SKILL.md +0 -141
- package/skills/workspace/shape/SKILL.md +0 -15
- package/skills/workspace/structure/SKILL.md +0 -15
- package/skills/workspace/summarize/SKILL.md +0 -15
- package/templates/workspace/README.md +0 -24
- package/templates/workspace/interfignore +0 -2
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { createRawTestTarget, createWorkspaceTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "../lib/test.js";
|
|
5
|
+
import { resolveWorkspaceRawPath, syncWorkspaceRawSnapshot } from "../lib/interf.js";
|
|
6
|
+
import { buildTestSpecFromWorkspaceConfig } from "../lib/source-config.js";
|
|
7
|
+
import { testRootForWorkspace, testRunsRootForWorkspace, } from "../lib/workspace-paths.js";
|
|
4
8
|
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
5
|
-
import { findBuiltWorkspacePath } from "./workspace-flow.js";
|
|
9
|
+
import { ensureWorkspaceFromConfig, findBuiltWorkspacePath } from "./workspace-flow.js";
|
|
6
10
|
export function questionPassRate(outcome) {
|
|
7
11
|
return outcome.result.totalCases > 0
|
|
8
12
|
? Math.round((outcome.result.passedCases / outcome.result.totalCases) * 100)
|
|
9
13
|
: 0;
|
|
10
14
|
}
|
|
15
|
+
function summarizeSavedTestOutcome(label, outcome) {
|
|
16
|
+
return {
|
|
17
|
+
label,
|
|
18
|
+
run_path: outcome.runPath,
|
|
19
|
+
ok: outcome.result.ok,
|
|
20
|
+
passed_cases: outcome.result.passedCases,
|
|
21
|
+
total_cases: outcome.result.totalCases,
|
|
22
|
+
passed_checks: outcome.result.passedChecks,
|
|
23
|
+
total_checks: outcome.result.totalChecks,
|
|
24
|
+
target: outcome.target,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function normalizeTestRunId(input) {
|
|
28
|
+
return input
|
|
29
|
+
.toLowerCase()
|
|
30
|
+
.trim()
|
|
31
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
32
|
+
.replace(/^-+|-+$/g, "")
|
|
33
|
+
.slice(0, 80);
|
|
34
|
+
}
|
|
11
35
|
function specNeedsExecutor(spec) {
|
|
12
36
|
return spec.cases.some((entry) => !entry.file || Boolean(entry.answer));
|
|
13
37
|
}
|
|
14
|
-
async function resolveExecutorForSpec(spec, executionProfile) {
|
|
38
|
+
async function resolveExecutorForSpec(spec, executor, executionProfile) {
|
|
15
39
|
if (!specNeedsExecutor(spec)) {
|
|
16
40
|
return { executor: null, error: undefined };
|
|
17
41
|
}
|
|
42
|
+
if (executor) {
|
|
43
|
+
return { executor, error: undefined };
|
|
44
|
+
}
|
|
18
45
|
return resolveOrConfigureLocalExecutor({
|
|
19
46
|
preflight: true,
|
|
20
47
|
executionProfile,
|
|
@@ -44,7 +71,7 @@ export function printSavedTestOutcome(prefix, outcome) {
|
|
|
44
71
|
}
|
|
45
72
|
console.log(chalk.dim(` Saved run: ${outcome.runPath}`));
|
|
46
73
|
}
|
|
47
|
-
export function printSavedTestComparison(rawOutcome, workspaceOutcome) {
|
|
74
|
+
export function printSavedTestComparison(rawOutcome, workspaceOutcome, comparisonRunPath) {
|
|
48
75
|
if (!rawOutcome && !workspaceOutcome)
|
|
49
76
|
return;
|
|
50
77
|
console.log();
|
|
@@ -65,17 +92,52 @@ export function printSavedTestComparison(rawOutcome, workspaceOutcome) {
|
|
|
65
92
|
console.log();
|
|
66
93
|
console.log(color(` Truth-check pass rate ${direction} from ${rawQuestions}% to ${workspaceQuestions}%.`));
|
|
67
94
|
}
|
|
95
|
+
if (comparisonRunPath) {
|
|
96
|
+
console.log();
|
|
97
|
+
console.log(chalk.dim(` Saved comparison: ${comparisonRunPath}`));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export function saveTestComparisonRun(options) {
|
|
101
|
+
const generatedAt = new Date().toISOString();
|
|
102
|
+
const runRoot = join(testRunsRootForWorkspace(options.workspacePath), `${generatedAt.replace(/[:.]/g, "-")}-${normalizeTestRunId(options.workspaceName)}`);
|
|
103
|
+
mkdirSync(runRoot, { recursive: true });
|
|
104
|
+
const rawPassRate = options.rawOutcome ? questionPassRate(options.rawOutcome) : null;
|
|
105
|
+
const workspacePassRate = options.workspaceOutcome ? questionPassRate(options.workspaceOutcome) : null;
|
|
106
|
+
const payload = {
|
|
107
|
+
kind: "interf-test-run",
|
|
108
|
+
version: 1,
|
|
109
|
+
generated_at: generatedAt,
|
|
110
|
+
mode: options.mode,
|
|
111
|
+
source_path: options.sourcePath,
|
|
112
|
+
workspace: {
|
|
113
|
+
name: options.workspaceName,
|
|
114
|
+
path: options.workspacePath,
|
|
115
|
+
},
|
|
116
|
+
raw: options.rawOutcome ? summarizeSavedTestOutcome("Raw files", options.rawOutcome) : null,
|
|
117
|
+
compiled_workspace: options.workspaceOutcome
|
|
118
|
+
? summarizeSavedTestOutcome("Compiled workspace", options.workspaceOutcome)
|
|
119
|
+
: null,
|
|
120
|
+
summary: {
|
|
121
|
+
raw_pass_rate: rawPassRate,
|
|
122
|
+
compiled_pass_rate: workspacePassRate,
|
|
123
|
+
pass_rate_delta: rawPassRate !== null && workspacePassRate !== null ? workspacePassRate - rawPassRate : null,
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
const runPath = join(runRoot, "run.json");
|
|
127
|
+
writeFileSync(runPath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
128
|
+
writeFileSync(join(testRootForWorkspace(options.workspacePath), "latest.json"), `${JSON.stringify(payload, null, 2)}\n`);
|
|
129
|
+
return runPath;
|
|
68
130
|
}
|
|
69
131
|
export async function runSavedRawTest(options) {
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
132
|
+
const workspacePath = options.workspacePath ?? ensureWorkspaceFromConfig(options.sourcePath, options.workspaceConfig);
|
|
133
|
+
const spec = buildTestSpecFromWorkspaceConfig({
|
|
134
|
+
workspacePath,
|
|
73
135
|
targetType: "raw",
|
|
74
136
|
});
|
|
75
137
|
if (!spec) {
|
|
76
138
|
return null;
|
|
77
139
|
}
|
|
78
|
-
const { executor, error } = await resolveExecutorForSpec(spec, options.executionProfile);
|
|
140
|
+
const { executor, error } = await resolveExecutorForSpec(spec, options.executor, options.executionProfile);
|
|
79
141
|
if (!executor && !error) {
|
|
80
142
|
return null;
|
|
81
143
|
}
|
|
@@ -84,38 +146,42 @@ export async function runSavedRawTest(options) {
|
|
|
84
146
|
console.log(chalk.red(error));
|
|
85
147
|
return null;
|
|
86
148
|
}
|
|
87
|
-
|
|
88
|
-
const
|
|
149
|
+
syncWorkspaceRawSnapshot(workspacePath, options.sourcePath);
|
|
150
|
+
const target = createRawTestTarget(resolveWorkspaceRawPath(workspacePath));
|
|
151
|
+
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
89
152
|
executor,
|
|
90
153
|
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
154
|
+
artifactRootPath: workspacePath,
|
|
91
155
|
});
|
|
92
156
|
const result = run.results[0];
|
|
93
157
|
if (!result)
|
|
94
158
|
return null;
|
|
95
159
|
return {
|
|
96
|
-
runPath:
|
|
160
|
+
runPath: saveTargetTestRun(workspacePath, run),
|
|
97
161
|
target,
|
|
98
162
|
result,
|
|
99
163
|
};
|
|
100
164
|
}
|
|
101
165
|
export async function runSavedWorkspaceTest(options) {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
166
|
+
const workspacePath = options.workspacePath ?? findBuiltWorkspacePath(options.sourcePath, options.workspaceConfig.name);
|
|
167
|
+
if (!workspacePath) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
const spec = buildTestSpecFromWorkspaceConfig({
|
|
171
|
+
workspacePath,
|
|
105
172
|
targetType: "workspace",
|
|
106
173
|
});
|
|
107
174
|
if (!spec) {
|
|
108
175
|
return null;
|
|
109
176
|
}
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
177
|
+
const target = createWorkspaceTestTarget(workspacePath, options.workspaceConfig.name, options.workspaceConfig.workflow ?? "interf");
|
|
178
|
+
if (!target) {
|
|
112
179
|
return null;
|
|
113
180
|
}
|
|
114
|
-
|
|
115
|
-
if (!target) {
|
|
181
|
+
if (!target.eligible) {
|
|
116
182
|
return null;
|
|
117
183
|
}
|
|
118
|
-
const { executor, error } = await resolveExecutorForSpec(spec, options.executionProfile);
|
|
184
|
+
const { executor, error } = await resolveExecutorForSpec(spec, options.executor, options.executionProfile);
|
|
119
185
|
if (!executor && !error) {
|
|
120
186
|
return null;
|
|
121
187
|
}
|
|
@@ -124,17 +190,17 @@ export async function runSavedWorkspaceTest(options) {
|
|
|
124
190
|
console.log(chalk.red(error));
|
|
125
191
|
return null;
|
|
126
192
|
}
|
|
127
|
-
const run = await
|
|
193
|
+
const run = await runTargetTestsAuto(options.sourcePath, spec, [target], {
|
|
128
194
|
executor,
|
|
129
195
|
preserveSandboxes: options.preserveSandboxes ?? "on-failure",
|
|
196
|
+
artifactRootPath: workspacePath,
|
|
130
197
|
});
|
|
131
198
|
const result = run.results[0];
|
|
132
199
|
if (!result)
|
|
133
200
|
return null;
|
|
134
201
|
return {
|
|
135
|
-
runPath:
|
|
202
|
+
runPath: saveTargetTestRun(workspacePath, run),
|
|
136
203
|
target,
|
|
137
204
|
result,
|
|
138
205
|
};
|
|
139
206
|
}
|
|
140
|
-
//# sourceMappingURL=test-flow.js.map
|
package/dist/commands/test.d.ts
CHANGED
package/dist/commands/test.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import * as p from "@clack/prompts";
|
|
3
2
|
import { detectInterf, resolveSourceControlPath, } from "../lib/interf.js";
|
|
4
|
-
import {
|
|
3
|
+
import { sourceWorkspaceConfigFromInterfConfig, } from "../lib/source-config.js";
|
|
5
4
|
import { addExecutionProfileOptions, executionProfileFromArgv, } from "../lib/execution-profile.js";
|
|
6
|
-
import { chooseWorkspaceConfigToBuild, findBuiltWorkspacePath, findSavedWorkspaceConfig, } from "./workspace-flow.js";
|
|
7
|
-
import { printSavedTestComparison, runSavedRawTest, runSavedWorkspaceTest, } from "./test-flow.js";
|
|
5
|
+
import { chooseWorkspaceConfigToBuild, ensureWorkspaceFromConfig, findBuiltWorkspacePath, findSavedWorkspaceConfig, } from "./workspace-flow.js";
|
|
6
|
+
import { printSavedTestComparison, runSavedRawTest, runSavedWorkspaceTest, saveTestComparisonRun, } from "./test-flow.js";
|
|
8
7
|
export const testCommand = {
|
|
9
8
|
command: "test",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
describe: "Compare raw files and a compiled workspace on saved truth checks",
|
|
10
|
+
builder: (yargs) => addExecutionProfileOptions(yargs)
|
|
11
|
+
.option("target", {
|
|
12
|
+
choices: ["both", "raw", "workspace"],
|
|
13
|
+
describe: "Test raw files, the compiled workspace, or both. Default: both when a compiled workspace exists, otherwise raw.",
|
|
14
|
+
})
|
|
15
|
+
.option("keep-sandboxes", {
|
|
13
16
|
type: "boolean",
|
|
14
17
|
default: false,
|
|
15
|
-
describe: "Keep every raw or workspace test sandbox under interf/
|
|
18
|
+
describe: "Keep every raw or workspace test sandbox under .interf/tests/targets/sandboxes for review instead of pruning successful runs",
|
|
16
19
|
}),
|
|
17
20
|
handler: async (argv) => {
|
|
18
21
|
await runTestCommand(argv);
|
|
@@ -22,64 +25,16 @@ function readSandboxRetentionMode(argv) {
|
|
|
22
25
|
const enabled = argv["keep-sandboxes"] ?? argv.keepSandboxes ?? false;
|
|
23
26
|
return enabled ? "always" : "on-failure";
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
message: `Test "${options.workspaceName}" against what?`,
|
|
29
|
-
options: [
|
|
30
|
-
{
|
|
31
|
-
value: "raw",
|
|
32
|
-
label: "Raw files",
|
|
33
|
-
hint: "Run a baseline test on the raw files only",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
value: "workspace",
|
|
37
|
-
label: "Compiled workspace",
|
|
38
|
-
hint: "Build it first with `interf compile`",
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
});
|
|
42
|
-
if (p.isCancel(selected))
|
|
43
|
-
return null;
|
|
44
|
-
return selected;
|
|
45
|
-
}
|
|
46
|
-
const selected = await p.select({
|
|
47
|
-
message: `Test "${options.workspaceName}" against what?`,
|
|
48
|
-
options: [
|
|
49
|
-
{
|
|
50
|
-
value: "both",
|
|
51
|
-
label: "Raw files and compiled workspace (Recommended)",
|
|
52
|
-
hint: "Run the same questions against both and compare",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
value: "raw",
|
|
56
|
-
label: "Raw files",
|
|
57
|
-
hint: "Run the baseline only",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
value: "workspace",
|
|
61
|
-
label: "Compiled workspace",
|
|
62
|
-
hint: "Run the saved test against the workspace only",
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
});
|
|
66
|
-
if (p.isCancel(selected))
|
|
67
|
-
return null;
|
|
68
|
-
return selected;
|
|
28
|
+
function readRequestedMode(argv) {
|
|
29
|
+
const value = argv.target;
|
|
30
|
+
return value === "raw" || value === "workspace" || value === "both" ? value : null;
|
|
69
31
|
}
|
|
70
32
|
export async function runTestCommand(argv = {}) {
|
|
71
33
|
const cwd = process.cwd();
|
|
72
34
|
const detected = detectInterf(cwd);
|
|
73
35
|
const sourcePath = detected ? resolveSourceControlPath(detected.path) : cwd;
|
|
74
|
-
const config = loadSourceFolderConfig(sourcePath);
|
|
75
|
-
if (!config) {
|
|
76
|
-
process.exitCode = 1;
|
|
77
|
-
console.log(chalk.red(" This folder does not have any saved workspace setup yet."));
|
|
78
|
-
console.log(chalk.dim(" Start with `interf` or `interf init`."));
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
36
|
const selectedWorkspace = detected
|
|
82
|
-
? (findSavedWorkspaceConfig(sourcePath, detected.config.name) ??
|
|
37
|
+
? (findSavedWorkspaceConfig(sourcePath, detected.config.name) ?? sourceWorkspaceConfigFromInterfConfig(detected.config))
|
|
83
38
|
: await chooseWorkspaceConfigToBuild({
|
|
84
39
|
sourcePath,
|
|
85
40
|
selectMessage: "Which workspace do you want to test?",
|
|
@@ -102,24 +57,26 @@ export async function runTestCommand(argv = {}) {
|
|
|
102
57
|
const preserveSandboxes = readSandboxRetentionMode(argv);
|
|
103
58
|
const builtWorkspacePath = detected?.path ?? findBuiltWorkspacePath(sourcePath, selectedWorkspace.name);
|
|
104
59
|
const hasBuiltWorkspace = Boolean(builtWorkspacePath);
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
workspaceName: selectedWorkspace.name,
|
|
109
|
-
hasBuiltWorkspace,
|
|
110
|
-
});
|
|
111
|
-
if (!mode)
|
|
112
|
-
return;
|
|
113
|
-
if (mode === "workspace" && !hasBuiltWorkspace) {
|
|
60
|
+
const requestedMode = readRequestedMode(argv);
|
|
61
|
+
const selectedMode = requestedMode ?? (hasBuiltWorkspace ? "both" : "raw");
|
|
62
|
+
if (selectedMode === "workspace" && !hasBuiltWorkspace) {
|
|
114
63
|
process.exitCode = 1;
|
|
115
64
|
console.log(chalk.red(` Workspace "${selectedWorkspace.name}" is not compiled yet.`));
|
|
116
65
|
console.log(chalk.dim(" Run `interf compile` first."));
|
|
117
66
|
return;
|
|
118
67
|
}
|
|
68
|
+
if (selectedMode === "both" && !hasBuiltWorkspace) {
|
|
69
|
+
console.log(chalk.dim(` Workspace "${selectedWorkspace.name}" is not compiled yet. Running the raw files only.`));
|
|
70
|
+
}
|
|
71
|
+
const mode = selectedMode === "both" && !hasBuiltWorkspace
|
|
72
|
+
? "raw"
|
|
73
|
+
: selectedMode;
|
|
74
|
+
const artifactWorkspacePath = builtWorkspacePath ?? ensureWorkspaceFromConfig(sourcePath, selectedWorkspace);
|
|
119
75
|
const rawOutcome = mode === "raw" || mode === "both"
|
|
120
76
|
? await runSavedRawTest({
|
|
121
77
|
sourcePath,
|
|
122
78
|
workspaceConfig: selectedWorkspace,
|
|
79
|
+
workspacePath: artifactWorkspacePath,
|
|
123
80
|
executionProfile,
|
|
124
81
|
preserveSandboxes,
|
|
125
82
|
})
|
|
@@ -129,7 +86,7 @@ export async function runTestCommand(argv = {}) {
|
|
|
129
86
|
sourcePath,
|
|
130
87
|
workspaceConfig: selectedWorkspace,
|
|
131
88
|
executionProfile,
|
|
132
|
-
workspacePath:
|
|
89
|
+
workspacePath: artifactWorkspacePath,
|
|
133
90
|
preserveSandboxes,
|
|
134
91
|
})
|
|
135
92
|
: null;
|
|
@@ -139,6 +96,13 @@ export async function runTestCommand(argv = {}) {
|
|
|
139
96
|
console.log(chalk.dim(" Run `interf compile` first."));
|
|
140
97
|
return;
|
|
141
98
|
}
|
|
142
|
-
|
|
99
|
+
const comparisonRunPath = saveTestComparisonRun({
|
|
100
|
+
sourcePath,
|
|
101
|
+
workspacePath: artifactWorkspacePath,
|
|
102
|
+
workspaceName: selectedWorkspace.name,
|
|
103
|
+
mode,
|
|
104
|
+
rawOutcome,
|
|
105
|
+
workspaceOutcome,
|
|
106
|
+
});
|
|
107
|
+
printSavedTestComparison(rawOutcome, workspaceOutcome, comparisonRunPath);
|
|
143
108
|
}
|
|
144
|
-
//# sourceMappingURL=test.js.map
|
package/dist/commands/verify.js
CHANGED
|
@@ -5,6 +5,7 @@ import type { WorkspaceCompileResult } from "../lib/workflows.js";
|
|
|
5
5
|
export interface SavedWorkspaceEntry {
|
|
6
6
|
config: SourceWorkspaceConfig;
|
|
7
7
|
path: string | null;
|
|
8
|
+
localDraft: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare function listSavedWorkspaceEntries(sourcePath: string): SavedWorkspaceEntry[];
|
|
10
11
|
export declare function findBuiltWorkspacePath(sourcePath: string, workspaceName: string): string | null;
|
|
@@ -13,11 +14,10 @@ export declare function chooseWorkspaceConfigToBuild(options: {
|
|
|
13
14
|
sourcePath: string;
|
|
14
15
|
selectMessage: string;
|
|
15
16
|
}): Promise<SourceWorkspaceConfig | null | undefined>;
|
|
16
|
-
export declare function createWorkspaceFromConfig(sourcePath: string, workspaceConfig:
|
|
17
|
-
export declare function ensureWorkspaceFromConfig(sourcePath: string, workspaceConfig:
|
|
17
|
+
export declare function createWorkspaceFromConfig(sourcePath: string, workspaceConfig: SourceWorkspaceConfig): string;
|
|
18
|
+
export declare function ensureWorkspaceFromConfig(sourcePath: string, workspaceConfig: SourceWorkspaceConfig): string;
|
|
18
19
|
export declare function compileWorkspaceWithReporter(executor: WorkflowExecutor, workspacePath: string, options?: {
|
|
19
20
|
heading?: string;
|
|
20
21
|
successMessage?: string;
|
|
21
22
|
preserveStageShells?: StageShellRetentionMode;
|
|
22
23
|
}): Promise<WorkspaceCompileResult>;
|
|
23
|
-
//# sourceMappingURL=workspace-flow.d.ts.map
|
|
@@ -2,29 +2,46 @@ import chalk from "chalk";
|
|
|
2
2
|
import * as p from "@clack/prompts";
|
|
3
3
|
import { listWorkspacesForSourceFolder } from "../lib/interf.js";
|
|
4
4
|
import { addWorkspace } from "../lib/registry.js";
|
|
5
|
-
import {
|
|
5
|
+
import { listSourceWorkspaceConfigs, loadWorkspaceControlConfig, loadSourceFolderConfig, sourceWorkspaceConfigFromInterfConfig, syncWorkspaceInterfConfigFromSourceWorkspaceConfig, } from "../lib/source-config.js";
|
|
6
6
|
import { compileWorkspace, createWorkspace, } from "../lib/workflows.js";
|
|
7
7
|
import { formatWorkflowExecutionProfile } from "../lib/execution-profile.js";
|
|
8
|
-
function formatSavedWorkspaceHint(
|
|
8
|
+
function formatSavedWorkspaceHint(entry) {
|
|
9
|
+
const config = entry.config;
|
|
9
10
|
const checkCount = config.checks.length;
|
|
11
|
+
const workflowHint = `workflow ${config.workflow ?? "interf"}${entry.localDraft ? " (local draft)" : ""}`;
|
|
10
12
|
if (config.about)
|
|
11
|
-
return config.about
|
|
13
|
+
return `${config.about} · ${workflowHint}`;
|
|
12
14
|
if (checkCount === 0)
|
|
13
15
|
return "No saved truth checks yet";
|
|
14
|
-
return `${checkCount} saved truth check${checkCount === 1 ? "" : "s"}`;
|
|
16
|
+
return `${checkCount} saved truth check${checkCount === 1 ? "" : "s"} · ${workflowHint}`;
|
|
15
17
|
}
|
|
16
18
|
export function listSavedWorkspaceEntries(sourcePath) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const entries = new Map();
|
|
20
|
+
for (const builtWorkspace of listWorkspacesForSourceFolder(sourcePath)) {
|
|
21
|
+
const workspaceConfig = loadWorkspaceControlConfig(builtWorkspace.path)
|
|
22
|
+
?? sourceWorkspaceConfigFromInterfConfig(builtWorkspace.config);
|
|
23
|
+
entries.set(builtWorkspace.config.name, {
|
|
24
|
+
config: workspaceConfig,
|
|
25
|
+
path: builtWorkspace.path,
|
|
26
|
+
localDraft: builtWorkspace.config.workflow_origin?.local_draft === true,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
for (const config of listSourceWorkspaceConfigs(loadSourceFolderConfig(sourcePath))) {
|
|
30
|
+
if (entries.has(config.name))
|
|
31
|
+
continue;
|
|
32
|
+
entries.set(config.name, {
|
|
33
|
+
config,
|
|
34
|
+
path: null,
|
|
35
|
+
localDraft: false,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return Array.from(entries.values()).sort((left, right) => left.config.name.localeCompare(right.config.name));
|
|
22
39
|
}
|
|
23
40
|
export function findBuiltWorkspacePath(sourcePath, workspaceName) {
|
|
24
41
|
return listSavedWorkspaceEntries(sourcePath).find((entry) => entry.config.name === workspaceName)?.path ?? null;
|
|
25
42
|
}
|
|
26
43
|
export function findSavedWorkspaceConfig(sourcePath, workspaceName) {
|
|
27
|
-
return
|
|
44
|
+
return listSavedWorkspaceEntries(sourcePath).find((entry) => entry.config.name === workspaceName)?.config ?? null;
|
|
28
45
|
}
|
|
29
46
|
export async function chooseWorkspaceConfigToBuild(options) {
|
|
30
47
|
const savedEntries = listSavedWorkspaceEntries(options.sourcePath);
|
|
@@ -40,7 +57,7 @@ export async function chooseWorkspaceConfigToBuild(options) {
|
|
|
40
57
|
value: entry.config.name,
|
|
41
58
|
label: entry.config.name,
|
|
42
59
|
hint: [
|
|
43
|
-
formatSavedWorkspaceHint(entry
|
|
60
|
+
formatSavedWorkspaceHint(entry),
|
|
44
61
|
entry.path ? "built" : "not built yet",
|
|
45
62
|
].join(" · "),
|
|
46
63
|
})),
|
|
@@ -52,12 +69,14 @@ export async function chooseWorkspaceConfigToBuild(options) {
|
|
|
52
69
|
export function createWorkspaceFromConfig(sourcePath, workspaceConfig) {
|
|
53
70
|
const workflowId = workspaceConfig.workflow ?? "interf";
|
|
54
71
|
const workspacePath = createWorkspace(workspaceConfig.name, sourcePath, workflowId, workspaceConfig.about);
|
|
72
|
+
syncWorkspaceInterfConfigFromSourceWorkspaceConfig(workspacePath, workspaceConfig);
|
|
55
73
|
addWorkspace(workspaceConfig.name, workspacePath, workflowId);
|
|
56
74
|
return workspacePath;
|
|
57
75
|
}
|
|
58
76
|
export function ensureWorkspaceFromConfig(sourcePath, workspaceConfig) {
|
|
59
77
|
const existingPath = findBuiltWorkspacePath(sourcePath, workspaceConfig.name);
|
|
60
78
|
if (existingPath) {
|
|
79
|
+
syncWorkspaceInterfConfigFromSourceWorkspaceConfig(existingPath, workspaceConfig);
|
|
61
80
|
addWorkspace(workspaceConfig.name, existingPath, workspaceConfig.workflow ?? "interf");
|
|
62
81
|
return existingPath;
|
|
63
82
|
}
|
|
@@ -88,4 +107,3 @@ export async function compileWorkspaceWithReporter(executor, workspacePath, opti
|
|
|
88
107
|
console.log(chalk.green(` ✓ ${options.successMessage ?? "Compiled workspace ready."}`));
|
|
89
108
|
return result;
|
|
90
109
|
}
|
|
91
|
-
//# sourceMappingURL=workspace-flow.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { createWorkspace, compileWorkspace, runWorkspaceSummarize, runWorkspaceCompile, } from "./lib/workflows.js";
|
|
2
|
-
export {
|
|
2
|
+
export { createRawTestTarget, listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, listTestTargets, runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./lib/test.js";
|
|
3
3
|
export { computeWorkspaceHealth, } from "./lib/state.js";
|
|
4
|
-
export { SOURCE_FOLDER_CONFIG_FILE, loadSourceFolderConfig,
|
|
4
|
+
export { SOURCE_FOLDER_CONFIG_FILE, loadSourceFolderConfig, buildTestSpecFromSourceFolderConfig, } from "./lib/source-config.js";
|
|
5
5
|
export { validateWorkspaceSummarize, validateWorkspaceCompile, } from "./lib/validate.js";
|
|
6
|
-
export { InterfConfigSchema,
|
|
6
|
+
export { InterfConfigSchema, TestSpecSchema, SourceFolderConfigSchema, WorkspaceHealthSchema, } from "./lib/schema.js";
|
|
7
7
|
export type { InterfConfig } from "./lib/interf.js";
|
|
8
|
-
export type {
|
|
9
|
-
export type {
|
|
8
|
+
export type { TestCaseExpect, TestCase, TestSpec, TestCheckResult, TestCaseResult, TestTargetResult, TestTargetRun, LoadedTestSpec, TestTargetCandidate, } from "./lib/test.js";
|
|
9
|
+
export type { SourceTruthCheck, SourceWorkspaceConfig, SourceFolderConfig, WorkspaceHealth, } from "./lib/schema.js";
|
|
10
10
|
export type { WorkspaceSummarizeValidation, WorkspaceCompileValidation, } from "./lib/validate.js";
|
|
11
11
|
export type { WorkspaceSummarizeResult, WorkspaceCompileResult, } from "./lib/workflows.js";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { createWorkspace, compileWorkspace, runWorkspaceSummarize, runWorkspaceCompile, } from "./lib/workflows.js";
|
|
2
|
-
export {
|
|
2
|
+
export { createRawTestTarget, listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, listTestTargets, runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./lib/test.js";
|
|
3
3
|
export { computeWorkspaceHealth, } from "./lib/state.js";
|
|
4
|
-
export { SOURCE_FOLDER_CONFIG_FILE, loadSourceFolderConfig,
|
|
4
|
+
export { SOURCE_FOLDER_CONFIG_FILE, loadSourceFolderConfig, buildTestSpecFromSourceFolderConfig, } from "./lib/source-config.js";
|
|
5
5
|
export { validateWorkspaceSummarize, validateWorkspaceCompile, } from "./lib/validate.js";
|
|
6
|
-
export { InterfConfigSchema,
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
6
|
+
export { InterfConfigSchema, TestSpecSchema, SourceFolderConfigSchema, WorkspaceHealthSchema, } from "./lib/schema.js";
|
package/dist/lib/agent-args.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { WorkflowExecutionProfile } from "./executors.js";
|
|
2
2
|
import type { Agent } from "./agent-types.js";
|
|
3
3
|
export declare function buildAgentArgs(agent: Agent, prompt: string, executionProfile?: WorkflowExecutionProfile): string[];
|
|
4
|
-
//# sourceMappingURL=agent-args.d.ts.map
|
package/dist/lib/agent-args.js
CHANGED
|
@@ -26,4 +26,3 @@ export const CODEX_NOISE_PATTERNS = [
|
|
|
26
26
|
/codex_core::codex: failed to load skill .*\/gstack\/SKILL\.md: invalid description: exceeds maximum length of 1024 characters/,
|
|
27
27
|
];
|
|
28
28
|
export const VISIBLE_STATUS_PREFIXES = ["STATUS:", "DONE:", "BLOCKED:", "ERROR:"];
|
|
29
|
-
//# sourceMappingURL=agent-constants.js.map
|