@leitwerk-dev/showcase-processes 0.2.0 → 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/README.md +8 -0
- package/dist/file-external.d.ts +14 -1
- package/dist/file-external.d.ts.map +1 -1
- package/dist/filesystem-watcher.d.ts +12 -1
- package/dist/filesystem-watcher.d.ts.map +1 -1
- package/dist/index.d.ts +2 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -40
- package/dist/index.js.map +1 -1
- package/dist/poem-leaf-outcome.d.ts +31 -0
- package/dist/poem-leaf-outcome.d.ts.map +1 -1
- package/dist/process-definition.d.ts +21 -8
- package/dist/process-definition.d.ts.map +1 -1
- package/dist/turns/external-complete.d.ts +5 -0
- package/dist/turns/external-complete.d.ts.map +1 -1
- package/dist/turns/poem-creator.d.ts +12 -0
- package/dist/turns/poem-creator.d.ts.map +1 -1
- package/dist/turns/run-single-prompt.d.ts +6 -0
- package/dist/turns/run-single-prompt.d.ts.map +1 -1
- package/dist/ui/assets/leaf-outcome-element.js +12 -0
- package/dist/ui/assets/leaf-outcome-element.js.map +1 -1
- package/dist/ui/assets/poem-leaf-outcome-element.js +12 -0
- package/dist/ui/assets/poem-leaf-outcome-element.js.map +1 -1
- package/package.json +4 -4
- package/src/file-external.ts +11 -0
- package/src/filesystem-watcher.ts +12 -1
- package/src/index.ts +15 -10
- package/src/poem-leaf-outcome.ts +31 -0
- package/src/process-definition.ts +31 -5
- package/src/turns/external-complete.ts +5 -0
- package/src/turns/poem-creator.ts +12 -0
- package/src/turns/run-single-prompt.ts +6 -0
package/README.md
CHANGED
|
@@ -69,3 +69,11 @@ Review, Assess Poem, and Review Feedback for the poem process. The human
|
|
|
69
69
|
review and automated assessment remain distinct; turn ids and routing are unchanged.
|
|
70
70
|
|
|
71
71
|
Poem review outcomes publish their existing concise summary separately from the full review result. This adds no turn or model call and leaves human review routing unchanged.
|
|
72
|
+
|
|
73
|
+
## API support
|
|
74
|
+
|
|
75
|
+
The following exported declarations are `@public`:
|
|
76
|
+
|
|
77
|
+
- `@leitwerk-dev/showcase-processes`: `default`.
|
|
78
|
+
|
|
79
|
+
See the [SDK compatibility policy](../../docs/process-sdk.md#api-compatibility) for member classifications and support guarantees.
|
package/dist/file-external.d.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import type { CoreServerSetupDeps, ExternalActionSource } from "@leitwerk-dev/process-sdk";
|
|
2
2
|
import { type PollResult } from "@leitwerk-dev/watcher-utils";
|
|
3
|
+
/** @internal */
|
|
3
4
|
export type FileExternalConsumeMode = "delete" | "keep";
|
|
5
|
+
/** @internal */
|
|
4
6
|
export interface FileExternalInput {
|
|
7
|
+
/** @internal */
|
|
5
8
|
path: string;
|
|
9
|
+
/** @internal */
|
|
6
10
|
pollInterval: string;
|
|
11
|
+
/** @internal */
|
|
7
12
|
consume: FileExternalConsumeMode;
|
|
8
13
|
}
|
|
14
|
+
/** @internal */
|
|
9
15
|
export declare const FILE_EXTERNAL_PRESENCE_KIND = "@leitwerk-dev/showcase-processes.file.presence";
|
|
16
|
+
/** @internal */
|
|
10
17
|
export declare const FILE_EXTERNAL_INSTRUCTION_KIND = "@leitwerk-dev/showcase-processes.file.instruction";
|
|
18
|
+
/** @internal */
|
|
11
19
|
export declare const fileExternal: {
|
|
20
|
+
/** @internal */
|
|
12
21
|
presence(input: FileExternalInput): ExternalActionSource;
|
|
22
|
+
/** @internal */
|
|
13
23
|
instruction(input: FileExternalInput): ExternalActionSource;
|
|
14
24
|
};
|
|
15
|
-
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare function createFileExternalSourceProvider(deps: CoreServerSetupDeps, aliases?: Partial<Record<string, string>>): {
|
|
27
|
+
poll(): Promise<PollResult>;
|
|
28
|
+
};
|
|
16
29
|
//# sourceMappingURL=file-external.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-external.d.ts","sourceRoot":"","sources":["../src/file-external.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,oBAAoB,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGN,KAAK,UAAU,EAGf,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,uBAAuB,CAAC;CACjC;AAED,eAAO,MAAM,2BAA2B,mDAAmD,CAAC;AAC5F,eAAO,MAAM,8BAA8B,sDAAsD,CAAC;AA4BlG,eAAO,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"file-external.d.ts","sourceRoot":"","sources":["../src/file-external.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,oBAAoB,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGN,KAAK,UAAU,EAGf,MAAM,6BAA6B,CAAC;AAErC,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IACjC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,OAAO,EAAE,uBAAuB,CAAC;CACjC;AAED,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,mDAAmD,CAAC;AAC5F,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,sDAAsD,CAAC;AA4BlG,gBAAgB;AAChB,eAAO,MAAM,YAAY;IACxB,gBAAgB;oBACA,iBAAiB,GAAG,oBAAoB;IAaxD,gBAAgB;uBACG,iBAAiB,GAAG,oBAAoB;CAa3D,CAAC;AA0IF,gBAAgB;AAChB,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,mBAAmB,EACzB,OAAO,GAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;;EAwC7C"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import type { CoreServerSetupDeps } from "@leitwerk-dev/process-sdk";
|
|
2
|
+
/** @internal */
|
|
2
3
|
export interface FilesystemWatcherEvent {
|
|
4
|
+
/** @internal */
|
|
3
5
|
filePath: string;
|
|
6
|
+
/** @internal */
|
|
4
7
|
content: string;
|
|
5
8
|
}
|
|
9
|
+
/** @internal */
|
|
6
10
|
export interface FilesystemWatcherConfig {
|
|
11
|
+
/** @internal */
|
|
7
12
|
pollInterval: string;
|
|
13
|
+
/** @internal */
|
|
8
14
|
filePath: string;
|
|
9
15
|
}
|
|
16
|
+
/** @internal */
|
|
10
17
|
export declare const filesystemWatcherSource: import("@leitwerk-dev/process-sdk").ProcessWatcherSource<FilesystemWatcherConfig, FilesystemWatcherEvent>;
|
|
18
|
+
/** @internal */
|
|
11
19
|
export declare function createFilesystemWatcherProvider(deps: CoreServerSetupDeps): {
|
|
12
|
-
|
|
20
|
+
/** @internal */
|
|
21
|
+
pollers: {
|
|
22
|
+
poll(): Promise<import("@leitwerk-dev/watcher-utils").PollResult>;
|
|
23
|
+
}[];
|
|
13
24
|
};
|
|
14
25
|
//# sourceMappingURL=filesystem-watcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-watcher.d.ts","sourceRoot":"","sources":["../src/filesystem-watcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAYrE,MAAM,WAAW,sBAAsB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAgBD,eAAO,MAAM,uBAAuB,2GAoClC,CAAC;AAEH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,mBAAmB
|
|
1
|
+
{"version":3,"file":"filesystem-watcher.d.ts","sourceRoot":"","sources":["../src/filesystem-watcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAYrE,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACtC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACvC,gBAAgB;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAgBD,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,2GAoClC,CAAC;AAEH,gBAAgB;AAChB,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,mBAAmB;IAqCvE,gBAAgB;;;;EAGjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import type { LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
|
|
2
|
-
|
|
3
|
-
file_triggers?: {
|
|
4
|
-
poll_interval?: string;
|
|
5
|
-
poem_review_path?: string;
|
|
6
|
-
complete_prompt_path?: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export declare const manifest: {
|
|
10
|
-
readonly id: "showcase-processes";
|
|
11
|
-
readonly version: "0.1.0";
|
|
12
|
-
};
|
|
2
|
+
/** @public */
|
|
13
3
|
declare const singlePromptExtension: LeitwerkExtensionModule;
|
|
14
4
|
export default singlePromptExtension;
|
|
15
|
-
export
|
|
16
|
-
export * from "./filesystem-watcher.js";
|
|
17
|
-
export * from "./poem-leaf-outcome.js";
|
|
18
|
-
export * from "./process-definition.js";
|
|
19
|
-
export * from "./turns/external-complete.js";
|
|
20
|
-
export * from "./turns/poem-creator.js";
|
|
21
|
-
export * from "./turns/run-single-prompt.js";
|
|
5
|
+
export { buildPoemLeafOutcomeFallbackMarkdown, buildPoemLeafOutcomePayload, } from "./poem-leaf-outcome.js";
|
|
22
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA0CzE,cAAc;AACd,QAAA,MAAM,qBAAqB,EAAE,uBA4B5B,CAAC;AAEF,eAAe,qBAAqB,CAAC;AACrC,OAAO,EACN,oCAAoC,EACpC,2BAA2B,GAC3B,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ function fileLabel(kind, path) {
|
|
|
30
30
|
return kind === "presence" ? `File present: ${path}` : `File instruction: ${path}`;
|
|
31
31
|
}
|
|
32
32
|
var fileExternal = {
|
|
33
|
+
/** @internal */
|
|
33
34
|
presence(input) {
|
|
34
35
|
const config = normalizeConfig(input);
|
|
35
36
|
return {
|
|
@@ -43,6 +44,7 @@ var fileExternal = {
|
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
},
|
|
47
|
+
/** @internal */
|
|
46
48
|
instruction(input) {
|
|
47
49
|
const config = normalizeConfig(input);
|
|
48
50
|
return {
|
|
@@ -296,7 +298,10 @@ function createFilesystemWatcherProvider(deps) {
|
|
|
296
298
|
}
|
|
297
299
|
})
|
|
298
300
|
);
|
|
299
|
-
return {
|
|
301
|
+
return {
|
|
302
|
+
/** @internal */
|
|
303
|
+
pollers
|
|
304
|
+
};
|
|
300
305
|
}
|
|
301
306
|
|
|
302
307
|
// src/process-definition.ts
|
|
@@ -394,19 +399,22 @@ function buildPoemLeafOutcomeFallbackMarkdown(input) {
|
|
|
394
399
|
}
|
|
395
400
|
|
|
396
401
|
// src/turns/external-complete.ts
|
|
397
|
-
var externalCompleteActionId = "complete_external_prompt";
|
|
398
402
|
var externalPromptCompletionTurnId = "await_external_prompt_completion";
|
|
399
403
|
var externalPromptCompletionTurnDescription = "Wait for an external completion trigger after the single prompt finishes";
|
|
400
|
-
var externalPromptCompletionTriggerLabel = "Configured prompt-complete file";
|
|
401
|
-
var externalPromptCompletionTriggerDescription = "Write any content to the configured prompt-complete trigger file (default: /tmp/complete-prompt) to complete the process. The file is removed after a successful completion.";
|
|
402
404
|
|
|
403
405
|
// src/turns/poem-creator.ts
|
|
404
406
|
var poemCreatorActionIds = {
|
|
407
|
+
/** @internal */
|
|
405
408
|
completePoem: "complete_poem",
|
|
409
|
+
/** @internal */
|
|
406
410
|
requestRevision: "request_poem_revision",
|
|
411
|
+
/** @internal */
|
|
407
412
|
runAutoReview: "run_poem_auto_review",
|
|
413
|
+
/** @internal */
|
|
408
414
|
acceptReview: "accept_poem_review",
|
|
415
|
+
/** @internal */
|
|
409
416
|
requestReviewChanges: "request_poem_review_changes",
|
|
417
|
+
/** @internal */
|
|
410
418
|
dismissReview: "dismiss_poem_review"
|
|
411
419
|
};
|
|
412
420
|
function formatGermanyDay(now) {
|
|
@@ -1059,7 +1067,7 @@ var poemReviewFeedbackSpec = flow.human(poemTurnIds.poemReviewFeedback).descript
|
|
|
1059
1067
|
})
|
|
1060
1068
|
}))
|
|
1061
1069
|
).definition;
|
|
1062
|
-
var
|
|
1070
|
+
var poemCreatorProcessDefinition = flow.process("poem_creator_process").displayName("Poem Creator").entry(poemTurnIds.draftPoem).codecs({
|
|
1063
1071
|
params: promptProcessParamsCodec,
|
|
1064
1072
|
state: poemCreatorStateCodec
|
|
1065
1073
|
}).initialState(() => ({
|
|
@@ -1167,10 +1175,13 @@ ${message}` : reviewInstruction;
|
|
|
1167
1175
|
};
|
|
1168
1176
|
}
|
|
1169
1177
|
}).define();
|
|
1178
|
+
var poemCreatorProcess = poemCreatorProcessDefinition;
|
|
1170
1179
|
|
|
1171
1180
|
// src/index.ts
|
|
1172
1181
|
var manifest = {
|
|
1182
|
+
/** @internal */
|
|
1173
1183
|
id: "showcase-processes",
|
|
1184
|
+
/** @internal */
|
|
1174
1185
|
version: "0.1.0"
|
|
1175
1186
|
};
|
|
1176
1187
|
var fileTriggerDefaults = {
|
|
@@ -1209,42 +1220,8 @@ var singlePromptExtension = {
|
|
|
1209
1220
|
};
|
|
1210
1221
|
var index_default = singlePromptExtension;
|
|
1211
1222
|
export {
|
|
1212
|
-
FILE_EXTERNAL_INSTRUCTION_KIND,
|
|
1213
|
-
FILE_EXTERNAL_PRESENCE_KIND,
|
|
1214
|
-
buildDefaultPoemPrompt,
|
|
1215
|
-
buildDraftPoemInstruction,
|
|
1216
1223
|
buildPoemLeafOutcomeFallbackMarkdown,
|
|
1217
1224
|
buildPoemLeafOutcomePayload,
|
|
1218
|
-
|
|
1219
|
-
buildRevisePoemInstruction,
|
|
1220
|
-
buildSinglePromptInstruction,
|
|
1221
|
-
buildSinglePromptWithToolInstruction,
|
|
1222
|
-
createFileExternalSourceProvider,
|
|
1223
|
-
createFilesystemWatcherProvider,
|
|
1224
|
-
createRunSinglePromptTurn,
|
|
1225
|
-
createRunSinglePromptWithToolTurn,
|
|
1226
|
-
index_default as default,
|
|
1227
|
-
externalCompleteActionId,
|
|
1228
|
-
externalPromptCompletionTriggerDescription,
|
|
1229
|
-
externalPromptCompletionTriggerLabel,
|
|
1230
|
-
externalPromptCompletionTurnDescription,
|
|
1231
|
-
externalPromptCompletionTurnId,
|
|
1232
|
-
extractLeafEntryMarkdown,
|
|
1233
|
-
fileExternal,
|
|
1234
|
-
filesystemWatcherSource,
|
|
1235
|
-
k8sSmokeLongProcess,
|
|
1236
|
-
k8sSmokeProcess,
|
|
1237
|
-
k8sSmokeSpecializedProcess,
|
|
1238
|
-
leaveFeedbackToolRenderer,
|
|
1239
|
-
manifest,
|
|
1240
|
-
parsePoemLeafMarkdown,
|
|
1241
|
-
poemCreatorActionIds,
|
|
1242
|
-
poemCreatorProcess,
|
|
1243
|
-
resolvePoemLeafMarkdown,
|
|
1244
|
-
runSinglePrompt,
|
|
1245
|
-
runSinglePromptWithTool,
|
|
1246
|
-
singlePromptExternalCompleteProcess,
|
|
1247
|
-
singlePromptProcess,
|
|
1248
|
-
singlePromptWithToolProcess
|
|
1225
|
+
index_default as default
|
|
1249
1226
|
};
|
|
1250
1227
|
//# sourceMappingURL=index.js.map
|