@akanjs/devkit 2.3.9-rc.8 → 2.3.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @akanjs/devkit
2
2
 
3
+ ## 2.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - f518afd: Improve dictionary type inference and lint coverage for generated workspaces.
8
+ - 6bc2209: auto-select app when the workspace has only one app
9
+ - Updated dependencies [f518afd]
10
+ - Updated dependencies [f518afd]
11
+ - akanjs@2.3.9
12
+
3
13
  ## 2.3.6
4
14
 
5
15
  ### Patch Changes
@@ -10,7 +10,7 @@ import type {
10
10
  WorkflowDiagnostic,
11
11
  WorkflowPlanInputs,
12
12
  } from "./workflow";
13
- import { buildAkanModuleContextIndex, toolingRolloutGate } from "./workflow";
13
+ import { buildAkanModuleContextIndex, createWorkflowBaselineSummary, toolingRolloutGate } from "./workflow";
14
14
 
15
15
  export type McpToolDefinition = {
16
16
  name: string;
@@ -158,6 +158,8 @@ export const applyFirstPolicy = {
158
158
  mode: "apply-first",
159
159
  directSourceEdits: "fallback-only",
160
160
  applyRequiredWhen: ["plan_workflow returns planPath", "plan_workflow returns next.tool=apply_workflow"],
161
+ approvalMeaning:
162
+ "requiresApproval is an agent/user review signal before apply_workflow mutates files; it is not a separate MCP permission gate.",
161
163
  validationRequiredAfterApply: ["validationTarget", "applyReportPath"],
162
164
  fallbackAllowedWhen: [
163
165
  "list_workflows and explain_workflow show no matching workflow",
@@ -311,7 +313,12 @@ export const readonlyMcpTools: McpToolDefinition[] = [
311
313
  description: "Report workspace diagnostics, optionally split into baseline and workflow scopes.",
312
314
  inputSchema: {
313
315
  type: "object",
314
- properties: { strict: booleanProperty, runIdOrPlan: stringProperty, changedFiles: stringArrayProperty },
316
+ properties: {
317
+ strict: booleanProperty,
318
+ runIdOrPlan: stringProperty,
319
+ changedFiles: stringArrayProperty,
320
+ includeBaselineDetails: booleanProperty,
321
+ },
315
322
  },
316
323
  },
317
324
  {
@@ -359,7 +366,7 @@ export const applyMcpTools: McpToolDefinition[] = [
359
366
  description: "Validate a plan, apply report, validationTarget, or run artifact.",
360
367
  inputSchema: {
361
368
  type: "object",
362
- properties: { runIdOrPlan: stringProperty },
369
+ properties: { runIdOrPlan: stringProperty, includeBaselineDetails: booleanProperty },
363
370
  required: ["runIdOrPlan"],
364
371
  },
365
372
  },
@@ -409,7 +416,17 @@ export const createAkanValidationContract = (listTools = listAkanMcpTools) => ({
409
416
  validationStatuses: {
410
417
  sourceStatus: ["passed", "failed", "unknown"],
411
418
  workspaceStatus: ["passed", "failed", "unknown"],
412
- overallStatus: ["passed", "failed", "blocked-by-workspace-config", "blocked-by-environment"],
419
+ validationCommandsStatus: ["passed", "failed", "unknown"],
420
+ baselineStatus: ["passed", "failed", "unknown"],
421
+ overallStatus: [
422
+ "passed",
423
+ "failed",
424
+ "passed-with-baseline-blockers",
425
+ "blocked-by-workspace-config",
426
+ "blocked-by-environment",
427
+ ],
428
+ baselineSummary:
429
+ "Default MCP validation output summarizes baseline diagnostics; pass includeBaselineDetails=true for full baselineDiagnostics.",
413
430
  knownBlockers: "Repeated workspace-config/environment failures are summarized before command output.",
414
431
  },
415
432
  moduleContextInputs: {
@@ -420,6 +437,7 @@ export const createAkanValidationContract = (listTools = listAkanMcpTools) => ({
420
437
  toolingRolloutGate,
421
438
  directEditFallbackPolicy: applyFirstPolicy,
422
439
  applyReportFields: [
440
+ "summary",
423
441
  "appliedCommands",
424
442
  "recommendedValidationCommands",
425
443
  "commands",
@@ -484,8 +502,20 @@ export const inspectAkanContext = async (
484
502
  strict: true,
485
503
  runIdOrPlan: workspacePath(workspace, props.request.runIdOrPlan),
486
504
  });
505
+ const baselineSummary = createWorkflowBaselineSummary(
506
+ (doctor.baselineDiagnostics ?? []).map(
507
+ (diagnostic): WorkflowDiagnostic => ({
508
+ severity: diagnostic.severity,
509
+ code: diagnostic.code,
510
+ message: diagnostic.message,
511
+ scope: diagnostic.scope,
512
+ context: diagnostic.context,
513
+ }),
514
+ ),
515
+ { detailsIncluded: false },
516
+ );
487
517
  diagnostics.push(
488
- ...doctor.diagnostics.map(
518
+ ...(doctor.workflowDiagnostics ?? doctor.diagnostics).map(
489
519
  (diagnostic): WorkflowDiagnostic => ({
490
520
  severity: diagnostic.severity,
491
521
  code: diagnostic.code,
@@ -516,7 +546,8 @@ export const inspectAkanContext = async (
516
546
  },
517
547
  {
518
548
  status: doctor.status,
519
- baselineDiagnostics: doctor.baselineDiagnostics?.length ?? 0,
549
+ baselineSummary,
550
+ baselineDiagnostics: 0,
520
551
  workflowDiagnostics: doctor.workflowDiagnostics?.length ?? 0,
521
552
  },
522
553
  );
@@ -1,4 +1,5 @@
1
1
  import { cp, mkdir, rm } from "node:fs/promises";
2
+ import path from "node:path";
2
3
  import type { App } from "./commandDecorators";
3
4
  import { FileSys } from "./fileSys";
4
5
  import { uploadRelease } from "./uploadRelease";
@@ -61,13 +62,14 @@ export class ApplicationReleasePackager {
61
62
  await cp(this.#app.dist.cwdPath, buildRoot, { recursive: true });
62
63
  await rm(`${buildRoot}/frontend/.next`, { recursive: true, force: true });
63
64
 
64
- await this.#app.workspace.spawn("tar", [
65
- "-zcf",
66
- `${this.#app.workspace.workspaceRoot}/releases/builds/${this.#app.name}-release.tar.gz`,
67
- "-C",
68
- buildRoot,
69
- "./",
70
- ]);
65
+ const releaseRoot = this.#app.workspace.workspaceRoot;
66
+ // Pass a path relative to cwd so tar never sees a Windows drive letter (e.g. "C:\...")
67
+ // which GNU tar would interpret as a remote "host:file" spec.
68
+ const releaseArchivePath = path
69
+ .relative(releaseRoot, `${releaseRoot}/releases/builds/${this.#app.name}-release.tar.gz`)
70
+ .split(path.sep)
71
+ .join("/");
72
+ await this.#app.workspace.spawn("tar", ["-zcf", releaseArchivePath, "-C", buildRoot, "./"], { cwd: releaseRoot });
71
73
  await this.#writeCsrZipIfPresent();
72
74
  return { platformVersion };
73
75
  }
@@ -109,13 +111,14 @@ export class ApplicationReleasePackager {
109
111
  );
110
112
  await this.#writeSourceTsconfig(sourceRoot, libDeps);
111
113
  await Bun.write(`${sourceRoot}/README.md`, readme);
112
- await this.#app.workspace.spawn("tar", [
113
- "-zcf",
114
- `${this.#app.workspace.cwdPath}/releases/sources/${this.#app.name}-source.tar.gz`,
115
- "-C",
116
- sourceRoot,
117
- "./",
118
- ]);
114
+ const sourceCwd = this.#app.workspace.cwdPath;
115
+ // Pass a path relative to cwd so tar never sees a Windows drive letter (e.g. "C:\...")
116
+ // which GNU tar would interpret as a remote "host:file" spec.
117
+ const sourceArchivePath = path
118
+ .relative(sourceCwd, `${sourceCwd}/releases/sources/${this.#app.name}-source.tar.gz`)
119
+ .split(path.sep)
120
+ .join("/");
121
+ await this.#app.workspace.spawn("tar", ["-zcf", sourceArchivePath, "-C", sourceRoot, "./"], { cwd: sourceCwd });
119
122
  }
120
123
 
121
124
  async #resetSourceRoot(sourceRoot: string): Promise<void> {
package/index.ts CHANGED
@@ -27,6 +27,7 @@ export * from "./guideline";
27
27
  export * from "./incrementalBuilder";
28
28
  export * from "./mobile";
29
29
  export * from "./prompter";
30
+ export * from "./qualityScanner";
30
31
  export * from "./scanInfo";
31
32
  export * from "./selectModel";
32
33
  export * from "./spinner";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "2.3.9-rc.8",
3
+ "version": "2.3.9",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -32,7 +32,7 @@
32
32
  "@langchain/openai": "^1.4.6",
33
33
  "@tailwindcss/node": "^4.3.0",
34
34
  "@trapezedev/project": "^7.1.4",
35
- "akanjs": "2.3.9-rc.8",
35
+ "akanjs": "2.3.9",
36
36
  "chalk": "^5.6.2",
37
37
  "commander": "^14.0.3",
38
38
  "daisyui": "5.5.23",