hkcc 0.1.0 → 0.1.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 CHANGED
@@ -38,6 +38,9 @@ graph LR
38
38
 
39
39
  **Multi-User Support:** Session cookies and per-user API keys with database-backed credential storage
40
40
 
41
+ > **⚠️ Runtime Requirement**
42
+ > This package **MUST be run with Bun** (>=1.0.0). It uses `bun:sqlite` under the hood for the database layer, which is not compatible with Node.js.
43
+
41
44
  See [TECHNICAL.md](TECHNICAL.md) for detailed architecture diagrams and implementation details.
42
45
 
43
46
  ## Quick Start
@@ -80,13 +83,15 @@ HKCC can be run as a CLI tool via `npx` or `bunx`, perfect for quick local usage
80
83
 
81
84
  ### Installation
82
85
 
83
- ```bash
84
- # Via npx (requires Node.js)
85
- npx hkcc --help
86
+ > **⚠️ Bun Required**: Even when using `npx`, Bun must be installed on your system because the bundled CLI uses `bun:sqlite` internally.
86
87
 
87
- # Via bunx (requires Bun)
88
+ ```bash
89
+ # Via bunx (recommended - uses Bun directly)
88
90
  bunx hkcc --help
89
91
 
92
+ # Via npx (Bun must be installed on system)
93
+ npx hkcc --help
94
+
90
95
  # Or run directly from the repo
91
96
  bun run bin/hkcc.ts --help
