@telosmaylx/dsh-session-notify 0.1.11 → 0.1.12

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/README.en.md CHANGED
@@ -549,6 +549,7 @@ The "Notification Permissions" area of the settings panel shows the current stat
549
549
 
550
550
  | Version | Date | Changes |
551
551
  | --- | --- | --- |
552
+ | **0.1.12** | 2026-08-29 | packaging cleanup: removed the temporary audit script that had been packed into scripts |
552
553
  | **0.1.11** | 2026-08-29 | New **custom notification media**: ① the template "+ Insert info" menu gains an **Image** token — insert `{image}` and pick a local file (**auto-compressed to 512px wide with a 16:9 center crop matching the notification display ratio**, shown as a thumbnail chip in the editor), uploaded per reason and stored in the settings document (stripped from the rendered body, never written into the session log); ② **notification image/icon are now upload cards** (empty = a rounded "+" tile, click to upload; **image 512×288 with a 16:9 center crop, icon 128×128 with a 1:1 square center crop**; once uploaded the card shows the thumbnail with a "×" at the top-right to remove it) — the crop guarantees the uploaded image appears complete in the notification card instead of being hard-cropped by the system's display area; ③ the **push-title "+ Insert info"** inserts any info token (session title / duration / usage / cache hit / speed), not just the title; the "Notification media" area in the settings panel now shows a **processing guide** (crop ratios) and a **thumbnail preview** after upload; ④ **per-reason notification icons** (insert the `{icon}` token in a template + local upload, 128×128 square, takes precedence over the global icon); ⑤ **removing an `{image}`/`{icon}` token clears that reason's image/icon data**; ⑥ **layout polish: "Body templates × 5" is now a collapsible section (collapsed by default to keep the panel compact, with a customized-count hint in the header, click to expand)**; ⑦ **layout polish ②: the notification image/icon upload cards sit side by side in one row; the push title and per-reason titles merge into a "Title" collapsible section (collapsed by default); collapse indicators now use triangle icons (the "Expand/Collapse" texts removed, reducing i18n burden)**; ⑧ **interaction polish: the push title is now a Chip editor (inserted info shows as chip tags instead of raw `{title}` codes); the image/icon cards are reordered (icon first); "Body templates × 5" renamed to "Content"; image/icon thumbnails open a fullscreen lightbox preview on click, and only the "×" removes a tag (no accidental removal)**; ⑨ **previews unified to the full original: upload now stores both the cropped version (for the notification) and an aspect-preserving full version (1024px, used by the lightbox), so card and chip previews both show the uncropped image; the collapse triangle icons are enlarged**; ⑩ **title info-token fix: `{duration}` `{usage}` `{error}` `{cache}` `{tps}` in the notification title are replaced with the session's real values, never leaking raw codes (chips in the editor, real data when sent); "Content" rows are now single-line (reason label + editor + a "+/−" insert button + a paper-plane send button)**; ⑪ **details: the live preview under each Content row is removed (more compact); the Content editors use a tighter padding (compact); the "+/−" and paper-plane buttons now have rectangular borders and are vertically centered**; ⑫ **deletion-experience fix: clearing a Content editor no longer restores the default text (it shows the placeholder hint instead), and the caret returns to the end after clearing — holding Backspace now deletes continuously; "+/−" now use SVG stroke icons (exactly centered in the button); the paper-plane icon is rotated 30° counterclockwise**; ⑬ **placeholder & default text: with an empty template (default preset) the editor directly shows the default text (what you see is what gets pushed); after editing, clearing shows the "leave empty to use the default text" placeholder — implemented with a CSS pseudo-element (behaves like a native input placeholder: non-selectable, non-deletable), replacing the previously copyable placeholder text**; ⑭ **details ②: the push-title placeholder now reads "Generic push title; leave empty to use the default title (per-reason titles below take precedence)"; clicking an empty editor moves the caret to the very start (typed text begins at the leftmost position, like a native placeholder); the paper-plane icon is rotated another 30° counterclockwise (60° total); the Content reason labels are now auto-width (editor hugs the label text); editor heights are unified (box-sizing border-box + min-height 38px, matching the plain inputs)**; ⑮ **details ③: the reason labels are back to a fixed 70px width (Content and per-reason titles aligned); Backspace/Delete on a chip is now handled manually so the caret stays at the deletion point (no more jumping to the start); the send button icon is now a bell (push/notification semantics); custom presets now also save the notification image/icon (including the full preview versions), the default preset stays empty**; ⑯ **details ④: the image/icon upload cards are now equal height (64px; the 16:9 image is 114px wide); the reason labels shrink from 70px to 60px; the send button icon changed from a bell to a rightward push arrow; the "Title" and "Content" collapsible headers are bold**; ⑰ **default text & labels: max-tokens is now uniformly shown as "Cap" (label / default title / placeholder, synced in all 5 languages); the per-reason default body is now "Session "{title}" completed. Click to view." (5 languages, editor hint and host rendering in sync); the per-reason title rows each gain a "+" insert button (like the push title: info tokens only, no image/icon, inserted at the caret)**; ⑱ **chips & preset management: the per-reason titles are now Chip editors (inserted info shows as chip tags instead of raw {title} codes; {image}{icon} are blocked — typed literally they stay as text and are stripped when sent); custom presets gain a "Rename" action (appears when a custom preset is selected; the dropdown and the active preset sync after renaming)**; ⑲ **details ⑤: Chip editor text is now vertically centered (line-height and chips unified to 20px, 9px vertical padding — single-line text sits centered in the 38px box); the "Title" and "Content" fold bars now have a filled background for contrast (rounded tinted bar as header, expanded body indented with a left border line); full audit of all 86 i18n keys across the 5 languages (all translated — tweaked zh-TW "Rename" and ko "Discard")**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ⑳ **details ⑥: the filled background of the "Title" / "Content" fold headers is removed; the placeholder text color is now rgba(127,127,127,0.5) (lighter, no longer affected by the theme variable)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉑ **fix: the divider lines between the per-reason rows under Content are removed; when Content is expanded, the line under the header is now present and spans the full width, matching Title; Backspace/Delete on a chip no longer jumps the caret to the start (inside the element container the chip is located by child-node index, covering the caret-right-after-chip and editor-end cases); renaming an unnamed preset upgrades it to a named preset (new id) so the dropdown shows the new name immediately**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉒ **fix: the placeholder hint no longer lingers after typing (the placeholder CSS selector is now aligned with the state attribute — it disappears as you type and text starts at the left); uploading/removing an image or icon keeps the caret in place instead of jumping to the start (the caret offset is saved before the DOM rebuild and restored after); the preset dropdown no longer shows a white focus/selected outline**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card); ㉓ **fix: deleting a chip (including image/icon) no longer moves or hides the caret, so backspace-deleting is continuous — the rebuild triggered by image-data changes is now on-demand (skipped when the DOM no longer contains that media chip and the template has no such tag, keeping the caret at the deletion point; only uploads/replacements that need a thumbnail refresh trigger a rebuild), and the caret-offset math was fixed (a chip counts as exactly one position, never walking into its inner text)**; the "Send" test buttons apply them too; effective on the system-notification channel only (the in-page toast is a text card) |
