@levelcode/cli 0.3.2 → 0.3.4

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.
Files changed (2) hide show
  1. package/dist/index.js +441 -62
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -108692,7 +108692,7 @@ var init_provider_registry = __esm(() => {
108692
108692
  perplexity: {
108693
108693
  id: "perplexity",
108694
108694
  name: "Perplexity",
108695
- baseUrl: "https://api.perplexity.ai",
108695
+ baseUrl: "https://api.perplexity.ai/v1",
108696
108696
  envVars: ["PERPLEXITY_API_KEY"],
108697
108697
  apiFormat: "openai-compatible",
108698
108698
  authType: "bearer",
@@ -108783,10 +108783,11 @@ var init_provider_registry = __esm(() => {
108783
108783
  id: "azure-openai",
108784
108784
  name: "Azure OpenAI",
108785
108785
  baseUrl: "",
108786
- envVars: ["AZURE_OPENAI_API_KEY"],
108786
+ envVars: ["AZURE_OPENAI_API_KEY", "AZURE_API_KEY"],
108787
108787
  apiFormat: "openai-compatible",
108788
108788
  authType: "bearer",
108789
- category: "enterprise"
108789
+ category: "enterprise",
108790
+ description: "Requires custom baseUrl: https://<resource>.openai.azure.com/openai/deployments/<deployment>/v1"
108790
108791
  },
108791
108792
  "github-models": {
108792
108793
  id: "github-models",
@@ -109066,6 +109067,9 @@ function createProviderModel(providerId, modelId, apiKey, baseUrl, oauthAccessTo
109066
109067
  const definition2 = getProviderDefinition(providerId);
109067
109068
  const effectiveBaseUrl = baseUrl ?? definition2?.baseUrl ?? "";
109068
109069
  const effectiveApiKey = oauthAccessToken ?? apiKey;
109070
+ if (!effectiveBaseUrl && definition2?.apiFormat !== "anthropic") {
109071
+ throw new Error(`Provider "${providerId}" requires a custom baseUrl. ` + (definition2?.description ?? `Set baseUrl in /provider:add or providers.json.`));
109072
+ }
109069
109073
  if (definition2?.apiFormat === "anthropic") {
109070
109074
  const anthropic2 = createAnthropic({ apiKey: effectiveApiKey });
109071
109075
  return anthropic2(modelId);
@@ -109079,6 +109083,8 @@ function createProviderModel(providerId, modelId, apiKey, baseUrl, oauthAccessTo
109079
109083
  h2["Authorization"] = `Bearer ${effectiveApiKey}`;
109080
109084
  } else if (definition2?.authType === "x-api-key" && effectiveApiKey) {
109081
109085
  h2["x-api-key"] = effectiveApiKey;
109086
+ } else if (definition2?.authType === "aws-credentials" && effectiveApiKey) {
109087
+ h2["Authorization"] = `Bearer ${effectiveApiKey}`;
109082
109088
  }
109083
109089
  if (definition2?.defaultHeaders) {
109084
109090
  Object.assign(h2, definition2.defaultHeaders);
@@ -109132,7 +109138,7 @@ async function resolveModelFromProviders(modelId) {
109132
109138
  }
109133
109139
  }
109134
109140
  if (modelId.includes("/")) {
109135
- const aggregatorProviders = ["openrouter", "together", "deepinfra", "fireworks-ai"];
109141
+ const aggregatorProviders = ["openrouter", "together", "deepinfra", "fireworks", "groq", "aihubmix"];
109136
109142
  for (const providerId of aggregatorProviders) {
109137
109143
  const entry = config2.providers[providerId];
109138
109144
  if (!entry?.enabled)
@@ -125941,6 +125947,51 @@ var init_esm = __esm(() => {
125941
125947
  init_react();
125942
125948
  });
125943
125949
 
125950
+ // src/utils/env.ts
125951
+ var getCliEnv = () => ({
125952
+ ...getBaseEnv(),
125953
+ TERM: process.env.TERM,
125954
+ TMUX: process.env.TMUX,
125955
+ STY: process.env.STY,
125956
+ SSH_CLIENT: process.env.SSH_CLIENT,
125957
+ SSH_TTY: process.env.SSH_TTY,
125958
+ SSH_CONNECTION: process.env.SSH_CONNECTION,
125959
+ KITTY_WINDOW_ID: process.env.KITTY_WINDOW_ID,
125960
+ SIXEL_SUPPORT: process.env.SIXEL_SUPPORT,
125961
+ ZED_NODE_ENV: process.env.ZED_NODE_ENV,
125962
+ ZED_TERM: process.env.ZED_TERM,
125963
+ ZED_SHELL: process.env.ZED_SHELL,
125964
+ COLORTERM: process.env.COLORTERM,
125965
+ VSCODE_THEME_KIND: process.env.VSCODE_THEME_KIND,
125966
+ VSCODE_COLOR_THEME_KIND: process.env.VSCODE_COLOR_THEME_KIND,
125967
+ VSCODE_GIT_IPC_HANDLE: process.env.VSCODE_GIT_IPC_HANDLE,
125968
+ VSCODE_PID: process.env.VSCODE_PID,
125969
+ VSCODE_CWD: process.env.VSCODE_CWD,
125970
+ VSCODE_NLS_CONFIG: process.env.VSCODE_NLS_CONFIG,
125971
+ CURSOR_PORT: process.env.CURSOR_PORT,
125972
+ CURSOR: process.env.CURSOR,
125973
+ JETBRAINS_REMOTE_RUN: process.env.JETBRAINS_REMOTE_RUN,
125974
+ IDEA_INITIAL_DIRECTORY: process.env.IDEA_INITIAL_DIRECTORY,
125975
+ IDE_CONFIG_DIR: process.env.IDE_CONFIG_DIR,
125976
+ JB_IDE_CONFIG_DIR: process.env.JB_IDE_CONFIG_DIR,
125977
+ VISUAL: process.env.VISUAL,
125978
+ EDITOR: process.env.EDITOR,
125979
+ LEVELCODE_CLI_EDITOR: process.env.LEVELCODE_CLI_EDITOR,
125980
+ LEVELCODE_EDITOR: process.env.LEVELCODE_EDITOR,
125981
+ OPEN_TUI_THEME: process.env.OPEN_TUI_THEME,
125982
+ OPENTUI_THEME: process.env.OPENTUI_THEME,
125983
+ LEVELCODE_IS_BINARY: process.env.LEVELCODE_IS_BINARY,
125984
+ LEVELCODE_CLI_VERSION: process.env.LEVELCODE_CLI_VERSION,
125985
+ LEVELCODE_CLI_TARGET: process.env.LEVELCODE_CLI_TARGET,
125986
+ LEVELCODE_RG_PATH: process.env.LEVELCODE_RG_PATH,
125987
+ LEVELCODE_SCROLL_MULTIPLIER: process.env.LEVELCODE_SCROLL_MULTIPLIER,
125988
+ LEVELCODE_PERF_TEST: process.env.LEVELCODE_PERF_TEST,
125989
+ LEVELCODE_ENABLE_SWARMS: process.env.LEVELCODE_ENABLE_SWARMS
125990
+ }), getSystemProcessEnv2 = () => process.env;
125991
+ var init_env3 = __esm(() => {
125992
+ init_env_process();
125993
+ });
125994
+
125944
125995
  // ../node_modules/immer/dist/immer.mjs
125945
125996
  function die(error46, ...args2) {
125946
125997
  if (true) {
@@ -131929,11 +131980,11 @@ var userSchema2, claudeOAuthSchema2, credentialsSchema, getLegacyConfigDir2 = ()
131929
131980
  return { token: envToken, source: "environment" };
131930
131981
  }
131931
131982
  if (isStandaloneMode()) {
131932
- const openRouterKey = process.env.OPENROUTER_API_KEY;
131983
+ const openRouterKey = getOpenRouterApiKeyFromEnv();
131933
131984
  if (openRouterKey) {
131934
131985
  return { token: openRouterKey, source: "environment" };
131935
131986
  }
131936
- const anthropicKey = process.env.ANTHROPIC_API_KEY;
131987
+ const anthropicKey = getAnthropicApiKeyFromEnv();
131937
131988
  if (anthropicKey) {
131938
131989
  return { token: anthropicKey, source: "environment" };
131939
131990
  }
@@ -160238,16 +160289,27 @@ var init_bundled_agents_generated = __esm(() => {
160238
160289
  "editor",
160239
160290
  "code-reviewer",
160240
160291
  "context-pruner",
160292
+ "team-cto",
160293
+ "team-vp-engineering",
160294
+ "team-director",
160241
160295
  "coordinator",
160296
+ "team-fellow",
160297
+ "team-distinguished-engineer",
160298
+ "team-principal-engineer",
160299
+ "team-senior-staff-engineer",
160300
+ "team-staff-engineer",
160242
160301
  "team-manager",
160302
+ "team-sub-manager",
160243
160303
  "senior-engineer",
160244
160304
  "team-mid-level-engineer",
160245
160305
  "team-junior-engineer",
160246
160306
  "team-researcher",
160307
+ "team-scientist",
160247
160308
  "team-designer",
160248
160309
  "team-product-lead",
160249
160310
  "team-tester",
160250
- "team-scientist"
160311
+ "team-intern",
160312
+ "team-apprentice"
160251
160313
  ],
160252
160314
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
160253
160315
 
@@ -160278,6 +160340,39 @@ var init_bundled_agents_generated = __esm(() => {
160278
160340
  - Create an impressive demonstration showcasing web development capabilities
160279
160341
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
160280
160342
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
160343
+
160344
+ # Team & Swarm Management
160345
+
160346
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
160347
+
160348
+ ## Available Team Roles (all spawnable)
160349
+ - **Executive:** team-cto, team-vp-engineering, team-director
160350
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
160351
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
160352
+ - **Management:** coordinator, team-manager, team-sub-manager
160353
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
160354
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
160355
+ - **Junior:** team-intern, team-apprentice
160356
+
160357
+ ## How to Deploy Teams
160358
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
160359
+ 2. Use \`task_create\` to create tasks for the team
160360
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
160361
+ 4. Agents pick up tasks and work autonomously
160362
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
160363
+
160364
+ ## Autonomous Phase Management
160365
+ - You don't need to ask the user about phases \u2014 just create teams and start working
160366
+ - Teams default to "alpha" phase (full tool access) based on user settings
160367
+ - You can transition phases with the team tools if needed
160368
+ - You bypass all phase restrictions as the commander
160369
+
160370
+ ## When to Use Teams
160371
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
160372
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
160373
+ - Code review \u2192 deploy a tester or code reviewer
160374
+ - Research \u2192 deploy a researcher
160375
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
160281
160376
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
160282
160377
  - **Code Hygiene:** Make sure to leave things in a good state:
160283
160378
  - Don't forget to add any imports that might be needed
@@ -160483,16 +160578,27 @@ After completing the user request, summarize your changes in a sentence or a few
160483
160578
  "researcher-docs",
160484
160579
  "commander",
160485
160580
  "context-pruner",
160581
+ "team-cto",
160582
+ "team-vp-engineering",
160583
+ "team-director",
160486
160584
  "coordinator",
160585
+ "team-fellow",
160586
+ "team-distinguished-engineer",
160587
+ "team-principal-engineer",
160588
+ "team-senior-staff-engineer",
160589
+ "team-staff-engineer",
160487
160590
  "team-manager",
160591
+ "team-sub-manager",
160488
160592
  "senior-engineer",
160489
160593
  "team-mid-level-engineer",
160490
160594
  "team-junior-engineer",
160491
160595
  "team-researcher",
160596
+ "team-scientist",
160492
160597
  "team-designer",
160493
160598
  "team-product-lead",
160494
160599
  "team-tester",
160495
- "team-scientist"
160600
+ "team-intern",
160601
+ "team-apprentice"
160496
160602
  ],
160497
160603
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
160498
160604
 
@@ -160524,6 +160630,39 @@ After completing the user request, summarize your changes in a sentence or a few
160524
160630
  - Create an impressive demonstration showcasing web development capabilities
160525
160631
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
160526
160632
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
160633
+
160634
+ # Team & Swarm Management
160635
+
160636
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
160637
+
160638
+ ## Available Team Roles (all spawnable)
160639
+ - **Executive:** team-cto, team-vp-engineering, team-director
160640
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
160641
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
160642
+ - **Management:** coordinator, team-manager, team-sub-manager
160643
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
160644
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
160645
+ - **Junior:** team-intern, team-apprentice
160646
+
160647
+ ## How to Deploy Teams
160648
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
160649
+ 2. Use \`task_create\` to create tasks for the team
160650
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
160651
+ 4. Agents pick up tasks and work autonomously
160652
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
160653
+
160654
+ ## Autonomous Phase Management
160655
+ - You don't need to ask the user about phases \u2014 just create teams and start working
160656
+ - Teams default to "alpha" phase (full tool access) based on user settings
160657
+ - You can transition phases with the team tools if needed
160658
+ - You bypass all phase restrictions as the commander
160659
+
160660
+ ## When to Use Teams
160661
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
160662
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
160663
+ - Code review \u2192 deploy a tester or code reviewer
160664
+ - Research \u2192 deploy a researcher
160665
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
160527
160666
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
160528
160667
  - **Code Hygiene:** Make sure to leave things in a good state:
160529
160668
  - Don't forget to add any imports that might be needed
@@ -160723,16 +160862,27 @@ After getting context on the user request from the codebase or from research, us
160723
160862
  "researcher-docs",
160724
160863
  "commander",
160725
160864
  "context-pruner",
160865
+ "team-cto",
160866
+ "team-vp-engineering",
160867
+ "team-director",
160726
160868
  "coordinator",
160869
+ "team-fellow",
160870
+ "team-distinguished-engineer",
160871
+ "team-principal-engineer",
160872
+ "team-senior-staff-engineer",
160873
+ "team-staff-engineer",
160727
160874
  "team-manager",
160875
+ "team-sub-manager",
160728
160876
  "senior-engineer",
160729
160877
  "team-mid-level-engineer",
160730
160878
  "team-junior-engineer",
160731
160879
  "team-researcher",
160880
+ "team-scientist",
160732
160881
  "team-designer",
160733
160882
  "team-product-lead",
160734
160883
  "team-tester",
160735
- "team-scientist"
160884
+ "team-intern",
160885
+ "team-apprentice"
160736
160886
  ],
160737
160887
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
160738
160888
 
@@ -160764,6 +160914,39 @@ After getting context on the user request from the codebase or from research, us
160764
160914
  - Create an impressive demonstration showcasing web development capabilities
160765
160915
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
160766
160916
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
160917
+
160918
+ # Team & Swarm Management
160919
+
160920
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
160921
+
160922
+ ## Available Team Roles (all spawnable)
160923
+ - **Executive:** team-cto, team-vp-engineering, team-director
160924
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
160925
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
160926
+ - **Management:** coordinator, team-manager, team-sub-manager
160927
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
160928
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
160929
+ - **Junior:** team-intern, team-apprentice
160930
+
160931
+ ## How to Deploy Teams
160932
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
160933
+ 2. Use \`task_create\` to create tasks for the team
160934
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
160935
+ 4. Agents pick up tasks and work autonomously
160936
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
160937
+
160938
+ ## Autonomous Phase Management
160939
+ - You don't need to ask the user about phases \u2014 just create teams and start working
160940
+ - Teams default to "alpha" phase (full tool access) based on user settings
160941
+ - You can transition phases with the team tools if needed
160942
+ - You bypass all phase restrictions as the commander
160943
+
160944
+ ## When to Use Teams
160945
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
160946
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
160947
+ - Code review \u2192 deploy a tester or code reviewer
160948
+ - Research \u2192 deploy a researcher
160949
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
160767
160950
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
160768
160951
  - **Code Hygiene:** Make sure to leave things in a good state:
160769
160952
  - Don't forget to add any imports that might be needed
@@ -160965,16 +161148,27 @@ After getting context on the user request from the codebase or from research, us
160965
161148
  "commander-lite",
160966
161149
  "editor-glm",
160967
161150
  "context-pruner",
161151
+ "team-cto",
161152
+ "team-vp-engineering",
161153
+ "team-director",
160968
161154
  "coordinator",
161155
+ "team-fellow",
161156
+ "team-distinguished-engineer",
161157
+ "team-principal-engineer",
161158
+ "team-senior-staff-engineer",
161159
+ "team-staff-engineer",
160969
161160
  "team-manager",
161161
+ "team-sub-manager",
160970
161162
  "senior-engineer",
160971
161163
  "team-mid-level-engineer",
160972
161164
  "team-junior-engineer",
160973
161165
  "team-researcher",
161166
+ "team-scientist",
160974
161167
  "team-designer",
160975
161168
  "team-product-lead",
160976
161169
  "team-tester",
160977
- "team-scientist"
161170
+ "team-intern",
161171
+ "team-apprentice"
160978
161172
  ],
160979
161173
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
160980
161174
 
@@ -161006,6 +161200,39 @@ After getting context on the user request from the codebase or from research, us
161006
161200
  - Create an impressive demonstration showcasing web development capabilities
161007
161201
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
161008
161202
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
161203
+
161204
+ # Team & Swarm Management
161205
+
161206
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
161207
+
161208
+ ## Available Team Roles (all spawnable)
161209
+ - **Executive:** team-cto, team-vp-engineering, team-director
161210
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
161211
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
161212
+ - **Management:** coordinator, team-manager, team-sub-manager
161213
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
161214
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
161215
+ - **Junior:** team-intern, team-apprentice
161216
+
161217
+ ## How to Deploy Teams
161218
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
161219
+ 2. Use \`task_create\` to create tasks for the team
161220
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
161221
+ 4. Agents pick up tasks and work autonomously
161222
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
161223
+
161224
+ ## Autonomous Phase Management
161225
+ - You don't need to ask the user about phases \u2014 just create teams and start working
161226
+ - Teams default to "alpha" phase (full tool access) based on user settings
161227
+ - You can transition phases with the team tools if needed
161228
+ - You bypass all phase restrictions as the commander
161229
+
161230
+ ## When to Use Teams
161231
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
161232
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
161233
+ - Code review \u2192 deploy a tester or code reviewer
161234
+ - Research \u2192 deploy a researcher
161235
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
161009
161236
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
161010
161237
  - **Code Hygiene:** Make sure to leave things in a good state:
161011
161238
  - Don't forget to add any imports that might be needed
@@ -161214,16 +161441,27 @@ At the end of your turn, use the suggest_followups tool to suggest around 3 next
161214
161441
  "editor-multi-prompt",
161215
161442
  "code-reviewer-multi-prompt",
161216
161443
  "context-pruner",
161444
+ "team-cto",
161445
+ "team-vp-engineering",
161446
+ "team-director",
161217
161447
  "coordinator",
161448
+ "team-fellow",
161449
+ "team-distinguished-engineer",
161450
+ "team-principal-engineer",
161451
+ "team-senior-staff-engineer",
161452
+ "team-staff-engineer",
161218
161453
  "team-manager",
161454
+ "team-sub-manager",
161219
161455
  "senior-engineer",
161220
161456
  "team-mid-level-engineer",
161221
161457
  "team-junior-engineer",
161222
161458
  "team-researcher",
161459
+ "team-scientist",
161223
161460
  "team-designer",
161224
161461
  "team-product-lead",
161225
161462
  "team-tester",
161226
- "team-scientist"
161463
+ "team-intern",
161464
+ "team-apprentice"
161227
161465
  ],
161228
161466
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
161229
161467
 
@@ -161254,6 +161492,39 @@ At the end of your turn, use the suggest_followups tool to suggest around 3 next
161254
161492
  - Create an impressive demonstration showcasing web development capabilities
161255
161493
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
161256
161494
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
161495
+
161496
+ # Team & Swarm Management
161497
+
161498
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
161499
+
161500
+ ## Available Team Roles (all spawnable)
161501
+ - **Executive:** team-cto, team-vp-engineering, team-director
161502
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
161503
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
161504
+ - **Management:** coordinator, team-manager, team-sub-manager
161505
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
161506
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
161507
+ - **Junior:** team-intern, team-apprentice
161508
+
161509
+ ## How to Deploy Teams
161510
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
161511
+ 2. Use \`task_create\` to create tasks for the team
161512
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
161513
+ 4. Agents pick up tasks and work autonomously
161514
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
161515
+
161516
+ ## Autonomous Phase Management
161517
+ - You don't need to ask the user about phases \u2014 just create teams and start working
161518
+ - Teams default to "alpha" phase (full tool access) based on user settings
161519
+ - You can transition phases with the team tools if needed
161520
+ - You bypass all phase restrictions as the commander
161521
+
161522
+ ## When to Use Teams
161523
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
161524
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
161525
+ - Code review \u2192 deploy a tester or code reviewer
161526
+ - Research \u2192 deploy a researcher
161527
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
161257
161528
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
161258
161529
  - **Code Hygiene:** Make sure to leave things in a good state:
161259
161530
  - Don't forget to add any imports that might be needed
@@ -161469,16 +161740,27 @@ After completing the user request, summarize your changes in a sentence or a few
161469
161740
  "editor-multi-prompt",
161470
161741
  "code-reviewer-multi-prompt",
161471
161742
  "context-pruner",
161743
+ "team-cto",
161744
+ "team-vp-engineering",
161745
+ "team-director",
161472
161746
  "coordinator",
161747
+ "team-fellow",
161748
+ "team-distinguished-engineer",
161749
+ "team-principal-engineer",
161750
+ "team-senior-staff-engineer",
161751
+ "team-staff-engineer",
161473
161752
  "team-manager",
161753
+ "team-sub-manager",
161474
161754
  "senior-engineer",
161475
161755
  "team-mid-level-engineer",
161476
161756
  "team-junior-engineer",
161477
161757
  "team-researcher",
161758
+ "team-scientist",
161478
161759
  "team-designer",
161479
161760
  "team-product-lead",
161480
161761
  "team-tester",
161481
- "team-scientist"
161762
+ "team-intern",
161763
+ "team-apprentice"
161482
161764
  ],
161483
161765
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
161484
161766
 
@@ -161510,6 +161792,39 @@ After completing the user request, summarize your changes in a sentence or a few
161510
161792
  - Create an impressive demonstration showcasing web development capabilities
161511
161793
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
161512
161794
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
161795
+
161796
+ # Team & Swarm Management
161797
+
161798
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
161799
+
161800
+ ## Available Team Roles (all spawnable)
161801
+ - **Executive:** team-cto, team-vp-engineering, team-director
161802
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
161803
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
161804
+ - **Management:** coordinator, team-manager, team-sub-manager
161805
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
161806
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
161807
+ - **Junior:** team-intern, team-apprentice
161808
+
161809
+ ## How to Deploy Teams
161810
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
161811
+ 2. Use \`task_create\` to create tasks for the team
161812
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
161813
+ 4. Agents pick up tasks and work autonomously
161814
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
161815
+
161816
+ ## Autonomous Phase Management
161817
+ - You don't need to ask the user about phases \u2014 just create teams and start working
161818
+ - Teams default to "alpha" phase (full tool access) based on user settings
161819
+ - You can transition phases with the team tools if needed
161820
+ - You bypass all phase restrictions as the commander
161821
+
161822
+ ## When to Use Teams
161823
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
161824
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
161825
+ - Code review \u2192 deploy a tester or code reviewer
161826
+ - Research \u2192 deploy a researcher
161827
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
161513
161828
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
161514
161829
  - **Code Hygiene:** Make sure to leave things in a good state:
161515
161830
  - Don't forget to add any imports that might be needed
@@ -161730,16 +162045,27 @@ At the end of your turn, use the suggest_followups tool to suggest around 3 next
161730
162045
  "editor",
161731
162046
  "code-reviewer",
161732
162047
  "context-pruner",
162048
+ "team-cto",
162049
+ "team-vp-engineering",
162050
+ "team-director",
161733
162051
  "coordinator",
162052
+ "team-fellow",
162053
+ "team-distinguished-engineer",
162054
+ "team-principal-engineer",
162055
+ "team-senior-staff-engineer",
162056
+ "team-staff-engineer",
161734
162057
  "team-manager",
162058
+ "team-sub-manager",
161735
162059
  "senior-engineer",
161736
162060
  "team-mid-level-engineer",
161737
162061
  "team-junior-engineer",
161738
162062
  "team-researcher",
162063
+ "team-scientist",
161739
162064
  "team-designer",
161740
162065
  "team-product-lead",
161741
162066
  "team-tester",
161742
- "team-scientist"
162067
+ "team-intern",
162068
+ "team-apprentice"
161743
162069
  ],
161744
162070
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
161745
162071
 
@@ -161771,6 +162097,39 @@ At the end of your turn, use the suggest_followups tool to suggest around 3 next
161771
162097
  - Create an impressive demonstration showcasing web development capabilities
161772
162098
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
161773
162099
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
162100
+
162101
+ # Team & Swarm Management
162102
+
162103
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
162104
+
162105
+ ## Available Team Roles (all spawnable)
162106
+ - **Executive:** team-cto, team-vp-engineering, team-director
162107
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
162108
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
162109
+ - **Management:** coordinator, team-manager, team-sub-manager
162110
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
162111
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
162112
+ - **Junior:** team-intern, team-apprentice
162113
+
162114
+ ## How to Deploy Teams
162115
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
162116
+ 2. Use \`task_create\` to create tasks for the team
162117
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
162118
+ 4. Agents pick up tasks and work autonomously
162119
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
162120
+
162121
+ ## Autonomous Phase Management
162122
+ - You don't need to ask the user about phases \u2014 just create teams and start working
162123
+ - Teams default to "alpha" phase (full tool access) based on user settings
162124
+ - You can transition phases with the team tools if needed
162125
+ - You bypass all phase restrictions as the commander
162126
+
162127
+ ## When to Use Teams
162128
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
162129
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
162130
+ - Code review \u2192 deploy a tester or code reviewer
162131
+ - Research \u2192 deploy a researcher
162132
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
161774
162133
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
161775
162134
  - **Code Hygiene:** Make sure to leave things in a good state:
161776
162135
  - Don't forget to add any imports that might be needed
@@ -162013,16 +162372,27 @@ This is more like an extremely short PRD which describes the end result of what
162013
162372
  "editor",
162014
162373
  "code-reviewer",
162015
162374
  "context-pruner",
162375
+ "team-cto",
162376
+ "team-vp-engineering",
162377
+ "team-director",
162016
162378
  "coordinator",
162379
+ "team-fellow",
162380
+ "team-distinguished-engineer",
162381
+ "team-principal-engineer",
162382
+ "team-senior-staff-engineer",
162383
+ "team-staff-engineer",
162017
162384
  "team-manager",
162385
+ "team-sub-manager",
162018
162386
  "senior-engineer",
162019
162387
  "team-mid-level-engineer",
162020
162388
  "team-junior-engineer",
162021
162389
  "team-researcher",
162390
+ "team-scientist",
162022
162391
  "team-designer",
162023
162392
  "team-product-lead",
162024
162393
  "team-tester",
162025
- "team-scientist"
162394
+ "team-intern",
162395
+ "team-apprentice"
162026
162396
  ],
162027
162397
  systemPrompt: `You are Sage, a strategic assistant that orchestrates complex coding tasks through specialized sub-agents. You are the AI agent behind the product, LevelCode, a CLI tool where users can chat with you to code with AI.
162028
162398
 
@@ -162054,6 +162424,39 @@ This is more like an extremely short PRD which describes the end result of what
162054
162424
  - Create an impressive demonstration showcasing web development capabilities
162055
162425
  - **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
162056
162426
  - **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
162427
+
162428
+ # Team & Swarm Management
162429
+
162430
+ You have full authority to create and manage engineering teams. You are the commander \u2014 you bypass all phase restrictions.
162431
+
162432
+ ## Available Team Roles (all spawnable)
162433
+ - **Executive:** team-cto, team-vp-engineering, team-director
162434
+ - **Architects:** team-fellow, team-distinguished-engineer, team-principal-engineer
162435
+ - **Staff:** team-senior-staff-engineer, team-staff-engineer
162436
+ - **Management:** coordinator, team-manager, team-sub-manager
162437
+ - **Engineers:** senior-engineer, team-mid-level-engineer, team-junior-engineer
162438
+ - **Specialists:** team-researcher, team-scientist, team-designer, team-product-lead, team-tester
162439
+ - **Junior:** team-intern, team-apprentice
162440
+
162441
+ ## How to Deploy Teams
162442
+ 1. Use \`team_create\` to create a team (it will use your default phase from settings \u2014 usually "alpha")
162443
+ 2. Use \`task_create\` to create tasks for the team
162444
+ 3. Use \`spawn_agents\` with \`team_name\` and \`team_role\` to deploy agents to the team
162445
+ 4. Agents pick up tasks and work autonomously
162446
+ 5. You can spawn ANY role directly \u2014 CTO, VP, Director, Senior Engineer, etc.
162447
+
162448
+ ## Autonomous Phase Management
162449
+ - You don't need to ask the user about phases \u2014 just create teams and start working
162450
+ - Teams default to "alpha" phase (full tool access) based on user settings
162451
+ - You can transition phases with the team tools if needed
162452
+ - You bypass all phase restrictions as the commander
162453
+
162454
+ ## When to Use Teams
162455
+ - Large multi-file tasks \u2192 deploy senior engineers in parallel
162456
+ - Architecture decisions \u2192 deploy a principal engineer or CTO
162457
+ - Code review \u2192 deploy a tester or code reviewer
162458
+ - Research \u2192 deploy a researcher
162459
+ - For massive builds, deploy a full hierarchy: CTO \u2192 Directors \u2192 Managers \u2192 Engineers
162057
162460
  - **Package Management:** When adding new packages, use the commander agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
162058
162461
  - **Code Hygiene:** Make sure to leave things in a good state:
162059
162462
  - Don't forget to add any imports that might be needed
@@ -195157,50 +195560,7 @@ var import_react31 = __toESM(require_react(), 1);
195157
195560
 
195158
195561
  // src/hooks/use-theme.tsx
195159
195562
  init_esm();
195160
-
195161
- // src/utils/env.ts
195162
- init_env_process();
195163
- var getCliEnv = () => ({
195164
- ...getBaseEnv(),
195165
- TERM: process.env.TERM,
195166
- TMUX: process.env.TMUX,
195167
- STY: process.env.STY,
195168
- SSH_CLIENT: process.env.SSH_CLIENT,
195169
- SSH_TTY: process.env.SSH_TTY,
195170
- SSH_CONNECTION: process.env.SSH_CONNECTION,
195171
- KITTY_WINDOW_ID: process.env.KITTY_WINDOW_ID,
195172
- SIXEL_SUPPORT: process.env.SIXEL_SUPPORT,
195173
- ZED_NODE_ENV: process.env.ZED_NODE_ENV,
195174
- ZED_TERM: process.env.ZED_TERM,
195175
- ZED_SHELL: process.env.ZED_SHELL,
195176
- COLORTERM: process.env.COLORTERM,
195177
- VSCODE_THEME_KIND: process.env.VSCODE_THEME_KIND,
195178
- VSCODE_COLOR_THEME_KIND: process.env.VSCODE_COLOR_THEME_KIND,
195179
- VSCODE_GIT_IPC_HANDLE: process.env.VSCODE_GIT_IPC_HANDLE,
195180
- VSCODE_PID: process.env.VSCODE_PID,
195181
- VSCODE_CWD: process.env.VSCODE_CWD,
195182
- VSCODE_NLS_CONFIG: process.env.VSCODE_NLS_CONFIG,
195183
- CURSOR_PORT: process.env.CURSOR_PORT,
195184
- CURSOR: process.env.CURSOR,
195185
- JETBRAINS_REMOTE_RUN: process.env.JETBRAINS_REMOTE_RUN,
195186
- IDEA_INITIAL_DIRECTORY: process.env.IDEA_INITIAL_DIRECTORY,
195187
- IDE_CONFIG_DIR: process.env.IDE_CONFIG_DIR,
195188
- JB_IDE_CONFIG_DIR: process.env.JB_IDE_CONFIG_DIR,
195189
- VISUAL: process.env.VISUAL,
195190
- EDITOR: process.env.EDITOR,
195191
- LEVELCODE_CLI_EDITOR: process.env.LEVELCODE_CLI_EDITOR,
195192
- LEVELCODE_EDITOR: process.env.LEVELCODE_EDITOR,
195193
- OPEN_TUI_THEME: process.env.OPEN_TUI_THEME,
195194
- OPENTUI_THEME: process.env.OPENTUI_THEME,
195195
- LEVELCODE_IS_BINARY: process.env.LEVELCODE_IS_BINARY,
195196
- LEVELCODE_CLI_VERSION: process.env.LEVELCODE_CLI_VERSION,
195197
- LEVELCODE_CLI_TARGET: process.env.LEVELCODE_CLI_TARGET,
195198
- LEVELCODE_RG_PATH: process.env.LEVELCODE_RG_PATH,
195199
- LEVELCODE_SCROLL_MULTIPLIER: process.env.LEVELCODE_SCROLL_MULTIPLIER,
195200
- LEVELCODE_PERF_TEST: process.env.LEVELCODE_PERF_TEST,
195201
- LEVELCODE_ENABLE_SWARMS: process.env.LEVELCODE_ENABLE_SWARMS
195202
- });
195203
- var getSystemProcessEnv2 = () => process.env;
195563
+ init_env3();
195204
195564
 
195205
195565
  // src/utils/theme-config.ts
195206
195566
  var defaultThemeConfig = {
@@ -195242,6 +195602,7 @@ var buildTheme = (baseTheme, mode, customColors, plugins) => {
195242
195602
  };
195243
195603
 
195244
195604
  // src/utils/theme-system.ts
195605
+ init_env3();
195245
195606
  import { existsSync as existsSync12, readFileSync as readFileSync6, readdirSync as readdirSync5, statSync as statSync2, watch } from "fs";
195246
195607
  import { homedir as homedir7 } from "os";
195247
195608
  import { dirname as dirname10, join as join11 } from "path";
@@ -198378,6 +198739,7 @@ async function testProvider(providerId, apiKey, baseUrl, oauthAccessToken) {
198378
198739
  const headers = {};
198379
198740
  switch (definition2.authType) {
198380
198741
  case "bearer":
198742
+ case "aws-credentials":
198381
198743
  headers["Authorization"] = `Bearer ${effectiveApiKey}`;
198382
198744
  break;
198383
198745
  case "x-api-key":
@@ -202803,9 +203165,10 @@ ${commandsContext}
202803
203165
  }
202804
203166
 
202805
203167
  // src/utils/clipboard.ts
203168
+ init_env3();
203169
+ init_logger2();
202806
203170
  import { closeSync, openSync, writeSync } from "fs";
202807
203171
  import { createRequire } from "module";
202808
- init_logger2();
202809
203172
  var require2 = createRequire(import.meta.url);
202810
203173
  var currentMessage = null;
202811
203174
  var listeners2 = new Set;
@@ -202942,6 +203305,7 @@ function tryCopyViaOsc52(text2) {
202942
203305
  }
202943
203306
 
202944
203307
  // src/commands/router.ts
203308
+ init_env3();
202945
203309
  init_pending_attachments();
202946
203310
  function runBashCommand(command) {
202947
203311
  const {
@@ -206684,6 +207048,7 @@ var ImageThumbnail = import_react63.memo(({
206684
207048
  });
206685
207049
 
206686
207050
  // src/utils/terminal-images.ts
207051
+ init_env3();
206687
207052
  var cachedProtocol = null;
206688
207053
  function detectTerminalImageSupport(env3 = getCliEnv()) {
206689
207054
  if (cachedProtocol !== null) {
@@ -210564,6 +210929,7 @@ var import_react86 = __toESM(require_react(), 1);
210564
210929
 
210565
210930
  // src/hooks/use-why-did-you-update.ts
210566
210931
  var import_react84 = __toESM(require_react(), 1);
210932
+ init_env3();
210567
210933
  init_logger2();
210568
210934
  function useWhyDidYouUpdateById(componentName, id, props, options2 = {}) {
210569
210935
  const env3 = getCliEnv();
@@ -210604,6 +210970,9 @@ function useWhyDidYouUpdateById(componentName, id, props, options2 = {}) {
210604
210970
  });
210605
210971
  }
210606
210972
 
210973
+ // src/components/blocks/agent-branch-item.tsx
210974
+ init_env3();
210975
+
210607
210976
  // src/components/collapse-button.tsx
210608
210977
  var import_react85 = __toESM(require_react(), 1);
210609
210978
  var CollapseButton = import_react85.memo(({ onClick, style }) => {
@@ -222771,9 +223140,10 @@ function getAgentStatusInfo(status, theme) {
222771
223140
  }
222772
223141
 
222773
223142
  // src/utils/path-helpers.ts
223143
+ init_env3();
223144
+ init_project_files();
222774
223145
  import os17 from "os";
222775
223146
  import path42 from "path";
222776
- init_project_files();
222777
223147
  function formatCwd(cwd, env3) {
222778
223148
  if (!cwd)
222779
223149
  return "";
@@ -223363,13 +223733,15 @@ init_chat_store();
223363
223733
  init_old_constants();
223364
223734
  init_src();
223365
223735
  init_auth3();
223736
+ init_env3();
223366
223737
  init_logger2();
223367
223738
 
223368
223739
  // src/native/ripgrep.ts
223369
223740
  init_src();
223741
+ init_env3();
223742
+ init_logger2();
223370
223743
  import path43 from "path";
223371
223744
  var {spawnSync: spawnSync2 } = globalThis.Bun;
223372
- init_logger2();
223373
223745
  var getRipgrepPath = async () => {
223374
223746
  const env3 = getCliEnv();
223375
223747
  if (!env3.LEVELCODE_IS_BINARY) {
@@ -227686,9 +228058,10 @@ var TerminalLink = ({
227686
228058
  };
227687
228059
 
227688
228060
  // src/utils/open-file.ts
228061
+ init_env3();
228062
+ init_logger2();
227689
228063
  import { spawn as spawn4 } from "child_process";
227690
228064
  import os18 from "os";
227691
- init_logger2();
227692
228065
  var isWindows = os18.platform() === "win32";
227693
228066
  var isMac = os18.platform() === "darwin";
227694
228067
  var escapeForShell = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
@@ -227995,6 +228368,7 @@ var ValidationErrorPopover = ({
227995
228368
  };
227996
228369
 
227997
228370
  // src/components/message-block.tsx
228371
+ init_env3();
227998
228372
  var MessageAttachments = import_react113.memo(({
227999
228373
  imageAttachments,
228000
228374
  textAttachments
@@ -228290,6 +228664,7 @@ var useMessageBlockStore = create()(immer2((set3) => ({
228290
228664
  })));
228291
228665
 
228292
228666
  // src/components/message-with-agents.tsx
228667
+ init_env3();
228293
228668
  var AgentChildrenGrid = import_react114.memo(({ agentChildren, depth, availableWidth }) => {
228294
228669
  const theme = useMessageBlockStore((state) => state.context.theme);
228295
228670
  const getItemKey = import_react114.useCallback((agent) => agent.id, []);
@@ -230449,6 +230824,7 @@ init_project_files();
230449
230824
  init_analytics2();
230450
230825
 
230451
230826
  // src/utils/terminal-color-detection.ts
230827
+ init_env3();
230452
230828
  import { openSync as openSync2, closeSync as closeSync2, writeSync as writeSync2, constants as constants10 } from "fs";
230453
230829
  var OSC_QUERY_TIMEOUT_MS = 500;
230454
230830
  var GLOBAL_OSC_TIMEOUT_MS = 2000;
@@ -231305,6 +231681,7 @@ function* range2(start2, stop2, step = 1) {
231305
231681
  }
231306
231682
 
231307
231683
  // src/utils/chat-scroll-accel.ts
231684
+ init_env3();
231308
231685
  var ENVIRONMENT_TYPE_VARS = [
231309
231686
  "TERM_PROGRAM",
231310
231687
  "TERMINAL_EMULATOR",
@@ -233674,6 +234051,7 @@ var getStatusIndicatorState = ({
233674
234051
  };
233675
234052
 
233676
234053
  // src/utils/terminal-title.ts
234054
+ init_env3();
233677
234055
  import { closeSync as closeSync3, constants as constants11, openSync as openSync3, writeSync as writeSync3 } from "fs";
233678
234056
  var MAX_TITLE_LENGTH = 60;
233679
234057
  var TITLE_PREFIX = "LevelCode: ";
@@ -237386,6 +237764,7 @@ init_project_files();
237386
237764
  init_analytics2();
237387
237765
  init_src();
237388
237766
  init_auth3();
237767
+ init_env3();
237389
237768
  init_logger2();
237390
237769
 
237391
237770
  // src/utils/project-picker.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levelcode/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "LevelCode CLI - Terminal-based AI coding agent that outperforms Claude Code",
5
5
  "author": {
6
6
  "name": "Yethikrishna R",