@leitwerk-dev/protocol 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{chunk-C7IMTOT4.js → chunk-6VYYJ4GN.js} +19 -2
  2. package/dist/chunk-6VYYJ4GN.js.map +1 -0
  3. package/dist/{chunk-LTIDCJFK.js → chunk-GOYGXRLL.js} +5 -1
  4. package/dist/chunk-GOYGXRLL.js.map +1 -0
  5. package/dist/config-snapshot.d.ts +4 -0
  6. package/dist/config-snapshot.d.ts.map +1 -1
  7. package/dist/dashboard-contracts.d.ts +111 -0
  8. package/dist/dashboard-contracts.d.ts.map +1 -0
  9. package/dist/execution-inspection.d.ts +178 -0
  10. package/dist/execution-inspection.d.ts.map +1 -0
  11. package/dist/form-contract.d.ts +10 -0
  12. package/dist/form-contract.d.ts.map +1 -1
  13. package/dist/{http-contracts-public-BiX2Og68.d.ts → http-contracts-DrTIVrNI.d.ts} +434 -7
  14. package/dist/http-contracts-public.d.ts +4 -1
  15. package/dist/http-contracts-public.d.ts.map +1 -1
  16. package/dist/http-contracts-public.js +6 -4
  17. package/dist/http-contracts.d.ts +82 -5
  18. package/dist/http-contracts.d.ts.map +1 -1
  19. package/dist/http-contracts.js +4 -2
  20. package/dist/index.d.ts +5 -3
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +267 -249
  23. package/dist/index.js.map +1 -1
  24. package/dist/live-turn-projection.d.ts +30 -37
  25. package/dist/live-turn-projection.d.ts.map +1 -1
  26. package/dist/protocol.d.ts +13 -0
  27. package/dist/protocol.d.ts.map +1 -1
  28. package/dist/protocol.js +1 -1
  29. package/dist/scoped-settings.d.ts +116 -0
  30. package/dist/scoped-settings.d.ts.map +1 -0
  31. package/dist/skill-pack.d.ts +66 -0
  32. package/dist/skill-pack.d.ts.map +1 -0
  33. package/dist/ticket-creation-contracts.d.ts +6 -0
  34. package/dist/ticket-creation-contracts.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/config-snapshot.ts +4 -0
  37. package/src/dashboard-contracts.ts +111 -0
  38. package/src/execution-inspection.ts +204 -0
  39. package/src/form-contract.ts +10 -0
  40. package/src/http-contracts-public.ts +17 -0
  41. package/src/http-contracts.ts +98 -2
  42. package/src/index.ts +10 -6
  43. package/src/live-turn-projection.ts +177 -173
  44. package/src/protocol.ts +13 -0
  45. package/src/scoped-settings.ts +148 -0
  46. package/src/skill-pack.ts +93 -0
  47. package/src/ticket-creation-contracts.ts +6 -0
  48. package/dist/chunk-C7IMTOT4.js.map +0 -1
  49. package/dist/chunk-LTIDCJFK.js.map +0 -1
  50. package/dist/turn-trace-projection.d.ts +0 -5
  51. package/dist/turn-trace-projection.d.ts.map +0 -1
  52. package/src/turn-trace-projection.ts +0 -42
package/dist/protocol.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  parseSchema,
17
17
  parseWsFrame,
18
18
  unknownRecordSchema