553
554
  | **0.1.10** | 2026-08-29 | "Push title" changed to a native input (native placeholder behavior: not copyable, disappears when typing, restores when cleared; "+ Session Title" inserts `{title}` at the cursor); docs add the QQ Browser built-in push popup explanation (actual behavior of the three push modes + the send button tests follow the same rule) |
554
555
  | **0.1.9** | 2026-08-29 | Push titles now support **per-reason customization** (collapsible UI, collapsed by default to stay lean; when empty, each reason uses a differentiated default title: task completed / task errored / task aborted / task blocked / task hit the output cap, in 5 languages); the projection upgraded to an object (kind/text/title) carrying the host-rendered title; the reset button **keeps the current language**; the default copy embeds the "session title" token (Session "{title}" completed, auto-falls back when there's no title); settings-panel template previews sync; "+ Insert Info" no longer auto-collapses after inserting a token; deleting a custom preset currently in use automatically switches back to the default; template preview fixed (doesn't hide on click, hides only when typing, restores when cleared); each reason gains a "Send" button (one-click test notification rendered with the current template) |
package/README.ja.md CHANGED
@@ -549,6 +549,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
549
 
550
550
  | バージョン | 日付 | 変更内容 |
551
551
  | --- | --- | --- |
552
+ | **0.1.12** | 2026-08-29 | パッケージ整理:scripts に混入した一時監査スクリプトを除去 |
552
553
  | **0.1.11** | 2026-08-29 | **カスタム通知メディア**を追加:① テンプレートの「+ 情報を挿入」メニューに**画像**トークンを追加——`{image}` を挿入してローカル画像を選択(**512px 幅・通知表示比率 16:9 で中央クロップ**に自動圧縮、エディタ内ではサムネイル付きチップとして表示)、理由ごとにアップロードして設定ドキュメントに保存(本文レンダリング時に剥除され、セッションログには書き込まれません)。② **通知イメージ/アイコンがアップロードカードに変更**(空欄は角丸の「+」タイルで、クリックでアップロード。**画像 512×288(16:9 中央クロップ)、アイコン 128×128(1:1 正方形中央クロップ)**。アップロード後はカードにサムネイルが表示され、右上の × で削除)——クロップにより、アップロードした画像が通知カードに完全に表示され、システムの表示領域による切り詰めを防ぎます。③ **プッシュタイトルの「+ 情報を挿入」**で任意の情報トークンを挿入(セッションタイトル/所要時間/消費/キャッシュヒット/速度)。設定パネルの「通知メディア」エリアに**処理方法の説明**(クロップ比率)と**アップロード後のサムネイルプレビュー**を表示。④ **理由ごとの通知アイコン**(テンプレートに `{icon}` トークンを挿入 + ローカルアップロード、128×128 正方形、グローバルより優先)。⑤ **`{image}`/`{icon}` トークンを削除するとその理由の画像/アイコンデータも消去**。⑥ **レイアウト改善:「本文テンプレート × 5」を折りたたみセクションに変更(既定で折りたたみ、パネルをコンパクトに。ヘッダーにカスタマイズ済みの数を表示、クリックで展開)**。⑦ **レイアウト改善②:通知イメージ/アイコンのアップロードカードを横並び 1 行に配置(間に余白);プッシュタイトルと理由ごとのタイトルを「タイトル」の折りたたみセクションに統合(既定で折りたたみ);折りたたみインジケーターを三角形アイコンに変更(「展開/折りたたむ」の文言を削除、i18n 負担を軽減)**。⑧ **操作改善:プッシュタイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、`{title}` などのコードが露出しない);画像/アイコンのカード順を入れ替え(アイコンが先);「本文テンプレート × 5」を「コンテンツ」に改名;画像/アイコンのサムネイルクリックで全画面プレビュー(ライトボックス)、タグは × クリックでのみ削除(誤削除防止)**。⑨ **プレビューを元画像に統一:アップロード時にクロップ版(通知用)と等比の完全版(1024px、ライトボックスの原図表示用)の両方を保存し、カードとタグの拡大プレビューはいずれも未クロップの元画像を表示。折りたたみの三角形アイコンを拡大**。⑩ **タイトルの情報トークン修正:通知タイトル内の `{duration}` `{usage}` `{error}` `{cache}` `{tps}` はセッションの実際の値に置き換えられ、コードが露出しません(編集時はカプセル、送信時は実データ)。「コンテンツ」を 1 行レイアウトに変更(理由ラベル + エディタ + 「+/-」挿入ボタン + 紙飛行機の送信ボタン)**。⑪ **詳細:コンテンツ行下のリアルタイムプレビューを削除(よりコンパクトに);コンテンツのエディタ内余白を縮小(compact);「+/-」と紙飛行機ボタンを角丸矩形枠・垂直中央揃えに変更**。⑫ **削除体験の修正:コンテンツを空にしてもデフォルト文面に戻らず(プレースホルダーを表示)、空にした後はカーソルが末尾に戻るため Backspace 長押しで連続削除可能;「+/-」を SVG 線アイコンに変更(ボタン枠に正確に中央揃え);紙飛行機アイコンを反時計回りに 30° 回転**。⑬ **プレースホルダーとデフォルト文面:テンプレートが空(既定プリセット)のときはエディタにデフォルト文面を直接表示(見たままがそのまま通知されます)。編集後に空にすると「空欄の場合はデフォルトの文面を使用」のプレースホルダーを表示——CSS 疑似要素で実装(ネイティブの input placeholder と同様:選択・削除不可)、従来のコピー可能なプレースホルダー文字列を置き換え**。⑭ **詳細②:プッシュタイトルのプレースホルダー文言を「共通のプッシュタイトル。空欄の場合はデフォルトタイトルを使用(下の理由別タイトルが優先)」に変更、空エディタをクリックするとカーソルが先頭に移動(入力文字が左端から始まる、ネイティブ placeholder と同様);紙飛行機アイコンをさらに反時計回りに 30° 回転(合計 60°);「コンテンツ」の理由ラベルを自動幅に変更(エディタがラベル文字に密着);エディタの高さを統一(box-sizing border-box + min-height 38px、通常の入力欄と同様)**。⑮ **詳細③:理由ラベルを固定 70px 幅に統一(コンテンツと理由別タイトルで一致);Backspace/Delete でのチップ削除を手動処理に変更し、カーソルを削除位置に復元(エディタ先頭に飛ばない);送信ボタンのアイコンをベル(プッシュ通知の意味)に変更;カスタムプリセットが通知イメージ/アイコン(完全版プレビュー含む)も保存するようになり、既定プリセットは空欄のまま**。⑯ **詳細④:通知イメージ/アイコンのアップロードカードを等高に(統一 64px 高、大図 16:9 は幅 114px);理由ラベルの幅を 70px → 60px に;送信ボタンのアイコンをベルから右向きのプッシュ矢印に変更;「タイトル」「コンテンツ」の折りたたみヘッダー文字を太字に**。⑰ **デフォルト文面とラベル:max-tokens の表示を「上限」に統一(ラベル/デフォルトタイトル/プレースホルダー、5 言語で同期);各理由のデフォルト文面を「セッション「{title}」完了。クリックして表示。」に変更(5 言語、エディタのヒントとホスト側レンダリングを同期);理由別タイトルの各行に「+」挿入ボタンを追加(プッシュタイトルと同様:情報トークンのみ、画像/アイコンなし、カーソル位置に挿入)**。⑱ **タグ化とプリセット管理:理由別タイトルを Chip エディタに変更(挿入した情報はカプセルタグとして表示され、{title} などのコードが露出しない;{image}{icon} は禁止——手入力時はリテラルテキストのまま、送信時に剥除);カスタムプリセットに「名前を変更」機能を追加(カスタムプリセット選択時に表示、変更後はドロップダウンと現在のプリセットが同期)**。⑲ **詳細⑤:Chip エディタの文字を垂直中央に配置(行の高さとカプセルを 20px に統一、上下パディング 9px、38px ボックス内で単行テキストが中央に表示);「タイトル」「コンテンツ」の折りたたみバーに背景色を追加(ヘッダーは角丸の色付きバー、展開領域は左ボーダー付きインデント);5 言語 86 キーの i18n を全面的に確認(すべて翻訳済み、zh-TW「名前を変更」と ko「破棄」の表現を修正)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);⑳ **詳細⑥:「タイトル」「コンテンツ」の折りたたみヘッダーの背景塗りを削除;プレースホルダー文字色を rgba(127,127,127,0.5) に変更(より淡く、テーマ変数の影響を受けない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉑ **修正:「コンテンツ」の各理由行間の区切り線を削除;「コンテンツ」を展開した際のヘッダー直下の線を「タイトル」と同様(全幅)に補完;Backspace/Delete でのチップ削除時、カーソルが先頭に飛ばないよう修正(要素コンテナ内では子ノードのインデックスからチップを特定、チップ直後・エディタ末尾のケースを含む);「未命名」プリセットの名前変更時は自動的に具名プリセットへ昇格(新しい id に置換)し、ドロップダウンに即座に新名を表示**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉒ **修正:文字入力後にプレースホルダーが残らないように(プレースホルダー CSS セレクタと状態属性を整合、入力すると即消え、文字は左端から);画像/アイコンのアップロード・削除後もカーソル位置を維持(DOM 再構築前にカーソルオフセットを保存し、再構築後に復元);プリセットのドロップダウンをフォーカスしても白い選択状態の枠線が出ないように**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード);㉓ **修正:チップ(画像/アイコン含む)削除後もカーソルが飛ばず消えず、連続削除が可能に——画像データ変更による再構築を必要なときだけ実行(DOM 内に対応するメディアチップがなくテンプレートにも該当タグがない場合は再構築をスキップし、カーソルを削除位置に維持。アップロード/置き換えでサムネイル更新が必要な場合のみ再構築)、カーソルオフセット計算も修正(チップは一律 1 位置として数え、内部文字には入らない)**。「送信」テストボタンも同様に適用。システム通知チャネルのみ有効(ページ内トーストはテキストカード) |
