@alete-ai/gate-ingest 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.
Files changed (2) hide show
  1. package/README.md +78 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @alete/gate-ingest 🛡️
2
+
3
+ Unified ingestion and token-mapping pipeline for the Alete PrivacyGatekeeper.
4
+
5
+ **@alete/gate-ingest** is the core TypeScript/JavaScript substrate of the Alete Gate system. It provides high-fidelity HTML purification, structural tokenization, and PII-shielded semantic Markdown extraction.
6
+
7
+ ## 🚀 Key Features
8
+
9
+ - **Structural Substrate Extraction**: Purifies HTML into high-signal structural tokens for edge classification.
10
+ - **Narrative-First Redaction**: Shields "Toxic IDs" (SSNs, Credit Cards, Emails) while preserving the narrative flow of articles.
11
+ - **Semantic Metadata extraction**: Extracts titles and descriptions even from fragmented or non-standard HTML.
12
+ - **Universal Compatibility**: Optimized for Browser Extensions (Safari/Chrome), Node.js, and Mobile WebViews.
13
+ - **Zero-Config Loading**: Resilient asset resolution across all platforms.
14
+
15
+ ## 📦 Installation
16
+
17
+ ```bash
18
+ pnpm add @alete/gate-ingest
19
+ # or
20
+ npm install @alete/gate-ingest
21
+ ```
22
+
23
+ ## ⚡ Usage
24
+
25
+ ```typescript
26
+ import { processHtml } from '@alete/gate-ingest';
27
+
28
+ /**
29
+ * Capture, Purify, and Shield
30
+ * This ensures that no sensitive banking or health data
31
+ * leaves the device by redacting PII locally.
32
+ */
33
+ async function shieldCurrentPage() {
34
+ const html = document.documentElement.outerHTML;
35
+
36
+ const {
37
+ structural,
38
+ semantic,
39
+ hasSensitiveInfo
40
+ } = await processHtml(html, {
41
+ redact: true
42
+ });
43
+
44
+ if (hasSensitiveInfo) {
45
+ console.warn("🛡️ Threshold Triggered: PII detected and shielded.");
46
+ }
47
+
48
+ return semantic; // Safe Markdown for further processing
49
+ }
50
+ ```
51
+
52
+ ### Advanced Options
53
+
54
+ ```typescript
55
+ const result = await processHtml(html, {
56
+ redact: true, // Enable PII shielding
57
+ preserveImages: false, // Strip image markers for pure text signal
58
+ truncate: 2000 // Limit structural tokens for classification latency
59
+ });
60
+ ```
61
+
62
+ ## 📊 Performance Telemetry
63
+
64
+ When paired with the **PrivacyGatekeeper** native classifier, the ingestion substrate demonstrates the following metrics:
65
+
66
+ | Metric | Result | Note |
67
+ | :--- | :--- | :--- |
68
+ | **Total Accuracy** | **97.60%** | Combined ingestion + classification score |
69
+ | **Avg. Latency** | **0.48 ms** | Benchmark on Apple Silicon substrate |
70
+ | **Survival Recall** | **100.00%** | Zero leaks of sensitive portals to digestible articles |
71
+ | **Article Recall** | **100.00%** | Perfect fidelity for content extraction |
72
+
73
+ ## 🛡️ Privacy & Strategy
74
+
75
+ Alete Gate prioritizes **Cognitive Sovereignty**. By performing ingestion and PII detection locally, we ensure that the user's "Informational Diet" remains private and that sensitive transactional data never enters the analysis pipeline.
76
+
77
+ ## 📄 License
78
+ AGPL-3.0 - Copyright (c) 2026 [Alete Inc.](https://alete.ai/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alete-ai/gate-ingest",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Unified ingestion and token-mapping pipeline for the Alete PrivacyGatekeeper.",
5
5
  "keywords": [
6
6
  "edge",