Skip to content

Rename organization to team - #99

Open
purpshell wants to merge 1 commit into
mainfrom
team-rename-20261112
Open

purpshell wants to merge 1 commit into
mainfrom
team-rename-20261112

Conversation

@purpshell

@purpshell purpshell commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Renames "organization" to "team" across the CLI. Greenfield: no deprecated aliases or shims.

Tracks contract revision 61610853b4 of polymorfa/polymorfa#887.
Depends on the polymorfa/sdks team-rename PR (organizationApiKey → teamApiKey, OrganizationClient → TeamClient, organizations → teams, validateOrganizationApiKey → validateTeamApiKey, ClientInstance<'organization'> → ClientInstance<'team'>).
Must merge after #887 and the SDK PR. package.json still pins the current published @polymorfa/sdk; it must be bumped to the SDK release that carries the rename before this merges. Nothing is published here.

Renamed surface

  • --owner organization → --owner team (every command that takes --owner; value choices are now project|team)
  • Stored profile key organization → team
  • Output/JSON: principalType organization_key → team_key, organizationId → teamId, resource owner organization → team
  • Listener frame field organizationId → teamId
  • SDK credential type organizationApiKey → teamApiKey
  • Help text, errors, README, skills and docs
  • Fixture IDs org_* → team_*
  • No commands, subcommands or environment variables were named org/organization in this repo (credentials use POLYMORFA_API_KEY), so none changed.

Kept (not the tenant): message send contact --organization (vCard ORG: company field), npm/GitHub organization wording in internal/npm-prerelease.md, .org URLs.

Reference artifact

contracts/cli-reference.json regenerated (npm run docs:reference, 381 commands) for the docs app's sync-cli-reference.mjs.

Five-part assessment

  • API: unaffected at runtime beyond the wire names; the CLI now sends/reads teamId, team_key, bansafe_team_suspended, teams routes through the SDK. contracts/abprops-capabilities.json updated for the renamed error code.
  • SDKs: blocked on the polymorfa/sdks team-rename PR and its release. Code uses the new public names. Verified against a locally renamed copy of the pinned SDK, not the real release.
  • CLI: updated (this PR).
  • Docs: updated README, skills, docs/ and the reference artifact. The public Mintlify CLI reference in polymorfa/polymorfa syncs from contracts/cli-reference.json after this merges; not yet synced.
  • Feature releases: unaffected: no feature flag, entitlement or rollout changes; availability follows #887's release plan.

Verification

  • tsc typecheck, eslint ., prettier --check: clean
  • vitest run: 1169/1169 pass (with --maxWorkers=3 --testTimeout=30000; the default run shows load-related 5s timeouts on a busy machine)
  • npm run docs:reference: regenerated
  • Not run: verify:browser, verify:bundled-runtime, npm pack, audit:prod, and a build against the real renamed SDK release.
  • Final grep for \borg(anization)?s?\b|orgId|organizationId|organization_api_key|ORG_KEY|--org\b: remaining hits are only the vendor/non-tenant items listed above plus .org URLs (registry.npmjs.org).

Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Contract and dependency status (2026-11-12)

  • polymorfa/polymorfa#887 merged into dev as a3db53e74c6e24507ca01e2ff6ecba19358422c7. Its specs are identical to contract revision f180dc1ee2.
  • Rename organization to team across the SDKs sdks#372 merged into main as 6f4afba13d48ba55356def32b6aa1aa2f169f5a7.
  • Blocked: CI compiles against the published @polymorfa/sdk, which still exports the organization names (validateOrganizationApiKey, Client<'organization'>). No SDK release with the team names exists yet. The nightly publish (publish-dev.yml) builds only after staging acceptance passes for the API commit pinned in the SDK's contracts/source.json, which needs #887 deployed to staging. Once a nightly 0.x.y-dev.<timestamp> is published, bump the exact @polymorfa/* versions here, rerun CI, and merge.

Tracks contract revision 61610853b4 of polymorfa/polymorfa#887. Renames the
--owner value, profile key, principal type, output fields, SDK credential and
client names, help text, README, skills and tests. No aliases or shims.
Regenerates contracts/cli-reference.json.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

The included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 108 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 542e514f-470f-44bb-b0ef-10db3f754ca3
Commits

Reviewing files that changed from the base of the PR and between a97c179 and 5f63032.

