docs: add macOS download button and anonymous release verification

This commit is contained in:
public-repo-gate
2026-09-13 21:50:03 +03:00
parent dfb97e9069
commit 07aa70b379
13 changed files with 6441 additions and 4832 deletions
+63 -3
View File
@@ -1,5 +1,23 @@
{ {
"schema_version": 1, "schema_version": 1,
"application": {
"downloads": [
{
"id": "macos-arm64",
"platform": "macOS",
"architecture": "Apple Silicon",
"kind": "direct",
"url": "https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg",
"badge": {
"path": "docs/assets/download-macos.png",
"sha256": "687db572c2d1a5fc42684a8c94ec1c4df960c6369616ff0ca10990b553008ae8",
"width": 180
}
}
],
"releases_url": "https://github.com/zarubinvibe/iriz/releases/latest",
"checksums_url": "https://github.com/zarubinvibe/iriz/releases/latest/download/SHA256SUMS.txt"
},
"owner": "zarubinvibe", "owner": "zarubinvibe",
"slug": "iriz", "slug": "iriz",
"license_badge": "MIT", "license_badge": "MIT",
@@ -14,7 +32,21 @@
"en": { "en": {
"title": "iriz", "title": "iriz",
"name": "iriz", "name": "iriz",
"tagline": "Speak out loud and the text appears. Speech recognition runs on your Mac; sending text to an agent is a separate choice.\n\n[![Download for macOS](https://img.shields.io/badge/Download%20for%20macOS-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)\n\nApple Silicon · macOS 14+ · Model download: about 500 MB\n\n[Install & first dictation](docs/DOWNLOAD.md) · [Release notes](https://github.com/zarubinvibe/iriz/releases/latest)\n\nSelf-signed; not notarized by Apple. Intel is not supported by this download.", "tagline": "Speak out loud and the text appears. Speech recognition runs on your Mac; sending text to an agent is a separate choice.",
"application": {
"downloads": {
"macos-arm64": {
"label": "Download for macOS",
"requirements": "macOS 14+ · DMG"
}
},
"setup": "At first launch, choose Download and install Parakeet to download the speech model (about 500 MB).",
"security": "Self-signed; not notarized by Apple. Intel is not supported by this download.",
"guide": {
"label": "Install & first dictation",
"url": "docs/DOWNLOAD.md"
}
},
"hero_alt": "Iris in white marble with marble wings beside the classical column, a gold ribbon of voice landing in the groove of her tablet", "hero_alt": "Iris in white marble with marble wings beside the classical column, a gold ribbon of voice landing in the groove of her tablet",
"what": "This is a Mac app that types for you while you talk.\n\nHere is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: in an email, in a chat, in a search field. Nothing to switch to, no separate window.\n\nWhat sets it apart from similar apps is where the speech is decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your Mac does the work, and the audio never leaves the machine.\n\n**Why «iriz».** Iris was the messenger of the Greek gods and the rainbow — a bridge between the sky and the ground. She does not invent the message, she carries it whole. The name reflects the job: carrying speech into text. Automatic recognition can still mishear words, so check the result.\n\n![The menu bar: status, modes, dictation, meetings, history](docs/assets/shots/menu-en.png)\n\nIt does more. It fixes a phrase typed in the wrong keyboard layout. Correct a word after pasting and the app offers to remember the replacement. Ordinary dictation can remove hesitations and repetitions.\n\nMeetings keep the original recognition text and the audio. The DOCX contains minutes first, then the full available transcript on a new page; the same folder includes JSON and a list of details to check. Filling decisions and action items through your selected agent requires separate consent to send the text. Unknown details stay explicit, and the result remains a draft. [Processing a meeting](docs/MEETINGS.md).\n\n![Meetings: drop the recording, the minutes land next to it](docs/assets/shots/page-meetings.png)\n\n![Iris at a marble table: the laptop screen carries the first screen of the iriz walkthrough](docs/assets/pantheon/desk-firstrun.png)\n", "what": "This is a Mac app that types for you while you talk.\n\nHere is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: in an email, in a chat, in a search field. Nothing to switch to, no separate window.\n\nWhat sets it apart from similar apps is where the speech is decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your Mac does the work, and the audio never leaves the machine.\n\n**Why «iriz».** Iris was the messenger of the Greek gods and the rainbow — a bridge between the sky and the ground. She does not invent the message, she carries it whole. The name reflects the job: carrying speech into text. Automatic recognition can still mishear words, so check the result.\n\n![The menu bar: status, modes, dictation, meetings, history](docs/assets/shots/menu-en.png)\n\nIt does more. It fixes a phrase typed in the wrong keyboard layout. Correct a word after pasting and the app offers to remember the replacement. Ordinary dictation can remove hesitations and repetitions.\n\nMeetings keep the original recognition text and the audio. The DOCX contains minutes first, then the full available transcript on a new page; the same folder includes JSON and a list of details to check. Filling decisions and action items through your selected agent requires separate consent to send the text. Unknown details stay explicit, and the result remains a draft. [Processing a meeting](docs/MEETINGS.md).\n\n![Meetings: drop the recording, the minutes land next to it](docs/assets/shots/page-meetings.png)\n\n![Iris at a marble table: the laptop screen carries the first screen of the iriz walkthrough](docs/assets/pantheon/desk-firstrun.png)\n",
"why": "Anyone who writes for a living loses hours to typing. The same thought comes out faster and whole when spoken: typing, you hunt for words; speaking, you do not.\n\nOne thing gets in the way. Cloud dictation cleans speech better than anything local, but what you said leaves the machine: a client call, a draft, names and figures. For a doctor, a lawyer, a therapist, that trade never pays off.\n\nSo here your Mac does the decoding, and the app reaches the network only when you press the button.\n\n![A marble laptop up close: the iriz dictation history window on its screen](docs/assets/pantheon/desk-history.png)\n", "why": "Anyone who writes for a living loses hours to typing. The same thought comes out faster and whole when spoken: typing, you hunt for words; speaking, you do not.\n\nOne thing gets in the way. Cloud dictation cleans speech better than anything local, but what you said leaves the machine: a client call, a draft, names and figures. For a doctor, a lawyer, a therapist, that trade never pays off.\n\nSo here your Mac does the decoding, and the app reaches the network only when you press the button.\n\n![A marble laptop up close: the iriz dictation history window on its screen](docs/assets/pantheon/desk-history.png)\n",
@@ -116,7 +148,21 @@
"ru": { "ru": {
"title": "iriz", "title": "iriz",
"name": "iriz", "name": "iriz",
"tagline": "Говори вслух, на экране появляется текст. Речь разбирает твой Мак. Передачу текста агенту ты разрешаешь отдельно.\n\n[![Скачать для macOS](https://img.shields.io/badge/%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B4%D0%BB%D1%8F%20macOS-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)\n\nApple Silicon · macOS 14+ · Модель скачивается отдельно: около 500 МБ\n\n[Установка и первая диктовка](docs/DOWNLOAD.ru.md) · [Что изменилось](https://github.com/zarubinvibe/iriz/releases/latest)\n\nСамоподпись, без нотаризации Apple. Этот выпуск не поддерживает Intel.", "tagline": "Говори вслух, на экране появляется текст. Речь разбирает твой Мак. Передачу текста агенту ты разрешаешь отдельно.",
"application": {
"downloads": {
"macos-arm64": {
"label": "Скачать для macOS",
"requirements": "macOS 14+ · DMG"
}
},
"setup": "При первом запуске нажми «Скачать и установить Parakeet»: модель речи скачивается отдельно, около 500 МБ.",
"security": "Самоподпись, без нотаризации Apple. Этот выпуск не поддерживает Intel.",
"guide": {
"label": "Установка и первая диктовка",
"url": "docs/DOWNLOAD.ru.md"
}
},
"hero_alt": "Ирида из белого мрамора с мраморными крыльями у классической колонны, золотая лента голоса ложится в борозду на табличке", "hero_alt": "Ирида из белого мрамора с мраморными крыльями у классической колонны, золотая лента голоса ложится в борозду на табличке",
"what": "Это программа для Мака, которая печатает за тебя, пока ты говоришь.\n\nРаботает так. Ты нажимаешь одну клавишу, говоришь обычным голосом, нажимаешь еще раз. Текст встает туда, где стоял курсор: в письмо, в чат, в поле поиска. Никуда переключаться не нужно, отдельного окна нет.\n\nГлавное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает твой Мак, и звук с машины не уходит.\n\n**Почему «iriz».** Ирида у греков - вестница богов и радуга, мост между небом и землей. Она не сочиняет послание, а доносит его целым. Отсюда и задача программы: переносить речь в текст. Распознавание может ошибаться, поэтому результат нужно проверить.\n\n![Меню в строке меню: состояние, режимы, диктовка, встречи, история](docs/assets/shots/menu-ru.png)\n\nУмеет и другое. Чинит фразу, набранную не в той раскладке. Поправишь слово после вставки, и программа предложит запомнить замену. В обычной диктовке может убрать запинки и повторы.\n\nУ встреч другой порядок: исходная расшифровка не редактируется, звук сохраняется рядом. DOCX содержит сначала протокол, затем полную доступную расшифровку с новой страницы; рядом лежат JSON и список уточнений. Заполнение решений и поручений через выбранного агента требует отдельного согласия на передачу текста. Неизвестные сведения отмечаются явно, результат остается черновиком. [Как обработать встречу](docs/MEETINGS.md).\n\n![Встречи: перенеси запись, рядом ляжет протокол](docs/assets/shots/page-meetings.png)\n\n![Ирида за мраморным столом: на экране ноутбука первый экран знакомства iriz](docs/assets/pantheon/desk-firstrun.png)\n", "what": "Это программа для Мака, которая печатает за тебя, пока ты говоришь.\n\nРаботает так. Ты нажимаешь одну клавишу, говоришь обычным голосом, нажимаешь еще раз. Текст встает туда, где стоял курсор: в письмо, в чат, в поле поиска. Никуда переключаться не нужно, отдельного окна нет.\n\nГлавное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает твой Мак, и звук с машины не уходит.\n\n**Почему «iriz».** Ирида у греков - вестница богов и радуга, мост между небом и землей. Она не сочиняет послание, а доносит его целым. Отсюда и задача программы: переносить речь в текст. Распознавание может ошибаться, поэтому результат нужно проверить.\n\n![Меню в строке меню: состояние, режимы, диктовка, встречи, история](docs/assets/shots/menu-ru.png)\n\nУмеет и другое. Чинит фразу, набранную не в той раскладке. Поправишь слово после вставки, и программа предложит запомнить замену. В обычной диктовке может убрать запинки и повторы.\n\nУ встреч другой порядок: исходная расшифровка не редактируется, звук сохраняется рядом. DOCX содержит сначала протокол, затем полную доступную расшифровку с новой страницы; рядом лежат JSON и список уточнений. Заполнение решений и поручений через выбранного агента требует отдельного согласия на передачу текста. Неизвестные сведения отмечаются явно, результат остается черновиком. [Как обработать встречу](docs/MEETINGS.md).\n\n![Встречи: перенеси запись, рядом ляжет протокол](docs/assets/shots/page-meetings.png)\n\n![Ирида за мраморным столом: на экране ноутбука первый экран знакомства iriz](docs/assets/pantheon/desk-firstrun.png)\n",
"why": "Кто много пишет по работе, тратит на набор часы. Голосом та же мысль выходит быстрее и целее: печатая, человек подбирает слова, говоря, не подбирает.\n\nМешает одно. Облачная диктовка чистит речь лучше любой местной, но наружу уезжает сказанное: разговор с клиентом, черновик документа, имена и суммы. Для врача, юриста, психолога такой обмен не окупается ничем.\n\nПоэтому тут разбирает Мак, а в сеть программа ходит только по твоей кнопке.\n\n![Мраморный ноутбук крупно: на экране окно истории надиктовок iriz](docs/assets/pantheon/desk-history.png)\n", "why": "Кто много пишет по работе, тратит на набор часы. Голосом та же мысль выходит быстрее и целее: печатая, человек подбирает слова, говоря, не подбирает.\n\nМешает одно. Облачная диктовка чистит речь лучше любой местной, но наружу уезжает сказанное: разговор с клиентом, черновик документа, имена и суммы. Для врача, юриста, психолога такой обмен не окупается ничем.\n\nПоэтому тут разбирает Мак, а в сеть программа ходит только по твоей кнопке.\n\n![Мраморный ноутбук крупно: на экране окно истории надиктовок iriz](docs/assets/pantheon/desk-history.png)\n",
@@ -218,7 +264,21 @@
"zh": { "zh": {
"title": "iriz", "title": "iriz",
"name": "iriz", "name": "iriz",
"tagline": "你说出来,屏幕上就有字。语音识别在你的 Mac 上完成;向代理发送文本需要你另行同意。\n\n[![下载 macOS 版](https://img.shields.io/badge/%E4%B8%8B%E8%BD%BD%20macOS%20%E7%89%88-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)\n\nApple Silicon · macOS 14+ · 语音模型需另行下载,约 500 MB\n\n[安装与首次听写](docs/DOWNLOAD.zh.md) · [更新说明](https://github.com/zarubinvibe/iriz/releases/latest)\n\n应用使用自签名,尚未通过 Apple 公证。此下载不支持 Intel。", "tagline": "你说出来,屏幕上就有字。语音识别在你的 Mac 上完成;向代理发送文本需要你另行同意。",
"application": {
"downloads": {
"macos-arm64": {
"label": "下载 macOS 版",
"requirements": "macOS 14+ · DMG"
}
},
"setup": "首次启动时,选择下载并安装 Parakeet。语音模型需另行下载,约 500 MB。",
"security": "应用使用自签名,尚未通过 Apple 公证。此下载不支持 Intel。",
"guide": {
"label": "安装与首次听写",
"url": "docs/DOWNLOAD.zh.md"
}
},
"hero_alt": "白色大理石的伊里斯长着大理石翅膀,站在古典石柱旁,金色的声音丝带落进石板上的凹槽里", "hero_alt": "白色大理石的伊里斯长着大理石翅膀,站在古典石柱旁,金色的声音丝带落进石板上的凹槽里",
"what": "这是一个 Mac 应用:你说话,它替你打字。\n\n用起来是这样。按一下键,用平常的声音说话,再按一下。文字会落在光标原来的位置:邮件里、聊天里、搜索框里。不用切换到别的地方,也没有单独的窗口。\n\n和同类应用最大的区别在于语音在哪里被解码。通常你的声音会被送到别人的服务器,在那里变成文字再回来。这里是你的 Mac 在计算,声音不会离开这台机器。\n\n**为什么叫「iriz」。** 伊里斯是希腊神话里众神的信使,也是彩虹——连接天与地的桥。她不编造消息,只把它完整地带到。这个名字对应的是把语音转成文字的工作。自动识别仍会听错词,结果需要你核查。\n\n![菜单栏:状态、模式、口述、会议、历史](docs/assets/shots/menu-zh.png)\n\n它还会别的。它能修好用错键盘布局打出来的句子。粘贴之后你改了一个词,它会问要不要记住这个替换。普通口述可以去掉犹豫和重复。\n\n会议处理会保留原始识别文本和录音。DOCX 先放纪要,再另起一页放完整的可用转写;同一文件夹还包含 JSON 和待核实事项。通过所选代理填写决策和任务前,会单独征求发送文本的同意。未知信息会明确标注,结果仍是草稿。[会议处理说明](docs/MEETINGS.md)。\n\n![会议:把录音拖进来,纪要会放在旁边](docs/assets/shots/page-meetings.png)\n\n![伊里斯坐在大理石桌前,笔记本屏幕上是 iriz 引导的第一屏](docs/assets/pantheon/desk-firstrun.png)\n", "what": "这是一个 Mac 应用:你说话,它替你打字。\n\n用起来是这样。按一下键,用平常的声音说话,再按一下。文字会落在光标原来的位置:邮件里、聊天里、搜索框里。不用切换到别的地方,也没有单独的窗口。\n\n和同类应用最大的区别在于语音在哪里被解码。通常你的声音会被送到别人的服务器,在那里变成文字再回来。这里是你的 Mac 在计算,声音不会离开这台机器。\n\n**为什么叫「iriz」。** 伊里斯是希腊神话里众神的信使,也是彩虹——连接天与地的桥。她不编造消息,只把它完整地带到。这个名字对应的是把语音转成文字的工作。自动识别仍会听错词,结果需要你核查。\n\n![菜单栏:状态、模式、口述、会议、历史](docs/assets/shots/menu-zh.png)\n\n它还会别的。它能修好用错键盘布局打出来的句子。粘贴之后你改了一个词,它会问要不要记住这个替换。普通口述可以去掉犹豫和重复。\n\n会议处理会保留原始识别文本和录音。DOCX 先放纪要,再另起一页放完整的可用转写;同一文件夹还包含 JSON 和待核实事项。通过所选代理填写决策和任务前,会单独征求发送文本的同意。未知信息会明确标注,结果仍是草稿。[会议处理说明](docs/MEETINGS.md)。\n\n![会议:把录音拖进来,纪要会放在旁边](docs/assets/shots/page-meetings.png)\n\n![伊里斯坐在大理石桌前,笔记本屏幕上是 iriz 引导的第一屏](docs/assets/pantheon/desk-firstrun.png)\n",
"why": "靠写字吃饭的人,每天都有几个小时花在打字上。同一个想法,说出来更快也更完整:打字时人在挑词,说话时不挑。\n\n只有一件事挡在前面。云端听写把口语整理得比任何本地方案都干净,可你说的内容也随之离开了这台机器:和客户的通话、文件草稿、人名和金额。对医生、律师、心理咨询师来说,这笔交换怎么算都不划算。\n\n所以这里由你的 Mac 来识别,只有你按下按钮时,程序才会联网。\n\n![近处的大理石笔记本,屏幕上是 iriz 的口述记录窗口](docs/assets/pantheon/desk-history.png)\n", "why": "靠写字吃饭的人,每天都有几个小时花在打字上。同一个想法,说出来更快也更完整:打字时人在挑词,说话时不挑。\n\n只有一件事挡在前面。云端听写把口语整理得比任何本地方案都干净,可你说的内容也随之离开了这台机器:和客户的通话、文件草稿、人名和金额。对医生、律师、心理咨询师来说,这笔交换怎么算都不划算。\n\n所以这里由你的 Mac 来识别,只有你按下按钮时,程序才会联网。\n\n![近处的大理石笔记本,屏幕上是 iriz 的口述记录窗口](docs/assets/pantheon/desk-history.png)\n",
+40
View File
@@ -0,0 +1,40 @@
name: App download
on:
release:
types: [published]
workflow_dispatch:
push:
branches: [main]
paths:
- 'README.md'
- 'README.ru.md'
- 'README.zh.md'
- '.github/family-page.json'
- 'docs/assets/download-macos.png'
- 'scripts/check_app_download*.mjs'
- '.github/workflows/app-download.yml'
permissions:
contents: read
concurrency:
group: app-download
cancel-in-progress: false
jobs:
verify:
if: github.repository == 'zarubinvibe/iriz' && github.event.repository.visibility == 'public'
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out the selected commit
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check download failure paths offline
run: node scripts/check_app_download.mjs --selftest
- name: Verify the public application download anonymously
run: node scripts/check_app_download.mjs
+6
View File
@@ -13,6 +13,12 @@
| кластеризация VBx | VBx | Apache-2.0 | `THIRD-PARTY/VBx-LICENSE` | через FluidAudio, разбор говорящих | | кластеризация VBx | VBx | Apache-2.0 | `THIRD-PARTY/VBx-LICENSE` | через FluidAudio, разбор говорящих |
| модели разделения голосов | FluidInference / Speaker Diarization CoreML, на основе Pyannote Community-1 | CC-BY-4.0 | [закреплённая карточка модели](https://huggingface.co/FluidInference/speaker-diarization-coreml/blob/1ed7a662fdc7109e36d822db793ee6eebdaf8594/README.md) · [лицензия](https://creativecommons.org/licenses/by/4.0/) | отдельная загрузка по кнопке, не внутри DMG | | модели разделения голосов | FluidInference / Speaker Diarization CoreML, на основе Pyannote Community-1 | CC-BY-4.0 | [закреплённая карточка модели](https://huggingface.co/FluidInference/speaker-diarization-coreml/blob/1ed7a662fdc7109e36d822db793ee6eebdaf8594/README.md) · [лицензия](https://creativecommons.org/licenses/by/4.0/) | отдельная загрузка по кнопке, не внутри DMG |
| шрифт шаблона протокола | PT Serif, ParaType | SIL Open Font License 1.1 | `Sources/IrizDictate/Resources/MeetingMinutes/fonts/OFL.txt` | файлы шрифтов и лицензия внутри ресурсного bundle | | шрифт шаблона протокола | PT Serif, ParaType | SIL Open Font License 1.1 | `Sources/IrizDictate/Resources/MeetingMinutes/fonts/OFL.txt` | файлы шрифтов и лицензия внутри ресурсного bundle |
| кнопка скачивания для macOS | MonitorControl, `.github/macos_badge_noborder.png` | MIT проекта | `THIRD-PARTY/MonitorControl-LICENSE` | только README, не внутри приложения |
Кнопка `docs/assets/download-macos.png` скопирована без изменений из
[MonitorControl](https://github.com/MonitorControl/MonitorControl/blob/2c2b7cea67e89db56c311c209ecc60dda6bbbd22/.github/macos_badge_noborder.png).
SHA-256: `687db572c2d1a5fc42684a8c94ec1c4df960c6369616ff0ca10990b553008ae8`.
Это ссылка на DMG проекта, не на App Store и не знак одобрения Apple.
Модели голосов закреплены на ревизии `1ed7a662fdc7109e36d822db793ee6eebdaf8594`; Модели голосов закреплены на ревизии `1ed7a662fdc7109e36d822db793ee6eebdaf8594`;
приложение проверяет исходные байты по размеру и SHA-256 и не изменяет веса. приложение проверяет исходные байты по размеру и SHA-256 и не изменяет веса.
+15 -8
View File
@@ -2,14 +2,6 @@
Speak out loud and the text appears. Speech recognition runs on your Mac; sending text to an agent is a separate choice. Speak out loud and the text appears. Speech recognition runs on your Mac; sending text to an agent is a separate choice.
[![Download for macOS](https://img.shields.io/badge/Download%20for%20macOS-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)
Apple Silicon · macOS 14+ · Model download: about 500 MB
[Install & first dictation](docs/DOWNLOAD.md) · [Release notes](https://github.com/zarubinvibe/iriz/releases/latest)
Self-signed; not notarized by Apple. Intel is not supported by this download.
[Русский](README.ru.md) · [中文](README.zh.md) [Русский](README.ru.md) · [中文](README.zh.md)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family)
@@ -41,6 +33,21 @@ Self-signed; not notarized by Apple. Intel is not supported by this download.
- [Limits](#limits) - [Limits](#limits)
- [Star And Contribute](#star-and-contribute) - [Star And Contribute](#star-and-contribute)
<!-- application-downloads:start -->
<p align="center"><a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg"><img src="docs/assets/download-macos.png" alt="Download for macOS" width="180"></a><br>
<a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg">Download for macOS</a> · Direct download</p>
<p align="center">macOS · Apple Silicon — macOS 14+ · DMG</p>
<p align="center">Setup: At first launch, choose Download and install Parakeet to download the speech model (about 500 MB).</p>
<p align="center">Security: Self-signed; not notarized by Apple. Intel is not supported by this download.</p>
<p align="center"><a href="docs/DOWNLOAD.md">Install &#38; first dictation</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest">All releases</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest/download/SHA256SUMS.txt">Checksums</a></p>
<!-- application-downloads:end -->
<!-- beginner-readme:start --> <!-- beginner-readme:start -->
## What This Is ## What This Is
+15 -8
View File
@@ -2,14 +2,6 @@
Говори вслух, на экране появляется текст. Речь разбирает твой Мак. Передачу текста агенту ты разрешаешь отдельно. Говори вслух, на экране появляется текст. Речь разбирает твой Мак. Передачу текста агенту ты разрешаешь отдельно.
[![Скачать для macOS](https://img.shields.io/badge/%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B4%D0%BB%D1%8F%20macOS-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)
Apple Silicon · macOS 14+ · Модель скачивается отдельно: около 500 МБ
[Установка и первая диктовка](docs/DOWNLOAD.ru.md) · [Что изменилось](https://github.com/zarubinvibe/iriz/releases/latest)
Самоподпись, без нотаризации Apple. Этот выпуск не поддерживает Intel.
[English](README.md) · [中文](README.zh.md) [English](README.md) · [中文](README.zh.md)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family)
@@ -41,6 +33,21 @@ Apple Silicon · macOS 14+ · Модель скачивается отдельн
- [Ограничения](#ограничения) - [Ограничения](#ограничения)
- [Звезда и вклад](#звезда-и-вклад) - [Звезда и вклад](#звезда-и-вклад)
<!-- application-downloads:start -->
<p align="center"><a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg"><img src="docs/assets/download-macos.png" alt="Скачать для macOS" width="180"></a><br>
<a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg">Скачать для macOS</a> · Прямая загрузка</p>
<p align="center">macOS · Apple Silicon — macOS 14+ · DMG</p>
<p align="center">Настройка: При первом запуске нажми «Скачать и установить Parakeet»: модель речи скачивается отдельно, около 500 МБ.</p>
<p align="center">Безопасность: Самоподпись, без нотаризации Apple. Этот выпуск не поддерживает Intel.</p>
<p align="center"><a href="docs/DOWNLOAD.ru.md">Установка и первая диктовка</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest">Все версии</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest/download/SHA256SUMS.txt">Контрольные суммы</a></p>
<!-- application-downloads:end -->
<!-- beginner-readme:start --> <!-- beginner-readme:start -->
## Что это ## Что это
+15 -8
View File
@@ -2,14 +2,6 @@
你说出来,屏幕上就有字。语音识别在你的 Mac 上完成;向代理发送文本需要你另行同意。 你说出来,屏幕上就有字。语音识别在你的 Mac 上完成;向代理发送文本需要你另行同意。
[![下载 macOS 版](https://img.shields.io/badge/%E4%B8%8B%E8%BD%BD%20macOS%20%E7%89%88-111111?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg)
Apple Silicon · macOS 14+ · 语音模型需另行下载,约 500 MB
[安装与首次听写](docs/DOWNLOAD.zh.md) · [更新说明](https://github.com/zarubinvibe/iriz/releases/latest)
应用使用自签名,尚未通过 Apple 公证。此下载不支持 Intel。
[English](README.md) · [Русский](README.ru.md) [English](README.md) · [Русский](README.ru.md)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Stars](https://img.shields.io/github/stars/zarubinvibe/iriz?style=flat&color=C9A87A)](https://github.com/zarubinvibe/iriz/stargazers) [![Status](https://img.shields.io/badge/status-working-brightgreen.svg)](https://github.com/zarubinvibe/iriz) [![Olympuz](https://img.shields.io/badge/olympuz-family-B8D6EA.svg)](https://github.com/zarubinvibe/athena#olympuz-family)
@@ -41,6 +33,21 @@ Apple Silicon · macOS 14+ · 语音模型需另行下载,约 500 MB
- [局限](#局限) - [局限](#局限)
- [点亮星标与参与](#点亮星标与参与) - [点亮星标与参与](#点亮星标与参与)
<!-- application-downloads:start -->
<p align="center"><a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg"><img src="docs/assets/download-macos.png" alt="下载 macOS 版" width="180"></a><br>
<a href="https://github.com/zarubinvibe/iriz/releases/latest/download/iriz-macos-arm64.dmg">下载 macOS 版</a> · 直接下载</p>
<p align="center">macOS · Apple Silicon — macOS 14+ · DMG</p>
<p align="center">设置: 首次启动时,选择下载并安装 Parakeet。语音模型需另行下载,约 500 MB。</p>
<p align="center">安全: 应用使用自签名,尚未通过 Apple 公证。此下载不支持 Intel。</p>
<p align="center"><a href="docs/DOWNLOAD.zh.md">安装与首次听写</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest">所有版本</a> · <a href="https://github.com/zarubinvibe/iriz/releases/latest/download/SHA256SUMS.txt">校验和</a></p>
<!-- application-downloads:end -->
<!-- beginner-readme:start --> <!-- beginner-readme:start -->
## 这是什么 ## 这是什么
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright © 2017
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+10
View File
@@ -62,6 +62,16 @@ A maintainer reviews the draft, the release notes and a clean-machine install, r
Before publishing, check the DMG after downloading it from the draft: mount it, verify its signature, launch a copied app in English and Chinese, and complete the permissions/model/first-dictation flow. Check the public asset hashes against the local output. Do not report a microphone or Intel test that was not performed. Before publishing, check the DMG after downloading it from the draft: mount it, verify its signature, launch a copied app in English and Chinese, and complete the permissions/model/first-dictation flow. Check the public asset hashes against the local output. Do not report a microphone or Intel test that was not performed.
After publication, **App download** checks the README buttons and downloads all four public release files without authentication. It also runs after relevant changes on `main` and through **Run workflow**. Run the same checks locally with Node 22.15 or newer:
```bash
node scripts/check_app_download.mjs --selftest
node scripts/check_app_download.mjs --local
node scripts/check_app_download.mjs
```
The live check follows the stable URL, verifies both complete DMGs against GitHub's asset sizes and digests, the manifest and `SHA256SUMS.txt`, and checks the manifest source against the release tag. It rejects unexpected files, HTML responses, truncated downloads and changes to Latest during the check. Requests use fixed GitHub hosts, at most five redirects, two attempts and a ten-minute total deadline; DMGs stream through SHA-256 without writing local files. A passing run confirms anonymous download integrity. Installation, signatures, permissions and first dictation still need the macOS checks above.
## Developer ID and notarization ## Developer ID and notarization
Current public builds are not notarized. A self-signed or ad-hoc signature is not an Apple Developer ID signature. Neither proves that Apple has reviewed the app. Current public builds are not notarized. A self-signed or ad-hoc signature is not an Apple Developer ID signature. Neither proves that Apple has reviewed the app.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff
+5194 -4360
View File
File diff suppressed because it is too large Load Diff
+332
View File
@@ -0,0 +1,332 @@
#!/usr/bin/env node
// Anonymous, read-only verification. Downloaded content is never executed or saved.
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { readFile, realpath, stat } from 'node:fs/promises';
import { dirname, resolve, sep } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { crc32, inflateSync } from 'node:zlib';
export const REPO = 'zarubinvibe/iriz';
export const API = `https://api.github.com/repos/${REPO}`;
export const DOWNLOAD = `https://github.com/${REPO}/releases`;
export const STABLE = `${DOWNLOAD}/latest/download/iriz-macos-arm64.dmg`;
const HOSTS = new Set(['github.com', 'api.github.com', 'release-assets.githubusercontent.com']);
const META_LIMIT = 1024 * 1024;
const DMG_LIMIT = 512 * 1024 * 1024;
const HASH = /^[a-f0-9]{64}$/;
const SHA = /^[a-f0-9]{40}$/;
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
const LOCALES = [['README.md', 'What This Is', 'Contents'], ['README.ru.md', 'Что это', 'Оглавление'], ['README.zh.md', '这是什么', '目录']];
export const sha256 = bytes => createHash('sha256').update(bytes).digest('hex');
const requireThat = (condition, message) => { if (!condition) throw new Error(message); };
const sameNames = (actual, expected, label) => {
requireThat(Array.isArray(actual) && actual.length === expected.length &&
new Set(actual).size === actual.length && expected.every(name => actual.includes(name)), `${label}: wrong or duplicate filenames`);
};
export function trustedURL(value) {
let url;
try { url = new URL(value); } catch { throw new Error('Invalid download URL'); }
requireThat(url.protocol === 'https:' && HOSTS.has(url.hostname) && !url.username &&
!url.password && !url.port && !url.hash, 'Untrusted download URL');
return url;
}
export async function request(url, {
fetchImpl = globalThis.fetch, maxBytes = META_LIMIT, expectedBytes,
capture = true, dmg = false, timeoutMs = 180_000, deadline = Date.now() + 600_000,
attempts = 2, retryDelayMs = 1000,
} = {}) {
trustedURL(url);
requireThat(Number.isInteger(attempts) && attempts >= 1 && attempts <= 2, 'Invalid retry bound');
let lastError;
for (let attempt = 0; attempt < attempts; attempt++) {
const controller = new AbortController();
const remaining = Math.min(timeoutMs, deadline - Date.now());
requireThat(remaining > 0, 'Download verification deadline exceeded');
const timer = setTimeout(() => controller.abort(), remaining);
let response;
try {
let current = url;
const redirects = [];
for (let hop = 0; hop <= 5; hop++) {
trustedURL(current);
try {
response = await fetchImpl(current, {
redirect: 'manual', credentials: 'omit', signal: controller.signal,
headers: { Accept: 'application/octet-stream, application/json',
'Accept-Encoding': 'identity', 'Cache-Control': 'no-cache',
'User-Agent': 'iriz-anonymous-download-check' },
});
} catch {
const error = new Error(controller.signal.aborted ? 'Download request timed out' : 'Anonymous network request failed');
error.retryable = true;
throw error;
}
if (![301, 302, 303, 307, 308].includes(response.status)) break;
await response.body?.cancel();
requireThat(hop < 5, 'Too many download redirects');
const location = response.headers.get('location');
requireThat(location, 'Redirect has no Location');
current = trustedURL(new URL(location, current).href).href;
redirects.push(current);
}
if (response.status !== 200) {
const quota = response.status === 403 && response.headers.get('x-ratelimit-remaining') === '0';
const error = new Error(quota ? 'Anonymous GitHub API rate limit exhausted; download integrity is unverified' : `Anonymous HTTP request returned ${response.status}`);
error.retryable = response.status === 429 || response.status >= 500;
throw error;
}
requireThat(!/html/i.test(response.headers.get('content-type') || ''), 'HTML returned instead of a release file');
requireThat(!response.headers.get('content-encoding') || response.headers.get('content-encoding') === 'identity', 'Unexpected content encoding');
const length = response.headers.get('content-length');
if (length !== null) {
requireThat(/^\d+$/.test(length) && Number.isSafeInteger(Number(length)) && Number(length) <= maxBytes, 'Invalid or oversized Content-Length');
if (expectedBytes !== undefined) requireThat(Number(length) === expectedBytes, 'Content-Length differs from asset size');
}
requireThat(response.body, 'Empty response body');
const hash = createHash('sha256');
const chunks = [];
let bytes = 0;
let prefix = Buffer.alloc(0);
let tail = Buffer.alloc(0);
try {
for await (const part of response.body) {
const chunk = Buffer.from(part);
bytes += chunk.length;
requireThat(bytes <= maxBytes && (expectedBytes === undefined || bytes <= expectedBytes), 'Response body exceeds its size limit');
if (prefix.length < 512) prefix = Buffer.concat([prefix, chunk.subarray(0, 512 - prefix.length)]);
requireThat(!/^\s*<(?:!doctype\s+html|html|head|body)\b/i.test(prefix.toString('utf8')), 'HTML returned instead of a release file');
hash.update(chunk);
if (capture) chunks.push(chunk);
if (dmg) tail = Buffer.concat([tail, chunk]).subarray(-512);
}
} catch (error) {
if (controller.signal.aborted) {
const timeout = new Error('Download body timed out');
timeout.retryable = true;
throw timeout;
}
throw error;
}
requireThat(bytes > 0, 'Empty response body');
requireThat(length === null || bytes === Number(length), 'Truncated response body');
requireThat(expectedBytes === undefined || bytes === expectedBytes, 'Downloaded size differs from release metadata');
if (dmg) requireThat(bytes >= 512 && tail.subarray(0, 4).toString('ascii') === 'koly', 'Invalid DMG trailer');
return { bytes, sha256: hash.digest('hex'), body: capture ? Buffer.concat(chunks) : undefined, redirects };
} catch (error) {
lastError = error;
if (!error.retryable || attempt + 1 === attempts || Date.now() + retryDelayMs >= deadline) throw error;
} finally {
clearTimeout(timer);
controller.abort();
}
await new Promise(done => setTimeout(done, retryDelayMs));
}
throw lastError;
}
function json(bytes, label) {
try { return JSON.parse(bytes.toString('utf8')); } catch { throw new Error(`${label}: invalid JSON`); }
}
export function releaseSnapshot(release) {
requireThat(release && Number.isSafeInteger(release.id) && release.id > 0 &&
release.draft === false && release.prerelease === false && /^v\d+\.\d+\.\d+$/.test(release.tag_name), 'Invalid latest release metadata');
const version = release.tag_name.slice(1);
const names = [`iriz-${version}-arm64.dmg`, 'iriz-macos-arm64.dmg', 'release-manifest.json', 'SHA256SUMS.txt'];
sameNames(release.assets?.map(asset => asset.name), names, 'Release assets');
const assets = names.map(name => {
const asset = release.assets.find(item => item.name === name);
requireThat(Number.isSafeInteger(asset.id) && asset.id > 0 && asset.state === 'uploaded' &&
Number.isSafeInteger(asset.size) && asset.size > 0 && asset.size <= (name.endsWith('.dmg') ? DMG_LIMIT : META_LIMIT), `Invalid asset metadata: ${name}`);
requireThat(/^sha256:[a-f0-9]{64}$/.test(asset.digest), `Missing or invalid GitHub digest: ${name}`);
const url = `${DOWNLOAD}/download/${release.tag_name}/${name}`;
requireThat(asset.browser_download_url === url, `Unexpected asset URL: ${name}`);
return { name, id: asset.id, size: asset.size, digest: asset.digest.slice(7), url, updated_at: asset.updated_at };
});
return { id: release.id, tag: release.tag_name, version, assets };
}
export function checksums(bytes, expected) {
const result = new Map();
const lines = bytes.toString('utf8').split(/\r?\n/);
if (lines.at(-1) === '') lines.pop();
for (const line of lines) {
const match = /^([a-f0-9]{64}) ([a-zA-Z0-9._-]+)$/.exec(line);
requireThat(match && expected.includes(match[2]) && !result.has(match[2]), 'Invalid, duplicate or unexpected checksum filename');
result.set(match[2], match[1]);
}
sameNames([...result.keys()], expected, 'Checksums');
return result;
}
export function validateManifest(manifest, snapshot, downloaded) {
requireThat(manifest?.version === snapshot.version && manifest.source_dirty === false && SHA.test(manifest.source_sha), 'Manifest version/source is invalid');
const images = snapshot.assets.filter(asset => asset.name.endsWith('.dmg'));
sameNames(manifest.artifacts?.map(item => item.file), images.map(item => item.name), 'Manifest artifacts');
for (const asset of images) {
const item = manifest.artifacts.find(entry => entry.file === asset.name);
requireThat(item.bytes === asset.size && item.sha256 === downloaded.get(asset.name).sha256 &&
Array.isArray(item.architectures) && item.architectures.length === 1 && item.architectures[0] === 'arm64', `Manifest artifact differs: ${asset.name}`);
}
// v0.2.2 was accepted independently; later documentation edits must not rewrite it.
if (snapshot.version === '0.2.2') {
requireThat(manifest.source_sha === 'dfb97e9069682da2ec9cc2dd4edce7e61ae051f6', 'Frozen v0.2.2 source changed');
for (const image of images) requireThat(downloaded.get(image.name).sha256 ===
'bbfa8c6f2e5988e087ef5e1f255f0a477b152cf108aaccf299f0cb60d95a1110', 'Frozen v0.2.2 image changed');
}
}
export async function verifyRelease(options = {}) {
const deadline = Date.now() + 600_000;
const get = (url, extra = {}) => request(url, { ...options, deadline, ...extra });
const getJSON = async url => json((await get(url, { timeoutMs: 30_000 })).body, 'GitHub API');
const snapshot = releaseSnapshot(await getJSON(`${API}/releases/latest`));
const downloaded = new Map();
for (const asset of snapshot.assets) {
const stable = asset.name === 'iriz-macos-arm64.dmg';
const result = await get(stable ? STABLE : asset.url, {
maxBytes: asset.name.endsWith('.dmg') ? DMG_LIMIT : META_LIMIT,
expectedBytes: asset.size, capture: !asset.name.endsWith('.dmg'), dmg: asset.name.endsWith('.dmg'),
});
requireThat(!stable || result.redirects.includes(asset.url), 'Stable URL resolved to another release');
requireThat(result.sha256 === asset.digest, `GitHub SHA-256 mismatch: ${asset.name}`);
downloaded.set(asset.name, result);
}
const versioned = downloaded.get(`iriz-${snapshot.version}-arm64.dmg`);
const stable = downloaded.get('iriz-macos-arm64.dmg');
requireThat(stable.sha256 === versioned.sha256 && stable.bytes === versioned.bytes, 'Stable and versioned images differ');
const expectedSums = snapshot.assets.map(asset => asset.name).filter(name => name !== 'SHA256SUMS.txt');
for (const [name, hash] of checksums(downloaded.get('SHA256SUMS.txt').body, expectedSums))
requireThat(downloaded.get(name).sha256 === hash, `SHA256SUMS mismatch: ${name}`);
const manifest = json(downloaded.get('release-manifest.json').body, 'Manifest');
validateManifest(manifest, snapshot, downloaded);
const ref = await getJSON(`${API}/git/ref/tags/${snapshot.tag}`);
requireThat(ref.ref === `refs/tags/${snapshot.tag}`, 'Release tag ref differs');
let object = ref.object;
for (let depth = 0; object?.type === 'tag' && depth < 3; depth++) {
requireThat(SHA.test(object.sha), 'Invalid annotated tag SHA');
const tag = await getJSON(`${API}/git/tags/${object.sha}`);
requireThat(tag.sha === object.sha, 'Annotated tag SHA differs');
object = tag.object;
}
requireThat(object?.type === 'commit' && object.sha === manifest.source_sha, 'Release tag does not resolve to manifest source');
const commit = await getJSON(`${API}/commits/${manifest.source_sha}`);
requireThat(commit.sha === manifest.source_sha, 'Manifest source commit does not exist');
const finalSnapshot = releaseSnapshot(await getJSON(`${API}/releases/latest`));
requireThat(JSON.stringify(snapshot) === JSON.stringify(finalSnapshot), 'Latest release changed during verification; rerun against a stable release');
return { version: snapshot.version, source_sha: manifest.source_sha, bytes: stable.bytes, sha256: stable.sha256 };
}
function attribute(tag, name) {
return new RegExp(`(?:^|\\s)${name}\\s*=\\s*(["'])(.*?)\\1`, 'i').exec(tag)?.[2];
}
export function validateReadme(text, filename, heading, badgePath) {
const start = '<!-- application-downloads:start -->';
const end = '<!-- application-downloads:end -->';
// Check rendered content, including whether the entire block was commented out.
text = text.replace(/<!--[\s\S]*?-->/g, comment => [start, end].includes(comment) ? comment : '');
let fence;
text = text.split('\n').filter(line => {
const marker = /^ {0,3}(`{3,}|~{3,})(.*)$/.exec(line);
if (fence) {
if (marker && marker[1][0] === fence[0] && marker[1].length >= fence.length && !marker[2].trim()) fence = undefined;
return false;
}
if (marker) { fence = marker[1]; return false; }
return !/^(?: {4}|\t)/.test(line);
}).join('\n').replace(/<(pre|code)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/gi, '');
requireThat(text.split(start).length === 2 && text.split(end).length === 2, `${filename}: one application download block required`);
const from = text.indexOf(start), to = text.indexOf(end);
const what = text.indexOf(`\n## ${heading}\n`);
const contents = text.indexOf(`\n## ${LOCALES.find(([name]) => name === filename)?.[2]}\n`);
requireThat(contents >= 0 && contents < from && from < to && what > to, `${filename}: application download must follow Contents and precede ${heading}`);
const block = text.slice(from + start.length, to);
const images = [...block.matchAll(/<a\b([^>]*)>([\s\S]*?)<\/a>/gi)]
.filter(match => /<img\b/i.test(match[2]));
requireThat(images.length === 1 && attribute(images[0][1], 'href') === STABLE,
`${filename}: one linked application badge required`);
const image = /<img\b([^>]*)>/i.exec(images[0][2]);
requireThat(image && attribute(image[1], 'src') === badgePath && attribute(image[1], 'alt')?.trim() &&
attribute(image[1], 'width') === '180', `${filename}: application badge image/alt/width differs`);
const oldShield = /\[!\[[^\]]*\]\(https:\/\/img\.shields\.io\/[^\n]*\)\]\(https:\/\/github\.com\/zarubinvibe\/iriz\/releases\/latest\/download\/iriz-macos-arm64\.dmg\)/;
requireThat(!oldShield.test(text), `${filename}: obsolete Shields download CTA remains`);
for (const match of text.matchAll(/<a\b([^>]*)>([\s\S]*?)<\/a>/gi)) {
if (attribute(match[1], 'href') === STABLE && /<img\b/i.test(match[2]))
requireThat(match.index > from && match.index < to, `${filename}: application badge outside its block`);
}
}
export function validateBadgePNG(png) {
requireThat(png.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])), 'Invalid badge PNG signature');
const compressed = [];
let width, height, ended = false;
for (let offset = 8; offset < png.length;) {
requireThat(offset + 12 <= png.length, 'Truncated badge PNG chunk');
const length = png.readUInt32BE(offset), type = png.toString('ascii', offset + 4, offset + 8);
const end = offset + length + 12;
requireThat(end <= png.length, 'Truncated badge PNG data');
requireThat(crc32(png.subarray(offset + 4, end - 4)) === png.readUInt32BE(end - 4), 'Badge PNG chunk checksum differs');
if (offset === 8) requireThat(type === 'IHDR', 'Badge PNG has no IHDR');
if (type === 'IHDR') {
requireThat(offset === 8 && length === 13, 'Invalid badge PNG IHDR');
width = png.readUInt32BE(offset + 8); height = png.readUInt32BE(offset + 12);
// ponytail: the approved badge is RGBA8 without interlacing; extend only for a redesigned asset.
requireThat(width > 0 && height > 0 && width * height <= 4_000_000 &&
png.subarray(offset + 16, offset + 21).equals(Buffer.from([8, 6, 0, 0, 0])), 'Unsupported badge PNG dimensions/format');
} else if (type === 'IDAT') compressed.push(png.subarray(offset + 8, end - 4));
else if (type === 'IEND') {
requireThat(length === 0 && end === png.length, 'Invalid badge PNG ending');
ended = true;
} else requireThat(/^[a-z]/.test(type) || type === 'PLTE', 'Unknown critical badge PNG chunk');
offset = end;
}
requireThat(ended && compressed.length > 0, 'Incomplete badge PNG');
const stride = width * 4 + 1, expected = stride * height;
const pixels = inflateSync(Buffer.concat(compressed), { maxOutputLength: expected });
requireThat(pixels.length === expected, 'Badge PNG pixel data is truncated');
for (let row = 0; row < height; row++) requireThat(pixels[row * stride] <= 4, 'Invalid badge PNG row filter');
}
export async function verifyReadmes(root = ROOT) {
const base = await realpath(root);
const read = async (path, limit = META_LIMIT) => {
const absolute = await realpath(resolve(base, path));
requireThat(absolute.startsWith(`${base}${sep}`), 'Local asset escapes checkout');
const info = await stat(absolute);
requireThat(info.isFile() && info.size > 0 && info.size <= limit, `Invalid local file: ${path}`);
return readFile(absolute);
};
const config = json(await read('.github/family-page.json'), 'Family page');
requireThat(config.owner === 'zarubinvibe' && config.slug === 'iriz', 'Unexpected family page repository');
const downloads = config.application?.downloads;
requireThat(Array.isArray(downloads) && downloads.length === 1 && downloads[0].id === 'macos-arm64' &&
downloads[0].kind === 'direct' && downloads[0].url === STABLE, 'Application download configuration differs');
const badge = downloads[0].badge;
requireThat(badge && /^docs\/assets\/(?:[a-zA-Z0-9_-]+\/)*[a-zA-Z0-9_-]+\.png$/.test(badge.path) && HASH.test(badge.sha256) && badge.width === 180, 'Invalid application badge configuration');
const png = await read(badge.path, 8 * META_LIMIT);
requireThat(sha256(png) === badge.sha256, 'Application badge hash differs');
validateBadgePNG(png);
for (const [filename, heading] of LOCALES)
validateReadme((await read(filename)).toString('utf8'), filename, heading, badge.path);
return LOCALES.map(([filename]) => filename);
}
async function main() {
const args = process.argv.slice(2);
assert(args.length <= 1 && (!args.length || ['--selftest', '--local'].includes(args[0])), 'Usage: node scripts/check_app_download.mjs [--selftest|--local]');
if (args[0] === '--selftest') return (await import('./check_app_download_test.mjs')).selftest();
const readmes = await verifyReadmes();
console.log(`PASS: application download CTA in ${readmes.join(', ')}`);
if (args[0] === '--local') return;
console.log('Checking the public release anonymously (maximum 10 minutes).');
const result = await verifyRelease();
console.log(`PASS: v${result.version}, ${result.bytes} bytes per DMG, SHA-256 ${result.sha256}, source ${result.source_sha}`);
console.log('Download integrity verified. macOS installation, signature, permissions and dictation require separate checks.');
}
if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href)
main().catch(error => { console.error(`FAIL: ${error.message}`); process.exitCode = 1; });
+220
View File
@@ -0,0 +1,220 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import { crc32, deflateSync } from 'node:zlib';
import { API, DOWNLOAD, STABLE, sha256, trustedURL, request, releaseSnapshot,
checksums, validateManifest, validateReadme, validateBadgePNG, verifyRelease } from './check_app_download.mjs';
function fixture() {
const version = '9.8.7';
const source = 'a'.repeat(40);
const dmg = Buffer.alloc(768, 7);
dmg.write('koly', dmg.length - 512);
const images = [`iriz-${version}-arm64.dmg`, 'iriz-macos-arm64.dmg'];
const manifest = { version, source_sha: source, source_dirty: false,
artifacts: images.map(file => ({ file, bytes: dmg.length, sha256: sha256(dmg), architectures: ['arm64'] })) };
const files = new Map(images.map(name => [name, dmg]));
files.set('release-manifest.json', Buffer.from(JSON.stringify(manifest)));
files.set('SHA256SUMS.txt', Buffer.from([...files].map(([name, bytes]) => `${sha256(bytes)} ${name}\n`).join('')));
const release = { id: 123, tag_name: `v${version}`, draft: false, prerelease: false,
assets: [...files].map(([name, bytes], index) => ({ name, id: index + 1, state: 'uploaded',
size: bytes.length, digest: `sha256:${sha256(bytes)}`, browser_download_url: `${DOWNLOAD}/download/v${version}/${name}` })) };
const calls = [];
let latestReads = 0;
const data = { files, release, manifest, calls, source, version, changeLatest: false, annotated: false };
data.fetchImpl = async (url, options) => {
calls.push(url);
assert.equal(options.credentials, 'omit');
assert.equal(options.redirect, 'manual');
assert.equal(options.headers.Authorization, undefined);
assert.equal(options.headers.Cookie, undefined);
assert.equal(options.headers['Accept-Encoding'], 'identity');
const response = bytes => new Response(bytes, { headers: { 'content-length': String(Buffer.byteLength(bytes)) } });
const json = object => response(JSON.stringify(object));
if (url === `${API}/releases/latest`) {
latestReads++;
return json(data.changeLatest && latestReads > 1 ? { ...release, id: 124 } : release);
}
if (url === `${API}/git/ref/tags/v${version}`) return json({ ref: `refs/tags/v${version}`,
object: { type: data.annotated ? 'tag' : 'commit', sha: data.annotated ? 'b'.repeat(40) : source } });
if (url === `${API}/git/tags/${'b'.repeat(40)}`) return json({ sha: 'b'.repeat(40), object: { type: 'commit', sha: source } });
if (url === `${API}/commits/${source}`) return json({ sha: source });
if (url === STABLE) return new Response(null, { status: 302,
headers: { location: `${DOWNLOAD}/download/v${version}/iriz-macos-arm64.dmg` } });
if (url.startsWith(`${DOWNLOAD}/download/v${version}/`)) return new Response(null, { status: 302,
headers: { location: `https://release-assets.githubusercontent.com/fixture/${url.split('/').at(-1)}?signature=private-in-logs` } });
if (url.startsWith('https://release-assets.githubusercontent.com/fixture/')) {
const name = new URL(url).pathname.split('/').at(-1);
const body = files.get(name);
return body ? response(body) : new Response(null, { status: 404 });
}
throw new Error(`Unexpected fixture URL: ${url}`);
};
return data;
}
export async function selftest() {
let passed = 0;
const test = async (name, work) => {
try { await work(); passed++; }
catch (error) { throw new Error(`Selftest ${name}: ${error.message}`); }
};
const run = data => verifyRelease({ fetchImpl: data.fetchImpl, retryDelayMs: 0 });
const reject = async (data, pattern) => assert.rejects(() => run(data), pattern);
const responseOptions = body => ({ fetchImpl: async () => new Response(body), attempts: 1, retryDelayMs: 0 });
await test('complete anonymous release', async () => {
const data = fixture(), result = await run(data);
assert.equal(result.version, data.version);
assert.equal(result.bytes, 768);
assert.equal(result.source_sha, data.source);
assert.equal(data.calls.filter(url => url === `${API}/releases/latest`).length, 2);
assert(data.calls.includes(STABLE));
});
await test('annotated tag', async () => { const data = fixture(); data.annotated = true; await run(data); });
await test('network retry recovers', async () => {
let calls = 0;
const result = await request(STABLE, { retryDelayMs: 0, fetchImpl: async () => {
if (++calls === 1) throw new Error('offline');
return new Response('ok');
} });
assert.equal(result.bytes, 2); assert.equal(calls, 2);
});
await test('network retry bounded', async () => {
let calls = 0;
await assert.rejects(() => request(STABLE, { retryDelayMs: 0, fetchImpl: async () => { calls++; throw new Error('offline'); } }), /network request failed/);
assert.equal(calls, 2);
});
await test('HTTP retry bounded', async () => {
let calls = 0;
await assert.rejects(() => request(STABLE, { retryDelayMs: 0,
fetchImpl: async () => { calls++; return new Response(null, { status: 503 }); } }), /503/);
assert.equal(calls, 2);
});
await test('rate limit is not green', async () => {
await assert.rejects(() => request(STABLE, { fetchImpl: async () => new Response(null,
{ status: 403, headers: { 'x-ratelimit-remaining': '0' } }) }), /rate limit exhausted/);
});
await test('request timeout', async () => {
await assert.rejects(() => request(STABLE, { attempts: 1, timeoutMs: 5,
fetchImpl: (_url, options) => new Promise((_resolve, rejectPromise) => options.signal.addEventListener('abort', () => rejectPromise(new Error('abort')))) }), /timed out/);
});
await test('stalled response body timeout', async () => {
await assert.rejects(() => request(STABLE, { attempts: 1, timeoutMs: 5,
fetchImpl: async (_url, options) => new Response(new ReadableStream({ start(controller) {
options.signal.addEventListener('abort', () => controller.error(new Error('aborted')));
} })) }), /body timed out/);
});
await test('run deadline', async () => assert.rejects(() => request(STABLE, {
deadline: Date.now() - 1, fetchImpl: async () => { throw new Error('must not fetch'); } }), /deadline exceeded/));
await test('untrusted URL boundaries', () => {
for (const url of ['http://github.com/test', 'https://github.com.evil.test/', 'https://127.0.0.1/',
'https://[::1]/', 'https://169.254.169.254/', 'https://github.com:444/',
'https://user:password@github.com/', 'https://evil.test/', 'file:///tmp/file', 'https://github.com/#token'])
assert.throws(() => trustedURL(url), /Untrusted/);
});
await test('unsafe redirects never fetched', async () => {
let calls = 0;
await assert.rejects(() => request(STABLE, { fetchImpl: async () => {
calls++; return new Response(null, { status: 302, headers: { location: 'https://127.0.0.1/metadata' } });
} }), /Untrusted/);
assert.equal(calls, 1);
});
await test('redirect loop bounded', async () => {
let calls = 0;
await assert.rejects(() => request(STABLE, { fetchImpl: async () => { calls++;
return new Response(null, { status: 302, headers: { location: STABLE } }); } }), /Too many/);
assert.equal(calls, 6);
});
await test('missing redirect location', async () => assert.rejects(() => request(STABLE,
{ fetchImpl: async () => new Response(null, { status: 302 }) }), /no Location/));
await test('HTML 200 without MIME', async () => assert.rejects(() => request(STABLE,
responseOptions('<!doctype html><html>error</html>')), /HTML/));
await test('HTML 200 MIME', async () => assert.rejects(() => request(STABLE,
{ fetchImpl: async () => new Response('arbitrary', { headers: { 'content-type': 'text/html' } }) }), /HTML/));
await test('empty response', async () => assert.rejects(() => request(STABLE, responseOptions('')), /Empty/));
await test('truncated body', async () => assert.rejects(() => request(STABLE,
{ fetchImpl: async () => new Response('short', { headers: { 'content-length': '10' } }) }), /Truncated/));
await test('body exceeds size limit', async () => assert.rejects(() => request(STABLE,
{ ...responseOptions('overflow'), maxBytes: 4 }), /size limit/));
await test('oversized headers', async () => assert.rejects(() => request(STABLE,
{ maxBytes: 4, fetchImpl: async () => new Response('x', { headers: { 'content-length': '5' } }) }), /oversized/));
await test('expected asset size mismatch', async () => assert.rejects(() => request(STABLE,
{ ...responseOptions('short'), expectedBytes: 10 }), /size differs/));
await test('corrupt DMG trailer', async () => assert.rejects(() => request(STABLE,
{ ...responseOptions(Buffer.alloc(768)), dmg: true }), /DMG trailer/));
await test('interrupted body', async () => assert.rejects(() => request(STABLE,
{ fetchImpl: async () => new Response(new ReadableStream({ start(controller) { controller.error(new Error('stream interrupted')); } })) }), /stream interrupted/));
await test('empty release asset list', () => { const data = fixture(); data.release.assets = []; assert.throws(() => releaseSnapshot(data.release), /filenames/); });
await test('unexpected release asset', () => { const data = fixture(); data.release.assets[0].name = '../other.dmg'; assert.throws(() => releaseSnapshot(data.release), /filenames/); });
await test('duplicate release asset', () => { const data = fixture(); data.release.assets[0] = data.release.assets[1]; assert.throws(() => releaseSnapshot(data.release), /filenames/); });
await test('missing GitHub digest', () => { const data = fixture(); data.release.assets[0].digest = null; assert.throws(() => releaseSnapshot(data.release), /digest/); });
await test('metadata cannot choose another host', () => { const data = fixture(); data.release.assets[0].browser_download_url = 'https://evil.test/a'; assert.throws(() => releaseSnapshot(data.release), /Unexpected asset URL/); });
await test('missing file', async () => { const data = fixture(); data.files.delete('iriz-macos-arm64.dmg'); await reject(data, /404/); });
await test('wrong digest', async () => {
const data = fixture(), copy = Buffer.from(data.files.get('iriz-macos-arm64.dmg'));
copy[0] ^= 1; data.files.set('iriz-macos-arm64.dmg', copy); await reject(data, /SHA-256 mismatch/);
});
await test('stable resolves to wrong version', async () => {
const data = fixture(), original = data.fetchImpl;
data.fetchImpl = (url, options) => url === STABLE ? new Response(null, { status: 302,
headers: { location: 'https://release-assets.githubusercontent.com/fixture/iriz-macos-arm64.dmg' } }) : original(url, options);
await reject(data, /another release/);
});
await test('latest changed mid-download', async () => { const data = fixture(); data.changeLatest = true; await reject(data, /Latest release changed/); });
await test('checksums reject malicious names and duplicates', () => {
for (const text of ['', `${'a'.repeat(64)} ../file\n`, `${'a'.repeat(64)} $(touch_file)\n`, `${'a'.repeat(64)} good\n${'a'.repeat(64)} good\n`])
assert.throws(() => checksums(Buffer.from(text), ['good']), /filename/);
});
await test('manifest wrong version and dirty source', () => {
const data = fixture(), snapshot = releaseSnapshot(data.release);
assert.throws(() => validateManifest({ ...data.manifest, version: '0.0.0' }, snapshot, new Map()), /version\/source/);
assert.throws(() => validateManifest({ ...data.manifest, source_dirty: true }, snapshot, new Map()), /version\/source/);
});
const badge = 'docs/assets/download-macos.png';
const block = `<!-- application-downloads:start -->\n<a href="${STABLE}"><img src="${badge}" alt="Download for macOS" width="180"></a>\n[Download](${STABLE})\n<!-- application-downloads:end -->`;
const readme = `# iriz\n\n## Contents\n\n${block}\n\n## What This Is\n`;
await test('README badge after Contents and before What', () => validateReadme(readme, 'README.md', 'What This Is', badge));
await test('README badge missing', () => assert.throws(() => validateReadme(readme.replace('<img', '<span'), 'README.md', 'What This Is', badge), /badge/));
await test('README wrong href', () => assert.throws(() => validateReadme(readme.replace(`href="${STABLE}"`, 'href="https://example.com"'), 'README.md', 'What This Is', badge), /badge/));
await test('README badge below What', () => assert.throws(() => validateReadme(`\n## What This Is\n${block}`, 'README.md', 'What This Is', badge), /precede/));
await test('README obsolete CTA', () => assert.throws(() => validateReadme(`${readme}\n[![Download](https://img.shields.io/badge/download)](${STABLE})`, 'README.md', 'What This Is', badge), /obsolete/));
await test('README commented badge', () => assert.throws(() => validateReadme(readme.replace('<a href', '<!-- <a href').replace('</a>', '</a> -->'), 'README.md', 'What This Is', badge), /badge/));
await test('README whole block commented out', () => assert.throws(() => validateReadme(readme.replace(block, `<!-- hidden\n${block}\n-->`), 'README.md', 'What This Is', badge), /block required/));
await test('README whole block inside code fence', () => assert.throws(() => validateReadme(readme.replace(block, `\`\`\`html\n${block}\n\`\`\``), 'README.md', 'What This Is', badge), /block required/));
await test('README unclosed code fence', () => assert.throws(() => validateReadme(readme.replace(block, `\`\`\`html\n${block}`), 'README.md', 'What This Is', badge), /block required/));
await test('README indented code', () => assert.throws(() => validateReadme(readme.replace(block, block.split('\n').map(line => ` ${line}`).join('\n')), 'README.md', 'What This Is', badge), /block required/));
await test('README preformatted block', () => assert.throws(() => validateReadme(readme.replace(block, `<pre>\n${block}\n</pre>`), 'README.md', 'What This Is', badge), /block required/));
await test('README badge width zero', () => assert.throws(() => validateReadme(readme.replace('width="180"', 'width="0"'), 'README.md', 'What This Is', badge), /width/));
await test('README data attributes are not links', () => assert.throws(() => validateReadme(readme.replace('href=', 'data-href='), 'README.md', 'What This Is', badge), /badge/));
await test('README data source is not an image', () => assert.throws(() => validateReadme(readme.replace('src=', 'data-src='), 'README.md', 'What This Is', badge), /image/));
await test('README badge before Contents', () => assert.throws(() => validateReadme(`# iriz\n${block}\n## Contents\n\n## What This Is\n`, 'README.md', 'What This Is', badge), /follow Contents/));
const pngChunk = (name, bytes) => {
const result = Buffer.alloc(bytes.length + 12);
result.writeUInt32BE(bytes.length); result.write(name, 4); bytes.copy(result, 8);
result.writeUInt32BE(crc32(result.subarray(4, result.length - 4)), result.length - 4);
return result;
};
const pngHeader = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
const ihdr = Buffer.from([0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0]);
const png = Buffer.concat([pngHeader, pngChunk('IHDR', ihdr), pngChunk('IDAT', deflateSync(Buffer.alloc(5))), pngChunk('IEND', Buffer.alloc(0))]);
await test('valid badge PNG', () => validateBadgePNG(png));
await test('PNG signature alone is not an image', () => assert.throws(() => validateBadgePNG(pngHeader), /Incomplete/));
await test('truncated PNG', () => assert.throws(() => validateBadgePNG(png.subarray(0, -1)), /Truncated/));
await test('PNG CRC differs', () => {
const broken = Buffer.from(png); broken[20] ^= 1;
assert.throws(() => validateBadgePNG(broken), /checksum/);
});
await test('PNG missing pixels', () => assert.throws(() => validateBadgePNG(Buffer.concat([
pngHeader, pngChunk('IHDR', ihdr), pngChunk('IDAT', deflateSync(Buffer.alloc(1))), pngChunk('IEND', Buffer.alloc(0)),
])), /pixel data/));
await test('workflow stays public and read-only', async () => {
const workflow = await readFile(new URL('../.github/workflows/app-download.yml', import.meta.url), 'utf8');
assert.match(workflow, /github\.repository == 'zarubinvibe\/iriz' && github\.event\.repository\.visibility == 'public'/);
assert.match(workflow, /contents: read/);
assert.match(workflow, /persist-credentials: false/);
assert.match(workflow, /runs-on: ubuntu-24\.04/);
assert.match(workflow, /timeout-minutes: 15/);
assert.doesNotMatch(workflow, /contents: write|GH_TOKEN|GITHUB_TOKEN|secrets\.|schedule:|pull_request_target:/);
});
console.log(`PASS: ${passed} offline app-download checks`);
}