{"id":50786990,"url":"https://github.com/maskdotdev/muzen","last_synced_at":"2026-06-12T08:33:01.922Z","repository":{"id":362599602,"uuid":"1257399441","full_name":"maskdotdev/muzen","owner":"maskdotdev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-05T03:40:55.000Z","size":317,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T04:10:01.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maskdotdev.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T16:35:22.000Z","updated_at":"2026-06-05T03:40:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maskdotdev/muzen","commit_stats":null,"previous_names":["maskdotdev/muzen"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/maskdotdev/muzen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maskdotdev%2Fmuzen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maskdotdev%2Fmuzen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maskdotdev%2Fmuzen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maskdotdev%2Fmuzen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maskdotdev","download_url":"https://codeload.github.com/maskdotdev/muzen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maskdotdev%2Fmuzen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34236551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-12T08:33:01.386Z","updated_at":"2026-06-12T08:33:01.914Z","avatar_url":"https://github.com/maskdotdev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Muzen\n\nCode review automation that runs as a real service.\n\nMost review automation is glue code that breaks the moment you need retries,\ncancellation, streaming progress, or durable state. Muzen handles all of that so\nyou can treat a code review like an API call:\n\n```ts\nimport { createMuzen } from \"@muzen/sdk\";\n\nconst muzen = await createMuzen();\nconst review = await muzen.review(\"github:maskdotdev/heimdaal#123\");\n\nreview.subscribe((event) =\u003e {\n  console.log(event.type);\n});\n\nconst result = await review.wait();\nconsole.log(result.conclusion);\nconsole.log(result.summary);\n```\n\nA Rust runtime manages sessions, workers, event replay, webhooks, provider\ncheckouts, artifacts, and scheduling. TypeScript and Python SDKs give you a\nclean interface over it -- you never have to think about the Rust layer unless\nyou want to.\n\n## Current Status\n\nMuzen is a preview implementation of RFC 0001. The repo builds and the APIs\nwork, but the surface is still settling.\n\n**Working today:**\n\n- Local reviews via the `muzen-runner` binary\n- TypeScript and Python SDK previews over a shared runner protocol\n- Durable review sessions with events, results, artifacts, logs, cancellation,\n  retries, leases, and worker claims\n- In-memory stores for local dev, Postgres-backed stores for real deployments\n- Workspace-scoped model and provider profiles with secret references (no raw\n  credentials)\n- GitHub and GitLab webhook verification, source mapping, and queued scheduling\n- Full HTTP API: review creation, SSE streaming, results, artifacts,\n  cancellation, webhooks, and workspace profiles\n- An Axum-backed `muzen-service` binary wrapping the core HTTP router\n- Pull request and merge request materialization with temporary Git checkouts,\n  token-safe auth, provider base URL routing, and changed-file inference\n\n**Still hardening:**\n\n- Postgres integration CI for environments with `DATABASE_URL`\n- Live GitHub/GitLab provider smoke tests where tokens and network access are\n  available\n- Migration from local inline execution to durable service-bound SDK execution\n\nFull implementation ledger:\n[`docs/rfcs/0001-implementation-progress.md`](docs/rfcs/0001-implementation-progress.md)\n\n## Try a Local Review\n\nBuild the runner and point an SDK at it:\n\n```sh\ncargo build --bin muzen-runner\nexport MUZEN_RUNNER_PATH=\"$PWD/target/debug/muzen-runner\"\n```\n\nThen run a review:\n\n```ts\nimport { createMuzen, local } from \"@muzen/sdk\";\n\nconst muzen = await createMuzen({\n  runnerPath: process.env.MUZEN_RUNNER_PATH,\n});\n\ntry {\n  const review = await muzen.review(\n    local(\".\", {\n      changedFiles: [\"Cargo.toml\"],\n    }),\n  );\n\n  review.subscribe((event) =\u003e {\n    console.log(event.type);\n  });\n\n  const result = await review.wait();\n  console.log(result.conclusion);\n  console.log(result.summary);\n} finally {\n  await muzen.close();\n}\n```\n\nMore examples:\n\n- `examples/typescript/basic-review`\n- `examples/typescript/events`\n- `examples/python/basic_review.py`\n- `examples/python/notebook-review/notebook_review.ipynb`\n\n## Run the Service\n\n`muzen-service` exposes the full HTTP API from RFC 0001. Point it at Postgres\nfor durable storage, or omit `DATABASE_URL` to run with in-memory stores.\nProduction deployments should read\n[`docs/production-operations.md`](docs/production-operations.md), especially\nthe notes on external HTTP API authentication and preview schema resets.\n\n```sh\nDATABASE_URL=postgres://...\nGITHUB_WEBHOOK_SECRET=...\nGITLAB_WEBHOOK_TOKEN=...\ncargo run --bin muzen-service -- --bind 127.0.0.1:7341\n```\n\nOnce the service is up, connect a remote client:\n\n```ts\nimport { createMuzenClient } from \"@muzen/sdk\";\n\nconst muzen = createMuzenClient({\n  baseUrl: \"https://muzen.example\",\n  token: process.env.MUZEN_TOKEN,\n});\n\nconst workspace = muzen.workspace(\"acme\");\n\nawait workspace.models.set(\"default\", {\n  provider: \"openai_compatible\",\n  model: \"gpt-5\",\n  secretRef: \"vault://workspaces/acme/models/default\",\n});\n\nawait workspace.providers.set(\"github\", {\n  provider: \"github\",\n  secretRef: \"vault://workspaces/acme/providers/github\",\n});\n\nconst review = await workspace.review(\"github:maskdotdev/heimdaal#123\", {\n  model: \"default\",\n});\n\nconsole.log(await review.wait());\n```\n\n## Webhooks\n\nWebhook verification and event mapping live in Rust. Your framework route just\ndelegates:\n\n```ts\nexport async function POST(request: Request) {\n  return muzen.webhooks.github.response(request);\n}\n```\n\nThe helpers verify signatures (GitHub) or tokens (GitLab), map pull request and\nmerge request events to review sources, and queue workspace reviews\nautomatically.\n\n## Python\n\nPython shares the same runner protocol as TypeScript:\n\n```py\nimport asyncio\nimport os\n\nfrom muzen import Client, local\n\n\nasync def main() -\u003e None:\n    client = await Client.create(\n        runner_path=os.environ.get(\"MUZEN_RUNNER_PATH\"),\n    )\n    try:\n        review = await client.review(\n            local(\".\", changed_files=[\"Cargo.toml\"]),\n        )\n\n        async for event in review.events():\n            print(event.type)\n\n        result = await review.wait()\n        print(result.conclusion)\n        print(result.summary)\n    finally:\n        await client.close()\n\n\nasyncio.run(main())\n```\n\n## Architecture\n\n```text\nTypeScript SDK       Python SDK\n      |                  |\n      +------ runner protocol ------+\n                                    |\n                              muzen-runner\n                                    |\n                              Rust review core\n                                    |\n        +-----------+-------------+-------------+\n        |           |             |             |\n     sessions    workers      webhooks      artifacts\n        |           |             |             |\n        +-----------+-------------+-------------+\n                                    |\n                      in-memory stores or Postgres\n\nRemote clients use HTTP instead:\n\nSDK -\u003e muzen-service -\u003e Rust review core -\u003e stores/workers/events/results\n```\n\nThe Rust boundary is an operational choice: SDKs stay small and ergonomic while\nprotocol validation, provider materialization, durable records, and worker\nbehavior share a single implementation.\n\n## Verify the Repo\n\nRun the full verification gate:\n\n```sh\nscripts/verify-rfc-0001-examples.sh\n```\n\nThis builds `muzen-runner`, runs TypeScript and Python SDK tests, typechecks the\nTypeScript examples, executes the Python basic review example, and validates the\nnotebook JSON.\n\n## Docs\n\n- [RFC 0001 -- SDK-First Review Sessions](docs/rfcs/0001-sdk-first-review-sessions.md)\n- [Remote HTTP API Contract](docs/rfcs/0001-remote-http-api-contract.md)\n- [Runner Protocol Mapping](docs/rfcs/0001-runner-protocol-mapping.md)\n- [Implementation Progress](docs/rfcs/0001-implementation-progress.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaskdotdev%2Fmuzen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaskdotdev%2Fmuzen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaskdotdev%2Fmuzen/lists"}