@leitwerk-dev/showcase-processes 0.1.2 → 0.1.3

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 (41) hide show
  1. package/dist/file-action-triggers.d.ts +9 -0
  2. package/dist/file-action-triggers.d.ts.map +1 -0
  3. package/dist/file-action-triggers.js +87 -0
  4. package/dist/file-action-triggers.js.map +1 -0
  5. package/dist/file-external.d.ts +16 -0
  6. package/dist/file-external.d.ts.map +1 -0
  7. package/dist/file-external.js +198 -0
  8. package/dist/file-external.js.map +1 -0
  9. package/dist/index.d.ts +11 -106
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +53 -1240
  12. package/dist/index.js.map +1 -1
  13. package/dist/poem-leaf-outcome.d.ts +41 -0
  14. package/dist/poem-leaf-outcome.d.ts.map +1 -0
  15. package/dist/poem-leaf-outcome.js +110 -0
  16. package/dist/poem-leaf-outcome.js.map +1 -0
  17. package/dist/process-definition.d.ts +18 -0
  18. package/dist/process-definition.d.ts.map +1 -0
  19. package/dist/process-definition.js +832 -0
  20. package/dist/process-definition.js.map +1 -0
  21. package/dist/turns/external-complete.d.ts +6 -0
  22. package/dist/turns/external-complete.d.ts.map +1 -0
  23. package/dist/turns/external-complete.js +6 -0
  24. package/dist/turns/external-complete.js.map +1 -0
  25. package/dist/turns/poem-creator.d.ts +15 -0
  26. package/dist/turns/poem-creator.d.ts.map +1 -0
  27. package/dist/turns/poem-creator.js +72 -0
  28. package/dist/turns/poem-creator.js.map +1 -0
  29. package/dist/turns/run-single-prompt.d.ts +8 -0
  30. package/dist/turns/run-single-prompt.d.ts.map +1 -0
  31. package/dist/turns/run-single-prompt.js +57 -0
  32. package/dist/turns/run-single-prompt.js.map +1 -0
  33. package/dist/ui/leaf-outcome-element.d.ts +2 -0
  34. package/dist/ui/leaf-outcome-element.d.ts.map +1 -0
  35. package/dist/ui/leaf-outcome-element.js +79 -0
  36. package/dist/ui/leaf-outcome-element.js.map +1 -0
  37. package/dist/ui/poem-leaf-outcome-element.d.ts +2 -0
  38. package/dist/ui/poem-leaf-outcome-element.d.ts.map +1 -0
  39. package/dist/ui/poem-leaf-outcome-element.js +171 -0
  40. package/dist/ui/poem-leaf-outcome-element.js.map +1 -0
  41. package/package.json +4 -4
