Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

Agent config knowledge + MCP connection-settings surface (LinkedIn/WhatsApp/Slack)

merged#2770CedarCopilot

CedarCopilot wants to merge 3 commits into staging from docs/linkedin-whatsapp-config-knowledge

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Sep 12, 2026, 1:56 PM
  2. Sep 12, 2026, 5:04 PM
  3. Merged
    Sep 13, 2026, 8:55 AM
  4. Live on prod
    Sep 13, 2026, 8:55 AM
  5. Observed 2 days
    Sep 13, 2026, 8:55 AM
  6. Pipelines steady after this deploy
    Sep 13, 2026, 8:55 AM
  7. Unobserved

    Live on prod, no production signal yet

    Sep 15, 2026, 4:09 PM

Behaviors Libra is checking

Users can manually resolve an ambiguous Slack, LinkedIn, or WhatsApp channel by linking it to a visible deal or explicitly dismissing the proposal.Inconclusivelow confidence

Unable to complete the telemetry verification within the available tool loop.

prod, checked Sep 15, 2026, 11:53 AM
Users can rerun and commit the organization-wide automatic channel-linking pass without naming an individual channel or deal.Inconclusivelow confidence

Strict CloudWatch fallback saw 62 success-shaped log lines matching sweeppendinglinks, applyconfigchangetool, connectionextras, readconnectionsettingstool, parseslackconfig, but no tied operation was present, so Libra is not calling this working.

prod, checked Sep 15, 2026, 12:52 PM
LinkedIn, WhatsApp, and channel-link configuration writes are restricted to the caller's organization and visible deals so external account identifiers or conversation IDs cannot mutate another tenant's data.Inconclusivelow confidence

Verification reached its budget before a verdict.

prod, checked Sep 15, 2026, 12:53 PM
Reading connection settings always provides the exact in-app settings links for human-led LinkedIn and WhatsApp connection flows instead of requiring the agent to invent an OAuth or hosted-auth URL.Inconclusivelow confidence

Verification reached its 130s outer budget before the verifier returned. Libra is keeping this intent verifying until the next check.

prod, checked Sep 15, 2026, 1:52 PM
Users can disconnect a LinkedIn seat through configuration by supplying its Unipile account identifier, with Cedar resolving and disconnecting the organization-owned seat.Inconclusivelow confidence

Strict CloudWatch fallback saw 998 success-shaped log lines matching linkedin, applyconfigchangetool, connectionextras, readconnectionsettingstool, parseslackconfig, but no tied operation was present, so Libra is not calling this working.

prod, checked Sep 15, 2026, 1:54 PM
Reading connection settings returns the effective Slack sync configuration after merging any applicable org default and marks whether the connection is using that default.Inconclusivelow confidence

Verification reached its 130s outer budget before the verifier returned. Libra is keeping this intent verifying until the next check.

prod, checked Sep 15, 2026, 2:52 PM

Libra has verdicts on 0 of 11 tracked behaviors on prod; 11 are still being checked. Libra checks hourly for 3 days after each deploy.

Summary

Two related pieces of work:

1. Agent config knowledge (cedar-configuration skill). Extends the "how each integration connects and syncs" section with LinkedIn and WhatsApp , plain-English, no vendor/infra terms , plus the WhatsApp reply-window notification mechanic and a LinkedIn-attach capability-gap note. Full research/design writeup: docs/design/mcp-connection-settings-checklist.md.

2. MCP connection-settings surface. Closes the gap between Settings โ†’ Connections and what's configurable over MCP:

  • update_slack_sync_config gains scope: 'user' | 'org' , the org default is wired into both real runtime sync-decision call sites (link-matching-channels.ts, slack-events-webhook.ts), not a write-only toggle.
  • disconnect_linkedin_seat / disconnect_whatsapp_account (by unipileAccountId).
  • update_whatsapp_sync_config , syncAllChats override + per-chat trackChat consent grant/revoke.
  • resolve_channel_link_proposal , resolve/dismiss one ambiguous Slack/LinkedIn/WhatsApp channel, or sweep the org's pending links.
  • update_webhook_export_config , the custom CRM webhook-export endpoint is now agent-writable.
  • read-connection-settings gains connectLinks.{linkedin,whatsapp} (the real in-app settings deep link) and slackSyncConfig.usingOrgDefault.

