Skip to content

Commit 2ebf97e

Browse files
committed
docs(skills): reconcile publicApiKey canonicality across journeys
Follow-up to 063beaf — two journey files committed in c414f64 still recommended publicLicenseKey as the primary name, which contradicts the canonical/alias resolution established in the rename table. Source of truth: packages/react-core/src/v2/providers/CopilotKitProvider.tsx:122-128 — publicApiKey is documented as "The Copilot Cloud public API key"; publicLicenseKey is an "Alias for publicApiKey" and resolution at line 391 is publicApiKey ?? publicLicenseKey. - 0-to-working-chat: SPA-without-runtime branch uses publicApiKey with VITE_CPK_PUBLIC_API_KEY (matches spa-without-runtime SKILL.md). - go-to-production: dev-only-prop example and "move to Cloud" fix recommend publicApiKey instead of publicLicenseKey.
1 parent 063beaf commit 2ebf97e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

skills/0-to-working-chat/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export default {
271271

272272
### SPA-without-runtime branch (no server)
273273

274-
Point the provider at CopilotKit Cloud via `publicLicenseKey` — no backend,
274+
Point the provider at CopilotKit Cloud via `publicApiKey` — no backend,
275275
no `runtimeUrl`. This is the ONLY production-safe SPA path. See
276276
`copilotkit/spa-without-runtime` for the full treatment.
277277

@@ -281,7 +281,7 @@ import "@copilotkit/react-core/v2/styles.css";
281281

282282
export default function App() {
283283
return (
284-
<CopilotKitProvider publicLicenseKey={import.meta.env.VITE_CPK_LICENSE}>
284+
<CopilotKitProvider publicApiKey={import.meta.env.VITE_CPK_PUBLIC_API_KEY}>
285285
<CopilotChat agentId="default" className="h-full" />
286286
</CopilotKitProvider>
287287
);

skills/go-to-production/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ Expected:
277277
```tsx
278278
<CopilotKitProvider runtimeUrl="/api/copilotkit" />
279279
// or
280-
<CopilotKitProvider publicLicenseKey="ck_pub_..." />
280+
<CopilotKitProvider publicApiKey="ck_pub_..." />
281281
```
282282

283283
Fail condition: any `agents__unsafe_dev_only={{ ... }}` prop in shipped
284284
client code — registers agents in the browser and leaks credentials.
285285
Fix: move agent construction to the server (runtime) or use
286-
`publicLicenseKey` (Cloud). See `copilotkit/spa-without-runtime`.
286+
`publicApiKey` (Cloud). See `copilotkit/spa-without-runtime`.
287287

288288
### Check: no selfManagedAgents in shipped client code
289289

0 commit comments

Comments
 (0)