@interf/compiler 0.4.1 → 0.5.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 +70 -66
- package/builtin-workflows/interf/README.md +6 -6
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +7 -7
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +2 -2
- package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +1 -1
- package/builtin-workflows/interf/{workspace.schema.json → compiled.schema.json} +5 -5
- package/builtin-workflows/interf/improve/SKILL.md +3 -3
- package/builtin-workflows/interf/use/query/SKILL.md +2 -2
- package/builtin-workflows/interf/workflow.json +42 -31
- package/dist/commands/check-draft.d.ts +19 -0
- package/dist/commands/check-draft.js +110 -0
- package/dist/commands/compile-controller.d.ts +4 -4
- package/dist/commands/compile-controller.js +117 -81
- package/dist/commands/compile.d.ts +5 -5
- package/dist/commands/compile.js +61 -62
- package/dist/commands/compiled-flow.d.ts +23 -0
- package/dist/commands/compiled-flow.js +112 -0
- package/dist/commands/create-workflow-wizard.d.ts +3 -3
- package/dist/commands/create-workflow-wizard.js +11 -11
- package/dist/commands/create.d.ts +2 -2
- package/dist/commands/create.js +50 -57
- package/dist/commands/default.js +2 -2
- package/dist/commands/executor-flow.d.ts +20 -1
- package/dist/commands/executor-flow.js +67 -7
- package/dist/commands/init.js +242 -289
- package/dist/commands/list.js +14 -10
- package/dist/commands/reset.js +6 -6
- package/dist/commands/source-config-wizard.d.ts +12 -8
- package/dist/commands/source-config-wizard.js +356 -119
- package/dist/commands/status.js +49 -26
- package/dist/commands/test-flow.d.ts +23 -10
- package/dist/commands/test-flow.js +274 -65
- package/dist/commands/test.d.ts +7 -1
- package/dist/commands/test.js +264 -65
- package/dist/commands/verify.js +23 -14
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4 -4
- package/dist/lib/agent-args.js +2 -1
- package/dist/lib/agent-constants.js +1 -1
- package/dist/lib/agent-render.js +4 -4
- package/dist/lib/agent-shells.d.ts +8 -8
- package/dist/lib/agent-shells.js +231 -142
- package/dist/lib/{workflow-abi.d.ts → builtin-compiled-workflow.d.ts} +37 -46
- package/dist/lib/builtin-compiled-workflow.js +153 -0
- package/dist/lib/compiled-compile.d.ts +52 -0
- package/dist/lib/compiled-compile.js +274 -0
- package/dist/lib/compiled-home.d.ts +5 -0
- package/dist/lib/compiled-home.js +32 -0
- package/dist/lib/compiled-paths.d.ts +39 -0
- package/dist/lib/compiled-paths.js +103 -0
- package/dist/lib/{workspace-raw.d.ts → compiled-raw.d.ts} +9 -8
- package/dist/lib/{workspace-raw.js → compiled-raw.js} +16 -14
- package/dist/lib/compiled-reset.d.ts +1 -0
- package/dist/lib/compiled-reset.js +44 -0
- package/dist/lib/compiled-schema.d.ts +27 -0
- package/dist/lib/compiled-schema.js +110 -0
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/config.js +0 -1
- package/dist/lib/discovery.d.ts +1 -1
- package/dist/lib/discovery.js +3 -3
- package/dist/lib/interf-bootstrap.d.ts +1 -1
- package/dist/lib/interf-bootstrap.js +4 -4
- package/dist/lib/interf-detect.d.ts +9 -10
- package/dist/lib/interf-detect.js +70 -59
- package/dist/lib/interf-scaffold.d.ts +2 -2
- package/dist/lib/interf-scaffold.js +90 -57
- package/dist/lib/interf-workflow-package.d.ts +3 -3
- package/dist/lib/interf-workflow-package.js +30 -30
- package/dist/lib/interf.d.ts +5 -5
- package/dist/lib/interf.js +4 -4
- package/dist/lib/local-workflows.d.ts +4 -4
- package/dist/lib/local-workflows.js +35 -70
- package/dist/lib/obsidian.d.ts +1 -1
- package/dist/lib/parse.js +92 -1
- package/dist/lib/project-paths.d.ts +11 -0
- package/dist/lib/project-paths.js +32 -0
- package/dist/lib/runtime-acceptance.d.ts +7 -1
- package/dist/lib/runtime-acceptance.js +194 -59
- package/dist/lib/runtime-contracts.d.ts +2 -4
- package/dist/lib/runtime-contracts.js +17 -161
- package/dist/lib/runtime-inventory.d.ts +7 -0
- package/dist/lib/runtime-inventory.js +29 -0
- package/dist/lib/runtime-paths.js +5 -5
- package/dist/lib/runtime-prompt.js +7 -6
- package/dist/lib/runtime-reconcile.d.ts +2 -3
- package/dist/lib/runtime-reconcile.js +94 -184
- package/dist/lib/runtime-runs.js +25 -119
- package/dist/lib/runtime-types.d.ts +10 -19
- package/dist/lib/runtime.d.ts +2 -2
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/schema.d.ts +169 -153
- package/dist/lib/schema.js +116 -164
- package/dist/lib/source-config.d.ts +24 -20
- package/dist/lib/source-config.js +159 -122
- package/dist/lib/state-artifacts.d.ts +5 -5
- package/dist/lib/state-artifacts.js +8 -8
- package/dist/lib/state-health.d.ts +4 -4
- package/dist/lib/state-health.js +110 -126
- package/dist/lib/state-io.d.ts +8 -8
- package/dist/lib/state-io.js +21 -102
- package/dist/lib/state-paths.js +5 -5
- package/dist/lib/state-view.d.ts +4 -4
- package/dist/lib/state-view.js +52 -55
- package/dist/lib/state.d.ts +5 -5
- package/dist/lib/state.js +4 -4
- package/dist/lib/summarize-plan.d.ts +3 -2
- package/dist/lib/summarize-plan.js +19 -21
- package/dist/lib/test-execution.js +9 -9
- package/dist/lib/test-matrices.d.ts +3 -3
- package/dist/lib/test-matrices.js +6 -6
- package/dist/lib/test-paths.d.ts +4 -4
- package/dist/lib/test-paths.js +26 -11
- package/dist/lib/test-sandbox.d.ts +1 -1
- package/dist/lib/test-sandbox.js +32 -38
- package/dist/lib/test-specs.js +1 -1
- package/dist/lib/test-targets.d.ts +2 -2
- package/dist/lib/test-targets.js +11 -11
- package/dist/lib/test-types.d.ts +1 -1
- package/dist/lib/test.d.ts +1 -1
- package/dist/lib/test.js +1 -1
- package/dist/lib/util.d.ts +2 -0
- package/dist/lib/util.js +14 -1
- package/dist/lib/validate-compiled.d.ts +27 -0
- package/dist/lib/validate-compiled.js +238 -0
- package/dist/lib/validate-helpers.d.ts +0 -8
- package/dist/lib/validate-helpers.js +0 -30
- package/dist/lib/validate.d.ts +6 -4
- package/dist/lib/validate.js +76 -27
- package/dist/lib/workflow-definitions.d.ts +12 -11
- package/dist/lib/workflow-definitions.js +45 -55
- package/dist/lib/workflow-helpers.d.ts +2 -3
- package/dist/lib/workflow-helpers.js +9 -13
- package/dist/lib/workflow-improvement.d.ts +3 -3
- package/dist/lib/workflow-improvement.js +48 -48
- package/dist/lib/workflow-primitives.d.ts +2 -0
- package/dist/lib/workflow-primitives.js +5 -0
- package/dist/lib/workflow-review-paths.d.ts +3 -3
- package/dist/lib/workflow-review-paths.js +11 -11
- package/dist/lib/workflow-stage-runner.d.ts +1 -1
- package/dist/lib/workflow-stage-runner.js +8 -8
- package/dist/lib/workflows.d.ts +9 -9
- package/dist/lib/workflows.js +15 -17
- package/package.json +13 -12
- package/dist/commands/workspace-flow.d.ts +0 -23
- package/dist/commands/workspace-flow.js +0 -109
- package/dist/lib/registry.d.ts +0 -16
- package/dist/lib/registry.js +0 -65
- package/dist/lib/validate-workspace.d.ts +0 -121
- package/dist/lib/validate-workspace.js +0 -407
- package/dist/lib/workflow-abi.js +0 -181
- package/dist/lib/workspace-compile.d.ts +0 -54
- package/dist/lib/workspace-compile.js +0 -476
- package/dist/lib/workspace-home.d.ts +0 -5
- package/dist/lib/workspace-home.js +0 -32
- package/dist/lib/workspace-layout.d.ts +0 -2
- package/dist/lib/workspace-layout.js +0 -60
- package/dist/lib/workspace-paths.d.ts +0 -41
- package/dist/lib/workspace-paths.js +0 -107
- package/dist/lib/workspace-reset.d.ts +0 -1
- package/dist/lib/workspace-reset.js +0 -43
- package/dist/lib/workspace-schema.d.ts +0 -17
- package/dist/lib/workspace-schema.js +0 -74
package/dist/commands/list.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import {
|
|
2
|
+
import { detectInterf, resolveSourceControlPath, } from "../lib/interf.js";
|
|
3
|
+
import { listSavedCompiledEntries } from "./compiled-flow.js";
|
|
3
4
|
export const listCommand = {
|
|
4
5
|
command: "list",
|
|
5
|
-
describe: "List
|
|
6
|
+
describe: "List datasets in this project",
|
|
6
7
|
handler: async () => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const detected = detectInterf(process.cwd());
|
|
9
|
+
const sourcePath = detected ? resolveSourceControlPath(detected.path) : process.cwd();
|
|
10
|
+
const datasets = listSavedCompiledEntries(sourcePath);
|
|
11
|
+
if (datasets.length === 0) {
|
|
12
|
+
console.log(chalk.dim(" Nothing found. Start with `interf`, run `interf test`, then compile a dataset when needed."));
|
|
10
13
|
return;
|
|
11
14
|
}
|
|
12
15
|
console.log();
|
|
13
|
-
console.log(chalk.bold("
|
|
16
|
+
console.log(chalk.bold(" Datasets"));
|
|
14
17
|
console.log();
|
|
15
|
-
for (const
|
|
16
|
-
console.log(` ${
|
|
17
|
-
console.log(chalk.dim(` ${
|
|
18
|
-
console.log(chalk.dim(` workflow: ${
|
|
18
|
+
for (const dataset of datasets) {
|
|
19
|
+
console.log(` ${dataset.config.name}`);
|
|
20
|
+
console.log(chalk.dim(` ${dataset.path ?? "not built yet"}`));
|
|
21
|
+
console.log(chalk.dim(` workflow: ${dataset.config.workflow ?? "interf"}`));
|
|
22
|
+
console.log(chalk.dim(` checks: ${dataset.config.checks.length}`));
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
};
|
package/dist/commands/reset.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { detectInterf } from "../lib/interf.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resetCompiledGeneratedState } from "../lib/compiled-reset.js";
|
|
4
4
|
export const resetCommand = {
|
|
5
5
|
command: "reset <scope>",
|
|
6
|
-
describe: "Reset generated
|
|
6
|
+
describe: "Reset generated compiled state while keeping source files",
|
|
7
7
|
builder: (yargs) => yargs.positional("scope", {
|
|
8
8
|
type: "string",
|
|
9
9
|
choices: ["compile", "all"],
|
|
@@ -12,11 +12,11 @@ export const resetCommand = {
|
|
|
12
12
|
const detected = detectInterf(process.cwd());
|
|
13
13
|
if (!detected) {
|
|
14
14
|
process.exitCode = 1;
|
|
15
|
-
console.log(chalk.red("Run this from inside a compiled
|
|
15
|
+
console.log(chalk.red("Run this from inside a compiled dataset."));
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
console.log(chalk.green("
|
|
18
|
+
const compiledPath = detected.path;
|
|
19
|
+
resetCompiledGeneratedState(compiledPath, argv.scope);
|
|
20
|
+
console.log(chalk.green(" Compiled reset complete."));
|
|
21
21
|
},
|
|
22
22
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { SourceTruthCheck,
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
1
|
+
import type { SourceTruthCheck, SourceDatasetConfig } from "../lib/schema.js";
|
|
2
|
+
export declare const DEFAULT_COMPILED_NAME = "dataset1";
|
|
3
|
+
export declare const DEFAULT_COMPILED_CHECK_QUESTION_PLACEHOLDER = "A question you can already verify from this dataset";
|
|
4
|
+
export declare const DEFAULT_COMPILED_CHECK_ANSWER_PLACEHOLDER = "The expected answer in plain English";
|
|
5
|
+
export declare const DEFAULT_COMPILED_ABOUT_PLACEHOLDER = "Example: forward-demand metrics, board-prep questions, or chart reads from this dataset.";
|
|
6
|
+
export declare const DEFAULT_DATASET_PATH_PLACEHOLDER = "./dataset1";
|
|
6
7
|
export declare const DEFAULT_COMPILE_RETRY_ATTEMPTS = 1;
|
|
7
8
|
export declare const DEFAULT_SELF_IMPROVING_LOOPS = 3;
|
|
8
9
|
export type CompileLoopMode = "once" | "retry" | "self-improving";
|
|
@@ -10,6 +11,8 @@ export interface CompileLoopSelection {
|
|
|
10
11
|
max_attempts?: number;
|
|
11
12
|
max_loops?: number;
|
|
12
13
|
}
|
|
14
|
+
export declare function defaultDatasetPathForPrompt(name: string, introStyle: "first" | "additional" | "edit", cwd?: string): string;
|
|
15
|
+
export declare function datasetAboutPromptMessage(introStyle: "first" | "additional" | "edit"): string;
|
|
13
16
|
export declare function resolveCompileLoopMode(maxAttempts?: number | null, maxLoops?: number | null): CompileLoopMode;
|
|
14
17
|
export declare function describeCompileLoopSelection(options: {
|
|
15
18
|
maxAttempts?: number | null;
|
|
@@ -33,11 +36,12 @@ export declare function promptCompileLoopSelection(options: {
|
|
|
33
36
|
includeCompileOnce?: boolean;
|
|
34
37
|
recommendedMode?: CompileLoopMode;
|
|
35
38
|
}): Promise<CompileLoopSelection | null>;
|
|
36
|
-
export declare function
|
|
37
|
-
|
|
39
|
+
export declare function promptSingleCompiledConfig(options?: {
|
|
40
|
+
projectPath?: string;
|
|
41
|
+
initial?: Partial<Pick<SourceDatasetConfig, "name" | "path" | "about" | "checks" | "max_attempts" | "max_loops">>;
|
|
38
42
|
fixedName?: string;
|
|
39
43
|
skipAboutPrompt?: boolean;
|
|
40
44
|
skipNamePrompt?: boolean;
|
|
41
45
|
introStyle?: "first" | "additional" | "edit";
|
|
42
46
|
selectedWorkflowLabel?: string;
|
|
43
|
-
}): Promise<
|
|
47
|
+
}): Promise<SourceDatasetConfig | null>;
|