Archify Diagram Viewer 0.1.0
VS Code extension that previews Archify diagrams from their JSON sources (live, as you type) and opens rendered Archify HTML in a viewer tab. Bundles the Archify 3.0.1 renderer and runs it on VS Code's Node runtime. Adds validation diagnostics, JSON schema help, source-link navigation, export saving, render-to-file and open-in-browser commands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+55
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"diagram_type": "lifecycle",
|
||||
"meta": {
|
||||
"title": "Agent Run Lifecycle",
|
||||
"output": "examples/lifecycle-agent-run.html",
|
||||
"viewBox": [1030, 630],
|
||||
"animation": "trace",
|
||||
"quality_profile": "showcase"
|
||||
},
|
||||
"lanes": [
|
||||
{ "id": "main", "label": "Lifecycle phases" },
|
||||
{ "id": "waiting", "label": "Interruptions" },
|
||||
{ "id": "exceptions", "label": "Recovery loop" },
|
||||
{ "id": "terminal", "label": "Terminal exits" }
|
||||
],
|
||||
"states": [
|
||||
{ "id": "queued", "type": "start", "label": "Queued", "sublabel": "request accepted", "lane": "main", "col": 0, "step": "01", "tag": "entry" },
|
||||
{ "id": "planning", "type": "active", "label": "Planning", "sublabel": "build task graph", "lane": "main", "col": 1, "step": "02", "tag": "model" },
|
||||
{ "id": "executing", "type": "active", "label": "Executing", "sublabel": "tool calls", "lane": "main", "col": 2, "step": "03", "tag": "work" },
|
||||
{ "id": "reviewing", "type": "decision", "label": "Reviewing", "sublabel": "quality gate", "lane": "main", "col": 3, "step": "04", "tag": "check" },
|
||||
{ "id": "completed", "type": "success", "label": "Completed", "sublabel": "final response", "lane": "main", "col": 4, "step": "05", "tag": "done" },
|
||||
{ "id": "approval", "type": "waiting", "label": "Needs Approval", "sublabel": "human gate", "lane": "waiting", "col": 0, "tag": "pause" },
|
||||
{ "id": "blocked", "type": "waiting", "label": "Blocked", "sublabel": "missing input", "lane": "waiting", "col": 1, "tag": "wait" },
|
||||
{ "id": "failed", "type": "failure", "label": "Failed", "sublabel": "recoverable error", "lane": "exceptions", "col": 0, "yOffset": 78, "tag": "retryable" },
|
||||
{ "id": "cancelled", "type": "failure", "label": "Cancelled", "sublabel": "user stopped", "lane": "terminal", "col": 0, "tag": "terminal" },
|
||||
{ "id": "expired", "type": "failure", "label": "Expired", "sublabel": "timeout", "lane": "terminal", "col": 1, "tag": "terminal" }
|
||||
],
|
||||
"transitions": [
|
||||
{ "id": "approval-needed", "from": "executing", "to": "approval", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
|
||||
{ "id": "review-blocked", "from": "reviewing", "to": "blocked", "variant": "default", "route": "drop" },
|
||||
{ "id": "execution-failed", "from": "executing", "to": "failed", "variant": "security", "fromSide": "left", "toSide": "left", "via": [[320, 157], [320, 385]] },
|
||||
{ "id": "failed-retry", "from": "failed", "to": "executing", "variant": "emphasis", "fromSide": "left", "toSide": "top", "via": [[20, 385], [20, 80], [402, 80]] },
|
||||
{ "id": "block-expired", "from": "blocked", "to": "expired", "variant": "security", "fromSide": "bottom", "toSide": "top", "route": "straight" },
|
||||
{ "id": "approval-cancelled", "from": "approval", "to": "cancelled", "variant": "security", "fromSide": "bottom", "toSide": "top", "via": [[480, 336], [480, 432], [402, 432]] }
|
||||
],
|
||||
"cards": [
|
||||
{
|
||||
"dot": "emerald",
|
||||
"title": "Main Path + Waits",
|
||||
"items": [
|
||||
"The run has five ordered phases from queue to completion",
|
||||
"Approval and missing input pause the run without ending it"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "rose",
|
||||
"title": "Recovery + Terminal Exits",
|
||||
"items": [
|
||||
"Failed loops back while retry budget remains",
|
||||
"Cancelled and Expired are terminal exits with no return path"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"schema_version": 2,
|
||||
"diagram_type": "workflow",
|
||||
"meta": {
|
||||
"title": "Agent Tool Call Workflow",
|
||||
"animation": "trace",
|
||||
"visual_preset": "signal-flow",
|
||||
"quality_profile": "showcase",
|
||||
"output": "examples/workflow-agent-tool-call-rendered.html"
|
||||
},
|
||||
"lanes": [
|
||||
{ "id": "ui", "label": "User Interface" },
|
||||
{ "id": "agent", "label": "Agent Runtime" },
|
||||
{ "id": "policy", "label": "Policy & Recovery", "variant": "exception" },
|
||||
{ "id": "tools", "label": "Tool Execution & Evidence" }
|
||||
],
|
||||
"phases": [
|
||||
{ "id": "intake", "label": "Intake", "fromCol": 0, "toCol": 1 },
|
||||
{ "id": "reasoning", "label": "Plan + route", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
|
||||
{ "id": "execution", "label": "Execute + report", "fromCol": 4, "toCol": 5, "variant": "dashed" }
|
||||
],
|
||||
"groups": [
|
||||
{ "id": "agent_loop", "label": "Planning loop", "lane": "agent", "fromCol": 2, "toCol": 3, "variant": "emphasis" },
|
||||
{ "id": "exception_path", "label": "Human or policy stop", "lane": "policy", "fromCol": 3, "toCol": 5, "variant": "security" },
|
||||
{ "id": "evidence_path", "label": "Evidence path", "lane": "tools", "fromCol": 1, "toCol": 2, "variant": "dashed" },
|
||||
{ "id": "tool_work", "label": "Tool work", "lane": "tools", "fromCol": 4, "toCol": 5, "variant": "dashed" }
|
||||
],
|
||||
"mainPath": ["user", "chat", "planner", "router", "approval", "tool", "external", "final"],
|
||||
"nodes": [
|
||||
{ "id": "user", "lane": "ui", "col": 0, "type": "external", "label": "User", "sublabel": "asks for work", "width": 132 },
|
||||
{ "id": "chat", "lane": "ui", "col": 1, "type": "frontend", "label": "Chat Surface", "sublabel": "thread + files", "width": 132 },
|
||||
{ "id": "final", "lane": "ui", "col": 5, "type": "backend", "label": "Final Reply", "sublabel": "answer + changes", "width": 132 },
|
||||
{ "id": "planner", "lane": "agent", "col": 2, "type": "backend", "label": "Agent Planner", "sublabel": "plan next step", "tag": "context aware", "width": 132 },
|
||||
{ "id": "router", "lane": "agent", "col": 3, "type": "backend", "label": "Tool Router", "sublabel": "choose capability", "width": 132 },
|
||||
{ "id": "approval", "lane": "policy", "col": 3, "type": "security", "label": "Approval Gate", "sublabel": "scope + consent", "tag": "block risky ops", "width": 132 },
|
||||
{ "id": "blocked", "lane": "policy", "col": 4, "type": "security", "label": "Blocked", "sublabel": "wait or reject", "width": 132 },
|
||||
{ "id": "retry", "lane": "policy", "col": 5, "type": "messagebus", "label": "Retry Path", "sublabel": "revise request", "width": 132 },
|
||||
{ "id": "tool", "lane": "tools", "col": 4, "type": "messagebus", "label": "Tool Call", "sublabel": "shell / browser / MCP", "tag": "structured result", "width": 132 },
|
||||
{ "id": "external", "lane": "tools", "col": 5, "type": "cloud", "label": "External API", "sublabel": "network service", "width": 132 },
|
||||
{ "id": "store", "lane": "tools", "col": 1, "type": "database", "label": "Context Store", "sublabel": "repo + memory", "width": 132 },
|
||||
{ "id": "trace", "lane": "tools", "col": 2, "type": "database", "label": "Trace Log", "sublabel": "events + output", "width": 132 }
|
||||
],
|
||||
"edges": [
|
||||
{ "id": "request-chat", "from": "user", "to": "chat", "variant": "default" },
|
||||
{ "id": "plan-request", "from": "chat", "to": "planner", "label": "plan", "variant": "emphasis" },
|
||||
{ "id": "planner-route", "from": "planner", "to": "router", "variant": "default" },
|
||||
{ "id": "approval-check", "from": "router", "to": "approval", "label": "needs approval?", "variant": "security" },
|
||||
{ "id": "approved-tool", "from": "approval", "to": "tool", "variant": "emphasis" },
|
||||
{ "id": "approval-denied", "from": "approval", "to": "blocked", "label": "denied", "variant": "security", "role": "error" },
|
||||
{ "id": "retry-request", "from": "blocked", "to": "retry", "variant": "dashed", "role": "branch" },
|
||||
{ "id": "tool-external-call", "from": "tool", "to": "external", "variant": "default" },
|
||||
{ "id": "external-reply", "from": "external", "to": "final", "variant": "emphasis", "role": "return", "fromSide": "right", "toSide": "right", "route": "outside-right", "width": 1.2 },
|
||||
{ "id": "record-result", "from": "external", "to": "trace", "label": "record result", "variant": "dashed", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "labelSegment": 1 },
|
||||
{ "id": "write-trace-memory", "from": "store", "to": "trace", "label": "trace + memory", "variant": "dashed" }
|
||||
],
|
||||
"cards": [
|
||||
{
|
||||
"dot": "cyan",
|
||||
"title": "Compiler Contract",
|
||||
"items": [
|
||||
"Lanes and columns determine node placement",
|
||||
"Labels reserve clearance; routes stay orthogonal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "rose",
|
||||
"title": "Runtime Semantics",
|
||||
"items": [
|
||||
"Approval gates risky work before tool execution",
|
||||
"Evidence returns through isolated trace and memory"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"diagram_type": "sequence",
|
||||
"meta": {
|
||||
"title": "Cache Miss Request Sequence",
|
||||
"output": "examples/sequence-cache-miss-request.html",
|
||||
"viewBox": [1080, 580],
|
||||
"column_fit": "spread",
|
||||
"animation": "trace",
|
||||
"quality_profile": "showcase"
|
||||
},
|
||||
"participants": [
|
||||
{ "id": "user", "type": "external", "label": "User", "sublabel": "browser session" },
|
||||
{ "id": "web", "type": "frontend", "label": "Web App", "sublabel": "React UI" },
|
||||
{ "id": "api", "type": "backend", "label": "API", "sublabel": "request handler" },
|
||||
{ "id": "auth", "type": "security", "label": "Auth", "sublabel": "JWT verify" },
|
||||
{ "id": "redis", "type": "database", "label": "Redis", "sublabel": "cache" },
|
||||
{ "id": "db", "type": "database", "label": "Postgres", "sublabel": "source of truth" },
|
||||
{ "id": "trace", "type": "messagebus", "label": "Trace", "sublabel": "async event" }
|
||||
],
|
||||
"segments": [
|
||||
{ "from": 150, "to": 250, "label": "Request" },
|
||||
{ "from": 260, "to": 370, "label": "Fallback" },
|
||||
{ "from": 380, "to": 480, "label": "Response + trace" }
|
||||
],
|
||||
"messages": [
|
||||
{ "id": "open-page", "from": "user", "to": "web", "y": 160, "label": "open page", "variant": "default" },
|
||||
{ "id": "dashboard-request", "from": "web", "to": "api", "y": 185, "label": "GET /dashboard", "variant": "emphasis" },
|
||||
{ "id": "verify-jwt", "from": "api", "to": "auth", "y": 210, "label": "verify JWT", "variant": "security" },
|
||||
{ "id": "auth-claims", "from": "auth", "to": "api", "y": 238, "label": "claims ok", "variant": "return" },
|
||||
{ "id": "cache-read", "from": "api", "to": "redis", "y": 270, "label": "read cache", "variant": "default" },
|
||||
{ "id": "cache-miss", "from": "redis", "to": "api", "y": 298, "label": "miss", "variant": "return" },
|
||||
{ "id": "profile-query", "from": "api", "to": "db", "y": 330, "label": "query profile + metrics", "variant": "emphasis" },
|
||||
{ "id": "profile-rows", "from": "db", "to": "api", "y": 358, "label": "rows", "variant": "return" },
|
||||
{ "id": "cache-write", "from": "api", "to": "redis", "y": 390, "label": "set cache", "variant": "dashed" },
|
||||
{ "id": "trace-emit", "from": "api", "to": "trace", "y": 418, "label": "emit trace", "variant": "dashed" },
|
||||
{ "id": "dashboard-response", "from": "api", "to": "web", "y": 443, "label": "200 JSON", "variant": "return" },
|
||||
{ "id": "page-render", "from": "web", "to": "user", "y": 468, "label": "render", "variant": "return" }
|
||||
],
|
||||
"activations": [
|
||||
{ "participant": "web", "from": 180, "to": 474, "type": "frontend" },
|
||||
{ "participant": "api", "from": 185, "to": 450, "type": "backend" },
|
||||
{ "participant": "auth", "from": 205, "to": 244, "type": "security" },
|
||||
{ "participant": "redis", "from": 265, "to": 304, "type": "database" },
|
||||
{ "participant": "db", "from": 325, "to": 364, "type": "database" },
|
||||
{ "participant": "trace", "from": 413, "to": 449, "type": "messagebus" }
|
||||
],
|
||||
"cards": [
|
||||
{
|
||||
"dot": "emerald",
|
||||
"title": "Happy Path",
|
||||
"items": [
|
||||
"The main request is Web App -> API -> data source -> response",
|
||||
"Return messages are quieter than forward calls",
|
||||
"Activation bars make ownership duration visible"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "rose",
|
||||
"title": "Policy + Fallback",
|
||||
"items": [
|
||||
"JWT verification is colored as a security interaction",
|
||||
"Cache miss is visible without overpowering the main path",
|
||||
"Database access only appears after cache fallback"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "orange",
|
||||
"title": "Async Trace",
|
||||
"items": [
|
||||
"Trace emission is dashed and secondary",
|
||||
"It does not block the response path",
|
||||
"The diagram separates user-facing latency from observability"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"diagram_type": "dataflow",
|
||||
"meta": {
|
||||
"title": "Order Event-stream Topology",
|
||||
"output": "examples/event-stream.html",
|
||||
"viewBox": [1080, 780],
|
||||
"animation": "trace",
|
||||
"visual_preset": "signal-flow",
|
||||
"quality_profile": "showcase"
|
||||
},
|
||||
"stages": [
|
||||
{ "label": "Producers" },
|
||||
{ "label": "Transit" },
|
||||
{ "label": "Processors" },
|
||||
{ "label": "State + recovery" },
|
||||
{ "label": "Consumers" }
|
||||
],
|
||||
"nodes": [
|
||||
{ "id": "checkout", "type": "frontend", "label": "Checkout API", "sublabel": "order producer", "stage": 0, "row": 0, "tag": "team commerce" },
|
||||
{ "id": "billing", "type": "backend", "label": "Billing API", "sublabel": "payment producer", "stage": 0, "row": 2, "tag": "team money" },
|
||||
{ "id": "orders", "type": "messagebus", "label": "orders.v1", "sublabel": "12 partitions", "stage": 1, "row": 0, "tag": "key: order_id" },
|
||||
{ "id": "payments", "type": "messagebus", "label": "payments.v2", "sublabel": "8 partitions", "stage": 1, "row": 2, "tag": "key: order_id" },
|
||||
{ "id": "validate", "type": "backend", "label": "Order Validate", "sublabel": "group fulfillment", "stage": 2, "row": 0, "tag": "ordered" },
|
||||
{ "id": "enrich", "type": "backend", "label": "Payment Enrich", "sublabel": "group analytics", "stage": 2, "row": 2, "tag": "at-least-once" },
|
||||
{ "id": "state", "type": "database", "label": "Order State", "sublabel": "materialized view", "stage": 3, "row": 1, "tag": "idempotent" },
|
||||
{ "id": "dlq", "type": "messagebus", "label": "events.dlq", "sublabel": "poison events", "stage": 3, "row": 4, "tag": "7-day retention" },
|
||||
{ "id": "fulfillment", "type": "backend", "label": "Fulfillment", "sublabel": "shipping workflow", "stage": 4, "row": 0, "tag": "consumer" },
|
||||
{ "id": "analytics", "type": "database", "label": "Analytics", "sublabel": "streaming facts", "stage": 4, "row": 2, "tag": "consumer" },
|
||||
{ "id": "replay", "type": "security", "label": "Replay Tool", "sublabel": "approved batch", "stage": 4, "row": 4, "tag": "operator gate" },
|
||||
{ "id": "ops", "type": "external", "label": "On-call", "sublabel": "DLQ owner", "stage": 4, "row": 3, "yOffset": -18, "tag": "SRE" }
|
||||
],
|
||||
"flows": [
|
||||
{ "from": "checkout", "to": "orders", "label": "OrderPlaced", "classification": "schema v1", "variant": "emphasis", "route": "straight" },
|
||||
{ "from": "billing", "to": "payments", "label": "PaymentCaptured", "classification": "schema v2", "variant": "emphasis", "route": "straight" },
|
||||
{ "from": "orders", "to": "validate", "label": "ordered orders", "classification": "consumer group", "variant": "emphasis", "route": "straight" },
|
||||
{ "from": "payments", "to": "enrich", "label": "payment facts", "classification": "at-least-once", "variant": "emphasis", "route": "straight" },
|
||||
{ "from": "validate", "to": "state", "label": "valid order", "classification": "idempotent", "variant": "emphasis", "route": "vertical-channel" },
|
||||
{ "from": "enrich", "to": "state", "label": "enriched payment", "classification": "idempotent", "variant": "default", "route": "vertical-channel" },
|
||||
{ "from": "state", "to": "fulfillment", "label": "ready orders", "classification": "read model", "variant": "emphasis", "route": "vertical-channel" },
|
||||
{ "from": "state", "to": "analytics", "label": "order facts", "classification": "non-PII", "variant": "default", "route": "vertical-channel" },
|
||||
{ "from": "validate", "to": "dlq", "label": "invalid event", "classification": "dead letter", "variant": "security", "fromSide": "top", "toSide": "top", "via": [[530, 80], [20, 80], [20, 550], [745, 550]], "labelAt": [300, 550] },
|
||||
{ "from": "enrich", "to": "dlq", "label": "poison event", "classification": "dead letter", "variant": "security", "route": "bottom-channel", "labelDy": 30 },
|
||||
{ "from": "dlq", "to": "ops", "label": "failure sample", "classification": "restricted", "variant": "security", "route": "vertical-channel" },
|
||||
{ "from": "dlq", "to": "replay", "label": "approved replay", "classification": "audited batch", "variant": "dashed", "route": "straight", "labelDy": 30 }
|
||||
],
|
||||
"cards": [
|
||||
{ "dot": "amber", "title": "Transit Contract", "items": ["Every event and topic is named", "Partition keys preserve per-order ordering", "Consumer groups expose processing ownership"] },
|
||||
{ "dot": "emerald", "title": "State + Delivery", "items": ["Processors write an idempotent materialized view", "Fulfillment and analytics consume distinct assets", "At-least-once delivery never implies duplicate business effects"] },
|
||||
{ "dot": "rose", "title": "Failure Ownership", "items": ["Poison events land in a retained dead-letter topic", "On-call inspects samples before replay", "Replay is gated, batched, and auditable"] }
|
||||
]
|
||||
}
|
||||
+293
@@ -0,0 +1,293 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"diagram_type": "architecture",
|
||||
"meta": {
|
||||
"title": "MCO Runtime Architecture",
|
||||
"subtitle": "mco-org/mco · explicit provider policy · parallel invocation · durable raw answers",
|
||||
"output": "docs/cases/mco-runtime.architecture.html",
|
||||
"animation": "trace",
|
||||
"visual_preset": "signal-flow",
|
||||
"quality_profile": "showcase",
|
||||
"repository": {
|
||||
"url": "https://github.com/mco-org/mco",
|
||||
"revision": "9f1a1cf1afdc04d7b5406782b40dfec76d9bc798"
|
||||
}
|
||||
},
|
||||
"components": [
|
||||
{
|
||||
"id": "callers",
|
||||
"type": "external",
|
||||
"label": "Callers",
|
||||
"sublabel": "human · coding agent",
|
||||
"pos": [5, 250],
|
||||
"size": [130, 60]
|
||||
},
|
||||
{
|
||||
"id": "entry",
|
||||
"type": "frontend",
|
||||
"label": "Entry Surfaces",
|
||||
"sublabel": "npm shim · Python CLI · MCP",
|
||||
"pos": [175, 250],
|
||||
"size": [160, 60],
|
||||
"sources": [
|
||||
{ "path": "bin/mco.js", "line": 1, "label": "npm entry" },
|
||||
{ "path": "runtime/mcp_server.py", "line": 108, "end_line": 153, "label": "MCP entry" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "router",
|
||||
"type": "backend",
|
||||
"label": "Command Router",
|
||||
"sublabel": "run · review · doctor · session",
|
||||
"pos": [360, 250],
|
||||
"size": [180, 60],
|
||||
"sources": [
|
||||
{ "path": "runtime/cli.py", "line": 1945, "label": "CLI main" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "database",
|
||||
"label": "Config + Selection",
|
||||
"sublabel": "files · explicit provider team",
|
||||
"pos": [565, 110],
|
||||
"size": [175, 60],
|
||||
"tag": "no silent team",
|
||||
"sources": [
|
||||
{ "path": "runtime/config.py", "line": 24, "label": "Review config" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "policy",
|
||||
"type": "security",
|
||||
"label": "Execution Policy",
|
||||
"sublabel": "read_only · write · yolo",
|
||||
"pos": [565, 250],
|
||||
"size": [175, 60],
|
||||
"tag": "explicit boundary",
|
||||
"sources": [
|
||||
{ "path": "runtime/policy.py", "line": 34, "label": "Provider policy" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "workflow",
|
||||
"type": "backend",
|
||||
"label": "Invocation Workflow",
|
||||
"sublabel": "parallel · chain · debate · synthesize",
|
||||
"pos": [765, 250],
|
||||
"size": [220, 60],
|
||||
"sources": [
|
||||
{ "path": "runtime/invocation_runtime.py", "line": 696, "label": "Workflow entry" },
|
||||
{ "path": "runtime/invocation_runtime.py", "line": 156, "label": "Single invocation" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "adapters",
|
||||
"type": "messagebus",
|
||||
"label": "Provider Adapters",
|
||||
"sublabel": "shim / ACP · detect · run · poll · cancel",
|
||||
"pos": [1010, 250],
|
||||
"size": [230, 60],
|
||||
"sources": [
|
||||
{ "path": "runtime/adapters/__init__.py", "line": 57, "label": "Adapter registry" },
|
||||
{ "path": "runtime/contracts.py", "line": 77, "label": "Provider contract" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "provider_clis",
|
||||
"type": "external",
|
||||
"label": "Provider CLIs",
|
||||
"sublabel": "Claude · Codex · Pi · 7 more",
|
||||
"pos": [1035, 0],
|
||||
"size": [180, 60]
|
||||
},
|
||||
{
|
||||
"id": "answer_transport",
|
||||
"type": "messagebus",
|
||||
"label": "Answer Transport",
|
||||
"sublabel": "plain · JSON · JSONL · ACP events",
|
||||
"pos": [765, 420],
|
||||
"size": [190, 60],
|
||||
"sources": [
|
||||
{ "path": "runtime/answer_transport.py", "line": 79, "label": "Transport decoders" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "artifacts",
|
||||
"type": "cloud",
|
||||
"label": "Invocation Artifacts",
|
||||
"sublabel": "answers · result.md · run.json",
|
||||
"pos": [1010, 420],
|
||||
"size": [170, 60],
|
||||
"tag": "raw evidence",
|
||||
"sources": [
|
||||
{ "path": "runtime/invocation_artifacts.py", "line": 8, "label": "Artifact writer" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "consumers",
|
||||
"type": "external",
|
||||
"label": "Output Consumers",
|
||||
"sublabel": "terminal · calling agent · CI",
|
||||
"pos": [1005, 520],
|
||||
"size": [180, 60]
|
||||
},
|
||||
{
|
||||
"id": "session_daemon",
|
||||
"type": "backend",
|
||||
"label": "Session Daemon",
|
||||
"sublabel": "detached worker · Unix socket",
|
||||
"pos": [365, 420],
|
||||
"size": [170, 60],
|
||||
"sources": [
|
||||
{ "path": "runtime/session/daemon.py", "line": 50, "label": "Daemon context" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "session_state",
|
||||
"type": "database",
|
||||
"label": "Session State",
|
||||
"sublabel": "state.json · history.jsonl",
|
||||
"pos": [565, 420],
|
||||
"size": [170, 60],
|
||||
"tag": ".mco/sessions",
|
||||
"sources": [
|
||||
{ "path": "runtime/session/state.py", "line": 25, "label": "Session state" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"boundaries": [
|
||||
{
|
||||
"kind": "region",
|
||||
"label": "mco local package / Python runtime",
|
||||
"wraps": ["entry", "router", "config", "policy", "workflow", "adapters", "answer_transport", "artifacts", "session_daemon", "session_state"]
|
||||
},
|
||||
{
|
||||
"kind": "security-group",
|
||||
"label": "explicit execution-policy boundary",
|
||||
"wraps": ["policy", "workflow", "adapters"]
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "caller-entry",
|
||||
"from": "callers",
|
||||
"to": "entry",
|
||||
"variant": "emphasis"
|
||||
},
|
||||
{
|
||||
"id": "entry-route",
|
||||
"from": "entry",
|
||||
"to": "router",
|
||||
"variant": "emphasis"
|
||||
},
|
||||
{
|
||||
"id": "route-policy",
|
||||
"from": "router",
|
||||
"to": "policy",
|
||||
"variant": "security"
|
||||
},
|
||||
{
|
||||
"id": "config-policy",
|
||||
"from": "config",
|
||||
"to": "policy",
|
||||
"variant": "security",
|
||||
"fromSide": "bottom",
|
||||
"toSide": "top"
|
||||
},
|
||||
{
|
||||
"id": "policy-workflow",
|
||||
"from": "policy",
|
||||
"to": "workflow",
|
||||
"variant": "emphasis"
|
||||
},
|
||||
{
|
||||
"id": "workflow-adapters",
|
||||
"from": "workflow",
|
||||
"to": "adapters",
|
||||
"variant": "emphasis"
|
||||
},
|
||||
{
|
||||
"id": "adapters-providers",
|
||||
"from": "adapters",
|
||||
"to": "provider_clis",
|
||||
"label": "native CLI / ACP",
|
||||
"variant": "emphasis",
|
||||
"fromSide": "top",
|
||||
"toSide": "bottom"
|
||||
},
|
||||
{
|
||||
"id": "adapters-answer",
|
||||
"from": "adapters",
|
||||
"to": "answer_transport",
|
||||
"label": "decode events",
|
||||
"labelAt": [995, 365],
|
||||
"fromSide": "bottom",
|
||||
"toSide": "top"
|
||||
},
|
||||
{
|
||||
"id": "answer-artifacts",
|
||||
"from": "answer_transport",
|
||||
"to": "artifacts",
|
||||
"variant": "emphasis"
|
||||
},
|
||||
{
|
||||
"id": "artifacts-consumers",
|
||||
"from": "artifacts",
|
||||
"to": "consumers",
|
||||
"label": "raw answers",
|
||||
"labelAt": [1095, 510],
|
||||
"variant": "emphasis",
|
||||
"fromSide": "bottom",
|
||||
"toSide": "top"
|
||||
},
|
||||
{
|
||||
"id": "router-session",
|
||||
"from": "router",
|
||||
"to": "session_daemon",
|
||||
"label": "start · send · resume",
|
||||
"labelAt": [450, 365],
|
||||
"variant": "dashed",
|
||||
"fromSide": "bottom",
|
||||
"toSide": "top",
|
||||
"route": "straight"
|
||||
},
|
||||
{
|
||||
"id": "session-state",
|
||||
"from": "session_daemon",
|
||||
"to": "session_state",
|
||||
"label": "persist",
|
||||
"labelAt": [550, 406],
|
||||
"variant": "dashed"
|
||||
}
|
||||
],
|
||||
"cards": [
|
||||
{
|
||||
"dot": "cyan",
|
||||
"title": "Source-backed dispatch",
|
||||
"items": [
|
||||
"runtime/cli.py requires an explicit provider or named agent team",
|
||||
"runtime/policy.py validates models, context, permissions, and risk",
|
||||
"runtime/invocation_runtime.py owns parallelism, timeouts, and cancellation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "emerald",
|
||||
"title": "Raw-answer contract",
|
||||
"items": [
|
||||
"Adapters keep each provider CLI behind one shared runtime contract",
|
||||
"answer_transport.py decodes output without inventing findings or consensus",
|
||||
"Artifacts persist answers and run metadata for terminal, agents, or CI"
|
||||
]
|
||||
},
|
||||
{
|
||||
"dot": "violet",
|
||||
"title": "Real repository proof",
|
||||
"items": [
|
||||
"Repository: github.com/mco-org/mco",
|
||||
"Source snapshot: main @ 9f1a1cf",
|
||||
"Evidence read: README, CLI, policy, adapters, invocation runtime, sessions"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"diagram_type": "architecture",
|
||||
"meta": {
|
||||
"title": "Production Deployment Ownership",
|
||||
"output": "examples/production-deployment.html",
|
||||
"visual_preset": "blueprint",
|
||||
"animation": "trace",
|
||||
"quality_profile": "showcase",
|
||||
"engineering_profile": "deployment-ownership"
|
||||
},
|
||||
"components": [
|
||||
{ "id": "clients", "type": "external", "label": "Customers", "sublabel": "web + mobile", "pos": [38, 300], "size": [122, 60] },
|
||||
{ "id": "edge", "type": "cloud", "label": "Global Edge", "sublabel": "CDN + WAF", "pos": [230, 300], "size": [126, 60], "tag": "edge team" },
|
||||
{ "id": "gateway", "type": "security", "label": "API Gateway", "sublabel": "public :443", "pos": [430, 300], "size": [128, 60], "tag": "platform" },
|
||||
{ "id": "api_a", "type": "backend", "label": "API Pods / AZ-a", "sublabel": "private subnet", "pos": [630, 195], "size": [136, 62], "tag": "app team" },
|
||||
{ "id": "api_b", "type": "backend", "label": "API Pods / AZ-b", "sublabel": "private subnet", "pos": [630, 405], "size": [136, 62], "tag": "app team" },
|
||||
{ "id": "redis", "type": "database", "label": "Redis", "sublabel": "multi-AZ cache", "pos": [840, 195], "size": [126, 62], "tag": "platform" },
|
||||
{ "id": "postgres", "type": "database", "label": "PostgreSQL", "sublabel": "primary / encrypted", "pos": [840, 405], "size": [126, 62], "tag": "data team" },
|
||||
{ "id": "events", "type": "messagebus", "label": "Event Bus", "sublabel": "orders.v1", "pos": [1040, 300], "size": [126, 60], "tag": "platform" },
|
||||
{ "id": "worker", "type": "backend", "label": "Workers", "sublabel": "private workload", "pos": [1190, 300], "size": [126, 60], "tag": "app team" },
|
||||
{ "id": "replica", "type": "database", "label": "DR Replica", "sublabel": "eu-west-1", "pos": [1040, 578], "size": [126, 62], "tag": "data team" },
|
||||
{ "id": "audit", "type": "cloud", "label": "Audit Archive", "sublabel": "immutable objects", "pos": [1190, 450], "size": [126, 62], "tag": "security" },
|
||||
{ "id": "observability", "type": "external", "label": "Observability", "sublabel": "metrics + traces", "pos": [1190, 85], "size": [126, 62], "tag": "SRE" }
|
||||
],
|
||||
"boundaries": [
|
||||
{ "kind": "region", "label": "AWS us-east-1 / production", "wraps": ["edge", "gateway", "api_a", "api_b", "redis", "postgres", "events", "worker", "audit"], "pad": 20 },
|
||||
{ "kind": "security-group", "label": "private application network", "wraps": ["api_a", "api_b", "redis", "postgres", "events", "worker"], "pad": 14 },
|
||||
{ "kind": "region", "label": "AWS eu-west-1 / disaster recovery", "wraps": ["replica"] },
|
||||
{ "kind": "security-group", "label": "DR private subnet", "wraps": ["replica"], "pad": 14 }
|
||||
],
|
||||
"connections": [
|
||||
{ "from": "clients", "to": "edge", "label": "HTTPS", "variant": "emphasis" },
|
||||
{ "from": "edge", "to": "gateway", "label": "mTLS", "variant": "security" },
|
||||
{ "from": "gateway", "to": "api_a", "label": "VPC route", "variant": "emphasis", "route": "orthogonal-h", "labelAt": [594, 275] },
|
||||
{ "from": "gateway", "to": "api_b", "label": "VPC route", "variant": "emphasis", "route": "orthogonal-h", "labelAt": [594, 385] },
|
||||
{ "from": "api_a", "to": "redis", "label": "cache", "route": "straight" },
|
||||
{ "from": "api_b", "to": "postgres", "label": "SQL", "route": "straight" },
|
||||
{ "from": "api_a", "to": "events", "label": "publish", "variant": "dashed", "fromSide": "top", "toSide": "top", "via": [[698, 170], [1103, 170]] },
|
||||
{ "from": "api_b", "to": "events", "variant": "dashed", "fromSide": "top", "toSide": "bottom", "via": [[698, 380], [1103, 380]] },
|
||||
{ "from": "events", "to": "worker", "variant": "emphasis" },
|
||||
{ "from": "postgres", "to": "replica", "label": "cross-region WAL", "variant": "security", "route": "orthogonal-v", "labelAt": [1003, 529] },
|
||||
{ "from": "worker", "to": "audit", "label": "evidence", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "labelDy": 58 },
|
||||
{ "from": "worker", "to": "observability", "label": "OTLP", "variant": "dashed", "route": "orthogonal-v" }
|
||||
],
|
||||
"cards": [
|
||||
{ "dot": "cyan", "title": "Runtime Ownership", "items": ["Platform owns the edge, gateway, cache, and event bus", "Application teams own API pods and workers", "Data owns primary and disaster-recovery state"] },
|
||||
{ "dot": "rose", "title": "Named Crossings", "items": ["Public HTTPS terminates at the managed edge", "mTLS crosses into the application network", "Cross-region WAL is explicit and encrypted"] },
|
||||
{ "dot": "emerald", "title": "Operational Evidence", "items": ["Workers emit traces to SRE-owned observability", "Audit evidence lands in immutable storage", "Unknown placement should remain marked, never invented"] }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user