diff --git a/docs/google-workspace-setup.md b/docs/google-workspace-setup.md index b0b4273..4afc940 100644 --- a/docs/google-workspace-setup.md +++ b/docs/google-workspace-setup.md @@ -310,8 +310,7 @@ google_workspace` 時に `ConfigError: markitdown not installed` の skip_reason enabled = true fallback_window_days = 30 # users.history.list 7-day TTL invalidation fallback window # 任意 override: -# max_body_chars = 500000 # Outlook と揃える default (省略時は同 default) -# max_messages_per_pass = 500 # full-pass の上限 +# initial_window_days = 7 # first-sync backfill window (cursor=None pass の遡及範囲) ``` ```bash @@ -329,8 +328,7 @@ opshub connector sync google_mail # ~/.config/opshub/config.toml [connectors.google_calendar] enabled = true -fallback_window_days = 30 # syncToken 410 GONE fallback window -# 任意 override (MVP default = 過去 90 日 + 未来 365 日): +# 任意 override (MVP default = 過去 90 日 + 未来 365 日、syncToken 410 GONE fallback の window walk にも兼用): # time_min_days = 90 # time_max_days = 365 ``` diff --git a/docs/repository-structure.md b/docs/repository-structure.md index 4882342..3ee2bc2 100644 --- a/docs/repository-structure.md +++ b/docs/repository-structure.md @@ -281,14 +281,14 @@ src/opshub/ │ │ ├── cursor.py # History API `startHistoryId` cursor + 7 日 TTL 失効時 (HTTP 404) `users.messages.list` full-pass fallback + WARN (ADR-0010 §Phase 14 改訂 (j) delta-cursor 型一般化) [P14] │ │ ├── mapper.py # RawGmailMessage → SourceObserved (`source_type=gmail_message`、Outlook と symmetric: body = text/plain 優先 → text/html 生保持 / markitdown なし / 添付 retain なし / `[Labels: ...]` prepend / `[gmail body truncated: N / M chars]` tag / threadId field、provenance `external` / `untrusted`、ADR-0010 §Phase 14 改訂 (k)+(l)) [P14] │ │ ├── connector.py # GoogleMailConnector(sync): google_auth → client → cursor → mapper → SourceService.observe (1 message = 1 SourceObserved emit) [P14] -│ │ └── settings.py # OpshubGoogleMailSettings (env prefix `OPSHUB_OFFICE_GMAIL_`): body 上限 / poll 設定 / fallback window [P14] +│ │ └── settings.py # re-export shim (`GoogleMailConnectorSettings` は `core/config.py` で定義、env prefix `OPSHUB_CONNECTORS__GOOGLE_MAIL__`、field = `enabled` / `initial_window_days` / `fallback_window_days`、Phase 7 既存 connector 配置との対称性を保つための薄い import 経路) [P14] │ └── google_calendar/ # Google Calendar connector (Phase 14 G4、ADR-0010 §Phase 14 改訂 (i)-(l) — `connectors/google_auth/` shared auth foundation 使用、MS365 Calendar と symmetric な master event only mapper + override 別 record) [P14] │ ├── __init__.py # register_connector(GoogleCalendarConnector()) side effect [P14] │ ├── client.py # GoogleCalendarClient: Calendar API v3 `events.list(syncToken=...)` (delta) + `events.list(timeMin/timeMax)` (full-pass、`singleEvents=false` + `showDeleted=true` 固定) + httpx + rate-limit 429 + 5xx exponential backoff retry [P14] │ ├── cursor.py # syncToken cursor + 410 GONE 失効時 (`SyncTokenExpiredError`) `_fallback_window_pass` (timeMin/timeMax window walk + 各 page で `cursor_set` 即時更新 + WARN `connector.events_list.expired`、ADR-0010 §Phase 14 改訂 (j) delta-cursor 型一般化) [P14] │ ├── mapper.py # RawCalendarEvent → SourceObserved (`source_type=google_calendar`、MS365 Calendar と symmetric: summary = `f"{start_iso} - {end_iso} ({attendees_count} attendees)"` / RRULE field / attendee email list + 議題 (description) + 会議室 (location) を body に追記、master event = `recurringEventId` 無し / override = `recurringEventId` + `originalStartTime` 持ち別 record として emit + body に `Override of: ` back-pointer、provenance `external` / `untrusted`) [P14] │ ├── connector.py # GoogleCalendarConnector(sync): google_auth → client → cursor → mapper → SourceService.observe (master event + override を独立 SourceObserved として emit、empty calendar / no-change-delta も `(None, next_sync_token)` で必ず cursor 前進) [P14] -│ └── settings.py # OpshubGoogleCalendarSettings (env prefix `OPSHUB_OFFICE_GCAL_`): timeMin/timeMax window default (MVP = 過去 90 日 + 未来 365 日、override 可能) / primary calendar 限定 (MVP、secondary は Phase 15+ defer) / poll 設定 [P14] +│ └── settings.py # re-export shim (`GoogleCalendarConnectorSettings` は `core/config.py` で定義、env prefix `OPSHUB_CONNECTORS__GOOGLE_CALENDAR__`、field = `enabled` / `calendar_id` / `time_min_days` / `time_max_days`、Phase 7 既存 connector 配置との対称性を保つための薄い import 経路) [P14] ├── markdown/ # workspace surface 生成 + ingest parser │ ├── render/ # Jinja2 テンプレート [P1] │ ├── templates/ # Jinja2 ファイル (per-renderer) [P1+2] diff --git a/docs/upgrading.md b/docs/upgrading.md index af1db1b..98a7f6f 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -401,9 +401,7 @@ If you skip re-consent, `opshub connector sync google_mail` and `opshub connecto # [connectors.google_mail] # enabled = true # fallback_window_days = 30 # users.history.list 7-day TTL invalidation fallback window -# # body 上限 / poll 設定は default で運用、override 必要時のみ: -# # max_body_chars = 500000 # Outlook と揃える default -# # max_messages_per_pass = 500 # full-pass の上限 +# # initial_window_days = 7 # first-sync backfill window (cursor=None pass の遡及範囲) # 3. Sync (re-consent 済み前提、Phase 13 google_workspace と同 principal). opshub connector sync google_mail @@ -422,9 +420,8 @@ Bodies are extracted **symmetrically with the Phase 11 Outlook mapper**: `text/p # In ~/.config/opshub/config.toml: # [connectors.google_calendar] # enabled = true -# fallback_window_days = 30 # syncToken 410 GONE fallback window # # window default は MVP では「過去 90 日 + 未来 365 日」、override 可能: -# # time_min_days = 90 # 過去 N 日 +# # time_min_days = 90 # 過去 N 日 (syncToken 410 GONE fallback の遡及範囲も兼用) # # time_max_days = 365 # 未来 N 日 # 3. Sync.