553
554
  | **0.1.10** | 2026-08-29 | 「プッシュタイトル」をネイティブ入力欄に変更(ネイティブのプレースホルダー:コピー不可、入力すると消え、空にすると復元。「+ セッションタイトル」でカーソル位置に `{title}` を挿入)。ドキュメントに QQ ブラウザの内蔵プッシュポップアップの説明を追記(3 つのプッシュ方式の実際の挙動 + 送信ボタンのテストも同じ規則) |
554
555
  | **0.1.9** | 2026-08-29 | プッシュタイトルが**理由別のカスタマイズ**に対応(折りたたみエリア UI、デフォルトで収納され冗長にならない。空欄時は各理由で異なるデフォルトタイトル:タスク完了 / タスクエラー / タスク中止 / タスクブロック / タスクが出力上限に到達、5 言語)。プロジェクションをオブジェクト(kind/text/title)にアップグレードし、host がレンダリングしたタイトルを保持。リセットボタンが**現在の言語を保持**。デフォルトメッセージに「セッションタイトル」ラベルを埋め込み(セッション「{title}」が完了、タイトルなしは自動フォールバック)。設定パネルのテンプレートプレビューを同期。「+ 情報を挿入」でラベル挿入後に自動折りたたみしなくなった。使用中のカスタムプリセットを削除すると自動的にデフォルトへ戻る。テンプレートプレビューを修正(クリックで消えない、入力でのみ非表示、空にすると復元)。各理由に「送信」ボタンを追加(現在のテンプレートでレンダリングしたテスト通知を 1 クリックで送信) |
package/README.ko.md CHANGED
@@ -549,6 +549,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
549
 
550
550
  | 버전 | 날짜 | 변경 |
551
551
  | --- | --- | --- |
