@geraldmaron/construct 1.2.2 → 1.2.3

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/lib/setup.mjs CHANGED
@@ -3,8 +3,8 @@
3
3
  * lib/setup.mjs — Machine-scoped first-run setup wizard for Construct.
4
4
  *
5
5
  * Installs cm/cass, configures managed defaults, pre-warms the embedding model,
6
- * wires MCP integrations, and writes ~/.construct/config.env.
7
- * Invoked by `construct install` and by lib/install/first-invocation.mjs
6
+ * wires MCP integrations, and writes the XDG user config (~/.config/construct/config.env).
7
+ * Invoked by `construct install` and by lib/install/first-invocation.mjs
8
8
  * when a TTY user is missing resources.
9
9
  *
10
10
  * Project-scoped scaffolding (`.cx/`, AGENTS.md, plan.md, adapters) lives
@@ -22,6 +22,7 @@ import path from 'node:path';
22
22
  import { spawn, spawnSync } from 'node:child_process';
23
23
 
24
24
  import { ensureUserConfigDir, getUserEnvPath, writeEnvValues } from './env-config.mjs';
25
+ import { migrateLegacyModelConfig } from './config/legacy-config-migration.mjs';
25
26
  import { configDir, stateDir, doctorRoot } from './config/xdg.mjs';
26
27
  import { DEFAULT_WORKSPACE_PATH, WORKSPACE_DOCS_LANES } from './embed/config.mjs';
27
28
  import {
@@ -65,7 +66,7 @@ Flags:
65
66
  before setup; does not uninstall a global construct CLI
66
67
 
67
68
  What --scope=user does:
68
- - creates ~/.construct/config.env
69
+ - creates ~/.config/construct/config.env
69
70
  - ensures OpenCode config exists
70
71
  - configures managed defaults for local vector retrieval (LanceDB)
71
72
  - checks required runtime tools and installs cm and cass when available
@@ -408,6 +409,14 @@ export async function runSetup({ rootDir = ROOT_DIR, args = [], homeDir = HOME }
408
409
  return;
409
410
  }
410
411
 
412
+ // Forward-migrate model tier overrides stranded in the pre-XDG legacy config
413
+ // before any legacy-global cleanup deletes ~/.construct, so an upgrade keeps
414
+ // the user's tier selection without a manual copy.
415
+ const modelMigration = migrateLegacyModelConfig({ homeDir });
416
+ if (modelMigration.performed) {
417
+ console.log(`Migrated ${Object.keys(modelMigration.migrated).join(', ')} from ${modelMigration.legacyPath} → ${modelMigration.xdgPath}`);
418
+ }
419
+
411
420
  if (cleanupLegacyGlobal) {
412
421
  runLegacyGlobalCleanup({ homeDir, dryRun: false });
413
422
  if (scope === 'project') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geraldmaron/construct",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "packageManager": "npm@11.5.1",
6
6
  "description": "Construct — agent orchestration layer for OpenCode, Claude Code, and other coding surfaces",
@@ -17,6 +17,7 @@
17
17
  "bin/construct",
18
18
  "bin/construct-postinstall.mjs",
19
19
  "lib/**",
20
+ "apps/chat/engine/**",
20
21
  "specialists/**",
21
22
  "examples/**",
22
23
  "personas/**",