@ultimat3/flags 11.3.0 → 12.0.0
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/CLAUDE.md +6 -1
- package/README.md +7 -3
- package/package.json +2 -2
- package/src/projection.ts +17 -3
package/CLAUDE.md
CHANGED
|
@@ -118,7 +118,12 @@ what lets `policy` (tier 2) call it from inside a predicate.
|
|
|
118
118
|
## Open
|
|
119
119
|
|
|
120
120
|
- Nothing calls `flagsReport()` yet. It is the projection an `x flags [--json]` command and an MCP
|
|
121
|
-
`flags.list` tool should read; neither exists.
|
|
121
|
+
`flags.list` tool should read; neither exists. `projection.ts`'s own header said the opposite
|
|
122
|
+
until 12.0.0 — it named the CLI, the MCP tool and the manifest as readers — and the manifest was
|
|
123
|
+
never a candidate: it is derived from SOURCE, while `allFlags()` is runtime state an app's imports
|
|
124
|
+
fill, so a manifest build would publish an empty list. That is `@ultimat3/http`'s `appErrorStatus()`,
|
|
125
|
+
deleted for the same reason. A CLI command is the one reachable consumer, because `loadApp` runs
|
|
126
|
+
first.
|
|
122
127
|
|
|
123
128
|
## Commands
|
|
124
129
|
|
package/README.md
CHANGED
|
@@ -162,8 +162,12 @@ up muted and the debt invisible again. `configureFlags({ clock, reportEveryMs })
|
|
|
162
162
|
## Projection
|
|
163
163
|
|
|
164
164
|
`flagsReport()` returns every declared flag with its kind, expiry, owner and whether it is expired,
|
|
165
|
-
sorted by key, plus the expired keys lifted out.
|
|
166
|
-
|
|
165
|
+
sorted by key, plus the expired keys lifted out.
|
|
166
|
+
|
|
167
|
+
**Offered, not published.** Nothing reads it yet: there is no `x flags` command, no `flags` section
|
|
168
|
+
in the manifest and no MCP tool, and this file claimed all three until 12.0.0. The manifest is not a
|
|
169
|
+
consumer it can ever have — a manifest is derived from source and this reads a registry an app's own
|
|
170
|
+
imports fill at runtime — so the one reachable surface is a CLI command, which loads the app first.
|
|
167
171
|
|
|
168
172
|
## What it owns
|
|
169
173
|
|
|
@@ -176,7 +180,7 @@ and the manifest should all read, so none of them recomputes "expired".
|
|
|
176
180
|
| `src/registry.ts` | `defineFlag`, key → flag, `applyFlagSnapshot` |
|
|
177
181
|
| `src/runtime.ts` | the clock and the per-flag report rate limit over core's `reportError` |
|
|
178
182
|
| `src/evaluate.ts` | `isEnabled()` — the one way to ask |
|
|
179
|
-
| `src/projection.ts` | `flagsReport()`
|
|
183
|
+
| `src/projection.ts` | `flagsReport()` — the shape a CLI command would print; nothing reads it yet |
|
|
180
184
|
| `src/errors.ts` | this package's X_* codes |
|
|
181
185
|
|
|
182
186
|
## Boundary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/flags",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Feature flags: permanent switches, and temporary ones that cannot be forgotten",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ultimat3/core": "
|
|
34
|
+
"@ultimat3/core": "12.0.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/projection.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
// Single responsibility: the declared flags as data — one JSON-safe shape
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// Single responsibility: the declared flags as data — one JSON-safe shape, so no surface has to
|
|
2
|
+
// compute "what is expired?" for itself. Same rule as `listErrorCodes()`: the projection lives
|
|
3
|
+
// with the registry.
|
|
4
|
+
//
|
|
5
|
+
// OFFERED, not published (`As of 2026-08-24`). This header used to state that `x flags --json`,
|
|
6
|
+
// an MCP tool and the manifest all read it. **None of the three exists**: there is no `x flags`
|
|
7
|
+
// command, `ARRAY_SECTIONS` in `@ultimat3/manifest` has no `flags` section, no MCP tool names one,
|
|
8
|
+
// and `flagsReport` has zero callers outside this package's own test. `packages/flags/CLAUDE.md`
|
|
9
|
+
// has always said so; only this file stated the plan as fact, which is the shape
|
|
10
|
+
// `@ultimat3/ai`'s `agent-facts.ts` names — the SHAPE a surface would publish, never a row any
|
|
11
|
+
// surface carries.
|
|
12
|
+
//
|
|
13
|
+
// And one of the three could never have been the consumer it named: a manifest is a build artefact
|
|
14
|
+
// derived from SOURCE, while `allFlags()` is process-global runtime state filled by the app's own
|
|
15
|
+
// imports — so in a CLI process that has not loaded the app this answers `{ flags: [], expired: []
|
|
16
|
+
// }`, which is `@ultimat3/http`'s deleted `appErrorStatus()` exactly. A CLI command is the reachable
|
|
17
|
+
// consumer, because `loadApp` imports the app's modules before the command runs.
|
|
4
18
|
|
|
5
19
|
import type { FlagKind } from './flag';
|
|
6
20
|
import { allFlags } from './registry';
|