~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0
195 lines · 7.1 KB Raw History
{
	"$type": "place.hud.view",
	"method": "dev.knotless.getThread",
	"app": "knotless",
	"service": "did:web:knotless.dev#knotless_appview",
	"description": "A knotless pull or issue: what it says, its comments and reviews, its checks and files changed (params: { repo: \"at://<handle>/dev.knotless.repo/<name>\", uri: its at-uri, filesOnly: true })",
	"records": [
		{
			"collection": "dev.knotless.issue",
			"params": { "repo": { "$": "value.repo.uri" }, "uri": { "$": "uri" } },
			"activity": { "verb": "Opened", "noun": ["issue", "issues"], "label": { "$": "value.title" } }
		},
		{
			"collection": "dev.knotless.pull",
			"params": { "repo": { "$": "value.repo.uri" }, "uri": { "$": "uri" } },
			"activity": { "verb": "Opened", "noun": ["pull", "pulls"], "label": { "$": "value.title" } }
		},
		{ "collection": "dev.knotless.comment", "params": { "repo": { "$": "value.repo.uri" }, "uri": { "$": "value.subject" } } }
	],
	"origins": ["https://cdn.bsky.app", "https://knotless.dev"],
	"thumbnails": [{ "from": "https://cdn.bsky.app/img/avatar/plain/", "to": "https://cdn.bsky.app/img/avatar_thumbnail/plain/" }],
	"query": {
		"summary": {
			"noun": ["thread", "threads"],
			"label": { "$": "response.item.title" },
			"by": { "$": "response.item.author.handle" },
			"detail": { "count": { "$": "response.comments" }, "noun": ["comment", "comments"] }
		},
		"layout": {
			"component": "Stack",
			"props": { "gap": "md" },
			"children": [
				{
					"component": "Stack",
					"props": { "gap": "sm" },
					"children": [
						{ "component": "Text", "props": { "value": { "$": "response.item.title" }, "style": "heading" } },
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{
									"component": "State",
									"props": {
										"value": { "$": "response.item.state" },
										"of": { "$": "response.item.kind" },
										"roles": { "pull/open": "open-pull", "pull/closed": "closed-pull", "merged": "merged", "issue/open": "open-issue", "issue/closed": "closed-issue" },
										"style": "pill"
									}
								},
								{ "component": "Image", "props": { "src": { "$": "response.item.author.avatar" }, "alt": { "$": "response.item.author.handle" }, "size": "avatar" } },
								{
									"component": "Link",
									"props": {
										"label": { "$": "response.item.author.handle" },
										"href": { "$": "response.item.author.did" }
									}
								},
								{ "component": "Time", "props": { "value": { "$": "response.item.createdAt" } } },
								{
									"component": "Link",
									"props": { "label": "Repository", "open": { "query": "dev.knotless.getRepo", "params": { "repo": { "$": "params.repo" } } } }
								}
							]
						},
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{ "component": "Text", "props": { "value": { "$": "response.base" }, "style": "mono" } },
								{ "component": "Text", "props": { "value": { "$": "response.head.branch" }, "prefix": "← ", "style": "mono" } }
							]
						},
						{
							"component": "List",
							"props": { "items": { "$": "response.item.labels" }, "style": "inline" },
							"children": [
								{ "component": "Label", "props": { "name": { "$": "name" }, "color": { "$": "color" }, "description": { "$": "description" } } }
							]
						}
					]
				},
				{ "component": "RichText", "props": { "value": { "$": "response.body" }, "format": "gfm", "pictures": { "$": "response.item.attachments" } } },
				{
					"component": "List",
					"props": { "items": { "$": "response.reviews" }, "style": "inline", "title": "Reviews", "open": false },
					"children": [
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{ "component": "Image", "props": { "src": { "$": "reviewer.avatar" }, "alt": { "$": "reviewer.handle" }, "size": "avatar" } },
								{ "component": "Text", "props": { "value": { "$": "reviewer.handle" } } },
								{
									"component": "State",
									"props": {
										"value": { "$": "verdict" },
										"roles": { "approve": "success", "changes": "failure" },
										"words": { "approve": "Approved", "changes": "Changes asked" }
									}
								}
							]
						}
					]
				},
				{
					"component": "List",
					"props": { "items": { "$": "response.comments" }, "style": "cards", "title": "Conversation", "open": false },
					"children": [
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{ "component": "Image", "props": { "src": { "$": "author.avatar" }, "alt": { "$": "author.handle" }, "size": "avatar" } },
								{
									"component": "Link",
									"props": {
										"label": { "$": "author.handle" },
										"href": { "$": "author.did" }
									}
								},
								{ "component": "Time", "props": { "value": { "$": "createdAt" } } },
								{
									"component": "State",
									"props": {
										"value": { "$": "verdict" },
										"roles": { "approve": "success", "changes": "failure" },
										"words": { "approve": "Approved", "changes": "Changes asked" }
									}
								}
							]
						},
						{ "component": "Text", "props": { "value": { "$": "line.path" }, "prefix": "On ", "style": "mono" } },
						{ "component": "RichText", "props": { "value": { "$": "body" }, "format": "gfm", "pictures": { "$": "attachments" } } }
					]
				},
				{
					"component": "List",
					"props": { "items": { "$": "response.checks" }, "style": "rows", "title": "Checks" },
					"children": [
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{
									"component": "State",
									"props": {
										"value": { "$": "status" },
										"roles": { "success": "success", "failure": "failure", "error": "failure", "running": "running", "queued": "queued", "cancelled": "skipped" },
										"style": "mark"
									}
								},
								{ "component": "Text", "props": { "value": { "$": "workflow" }, "style": "strong" } },
								{
									"component": "Text",
									"props": {
										"value": { "$": "status" },
										"style": "muted",
										"words": { "success": "Passed", "failure": "Failed", "error": "Could not run", "running": "Running", "queued": "Queued", "cancelled": "Cancelled" }
									}
								},
								{ "component": "Text", "props": { "value": { "$": "commit" }, "chars": 7, "style": "mono" } }
							]
						}
					]
				},
				{
					"component": "List",
					"props": {
						"items": { "$": "response.changes.files" },
						"style": "rows",
						"title": "Files changed",
						"open": {
							"query": "dev.knotless.getPullDiff",
							"params": { "repo": { "$root": "params.repo" }, "uri": { "$root": "params.uri" }, "paths": [{ "$": "old" }, { "$": "new" }] }
						}
					},
					"children": [
						{
							"component": "Diff",
							"props": {
								"path": { "$": "new" },
								"from": { "$": "old" },
								"status": { "$": "status" },
								"added": { "$": "added" },
								"removed": { "$": "removed" },
								"note": { "$": "note" }
							}
						}
					]
				}
			]
		}
	}
}