Skip to content

feat: semantic diffing, A2A/MCP bridge, usage analytics, push-to-main releases - #1

Merged
DibbayajyotiRoy merged 3 commits into
mainfrom
feat/usage-telemetry-and-feedback-loop
Oct 7, 2026
Merged

DibbayajyotiRoy merged 3 commits into
mainfrom
feat/usage-telemetry-and-feedback-loop

Conversation

@DibbayajyotiRoy

Copy link
Copy Markdown
Owner

Summary

  • Semantic snapshot diffing. semanticDiff() / summarizeChanges() grade snapshot changes as info, notable or breaking (prices, availability, actions, policy). The agent gets watch() / changes() subscriptions, and ahtml diff a b --fail-on breaking gates CI.
  • A2A / MCP auto-bridge. toA2AAgentCard + createA2AHandler (A2A v1.0, 0.3 compatible), Hono and Next routes, and ahtml bridge serving an A2A card plus HTTP MCP. Priced and irreversible actions return a dry-run and only execute on explicit confirmation.
  • Usage analytics.
    • Anonymous runtime usage events go to PostHog (EU) through a zero-dependency client in @ahtmljs/schema, instrumented at real entry points in all 16 packages.
    • Never sent: URLs, page content, hostnames or CLI arguments. GeoIP is disabled, and nothing is sent under the Node test runner.
    • @scarf/scarf provides install analytics.
    • Disclosed in the README, docs/agents.md and the privacy page.
  • CLI. A zero-dependency update notifier, and --version now prints the real version.
  • Push-to-main releases. auto-release.yml + scripts/bump-version.mjs + scripts/publish-all.sh replace the manual tag-based release.yml.
    • Every push to main patch-bumps all packages and publishes them to npm with provenance in dependency order.
    • It then pushes the bump commit and tag atomically and creates a GitHub release.
    • Guarded against loops, version skew (max of repo and registry), main moving mid-run, and non-main dispatch.
  • README. npm version and total-download badges per package.

Before merging

  • NPM_TOKEN repo secret is valid. It was last updated 2026-05-20, and granular tokens expire. Merging triggers the first auto-release.
  • PostHog: Settings → Project → Privacy → Discard client IP data is on. The docs state IPs are discarded.
  • Scarf: the packages are registered on app.scarf.sh. Optional; installs only count once a version containing Scarf is published.

Test plan

  • npm run build:packages
  • npm test: 677 passed, 0 failed, 2 skipped
  • npm run smoke:imports: CJS + ESM entry points OK
  • npm run test:conformance: 63 passed, 0 failed
  • Version-bump simulation: 1.1.0 → 1.1.1 (extract 0.1.0 → 0.1.1), internal deps rewritten
  • PostHog live probe from the ESM and CJS builds: 200 OK (e2e.probe events)
  • After merge, watch the first "Release on main" run publish 1.1.1

… releases

Semantic snapshot diffing:
- semanticDiff/summarizeChanges grade changes as info/notable/breaking
  (prices, availability, actions, policy).
- @ahtmljs/agent: watch() and changes() change subscriptions.
- ahtml diff <a> <b> [--json] [--fail-on breaking|notable] for CI.

A2A / MCP auto-bridge:
- toA2AAgentCard + createA2AHandler (A2A v1.0, 0.3 compatible).
- Hono and Next routes; `ahtml bridge` serves an A2A card and HTTP MCP.
- Priced/irreversible actions return a dry-run and run only on explicit
  confirmation.

Usage analytics:
- Anonymous runtime usage events to PostHog (EU) from all packages via a
  zero-dependency client in @ahtmljs/schema; no URLs, content, hostnames or
  argv; GeoIP disabled; suppressed under the Node test runner.
- @scarf/scarf install analytics in every published package.
- Disclosed in README, docs/agents.md and the landing privacy page.

CLI:
- Zero-dependency update notifier (npm registry, 24h cache, TTY/CI aware).
- --version prints the real package version.

CI/CD:
- Push to main releases automatically: bump-version.mjs (patch bump based
  on max(repo, registry), syncs version.ts and exact internal deps),
  publish-all.sh (dependency-ordered npm publish with provenance,
  idempotent, fails on package-list drift), auto-release.yml (main-only,
  CI parity checks, aborts if main moved, atomic push of commit + tag,
  gh release).
- Replaces the manual tag-based release.yml.
- SCARF_ANALYTICS=false in all npm-based workflows.
- Examples track workspace versions with caret ranges.

Docs: README features and roadmap, docs/diffing.md, docs/a2a.md, CHANGELOG.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ahtmljs Ready Ready Preview Oct 7, 2026 8:04am UTC

@DibbayajyotiRoy
DibbayajyotiRoy merged commit 7b92311 into main Oct 7, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview — aa676ff9 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant