@exreve/exk 1.0.67 → 1.0.69

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.
@@ -86,7 +86,7 @@ const PROVIDERS = {
86
86
  kimi: {
87
87
  apiKey: '',
88
88
  baseUrl: 'https://api.kimi.com/coding',
89
- models: ['kimi-k2.6'],
89
+ models: ['kimi-for-coding'],
90
90
  },
91
91
  };
92
92
  /** Rebuild PROVIDERS from the models array saved in ai-config.json */
@@ -164,8 +164,6 @@ async function writeDeviceConfigMerged(partial) {
164
164
  await fs.writeFile(DEVICE_CONFIG_FILE, JSON.stringify(out, null, 2));
165
165
  }
166
166
  async function maybeFetchAiConfigIfMissing() {
167
- if (hasAiCredentials())
168
- return;
169
167
  const jwt = await readDeviceAuthToken();
170
168
  if (!jwt)
171
169
  return;
@@ -176,11 +174,20 @@ async function maybeFetchAiConfigIfMissing() {
176
174
  }
177
175
  }
178
176
  function scheduleAiConfigSync(authToken) {
177
+ // Fetch immediately
179
178
  void fetchAiConfig(authToken).then((ok) => {
180
179
  if (!ok && !hasAiCredentials()) {
181
180
  console.warn('[CLI] AI config sync failed; check backend /config/ai and apiUrl.');
182
181
  }
183
182
  });
183
+ // Refresh every 5 minutes to pick up model config changes
184
+ setInterval(() => {
185
+ void fetchAiConfig(authToken).then((ok) => {
186
+ if (!ok && !hasAiCredentials()) {
187
+ console.warn('[CLI] AI config sync failed; check backend /config/ai and apiUrl.');
188
+ }
189
+ });
190
+ }, 5 * 60 * 1000);
184
191
  }
185
192
  async function getDeviceId() {
186
193
  try {
package/dist/cli/index.js CHANGED
@@ -162,10 +162,8 @@ async function writeDeviceConfigMerged(partial) {
162
162
  await fs.mkdir(CONFIG_DIR, { recursive: true });
163
163
  await fs.writeFile(DEVICE_CONFIG_FILE, JSON.stringify(out, null, 2));
164
164
  }
165
- /** If AI cache is empty but we have a device JWT, try GET /config/ai once (non-fatal). */
165
+ /** If AI cache is empty but we have a device JWT, try GET /config/ai (non-fatal). */
166
166
  async function maybeFetchAiConfigIfMissing() {
167
- if (hasAiCredentials())
168
- return;
169
167
  const jwt = await readDeviceAuthToken();
170
168
  if (!jwt)
171
169
  return;
@@ -176,11 +174,20 @@ async function maybeFetchAiConfigIfMissing() {
176
174
  }
177
175
  }
178
176
  function scheduleAiConfigSync(authToken) {
177
+ // Fetch immediately
179
178
  void fetchAiConfig(authToken).then((ok) => {
180
179
  if (!ok && !hasAiCredentials()) {
181
180
  console.warn('[CLI] AI config sync failed; check backend /config/ai and apiUrl.');
182
181
  }
183
182
  });
183
+ // Refresh every 5 minutes to pick up model config changes
184
+ setInterval(() => {
185
+ void fetchAiConfig(authToken).then((ok) => {
186
+ if (!ok && !hasAiCredentials()) {
187
+ console.warn('[CLI] AI config sync failed; check backend /config/ai and apiUrl.');
188
+ }
189
+ });
190
+ }, 5 * 60 * 1000);
184
191
  }
185
192
  async function getDeviceId() {
186
193
  try {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exreve/exk",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "description": "exk - Control Claude CLI with voice and programmable interfaces",
5
5
  "type": "module",
6
6
  "bin": {