19
- } from "./chunk-LTIDCJFK.js";
19
+ } from "./chunk-GOYGXRLL.js";
20
20
  export {
21
21
  WS_FRAME_DURABILITY,
22
22
  WS_PI_STREAM_TYPES,
@@ -0,0 +1,116 @@
1
+ import type { ResolvedSetting, SettingsOverride, SettingsSubject } from "@leitwerk-dev/domain";
2
+ /** Serializable metadata shared by extension declarations and operator forms. @public */
3
+ export interface SettingMetadata {
4
+ /** Namespaced, for example coding.planning_model. @public */
5
+ key: string;
6
+ /** Increment when stored values cease to satisfy the contract. @public */
7
+ schemaVersion: number;
8
+ /** Least to most specific, including instance where applicable. @public */
9
+ scopes: readonly string[];
10
+ /** @public */
11
+ merge: "replace";
12
+ /** @public */
13
+ form: {
14
+ /** @public */
15
+ label: string;
16
+ /** @public */
17
+ description?: string;
18
+ /** @public */
19
+ group: string;
20
+ /** @public */
21
+ control: "text" | "textarea" | "select" | "model" | "number" | "checkbox" | "multiselect" | "named-selection-list";
22
+ /** Repository selection metadata for the scope overview. @public */
23
+ overview?: "repository-mapping";
24
+ /** Load multi-select choices only after the operator enters a query. @public */
25
+ search?: {
26
+ /** Minimum trimmed query length. @public */
27
+ minimumLength: number;
28
+ /** @public */
29
+ placeholder?: string;
30
+ };
31
+ };
32
+ }
33
+ /** @public */
34
+ export interface SettingChoice {
35
+ /** @public */
36
+ value: string;
37
+ /** @public */
38
+ label: string;
39
+ /** @public */
40
+ disabledReason?: string;
41
+ }
42
+ /** @internal */
43
+ export interface SettingFieldView extends SettingMetadata {
44
+ /** @internal */
45
+ owner: string;
46
+ /** @internal */
47
+ choices: readonly SettingChoice[];
48
+ /** Dynamic options load separately from effective values. @internal */
49
+ choicesDeferred?: boolean;
50
+ /** @internal */
51
+ effective: ResolvedSetting | null;
52
+ /** @internal */
53
+ inherited: ResolvedSetting | null;
54
+ /** Includes reset revisions. @internal */
55
+ override: SettingsOverride | null;
56
+ /** @internal */
57
+ error: string | null;
58
+ }
59
+ /** @internal */
60
+ export interface SettingsPreview {
61
+ /** @internal */
62
+ subject: SettingsSubject;
63
+ /** @internal */
64
+ fields: SettingFieldView[];
65
+ /** Overrides remain visible while their extension or field is unavailable. @internal */
66
+ inactive: SettingsOverride[];
67
+ }
68
+ /** Optional collection presentation owned by the declaring integration. @public */
69
+ export interface SettingsScopeOverview {
70
+ /** Singular item name, such as Component. @public */
71
+ itemLabel: string;
72
+ /** Plural item name, such as Components. @public */
73
+ itemLabelPlural: string;
74
+ /** Group labels separated from item names by labelSeparator. @public */
75
+ parentLabel?: string;
76
+ /** Delimiter in discovered subject labels, for example " / ". @public */
77
+ labelSeparator?: string;
78
+ }
79
+ /** @internal */
80
+ export interface SettingsScopesResponse {
81
+ /** @internal */
82
+ scopes: Array<{
83
+ /** @internal */
84
+ id: string;
85
+ /** @internal */
86
+ label: string;
87
+ /** @internal */
88
+ overview?: SettingsScopeOverview;
89
+ }>;
90
+ /** @internal */
91
+ subjects: Array<SettingsSubject & {
92
+ /** @internal */
93
+ active: boolean;
94
+ /** Has declared fields or retained inactive overrides to display. @internal */
95
+ hasSettings: boolean;
96
+ }>;
97
+ }
98
+ /** Compact, locally resolved summaries; remote choice discovery is never needed. @internal */
99
+ export interface SettingsOverviewResponse {
100
+ /** @internal */
101
+ items: Array<{
102
+ /** @internal */ subjectId: string;
103
+ /** Active overrides, excluding resets. @internal */ customized: string[];
104
+ /** Present only when a field declares a repository mapping. @internal */ mapping?: SettingChoice[];
105
+ /** Resolution failures stay separate from unmapped/default states. @internal */ errors: string[];
106
+ }>;
107
+ }
108
+ /** One named set of selections. IDs survive renames and reordering. @public */
109
+ export interface NamedSelection {
110
+ /** @public */ id: string;
111
+ /** @public */ name: string;
112
+ /** @public */ values: string[];
113
+ }
114
+ /** Retained selections for both flat and named selection controls. @internal */
115
+ export declare function settingSelectionValues(value: unknown): string[];
116
+ //# sourceMappingURL=scoped-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scoped-settings.d.ts","sourceRoot":"","sources":["../src/scoped-settings.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,66 @@
1
+ import * as v from "valibot";
2
+ /** Supports the public inferred manifest declaration. @public */
3
+ declare const manifestSchema: v.ObjectSchema<{
4
+ /** @public */
5
+ readonly formatVersion: v.LiteralSchema<1, undefined>;
6
+ /** @public */
7
+ readonly upstream: v.ObjectSchema<{
8
+ /** @public */
9
+ readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
10
+ /** @public */
11
+ readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
12
+ }, undefined>;
13
+ /** @public */
14
+ readonly patchDigest: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
15
+ /** @public */
16
+ readonly skills: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
17
+ /** @public */
18
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
19
+ /** @public */
20
+ readonly directory: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, undefined>]>;
21
+ /** @public */
22
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
23
+ /** @public */
24
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
25
+ /** @public */
26
+ readonly sourcePath: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, undefined>]>;
27
+ /** @public */
28
+ readonly dependencies: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
29
+ }, undefined>, undefined>, v.MinLengthAction<{
30
+ /** @public */
31
+ id: string;
32
+ /** @public */
33
+ directory: string;
34
+ /** @public */
35
+ label: string;
36
+ /** @public */
37
+ description: string;
38
+ /** @public */
39
+ sourcePath: string;
40
+ /** @public */
41
+ dependencies: string[];
42
+ }[], 1, undefined>]>;
43
+ }, undefined>;
44
+ /** On-disk contract for an extension's generated skill pack. @public */
45
+ export type SkillPackManifest = v.InferOutput<typeof manifestSchema>;
46
+ /** Provenance retained with an immutable installed skill revision. @internal */
47
+ export interface SkillRevisionProvenance {
48
+ /** @internal */
49
+ extensionId: string;
50
+ /** @internal */
51
+ packageName: string;
52
+ /** @internal */
53
+ packageVersion: string;
54
+ /** @internal */
55
+ upstream: SkillPackManifest["upstream"];
56
+ /** @internal */
57
+ sourcePath: string;
58
+ /** @internal */
59
+ patchDigest: string;
60
+ /** @internal */
61
+ dependencies: string[];
62
+ }
63
+ /** Validates pack-local dependencies as well as the manifest shape. @internal */
64
+ export declare function parseSkillPackManifest(input: unknown): SkillPackManifest;
65
+ export {};
66
+ //# sourceMappingURL=skill-pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-pack.d.ts","sourceRoot":"","sources":["../src/skill-pack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAuC7B,iEAAiE;AACjE,QAAA,MAAM,cAAc;IACnB,cAAc;;IAEd,cAAc;;QAzBd,cAAc;;QAEd,cAAc;;;IAyBd,cAAc;;IAEd,cAAc;;QAtBd,cAAc;;QAEd,cAAc;;QAEd,cAAc;;QAEd,cAAc;;QAEd,cAAc;;QAEd,cAAc;;;;;;;;;;;;;;;;aAcb,CAAC;AAEH,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAErE,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACvC,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,gBAAgB;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAkBxE"}
@@ -5,6 +5,12 @@ export interface TicketCreationToolSummary {
5
5
  name: string;
6
6
  /** @internal */
7
7
  displayName: string;
8
+ /** @internal */
9
+ titlePath?: string;
10
+ /** @internal */
11
+ descriptionPath?: string;
12
+ /** @internal */
13
+ descriptionFormat?: "plain" | "markdown";
8
14
  }
