@katlux/toolkit 0.1.1-alpha.142 → 0.1.1-alpha.143

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.
@@ -225,6 +225,22 @@ if (existsSync(vscodeDir)) {
225
225
  log(GREEN, ' configured', '.vscode/mcp.json (VS Code MCP server enabled)')
226
226
  }
227
227
 
228
+ // ── 6. Inject AI-Condensed Typechecker Script (`npm run ai:check`) ─────────────
229
+ const pkgJsonPath = resolve(projectRoot, 'package.json')
230
+ if (existsSync(pkgJsonPath)) {
231
+ try {
232
+ const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'))
233
+ if (!pkg.scripts) pkg.scripts = {}
234
+ if (!pkg.scripts['ai:check']) {
235
+ pkg.scripts['ai:check'] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15"
236
+ writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + '\n', 'utf-8')
237
+ log(GREEN, ' injected', 'package.json "ai:check" script (token-efficient typechecker)')
238
+ }
239
+ } catch {
240
+ // Ignore package.json read/parse errors
241
+ }
242
+ }
243
+
228
244
  // ── Done ─────────────────────────────────────────────────────────────────────
229
245
  console.log()
230
246
  log(GREEN, '[katlux-add-ref] ✔', `Done! ${installedFilesCount} skill files (including atomic components & providers) + index installed and MCP server configured.`)