552
+ | **0.1.12** | 2026-08-29 | 패키지 정리: scripts에 포함된 임시 감사 스크립트 제거 |
552
553
  | **0.1.11** | 2026-08-29 | **사용자 지정 알림 미디어** 추가: ① 템플릿의 「+ 정보 삽입」 메뉴에 **이미지** 토큰 추가——`{image}`를 삽입하고 로컬 이미지 선택(**512px 너비·알림 표시 비율 16:9 중앙 크롭**으로 자동 압축, 편집기에서는 썸네일이 있는 칩으로 표시), 사유별로 업로드하여 설정 문서에 저장(본문 렌더링 시 제거되어 세션 로그에 기록되지 않음). ② **알림 이미지/아이콘을 업로드 카드로 변경**(빈 상태는 둥근 모서리 "+" 타일, 클릭하면 업로드. **이미지 512×288(16:9 중앙 크롭), 아이콘 128×128(1:1 정사각 중앙 크롭)**. 업로드 후 카드에 썸네일 표시, 오른쪽 위 ×로 삭제)——크롭으로 업로드한 이미지가 알림 카드에 완전히 표시되어 시스템 표시 영역에 잘리지 않습니다. ③ **알림 제목의 「+ 정보 삽입」**으로 원하는 정보 토큰 삽입(세션 제목/소요 시간/소모/캐시 히트/속도). 설정 패널의 "알림 미디어" 영역에 **처리 방식 안내**(크롭 비율)와 **업로드 후 썸네일 미리보기** 표시. ④ **사유별 알림 아이콘**(템플릿에 `{icon}` 토큰 삽입 + 로컬 업로드, 128×128 정사각형, 전역보다 우선). ⑤ **`{image}`/`{icon}` 토큰을 삭제하면 해당 사유의 이미지/아이콘 데이터도 함께 삭제**. ⑥ **레이아웃 개선: "본문 템플릿 × 5"를 접이식 섹션으로 변경(기본 접힘, 패널을 컴팩트하게. 헤더에 사용자 지정된 개수 표시, 클릭하면 펼침)**. ⑦ **레이아웃 개선②: 알림 이미지/아이콘 업로드 카드를 한 줄에 나란히 배치(사이 여백); 푸시 제목과 사유별 제목을 "제목" 접이식 섹션으로 통합(기본 접힘); 접기 표시를 삼각형 아이콘으로 변경("펼치기/접기" 문구 제거, i18n 부담 감소)**. ⑧ **조작 개선: 푸시 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 `{title}` 같은 코드가 노출되지 않음); 이미지/아이콘 카드 순서 변경(아이콘 먼저); "본문 템플릿 × 5"를 "콘텐츠"로 개명; 이미지/아이콘 썸네일 클릭 시 전체 화면 미리보기(라이트박스), 태그는 × 클릭으로만 삭제(실수 삭제 방지)**. ⑨ **미리보기를 원본 이미지로 통일: 업로드 시 크롭 버전(알림용)과 비율 유지 전체 버전(1024px, 라이트박스 원본 표시용)을 함께 저장하여 카드와 태그의 확대 미리보기가 모두 크롭 없는 원본을 표시. 접기 삼각형 아이콘 확대**. ⑩ **제목 정보 토큰 수정: 알림 제목 안의 `{duration}` `{usage}` `{error}` `{cache}` `{tps}`가 세션의 실제 값으로 대체되어 코드가 노출되지 않음(편집 시 캡슐, 전송 시 실데이터). "콘텐츠"를 한 줄 레이아웃으로 변경(사유 라벨 + 편집기 + "+/-" 삽입 버튼 + 종이비행기 보내기 버튼)**. ⑪ **세부: 콘텐츠 행 아래 실시간 미리보기 제거(더 컴팩트하게); 콘텐츠 편집기 내부 여백 축소(compact); "+/-"와 종이비행기 버튼을 직사각형 테두리·세로 중앙 정렬로 변경**. ⑫ **삭제 경험 수정: 콘텐츠를 비워도 기본 문구로 복원되지 않음(플레이스홀더 표시), 비운 후 커서가 끝으로 돌아가 Backspace 길게 눌러 연속 삭제 가능; "+/-"를 SVG 선 아이콘으로 변경(버튼 테두리에 정확히 중앙 정렬); 종이비행기 아이콘을 시계 반대 방향 30° 회전**. ⑬ **플레이스홀더와 기본 문구: 템플릿이 비어 있으면(기본 프리셋) 편집기에 기본 문구를 직접 표시(보이는 대로 알림이 전송됨). 편집 후 비우면 "비우면 기본 문구 사용" 플레이스홀더 표시——CSS 의사 요소로 구현(네이티브 input placeholder와 동일: 선택·삭제 불가), 기존 복사 가능한 플레이스홀더 문자열 대체**. ⑭ **세부②: 푸시 제목 플레이스홀더 문구를 "공통 푸시 제목. 비우면 기본 제목 사용(아래 사유별 제목이 우선)"으로 변경, 빈 편집기 클릭 시 커서가 맨 앞으로 이동(입력 문자가 왼쪽 끝에서 시작, 네이티브 placeholder와 동일); 종이비행기 아이콘을 시계 반대 방향으로 30° 더 회전(총 60°); "콘텐츠"의 사유 라벨을 자동 너비로 변경(편집기가 라벨 글자에 밀착); 편집기 높이 통일(box-sizing border-box + min-height 38px, 일반 입력 상자와 동일)**. ⑮ **세부③: 사유 라벨을 고정 70px 너비로 통일(콘텐츠와 사유별 제목 일치); Backspace/Delete로 칩 삭제 시 수동 처리로 변경해 커서를 삭제 위치에 복원(편집기 맨 앞으로 점프하지 않음); 보내기 버튼 아이콘을 벨(푸시 알림 의미)로 변경; 사용자 지정 프리셋이 알림 이미지/아이콘(전체 미리보기 버전 포함)도 저장하며, 기본 프리셋은 비워 둠**. ⑯ **세부④: 알림 이미지/아이콘 업로드 카드 높이 통일(64px 고정, 16:9 대형 이미지는 폭 114px); 사유 라벨 폭 70px → 60px; 보내기 버튼 아이콘을 벨에서 오른쪽 푸시 화살표로 변경; "제목" "콘텐츠" 접이식 헤더 텍스트를 굵게**. ⑰ **기본 문구와 라벨: max-tokens 표시를 "한도"로 통일(라벨/기본 제목/플레이스홀더, 5개 언어 동기화); 각 사유 기본 문구를 "세션 "{title}" 완료. 클릭하여 확인."으로 변경(5개 언어, 편집기 힌트와 호스트 렌더링 동기화); 사유별 제목 각 행에 "+" 삽입 버튼 추가(푸시 제목과 동일: 정보 토큰만, 이미지/아이콘 제외, 커서 위치에 삽입)**. ⑱ **태그화와 프리셋 관리: 사유별 제목을 Chip 편집기로 변경(삽입한 정보가 캡슐 태그로 표시되어 {title} 같은 코드가 노출되지 않음; {image}{icon} 금지——수동 입력 시 리터럴 텍스트 유지, 전송 시 제거); 사용자 지정 프리셋에 "이름 변경" 기능 추가(사용자 지정 프리셋 선택 시 표시, 이름 변경 후 드롭다운과 현재 프리셋 동기화)**. ⑲ **세부 ⑤: Chip 편집기 텍스트 세로 중앙 정렬(줄 높이와 캡슐 20px로 통일, 상하 패딩 9px, 38px 상자 안에서 단일 줄 텍스트 중앙 표시); "제목" "콘텐츠" 접이식 바에 배경색 채움으로 구분(헤더는 둥근 배경 바, 펼쳐진 영역은 왼쪽 보더 들여쓰기); 5개 언어 86개 문구 키 전체 점검(모두 번역 완료, zh-TW "이름 변경"과 ko "포기" 표현 수정)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ⑳ **세부⑥: "제목" "콘텐츠" 접이식 헤더의 배경 채우기 제거; 플레이스홀더 글자색을 rgba(127,127,127,0.5)로 변경(더 옅어지고 테마 변수 영향 없음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉑ **수정: "콘텐츠"의 각 사유 행 사이 구분선 제거; "콘텐츠" 펼침 시 헤더 바로 아래 선을 "제목"과 동일(전체 너비)하게 보완; Backspace/Delete로 칩 삭제 시 커서가 맨 앞으로 점프하지 않음(요소 컨테이너 내에서는 자식 노드 인덱스로 칩 식별, 칩 바로 뒤/편집기 끝 케이스 포함); "이름 없음" 프리셋 이름 변경 시 자동으로 명명 프리셋으로 승격(새 id로 교체)되어 드롭다운에 새 이름 즉시 표시**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉒ **수정: 텍스트 입력 후 플레이스홀더가 남지 않음(플레이스홀더 CSS 선택자와 상태 속성을 정렬, 입력 즉시 사라지고 문자는 왼쪽 끝에서 시작); 이미지/아이콘 업로드·삭제 후 커서 위치 유지(DOM 재구축 전 커서 오프셋 저장, 재구축 후 복원); 프리셋 드롭다운 포커스 시 흰색 선택 상태 테두리 제거**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드); ㉓ **수정: 칩(이미지/아이콘 포함) 삭제 후 커서가 튀거나 사라지지 않고 연속 삭제 가능——이미지 데이터 변경으로 인한 재구축을 필요한 경우에만 실행(DOM에 해당 미디어 칩이 없고 템플릿에도 해당 태그가 없으면 재구축을 건너뛰어 커서를 삭제 위치에 유지. 업로드/교체로 썸네일 갱신이 필요한 경우에만 재구축), 커서 오프셋 계산도 수정(칩은 항상 1개 위치로 계산, 내부 텍스트로 들어가지 않음)**. 「보내기」 테스트 버튼에도 동일 적용. 시스템 알림 채널에만 적용(페이지 내 토스트는 텍스트 카드) |
