Repository navigation
Releases: orgsonai/z2term
Release list
v1.0.78
変更内容
1.0.78: voice.sh setup で入るルールが案内から分かるようにしました。
- ⚙設定 › 案内を表示 ›
voiceの手順に、登録される 4 本すべての名前(声で操作 / 声で操作(ロック中) / 声のタイマー / 歩数を数える)を載せました。 - 歩数を数えるルールは、今日の歩数を声で聞けるように歩数計を動かすだけで、何も実行しません。このことを案内と
setupの完了表示に書きました。
⚠ setup の完了表示を変えるには、z2-macro install -f voice でマクロを入れ直してください。
Changes
1.0.78: The rules that voice.sh setup adds are now explained.
- Settings › Show a guide ›
voicenames all 4 rules (Voice command / Voice command (locked) / Voice timer / Count steps). - The Count steps rule only keeps the step counter running so you can ask for today's steps by voice; it runs nothing. The guide and the
setupoutput now say so.
⚠ Reinstall with z2-macro install -f voice to get the new setup output.
Full Changelog: v1.0.77...v1.0.78
v1.0.77
変更内容
1.0.76〜1.0.77: ⏎ の左はらいと 🎤 の音声入力、z2-listen の聞き取りが止まらない・待たされる問題を直しました。
- 聞いている間にもう一度はらう(押す)と止まります。 これまでは止める手段がありませんでした。
- 認識から 10 秒間なにも反応が無ければ、90 秒待たずに終わります(話している間は切れません)。
- z2term の画面から離れると聞くのをやめます。
- 端末の音声認識が別のアプリに使われているときは、「別の z2-listen が動いています」ではなく、そのとおりに知らせます。
- 端末の音声認識が止まって聞き取れないときは、「時間切れです」ではなく**「音声認識から応答がありません」**と出し、直し方(Android の設定 › アプリ で Android System Intelligence などを強制停止)を案内します。
z2-listenの終了コードはこのとき 2 です。
Changes
1.0.76–1.0.77: Fixed listening that could not be stopped or kept you waiting, in voice input from the ⏎ left swipe and 🎤, and in z2-listen.
- Swipe (or press) again while listening to stop. Until now there was no way to stop it.
- If recognition gives no sign of life for 10 seconds, it ends instead of waiting 90 seconds (it is not cut off while you are speaking).
- Listening stops when you leave the z2term screen.
- When another app is using the device's speech recognition, the message now says so instead of "another z2-listen is running".
- When the device's speech recognition has stalled, the message is now "Speech recognition isn't responding" instead of "Timed out", with how to recover (force stop Android System Intelligence or similar in Android Settings › Apps).
z2-listenexits with 2 in this case.
Full Changelog: v1.0.75...v1.0.77
v1.0.75
変更内容
1.0.59〜1.0.75: 声でスマホを操作できるようにしました。話した言葉を文字にするところから、曲送りやナビまでつながります。認識は端末の中だけで、声をネットへ出しません(Android 12 以降)。
(1) 声で操作
- クイック設定の「声で操作」タイルか、端末の「デジタル アシスタント アプリ」に z2term を選ぶと(電源ボタン長押しなどで開けます)、小さな聞き取りの画面が出ます。話した内容は
voiceイベントになり、z2-when event:voiceのルールで好きな操作につなげられます。 - 受け口のマクロ
voiceを同梱しました。z2-macro install voiceとsh ~/.z2term/macros/voice.sh setupで、「次の曲」「音量3段階下げて」「3分のタイマー」「7時に起こして」「明日の朝7時にゴミ出しをリマインド」「天気」「ニュース」「メモ牛乳を買う」「◯◯に電話」「◯◯を開いて」が使えます。「何ができる」で一覧が通知に出ます。 - ナビと施設の電話番号: 「東京駅までナビ」「東京駅に行きたい」「東京駅の電話番号」で、端末の地図アプリがその場所を開きます。「ナビ」とだけ言うと、そのまま行き先を聞きます。
- アプリを開く: 名前が英字のアプリも、カタカナの読みで開けます。「ブラウザ」「地図」「カメラ」「設定」などの種類の言葉では、端末の既定のアプリが開きます。開けないアプリは呼び名を登録できます。
- 画面ロック中も使えます。ロック中は曲・音量・時刻・天気・タイマーなど、誰がしても困らないものだけをその場で動かします。電話・アプリ・ナビ・メモなどは、ロックを解除すると続けて動きます。
- 言葉は言語ごとの言葉の表にあり、
sh ~/.z2term/macros/voice.sh wordsで開いて言い方を足せます(日本語・英語・中国語(簡体・繁体)・スペイン語・韓国語)。voice.sh try <言葉>で話さずに試せ、voice.sh listenで端末から聞き取りの画面を開けます。AI への質問は最初はオフで、voice.sh ai <名前>でオンにします。
(2) 話した内容を文字にする
z2-listen:text=$(z2-listen)で話した内容を受け取れます。z2-listen -w "次の曲,止めて"なら、並べた言葉のどれかを言ったときだけ当たった言葉を出します。同じ読みの別の漢字で聞こえても当たります。- キーボードに 🎤 キー(
voice_input)を足しました。既定のキーボードでは ⏎ を左にはらうと声で入力できます。Enter は押さないので、内容を見てから送れます。全部大文字で聞こえた英字の語(「エル エス」→LS)は小文字にして入れます。
(3) 読み上げを途中で止める
z2-sayで話している間は、話している文を出した通知が出ます。通知の「止める」、「声で操作」タイル、同じ音量ボタンの素早い 2 回押し(0.3 秒以内)のどれでも止められます。ふつうに押せば、今までどおり音量が変わります。
(4) 文字ファイルの編集画面 z2-edit
z2-edit <ファイル>で、文字ファイルを z2term の編集画面で書き換えます。ふつうの入力欄で直し、「保存」で元のファイルへ書き戻します。2 本指のピンチで文字の大きさを変えられます。z2-intentに種類を指定する-cを足しました(-a android.intent.action.MAIN -c android.intent.category.APP_BROWSERで既定のブラウザ、など)。
Changes
1.0.59–1.0.75: You can now run the phone by voice, from turning speech into text all the way to skipping tracks and navigating. Recognition stays on the device and your voice never leaves it (Android 12 and later).
(1) Voice command
- Add the "Voice command" tile to quick settings, or choose z2term as the device's digital assistant app (then it opens with a long press of the power button and the like), and a small listening screen appears. What you say becomes a
voiceevent that az2-when event:voicerule can connect to anything. - A receiver macro,
voice, is bundled. Afterz2-macro install voiceandsh ~/.z2term/macros/voice.sh setup, "next song", "volume down 3", "set a timer for 3 minutes", "wake me up at 7", "remind me to take out the bins tomorrow at 7 am", "weather", "news", "note buy milk", "call …" and "open …" work, and "what can I say" puts the list in a notification. - Navigation and a place's phone number: "navigate to Tokyo Station", "take me to …" and "phone number of …" open the place in the phone's map app. Saying just "navigate" asks for the destination right away.
- Opening apps: an app opens even when you say its name the way it sounds rather than as it is written. Kinds of app such as "browser", "maps", "camera" and "settings" open the phone's default one, and you can give a nickname to an app that still does not open.
- It works on the lock screen. While locked, only things that are fine for anyone to do — music, volume, time, weather, timers and so on — run at once; calls, apps, navigation, notes and the like go on once you unlock.
- The words live in a word table per language;
sh ~/.z2term/macros/voice.sh wordsopens it to add ways of saying things (English, Japanese, Chinese (Simplified and Traditional), Spanish and Korean).voice.sh try <phrase>tries one without speaking, andvoice.sh listenopens the listening screen from a terminal. Asking AI is off at first; turn it on withvoice.sh ai <name>.
(2) Speech to text
z2-listen:text=$(z2-listen)gives you what was said. Withz2-listen -w "next song,stop"it prints the matching phrase only when you say one of them, even when it is heard as a different word that sounds the same.- The keyboard gets a 🎤 key (
voice_input). On the default keyboard, swipe ⏎ to the left to type by voice. Enter is not pressed, so you can check before sending. A Latin word heard all in capitals is typed in lower case.
(3) Stopping speech midway
- While
z2-sayspeaks, a notification shows the sentence being spoken. "Stop" in it, the "Voice command" tile, or a quick double press of the same volume button (within 0.3 s) stops it. Normal presses still change the volume.
(4) z2-edit, an editor for text files
z2-edit <file>opens a text file in z2term's own editor. Change it in a plain text box and "Save" writes it back to the file. Pinch with two fingers to change the text size.z2-intentgets-cto give a category (-a android.intent.action.MAIN -c android.intent.category.APP_BROWSERopens the default browser, and so on).
Full Changelog: v1.0.58...v1.0.75
v1.0.58
変更内容
1.0.55〜1.0.58: ホーム画面のウィジェットを、機能と見た目の両方から作り直しました。
(1) マクロのウィジェットが 2 種類に
- マス目(これまでの「Z2Term の状態」): 横に 4 つ並んでいたボタンを 2×2 のマスにしました。置いてあるウィジェットはそのまま残ります。
- 一覧(新規): 1 行 1 個で 30 個まで並べられ、ウィジェットの中でスクロールします。
(2) 終わり方が分かるように: マクロごとに名前・説明・状態を分けて出します。状態は「実行中(経過時間)」「完了」「失敗(終了コード)」「停止」で、今日の開始〜終了の時刻が付きます。これまでは失敗しても ✓ が付いていました。
(3) ライブ tail: ウィジェットの中でスクロールして 200 行までさかのぼれます。長い行は折り返し、エラーの行は色が変わります。
(4) Android 標準の見た目: 色は端末のライト / ダークの設定に合わせて変わり、Android 12 以降は壁紙から作られる端末の配色を使います。枠線をやめて角の丸みを端末に合わせ、実行中のマスは地に色が付き、失敗したマスは赤くなります。文字は端末の標準フォントです(等幅は ssh のコマンドとログの行だけ)。マクロやファイルを選ぶ設定画面も、チェックボックスの一覧・切り替えボタン・入力欄を使った同じ見た目にしました。
(5) ssh の接続コマンドの修正
- 上段の
ssh -p …が「ssh -p 6…」で切れて読めなかったのを、横幅いっぱいの 1 行に出すようにして直しました。 - 表示されるポートが、実際に sshd が開くポートと違うことがあったのを直しました。これまでは
/etc/ssh/sshd_configのPortだけを見ていたので、常駐サーバーをsshd --lan -p 65152のように起動していると既定の 2222 が出ていました。いまは sshd と同じ順(コマンドの-p→ 設定ファイルのPort→ 既定)で決めます。⚙設定の SSH 案内も同じです。
Changes
1.0.55–1.0.58: The home screen widgets are rebuilt, both in what they do and how they look.
(1) Two macro widgets
- Grid (the former "Z2Term status"): the four side-by-side buttons are now a 2×2 grid. Widgets already on your home screen stay.
- List (new): one macro per row, up to 30, scrolling inside the widget.
(2) See how a macro ended: each macro shows its name, description and state separately. The state reads "running (elapsed time)", "done", "failed (exit code)" or "stopped", with today's start–end time. Before, a failed macro still got a ✓.
(3) Live tail scrolls inside the widget to read back up to 200 lines, wraps long lines and colours error lines.
(4) A standard Android look: colours follow the device's light / dark setting, and on Android 12 and later use the device colour scheme made from your wallpaper. Outlines are gone and corner radii match the device; a running tile gets a coloured fill and a failed one turns red. Text uses the device's standard font (monospace only for the ssh command and log lines). The settings screens for picking macros and files got the same look, with a checkbox list, segmented buttons and a text field.
(5) ssh command fixes
- The
ssh -p …at the top was cut off at "ssh -p 6…"; it now has a full-width line of its own. - The port shown could differ from the port sshd actually opens. Only
Portin/etc/ssh/sshd_configwas read, so a server started assshd --lan -p 65152showed the default 2222. The port is now worked out in the same order as sshd (the command's-p→Portin the config file → the default). The SSH help under ⚙ Settings does the same.
Full Changelog: v1.0.54...v1.0.58
v1.0.54
変更内容
1.0.54: 自動化(z2-when)のきっかけを増やし、選ぶ画面を作り直しました。
(1) 新しいきっかけ
- Bluetooth 機器がつながった・切れた(
bt:connect=<名前>/bt:disconnect=<名前>)。音を出さない腕時計や車も、機器ごとに分けられます。「付近のデバイス」の許可が要ります。 - そのアプリを開いた・離れた(
app:open=<アプリ>/app:close=<アプリ>)。ユーザー補助で画面の切り替えを受け取るだけで、定期的に見に行かないので電池を使いません。 - 今日の歩数が届いた(
steps:reach=8000)。端末の歩数計を読むだけで、ほかのアプリやサービスは使いません。「身体活動」の許可が要ります。 - 電池の温度(
battery:temp>45/battery:temp<35)。 - フォルダのファイルが書き換わった・消えた(
file:changed=<フォルダ>/file:deleted=<フォルダ>)。 event:に 省電力モード・おやすみモード・アプリの追加/削除/更新・タイムゾーンの変更・USB 機器の抜き差し・Bluetooth 機器の接続/切断 が増えました。
(2) きっかけの選び方: 種別を「時刻・電源・つながり・アプリと通知・端末」の 5 段に分け、候補を書式ではなく「電池の残量が値(%)を切ったとき」のような文で並べました。選ぶと一覧が畳まれ、数を決める候補には値だけの欄が出ます。event: の候補も名前を覚えずに一覧から選べます。そのきっかけが今の設定では動かないとき(検知 OFF・許可が無い・ユーザー補助が OFF)は、理由と直すボタンがすぐ下に出ます。
(3) Bluetooth(付近のデバイス)と歩数(身体活動)の許可を、⚙設定 › 権限・通知 に足しました。
⚠ すでにあるファイルを上書きしたときは、file:new ではなく file:changed が動くようになりました。上書きでも動かしたいルールは file:changed を足してください。
Changes
1.0.54: More automation (z2-when) triggers, and a rebuilt trigger picker.
(1) New triggers
- A Bluetooth device connecting or disconnecting (
bt:connect=<name>/bt:disconnect=<name>). Silent devices such as a watch or a car can be told apart. Needs the Nearby devices permission. - An app coming to the front or being left (
app:open=<app>/app:close=<app>). It listens for window changes through Accessibility and never polls, so it costs no battery. - Today's steps reaching a goal (
steps:reach=8000). Reads the phone's own step counter; no other app or service is involved. Needs the Physical activity permission. - Battery temperature (
battery:temp>45/battery:temp<35). - A file in a folder being rewritten or removed (
file:changed=<dir>/file:deleted=<dir>). event:gains battery saver, Do Not Disturb, app install/uninstall/update, time-zone change, USB plug/unplug and Bluetooth connect/disconnect.
(2) Picking a trigger: kinds are grouped into five rows (Time, Power, Connections, Apps & notifications, Device), and choices are listed as sentences ("Battery level drops below the value (percent)") instead of raw forms. Choosing one folds the list away, and choices that take a number get a field for just the value. event: choices come from a list, so names need not be remembered. When a trigger cannot run with the current settings (detection off, a permission missing, Accessibility off), the reason and a fix button appear right below it.
(3) The Bluetooth (Nearby devices) and step (Physical activity) permissions were added to ⚙ Settings › Permissions & notifications.
⚠ Overwriting an existing file now fires file:changed, not file:new. Add a file:changed rule where overwrites should run too.
Full Changelog: v1.0.53...v1.0.54
v1.0.53
変更内容
1.0.53: GUI で Chromium や Electron 製のアプリが表示されなかったのを直しました。GUI は管理者(root)で動くため、これらのアプリは「root では安全機能を切る指定(--no-sandbox)が要る」と出して、窓を出さずに終わっていました。☰ と GUI のメニューから起動したアプリがこの理由で終わったときだけ、--no-sandbox を付けて自動で起動し直します。ほかのアプリの起動は変わりません。GUI の端末で直接打って起動したときは対象外です。
1.0.52: (1) エッジパネルの上で直接アプリなどを並べ替えるとき、段と段の間にも入れられるようにしました。落とす先の項目の上端・下端あたりならその段の上・下に新しい段ができ、真ん中あたりなら左右に横並びで入ります。落とす前に、入る側に線が出ます。(2) 横並びのパネル(縦のスワイプでタブを切り替える)で、メモの中のスクロールがタブ切替に取られていたのを直しました。
1.0.51: エッジパネルのメモで、(1) 本文が長いとき、パネル全体ではなくメモの中をスクロールできるようにしました(高さを決めた項目の中も同じです)。(2) ダブルタップで編集を始めたとき、カーソルが行頭に行っていたのを、ダブルタップした所に入るようにしました。
Changes
1.0.53: Fixed Chromium and Electron apps not appearing in the GUI. The GUI runs as root, so these apps reported that root needs the sandbox turned off (--no-sandbox) and exited without a window. When an app started from ☰ or the GUI menu exits for exactly this reason, it is now restarted automatically with --no-sandbox. Other apps start as before. Apps started by typing a command in a GUI terminal are not covered.
1.0.52: (1) When rearranging items directly on an edge panel, you can now drop them between rows. Dropping near the top or bottom edge of an item makes a new row above or below its row; dropping near the middle places it beside the item. A line shows where it will go before you drop. (2) In horizontal panels (where a vertical swipe changes tabs), scrolling inside a note was taken by tab switching; this is fixed.
1.0.51: In edge panel notes, (1) a long note now scrolls inside the note instead of the whole panel (the same applies inside items with a set height). (2) Double-tapping to start editing now puts the cursor where you double-tapped instead of at the start of the line.
Full Changelog: v1.0.50...v1.0.53
v1.0.50
変更内容
どちらもセキュリティの強化です。
- 通知と SMS の記録を、何日分残すか選べるようにしました。 設定 › 権限・通知 › 通知・ログ の通知検知と SMS 検知にあり、無制限 / 7 / 30 / 90 / 365 日から選べます。既定は無制限で、今までどおりです。
- 選んだ日数より古い記録は、次に記録するときに同じファイルから消します。ファイルは 1 本のままで、自分で決めた書式でも効きます。
- この版より前の記録は、更新した日から数えます。手でファイルを書き換えたときも、その日から数え直します(消しすぎないようにするためです)。
- QR で受け取ったコマンドを、登録名ではなく中身で確かめられるようにしました。 登録名は QR を作った人が自由に付けられるので、入るコマンドを枠で大きく見せます。コマンド一覧への保存とエッジボタンへの追加の前には、登録名と中身をもう一度出して確かめます。
Changes
Both are security hardening.
- You can now choose how many days of notification and SMS logs to keep. The setting is in Settings › Permissions and notifications › Notifications and logs, for both notification and SMS detection: unlimited / 7 / 30 / 90 / 365 days. The default is unlimited, as before.
- Entries older than that are cut from the same file the next time an entry is written. It stays one file and works with your own format too.
- Entries from before this version are counted from the day you update. After you edit the file by hand, counting restarts from that day (so nothing is cut too early).
- Commands received by QR can be checked by their content, not their name. Whoever makes the QR can give it any name, so the command is now shown large in a frame. Saving it as a snippet or adding it as an edge button first shows the name and the command again for confirmation.
Full Changelog: v1.0.49...v1.0.50
v1.0.49
変更内容
1.0.48〜1.0.49 の変更をまとめています。どれもセキュリティの強化です。早めの更新をおすすめします。
z2-*コマンドの受付口を、他のアプリから見えない場所へ移しました(1.0.48)。z2-*コマンドがアプリに頼みごとを渡す受付口は、これまで共有ストレージ(Android/dataの中)にあり、本人確認がありませんでした。そのため、Android 10 で保存の権限を持つアプリ、Android/dataへのアクセスを許したファイル管理アプリ、USB でつないだパソコンからも、タブへの打ち込みと実行・画面の読み取り・z2-uiでの操作を頼めてしまいました。- 受付口はアプリ専用の場所に置き、アプリを起動するたびに作り直す合言葉の付いた頼みごとしか受けません。
- 端末からの使い方は変わりません(
/storage/app/z2apiという場所もそのままです)。 - 更新の前から開いていたタブで
z2-*が断られたら、タブを開き直してください。
- バックアップを戻すとき、自動で動く設定は止めた状態で入るようにしました(1.0.49)。 自動化ルール・常駐サーバー・エッジパネルはオフで入り、端末起動時の自動起動と新しいタブの初期コマンドは戻しません。他人から受け取ったバックアップに仕込まれたコマンドが、中身を見る前に動き出さないようにするためです。
- 戻した後に、止めた件数が出ます。
- 自分のバックアップなら「自動で動く設定もそのまま有効にする」を付けると、元どおりに戻ります。
- 戻す前に出る件数も、暗号化していないものは中身から数え直すようにしました。
- 常駐サーバーの HTTP のプリセットを、スマホの中だけで待ち受ける形にしました(1.0.49)。 見せるのは
~/publicの中だけです。これまでは同じ Wi-Fi の誰にでも、パスワードなしで起動したフォルダの中身(ホームなら~/.sshも)を見せていました。同じ Wi-Fi の機器から見たいときは--bind 0.0.0.0に書き換えてください。すでに登録したサーバーは変わりません。 - 脆弱性の報告方法を SECURITY.md にまとめました。 セキュリティの問題は公開の Issue ではなく、Security タブの「Report a vulnerability」から非公開で知らせてください。
Changes
This release collects the changes from 1.0.48 to 1.0.49, all security hardening. Updating soon is recommended.
- The intake for
z2-*commands moved somewhere other apps cannot see (1.0.48). The intake through whichz2-*commands hand requests to the app was in shared storage (insideAndroid/data) with no check of who wrote the request. Apps with the storage permission on Android 10, file managers given access toAndroid/dataand a PC connected over USB could therefore ask it to type into a tab and run it, read the screen, or operate apps throughz2-ui.- The intake now lives in the app-private area and only accepts requests carrying a token that is recreated every time the app starts.
- Nothing changes in how you use it from the terminal (the
/storage/app/z2apipath stays). - If
z2-*is refused in a tab that was open before the update, open the tab again.
- Restoring a backup brings automatic settings in stopped (1.0.49). Automation rules, resident servers and edge panels arrive off, and the auto-start at boot and the new-tab start command are not restored, so commands planted in a backup from someone else cannot start before you have looked at them.
- The screen tells you how many were left stopped.
- For your own backup, tick "Keep automatic settings running" to restore them as they were.
- The counts shown before restoring are now recounted from the contents for unencrypted backups.
- The HTTP preset for resident servers now listens on the phone only (1.0.49) and serves just
~/public. Before, it showed the folder it started in (your home,~/.sshincluded) to anyone on the same Wi-Fi without a password. To reach it from other devices on the Wi-Fi, change it to--bind 0.0.0.0. Servers you already added are unchanged. - How to report a vulnerability is now in SECURITY.md. Please report security problems privately through "Report a vulnerability" on the Security tab, not in a public issue.
Full Changelog: v1.0.47...v1.0.49
v1.0.47
変更内容
1.0.46〜1.0.47 の変更をまとめています。どれも AI からのアプリ操作(z2-ui)の改善です。
- 盤面やボタンの並びを「何列何行目」で指せるようになりました(1.0.47)。
tap/long/drag/colorsに--cells X0,Y0 DX,DY 列x行(colors --gridと同じ書き方)を付けると、座標の代わりにc3r2(3 列 2 行目、左上がc1r1)のようなマスで指せます。- 例:
z2-ui drag --cells 100,1516 177,177 6x5 c3r2 c3r1 c4r1 - 読んだ盤面のマスをそのまま指せるので、AI やスクリプトが座標を計算する手間と、その間違いがなくなります。記録とマクロには座標で残ります。
- MCP では
cellsを付け、targetやpointsに"c3r2"を入れます。
- 例:
- AI の操作の軌跡を画面に表示できるようになりました(1.0.46)。 AI 操作の設定の「操作の軌跡を表示」(既定 OFF)を ON にすると、AI が触れた場所を画面に描きます。タップ・長押しは丸、スワイプ・なぞる操作は指を追う線と番号付きの点で、指を離して約 1 秒で消えます。撮影の前には毎回消すので、AI が読む画像や色には写りません。
- 引用符で 1 つにまとめて送られた引数も受け付けるようになりました(1.0.46)。
drag "540,1200 600,1300"、--until "brighter 125"、--grid "100,1516 177,177 6x5"がそのまま通ります。これまでは書き方の間違いとして断られ、AI が送り直す 1 往復が無駄になっていました。文字を入れる・探す引数は今までどおり分けません。 - 記録(
~/.z2term/ui/log.jsonl)の各行に、その呼び出しにかかった時間(ms)を足しました(1.0.46)。 z2term の処理と、呼び出しのあいだに AI が考えていた時間とを分けて見られます。
Changes
This release collects the changes from 1.0.46 to 1.0.47, all to AI app control (z2-ui).
- Pointing at a board or a grid of buttons by column and row (1.0.47). With
--cells X0,Y0 DX,DY COLSxROWS(the same form ascolors --grid),tap/long/drag/colorstake cells such asc3r2(column 3, row 2; top-left isc1r1) instead of pixels.- For example
z2-ui drag --cells 100,1516 177,177 6x5 c3r2 c3r1 c4r1. - The cells of a board just read can be used as they are, so the AI or a script no longer computes pixels, or gets them wrong. The log and macros keep the pixels.
- Over MCP, add
cellsand put"c3r2"intargetorpoints.
- For example
- The AI's finger trail can be shown on the screen (1.0.46). With "Show the finger trail" in the AI operation settings (off by default), the screen shows where the AI touches: a circle for a tap or long press, and a line with numbered points following the finger for a swipe or drag, fading about a second after the finger lifts. It is removed before every capture, so the images and colours the AI reads never include it.
- Arguments sent quoted as one word are accepted (1.0.46).
drag "540,1200 600,1300",--until "brighter 125"and--grid "100,1516 177,177 6x5"work as they are; before they were refused as wrong arguments, costing the AI a round trip to resend. Text to type or find is still never split. - Every line of the log (
~/.z2term/ui/log.jsonl) now has the time the call took (ms) (1.0.46), so z2term's own time can be told apart from the time the AI spent thinking between calls.
Full Changelog: v1.0.45...v1.0.47
v1.0.45
変更内容
1.0.42〜1.0.45 の変更をまとめています。どれも AI からのアプリ操作(z2-ui)を速くするためのものです。
- 画面の色が条件を満たすまで、画像なしで待てるようになりました(1.0.43)。
z2-ui colors … --until 条件で、z2term の中で約 1/3 秒ごとに確かめ、満たした瞬間の色を文字で返します。- 条件は
brighter N/darker N(明るさの平均)、changed(どこかの色が変わった)、色の名前(すべての点がその色)です。 - 例: 「盤面が明るくなるまで(操作できる番になるまで)」「ランプが緑になるまで」。
- これまで AI は、撮った画像を読んで「まだ待つ」と決めるのを繰り返していて、1 回に 5〜10 秒かかっていました。
- 条件は
- 「動きが止まったか」の判定を直しました(1.0.42)。 画面の一部だけが動いている最中(数個の駒が消える・小さなダイアログなど)を「止まった」として早く返してしまうことがありました。
--boxを付けたときは、その範囲の中の動きだけを見ます。- 一部がずっと動いている画面で毎回最大まで待たされるときは、AI 操作の設定の「小さな動きも「動いている」とみる」を OFF にすると、前の判定に戻ります(1.0.44)。AI も呼び出しごとに
--settle-check strict|looseで選べます。
- 一部がずっと動いている画面で毎回最大まで待たされるときは、AI 操作の設定の「小さな動きも「動いている」とみる」を OFF にすると、前の判定に戻ります(1.0.44)。AI も呼び出しごとに
- 呼び出しの回数を減らす指定を足しました(1.0.42)。
shot/--shotに--gridを付けると、画像と色の格子を 1 回で返します。--expect-changeで、反応が遅い画面でも、変わるのを待ってから止まるのを待ちます。seqの途中の手でも--peek(指を置いたままの画面)を使えます。drag --hold MSで、動き出す前に始点で指を止められます。触れてすぐ動くと認めない画面で、なぞる速さを上げられます。
- AI 用ガイドに「繰り返しは手元のスクリプトに任せる」使い方を書き足しました(1.0.45)。 同じ手順が繰り返すときは、z2-ui を呼ぶ小さなスクリプトに任せ、知らない状態になったときだけ AI が判断します。許可・一時停止・停止はスクリプトにも今までどおり効きます。
Changes
This release collects the changes from 1.0.42 to 1.0.45, all of them to make AI app control (z2-ui) faster.
- Waiting until the screen's colours meet a condition, without any image (1.0.43).
z2-ui colors ... --until CONDchecks inside z2term about every third of a second and returns the colours as text the moment the condition holds.- Conditions:
brighter N/darker N(mean brightness),changed(any colour changed) or a colour name (every point has it). - For example "until the board brightens (it is my turn)" or "until the lamp is green".
- Before, the AI kept capturing, reading the image and deciding to wait again, at 5–10 s per round.
- Conditions:
- A better "has it stopped moving" check (1.0.42). A screen where only a part was still moving (a few pieces disappearing, a small dialog) could be reported as stopped too early. With
--box, only movement inside the box counts.- If a screen with a part that never stops now waits up to the limit every time, turn off "Catch small moving parts" in the AI operation settings to get the previous check (1.0.44). The AI can also choose per call with
--settle-check strict|loose.
- If a screen with a part that never stops now waits up to the limit every time, turn off "Catch small moving parts" in the AI operation settings to get the previous check (1.0.44). The AI can also choose per call with
- Fewer calls (1.0.42).
--gridonshot/--shotreturns the image and a colour grid in one call.--expect-changewaits for a late-reacting screen to change before waiting for it to stop.--peek(the screen while the finger is down) may be used in any one step of aseq.drag --hold MSkeeps the finger on the start point before moving, so screens that ignore an immediate move can be dragged faster.
- The AI guide now describes handing repeated loops to a local script (1.0.45). When the same procedure repeats, a small script that calls z2-ui runs it, and the AI decides only when the script meets something unknown. Permissions, pause and stop still apply to the script.
Full Changelog: v1.0.41...v1.0.45