@@ -236,6 +252,7 @@ console.log(` ${CYAN}Index:${RESET} .agents/skills/KATLUX_INDEX.md ${DIM}(aut
236
252
  console.log(` ${CYAN}MCP:${RESET} @katlux/mcp server ready on stdio`)
237
253
  console.log()
238
254
  console.log(` ${YELLOW}Next:${RESET} Add your project-specific rules to ${CYAN}.agents/rules/rules.md${RESET}`)
255
+ console.log(` ${YELLOW}💡 AI Token Tip:${RESET} If using Vitest, run with ${CYAN}--reporter=agent${RESET} or ${CYAN}--changed${RESET} during AI pairing to suppress passing logs and save context tokens.`)
239
256
  console.log()
240
257
  console.log(` Re-run any time to update to the latest version:`)
241
258
  console.log(` ${CYAN}npx @katlux/toolkit katlux-add-ref${RESET}`)
@@ -10,7 +10,7 @@
10
10
  * npx @katlux/toolkit create-preset cyber-brand --base=modern
11
11
  */
12
12
 
13
- import { existsSync, mkdirSync, writeFileSync } from 'fs'
13
+ import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs'
14
14
  import { resolve, join, relative } from 'path'
15
15
 
16
16
  const RESET = '\x1b[0m'
@@ -438,6 +438,21 @@ export function createPreset({ name, base = null, cwd = process.cwd() }) {
438
438
 
439
439
  writeFileSync(cssVarsFile, scssContent, 'utf-8')
440
440
 
441
+ // Optionally ensure ai:check is present in consumer package.json for token-efficient typechecking
442
+ let injectedAiCheck = false
443
+ const pkgJsonPath = resolve(cwd, 'package.json')
444
+ if (existsSync(pkgJsonPath)) {
445
+ try {
446
+ const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'))
447
+ if (!pkg.scripts) pkg.scripts = {}
448
+ if (!pkg.scripts['ai:check']) {
449
+ pkg.scripts['ai:check'] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15"
450
+ writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + '\n', 'utf-8')
451
+ injectedAiCheck = true
452
+ }
453
+ } catch {}
454
+ }
455
+
441
456
  return {
442
457
  presetName: trimmedName,
443
458
  basePreset: base ? base.trim().toLowerCase() : null,
@@ -446,6 +461,7 @@ export function createPreset({ name, base = null, cwd = process.cwd() }) {
446
461
  componentsDir,
447
462
  cssVarsFile,
448
463
  hasAppDir,
464
+ injectedAiCheck,
449
465
  }
450
466
  }
451
467
 
@@ -521,6 +537,9 @@ ${BOLD}Examples:${RESET}
521
537
  console.log(` ${CYAN}Directory:${RESET} ${relTarget}`)
522
538
  console.log(` ${CYAN}Tokens File:${RESET} ${relFile}`)
523
539
  console.log(` ${CYAN}Components:${RESET} ${relComponents} (empty for custom overrides)`)
540
+ if (result.injectedAiCheck) {
541
+ console.log(` ${CYAN}Diagnostics:${RESET} Injected "ai:check" script into package.json (token-efficient typechecker)`)
542
+ }
524
543
  console.log()
525
544
 
526
545
  const presetTitle = toTitleCase(result.presetName)
package/dist/module.cjs CHANGED
@@ -43,6 +43,150 @@ const module$1 = kit.defineNuxtModule({
43
43
  global: true
44
44
  });
45
45
  kit.addImportsDir(resolve("./runtime/composables"));
46
+ const providerRuntimeExports = [
47
+ // Data Providers
48
+ "CFlatClientDataProvider",
49
+ "CFlatServerDataProvider",
50
+ "CAPIFlatClientDataProvider",
51
+ "CAPIFlatServerDataProvider",
52
+ "CTreeClientDataProvider",
53
+ "CTreeServerDataProvider",
54
+ "CAPITreeClientDataProvider",
55
+ "CAPITreeServerDataProvider",
56
+ "ADataProvider",
57
+ "AEncryptedClientProvider",
58
+ "AAPIDataProvider",
59
+ // Encryption & Security
60
+ "CWebCryptoEncryptionProvider",
61
+ "CWebCryptoAESCBCProvider",
62
+ "CECDHEncryptionProvider",
63
+ "CRSAEncryptionProvider",
64
+ "CNodeCryptoEncryptionProvider",
65
+ "AEncryptionProvider",
66
+ "CKeyManager",
67
+ "CSearchIndex",
68
+ "CWebCryptoStreamCipher",
69
+ "CKeyPinningStore",
70
+ "isEncrypted",
71
+ "createEncryptionProvider",
72
+ "rewriteEncryptedFilters",
73
+ "reencryptDataset",
74
+ // HTTP, Cache & Queue Providers
75
+ "RequestProvider",
76
+ "RequestQueue",
77
+ "RequestProviderRegistry",
78
+ "QueueStorageFactory",
79
+ "CApplicationCache",
80
+ "CBrowserSessionCache",
81
+ "CServerSessionCache",
82
+ "CMemoryCache",
83
+ "CLocalStorageCache",
84
+ "CIndexedDBCache",
85
+ "CCookieCache",
86
+ "CacheProviderFactory",
87
+ "KatluxIndexedDB",
88
+ // Runtime Enums
89
+ "ECacheStrategy",
90
+ "EDataFilterOperator",
91
+ "EQueueStorage"
92
+ ];
93
+ let providersImportPath = "@katlux/providers";
94
+ try {
95
+ providersImportPath = await kit.resolvePath("@katlux/providers");
96
+ } catch {
97
+ try {
98
+ providersImportPath = kit.resolveModule("@katlux/providers");
99
+ } catch {
100
+ }
101
+ }
102
+ kit.addImports(
103
+ providerRuntimeExports.map((name) => ({
104
+ name,
105
+ as: name,
106
+ from: providersImportPath
107
+ }))
108
+ );
109
+ kit.addServerImports(
110
+ providerRuntimeExports.map((name) => ({
111
+ name,
112
+ as: name,
113
+ from: "@katlux/providers"
114
+ }))
115
+ );
116
+ kit.addTypeTemplate({
117
+ filename: "types/katlux-providers-global.d.ts",
118
+ getContents: () => `
119
+ import type {
120
+ IDataFilter as _IDataFilter,
121
+ IDataSort as _IDataSort,
122
+ IDataResult as _IDataResult,
123
+ IDataProviderOptions as _IDataProviderOptions,
124
+ IDataProviderState as _IDataProviderState,
125
+ TDataRow as _TDataRow,
126
+ TPageDataHandler as _TPageDataHandler,
127
+ TDataProviderListener as _TDataProviderListener,
128
+ TUnsubscribe as _TUnsubscribe,
129
+ ITreeNode as _ITreeNode,
130
+ ITreeNodeStatic as _ITreeNodeStatic,
131
+ ITreeDataProvider as _ITreeDataProvider,
132
+ ITreeDataProviderOptions as _ITreeDataProviderOptions,
133
+ TreePaginationMode as _TreePaginationMode,
134
+ TTreeRow as _TTreeRow,
135
+ IKDatatableAction as _IKDatatableAction,
136
+ KProductItemData as _KProductItemData,
137
+ KProductRowAction as _KProductRowAction,
138
+ ICacheEntry as _ICacheEntry,
139
+ ICacheQuotaOptions as _ICacheQuotaOptions,
140
+ ICookieCacheOptions as _ICookieCacheOptions,
141
+ IRequestOptions as _IRequestOptions,
142
+ IQueuedOperation as _IQueuedOperation,
143
+ IDeadLetterItem as _IDeadLetterItem,
144
+ IFlushOptions as _IFlushOptions,
145
+ IEncryptedPayload as _IEncryptedPayload,
146
+ IEncryptionContext as _IEncryptionContext,
147
+ IFieldEncryptionConfig as _IFieldEncryptionConfig,
148
+ IHybridKeyExport as _IHybridKeyExport,
149
+ IExportedKeyStore as _IExportedKeyStore,
150
+ ISearchIndexDump as _ISearchIndexDump
151
+ } from '@katlux/providers'
152
+
153
+ declare global {
154
+ type IDataFilter = _IDataFilter
155
+ type IDataSort = _IDataSort
156
+ type IDataResult<TRow = _TDataRow> = _IDataResult<TRow>
157
+ type IDataProviderOptions<TRow = _TDataRow> = _IDataProviderOptions
158
+ type IDataProviderState<TRow = _TDataRow> = _IDataProviderState<TRow>
159
+ type TDataRow = _TDataRow
160
+ type TPageDataHandler<TRow = _TDataRow> = _TPageDataHandler<TRow>
161
+ type TDataProviderListener<T = unknown> = _TDataProviderListener<T>
162
+ type TUnsubscribe = _TUnsubscribe
163
+ type ITreeNode<TRow = _TDataRow> = _ITreeNode<TRow>
164
+ type ITreeNodeStatic<TRow = _TDataRow> = _ITreeNodeStatic<TRow>
165
+ type ITreeDataProvider<TRow = _TDataRow> = _ITreeDataProvider<TRow>
166
+ type ITreeDataProviderOptions = _ITreeDataProviderOptions
167
+ type TreePaginationMode = _TreePaginationMode
168
+ type TTreeRow<TRow = _TDataRow> = _TTreeRow<TRow>
169
+ type IKDatatableAction = _IKDatatableAction
170
+ type KProductItemData = _KProductItemData
171
+ type KProductRowAction = _KProductRowAction
172
+ type ICacheEntry<T = any> = _ICacheEntry<T>
173
+ type ICacheQuotaOptions = _ICacheQuotaOptions
174
+ type ICookieCacheOptions = _ICookieCacheOptions
175
+ type IRequestOptions = _IRequestOptions
176
+ type IQueuedOperation = _IQueuedOperation
177
+ type IDeadLetterItem = _IDeadLetterItem
178
+ type IFlushOptions = _IFlushOptions
179
+ type IEncryptedPayload = _IEncryptedPayload
180
+ type IEncryptionContext = _IEncryptionContext
181
+ type IFieldEncryptionConfig = _IFieldEncryptionConfig
182
+ type IHybridKeyExport = _IHybridKeyExport
183
+ type IExportedKeyStore = _IExportedKeyStore
184
+ type ISearchIndexDump = _ISearchIndexDump
185
+ }
186
+
187
+ export {}
188
+ `
189
+ });
46
190
  kit.addPlugin(resolve("./runtime/plugins/registerDirectives"));
47
191
  kit.addPlugin(resolve("./runtime/plugins/PresetPlugin"));
48
192
  kit.addPlugin(resolve("./runtime/plugins/nuxtCompatPlugin"));
@@ -122,6 +266,12 @@ export default defineNuxtPlugin(() => {
122
266
  nuxt.hook("prepare:types", (options2) => {
123
267
  options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
124
268
  options2.tsConfig.compilerOptions.allowArbitraryExtensions = true;
269
+ if (!options2.references.some((ref) => ref?.types === "@katlux/providers/global")) {
270
+ options2.references.push({ types: "@katlux/providers/global" });
271
+ }
272
+ if (!options2.references.some((ref) => ref?.path?.includes("katlux-providers-global.d.ts"))) {
273
+ options2.references.push({ path: "./types/katlux-providers-global.d.ts" });
274
+ }
125
275
  });
126
276
  if (nuxt.options.dev && options.autoAiReference !== false) {
127
277
  try {
@@ -211,11 +361,12 @@ This file serves as the main entry point for AI agents to understand the workspa
211
361
 
212
362
  ## Katlux Code Standards
213
363
 
214
- 1. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
215
- 2. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
216
- 3. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
217
- 4. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
218
- 5. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
364
+ 1. **Zero-Import Standard**: All \`K*\` components (\`KDatatable\`, \`KModal\`, etc.), \`C*\` provider classes (\`CAPIFlatServerDataProvider\`, \`CFlatClientDataProvider\`, etc.), and \`E*\` enums (\`ECacheStrategy\`, \`EDataFilterOperator\`) are globally auto-imported by the Nuxt module. **DO NOT generate top-level import statements for Katlux components, providers, or enums in Vue SFC files.**
365
+ 2. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
366
+ 3. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
367
+ 4. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
368
+ 5. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
369
+ 6. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
219
370
  `, "utf-8");