Every new action inherits targetUserId/authorize() from the tool's existing gate , none needed a bespoke check, verified against the two safety-net tests built for exactly this (mutating-actions-are-administrable, target-user-id-reaches-the-authority). Connecting LinkedIn/WhatsApp itself stays correctly human-only (an OAuth-style hosted-auth flow); the agent now hands back the exact settings link instead of refusing outright.

Review passes applied, not just run:

  • /code-review thermo-review: found the change growing an already-oversized file instead of following its own established extraction precedent (apply-systems-change.ts) , fixed by extracting into apply-connection-extras-change.ts. Also found a claimed-but-missing test proving the Slack org-default reaches the real runtime path , added slack-events-webhook.parseSlackConfig.test.ts to close it.
  • /refresh-agent-knowledge: confirmed authorize()'s DEFAULT_POLICY already grants connection_config:org to ORG_ADMIN (so the new org-scope write is genuinely enforced, not just written), and added org-wide defaults to the skill's "ask before writing" scope list.

Test plan

  • pnpm --filter @zero/server run types , clean
  • pnpm deps:check , 0 violations
  • Scoped vitest: 75/75 across the 7 touched/related test files (new connection-write actions, Slack config-resolution, schema-size budget, both authorization safety nets)
  • pnpm --filter @zero/server exec vitest run src/mastra/skills/account-config , 158/158 (knowledge-claims-resolve, allowlist/trigger-type splices, description-length caps)

Not implemented, correctly deferred (see docs/design/mcp-connection-settings-checklist.md ยง6): org-default policy for LinkedIn/WhatsApp specifically, since a personal account isn't a shared workspace resource the way Slack's bot is , needs a product decision on what "org scope" even means there before building it.

๐Ÿค– Generated with Claude Code

https://claude.ai/code/session_01RY8attAx6MwUcZfnFB8ao2

Greptile Summary

Adds agent-facing connection controls for LinkedIn, WhatsApp, Slack channel linking, and custom webhook exports, alongside integration guidance and human-only connection deep links.

  • Introduces organization-level Slack defaults and applies them to channel linking and message admission.
  • Three functional issues need correction: Slack readback omits effective defaults, an existing organization-settings update can erase the new policy, and webhook configuration accepts destinations the sender cannot use.
  • Also identifies an unsupported Slack option that sile
Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files โ†’ surfaces

  • apps/server/.claude/skills/cedar-configuration/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/cedar-system-knowledge.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/external-writes.mdno production surface mapped
  • apps/server/.claude/skills/conversation/SKILL.mdno production surface mapped
  • apps/server/src/db/schema.tsno production surface mapped
  • apps/server/src/lib/cedar-routes.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/__tests__/applyConfigChangeTool.connectionExtras.test.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/apply-connection-extras-change.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/applyConfigChangeTool.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/readConnectionSettingsTool.tsno production surface mapped
  • apps/server/src/mastra/tools/config/connection-write-tool.tsno production surface mapped
  • apps/server/src/mastra/tools/config/workspace-write-tool.tsno production surface mapped
  • apps/server/src/services/integrations/connection-config.tsno production surface mapped
  • apps/server/src/services/integrations/slack/__tests__/slack-config-resolution.test.tsno production surface mapped
  • apps/server/src/services/integrations/slack/__tests__/slack-events-webhook.parseSlackConfig.test.tsno production surface mapped
  • apps/server/src/services/integrations/slack/link-matching-channels.tsno production surface mapped
  • apps/server/src/services/integrations/slack/slack-config-resolution.tsno production surface mapped
  • apps/server/src/services/integrations/slack/slack-events-webhook.tsno production surface mapped
  • apps/server/src/services/users/user-settings.tsno production surface mapped
  • apps/server/src/trpc/routes/__tests__/org-admin-settings-merge.test.tsno production surface mapped
  • apps/server/src/trpc/routes/org-admin.tsno production surface mapped
  • docs/design/mcp-connection-settings-checklist.mdno production surface mapped