webweavex 3.0.0
webweavex: ^3.0.0 copied to clipboard
Deterministic web extraction, runtime replay, browser reconstruction, and cross-language Kaalka parity for AI agents and applications.
Production-grade deterministic runtime cognition infrastructure
for humans and AI agents
Operational runtime substrate · pub.dev · replay-safe · Kaalka v5 parity
Contents #
- What is WebWeaveX?
- Universal Runtime Extraction
- Web Extraction Without Fragility
- Humans and AI agents
- Why AI Agents Need WebWeaveX
- Why deterministic runtime infrastructure matters
- What WebWeaveX is NOT
- Why existing systems fail
- How WebWeaveX Differs
- Runtime Cognition Infrastructure
- Core capabilities
- Authenticated runtime continuation
- Runtime lifecycle
- Cross-language determinism
- Architecture
- Canonical pipeline
- Quick start
- Common workflows
- Supported platforms
- Versioning
- Determinism
- Performance
- Comparison
- FAQ
- Roadmap
- Contributing
- Security
- License
What is WebWeaveX? #
WebWeaveX is to runtime state what Git is to source code: deterministic, replayable, reconstructable, and auditable.
Modern operational systems generate runtime state that is typically lost, difficult to reproduce, and impossible to validate. WebWeaveX transforms that runtime state into deterministic artifacts that humans and AI agents can continue, reconstruct, replay, and verify.
WebWeaveX is deterministic runtime cognition infrastructure for humans and AI agents operating on authenticated software. It captures how systems actually run -- browser DOM, sessions, Electron, native UI, workflows, connectors -- and compiles replay-safe runtime graphs with Kaalka-encrypted persistence (webweavex-formula+kaalka@5.0.0).
This is not a scraping library or LLM wrapper. It is an operational runtime substrate for extraction, memory, execution, reconstruction, and replay equivalence.
Ecosystem portal: main · Python sibling: python
Why it exists #
Modern systems are authenticated, stateful, runtime-driven, SPA-based, Electron-based, synchronized, and operationally dynamic. Operators need continuity across runs, not another HTML snapshot.
Traditional extraction fails because it is:
| Failure mode | Consequence |
|---|---|
| HTML-only parsing | Misses hydration, storage, IPC, native UI |
| Stateless requests | Loses session and workflow continuity |
| No authenticated persistence | Re-login and drift between runs |
| No replay contract | Cannot prove equivalence after rebuild |
| No reconstruction | Cannot rebuild operational topology from IR |
| Weak SPA/Electron support | Unstable IDs, routes, and storage break diffs |
WebWeaveX exists to deliver deterministic runtime extraction and replay-safe operational reconstruction through one canonical pipeline.
Universal Runtime Extraction #
WebWeaveX is not merely a scraping library -- it is a runtime extraction and cognition substrate. It transforms heterogeneous operational sources into deterministic runtime representations through one canonical pipeline.
| Source | Runtime Representation |
|---|---|
| Websites | Runtime graph |
| SPAs | Stabilized runtime state |
| Browser sessions | Replay-safe artifacts |
| APIs | Operational topology |
| Documents | Unified IR |
| Repositories | Dependency intelligence |
| Runtime systems | Memory fabric |
Every source converges on the same bounded, hashable, replayable runtime IR.
Web Extraction Without Fragility #
Most extraction systems focus on collecting content. WebWeaveX focuses on preserving runtime state. Traditional scraping breaks when authentication expires, SPA frameworks re-render, runtime identifiers change, workflows span sessions, or replay must be validated later.
| Extraction Challenge | Traditional Approach | WebWeaveX |
|---|---|---|
| SPA instability | Re-scrape repeatedly | Runtime stabilization |
| Authenticated workflows | Start over | Runtime continuation |
| Session portability | Manual export | Encrypted runtime persistence |
| Validation | Manual inspection | Replay equivalence |
| Recovery | Re-run workflow | Runtime reconstruction |
The result is extraction that can be continued, replayed, reconstructed, and verified.
Humans and AI agents #
WebWeaveX is designed for both humans and AI agents.
| Audience | Use |
|---|---|
| Engineers | Inspect authenticated systems, preserve workflows, audit runtime behavior |
| AI agents | Maintain continuity, deterministic state, replay-safe memory, environment reconstruction |
Same APIs, same determinism contract, same honesty about authorization.
Why AI Agents Need WebWeaveX #
Browser and operational agents interact with systems that change continuously. Without deterministic runtime infrastructure, agents lose context between actions.
| Agent Failure Mode | Operational Impact | WebWeaveX Capability |
|---|---|---|
| Lost browser state | Re-authentication | Runtime continuation |
| Lost workflow context | Restart execution | Runtime memory fabric |
| DOM instability | Broken selectors | DOM stabilization |
| Replay drift | Non-repeatable behavior | Replay equivalence |
| Session expiration | Lost progress | Encrypted persistence |
| Workflow interruption | Incomplete execution | Runtime reconstruction |
WebWeaveX provides a deterministic runtime layer beneath agents so operational state becomes persistent, replayable, and auditable.
Why deterministic runtime infrastructure matters #
| Problem | Without substrate | With WebWeaveX |
|---|---|---|
| LLMs lose state | Re-plan from scratch each turn | Stable runtime memory + graph identity |
| Browser agents lose auth | Re-login drift | Authorized session continuation (Kaalka) |
| Workflows go nondeterministic | Unauditable actions | Replay equivalence + fingerprints |
| Operational systems are opaque | HTML-only views | Runtime cognition IR + reconstruction |
| Cross-run reasoning breaks | Ephemeral DOM | Stabilized hashes + parity-validated crypto |
WebWeaveX provides the deterministic operational runtime layer agents and teams share -- not autonomous superintelligence.
What WebWeaveX is NOT #
| Category | Clarification |
|---|---|
| Auth bypass tooling | Does not defeat MFA, CAPTCHA, or login controls |
| Malware or exploit infrastructure | Not designed for unauthorized access |
| Credential theft tooling | Does not harvest secrets you do not already hold |
| CAPTCHA bypass software | No circumvention of bot defenses |
| Browser exploitation tooling | Not a vulnerability framework |
| AGI or "autonomous hacking" | No probabilistic agent that "figures out" sites |
| Hacking infrastructure | No unauthorized intrusion features |
| An LLM wrapper | Core path is deterministic; optional plugins fail safe |
| A chatbot | Infrastructure library, not conversational AI |
WebWeaveX only operates on authorized authenticated runtimes and data you explicitly provide.
Why existing systems fail #
| System | Strength | Limitation for operational runtime |
|---|---|---|
| BeautifulSoup | Fast static HTML parse | No live session, storage, or runtime graph |
| Selenium | Browser automation | No unified IR, Kaalka fabric, or replay equivalence layer |
| Playwright | Reliable browser control | Automation driver -- not extraction + memory + reconstruction |
| Puppeteer | Chromium scripting | Same gap: no federated sync or deterministic checkpoints |
| Stateless crawlers | Scale on public pages | Poor on authenticated operational systems |
| Probabilistic-only agents | Flexible tasks | Weak replay, memory, and audit guarantees |
Common gaps WebWeaveX addresses:
- Lack of runtime continuity across processes
- Lack of replay and fingerprint equivalence
- Lack of authenticated persistence (encrypted, deterministic)
- Lack of reconstruction from structured IR
- Lack of synchronization between browser, semantic, workflow, and memory layers
How WebWeaveX Differs #
| Tool | Primary Focus |
|---|---|
| Playwright | Browser automation |
| Scrapy | Crawling |
| BeautifulSoup | HTML parsing |
| Firecrawl | Extraction |
| LangChain | LLM orchestration |
| CrewAI | Agent orchestration |
| WebWeaveX Dart | Deterministic runtime cognition infrastructure |
WebWeaveX does not replace these systems. It provides deterministic runtime infrastructure that can sit beneath them.
Runtime Cognition Infrastructure #
Infrastructure that captures, stabilizes, fingerprints, reconstructs, and continues operational runtime state through deterministic contracts.
| Category | Focus |
|---|---|
| Browser automation | Execute actions |
| Web scraping | Extract content |
| Agent orchestration | Coordinate reasoning |
| Runtime cognition infrastructure | Preserve operational runtime state |
WebWeaveX works alongside existing ecosystems rather than replacing them.
Core capabilities #
| Capability | Description |
|---|---|
| Runtime graph construction | Canonical node/edge ordering, deterministic fingerprinting |
| Replay equivalence | Prove two runtime states are operationally identical |
| Memory fabric | Deterministic memory store with stable fingerprints |
| Kaalka v5 crypto | Cross-language verified deterministic encryption |
| Deterministic serialization | Canonical JSON with sorted keys |
| Runtime normalization | NFKC, CRLF normalization, volatile field stripping |
| Repository analysis | Language detection, dependency extraction |
| Workflow execution | DAG scheduling with deterministic ordering |
| Runtime reconstruction | Rebuild operational topology from IR |
| Runtime synchronization | Cross-runtime state alignment |
Authenticated runtime continuation #
WebWeaveX supports:
- Encrypted session persistence via Kaalka v5
- Runtime continuation across extractions when you supply the same Kaalka key
- Deterministic replay-safe reconstruction of operational graphs from IR
Persistence uses Kaalka v5 deterministic encryption (algorithm: webweavex-formula+kaalka@5.0.0) -- not plaintext JSON checkpoints on disk.
| Stored surface | Mechanism |
|---|---|
| Cookies / headers | Encrypted session store |
| Browser snapshot | Session + identity engines |
| Workflow / sync state | Kaalka checkpoint engines |
WebWeaveX does not: bypass auth, defeat MFA, bypass security controls, or access systems without authorization.
WebWeaveX only operates on authorized authenticated runtimes explicitly provided by the user.
import 'package:webweavex/webweavex.dart';
final result = encryptValue({'session': 'data'}, 'your-kaalka-key');
print(result['encrypted']);
Runtime lifecycle #
Capture -> Normalize -> Fingerprint -> Graph -> Memory -> Replay Validation -> Reconstruction -> Continuation
Every WebWeaveX runtime moves through this bounded lifecycle: captured state is normalized and fingerprinted, compiled into a runtime graph and memory fabric, validated for replay equivalence, then reconstructed and continued.
Cross-language determinism #
WebWeaveX ships as independent implementations that conform to one shared specification. They share byte-identical deterministic contracts:
| Contract | Verified |
|---|---|
| Kaalka hashing | byte-identical Python <=> Dart <=> JavaScript |
| Global runtime fingerprint | byte-identical across SDKs |
| Runtime graph structure | structurally equal |
| Encrypted value persistence | byte-identical across SDKs |
Architecture #
Input -> Canonical Pipeline -> Graph + Memory -> Replay Check -> Reconstruction
|
Normalization + Kaalka v5
Layered source layout (lib/src/):
| Layer | Packages |
|---|---|
| crypto | KaalkaV5, hashing, time key derivation |
| determinism | Normalization, StableSerialize, CanonicalJson |
| fingerprint | SHA-256 hashing, Kaalka graph fingerprinting |
| runtime | RuntimeKernel, DeterministicClock, data model |
| extract | ExtractionPipeline, HTML/JSON/Markdown extractors |
| repository | QueryEngine, QuerySession, SearchIndex, NodeLookup |
| graph | RuntimeGraph with fingerprinting |
| memory | MemoryStore, MemoryEntry, MemoryEngine |
| replay | ReplayEngine, ReplaySnapshot, ReplayEquivalence |
| workflow | WorkflowEngine (DAG scheduling) |
| fetch | HttpTransport, Crawler |
| exceptions | 8 typed exception classes |
Canonical pipeline #
Single production execution path -- no shadow orchestrators.
import 'package:webweavex/webweavex.dart';
void main() {
final result = stableSerialize({'key': 'value'});
print(result); // '{"key":"value"}'
}
| Property | Detail |
|---|---|
| Single execution path | One canonical pipeline |
| Deterministic normalization | Sorted keys, NFKC |
| Replay-safe runtime | Fingerprint at pipeline boundary |
| Canonical IR generation | Per-kind extraction -> kernel phases |
Quick start #
Add dependency #
dependencies:
webweavex: ^3.0.0
dart pub add webweavex
First program #
import 'package:webweavex/webweavex.dart';
void main() {
// Deterministic serialization
final serialized = stableSerialize({'version': '3.0.0', 'type': 'test'});
print(serialized);
// Deterministic hashing
final hash = computeDeterministicHash({'key': 'value'});
print('Hash: $hash'); // 64-char hex
// Runtime graph
final graph = buildRuntimeGraph({
'nodes': [{'id': 'n1', 'type': 'file'}],
'edges': [{'source': 'n1', 'target': 'n1', 'type': 'self'}],
});
print('Fingerprint: ${graphFingerprint(graph)}');
}
Common workflows #
Serialize deterministic data #
final serialized = stableSerialize({'key': 'value', 'number': 42});
print(serialized); // '{"key":"value","number":42}'
Build runtime graph #
final graph = buildRuntimeGraph({
'nodes': [{'id': 'n1', 'type': 'file'}, {'id': 'n2', 'type': 'module'}],
'edges': [{'source': 'n1', 'target': 'n2', 'type': 'imports'}],
});
print(graphFingerprint(graph));
Validate replay equivalence #
final original = {'unified_runtime_graph': graph.toJson()};
final replayed = {'unified_runtime_graph': graph.toJson()};
final result = validateReplayEquivalence(original, replayed);
print(result['equivalent']); // true
Kaalka encryption #
final encrypted = encryptValue({'secret': 'data'}, 'my-key');
final decrypted = decryptValue(encrypted['encrypted'], 'my-key');
print(decrypted);
Runtime graph fingerprinting #
final graph = buildRuntimeGraph({'nodes': [{'id': 'n1'}], 'edges': []});
final fingerprint = graphFingerprint(graph);
print('Fingerprint: $fingerprint'); // 64-char hex
Memory fabric #
final graph = buildRuntimeGraph({'key': 'value'});
final fabric = buildRuntimeMemoryFabric(graph);
print(fabric['stable_hash']); // Deterministic hash
Workflow execution #
import 'package:webweavex/webweavex.dart';
final steps = [
WorkflowStep('step1', {mapOf('result': 1)}),
WorkflowStep('step2', {mapOf('result': 2)}, dependsOn: ['step1']),
];
final result = WorkflowEngine.execute(steps, emptyMap());
print(result.success);
Supported platforms #
| Aspect | Detail |
|---|---|
| Runtime | Dart SDK 3.3+ |
| Platforms | Linux, macOS, Windows, Web, Mobile |
| Install | dart pub add webweavex |
| Dependency | kaalka ^5.0.0 (crypto substrate) |
Versioning #
WebWeaveX follows Semantic Versioning -- MAJOR.MINOR.PATCH.
The version is synchronized across all SDKs: PyPI, npm, and pub.dev share the same 3.0.0, so a given version number denotes the same certified deterministic contract in every language.
Determinism #
| Mechanism | Role |
|---|---|
DeterministicClock |
No wall-clock drift |
StableSerialize |
Canonical JSON with sorted keys |
computeDeterministicHash |
SHA-256 deterministic hash |
graphFingerprint |
Kaalka-based graph identity |
validateReplayEquivalence |
Graph + fingerprint + topology checks |
Kaalka encryptValue |
Deterministic encryption |
Performance #
| Operation | Latency | Throughput |
|---|---|---|
| Serialization | <1ms | ~100K ops/s |
| Hashing | <1ms | ~80K ops/s |
| Kaalka encrypt | <1ms | ~30K ops/s |
| Graph fingerprint | <3ms | ~400 ops/s |
| Replay validation | <2ms | ~500 ops/s |
Comparison #
| Tool | Primary Focus |
|---|---|
| Playwright | Browser automation |
| Scrapy | Crawling |
| BeautifulSoup | HTML parsing |
| Firecrawl | Extraction |
| LangChain | LLM orchestration |
| WebWeaveX Dart | Deterministic runtime cognition infrastructure |
FAQ #
What is Kaalka? Kaalka is a deterministic cryptographic persistence substrate. Kaalka v5 provides byte-identical encrypted values across Python, JavaScript, Dart, Kotlin, and Java.
Why deterministic? Determinism enables audit, replay proofs, cross-run diffing, and agent continuity. Without it, operational systems cannot be trusted as engineering substrates.
Why replay? Replay proves two runtime states are operationally identical -- not just visually similar, but cryptographically equivalent.
Does this replace Playwright? No. WebWeaveX provides deterministic runtime infrastructure. Playwright provides browser automation. They serve different purposes.
Can AI agents use this? Yes. Every output is a bounded, deterministic, evidence-carrying IR that agents can hash, diff, replay, and reason over.
Roadmap #
See ROADMAP.md.
Contributing #
See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Security #
See SECURITY.md. Report issues responsibly.
License #
Apache License 2.0 -- LICENSE
WebWeaveX is deterministic runtime cognition infrastructure -- not a disposable scraper, not AGI hype, not an LLM wrapper.