@interf/compiler 0.9.1 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/agent-skills/interf-actions/SKILL.md +3 -0
- package/agent-skills/interf-actions/references/cli.md +13 -13
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
- package/dist/cli/commands/check-draft.d.ts +6 -6
- package/dist/cli/commands/check-draft.js +5 -5
- package/dist/cli/commands/compile-controller.d.ts +7 -7
- package/dist/cli/commands/compile-controller.js +35 -38
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +23 -21
- package/dist/cli/commands/compiled-flow.d.ts +11 -11
- package/dist/cli/commands/compiled-flow.js +33 -30
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +44 -45
- package/dist/cli/commands/default.js +1 -1
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +139 -118
- package/dist/cli/commands/list.js +11 -10
- package/dist/cli/commands/preparation-selection.d.ts +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +9 -9
- package/dist/cli/commands/source-config-wizard.js +43 -43
- package/dist/cli/commands/status.js +36 -9
- package/dist/cli/commands/test-flow.d.ts +15 -15
- package/dist/cli/commands/test-flow.js +29 -219
- package/dist/cli/commands/test.d.ts +2 -2
- package/dist/cli/commands/test.js +50 -51
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.js +41 -28
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js} +15 -21
- package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
- package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -3
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/executors.d.ts +13 -13
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/shells.d.ts +25 -24
- package/dist/packages/agents/lib/shells.js +161 -154
- package/dist/packages/agents/lib/types.d.ts +2 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -7
- package/dist/packages/compiler/compiled-paths.js +9 -15
- package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
- package/dist/packages/compiler/compiled-pipeline.js +22 -22
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +8 -8
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
- package/dist/packages/compiler/compiled-stage-runner.js +7 -7
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +62 -247
- package/dist/packages/compiler/lib/schema.js +56 -174
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +4 -4
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +9 -9
- package/dist/packages/compiler/runtime-types.d.ts +8 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -64
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/index.d.ts +2 -2
- package/dist/packages/execution/index.js +1 -1
- package/dist/packages/execution/lib/schema.d.ts +80 -83
- package/dist/packages/execution/lib/schema.js +25 -48
- package/dist/packages/local-service/action-values.d.ts +1 -1
- package/dist/packages/local-service/action-values.js +1 -1
- package/dist/packages/local-service/client.d.ts +4 -4
- package/dist/packages/local-service/client.js +4 -4
- package/dist/packages/local-service/index.d.ts +3 -3
- package/dist/packages/local-service/index.js +2 -2
- package/dist/packages/local-service/lib/schema.d.ts +540 -974
- package/dist/packages/local-service/lib/schema.js +44 -160
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +19 -23
- package/dist/packages/local-service/runtime.js +349 -913
- package/dist/packages/local-service/server.d.ts +1 -0
- package/dist/packages/local-service/server.js +25 -20
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +1 -4
- package/dist/packages/project-model/index.js +0 -3
- package/dist/packages/project-model/interf-detect.d.ts +1 -5
- package/dist/packages/project-model/interf-detect.js +7 -18
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +38 -39
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +2 -66
- package/dist/packages/project-model/lib/schema.js +5 -23
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +11 -18
- package/dist/packages/project-model/source-config.js +42 -60
- package/dist/packages/project-model/source-folders.d.ts +4 -4
- package/dist/packages/project-model/source-folders.js +10 -10
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +6 -6
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +16 -33
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +0 -3
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -457
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -211
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
|
@@ -2,12 +2,13 @@ import chalk from "chalk";
|
|
|
2
2
|
import * as p from "@clack/prompts";
|
|
3
3
|
import { detectInterf, ensurePortableContextScaffold, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
|
|
4
4
|
import { addExecutionProfileOptions, executionProfileFromArgv, } from "../../packages/agents/lib/execution-profile.js";
|
|
5
|
-
import { SOURCE_FOLDER_CONFIG_PATH,
|
|
6
|
-
import {
|
|
5
|
+
import { SOURCE_FOLDER_CONFIG_PATH, listSourcePreparationConfigs, loadSourceFolderConfig, syncCompiledInterfConfigFromSourcePreparationConfig, upsertSourcePreparationConfig, } from "../../packages/project-model/source-config.js";
|
|
6
|
+
import { chooseOrCreateCompiledMethodForPreparation, createMethodWizard, } from "./create-method-wizard.js";
|
|
7
7
|
import { findBuiltCompiledPath, } from "./compiled-flow.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { DEFAULT_PREPARATION_NAME, promptSingleCompiledConfig, } from "./source-config-wizard.js";
|
|
9
|
+
import { defaultPreparationNameForPath, } from "../../packages/project-model/source-folders.js";
|
|
10
10
|
import { resolveCommandControlPath, resolveInterfInstanceContext, } from "./control-path.js";
|
|
11
|
+
import { resolveMethodId } from "../../packages/methods/method-resolution.js";
|
|
11
12
|
function normalizeCreateTarget(value) {
|
|
12
13
|
if (!value)
|
|
13
14
|
return null;
|
|
@@ -37,12 +38,12 @@ async function selectCreateTarget() {
|
|
|
37
38
|
],
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
async function
|
|
41
|
+
async function maybeAssignMethodToPreparation(sourcePath, methodId) {
|
|
41
42
|
const config = loadSourceFolderConfig(sourcePath);
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
p.log.info(`Created Method "${
|
|
45
|
-
p.log.info(`Next: run \`interf\`, add a Preparation, then assign Method "${
|
|
43
|
+
const preparations = listSourcePreparationConfigs(config);
|
|
44
|
+
if (preparations.length === 0) {
|
|
45
|
+
p.log.info(`Created Method "${methodId}".`);
|
|
46
|
+
p.log.info(`Next: run \`interf\`, add a Preparation, then assign Method "${methodId}" from that menu.`);
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
49
|
const assignNow = await p.confirm({
|
|
@@ -50,42 +51,41 @@ async function maybeAssignWorkflowToDataset(sourcePath, workflowId) {
|
|
|
50
51
|
initialValue: true,
|
|
51
52
|
});
|
|
52
53
|
if (p.isCancel(assignNow) || !assignNow) {
|
|
53
|
-
p.log.info(`Created Method "${
|
|
54
|
-
p.log.info(`Next: run \`interf\`, open a saved Preparation, and assign Method "${
|
|
54
|
+
p.log.info(`Created Method "${methodId}".`);
|
|
55
|
+
p.log.info(`Next: run \`interf\`, open a saved Preparation, and assign Method "${methodId}" from that menu.`);
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
let
|
|
58
|
-
if (
|
|
58
|
+
let targetPreparation = preparations[0] ?? null;
|
|
59
|
+
if (preparations.length > 1) {
|
|
59
60
|
const selected = await p.select({
|
|
60
61
|
message: "Which saved Preparation should use this Method?",
|
|
61
|
-
options:
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
hint: `${
|
|
62
|
+
options: preparations.map((preparation) => ({
|
|
63
|
+
value: preparation.name,
|
|
64
|
+
label: preparation.name,
|
|
65
|
+
hint: `${preparation.path} · ${preparation.about ?? `${preparation.checks.length} readiness check${preparation.checks.length === 1 ? "" : "s"}`}`,
|
|
65
66
|
})),
|
|
66
67
|
});
|
|
67
68
|
if (p.isCancel(selected))
|
|
68
69
|
return;
|
|
69
|
-
|
|
70
|
+
targetPreparation = preparations.find((preparation) => preparation.name === selected) ?? null;
|
|
70
71
|
}
|
|
71
|
-
if (!
|
|
72
|
+
if (!targetPreparation)
|
|
72
73
|
return;
|
|
73
74
|
const nextConfig = {
|
|
74
|
-
...
|
|
75
|
-
method:
|
|
76
|
-
workflow: workflowId,
|
|
75
|
+
...targetPreparation,
|
|
76
|
+
method: methodId,
|
|
77
77
|
};
|
|
78
|
-
|
|
79
|
-
matchName:
|
|
78
|
+
upsertSourcePreparationConfig(sourcePath, nextConfig, {
|
|
79
|
+
matchName: targetPreparation.name,
|
|
80
80
|
});
|
|
81
|
-
const builtCompiledPath = findBuiltCompiledPath(sourcePath,
|
|
81
|
+
const builtCompiledPath = findBuiltCompiledPath(sourcePath, targetPreparation.name);
|
|
82
82
|
if (builtCompiledPath) {
|
|
83
|
-
|
|
83
|
+
syncCompiledInterfConfigFromSourcePreparationConfig(builtCompiledPath, nextConfig);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
ensurePortableContextScaffold(sourcePath, nextConfig.name, nextConfig
|
|
86
|
+
ensurePortableContextScaffold(sourcePath, nextConfig.name, resolveMethodId(nextConfig));
|
|
87
87
|
}
|
|
88
|
-
p.log.info(`Assigned Method "${
|
|
88
|
+
p.log.info(`Assigned Method "${methodId}" to Preparation "${targetPreparation.name}".`);
|
|
89
89
|
if (builtCompiledPath) {
|
|
90
90
|
p.log.info("The active local Method copy for that Portable Context lives under `.interf/method/`.");
|
|
91
91
|
}
|
|
@@ -117,12 +117,12 @@ export const createCommand = {
|
|
|
117
117
|
if (type === "method") {
|
|
118
118
|
const detected = detectInterf(process.cwd());
|
|
119
119
|
const sourcePath = detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath();
|
|
120
|
-
const
|
|
120
|
+
const methodId = await createMethodWizard({
|
|
121
121
|
sourcePath,
|
|
122
122
|
executionProfile,
|
|
123
123
|
});
|
|
124
|
-
if (typeof
|
|
125
|
-
await
|
|
124
|
+
if (typeof methodId === "string") {
|
|
125
|
+
await maybeAssignMethodToPreparation(sourcePath, methodId);
|
|
126
126
|
}
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
@@ -142,9 +142,9 @@ export async function createCompiledWizard(options = {}) {
|
|
|
142
142
|
}
|
|
143
143
|
const initContext = resolveInterfInstanceContext(cwd);
|
|
144
144
|
const sourcePath = initContext.controlPath;
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
p.log.info(`This Source Folder already has ${
|
|
145
|
+
const savedPreparations = listSourcePreparationConfigs(loadSourceFolderConfig(sourcePath));
|
|
146
|
+
if (savedPreparations.length > 0) {
|
|
147
|
+
p.log.info(`This Source Folder already has ${savedPreparations.length} saved Preparation${savedPreparations.length === 1 ? "" : "s"} in ${SOURCE_FOLDER_CONFIG_PATH}. Add another only when you need a separate Source Folder, agent-work focus, or readiness-check set.`);
|
|
148
148
|
}
|
|
149
149
|
if (sourcePath !== cwd) {
|
|
150
150
|
p.log.info(`Interf Workspace: ${sourcePath}`);
|
|
@@ -153,10 +153,10 @@ export async function createCompiledWizard(options = {}) {
|
|
|
153
153
|
const existingConfig = loadSourceFolderConfig(sourcePath);
|
|
154
154
|
const initialConfig = initContext.defaultSourceFolderPath && initContext.defaultPreparationPath
|
|
155
155
|
? {
|
|
156
|
-
name:
|
|
156
|
+
name: defaultPreparationNameForPath(initContext.defaultSourceFolderPath),
|
|
157
157
|
path: initContext.defaultPreparationPath,
|
|
158
158
|
}
|
|
159
|
-
: { name:
|
|
159
|
+
: { name: DEFAULT_PREPARATION_NAME };
|
|
160
160
|
const draft = await promptSingleCompiledConfig({
|
|
161
161
|
projectPath: sourcePath,
|
|
162
162
|
initial: initialConfig,
|
|
@@ -164,27 +164,26 @@ export async function createCompiledWizard(options = {}) {
|
|
|
164
164
|
});
|
|
165
165
|
if (!draft)
|
|
166
166
|
return;
|
|
167
|
-
const existingNames = new Set(
|
|
167
|
+
const existingNames = new Set(listSourcePreparationConfigs(existingConfig).map((preparation) => preparation.name));
|
|
168
168
|
if (existingNames.has(draft.name)) {
|
|
169
169
|
process.exitCode = 1;
|
|
170
170
|
p.log.error(`Preparation "${draft.name}" already exists. Use \`interf\` or \`interf init\` to edit it.`);
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
174
|
-
|
|
173
|
+
const methodChoice = await chooseOrCreateCompiledMethodForPreparation(sourcePath, draft, {
|
|
174
|
+
currentMethodId: "interf-default",
|
|
175
175
|
executionProfile: options.executionProfile,
|
|
176
176
|
});
|
|
177
|
-
if (!
|
|
177
|
+
if (!methodChoice || p.isCancel(methodChoice))
|
|
178
178
|
return;
|
|
179
179
|
const configToSave = {
|
|
180
180
|
...draft,
|
|
181
|
-
method: String(
|
|
182
|
-
workflow: String(workflowChoice),
|
|
181
|
+
method: String(methodChoice),
|
|
183
182
|
};
|
|
184
|
-
|
|
185
|
-
ensurePortableContextScaffold(sourcePath, configToSave.name, configToSave.
|
|
183
|
+
upsertSourcePreparationConfig(sourcePath, configToSave);
|
|
184
|
+
ensurePortableContextScaffold(sourcePath, configToSave.name, configToSave.method);
|
|
186
185
|
p.outro(configToSave.checks.length > 0
|
|
187
186
|
? "Saved Preparation.\nNext:\n interf compile\n interf test"
|
|
188
187
|
: "Saved Preparation.\nNext:\n interf or interf init");
|
|
189
188
|
}
|
|
190
|
-
export {
|
|
189
|
+
export { formatMethodLabel, createMethodWizard, createCompiledMethodWizard, } from "./create-method-wizard.js";
|
|
@@ -17,7 +17,7 @@ function printStaticLanding() {
|
|
|
17
17
|
console.log(chalk.dim(" interf web # optional local UI/API"));
|
|
18
18
|
console.log(chalk.dim(" interf compile"));
|
|
19
19
|
console.log(chalk.dim(" interf test"));
|
|
20
|
-
console.log(chalk.dim(" interf test --target
|
|
20
|
+
console.log(chalk.dim(" interf test --target source-files # optional baseline before compile"));
|
|
21
21
|
console.log();
|
|
22
22
|
console.log(chalk.dim(" More:"));
|
|
23
23
|
console.log(chalk.dim(" interf init"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MethodExecutionProfile, type MethodExecutor } from "../../packages/agents/index.js";
|
|
2
2
|
export interface RunAgentOption {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
@@ -9,9 +9,9 @@ export declare function resolvedConfiguredAgentName(): string | null;
|
|
|
9
9
|
export declare function listRunAgentOptions(): RunAgentOption[];
|
|
10
10
|
export declare function resolveNamedLocalExecutor(agentName: string, options?: {
|
|
11
11
|
preflight?: boolean;
|
|
12
|
-
executionProfile?:
|
|
12
|
+
executionProfile?: MethodExecutionProfile;
|
|
13
13
|
}): {
|
|
14
|
-
executor:
|
|
14
|
+
executor: MethodExecutor | null;
|
|
15
15
|
error?: string;
|
|
16
16
|
};
|
|
17
17
|
export declare function promptForTestAgents(): Promise<{
|
|
@@ -20,10 +20,10 @@ export declare function promptForTestAgents(): Promise<{
|
|
|
20
20
|
}>;
|
|
21
21
|
export declare function resolveOrConfigureLocalExecutor(options?: {
|
|
22
22
|
preflight?: boolean;
|
|
23
|
-
executionProfile?:
|
|
24
|
-
purpose?: "compile" | "test" | "draft" | "
|
|
23
|
+
executionProfile?: MethodExecutionProfile;
|
|
24
|
+
purpose?: "compile" | "test" | "draft" | "method";
|
|
25
25
|
}): Promise<{
|
|
26
|
-
executor:
|
|
26
|
+
executor: MethodExecutor | null;
|
|
27
27
|
error?: string;
|
|
28
28
|
cancelled?: boolean;
|
|
29
29
|
}>;
|
|
@@ -87,7 +87,7 @@ export async function promptForTestAgents() {
|
|
|
87
87
|
async function promptForRunAgent(purpose) {
|
|
88
88
|
const purposeLabel = purpose === "draft"
|
|
89
89
|
? "check draft"
|
|
90
|
-
: purpose === "
|
|
90
|
+
: purpose === "method"
|
|
91
91
|
? "Method authoring"
|
|
92
92
|
: purpose;
|
|
93
93
|
const detected = supportedDetectedAgents();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
|
|
3
3
|
import { type AgentTestMatrixRow } from "./test-flow.js";
|
|
4
4
|
import { runCompileCommand } from "./compile.js";
|
|
5
5
|
export type CurrentRunTargetStatus = "pass" | "mixed" | "fail" | "missing";
|
|
6
6
|
export declare function currentRunTargetStatus(rows: AgentTestMatrixRow[], target: "raw" | "compiled"): CurrentRunTargetStatus;
|
|
7
|
-
export declare function compileSelectedCompiled(sourcePath: string, compiledConfig:
|
|
7
|
+
export declare function compileSelectedCompiled(sourcePath: string, compiledConfig: SourcePreparationConfig, deps?: {
|
|
8
8
|
runCompileCommand?: typeof runCompileCommand;
|
|
9
9
|
}): Promise<import("./compile.js").CompileCommandResult | null>;
|
|
10
10
|
export declare const initCommand: CommandModule;
|