220
371
  }
221
372
  const KATLUX_MCP_SERVER = { command: "npx", args: ["-y", "@katlux/mcp"] };
@@ -241,6 +392,18 @@ This file serves as the main entry point for AI agents to understand the workspa
241
392
  if (node_fs.existsSync(vscodeDir)) {
242
393
  updateMcpConfig(resolve(vscodeDir, "mcp.json"));
243
394
  }
395
+ const pkgJsonPath = resolve(rootDir, "package.json");
396
+ if (node_fs.existsSync(pkgJsonPath)) {
397
+ try {
398
+ const pkg = JSON.parse(node_fs.readFileSync(pkgJsonPath, "utf-8"));
399
+ if (!pkg.scripts) pkg.scripts = {};
400
+ if (!pkg.scripts["ai:check"]) {
401
+ pkg.scripts["ai:check"] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15";
402
+ node_fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
403
+ }
404
+ } catch {
405
+ }
406
+ }
244
407
  console.log(`[Katlux] Auto-synced ${copied} AI skills and MCP server configuration to .agents/`);
245
408
  }
246
409
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.1-alpha.142",
4
+ "version": "0.1.1-alpha.143",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin, addServerHandler, addPluginTemplate } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, resolvePath, resolveModule, addImports, addServerImports, addTypeTemplate, addPlugin, addServerHandler, addPluginTemplate } from '@nuxt/kit';
2
2
  import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { createRequire } from 'node:module';
