Skip to content

ai: give lifted accounts a policy-free desktop profile - #2774

Merged
BaseMax merged 1 commit into
mainfrom
fix/ai-lifted-account-profiles
Nov 6, 2026
Merged

BaseMax merged 1 commit into
mainfrom
fix/ai-lifted-account-profiles

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 6, 2026

Copy link
Copy Markdown
Member

Lifted accounts still refused non-Salam code in Salam Agent and cloud chats. The per-account switch was applied, but SendDesktopFree always used the desktop engine profile, whose own system prompt carries the Salam policy; the extra system text is appended after it, so it cannot remove it.

This change:

  • adds AI_ENGINE_AGENT_DESKTOP_RAW for a desktop profile with the bridge tools but no Salam prompt; SendDesktopFree prefers it, then falls back to AI_ENGINE_AGENT_RAW, then the desktop profile;
  • sends an explicit free-account system note for web, Telegram and API turns;
  • warns in the admin Users page when either plain profile is missing, and exposes plain_ready and desktop_plain_ready in /admin/users;
  • renames a local variable in the speech client that shadowed its parameter and broke the C build;
  • adds tests for the lifted desktop path and the free-account system note.

Tests run:

  • salam check ai/backend/main.salam
  • salam exec ai/backend/tests/policy_test.salam
  • build of ai/backend/main.salam
  • bun run typecheck and bun run build in ai/frontend
  • node ai/backend/tests/policy_flow.mjs against the engine mock: 23 passed, 0 failed

A lifted account was still answered by the Salam profile in desktop and cloud agent chats, because SendDesktopFree always used the desktop profile whose own prompt carries the Salam policy. Add AI_ENGINE_AGENT_DESKTOP_RAW for a desktop profile with the bridge tools but no Salam prompt, fall back to the plain profile, and send an explicit free-account system note. The admin users page now warns when either plain profile is missing. Rename a local variable in the speech client that shadowed its parameter and broke the C build.
@BaseMax
BaseMax requested a review from a team as a code owner November 6, 2026 17:07
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:07
@vercel

vercel Bot commented Nov 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salam Building Building Preview Nov 6, 2026 5:07pm UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@BaseMax
BaseMax merged commit dc9906f into main Nov 6, 2026
28 of 31 checks passed
@BaseMax
BaseMax deleted the fix/ai-lifted-account-profiles branch November 6, 2026 17:08

This branch was successfully deployed

1 active deployment
Preview — f3d6829c Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants