STATUS: PUBLISHED ON NPMJS. This version was published to the npm registry on 2026-07-01T00:59:50Z with provenance attestation. View on npm: https://www.npmjs.com/package/@takk/glasshouse/v/1.0.0
STATUS: REVIEW REQUIRED, NOT YET ON NPMJS. This GitHub Release was created by the
release.ymlworkflow. The Creator must review the contents (tag, changelog, attached commit, pack-smoke result in the workflow logs) and then explicitly runnpm-publish.ymlto publish this version to the npm registry.
[1.0.0] - 2026-06-30T23:55:21Z
Initial stable release. Glasshouse is a universal, zero-runtime-dependency NPM library and CLI that makes a swarm of Massive Intelligence (IM) agents observable: it traces each agent's work into OpenTelemetry-compatible spans, collapses a run into a transparent, auditable agent graph, detects drift, loops, and the failing agent, masks sensitive fields before export, and seals the trace into a tamper-evident SHA-256 chain that can be Ed25519-signed. The core never reaches the network and never speaks a provider API; it is observability logic over a span model, which keeps it provider-agnostic, node-free, and testable offline. Where Sakana's Fugu is a black box that hides which model answered and what path it took, Glasshouse is the glass house: the graph, the per-step decisions, and the cost are all visible, on your own infrastructure, including the EU. This is Briefing 5 of the @Takk8IS open multi-agent ecosystem, the observability satellite.
Added
Glasshouse facade
GlasshouseandcreateGlasshouse(@takk/glasshouse/glasshouse): the facade most callers use. It wraps a tracer so youobservework into spans, and over those spans it exposesgraphandmermaidfor the agent graph,loopsfor loop detection,attributefor failure attribution,totalsfor token and cost aggregation, an optional tamper-evident audit chain (auditTrail,verifyAudit),snapshotandsealedSnapshotfor portable and signed exports,toOtlpfor OpenTelemetry export, andalertfor severity-routed alerting. A clock and a random source are injectable so traces are fully deterministic in tests.
Tracer and span model
Tracer,LiveSpan,InMemorySpanExporter, and theSpanExporterinterface (@takk/glasshouse/tracer): start a span, hold the mutableLiveSpanwhile an agent thinks, calls a model, or runs a tool, thenend()it into an immutable span. Theobserve(name, fn, options)wrapper does the start, status, error capture, and end for you. Finished spans fan out to exporters as they end.createSpan,hashSpan,verifySpanHash,buildSpanTree,rootSpans,childrenOf,findSpan, andtotalUsage(@takk/glasshouse/span): the content-addressed span model. Each finished span carries a namespace of attributes, typed events, optional token usage and cost, and a SHA-256 content hash, which makes a span tamper-evident on its own. Span kinds are agent, reasoning, llm, tool, memory, state, decision, verification, handoff, and custom.
OpenTelemetry interoperability
toOtlpSpan,toOtlpExport,fromOtlpSpan,genAiAttributes, and theGEN_AIkeys (@takk/glasshouse/otel): map a Glasshouse span to and from OTLP/JSON, with the GenAI semantic-convention attributes (gen_ai.request.model,gen_ai.system,gen_ai.usage.input_tokensandgen_ai.usage.output_tokens,gen_ai.agent.id) filled in from the span's model, provider, and usage. A trace flows into Langfuse, Arize, Datadog, or any OTLP collector, and spans those tools emit flow back into the model.
Agent graph
buildAgentGraph,findCycles,hasCycle,toMermaid, andtoDot(@takk/glasshouse/graph): collapse the spans of a trace into the swarm's agents, aggregate each agent's spans, tokens, cost, errors, and models, and draw the edges where work crossed from one agent to another. Detect cycles in that graph and render it to Mermaid, Graphviz DOT, or structured JSON.
Drift, attribution, and loops
RunningStats,ZScoreDriftDetector,EwmaDetector,PageHinkleyDetector,populationStabilityIndex, andpsiSeverity(@takk/glasshouse/drift): streaming, O(1)-per-observation drift detection over numeric streams such as latency, cost, token counts, and error rate.attributeFailure(@takk/glasshouse/attribution): when a run ends wrong, distinguish a leaf origin failure from the downstream errors that merely inherited it, rank the spans by blame, and name a likely root-cause span and culprit agent.detectLoops(@takk/glasshouse/loops): find runtime loops, a single agent redoing the same step and two agents bouncing a task back and forth, in the order spans actually ran.
Alerts
- Thirteen node-free alert channels and
AlertDispatcher(@takk/glasshouse/alerts): console, memory, callback, webhook, Slack, Discord, Telegram, Microsoft Teams, PagerDuty, Opsgenie, Datadog, Sentry, and email. The dispatcher fans an alert out to every channel that meets a minimum severity and never throws on a channel failure. Network channels speak their provider shape over the global fetch, which is injectable for tests.
Sampling and redaction
RatioSampler,AlwaysSampler,NeverSampler,RateLimitSampler,tailSample, andbernoulli(@takk/glasshouse/sampling): head sampling decides per trace, deterministically by trace id, so a sampled trace is never half-recorded; tail sampling keeps a finished trace if it errored or ran slow.redactSpan,redactSpans, anddefaultRedactionPolicy(@takk/glasshouse/redaction): mask sensitive span attributes with redact, hash, or partial before a trace leaves your infrastructure. Hashing is deterministic SHA-256, so masked values stay joinable without revealing the plaintext.
Audit and signing
AuditChain,verifyChain,hashEntry, andGENESIS_HASH(@takk/glasshouse/audit): link each span's content hash into a SHA-256 chain so any later edit, reorder, or deletion breaks the linkage and verification reports exactly where. Appends are serialized so concurrent appends keep the chain valid rather than racing on the head.generateSigningKeyPair,signSnapshot,verifyWithKey, andverifySnapshotSignature(@takk/glasshouse/signing): node-free Ed25519 signing of trace snapshots over Web Crypto, so an exported trace can be proven to come from the holder of the private key and to be unaltered in transit.
HTML viewer
renderTraceHtml(@takk/glasshouse) andGlasshouse.toHtml: render a trace as a single self-contained, offline, zero-dependency HTML document, with the agent graph drawn as inline SVG (no Mermaid runtime, no JavaScript required), the span table, the loop and failure-attribution findings, and an integrity panel carrying the audit head and any Ed25519 signature. Every dynamic value is HTML-escaped so a crafted agent id or span name cannot inject markup, and the file opens fromfile://with no server. It turns a tamper-evident span set into something a human, an auditor, or a regulator can open and read on their own infrastructure. This is the glass house made literal.
MCP, edge, and node
createTraceTools,createTraceTool,createGraphTool,createQueryTool, andcreateTraceResource(@takk/glasshouse/mcp): observability as a Model Context Protocol surface, theglasshouse_trace,glasshouse_graph, andglasshouse_querytools plus a readable resource, as plain objects that register on any MCP server without an SDK dependency.otlpHttpExporterandfetchSpanExporter(@takk/glasshouse/edge): push spans off the box over the global fetch, with no Node dependency, so they run on Cloudflare Workers, Vercel Edge, Deno, Bun, and the browser.fileSpanExporter,readTraceFile, andfileAlertChannel(@takk/glasshouse/node): persist spans and alerts to disk, the only surface that touchesnode:fs, with per-path serialized, atomic writes.
Command-line interface
glasshouseCLI withgraph,view,loops,attribute,verify,otel,stats, andkeygen.viewrenders the self-contained HTML viewer, and rendering a sealed snapshot populates the integrity panel with its signature and audit head.verifychecks a trace end to end, accepting either a spans array (per-span hashes) or a sealed snapshot (the Ed25519 signature plus per-span hashes), with--audit <chain.json>to also verify the audit chain and--pubkey <jwk.json>to pin the signer key. Without a pinned key, the signature is verified against the key embedded in the snapshot and the command prints the signer fingerprint plus an explicit note that this proves integrity, not authorship; pinning proves authorship. Stable exit codes: 0 success, 2 usage error, 10 file not found, 20 invalid input, 21 verification failed. A trace file is a JSON array of spans as produced by the file exporter.
Engineering
- 115 tests across 22 suites, green on Node 20, 22, and 24. Coverage 88.48% statements, 85.1% branches, 91.15% functions, 88.48% lines.
- Zero required runtime dependencies. The core is node-free: SHA-256 and Ed25519 run over Web Crypto (
globalThis.crypto.subtle), nevernode:crypto. - Dual ESM and CJS builds with type definitions for both, validated by
publintandattw --profile node16, with a per-export size budget enforced bysize-limit. - SLSA provenance attestation on every npm release, published through a two-step, review-required CI/CD flow.
- Optional, conceptual peers
@takk/caduceusand@takk/coryphaeus, both optional, so Glasshouse installs and runs standalone.
Release preparation (2026-07-01T00:44:37Z)
These refinements touch the landing page and the repository, not the shipped tarball, whose files allowlist carries only the build output and the Markdown docs. The public API, the build output, and the test results are unchanged.
- Redrew the how-it-works diagram (
assets/glasshouse-diagram.svg) as a four-stage pipeline, capture withobserve(), analyze into a priced and typed agent graph with drift, loops, and failure attribution, seal with redaction plus a SHA-256 audit chain and Ed25519 signature, and open through the HTML viewer, theglasshouse verifycommand, and OpenTelemetry. It reads for developers, enthusiasts, and investors on the shared design system, faithful to how the package actually works. - Regenerated the Open Graph card (
assets/og-image.svg,.png,.jpg) and aligned its wording to Massive Intelligence (IM). - Corrected the pull-request template and the contributing guide to reference real CLI subcommands (
glasshouse graph,view,verify) instead of a subcommand that does not exist. - Verified the display-name convention across the whole package: Glasshouse in prose, lowercase
glasshouseonly as a token (package id, command, url, path).
Not in 1.0 (non-goals)
- No bundled dashboard, no hosted service, and no trace storage backend. Glasshouse is the observability substrate; a hosted panel and retention are the roadmap.
- No automatic, learned failure attribution. The 1.0 attribution is a transparent heuristic over the span tree; automatic attribution and continuous-integration evaluation are on the roadmap for a later version.
- The core never reaches the network. The edge exporters and the network alert channels send data only to endpoints the caller explicitly configures.