@i14ks/ccv 0.17.3 → 0.19.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 (27) hide show
  1. package/bundle/ccv.mjs +57 -3
  2. package/package.json +1 -1
  3. package/web/assets/{codemirror-lu8HamKP.js → codemirror-BrLcp4sb.js} +1 -1
  4. package/web/assets/{index-BuyfXyo4.js → index-2eTZZkmV.js} +1 -1
  5. package/web/assets/{index-BUWJHuYf.js → index-6AoeJwuj.js} +1 -1
  6. package/web/assets/{index-CcKtEXQw.js → index-7LSjuWYp.js} +1 -1
  7. package/web/assets/{index-B7ozEwgu.js → index-B308Zs-7.js} +1 -1
  8. package/web/assets/{index-Cc7JijiI.js → index-BB8C49mo.js} +1 -1
  9. package/web/assets/{index-C13Jucn1.js → index-BLgzE6_-.js} +1 -1
  10. package/web/assets/index-BUb95YHi.js +134 -0
  11. package/web/assets/{index-CqZsTMCh.js → index-BW6uFCoV.js} +1 -1
  12. package/web/assets/{index-Dj1v9Gkj.js → index-BeHb7RMj.js} +1 -1
  13. package/web/assets/index-CDFIyBFM.css +1 -0
  14. package/web/assets/{index-DNoT5Ala.js → index-CKsgdAOW.js} +1 -1
  15. package/web/assets/{index-DIGg_HG2.js → index-Cw-SkQ7f.js} +1 -1
  16. package/web/assets/{index-D9R4w6Zg.js → index-DMdUw04H.js} +1 -1
  17. package/web/assets/{index-D5k_lqHb.js → index-DQz01d1h.js} +1 -1
  18. package/web/assets/{index-BJqZWIPR.js → index-DT-n8jho.js} +1 -1
  19. package/web/assets/{index-BfxQTveJ.js → index-DXY0QGeO.js} +1 -1
  20. package/web/assets/{index-D37eFo7a.js → index-DrsxSUf0.js} +1 -1
  21. package/web/assets/{index-Dvlp7Iqq.js → index-XrDqYi4a.js} +1 -1
  22. package/web/assets/{index-Drc8TpEz.js → index-ZCACtBsD.js} +1 -1
  23. package/web/assets/{index-DmaRIPd6.js → index-cXMV_yZe.js} +1 -1
  24. package/web/assets/{index-3sshvreD.js → index-heoNU_6a.js} +1 -1
  25. package/web/index.html +2 -2
  26. package/web/assets/index-C4wYlk_J.js +0 -134
  27. package/web/assets/index-ChuReHk_.css +0 -1
package/bundle/ccv.mjs CHANGED
@@ -2144,6 +2144,22 @@ var ClaudeSession = class extends EventEmitter {
2144
2144
  await this.#query?.setMcpServers(Object.fromEntries(this.#dynamicMcp));
2145
2145
  return true;
2146
2146
  }