553
554
  | **0.1.10** | 2026-08-29 | 「알림 제목」을 네이티브 입력 상자로 변경(네이티브 placeholder 안내: 복사 불가, 입력 시 사라짐, 비우면 복원. 「+ 세션 제목」으로 커서 위치에 `{title}` 삽입). 문서에 QQ 브라우저 내장 푸시 팝업 설명 추가(세 가지 알림 방식의 실제 동작 + 전송 버튼 테스트도 동일 규칙) |
554
555
  | **0.1.9** | 2026-08-29 | 알림 제목에 **사유별 커스터마이징** 지원(접는 영역 UI, 기본 접힘으로 비대하지 않음. 비워 두면 각 사유에 차별화된 기본 제목 사용: 작업 완료/작업 오류/작업 중단/작업 차단/작업 출력 상한 도달, 5개 언어). 프로젝션을 객체(kind/text/title)로 업그레이드해 host가 렌더링한 제목을 전달. 초기화 버튼이 **현재 언어를 유지**. 기본 문구에 「세션 제목」 라벨 내장(세션 「{title}」 완료, 제목 없으면 자동 폴백). 설정 패널 템플릿 미리보기 동기화. 「+ 정보 삽입」 후 라벨을 삽입해도 더 이상 자동으로 접히지 않음. 사용 중인 커스텀 프리셋을 삭제하면 기본으로 자동 전환. 템플릿 미리보기 수정(클릭해도 사라지지 않고, 입력 시에만 숨겨지며, 비우면 복원). 각 사유마다 「전송」 버튼 추가(원클릭으로 현재 템플릿이 렌더링한 테스트 알림 전송) |
package/README.md CHANGED
@@ -549,6 +549,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
549
 
550
550
  | 版本 | 日期 | 变更 |
551
551
  | --- | --- | --- |
552
+ | **0.1.12** | 2026-08-29 | 发布包清理:移除打包进 scripts 的临时审计脚本 |
552
553
  | **0.1.11** | 2026-08-29 | 新增**自定义通知图片**:① 模板「+ 插入信息」新增**图片**标签——插入 `{image}` 并选择本地图片(**自动压缩至 512px 宽、按通知显示比例 16:9 居中裁切**,编辑器内显示为带缩略图的小标签),按原因独立上传、保存于设置文档(正文渲染时剥除,不进会话日志);② **通知大图/通知图标改为上传卡片**(空态 = 圆角矩形 + 号,点击上传;**大图 512×288(16:9 居中裁切)、图标 128×128(1:1 方形居中裁切)**;已上传显示缩略图,右上角 × 删除)——裁切保证上传的图完整显示在通知卡片中,不被系统按显示区域硬裁;③ **推送标题的「+ 插入信息」**可插入任意信息位(会话标题/用时/消耗/缓存命中/速度),不再只有会话标题;设置面板「通知图片」区显示**处理方式说明**(裁切比例)与**上传后的缩略图预览**;④ **按原因指定通知图标**(模板插入 `{icon}` 标签 + 本地上传,128×128 方形,优先于全局图标);⑤ **删除 `{image}`/`{icon}` 标签即清除该原因的图片/图标数据**;⑥ **布局优化:「正文模板 × 5」改为折叠区(默认收起保持面板简洁,头部显示已自定义条数,点击展开)**;⑦ **布局优化②:通知大图/图标上传卡片并排一行(中间留白);推送标题与按原因定制标题合并为「标题」折叠区(默认收起);折叠指示改为三角形图标(移除「展开/收起」文案,减少 i18n 负担)**;⑧ **交互优化:推送标题改为 Chip 编辑器(插入的信息显示为胶囊标签,不再暴露 `{title}` 等代码);通知大图/图标顺序调换(图标在前);「正文模板 × 5」改名为「内容」;图片/图标缩略图点击可全屏预览大图(lightbox),标签只有点 × 才删除(防误删)**;⑨ **预览统一为完整原图:上传时同时保存裁切版(通知用)与等比完整版(1024px,lightbox 查看原图用),卡片与标签的放大预览都显示未裁切的原始图像;折叠三角形图标放大**;⑩ **标题信息位修复:通知标题里的 `{duration}` `{usage}` `{error}` `{cache}` `{tps}` 会替换为会话实际值,不再泄漏代码文本(编辑时胶囊、发送时真实数据);「内容」改为一行式布局(原因标签 + 编辑器 + 「+/-」插入按钮 + 纸飞机发送按钮)**;⑪ **细节:移除内容行下方的实时预览(更紧凑);内容编辑器内边距收窄(compact);「+/-」与纸飞机按钮改矩形边框、垂直居中**;⑫ **删除体验修复:内容删空后不再复原为默认文案(改显示占位提示),且删空后光标自动回到末尾——按住 Backspace 可连续删除;「+/-」改用 SVG 线条图标(相对按钮边框精确居中);纸飞机图标逆时针旋转 30°**;⑬ **占位与默认文案:默认预设(空模板)时编辑器直接显示默认文案(所见即所推);编辑后删空显示「留空则使用默认文案」占位——改用 CSS 伪元素实现(与原生 input placeholder 一致:不可选中、不可删除),替换原可复制的占位文本**;⑭ **细节②:推送标题占位描述改为「通用推送标题,留空时则使用默认标题,优先级低于下方自定义标题」,空编辑器点击时光标移到最前(输入文字从最左开始,与原生 placeholder 一致);纸飞机图标再逆时针转 30°(共 60°);「内容」原因标签改为自适应宽度(编辑器紧贴标签文字);编辑器高度统一(box-sizing border-box + min-height 38px,与普通输入框一致)**;⑮ **细节③:原因标签统一为固定 70px 宽(内容与按原因定制标题一致);Backspace/Delete 删除标签改为手动删除并恢复光标到删除位置(不再跳到编辑器开头);发送按钮图标更换为铃铛(推送语义);自定义预设现在同时保存通知大图/图标(含完整预览版),默认预设保持留空**;⑯ **细节④:通知大图/图标上传卡片等高(统一 64px 高,大图 16:9 宽 114px);原因标签宽 70px → 60px;发送按钮图标由铃铛改为向右推送箭头;「标题」「内容」折叠区标题文字加粗**;⑰ **默认文案与标签:max-tokens 的显示统一改为「上限」(标签/默认标题/占位,5 语言同步);各原因默认文案改为「会话「{title}」已xx,请点击查看。」(5 语言,编辑器的 hint 与宿主实际渲染同步);按原因定制标题每行新增「+」插入按钮(同推送标题:仅信息标签,不含图片/图标,插入到光标处)**;⑱ **标签化与预设管理:按原因定制标题改为 Chip 编辑器(插入的信息以胶囊标签显示,不再暴露 `{title}` 等代码;禁止 `{image}`/`{icon}`——手输保持字面文本、发送时剥除);自定义预设新增「重命名」功能(选中自定义预设时出现重命名按钮,改名后下拉与当前预设同步)**;⑲ **细节⑤:Chip 编辑器文字垂直居中(行高与胶囊统一 20px、上下内边距 9px,单行文字在 38px 框内正中);「标题」「内容」折叠栏加底色填充区分(折叠头为圆角底色栏,展开内容区带左侧竖线缩进);全面核对 5 语言 86 个文案键(全部翻译齐全,修订 zh-tw「重新命名」、ko「放弃」两处用词)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);⑳ **细节⑥:移除「标题」「内容」折叠头的底色填充;占位符文字颜色改为 rgba(127,127,127,0.5)(更淡,不再受主题变量影响)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉑ **修复:移除「内容」各原因行之间的分隔横线;「内容」折叠区展开后头下方的横线补齐,与「标题」一致(全宽);退格/删除键删除胶囊时光标不再跳到开头(元素容器内按子节点序号取胶囊,含光标在胶囊后/编辑器末尾的场景);重命名「未命名」预设时自动升级为具名预设(换用新 id),下拉立即显示新名字**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉒ **修复:输入文字后占位提示不再残留(占位 CSS 选择器与状态属性对齐,输入即消失,文字从最左开始);上传/删除图片、图标后光标保持原位,不再跳到最前(重建 DOM 前保存光标偏移、重建后恢复);预设下拉框聚焦时不再出现白色选中态描边**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片);㉓ **修复:删除标签(含图片/图标胶囊)后光标不再跳走或消失,可连贯连续删除——图片数据变化触发的重建改为按需执行(DOM 中已无该媒体胶囊且模板无对应标签时跳过重建,光标保留在原删除位置;仅上传/替换图片需要刷新缩略图时才重建),并修正光标偏移计算(胶囊统一按 1 个位置计,不深入内部文字)**;各原因「发送」测试按钮同样生效;仅系统通知通道生效(页内 toast 为文字卡片) |
