@leitwerk-dev/server 0.5.2 → 0.5.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/dist/{app-DZUsf76a.d.ts → app-B8gyS_Id.d.ts} +82 -76
- package/dist/app-XAQTAQ5Y.js +8 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/{chunk-AJ2DQWI3.js → chunk-6STQ3LAP.js} +133 -83
- package/dist/chunk-6STQ3LAP.js.map +1 -0
- package/dist/{chunk-6EEU4QOU.js → chunk-ZA5TDEM5.js} +302 -144
- package/dist/chunk-ZA5TDEM5.js.map +1 -0
- package/dist/config/config-loader.d.ts.map +1 -1
- package/dist/dashboard-model-issues.d.ts.map +1 -1
- package/dist/future-execution/execution.d.ts.map +1 -1
- package/dist/future-execution/launch-lifecycle.d.ts.map +1 -1
- package/dist/future-execution/lifecycle.d.ts.map +1 -1
- package/dist/future-execution/reconciliation.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/main.js +3 -3
- package/dist/process-engine/ops/execute-action.d.ts.map +1 -1
- package/dist/process-engine/ops/retry-startup.d.ts.map +1 -1
- package/dist/process-engine/turn-start-preflight.d.ts.map +1 -1
- package/dist/process-model-config.d.ts.map +1 -1
- package/dist/process-model-policy/construct.d.ts +1 -0
- package/dist/process-model-policy/construct.d.ts.map +1 -1
- package/dist/process-model-policy/evaluate.d.ts +3 -3
- package/dist/process-model-policy/evaluate.d.ts.map +1 -1
- package/dist/process-model-policy/index.d.ts +1 -0
- package/dist/process-model-policy/index.d.ts.map +1 -1
- package/dist/process-model-policy/launch.d.ts.map +1 -1
- package/dist/process-model-policy/project.d.ts.map +1 -1
- package/dist/process-model-policy/requirements.d.ts +16 -0
- package/dist/process-model-policy/requirements.d.ts.map +1 -0
- package/dist/process-model-policy/types.d.ts +87 -75
- package/dist/process-model-policy/types.d.ts.map +1 -1
- package/dist/process-model-policy-presenter.d.ts.map +1 -1
- package/dist/process-model-selection.d.ts.map +1 -1
- package/dist/process-title-generator.d.ts +2 -0
- package/dist/process-title-generator.d.ts.map +1 -1
- package/dist/routes/process-actions.d.ts.map +1 -1
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -1
- package/dist/test-helpers/process-model-fixtures.d.ts +6 -0
- package/dist/test-helpers/process-model-fixtures.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/package.json +12 -12
- package/src/app.ts +21 -0
- package/src/config/config-loader.ts +5 -0
- package/src/dashboard-model-issues.ts +66 -5
- package/src/future-execution/execution.ts +3 -8
- package/src/future-execution/launch-lifecycle.ts +15 -10
- package/src/future-execution/lifecycle.ts +1 -0
- package/src/future-execution/reconciliation.ts +2 -34
- package/src/launch-coordinator.ts +2 -2
- package/src/process-engine/ops/execute-action.ts +1 -0
- package/src/process-engine/ops/retry-startup.ts +10 -12
- package/src/process-engine/turn-start-preflight.ts +38 -15
- package/src/process-model-config.ts +7 -3
- package/src/process-model-policy/construct.ts +61 -3
- package/src/process-model-policy/evaluate.ts +73 -64
- package/src/process-model-policy/index.ts +16 -14
- package/src/process-model-policy/launch.ts +27 -29
- package/src/process-model-policy/project.ts +72 -43
- package/src/process-model-policy/requirements.ts +73 -0
- package/src/process-model-policy/types.ts +108 -78
- package/src/process-model-policy-presenter.ts +18 -2
- package/src/process-model-selection.ts +2 -0
- package/src/process-title-generator.ts +12 -16
- package/src/routes/launchers.ts +1 -1
- package/src/routes/process-actions.ts +1 -0
- package/src/supervisor/worker-start-payload-builder.ts +6 -1
- package/src/test-helpers/process-model-fixtures.ts +25 -4
- package/dist/app-2TCRADVA.js +0 -8
- package/dist/chunk-6EEU4QOU.js.map +0 -1
- package/dist/chunk-AJ2DQWI3.js.map +0 -1
- /package/dist/{app-2TCRADVA.js.map → app-XAQTAQ5Y.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-title-generator.d.ts","sourceRoot":"","sources":["../src/process-title-generator.ts"],"names":[],"mappings":"AAOA,OAAO,K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AK,SAAS,EAKd,MAAM,4BAA4B,CAAC;AAEpC,wBAAgB,2BAA2B,CAC1C,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,SAAS,EACf,wBAAwB,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"process-actions.d.ts","sourceRoot":"","sources":["../../src/routes/process-actions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAI7E,OAAO,EAIN,KAAK,SAAS,EAKd,MAAM,4BAA4B,CAAC;AAEpC,wBAAgB,2BAA2B,CAC1C,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,SAAS,EACf,wBAAwB,EAAE,wBAAwB,QAwQlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-start-payload-builder.d.ts","sourceRoot":"","sources":["../../src/supervisor/worker-start-payload-builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,eAAe,EAGf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAG1B,KAAK,6BAA6B,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAMrF,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjG,gBAAgB;AAChB,MAAM,WA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AC;SAC1B,GACC,OAAO,+BAA+B,EAAE,0BAA0B,EAAE,CAAC;KACxE,CAAC;CACF;AAED,wBAAgB,kCAAkC,CACjD,MAAM,EAAE,cAAc,GACpB,6BAA6B,CAO/B;AAID,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"worker-start-payload-builder.d.ts","sourceRoot":"","sources":["../../src/supervisor/worker-start-payload-builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,eAAe,EAGf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAG1B,KAAK,6BAA6B,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAMrF,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjG,gBAAgB;AAChB,MAAM,WAAW,6BAChB,SAAQ,IAAI,CACX,gBAAgB,EAChB,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CACxF;IACD,sEAAsE;IACtE,UAAU,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IACzE,gBAAgB;IAChB,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB;IAChB,aAAa,EAAE,oBAAoB,C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 -33,6 +33,8 @@ export declare function createTestModelPolicy(input?: {
|
|
|
33
33
|
profiles?: readonly {
|
|
34
34
|
id: string;
|
|
35
35
|
model_id?: string;
|
|
36
|
+
labels?: string[];
|
|
37
|
+
default?: boolean;
|
|
36
38
|
provider_options?: Record<string, unknown>;
|
|
37
39
|
}[];
|
|
38
40
|
processDefaultProfileId?: string;
|
|
@@ -40,6 +42,10 @@ export declare function createTestModelPolicy(input?: {
|
|
|
40
42
|
modelPurpose?: boolean;
|
|
41
43
|
purposeProfileId?: string;
|
|
42
44
|
allowedProfileIds?: readonly string[];
|
|
45
|
+
processRequirements?: import("@leitwerk-dev/protocol").ModelRequirements;
|
|
46
|
+
turnRequirements?: import("@leitwerk-dev/protocol").ModelRequirements;
|
|
47
|
+
operatorTurnRequirements?: import("@leitwerk-dev/protocol").ModelRequirements;
|
|
48
|
+
capabilities?: (providerId: string, modelId: string) => Readonly<Record<string, boolean | "unknown">>;
|
|
43
49
|
}): {
|
|
44
50
|
config: LeitwerkConfig;
|
|
45
51
|
policy: ServerProcessModelPolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-model-fixtures.d.ts","sourceRoot":"","sources":["../../src/test-helpers/process-model-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAGjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,KAAK,uBAAuB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,cAAc,CAAC,GAAG;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAA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AE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3C,EAAE,CAAC;IACJ,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,mBAAmB,CAAC,EAAE,OAAO,wBAAwB,EAAE,iBAAiB,CAAC;IACzE,gBAAgB,CAAC,EAAE,OAAO,wBAAwB,EAAE,iBAAiB,CAAC;IACtE,wBAAwB,CAAC,EAAE,OAAO,wBAAwB,EAAE,iBAAiB,CAAC;IAC9E,YAAY,CAAC,EAAE,CACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,KACX,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;CAC9C,GACJ;IACF,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,wBAAwB,CAAC;IACjC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,qBAAqB,EAAE;QAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;KAAE,CAAC;CACzF,CA2DA;AAED,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CA4B7F"}
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leitwerk-dev/server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/leitwerk-dev/leitwerk.git",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"@earendil-works/pi-coding-agent": "^1.5.2",
|
|
29
29
|
"@fastify/cookie": "11.1.2",
|
|
30
30
|
"@fastify/websocket": "^11.2.0",
|
|
31
|
-
"@leitwerk-dev/domain": "0.5.
|
|
32
|
-
"@leitwerk-dev/extension-runtime": "0.5.
|
|
33
|
-
"@leitwerk-dev/external-writes": "0.5.
|
|
34
|
-
"@leitwerk-dev/process-sdk": "0.5.
|
|
35
|
-
"@leitwerk-dev/protocol": "0.5.
|
|
36
|
-
"@leitwerk-dev/session-transfer": "0.5.
|
|
37
|
-
"@leitwerk-dev/watcher-utils": "0.5.
|
|
38
|
-
"@leitwerk-dev/worker-protocol": "0.5.
|
|
39
|
-
"@leitwerk-dev/worker-runners": "0.5.
|
|
31
|
+
"@leitwerk-dev/domain": "0.5.4",
|
|
32
|
+
"@leitwerk-dev/extension-runtime": "0.5.4",
|
|
33
|
+
"@leitwerk-dev/external-writes": "0.5.4",
|
|
34
|
+
"@leitwerk-dev/process-sdk": "0.5.4",
|
|
35
|
+
"@leitwerk-dev/protocol": "0.5.4",
|
|
36
|
+
"@leitwerk-dev/session-transfer": "0.5.4",
|
|
37
|
+
"@leitwerk-dev/watcher-utils": "0.5.4",
|
|
38
|
+
"@leitwerk-dev/worker-protocol": "0.5.4",
|
|
39
|
+
"@leitwerk-dev/worker-runners": "0.5.4",
|
|
40
40
|
"cron-parser": "^5.5.0",
|
|
41
41
|
"defu": "^6.1.7",
|
|
42
42
|
"drizzle-orm": "1.0.0-rc.5-ab785fc",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"sharp": "^0.35.0",
|
|
47
47
|
"valibot": "^1.3.1",
|
|
48
48
|
"yaml": "^2.8.3",
|
|
49
|
-
"@leitwerk-dev/wiki": "0.5.
|
|
49
|
+
"@leitwerk-dev/wiki": "0.5.4"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@leitwerk-dev/worker": "0.5.
|
|
52
|
+
"@leitwerk-dev/worker": "0.5.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"tsup": "^8.5.1",
|
package/src/app.ts
CHANGED
|
@@ -520,6 +520,7 @@ export async function createAppContext(opts: AppOptions = {}): Promise<AppContex
|
|
|
520
520
|
.profiles.find((entry) => entry.profileId === profile.id);
|
|
521
521
|
return {
|
|
522
522
|
value: profile.id,
|
|
523
|
+
labels: [...new Set(profile.labels ?? [])],
|
|
523
524
|
label: `${profile.id} — ${profile.provider}/${profile.model_id}`,
|
|
524
525
|
...(status?.availability === "available"
|
|
525
526
|
? {}
|
|
@@ -528,6 +529,10 @@ export async function createAppContext(opts: AppOptions = {}): Promise<AppContex
|
|
|
528
529
|
}),
|
|
529
530
|
});
|
|
530
531
|
const processModelPolicy = createServerProcessModelPolicy({
|
|
532
|
+
capabilities: (providerId, modelId) => {
|
|
533
|
+
const provider = modelProviderRegistry.require(providerId);
|
|
534
|
+
return provider.definition.capabilities?.({ config: provider.config, modelId }) ?? {};
|
|
535
|
+
},
|
|
531
536
|
scopedSettings,
|
|
532
537
|
config,
|
|
533
538
|
processGraphs,
|
|
@@ -540,6 +545,8 @@ export async function createAppContext(opts: AppOptions = {}): Promise<AppContex
|
|
|
540
545
|
markStartup("extension_ui_catalog");
|
|
541
546
|
const launcherModelProfiles: LauncherModelProfileSummary[] = config.pi.model_profiles.map(
|
|
542
547
|
(profile: ModelProfileSnapshot): LauncherModelProfileSummary => ({
|
|
548
|
+
labels: [...new Set(profile.labels ?? [])],
|
|
549
|
+
default: profile.default ?? false,
|
|
543
550
|
id: profile.id,
|
|
544
551
|
provider: profile.provider,
|
|
545
552
|
modelId: profile.model_id,
|
|
@@ -553,6 +560,7 @@ export async function createAppContext(opts: AppOptions = {}): Promise<AppContex
|
|
|
553
560
|
return processModelPolicy
|
|
554
561
|
.project({
|
|
555
562
|
kind: "profile_options",
|
|
563
|
+
target: { kind: "process_default" },
|
|
556
564
|
processId,
|
|
557
565
|
availability: modelStatusCache.snapshot(),
|
|
558
566
|
})
|
|
@@ -604,6 +612,19 @@ export async function createAppContext(opts: AppOptions = {}): Promise<AppContex
|
|
|
604
612
|
(config.pi.process_title_generation.model_profile === null
|
|
605
613
|
? undefined
|
|
606
614
|
: createProcessTitleGenerator({
|
|
615
|
+
modelPolicyError: (processId, modelProfileId) => {
|
|
616
|
+
const result = processModelPolicy.evaluate({
|
|
617
|
+
kind: "runtime_selection",
|
|
618
|
+
target: { kind: "process_default" },
|
|
619
|
+
processId,
|
|
620
|
+
selection: {
|
|
621
|
+
modelProfileId,
|
|
622
|
+
provenance: { kind: "inherited", source: "fixed_purpose" },
|
|
623
|
+
},
|
|
624
|
+
availability: modelStatusCache.snapshot(),
|
|
625
|
+
});
|
|
626
|
+
return result.ok ? null : `Title model '${modelProfileId}' blocked: ${result.code}`;
|
|
627
|
+
},
|
|
607
628
|
config,
|
|
608
629
|
repos,
|
|
609
630
|
broadcaster,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { copiedUnknownRecordSchema as unknownRecordSchema } from "@leitwerk-dev/domain";
|
|
4
|
+
import { modelPolicyIdentifiersSchema, modelRequirementsSchema } from "@leitwerk-dev/protocol";
|
|
4
5
|
import { DEFAULT_SESSION_TRANSFER_LIMITS } from "@leitwerk-dev/session-transfer";
|
|
5
6
|
import { parseDurationMs } from "@leitwerk-dev/watcher-utils";
|
|
6
7
|
import {
|
|
@@ -166,6 +167,7 @@ const skillIdsSchema = v.array(
|
|
|
166
167
|
);
|
|
167
168
|
const modelTurnConfigSchema = v.looseObject({
|
|
168
169
|
model_profile: v.optional(v.string()),
|
|
170
|
+
model_requirements: v.optional(modelRequirementsSchema),
|
|
169
171
|
});
|
|
170
172
|
|
|
171
173
|
const authNonEmptyString = v.pipe(v.string(), v.nonEmpty());
|
|
@@ -330,6 +332,8 @@ const configSchema = v.looseObject({
|
|
|
330
332
|
provider: v.string(),
|
|
331
333
|
model_id: v.string(),
|
|
332
334
|
thinking_level: v.optional(v.string()),
|
|
335
|
+
labels: v.optional(modelPolicyIdentifiersSchema),
|
|
336
|
+
default: v.optional(v.boolean()),
|
|
333
337
|
provider_options: v.optional(v.record(v.string(), v.string())),
|
|
334
338
|
}),
|
|
335
339
|
),
|
|
@@ -359,6 +363,7 @@ const configSchema = v.looseObject({
|
|
|
359
363
|
v.looseObject({
|
|
360
364
|
default_skills: v.optional(skillIdsSchema),
|
|
361
365
|
default_model_profile: v.optional(v.string()),
|
|
366
|
+
model_requirements: v.optional(modelRequirementsSchema),
|
|
362
367
|
allowed_model_profiles: v.optional(v.pipe(stringArraySchema, v.nonEmpty())),
|
|
363
368
|
worker_runtime_profile: v.optional(v.string()),
|
|
364
369
|
storage_size: v.optional(storageSizeSchema),
|
|
@@ -25,12 +25,18 @@ export function buildDashboardModelIssues(
|
|
|
25
25
|
): DashboardConfigurationIssue[] {
|
|
26
26
|
const issues = new Map<string, DashboardConfigurationIssue>();
|
|
27
27
|
const availability = deps.modelStatusCache.snapshot();
|
|
28
|
-
function add(
|
|
28
|
+
function add(
|
|
29
|
+
code: string,
|
|
30
|
+
key: string,
|
|
31
|
+
message: string,
|
|
32
|
+
source: IssueSource,
|
|
33
|
+
severity?: "warning" | "error",
|
|
34
|
+
) {
|
|
29
35
|
const id = JSON.stringify([code, key]);
|
|
30
36
|
const issue = issues.get(id) ?? {
|
|
31
37
|
id,
|
|
32
38
|
code,
|
|
33
|
-
severity: code === "model_stale" ? ("warning" as const) : ("error" as const),
|
|
39
|
+
severity: severity ?? (code === "model_stale" ? ("warning" as const) : ("error" as const)),
|
|
34
40
|
message,
|
|
35
41
|
sources: [],
|
|
36
42
|
};
|
|
@@ -38,11 +44,18 @@ export function buildDashboardModelIssues(
|
|
|
38
44
|
issue.sources.push(source);
|
|
39
45
|
issues.set(id, issue);
|
|
40
46
|
}
|
|
41
|
-
function check(
|
|
47
|
+
function check(
|
|
48
|
+
profileId: string | null | undefined,
|
|
49
|
+
source: IssueSource,
|
|
50
|
+
processId = "",
|
|
51
|
+
turnId?: string,
|
|
52
|
+
preference = false,
|
|
53
|
+
) {
|
|
42
54
|
const id = trimToNull(profileId);
|
|
43
55
|
if (!id) return;
|
|
44
56
|
const result = deps.processModelPolicy.evaluate({
|
|
45
57
|
kind: "runtime_selection",
|
|
58
|
+
target: turnId ? { kind: "turn", turnId } : { kind: "process_default" },
|
|
46
59
|
processId,
|
|
47
60
|
selection: {
|
|
48
61
|
modelProfileId: id,
|
|
@@ -50,7 +63,7 @@ export function buildDashboardModelIssues(
|
|
|
50
63
|
},
|
|
51
64
|
availability,
|
|
52
65
|
});
|
|
53
|
-
if (result.ok) return;
|
|
66
|
+
if (result.ok || (preference && result.code === "model_profile_not_allowed")) return;
|
|
54
67
|
const key = result.code === "model_profile_not_allowed" ? JSON.stringify([id, processId]) : id;
|
|
55
68
|
const message = presentProcessModelPolicyFailure(result);
|
|
56
69
|
add(
|
|
@@ -75,6 +88,8 @@ export function buildDashboardModelIssues(
|
|
|
75
88
|
input.defaultModelProfileId,
|
|
76
89
|
{ ...source, label: `${source.label}: default model` },
|
|
77
90
|
input.processId,
|
|
91
|
+
undefined,
|
|
92
|
+
true,
|
|
78
93
|
);
|
|
79
94
|
check(
|
|
80
95
|
input.selectedTurnModelProfileId,
|
|
@@ -99,8 +114,43 @@ export function buildDashboardModelIssues(
|
|
|
99
114
|
config.modelProfileId,
|
|
100
115
|
{ ...source, label: `${source.label}: ${turnId}` },
|
|
101
116
|
input.processId,
|
|
117
|
+
turnId,
|
|
102
118
|
);
|
|
103
119
|
}
|
|
120
|
+
for (const processId of deps.processGraphs.keys()) {
|
|
121
|
+
check(
|
|
122
|
+
deps.config?.pi.process_title_generation.model_profile,
|
|
123
|
+
{ label: `${processId}: title generation`, href: null },
|
|
124
|
+
processId,
|
|
125
|
+
);
|
|
126
|
+
const preview = deps.processModelPolicy.project({
|
|
127
|
+
kind: "launcher_preview",
|
|
128
|
+
processId,
|
|
129
|
+
modelConfig: {},
|
|
130
|
+
availability,
|
|
131
|
+
});
|
|
132
|
+
for (const turn of preview.turns) {
|
|
133
|
+
if (
|
|
134
|
+
!turn.effective.error &&
|
|
135
|
+
(turn.effective.ranking?.kind === "cost_id" ||
|
|
136
|
+
(turn.effective.ranking?.tiedProfileIds.length ?? 0) > 1)
|
|
137
|
+
)
|
|
138
|
+
add(
|
|
139
|
+
"automatic_model_tiebreak",
|
|
140
|
+
`${processId}/${turn.turnId}`,
|
|
141
|
+
`Selected '${turn.effective.profile?.id}' by ${turn.effective.ranking?.kind === "cost_id" ? "cost group and profile ID" : `cost group and profile ID among equal-specificity defaults: ${turn.effective.ranking?.tiedProfileIds.join(", ")}`}`,
|
|
142
|
+
{ label: `${processId}: ${turn.turnId}`, href: null },
|
|
143
|
+
"warning",
|
|
144
|
+
);
|
|
145
|
+
if (turn.effective.error)
|
|
146
|
+
add(
|
|
147
|
+
"model_policy_blocked",
|
|
148
|
+
turn.effective.profile?.id ?? `${processId}/${turn.turnId}`,
|
|
149
|
+
turn.effective.error,
|
|
150
|
+
{ label: `${processId}: ${turn.turnId}`, href: null },
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
104
154
|
const config = deps.config;
|
|
105
155
|
if (config) {
|
|
106
156
|
for (const profile of config.pi.model_profiles)
|
|
@@ -116,12 +166,16 @@ export function buildDashboardModelIssues(
|
|
|
116
166
|
processConfig.default_model_profile,
|
|
117
167
|
{ label: `${prefix}.default_model_profile`, href: null },
|
|
118
168
|
processId,
|
|
169
|
+
undefined,
|
|
170
|
+
true,
|
|
119
171
|
);
|
|
120
172
|
for (const [turnId, turnConfig] of Object.entries(processConfig.turn_configs ?? {}))
|
|
121
173
|
check(
|
|
122
174
|
turnConfig.model_profile,
|
|
123
175
|
{ label: `${prefix}.turn_configs.${turnId}.model_profile`, href: null },
|
|
124
176
|
processId,
|
|
177
|
+
turnId,
|
|
178
|
+
true,
|
|
125
179
|
);
|
|
126
180
|
}
|
|
127
181
|
}
|
|
@@ -143,12 +197,19 @@ export function buildDashboardModelIssues(
|
|
|
143
197
|
}
|
|
144
198
|
for (const watcher of deps.processWatchers?.listAll() ?? []) {
|
|
145
199
|
const source = { label: watcher.configPath, href: "/watchers" };
|
|
146
|
-
check(
|
|
200
|
+
check(
|
|
201
|
+
watcher.launchModelConfig.defaultModelProfileId,
|
|
202
|
+
source,
|
|
203
|
+
watcher.processId,
|
|
204
|
+
undefined,
|
|
205
|
+
true,
|
|
206
|
+
);
|
|
147
207
|
for (const [turnId, turnConfig] of Object.entries(watcher.launchModelConfig.turnConfigs ?? {}))
|
|
148
208
|
check(
|
|
149
209
|
turnConfig.modelProfileId,
|
|
150
210
|
{ ...source, label: `${source.label}: ${turnId}` },
|
|
151
211
|
watcher.processId,
|
|
212
|
+
turnId,
|
|
152
213
|
);
|
|
153
214
|
}
|
|
154
215
|
for (const process of deps.processes.listModelConfigurations()) {
|
|
@@ -189,7 +189,7 @@ async function executeScheduledLaunch(
|
|
|
189
189
|
async prepare(payload) {
|
|
190
190
|
const prepared = await deps.launchPlans.prepare(payload.launchPlan, {
|
|
191
191
|
modelConfig: payload.modelConfig,
|
|
192
|
-
invalidModelConfig: "
|
|
192
|
+
invalidModelConfig: "retain",
|
|
193
193
|
});
|
|
194
194
|
if (!prepared.ok) {
|
|
195
195
|
return {
|
|
@@ -348,6 +348,7 @@ export function createFutureExecutionExecutor(deps: FutureExecutionExecutorDeps)
|
|
|
348
348
|
const snapshot = deps.modelStatusCache.snapshot();
|
|
349
349
|
const result = deps.processModelPolicy.evaluate({
|
|
350
350
|
kind: "runtime_selection",
|
|
351
|
+
target: { kind: "process_default" },
|
|
351
352
|
availability: snapshot,
|
|
352
353
|
processId: execution.processId,
|
|
353
354
|
selection: execution.modelSelection,
|
|
@@ -445,13 +446,7 @@ export function createFutureExecutionExecutor(deps: FutureExecutionExecutorDeps)
|
|
|
445
446
|
if (!latest || latest.nextRunAt > asOf) {
|
|
446
447
|
return;
|
|
447
448
|
}
|
|
448
|
-
if (
|
|
449
|
-
(!latest.modelSelection ||
|
|
450
|
-
(latest.kind === "action" && !isPinnedModelSelection(latest.modelSelection))) &&
|
|
451
|
-
deps.processGraphs &&
|
|
452
|
-
deps.processActionRegistry &&
|
|
453
|
-
deps.turnRecords
|
|
454
|
-
) {
|
|
449
|
+
if (deps.processGraphs && deps.processActionRegistry && deps.turnRecords) {
|
|
455
450
|
const projected = await projectFutureExecutionModelState(
|
|
456
451
|
{
|
|
457
452
|
processes: deps.processes,
|
|
@@ -372,7 +372,7 @@ export function createFutureLaunchLifecycle(
|
|
|
372
372
|
modelConfig: normalizeLaunchModelConfigInput(input.modelConfig),
|
|
373
373
|
invalidModelConfig: "reject",
|
|
374
374
|
});
|
|
375
|
-
if (!prepared.ok
|
|
375
|
+
if (!prepared.ok) {
|
|
376
376
|
return {
|
|
377
377
|
ok: false as const,
|
|
378
378
|
outcome: {
|
|
@@ -382,20 +382,25 @@ export function createFutureLaunchLifecycle(
|
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
const launchPlan = applySubmittedProcessTitleToLaunchPlan(prepared.launchPlan, input);
|
|
385
|
+
const preview = deps.processModelPolicy.project({
|
|
386
|
+
kind: "launcher_preview",
|
|
387
|
+
processId: launchPlan.processId,
|
|
388
|
+
plan: launchPlan,
|
|
389
|
+
modelConfig: prepared.modelConfig,
|
|
390
|
+
availability: deps.modelStatusCache.snapshot(),
|
|
391
|
+
});
|
|
392
|
+
const issues = preview.turns
|
|
393
|
+
.filter((turn) => turn.effective.error)
|
|
394
|
+
.map((turn) => ({
|
|
395
|
+
code: "model_not_ready",
|
|
396
|
+
message: `${turn.turnId}: ${turn.effective.error}`,
|
|
397
|
+
}));
|
|
398
|
+
if (issues.length) return { ok: false as const, outcome: { kind: "invalid" as const, issues } };
|
|
385
399
|
const modelState = projectLaunchPlanModelState(launchPlan, {
|
|
386
400
|
policy: deps.processModelPolicy,
|
|
387
401
|
availability: deps.modelStatusCache.snapshot(),
|
|
388
402
|
detectedAt: operationTime.toISOString(),
|
|
389
403
|
});
|
|
390
|
-
if (!prepared.ok && !modelState.blockedReason) {
|
|
391
|
-
return {
|
|
392
|
-
ok: false as const,
|
|
393
|
-
outcome: {
|
|
394
|
-
kind: "invalid" as const,
|
|
395
|
-
issues: presentLaunchPlanPreparationIssues(prepared.errors),
|
|
396
|
-
},
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
404
|
return { ok: true as const, launchPlan, modelState, schedule: schedule.value };
|
|
400
405
|
}
|
|
401
406
|
|
|
@@ -250,6 +250,7 @@ async function validateScheduledActionRequest(
|
|
|
250
250
|
if (typeof nextTurnModelProfileId === "string") {
|
|
251
251
|
const result = deps.processModelPolicy.evaluate({
|
|
252
252
|
kind: "runtime_selection",
|
|
253
|
+
target: { kind: "turn", turnId: validation.candidateSelectedTurnId! },
|
|
253
254
|
availability: deps.modelStatusCache.snapshot(),
|
|
254
255
|
processId: process.processId,
|
|
255
256
|
selection: {
|
|
@@ -6,7 +6,6 @@ import type { ProcessActionRegistry } from "../process-action-registry.js";
|
|
|
6
6
|
import type { ProcessGraphRegistry } from "../process-graph.js";
|
|
7
7
|
import {
|
|
8
8
|
evaluateAtStableAvailabilityRevision,
|
|
9
|
-
isPinnedModelSelection,
|
|
10
9
|
type ServerProcessModelPolicy,
|
|
11
10
|
} from "../process-model-policy/index.js";
|
|
12
11
|
import type { ProcessOperationCoordinator } from "../process-operation-coordinator.js";
|
|
@@ -101,39 +100,8 @@ export async function reconcileFutureExecutionModelBlocks(input: {
|
|
|
101
100
|
if (projected && !sameModelPolicyState(current, projected)) updateCurrent(projected);
|
|
102
101
|
};
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (!current.modelSelection) {
|
|
109
|
-
await projectCurrent();
|
|
110
|
-
if (!current.modelSelection) return;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const validation = await evaluateStable((snapshot) =>
|
|
114
|
-
input.policy.evaluate({
|
|
115
|
-
kind: "runtime_selection",
|
|
116
|
-
availability: snapshot,
|
|
117
|
-
processId: current.processId,
|
|
118
|
-
selection: current.modelSelection ?? null,
|
|
119
|
-
}),
|
|
120
|
-
);
|
|
121
|
-
if (!validation.ok) {
|
|
122
|
-
parkStaleEvaluation();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const result = validation.value;
|
|
126
|
-
const inheritedInvalid =
|
|
127
|
-
!result.ok &&
|
|
128
|
-
current.modelSelection.provenance.kind === "inherited" &&
|
|
129
|
-
(result.code === "unknown_model_profile" || result.code === "model_profile_not_allowed");
|
|
130
|
-
if (inheritedInvalid) {
|
|
131
|
-
await projectCurrent();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const blockedReason = toFutureExecutionBlockReason(result, input.asOf, current.blockedReason);
|
|
135
|
-
if (sameModelPolicyState(current, { ...current, blockedReason })) return;
|
|
136
|
-
updateCurrent({ blockedReason });
|
|
103
|
+
// Re-plan the destination and validate against that turn, including pinned payload choices.
|
|
104
|
+
await projectCurrent();
|
|
137
105
|
});
|
|
138
106
|
}
|
|
139
107
|
const reaction = await runFutureExecutionPostCommitEffects(input, effects);
|
|
@@ -638,8 +638,8 @@ export function createLaunchCoordinator(deps: LaunchCoordinatorDeps): LaunchCoor
|
|
|
638
638
|
defaultModelProfileId:
|
|
639
639
|
eventProfile ?? watcher.launchModelConfig.defaultModelProfileId,
|
|
640
640
|
},
|
|
641
|
-
//
|
|
642
|
-
invalidModelConfig:
|
|
641
|
+
// Keep watcher intent; the affected turn enforces policy before starting.
|
|
642
|
+
invalidModelConfig: "retain",
|
|
643
643
|
},
|
|
644
644
|
);
|
|
645
645
|
return prepared.ok
|
|
@@ -212,6 +212,7 @@ export const ExecuteAction = defineOperation<
|
|
|
212
212
|
if (input.opts.nextTurnModelProfileId !== null) {
|
|
213
213
|
const evaluation = ctx.deps.processModelPolicy.evaluate({
|
|
214
214
|
kind: "runtime_selection",
|
|
215
|
+
target: { kind: "turn", turnId: candidateSelectedTurnId! },
|
|
215
216
|
availability: ctx.deps.getModelAvailabilitySnapshot(),
|
|
216
217
|
processId: ctx.process.processId,
|
|
217
218
|
selection: {
|
|
@@ -44,26 +44,24 @@ export const RetryStartup = defineOperation<
|
|
|
44
44
|
return reject("retry_target_missing", "Startup retry requires a failed current start");
|
|
45
45
|
}
|
|
46
46
|
const id = generateId("tsr");
|
|
47
|
+
// Operator retries validate current inputs; the old failure stays on its record.
|
|
48
|
+
const preparation = {
|
|
49
|
+
code: "model_required" as const,
|
|
50
|
+
safeSummary: "LLM start requires retry preparation",
|
|
51
|
+
};
|
|
47
52
|
const state: TurnStartRecordState =
|
|
48
53
|
failed.state.kind === "preparation_failed"
|
|
49
|
-
? {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// failure remains on its original start record.
|
|
53
|
-
code: "model_required" as const,
|
|
54
|
-
safeSummary: "LLM start requires retry preparation",
|
|
55
|
-
}
|
|
56
|
-
: failed.state.start.kind === "automatic"
|
|
57
|
-
? { kind: "starting" as const, start: failed.state.start }
|
|
54
|
+
? { ...failed.state, ...preparation }
|
|
55
|
+
: input.automaticRetry || failed.state.start.kind === "automatic"
|
|
56
|
+
? { kind: "starting", start: failed.state.start }
|
|
58
57
|
: {
|
|
59
|
-
kind: "preparation_failed"
|
|
58
|
+
kind: "preparation_failed",
|
|
60
59
|
requestedModelProfileId: failed.state.start.model.profileId,
|
|
61
60
|
providerOptions: { ...failed.state.start.providerOptions },
|
|
62
|
-
code: "model_required" as const,
|
|
63
|
-
safeSummary: "LLM start requires retry preparation",
|
|
64
61
|
...(failed.state.start.modelSelectionProvenance
|
|
65
62
|
? { modelSelectionProvenance: failed.state.start.modelSelectionProvenance }
|
|
66
63
|
: {}),
|
|
64
|
+
...preparation,
|
|
67
65
|
};
|
|
68
66
|
state.automaticRetry = input.automaticRetry;
|
|
69
67
|
const writes = createWrites({
|
|
@@ -4,10 +4,7 @@ import type {
|
|
|
4
4
|
ResolvedTurnStart,
|
|
5
5
|
TurnStartRecordState,
|
|
6
6
|
} from "@leitwerk-dev/domain";
|
|
7
|
-
import {
|
|
8
|
-
filterProviderOptionsForDefinition,
|
|
9
|
-
resolveOutcomeContract,
|
|
10
|
-
} from "@leitwerk-dev/process-sdk";
|
|
7
|
+
import { resolveOutcomeContract } from "@leitwerk-dev/process-sdk";
|
|
11
8
|
import { IPC_PROTOCOL_VERSION, WORKER_API_VERSION } from "@leitwerk-dev/worker-protocol";
|
|
12
9
|
import type { LeitwerkConfig } from "../config/config-types.js";
|
|
13
10
|
import type { RepositoryBundle } from "../db/repositories.js";
|
|
@@ -207,14 +204,40 @@ export async function prepareCreatedTurnStarts(
|
|
|
207
204
|
|
|
208
205
|
// Resolve the model and required settings without yielding. An edit while the
|
|
209
206
|
// resource bundle is assembled belongs to the next start, not this snapshot.
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
const priorState = write.input.state;
|
|
208
|
+
const captured = priorState.automaticRetry
|
|
209
|
+
? priorState.kind === "preparation_failed"
|
|
210
|
+
? priorState.requestedModelProfileId && priorState.modelSelectionProvenance
|
|
211
|
+
? {
|
|
212
|
+
modelProfileId: priorState.requestedModelProfileId,
|
|
213
|
+
provenance: priorState.modelSelectionProvenance,
|
|
214
|
+
}
|
|
215
|
+
: null
|
|
216
|
+
: priorState.kind === "starting" &&
|
|
217
|
+
priorState.start.kind === "llm" &&
|
|
218
|
+
priorState.start.modelSelectionProvenance
|
|
219
|
+
? {
|
|
220
|
+
modelProfileId: priorState.start.model.profileId,
|
|
221
|
+
provenance: priorState.start.modelSelectionProvenance,
|
|
222
|
+
}
|
|
223
|
+
: null
|
|
224
|
+
: null;
|
|
225
|
+
const evaluated = captured
|
|
226
|
+
? deps.processModelPolicy.evaluate({
|
|
227
|
+
kind: "runtime_selection",
|
|
228
|
+
target: { kind: "turn", turnId: write.input.turnId },
|
|
229
|
+
processId: nextProcess.processId,
|
|
230
|
+
selection: captured,
|
|
231
|
+
availability,
|
|
232
|
+
})
|
|
233
|
+
: deps.processModelPolicy.evaluate({
|
|
234
|
+
kind: "process_turn",
|
|
235
|
+
process: nextProcess,
|
|
236
|
+
turnId: write.input.turnId,
|
|
237
|
+
initialSelection: true,
|
|
238
|
+
startKind: write.input.startKind,
|
|
239
|
+
availability,
|
|
240
|
+
});
|
|
218
241
|
if (!evaluated.ok) {
|
|
219
242
|
const code =
|
|
220
243
|
evaluated.code === "model_unavailable" ||
|
|
@@ -243,6 +266,8 @@ export async function prepareCreatedTurnStarts(
|
|
|
243
266
|
Object.assign(nextProcess, patch);
|
|
244
267
|
Object.assign(writes.processPatch, patch);
|
|
245
268
|
}
|
|
269
|
+
// Automatic bootstrap recovery reuses the complete prepared execution, not current settings.
|
|
270
|
+
if (captured && priorState.kind === "starting") continue;
|
|
246
271
|
const provenance =
|
|
247
272
|
nextProcess.selectedTurnModelKind && nextProcess.selectedTurnModelSource
|
|
248
273
|
? {
|
|
@@ -303,9 +328,7 @@ export async function prepareCreatedTurnStarts(
|
|
|
303
328
|
const recoveryOptions = explicitProviderOptions
|
|
304
329
|
? { ...explicitProviderOptions }
|
|
305
330
|
: retainedProviderId !== null && retainedProviderId !== provider.id
|
|
306
|
-
? {
|
|
307
|
-
...filterProviderOptionsForDefinition(provider.definition.options, retainedOptions),
|
|
308
|
-
}
|
|
331
|
+
? {}
|
|
309
332
|
: retainedOptions;
|
|
310
333
|
const optionResult = resolveRegisteredProviderOptions({
|
|
311
334
|
provider,
|
|
@@ -66,13 +66,17 @@ export function prepareProcessModelConfig(input: {
|
|
|
66
66
|
else turnConfigs[id] = { ...turnConfigs[id], modelProfileId: config.modelProfileId };
|
|
67
67
|
}
|
|
68
68
|
const selections = [
|
|
69
|
-
patch.defaultModelProfileId,
|
|
70
|
-
...Object.
|
|
69
|
+
{ id: patch.defaultModelProfileId, target: { kind: "process_default" } as const },
|
|
70
|
+
...Object.entries(patch.turnConfigs ?? {}).map(([turnId, config]) => ({
|
|
71
|
+
id: config.modelProfileId,
|
|
72
|
+
target: { kind: "turn", turnId } as const,
|
|
73
|
+
})),
|
|
71
74
|
];
|
|
72
|
-
for (const id of selections) {
|
|
75
|
+
for (const { id, target } of selections) {
|
|
73
76
|
if (!id) continue;
|
|
74
77
|
const validation = policy.evaluate({
|
|
75
78
|
kind: "runtime_selection",
|
|
79
|
+
target,
|
|
76
80
|
processId: process.processId,
|
|
77
81
|
availability,
|
|
78
82
|
selection: {
|