[feature] 整合框架 + Simpany 電子發票 + Wise 唯讀同步 + 員工多帳戶 - #71
Merged
Merged
Conversation
- migrations/0023:org_integrations(一列 = 一組織一整合,預設關閉,憑證密文) - src/lib/integrations:types / catalog(simpany、wise)/ registry(空,待實作登記)/ store - i18n:integrations namespace、操作紀錄的 integration 實體名稱
…s、national_id_enc、匯入帳戶欄位)
- 設定區加左側次級導覽(基本資料 / 整合 / MCP) - /dashboard/settings/integrations:每個整合一列(狀態、開關、連接/重新連接/中斷) - 連接用 Sheet:測試並連接、錯誤就地顯示、未存修改關閉前確認;中斷用 AlertDialog 確認 - server actions 限 owner/admin,回傳值不含任何憑證 - Google 日曆設定搬進整合頁(#google-calendar),清單上以一列顯示狀態 - 新增 shadcn Switch 元件
- tools-integrations.ts:list_integrations(不含任何憑證) - requireIntegrationForTool / auditIntegrationCall 給之後的 provider 工具用 - SERVER_VERSION 1.3.0 → 1.4.0
✅ SonarQube Quality Gate passed — pathorsAI_internal0 open issues on this PR. |
yui0303
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什麼
四件事,共用一層欄位加密:
FIELD_ENCRYPTION_KEY),永不回傳給 client / MCP。Google 日曆移到同一頁。MCPlist_integrations。invoices(含作廢、課稅別、零稅率原因)並自動綁收款/請款期;開立一定兩段式(preview 存invoice_drafts→ 只憑 draftId 開立,防重複);作廢。MCPsimpany_*7 支;發票頁「從 Simpany 同步」、請款看板「在 Simpany 開立」。wise_*3 支(sync 預設 dry run)。employee_bank_accounts(加密帳號、薪資/報銷預設),發薪與報銷記錄匯入帳戶;身分證改加密;員工寫入改為限 owner/admin(原本任何成員都能改、都看得到完整帳號);完整帳號只有 owner/admin 能顯示且留稽核紀錄。MCP server 1.4.0 → 1.6.0,共 85 支工具。
部署前必做(順序很重要)
wrangler secret put FIELD_ENCRYPTION_KEY(值在 patchbayinternal-field-encryption-key/ p-drive_secret/internal-pathors-com/)migrations/0023–0026(全部 additive,舊程式碼不受影響)— 一定要在 merge 前,新程式碼會讀新欄位bun run scripts/migrate-employee-pii.ts(先 dry run)把舊salary_account/national_id搬成加密欄位驗證
tsc --noEmit、bun run lint、bun run build全過設計提案:https://claude.ai/artifact/ShXrQofYAJTJARTJyXo3YD