@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.
Files changed (256) hide show
  1. package/dist/browser-ui-extension.d.ts +20 -0
  2. package/dist/browser-ui-extension.d.ts.map +1 -1
  3. package/dist/capabilities.d.ts +6 -0
  4. package/dist/capabilities.d.ts.map +1 -1
  5. package/dist/{chunk-LIIP7FMU.js → chunk-5R6MVLHC.js} +1 -1
  6. package/dist/chunk-5R6MVLHC.js.map +1 -0
  7. package/dist/chunk-DVXW2ZUV.js +1 -0
  8. package/dist/chunk-DVXW2ZUV.js.map +1 -0
  9. package/dist/{chunk-TRQJ5PRM.js → chunk-I7U6HCLN.js} +1 -11
  10. package/dist/chunk-I7U6HCLN.js.map +1 -0
  11. package/dist/{chunk-5RJZ2E7D.js → chunk-TM2LTSW4.js} +2 -6
  12. package/dist/chunk-TM2LTSW4.js.map +1 -0
  13. package/dist/codecs.d.ts +1 -0
  14. package/dist/codecs.d.ts.map +1 -1
  15. package/dist/commit-message.d.ts +5 -0
  16. package/dist/commit-message.d.ts.map +1 -1
  17. package/dist/core-capabilities.d.ts +396 -44
  18. package/dist/core-capabilities.d.ts.map +1 -1
  19. package/dist/define-process.d.ts +209 -64
  20. package/dist/define-process.d.ts.map +1 -1
  21. package/dist/event-bus.d.ts +1 -0
  22. package/dist/event-bus.d.ts.map +1 -1
  23. package/dist/{extension-api-BBcwktmc.d.ts → extension-api-B4gG5w1K.d.ts} +1111 -153
  24. package/dist/extension-api.d.ts +481 -38
  25. package/dist/extension-api.d.ts.map +1 -1
  26. package/dist/external-action-source.d.ts +9 -0
  27. package/dist/external-action-source.d.ts.map +1 -0
  28. package/dist/external-source-poll.d.ts +22 -0
  29. package/dist/external-source-poll.d.ts.map +1 -0
  30. package/dist/flow.d.ts +380 -107
  31. package/dist/flow.d.ts.map +1 -1
  32. package/dist/form-contract.d.ts +1 -1
  33. package/dist/form-contract.d.ts.map +1 -1
  34. package/dist/fs-utils.d.ts +6 -0
  35. package/dist/fs-utils.d.ts.map +1 -1
  36. package/dist/git-binary.d.ts +2 -1
  37. package/dist/git-binary.d.ts.map +1 -1
  38. package/dist/git-binary.js +25 -33
  39. package/dist/git-binary.js.map +1 -1
  40. package/dist/graph-fragments.d.ts +16 -0
  41. package/dist/graph-fragments.d.ts.map +1 -1
  42. package/dist/host-capabilities.d.ts +9 -3
  43. package/dist/host-capabilities.d.ts.map +1 -1
  44. package/dist/index.d.ts +40 -29
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +4876 -29
  47. package/dist/index.js.map +1 -1
  48. package/dist/integration-http.d.ts +32 -0
  49. package/dist/integration-http.d.ts.map +1 -0
  50. package/dist/json-data.d.ts +3 -0
  51. package/dist/json-data.d.ts.map +1 -0
  52. package/dist/leaf-outcome-renderer.d.ts +35 -0
  53. package/dist/leaf-outcome-renderer.d.ts.map +1 -1
  54. package/dist/leaf-outcome-renderer.js +86 -64
  55. package/dist/leaf-outcome-renderer.js.map +1 -1
  56. package/dist/leaf-outcomes.d.ts +3 -0
  57. package/dist/leaf-outcomes.d.ts.map +1 -1
  58. package/dist/model-provider.d.ts +144 -12
  59. package/dist/model-provider.d.ts.map +1 -1
  60. package/dist/pi-config-public.d.ts +2 -0
  61. package/dist/pi-config-public.d.ts.map +1 -0
  62. package/dist/pi-config-public.js +15 -0
  63. package/dist/pi-config-public.js.map +1 -0
  64. package/dist/pi-config.d.ts +41 -5
  65. package/dist/pi-config.d.ts.map +1 -1
  66. package/dist/pi-config.js +20 -180
  67. package/dist/pi-config.js.map +1 -1
  68. package/dist/process-definition-internals.d.ts +4 -0
  69. package/dist/process-definition-internals.d.ts.map +1 -1
  70. package/dist/process-flow-view.d.ts +2 -0
  71. package/dist/process-flow-view.d.ts.map +1 -1
  72. package/dist/process-graph.d.ts +34 -0
  73. package/dist/process-graph.d.ts.map +1 -1
  74. package/dist/process-launcher-builder.d.ts +5 -0
  75. package/dist/process-launcher-builder.d.ts.map +1 -1
  76. package/dist/process-watcher-builder.d.ts +5 -0
  77. package/dist/process-watcher-builder.d.ts.map +1 -1
  78. package/dist/process-watcher-source.d.ts +3 -1
  79. package/dist/process-watcher-source.d.ts.map +1 -1
  80. package/dist/project-binding.d.ts +13 -0
  81. package/dist/project-binding.d.ts.map +1 -0
  82. package/dist/registry-utils.d.ts +6 -0
  83. package/dist/registry-utils.d.ts.map +1 -1
  84. package/dist/repository-feedback.d.ts +47 -0
  85. package/dist/repository-feedback.d.ts.map +1 -0
  86. package/dist/repository-git-env.d.ts +8 -2
  87. package/dist/repository-git-env.d.ts.map +1 -1
  88. package/dist/repository-http.d.ts +31 -0
  89. package/dist/repository-http.d.ts.map +1 -0
  90. package/dist/repository-https.d.ts +3 -0
  91. package/dist/repository-https.d.ts.map +1 -0
  92. package/dist/repository-issue-watcher.d.ts +51 -0
  93. package/dist/repository-issue-watcher.d.ts.map +1 -0
  94. package/dist/repository-reconciliation.d.ts +5 -0
  95. package/dist/repository-reconciliation.d.ts.map +1 -0
  96. package/dist/repository-source-config.d.ts +58 -0
  97. package/dist/repository-source-config.d.ts.map +1 -0
  98. package/dist/repository-types.d.ts +63 -0
  99. package/dist/repository-types.d.ts.map +1 -0
  100. package/dist/review-flow-public.d.ts +2 -0
  101. package/dist/review-flow-public.d.ts.map +1 -0
  102. package/dist/review-flow-public.js +11 -0
  103. package/dist/review-flow-public.js.map +1 -0
  104. package/dist/review-flow.d.ts +6 -0
  105. package/dist/review-flow.d.ts.map +1 -1
  106. package/dist/review-flow.js +12 -43
  107. package/dist/review-flow.js.map +1 -1
  108. package/dist/runtime-internals-public.d.ts +2 -0
  109. package/dist/runtime-internals-public.d.ts.map +1 -0
  110. package/dist/runtime-internals-public.js +16 -0
  111. package/dist/runtime-internals-public.js.map +1 -0
  112. package/dist/runtime-internals.js +19 -2
  113. package/dist/runtime-internals.js.map +1 -1
  114. package/dist/server-events.d.ts +67 -0
  115. package/dist/server-events.d.ts.map +1 -1
  116. package/dist/server-process-builder.d.ts +7 -0
  117. package/dist/server-process-builder.d.ts.map +1 -1
  118. package/dist/state-helpers.d.ts +8 -0
  119. package/dist/state-helpers.d.ts.map +1 -1
  120. package/dist/subprocess-env.d.ts +4 -0
  121. package/dist/subprocess-env.d.ts.map +1 -1
  122. package/dist/tool-arguments.d.ts +9 -0
  123. package/dist/tool-arguments.d.ts.map +1 -0
  124. package/dist/tool-renderers.d.ts +6 -0
  125. package/dist/tool-renderers.d.ts.map +1 -1
  126. package/dist/turn-semantics.d.ts +18 -6
  127. package/dist/turn-semantics.d.ts.map +1 -1
  128. package/dist/types.d.ts +209 -38
  129. package/dist/types.d.ts.map +1 -1
  130. package/dist/ui-process-builder.d.ts +5 -0
  131. package/dist/ui-process-builder.d.ts.map +1 -1
  132. package/dist/worker-process-builder.d.ts +5 -0
  133. package/dist/worker-process-builder.d.ts.map +1 -1
  134. package/package.json +17 -15
  135. package/src/browser-ui-extension.ts +20 -0
  136. package/src/capabilities.ts +9 -1
  137. package/src/codecs.ts +1 -0
  138. package/src/commit-message.ts +5 -0
  139. package/src/core-capabilities.ts +464 -59
  140. package/src/define-process.ts +384 -332
  141. package/src/event-bus.ts +1 -0
  142. package/src/extension-api.ts +521 -41
  143. package/src/external-action-source.ts +17 -0
  144. package/src/external-source-poll.ts +61 -0
  145. package/src/flow.ts +674 -677
  146. package/src/form-contract.ts +0 -4
  147. package/src/fs-utils.ts +21 -2
  148. package/src/git-binary.ts +2 -1
  149. package/src/graph-fragments.ts +16 -0
  150. package/src/host-capabilities.ts +9 -6
  151. package/src/index.ts +51 -206
  152. package/src/integration-http.ts +70 -0
  153. package/src/json-data.ts +25 -0
  154. package/src/leaf-outcome-renderer.ts +35 -0
  155. package/src/leaf-outcomes.ts +4 -9
  156. package/src/model-provider.ts +179 -43
  157. package/src/pi-config-public.ts +7 -0
  158. package/src/pi-config.ts +48 -8
  159. package/src/process-definition-internals.ts +4 -0
  160. package/src/process-flow-view.ts +34 -88
  161. package/src/process-graph.ts +59 -51
  162. package/src/process-launcher-builder.ts +5 -0
  163. package/src/process-watcher-builder.ts +5 -0
  164. package/src/process-watcher-source.ts +9 -10
  165. package/src/project-binding.ts +40 -0
  166. package/src/registry-utils.ts +7 -5
  167. package/src/repository-feedback.ts +85 -0
  168. package/src/repository-git-env.ts +40 -2
  169. package/src/repository-http.ts +88 -0
  170. package/src/repository-https.ts +22 -0
  171. package/src/repository-issue-watcher.ts +122 -0
  172. package/src/repository-reconciliation.ts +30 -0
  173. package/src/repository-source-config.ts +79 -0
  174. package/src/repository-types.ts +63 -0
  175. package/src/review-flow-public.ts +5 -0
  176. package/src/review-flow.ts +6 -0
  177. package/src/runtime-internals-public.ts +7 -0
  178. package/src/server-events.ts +67 -0
  179. package/src/server-process-builder.ts +10 -1
  180. package/src/state-helpers.ts +14 -4
  181. package/src/subprocess-env.ts +9 -0
  182. package/src/tool-arguments.ts +39 -0
  183. package/src/tool-renderers.ts +6 -0
  184. package/src/turn-semantics.ts +45 -76
  185. package/src/types.ts +216 -44
  186. package/src/ui-process-builder.ts +8 -1
  187. package/src/worker-process-builder.ts +8 -1
  188. package/dist/browser-ui-extension.js +0 -2
  189. package/dist/browser-ui-extension.js.map +0 -1
  190. package/dist/capabilities.js +0 -7
  191. package/dist/capabilities.js.map +0 -1
  192. package/dist/chunk-5RJZ2E7D.js.map +0 -1
  193. package/dist/chunk-LIIP7FMU.js.map +0 -1
  194. package/dist/chunk-TRQJ5PRM.js.map +0 -1
  195. package/dist/codecs.js +0 -9
  196. package/dist/codecs.js.map +0 -1
  197. package/dist/commit-message.js +0 -3
  198. package/dist/commit-message.js.map +0 -1
  199. package/dist/core-capabilities.js +0 -6
  200. package/dist/core-capabilities.js.map +0 -1
  201. package/dist/define-process.js +0 -1078
  202. package/dist/define-process.js.map +0 -1
  203. package/dist/event-bus.js +0 -31
  204. package/dist/event-bus.js.map +0 -1
  205. package/dist/extension-api.js +0 -5
  206. package/dist/extension-api.js.map +0 -1
  207. package/dist/flow.js +0 -1645
  208. package/dist/flow.js.map +0 -1
  209. package/dist/form-contract.js +0 -2
  210. package/dist/form-contract.js.map +0 -1
  211. package/dist/fs-utils.js +0 -23
  212. package/dist/fs-utils.js.map +0 -1
  213. package/dist/graph-fragments.js +0 -57
  214. package/dist/graph-fragments.js.map +0 -1
  215. package/dist/host-capabilities.js +0 -42
  216. package/dist/host-capabilities.js.map +0 -1
  217. package/dist/launcher-contract.js +0 -2
  218. package/dist/launcher-contract.js.map +0 -1
  219. package/dist/leaf-outcomes.js +0 -52
  220. package/dist/leaf-outcomes.js.map +0 -1
  221. package/dist/model-provider.js +0 -171
  222. package/dist/model-provider.js.map +0 -1
  223. package/dist/process-definition-internals.js +0 -25
  224. package/dist/process-definition-internals.js.map +0 -1
  225. package/dist/process-flow-view.js +0 -418
  226. package/dist/process-flow-view.js.map +0 -1
  227. package/dist/process-graph.js +0 -212
  228. package/dist/process-graph.js.map +0 -1
  229. package/dist/process-launcher-builder.js +0 -43
  230. package/dist/process-launcher-builder.js.map +0 -1
  231. package/dist/process-watcher-builder.js +0 -40
  232. package/dist/process-watcher-builder.js.map +0 -1
  233. package/dist/process-watcher-source.js +0 -52
  234. package/dist/process-watcher-source.js.map +0 -1
  235. package/dist/registry-utils.js +0 -18
  236. package/dist/registry-utils.js.map +0 -1
  237. package/dist/repository-git-env.js +0 -26
  238. package/dist/repository-git-env.js.map +0 -1
  239. package/dist/server-events.js +0 -2
  240. package/dist/server-events.js.map +0 -1
  241. package/dist/server-process-builder.js +0 -52
  242. package/dist/server-process-builder.js.map +0 -1
  243. package/dist/state-helpers.js +0 -18
  244. package/dist/state-helpers.js.map +0 -1
  245. package/dist/subprocess-env.js +0 -34
  246. package/dist/subprocess-env.js.map +0 -1
  247. package/dist/tool-renderers.js +0 -63
  248. package/dist/tool-renderers.js.map +0 -1
  249. package/dist/turn-semantics.js +0 -365
  250. package/dist/turn-semantics.js.map +0 -1
  251. package/dist/types.js +0 -23
  252. package/dist/types.js.map +0 -1
  253. package/dist/ui-process-builder.js +0 -30
  254. package/dist/ui-process-builder.js.map +0 -1
  255. package/dist/worker-process-builder.js +0 -22
  256. package/dist/worker-process-builder.js.map +0 -1