553
554
  | **0.1.10** | 2026-08-29 | 「推送标题」改为原生输入框(原生占位提示:不可复制、输入才消失、清空恢复;「+ 会话标题」在光标处插入 `{title}`);文档补充 QQ 浏览器内置推送弹窗说明(三种推送方式的实际表现 + 发送按钮测试同规则);**多语言 README**:中文设为主页,新增 English / 繁體中文 / 日本語 / 한국어 版本(顶部语言切换互链) |
554
555
  | **0.1.9** | 2026-08-29 | 推送标题支持**按原因定制**(折叠区 UI,默认收起不臃肿;留空时各原因用差异化默认标题:任务已完成/任务出错/任务已中止/任务被阻塞/任务达到输出上限,5 语言);投影升级为对象(kind/text/title)承载 host 渲染好的标题;重置按钮**保留当前语言**;默认文案内嵌「会话标题」标签(会话「{title}」已完成,无标题自动回退);设置面板模板预览同步;「+插入信息」插入标签后不再自动折叠;删除当前使用的自定义预设自动切回默认;模板预览修复(点击不消失、输入才隐藏、清空恢复);每个原因新增「发送」按钮(一键发当前模板渲染的测试通知) |
package/README.zh-TW.md CHANGED
@@ -549,6 +549,7 @@ node scripts/verify-notice.mjs <session.jsonl.zstd>
549
549
 
550
550
  | 版本 | 日期 | 變更 |
551
551
  | --- | --- | --- |