@@ -40,6 +40,150 @@ const module$1 = defineNuxtModule({
40
40
  global: true
41
41
  });
42
42
  addImportsDir(resolve("./runtime/composables"));
43
+ const providerRuntimeExports = [
44
+ // Data Providers
45
+ "CFlatClientDataProvider",
46
+ "CFlatServerDataProvider",
47
+ "CAPIFlatClientDataProvider",
48
+ "CAPIFlatServerDataProvider",
49
+ "CTreeClientDataProvider",
50
+ "CTreeServerDataProvider",
51
+ "CAPITreeClientDataProvider",
52
+ "CAPITreeServerDataProvider",
53
+ "ADataProvider",
54
+ "AEncryptedClientProvider",
55
+ "AAPIDataProvider",
56
+ // Encryption & Security
57
+ "CWebCryptoEncryptionProvider",
58
+ "CWebCryptoAESCBCProvider",
59
+ "CECDHEncryptionProvider",
60
+ "CRSAEncryptionProvider",
61
+ "CNodeCryptoEncryptionProvider",
62
+ "AEncryptionProvider",
63
+ "CKeyManager",
64
+ "CSearchIndex",
65
+ "CWebCryptoStreamCipher",
66
+ "CKeyPinningStore",
67
+ "isEncrypted",
68
+ "createEncryptionProvider",
69
+ "rewriteEncryptedFilters",
70
+ "reencryptDataset",
71
+ // HTTP, Cache & Queue Providers
72
+ "RequestProvider",
73
+ "RequestQueue",
74
+ "RequestProviderRegistry",
75
+ "QueueStorageFactory",
76
+ "CApplicationCache",
77
+ "CBrowserSessionCache",
78
+ "CServerSessionCache",
79
+ "CMemoryCache",
80
+ "CLocalStorageCache",
81
+ "CIndexedDBCache",
82
+ "CCookieCache",
83
+ "CacheProviderFactory",
84
+ "KatluxIndexedDB",
85
+ // Runtime Enums
86
+ "ECacheStrategy",
87
+ "EDataFilterOperator",
88
+ "EQueueStorage"
89
+ ];
90
+ let providersImportPath = "@katlux/providers";
91
+ try {
92
+ providersImportPath = await resolvePath("@katlux/providers");
93
+ } catch {
94
+ try {
95
+ providersImportPath = resolveModule("@katlux/providers");
96
+ } catch {
97
+ }
98
+ }
99
+ addImports(
100
+ providerRuntimeExports.map((name) => ({
101
+ name,
102
+ as: name,
103
+ from: providersImportPath
104
+ }))
105
+ );
106
+ addServerImports(
107
+ providerRuntimeExports.map((name) => ({
108
+ name,
109
+ as: name,
110
+ from: "@katlux/providers"
111
+ }))
112
+ );
113
+ addTypeTemplate({
114
+ filename: "types/katlux-providers-global.d.ts",
115
+ getContents: () => `
116
+ import type {
117
+ IDataFilter as _IDataFilter,
118
+ IDataSort as _IDataSort,
119
+ IDataResult as _IDataResult,
120
+ IDataProviderOptions as _IDataProviderOptions,
121
+ IDataProviderState as _IDataProviderState,
122
+ TDataRow as _TDataRow,
123
+ TPageDataHandler as _TPageDataHandler,
124
+ TDataProviderListener as _TDataProviderListener,
125
+ TUnsubscribe as _TUnsubscribe,
126
+ ITreeNode as _ITreeNode,
127
+ ITreeNodeStatic as _ITreeNodeStatic,
128
+ ITreeDataProvider as _ITreeDataProvider,
129
+ ITreeDataProviderOptions as _ITreeDataProviderOptions,
130
+ TreePaginationMode as _TreePaginationMode,
131
+ TTreeRow as _TTreeRow,
132
+ IKDatatableAction as _IKDatatableAction,
133
+ KProductItemData as _KProductItemData,
134
+ KProductRowAction as _KProductRowAction,
135
+ ICacheEntry as _ICacheEntry,
136
+ ICacheQuotaOptions as _ICacheQuotaOptions,
137
+ ICookieCacheOptions as _ICookieCacheOptions,
138
+ IRequestOptions as _IRequestOptions,
139
+ IQueuedOperation as _IQueuedOperation,
140
+ IDeadLetterItem as _IDeadLetterItem,
141
+ IFlushOptions as _IFlushOptions,
142
+ IEncryptedPayload as _IEncryptedPayload,
143
+ IEncryptionContext as _IEncryptionContext,
144
+ IFieldEncryptionConfig as _IFieldEncryptionConfig,
145
+ IHybridKeyExport as _IHybridKeyExport,
146
+ IExportedKeyStore as _IExportedKeyStore,
147
+ ISearchIndexDump as _ISearchIndexDump
148
+ } from '@katlux/providers'
149
+
150
+ declare global {
151
+ type IDataFilter = _IDataFilter
152
+ type IDataSort = _IDataSort
153
+ type IDataResult<TRow = _TDataRow> = _IDataResult<TRow>
154
+ type IDataProviderOptions<TRow = _TDataRow> = _IDataProviderOptions
155
+ type IDataProviderState<TRow = _TDataRow> = _IDataProviderState<TRow>
156
+ type TDataRow = _TDataRow
157
+ type TPageDataHandler<TRow = _TDataRow> = _TPageDataHandler<TRow>
158
+ type TDataProviderListener<T = unknown> = _TDataProviderListener<T>
159
+ type TUnsubscribe = _TUnsubscribe
160
+ type ITreeNode<TRow = _TDataRow> = _ITreeNode<TRow>
161
+ type ITreeNodeStatic<TRow = _TDataRow> = _ITreeNodeStatic<TRow>
162
+ type ITreeDataProvider<TRow = _TDataRow> = _ITreeDataProvider<TRow>
163
+ type ITreeDataProviderOptions = _ITreeDataProviderOptions
164
+ type TreePaginationMode = _TreePaginationMode
165
+ type TTreeRow<TRow = _TDataRow> = _TTreeRow<TRow>
166
+ type IKDatatableAction = _IKDatatableAction
167
+ type KProductItemData = _KProductItemData
168
+ type KProductRowAction = _KProductRowAction
169
+ type ICacheEntry<T = any> = _ICacheEntry<T>
170
+ type ICacheQuotaOptions = _ICacheQuotaOptions
171
+ type ICookieCacheOptions = _ICookieCacheOptions
172
+ type IRequestOptions = _IRequestOptions
173
+ type IQueuedOperation = _IQueuedOperation
174
+ type IDeadLetterItem = _IDeadLetterItem
175
+ type IFlushOptions = _IFlushOptions
176
+ type IEncryptedPayload = _IEncryptedPayload
177
+ type IEncryptionContext = _IEncryptionContext
178
+ type IFieldEncryptionConfig = _IFieldEncryptionConfig
179
+ type IHybridKeyExport = _IHybridKeyExport
180
+ type IExportedKeyStore = _IExportedKeyStore
181
+ type ISearchIndexDump = _ISearchIndexDump
182
+ }
183
+
184
+ export {}
185
+ `
186
+ });
43
187
  addPlugin(resolve("./runtime/plugins/registerDirectives"));
