@takagaki/cortex-decisions-viewer 0.12.93 → 0.12.95

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.
@@ -7,7 +7,7 @@ exports.PERMISSIONS_DATA = void 0;
7
7
  * 操作タブの[権限]がこの値を CLIENT_JS に注入して読む(公開ページと同じ中身)。
8
8
  */
9
9
  exports.PERMISSIONS_DATA = {
10
- "revisedOn": "2026年9月25日",
10
+ "revisedOn": "2026年9月26日",
11
11
  "enactedOn": "2026年9月25日",
12
12
  "tools": [
13
13
  {
@@ -291,12 +291,6 @@ exports.PERMISSIONS_DATA = {
291
291
  "accessText": "読む",
292
292
  "purpose": "会議のメモを探して読む"
293
293
  },
294
- {
295
- "spell": "https://www.googleapis.com/auth/documents.readonly",
296
- "access": "read",
297
- "accessText": "読む",
298
- "purpose": "現在は使っていません"
299
- },
300
294
  {
301
295
  "spell": "https://www.googleapis.com/auth/calendar",
302
296
  "access": "write",
package/dist/render.js CHANGED
@@ -3380,7 +3380,7 @@ function ingestFailureText(f) {
3380
3380
  * @param registered `LIVE_REGISTERED[regKey]`(配列でなければ「読めていない」)
3381
3381
  * @param rows 接続状態ストアの行(`LIVE_STATE`)
3382
3382
  * @returns `null`(従来どおり「登録状況を確認中です」)/`{ kind: "ok", at }`/
3383
- * `{ kind: "bad", rows: [{ status, ref, workspace, type, at }] }`(登録順)
3383
+ * `{ kind: "bad", rows: [{ status, ref, workspace, type, at, detail }] }`(登録順)
3384
3384
  *
3385
3385
  * **クロージャを持たない純関数に保つこと**(`.toString()` でクライアントへ渡す。
3386
3386
  * `registeredRefKeys` / `stateRefKey` / `BAD_STATE_STATUSES` はこれより前に流し込んである)。
@@ -3425,6 +3425,8 @@ function derivePendingTile(regKey, registered, rows) {
3425
3425
  workspace: String(hit.workspace == null ? (reg.workspace == null ? "" : reg.workspace) : hit.workspace),
3426
3426
  type: String(reg.type || ""),
3427
3427
  at: String(hit.at || ""),
3428
+ // 語の言い換えに要る(GitHub のテナント外の断り・#841。行と同じ dsGateOf に渡す)
3429
+ detail: String(hit.detail || ""),
3428
3430
  });
3429
3431
  }
3430
3432
  // **優先順: 失敗 > 未測定 > OK。** 失敗は測った事実なので、未測定の行が混ざっていても
@@ -9384,16 +9386,25 @@ ${calendarAddUrl.toString()}
9384
9386
  // **バッジは短語・次の一手は help に分ける**(DS_GATE_NO_TOKEN と同じ作り。
9385
9387
  // バッジに長文を入れると行が折り返す)。**内部語を出さない**——証明書・トークン・
9386
9388
  // テナント・サービスプリンシパルは、読む人が自分の画面で探せない言葉
9389
+ // RSC(チームにアプリを追加して、そのチームだけの権限を承認する形)では、止めるのは
9390
+ // テナントの管理者ではなく**チームの所有者**(#841)。「承認リンク」「管理者」と書くと、
9391
+ // 読む人は届かない相手・存在しないリンクを探しに行く。直せる人(チームの所有者)と
9392
+ // 操作(Teams でアプリを追加して権限を承認する)だけを書く。
9393
+ // 帯は**症状**(承認が無い)に留め、原因(アプリが入っていない)を言い切らない——RSC の
9394
+ // no_consent は未実測で、アプリが入ったまま付与だけ外れた場合も同じ語になりうる(#841 実装レビュー)。
9395
+ // SharePoint(共有資料の能力)はまだ管理者の同意が前提なので、下の DS_GATE_CAP.materials が旧文を持つ
9387
9396
  "no_consent": {
9388
- text: "管理者の承認が必要です",
9397
+ text: "チームの承認がありません",
9389
9398
  cls: "ds-gate-warn",
9390
- help: "貴社の Microsoft 365 管理者が承認リンクを開いて許可すると読み取りが始まります。承認を取り消した場合もこの表示になります。",
9399
+ help: "チームの所有者が Teams でこのチームに Cortex のアプリを追加し、表示される権限を承認すると読み取りが始まります。",
9391
9400
  },
9392
9401
  "transcripts_api_disabled": {
9393
9402
  text: "文字起こしの外部取得がオフです",
9394
9403
  cls: "ds-gate-warn",
9395
9404
  help: "Teams 管理センターの会議設定で「文字起こしへの API アクセス」をオンにしてください。",
9396
9405
  },
9406
+ // RSC のチャネル会議には掛からない見込み(PoC C で確認)。文言は、この状態が
9407
+ // 返ったときのために残す(#841)
9397
9408
  "no_access_policy": {
9398
9409
  text: "会議へのアクセス許可が未設定です",
9399
9410
  cls: "ds-gate-warn",
@@ -9482,7 +9493,21 @@ ${calendarAddUrl.toString()}
9482
9493
  text: "App が未インストール",
9483
9494
  cls: "ds-gate-muted",
9484
9495
  },
9496
+ /* GitHub で、案件のテナントに無い組織を窓口が断った回(#841)。gate は同じ no_token でも
9497
+ * 「App が未インストール」と言うと、利用者が導入を探しに行く(窓口は導入・リポの有無を
9498
+ * 明かさないので、入っているかどうかは誰にも分からない)。見分けは githubOrgRefused。
9499
+ * **help は付けない。** 次の一手(担当者へ)はサーバの needed の 1 文が持つ */
9500
+ githubRefused: {
9501
+ text: "確かめられません",
9502
+ cls: "ds-gate-muted",
9503
+ },
9485
9504
  };
9505
+ /** 窓口がテナント外の組織として断った印(Intake の応答の reason・ストアの行の detail。#841) */
9506
+ var GITHUB_ORG_NOT_IN_TENANT = "org_not_in_tenant";
9507
+ /** GitHub の no_token が「テナント外の断り」か。押した直後は reason、読み直した後は detail が持つ */
9508
+ function githubOrgRefused(s) {
9509
+ return !!s && (s.reason === GITHUB_ORG_NOT_IN_TENANT || s.detail === GITHUB_ORG_NOT_IN_TENANT);
9510
+ }
9486
9511
  /**
9487
9512
  * 休止状態の行に、状態の語に添えて**押す前から**出す定型の補足(#346)と、
9488
9513
  * 「接続を確認」を押した結果に添える定型の1文(#356)。
@@ -9623,13 +9648,16 @@ ${calendarAddUrl.toString()}
9623
9648
  * - 状態がある(未測定の行には出すものが無い)
9624
9649
  * - ok でない
9625
9650
  * - missing_scope でない(スコープ名の札 .ds-probe-scope が既に持つ)
9626
- * - no_token でない(GitHub は組織の帯が導線を1つだけ持つ設計・Slack は DS_GATE_NO_TOKEN の help)
9651
+ * - no_token でない(GitHub は組織の帯が導線を1つだけ持つ設計・Slack は DS_GATE_NO_TOKEN の help)。
9652
+ * **ただし GitHub のテナント外の断り(#841)は出す**——帯は出ない(導入状態が分からない)ので、
9653
+ * 「担当者へ」の 1 文(needed)を持つのはこの行だけ
9627
9654
  * - not_in_channel でない(help は無いが、**状態の語そのものが操作の指示**
9628
9655
  * 「Slackで招待してください」。その下に夜間の「読めませんでした: not_in_channel」を
9629
9656
  * 並べても情報が増えず、招待という具体的な指示を薄める。help の有無とは別の軸)
9630
9657
  * - dsGateOf(s).help が無い(あれば DS_GATE の固定文が次の一手を持っている)
9631
9658
  */
9632
9659
  function showsRestingReason(s) {
9660
+ if (s.gate === "no_token" && String(s.type || "").indexOf("github") === 0 && githubOrgRefused(s)) return true;
9633
9661
  if (!s.gate || s.gate === "ok" || s.gate === "missing_scope" || s.gate === "no_token" || s.gate === "not_in_channel") return false;
9634
9662
  return !dsGateOf(s).help;
9635
9663
  }
@@ -9667,6 +9695,7 @@ ${calendarAddUrl.toString()}
9667
9695
  * | slack(社内) | 中央 Bot の鍵が無い。**画面から設定できない** | 管理者の設定が必要です |
9668
9696
  * | slack(顧客) | お客様のワークスペースが未接続。接続で直せる | トークン未設定 |
9669
9697
  * | github | 読む鍵が1本も無かった=**この組織に App が入っていない** | App が未インストール |
9698
+ * | github(テナント外の断り・#841) | 案件のテナントに無い組織。有無は明かされない | 確かめられません |
9670
9699
  *
9671
9700
  * **ここを通さずに語を書き写さないこと。** 行バッジ・能力タイルの要約・
9672
9701
  * 「接続を確認」の結果が同じ関数を通るので、片方だけ古くなることが構造的に起きない
@@ -9678,7 +9707,9 @@ ${calendarAddUrl.toString()}
9678
9707
  return isInternalSlack(s) ? DS_GATE_NO_TOKEN.internal : DS_GATE_NO_TOKEN.customer;
9679
9708
  }
9680
9709
  // github-issues / github-discussions のどちらも同じ原因(組織単位の App)
9681
- if (String(s.type || "").indexOf("github") === 0) return DS_GATE_NO_TOKEN.github;
9710
+ if (String(s.type || "").indexOf("github") === 0) {
9711
+ return githubOrgRefused(s) ? DS_GATE_NO_TOKEN.githubRefused : DS_GATE_NO_TOKEN.github;
9712
+ }
9682
9713
  }
9683
9714
  // 🔴 **状態が無い行を「不明」に落とさない(段階1)。** 「不明」は実測して分からなかった
9684
9715
  // という意味で、まだ測っていない行に出すと嘘になる。**知らない値は従来どおり「不明」**
@@ -9713,6 +9744,13 @@ ${calendarAddUrl.toString()}
9713
9744
  help: DRIVE_INGEST_ACCOUNT + " を閲覧者として招待してください(招待が外れると読めません)。",
9714
9745
  },