92
97
  ```
@@ -730,7 +735,7 @@ See [TECHNICAL.md](./TECHNICAL.md) for architecture details.
730
735
 
731
736
  ## Tech Stack
732
737
 
733
- - **Runtime**: Bun
738
+ - **Runtime**: Bun (>=1.0.0) - **Required** (uses `bun:sqlite`)
734
739
  - **Framework**: Elysia
735
740
  - **Frontend**: React, TanStack Router, Tailwind CSS
736
741
  - **Type-Safe Client**: Eden
package/dist/hkcc.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  // @bun
3
3
  var Q_0=Object.create;var{getPrototypeOf:__0,defineProperty:aI,getOwnPropertyNames:j_0}=Object;var k_0=Object.prototype.hasOwnProperty;var xZ=(Z,z,J)=>{J=Z!=null?Q_0(__0(Z)):{};let U=z||!Z||!Z.__esModule?aI(J,"default",{value:Z,enumerable:!0}):J;for(let D of j_0(Z))if(!k_0.call(U,D))aI(U,D,{get:()=>Z[D],enumerable:!0});return U};var R=(Z,z)=>()=>(z||Z((z={exports:{}}).exports,z),z.exports);var N8=(Z,z)=>{for(var J in z)aI(Z,J,{get:z[J],enumerable:!0,configurable:!0,set:(U)=>z[J]=()=>U})};var W6=(Z,z)=>()=>(Z&&(z=Z(Z=0)),z);var O0=import.meta.require;var J4,hU;var KF=W6(()=>{J4=class J4 extends Error{constructor(){super("End-Of-Stream");this.name="EndOfStreamError"}};hU=class hU extends Error{constructor(Z="The operation was aborted"){super(Z);this.name="AbortError"}}});class p${constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((Z,z)=>{this.reject=z,this.resolve=Z})}}class yU{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(Z,z=!1){let J=await this.read(Z,z);return this.peekQueue.push(Z.subarray(0,J)),J}async read(Z,z=!1){if(Z.length===0)return 0;let J=this.readFromPeekBuffer(Z);if(!this.endOfStream)J+=await this.readRemainderFromStream(Z.subarray(J),z);if(J===0&&!z)throw new J4;return J}readFromPeekBuffer(Z){let z=Z.length,J=0;while(this.peekQueue.length>0&&z>0){let U=this.peekQueue.pop();if(!U)throw Error("peekData should be defined");let D=Math.min(U.length,z);if(Z.set(U.subarray(0,D),J),J+=D,z-=D,D<U.length)this.peekQueue.push(U.subarray(D))}return J}async readRemainderFromStream(Z,z){let J=0;while(J<Z.length&&!this.endOfStream){if(this.interrupted)throw new hU;let U=await this.readFromStream(Z.subarray(J),z);if(U===0)break;J+=U}if(!z&&J<Z.length)throw new J4;return J}}var vA=W6(()=>{KF()});var fA;var iu=W6(()=>{KF();vA();fA=class fA extends yU{constructor(Z){super();if(this.s=Z,this.deferred=null,!Z.read||!Z.once)throw Error("Expected an instance of stream.Readable");this.s.once("end",()=>{if(this.endOfStream=!0,this.deferred)this.deferred.resolve(0)}),this.s.once("error",(z)=>this.reject(z)),this.s.once("close",()=>this.abort())}async readFromStream(Z,z){if(Z.length===0)return 0;let J=this.s.read(Z.length);if(J)return Z.set(J),J.length;let U={buffer:Z,mayBeLess:z,deferred:new p$};return this.deferred=U.deferred,this.s.once("readable",()=>{this.readDeferred(U)}),U.deferred.promise}readDeferred(Z){let z=this.s.read(Z.buffer.length);if(z)Z.buffer.set(z),Z.deferred.resolve(z.length),this.deferred=null;else this.s.once("readable",()=>{this.readDeferred(Z)})}reject(Z){if(this.interrupted=!0,this.deferred)this.deferred.reject(Z),this.deferred=null}async abort(){this.reject(new hU)}async close(){return this.abort()}}});var n$;var ou=W6(()=>{vA();n$=class n$ extends yU{constructor(Z){super();this.reader=Z}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var hA;var i$=W6(()=>{ou();hA=class hA extends n${async readFromStream(Z,z){if(Z.length===0)return 0;let J=await this.reader.read(new Uint8Array(Z.length),{min:z?void 0:Z.length});if(J.done)this.endOfStream=J.done;if(J.value)return Z.set(J.value),J.value.length;return 0}}});var HF;var o$=W6(()=>{KF();vA();HF=class HF extends yU{constructor(Z){super();this.reader=Z,this.buffer=null}writeChunk(Z,z){let J=Math.min(z.length,Z.length);if(Z.set(z.subarray(0,J)),J<z.length)this.buffer=z.subarray(J);else this.buffer=null;return J}async readFromStream(Z,z){if(Z.length===0)return 0;let J=0;if(this.buffer)J+=this.writeChunk(Z,this.buffer);while(J<Z.length&&!this.endOfStream){let U=await this.reader.read();if(U.done){this.endOfStream=!0;break}if(U.value)J+=this.writeChunk(Z.subarray(J),U.value)}if(!z&&J===0&&this.endOfStream)throw new J4;return J}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}});function r$(Z){try{let z=Z.getReader({mode:"byob"});if(z instanceof ReadableStreamDefaultReader)return new HF(z);return new hA(z)}catch(z){if(z instanceof TypeError)return new HF(Z.getReader());throw z}}var ru=W6(()=>{i$();o$()});var GJ=W6(()=>{KF();iu();i$();o$();ru()});class gZ{constructor(Z){if(this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=Z?.onClose,Z?.abortSignal)Z.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(Z,z=this.position){let J=new Uint8Array(Z.len);if(await this.readBuffer(J,{position:z})<Z.len)throw new J4;return Z.get(J,0)}async peekToken(Z,z=this.position){let J=new Uint8Array(Z.len);if(await this.peekBuffer(J,{position:z})<Z.len)throw new J4;return Z.get(J,0)}async readNumber(Z){if(await this.readBuffer(this.numBuffer,{length:Z.len})<Z.len)throw new J4;return Z.get(this.numBuffer,0)}async peekNumber(Z){if(await this.peekBuffer(this.numBuffer,{length:Z.len})<Z.len)throw new J4;return Z.get(this.numBuffer,0)}async ignore(Z){if(this.fileInfo.size!==void 0){let z=this.fileInfo.size-this.position;if(Z>z)return this.position+=z,z}return this.position+=Z,Z}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(Z,z){if(!this.supportsRandomAccess()&&z&&z.position!==void 0&&z.position<this.position)throw Error("`options.position` must be equal or greater than `tokenizer.position`");return{...{mayBeLess:!1,offset:0,length:Z.length,position:this.position},...z}}abort(){return Promise.resolve()}}var cG=W6(()=>{GJ()});var Cg0=256000,yA;var tu=W6(()=>{cG();GJ();yA=class yA extends gZ{constructor(Z,z){super(z);this.streamReader=Z,this.fileInfo=z?.fileInfo??{}}async readBuffer(Z,z){let J=this.normalizeOptions(Z,z),U=J.position-this.position;if(U>0)return await this.ignore(U),this.readBuffer(Z,z);if(U<0)throw Error("`options.position` must be equal or greater than `tokenizer.position`");if(J.length===0)return 0;let D=await this.streamReader.read(Z.subarray(0,J.length),J.mayBeLess);if(this.position+=D,(!z||!z.mayBeLess)&&D<J.length)throw new J4;return D}async peekBuffer(Z,z){let J=this.normalizeOptions(Z,z),U=0;if(J.position){let D=J.position-this.position;if(D>0){let N=new Uint8Array(J.length+D);return U=await this.peekBuffer(N,{mayBeLess:J.mayBeLess}),Z.set(N.subarray(D)),U-D}if(D<0)throw Error("Cannot peek from a negative offset in a stream")}if(J.length>0){try{U=await this.streamReader.peek(Z.subarray(0,J.length),J.mayBeLess)}catch(D){if(z?.mayBeLess&&D instanceof J4)return 0;throw D}if(!J.mayBeLess&&U<J.length)throw new J4}return U}async ignore(Z){let z=Math.min(Cg0,Z),J=new Uint8Array(z),U=0;while(U<Z){let D=Z-U,N=await this.readBuffer(J,{length:Math.min(z,D)});if(N<0)return N;U+=N}return U}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}});var t$;var au=W6(()=>{GJ();cG();t$=class t$ extends gZ{constructor(Z,z){super(z);this.uint8Array=Z,this.fileInfo={...z?.fileInfo??{},...{size:Z.length}}}async readBuffer(Z,z){if(z?.position)this.position=z.position;let J=await this.peekBuffer(Z,z);return this.position+=J,J}async peekBuffer(Z,z){let J=this.normalizeOptions(Z,z),U=Math.min(this.uint8Array.length-J.position,J.length);if(!J.mayBeLess&&U<J.length)throw new J4;return Z.set(this.uint8Array.subarray(J.position,J.position+U)),U}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(Z){this.position=Z}}});var a$;var su=W6(()=>{GJ();cG();a$=class a$ extends gZ{constructor(Z,z){super(z);this.blob=Z,this.fileInfo={...z?.fileInfo??{},...{size:Z.size,mimeType:Z.type}}}async readBuffer(Z,z){if(z?.position)this.position=z.position;let J=await this.peekBuffer(Z,z);return this.position+=J,J}async peekBuffer(Z,z){let J=this.normalizeOptions(Z,z),U=Math.min(this.blob.size-J.position,J.length);if(!J.mayBeLess&&U<J.length)throw new J4;let D=await this.blob.slice(J.position,J.position+U).arrayBuffer();return Z.set(new Uint8Array(D)),U}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(Z){this.position=Z}}});function eu(Z,z){let J=new fA(Z),U=z??{},D=U.onClose;return U.onClose=async()=>{if(await J.close(),D)return D()},new yA(J,U)}function gA(Z,z){let J=r$(Z),U=z??{},D=U.onClose;return U.onClose=async()=>{if(await J.close(),D)return D()},new yA(J,U)}function Zd(Z,z){return new t$(Z,z)}function zd(Z,z){return new a$(Z,z)}var uA=W6(()=>{GJ();tu();au();su();GJ();cG()});import{open as Qg0}from"fs/promises";var wF;var s$=W6(()=>{cG();GJ();wF=class wF extends gZ{static async fromFile(Z){let z=await Qg0(Z,"r"),J=await z.stat();return new wF(z,{fileInfo:{path:Z,size:J.size}})}constructor(Z,z){super(z);this.fileHandle=Z,this.fileInfo=z.fileInfo}async readBuffer(Z,z){let J=this.normalizeOptions(Z,z);if(this.position=J.position,J.length===0)return 0;let U=await this.fileHandle.read(Z,0,J.length,J.position);if(this.position+=U.bytesRead,U.bytesRead<J.length&&(!z||!z.mayBeLess))throw new J4;return U.bytesRead}async peekBuffer(Z,z){let J=this.normalizeOptions(Z,z),U=await this.fileHandle.read(Z,0,J.length,J.position);if(!J.mayBeLess&&U.bytesRead<J.length)throw new J4;return U.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(Z){this.position=Z}supportsRandomAccess(){return!0}}});import{stat as _g0}from"fs/promises";async function Jd(Z,z){let J=eu(Z,z);if(Z.path){let U=await _g0(Z.path);J.fileInfo.path=Z.path,J.fileInfo.size=U.size}return J}var Ud;var Dd=W6(()=>{uA();s$();s$();uA();Ud=wF.fromFile});var Gd=W6(()=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */});function xg0(){if(typeof globalThis.TextDecoder>"u")return;return dA!==null&&dA!==void 0?dA:dA=new globalThis.TextDecoder("utf-8")}function Nd(Z,z="utf-8"){switch(z.toLowerCase()){case"utf-8":case"utf8":{let J=xg0();return J?J.decode(Z):bg0(Z)}case"utf-16le":return vg0(Z);case"us-ascii":case"ascii":return fg0(Z);case"latin1":case"iso-8859-1":return hg0(Z);case"windows-1252":return yg0(Z);default:throw RangeError(`Encoding '${z}' not supported`)}}function bg0(Z){let z=[],J="",U=0;while(U<Z.length){let D=Z[U++];if(D<128)J+=String.fromCharCode(D);else if(D<224){let N=Z[U++]&63;J+=String.fromCharCode((D&31)<<6|N)}else if(D<240){let N=Z[U++]&63,G=Z[U++]&63;J+=String.fromCharCode((D&15)<<12|N<<6|G)}else{let N=Z[U++]&63,G=Z[U++]&63,W=Z[U++]&63,q=(D&7)<<18|N<<12|G<<6|W;q-=65536,J+=String.fromCharCode(55296+(q>>10&1023),56320+(q&1023))}if(J.length>=gU)z.push(J),J=""}if(J)z.push(J);return z.join("")}function vg0(Z){let z=Z.length&-2;if(z===0)return"";let J=[],U=gU;for(let D=0;D<z;){let N=Math.min(U,z-D>>1),G=Array(N);for(let W=0;W<N;W++,D+=2)G[W]=Z[D]|Z[D+1]<<8;J.push(String.fromCharCode.apply(null,G))}return J.join("")}function fg0(Z){let z=[];for(let J=0;J<Z.length;J+=gU){let U=Math.min(Z.length,J+gU),D=Array(U-J);for(let N=J,G=0;N<U;N++,G++)D[G]=Z[N]&127;z.push(String.fromCharCode.apply(null,D))}return z.join("")}function hg0(Z){let z=[];for(let J=0;J<Z.length;J+=gU){let U=Math.min(Z.length,J+gU),D=Array(U-J);for(let N=J,G=0;N<U;N++,G++)D[G]=Z[N];z.push(String.fromCharCode.apply(null,D))}return z.join("")}function yg0(Z){let z=[],J="";for(let U=0;U<Z.length;U++){let D=Z[U],N=D>=128&&D<=159?Wd[D]:void 0;if(J+=N!==null&&N!==void 0?N:String.fromCharCode(D),J.length>=gU)z.push(J),J=""}if(J)z.push(J);return z.join("")}var Wd,Xg0,dA,gU=32768;var qd=W6(()=>{Wd={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Xg0={};for(let[Z,z]of Object.entries(Wd))Xg0[z]=Number.parseInt(Z,10)});function q1(Z){return new DataView(Z.buffer,Z.byteOffset)}class c1{constructor(Z,z){this.len=Z,this.encoding=z}get(Z,z=0){let J=Z.subarray(z,z+this.len);return Nd(J,this.encoding)}}var Fd,p4,uU,K8,e$,Od,Kd;var AF=W6(()=>{Gd();qd();Fd={len:1,get(Z,z){return q1(Z).getUint8(z)},put(Z,z,J){return q1(Z).setUint8(z,J),z+1}},p4={len:2,get(Z,z){return q1(Z).getUint16(z,!0)},put(Z,z,J){return q1(Z).setUint16(z,J,!0),z+2}},uU={len:2,get(Z,z){return q1(Z).getUint16(z)},put(Z,z,J){return q1(Z).setUint16(z,J),z+2}},K8={len:4,get(Z,z){return q1(Z).getUint32(z,!0)},put(Z,z,J){return q1(Z).setUint32(z,J,!0),z+4}},e$={len:4,get(Z,z){return q1(Z).getUint32(z)},put(Z,z,J){return q1(Z).setUint32(z,J),z+4}},Od={len:4,get(Z,z){return q1(Z).getInt32(z)},put(Z,z,J){return q1(Z).setInt32(z,J),z+4}},Kd={len:8,get(Z,z){return q1(Z).getBigUint64(z,!0)},put(Z,z,J){return q1(Z).setBigUint64(z,J,!0),z+8}}});var wd=R((BZ4,Hd)=>{var lG=1000,pG=lG*60,nG=pG*60,dU=nG*24,ug0=dU*7,dg0=dU*365.25;Hd.exports=function(Z,z){z=z||{};var J=typeof Z;if(J==="string"&&Z.length>0)return mg0(Z);else if(J==="number"&&isFinite(Z))return z.long?lg0(Z):cg0(Z);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(Z))};function mg0(Z){if(Z=String(Z),Z.length>100)return;var z=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(Z);if(!z)return;var J=parseFloat(z[1]),U=(z[2]||"ms").toLowerCase();switch(U){case"years":case"year":case"yrs":case"yr":case"y":return J*dg0;case"weeks":case"week":case"w":return J*ug0;case"days":case"day":case"d":return J*dU;case"hours":case"hour":case"hrs":case"hr":case"h":return J*nG;case"minutes":case"minute":case"mins":case"min":case"m":return J*pG;case"seconds":case"second":case"secs":case"sec":case"s":return J*lG;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function cg0(Z){var z=Math.abs(Z);if(z>=dU)return Math.round(Z/dU)+"d";if(z>=nG)return Math.round(Z/nG)+"h";if(z>=pG)return Math.round(Z/pG)+"m";if(z>=lG)return Math.round(Z/lG)+"s";return Z+"ms"}function lg0(Z){var z=Math.abs(Z);if(z>=dU)return mA(Z,z,dU,"day");if(z>=nG)return mA(Z,z,nG,"hour");if(z>=pG)return mA(Z,z,pG,"minute");if(z>=lG)return mA(Z,z,lG,"second");return Z+" ms"}function mA(Z,z,J,U){var D=z>=J*1.5;return Math.round(Z/J)+" "+U+(D?"s":"")}});var ZP=R((VZ4,Ad)=>{function pg0(Z){J.debug=J,J.default=J,J.coerce=q,J.disable=G,J.enable=D,J.enabled=W,J.humanize=wd(),J.destroy=F,Object.keys(Z).forEach((O)=>{J[O]=Z[O]}),J.names=[],J.skips=[],J.formatters={};function z(O){let K=0;for(let H=0;H<O.length;H++)K=(K<<5)-K+O.charCodeAt(H),K|=0;return J.colors[Math.abs(K)%J.colors.length]}J.selectColor=z;function J(O){let K,H=null,w,Y;function V(...$){if(!V.enabled)return;let A=V,M=Number(new Date),I=M-(K||M);if(A.diff=I,A.prev=K,A.curr=M,K=M,$[0]=J.coerce($[0]),typeof $[0]!=="string")$.unshift("%O");let B=0;$[0]=$[0].replace(/%([a-zA-Z%])/g,(P,E)=>{if(P==="%%")return"%";B++;let _=J.formatters[E];if(typeof _==="function"){let X=$[B];P=_.call(A,X),$.splice(B,1),B--}return P}),J.formatArgs.call(A,$),(A.log||J.log).apply(A,$)}if(V.namespace=O,V.useColors=J.useColors(),V.color=J.selectColor(O),V.extend=U,V.destroy=J.destroy,Object.defineProperty(V,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(H!==null)return H;if(w!==J.namespaces)w=J.namespaces,Y=J.enabled(O);return Y},set:($)=>{H=$}}),typeof J.init==="function")J.init(V);return V}function U(O,K){let H=J(this.namespace+(typeof K>"u"?":":K)+O);return H.log=this.log,H}function D(O){J.save(O),J.namespaces=O,J.names=[],J.skips=[];let K=(typeof O==="string"?O:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let H of K)if(H[0]==="-")J.skips.push(H.slice(1));else J.names.push(H)}function N(O,K){let H=0,w=0,Y=-1,V=0;while(H<O.length)if(w<K.length&&(K[w]===O[H]||K[w]==="*"))if(K[w]==="*")Y=w,V=H,w++;else H++,w++;else if(Y!==-1)w=Y+1,V++,H=V;else return!1;while(w<K.length&&K[w]==="*")w++;return w===K.length}function G(){let O=[...J.names,...J.skips.map((K)=>"-"+K)].join(",");return J.enable(""),O}function W(O){for(let K of J.skips)if(N(O,K))return!1;for(let K of J.names)if(N(O,K))return!0;return!1}function q(O){if(O instanceof Error)return O.stack||O.message;return O}function F(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return J.enable(J.load()),J}Ad.exports=pg0});var Bd=R((Yd,cA)=>{Yd.formatArgs=ig0;Yd.save=og0;Yd.load=rg0;Yd.useColors=ng0;Yd.storage=tg0();Yd.destroy=(()=>{let Z=!1;return()=>{if(!Z)Z=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();Yd.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ng0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let Z;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(Z=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(Z[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ig0(Z){if(Z[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+Z[0]+(this.useColors?"%c ":" ")+"+"+cA.exports.humanize(this.diff),!this.useColors)return;let z="color: "+this.color;Z.splice(1,0,z,"color: inherit");let J=0,U=0;Z[0].replace(/%[a-zA-Z%]/g,(D)=>{if(D==="%%")return;if(J++,D==="%c")U=J}),Z.splice(U,0,z)}Yd.log=console.debug||console.log||(()=>{});function og0(Z){try{if(Z)Yd.storage.setItem("debug",Z);else Yd.storage.removeItem("debug")}catch(z){}}function rg0(){let Z;try{Z=Yd.storage.getItem("debug")||Yd.storage.getItem("DEBUG")}catch(z){}if(!Z&&typeof process<"u"&&"env"in process)Z=process.env.DEBUG;return Z}function tg0(){try{return localStorage}catch(Z){}}cA.exports=ZP()(Yd);var{formatters:ag0}=cA.exports;ag0.j=function(Z){try{return JSON.stringify(Z)}catch(z){return"[UnexpectedJSONParseError]: "+z.message}}});var $d=R((Md,pA)=>{var Gu0=O0("tty"),lA=O0("util");Md.init=Hu0;Md.log=Fu0;Md.formatArgs=Nu0;Md.save=Ou0;Md.load=Ku0;Md.useColors=Wu0;Md.destroy=lA.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Md.colors=[6,2,3,4,5,1];try{let Z=(()=>{throw new Error("Cannot require module "+"supports-color");})();if(Z&&(Z.stderr||Z).level>=2)Md.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(Z){}Md.inspectOpts=Object.keys(process.env).filter((Z)=>{return/^debug_/i.test(Z)}).reduce((Z,z)=>{let J=z.substring(6).toLowerCase().replace(/_([a-z])/g,(D,N)=>{return N.toUpperCase()}),U=process.env[z];if(/^(yes|on|true|enabled)$/i.test(U))U=!0;else if(/^(no|off|false|disabled)$/i.test(U))U=!1;else if(U==="null")U=null;else U=Number(U);return Z[J]=U,Z},{});function Wu0(){return"colors"in Md.inspectOpts?Boolean(Md.inspectOpts.colors):Gu0.isatty(process.stderr.fd)}function Nu0(Z){let{namespace:z,useColors:J}=this;if(J){let U=this.color,D="\x1B[3"+(U<8?U:"8;5;"+U),N=` ${D};1m${z} \x1B[0m`;Z[0]=N+Z[0].split(`
4
4
  `).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hkcc",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Claude proxy server with Agent SDK and OAuth modes",
5
5
  "author": "hk",
6
6
  "license": "MIT",