Files selected for processing: 106

  • README.md
  • contracts/abprops-capabilities.json
  • contracts/cli-reference.json
  • docs/command-research/business-app.md
  • docs/command-research/call-consent.md
  • docs/command-research/calls-lids-users.md
  • docs/command-research/calls.md
  • docs/command-research/campaigns.md
  • docs/command-research/customers.md
  • docs/command-research/developer-events-webhooks.md
  • docs/command-research/platform-management.md
  • docs/command-research/quicklinks.md
  • docs/command-research/voice.md
  • docs/development/bansafe-sdk-integration.md
  • docs/superpowers/plans/2026-08-19-cli-foundation-and-api.md
  • docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md
  • package.json
  • skills/polymorfa/SKILL.md
  • src/base-command.ts
  • src/commands/analytics/get.ts
  • src/commands/analytics/metrics.ts
  • src/commands/audit-log/list.ts
  • src/commands/auth/login.ts
  • src/commands/auth/status.ts
  • src/commands/billing/limits/list.ts
  • src/commands/billing/limits/set.ts
  • src/commands/billing/priority/list.ts
  • src/commands/billing/priority/reorder.ts
  • src/commands/billing/priority/set.ts
  • src/commands/calls/export.ts
  • src/commands/calls/opt-outs/add.ts
  • src/commands/calls/opt-outs/import.ts
  • src/commands/calls/opt-outs/list.ts
  • src/commands/calls/opt-outs/remove.ts
  • src/commands/calls/policy/get.ts
  • src/commands/calls/policy/set.ts
  • src/commands/calls/stats.ts
  • src/commands/key/list.ts
  • src/commands/key/revoke.ts
  • src/commands/listen.ts
  • src/commands/member/list.ts
  • src/commands/optout/settings/update.ts
  • src/commands/optout/settings/view.ts
  • src/commands/security-incident/list.ts
  • src/commands/session-ban/list.ts
  • src/commands/session/list.ts
  • src/commands/session/status.ts
  • src/commands/session/view.ts
  • src/commands/webhook/test.ts
  • src/commands/widget/update.ts
  • src/commands/widget/view.ts
  • src/config/profiles.ts
  • src/context/environment.ts
  • src/context/owner.ts
  • src/developer/client.ts
  • src/developer/render.ts
  • src/functions/command.ts
  • src/listener/frames.ts
  • src/mcp/server.ts
  • src/mcp/session-discovery.ts
  • src/output/contracts.ts
  • src/sdk/client.ts
  • src/services/audiences.ts
  • src/services/auth.ts
  • src/services/bansafe.ts
  • src/services/billing-controls.ts
  • src/services/call-analytics.ts
  • src/services/call-consent.ts
  • src/services/campaign-conversions.ts
  • src/services/campaign-frequency-cap.ts
  • src/services/campaign-segments-drip.ts
  • src/services/customers.ts
  • src/services/doctor.ts
  • src/services/init-starter.ts
  • src/services/number-tiers.ts
  • src/services/opt-outs.ts
  • src/services/platform-management.ts
  • src/services/projects.ts
  • src/services/usage.ts
  • test/commands/audiences-optouts.test.ts
  • test/commands/call-analytics.test.ts
  • test/commands/call-consent.test.ts
  • test/commands/campaign-segments-drip.test.ts
  • test/commands/customers.test.ts
  • test/commands/developer-webhooks.test.ts
  • test/commands/event-stream.test.ts
  • test/commands/events.test.ts
  • test/commands/functions.test.ts
  • test/commands/hybrid-credentials.test.ts
  • test/commands/hybrid-link.test.ts
  • test/commands/listen.test.ts
  • test/commands/operations.test.ts
  • test/commands/platform-management.test.ts
  • test/commands/project-context.test.ts
  • test/config/profiles.test.ts
  • test/context/environment.test.ts
  • test/context/owner.test.ts
  • test/developer/client.test.ts
  • test/developer/output.test.ts
  • test/listener/frames.test.ts
  • test/listener/session.test.ts
  • test/mcp/session-discovery.test.ts
  • test/sdk/client.test.ts
  • test/services/auth.test.ts
  • test/services/call-consent.test.ts
  • test/services/projects.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T09:32:33.633410Z 5f63032 PR opened
🔒 Security Review ✅ Completed 2026-11-12T09:32:45.550134Z 5f63032 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f63032bb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/profiles.ts
Comment on lines +141 to 144
'team',
'project',
])
if (Object.keys(value).some((key) => !profileKeys.has(key))) return false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Migrate persisted organization metadata before validating profiles

When upgrading with an existing config containing organization or owner: 'organization', the renamed validator rejects previously valid version-1 and version-2 profiles as having an invalid shape. validateConfig still accepts those config versions but performs no migration, so one legacy profile prevents the entire config from loading, breaking profile-backed commands and even auth login and auth logout, which also load it first. Normalize the legacy field and owner value to their team equivalents before applying the new validation.

Useful? React with 👍 / 👎.

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