@interf/compiler 0.9.1 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/agent-skills/interf-actions/SKILL.md +3 -0
- package/agent-skills/interf-actions/references/cli.md +13 -13
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
- package/dist/cli/commands/check-draft.d.ts +6 -6
- package/dist/cli/commands/check-draft.js +5 -5
- package/dist/cli/commands/compile-controller.d.ts +7 -7
- package/dist/cli/commands/compile-controller.js +35 -38
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +23 -21
- package/dist/cli/commands/compiled-flow.d.ts +11 -11
- package/dist/cli/commands/compiled-flow.js +33 -30
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +44 -45
- package/dist/cli/commands/default.js +1 -1
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +139 -118
- package/dist/cli/commands/list.js +11 -10
- package/dist/cli/commands/preparation-selection.d.ts +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +9 -9
- package/dist/cli/commands/source-config-wizard.js +43 -43
- package/dist/cli/commands/status.js +36 -9
- package/dist/cli/commands/test-flow.d.ts +15 -15
- package/dist/cli/commands/test-flow.js +29 -219
- package/dist/cli/commands/test.d.ts +2 -2
- package/dist/cli/commands/test.js +50 -51
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.js +41 -28
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js} +15 -21
- package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
- package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -3
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/executors.d.ts +13 -13
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/shells.d.ts +25 -24
- package/dist/packages/agents/lib/shells.js +161 -154
- package/dist/packages/agents/lib/types.d.ts +2 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -7
- package/dist/packages/compiler/compiled-paths.js +9 -15
- package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
- package/dist/packages/compiler/compiled-pipeline.js +22 -22
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +8 -8
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
- package/dist/packages/compiler/compiled-stage-runner.js +7 -7
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +62 -247
- package/dist/packages/compiler/lib/schema.js +56 -174
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +4 -4
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +9 -9
- package/dist/packages/compiler/runtime-types.d.ts +8 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -64
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/index.d.ts +2 -2
- package/dist/packages/execution/index.js +1 -1
- package/dist/packages/execution/lib/schema.d.ts +80 -83
- package/dist/packages/execution/lib/schema.js +25 -48
- package/dist/packages/local-service/action-values.d.ts +1 -1
- package/dist/packages/local-service/action-values.js +1 -1
- package/dist/packages/local-service/client.d.ts +4 -4
- package/dist/packages/local-service/client.js +4 -4
- package/dist/packages/local-service/index.d.ts +3 -3
- package/dist/packages/local-service/index.js +2 -2
- package/dist/packages/local-service/lib/schema.d.ts +540 -974
- package/dist/packages/local-service/lib/schema.js +44 -160
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +19 -23
- package/dist/packages/local-service/runtime.js +349 -913
- package/dist/packages/local-service/server.d.ts +1 -0
- package/dist/packages/local-service/server.js +25 -20
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +1 -4
- package/dist/packages/project-model/index.js +0 -3
- package/dist/packages/project-model/interf-detect.d.ts +1 -5
- package/dist/packages/project-model/interf-detect.js +7 -18
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +38 -39
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +2 -66
- package/dist/packages/project-model/lib/schema.js +5 -23
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +11 -18
- package/dist/packages/project-model/source-config.js +42 -60
- package/dist/packages/project-model/source-folders.d.ts +4 -4
- package/dist/packages/project-model/source-folders.js +10 -10
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +6 -6
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +16 -33
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +0 -3
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -457
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -211
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export * as compiler from "./packages/compiler/index.js";
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
2
|
+
export * as contracts from "./packages/contracts/index.js";
|
|
3
|
+
export * as methods from "./packages/methods/index.js";
|
|
4
|
+
export * as methodPackage from "./packages/method-package/index.js";
|
|
5
|
+
export * as methodAuthoring from "./packages/method-authoring/index.js";
|
|
4
6
|
export * as execution from "./packages/execution/index.js";
|
|
5
7
|
export * as localService from "./packages/local-service/index.js";
|
|
6
8
|
export * as projectModel from "./packages/project-model/index.js";
|
|
7
9
|
export * as agents from "./packages/agents/index.js";
|
|
8
10
|
export * as testing from "./packages/testing/index.js";
|
|
9
11
|
export { createCompiled, } from "./packages/project-model/interf.js";
|
|
10
|
-
export { compileCompiled, runCompiledSummarize, runCompiledCompile, } from "./packages/compiler/
|
|
12
|
+
export { compileCompiled, runCompiledSummarize, runCompiledCompile, } from "./packages/compiler/method-runs.js";
|
|
11
13
|
export { createRawTestTarget, createCompiledTestTarget, listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, listTestTargets, runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./packages/testing/test.js";
|
|
12
14
|
export { computeCompiledHealth, } from "./packages/compiler/state.js";
|
|
13
15
|
export { SOURCE_FOLDER_CONFIG_FILE, SOURCE_FOLDER_CONFIG_PATH, loadSourceFolderConfig, resolveSourceFolderConfigPath, sourceFolderConfigPath, buildTestSpecFromSourceFolderConfig, } from "./packages/project-model/source-config.js";
|
|
@@ -15,4 +15,4 @@ export * as schema from "./lib/schema.js";
|
|
|
15
15
|
export * as userConfig from "./lib/user-config.js";
|
|
16
16
|
export * as compiledBootstrap from "./lib/compiled-bootstrap.js";
|
|
17
17
|
export type { Agent, } from "./lib/types.js";
|
|
18
|
-
export type {
|
|
18
|
+
export type { MethodExecutionProfile, MethodExecutor, MethodExecutorKind, } from "./lib/executors.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MethodExecutionProfile } from "./executors.js";
|
|
2
2
|
import type { Agent } from "./types.js";
|
|
3
3
|
export declare function buildAgentEnv(agent: Agent, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
4
|
-
export declare function buildAgentArgs(agent: Agent, prompt: string, executionProfile?:
|
|
4
|
+
export declare function buildAgentArgs(agent: Agent, prompt: string, executionProfile?: MethodExecutionProfile): string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { basename } from "node:path";
|
|
2
2
|
import { readInterfConfig } from "../../project-model/interf-detect.js";
|
|
3
|
+
import { resolveMethodId } from "../../methods/method-resolution.js";
|
|
3
4
|
import { projectCompiledQueryShell, renderClaudeBootstrap } from "./shells.js";
|
|
4
5
|
export { renderClaudeBootstrap };
|
|
5
6
|
export function refreshCompiledBootstrapGuidance(dirPath) {
|
|
@@ -7,12 +8,12 @@ export function refreshCompiledBootstrapGuidance(dirPath) {
|
|
|
7
8
|
if (!config)
|
|
8
9
|
return false;
|
|
9
10
|
const compiledName = config.name ?? basename(dirPath);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const methodId = resolveMethodId(config);
|
|
12
|
+
const methodOriginSelected = config.method_origin?.selected ?? methodId;
|
|
13
|
+
const methodLocalDraft = config.method_origin?.local_draft === true;
|
|
13
14
|
const about = typeof config.about === "string" && config.about.length > 0 ? config.about : undefined;
|
|
14
|
-
return projectCompiledQueryShell(dirPath, compiledName,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
return projectCompiledQueryShell(dirPath, compiledName, methodId, about, {
|
|
16
|
+
methodOriginSelected,
|
|
17
|
+
methodLocalDraft,
|
|
17
18
|
});
|
|
18
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Argv } from "yargs";
|
|
2
2
|
import type { Agent } from "./types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { MethodExecutionProfile } from "./executors.js";
|
|
4
4
|
type AgentLike = Pick<Agent, "name"> | string | null | undefined;
|
|
5
5
|
export declare function addExecutionProfileOptions<T extends Argv>(yargs: T): T;
|
|
6
6
|
type ExecutionProfileArgSource = Record<string, unknown> & {
|
|
@@ -10,8 +10,8 @@ type ExecutionProfileArgSource = Record<string, unknown> & {
|
|
|
10
10
|
timeoutMs?: unknown;
|
|
11
11
|
"timeout-ms"?: unknown;
|
|
12
12
|
};
|
|
13
|
-
export declare function executionProfileFromArgv(argv: ExecutionProfileArgSource):
|
|
14
|
-
export declare function applyInternalAcceptanceExecutionProfileDefaults(agent: AgentLike, overrides?:
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
13
|
+
export declare function executionProfileFromArgv(argv: ExecutionProfileArgSource): MethodExecutionProfile;
|
|
14
|
+
export declare function applyInternalAcceptanceExecutionProfileDefaults(agent: AgentLike, overrides?: MethodExecutionProfile): MethodExecutionProfile;
|
|
15
|
+
export declare function hasMethodExecutionProfile(profile: MethodExecutionProfile | null | undefined): boolean;
|
|
16
|
+
export declare function formatMethodExecutionProfile(profile: MethodExecutionProfile | null | undefined): string | null;
|
|
17
17
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
const INTERNAL_ACCEPTANCE_TIMEOUT_MS = 480000;
|
|
1
2
|
const INTERNAL_ACCEPTANCE_DEFAULTS = {
|
|
2
3
|
"claude-code": {
|
|
3
4
|
model: "claude-sonnet-4-6",
|
|
4
5
|
effort: "low",
|
|
5
6
|
},
|
|
6
7
|
codex: {
|
|
7
|
-
model: "gpt-5.
|
|
8
|
-
effort: "
|
|
8
|
+
model: "gpt-5.3-codex",
|
|
9
|
+
effort: "high",
|
|
9
10
|
},
|
|
10
11
|
};
|
|
11
12
|
function readAgentName(agent) {
|
|
@@ -63,17 +64,17 @@ export function applyInternalAcceptanceExecutionProfileDefaults(agent, overrides
|
|
|
63
64
|
model: overrides.model ?? defaults?.model ?? null,
|
|
64
65
|
profile,
|
|
65
66
|
effort: explicitEffort ?? (profile ? null : defaults?.effort ?? null),
|
|
66
|
-
timeoutMs: overrides.timeoutMs ?? null,
|
|
67
|
+
timeoutMs: overrides.timeoutMs ?? (defaults ? INTERNAL_ACCEPTANCE_TIMEOUT_MS : null),
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
export function
|
|
70
|
+
export function hasMethodExecutionProfile(profile) {
|
|
70
71
|
return Boolean(profile?.model ||
|
|
71
72
|
profile?.profile ||
|
|
72
73
|
profile?.effort ||
|
|
73
74
|
profile?.timeoutMs);
|
|
74
75
|
}
|
|
75
|
-
export function
|
|
76
|
-
if (!
|
|
76
|
+
export function formatMethodExecutionProfile(profile) {
|
|
77
|
+
if (!hasMethodExecutionProfile(profile))
|
|
77
78
|
return null;
|
|
78
79
|
return JSON.stringify({
|
|
79
80
|
...(profile?.model ? { model: profile.model } : {}),
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import type { RuntimeExecutorInfo } from "../../
|
|
1
|
+
import type { RuntimeExecutorInfo } from "../../contracts/lib/schema.js";
|
|
2
2
|
import type { Agent } from "./types.js";
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
3
|
+
export type MethodExecutorKind = "local-agent" | "connected-provider" | "managed";
|
|
4
|
+
export interface MethodExecutionProfile {
|
|
5
5
|
model?: string | null;
|
|
6
6
|
effort?: string | null;
|
|
7
7
|
profile?: string | null;
|
|
8
8
|
timeoutMs?: number | null;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface MethodExecuteOptions {
|
|
11
11
|
eventLogPath?: string | null;
|
|
12
12
|
statusLogPath?: string | null;
|
|
13
13
|
completionCheck?: (() => boolean) | null;
|
|
14
14
|
onStatus?: (line: string) => void;
|
|
15
15
|
}
|
|
16
|
-
export interface
|
|
17
|
-
kind:
|
|
16
|
+
export interface MethodExecutor {
|
|
17
|
+
kind: MethodExecutorKind;
|
|
18
18
|
name: string;
|
|
19
19
|
displayName: string;
|
|
20
20
|
command?: string | null;
|
|
21
|
-
executionProfile?:
|
|
22
|
-
execute(rootPath: string, prompt: string, options?:
|
|
21
|
+
executionProfile?: MethodExecutionProfile;
|
|
22
|
+
execute(rootPath: string, prompt: string, options?: MethodExecuteOptions): Promise<number>;
|
|
23
23
|
}
|
|
24
|
-
export type { RuntimeExecutorInfo } from "../../
|
|
25
|
-
export declare function buildRuntimeExecutorInfo(executor:
|
|
26
|
-
export declare function createLocalAgentExecutor(agent: Agent, executionProfile?:
|
|
24
|
+
export type { RuntimeExecutorInfo } from "../../contracts/lib/schema.js";
|
|
25
|
+
export declare function buildRuntimeExecutorInfo(executor: MethodExecutor): RuntimeExecutorInfo;
|
|
26
|
+
export declare function createLocalAgentExecutor(agent: Agent, executionProfile?: MethodExecutionProfile): MethodExecutor;
|
|
27
27
|
export declare function resolveLocalExecutor(options?: {
|
|
28
28
|
preflight?: boolean;
|
|
29
|
-
executionProfile?:
|
|
29
|
+
executionProfile?: MethodExecutionProfile;
|
|
30
30
|
}): {
|
|
31
|
-
executor:
|
|
31
|
+
executor: MethodExecutor | null;
|
|
32
32
|
error?: string;
|
|
33
33
|
};
|
|
@@ -4,4 +4,5 @@ export declare function runAgentPreflight(agent: Agent, options?: AgentPreflight
|
|
|
4
4
|
export declare function ensureAgentAutomatedRunReady(agent: Agent, options?: {
|
|
5
5
|
force?: boolean;
|
|
6
6
|
runPreflight?: typeof runAgentPreflight;
|
|
7
|
+
preflightRetryDelayMs?: number;
|
|
7
8
|
}): AgentAutomationReadiness;
|
|
@@ -23,6 +23,7 @@ export function runAgentPreflight(agent, options = {}) {
|
|
|
23
23
|
cwd: dirPath,
|
|
24
24
|
encoding: "utf8",
|
|
25
25
|
env: buildAgentEnv(agent),
|
|
26
|
+
input: "",
|
|
26
27
|
timeout: timeoutMs,
|
|
27
28
|
});
|
|
28
29
|
const stdout = typeof result.stdout === "string" ? result.stdout.trim() : "";
|
|
@@ -56,16 +57,24 @@ export function ensureAgentAutomatedRunReady(agent, options = {}) {
|
|
|
56
57
|
return { ok: true };
|
|
57
58
|
}
|
|
58
59
|
const runPreflight = options.runPreflight ?? runAgentPreflight;
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
const retryDelayMs = options.preflightRetryDelayMs ?? 1000;
|
|
61
|
+
let result = null;
|
|
62
|
+
for (let attempt = 1; attempt <= 3; attempt += 1) {
|
|
63
|
+
result = runPreflight(agent);
|
|
64
|
+
if (result.ok) {
|
|
65
|
+
successfulPreflightAgents.add(agent.name);
|
|
66
|
+
return { ok: true };
|
|
67
|
+
}
|
|
68
|
+
if (!isTransientCodexPreflightFailure(agent, result) || attempt === 3) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
sleepSync(retryDelayMs * attempt);
|
|
66
72
|
}
|
|
67
|
-
|
|
68
|
-
return {
|
|
73
|
+
const details = result ? [result.error, result.stderr].filter(Boolean).join(" ") : "";
|
|
74
|
+
return {
|
|
75
|
+
ok: false,
|
|
76
|
+
error: `${agent.displayName} failed Interf executor preflight. Run \`interf doctor --live\` for details.${details ? ` ${details}` : ""}`,
|
|
77
|
+
};
|
|
69
78
|
}
|
|
70
79
|
function sanitizeAgentStderr(stderr) {
|
|
71
80
|
return stderr
|
|
@@ -75,3 +84,17 @@ function sanitizeAgentStderr(stderr) {
|
|
|
75
84
|
.join("\n")
|
|
76
85
|
.trim();
|
|
77
86
|
}
|
|
87
|
+
function isTransientCodexPreflightFailure(agent, result) {
|
|
88
|
+
if (agent.name !== "codex")
|
|
89
|
+
return false;
|
|
90
|
+
const text = `${result.error ?? ""}\n${result.stderr ?? ""}`;
|
|
91
|
+
if (/usage limit/i.test(text))
|
|
92
|
+
return false;
|
|
93
|
+
return /failed to record rollout items/i.test(text) ||
|
|
94
|
+
/thread\s+[0-9a-f-]+\s+not found/i.test(text);
|
|
95
|
+
}
|
|
96
|
+
function sleepSync(ms) {
|
|
97
|
+
if (ms <= 0)
|
|
98
|
+
return;
|
|
99
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
100
|
+
}
|
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MethodImprovementContext } from "../../compiler/lib/schema.js";
|
|
2
|
+
import type { RuntimeContractType } from "../../contracts/lib/schema.js";
|
|
2
3
|
import type { SourceReadinessCheck } from "../../project-model/lib/schema.js";
|
|
3
|
-
import { type ContextInterfaceZoneId as
|
|
4
|
+
import { type ContextInterfaceZoneId as MethodZoneId } from "../../method-package/context-interface.js";
|
|
4
5
|
export interface NativeStageDefinition {
|
|
5
6
|
id: string;
|
|
6
7
|
label: string;
|
|
7
8
|
description: string;
|
|
8
9
|
contractType: RuntimeContractType;
|
|
9
10
|
skillDir: string;
|
|
10
|
-
reads:
|
|
11
|
-
writes:
|
|
11
|
+
reads: MethodZoneId[];
|
|
12
|
+
writes: MethodZoneId[];
|
|
12
13
|
}
|
|
13
14
|
export declare function writeNativeAgentSurface(rootPath: string, agentsContent: string, skillName: string, skillContent: string): boolean;
|
|
14
|
-
export declare function renderCompiledAgents(compiledPath: string, name: string,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
export declare function renderCompiledAgents(compiledPath: string, name: string, methodId: string, about?: string, options?: {
|
|
16
|
+
methodOriginSelected?: string | null;
|
|
17
|
+
methodLocalDraft?: boolean;
|
|
17
18
|
}): string;
|
|
18
19
|
export declare function renderCompiledQuerySkill(): string;
|
|
19
20
|
export declare function syncStageExecutionShellWrites(compiledPath: string, shellRoot: string, stage: NativeStageDefinition, writeArtifacts?: readonly string[]): void;
|
|
20
21
|
export declare function renderClaudeBootstrap(content: string): string;
|
|
21
|
-
export declare function
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
export declare function createMethodAuthoringShell(options: {
|
|
23
|
+
methodPath: string;
|
|
24
|
+
methodId: string;
|
|
24
25
|
label: string;
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
referenceMethodId?: string | null;
|
|
27
|
+
sourceFolderPath: string;
|
|
27
28
|
taskPrompt: string;
|
|
28
29
|
checks: SourceReadinessCheck[];
|
|
29
30
|
}): {
|
|
30
31
|
rootPath: string;
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
methodBeforePath: string;
|
|
33
|
+
methodAfterPath: string;
|
|
33
34
|
promptLogPath: string;
|
|
34
35
|
eventLogPath: string;
|
|
35
36
|
statusLogPath: string;
|
|
36
37
|
};
|
|
37
38
|
export declare function pruneStageExecutionShells(compiledPath: string): void;
|
|
38
|
-
export declare function projectCompiledQueryShell(compiledPath: string, compiledName: string,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
export declare function projectCompiledQueryShell(compiledPath: string, compiledName: string, methodId: string, about?: string, options?: {
|
|
40
|
+
methodOriginSelected?: string | null;
|
|
41
|
+
methodLocalDraft?: boolean;
|
|
41
42
|
}): boolean;
|
|
42
43
|
export declare function projectRawTestQueryShell(rootPath: string): boolean;
|
|
43
|
-
export declare function createStageExecutionShell(compiledPath: string, compiledName: string,
|
|
44
|
+
export declare function createStageExecutionShell(compiledPath: string, compiledName: string, methodId: string, stage: NativeStageDefinition, writeArtifacts?: readonly string[]): {
|
|
44
45
|
rootPath: string;
|
|
45
46
|
};
|
|
46
47
|
export declare function freezeStageExecutionShell(rootPath: string): string | null;
|
|
47
|
-
export declare function
|
|
48
|
+
export declare function createMethodImprovementShell(options: {
|
|
48
49
|
compiledPath: string;
|
|
49
50
|
compiledName: string;
|
|
50
|
-
|
|
51
|
+
methodId: string;
|
|
51
52
|
runId: string;
|
|
52
53
|
loopIndex: number;
|
|
53
|
-
context:
|
|
54
|
+
context: MethodImprovementContext;
|
|
54
55
|
}): {
|
|
55
56
|
rootPath: string;
|
|
56
57
|
loopRootPath: string;
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
methodBeforePath: string;
|
|
59
|
+
methodAfterPath: string;
|
|
59
60
|
promptLogPath: string;
|
|
60
61
|
eventLogPath: string;
|
|
61
62
|
statusLogPath: string;
|
|
62
63
|
};
|
|
63
|
-
export declare function
|
|
64
|
+
export declare function freezeMethodImprovementShell(rootPath: string): string | null;
|