pi-arabic 0.0.0-stage → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/CONTRIBUTING.md +23 -0
- package/LICENSE +21 -0
- package/README.ar.md +66 -0
- package/README.md +71 -2
- package/SECURITY.md +7 -0
- package/THIRD-PARTY-NOTICES.md +17 -0
- package/docs/announcements.md +227 -0
- package/docs/architecture.md +21 -0
- package/docs/compatibility.md +24 -0
- package/docs/install.md +281 -0
- package/docs/media/after.png +0 -0
- package/docs/media/before.png +0 -0
- package/docs/media/demo.gif +0 -0
- package/docs/release-beta2.md +12 -0
- package/docs/release-v1.md +92 -0
- package/docs/runtime-package.md +27 -0
- package/docs/security-audit.md +65 -0
- package/docs/troubleshooting.md +109 -0
- package/docs/typography/bench/README.md +14 -0
- package/docs/typography/bench/frames-final-beta1-1.jsonl +6 -0
- package/docs/typography/bench/frames-final-beta1-2.jsonl +6 -0
- package/docs/typography/bench/frames-final-beta2-1.jsonl +6 -0
- package/docs/typography/bench/frames-final-beta2-2.jsonl +6 -0
- package/docs/typography/bench/layout.log +31 -0
- package/docs/typography/fonts/CascadiaCode-reference.png +0 -0
- package/docs/typography/fonts/CascadiaMono-reference.png +0 -0
- package/docs/typography/fonts/DejaVuSansMono-reference.png +0 -0
- package/docs/typography/fonts/cour-reference.png +0 -0
- package/docs/typography/fonts/faces.json +730 -0
- package/docs/typography/fonts/forms.json +1614 -0
- package/docs/typography/report.md +54 -0
- package/docs/typography/sources.md +192 -0
- package/docs/typography/spec.md +55 -0
- package/docs/typography/terminal/b2-beta1-f0-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta1-f1-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta1-f2-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta1-f3-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta2-f0-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta2-f0-regular.png +0 -0
- package/docs/typography/terminal/b2-beta2-f2-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-beta2-f3-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-stock-f0-fullscreen.png +0 -0
- package/docs/typography/terminal/b2-stock-f2-fullscreen.png +0 -0
- package/docs/typography/terminal/marks.png +0 -0
- package/docs/typography/terminal/probe-face-0.png +0 -0
- package/docs/typography/terminal/probe-face-1.png +0 -0
- package/docs/typography/terminal/probe-face-2.png +0 -0
- package/docs/typography/terminal/probe-face-3.png +0 -0
- package/docs/typography/terminal/reader-browser.png +0 -0
- package/docs/typography/terminal/rejected-join-controls.png +0 -0
- package/docs/typography/terminal/vte-fullscreen.png +0 -0
- package/docs/typography/terminal/vte-regular.png +0 -0
- package/docs/typography/terminal/xterm-fullscreen.png +0 -0
- package/docs/typography/terminal/xterm-regular.png +0 -0
- package/docs/upstream-proposal.md +60 -0
- package/docs/verification/v1.0.0-beta.1/README.md +39 -0
- package/docs/verification/v1.0.0-beta.1/windows-edited.png +0 -0
- package/docs/verification/v1.0.0-beta.1/windows-narrow.png +0 -0
- package/docs/verification/v1.0.0-beta.1/windows-reply.png +0 -0
- package/docs/verification/v1.0.0-beta.1/windows-status.png +0 -0
- package/docs/verification/v1.0.0-beta.1/windows-streaming.png +0 -0
- package/docs/verification/v1.0.0-beta.1/windows-typed.png +0 -0
- package/licenses/Unicode-3.0.txt +39 -0
- package/licenses/upstream-pi.MIT.txt +21 -0
- package/package.json +67 -4
- package/src/command.mjs +31 -0
- package/src/extension.mjs +32 -0
- package/src/mode.mjs +48 -0
- package/src/reader.mjs +33 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.2 — unpublished candidate
|
|
4
|
+
|
|
5
|
+
- Font-specific diagnostics grounded in measured cmap coverage, shaped glyph advances and Windows Terminal captures. No font installation or profile change.
|
|
6
|
+
- Optional local reading view of the last visible assistant reply, with native browser shaping; no JavaScript, external resources or history export.
|
|
7
|
+
- See the [technical report](docs/typography/report.md) for terminal layout changes, visual QA and remaining release gates.
|
|
8
|
+
|
|
9
|
+
## [1.0.0-beta.1]
|
|
10
|
+
|
|
11
|
+
- Public beta. The global `pi-arabic` command comes from `@mindistryx/pi-arabic-runtime` and does not replace `pi`.
|
|
12
|
+
- Security override pins `ws` to 8.23.1 in the runtime’s bundled closure.
|
|
13
|
+
- The runtime ships complete license notices for that closure, including Apache-2.0 text and generated MIT notices.
|
|
14
|
+
- The stock Pi companion now prints the runtime install command. It still cannot enable Arabic rendering.
|
|
15
|
+
- Install and troubleshooting guides, and GitHub issue templates.
|
|
16
|
+
|
|
17
|
+
## [1.0.0-rc] (unreleased release candidate)
|
|
18
|
+
|
|
19
|
+
- Initial MindistryX release candidate. The Pi package provides `/arabic` preferences and diagnostics on stock Pi.
|
|
20
|
+
- Separate, side-by-side Pi 1.8.0 runtime with contextual Arabic, mixed-direction text, visual prompt navigation, logical message copy, and UTF-8 input fixes.
|
|
21
|
+
- No automatic global changes, no extension telemetry, and no stock Pi self-update from the pinned runtime.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Test synthetic Arabic mixed with ASCII, emoji, numbers, code, and hyperlinks. Never add real prompts or terminal captures showing personal filenames, notifications, keys, or session identifiers. Review displayed cells separately from stored text. Do not replace the logical string with presentation forms, even to fix a visual test.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm ci --ignore-scripts
|
|
7
|
+
npm run check
|
|
8
|
+
npm test
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
For renderer work, clone the exact Pi `v1.8.0` tag into a separate directory, apply `patches/pi-v1.8.0.patch`, and use `scripts/upstream-linux.sh <checkout>` (Bash, Node 22, npm). The script hydrates the matching `pi-ai` release catalog, builds, runs `npm run check`, and runs the TUI suite where all Arabic changes live. Set `PI_ARABIC_FULL_SUITE=1` to also run the complete upstream isolated runner (`./test.sh`). Do not point it at a user npm installation.
|
|
12
|
+
|
|
13
|
+
The script exits before that work unless `fd --help` mentions `--no-require-git` (install `fd-find` and symlink `fdfind` to `fd`; an older distro `fd` is not enough), `rg` is on `PATH`, and `cargo --version` is 1.85 or newer. That cargo release is the minimum for the Rust edition 2024 env daemon, which the script builds after `build:offline`. The MCP and env process-cleanup tests also need `ps` (Debian/Ubuntu package `procps`). After the script finishes, run:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
node test/unicode-layout.mjs ../pi-1.8.0
|
|
17
|
+
npm run build:runtime -- ../pi-1.8.0
|
|
18
|
+
npm pack --ignore-scripts --pack-destination artifacts
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For a port, regenerate the patch including new files and lockfile changes, preserve upstream notices, and verify a clean `git apply --check` against the named tag. Keep the generated Arabic tables reproducible with the pinned UCD versions and the generator in the patch. Avoid introducing terminal-dependent assumptions into Unicode mapping.
|
|
22
|
+
|
|
23
|
+
Release work requires a maintainer’s approval and fresh matrix evidence. Do not implement publication as an automatic CI workflow.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MindistryX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ar.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Pi Arabic — باي عربي
|
|
2
|
+
|
|
3
|
+
**هذا فرع تطوير بيتا ٢، مو نسخة منشورة.** أوامر npm أدناه بعدها تنصّب بيتا ١. [تقرير الخطوط وصور المقارنة](docs/typography/report.md). إذا الحركات بعدها مو واضحة بطرفيتك، جرّب بالنسخة المرشّحة `/arabic read reply.html`: يحفظ النص الظاهر من آخر جواب بملف جديد تفتحه محلياً بالمتصفح. مو محرر ولا جلسة مباشرة، وما يغيّر خط جهازك. احذف الملف من تخلص ولا تحفظ جواب خاص بمجلد مشترك.
|
|
4
|
+
|
|
5
|
+
نسخة تجريبية عامة **1.0.0-beta.1**. مشروع مجاني ومفتوح المصدر من MindistryX، برخصة MIT، حتى يصير العربي مقروء داخل طرفية Pi Coding Agent. الكلام اللي تكتبه يبقى بترتيبه الأصلي في الجلسة وعند إرساله إلى النموذج. ما تحتاج تغيّر النموذج أو المزوّد أو تعليمات النظام. [English](README.md)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
في حزمتين، ومو نفس الشي:
|
|
10
|
+
|
|
11
|
+
- **`@mindistryx/pi-arabic-runtime`** — هذا اللي يفعّل عرض العربي. يضيف أمر `pi-arabic`، مبني على Pi **1.8.0**، ويشتغل يم نسخة `pi` العادية وما يستبدلها. أوامر `/arabic` موجودة داخله.
|
|
12
|
+
- **`pi-arabic`** — إضافة على Pi العادي. تحفظ الإعداد وتعرض فحص `/arabic` فقط. **تثبيت الإضافة وحدها ما يفعّل عرض العربي على Pi العادي.**
|
|
13
|
+
|
|
14
|
+
## التثبيت
|
|
15
|
+
|
|
16
|
+
تحتاج Node.js **22.19 أو أحدث** (npm يجي وياه)، وأي خط طرفية يعرض الحروف العربية.
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
20
|
+
pi-arabic
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`pi-arabic` ياخذ نفس معاملات `pi`، ويستخدم نفس ملف Pi: المزوّدات، تسجيلات الدخول، النماذج، الإعدادات، المهارات، الإضافات، والجلسات. أمر `pi` العادي يبقى مثل ما هو.
|
|
24
|
+
|
|
25
|
+
إذا تريد تجربة بملف منفصل:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
pi-arabic --agent-dir ./arabic-test-profile
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- **تحديث:** `npm install -g @mindistryx/pi-arabic-runtime@beta`
|
|
32
|
+
- **رجوع لهذه النسخة التجريبية:** `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`
|
|
33
|
+
- **ترجع لـ Pi العادي بأي وقت:** شغّل `pi`
|
|
34
|
+
- **حذف:** `npm uninstall -g @mindistryx/pi-arabic-runtime`
|
|
35
|
+
|
|
36
|
+
الحذف ما يمسح ملف Pi. إذا تريد، احذف `pi-arabic.json` من مجلد الملف الشخصي (افتراضياً `~/.pi/agent/`).
|
|
37
|
+
|
|
38
|
+
التحديث الذاتي داخل `pi-arabic` موقف، حتى ما يطيح تعديل العربي ولا تنستبدل نسخة `pi`. التحديث يكون بأمر npm فوق.
|
|
39
|
+
|
|
40
|
+
**إضافة اختيارية للفحص فقط.** إذا بقيت على Pi العادي وتريد أوامر `/arabic` بدون عرض: `pi install npm:pi-arabic@beta`، والحذف `pi remove npm:pi-arabic`. من GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. هذي **ما تفعّل عرض العربي**.
|
|
41
|
+
|
|
42
|
+
**بدون إنترنت.** نزّل `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` و`SHA256SUMS` من إصدار [v1.0.0-beta.1](https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1). تحقق بالأمر `sha256sum -c SHA256SUMS`، أو في PowerShell بالأمر `Get-FileHash -Algorithm SHA256`، ثم `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`.
|
|
43
|
+
|
|
44
|
+
المستودع: <https://github.com/MindistryX/pi-arabic>. على npm: [pi-arabic](https://www.npmjs.com/package/pi-arabic) و[@mindistryx/pi-arabic-runtime](https://www.npmjs.com/package/@mindistryx/pi-arabic-runtime).
|
|
45
|
+
|
|
46
|
+
الخطوات فوق تكفي للبداية. التفاصيل وملاحظات ويندوز والأوضاع في [دليل التثبيت](docs/install.md).
|
|
47
|
+
|
|
48
|
+
## الأوامر
|
|
49
|
+
|
|
50
|
+
داخل `pi-arabic` هالأوامر تغيّر العرض. على Pi العادي تحفظ الإعداد وتعرض الفحص فقط، وما تفعّل العرض.
|
|
51
|
+
|
|
52
|
+
- `/arabic on` — خلي Pi يرتّب العربي ويشكّل الحروف.
|
|
53
|
+
- `/arabic off` — عطّل معالجة Pi للعربي.
|
|
54
|
+
- `/arabic auto` — اختيار تلقائي، وهو الافتراضي.
|
|
55
|
+
- `/arabic native` — خلي الطرفية نفسها تتولى عرض العربي إذا تدعمه.
|
|
56
|
+
- `/arabic status` — شوف وضع التشغيل والإعداد المحفوظ.
|
|
57
|
+
- `/arabic doctor` — شوف نسخة Pi وNode وإشارات الطرفية، وجرّب جملة عربية حتى تحكم على الخط.
|
|
58
|
+
|
|
59
|
+
غيّرت الوضع؟ أعد تشغيل `pi-arabic`. إذا محدد `PI_TUI_BIDI` بقيمة `visual` أو `native` أو `auto` أو `off`، ياخذ الأولوية. أمر `/arabic on` يخزّن `visual`. إذا انعكس النص أو تشكّل مرتين، جرّب `/arabic native`. إذا بقيت الحروف مقطعة أو معكوسة، جرّب `/arabic on`.
|
|
60
|
+
|
|
61
|
+
## النطاق والحدود
|
|
62
|
+
|
|
63
|
+
- يغطي كتابة العربي والرد المتدفق، والنص المختلط مع المسارات والكود، وحروف العراقية الشائعة والحركات، وMarkdown، ونسخ الرسالة بترتيبها الأصلي، والتحديد من وضع ملء الشاشة. النص الأصلي هو اللي يروح للمزوّد والسجل والأدوات وملفات الجلسة.
|
|
64
|
+
- العرض الاحتياطي يخلي لكل حرف عربي خلية واحدة قدر الإمكان، مو تشكيل OpenType كامل ولا دمج لام-ألف. السطر الملتف يحافظ على اتجاه الفقرة، مو على تضمينات معقدة بين السطور. ترتيب اليمين لليسار يصير تلقائياً، ومحاذاة الواجهة تبقى مثل شبكة Pi، فالفقرات ما تصير كلها محاذاة لليمين.
|
|
65
|
+
- تحديد الطرفية في الوضع العادي قد ينسخ أشكال العرض. استخدم نسخ آخر رسالة من Pi، أو التحديد من وضع ملء الشاشة. المحررات الخارجية اللي ترسم المؤشر بنفسها قد تتصرف بشكل مختلف. اللغة المختبرة هي العربية. الفارسية والأردية والعبرية غير معلنة كمدعومة.
|
|
66
|
+
- راجع [دليل التثبيت](docs/install.md) و[جدول التوافق](docs/compatibility.md) و[حل المشاكل](docs/troubleshooting.md) و[تدقيق الأمان](docs/security-audit.md) و[سياسة الأمان](SECURITY.md) و[المساهمة](CONTRIBUTING.md). [قبل](docs/media/before.png) · [بعد](docs/media/after.png) · [عرض قصير](docs/media/demo.gif)
|
package/README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pi Arabic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Beta 2 development branch — not published.** The npm commands below still install Beta 1. See the [typography investigation, pixels and review gates](docs/typography/report.md). A reading-only graphical fallback is available in the candidate: `/arabic read reply.html` explicitly saves the last visible assistant text in a new local file. Open it in your browser; it does not edit, execute or upload anything. Delete it afterwards, especially in a shared or synced workspace.
|
|
4
|
+
|
|
5
|
+
**Readable Arabic in Pi Coding Agent’s terminal, with the original Unicode preserved.** A free, MIT-licensed project by MindistryX. Public beta **1.0.0-beta.1**. [اقرأ بالعربي](README.ar.md).
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
Pi Arabic has **two independent packages**. Stock Pi does not expose a renderer or input-decoder hook, so the extension and the runtime are not interchangeable:
|
|
10
|
+
|
|
11
|
+
| Package | What it does |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `pi-arabic` | A normal Pi extension for `/arabic` preferences and diagnostics. **Installing only this extension does not enable Arabic rendering on stock Pi.** |
|
|
14
|
+
| `@mindistryx/pi-arabic-runtime` | The program that does the rendering. It adds the `pi-arabic` command, pinned to upstream **Pi 1.8.0**, and it already includes `/arabic`. Do not install the companion into this command just to get those commands. |
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
You need **Node.js 22.19 or newer** (that includes npm) and any terminal font that can draw Arabic letters.
|
|
19
|
+
|
|
20
|
+
Arabic rendering needs the runtime. The extension alone cannot turn it on.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
24
|
+
pi-arabic
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`pi-arabic` accepts the same arguments as `pi`. It uses the same Pi profile, providers, logins, models, settings, skills, extensions, and sessions. The normal `pi` command keeps working unchanged.
|
|
28
|
+
|
|
29
|
+
Optional separate test profile:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
pi-arabic --agent-dir ./arabic-test-profile
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- **Update:** `npm install -g @mindistryx/pi-arabic-runtime@beta`
|
|
36
|
+
- **Roll back to this beta:** `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`
|
|
37
|
+
- **Use stock Pi again:** run `pi`
|
|
38
|
+
- **Uninstall:** `npm uninstall -g @mindistryx/pi-arabic-runtime`
|
|
39
|
+
|
|
40
|
+
Uninstall leaves your Pi profile in place. You can delete `pi-arabic.json` from the Pi profile folder if you want (default `~/.pi/agent/`).
|
|
41
|
+
|
|
42
|
+
Pi’s own self-update is blocked inside `pi-arabic`, so an update cannot drop the Arabic changes or replace `pi`. Use the npm command above.
|
|
43
|
+
|
|
44
|
+
**Optional companion, diagnostics only.** People who stay on stock Pi can run `pi install npm:pi-arabic@beta` and remove it with `pi remove npm:pi-arabic`. From GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. This does **not** enable Arabic rendering.
|
|
45
|
+
|
|
46
|
+
**Advanced / offline.** Download `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` and `SHA256SUMS` from the GitHub release [v1.0.0-beta.1](https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1). Verify with `sha256sum -c SHA256SUMS`, or in PowerShell `Get-FileHash -Algorithm SHA256`, then `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`.
|
|
47
|
+
|
|
48
|
+
Repository: <https://github.com/MindistryX/pi-arabic>. npm: [pi-arabic](https://www.npmjs.com/package/pi-arabic) and [@mindistryx/pi-arabic-runtime](https://www.npmjs.com/package/@mindistryx/pi-arabic-runtime).
|
|
49
|
+
|
|
50
|
+
The short steps above are enough to start. Details, Windows notes, and modes are in the [install guide](docs/install.md).
|
|
51
|
+
|
|
52
|
+
## Commands
|
|
53
|
+
|
|
54
|
+
Inside `pi-arabic`, these commands change how Arabic is drawn. On stock Pi they only save a preference and show diagnostics. They still do not enable rendering there.
|
|
55
|
+
|
|
56
|
+
| Command | Effect |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `/arabic on` | Force Pi visual rendering on the next launch. |
|
|
59
|
+
| `/arabic off` | Disable Pi's visual renderer; the host may still display RTL. |
|
|
60
|
+
| `/arabic auto` | Default: use the fallback unless there is a direct native VTE signal. |
|
|
61
|
+
| `/arabic native` | Send logical text to a terminal that already does shaping and BiDi. |
|
|
62
|
+
| `/arabic status` | Show the runtime and saved setting. |
|
|
63
|
+
| `/arabic doctor` | Check Pi/Node/Unicode and report terminal signals; show an Arabic sample to judge the font visually. |
|
|
64
|
+
|
|
65
|
+
Preferences are saved only when you change the mode, in `pi-arabic.json` inside the selected Pi profile. Restart `pi-arabic` to apply a change. A valid `PI_TUI_BIDI` value overrides the file (`visual`, `native`, `auto`, or `off`; `/arabic on` stores `visual`). If text is processed twice, try `/arabic native`. If it is still disconnected or backwards, try `/arabic on`. Do not change model, provider, system prompt, or locale.
|
|
66
|
+
|
|
67
|
+
## Scope and limitations
|
|
68
|
+
|
|
69
|
+
- Covers Arabic prompts and streamed output, mixed code/paths/versions, Iraqi Arabic letters and common diacritics, Markdown, logical message copy and fullscreen transcript selection. Original text still goes to the provider, history, tools, and session files.
|
|
70
|
+
- The fallback uses one terminal cell per Arabic letter where possible, not full OpenType shaping or lam–alef ligature compaction. Soft wraps retain base direction, not arbitrary embeddings across rows. RTL order is automatic; layout chrome stays in Pi’s existing grid, so paragraphs are not globally right-aligned.
|
|
71
|
+
- Terminal-owned selection in regular mode can copy visual cells. Use Pi’s Copy Last Message or fullscreen transcript selection. Third-party editors that draw or position their own cursors may behave differently. Arabic is the tested language. Persian, Urdu and Hebrew are not declared supported.
|
|
72
|
+
- See the [install guide](docs/install.md), [compatibility matrix](docs/compatibility.md), [troubleshooting](docs/troubleshooting.md), [architecture](docs/architecture.md), [security audit](docs/security-audit.md), [security policy](SECURITY.md), and [contributing](CONTRIBUTING.md). [Before](docs/media/before.png) · [Short demo](docs/media/demo.gif).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
The extension does not read credentials, collect telemetry, call APIs, or register model/tool/message hooks. Preferences write only `pi-arabic.json` in the profile returned by Pi. Beta 2 additionally supports an explicit runtime-only `/arabic read NAME.html`: this writes the last visible assistant text, not reasoning, credentials, tool records or the session, to a **new** file in the current working directory. The reply itself can contain sensitive information. Pick a private directory and delete the file after use; Unix creation requests mode 0600, Windows inherits directory ACLs. The HTML escapes message content and prohibits scripts, remote resources, forms and base URLs via CSP. It neither opens a browser nor serves an HTTP port. Diagnostics display recognized signal names, not raw environment values. The separately shipped runtime contains ordinary Pi, with its existing provider, network and tool behavior; `--offline` disables startup network operations, not the user's control over tools or providers.
|
|
4
|
+
|
|
5
|
+
Do not forward credentials, raw terminal logs, session transcripts or proprietary files in a report. Report vulnerabilities privately: on GitHub open the Security tab and choose "Report a vulnerability" (<https://github.com/MindistryX/pi-arabic/security/advisories/new>). Include affected runtime and Pi versions, platform, and a minimal synthetic reproduction. The review for this beta is in [docs/security-audit.md](docs/security-audit.md).
|
|
6
|
+
|
|
7
|
+
This project does not support older runtime builds once a patched replacement is released. Stock Pi self-update is disabled in the fork to prevent silently dropping the Arabic patch. Monitor upstream advisories and update with `npm install -g @mindistryx/pi-arabic-runtime@beta`; roll back with an exact version such as `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. See the [release notes](docs/release-v1.md) and [security audit](docs/security-audit.md).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The npm `pi-arabic` extension has no independent runtime dependencies. It uses host-provided Pi APIs. The separate runtime is built from the exact upstream Pi 1.8.0 tag (MIT), independently of this extension. See `licenses/upstream-pi.MIT.txt` in the runtime archive and `licenses/upstream-pi.MIT.txt` in this source repository for its original copyright and license.
|
|
4
|
+
|
|
5
|
+
The runtime `licenses/` directory is collected at build time from Pi’s pinned production closure:
|
|
6
|
+
|
|
7
|
+
- `Apache-2.0.txt` — the full Apache-2.0 license text, for packages that declare Apache-2.0 and publish no license file.
|
|
8
|
+
- Generated MIT notices (`*-LICENSE.generated.txt`) — for other packages that publish no license file. Each notice is attributed to the package author and says the published package had no license file.
|
|
9
|
+
- Pi’s own packages that publish no license file map to `upstream-pi.MIT.txt`.
|
|
10
|
+
- `dependency-index.json` — name, version, declared license, and notice filenames for that closure.
|
|
11
|
+
- License and notice files copied from dependencies that do publish them, plus upstream vendored TypeBox and Model Context Protocol notices.
|
|
12
|
+
|
|
13
|
+
The renderer uses lojjic's `bidi-js` 1.1.0 (MIT) and its transitive `require-from-string` 2.0.2 (MIT); license texts accompany the runtime. The contextual shaping table is derived from the Unicode Character Database 17.0.0, Unicode License v3. See `licenses/Unicode-3.0.txt`. The BiDi conformance excerpt is also Unicode data and carries the same license.
|
|
14
|
+
|
|
15
|
+
jiti, quickjs-wasi, and optional photon-node are installed as ordinary packages with their own notices. The runtime also pins `ws` to 8.23.1 with an npm `overrides` entry in `patches/pi-v1.8.0.patch` (the same overrides mechanism upstream uses for protobufjs). Stock Pi 1.8.0 resolved `ws` 8.21.0. See [docs/security-audit.md](docs/security-audit.md).
|
|
16
|
+
|
|
17
|
+
Screenshots and GIF show Pi's interface with synthetic, offline fixture data; they include no user session content.
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Announcement drafts
|
|
2
|
+
|
|
3
|
+
**DRAFTS — do not post until the owner approves.**
|
|
4
|
+
|
|
5
|
+
Same facts in every draft. Do not add test results, checksums, or a claim that public installation was verified. Do not say the `pi-arabic` extension turns on Arabic rendering in stock Pi.
|
|
6
|
+
|
|
7
|
+
Screenshots: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png> and <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>.
|
|
8
|
+
|
|
9
|
+
Terminal reports: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>. Synthetic text only.
|
|
10
|
+
|
|
11
|
+
## LinkedIn (English)
|
|
12
|
+
|
|
13
|
+
Arabic in Pi Coding Agent’s terminal can show up as disconnected letters, or in the wrong order next to a path or a piece of code. The text stored for the model and the session is still the original Unicode. The gap is the terminal rendering.
|
|
14
|
+
|
|
15
|
+
Pi Arabic 1.0.0-beta.1 is a free MIT-licensed public beta from MindistryX. The `pi-arabic` command, from `@mindistryx/pi-arabic-runtime`, shapes and orders Arabic for display and leaves the stored text unchanged. It uses the same Pi profile, providers, logins, models, settings, skills, extensions, and sessions as `pi`, and it does not replace `pi`. Installing only the `pi-arabic` extension does not enable Arabic rendering on stock Pi.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
19
|
+
pi-arabic
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Node.js 22.19 or newer (npm included) and a terminal font with Arabic coverage. Update: `npm install -g @mindistryx/pi-arabic-runtime@beta`. Roll back: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. Run `pi` at any time. Uninstall: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
23
|
+
|
|
24
|
+
Optional separate profile: `pi-arabic --agent-dir ./arabic-test-profile`. Optional stock-Pi diagnostics, not rendering: `pi install npm:pi-arabic@beta` (`pi remove npm:pi-arabic`). From GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. Offline: download `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` and `SHA256SUMS` from the release, verify with `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`), then `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`. Steps: <https://github.com/MindistryX/pi-arabic>.
|
|
25
|
+
|
|
26
|
+
Before: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
27
|
+
After: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
28
|
+
|
|
29
|
+
Tested: Windows Terminal 1.24 + Windows PowerShell (interactive, real), Linux (Debian) in tmux, regular and fullscreen modes, narrow and wide layouts, xterm.js headless. Not tested: the VS Code integrated terminal (blocked), WSL, macOS, SSH, and graphical Linux terminals other than via tmux capture. Persian, Urdu, and Hebrew are not declared supported.
|
|
30
|
+
|
|
31
|
+
The visual fallback is one cell per Arabic letter where possible, not full OpenType shaping or lam–alef compaction. Soft wraps keep base direction, not arbitrary embeddings across rows. Paragraphs are not globally right-aligned. Regular-mode terminal selection can copy visual cells; Pi’s Copy Last Message, or fullscreen selection, copies the original text.
|
|
32
|
+
|
|
33
|
+
If you can try another terminal, please open a terminal-compatibility report and use synthetic text only: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>.
|
|
34
|
+
|
|
35
|
+
## LinkedIn (العربية)
|
|
36
|
+
|
|
37
|
+
العربي داخل طرفية Pi Coding Agent قد يطلع حروفاً متفرقة، أو بترتيب غلط يم مسار أو كود. النص المحفوظ للنموذج وللجلسة يبقى بترتيبه الأصلي. النقص في عرض الطرفية.
|
|
38
|
+
|
|
39
|
+
Pi Arabic 1.0.0-beta.1 نسخة تجريبية عامة مجانية من MindistryX برخصة MIT. أمر `pi-arabic` من الحزمة `@mindistryx/pi-arabic-runtime` يشكّل الحروف ويرتّبها للعرض، والنص المخزون ما يتغير. يستخدم نفس ملف Pi والمزوّدات وتسجيلات الدخول والنماذج والإعدادات والمهارات والإضافات والجلسات، وما يستبدل أمر `pi`. تثبيت إضافة `pi-arabic` وحدها ما يفعّل عرض العربي على Pi العادي.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
43
|
+
pi-arabic
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
تحتاج Node.js 22.19 أو أحدث (npm يجي وياه) وخط طرفية فيه عربي. التحديث: `npm install -g @mindistryx/pi-arabic-runtime@beta`. الرجوع: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. بأي وقت شغّل `pi`. الحذف: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
47
|
+
|
|
48
|
+
ملف تجربة منفصل: `pi-arabic --agent-dir ./arabic-test-profile`. فحص على Pi العادي، مو عرض: `pi install npm:pi-arabic@beta` والحذف `pi remove npm:pi-arabic`. من GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. بدون إنترنت: نزّل `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` و`SHA256SUMS` من الإصدار، تحقق بـ `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`)، ثم `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`. الخطوات: <https://github.com/MindistryX/pi-arabic>.
|
|
49
|
+
|
|
50
|
+
قبل: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
51
|
+
بعد: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
52
|
+
|
|
53
|
+
انفحص على Windows Terminal 1.24 مع Windows PowerShell (استخدام فعلي)، ولينكس (Debian) داخل tmux، والوضع العادي وملء الشاشة، والعرض الضيّق والواسع، وxterm.js بدون واجهة. ما انفحص: طرفية VS Code المدمجة (التشغيل انحجب)، وWSL، وmacOS، وSSH، وطرفيات لينكس الرسومية بغير التقاط tmux. الفارسية والأردية والعبرية غير معلنة كمدعومة.
|
|
54
|
+
|
|
55
|
+
العرض الاحتياطي خلية واحدة لكل حرف عربي قدر الإمكان، مو تشكيل OpenType كامل ولا دمج لام-ألف. السطر الملتف يحافظ على اتجاه الفقرة. الفقرات ما تصير محاذاة لليمين بالكامل. تحديد الطرفية في الوضع العادي قد ينسخ شكل العرض؛ نسخ آخر رسالة من Pi، أو التحديد من ملء الشاشة، ينسخ النص الأصلي.
|
|
56
|
+
|
|
57
|
+
إذا تجرب طرفية ثانية، افتح نموذج توافق الطرفية بنص تجريبي فقط: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>.
|
|
58
|
+
|
|
59
|
+
## Reddit (English)
|
|
60
|
+
|
|
61
|
+
Arabic mixed with paths and code in Pi’s terminal was hard to read: letters stayed disconnected, and the order did not follow the sentence. The string sent to the model was already fine. Pi Arabic 1.0.0-beta.1 is a public beta that renders Arabic in a separate `pi-arabic` command. Stock Pi has no hook for the built-in transcript or for stdin decoding, so the `pi-arabic` extension alone does not enable rendering.
|
|
62
|
+
|
|
63
|
+
MindistryX, MIT license. Same Pi profile and the same providers, logins, models, settings, skills, extensions, and sessions. `pi` itself is unchanged.
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
67
|
+
pi-arabic
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Node.js 22.19 or newer. Update: `npm install -g @mindistryx/pi-arabic-runtime@beta`. Roll back to this beta: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. Run `pi` whenever you want stock Pi. Uninstall: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
71
|
+
|
|
72
|
+
Separate profile if you want one: `pi-arabic --agent-dir ./arabic-test-profile`. Diagnostics on stock Pi, still not rendering: `pi install npm:pi-arabic@beta`, remove with `pi remove npm:pi-arabic`. From GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. Offline: the `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` asset and `SHA256SUMS` on the release, then `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` after `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`).
|
|
73
|
+
|
|
74
|
+
<https://github.com/MindistryX/pi-arabic>
|
|
75
|
+
Before: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
76
|
+
After: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
77
|
+
|
|
78
|
+
Tested: Windows Terminal 1.24 + Windows PowerShell (interactive, real), Linux (Debian) in tmux, regular and fullscreen, narrow and wide layouts, xterm.js headless. Not tested: VS Code’s integrated terminal (blocked), WSL, macOS, SSH, graphical Linux terminals other than via tmux capture. Persian, Urdu, and Hebrew are not declared supported.
|
|
79
|
+
|
|
80
|
+
Limits: one cell per Arabic letter where possible, not full OpenType or lam–alef compaction; soft wraps keep base direction only; paragraphs are not globally right-aligned; regular-mode selection can copy visual cells (use Copy Last Message or fullscreen selection).
|
|
81
|
+
|
|
82
|
+
I would like reports from other terminals. Use the terminal-compatibility form and synthetic text only, not real prompts or session files: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>.
|
|
83
|
+
|
|
84
|
+
## Reddit (العربية)
|
|
85
|
+
|
|
86
|
+
العربي ويّا المسارات والكود داخل طرفية Pi كان يطلع مو مقروء: حروف متفرقة، وترتيب ما يمشي مع الجملة. النص اللي يروح للنموذج أصلاً سليم. Pi Arabic 1.0.0-beta.1 نسخة تجريبية عامة تعرض العربي بأمر منفصل اسمه `pi-arabic`. Pi العادي ما فيه نقطة ربط لعرض الردود المدمجة ولا لقراءة الإدخال، فإضافة `pi-arabic` وحدها ما تفعّل العرض.
|
|
87
|
+
|
|
88
|
+
من MindistryX، برخصة MIT. نفس ملف Pi ونفس المزوّدات وتسجيلات الدخول والنماذج والإعدادات والمهارات والإضافات والجلسات. أمر `pi` ما يتغير.
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
92
|
+
pi-arabic
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Node.js 22.19 أو أحدث. التحديث: `npm install -g @mindistryx/pi-arabic-runtime@beta`. الرجوع لهالنسخة: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. شغّل `pi` بأي وقت. الحذف: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
96
|
+
|
|
97
|
+
ملف منفصل إذا تبيه: `pi-arabic --agent-dir ./arabic-test-profile`. فحص على Pi العادي، مو عرض: `pi install npm:pi-arabic@beta`، والحذف `pi remove npm:pi-arabic`. من GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. بدون إنترنت: ملف `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` و`SHA256SUMS` من الإصدار، ثم `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` بعد `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`).
|
|
98
|
+
|
|
99
|
+
<https://github.com/MindistryX/pi-arabic>
|
|
100
|
+
قبل: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
101
|
+
بعد: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
102
|
+
|
|
103
|
+
انفحص: Windows Terminal 1.24 مع Windows PowerShell (استخدام فعلي)، لينكس (Debian) داخل tmux، الوضع العادي وملء الشاشة، العرض الضيّق والواسع، وxterm.js بدون واجهة. ما انفحص: طرفية VS Code المدمجة (التشغيل انحجب)، WSL، macOS، SSH، وطرفيات لينكس الرسومية بغير التقاط tmux. الفارسية والأردية والعبرية غير معلنة كمدعومة.
|
|
104
|
+
|
|
105
|
+
الحدود: خلية واحدة لكل حرف عربي قدر الإمكان، مو OpenType كامل ولا دمج لام-ألف. السطر الملتف يحافظ على اتجاه الفقرة فقط. الفقرات مو محاذاة لليمين بالكامل. تحديد الوضع العادي قد ينسخ شكل العرض (استخدم نسخ آخر رسالة أو تحديد ملء الشاشة).
|
|
106
|
+
|
|
107
|
+
يفيدني تقرير من طرفية ثانية. استخدم نموذج توافق الطرفية ونص تجريبي فقط، بلا برومبتات أو ملفات جلسات: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>.
|
|
108
|
+
|
|
109
|
+
## GitHub (English)
|
|
110
|
+
|
|
111
|
+
**Pi Arabic 1.0.0-beta.1 — public beta**
|
|
112
|
+
|
|
113
|
+
Arabic in Pi’s terminal can be disconnected or ordered wrong, especially beside paths and code. Pi Arabic keeps that Unicode unchanged for the model, sessions, and logical copy, and draws a visual line in the `pi-arabic` command.
|
|
114
|
+
|
|
115
|
+
The runtime package is `@mindistryx/pi-arabic-runtime`. The `pi-arabic` extension is optional and diagnostic. Installing only the extension does not enable Arabic rendering on stock Pi.
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
119
|
+
pi-arabic
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Node.js 22.19 or newer, and a font with Arabic coverage. `pi-arabic` takes the same arguments as `pi` and uses the same profile, providers, logins, models, settings, skills, extensions, and sessions. `pi` is not replaced. Pi self-update is blocked inside `pi-arabic`.
|
|
123
|
+
|
|
124
|
+
Update: `npm install -g @mindistryx/pi-arabic-runtime@beta`
|
|
125
|
+
Roll back: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`
|
|
126
|
+
Stock Pi at any time: `pi`
|
|
127
|
+
Uninstall: `npm uninstall -g @mindistryx/pi-arabic-runtime`
|
|
128
|
+
|
|
129
|
+
Separate profile: `pi-arabic --agent-dir ./arabic-test-profile`
|
|
130
|
+
Companion, diagnostics only: `pi install npm:pi-arabic@beta` and `pi remove npm:pi-arabic`
|
|
131
|
+
Git tag: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`
|
|
132
|
+
Offline: `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` plus `SHA256SUMS` on this release, then `sha256sum -c SHA256SUMS` (or PowerShell `Get-FileHash -Algorithm SHA256`) and `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`
|
|
133
|
+
|
|
134
|
+
Release: <https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1>
|
|
135
|
+
npm runtime: <https://www.npmjs.com/package/@mindistryx/pi-arabic-runtime>
|
|
136
|
+
npm extension: <https://www.npmjs.com/package/pi-arabic>
|
|
137
|
+
|
|
138
|
+
Before: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
139
|
+
After: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
140
|
+
|
|
141
|
+
Tested: Windows Terminal 1.24 + Windows PowerShell (interactive, real), Linux (Debian) in tmux, regular and fullscreen modes, narrow and wide layouts, xterm.js headless. Not tested: VS Code integrated terminal (blocked), WSL, macOS, SSH, graphical Linux terminals other than via tmux capture. Persian, Urdu, and Hebrew are not declared supported.
|
|
142
|
+
|
|
143
|
+
Known limits: one terminal cell per Arabic letter where possible, not full OpenType shaping or lam–alef compaction; soft wraps keep base direction, not arbitrary embeddings; paragraphs are not globally right-aligned; regular-mode selection can copy visual cells. Use Copy Last Message or fullscreen transcript selection for the original text. Modes apply after restarting `pi-arabic`.
|
|
144
|
+
|
|
145
|
+
Please report other terminals with the terminal-compatibility form. Synthetic text only: no API keys, credentials, private prompts, or session files. <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>
|
|
146
|
+
|
|
147
|
+
## GitHub (العربية)
|
|
148
|
+
|
|
149
|
+
**Pi Arabic 1.0.0-beta.1 — نسخة تجريبية عامة**
|
|
150
|
+
|
|
151
|
+
العربي داخل طرفية Pi قد يطلع متقطع أو بترتيب غلط، خاصة يم مسار أو كود. Pi Arabic يخلي اليونيكود الأصلي مثل ما هو للنموذج والجلسات والنسخ المنطقي، ويرسم سطراً بصرياً داخل أمر `pi-arabic`.
|
|
152
|
+
|
|
153
|
+
حزمة التشغيل هي `@mindistryx/pi-arabic-runtime`. إضافة `pi-arabic` اختيارية وللتشخيص. تثبيتها وحدها ما يفعّل عرض العربي على Pi العادي.
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
157
|
+
pi-arabic
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Node.js 22.19 أو أحدث، وخط فيه حروف عربية. `pi-arabic` ياخذ نفس معاملات `pi` ويستخدم نفس الملف والمزوّدات وتسجيلات الدخول والنماذج والإعدادات والمهارات والإضافات والجلسات. `pi` ما ينستبدل. التحديث الذاتي موقف داخل `pi-arabic`.
|
|
161
|
+
|
|
162
|
+
التحديث: `npm install -g @mindistryx/pi-arabic-runtime@beta`
|
|
163
|
+
الرجوع: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`
|
|
164
|
+
Pi العادي بأي وقت: `pi`
|
|
165
|
+
الحذف: `npm uninstall -g @mindistryx/pi-arabic-runtime`
|
|
166
|
+
|
|
167
|
+
ملف منفصل: `pi-arabic --agent-dir ./arabic-test-profile`
|
|
168
|
+
الإضافة للفحص فقط: `pi install npm:pi-arabic@beta` و`pi remove npm:pi-arabic`
|
|
169
|
+
من Git: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`
|
|
170
|
+
بدون إنترنت: `mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz` مع `SHA256SUMS` من هذا الإصدار، ثم `sha256sum -c SHA256SUMS` (أو PowerShell `Get-FileHash -Algorithm SHA256`) وبعدها `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`
|
|
171
|
+
|
|
172
|
+
الإصدار: <https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1>
|
|
173
|
+
حزمة التشغيل: <https://www.npmjs.com/package/@mindistryx/pi-arabic-runtime>
|
|
174
|
+
الإضافة: <https://www.npmjs.com/package/pi-arabic>
|
|
175
|
+
|
|
176
|
+
قبل: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
177
|
+
بعد: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
178
|
+
|
|
179
|
+
انفحص: Windows Terminal 1.24 مع Windows PowerShell (استخدام فعلي)، لينكس (Debian) داخل tmux، الوضع العادي وملء الشاشة، العرض الضيّق والواسع، وxterm.js بدون واجهة. ما انفحص: طرفية VS Code المدمجة (التشغيل انحجب)، WSL، macOS، SSH، وطرفيات لينكس الرسومية بغير التقاط tmux. الفارسية والأردية والعبرية غير معلنة كمدعومة.
|
|
180
|
+
|
|
181
|
+
حدود معروفة: خلية واحدة لكل حرف عربي قدر الإمكان، مو تشكيل OpenType كامل ولا دمج لام-ألف. السطر الملتف يحافظ على اتجاه الفقرة، مو التضمينات المعقدة. الفقرات مو محاذاة لليمين بالكامل. تحديد الوضع العادي قد ينسخ خلايا العرض. للنص الأصلي استخدم نسخ آخر رسالة أو تحديد ملء الشاشة. الوضع يشتغل بعد إعادة تشغيل `pi-arabic`.
|
|
182
|
+
|
|
183
|
+
إذا عندك طرفية ثانية، أرسل تقرير توافق بنص تجريبي فقط: بلا مفاتيح API أو بيانات دخول أو برومبتات خاصة أو ملفات جلسات. <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>
|
|
184
|
+
|
|
185
|
+
## Discord (English)
|
|
186
|
+
|
|
187
|
+
Public beta of Pi Arabic, 1.0.0-beta.1. Arabic in Pi’s terminal was disconnected or in the wrong order around paths and code. `pi-arabic` draws a visual line and leaves the original Unicode for the model and the session. It does not replace `pi`. The stock `pi-arabic` extension only diagnoses; it does not enable rendering.
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
191
|
+
pi-arabic
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Node.js 22.19 or newer and an Arabic-capable font. Same arguments and the same Pi profile as `pi`. Update: `npm install -g @mindistryx/pi-arabic-runtime@beta`. Roll back: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. Run `pi` any time. Uninstall: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
195
|
+
|
|
196
|
+
Separate profile: `pi-arabic --agent-dir ./arabic-test-profile`. Companion, not rendering: `pi install npm:pi-arabic@beta`, remove with `pi remove npm:pi-arabic`. From GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. Offline: `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`), then `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`. Release: <https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1>.
|
|
197
|
+
|
|
198
|
+
Before: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
199
|
+
After: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
200
|
+
|
|
201
|
+
Tested: Windows Terminal 1.24 + Windows PowerShell (interactive, real), Linux (Debian) in tmux, regular and fullscreen, narrow and wide layouts, xterm.js headless. Not tested: VS Code integrated terminal (blocked), WSL, macOS, SSH, graphical Linux terminals other than via tmux capture. Persian, Urdu, and Hebrew are not declared supported.
|
|
202
|
+
|
|
203
|
+
Limits: one cell per Arabic letter where possible, not full OpenType or lam–alef; soft wraps keep base direction only; not globally right-aligned; regular-mode selection can copy visual cells.
|
|
204
|
+
|
|
205
|
+
If you try another terminal, use the compatibility form and synthetic text only: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>
|
|
206
|
+
|
|
207
|
+
## Discord (العربية)
|
|
208
|
+
|
|
209
|
+
نسخة تجريبية عامة من Pi Arabic، 1.0.0-beta.1. العربي داخل طرفية Pi كان يطلع متقطع أو بترتيب غلط يم المسارات والكود. `pi-arabic` يرسم سطراً للعرض ويخلّي اليونيكود الأصلي للنموذج والجلسة. ما يستبدل `pi`. إضافة `pi-arabic` على Pi العادي للفحص فقط، وما تفعّل العرض.
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
npm install -g @mindistryx/pi-arabic-runtime@beta
|
|
213
|
+
pi-arabic
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Node.js 22.19 أو أحدث وخط يدعم العربي. نفس معاملات `pi` ونفس الملف. التحديث: `npm install -g @mindistryx/pi-arabic-runtime@beta`. الرجوع: `npm install -g @mindistryx/pi-arabic-runtime@1.0.0-beta.1`. شغّل `pi` بأي وقت. الحذف: `npm uninstall -g @mindistryx/pi-arabic-runtime`.
|
|
217
|
+
|
|
218
|
+
ملف منفصل: `pi-arabic --agent-dir ./arabic-test-profile`. الإضافة للفحص فقط وما تفعّل العرض: `pi install npm:pi-arabic@beta`، والحذف `pi remove npm:pi-arabic`. من GitHub: `pi install git:github.com/MindistryX/pi-arabic@v1.0.0-beta.1`. بدون إنترنت: `sha256sum -c SHA256SUMS` (PowerShell: `Get-FileHash -Algorithm SHA256`) ثم `npm install -g ./mindistryx-pi-arabic-runtime-1.0.0-beta.1.tgz`. الإصدار: <https://github.com/MindistryX/pi-arabic/releases/tag/v1.0.0-beta.1>.
|
|
219
|
+
|
|
220
|
+
قبل: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/before.png>
|
|
221
|
+
بعد: <https://raw.githubusercontent.com/MindistryX/pi-arabic/main/docs/media/after.png>
|
|
222
|
+
|
|
223
|
+
انفحص: Windows Terminal 1.24 مع Windows PowerShell (استخدام فعلي)، لينكس (Debian) داخل tmux، الوضع العادي وملء الشاشة، العرض الضيّق والواسع، وxterm.js بدون واجهة. ما انفحص: طرفية VS Code المدمجة (التشغيل انحجب)، WSL، macOS، SSH، وطرفيات لينكس الرسومية بغير التقاط tmux. الفارسية والأردية والعبرية غير معلنة كمدعومة.
|
|
224
|
+
|
|
225
|
+
الحدود: خلية لكل حرف عربي قدر الإمكان، مو OpenType كامل ولا لام-ألف. السطر الملتف يحافظ على اتجاه الفقرة فقط. مو محاذاة يمين كاملة. تحديد الوضع العادي قد ينسخ شكل العرض.
|
|
226
|
+
|
|
227
|
+
إذا تجرب طرفية ثانية، استخدم نموذج التوافق ونص تجريبي فقط: <https://github.com/MindistryX/pi-arabic/issues/new?template=terminal_compatibility.yml>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Architecture decision: companion + isolated runtime
|
|
2
|
+
|
|
3
|
+
**Beta 2 development:** retain the two packages and the reversible cell map. Runtime-only reading view is an alternative surface, not a third package or terminal protocol: an explicit command passes the current branch’s last assistant text to a static HTML writer. Direction is resolved by the browser per line; fenced code stays LTR. Markdown is displayed as text, never injected as markup. No browser dependency, server, automatic launch or real-time editing. See [font measurements and design trade-offs](typography/report.md).
|
|
4
|
+
|
|
5
|
+
**Status:** adopted for v1.0.0-beta.1, upstream Pi pinned to commit `867444aa64f64a5dd69efe74a620530fa5fd37ea` (`v1.8.0`).
|
|
6
|
+
|
|
7
|
+
Pi's public [`extensions.md`](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/extensions.md) and [`tui.md`](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/tui.md) expose commands, editor factories, custom overlays, custom message/entry renderers and tool renderer resolvers. They do **not** expose a supported way to transform built-in streaming assistant Markdown, both frame writers, the logical source map for selection/highlights, or the low-level stdin decoder. Wrapping only an editor cannot fix assistant rendering and can displace other extensions' editors. Rewriting `input`, `context`, provider events, or saved messages would corrupt logical text. Monkey-patching classes, intercepting ANSI stdout, or replacing files in installed Pi are rejected.
|
|
8
|
+
|
|
9
|
+
## Deployment boundary
|
|
10
|
+
|
|
11
|
+
`pi-arabic` is a stock-compatible extension for commands and an opt-in, profile-local preference. The isolated runtime adds the missing TUI behavior and supplies a versioned feature marker. Its launcher loads the command extension using `-e` and refuses self-update. The stock extension asks the user to launch the compatible runtime rather than pretending to enable rendering. A mode takes effect on restart to keep saved preferences, existing terminal scrollback, and renderer caches consistent within a process.
|
|
12
|
+
|
|
13
|
+
`patches/pi-v1.8.0.patch` is the canonical source for the reused rendering changes. `arabic-shaping.ts` selects one-cell forms from Unicode 17 joining data; `bidi-layout.ts` uses bidi-js (Unicode 13 UAX #9 data) and maps graphemes, columns, and logical offsets; `bidi-terminal.ts` carries width, style, hyperlinks and cursor metadata into ordinary Pi frames. `stdin-buffer.ts` reassembles UTF-8 before parsing key escape sequences. The core pipeline is logical text → Markdown/ANSI/wrap → transient visual cell layout → terminal diff. Copy and search use the logically ordered rows. The separate build uses upstream's Node bundle and version-matched assets, not a loader hook.
|
|
14
|
+
|
|
15
|
+
## Porting
|
|
16
|
+
|
|
17
|
+
Check the newest stable tag, review advisories, apply or adapt the patch in an isolated checkout, and run both suites and the terminal smoke tests. Compare upstream release data with current live data; use the tagged `pi-ai` npm provider data for offline verification. The build script rejects a different source commit, an unpatched checkout, or a bundle missing the feature marker. A version upgrade must deliberately update the guards, patch, compatibility matrix, and release docs. The input parser fix stands alone and is the smallest suitable upstream submission.
|
|
18
|
+
|
|
19
|
+
## Long-term upstream route
|
|
20
|
+
|
|
21
|
+
Prefer native Pi fixes over keeping this fork. An upstream RFC could add an opt-in text-layout service at the frame/line layer with a logical↔visual cell map consumed by the editor, transcript search and selection; a corresponding option on public editor components; and a host capability override. Keep control-sequence handling in core. Do not use third-party code to modify source text. The submission order and test repro are in [upstream-proposal.md](upstream-proposal.md).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Compatibility
|
|
2
|
+
|
|
3
|
+
For the unreleased Beta 2 branch, see [tested hosts, face versions and visual limitations](typography/report.md). The historical release matrix below is for Beta 1; a passing CI job on an OS is not a visual test of its terminal.
|
|
4
|
+
|
|
5
|
+
Only the exact **Pi 1.8.0** downstream build is released for full rendering. The companion was tested against stock 1.8.0; on stock it only shows diagnostics and saves an explicit preference. The runtime requires Node 22.19+, tested with Node 25 on Windows and Node 26 on Linux. No package lifecycle scripts are needed.
|
|
6
|
+
|
|
7
|
+
| Host or behavior | Evidence |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Windows Terminal 1.24, Windows PowerShell | Real installed runtime; typed Arabic, edited by grapheme, pasted, submitted multiline, streamed, resized, and copied logical Arabic. Mixed Markdown, links, tables, code and Iraqi glyphs were visually checked. |
|
|
10
|
+
| Linux Debian, tmux | Installed archive in a real tmux PTY, regular and fullscreen: text, cursor edits, resize, streamed visual cells, and the provider request and saved session checked. A pane capture is not graphical font verification. |
|
|
11
|
+
| xterm.js (headless) | Main and alternate screen geometry, graphemes, style, hyperlinks, fallback width, RTL copy, resize, incremental Markdown. |
|
|
12
|
+
| VS Code integrated terminal | Not verified visually: isolated VS Code startup was blocked by its updater in the available Windows environment. xterm.js coverage is a proxy only. |
|
|
13
|
+
| WSL | Untested on a user distribution; Docker's Linux PTY is not WSL interactive validation. |
|
|
14
|
+
| macOS / SSH / graphical Linux | Untested. For an outer terminal with native shaping/BiDi under SSH or tmux, set `PI_TUI_BIDI=native` in the Pi process environment. Auto-detection is heuristic, not a glyph probe. |
|
|
15
|
+
| Other RTL languages | Persian, Urdu and Hebrew are not advertised as supported. Mixed Hebrew appears in Unicode test vectors only. |
|
|
16
|
+
| Extensibility | Official package manager and deterministic provider exercised; no settings migration, editor replacement, or provider changes in the extension. Third-party themes/editors/skills are not individually certified. |
|
|
17
|
+
|
|
18
|
+
## Visual checks
|
|
19
|
+
|
|
20
|
+
1. Open both screen modes. Paste `السَّلَامُ عَلَيْكُمْ` and use Backspace, Right, Delete, then `Ctrl+J`. Continue with `المسار هو /src/components/terminal.ts`.
|
|
21
|
+
2. Stream a reply with `گول لي شنو المشكلة وشلون نحلها؟`, `v1.2.0`, emoji, a hyperlink, table, and fenced code. Narrow the terminal and check that there is no lost text. Native terminal selection may copy presentation glyphs, so compare Pi's Copy Last Message instead.
|
|
22
|
+
3. Compare `/arabic off` after restarting to `/arabic on` after restarting. If the host already does full BiDi and shaping, `/arabic native` must not double-reorder. Do not infer this from a font name.
|
|
23
|
+
|
|
24
|
+
The visual fallback is not full OpenType shaping and cannot provide arbitrary paragraph embeddings across soft-wrapped rows, global right alignment, or a dual-affinity cursor. Fullscreen transcript selection maps back to original graphemes; terminal-native selection and arbitrary extension overlays carry no portable logical copy guarantee.
|