@leitwerk-dev/process-analysis 0.1.0 → 0.1.2

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/index.d.ts CHANGED
@@ -1,17 +1,121 @@
1
- import { type LeitwerkExtensionModule } from "@leitwerk-dev/process-sdk";
2
- export declare const manifest: {
1
+ import * as _leitwerk_dev_process_sdk from '@leitwerk-dev/process-sdk';
2
+ import { Codec, LauncherValidationError, StructuralProcessState, ProcessLaunchExecutorLike, LeitwerkExtensionModule } from '@leitwerk-dev/process-sdk';
3
+ import { LocalRepoChangeLaunchPlanner } from '@leitwerk-dev/local-repo-change';
4
+
5
+ declare const processAnalysisActionIds: {
6
+ readonly completeAnalysis: "complete_analysis";
7
+ readonly askFollowup: "ask_followup";
8
+ readonly refineAnalysis: "refine_analysis";
9
+ readonly refreshSnapshot: "refresh_snapshot";
10
+ readonly startLocalRepoChange: "start_local_repo_change";
11
+ };
12
+ declare const followupForm: {
13
+ id: string;
14
+ title: string;
15
+ fields: {
16
+ id: string;
17
+ label: string;
18
+ kind: "textarea";
19
+ primaryPrompt: true;
20
+ required: boolean;
21
+ }[];
22
+ submitLabel: string;
23
+ };
24
+ declare const handoffForm: {
25
+ id: string;
26
+ title: string;
27
+ fields: {
28
+ id: string;
29
+ label: string;
30
+ kind: "textarea";
31
+ primaryPrompt: true;
32
+ description: string;
33
+ }[];
34
+ submitLabel: string;
35
+ };
36
+
37
+ interface ProcessAnalysisParams {
38
+ processRef: string;
39
+ instruction: string;
40
+ /** Hidden launch param: absolute directory where the server was started. */
41
+ analysisCwd: string;
42
+ }
43
+ declare const processAnalysisParamsCodec: Codec<ProcessAnalysisParams>;
44
+ /** Visible fields validated at launch time. analysisCwd is merged by the launcher. */
45
+ type VisibleProcessAnalysisParams = Omit<ProcessAnalysisParams, "analysisCwd">;
46
+ declare function validateProcessAnalysisLaunchInput(input: Record<string, unknown>): {
47
+ ok: true;
48
+ value: VisibleProcessAnalysisParams;
49
+ } | {
50
+ ok: false;
51
+ errors: readonly LauncherValidationError[];
52
+ };
53
+
54
+ interface ProcessAnalysisSnapshotState {
55
+ sourceProcessId: string;
56
+ apiUrl: string;
57
+ snapshotDir: string;
58
+ primaryPath?: unknown;
59
+ downloadedAt: string;
60
+ }
61
+ interface ProcessAnalysisState extends StructuralProcessState {
62
+ snapshot: ProcessAnalysisSnapshotState | null;
63
+ pendingHandoffInput: Record<string, unknown> | null;
64
+ }
65
+ declare const processAnalysisStateCodec: Codec<ProcessAnalysisState>;
66
+
67
+ declare function createProcessAnalysisProcess(launchPlanner?: LocalRepoChangeLaunchPlanner): _leitwerk_dev_process_sdk.ProcessDefinition<ProcessAnalysisParams, ProcessAnalysisState>;
68
+ declare const processAnalysisProcess: _leitwerk_dev_process_sdk.ProcessDefinition<ProcessAnalysisParams, ProcessAnalysisState>;
69
+ declare const processAnalysisTurnIds: {
70
+ readonly downloadProcess: "download_process";
71
+ readonly analyzeProcess: "analyze_process";
72
+ readonly analysisDecision: "analysis_decision";
73
+ readonly handoff: "handoff_local_repo_change";
74
+ };
75
+
76
+ interface ResolvedProcessRef {
77
+ id: string;
78
+ origin: string;
79
+ apiUrl: string;
80
+ }
81
+ declare function resolveProcessRef(input: {
82
+ processRef: string;
83
+ serverBaseUrl: string;
84
+ }): ResolvedProcessRef;
85
+
86
+ interface ProcessAnalysisRuntime {
87
+ analysisCwd: string;
88
+ serverBaseUrl: string;
89
+ processWorkspacesDir: string | null;
90
+ processLaunches: ProcessLaunchExecutorLike | null;
91
+ }
92
+ declare function configureProcessAnalysisRuntime(overrides: Partial<ProcessAnalysisRuntime>): void;
93
+ declare function getProcessAnalysisRuntime(): ProcessAnalysisRuntime;
94
+ interface ProcessAnalysisRuntimeRepoConfig {
95
+ repoLocator: string;
96
+ baseBranch: string;
97
+ }
98
+ declare function isProcessAnalysisRuntimeGitRepo(): Promise<boolean>;
99
+ declare function resolveProcessAnalysisRuntimeRepoConfig(): Promise<ProcessAnalysisRuntimeRepoConfig>;
100
+
101
+ declare function downloadProcessSnapshot(input: {
102
+ analysisProcessId: string;
103
+ processRef: string;
104
+ }): Promise<ProcessAnalysisSnapshotState>;
105
+
106
+ declare function jsonMarkdown(title: string, value: unknown): string;
107
+ declare function buildSummaryMarkdown(input: {
108
+ detail: unknown;
109
+ primaryPath: unknown;
110
+ sourceUrl: string;
111
+ }): string;
112
+ declare function buildRecordsMarkdown(title: string, value: unknown): string;
113
+
114
+ declare const manifest: {
3
115
  readonly id: "process-analysis";
4
116
  readonly version: "0.1.0";
5
117
  readonly optional: readonly ["local-repo-change"];
6
118
  };
7
119
  declare const processAnalysisExtension: LeitwerkExtensionModule;
8
- export default processAnalysisExtension;
9
- export * from "./actions.js";
10
- export * from "./params.js";
11
- export * from "./process-definition.js";
12
- export * from "./process-ref.js";
13
- export * from "./server-runtime.js";
14
- export * from "./snapshot-downloader.js";
15
- export * from "./snapshot-markdown.js";
16
- export * from "./state.js";
17
- //# sourceMappingURL=index.d.ts.map
120
+
121
+ export { type ProcessAnalysisParams, type ProcessAnalysisRuntime, type ProcessAnalysisRuntimeRepoConfig, type ProcessAnalysisSnapshotState, type ProcessAnalysisState, type ResolvedProcessRef, type VisibleProcessAnalysisParams, buildRecordsMarkdown, buildSummaryMarkdown, configureProcessAnalysisRuntime, createProcessAnalysisProcess, processAnalysisExtension as default, downloadProcessSnapshot, followupForm, getProcessAnalysisRuntime, handoffForm, isProcessAnalysisRuntimeGitRepo, jsonMarkdown, manifest, processAnalysisActionIds, processAnalysisParamsCodec, processAnalysisProcess, processAnalysisStateCodec, processAnalysisTurnIds, resolveProcessAnalysisRuntimeRepoConfig, resolveProcessRef, validateProcessAnalysisLaunchInput };