@@ -0,0 +1,9 @@
1
+ import type { CoreServerSetupDeps } from "@leitwerk-dev/process-sdk";
2
+ import { type PollResult } from "@leitwerk-dev/watcher-utils";
3
+ export interface SinglePromptFileTriggerConfig {
4
+ poll_interval: string;
5
+ poem_review_path: string;
6
+ complete_prompt_path: string;
7
+ }
8
+ export declare function createSinglePromptFileTriggerLoop(deps: CoreServerSetupDeps, config: SinglePromptFileTriggerConfig): import("@leitwerk-dev/watcher-utils").PollLoop<PollResult>;
9
+ //# sourceMappingURL=file-action-triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-action-triggers.d.ts","sourceRoot":"","sources":["../src/file-action-triggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAIN,KAAK,UAAU,EAEf,MAAM,6BAA6B,CAAC;AAGrC,MAAM,WAAW,6BAA6B;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC7B;AAqED,wBAAgB,iCAAiC,CAChD,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,6BAA6B,8DAkCrC"}
@@ -0,0 +1,87 @@
1
+ import { consumeTriggerFile, createPollLoop, emptyPollResult, readTriggerFile, } from "@leitwerk-dev/watcher-utils";
2
+ import { poemCreatorActionIds } from "./turns/poem-creator.js";
3
+ function findEligiblePoemReviewInstanceIds(deps) {
4
+ return deps.processes
5
+ .listAll()
6
+ .filter((process) => process.processId === "poem_creator_process" &&
7
+ process.selectedTurnId === "poem_review" &&
8
+ process.lifecycleStatus === "waiting")
9
+ .map((process) => process.id);
10
+ }
11
+ async function processPoemReviewTrigger(deps, config, eligibleInstanceIds, result) {
12
+ const file = await readTriggerFile(config.poem_review_path);
13
+ if (!file.exists) {
14
+ return;
15
+ }
16
+ const message = file.content.trim();
17
+ if (message.length === 0) {
18
+ return;
19
+ }
20
+ if (eligibleInstanceIds.length !== 1) {
21
+ result.skipped.push(`poem_review:${eligibleInstanceIds.length}`);
22
+ return;
23
+ }
24
+ const instanceId = eligibleInstanceIds[0];
25
+ if (!instanceId) {
26
+ return;
27
+ }
28
+ const action = await deps.processActions.executeAction(instanceId, poemCreatorActionIds.requestRevision, { message }, { source: "external" });
29
+ if (!action.ok) {
30
+ result.errors.push(`poem_review:${instanceId}:${action.code ?? action.error ?? "external_action_failed"}`);
31
+ deps.events.create({
32
+ instanceId,
33
+ eventType: "external_source_failed",
34
+ data: {
35
+ kind: "@leitwerk-dev/showcase-processes.file.instruction",
36
+ path: config.poem_review_path,
37
+ message: action.code ?? action.error,
38
+ },
39
+ });
40
+ return;
41
+ }
42
+ deps.events.create({
43
+ instanceId,
44
+ eventType: "external_source_consumed",
45
+ data: {
46
+ kind: "@leitwerk-dev/showcase-processes.file.instruction",
47
+ path: config.poem_review_path,
48
+ },
49
+ });
50
+ await consumeTriggerFile(config.poem_review_path);
51
+ result.created.push(`poem_review:${instanceId}`);
52
+ }
53
+ export function createSinglePromptFileTriggerLoop(deps, config) {
54
+ const armed = new Set();
55
+ return createPollLoop({
56
+ pollInterval: () => config.poll_interval,
57
+ isEnabled: () => true,
58
+ defaultIntervalMs: 1_000,
59
+ async pollOnce() {
60
+ const result = emptyPollResult();
61
+ const eligible = findEligiblePoemReviewInstanceIds(deps);
62
+ for (const instanceId of eligible) {
63
+ if (!armed.has(instanceId)) {
64
+ deps.events.create({
65
+ instanceId,
66
+ eventType: "external_trigger_listener_armed",
67
+ data: {
68
+ trigger: "poem_review_file",
69
+ actionId: poemCreatorActionIds.requestRevision,
70
+ path: config.poem_review_path,
71
+ pollInterval: config.poll_interval,
72
+ },
73
+ });
74
+ armed.add(instanceId);
75
+ }
76
+ }
77
+ for (const instanceId of [...armed]) {
78
+ if (!eligible.includes(instanceId)) {
79
+ armed.delete(instanceId);
80
+ }
81
+ }
82
+ await processPoemReviewTrigger(deps, config, eligible, result);
83
+ return result;
84
+ },
85
+ });
86
+ }
87
+ //# sourceMappingURL=file-action-triggers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-action-triggers.js","sourceRoot":"","sources":["../src/file-action-triggers.ts"],"names":[],"mappings":"AACA,OAAO,EACN,kBAAkB,EAClB,cAAc,EACd,eAAe,EAEf,eAAe,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQ/D,SAAS,iCAAiC,CAAC,IAAyB;IACnE,OAAO,IAAI,CAAC,SAAS;SACnB,OAAO,EAAE;SACT,MAAM,CACN,CAAC,OAAO,EAAE,EAAE,CACX,OAAO,CAAC,SAAS,KAAK,sBAAsB;QAC5C,OAAO,CAAC,cAAc,KAAK,aAAa;QACxC,OAAO,CAAC,eAAe,KAAK,SAAS,CACtC;SACA,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,KAAK,UAAU,wBAAwB,CACtC,IAAyB,EACzB,MAAqC,EACrC,mBAAsC,EACtC,MAAkB;IAElB,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC5D,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO;IACR,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO;IACR,CAAC;IACD,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,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";
3
+ export type FileExternalConsumeMode = "delete" | "keep";
4
+ export interface FileExternalInput {
5
+ path: string;
6
+ pollInterval: string;
7
+ consume: FileExternalConsumeMode;
8
+ }
9
+ export declare const FILE_EXTERNAL_PRESENCE_KIND = "@leitwerk-dev/showcase-processes.file.presence";
10
+ export declare const FILE_EXTERNAL_INSTRUCTION_KIND = "@leitwerk-dev/showcase-processes.file.instruction";
11
+ export declare const fileExternal: {
12
+ presence(input: FileExternalInput): ExternalActionSource;
13
+ instruction(input: FileExternalInput): ExternalActionSource;
14
+ };
15
+ export declare function createFileExternalSourceProvider(deps: CoreServerSetupDeps, aliases?: Partial<Record<string, string>>): import("@leitwerk-dev/watcher-utils").PollLoop<PollResult>;
16
+ //# sourceMappingURL=file-external.d.ts.map
@@ -0,0 +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,EAIN,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;oBACR,iBAAiB,GAAG,oBAAoB;uBAarC,iBAAiB,GAAG,oBAAoB;CAa3D,CAAC;AA0IF,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,mBAAmB,EACzB,OAAO,GAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,8DAuC7C"}
@@ -0,0 +1,198 @@
1
+ import { consumeTriggerFile, createPollLoop, emptyPollResult, parseDurationMs, readTriggerFile, } from "@leitwerk-dev/watcher-utils";
2
+ export const FILE_EXTERNAL_PRESENCE_KIND = "@leitwerk-dev/showcase-processes.file.presence";
3
+ export const FILE_EXTERNAL_INSTRUCTION_KIND = "@leitwerk-dev/showcase-processes.file.instruction";
4
+ function normalizeConfig(input) {
5
+ return {
6
+ path: input.path,
7
+ pollInterval: input.pollInterval,
8
+ consume: input.consume,
9
+ };
10
+ }
11
+ function interpolateTemplate(template, values) {
12
+ return template.replace(/\{([a-zA-Z0-9_]+)\}/g, (match, key) => values[key] ?? match);
13
+ }
14
+ function resolveFileConfig(input, ctx) {
15
+ return {
16
+ ...input,
17
+ path: interpolateTemplate(input.path, { instanceId: ctx.process.id }),
18
+ };
19
+ }
20
+ function fileLabel(kind, path) {
21
+ return kind === "presence" ? `File present: ${path}` : `File instruction: ${path}`;
22
+ }
23
+ export const fileExternal = {
24
+ presence(input) {
25
+ const config = normalizeConfig(input);
26
+ return {
27
+ kind: FILE_EXTERNAL_PRESENCE_KIND,
28
+ label: fileLabel("presence", config.path),
29
+ description: `Fires when ${config.path} exists`,
30
+ config,
31
+ inputMode: "none",
32
+ resolve(ctx) {
33
+ return resolveFileConfig(config, ctx);
34
+ },
35
+ };
36
+ },
37
+ instruction(input) {
38
+ const config = normalizeConfig(input);
39
+ return {
40
+ kind: FILE_EXTERNAL_INSTRUCTION_KIND,
41
+ label: fileLabel("instruction", config.path),
42
+ description: `Reads ${config.path} as instruction text`,
43
+ config,
44
+ inputMode: "instruction",
45
+ resolve(ctx) {
46
+ return resolveFileConfig(config, ctx);
47
+ },
48
+ };
49
+ },
50
+ };
51
+ function parseFileConfig(value) {
52
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
53
+ return null;
54
+ }
55
+ const record = value;
56
+ if (typeof record.path !== "string" || record.path.trim() === "") {
57
+ return null;
58
+ }
59
+ return {
60
+ path: record.path,
61
+ pollInterval: typeof record.pollInterval === "string" ? record.pollInterval : "1s",
62
+ consume: record.consume === "keep" ? "keep" : "delete",
63
+ };
64
+ }
65
+ async function maybeConsume(config) {
66
+ if (config.consume === "delete") {
67
+ await consumeTriggerFile(config.path);
68
+ }
69
+ }
70
+ function createDueTracker() {
71
+ const nextDueAtByKey = new Map();
72
+ return {
73
+ isDue(key, pollInterval, nowMs = Date.now()) {
74
+ const nextDueAt = nextDueAtByKey.get(key) ?? 0;
75
+ if (nextDueAt > nowMs) {
76
+ return false;
77
+ }
78
+ const intervalMs = parseDurationMs(pollInterval, 1_000);
79
+ nextDueAtByKey.set(key, nowMs + intervalMs);
80
+ return true;
81
+ },
82
+ prune(activeKeys) {
83
+ for (const key of [...nextDueAtByKey.keys()]) {
84
+ if (!activeKeys.has(key)) {
85
+ nextDueAtByKey.delete(key);
86
+ }
87
+ }
88
+ },
89
+ };
90
+ }
91
+ function resolveArmedFileConfig(armed, resolveAlias) {
92
+ const parsed = parseFileConfig(armed.resolved) ?? parseFileConfig(armed.source.config);
93
+ return parsed ? resolveAlias(parsed) : null;
94
+ }
95
+ async function pollArmedFileSource(armed, resolveConfig, isDue, activeKeys, result) {
96
+ const config = resolveArmedFileConfig(armed, resolveConfig);
97
+ if (!config) {
98
+ result.errors.push(`${armed.id}:invalid_config`);
99
+ return null;
100
+ }
101
+ const key = `${armed.instanceId}:${armed.id}`;
102
+ activeKeys.add(key);
103
+ if (!isDue(key, config.pollInterval)) {
104
+ return null;
105
+ }
106
+ const file = await readTriggerFile(config.path);
107
+ if (!file.exists) {
108
+ return null;
109
+ }
110
+ return { config, file };
111
+ }
112
+ async function firePresenceSources(deps, result, resolveConfig, isDue, activeKeys) {
113
+ for (const armed of deps.externalSources.listArmed(FILE_EXTERNAL_PRESENCE_KIND)) {
114
+ const target = await pollArmedFileSource(armed, resolveConfig, isDue, activeKeys, result);
115
+ if (!target) {
116
+ continue;
117
+ }
118
+ const { config } = target;
119
+ const fired = await deps.externalSources.fire({
120
+ instanceId: armed.instanceId,
121
+ armingId: armed.id,
122
+ event: { path: config.path, pollInterval: config.pollInterval },
123
+ mergeKey: config.path,
124
+ });
125
+ if (!fired.ok) {
126
+ result.errors.push(`${armed.id}:${fired.code ?? fired.error ?? "fire_failed"}`);
127
+ continue;
128
+ }
129
+ await maybeConsume(config);
130
+ result.created.push(armed.id);
131
+ }
132
+ }
133
+ async function fireInstructionSources(deps, result, resolveConfig, isDue, activeKeys) {
134
+ for (const armed of deps.externalSources.listArmed(FILE_EXTERNAL_INSTRUCTION_KIND)) {
135
+ const target = await pollArmedFileSource(armed, resolveConfig, isDue, activeKeys, result);
136
+ if (!target) {
137
+ continue;
138
+ }
139
+ const { config, file } = target;
140
+ const instruction = file.content.trim();
141
+ if (!instruction) {
142
+ continue;
143
+ }
144
+ const fired = await deps.externalSources.fire({
145
+ instanceId: armed.instanceId,
146
+ armingId: armed.id,
147
+ input: { instruction },
148
+ event: { path: config.path, pollInterval: config.pollInterval },
149
+ mergeKey: config.path,
150
+ });
151
+ if (!fired.ok) {
152
+ result.errors.push(`${armed.id}:${fired.code ?? fired.error ?? "fire_failed"}`);
153
+ continue;
154
+ }
155
+ await maybeConsume(config);
156
+ result.created.push(armed.id);
157
+ }
158
+ }
159
+ export function createFileExternalSourceProvider(deps, aliases = {}) {
160
+ function applyAlias(config) {
161
+ const exact = aliases[config.path];
162
+ if (exact) {
163
+ return { ...config, path: exact };
164
+ }
165
+ for (const [template, replacement] of Object.entries(aliases)) {
166
+ if (!replacement || !template.includes("{instanceId}")) {
167
+ continue;
168
+ }
169
+ const [prefix, suffix = ""] = template.split("{instanceId}");
170
+ if (!prefix || !config.path.startsWith(prefix) || !config.path.endsWith(suffix)) {
171
+ continue;
172
+ }
173
+ const instanceId = config.path.slice(prefix.length, config.path.length - suffix.length);
174
+ return {
175
+ ...config,
176
+ path: replacement.includes("{instanceId}")
177
+ ? interpolateTemplate(replacement, { instanceId })
178
+ : replacement,
179
+ };
180
+ }
181
+ return config;
182
+ }
183
+ const due = createDueTracker();
184
+ return createPollLoop({
185
+ pollInterval: () => "50ms",
186
+ isEnabled: () => true,
187
+ defaultIntervalMs: 50,
188
+ async pollOnce() {
189
+ const result = emptyPollResult();
190
+ const activeKeys = new Set();
191
+ await firePresenceSources(deps, result, applyAlias, due.isDue, activeKeys);
192
+ await fireInstructionSources(deps, result, applyAlias, due.isDue, activeKeys);
193
+ due.prune(activeKeys);
194
+ return result;
195
+ },
196
+ });
197
+ }
198
+ //# sourceMappingURL=file-external.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-external.js","sourceRoot":"","sources":["../src/file-external.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,kBAAkB,EAClB,cAAc,EACd,eAAe,EAEf,eAAe,EACf,eAAe,GACf,MAAM,6BAA6B,CAAC;AAUrC,MAAM,CAAC,MAAM,2BAA2B,GAAG,gDAAgD,CAAC;AAC5F,MAAM,CAAC,MAAM,8BAA8B,GAAG,mDAAmD,CAAC;AAElG,SAAS,eAAe,CAAC,KAAwB;IAChD,OAAO;QACN,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,OAAO,EAAE,KAAK,CAAC,OAAO;KACtB,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAgB,EAAE,MAA8B;IAC5E,OAAO,QAAQ,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,iBAAiB,CACzB,KAAwB,EACxB,GAAgC;IAEhC,OAAO;QACN,GAAG,KAAK;QACR,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;KACrE,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,IAAgC,EAAE,IAAY;IAChE,OAAO,IAAI,KAAK,UAAU,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AAsB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;YAC9E,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACtB,OAAO,MAAM,CAAC;QACf,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,116 +1,21 @@
1
- import * as _leitwerk_dev_process_sdk from '@leitwerk-dev/process-sdk';
2
- import { CoreServerSetupDeps, ExternalActionSource, PiTreeEntry, StructuralProcessState, ToolCallRendererDefinition, LlmTurnDefinition, LeitwerkExtensionModule } from '@leitwerk-dev/process-sdk';
3
- import * as _leitwerk_dev_watcher_utils from '@leitwerk-dev/watcher-utils';
4
- import { PollResult } from '@leitwerk-dev/watcher-utils';
5
-
6
- type FileExternalConsumeMode = "delete" | "keep";
7
- interface FileExternalInput {
8
- path: string;
9
- pollInterval: string;
10
- consume: FileExternalConsumeMode;
11
- }
12
- declare const FILE_EXTERNAL_PRESENCE_KIND = "@leitwerk-dev/showcase-processes.file.presence";
13
- declare const FILE_EXTERNAL_INSTRUCTION_KIND = "@leitwerk-dev/showcase-processes.file.instruction";
14
- declare const fileExternal: {
15
- presence(input: FileExternalInput): ExternalActionSource;
16
- instruction(input: FileExternalInput): ExternalActionSource;
17
- };
18
- declare function createFileExternalSourceProvider(deps: CoreServerSetupDeps, aliases?: Partial<Record<string, string>>): _leitwerk_dev_watcher_utils.PollLoop<PollResult>;
19
-
20
- type PoemLeafOutcomeReviewOutcome = "no_issues" | "leave_feedback";
21
- interface PoemLeafOutcomeReview extends Record<string, unknown> {
22
- outcome: PoemLeafOutcomeReviewOutcome;
23
- summary: string | null;
24
- feedback: string | null;
25
- }
26
- interface PoemLeafOutcomePayload extends Record<string, unknown> {
27
- prompt: string;
28
- markdown: string;
29
- title: string | null;
30
- stanzas: string[][];
31
- review?: PoemLeafOutcomeReview | null;
32
- }
33
- declare function extractLeafEntryMarkdown(entry: Pick<PiTreeEntry, "message"> | null): string | null;
34
- declare function resolvePoemLeafMarkdown(input: {
35
- turnResultMarkdown: string | null | undefined;
36
- leafEntry: Pick<PiTreeEntry, "message"> | null;
37
- }): string;
38
- declare function parsePoemLeafMarkdown(markdown: string): {
39
- title: string | null;
40
- stanzas: string[][];
41
- };
42
- declare function buildPoemLeafOutcomePayload(input: {
43
- prompt: string;
44
- markdown: string;
45
- review?: {
46
- outcome: PoemLeafOutcomeReviewOutcome;
47
- summary?: string | null;
48
- feedback?: string | null;
49
- } | null;
50
- }): PoemLeafOutcomePayload;
51
- declare function buildPoemLeafOutcomeFallbackMarkdown(input: {
52
- markdown: string;
53
- review?: {
54
- outcome: PoemLeafOutcomeReviewOutcome;
55
- summary?: string | null;
56
- feedback?: string | null;
57
- } | null;
58
- }): string;
59
-
60
- interface PromptProcessParams {
61
- prompt: string;
62
- }
63
- interface PoemCreatorState extends StructuralProcessState {
64
- latestReviewMarkdown: string | null;
65
- latestReviewSummary: string | null;
66
- latestReviewOutcome: "no_issues" | "leave_feedback" | null;
67
- }
68
- declare const singlePromptProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
69
- declare const singlePromptWithToolProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
70
- declare const k8sSmokeProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
71
- declare const k8sSmokeSpecializedProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
72
- declare const k8sSmokeLongProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
73
- declare const singlePromptExternalCompleteProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, StructuralProcessState>;
74
- declare const poemCreatorProcess: _leitwerk_dev_process_sdk.ProcessDefinition<PromptProcessParams, PoemCreatorState>;
75
-
76
- declare const externalCompleteActionId = "complete_external_prompt";
77
- declare const externalPromptCompletionTurnId = "await_external_prompt_completion";
78
- declare const externalPromptCompletionTurnDescription = "Wait for an external completion trigger after the single prompt finishes";
79
- declare const externalPromptCompletionTriggerLabel = "Configured prompt-complete file";
80
- declare const 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.";
81
-
82
- declare const poemCreatorActionIds: {
83
- readonly completePoem: "complete_poem";
84
- readonly requestRevision: "request_poem_revision";
85
- readonly runAutoReview: "run_poem_auto_review";
86
- readonly acceptReview: "accept_poem_review";
87
- readonly requestReviewChanges: "request_poem_review_changes";
88
- readonly dismissReview: "dismiss_poem_review";
89
- };
90
- declare function buildDefaultPoemPrompt(now?: Date): string;
91
- declare function buildDraftPoemInstruction(promptText: string): string;
92
- declare function buildRevisePoemInstruction(revisionGuidance: string): string;
93
- declare function buildReviewPoemInstruction(promptText: string, poemDraftMarkdown: string): string;
94
- declare const leaveFeedbackToolRenderer: ToolCallRendererDefinition;
95
-
96
- declare function buildSinglePromptInstruction(promptText: string): string;
97
- declare function buildSinglePromptWithToolInstruction(promptText: string): string;
98
- declare function createRunSinglePromptTurn(promptText: string): LlmTurnDefinition<"completed">;
99
- declare function createRunSinglePromptWithToolTurn(promptText: string): LlmTurnDefinition<"done">;
100
- declare const runSinglePrompt: LlmTurnDefinition<"completed", unknown, unknown>;
101
- declare const runSinglePromptWithTool: LlmTurnDefinition<"done", unknown, unknown>;
102
-
103
- interface SinglePromptExtensionConfig {
1
+ import type { LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
2
+ export interface SinglePromptExtensionConfig {
104
3
  file_triggers?: {
105
4
  poll_interval?: string;
106
5
  poem_review_path?: string;
107
6
  complete_prompt_path?: string;
108
7
  };
109
8
  }
110
- declare const manifest: {
9
+ export declare const manifest: {
111
10
  readonly id: "showcase-processes";
112
11
  readonly version: "0.1.0";
113
12
  };
114
13
  declare const singlePromptExtension: LeitwerkExtensionModule;
115
-
116
- export { FILE_EXTERNAL_INSTRUCTION_KIND, FILE_EXTERNAL_PRESENCE_KIND, type FileExternalConsumeMode, type FileExternalInput, type PoemLeafOutcomePayload, type PoemLeafOutcomeReview, type PoemLeafOutcomeReviewOutcome, type SinglePromptExtensionConfig, buildDefaultPoemPrompt, buildDraftPoemInstruction, buildPoemLeafOutcomeFallbackMarkdown, buildPoemLeafOutcomePayload, buildReviewPoemInstruction, buildRevisePoemInstruction, buildSinglePromptInstruction, buildSinglePromptWithToolInstruction, createFileExternalSourceProvider, createRunSinglePromptTurn, createRunSinglePromptWithToolTurn, singlePromptExtension as default, externalCompleteActionId, externalPromptCompletionTriggerDescription, externalPromptCompletionTriggerLabel, externalPromptCompletionTurnDescription, externalPromptCompletionTurnId, extractLeafEntryMarkdown, fileExternal, k8sSmokeLongProcess, k8sSmokeProcess, k8sSmokeSpecializedProcess, leaveFeedbackToolRenderer, manifest, parsePoemLeafMarkdown, poemCreatorActionIds, poemCreatorProcess, resolvePoemLeafMarkdown, runSinglePrompt, runSinglePromptWithTool, singlePromptExternalCompleteProcess, singlePromptProcess, singlePromptWithToolProcess };
14
+ export default singlePromptExtension;
15
+ export * from "./file-external.js";
16
+ export * from "./poem-leaf-outcome.js";
17
+ export * from "./process-definition.js";
18
+ export * from "./turns/external-complete.js";
19
+ export * from "./turns/poem-creator.js";
20
+ export * from "./turns/run-single-prompt.js";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAczE,MAAM,WAAW,2BAA2B;IAC3C,aAAa,CAAC,EAAE;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACF;AAED,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AAQX,QAAA,MAAM,qBAAqB,EAAE,uBAiC5B,CAAC;AAEF,eAAe,qBAAqB,CAAC;AAErC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC"}