it0/packages/shared/database/src
hailin ea3cbf64a5 feat(agent): complete instance-chat robustness fixes (Fix 2-6)
Fix 2 — Callback timeout wiring:
- Store callbackTimer in pendingCallbackTimers Map after creation
- handleOpenClawAppCallback clears the timer immediately on arrival,
  preventing spurious "timeout" errors when the bridge replies in time

Fix 3 — Provider scope isolation:
- Override agentStatusProvider and robotStateProvider in child ProviderScope
  so the robot avatar/FAB reflects the instance chat state, not iAgent's

Fix 4 — Voice routing to OpenClaw:
- AgentInstanceChatDatasource.sendVoiceMessage() now calls transcribeAudio()
  then routes the transcript through instance-specific createTask() endpoint,
  ensuring voice messages reach the user's OpenClaw agent, not iAgent

Fix 5 — Attachment UI in instance mode:
- Attachment button shown as disabled (onPressed: null) with explanatory
  tooltip ("附件功能暂不支持智能体对话") when agentName != null
- Prevents misleading UX where attachments appear to work but are silently
  dropped by the OpenClaw bridge

Fix 6 — DB schema template:
- Add agent_instance_id UUID NULL to agent_sessions table in migration 002
  (tenant schema template) so new tenants get the column from creation
- Add covering index idx_agent_sessions_instance for efficient instance queries

All TypeScript and Flutter analyze checks pass clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 19:49:36 -07:00
..
migrations feat(agent): complete instance-chat robustness fixes (Fix 2-6) 2026-03-09 19:49:36 -07:00
seeds Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
data-source.ts Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
database.module.ts fix: add SnakeNamingStrategy for TypeORM to match snake_case DB columns 2026-02-22 00:10:08 -08:00
index.ts fix: add SnakeNamingStrategy for TypeORM to match snake_case DB columns 2026-02-22 00:10:08 -08:00
run-migrations.ts feat(telemetry): add presence-service + Flutter telemetry module 2026-03-07 17:44:01 -08:00
snake-naming.strategy.ts fix: add SnakeNamingStrategy for TypeORM to match snake_case DB columns 2026-02-22 00:10:08 -08:00
tenant-aware.repository.ts fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
tenant-context.middleware.ts feat: implement complete commercial monetization loop (Phases 1-4) 2026-03-03 21:09:17 -08:00
tenant-provisioning.service.ts fix(provisioning): prevent search_path pool contamination via SET LOCAL + RESET 2026-03-07 04:04:53 -08:00