Skip to content

Commit 6ee92c1

Browse files
committed
Update default backend API URL and documentation
1 parent 03bd9b2 commit 6ee92c1

5 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎packages/bench-cli/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wacht/bench",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "CLI for Wacht Bench, the AI development workbench for Wacht.",
55
"type": "module",
66
"bin": {

‎skills/wacht-backend-js/SKILL.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,29 @@ Required docs:
5151

5252
### Client Setup
5353

54-
The default client lazy-initializes from `WACHT_API_KEY` (and optional `WACHT_BACKEND_API_URL`) the first time any SDK function runs. No setup call is needed in the common case:
54+
The default client lazy-initializes from `WACHT_API_KEY` and uses `https://api.wacht.dev` the first time any SDK function runs. No setup call is needed in the common case:
5555

5656
```ts
5757
import { users } from '@wacht/backend';
5858

5959
const response = await users.listUsers({ limit: 20 });
6060
```
6161

62-
Call `initClient()` only when you need to override the env defaults (e.g. injecting a custom `fetch` for Cloudflare Workers, or pointing at a non-default base URL):
62+
Call `initClient()` only when you need to inject runtime-specific options such as a custom `fetch` for Cloudflare Workers:
6363

6464
```ts
6565
import { initClient, users } from '@wacht/backend';
6666

6767
initClient({
6868
apiKey: env.WACHT_API_KEY,
69-
baseUrl: env.WACHT_BACKEND_API_URL,
7069
fetch: env.fetch.bind(env),
7170
});
7271

7372
await users.listUsers({ limit: 20 });
7473
```
7574

75+
Do not set `WACHT_BACKEND_API_URL` from a deployment `backend_host`/`fapi.trywacht.xyz` value. That host is for deployment frontend/runtime traffic, not the backend SDK API.
76+
7677
### Request Auth
7778

7879
```ts

‎skills/wacht-setup/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ Required env:
107107
108108
```bash
109109
WACHT_API_KEY=sk_test_… # sk_live_… on production deployments
110-
WACHT_BACKEND_API_URL=https://...
111110
```
112111
112+
Do not add `WACHT_BACKEND_API_URL` for normal setup. The backend SDK defaults to `https://api.wacht.dev`; deployment `backend_host`/`fapi.trywacht.xyz` is not the backend SDK API URL.
113+
113114
### Rust
114115
115116
Before editing `Cargo.toml`, fetch `/sdks/rust/getting-started` through Wacht Docs MCP and copy the current `wacht` crate version from that page.

‎skills/wacht-setup/references/framework-detection.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ Server-only API key:
5050
WACHT_API_KEY=sk_live_xxx
5151
```
5252

53-
Backend URL override, when needed:
54-
55-
```bash
56-
WACHT_BACKEND_API_URL=https://...
57-
```
53+
Do not add `WACHT_BACKEND_API_URL` for normal setup. The backend SDK defaults to `https://api.wacht.dev`; deployment `backend_host`/`fapi.trywacht.xyz` is not the backend SDK API URL.
5854

5955
Never use a secret key in a public env variable.

‎skills/wacht/SKILL.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ Required docs:
5454
- Cite the Wacht docs pages used when explaining important choices.
5555
- Run the validation commands from the specialized skill before finishing.
5656

57+
## Source of Truth for Customer-Facing Code
58+
59+
When the code you write will be read or run by a customer (their app, their `.env`, demo material, hand-off snippets, blog/launch content), the **skill text and Wacht Docs MCP are the source of truth**. Source-code grep is for internal/contributor work only.
60+
61+
Why this matters: the SDK source exports advanced/internal knobs as normal-looking public options. Reading the source and pattern-matching "public option = customer env var" leaks plumbing into customer DX. The skills and docs are the curated public surface — anything not mentioned there should stay out of customer-facing files (`.env.example`, README, integration code).
62+
63+
If a knob is missing from the skill but you think a customer needs it, that is a signal to ask the user — not a signal to invent the env var.
64+
5765
## Cross-Skill Safety Rules
5866

5967
| Risk | Rule |
@@ -62,4 +70,5 @@ Required docs:
6270
| Client-only auth | Client auth state is UX only; protected reads and mutations need server enforcement. |
6371
| Tenant leakage | Organization/workspace scoped features must enforce tenancy server-side. |
6472
| Stale docs | Use Wacht Docs MCP or local checked-in docs before relying on remembered SDK behavior. |
73+
| Source-grep bias | For customer-facing code, skills + Docs MCP only. Do not grep `wacht/node/src`, `wacht/react/src`, etc. as a primary reference. |
6574
| Over-editing | Make the smallest integration change that satisfies the user request. |

0 commit comments

Comments
 (0)