jinzd-ai-cli 0.4.267 → 0.4.269

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 (31) hide show
  1. package/dist/{batch-GY5MAN5F.js → batch-HUOYPVJQ.js} +2 -2
  2. package/dist/{chunk-THHPKZJ3.js → chunk-3TOMHXDW.js} +1 -1
  3. package/dist/{chunk-7HECI3U5.js → chunk-4HTJMLFY.js} +3 -1
  4. package/dist/{chunk-EWRZMIQE.js → chunk-5IUFUCIT.js} +1 -1
  5. package/dist/{chunk-WPN7LDLM.js → chunk-5PRWBJCI.js} +1 -1
  6. package/dist/{chunk-QN7WD2SM.js → chunk-6PROC2JO.js} +3 -3
  7. package/dist/{chunk-6C6FLDGH.js → chunk-AAERHPBN.js} +1 -1
  8. package/dist/{chunk-5AEOIETL.js → chunk-DJNGUPM3.js} +4 -4
  9. package/dist/{chunk-FI6IWUXW.js → chunk-KIHNZBEA.js} +1 -1
  10. package/dist/{chunk-ARYCWJN6.js → chunk-NVN3FHXI.js} +1 -1
  11. package/dist/{chunk-RVNL7MQG.js → chunk-QPPUYCRF.js} +1 -1
  12. package/dist/{chunk-JH343BDI.js → chunk-S3F5LOV3.js} +313 -2
  13. package/dist/{chunk-XLLUQEGO.js → chunk-V6KQ67VF.js} +1 -1
  14. package/dist/{chunk-5CU72V6P.js → chunk-XJAGGJVU.js} +3 -3
  15. package/dist/{ci-MUEQSNKU.js → ci-4QS2J7BG.js} +4 -4
  16. package/dist/{ci-format-2ZGGSOFK.js → ci-format-6L6M67WC.js} +2 -2
  17. package/dist/{constants-SZTJESDF.js → constants-IO5VJLEE.js} +1 -1
  18. package/dist/{doctor-cli-Z272364P.js → doctor-cli-ZU4E2DDL.js} +4 -4
  19. package/dist/electron-server.js +455 -58
  20. package/dist/{hub-MRLGKMRI.js → hub-AMDWXSKZ.js} +1 -1
  21. package/dist/index.js +117 -245
  22. package/dist/{persistent-memory-3FTOC7QT.js → persistent-memory-52SE5K44.js} +2 -2
  23. package/dist/{persistent-memory-HZASMDJQ.js → persistent-memory-H4DNDIOQ.js} +2 -2
  24. package/dist/{pr-VLLIALRK.js → pr-Z4O5H6I3.js} +4 -4
  25. package/dist/{run-tests-NTDZ6DDU.js → run-tests-FZSYHWYX.js} +2 -2
  26. package/dist/{run-tests-6MWE6D5S.js → run-tests-PYKKYMPA.js} +2 -2
  27. package/dist/{server-IALCWKSU.js → server-WTJSM2MT.js} +147 -41
  28. package/dist/{server-SP3AEHRQ.js → server-ZSTVYSYC.js} +5 -5
  29. package/dist/{task-orchestrator-Q6WFFI4J.js → task-orchestrator-PNLI3V36.js} +5 -5
  30. package/dist/{usage-DJDLHICZ.js → usage-GVFUVYUG.js} +2 -2
  31. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-EWRZMIQE.js";
4
+ } from "./chunk-5IUFUCIT.js";
5
5
  import "./chunk-TU3L3PW7.js";
6
- import "./chunk-THHPKZJ3.js";
6
+ import "./chunk-3TOMHXDW.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.267";
4
+ var VERSION = "0.4.269";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.267";
2
+ var VERSION = "0.4.269";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -82,6 +82,7 @@ var SUBAGENT_ALLOWED_TOOLS = /* @__PURE__ */ new Set([
82
82
  "find_references",
83
83
  "search_code"
84
84
  ]);
85
+ var CONTEXT_PRESSURE_THRESHOLD = 0.8;
85
86
  var TEST_TIMEOUT = 3e5;
86
87
  var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
87
88
 
