@interf/compiler 0.7.3 → 0.9.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 +123 -89
- package/TRADEMARKS.md +1 -1
- package/agent-skills/interf-actions/SKILL.md +71 -0
- package/agent-skills/interf-actions/references/cli.md +190 -0
- package/apps/compiler-ui/.next/server/app/index.html +1 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_buildManifest.js +11 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_clientMiddlewareManifest.js +1 -0
- package/apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J/_ssgManifest.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/03~yq9q893hmn.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/06z~l3kwb891e.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/08g7lvje.te.u.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/08m7vf5asqlsm.js +91 -0
- package/apps/compiler-ui/.next/static/chunks/0_i-3_5l9t2qe.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0b-ywny_j0g~0.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0b52v41o1gixx.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js +124 -0
- package/apps/compiler-ui/.next/static/chunks/0gpzgsv0w.q~m.js +31 -0
- package/apps/compiler-ui/.next/static/chunks/0ilwfezfvu6~-.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0n51hrfoufc7g.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +5 -0
- package/apps/compiler-ui/.next/static/chunks/0xxmf45eskdt~.css +1 -0
- package/apps/compiler-ui/.next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +3 -0
- package/apps/compiler-ui/.next/static/chunks/14wtz~vq25~qq.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
- package/apps/compiler-ui/.next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/apps/compiler-ui/.next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/apps/compiler-ui/.next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/apps/compiler-ui/.next/static/media/worker.102zas1s52_pf.js +109 -0
- package/builtin-workflows/interf/README.md +8 -8
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +4 -4
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +1 -1
- package/builtin-workflows/interf/improve/SKILL.md +1 -1
- package/builtin-workflows/interf/use/query/SKILL.md +1 -1
- package/builtin-workflows/interf/workflow.json +8 -8
- package/builtin-workflows/interf/workflow.schema.json +1 -1
- package/dist/cli/commands/check-draft.d.ts +5 -4
- package/dist/cli/commands/check-draft.js +18 -17
- package/dist/cli/commands/compile-controller.d.ts +3 -0
- package/dist/cli/commands/compile-controller.js +53 -45
- package/dist/cli/commands/compile.js +83 -27
- package/dist/cli/commands/compiled-flow.d.ts +3 -0
- package/dist/cli/commands/compiled-flow.js +9 -7
- package/dist/cli/commands/control-path.d.ts +11 -0
- package/dist/cli/commands/control-path.js +72 -0
- package/dist/cli/commands/create-workflow-wizard.d.ts +6 -0
- package/dist/cli/commands/create-workflow-wizard.js +191 -77
- package/dist/cli/commands/create.js +54 -40
- package/dist/cli/commands/default.js +4 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.js +326 -76
- package/dist/cli/commands/list.js +8 -7
- package/dist/cli/commands/preparation-selection.d.ts +6 -0
- package/dist/cli/commands/preparation-selection.js +11 -0
- package/dist/cli/commands/reset.js +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +4 -3
- package/dist/cli/commands/source-config-wizard.js +175 -197
- package/dist/cli/commands/status.js +116 -8
- package/dist/cli/commands/test-flow.d.ts +1 -1
- package/dist/cli/commands/test-flow.js +31 -31
- package/dist/cli/commands/test.d.ts +4 -0
- package/dist/cli/commands/test.js +95 -58
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.d.ts +11 -0
- package/dist/cli/commands/web.js +373 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +3 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/packages/agents/lib/execution.js +4 -2
- package/dist/packages/agents/lib/executors.d.ts +1 -0
- package/dist/packages/agents/lib/executors.js +1 -0
- package/dist/packages/agents/lib/render.d.ts +2 -2
- package/dist/packages/agents/lib/render.js +10 -9
- package/dist/packages/agents/lib/shells.d.ts +3 -11
- package/dist/packages/agents/lib/shells.js +45 -96
- package/dist/packages/agents/lib/types.d.ts +1 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -1
- package/dist/packages/compiler/compiled-paths.js +7 -1
- package/dist/packages/compiler/compiled-pipeline.d.ts +7 -0
- package/dist/packages/compiler/compiled-pipeline.js +15 -4
- package/dist/packages/compiler/compiled-schema.js +1 -1
- package/dist/packages/compiler/compiled-stage-plan.d.ts +2 -2
- package/dist/packages/compiler/compiled-stage-plan.js +4 -4
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -0
- package/dist/packages/compiler/compiled-stage-runner.js +50 -2
- package/dist/packages/compiler/compiled-target.d.ts +1 -1
- package/dist/packages/compiler/compiled-target.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +161 -1
- package/dist/packages/compiler/lib/schema.js +87 -1
- package/dist/packages/compiler/raw-snapshot.d.ts +9 -2
- package/dist/packages/compiler/runtime-acceptance.js +1 -1
- package/dist/packages/compiler/runtime-contracts.js +2 -2
- package/dist/packages/compiler/runtime-prompt.js +6 -6
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +3 -0
- package/dist/packages/compiler/runtime-types.d.ts +1 -0
- package/dist/packages/compiler/state-health.js +1 -1
- package/dist/packages/compiler/state-view.js +2 -2
- package/dist/packages/compiler/validate-compiled.js +11 -9
- package/dist/packages/execution/adapters.d.ts +15 -0
- package/dist/packages/execution/adapters.js +1 -0
- package/dist/packages/execution/events.d.ts +8 -0
- package/dist/packages/execution/events.js +16 -0
- package/dist/packages/execution/index.d.ts +9 -0
- package/dist/packages/execution/index.js +6 -0
- package/dist/packages/execution/lib/schema.d.ts +1554 -0
- package/dist/packages/execution/lib/schema.js +319 -0
- package/dist/packages/local-service/action-values.d.ts +23 -0
- package/dist/packages/local-service/action-values.js +31 -0
- package/dist/packages/local-service/client.d.ts +119 -0
- package/dist/packages/local-service/client.js +356 -0
- package/dist/packages/local-service/index.d.ts +15 -0
- package/dist/packages/local-service/index.js +11 -0
- package/dist/packages/local-service/lib/schema.d.ts +7355 -0
- package/dist/packages/local-service/lib/schema.js +636 -0
- package/dist/packages/local-service/routes.d.ts +27 -0
- package/dist/packages/local-service/routes.js +32 -0
- package/dist/packages/local-service/runtime.d.ts +134 -0
- package/dist/packages/local-service/runtime.js +2841 -0
- package/dist/packages/local-service/server.d.ts +17 -0
- package/dist/packages/local-service/server.js +572 -0
- package/dist/packages/project-model/index.d.ts +2 -1
- package/dist/packages/project-model/index.js +1 -0
- package/dist/packages/project-model/interf-detect.d.ts +6 -2
- package/dist/packages/project-model/interf-detect.js +25 -10
- package/dist/packages/project-model/interf-scaffold.js +9 -6
- package/dist/packages/project-model/interf.d.ts +1 -1
- package/dist/packages/project-model/interf.js +1 -1
- package/dist/packages/project-model/lib/schema.d.ts +80 -6
- package/dist/packages/project-model/lib/schema.js +29 -19
- package/dist/packages/project-model/source-config.d.ts +22 -13
- package/dist/packages/project-model/source-config.js +140 -123
- package/dist/packages/project-model/source-folders.d.ts +11 -0
- package/dist/packages/project-model/source-folders.js +110 -0
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +1 -3
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +4 -6
- package/dist/packages/workflow-authoring/workflow-authoring.js +45 -86
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +2 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.js +80 -49
- package/dist/packages/workflow-authoring/workflow-improvement.js +2 -1
- package/dist/packages/workflow-package/context-interface.js +1 -1
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +6 -0
- package/dist/packages/workflow-package/interf-workflow-package.js +115 -8
- package/dist/packages/workflow-package/local-workflows.js +33 -17
- package/dist/packages/workflow-package/workflow-definitions.d.ts +5 -5
- package/dist/packages/workflow-package/workflow-definitions.js +23 -22
- package/dist/packages/workflow-package/workflow-helpers.js +10 -6
- package/dist/packages/workflow-package/workflow-stage-runner.d.ts +1 -0
- package/dist/packages/workflow-package/workflow-stage-runner.js +2 -0
- package/package.json +17 -1
- package/dist/cli/commands/dataset-selection.d.ts +0 -6
- package/dist/cli/commands/dataset-selection.js +0 -11
- 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 +0 -1
- 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 +0 -1
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +0 -1
- package/dist/lib/agent-shells.js +0 -1
- 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 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
- package/dist/lib/builtin-compiled-workflow.js +0 -1
- package/dist/lib/chart-guidance.d.ts +0 -1
- package/dist/lib/chart-guidance.js +0 -1
- package/dist/lib/compiled-compile.d.ts +0 -1
- package/dist/lib/compiled-compile.js +0 -1
- package/dist/lib/compiled-paths.d.ts +0 -1
- package/dist/lib/compiled-paths.js +0 -3
- package/dist/lib/compiled-raw.d.ts +0 -1
- package/dist/lib/compiled-raw.js +0 -3
- package/dist/lib/compiled-reset.d.ts +0 -1
- package/dist/lib/compiled-reset.js +0 -3
- package/dist/lib/compiled-schema.d.ts +0 -1
- package/dist/lib/compiled-schema.js +0 -1
- 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 +0 -3
- package/dist/lib/interf-detect.d.ts +0 -1
- package/dist/lib/interf-detect.js +0 -3
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +0 -3
- package/dist/lib/interf-workflow-package.d.ts +0 -1
- package/dist/lib/interf-workflow-package.js +0 -1
- package/dist/lib/interf.d.ts +0 -1
- package/dist/lib/interf.js +0 -3
- package/dist/lib/local-workflows.d.ts +0 -1
- package/dist/lib/local-workflows.js +0 -1
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/package-root.d.ts +0 -1
- package/dist/lib/package-root.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/project-paths.d.ts +0 -1
- package/dist/lib/project-paths.js +0 -3
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +0 -1
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +0 -1
- package/dist/lib/runtime-inventory.d.ts +0 -1
- package/dist/lib/runtime-inventory.js +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +0 -1
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +0 -1
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +0 -1
- 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 +0 -4
- package/dist/lib/schema.js +0 -6
- package/dist/lib/source-config.d.ts +0 -1
- package/dist/lib/source-config.js +0 -3
- 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 +0 -1
- package/dist/lib/state-io.d.ts +0 -1
- package/dist/lib/state-io.js +0 -1
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +0 -1
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +0 -1
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/test-execution.d.ts +0 -1
- package/dist/lib/test-execution.js +0 -3
- package/dist/lib/test-matrices.d.ts +0 -1
- package/dist/lib/test-matrices.js +0 -3
- package/dist/lib/test-paths.d.ts +0 -1
- package/dist/lib/test-paths.js +0 -3
- package/dist/lib/test-profile-presets.d.ts +0 -1
- package/dist/lib/test-profile-presets.js +0 -3
- package/dist/lib/test-sandbox.d.ts +0 -1
- package/dist/lib/test-sandbox.js +0 -3
- package/dist/lib/test-specs.d.ts +0 -1
- package/dist/lib/test-specs.js +0 -3
- package/dist/lib/test-targets.d.ts +0 -1
- package/dist/lib/test-targets.js +0 -3
- package/dist/lib/test-types.d.ts +0 -1
- package/dist/lib/test-types.js +0 -3
- package/dist/lib/test.d.ts +0 -1
- package/dist/lib/test.js +0 -3
- package/dist/lib/util.d.ts +0 -1
- package/dist/lib/util.js +0 -1
- package/dist/lib/validate-compiled.d.ts +0 -1
- package/dist/lib/validate-compiled.js +0 -1
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +0 -1
- package/dist/lib/workflow-authoring.d.ts +0 -1
- package/dist/lib/workflow-authoring.js +0 -1
- package/dist/lib/workflow-definitions.d.ts +0 -1
- package/dist/lib/workflow-definitions.js +0 -1
- package/dist/lib/workflow-edit-session.d.ts +0 -1
- package/dist/lib/workflow-edit-session.js +0 -1
- package/dist/lib/workflow-edit-utils.d.ts +0 -1
- package/dist/lib/workflow-edit-utils.js +0 -1
- package/dist/lib/workflow-helpers.d.ts +0 -1
- package/dist/lib/workflow-helpers.js +0 -1
- package/dist/lib/workflow-improvement.d.ts +0 -1
- package/dist/lib/workflow-improvement.js +0 -1
- package/dist/lib/workflow-primitives.d.ts +0 -1
- package/dist/lib/workflow-primitives.js +0 -1
- package/dist/lib/workflow-review-paths.d.ts +0 -1
- package/dist/lib/workflow-review-paths.js +0 -1
- package/dist/lib/workflow-stage-policy.d.ts +0 -1
- package/dist/lib/workflow-stage-policy.js +0 -1
- package/dist/lib/workflow-stage-runner.d.ts +0 -1
- package/dist/lib/workflow-stage-runner.js +0 -1
- package/dist/lib/workflows.d.ts +0 -1
- package/dist/lib/workflows.js +0 -1
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import * as p from "@clack/prompts";
|
|
3
3
|
import { detectInterf, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
|
|
4
|
-
import {
|
|
4
|
+
import { fingerprintReadinessChecks, loadCompiledDatasetConfig, sourceDatasetConfigFromInterfConfig, } from "../../packages/project-model/source-config.js";
|
|
5
5
|
import { addExecutionProfileOptions, executionProfileFromArgv, } from "../../packages/agents/lib/execution-profile.js";
|
|
6
6
|
import { chooseCompiledConfigToBuild, findBuiltCompiledPath, } from "./compiled-flow.js";
|
|
7
|
-
import {
|
|
7
|
+
import { resolveConfiguredPreparationSelection } from "./preparation-selection.js";
|
|
8
8
|
import { printAgentTestFailures, printAgentTestMatrix, printSavedTestComparisonState, readSavedTestComparison, runSavedRawTest, runSavedCompiledTest, saveTestComparisonRun, } from "./test-flow.js";
|
|
9
|
+
import { createCompiledTestTarget } from "../../packages/testing/test-targets.js";
|
|
9
10
|
import { listRunAgentOptions, promptForTestAgents, resolveNamedLocalExecutor, resolveOrConfigureLocalExecutor, } from "./executor-flow.js";
|
|
11
|
+
import { submitTestRunToLocalService, waitForLocalTestRun, } from "../../packages/local-service/index.js";
|
|
12
|
+
import { resolveCommandControlPath } from "./control-path.js";
|
|
10
13
|
export const testCommand = {
|
|
11
14
|
command: "test",
|
|
12
|
-
describe: "
|
|
15
|
+
describe: "Run readiness checks against source files and Portable Context",
|
|
13
16
|
builder: (yargs) => addExecutionProfileOptions(yargs)
|
|
14
|
-
.option("
|
|
17
|
+
.option("preparation", {
|
|
15
18
|
type: "string",
|
|
16
|
-
describe: "
|
|
19
|
+
describe: "Preparation id to check when this Source Folder has more than one Preparation",
|
|
17
20
|
})
|
|
18
21
|
.option("target", {
|
|
19
22
|
choices: ["both", "raw", "compiled"],
|
|
20
|
-
describe: "
|
|
23
|
+
describe: "Check source files, Portable Context, or both. Default: both when Portable Context exists, otherwise source files.",
|
|
21
24
|
})
|
|
22
25
|
.option("keep-sandboxes", {
|
|
23
26
|
type: "boolean",
|
|
24
27
|
default: false,
|
|
25
|
-
describe: "Keep every
|
|
28
|
+
describe: "Keep every readiness-check sandbox for review instead of pruning successful ones",
|
|
26
29
|
})
|
|
27
30
|
.option("agents", {
|
|
28
31
|
type: "string",
|
|
29
|
-
describe: "Comma-separated local agents to use for
|
|
32
|
+
describe: "Comma-separated local agents to use for readiness checks, or `all`. Example: --agents claude-code,codex",
|
|
30
33
|
}),
|
|
31
34
|
handler: async (argv) => {
|
|
32
35
|
await runTestCommand(argv);
|
|
@@ -40,27 +43,39 @@ function readRequestedMode(argv) {
|
|
|
40
43
|
const value = argv.target;
|
|
41
44
|
return value === "raw" || value === "compiled" || value === "both" ? value : null;
|
|
42
45
|
}
|
|
46
|
+
function reportTestCommandFailure(argv, message, hints = []) {
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
console.log(chalk.red(` ${message}`));
|
|
49
|
+
for (const hint of hints) {
|
|
50
|
+
console.log(chalk.dim(` ${hint}`));
|
|
51
|
+
}
|
|
52
|
+
const onFailure = typeof argv.onFailure === "function"
|
|
53
|
+
? argv.onFailure
|
|
54
|
+
: null;
|
|
55
|
+
void onFailure?.({ message, hints });
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
43
58
|
async function promptTestMode(hasBuiltCompiled) {
|
|
44
59
|
if (!hasBuiltCompiled) {
|
|
45
60
|
return "raw";
|
|
46
61
|
}
|
|
47
62
|
const selected = await p.select({
|
|
48
|
-
message: "What do you want to
|
|
63
|
+
message: "What do you want to check?",
|
|
49
64
|
options: [
|
|
50
65
|
{
|
|
51
66
|
value: "both",
|
|
52
|
-
label: "
|
|
53
|
-
hint: "
|
|
67
|
+
label: "Source files and Portable Context (Recommended)",
|
|
68
|
+
hint: "Check whether the data is ready with and without Portable Context",
|
|
54
69
|
},
|
|
55
70
|
{
|
|
56
71
|
value: "raw",
|
|
57
72
|
label: "Source files only",
|
|
58
|
-
hint: "Measure the current baseline on the
|
|
73
|
+
hint: "Measure the current baseline on the Source Folder files",
|
|
59
74
|
},
|
|
60
75
|
{
|
|
61
76
|
value: "compiled",
|
|
62
|
-
label: "Portable
|
|
63
|
-
hint: "
|
|
77
|
+
label: "Portable Context only",
|
|
78
|
+
hint: "Run the saved readiness checks against the current Portable Context",
|
|
64
79
|
},
|
|
65
80
|
],
|
|
66
81
|
});
|
|
@@ -126,23 +141,23 @@ async function resolveSelectedTestAgents(options) {
|
|
|
126
141
|
return selected;
|
|
127
142
|
}
|
|
128
143
|
}
|
|
129
|
-
const
|
|
144
|
+
const resolved = await resolveOrConfigureLocalExecutor({
|
|
130
145
|
preflight: true,
|
|
131
146
|
executionProfile: options.executionProfile,
|
|
132
147
|
purpose: "test",
|
|
133
148
|
});
|
|
134
|
-
if (!
|
|
135
|
-
if (
|
|
149
|
+
if (!resolved.executor) {
|
|
150
|
+
if (resolved.cancelled)
|
|
136
151
|
return null;
|
|
137
152
|
process.exitCode = 1;
|
|
138
|
-
console.log(chalk.red(
|
|
153
|
+
console.log(chalk.red(resolved.error ?? "No local agent detected."));
|
|
139
154
|
return null;
|
|
140
155
|
}
|
|
141
156
|
return [
|
|
142
157
|
{
|
|
143
|
-
name:
|
|
144
|
-
label:
|
|
145
|
-
executor:
|
|
158
|
+
name: resolved.executor.name,
|
|
159
|
+
label: resolved.executor.displayName,
|
|
160
|
+
executor: resolved.executor,
|
|
146
161
|
},
|
|
147
162
|
];
|
|
148
163
|
}
|
|
@@ -178,60 +193,56 @@ export async function runTestCommand(argv = {}) {
|
|
|
178
193
|
const detected = detectInterf(cwd);
|
|
179
194
|
const sourcePath = typeof argv.sourcePath === "string" && argv.sourcePath.trim().length > 0
|
|
180
195
|
? argv.sourcePath.trim()
|
|
181
|
-
: (detected ? resolveSourceControlPath(detected.path) : cwd);
|
|
182
|
-
const
|
|
183
|
-
|
|
196
|
+
: (detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath(cwd));
|
|
197
|
+
const requestedPreparation = argv.preparation;
|
|
198
|
+
const requestedDatasetName = typeof requestedPreparation === "string" && requestedPreparation.trim().length > 0
|
|
199
|
+
? requestedPreparation.trim()
|
|
184
200
|
: null;
|
|
185
201
|
const hintedDatasetConfig = (argv.datasetConfig ?? null);
|
|
186
202
|
const selectedCompiled = detected
|
|
187
203
|
? (() => {
|
|
188
204
|
const targetName = requestedDatasetName ?? hintedDatasetConfig?.name ?? detected.config.name;
|
|
189
|
-
return
|
|
205
|
+
return resolveConfiguredPreparationSelection({
|
|
190
206
|
sourcePath,
|
|
191
|
-
|
|
192
|
-
hintedDatasetConfig,
|
|
207
|
+
requestedPreparationName: targetName,
|
|
208
|
+
hintedPreparationConfig: hintedDatasetConfig,
|
|
193
209
|
}) ?? (targetName === detected.config.name
|
|
194
210
|
? (loadCompiledDatasetConfig(detected.path)
|
|
195
211
|
?? sourceDatasetConfigFromInterfConfig(detected.config))
|
|
196
212
|
: null);
|
|
197
213
|
})()
|
|
198
214
|
: requestedDatasetName || hintedDatasetConfig
|
|
199
|
-
?
|
|
215
|
+
? resolveConfiguredPreparationSelection({
|
|
200
216
|
sourcePath,
|
|
201
|
-
requestedDatasetName,
|
|
202
|
-
hintedDatasetConfig,
|
|
217
|
+
requestedPreparationName: requestedDatasetName,
|
|
218
|
+
hintedPreparationConfig: hintedDatasetConfig,
|
|
203
219
|
})
|
|
204
220
|
: await chooseCompiledConfigToBuild({
|
|
205
221
|
sourcePath,
|
|
206
|
-
selectMessage: "Which
|
|
222
|
+
selectMessage: "Which saved Preparation do you want to test?",
|
|
207
223
|
});
|
|
208
224
|
if (selectedCompiled === undefined)
|
|
209
225
|
return false;
|
|
210
226
|
if (!selectedCompiled) {
|
|
211
|
-
process.exitCode = 1;
|
|
212
227
|
if (requestedDatasetName) {
|
|
213
|
-
|
|
214
|
-
console.log(chalk.dim(" Run `interf list` to see the saved setups."));
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
console.log(chalk.red(" No saved setups are configured for this folder yet."));
|
|
218
|
-
console.log(chalk.dim(" Start with `interf` or `interf init`."));
|
|
228
|
+
return reportTestCommandFailure(argv, `Preparation "${requestedDatasetName}" is not saved in this Source Folder.`, ["Run `interf list` to see the saved Preparations."]);
|
|
219
229
|
}
|
|
220
|
-
return
|
|
230
|
+
return reportTestCommandFailure(argv, "No saved Preparations are configured for this Source Folder yet.", ["Start with `interf` or `interf init`."]);
|
|
221
231
|
}
|
|
222
232
|
if (selectedCompiled.checks.length === 0) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return false;
|
|
233
|
+
return reportTestCommandFailure(argv, `Preparation "${selectedCompiled.name}" does not have any readiness checks yet.`, [
|
|
234
|
+
"Run `interf`, edit this Preparation, and add a few readiness checks first.",
|
|
235
|
+
"Then rerun `interf test`.",
|
|
236
|
+
]);
|
|
228
237
|
}
|
|
229
238
|
const executionProfile = executionProfileFromArgv(argv);
|
|
230
239
|
const preserveSandboxes = readSandboxRetentionMode(argv);
|
|
231
240
|
const builtCompiledPath = detected?.config.name === selectedCompiled.name
|
|
232
241
|
? detected.path
|
|
233
242
|
: findBuiltCompiledPath(sourcePath, selectedCompiled.name);
|
|
234
|
-
const hasBuiltCompiled =
|
|
243
|
+
const hasBuiltCompiled = builtCompiledPath
|
|
244
|
+
? createCompiledTestTarget(builtCompiledPath, selectedCompiled.name, selectedCompiled.method ?? selectedCompiled.workflow ?? "interf-default").eligible
|
|
245
|
+
: false;
|
|
235
246
|
const requestedMode = readRequestedMode(argv);
|
|
236
247
|
const selectedMode = requestedMode ?? (process.stdin.isTTY && process.stdout.isTTY
|
|
237
248
|
? await promptTestMode(hasBuiltCompiled)
|
|
@@ -239,18 +250,47 @@ export async function runTestCommand(argv = {}) {
|
|
|
239
250
|
if (!selectedMode)
|
|
240
251
|
return false;
|
|
241
252
|
if (selectedMode === "compiled" && !hasBuiltCompiled) {
|
|
242
|
-
|
|
243
|
-
console.log(chalk.red(` Setup "${selectedCompiled.name}" does not have portable context agents can use yet.`));
|
|
244
|
-
console.log(chalk.dim(" Run `interf compile` first."));
|
|
245
|
-
return false;
|
|
253
|
+
return reportTestCommandFailure(argv, `Preparation "${selectedCompiled.name}" does not have Portable Context agents can use yet.`, ["Run `interf compile` first."]);
|
|
246
254
|
}
|
|
247
255
|
if (selectedMode === "both" && !hasBuiltCompiled) {
|
|
248
|
-
|
|
249
|
-
console.log(chalk.red(` Setup "${selectedCompiled.name}" does not have portable context agents can use yet, so Interf cannot compare source files and portable context.`));
|
|
250
|
-
console.log(chalk.dim(" Run `interf compile` first, or rerun with `--target raw`."));
|
|
251
|
-
return false;
|
|
256
|
+
return reportTestCommandFailure(argv, `Preparation "${selectedCompiled.name}" does not have Portable Context agents can use yet, so Interf cannot compare source files and Portable Context.`, ["Run `interf compile` first, or rerun with `--target raw`."]);
|
|
252
257
|
}
|
|
253
258
|
const mode = selectedMode;
|
|
259
|
+
if (argv.skipService !== true) {
|
|
260
|
+
const submitted = await submitTestRunToLocalService({
|
|
261
|
+
projectPath: sourcePath,
|
|
262
|
+
request: {
|
|
263
|
+
preparation: selectedCompiled.name,
|
|
264
|
+
mode,
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
if (submitted) {
|
|
268
|
+
console.log(chalk.dim(` Visible in Interf: ${submitted.serviceUrl}/`));
|
|
269
|
+
let lastStatus = "";
|
|
270
|
+
const completed = await waitForLocalTestRun({
|
|
271
|
+
serviceUrl: submitted.serviceUrl,
|
|
272
|
+
runId: submitted.resource.run_id,
|
|
273
|
+
onUpdate(resource) {
|
|
274
|
+
if (resource.status === lastStatus)
|
|
275
|
+
return;
|
|
276
|
+
lastStatus = resource.status;
|
|
277
|
+
console.log(chalk.dim(` Readiness check run: ${resource.status}`));
|
|
278
|
+
},
|
|
279
|
+
});
|
|
280
|
+
if (completed.status !== "succeeded") {
|
|
281
|
+
return reportTestCommandFailure(argv, `Readiness check run ${completed.status}.`, completed.error ? [completed.error] : []);
|
|
282
|
+
}
|
|
283
|
+
const compiledScore = completed.comparison?.compiled;
|
|
284
|
+
const rawScore = completed.comparison?.raw;
|
|
285
|
+
if (compiledScore) {
|
|
286
|
+
console.log(chalk.green(` Portable Context readiness checks: ${compiledScore.passed_cases}/${compiledScore.total_cases}`));
|
|
287
|
+
}
|
|
288
|
+
if (rawScore) {
|
|
289
|
+
console.log(chalk.dim(` Source files readiness checks: ${rawScore.passed_cases}/${rawScore.total_cases}`));
|
|
290
|
+
}
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
254
294
|
const selectedAgents = await resolveSelectedTestAgents({
|
|
255
295
|
argv,
|
|
256
296
|
executionProfile,
|
|
@@ -267,10 +307,7 @@ export async function runTestCommand(argv = {}) {
|
|
|
267
307
|
executor: agent.executor,
|
|
268
308
|
})));
|
|
269
309
|
if ((mode === "compiled" || mode === "both") && rows.some((row) => !row.compiledOutcome)) {
|
|
270
|
-
|
|
271
|
-
console.log(chalk.red(` Setup "${selectedCompiled.name}" does not have portable context agents can use yet.`));
|
|
272
|
-
console.log(chalk.dim(" Run `interf compile` first."));
|
|
273
|
-
return false;
|
|
310
|
+
return reportTestCommandFailure(argv, `Preparation "${selectedCompiled.name}" does not have Portable Context agents can use yet.`, ["Run `interf compile` first."]);
|
|
274
311
|
}
|
|
275
312
|
printAgentTestMatrix(rows);
|
|
276
313
|
printAgentTestFailures(rows);
|
|
@@ -290,7 +327,7 @@ export async function runTestCommand(argv = {}) {
|
|
|
290
327
|
sourcePath,
|
|
291
328
|
compiledPath: builtCompiledPath ?? null,
|
|
292
329
|
compiledName: selectedCompiled.name,
|
|
293
|
-
checksFingerprint:
|
|
330
|
+
checksFingerprint: fingerprintReadinessChecks(selectedCompiled.checks),
|
|
294
331
|
mode,
|
|
295
332
|
rawOutcome: row?.rawOutcome ?? null,
|
|
296
333
|
compiledOutcome: row?.compiledOutcome ?? null,
|
|
@@ -9,8 +9,8 @@ function normalizeVerifyCheck(value) {
|
|
|
9
9
|
return "stage";
|
|
10
10
|
if (value === "compiled" || value === "compile")
|
|
11
11
|
return "compiled";
|
|
12
|
-
if (value === "
|
|
13
|
-
return "
|
|
12
|
+
if (value === "method")
|
|
13
|
+
return "method";
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
16
|
export const verifyCommand = {
|
|
@@ -19,7 +19,7 @@ export const verifyCommand = {
|
|
|
19
19
|
builder: (yargs) => yargs
|
|
20
20
|
.positional("check", {
|
|
21
21
|
type: "string",
|
|
22
|
-
describe: "Check to run (`stage`, `compiled`, or `
|
|
22
|
+
describe: "Check to run (`stage`, `compiled`, or `method`)",
|
|
23
23
|
})
|
|
24
24
|
.positional("stageId", {
|
|
25
25
|
type: "string",
|
|
@@ -27,7 +27,7 @@ export const verifyCommand = {
|
|
|
27
27
|
})
|
|
28
28
|
.option("path", {
|
|
29
29
|
type: "string",
|
|
30
|
-
describe: "Path to a
|
|
30
|
+
describe: "Path to a Method package when using `verify method`",
|
|
31
31
|
})
|
|
32
32
|
.option("json", {
|
|
33
33
|
type: "boolean",
|
|
@@ -42,11 +42,11 @@ export const verifyCommand = {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
let result;
|
|
45
|
-
if (check === "
|
|
45
|
+
if (check === "method") {
|
|
46
46
|
const path = argv.path;
|
|
47
47
|
if (!path) {
|
|
48
48
|
process.exitCode = 1;
|
|
49
|
-
console.log(chalk.red("`interf verify
|
|
49
|
+
console.log(chalk.red("`interf verify method` needs --path <method-dir>."));
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
result = validateWorkflowPackage(path);
|
|
@@ -55,7 +55,7 @@ export const verifyCommand = {
|
|
|
55
55
|
const detected = detectInterf(process.cwd());
|
|
56
56
|
if (!detected) {
|
|
57
57
|
process.exitCode = 1;
|
|
58
|
-
console.log(chalk.red("Run this from inside
|
|
58
|
+
console.log(chalk.red("Run this from inside Portable Context."));
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (check === "compiled") {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
export declare const webCommand: CommandModule;
|
|
3
|
+
export interface WebProjectPaths {
|
|
4
|
+
controlPath: string;
|
|
5
|
+
sourceFolderPath: string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveWebProjectPaths(argv?: Record<string, unknown>, cwd?: string): WebProjectPaths;
|
|
8
|
+
export declare function ensureWebProjectInitialized(controlPath: string, options?: {
|
|
9
|
+
sourceFolderPath?: string | null;
|
|
10
|
+
}): void;
|
|
11
|
+
export declare function runWebCommand(argv?: Record<string, unknown>): Promise<void>;
|