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>
69 lines
1.6 KiB
Markdown
69 lines
1.6 KiB
Markdown
# mute-stream
|
|
|
|
Bytes go in, but they don't come out (when muted).
|
|
|
|
This is a basic pass-through stream, but when muted, the bytes are
|
|
silently dropped, rather than being passed through.
|
|
|
|
## Usage
|
|
|
|
```javascript
|
|
const MuteStream = require('mute-stream')
|
|
|
|
const ms = new MuteStream(options)
|
|
|
|
ms.pipe(process.stdout)
|
|
ms.write('foo') // writes 'foo' to stdout
|
|
ms.mute()
|
|
ms.write('bar') // does not write 'bar'
|
|
ms.unmute()
|
|
ms.write('baz') // writes 'baz' to stdout
|
|
|
|
// can also be used to mute incoming data
|
|
const ms = new MuteStream()
|
|
input.pipe(ms)
|
|
|
|
ms.on('data', function (c) {
|
|
console.log('data: ' + c)
|
|
})
|
|
|
|
input.emit('data', 'foo') // logs 'foo'
|
|
ms.mute()
|
|
input.emit('data', 'bar') // does not log 'bar'
|
|
ms.unmute()
|
|
input.emit('data', 'baz') // logs 'baz'
|
|
```
|
|
|
|
## Options
|
|
|
|
All options are optional.
|
|
|
|
* `replace` Set to a string to replace each character with the
|
|
specified string when muted. (So you can show `****` instead of the
|
|
password, for example.)
|
|
|
|
* `prompt` If you are using a replacement char, and also using a
|
|
prompt with a readline stream (as for a `Password: *****` input),
|
|
then specify what the prompt is so that backspace will work
|
|
properly. Otherwise, pressing backspace will overwrite the prompt
|
|
with the replacement character, which is weird.
|
|
|
|
## ms.mute()
|
|
|
|
Set `muted` to `true`. Turns `.write()` into a no-op.
|
|
|
|
## ms.unmute()
|
|
|
|
Set `muted` to `false`
|
|
|
|
## ms.isTTY
|
|
|
|
True if the pipe destination is a TTY, or if the incoming pipe source is
|
|
a TTY.
|
|
|
|
## Other stream methods...
|
|
|
|
The other standard readable and writable stream methods are all
|
|
available. The MuteStream object acts as a facade to its pipe source
|
|
and destination.
|