@@ -155,6 +156,7 @@ export {
155
156
  SUBAGENT_DEFAULT_MAX_ROUNDS,
156
157
  SUBAGENT_MAX_ROUNDS_LIMIT,
157
158
  SUBAGENT_ALLOWED_TOOLS,
159
+ CONTEXT_PRESSURE_THRESHOLD,
158
160
  TEST_TIMEOUT,
159
161
  AGENTIC_BEHAVIOR_GUIDELINE,
160
162
  buildUserIdentityPrompt,
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-THHPKZJ3.js";
11
+ } from "./chunk-3TOMHXDW.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-THHPKZJ3.js";
5
+ } from "./chunk-3TOMHXDW.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AUEX6RNY.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-EWRZMIQE.js";
7
+ } from "./chunk-5IUFUCIT.js";
8
8
  import {
9
9
  getActivePluginAssets,
10
10
  getPendingHookTrust,
@@ -14,7 +14,7 @@ import {
14
14
  listHooks,
15
15
  listInstalledPlugins,
16
16
  resetStats
17
- } from "./chunk-WPN7LDLM.js";
17
+ } from "./chunk-5PRWBJCI.js";
18
18
  import {
19
19
  getGitRoot
20
20
  } from "./chunk-HOSJZMQS.js";
@@ -26,7 +26,7 @@ import {
26
26
  MCP_PROJECT_CONFIG_NAME,
27
27
  MEMORY_FILE_NAME,
28
28
  VERSION
29
- } from "./chunk-THHPKZJ3.js";
29
+ } from "./chunk-3TOMHXDW.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-THHPKZJ3.js";
4
+ } from "./chunk-3TOMHXDW.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -7,7 +7,7 @@ import {
7
7
  searchPersistentMemories,
8
8
  touchMemoryReferences,
9
9
  updateMemoryEntry
10
- } from "./chunk-RVNL7MQG.js";
10
+ } from "./chunk-QPPUYCRF.js";
11
11
  import {
12
12
  indexProject
13
13
  } from "./chunk-GLSR2NR3.js";
@@ -26,7 +26,7 @@ import {
26
26
  runHook,
27
27
  runLifecycleHooks,
28
28
  runTool
29
- } from "./chunk-WPN7LDLM.js";
29
+ } from "./chunk-5PRWBJCI.js";
30
30
  import {
31
31
  buildTruncatedArgumentsError,
32
32
  getDangerLevel,
@@ -43,14 +43,14 @@ import {
43
43
  } from "./chunk-4BKXL7SM.js";
44
44
  import {
45
45
  runTestsTool
46
- } from "./chunk-XLLUQEGO.js";
46
+ } from "./chunk-V6KQ67VF.js";
47
47
  import {
48
48
  CONFIG_DIR_NAME,
49
49
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
50
50
  SUBAGENT_ALLOWED_TOOLS,
51
51
  SUBAGENT_DEFAULT_MAX_ROUNDS,
52
52
  SUBAGENT_MAX_ROUNDS_LIMIT
53
- } from "./chunk-THHPKZJ3.js";
53
+ } from "./chunk-3TOMHXDW.js";
54
54
  import {
55
55
  loadChatIndex,
56
56
  searchChatMemory
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-7HECI3U5.js";
9
+ } from "./chunk-4HTJMLFY.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-6BUTA5VW.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-7HECI3U5.js";
3
+ } from "./chunk-4HTJMLFY.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-THHPKZJ3.js";
9
+ } from "./chunk-3TOMHXDW.js";
10
10
  import {
11
11
  DEFAULT_PATTERNS,
12
12
  redactString
@@ -3,18 +3,24 @@ import {
3
3
  computeCost
4
4
  } from "./chunk-R7GERZDA.js";
5
5
  import {
6
+ estimateTokens,
6
7
  truncateForPersist
7
- } from "./chunk-5AEOIETL.js";
8
+ } from "./chunk-DJNGUPM3.js";
9
+ import {
10
+ isMemoryExpired,
11
+ isMemoryStale
12
+ } from "./chunk-QPPUYCRF.js";
8
13
  import {
9
14
  APP_NAME,
10
15
  CONFIG_DIR_NAME,
16
+ CONTEXT_PRESSURE_THRESHOLD,
11
17
  DEV_STATE_FILE_NAME,
12
18
  MCP_CALL_TIMEOUT,
13
19
  MCP_CONNECT_TIMEOUT,
14
20
  MCP_PROTOCOL_VERSION,
15
21
  MCP_TOOL_PREFIX,
16
22
  VERSION
17
- } from "./chunk-THHPKZJ3.js";
23
+ } from "./chunk-3TOMHXDW.js";
18
24
  import {
19
25
  atomicWriteFileSync
20
26
  } from "./chunk-IW3Q7AE5.js";
