@interf/compiler 0.9.1 → 0.9.3
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/13g~4mamjft.c.css → dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css} +1 -1
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js} +15 -21
- 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 +0 -1
- package/dist/packages/local-service/action-values.js +0 -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 +536 -974
- package/dist/packages/local-service/lib/schema.js +43 -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 +302 -880
- 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/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 → 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/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_ssgManifest.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
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { isWorkflowId, listLocalWorkflowDefinitions, loadLocalWorkflowDefinition, loadWorkflowDefinitionFromDir, } from "./local-workflows.js";
|
|
4
|
-
import { warnInterf } from "../shared/logger.js";
|
|
5
|
-
import { workflowPackagePathForCompiled } from "../compiler/compiled-paths.js";
|
|
6
|
-
import { legacyWorkflowPackagePathForCompiled } from "../compiler/compiled-paths.js";
|
|
7
|
-
import { resolveSourceControlPath } from "../project-model/interf.js";
|
|
8
|
-
import { PACKAGE_ROOT } from "./lib/package-root.js";
|
|
9
|
-
import { deriveWorkflowInputsFromContextInterface, } from "./context-interface.js";
|
|
10
|
-
import { mergeStagePolicyNotesForStages } from "./workflow-stage-policy.js";
|
|
11
|
-
let builtinInterfWorkflowCache = null;
|
|
12
|
-
function toWorkflowStages(stages) {
|
|
13
|
-
return stages.map((stage) => ({
|
|
14
|
-
id: stage.id,
|
|
15
|
-
label: stage.label,
|
|
16
|
-
description: stage.description ?? stage.label,
|
|
17
|
-
contractType: stage.contract_type,
|
|
18
|
-
skillDir: stage.skill_dir ?? stage.id,
|
|
19
|
-
reads: [...stage.reads],
|
|
20
|
-
writes: [...stage.writes],
|
|
21
|
-
...(stage.acceptance ? { acceptance: stage.acceptance } : {}),
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
export function standaloneWorkflowDefinitionFromLocalPackage(local) {
|
|
25
|
-
if (!local.stages || local.stages.length === 0) {
|
|
26
|
-
throw new Error(`Workflow package "${local.id}" is missing explicit stages. Compiled-local and portable workflow packages must be standalone.`);
|
|
27
|
-
}
|
|
28
|
-
const stages = toWorkflowStages(local.stages);
|
|
29
|
-
const contextInterface = local.workflow_schema;
|
|
30
|
-
const inputs = local.inputs?.length
|
|
31
|
-
? [...local.inputs]
|
|
32
|
-
: deriveWorkflowInputsFromContextInterface(contextInterface);
|
|
33
|
-
return {
|
|
34
|
-
id: local.id,
|
|
35
|
-
compilerApi: local.compiler_api ?? {
|
|
36
|
-
kind: "compiled",
|
|
37
|
-
version: 1,
|
|
38
|
-
},
|
|
39
|
-
...(local.purpose
|
|
40
|
-
? {
|
|
41
|
-
purpose: {
|
|
42
|
-
label: local.purpose.label,
|
|
43
|
-
taskHint: local.purpose.task_hint,
|
|
44
|
-
},
|
|
45
|
-
}
|
|
46
|
-
: {}),
|
|
47
|
-
inputs,
|
|
48
|
-
label: local.label,
|
|
49
|
-
hint: local.hint,
|
|
50
|
-
recommended: false,
|
|
51
|
-
contextInterface,
|
|
52
|
-
...(contextInterface ? { schema: contextInterface } : {}),
|
|
53
|
-
stages,
|
|
54
|
-
stagePolicyNotes: mergeStagePolicyNotesForStages(stages, undefined, local.stage_policy_notes),
|
|
55
|
-
starterDocs: [...local.starter_docs],
|
|
56
|
-
scope: "local",
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function builtinWorkflowPackagePath(workflowId) {
|
|
60
|
-
return join(PACKAGE_ROOT, "builtin-workflows", workflowId);
|
|
61
|
-
}
|
|
62
|
-
function getBuiltinInterfWorkflow() {
|
|
63
|
-
if (builtinInterfWorkflowCache)
|
|
64
|
-
return builtinInterfWorkflowCache;
|
|
65
|
-
const local = loadWorkflowDefinitionFromDir(builtinWorkflowPackagePath("interf"));
|
|
66
|
-
if (!local) {
|
|
67
|
-
throw new Error("Missing built-in Interf workflow package at builtin-workflows/interf.");
|
|
68
|
-
}
|
|
69
|
-
const resolved = standaloneWorkflowDefinitionFromLocalPackage(local);
|
|
70
|
-
builtinInterfWorkflowCache = {
|
|
71
|
-
...resolved,
|
|
72
|
-
id: "interf",
|
|
73
|
-
recommended: true,
|
|
74
|
-
scope: "builtin",
|
|
75
|
-
};
|
|
76
|
-
return builtinInterfWorkflowCache;
|
|
77
|
-
}
|
|
78
|
-
function listBuiltinCompiledWorkflows() {
|
|
79
|
-
return [getBuiltinInterfWorkflow()];
|
|
80
|
-
}
|
|
81
|
-
function resolveCompiledWorkflowFromLocal(workflowId, sourcePath) {
|
|
82
|
-
const local = loadLocalWorkflowDefinition(sourcePath, workflowId);
|
|
83
|
-
if (!local)
|
|
84
|
-
return null;
|
|
85
|
-
if (local.extends) {
|
|
86
|
-
throw new Error(`Workflow "${workflowId}" uses legacy extends. Rewrite it as a standalone package before creating or compiling a compiled context.`);
|
|
87
|
-
}
|
|
88
|
-
const resolved = standaloneWorkflowDefinitionFromLocalPackage(local);
|
|
89
|
-
return resolved;
|
|
90
|
-
}
|
|
91
|
-
export function listCompiledWorkflowChoices(sourcePath) {
|
|
92
|
-
const builtins = listBuiltinCompiledWorkflows();
|
|
93
|
-
if (!sourcePath)
|
|
94
|
-
return builtins;
|
|
95
|
-
const locals = listLocalWorkflowDefinitions(sourcePath)
|
|
96
|
-
.filter((definition) => definition.id !== "interf")
|
|
97
|
-
.map((definition) => {
|
|
98
|
-
try {
|
|
99
|
-
return resolveCompiledWorkflowFromLocal(definition.id, sourcePath);
|
|
100
|
-
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
warnInterf(`Warning: skipping local workflow "${definition.id}" because it could not be resolved cleanly: ${error instanceof Error ? error.message : String(error)}`);
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
.filter((definition) => definition !== null);
|
|
107
|
-
return [...builtins, ...locals];
|
|
108
|
-
}
|
|
109
|
-
export function getCompiledWorkflow(workflowId, options = {}) {
|
|
110
|
-
const builtin = listBuiltinCompiledWorkflows().find((candidate) => candidate.id === workflowId);
|
|
111
|
-
if (builtin)
|
|
112
|
-
return builtin;
|
|
113
|
-
if (options.sourcePath) {
|
|
114
|
-
const local = resolveCompiledWorkflowFromLocal(workflowId, options.sourcePath);
|
|
115
|
-
if (local)
|
|
116
|
-
return local;
|
|
117
|
-
throw new Error(`No local Method package found for "${workflowId}" under ${join(options.sourcePath, "interf", "methods", workflowId)}.`);
|
|
118
|
-
}
|
|
119
|
-
throw new Error(`Workflow "${workflowId}" is not built-in. Provide a source path so Interf can resolve a local workflow package.`);
|
|
120
|
-
}
|
|
121
|
-
export function getActiveCompiledWorkflow(compiledPath) {
|
|
122
|
-
const workflowPath = existsSync(join(workflowPackagePathForCompiled(compiledPath), "workflow.json"))
|
|
123
|
-
? workflowPackagePathForCompiled(compiledPath)
|
|
124
|
-
: legacyWorkflowPackagePathForCompiled(compiledPath);
|
|
125
|
-
if (existsSync(join(workflowPath, "workflow.json"))) {
|
|
126
|
-
const local = loadWorkflowDefinitionFromDir(workflowPath);
|
|
127
|
-
if (!local) {
|
|
128
|
-
throw new Error(`Local Method package at ${workflowPath} is missing or invalid. Interf compile runs the local package directly; recreate or reseed this portable context.`);
|
|
129
|
-
}
|
|
130
|
-
if (local.extends) {
|
|
131
|
-
throw new Error(`Local Method package at ${workflowPath} still uses legacy extends. Materialize it as a standalone package before compiling this portable context.`);
|
|
132
|
-
}
|
|
133
|
-
return standaloneWorkflowDefinitionFromLocalPackage(local);
|
|
134
|
-
}
|
|
135
|
-
throw new Error(`Missing local Method package at ${workflowPath}. Interf compile runs the local package directly, so recreate or reseed this portable context under ${resolveSourceControlPath(compiledPath)}.`);
|
|
136
|
-
}
|
|
137
|
-
export function resolveCompiledWorkflowId(value) {
|
|
138
|
-
if (typeof value === "string" && isWorkflowId(value)) {
|
|
139
|
-
return value;
|
|
140
|
-
}
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
export function resolveCompiledWorkflowFromConfig(config) {
|
|
144
|
-
if (!config || typeof config !== "object")
|
|
145
|
-
return null;
|
|
146
|
-
const raw = config;
|
|
147
|
-
return resolveCompiledWorkflowId(raw.method) ?? resolveCompiledWorkflowId(raw.workflow);
|
|
148
|
-
}
|
|
149
|
-
export function resolveRequiredCompiledWorkflowFromConfig(config, label = "compiled config") {
|
|
150
|
-
const workflowId = resolveCompiledWorkflowFromConfig(config);
|
|
151
|
-
if (!workflowId) {
|
|
152
|
-
throw new Error(`Missing or invalid Method in ${label}.`);
|
|
153
|
-
}
|
|
154
|
-
return workflowId;
|
|
155
|
-
}
|
|
156
|
-
export function formatCompiledWorkflowStageStep(workflowId, stage, options = {}) {
|
|
157
|
-
return formatWorkflowStageStep(getCompiledWorkflow(workflowId, options), stage);
|
|
158
|
-
}
|
|
159
|
-
function resolveWorkflowDefinitionForStageMetadata(workflowId, sourcePath) {
|
|
160
|
-
if (sourcePath &&
|
|
161
|
-
existsSync(join(workflowPackagePathForCompiled(sourcePath), "workflow.json"))) {
|
|
162
|
-
return getActiveCompiledWorkflow(sourcePath);
|
|
163
|
-
}
|
|
164
|
-
return getCompiledWorkflow(workflowId, { sourcePath });
|
|
165
|
-
}
|
|
166
|
-
function formatWorkflowStageStep(workflow, stage) {
|
|
167
|
-
const stageIndex = workflow.stages.findIndex((candidate) => candidate.id === stage);
|
|
168
|
-
if (stageIndex === -1) {
|
|
169
|
-
throw new Error(`Stage "${stage}" is not part of the compiled runtime.`);
|
|
170
|
-
}
|
|
171
|
-
const stageDefinition = workflow.stages[stageIndex];
|
|
172
|
-
if (!stageDefinition) {
|
|
173
|
-
throw new Error(`Stage "${stage}" is not part of the compiled runtime.`);
|
|
174
|
-
}
|
|
175
|
-
return `Stage ${stageIndex + 1}/${workflow.stages.length} - ${stageDefinition.label}`;
|
|
176
|
-
}
|
|
177
|
-
export function getWorkflowStageDefinition(workflowId, stage, sourcePath) {
|
|
178
|
-
const workflow = resolveWorkflowDefinitionForStageMetadata(workflowId, sourcePath);
|
|
179
|
-
return workflow.stages.find((candidate) => candidate.id === stage) ?? null;
|
|
180
|
-
}
|
|
181
|
-
export function getWorkflowStagePosition(workflowId, stage, sourcePath) {
|
|
182
|
-
const stages = getWorkflowStages(workflowId, sourcePath);
|
|
183
|
-
const stageIndex = stages.findIndex((candidate) => candidate === stage);
|
|
184
|
-
if (stageIndex === -1)
|
|
185
|
-
return null;
|
|
186
|
-
return {
|
|
187
|
-
stageIndex: stageIndex + 1,
|
|
188
|
-
stageTotal: stages.length,
|
|
189
|
-
stages: [...stages],
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
export function getWorkflowStages(workflowId, sourcePath) {
|
|
193
|
-
return resolveWorkflowDefinitionForStageMetadata(workflowId, sourcePath).stages.map((definition) => definition.id);
|
|
194
|
-
}
|
|
195
|
-
export function getActiveCompiledStages(compiledPath) {
|
|
196
|
-
return getActiveCompiledWorkflow(compiledPath).stages.map((definition) => definition.id);
|
|
197
|
-
}
|
|
198
|
-
export function getWorkflowStagePolicyNotes(workflowId, stage, sourcePath) {
|
|
199
|
-
const workflow = resolveWorkflowDefinitionForStageMetadata(workflowId, sourcePath);
|
|
200
|
-
return [...(workflow.stagePolicyNotes?.[stage] ?? [])];
|
|
201
|
-
}
|
|
202
|
-
export function getActiveCompiledStagePolicyNotes(compiledPath, stage) {
|
|
203
|
-
const workflow = getActiveCompiledWorkflow(compiledPath);
|
|
204
|
-
return [...(workflow.stagePolicyNotes?.[stage] ?? [])];
|
|
205
|
-
}
|
|
206
|
-
export function resolveActiveCompiledStageAcceptance(compiledPath, stage) {
|
|
207
|
-
return getActiveCompiledWorkflow(compiledPath).stages.find((candidate) => candidate.id === stage)?.acceptance;
|
|
208
|
-
}
|
|
209
|
-
export function formatActiveCompiledWorkflowStageStep(compiledPath, stage) {
|
|
210
|
-
return formatWorkflowStageStep(getActiveCompiledWorkflow(compiledPath), stage);
|
|
211
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { WorkflowImprovementContext } from "../compiler/lib/schema.js";
|
|
2
|
-
export interface WorkflowImprovementReviewSourcePaths {
|
|
3
|
-
compiledRuntime: string | null;
|
|
4
|
-
testComparisons: string | null;
|
|
5
|
-
executionShells: string | null;
|
|
6
|
-
targetTestRuns: string | null;
|
|
7
|
-
targetTestSandboxes: string | null;
|
|
8
|
-
}
|
|
9
|
-
export declare function resolveWorkflowImprovementReviewSourcePaths(compiledPath: string): WorkflowImprovementReviewSourcePaths;
|
|
10
|
-
export declare function resolveWorkflowImprovementReviewPaths(compiledPath: string): WorkflowImprovementContext["review_paths"];
|
/package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|