prompt-genie 0.3.6 → 0.4.1
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/README.md +101 -0
- package/bin/install.cjs +3 -0
- package/dist/hooks/_lib.cjs +2 -0
- package/dist/hooks/post_bash.cjs +1 -1
- package/dist/hooks/post_read.cjs +1 -1
- package/dist/hooks/pre_bash.cjs +1 -1
- package/dist/hooks/pre_read.cjs +1 -1
- package/dist/hooks/session_start.cjs +2 -0
- package/dist/hooks/setup.cjs +1 -1
- package/dist/hooks/stats.cjs +1 -1
- package/dist/hooks/stop_flush.cjs +1 -1
- package/dist/hooks/user_prompt_submit.cjs +1 -1
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Prompt Genie for Claude Code
|
|
2
|
+
|
|
3
|
+
**Stop paying to re-read the same code.** Prompt Genie remembers what Claude Code
|
|
4
|
+
has already read this session, so identical re-reads cost ~15 tokens instead of
|
|
5
|
+
the whole file.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx prompt-genie
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That's it. Enter your email, restart your editor, and context memory runs
|
|
12
|
+
silently on every session.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## The problem
|
|
17
|
+
|
|
18
|
+
Claude Code re-reads files and re-runs the same read-only commands constantly.
|
|
19
|
+
`git status` between every step, the same source file on turn 2, turn 6, turn 11.
|
|
20
|
+
Every repeat is sent to the model again, and you pay for all of it. On a long
|
|
21
|
+
session in a real codebase that's tens of thousands of duplicate tokens.
|
|
22
|
+
|
|
23
|
+
## What Prompt Genie does
|
|
24
|
+
|
|
25
|
+
It installs a set of Claude Code hooks that fingerprint every file read and
|
|
26
|
+
read-only command output **per session**. When Claude reads something it has
|
|
27
|
+
already seen this session and the content is byte-for-byte unchanged, the hook
|
|
28
|
+
replaces the output with a short note:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
✓ Already in context, unchanged since your last read. 420 lines.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Claude still knows the file is there (it's earlier in the conversation), but you
|
|
35
|
+
don't pay to send it again.
|
|
36
|
+
|
|
37
|
+
### Why it's safe
|
|
38
|
+
|
|
39
|
+
The check runs **after** the tool executes, comparing a hash of the fresh output
|
|
40
|
+
against what was already delivered this session. If anything changed, a file was
|
|
41
|
+
edited or a command's output differs, it passes straight through untouched. There
|
|
42
|
+
are no stale caches and no TTLs to tune.
|
|
43
|
+
|
|
44
|
+
- **Per-session.** State is keyed by session id, so concurrent Claude Code
|
|
45
|
+
windows never interfere with each other.
|
|
46
|
+
- **Compaction-aware.** After `/compact` or `/clear`, the memory resets because
|
|
47
|
+
the files are no longer in context.
|
|
48
|
+
- **Range-aware.** Partial reads of large files are tracked independently of
|
|
49
|
+
full reads.
|
|
50
|
+
- **Local-only.** Fingerprints (hashes) are stored on your machine. File
|
|
51
|
+
contents are never stored or transmitted.
|
|
52
|
+
|
|
53
|
+
## Installing
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx prompt-genie
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The installer:
|
|
60
|
+
|
|
61
|
+
1. Copies the hooks to `~/.prompt-genie/hooks`
|
|
62
|
+
2. Wires them into `~/.claude/settings.json` (`PreToolUse`, `PostToolUse`,
|
|
63
|
+
`UserPromptSubmit`, `SessionStart`, `Stop`)
|
|
64
|
+
3. Verifies your plan
|
|
65
|
+
|
|
66
|
+
Restart Claude Code (or your IDE) after installing so the new hooks load.
|
|
67
|
+
|
|
68
|
+
## Seeing your savings
|
|
69
|
+
|
|
70
|
+
At the end of each session, savings sync to your dashboard at
|
|
71
|
+
[prompt-genie.com](https://prompt-genie.com): tokens saved, hit rate, and a
|
|
72
|
+
per-codebase breakdown over time.
|
|
73
|
+
|
|
74
|
+
For a quick local view any time:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
node ~/.prompt-genie/hooks/stats.cjs
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Plans
|
|
81
|
+
|
|
82
|
+
Context memory is a paid feature. On the free plan Prompt Genie runs in
|
|
83
|
+
measure-only mode and shows you, at the end of each session, how many tokens you
|
|
84
|
+
*would* have saved. Activate at
|
|
85
|
+
[prompt-genie.com/pricing](https://prompt-genie.com/pricing).
|
|
86
|
+
|
|
87
|
+
## Uninstalling
|
|
88
|
+
|
|
89
|
+
Remove the Prompt Genie entries from `~/.claude/settings.json` and delete
|
|
90
|
+
`~/.prompt-genie/`.
|
|
91
|
+
|
|
92
|
+
## How your data is handled
|
|
93
|
+
|
|
94
|
+
The hooks store only content hashes and aggregate counters locally under
|
|
95
|
+
`~/.claude/`. At session end, aggregate stats (tokens saved, hit/miss counts, and
|
|
96
|
+
the project folder name) are sent to your dashboard. File contents and command
|
|
97
|
+
outputs never leave your machine.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
MIT © Prompt Genie
|
package/bin/install.cjs
CHANGED
|
@@ -98,6 +98,9 @@ function wireHooks() {
|
|
|
98
98
|
settings.hooks.UserPromptSubmit = [
|
|
99
99
|
{ hooks: [{ type: "command", command: `node ${path.join(HOOKS_DEST, "user_prompt_submit.cjs")}` }] },
|
|
100
100
|
];
|
|
101
|
+
settings.hooks.SessionStart = [
|
|
102
|
+
{ hooks: [{ type: "command", command: `node ${path.join(HOOKS_DEST, "session_start.cjs")}` }] },
|
|
103
|
+
];
|
|
101
104
|
settings.hooks.Stop = [
|
|
102
105
|
{ hooks: [{ type: "command", command: `node ${path.join(HOOKS_DEST, "stop_flush.cjs")}` }] },
|
|
103
106
|
];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x133))/0x1*(parseInt(l(0x11d))/0x2)+parseInt(l(0x182))/0x3*(-parseInt(l(0x16e))/0x4)+parseInt(l(0x185))/0x5+parseInt(l(0x11e))/0x6+-parseInt(l(0x129))/0x7+parseInt(l(0x149))/0x8*(-parseInt(l(0xfb))/0x9)+parseInt(l(0x15c))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8ed7b));const fs=require('fs'),os=require('os'),path=require(m(0x115)),crypto=require(m(0x106)),CLAUDE_DIR=path[m(0x159)](process.env.HOME||os[m(0x108)+'r'](),m(0x122)+'e'),SESSIONS_DIR=path['join'](CLAUDE_DIR,m(0x172)+m(0x16a)),STATS_FILE=path['join'](CLAUDE_DIR,'pg_sta'+m(0x12b)+'n'),CONFIG_FILE=path[m(0x159)](CLAUDE_DIR,m(0x13f)+m(0x137)+'on'),PUBLIC_KEY=process.env.PG_PUBLIC_KEY||m(0x116)+m(0x187)+m(0x104)+m(0x110)+'--\x0aMII'+m(0x13b)+m(0x179)+m(0x13a)+m(0x109)+m(0x125)+m(0x15d)+m(0x188)+'jBMJfK'+m(0x12e)+'vZR3ku'+'S\x0ad80n'+m(0x16b)+'AULghE'+m(0x11b)+m(0x12c)+m(0x140)+m(0x167)+m(0x119)+m(0x10e)+m(0x11f)+m(0x142)+m(0x15f)+m(0x189)+'glNZCR'+m(0x130)+m(0x154)+'fDCV+z'+m(0x190)+m(0x102)+m(0x181)+'6D2kfK'+'PL7yT\x0a'+'Yo9HJG'+m(0x14d)+m(0x18b)+m(0x16c)+m(0x157)+m(0x14b)+m(0xf9)+'cxRFEs'+m(0x107)+m(0x147)+'6CSz\x0aB'+m(0x15a)+m(0x127)+m(0x18c)+m(0x163)+m(0x17d)+m(0x131)+'i3rjYb'+m(0xf8)+'PgERs2'+m(0x105)+'dYj\x0a2+'+m(0x138)+m(0x132)+m(0x165)+m(0x11a)+m(0x13d)+m(0x183)+m(0x12f)+'xFfYIx'+m(0x17c)+m(0x193)+m(0x103)+m(0x10b)+m(0x156)+m(0x14c)+m(0x112)+m(0x10d);function loadJson(c){const n=m;try{return JSON[n(0x178)](fs[n(0x15b)+n(0x152)](c,n(0x11c)));}catch{return{};}}function saveJsonAtomic(c,d){const o=m;try{fs[o(0x114)+o(0x150)](path[o(0x118)+'e'](c),{'recursive':!![]});const e=c+'.'+process[o(0x134)]+o(0x120);fs[o(0x121)+o(0x168)+'c'](e,JSON[o(0x12d)+o(0x17a)](d)),fs[o(0x160)+o(0x144)](e,c);}catch{}}function unlinkQuiet(c){const p=m;try{fs[p(0x18a)+p(0x144)](c);}catch{}}function sha1(c){const q=m,d={'RSgHr':q(0xf5)};try{return crypto[q(0x169)+'Hash'](d[q(0x180)])['update'](c)[q(0x141)](q(0xfe));}catch{return null;}}function a(){const E=['zNLcAwq3','lNrTCa','D3jPDgvg','lMnSyxvK','ufjp','Dg90ywXF','q0froefn','yMfZzty0','D2Tiq3m4','reLgBK8','nJC3nZe2mLPYruzrtW','zw5K','DhmUANnV','tJaRAZjh','C3rYAw5N','nKS4sM5q','wtr6z3rf','z092BvyR','D2W4seTR','CNqYmxbM','mJa5mZu0A1L3yLbS','CgLK','t21csMe','DhjPBMC','zMLNlMPZ','twHxyuDi','AhbhtfG','rZL3mejb','qKLQqu5c','Dg9tDhjP','t1y0owHu','zxHW','CgDFy29U','ufnOCeDc','zgLNzxn0','rff3nLrQ','wLHwyLy','u3LUyW','veHsruvF','BgvUz3rO','m2HimfjR','AgL0CW','ndqYntm2og9gsNfzBq','Dg9Rzw4','AwuYwdvt','tKqGufvc','mMOYBJbc','A2v5CW','Aw5JBhvK','Ew5J','Dg9ju09t','BgvtEw5J','zNjVBq','utLmt3bv','zxHWB3j0','ls0Tls1f','ngHotxDJ','zMXVB3i','AM9PBG','udbnq2nX','CMvHzezP','mZmZntm0meL4r0Dlyq','suLcq2Dl','qu5ovufm','cMvXwJDS','CMvUyw1L','rfH1D3m','uKLtrq','vtvlDMvj','BM93','qvnjs1b3','CLn5BMm','AvyVnLD1','AwXLu3LU','y3jLyxrL','C2LVBNm','tZjNDKyY','yLnJDdfX','x3nHDMvK','mtjMDxv3A0u','BxrPBwvn','refzx1bb','qti1nG','CgDFC2vZ','ANLLvhe','x1bstW','ru5urvjq','Cwrhqve','C29YDa','CgfYC2u','z2TXAgTP','Awz5','sNPpDhC','ohfiDdrm','DJfWtvv3','EMHXz3i','C3bSAxq','uLnNshi','wdjdtLbo','ndq1otHSCgjIDxK','m0ndm3js','lMPZB24','ndGXnJqWmgDVCwHbsa','vevbtvm','ruDjtIbq','q0frrufY','AJH3sfrl','Dw5SAw5R','uwHYuuvm','ytvIzg0Y','Bwf4','DxjS','CgXHBG','BLvSruPm','C3rKAw4','CMvHzgrP','re0ZCLnO','CMvZDw1L','C2HHmq','EKndExu','CMvWBgfJ','DJDZy2ry','ow1sk2X3','DMvYAwz5','oxzqzhLJqG','vMvYAwz5','C3rHDfn5','Agv4','BwLZC2vZ','uLnblvni','qvjLAey','BgjAEtCZ','zu0kzhDj','vujmsumG','n3rsyNbm','y3j5ChrV','DKX1vMuZ','Ag9TzwrP','uuvgqufp','wxzoEfi','refrquik','C2XPy2u','ws0Tls0T','AtHnuKWR','uNjdqwK','s0vzls0T','Dg9Rzw5Z','teLdieTf','DxbKyxrL','BwTKAxjt','Cgf0Aa','ls0Tls1c','A0L5ufm','zgLYBMfT','z3jqodqW','rMLAyu1O','nLDoDeqX','DxrMoa','nNzOwMDrta','mtm1nJG1mNLREuzUzq'];a=function(){return E;};return a();}function estimateTokens(c){const r=m;return Math['max'](0x1,Math[r(0x158)](c[r(0x146)]/0x4));}function today(){const s=m;return new Date()[s(0x151)+s(0x136)]()[s(0x10c)](0x0,0xa);}function sessionFile(c){const t=m,d=String(c||'defaul'+'t')[t(0xf7)+'e'](/[^a-zA-Z0-9_-]/g,'_')[t(0x10c)](0x0,0x50);return path[t(0x159)](SESSIONS_DIR,d+t(0x184));}function loadSession(c){return loadJson(sessionFile(c));}function b(c,d){c=c-0xf5;const e=a();let f=e[c];if(b['TdYYYb']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['GYRSDv']=g,b['luPeUC']={},b['TdYYYb']=!![];}const h=e[0x0],i=c+h,j=b['luPeUC'][i];return!j?(f=b['GYRSDv'](f),b['luPeUC'][i]=f):f=j,f;}function saveSession(c,d){saveJsonAtomic(sessionFile(c),d);}function deleteSession(c){unlinkQuiet(sessionFile(c));}function gcSessions(c=0x7){const u=m,d={'kIyPS':function(e,f){return e*f;}};try{const e=Date['now']()-d[u(0x117)](d[u(0x117)](c,0x18),0x3c)*0x3c*0x3e8;for(const f of fs[u(0x192)+u(0x166)](SESSIONS_DIR)){const g=path[u(0x159)](SESSIONS_DIR,f);try{if(fs[u(0xfd)+'nc'](g)[u(0x16f)+'s']<e)fs[u(0x18a)+u(0x144)](g);}catch{}}}catch{}}function evictOldest(c,d){const v=m,e=Object[v(0x14e)](c);if(e[v(0x146)]<=d)return;const f=e[v(0x177)]((h,j)=>(c[h]['ts']||0x0)-(c[j]['ts']||0x0)),g=Math[v(0x18d)](0x1,Math[v(0x158)](d*0.2));for(let h=0x0;h<g;h++)delete c[f[h]];}function bumpStats({hits:hits=0x0,misses:misses=0x0,tokensSaved:tokensSaved=0x0}){const w=m,c={'hpGLX':function(e,f){return e+f;},'ARehF':function(e,f){return e+f;},'YvNxR':function(e,f){return e+f;}},d=loadJson(STATS_FILE);if(hits)d['total_'+w(0x148)]=c[w(0x139)](d['total_'+w(0x148)]||0x0,hits);if(misses)d[w(0x124)+w(0xff)]=c[w(0x101)](d[w(0x124)+w(0xff)]||0x0,misses);if(tokensSaved)d[w(0x124)+w(0x111)+w(0x16d)]=c[w(0x10a)](d[w(0x124)+w(0x111)+w(0x16d)]||0x0,tokensSaved);saveJsonAtomic(STATS_FILE,d);}function verifyJWT(c){const x=m,d={'RrCAi':function(e,f){return e||f;},'bhVaO':x(0x126)+x(0x18e),'DIFnO':function(e,f){return e<f;},'DXuws':function(e,f){return e/f;}};try{const [e,f,g]=c[x(0x17f)]('.');if(d[x(0x10f)](!e,!f)||!g)return null;const h=crypto[x(0x169)+x(0xfc)](x(0x100)+x(0x171));h[x(0x113)](e+'.'+f);if(!h[x(0xfa)](PUBLIC_KEY,g,d['bhVaO']))return null;const i=JSON[x(0x178)](Buffer[x(0x153)](f,x(0x126)+x(0x18e))[x(0x13c)+'ng']());if(i[x(0x13e)]&&d[x(0x128)](i[x(0x13e)],Math[x(0x158)](d[x(0x161)](Date[x(0x164)](),0x3e8))))return null;return i;}catch{return null;}}function decodeJWT(c){const y=m;try{const [,d]=c[y(0x17f)]('.');return JSON[y(0x178)](Buffer[y(0x153)](d,'base64'+y(0x18e))[y(0x13c)+'ng']());}catch{return null;}}function isPaidPlan(c){const z=m,d={'qdGAQ':z(0x123),'zCCyu':z(0x145)+z(0x170)+'SS','JzOtw':z(0x186)};return[d[z(0x176)],z(0x15e)+z(0x174),d[z(0xf6)],d[z(0x17b)],z(0x175)+z(0x162)][z(0x14f)+'es'](c);}function currentPlanIsPaid(){const A=m,c={'zhqgr':function(d,e){return d(e);}};try{const d=loadJson(CONFIG_FILE);if(!d||!d[A(0x14a)])return![];const e=verifyJWT(d[A(0x14a)]);return!!(e&&c[A(0x17e)](isPaidPlan,e[A(0x18f)]));}catch{return![];}}function readStdinJson(c=0x7d0){const d={'ZXVbV':function(e,f){return e(f);},'jyeTq':function(e,f,g){return e(f,g);}};return new Promise(e=>{const D=b,f={'OmBJa':function(j,k){const B=b;return d[B(0x143)](j,k);}};let g='',h=![];const i=()=>{const C=b;if(h)return;h=!![];try{f[C(0x135)](e,JSON[C(0x178)](g));}catch{f[C(0x135)](e,null);}};process['stdin'][D(0x194)](),process[D(0x191)]['on']('data',j=>g+=j),process['stdin']['on'](D(0x12a),i),d[D(0x173)](setTimeout,i,c);});}module[m(0x155)+'s']={'CLAUDE_DIR':CLAUDE_DIR,'SESSIONS_DIR':SESSIONS_DIR,'STATS_FILE':STATS_FILE,'CONFIG_FILE':CONFIG_FILE,'PUBLIC_KEY':PUBLIC_KEY,'loadJson':loadJson,'saveJsonAtomic':saveJsonAtomic,'unlinkQuiet':unlinkQuiet,'sha1':sha1,'estimateTokens':estimateTokens,'today':today,'sessionFile':sessionFile,'loadSession':loadSession,'saveSession':saveSession,'deleteSession':deleteSession,'gcSessions':gcSessions,'evictOldest':evictOldest,'bumpStats':bumpStats,'verifyJWT':verifyJWT,'decodeJWT':decodeJWT,'isPaidPlan':isPaidPlan,'currentPlanIsPaid':currentPlanIsPaid,'readStdinJson':readStdinJson};
|
package/dist/hooks/post_bash.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(0xb4))/0x1+-parseInt(p(0xc8))/0x2*(parseInt(p(0xbd))/0x3)+-parseInt(p(0xa4))/0x4+parseInt(p(0xd0))/0x5*(parseInt(p(0xce))/0x6)+-parseInt(p(0xc3))/0x7+-parseInt(p(0xd1))/0x8+-parseInt(p(0xd9))/0x9*(-parseInt(p(0xcb))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x44e9d),process['on'](q(0xdc)+q(0x9d)+q(0xdf),c=>{const r=q,d={'aAHfV':r(0xde)+r(0xa5)+':\x20'};process['stderr'][r(0x94)](d[r(0xb0)]+c[r(0x90)+'e']+'\x0a'),process[r(0xc6)](0x0);}));const lib=require('./_lib'+q(0x97)),MAX_OUTPUT_BYTES=0x7d000,MIN_OUTPUT_CHARS=0xc8,MAX_BASH_ENTRIES=0x12c,NOTE_TOKENS=0xf,READONLY_PREFIXES=[/^cat\s+/,/^ls(\s|$)/,/^find\s+/,/^grep(\s+|\s+-[a-zA-Z]+\s+)/,/^rg\s+/,/^ag\s+/,/^head(\s+|\s+-[a-zA-Z0-9]+\s+)/,/^tail(\s+|\s+-[a-zA-Z0-9]+\s+)/,/^wc(\s+|\s+-[a-zA-Z]+\s+)/,/^stat\s+/,/^file\s+/,/^which\s+/,/^type\s+/,/^pwd(\s|$)/,/^sort(\s+|\s+-[a-zA-Z]+\s+)/,/^uniq(\s+|\s+-[a-zA-Z]+\s+)/,/^du(\s+|\s+-[a-zA-Z]+\s+)/,/^df(\s|$)/,/^jq\s+/,/^git\s+(log|show|diff|status|branch|config|tag|stash list|remote|describe|rev-parse|shortlog|blame|ls-files)\b/,/^npm\s+(list|ls|view|info|outdated|audit)\b/,/^yarn\s+(list|info|why)\b/,/^node\s+(-v|--version)(\s|$)/,/^node\s+--version(\s|$)/,/^echo\s+/,/^printf\s+/,/^env(\s|$)/,/^printenv(\s|$)/],UNSAFE_PATTERNS=[/\s>>?\s/,/>>?[./~]/,/\|\s*tee\s+\S/,/\bsed\s+-i\b/,/\bawk\s+-i\b/,/\bnpm\s+install\b/,/\bnpm\s+ci\b/,/\brm\b/,/\bmv\b/,/\bcp\b/,/\bmkdir\b/,/\btouch\b/,/\bchmod\b/,/\bchown\b/,/\bgit\s+(add|commit|push|pull|merge|rebase|reset|checkout|stash (push|pop|drop)|rm|mv|clean)\b/,/\bnpx\b/];function isReadOnly(c){const s=q;if(c['includ'+'es']('\x0a'))return![];const d=c['trim']();if(!READONLY_PREFIXES[s(0xbe)](e=>e[s(0x95)](d)))return![];return!UNSAFE_PATTERNS['some'](e=>e[s(0x95)](d));}function b(c,d){c=c-0x87;const e=a();let f=e[c];if(b['tjFfdk']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['pDadpr']=g,b['hgPSzM']={},b['tjFfdk']=!![];}const h=e[0x0],i=c+h,j=b['hgPSzM'][i];return!j?(f=b['pDadpr'](f),b['hgPSzM'][i]=f):f=j,f;}function extractOutput(c){const t=q,d={'UaKTe':function(e,f){return e!==f;},'idziZ':t(0xd2),'xZkyi':function(e,f){return e+f;}};if(typeof c===t(0xd2))return c;if(!c||d[t(0xd8)](typeof c,'object'))return'';if(typeof c[t(0x8a)]===d[t(0xe0)])return c[t(0x8a)]+(c[t(0xa9)]?d[t(0x9f)]('\x0a',c[t(0xa9)]):'');if(Array[t(0x88)+'y'](c[t(0xc2)+'t']))return c[t(0xc2)+'t'][t(0x8d)](e=>e[t(0xe5)]??'')[t(0xe6)]('');return JSON[t(0xd2)+'ify'](c);}function a(){const v=['ntuWodC0n2XNvfvSAG','w091Dhb1','DgvuB2TL','Dw5JyxvN','Awz5','CgCGCg9Z','ChrPB24','Awr6AvO','BgLLCIb0','C3bSAxq','DhjPBq','BgLLCIbV','Dgv4Da','AM9PBG','C2f2zvnL','BNb1Da','AxnbCNjH','yNvTCfn0','C3rKB3v0','yw1L','BIb0AgLZ','BwfW','ignVBw1H','BwLZC2vZ','BwvZC2fN','Bwf4','y3DK','BM93','D3jPDgu','DgvZDa','u2f2zwq','lMnQCW','DfbSyw5j','AgfZAa','Dg9VBf9Y','CLjAyMm','C3nPB24','AhrfEgnL','BL9Pza','EfPREwK','Dg9Rzw5Z','zgLUsNnV','lIbszwzL','igXPBMvZ','mtK3odiWs0D6thLy','Df9IyxnO','uuPpyK8','zxzPy3rp','AxjPqMy','C3rKzxjY','C1bHAwq','B2XvC2u','y29TBwfU','Ew91ihjH','y3vYCMvU','Dcb1BMnO','yufizLy','BgrLC3q','C2XPy2u','zxnWB25Z','mJuZmZu4q3zYyw5n','yMfZAa','ug9ZDfrV','zxn0Aw1H','BgvUz3rO','Dg9KyxK','yxrZ','BMqGzwfY','qMfZAa','ntm5mteYBKrjzuLq','C29Tzq','yu1xAwq','Dg9VBf9U','Bg9HzfnL','y29UDgvU','mty0ode0m2Ttz1fPCW','DxrWDxqU','zgf0zq','zxHPDa','C2vZC2LV','mMPqDMHOBq','yw5NzwqG','AgL0CW','mtbeCgDZtuG','rKrjA0K','C3nPB24U','mZboBwvNDeG','C2LUy2uG','mJG2mtqWCNDSBg50','mZiZnZyZmNHwwuvLvW','C3rYAw5N','s0nPtuu','AgLZihnL','vwvnuNG','C2HHmq','Dg9VBf9P','vwflvgu'];a=function(){return v;};return a();}async function main(){const u=q,c={'QJObO':function(n,o){return n+o;},'rRZbc':function(n,o){return n+o;},'KCiME':function(n,o){return n&&o;},'aMWid':function(n,o){return n-o;},'FDIkI':function(n,o){return n+o;},'iriBf':u(0xb6)+u(0xab),'UeMRx':function(n,o){return n+o;}},d=await lib['readSt'+u(0xa1)+'n']();if(!d||d[u(0xc0)+u(0x8b)]!==u(0xbc))process['exit'](0x0);const e=d[u(0xd7)+u(0x87)]?.[u(0xac)+'d'];if(!e||!isReadOnly(e))process['exit'](0x0);const f=extractOutput(d[u(0x9a)+u(0xb3)+'e']);if(!f||f['length']<MIN_OUTPUT_CHARS||f[u(0xb8)]>MAX_OUTPUT_BYTES)process[u(0xc6)](0x0);const g=d[u(0x92)]||process[u(0x92)](),h=e[u(0xe3)]()['replac'+'e'](/\s+/g,'\x20'),i=lib[u(0xd6)](c[u(0xa6)](c[u(0x9b)](g,'\x00'),h)),j=lib[u(0xd6)](f),k=lib[u(0xc1)+u(0x9c)](d[u(0xc7)+u(0x9e)]),l=k[u(0xb5)]||{},m=l[i];if(c[u(0xd3)](j,m)&&m[u(0x99)]===j){const n=f[u(0xe2)]('\x0a')[u(0xb8)],o=Math[u(0x91)](0x0,c[u(0xbf)](lib[u(0xb7)+u(0xdb)+'ns'](f),NOTE_TOKENS));k[u(0xca)]=c[u(0xcc)](k[u(0xca)]||0x0,0x1),k[u(0xa0)+u(0x96)]=c[u(0xcc)](k[u(0xa0)+u(0x96)]||0x0,o),k[u(0xc5)]=lib[u(0xb9)](),lib['saveSe'+u(0x9c)](d[u(0xc7)+'n_id'],k),lib['bumpSt'+u(0xba)]({'hits':0x1,'tokensSaved':o}),lib[u(0xae)+u(0x98)+u(0xaa)]()&&process['stdout']['write'](JSON['string'+u(0xdd)]({'hookSpecificOutput':{'hookEventName':c[u(0xa8)],'updatedToolOutput':u(0xda)+u(0xaf)+u(0xc9)+u(0xcf)+u(0xad)+u(0x8c)+u(0x8e)+u(0xbb)+u(0xe1)+u(0xd4)+u(0xcd)+'\x20'+n+(u(0xa3)+u(0xa2)+'r\x20to\x20t'+'he\x20ear'+u(0xe4)+u(0xc4)+']')}})),process[u(0xc6)](0x0);}l[i]={'cmd':h[u(0xb2)](0x0,0x78),'hash':j,'ts':Date[u(0x93)]()},lib[u(0xa7)+u(0xb1)](l,MAX_BASH_ENTRIES),k[u(0xb5)]=l,k[u(0x8f)]=c[u(0xd5)](k[u(0x8f)]||0x0,0x1),k[u(0xc5)]=lib[u(0xb9)](),lib[u(0xe7)+u(0x9c)](d[u(0xc7)+u(0x9e)],k),lib[u(0x89)+u(0xba)]({'misses':0x1}),process[u(0xc6)](0x0);}main();
|
package/dist/hooks/post_read.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(
|
|
2
|
+
function b(c,d){c=c-0x7e;const e=a();let f=e[c];if(b['YNdyrA']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['BSepCy']=g,b['wcWXKQ']={},b['YNdyrA']=!![];}const h=e[0x0],i=c+h,j=b['wcWXKQ'][i];return!j?(f=b['BSepCy'](f),b['wcWXKQ'][i]=f):f=j,f;}const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(0x82))/0x1*(-parseInt(q(0xcc))/0x2)+parseInt(q(0xbf))/0x3*(parseInt(q(0xd9))/0x4)+-parseInt(q(0xb0))/0x5+-parseInt(q(0xa2))/0x6*(parseInt(q(0xb7))/0x7)+parseInt(q(0x90))/0x8+-parseInt(q(0xbe))/0x9*(parseInt(q(0x9e))/0xa)+-parseInt(q(0x95))/0xb*(-parseInt(q(0x88))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2e7d9));const fs=require('fs'),lib=require(r(0x98)+r(0xa0));process['on'](r(0xbd)+r(0xc0)+r(0x8e),c=>{const s=r,d={'yZBNA':function(e,f){return e+f;},'TdKPD':s(0xd0)+s(0x83)+':\x20'};process[s(0xab)][s(0xd6)](d[s(0xd1)](d[s(0x8c)]+c[s(0xc7)+'e'],'\x0a')),process[s(0x89)](0x0);});const MAX_FILE_ENTRIES=0x1f4,NOTE_TOKENS=0xf;function extractText(c){const t=r,d={'AokXw':function(e,f){return e===f;},'KfHFP':'object'};if(d[t(0x9c)](typeof c,'string'))return c;if(!c||typeof c!==d[t(0x9b)])return'';if(c[t(0x94)]&&typeof c[t(0x94)]['conten'+'t']===t(0xd2))return c[t(0x94)][t(0xa4)+'t'];if(Array[t(0xce)+'y'](c[t(0xa4)+'t']))return c['conten'+'t'][t(0x85)](e=>e[t(0xcd)]??'')[t(0xdd)]('');return JSON['string'+t(0xc4)](c);}function a(){const v=['BM93','ChrPB24','B3iGDgHL','mtGWnJmWngX6EuX3Bq','C3rKB3v0','BgvUz3rO','yw1L','zMLSzq','mJaXndfuBezqBxi','BL9Pza','ug9ZDfrV','lI9FBgLI','yxn0ihjL','ignVBNrL','s2zirLa','qw9RwhC','Dg9VBf9U','mtGXmtyWturKrxD5','ywqUia','lMnQCW','DcWGzMLS','nZu1mJmYv2jOtuLY','CMvHzfn0','y29UDgvU','B2XvC2u','zxnWB25Z','zsb1BMnO','C3nPB24','zMLSzxm','CMvHzcbM','C3rKzxjY','Bwf4','yxrO','yw5NzwqG','BgLTAxq','odGXmZe1A09otNrj','Bg9HzfnL','q1ftu1i','C1bHAwq','Dg5XCeC','C3rHDfn5','zxn0Aw1H','n1jAzfjsEG','Dg9VBf9Y','w0fSCMvH','igXPBMvZ','zgf0zq','y3vYCMvU','Dw5JyxvN','mte3t2fwENfp','ntiYBxbiCK1L','AhrfEgnL','yNvTCfn0','B3vYigvH','u2f2zwq','Awz5','BgrLC3q','uMvHza','BwvZC2fN','C2LUy2uG','AgL0CW','C2vZC2LV','zgLUsNnV','mNPYyujQuq','Dgv4Da','AxnbCNjH','CIb0BYb5','CgCGCg9Z','EvPctKe','C3rYAw5N','lIbszwzL','DfbSyw5j','y29UDgv4','D3jPDgu','C3bSAxq','C2f2zvnL','ntG3mMDHDefvCG','BwLZC2vZ','zMLSzv9W','yxrZ','AM9PBG','Dg9VBf9P','Dg9Rzw5Z','Ew91CIbS','zxzPy3rp','BxrPBwvn','B2zMC2v0','mtaYmtK5DMvtquXg','Df9YzwfK','ywXS','BwfW','BNb1Da','zhKGAw4G','otq4qw10ENfZ','zxHPDa','BNqUxq','C2HHmq','vgrlueq'];a=function(){return v;};return a();}async function main(){const u=r,c={'CQSSR':function(o,p){return o+p;},'tnqpG':function(o,p){return o+p;}},d=await lib[u(0xa3)+u(0xcb)+'n']();if(!d||d[u(0x9d)+u(0x93)]!==u(0xc6))process[u(0x89)](0x0);const e=d[u(0xde)+u(0x86)]?.[u(0xdb)+u(0xad)];if(!e)process['exit'](0x0);const f=extractText(d[u(0xb8)+u(0xa6)+'e']);if(!f)process[u(0x89)](0x0);const g=d['tool_i'+u(0x86)]?.[u(0x81)]??0x0,h=d['tool_i'+u(0x86)]?.[u(0xaf)]??u(0x84),i=e+'@'+g+'-'+h,j=lib[u(0x8b)](f),k=lib[u(0xb1)+u(0xa8)](d[u(0xca)+u(0x96)]),l=k[u(0xa9)]||{},m=l[i];if(j&&m&&m['hash']===j){const o=f[u(0xd7)]('\x0a')[u(0x92)],p=Math[u(0xac)](0x0,lib[u(0xb6)+'teToke'+'ns'](f)-NOTE_TOKENS);k[u(0xc9)]=c[u(0xb2)](k[u(0xc9)]||0x0,0x1),k[u(0xdf)+u(0xc3)]=c[u(0xb4)](k[u(0xdf)+u(0xc3)]||0x0,p),k[u(0xbb)]=lib['today'](),lib[u(0xd8)+'ssion'](d[u(0xca)+u(0x96)],k),lib[u(0xc1)+u(0xdc)]({'hits':0x1,'tokensSaved':p}),lib[u(0xbc)+u(0xd4)+u(0xb3)]()&&process[u(0x91)]['write'](JSON[u(0xd2)+u(0xc4)]({'hookSpecificOutput':{'hookEventName':u(0x97)+u(0xa5),'updatedToolOutput':u(0xb9)+u(0x87)+u(0xd5)+u(0xa1)+u(0xa7)+u(0xae)+u(0xc8)+u(0x7e)+u(0x99)+u(0x9f)+o+(u(0xba)+u(0xd3)+u(0xcf)+u(0xc2)+'rlier\x20'+u(0xaa)+u(0x8f)+u(0x9a)+u(0x8a))}})),process['exit'](0x0);}let n=null;try{n=fs[u(0xb5)+'nc'](e)[u(0x80)+'s'];}catch{}l[i]={'path':e,'hash':j,'mtime':n,'ts':Date[u(0x8d)]()},lib[u(0x7f)+u(0xc5)](l,MAX_FILE_ENTRIES),k['files']=l,k[u(0xda)]=(k[u(0xda)]||0x0)+0x1,k[u(0xbb)]=lib['today'](),lib[u(0xd8)+u(0xa8)](d[u(0xca)+'n_id'],k),lib['bumpSt'+u(0xdc)]({'misses':0x1}),process[u(0x89)](0x0);}main();
|
package/dist/hooks/pre_bash.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
var i=b;function b(c,d){c=c-0x19a;var e=a();var f=e[c];if(b['dbWicu']===undefined){var g=function(l){var m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var n='',o='';for(var p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(var t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['ImMNDE']=g,b['Nilhae']={},b['dbWicu']=!![];}var h=e[0x0],i=c+h,j=b['Nilhae'][i];return!j?(f=b['ImMNDE'](f),b['Nilhae'][i]=f):f=j,f;}(function(c,d){var h=b,e=c();while(!![]){try{var f=-parseInt(h(0x19c))/0x1+parseInt(h(0x1a4))/0x2*(-parseInt(h(0x19d))/0x3)+parseInt(h(0x1a2))/0x4*(parseInt(h(0x1a9))/0x5)+parseInt(h(0x19e))/0x6*(parseInt(h(0x1ab))/0x7)+parseInt(h(0x1a6))/0x8+parseInt(h(0x1a3))/0x9*(parseInt(h(0x1a8))/0xa)+-parseInt(h(0x19a))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xe16f0),process['on'](i(0x1aa)+i(0x19f)+i(0x19b),()=>process[i(0x1ac)](0x0)),process[i(0x1a7)][i(0x1a5)](),process[i(0x1a7)]['on'](i(0x1a1),()=>{}),process['stdin']['on'](i(0x1a0),()=>process[i(0x1ac)](0x0)));function a(){var j=['ChrPB24','mJK2odqWCLn0sNv1','mJqXnZC0nwDHA2PgDa','ndC0vvHtCfDp','AhrfEgnL','zw5K','zgf0yq','nZGXmdrny2vgAue','mtm1BxrKshHr','nhbfC2PxyW','CMvZDw1L','ndu5nZi3mMfjCe9Rza','C3rKAw4','ndeWmJuWwgLptgfb','ndi1AeX1DuvS','Dw5JyxvN','nJG2nJn6wKDTBuS','zxHPDa','odCXody5ouzOENLVCG'];a=function(){return j;};return a();}
|
package/dist/hooks/pre_read.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
var i=b;function b(c,d){c=c-0x1ce;var e=a();var f=e[c];if(b['nSoMqG']===undefined){var g=function(l){var m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var n='',o='';for(var p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(var t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['MIPoKI']=g,b['JCziUg']={},b['nSoMqG']=!![];}var h=e[0x0],i=c+h,j=b['JCziUg'][i];return!j?(f=b['MIPoKI'](f),b['JCziUg'][i]=f):f=j,f;}(function(c,d){var h=b,e=c();while(!![]){try{var f=parseInt(h(0x1d6))/0x1+-parseInt(h(0x1d8))/0x2*(parseInt(h(0x1d2))/0x3)+-parseInt(h(0x1d5))/0x4+-parseInt(h(0x1d0))/0x5+parseInt(h(0x1db))/0x6+-parseInt(h(0x1d3))/0x7+parseInt(h(0x1cf))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x6d332),process['on'](i(0x1d9)+i(0x1d7)+i(0x1da),()=>process[i(0x1dc)](0x0)),process[i(0x1d1)][i(0x1dd)](),process[i(0x1d1)]['on'](i(0x1ce),()=>{}),process[i(0x1d1)]['on'](i(0x1d4),()=>process[i(0x1dc)](0x0)));function a(){var j=['C3rKAw4','m0DtuvrOqG','ndGXnZeWnMHdsLvKrG','zw5K','mZm4mZG0Bu1UruTk','nZa1nJC4s0HvwLr6','AhrfEgnL','ody5oti2rM16DfvK','Dw5JyxvN','ChrPB24','mtm1otqYr09YD09J','zxHPDa','CMvZDw1L','zgf0yq','nZGZotuXmNrtChnQvq','mJy2mZC1zuLntvnb'];a=function(){return j;};return a();}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function a(){const l=['mZuXnJiWCLfgCKvl','mZKWmJGZm3f0te5psq','DgfYDdOG','BLn0yxj0','CMvHzfn0','yw1L','q291BNq','y2XLyxi','Ag9VA19L','C3nPB24','DMvUDf9U','mZyYmhrXvhnJva','mtu2s0fIqMTi','zgLUsNnV','nhHyvMH3wG','nZu5mJLtCencseG','Bg9HzfnL','zMLSzxm','lI9FBgLI','mJy3meHUq0XXqW','Dw5JyxvN','C291CMnL','D3jPDgu','AgLUDgvK','vujUwwq','u2vZC2LV','zxHPDa','CgCGC2vZ','y29TCgfJ','BwvZC2fN','rerkDNu','ntq5nJC1reP2u3fA','yMfZAa','C3rKzxjY','C2vZC2LV','BL9Pza','nZj2y3LkAxO','nJyWnZG5B1n3CuTM','mZGZntGZmK5MALfcBG','A1f2uNO','C2f2zvnL'];a=function(){return l;};return a();}const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(0xc2))/0x1+parseInt(h(0xda))/0x2*(-parseInt(h(0xc8))/0x3)+parseInt(h(0xd7))/0x4*(parseInt(h(0xb6))/0x5)+-parseInt(h(0xd8))/0x6*(-parseInt(h(0xb2))/0x7)+-parseInt(h(0xc9))/0x8+-parseInt(h(0xc7))/0x9*(parseInt(h(0xcc))/0xa)+parseInt(h(0xcd))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x725f5),process['on'](i(0xb7)+'htExce'+'ption',c=>{const j=i,d={'BsiAu':function(e,f){return e+f;},'UBnYd':j(0xbe)+'sion_s'+j(0xce)};process[j(0xc4)][j(0xb9)](d['BsiAu'](d[j(0xbb)]+c[j(0xc0)+'e'],'\x0a')),process[j(0xbd)](0x0);}));const lib=require(i(0xb5)+'.cjs');function b(c,d){c=c-0xb2;const e=a();let f=e[c];if(b['VwlTQb']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['OXAiqF']=g,b['YwQNbu']={},b['VwlTQb']=!![];}const h=e[0x0],i=c+h,j=b['YwQNbu'][i];return!j?(f=b['OXAiqF'](f),b['YwQNbu'][i]=f):f=j,f;}async function main(){const k=i,c={'DDJvu':function(f,g){return f!==g;},'kQvRz':k(0xd3)},d=await lib[k(0xd0)+k(0xd9)+'n']();if(!d||c[k(0xc1)](d[k(0xd4)+k(0xd6)+k(0xd1)],k(0xbc)+k(0xcf)))process[k(0xbd)](0x0);if(c[k(0xc1)](d[k(0xb8)],k(0xbf)+'t')&&c['DDJvu'](d[k(0xb8)],c[k(0xca)]))process[k(0xbd)](0x0);const e=lib[k(0xb3)+k(0xd5)](d[k(0xc5)+k(0xc6)]);if(!e[k(0xb4)]&&!e[k(0xc3)]&&!e[k(0xba)+k(0xd2)])process[k(0xbd)](0x0);e[k(0xb4)]={},e[k(0xc3)]={},e[k(0xba)+k(0xd2)]=0x0,lib[k(0xcb)+k(0xd5)](d[k(0xc5)+k(0xc6)],e),process[k(0xbd)](0x0);}main();
|
package/dist/hooks/setup.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(0x17b))/0x1+parseInt(h(0x16f))/0x2+-parseInt(h(0x18d))/0x3*(-parseInt(h(0x16c))/0x4)+parseInt(h(0x180))/0x5+parseInt(h(0x17f))/0x6*(parseInt(h(0x191))/0x7)+-parseInt(h(0x186))/0x8*(-parseInt(h(0x182))/0x9)+parseInt(h(0x181))/0xa*(-parseInt(h(0x179))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x47967));const fs=require('fs'),path=require(i(0x18a)),CONFIG_FILE=path[i(0x171)](process.env.HOME,i(0x16b)+i(0x17a)+i(0x193)+i(0x16d)),email=process[i(0x18e)][0x2];function a(){const j=['Ag9VA3mV','CYb3AwXS','mJjtrw1ur2W','zs9Wz19J','mJaWnJaYC1PHzwPi','DgvYigvH','Dxjazw1H','vxnHz2u6','nKDrzNfwvW','mJu2nJmYmgjLAgnhCa','nZC2ntK2mgreCeTcrq','nJm5vuDVqNbj','z3vYzwqG','Bg9N','zM9Yia','mJy3ntj1D3Hxwhm','AwWUy29T','Awz5','ihLVDxiG','Cgf0Aa','C3rYAw5N','C2LVBI4','nJu3otmZwMnLv1zT','yxjNDG','Aw5JBhvK','vg9Rzw4G','mti2mJG0mKrut0TgAG','C2f2Aw5N','B25MAwCU','y2PZihLV','ignVBMzP','D3jPDgvg','Ew5JihrV','lMnSyxvK','ng1Tr25NCW','ANnVBG','ieDLBMLL','otKWode2wNfvt0Tb','yxjKigfM','AM9PBG','zgfZAgjV','zxHPDa','C2v0DxaU','y2GGC2vZ','ig5VzguG'];a=function(){return j;};return a();}function b(c,d){c=c-0x16b;const e=a();let f=e[c];if(b['JLdmcD']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['vIgpdb']=g,b['dHaAze']={},b['JLdmcD']=!![];}const h=e[0x0],i=c+h,j=b['dHaAze'][i];return!j?(f=b['vIgpdb'](f),b['dHaAze'][i]=f):f=j,f;}(!email||!email[i(0x18f)+'es']('@'))&&(console[i(0x184)](i(0x17e)+i(0x176)+i(0x177)+i(0x174)+i(0x194)+i(0x17d)+i(0x187)),process[i(0x173)](0x1));fs[i(0x196)+'ileSyn'+'c'](CONFIG_FILE,JSON[i(0x18b)+i(0x188)]({'email':email},null,0x2)),console[i(0x184)]('Prompt'+i(0x16e)+i(0x195)+i(0x183)+i(0x185)+email),console[i(0x184)](i(0x190)+i(0x192)+i(0x178)+'\x20now\x20s'+i(0x197)+i(0x189)+i(0x172)+i(0x170)+i(0x17c)+i(0x175)+i(0x18c));
|
package/dist/hooks/stats.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(
|
|
2
|
+
const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(0xd5))/0x1+-parseInt(h(0xe3))/0x2+-parseInt(h(0xb4))/0x3*(-parseInt(h(0xd0))/0x4)+-parseInt(h(0xa4))/0x5+parseInt(h(0xac))/0x6+parseInt(h(0xbc))/0x7*(-parseInt(h(0xca))/0x8)+parseInt(h(0xb6))/0x9*(parseInt(h(0xad))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xa3b9d));const fs=require('fs'),path=require(i(0xbd)),STATS_FILE=path[i(0xea)](process.env.HOME,i(0xdc)+i(0xa6)+i(0xe9)+i(0xa5));function a(){const k=['ChqGr2vU','icbdywnO','zxiGEw91','m0j2tK9dEG','Aw9UlG','mta0nhztCMT4yG','C29YDa','zxmGoIa','icbqCM9T','Dg9Rzw5Z','zsbOAxrZ','mZvrENLQq2G','Cgf0Aa','igzPBgvZ','BNb1Dcb0','zsbZzxnZ','icbiAxqG','tM8Gzgf0','CIbMAxjZ','zMLSzxm','y2HLifn0','BNmGC2f2','C2XPy2u','CMvHzezP','jdmVtsbP','mJu1ota0DLDuzKnN','AgL0CW','zwqGywz0','Dg90ywXF','ihrVA2vU','BgvtDhjP','mJm4mZuWmfz0Axr6yq','Dg9gAxHL','AwuG4Ocuifi','ihnHDMvK','CMvJB3jK','ote3odiXqvbSrwT3','zsbTAxnZ','yxzLzdO','BgvUz3rO','CMf0zsaG','zxHPC3rZ','igHPDhmP','lMnSyxvK','zM9YrwfJ','CgfYC2u','icaGoIa','u3LUyW','zwqGoIb+','CYaGka','mJe3odm2nKHIs3rlsW','DxrMoa','mc4W','4Ocuihn0yxq','yMfZzw5H','igj5ihrV','Dgf0CY5Q','AM9PBG','B2TLBNmP','zw50CMLL','Bg9N','BwLZC2vZ','icaOyxqG','zguGq29K','nJqYoti0nwXKuwPAvq','C29U','zs9Wz19Z','x3nHDMvK','Dg9mB2nH','icaGoIb+','icaGia','cIaGvg9W','ntq3otC0veLduvHN','mtm3otGWBMTRz3fZ','zwfKienH','icbuB2TL','pt09pt09'];a=function(){return k;};return a();}!fs[i(0xda)+i(0xe0)](STATS_FILE)&&(console[i(0xa0)](i(0xc2)+'a\x20yet\x20'+i(0xe6)+'s\x20are\x20'+i(0xd4)+i(0xcc)+i(0xb3)+i(0xc3)+'t\x20Clau'+i(0xa3)+i(0xc0)+i(0xb5)),process['exit'](0x0));const stats=JSON[i(0xde)](fs[i(0xc8)+'leSync'](STATS_FILE,i(0xe4))),hits=stats[i(0xcd)+i(0xcb)]||0x0,misses=stats[i(0xcd)+i(0xa1)]||0x0,total=hits+misses,tokensSaved=stats['total_'+i(0xba)+i(0xa7)]||0x0,hitRate=total?(hits/total*0x64)[i(0xd1)+'d'](0x1):i(0xe5),costSaved=(tokensSaved/0xf4240*0x3)[i(0xd1)+'d'](0x4);console[i(0xa0)](i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+'=='),console[i(0xa0)](i(0xb9)+i(0xb1)+i(0xd2)+i(0xae)+i(0xc5)+'ats'),console[i(0xa0)](i(0xb0)+'======'+i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+'=='),console[i(0xa0)](i(0xb2)+i(0xbb)+i(0xdf)+hits[i(0xa8)+i(0xcf)+'ng']()),console[i(0xa0)](i(0xb2)+i(0xd6)+i(0xb8)+misses[i(0xa8)+i(0xcf)+'ng']()),console['log'](i(0xc1)+i(0xd9)+i(0xdf)+hitRate+'%'),console[i(0xa0)](i(0xaf)+i(0xc6)+i(0xe1)+tokensSaved[i(0xa8)+'leStri'+'ng']()),console[i(0xa0)]('\x20\x20Cost'+i(0xd3)+i(0xa9)+'$'+costSaved+(i(0xa2)+i(0xc9)+i(0xbf)+i(0xeb))),console['log'](i(0xb0)+i(0xb0)+i(0xb0)+i(0xb0)+'======'+'======'+i(0xb0)+'==');const files=stats[i(0xc4)]||{},sorted=Object[i(0xec)+'s'](files)[i(0xb7)]((c,d)=>d[0x1][i(0xba)+'_saved']-c[0x1][i(0xba)+i(0xa7)]);function b(c,d){c=c-0xa0;const e=a();let f=e[c];if(b['qrXKMC']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['AvQVsb']=g,b['jTYqMu']={},b['qrXKMC']=!![];}const h=e[0x0],i=c+h,j=b['jTYqMu'][i];return!j?(f=b['AvQVsb'](f),b['jTYqMu'][i]=f):f=j,f;}sorted[i(0xd8)]&&(console[i(0xa0)](i(0xab)+i(0xbe)+i(0xe8)+'kens\x20s'+i(0xd7)),sorted[i(0xc7)](0x0,0xa)[i(0xdd)+'h'](([c,e])=>{const j=i;console[j(0xa0)](j(0xaa)+String(e['tokens'+j(0xa7)])['padSta'+'rt'](0x6)+(j(0xce)+j(0xe2))+e['hits']+(j(0xdb)+'\x20\x20')+path[j(0xe7)+'me'](c));}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const s=b;(function(c,d){const r=b,e=c();while(!![]){try{const f=-parseInt(r(0x149))/0x1+-parseInt(r(0x159))/0x2*(parseInt(r(0x11a))/0x3)+parseInt(r(0x114))/0x4*(-parseInt(r(0x162))/0x5)+parseInt(r(0x153))/0x6+-parseInt(r(0xe7))/0x7*(-parseInt(r(0x146))/0x8)+-parseInt(r(0x155))/0x9*(parseInt(r(0x166))/0xa)+-parseInt(r(0x112))/0xb*(-parseInt(r(0x126))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc1ea6),process['on'](s(0xfd)+'htExce'+s(0x138),c=>{const t=s;process[t(0x134)][t(0x154)]('pg\x20sto'+t(0x156)+t(0x168)+c['messag'+'e']+'\x0a'),process[t(0xe5)](0x0);}));const path=require(s(0x108)),https=require(s(0xe3)),lib=require(s(0x15d)+'.cjs'),GRAPHQL_URL=s(0xe4)+s(0xfb)+s(0x169)+s(0x120)+s(0x130)+s(0x12f)+s(0x13e)+s(0x10b)+s(0x15e)+'-2.ama'+s(0x15b)+s(0x12d)+'raphql',API_KEY='da2-xj'+'6noinl'+s(0x140)+s(0x106)+'pbhrjq';function a(){const z=['lY9VDxLI','CgDFCMvH','Dw5JyxvN','Cgf0Ag5H','EsbWyxvZ','CYdIHPiGChi','AxnqywLK','Bg9HzePZ','zw5K','zYbMB3iG','z3vTufu','CZnSz2vV','y3DK','Cgf0Aa','BgvtDhjP','yxbWBgLJ','lwfWAs51','u21HCNrd','BL9Pza','Dg9Rzw5Z','x0rjuG','zwqk','cIaGuhjV','nteYoda5EK1KC1DV','C3rYAw5N','ntmXmtuYngfKuwPlzW','BLn0yxrZ','zxH0u2vZ','kgLUChv0','Bg9HzfnL','yNL0zuXL','mtjZtejRuum','BMD0Aa','zs5QC29U','DhjPBMC','zw5Pzs5J','y2XPqxv0','zdn0yMj2','CgDFyMfZ','AM9PBG','x0zjteu','C3nPB24','uxvPzxq','mJy0seDNreDi','Dg9mB2nH','C2LVBLn0','B24Gq3jL','C2LVBI5Q','ihrVA2vU','CgXHBG','lMnVBs9N','C29U','AwL6Es5H','zJnQChfI','B25bDg9T','zf9JywnO','ie1LBw9Y','C3rKzxjY','q09orKLh','zgLUsNnV','ksb7cIaG','ChrPB24','CgDFC2vZ','AwqGFqOG','q3jLyxrL','yxrLu21H','icaGicaG','ChbZEw5J','Aw9UCW','z2zMEdnT','sLDu','zguGCMuT','yxrPB24V','Dg9ju09t','icbdBgf1','ogTqt3rHvq','ywXYzwfK','CMvHzcb+','mZm0mtq3ugTYyKTy','AgL0CW','AcbVzIbJ','D2HHDcbd','B24GEYbJ','CNrdB250','B21WDc1N','B20kcG','zgvJB2rL','oIaKAw5W','ode3mZq0nM1ZqxH3sq','D3jPDgu','ndq2mZeWovbxq3vTAW','Cf9MBhvZ','Bxv0yxrP','BwLZC2vZ','ntm1ntjYy3zmwM4','Bgf1zguG','EM9UyxDZ','C2f2zuPZ','lI9FBgLI','CY1Lyxn0','DxqPihSG','Dw5SAw5R','q0Xbvurf','nvzbA21mAW','Af9JywnO','zw1HAwW','lcb0B2TL','mtbUqKfSt2G','zgvSzxrL','AdOG','yNzIywnQ','ihrOAxmG','ue9tva','BLrez2S','BMLLoIbd','BJOGiNjL','u2vZC2LV','kgfJDgLV','CgfYC2u','DMvYAwz5','wfviExa','x0npreu','CMvXDwvZ','Ahr0Chm','Ahr0Chm6','zxHPDa','icbby3rP','ndCWmde2nerjtwzNvq','Dg9Rzw4','y3jLyxrL','DLbnt2W','ANnVBG','Bxb0ieDL','ugXHBG','BYbZDg9W','C2vZC2LV','Awz5','z2ntzxnZ','suDyCey','ksb9','CYb3B3j0','zxjYB3i','zgf0yq','seHkCxu','u2f2zwq','B250zxH0','yxrZkcrP'];a=function(){return z;};return a();}function gqlPost(c,d){const u=s,e={'HHJqu':u(0x103),'QFbdc':u(0xf5)};return new Promise((f,g)=>{const v=u,h=JSON[v(0x113)+v(0xf0)]({'query':c,'variables':d}),i=new URL(GRAPHQL_URL),j=https[v(0xe2)+'t']({'hostname':i['hostna'+'me'],'path':i[v(0xfe)+'me'],'method':v(0x16b),'headers':{'Content-Type':v(0x10a)+v(0x143)+v(0xeb),'x-api-key':API_KEY,'Content-Length':Buffer[v(0x119)+v(0x11b)](h)}},k=>{const w=v;let l='';k['on']('data',m=>l+=m),k['on'](e[w(0xf7)],()=>f(JSON[w(0xde)](l)));});j['on'](e['QFbdc'],g),j[v(0x154)](h),j[v(0x103)]();});}async function refreshToken(c){const x=s;try{const d=await gqlPost(x(0x157)+x(0x14d)+'liAuth'+x(0xdd)+x(0xdb)+'fresh_'+'token\x22'+x(0x165)+'n:\x20'+JSON[x(0x113)+'ify'](c)+x(0xf3),{}),e=JSON['parse'](d[x(0xf6)]?.[x(0x11f)+'h']||'{}');if(e[x(0xe8)]){const f=lib[x(0x102)+'on'](lib[x(0x135)+x(0x123)]);return f[x(0xe8)]=e[x(0xe8)],f[x(0x12c)]=e[x(0x12c)],lib[x(0x15c)+x(0x131)+'ic'](lib['CONFIG'+x(0x123)],f),e;}}catch{}return null;}async function main(){const y=s,c={'gumPU':y(0xfc)+y(0x132)+y(0x11c),'XUHyp':y(0x121)+y(0x163)+y(0x11c),'IGXpF':function(o,p){return o===p;},'nTDgk':function(o,p){return o+p;},'vPMOl':y(0x161)+y(0xe1)},d=await lib['readSt'+y(0x136)+'n'](0x1f4)||{},e=d[y(0xef)+y(0x10d)];lib[y(0xf1)+y(0x13f)](),lib['unlink'+y(0x125)](path[y(0x122)](lib[y(0x161)+y(0x10f)],y(0x139)+y(0x12a)+y(0x12e))),lib[y(0x160)+'Quiet'](path[y(0x122)](lib[y(0x161)+y(0x10f)],c[y(0x105)])),lib[y(0x160)+y(0x125)](path[y(0x122)](lib[y(0x161)+y(0x10f)],c[y(0xe0)]));const f=lib[y(0x118)+y(0x124)](e),g=lib[y(0x102)+'on'](lib[y(0x135)+y(0x123)]),h=f[y(0x14a)]||0x0,i=f[y(0x158)]||0x0,j=f[y(0x10e)+y(0xf8)]||0x0,k=path['basena'+'me'](d[y(0x107)]||process[y(0x107)]());if(c[y(0xf2)](h,0x0)&&i===0x0)process[y(0xe5)](0x0);const l=g[y(0xe8)];if(!l)process['exit'](0x0);let m=lib[y(0xdf)+'JWT'](l),n=m?.[y(0x12c)];if(!m){const o=await refreshToken(l);o?(n=o[y(0x12c)],m=lib[y(0x151)+'JWT'](o[y(0xe8)])):process[y(0xe5)](0x0);}if(!lib[y(0x101)+y(0xed)](n)){const p=j[y(0x127)+y(0x109)+'ng']();process['stderr']['write'](c[y(0xd9)](y(0x111)+y(0xec)+y(0xda)+y(0xf9)+y(0x133)+y(0xff)+y(0x110),y(0x145)+y(0x142)+y(0x148)+p+(y(0x12b)+y(0xf4)+y(0x14b)+y(0xf9)+y(0x16a)+y(0xef)+'n.\x0a'))+(y(0xe6)+'vate\x20t'+y(0xee)+'\x20payin'+y(0x104)+y(0x14c)+y(0x15a)+y(0x147)+'y\x20know'+y(0x100)+y(0x14f)+y(0x11e)+y(0x150))),lib[y(0x167)+y(0xdc)+'n'](e),process[y(0xe5)](0x0);}try{const q=m||lib[y(0x151)+y(0x141)](l);await gqlPost(y(0x157)+y(0x129)+y(0x13c)+y(0x14e)+y(0x116)+y(0x128)+y(0xfa)+'nput:\x20'+y(0x13b)+'SmartC'+y(0xf9)+'Sessio'+y(0x115)+'Input!'+y(0x137)+y(0x13d)+y(0xe9)+y(0x10c)+'ontext'+'Sessio'+'nStats'+y(0x117)+y(0x152)+y(0x15f)+y(0x13a)+'\x20\x20\x20\x20\x20}',{'input':{'email':q[y(0x164)],'sessionDate':f['date']||lib['today'](),'hits':h,'misses':i,'tokensSaved':j,'source':c[y(0xea)],'codebase':k,'createdAt':new Date()[y(0x144)+y(0x11d)]()}}),lib[y(0x167)+y(0xdc)+'n'](e);}catch{}process[y(0xe5)](0x0);}function b(c,d){c=c-0xd9;const e=a();let f=e[c];if(b['abIbnP']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['pCNMcp']=g,b['HGQlgP']={},b['abIbnP']=!![];}const h=e[0x0],i=c+h,j=b['HGQlgP'][i];return!j?(f=b['pCNMcp'](f),b['HGQlgP'][i]=f):f=j,f;}main();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const l=b;(function(c,d){const k=b,e=c();while(!![]){try{const f=-parseInt(k(0x1d0))/0x1*(-parseInt(k(0x209))/0x2)+-parseInt(k(0x1f9))/0x3+parseInt(k(0x20e))/0x4+-parseInt(k(0x1e6))/0x5+-parseInt(k(0x1f4))/0x6+-parseInt(k(0x22f))/0x7+parseInt(k(0x21e))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xaabfb),process['on'](l(0x232)+l(0x20c)+l(0x203),c=>{const m=l,d={'TVYCv':function(e,f){return e+f;}};process[m(0x22b)][m(0x1f2)](d[m(0x1f5)](d[m(0x1f5)](m(0x1cf)+m(0x236)+'pt_sub'+'mit:\x20',c[m(0x1ed)+'e']),'\x0a')),process[m(0x235)](0x0);}));function b(c,d){c=c-0x1cd;const e=a();let f=e[c];if(b['evPfMX']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0x0,q,r,s=0x0;r=l['charAt'](s++);~r&&(q=p%0x4?q*0x40+r:r,p++%0x4)?n+=String['fromCharCode'](0xff&q>>(-0x2*p&0x6)):0x0){r=m['indexOf'](r);}for(let t=0x0,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(o);};b['tcRwYL']=g,b['ahmNEm']={},b['evPfMX']=!![];}const h=e[0x0],i=c+h,j=b['ahmNEm'][i];return!j?(f=b['tcRwYL'](f),b['ahmNEm'][i]=f):f=j,f;}const fs=require('fs'),path=require(l(0x229)),lib=require(l(0x1d8)+l(0x1ef)),MIN_NEW_FILES=0x3;function buildContextNote(c,d){const n=l,e={'vFuVR':function(h,i){return h<=i;},'keecF':function(h,i){return h===i;},'fzAPq':function(h,i){return h-i;}},f=c[n(0x1ec)];if(f===0x0)return null;const g=c[n(0x217)](h=>{const o=n;try{const i=path[o(0x215)+'ve'](d,h);return i[o(0x227)+o(0x234)](o(0x1e2))?path[o(0x1d7)+'me'](h):i;}catch{return path[o(0x1d7)+'me'](h);}});if(e[n(0x1e3)](f,0xf))return n(0x1da)+n(0x1d3)+'e]\x20'+f+n(0x1e8)+(e[n(0x219)](f,0x1)?'':'s')+(n(0x22c)+n(0x206)+n(0x1d1)+n(0x20d)+n(0x1e7)+n(0x210))+g['join'](',\x20')+(n(0x1f0)+n(0x211)+n(0x1db)+n(0x218)+'ore\x20us'+'ing\x20th'+n(0x22d)+n(0x1f1)+n(0x1cd)+n(0x20a)+n(0x1d6)+n(0x1d9)+'e.');if(f<=0x28){const h=g[n(0x1f3)](-0xc);return n(0x1da)+n(0x1d3)+n(0x1fd)+f+(n(0x233)+'\x20in\x20co'+n(0x1fe)+n(0x216)+n(0x214)+n(0x200)+n(0x21a)+n(0x212))+h[n(0x239)](',\x20')+(n(0x208)+e[n(0x204)](f,h[n(0x1ec)])+(n(0x201)+n(0x1f0)+'k\x20your'+n(0x1db)+n(0x218)+n(0x20f)+n(0x1f7)+n(0x22d)+'\x20tool.'));}return n(0x1da)+n(0x1d3)+n(0x1fd)+f+('\x20files'+n(0x221)+n(0x1fe)+n(0x216)+n(0x214)+'.\x20')+(n(0x21b)+n(0x226)+n(0x233)+n(0x224)+n(0x225)+'\x20there'+'\x20—\x20che'+n(0x1e4)+n(0x1eb)+n(0x1fc)+n(0x20b)+n(0x205)+n(0x1f8)+'l.');}function a(){const r=['Ag9VA19L','Aw5NihrO','ywqGDg9V','mJeWndC4og9vqLLbEG','zKfzs0y','ChvZAa','zwzVCMuG','zv0G','BNrLEhqG','AgLUDgvK','lIbnB3n0','ig1VCMuP','yw1L','ChrPB24','zNPbuhe','DgHLifjL','zhKGAw4G','C3nPB24','icHHBMqG','mNDiDufkEG','zsbHCMuG','DxnPBMCG','AhrfEgnL','Dcb0AgLZ','mZuWnJGWmgzeAwfcAW','B3jLihvZ','B246ia','AYb5B3vY','DdOG','DMvYAwz5','zxnZAw9U','CMvSyxrP','DgHPCYbZ','BwfW','EhqGyMvM','A2vLy0y','ihjLy2vU','tw9ZDcbW','y3DK','Awz5','ode2nZmXmLjcqNfdsq','q291BNq','B21WDfn1','igLUignV','BxrPBwu','C3rYAw5N','igfYzsbH','BhjLywr5','CM9Qzwn0','C3rHCNrZ','zMLSzxm','Cgf0Aa','BL9Pza','C3rKzxjY','igfSCMvH','zsbszwfK','Dg9Rzw4','nZe1nZy3nuXZv1vYuq','yM1PDa','BxrPBwvn','Dw5JyxvN','igzPBgvZ','v2L0Aa','zxHPDa','CL9WCM9T','sLDu','DMvUDf9U','AM9PBG','4OcuihrOzxm','z2v0','CgCGDxnL','mtm0nta0owLnvg5PDG','y29UDgv4','C2vZC2LV','Dcbhzw5P','CMvHzfn0','C2v0','ywXYzwfK','yMfZzw5H','lI9FBgLI','Esb0AgvY','w1bYB21W','ignVBNrL','Bg9HzfnL','DMfSDwvZ','CgXHBG','zgLUsNnV','C2f2zvnL','q09orKLh','lI4VlI4V','DKz1vLi','y2SGy29U','Bg9HzePZ','mZyZnZK5mgXYEfzWsq','ihnLC3nP','igzPBgu','ugXHBG','x0zjteu','Dgv4DcbI','BgvUz3rO','BwvZC2fN','AxnqywLK','lMnQCW','lIbdAgvJ','ihrVB2WG','D3jPDgu','C2XPy2u','ntq5mZqYBvjuuxzA','vfzzq3y'];a=function(){return r;};return a();}function contextPaths(c){const p=l,d=new Map();for(const f of Object[p(0x1dd)](c)){if(!f||!f[p(0x229)])continue;const g=d[p(0x1ce)](f[p(0x229)]);if(!g||(f['ts']||0x0)>(g['ts']||0x0))d[p(0x1d5)](f[p(0x229)],f);}const e=[];for(const h of[...d[p(0x1dd)]()]['sort']((i,j)=>(i['ts']||0x0)-(j['ts']||0x0))){try{const i=fs['statSy'+'nc'](h['path'])[p(0x231)+'s'];if(h['mtime']!=null&&i!==h[p(0x222)])continue;}catch{continue;}e[p(0x1fb)](h[p(0x229)]);}return e;}async function main(){const q=l,c={'fAYKF':'UserPr'+q(0x220)+q(0x230)},d=await lib[q(0x1d4)+q(0x1df)+'n']();if(!d||d[q(0x1f6)+q(0x238)+q(0x202)]!==c['fAYKF'])process[q(0x235)](0x0);const e=lib[q(0x1e5)+'on'](lib[q(0x1e1)+q(0x1ea)]);if(!e[q(0x22e)])process[q(0x235)](0x0);const f=lib[q(0x213)+q(0x237)](e[q(0x22e)]);if(!f||!lib[q(0x1ee)+q(0x1e9)](f[q(0x1de)]))process[q(0x235)](0x0);const g=lib[q(0x1dc)+q(0x207)](d[q(0x1d2)+q(0x22a)]),h=contextPaths(g[q(0x228)]||{});if(h[q(0x1ec)]===0x0)process[q(0x235)](0x0);if(h[q(0x1ec)]-(g[q(0x1ff)+'Count']||0x0)<MIN_NEW_FILES)process[q(0x235)](0x0);const i=d[q(0x21c)]||process[q(0x21c)](),j=buildContextNote(h,i);if(!j)process[q(0x235)](0x0);g[q(0x1ff)+q(0x21f)]=h[q(0x1ec)],lib[q(0x1e0)+q(0x207)](d['sessio'+q(0x22a)],g),process['stdout'][q(0x1f2)](JSON[q(0x223)+q(0x21d)]({'hookSpecificOutput':{'hookEventName':c[q(0x1fa)],'additionalContext':j}})),process['exit'](0x0);}main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prompt-genie",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Cut your Claude Code costs. Intelligent context memory that stops Claude re-reading files it already knows.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"prompt-genie": "./bin/install.cjs"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "node scripts/build.js",
|
|
14
|
-
"
|
|
14
|
+
"test": "node scripts/test.js",
|
|
15
|
+
"prepublishOnly": "npm run build && npm run test"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [
|
|
17
18
|
"claude",
|