{
  "id": "com.lattice.codeinbox",
  "name": "Code Inbox",
  "icon": "⌘",
  "color": "#4f46e5",
  "description": "Organize code notification threads in GitHub notifications format.",
  "provenance": "GitHub REST notifications thread response, verified 2026-10-14: https://example.invalid/resource . Adopted id, reason, unread, updated_at, last_read_at, url, subscription_url; repository.full_name/html_url -> repository_full_name/repository_html_url; subject.title/type/url/latest_comment_url -> subject_title/subject_type/subject_url/subject_latest_comment_url. unread is projected from boolean to SQLite 0/1. Thread IDs stay strings; subject URLs remain API URLs. Reason is open text because GitHub adds reasons. Local receive/read/update events and the receive listener are fixture conventions, not GitHub webhooks.",
  "requested_permissions": {
    "storage": [
      "sql"
    ],
    "network": {
      "allowlist": []
    },
    "events": {
      "thread-received": {
        "description": "A notification thread was received.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Notification thread ID."
            },
            "repository_full_name": {
              "type": "string",
              "description": "Repository as owner/repository."
            },
            "repository_html_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Repository browser URL; null means unspecified."
            },
            "subject_title": {
              "type": "string",
              "description": "Discussion title."
            },
            "subject_type": {
              "type": "string",
              "description": "GitHub subject type, e.g. Issue, PullRequest, Commit or Release."
            },
            "subject_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Subject API URL; null means unspecified."
            },
            "subject_latest_comment_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Latest comment API URL; null means unspecified."
            },
            "reason": {
              "type": "string",
              "description": "Notification reason, e.g. mention, review_requested, assign or subscribed."
            },
            "unread": {
              "type": "integer",
              "description": "Unread flag: 0=read, 1=unread.",
              "enum": [
                0,
                1
              ]
            },
            "updated_at": {
              "type": "string",
              "description": "Thread update timestamp, ISO 8601 with timezone."
            },
            "last_read_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "Last-read timestamp, ISO 8601 with timezone; null means never read."
            },
            "url": {
              "type": "string",
              "description": "Notification thread API URL."
            },
            "subscription_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Thread subscription API URL; null means unspecified."
            }
          },
          "required": [
            "id",
            "repository_full_name",
            "subject_title",
            "subject_type",
            "reason",
            "unread",
            "updated_at",
            "url"
          ],
          "additionalProperties": false
        }
      },
      "thread-updated": {
        "description": "A thread received new activity or a changed reason.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Notification thread ID."
            },
            "repository_full_name": {
              "type": "string",
              "description": "Repository as owner/repository."
            },
            "repository_html_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Repository browser URL; null means unspecified."
            },
            "subject_title": {
              "type": "string",
              "description": "Discussion title."
            },
            "subject_type": {
              "type": "string",
              "description": "GitHub subject type, e.g. Issue, PullRequest, Commit or Release."
            },
            "subject_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Subject API URL; null means unspecified."
            },
            "subject_latest_comment_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Latest comment API URL; null means unspecified."
            },
            "reason": {
              "type": "string",
              "description": "Notification reason, e.g. mention, review_requested, assign or subscribed."
            },
            "unread": {
              "type": "integer",
              "description": "Unread flag: 0=read, 1=unread.",
              "enum": [
                0,
                1
              ]
            },
            "updated_at": {
              "type": "string",
              "description": "Thread update timestamp, ISO 8601 with timezone."
            },
            "last_read_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "Last-read timestamp, ISO 8601 with timezone; null means never read."
            },
            "url": {
              "type": "string",
              "description": "Notification thread API URL."
            },
            "subscription_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Thread subscription API URL; null means unspecified."
            }
          },
          "required": [
            "id",
            "repository_full_name",
            "subject_title",
            "subject_type",
            "reason",
            "unread",
            "updated_at",
            "url"
          ],
          "additionalProperties": false
        }
      },
      "thread-read": {
        "description": "A thread was marked read.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Notification thread ID."
            },
            "repository_full_name": {
              "type": "string",
              "description": "Repository as owner/repository."
            },
            "subject_title": {
              "type": "string",
              "description": "Discussion title."
            },
            "last_read_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "Last-read timestamp, ISO 8601 with timezone; null means never read."
            },
            "unread": {
              "type": "integer",
              "description": "Unread flag: 0=read, 1=unread.",
              "enum": [
                0,
                1
              ],
              "const": 0
            }
          },
          "required": [
            "id",
            "subject_title",
            "unread",
            "last_read_at"
          ],
          "additionalProperties": false
        }
      }
    },
    "listeners": {
      "receive-thread": {
        "description": "Import a notification thread if its ID is absent.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Notification thread ID."
            },
            "repository_full_name": {
              "type": "string",
              "description": "Repository as owner/repository."
            },
            "repository_html_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Repository browser URL; omitted or null means unspecified."
            },
            "subject_title": {
              "type": "string",
              "description": "Discussion title."
            },
            "subject_type": {
              "type": "string",
              "description": "GitHub subject type, e.g. Issue, PullRequest, Commit or Release."
            },
            "subject_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Subject API URL; omitted or null means unspecified."
            },
            "subject_latest_comment_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Latest comment API URL; omitted or null means unspecified."
            },
            "reason": {
              "type": "string",
              "description": "Notification reason, e.g. mention, review_requested, assign or subscribed."
            },
            "unread": {
              "type": "integer",
              "description": "Unread flag: 0=read, 1=unread; omitted defaults to 1.",
              "enum": [
                0,
                1
              ]
            },
            "updated_at": {
              "type": "string",
              "description": "Thread update timestamp, ISO 8601 with timezone."
            },
            "last_read_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "Last-read timestamp, ISO 8601 with timezone; omitted or null means never read."
            },
            "url": {
              "type": "string",
              "description": "Notification thread API URL."
            },
            "subscription_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Thread subscription API URL; omitted or null means unspecified."
            }
          },
          "required": [
            "id",
            "repository_full_name",
            "subject_title",
            "subject_type",
            "reason",
            "updated_at",
            "url"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "x-effects": {
    "receive-thread": {
      "table": "threads",
      "emits": "thread-received"
    }
  },
  "source": {
    "assets": [
      "index.html",
      "app.js",
      "app.css",
      "ui.css",
      "emits.js",
      "listens.js"
    ]
  }
}