Commit Graph

12 Commits

Author SHA1 Message Date
Your Name
d6a6519594 chore(types): sync approval response types
All checks were successful
Type Sync Check / check-type-sync (push) Successful in 33s
2026-05-31 13:22:07 +08:00
Your Name
f154ac022e feat(playbook): version generated playbooks
All checks were successful
CD Pipeline / tests (push) Successful in 1m34s
Code Review / ai-code-review (push) Successful in 28s
Type Sync Check / check-type-sync (push) Successful in 1m10s
CD Pipeline / build-and-deploy (push) Successful in 10m19s
CD Pipeline / post-deploy-checks (push) Successful in 3m1s
2026-04-30 23:59:39 +08:00
Your Name
7d02365dc2 chore(types): sync playbook enums
All checks were successful
Type Sync Check / check-type-sync (push) Successful in 1m14s
2026-04-30 23:10:37 +08:00
OG T
6c10c6db86 chore(types): 同步 shared-types 自動產生
All checks were successful
Type Sync Check / check-type-sync (push) Successful in 1m14s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 22:12:16 +08:00
OG T
83e0fd882d chore(types): 重新生成 shared-types — Playbook.trust_score + IncidentId3
因 Phase 0/1 新增 Playbook.trust_score 欄位,
IncidentId 型別索引序號更新為 IncidentId3,
重新執行 pnpm generate 同步 API schema → TypeScript 型別。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 15:00:44 +08:00
OG T
18452ceb9f fix(ci): 補 pyyaml 依賴 + 同步 Sprint 5.1 Pydantic → TypeScript 型別
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m43s
Type Sync Check / check-type-sync (push) Successful in 57s
- pyproject.toml: 新增 pyyaml>=6.0.0 (service_registry.py 需要)
- shared-types: 同步 PlaybookAction 三個新欄位
  (requires_approval_level / stateful_targets / requires_pre_backup)
- shared-types: 同步 ApprovalRecord 三個新欄位
  (approval_level / approval_votes / required_votes)

修正: build-and-deploy 因 import yaml 失敗 + check-type-sync 因模型未同步

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 17:06:44 +08:00
OG T
b20a619a3d fix(ci): CD 修復 — shared-types 型別同步 + 測試冷啟動衝突
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Type Sync Check / check-type-sync (push) Successful in 1m2s
1. pnpm shared-types generate — 同步 Sprint 4 新增的 Pydantic model
2. test_evaluate_not_high_quality 修復 — 加 MEDIUM risk step 避免
   意外走冷啟動路徑 (Redis 未初始化 → COLD_START_DAILY_LIMIT)

11/11 auto_repair 測試通過

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:09:17 +08:00
OG T
71715506c3 chore(types): 重新產生 TypeScript 型別 — Phase 26 ApprovalRequest + namespace 修正
Some checks failed
Type Sync Check / check-type-sync (push) Failing after 51s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 11:50:43 +08:00
OG T
b58178d46a chore(types): 重新產生 TypeScript 型別 — is_high_quality 冷啟動閾值調整
Some checks failed
Type Sync Check / check-type-sync (push) Failing after 52s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 22:16:03 +08:00
OG T
48ec6ee48e feat(types): 補充 NVIDIA 模型到共用型別 (P0 修復)
首席架構師審查發現 NVIDIA models 遺漏,現已補充:

新增 7 個型別:
- ToolFunction, ToolCall, NvidiaMessage
- NvidiaChoice, NvidiaUsage, NvidiaResponse
- ToolDefinition

總計: 44 → 51 個型別定義
審查評分: 72/100 → 85/100 (預計)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:26:44 +08:00
OG T
f96c584a31 ci(types): Phase 14.3 #99 型別同步驗證 workflow
加入 type-sync-check.yaml:
- 觸發: apps/api/src/models/** 變更時
- 行為: 重新生成 TypeScript,檢查是否有差異
- 失敗: 提示開發者執行 pnpm generate

設計決策:
- 採用「驗證模式」而非「自動生成模式」
- 避免 CI 提交造成的循環觸發
- 符合 GitOps 原則 (所有變更來自開發者)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:20:35 +08:00
OG T
936f1d64de feat(types): Phase 14.3 共用型別系統 (#97-#100)
建立 Pydantic → TypeScript 自動生成工具鏈:

1. scripts/generate-schemas.py
   - 從 Pydantic 模型生成 JSON Schema
   - 正確處理 Pydantic 2.x 的 $defs 格式
   - 支援 Approval/Incident/Terminal/Playbook/CSRF 模型

2. packages/shared-types/
   - @awoooi/shared-types 套件
   - 44 個型別定義,40 個介面
   - json-schema-to-typescript 自動生成

3. 前端整合
   - apps/web 加入 @awoooi/shared-types 依賴
   - typecheck 通過

使用方式:
  cd packages/shared-types
  pnpm generate  # 重新生成型別

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:10:33 +08:00