@@ -891,6 +897,84 @@ Output the Markdown content directly, do not wrap the entire file in a code bloc
891
897
  return parts.join("\n");
892
898
  }
893
899
 
900
+ // src/core/memory-filters.ts
901
+ function parseFlags(items) {
902
+ const flags = {};
903
+ const text = [];
904
+ for (let i = 0; i < items.length; i++) {
905
+ const item = items[i];
906
+ if (item.startsWith("--")) {
907
+ const key = item.slice(2);
908
+ const next = items[i + 1];
909
+ if (next && !next.startsWith("--")) {
910
+ flags[key] = next;
911
+ i++;
912
+ } else {
913
+ flags[key] = true;
914
+ }
915
+ } else {
916
+ text.push(item);
917
+ }
918
+ }
919
+ return { flags, text: text.join(" ").trim() };
920
+ }
921
+ var SCOPES = /* @__PURE__ */ new Set(["personal", "project", "session", "team"]);
922
+ var BOOLEAN_FLAGS = ["pending", "orphaned"];
923
+ function parseMemoryShowFilters(args) {
924
+ const { flags, text } = parseFlags(args);
925
+ const strayTerms = [];
926
+ for (const key of BOOLEAN_FLAGS) {
927
+ const v = flags[key];
928
+ if (typeof v === "string") {
929
+ strayTerms.push(v);
930
+ flags[key] = true;
931
+ }
932
+ }
933
+ const scopeRaw = flags["scope"];
934
+ const freeText = [text, ...strayTerms].filter(Boolean).join(" ").trim();
935
+ const searchRaw = typeof flags["search"] === "string" ? flags["search"] : freeText || void 0;
936
+ const staleRaw = flags["stale"];
937
+ let staleDays;
938
+ let invalidStale = false;
939
+ if (staleRaw !== void 0) {
940
+ const n = typeof staleRaw === "string" ? Number(staleRaw) : NaN;
941
+ if (!Number.isFinite(n) || n <= 0) invalidStale = true;
942
+ else staleDays = n;
943
+ }
944
+ return {
945
+ pending: flags["pending"] === true,
946
+ orphaned: flags["orphaned"] === true,
947
+ scope: typeof scopeRaw === "string" && SCOPES.has(scopeRaw) ? scopeRaw : void 0,
948
+ search: searchRaw?.toLowerCase(),
949
+ staleDays,
950
+ invalidStale
951
+ };
952
+ }
953
+ function filterMemoryEntries(entries, filters) {
954
+ let out = entries;
955
+ const applied = [];
956
+ if (filters.orphaned) applied.push("orphaned");
957
+ if (filters.pending) {
958
+ out = out.filter((m) => !m.approved && !isMemoryExpired(m));
959
+ applied.push("pending");
960
+ }
961
+ if (filters.scope) {
962
+ out = out.filter((m) => m.scope === filters.scope);
963
+ applied.push(`scope:${filters.scope}`);
964
+ }
965
+ if (filters.search) {
966
+ const q = filters.search;
967
+ out = out.filter((m) => m.content.toLowerCase().includes(q) || m.id.startsWith(q));
968
+ applied.push(`search:"${q}"`);
969
+ }
970
+ if (filters.staleDays !== void 0) {
971
+ const days = filters.staleDays;
972
+ out = out.filter((m) => isMemoryStale(m, days));
973
+ applied.push(`stale>${days}d`);
974
+ }
975
+ return { entries: out, applied };
976
+ }
977
+
894
978
  // src/session/tool-history.ts
895
979
  var SESSION_SIZE_LIMIT = 2 * 1024 * 1024;