2147
+ /**
2148
+ * Переподключить сервер любой области — проектный, пользовательский,
2149
+ * плагинный. Слэш-командой `/mcp reconnect` нельзя: в SDK-режиме CLI на неё
2150
+ * отвечает «aren't available in this session». Бросает при неудаче.
2151
+ */
2152
+ async reconnectMcpServer(name) {
2153
+ if (!this.#query)
2154
+ throw new Error("\u0421\u0435\u0441\u0441\u0438\u044F \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u0430");
2155
+ await this.#query.reconnectMcpServer(name);
2156
+ }
2157
+ /** Включить или выключить сервер — тот же обход слэш-команды, что выше. */
2158
+ async toggleMcpServer(name, enabled) {
2159
+ if (!this.#query)
2160
+ throw new Error("\u0421\u0435\u0441\u0441\u0438\u044F \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u0430");
2161
+ await this.#query.toggleMcpServer(name, enabled);
2162
+ }
2147
2163
  /** Перечитать плагины с диска — после установки через внешний CLI. */
2148
2164
  async reloadPlugins() {
2149
2165
  const result = await this.#query?.reloadPlugins();
@@ -3624,6 +3640,12 @@ Attached image${paths.length > 1 ? "s" : ""} (view them with your file viewing t
3624
3640
  async removeMcpServer(_name) {
3625
3641
  return false;
3626
3642
  }
3643
+ async reconnectMcpServer(_name) {
3644
+ throw new Error("MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u044B Antigravity \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0430\u043C\u043E\u043C agy (`agy mcp`)");
3645
+ }
3646
+ async toggleMcpServer(_name, _enabled) {
3647
+ throw new Error("MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u044B Antigravity \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0430\u043C\u043E\u043C agy (`agy mcp`)");
3648
+ }
3627
3649
  setTitle(title) {
3628
3650
  this.#record.title = title;
3629
3651
  this.#titleIsDefault = false;
@@ -6092,6 +6114,7 @@ var DEFAULT_AUTO_STOP_AFTER_MS = 10 * 60 * 1e3;
6092
6114
  var MIN_AUTO_STOP_AFTER_MS = 60 * 1e3;
6093
6115
  var MIN_AUTO_SAVE_AFTER_PAUSE_MS = 500;
6094
6116
  var FOLDER_ACCESS = ["all", "projects", "project"];
6117
+ var PROVIDERS = ["claude", "antigravity"];
6095
6118
  var PERMISSION_MODES = [
6096
6119
  "default",
6097
6120
  "acceptEdits",
@@ -6124,7 +6147,9 @@ var DEFAULT_APP_SETTINGS = {
6124
6147
  // ему нужно место. Недельное — у самого края: до сброса там может быть
6125
6148
  // несколько дней, и терять их из-за пары процентов жалко.
6126
6149
  limitStopFiveHourPct: 95,
6127
- limitStopSevenDayPct: 99
6150
+ limitStopSevenDayPct: 99,
6151
+ // Оба: до появления настройки приложение предлагало обоих агентов.
6152
+ enabledProviders: ["claude", "antigravity"]
6128
6153
  };
6129
6154
  var AppSettingsStore = class {
6130
6155
  #settings = { ...DEFAULT_APP_SETTINGS };
@@ -6203,6 +6228,12 @@ function sanitize2(value, fallback) {
6203
6228
  result[key] = pct <= 0 ? 0 : Math.min(Math.max(Math.round(pct), 1), 100);
6204
6229
  }
6205
6230
  }
6231
+ const providers = record.enabledProviders;
6232
+ if (Array.isArray(providers)) {
6233
+ const picked = PROVIDERS.filter((p) => providers.includes(p));
6234
+ if (picked.length > 0)
6235
+ result.enabledProviders = picked;
6236
+ }
6206
6237
  return result;
6207
6238
  }
6208
6239
  function claudeHome() {
@@ -6334,7 +6365,9 @@ function crossedLimit(usage, settings, fired, now = Date.now()) {
6334
6365
  if (!window || threshold <= 0 || window.utilization < threshold)
6335
6366
  continue;
6336
6367
  const parsed = Date.parse(window.resetsAt);
6337
- const resets = Number.isFinite(parsed) && parsed > now ? parsed : null;
6368
+ if (Number.isFinite(parsed) && parsed <= now)
6369
+ continue;
6370
+ const resets = Number.isFinite(parsed) ? parsed : null;
6338
6371
  if (fired(limit, resets))
6339
6372
  continue;
6340
6373
  const until = resets ?? now + WINDOW_SPAN_MS[limit];
@@ -8111,7 +8144,24 @@ var HostServer = class {
8111
8144
  return;
8112
8145
  }
8113
8146
  case "mcp.action": {
8114
- this.#requireSession(frame.sessionId).sendPrompt(`/mcp ${frame.action} ${frame.name}`);
8147
+ const session = this.#requireSession(frame.sessionId);
8148
+ const { name, action } = frame;
8149
+ let ok = true;
8150
+ let message;
8151
+ try {
8152
+ if (action === "reconnect") {
8153
+ await session.reconnectMcpServer(name);
8154
+ message = `\u0421\u0435\u0440\u0432\u0435\u0440 \xAB${name}\xBB \u043F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D`;
8155
+ } else {
8156
+ await session.toggleMcpServer(name, action === "enable");
8157
+ message = `\u0421\u0435\u0440\u0432\u0435\u0440 \xAB${name}\xBB ${action === "enable" ? "\u0432\u043A\u043B\u044E\u0447\u0451\u043D" : "\u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D"}`;
8158
+ }
8159
+ } catch (error) {
8160
+ ok = false;
8161
+ message = error instanceof Error ? error.message : String(error);
8162
+ }
8163
+ this.#reportOperation(frame.sessionId, "mcp", ok, message);
8164
+ await this.#sendMcpList(frame.sessionId);
8115
8165
  return;
8116
8166
  }
8117
8167
  case "plugin.list":
@@ -8823,6 +8873,10 @@ var HostServer = class {
8823
8873
  const workspace = this.#workspaces.find(frame.workspaceId);
8824
8874
  if (!workspace)
8825
8875
  throw new Error(`\u0412\u043E\u0440\u043A\u0441\u043F\u0435\u0439\u0441 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D: ${frame.workspaceId}`);
8876
+ const provider = frame.provider ?? "claude";
8877
+ if (!frame.resume && !this.#settings.current.enabledProviders.includes(provider)) {
8878
+ throw new Error(`${provider === "antigravity" ? "Antigravity" : "Claude"} \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`);
8879
+ }
8826
8880
  const agyRecord = frame.resume ? await this.#antigravity.find(frame.resume) : null;
8827
8881
  if (agyRecord || !frame.resume && frame.provider === "antigravity") {
8828
8882
  if (agyRecord)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i14ks/ccv",
3
- "version": "0.17.3",
3
+ "version": "0.19.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "GUI для Claude Code: сессии агента в каталогах проектов, дерево файлов и редактор рядом с разговором.",
6
6
  "homepage": "https://claudevisual.com",
@@ -1 +1 @@
1
- import{s as r,H as a}from"./index-Cc7JijiI.js";import{E as e}from"./index-891wE-Rj.js";import{t as o}from"./index-C4wYlk_J.js";import"./index-BHot-lnj.js";const m=e.theme({"&":{height:"100%",color:"var(--text)",backgroundColor:"var(--bg)",fontSize:"13px"},".cm-scroller":{fontFamily:"var(--mono)",lineHeight:"1.6"},".cm-content":{caretColor:"var(--accent)"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"var(--accent)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"var(--cm-selection)"},".cm-gutters":{backgroundColor:"var(--bg)",color:"var(--muted)",borderRight:"1px solid var(--border-soft)"},".cm-activeLineGutter":{backgroundColor:"var(--surface-2)",color:"var(--text-2)"},".cm-activeLine":{backgroundColor:"var(--cm-active)"},".cm-selectionMatch":{backgroundColor:"var(--cm-match)"},"&.cm-focused .cm-matchingBracket":{backgroundColor:"var(--cm-match)",outline:"1px solid var(--accent-line)"},".cm-foldPlaceholder":{backgroundColor:"var(--surface-2)",border:"1px solid var(--border)",color:"var(--muted)"},".cm-panels":{backgroundColor:"var(--surface)",color:"var(--text)",border:"1px solid var(--border)"},".cm-panels input, .cm-panels button, .cm-panels select":{fontFamily:"var(--sans)",fontSize:"12px",background:"var(--surface-2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:"6px",padding:"3px 6px"},".cm-searchMatch":{backgroundColor:"var(--cm-match)"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"var(--accent-soft)"},".cm-tooltip":{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"8px",boxShadow:"var(--shadow-md)",color:"var(--text)"},".cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--surface-2)",color:"var(--text)"}}),i=r(a.define([{tag:[o.keyword,o.modifier,o.controlKeyword,o.moduleKeyword],color:"var(--cm-key)"},{tag:[o.name,o.deleted,o.character,o.macroName],color:"var(--text)"},{tag:[o.propertyName],color:"var(--cm-prop)"},{tag:[o.function(o.variableName),o.labelName],color:"var(--cm-fn)"},{tag:[o.color,o.constant(o.name),o.standard(o.name),o.bool],color:"var(--cm-const)"},{tag:[o.definition(o.name),o.separator],color:"var(--text)"},{tag:[o.typeName,o.className,o.changed,o.annotation,o.self,o.namespace],color:"var(--cm-type)"},{tag:[o.number,o.integer,o.float],color:"var(--cm-num)"},{tag:[o.string,o.special(o.string),o.regexp],color:"var(--cm-str)"},{tag:[o.operator,o.operatorKeyword,o.escape],color:"var(--cm-op)"},{tag:[o.meta,o.comment],color:"var(--cm-comment)",fontStyle:"italic"},{tag:o.strong,fontWeight:"650"},{tag:o.emphasis,fontStyle:"italic"},{tag:o.strikethrough,textDecoration:"line-through"},{tag:o.link,color:"var(--cm-str)",textDecoration:"underline"},{tag:o.heading,fontWeight:"650",color:"var(--cm-key)"},{tag:o.invalid,color:"var(--danger)"}]));export{i as editorHighlight,m as editorTheme};
1
+ import{s as r,H as a}from"./index-BB8C49mo.js";import{E as e}from"./index-891wE-Rj.js";import{t as o}from"./index-BUb95YHi.js";import"./index-BHot-lnj.js";const m=e.theme({"&":{height:"100%",color:"var(--text)",backgroundColor:"var(--bg)",fontSize:"13px"},".cm-scroller":{fontFamily:"var(--mono)",lineHeight:"1.6"},".cm-content":{caretColor:"var(--accent)"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"var(--accent)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"var(--cm-selection)"},".cm-gutters":{backgroundColor:"var(--bg)",color:"var(--muted)",borderRight:"1px solid var(--border-soft)"},".cm-activeLineGutter":{backgroundColor:"var(--surface-2)",color:"var(--text-2)"},".cm-activeLine":{backgroundColor:"var(--cm-active)"},".cm-selectionMatch":{backgroundColor:"var(--cm-match)"},"&.cm-focused .cm-matchingBracket":{backgroundColor:"var(--cm-match)",outline:"1px solid var(--accent-line)"},".cm-foldPlaceholder":{backgroundColor:"var(--surface-2)",border:"1px solid var(--border)",color:"var(--muted)"},".cm-panels":{backgroundColor:"var(--surface)",color:"var(--text)",border:"1px solid var(--border)"},".cm-panels input, .cm-panels button, .cm-panels select":{fontFamily:"var(--sans)",fontSize:"12px",background:"var(--surface-2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:"6px",padding:"3px 6px"},".cm-searchMatch":{backgroundColor:"var(--cm-match)"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"var(--accent-soft)"},".cm-tooltip":{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"8px",boxShadow:"var(--shadow-md)",color:"var(--text)"},".cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--surface-2)",color:"var(--text)"}}),i=r(a.define([{tag:[o.keyword,o.modifier,o.controlKeyword,o.moduleKeyword],color:"var(--cm-key)"},{tag:[o.name,o.deleted,o.character,o.macroName],color:"var(--text)"},{tag:[o.propertyName],color:"var(--cm-prop)"},{tag:[o.function(o.variableName),o.labelName],color:"var(--cm-fn)"},{tag:[o.color,o.constant(o.name),o.standard(o.name),o.bool],color:"var(--cm-const)"},{tag:[o.definition(o.name),o.separator],color:"var(--text)"},{tag:[o.typeName,o.className,o.changed,o.annotation,o.self,o.namespace],color:"var(--cm-type)"},{tag:[o.number,o.integer,o.float],color:"var(--cm-num)"},{tag:[o.string,o.special(o.string),o.regexp],color:"var(--cm-str)"},{tag:[o.operator,o.operatorKeyword,o.escape],color:"var(--cm-op)"},{tag:[o.meta,o.comment],color:"var(--cm-comment)",fontStyle:"italic"},{tag:o.strong,fontWeight:"650"},{tag:o.emphasis,fontStyle:"italic"},{tag:o.strikethrough,textDecoration:"line-through"},{tag:o.link,color:"var(--cm-str)",textDecoration:"underline"},{tag:o.heading,fontWeight:"650",color:"var(--cm-key)"},{tag:o.invalid,color:"var(--danger)"}]));export{i as editorHighlight,m as editorTheme};