Skip to content

API: mark a CopilotKit employee on an organization's plan - #2156

Merged
davidmckayv merged 4 commits into
mainfrom
staff-free-spec
Nov 24, 2026
Merged

davidmckayv merged 4 commits into
mainfrom
staff-free-spec

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

A CopilotKit employee on OpenBot Cloud gets the same free trial as everyone, but their own runs are never refused for want of a plan. This is the API side: the plan read says when the reading person is one, so the app can tell them so instead of asking for a card. Additive only.

What changed

  • OrganizationPlan gains an optional boolean copilotKitEmployee: true when the reading person's verified email address is on the copilotkit.ai domain. Present only while a plan is required and the reader is an employee; absent otherwise. It is about the reader alone: other members of the same organization, and the organization's plan, are unchanged.
  • status stays the organization's own for an employee (active, past_due and the rest), with one exception: where it would be none, an employee reads free. So past the free allowance in an organization with no plan they get free, freeRunsUsedPercent 100, freeRunsAllowance (so the app can still say the number) and a null addCardUrl, except that an employee who is an owner or an admin gets addCardUrl when the organization needs a card for members who aren't employees, so they can pay for them; on past_due an admin still gets addCardUrl, since the organization's payment needs updating for everyone else in it. The employee's own runs are never refused in any status. The descriptions of status and freeRunsAllowance cover this.
  • The descriptions say "works for the company that makes OpenBot" rather than naming the company alone, because the generated client carries them and the user-copy test holds every shown string to that rule.
  • New example copilotKitEmployee on getOrganizationPlan: status free, freeRunsUsedPercent 100, freeRunsAllowance 500, copilotKitEmployee true, no add-card link.

The bundle and the app and phone clients are regenerated (the Recorder's client doesn't carry the plan). No screen changes here.

Checks run locally

  • bun run api:lint: valid.
  • oasdiff breaking against main's bundle with --fail-on WARN: no breaking changes. The changelog shows one info-level change: the new optional response property.
  • bun run api:generate run again leaves no diff (bundle and client drift clean).
  • bun test api/ (client boundary and every spec test) and the user-copy test: 81 pass, 0 fail.

OrganizationPlan gains an optional copilotKitEmployee, true when the reading person's verified email is on copilotkit.ai. An employee's own runs are never refused for want of a plan, so past the free allowance the plan read stays free with freeRunsUsedPercent 100, freeRunsAllowance and no addCardUrl. Additive: one optional response property and an example.
The generated client carries the spec's descriptions, and user copy never says CopilotKit alone; say it as the company that makes OpenBot, and say the domain must match exactly.
…s free

For a CopilotKit employee the plan read keeps the organization's real status (active, past_due), with addCardUrl for admins on past_due; only none reads free for them. Their own runs are never refused either way.
…mployees

An employee who is an owner or an admin reads free with addCardUrl set when the organization needs a card for its other members, so they can pay for them; their own runs still go on.
@davidmckayv
davidmckayv merged commit ec2fa63 into main Nov 24, 2026
23 checks passed
@davidmckayv
davidmckayv deleted the staff-free-spec branch November 24, 2026 22:50
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.

1 participant