44
188
  addPlugin(resolve("./runtime/plugins/PresetPlugin"));
45
189
  addPlugin(resolve("./runtime/plugins/nuxtCompatPlugin"));
@@ -119,6 +263,12 @@ export default defineNuxtPlugin(() => {
119
263
  nuxt.hook("prepare:types", (options2) => {
120
264
  options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
121
265
  options2.tsConfig.compilerOptions.allowArbitraryExtensions = true;
266
+ if (!options2.references.some((ref) => ref?.types === "@katlux/providers/global")) {
267
+ options2.references.push({ types: "@katlux/providers/global" });
268
+ }
269
+ if (!options2.references.some((ref) => ref?.path?.includes("katlux-providers-global.d.ts"))) {
270
+ options2.references.push({ path: "./types/katlux-providers-global.d.ts" });
271
+ }
122
272
  });
123
273
  if (nuxt.options.dev && options.autoAiReference !== false) {
124
274
  try {
@@ -208,11 +358,12 @@ This file serves as the main entry point for AI agents to understand the workspa
208
358
 
209
359
  ## Katlux Code Standards
210
360
 
211
- 1. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
212
- 2. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
213
- 3. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
214
- 4. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
215
- 5. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
361
+ 1. **Zero-Import Standard**: All \`K*\` components (\`KDatatable\`, \`KModal\`, etc.), \`C*\` provider classes (\`CAPIFlatServerDataProvider\`, \`CFlatClientDataProvider\`, etc.), and \`E*\` enums (\`ECacheStrategy\`, \`EDataFilterOperator\`) are globally auto-imported by the Nuxt module. **DO NOT generate top-level import statements for Katlux components, providers, or enums in Vue SFC files.**
362
+ 2. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
363
+ 3. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
364
+ 4. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
365
+ 5. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
366
+ 6. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
216
367
  `, "utf-8");
217
368
  }
218
369
  const KATLUX_MCP_SERVER = { command: "npx", args: ["-y", "@katlux/mcp"] };
@@ -238,6 +389,18 @@ This file serves as the main entry point for AI agents to understand the workspa
238
389
  if (existsSync(vscodeDir)) {
239
390
  updateMcpConfig(resolve(vscodeDir, "mcp.json"));
240
391
  }
392
+ const pkgJsonPath = resolve(rootDir, "package.json");
393
+ if (existsSync(pkgJsonPath)) {
394
+ try {
395
+ const pkg = JSON.parse(readFileSync(pkgJsonPath, "utf-8"));
396
+ if (!pkg.scripts) pkg.scripts = {};
397
+ if (!pkg.scripts["ai:check"]) {
398
+ pkg.scripts["ai:check"] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15";
399
+ writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
400
+ }
401
+ } catch {
402
+ }
403
+ }
241
404
  console.log(`[Katlux] Auto-synced ${copied} AI skills and MCP server configuration to .agents/`);
242
405
  }
243
406
 
@@ -127,11 +127,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
127
127
  modelValue: string | Date;
128
128
  isOpen: boolean;
129
129
  label: string;
130
- validation: "error" | "success" | "warning" | null | undefined;
131
- validationText: string;
132
130
  definedDays: import("../KCalendar/types.js").IDefinedDay[];
133
131
  markedDays: import("../KCalendar/types.js").IMarkedDay[];
134
132
  day: string | Date;
133
+ validation: "error" | "success" | "warning" | null | undefined;
134
+ validationText: string;
135
135
  placeholder: string;
136
136
  teleportTo: string;
137
137
  showClear: boolean;
@@ -127,11 +127,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
127
127
  modelValue: string | Date;
128
128
  isOpen: boolean;
129
129
  label: string;
130
- validation: "error" | "success" | "warning" | null | undefined;
131
- validationText: string;
132
130
  definedDays: import("../KCalendar/types.js").IDefinedDay[];
133
131
  markedDays: import("../KCalendar/types.js").IMarkedDay[];
134
132
  day: string | Date;
133
+ validation: "error" | "success" | "warning" | null | undefined;
134
+ validationText: string;
135
135
  placeholder: string;
136
136
  teleportTo: string;
137
137
  showClear: boolean;
@@ -129,11 +129,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
129
129
  modelValue: string | Date;
130
130
  isOpen: boolean;
131
131
  label: string;
132
- validation: "error" | "success" | "warning" | null | undefined;
133
- validationText: string;
134
132
  definedDays: import("../KCalendar/types.js").IDefinedDay[];
135
133
  markedDays: import("../KCalendar/types.js").IMarkedDay[];
136
134
  day: string | Date;
135
+ validation: "error" | "success" | "warning" | null | undefined;
136
+ validationText: string;
137
137
  placeholder: string;
138
138
  teleportTo: string;
139
139
  showClear: boolean;
@@ -129,11 +129,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
129
129
  modelValue: string | Date;
130
130
  isOpen: boolean;
131
131
  label: string;
132
- validation: "error" | "success" | "warning" | null | undefined;
133
- validationText: string;
134
132
  definedDays: import("../KCalendar/types.js").IDefinedDay[];
135
133
  markedDays: import("../KCalendar/types.js").IMarkedDay[];
136
134
  day: string | Date;
135
+ validation: "error" | "success" | "warning" | null | undefined;
136
+ validationText: string;
137
137
  placeholder: string;
138
138
  teleportTo: string;
139
139
  showClear: boolean;
@@ -104,13 +104,13 @@ export default defineAppConfig({
104
104
 
105
105
  | Package Name | Current Version | Description | Installation Command |
106
106
  | --- | --- | --- | --- |
107
- | `@katlux/toolkit` | `0.1.1-alpha.141` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
108
- | `@katlux/providers` | `0.1.1-alpha.129` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
109
- | `@katlux/preset-modern` | `0.1.1-alpha.116` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
110
- | `@katlux/preset-dark` | `0.1.1-alpha.47` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
111
- | `@katlux/block-charts` | `0.1.1-alpha.116` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
112
- | `@katlux/block-ecommerce` | `0.1.1-alpha.116` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
113
- | `@katlux/mcp` | `0.1.0-alpha.21` | Model Context Protocol server for AI assistant integration | `npm install @katlux/mcp@alpha` |
107
+ | `@katlux/toolkit` | `0.1.1-alpha.142` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
108
+ | `@katlux/providers` | `0.1.1-alpha.130` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
109
+ | `@katlux/preset-modern` | `0.1.1-alpha.117` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
110
+ | `@katlux/preset-dark` | `0.1.1-alpha.48` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
111
+ | `@katlux/block-charts` | `0.1.1-alpha.117` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
112
+ | `@katlux/block-ecommerce` | `0.1.1-alpha.117` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
113
+ | `@katlux/mcp` | `0.1.0-alpha.22` | Model Context Protocol server for AI assistant integration | `npm install @katlux/mcp@alpha` |
114
114
 
115
115
  > [!NOTE]
116
116
  > Katlux packages are currently published under the `@alpha` tag on NPM. Always append `@alpha` or the specific version tag when adding dependencies.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.142",
3
+ "version": "0.1.1-alpha.143",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "**/*.sass"
55
55
  ],
56
56
  "dependencies": {
57
- "@katlux/providers": "^0.1.1-alpha.130",
57
+ "@katlux/providers": "^0.1.1-alpha.131",
58
58
  "@nuxt/kit": "^3.12.0",
59
59
  "@nuxtjs/i18n": "^10.4.0",
60
60
  "pug": "^3.0.0",