@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
|
@@ -6,16 +6,16 @@ import { SOURCE_FOLDER_CONFIG_PATH, listSourceDatasetConfigs, loadSourceFolderCo
|
|
|
6
6
|
import { chooseOrCreateCompiledWorkflowForDataset, createWorkflowWizard, } from "./create-workflow-wizard.js";
|
|
7
7
|
import { findBuiltCompiledPath, } from "./compiled-flow.js";
|
|
8
8
|
import { DEFAULT_COMPILED_NAME, promptSingleCompiledConfig, } from "./source-config-wizard.js";
|
|
9
|
+
import { defaultDatasetNameForPath, } from "../../packages/project-model/source-folders.js";
|
|
10
|
+
import { resolveCommandControlPath, resolveInterfInstanceContext, } from "./control-path.js";
|
|
9
11
|
function normalizeCreateTarget(value) {
|
|
10
12
|
if (!value)
|
|
11
13
|
return null;
|
|
12
14
|
switch (value) {
|
|
13
|
-
case "
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
case "wf":
|
|
18
|
-
return "workflow";
|
|
15
|
+
case "preparation":
|
|
16
|
+
return "preparation";
|
|
17
|
+
case "method":
|
|
18
|
+
return "method";
|
|
19
19
|
default:
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
@@ -25,14 +25,14 @@ async function selectCreateTarget() {
|
|
|
25
25
|
message: "Create what?",
|
|
26
26
|
options: [
|
|
27
27
|
{
|
|
28
|
-
value: "
|
|
29
|
-
label: "
|
|
30
|
-
hint: "Add one
|
|
28
|
+
value: "preparation",
|
|
29
|
+
label: "Preparation (Recommended)",
|
|
30
|
+
hint: "Add one Preparation for this Source Folder",
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
value: "
|
|
34
|
-
label: "
|
|
35
|
-
hint: "Create a reusable local
|
|
33
|
+
value: "method",
|
|
34
|
+
label: "Method",
|
|
35
|
+
hint: "Create a reusable local Method",
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
38
|
});
|
|
@@ -41,27 +41,27 @@ async function maybeAssignWorkflowToDataset(sourcePath, workflowId) {
|
|
|
41
41
|
const config = loadSourceFolderConfig(sourcePath);
|
|
42
42
|
const datasets = listSourceDatasetConfigs(config);
|
|
43
43
|
if (datasets.length === 0) {
|
|
44
|
-
p.log.info(`Created
|
|
45
|
-
p.log.info(`Next: run \`interf\`, add a
|
|
44
|
+
p.log.info(`Created Method "${workflowId}".`);
|
|
45
|
+
p.log.info(`Next: run \`interf\`, add a Preparation, then assign Method "${workflowId}" from that menu.`);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
const assignNow = await p.confirm({
|
|
49
|
-
message: "Assign this
|
|
49
|
+
message: "Assign this Method to a Preparation now? (Recommended)",
|
|
50
50
|
initialValue: true,
|
|
51
51
|
});
|
|
52
52
|
if (p.isCancel(assignNow) || !assignNow) {
|
|
53
|
-
p.log.info(`Created
|
|
54
|
-
p.log.info(`Next: run \`interf\`, open a saved
|
|
53
|
+
p.log.info(`Created Method "${workflowId}".`);
|
|
54
|
+
p.log.info(`Next: run \`interf\`, open a saved Preparation, and assign Method "${workflowId}" from that menu.`);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
let targetDataset = datasets[0] ?? null;
|
|
58
58
|
if (datasets.length > 1) {
|
|
59
59
|
const selected = await p.select({
|
|
60
|
-
message: "Which
|
|
60
|
+
message: "Which saved Preparation should use this Method?",
|
|
61
61
|
options: datasets.map((dataset) => ({
|
|
62
62
|
value: dataset.name,
|
|
63
63
|
label: dataset.name,
|
|
64
|
-
hint: `${dataset.path} · ${dataset.about ?? `${dataset.checks.length}
|
|
64
|
+
hint: `${dataset.path} · ${dataset.about ?? `${dataset.checks.length} readiness check${dataset.checks.length === 1 ? "" : "s"}`}`,
|
|
65
65
|
})),
|
|
66
66
|
});
|
|
67
67
|
if (p.isCancel(selected))
|
|
@@ -72,6 +72,7 @@ async function maybeAssignWorkflowToDataset(sourcePath, workflowId) {
|
|
|
72
72
|
return;
|
|
73
73
|
const nextConfig = {
|
|
74
74
|
...targetDataset,
|
|
75
|
+
method: workflowId,
|
|
75
76
|
workflow: workflowId,
|
|
76
77
|
};
|
|
77
78
|
upsertSourceDatasetConfig(sourcePath, nextConfig, {
|
|
@@ -84,18 +85,18 @@ async function maybeAssignWorkflowToDataset(sourcePath, workflowId) {
|
|
|
84
85
|
else {
|
|
85
86
|
ensurePortableContextScaffold(sourcePath, nextConfig.name, nextConfig.workflow ?? "interf-default");
|
|
86
87
|
}
|
|
87
|
-
p.log.info(`Assigned
|
|
88
|
+
p.log.info(`Assigned Method "${workflowId}" to Preparation "${targetDataset.name}".`);
|
|
88
89
|
if (builtCompiledPath) {
|
|
89
|
-
p.log.info("The active local
|
|
90
|
+
p.log.info("The active local Method copy for that Portable Context lives under `.interf/method/`.");
|
|
90
91
|
}
|
|
91
92
|
p.log.info("Next: run `interf compile`, then `interf test`.");
|
|
92
93
|
}
|
|
93
94
|
export const createCommand = {
|
|
94
95
|
command: "create [type]",
|
|
95
|
-
describe: "Create a
|
|
96
|
+
describe: "Create a Preparation or reusable Method",
|
|
96
97
|
builder: (yargs) => addExecutionProfileOptions(yargs.positional("type", {
|
|
97
98
|
type: "string",
|
|
98
|
-
describe: "Type to create (`
|
|
99
|
+
describe: "Type to create (`preparation` or `method`)",
|
|
99
100
|
default: undefined,
|
|
100
101
|
})),
|
|
101
102
|
handler: async (argv) => {
|
|
@@ -113,14 +114,15 @@ export const createCommand = {
|
|
|
113
114
|
return;
|
|
114
115
|
type = selected;
|
|
115
116
|
}
|
|
116
|
-
if (type === "
|
|
117
|
+
if (type === "method") {
|
|
117
118
|
const detected = detectInterf(process.cwd());
|
|
119
|
+
const sourcePath = detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath();
|
|
118
120
|
const workflowId = await createWorkflowWizard({
|
|
119
|
-
sourcePath
|
|
121
|
+
sourcePath,
|
|
120
122
|
executionProfile,
|
|
121
123
|
});
|
|
122
124
|
if (typeof workflowId === "string") {
|
|
123
|
-
await maybeAssignWorkflowToDataset(
|
|
125
|
+
await maybeAssignWorkflowToDataset(sourcePath, workflowId);
|
|
124
126
|
}
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
@@ -129,24 +131,35 @@ export const createCommand = {
|
|
|
129
131
|
};
|
|
130
132
|
export async function createCompiledWizard(options = {}) {
|
|
131
133
|
if (options.intro !== false) {
|
|
132
|
-
p.intro(chalk.bold("Add a
|
|
134
|
+
p.intro(chalk.bold("Add a Preparation"));
|
|
133
135
|
}
|
|
134
136
|
const cwd = process.cwd();
|
|
135
137
|
const detected = detectInterf(cwd);
|
|
136
138
|
if (detected) {
|
|
137
139
|
process.exitCode = 1;
|
|
138
|
-
p.log.error("You are already inside
|
|
140
|
+
p.log.error("You are already inside Portable Context.");
|
|
139
141
|
return;
|
|
140
142
|
}
|
|
141
|
-
const
|
|
143
|
+
const initContext = resolveInterfInstanceContext(cwd);
|
|
144
|
+
const sourcePath = initContext.controlPath;
|
|
145
|
+
const savedDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath));
|
|
142
146
|
if (savedDatasets.length > 0) {
|
|
143
|
-
p.log.info(`This
|
|
147
|
+
p.log.info(`This Source Folder already has ${savedDatasets.length} saved Preparation${savedDatasets.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.`);
|
|
144
148
|
}
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
if (sourcePath !== cwd) {
|
|
150
|
+
p.log.info(`Interf Workspace: ${sourcePath}`);
|
|
151
|
+
}
|
|
152
|
+
p.log.info("Interf works one Preparation at a time. Start with the agent work, the relevant files, and a few readiness checks, then build Portable Context when you need evidence that the data is ready for agents.");
|
|
153
|
+
const existingConfig = loadSourceFolderConfig(sourcePath);
|
|
154
|
+
const initialConfig = initContext.defaultSourceFolderPath && initContext.defaultPreparationPath
|
|
155
|
+
? {
|
|
156
|
+
name: defaultDatasetNameForPath(initContext.defaultSourceFolderPath),
|
|
157
|
+
path: initContext.defaultPreparationPath,
|
|
158
|
+
}
|
|
159
|
+
: { name: DEFAULT_COMPILED_NAME };
|
|
147
160
|
const draft = await promptSingleCompiledConfig({
|
|
148
|
-
projectPath:
|
|
149
|
-
initial:
|
|
161
|
+
projectPath: sourcePath,
|
|
162
|
+
initial: initialConfig,
|
|
150
163
|
introStyle: existingConfig ? "additional" : "first",
|
|
151
164
|
});
|
|
152
165
|
if (!draft)
|
|
@@ -154,10 +167,10 @@ export async function createCompiledWizard(options = {}) {
|
|
|
154
167
|
const existingNames = new Set(listSourceDatasetConfigs(existingConfig).map((dataset) => dataset.name));
|
|
155
168
|
if (existingNames.has(draft.name)) {
|
|
156
169
|
process.exitCode = 1;
|
|
157
|
-
p.log.error(`
|
|
170
|
+
p.log.error(`Preparation "${draft.name}" already exists. Use \`interf\` or \`interf init\` to edit it.`);
|
|
158
171
|
return;
|
|
159
172
|
}
|
|
160
|
-
const workflowChoice = await chooseOrCreateCompiledWorkflowForDataset(
|
|
173
|
+
const workflowChoice = await chooseOrCreateCompiledWorkflowForDataset(sourcePath, draft, {
|
|
161
174
|
currentWorkflowId: "interf-default",
|
|
162
175
|
executionProfile: options.executionProfile,
|
|
163
176
|
});
|
|
@@ -165,12 +178,13 @@ export async function createCompiledWizard(options = {}) {
|
|
|
165
178
|
return;
|
|
166
179
|
const configToSave = {
|
|
167
180
|
...draft,
|
|
181
|
+
method: String(workflowChoice),
|
|
168
182
|
workflow: String(workflowChoice),
|
|
169
183
|
};
|
|
170
|
-
upsertSourceDatasetConfig(
|
|
171
|
-
ensurePortableContextScaffold(
|
|
184
|
+
upsertSourceDatasetConfig(sourcePath, configToSave);
|
|
185
|
+
ensurePortableContextScaffold(sourcePath, configToSave.name, configToSave.workflow);
|
|
172
186
|
p.outro(configToSave.checks.length > 0
|
|
173
|
-
? "Saved
|
|
174
|
-
: "Saved
|
|
187
|
+
? "Saved Preparation.\nNext:\n interf compile\n interf test"
|
|
188
|
+
: "Saved Preparation.\nNext:\n interf or interf init");
|
|
175
189
|
}
|
|
176
190
|
export { formatWorkflowLabel, createWorkflowWizard, createCompiledWorkflowWizard, } from "./create-workflow-wizard.js";
|
|
@@ -6,7 +6,7 @@ function printStaticLanding() {
|
|
|
6
6
|
console.log();
|
|
7
7
|
console.log(chalk.bold(" Interf"));
|
|
8
8
|
console.log(chalk.dim(" Prepare data for agent work."));
|
|
9
|
-
console.log(chalk.dim(" Run locally, process files, show evidence that your data is ready, and write verifiable outputs as
|
|
9
|
+
console.log(chalk.dim(" Run locally, process files, show evidence that your data is ready, and write verifiable outputs as Portable Context for agents."));
|
|
10
10
|
console.log();
|
|
11
11
|
if (config) {
|
|
12
12
|
console.log(chalk.dim(` Agent: ${config.agent}`));
|
|
@@ -14,13 +14,14 @@ function printStaticLanding() {
|
|
|
14
14
|
}
|
|
15
15
|
console.log(chalk.dim(" Suggested flow:"));
|
|
16
16
|
console.log(chalk.dim(" interf"));
|
|
17
|
-
console.log(chalk.dim(" interf
|
|
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 raw # optional baseline before compile"));
|
|
20
21
|
console.log();
|
|
21
22
|
console.log(chalk.dim(" More:"));
|
|
22
23
|
console.log(chalk.dim(" interf init"));
|
|
23
|
-
console.log(chalk.dim(" interf create
|
|
24
|
+
console.log(chalk.dim(" interf create method"));
|
|
24
25
|
console.log(chalk.dim(" interf doctor --live"));
|
|
25
26
|
console.log(chalk.dim(" interf --help"));
|
|
26
27
|
console.log();
|
|
@@ -11,7 +11,7 @@ function iconFor(status) {
|
|
|
11
11
|
}
|
|
12
12
|
export const doctorCommand = {
|
|
13
13
|
command: "doctor",
|
|
14
|
-
describe: "Check local executor
|
|
14
|
+
describe: "Check local executor configuration before a real local run",
|
|
15
15
|
builder: (yargs) => yargs
|
|
16
16
|
.option("live", {
|
|
17
17
|
type: "boolean",
|
|
@@ -30,7 +30,7 @@ export const doctorCommand = {
|
|
|
30
30
|
if (config) {
|
|
31
31
|
checks.push({
|
|
32
32
|
id: "config",
|
|
33
|
-
label: "Interf
|
|
33
|
+
label: "Interf config",
|
|
34
34
|
status: "pass",
|
|
35
35
|
message: `Configured default agent: ${config.agent}`,
|
|
36
36
|
});
|
|
@@ -38,9 +38,9 @@ export const doctorCommand = {
|
|
|
38
38
|
else {
|
|
39
39
|
checks.push({
|
|
40
40
|
id: "config",
|
|
41
|
-
label: "Interf
|
|
41
|
+
label: "Interf config",
|
|
42
42
|
status: "warn",
|
|
43
|
-
message: "No saved Interf
|
|
43
|
+
message: "No saved Interf config found. `interf` or `interf init` is recommended for deterministic local runs.",
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
if (!agent) {
|
|
@@ -97,7 +97,7 @@ export const doctorCommand = {
|
|
|
97
97
|
id: "live",
|
|
98
98
|
label: "Live executor preflight",
|
|
99
99
|
status: "skipped",
|
|
100
|
-
message: "Skipped. Run `interf doctor --live` to exercise the real local agent before a check draft,
|
|
100
|
+
message: "Skipped. Run `interf doctor --live` to exercise the real local agent before a check draft, Method authoring run, readiness check, or Compilation.",
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
const ok = checks.every((check) => check.status !== "fail");
|
|
@@ -88,7 +88,7 @@ async function promptForRunAgent(purpose) {
|
|
|
88
88
|
const purposeLabel = purpose === "draft"
|
|
89
89
|
? "check draft"
|
|
90
90
|
: purpose === "workflow"
|
|
91
|
-
? "
|
|
91
|
+
? "Method authoring"
|
|
92
92
|
: purpose;
|
|
93
93
|
const detected = supportedDetectedAgents();
|
|
94
94
|
if (detected.length === 0)
|