9
15
  /** @internal */
10
16
  export type TicketResultArtifactLocator = {
@@ -1 +1 @@
1
- {"version":3,"file":"ticket-creation-contracts.d.ts","sourceRoot":"","sources":["../src/ticket-creation-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACzC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GACpC;IACA,gBAAgB;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,gBAAgB;IAChB,YAAY,EAAE,MAAM,CAAC;CACpB,GACD;IACA,gBAAgB;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;CACnB,CAAC;AAEL,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IACnC,gBAAgB;IAChB,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC/C,gBAAgB;IAChB,QAAQ,EAAE,2BAA2B,CAAC;IACtC,gBAAgB;IAChB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gBAAgB;IAChB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAChD,gBAAgB;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB;IAChB,QAAQ,EAAE,eAAe,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC9C,gBAAgB;IAChB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"ticket-creation-contracts.d.ts","sourceRoot":"","sources":["../src/ticket-creation-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACzC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB;IAChB,iBAAiB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CACzC;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GACpC;IACA,gBAAgB;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,gBAAgB;IAChB,YAAY,EAAE,MAAM,CAAC;CACpB,GACD;IACA,gBAAgB;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;CACnB,CAAC;AAEL,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IACnC,gBAAgB;IAChB,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC/C,gBAAgB;IAChB,QAAQ,EAAE,2BAA2B,CAAC;IACtC,gBAAgB;IAChB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gBAAgB;IAChB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAChD,gBAAgB;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB;IAChB,QAAQ,EAAE,eAAe,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC9C,gBAAgB;IAChB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leitwerk-dev/protocol",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/leitwerk-dev/leitwerk.git",
@@ -43,7 +43,7 @@
43
43
  "build": "tsup --silent"
44
44
  },
45
45
  "dependencies": {
46
- "@leitwerk-dev/domain": "0.3.1",
46
+ "@leitwerk-dev/domain": "0.4.1",
47
47
  "valibot": "^1.3.1"
48
48
  },
49
49
  "devDependencies": {
@@ -172,6 +172,8 @@ export interface PiConfigSnapshot {
172
172
  agent_dir: string;
173
173
  /** @public */
174
174
  model_profiles: ModelProfileSnapshot[];
175
+ /** Required global default; references an entry in model_profiles. @public */
176
+ default_model_profile: string;
175
177
  /** Global default system prompt template for all processes. Rendered with Mustache against runtime context. When omitted, the worker uses its built-in default. @internal */
176
178
  system_prompt_template?: string;
177
179
  /** Server-side pre-start process title generation settings. @public */
@@ -196,6 +198,8 @@ export interface ProcessTurnConfigSnapshot {
196
198
 
197
199
  /** @public */
198
200
  export interface ProcessConfigSnapshot {
201
+ /** Server-only installed skill IDs for new launches. Replaces global defaults; [] opts out. @public */
202
+ default_skills?: string[];
199
203
  /** @public */
200
204
  default_model_profile?: string;
201
205
  /**
@@ -0,0 +1,111 @@
1
+ /** A safe, actionable model-readiness finding. @internal */
2
+ export interface DashboardConfigurationIssue {
3
+ /** @internal */
4
+ id: string;
5
+ /** @internal */
6
+ code: string;
7
+ /** @internal */
8
+ severity: "error" | "warning";
9
+ /** @internal */
10
+ message: string;
11
+ /** @internal */
12
+ sources: Array<{
13
+ /** @internal */
14
+ label: string;
15
+ /** Local correction destination, when one exists. @internal */
16
+ href: string | null;
17
+ }>;
18
+ }
19
+
20
+ /** Server-owned overview of the retained installation. @internal */
21
+ export interface DashboardResponseBody {
22
+ /** @internal */
23
+ generatedAt: string;
24
+ /** @internal */
25
+ definitions: {
26
+ /** @internal */
27
+ total: number;
28
+ /** @internal */
29
+ items: Array<{
30
+ /** @internal */
31
+ id: string;
32
+ /** @internal */
33
+ name: string;
34
+ }>;
35
+ };
36
+ /** @internal */
37
+ watchers: {
38
+ /** @internal */
39
+ total: number;
40
+ /** @internal */
41
+ enabled: number;
42
+ /** @internal */
43
+ items: Array<{
44
+ /** @internal */
45
+ id: string;
46
+ /** @internal */
47
+ name: string;
48
+ /** @internal */
49
+ enabled: boolean;
50
+ }>;
51
+ };
52
+ /** @internal */
53
+ skills: {
54
+ /** @internal */
55
+ total: number;
56
+ /** Operator-managed and extension-installed skills. @internal */
57
+ installed: number;
58
+ /** Automatically available bundled skills. @internal */
59
+ bundled: number;
60
+ };
61
+ /** @internal */
62
+ processes: {
63
+ /** @internal */
64
+ total: number;
65
+ /** @internal */
66
+ byStatus: Array<{
67
+ /** @internal */
68
+ status: "running" | "waiting" | "error" | "completed" | "aborted";
69
+ /** @internal */
70
+ count: number;
71
+ }>;
72
+ /** @internal */
73
+ byDefinition: Array<{
74
+ /** @internal */
75
+ processId: string;
76
+ /** @internal */
77
+ name: string;
78
+ /** @internal */
79
+ count: number;
80
+ }>;
81
+ };
82
+ /** @internal */
83
+ costs: {
84
+ /** Null when turns exist but no cost has been recorded. @internal */
85
+ totalUsd: number | null;
86
+ /** @internal */
87
+ totalLlmTurnCount: number;
88
+ /** @internal */
89
+ pricedTurnCount: number;
90
+ /** @internal */
91
+ missingCostTurnCount: number;
92
+ /** @internal */
93
+ isPartial: boolean;
94
+ /** Descending by recorded cost. @internal */
95
+ byModel: Array<{
96
+ /** Null when historical model identity is unavailable. @internal */
97
+ providerId: string | null;
98
+ /** @internal */
99
+ modelId: string | null;
100
+ /** @internal */
101
+ costUsd: number;
102
+ /** @internal */
103
+ turnCount: number;
104
+ }>;
105
+ };
106
+ /** @internal */
107
+ configuration: {
108
+ /** @internal */
109
+ issues: DashboardConfigurationIssue[];
110
+ };
111
+ }
@@ -0,0 +1,204 @@
1
+ import type {
2
+ InspectionEvidence,
3
+ InspectionModelInput,
4
+ InspectionProduct,
5
+ PreparedTurnStart,
6
+ ProcessEvent,
7
+ ProcessTurnAnnotation,
8
+ ProcessTurnRecord,
9
+ TurnStartKind,
10
+ } from "@leitwerk-dev/domain";
11
+ import type { PiSessionContentBlock, TurnReasoningDetailResponseBody } from "./http-contracts.js";
12
+ import type { TurnUsageSnapshot } from "./primary-path-snapshot.js";
13
+
14
+ /** Exact source boundary; a null source means ownership was not recorded unambiguously. @internal */
15
+ export interface InspectionBoundary {
16
+ /** @internal */
17
+ entryId: string;
18
+ /** @internal */
19
+ turnRecordId: string | null;
20
+ }
21
+
22
+ /** Independent context dimensions, never inferred from the current workflow. @internal */
23
+ export interface ExecutionContextOrigin {
24
+ /** @internal */
25
+ authoredMode: InspectionEvidence<PreparedTurnStart["contextMode"]>;
26
+ /** @internal */
27
+ startTarget: InspectionEvidence<PreparedTurnStart["startTarget"]>;
28
+ /** A recorded null means no inherited conversation, not no supplied inputs. @internal */
29
+ conversation: InspectionEvidence<InspectionBoundary | null>;
30
+ /** @internal */
31
+ structuralPath: ProcessTurnRecord["pathType"];
32
+ /** @internal */
33
+ summary: string;
34
+ }
35
+
36
+ /** Compact execution facts can render independently of expanded reads. @internal */
37
+ export interface ExecutionInspectionSummary {
38
+ /** @internal */
39
+ instanceId: string;
40
+ /** @internal */
41
+ execution: Omit<ProcessTurnRecord, "turnResultMarkdown">;
42
+ /** @internal */
43
+ origin: ExecutionContextOrigin;
44
+ /** @internal */
45
+ startKind: InspectionEvidence<TurnStartKind>;
46
+ /** @internal */
47
+ model: InspectionEvidence<InspectionModelInput["model"]>;
48
+ /** @internal */
49
+ usage: TurnUsageSnapshot | null;
50
+ /** @internal */
51
+ previousTurnRecordId: string | null;
52
+ /** @internal */
53
+ nextTurnRecordId: string | null;
54
+ /** @internal */
55
+ modelInputCount: number;
56
+ }
57
+
58
+ /** Stable opaque block identities do not encode transcript text or array indexes. @internal */
59
+ export interface InspectionTraceBlock {
60
+ /** @internal */
61
+ id: string;
62
+ /** @internal */
63
+ content: PiSessionContentBlock;
64
+ }
65
+
66
+ /** One recorded message, preserving role and block order. @internal */
67
+ export interface InspectionTraceMessage {
68
+ /** @internal */
69
+ id: string;
70
+ /** @internal */
71
+ entryId: string | null;
72
+ /** Durable live event targets that resolve to this committed message. @internal */
73
+ aliases: string[];
74
+ /** @internal */
75
+ role: string;
76
+ /** @internal */
77
+ timestamp: string;
78
+ /** @internal */
79
+ blocks: InspectionTraceBlock[];
80
+ /** @internal */
81
+ toolCallId: string | null;
82
+ /** @internal */
83
+ toolName: string | null;
84
+ /** @internal */
85
+ isError: boolean;
86
+ }
87
+
88
+ /** Target validation never substitutes another execution. @internal */
89
+ export type InspectionTargetState =
90
+ | {
91
+ /** @internal */
92
+ state: "available";
93
+ /** @internal */
94
+ itemId: string;
95
+ }
96
+ | {
97
+ /** @internal */
98
+ state: "unavailable";
99
+ /** @internal */
100
+ reason: string;
101
+ };
102
+
103
+ /** Expanded trace reuses the existing sequenced live-history contract. @internal */
104
+ export interface ExecutionInspectionTrace extends TurnReasoningDetailResponseBody {
105
+ /** Retained branch messages with unknown execution ownership, never inherited-context claims. @internal */
106
+ unassignedMessages?: InspectionTraceMessage[];
107
+ /** Durable events retain addressable evidence even without a committed session. @internal */
108
+ events: ProcessEvent[];
109
+ /** Applicable input, decision, and result evidence, including non-model executions. @internal */
110
+ annotations: ProcessTurnAnnotation[];
111
+ /** @internal */
112
+ output: string | null;
113
+ /** @internal */
114
+ messages: InspectionTraceMessage[];
115
+ /** @internal */
116
+ target: InspectionTargetState | null;
117
+ /** @internal */
118
+ inheritedBoundary: InspectionBoundary | null;
119
+ }
120
+
121
+ /** @internal */
122
+ export interface InspectionProductVersion extends InspectionProduct {
123
+ /** @internal */
124
+ supplyId: string;
125
+ /** @internal */
126
+ consumed: boolean;
127
+ }
128
+
129
+ /** @internal */
130
+ export interface InspectionContextMessage {
131
+ /** @internal */
132
+ entryId: string | null;
133
+ /** @internal */
134
+ sourceTurnRecordId: string | null;
135
+ /** @internal */
136
+ role: string;
137
+ /** Inherited messages link to their source; only local or transformed content is expanded. @internal */
138
+ content: InspectionEvidence<unknown> | null;
139
+ }
140
+
141
+ /** @internal */
142
+ export interface InspectionInputRevision
143
+ extends Pick<InspectionConfigurationRevision, "id" | "timestamp" | "boundaryEntryId" | "model"> {
144
+ /** @internal */
145
+ messages: InspectionContextMessage[];
146
+ }
147
+
148
+ /** @internal */
149
+ export interface InspectionCompaction {
150
+ /** @internal */
151
+ entryId: string;
152
+ /** @internal */
153
+ firstKeptEntryId: string;
154
+ /** @internal */
155
+ summary: string;
156
+ }
157
+
158
+ /** @internal */
159
+ export interface ExecutionInspectionContext {
160
+ /** Recorded local input messages also remain available for legacy executions. @internal */
161
+ inputMessages: InspectionTraceMessage[];
162
+ /** @internal */
163
+ instanceId: string;
164
+ /** @internal */
165
+ turnRecordId: string;
166
+ /** @internal */
167
+ origin: ExecutionContextOrigin;
168
+ /** Compact ancestry only; ancestor transcripts are never recursively loaded. @internal */
169
+ ancestry: Array<{
170
+ /** @internal */
171
+ turnRecordId: string;
172
+ /** @internal */
173
+ turnId: string;
174
+ /** @internal */
175
+ boundaryEntryId: string;
176
+ }>;
177
+ /** @internal */
178
+ products: InspectionEvidence<InspectionProductVersion[]>;
179
+ /** @internal */
180
+ modelInputs: InspectionEvidence<InspectionInputRevision[]>;
181
+ /** @internal */
182
+ compactions: InspectionCompaction[];
183
+ }
184
+
185
+ /** @internal */
186
+ export interface InspectionConfigurationRevision
187
+ extends Omit<InspectionModelInput, "messages" | "kind"> {
188
+ /** @internal */
189
+ id: string;
190
+ /** @internal */
191
+ timestamp: string;
192
+ }
193
+
194
+ /** @internal */
195
+ export interface ExecutionInspectionConfiguration {
196
+ /** @internal */
197
+ instanceId: string;
198
+ /** @internal */
199
+ turnRecordId: string;
200
+ /** @internal */
201
+ revisions: InspectionEvidence<InspectionConfigurationRevision[]>;
202
+ /** Only a navigation reference to the current workflow, never historical configuration. @internal */
203
+ currentWorkflowTurnId: string;
204
+ }
@@ -9,6 +9,8 @@ export interface FormFieldOptionDefinition {
9
9
  label: string;
10
10
  /** @internal */
11
11
  description?: string;
12
+ /** Values selected by this option when used as a launcher preset. @public */
13
+ selectionValues?: readonly string[];
12
14
  }
13
15
 
14
16
  /** @internal */
@@ -39,6 +41,14 @@ export interface FormFieldDefinition<TKind extends FormFieldKind = FormFieldKind
39
41
  description?: string;
40
42
  /** @internal */
41
43
  options?: readonly FormFieldOptionDefinition[];
44
+ /** Select several values, serialized as newline-separated stable option IDs. @public */
45
+ multiple?: boolean;
46
+ /** Show a local search and selection count for a multiple select. @public */
47
+ searchable?: boolean;
48
+ /** Multiple-select field whose selected options supply selectionValues presets. @public */
49
+ presetsFrom?: string;
50
+ /** Clear this field when any of these launcher fields changes. @public */
51
+ resetOn?: readonly string[];
42
52
  /** @internal */
43
53
  rememberRecentValues?: boolean;
44
54
  /** Publish this field as transition-scoped product/input data. @internal */
@@ -4,6 +4,7 @@ export type {
4
4
  ApiTokensResponseBody,
5
5
  CreateApiTokenResponseBody,
6
6
  } from "./api-token-contracts.js";
7
+ export type { DashboardConfigurationIssue, DashboardResponseBody } from "./dashboard-contracts.js";
7
8
  export type {
8
9
  AuthMeResponseBody,
9
10
  CronPreviewResponseBody,
@@ -32,6 +33,7 @@ export type {
32
33
  LauncherRecentValuesResponseBody,
33
34
  LaunchersResponseBody,
34
35
  LauncherTurnModelConfigPreview,
36
+ LauncherValidationResponseBody,
35
37
  LaunchRunResponseBody,
36
38
  ModelProfileOptionSummary,
37
39
  ModelProviderOptionsResponseBody,
@@ -58,6 +60,8 @@ export type {
58
60
  ProcessLaunchConfigurationView,
59
61
  ProcessLaunchRunsResponseBody,
60
62
  ProcessListItem,
63
+ ProcessModelConfigPatch,
64
+ ProcessModelConfigResponseBody,
61
65
  ProcessModelConfigurationView,
62
66
  ProcessOverviewItem,
63
67
  ProcessRetryConfig,
@@ -84,3 +88,16 @@ export type {
84
88
  WatchersResponseBody,
85
89
  } from "./http-contracts.js";
86
90
  export { parseScheduleRequestInput, resolvePromptCacheSwitch } from "./http-contracts.js";
91
+
92
+ export type {
93
+ NamedSelection,
94
+ SettingChoice,
95
+ SettingFieldView,
96
+ SettingMetadata,
97
+ SettingsOverviewResponse,
98
+ SettingsPreview,
99
+ SettingsScopeOverview,
100
+ SettingsScopesResponse,
101
+ } from "./scoped-settings.js";
102
+
103
+ export { settingSelectionValues } from "./scoped-settings.js";