@@ -3,9 +3,5 @@ export type {
3
3
  ActionFormDefinition as FormDefinition,
4
4
  ActionFormFieldDefinition,
5
5
  ActionFormFieldDefinition as FormFieldDefinition,
6
- ActionFormFieldKind,
7
- FormFieldKind,
8
6
  FormFieldOptionDefinition,
9
- FormFieldPublishDefinition,
10
- FormFieldStateDefinition,
11
7
  } from "@leitwerk-dev/protocol/form-contract";
package/src/fs-utils.ts CHANGED
@@ -2,6 +2,7 @@ import { randomUUID } from "node:crypto";
2
2
  import { mkdir, rename, unlink, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
 
5
+ /** @internal */
5
6
  export async function atomicWriteUtf8(filePath: string, content: string): Promise<void> {
6
7
  const dir = path.dirname(filePath);
7
8
  await mkdir(dir, { recursive: true });
@@ -18,11 +19,29 @@ export async function atomicWriteUtf8(filePath: string, content: string): Promis
18
19
  }
19
20
  }
20
21
 
21
- export function isEnoent(error: unknown): boolean {
22
+ // The parent itself is not inside: callers require a strict descendant.
23
+ /** @internal */
24
+ export function isPathInside(parent: string, child: string): boolean {
25
+ const relative = path.relative(parent, child);
26
+ return (
27
+ relative !== "" &&
28
+ relative !== ".." &&
29
+ !relative.startsWith(`..${path.sep}`) &&
30
+ !path.isAbsolute(relative)
31
+ );
32
+ }
33
+
34
+ /** @internal */
35
+ export function hasErrorCode(error: unknown, code: string): boolean {
22
36
  return (
23
37
  typeof error === "object" &&
24
38
  error !== null &&
25
39
  "code" in error &&
26
- (error as { code?: unknown }).code === "ENOENT"
40
+ (error as { code?: unknown }).code === code
27
41
  );
28
42
  }
43
+
44
+ /** @internal */
45
+ export function isEnoent(error: unknown): boolean {
46
+ return hasErrorCode(error, "ENOENT");
47
+ }
package/src/git-binary.ts CHANGED
@@ -15,6 +15,7 @@ let cachedGitBinary: string | null = null;
15
15
  * to the bare `"git"` name when no PATH entry matches so spawning still works
16
16
  * and surfaces a clear error from the child process itself.
17
17
  */
18
+ /** @public */
18
19
  export function resolveGitBinary(): string {
19
20
  if (cachedGitBinary) {
20
21
  return cachedGitBinary;
@@ -34,7 +35,7 @@ export function resolveGitBinary(): string {
34
35
  return cachedGitBinary;
35
36
  }
36
37
 
37
- /** Reset the cached resolution. Intended for tests that mutate PATH. */
38
+ /** Reset the cached resolution. Intended for tests that mutate PATH. @internal */
38
39
  export function resetGitBinaryCache(): void {
39
40
  cachedGitBinary = null;
40
41
  }
@@ -6,7 +6,9 @@ import type {
6
6
  ProcessHumanTurnActionSpec,
7
7
  } from "./define-process.js";
8
8
 
9
+ /** @internal */
9
10
  type MaybePromise<T> = T | Promise<T>;
11
+ /** @internal */
10
12
  type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
11
13
 
12
14
  function appendQueuedInstruction<TState>(input: {
@@ -36,19 +38,26 @@ function appendQueuedInstruction<TState>(input: {
36
38
  };
37
39
  }
38
40
 
41
+ /** @internal */
39
42
  export type QueuedInstructionActionSpec<TParams = unknown, TState = unknown> = DistributiveOmit<
40
43
  ProcessHumanTurnActionSpec<TParams, TState>,
41
44
  "effect"
42
45
  > & {
46
+ /** @internal */
43
47
  queueTarget?: ProcessInputTarget;
48
+ /** @internal */
44
49
  queueSource?: InputSource;
50
+ /** @internal */
45
51
  queueKind?: InputKind;
52
+ /** @internal */
46
53
  resolveBodyMarkdown(
47
54
  input: ProcessActionExecution<TParams, TState>,
48
55
  ): MaybePromise<string | null | undefined>;
56
+ /** @internal */
49
57
  effect?: ProcessActionEffect<TParams, TState>;
50
58
  };
51
59
 
60
+ /** @internal */
52
61
  export function queuedInstructionAction<TParams = unknown, TState = unknown>(
53
62
  spec: QueuedInstructionActionSpec<TParams, TState>,
54
63
  ): ProcessHumanTurnActionSpec<TParams, TState> {
@@ -69,14 +78,18 @@ export function queuedInstructionAction<TParams = unknown, TState = unknown>(
69
78
  } as ProcessHumanTurnActionSpec<TParams, TState>;
70
79
  }
71
80
 
81
+ /** @internal */
72
82
  export type RevisionActionSpec<TParams = unknown, TState = unknown> = DistributiveOmit<
73
83
  QueuedInstructionActionSpec<TParams, TState>,
74
84
  "resolveBodyMarkdown"
75
85
  > & {
86
+ /** @internal */
76
87
  messageFieldId?: string;
88
+ /** @internal */
77
89
  missingMessageError?: string;
78
90
  };
79
91
 
92
+ /** @internal */
80
93
  export function revisionAction<TParams = unknown, TState = unknown>(
81
94
  spec: RevisionActionSpec<TParams, TState>,
82
95
  ): ProcessHumanTurnActionSpec<TParams, TState> {
@@ -93,13 +106,16 @@ export function revisionAction<TParams = unknown, TState = unknown>(
93
106
  });
94
107
  }
95
108
 
109
+ /** @internal */
96
110
  export type AcceptedReviewHandoffActionSpec<TParams = unknown, TState = unknown> = DistributiveOmit<
97
111
  QueuedInstructionActionSpec<TParams, TState>,
98
112
  "queueTarget"
99
113
  > & {
114
+ /** @internal */
100
115
  queueTarget?: ProcessInputTarget;
101
116
  };
102
117
 
118
+ /** @internal */
103
119
  export function acceptedReviewHandoffAction<TParams = unknown, TState = unknown>(
104
120
  spec: AcceptedReviewHandoffActionSpec<TParams, TState>,
105
121
  ): ProcessHumanTurnActionSpec<TParams, TState> {
@@ -1,19 +1,22 @@
1
1
  import type { CapabilityToken } from "./capabilities.js";
2
2
 
3
+ /** @internal */
3
4
  export interface ProvidedCapability<T = unknown> {
5
+ /** @internal */
4
6
  token: CapabilityToken<T>;
7
+ /** @internal */
5
8
  value: T;
6
9
  }
7
10
 
8
- export interface CapabilityAccessor {
11
+ /** @internal */
12
+ export function createCapabilityAccessor(provided: readonly ProvidedCapability[] = []): {
13
+ /** @internal */
9
14
  provide<T>(token: CapabilityToken<T>, value: T): void;
15
+ /** @internal */
10
16
  get<T>(token: CapabilityToken<T>): T | T[] | undefined;
17
+ /** @internal */
11
18
  require<T>(token: CapabilityToken<T>): T | T[];
12
- }
13
-
14
- export function createCapabilityAccessor(
15
- provided: readonly ProvidedCapability[] = [],
16
- ): CapabilityAccessor {
19
+ } {
17
20
  const singleCapabilities = new Map<string, unknown>();
18
21
  const multiCapabilities = new Map<string, unknown[]>();
19
22
 
package/src/index.ts CHANGED
@@ -7,7 +7,6 @@ export type {
7
7
  BrowserUiWsFrameHandler,
8
8
  } from "./browser-ui-extension.js";
9
9
  export {
10
- type CapabilityCardinality,
11
10
  type CapabilityToken,
12
11
  createCapabilityToken,
13
12
  } from "./capabilities.js";
@@ -20,115 +19,73 @@ export {
20
19
  export {
21
20
  type ActionExecutionFailureStageLike,
22
21
  type ActionExecutionResultLike,
23
- type BroadcasterLike,
24
- type ComponentConfigLike,
25
22
  type CoreServerSetupDeps,
26
23
  coreHostCapabilities,
27
- type DeferredProcessActivationEvent,
28
- type DeferredProcessActivationExpected,
29
24
  type DeferredProcessActivationFailure,
30
25
  type DeferredProcessActivationOutcome,
31
26
  type DeferredProcessActivationSnapshot,
32
27
  type DeferredProcessActivationSnapshotQuery,
33
28
  type DeferredProcessActivationSnapshotResult,
29
+ type ExternalObservationInput,
34
30
  type ExternalSourceArmingLike,
35
31
  type ExternalSourceFireInput,
36
32
  type ExternalSourceServiceLike,
37
33
  type HandoffDedupKeyRecordLike,
38
- type HandoffDedupKeyServiceLike,
39
34
  type LauncherModelConfigPreviewLike,
40
35
  type LauncherModelConfigSchemaLike,
41
36
  type LauncherModelConfigServiceLike,
42
- type LauncherRecentValuesServiceLike,
43
37
  type LaunchModelConfigInputLike,
44
38
  type LaunchPlanPreparationIssue,
45
39
  type LaunchPlanPreparationIssueCode,
46
40
  type LaunchPlanPreparationResultLike,
47
41
  type ModelProfileOptionSummaryLike,
42
+ type PollingServiceLike,
48
43
  type PreparedDeferredProcessActivation,
49
44
  type ProcessActionExecutionOrigin,
50
45
  type ProcessActionExecutionSource,
51
46
  type ProcessActionModelPreviewLike,
52
47
  type ProcessActionServiceLike,
53
48
  type ProcessActionSummaryLike,
54
- type ProcessCreateInputLike,
55
49
  type ProcessEngineLike,
56
- type ProcessEngineResultLike,
57
- type ProcessEventRepoLike,
58
- type ProcessLaunchConfigExecutionInput,
59
- type ProcessLaunchExecutionResultLike,
60
- type ProcessLaunchExecutorLike,
61
- type ProcessLaunchFailureStageLike,
62
50
  type ProcessLaunchPlanServiceLike,
63
- type ProcessModelSelectionPreviewFailureCode,
64
51
  type ProcessModelSelectionPreviewResultLike,
65
52
  type ProcessModelSelectionServiceLike,
66
53
  type ProcessProjectRepoLike,
67
54
  type ProcessQuestionServiceLike,
68
- type ProcessRepoLike,
69
55
  type ProcessWatcherServiceLike,
56
+ type ProgrammaticLaunchRequestLike,
57
+ type ProgrammaticLaunchResultLike,
70
58
  type QueuedProcessInputLike,
71
59
  type RegisteredProcessWatcherLike,
72
- type WorkerSupervisorLike,
60
+ type WatcherLaunchResultLike,
73
61
  } from "./core-capabilities.js";
74
62
  export {
75
63
  type AutomaticTurnDefinition,
76
64
  automaticTurn,
77
- type DefinedProcessInput,
78
65
  defineProcess,
79
66
  type ExternalSourceTransition,
80
- type ExternalTurnDefinition,
81
- externalTurn,
82
67
  getExternalActionArmingId,
83
68
  getExternalActionTransitionTrigger,
84
69
  getExternalSourceTransitionId,
85
70
  type HumanTurnDefinition,
86
- type HumanTurnOperatorAttention,
87
71
  humanTurn,
88
- type LlmModelPurpose,
89
72
  type LlmTurnDefinition,
90
73
  llmTurn,
91
- type OutcomeRouteOptions,
92
- type OutcomeRouteSpec,
93
- type ProcessActionBranchSelector,
94
- type ProcessActionBranchSpec,
95
- type ProcessActionEffect,
96
- type ProcessActionExecution,
97
- type ProcessActionExternalTrigger,
98
- type ProcessBroadcastEffect,
99
- type ProcessDefinition,
100
74
  type ProcessEffectPlan,
101
- type ProcessHumanTurnActionSpec,
102
75
  type ProcessHumanTurnExternalActionSpec,
103
76
  type ProcessLifecycleEffects,
104
- type ProcessOutcomeBranchSelector,
105
- type ProcessOutcomeBranchSpec,
106
- type ProcessOutcomeEffect,
107
- type ProcessOutcomeExecution,
108
- type ProcessPatchEffect,
109
- type ProcessRuntimeTurnContext,
110
- type ProcessServerRuntimeContext,
111
77
  type ProcessToolOutcomeSpec,
112
- type ProcessTurnEndSpec,
113
78
  resolveHumanTurnView,
114
79
  routeTurnOutcomes,
115
- type ServerAutomaticTurnDefinition,
116
- type ServerAutomaticTurnRestartBehavior,
117
- type ServerAutomaticTurnRunResult,
118
- serverAutomaticTurn,
119
80
  type TurnDefinition,
120
- type TurnDefinitionRecord,
121
81
  } from "./define-process.js";
122
82
  export { createEventBus } from "./event-bus.js";
123
83
  export type {
124
84
  CatalogExtensionAPI,
125
85
  Codec,
126
- ExtensionLifecycleHook,
127
86
  ExtensionProcessDefinition,
128
87
  ExternalActionSource,
129
- ExternalSourceEffect,
130
- ExternalSourceEffectContext,
131
- ExternalSourceInputMode,
88
+ ExternalEventDescription,
132
89
  ExternalSourceResolveContext,
133
90
  FormDefinition,
134
91
  FormFieldDefinition,
@@ -137,31 +94,21 @@ export type {
137
94
  IntegrationToolExecutionContext,
138
95
  LauncherContext,
139
96
  LauncherModelProfileSummary,
140
- LauncherVisibility,
141
- LeafOutcomeCaptureContext,
97
+ LaunchPreparationCheck,
142
98
  LeafOutcomeCaptureResult,
143
- LeitwerkExtensionManifest,
144
99
  LeitwerkExtensionModule,
145
- ParsedProcessWatcherConfig,
146
100
  ProcessActionDefinition,
147
101
  ProcessLaunchConfig,
148
- ProcessLauncherAPI,
149
102
  ProcessLauncherDefinition,
150
103
  ProcessLauncherService,
151
104
  ProcessLaunchPlan,
152
- ProcessLaunchPlanProcessInput,
153
105
  ProcessLaunchProjectConfig,
154
106
  ProcessLeafOutcomeDefinition,
155
- ProcessSnapshotContext,
156
107
  ProcessTitleSourceField,
157
108
  ProcessTurnBinding,
158
- ProcessTurnOutcomeEvent,
159
- ProcessWatcherAPI,
160
109
  ProcessWatcherDefinition,
161
110
  ProcessWatcherPresentation,
162
- ProcessWatcherPresentationField,
163
111
  ProcessWatcherSource,
164
- RepositoryCredentialKind,
165
112
  RepositoryCredentialProject,
166
113
  RepositoryCredentialProvider,
167
114
  RepositoryCredentialRegistrar,
@@ -169,91 +116,57 @@ export type {
169
116
  ResolvedProcessLauncher,
170
117
  ServerExtensionAPI,
171
118
  ServerExtensionLogger,
172
- ServerProcessAPI,
173
119
  ServerProcessContext,
174
- ServerTransitionEffect,
175
120
  ServerTransitionRequest,
176
- ServerTransitionRuntime,
177
- UiLauncherConfigResolution,
121
+ TicketCreationCapability,
122
+ TicketCreationDestinationList,
123
+ TicketCreationDestinationProvider,
124
+ TicketCreationDestinationSnapshot,
125
+ TicketCreationDestinationSummary,
126
+ TicketCreationReceipt,
178
127
  UiLauncherDefinition,
179
- UiLauncherResolutionResult,
180
128
  UiLauncherSummary,
181
- UiProcessAPI,
182
129
  WorkerCompleteInput,
183
130
  WorkerExtensionAPI,
184
- WorkerProcessAPI,
185
131
  WorkerProcessContext,
186
132
  WorkerRunHandle,
187
133
  WorkerTurnHandler,
188
134
  } from "./extension-api.js";
189
- export { findUiLauncherById } from "./extension-api.js";
135
+ export { findUiLauncherById, SafeLaunchPreparationError } from "./extension-api.js";
136
+ export { defineExternalActionSource } from "./external-action-source.js";
137
+ export { createExternalSourcePollReporter } from "./external-source-poll.js";
190
138
  export {
191
- AutomaticFlowBuilder,
192
139
  AutomaticOutcomeBuilder,
193
- createFlowAutomaticRunContext,
194
140
  createFlowPromptContext,
195
- DEFAULT_FLOW_PRODUCT_NAME,
196
- DEFAULT_PLAN_RESULT_OUTCOME_ID,
197
- ExternalActionBuilder,
198
- ExternalFlowBuilder,
199
- ExternalRouteBuilder,
200
- type FlowAutomaticOutcomeEffectContext,
201
141
  type FlowAutomaticRunContext,
202
- type FlowAutomaticTurn,
203
- type FlowExternalTurn,
204
142
  FlowFragmentBuilder,
205
- type FlowHumanTurn,
206
- type FlowLlmOutcomeEffectContext,
207
- type FlowLlmTurn,
208
- FlowProcessBuilder,
143
+ type FlowLlmPreparationContext,
209
144
  type FlowPromptContext,
210
- type FlowRepoContext,
211
- type FlowRepoLookup,
212
- type FlowServerAutomaticTurn,
213
- type FlowTurn,
214
145
  flow,
215
- HumanActionBuilder,
216
146
  HumanFlowBuilder,
217
- LlmFlowBuilder,
218
- LlmTurnEndBuilder,
219
- OutcomeToolBuilder,
220
- type PlanAcceptanceCriteriaOptions,
221
- type PlanFieldOptions,
222
- PlanResultBuilder,
223
- PublishedResultBuilder,
224
- ServerAutomaticFlowBuilder,
225
147
  } from "./flow.js";
226
- export { atomicWriteUtf8, isEnoent } from "./fs-utils.js";
148
+ export { atomicWriteUtf8, hasErrorCode, isEnoent, isPathInside } from "./fs-utils.js";
227
149
  export {
228
- type AcceptedReviewHandoffActionSpec,
229
150
  acceptedReviewHandoffAction,
230
- type QueuedInstructionActionSpec,
231
- queuedInstructionAction,
232
- type RevisionActionSpec,
233
151
  revisionAction,
234
152
  } from "./graph-fragments.js";
235
153
  export {
236
- type CapabilityAccessor,
237
154
  createCapabilityAccessor,
238
155
  type ProvidedCapability,
239
156
  } from "./host-capabilities.js";
157
+ export { IntegrationHttpClient, IntegrationHttpError } from "./integration-http.js";
158
+ export { parseJsonData } from "./json-data.js";
240
159
  export type {
241
- LauncherCardMetadata,
242
160
  LauncherFieldDefinition,
243
161
  LauncherFieldOptionDefinition,
244
- LauncherSchemaDefinition,
245
162
  LauncherValidationError,
246
- UiLauncherSummaryBase,
247
163
  } from "./launcher-contract.js";
248
164
  export {
249
165
  normalizeLeafOutcomeCaptureResult,
250
166
  validateLeafOutcomeCaptureResult,
251
- validateProcessLeafOutcomeDefinition,
252
167
  } from "./leaf-outcomes.js";
253
168
  export {
254
- type BuiltinPiProviderReference,
255
169
  builtinPiProvider,
256
- type ConfiguredPiProviderReference,
257
170
  type ConfiguredProviderModel,
258
171
  configuredPiProvider,
259
172
  credentialBasedModelStatuses,
@@ -265,62 +178,32 @@ export {
265
178
  defineWorkerConfig,
266
179
  type ErasedModelProviderDefinition,
267
180
  filterProviderOptionsForDefinition,
268
- type ModelProviderCredentialDefinition,
269
181
  type ModelProviderDefinition,
270
182
  type ModelProviderModelsContext,
271
- type ModelProviderSecretsContext,
272
- type ModelProviderServer,
273
183
  type ModelProviderSet,
274
184
  type ModelProviderSetEntry,
275
185
  type ModelProviderWorker,
276
- type ParsedModelProviderConfig,
277
186
  type PiServerAdapter,
278
- type PiServerGenerateTextInput,
279
- type PiServerReference,
280
- type PiWorkerContribution,
281
- type PiWorkerContributionContext,
282
- type PiWorkerReference,
283
- type PiWorkerSecretBag,
284
187
  type ProviderAvailability,
285
188
  type ProviderCredentialStatus,
286
189
  type ProviderJsonObject,
287
- type ProviderJsonPrimitive,
288
- type ProviderJsonValue,
289
190
  type ProviderModelStatus,
290
191
  type ProviderOptionChoice,
291
- type ProviderOptionChoicesContext,
292
- type ProviderOptionDefaultContext,
293
- type ProviderOptionField,
294
- type ProviderOptionsDefinition,
295
192
  type ProviderOptionsResolution,
296
- type ProviderOptionsResolutionInput,
297
193
  type ProviderOptionValidationIssue,
298
- type ProviderWorkerConfigContext,
299
- type ProviderWorkerConfigDefinition,
300
- type ProviderWorkerConfigSchema,
301
194
  piServer,
302
195
  piWorker,
303
196
  resolveProviderOptions,
304
197
  } from "./model-provider.js";
198
+ export { buildProcessFlowView } from "./process-flow-view.js";
305
199
  export {
306
- collectProcessAvailableToolNames,
307
- resolveTurnActiveToolNames,
308
- resolveTurnAvailableToolNames,
309
- validatePiBuiltInToolArray,
310
- } from "./pi-config.js";
311
- export { buildProcessFlowView, collapseRoutingTurns } from "./process-flow-view.js";
312
- export {
313
- getAllProcessGraphs,
314
200
  getProcessGraph,
315
201
  getProcessTurnGraph,
316
- getReachableTurnIdsForProcessGraph,
317
202
  getTurnTransitionsForProcessGraph,
318
203
  hasProcessGraph,
319
204
  isTurnAvailableForProcessGraph,
320
205
  listLlmTurnIdsForProcessGraph,
321
206
  type ProcessGraphRegistry,
322
- type ProcessGraphSource,
323
- type ProcessGraphTurnView,
324
207
  type ProcessGraphView,
325
208
  serializeProcessGraph,
326
209
  toProcessGraphView,
@@ -329,12 +212,10 @@ export {
329
212
  validateProcessGraphTurnTransitions,
330
213
  } from "./process-graph.js";
331
214
  export {
332
- type BuiltProcessLauncherDefinition,
333
215
  buildProcessLaunchers,
334
216
  createProcessLauncherBuilder,
335
217
  } from "./process-launcher-builder.js";
336
218
  export {
337
- type BuiltProcessWatcherDefinition,
338
219
  buildProcessWatchers,
339
220
  createProcessWatcherBuilder,
340
221
  } from "./process-watcher-builder.js";
@@ -343,95 +224,77 @@ export {
343
224
  parseProcessWatcherLaunchModelConfig,
344
225
  } from "./process-watcher-source.js";
345
226
  export {
227
+ type RepositoryProjectBinding,
228
+ resolveRepositoryProjectBinding,
229
+ } from "./project-binding.js";
230
+ export {
231
+ normalizeRepositoryFeedback,
232
+ type RepositoryFeedbackItem,
233
+ repositoryFeedbackBatch,
234
+ } from "./repository-feedback.js";
235
+ export {
236
+ clearRepositoryGitHttpsHelpers,
346
237
  clearRepositoryGitSshWrappers,
347
238
  repositoryGitArgs,
348
239
  repositoryGitSubprocessEnv,
240
+ setRepositoryGitHttpsHelper,
349
241
  setRepositoryGitSshWrapper,
350
242
  } from "./repository-git-env.js";
243
+ export { RepositoryHttpClient } from "./repository-http.js";
244
+ export { repositoryHttpsUrl } from "./repository-https.js";
351
245
  export {
352
- buildPlanSavedEventPayload,
353
- buildReviewCompletedEventPayload,
354
- buildReviewRequestedEventPayload,
355
- filterStringArray,
356
- } from "./review-flow.js";
246
+ matchesRepository,
247
+ parseRepositoryIssueWatcherConfig,
248
+ presentRepositoryIssueWatcherConfig,
249
+ type RepositoryIssueWatcherConfig,
250
+ } from "./repository-issue-watcher.js";
251
+ export { existingObject, matchesPatch } from "./repository-reconciliation.js";
252
+ export {
253
+ parseRepositoryFeedbackConfig,
254
+ parseRepositoryIssueCancelledConfig,
255
+ parseRepositoryPullRequestConfig,
256
+ } from "./repository-source-config.js";
257
+ export type { RepositoryIssue, RepositoryPullRequest } from "./repository-types.js";
357
258
  export type {
358
- LeafOutcomeCapturedEvent,
359
- PlanApprovedEvent,
360
- PlanRevisionRequestedEvent,
361
- ProcessCreatedEvent,
362
- ProcessUpdatedEvent,
363
- QuestionRequestedEvent,
364
- ReviewCompletedEvent,
365
- ReviewRequestedEvent,
366
259
  ServerExtensionEventMap,
367
260
  ServerExtensionEventName,
368
261
  ServerExtensionEventPayloadInputMap,
369
- TurnFailedEvent,
370
- TurnOutcomeEvent,
371
- TurnStartedEvent,
372
262
  } from "./server-events.js";
373
263
  export {
374
264
  type BuiltServerProcessDefinition,
375
265
  createServerProcessBuilder,
376
- type ServerTurnOutcomeHandler,
377
266
  } from "./server-process-builder.js";
378
267
  export {
379
268
  createEmptyStructuralProcessState,
380
269
  parseStructuralProcessState,
381
270
  type StructuralProcessState,
271
+ structuralStateCodec,
382
272
  } from "./state-helpers.js";
383
- export {
384
- type SubprocessEnvInput,
385
- sanitizeWorkerSubprocessEnv,
386
- WORKER_SUBPROCESS_SENSITIVE_ENV_KEYS,
387
- } from "./subprocess-env.js";
388
- export type {
389
- ToolCallRendererDefinition,
390
- ToolCallRendererFieldDefinition,
391
- ToolCallRendererValueKind,
392
- ToolCallRendererValueSource,
393
- } from "./tool-renderers.js";
273
+ export { sanitizeWorkerSubprocessEnv } from "./subprocess-env.js";
274
+ export { numberArg, objectArg, projectParameters, stringArg } from "./tool-arguments.js";
275
+ export type { ToolCallRendererDefinition } from "./tool-renderers.js";
394
276
  export {
395
277
  CORE_TOOL_CALL_RENDERERS,
396
- MARKDOWN_RESULT_TOOL_MARKDOWN_PATH,
397
278
  MARKDOWN_RESULT_TOOL_NAME,
398
- MARKDOWN_RESULT_TOOL_RENDERER,
399
279
  REQUIRED_MARKDOWN_RESULT_TURN_RESULT,
400
- TOOL_CALL_RENDERER_VALUE_KINDS,
401
- TOOL_CALL_RENDERER_VALUE_SOURCES,
402
280
  validateToolCallRendererDefinition,
403
281
  } from "./tool-renderers.js";
404
282
  export {
405
283
  assertValidLlmTurnDefinition,
406
284
  createRootBranchReviewTurn,
407
- defaultTurnStartSelection,
408
285
  isAutomaticTurnDefinition,
409
286
  isExternalTurnDefinition,
410
287
  isHumanTurnDefinition,
411
288
  isLlmTurnDefinition,
412
- isServerAutomaticTurnDefinition,
413
289
  resolveLlmTurnRestorePrimaryLeafAfterTurn,
414
- resolveLlmTurnStartSelection,
415
- validateAutomaticTurnDefinition,
416
- validateExternalTurnDefinition,
417
- validateHumanTurnDefinition,
418
- validateLlmTurnDefinition,
419
290
  validateTurnDefinition,
420
291
  } from "./turn-semantics.js";
421
292
  export type {
422
293
  EventBus,
423
- HumanTurnActionView,
424
- HumanTurnExternalTrigger,
425
- HumanTurnNotesField,
426
- OutcomeToolArrayItemSpec,
427
- OutcomeToolArrayItemType,
428
294
  OutcomeToolParameterSpec,
429
- OutcomeToolParameterType,
430
295
  OutcomeToolSpec,
431
- PiBuiltInToolName,
432
296
  PiCustomMessageInput,
433
297
  PiCustomTool,
434
- PiCustomToolExecutionContext,
435
298
  PiEvent,
436
299
  PiEventHandler,
437
300
  PiEventType,
@@ -439,7 +302,6 @@ export type {
439
302
  PiRunDetails,
440
303
  PiSessionDiagnostic,
441
304
  PiSessionDiagnosticHandler,
442
- PiSessionDiagnosticLevel,
443
305
  PiTerminalAcknowledgementControl,
444
306
  PiTerminalAcknowledgementState,
445
307
  PiTreeEntry,
@@ -449,32 +311,15 @@ export type {
449
311
  PiUsageData,
450
312
  ProcessActionPreviewDefinition,
451
313
  ProcessActionSchedulingDefinition,
452
- ProcessActionSchedulingFixedTurnPreview,
453
- ProcessActionSchedulingPreview,
454
- ProcessActionSchedulingTriggerPreview,
455
- ProcessContext,
456
- ProcessCustomTool,
457
314
  ProcessPiConfig,
458
- ProcessToolResult,
459
315
  ResolvedProcessPiConfig,
460
316
  TurnAcceptanceState,
461
- TurnBranchType,
462
- TurnCompletionMode,
463
- TurnContextMode,
464
317
  TurnOptions,
465
318
  TurnResult,
466
319
  TurnResultMarkdownBehavior,
467
- TurnSemanticEntryRefKey,
468
- } from "./types.js";
469
- export {
470
- FRAMEWORK_LLM_TOOL_NAMES,
471
- PI_BUILT_IN_TOOL_NAMES,
472
- RESERVED_INTEGRATION_TOOL_NAMES,
473
- TURN_COMPLETION_MODES,
474
- TURN_CONTEXT_MODES,
475
320
  } from "./types.js";
321
+ export { RESERVED_INTEGRATION_TOOL_NAMES } from "./types.js";
476
322
  export {
477
- type BuiltUiProcessDefinition,
478
323
  buildUiProcessDefinition,
479
324
  createUiProcessBuilder,
480
325
  } from "./ui-process-builder.js";