@akanjs/cli 2.2.2-rc.0 → 2.2.3-rc.0

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,7 +225,6 @@ class CloudApi {
225
225
  });
226
226
  }
227
227
  async uploadEnv(devProjectId, file) {
228
- await this.#ensureAccessTokenLive();
229
228
  const formData = new FormData;
230
229
  formData.append("devProjectId", devProjectId);
231
230
  formData.append("file", file);
@@ -233,7 +232,6 @@ class CloudApi {
233
232
  return data;
234
233
  }
235
234
  async downloadEnv(devProjectId) {
236
- await this.#ensureAccessTokenLive();
237
235
  const localPath = `${this.#workspace.workspaceRoot}/local/env.tar`;
238
236
  await this.#api.getFile(`/downloadEnv/${devProjectId}`, localPath);
239
237
  return localPath;
@@ -341,7 +339,7 @@ class Spinner {
341
339
  // pkgs/@akanjs/devkit/aiEditor.ts
342
340
  var MAX_ASK_TRY = 300;
343
341
  var deepSeekLlmModels = ["deepseek-chat", "deepseek-reasoner"];
344
- var openAiLlmModels = ["gpt-5.5", "gpt-4.1", "gpt-4.1-mini", "gpt-4o", "gpt-4o-mini"];
342
+ var openAiLlmModels = ["gpt-5.5"];
345
343
  var supportedLlmModels = [...deepSeekLlmModels, ...openAiLlmModels];
346
344
  var isOpenAiLlmModel = (model) => openAiLlmModels.includes(model);
347
345
  var parseTypescriptFileBlocks = (text) => {
@@ -373,10 +371,7 @@ var preserveTypescriptResponseContent = (previousContent, nextContent) => {
373
371
  class AiSession {
374
372
  static #cacheDir = "node_modules/.cache/akan/aiSession";
375
373
  static #chat = null;
376
- static async init({
377
- temperature = 0,
378
- useExisting = true
379
- } = {}) {
374
+ static async init({ temperature = 0, useExisting = true } = {}) {
380
375
  if (useExisting) {
381
376
  const llmConfig2 = await AiSession.getLlmConfig();
382
377
  if (llmConfig2) {
@@ -530,14 +525,7 @@ class AiSession {
530
525
  throw new Error("Failed to stream response");
531
526
  }
532
527
  }
533
- async edit(question, {
534
- onChunk,
535
- onReasoning,
536
- maxTry = MAX_ASK_TRY,
537
- validate,
538
- approve,
539
- fallbackToPreviousTypescript
540
- } = {}) {
528
+ async edit(question, { onChunk, onReasoning, maxTry = MAX_ASK_TRY, validate, approve, fallbackToPreviousTypescript } = {}) {
541
529
  for (let tryCount = 0;tryCount < maxTry; tryCount++) {
542
530
  let response = await this.ask(question, { onChunk, onReasoning });
543
531
  if (validate?.length && tryCount === 0) {
package/index.js CHANGED
@@ -223,7 +223,6 @@ class CloudApi {
223
223
  });
224
224
  }
225
225
  async uploadEnv(devProjectId, file) {
226
- await this.#ensureAccessTokenLive();
227
226
  const formData = new FormData;
228
227
  formData.append("devProjectId", devProjectId);
229
228
  formData.append("file", file);
@@ -231,7 +230,6 @@ class CloudApi {
231
230
  return data;
232
231
  }
233
232
  async downloadEnv(devProjectId) {
234
- await this.#ensureAccessTokenLive();
235
233
  const localPath = `${this.#workspace.workspaceRoot}/local/env.tar`;
236
234
  await this.#api.getFile(`/downloadEnv/${devProjectId}`, localPath);
237
235
  return localPath;
@@ -339,7 +337,7 @@ class Spinner {
339
337
  // pkgs/@akanjs/devkit/aiEditor.ts
340
338
  var MAX_ASK_TRY = 300;
341
339
  var deepSeekLlmModels = ["deepseek-chat", "deepseek-reasoner"];
342
- var openAiLlmModels = ["gpt-5.5", "gpt-4.1", "gpt-4.1-mini", "gpt-4o", "gpt-4o-mini"];
340
+ var openAiLlmModels = ["gpt-5.5"];
343
341
  var supportedLlmModels = [...deepSeekLlmModels, ...openAiLlmModels];
344
342
  var isOpenAiLlmModel = (model) => openAiLlmModels.includes(model);
345
343
  var parseTypescriptFileBlocks = (text) => {
@@ -371,10 +369,7 @@ var preserveTypescriptResponseContent = (previousContent, nextContent) => {
371
369
  class AiSession {
372
370
  static #cacheDir = "node_modules/.cache/akan/aiSession";
373
371
  static #chat = null;
374
- static async init({
375
- temperature = 0,
376
- useExisting = true
377
- } = {}) {
372
+ static async init({ temperature = 0, useExisting = true } = {}) {
378
373
  if (useExisting) {
379
374
  const llmConfig2 = await AiSession.getLlmConfig();
380
375
  if (llmConfig2) {
@@ -528,14 +523,7 @@ class AiSession {
528
523
  throw new Error("Failed to stream response");
529
524
  }
530
525
  }
531
- async edit(question, {
532
- onChunk,
533
- onReasoning,
534
- maxTry = MAX_ASK_TRY,
535
- validate,
536
- approve,
537
- fallbackToPreviousTypescript
538
- } = {}) {
526
+ async edit(question, { onChunk, onReasoning, maxTry = MAX_ASK_TRY, validate, approve, fallbackToPreviousTypescript } = {}) {
539
527
  for (let tryCount = 0;tryCount < maxTry; tryCount++) {
540
528
  let response = await this.ask(question, { onChunk, onReasoning });
541
529
  if (validate?.length && tryCount === 0) {
@@ -11459,14 +11447,10 @@ ${chalk7.green("\u27A4")} Authentication Required`));
11459
11447
  return normalized;
11460
11448
  }
11461
11449
  async downloadEnv(cloudApi2, workspace, workspaceId) {
11462
- const envArchivePath = "local/env.tar";
11463
11450
  await workspace.mkdir("local");
11464
- await workspace.remove(envArchivePath);
11465
- await cloudApi2.downloadEnv(workspaceId);
11466
- await workspace.spawn("tar", ["-xf", envArchivePath], {
11467
- cwd: workspace.workspaceRoot
11468
- });
11469
- await workspace.remove(envArchivePath);
11451
+ const localPath = await cloudApi2.downloadEnv(workspaceId);
11452
+ await workspace.spawn("tar", ["-xf", localPath], { cwd: workspace.workspaceRoot });
11453
+ await workspace.remove(localPath);
11470
11454
  }
11471
11455
  async uploadEnv(cloudApi2, workspaceId, filePath) {
11472
11456
  const file = new File([Bun.file(filePath)], path38.basename(filePath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "2.2.2-rc.0",
3
+ "version": "2.2.3-rc.0",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -35,7 +35,7 @@
35
35
  "@langchain/openai": "^1.4.6",
36
36
  "@tailwindcss/node": "^4.3.0",
37
37
  "@trapezedev/project": "^7.1.4",
38
- "akanjs": "2.2.2-rc.0",
38
+ "akanjs": "2.2.3-rc.0",
39
39
  "chalk": "^5.6.2",
40
40
  "commander": "^14.0.3",
41
41
  "daisyui": "^5.5.20",