@leitwerk-dev/process-sdk 0.5.3 → 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/core-capabilities.d.ts +1 -1
- package/dist/core-capabilities.d.ts.map +1 -1
- package/dist/define-process.d.ts +2 -0
- package/dist/define-process.d.ts.map +1 -1
- package/dist/{extension-api-aqlhw3H7.d.ts → extension-api-DJCzpYqC.d.ts} +17 -1
- package/dist/extension-api.d.ts +6 -0
- package/dist/extension-api.d.ts.map +1 -1
- package/dist/flow.d.ts +4 -0
- package/dist/flow.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/model-provider.d.ts +7 -0
- package/dist/model-provider.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/core-capabilities.ts +1 -1
- package/src/define-process.ts +13 -0
- package/src/extension-api.ts +6 -0
- package/src/flow.ts +12 -0
- package/src/index.ts +1 -0
- package/src/model-provider.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -43,6 +43,9 @@ var coreHostCapabilities = {
|
|
|
43
43
|
)
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
// src/define-process.ts
|
|
47
|
+
import { assertValidModelRequirements } from "@leitwerk-dev/protocol";
|
|
48
|
+
|
|
46
49
|
// src/extension-api.ts
|
|
47
50
|
var SafeLaunchPreparationError = class extends Error {
|
|
48
51
|
/** @public */
|
|
@@ -2042,6 +2045,13 @@ function buildDefinedProcess(input) {
|
|
|
2042
2045
|
};
|
|
2043
2046
|
}
|
|
2044
2047
|
function defineProcess(input) {
|
|
2048
|
+
if (input.modelRequirements !== void 0) assertValidModelRequirements(input.modelRequirements);
|
|
2049
|
+
for (const [turnId, turn] of Object.entries(input.turns)) {
|
|
2050
|
+
if ("modelRequirements" in turn && turn.modelRequirements !== void 0) {
|
|
2051
|
+
if (turn.kind !== "llm") throw new Error(`Model requirements require an LLM turn: ${turnId}`);
|
|
2052
|
+
assertValidModelRequirements(turn.modelRequirements);
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2045
2055
|
const compiled = buildDefinedProcess(input);
|
|
2046
2056
|
const process2 = {
|
|
2047
2057
|
id: input.id,
|
|
@@ -2054,6 +2064,7 @@ function defineProcess(input) {
|
|
|
2054
2064
|
stateCodec: input.stateCodec,
|
|
2055
2065
|
initialState: input.initialState,
|
|
2056
2066
|
...input.runtime ? { runtime: { ...input.runtime } } : {},
|
|
2067
|
+
...input.modelRequirements ? { modelRequirements: structuredClone(input.modelRequirements) } : {},
|
|
2057
2068
|
...input.resolveStorageSize ? { resolveStorageSize: input.resolveStorageSize } : {},
|
|
2058
2069
|
...input.repositoryCredentials ? { repositoryCredentials: input.repositoryCredentials } : {},
|
|
2059
2070
|
...input.piConfig ? { piConfig: input.piConfig } : {},
|
|
@@ -3013,6 +3024,11 @@ var LlmConfigurationBuilder = class extends ExternalActionTurnBuilder {
|
|
|
3013
3024
|
consumedProductNames = /* @__PURE__ */ new Set();
|
|
3014
3025
|
optionalConsumedProductNames = /* @__PURE__ */ new Set();
|
|
3015
3026
|
/** @public */
|
|
3027
|
+
modelRequirements(requirements) {
|
|
3028
|
+
this.configuration.modelRequirements = structuredClone(requirements);
|
|
3029
|
+
return this;
|
|
3030
|
+
}
|
|
3031
|
+
/** @public */
|
|
3016
3032
|
executionPurpose(purpose) {
|
|
3017
3033
|
if (purpose) this.configuration.executionPurpose = purpose;
|
|
3018
3034
|
else delete this.configuration.executionPurpose;
|
|
@@ -3895,6 +3911,11 @@ var FlowProcessBuilder = class extends FlowComponentBuilder {
|
|
|
3895
3911
|
* turn and reference only declared turns without repeats.
|
|
3896
3912
|
*/
|
|
3897
3913
|
/** @public */
|
|
3914
|
+
modelRequirements(requirements) {
|
|
3915
|
+
this.configuration.modelRequirements = structuredClone(requirements);
|
|
3916
|
+
return this;
|
|
3917
|
+
}
|
|
3918
|
+
/** @public */
|
|
3898
3919
|
happyPath(...turnIds) {
|
|
3899
3920
|
this.configuration.happyPath = turnIds;
|
|
3900
3921
|
return this;
|