9715
9746
  no_token: { text: "管理者の設定が必要です", cls: "ds-gate-muted" },
9747
+ // SharePoint の判定表は管理者の同意を前提のまま(チームの RSC にファイルの権限が無い・PoC C で決める)。
9748
+ // 共通の no_consent(チームの所有者向け)を出すと、直せない相手に直し方を案内することになる(#841)
9749
+ no_consent: {
9750
+ text: "管理者の承認が必要です",
9751
+ cls: "ds-gate-warn",
9752
+ help: "貴社の Microsoft 365 管理者が承認リンクを開いて許可すると読み取りが始まります。承認を取り消した場合もこの表示になります。",
9753
+ },
9716
9754
  },
9717
9755
  issues: { no_token: { text: "APIキーが未登録です", cls: "ds-gate-muted" } },
9718
9756
  design: {
@@ -11288,8 +11326,8 @@ ${calendarAddUrl.toString()}
11288
11326
  * (「pendingCountDelta」 / 「refKeysOf」 と同じ材料。一覧と同じものを見る)。update
11289
11327
  * (通知先トグル等)は判定を止めない
11290
11328
  * - 語は**行と同じ関数**から引く(写経しない): チャット・開発は 「dsGateOf」(社内の
11291
- * no_token →「管理者の設定が必要です」・GitHub の no_token →「App が未インストール」の
11292
- * 言い換え込み)、取り込む能力は 「dsGateForCap」(Drive の unreachable →「フォルダを
11329
+ * no_token →「管理者の設定が必要です」・GitHub の no_token →「App が未インストール」、
11330
+ * テナント外の断り(#841)→「確かめられません」の言い換え込み。だから dev には detail も渡す)、取り込む能力は 「dsGateForCap」(Drive の unreachable →「フォルダを
11293
11331
  * 開けません」等)。OK は「● 接続OK ◯分前に確認」(行の 「rtAgo」 と同じ語・時刻は
11294
11332
  * ストアの最新)。失敗が複数で語が違っても**登録順で最初の 1 語**(タイルは 1 行。
11295
11333
  * 内訳はモーダルの行が持つ)
@@ -11335,7 +11373,7 @@ ${calendarAddUrl.toString()}
11335
11373
  var gate;
11336
11374
  if (regKey === "chat") gate = dsGateOf({ type: "slack", workspace: first.workspace, gate: first.status });
11337
11375
  else if (regKey === "google-chat") gate = dsGateOf({ type: "google-chat", gate: first.status });
11338
- else if (regKey === "dev") gate = dsGateOf({ type: first.type || "github-issues", gate: first.status });
11376
+ else if (regKey === "dev") gate = dsGateOf({ type: first.type || "github-issues", gate: first.status, detail: first.detail });
11339
11377
  else gate = dsGateForCap(regKey, first.status);
11340
11378
  // 行と同じ見た目: warn の語にだけ ⚠️ を前置(muted の語=「管理者の設定が必要です」等には付けない)
11341
11379
  return { text: (gate.cls === "ds-gate-warn" ? CAP_STATE_MARK.warn : "") + gate.text, cls: gate.cls };
@@ -13311,7 +13349,8 @@ ${calendarAddUrl.toString()}
13311
13349
  * 接続へ吸い込まれる(2026-08-18 の不具合そのもの)。
13312
13350
  */
13313
13351
  function probeVerdict(s, r) {
13314
- return dsGateOf({ type: s.type, workspace: s.workspace, gate: r.gate });
13352
+ // reason は GitHub のテナント外の断り(#841)。無ければ従来どおり
13353
+ return dsGateOf({ type: s.type, workspace: s.workspace, gate: r.gate, reason: r.reason });
13315
13354
  }
13316
13355
 
13317
13356
  /**
@@ -17490,9 +17529,15 @@ ${calendarAddUrl.toString()}
17490
17529
  // **前方一致で見る。** #105 の移行期は「Secrets Manager(旧名)」も来る。
17491
17530
  // 完全一致にすると、旧名で動いている案件だけが repo secret と同じ見た目になり、
17492
17531
  // 「管理下にあるのに未移行」という一番知りたい状態が画面から消える
17532
+ //
17533
+ // 🔴 **画面に出すのは「登録済み」の 1 語だけ(#841)。** 取得元の値は仕組みの名前
17534
+ //(保管庫のサービス名・旧名の区別)で、読む人が自分の画面で探せない。値に関わらず
17535
+ // 同じ 1 語にし、**生の値は data-src に置く**(判定の is-managed は生の値のまま)。
17536
+ // 知らない値が来ても生で出さない——project-wording.test.mjs が画面の語を見張る
17493
17537
  var state = st.known === "yes"
17494
17538
  ? el("p", { class: "sec-state" + (src.indexOf("Secrets Manager") === 0 ? " is-managed" : ""),
17495
- text: "登録済み(" + src + " から取得中)" })
17539
+ "data-src": src,
17540
+ text: "登録済み" })
17496
17541
  : st.known === "no"
17497
17542
  ? el("p", { class: "sec-state is-none", text: "未登録" })
17498
17543
  // **断定しない(レビュー指摘)。** 黙って消すと、利用者は
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takagaki/cortex-decisions-viewer",
3
- "version": "0.12.93",
3
+ "version": "0.12.95",
4
4
  "description": "Cortexの意思決定記録(Decisions/*.md)を静的サイトにビルドして閲覧する。各レコードに「Edit on GitHub」リンクを付与する。",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,