jialing-code 1.3.10 → 1.3.12
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.
- package/dist/{chunk-3kdnvvmp.js → chunk-034g41nz.js} +1 -1
- package/dist/{chunk-8skaep8d.js → chunk-05ht3e32.js} +1 -1
- package/dist/{chunk-51dmhxyr.js → chunk-0g6nvqtt.js} +3 -3
- package/dist/{chunk-rdkf0pfy.js → chunk-0j4gnka0.js} +3 -3
- package/dist/{chunk-mhd2mn93.js → chunk-0rhp1svj.js} +3 -3
- package/dist/{chunk-8qm0kqwb.js → chunk-15ghkdgp.js} +2 -2
- package/dist/{chunk-spzch0sr.js → chunk-15mwdsdz.js} +3 -3
- package/dist/{chunk-sk8nzk30.js → chunk-17cr09re.js} +2 -2
- package/dist/{chunk-c19h5jhk.js → chunk-20r2caxv.js} +2 -2
- package/dist/{chunk-23d3jrww.js → chunk-245e3ta0.js} +3 -3
- package/dist/{chunk-acacvsez.js → chunk-2davs8zj.js} +2 -2
- package/dist/{chunk-bngvb00h.js → chunk-2ff32bxd.js} +2 -2
- package/dist/{chunk-49gdhe3k.js → chunk-2gmbwmx3.js} +4 -4
- package/dist/{chunk-t9tf6ay1.js → chunk-2xgha3r4.js} +14 -14
- package/dist/{chunk-rcbtak6h.js → chunk-2zcaj2zw.js} +1 -1
- package/dist/{chunk-wkrg83kf.js → chunk-2zkxejec.js} +2 -2
- package/dist/{chunk-y6d17fcm.js → chunk-3d2wsncv.js} +4 -4
- package/dist/{chunk-n4ryz8ny.js → chunk-3rnadz4s.js} +7 -7
- package/dist/{chunk-jv983cqf.js → chunk-3yqfvnbk.js} +2 -2
- package/dist/{chunk-3v2gna97.js → chunk-40f0mx7v.js} +22 -22
- package/dist/{chunk-vqp7bdqq.js → chunk-4c5rs1f2.js} +1 -1
- package/dist/{chunk-a6m2j946.js → chunk-4d2wa8m6.js} +2 -2
- package/dist/{chunk-psg607ek.js → chunk-4f4fxt4y.js} +2 -2
- package/dist/{chunk-kvqe3050.js → chunk-4jwhv94d.js} +2 -2
- package/dist/{chunk-7pqtv531.js → chunk-4mnzcacv.js} +7 -7
- package/dist/{chunk-eegwxgh7.js → chunk-4mwe7zph.js} +2 -2
- package/dist/{chunk-e5t425z7.js → chunk-4nwbxnyn.js} +2 -2
- package/dist/{chunk-6wj24js4.js → chunk-4w3be0j2.js} +1 -1
- package/dist/{chunk-91qbsaee.js → chunk-50kj5v12.js} +3 -3
- package/dist/{chunk-gcr8n2q4.js → chunk-586r6qbr.js} +7 -7
- package/dist/{chunk-2tzgx2xk.js → chunk-5ak4d5mm.js} +7 -7
- package/dist/{chunk-sn8p1cvd.js → chunk-5de2xjgp.js} +2 -2
- package/dist/{chunk-ntw7f8na.js → chunk-5h5kwgh5.js} +1 -1
- package/dist/{chunk-yfnx0262.js → chunk-5weymp1w.js} +2 -2
- package/dist/{chunk-6kxqsxdn.js → chunk-62nnmv4a.js} +4 -4
- package/dist/{chunk-7mgy98g7.js → chunk-66qchjnq.js} +2 -2
- package/dist/{chunk-ghm36dzb.js → chunk-68700xxw.js} +5 -5
- package/dist/{chunk-s4wmc3vz.js → chunk-69ppfd59.js} +9 -9
- package/dist/{chunk-fr5eqr4m.js → chunk-6bmwtz17.js} +1 -1
- package/dist/{chunk-3y2e41qm.js → chunk-6bw9tqky.js} +2 -2
- package/dist/{chunk-kareceee.js → chunk-6ngajr2k.js} +3 -3
- package/dist/{chunk-n3842tma.js → chunk-6wn2x6dt.js} +2 -2
- package/dist/{chunk-rxjtw4gv.js → chunk-72gh234y.js} +3 -3
- package/dist/{chunk-5nn20agx.js → chunk-72gxajjh.js} +1 -1
- package/dist/{chunk-43zja8kb.js → chunk-73fg61kc.js} +3 -3
- package/dist/{chunk-pe3tqm81.js → chunk-76c2s6aa.js} +1 -1
- package/dist/{chunk-xarekx5v.js → chunk-7a7e48k0.js} +2 -2
- package/dist/{chunk-k5xcxdpp.js → chunk-7dw59bqx.js} +3 -3
- package/dist/{chunk-sqejff7m.js → chunk-7hs4mjk8.js} +4 -4
- package/dist/{chunk-5hcg2wxz.js → chunk-7k54kmcj.js} +2 -2
- package/dist/{chunk-ks852t3g.js → chunk-7n58ej6k.js} +2 -2
- package/dist/{chunk-hr212r6v.js → chunk-7rjwm0hn.js} +1 -1
- package/dist/{chunk-wsffta0f.js → chunk-7zt330bp.js} +1 -1
- package/dist/{chunk-x2aa0e3t.js → chunk-87wzv3w8.js} +4 -4
- package/dist/{chunk-t5eny9fs.js → chunk-89tjwk25.js} +1 -1
- package/dist/{chunk-276nf481.js → chunk-8n2ha6be.js} +2 -2
- package/dist/{chunk-69ngxa90.js → chunk-8peet6rc.js} +2 -2
- package/dist/{chunk-gjvpy6zq.js → chunk-8tatkkcx.js} +2 -2
- package/dist/{chunk-h3jk804w.js → chunk-8teyh4mz.js} +3 -3
- package/dist/{chunk-vrj7s722.js → chunk-9nb6ya6j.js} +2 -2
- package/dist/{chunk-2e8g1nj9.js → chunk-9nww8vny.js} +1 -1
- package/dist/{chunk-ner6mpmj.js → chunk-9qjbbhmq.js} +2 -2
- package/dist/{chunk-qx021560.js → chunk-9vezwk6e.js} +1 -1
- package/dist/{chunk-s8hnqawa.js → chunk-9vjw94kv.js} +590 -518
- package/dist/{chunk-yfpeev84.js → chunk-9yygk666.js} +2 -2
- package/dist/{chunk-qbj72e85.js → chunk-9zymfarz.js} +2 -2
- package/dist/{chunk-kdtwztrw.js → chunk-a3t6mp8c.js} +1 -1
- package/dist/{chunk-ma59yd0g.js → chunk-a99739wq.js} +3 -3
- package/dist/{chunk-pp4cqkak.js → chunk-ac7n2egw.js} +3 -3
- package/dist/{chunk-pfmjchr3.js → chunk-adrmhzz1.js} +3 -3
- package/dist/{chunk-ghc6bgc5.js → chunk-ahebjm2r.js} +1 -1
- package/dist/{chunk-7gsnnjdf.js → chunk-ajn61tq2.js} +6 -6
- package/dist/{chunk-tt0ae8jf.js → chunk-akhvjmca.js} +1 -1
- package/dist/{chunk-985t34sr.js → chunk-ayjaz4tr.js} +2 -2
- package/dist/{chunk-6jsknshr.js → chunk-b2mp430v.js} +2 -2
- package/dist/{chunk-gyxqv4t0.js → chunk-b993jxyk.js} +1 -1
- package/dist/{chunk-dqsnx26h.js → chunk-b9xh216k.js} +8 -8
- package/dist/{chunk-2e0dn6zg.js → chunk-bhz2z5kz.js} +3 -3
- package/dist/{chunk-c62w9hc9.js → chunk-bpew2ng8.js} +6 -6
- package/dist/{chunk-2m1w7s1v.js → chunk-c26n30wy.js} +2 -2
- package/dist/{chunk-e6bdtd3v.js → chunk-c4jh4hrp.js} +1 -1
- package/dist/{chunk-njj0vx5s.js → chunk-c4rq195j.js} +1 -1
- package/dist/{chunk-pcx5r04e.js → chunk-cy4kbxzp.js} +2 -2
- package/dist/{chunk-k2nny40r.js → chunk-d1rrdz3y.js} +2 -2
- package/dist/{chunk-r5dwps4c.js → chunk-dhft36sj.js} +5 -5
- package/dist/{chunk-y6nsanvy.js → chunk-dhrm9b80.js} +2 -2
- package/dist/{chunk-ztvdhsmc.js → chunk-dq7myj0a.js} +2 -2
- package/dist/{chunk-kcsf92nj.js → chunk-drmrgppj.js} +3 -3
- package/dist/{chunk-g9080r58.js → chunk-e11xmx2q.js} +2 -2
- package/dist/{chunk-taksgsnz.js → chunk-ecwej15m.js} +3 -3
- package/dist/{chunk-n026btkc.js → chunk-ek9whyz9.js} +598 -131
- package/dist/{chunk-ct2yffwn.js → chunk-f53gh6hj.js} +5 -5
- package/dist/{chunk-kxvez41a.js → chunk-fmetedqt.js} +7 -7
- package/dist/{chunk-5cq732aj.js → chunk-fs8zs3ge.js} +1 -1
- package/dist/{chunk-8e0jkfgf.js → chunk-gdjdvmaj.js} +8 -8
- package/dist/{chunk-k2jkvzm8.js → chunk-gttd0ns3.js} +43 -43
- package/dist/{chunk-xb0s6v9g.js → chunk-gz4c6c0g.js} +7 -7
- package/dist/{chunk-tkazrd4r.js → chunk-gzch60t1.js} +2 -2
- package/dist/{chunk-66eyqvme.js → chunk-h1200g58.js} +1 -1
- package/dist/{chunk-x78y2qve.js → chunk-hcbcesph.js} +1 -1
- package/dist/{chunk-qch7k44b.js → chunk-hdpbn35y.js} +1 -1
- package/dist/{chunk-7b0q6s38.js → chunk-hw8cdmy4.js} +2 -2
- package/dist/{chunk-p9b5728z.js → chunk-j56tx6fd.js} +1 -1
- package/dist/{chunk-z7f0t99j.js → chunk-j5r8qc2k.js} +5 -5
- package/dist/{chunk-s27p5jrc.js → chunk-jhfzxjmh.js} +1 -1
- package/dist/{chunk-x982nkvh.js → chunk-jtfxaxc4.js} +5 -5
- package/dist/{chunk-5wt77h5v.js → chunk-jy2284h5.js} +5 -5
- package/dist/{chunk-bjcywqzr.js → chunk-jyyqeqyb.js} +4 -4
- package/dist/{chunk-k5kg9pw2.js → chunk-k5ynx0xd.js} +3 -3
- package/dist/{chunk-acp5jefr.js → chunk-kcerv3sb.js} +2 -2
- package/dist/{chunk-zvdm2mvr.js → chunk-m14rtp9g.js} +2 -2
- package/dist/{chunk-e829zqsg.js → chunk-m7yz9qzm.js} +2 -2
- package/dist/{chunk-40qmpjzh.js → chunk-mdqyq0w4.js} +2 -2
- package/dist/{chunk-n8m13fqp.js → chunk-mk45ppzg.js} +2 -2
- package/dist/{chunk-pgcavf9b.js → chunk-mpq43p6q.js} +3 -3
- package/dist/{chunk-atzb513c.js → chunk-mw0r22e0.js} +3 -3
- package/dist/{chunk-2413q448.js → chunk-mwqzf6s6.js} +2 -2
- package/dist/{chunk-yzjszcbp.js → chunk-n8ww70nz.js} +1 -1
- package/dist/{chunk-sa2rhkap.js → chunk-nc485trh.js} +2 -2
- package/dist/{chunk-x3t0rp1s.js → chunk-nkjdw1z4.js} +2 -2
- package/dist/{chunk-gdfr6var.js → chunk-nyggc9m2.js} +2 -2
- package/dist/{chunk-rhngbceb.js → chunk-p59knrb5.js} +4 -4
- package/dist/{chunk-9xsp4wry.js → chunk-p8phw36m.js} +2 -2
- package/dist/{chunk-t2c5ak6a.js → chunk-phrcc5jw.js} +1 -1
- package/dist/{chunk-6xdyzddr.js → chunk-pkn34rxc.js} +2 -2
- package/dist/{chunk-hdbmw2pw.js → chunk-pten4eyr.js} +3 -3
- package/dist/{chunk-q0ez6b0a.js → chunk-pzr5qaen.js} +1 -1
- package/dist/{chunk-pwvkrj2s.js → chunk-q1r26r4a.js} +4 -4
- package/dist/{chunk-szmz6kxt.js → chunk-qbgpkab3.js} +3 -3
- package/dist/{chunk-kkxh1v5c.js → chunk-qcehpjdm.js} +2 -2
- package/dist/{chunk-hj3hr16m.js → chunk-qe9vhxt2.js} +2 -2
- package/dist/{chunk-285myw4c.js → chunk-qgzn5e2m.js} +2 -2
- package/dist/{chunk-px526ass.js → chunk-qpkzwfqy.js} +2 -2
- package/dist/{chunk-zv7a78w1.js → chunk-qq08jmve.js} +2 -2
- package/dist/{chunk-m5t7q70f.js → chunk-qv84gvv4.js} +4 -4
- package/dist/{chunk-8xanmrzq.js → chunk-qws49qpj.js} +2 -2
- package/dist/{chunk-dej4rzrq.js → chunk-r1e3kqzj.js} +1 -1
- package/dist/{chunk-8f4p6jdb.js → chunk-r6qg4ha4.js} +7 -7
- package/dist/{chunk-xmb8x90a.js → chunk-r7csgam9.js} +6 -6
- package/dist/{chunk-7r3nvnj7.js → chunk-r9xn20vk.js} +58 -58
- package/dist/{chunk-kfettk4f.js → chunk-rd9y1heh.js} +1 -1
- package/dist/{chunk-fhwn92f3.js → chunk-s7d9zge3.js} +3 -3
- package/dist/{chunk-egmc4s2g.js → chunk-s93sa91f.js} +2 -2
- package/dist/{chunk-wvky1r3r.js → chunk-sa1e4ck2.js} +2 -2
- package/dist/{chunk-1m1wy0py.js → chunk-sh3x64d9.js} +4 -4
- package/dist/{chunk-m4tk6kqq.js → chunk-sjfsb9tx.js} +1 -1
- package/dist/{chunk-zep3c3a8.js → chunk-sqa6crnm.js} +4 -4
- package/dist/{chunk-xzdd3xcj.js → chunk-sw8fbwtc.js} +10 -10
- package/dist/{chunk-r6y1ftm2.js → chunk-tb1cxps9.js} +6 -6
- package/dist/{chunk-3ngzd6jk.js → chunk-tgq3mdgq.js} +1 -1
- package/dist/{chunk-c1321me0.js → chunk-tkrptwm3.js} +11 -11
- package/dist/{chunk-w67vsre1.js → chunk-tpm745dv.js} +3 -3
- package/dist/{chunk-2zcgzd82.js → chunk-tsxafbb3.js} +7 -7
- package/dist/{chunk-6c0fq24x.js → chunk-tyjngxxn.js} +7 -7
- package/dist/{chunk-9pe831ta.js → chunk-v18v4x5y.js} +3 -3
- package/dist/{chunk-f6729mtf.js → chunk-vh4zxcqq.js} +1 -1
- package/dist/{chunk-905wyebn.js → chunk-vqw28zdj.js} +1 -1
- package/dist/{chunk-d5vbf0z0.js → chunk-vweq3mqa.js} +2 -2
- package/dist/{chunk-y1x9zmmy.js → chunk-w2zrvp1f.js} +1 -1
- package/dist/{chunk-n9jha8nr.js → chunk-w9cde3tr.js} +7 -7
- package/dist/{chunk-9rg14j1v.js → chunk-wt09zdz0.js} +1 -1
- package/dist/{chunk-8vtyfq7y.js → chunk-wwpjfxe9.js} +5 -5
- package/dist/{chunk-1gmn6108.js → chunk-wwrwy9w2.js} +5 -5
- package/dist/{chunk-rvzfrce8.js → chunk-x33h7jms.js} +2 -2
- package/dist/{chunk-c6gvkek4.js → chunk-xe7rx4mt.js} +2 -2
- package/dist/{chunk-xbwmjyde.js → chunk-xf330ye9.js} +3 -3
- package/dist/{chunk-564pmm5r.js → chunk-xf6ccs6s.js} +2 -2
- package/dist/{chunk-v0bn9t7v.js → chunk-y0ygah11.js} +44 -44
- package/dist/{chunk-bn3z2j3s.js → chunk-y7xgpz8z.js} +1 -1
- package/dist/{chunk-zwpcckj5.js → chunk-ybwt7zvv.js} +1 -1
- package/dist/{chunk-wq5drm9q.js → chunk-yc4em7tw.js} +2 -2
- package/dist/{chunk-ds1k1b3a.js → chunk-yg0zsh72.js} +2 -2
- package/dist/{chunk-qgez85bx.js → chunk-z02kft73.js} +5 -5
- package/dist/{chunk-dmyqc2bt.js → chunk-z5y9zvj0.js} +2 -2
- package/dist/{chunk-741cvhvd.js → chunk-zb18gp0a.js} +1 -1
- package/dist/{chunk-8t7rrb3c.js → chunk-ztajzkte.js} +2 -2
- package/dist/cli.js +6 -7
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
unregisterTeamForSessionCleanup,
|
|
95
95
|
updateTask,
|
|
96
96
|
writeTeamFileAsync
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-4c5rs1f2.js";
|
|
98
98
|
import {
|
|
99
99
|
init_worktreeModeEnabled,
|
|
100
100
|
isWorktreeModeEnabled
|
|
@@ -4922,7 +4922,7 @@ var init_add_dir = __esm(() => {
|
|
|
4922
4922
|
name: "add-dir",
|
|
4923
4923
|
description: "Add a new working directory",
|
|
4924
4924
|
argumentHint: "<path>",
|
|
4925
|
-
load: () => import("./chunk-
|
|
4925
|
+
load: () => import("./chunk-qbgpkab3.js")
|
|
4926
4926
|
};
|
|
4927
4927
|
add_dir_default = addDir;
|
|
4928
4928
|
});
|
|
@@ -4948,7 +4948,7 @@ var init_btw = __esm(() => {
|
|
|
4948
4948
|
description: "Ask a quick side question without interrupting the main conversation",
|
|
4949
4949
|
immediate: true,
|
|
4950
4950
|
argumentHint: "<question>",
|
|
4951
|
-
load: () => import("./chunk-
|
|
4951
|
+
load: () => import("./chunk-xf330ye9.js")
|
|
4952
4952
|
};
|
|
4953
4953
|
btw_default = btw;
|
|
4954
4954
|
});
|
|
@@ -4976,7 +4976,7 @@ var init_last = __esm(() => {
|
|
|
4976
4976
|
});
|
|
4977
4977
|
|
|
4978
4978
|
// src/buddy/types.ts
|
|
4979
|
-
var RARITIES, c, duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom, chonk, SPECIES, EYES, HATS, STAT_NAMES, RARITY_WEIGHTS;
|
|
4979
|
+
var RARITIES, c, duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom, chonk, SPECIES, EYES, HATS, STAT_NAMES, RARITY_WEIGHTS, RARITY_COLORS;
|
|
4980
4980
|
var init_types6 = __esm(() => {
|
|
4981
4981
|
RARITIES = [
|
|
4982
4982
|
"common",
|
|
@@ -5049,9 +5049,19 @@ var init_types6 = __esm(() => {
|
|
|
5049
5049
|
epic: 4,
|
|
5050
5050
|
legendary: 1
|
|
5051
5051
|
};
|
|
5052
|
+
RARITY_COLORS = {
|
|
5053
|
+
common: "inactive",
|
|
5054
|
+
uncommon: "success",
|
|
5055
|
+
rare: "permission",
|
|
5056
|
+
epic: "autoAccept",
|
|
5057
|
+
legendary: "warning"
|
|
5058
|
+
};
|
|
5052
5059
|
});
|
|
5053
5060
|
|
|
5054
5061
|
// src/buddy/companion.ts
|
|
5062
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
|
|
5063
|
+
import { join as join4 } from "path";
|
|
5064
|
+
import { homedir as homedir3 } from "os";
|
|
5055
5065
|
function mulberry32(seed) {
|
|
5056
5066
|
let a = seed >>> 0;
|
|
5057
5067
|
return function() {
|
|
@@ -5128,7 +5138,33 @@ function companionUserId() {
|
|
|
5128
5138
|
const config2 = getGlobalConfig();
|
|
5129
5139
|
return config2.oauthAccount?.accountUuid ?? config2.userID ?? "anon";
|
|
5130
5140
|
}
|
|
5141
|
+
function tryMigrateJialingCompanion() {
|
|
5142
|
+
if (jialingCompanionMigrated)
|
|
5143
|
+
return;
|
|
5144
|
+
jialingCompanionMigrated = true;
|
|
5145
|
+
try {
|
|
5146
|
+
const jialingConfigPath = join4(homedir3(), ".jialing-code", "config.json");
|
|
5147
|
+
if (!existsSync4(jialingConfigPath))
|
|
5148
|
+
return;
|
|
5149
|
+
const jialingConfig = JSON.parse(readFileSync3(jialingConfigPath, "utf-8"));
|
|
5150
|
+
if (!jialingConfig.companion)
|
|
5151
|
+
return;
|
|
5152
|
+
const globalConfig = getGlobalConfig();
|
|
5153
|
+
if (globalConfig.companion)
|
|
5154
|
+
return;
|
|
5155
|
+
saveGlobalConfig((current) => ({
|
|
5156
|
+
...current,
|
|
5157
|
+
companion: {
|
|
5158
|
+
name: jialingConfig.companion.name || "Buddy",
|
|
5159
|
+
personality: jialingConfig.companion.personality || "",
|
|
5160
|
+
hatchedAt: jialingConfig.companion.hatchedAt || Date.now()
|
|
5161
|
+
},
|
|
5162
|
+
companionSpeciesOverride: jialingConfig.companion.species
|
|
5163
|
+
}));
|
|
5164
|
+
} catch {}
|
|
5165
|
+
}
|
|
5131
5166
|
function getCompanion() {
|
|
5167
|
+
tryMigrateJialingCompanion();
|
|
5132
5168
|
const config2 = getGlobalConfig();
|
|
5133
5169
|
const stored = config2.companion;
|
|
5134
5170
|
if (!stored)
|
|
@@ -5140,7 +5176,7 @@ function getCompanion() {
|
|
|
5140
5176
|
}
|
|
5141
5177
|
return { ...stored, ...bones };
|
|
5142
5178
|
}
|
|
5143
|
-
var RARITY_FLOOR, SALT = "friend-2026-401", rollCache;
|
|
5179
|
+
var RARITY_FLOOR, SALT = "friend-2026-401", rollCache, jialingCompanionMigrated = false;
|
|
5144
5180
|
var init_companion = __esm(() => {
|
|
5145
5181
|
init_config2();
|
|
5146
5182
|
init_types6();
|
|
@@ -5161,6 +5197,28 @@ A small ${species} named ${name} sits beside the user's input box and occasional
|
|
|
5161
5197
|
|
|
5162
5198
|
When the user addresses ${name} directly (by name), its bubble will answer. Your job in that moment is to stay out of the way: respond in ONE line or less, or just answer any part of the message meant for you. Don't explain that you're not ${name} \u2014 they know. Don't narrate what ${name} might say \u2014 the bubble handles that.`;
|
|
5163
5199
|
}
|
|
5200
|
+
function getCompanionIntroAttachment(messages) {
|
|
5201
|
+
if (false)
|
|
5202
|
+
;
|
|
5203
|
+
const companion = getCompanion();
|
|
5204
|
+
if (!companion || getGlobalConfig().companionMuted)
|
|
5205
|
+
return [];
|
|
5206
|
+
for (const msg of messages ?? []) {
|
|
5207
|
+
if (msg.type !== "attachment")
|
|
5208
|
+
continue;
|
|
5209
|
+
if (msg.attachment.type !== "companion_intro")
|
|
5210
|
+
continue;
|
|
5211
|
+
if (msg.attachment.name === companion.name)
|
|
5212
|
+
return [];
|
|
5213
|
+
}
|
|
5214
|
+
return [
|
|
5215
|
+
{
|
|
5216
|
+
type: "companion_intro",
|
|
5217
|
+
name: companion.name,
|
|
5218
|
+
species: companion.species
|
|
5219
|
+
}
|
|
5220
|
+
];
|
|
5221
|
+
}
|
|
5164
5222
|
var init_prompt8 = __esm(() => {
|
|
5165
5223
|
init_config2();
|
|
5166
5224
|
init_companion();
|
|
@@ -12406,7 +12464,7 @@ import {
|
|
|
12406
12464
|
symlink,
|
|
12407
12465
|
utimes
|
|
12408
12466
|
} from "fs/promises";
|
|
12409
|
-
import { basename, dirname as dirname4, join as
|
|
12467
|
+
import { basename, dirname as dirname4, join as join5 } from "path";
|
|
12410
12468
|
function validateWorktreeSlug(slug) {
|
|
12411
12469
|
if (slug.length > MAX_WORKTREE_SLUG_LENGTH) {
|
|
12412
12470
|
throw new Error(`Invalid worktree name: must be ${MAX_WORKTREE_SLUG_LENGTH} characters or fewer (got ${slug.length})`);
|
|
@@ -12429,8 +12487,8 @@ async function symlinkDirectories(repoRootPath, worktreePath, dirsToSymlink) {
|
|
|
12429
12487
|
logForDebugging(`Skipping symlink for "${dir}": path traversal detected`, { level: "warn" });
|
|
12430
12488
|
continue;
|
|
12431
12489
|
}
|
|
12432
|
-
const sourcePath =
|
|
12433
|
-
const destPath =
|
|
12490
|
+
const sourcePath = join5(repoRootPath, dir);
|
|
12491
|
+
const destPath = join5(worktreePath, dir);
|
|
12434
12492
|
try {
|
|
12435
12493
|
await symlink(sourcePath, destPath, "dir");
|
|
12436
12494
|
logForDebugging(`Symlinked ${dir} from main repository to worktree to avoid disk bloat`);
|
|
@@ -12454,7 +12512,7 @@ function generateTmuxSessionName(repoPath, branch) {
|
|
|
12454
12512
|
return combined.replace(/[/.]/g, "_");
|
|
12455
12513
|
}
|
|
12456
12514
|
function worktreesDir(repoRoot) {
|
|
12457
|
-
return
|
|
12515
|
+
return join5(repoRoot, ".claude", "worktrees");
|
|
12458
12516
|
}
|
|
12459
12517
|
function flattenSlug(slug) {
|
|
12460
12518
|
return slug.replaceAll("/", "+");
|
|
@@ -12463,7 +12521,7 @@ function worktreeBranchName(slug) {
|
|
|
12463
12521
|
return `worktree-${flattenSlug(slug)}`;
|
|
12464
12522
|
}
|
|
12465
12523
|
function worktreePathFor(repoRoot, slug) {
|
|
12466
|
-
return
|
|
12524
|
+
return join5(worktreesDir(repoRoot), flattenSlug(slug));
|
|
12467
12525
|
}
|
|
12468
12526
|
async function getOrCreateWorktree(repoRoot, slug, options) {
|
|
12469
12527
|
const worktreePath = worktreePathFor(repoRoot, slug);
|
|
@@ -12544,7 +12602,7 @@ async function getOrCreateWorktree(repoRoot, slug, options) {
|
|
|
12544
12602
|
async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
12545
12603
|
let includeContent;
|
|
12546
12604
|
try {
|
|
12547
|
-
includeContent = await readFile(
|
|
12605
|
+
includeContent = await readFile(join5(repoRoot, ".worktreeinclude"), "utf-8");
|
|
12548
12606
|
} catch {
|
|
12549
12607
|
return [];
|
|
12550
12608
|
}
|
|
@@ -12599,8 +12657,8 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
|
12599
12657
|
}
|
|
12600
12658
|
const copied = [];
|
|
12601
12659
|
for (const relativePath of files) {
|
|
12602
|
-
const srcPath =
|
|
12603
|
-
const destPath =
|
|
12660
|
+
const srcPath = join5(repoRoot, relativePath);
|
|
12661
|
+
const destPath = join5(worktreePath, relativePath);
|
|
12604
12662
|
try {
|
|
12605
12663
|
await mkdir(dirname4(destPath), { recursive: true });
|
|
12606
12664
|
await copyFile(srcPath, destPath);
|
|
@@ -12616,9 +12674,9 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
|
12616
12674
|
}
|
|
12617
12675
|
async function performPostCreationSetup(repoRoot, worktreePath) {
|
|
12618
12676
|
const localSettingsRelativePath = getRelativeSettingsFilePathForSource("localSettings");
|
|
12619
|
-
const sourceSettingsLocal =
|
|
12677
|
+
const sourceSettingsLocal = join5(repoRoot, localSettingsRelativePath);
|
|
12620
12678
|
try {
|
|
12621
|
-
const destSettingsLocal =
|
|
12679
|
+
const destSettingsLocal = join5(worktreePath, localSettingsRelativePath);
|
|
12622
12680
|
await mkdirRecursive(dirname4(destSettingsLocal));
|
|
12623
12681
|
await copyFile(sourceSettingsLocal, destSettingsLocal);
|
|
12624
12682
|
logForDebugging(`Copied settings.local.json to worktree: ${destSettingsLocal}`);
|
|
@@ -12628,8 +12686,8 @@ async function performPostCreationSetup(repoRoot, worktreePath) {
|
|
|
12628
12686
|
logForDebugging(`Failed to copy settings.local.json: ${e.message}`, { level: "warn" });
|
|
12629
12687
|
}
|
|
12630
12688
|
}
|
|
12631
|
-
const huskyPath =
|
|
12632
|
-
const gitHooksPath =
|
|
12689
|
+
const huskyPath = join5(repoRoot, ".husky");
|
|
12690
|
+
const gitHooksPath = join5(repoRoot, ".git", "hooks");
|
|
12633
12691
|
let hooksPath = null;
|
|
12634
12692
|
for (const candidatePath of [huskyPath, gitHooksPath]) {
|
|
12635
12693
|
try {
|
|
@@ -12904,7 +12962,7 @@ async function cleanupStaleAgentWorktrees(cutoffDate) {
|
|
|
12904
12962
|
if (!EPHEMERAL_WORKTREE_PATTERNS.some((p) => p.test(slug))) {
|
|
12905
12963
|
continue;
|
|
12906
12964
|
}
|
|
12907
|
-
const worktreePath =
|
|
12965
|
+
const worktreePath = join5(dir, slug);
|
|
12908
12966
|
if (currentPath === worktreePath) {
|
|
12909
12967
|
continue;
|
|
12910
12968
|
}
|
|
@@ -20580,11 +20638,11 @@ var init_cron = __esm(() => {
|
|
|
20580
20638
|
|
|
20581
20639
|
// src/utils/cronTasks.ts
|
|
20582
20640
|
import { randomUUID } from "crypto";
|
|
20583
|
-
import { readFileSync as
|
|
20641
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
20584
20642
|
import { mkdir as mkdir2, writeFile } from "fs/promises";
|
|
20585
|
-
import { join as
|
|
20643
|
+
import { join as join6 } from "path";
|
|
20586
20644
|
function getCronFilePath(dir) {
|
|
20587
|
-
return
|
|
20645
|
+
return join6(dir ?? getProjectRoot(), CRON_FILE_REL);
|
|
20588
20646
|
}
|
|
20589
20647
|
async function readCronTasks(dir) {
|
|
20590
20648
|
const fs6 = getFsImplementation();
|
|
@@ -20628,7 +20686,7 @@ async function readCronTasks(dir) {
|
|
|
20628
20686
|
function hasCronTasksSync(dir) {
|
|
20629
20687
|
let raw;
|
|
20630
20688
|
try {
|
|
20631
|
-
raw =
|
|
20689
|
+
raw = readFileSync4(getCronFilePath(dir), "utf-8");
|
|
20632
20690
|
} catch {
|
|
20633
20691
|
return false;
|
|
20634
20692
|
}
|
|
@@ -20640,7 +20698,7 @@ function hasCronTasksSync(dir) {
|
|
|
20640
20698
|
}
|
|
20641
20699
|
async function writeCronTasks(tasks, dir) {
|
|
20642
20700
|
const root = dir ?? getProjectRoot();
|
|
20643
|
-
await mkdir2(
|
|
20701
|
+
await mkdir2(join6(root, ".claude"), { recursive: true });
|
|
20644
20702
|
const body = {
|
|
20645
20703
|
tasks: tasks.map(({ durable: _durable, ...rest }) => rest)
|
|
20646
20704
|
};
|
|
@@ -20750,7 +20808,7 @@ var init_cronTasks = __esm(() => {
|
|
|
20750
20808
|
init_json();
|
|
20751
20809
|
init_log();
|
|
20752
20810
|
init_slowOperations();
|
|
20753
|
-
CRON_FILE_REL =
|
|
20811
|
+
CRON_FILE_REL = join6(".claude", "scheduled_tasks.json");
|
|
20754
20812
|
DEFAULT_CRON_JITTER_CONFIG = {
|
|
20755
20813
|
recurringFrac: 0.1,
|
|
20756
20814
|
recurringCapMs: 15 * 60 * 1000,
|
|
@@ -24636,7 +24694,7 @@ import {
|
|
|
24636
24694
|
dirname as dirname5,
|
|
24637
24695
|
extname,
|
|
24638
24696
|
isAbsolute as isAbsolute2,
|
|
24639
|
-
join as
|
|
24697
|
+
join as join7,
|
|
24640
24698
|
parse,
|
|
24641
24699
|
relative,
|
|
24642
24700
|
sep
|
|
@@ -24881,7 +24939,7 @@ async function processMdRules({
|
|
|
24881
24939
|
throw e;
|
|
24882
24940
|
}
|
|
24883
24941
|
for (const entry of entries) {
|
|
24884
|
-
const entryPath =
|
|
24942
|
+
const entryPath = join7(rulesDir, entry.name);
|
|
24885
24943
|
const { resolvedPath: resolvedEntryPath, isSymlink: isSymlink2 } = safeResolvePath(fs6, entryPath);
|
|
24886
24944
|
const stats = isSymlink2 ? await fs6.stat(resolvedEntryPath) : null;
|
|
24887
24945
|
const isDirectory = stats ? stats.isDirectory() : entry.isDirectory();
|
|
@@ -24952,16 +25010,16 @@ async function getManagedAndUserConditionalRules(targetPath, processedPaths) {
|
|
|
24952
25010
|
async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths) {
|
|
24953
25011
|
const result = [];
|
|
24954
25012
|
if (isSettingSourceEnabled("projectSettings")) {
|
|
24955
|
-
const projectPath =
|
|
25013
|
+
const projectPath = join7(dir, "CLAUDE.md");
|
|
24956
25014
|
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, false));
|
|
24957
|
-
const dotClaudePath =
|
|
25015
|
+
const dotClaudePath = join7(dir, ".claude", "CLAUDE.md");
|
|
24958
25016
|
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, false));
|
|
24959
25017
|
}
|
|
24960
25018
|
if (isSettingSourceEnabled("localSettings")) {
|
|
24961
|
-
const localPath =
|
|
25019
|
+
const localPath = join7(dir, "CLAUDE.local.md");
|
|
24962
25020
|
result.push(...await processMemoryFile(localPath, "Local", processedPaths, false));
|
|
24963
25021
|
}
|
|
24964
|
-
const rulesDir =
|
|
25022
|
+
const rulesDir = join7(dir, ".claude", "rules");
|
|
24965
25023
|
const unconditionalProcessedPaths = new Set(processedPaths);
|
|
24966
25024
|
result.push(...await processMdRules({
|
|
24967
25025
|
rulesDir,
|
|
@@ -24977,7 +25035,7 @@ async function getMemoryFilesForNestedDirectory(dir, targetPath, processedPaths)
|
|
|
24977
25035
|
return result;
|
|
24978
25036
|
}
|
|
24979
25037
|
async function getConditionalRulesForCwdLevelDirectory(dir, targetPath, processedPaths) {
|
|
24980
|
-
const rulesDir =
|
|
25038
|
+
const rulesDir = join7(dir, ".claude", "rules");
|
|
24981
25039
|
return processConditionedMdRules(targetPath, rulesDir, "Project", processedPaths, false);
|
|
24982
25040
|
}
|
|
24983
25041
|
async function processConditionedMdRules(targetPath, rulesDir, type, processedPaths, includeExternal) {
|
|
@@ -25222,11 +25280,11 @@ var init_claudemd = __esm(() => {
|
|
|
25222
25280
|
for (const dir of dirs.reverse()) {
|
|
25223
25281
|
const skipProject = isNestedWorktree && pathInWorkingPath(dir, canonicalRoot) && !pathInWorkingPath(dir, gitRoot);
|
|
25224
25282
|
if (isSettingSourceEnabled("projectSettings") && !skipProject) {
|
|
25225
|
-
const projectPath =
|
|
25283
|
+
const projectPath = join7(dir, "CLAUDE.md");
|
|
25226
25284
|
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
|
|
25227
|
-
const dotClaudePath =
|
|
25285
|
+
const dotClaudePath = join7(dir, ".claude", "CLAUDE.md");
|
|
25228
25286
|
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
|
|
25229
|
-
const rulesDir =
|
|
25287
|
+
const rulesDir = join7(dir, ".claude", "rules");
|
|
25230
25288
|
result.push(...await processMdRules({
|
|
25231
25289
|
rulesDir,
|
|
25232
25290
|
type: "Project",
|
|
@@ -25236,18 +25294,18 @@ var init_claudemd = __esm(() => {
|
|
|
25236
25294
|
}));
|
|
25237
25295
|
}
|
|
25238
25296
|
if (isSettingSourceEnabled("localSettings")) {
|
|
25239
|
-
const localPath =
|
|
25297
|
+
const localPath = join7(dir, "CLAUDE.local.md");
|
|
25240
25298
|
result.push(...await processMemoryFile(localPath, "Local", processedPaths, includeExternal));
|
|
25241
25299
|
}
|
|
25242
25300
|
}
|
|
25243
25301
|
if (isEnvTruthy(process.env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD)) {
|
|
25244
25302
|
const additionalDirs = getAdditionalDirectoriesForClaudeMd();
|
|
25245
25303
|
for (const dir of additionalDirs) {
|
|
25246
|
-
const projectPath =
|
|
25304
|
+
const projectPath = join7(dir, "CLAUDE.md");
|
|
25247
25305
|
result.push(...await processMemoryFile(projectPath, "Project", processedPaths, includeExternal));
|
|
25248
|
-
const dotClaudePath =
|
|
25306
|
+
const dotClaudePath = join7(dir, ".claude", "CLAUDE.md");
|
|
25249
25307
|
result.push(...await processMemoryFile(dotClaudePath, "Project", processedPaths, includeExternal));
|
|
25250
|
-
const rulesDir =
|
|
25308
|
+
const rulesDir = join7(dir, ".claude", "rules");
|
|
25251
25309
|
result.push(...await processMdRules({
|
|
25252
25310
|
rulesDir,
|
|
25253
25311
|
type: "Project",
|
|
@@ -30161,9 +30219,9 @@ var init_validate = __esm(() => {
|
|
|
30161
30219
|
});
|
|
30162
30220
|
|
|
30163
30221
|
// src/keybindings/loadUserBindings.ts
|
|
30164
|
-
import { readFileSync as
|
|
30222
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
30165
30223
|
import { readFile as readFile2, stat as stat2 } from "fs/promises";
|
|
30166
|
-
import { dirname as dirname6, join as
|
|
30224
|
+
import { dirname as dirname6, join as join8 } from "path";
|
|
30167
30225
|
function isKeybindingCustomizationEnabled() {
|
|
30168
30226
|
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_keybinding_customization_release", false);
|
|
30169
30227
|
}
|
|
@@ -30186,7 +30244,7 @@ function isKeybindingBlockArray2(arr) {
|
|
|
30186
30244
|
return Array.isArray(arr) && arr.every(isKeybindingBlock2);
|
|
30187
30245
|
}
|
|
30188
30246
|
function getKeybindingsPath() {
|
|
30189
|
-
return
|
|
30247
|
+
return join8(getClaudeConfigHomeDir(), "keybindings.json");
|
|
30190
30248
|
}
|
|
30191
30249
|
function getDefaultParsedBindings() {
|
|
30192
30250
|
return parseBindings(DEFAULT_BINDINGS);
|
|
@@ -30284,7 +30342,7 @@ function loadKeybindingsSyncWithWarnings() {
|
|
|
30284
30342
|
}
|
|
30285
30343
|
const userPath = getKeybindingsPath();
|
|
30286
30344
|
try {
|
|
30287
|
-
const content =
|
|
30345
|
+
const content = readFileSync5(userPath, "utf-8");
|
|
30288
30346
|
const parsed = jsonParse(content);
|
|
30289
30347
|
let userBlocks;
|
|
30290
30348
|
if (typeof parsed === "object" && parsed !== null && "bindings" in parsed) {
|
|
@@ -36376,7 +36434,7 @@ var init_words = __esm(() => {
|
|
|
36376
36434
|
// src/utils/plans.ts
|
|
36377
36435
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
36378
36436
|
import { copyFile as copyFile2, writeFile as writeFile2 } from "fs/promises";
|
|
36379
|
-
import { join as
|
|
36437
|
+
import { join as join9, resolve as resolve3, sep as sep2 } from "path";
|
|
36380
36438
|
function getPlanSlug(sessionId) {
|
|
36381
36439
|
const id = sessionId ?? getSessionId();
|
|
36382
36440
|
const cache = getPlanSlugCache();
|
|
@@ -36385,7 +36443,7 @@ function getPlanSlug(sessionId) {
|
|
|
36385
36443
|
const plansDir = getPlansDirectory();
|
|
36386
36444
|
for (let i = 0;i < MAX_SLUG_RETRIES; i++) {
|
|
36387
36445
|
slug = generateWordSlug();
|
|
36388
|
-
const filePath =
|
|
36446
|
+
const filePath = join9(plansDir, `${slug}.md`);
|
|
36389
36447
|
if (!getFsImplementation().existsSync(filePath)) {
|
|
36390
36448
|
break;
|
|
36391
36449
|
}
|
|
@@ -36403,9 +36461,9 @@ function clearAllPlanSlugs() {
|
|
|
36403
36461
|
function getPlanFilePath(agentId) {
|
|
36404
36462
|
const planSlug = getPlanSlug(getSessionId());
|
|
36405
36463
|
if (!agentId) {
|
|
36406
|
-
return
|
|
36464
|
+
return join9(getPlansDirectory(), `${planSlug}.md`);
|
|
36407
36465
|
}
|
|
36408
|
-
return
|
|
36466
|
+
return join9(getPlansDirectory(), `${planSlug}-agent-${agentId}.md`);
|
|
36409
36467
|
}
|
|
36410
36468
|
function getPlan(agentId) {
|
|
36411
36469
|
const filePath = getPlanFilePath(agentId);
|
|
@@ -36428,7 +36486,7 @@ async function copyPlanForResume(log, targetSessionId) {
|
|
|
36428
36486
|
}
|
|
36429
36487
|
const sessionId = targetSessionId ?? getSessionId();
|
|
36430
36488
|
setPlanSlug(sessionId, slug);
|
|
36431
|
-
const planPath =
|
|
36489
|
+
const planPath = join9(getPlansDirectory(), `${slug}.md`);
|
|
36432
36490
|
try {
|
|
36433
36491
|
await getFsImplementation().readFile(planPath, { encoding: "utf-8" });
|
|
36434
36492
|
return true;
|
|
@@ -36471,9 +36529,9 @@ async function copyPlanForFork(log, targetSessionId) {
|
|
|
36471
36529
|
return false;
|
|
36472
36530
|
}
|
|
36473
36531
|
const plansDir = getPlansDirectory();
|
|
36474
|
-
const originalPlanPath =
|
|
36532
|
+
const originalPlanPath = join9(plansDir, `${originalSlug}.md`);
|
|
36475
36533
|
const newSlug = getPlanSlug(targetSessionId);
|
|
36476
|
-
const newPlanPath =
|
|
36534
|
+
const newPlanPath = join9(plansDir, `${newSlug}.md`);
|
|
36477
36535
|
try {
|
|
36478
36536
|
await copyFile2(originalPlanPath, newPlanPath);
|
|
36479
36537
|
return true;
|
|
@@ -36560,7 +36618,7 @@ async function persistFileSnapshotIfRemote() {
|
|
|
36560
36618
|
uuid: randomUUID3(),
|
|
36561
36619
|
snapshotFiles
|
|
36562
36620
|
};
|
|
36563
|
-
const { recordTranscript } = await import("./chunk-
|
|
36621
|
+
const { recordTranscript } = await import("./chunk-nkjdw1z4.js");
|
|
36564
36622
|
await recordTranscript([message]);
|
|
36565
36623
|
} catch (error) {
|
|
36566
36624
|
logError(error);
|
|
@@ -36589,12 +36647,12 @@ var init_plans = __esm(() => {
|
|
|
36589
36647
|
const resolved = resolve3(cwd, settingsDir);
|
|
36590
36648
|
if (!resolved.startsWith(cwd + sep2) && resolved !== cwd) {
|
|
36591
36649
|
logError(new Error(`plansDirectory must be within project root: ${settingsDir}`));
|
|
36592
|
-
plansPath =
|
|
36650
|
+
plansPath = join9(getClaudeConfigHomeDir(), "plans");
|
|
36593
36651
|
} else {
|
|
36594
36652
|
plansPath = resolved;
|
|
36595
36653
|
}
|
|
36596
36654
|
} else {
|
|
36597
|
-
plansPath =
|
|
36655
|
+
plansPath = join9(getClaudeConfigHomeDir(), "plans");
|
|
36598
36656
|
}
|
|
36599
36657
|
try {
|
|
36600
36658
|
getFsImplementation().mkdirSync(plansPath);
|
|
@@ -36731,37 +36789,37 @@ var init_capitalize = __esm(() => {
|
|
|
36731
36789
|
});
|
|
36732
36790
|
|
|
36733
36791
|
// src/utils/jetbrains.ts
|
|
36734
|
-
import { homedir as
|
|
36735
|
-
import { join as
|
|
36792
|
+
import { homedir as homedir4, platform } from "os";
|
|
36793
|
+
import { join as join10 } from "path";
|
|
36736
36794
|
function buildCommonPluginDirectoryPaths(ideName) {
|
|
36737
|
-
const homeDir =
|
|
36795
|
+
const homeDir = homedir4();
|
|
36738
36796
|
const directories = [];
|
|
36739
36797
|
const idePatterns = ideNameToDirMap[ideName.toLowerCase()];
|
|
36740
36798
|
if (!idePatterns) {
|
|
36741
36799
|
return directories;
|
|
36742
36800
|
}
|
|
36743
|
-
const appData = process.env.APPDATA ||
|
|
36744
|
-
const localAppData = process.env.LOCALAPPDATA ||
|
|
36801
|
+
const appData = process.env.APPDATA || join10(homeDir, "AppData", "Roaming");
|
|
36802
|
+
const localAppData = process.env.LOCALAPPDATA || join10(homeDir, "AppData", "Local");
|
|
36745
36803
|
switch (platform()) {
|
|
36746
36804
|
case "darwin":
|
|
36747
|
-
directories.push(
|
|
36805
|
+
directories.push(join10(homeDir, "Library", "Application Support", "JetBrains"), join10(homeDir, "Library", "Application Support"));
|
|
36748
36806
|
if (ideName.toLowerCase() === "androidstudio") {
|
|
36749
|
-
directories.push(
|
|
36807
|
+
directories.push(join10(homeDir, "Library", "Application Support", "Google"));
|
|
36750
36808
|
}
|
|
36751
36809
|
break;
|
|
36752
36810
|
case "win32":
|
|
36753
|
-
directories.push(
|
|
36811
|
+
directories.push(join10(appData, "JetBrains"), join10(localAppData, "JetBrains"), join10(appData));
|
|
36754
36812
|
if (ideName.toLowerCase() === "androidstudio") {
|
|
36755
|
-
directories.push(
|
|
36813
|
+
directories.push(join10(localAppData, "Google"));
|
|
36756
36814
|
}
|
|
36757
36815
|
break;
|
|
36758
36816
|
case "linux":
|
|
36759
|
-
directories.push(
|
|
36817
|
+
directories.push(join10(homeDir, ".config", "JetBrains"), join10(homeDir, ".local", "share", "JetBrains"));
|
|
36760
36818
|
for (const pattern of idePatterns) {
|
|
36761
|
-
directories.push(
|
|
36819
|
+
directories.push(join10(homeDir, "." + pattern));
|
|
36762
36820
|
}
|
|
36763
36821
|
if (ideName.toLowerCase() === "androidstudio") {
|
|
36764
|
-
directories.push(
|
|
36822
|
+
directories.push(join10(homeDir, ".config", "Google"));
|
|
36765
36823
|
}
|
|
36766
36824
|
break;
|
|
36767
36825
|
default:
|
|
@@ -36787,12 +36845,12 @@ async function detectPluginDirectories(ideName) {
|
|
|
36787
36845
|
continue;
|
|
36788
36846
|
if (!entry.isDirectory() && !entry.isSymbolicLink())
|
|
36789
36847
|
continue;
|
|
36790
|
-
const dir =
|
|
36848
|
+
const dir = join10(baseDir, entry.name);
|
|
36791
36849
|
if (platform() === "linux") {
|
|
36792
36850
|
foundDirectories.push(dir);
|
|
36793
36851
|
continue;
|
|
36794
36852
|
}
|
|
36795
|
-
const pluginDir =
|
|
36853
|
+
const pluginDir = join10(dir, "plugins");
|
|
36796
36854
|
try {
|
|
36797
36855
|
await fs6.stat(pluginDir);
|
|
36798
36856
|
foundDirectories.push(pluginDir);
|
|
@@ -36808,7 +36866,7 @@ async function detectPluginDirectories(ideName) {
|
|
|
36808
36866
|
async function isJetBrainsPluginInstalled(ideType) {
|
|
36809
36867
|
const pluginDirs = await detectPluginDirectories(ideType);
|
|
36810
36868
|
for (const dir of pluginDirs) {
|
|
36811
|
-
const pluginPath =
|
|
36869
|
+
const pluginPath = join10(dir, PLUGIN_PREFIX);
|
|
36812
36870
|
try {
|
|
36813
36871
|
await getFsImplementation().stat(pluginPath);
|
|
36814
36872
|
return true;
|
|
@@ -37210,7 +37268,7 @@ var init_IdeOnboardingDialog = __esm(() => {
|
|
|
37210
37268
|
// src/utils/ide.ts
|
|
37211
37269
|
import { createConnection } from "net";
|
|
37212
37270
|
import * as os from "os";
|
|
37213
|
-
import { basename as basename3, join as
|
|
37271
|
+
import { basename as basename3, join as join11, sep as pathSeparator, resolve as resolve4 } from "path";
|
|
37214
37272
|
function isProcessRunning2(pid) {
|
|
37215
37273
|
try {
|
|
37216
37274
|
process.kill(pid, 0);
|
|
@@ -37254,7 +37312,7 @@ async function getSortedIdeLockfiles() {
|
|
|
37254
37312
|
const entries = await getFsImplementation().readdir(ideLockFilePath);
|
|
37255
37313
|
const lockEntries = entries.filter((file) => file.name.endsWith(".lock"));
|
|
37256
37314
|
const stats = await Promise.all(lockEntries.map(async (file) => {
|
|
37257
|
-
const fullPath =
|
|
37315
|
+
const fullPath = join11(ideLockFilePath, file.name);
|
|
37258
37316
|
try {
|
|
37259
37317
|
const fileStat = await getFsImplementation().stat(fullPath);
|
|
37260
37318
|
return { path: fullPath, mtime: fileStat.mtime };
|
|
@@ -37344,7 +37402,7 @@ async function checkIdeConnection(host, port, timeout = 500) {
|
|
|
37344
37402
|
}
|
|
37345
37403
|
}
|
|
37346
37404
|
async function getIdeLockfilesPaths() {
|
|
37347
|
-
const paths = [
|
|
37405
|
+
const paths = [join11(getClaudeConfigHomeDir(), "ide")];
|
|
37348
37406
|
if (getPlatform() !== "wsl") {
|
|
37349
37407
|
return paths;
|
|
37350
37408
|
}
|
|
@@ -37364,7 +37422,7 @@ async function getIdeLockfilesPaths() {
|
|
|
37364
37422
|
if (user.name === "Public" || user.name === "Default" || user.name === "Default User" || user.name === "All Users") {
|
|
37365
37423
|
continue;
|
|
37366
37424
|
}
|
|
37367
|
-
paths.push(
|
|
37425
|
+
paths.push(join11(usersDir, user.name, ".claude", "ide"));
|
|
37368
37426
|
}
|
|
37369
37427
|
} catch (error) {
|
|
37370
37428
|
if (isFsInaccessible(error)) {
|
|
@@ -37848,7 +37906,7 @@ async function initializeIdeIntegration(onIdeDetected, ideToInstallExtension, on
|
|
|
37848
37906
|
}
|
|
37849
37907
|
}
|
|
37850
37908
|
async function installFromArtifactory(command) {
|
|
37851
|
-
const npmrcPath =
|
|
37909
|
+
const npmrcPath = join11(os.homedir(), ".npmrc");
|
|
37852
37910
|
let authToken = null;
|
|
37853
37911
|
const fs6 = getFsImplementation();
|
|
37854
37912
|
try {
|
|
@@ -37883,7 +37941,7 @@ async function installFromArtifactory(command) {
|
|
|
37883
37941
|
throw new Error("No version found in artifactory response");
|
|
37884
37942
|
}
|
|
37885
37943
|
const vsixUrl = `https://artifactory.infra.ant.dev/artifactory/armorcode-claude-code-internal/claude-vscode-releases/${version}/claude-code.vsix`;
|
|
37886
|
-
const tempVsixPath =
|
|
37944
|
+
const tempVsixPath = join11(os.tmpdir(), `claude-code-${version}-${Date.now()}.vsix`);
|
|
37887
37945
|
try {
|
|
37888
37946
|
const vsixResponse = await axios_default.get(vsixUrl, {
|
|
37889
37947
|
headers: {
|
|
@@ -39441,12 +39499,12 @@ var init_builtinPlugins = __esm(() => {
|
|
|
39441
39499
|
});
|
|
39442
39500
|
|
|
39443
39501
|
// src/utils/plugins/addDirPluginSettings.ts
|
|
39444
|
-
import { join as
|
|
39502
|
+
import { join as join12 } from "path";
|
|
39445
39503
|
function getAddDirEnabledPlugins() {
|
|
39446
39504
|
const result = {};
|
|
39447
39505
|
for (const dir of getAdditionalDirectoriesForClaudeMd()) {
|
|
39448
39506
|
for (const file of SETTINGS_FILES) {
|
|
39449
|
-
const { settings } = parseSettingsFile(
|
|
39507
|
+
const { settings } = parseSettingsFile(join12(dir, ".claude", file));
|
|
39450
39508
|
if (!settings?.enabledPlugins) {
|
|
39451
39509
|
continue;
|
|
39452
39510
|
}
|
|
@@ -39459,7 +39517,7 @@ function getAddDirExtraMarketplaces() {
|
|
|
39459
39517
|
const result = {};
|
|
39460
39518
|
for (const dir of getAdditionalDirectoriesForClaudeMd()) {
|
|
39461
39519
|
for (const file of SETTINGS_FILES) {
|
|
39462
|
-
const { settings } = parseSettingsFile(
|
|
39520
|
+
const { settings } = parseSettingsFile(join12(dir, ".claude", file));
|
|
39463
39521
|
if (!settings?.extraKnownMarketplaces) {
|
|
39464
39522
|
continue;
|
|
39465
39523
|
}
|
|
@@ -41084,7 +41142,7 @@ var init_readOnlyCommandValidation = __esm(() => {
|
|
|
41084
41142
|
});
|
|
41085
41143
|
|
|
41086
41144
|
// src/utils/permissions/pathValidation.ts
|
|
41087
|
-
import { homedir as
|
|
41145
|
+
import { homedir as homedir6 } from "os";
|
|
41088
41146
|
import { dirname as dirname7, isAbsolute as isAbsolute3, resolve as resolve5 } from "path";
|
|
41089
41147
|
function formatDirectoryList(directories) {
|
|
41090
41148
|
const dirCount = directories.length;
|
|
@@ -41107,7 +41165,7 @@ function getGlobBaseDirectory(path4) {
|
|
|
41107
41165
|
}
|
|
41108
41166
|
function expandTilde(path4) {
|
|
41109
41167
|
if (path4 === "~" || path4.startsWith("~/") || process.platform === "win32" && path4.startsWith("~\\")) {
|
|
41110
|
-
return
|
|
41168
|
+
return homedir6() + path4.slice(1);
|
|
41111
41169
|
}
|
|
41112
41170
|
return path4;
|
|
41113
41171
|
}
|
|
@@ -41225,7 +41283,7 @@ function isDangerousRemovalPath(resolvedPath) {
|
|
|
41225
41283
|
if (WINDOWS_DRIVE_ROOT_REGEX.test(normalizedPath)) {
|
|
41226
41284
|
return true;
|
|
41227
41285
|
}
|
|
41228
|
-
const normalizedHome =
|
|
41286
|
+
const normalizedHome = homedir6().replace(/[\\/]+/g, "/");
|
|
41229
41287
|
if (normalizedPath === normalizedHome) {
|
|
41230
41288
|
return true;
|
|
41231
41289
|
}
|
|
@@ -41310,7 +41368,7 @@ var init_pathValidation = __esm(() => {
|
|
|
41310
41368
|
// src/utils/plugins/pluginDirectories.ts
|
|
41311
41369
|
import { mkdirSync } from "fs";
|
|
41312
41370
|
import { readdir as readdir2, rm, stat as stat3 } from "fs/promises";
|
|
41313
|
-
import { delimiter, join as
|
|
41371
|
+
import { delimiter, join as join13 } from "path";
|
|
41314
41372
|
function getPluginsDirectoryName() {
|
|
41315
41373
|
if (getUseCoworkPlugins()) {
|
|
41316
41374
|
return COWORK_PLUGINS_DIR;
|
|
@@ -41325,7 +41383,7 @@ function getPluginsDirectory() {
|
|
|
41325
41383
|
if (envOverride) {
|
|
41326
41384
|
return expandTilde(envOverride);
|
|
41327
41385
|
}
|
|
41328
|
-
return
|
|
41386
|
+
return join13(getClaudeConfigHomeDir(), getPluginsDirectoryName());
|
|
41329
41387
|
}
|
|
41330
41388
|
function getPluginSeedDirs() {
|
|
41331
41389
|
const raw = process.env.CLAUDE_CODE_PLUGIN_SEED_DIR;
|
|
@@ -41337,7 +41395,7 @@ function sanitizePluginId(pluginId) {
|
|
|
41337
41395
|
return pluginId.replace(/[^a-zA-Z0-9\-_]/g, "-");
|
|
41338
41396
|
}
|
|
41339
41397
|
function pluginDataDirPath(pluginId) {
|
|
41340
|
-
return
|
|
41398
|
+
return join13(getPluginsDirectory(), "data", sanitizePluginId(pluginId));
|
|
41341
41399
|
}
|
|
41342
41400
|
function getPluginDataDir(pluginId) {
|
|
41343
41401
|
const dir = pluginDataDirPath(pluginId);
|
|
@@ -41349,7 +41407,7 @@ async function getPluginDataDirSize(pluginId) {
|
|
|
41349
41407
|
let bytes = 0;
|
|
41350
41408
|
const walk = async (p) => {
|
|
41351
41409
|
for (const entry of await readdir2(p, { withFileTypes: true })) {
|
|
41352
|
-
const full =
|
|
41410
|
+
const full = join13(p, entry.name);
|
|
41353
41411
|
if (entry.isDirectory()) {
|
|
41354
41412
|
await walk(full);
|
|
41355
41413
|
} else {
|
|
@@ -41525,26 +41583,26 @@ var init_zip = __esm(() => {
|
|
|
41525
41583
|
});
|
|
41526
41584
|
|
|
41527
41585
|
// src/utils/systemDirectories.ts
|
|
41528
|
-
import { homedir as
|
|
41529
|
-
import { join as
|
|
41586
|
+
import { homedir as homedir7 } from "os";
|
|
41587
|
+
import { join as join14 } from "path";
|
|
41530
41588
|
function getSystemDirectories(options) {
|
|
41531
41589
|
const platform2 = options?.platform ?? getPlatform();
|
|
41532
|
-
const homeDir = options?.homedir ??
|
|
41590
|
+
const homeDir = options?.homedir ?? homedir7();
|
|
41533
41591
|
const env2 = options?.env ?? process.env;
|
|
41534
41592
|
const defaults = {
|
|
41535
41593
|
HOME: homeDir,
|
|
41536
|
-
DESKTOP:
|
|
41537
|
-
DOCUMENTS:
|
|
41538
|
-
DOWNLOADS:
|
|
41594
|
+
DESKTOP: join14(homeDir, "Desktop"),
|
|
41595
|
+
DOCUMENTS: join14(homeDir, "Documents"),
|
|
41596
|
+
DOWNLOADS: join14(homeDir, "Downloads")
|
|
41539
41597
|
};
|
|
41540
41598
|
switch (platform2) {
|
|
41541
41599
|
case "windows": {
|
|
41542
41600
|
const userProfile = env2.USERPROFILE || homeDir;
|
|
41543
41601
|
return {
|
|
41544
41602
|
HOME: homeDir,
|
|
41545
|
-
DESKTOP:
|
|
41546
|
-
DOCUMENTS:
|
|
41547
|
-
DOWNLOADS:
|
|
41603
|
+
DESKTOP: join14(userProfile, "Desktop"),
|
|
41604
|
+
DOCUMENTS: join14(userProfile, "Documents"),
|
|
41605
|
+
DOWNLOADS: join14(userProfile, "Downloads")
|
|
41548
41606
|
};
|
|
41549
41607
|
}
|
|
41550
41608
|
case "linux":
|
|
@@ -41573,7 +41631,7 @@ var init_systemDirectories = __esm(() => {
|
|
|
41573
41631
|
// src/utils/plugins/mcpbHandler.ts
|
|
41574
41632
|
import { createHash } from "crypto";
|
|
41575
41633
|
import { chmod, writeFile as writeFile3 } from "fs/promises";
|
|
41576
|
-
import { dirname as dirname8, join as
|
|
41634
|
+
import { dirname as dirname8, join as join15 } from "path";
|
|
41577
41635
|
function isMcpbSource(source) {
|
|
41578
41636
|
return source.endsWith(".mcpb") || source.endsWith(".dxt");
|
|
41579
41637
|
}
|
|
@@ -41584,11 +41642,11 @@ function generateContentHash(data) {
|
|
|
41584
41642
|
return createHash("sha256").update(data).digest("hex").substring(0, 16);
|
|
41585
41643
|
}
|
|
41586
41644
|
function getMcpbCacheDir(pluginPath) {
|
|
41587
|
-
return
|
|
41645
|
+
return join15(pluginPath, ".mcpb-cache");
|
|
41588
41646
|
}
|
|
41589
41647
|
function getMetadataPath(cacheDir, source) {
|
|
41590
41648
|
const sourceHash = createHash("md5").update(source).digest("hex").substring(0, 8);
|
|
41591
|
-
return
|
|
41649
|
+
return join15(cacheDir, `${sourceHash}.metadata.json`);
|
|
41592
41650
|
}
|
|
41593
41651
|
function serverSecretsKey(pluginId, serverName) {
|
|
41594
41652
|
return `${pluginId}/${serverName}`;
|
|
@@ -41808,7 +41866,7 @@ async function extractMcpbContents(unzipped, extractPath, modes, onProgress) {
|
|
|
41808
41866
|
const entries = Object.entries(unzipped).filter(([k2]) => !k2.endsWith("/"));
|
|
41809
41867
|
const totalFiles = entries.length;
|
|
41810
41868
|
for (const [filePath, fileData] of entries) {
|
|
41811
|
-
const fullPath =
|
|
41869
|
+
const fullPath = join15(extractPath, filePath);
|
|
41812
41870
|
const dir = dirname8(fullPath);
|
|
41813
41871
|
if (dir !== extractPath) {
|
|
41814
41872
|
await getFsImplementation().mkdir(dir);
|
|
@@ -41853,7 +41911,7 @@ async function checkMcpbChanged(source, pluginPath) {
|
|
|
41853
41911
|
return true;
|
|
41854
41912
|
}
|
|
41855
41913
|
if (!isUrl(source)) {
|
|
41856
|
-
const localPath =
|
|
41914
|
+
const localPath = join15(pluginPath, source);
|
|
41857
41915
|
let stats;
|
|
41858
41916
|
try {
|
|
41859
41917
|
stats = await fs6.stat(localPath);
|
|
@@ -41883,7 +41941,7 @@ async function loadMcpbFile(source, pluginPath, pluginId, onProgress, providedUs
|
|
|
41883
41941
|
const metadata = await loadCacheMetadata(cacheDir, source);
|
|
41884
41942
|
if (metadata && !await checkMcpbChanged(source, pluginPath)) {
|
|
41885
41943
|
logForDebugging(`Using cached MCPB from ${metadata.extractedPath} (hash: ${metadata.contentHash})`);
|
|
41886
|
-
const manifestPath =
|
|
41944
|
+
const manifestPath = join15(metadata.extractedPath, "manifest.json");
|
|
41887
41945
|
let manifestContent;
|
|
41888
41946
|
try {
|
|
41889
41947
|
manifestContent = await fs6.readFile(manifestPath, { encoding: "utf-8" });
|
|
@@ -41936,10 +41994,10 @@ async function loadMcpbFile(source, pluginPath, pluginId, onProgress, providedUs
|
|
|
41936
41994
|
let mcpbFilePath;
|
|
41937
41995
|
if (isUrl(source)) {
|
|
41938
41996
|
const sourceHash = createHash("md5").update(source).digest("hex").substring(0, 8);
|
|
41939
|
-
mcpbFilePath =
|
|
41997
|
+
mcpbFilePath = join15(cacheDir, `${sourceHash}.mcpb`);
|
|
41940
41998
|
mcpbData = await downloadMcpb(source, mcpbFilePath, onProgress);
|
|
41941
41999
|
} else {
|
|
41942
|
-
const localPath =
|
|
42000
|
+
const localPath = join15(pluginPath, source);
|
|
41943
42001
|
if (onProgress) {
|
|
41944
42002
|
onProgress(`Loading ${source}...`);
|
|
41945
42003
|
}
|
|
@@ -41975,7 +42033,7 @@ async function loadMcpbFile(source, pluginPath, pluginId, onProgress, providedUs
|
|
|
41975
42033
|
logError(error);
|
|
41976
42034
|
throw error;
|
|
41977
42035
|
}
|
|
41978
|
-
const extractPath =
|
|
42036
|
+
const extractPath = join15(cacheDir, contentHash);
|
|
41979
42037
|
await extractMcpbContents(unzipped, extractPath, modes, onProgress);
|
|
41980
42038
|
if (manifest.user_config && Object.keys(manifest.user_config).length > 0) {
|
|
41981
42039
|
const serverName = manifest.name;
|
|
@@ -42221,7 +42279,7 @@ var init_pluginOptionsStorage = __esm(() => {
|
|
|
42221
42279
|
});
|
|
42222
42280
|
|
|
42223
42281
|
// src/utils/plugins/walkPluginMarkdown.ts
|
|
42224
|
-
import { join as
|
|
42282
|
+
import { join as join16 } from "path";
|
|
42225
42283
|
async function walkPluginMarkdown(rootDir, onFile, opts = {}) {
|
|
42226
42284
|
const fs6 = getFsImplementation();
|
|
42227
42285
|
const label = opts.logLabel ?? "plugin";
|
|
@@ -42229,11 +42287,11 @@ async function walkPluginMarkdown(rootDir, onFile, opts = {}) {
|
|
|
42229
42287
|
try {
|
|
42230
42288
|
const entries = await fs6.readdir(dirPath);
|
|
42231
42289
|
if (opts.stopAtSkillDir && entries.some((e) => e.isFile() && SKILL_MD_RE.test(e.name))) {
|
|
42232
|
-
await Promise.all(entries.map((entry) => entry.isFile() && entry.name.toLowerCase().endsWith(".md") ? onFile(
|
|
42290
|
+
await Promise.all(entries.map((entry) => entry.isFile() && entry.name.toLowerCase().endsWith(".md") ? onFile(join16(dirPath, entry.name), namespace) : undefined));
|
|
42233
42291
|
return;
|
|
42234
42292
|
}
|
|
42235
42293
|
await Promise.all(entries.map((entry) => {
|
|
42236
|
-
const fullPath =
|
|
42294
|
+
const fullPath = join16(dirPath, entry.name);
|
|
42237
42295
|
if (entry.isDirectory()) {
|
|
42238
42296
|
return scan(fullPath, [...namespace, entry.name]);
|
|
42239
42297
|
}
|
|
@@ -42256,7 +42314,7 @@ var init_walkPluginMarkdown = __esm(() => {
|
|
|
42256
42314
|
});
|
|
42257
42315
|
|
|
42258
42316
|
// src/utils/plugins/loadPluginCommands.ts
|
|
42259
|
-
import { basename as basename4, dirname as dirname9, join as
|
|
42317
|
+
import { basename as basename4, dirname as dirname9, join as join17 } from "path";
|
|
42260
42318
|
function isSkillFile(filePath) {
|
|
42261
42319
|
return /^skill\.md$/i.test(basename4(filePath));
|
|
42262
42320
|
}
|
|
@@ -42435,7 +42493,7 @@ function clearPluginCommandCache() {
|
|
|
42435
42493
|
async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, pluginManifest, pluginPath, loadedPaths) {
|
|
42436
42494
|
const fs6 = getFsImplementation();
|
|
42437
42495
|
const skills = [];
|
|
42438
|
-
const directSkillPath =
|
|
42496
|
+
const directSkillPath = join17(skillsPath, "SKILL.md");
|
|
42439
42497
|
let directSkillContent = null;
|
|
42440
42498
|
try {
|
|
42441
42499
|
directSkillContent = await fs6.readFile(directSkillPath, {
|
|
@@ -42486,8 +42544,8 @@ async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, plugi
|
|
|
42486
42544
|
if (!entry.isDirectory() && !entry.isSymbolicLink()) {
|
|
42487
42545
|
return;
|
|
42488
42546
|
}
|
|
42489
|
-
const skillDirPath =
|
|
42490
|
-
const skillFilePath =
|
|
42547
|
+
const skillDirPath = join17(skillsPath, entry.name);
|
|
42548
|
+
const skillFilePath = join17(skillDirPath, "SKILL.md");
|
|
42491
42549
|
let content;
|
|
42492
42550
|
try {
|
|
42493
42551
|
content = await fs6.readFile(skillFilePath, { encoding: "utf-8" });
|
|
@@ -42592,7 +42650,7 @@ var init_loadPluginCommands = __esm(() => {
|
|
|
42592
42650
|
if (plugin.commandsMetadata) {
|
|
42593
42651
|
for (const [name, metadata] of Object.entries(plugin.commandsMetadata)) {
|
|
42594
42652
|
if (metadata.source) {
|
|
42595
|
-
const fullMetadataPath =
|
|
42653
|
+
const fullMetadataPath = join17(plugin.path, metadata.source);
|
|
42596
42654
|
if (commandPath === fullMetadataPath) {
|
|
42597
42655
|
commandName = `${plugin.name}:${name}`;
|
|
42598
42656
|
metadataOverride = metadata;
|
|
@@ -43012,7 +43070,7 @@ import {
|
|
|
43012
43070
|
writeFile as writeFile4
|
|
43013
43071
|
} from "fs/promises";
|
|
43014
43072
|
import { tmpdir as tmpdir3 } from "os";
|
|
43015
|
-
import { basename as basename6, dirname as dirname10, join as
|
|
43073
|
+
import { basename as basename6, dirname as dirname10, join as join18 } from "path";
|
|
43016
43074
|
function isPluginZipCacheEnabled() {
|
|
43017
43075
|
return isEnvTruthy(process.env.CLAUDE_CODE_PLUGIN_USE_ZIP_CACHE);
|
|
43018
43076
|
}
|
|
@@ -43028,21 +43086,21 @@ function getZipCacheKnownMarketplacesPath() {
|
|
|
43028
43086
|
if (!cachePath) {
|
|
43029
43087
|
throw new Error("Plugin zip cache is not enabled");
|
|
43030
43088
|
}
|
|
43031
|
-
return
|
|
43089
|
+
return join18(cachePath, "known_marketplaces.json");
|
|
43032
43090
|
}
|
|
43033
43091
|
function getZipCacheMarketplacesDir() {
|
|
43034
43092
|
const cachePath = getPluginZipCachePath();
|
|
43035
43093
|
if (!cachePath) {
|
|
43036
43094
|
throw new Error("Plugin zip cache is not enabled");
|
|
43037
43095
|
}
|
|
43038
|
-
return
|
|
43096
|
+
return join18(cachePath, "marketplaces");
|
|
43039
43097
|
}
|
|
43040
43098
|
function getZipCachePluginsDir() {
|
|
43041
43099
|
const cachePath = getPluginZipCachePath();
|
|
43042
43100
|
if (!cachePath) {
|
|
43043
43101
|
throw new Error("Plugin zip cache is not enabled");
|
|
43044
43102
|
}
|
|
43045
|
-
return
|
|
43103
|
+
return join18(cachePath, "plugins");
|
|
43046
43104
|
}
|
|
43047
43105
|
async function getSessionPluginCachePath() {
|
|
43048
43106
|
if (sessionPluginCachePath) {
|
|
@@ -43051,7 +43109,7 @@ async function getSessionPluginCachePath() {
|
|
|
43051
43109
|
if (!sessionPluginCachePromise) {
|
|
43052
43110
|
sessionPluginCachePromise = (async () => {
|
|
43053
43111
|
const suffix = randomBytes3(8).toString("hex");
|
|
43054
|
-
const dir =
|
|
43112
|
+
const dir = join18(tmpdir3(), `claude-plugin-session-${suffix}`);
|
|
43055
43113
|
await getFsImplementation().mkdir(dir);
|
|
43056
43114
|
sessionPluginCachePath = dir;
|
|
43057
43115
|
logForDebugging(`Created session plugin cache at ${dir}`);
|
|
@@ -43078,7 +43136,7 @@ async function atomicWriteToZipCache(targetPath, data) {
|
|
|
43078
43136
|
const dir = dirname10(targetPath);
|
|
43079
43137
|
await getFsImplementation().mkdir(dir);
|
|
43080
43138
|
const tmpName = `.${basename6(targetPath)}.tmp.${randomBytes3(4).toString("hex")}`;
|
|
43081
|
-
const tmpPath =
|
|
43139
|
+
const tmpPath = join18(dir, tmpName);
|
|
43082
43140
|
try {
|
|
43083
43141
|
if (typeof data === "string") {
|
|
43084
43142
|
await writeFile4(tmpPath, data, { encoding: "utf-8" });
|
|
@@ -43103,7 +43161,7 @@ async function createZipFromDirectory(sourceDir) {
|
|
|
43103
43161
|
return zipData;
|
|
43104
43162
|
}
|
|
43105
43163
|
async function collectFilesForZip(baseDir, relativePath, files, visited) {
|
|
43106
|
-
const currentDir = relativePath ?
|
|
43164
|
+
const currentDir = relativePath ? join18(baseDir, relativePath) : baseDir;
|
|
43107
43165
|
let entries;
|
|
43108
43166
|
try {
|
|
43109
43167
|
entries = await readdir3(currentDir);
|
|
@@ -43127,7 +43185,7 @@ async function collectFilesForZip(baseDir, relativePath, files, visited) {
|
|
|
43127
43185
|
if (entry === ".git") {
|
|
43128
43186
|
continue;
|
|
43129
43187
|
}
|
|
43130
|
-
const fullPath =
|
|
43188
|
+
const fullPath = join18(currentDir, entry);
|
|
43131
43189
|
const relPath = relativePath ? `${relativePath}/${entry}` : entry;
|
|
43132
43190
|
let fileStat;
|
|
43133
43191
|
try {
|
|
@@ -43168,10 +43226,10 @@ async function extractZipToDirectory(zipPath, targetDir) {
|
|
|
43168
43226
|
await getFsImplementation().mkdir(targetDir);
|
|
43169
43227
|
for (const [relPath, data] of Object.entries(files)) {
|
|
43170
43228
|
if (relPath.endsWith("/")) {
|
|
43171
|
-
await getFsImplementation().mkdir(
|
|
43229
|
+
await getFsImplementation().mkdir(join18(targetDir, relPath));
|
|
43172
43230
|
continue;
|
|
43173
43231
|
}
|
|
43174
|
-
const fullPath =
|
|
43232
|
+
const fullPath = join18(targetDir, relPath);
|
|
43175
43233
|
await getFsImplementation().mkdir(dirname10(fullPath));
|
|
43176
43234
|
await writeFile4(fullPath, data);
|
|
43177
43235
|
const mode = modes[relPath];
|
|
@@ -43188,7 +43246,7 @@ async function convertDirectoryToZipInPlace(dirPath, zipPath) {
|
|
|
43188
43246
|
}
|
|
43189
43247
|
function getMarketplaceJsonRelativePath(marketplaceName) {
|
|
43190
43248
|
const sanitized = marketplaceName.replace(/[^a-zA-Z0-9\-_]/g, "-");
|
|
43191
|
-
return
|
|
43249
|
+
return join18("marketplaces", `${sanitized}.json`);
|
|
43192
43250
|
}
|
|
43193
43251
|
function isMarketplaceSourceSupportedByZipCache(source) {
|
|
43194
43252
|
return ["github", "git", "url", "settings"].includes(source.source);
|
|
@@ -43204,7 +43262,7 @@ var init_zipCache = __esm(() => {
|
|
|
43204
43262
|
|
|
43205
43263
|
// src/utils/plugins/cacheUtils.ts
|
|
43206
43264
|
import { readdir as readdir4, rm as rm3, stat as stat5, unlink, writeFile as writeFile5 } from "fs/promises";
|
|
43207
|
-
import { join as
|
|
43265
|
+
import { join as join19 } from "path";
|
|
43208
43266
|
function clearAllPluginCaches() {
|
|
43209
43267
|
clearPluginCache();
|
|
43210
43268
|
clearPluginCommandCache();
|
|
@@ -43241,11 +43299,11 @@ async function cleanupOrphanedPluginVersionsInBackground() {
|
|
|
43241
43299
|
const now = Date.now();
|
|
43242
43300
|
await Promise.all([...installedVersions].map((p) => removeOrphanedAtMarker(p)));
|
|
43243
43301
|
for (const marketplace of await readSubdirs(cachePath)) {
|
|
43244
|
-
const marketplacePath =
|
|
43302
|
+
const marketplacePath = join19(cachePath, marketplace);
|
|
43245
43303
|
for (const plugin of await readSubdirs(marketplacePath)) {
|
|
43246
|
-
const pluginPath =
|
|
43304
|
+
const pluginPath = join19(marketplacePath, plugin);
|
|
43247
43305
|
for (const version of await readSubdirs(pluginPath)) {
|
|
43248
|
-
const versionPath =
|
|
43306
|
+
const versionPath = join19(pluginPath, version);
|
|
43249
43307
|
if (installedVersions.has(versionPath))
|
|
43250
43308
|
continue;
|
|
43251
43309
|
await processOrphanedPluginVersion(versionPath, now);
|
|
@@ -43259,7 +43317,7 @@ async function cleanupOrphanedPluginVersionsInBackground() {
|
|
|
43259
43317
|
}
|
|
43260
43318
|
}
|
|
43261
43319
|
function getOrphanedAtPath(versionPath) {
|
|
43262
|
-
return
|
|
43320
|
+
return join19(versionPath, ORPHANED_AT_FILENAME);
|
|
43263
43321
|
}
|
|
43264
43322
|
async function removeOrphanedAtMarker(versionPath) {
|
|
43265
43323
|
const orphanedAtPath = getOrphanedAtPath(versionPath);
|
|
@@ -43662,7 +43720,7 @@ var init_marketplaceHelpers = __esm(() => {
|
|
|
43662
43720
|
|
|
43663
43721
|
// src/utils/plugins/officialMarketplaceGcs.ts
|
|
43664
43722
|
import { chmod as chmod3, mkdir as mkdir3, readFile as readFile5, rename as rename2, rm as rm4, writeFile as writeFile6 } from "fs/promises";
|
|
43665
|
-
import { dirname as dirname11, join as
|
|
43723
|
+
import { dirname as dirname11, join as join20, resolve as resolve6, sep as sep3 } from "path";
|
|
43666
43724
|
async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCacheDir) {
|
|
43667
43725
|
const cacheDir = resolve6(marketplacesCacheDir);
|
|
43668
43726
|
const resolvedLoc = resolve6(installLocation);
|
|
@@ -43685,7 +43743,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
43685
43743
|
if (!sha) {
|
|
43686
43744
|
throw new Error("latest pointer returned empty body");
|
|
43687
43745
|
}
|
|
43688
|
-
const sentinelPath =
|
|
43746
|
+
const sentinelPath = join20(installLocation, ".gcs-sha");
|
|
43689
43747
|
const currentSha = await readFile5(sentinelPath, "utf8").then((s) => s.trim(), () => null);
|
|
43690
43748
|
if (currentSha === sha) {
|
|
43691
43749
|
outcome = "noop";
|
|
@@ -43708,7 +43766,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
43708
43766
|
const rel = arcPath.slice(ARC_PREFIX.length);
|
|
43709
43767
|
if (!rel || rel.endsWith("/"))
|
|
43710
43768
|
continue;
|
|
43711
|
-
const dest =
|
|
43769
|
+
const dest = join20(staging, rel);
|
|
43712
43770
|
await mkdir3(dirname11(dest), { recursive: true });
|
|
43713
43771
|
await writeFile6(dest, data);
|
|
43714
43772
|
const mode = modes[arcPath];
|
|
@@ -43716,7 +43774,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
43716
43774
|
await chmod3(dest, mode & 511).catch(() => {});
|
|
43717
43775
|
}
|
|
43718
43776
|
}
|
|
43719
|
-
await writeFile6(
|
|
43777
|
+
await writeFile6(join20(staging, ".gcs-sha"), sha);
|
|
43720
43778
|
await rm4(installLocation, { recursive: true, force: true });
|
|
43721
43779
|
await rename2(staging, installLocation);
|
|
43722
43780
|
outcome = "updated";
|
|
@@ -43783,12 +43841,12 @@ var init_officialMarketplaceGcs = __esm(() => {
|
|
|
43783
43841
|
|
|
43784
43842
|
// src/utils/plugins/marketplaceManager.ts
|
|
43785
43843
|
import { writeFile as writeFile7 } from "fs/promises";
|
|
43786
|
-
import { basename as basename7, dirname as dirname12, isAbsolute as isAbsolute5, join as
|
|
43844
|
+
import { basename as basename7, dirname as dirname12, isAbsolute as isAbsolute5, join as join21, resolve as resolve7, sep as sep4 } from "path";
|
|
43787
43845
|
function getKnownMarketplacesFile() {
|
|
43788
|
-
return
|
|
43846
|
+
return join21(getPluginsDirectory(), "known_marketplaces.json");
|
|
43789
43847
|
}
|
|
43790
43848
|
function getMarketplacesCacheDir() {
|
|
43791
|
-
return
|
|
43849
|
+
return join21(getPluginsDirectory(), "marketplaces");
|
|
43792
43850
|
}
|
|
43793
43851
|
function clearMarketplacesCache() {
|
|
43794
43852
|
getMarketplace.cache?.clear?.();
|
|
@@ -43875,7 +43933,7 @@ async function saveKnownMarketplacesConfig(config2) {
|
|
|
43875
43933
|
throw new ConfigParseError(`Invalid marketplace config: ${parsed.error.message}`, configFile, config2);
|
|
43876
43934
|
}
|
|
43877
43935
|
const fs6 = getFsImplementation();
|
|
43878
|
-
const dir =
|
|
43936
|
+
const dir = join21(configFile, "..");
|
|
43879
43937
|
await fs6.mkdir(dir);
|
|
43880
43938
|
writeFileSync_DEPRECATED(configFile, jsonStringify(parsed.data, null, 2), {
|
|
43881
43939
|
encoding: "utf-8",
|
|
@@ -43922,7 +43980,7 @@ async function registerSeedMarketplaces() {
|
|
|
43922
43980
|
return false;
|
|
43923
43981
|
}
|
|
43924
43982
|
async function readSeedKnownMarketplaces(seedDir) {
|
|
43925
|
-
const seedJsonPath =
|
|
43983
|
+
const seedJsonPath = join21(seedDir, "known_marketplaces.json");
|
|
43926
43984
|
try {
|
|
43927
43985
|
const content = await getFsImplementation().readFile(seedJsonPath, {
|
|
43928
43986
|
encoding: "utf-8"
|
|
@@ -43941,8 +43999,8 @@ async function readSeedKnownMarketplaces(seedDir) {
|
|
|
43941
43999
|
}
|
|
43942
44000
|
}
|
|
43943
44001
|
async function findSeedMarketplaceLocation(seedDir, name) {
|
|
43944
|
-
const dirCandidate =
|
|
43945
|
-
const jsonCandidate =
|
|
44002
|
+
const dirCandidate = join21(seedDir, "marketplaces", name);
|
|
44003
|
+
const jsonCandidate = join21(seedDir, "marketplaces", `${name}.json`);
|
|
43946
44004
|
for (const candidate of [dirCandidate, jsonCandidate]) {
|
|
43947
44005
|
try {
|
|
43948
44006
|
await readCachedMarketplace(candidate);
|
|
@@ -43994,7 +44052,7 @@ async function gitPull(cwd, ref, options) {
|
|
|
43994
44052
|
async function gitSubmoduleUpdate(cwd, credentialArgs, env2, sparsePaths) {
|
|
43995
44053
|
if (sparsePaths && sparsePaths.length > 0)
|
|
43996
44054
|
return;
|
|
43997
|
-
const hasGitmodules = await getFsImplementation().stat(
|
|
44055
|
+
const hasGitmodules = await getFsImplementation().stat(join21(cwd, ".gitmodules")).then(() => true, () => false);
|
|
43998
44056
|
if (!hasGitmodules)
|
|
43999
44057
|
return;
|
|
44000
44058
|
const result = await execFileNoThrowWithCwd(gitExe(), [
|
|
@@ -44356,7 +44414,7 @@ Technical details: ${error.message}`);
|
|
|
44356
44414
|
}
|
|
44357
44415
|
logPluginFetch("marketplace_url", url2, "success", performance.now() - fetchStarted);
|
|
44358
44416
|
safeCallProgress(onProgress, "Saving marketplace to cache");
|
|
44359
|
-
const cacheDir =
|
|
44417
|
+
const cacheDir = join21(cachePath, "..");
|
|
44360
44418
|
await fs6.mkdir(cacheDir);
|
|
44361
44419
|
writeFileSync_DEPRECATED(cachePath, jsonStringify(result.data, null, 2), {
|
|
44362
44420
|
encoding: "utf-8",
|
|
@@ -44393,7 +44451,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
44393
44451
|
try {
|
|
44394
44452
|
switch (source.source) {
|
|
44395
44453
|
case "url": {
|
|
44396
|
-
temporaryCachePath =
|
|
44454
|
+
temporaryCachePath = join21(cacheDir, `${tempName}.json`);
|
|
44397
44455
|
cleanupNeeded = true;
|
|
44398
44456
|
await cacheMarketplaceFromUrl(source.url, temporaryCachePath, source.headers, onProgress);
|
|
44399
44457
|
marketplacePath = temporaryCachePath;
|
|
@@ -44402,7 +44460,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
44402
44460
|
case "github": {
|
|
44403
44461
|
const sshUrl = `git@github.com:${source.repo}.git`;
|
|
44404
44462
|
const httpsUrl = `https://github.com/${source.repo}.git`;
|
|
44405
|
-
temporaryCachePath =
|
|
44463
|
+
temporaryCachePath = join21(cacheDir, tempName);
|
|
44406
44464
|
cleanupNeeded = true;
|
|
44407
44465
|
let lastError = null;
|
|
44408
44466
|
const sshConfigured = await isGitHubSshLikelyConfigured();
|
|
@@ -44447,14 +44505,14 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
44447
44505
|
if (lastError) {
|
|
44448
44506
|
throw lastError;
|
|
44449
44507
|
}
|
|
44450
|
-
marketplacePath =
|
|
44508
|
+
marketplacePath = join21(temporaryCachePath, source.path || ".claude-plugin/marketplace.json");
|
|
44451
44509
|
break;
|
|
44452
44510
|
}
|
|
44453
44511
|
case "git": {
|
|
44454
|
-
temporaryCachePath =
|
|
44512
|
+
temporaryCachePath = join21(cacheDir, tempName);
|
|
44455
44513
|
cleanupNeeded = true;
|
|
44456
44514
|
await cacheMarketplaceFromGit(source.url, temporaryCachePath, source.ref, source.sparsePaths, onProgress);
|
|
44457
|
-
marketplacePath =
|
|
44515
|
+
marketplacePath = join21(temporaryCachePath, source.path || ".claude-plugin/marketplace.json");
|
|
44458
44516
|
break;
|
|
44459
44517
|
}
|
|
44460
44518
|
case "npm": {
|
|
@@ -44469,14 +44527,14 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
44469
44527
|
}
|
|
44470
44528
|
case "directory": {
|
|
44471
44529
|
const absPath = resolve7(source.path);
|
|
44472
|
-
marketplacePath =
|
|
44530
|
+
marketplacePath = join21(absPath, ".claude-plugin", "marketplace.json");
|
|
44473
44531
|
temporaryCachePath = absPath;
|
|
44474
44532
|
cleanupNeeded = false;
|
|
44475
44533
|
break;
|
|
44476
44534
|
}
|
|
44477
44535
|
case "settings": {
|
|
44478
|
-
temporaryCachePath =
|
|
44479
|
-
marketplacePath =
|
|
44536
|
+
temporaryCachePath = join21(cacheDir, source.name);
|
|
44537
|
+
marketplacePath = join21(temporaryCachePath, ".claude-plugin", "marketplace.json");
|
|
44480
44538
|
cleanupNeeded = false;
|
|
44481
44539
|
await fs6.mkdir(dirname12(marketplacePath));
|
|
44482
44540
|
await writeFile7(marketplacePath, jsonStringify({
|
|
@@ -44499,7 +44557,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
44499
44557
|
}
|
|
44500
44558
|
throw new Error(`Failed to parse marketplace file at ${marketplacePath}: ${errorMessage(e)}`);
|
|
44501
44559
|
}
|
|
44502
|
-
const finalCachePath =
|
|
44560
|
+
const finalCachePath = join21(cacheDir, marketplace.name);
|
|
44503
44561
|
const resolvedFinal = resolve7(finalCachePath);
|
|
44504
44562
|
const resolvedCacheDir = resolve7(cacheDir);
|
|
44505
44563
|
if (!resolvedFinal.startsWith(resolvedCacheDir + sep4)) {
|
|
@@ -44620,9 +44678,9 @@ async function removeMarketplaceSource(name) {
|
|
|
44620
44678
|
await saveKnownMarketplacesConfig(config2);
|
|
44621
44679
|
const fs6 = getFsImplementation();
|
|
44622
44680
|
const cacheDir = getMarketplacesCacheDir();
|
|
44623
|
-
const cachePath =
|
|
44681
|
+
const cachePath = join21(cacheDir, name);
|
|
44624
44682
|
await fs6.rm(cachePath, { recursive: true, force: true });
|
|
44625
|
-
const jsonCachePath =
|
|
44683
|
+
const jsonCachePath = join21(cacheDir, `${name}.json`);
|
|
44626
44684
|
await fs6.rm(jsonCachePath, { force: true });
|
|
44627
44685
|
const editableSources = ["userSettings", "projectSettings", "localSettings"];
|
|
44628
44686
|
for (const source of editableSources) {
|
|
@@ -44673,7 +44731,7 @@ async function removeMarketplaceSource(name) {
|
|
|
44673
44731
|
logForDebugging(`Removed marketplace source: ${name}`);
|
|
44674
44732
|
}
|
|
44675
44733
|
async function readCachedMarketplace(installLocation) {
|
|
44676
|
-
const nestedPath =
|
|
44734
|
+
const nestedPath = join21(installLocation, ".claude-plugin", "marketplace.json");
|
|
44677
44735
|
try {
|
|
44678
44736
|
return await parseFileWithSchema(nestedPath, PluginMarketplaceSchema());
|
|
44679
44737
|
} catch (e) {
|
|
@@ -44973,12 +45031,12 @@ var init_marketplaceManager = __esm(() => {
|
|
|
44973
45031
|
});
|
|
44974
45032
|
|
|
44975
45033
|
// src/utils/plugins/installedPluginsManager.ts
|
|
44976
|
-
import { dirname as dirname13, join as
|
|
45034
|
+
import { dirname as dirname13, join as join22 } from "path";
|
|
44977
45035
|
function getInstalledPluginsFilePath() {
|
|
44978
|
-
return
|
|
45036
|
+
return join22(getPluginsDirectory(), "installed_plugins.json");
|
|
44979
45037
|
}
|
|
44980
45038
|
function getInstalledPluginsV2FilePath() {
|
|
44981
|
-
return
|
|
45039
|
+
return join22(getPluginsDirectory(), "installed_plugins_v2.json");
|
|
44982
45040
|
}
|
|
44983
45041
|
function migrateToSinglePluginFile() {
|
|
44984
45042
|
if (migrationCompleted) {
|
|
@@ -45046,12 +45104,12 @@ function cleanupLegacyCache(v2Data) {
|
|
|
45046
45104
|
continue;
|
|
45047
45105
|
}
|
|
45048
45106
|
const entry = dirent.name;
|
|
45049
|
-
const entryPath =
|
|
45107
|
+
const entryPath = join22(cachePath, entry);
|
|
45050
45108
|
const subEntries = fs6.readdirSync(entryPath);
|
|
45051
45109
|
const hasVersionedStructure = subEntries.some((subDirent) => {
|
|
45052
45110
|
if (!subDirent.isDirectory())
|
|
45053
45111
|
return false;
|
|
45054
|
-
const subPath =
|
|
45112
|
+
const subPath = join22(entryPath, subDirent.name);
|
|
45055
45113
|
const versionEntries = fs6.readdirSync(subPath);
|
|
45056
45114
|
return versionEntries.some((vDirent) => vDirent.isDirectory());
|
|
45057
45115
|
});
|
|
@@ -45306,7 +45364,7 @@ async function getGitCommitSha(dirPath) {
|
|
|
45306
45364
|
}
|
|
45307
45365
|
function getPluginVersionFromManifest(pluginCachePath, pluginId) {
|
|
45308
45366
|
const fs6 = getFsImplementation();
|
|
45309
|
-
const manifestPath =
|
|
45367
|
+
const manifestPath = join22(pluginCachePath, ".claude-plugin", "plugin.json");
|
|
45310
45368
|
try {
|
|
45311
45369
|
const manifestContent = fs6.readFileSync(manifestPath, { encoding: "utf-8" });
|
|
45312
45370
|
const manifest = jsonParse(manifestContent);
|
|
@@ -45400,13 +45458,13 @@ async function migrateFromEnabledPlugins() {
|
|
|
45400
45458
|
let version = "unknown";
|
|
45401
45459
|
let gitCommitSha = undefined;
|
|
45402
45460
|
if (typeof entry.source === "string") {
|
|
45403
|
-
installPath =
|
|
45461
|
+
installPath = join22(marketplaceInstallLocation, entry.source);
|
|
45404
45462
|
version = getPluginVersionFromManifest(installPath, pluginId);
|
|
45405
45463
|
gitCommitSha = await getGitCommitSha(installPath);
|
|
45406
45464
|
} else {
|
|
45407
45465
|
const cachePath = getPluginCachePath();
|
|
45408
45466
|
const sanitizedName = pluginName.replace(/[^a-zA-Z0-9-_]/g, "-");
|
|
45409
|
-
const pluginCachePath =
|
|
45467
|
+
const pluginCachePath = join22(cachePath, sanitizedName);
|
|
45410
45468
|
let dirEntries;
|
|
45411
45469
|
try {
|
|
45412
45470
|
dirEntries = (await getFsImplementation().readdir(pluginCachePath)).map((e) => typeof e === "string" ? e : e.name);
|
|
@@ -45645,7 +45703,7 @@ var init_pluginVersioning = __esm(() => {
|
|
|
45645
45703
|
// src/utils/plugins/pluginInstallationHelpers.ts
|
|
45646
45704
|
import { randomBytes as randomBytes4 } from "crypto";
|
|
45647
45705
|
import { rename as rename3, rm as rm5 } from "fs/promises";
|
|
45648
|
-
import { dirname as dirname14, join as
|
|
45706
|
+
import { dirname as dirname14, join as join23, resolve as resolve8, sep as sep6 } from "path";
|
|
45649
45707
|
function getCurrentTimestamp() {
|
|
45650
45708
|
return new Date().toISOString();
|
|
45651
45709
|
}
|
|
@@ -45674,7 +45732,7 @@ async function cacheAndRegisterPlugin(pluginId, entry, scope = "user", projectPa
|
|
|
45674
45732
|
const normalizedCachePath = cacheResult.path.endsWith(sep6) ? cacheResult.path : cacheResult.path + sep6;
|
|
45675
45733
|
const isSubdirectory = versionedPath.startsWith(normalizedCachePath);
|
|
45676
45734
|
if (isSubdirectory) {
|
|
45677
|
-
const tempPath =
|
|
45735
|
+
const tempPath = join23(dirname14(cacheResult.path), `.claude-plugin-temp-${Date.now()}-${randomBytes4(4).toString("hex")}`);
|
|
45678
45736
|
await rename3(cacheResult.path, tempPath);
|
|
45679
45737
|
await getFsImplementation().mkdir(dirname14(versionedPath));
|
|
45680
45738
|
await rename3(tempPath, versionedPath);
|
|
@@ -45906,16 +45964,16 @@ import {
|
|
|
45906
45964
|
stat as stat6,
|
|
45907
45965
|
symlink as symlink2
|
|
45908
45966
|
} from "fs/promises";
|
|
45909
|
-
import { basename as basename8, dirname as dirname15, join as
|
|
45967
|
+
import { basename as basename8, dirname as dirname15, join as join24, relative as relative2, resolve as resolve9, sep as sep7 } from "path";
|
|
45910
45968
|
function getPluginCachePath() {
|
|
45911
|
-
return
|
|
45969
|
+
return join24(getPluginsDirectory(), "cache");
|
|
45912
45970
|
}
|
|
45913
45971
|
function getVersionedCachePathIn(baseDir, pluginId, version) {
|
|
45914
45972
|
const { name: pluginName, marketplace } = parsePluginIdentifier(pluginId);
|
|
45915
45973
|
const sanitizedMarketplace = (marketplace || "unknown").replace(/[^a-zA-Z0-9\-_]/g, "-");
|
|
45916
45974
|
const sanitizedPlugin = (pluginName || pluginId).replace(/[^a-zA-Z0-9\-_]/g, "-");
|
|
45917
45975
|
const sanitizedVersion = version.replace(/[^a-zA-Z0-9\-_.]/g, "-");
|
|
45918
|
-
return
|
|
45976
|
+
return join24(baseDir, "cache", sanitizedMarketplace, sanitizedPlugin, sanitizedVersion);
|
|
45919
45977
|
}
|
|
45920
45978
|
function getVersionedCachePath(pluginId, version) {
|
|
45921
45979
|
return getVersionedCachePathIn(getPluginsDirectory(), pluginId, version);
|
|
@@ -45941,7 +45999,7 @@ async function probeSeedCacheAnyVersion(pluginId) {
|
|
|
45941
45999
|
const versions = await readdir5(pluginDir);
|
|
45942
46000
|
if (versions.length !== 1)
|
|
45943
46001
|
continue;
|
|
45944
|
-
const versionDir =
|
|
46002
|
+
const versionDir = join24(pluginDir, versions[0]);
|
|
45945
46003
|
const entries = await readdir5(versionDir);
|
|
45946
46004
|
if (entries.length > 0)
|
|
45947
46005
|
return versionDir;
|
|
@@ -45953,8 +46011,8 @@ async function copyDir(src, dest) {
|
|
|
45953
46011
|
await getFsImplementation().mkdir(dest);
|
|
45954
46012
|
const entries = await readdir5(src, { withFileTypes: true });
|
|
45955
46013
|
for (const entry of entries) {
|
|
45956
|
-
const srcPath =
|
|
45957
|
-
const destPath =
|
|
46014
|
+
const srcPath = join24(src, entry.name);
|
|
46015
|
+
const destPath = join24(dest, entry.name);
|
|
45958
46016
|
if (entry.isDirectory()) {
|
|
45959
46017
|
await copyDir(srcPath, destPath);
|
|
45960
46018
|
} else if (entry.isFile()) {
|
|
@@ -45977,7 +46035,7 @@ async function copyDir(src, dest) {
|
|
|
45977
46035
|
const srcPrefix = resolvedSrc.endsWith(sep7) ? resolvedSrc : resolvedSrc + sep7;
|
|
45978
46036
|
if (resolvedTarget.startsWith(srcPrefix) || resolvedTarget === resolvedSrc) {
|
|
45979
46037
|
const targetRelativeToSrc = relative2(resolvedSrc, resolvedTarget);
|
|
45980
|
-
const destTargetPath =
|
|
46038
|
+
const destTargetPath = join24(dest, targetRelativeToSrc);
|
|
45981
46039
|
const relativeLinkPath = relative2(dirname15(destPath), destTargetPath);
|
|
45982
46040
|
await symlink2(relativeLinkPath, destPath);
|
|
45983
46041
|
} else {
|
|
@@ -46025,7 +46083,7 @@ async function copyPluginToVersionedCache(sourcePath, pluginId, version, entry,
|
|
|
46025
46083
|
logForDebugging(`Copying plugin ${pluginId} to versioned cache (fallback to full copy)`);
|
|
46026
46084
|
await copyDir(sourcePath, cachePath);
|
|
46027
46085
|
}
|
|
46028
|
-
const gitPath =
|
|
46086
|
+
const gitPath = join24(cachePath, ".git");
|
|
46029
46087
|
await rm6(gitPath, { recursive: true, force: true });
|
|
46030
46088
|
const cacheEntries = await readdir5(cachePath);
|
|
46031
46089
|
if (cacheEntries.length === 0) {
|
|
@@ -46056,10 +46114,10 @@ function validateGitUrl(url2) {
|
|
|
46056
46114
|
}
|
|
46057
46115
|
}
|
|
46058
46116
|
async function installFromNpm(packageName, targetPath, options = {}) {
|
|
46059
|
-
const npmCachePath =
|
|
46117
|
+
const npmCachePath = join24(getPluginsDirectory(), "npm-cache");
|
|
46060
46118
|
await getFsImplementation().mkdir(npmCachePath);
|
|
46061
46119
|
const packageSpec = options.version ? `${packageName}@${options.version}` : packageName;
|
|
46062
|
-
const packagePath =
|
|
46120
|
+
const packagePath = join24(npmCachePath, "node_modules", packageName);
|
|
46063
46121
|
const needsInstall = !await pathExists(packagePath);
|
|
46064
46122
|
if (needsInstall) {
|
|
46065
46123
|
logForDebugging(`Installing npm package ${packageSpec} to cache`);
|
|
@@ -46212,7 +46270,7 @@ async function installFromLocal(sourcePath, targetPath) {
|
|
|
46212
46270
|
throw new Error(`Source path does not exist: ${sourcePath}`);
|
|
46213
46271
|
}
|
|
46214
46272
|
await copyDir(sourcePath, targetPath);
|
|
46215
|
-
const gitPath =
|
|
46273
|
+
const gitPath = join24(targetPath, ".git");
|
|
46216
46274
|
await rm6(gitPath, { recursive: true, force: true });
|
|
46217
46275
|
}
|
|
46218
46276
|
function generateTemporaryCacheNameForPlugin(source) {
|
|
@@ -46248,7 +46306,7 @@ async function cachePlugin(source, options) {
|
|
|
46248
46306
|
const cachePath = getPluginCachePath();
|
|
46249
46307
|
await getFsImplementation().mkdir(cachePath);
|
|
46250
46308
|
const tempName = generateTemporaryCacheNameForPlugin(source);
|
|
46251
|
-
const tempPath =
|
|
46309
|
+
const tempPath = join24(cachePath, tempName);
|
|
46252
46310
|
let shouldCleanup = false;
|
|
46253
46311
|
let gitCommitSha;
|
|
46254
46312
|
try {
|
|
@@ -46292,8 +46350,8 @@ async function cachePlugin(source, options) {
|
|
|
46292
46350
|
}
|
|
46293
46351
|
throw error;
|
|
46294
46352
|
}
|
|
46295
|
-
const manifestPath =
|
|
46296
|
-
const legacyManifestPath =
|
|
46353
|
+
const manifestPath = join24(tempPath, ".claude-plugin", "plugin.json");
|
|
46354
|
+
const legacyManifestPath = join24(tempPath, "plugin.json");
|
|
46297
46355
|
let manifest;
|
|
46298
46356
|
if (await pathExists(manifestPath)) {
|
|
46299
46357
|
try {
|
|
@@ -46350,7 +46408,7 @@ async function cachePlugin(source, options) {
|
|
|
46350
46408
|
};
|
|
46351
46409
|
}
|
|
46352
46410
|
const finalName = manifest.name.replace(/[^a-zA-Z0-9-_]/g, "-");
|
|
46353
|
-
const finalPath =
|
|
46411
|
+
const finalPath = join24(cachePath, finalName);
|
|
46354
46412
|
if (await pathExists(finalPath)) {
|
|
46355
46413
|
logForDebugging(`Removing old cached version at ${finalPath}`);
|
|
46356
46414
|
await rm6(finalPath, { recursive: true, force: true });
|
|
@@ -46404,7 +46462,7 @@ async function loadPluginHooks2(hooksConfigPath, pluginName) {
|
|
|
46404
46462
|
}
|
|
46405
46463
|
async function validatePluginPaths(relPaths, pluginPath, pluginName, source, component, componentLabel, contextLabel, errors) {
|
|
46406
46464
|
const checks2 = await Promise.all(relPaths.map(async (relPath) => {
|
|
46407
|
-
const fullPath =
|
|
46465
|
+
const fullPath = join24(pluginPath, relPath);
|
|
46408
46466
|
return { relPath, fullPath, exists: await pathExists(fullPath) };
|
|
46409
46467
|
}));
|
|
46410
46468
|
const validPaths = [];
|
|
@@ -46427,7 +46485,7 @@ async function validatePluginPaths(relPaths, pluginPath, pluginName, source, com
|
|
|
46427
46485
|
}
|
|
46428
46486
|
async function createPluginFromPath(pluginPath, source, enabled, fallbackName, strict = true) {
|
|
46429
46487
|
const errors = [];
|
|
46430
|
-
const manifestPath =
|
|
46488
|
+
const manifestPath = join24(pluginPath, ".claude-plugin", "plugin.json");
|
|
46431
46489
|
const manifest = await loadPluginManifest(manifestPath, fallbackName, source);
|
|
46432
46490
|
const plugin = {
|
|
46433
46491
|
name: manifest.name,
|
|
@@ -46443,12 +46501,12 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46443
46501
|
skillsDirExists,
|
|
46444
46502
|
outputStylesDirExists
|
|
46445
46503
|
] = await Promise.all([
|
|
46446
|
-
!manifest.commands ? pathExists(
|
|
46447
|
-
!manifest.agents ? pathExists(
|
|
46448
|
-
!manifest.skills ? pathExists(
|
|
46449
|
-
!manifest.outputStyles ? pathExists(
|
|
46504
|
+
!manifest.commands ? pathExists(join24(pluginPath, "commands")) : false,
|
|
46505
|
+
!manifest.agents ? pathExists(join24(pluginPath, "agents")) : false,
|
|
46506
|
+
!manifest.skills ? pathExists(join24(pluginPath, "skills")) : false,
|
|
46507
|
+
!manifest.outputStyles ? pathExists(join24(pluginPath, "output-styles")) : false
|
|
46450
46508
|
]);
|
|
46451
|
-
const commandsPath =
|
|
46509
|
+
const commandsPath = join24(pluginPath, "commands");
|
|
46452
46510
|
if (commandsDirExists) {
|
|
46453
46511
|
plugin.commandsPath = commandsPath;
|
|
46454
46512
|
}
|
|
@@ -46463,7 +46521,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46463
46521
|
return { commandName, metadata, kind: "skip" };
|
|
46464
46522
|
}
|
|
46465
46523
|
if (metadata.source) {
|
|
46466
|
-
const fullPath =
|
|
46524
|
+
const fullPath = join24(pluginPath, metadata.source);
|
|
46467
46525
|
return {
|
|
46468
46526
|
commandName,
|
|
46469
46527
|
metadata,
|
|
@@ -46511,7 +46569,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46511
46569
|
if (typeof cmdPath !== "string") {
|
|
46512
46570
|
return { cmdPath, kind: "invalid" };
|
|
46513
46571
|
}
|
|
46514
|
-
const fullPath =
|
|
46572
|
+
const fullPath = join24(pluginPath, cmdPath);
|
|
46515
46573
|
return {
|
|
46516
46574
|
cmdPath,
|
|
46517
46575
|
kind: "path",
|
|
@@ -46544,7 +46602,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46544
46602
|
}
|
|
46545
46603
|
}
|
|
46546
46604
|
}
|
|
46547
|
-
const agentsPath =
|
|
46605
|
+
const agentsPath = join24(pluginPath, "agents");
|
|
46548
46606
|
if (agentsDirExists) {
|
|
46549
46607
|
plugin.agentsPath = agentsPath;
|
|
46550
46608
|
}
|
|
@@ -46555,7 +46613,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46555
46613
|
plugin.agentsPaths = validPaths;
|
|
46556
46614
|
}
|
|
46557
46615
|
}
|
|
46558
|
-
const skillsPath =
|
|
46616
|
+
const skillsPath = join24(pluginPath, "skills");
|
|
46559
46617
|
if (skillsDirExists) {
|
|
46560
46618
|
plugin.skillsPath = skillsPath;
|
|
46561
46619
|
}
|
|
@@ -46566,7 +46624,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46566
46624
|
plugin.skillsPaths = validPaths;
|
|
46567
46625
|
}
|
|
46568
46626
|
}
|
|
46569
|
-
const outputStylesPath =
|
|
46627
|
+
const outputStylesPath = join24(pluginPath, "output-styles");
|
|
46570
46628
|
if (outputStylesDirExists) {
|
|
46571
46629
|
plugin.outputStylesPath = outputStylesPath;
|
|
46572
46630
|
}
|
|
@@ -46579,7 +46637,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46579
46637
|
}
|
|
46580
46638
|
let mergedHooks;
|
|
46581
46639
|
const loadedHookPaths = new Set;
|
|
46582
|
-
const standardHooksPath =
|
|
46640
|
+
const standardHooksPath = join24(pluginPath, "hooks", "hooks.json");
|
|
46583
46641
|
if (await pathExists(standardHooksPath)) {
|
|
46584
46642
|
try {
|
|
46585
46643
|
mergedHooks = await loadPluginHooks2(standardHooksPath, manifest.name);
|
|
@@ -46608,7 +46666,7 @@ async function createPluginFromPath(pluginPath, source, enabled, fallbackName, s
|
|
|
46608
46666
|
const manifestHooksArray = Array.isArray(manifest.hooks) ? manifest.hooks : [manifest.hooks];
|
|
46609
46667
|
for (const hookSpec of manifestHooksArray) {
|
|
46610
46668
|
if (typeof hookSpec === "string") {
|
|
46611
|
-
const hookFilePath =
|
|
46669
|
+
const hookFilePath = join24(pluginPath, hookSpec);
|
|
46612
46670
|
if (!await pathExists(hookFilePath)) {
|
|
46613
46671
|
logForDebugging(`Hooks file ${hookSpec} specified in manifest but not found at ${hookFilePath} for ${manifest.name}`, { level: "error" });
|
|
46614
46672
|
logError(new Error(`Plugin component file not found: ${hookFilePath} for ${manifest.name}`));
|
|
@@ -46698,7 +46756,7 @@ function parsePluginSettings(raw) {
|
|
|
46698
46756
|
return data;
|
|
46699
46757
|
}
|
|
46700
46758
|
async function loadPluginSettings(pluginPath, manifest) {
|
|
46701
|
-
const settingsJsonPath =
|
|
46759
|
+
const settingsJsonPath = join24(pluginPath, "settings.json");
|
|
46702
46760
|
try {
|
|
46703
46761
|
const content = await readFile6(settingsJsonPath, { encoding: "utf-8" });
|
|
46704
46762
|
const parsed = jsonParse(content);
|
|
@@ -46841,7 +46899,7 @@ async function loadPluginFromMarketplaceEntryCacheOnly(entry, marketplaceInstall
|
|
|
46841
46899
|
if (typeof entry.source === "string") {
|
|
46842
46900
|
let marketplaceDir;
|
|
46843
46901
|
try {
|
|
46844
|
-
marketplaceDir = (await stat6(marketplaceInstallLocation)).isDirectory() ? marketplaceInstallLocation :
|
|
46902
|
+
marketplaceDir = (await stat6(marketplaceInstallLocation)).isDirectory() ? marketplaceInstallLocation : join24(marketplaceInstallLocation, "..");
|
|
46845
46903
|
} catch {
|
|
46846
46904
|
errorsOut.push({
|
|
46847
46905
|
type: "plugin-cache-miss",
|
|
@@ -46851,7 +46909,7 @@ async function loadPluginFromMarketplaceEntryCacheOnly(entry, marketplaceInstall
|
|
|
46851
46909
|
});
|
|
46852
46910
|
return null;
|
|
46853
46911
|
}
|
|
46854
|
-
pluginPath =
|
|
46912
|
+
pluginPath = join24(marketplaceDir, entry.source);
|
|
46855
46913
|
} else {
|
|
46856
46914
|
if (!installPath || !await pathExists(installPath)) {
|
|
46857
46915
|
errorsOut.push({
|
|
@@ -46866,7 +46924,7 @@ async function loadPluginFromMarketplaceEntryCacheOnly(entry, marketplaceInstall
|
|
|
46866
46924
|
}
|
|
46867
46925
|
if (isPluginZipCacheEnabled() && pluginPath.endsWith(".zip")) {
|
|
46868
46926
|
const sessionDir = await getSessionPluginCachePath();
|
|
46869
|
-
const extractDir =
|
|
46927
|
+
const extractDir = join24(sessionDir, pluginId.replace(/[^a-zA-Z0-9@\-_]/g, "-"));
|
|
46870
46928
|
try {
|
|
46871
46929
|
await extractZipToDirectory(pluginPath, extractDir);
|
|
46872
46930
|
pluginPath = extractDir;
|
|
@@ -46889,8 +46947,8 @@ async function loadPluginFromMarketplaceEntry(entry, marketplaceInstallLocation,
|
|
|
46889
46947
|
logForDebugging(`Loading plugin ${entry.name} from source: ${jsonStringify(entry.source)}`);
|
|
46890
46948
|
let pluginPath;
|
|
46891
46949
|
if (typeof entry.source === "string") {
|
|
46892
|
-
const marketplaceDir = (await stat6(marketplaceInstallLocation)).isDirectory() ? marketplaceInstallLocation :
|
|
46893
|
-
const sourcePluginPath =
|
|
46950
|
+
const marketplaceDir = (await stat6(marketplaceInstallLocation)).isDirectory() ? marketplaceInstallLocation : join24(marketplaceInstallLocation, "..");
|
|
46951
|
+
const sourcePluginPath = join24(marketplaceDir, entry.source);
|
|
46894
46952
|
if (!await pathExists(sourcePluginPath)) {
|
|
46895
46953
|
const error = new Error(`Plugin path not found: ${sourcePluginPath}`);
|
|
46896
46954
|
logForDebugging(`Plugin path not found: ${sourcePluginPath}`, {
|
|
@@ -46905,7 +46963,7 @@ async function loadPluginFromMarketplaceEntry(entry, marketplaceInstallLocation,
|
|
|
46905
46963
|
return null;
|
|
46906
46964
|
}
|
|
46907
46965
|
try {
|
|
46908
|
-
const manifestPath =
|
|
46966
|
+
const manifestPath = join24(sourcePluginPath, ".claude-plugin", "plugin.json");
|
|
46909
46967
|
let pluginManifest;
|
|
46910
46968
|
try {
|
|
46911
46969
|
pluginManifest = await loadPluginManifest(manifestPath, entry.name, entry.source);
|
|
@@ -46961,7 +47019,7 @@ async function loadPluginFromMarketplaceEntry(entry, marketplaceInstallLocation,
|
|
|
46961
47019
|
}
|
|
46962
47020
|
if (isPluginZipCacheEnabled() && pluginPath.endsWith(".zip")) {
|
|
46963
47021
|
const sessionDir = await getSessionPluginCachePath();
|
|
46964
|
-
const extractDir =
|
|
47022
|
+
const extractDir = join24(sessionDir, pluginId.replace(/[^a-zA-Z0-9@\-_]/g, "-"));
|
|
46965
47023
|
try {
|
|
46966
47024
|
await extractZipToDirectory(pluginPath, extractDir);
|
|
46967
47025
|
logForDebugging(`Extracted plugin ZIP to session dir: ${extractDir}`);
|
|
@@ -46976,7 +47034,7 @@ async function loadPluginFromMarketplaceEntry(entry, marketplaceInstallLocation,
|
|
|
46976
47034
|
}
|
|
46977
47035
|
async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut, pluginPath) {
|
|
46978
47036
|
const errors = [];
|
|
46979
|
-
const manifestPath =
|
|
47037
|
+
const manifestPath = join24(pluginPath, ".claude-plugin", "plugin.json");
|
|
46980
47038
|
const hasManifest = await pathExists(manifestPath);
|
|
46981
47039
|
const { plugin, errors: pluginErrors } = await createPluginFromPath(pluginPath, pluginId, enabled, entry.name, entry.strict ?? true);
|
|
46982
47040
|
errors.push(...pluginErrors);
|
|
@@ -47001,7 +47059,7 @@ async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut,
|
|
|
47001
47059
|
if (!metadata || typeof metadata !== "object" || !metadata.source) {
|
|
47002
47060
|
return { commandName, metadata, skip: true };
|
|
47003
47061
|
}
|
|
47004
|
-
const fullPath =
|
|
47062
|
+
const fullPath = join24(pluginPath, metadata.source);
|
|
47005
47063
|
return {
|
|
47006
47064
|
commandName,
|
|
47007
47065
|
metadata,
|
|
@@ -47038,7 +47096,7 @@ async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut,
|
|
|
47038
47096
|
if (typeof cmdPath !== "string") {
|
|
47039
47097
|
return { cmdPath, kind: "invalid" };
|
|
47040
47098
|
}
|
|
47041
|
-
const fullPath =
|
|
47099
|
+
const fullPath = join24(pluginPath, cmdPath);
|
|
47042
47100
|
return {
|
|
47043
47101
|
cmdPath,
|
|
47044
47102
|
kind: "path",
|
|
@@ -47082,7 +47140,7 @@ async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut,
|
|
|
47082
47140
|
logForDebugging(`Processing ${Array.isArray(entry.skills) ? entry.skills.length : 1} skill paths for plugin ${entry.name}`);
|
|
47083
47141
|
const skillPaths = Array.isArray(entry.skills) ? entry.skills : [entry.skills];
|
|
47084
47142
|
const checks2 = await Promise.all(skillPaths.map(async (skillPath) => {
|
|
47085
|
-
const fullPath =
|
|
47143
|
+
const fullPath = join24(pluginPath, skillPath);
|
|
47086
47144
|
return { skillPath, fullPath, exists: await pathExists(fullPath) };
|
|
47087
47145
|
}));
|
|
47088
47146
|
const validPaths = [];
|
|
@@ -47142,7 +47200,7 @@ async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut,
|
|
|
47142
47200
|
if (!metadata || typeof metadata !== "object" || !metadata.source) {
|
|
47143
47201
|
return { commandName, metadata, skip: true };
|
|
47144
47202
|
}
|
|
47145
|
-
const fullPath =
|
|
47203
|
+
const fullPath = join24(pluginPath, metadata.source);
|
|
47146
47204
|
return {
|
|
47147
47205
|
commandName,
|
|
47148
47206
|
metadata,
|
|
@@ -47182,7 +47240,7 @@ async function finishLoadingPluginFromPath(entry, pluginId, enabled, errorsOut,
|
|
|
47182
47240
|
if (typeof cmdPath !== "string") {
|
|
47183
47241
|
return { cmdPath, kind: "invalid" };
|
|
47184
47242
|
}
|
|
47185
|
-
const fullPath =
|
|
47243
|
+
const fullPath = join24(pluginPath, cmdPath);
|
|
47186
47244
|
return {
|
|
47187
47245
|
cmdPath,
|
|
47188
47246
|
kind: "path",
|
|
@@ -48746,7 +48804,7 @@ var init_promptCategory = __esm(() => {
|
|
|
48746
48804
|
// src/services/api/dumpPrompts.ts
|
|
48747
48805
|
import { createHash as createHash4 } from "crypto";
|
|
48748
48806
|
import { promises as fs6 } from "fs";
|
|
48749
|
-
import { dirname as dirname16, join as
|
|
48807
|
+
import { dirname as dirname16, join as join25 } from "path";
|
|
48750
48808
|
function hashString3(str2) {
|
|
48751
48809
|
return createHash4("sha256").update(str2).digest("hex");
|
|
48752
48810
|
}
|
|
@@ -48768,7 +48826,7 @@ function addApiRequestToCache(requestData) {
|
|
|
48768
48826
|
}
|
|
48769
48827
|
}
|
|
48770
48828
|
function getDumpPromptsPath(agentIdOrSessionId) {
|
|
48771
|
-
return
|
|
48829
|
+
return join25(getClaudeConfigHomeDir(), "dump-prompts", `${agentIdOrSessionId ?? getSessionId()}.jsonl`);
|
|
48772
48830
|
}
|
|
48773
48831
|
function appendToFile(filePath, entries) {
|
|
48774
48832
|
if (entries.length === 0)
|
|
@@ -48909,7 +48967,7 @@ function expandEnvVarsInString(value) {
|
|
|
48909
48967
|
var init_envExpansion = () => {};
|
|
48910
48968
|
|
|
48911
48969
|
// src/utils/plugins/mcpPluginIntegration.ts
|
|
48912
|
-
import { join as
|
|
48970
|
+
import { join as join26 } from "path";
|
|
48913
48971
|
async function loadMcpServersFromMcpb(plugin, mcpbPath, errors) {
|
|
48914
48972
|
try {
|
|
48915
48973
|
logForDebugging(`Loading MCP servers from MCPB: ${mcpbPath}`);
|
|
@@ -49008,7 +49066,7 @@ async function loadPluginMcpServers(plugin, errors = []) {
|
|
|
49008
49066
|
}
|
|
49009
49067
|
async function loadMcpServersFromFile(pluginPath, relativePath) {
|
|
49010
49068
|
const fs7 = getFsImplementation();
|
|
49011
|
-
const filePath =
|
|
49069
|
+
const filePath = join26(pluginPath, relativePath);
|
|
49012
49070
|
let content;
|
|
49013
49071
|
try {
|
|
49014
49072
|
content = await fs7.readFile(filePath, { encoding: "utf-8" });
|
|
@@ -49325,7 +49383,7 @@ var init_claudeai = __esm(() => {
|
|
|
49325
49383
|
|
|
49326
49384
|
// src/services/mcp/utils.ts
|
|
49327
49385
|
import { createHash as createHash5 } from "crypto";
|
|
49328
|
-
import { join as
|
|
49386
|
+
import { join as join27 } from "path";
|
|
49329
49387
|
function filterToolsByServer(tools, serverName) {
|
|
49330
49388
|
const prefix = `mcp__${normalizeNameForMCP(serverName)}__`;
|
|
49331
49389
|
return tools.filter((tool) => tool.name?.startsWith(prefix));
|
|
@@ -49403,7 +49461,7 @@ function describeMcpConfigFilePath(scope) {
|
|
|
49403
49461
|
case "user":
|
|
49404
49462
|
return getGlobalClaudeFile();
|
|
49405
49463
|
case "project":
|
|
49406
|
-
return
|
|
49464
|
+
return join27(getCwd(), ".mcp.json");
|
|
49407
49465
|
case "local":
|
|
49408
49466
|
return `${getGlobalClaudeFile()} [project: ${getCwd()}]`;
|
|
49409
49467
|
case "dynamic":
|
|
@@ -49599,9 +49657,9 @@ var init_utils2 = __esm(() => {
|
|
|
49599
49657
|
|
|
49600
49658
|
// src/services/mcp/config.ts
|
|
49601
49659
|
import { chmod as chmod4, open, rename as rename5, stat as stat7, unlink as unlink2 } from "fs/promises";
|
|
49602
|
-
import { dirname as dirname17, join as
|
|
49660
|
+
import { dirname as dirname17, join as join28, parse as parse4 } from "path";
|
|
49603
49661
|
function getEnterpriseMcpFilePath() {
|
|
49604
|
-
return
|
|
49662
|
+
return join28(getManagedFilePath(), "managed-mcp.json");
|
|
49605
49663
|
}
|
|
49606
49664
|
function addScopeToServers(servers, scope) {
|
|
49607
49665
|
if (!servers) {
|
|
@@ -49614,7 +49672,7 @@ function addScopeToServers(servers, scope) {
|
|
|
49614
49672
|
return scopedServers;
|
|
49615
49673
|
}
|
|
49616
49674
|
async function writeMcpjsonFile(config2) {
|
|
49617
|
-
const mcpJsonPath =
|
|
49675
|
+
const mcpJsonPath = join28(getCwd(), ".mcp.json");
|
|
49618
49676
|
let existingMode;
|
|
49619
49677
|
try {
|
|
49620
49678
|
const stats = await stat7(mcpJsonPath);
|
|
@@ -50065,7 +50123,7 @@ function getProjectMcpConfigsFromCwd() {
|
|
|
50065
50123
|
if (!isSettingSourceEnabled("projectSettings")) {
|
|
50066
50124
|
return { servers: {}, errors: [] };
|
|
50067
50125
|
}
|
|
50068
|
-
const mcpJsonPath =
|
|
50126
|
+
const mcpJsonPath = join28(getCwd(), ".mcp.json");
|
|
50069
50127
|
const { config: config2, errors } = parseMcpConfigFromFilePath({
|
|
50070
50128
|
filePath: mcpJsonPath,
|
|
50071
50129
|
expandVars: true,
|
|
@@ -50104,7 +50162,7 @@ function getMcpConfigsByScope(scope) {
|
|
|
50104
50162
|
currentDir = dirname17(currentDir);
|
|
50105
50163
|
}
|
|
50106
50164
|
for (const dir of dirs.reverse()) {
|
|
50107
|
-
const mcpJsonPath =
|
|
50165
|
+
const mcpJsonPath = join28(dir, ".mcp.json");
|
|
50108
50166
|
const { config: config2, errors } = parseMcpConfigFromFilePath({
|
|
50109
50167
|
filePath: mcpJsonPath,
|
|
50110
50168
|
expandVars: true,
|
|
@@ -51857,7 +51915,7 @@ async function* runAgent({
|
|
|
51857
51915
|
}
|
|
51858
51916
|
validSkills.push({ skillName, skill });
|
|
51859
51917
|
}
|
|
51860
|
-
const { formatSkillLoadingMetadata } = await import("./chunk-
|
|
51918
|
+
const { formatSkillLoadingMetadata } = await import("./chunk-7k54kmcj.js");
|
|
51861
51919
|
const loaded = await Promise.all(validSkills.map(async ({ skillName, skill }) => ({
|
|
51862
51920
|
skillName,
|
|
51863
51921
|
skill,
|
|
@@ -52748,7 +52806,7 @@ async function gracefulShutdown(exitCode = 0, reason = "other", options) {
|
|
|
52748
52806
|
return;
|
|
52749
52807
|
}
|
|
52750
52808
|
shutdownInProgress = true;
|
|
52751
|
-
const { executeSessionEndHooks, getSessionEndHookTimeoutMs } = await import("./chunk-
|
|
52809
|
+
const { executeSessionEndHooks, getSessionEndHookTimeoutMs } = await import("./chunk-sa1e4ck2.js");
|
|
52752
52810
|
const sessionEndTimeoutMs = getSessionEndHookTimeoutMs();
|
|
52753
52811
|
failsafeTimer = setTimeout((code) => {
|
|
52754
52812
|
cleanupTerminalModes();
|
|
@@ -53898,12 +53956,12 @@ var init_oauth2 = __esm(() => {
|
|
|
53898
53956
|
|
|
53899
53957
|
// src/utils/localInstaller.ts
|
|
53900
53958
|
import { access, chmod as chmod5, writeFile as writeFile8 } from "fs/promises";
|
|
53901
|
-
import { join as
|
|
53959
|
+
import { join as join29 } from "path";
|
|
53902
53960
|
function getLocalInstallDir() {
|
|
53903
|
-
return
|
|
53961
|
+
return join29(getClaudeConfigHomeDir(), "local");
|
|
53904
53962
|
}
|
|
53905
53963
|
function getLocalClaudePath() {
|
|
53906
|
-
return
|
|
53964
|
+
return join29(getLocalInstallDir(), "claude");
|
|
53907
53965
|
}
|
|
53908
53966
|
function isRunningFromLocalInstallation() {
|
|
53909
53967
|
const execPath = process.argv[1] || "";
|
|
@@ -53923,8 +53981,8 @@ async function ensureLocalPackageEnvironment() {
|
|
|
53923
53981
|
try {
|
|
53924
53982
|
const localInstallDir = getLocalInstallDir();
|
|
53925
53983
|
await getFsImplementation().mkdir(localInstallDir);
|
|
53926
|
-
await writeIfMissing(
|
|
53927
|
-
const wrapperPath =
|
|
53984
|
+
await writeIfMissing(join29(localInstallDir, "package.json"), jsonStringify({ name: "claude-local", version: "0.0.1", private: true }, null, 2));
|
|
53985
|
+
const wrapperPath = join29(localInstallDir, "claude");
|
|
53928
53986
|
const created = await writeIfMissing(wrapperPath, `#!/bin/sh
|
|
53929
53987
|
exec "${localInstallDir}/node_modules/.bin/claude" "$@"`, 493);
|
|
53930
53988
|
if (created) {
|
|
@@ -53960,7 +54018,7 @@ async function installOrUpdateClaudePackage(channel, specificVersion) {
|
|
|
53960
54018
|
}
|
|
53961
54019
|
async function localInstallationExists() {
|
|
53962
54020
|
try {
|
|
53963
|
-
await access(
|
|
54021
|
+
await access(join29(getLocalInstallDir(), "node_modules", ".bin", "claude"));
|
|
53964
54022
|
return true;
|
|
53965
54023
|
} catch {
|
|
53966
54024
|
return false;
|
|
@@ -53989,15 +54047,15 @@ var init_localInstaller = __esm(() => {
|
|
|
53989
54047
|
// src/utils/shellConfig.ts
|
|
53990
54048
|
import { open as open3, readFile as readFile7, stat as stat8 } from "fs/promises";
|
|
53991
54049
|
import { homedir as osHomedir } from "os";
|
|
53992
|
-
import { join as
|
|
54050
|
+
import { join as join30 } from "path";
|
|
53993
54051
|
function getShellConfigPaths(options) {
|
|
53994
54052
|
const home = options?.homedir ?? osHomedir();
|
|
53995
54053
|
const env2 = options?.env ?? process.env;
|
|
53996
54054
|
const zshConfigDir = env2.ZDOTDIR || home;
|
|
53997
54055
|
return {
|
|
53998
|
-
zsh:
|
|
53999
|
-
bash:
|
|
54000
|
-
fish:
|
|
54056
|
+
zsh: join30(zshConfigDir, ".zshrc"),
|
|
54057
|
+
bash: join30(home, ".bashrc"),
|
|
54058
|
+
fish: join30(home, ".config/fish/config.fish")
|
|
54001
54059
|
};
|
|
54002
54060
|
}
|
|
54003
54061
|
function filterClaudeAliases(lines) {
|
|
@@ -54082,8 +54140,8 @@ var init_shellConfig = __esm(() => {
|
|
|
54082
54140
|
// src/utils/autoUpdater.ts
|
|
54083
54141
|
import { constants as fsConstants } from "fs";
|
|
54084
54142
|
import { access as access2, writeFile as writeFile9 } from "fs/promises";
|
|
54085
|
-
import { homedir as
|
|
54086
|
-
import { join as
|
|
54143
|
+
import { homedir as homedir8 } from "os";
|
|
54144
|
+
import { join as join31 } from "path";
|
|
54087
54145
|
async function assertMinVersion() {
|
|
54088
54146
|
if (false) {}
|
|
54089
54147
|
try {
|
|
@@ -54139,7 +54197,7 @@ function shouldSkipVersion(targetVersion) {
|
|
|
54139
54197
|
return shouldSkip;
|
|
54140
54198
|
}
|
|
54141
54199
|
function getLockFilePath() {
|
|
54142
|
-
return
|
|
54200
|
+
return join31(getClaudeConfigHomeDir(), ".update.lock");
|
|
54143
54201
|
}
|
|
54144
54202
|
async function acquireLock() {
|
|
54145
54203
|
const fs7 = getFsImplementation();
|
|
@@ -54219,10 +54277,10 @@ async function getInstallationPrefix() {
|
|
|
54219
54277
|
let prefixResult = null;
|
|
54220
54278
|
if (isBun) {
|
|
54221
54279
|
prefixResult = await execFileNoThrowWithCwd("bun", ["pm", "bin", "-g"], {
|
|
54222
|
-
cwd:
|
|
54280
|
+
cwd: homedir8()
|
|
54223
54281
|
});
|
|
54224
54282
|
} else {
|
|
54225
|
-
prefixResult = await execFileNoThrowWithCwd("npm", ["-g", "config", "get", "prefix"], { cwd:
|
|
54283
|
+
prefixResult = await execFileNoThrowWithCwd("npm", ["-g", "config", "get", "prefix"], { cwd: homedir8() });
|
|
54226
54284
|
}
|
|
54227
54285
|
if (prefixResult.code !== 0) {
|
|
54228
54286
|
logError(new Error(`Failed to check ${isBun ? "bun" : "npm"} permissions`));
|
|
@@ -54250,7 +54308,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
54250
54308
|
}
|
|
54251
54309
|
async function getLatestVersion(channel) {
|
|
54252
54310
|
const npmTag = channel === "stable" ? "stable" : "latest";
|
|
54253
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${MACRO.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd:
|
|
54311
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${MACRO.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir8() });
|
|
54254
54312
|
if (result.code !== 0) {
|
|
54255
54313
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
54256
54314
|
if (result.stderr) {
|
|
@@ -54266,7 +54324,7 @@ async function getLatestVersion(channel) {
|
|
|
54266
54324
|
return result.stdout.trim();
|
|
54267
54325
|
}
|
|
54268
54326
|
async function getNpmDistTags() {
|
|
54269
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", MACRO.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd:
|
|
54327
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", MACRO.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir8() });
|
|
54270
54328
|
if (result.code !== 0) {
|
|
54271
54329
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
54272
54330
|
return { latest: null, stable: null };
|
|
@@ -54336,7 +54394,7 @@ To fix this issue:
|
|
|
54336
54394
|
}
|
|
54337
54395
|
const packageSpec = specificVersion ? `${MACRO.PACKAGE_URL}@${specificVersion}` : MACRO.PACKAGE_URL;
|
|
54338
54396
|
const packageManager = env.isRunningWithBun() ? "bun" : "npm";
|
|
54339
|
-
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd:
|
|
54397
|
+
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir8() });
|
|
54340
54398
|
if (installResult.code !== 0) {
|
|
54341
54399
|
const error = new AutoUpdaterError(`Failed to install new version of claude: ${installResult.stdout} ${installResult.stderr}`);
|
|
54342
54400
|
logError(error);
|
|
@@ -54574,7 +54632,7 @@ var init_packageManagers = __esm(() => {
|
|
|
54574
54632
|
|
|
54575
54633
|
// src/utils/ripgrep.ts
|
|
54576
54634
|
import { execFile, spawn as spawn5 } from "child_process";
|
|
54577
|
-
import { homedir as
|
|
54635
|
+
import { homedir as homedir9 } from "os";
|
|
54578
54636
|
import * as path4 from "path";
|
|
54579
54637
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
54580
54638
|
function ripgrepCommand() {
|
|
@@ -54846,7 +54904,7 @@ var init_ripgrep2 = __esm(() => {
|
|
|
54846
54904
|
}
|
|
54847
54905
|
};
|
|
54848
54906
|
countFilesRoundedRg = memoize_default(async (dirPath, abortSignal, ignorePatterns = []) => {
|
|
54849
|
-
if (path4.resolve(dirPath) === path4.resolve(
|
|
54907
|
+
if (path4.resolve(dirPath) === path4.resolve(homedir9())) {
|
|
54850
54908
|
return;
|
|
54851
54909
|
}
|
|
54852
54910
|
try {
|
|
@@ -54915,8 +54973,8 @@ var init_ripgrep2 = __esm(() => {
|
|
|
54915
54973
|
|
|
54916
54974
|
// src/utils/doctorDiagnostic.ts
|
|
54917
54975
|
import { readFile as readFile9, realpath as realpath2 } from "fs/promises";
|
|
54918
|
-
import { homedir as
|
|
54919
|
-
import { delimiter as delimiter2, join as
|
|
54976
|
+
import { homedir as homedir10 } from "os";
|
|
54977
|
+
import { delimiter as delimiter2, join as join33, posix, win32 } from "path";
|
|
54920
54978
|
function getNormalizedPaths() {
|
|
54921
54979
|
let invokedPath = process.argv[1] || "";
|
|
54922
54980
|
let execPath = process.execPath || process.argv[0] || "";
|
|
@@ -54979,8 +55037,8 @@ async function getInstallationPath() {
|
|
|
54979
55037
|
}
|
|
54980
55038
|
} catch {}
|
|
54981
55039
|
try {
|
|
54982
|
-
await getFsImplementation().stat(
|
|
54983
|
-
return
|
|
55040
|
+
await getFsImplementation().stat(join33(homedir10(), ".local/bin/claude"));
|
|
55041
|
+
return join33(homedir10(), ".local/bin/claude");
|
|
54984
55042
|
} catch {}
|
|
54985
55043
|
return "native";
|
|
54986
55044
|
}
|
|
@@ -55003,7 +55061,7 @@ function getInvokedBinary() {
|
|
|
55003
55061
|
async function detectMultipleInstallations() {
|
|
55004
55062
|
const fs7 = getFsImplementation();
|
|
55005
55063
|
const installations = [];
|
|
55006
|
-
const localPath =
|
|
55064
|
+
const localPath = join33(homedir10(), ".claude", "local");
|
|
55007
55065
|
if (await localInstallationExists()) {
|
|
55008
55066
|
installations.push({ type: "npm-local", path: localPath });
|
|
55009
55067
|
}
|
|
@@ -55020,7 +55078,7 @@ async function detectMultipleInstallations() {
|
|
|
55020
55078
|
if (npmResult.code === 0 && npmResult.stdout) {
|
|
55021
55079
|
const npmPrefix = npmResult.stdout.trim();
|
|
55022
55080
|
const isWindows = getPlatform() === "windows";
|
|
55023
|
-
const globalBinPath = isWindows ?
|
|
55081
|
+
const globalBinPath = isWindows ? join33(npmPrefix, "claude") : join33(npmPrefix, "bin", "claude");
|
|
55024
55082
|
let globalBinExists = false;
|
|
55025
55083
|
try {
|
|
55026
55084
|
await fs7.stat(globalBinPath);
|
|
@@ -55039,7 +55097,7 @@ async function detectMultipleInstallations() {
|
|
|
55039
55097
|
}
|
|
55040
55098
|
} else {
|
|
55041
55099
|
for (const packageName of packagesToCheck) {
|
|
55042
|
-
const globalPackagePath = isWindows ?
|
|
55100
|
+
const globalPackagePath = isWindows ? join33(npmPrefix, "node_modules", packageName) : join33(npmPrefix, "lib", "node_modules", packageName);
|
|
55043
55101
|
try {
|
|
55044
55102
|
await fs7.stat(globalPackagePath);
|
|
55045
55103
|
installations.push({
|
|
@@ -55050,14 +55108,14 @@ async function detectMultipleInstallations() {
|
|
|
55050
55108
|
}
|
|
55051
55109
|
}
|
|
55052
55110
|
}
|
|
55053
|
-
const nativeBinPath =
|
|
55111
|
+
const nativeBinPath = join33(homedir10(), ".local", "bin", "claude");
|
|
55054
55112
|
try {
|
|
55055
55113
|
await fs7.stat(nativeBinPath);
|
|
55056
55114
|
installations.push({ type: "native", path: nativeBinPath });
|
|
55057
55115
|
} catch {}
|
|
55058
55116
|
const config2 = getGlobalConfig();
|
|
55059
55117
|
if (config2.installMethod === "native") {
|
|
55060
|
-
const nativeDataPath =
|
|
55118
|
+
const nativeDataPath = join33(homedir10(), ".local", "share", "claude");
|
|
55061
55119
|
try {
|
|
55062
55120
|
await fs7.stat(nativeDataPath);
|
|
55063
55121
|
if (!installations.some((i) => i.type === "native")) {
|
|
@@ -55070,7 +55128,7 @@ async function detectMultipleInstallations() {
|
|
|
55070
55128
|
async function detectConfigurationIssues(type) {
|
|
55071
55129
|
const warnings = [];
|
|
55072
55130
|
try {
|
|
55073
|
-
const raw = await readFile9(
|
|
55131
|
+
const raw = await readFile9(join33(getManagedFilePath(), "managed-settings.json"), "utf-8");
|
|
55074
55132
|
const parsed = jsonParse(raw);
|
|
55075
55133
|
const field = parsed && typeof parsed === "object" ? parsed.strictPluginOnlyCustomization : undefined;
|
|
55076
55134
|
if (field !== undefined && typeof field !== "boolean") {
|
|
@@ -55097,8 +55155,8 @@ async function detectConfigurationIssues(type) {
|
|
|
55097
55155
|
if (type === "native") {
|
|
55098
55156
|
const path5 = process.env.PATH || "";
|
|
55099
55157
|
const pathDirectories = path5.split(delimiter2);
|
|
55100
|
-
const homeDir =
|
|
55101
|
-
const localBinPath =
|
|
55158
|
+
const homeDir = homedir10();
|
|
55159
|
+
const localBinPath = join33(homeDir, ".local", "bin");
|
|
55102
55160
|
let normalizedLocalBinPath = localBinPath;
|
|
55103
55161
|
if (getPlatform() === "windows") {
|
|
55104
55162
|
normalizedLocalBinPath = localBinPath.split(win32.sep).join(posix.sep);
|
|
@@ -55124,7 +55182,7 @@ async function detectConfigurationIssues(type) {
|
|
|
55124
55182
|
const shellType = getShellType();
|
|
55125
55183
|
const configPaths = getShellConfigPaths();
|
|
55126
55184
|
const configFile = configPaths[shellType];
|
|
55127
|
-
const displayPath = configFile ? configFile.replace(
|
|
55185
|
+
const displayPath = configFile ? configFile.replace(homedir10(), "~") : "your shell config file";
|
|
55128
55186
|
warnings.push({
|
|
55129
55187
|
issue: "Native installation exists but ~/.local/bin is not in your PATH",
|
|
55130
55188
|
fix: `Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ${displayPath} then open a new terminal or run: source ${displayPath}`
|
|
@@ -55285,7 +55343,7 @@ var init_doctorDiagnostic = __esm(() => {
|
|
|
55285
55343
|
|
|
55286
55344
|
// src/utils/xdg.ts
|
|
55287
55345
|
import { homedir as osHomedir2 } from "os";
|
|
55288
|
-
import { join as
|
|
55346
|
+
import { join as join34 } from "path";
|
|
55289
55347
|
function resolveOptions(options) {
|
|
55290
55348
|
return {
|
|
55291
55349
|
env: options?.env ?? process.env,
|
|
@@ -55294,26 +55352,26 @@ function resolveOptions(options) {
|
|
|
55294
55352
|
}
|
|
55295
55353
|
function getXDGStateHome(options) {
|
|
55296
55354
|
const { env: env2, home } = resolveOptions(options);
|
|
55297
|
-
return env2.XDG_STATE_HOME ??
|
|
55355
|
+
return env2.XDG_STATE_HOME ?? join34(home, ".local", "state");
|
|
55298
55356
|
}
|
|
55299
55357
|
function getXDGCacheHome(options) {
|
|
55300
55358
|
const { env: env2, home } = resolveOptions(options);
|
|
55301
|
-
return env2.XDG_CACHE_HOME ??
|
|
55359
|
+
return env2.XDG_CACHE_HOME ?? join34(home, ".cache");
|
|
55302
55360
|
}
|
|
55303
55361
|
function getXDGDataHome(options) {
|
|
55304
55362
|
const { env: env2, home } = resolveOptions(options);
|
|
55305
|
-
return env2.XDG_DATA_HOME ??
|
|
55363
|
+
return env2.XDG_DATA_HOME ?? join34(home, ".local", "share");
|
|
55306
55364
|
}
|
|
55307
55365
|
function getUserBinDir(options) {
|
|
55308
55366
|
const { home } = resolveOptions(options);
|
|
55309
|
-
return
|
|
55367
|
+
return join34(home, ".local", "bin");
|
|
55310
55368
|
}
|
|
55311
55369
|
var init_xdg = () => {};
|
|
55312
55370
|
|
|
55313
55371
|
// src/utils/nativeInstaller/download.ts
|
|
55314
55372
|
import { createHash as createHash9 } from "crypto";
|
|
55315
55373
|
import { chmod as chmod6, writeFile as writeFile10 } from "fs/promises";
|
|
55316
|
-
import { join as
|
|
55374
|
+
import { join as join35 } from "path";
|
|
55317
55375
|
async function getLatestVersionFromArtifactory(tag = "latest") {
|
|
55318
55376
|
const startTime = Date.now();
|
|
55319
55377
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
@@ -55455,8 +55513,8 @@ async function downloadVersionFromArtifactory(version, stagingPath) {
|
|
|
55455
55513
|
}
|
|
55456
55514
|
}
|
|
55457
55515
|
};
|
|
55458
|
-
writeFileSync_DEPRECATED(
|
|
55459
|
-
writeFileSync_DEPRECATED(
|
|
55516
|
+
writeFileSync_DEPRECATED(join35(stagingPath, "package.json"), jsonStringify(packageJson, null, 2), { encoding: "utf8", flush: true });
|
|
55517
|
+
writeFileSync_DEPRECATED(join35(stagingPath, "package-lock.json"), jsonStringify(packageLock, null, 2), { encoding: "utf8", flush: true });
|
|
55460
55518
|
const result = await execFileNoThrowWithCwd("npm", ["ci", "--prefer-online", "--registry", ARTIFACTORY_REGISTRY_URL], {
|
|
55461
55519
|
timeout: 60000,
|
|
55462
55520
|
preserveOutputOnError: true,
|
|
@@ -55562,7 +55620,7 @@ async function downloadVersionFromBinaryRepo(version, stagingPath, baseUrl, auth
|
|
|
55562
55620
|
const binaryName = getBinaryName(platform2);
|
|
55563
55621
|
const binaryUrl = `${baseUrl}/${version}/${platform2}/${binaryName}`;
|
|
55564
55622
|
await fs7.mkdir(stagingPath);
|
|
55565
|
-
const binaryPath =
|
|
55623
|
+
const binaryPath = join35(stagingPath, binaryName);
|
|
55566
55624
|
try {
|
|
55567
55625
|
await downloadAndVerifyBinary(binaryUrl, expectedChecksum, binaryPath, authConfig || {});
|
|
55568
55626
|
const latencyMs = Date.now() - startTime;
|
|
@@ -55616,7 +55674,7 @@ var init_download = __esm(() => {
|
|
|
55616
55674
|
});
|
|
55617
55675
|
|
|
55618
55676
|
// src/utils/nativeInstaller/pidLock.ts
|
|
55619
|
-
import { basename as basename11, join as
|
|
55677
|
+
import { basename as basename11, join as join36 } from "path";
|
|
55620
55678
|
function isPidBasedLockingEnabled() {
|
|
55621
55679
|
const envVar = process.env.ENABLE_PID_BASED_VERSION_LOCKING;
|
|
55622
55680
|
if (isEnvTruthy(envVar)) {
|
|
@@ -55784,7 +55842,7 @@ function getAllLockInfo(locksDir) {
|
|
|
55784
55842
|
try {
|
|
55785
55843
|
const lockFiles = fs7.readdirStringSync(locksDir).filter((f) => f.endsWith(".lock"));
|
|
55786
55844
|
for (const lockFile of lockFiles) {
|
|
55787
|
-
const lockFilePath =
|
|
55845
|
+
const lockFilePath = join36(locksDir, lockFile);
|
|
55788
55846
|
const content = readLockContent(lockFilePath);
|
|
55789
55847
|
if (content) {
|
|
55790
55848
|
lockInfos.push({
|
|
@@ -55811,7 +55869,7 @@ function cleanupStaleLocks(locksDir) {
|
|
|
55811
55869
|
try {
|
|
55812
55870
|
const lockEntries = fs7.readdirStringSync(locksDir).filter((f) => f.endsWith(".lock"));
|
|
55813
55871
|
for (const lockEntry of lockEntries) {
|
|
55814
|
-
const lockFilePath =
|
|
55872
|
+
const lockFilePath = join36(locksDir, lockEntry);
|
|
55815
55873
|
try {
|
|
55816
55874
|
const stats = fs7.lstatSync(lockFilePath);
|
|
55817
55875
|
if (stats.isDirectory()) {
|
|
@@ -55865,8 +55923,8 @@ import {
|
|
|
55865
55923
|
unlink as unlink4,
|
|
55866
55924
|
writeFile as writeFile11
|
|
55867
55925
|
} from "fs/promises";
|
|
55868
|
-
import { homedir as
|
|
55869
|
-
import { basename as basename12, delimiter as delimiter3, dirname as dirname18, join as
|
|
55926
|
+
import { homedir as homedir11 } from "os";
|
|
55927
|
+
import { basename as basename12, delimiter as delimiter3, dirname as dirname18, join as join37, resolve as resolve12 } from "path";
|
|
55870
55928
|
function getPlatform3() {
|
|
55871
55929
|
const os2 = env.platform;
|
|
55872
55930
|
const arch = process.arch === "x64" ? "x64" : process.arch === "arm64" ? "arm64" : null;
|
|
@@ -55887,10 +55945,10 @@ function getBaseDirectories() {
|
|
|
55887
55945
|
const platform2 = getPlatform3();
|
|
55888
55946
|
const executableName = getBinaryName(platform2);
|
|
55889
55947
|
return {
|
|
55890
|
-
versions:
|
|
55891
|
-
staging:
|
|
55892
|
-
locks:
|
|
55893
|
-
executable:
|
|
55948
|
+
versions: join37(getXDGDataHome(), "claude", "versions"),
|
|
55949
|
+
staging: join37(getXDGCacheHome(), "claude", "staging"),
|
|
55950
|
+
locks: join37(getXDGStateHome(), "claude", "locks"),
|
|
55951
|
+
executable: join37(getUserBinDir(), executableName)
|
|
55894
55952
|
};
|
|
55895
55953
|
}
|
|
55896
55954
|
async function isPossibleClaudeBinary(filePath) {
|
|
@@ -55911,14 +55969,14 @@ async function getVersionPaths(version) {
|
|
|
55911
55969
|
await Promise.all(dirsToCreate.map((dir) => mkdir4(dir, { recursive: true })));
|
|
55912
55970
|
const executableParentDir = dirname18(dirs.executable);
|
|
55913
55971
|
await mkdir4(executableParentDir, { recursive: true });
|
|
55914
|
-
const installPath =
|
|
55972
|
+
const installPath = join37(dirs.versions, version);
|
|
55915
55973
|
try {
|
|
55916
55974
|
await stat9(installPath);
|
|
55917
55975
|
} catch {
|
|
55918
55976
|
await writeFile11(installPath, "", { encoding: "utf8" });
|
|
55919
55977
|
}
|
|
55920
55978
|
return {
|
|
55921
|
-
stagingPath:
|
|
55979
|
+
stagingPath: join37(dirs.staging, version),
|
|
55922
55980
|
installPath
|
|
55923
55981
|
};
|
|
55924
55982
|
}
|
|
@@ -56019,7 +56077,7 @@ async function atomicMoveToInstallPath(stagedBinaryPath, installPath) {
|
|
|
56019
56077
|
}
|
|
56020
56078
|
async function installVersionFromPackage(stagingPath, installPath) {
|
|
56021
56079
|
try {
|
|
56022
|
-
const nodeModulesDir =
|
|
56080
|
+
const nodeModulesDir = join37(stagingPath, "node_modules", "@anthropic-ai");
|
|
56023
56081
|
const entries = await readdir6(nodeModulesDir);
|
|
56024
56082
|
const nativePackage = entries.find((entry) => entry.startsWith("claude-cli-native-"));
|
|
56025
56083
|
if (!nativePackage) {
|
|
@@ -56030,7 +56088,7 @@ async function installVersionFromPackage(stagingPath, installPath) {
|
|
|
56030
56088
|
const error = new Error("Could not find platform-specific native package");
|
|
56031
56089
|
throw error;
|
|
56032
56090
|
}
|
|
56033
|
-
const stagedBinaryPath =
|
|
56091
|
+
const stagedBinaryPath = join37(nodeModulesDir, nativePackage, "cli");
|
|
56034
56092
|
try {
|
|
56035
56093
|
await stat9(stagedBinaryPath);
|
|
56036
56094
|
} catch {
|
|
@@ -56060,7 +56118,7 @@ async function installVersionFromBinary(stagingPath, installPath) {
|
|
|
56060
56118
|
try {
|
|
56061
56119
|
const platform2 = getPlatform3();
|
|
56062
56120
|
const binaryName = getBinaryName(platform2);
|
|
56063
|
-
const stagedBinaryPath =
|
|
56121
|
+
const stagedBinaryPath = join37(stagingPath, binaryName);
|
|
56064
56122
|
try {
|
|
56065
56123
|
await stat9(stagedBinaryPath);
|
|
56066
56124
|
} catch {
|
|
@@ -56393,7 +56451,7 @@ async function checkInstall(force = false) {
|
|
|
56393
56451
|
const shellType = getShellType();
|
|
56394
56452
|
const configPaths = getShellConfigPaths();
|
|
56395
56453
|
const configFile = configPaths[shellType];
|
|
56396
|
-
const displayPath = configFile ? configFile.replace(
|
|
56454
|
+
const displayPath = configFile ? configFile.replace(homedir11(), "~") : "your shell config file";
|
|
56397
56455
|
messages.push({
|
|
56398
56456
|
message: `Native installation exists but ~/.local/bin is not in your PATH. Run:
|
|
56399
56457
|
|
|
@@ -56460,7 +56518,7 @@ async function getVersionFromSymlink(symlinkPath) {
|
|
|
56460
56518
|
}
|
|
56461
56519
|
function getLockFilePathFromVersionPath(dirs, versionPath) {
|
|
56462
56520
|
const versionName = basename12(versionPath);
|
|
56463
|
-
return
|
|
56521
|
+
return join37(dirs.locks, `${versionName}.lock`);
|
|
56464
56522
|
}
|
|
56465
56523
|
async function lockCurrentVersion() {
|
|
56466
56524
|
const dirs = getBaseDirectories();
|
|
@@ -56554,7 +56612,7 @@ async function cleanupOldVersions() {
|
|
|
56554
56612
|
if (!/^claude\.exe\.old\.\d+$/.test(file))
|
|
56555
56613
|
continue;
|
|
56556
56614
|
try {
|
|
56557
|
-
await unlink4(
|
|
56615
|
+
await unlink4(join37(executableDir, file));
|
|
56558
56616
|
cleanedCount++;
|
|
56559
56617
|
} catch {}
|
|
56560
56618
|
}
|
|
@@ -56571,7 +56629,7 @@ async function cleanupOldVersions() {
|
|
|
56571
56629
|
const stagingEntries = await readdir6(dirs.staging);
|
|
56572
56630
|
let stagingCleanedCount = 0;
|
|
56573
56631
|
for (const entry of stagingEntries) {
|
|
56574
|
-
const stagingPath =
|
|
56632
|
+
const stagingPath = join37(dirs.staging, entry);
|
|
56575
56633
|
try {
|
|
56576
56634
|
const stats = await stat9(stagingPath);
|
|
56577
56635
|
if (stats.mtime.getTime() < oneHourAgo) {
|
|
@@ -56613,7 +56671,7 @@ async function cleanupOldVersions() {
|
|
|
56613
56671
|
const versionFiles = [];
|
|
56614
56672
|
let tempFilesCleanedCount = 0;
|
|
56615
56673
|
for (const entry of versionEntries) {
|
|
56616
|
-
const entryPath =
|
|
56674
|
+
const entryPath = join37(dirs.versions, entry);
|
|
56617
56675
|
if (/\.tmp\.\d+\.\d+$/.test(entry)) {
|
|
56618
56676
|
try {
|
|
56619
56677
|
const stats = await stat9(entryPath);
|
|
@@ -56805,9 +56863,9 @@ async function manualRemoveNpmPackage(packageName) {
|
|
|
56805
56863
|
}
|
|
56806
56864
|
}
|
|
56807
56865
|
if (getPlatform3().startsWith("win32")) {
|
|
56808
|
-
const binCmd =
|
|
56809
|
-
const binPs1 =
|
|
56810
|
-
const binExe =
|
|
56866
|
+
const binCmd = join37(globalPrefix, "claude.cmd");
|
|
56867
|
+
const binPs1 = join37(globalPrefix, "claude.ps1");
|
|
56868
|
+
const binExe = join37(globalPrefix, "claude");
|
|
56811
56869
|
if (await tryRemove(binCmd, "bin script")) {
|
|
56812
56870
|
manuallyRemoved = true;
|
|
56813
56871
|
}
|
|
@@ -56818,14 +56876,14 @@ async function manualRemoveNpmPackage(packageName) {
|
|
|
56818
56876
|
manuallyRemoved = true;
|
|
56819
56877
|
}
|
|
56820
56878
|
} else {
|
|
56821
|
-
const binSymlink =
|
|
56879
|
+
const binSymlink = join37(globalPrefix, "bin", "claude");
|
|
56822
56880
|
if (await tryRemove(binSymlink, "bin symlink")) {
|
|
56823
56881
|
manuallyRemoved = true;
|
|
56824
56882
|
}
|
|
56825
56883
|
}
|
|
56826
56884
|
if (manuallyRemoved) {
|
|
56827
56885
|
logForDebugging(`Successfully removed ${packageName} manually`);
|
|
56828
|
-
const nodeModulesPath = getPlatform3().startsWith("win32") ?
|
|
56886
|
+
const nodeModulesPath = getPlatform3().startsWith("win32") ? join37(globalPrefix, "node_modules", packageName) : join37(globalPrefix, "lib", "node_modules", packageName);
|
|
56829
56887
|
return {
|
|
56830
56888
|
success: true,
|
|
56831
56889
|
warning: `${packageName} executables removed, but node_modules directory was left intact for safety. You may manually delete it later at: ${nodeModulesPath}`
|
|
@@ -56894,7 +56952,7 @@ async function cleanupNpmInstallations() {
|
|
|
56894
56952
|
errors.push(macroPackageResult.error);
|
|
56895
56953
|
}
|
|
56896
56954
|
}
|
|
56897
|
-
const localInstallDir =
|
|
56955
|
+
const localInstallDir = join37(homedir11(), ".claude", "local");
|
|
56898
56956
|
try {
|
|
56899
56957
|
await rm7(localInstallDir, { recursive: true });
|
|
56900
56958
|
removed++;
|
|
@@ -57704,15 +57762,15 @@ var init_use_declared_cursor = __esm(() => {
|
|
|
57704
57762
|
|
|
57705
57763
|
// src/utils/imagePaste.ts
|
|
57706
57764
|
import { randomBytes as randomBytes7 } from "crypto";
|
|
57707
|
-
import { basename as basename13, extname as extname2, isAbsolute as isAbsolute6, join as
|
|
57765
|
+
import { basename as basename13, extname as extname2, isAbsolute as isAbsolute6, join as join38 } from "path";
|
|
57708
57766
|
function getClipboardCommands() {
|
|
57709
57767
|
const platform2 = process.platform;
|
|
57710
57768
|
const baseTmpDir = process.env.CLAUDE_CODE_TMPDIR || (platform2 === "win32" ? process.env.TEMP || "C:\\Temp" : "/tmp");
|
|
57711
57769
|
const screenshotFilename = "claude_cli_latest_screenshot.png";
|
|
57712
57770
|
const tempPaths = {
|
|
57713
|
-
darwin:
|
|
57714
|
-
linux:
|
|
57715
|
-
win32:
|
|
57771
|
+
darwin: join38(baseTmpDir, screenshotFilename),
|
|
57772
|
+
linux: join38(baseTmpDir, screenshotFilename),
|
|
57773
|
+
win32: join38(baseTmpDir, screenshotFilename)
|
|
57716
57774
|
};
|
|
57717
57775
|
const screenshotPath = tempPaths[platform2] || tempPaths.linux;
|
|
57718
57776
|
const commands = {
|
|
@@ -57891,9 +57949,9 @@ var init_imagePaste = __esm(() => {
|
|
|
57891
57949
|
|
|
57892
57950
|
// src/utils/imageStore.ts
|
|
57893
57951
|
import { mkdir as mkdir5, open as open4 } from "fs/promises";
|
|
57894
|
-
import { join as
|
|
57952
|
+
import { join as join39 } from "path";
|
|
57895
57953
|
function getImageStoreDir() {
|
|
57896
|
-
return
|
|
57954
|
+
return join39(getClaudeConfigHomeDir(), IMAGE_STORE_DIR, getSessionId());
|
|
57897
57955
|
}
|
|
57898
57956
|
async function ensureImageStoreDir() {
|
|
57899
57957
|
const dir = getImageStoreDir();
|
|
@@ -57901,7 +57959,7 @@ async function ensureImageStoreDir() {
|
|
|
57901
57959
|
}
|
|
57902
57960
|
function getImagePath(imageId, mediaType) {
|
|
57903
57961
|
const extension = mediaType.split("/")[1] || "png";
|
|
57904
|
-
return
|
|
57962
|
+
return join39(getImageStoreDir(), `${imageId}.${extension}`);
|
|
57905
57963
|
}
|
|
57906
57964
|
function cacheImagePath(content) {
|
|
57907
57965
|
if (content.type !== "image") {
|
|
@@ -57965,7 +58023,7 @@ function evictOldestIfAtCap() {
|
|
|
57965
58023
|
}
|
|
57966
58024
|
async function cleanupOldImageCaches() {
|
|
57967
58025
|
const fsImpl = getFsImplementation();
|
|
57968
|
-
const baseDir =
|
|
58026
|
+
const baseDir = join39(getClaudeConfigHomeDir(), IMAGE_STORE_DIR);
|
|
57969
58027
|
const currentSessionId = getSessionId();
|
|
57970
58028
|
try {
|
|
57971
58029
|
let sessionDirs;
|
|
@@ -57978,7 +58036,7 @@ async function cleanupOldImageCaches() {
|
|
|
57978
58036
|
if (sessionDir.name === currentSessionId) {
|
|
57979
58037
|
continue;
|
|
57980
58038
|
}
|
|
57981
|
-
const sessionPath =
|
|
58039
|
+
const sessionPath = join39(baseDir, sessionDir.name);
|
|
57982
58040
|
try {
|
|
57983
58041
|
await fsImpl.rm(sessionPath, { recursive: true, force: true });
|
|
57984
58042
|
logForDebugging(`Cleaned up old image cache: ${sessionPath}`);
|
|
@@ -58869,15 +58927,15 @@ var init_inputModes = () => {};
|
|
|
58869
58927
|
// src/utils/pasteStore.ts
|
|
58870
58928
|
import { createHash as createHash10 } from "crypto";
|
|
58871
58929
|
import { mkdir as mkdir6, readdir as readdir7, readFile as readFile10, stat as stat10, unlink as unlink5, writeFile as writeFile12 } from "fs/promises";
|
|
58872
|
-
import { join as
|
|
58930
|
+
import { join as join40 } from "path";
|
|
58873
58931
|
function getPasteStoreDir() {
|
|
58874
|
-
return
|
|
58932
|
+
return join40(getClaudeConfigHomeDir(), PASTE_STORE_DIR);
|
|
58875
58933
|
}
|
|
58876
58934
|
function hashPastedText(content) {
|
|
58877
58935
|
return createHash10("sha256").update(content).digest("hex").slice(0, 16);
|
|
58878
58936
|
}
|
|
58879
58937
|
function getPastePath(hash) {
|
|
58880
|
-
return
|
|
58938
|
+
return join40(getPasteStoreDir(), `${hash}.txt`);
|
|
58881
58939
|
}
|
|
58882
58940
|
async function storePastedText(hash, content) {
|
|
58883
58941
|
try {
|
|
@@ -58914,7 +58972,7 @@ async function cleanupOldPastes(cutoffDate) {
|
|
|
58914
58972
|
if (!file.endsWith(".txt")) {
|
|
58915
58973
|
continue;
|
|
58916
58974
|
}
|
|
58917
|
-
const filePath =
|
|
58975
|
+
const filePath = join40(pasteDir, file);
|
|
58918
58976
|
try {
|
|
58919
58977
|
const stats = await stat10(filePath);
|
|
58920
58978
|
if (stats.mtimeMs < cutoffTime) {
|
|
@@ -58933,7 +58991,7 @@ var init_pasteStore = __esm(() => {
|
|
|
58933
58991
|
|
|
58934
58992
|
// src/history.ts
|
|
58935
58993
|
import { appendFile, writeFile as writeFile13 } from "fs/promises";
|
|
58936
|
-
import { join as
|
|
58994
|
+
import { join as join41 } from "path";
|
|
58937
58995
|
function getPastedTextRefNumLines(text2) {
|
|
58938
58996
|
return (text2.match(/\r\n|\r|\n/g) || []).length;
|
|
58939
58997
|
}
|
|
@@ -58975,7 +59033,7 @@ async function* makeLogEntryReader() {
|
|
|
58975
59033
|
for (let i = pendingEntries.length - 1;i >= 0; i--) {
|
|
58976
59034
|
yield pendingEntries[i];
|
|
58977
59035
|
}
|
|
58978
|
-
const historyPath =
|
|
59036
|
+
const historyPath = join41(getClaudeConfigHomeDir(), "history.jsonl");
|
|
58979
59037
|
try {
|
|
58980
59038
|
for await (const line of readLinesReverse(historyPath)) {
|
|
58981
59039
|
try {
|
|
@@ -59070,7 +59128,7 @@ async function immediateFlushHistory() {
|
|
|
59070
59128
|
}
|
|
59071
59129
|
let release;
|
|
59072
59130
|
try {
|
|
59073
|
-
const historyPath =
|
|
59131
|
+
const historyPath = join41(getClaudeConfigHomeDir(), "history.jsonl");
|
|
59074
59132
|
await writeFile13(historyPath, "", {
|
|
59075
59133
|
encoding: "utf8",
|
|
59076
59134
|
mode: 384,
|
|
@@ -69040,7 +69098,7 @@ import {
|
|
|
69040
69098
|
stat as stat11,
|
|
69041
69099
|
unlink as unlink6
|
|
69042
69100
|
} from "fs/promises";
|
|
69043
|
-
import { dirname as dirname19, isAbsolute as isAbsolute7, join as
|
|
69101
|
+
import { dirname as dirname19, isAbsolute as isAbsolute7, join as join42, relative as relative3 } from "path";
|
|
69044
69102
|
import { inspect } from "util";
|
|
69045
69103
|
function fileHistoryEnabled() {
|
|
69046
69104
|
if (getIsNonInteractiveSession()) {
|
|
@@ -69459,7 +69517,7 @@ function getBackupFileName(filePath, version) {
|
|
|
69459
69517
|
}
|
|
69460
69518
|
function resolveBackupPath(backupFileName, sessionId) {
|
|
69461
69519
|
const configDir = getClaudeConfigHomeDir();
|
|
69462
|
-
return
|
|
69520
|
+
return join42(configDir, "file-history", sessionId || getSessionId(), backupFileName);
|
|
69463
69521
|
}
|
|
69464
69522
|
async function createBackup(filePath, version) {
|
|
69465
69523
|
if (filePath === null) {
|
|
@@ -69541,7 +69599,7 @@ function maybeExpandFilePath(filePath) {
|
|
|
69541
69599
|
if (isAbsolute7(filePath)) {
|
|
69542
69600
|
return filePath;
|
|
69543
69601
|
}
|
|
69544
|
-
return
|
|
69602
|
+
return join42(getOriginalCwd(), filePath);
|
|
69545
69603
|
}
|
|
69546
69604
|
function fileHistoryRestoreStateFromLog(fileHistorySnapshots, onUpdateState) {
|
|
69547
69605
|
if (!fileHistoryEnabled()) {
|
|
@@ -69587,14 +69645,14 @@ async function copyFileHistoryForResume(log) {
|
|
|
69587
69645
|
return;
|
|
69588
69646
|
}
|
|
69589
69647
|
try {
|
|
69590
|
-
const newBackupDir =
|
|
69648
|
+
const newBackupDir = join42(getClaudeConfigHomeDir(), "file-history", sessionId);
|
|
69591
69649
|
await mkdir7(newBackupDir, { recursive: true });
|
|
69592
69650
|
let failedSnapshots = 0;
|
|
69593
69651
|
await Promise.allSettled(fileHistorySnapshots.map(async (snapshot2) => {
|
|
69594
69652
|
const backupEntries = Object.values(snapshot2.trackedFileBackups).filter((backup) => backup.backupFileName !== null);
|
|
69595
69653
|
const results = await Promise.allSettled(backupEntries.map(async ({ backupFileName }) => {
|
|
69596
69654
|
const oldBackupPath = resolveBackupPath(backupFileName, previousSessionId);
|
|
69597
|
-
const newBackupPath =
|
|
69655
|
+
const newBackupPath = join42(newBackupDir, backupFileName);
|
|
69598
69656
|
try {
|
|
69599
69657
|
await link(oldBackupPath, newBackupPath);
|
|
69600
69658
|
} catch (e) {
|
|
@@ -69692,21 +69750,21 @@ var init_fileHistory = __esm(() => {
|
|
|
69692
69750
|
|
|
69693
69751
|
// src/utils/sessionEnvironment.ts
|
|
69694
69752
|
import { mkdir as mkdir8, readdir as readdir8, readFile as readFile12, writeFile as writeFile14 } from "fs/promises";
|
|
69695
|
-
import { join as
|
|
69753
|
+
import { join as join43 } from "path";
|
|
69696
69754
|
async function getSessionEnvDirPath() {
|
|
69697
|
-
const sessionEnvDir =
|
|
69755
|
+
const sessionEnvDir = join43(getClaudeConfigHomeDir(), "session-env", getSessionId());
|
|
69698
69756
|
await mkdir8(sessionEnvDir, { recursive: true });
|
|
69699
69757
|
return sessionEnvDir;
|
|
69700
69758
|
}
|
|
69701
69759
|
async function getHookEnvFilePath(hookEvent, hookIndex) {
|
|
69702
69760
|
const prefix = hookEvent.toLowerCase();
|
|
69703
|
-
return
|
|
69761
|
+
return join43(await getSessionEnvDirPath(), `${prefix}-hook-${hookIndex}.sh`);
|
|
69704
69762
|
}
|
|
69705
69763
|
async function clearCwdEnvFiles() {
|
|
69706
69764
|
try {
|
|
69707
69765
|
const dir = await getSessionEnvDirPath();
|
|
69708
69766
|
const files = await readdir8(dir);
|
|
69709
|
-
await Promise.all(files.filter((f) => (f.startsWith("filechanged-hook-") || f.startsWith("cwdchanged-hook-")) && HOOK_ENV_REGEX.test(f)).map((f) => writeFile14(
|
|
69767
|
+
await Promise.all(files.filter((f) => (f.startsWith("filechanged-hook-") || f.startsWith("cwdchanged-hook-")) && HOOK_ENV_REGEX.test(f)).map((f) => writeFile14(join43(dir, f), "")));
|
|
69710
69768
|
} catch (e) {
|
|
69711
69769
|
const code = getErrnoCode(e);
|
|
69712
69770
|
if (code !== "ENOENT") {
|
|
@@ -69747,7 +69805,7 @@ async function getSessionEnvironmentScript() {
|
|
|
69747
69805
|
const files = await readdir8(sessionEnvDir);
|
|
69748
69806
|
const hookFiles = files.filter((f) => HOOK_ENV_REGEX.test(f)).sort(sortHookEnvFiles);
|
|
69749
69807
|
for (const file of hookFiles) {
|
|
69750
|
-
const filePath =
|
|
69808
|
+
const filePath = join43(sessionEnvDir, file);
|
|
69751
69809
|
try {
|
|
69752
69810
|
const content = (await readFile12(filePath, "utf8")).trim();
|
|
69753
69811
|
if (content) {
|
|
@@ -69808,7 +69866,7 @@ var init_sessionEnvironment = __esm(() => {
|
|
|
69808
69866
|
});
|
|
69809
69867
|
|
|
69810
69868
|
// src/utils/hooks/fileChangedWatcher.ts
|
|
69811
|
-
import { isAbsolute as isAbsolute8, join as
|
|
69869
|
+
import { isAbsolute as isAbsolute8, join as join44 } from "path";
|
|
69812
69870
|
function setEnvHookNotifier(cb) {
|
|
69813
69871
|
notifyCallback = cb;
|
|
69814
69872
|
}
|
|
@@ -69836,7 +69894,7 @@ function resolveWatchPaths(config2) {
|
|
|
69836
69894
|
for (const name of m2.matcher.split("|").map((s) => s.trim())) {
|
|
69837
69895
|
if (!name)
|
|
69838
69896
|
continue;
|
|
69839
|
-
staticPaths.push(isAbsolute8(name) ? name :
|
|
69897
|
+
staticPaths.push(isAbsolute8(name) ? name : join44(currentCwd, name));
|
|
69840
69898
|
}
|
|
69841
69899
|
}
|
|
69842
69900
|
return [...new Set([...staticPaths, ...dynamicWatchPaths])];
|
|
@@ -70667,10 +70725,10 @@ var init_filesApi = __esm(() => {
|
|
|
70667
70725
|
// src/utils/tempfile.ts
|
|
70668
70726
|
import { createHash as createHash12, randomUUID as randomUUID7 } from "crypto";
|
|
70669
70727
|
import { tmpdir as tmpdir4 } from "os";
|
|
70670
|
-
import { join as
|
|
70728
|
+
import { join as join46 } from "path";
|
|
70671
70729
|
function generateTempFilePath(prefix = "claude-prompt", extension = ".md", options) {
|
|
70672
70730
|
const id = options?.contentHash ? createHash12("sha256").update(options.contentHash).digest("hex").slice(0, 16) : randomUUID7();
|
|
70673
|
-
return
|
|
70731
|
+
return join46(tmpdir4(), `${prefix}-${id}${extension}`);
|
|
70674
70732
|
}
|
|
70675
70733
|
var init_tempfile = () => {};
|
|
70676
70734
|
|
|
@@ -73798,7 +73856,7 @@ var init_extra_usage = __esm(() => {
|
|
|
73798
73856
|
name: "extra-usage",
|
|
73799
73857
|
description: "Configure extra usage to keep working when limits are hit",
|
|
73800
73858
|
isEnabled: () => isExtraUsageAllowed() && !getIsNonInteractiveSession(),
|
|
73801
|
-
load: () => import("./chunk-
|
|
73859
|
+
load: () => import("./chunk-ajn61tq2.js")
|
|
73802
73860
|
};
|
|
73803
73861
|
extraUsageNonInteractive = {
|
|
73804
73862
|
type: "local",
|
|
@@ -77808,20 +77866,20 @@ __export(exports_teammateMailbox, {
|
|
|
77808
77866
|
ModeSetRequestMessageSchema: () => ModeSetRequestMessageSchema
|
|
77809
77867
|
});
|
|
77810
77868
|
import { mkdir as mkdir10, readFile as readFile14, writeFile as writeFile16 } from "fs/promises";
|
|
77811
|
-
import { join as
|
|
77869
|
+
import { join as join47 } from "path";
|
|
77812
77870
|
function getInboxPath(agentName, teamName) {
|
|
77813
77871
|
const team = teamName || getTeamName() || "default";
|
|
77814
77872
|
const safeTeam = sanitizePathComponent(team);
|
|
77815
77873
|
const safeAgentName = sanitizePathComponent(agentName);
|
|
77816
|
-
const inboxDir =
|
|
77817
|
-
const fullPath =
|
|
77874
|
+
const inboxDir = join47(getTeamsDir(), safeTeam, "inboxes");
|
|
77875
|
+
const fullPath = join47(inboxDir, `${safeAgentName}.json`);
|
|
77818
77876
|
logForDebugging(`[TeammateMailbox] getInboxPath: agent=${agentName}, team=${team}, fullPath=${fullPath}`);
|
|
77819
77877
|
return fullPath;
|
|
77820
77878
|
}
|
|
77821
77879
|
async function ensureInboxDir(teamName) {
|
|
77822
77880
|
const team = teamName || getTeamName() || "default";
|
|
77823
77881
|
const safeTeam = sanitizePathComponent(team);
|
|
77824
|
-
const inboxDir =
|
|
77882
|
+
const inboxDir = join47(getTeamsDir(), safeTeam, "inboxes");
|
|
77825
77883
|
await mkdir10(inboxDir, { recursive: true });
|
|
77826
77884
|
logForDebugging(`[TeammateMailbox] Ensured inbox directory: ${inboxDir}`);
|
|
77827
77885
|
}
|
|
@@ -84279,7 +84337,7 @@ var init_SkillTool = __esm(() => {
|
|
|
84279
84337
|
if (command?.type === "prompt" && command.context === "fork") {
|
|
84280
84338
|
return executeForkedSkill(command, commandName, args, context, canUseTool, parentMessage, onProgress);
|
|
84281
84339
|
}
|
|
84282
|
-
const { processPromptSlashCommand } = await import("./chunk-
|
|
84340
|
+
const { processPromptSlashCommand } = await import("./chunk-7k54kmcj.js");
|
|
84283
84341
|
const processedCommand = await processPromptSlashCommand(commandName, args || "", commands, context);
|
|
84284
84342
|
if (!processedCommand.shouldQuery) {
|
|
84285
84343
|
throw new Error("Command processing failed");
|
|
@@ -84638,7 +84696,7 @@ var init_LSPDiagnosticRegistry = __esm(() => {
|
|
|
84638
84696
|
|
|
84639
84697
|
// src/utils/plugins/lspPluginIntegration.ts
|
|
84640
84698
|
import { readFile as readFile15 } from "fs/promises";
|
|
84641
|
-
import { join as
|
|
84699
|
+
import { join as join48, relative as relative6, resolve as resolve13 } from "path";
|
|
84642
84700
|
function validatePathWithinPlugin(pluginPath, relativePath) {
|
|
84643
84701
|
const resolvedPluginPath = resolve13(pluginPath);
|
|
84644
84702
|
const resolvedFilePath = resolve13(pluginPath, relativePath);
|
|
@@ -84650,7 +84708,7 @@ function validatePathWithinPlugin(pluginPath, relativePath) {
|
|
|
84650
84708
|
}
|
|
84651
84709
|
async function loadPluginLspServers(plugin, errors = []) {
|
|
84652
84710
|
const servers = {};
|
|
84653
|
-
const lspJsonPath =
|
|
84711
|
+
const lspJsonPath = join48(plugin.path, ".lsp.json");
|
|
84654
84712
|
try {
|
|
84655
84713
|
const content = await readFile15(lspJsonPath, "utf-8");
|
|
84656
84714
|
const parsed = jsonParse(content);
|
|
@@ -89165,7 +89223,7 @@ var init_fileOperationAnalytics = __esm(() => {
|
|
|
89165
89223
|
|
|
89166
89224
|
// src/utils/gitDiff.ts
|
|
89167
89225
|
import { access as access4, readFile as readFile16 } from "fs/promises";
|
|
89168
|
-
import { dirname as dirname21, join as
|
|
89226
|
+
import { dirname as dirname21, join as join49, relative as relative7, sep as sep10 } from "path";
|
|
89169
89227
|
async function fetchGitDiff() {
|
|
89170
89228
|
const isGit = await getIsGit();
|
|
89171
89229
|
if (!isGit)
|
|
@@ -89316,7 +89374,7 @@ async function isInTransientGitState() {
|
|
|
89316
89374
|
"CHERRY_PICK_HEAD",
|
|
89317
89375
|
"REVERT_HEAD"
|
|
89318
89376
|
];
|
|
89319
|
-
const results = await Promise.all(transientFiles.map((file) => access4(
|
|
89377
|
+
const results = await Promise.all(transientFiles.map((file) => access4(join49(gitDir, file)).then(() => true).catch(() => false)));
|
|
89320
89378
|
return results.some(Boolean);
|
|
89321
89379
|
}
|
|
89322
89380
|
async function fetchUntrackedFiles(maxFiles) {
|
|
@@ -93395,9 +93453,9 @@ var init_FileWriteTool = __esm(() => {
|
|
|
93395
93453
|
});
|
|
93396
93454
|
|
|
93397
93455
|
// src/utils/plugins/orphanedPluginFilter.ts
|
|
93398
|
-
import { dirname as dirname24, isAbsolute as isAbsolute11, join as
|
|
93456
|
+
import { dirname as dirname24, isAbsolute as isAbsolute11, join as join50, normalize as normalize4, relative as relative10, sep as sep13 } from "path";
|
|
93399
93457
|
async function getGlobExclusionsForPluginCache(searchPath) {
|
|
93400
|
-
const cachePath = normalize4(
|
|
93458
|
+
const cachePath = normalize4(join50(getPluginsDirectory(), "cache"));
|
|
93401
93459
|
if (searchPath && !pathsOverlap(searchPath, cachePath)) {
|
|
93402
93460
|
return [];
|
|
93403
93461
|
}
|
|
@@ -93445,7 +93503,7 @@ var init_orphanedPluginFilter = __esm(() => {
|
|
|
93445
93503
|
});
|
|
93446
93504
|
|
|
93447
93505
|
// src/utils/glob.ts
|
|
93448
|
-
import { basename as basename21, dirname as dirname25, isAbsolute as isAbsolute12, join as
|
|
93506
|
+
import { basename as basename21, dirname as dirname25, isAbsolute as isAbsolute12, join as join51, sep as sep14 } from "path";
|
|
93449
93507
|
function extractGlobBaseDirectory(pattern) {
|
|
93450
93508
|
const globChars = /[*?[{]/;
|
|
93451
93509
|
const match = pattern.match(globChars);
|
|
@@ -93497,7 +93555,7 @@ async function glob(filePattern, cwd, { limit, offset }, abortSignal, toolPermis
|
|
|
93497
93555
|
args.push("--glob", exclusion);
|
|
93498
93556
|
}
|
|
93499
93557
|
const allPaths = await ripGrep2(args, searchDir, abortSignal);
|
|
93500
|
-
const absolutePaths = allPaths.map((p) => isAbsolute12(p) ? p :
|
|
93558
|
+
const absolutePaths = allPaths.map((p) => isAbsolute12(p) ? p : join51(searchDir, p));
|
|
93501
93559
|
const truncated = absolutePaths.length > offset + limit;
|
|
93502
93560
|
const files = absolutePaths.slice(offset, offset + limit);
|
|
93503
93561
|
return { files, truncated };
|
|
@@ -94861,7 +94919,7 @@ var init_bashPipeCommand = __esm(() => {
|
|
|
94861
94919
|
import { execFile as execFile2 } from "child_process";
|
|
94862
94920
|
import { mkdir as mkdir11, stat as stat13 } from "fs/promises";
|
|
94863
94921
|
import * as os2 from "os";
|
|
94864
|
-
import { join as
|
|
94922
|
+
import { join as join52 } from "path";
|
|
94865
94923
|
function createArgv0ShellFunction(funcName, argv0, binaryPath, prependArgs = []) {
|
|
94866
94924
|
const quotedPath = quote([binaryPath]);
|
|
94867
94925
|
const argSuffix = prependArgs.length > 0 ? `${prependArgs.join(" ")} "$@"` : '"$@"';
|
|
@@ -94917,7 +94975,7 @@ function createFindGrepShellIntegration() {
|
|
|
94917
94975
|
}
|
|
94918
94976
|
function getConfigFile(shellPath) {
|
|
94919
94977
|
const fileName = shellPath.includes("zsh") ? ".zshrc" : shellPath.includes("bash") ? ".bashrc" : ".profile";
|
|
94920
|
-
const configPath =
|
|
94978
|
+
const configPath = join52(os2.homedir(), fileName);
|
|
94921
94979
|
return configPath;
|
|
94922
94980
|
}
|
|
94923
94981
|
function getUserSnapshotContent(configFile) {
|
|
@@ -95071,9 +95129,9 @@ var LITERAL_BACKSLASH = "\\", SNAPSHOT_CREATION_TIMEOUT = 1e4, VCS_DIRECTORIES_T
|
|
|
95071
95129
|
}
|
|
95072
95130
|
const timestamp2 = Date.now();
|
|
95073
95131
|
const randomId = Math.random().toString(36).substring(2, 8);
|
|
95074
|
-
const snapshotsDir =
|
|
95132
|
+
const snapshotsDir = join52(getClaudeConfigHomeDir(), "shell-snapshots");
|
|
95075
95133
|
logForDebugging(`Snapshots directory: ${snapshotsDir}`);
|
|
95076
|
-
const shellSnapshotPath =
|
|
95134
|
+
const shellSnapshotPath = join52(snapshotsDir, `snapshot-${shellType}-${timestamp2}-${randomId}.sh`);
|
|
95077
95135
|
await mkdir11(snapshotsDir, { recursive: true });
|
|
95078
95136
|
const snapshotScript = await getSnapshotScript(binShell, shellSnapshotPath, configFileExists);
|
|
95079
95137
|
logForDebugging(`Creating snapshot at: ${shellSnapshotPath}`);
|
|
@@ -95628,7 +95686,7 @@ var init_powershellDetection = __esm(() => {
|
|
|
95628
95686
|
|
|
95629
95687
|
// src/utils/shell/powershellProvider.ts
|
|
95630
95688
|
import { tmpdir as tmpdir5 } from "os";
|
|
95631
|
-
import { join as
|
|
95689
|
+
import { join as join53 } from "path";
|
|
95632
95690
|
import { join as posixJoin2 } from "path/posix";
|
|
95633
95691
|
function buildPowerShellArgs(cmd) {
|
|
95634
95692
|
return ["-NoProfile", "-NonInteractive", "-Command", cmd];
|
|
@@ -95644,7 +95702,7 @@ function createPowerShellProvider(shellPath) {
|
|
|
95644
95702
|
detached: false,
|
|
95645
95703
|
async buildExecCommand(command, opts) {
|
|
95646
95704
|
currentSandboxTmpDir = opts.useSandbox ? opts.sandboxTmpDir : undefined;
|
|
95647
|
-
const cwdFilePath = opts.useSandbox && opts.sandboxTmpDir ? posixJoin2(opts.sandboxTmpDir, `claude-pwd-ps-${opts.id}`) :
|
|
95705
|
+
const cwdFilePath = opts.useSandbox && opts.sandboxTmpDir ? posixJoin2(opts.sandboxTmpDir, `claude-pwd-ps-${opts.id}`) : join53(tmpdir5(), `claude-pwd-ps-${opts.id}`);
|
|
95648
95706
|
const escapedCwdFilePath = cwdFilePath.replace(/'/g, "''");
|
|
95649
95707
|
const cwdTracking = `
|
|
95650
95708
|
; $_ec = if ($null -ne $LASTEXITCODE) { $LASTEXITCODE } elseif ($?) { 0 } else { 1 }
|
|
@@ -95682,7 +95740,7 @@ var init_powershellProvider = __esm(() => {
|
|
|
95682
95740
|
|
|
95683
95741
|
// src/utils/Shell.ts
|
|
95684
95742
|
import { execFileSync as execFileSync2, spawn as spawn7 } from "child_process";
|
|
95685
|
-
import { constants as fsConstants3, readFileSync as
|
|
95743
|
+
import { constants as fsConstants3, readFileSync as readFileSync6, unlinkSync as unlinkSync2 } from "fs";
|
|
95686
95744
|
import { mkdir as mkdir12, open as open6, realpath as realpath5 } from "fs/promises";
|
|
95687
95745
|
import { isAbsolute as isAbsolute13, resolve as resolve16 } from "path";
|
|
95688
95746
|
import { join as posixJoin3 } from "path/posix";
|
|
@@ -95843,7 +95901,7 @@ async function exec(command, abortSignal, shellType, options) {
|
|
|
95843
95901
|
}
|
|
95844
95902
|
if (result && !preventCwdChanges && !result.backgroundTaskId) {
|
|
95845
95903
|
try {
|
|
95846
|
-
let newCwd =
|
|
95904
|
+
let newCwd = readFileSync6(nativeCwdFilePath, {
|
|
95847
95905
|
encoding: "utf8"
|
|
95848
95906
|
}).trim();
|
|
95849
95907
|
if (getPlatform() === "windows") {
|
|
@@ -97071,7 +97129,7 @@ var init_UI8 = __esm(() => {
|
|
|
97071
97129
|
|
|
97072
97130
|
// src/utils/toolResultStorage.ts
|
|
97073
97131
|
import { mkdir as mkdir13, writeFile as writeFile17 } from "fs/promises";
|
|
97074
|
-
import { join as
|
|
97132
|
+
import { join as join54 } from "path";
|
|
97075
97133
|
function getPersistenceThreshold(toolName, declaredMaxResultSizeChars) {
|
|
97076
97134
|
if (!Number.isFinite(declaredMaxResultSizeChars)) {
|
|
97077
97135
|
return declaredMaxResultSizeChars;
|
|
@@ -97084,14 +97142,14 @@ function getPersistenceThreshold(toolName, declaredMaxResultSizeChars) {
|
|
|
97084
97142
|
return Math.min(declaredMaxResultSizeChars, DEFAULT_MAX_RESULT_SIZE_CHARS);
|
|
97085
97143
|
}
|
|
97086
97144
|
function getSessionDir() {
|
|
97087
|
-
return
|
|
97145
|
+
return join54(getProjectDir(getOriginalCwd()), getSessionId());
|
|
97088
97146
|
}
|
|
97089
97147
|
function getToolResultsDir() {
|
|
97090
|
-
return
|
|
97148
|
+
return join54(getSessionDir(), TOOL_RESULTS_SUBDIR);
|
|
97091
97149
|
}
|
|
97092
97150
|
function getToolResultPath(id, isJson) {
|
|
97093
97151
|
const ext = isJson ? "json" : "txt";
|
|
97094
|
-
return
|
|
97152
|
+
return join54(getToolResultsDir(), `${id}.${ext}`);
|
|
97095
97153
|
}
|
|
97096
97154
|
async function ensureToolResultsDir() {
|
|
97097
97155
|
try {
|
|
@@ -97509,7 +97567,7 @@ var init_toolResultStorage = __esm(() => {
|
|
|
97509
97567
|
|
|
97510
97568
|
// src/utils/mcpOutputStorage.ts
|
|
97511
97569
|
import { writeFile as writeFile18 } from "fs/promises";
|
|
97512
|
-
import { join as
|
|
97570
|
+
import { join as join55 } from "path";
|
|
97513
97571
|
function getFormatDescription(type, schema) {
|
|
97514
97572
|
switch (type) {
|
|
97515
97573
|
case "toolResult":
|
|
@@ -97606,7 +97664,7 @@ function isBinaryContentType(contentType) {
|
|
|
97606
97664
|
async function persistBinaryContent(bytes, mimeType, persistId) {
|
|
97607
97665
|
await ensureToolResultsDir();
|
|
97608
97666
|
const ext = extensionForMimeType(mimeType);
|
|
97609
|
-
const filepath =
|
|
97667
|
+
const filepath = join55(getToolResultsDir(), `${persistId}.${ext}`);
|
|
97610
97668
|
try {
|
|
97611
97669
|
await writeFile18(filepath, bytes);
|
|
97612
97670
|
} catch (error) {
|
|
@@ -98157,7 +98215,7 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
98157
98215
|
|
|
98158
98216
|
// src/utils/listSessionsImpl.ts
|
|
98159
98217
|
import { readdir as readdir9, stat as stat16 } from "fs/promises";
|
|
98160
|
-
import { basename as basename22, join as
|
|
98218
|
+
import { basename as basename22, join as join56 } from "path";
|
|
98161
98219
|
async function listCandidates(projectDir, doStat, projectPath) {
|
|
98162
98220
|
let names;
|
|
98163
98221
|
try {
|
|
@@ -98171,7 +98229,7 @@ async function listCandidates(projectDir, doStat, projectPath) {
|
|
|
98171
98229
|
const sessionId = validateUuid(name.slice(0, -6));
|
|
98172
98230
|
if (!sessionId)
|
|
98173
98231
|
return null;
|
|
98174
|
-
const filePath =
|
|
98232
|
+
const filePath = join56(projectDir, name);
|
|
98175
98233
|
if (!doStat)
|
|
98176
98234
|
return { sessionId, filePath, mtime: 0, projectPath };
|
|
98177
98235
|
try {
|
|
@@ -98190,9 +98248,9 @@ var init_listSessionsImpl = __esm(() => {
|
|
|
98190
98248
|
|
|
98191
98249
|
// src/services/autoDream/consolidationLock.ts
|
|
98192
98250
|
import { mkdir as mkdir14, readFile as readFile18, stat as stat17, unlink as unlink9, utimes as utimes2, writeFile as writeFile19 } from "fs/promises";
|
|
98193
|
-
import { join as
|
|
98251
|
+
import { join as join57 } from "path";
|
|
98194
98252
|
function lockPath() {
|
|
98195
|
-
return
|
|
98253
|
+
return join57(getAutoMemPath(), LOCK_FILE);
|
|
98196
98254
|
}
|
|
98197
98255
|
async function readLastConsolidatedAt() {
|
|
98198
98256
|
try {
|
|
@@ -111577,7 +111635,7 @@ var init_sedValidation = __esm(() => {
|
|
|
111577
111635
|
});
|
|
111578
111636
|
|
|
111579
111637
|
// src/tools/BashTool/pathValidation.ts
|
|
111580
|
-
import { homedir as
|
|
111638
|
+
import { homedir as homedir13 } from "os";
|
|
111581
111639
|
import { isAbsolute as isAbsolute15, resolve as resolve18 } from "path";
|
|
111582
111640
|
function checkDangerousRemovalPaths(command, args, cwd) {
|
|
111583
111641
|
const extractor = PATH_EXTRACTORS[command];
|
|
@@ -112026,7 +112084,7 @@ var init_pathValidation2 = __esm(() => {
|
|
|
112026
112084
|
init_bashPermissions();
|
|
112027
112085
|
init_sedValidation();
|
|
112028
112086
|
PATH_EXTRACTORS = {
|
|
112029
|
-
cd: (args) => args.length === 0 ? [
|
|
112087
|
+
cd: (args) => args.length === 0 ? [homedir13()] : [args.join(" ")],
|
|
112030
112088
|
ls: (args) => {
|
|
112031
112089
|
const paths = filterOutFlags(args);
|
|
112032
112090
|
return paths.length > 0 ? paths : ["."];
|
|
@@ -114386,7 +114444,7 @@ var init_InProcessBackend = __esm(() => {
|
|
|
114386
114444
|
});
|
|
114387
114445
|
|
|
114388
114446
|
// src/utils/swarm/backends/it2Setup.ts
|
|
114389
|
-
import { homedir as
|
|
114447
|
+
import { homedir as homedir14 } from "os";
|
|
114390
114448
|
async function detectPythonPackageManager() {
|
|
114391
114449
|
const uvResult = await execFileNoThrow("which", ["uv"]);
|
|
114392
114450
|
if (uvResult.code === 0) {
|
|
@@ -114421,18 +114479,18 @@ async function installIt2(packageManager) {
|
|
|
114421
114479
|
switch (packageManager) {
|
|
114422
114480
|
case "uvx":
|
|
114423
114481
|
result = await execFileNoThrowWithCwd("uv", ["tool", "install", "it2"], {
|
|
114424
|
-
cwd:
|
|
114482
|
+
cwd: homedir14()
|
|
114425
114483
|
});
|
|
114426
114484
|
break;
|
|
114427
114485
|
case "pipx":
|
|
114428
114486
|
result = await execFileNoThrowWithCwd("pipx", ["install", "it2"], {
|
|
114429
|
-
cwd:
|
|
114487
|
+
cwd: homedir14()
|
|
114430
114488
|
});
|
|
114431
114489
|
break;
|
|
114432
114490
|
case "pip":
|
|
114433
|
-
result = await execFileNoThrowWithCwd("pip", ["install", "--user", "it2"], { cwd:
|
|
114491
|
+
result = await execFileNoThrowWithCwd("pip", ["install", "--user", "it2"], { cwd: homedir14() });
|
|
114434
114492
|
if (result.code !== 0) {
|
|
114435
|
-
result = await execFileNoThrowWithCwd("pip3", ["install", "--user", "it2"], { cwd:
|
|
114493
|
+
result = await execFileNoThrowWithCwd("pip3", ["install", "--user", "it2"], { cwd: homedir14() });
|
|
114436
114494
|
}
|
|
114437
114495
|
break;
|
|
114438
114496
|
}
|
|
@@ -114810,8 +114868,8 @@ var init_PaneBackendExecutor = __esm(() => {
|
|
|
114810
114868
|
async function ensureBackendsRegistered() {
|
|
114811
114869
|
if (backendsRegistered)
|
|
114812
114870
|
return;
|
|
114813
|
-
await import("./chunk-
|
|
114814
|
-
await import("./chunk-
|
|
114871
|
+
await import("./chunk-9qjbbhmq.js");
|
|
114872
|
+
await import("./chunk-6wn2x6dt.js");
|
|
114815
114873
|
backendsRegistered = true;
|
|
114816
114874
|
}
|
|
114817
114875
|
function registerTmuxBackend(backendClass) {
|
|
@@ -115435,9 +115493,9 @@ var init_TeamDeleteTool = __esm(() => {
|
|
|
115435
115493
|
|
|
115436
115494
|
// src/utils/concurrentSessions.ts
|
|
115437
115495
|
import { chmod as chmod9, mkdir as mkdir15, readdir as readdir10, readFile as readFile19, unlink as unlink10, writeFile as writeFile21 } from "fs/promises";
|
|
115438
|
-
import { join as
|
|
115496
|
+
import { join as join58 } from "path";
|
|
115439
115497
|
function getSessionsDir() {
|
|
115440
|
-
return
|
|
115498
|
+
return join58(getClaudeConfigHomeDir(), "sessions");
|
|
115441
115499
|
}
|
|
115442
115500
|
function envSessionKind() {
|
|
115443
115501
|
if (false) {}
|
|
@@ -115448,7 +115506,7 @@ async function registerSession() {
|
|
|
115448
115506
|
return false;
|
|
115449
115507
|
const kind = envSessionKind() ?? "interactive";
|
|
115450
115508
|
const dir = getSessionsDir();
|
|
115451
|
-
const pidFile =
|
|
115509
|
+
const pidFile = join58(dir, `${process.pid}.json`);
|
|
115452
115510
|
registerCleanup(async () => {
|
|
115453
115511
|
try {
|
|
115454
115512
|
await unlink10(pidFile);
|
|
@@ -115477,7 +115535,7 @@ async function registerSession() {
|
|
|
115477
115535
|
}
|
|
115478
115536
|
}
|
|
115479
115537
|
async function updatePidFile(patch) {
|
|
115480
|
-
const pidFile =
|
|
115538
|
+
const pidFile = join58(getSessionsDir(), `${process.pid}.json`);
|
|
115481
115539
|
try {
|
|
115482
115540
|
const data = jsonParse(await readFile19(pidFile, "utf8"));
|
|
115483
115541
|
await writeFile21(pidFile, jsonStringify({ ...data, ...patch }));
|
|
@@ -115516,7 +115574,7 @@ async function countConcurrentSessions() {
|
|
|
115516
115574
|
if (isProcessRunning(pid)) {
|
|
115517
115575
|
count2++;
|
|
115518
115576
|
} else if (getPlatform() !== "wsl") {
|
|
115519
|
-
unlink10(
|
|
115577
|
+
unlink10(join58(dir, file)).catch(() => {});
|
|
115520
115578
|
}
|
|
115521
115579
|
}
|
|
115522
115580
|
return count2;
|
|
@@ -117460,7 +117518,7 @@ function trackGitOperations(command, exitCode, stdout) {
|
|
|
117460
117518
|
if (stdout) {
|
|
117461
117519
|
const prInfo = findPrInStdout(stdout);
|
|
117462
117520
|
if (prInfo) {
|
|
117463
|
-
import("./chunk-
|
|
117521
|
+
import("./chunk-nkjdw1z4.js").then(({ linkSessionToPR }) => {
|
|
117464
117522
|
import("./chunk-44fpr6jq.js").then(({ getSessionId: getSessionId2 }) => {
|
|
117465
117523
|
const sessionId = getSessionId2();
|
|
117466
117524
|
if (sessionId) {
|
|
@@ -119776,7 +119834,7 @@ var init_modeValidation2 = __esm(() => {
|
|
|
119776
119834
|
});
|
|
119777
119835
|
|
|
119778
119836
|
// src/tools/PowerShellTool/pathValidation.ts
|
|
119779
|
-
import { homedir as
|
|
119837
|
+
import { homedir as homedir15 } from "os";
|
|
119780
119838
|
import { isAbsolute as isAbsolute16, resolve as resolve20 } from "path";
|
|
119781
119839
|
function matchesParam(paramLower, paramList) {
|
|
119782
119840
|
for (const p of paramList) {
|
|
@@ -119799,7 +119857,7 @@ function formatDirectoryList2(directories) {
|
|
|
119799
119857
|
}
|
|
119800
119858
|
function expandTilde2(filePath) {
|
|
119801
119859
|
if (filePath === "~" || filePath.startsWith("~/") || filePath.startsWith("~\\")) {
|
|
119802
|
-
return
|
|
119860
|
+
return homedir15() + filePath.slice(1);
|
|
119803
119861
|
}
|
|
119804
119862
|
return filePath;
|
|
119805
119863
|
}
|
|
@@ -127467,7 +127525,7 @@ var init_messagePredicates = () => {};
|
|
|
127467
127525
|
// src/utils/pdf.ts
|
|
127468
127526
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
127469
127527
|
import { mkdir as mkdir16, readdir as readdir11, readFile as readFile20 } from "fs/promises";
|
|
127470
|
-
import { join as
|
|
127528
|
+
import { join as join59 } from "path";
|
|
127471
127529
|
async function readPDF(filePath) {
|
|
127472
127530
|
try {
|
|
127473
127531
|
const fs8 = getFsImplementation();
|
|
@@ -127577,9 +127635,9 @@ async function extractPDFPages(filePath, options) {
|
|
|
127577
127635
|
};
|
|
127578
127636
|
}
|
|
127579
127637
|
const uuid = randomUUID10();
|
|
127580
|
-
const outputDir =
|
|
127638
|
+
const outputDir = join59(getToolResultsDir(), `pdf-${uuid}`);
|
|
127581
127639
|
await mkdir16(outputDir, { recursive: true });
|
|
127582
|
-
const prefix =
|
|
127640
|
+
const prefix = join59(outputDir, "page");
|
|
127583
127641
|
const args = ["-jpeg", "-r", "100"];
|
|
127584
127642
|
if (options?.firstPage) {
|
|
127585
127643
|
args.push("-f", String(options.firstPage));
|
|
@@ -127787,13 +127845,13 @@ var init_memoryTypes = __esm(() => {
|
|
|
127787
127845
|
|
|
127788
127846
|
// src/memdir/memoryScan.ts
|
|
127789
127847
|
import { readdir as readdir12 } from "fs/promises";
|
|
127790
|
-
import { basename as basename24, join as
|
|
127848
|
+
import { basename as basename24, join as join60 } from "path";
|
|
127791
127849
|
async function scanMemoryFiles(memoryDir, signal) {
|
|
127792
127850
|
try {
|
|
127793
127851
|
const entries = await readdir12(memoryDir, { recursive: true });
|
|
127794
127852
|
const mdFiles = entries.filter((f) => f.endsWith(".md") && basename24(f) !== "MEMORY.md");
|
|
127795
127853
|
const headerResults = await Promise.allSettled(mdFiles.map(async (relativePath) => {
|
|
127796
|
-
const filePath =
|
|
127854
|
+
const filePath = join60(memoryDir, relativePath);
|
|
127797
127855
|
const { content, mtimeMs } = await readFileInRange(filePath, 0, FRONTMATTER_MAX_LINES, undefined, signal);
|
|
127798
127856
|
const { frontmatter } = parseFrontmatter(content, filePath);
|
|
127799
127857
|
return {
|
|
@@ -127930,7 +127988,9 @@ async function getAttachments(input, toolUseContext, ideSelection, queuedCommand
|
|
|
127930
127988
|
}))),
|
|
127931
127989
|
maybe("agent_listing_delta", () => Promise.resolve(getAgentListingDeltaAttachment(toolUseContext, messages))),
|
|
127932
127990
|
maybe("mcp_instructions_delta", () => Promise.resolve(getMcpInstructionsDeltaAttachment(toolUseContext.options.mcpClients, toolUseContext.options.tools, toolUseContext.options.mainLoopModel, messages))),
|
|
127933
|
-
...[
|
|
127991
|
+
...[
|
|
127992
|
+
maybe("companion_intro", () => Promise.resolve(getCompanionIntroAttachment(messages)))
|
|
127993
|
+
],
|
|
127934
127994
|
maybe("changed_files", () => getChangedFiles(context)),
|
|
127935
127995
|
maybe("nested_memory", () => getNestedMemoryAttachments(context)),
|
|
127936
127996
|
maybe("dynamic_skill", () => getDynamicSkillAttachments(context)),
|
|
@@ -136174,12 +136234,12 @@ var init_queryHelpers = __esm(() => {
|
|
|
136174
136234
|
import { randomUUID as randomUUID14 } from "crypto";
|
|
136175
136235
|
import { rm as rm8 } from "fs";
|
|
136176
136236
|
import { appendFile as appendFile2, copyFile as copyFile7, mkdir as mkdir17 } from "fs/promises";
|
|
136177
|
-
import { dirname as dirname27, isAbsolute as isAbsolute17, join as
|
|
136237
|
+
import { dirname as dirname27, isAbsolute as isAbsolute17, join as join61, relative as relative14 } from "path";
|
|
136178
136238
|
function safeRemoveOverlay(overlayPath) {
|
|
136179
136239
|
rm8(overlayPath, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 }, () => {});
|
|
136180
136240
|
}
|
|
136181
136241
|
function getOverlayPath(id) {
|
|
136182
|
-
return
|
|
136242
|
+
return join61(getClaudeTempDir(), "speculation", String(process.pid), id);
|
|
136183
136243
|
}
|
|
136184
136244
|
function denySpeculation(message, reason) {
|
|
136185
136245
|
return {
|
|
@@ -136191,8 +136251,8 @@ function denySpeculation(message, reason) {
|
|
|
136191
136251
|
async function copyOverlayToMain(overlayPath, writtenPaths, cwd) {
|
|
136192
136252
|
let allCopied = true;
|
|
136193
136253
|
for (const rel of writtenPaths) {
|
|
136194
|
-
const src =
|
|
136195
|
-
const dest =
|
|
136254
|
+
const src = join61(overlayPath, rel);
|
|
136255
|
+
const dest = join61(cwd, rel);
|
|
136196
136256
|
try {
|
|
136197
136257
|
await mkdir17(dirname27(dest), { recursive: true });
|
|
136198
136258
|
await copyFile7(src, dest);
|
|
@@ -136442,17 +136502,17 @@ async function startSpeculation(suggestionText, context, setAppState, isPipeline
|
|
|
136442
136502
|
}
|
|
136443
136503
|
if (isWriteTool) {
|
|
136444
136504
|
if (!writtenPathsRef.current.has(rel)) {
|
|
136445
|
-
const overlayFile =
|
|
136505
|
+
const overlayFile = join61(overlayPath, rel);
|
|
136446
136506
|
await mkdir17(dirname27(overlayFile), { recursive: true });
|
|
136447
136507
|
try {
|
|
136448
|
-
await copyFile7(
|
|
136508
|
+
await copyFile7(join61(cwd, rel), overlayFile);
|
|
136449
136509
|
} catch {}
|
|
136450
136510
|
writtenPathsRef.current.add(rel);
|
|
136451
136511
|
}
|
|
136452
|
-
input = { ...input, [pathKey]:
|
|
136512
|
+
input = { ...input, [pathKey]: join61(overlayPath, rel) };
|
|
136453
136513
|
} else {
|
|
136454
136514
|
if (writtenPathsRef.current.has(rel)) {
|
|
136455
|
-
input = { ...input, [pathKey]:
|
|
136515
|
+
input = { ...input, [pathKey]: join61(overlayPath, rel) };
|
|
136456
136516
|
}
|
|
136457
136517
|
}
|
|
136458
136518
|
logForDebugging(`[Speculation] ${isWriteTool ? "Write" : "Read"} ${filePath} -> ${input[pathKey]}`);
|
|
@@ -138927,16 +138987,16 @@ import {
|
|
|
138927
138987
|
basename as basename25,
|
|
138928
138988
|
dirname as dirname28,
|
|
138929
138989
|
isAbsolute as isAbsolute18,
|
|
138930
|
-
join as
|
|
138990
|
+
join as join62,
|
|
138931
138991
|
sep as pathSep,
|
|
138932
138992
|
relative as relative15
|
|
138933
138993
|
} from "path";
|
|
138934
138994
|
function getSkillsPath(source, dir) {
|
|
138935
138995
|
switch (source) {
|
|
138936
138996
|
case "policySettings":
|
|
138937
|
-
return
|
|
138997
|
+
return join62(getManagedFilePath(), ".claude", dir);
|
|
138938
138998
|
case "userSettings":
|
|
138939
|
-
return
|
|
138999
|
+
return join62(getClaudeConfigHomeDir(), dir);
|
|
138940
139000
|
case "projectSettings":
|
|
138941
139001
|
return `.claude/${dir}`;
|
|
138942
139002
|
case "plugin":
|
|
@@ -139106,8 +139166,8 @@ async function loadSkillsFromSkillsDir(basePath, source) {
|
|
|
139106
139166
|
if (!entry.isDirectory() && !entry.isSymbolicLink()) {
|
|
139107
139167
|
return null;
|
|
139108
139168
|
}
|
|
139109
|
-
const skillDirPath =
|
|
139110
|
-
const skillFilePath =
|
|
139169
|
+
const skillDirPath = join62(basePath, entry.name);
|
|
139170
|
+
const skillFilePath = join62(skillDirPath, "SKILL.md");
|
|
139111
139171
|
let content;
|
|
139112
139172
|
try {
|
|
139113
139173
|
content = await fs8.readFile(skillFilePath, { encoding: "utf-8" });
|
|
@@ -139262,7 +139322,7 @@ async function discoverSkillDirsForPaths(filePaths, cwd) {
|
|
|
139262
139322
|
for (const filePath of filePaths) {
|
|
139263
139323
|
let currentDir = dirname28(filePath);
|
|
139264
139324
|
while (currentDir.startsWith(resolvedCwd + pathSep)) {
|
|
139265
|
-
const skillDir =
|
|
139325
|
+
const skillDir = join62(currentDir, ".claude", "skills");
|
|
139266
139326
|
if (!dynamicSkillDirs.has(skillDir)) {
|
|
139267
139327
|
dynamicSkillDirs.add(skillDir);
|
|
139268
139328
|
try {
|
|
@@ -139387,8 +139447,8 @@ var init_loadSkillsDir = __esm(() => {
|
|
|
139387
139447
|
init_mcpSkillBuilders();
|
|
139388
139448
|
import_ignore3 = __toESM(require_ignore(), 1);
|
|
139389
139449
|
getSkillDirCommands = memoize_default(async (cwd) => {
|
|
139390
|
-
const userSkillsDir =
|
|
139391
|
-
const managedSkillsDir =
|
|
139450
|
+
const userSkillsDir = join62(getClaudeConfigHomeDir(), "skills");
|
|
139451
|
+
const managedSkillsDir = join62(getManagedFilePath(), ".claude", "skills");
|
|
139392
139452
|
const projectSkillsDirs = getProjectDirsUpToHome("skills", cwd);
|
|
139393
139453
|
logForDebugging(`Loading skills from: managed=${managedSkillsDir}, user=${userSkillsDir}, project=[${projectSkillsDirs.join(", ")}]`);
|
|
139394
139454
|
const additionalDirs = getAdditionalDirectoriesForClaudeMd();
|
|
@@ -139399,7 +139459,7 @@ var init_loadSkillsDir = __esm(() => {
|
|
|
139399
139459
|
logForDebugging(`[bare] Skipping skill dir discovery (${additionalDirs.length === 0 ? "no --add-dir" : "projectSettings disabled or skillsLocked"})`);
|
|
139400
139460
|
return [];
|
|
139401
139461
|
}
|
|
139402
|
-
const additionalSkillsNested2 = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(
|
|
139462
|
+
const additionalSkillsNested2 = await Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(join62(dir, ".claude", "skills"), "projectSettings")));
|
|
139403
139463
|
return additionalSkillsNested2.flat().map((s) => s.skill);
|
|
139404
139464
|
}
|
|
139405
139465
|
const [
|
|
@@ -139412,7 +139472,7 @@ var init_loadSkillsDir = __esm(() => {
|
|
|
139412
139472
|
isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_POLICY_SKILLS) ? Promise.resolve([]) : loadSkillsFromSkillsDir(managedSkillsDir, "policySettings"),
|
|
139413
139473
|
isSettingSourceEnabled("userSettings") && !skillsLocked ? loadSkillsFromSkillsDir(userSkillsDir, "userSettings") : Promise.resolve([]),
|
|
139414
139474
|
projectSettingsEnabled ? Promise.all(projectSkillsDirs.map((dir) => loadSkillsFromSkillsDir(dir, "projectSettings"))) : Promise.resolve([]),
|
|
139415
|
-
projectSettingsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(
|
|
139475
|
+
projectSettingsEnabled ? Promise.all(additionalDirs.map((dir) => loadSkillsFromSkillsDir(join62(dir, ".claude", "skills"), "projectSettings"))) : Promise.resolve([]),
|
|
139416
139476
|
skillsLocked ? Promise.resolve([]) : loadSkillsFromCommandsDir(cwd)
|
|
139417
139477
|
]);
|
|
139418
139478
|
const allSkillsWithPaths = [
|
|
@@ -141901,7 +141961,7 @@ var init_postCompactCleanup = __esm(() => {
|
|
|
141901
141961
|
|
|
141902
141962
|
// src/services/SessionMemory/prompts.ts
|
|
141903
141963
|
import { readFile as readFile22 } from "fs/promises";
|
|
141904
|
-
import { join as
|
|
141964
|
+
import { join as join64 } from "path";
|
|
141905
141965
|
function getDefaultUpdatePrompt() {
|
|
141906
141966
|
return `IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "note-taking", "session notes extraction", or these update instructions in the notes content.
|
|
141907
141967
|
|
|
@@ -141942,7 +142002,7 @@ You ONLY update the actual content that comes AFTER these two preserved lines. T
|
|
|
141942
142002
|
REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edits. Only include insights from the actual user conversation, never from these note-taking instructions. Do not delete or change section headers or italic _section descriptions_.`;
|
|
141943
142003
|
}
|
|
141944
142004
|
async function loadSessionMemoryTemplate() {
|
|
141945
|
-
const templatePath =
|
|
142005
|
+
const templatePath = join64(getClaudeConfigHomeDir(), "session-memory", "config", "template.md");
|
|
141946
142006
|
try {
|
|
141947
142007
|
return await readFile22(templatePath, { encoding: "utf-8" });
|
|
141948
142008
|
} catch (e) {
|
|
@@ -141955,7 +142015,7 @@ async function loadSessionMemoryTemplate() {
|
|
|
141955
142015
|
}
|
|
141956
142016
|
}
|
|
141957
142017
|
async function loadSessionMemoryPrompt() {
|
|
141958
|
-
const promptPath =
|
|
142018
|
+
const promptPath = join64(getClaudeConfigHomeDir(), "session-memory", "config", "prompt.md");
|
|
141959
142019
|
try {
|
|
141960
142020
|
return await readFile22(promptPath, { encoding: "utf-8" });
|
|
141961
142021
|
} catch (e) {
|
|
@@ -142667,7 +142727,7 @@ async function countBuiltInToolTokens(tools, getToolPermissionContext, agentInfo
|
|
|
142667
142727
|
systemToolDetails: []
|
|
142668
142728
|
};
|
|
142669
142729
|
}
|
|
142670
|
-
const { isToolSearchEnabled: isToolSearchEnabled2 } = await import("./chunk-
|
|
142730
|
+
const { isToolSearchEnabled: isToolSearchEnabled2 } = await import("./chunk-8n2ha6be.js");
|
|
142671
142731
|
const { isDeferredTool: isDeferredTool2 } = await import("./chunk-dekk6f4c.js");
|
|
142672
142732
|
const isDeferred = await isToolSearchEnabled2(model ?? "", tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeBuiltIn");
|
|
142673
142733
|
const alwaysLoadedTools = builtInTools.filter((t) => !isDeferredTool2(t));
|
|
@@ -142802,7 +142862,7 @@ async function countMcpToolTokens(tools, getToolPermissionContext, agentInfo, mo
|
|
|
142802
142862
|
}))));
|
|
142803
142863
|
const estimateTotal = estimates.reduce((s, e) => s + e, 0) || 1;
|
|
142804
142864
|
const mcpToolTokensByTool = estimates.map((e) => Math.round(e / estimateTotal * totalTokens));
|
|
142805
|
-
const { isToolSearchEnabled: isToolSearchEnabled2 } = await import("./chunk-
|
|
142865
|
+
const { isToolSearchEnabled: isToolSearchEnabled2 } = await import("./chunk-8n2ha6be.js");
|
|
142806
142866
|
const { isDeferredTool: isDeferredTool2 } = await import("./chunk-dekk6f4c.js");
|
|
142807
142867
|
const isDeferred = await isToolSearchEnabled2(model, tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeMcp");
|
|
142808
142868
|
const loadedMcpToolNames = new Set;
|
|
@@ -143563,7 +143623,7 @@ var init_toolSearch = __esm(() => {
|
|
|
143563
143623
|
// src/services/vcr.ts
|
|
143564
143624
|
import { createHash as createHash14, randomUUID as randomUUID16 } from "crypto";
|
|
143565
143625
|
import { mkdir as mkdir18, readFile as readFile23, writeFile as writeFile22 } from "fs/promises";
|
|
143566
|
-
import { dirname as dirname29, join as
|
|
143626
|
+
import { dirname as dirname29, join as join65 } from "path";
|
|
143567
143627
|
function shouldUseVCR() {
|
|
143568
143628
|
if (false) {}
|
|
143569
143629
|
if (process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.FORCE_VCR)) {
|
|
@@ -143576,7 +143636,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
143576
143636
|
return await f();
|
|
143577
143637
|
}
|
|
143578
143638
|
const hash = createHash14("sha1").update(jsonStringify(input)).digest("hex").slice(0, 12);
|
|
143579
|
-
const filename =
|
|
143639
|
+
const filename = join65(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${fixtureName}-${hash}.json`);
|
|
143580
143640
|
try {
|
|
143581
143641
|
const cached2 = jsonParse(await readFile23(filename, { encoding: "utf8" }));
|
|
143582
143642
|
return cached2;
|
|
@@ -143610,7 +143670,7 @@ async function withVCR(messages, f) {
|
|
|
143610
143670
|
return true;
|
|
143611
143671
|
}));
|
|
143612
143672
|
const dehydratedInput = mapMessages(messagesForAPI.map((_2) => _2.message.content), dehydrateValue);
|
|
143613
|
-
const filename =
|
|
143673
|
+
const filename = join65(process.env.CLAUDE_CODE_TEST_FIXTURES_ROOT ?? getCwd(), `fixtures/${dehydratedInput.map((_2) => createHash14("sha1").update(jsonStringify(_2)).digest("hex").slice(0, 6)).join("-")}.json`);
|
|
143614
143674
|
try {
|
|
143615
143675
|
const cached2 = jsonParse(await readFile23(filename, { encoding: "utf8" }));
|
|
143616
143676
|
cached2.output.forEach(addCachedCostToTotalSessionCost);
|
|
@@ -146426,7 +146486,7 @@ var init_xaaIdpLogin = __esm(() => {
|
|
|
146426
146486
|
import { createHash as createHash15, randomBytes as randomBytes12, randomUUID as randomUUID17 } from "crypto";
|
|
146427
146487
|
import { mkdir as mkdir19 } from "fs/promises";
|
|
146428
146488
|
import { createServer as createServer6 } from "http";
|
|
146429
|
-
import { join as
|
|
146489
|
+
import { join as join66 } from "path";
|
|
146430
146490
|
import { parse as parse7 } from "url";
|
|
146431
146491
|
function redactSensitiveUrlParams(url2) {
|
|
146432
146492
|
try {
|
|
@@ -147538,7 +147598,7 @@ class ClaudeAuthProvider {
|
|
|
147538
147598
|
const claudeDir = getClaudeConfigHomeDir();
|
|
147539
147599
|
await mkdir19(claudeDir, { recursive: true });
|
|
147540
147600
|
const sanitizedKey = serverKey.replace(/[^a-zA-Z0-9]/g, "_");
|
|
147541
|
-
const lockfilePath =
|
|
147601
|
+
const lockfilePath = join66(claudeDir, `mcp-refresh-${sanitizedKey}.lock`);
|
|
147542
147602
|
let release;
|
|
147543
147603
|
for (let retry = 0;retry < MAX_LOCK_RETRIES; retry++) {
|
|
147544
147604
|
try {
|
|
@@ -149161,7 +149221,7 @@ var init_toolRendering = __esm(() => {
|
|
|
149161
149221
|
|
|
149162
149222
|
// src/services/mcp/client.ts
|
|
149163
149223
|
import { mkdir as mkdir20, readFile as readFile24, unlink as unlink11, writeFile as writeFile23 } from "fs/promises";
|
|
149164
|
-
import { dirname as dirname30, join as
|
|
149224
|
+
import { dirname as dirname30, join as join67 } from "path";
|
|
149165
149225
|
function isMcpSessionExpiredError(error) {
|
|
149166
149226
|
const httpStatus = "code" in error ? error.code : undefined;
|
|
149167
149227
|
if (httpStatus !== 404) {
|
|
@@ -149173,7 +149233,7 @@ function getMcpToolTimeoutMs() {
|
|
|
149173
149233
|
return parseInt(process.env.MCP_TOOL_TIMEOUT || "", 10) || DEFAULT_MCP_TOOL_TIMEOUT_MS;
|
|
149174
149234
|
}
|
|
149175
149235
|
function getMcpAuthCachePath() {
|
|
149176
|
-
return
|
|
149236
|
+
return join67(getClaudeConfigHomeDir(), "mcp-needs-auth-cache.json");
|
|
149177
149237
|
}
|
|
149178
149238
|
function getMcpAuthCache() {
|
|
149179
149239
|
if (!authCachePromise) {
|
|
@@ -150324,7 +150384,7 @@ var init_client5 = __esm(() => {
|
|
|
150324
150384
|
transport = new StreamableHTTPClientTransport(new URL(proxyUrl), transportOptions);
|
|
150325
150385
|
logMCPDebug(name, `claude.ai proxy transport created successfully`);
|
|
150326
150386
|
} else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name)) {
|
|
150327
|
-
const { createChromeContext } = await import("./chunk-
|
|
150387
|
+
const { createChromeContext } = await import("./chunk-8tatkkcx.js");
|
|
150328
150388
|
const { createClaudeForChromeMcpServer } = await import("./chunk-bm1qb16p.js");
|
|
150329
150389
|
const { createLinkedTransportPair } = await import("./chunk-1h2famwb.js");
|
|
150330
150390
|
const context = createChromeContext(serverRef.env);
|
|
@@ -155392,8 +155452,8 @@ var init_permissionSetup = __esm(() => {
|
|
|
155392
155452
|
// src/utils/markdownConfigLoader.ts
|
|
155393
155453
|
import { statSync as statSync2 } from "fs";
|
|
155394
155454
|
import { lstat as lstat3, readdir as readdir15, readFile as readFile25, realpath as realpath7, stat as stat23 } from "fs/promises";
|
|
155395
|
-
import { homedir as
|
|
155396
|
-
import { dirname as dirname32, join as
|
|
155455
|
+
import { homedir as homedir16 } from "os";
|
|
155456
|
+
import { dirname as dirname32, join as join68, resolve as resolve25, sep as sep16 } from "path";
|
|
155397
155457
|
function extractDescriptionFromMarkdown(content, defaultDescription = "Custom item") {
|
|
155398
155458
|
const lines = content.split(`
|
|
155399
155459
|
`);
|
|
@@ -155475,7 +155535,7 @@ function resolveStopBoundary(cwd) {
|
|
|
155475
155535
|
return cwdGitRoot;
|
|
155476
155536
|
}
|
|
155477
155537
|
function getProjectDirsUpToHome(subdir, cwd) {
|
|
155478
|
-
const home = resolve25(
|
|
155538
|
+
const home = resolve25(homedir16()).normalize("NFC");
|
|
155479
155539
|
const gitRoot = resolveStopBoundary(cwd);
|
|
155480
155540
|
let current = resolve25(cwd);
|
|
155481
155541
|
const dirs = [];
|
|
@@ -155483,7 +155543,7 @@ function getProjectDirsUpToHome(subdir, cwd) {
|
|
|
155483
155543
|
if (normalizePathForComparison(current) === normalizePathForComparison(home)) {
|
|
155484
155544
|
break;
|
|
155485
155545
|
}
|
|
155486
|
-
const claudeSubdir =
|
|
155546
|
+
const claudeSubdir = join68(current, ".claude", subdir);
|
|
155487
155547
|
try {
|
|
155488
155548
|
statSync2(claudeSubdir);
|
|
155489
155549
|
dirs.push(claudeSubdir);
|
|
@@ -155530,7 +155590,7 @@ async function findMarkdownFilesNative(dir, signal) {
|
|
|
155530
155590
|
if (signal.aborted) {
|
|
155531
155591
|
break;
|
|
155532
155592
|
}
|
|
155533
|
-
const fullPath =
|
|
155593
|
+
const fullPath = join68(currentDir, entry.name);
|
|
155534
155594
|
try {
|
|
155535
155595
|
if (entry.isSymbolicLink()) {
|
|
155536
155596
|
try {
|
|
@@ -155616,16 +155676,16 @@ var init_markdownConfigLoader = __esm(() => {
|
|
|
155616
155676
|
];
|
|
155617
155677
|
loadMarkdownFilesForSubdir = memoize_default(async function(subdir, cwd) {
|
|
155618
155678
|
const searchStartTime = Date.now();
|
|
155619
|
-
const userDir =
|
|
155620
|
-
const managedDir =
|
|
155679
|
+
const userDir = join68(getClaudeConfigHomeDir(), subdir);
|
|
155680
|
+
const managedDir = join68(getManagedFilePath(), ".claude", subdir);
|
|
155621
155681
|
const projectDirs = getProjectDirsUpToHome(subdir, cwd);
|
|
155622
155682
|
const gitRoot = findGitRoot(cwd);
|
|
155623
155683
|
const canonicalRoot = findCanonicalGitRoot(cwd);
|
|
155624
155684
|
if (gitRoot && canonicalRoot && canonicalRoot !== gitRoot) {
|
|
155625
|
-
const worktreeSubdir = normalizePathForComparison(
|
|
155685
|
+
const worktreeSubdir = normalizePathForComparison(join68(gitRoot, ".claude", subdir));
|
|
155626
155686
|
const worktreeHasSubdir = projectDirs.some((dir) => normalizePathForComparison(dir) === worktreeSubdir);
|
|
155627
155687
|
if (!worktreeHasSubdir) {
|
|
155628
|
-
const mainClaudeSubdir =
|
|
155688
|
+
const mainClaudeSubdir = join68(canonicalRoot, ".claude", subdir);
|
|
155629
155689
|
if (!projectDirs.includes(mainClaudeSubdir)) {
|
|
155630
155690
|
projectDirs.push(mainClaudeSubdir);
|
|
155631
155691
|
}
|
|
@@ -159610,7 +159670,7 @@ var init_types13 = __esm(() => {
|
|
|
159610
159670
|
import { createHash as createHash17 } from "crypto";
|
|
159611
159671
|
import { readFileSync as fsReadFileSync } from "fs";
|
|
159612
159672
|
import { unlink as unlink12, writeFile as writeFile24 } from "fs/promises";
|
|
159613
|
-
import { join as
|
|
159673
|
+
import { join as join69 } from "path";
|
|
159614
159674
|
function isNodeError(e) {
|
|
159615
159675
|
return e instanceof Error;
|
|
159616
159676
|
}
|
|
@@ -159638,7 +159698,7 @@ function initializePolicyLimitsLoadingPromise() {
|
|
|
159638
159698
|
}
|
|
159639
159699
|
}
|
|
159640
159700
|
function getCachePath() {
|
|
159641
|
-
return
|
|
159701
|
+
return join69(getClaudeConfigHomeDir(), CACHE_FILENAME);
|
|
159642
159702
|
}
|
|
159643
159703
|
function getPolicyLimitsEndpoint() {
|
|
159644
159704
|
return `${getOauthConfig().BASE_API_URL}/api/claude_code/policy_limits`;
|
|
@@ -160017,7 +160077,7 @@ var init_feedback = __esm(() => {
|
|
|
160017
160077
|
description: `Submit feedback about Claude Code`,
|
|
160018
160078
|
argumentHint: "[report]",
|
|
160019
160079
|
isEnabled: () => !(isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) || isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) || isEnvTruthy(process.env.DISABLE_FEEDBACK_COMMAND) || isEnvTruthy(process.env.DISABLE_BUG_COMMAND) || isEssentialTrafficOnly() || process.env.USER_TYPE === "ant" || !isPolicyAllowed("allow_product_feedback")),
|
|
160020
|
-
load: () => import("./chunk-
|
|
160080
|
+
load: () => import("./chunk-mw0r22e0.js")
|
|
160021
160081
|
};
|
|
160022
160082
|
feedback_default = feedback;
|
|
160023
160083
|
});
|
|
@@ -160031,7 +160091,7 @@ var init_clear = __esm(() => {
|
|
|
160031
160091
|
description: "Clear conversation history and free up context",
|
|
160032
160092
|
aliases: ["reset", "new"],
|
|
160033
160093
|
supportsNonInteractive: false,
|
|
160034
|
-
load: () => import("./chunk-
|
|
160094
|
+
load: () => import("./chunk-tb1cxps9.js")
|
|
160035
160095
|
};
|
|
160036
160096
|
clear_default = clear;
|
|
160037
160097
|
});
|
|
@@ -160045,7 +160105,7 @@ var init_color2 = __esm(() => {
|
|
|
160045
160105
|
description: "Set the prompt bar color for this session",
|
|
160046
160106
|
immediate: true,
|
|
160047
160107
|
argumentHint: "<color|default>",
|
|
160048
|
-
load: () => import("./chunk-
|
|
160108
|
+
load: () => import("./chunk-2zkxejec.js")
|
|
160049
160109
|
};
|
|
160050
160110
|
color_default = color2;
|
|
160051
160111
|
});
|
|
@@ -160145,7 +160205,7 @@ var init_copy = __esm(() => {
|
|
|
160145
160205
|
type: "local-jsx",
|
|
160146
160206
|
name: "copy",
|
|
160147
160207
|
description: "Copy Claude's last response to clipboard (or /copy N for the Nth-latest)",
|
|
160148
|
-
load: () => import("./chunk-
|
|
160208
|
+
load: () => import("./chunk-3yqfvnbk.js")
|
|
160149
160209
|
};
|
|
160150
160210
|
copy_default = copy;
|
|
160151
160211
|
});
|
|
@@ -160172,7 +160232,7 @@ var init_desktop = __esm(() => {
|
|
|
160172
160232
|
get isHidden() {
|
|
160173
160233
|
return !isSupportedPlatform2();
|
|
160174
160234
|
},
|
|
160175
|
-
load: () => import("./chunk-
|
|
160235
|
+
load: () => import("./chunk-2gmbwmx3.js")
|
|
160176
160236
|
};
|
|
160177
160237
|
desktop_default = desktop;
|
|
160178
160238
|
});
|
|
@@ -160335,7 +160395,7 @@ var init_compact2 = __esm(() => {
|
|
|
160335
160395
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_COMPACT),
|
|
160336
160396
|
supportsNonInteractive: true,
|
|
160337
160397
|
argumentHint: "<optional custom summarization instructions>",
|
|
160338
|
-
load: () => import("./chunk-
|
|
160398
|
+
load: () => import("./chunk-ztajzkte.js")
|
|
160339
160399
|
};
|
|
160340
160400
|
compact_default = compact;
|
|
160341
160401
|
});
|
|
@@ -160348,7 +160408,7 @@ var init_config7 = __esm(() => {
|
|
|
160348
160408
|
type: "local-jsx",
|
|
160349
160409
|
name: "config",
|
|
160350
160410
|
description: "Open config panel",
|
|
160351
|
-
load: () => import("./chunk-
|
|
160411
|
+
load: () => import("./chunk-3rnadz4s.js")
|
|
160352
160412
|
};
|
|
160353
160413
|
config_default = config2;
|
|
160354
160414
|
});
|
|
@@ -160362,7 +160422,7 @@ var init_context3 = __esm(() => {
|
|
|
160362
160422
|
description: "Visualize current context usage as a colored grid",
|
|
160363
160423
|
isEnabled: () => !getIsNonInteractiveSession(),
|
|
160364
160424
|
type: "local-jsx",
|
|
160365
|
-
load: () => import("./chunk-
|
|
160425
|
+
load: () => import("./chunk-7n58ej6k.js")
|
|
160366
160426
|
};
|
|
160367
160427
|
contextNonInteractive = {
|
|
160368
160428
|
type: "local",
|
|
@@ -160375,7 +160435,7 @@ var init_context3 = __esm(() => {
|
|
|
160375
160435
|
isEnabled() {
|
|
160376
160436
|
return getIsNonInteractiveSession();
|
|
160377
160437
|
},
|
|
160378
|
-
load: () => import("./chunk-
|
|
160438
|
+
load: () => import("./chunk-15mwdsdz.js")
|
|
160379
160439
|
};
|
|
160380
160440
|
});
|
|
160381
160441
|
|
|
@@ -160394,7 +160454,7 @@ var init_cost = __esm(() => {
|
|
|
160394
160454
|
return isClaudeAISubscriber();
|
|
160395
160455
|
},
|
|
160396
160456
|
supportsNonInteractive: true,
|
|
160397
|
-
load: () => import("./chunk-
|
|
160457
|
+
load: () => import("./chunk-8peet6rc.js")
|
|
160398
160458
|
};
|
|
160399
160459
|
cost_default = cost;
|
|
160400
160460
|
});
|
|
@@ -160406,7 +160466,7 @@ var init_diff2 = __esm(() => {
|
|
|
160406
160466
|
type: "local-jsx",
|
|
160407
160467
|
name: "diff",
|
|
160408
160468
|
description: "View uncommitted changes and per-turn diffs",
|
|
160409
|
-
load: () => import("./chunk-
|
|
160469
|
+
load: () => import("./chunk-5h5kwgh5.js")
|
|
160410
160470
|
};
|
|
160411
160471
|
});
|
|
160412
160472
|
|
|
@@ -160425,7 +160485,7 @@ var init_doctor = __esm(() => {
|
|
|
160425
160485
|
description: "Diagnose and verify your Claude Code installation and settings",
|
|
160426
160486
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_DOCTOR_COMMAND),
|
|
160427
160487
|
type: "local-jsx",
|
|
160428
|
-
load: () => import("./chunk-
|
|
160488
|
+
load: () => import("./chunk-586r6qbr.js")
|
|
160429
160489
|
};
|
|
160430
160490
|
doctor_default = doctor;
|
|
160431
160491
|
});
|
|
@@ -160437,7 +160497,7 @@ var init_memory = __esm(() => {
|
|
|
160437
160497
|
type: "local-jsx",
|
|
160438
160498
|
name: "memory",
|
|
160439
160499
|
description: "Edit Claude memory files",
|
|
160440
|
-
load: () => import("./chunk-
|
|
160500
|
+
load: () => import("./chunk-adrmhzz1.js")
|
|
160441
160501
|
};
|
|
160442
160502
|
memory_default = memory;
|
|
160443
160503
|
});
|
|
@@ -160449,7 +160509,7 @@ var init_help = __esm(() => {
|
|
|
160449
160509
|
type: "local-jsx",
|
|
160450
160510
|
name: "help",
|
|
160451
160511
|
description: "Show help and available commands",
|
|
160452
|
-
load: () => import("./chunk-
|
|
160512
|
+
load: () => import("./chunk-v18v4x5y.js")
|
|
160453
160513
|
};
|
|
160454
160514
|
help_default = help;
|
|
160455
160515
|
});
|
|
@@ -160462,7 +160522,7 @@ var init_ide2 = __esm(() => {
|
|
|
160462
160522
|
name: "ide",
|
|
160463
160523
|
description: "Manage IDE integrations and show status",
|
|
160464
160524
|
argumentHint: "[open]",
|
|
160465
|
-
load: () => import("./chunk-
|
|
160525
|
+
load: () => import("./chunk-4mwe7zph.js")
|
|
160466
160526
|
};
|
|
160467
160527
|
ide_default = ide;
|
|
160468
160528
|
});
|
|
@@ -160787,7 +160847,7 @@ var init_keybindings = __esm(() => {
|
|
|
160787
160847
|
isEnabled: () => isKeybindingCustomizationEnabled(),
|
|
160788
160848
|
supportsNonInteractive: false,
|
|
160789
160849
|
type: "local",
|
|
160790
|
-
load: () => import("./chunk-
|
|
160850
|
+
load: () => import("./chunk-72gh234y.js")
|
|
160791
160851
|
};
|
|
160792
160852
|
keybindings_default = keybindings;
|
|
160793
160853
|
});
|
|
@@ -160798,7 +160858,7 @@ var login_default = () => ({
|
|
|
160798
160858
|
name: "login",
|
|
160799
160859
|
description: hasAnthropicApiKeyAuth() ? "Switch Anthropic accounts" : "Sign in with your Anthropic account",
|
|
160800
160860
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGIN_COMMAND),
|
|
160801
|
-
load: () => import("./chunk-
|
|
160861
|
+
load: () => import("./chunk-jtfxaxc4.js")
|
|
160802
160862
|
});
|
|
160803
160863
|
var init_login = __esm(() => {
|
|
160804
160864
|
init_auth();
|
|
@@ -160814,7 +160874,7 @@ var init_logout2 = __esm(() => {
|
|
|
160814
160874
|
name: "logout",
|
|
160815
160875
|
description: "Sign out from your Anthropic account",
|
|
160816
160876
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGOUT_COMMAND),
|
|
160817
|
-
load: () => import("./chunk-
|
|
160877
|
+
load: () => import("./chunk-5de2xjgp.js")
|
|
160818
160878
|
};
|
|
160819
160879
|
});
|
|
160820
160880
|
|
|
@@ -160828,7 +160888,7 @@ var init_install_github_app = __esm(() => {
|
|
|
160828
160888
|
description: "Set up Claude GitHub Actions for a repository",
|
|
160829
160889
|
availability: ["claude-ai", "console"],
|
|
160830
160890
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_INSTALL_GITHUB_APP_COMMAND),
|
|
160831
|
-
load: () => import("./chunk-
|
|
160891
|
+
load: () => import("./chunk-e11xmx2q.js")
|
|
160832
160892
|
};
|
|
160833
160893
|
install_github_app_default = installGitHubApp;
|
|
160834
160894
|
});
|
|
@@ -160862,7 +160922,7 @@ var init_mcp = __esm(() => {
|
|
|
160862
160922
|
description: "Manage MCP servers",
|
|
160863
160923
|
immediate: true,
|
|
160864
160924
|
argumentHint: "[enable|disable [server-name]]",
|
|
160865
|
-
load: () => import("./chunk-
|
|
160925
|
+
load: () => import("./chunk-tkrptwm3.js")
|
|
160866
160926
|
};
|
|
160867
160927
|
mcp_default = mcp;
|
|
160868
160928
|
});
|
|
@@ -161005,7 +161065,7 @@ var init_rename = __esm(() => {
|
|
|
161005
161065
|
description: "Rename the current conversation",
|
|
161006
161066
|
immediate: true,
|
|
161007
161067
|
argumentHint: "[name]",
|
|
161008
|
-
load: () => import("./chunk-
|
|
161068
|
+
load: () => import("./chunk-q1r26r4a.js")
|
|
161009
161069
|
};
|
|
161010
161070
|
rename_default = rename7;
|
|
161011
161071
|
});
|
|
@@ -161019,7 +161079,7 @@ var init_resume = __esm(() => {
|
|
|
161019
161079
|
description: "Resume a previous conversation",
|
|
161020
161080
|
aliases: ["continue"],
|
|
161021
161081
|
argumentHint: "[conversation id or search term]",
|
|
161022
|
-
load: () => import("./chunk-
|
|
161082
|
+
load: () => import("./chunk-69ppfd59.js")
|
|
161023
161083
|
};
|
|
161024
161084
|
resume_default = resume;
|
|
161025
161085
|
});
|
|
@@ -161075,7 +161135,7 @@ var init_review = __esm(() => {
|
|
|
161075
161135
|
name: "ultrareview",
|
|
161076
161136
|
description: `~10\u201320 min \xB7 Finds and verifies bugs in your branch. Runs in Claude Code on the web. See ${CCR_TERMS_URL}`,
|
|
161077
161137
|
isEnabled: () => isUltrareviewEnabled(),
|
|
161078
|
-
load: () => import("./chunk-
|
|
161138
|
+
load: () => import("./chunk-cy4kbxzp.js")
|
|
161079
161139
|
};
|
|
161080
161140
|
review_default = review;
|
|
161081
161141
|
});
|
|
@@ -161093,7 +161153,7 @@ var init_session = __esm(() => {
|
|
|
161093
161153
|
get isHidden() {
|
|
161094
161154
|
return !getIsRemoteMode();
|
|
161095
161155
|
},
|
|
161096
|
-
load: () => import("./chunk-
|
|
161156
|
+
load: () => import("./chunk-vweq3mqa.js")
|
|
161097
161157
|
};
|
|
161098
161158
|
session_default = session;
|
|
161099
161159
|
});
|
|
@@ -161111,7 +161171,7 @@ var init_skills = __esm(() => {
|
|
|
161111
161171
|
type: "local-jsx",
|
|
161112
161172
|
name: "skills",
|
|
161113
161173
|
description: "List available skills",
|
|
161114
|
-
load: () => import("./chunk-
|
|
161174
|
+
load: () => import("./chunk-4nwbxnyn.js")
|
|
161115
161175
|
};
|
|
161116
161176
|
skills_default = skills;
|
|
161117
161177
|
});
|
|
@@ -161124,7 +161184,7 @@ var init_status2 = __esm(() => {
|
|
|
161124
161184
|
name: "status",
|
|
161125
161185
|
description: "Show Claude Code status including version, model, account, API connectivity, and tool statuses",
|
|
161126
161186
|
immediate: true,
|
|
161127
|
-
load: () => import("./chunk-
|
|
161187
|
+
load: () => import("./chunk-tsxafbb3.js")
|
|
161128
161188
|
};
|
|
161129
161189
|
status_default = status;
|
|
161130
161190
|
});
|
|
@@ -161137,7 +161197,7 @@ var init_tasks3 = __esm(() => {
|
|
|
161137
161197
|
name: "tasks",
|
|
161138
161198
|
aliases: ["bashes"],
|
|
161139
161199
|
description: "List and manage background tasks",
|
|
161140
|
-
load: () => import("./chunk-
|
|
161200
|
+
load: () => import("./chunk-62nnmv4a.js")
|
|
161141
161201
|
};
|
|
161142
161202
|
tasks_default = tasks;
|
|
161143
161203
|
});
|
|
@@ -161414,7 +161474,7 @@ var init_usage = __esm(() => {
|
|
|
161414
161474
|
name: "usage",
|
|
161415
161475
|
description: "Show plan usage limits",
|
|
161416
161476
|
availability: ["claude-ai"],
|
|
161417
|
-
load: () => import("./chunk-
|
|
161477
|
+
load: () => import("./chunk-w9cde3tr.js")
|
|
161418
161478
|
};
|
|
161419
161479
|
});
|
|
161420
161480
|
|
|
@@ -161425,7 +161485,7 @@ var init_theme2 = __esm(() => {
|
|
|
161425
161485
|
type: "local-jsx",
|
|
161426
161486
|
name: "theme",
|
|
161427
161487
|
description: "Change the theme",
|
|
161428
|
-
load: () => import("./chunk-
|
|
161488
|
+
load: () => import("./chunk-a99739wq.js")
|
|
161429
161489
|
};
|
|
161430
161490
|
theme_default = theme;
|
|
161431
161491
|
});
|
|
@@ -161452,7 +161512,7 @@ var init_thinkback = __esm(() => {
|
|
|
161452
161512
|
name: "think-back",
|
|
161453
161513
|
description: "Your 2025 Claude Code Year in Review",
|
|
161454
161514
|
isEnabled: () => checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_thinkback"),
|
|
161455
|
-
load: () => import("./chunk-
|
|
161515
|
+
load: () => import("./chunk-68700xxw.js")
|
|
161456
161516
|
};
|
|
161457
161517
|
thinkback_default = thinkback;
|
|
161458
161518
|
});
|
|
@@ -161468,7 +161528,7 @@ var init_thinkback_play = __esm(() => {
|
|
|
161468
161528
|
isEnabled: () => checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_thinkback"),
|
|
161469
161529
|
isHidden: true,
|
|
161470
161530
|
supportsNonInteractive: false,
|
|
161471
|
-
load: () => import("./chunk-
|
|
161531
|
+
load: () => import("./chunk-jy2284h5.js")
|
|
161472
161532
|
};
|
|
161473
161533
|
thinkback_play_default = thinkbackPlay;
|
|
161474
161534
|
});
|
|
@@ -161481,7 +161541,7 @@ var init_permissions3 = __esm(() => {
|
|
|
161481
161541
|
name: "permissions",
|
|
161482
161542
|
aliases: ["allowed-tools"],
|
|
161483
161543
|
description: "Manage allow & deny tool permission rules",
|
|
161484
|
-
load: () => import("./chunk-
|
|
161544
|
+
load: () => import("./chunk-wwpjfxe9.js")
|
|
161485
161545
|
};
|
|
161486
161546
|
permissions_default = permissions;
|
|
161487
161547
|
});
|
|
@@ -161494,7 +161554,7 @@ var init_plan = __esm(() => {
|
|
|
161494
161554
|
name: "plan",
|
|
161495
161555
|
description: "Enable plan mode or view the current session plan",
|
|
161496
161556
|
argumentHint: "[open|<description>]",
|
|
161497
|
-
load: () => import("./chunk-
|
|
161557
|
+
load: () => import("./chunk-0g6nvqtt.js")
|
|
161498
161558
|
};
|
|
161499
161559
|
plan_default = plan;
|
|
161500
161560
|
});
|
|
@@ -161527,7 +161587,7 @@ var init_fast = __esm(() => {
|
|
|
161527
161587
|
get immediate() {
|
|
161528
161588
|
return shouldInferenceConfigCommandBeImmediate();
|
|
161529
161589
|
},
|
|
161530
|
-
load: () => import("./chunk-
|
|
161590
|
+
load: () => import("./chunk-mpq43p6q.js")
|
|
161531
161591
|
};
|
|
161532
161592
|
fast_default = fast;
|
|
161533
161593
|
});
|
|
@@ -161565,7 +161625,7 @@ var init_privacy_settings = __esm(() => {
|
|
|
161565
161625
|
isEnabled: () => {
|
|
161566
161626
|
return isConsumerSubscriber();
|
|
161567
161627
|
},
|
|
161568
|
-
load: () => import("./chunk-
|
|
161628
|
+
load: () => import("./chunk-pten4eyr.js")
|
|
161569
161629
|
};
|
|
161570
161630
|
privacy_settings_default = privacySettings;
|
|
161571
161631
|
});
|
|
@@ -161578,7 +161638,7 @@ var init_hooks = __esm(() => {
|
|
|
161578
161638
|
name: "hooks",
|
|
161579
161639
|
description: "View hook configurations for tool events",
|
|
161580
161640
|
immediate: true,
|
|
161581
|
-
load: () => import("./chunk-
|
|
161641
|
+
load: () => import("./chunk-yc4em7tw.js")
|
|
161582
161642
|
};
|
|
161583
161643
|
hooks_default = hooks;
|
|
161584
161644
|
});
|
|
@@ -161606,7 +161666,7 @@ var init_branch = __esm(() => {
|
|
|
161606
161666
|
aliases: ["fork"],
|
|
161607
161667
|
description: "Create a branch of the current conversation at this point",
|
|
161608
161668
|
argumentHint: "[name]",
|
|
161609
|
-
load: () => import("./chunk-
|
|
161669
|
+
load: () => import("./chunk-5weymp1w.js")
|
|
161610
161670
|
};
|
|
161611
161671
|
branch_default = branch;
|
|
161612
161672
|
});
|
|
@@ -161618,7 +161678,7 @@ var init_agents = __esm(() => {
|
|
|
161618
161678
|
type: "local-jsx",
|
|
161619
161679
|
name: "agents",
|
|
161620
161680
|
description: "Manage agent configurations",
|
|
161621
|
-
load: () => import("./chunk-
|
|
161681
|
+
load: () => import("./chunk-b9xh216k.js")
|
|
161622
161682
|
};
|
|
161623
161683
|
agents_default = agents;
|
|
161624
161684
|
});
|
|
@@ -161632,7 +161692,7 @@ var init_plugin2 = __esm(() => {
|
|
|
161632
161692
|
aliases: ["plugins", "marketplace"],
|
|
161633
161693
|
description: "Manage Claude Code plugins",
|
|
161634
161694
|
immediate: true,
|
|
161635
|
-
load: () => import("./chunk-
|
|
161695
|
+
load: () => import("./chunk-sw8fbwtc.js")
|
|
161636
161696
|
};
|
|
161637
161697
|
plugin_default = plugin;
|
|
161638
161698
|
});
|
|
@@ -161645,7 +161705,7 @@ var init_reload_plugins = __esm(() => {
|
|
|
161645
161705
|
name: "reload-plugins",
|
|
161646
161706
|
description: "Activate pending plugin changes in the current session",
|
|
161647
161707
|
supportsNonInteractive: false,
|
|
161648
|
-
load: () => import("./chunk-
|
|
161708
|
+
load: () => import("./chunk-7hs4mjk8.js")
|
|
161649
161709
|
};
|
|
161650
161710
|
reload_plugins_default = reloadPlugins;
|
|
161651
161711
|
});
|
|
@@ -162236,7 +162296,7 @@ var init_sandbox_toggle = __esm(() => {
|
|
|
162236
162296
|
},
|
|
162237
162297
|
immediate: true,
|
|
162238
162298
|
type: "local-jsx",
|
|
162239
|
-
load: () => import("./chunk-
|
|
162299
|
+
load: () => import("./chunk-c26n30wy.js")
|
|
162240
162300
|
};
|
|
162241
162301
|
sandbox_toggle_default = command6;
|
|
162242
162302
|
});
|
|
@@ -162251,7 +162311,7 @@ var init_chrome = __esm(() => {
|
|
|
162251
162311
|
availability: ["claude-ai"],
|
|
162252
162312
|
isEnabled: () => !getIsNonInteractiveSession(),
|
|
162253
162313
|
type: "local-jsx",
|
|
162254
|
-
load: () => import("./chunk-
|
|
162314
|
+
load: () => import("./chunk-qcehpjdm.js")
|
|
162255
162315
|
};
|
|
162256
162316
|
chrome_default = command7;
|
|
162257
162317
|
});
|
|
@@ -162364,7 +162424,7 @@ var init_advisor2 = __esm(() => {
|
|
|
162364
162424
|
// src/skills/bundledSkills.ts
|
|
162365
162425
|
import { constants as fsConstants4 } from "fs";
|
|
162366
162426
|
import { mkdir as mkdir21, open as open8 } from "fs/promises";
|
|
162367
|
-
import { dirname as dirname33, isAbsolute as isAbsolute19, join as
|
|
162427
|
+
import { dirname as dirname33, isAbsolute as isAbsolute19, join as join70, normalize as normalize7, sep as pathSep2 } from "path";
|
|
162368
162428
|
function registerBundledSkill(definition) {
|
|
162369
162429
|
const { files: files2 } = definition;
|
|
162370
162430
|
let skillRoot;
|
|
@@ -162412,7 +162472,7 @@ function getBundledSkills() {
|
|
|
162412
162472
|
return [...bundledSkills];
|
|
162413
162473
|
}
|
|
162414
162474
|
function getBundledSkillExtractDir(skillName) {
|
|
162415
|
-
return
|
|
162475
|
+
return join70(getBundledSkillsRoot(), skillName);
|
|
162416
162476
|
}
|
|
162417
162477
|
async function extractBundledSkillFiles(skillName, files2) {
|
|
162418
162478
|
const dir = getBundledSkillExtractDir(skillName);
|
|
@@ -162454,7 +162514,7 @@ function resolveSkillFilePath(baseDir, relPath) {
|
|
|
162454
162514
|
if (isAbsolute19(normalized) || normalized.split(pathSep2).includes("..") || normalized.split("/").includes("..")) {
|
|
162455
162515
|
throw new Error(`bundled skill file path escapes skill dir: ${relPath}`);
|
|
162456
162516
|
}
|
|
162457
|
-
return
|
|
162517
|
+
return join70(baseDir, normalized);
|
|
162458
162518
|
}
|
|
162459
162519
|
function prependBaseDir(blocks, baseDir) {
|
|
162460
162520
|
const prefix = `Base directory for this skill: ${baseDir}
|
|
@@ -162492,7 +162552,7 @@ var init_exit = __esm(() => {
|
|
|
162492
162552
|
aliases: ["quit"],
|
|
162493
162553
|
description: "Exit the REPL",
|
|
162494
162554
|
immediate: true,
|
|
162495
|
-
load: () => import("./chunk-
|
|
162555
|
+
load: () => import("./chunk-73fg61kc.js")
|
|
162496
162556
|
};
|
|
162497
162557
|
exit_default = exit;
|
|
162498
162558
|
});
|
|
@@ -162505,7 +162565,7 @@ var init_export = __esm(() => {
|
|
|
162505
162565
|
name: "export",
|
|
162506
162566
|
description: "Export the current conversation to a file or clipboard",
|
|
162507
162567
|
argumentHint: "[filename]",
|
|
162508
|
-
load: () => import("./chunk-
|
|
162568
|
+
load: () => import("./chunk-5ak4d5mm.js")
|
|
162509
162569
|
};
|
|
162510
162570
|
export_default = exportCommand;
|
|
162511
162571
|
});
|
|
@@ -162525,7 +162585,7 @@ var init_model2 = __esm(() => {
|
|
|
162525
162585
|
get immediate() {
|
|
162526
162586
|
return shouldInferenceConfigCommandBeImmediate();
|
|
162527
162587
|
},
|
|
162528
|
-
load: () => import("./chunk-
|
|
162588
|
+
load: () => import("./chunk-s7d9zge3.js")
|
|
162529
162589
|
};
|
|
162530
162590
|
});
|
|
162531
162591
|
|
|
@@ -162538,7 +162598,7 @@ var init_tag = __esm(() => {
|
|
|
162538
162598
|
description: "Toggle a searchable tag on the current session",
|
|
162539
162599
|
isEnabled: () => process.env.USER_TYPE === "ant",
|
|
162540
162600
|
argumentHint: "<tag-name>",
|
|
162541
|
-
load: () => import("./chunk-
|
|
162601
|
+
load: () => import("./chunk-b2mp430v.js")
|
|
162542
162602
|
};
|
|
162543
162603
|
tag_default = tag;
|
|
162544
162604
|
});
|
|
@@ -162569,7 +162629,7 @@ var init_remote_env = __esm(() => {
|
|
|
162569
162629
|
get isHidden() {
|
|
162570
162630
|
return !isClaudeAISubscriber() || !isPolicyAllowed("allow_remote_sessions");
|
|
162571
162631
|
},
|
|
162572
|
-
load: () => import("./chunk-
|
|
162632
|
+
load: () => import("./chunk-8teyh4mz.js")
|
|
162573
162633
|
};
|
|
162574
162634
|
});
|
|
162575
162635
|
|
|
@@ -162584,7 +162644,7 @@ var init_upgrade = __esm(() => {
|
|
|
162584
162644
|
description: "Upgrade to Max for higher rate limits and more Opus",
|
|
162585
162645
|
availability: ["claude-ai"],
|
|
162586
162646
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_UPGRADE_COMMAND) && getSubscriptionType() !== "enterprise",
|
|
162587
|
-
load: () => import("./chunk-
|
|
162647
|
+
load: () => import("./chunk-bpew2ng8.js")
|
|
162588
162648
|
};
|
|
162589
162649
|
upgrade_default = upgrade;
|
|
162590
162650
|
});
|
|
@@ -162604,7 +162664,7 @@ var init_rate_limit_options = __esm(() => {
|
|
|
162604
162664
|
return true;
|
|
162605
162665
|
},
|
|
162606
162666
|
isHidden: true,
|
|
162607
|
-
load: () => import("./chunk-
|
|
162667
|
+
load: () => import("./chunk-r6qg4ha4.js")
|
|
162608
162668
|
};
|
|
162609
162669
|
rate_limit_options_default = rateLimitOptions;
|
|
162610
162670
|
});
|
|
@@ -162646,7 +162706,7 @@ var init_effort2 = __esm(() => {
|
|
|
162646
162706
|
get immediate() {
|
|
162647
162707
|
return shouldInferenceConfigCommandBeImmediate();
|
|
162648
162708
|
},
|
|
162649
|
-
load: () => import("./chunk-
|
|
162709
|
+
load: () => import("./chunk-6ngajr2k.js")
|
|
162650
162710
|
};
|
|
162651
162711
|
});
|
|
162652
162712
|
|
|
@@ -162657,7 +162717,7 @@ var init_stats = __esm(() => {
|
|
|
162657
162717
|
type: "local-jsx",
|
|
162658
162718
|
name: "stats",
|
|
162659
162719
|
description: "Show your Claude Code usage statistics and activity",
|
|
162660
|
-
load: () => import("./chunk-
|
|
162720
|
+
load: () => import("./chunk-mwqzf6s6.js")
|
|
162661
162721
|
};
|
|
162662
162722
|
stats_default = stats;
|
|
162663
162723
|
});
|
|
@@ -162693,6 +162753,17 @@ var init_agents_platform = __esm(() => {
|
|
|
162693
162753
|
agents_platform_default = { name: "agents-platform", type: "local", isEnabled: () => false };
|
|
162694
162754
|
});
|
|
162695
162755
|
|
|
162756
|
+
// src/commands/buddy/index.ts
|
|
162757
|
+
var exports_buddy = {};
|
|
162758
|
+
__export(exports_buddy, {
|
|
162759
|
+
default: () => buddy_default
|
|
162760
|
+
});
|
|
162761
|
+
var _default, buddy_default;
|
|
162762
|
+
var init_buddy = __esm(() => {
|
|
162763
|
+
_default = {};
|
|
162764
|
+
buddy_default = _default;
|
|
162765
|
+
});
|
|
162766
|
+
|
|
162696
162767
|
// src/commands.ts
|
|
162697
162768
|
async function getSkills(cwd) {
|
|
162698
162769
|
try {
|
|
@@ -162836,7 +162907,7 @@ function formatDescriptionWithSource(cmd) {
|
|
|
162836
162907
|
}
|
|
162837
162908
|
return `${cmd.description} (${getSettingSourceName(cmd.source)})`;
|
|
162838
162909
|
}
|
|
162839
|
-
var agentsPlatform, proactive = null, briefCommand = null, assistantCommand = null, bridge = null, remoteControlServerCommand = null, voiceCommand = null, forceSnip = null, workflowsCmd = null, webCmd = null, clearSkillIndexCache = null, subscribePr = null, ultraplan = null, torch = null, peersCmd = null, forkCmd = null, buddy
|
|
162910
|
+
var agentsPlatform, proactive = null, briefCommand = null, assistantCommand = null, bridge = null, remoteControlServerCommand = null, voiceCommand = null, forceSnip = null, workflowsCmd = null, webCmd = null, clearSkillIndexCache = null, subscribePr = null, ultraplan = null, torch = null, peersCmd = null, forkCmd = null, buddy, usageReport, INTERNAL_ONLY_COMMANDS, COMMANDS, builtInCommandNames, getWorkflowCommands = null, loadAllCommands, getSkillToolCommands, getSlashCommandToolSkills, REMOTE_SAFE_COMMANDS, BRIDGE_SAFE_COMMANDS;
|
|
162840
162911
|
var init_commands2 = __esm(() => {
|
|
162841
162912
|
init_add_dir();
|
|
162842
162913
|
init_autofix_pr();
|
|
@@ -162944,6 +163015,7 @@ var init_commands2 = __esm(() => {
|
|
|
162944
163015
|
init_command();
|
|
162945
163016
|
init_command();
|
|
162946
163017
|
agentsPlatform = process.env.USER_TYPE === "ant" ? (init_agents_platform(), __toCommonJS(exports_agents_platform)).default : null;
|
|
163018
|
+
buddy = (init_buddy(), __toCommonJS(exports_buddy)).default;
|
|
162947
163019
|
usageReport = {
|
|
162948
163020
|
type: "prompt",
|
|
162949
163021
|
name: "insights",
|
|
@@ -162952,7 +163024,7 @@ var init_commands2 = __esm(() => {
|
|
|
162952
163024
|
progressMessage: "analyzing your sessions",
|
|
162953
163025
|
source: "builtin",
|
|
162954
163026
|
async getPromptForCommand(args, context2) {
|
|
162955
|
-
const real = (await import("./chunk-
|
|
163027
|
+
const real = (await import("./chunk-dq7myj0a.js")).default;
|
|
162956
163028
|
if (real.type !== "prompt")
|
|
162957
163029
|
throw new Error("unreachable");
|
|
162958
163030
|
return real.getPromptForCommand(args, context2);
|
|
@@ -163278,7 +163350,7 @@ import {
|
|
|
163278
163350
|
unlink as unlink13,
|
|
163279
163351
|
writeFile as writeFile25
|
|
163280
163352
|
} from "fs/promises";
|
|
163281
|
-
import { basename as basename28, dirname as dirname34, join as
|
|
163353
|
+
import { basename as basename28, dirname as dirname34, join as join71 } from "path";
|
|
163282
163354
|
function isTranscriptMessage(entry) {
|
|
163283
163355
|
return entry.type === "user" || entry.type === "assistant" || entry.type === "attachment" || entry.type === "system";
|
|
163284
163356
|
}
|
|
@@ -163292,18 +163364,18 @@ function isEphemeralToolProgress(dataType) {
|
|
|
163292
163364
|
return typeof dataType === "string" && EPHEMERAL_PROGRESS_TYPES.has(dataType);
|
|
163293
163365
|
}
|
|
163294
163366
|
function getProjectsDir2() {
|
|
163295
|
-
return
|
|
163367
|
+
return join71(getClaudeConfigHomeDir(), "projects");
|
|
163296
163368
|
}
|
|
163297
163369
|
function getTranscriptPath() {
|
|
163298
163370
|
const projectDir = getSessionProjectDir() ?? getProjectDir(getOriginalCwd());
|
|
163299
|
-
return
|
|
163371
|
+
return join71(projectDir, `${getSessionId()}.jsonl`);
|
|
163300
163372
|
}
|
|
163301
163373
|
function getTranscriptPathForSession(sessionId) {
|
|
163302
163374
|
if (sessionId === getSessionId()) {
|
|
163303
163375
|
return getTranscriptPath();
|
|
163304
163376
|
}
|
|
163305
163377
|
const projectDir = getProjectDir(getOriginalCwd());
|
|
163306
|
-
return
|
|
163378
|
+
return join71(projectDir, `${sessionId}.jsonl`);
|
|
163307
163379
|
}
|
|
163308
163380
|
function setAgentTranscriptSubdir(agentId, subdir) {
|
|
163309
163381
|
agentTranscriptSubdirs.set(agentId, subdir);
|
|
@@ -163315,8 +163387,8 @@ function getAgentTranscriptPath(agentId) {
|
|
|
163315
163387
|
const projectDir = getSessionProjectDir() ?? getProjectDir(getOriginalCwd());
|
|
163316
163388
|
const sessionId = getSessionId();
|
|
163317
163389
|
const subdir = agentTranscriptSubdirs.get(agentId);
|
|
163318
|
-
const base = subdir ?
|
|
163319
|
-
return
|
|
163390
|
+
const base = subdir ? join71(projectDir, sessionId, "subagents", subdir) : join71(projectDir, sessionId, "subagents");
|
|
163391
|
+
return join71(base, `agent-${agentId}.jsonl`);
|
|
163320
163392
|
}
|
|
163321
163393
|
function getAgentMetadataPath(agentId) {
|
|
163322
163394
|
return getAgentTranscriptPath(agentId).replace(/\.jsonl$/, ".meta.json");
|
|
@@ -163339,10 +163411,10 @@ async function readAgentMetadata(agentId) {
|
|
|
163339
163411
|
}
|
|
163340
163412
|
function getRemoteAgentsDir() {
|
|
163341
163413
|
const projectDir = getSessionProjectDir() ?? getProjectDir(getOriginalCwd());
|
|
163342
|
-
return
|
|
163414
|
+
return join71(projectDir, getSessionId(), "remote-agents");
|
|
163343
163415
|
}
|
|
163344
163416
|
function getRemoteAgentMetadataPath(taskId) {
|
|
163345
|
-
return
|
|
163417
|
+
return join71(getRemoteAgentsDir(), `remote-agent-${taskId}.meta.json`);
|
|
163346
163418
|
}
|
|
163347
163419
|
async function writeRemoteAgentMetadata(taskId, metadata) {
|
|
163348
163420
|
const path10 = getRemoteAgentMetadataPath(taskId);
|
|
@@ -163385,7 +163457,7 @@ async function listRemoteAgentMetadata() {
|
|
|
163385
163457
|
if (!entry.isFile() || !entry.name.endsWith(".meta.json"))
|
|
163386
163458
|
continue;
|
|
163387
163459
|
try {
|
|
163388
|
-
const raw = await readFile26(
|
|
163460
|
+
const raw = await readFile26(join71(dir, entry.name), "utf-8");
|
|
163389
163461
|
results.push(JSON.parse(raw));
|
|
163390
163462
|
} catch (e) {
|
|
163391
163463
|
logForDebugging(`listRemoteAgentMetadata: skipping ${entry.name}: ${String(e)}`);
|
|
@@ -163395,7 +163467,7 @@ async function listRemoteAgentMetadata() {
|
|
|
163395
163467
|
}
|
|
163396
163468
|
function sessionIdExists(sessionId) {
|
|
163397
163469
|
const projectDir = getProjectDir(getOriginalCwd());
|
|
163398
|
-
const sessionFile =
|
|
163470
|
+
const sessionFile = join71(projectDir, `${sessionId}.jsonl`);
|
|
163399
163471
|
const fs8 = getFsImplementation();
|
|
163400
163472
|
try {
|
|
163401
163473
|
fs8.statSync(sessionFile);
|
|
@@ -165365,7 +165437,7 @@ async function loadTranscriptFile(filePath, opts) {
|
|
|
165365
165437
|
};
|
|
165366
165438
|
}
|
|
165367
165439
|
async function loadSessionFile(sessionId) {
|
|
165368
|
-
const sessionFile =
|
|
165440
|
+
const sessionFile = join71(getSessionProjectDir() ?? getProjectDir(getOriginalCwd()), `${sessionId}.jsonl`);
|
|
165369
165441
|
return loadTranscriptFile(sessionFile);
|
|
165370
165442
|
}
|
|
165371
165443
|
function clearSessionMessagesCache() {
|
|
@@ -165433,7 +165505,7 @@ async function loadAllProjectsMessageLogsFull(limit) {
|
|
|
165433
165505
|
} catch {
|
|
165434
165506
|
return [];
|
|
165435
165507
|
}
|
|
165436
|
-
const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) =>
|
|
165508
|
+
const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join71(projectsDir, dirent.name));
|
|
165437
165509
|
const logsPerProject = await Promise.all(projectDirs.map((projectDir) => getLogsWithoutIndex(projectDir, limit)));
|
|
165438
165510
|
const allLogs = logsPerProject.flat();
|
|
165439
165511
|
const deduped = new Map;
|
|
@@ -165458,7 +165530,7 @@ async function loadAllProjectsMessageLogsProgressive(limit, initialEnrichCount =
|
|
|
165458
165530
|
} catch {
|
|
165459
165531
|
return { logs: [], allStatLogs: [], nextIndex: 0 };
|
|
165460
165532
|
}
|
|
165461
|
-
const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) =>
|
|
165533
|
+
const projectDirs = dirents.filter((dirent) => dirent.isDirectory()).map((dirent) => join71(projectsDir, dirent.name));
|
|
165462
165534
|
const rawLogs = [];
|
|
165463
165535
|
for (const projectDir of projectDirs) {
|
|
165464
165536
|
rawLogs.push(...await getSessionFilesLite(projectDir, limit));
|
|
@@ -165519,7 +165591,7 @@ async function getStatOnlyLogsForWorktrees(worktreePaths, limit) {
|
|
|
165519
165591
|
for (const { path: wtPath, prefix } of indexed) {
|
|
165520
165592
|
if (dirName === prefix || dirName.startsWith(prefix + "-")) {
|
|
165521
165593
|
seenDirs.add(dirName);
|
|
165522
|
-
allLogs.push(...await getSessionFilesLite(
|
|
165594
|
+
allLogs.push(...await getSessionFilesLite(join71(projectsDir, dirent.name), undefined, wtPath));
|
|
165523
165595
|
break;
|
|
165524
165596
|
}
|
|
165525
165597
|
}
|
|
@@ -165588,7 +165660,7 @@ async function loadSubagentTranscripts(agentIds) {
|
|
|
165588
165660
|
return transcripts;
|
|
165589
165661
|
}
|
|
165590
165662
|
async function loadAllSubagentTranscriptsFromDisk() {
|
|
165591
|
-
const subagentsDir =
|
|
165663
|
+
const subagentsDir = join71(getSessionProjectDir() ?? getProjectDir(getOriginalCwd()), getSessionId(), "subagents");
|
|
165592
165664
|
let entries;
|
|
165593
165665
|
try {
|
|
165594
165666
|
entries = await readdir16(subagentsDir, { withFileTypes: true });
|
|
@@ -165716,7 +165788,7 @@ async function getSessionFilesWithMtime(projectDir) {
|
|
|
165716
165788
|
const sessionId = validateUuid2(basename28(dirent.name, ".jsonl"));
|
|
165717
165789
|
if (!sessionId)
|
|
165718
165790
|
continue;
|
|
165719
|
-
candidates.push({ sessionId, filePath:
|
|
165791
|
+
candidates.push({ sessionId, filePath: join71(projectDir, dirent.name) });
|
|
165720
165792
|
}
|
|
165721
165793
|
await Promise.all(candidates.map(async ({ sessionId, filePath }) => {
|
|
165722
165794
|
try {
|
|
@@ -166116,7 +166188,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
166116
166188
|
MAX_TRANSCRIPT_READ_BYTES = 50 * 1024 * 1024;
|
|
166117
166189
|
agentTranscriptSubdirs = new Map;
|
|
166118
166190
|
getProjectDir = memoize_default((projectDir) => {
|
|
166119
|
-
return
|
|
166191
|
+
return join71(getProjectsDir2(), sanitizePath(projectDir));
|
|
166120
166192
|
});
|
|
166121
166193
|
METADATA_TYPE_MARKERS = [
|
|
166122
166194
|
'"type":"summary"',
|
|
@@ -166354,41 +166426,41 @@ var init_memdir = __esm(() => {
|
|
|
166354
166426
|
});
|
|
166355
166427
|
|
|
166356
166428
|
// src/tools/AgentTool/agentMemory.ts
|
|
166357
|
-
import { join as
|
|
166429
|
+
import { join as join72, normalize as normalize8, sep as sep18 } from "path";
|
|
166358
166430
|
function sanitizeAgentTypeForPath(agentType) {
|
|
166359
166431
|
return agentType.replace(/:/g, "-");
|
|
166360
166432
|
}
|
|
166361
166433
|
function getLocalAgentMemoryDir(dirName) {
|
|
166362
166434
|
if (process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR) {
|
|
166363
|
-
return
|
|
166435
|
+
return join72(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects", sanitizePath(findCanonicalGitRoot(getProjectRoot()) ?? getProjectRoot()), "agent-memory-local", dirName) + sep18;
|
|
166364
166436
|
}
|
|
166365
|
-
return
|
|
166437
|
+
return join72(getCwd(), ".claude", "agent-memory-local", dirName) + sep18;
|
|
166366
166438
|
}
|
|
166367
166439
|
function getAgentMemoryDir(agentType, scope) {
|
|
166368
166440
|
const dirName = sanitizeAgentTypeForPath(agentType);
|
|
166369
166441
|
switch (scope) {
|
|
166370
166442
|
case "project":
|
|
166371
|
-
return
|
|
166443
|
+
return join72(getCwd(), ".claude", "agent-memory", dirName) + sep18;
|
|
166372
166444
|
case "local":
|
|
166373
166445
|
return getLocalAgentMemoryDir(dirName);
|
|
166374
166446
|
case "user":
|
|
166375
|
-
return
|
|
166447
|
+
return join72(getMemoryBaseDir(), "agent-memory", dirName) + sep18;
|
|
166376
166448
|
}
|
|
166377
166449
|
}
|
|
166378
166450
|
function isAgentMemoryPath(absolutePath) {
|
|
166379
166451
|
const normalizedPath = normalize8(absolutePath);
|
|
166380
166452
|
const memoryBase = getMemoryBaseDir();
|
|
166381
|
-
if (normalizedPath.startsWith(
|
|
166453
|
+
if (normalizedPath.startsWith(join72(memoryBase, "agent-memory") + sep18)) {
|
|
166382
166454
|
return true;
|
|
166383
166455
|
}
|
|
166384
|
-
if (normalizedPath.startsWith(
|
|
166456
|
+
if (normalizedPath.startsWith(join72(getCwd(), ".claude", "agent-memory") + sep18)) {
|
|
166385
166457
|
return true;
|
|
166386
166458
|
}
|
|
166387
166459
|
if (process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR) {
|
|
166388
|
-
if (normalizedPath.includes(sep18 + "agent-memory-local" + sep18) && normalizedPath.startsWith(
|
|
166460
|
+
if (normalizedPath.includes(sep18 + "agent-memory-local" + sep18) && normalizedPath.startsWith(join72(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR, "projects") + sep18)) {
|
|
166389
166461
|
return true;
|
|
166390
166462
|
}
|
|
166391
|
-
} else if (normalizedPath.startsWith(
|
|
166463
|
+
} else if (normalizedPath.startsWith(join72(getCwd(), ".claude", "agent-memory-local") + sep18)) {
|
|
166392
166464
|
return true;
|
|
166393
166465
|
}
|
|
166394
166466
|
return false;
|
|
@@ -166396,7 +166468,7 @@ function isAgentMemoryPath(absolutePath) {
|
|
|
166396
166468
|
function getMemoryScopeDisplay(memory2) {
|
|
166397
166469
|
switch (memory2) {
|
|
166398
166470
|
case "user":
|
|
166399
|
-
return `User (${
|
|
166471
|
+
return `User (${join72(getMemoryBaseDir(), "agent-memory")}/)`;
|
|
166400
166472
|
case "project":
|
|
166401
166473
|
return "Project (.claude/agent-memory/)";
|
|
166402
166474
|
case "local":
|
|
@@ -166438,8 +166510,8 @@ var init_agentMemory = __esm(() => {
|
|
|
166438
166510
|
|
|
166439
166511
|
// src/utils/permissions/filesystem.ts
|
|
166440
166512
|
import { randomBytes as randomBytes14 } from "crypto";
|
|
166441
|
-
import { homedir as
|
|
166442
|
-
import { join as
|
|
166513
|
+
import { homedir as homedir17, tmpdir as tmpdir6 } from "os";
|
|
166514
|
+
import { join as join73, normalize as normalize9, posix as posix7, sep as sep19 } from "path";
|
|
166443
166515
|
function normalizeCaseForComparison2(path10) {
|
|
166444
166516
|
return path10.toLowerCase();
|
|
166445
166517
|
}
|
|
@@ -166448,11 +166520,11 @@ function getClaudeSkillScope(filePath) {
|
|
|
166448
166520
|
const absolutePathLower = normalizeCaseForComparison2(absolutePath);
|
|
166449
166521
|
const bases = [
|
|
166450
166522
|
{
|
|
166451
|
-
dir: expandPath(
|
|
166523
|
+
dir: expandPath(join73(getOriginalCwd(), ".claude", "skills")),
|
|
166452
166524
|
prefix: "/.claude/skills/"
|
|
166453
166525
|
},
|
|
166454
166526
|
{
|
|
166455
|
-
dir: expandPath(
|
|
166527
|
+
dir: expandPath(join73(homedir17(), ".claude", "skills")),
|
|
166456
166528
|
prefix: "~/.claude/skills/"
|
|
166457
166529
|
}
|
|
166458
166530
|
];
|
|
@@ -166507,21 +166579,21 @@ function isClaudeConfigFilePath(filePath) {
|
|
|
166507
166579
|
if (isClaudeSettingsPath(filePath)) {
|
|
166508
166580
|
return true;
|
|
166509
166581
|
}
|
|
166510
|
-
const commandsDir =
|
|
166511
|
-
const agentsDir =
|
|
166512
|
-
const skillsDir =
|
|
166582
|
+
const commandsDir = join73(getOriginalCwd(), ".claude", "commands");
|
|
166583
|
+
const agentsDir = join73(getOriginalCwd(), ".claude", "agents");
|
|
166584
|
+
const skillsDir = join73(getOriginalCwd(), ".claude", "skills");
|
|
166513
166585
|
return pathInWorkingPath(filePath, commandsDir) || pathInWorkingPath(filePath, agentsDir) || pathInWorkingPath(filePath, skillsDir);
|
|
166514
166586
|
}
|
|
166515
166587
|
function isSessionPlanFile(absolutePath) {
|
|
166516
|
-
const expectedPrefix =
|
|
166588
|
+
const expectedPrefix = join73(getPlansDirectory(), getPlanSlug());
|
|
166517
166589
|
const normalizedPath = normalize9(absolutePath);
|
|
166518
166590
|
return normalizedPath.startsWith(expectedPrefix) && normalizedPath.endsWith(".md");
|
|
166519
166591
|
}
|
|
166520
166592
|
function getSessionMemoryDir() {
|
|
166521
|
-
return
|
|
166593
|
+
return join73(getProjectDir(getCwd()), getSessionId(), "session-memory") + sep19;
|
|
166522
166594
|
}
|
|
166523
166595
|
function getSessionMemoryPath() {
|
|
166524
|
-
return
|
|
166596
|
+
return join73(getSessionMemoryDir(), "summary.md");
|
|
166525
166597
|
}
|
|
166526
166598
|
function isSessionMemoryPath(absolutePath) {
|
|
166527
166599
|
const normalizedPath = normalize9(absolutePath);
|
|
@@ -166543,10 +166615,10 @@ function getClaudeTempDirName() {
|
|
|
166543
166615
|
return `claude-${uid}`;
|
|
166544
166616
|
}
|
|
166545
166617
|
function getProjectTempDir() {
|
|
166546
|
-
return
|
|
166618
|
+
return join73(getClaudeTempDir(), sanitizePath(getOriginalCwd())) + sep19;
|
|
166547
166619
|
}
|
|
166548
166620
|
function getScratchpadDir() {
|
|
166549
|
-
return
|
|
166621
|
+
return join73(getProjectTempDir(), getSessionId(), "scratchpad");
|
|
166550
166622
|
}
|
|
166551
166623
|
async function ensureScratchpadDir() {
|
|
166552
166624
|
if (!isScratchpadEnabled()) {
|
|
@@ -166766,7 +166838,7 @@ function patternWithRoot(pattern, source) {
|
|
|
166766
166838
|
} else if (pattern.startsWith(`~${DIR_SEP}`)) {
|
|
166767
166839
|
return {
|
|
166768
166840
|
relativePattern: pattern.slice(1),
|
|
166769
|
-
root:
|
|
166841
|
+
root: homedir17().normalize("NFC")
|
|
166770
166842
|
};
|
|
166771
166843
|
} else if (pattern.startsWith(DIR_SEP)) {
|
|
166772
166844
|
return {
|
|
@@ -167125,7 +167197,7 @@ function checkEditableInternalPath(absolutePath, input) {
|
|
|
167125
167197
|
}
|
|
167126
167198
|
};
|
|
167127
167199
|
}
|
|
167128
|
-
if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(
|
|
167200
|
+
if (normalizeCaseForComparison2(normalizedPath) === normalizeCaseForComparison2(join73(getOriginalCwd(), ".claude", "launch.json"))) {
|
|
167129
167201
|
return {
|
|
167130
167202
|
behavior: "allow",
|
|
167131
167203
|
updatedInput: input,
|
|
@@ -167222,7 +167294,7 @@ function checkReadableInternalPath(absolutePath, input) {
|
|
|
167222
167294
|
}
|
|
167223
167295
|
};
|
|
167224
167296
|
}
|
|
167225
|
-
const tasksDir =
|
|
167297
|
+
const tasksDir = join73(getClaudeConfigHomeDir(), "tasks") + sep19;
|
|
167226
167298
|
if (normalizedPath === tasksDir.slice(0, -1) || normalizedPath.startsWith(tasksDir)) {
|
|
167227
167299
|
return {
|
|
167228
167300
|
behavior: "allow",
|
|
@@ -167233,7 +167305,7 @@ function checkReadableInternalPath(absolutePath, input) {
|
|
|
167233
167305
|
}
|
|
167234
167306
|
};
|
|
167235
167307
|
}
|
|
167236
|
-
const teamsReadDir =
|
|
167308
|
+
const teamsReadDir = join73(getClaudeConfigHomeDir(), "teams") + sep19;
|
|
167237
167309
|
if (normalizedPath === teamsReadDir.slice(0, -1) || normalizedPath.startsWith(teamsReadDir)) {
|
|
167238
167310
|
return {
|
|
167239
167311
|
behavior: "allow",
|
|
@@ -167307,11 +167379,11 @@ var init_filesystem = __esm(() => {
|
|
|
167307
167379
|
try {
|
|
167308
167380
|
resolvedBaseTmpDir = fs8.realpathSync(baseTmpDir);
|
|
167309
167381
|
} catch {}
|
|
167310
|
-
return
|
|
167382
|
+
return join73(resolvedBaseTmpDir, getClaudeTempDirName()) + sep19;
|
|
167311
167383
|
});
|
|
167312
167384
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
167313
167385
|
const nonce = randomBytes14(16).toString("hex");
|
|
167314
|
-
return
|
|
167386
|
+
return join73(getClaudeTempDir(), "bundled-skills", MACRO.VERSION, nonce);
|
|
167315
167387
|
});
|
|
167316
167388
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
167317
167389
|
});
|
|
@@ -167325,10 +167397,10 @@ import {
|
|
|
167325
167397
|
symlink as symlink4,
|
|
167326
167398
|
unlink as unlink14
|
|
167327
167399
|
} from "fs/promises";
|
|
167328
|
-
import { join as
|
|
167400
|
+
import { join as join74 } from "path";
|
|
167329
167401
|
function getTaskOutputDir() {
|
|
167330
167402
|
if (_taskOutputDir === undefined) {
|
|
167331
|
-
_taskOutputDir =
|
|
167403
|
+
_taskOutputDir = join74(getProjectTempDir(), getSessionId(), "tasks");
|
|
167332
167404
|
}
|
|
167333
167405
|
return _taskOutputDir;
|
|
167334
167406
|
}
|
|
@@ -167336,7 +167408,7 @@ async function ensureOutputDir() {
|
|
|
167336
167408
|
await mkdir23(getTaskOutputDir(), { recursive: true });
|
|
167337
167409
|
}
|
|
167338
167410
|
function getTaskOutputPath(taskId) {
|
|
167339
|
-
return
|
|
167411
|
+
return join74(getTaskOutputDir(), `${taskId}.output`);
|
|
167340
167412
|
}
|
|
167341
167413
|
function track(p) {
|
|
167342
167414
|
_pendingOps.add(p);
|
|
@@ -168592,7 +168664,7 @@ var init_ssrfGuard = () => {};
|
|
|
168592
168664
|
|
|
168593
168665
|
// src/utils/hooks/execHttpHook.ts
|
|
168594
168666
|
async function getSandboxProxyConfig() {
|
|
168595
|
-
const { SandboxManager: SandboxManager3 } = await import("./chunk-
|
|
168667
|
+
const { SandboxManager: SandboxManager3 } = await import("./chunk-qe9vhxt2.js");
|
|
168596
168668
|
if (!SandboxManager3.isSandboxingEnabled()) {
|
|
168597
168669
|
return;
|
|
168598
168670
|
}
|
|
@@ -171810,7 +171882,7 @@ var init_changeDetector = __esm(() => {
|
|
|
171810
171882
|
// src/utils/sandbox/sandbox-adapter.ts
|
|
171811
171883
|
import { rmSync as rmSync2, statSync as statSync3 } from "fs";
|
|
171812
171884
|
import { readFile as readFile27 } from "fs/promises";
|
|
171813
|
-
import { join as
|
|
171885
|
+
import { join as join75, resolve as resolve26, sep as sep21 } from "path";
|
|
171814
171886
|
function permissionRuleValueFromString2(ruleString) {
|
|
171815
171887
|
const matches = ruleString.match(/^([^(]+)\(([^)]+)\)$/);
|
|
171816
171888
|
if (!matches) {
|
|
@@ -171992,7 +172064,7 @@ function scrubBareGitRepoFiles() {
|
|
|
171992
172064
|
}
|
|
171993
172065
|
}
|
|
171994
172066
|
async function detectWorktreeMainRepoPath(cwd) {
|
|
171995
|
-
const gitPath =
|
|
172067
|
+
const gitPath = join75(cwd, ".git");
|
|
171996
172068
|
try {
|
|
171997
172069
|
const gitContent = await readFile27(gitPath, { encoding: "utf8" });
|
|
171998
172070
|
const gitdirMatch = gitContent.match(/^gitdir:\s*(.+)$/m);
|
|
@@ -172297,4 +172369,4 @@ var init_sandbox_adapter = __esm(() => {
|
|
|
172297
172369
|
};
|
|
172298
172370
|
});
|
|
172299
172371
|
|
|
172300
|
-
export { BASH_TOOL_NAME, init_toolName, GREP_TOOL_NAME, init_prompt4 as init_prompt, FILE_EDIT_TOOL_NAME, CLAUDE_FOLDER_PERMISSION_PATTERN, GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN, init_constants5 as init_constants, FILE_READ_TOOL_NAME, init_prompt5 as init_prompt1, init_prompt6 as init_prompt2, init_prompt7 as init_prompt3, init_constants6 as init_constants1, MessageResponse, init_MessageResponse, validateDirectoryForWorkspace, addDirHelpMessage, init_validation2 as init_validation, createStore, init_store, init_voice, useMailbox, init_mailbox2 as init_mailbox, settingsChangeDetector, init_changeDetector, useSettingsChange, init_useSettingsChange, getEmptyToolPermissionContext, toolMatchesName, findToolByName, init_Tool, getSessionStartDate, init_common2 as init_common, g, init_marked_esm, parseYaml, init_yaml, FRONTMATTER_REGEX, parseFrontmatter, init_frontmatterParser, MAX_MEMORY_CHARACTER_COUNT, getMemoryFiles, clearMemoryFileCaches, resetGetMemoryFilesCache, getLargeMemoryFiles, getExternalClaudeMdIncludes, hasExternalClaudeMdIncludes, shouldShowClaudeMdExternalIncludesWarning, init_claudemd, setSystemPromptInjection, getGitStatus, getSystemContext, getUserContext, init_context2 as init_context, isZ4Schema, safeParse2 as safeParse, getObjectShape, init_zod_compat, Protocol, mergeCapabilities, init_protocol, AjvJsonSchemaValidator, init_ajv_provider, assertToolsCallTaskCapability, assertClientRequestTaskCapability, init_helpers, mapValues_default, init_mapValues, getRemoteSessionUrl, init_product, DEFAULT_BINDINGS, init_defaultBindings, NON_REBINDABLE, TERMINAL_RESERVED, MACOS_RESERVED, normalizeKeyForComparison, init_reservedShortcuts, isKeybindingCustomizationEnabled, getKeybindingsPath, loadKeybindingsSyncWithWarnings, getCachedKeybindingWarnings, init_loadUserBindings, getShortcutDisplay, init_shortcutFormat, last_default, init_last, duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom, chonk, init_types6 as init_types, getCompanion, init_companion, NO_CONTENT_MESSAGE, init_messages, ripGrep2 as ripGrep, countFilesRoundedRg, init_ripgrep2 as init_ripgrep, isRestrictedToPluginOnly, isSourceAdminTrusted, init_pluginOnlyPolicy, CLAUDE_CONFIG_DIRECTORIES, loadMarkdownFilesForSubdir, init_markdownConfigLoader, getPluginErrorMessage, init_plugin, isBuiltinPluginId, getBuiltinPluginDefinition, init_builtinPlugins, getAddDirEnabledPlugins, init_addDirPluginSettings, SETTING_SOURCE_TO_SCOPE, parsePluginIdentifier, isOfficialMarketplaceName, scopeToSettingSource, init_pluginIdentifier, findReverseDependents, formatReverseDependentsSuffix, init_dependencyResolver, OFFICIAL_MARKETPLACE_SOURCE, OFFICIAL_MARKETPLACE_NAME, init_officialMarketplace, logPluginFetch, classifyFetchError, init_fetchTelemetry, checkGitAvailable, markGitUnavailable, init_gitAvailability, SandboxViolationStore, SandboxRuntimeConfigSchema, WEB_FETCH_TOOL_NAME, init_prompt10 as init_prompt4, resolvePathPatternForSandbox, resolveSandboxFilesystemPath, shouldAllowManagedSandboxDomainsOnly, convertToSandboxRuntimeConfig, addToExcludedCommands, SandboxManager2 as SandboxManager, init_sandbox_adapter, getPluginsDirectory, getPluginSeedDirs, pluginDataDirPath, getPluginDataDirSize, deletePluginDataDir, init_pluginDirectories, isUltrathinkEnabled, findThinkingTriggerPositions, getRainbowColor, modelSupportsAdaptiveThinking, shouldEnableThinkingByDefault, init_thinking, EFFORT_LEVELS, modelSupportsEffort, modelSupportsMaxEffort, isEffortLevel, parseEffortValue, toPersistableEffort, getInitialEffortSetting, resolvePickerEffortPersistence, getEffortEnvOverride, resolveAppliedEffort, getDisplayedEffortLevel, getEffortSuffix, convertEffortValueToLevel, getEffortValueDescription, getOpusDefaultEffortConfig, getDefaultEffortForModel, init_effort, isMcpbSource, loadMcpServerUserConfig, saveMcpServerUserConfig, loadMcpbFile, init_mcpbHandler, loadPluginOptions, savePluginOptions, deletePluginOptions, getUnconfiguredOptions, init_pluginOptionsStorage, loadPluginAgents, init_loadPluginAgents, AGENT_COLORS, AGENT_COLOR_TO_THEME_COLOR, getAgentColor, setAgentColor, init_agentColorManager, init_prompt11 as init_prompt5, CLAUDE_CODE_GUIDE_AGENT_TYPE, init_claudeCodeGuideAgent, EXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_MODE_V2_TOOL_NAME, init_constants11 as init_constants2, isBuiltInAgent, isCustomAgent, isPluginAgent, getActiveAgentsFromList, hasRequiredMcpServers, filterAgentsByMcpRequirements, getAgentDefinitionsWithOverrides, clearAgentDefinitionsCache, parseAgentFromJson, parseAgentsFromJson, parseAgentFromMarkdown, init_loadAgentsDir, SKILL_BUDGET_CONTEXT_PERCENT, CHARS_PER_TOKEN, DEFAULT_CHAR_BUDGET, MAX_LISTING_DESC_CHARS, getCharBudget, formatCommandsWithinBudget, getPrompt2 as getPrompt, getSkillToolInfo, getLimitedSkillToolCommands, clearPromptCache, getSkillInfo, init_prompt16 as init_prompt6, POWERSHELL_TOOL_NAME, init_toolName2 as init_toolName1, SHELL_TOOL_NAMES, isPowerShellToolEnabled, init_shellToolUtils, diffLines, init_libesm, resetPromptCacheBreakDetection, init_promptCacheBreakDetection, compactWarningStore, suppressCompactWarning, init_compactWarningState, resetMicrocompactState, microcompactMessages, init_microCompact, getTokenUsage, tokenCountFromLastAPIResponse, getCurrentUsage, doesMostRecentAssistantMessageExceed200k, getAssistantMessageContentLength, tokenCountWithEstimation, init_tokens, DEFAULT_SESSION_MEMORY_CONFIG, setLastSummarizedMessageId, markExtractionStarted, markExtractionCompleted, getSessionMemoryContent, setSessionMemoryConfig, getSessionMemoryConfig, recordExtractionTokenCount, isSessionMemoryInitialized, markSessionMemoryInitialized, hasMetInitializationThreshold, hasMetUpdateThreshold, getToolCallsBetweenUpdates, init_sessionMemoryUtils, uniqBy_default, init_uniqBy, inputSchema21 as inputSchema, outputSchema18 as outputSchema, clearToolSearchDescriptionCache, ToolSearchTool, init_ToolSearchTool, maybeResizeAndDownsampleImageBlock, detectImageFormatFromBase64, createImageMetadataText, init_imageResizer, getRateLimitWarning, getUsingOverageText, currentLimits, getRawUtilization, statusListeners, checkQuotaStatus, init_claudeAiLimits, getSSLErrorHint, formatAPIError, init_errorUtils, startsWithApiErrorPrefix, categorizeRetryableAPIError, init_errors3 as init_errors, init_withRetry, asSystemPrompt, init_systemPromptType, subscribeToCommandQueue, getCommandQueueSnapshot, getCommandQueue, getCommandQueueLength, hasCommandsInQueue, enqueue, enqueuePendingNotification, dequeue, peek, dequeueAllMatching, removeByFilter, clearCommandQueue, isQueuedCommandEditable, isQueuedCommandVisible, popAllEditable, getCommandsByMaxPriority, init_messageQueueManager, setCommandLifecycleListener, notifyCommandLifecycle, init_commandLifecycle, headlessProfilerStartTurn, headlessProfilerCheckpoint, logHeadlessProfilerTurn, init_headlessProfiler, SLEEP_TOOL_NAME, init_prompt13 as init_prompt7, registerPostSamplingHook, init_postSamplingHooks, clearAllDumpState, init_dumpPrompts, createAbortController, init_abortController, getCliHighlightPromise, getLanguageName, init_cliHighlight, logPermissionDecision, init_permissionLogging, tryParseShellCommand, quote, init_shellQuote, PROMPT_PREFIX, createPromptRuleContent, isClassifierPermissionsEnabled, getBashPromptAllowDescriptions, generateGenericDescription, init_bashClassifier, shouldShowAlwaysAllowOptions, getPermissionRulesForSource, init_permissionsLoader, extractRules, hasRules, applyPermissionUpdate, applyPermissionUpdates, supportsPersistence, persistPermissionUpdate, persistPermissionUpdates, init_PermissionUpdate, permissionRuleExtractPrefix, init_shellRuleMatching, setupVscodeSdkMcp, init_vscodeSdkMcp, shouldEnablePromptSuggestion, abortPromptSuggestion, tryGenerateSuggestion, logSuggestionOutcome, logSuggestionSuppressed, init_promptSuggestion, IDLE_SPECULATION_STATE, getDefaultAppState, init_AppStateStore, toArray, fromArray, init_generators, isResultSuccessful, normalizeMessage, handleOrphanedPermission, extractReadFilesFromMessages, extractBashToolsFromMessages, init_queryHelpers, abortSpeculation, handleSpeculationAccept, init_speculation, enqueueSdkEvent, drainSdkEvents, emitTaskTerminatedSdk, init_sdkEventQueue, updateTaskState, getRunningTasks, init_framework, escapeXml, escapeXmlAttr, init_xml2 as init_xml, SYNTHETIC_OUTPUT_TOOL_NAME, isSyntheticOutputToolEnabled, createSyntheticOutputTool, init_SyntheticOutputTool, asSessionId, asAgentId, init_ids, getQuerySourceForREPL, init_promptCategory, ENTER_PLAN_MODE_TOOL_NAME, init_constants13 as init_constants3, ASK_USER_QUESTION_TOOL_NAME, init_prompt9 as init_prompt8, TODO_WRITE_TOOL_NAME, init_constants8 as init_constants4, SKILL_TOOL_NAME, init_constants10 as init_constants5, cronToHuman, init_cron, getCronFilePath, readCronTasks, hasCronTasksSync, removeCronTasks, markCronTasksFired, DEFAULT_CRON_JITTER_CONFIG, jitteredNextCronRunMs, oneShotJitteredNextCronRunMs, findMissedTasks, init_cronTasks, DEFAULT_MAX_AGE_DAYS, isKairosCronEnabled, CRON_CREATE_TOOL_NAME, CRON_DELETE_TOOL_NAME, exports_prompt, init_prompt12 as init_prompt9, init_tools, TEAM_CREATE_TOOL_NAME, init_constants20 as init_constants6, isCoordinatorMode, init_coordinatorMode, loadPluginMcpServers, getUnconfiguredChannels, init_mcpPluginIntegration, fetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, hasClaudeAiMcpEverConnected, init_claudeai, filterToolsByServer, commandBelongsToServer, filterMcpPromptsByServer, excludeToolsByServer, excludeCommandsByServer, excludeResourcesByServer, excludeStalePluginClients, isMcpTool, describeMcpConfigFilePath, getScopeLabel, ensureConfigScope, ensureTransport, parseHeaders, getProjectMcpServerStatus, extractAgentMcpServers, init_utils2 as init_utils, getMcpServerSignature, dedupClaudeAiMcpServers, filterMcpServersByPolicy, addMcpConfig, removeMcpConfig, getMcpConfigsByScope, getMcpConfigByName, getClaudeCodeMcpConfigs, getAllMcpConfigs, parseMcpConfig, parseMcpConfigFromFilePath, doesEnterpriseMcpConfigExist, areMcpConfigsAllowedWithEnterpriseMcpConfig, isMcpServerDisabled, setMcpServerEnabled, init_config3 as init_config, isLocalShellTask, init_guards, getHookDisplayText, getAllHooks, hookSourceDescriptionDisplayString, hookSourceHeaderDisplayString, hookSourceInlineDisplayString, sortMatchersByPriority, init_hooksSettings, addSessionHook, addFunctionHook, removeSessionHook, init_sessionHooks, getDefaultSubagentModel, getAgentModelDisplay, getAgentModelOptions, init_agent, validateUuid2 as validateUuid, createAgentId, init_uuid, sideQuery, init_sideQuery, filterToolsForAgent, resolveAgentTools, init_agentToolUtils, useSettings, init_useSettings, applyMarkdown, init_markdown, Markdown, StreamingMarkdown, init_Markdown, isAdvisorBlock, isAdvisorEnabled, canUserConfigureAdvisor, modelSupportsAdvisor, isValidAdvisorModel, getInitialAdvisorSetting, init_advisor, checkOpus1mAccess, checkSonnet1mAccess, init_check1mAccess, getUpgradeMessage, init_contextWindowUpgradeCheck, setupGracefulShutdown, gracefulShutdownSync, isShuttingDown, gracefulShutdown, init_gracefulShutdown, getGroveSettings, markGroveNoticeViewed, updateGroveSettings, isQualifiedForGrove, getGroveNoticeConfig, calculateShouldShowGrove, checkGroveForNonInteractive, init_grove, _resetPolicyLimitsForTesting, initializePolicyLimitsLoadingPromise, isPolicyLimitsEligible, waitForPolicyLimitsToLoad, isPolicyAllowed, loadPolicyLimits, refreshPolicyLimits, clearPolicyLimitsCache, startBackgroundPolling2 as startBackgroundPolling, stopBackgroundPolling2 as stopBackgroundPolling, init_policyLimits, isRemoteManagedSettingsEligible, init_syncCache, initializeRemoteManagedSettingsLoadingPromise, isEligibleForRemoteManagedSettings, waitForRemoteManagedSettingsToLoad, loadRemoteManagedSettings, refreshRemoteManagedSettings, init_remoteManagedSettings, performLogout, clearAuthRelatedCaches, call, init_logout, OAuthService, init_oauth2 as init_oauth, installOrUpdateClaudePackage, localInstallationExists, getShellType, init_localInstaller, assertMinVersion, getMaxVersion, getMaxVersionMessage, shouldSkipVersion, getLatestVersion, getNpmDistTags, getLatestVersionFromGcs, getGcsDistTags, installGlobalPackage, init_autoUpdater, getPackageManager, init_packageManagers, getCurrentInstallationType, getDoctorDiagnostic, init_doctorDiagnostic, _baseSlice_default, init__baseSlice, capitalize_default, init_capitalize, isJetBrainsPluginInstalledCachedSync, init_jetbrains, WindowsToWSLConverter, init_idePathConversion, IdeOnboardingDialog, init_IdeOnboardingDialog, isJetBrainsIde, isSupportedVSCodeTerminal, isSupportedJetBrainsTerminal, isSupportedTerminal, getTerminalIdeType, getSortedIdeLockfiles, detectIDEs, hasAccessToIDEExtensionDiffFeature, isCursorInstalled, isWindsurfInstalled, isVSCodeInstalled, detectRunningIDEs, detectRunningIDEsCached, getConnectedIdeName, toIDEDisplayName, getConnectedIdeClient, closeOpenDiffs, initializeIdeIntegration, init_ide, getXDGStateHome, init_xdg, isPidBasedLockingEnabled, getAllLockInfo, cleanupStaleLocks, init_pidLock, checkInstall, installLatest, lockCurrentVersion, cleanupOldVersions, removeInstalledSymlink, cleanupShellAliases, cleanupNpmInstallations, init_nativeInstaller, getSettingsWithAllErrors, init_allErrors, buildSandboxProperties, buildIDEProperties, buildMcpProperties, buildMemoryDiagnostics, buildSettingSourcesProperties, buildInstallationDiagnostics, buildInstallationHealthDiagnostics, buildAccountProperties, buildAPIProviderProperties, getModelDisplayLabel, init_status, installOAuthTokens, authLogin, authStatus, authLogout, init_auth4 as init_auth, sendNotification, init_notifier, PASTE_THRESHOLD, getImageFromClipboard, init_imagePaste, cacheImagePath, storeImage, storeImages, clearStoredImagePaths, cleanupOldImageCaches, init_imageStore, ListItem, init_ListItem, useRegisterOverlay, useIsOverlayActive, useIsModalOverlayActive, init_overlayContext, Select, init_select, TOOL_DISPLAY_EXPIRY_MS, timestamp, buildBridgeConnectUrl, buildBridgeSessionUrl, getBridgeStatus, buildIdleFooterText, buildActiveFooterText, FAILED_FOOTER_TEXT, wrapWithOsc8Link, init_bridgeStatusUtil, sample_default, init_sample, activityManager, init_activityManager, isInProcessTeammateTask, init_types7 as init_types1, TaskListV2, init_TaskListV2, useTasksV2, useTasksV2WithCollapseEffect, init_useTasksV2, toRGBColor, hueToRgb, init_utils3 as init_utils1, ShimmerChar, init_ShimmerChar, SpinnerGlyph, init_SpinnerGlyph, useShimmerAnimation, init_useShimmerAnimation, toInkColor, init_ink2 as init_ink, isBackgroundTask, init_types10 as init_types2, McpServerConfigForProcessTransportSchema, McpServerStatusSchema, PermissionUpdateSchema, PermissionModeSchema, HookEventSchema, HookInputSchema, SlashCommandSchema, AgentInfoSchema, ModelInfoSchema, AccountInfoSchema, AgentDefinitionSchema, SDKUserMessageSchema, SDKStreamlinedTextMessageSchema, SDKStreamlinedToolUseSummaryMessageSchema, SDKPostTurnSummaryMessageSchema, SDKMessageSchema, FastModeStateSchema, init_coreSchemas, readUnreadMessages, writeToMailbox, markMessagesAsRead, createIdleNotification, isPermissionRequest, isPermissionResponse, isSandboxPermissionRequest, isSandboxPermissionResponse, sendShutdownRequestToMailbox, isShutdownRequest, isPlanApprovalRequest, isShutdownApproved, isPlanApprovalResponse, isTeamPermissionUpdate, createModeSetRequestMessage, isModeSetRequest, getLastPeerDmSummary, init_teammateMailbox, permissionUpdateSchema, init_PermissionUpdateSchema, createPermissionRequest, isSwarmWorker, sendPermissionRequestViaMailbox, sendPermissionResponseViaMailbox, generateSandboxRequestId, sendSandboxPermissionRequestViaMailbox, sendSandboxPermissionResponseViaMailbox, init_permissionSync, registerPermissionCallback, hasPermissionCallback, clearAllPendingCallbacks, processMailboxPermissionResponse, registerSandboxPermissionCallback, hasSandboxPermissionCallback, processSandboxPermissionResponse, init_useSwarmPermissionPoller, TOOL_RESULTS_SUBDIR, processToolResultBlock, provisionContentReplacementState, reconstructContentReplacementState, init_toolResultStorage, registerLeaderToolUseConfirmQueue, getLeaderToolUseConfirmQueue, unregisterLeaderToolUseConfirmQueue, registerLeaderSetToolPermissionContext, unregisterLeaderSetToolPermissionContext, init_leaderPermissionBridge, exports_teammatePromptAddendum, init_teammatePromptAddendum, ensureBackendsRegistered, registerTmuxBackend, registerITermBackend, detectAndGetBackend, getBackendByType, getCachedBackend, getCachedDetectionResult, markInProcessFallback, isInProcessEnabled, getResolvedTeammateMode, getInProcessBackend, getTeammateExecutor, resetBackendDetection, init_registry, InProcessTeammateTask, injectUserMessageToTeammate, findTeammateTaskByAgentId, getAllInProcessTeammateTasks, getRunningTeammatesSorted, exports_InProcessTeammateTask, init_InProcessTeammateTask, getViewedTeammateTask, getActiveAgentForInput, init_selectors, useElapsedTime, init_useElapsedTime, SpinnerWithVerb, BriefIdleStatus, Spinner, init_Spinner2 as init_Spinner, ConsoleOAuthFlow, init_ConsoleOAuthFlow, extraUsage, init_extra_usage, useClaudeAiLimits, init_claudeAiLimitsHook, AssistantThinkingMessage, init_AssistantThinkingMessage, clearClassifierChecking, init_classifierApprovals, SentryErrorBoundary, init_SentryErrorBoundary, UserBashInputMessage, init_UserBashInputMessage, UserPlanMessage, init_UserPlanMessage, QueuedMessageProvider, init_QueuedMessageContext, UserTextMessage, init_UserTextMessage, diagnosticTracker, init_diagnosticTracking, FilePathLink, init_FilePathLink, PrBadge, init_PrBadge, getPillLabel, pillNeedsCta, init_pillLabel, OffscreenFreeze, init_OffscreenFreeze, hasThinkingContent, Message, init_Message, renderToolUseProgressMessage4 as renderToolUseProgressMessage, init_UI11 as init_UI, recordSkillUsage, getSkillUsageScore, init_skillUsageTracking, buildPluginTelemetryFields, buildPluginCommandTelemetryFields, logPluginsEnabledForSession, classifyPluginCommandError, logPluginLoadErrors, init_pluginTelemetry, runAgent, init_runAgent, TodoListSchema, init_types8 as init_types3, TodoWriteTool, init_TodoWriteTool, fetchEnvironments, init_environments, SelectMulti, init_SelectMulti, init_CustomSelect, TeleportError, init_TeleportError, KeybindingSetup, init_KeybindingProviderSetup, clearAllSessions, init_sessionIngress, fileHistoryEnabled, fileHistoryMakeSnapshot, fileHistoryRewind, fileHistoryCanRestore, fileHistoryGetDiffStats, fileHistoryHasAnyChanges, fileHistoryRestoreStateFromLog, copyFileHistoryForResume, init_fileHistory, init_outputsScanner, generateShortWordSlug, init_words, getPlanSlug, setPlanSlug, clearAllPlanSlugs, getPlansDirectory, getPlanFilePath, getPlan, copyPlanForResume, copyPlanForFork, init_plans, captureHooksConfigSnapshot, updateHooksConfigSnapshot, init_hooksConfigSnapshot, setEnvHookNotifier, initializeFileChangedWatcher, init_fileChangedWatcher, loadPluginHooks, clearPluginHookCache, pruneRemovedPluginHooks, resetHotReloadState, getPluginAffectingSettingsSnapshot, setupPluginHookHotReload, init_loadPluginHooks, takeInitialUserMessage, processSessionStartHooks, processSetupHooks, init_sessionStart, deserializeMessages, loadConversationForResume, init_conversationRecovery, downloadSessionFiles, parseFileSpecs, init_filesApi, generateTempFilePath, init_tempfile, validateGitState, processMessagesForTeleportResume, checkOutTeleportedSessionBranch, validateSessionRepository, teleportResumeCodeSession, teleportToRemoteWithErrorHandling, teleportFromSessionsAPI, pollRemoteSessionEvents, teleportToRemote, archiveRemoteSession, init_teleport, checkRemoteAgentEligibility, formatPreconditionError, registerRemoteAgentTask, restoreRemoteAgentTasks, RemoteAgentTask, getRemoteTaskSessionUrl, init_RemoteAgentTask, SkillTool, init_SkillTool, resetAllLSPDiagnosticState, init_LSPDiagnosticRegistry, loadPluginLspServers, init_lspPluginIntegration, getLspServerManager, getInitializationStatus, initializeLspServerManager, reinitializeLspServerManager, shutdownLspServerManager, init_manager, parseArguments, generateProgressiveArgumentHint, init_argumentSubstitution, clearPendingHint, markShownThisSession, subscribeToPendingHint, getPendingHintSnapshot, init_claudeCodeHints, isPluginBlockedByPolicy, init_pluginPolicy, resolvePluginHint, markHintPluginShown, disableHintRecommendations, init_hintRecommendation, CircularBuffer, init_CircularBuffer, validateBoundedIntEnvVar, init_envValidation, BASH_MAX_OUTPUT_UPPER_LIMIT, BASH_MAX_OUTPUT_DEFAULT, init_outputLimits, clearSessionEnvVars, init_sessionEnvVars, exec, setCwd, init_Shell, ShellProgressMessage, init_ShellProgressMessage, parseSedEditCommand, applySedSubstitution, init_sedEditParser, parsePowerShellCommandCached, getAllCommands2 as getAllCommands, init_parser3 as init_parser, isAllowlistedCommand, init_readOnlyValidation, NEVER_SUGGEST, init_dangerousCmdlets, PowerShellTool, exports_PowerShellTool, init_PowerShellTool, getSkillsPath, estimateSkillFrontmatterTokens, clearSkillCaches, onDynamicSkillsLoaded, clearDynamicSkills, init_loadSkillsDir, getStoredSessionCosts, restoreCostStateForSession, saveCurrentSessionCosts, formatCost, formatTotalCost, init_cost_tracker, CONTEXT_LINES, adjustHunkLineNumbers, getPatchFromContents, getPatchForDisplay, init_diff, fetchGitDiff, fetchGitDiffHunks, init_gitDiff, getColorModuleUnavailableReason, getSyntaxTheme2 as getSyntaxTheme, init_colorDiff, HighlightedCode, init_HighlightedCode, StructuredDiff, init_StructuredDiff, StructuredDiffList, init_StructuredDiffList, CHUNK_SIZE, openForScan, scanForContext, readCapped, init_readEditContext, findActualString, preserveQuoteStyle, getPatchForEdits, getEditsForPatch, init_utils as init_utils2, FileEditTool, init_FileEditTool, FileWriteTool, init_FileWriteTool, getGlobExclusionsForPluginCache, clearPluginCacheExclusions, init_orphanedPluginFilter, GrepTool, init_GrepTool, GlobTool, init_GlobTool, parseCellId, init_notebook, NotebookEditTool, init_NotebookEditTool, clearWebFetchCache, MAX_MARKDOWN_LENGTH, isPreapprovedUrl, validateURL, checkDomainBlocklist, isPermittedRedirect, getWithPermittedRedirects, getURLMarkdownContent, applyPromptToMarkdown, init_utils7 as init_utils3, WebFetchTool, init_WebFetchTool, readLastConsolidatedAt, init_consolidationLock, DreamTask, init_DreamTask, stopTask, init_stopTask, TaskStopTool, init_TaskStopTool, exports_BriefTool, init_BriefTool, TASK_MAX_OUTPUT_UPPER_LIMIT, TASK_MAX_OUTPUT_DEFAULT, init_outputFormatting, TaskOutputTool, init_TaskOutputTool, WebSearchTool, init_WebSearchTool, findInProcessTeammateTaskId, handlePlanApprovalResponse, init_inProcessTeammateHelpers, ExitPlanModeV2Tool, init_ExitPlanModeV2Tool, AskUserQuestionTool, init_AskUserQuestionTool, init_prompt23 as init_prompt10, ReadMcpResourceTool, init_ReadMcpResourceTool, isPlanModeInterviewPhaseEnabled, getPewterLedgerVariant, init_planModeV2, EnterPlanModeTool, init_EnterPlanModeTool, getModelOptions, init_modelOptions, init_voiceModeEnabled, validateModel, init_validateModel, registerSession, updateSessionName, updateSessionBridgeId, countConcurrentSessions, init_concurrentSessions, init_replBridgeHandle, startBackgroundSession, init_LocalMainSessionTask, buildEffectiveSystemPrompt, init_systemPrompt, resumeAgentBackground, init_resumeAgent, getAllBaseTools, filterToolsByDenyRules, getTools, assembleToolPool, init_tools2 as init_tools1, getHardcodedTeammateModelFallback, init_teammateModel, isAutoManagedMemoryFile, init_memoryFileDetection, getToolSearchOrReadInfo, getToolUseIdsFromCollapsedGroup, hasAnyToolInProgress, getDisplayMessageFromCollapsed, collapseReadSearchGroups, summarizeRecentActivities, init_collapseReadSearch, isLocalAgentTask, isPanelAgentTask, queuePendingMessage, appendMessageToLocalAgent, LocalAgentTask, killAllRunningAgentTasks, markAgentsNotified, init_LocalAgentTask, BACKGROUND_BASH_SUMMARY_PREFIX, LocalShellTask, hasForegroundTasks, backgroundAll, init_LocalShellTask, isMemoryFileAccess, registerSessionFileAccessHooks, init_sessionFileAccessHooks, init_undercover, BashTool, init_BashTool, getSimpleCommandPrefix, getFirstWordPrefix, clearSpeculativeChecks, init_bashPermissions, Stream, init_stream2 as init_stream, getErrorParts, init_toolErrors, startQueryProfile, queryCheckpoint, logQueryProfileReport, init_queryProfiler, isAutoDreamEnabled, init_config5 as init_config1, init_readFileInRange, initAutoDream, init_autoDream, init_tokenBudget, query, init_query, init_logging, getLastCacheSafeParams, createCacheSafeParams, prepareForkedCommandContext, extractResultText, createSubagentContext, runForkedAgent, init_forkedAgent, logPermissionContextForAnts, init_internalLogging, ERROR_MESSAGE_NOT_ENOUGH_MESSAGES, ERROR_MESSAGE_USER_ABORT, ERROR_MESSAGE_INCOMPLETE_RESPONSE, buildPostCompactMessages, mergeHookInstructions, compactConversation, partialCompactConversation, init_compact, runPostCompactCleanup, init_postCompactCleanup, loadSessionMemoryTemplate, buildSessionMemoryUpdatePrompt, init_prompts3 as init_prompts, shouldUseSessionMemoryCompaction, trySessionMemoryCompaction, init_sessionMemoryCompact, getEffectiveContextWindowSize, calculateTokenWarningState, isAutoCompactEnabled, init_autoCompact, countMcpToolTokens, analyzeContextUsage, init_analyzeContext, zodToJsonSchema3 as zodToJsonSchema, init_zodToJsonSchema2 as init_zodToJsonSchema, getAutoToolSearchCharThreshold, getToolSearchMode, modelSupportsToolReference, isToolSearchEnabledOptimistic, isToolSearchToolAvailable, isToolSearchEnabled, isToolReferenceBlock, extractDiscoveredToolNames, isDeferredToolsDeltaEnabled, getDeferredToolsDelta, init_toolSearch, roughTokenCountEstimation, init_tokenEstimation, registerFileReadListener, FileReadTool, init_FileReadTool, isValidImagePaste, init_textInputTypes, registerHookEventHandler, setAllHookEventsEnabled, init_hookEvents, finalizePendingAsyncHooks, init_AsyncHookRegistry, isHumanTurn, init_messagePredicates, getQueuedCommandAttachments, resetSentSkillNames, getAttachmentMessages, createAttachmentMessage, init_attachments2 as init_attachments, getPluginCommands, init_loadPluginCommands, isPluginZipCacheEnabled, getPluginZipCachePath, getZipCacheKnownMarketplacesPath, getZipCacheMarketplacesDir, getZipCachePluginsDir, cleanupSessionPluginCache, atomicWriteToZipCache, getMarketplaceJsonRelativePath, isMarketplaceSourceSupportedByZipCache, init_zipCache, clearAllCaches, markPluginVersionOrphaned, cleanupOrphanedPluginVersionsInBackground, init_cacheUtils, formatFailureDetails, getMarketplaceSourceDisplay, createPluginId, loadMarketplacesWithGracefulDegradation, formatMarketplaceLoadingErrors, getPluginTrustMessage, isSourceAllowedByPolicy, detectEmptyMarketplaceReason, init_marketplaceHelpers, fetchOfficialMarketplaceFromGcs, init_officialMarketplaceGcs, getMarketplacesCacheDir, clearMarketplacesCache, getDeclaredMarketplaces, saveMarketplaceToSettings, loadKnownMarketplacesConfig, loadKnownMarketplacesConfigSafe, saveKnownMarketplacesConfig, registerSeedMarketplaces, addMarketplaceSource, removeMarketplaceSource, getMarketplace, getPluginById, refreshAllMarketplaces, refreshMarketplace, setMarketplaceAutoUpdate, init_marketplaceManager, loadInstalledPluginsV2, removePluginInstallation, getInMemoryInstalledPlugins, loadInstalledPluginsFromDisk, updateInstallationPathOnDisk, initializeVersionedPlugins, isInstallationRelevantToCurrentProject, isPluginInstalled, isPluginGloballyInstalled, migrateFromEnabledPlugins, init_installedPluginsManager, getManagedPluginNames, init_managedPlugins, calculatePluginVersion, init_pluginVersioning, cacheAndRegisterPlugin, registerPluginInstallation, formatResolutionError, installResolvedPlugin, installPluginFromMarketplace, init_pluginInstallationHelpers, getVersionedCachePath, getVersionedZipCachePath, copyPluginToVersionedCache, cachePlugin, loadPluginManifest, loadAllPlugins, loadAllPluginsCacheOnly, clearPluginCache, init_pluginLoader, DEFAULT_OUTPUT_STYLE_NAME, OUTPUT_STYLE_CONFIG, getAllOutputStyles, init_outputStyles, withMemoryCorrectionHint, INTERRUPT_MESSAGE, INTERRUPT_MESSAGE_FOR_TOOL_USE, REJECT_MESSAGE, REJECT_MESSAGE_WITH_REASON_PREFIX, SUBAGENT_REJECT_MESSAGE, SUBAGENT_REJECT_MESSAGE_WITH_REASON_PREFIX, SYNTHETIC_MODEL, SYNTHETIC_MESSAGES, isSyntheticMessage, getLastAssistantMessage, hasToolCallsInLastAssistantTurn, createAssistantMessage, createUserMessage, prepareUserContent, createUserInterruptionMessage, createSyntheticUserCaveatMessage, formatCommandInputTags, createModelSwitchBreadcrumbs, extractTag, isNotEmptyMessage, deriveUUID, normalizeMessages, isToolUseResultMessage, reorderMessagesInUI, buildMessageLookups, EMPTY_LOOKUPS, EMPTY_STRING_SET, getSiblingToolUseIDsFromLookup, getProgressMessagesFromLookup, hasUnresolvedHooksFromLookup, getToolUseIDs, isSystemLocalCommandMessage, normalizeMessagesForAPI, isEmptyMessageText, stripPromptXMLTags, getToolUseID, getUserMessageText, textForResubmit, extractTextContent, getContentText, handleMessageFromStream, createSystemMessage, createPermissionRetryMessage, createScheduledTaskFireMessage, createTurnDurationMessage, createAgentsKilledMessage, createCommandInputMessage, isCompactBoundaryMessage, getMessagesAfterCompactBoundary, shouldShowUserMessage, countToolCalls, stripSignatureBlocks, init_messages2 as init_messages1, isNavigableMessage, toolCallOf, MessageActionsSelectedContext, InVirtualListContext, useMessageActions, MessageActionsBar, stripSystemReminders, init_messageActions, init_prompt14 as init_prompt11, ListMcpResourcesTool, init_ListMcpResourcesTool, ProgressBar, init_ProgressBar, _baseEach_default, init__baseEach, reject_default, init_reject, isXaaEnabled, getXaaIdpSettings, issuerKey, getCachedIdpIdToken, saveIdpIdTokenFromJwt, clearIdpIdToken, saveIdpClientSecret, getIdpClientSecret, clearIdpClientSecret, acquireIdpIdToken, init_xaaIdpLogin, AuthenticationCancelledError, revokeServerTokens, clearServerTokensFromLocalStorage, performMCPOAuthFlow, ClaudeAuthProvider, readClientSecret, saveMcpClientSecret, clearMcpClientConfig, getMcpClientConfig, init_auth5 as init_auth1, recursivelySanitizeUnicode, init_sanitization, registerElicitationHandler, runElicitationHooks, runElicitationResultHooks, init_elicitationHandler, getMcpServerConnectionBatchSize, connectToServer, clearServerCache, areMcpConfigsEqual, fetchToolsForClient, fetchResourcesForClient, fetchCommandsForClient, callIdeRpc, reconnectMcpServerImpl, getMcpToolsCommandsAndResources, prefetchAllMcpResources, setupSdkMcpClients, init_client5 as init_client, prependUserContext, logContextMetrics, init_api2 as init_api, verifyApiKey, queryModelWithoutStreaming, updateUsage, accumulateUsage, queryHaiku, queryWithModel, init_claude, splitCommand_DEPRECATED, clearCommandPrefixCaches, extractOutputRedirections, init_commands, shouldUseSandbox, init_shouldUseSandbox, permissionRuleSourceDisplayString, getAllowRules, getDenyRules, getAskRules, hasPermissionsToUseTool, deletePermissionRule, init_permissions2 as init_permissions, transitionPermissionMode, initialPermissionModeFromCLI, parseToolListFromCLI, initializeToolPermissionContext, getAutoModeUnavailableNotification, shouldDisableBypassPermissions, getAutoModeUnavailableReason, isBypassPermissionsModeDisabled, createDisabledBypassPermissionsContext, checkAndDisableBypassPermissions, prepareContextForPlanMode, transitionPlanAutoMode, init_permissionSetup, applySettingsChange, init_applySettingsChange, AppStateProvider, useAppState, useSetAppState, useAppStateStore, init_AppState, useNotifications, init_notifications, useClipboardImageHint, init_useClipboardImageHint, prependModeCharacterToInput, getModeFromInput, getValueFromInput, init_inputModes, cleanupOldPastes, init_pasteStore, getPastedTextRefNumLines, formatPastedTextRef, formatImageRef, parseReferences, expandPastedTextRefs, makeHistoryReader, getHistory, addToHistory, removeLastFromHistory, init_history, pushToKillRing, getLastKill, resetKillAccumulation, recordYank, yankPop, updateYankLength, resetYankState, isVimWordChar, isVimWhitespace, isVimPunctuation, Cursor, init_Cursor, useTextInput, init_useTextInput, BaseTextInput, init_BaseTextInput, TextInput, init_TextInput, getWorktreePaths, init_getWorktreePaths, isUltrareviewEnabled, init_ultrareviewEnabled, review_default, init_review, validateBridgeId, BridgeFatalError, createBridgeApiClient, isExpiredErrorType, isSuppressible403, init_bridgeApi, registerBridgeDebugHandle, clearBridgeDebugHandle, injectBridgeFault, wrapApiForFaultInjection, init_bridgeDebug, registerBundledSkill, init_bundledSkills, exit_default, init_exit, upgrade_default, init_upgrade, getCommandName, isCommandEnabled, builtInCommandNames, getCommands, clearCommandMemoizationCaches, clearCommandsCache, getSkillToolCommands, getSlashCommandToolSkills, REMOTE_SAFE_COMMANDS, isBridgeSafeCommand, filterCommandsForRemoteMode, findCommand, hasCommand, getCommand, formatDescriptionWithSource, init_commands2 as init_commands1, isTranscriptMessage, isChainParticipant, isEphemeralToolProgress, getProjectsDir2 as getProjectsDir, getTranscriptPath, getTranscriptPathForSession, MAX_TRANSCRIPT_READ_BYTES, setAgentTranscriptSubdir, clearAgentTranscriptSubdir, getAgentTranscriptPath, writeAgentMetadata, readAgentMetadata, writeRemoteAgentMetadata, readRemoteAgentMetadata, deleteRemoteAgentMetadata, listRemoteAgentMetadata, sessionIdExists, getNodeEnv, getUserType, isCustomTitleEnabled, getProjectDir, resetProjectFlushStateForTesting, resetProjectForTesting, setSessionFileForTesting, setInternalEventWriter, setInternalEventReader, setRemoteIngressUrlForTesting, recordTranscript, recordSidechainTranscript, recordQueueOperation, removeTranscriptMessage, recordFileHistorySnapshot, recordAttributionSnapshot, recordContentReplacement, resetSessionFilePointer, adoptResumedSessionFile, recordContextCollapseCommit, recordContextCollapseSnapshot, flushSessionStorage, hydrateRemoteSession, hydrateFromCCRv2InternalEvents, getFirstMeaningfulUserMessageTextContent, removeExtraFields, buildConversationChain, checkResumeConsistency, loadTranscriptFromFile, fetchLogs, saveCustomTitle, saveAiGeneratedTitle, saveTaskSummary, saveTag, linkSessionToPR, getCurrentSessionTag, getCurrentSessionTitle, getCurrentSessionAgentColor, restoreSessionMetadata, clearSessionMetadata, reAppendSessionMetadata, saveAgentName, saveAgentColor, saveAgentSetting, cacheSessionTitle, saveMode, saveWorktreeState, getSessionIdFromLog, isLiteLog, loadFullLog, searchSessionsByCustomTitle, loadTranscriptFile, clearSessionMessagesCache, doesMessageExistInSession, getLastSessionLog, loadMessageLogs, loadAllProjectsMessageLogs, loadAllProjectsMessageLogsProgressive, loadSameRepoMessageLogs, loadSameRepoMessageLogsProgressive, getAgentTranscript, extractAgentIdsFromMessages, extractTeammateTranscriptsFromTasks, loadSubagentTranscripts, loadAllSubagentTranscriptsFromDisk, isLoggableMessage, cleanMessagesForLogging, getLogByIndex, findUnresolvedToolUse, getSessionFilesWithMtime, loadAllLogsFromSessionFile, getSessionFilesLite, enrichLogs, exports_sessionStorage, init_sessionStorage, loadMemoryPrompt, init_memdir, getAgentMemoryDir, getMemoryScopeDisplay, loadAgentMemoryPrompt, init_agentMemory, normalizeCaseForComparison2 as normalizeCaseForComparison, getSessionMemoryDir, getSessionMemoryPath, isScratchpadEnabled, getScratchpadDir, ensureScratchpadDir, pathInAllowedWorkingPath, generateSuggestions, init_filesystem, getTaskOutputPath, evictTaskOutput, initTaskOutputAsSymlink, init_diskOutput, isTerminalTaskStatus, init_Task, hookJSONOutputSchema, init_hooks2 as init_hooks, createCombinedAbortSignal, init_combinedAbortSignal, registerStructuredOutputEnforcement, init_hookHelpers, getSessionEndHookTimeoutMs, shouldSkipHookDueToTrust, createBaseHookInput, getMatchingHooks, getPreToolHookBlockingMessage, getStopHookMessage, getTeammateIdleHookMessage, getTaskCreatedHookMessage, getTaskCompletedHookMessage, getUserPromptSubmitHookBlockingMessage, hasBlockingResult, executePreToolHooks, executePostToolHooks, executePostToolUseFailureHooks, executePermissionDeniedHooks2 as executePermissionDeniedHooks, executeNotificationHooks, executeStopFailureHooks, executeStopHooks, executeTeammateIdleHooks, executeTaskCreatedHooks, executeTaskCompletedHooks, executeUserPromptSubmitHooks, executeSessionStartHooks, executeSetupHooks, executeSubagentStartHooks, executePreCompactHooks, executePostCompactHooks, executeSessionEndHooks, executePermissionRequestHooks, executeConfigChangeHooks, executeCwdChangedHooks, executeFileChangedHooks, hasInstructionsLoadedHook, executeInstructionsLoadedHooks, executeElicitationHooks, executeElicitationResultHooks, executeStatusLineCommand, executeFileSuggestionCommand, hasWorktreeCreateHook, executeWorktreeCreateHook, executeWorktreeRemoveHook, init_hooks3 as init_hooks1, validateWorktreeSlug, getCurrentWorktreeSession, restoreWorktreeSession, generateTmuxSessionName, worktreeBranchName, copyWorktreeIncludeFiles, parsePRReference, isTmuxAvailable2 as isTmuxAvailable, getTmuxInstallInstructions, createTmuxSessionForWorktree, killTmuxSession, createWorktreeForSession, keepWorktree, cleanupWorktree, createAgentWorktree, removeAgentWorktree, cleanupStaleAgentWorktrees, hasWorktreeChanges, execIntoTmuxWorktree, init_worktree, CLAUDE_CODE_DOCS_MAP_URL2 as CLAUDE_CODE_DOCS_MAP_URL, SYSTEM_PROMPT_DYNAMIC_BOUNDARY, prependBullets, getSystemPrompt, computeEnvInfo, computeSimpleEnvInfo, getUnameSR, DEFAULT_AGENT_PROMPT, enhanceSystemPromptWithEnvDetails, getScratchpadInstructions, init_prompts as init_prompts1 };
|
|
172372
|
+
export { BASH_TOOL_NAME, init_toolName, GREP_TOOL_NAME, init_prompt4 as init_prompt, FILE_EDIT_TOOL_NAME, CLAUDE_FOLDER_PERMISSION_PATTERN, GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN, init_constants5 as init_constants, FILE_READ_TOOL_NAME, init_prompt5 as init_prompt1, init_prompt6 as init_prompt2, init_prompt7 as init_prompt3, init_constants6 as init_constants1, MessageResponse, init_MessageResponse, validateDirectoryForWorkspace, addDirHelpMessage, init_validation2 as init_validation, createStore, init_store, init_voice, useMailbox, init_mailbox2 as init_mailbox, settingsChangeDetector, init_changeDetector, useSettingsChange, init_useSettingsChange, getEmptyToolPermissionContext, toolMatchesName, findToolByName, init_Tool, getSessionStartDate, init_common2 as init_common, g, init_marked_esm, parseYaml, init_yaml, FRONTMATTER_REGEX, parseFrontmatter, init_frontmatterParser, MAX_MEMORY_CHARACTER_COUNT, getMemoryFiles, clearMemoryFileCaches, resetGetMemoryFilesCache, getLargeMemoryFiles, getExternalClaudeMdIncludes, hasExternalClaudeMdIncludes, shouldShowClaudeMdExternalIncludesWarning, init_claudemd, setSystemPromptInjection, getGitStatus, getSystemContext, getUserContext, init_context2 as init_context, isZ4Schema, safeParse2 as safeParse, getObjectShape, init_zod_compat, Protocol, mergeCapabilities, init_protocol, AjvJsonSchemaValidator, init_ajv_provider, assertToolsCallTaskCapability, assertClientRequestTaskCapability, init_helpers, mapValues_default, init_mapValues, getRemoteSessionUrl, init_product, DEFAULT_BINDINGS, init_defaultBindings, NON_REBINDABLE, TERMINAL_RESERVED, MACOS_RESERVED, normalizeKeyForComparison, init_reservedShortcuts, isKeybindingCustomizationEnabled, getKeybindingsPath, loadKeybindingsSyncWithWarnings, getCachedKeybindingWarnings, init_loadUserBindings, getShortcutDisplay, init_shortcutFormat, last_default, init_last, duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom, chonk, RARITY_COLORS, init_types6 as init_types, getCompanion, init_companion, NO_CONTENT_MESSAGE, init_messages, ripGrep2 as ripGrep, countFilesRoundedRg, init_ripgrep2 as init_ripgrep, isRestrictedToPluginOnly, isSourceAdminTrusted, init_pluginOnlyPolicy, CLAUDE_CONFIG_DIRECTORIES, loadMarkdownFilesForSubdir, init_markdownConfigLoader, getPluginErrorMessage, init_plugin, isBuiltinPluginId, getBuiltinPluginDefinition, init_builtinPlugins, getAddDirEnabledPlugins, init_addDirPluginSettings, SETTING_SOURCE_TO_SCOPE, parsePluginIdentifier, isOfficialMarketplaceName, scopeToSettingSource, init_pluginIdentifier, findReverseDependents, formatReverseDependentsSuffix, init_dependencyResolver, OFFICIAL_MARKETPLACE_SOURCE, OFFICIAL_MARKETPLACE_NAME, init_officialMarketplace, logPluginFetch, classifyFetchError, init_fetchTelemetry, checkGitAvailable, markGitUnavailable, init_gitAvailability, SandboxViolationStore, SandboxRuntimeConfigSchema, WEB_FETCH_TOOL_NAME, init_prompt10 as init_prompt4, resolvePathPatternForSandbox, resolveSandboxFilesystemPath, shouldAllowManagedSandboxDomainsOnly, convertToSandboxRuntimeConfig, addToExcludedCommands, SandboxManager2 as SandboxManager, init_sandbox_adapter, getPluginsDirectory, getPluginSeedDirs, pluginDataDirPath, getPluginDataDirSize, deletePluginDataDir, init_pluginDirectories, isUltrathinkEnabled, findThinkingTriggerPositions, getRainbowColor, modelSupportsAdaptiveThinking, shouldEnableThinkingByDefault, init_thinking, EFFORT_LEVELS, modelSupportsEffort, modelSupportsMaxEffort, isEffortLevel, parseEffortValue, toPersistableEffort, getInitialEffortSetting, resolvePickerEffortPersistence, getEffortEnvOverride, resolveAppliedEffort, getDisplayedEffortLevel, getEffortSuffix, convertEffortValueToLevel, getEffortValueDescription, getOpusDefaultEffortConfig, getDefaultEffortForModel, init_effort, isMcpbSource, loadMcpServerUserConfig, saveMcpServerUserConfig, loadMcpbFile, init_mcpbHandler, loadPluginOptions, savePluginOptions, deletePluginOptions, getUnconfiguredOptions, init_pluginOptionsStorage, loadPluginAgents, init_loadPluginAgents, AGENT_COLORS, AGENT_COLOR_TO_THEME_COLOR, getAgentColor, setAgentColor, init_agentColorManager, init_prompt11 as init_prompt5, CLAUDE_CODE_GUIDE_AGENT_TYPE, init_claudeCodeGuideAgent, EXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_MODE_V2_TOOL_NAME, init_constants11 as init_constants2, isBuiltInAgent, isCustomAgent, isPluginAgent, getActiveAgentsFromList, hasRequiredMcpServers, filterAgentsByMcpRequirements, getAgentDefinitionsWithOverrides, clearAgentDefinitionsCache, parseAgentFromJson, parseAgentsFromJson, parseAgentFromMarkdown, init_loadAgentsDir, SKILL_BUDGET_CONTEXT_PERCENT, CHARS_PER_TOKEN, DEFAULT_CHAR_BUDGET, MAX_LISTING_DESC_CHARS, getCharBudget, formatCommandsWithinBudget, getPrompt2 as getPrompt, getSkillToolInfo, getLimitedSkillToolCommands, clearPromptCache, getSkillInfo, init_prompt16 as init_prompt6, POWERSHELL_TOOL_NAME, init_toolName2 as init_toolName1, SHELL_TOOL_NAMES, isPowerShellToolEnabled, init_shellToolUtils, diffLines, init_libesm, resetPromptCacheBreakDetection, init_promptCacheBreakDetection, compactWarningStore, suppressCompactWarning, init_compactWarningState, resetMicrocompactState, microcompactMessages, init_microCompact, getTokenUsage, tokenCountFromLastAPIResponse, getCurrentUsage, doesMostRecentAssistantMessageExceed200k, getAssistantMessageContentLength, tokenCountWithEstimation, init_tokens, DEFAULT_SESSION_MEMORY_CONFIG, setLastSummarizedMessageId, markExtractionStarted, markExtractionCompleted, getSessionMemoryContent, setSessionMemoryConfig, getSessionMemoryConfig, recordExtractionTokenCount, isSessionMemoryInitialized, markSessionMemoryInitialized, hasMetInitializationThreshold, hasMetUpdateThreshold, getToolCallsBetweenUpdates, init_sessionMemoryUtils, uniqBy_default, init_uniqBy, inputSchema21 as inputSchema, outputSchema18 as outputSchema, clearToolSearchDescriptionCache, ToolSearchTool, init_ToolSearchTool, maybeResizeAndDownsampleImageBlock, detectImageFormatFromBase64, createImageMetadataText, init_imageResizer, getRateLimitWarning, getUsingOverageText, currentLimits, getRawUtilization, statusListeners, checkQuotaStatus, init_claudeAiLimits, getSSLErrorHint, formatAPIError, init_errorUtils, startsWithApiErrorPrefix, categorizeRetryableAPIError, init_errors3 as init_errors, init_withRetry, asSystemPrompt, init_systemPromptType, subscribeToCommandQueue, getCommandQueueSnapshot, getCommandQueue, getCommandQueueLength, hasCommandsInQueue, enqueue, enqueuePendingNotification, dequeue, peek, dequeueAllMatching, removeByFilter, clearCommandQueue, isQueuedCommandEditable, isQueuedCommandVisible, popAllEditable, getCommandsByMaxPriority, init_messageQueueManager, setCommandLifecycleListener, notifyCommandLifecycle, init_commandLifecycle, headlessProfilerStartTurn, headlessProfilerCheckpoint, logHeadlessProfilerTurn, init_headlessProfiler, SLEEP_TOOL_NAME, init_prompt13 as init_prompt7, registerPostSamplingHook, init_postSamplingHooks, clearAllDumpState, init_dumpPrompts, createAbortController, init_abortController, getCliHighlightPromise, getLanguageName, init_cliHighlight, logPermissionDecision, init_permissionLogging, tryParseShellCommand, quote, init_shellQuote, PROMPT_PREFIX, createPromptRuleContent, isClassifierPermissionsEnabled, getBashPromptAllowDescriptions, generateGenericDescription, init_bashClassifier, shouldShowAlwaysAllowOptions, getPermissionRulesForSource, init_permissionsLoader, extractRules, hasRules, applyPermissionUpdate, applyPermissionUpdates, supportsPersistence, persistPermissionUpdate, persistPermissionUpdates, init_PermissionUpdate, permissionRuleExtractPrefix, init_shellRuleMatching, setupVscodeSdkMcp, init_vscodeSdkMcp, shouldEnablePromptSuggestion, abortPromptSuggestion, tryGenerateSuggestion, logSuggestionOutcome, logSuggestionSuppressed, init_promptSuggestion, IDLE_SPECULATION_STATE, getDefaultAppState, init_AppStateStore, toArray, fromArray, init_generators, isResultSuccessful, normalizeMessage, handleOrphanedPermission, extractReadFilesFromMessages, extractBashToolsFromMessages, init_queryHelpers, abortSpeculation, handleSpeculationAccept, init_speculation, enqueueSdkEvent, drainSdkEvents, emitTaskTerminatedSdk, init_sdkEventQueue, updateTaskState, getRunningTasks, init_framework, escapeXml, escapeXmlAttr, init_xml2 as init_xml, SYNTHETIC_OUTPUT_TOOL_NAME, isSyntheticOutputToolEnabled, createSyntheticOutputTool, init_SyntheticOutputTool, asSessionId, asAgentId, init_ids, getQuerySourceForREPL, init_promptCategory, ENTER_PLAN_MODE_TOOL_NAME, init_constants13 as init_constants3, ASK_USER_QUESTION_TOOL_NAME, init_prompt9 as init_prompt8, TODO_WRITE_TOOL_NAME, init_constants8 as init_constants4, SKILL_TOOL_NAME, init_constants10 as init_constants5, cronToHuman, init_cron, getCronFilePath, readCronTasks, hasCronTasksSync, removeCronTasks, markCronTasksFired, DEFAULT_CRON_JITTER_CONFIG, jitteredNextCronRunMs, oneShotJitteredNextCronRunMs, findMissedTasks, init_cronTasks, DEFAULT_MAX_AGE_DAYS, isKairosCronEnabled, CRON_CREATE_TOOL_NAME, CRON_DELETE_TOOL_NAME, exports_prompt, init_prompt12 as init_prompt9, init_tools, TEAM_CREATE_TOOL_NAME, init_constants20 as init_constants6, isCoordinatorMode, init_coordinatorMode, loadPluginMcpServers, getUnconfiguredChannels, init_mcpPluginIntegration, fetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, hasClaudeAiMcpEverConnected, init_claudeai, filterToolsByServer, commandBelongsToServer, filterMcpPromptsByServer, excludeToolsByServer, excludeCommandsByServer, excludeResourcesByServer, excludeStalePluginClients, isMcpTool, describeMcpConfigFilePath, getScopeLabel, ensureConfigScope, ensureTransport, parseHeaders, getProjectMcpServerStatus, extractAgentMcpServers, init_utils2 as init_utils, getMcpServerSignature, dedupClaudeAiMcpServers, filterMcpServersByPolicy, addMcpConfig, removeMcpConfig, getMcpConfigsByScope, getMcpConfigByName, getClaudeCodeMcpConfigs, getAllMcpConfigs, parseMcpConfig, parseMcpConfigFromFilePath, doesEnterpriseMcpConfigExist, areMcpConfigsAllowedWithEnterpriseMcpConfig, isMcpServerDisabled, setMcpServerEnabled, init_config3 as init_config, isLocalShellTask, init_guards, getHookDisplayText, getAllHooks, hookSourceDescriptionDisplayString, hookSourceHeaderDisplayString, hookSourceInlineDisplayString, sortMatchersByPriority, init_hooksSettings, addSessionHook, addFunctionHook, removeSessionHook, init_sessionHooks, getDefaultSubagentModel, getAgentModelDisplay, getAgentModelOptions, init_agent, validateUuid2 as validateUuid, createAgentId, init_uuid, sideQuery, init_sideQuery, filterToolsForAgent, resolveAgentTools, init_agentToolUtils, useSettings, init_useSettings, applyMarkdown, init_markdown, Markdown, StreamingMarkdown, init_Markdown, isAdvisorBlock, isAdvisorEnabled, canUserConfigureAdvisor, modelSupportsAdvisor, isValidAdvisorModel, getInitialAdvisorSetting, init_advisor, checkOpus1mAccess, checkSonnet1mAccess, init_check1mAccess, getUpgradeMessage, init_contextWindowUpgradeCheck, setupGracefulShutdown, gracefulShutdownSync, isShuttingDown, gracefulShutdown, init_gracefulShutdown, getGroveSettings, markGroveNoticeViewed, updateGroveSettings, isQualifiedForGrove, getGroveNoticeConfig, calculateShouldShowGrove, checkGroveForNonInteractive, init_grove, _resetPolicyLimitsForTesting, initializePolicyLimitsLoadingPromise, isPolicyLimitsEligible, waitForPolicyLimitsToLoad, isPolicyAllowed, loadPolicyLimits, refreshPolicyLimits, clearPolicyLimitsCache, startBackgroundPolling2 as startBackgroundPolling, stopBackgroundPolling2 as stopBackgroundPolling, init_policyLimits, isRemoteManagedSettingsEligible, init_syncCache, initializeRemoteManagedSettingsLoadingPromise, isEligibleForRemoteManagedSettings, waitForRemoteManagedSettingsToLoad, loadRemoteManagedSettings, refreshRemoteManagedSettings, init_remoteManagedSettings, performLogout, clearAuthRelatedCaches, call, init_logout, OAuthService, init_oauth2 as init_oauth, installOrUpdateClaudePackage, localInstallationExists, getShellType, init_localInstaller, assertMinVersion, getMaxVersion, getMaxVersionMessage, shouldSkipVersion, getLatestVersion, getNpmDistTags, getLatestVersionFromGcs, getGcsDistTags, installGlobalPackage, init_autoUpdater, getPackageManager, init_packageManagers, getCurrentInstallationType, getDoctorDiagnostic, init_doctorDiagnostic, _baseSlice_default, init__baseSlice, capitalize_default, init_capitalize, isJetBrainsPluginInstalledCachedSync, init_jetbrains, WindowsToWSLConverter, init_idePathConversion, IdeOnboardingDialog, init_IdeOnboardingDialog, isJetBrainsIde, isSupportedVSCodeTerminal, isSupportedJetBrainsTerminal, isSupportedTerminal, getTerminalIdeType, getSortedIdeLockfiles, detectIDEs, hasAccessToIDEExtensionDiffFeature, isCursorInstalled, isWindsurfInstalled, isVSCodeInstalled, detectRunningIDEs, detectRunningIDEsCached, getConnectedIdeName, toIDEDisplayName, getConnectedIdeClient, closeOpenDiffs, initializeIdeIntegration, init_ide, getXDGStateHome, init_xdg, isPidBasedLockingEnabled, getAllLockInfo, cleanupStaleLocks, init_pidLock, checkInstall, installLatest, lockCurrentVersion, cleanupOldVersions, removeInstalledSymlink, cleanupShellAliases, cleanupNpmInstallations, init_nativeInstaller, getSettingsWithAllErrors, init_allErrors, buildSandboxProperties, buildIDEProperties, buildMcpProperties, buildMemoryDiagnostics, buildSettingSourcesProperties, buildInstallationDiagnostics, buildInstallationHealthDiagnostics, buildAccountProperties, buildAPIProviderProperties, getModelDisplayLabel, init_status, installOAuthTokens, authLogin, authStatus, authLogout, init_auth4 as init_auth, sendNotification, init_notifier, PASTE_THRESHOLD, getImageFromClipboard, init_imagePaste, cacheImagePath, storeImage, storeImages, clearStoredImagePaths, cleanupOldImageCaches, init_imageStore, ListItem, init_ListItem, useRegisterOverlay, useIsOverlayActive, useIsModalOverlayActive, init_overlayContext, Select, init_select, TOOL_DISPLAY_EXPIRY_MS, timestamp, buildBridgeConnectUrl, buildBridgeSessionUrl, getBridgeStatus, buildIdleFooterText, buildActiveFooterText, FAILED_FOOTER_TEXT, wrapWithOsc8Link, init_bridgeStatusUtil, sample_default, init_sample, activityManager, init_activityManager, isInProcessTeammateTask, init_types7 as init_types1, TaskListV2, init_TaskListV2, useTasksV2, useTasksV2WithCollapseEffect, init_useTasksV2, toRGBColor, hueToRgb, init_utils3 as init_utils1, ShimmerChar, init_ShimmerChar, SpinnerGlyph, init_SpinnerGlyph, useShimmerAnimation, init_useShimmerAnimation, toInkColor, init_ink2 as init_ink, isBackgroundTask, init_types10 as init_types2, McpServerConfigForProcessTransportSchema, McpServerStatusSchema, PermissionUpdateSchema, PermissionModeSchema, HookEventSchema, HookInputSchema, SlashCommandSchema, AgentInfoSchema, ModelInfoSchema, AccountInfoSchema, AgentDefinitionSchema, SDKUserMessageSchema, SDKStreamlinedTextMessageSchema, SDKStreamlinedToolUseSummaryMessageSchema, SDKPostTurnSummaryMessageSchema, SDKMessageSchema, FastModeStateSchema, init_coreSchemas, readUnreadMessages, writeToMailbox, markMessagesAsRead, createIdleNotification, isPermissionRequest, isPermissionResponse, isSandboxPermissionRequest, isSandboxPermissionResponse, sendShutdownRequestToMailbox, isShutdownRequest, isPlanApprovalRequest, isShutdownApproved, isPlanApprovalResponse, isTeamPermissionUpdate, createModeSetRequestMessage, isModeSetRequest, getLastPeerDmSummary, init_teammateMailbox, permissionUpdateSchema, init_PermissionUpdateSchema, createPermissionRequest, isSwarmWorker, sendPermissionRequestViaMailbox, sendPermissionResponseViaMailbox, generateSandboxRequestId, sendSandboxPermissionRequestViaMailbox, sendSandboxPermissionResponseViaMailbox, init_permissionSync, registerPermissionCallback, hasPermissionCallback, clearAllPendingCallbacks, processMailboxPermissionResponse, registerSandboxPermissionCallback, hasSandboxPermissionCallback, processSandboxPermissionResponse, init_useSwarmPermissionPoller, TOOL_RESULTS_SUBDIR, processToolResultBlock, provisionContentReplacementState, reconstructContentReplacementState, init_toolResultStorage, registerLeaderToolUseConfirmQueue, getLeaderToolUseConfirmQueue, unregisterLeaderToolUseConfirmQueue, registerLeaderSetToolPermissionContext, unregisterLeaderSetToolPermissionContext, init_leaderPermissionBridge, exports_teammatePromptAddendum, init_teammatePromptAddendum, ensureBackendsRegistered, registerTmuxBackend, registerITermBackend, detectAndGetBackend, getBackendByType, getCachedBackend, getCachedDetectionResult, markInProcessFallback, isInProcessEnabled, getResolvedTeammateMode, getInProcessBackend, getTeammateExecutor, resetBackendDetection, init_registry, InProcessTeammateTask, injectUserMessageToTeammate, findTeammateTaskByAgentId, getAllInProcessTeammateTasks, getRunningTeammatesSorted, exports_InProcessTeammateTask, init_InProcessTeammateTask, getViewedTeammateTask, getActiveAgentForInput, init_selectors, useElapsedTime, init_useElapsedTime, SpinnerWithVerb, BriefIdleStatus, Spinner, init_Spinner2 as init_Spinner, ConsoleOAuthFlow, init_ConsoleOAuthFlow, extraUsage, init_extra_usage, useClaudeAiLimits, init_claudeAiLimitsHook, AssistantThinkingMessage, init_AssistantThinkingMessage, clearClassifierChecking, init_classifierApprovals, SentryErrorBoundary, init_SentryErrorBoundary, UserBashInputMessage, init_UserBashInputMessage, UserPlanMessage, init_UserPlanMessage, QueuedMessageProvider, init_QueuedMessageContext, UserTextMessage, init_UserTextMessage, diagnosticTracker, init_diagnosticTracking, FilePathLink, init_FilePathLink, PrBadge, init_PrBadge, getPillLabel, pillNeedsCta, init_pillLabel, OffscreenFreeze, init_OffscreenFreeze, hasThinkingContent, Message, init_Message, renderToolUseProgressMessage4 as renderToolUseProgressMessage, init_UI11 as init_UI, recordSkillUsage, getSkillUsageScore, init_skillUsageTracking, buildPluginTelemetryFields, buildPluginCommandTelemetryFields, logPluginsEnabledForSession, classifyPluginCommandError, logPluginLoadErrors, init_pluginTelemetry, runAgent, init_runAgent, TodoListSchema, init_types8 as init_types3, TodoWriteTool, init_TodoWriteTool, fetchEnvironments, init_environments, SelectMulti, init_SelectMulti, init_CustomSelect, TeleportError, init_TeleportError, KeybindingSetup, init_KeybindingProviderSetup, clearAllSessions, init_sessionIngress, fileHistoryEnabled, fileHistoryMakeSnapshot, fileHistoryRewind, fileHistoryCanRestore, fileHistoryGetDiffStats, fileHistoryHasAnyChanges, fileHistoryRestoreStateFromLog, copyFileHistoryForResume, init_fileHistory, init_outputsScanner, generateShortWordSlug, init_words, getPlanSlug, setPlanSlug, clearAllPlanSlugs, getPlansDirectory, getPlanFilePath, getPlan, copyPlanForResume, copyPlanForFork, init_plans, captureHooksConfigSnapshot, updateHooksConfigSnapshot, init_hooksConfigSnapshot, setEnvHookNotifier, initializeFileChangedWatcher, init_fileChangedWatcher, loadPluginHooks, clearPluginHookCache, pruneRemovedPluginHooks, resetHotReloadState, getPluginAffectingSettingsSnapshot, setupPluginHookHotReload, init_loadPluginHooks, takeInitialUserMessage, processSessionStartHooks, processSetupHooks, init_sessionStart, deserializeMessages, loadConversationForResume, init_conversationRecovery, downloadSessionFiles, parseFileSpecs, init_filesApi, generateTempFilePath, init_tempfile, validateGitState, processMessagesForTeleportResume, checkOutTeleportedSessionBranch, validateSessionRepository, teleportResumeCodeSession, teleportToRemoteWithErrorHandling, teleportFromSessionsAPI, pollRemoteSessionEvents, teleportToRemote, archiveRemoteSession, init_teleport, checkRemoteAgentEligibility, formatPreconditionError, registerRemoteAgentTask, restoreRemoteAgentTasks, RemoteAgentTask, getRemoteTaskSessionUrl, init_RemoteAgentTask, SkillTool, init_SkillTool, resetAllLSPDiagnosticState, init_LSPDiagnosticRegistry, loadPluginLspServers, init_lspPluginIntegration, getLspServerManager, getInitializationStatus, initializeLspServerManager, reinitializeLspServerManager, shutdownLspServerManager, init_manager, parseArguments, generateProgressiveArgumentHint, init_argumentSubstitution, clearPendingHint, markShownThisSession, subscribeToPendingHint, getPendingHintSnapshot, init_claudeCodeHints, isPluginBlockedByPolicy, init_pluginPolicy, resolvePluginHint, markHintPluginShown, disableHintRecommendations, init_hintRecommendation, CircularBuffer, init_CircularBuffer, validateBoundedIntEnvVar, init_envValidation, BASH_MAX_OUTPUT_UPPER_LIMIT, BASH_MAX_OUTPUT_DEFAULT, init_outputLimits, clearSessionEnvVars, init_sessionEnvVars, exec, setCwd, init_Shell, ShellProgressMessage, init_ShellProgressMessage, parseSedEditCommand, applySedSubstitution, init_sedEditParser, parsePowerShellCommandCached, getAllCommands2 as getAllCommands, init_parser3 as init_parser, isAllowlistedCommand, init_readOnlyValidation, NEVER_SUGGEST, init_dangerousCmdlets, PowerShellTool, exports_PowerShellTool, init_PowerShellTool, getSkillsPath, estimateSkillFrontmatterTokens, clearSkillCaches, onDynamicSkillsLoaded, clearDynamicSkills, init_loadSkillsDir, getStoredSessionCosts, restoreCostStateForSession, saveCurrentSessionCosts, formatCost, formatTotalCost, init_cost_tracker, CONTEXT_LINES, adjustHunkLineNumbers, getPatchFromContents, getPatchForDisplay, init_diff, fetchGitDiff, fetchGitDiffHunks, init_gitDiff, getColorModuleUnavailableReason, getSyntaxTheme2 as getSyntaxTheme, init_colorDiff, HighlightedCode, init_HighlightedCode, StructuredDiff, init_StructuredDiff, StructuredDiffList, init_StructuredDiffList, CHUNK_SIZE, openForScan, scanForContext, readCapped, init_readEditContext, findActualString, preserveQuoteStyle, getPatchForEdits, getEditsForPatch, init_utils as init_utils2, FileEditTool, init_FileEditTool, FileWriteTool, init_FileWriteTool, getGlobExclusionsForPluginCache, clearPluginCacheExclusions, init_orphanedPluginFilter, GrepTool, init_GrepTool, GlobTool, init_GlobTool, parseCellId, init_notebook, NotebookEditTool, init_NotebookEditTool, clearWebFetchCache, MAX_MARKDOWN_LENGTH, isPreapprovedUrl, validateURL, checkDomainBlocklist, isPermittedRedirect, getWithPermittedRedirects, getURLMarkdownContent, applyPromptToMarkdown, init_utils7 as init_utils3, WebFetchTool, init_WebFetchTool, readLastConsolidatedAt, init_consolidationLock, DreamTask, init_DreamTask, stopTask, init_stopTask, TaskStopTool, init_TaskStopTool, exports_BriefTool, init_BriefTool, TASK_MAX_OUTPUT_UPPER_LIMIT, TASK_MAX_OUTPUT_DEFAULT, init_outputFormatting, TaskOutputTool, init_TaskOutputTool, WebSearchTool, init_WebSearchTool, findInProcessTeammateTaskId, handlePlanApprovalResponse, init_inProcessTeammateHelpers, ExitPlanModeV2Tool, init_ExitPlanModeV2Tool, AskUserQuestionTool, init_AskUserQuestionTool, init_prompt23 as init_prompt10, ReadMcpResourceTool, init_ReadMcpResourceTool, isPlanModeInterviewPhaseEnabled, getPewterLedgerVariant, init_planModeV2, EnterPlanModeTool, init_EnterPlanModeTool, getModelOptions, init_modelOptions, init_voiceModeEnabled, validateModel, init_validateModel, registerSession, updateSessionName, updateSessionBridgeId, countConcurrentSessions, init_concurrentSessions, init_replBridgeHandle, startBackgroundSession, init_LocalMainSessionTask, buildEffectiveSystemPrompt, init_systemPrompt, resumeAgentBackground, init_resumeAgent, getAllBaseTools, filterToolsByDenyRules, getTools, assembleToolPool, init_tools2 as init_tools1, getHardcodedTeammateModelFallback, init_teammateModel, isAutoManagedMemoryFile, init_memoryFileDetection, getToolSearchOrReadInfo, getToolUseIdsFromCollapsedGroup, hasAnyToolInProgress, getDisplayMessageFromCollapsed, collapseReadSearchGroups, summarizeRecentActivities, init_collapseReadSearch, isLocalAgentTask, isPanelAgentTask, queuePendingMessage, appendMessageToLocalAgent, LocalAgentTask, killAllRunningAgentTasks, markAgentsNotified, init_LocalAgentTask, BACKGROUND_BASH_SUMMARY_PREFIX, LocalShellTask, hasForegroundTasks, backgroundAll, init_LocalShellTask, isMemoryFileAccess, registerSessionFileAccessHooks, init_sessionFileAccessHooks, init_undercover, BashTool, init_BashTool, getSimpleCommandPrefix, getFirstWordPrefix, clearSpeculativeChecks, init_bashPermissions, Stream, init_stream2 as init_stream, getErrorParts, init_toolErrors, startQueryProfile, queryCheckpoint, logQueryProfileReport, init_queryProfiler, isAutoDreamEnabled, init_config5 as init_config1, init_readFileInRange, initAutoDream, init_autoDream, init_tokenBudget, query, init_query, init_logging, getLastCacheSafeParams, createCacheSafeParams, prepareForkedCommandContext, extractResultText, createSubagentContext, runForkedAgent, init_forkedAgent, logPermissionContextForAnts, init_internalLogging, ERROR_MESSAGE_NOT_ENOUGH_MESSAGES, ERROR_MESSAGE_USER_ABORT, ERROR_MESSAGE_INCOMPLETE_RESPONSE, buildPostCompactMessages, mergeHookInstructions, compactConversation, partialCompactConversation, init_compact, runPostCompactCleanup, init_postCompactCleanup, loadSessionMemoryTemplate, buildSessionMemoryUpdatePrompt, init_prompts3 as init_prompts, shouldUseSessionMemoryCompaction, trySessionMemoryCompaction, init_sessionMemoryCompact, getEffectiveContextWindowSize, calculateTokenWarningState, isAutoCompactEnabled, init_autoCompact, countMcpToolTokens, analyzeContextUsage, init_analyzeContext, zodToJsonSchema3 as zodToJsonSchema, init_zodToJsonSchema2 as init_zodToJsonSchema, getAutoToolSearchCharThreshold, getToolSearchMode, modelSupportsToolReference, isToolSearchEnabledOptimistic, isToolSearchToolAvailable, isToolSearchEnabled, isToolReferenceBlock, extractDiscoveredToolNames, isDeferredToolsDeltaEnabled, getDeferredToolsDelta, init_toolSearch, roughTokenCountEstimation, init_tokenEstimation, registerFileReadListener, FileReadTool, init_FileReadTool, isValidImagePaste, init_textInputTypes, registerHookEventHandler, setAllHookEventsEnabled, init_hookEvents, finalizePendingAsyncHooks, init_AsyncHookRegistry, isHumanTurn, init_messagePredicates, getQueuedCommandAttachments, resetSentSkillNames, getAttachmentMessages, createAttachmentMessage, init_attachments2 as init_attachments, getPluginCommands, init_loadPluginCommands, isPluginZipCacheEnabled, getPluginZipCachePath, getZipCacheKnownMarketplacesPath, getZipCacheMarketplacesDir, getZipCachePluginsDir, cleanupSessionPluginCache, atomicWriteToZipCache, getMarketplaceJsonRelativePath, isMarketplaceSourceSupportedByZipCache, init_zipCache, clearAllCaches, markPluginVersionOrphaned, cleanupOrphanedPluginVersionsInBackground, init_cacheUtils, formatFailureDetails, getMarketplaceSourceDisplay, createPluginId, loadMarketplacesWithGracefulDegradation, formatMarketplaceLoadingErrors, getPluginTrustMessage, isSourceAllowedByPolicy, detectEmptyMarketplaceReason, init_marketplaceHelpers, fetchOfficialMarketplaceFromGcs, init_officialMarketplaceGcs, getMarketplacesCacheDir, clearMarketplacesCache, getDeclaredMarketplaces, saveMarketplaceToSettings, loadKnownMarketplacesConfig, loadKnownMarketplacesConfigSafe, saveKnownMarketplacesConfig, registerSeedMarketplaces, addMarketplaceSource, removeMarketplaceSource, getMarketplace, getPluginById, refreshAllMarketplaces, refreshMarketplace, setMarketplaceAutoUpdate, init_marketplaceManager, loadInstalledPluginsV2, removePluginInstallation, getInMemoryInstalledPlugins, loadInstalledPluginsFromDisk, updateInstallationPathOnDisk, initializeVersionedPlugins, isInstallationRelevantToCurrentProject, isPluginInstalled, isPluginGloballyInstalled, migrateFromEnabledPlugins, init_installedPluginsManager, getManagedPluginNames, init_managedPlugins, calculatePluginVersion, init_pluginVersioning, cacheAndRegisterPlugin, registerPluginInstallation, formatResolutionError, installResolvedPlugin, installPluginFromMarketplace, init_pluginInstallationHelpers, getVersionedCachePath, getVersionedZipCachePath, copyPluginToVersionedCache, cachePlugin, loadPluginManifest, loadAllPlugins, loadAllPluginsCacheOnly, clearPluginCache, init_pluginLoader, DEFAULT_OUTPUT_STYLE_NAME, OUTPUT_STYLE_CONFIG, getAllOutputStyles, init_outputStyles, withMemoryCorrectionHint, INTERRUPT_MESSAGE, INTERRUPT_MESSAGE_FOR_TOOL_USE, REJECT_MESSAGE, REJECT_MESSAGE_WITH_REASON_PREFIX, SUBAGENT_REJECT_MESSAGE, SUBAGENT_REJECT_MESSAGE_WITH_REASON_PREFIX, SYNTHETIC_MODEL, SYNTHETIC_MESSAGES, isSyntheticMessage, getLastAssistantMessage, hasToolCallsInLastAssistantTurn, createAssistantMessage, createUserMessage, prepareUserContent, createUserInterruptionMessage, createSyntheticUserCaveatMessage, formatCommandInputTags, createModelSwitchBreadcrumbs, extractTag, isNotEmptyMessage, deriveUUID, normalizeMessages, isToolUseResultMessage, reorderMessagesInUI, buildMessageLookups, EMPTY_LOOKUPS, EMPTY_STRING_SET, getSiblingToolUseIDsFromLookup, getProgressMessagesFromLookup, hasUnresolvedHooksFromLookup, getToolUseIDs, isSystemLocalCommandMessage, normalizeMessagesForAPI, isEmptyMessageText, stripPromptXMLTags, getToolUseID, getUserMessageText, textForResubmit, extractTextContent, getContentText, handleMessageFromStream, createSystemMessage, createPermissionRetryMessage, createScheduledTaskFireMessage, createTurnDurationMessage, createAgentsKilledMessage, createCommandInputMessage, isCompactBoundaryMessage, getMessagesAfterCompactBoundary, shouldShowUserMessage, countToolCalls, stripSignatureBlocks, init_messages2 as init_messages1, isNavigableMessage, toolCallOf, MessageActionsSelectedContext, InVirtualListContext, useMessageActions, MessageActionsBar, stripSystemReminders, init_messageActions, init_prompt14 as init_prompt11, ListMcpResourcesTool, init_ListMcpResourcesTool, ProgressBar, init_ProgressBar, _baseEach_default, init__baseEach, reject_default, init_reject, isXaaEnabled, getXaaIdpSettings, issuerKey, getCachedIdpIdToken, saveIdpIdTokenFromJwt, clearIdpIdToken, saveIdpClientSecret, getIdpClientSecret, clearIdpClientSecret, acquireIdpIdToken, init_xaaIdpLogin, AuthenticationCancelledError, revokeServerTokens, clearServerTokensFromLocalStorage, performMCPOAuthFlow, ClaudeAuthProvider, readClientSecret, saveMcpClientSecret, clearMcpClientConfig, getMcpClientConfig, init_auth5 as init_auth1, recursivelySanitizeUnicode, init_sanitization, registerElicitationHandler, runElicitationHooks, runElicitationResultHooks, init_elicitationHandler, getMcpServerConnectionBatchSize, connectToServer, clearServerCache, areMcpConfigsEqual, fetchToolsForClient, fetchResourcesForClient, fetchCommandsForClient, callIdeRpc, reconnectMcpServerImpl, getMcpToolsCommandsAndResources, prefetchAllMcpResources, setupSdkMcpClients, init_client5 as init_client, prependUserContext, logContextMetrics, init_api2 as init_api, verifyApiKey, queryModelWithoutStreaming, updateUsage, accumulateUsage, queryHaiku, queryWithModel, init_claude, splitCommand_DEPRECATED, clearCommandPrefixCaches, extractOutputRedirections, init_commands, shouldUseSandbox, init_shouldUseSandbox, permissionRuleSourceDisplayString, getAllowRules, getDenyRules, getAskRules, hasPermissionsToUseTool, deletePermissionRule, init_permissions2 as init_permissions, transitionPermissionMode, initialPermissionModeFromCLI, parseToolListFromCLI, initializeToolPermissionContext, getAutoModeUnavailableNotification, shouldDisableBypassPermissions, getAutoModeUnavailableReason, isBypassPermissionsModeDisabled, createDisabledBypassPermissionsContext, checkAndDisableBypassPermissions, prepareContextForPlanMode, transitionPlanAutoMode, init_permissionSetup, applySettingsChange, init_applySettingsChange, AppStateProvider, useAppState, useSetAppState, useAppStateStore, init_AppState, useNotifications, init_notifications, useClipboardImageHint, init_useClipboardImageHint, prependModeCharacterToInput, getModeFromInput, getValueFromInput, init_inputModes, cleanupOldPastes, init_pasteStore, getPastedTextRefNumLines, formatPastedTextRef, formatImageRef, parseReferences, expandPastedTextRefs, makeHistoryReader, getHistory, addToHistory, removeLastFromHistory, init_history, pushToKillRing, getLastKill, resetKillAccumulation, recordYank, yankPop, updateYankLength, resetYankState, isVimWordChar, isVimWhitespace, isVimPunctuation, Cursor, init_Cursor, useTextInput, init_useTextInput, BaseTextInput, init_BaseTextInput, TextInput, init_TextInput, getWorktreePaths, init_getWorktreePaths, isUltrareviewEnabled, init_ultrareviewEnabled, review_default, init_review, validateBridgeId, BridgeFatalError, createBridgeApiClient, isExpiredErrorType, isSuppressible403, init_bridgeApi, registerBridgeDebugHandle, clearBridgeDebugHandle, injectBridgeFault, wrapApiForFaultInjection, init_bridgeDebug, registerBundledSkill, init_bundledSkills, exit_default, init_exit, upgrade_default, init_upgrade, getCommandName, isCommandEnabled, builtInCommandNames, getCommands, clearCommandMemoizationCaches, clearCommandsCache, getSkillToolCommands, getSlashCommandToolSkills, REMOTE_SAFE_COMMANDS, isBridgeSafeCommand, filterCommandsForRemoteMode, findCommand, hasCommand, getCommand, formatDescriptionWithSource, init_commands2 as init_commands1, isTranscriptMessage, isChainParticipant, isEphemeralToolProgress, getProjectsDir2 as getProjectsDir, getTranscriptPath, getTranscriptPathForSession, MAX_TRANSCRIPT_READ_BYTES, setAgentTranscriptSubdir, clearAgentTranscriptSubdir, getAgentTranscriptPath, writeAgentMetadata, readAgentMetadata, writeRemoteAgentMetadata, readRemoteAgentMetadata, deleteRemoteAgentMetadata, listRemoteAgentMetadata, sessionIdExists, getNodeEnv, getUserType, isCustomTitleEnabled, getProjectDir, resetProjectFlushStateForTesting, resetProjectForTesting, setSessionFileForTesting, setInternalEventWriter, setInternalEventReader, setRemoteIngressUrlForTesting, recordTranscript, recordSidechainTranscript, recordQueueOperation, removeTranscriptMessage, recordFileHistorySnapshot, recordAttributionSnapshot, recordContentReplacement, resetSessionFilePointer, adoptResumedSessionFile, recordContextCollapseCommit, recordContextCollapseSnapshot, flushSessionStorage, hydrateRemoteSession, hydrateFromCCRv2InternalEvents, getFirstMeaningfulUserMessageTextContent, removeExtraFields, buildConversationChain, checkResumeConsistency, loadTranscriptFromFile, fetchLogs, saveCustomTitle, saveAiGeneratedTitle, saveTaskSummary, saveTag, linkSessionToPR, getCurrentSessionTag, getCurrentSessionTitle, getCurrentSessionAgentColor, restoreSessionMetadata, clearSessionMetadata, reAppendSessionMetadata, saveAgentName, saveAgentColor, saveAgentSetting, cacheSessionTitle, saveMode, saveWorktreeState, getSessionIdFromLog, isLiteLog, loadFullLog, searchSessionsByCustomTitle, loadTranscriptFile, clearSessionMessagesCache, doesMessageExistInSession, getLastSessionLog, loadMessageLogs, loadAllProjectsMessageLogs, loadAllProjectsMessageLogsProgressive, loadSameRepoMessageLogs, loadSameRepoMessageLogsProgressive, getAgentTranscript, extractAgentIdsFromMessages, extractTeammateTranscriptsFromTasks, loadSubagentTranscripts, loadAllSubagentTranscriptsFromDisk, isLoggableMessage, cleanMessagesForLogging, getLogByIndex, findUnresolvedToolUse, getSessionFilesWithMtime, loadAllLogsFromSessionFile, getSessionFilesLite, enrichLogs, exports_sessionStorage, init_sessionStorage, loadMemoryPrompt, init_memdir, getAgentMemoryDir, getMemoryScopeDisplay, loadAgentMemoryPrompt, init_agentMemory, normalizeCaseForComparison2 as normalizeCaseForComparison, getSessionMemoryDir, getSessionMemoryPath, isScratchpadEnabled, getScratchpadDir, ensureScratchpadDir, pathInAllowedWorkingPath, generateSuggestions, init_filesystem, getTaskOutputPath, evictTaskOutput, initTaskOutputAsSymlink, init_diskOutput, isTerminalTaskStatus, init_Task, hookJSONOutputSchema, init_hooks2 as init_hooks, createCombinedAbortSignal, init_combinedAbortSignal, registerStructuredOutputEnforcement, init_hookHelpers, getSessionEndHookTimeoutMs, shouldSkipHookDueToTrust, createBaseHookInput, getMatchingHooks, getPreToolHookBlockingMessage, getStopHookMessage, getTeammateIdleHookMessage, getTaskCreatedHookMessage, getTaskCompletedHookMessage, getUserPromptSubmitHookBlockingMessage, hasBlockingResult, executePreToolHooks, executePostToolHooks, executePostToolUseFailureHooks, executePermissionDeniedHooks2 as executePermissionDeniedHooks, executeNotificationHooks, executeStopFailureHooks, executeStopHooks, executeTeammateIdleHooks, executeTaskCreatedHooks, executeTaskCompletedHooks, executeUserPromptSubmitHooks, executeSessionStartHooks, executeSetupHooks, executeSubagentStartHooks, executePreCompactHooks, executePostCompactHooks, executeSessionEndHooks, executePermissionRequestHooks, executeConfigChangeHooks, executeCwdChangedHooks, executeFileChangedHooks, hasInstructionsLoadedHook, executeInstructionsLoadedHooks, executeElicitationHooks, executeElicitationResultHooks, executeStatusLineCommand, executeFileSuggestionCommand, hasWorktreeCreateHook, executeWorktreeCreateHook, executeWorktreeRemoveHook, init_hooks3 as init_hooks1, validateWorktreeSlug, getCurrentWorktreeSession, restoreWorktreeSession, generateTmuxSessionName, worktreeBranchName, copyWorktreeIncludeFiles, parsePRReference, isTmuxAvailable2 as isTmuxAvailable, getTmuxInstallInstructions, createTmuxSessionForWorktree, killTmuxSession, createWorktreeForSession, keepWorktree, cleanupWorktree, createAgentWorktree, removeAgentWorktree, cleanupStaleAgentWorktrees, hasWorktreeChanges, execIntoTmuxWorktree, init_worktree, CLAUDE_CODE_DOCS_MAP_URL2 as CLAUDE_CODE_DOCS_MAP_URL, SYSTEM_PROMPT_DYNAMIC_BOUNDARY, prependBullets, getSystemPrompt, computeEnvInfo, computeSimpleEnvInfo, getUnameSR, DEFAULT_AGENT_PROMPT, enhanceSystemPromptWithEnvDetails, getScratchpadInstructions, init_prompts as init_prompts1 };
|