@leitwerk-dev/process-sdk 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ui-extension.d.ts +20 -0
- package/dist/browser-ui-extension.d.ts.map +1 -1
- package/dist/capabilities.d.ts +6 -0
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/{chunk-LIIP7FMU.js → chunk-5R6MVLHC.js} +1 -1
- package/dist/chunk-5R6MVLHC.js.map +1 -0
- package/dist/chunk-DVXW2ZUV.js +1 -0
- package/dist/chunk-DVXW2ZUV.js.map +1 -0
- package/dist/{chunk-TRQJ5PRM.js → chunk-I7U6HCLN.js} +1 -11
- package/dist/chunk-I7U6HCLN.js.map +1 -0
- package/dist/{chunk-5RJZ2E7D.js → chunk-TM2LTSW4.js} +2 -6
- package/dist/chunk-TM2LTSW4.js.map +1 -0
- package/dist/codecs.d.ts +1 -0
- package/dist/codecs.d.ts.map +1 -1
- package/dist/commit-message.d.ts +5 -0
- package/dist/commit-message.d.ts.map +1 -1
- package/dist/core-capabilities.d.ts +396 -44
- package/dist/core-capabilities.d.ts.map +1 -1
- package/dist/define-process.d.ts +209 -64
- package/dist/define-process.d.ts.map +1 -1
- package/dist/event-bus.d.ts +1 -0
- package/dist/event-bus.d.ts.map +1 -1
- package/dist/{extension-api-BBcwktmc.d.ts → extension-api-B4gG5w1K.d.ts} +1111 -153
- package/dist/extension-api.d.ts +481 -38
- package/dist/extension-api.d.ts.map +1 -1
- package/dist/external-action-source.d.ts +9 -0
- package/dist/external-action-source.d.ts.map +1 -0
- package/dist/external-source-poll.d.ts +22 -0
- package/dist/external-source-poll.d.ts.map +1 -0
- package/dist/flow.d.ts +380 -107
- package/dist/flow.d.ts.map +1 -1
- package/dist/form-contract.d.ts +1 -1
- package/dist/form-contract.d.ts.map +1 -1
- package/dist/fs-utils.d.ts +6 -0
- package/dist/fs-utils.d.ts.map +1 -1
- package/dist/git-binary.d.ts +2 -1
- package/dist/git-binary.d.ts.map +1 -1
- package/dist/git-binary.js +25 -33
- package/dist/git-binary.js.map +1 -1
- package/dist/graph-fragments.d.ts +16 -0
- package/dist/graph-fragments.d.ts.map +1 -1
- package/dist/host-capabilities.d.ts +9 -3
- package/dist/host-capabilities.d.ts.map +1 -1
- package/dist/index.d.ts +40 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4876 -29
- package/dist/index.js.map +1 -1
- package/dist/integration-http.d.ts +32 -0
- package/dist/integration-http.d.ts.map +1 -0
- package/dist/json-data.d.ts +3 -0
- package/dist/json-data.d.ts.map +1 -0
- package/dist/leaf-outcome-renderer.d.ts +35 -0
- package/dist/leaf-outcome-renderer.d.ts.map +1 -1
- package/dist/leaf-outcome-renderer.js +86 -64
- package/dist/leaf-outcome-renderer.js.map +1 -1
- package/dist/leaf-outcomes.d.ts +3 -0
- package/dist/leaf-outcomes.d.ts.map +1 -1
- package/dist/model-provider.d.ts +144 -12
- package/dist/model-provider.d.ts.map +1 -1
- package/dist/pi-config-public.d.ts +2 -0
- package/dist/pi-config-public.d.ts.map +1 -0
- package/dist/pi-config-public.js +15 -0
- package/dist/pi-config-public.js.map +1 -0
- package/dist/pi-config.d.ts +41 -5
- package/dist/pi-config.d.ts.map +1 -1
- package/dist/pi-config.js +20 -180
- package/dist/pi-config.js.map +1 -1
- package/dist/process-definition-internals.d.ts +4 -0
- package/dist/process-definition-internals.d.ts.map +1 -1
- package/dist/process-flow-view.d.ts +2 -0
- package/dist/process-flow-view.d.ts.map +1 -1
- package/dist/process-graph.d.ts +34 -0
- package/dist/process-graph.d.ts.map +1 -1
- package/dist/process-launcher-builder.d.ts +5 -0
- package/dist/process-launcher-builder.d.ts.map +1 -1
- package/dist/process-watcher-builder.d.ts +5 -0
- package/dist/process-watcher-builder.d.ts.map +1 -1
- package/dist/process-watcher-source.d.ts +3 -1
- package/dist/process-watcher-source.d.ts.map +1 -1
- package/dist/project-binding.d.ts +13 -0
- package/dist/project-binding.d.ts.map +1 -0
- package/dist/registry-utils.d.ts +6 -0
- package/dist/registry-utils.d.ts.map +1 -1
- package/dist/repository-feedback.d.ts +47 -0
- package/dist/repository-feedback.d.ts.map +1 -0
- package/dist/repository-git-env.d.ts +8 -2
- package/dist/repository-git-env.d.ts.map +1 -1
- package/dist/repository-http.d.ts +31 -0
- package/dist/repository-http.d.ts.map +1 -0
- package/dist/repository-https.d.ts +3 -0
- package/dist/repository-https.d.ts.map +1 -0
- package/dist/repository-issue-watcher.d.ts +51 -0
- package/dist/repository-issue-watcher.d.ts.map +1 -0
- package/dist/repository-reconciliation.d.ts +5 -0
- package/dist/repository-reconciliation.d.ts.map +1 -0
- package/dist/repository-source-config.d.ts +58 -0
- package/dist/repository-source-config.d.ts.map +1 -0
- package/dist/repository-types.d.ts +63 -0
- package/dist/repository-types.d.ts.map +1 -0
- package/dist/review-flow-public.d.ts +2 -0
- package/dist/review-flow-public.d.ts.map +1 -0
- package/dist/review-flow-public.js +11 -0
- package/dist/review-flow-public.js.map +1 -0
- package/dist/review-flow.d.ts +6 -0
- package/dist/review-flow.d.ts.map +1 -1
- package/dist/review-flow.js +12 -43
- package/dist/review-flow.js.map +1 -1
- package/dist/runtime-internals-public.d.ts +2 -0
- package/dist/runtime-internals-public.d.ts.map +1 -0
- package/dist/runtime-internals-public.js +16 -0
- package/dist/runtime-internals-public.js.map +1 -0
- package/dist/runtime-internals.js +19 -2
- package/dist/runtime-internals.js.map +1 -1
- package/dist/server-events.d.ts +67 -0
- package/dist/server-events.d.ts.map +1 -1
- package/dist/server-process-builder.d.ts +7 -0
- package/dist/server-process-builder.d.ts.map +1 -1
- package/dist/state-helpers.d.ts +8 -0
- package/dist/state-helpers.d.ts.map +1 -1
- package/dist/subprocess-env.d.ts +4 -0
- package/dist/subprocess-env.d.ts.map +1 -1
- package/dist/tool-arguments.d.ts +9 -0
- package/dist/tool-arguments.d.ts.map +1 -0
- package/dist/tool-renderers.d.ts +6 -0
- package/dist/tool-renderers.d.ts.map +1 -1
- package/dist/turn-semantics.d.ts +18 -6
- package/dist/turn-semantics.d.ts.map +1 -1
- package/dist/types.d.ts +209 -38
- package/dist/types.d.ts.map +1 -1
- package/dist/ui-process-builder.d.ts +5 -0
- package/dist/ui-process-builder.d.ts.map +1 -1
- package/dist/worker-process-builder.d.ts +5 -0
- package/dist/worker-process-builder.d.ts.map +1 -1
- package/package.json +17 -15
- package/src/browser-ui-extension.ts +20 -0
- package/src/capabilities.ts +9 -1
- package/src/codecs.ts +1 -0
- package/src/commit-message.ts +5 -0
- package/src/core-capabilities.ts +464 -59
- package/src/define-process.ts +384 -332
- package/src/event-bus.ts +1 -0
- package/src/extension-api.ts +521 -41
- package/src/external-action-source.ts +17 -0
- package/src/external-source-poll.ts +61 -0
- package/src/flow.ts +674 -677
- package/src/form-contract.ts +0 -4
- package/src/fs-utils.ts +21 -2
- package/src/git-binary.ts +2 -1
- package/src/graph-fragments.ts +16 -0
- package/src/host-capabilities.ts +9 -6
- package/src/index.ts +51 -206
- package/src/integration-http.ts +70 -0
- package/src/json-data.ts +25 -0
- package/src/leaf-outcome-renderer.ts +35 -0
- package/src/leaf-outcomes.ts +4 -9
- package/src/model-provider.ts +179 -43
- package/src/pi-config-public.ts +7 -0
- package/src/pi-config.ts +48 -8
- package/src/process-definition-internals.ts +4 -0
- package/src/process-flow-view.ts +34 -88
- package/src/process-graph.ts +59 -51
- package/src/process-launcher-builder.ts +5 -0
- package/src/process-watcher-builder.ts +5 -0
- package/src/process-watcher-source.ts +9 -10
- package/src/project-binding.ts +40 -0
- package/src/registry-utils.ts +7 -5
- package/src/repository-feedback.ts +85 -0
- package/src/repository-git-env.ts +40 -2
- package/src/repository-http.ts +88 -0
- package/src/repository-https.ts +22 -0
- package/src/repository-issue-watcher.ts +122 -0
- package/src/repository-reconciliation.ts +30 -0
- package/src/repository-source-config.ts +79 -0
- package/src/repository-types.ts +63 -0
- package/src/review-flow-public.ts +5 -0
- package/src/review-flow.ts +6 -0
- package/src/runtime-internals-public.ts +7 -0
- package/src/server-events.ts +67 -0
- package/src/server-process-builder.ts +10 -1
- package/src/state-helpers.ts +14 -4
- package/src/subprocess-env.ts +9 -0
- package/src/tool-arguments.ts +39 -0
- package/src/tool-renderers.ts +6 -0
- package/src/turn-semantics.ts +45 -76
- package/src/types.ts +216 -44
- package/src/ui-process-builder.ts +8 -1
- package/src/worker-process-builder.ts +8 -1
- package/dist/browser-ui-extension.js +0 -2
- package/dist/browser-ui-extension.js.map +0 -1
- package/dist/capabilities.js +0 -7
- package/dist/capabilities.js.map +0 -1
- package/dist/chunk-5RJZ2E7D.js.map +0 -1
- package/dist/chunk-LIIP7FMU.js.map +0 -1
- package/dist/chunk-TRQJ5PRM.js.map +0 -1
- package/dist/codecs.js +0 -9
- package/dist/codecs.js.map +0 -1
- package/dist/commit-message.js +0 -3
- package/dist/commit-message.js.map +0 -1
- package/dist/core-capabilities.js +0 -6
- package/dist/core-capabilities.js.map +0 -1
- package/dist/define-process.js +0 -1078
- package/dist/define-process.js.map +0 -1
- package/dist/event-bus.js +0 -31
- package/dist/event-bus.js.map +0 -1
- package/dist/extension-api.js +0 -5
- package/dist/extension-api.js.map +0 -1
- package/dist/flow.js +0 -1645
- package/dist/flow.js.map +0 -1
- package/dist/form-contract.js +0 -2
- package/dist/form-contract.js.map +0 -1
- package/dist/fs-utils.js +0 -23
- package/dist/fs-utils.js.map +0 -1
- package/dist/graph-fragments.js +0 -57
- package/dist/graph-fragments.js.map +0 -1
- package/dist/host-capabilities.js +0 -42
- package/dist/host-capabilities.js.map +0 -1
- package/dist/launcher-contract.js +0 -2
- package/dist/launcher-contract.js.map +0 -1
- package/dist/leaf-outcomes.js +0 -52
- package/dist/leaf-outcomes.js.map +0 -1
- package/dist/model-provider.js +0 -171
- package/dist/model-provider.js.map +0 -1
- package/dist/process-definition-internals.js +0 -25
- package/dist/process-definition-internals.js.map +0 -1
- package/dist/process-flow-view.js +0 -418
- package/dist/process-flow-view.js.map +0 -1
- package/dist/process-graph.js +0 -212
- package/dist/process-graph.js.map +0 -1
- package/dist/process-launcher-builder.js +0 -43
- package/dist/process-launcher-builder.js.map +0 -1
- package/dist/process-watcher-builder.js +0 -40
- package/dist/process-watcher-builder.js.map +0 -1
- package/dist/process-watcher-source.js +0 -52
- package/dist/process-watcher-source.js.map +0 -1
- package/dist/registry-utils.js +0 -18
- package/dist/registry-utils.js.map +0 -1
- package/dist/repository-git-env.js +0 -26
- package/dist/repository-git-env.js.map +0 -1
- package/dist/server-events.js +0 -2
- package/dist/server-events.js.map +0 -1
- package/dist/server-process-builder.js +0 -52
- package/dist/server-process-builder.js.map +0 -1
- package/dist/state-helpers.js +0 -18
- package/dist/state-helpers.js.map +0 -1
- package/dist/subprocess-env.js +0 -34
- package/dist/subprocess-env.js.map +0 -1
- package/dist/tool-renderers.js +0 -63
- package/dist/tool-renderers.js.map +0 -1
- package/dist/turn-semantics.js +0 -365
- package/dist/turn-semantics.js.map +0 -1
- package/dist/types.js +0 -23
- package/dist/types.js.map +0 -1
- package/dist/ui-process-builder.js +0 -30
- package/dist/ui-process-builder.js.map +0 -1
- package/dist/worker-process-builder.js +0 -22
- package/dist/worker-process-builder.js.map +0 -1
package/src/core-capabilities.ts
CHANGED
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
ExternalActionSource,
|
|
25
25
|
FormDefinition,
|
|
26
26
|
LauncherContext,
|
|
27
|
+
LaunchPreparationCheck,
|
|
27
28
|
ProcessLaunchConfig,
|
|
28
29
|
ProcessLauncherService,
|
|
29
30
|
ProcessLaunchPlan,
|
|
@@ -32,75 +33,127 @@ import type {
|
|
|
32
33
|
RepositoryCredentialRegistrar,
|
|
33
34
|
} from "./extension-api.js";
|
|
34
35
|
|
|
36
|
+
/** @internal */
|
|
35
37
|
export interface ProcessCreateInputLike {
|
|
38
|
+
/** @internal */
|
|
36
39
|
processId?: ProcessInstance["processId"];
|
|
40
|
+
/** @internal */
|
|
37
41
|
selectedTurnId?: ProcessInstance["selectedTurnId"];
|
|
42
|
+
/** @internal */
|
|
38
43
|
lifecycleStatus?: ProcessInstance["lifecycleStatus"];
|
|
44
|
+
/** @internal */
|
|
39
45
|
title?: string | null;
|
|
46
|
+
/** @internal */
|
|
40
47
|
externalId?: string | null;
|
|
48
|
+
/** @internal */
|
|
41
49
|
externalUrl?: string | null;
|
|
50
|
+
/** @internal */
|
|
42
51
|
metadata?: Record<string, unknown> | null;
|
|
52
|
+
/** @internal */
|
|
43
53
|
defaultModelProfileId?: string | null;
|
|
54
|
+
/** @internal */
|
|
44
55
|
turnConfigsJson?: string | null;
|
|
56
|
+
/** @internal */
|
|
45
57
|
selectedTurnModelProfileId?: string | null;
|
|
58
|
+
/** @internal */
|
|
46
59
|
paramsJson?: string | null;
|
|
60
|
+
/** @internal */
|
|
47
61
|
stateJson?: string | null;
|
|
48
62
|
}
|
|
49
63
|
|
|
64
|
+
/** @public */
|
|
50
65
|
export interface ProcessRepoLike {
|
|
66
|
+
/** @internal */
|
|
51
67
|
create(input: ProcessCreateInputLike): ProcessInstance;
|
|
68
|
+
/** @internal */
|
|
52
69
|
getById(id: string): ProcessInstance | null;
|
|
70
|
+
/** @public */
|
|
53
71
|
listAll(): ProcessInstance[];
|
|
54
|
-
/** Startup-only compatibility migrations may rewrite persisted process position and state. */
|
|
72
|
+
/** Startup-only compatibility migrations may rewrite persisted process position and state. @public */
|
|
55
73
|
update(
|
|
56
74
|
id: string,
|
|
57
75
|
input: {
|
|
76
|
+
/** @public */
|
|
58
77
|
selectedTurnId?: TurnId | null;
|
|
78
|
+
/** @public */
|
|
59
79
|
currentExecution?: ProcessInstance["currentExecution"];
|
|
80
|
+
/** @public */
|
|
60
81
|
stateJson?: string | null;
|
|
61
82
|
},
|
|
62
83
|
): ProcessInstance | null;
|
|
63
84
|
}
|
|
64
85
|
|
|
86
|
+
/** @public */
|
|
65
87
|
export interface ProcessProjectRepoLike {
|
|
66
|
-
/** Server-provided project mutation service. Implementations should emit project.updated after committed writes. */
|
|
88
|
+
/** Server-provided project mutation service. Implementations should emit project.updated after committed writes. @internal */
|
|
67
89
|
create(input: {
|
|
90
|
+
/** @internal */
|
|
68
91
|
instanceId: string;
|
|
92
|
+
/** @internal */
|
|
69
93
|
key: string;
|
|
94
|
+
/** @internal */
|
|
70
95
|
repoLocator: string;
|
|
96
|
+
/** @internal */
|
|
71
97
|
baseBranch: string;
|
|
98
|
+
/** @internal */
|
|
72
99
|
workBranch?: string | null;
|
|
100
|
+
/** @internal */
|
|
73
101
|
externalId?: string | null;
|
|
102
|
+
/** @internal */
|
|
74
103
|
externalUrl?: string | null;
|
|
104
|
+
/** @internal */
|
|
75
105
|
metadata?: Record<string, unknown> | null;
|
|
106
|
+
/** @internal */
|
|
76
107
|
pipelineStatus?: string | null;
|
|
77
108
|
}): ProcessProject;
|
|
109
|
+
/** @internal */
|
|
78
110
|
getByInstanceAndKey(instanceId: string, key: string): ProcessProject | null;
|
|
111
|
+
/** @public */
|
|
79
112
|
update(
|
|
80
113
|
id: string,
|
|
81
114
|
input: {
|
|
115
|
+
/** @internal */
|
|
82
116
|
baseBranch?: string;
|
|
117
|
+
/** @internal */
|
|
83
118
|
workBranch?: string | null;
|
|
119
|
+
/** @internal */
|
|
84
120
|
externalId?: string | null;
|
|
121
|
+
/** @internal */
|
|
85
122
|
externalUrl?: string | null;
|
|
123
|
+
/** @public */
|
|
86
124
|
metadata?: Record<string, unknown> | null;
|
|
125
|
+
/** @internal */
|
|
87
126
|
pipelineStatus?: string | null;
|
|
88
127
|
},
|
|
89
128
|
): ProcessProject | null;
|
|
129
|
+
/** @internal */
|
|
90
130
|
listByInstance(instanceId: string): ProcessProject[];
|
|
91
131
|
}
|
|
92
132
|
|
|
133
|
+
/** @public */
|
|
93
134
|
export interface ProcessEventRepoLike {
|
|
94
|
-
|
|
135
|
+
/** @public */
|
|
136
|
+
create(input: {
|
|
137
|
+
/** @public */
|
|
138
|
+
instanceId: string;
|
|
139
|
+
/** @public */
|
|
140
|
+
eventType: string;
|
|
141
|
+
/** @public */
|
|
142
|
+
data?: Record<string, unknown>;
|
|
143
|
+
}): unknown;
|
|
144
|
+
/** @internal */
|
|
95
145
|
listByInstance(instanceId: string, limit?: number): ProcessEvent[];
|
|
96
146
|
}
|
|
97
147
|
|
|
148
|
+
/** @internal */
|
|
98
149
|
export interface BroadcasterLike {
|
|
150
|
+
/** @internal */
|
|
99
151
|
sendDurable<T extends KnownDurableWsFrameType>(
|
|
100
152
|
type: T,
|
|
101
153
|
payload: WsPayloadByType[T],
|
|
102
154
|
instanceId?: string,
|
|
103
155
|
): void;
|
|
156
|
+
/** @internal */
|
|
104
157
|
sendEphemeral?<T extends KnownEphemeralWsFrameType>(
|
|
105
158
|
type: T,
|
|
106
159
|
payload: WsPayloadByType[T],
|
|
@@ -108,20 +161,29 @@ export interface BroadcasterLike {
|
|
|
108
161
|
): void;
|
|
109
162
|
}
|
|
110
163
|
|
|
164
|
+
/** @internal */
|
|
111
165
|
export type LaunchModelConfigInputLike = LaunchModelConfigInput;
|
|
166
|
+
/** @internal */
|
|
112
167
|
export type LauncherModelConfigSchemaLike = LauncherModelConfigSchema;
|
|
168
|
+
/** @internal */
|
|
113
169
|
export type LauncherModelConfigPreviewLike = LauncherModelConfigPreview;
|
|
114
170
|
|
|
171
|
+
/** @internal */
|
|
115
172
|
export interface LauncherModelConfigServiceLike {
|
|
173
|
+
/** @internal */
|
|
116
174
|
getSchema(launcherId: string): Promise<LauncherModelConfigSchemaLike | null>;
|
|
175
|
+
/** @internal */
|
|
117
176
|
preview(
|
|
118
177
|
launcherId: string,
|
|
119
178
|
launcherInput: Record<string, unknown>,
|
|
120
|
-
opts?: {
|
|
179
|
+
opts?: {
|
|
180
|
+
/** @internal */
|
|
181
|
+
modelConfig?: LaunchModelConfigInputLike;
|
|
182
|
+
},
|
|
121
183
|
): Promise<LauncherModelConfigPreviewLike | null>;
|
|
122
184
|
}
|
|
123
185
|
|
|
124
|
-
/** Stable, machine-readable codes returned while preparing a launch. */
|
|
186
|
+
/** Stable, machine-readable codes returned while preparing a launch. @internal */
|
|
125
187
|
export type LaunchPlanPreparationIssueCode =
|
|
126
188
|
| "process_id_mismatch"
|
|
127
189
|
| "invalid_turn_configs_json"
|
|
@@ -132,110 +194,187 @@ export type LaunchPlanPreparationIssueCode =
|
|
|
132
194
|
| "selected_turn_model_requires_llm_turn"
|
|
133
195
|
| "model_required";
|
|
134
196
|
|
|
135
|
-
/** Complete, presentation-safe diagnostic returned while preparing a launch. */
|
|
197
|
+
/** Complete, presentation-safe diagnostic returned while preparing a launch. @internal */
|
|
136
198
|
export interface LaunchPlanPreparationIssue {
|
|
199
|
+
/** @internal */
|
|
137
200
|
readonly code: LaunchPlanPreparationIssueCode;
|
|
201
|
+
/** @internal */
|
|
138
202
|
readonly message: string;
|
|
139
203
|
}
|
|
140
204
|
|
|
205
|
+
/** @internal */
|
|
141
206
|
export type LaunchPlanPreparationResultLike =
|
|
142
207
|
| {
|
|
208
|
+
/** @internal */
|
|
143
209
|
ok: true;
|
|
210
|
+
/** @internal */
|
|
144
211
|
launchPlan: ProcessLaunchPlan;
|
|
212
|
+
/** @internal */
|
|
145
213
|
modelConfig: LaunchModelConfigInputLike;
|
|
214
|
+
/** @internal */
|
|
146
215
|
warnings: readonly LaunchPlanPreparationIssue[];
|
|
147
216
|
}
|
|
148
217
|
| {
|
|
218
|
+
/** @internal */
|
|
149
219
|
ok: false;
|
|
150
|
-
/** Normalized durable plan retained when a scheduled launch is blocked. */
|
|
220
|
+
/** Normalized durable plan retained when a scheduled launch is blocked. @internal */
|
|
151
221
|
launchPlan: ProcessLaunchPlan;
|
|
222
|
+
/** @internal */
|
|
152
223
|
modelConfig: LaunchModelConfigInputLike;
|
|
224
|
+
/** @internal */
|
|
153
225
|
errors: readonly LaunchPlanPreparationIssue[];
|
|
154
226
|
};
|
|
155
227
|
|
|
228
|
+
/** @internal */
|
|
156
229
|
export interface ProcessLaunchPlanServiceLike {
|
|
230
|
+
/** @internal */
|
|
157
231
|
prepare(
|
|
158
232
|
launchPlan: ProcessLaunchPlan,
|
|
159
233
|
opts?: {
|
|
234
|
+
/** @internal */
|
|
160
235
|
modelConfig?: LaunchModelConfigInputLike;
|
|
236
|
+
/** @internal */
|
|
161
237
|
replaceModelConfig?: boolean;
|
|
238
|
+
/** @internal */
|
|
162
239
|
invalidModelConfig?: "reject" | "omit";
|
|
163
240
|
},
|
|
164
241
|
): Promise<LaunchPlanPreparationResultLike>;
|
|
165
242
|
}
|
|
166
243
|
|
|
244
|
+
/** @internal */
|
|
167
245
|
export interface HandoffDedupKeyRecordLike {
|
|
246
|
+
/** @internal */
|
|
168
247
|
key: string;
|
|
248
|
+
/** @internal */
|
|
169
249
|
instanceId: string;
|
|
250
|
+
/** @internal */
|
|
170
251
|
createdAt: string;
|
|
252
|
+
/** @internal */
|
|
171
253
|
metadata: Record<string, unknown>;
|
|
172
254
|
}
|
|
173
255
|
|
|
256
|
+
/** @internal */
|
|
174
257
|
export interface HandoffDedupKeyServiceLike {
|
|
258
|
+
/** @internal */
|
|
175
259
|
getByKey(key: string): HandoffDedupKeyRecordLike | null;
|
|
176
260
|
}
|
|
177
261
|
|
|
262
|
+
/** @internal */
|
|
178
263
|
export interface WorkerSupervisorLike {
|
|
264
|
+
/** @internal */
|
|
179
265
|
spawnWorker(instanceId: string): Promise<unknown>;
|
|
266
|
+
/** @internal */
|
|
180
267
|
getWorker(instanceId: string): unknown | undefined;
|
|
181
268
|
}
|
|
182
269
|
|
|
270
|
+
/** @public */
|
|
183
271
|
export interface ProcessEngineResultLike {
|
|
272
|
+
/** @public */
|
|
184
273
|
ok: boolean;
|
|
274
|
+
/** @internal */
|
|
185
275
|
code?: string;
|
|
276
|
+
/** @internal */
|
|
186
277
|
message?: string;
|
|
278
|
+
/** @internal */
|
|
187
279
|
process?: ProcessInstance | null;
|
|
280
|
+
/** @internal */
|
|
188
281
|
stage?: "pre_commit" | "post_commit";
|
|
282
|
+
/** @internal */
|
|
189
283
|
data?: unknown;
|
|
190
284
|
}
|
|
191
285
|
|
|
286
|
+
/** @internal */
|
|
192
287
|
export interface DeferredProcessActivationExpected {
|
|
288
|
+
/** @internal */
|
|
193
289
|
processId: string;
|
|
290
|
+
/** @internal */
|
|
194
291
|
lifecycleStatus: ProcessLifecycleStatus;
|
|
292
|
+
/** @internal */
|
|
195
293
|
selectedTurnId: TurnId | null;
|
|
294
|
+
/** @internal */
|
|
196
295
|
title: string | null;
|
|
296
|
+
/** @internal */
|
|
197
297
|
paramsJson: string | null;
|
|
298
|
+
/** @internal */
|
|
198
299
|
projectId: string;
|
|
300
|
+
/** @internal */
|
|
199
301
|
projectKey: string;
|
|
302
|
+
/** @internal */
|
|
200
303
|
repoLocator: string;
|
|
304
|
+
/** @internal */
|
|
201
305
|
baseBranch: string;
|
|
306
|
+
/** @internal */
|
|
202
307
|
workBranch: string | null;
|
|
203
308
|
}
|
|
204
309
|
|
|
310
|
+
/** @internal */
|
|
205
311
|
export interface DeferredProcessActivationSnapshot extends DeferredProcessActivationExpected {
|
|
312
|
+
/** @internal */
|
|
206
313
|
instanceId: string;
|
|
314
|
+
/** @internal */
|
|
207
315
|
processMetadata: Record<string, unknown> | null;
|
|
316
|
+
/** @internal */
|
|
208
317
|
projectMetadata: Record<string, unknown> | null;
|
|
209
318
|
}
|
|
210
319
|
|
|
320
|
+
/** @internal */
|
|
211
321
|
export interface DeferredProcessActivationSnapshotQuery {
|
|
322
|
+
/** @internal */
|
|
212
323
|
projectKey: string;
|
|
324
|
+
/** @internal */
|
|
213
325
|
instanceId?: string;
|
|
326
|
+
/** @internal */
|
|
214
327
|
processId?: string;
|
|
215
328
|
}
|
|
216
329
|
|
|
330
|
+
/** @internal */
|
|
217
331
|
export type DeferredProcessActivationSnapshotResult =
|
|
218
|
-
| {
|
|
219
|
-
|
|
220
|
-
|
|
332
|
+
| {
|
|
333
|
+
/** @internal */
|
|
334
|
+
outcome: "ready";
|
|
335
|
+
/** @internal */
|
|
336
|
+
snapshots: DeferredProcessActivationSnapshot[];
|
|
337
|
+
}
|
|
338
|
+
| {
|
|
339
|
+
/** @internal */
|
|
340
|
+
outcome: "process_not_found";
|
|
341
|
+
}
|
|
342
|
+
| {
|
|
343
|
+
/** @internal */
|
|
344
|
+
outcome: "project_not_found";
|
|
345
|
+
};
|
|
221
346
|
|
|
347
|
+
/** @internal */
|
|
222
348
|
export interface DeferredProcessActivationEvent {
|
|
349
|
+
/** @internal */
|
|
223
350
|
eventType: string;
|
|
351
|
+
/** @internal */
|
|
224
352
|
data?: Record<string, unknown>;
|
|
353
|
+
/** @internal */
|
|
225
354
|
level: "info" | "warn" | "error";
|
|
355
|
+
/** @internal */
|
|
226
356
|
message: string;
|
|
227
357
|
}
|
|
228
358
|
|
|
359
|
+
/** @internal */
|
|
229
360
|
export interface PreparedDeferredProcessActivation {
|
|
361
|
+
/** @internal */
|
|
230
362
|
expected: DeferredProcessActivationExpected;
|
|
363
|
+
/** @internal */
|
|
231
364
|
workBranch: string;
|
|
365
|
+
/** @internal */
|
|
232
366
|
paramsJson: string;
|
|
367
|
+
/** @internal */
|
|
233
368
|
projectMetadata: Record<string, unknown> | null;
|
|
369
|
+
/** @internal */
|
|
234
370
|
selectedTurnId: TurnId;
|
|
371
|
+
/** @internal */
|
|
235
372
|
event: DeferredProcessActivationEvent;
|
|
373
|
+
/** @internal */
|
|
236
374
|
actor?: Actor;
|
|
237
375
|
}
|
|
238
376
|
|
|
377
|
+
/** @internal */
|
|
239
378
|
export type DeferredProcessActivationOutcome =
|
|
240
379
|
| "activated"
|
|
241
380
|
| "already_activated"
|
|
@@ -244,271 +383,534 @@ export type DeferredProcessActivationOutcome =
|
|
|
244
383
|
| "project_not_found"
|
|
245
384
|
| "invalid_selected_turn";
|
|
246
385
|
|
|
386
|
+
/** @internal */
|
|
247
387
|
export interface DeferredProcessActivationFailure {
|
|
388
|
+
/** @internal */
|
|
248
389
|
expected: DeferredProcessActivationExpected;
|
|
390
|
+
/** @internal */
|
|
249
391
|
errorClass: WorkerErrorClass;
|
|
392
|
+
/** @internal */
|
|
250
393
|
event: DeferredProcessActivationEvent;
|
|
251
394
|
}
|
|
252
395
|
|
|
396
|
+
/** @internal */
|
|
253
397
|
export type ProcessActionExecutionSource = "ui" | "external" | "scheduled";
|
|
398
|
+
/** @internal */
|
|
254
399
|
export type ProcessActionExecutionOrigin = "web_ui" | "external_interface" | "scheduled";
|
|
255
400
|
|
|
401
|
+
/** @internal */
|
|
256
402
|
export interface ProcessActionSummaryLike {
|
|
403
|
+
/** @internal */
|
|
257
404
|
id: string;
|
|
405
|
+
/** @internal */
|
|
258
406
|
label: string;
|
|
407
|
+
/** @internal */
|
|
259
408
|
description?: string | null;
|
|
409
|
+
/** @internal */
|
|
260
410
|
form?: FormDefinition;
|
|
261
411
|
}
|
|
262
412
|
|
|
413
|
+
/** @internal */
|
|
263
414
|
export type ActionExecutionFailureStageLike = "pre_commit" | "post_commit";
|
|
264
415
|
|
|
416
|
+
/** @public */
|
|
265
417
|
export type ActionExecutionResultLike =
|
|
266
418
|
| {
|
|
419
|
+
/** @public */
|
|
267
420
|
ok: true;
|
|
421
|
+
/** @internal */
|
|
268
422
|
process: ProcessInstance | null;
|
|
423
|
+
/** @internal */
|
|
269
424
|
data?: Record<string, unknown>;
|
|
425
|
+
/** @internal */
|
|
270
426
|
error?: undefined;
|
|
427
|
+
/** @internal */
|
|
271
428
|
code?: undefined;
|
|
429
|
+
/** @internal */
|
|
272
430
|
stage?: undefined;
|
|
273
431
|
}
|
|
274
432
|
| {
|
|
433
|
+
/** @public */
|
|
275
434
|
ok: false;
|
|
435
|
+
/** @internal */
|
|
276
436
|
stage: "pre_commit";
|
|
437
|
+
/** @internal */
|
|
277
438
|
error: string;
|
|
439
|
+
/** @internal */
|
|
278
440
|
code?: string;
|
|
441
|
+
/** @internal */
|
|
279
442
|
process?: undefined;
|
|
443
|
+
/** @internal */
|
|
280
444
|
data?: undefined;
|
|
281
445
|
}
|
|
282
446
|
| {
|
|
447
|
+
/** @public */
|
|
283
448
|
ok: false;
|
|
449
|
+
/** @internal */
|
|
284
450
|
stage: "post_commit";
|
|
451
|
+
/** @internal */
|
|
285
452
|
process: ProcessInstance;
|
|
453
|
+
/** @internal */
|
|
286
454
|
error: string;
|
|
455
|
+
/** @internal */
|
|
287
456
|
code?: string;
|
|
457
|
+
/** @internal */
|
|
288
458
|
data?: Record<string, unknown>;
|
|
289
459
|
};
|
|
290
460
|
|
|
461
|
+
/** @internal */
|
|
291
462
|
export interface ProcessActionServiceLike {
|
|
463
|
+
/** @internal */
|
|
292
464
|
listVisibleActions(instanceId: string): readonly ProcessActionSummaryLike[];
|
|
465
|
+
/** @internal */
|
|
293
466
|
executeAction(
|
|
294
467
|
instanceId: string,
|
|
295
468
|
actionId: string,
|
|
296
469
|
input: Record<string, unknown>,
|
|
297
470
|
opts?: {
|
|
471
|
+
/** @internal */
|
|
298
472
|
source?: ProcessActionExecutionSource;
|
|
473
|
+
/** @internal */
|
|
299
474
|
origin?: ProcessActionExecutionOrigin;
|
|
475
|
+
/** @internal */
|
|
300
476
|
nextTurnModelProfileId?: string | null;
|
|
477
|
+
/** @internal */
|
|
301
478
|
actor?: Actor;
|
|
302
479
|
},
|
|
303
480
|
): Promise<ActionExecutionResultLike>;
|
|
304
481
|
}
|
|
305
482
|
|
|
483
|
+
/** @public */
|
|
484
|
+
export interface ExternalObservationInput {
|
|
485
|
+
/** @public */
|
|
486
|
+
instanceId: string;
|
|
487
|
+
/** @public */
|
|
488
|
+
armingId: string;
|
|
489
|
+
/** @public */
|
|
490
|
+
generation: string;
|
|
491
|
+
/** @public */
|
|
492
|
+
observation?: {
|
|
493
|
+
/** @public */
|
|
494
|
+
summary: string;
|
|
495
|
+
/** @internal */
|
|
496
|
+
links?: import("@leitwerk-dev/domain").TurnProgressLink[];
|
|
497
|
+
/** @public */
|
|
498
|
+
observedAt: string;
|
|
499
|
+
/** @public */
|
|
500
|
+
subject: string;
|
|
501
|
+
/** @public */
|
|
502
|
+
revision: string;
|
|
503
|
+
};
|
|
504
|
+
/** @public */
|
|
505
|
+
refreshError?: string;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/** @public */
|
|
306
509
|
export interface ExternalSourceArmingLike {
|
|
307
|
-
/** Process-local arming id. Durable arming identity is { instanceId, id }. */
|
|
510
|
+
/** Process-local arming id. Durable arming identity is { instanceId, id }. @public */
|
|
308
511
|
id: string;
|
|
512
|
+
/** @public */
|
|
309
513
|
instanceId: string;
|
|
514
|
+
/** @internal */
|
|
310
515
|
processId: string;
|
|
516
|
+
/** @internal */
|
|
311
517
|
turnId: string;
|
|
518
|
+
/** @internal */
|
|
312
519
|
externalActionId: string;
|
|
520
|
+
/** @internal */
|
|
313
521
|
source: ExternalActionSource;
|
|
522
|
+
/** @public */
|
|
314
523
|
resolved: unknown;
|
|
524
|
+
/** Opaque identity of this resolved subscription. @public */
|
|
525
|
+
generation?: string;
|
|
315
526
|
}
|
|
316
527
|
|
|
528
|
+
/** @public */
|
|
317
529
|
export interface ExternalSourceFireInput {
|
|
530
|
+
/** @public */
|
|
318
531
|
instanceId: string;
|
|
532
|
+
/** @public */
|
|
319
533
|
armingId: string;
|
|
534
|
+
/** Reject a superseded subscription instead of queuing its event for a later turn. @internal */
|
|
535
|
+
generation?: string;
|
|
536
|
+
/** @internal */
|
|
320
537
|
input?: Record<string, unknown>;
|
|
538
|
+
/** @public */
|
|
321
539
|
event?: Record<string, unknown>;
|
|
540
|
+
/** @public */
|
|
322
541
|
mergeKey?: string | null;
|
|
323
542
|
}
|
|
324
543
|
|
|
544
|
+
/** @public */
|
|
325
545
|
export interface ExternalSourceServiceLike {
|
|
546
|
+
/** @public */
|
|
326
547
|
listArmed(kind: string): readonly ExternalSourceArmingLike[];
|
|
548
|
+
/** @public */
|
|
327
549
|
fire(input: ExternalSourceFireInput): Promise<ActionExecutionResultLike>;
|
|
550
|
+
/** Records facts without firing an action or changing lifecycle state. @public */
|
|
551
|
+
observe?(input: ExternalObservationInput): Promise<ActionExecutionResultLike>;
|
|
328
552
|
}
|
|
329
553
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
export type ProcessLaunchExecutionResultLike =
|
|
333
|
-
| { ok: true; process: ProcessInstance; projects: ProcessProject[]; reused: boolean }
|
|
334
|
-
| {
|
|
335
|
-
ok: false;
|
|
336
|
-
stage: "pre_commit";
|
|
337
|
-
status: number;
|
|
338
|
-
body: Record<string, unknown>;
|
|
339
|
-
}
|
|
340
|
-
| {
|
|
341
|
-
ok: false;
|
|
342
|
-
stage: "post_commit";
|
|
343
|
-
status: number;
|
|
344
|
-
body: Record<string, unknown>;
|
|
345
|
-
process: ProcessInstance;
|
|
346
|
-
projects: ProcessProject[];
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
export interface ProcessLaunchConfigExecutionInput {
|
|
350
|
-
launcherId: string;
|
|
351
|
-
launchConfig: ProcessLaunchConfig;
|
|
352
|
-
handoffDedupKey?: string | null;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
export interface ProcessLaunchExecutorLike {
|
|
356
|
-
createProcessFromLaunchConfig(
|
|
357
|
-
input: ProcessLaunchConfigExecutionInput,
|
|
358
|
-
opts?: { actor?: Actor },
|
|
359
|
-
): Promise<ProcessLaunchExecutionResultLike>;
|
|
360
|
-
createProcessFromLaunchPlan(
|
|
361
|
-
launchPlan: ProcessLaunchPlan,
|
|
362
|
-
opts?: { actor?: Actor },
|
|
363
|
-
): Promise<ProcessLaunchExecutionResultLike>;
|
|
364
|
-
}
|
|
365
|
-
|
|
554
|
+
/** @internal */
|
|
366
555
|
export interface LauncherRecentValuesServiceLike {
|
|
556
|
+
/** @internal */
|
|
367
557
|
list(launcherId: string): Record<string, readonly string[]>;
|
|
558
|
+
/** @internal */
|
|
368
559
|
record(launcherId: string, launcherInput: Record<string, unknown>): void;
|
|
369
560
|
}
|
|
370
561
|
|
|
562
|
+
/** @internal */
|
|
371
563
|
export interface QueuedProcessInputLike {
|
|
564
|
+
/** @internal */
|
|
372
565
|
source: InputSource;
|
|
566
|
+
/** @internal */
|
|
373
567
|
kind: InputKind;
|
|
568
|
+
/** @internal */
|
|
374
569
|
bodyMarkdown: string;
|
|
570
|
+
/** @internal */
|
|
375
571
|
target?: ProcessInputTarget | null;
|
|
572
|
+
/** Stable principal that queued this input. Defaults to SYSTEM_ACTOR at persist time. @internal */
|
|
376
573
|
actor?: Actor;
|
|
377
574
|
}
|
|
378
575
|
|
|
576
|
+
/** @public */
|
|
379
577
|
export interface ProcessEngineLike {
|
|
578
|
+
/** @internal */
|
|
380
579
|
getDeferredProcessActivationSnapshots(
|
|
381
580
|
query: DeferredProcessActivationSnapshotQuery,
|
|
382
581
|
): DeferredProcessActivationSnapshotResult;
|
|
582
|
+
/** @internal */
|
|
383
583
|
activateDeferredProcess(
|
|
384
584
|
instanceId: string,
|
|
385
585
|
prepared: PreparedDeferredProcessActivation,
|
|
386
|
-
): Promise<
|
|
586
|
+
): Promise<
|
|
587
|
+
ProcessEngineResultLike & {
|
|
588
|
+
/** @internal */
|
|
589
|
+
data?: {
|
|
590
|
+
/** @internal */
|
|
591
|
+
outcome: DeferredProcessActivationOutcome;
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
>;
|
|
595
|
+
/** @internal */
|
|
387
596
|
parkDeferredProcessActivationFailure(
|
|
388
597
|
instanceId: string,
|
|
389
598
|
failure: DeferredProcessActivationFailure,
|
|
390
599
|
): Promise<
|
|
391
600
|
ProcessEngineResultLike & {
|
|
601
|
+
/** @internal */
|
|
392
602
|
data?: {
|
|
603
|
+
/** @internal */
|
|
393
604
|
outcome: "parked" | "stale" | "not_applicable" | "project_not_found";
|
|
394
605
|
};
|
|
395
606
|
}
|
|
396
607
|
>;
|
|
608
|
+
/** @internal */
|
|
397
609
|
startProcess(instanceId: string, startTurnId: TurnId): Promise<ProcessEngineResultLike>;
|
|
398
|
-
|
|
610
|
+
/** @public */
|
|
611
|
+
abortProcess(
|
|
612
|
+
instanceId: string,
|
|
613
|
+
opts?: {
|
|
614
|
+
/** @internal */
|
|
615
|
+
actor?: Actor;
|
|
616
|
+
},
|
|
617
|
+
): Promise<ProcessEngineResultLike>;
|
|
618
|
+
/** Retries the current failed startup or accepted turn; startup retries consume no attempt. @public */
|
|
399
619
|
retryProcess(
|
|
400
620
|
instanceId: string,
|
|
401
|
-
opts?: {
|
|
621
|
+
opts?: {
|
|
622
|
+
/** @internal */
|
|
623
|
+
nextTurnModelProfileId?: string | null;
|
|
624
|
+
/** @internal */
|
|
625
|
+
actor?: Actor;
|
|
626
|
+
},
|
|
402
627
|
): Promise<ProcessEngineResultLike>;
|
|
628
|
+
/** @internal */
|
|
403
629
|
continueFailedTurn(
|
|
404
630
|
instanceId: string,
|
|
405
631
|
turnRecordId: string,
|
|
406
|
-
options?: {
|
|
632
|
+
options?: {
|
|
633
|
+
/** @internal */
|
|
634
|
+
prompt?: string | null;
|
|
635
|
+
/** @internal */
|
|
636
|
+
nextTurnModelProfileId?: string | null;
|
|
637
|
+
/** @internal */
|
|
638
|
+
actor?: Actor;
|
|
639
|
+
},
|
|
407
640
|
): Promise<ProcessEngineResultLike>;
|
|
641
|
+
/** @internal */
|
|
408
642
|
queueInputs(
|
|
409
643
|
instanceId: string,
|
|
410
644
|
inputs: readonly QueuedProcessInputLike[],
|
|
411
|
-
opts?: {
|
|
645
|
+
opts?: {
|
|
646
|
+
/** @internal */
|
|
647
|
+
dispatchErrorMessage?: string;
|
|
648
|
+
/** @internal */
|
|
649
|
+
actor?: Actor;
|
|
650
|
+
},
|
|
412
651
|
): Promise<ProcessEngineResultLike>;
|
|
413
652
|
}
|
|
414
653
|
|
|
654
|
+
/** @internal */
|
|
415
655
|
export interface ComponentConfigLike {
|
|
656
|
+
/** @internal */
|
|
416
657
|
repo: string;
|
|
658
|
+
/** @internal */
|
|
417
659
|
default_branch: string;
|
|
418
660
|
}
|
|
419
661
|
|
|
662
|
+
/** @public */
|
|
420
663
|
export interface RegisteredProcessWatcherLike<TConfig = unknown, TEvent = unknown> {
|
|
664
|
+
/** @public */
|
|
421
665
|
readonly processId: string;
|
|
666
|
+
/** @internal */
|
|
422
667
|
readonly processDisplayName: string;
|
|
668
|
+
/** @public */
|
|
423
669
|
readonly watcherId: string;
|
|
670
|
+
/** @internal */
|
|
424
671
|
readonly watcherLabel: string;
|
|
672
|
+
/** @internal */
|
|
425
673
|
readonly watcherDescription: string;
|
|
674
|
+
/** @internal */
|
|
426
675
|
readonly sourceId: string;
|
|
676
|
+
/** @internal */
|
|
427
677
|
readonly sourceLabel: string;
|
|
678
|
+
/** @public */
|
|
428
679
|
readonly enabled: boolean;
|
|
680
|
+
/** @internal */
|
|
429
681
|
readonly configPath: string;
|
|
682
|
+
/** @public */
|
|
430
683
|
readonly config: TConfig;
|
|
684
|
+
/** @internal */
|
|
431
685
|
readonly presentation: ProcessWatcherPresentation;
|
|
686
|
+
/** @internal */
|
|
432
687
|
readonly launchModelConfig: LaunchModelConfigInputLike;
|
|
688
|
+
/** @internal */
|
|
433
689
|
resolveLaunch(event: TEvent, ctx?: LauncherContext): Promise<ProcessLaunchPlan | null>;
|
|
690
|
+
/** @internal */
|
|
691
|
+
resolveLaunchAttempt(
|
|
692
|
+
event: TEvent,
|
|
693
|
+
ctx?: LauncherContext,
|
|
694
|
+
): Promise<{
|
|
695
|
+
/** @internal */
|
|
696
|
+
launchConfig: ProcessLaunchConfig;
|
|
697
|
+
/** @internal */
|
|
698
|
+
launchPlan: ProcessLaunchPlan;
|
|
699
|
+
/** @internal */
|
|
700
|
+
preparationChecks: readonly LaunchPreparationCheck[];
|
|
701
|
+
} | null>;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/** @public */
|
|
705
|
+
export interface WatcherLaunchResultLike extends ProgrammaticLaunchResultLike {}
|
|
706
|
+
|
|
707
|
+
/** @internal */
|
|
708
|
+
export interface ProgrammaticLaunchRequestLike {
|
|
709
|
+
/** @internal */
|
|
710
|
+
launcherId: string;
|
|
711
|
+
/** @internal */
|
|
712
|
+
launcherInput: Record<string, unknown>;
|
|
713
|
+
/** @internal */
|
|
714
|
+
title?: string | null;
|
|
715
|
+
/** @internal */
|
|
716
|
+
modelConfig?: LaunchModelConfigInputLike;
|
|
717
|
+
/** @internal */
|
|
718
|
+
skillIds?: readonly string[];
|
|
719
|
+
/** Trusted, non-secret process metadata merged after launcher resolution. @internal */
|
|
720
|
+
processMetadata?: Record<string, unknown>;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/** @public */
|
|
724
|
+
export interface ProgrammaticLaunchResultLike {
|
|
725
|
+
/** @public */
|
|
726
|
+
launchRunId: string;
|
|
727
|
+
/** @public */
|
|
728
|
+
process: ProcessInstance | null;
|
|
729
|
+
/** @public */
|
|
730
|
+
error: string | null;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** @public */
|
|
734
|
+
export interface LaunchRunServiceLike {
|
|
735
|
+
/** @internal */
|
|
736
|
+
startProgrammatic(
|
|
737
|
+
request: ProgrammaticLaunchRequestLike,
|
|
738
|
+
opts: {
|
|
739
|
+
/** @internal */
|
|
740
|
+
idempotencyKey: string;
|
|
741
|
+
/** @internal */
|
|
742
|
+
actor?: Actor;
|
|
743
|
+
},
|
|
744
|
+
): Promise<ProgrammaticLaunchResultLike>;
|
|
745
|
+
/** @public */
|
|
746
|
+
startWatcher<TConfig, TEvent>(
|
|
747
|
+
watcher: RegisteredProcessWatcherLike<TConfig, TEvent>,
|
|
748
|
+
event: TEvent,
|
|
749
|
+
opts: {
|
|
750
|
+
/** @public */
|
|
751
|
+
idempotencyKey: string;
|
|
752
|
+
/** @internal */
|
|
753
|
+
actor?: Actor;
|
|
754
|
+
},
|
|
755
|
+
): Promise<WatcherLaunchResultLike>;
|
|
434
756
|
}
|
|
435
757
|
|
|
758
|
+
/** @public */
|
|
436
759
|
export interface ProcessWatcherServiceLike {
|
|
760
|
+
/** @internal */
|
|
437
761
|
listAll(): readonly RegisteredProcessWatcherLike[];
|
|
762
|
+
/** @public */
|
|
438
763
|
listBySource<TConfig, TEvent>(
|
|
439
764
|
source: ProcessWatcherSource<TConfig, TEvent>,
|
|
440
765
|
): readonly RegisteredProcessWatcherLike<TConfig, TEvent>[];
|
|
441
766
|
}
|
|
442
767
|
|
|
768
|
+
/** @public */
|
|
769
|
+
export interface PollResultLike {
|
|
770
|
+
/** @internal */
|
|
771
|
+
readonly errors: readonly string[];
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/** @public */
|
|
775
|
+
export interface PollingServiceLike {
|
|
776
|
+
/** @public */
|
|
777
|
+
create<T extends PollResultLike>(options: {
|
|
778
|
+
/** @public */
|
|
779
|
+
id: string;
|
|
780
|
+
/** @public */
|
|
781
|
+
pollOnce(): Promise<T>;
|
|
782
|
+
/** @public */
|
|
783
|
+
isEnabled(): boolean;
|
|
784
|
+
/** @public */
|
|
785
|
+
pollInterval(): string;
|
|
786
|
+
/** @public */
|
|
787
|
+
defaultIntervalMs?: number;
|
|
788
|
+
}): {
|
|
789
|
+
/** @public */
|
|
790
|
+
poll(): Promise<T>;
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/** @internal */
|
|
443
795
|
export interface ProcessQuestionServiceLike {
|
|
796
|
+
/** @internal */
|
|
444
797
|
listOpen(instanceId?: string): readonly import("@leitwerk-dev/domain").ProcessQuestionRequest[];
|
|
798
|
+
/** @internal */
|
|
445
799
|
submitAnswers(
|
|
446
800
|
instanceId: string,
|
|
447
801
|
requestId: string,
|
|
448
802
|
draft: readonly import("@leitwerk-dev/domain").QuestionAnswerDraft[],
|
|
449
803
|
actor: Actor,
|
|
450
804
|
): Promise<
|
|
451
|
-
| { ok: true; request: import("@leitwerk-dev/domain").ProcessQuestionRequest }
|
|
452
805
|
| {
|
|
806
|
+
/** @internal */
|
|
807
|
+
ok: true;
|
|
808
|
+
/** @internal */
|
|
809
|
+
request: import("@leitwerk-dev/domain").ProcessQuestionRequest;
|
|
810
|
+
}
|
|
811
|
+
| {
|
|
812
|
+
/** @internal */
|
|
453
813
|
ok: false;
|
|
814
|
+
/** @internal */
|
|
454
815
|
code: "not_found" | "not_current" | "invalid";
|
|
816
|
+
/** @internal */
|
|
455
817
|
message: string;
|
|
818
|
+
/** @internal */
|
|
456
819
|
request?: import("@leitwerk-dev/domain").ProcessQuestionRequest;
|
|
457
820
|
}
|
|
458
821
|
>;
|
|
459
822
|
}
|
|
460
823
|
|
|
824
|
+
/** @public */
|
|
461
825
|
export interface CoreServerSetupDeps {
|
|
826
|
+
/** @internal */
|
|
462
827
|
serverBaseUrl: string;
|
|
828
|
+
/** @internal */
|
|
463
829
|
processWorkspacesDir?: string;
|
|
830
|
+
/** @internal */
|
|
464
831
|
components: Record<string, ComponentConfigLike>;
|
|
465
|
-
/** Typed by consuming extensions via watcher-utils ExternalWriteLogRepoLike. */
|
|
832
|
+
/** Typed by consuming extensions via watcher-utils ExternalWriteLogRepoLike. @public */
|
|
466
833
|
externalWrites: unknown;
|
|
834
|
+
/** @public */
|
|
467
835
|
processes: ProcessRepoLike;
|
|
836
|
+
/** @public */
|
|
468
837
|
projects: ProcessProjectRepoLike;
|
|
838
|
+
/** @public */
|
|
469
839
|
events: ProcessEventRepoLike;
|
|
840
|
+
/** @internal */
|
|
470
841
|
broadcaster: BroadcasterLike;
|
|
842
|
+
/** @public */
|
|
471
843
|
commands: ProcessEngineLike;
|
|
844
|
+
/** @internal */
|
|
472
845
|
processActions: ProcessActionServiceLike;
|
|
846
|
+
/** @public */
|
|
473
847
|
externalSources: ExternalSourceServiceLike;
|
|
848
|
+
/** @internal */
|
|
474
849
|
getSupervisor: () => WorkerSupervisorLike | undefined;
|
|
850
|
+
/** @internal */
|
|
475
851
|
launcherService: ProcessLauncherService;
|
|
852
|
+
/** @internal */
|
|
476
853
|
launcherRecentValues: LauncherRecentValuesServiceLike;
|
|
854
|
+
/** @internal */
|
|
477
855
|
launcherModelConfigs: LauncherModelConfigServiceLike;
|
|
856
|
+
/** @internal */
|
|
478
857
|
launchPlans: ProcessLaunchPlanServiceLike;
|
|
479
|
-
|
|
858
|
+
/** @internal */
|
|
480
859
|
handoffDedupKeys?: HandoffDedupKeyServiceLike;
|
|
860
|
+
/** @public */
|
|
481
861
|
processWatchers?: ProcessWatcherServiceLike;
|
|
862
|
+
/** @public */
|
|
863
|
+
launchRuns: LaunchRunServiceLike;
|
|
864
|
+
/** @public */
|
|
865
|
+
polling: PollingServiceLike;
|
|
866
|
+
/** @internal */
|
|
482
867
|
processModelSelection?: ProcessModelSelectionServiceLike;
|
|
483
|
-
/** Durable active-turn questions for trusted operator-channel extensions. */
|
|
868
|
+
/** Durable active-turn questions for trusted operator-channel extensions. @internal */
|
|
484
869
|
processQuestions?: ProcessQuestionServiceLike;
|
|
485
|
-
/** Registration boundary for secret-backed repository credential extensions. */
|
|
870
|
+
/** Registration boundary for secret-backed repository credential extensions. @internal */
|
|
486
871
|
repositoryCredentials: RepositoryCredentialRegistrar;
|
|
487
|
-
/** Server-owned managed result images, available to trusted delivery extensions. */
|
|
872
|
+
/** Server-owned managed result images, available to trusted delivery extensions. @internal */
|
|
488
873
|
resultImages?: {
|
|
874
|
+
/** @internal */
|
|
489
875
|
get(instanceId: string, turnRecordId: string, imageId: string): Promise<Uint8Array | null>;
|
|
490
876
|
};
|
|
491
877
|
}
|
|
492
878
|
|
|
879
|
+
/** @internal */
|
|
493
880
|
export type ProcessActionModelPreviewLike = ProcessActionModelPreview;
|
|
494
881
|
|
|
882
|
+
/** @internal */
|
|
495
883
|
export type ProcessModelSelectionPreviewFailureCode =
|
|
496
884
|
| "process_not_found"
|
|
497
885
|
| "instance_tree_unavailable";
|
|
498
886
|
|
|
887
|
+
/** @internal */
|
|
499
888
|
export type ProcessModelSelectionPreviewResultLike =
|
|
500
889
|
| ProcessActionModelPreviewLike
|
|
501
|
-
| {
|
|
890
|
+
| {
|
|
891
|
+
/** @internal */
|
|
892
|
+
kind: "operational_failure";
|
|
893
|
+
/** @internal */
|
|
894
|
+
code: ProcessModelSelectionPreviewFailureCode;
|
|
895
|
+
};
|
|
502
896
|
|
|
897
|
+
/** @internal */
|
|
503
898
|
export interface ModelProfileOptionSummaryLike {
|
|
899
|
+
/** @internal */
|
|
504
900
|
id: string;
|
|
901
|
+
/** @internal */
|
|
505
902
|
label: string;
|
|
903
|
+
/** @internal */
|
|
506
904
|
description: string;
|
|
905
|
+
/** @internal */
|
|
507
906
|
availability: "available" | "unavailable" | "stale";
|
|
508
907
|
}
|
|
509
908
|
|
|
909
|
+
/** @internal */
|
|
510
910
|
export interface ProcessModelSelectionServiceLike {
|
|
911
|
+
/** @internal */
|
|
511
912
|
listAvailableProfiles(instanceId: string): readonly ModelProfileOptionSummaryLike[] | null;
|
|
913
|
+
/** @internal */
|
|
512
914
|
preview(
|
|
513
915
|
instanceId: string,
|
|
514
916
|
actionId: string,
|
|
@@ -516,8 +918,11 @@ export interface ProcessModelSelectionServiceLike {
|
|
|
516
918
|
): Promise<ProcessModelSelectionPreviewResultLike>;
|
|
517
919
|
}
|
|
518
920
|
|
|
921
|
+
/** @public */
|
|
519
922
|
export const coreHostCapabilities = {
|
|
923
|
+
/** @public */
|
|
520
924
|
serverSetup: createCapabilityToken<CoreServerSetupDeps>("core:serverSetup"),
|
|
925
|
+
/** @internal */
|
|
521
926
|
processModelSelection: createCapabilityToken<ProcessModelSelectionServiceLike>(
|
|
522
927
|
"core:processModelSelection",
|
|
523
928
|
),
|