@akashacorporation/bari 0.5.1 → 0.6.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.
Files changed (24) hide show
  1. package/chunks/{auth-command-VD6TIEWH.js → auth-command-DMMO4CQU.js} +6 -6
  2. package/chunks/{chunk-IE2SXA67.js → chunk-4LQ6AY6U.js} +1321 -1294
  3. package/chunks/{chunk-3KBOFDTH.js → chunk-53UX2CHA.js} +30801 -30666
  4. package/chunks/{chunk-T7PZXYIK.js → chunk-BEQYKE7V.js} +3 -3
  5. package/chunks/{chunk-4SGMUFHK.js → chunk-HLCYXQNM.js} +13428 -13391
  6. package/chunks/{chunk-FKYCUR5G.js → chunk-HMF7XRML.js} +1 -1
  7. package/chunks/{chunk-OCCJYVTX.js → chunk-PZILYD7D.js} +1 -1
  8. package/chunks/{chunk-7YLPPLGD.js → chunk-RGWKF4KQ.js} +4 -4
  9. package/chunks/{chunk-VI572H4P.js → chunk-TLRTDYGW.js} +2 -2
  10. package/chunks/{chunk-RI54XTZ2.js → chunk-ZWFSJPXJ.js} +2 -2
  11. package/chunks/{data-dir-KARX6GVW.js → data-dir-JPSZUMZL.js} +4 -4
  12. package/chunks/{launcher-BLHUIDSQ.js → launcher-GZXNHFHP.js} +16 -16
  13. package/chunks/{lifecycle-BXHZHAMV.js → lifecycle-EP4DEYCB.js} +6 -6
  14. package/chunks/{main-FFDCHTPN.js → main-AVQUIMQJ.js} +37 -38
  15. package/chunks/{plugin-command-J4NMGEJK.js → plugin-command-QFQUUKKD.js} +7 -7
  16. package/chunks/{provider-command-5JNAFU2O.js → provider-command-DKPV4YEF.js} +81 -56
  17. package/chunks/{run-acp-command-2Q3EEIIS.js → run-acp-command-KFKHWM36.js} +5 -5
  18. package/chunks/{run-exec-command-AZVSXXTF.js → run-exec-command-EDFOJL46.js} +10 -10
  19. package/chunks/src-KUYD6DGU.js +241 -0
  20. package/chunks/{telemetry-command-UWZ3TQTS.js → telemetry-command-WFP5XMBR.js} +32 -29
  21. package/cli.js +5 -5
  22. package/metafile.json +327 -223
  23. package/package.json +1 -1
  24. package/chunks/src-7F6SBW77.js +0 -239
@@ -1,19 +1,19 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
2
  import {
3
- a as l,
4
- b as m
5
- } from "./chunk-3KBOFDTH.js";
3
+ a as c,
4
+ b as u
5
+ } from "./chunk-53UX2CHA.js";
6
6
  import "./chunk-7QLK46ZN.js";
7
7
  import "./chunk-BWXIBASA.js";
8
8
  import {
9
- a as s
9
+ a as m
10
10
  } from "./chunk-I7G7L5EQ.js";
11
11
  import "./chunk-ZUIEARH2.js";
12
- import "./chunk-4SGMUFHK.js";
12
+ import "./chunk-HLCYXQNM.js";
13
13
  import "./chunk-YAL5GOP5.js";
14
- import "./chunk-OCCJYVTX.js";
14
+ import "./chunk-PZILYD7D.js";
15
15
  import {
16
- b as i
16
+ b as s
17
17
  } from "./chunk-NA56G5AH.js";
18
18
  import "./chunk-K2XM2L2G.js";
19
19
  import "./chunk-ANR5HYFY.js";
@@ -33,11 +33,11 @@ import "./chunk-PVZVKIKW.js";
33
33
  import "./chunk-F7TGN2OV.js";
34
34
  import "./chunk-CGBVBNBI.js";
