@fireweaveai/server-sdk 3.0.0-staging.1 → 3.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -198
- package/dist/application/client.d.ts +1 -1
- package/dist/application/client.js +1 -1
- package/dist/infrastructure/adapters/remote.js +1 -1
- package/dist/start/build-info.d.ts +1 -1
- package/dist/start/build-info.d.ts.map +1 -1
- package/dist/start/build-info.js +1 -1
- package/dist/start/build-info.js.map +1 -1
- package/dist/start/env.d.ts +1 -1
- package/dist/start/env.js +1 -1
- package/dist/start/names.d.ts +0 -10
- package/dist/start/names.d.ts.map +1 -1
- package/dist/start/names.js +0 -10
- package/dist/start/names.js.map +1 -1
- package/dist/start/resolve.d.ts +1 -1
- package/dist/start/resolve.d.ts.map +1 -1
- package/dist/start/resolve.js +15 -30
- package/dist/start/resolve.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,226 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
<a href="https://app.fireweave.ai">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/FireWeave-HQ/fireweave-sdk/main/.github/assets/banner-dark.png">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/FireWeave-HQ/fireweave-sdk/main/.github/assets/banner-light.png">
|
|
5
|
+
<img alt="Fireweave — agents write the code. We watch every rollout, under control." src="https://raw.githubusercontent.com/FireWeave-HQ/fireweave-sdk/main/.github/assets/banner-light.png" width="100%">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/@fireweaveai/server-sdk"><img alt="node" src="https://img.shields.io/npm/v/@fireweaveai/server-sdk?label=node&logo=nodedotjs&style=flat&labelColor=0E0E10&color=ED5502&logoColor=white"></a>
|
|
11
|
+
</p>
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
- **Runs on Node ≥ 20.20, Bun ≥ 1.2, and Deno ≥ 2.0** — no Node built-ins, no Node globals ([ADR-0008](../../docs/adr/0008-multi-runtime-support.md)).
|
|
9
|
-
- **No vendor SDK, key, or hostname in your process.** Applications hold a Fireweave project key and talk to fw-server; which backend fw-server forwards to is fw-server's concern ([ADR-0005](../../docs/adr/0005-fireweave-proxy-backend.md), [ADR-0006](../../docs/adr/0006-node-drops-direct-posthog-adapter.md)).
|
|
13
|
+
**Fireweave is the AI release engineer for teams shipping with coding agents.** Every change rolls out behind a control point, one step at a time, with guardrails watching real users — and if something breaks, Fireweave pauses or rolls it back before most users ever see it. It's the only way to ship as fast as your agents write code, without the fear of breaking production.
|
|
10
14
|
|
|
11
|
-
##
|
|
15
|
+
## Quick start · Node.js · Bun · Deno
|
|
12
16
|
|
|
13
17
|
```bash
|
|
14
|
-
npm install @fireweaveai/server-sdk
|
|
18
|
+
npm install @fireweaveai/server-sdk
|
|
19
|
+
# bun add @fireweaveai/server-sdk · deno add npm:@fireweaveai/server-sdk
|
|
15
20
|
```
|
|
16
21
|
|
|
17
|
-
```ts
|
|
18
|
-
// Deno needs no install step
|
|
19
|
-
import { initFireweave } from 'npm:@fireweaveai/server-sdk';
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Quick start (one line: the start profile)
|
|
23
|
-
|
|
24
|
-
Most apps need only this ([ADR-0012](../../docs/adr/0012-start-profile.md)). Two small files and one import:
|
|
25
|
-
|
|
26
|
-
```ts
|
|
27
|
-
// src/fireweave/control-points.ts: every control point the app reads, with its local value
|
|
28
|
-
import { defineControlPoints } from '@fireweaveai/server-sdk/start';
|
|
29
|
-
|
|
30
|
-
export const controlPoints = defineControlPoints({
|
|
31
|
-
'new-checkout': { local: true }, // served only in local mode
|
|
32
|
-
});
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
// src/fireweave/start.ts
|
|
37
|
-
import { start } from '@fireweaveai/server-sdk/start';
|
|
38
|
-
import { controlPoints } from './control-points';
|
|
39
|
-
|
|
40
|
-
start({ controlPoints });
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
// src/main.ts: must be the FIRST import
|
|
45
|
-
import './fireweave/start';
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
```ts
|
|
49
|
-
// any call site
|
|
50
|
-
import { fw } from '@fireweaveai/server-sdk/start';
|
|
51
|
-
|
|
52
|
-
// @fireweave-controlpoint new-checkout
|
|
53
|
-
if (await fw.controlPoints.getBooleanValue('new-checkout', false, { targetingKey: user.id })) { /* … */ }
|
|
54
|
-
await fw.identify(user.id, { plan: user.plan }); // at sign-in
|
|
55
|
-
await fw.controlPoints.getBooleanValue('nightly-reindex', false, { targetingKey: fw.instanceKey() }); // server as subject
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Deployed environments set one variable, `FIREWEAVE_KEY` (the project key, `project-api-key_…`).
|
|
59
|
-
Local development needs nothing when `NODE_ENV` (or `APP_ENV` / `FIREWEAVE_ENV`) is
|
|
60
|
-
`development`, `dev`, `local` or `test`.
|
|
61
|
-
|
|
62
|
-
### Options and overrides
|
|
63
|
-
|
|
64
|
-
Every value resolves as: `start()` option, then env var, then legacy name (warns once), then default.
|
|
65
|
-
|
|
66
|
-
| Option | Env var | Default | What it does |
|
|
67
|
-
| --- | --- | --- | --- |
|
|
68
|
-
| `controlPoints` | — | `{}` | Local values per control point. Ignored in remote mode. |
|
|
69
|
-
| `mode` | — | inferred | `'remote'` or `'local'`. Overrides inference. `'remote'` without a key is a start error; `'local'` ignores a key. |
|
|
70
|
-
| `environment` | `FIREWEAVE_ENV`, `APP_ENV`, `NODE_ENV` | — | Environment name used for inference when there is no key and no `mode`. Pass your own, e.g. `environment: process.env.DEPLOY_STAGE`. |
|
|
71
|
-
| `url` | `FIREWEAVE_URL` (legacy `FW_API_URL`, `FW_ATTEST_URL`) | from the SDK build | A `-staging.N` build calls `staging-app-server.fireweave.ai`; any other calls `app-server.fireweave.ai`. Set it for a self-hosted or local fw-server. |
|
|
72
|
-
| `key` | `FIREWEAVE_KEY` (legacy `FW_PROJECT_API_KEY`) | — | Project key. Pass it to read from your own secret store. Browser keys and vendor keys are rejected at start. |
|
|
73
|
-
| `instanceId` | `FIREWEAVE_INSTANCE_ID` | hash of the host name | Value of `fw.instanceKey()`. Nothing is written to disk. |
|
|
74
|
-
| `env` | — | the process | Read values from this object instead of the environment. |
|
|
75
|
-
| `log` | — | console | Where `[fireweave]` lines go. |
|
|
76
|
-
|
|
77
|
-
**Mode rule.** `mode` wins. Otherwise: a key means remote. No key and a development
|
|
78
|
-
environment name means local. Anything else (including no environment name at all) throws
|
|
79
|
-
at `start()`, naming the variable, so a deploy that forgot its key fails instead of silently
|
|
80
|
-
serving defaults.
|
|
81
|
-
|
|
82
|
-
**Reads never throw.** If start fails, reads return your default (`*Details` return an `ERROR`
|
|
83
|
-
decision). `fw.status()` reports the mode, channel, host and key source, never the key.
|
|
84
|
-
`start()` is idempotent; a second call with a different config throws. Zero-config apps can use
|
|
85
|
-
`import '@fireweaveai/server-sdk/register'` (or `node --import`, `bun --preload`) instead of
|
|
86
|
-
`src/fireweave/start.ts`.
|
|
87
|
-
|
|
88
|
-
**When reads return only defaults.** A revoked or wrong key must not look like a rollout at 0%.
|
|
89
|
-
When fw-server refuses the key (HTTP 401 or 403), rate-limits it (429) or cannot be reached
|
|
90
|
-
(network error, timeout, 5xx), the start profile logs **one** `[fireweave]` line per kind for the
|
|
91
|
-
life of the process, naming where the key came from (`FIREWEAVE_KEY`, `FW_PROJECT_API_KEY` or
|
|
92
|
-
`start({ key })`) or the endpoint host, never the key itself. `fw.status().lastErrorKind` holds
|
|
93
|
-
the kind of the latest failed request (`Authentication`, `Authorization`, `RateLimited`,
|
|
94
|
-
`Network`, `Timeout` or `BackendUnavailable`). It is sticky: once requests succeed again, reads
|
|
95
|
-
return real values, but `lastErrorKind` keeps the last failure and the line is not logged again.
|
|
96
|
-
A fresh `start()` after `fw.shutdown()` clears it.
|
|
97
|
-
|
|
98
|
-
## Quick start (production path, core API)
|
|
99
|
-
|
|
100
22
|
```ts
|
|
101
23
|
import { initFireweave } from '@fireweaveai/server-sdk';
|
|
102
24
|
|
|
103
|
-
// apiUrl/apiKey are required, explicit options — the SDK reads no
|
|
104
|
-
// environment variables (spec/modes.md).
|
|
105
25
|
const fireweave = await initFireweave({
|
|
106
26
|
mode: 'remote',
|
|
107
27
|
apiUrl: process.env.FW_API_URL!,
|
|
108
28
|
apiKey: process.env.FW_PROJECT_API_KEY!,
|
|
109
29
|
});
|
|
110
30
|
|
|
111
|
-
// Once per
|
|
112
|
-
await fireweave.registerTarget('user_42', {
|
|
113
|
-
kind: 'user',
|
|
114
|
-
properties: { plan: 'pro', region: 'eu-west' },
|
|
115
|
-
});
|
|
31
|
+
// Once per user: the facts your targeting rules match on.
|
|
32
|
+
await fireweave.registerTarget('user_42', { kind: 'user', properties: { plan: 'pro' } });
|
|
116
33
|
|
|
117
|
-
// Per request.
|
|
34
|
+
// Per request: evaluate a control point.
|
|
118
35
|
const enabled = await fireweave.controlPoints.getBooleanValue('new-checkout', false, {
|
|
119
36
|
targetingKey: 'user_42',
|
|
120
37
|
});
|
|
121
|
-
|
|
122
|
-
await fireweave.shutdown(); // flushes queued network I/O first
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Quick start (offline, local mode)
|
|
126
|
-
|
|
127
|
-
```ts
|
|
128
|
-
import { initFireweave } from '@fireweaveai/server-sdk';
|
|
129
|
-
|
|
130
|
-
const fireweave = await initFireweave({
|
|
131
|
-
mode: 'local',
|
|
132
|
-
local: { controlPoints: { 'new-checkout': true } },
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
// → true
|
|
136
|
-
await fireweave.controlPoints.getBooleanValue('new-checkout', false, { targetingKey: 'u1' });
|
|
38
|
+
console.log('new-checkout:', enabled);
|
|
137
39
|
|
|
138
40
|
await fireweave.shutdown();
|
|
139
41
|
```
|
|
140
42
|
|
|
141
|
-
|
|
142
|
-
inferred, so a missing or mistyped credential fails loudly at boot instead of silently falling
|
|
143
|
-
back to local evaluation. Reads on the returned client never throw — every failure resolves to
|
|
144
|
-
the caller's `default` with a `Decision` naming the reason (`spec/control-points.md` "Return
|
|
145
|
-
discipline").
|
|
146
|
-
|
|
147
|
-
## Lower-level construction
|
|
148
|
-
|
|
149
|
-
`initFireweave` is a thin composition root over exported pieces — construct them directly for a
|
|
150
|
-
custom adapter or advanced wiring:
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
import { FireweaveClient, FireweaveRemoteAdapter, FireweaveRuntime } from '@fireweaveai/server-sdk';
|
|
154
|
-
|
|
155
|
-
const runtime = new FireweaveRuntime(new FireweaveRemoteAdapter({ apiUrl, apiKey }));
|
|
156
|
-
const fireweave = new FireweaveClient(runtime);
|
|
157
|
-
await fireweave.initialize();
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
The key is `controlPointKey` everywhere, on the wire and in `Decision`, from 3.0.0
|
|
161
|
-
([ADR-0013](../../docs/adr/0013-control-point-wire.md)).
|
|
162
|
-
|
|
163
|
-
## Module layout
|
|
164
|
-
|
|
165
|
-
| Module | Responsibility |
|
|
166
|
-
| --- | --- |
|
|
167
|
-
| `application/runtime.ts` | Lifecycle state machine, config validation, context policy, decision construction. Evaluation never throws. |
|
|
168
|
-
| `application/client.ts` | `FireweaveClient` — `controlPoints`, `registerTarget`. |
|
|
169
|
-
| `application/mode.ts` | `initFireweave` — the single entry point; the only module allowed to import concrete adapters. |
|
|
170
|
-
| `infrastructure/adapters/remote.ts` | `FireweaveRemoteAdapter` — the production backend (`/v1/control-points/evaluate`, `/v1/targets/register`). |
|
|
171
|
-
| `infrastructure/adapters/inmemory.ts` | Deterministic fixture-driven adapter for tests and conformance. |
|
|
172
|
-
| `infrastructure/adapters/local.ts` | `FireweaveLocalAdapter` — the DEV substrate `initFireweave({ mode: 'local' })` builds. |
|
|
173
|
-
| `application/ports.ts` | The `BackendAdapter` boundary. |
|
|
174
|
-
| `domain/context.ts` | Merge order (global → client → invocation), deep copy, bounds, reserved keys. |
|
|
175
|
-
| `domain/errors.ts` | The 15-kind error taxonomy and secret redaction. |
|
|
176
|
-
| `infrastructure/hosts.ts` | SSRF allowlist (on by default; https required off-loopback). |
|
|
177
|
-
|
|
178
|
-
## Configuration
|
|
179
|
-
|
|
180
|
-
The SDK reads no environment variables (spec/modes.md) — every option is an explicit argument to
|
|
181
|
-
`initFireweave` (or the adapter constructor, for lower-level use).
|
|
182
|
-
|
|
183
|
-
| Option | Mode | Description |
|
|
184
|
-
| --- | --- | --- |
|
|
185
|
-
| `apiUrl` | `remote` | fw-server base URL (required) |
|
|
186
|
-
| `apiKey` | `remote` | Fireweave project key (`project-api-key_…`) (required) |
|
|
187
|
-
| `allowedHosts` | `remote` | SSRF allowlist override |
|
|
188
|
-
| `local.controlPoints` | `local` | seeded boolean overrides; a present key resolves `STATIC`, an absent key misses to the caller's default with reason `DEFAULT` |
|
|
189
|
-
|
|
190
|
-
## Upgrading from 2.x: `flags` → `controlPoints`
|
|
191
|
-
|
|
192
|
-
`client.flags` was removed in 3.0.0 ([ADR-0013](../../docs/adr/0013-control-point-wire.md)); use `client.controlPoints`, which is the same object it returned. `Decision.flagKey` is now `Decision.controlPointKey`, the error kind `FlagNotFound` is `ControlPointNotFound`, and the start option `flags` is `controlPoints` (`defineControlPoints`). Scope the edit. `flags` is an ordinary word: your repo very likely contains feature-flag code, config keys, DB columns, and `flags` variables that have nothing to do with this SDK.
|
|
193
|
-
|
|
194
|
-
**Rename only `.flags` accesses whose receiver is provably a `FireweaveClient`** — traceable to a `new FireweaveClient(...)`/`initFireweave(...)` call, an imported binding assigned from one, or a parameter annotated `FireweaveClient`.
|
|
195
|
-
|
|
196
|
-
Never rename:
|
|
197
|
-
|
|
198
|
-
| Looks similar | Why it stays |
|
|
199
|
-
| --- | --- |
|
|
200
|
-
| `new InMemoryAdapter({ flags: … })` | SDK option key, unchanged |
|
|
201
|
-
| `FlagValueType`, `InMemoryFlagDefinition` | SDK API, unchanged |
|
|
202
|
-
| your own `flags` variables, `featureFlags`, CLI `--flags`, `flags` columns | not this SDK |
|
|
203
|
-
| another vendor's SDK (`ldClient.variation`, flagd, Unleash) | not this SDK |
|
|
204
|
-
|
|
205
|
-
**Do not run a repo-wide `flags` → `controlPoints` replacement** — not with `sed`, not with editor replace-all. Go call site by call site, and when a receiver is ambiguous, leave it. The compiler finds a missed rename; a wrong one breaks unrelated code.
|
|
206
|
-
|
|
207
|
-
## Development
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
npm install # from sdks/node
|
|
211
|
-
npm run build # emit dist/ (package exports resolve to it)
|
|
212
|
-
npm run verify # typecheck + unit + integration + conformance + smoke
|
|
213
|
-
npm run smoke # cross-runtime smoke (Node leg)
|
|
214
|
-
|
|
215
|
-
bun test test/unit test/integration
|
|
216
|
-
bun scripts/smoke-runtimes.mjs
|
|
217
|
-
deno run --allow-read scripts/smoke-runtimes.mjs
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## Documentation
|
|
43
|
+
## Learn more
|
|
221
44
|
|
|
222
|
-
|
|
45
|
+
[Concepts](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/docs/concepts.md) · [Identity](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/docs/identity.md) · [Testing](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/docs/testing.md) · [Troubleshooting](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/docs/troubleshooting.md) · [Module formats (CommonJS)](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/docs/module-formats.md) · [All SDKs](https://github.com/FireWeave-HQ/fireweave-sdk#quick-start)
|
|
223
46
|
|
|
224
47
|
## License
|
|
225
48
|
|
|
226
|
-
[MIT](
|
|
49
|
+
[MIT](https://github.com/FireWeave-HQ/fireweave-sdk/blob/main/LICENSE)
|
|
@@ -21,7 +21,7 @@ export interface ExtensionResult {
|
|
|
21
21
|
* — errors surface as ERROR decisions, exactly like the OpenFeature path.
|
|
22
22
|
*
|
|
23
23
|
* "Control point" is the Fireweave product noun (ADR-0007), on the wire too
|
|
24
|
-
*
|
|
24
|
+
* (ADR-0013).
|
|
25
25
|
*/
|
|
26
26
|
export declare class ControlPointsApi {
|
|
27
27
|
private readonly runtime;
|
|
@@ -34,7 +34,7 @@ const lifecycleGate = (runtime) => {
|
|
|
34
34
|
* — errors surface as ERROR decisions, exactly like the OpenFeature path.
|
|
35
35
|
*
|
|
36
36
|
* "Control point" is the Fireweave product noun (ADR-0007), on the wire too
|
|
37
|
-
*
|
|
37
|
+
* (ADR-0013).
|
|
38
38
|
*/
|
|
39
39
|
export class ControlPointsApi {
|
|
40
40
|
runtime;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* POST /v1/capture
|
|
7
7
|
* POST /v1/targets/register
|
|
8
8
|
*
|
|
9
|
-
* Auth: Authorization: Bearer <
|
|
9
|
+
* Auth: Authorization: Bearer <project key> (project-api-key_…).
|
|
10
10
|
* Which backend fw-server forwards to is fw-server's concern: no vendor SDK,
|
|
11
11
|
* key, or host ever enters the application process.
|
|
12
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info.d.ts","sourceRoot":"","sources":["../../src/start/build-info.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"build-info.d.ts","sourceRoot":"","sources":["../../src/start/build-info.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,WAAW,EAAE,SAAS,GAAG,YAAwB,CAAC"}
|
package/dist/start/build-info.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
// The start profile reads SDK_CHANNEL to choose its default fw-server host
|
|
3
3
|
// (docs/adr/0012-start-profile.md). test/unit/start-build-info.test.ts pins
|
|
4
4
|
// SDK_VERSION to package.json, so a release that forgets to stamp fails CI.
|
|
5
|
-
export const SDK_VERSION = '3.
|
|
5
|
+
export const SDK_VERSION = '3.1.0-rc.1';
|
|
6
6
|
export const SDK_CHANNEL = 'staging';
|
|
7
7
|
//# sourceMappingURL=build-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../src/start/build-info.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../src/start/build-info.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,MAAM,CAAC,MAAM,WAAW,GAA6B,SAAS,CAAC"}
|
package/dist/start/env.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function envFromBag(bag: Readonly<Record<string, unknown>>): EnvR
|
|
|
6
6
|
export declare function processEnv(): EnvReader;
|
|
7
7
|
/**
|
|
8
8
|
* A reader that never throws, for values only needed to word a warning or an
|
|
9
|
-
* error (for example
|
|
9
|
+
* error (for example the key a local start ignores).
|
|
10
10
|
*/
|
|
11
11
|
export declare function quiet(read: EnvReader): EnvReader;
|
|
12
12
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/start/env.js
CHANGED
|
@@ -45,7 +45,7 @@ export function processEnv() {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* A reader that never throws, for values only needed to word a warning or an
|
|
48
|
-
* error (for example
|
|
48
|
+
* error (for example the key a local start ignores).
|
|
49
49
|
*/
|
|
50
50
|
export function quiet(read) {
|
|
51
51
|
return (name) => {
|
package/dist/start/names.d.ts
CHANGED
|
@@ -9,18 +9,8 @@ export declare const ENV: Readonly<{
|
|
|
9
9
|
environment: "FIREWEAVE_ENV";
|
|
10
10
|
instanceId: "FIREWEAVE_INSTANCE_ID";
|
|
11
11
|
}>;
|
|
12
|
-
/**
|
|
13
|
-
* Legacy names written by the scaffolded harness. Read only when the
|
|
14
|
-
* replacement is unset, with one warning per name, for all of 2.x.
|
|
15
|
-
*/
|
|
16
|
-
export declare const LEGACY_ENV: Readonly<{
|
|
17
|
-
key: readonly ["FW_PROJECT_API_KEY"];
|
|
18
|
-
url: readonly ["FW_API_URL", "FW_ATTEST_URL"];
|
|
19
|
-
}>;
|
|
20
12
|
/** Fallback env-name sources for mode inference, after the environment option and FIREWEAVE_ENV. */
|
|
21
13
|
export declare const ENVIRONMENT_FALLBACKS: readonly ["APP_ENV", "NODE_ENV"];
|
|
22
|
-
/** Read only to explain a boot error: the harness's FW_ENV is no longer honoured. */
|
|
23
|
-
export declare const RETIRED_ENVIRONMENT_NAME = "FW_ENV";
|
|
24
14
|
/** Environment names that mean "local development" when no key is set. Case-insensitive. */
|
|
25
15
|
export declare const DEV_ENVIRONMENTS: ReadonlySet<string>;
|
|
26
16
|
/** fw-server host for each release channel of this package. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/start/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,GAAG;;;;;EAKd,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/start/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,GAAG;;;;;EAKd,CAAC;AAEH,oGAAoG;AACpG,eAAO,MAAM,qBAAqB,kCAAkD,CAAC;AAErF,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAoD,CAAC;AAEtG,+DAA+D;AAC/D,eAAO,MAAM,YAAY;;;EAGvB,CAAC;AAEH,mFAAmF;AACnF,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAqD,CAAC"}
|
package/dist/start/names.js
CHANGED
|
@@ -9,18 +9,8 @@ export const ENV = Object.freeze({
|
|
|
9
9
|
environment: 'FIREWEAVE_ENV',
|
|
10
10
|
instanceId: 'FIREWEAVE_INSTANCE_ID',
|
|
11
11
|
});
|
|
12
|
-
/**
|
|
13
|
-
* Legacy names written by the scaffolded harness. Read only when the
|
|
14
|
-
* replacement is unset, with one warning per name, for all of 2.x.
|
|
15
|
-
*/
|
|
16
|
-
export const LEGACY_ENV = Object.freeze({
|
|
17
|
-
key: ['FW_PROJECT_API_KEY'],
|
|
18
|
-
url: ['FW_API_URL', 'FW_ATTEST_URL'],
|
|
19
|
-
});
|
|
20
12
|
/** Fallback env-name sources for mode inference, after the environment option and FIREWEAVE_ENV. */
|
|
21
13
|
export const ENVIRONMENT_FALLBACKS = Object.freeze(['APP_ENV', 'NODE_ENV']);
|
|
22
|
-
/** Read only to explain a boot error: the harness's FW_ENV is no longer honoured. */
|
|
23
|
-
export const RETIRED_ENVIRONMENT_NAME = 'FW_ENV';
|
|
24
14
|
/** Environment names that mean "local development" when no key is set. Case-insensitive. */
|
|
25
15
|
export const DEV_ENVIRONMENTS = new Set(['development', 'dev', 'local', 'test']);
|
|
26
16
|
/** fw-server host for each release channel of this package. */
|
package/dist/start/names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/start/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,eAAe;IACpB,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,uBAAuB;CACpC,CAAC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/start/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,eAAe;IACpB,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,uBAAuB;CACpC,CAAC,CAAC;AAEH,oGAAoG;AACpG,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC,CAAC;AAErF,4FAA4F;AAC5F,MAAM,CAAC,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtG,+DAA+D;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,iCAAiC;IAC7C,OAAO,EAAE,yCAAyC;CACnD,CAAC,CAAC;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
package/dist/start/resolve.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ResolvedStart {
|
|
|
30
30
|
readonly controlPoints: ControlPointMap;
|
|
31
31
|
readonly channel: SdkChannel;
|
|
32
32
|
readonly sdkVersion: string;
|
|
33
|
-
/** Lines to log once each:
|
|
33
|
+
/** Lines to log once each: ignored keys. */
|
|
34
34
|
readonly warnings: readonly string[];
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/start/resolve.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAA0B,K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AM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAiGD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,aAAa,CA8ClG"}
|
package/dist/start/resolve.js
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* through `resolveStart` alone.
|
|
5
5
|
*
|
|
6
6
|
* Precedence for every value: explicit start() option, then FIREWEAVE_* env,
|
|
7
|
-
* then the
|
|
7
|
+
* then the default. Reads are lazy:
|
|
8
8
|
* a source is read only if every earlier source was unset, so an explicit
|
|
9
9
|
* option never touches the environment (which matters on Deno).
|
|
10
10
|
*/
|
|
11
11
|
import { FireweaveError, assertHostAllowed } from '../index.js';
|
|
12
12
|
import { quiet } from './env.js';
|
|
13
13
|
import { normalizeControlPoints } from './control-points.js';
|
|
14
|
-
import { CHANNEL_URLS, DEV_ENVIRONMENTS, ENV, ENVIRONMENT_FALLBACKS,
|
|
14
|
+
import { CHANNEL_URLS, DEV_ENVIRONMENTS, ENV, ENVIRONMENT_FALLBACKS, LOOPBACK_HOSTS, } from './names.js';
|
|
15
15
|
const configError = (message) => new FireweaveError('Configuration', { message });
|
|
16
16
|
const optionString = (value, name) => {
|
|
17
17
|
if (value === undefined || value === null)
|
|
@@ -22,7 +22,7 @@ const optionString = (value, name) => {
|
|
|
22
22
|
return trimmed === '' ? undefined : trimmed;
|
|
23
23
|
};
|
|
24
24
|
/** First non-empty of: the option, then each env name in order. */
|
|
25
|
-
function pick(option, optionName, names,
|
|
25
|
+
function pick(option, optionName, names, read) {
|
|
26
26
|
if (option !== undefined)
|
|
27
27
|
return { value: option, source: `start({ ${optionName} })` };
|
|
28
28
|
for (const name of names) {
|
|
@@ -30,13 +30,6 @@ function pick(option, optionName, names, legacy, read, warnings, replacement) {
|
|
|
30
30
|
if (value !== undefined)
|
|
31
31
|
return { value, source: name };
|
|
32
32
|
}
|
|
33
|
-
for (const name of legacy) {
|
|
34
|
-
const value = read(name);
|
|
35
|
-
if (value !== undefined) {
|
|
36
|
-
warnings.push(`[fireweave] ${name} is a legacy name and will stop being read in 3.0.0. Rename it to ${replacement}; the value does not change.`);
|
|
37
|
-
return { value, source: name };
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
33
|
return undefined;
|
|
41
34
|
}
|
|
42
35
|
/**
|
|
@@ -55,8 +48,8 @@ function checkKeyFamily(key, source) {
|
|
|
55
48
|
throw configError(`[fireweave] The key from ${source} is an organisation or CLI token, not a project key. Use the project key (project-api-key_…).`);
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
|
-
function resolveUrl(input, read, build
|
|
59
|
-
const picked = pick(optionString(input.url, 'url'), 'url', [ENV.url],
|
|
51
|
+
function resolveUrl(input, read, build) {
|
|
52
|
+
const picked = pick(optionString(input.url, 'url'), 'url', [ENV.url], read);
|
|
60
53
|
if (picked === undefined) {
|
|
61
54
|
// The channel host is in DEFAULT_ALLOWED_HOSTS, so no custom allowlist.
|
|
62
55
|
return { url: CHANNEL_URLS[build.channel], urlSource: `SDK channel (${build.channel})` };
|
|
@@ -78,23 +71,20 @@ function resolveUrl(input, read, build, warnings) {
|
|
|
78
71
|
}
|
|
79
72
|
return { url, urlSource: picked.source, allowedHosts };
|
|
80
73
|
}
|
|
81
|
-
function resolveKey(input, read
|
|
82
|
-
const picked = pick(optionString(input.key, 'key'), 'key', [ENV.key],
|
|
74
|
+
function resolveKey(input, read) {
|
|
75
|
+
const picked = pick(optionString(input.key, 'key'), 'key', [ENV.key], read);
|
|
83
76
|
if (picked !== undefined)
|
|
84
77
|
checkKeyFamily(picked.value, picked.source);
|
|
85
78
|
return picked;
|
|
86
79
|
}
|
|
87
80
|
function resolveEnvironment(input, read) {
|
|
88
|
-
return pick(optionString(input.environment, 'environment'), 'environment', [ENV.environment, ...ENVIRONMENT_FALLBACKS],
|
|
81
|
+
return pick(optionString(input.environment, 'environment'), 'environment', [ENV.environment, ...ENVIRONMENT_FALLBACKS], read);
|
|
89
82
|
}
|
|
90
|
-
function noKeyError(env
|
|
83
|
+
function noKeyError(env) {
|
|
91
84
|
const where = env === undefined
|
|
92
85
|
? 'no environment name is set (checked the environment option, FIREWEAVE_ENV, APP_ENV and NODE_ENV)'
|
|
93
86
|
: `the environment is '${env.value}' (from ${env.source}), which is not a development name`;
|
|
94
|
-
|
|
95
|
-
? ` FW_ENV is no longer read; rename it to FIREWEAVE_ENV.`
|
|
96
|
-
: '';
|
|
97
|
-
return configError(`[fireweave] ${ENV.key} is not set and ${where}. Set ${ENV.key} to the project's server key, or for local development set FIREWEAVE_ENV=development or call start({ mode: 'local' }).${retired}`);
|
|
87
|
+
return configError(`[fireweave] ${ENV.key} is not set and ${where}. Set ${ENV.key} to the project's server key, or for local development set FIREWEAVE_ENV=development or call start({ mode: 'local' }).`);
|
|
98
88
|
}
|
|
99
89
|
/**
|
|
100
90
|
* Resolve start() options against the environment.
|
|
@@ -115,15 +105,15 @@ export function resolveStart(input, read, build) {
|
|
|
115
105
|
}
|
|
116
106
|
return { ...base, mode: 'local', modeSource: 'option', keySource: 'none', warnings };
|
|
117
107
|
}
|
|
118
|
-
const key = resolveKey(input, read
|
|
108
|
+
const key = resolveKey(input, read);
|
|
119
109
|
if (input.mode === 'remote') {
|
|
120
110
|
if (key === undefined) {
|
|
121
111
|
throw configError(`[fireweave] start({ mode: 'remote' }) needs a key. Set ${ENV.key} or pass start({ key }).`);
|
|
122
112
|
}
|
|
123
|
-
return { ...base, mode: 'remote', modeSource: 'option', ...resolveUrl(input, read, build
|
|
113
|
+
return { ...base, mode: 'remote', modeSource: 'option', ...resolveUrl(input, read, build), key: key.value, keySource: key.source, warnings };
|
|
124
114
|
}
|
|
125
115
|
if (key !== undefined) {
|
|
126
|
-
return { ...base, mode: 'remote', modeSource: 'key', ...resolveUrl(input, read, build
|
|
116
|
+
return { ...base, mode: 'remote', modeSource: 'key', ...resolveUrl(input, read, build), key: key.value, keySource: key.source, warnings };
|
|
127
117
|
}
|
|
128
118
|
const env = resolveEnvironment(input, read);
|
|
129
119
|
if (env !== undefined && DEV_ENVIRONMENTS.has(env.value.toLowerCase())) {
|
|
@@ -137,16 +127,11 @@ export function resolveStart(input, read, build) {
|
|
|
137
127
|
warnings,
|
|
138
128
|
};
|
|
139
129
|
}
|
|
140
|
-
throw noKeyError(env
|
|
130
|
+
throw noKeyError(env);
|
|
141
131
|
}
|
|
142
132
|
function resolveKeyQuietly(input, read) {
|
|
143
133
|
if (typeof input.key === 'string' && input.key.trim() !== '')
|
|
144
134
|
return 'start({ key })';
|
|
145
|
-
|
|
146
|
-
for (const name of [ENV.key, ...LEGACY_ENV.key]) {
|
|
147
|
-
if (safe(name) !== undefined)
|
|
148
|
-
return name;
|
|
149
|
-
}
|
|
150
|
-
return undefined;
|
|
135
|
+
return quiet(read)(ENV.key) !== undefined ? ENV.key : undefined;
|
|
151
136
|
}
|
|
152
137
|
//# sourceMappingURL=resolve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/start/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAwB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,GAAG,EACH,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":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,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fireweaveai/server-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0-rc.1",
|
|
4
4
|
"description": "Fireweave release-engineering SDK for server runtimes (Node, Bun, Deno): control points and target registration. Zero runtime dependencies (spec v0.1.0).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|