rose-staff¶
rose-staff is the command-line tool of Rose staff, and of the agents and jobs they run. It reads
Rose: figures, conversations, knowledge, the GEO FAQ page, contextual teasers. It also asks a client's
agent, with skills and FAQs that are not saved or merged yet. It cannot change client data (IX-6638).
It reaches Rose only through its APIs. So it runs where there is no database access or backend secret: in rose-brain, in cloud jobs, and in an inboundx checkout.
Which tool is which¶
| Tool | For | Reaches Rose through |
|---|---|---|
rose-staff |
staff, rose-brain, cloud jobs | Rose's APIs |
rose |
today, an alias of rose-staff in an inboundx checkout (the chatbot-issues job and skills call it); later, the client tool |
Rose's APIs |
the other rose-* tools (rose-config, rose-tenant, rose-chat…) |
engineers, in a checkout | mostly databases, backend code or cloud services, with backend secrets |
| the config MCP | clients, in Claude or ChatGPT | the same library as rose-staff, ixrose_client |
Decided (2026-12-02): staff have one tool, rose-staff, in inboundx and in rose-brain; it goes only
through the APIs. rose is kept for a client tool. The other rose-* tools keep their names.
What it does today¶
Read Rose¶
These print JSON. --help on any command lists its options.
| Command | What it reads |
|---|---|
login, logout, whoami |
your sign-in on this computer |
keys create, list, revoke |
your keys |
workspaces [--domain] |
the workspaces staff can select |
figures agents --domain |
Analytics › Rose for Agents, "AI agents through Rose", production, as the tab shows staff: every workspace of the website, merged. A client sees only the workspaces with listed: true, and no tab when none is |
figures questions --domain |
the questions AI agents asked, newest first |
figures conversations --workspace |
one workspace's conversation totals, topics, pages, companies (--compare adds the days just before) |
figures impact --workspace |
the Rose impact tab, over 7, 14, 30 or 90 days |
figures accounts --workspace |
companies that chatted, by intent |
figures teasers --workspace |
contextual teaser A/B tests |
conversations export --workspace |
a page of conversations (--transcripts, --contacts, --topic, --keyword) |
conversations show <session_id> --workspace |
one conversation's messages |
knowledge faqs, documents, document <id>, pricing, curated, retrains |
what the agent answers from |
geo questions, proposals, run, translations |
the GEO FAQ page (public, not chat knowledge) |
teasers --workspace |
the contextual teasers visitors get |
--workspace takes an id, a URL (https://acme.com/fr) or a domain that has only one workspace; a
domain with several is refused, with their URLs, rather than answered for one.
figures agents, questions and impact cover the last --days days until now; the others count
whole days, --until included.
Except agents and questions, these are the config MCP's read tools, with the same rules and notes.
Only figures agents and figures impact are figures of the backoffice's Analytics. figures
conversations counts one workspace's conversations and matches no Analytics card when the website has
several; figures accounts differs from the Accounts page and Home. Before giving any figure to a client,
follow Where each Analytics figure comes from.
In figures agents, faq_pages is null when the FAQ pages are off; rows keeps the crawlers
(crawler: true), which no total counts. In figures questions, a WebMCP question's agent is always
ai_browser, and a deleted conversation is left out although the tab counts it. schema goes up when
a field of these two changes meaning or disappears. A question never carries its session id, which would
open and continue the agent's session.
Ask the agent¶
These came first (IX-5672), for a cloud job with no backend secret. They call the agent API, and use
staging unless --env says otherwise. The details are in
Preview a skill or prompt edit.
| Command | What it does |
|---|---|
ask |
asks a client's agent, with the checkout's unmerged skills and prompts, proposed FAQs, or a reported conversation replayed |
eval --list, --run |
the client's Evaluations set: lists it, or asks each question |
kb search, kb read |
the knowledge the agent has ingested |
faqs |
enabled knowledge FAQs |
conversation |
a reported conversation's transcript |
config |
the resolved config that shapes answers |
ask and eval --run run real test conversations. They stay out of client analytics and plan usage.
Only sending unmerged files needs a checkout: --baseline asks the deployed agent from anywhere.
What it does not do¶
- Change anything: no FAQ, document, GEO page, teaser or setting.
- Read the conversion funnel (IX-6501), or the Consent and Devices tabs.
- Let a client in: every command is for Rose staff.
Sign in¶
| Where | How |
|---|---|
| Your computer | rose-staff login, once: allow it in the browser. It stays signed in until 90 days without use. |
| A job with no browser | rose-staff keys create --name <job> --only figures --domain acme.com on your computer, then set the printed key as ROSE_API_KEY where the job runs. It stops working after 6 months. |
ROSE_API_KEY wins over the saved sign-in. rose-staff whoami exits with status 2 when nobody is signed
in, so a job can check it first. rose-staff keys list and rose-staff keys revoke <id> manage your keys;
rose-staff logout revokes this computer's. Someone who is no longer active staff is refused, whatever
their keys: offboarding is is_active = false in backoffice_users; a Supabase Auth ban alone is not enough.
Limited keys¶
A sign-in opens every command. A job's key opens only what --only says, repeated for more:
--only |
Opens |
|---|---|
figures |
figures …, with the questions asked and the companies that chatted |
conversations |
conversations …, with transcripts and visitor contacts |
knowledge |
knowledge …, geo …, teasers |
agent |
ask, eval, kb, faqs, conversation, config: conversations and knowledge too |
all |
everything |
--domain acme.com, repeated for more, limits the key to those clients, all their workspaces included;
another client then looks like one that does not exist. It cannot be combined with agent or all.
A limited key cannot list keys, nor revoke any but itself.
Give a job the least it needs, above all a job that reads text written by outsiders (Slack messages, visitors, AI agents): such a text could try to make it read another client's data and pass it on.
Give each job its own key: you then revoke one without stopping the others, and see when each was last used. A job's key belongs to the person who made it, so it stops when they leave.
Anyone who has a key can read all it opens; a key without limits also runs test conversations, which cost model calls. Keep it in a secret store.
In an inboundx checkout, ./bootstrap.py installs rose-staff (in backend/.venv/bin, and on your PATH inside
any checkout). rose-brain runs its own copy:
uv run -q --project .tools/rose --python 3.12 rose-staff …. Both share one sign-in on a computer.
The older shared token¶
Before personal keys, the agent commands signed in with ROSE_CLI_TOKEN and IX_API_KEY (IX-5671). When
both variables are set and ROSE_API_KEY is not, those commands still use them, so the chatbot-issues job keeps working until it
has its own key. The token is one value shared by its users: nobody's name is on it, and stopping one
user means rotating it for all. Do not give it to a new job.
IX_API_KEY is not a staff or admin key: it is the shared widget key of older clients, which the agent API
asks of every caller, and it opens nothing of the above by itself. With a personal key, rose-staff gets it
from the admin API.
How access works¶
The key is made on the person's computer and stored as a hash. It works only once the code that allowing it returns reaches a local port of that same computer, so a link someone else sent cannot turn their key on.
The CLI never receives a user token. For the workspace reads, the admin API signs the key's owner in
on its own side (rose_cli_session.py) and runs ixrose_client with that session, so RLS decides what
they reach. The session could write, so it stays in that process, and every route that uses it is a GET
of a fixed read: the API's code, not the database, is what keeps these reads read-only. One of them writes a
status, as the backoffice page does: geo run marks a run that stopped reporting as failed. The two agent
reads run the backoffice's RPCs in backoffice.rose_cli_* functions instead, because they join data in
SQL. Both refuse anyone who is not active staff.
Signing an owner in uses Supabase's email-link sign-in without sending the email. It happens about once an hour per running admin API instance while they use the CLI, and voids an email code they asked for and have not typed yet: they ask for another.
The admin API and the agent API check a key with the same code (ixdata/clients/rose_cli_keys.py). Keys are
shared by test, staging and production, as Supabase is.
Rules for the server side¶
/cli/*skips the Supabase bearer check, so every route there depends oncli_key(only/cli/confirmchecks a pending key itself) and, except for the caller's own keys, is a GET.- Every path has a right in
_RIGHT_OF, and every read goes throughallowed_workspaces: without it, a key limited to one client reads the others. - Keys are made from a staff backoffice session alone: never by a key, and never exchanged for a user token the CLI receives.
- Never return or log the owner's token, nor pass that
Roseto a write. - Never return an agent session id to a key without
conversations: holding it resumes the session.
Where it is going¶
Decided (2026-12-02): commands of the rose-* tools move into rose-staff bit by bit, when
rose-brain or a cloud job needs them. The rest of this section is proposed, not decided.
- Retire
ROSE_CLI_TOKEN. Give thechatbot-issuesjob its ownROSE_API_KEY, check that it runs, then delete the token, its check in the agent API and the two variables. - Merge the near-duplicates, one of each kept:
faqsandknowledge faqs,conversationandconversations show. One default environment. The skills and the job change in the same pull request. -
Move
rose-*commands, reads first. Likely candidates:From To Note rose-configget,list,pricing get,content list,notice listconfig …a read of config the MCP does not open rose-config dataset listeval --listexists for approved questions rose-r4a showagents showRose for Agents vendor settings rose-tenantandrose-document-loaderstatus readsknowledge …the Knowledge API already serves part of it These stay where they are:
rose-chat,rose-evalandrose-langfuse(they run or measure code in a checkout),rose-mongo,rose-neo4jandrose-supabase(raw data stores and backups),rose-merge-branchandrose-changelog(releases). -
Changes, such as a FAQ edit. Each is previewed, then applied, with the code the config MCP already uses (
ixrose_client.changes). How a key gets that permission is open:Option For Against a separate write key, keys create --writea job's read key can never change anything two keys to manage one key, and each change confirmed in the backoffice a leaked key changes nothing by itself no unattended change no writes: staff keep rose-confignothing to build rose-configuses the service key, which no rights limitA key made before this step stays read-only whichever is chosen. The key's rights (
rightsinintegrations.rose_cli_keys) are where a write right would go. -
rosefor clients, with the same commands, API, key table andROSE_API_KEY, which have neutral names for that reason. It needs two things first: the server must limit a client to their own workspaces (it refuses anyone but staff today), and the package must be public without the staff commands. Whether it stays a second tool or becomes one tool where the account decides is open:Option For Against two tools over one library clients never receive staff code; each changes at its own pace two packages one tool, rights from the account one thing to learn and document staff commands must be left out or refused rose-staffthen loses itsrosealias.
Add or move a command¶
- Find the read in
ixrose_client, or add it there: the MCP and the CLI share it. - Add a GET to
ixadmin_api/routes/rose_cli_reads.pythat calls it through theReaddependency. A read that must join data in SQL is abackoffice.rose_cli_*function granted toservice_roleonly, asfigures agents. - Give its path a right in
_RIGHT_OF(routes/rose_cli.py); a path without one is refused. - Add a line to the CLI's
_READS(backend/apps/rose_cli/rose_cli/main.py). - Test the route and the command, as
test_rose_cli_reads.pyandtest_staff.pydo, and add its row above. - When it replaces a
rose-*command, change that command's callers in the same pull request (.agents/skills,.nightshift,docs/src), then delete it.
Never add a write here before the step on changes above is decided, nor raw SQL, a service key or a data store's own
credentials: a command that needs them stays a rose-* tool.