@akanjs/devkit 2.3.9-rc.7 → 2.3.9-rc.8

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/workflow/types.ts CHANGED
@@ -108,6 +108,133 @@ export interface WorkflowRecommendation {
108
108
  confidence?: "high" | "medium" | "low";
109
109
  }
110
110
 
111
+ export interface AkanSourceSpan {
112
+ file: string;
113
+ startLine: number;
114
+ endLine: number;
115
+ startOffset: number;
116
+ endOffset: number;
117
+ }
118
+
119
+ export type AkanIndexedFileKind =
120
+ | "abstract"
121
+ | "constant"
122
+ | "dictionary"
123
+ | "service"
124
+ | "signal"
125
+ | "store"
126
+ | "template"
127
+ | "unit"
128
+ | "util"
129
+ | "view"
130
+ | "zone"
131
+ | "other";
132
+
133
+ export interface AkanIndexedFile {
134
+ kind: AkanIndexedFileKind;
135
+ path: string;
136
+ expectedPath: string;
137
+ filename: string;
138
+ expectedFilename: string;
139
+ present: boolean;
140
+ casing: "match" | "mismatch" | "missing";
141
+ }
142
+
143
+ export type AkanFieldOutlineKind = "constant" | "dictionary" | "lightProjection";
144
+
145
+ export interface AkanFieldOutline {
146
+ name: string;
147
+ kind: AkanFieldOutlineKind;
148
+ order: number;
149
+ typeSummary?: string;
150
+ sourceSpan: AkanSourceSpan;
151
+ }
152
+
153
+ export interface AkanProjectionOutline {
154
+ className: string;
155
+ fields: AkanFieldOutline[];
156
+ sourceSpan?: AkanSourceSpan;
157
+ }
158
+
159
+ export interface AkanConstantIndex {
160
+ path: string;
161
+ inputClassName: string;
162
+ builderName: string | null;
163
+ fields: AkanFieldOutline[];
164
+ lightProjection?: AkanProjectionOutline;
165
+ sourceSpan?: AkanSourceSpan;
166
+ }
167
+
168
+ export interface AkanDictionaryIndex {
169
+ path: string;
170
+ modelClassName: string;
171
+ translatorName: string | null;
172
+ fields: AkanFieldOutline[];
173
+ sourceSpan?: AkanSourceSpan;
174
+ }
175
+
176
+ export interface AkanFieldPresence {
177
+ name: string;
178
+ requested: boolean;
179
+ constant: boolean;
180
+ dictionary: boolean;
181
+ lightProjection: boolean;
182
+ }
183
+
184
+ export interface AkanModuleContextIndex {
185
+ schemaVersion: 1;
186
+ app: string;
187
+ module: string;
188
+ moduleClassName: string;
189
+ files: AkanIndexedFile[];
190
+ fieldPresence: AkanFieldPresence[];
191
+ constant?: AkanConstantIndex;
192
+ dictionary?: AkanDictionaryIndex;
193
+ diagnostics: WorkflowDiagnostic[];
194
+ }
195
+
196
+ export type InspectAkanContextRequest =
197
+ | { type: "workspaceOverview" }
198
+ | { type: "moduleContext"; app: string; module: string }
199
+ | { type: "fieldInsertionContext"; app: string; module: string; field: string; fieldType: string }
200
+ | { type: "workflowDiagnostics"; runIdOrPlan: string }
201
+ | { type: "escape"; reason: string; nextStep?: string };
202
+
203
+ export interface InspectAkanContextProps {
204
+ question: string;
205
+ draft: {
206
+ reason: string;
207
+ type: InspectAkanContextRequest["type"];
208
+ };
209
+ review: string;
210
+ request: InspectAkanContextRequest;
211
+ }
212
+
213
+ export interface AkanContextEvidence {
214
+ kind: "workspace" | "module" | "field-insertion" | "workflow" | "escape";
215
+ summary: string;
216
+ path?: string;
217
+ target?: string;
218
+ sourceSpan?: AkanSourceSpan;
219
+ }
220
+
221
+ export interface AkanContextNext {
222
+ action: "answer" | "inspect" | "plan_workflow" | "validate" | "escape" | "clarify";
223
+ reason: string;
224
+ tool?: string;
225
+ args?: Record<string, unknown>;
226
+ }
227
+
228
+ export interface InspectAkanContextResult {
229
+ schemaVersion: 1;
230
+ type: InspectAkanContextRequest["type"];
231
+ question: string;
232
+ diagnostics: WorkflowDiagnostic[];
233
+ evidence: AkanContextEvidence[];
234
+ next: AkanContextNext;
235
+ data?: Record<string, unknown>;
236
+ }
237
+
111
238
  export interface WorkflowPlan {
112
239
  schemaVersion: 1;
113
240
  workflow: string;
@@ -184,6 +311,8 @@ export interface WorkflowPostApplyCheck {
184
311
  message: string;
185
312
  }
186
313
 
314
+ export type WorkflowNextActionCode = "answer" | "validate" | "manual-review" | "repair" | "blocked";
315
+
187
316
  export interface PrimitiveGeneratedFile {
188
317
  path: string;
189
318
  action: "sync";
@@ -198,6 +327,7 @@ export interface PrimitiveValidationCommand {
198
327
  export interface PrimitiveNextAction {
199
328
  command: string;
200
329
  reason: string;
330
+ action?: WorkflowNextActionCode;
201
331
  }
202
332
 
203
333
  export interface PrimitiveWriteReport {