35
35
  import {
36
- g as d
37
- } from "./chunk-RI54XTZ2.js";
38
- import "./chunk-7YLPPLGD.js";
39
- import "./chunk-VI572H4P.js";
40
- import "./chunk-IE2SXA67.js";
36
+ g as l
37
+ } from "./chunk-ZWFSJPXJ.js";
38
+ import "./chunk-RGWKF4KQ.js";
39
+ import "./chunk-TLRTDYGW.js";
40
+ import "./chunk-4LQ6AY6U.js";
41
41
  import "./chunk-2ZSPJAIT.js";
42
42
  import "./chunk-W7MCSSFP.js";
43
43
  import "./chunk-75Y4IXX5.js";
@@ -48,37 +48,62 @@ import "./chunk-2UIQIPPR.js";
48
48
  import "./chunk-XJFD4WXS.js";
49
49
 
50
50
  // packages/tui/src/cli/provider-command.ts
51
- async function g(r) {
52
- const t = r.createContext ? await r.createContext(r.lane) : await c(r.version, r.workspaceDir, r.lane);
51
+ async function P(t) {
52
+ const r = t.createContext ? await t.createContext(t.lane) : await p(t.version, t.workspaceDir, t.lane);
53
53
  try {
54
- const { request: e } = r;
54
+ const { request: e } = t;
55
55
  if (e.action === "list") {
56
- return p(await t.application.snapshot(), Boolean(e.json));
56
+ return y(await r.application.snapshot(), Boolean(e.json));
57
57
  }
58
58
  if (e.action === "add") {
59
59
  const n = e.apiKeyEnv?.trim() || "MCODE_PROVIDER_API_KEY";
60
- const o = (r.environment ?? process.env)[n]?.trim();
61
- if (!o) {
60
+ const a = (t.environment ?? process.env)[n]?.trim();
61
+ if (!a) {
62
62
  throw new Error(
63
63
  `Provider API key is missing. Set ${n} or pass --api-key-env <name>.`
64
64
  );
65
65
  }
66
- await t.application.create({
66
+ const o = e.models.map((i) => ({
67
+ modelId: i,
68
+ ...e.effortOptions?.length ? { effortOptions: [...e.effortOptions] } : {},
69
+ ...e.contextWindow !== void 0 || e.maxOutput !== void 0 ? {
70
+ limit: {
71
+ ...e.contextWindow !== void 0 ? { context: e.contextWindow } : {},
72
+ ...e.maxOutput !== void 0 ? { output: e.maxOutput } : {}
73
+ }
74
+ } : {}
75
+ }));
76
+ if (e.saveAndUse) {
77
+ const i = e.models[0];
78
+ if (!i) throw new Error("At least one --model <id> is required.");
79
+ const d = await r.application.saveCandidate({
80
+ name: e.name,
81
+ baseUrl: e.baseUrl,
82
+ apiKey: a,
83
+ apiFormat: e.apiFormat,
84
+ models: o,
85
+ modelId: i,
86
+ saveAndUse: true
87
+ });
88
+ if (!d.success) {
89
+ throw new Error(
90
+ s(
91
+ d.status?.lastErrorMessage ?? d.status?.state ?? "Connection unavailable",
92
+ {
93
+ summary: "Provider connection test failed. Nothing was saved or selected.",
94
+ nextStep: "Check the URL, API key, and first model ID, then retry; omit --use to save without testing."
95
+ }
96
+ )
97
+ );
98
+ }
99
+ return `Provider added and selected: ${e.name}`;
100
+ }
101
+ await r.application.create({
67
102
  name: e.name,
68
103
  baseUrl: e.baseUrl,
69
- apiKey: o,
104
+ apiKey: a,
70
105
  apiFormat: e.apiFormat,
71
- models: e.models.map((a) => ({
72
- modelId: a,
73
- ...e.effortOptions?.length ? { effortOptions: [...e.effortOptions] } : {},
74
- ...e.contextWindow !== void 0 || e.maxOutput !== void 0 ? {
75
- limit: {
76
- ...e.contextWindow !== void 0 ? { context: e.contextWindow } : {},
77
- ...e.maxOutput !== void 0 ? { output: e.maxOutput } : {}
78
- }
79
- } : {}
80
- })),
81
- saveAndUse: e.saveAndUse
106
+ models: o
82
107
  });
83
108
  return `Provider added: ${e.name}`;
84
109
  }
@@ -86,73 +111,73 @@ async function g(r) {
86
111
  if (!e.confirmed) {
87
112
  throw new Error("Refusing to remove a provider without --yes.");
88
113
  }
89
- await t.application.remove(e.providerId);
114
+ await r.application.remove(e.providerId);
90
115
  return `Provider removed: ${e.providerId}`;
91
116
  }
92
117
  if (e.action === "test") {
93
118
  if (e.providerId === "minimax_oauth") {
94
- const o = "MiniMax OAuth sign-in and connectivity are managed by /login.";
119
+ const a = "MiniMax OAuth sign-in and connectivity are managed by /login.";
95
120
  if (e.json) {
96
121
  return JSON.stringify(
97
122
  {
98
123
  success: false,
99
- status: { state: "unsupported", lastErrorMessage: o }
124
+ status: { state: "unsupported", lastErrorMessage: a }
100
125
  },
101
126
  null,
102
127
  2
103
128
  );
104
129
  }
105
- return i(o, {
130
+ return s(a, {
106
131
  summary: "MiniMax OAuth provider test skipped.",
107
132
  nextStep: "Run /login to manage Token Plan sign-in."
108
133
  });
109
134
  }
110
- const n = await t.application.test(e.providerId, e.modelId);
135
+ const n = await r.application.test(e.providerId, e.modelId);
111
136
  if (e.json) return JSON.stringify(n, null, 2);
112
- return n.success ? `Provider available: ${e.providerId}${e.modelId ? `/${e.modelId}` : ""}` : i(n.status.lastErrorMessage ?? n.status.state, {
137
+ return n.success ? `Provider available: ${e.providerId}${e.modelId ? `/${e.modelId}` : ""}` : s(n.status.lastErrorMessage ?? n.status.state, {
113
138
  summary: "Provider test failed.",
114
139
  nextStep: "Check the URL, API key, and model ID, then retry."
115
140
  });
116
141
  }
117
142
  if (e.action === "set-minimax-key") {
118
143
  const n = e.apiKeyEnv?.trim() || "MCODE_PROVIDER_API_KEY";
119
- const o = (r.environment ?? process.env)[n]?.trim();
120
- if (!o) {
144
+ const a = (t.environment ?? process.env)[n]?.trim();
145
+ if (!a) {
121
146
  throw new Error(`MiniMax API key is missing. Set ${n} or pass --api-key-env <name>.`);
122
147
  }
123
- await t.application.setMiniMaxApiKey(o);
148
+ await r.application.setMiniMaxApiKey(a);
124
149
  return "MiniMax API Key saved and selected.";
125
150
  }
126
- await t.application.setMiniMaxSource(e.source);
151
+ await r.application.setMiniMaxSource(e.source);
127
152
  return e.source === "token_plan" ? "Using MiniMax Token Plan." : "Using MiniMax API Key.";
128
153
  } finally {
129
- await t.shutdown();
154
+ await r.shutdown();
130
155
  }
131
156
  }
132
- async function c(r, t = process.cwd(), e) {
133
- const n = await l({
134
- dataDir: await d(),
135
- workspaceDir: t,
136
- version: r,
157
+ async function p(t, r = process.cwd(), e) {
158
+ const n = await c({
159
+ dataDir: await l(),
160
+ workspaceDir: r,
161
+ version: t,
137
162
  surface: "headless",
138
163
  ...e ? { lane: e } : {}
139
164
  });
140
165
  return {
141
- application: new s(n.adapter),
166
+ application: new m(n.adapter),
142
167
  shutdown: async () => {
143
- await m(n);
168
+ await u(n);
144
169
  }
145
170
  };
146
171
  }
147
- function p(r, t) {
148
- if (t) return JSON.stringify(r, null, 2);
149
- const e = r.providers.map((n) => {
150
- const o = n.active ? "active" : n.enabled ? "enabled" : "disabled";
151
- const a = n.kind === "minimax-oauth" ? "managed login" : n.hasApiKey ? n.maskedApiKey ?? "key saved" : "no key";
152
- return `${n.active ? "*" : " "} ${n.providerId} ${o} ${a}`;
172
+ function y(t, r) {
173
+ if (r) return JSON.stringify(t, null, 2);
174
+ const e = t.providers.map((n) => {
175
+ const a = n.active ? "active" : n.enabled ? "enabled" : "disabled";
176
+ const o = n.kind === "minimax-oauth" ? "managed login" : n.hasApiKey ? n.maskedApiKey ?? "key saved" : "no key";
177
+ return `${n.active ? "*" : " "} ${n.providerId} ${a} ${o}`;
153
178
  });
154
179
  return e.join("\n");
155
180
  }
156
181
  export {
157
- g as runMcodeProviderCommand
182
+ P as runMcodeProviderCommand
158
183
  };
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-YAL5GOP5.js";
17
17
  import {
18
18
  g as Rm
19
- } from "./chunk-RI54XTZ2.js";
20
- import "./chunk-7YLPPLGD.js";
21
- import "./chunk-VI572H4P.js";
22
- import "./chunk-IE2SXA67.js";
19
+ } from "./chunk-ZWFSJPXJ.js";
20
+ import "./chunk-RGWKF4KQ.js";
21
+ import "./chunk-TLRTDYGW.js";
22
+ import "./chunk-4LQ6AY6U.js";
23
23
  import "./chunk-2ZSPJAIT.js";
24
24
  import "./chunk-W7MCSSFP.js";
25
25
  import "./chunk-75Y4IXX5.js";
@@ -27017,7 +27017,7 @@ async function yO(e, t = {}, r) {
27017
27017
  const c = t.createRuntime && t.shutdownRuntime ? {
27018
27018
  createTuiRuntime: t.createRuntime,
27019
27019
  shutdownTuiRuntime: t.shutdownRuntime
27020
- } : await (t.loadRuntimeLifecycle ?? (() => import("./lifecycle-BXHZHAMV.js")))();
27020
+ } : await (t.loadRuntimeLifecycle ?? (() => import("./lifecycle-EP4DEYCB.js")))();
27021
27021
  const l = t.createRuntime ?? c.createTuiRuntime;
27022
27022
  u ??= c.shutdownTuiRuntime;
27023
27023
  const m = await (t.prepareDataDir ?? Rm)();
@@ -2,7 +2,7 @@ import { createRequire as __mavis_cR } from "module"; import { basename as __mav
2
2
  import {
3
3
  a as Ge,
4
4
  b as Je
5
- } from "./chunk-3KBOFDTH.js";
5
+ } from "./chunk-53UX2CHA.js";
6
6
  import "./chunk-7QLK46ZN.js";
7
7
  import "./chunk-BWXIBASA.js";
8
8
  import {
@@ -12,7 +12,7 @@ import {
12
12
  f as $e,
13
13
  g as Fe,
14
14
  h as H
15
- } from "./chunk-FKYCUR5G.js";
15
+ } from "./chunk-HMF7XRML.js";
16
16
  import {
17
17
  a as Ue,
18
18
  b as le,
@@ -24,12 +24,12 @@ import {
24
24
  import {
25
25
  f as Ne,
26
26
  n as de
27
- } from "./chunk-4SGMUFHK.js";
27
+ } from "./chunk-HLCYXQNM.js";
28
28
  import {
29
29
  c as _e,
30
30
  q as z
31
31
  } from "./chunk-YAL5GOP5.js";
32
- import "./chunk-OCCJYVTX.js";
32
+ import "./chunk-PZILYD7D.js";
33
33
  import {
34
34
  b as Ae,
35
35
  c as D,
@@ -61,13 +61,13 @@ import "./chunk-F7TGN2OV.js";
61
61
  import "./chunk-CGBVBNBI.js";
62
62
  import {
63
63
  g as Pe
64
- } from "./chunk-RI54XTZ2.js";
65
- import "./chunk-7YLPPLGD.js";
66
- import "./chunk-VI572H4P.js";
64
+ } from "./chunk-ZWFSJPXJ.js";
65
+ import "./chunk-RGWKF4KQ.js";
66
+ import "./chunk-TLRTDYGW.js";
67
67
  import {
68
- $a as Me,
69
- _a as ke
70
- } from "./chunk-IE2SXA67.js";
68
+ $a as ke,
69
+ ab as Me
70
+ } from "./chunk-4LQ6AY6U.js";
71
71
  import "./chunk-2ZSPJAIT.js";
72
72
  import "./chunk-W7MCSSFP.js";
73
73
  import "./chunk-75Y4IXX5.js";
@@ -0,0 +1,241 @@
1
+ import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
+ import {
3
+ $ as Z,
4
+ $a as eb,
5
+ A as z,
6
+ Aa as wa,
7
+ B as A,
8
+ Ba as xa,
9
+ C as B,
10
+ Ca as ya,
11
+ D as C,
12
+ Da as za,
13
+ E as D,
14
+ Ea as Aa,
15
+ F as E,
16
+ Fa as Ba,
17
+ G as F,
18
+ Ga as Ca,
19
+ H as G,
20
+ Ha as Da,
21
+ I as H,
22
+ Ia as Ea,
23
+ J as I,
24
+ Ja as Fa,
25
+ K as J,
26
+ Ka as Ga,
27
+ L as K,
28
+ La as Ha,
29
+ M as L,
30
+ Ma as Ra,
31
+ N as M,
32
+ Na as Sa,
33
+ O as N,
34
+ Oa as Ta,
35
+ Pa as Ua,
36
+ Q as O,
37
+ Qa as Va,
38
+ R as P,
39
+ Ra as Wa,
40
+ S as Q,
41
+ Sa as Xa,
42
+ T as R,
43
+ Ta as Ya,
44
+ U as S,
45
+ Ua as Za,
46
+ V as T,
47
+ Va as _a,
48
+ W as U,
49
+ Wa as $a,
50
+ X as V,
51
+ Xa as ab,
52
+ Y as W,
53
+ Ya as bb,
54
+ Z as X,
55
+ Za as cb,
56
+ _ as Y,
57
+ _a as db,
58
+ a,
59
+ aa as _,
60
+ ab as fb,
61
+ b,
62
+ ba as $,
63
+ bb as gb,
64
+ ca as aa,
65
+ d as c,
66
+ da as ba,
67
+ e as d,
68
+ ea as ca,
69
+ f as e,
70
+ fa as da,
71
+ g as f,
72
+ ga as ea,
73
+ h as g,
74
+ ha as fa,
75
+ i as h,
76
+ ia as ga,
77
+ j as i,
78
+ ja as ha,
79
+ k as j,
80
+ ka as ia,
81
+ l as k,
82
+ la as ja,
83
+ m as l,
84
+ ma as ka,
85
+ n as m,
86
+ na as la,
87
+ o as n,
88
+ oa as ma,
89
+ p as o,
90
+ pa as na,
91
+ q as p,
92
+ qa as oa,
93
+ r as q,
94
+ ra as pa,
95
+ s as r,
96
+ sa as qa,
97
+ t as s,
98
+ u as t,
99
+ v as u,
100
+ va as ra,
101
+ w as v,
102
+ wa as sa,
103
+ x as w,
104
+ xa as ta,
105
+ y as x,
106
+ ya as ua,
107
+ z as y,
108
+ za as va
109
+ } from "./chunk-4LQ6AY6U.js";
110
+ import "./chunk-2ZSPJAIT.js";
111
+ import {
112
+ a as Ia,
113
+ b as Ja,
114
+ c as Ka,
115
+ d as La,
116
+ e as Ma,
117
+ f as Na,
118
+ g as Oa,
119
+ h as Pa,
120
+ i as Qa
121
+ } from "./chunk-W7MCSSFP.js";
122
+ import "./chunk-75Y4IXX5.js";
123
+ import "./chunk-G5ME4WQ6.js";
124
+ import "./chunk-XJFD4WXS.js";
125
+ export {
126
+ t as AGENT_BUILTIN_MCP_TOOL_IDS,
127
+ u as AGENT_BUILTIN_SKILL_IDS,
128
+ s as AGENT_BUILTIN_TOOL_IDS,
129
+ v as AGENT_CAPABILITY_OWNED_SKILL_IDS,
130
+ h as AGENT_RUNTIME_FRAMEWORKS,
131
+ Ma as ASR_PROXY_AUTH_ENV_KEYS,
132
+ Z as BRAND,
133
+ M as BROWSER_CONFIG_DEFAULTS,
134
+ ya as CUSTOM_PROVIDER_ID_PREFIX,
135
+ eb as ConfigFileError,
136
+ i as DEFAULT_AGENT_RUNTIME_FRAMEWORK,
137
+ c as DEFAULT_CU_BACKEND,
138
+ ia as DEFAULT_MODEL_PRESETS,
139
+ $ as DEFAULT_PORT,
140
+ e as DEFAULT_SKILLS_CONFIG,
141
+ g as EXTERNAL_SOURCE_KIND_LIST,
142
+ H as GOAL_CONFIG_DEFAULTS,
143
+ I as GOAL_CONFIG_LIMITS,
144
+ E as GOAL_EVALUATOR_MODEL_POLICIES,
145
+ G as GOAL_SUBAGENT_PROFILES,
146
+ D as GOAL_VERIFICATION_EVIDENCE_MODES,
147
+ C as GOAL_VERIFICATION_MODES,
148
+ F as GOAL_VERIFIER_READONLY_PROFILE,
149
+ m as LEGACY_DATA_DIR_BASENAME,
150
+ Ja as LEGACY_RUNTIME_ENV_KEYS,
151
+ Ua as LOCAL_RUNTIME_AUTH_CONTEXT_FILE,
152
+ wa as MANAGED_MINIMAX_PROVIDER_ID,
153
+ Ia as MANAGED_RUNTIME_KEYS,
154
+ ga as MINIMAX_API_MODEL_CATALOG,
155
+ xa as MINIMAX_API_PROVIDER_ID,
156
+ l as NEW_DATA_DIR_BASENAME,
157
+ aa as OPENCODE_PORT_OFFSET,
158
+ La as PARENT_HINT_KEYS,
159
+ _ as RUNTIME_ENV_PREFIX,
160
+ Ka as RUNTIME_IDENTITY_KEYS,
161
+ P as SANDBOX_CONFIG_DEFAULTS,
162
+ $a as TEST_PORT_ROLE_FLOOR,
163
+ _a as TEST_PORT_ROLE_OFFSET,
164
+ K as TOOL_RESULT_COMPACTION_DEFAULTS,
165
+ ha as allowsManagedMinimaxProviderOverride,
166
+ db as assertCuBackendSupported,
167
+ Na as buildChildEnv,
168
+ Za as clearLocalRuntimeAuthContextFile,
169
+ Ha as compareAndSetLocalModelContext,
170
+ ca as detectGitPortInfo,
171
+ Ta as detectPidOwner,
172
+ Qa as findLegacyRuntimeEnvKeys,
173
+ Sa as formatPidFile,
174
+ ma as getConfig,
175
+ fa as getConfigPath,
176
+ bb as getCuBackend,
177
+ ea as getDataDir,
178
+ o as getLegacyDataDirPath,
179
+ pa as getOpenCodePort,
180
+ n as getPrimaryDataDirPath,
181
+ da as getProfile,
182
+ T as getRuntimeBuildEnv,
183
+ V as getRuntimePresetKey,
184
+ S as getRuntimeRegion,
185
+ O as getSandboxConfigDefaults,
186
+ A as isAgentBuiltinMcpToolEnabled,
187
+ B as isAgentBuiltinSkillEnabled,
188
+ z as isAgentBuiltinToolEnabled,
189
+ X as isBetaFeatureProdReady,
190
+ za as isFirstPartyMinimaxMessagesRoute,
191
+ Y as isInternalBuild,
192
+ ta as isLegacyManagedMinimaxProvider,
193
+ ra as isLocalSourceProvenanceEnabled,
194
+ ua as isManagedProviderBaseUrl,
195
+ U as isManagedRuntime,
196
+ R as isProposalEligibleAgent,
197
+ qa as isTelemetryChannelEnabled,
198
+ Ba as listRouteModelIds,
199
+ fb as loadConfigFromFile,
200
+ q as migrateDefaultDataDir,
201
+ r as migrateProfileDataDir,
202
+ Va as normalizeLocalRuntimeAuthContext,
203
+ x as parseAgentCapabilityConfig,
204
+ k as parseAgentRuntimeConfig,
205
+ j as parseAgentRuntimeFramework,
206
+ w as parseAgentsConfig,
207
+ N as parseBrowserConfig,
208
+ d as parseCuBackend,
209
+ J as parseGoalConfig,
210
+ Ra as parsePidFile,
211
+ a as parseRunawayGuardOverride,
212
+ Q as parseSandboxConfig,
213
+ f as parseSkillsConfig,
214
+ L as parseToolResultCompactionConfig,
215
+ ab as pickTestPort,
216
+ gb as readExplicitBetaFeatureFromFile,
217
+ Xa as readLocalRuntimeAuthContext,
218
+ Da as removeLocalProviderConfig,
219
+ Ea as replaceLocalManagedMinimaxProvider,
220
+ la as resetConfig,
221
+ ba as resetGitDetect,
222
+ y as resolveAgentCapabilities,
223
+ W as resolveBetaFeature,
224
+ p as resolveDataDir,
225
+ Wa as resolveLocalRuntimeAuthContextPath,
226
+ Ca as resolveModelAvailability,
227
+ Aa as resolveModelCallRoute,
228
+ oa as resolvePort,
229
+ na as resolvePromptConfig,
230
+ va as resolveProviderAuthMode,
231
+ b as resolveRunawayGuardConfig,
232
+ cb as setCuBackend,
233
+ ja as setLegacyByokProviderMigrationEnabled,
234
+ ka as setManagedPresetBaseUrlSyncEnabled,
235
+ Oa as stripManagedRuntimeEnv,
236
+ Pa as stripRuntimeBoundaryKeysFrom,
237
+ Fa as updateLocalByokConfig,
238
+ Ga as updateLocalModelSelection,
239
+ Ya as writeLocalRuntimeAuthContext,
240
+ sa as writeTuiStatusLineSetting
241
+ };
@@ -1,15 +1,15 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
2
  import {
3
- a as m,
4
- c as d
3
+ a as d,
4
+ c as a
5
5
  } from "./chunk-43226B56.js";
6
6
  import {
7
- c as s
8
- } from "./chunk-VI572H4P.js";
7
+ c
8
+ } from "./chunk-TLRTDYGW.js";
9
9
  import {
10
- la as i,
11
- sa as l
12
- } from "./chunk-IE2SXA67.js";
10
+ ha as l,
11
+ oa as m
12
+ } from "./chunk-4LQ6AY6U.js";
13
13
  import "./chunk-2ZSPJAIT.js";
14
14
  import "./chunk-W7MCSSFP.js";
15
15
  import "./chunk-75Y4IXX5.js";
@@ -17,45 +17,48 @@ import "./chunk-G5ME4WQ6.js";
17
17
  import "./chunk-XJFD4WXS.js";
18
18
 
19
19
  // packages/tui/src/cli/telemetry-command.ts
20
- function E(o, c, e = {}) {
21
- const r = e.environment ?? process.env;
22
- const u = (e.readConfig ?? l)();
23
- const n = m({
24
- configEnabled: u.telemetry.enabled,
25
- environment: r
26
- });
27
- const t = {
20
+ function M(t, u, e = {}) {
21
+ const s = e.environment ?? process.env;
22
+ const o = (e.readConfig ?? m)();
23
+ const r = (g) => d({ configEnabled: g, environment: s });
24
+ const n = r(o.telemetry.enabled);
25
+ const i = {
28
26
  enabled: n.enabled,
29
27
  configured: n.configured,
30
28
  blockedBy: n.blockedBy ?? null,
31
- configFile: (e.readConfigPath ?? i)(),
32
- optInSetting: { telemetry: { enabled: true } },
29
+ configFile: (e.readConfigPath ?? l)(),
30
+ channels: {
31
+ usage: n,
32
+ metrics: r(o.telemetry.metrics),
33
+ diagnostics: r(o.telemetry.diagnostics)
34
+ },
35
+ optInSetting: { telemetry: { enabled: true, metrics: true, diagnostics: true } },
33
36
  optOutEnvironment: ["MCODE_DISABLE_TELEMETRY=1", "DO_NOT_TRACK=1"]
34
37
  };
35
- if (o === "status") return `${JSON.stringify(t, null, 2)}
38
+ if (t === "status") return `${JSON.stringify(i, null, 2)}
36
39
  `;
37
40
  if (!n.enabled) {
38
41
  return `${JSON.stringify(
39
42
  {
40
- ...t,
43
+ ...i,
41
44
  request: null,
42
- message: "Telemetry is disabled. No business telemetry request will be sent."
45
+ message: "Usage telemetry is disabled. No business telemetry request will be sent."
43
46
  },
44
47
  null,
45
48
  2
46
49
  )}
47
50
  `;
48
51
  }
49
- const a = (e.resolveEnvironment ?? y)(r);
52
+ const y = (e.resolveEnvironment ?? f)(s);
50
53
  return `${JSON.stringify(
51
54
  {
52
- ...t,
53
- request: d(
55
+ ...i,
56
+ request: a(
54
57
  "tui_launch",
55
58
  { launch_type: "cold" },
56
59
  {
57
- ...a,
58
- version: c,
60
+ ...y,
61
+ version: u,
59
62
  now: e.now,
60
63
  randomId: e.randomId
61
64
  }
@@ -66,11 +69,11 @@ function E(o, c, e = {}) {
66
69
  )}
67
70
  `;
68
71
  }
69
- function y(o) {
70
- return s({
71
- runtimeRegion: o.MAVIS_REGION === "en" ? "en" : "cn"
72
+ function f(t) {
73
+ return c({
74
+ runtimeRegion: t.MAVIS_REGION === "en" ? "en" : "cn"
72
75
  });
73
76
  }
74
77
  export {
75
- E as runMcodeTelemetryCommand
78
+ M as runMcodeTelemetryCommand
76
79
  };
package/cli.js CHANGED
@@ -12,9 +12,9 @@ import "./chunks/chunk-CGBVBNBI.js";
12
12
  import {
13
13
  k as o,
14
14
  m as i
15
- } from "./chunks/chunk-7YLPPLGD.js";
16
- import "./chunks/chunk-VI572H4P.js";
17
- import "./chunks/chunk-IE2SXA67.js";
15
+ } from "./chunks/chunk-RGWKF4KQ.js";
16
+ import "./chunks/chunk-TLRTDYGW.js";
17
+ import "./chunks/chunk-4LQ6AY6U.js";
18
18
  import "./chunks/chunk-2ZSPJAIT.js";
19
19
  import "./chunks/chunk-W7MCSSFP.js";
20
20
  import "./chunks/chunk-75Y4IXX5.js";
@@ -38,14 +38,14 @@ async function l() {
38
38
  process.exitCode = 1;
39
39
  return;
40
40
  }
41
- const { getTuiDataDirPath: m } = await import("./chunks/data-dir-KARX6GVW.js");
41
+ const { getTuiDataDirPath: m } = await import("./chunks/data-dir-JPSZUMZL.js");
42
42
  o({
43
43
  dataDir: m(),
44
44
  ...r ? { startupBuildEnvironment: r } : {}
45
45
  });
46
46
  const p = await s();
47
47
  try {
48
- const { runTuiCli: e } = await import("./chunks/main-FFDCHTPN.js");
48
+ const { runTuiCli: e } = await import("./chunks/main-AVQUIMQJ.js");
49
49
  await e({ allowStartupEnvironmentSelection: t });
50
50
  } finally {
51
51
  p.remove();