896
980
  function persistToolRound(session, toolCalls, toolResults, opts) {
@@ -978,6 +1062,112 @@ function autoTrimSessionIfNeeded(session, sizeLimit = SESSION_SIZE_LIMIT) {
978
1062
  return committedSize < originalSize;
979
1063
  }
980
1064
 
1065
+ // src/core/context-pressure.ts
1066
+ function estimateConversationTokens(input) {
1067
+ let total = 0;
1068
+ if (input.systemPrompt) total += estimateTokens(input.systemPrompt);
1069
+ for (const msg of input.messages) {
1070
+ if (typeof msg.content === "string") {
1071
+ total += estimateTokens(msg.content);
1072
+ } else if (Array.isArray(msg.content)) {
1073
+ for (const part of msg.content) {
1074
+ if (part.type === "text" && part.text) total += estimateTokens(part.text);
1075
+ }
1076
+ }
1077
+ if (msg.toolCalls) {
1078
+ for (const tc of msg.toolCalls) {
1079
+ total += estimateTokens(JSON.stringify(tc.arguments));
1080
+ }
1081
+ }
1082
+ }
1083
+ return total;
1084
+ }
1085
+ function evaluateContextPressure(input) {
1086
+ if (input.contextWindow <= 0) return { shouldCompact: false, ratio: null, percent: null };
1087
+ const ratio = input.estimatedTokens / input.contextWindow;
1088
+ const threshold = input.threshold ?? CONTEXT_PRESSURE_THRESHOLD;
1089
+ return {
1090
+ shouldCompact: input.autoCompactEnabled && ratio >= threshold,
1091
+ ratio,
1092
+ percent: Math.round(ratio * 100)
1093
+ };
1094
+ }
1095
+ var AUTO_COMPACT_INSTRUCTION = "Preserve key context, compress old content, ensure seamless continuation";
1096
+
1097
+ // src/core/model-router.ts
1098
+ var TAG_REGEX = /(?:^|\s)#([a-zA-Z][\w-]{0,31})\b/g;
1099
+ function extractTags(message) {
1100
+ const tags = /* @__PURE__ */ new Set();
1101
+ let m;
1102
+ TAG_REGEX.lastIndex = 0;
1103
+ while ((m = TAG_REGEX.exec(message)) !== null) {
1104
+ tags.add(m[1].toLowerCase());
1105
+ }
1106
+ return tags;
1107
+ }
1108
+ function matches(message, matcher) {
1109
+ const trimmed = message.trim();
1110
+ const lower = trimmed.toLowerCase();
1111
+ if (matcher.tag) {
1112
+ const tags = extractTags(trimmed);
1113
+ if (!tags.has(matcher.tag.toLowerCase())) return false;
1114
+ }
1115
+ if (matcher.contains && matcher.contains.length > 0) {
1116
+ const hit = matcher.contains.some((kw) => lower.includes(kw.toLowerCase()));
1117
+ if (!hit) return false;
1118
+ }
1119
+ if (typeof matcher.maxLength === "number") {
1120
+ if (trimmed.length > matcher.maxLength) return false;
1121
+ }
1122
+ if (typeof matcher.minLength === "number") {
1123
+ if (trimmed.length < matcher.minLength) return false;
1124
+ }
1125
+ const hasAnyCondition = !!matcher.tag || matcher.contains && matcher.contains.length > 0 || typeof matcher.maxLength === "number" || typeof matcher.minLength === "number";
1126
+ return !!hasAnyCondition;
1127
+ }
1128
+ function pickModel(message, currentModel, config, availableModels = []) {
1129
+ if (!config.enabled || config.rules.length === 0) {
1130
+ return { model: currentModel, reason: "routing disabled", overridden: false };
1131
+ }
1132
+ const isAvailable = (m) => availableModels.length === 0 || availableModels.includes(m);
1133
+ for (let i = 0; i < config.rules.length; i++) {
1134
+ const rule = config.rules[i];
1135
+ if (!matches(message, rule.match)) continue;
1136
+ if (!isAvailable(rule.model)) continue;
1137
+ if (rule.model === currentModel) {
1138
+ return {
1139
+ model: currentModel,
1140
+ reason: `rule "${rule.name ?? `#${i}`}" matched (same as current)`,
1141
+ overridden: false,
1142
+ ruleIdx: i
1143
+ };
1144
+ }
1145
+ return {
1146
+ model: rule.model,
1147
+ reason: `rule "${rule.name ?? `#${i}`}" matched`,
1148
+ overridden: true,
1149
+ ruleIdx: i
1150
+ };
1151
+ }
1152
+ if (config.fallback && config.fallback !== currentModel && isAvailable(config.fallback)) {
1153
+ return {
1154
+ model: config.fallback,
1155
+ reason: "fallback",
1156
+ overridden: true
1157
+ };
1158
+ }
1159
+ return { model: currentModel, reason: "no rule matched", overridden: false };
1160
+ }
1161
+ function stripRoutingTags(message) {
1162
+ return message.replace(/(?:^|\s)#(fast|deep|default)\b/gi, " ").replace(/\s{2,}/g, " ").trim();
1163
+ }
1164
+ function decideModel(input) {
1165
+ if (!input.routingConfig || !input.routingConfig.enabled) {
1166
+ return { model: input.currentModel, reason: "routing disabled", overridden: false };
1167
+ }
1168
+ return pickModel(input.userInput, input.currentModel, input.routingConfig, input.availableModels);
1169
+ }
1170
+
981
1171
  // src/repl/dev-state.ts
982
1172
  import { existsSync as existsSync3, readFileSync as readFileSync3, unlinkSync, mkdirSync as mkdirSync2 } from "fs";
983
1173
  import { join as join3 } from "path";
@@ -1130,6 +1320,119 @@ function applyThinkCommand(sub, state) {
1130
1320
  return stay(`Unknown /think option "${sub}" \u2014 expected on | off | low | high | max | status`);
1131
1321
  }
1132
1322
 
1323
+ // src/core/profile-command.ts
1324
+ var PROFILE_FIELDS = ["name", "nickname", "role", "bio", "interests", "locale", "extra"];
1325
+ function stripSurroundingQuotes(value) {
1326
+ const pairs = [['"', '"'], ["'", "'"], ["\u201C", "\u201D"], ["\u2018", "\u2019"], ["\u300C", "\u300D"]];
1327
+ for (const [open, close] of pairs) {
1328
+ if (value.length >= 2 && value.startsWith(open) && value.endsWith(close)) {
1329
+ return value.slice(open.length, value.length - close.length).trim();
1330
+ }
1331
+ }
1332
+ return value;
1333
+ }
1334
+ function showRows(profile) {
1335
+ const rows = [];
1336
+ if (profile.name) rows.push(["Name", profile.name]);
1337
+ if (profile.nickname) rows.push(["Nickname", profile.nickname]);
1338
+ if (profile.role) rows.push(["Role", profile.role]);
1339
+ if (profile.bio) rows.push(["Bio", profile.bio]);
1340
+ if (profile.interests?.length) rows.push(["Interests", profile.interests.join(", ")]);
1341
+ if (profile.locale) rows.push(["Locale", profile.locale]);
1342
+ if (profile.extra) {
1343
+ rows.push(["Extra", profile.extra.length > 80 ? `${profile.extra.slice(0, 80)}\u2026` : profile.extra]);
1344
+ }
1345
+ return rows;
1346
+ }
1347
+ function applyProfileCommand(args, profile) {
1348
+ const sub = (args[0] ?? "show").toLowerCase();
1349
+ if (sub === "show" || sub === "view") {
1350
+ const rows = showRows(profile);
1351
+ if (rows.length === 0) {
1352
+ return {
1353
+ summary: "No profile configured yet.",
1354
+ rows: [],
1355
+ details: ["Set one with /profile set <field> <value> \u2014 it is injected into every conversation."],
1356
+ changed: false,
1357
+ isError: false
1358
+ };
1359
+ }
1360
+ return {
1361
+ summary: "\u{1F464} Your Profile",
1362
+ rows,
1363
+ details: ["This identity is injected into every AI conversation."],
1364
+ changed: false,
1365
+ isError: false
1366
+ };
1367
+ }
1368
+ if (sub === "clear") {
1369
+ return {
1370
+ profile: {},
1371
+ summary: "Profile cleared. The AI will no longer know who you are.",
1372
+ rows: [],
1373
+ details: [],
1374
+ changed: true,
1375
+ isError: false
1376
+ };
1377
+ }
1378
+ if (sub === "set") {
1379
+ const field = args[1];
1380
+ const value = args.slice(2).join(" ").trim();
1381
+ if (!field || !PROFILE_FIELDS.includes(field)) {
1382
+ return {
1383
+ summary: "Usage: /profile set <field> <value>",
1384
+ rows: [],
1385
+ details: [`Fields: ${PROFILE_FIELDS.join(", ")}`],
1386
+ changed: false,
1387
+ isError: true
1388
+ };
1389
+ }
1390
+ if (!value) {
1391
+ return {
1392
+ summary: `Usage: /profile set ${field} <value>`,
1393
+ rows: [],
1394
+ details: [],
1395
+ changed: false,
1396
+ isError: true
1397
+ };
1398
+ }
1399
+ const updated = { ...profile };
1400
+ if (field === "interests") {
1401
+ updated.interests = value.split(",").map((s) => stripSurroundingQuotes(s.trim())).filter(Boolean);
1402
+ } else {
1403
+ updated[field] = stripSurroundingQuotes(value);
1404
+ }
1405
+ const shown = field === "interests" ? (updated.interests ?? []).join(", ") : stripSurroundingQuotes(value);
1406
+ return {
1407
+ profile: updated,
1408
+ summary: `Profile updated: ${field} = ${shown}`,
1409
+ rows: [],
1410
+ details: [],
1411
+ changed: true,
1412
+ isError: false
1413
+ };
1414
+ }
1415
+ if (sub === "edit") {
1416
+ return {
1417
+ summary: "Interactive editing lives in the setup wizard.",
1418
+ rows: [],
1419
+ details: [
1420
+ "Run `aicli config` in a terminal, or use /profile set <field> <value> here.",
1421
+ `Fields: ${PROFILE_FIELDS.join(", ")}`
1422
+ ],
1423
+ changed: false,
1424
+ isError: false
1425
+ };
1426
+ }
1427
+ return {
1428
+ summary: `Unknown /profile option "${args[0]}" \u2014 expected show | set | clear | edit`,
1429
+ rows: [],
1430
+ details: [],
1431
+ changed: false,
1432
+ isError: true
1433
+ };
1434
+ }
1435
+
1133
1436
  // src/core/git-diff.ts
1134
1437
  import { execFileSync } from "child_process";
1135
1438
  function readGitDiff(options = {}) {
@@ -1178,15 +1481,23 @@ function costSourceNote(source) {
1178
1481
 
1179
1482
  export {
1180
1483
  applyThinkCommand,
1484
+ applyProfileCommand,
1181
1485
  readGitDiff,
1182
1486
  scanDirTree,
1183
1487
  scanProject,
1184
1488
  buildInitPrompt,
1489
+ parseMemoryShowFilters,
1490
+ filterMemoryEntries,
1185
1491
  buildSessionCostReport,
1186
1492
  costSourceNote,
1187
1493
  parseSimpleYaml,
1188
1494
  persistToolRound,
1189
1495
  autoTrimSessionIfNeeded,
1496
+ estimateConversationTokens,
1497
+ evaluateContextPressure,
1498
+ AUTO_COMPACT_INSTRUCTION,
1499
+ stripRoutingTags,
1500
+ decideModel,
1190
1501
  SNAPSHOT_PROMPT,
1191
1502
  sessionHasMeaningfulContent,
1192
1503
  saveDevState,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-THHPKZJ3.js";
4
+ } from "./chunk-3TOMHXDW.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-6C6FLDGH.js";
5
+ } from "./chunk-AAERHPBN.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-AUEX6RNY.js";
17
17
  import {
18
18
  ConfigManager
19
- } from "./chunk-EWRZMIQE.js";
19
+ } from "./chunk-5IUFUCIT.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-THHPKZJ3.js";
22
+ } from "./chunk-3TOMHXDW.js";
23
23
 
24
24
  // src/cli/ci.ts
25
25
  import { execFileSync } from "child_process";
@@ -3,15 +3,15 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-5CU72V6P.js";
7
- import "./chunk-6C6FLDGH.js";
6
+ } from "./chunk-XJAGGJVU.js";
7
+ import "./chunk-AAERHPBN.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
10
  import "./chunk-AUEX6RNY.js";
11
- import "./chunk-EWRZMIQE.js";
11
+ import "./chunk-5IUFUCIT.js";
12
12
  import "./chunk-3OBY7WSS.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
- import "./chunk-THHPKZJ3.js";
14
+ import "./chunk-3TOMHXDW.js";
15
15
  import "./chunk-IW3Q7AE5.js";
16
16
  export {
17
17
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-6C6FLDGH.js";
10
- import "./chunk-THHPKZJ3.js";
9
+ } from "./chunk-AAERHPBN.js";
10
+ import "./chunk-3TOMHXDW.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-THHPKZJ3.js";
41
+ } from "./chunk-3TOMHXDW.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-QN7WD2SM.js";
5
+ } from "./chunk-6PROC2JO.js";
6
6
  import "./chunk-AUEX6RNY.js";
7
- import "./chunk-EWRZMIQE.js";
8
- import "./chunk-WPN7LDLM.js";
7
+ import "./chunk-5IUFUCIT.js";
8
+ import "./chunk-5PRWBJCI.js";
9
9
  import "./chunk-3OBY7WSS.js";
10
10
  import "./chunk-TU3L3PW7.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-THHPKZJ3.js";
12
+ import "./chunk-3TOMHXDW.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,