tftsr-devops_investigation/node_modules/@zip.js/zip.js/index-native.min.js

2 lines
167 KiB
JavaScript
Raw Normal View History

feat: initial implementation of TFTSR IT Triage & RCA application Implements Phases 1-8 of the TFTSR implementation plan. Rust backend (Tauri 2.x, src-tauri/): - Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama - PII detection engine: 11 regex patterns with overlap resolution - SQLCipher AES-256 encrypted database with 10 versioned migrations - 28 Tauri IPC commands for triage, analysis, document, and system ops - Ollama: hardware probe, model recommendations, pull/delete with events - RCA and blameless post-mortem Markdown document generators - PDF export via printpdf - Audit log: SHA-256 hash of every external data send - Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2) Frontend (React 18 + TypeScript + Vite, src/): - 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings - 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives - 3 Zustand stores: session, settings (persisted), history - Type-safe tauriCommands.ts matching Rust backend types exactly - 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs) DevOps: - .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push - .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload Verified: - cargo check: zero errors - tsc --noEmit: zero errors - vitest run: 13/13 unit tests passing Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
const e=4294967295,t=65535,A=255,r=67324752,a=134695760,n=a,i=33639248,s=101010256,o=101075792,g=117853008,c=22,l=21589,d=2048,m=16384,u=2048,B=1024,p=512,f="/",h=30,w=new Date(2107,11,31),I=new Date(1980,0,1),E=void 0,C=1/0,x="undefined",y="function";let b=2;try{typeof navigator!=x&&navigator.hardwareConcurrency&&(b=navigator.hardwareConcurrency)}catch{}const F={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:b,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=x&&CompressionStream,DecompressionStream:typeof DecompressionStream!=x&&DecompressionStream},Q=Object.assign({},F);function v(){return Q}function D(e){return Math.max(e.chunkSize,64)}function Y(e){const{baseURI:t,chunkSize:A,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:n,useWebWorkers:i,CompressionStream:s,DecompressionStream:o,CompressionStreamZlib:g,DecompressionStreamZlib:c,workerURI:l,wasmURI:d}=e;S("baseURI",t),S("wasmURI",d),S("workerURI",l),S("chunkSize",A),S("maxWorkers",r),S("terminateWorkerTimeout",a),S("useCompressionStream",n),S("useWebWorkers",i),S("CompressionStream",s),S("DecompressionStream",o),S("CompressionStreamZlib",g),S("DecompressionStreamZlib",c)}function S(e,t){t!==E&&(Q[e]=t)}const k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;M[e]=t}class U{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let A=0,r=0|e.length;r>A;A++)t=t>>>8^M[255&(t^e[A])];this.crc=t}get(){return~this.crc}}class O extends TransformStream{constructor(){let e;const t=new U;super({transform(e,A){t.append(e),A.enqueue(e)},flush(){const A=new Uint8Array(4);new DataView(A.buffer).setUint32(0,t.get()),e.value=A}}),e=this}}function z(e){if(typeof TextEncoder==x){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let A=0;A<t.length;A++)t[A]=e.charCodeAt(A);return t}return(new TextEncoder).encode(e)}const W={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const A=e[e.length-1],r=W.getPartial(A);return 32===r?e.concat(t):W._shiftRight(t,r,0|A,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const A=e[t-1];return 32*(t-1)+W.getPartial(A)},clamp(e,t){if(32*e.length<t)return e;const A=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,A>0&&t&&(e[A-1]=W.partial(t,e[A-1]&2147483648>>t-1,1)),e},partial:(e,t,A)=>32===e?t:(A?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,A,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(A),A=0;if(0===t)return r.concat(e);for(let a=0;a<e.length;a++)r.push(A|e[a]>>>t),A=e[a]<<32-t;const a=e.length?e[e.length-1]:0,n=W.getPartial(a);return r.push(W.partial(t+n&31,t+n>32?A:r.pop(),1)),r}},G={bytes:{fromBits(e){const t=W.bitLength(e)/8,A=new Uint8Array(t);let r;for(let a=0;t>a;a++)3&a||(r=e[a/4]),A[a]=r>>>24,r<<=8;return A},toBits(e){const t=[];let A,r=0;for(A=0;A<e.length;A++)r=r<<8|e[A],3&~A||(t.push(r),r=0);return 3&A&&t.push(W.partial(8*(3&A),r)),t}}},T=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=G.utf8String.toBits(e));const A=t._buffer=W.concat(t._buffer,e),r=t._length,a=t._length=r+W.bitLength(e);if(a>9007199254740991)throw Error("Cannot hash more than 2^53 - 1 bits");const n=new Uint32Array(A);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(n.subarray(16*i,16*(i+1))),i+=1;return A.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const A=e._h;t=W.concat(t,[W.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(