@aiquants/daily-report 0.46.0 → 0.46.1

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 CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to `@aiquants/daily-report` are documented here.
4
4
 
5
+ ## 0.46.1 (2026-10-16)
6
+
7
+ 版番号は 0.46.1 (patch) とする: 公開の型は変えず、外部ソースの日報へ誤って書き込む経路を閉じる。
8
+
9
+ ### Fixed
10
+
11
+ - **外部ソースの日報は、持ち主でも変えられない**: 編集と削除の入口 (DetailList のカードと List の側面ペインのボタン、ダブルクリック) と下書きの
12
+ 自動の編集は、閲覧者が持ち主かどうかだけで出ていた。そのため外部ソースの日報 (ホストの `externalSources` のアダプタが外部の表から読む日報) の
13
+ 持ち主にも出ていた。保存すると件名だけが hub に書かれて外部の表と食い違い、本文は内部の表に行が無いので何も書かれないまま成功を答えた
14
+ (画面は保存の直後だけ新しい本文を見せ、読み直すと元の本文に戻る)。削除と公開も hub に書けた。
15
+ 今は、入口と下書きの自動の編集を、パッケージ自身の区分 (`Internal`。字面のまま比べる) の持ち主の日報にだけ出す。サーバーの更新・公開・削除は、
16
+ 外部ソースの日報を持ち主を比べる前に断り (action は 403 `{"error":"Reports from this source are read-only"}`、サービスは `Forbidden`)、
17
+ 何も書かず知らせない。区分の判定は 1 つの関数 (`isMutableDailyReportSource`) にあり、サーバーの関門とクライアントの入口が同じものを読む。
18
+ ホストへの影響: サービスの `updateDailyReport`・`publishDailyReport`・`deleteDailyReport` を外部ソースの日報で呼んでいた所は `Forbidden` を受ける
19
+ (どれも書き込みが外部の表と食い違う経路だった)。
20
+
5
21
  ## 0.46.0 (2026-10-16)
6
22
 
7
23
  版番号は 0.46.0 (minor) とする: 設定の `streamKey` と公開の `buildDailyReportSseStreamKey` を置き換える (下の Breaking)。
package/README.md CHANGED
@@ -526,7 +526,10 @@ its payload — with one strict parser each, after authentication and before any
526
526
  `{"error":"Report visibility is unavailable"}` with `Retry-After: 5` and `Cache-Control: no-store`, before the internal user lookup and any intent.
527
527
  Then the internal user (`User not found`, 404). A `create` whose scope does not show the package's own source type (`Internal`) is 403
528
528
  `{"error":"Creating reports is restricted"}` before any query; the other intents answer a report the scope hides as 404 (**Where it applies** in
529
- [Source-type visibility](#source-type-visibility)).
529
+ [Source-type visibility](#source-type-visibility)). An `update`, `publish` or `delete` of a report the scope shows but of an external source (any
530
+ source type other than the package's own `Internal`, compared exactly) is 403 `{"error":"Reports from this source are read-only"}` before the owner
531
+ is compared and before any write: the package writes only the reports it stores itself, and its client draws the edit and delete entrances and a
532
+ draft's automatic editor only for the viewer's own `Internal` reports.
530
533
  - **One wire contract for the action and the JSON endpoints**, which the server, the package's client and a host that calls the routes itself all read
531
534
  from the shared entry (`@aiquants/daily-report`; neither side restates a name):
532
535
  - the intents (`DAILY_REPORT_ACTION_INTENTS` and their type `DailyReportActionIntent`, from which the server's form reading and the client's