552
+ | **0.1.12** | 2026-08-29 | 發佈套件清理:移除打包進 scripts 的臨時稽核腳本 |
552
553
  | **0.1.11** | 2026-08-29 | 新增**自訂通知圖片**:① 模板「+ 插入資訊」新增**圖片**標籤——插入 `{image}` 並選擇本機圖片(**自動壓縮至 512px 寬、按通知顯示比例 16:9 居中裁切**,編輯器內顯示為帶縮圖的小標籤),按原因獨立上傳、儲存於設定文件(正文渲染時剝除,不寫入會話日誌);② **通知大圖/通知圖示改為上傳卡片**(空態 = 圓角矩形 + 號,點擊上傳;**大圖 512×288(16:9 居中裁切)、圖示 128×128(1:1 方形居中裁切)**;已上傳顯示縮圖,右上角 × 刪除)——裁切保證上傳的圖完整顯示在通知卡片中,不被系統按顯示區域硬裁;③ **推送標題的「+ 插入資訊」**可插入任意資訊位(會話標題/用時/消耗/快取命中/速度),不再只有會話標題;設定面板「通知圖片」區顯示**處理方式說明**(裁切比例)與**上傳後的縮圖預覽**;④ **按原因指定通知圖示**(模板插入 `{icon}` 標籤 + 本機上傳,128×128 方形,優先於全域圖示);⑤ **刪除 `{image}`/`{icon}` 標籤即清除該原因的圖片/圖示資料**;⑥ **佈局優化:「正文模板 × 5」改為摺疊區(預設收起保持面板簡潔,頭部顯示已自訂條數,點擊展開)**;⑦ **佈局優化②:通知大圖/圖示上傳卡片並排一行(中間留白);推送標題與按原因自訂標題合併為「標題」摺疊區(預設收起);摺疊指示改為三角形圖示(移除「展開/收起」文案,減少 i18n 負擔)**;⑧ **互動優化:推送標題改為 Chip 編輯器(插入的資訊顯示為膠囊標籤,不再暴露 `{title}` 等代碼);通知大圖/圖示順序調換(圖示在前);「正文模板 × 5」改名為「內容」;圖片/圖示縮圖點擊可全螢幕預覽大圖(lightbox),標籤只有點 × 才刪除(防誤刪)**;⑨ **預覽統一為完整原圖:上傳時同時保存裁切版(通知用)與等比完整版(1024px,lightbox 查看原圖用),卡片與標籤的放大預覽都顯示未裁切的原始圖像;摺疊三角形圖示放大**;⑩ **標題資訊位修復:通知標題裡的 `{duration}` `{usage}` `{error}` `{cache}` `{tps}` 會替換為會話實際值,不再洩漏代碼文字(編輯時膠囊、發送時真實資料);「內容」改為一行式佈局(原因標籤 + 編輯器 + 「+/-」插入按鈕 + 紙飛機發送按鈕)**;⑪ **細節:移除內容行下方的即時預覽(更緊湊);內容編輯器內邊距收窄(compact);「+/-」與紙飛機按鈕改矩形邊框、垂直居中**;⑫ **刪除體驗修復:內容刪空後不再復原為預設文案(改顯示佔位提示),且刪空後游標自動回到末尾——按住 Backspace 可連續刪除;「+/-」改用 SVG 線條圖示(相對按鈕邊框精確置中);紙飛機圖示逆時針旋轉 30°**;⑬ **佔位與預設文案:預設預設(空模板)時編輯器直接顯示預設文案(所見即所推);編輯後刪空顯示「留空則使用預設文案」佔位——改用 CSS 偽元素實現(與原生 input placeholder 一致:不可選取、不可刪除),取代原可複製的佔位文字**;⑭ **細節②:推送標題佔位描述改為「通用推送標題,留空時則使用預設標題,優先級低於下方自訂標題」,空編輯器點擊時游標移到最前(輸入文字從最左開始,與原生 placeholder 一致);紙飛機圖示再逆時針轉 30°(共 60°);「內容」原因標籤改為自適應寬度(編輯器緊貼標籤文字);編輯器高度統一(box-sizing border-box + min-height 38px,與普通輸入框一致)**;⑮ **細節③:原因標籤統一為固定 70px 寬(內容與按原因自訂標題一致);Backspace/Delete 刪除標籤改為手動刪除並恢復游標到刪除位置(不再跳到編輯器開頭);傳送按鈕圖示更換為鈴鐺(推送語義);自訂預設現在同時儲存通知大圖/圖示(含完整預覽版),預設預設保持留空**;⑯ **細節④:通知大圖/圖示上傳卡片等高(統一 64px 高,大圖 16:9 寬 114px);原因標籤寬 70px → 60px;傳送按鈕圖示由鈴鐺改為向右推送箭頭;「標題」「內容」摺疊區標題文字加粗**;⑰ **預設文案與標籤:max-tokens 的顯示統一改為「上限」(標籤/預設標題/佔位,5 語言同步);各原因預設文案改為「會話「{title}」已xx,請點擊查看。」(5 語言,編輯器的 hint 與宿主實際渲染同步);按原因自訂標題每行新增「+」插入按鈕(同推送標題:僅資訊標籤,不含圖片/圖示,插入到游標處)**;⑱ **標籤化與預設管理:按原因自訂標題改為 Chip 編輯器(插入的資訊以膠囊標籤顯示,不再暴露 {title} 等代碼;禁止 {image}{icon}——手輸保持字面文本、發送時剝除);自訂預設新增「重新命名」功能(選中自訂預設時出現重新命名按鈕,改名後下拉與目前預設同步)**;⑲ **細節⑤:Chip 編輯器文字垂直置中(行高與膠囊統一 20px、上下內邊距 9px,單行文字在 38px 框內正中);「標題」「內容」折疊欄加底色填充區分(折疊頭為圓角底色欄,展開內容區帶左側豎線縮排);全面核對 5 語言 86 個文案鍵(全部翻譯齊全,修訂 zh-TW「重新命名」、ko「放棄」兩處用詞)**;各原因「傳送」測試按鈕同樣生效;僅系統通知通道生效(頁內 toast 為文字卡片);⑳ **細節⑥:移除「標題」「內容」摺疊頭的底色填充;佔位符文字顏色改為 rgba(127,127,127,0.5)(更淡,不再受主題變數影響)**;各原因「傳送」測試按鈕同樣生效;僅系統通知通道生效(頁內 toast 為文字卡片);㉑ **修復:移除「內容」各原因行之間的分隔橫線;「內容」摺疊區展開後頭下方的橫線補齊,與「標題」一致(全寬);退格/刪除鍵刪除標籤時游標不再跳到開頭(元素容器內按子節點序號取標籤,含游標在標籤後/編輯器末尾的場景);重新命名「未命名」預設時自動升級為具名預設(換用新 id),下拉立即顯示新名字**;各原因「傳送」測試按鈕同樣生效;僅系統通知通道生效(頁內 toast 為文字卡片);㉒ **修復:輸入文字後佔位提示不再殘留(佔位 CSS 選擇器與狀態屬性對齊,輸入即消失,文字從最左開始);上傳/刪除圖片、圖示後游標保持原位,不再跳到最前(重建 DOM 前儲存游標偏移、重建後恢復);預設下拉框聚焦時不再出現白色選中態描邊**;各原因「傳送」測試按鈕同樣生效;僅系統通知通道生效(頁內 toast 為文字卡片);㉓ **修復:刪除標籤(含圖片/圖示膠囊)後游標不再跳走或消失,可連貫連續刪除——圖片資料變化觸發的重建改為按需執行(DOM 中已無該媒體膠囊且模板無對應標籤時跳過重建,游標保留在原刪除位置;僅上傳/替換圖片需要刷新縮圖時才重建),並修正游標偏移計算(膠囊統一按 1 個位置計,不深入內部文字)**;各原因「傳送」測試按鈕同樣生效;僅系統通知通道生效(頁內 toast 為文字卡片) |
553
554
  | **0.1.10** | 2026-08-29 | 「推送標題」改為原生輸入框(原生佔位提示:不可複製、輸入才消失、清空恢復;「+ 會話標題」在游標處插入 `{title}`);文件補充 QQ 瀏覽器內建推送彈出視窗說明(三種推送方式的實際表現 + 傳送按鈕測試同規則) |
554
555
  | **0.1.9** | 2026-08-29 | 推送標題支援**按原因自訂**(收合區 UI,預設收合不臃腫;留空時各原因用差異化預設標題:任務已完成/任務出錯/任務已中止/任務被阻塞/任務達到輸出上限,5 語言);投影升級為物件(kind/text/title)承載 host 渲染好的標題;重置按鈕**保留目前語言**;預設文案內嵌「會話標題」標籤(會話「{title}」已完成,無標題自動回退);設定面板模板預覽同步;「+插入資訊」插入標籤後不再自動收合;刪除目前使用的自訂預設自動切回預設;模板預覽修復(點擊不消失、輸入才隱藏、清空恢復);每個原因新增「傳送」按鈕(一鍵發目前模板渲染的測試通知) |
