You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/CLAUDE-KNOWLEDGE.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,3 +355,12 @@ Then restart the dev server. This rebuilds all packages and generates the necess
355
355
356
356
## Q: How is backwards compatibility for the offer→product rename handled in the payments purchase APIs?
357
357
A: API v1 requests are routed through the `v2beta1` migration. The migration wraps the latest handlers, accepts legacy `offer_id`/`offer_inline` request fields, translates product-related errors back to the old offer error codes/messages, and augments responses (like `validate-code`) with `offer`/`conflicting_group_offers` aliases alongside the new `product` fields. Newer API versions keep the product-only contract.
358
+
359
+
## Q: How does `/api/v1/ai/query/generate` reject invalid AI tool names?
360
+
A: Invalid `tools` entries are rejected by `requestBodySchema` in `apps/backend/src/lib/ai/schema.ts` via `yupString().oneOf(TOOL_NAMES)`, so the endpoint returns a structured `SCHEMA_ERROR` object mentioning `body.tools[n]` rather than a custom `"Invalid tool names"` string from handler logic.
361
+
362
+
## Q: Why did the internal metrics E2E snapshots need to change in April 2026?
363
+
A: The `/api/v1/internal/metrics` response now intentionally includes `analytics_overview.daily_anonymous_visitors_fallback`, `analytics_overview.anonymous_visitors_fallback`, and `active_users_by_country`. Those additions are reflected in `packages/stack-shared/src/interface/admin-metrics.ts` and the backend route, so the E2E snapshots must include them instead of treating them as regressions.
364
+
365
+
## Q: Why can environment config override writes fail with a product/product-line customer type warning after creating a preview project?
366
+
A: The environment override endpoint validates the new environment override against the rendered branch config. Preview dummy payments data must therefore be internally coherent: products assigned to a product line need the same `customerType` as that product line, otherwise unrelated environment patches can fail with warnings like `Product "growth" has customer type "user" but its product line "workspace" has customer type "team"`.
Copy file name to clipboardExpand all lines: apps/backend/.env
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ STACK_TELEGRAM_BOT_TOKEN= # enter you telegram bot token
117
117
STACK_TELEGRAM_CHAT_ID=# enter your telegram chat id
118
118
119
119
# Docs AI tool bundle
120
-
STACK_DOCS_INTERNAL_BASE_URL=# override the docs origin used by the backend's AI tool bundle to call the docs app's `/api/internal/docs-tools` endpoint. Defaults to http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04 in dev, https://mcp.stack-auth.com in prod
120
+
STACK_MINTLIFY_MCP_URL=# override the Mintlify MCP server used by the backend's AI docs tool bundle. Defaults to https://stackauth-e0affa27.mintlify.app/mcp
"Pass the conversationId from a previous response to group related calls into the same conversation. Omit on the first call — the server will generate one and return it.",
37
+
"Pass the conversationId from a previous response to group related calls into the same conversation. Omit on the first call - the server will generate one and return it.",
content: [{type: "text",text: `${text.length>0 ? text : "(empty response)"}\n\n[conversationId: ${responseConversationId}— pass this value as the conversationId parameter in your next ask_stack_auth call to continue this conversation]`}],
87
+
content: [{type: "text",text: `${text.length>0 ? text : "(empty response)"}\n\n[conversationId: ${responseConversationId}- pass this value as the conversationId parameter in your next ask_stack_auth call to continue this conversation]`}],
90
88
};
91
89
},
92
90
);
93
91
},
94
92
{
95
-
capabilities: {
96
-
tools: {
97
-
ask_stack_auth: {
98
-
description:
99
-
"Ask the Stack Auth documentation assistant any question about Stack Auth (setup, APIs, SDKs, configuration, troubleshooting).",
100
-
parameters: {
101
-
type: "object",
102
-
properties: {
103
-
question: {
104
-
type: "string",
105
-
description: "The full question to ask about Stack Auth.",
106
-
},
107
-
reason: {
108
-
type: "string",
109
-
description:
110
-
"Why the agent invoked this tool (for analytics and debugging). Not sent to the documentation model.",
111
-
},
112
-
userPrompt: {
113
-
type: "string",
114
-
description:
115
-
"The original user message/prompt that triggered this tool call. Copy the user's exact words.",
116
-
},
117
-
conversationId: {
118
-
type: "string",
119
-
description:
120
-
"Pass the conversationId from a previous response to group related calls. Omit on first call.",
0 commit comments