Skip to content

[PUBLISHED ON NPMJS] @takk/glasshouse@1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Jul 00:55

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.yml workflow. The Creator must review the contents (tag, changelog, attached commit, pack-smoke result in the workflow logs) and then explicitly run npm-publish.yml to 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

  • Glasshouse and createGlasshouse (@takk/glasshouse/glasshouse): the facade most callers use. It wraps a tracer so you observe work into spans, and over those spans it exposes graph and mermaid for the agent graph, loops for loop detection, attribute for failure attribution, totals for token and cost aggregation, an optional tamper-evident audit chain (auditTrail, verifyAudit), snapshot and sealedSnapshot for portable and signed exports, toOtlp for OpenTelemetry export, and alert for 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 the SpanExporter interface (@takk/glasshouse/tracer): start a span, hold the mutable LiveSpan while an agent thinks, calls a model, or runs a tool, then end() it into an immutable span. The observe(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, and totalUsage (@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 the GEN_AI keys (@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_tokens and gen_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, and toDot (@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, and psiSeverity (@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, and bernoulli (@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, and defaultRedactionPolicy (@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, and GENESIS_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, and verifySnapshotSignature (@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) and Glasshouse.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 from file:// 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, and createTraceResource (@takk/glasshouse/mcp): observability as a Model Context Protocol surface, the glasshouse_trace, glasshouse_graph, and glasshouse_query tools plus a readable resource, as plain objects that register on any MCP server without an SDK dependency.
  • otlpHttpExporter and fetchSpanExporter (@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, and fileAlertChannel (@takk/glasshouse/node): persist spans and alerts to disk, the only surface that touches node:fs, with per-path serialized, atomic writes.

Command-line interface

  • glasshouse CLI with graph, view, loops, attribute, verify, otel, stats, and keygen. view renders the self-contained HTML viewer, and rendering a sealed snapshot populates the integrity panel with its signature and audit head. verify checks 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), never node:crypto.
  • Dual ESM and CJS builds with type definitions for both, validated by publint and attw --profile node16, with a per-export size budget enforced by size-limit.
  • SLSA provenance attestation on every npm release, published through a two-step, review-required CI/CD flow.
  • Optional, conceptual peers @takk/caduceus and @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 with observe(), 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, the glasshouse verify command, 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 glasshouse only 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.