@interf/compiler 0.7.2 → 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 +141 -99
- 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 +6 -6
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +1 -1
- package/builtin-workflows/interf/improve/SKILL.md +2 -2
- package/builtin-workflows/interf/use/query/SKILL.md +2 -2
- package/builtin-workflows/interf/workflow.json +9 -9
- package/builtin-workflows/interf/workflow.schema.json +2 -2
- 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 +12 -0
- package/dist/cli/commands/create-workflow-wizard.js +232 -66
- package/dist/cli/commands/create.js +70 -46
- package/dist/cli/commands/default.js +5 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.js +362 -101
- 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 -4
- package/dist/cli/commands/source-config-wizard.js +175 -200
- 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 +35 -33
- 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 +58 -106
- 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 +8 -2
- 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 +7 -7
- 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 +48 -19
- package/dist/packages/project-model/interf-scaffold.d.ts +1 -0
- package/dist/packages/project-model/interf-scaffold.js +39 -17
- package/dist/packages/project-model/interf.d.ts +2 -2
- package/dist/packages/project-model/interf.js +2 -2
- 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/project-paths.d.ts +3 -1
- package/dist/packages/project-model/project-paths.js +6 -2
- package/dist/packages/project-model/source-config.d.ts +25 -11
- package/dist/packages/project-model/source-config.js +152 -82
- 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 +4 -3
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +4 -6
- package/dist/packages/workflow-authoring/workflow-authoring.js +46 -85
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +2 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.js +83 -49
- package/dist/packages/workflow-authoring/workflow-improvement.js +2 -1
- package/dist/packages/workflow-package/context-interface.js +2 -2
- 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-review-paths.js +5 -1
- 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 +18 -4
- 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,21 +1,21 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import * as p from "@clack/prompts";
|
|
3
|
-
import { detectInterf, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
|
|
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 { listSourceDatasetConfigs, loadSourceFolderConfig, syncCompiledInterfConfigFromSourceDatasetConfig, upsertSourceDatasetConfig, } from "../../packages/project-model/source-config.js";
|
|
6
|
-
import { createWorkflowWizard, } from "./create-workflow-wizard.js";
|
|
5
|
+
import { SOURCE_FOLDER_CONFIG_PATH, listSourceDatasetConfigs, loadSourceFolderConfig, syncCompiledInterfConfigFromSourceDatasetConfig, upsertSourceDatasetConfig, } from "../../packages/project-model/source-config.js";
|
|
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, {
|
|
@@ -81,18 +82,21 @@ async function maybeAssignWorkflowToDataset(sourcePath, workflowId) {
|
|
|
81
82
|
if (builtCompiledPath) {
|
|
82
83
|
syncCompiledInterfConfigFromSourceDatasetConfig(builtCompiledPath, nextConfig);
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
+
else {
|
|
86
|
+
ensurePortableContextScaffold(sourcePath, nextConfig.name, nextConfig.workflow ?? "interf-default");
|
|
87
|
+
}
|
|
88
|
+
p.log.info(`Assigned Method "${workflowId}" to Preparation "${targetDataset.name}".`);
|
|
85
89
|
if (builtCompiledPath) {
|
|
86
|
-
p.log.info("The active local
|
|
90
|
+
p.log.info("The active local Method copy for that Portable Context lives under `.interf/method/`.");
|
|
87
91
|
}
|
|
88
92
|
p.log.info("Next: run `interf compile`, then `interf test`.");
|
|
89
93
|
}
|
|
90
94
|
export const createCommand = {
|
|
91
95
|
command: "create [type]",
|
|
92
|
-
describe: "Create a
|
|
96
|
+
describe: "Create a Preparation or reusable Method",
|
|
93
97
|
builder: (yargs) => addExecutionProfileOptions(yargs.positional("type", {
|
|
94
98
|
type: "string",
|
|
95
|
-
describe: "Type to create (`
|
|
99
|
+
describe: "Type to create (`preparation` or `method`)",
|
|
96
100
|
default: undefined,
|
|
97
101
|
})),
|
|
98
102
|
handler: async (argv) => {
|
|
@@ -110,14 +114,15 @@ export const createCommand = {
|
|
|
110
114
|
return;
|
|
111
115
|
type = selected;
|
|
112
116
|
}
|
|
113
|
-
if (type === "
|
|
117
|
+
if (type === "method") {
|
|
114
118
|
const detected = detectInterf(process.cwd());
|
|
119
|
+
const sourcePath = detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath();
|
|
115
120
|
const workflowId = await createWorkflowWizard({
|
|
116
|
-
sourcePath
|
|
121
|
+
sourcePath,
|
|
117
122
|
executionProfile,
|
|
118
123
|
});
|
|
119
124
|
if (typeof workflowId === "string") {
|
|
120
|
-
await maybeAssignWorkflowToDataset(
|
|
125
|
+
await maybeAssignWorkflowToDataset(sourcePath, workflowId);
|
|
121
126
|
}
|
|
122
127
|
return;
|
|
123
128
|
}
|
|
@@ -126,41 +131,60 @@ export const createCommand = {
|
|
|
126
131
|
};
|
|
127
132
|
export async function createCompiledWizard(options = {}) {
|
|
128
133
|
if (options.intro !== false) {
|
|
129
|
-
p.intro(chalk.bold("Add a
|
|
134
|
+
p.intro(chalk.bold("Add a Preparation"));
|
|
130
135
|
}
|
|
131
136
|
const cwd = process.cwd();
|
|
132
137
|
const detected = detectInterf(cwd);
|
|
133
138
|
if (detected) {
|
|
134
139
|
process.exitCode = 1;
|
|
135
|
-
p.log.error("You are already inside
|
|
140
|
+
p.log.error("You are already inside Portable Context.");
|
|
136
141
|
return;
|
|
137
142
|
}
|
|
138
|
-
const
|
|
143
|
+
const initContext = resolveInterfInstanceContext(cwd);
|
|
144
|
+
const sourcePath = initContext.controlPath;
|
|
145
|
+
const savedDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(sourcePath));
|
|
139
146
|
if (savedDatasets.length > 0) {
|
|
140
|
-
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.`);
|
|
148
|
+
}
|
|
149
|
+
if (sourcePath !== cwd) {
|
|
150
|
+
p.log.info(`Interf Workspace: ${sourcePath}`);
|
|
141
151
|
}
|
|
142
|
-
p.log.info("Interf works one
|
|
143
|
-
const existingConfig = loadSourceFolderConfig(
|
|
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 };
|
|
144
160
|
const draft = await promptSingleCompiledConfig({
|
|
145
|
-
projectPath:
|
|
146
|
-
initial:
|
|
161
|
+
projectPath: sourcePath,
|
|
162
|
+
initial: initialConfig,
|
|
147
163
|
introStyle: existingConfig ? "additional" : "first",
|
|
148
164
|
});
|
|
149
165
|
if (!draft)
|
|
150
166
|
return;
|
|
151
|
-
const configToSave = {
|
|
152
|
-
...draft,
|
|
153
|
-
workflow: "interf",
|
|
154
|
-
};
|
|
155
167
|
const existingNames = new Set(listSourceDatasetConfigs(existingConfig).map((dataset) => dataset.name));
|
|
156
|
-
if (existingNames.has(
|
|
168
|
+
if (existingNames.has(draft.name)) {
|
|
157
169
|
process.exitCode = 1;
|
|
158
|
-
p.log.error(`
|
|
170
|
+
p.log.error(`Preparation "${draft.name}" already exists. Use \`interf\` or \`interf init\` to edit it.`);
|
|
159
171
|
return;
|
|
160
172
|
}
|
|
161
|
-
|
|
173
|
+
const workflowChoice = await chooseOrCreateCompiledWorkflowForDataset(sourcePath, draft, {
|
|
174
|
+
currentWorkflowId: "interf-default",
|
|
175
|
+
executionProfile: options.executionProfile,
|
|
176
|
+
});
|
|
177
|
+
if (!workflowChoice || p.isCancel(workflowChoice))
|
|
178
|
+
return;
|
|
179
|
+
const configToSave = {
|
|
180
|
+
...draft,
|
|
181
|
+
method: String(workflowChoice),
|
|
182
|
+
workflow: String(workflowChoice),
|
|
183
|
+
};
|
|
184
|
+
upsertSourceDatasetConfig(sourcePath, configToSave);
|
|
185
|
+
ensurePortableContextScaffold(sourcePath, configToSave.name, configToSave.workflow);
|
|
162
186
|
p.outro(configToSave.checks.length > 0
|
|
163
|
-
? "Saved
|
|
164
|
-
: "Saved
|
|
187
|
+
? "Saved Preparation.\nNext:\n interf compile\n interf test"
|
|
188
|
+
: "Saved Preparation.\nNext:\n interf or interf init");
|
|
165
189
|
}
|
|
166
190
|
export { formatWorkflowLabel, createWorkflowWizard, createCompiledWorkflowWizard, } from "./create-workflow-wizard.js";
|
|
@@ -5,7 +5,8 @@ function printStaticLanding() {
|
|
|
5
5
|
const config = userConfig.loadUserConfig();
|
|
6
6
|
console.log();
|
|
7
7
|
console.log(chalk.bold(" Interf"));
|
|
8
|
-
console.log(chalk.dim(" Prepare
|
|
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 Portable Context for agents."));
|
|
9
10
|
console.log();
|
|
10
11
|
if (config) {
|
|
11
12
|
console.log(chalk.dim(` Agent: ${config.agent}`));
|
|
@@ -13,13 +14,14 @@ function printStaticLanding() {
|
|
|
13
14
|
}
|
|
14
15
|
console.log(chalk.dim(" Suggested flow:"));
|
|
15
16
|
console.log(chalk.dim(" interf"));
|
|
16
|
-
console.log(chalk.dim(" interf
|
|
17
|
+
console.log(chalk.dim(" interf web # optional local UI/API"));
|
|
17
18
|
console.log(chalk.dim(" interf compile"));
|
|
18
19
|
console.log(chalk.dim(" interf test"));
|
|
20
|
+
console.log(chalk.dim(" interf test --target raw # optional baseline before compile"));
|
|
19
21
|
console.log();
|
|
20
22
|
console.log(chalk.dim(" More:"));
|
|
21
23
|
console.log(chalk.dim(" interf init"));
|
|
22
|
-
console.log(chalk.dim(" interf create
|
|
24
|
+
console.log(chalk.dim(" interf create method"));
|
|
23
25
|
console.log(chalk.dim(" interf doctor --live"));
|
|
24
26
|
console.log(chalk.dim(" interf --help"));
|
|
25
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)
|