package/package.json CHANGED
@@ -1,74 +1,74 @@
1
- {
2
- "name": "@telosmaylx/dsh-session-notify",
3
- "version": "0.1.11",
4
- "description": "DSH session completion notifier: appends a plugin system message to the session log on turn/end and pushes browser notifications (Web Notification + toast), with a fully customizable official settings panel (presets, 5-language templates, cache-hit rate & tok/s from official projections).",
5
- "private": false,
6
- "type": "module",
7
- "main": "./lib/index.js",
8
- "exports": {
9
- ".": {
10
- "default": "./lib/index.js"
11
- },
12
- "./client": {
13
- "default": "./lib/client.js"
14
- },
15
- "./core": {
16
- "default": "./lib/core.js"
17
- },
18
- "./package.json": "./package.json"
19
- },
20
- "files": [
21
- "lib",
22
- "scripts",
23
- "cordis.patch.yml",
24
- "README.md",
25
- "README.en.md",
26
- "README.zh-TW.md",
27
- "README.ja.md",
28
- "README.ko.md",
29
- "LICENSE"
30
- ],
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "keywords": [
35
- "deepseek-harness",
36
- "dsh",
37
- "dsh-plugin",
38
- "session-notify",
39
- "notification",
40
- "completion-reminder",
41
- "agent"
42
- ],
43
- "author": "dsh-session-notify contributors",
44
- "license": "MIT",
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https://github.com/TelosmaYLX/dsh-session-notify.git"
48
- },
49
- "homepage": "https://github.com/TelosmaYLX/dsh-session-notify#readme",
50
- "bugs": {
51
- "url": "https://github.com/TelosmaYLX/dsh-session-notify/issues"
52
- },
53
- "peerDependencies": {
54
- "cordis": ">=4.0.0-rc <5"
55
- },
56
- "engines": {
57
- "node": ">=22"
58
- },
59
- "dsh": {
60
- "bundle": {
61
- "patch": "./cordis.patch.yml"
62
- },
63
- "client": {
64
- "inject": [
65
- "@deepseek-ai/dsh-client-runtime"
66
- ],
67
- "platform": "web"
68
- }
69
- },
70
- "scripts": {
71
- "build": "bash scripts/build.sh || node --check lib/index.js && node --check lib/core.js && node --check lib/client.js",
72
- "prepublishOnly": "node --check lib/index.js && node --check lib/core.js && node --check lib/client.js"
73
- }
74
- }
1
+ {
2
+ "name": "@telosmaylx/dsh-session-notify",
3
+ "version": "0.1.12",
4
+ "description": "DSH session completion notifier: appends a plugin system message to the session log on turn/end and pushes browser notifications (Web Notification + toast), with a fully customizable official settings panel (presets, 5-language templates, cache-hit rate & tok/s from official projections).",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "default": "./lib/index.js"
11
+ },
12
+ "./client": {
13
+ "default": "./lib/client.js"
14
+ },
15
+ "./core": {
16
+ "default": "./lib/core.js"
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "lib",
22
+ "scripts",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "README.en.md",
26
+ "README.zh-TW.md",
27
+ "README.ja.md",
28
+ "README.ko.md",
29
+ "LICENSE"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "keywords": [
35
+ "deepseek-harness",
36
+ "dsh",
37
+ "dsh-plugin",
38
+ "session-notify",
39
+ "notification",
40
+ "completion-reminder",
41
+ "agent"
42
+ ],
43
+ "author": "dsh-session-notify contributors",
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/TelosmaYLX/dsh-session-notify.git"
48
+ },
49
+ "homepage": "https://github.com/TelosmaYLX/dsh-session-notify#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/TelosmaYLX/dsh-session-notify/issues"
52
+ },
53
+ "peerDependencies": {
54
+ "cordis": ">=4.0.0-rc <5"
55
+ },
56
+ "engines": {
57
+ "node": ">=22"
58
+ },
59
+ "dsh": {
60
+ "bundle": {
61
+ "patch": "./cordis.patch.yml"
62
+ },
63
+ "client": {
64
+ "inject": [
65
+ "@deepseek-ai/dsh-client-runtime"
66
+ ],
67
+ "platform": "web"
68
+ }
69
+ },
70
+ "scripts": {
71
+ "build": "bash scripts/build.sh || node --check lib/index.js && node --check lib/core.js && node --check lib/client.js",
72
+ "prepublishOnly": "node --check lib/index.js && node --check lib/core.js && node --check lib/client.js"
73
+ }
74
+ }
@@ -1,70 +0,0 @@
1
- // 检查 5 语言 i18n 键一致性:解析 lib/client.js 的 5 个语言块,对比键集合与空值
2
- import { readFileSync } from 'node:fs'
3
-
4
- const src = readFileSync('lib/client.js', 'utf8')
5
- const lines = src.split('\n')
6
-
7
- // 找到每个语言块的起始行
8
- const LANG_KEYS = ['zh', "'zh-tw'", 'en', 'ja', 'ko']
9
- const blocks = {}
10
- for (let i = 0; i < lines.length; i++) {
11
- const m = /^\s*(?:'([a-z-]+)'|([a-z]+))\s*:\s*\{/.exec(lines[i])
12
- if (m) {
13
- const key = m[1] || m[2]
14
- // 只收集 I18N 主块(在 i18n 区域 40-180 行附近,避免误抓其他对象)
15
- if (i < 200 && (LANG_KEYS.includes("'" + key + "'") || LANG_KEYS.includes(key))) {
16
- // 读取到闭合的 }, 或 }, 或 }, 或
17
- let block = ''
18
- let j = i
19
- let depth = 0
20
- let started = false
21
- for (; j < lines.length; j++) {
22
- const l = lines[j]
23
- for (const ch of l) {
24
- if (ch === '{') { depth++; started = true }
25
- else if (ch === '}') depth--
26
- }
27
- block += l + '\n'
28
- if (started && depth <= 0) break
29
- }
30
- blocks[key] = block
31
- }
32
- }
33
- }
34
-
35
- if (Object.keys(blocks).length < 5) {
36
- console.log('FAIL: 只找到语言块:', Object.keys(blocks))
37
- process.exit(1)
38
- }
39
-
40
- // 提取键:匹配 key: 'value' 或 key: "value"(含嵌套对象如 fields: {...} —— 只取顶层键)
41
- function extractKeys(block) {
42
- const keys = new Set()
43
- const re = /^\s*([A-Za-z][A-Za-z0-9]*)\s*:/gm
44
- let m
45
- while ((m = re.exec(block))) keys.add(m[1])
46
- // 去掉块首行(语言名,如 "zh: {" / "'zh-tw': {")
47
- keys.delete('zh'); keys.delete('en'); keys.delete('ja'); keys.delete('ko')
48
- return keys
49
- }
50
-
51
- const zhKeys = extractKeys(blocks['zh'])
52
- console.log('zh 键数量:', zhKeys.size)
53
-
54
- let allOk = true
55
- for (const lang of ['zh-tw', 'en', 'ja', 'ko']) {
56
- const k = extractKeys(blocks[lang])
57
- const missing = [...zhKeys].filter((x) => !k.has(x))
58
- const extra = [...k].filter((x) => !zhKeys.has(x))
59
- console.log(`\n[${lang}] 键数 ${k.size}`)
60
- if (missing.length) { console.log(' 缺少(相对zh):', missing.join(', ')); allOk = false }
61
- if (extra.length) console.log(' 多余(相对zh):', extra.join(', '))
62
- // 检查关键值是否为空
63
- for (const key of [...zhKeys]) {
64
- const vm = new RegExp('\\b' + key + '\\s*:\\s*([\'"])(.*?)\\1').exec(blocks[lang])
65
- if (vm && vm[2] === '' ) { console.log(` [${lang}] 键 ${key} 值为空!`); allOk = false }
66
- }
67
- }
68
-
69
- console.log('\n===== i18n 键一致性: ' + (allOk ? 'PASS' : 'FAIL') + ' =====')
70
- process.exit(allOk ? 0 : 1)