@leitwerk-dev/server 0.1.6 → 0.1.7
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/app.d.ts.map +1 -1
- package/dist/app.js +29 -31
- package/dist/app.js.map +1 -1
- package/dist/auth/auth-client.d.ts +25 -0
- package/dist/auth/auth-client.d.ts.map +1 -0
- package/dist/auth/auth-client.js +19 -0
- package/dist/auth/auth-client.js.map +1 -0
- package/dist/auth/auth-config.d.ts +8 -2
- package/dist/auth/auth-config.d.ts.map +1 -1
- package/dist/auth/auth-config.js +17 -7
- package/dist/auth/auth-config.js.map +1 -1
- package/dist/auth/auth-service.d.ts +2 -0
- package/dist/auth/auth-service.d.ts.map +1 -1
- package/dist/auth/auth-service.js +9 -5
- package/dist/auth/auth-service.js.map +1 -1
- package/dist/auth/auth-test-helpers.js +2 -2
- package/dist/auth/auth-test-helpers.js.map +1 -1
- package/dist/auth/github-oauth-client.d.ts +20 -0
- package/dist/auth/github-oauth-client.d.ts.map +1 -0
- package/dist/auth/github-oauth-client.js +79 -0
- package/dist/auth/github-oauth-client.js.map +1 -0
- package/dist/auth/oidc-client.d.ts +4 -4
- package/dist/{chunk-G4PCN46L.js → chunk-GIWHTJSL.js} +18 -93
- package/dist/chunk-GIWHTJSL.js.map +1 -0
- package/dist/{chunk-KVHAK5UR.js → chunk-OO6VH4FX.js} +515 -400
- package/dist/chunk-OO6VH4FX.js.map +1 -0
- package/dist/config/config-loader.d.ts.map +1 -1
- package/dist/config/config-loader.js +13 -88
- package/dist/config/config-loader.js.map +1 -1
- package/dist/config/config-types.d.ts +13 -3
- package/dist/config/config-types.d.ts.map +1 -1
- package/dist/domain-logic/outcome-tools.d.ts +2 -2
- package/dist/domain-logic/outcome-tools.d.ts.map +1 -1
- package/dist/domain-logic/outcome-tools.js +1 -1
- package/dist/domain-logic/outcome-tools.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integration-tool-registry.d.ts +23 -0
- package/dist/integration-tool-registry.d.ts.map +1 -0
- package/dist/integration-tool-registry.js +140 -0
- package/dist/integration-tool-registry.js.map +1 -0
- package/dist/process-ui-snapshot-presenter.d.ts.map +1 -1
- package/dist/process-ui-snapshot-presenter.js +0 -2
- package/dist/process-ui-snapshot-presenter.js.map +1 -1
- package/dist/process-watcher-registry.d.ts +3 -31
- package/dist/process-watcher-registry.d.ts.map +1 -1
- package/dist/process-watcher-registry.js +96 -97
- package/dist/process-watcher-registry.js.map +1 -1
- package/dist/routes/watchers.d.ts.map +1 -1
- package/dist/routes/watchers.js +14 -50
- package/dist/routes/watchers.js.map +1 -1
- package/dist/semantic-state-json.d.ts +1 -2
- package/dist/semantic-state-json.d.ts.map +1 -1
- package/dist/semantic-state-json.js +1 -2
- package/dist/semantic-state-json.js.map +1 -1
- package/dist/supervisor/ipc-handler.d.ts +4 -1
- package/dist/supervisor/ipc-handler.d.ts.map +1 -1
- package/dist/supervisor/ipc-handler.js +18 -0
- package/dist/supervisor/ipc-handler.js.map +1 -1
- package/dist/supervisor/worker-start-payload-builder.d.ts +3 -0
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -1
- package/dist/supervisor/worker-start-payload-builder.js +9 -0
- package/dist/supervisor/worker-start-payload-builder.js.map +1 -1
- package/dist/supervisor/worker-supervisor.d.ts +3 -1
- package/dist/supervisor/worker-supervisor.d.ts.map +1 -1
- package/dist/supervisor/worker-supervisor.js +6 -0
- package/dist/supervisor/worker-supervisor.js.map +1 -1
- package/dist/test-helpers/fake-worker-supervisor.d.ts.map +1 -1
- package/dist/test-helpers/fake-worker-supervisor.js +1 -0
- package/dist/test-helpers/fake-worker-supervisor.js.map +1 -1
- package/dist/test-helpers/ipc-handler-harness.d.ts +1 -0
- package/dist/test-helpers/ipc-handler-harness.d.ts.map +1 -1
- package/dist/test-helpers/ipc-handler-harness.js +4 -3
- package/dist/test-helpers/ipc-handler-harness.js.map +1 -1
- package/dist/test-helpers/process-fixtures.js +3 -3
- package/dist/test-helpers/process-fixtures.js.map +1 -1
- package/dist/{writes-irEq9SlA.d.ts → writes-DUwQe8MD.d.ts} +22 -4
- package/package.json +10 -10
- package/src/app.ts +34 -35
- package/src/auth/auth-client.ts +40 -0
- package/src/auth/auth-config.ts +34 -9
- package/src/auth/auth-service.ts +11 -5
- package/src/auth/auth-test-helpers.ts +2 -2
- package/src/auth/github-oauth-client.ts +111 -0
- package/src/auth/oidc-client.ts +5 -5
- package/src/config/config-loader.ts +18 -102
- package/src/config/config-types.ts +15 -3
- package/src/domain-logic/outcome-tools.ts +3 -3
- package/src/index.ts +1 -4
- package/src/integration-tool-registry.ts +186 -0
- package/src/process-ui-snapshot-presenter.ts +0 -2
- package/src/process-watcher-registry.ts +124 -167
- package/src/routes/watchers.ts +14 -50
- package/src/semantic-state-json.ts +0 -2
- package/src/supervisor/ipc-handler.ts +35 -0
- package/src/supervisor/worker-start-payload-builder.ts +19 -0
- package/src/supervisor/worker-supervisor.ts +13 -0
- package/src/test-helpers/fake-worker-supervisor.ts +1 -0
- package/src/test-helpers/ipc-handler-harness.ts +7 -3
- package/src/test-helpers/process-fixtures.ts +3 -3
- package/dist/chunk-G4PCN46L.js.map +0 -1
- package/dist/chunk-KVHAK5UR.js.map +0 -1
- package/dist/domain-logic/idempotency.d.ts +0 -3
- package/dist/domain-logic/idempotency.d.ts.map +0 -1
- package/dist/domain-logic/idempotency.js +0 -3
- package/dist/domain-logic/idempotency.js.map +0 -1
- package/dist/domain-logic/index.d.ts +0 -7
- package/dist/domain-logic/index.d.ts.map +0 -1
- package/dist/domain-logic/index.js +0 -6
- package/dist/domain-logic/index.js.map +0 -1
- package/dist/domain-logic/input-sequencer.d.ts +0 -16
- package/dist/domain-logic/input-sequencer.d.ts.map +0 -1
- package/dist/domain-logic/input-sequencer.js +0 -2
- package/dist/domain-logic/input-sequencer.js.map +0 -1
- package/dist/domain-logic/string-normalize.d.ts +0 -2
- package/dist/domain-logic/string-normalize.d.ts.map +0 -1
- package/dist/domain-logic/string-normalize.js +0 -2
- package/dist/domain-logic/string-normalize.js.map +0 -1
- package/dist/filesystem-process-watchers.d.ts +0 -22
- package/dist/filesystem-process-watchers.d.ts.map +0 -1
- package/dist/filesystem-process-watchers.js +0 -79
- package/dist/filesystem-process-watchers.js.map +0 -1
- package/dist/test-helpers/in-process-worker.d.ts +0 -2
- package/dist/test-helpers/in-process-worker.d.ts.map +0 -1
- package/dist/test-helpers/in-process-worker.js +0 -2
- package/dist/test-helpers/in-process-worker.js.map +0 -1
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts +0 -37
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/leaf-outcome-fixtures.js +0 -81
- package/dist/test-helpers/leaf-outcome-fixtures.js.map +0 -1
- package/src/domain-logic/idempotency.ts +0 -3
- package/src/domain-logic/index.ts +0 -31
- package/src/domain-logic/input-sequencer.ts +0 -18
- package/src/domain-logic/string-normalize.ts +0 -1
- package/src/filesystem-process-watchers.ts +0 -147
- package/src/test-helpers/in-process-worker.ts +0 -2
- package/src/test-helpers/leaf-outcome-fixtures.ts +0 -140
package/src/routes/watchers.ts
CHANGED
|
@@ -42,56 +42,20 @@ function summarizeLaunchModelConfig(
|
|
|
42
42
|
|
|
43
43
|
function buildWatcherSummary(watcher: RegisteredProcessWatcherLike): WatcherSummary {
|
|
44
44
|
const launchModel = summarizeLaunchModelConfig(watcher.launchModelConfig);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
project: watcher.config.project,
|
|
60
|
-
labels: watcher.config.labels,
|
|
61
|
-
targetBranchLabelPrefix: watcher.config.target_branch_label_prefix,
|
|
62
|
-
};
|
|
63
|
-
case "gitlab_mr":
|
|
64
|
-
return {
|
|
65
|
-
processId: watcher.processId,
|
|
66
|
-
processDisplayName: watcher.processDisplayName,
|
|
67
|
-
watcherId: watcher.watcherId,
|
|
68
|
-
label: watcher.watcherLabel,
|
|
69
|
-
description: watcher.watcherDescription,
|
|
70
|
-
type: "gitlab_mr",
|
|
71
|
-
enabled: watcher.enabled,
|
|
72
|
-
pollInterval: watcher.pollInterval,
|
|
73
|
-
configPath: watcher.configPath,
|
|
74
|
-
launchModel,
|
|
75
|
-
targetSummary: `GitLab group ${watcher.config.group} · trigger ${watcher.config.labels.trigger}`,
|
|
76
|
-
group: watcher.config.group,
|
|
77
|
-
labels: watcher.config.labels,
|
|
78
|
-
};
|
|
79
|
-
case "filesystem":
|
|
80
|
-
return {
|
|
81
|
-
processId: watcher.processId,
|
|
82
|
-
processDisplayName: watcher.processDisplayName,
|
|
83
|
-
watcherId: watcher.watcherId,
|
|
84
|
-
label: watcher.watcherLabel,
|
|
85
|
-
description: watcher.watcherDescription,
|
|
86
|
-
type: "filesystem",
|
|
87
|
-
enabled: watcher.enabled,
|
|
88
|
-
pollInterval: watcher.pollInterval,
|
|
89
|
-
configPath: watcher.configPath,
|
|
90
|
-
launchModel,
|
|
91
|
-
targetSummary: `File ${watcher.config.file_path}`,
|
|
92
|
-
filePath: watcher.config.file_path,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
45
|
+
return {
|
|
46
|
+
processId: watcher.processId,
|
|
47
|
+
processDisplayName: watcher.processDisplayName,
|
|
48
|
+
watcherId: watcher.watcherId,
|
|
49
|
+
label: watcher.watcherLabel,
|
|
50
|
+
description: watcher.watcherDescription,
|
|
51
|
+
sourceId: watcher.sourceId,
|
|
52
|
+
sourceLabel: watcher.sourceLabel,
|
|
53
|
+
enabled: watcher.enabled,
|
|
54
|
+
configPath: watcher.configPath,
|
|
55
|
+
launchModel,
|
|
56
|
+
targetSummary: watcher.presentation.targetSummary,
|
|
57
|
+
details: [...(watcher.presentation.details ?? [])],
|
|
58
|
+
};
|
|
95
59
|
}
|
|
96
60
|
|
|
97
61
|
export function registerWatcherRoutes(app: FastifyInstance, deps: WatcherRouteDeps): void {
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
type ProcessSemanticEntryRefs,
|
|
3
3
|
type ProcessStateJsonParseContext,
|
|
4
4
|
parseProcessStateJsonStrict,
|
|
5
|
-
parseSemanticEntryRefsFromStateJsonStrict,
|
|
6
5
|
parseSemanticEntryRefsStrict,
|
|
7
6
|
} from "@leitwerk-dev/domain";
|
|
8
7
|
|
|
@@ -10,7 +9,6 @@ export type ParsedProcessSemanticEntryRefs = ProcessSemanticEntryRefs;
|
|
|
10
9
|
export type ProcessStateJsonContext = ProcessStateJsonParseContext;
|
|
11
10
|
|
|
12
11
|
export const parseProcessStateJsonRecord = parseProcessStateJsonStrict;
|
|
13
|
-
export const parseProcessSemanticRefsFromStateJson = parseSemanticEntryRefsFromStateJsonStrict;
|
|
14
12
|
|
|
15
13
|
export function parseSemanticEntryRefsFromStateRecord(
|
|
16
14
|
stateRecord: Record<string, unknown>,
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
decodeWorkerToServerMessage,
|
|
5
5
|
type IpcEnvelope,
|
|
6
6
|
type WorkerCredentialUpdateResultPayload,
|
|
7
|
+
type WorkerIntegrationToolCancelPayload,
|
|
8
|
+
type WorkerIntegrationToolRequestPayload,
|
|
9
|
+
type WorkerIntegrationToolResultPayload,
|
|
7
10
|
type WorkerTurnStartAcceptedPayload,
|
|
8
11
|
} from "@leitwerk-dev/worker-protocol";
|
|
9
12
|
import type { RepositoryBundle } from "../db/repositories.js";
|
|
@@ -46,6 +49,14 @@ export interface IpcHandlerDeps
|
|
|
46
49
|
expectedRevision: number;
|
|
47
50
|
values: Record<string, string>;
|
|
48
51
|
}) => { accepted: boolean; currentRevision: number | null; safeReason?: string };
|
|
52
|
+
handleIntegrationToolRequest?: (
|
|
53
|
+
instanceId: string,
|
|
54
|
+
payload: WorkerIntegrationToolRequestPayload,
|
|
55
|
+
) => Promise<WorkerIntegrationToolResultPayload>;
|
|
56
|
+
handleIntegrationToolCancel?: (
|
|
57
|
+
instanceId: string,
|
|
58
|
+
payload: WorkerIntegrationToolCancelPayload,
|
|
59
|
+
) => void;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
export interface IpcHandlerCallbacks {
|
|
@@ -69,6 +80,11 @@ export interface IpcHandlerCallbacks {
|
|
|
69
80
|
workerId: string,
|
|
70
81
|
payload: WorkerCredentialUpdateResultPayload,
|
|
71
82
|
) => void;
|
|
83
|
+
onIntegrationToolResult?: (
|
|
84
|
+
instanceId: string,
|
|
85
|
+
workerId: string,
|
|
86
|
+
payload: WorkerIntegrationToolResultPayload,
|
|
87
|
+
) => void;
|
|
72
88
|
}
|
|
73
89
|
|
|
74
90
|
export function createIpcHandler(deps: IpcHandlerDeps, callbacks: IpcHandlerCallbacks) {
|
|
@@ -103,6 +119,25 @@ export function createIpcHandler(deps: IpcHandlerDeps, callbacks: IpcHandlerCall
|
|
|
103
119
|
);
|
|
104
120
|
|
|
105
121
|
switch (msg.type) {
|
|
122
|
+
case "worker.integration_tool_cancel": {
|
|
123
|
+
deps.handleIntegrationToolCancel?.(instanceId, msg.payload);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case "worker.integration_tool_request": {
|
|
127
|
+
if (!deps.handleIntegrationToolRequest) break;
|
|
128
|
+
void deps
|
|
129
|
+
.handleIntegrationToolRequest(instanceId, msg.payload)
|
|
130
|
+
.then((payload) => callbacks.onIntegrationToolResult?.(instanceId, workerId, payload))
|
|
131
|
+
.catch(() =>
|
|
132
|
+
callbacks.onIntegrationToolResult?.(instanceId, workerId, {
|
|
133
|
+
turnRecordId: msg.payload.turnRecordId,
|
|
134
|
+
toolCallId: msg.payload.toolCallId,
|
|
135
|
+
ok: false,
|
|
136
|
+
error: "Integration tool execution failed",
|
|
137
|
+
}),
|
|
138
|
+
);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
106
141
|
case "worker.credential_update": {
|
|
107
142
|
const result = deps.updateCredential?.(msg.payload) ?? {
|
|
108
143
|
accepted: false,
|
|
@@ -47,6 +47,11 @@ export interface WorkerStartPayloadBuilderDeps
|
|
|
47
47
|
providerId: string,
|
|
48
48
|
options: Readonly<Record<string, string>>,
|
|
49
49
|
): { revision: number; values: Record<string, string> } | null;
|
|
50
|
+
integrationTools?: {
|
|
51
|
+
declarations(
|
|
52
|
+
names: readonly string[],
|
|
53
|
+
): import("@leitwerk-dev/worker-protocol").IntegrationToolDeclaration[];
|
|
54
|
+
};
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
export function buildWorkerRuntimeSettingsSnapshot(
|
|
@@ -296,6 +301,19 @@ export function createWorkerStartPayloadBuilder(deps: WorkerStartPayloadBuilderD
|
|
|
296
301
|
projects: deps.projects.listByInstance(process.id),
|
|
297
302
|
}) ?? [];
|
|
298
303
|
const bootstrap = resolveBootstrap(start, deps);
|
|
304
|
+
const selectedTurn = deps.processActionRegistry.getTurnDefinition(
|
|
305
|
+
process.processId,
|
|
306
|
+
start.turnId,
|
|
307
|
+
);
|
|
308
|
+
const integrationToolNames =
|
|
309
|
+
selectedTurn?.kind === "llm" ? (selectedTurn.integrationTools ?? []) : [];
|
|
310
|
+
const integrationTools =
|
|
311
|
+
integrationToolNames.length > 0
|
|
312
|
+
? deps.integrationTools?.declarations(integrationToolNames)
|
|
313
|
+
: undefined;
|
|
314
|
+
if (integrationToolNames.length > 0 && !integrationTools) {
|
|
315
|
+
throw new Error(`Integration tools are unavailable for turn '${start.turnId}'`);
|
|
316
|
+
}
|
|
299
317
|
const payloadBase = {
|
|
300
318
|
...contextSnapshot,
|
|
301
319
|
workerLeaseId: lease.id,
|
|
@@ -310,6 +328,7 @@ export function createWorkerStartPayloadBuilder(deps: WorkerStartPayloadBuilderD
|
|
|
310
328
|
workerRuntimeSettings: buildWorkerRuntimeSettingsSnapshot(deps.config),
|
|
311
329
|
...(treePaths.resume ? { resumeLeafEntryId } : {}),
|
|
312
330
|
...(repositoryCredentials.length > 0 ? { repositoryCredentials } : {}),
|
|
331
|
+
...(integrationTools && integrationTools.length > 0 ? { integrationTools } : {}),
|
|
313
332
|
};
|
|
314
333
|
const payload: WorkerStartPayload =
|
|
315
334
|
bootstrap.kind === "llm"
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
WORKER_SNAPSHOT_TOKEN_ENV,
|
|
21
21
|
type WorkerCredentialUpdateResultPayload,
|
|
22
22
|
type WorkerHelloPayload,
|
|
23
|
+
type WorkerIntegrationToolResultPayload,
|
|
23
24
|
type WorkerQuestionResponsePayload,
|
|
24
25
|
} from "@leitwerk-dev/worker-protocol";
|
|
25
26
|
import type {
|
|
@@ -79,6 +80,7 @@ export interface SupervisorDeps
|
|
|
79
80
|
serverEpoch?: string;
|
|
80
81
|
resolveResourceBundle?: (digest: string) => PiResourceBundle | null;
|
|
81
82
|
resolveRepositoryCredentials?: WorkerStartPayloadBuilderDeps["resolveRepositoryCredentials"];
|
|
83
|
+
integrationTools?: WorkerStartPayloadBuilderDeps["integrationTools"];
|
|
82
84
|
resolveCredential?: (
|
|
83
85
|
providerId: string,
|
|
84
86
|
options: Readonly<Record<string, string>>,
|
|
@@ -133,6 +135,11 @@ export interface WorkerSupervisor {
|
|
|
133
135
|
workerId: string,
|
|
134
136
|
payload: WorkerCredentialUpdateResultPayload,
|
|
135
137
|
): void;
|
|
138
|
+
integrationToolResult(
|
|
139
|
+
instanceId: string,
|
|
140
|
+
workerId: string,
|
|
141
|
+
payload: WorkerIntegrationToolResultPayload,
|
|
142
|
+
): void;
|
|
136
143
|
getWorker(instanceId: string): WorkerHandle | undefined;
|
|
137
144
|
isAdoptionPending(instanceId: string): boolean;
|
|
138
145
|
adoptRegisteredWorkers(): Promise<void>;
|
|
@@ -856,6 +863,12 @@ export function createWorkerSupervisor(deps: SupervisorDeps): WorkerSupervisor {
|
|
|
856
863
|
questionResponse(instanceId, workerId, payload) {
|
|
857
864
|
sendToCurrentWorker(instanceId, workerId, { type: "worker.question_response", payload });
|
|
858
865
|
},
|
|
866
|
+
integrationToolResult(instanceId, workerId, payload) {
|
|
867
|
+
sendToCurrentWorker(instanceId, workerId, {
|
|
868
|
+
type: "worker.integration_tool_result",
|
|
869
|
+
payload,
|
|
870
|
+
});
|
|
871
|
+
},
|
|
859
872
|
credentialUpdateResult(instanceId, workerId, payload) {
|
|
860
873
|
sendToCurrentWorker(instanceId, workerId, {
|
|
861
874
|
type: "worker.credential_update_accepted",
|
|
@@ -58,7 +58,7 @@ interface TestProcessState {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const testProcessGraphRegistry = createDefaultTestProcessGraphRegistry();
|
|
61
|
-
const
|
|
61
|
+
const ticketTurnGraph = getProcessGraph(testProcessGraphRegistry, "ticket_issue_process");
|
|
62
62
|
const mrPolishGraph = getProcessGraph(testProcessGraphRegistry, "mr_polish_process");
|
|
63
63
|
|
|
64
64
|
function parseReviewSubject(value: unknown): ReviewSubject | null {
|
|
@@ -246,7 +246,7 @@ const testTurns = new Map<string, TurnDefinition<Record<string, never>, TestProc
|
|
|
246
246
|
],
|
|
247
247
|
]);
|
|
248
248
|
|
|
249
|
-
const
|
|
249
|
+
const ticketTurnProcess = createTestProcess("ticket_issue_process", ticketTurnGraph, (api) => {
|
|
250
250
|
api.onTurnOutcome("generate_plan", async (event, ctx) => {
|
|
251
251
|
if (event.outcome !== "plan_saved") {
|
|
252
252
|
return;
|
|
@@ -348,7 +348,7 @@ const mrPolishProcess = createTestProcess("mr_polish_process", mrPolishGraph, (a
|
|
|
348
348
|
});
|
|
349
349
|
|
|
350
350
|
const testProcessGraphs = new Map<string, ExtensionProcessDefinition>([
|
|
351
|
-
[
|
|
351
|
+
[ticketTurnProcess.id, ticketTurnProcess as ExtensionProcessDefinition],
|
|
352
352
|
[mrPolishProcess.id, mrPolishProcess as ExtensionProcessDefinition],
|
|
353
353
|
]);
|
|
354
354
|
|
|
@@ -368,6 +368,9 @@ export function createTestIpcHandler(
|
|
|
368
368
|
opts: {
|
|
369
369
|
toastTtlMs?: number;
|
|
370
370
|
workerEventLogger?: Parameters<typeof createIpcHandler>[0]["workerEventLogger"];
|
|
371
|
+
handleIntegrationToolCancel?: Parameters<
|
|
372
|
+
typeof createIpcHandler
|
|
373
|
+
>[0]["handleIntegrationToolCancel"];
|
|
371
374
|
} = {},
|
|
372
375
|
) {
|
|
373
376
|
const processOperations = createProcessOperationCoordinator();
|
|
@@ -431,6 +434,7 @@ export function createTestIpcHandler(
|
|
|
431
434
|
events: deps.events,
|
|
432
435
|
leases: deps.leases,
|
|
433
436
|
turnRecords: deps.turnRecords,
|
|
437
|
+
handleIntegrationToolCancel: opts.handleIntegrationToolCancel,
|
|
434
438
|
processQuestions,
|
|
435
439
|
broadcaster: deps.broadcaster,
|
|
436
440
|
commands,
|
|
@@ -166,8 +166,8 @@ export function createDefaultTestProcessGraphRegistry(): ReadonlyMap<
|
|
|
166
166
|
string,
|
|
167
167
|
ExtensionProcessDefinition<unknown, unknown>
|
|
168
168
|
> {
|
|
169
|
-
const
|
|
170
|
-
id: "
|
|
169
|
+
const ticket = createFixtureProcess({
|
|
170
|
+
id: "ticket_issue_process",
|
|
171
171
|
entry: "generate_plan",
|
|
172
172
|
turns: {
|
|
173
173
|
generate_plan: createFixtureLlmTurn("generate_plan", {
|
|
@@ -263,7 +263,7 @@ export function createDefaultTestProcessGraphRegistry(): ReadonlyMap<
|
|
|
263
263
|
},
|
|
264
264
|
});
|
|
265
265
|
return createProcessGraphRegistry([
|
|
266
|
-
|
|
266
|
+
ticket as ExtensionProcessDefinition<unknown, unknown>,
|
|
267
267
|
mrPolish as ExtensionProcessDefinition<unknown, unknown>,
|
|
268
268
|
]);
|
|
269
269
|
}
|