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>
84 lines
1.9 KiB
Plaintext
84 lines
1.9 KiB
Plaintext
|
|
FLOW: toNumber
|
|
input: x, options
|
|
IF not string
|
|
END x
|
|
ELSE_IF should skip
|
|
END x
|
|
ELSE_IF 0
|
|
END 0
|
|
ELSE_IF hex is supported AND x is hex
|
|
END int of x of base 16
|
|
ELSE_IF possible e notation
|
|
FOLLOW: resolve enotation (x, trimmed x, options)
|
|
ELSE
|
|
IF match numeric pattern
|
|
separate sign, leading zeros, pure number
|
|
IF x doesn't starts with "[+-]0."
|
|
END number(x)
|
|
IF leading zeros are not allowed
|
|
IF leading zeros > 1
|
|
#00.1
|
|
END x
|
|
ELSE_IF leading zeros == 1 AND decimal is not adjacent to leading zeros
|
|
#06.5
|
|
#but not 0.65, .65, 6.0
|
|
END x
|
|
ELSE_IF str has only zeros
|
|
END 0
|
|
ELSE
|
|
parse x to number
|
|
IF parsed x == 0 or -0
|
|
END parsed x
|
|
ELSE_IF parsed x is eNotation
|
|
IF conversion to enotation is allowed
|
|
END parsed x
|
|
ELSE
|
|
END x
|
|
ELSE_IF floating number
|
|
IF parsed x is 0
|
|
END parsed x
|
|
ELSE_IF parsed x == number without leading 0s
|
|
#0.456. 0.79000
|
|
END parsed x
|
|
ELSE_IF parsed x is negative AND == parsed x == number without leading 0s
|
|
END parsed x
|
|
ELSE
|
|
END x
|
|
ELSE_IF leading 0s are present
|
|
IF parsed x == x without leading 0s
|
|
END parsed x
|
|
ELSE
|
|
END x
|
|
ELSE
|
|
IF parsed x == x (consider sign)
|
|
END parsed x
|
|
ELSE
|
|
END x
|
|
|
|
ELSE
|
|
END x
|
|
|
|
|
|
|
|
FLOW: resolve enotation
|
|
input: x, trimmed x, options
|
|
IF eNotation has not to be evaluated
|
|
END x
|
|
IF match eNotation pattern
|
|
extract sign, eChar, leading zeros
|
|
find if eChar adjacent to leading zeros
|
|
|
|
IF leading zeros > 1 AND eChar adjacent to leading zeros
|
|
# 00e, -00e
|
|
END x
|
|
ELSE_IF exp is `0e`, `0.e`, `-0.e`, `-0e`
|
|
END number(x);
|
|
ELSE_IF leading zeros are allowed but eChar is not adjacent to leading zeros
|
|
# -003e2
|
|
remove leading zeros
|
|
END number(x)
|
|
ELSE
|
|
END x
|
|
ELSE
|
|
END x |