@marktiderman/genesis-features 0.3.0 → 0.4.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.
@@ -0,0 +1,186 @@
1
+ import { F as FlagValue, a as FeatureStatus, b as FeatureAccess, c as FlagKind } from './model-DVV57jDL.js';
2
+ import { F as FeaturePlatform } from './platforms-NR0liM8L.js';
3
+
4
+ /**
5
+ * The feature gate: one answer to "is this feature on here?" for UI, server
6
+ * code, agents and (for status and entitlement) the database.
7
+ *
8
+ * Checks run in a fixed order and the first "no" wins:
9
+ *
10
+ * 1. status the feature has shipped (beta, live or deprecated)
11
+ * 2. platform it has shipped on this platform
12
+ * 3. tenant the tenant has not switched it off
13
+ * 4. flag each of its boolean release or permission flags is true
14
+ * 5. entitlement a paid feature (`access: { plan }`) has an active entitlement
15
+ *
16
+ * Entitlement is last on purpose: an "upgrade to unlock" answer is only given
17
+ * when paying is the one thing missing, so an upsell never promises a feature
18
+ * that a switch or a flag would still keep off.
19
+ *
20
+ * The registry comes from code (features.ts and flags.json). Everything that
21
+ * changes at runtime (entitlements, switches, flag values) comes in through
22
+ * {@link GateContext}, read once per request or session on the server. Role
23
+ * and row rights are not the gate's business: "may this person" stays with
24
+ * roles and row security.
25
+ *
26
+ * No zod, React, Node built-ins or DOM globals here: this file ships to
27
+ * browsers, extension service workers, phones and edge functions.
28
+ */
29
+
30
+ /** The statuses in which a feature is on. A deprecated feature still works until it is retired. @stability Beta */
31
+ declare const SHIPPED_STATUSES: readonly FeatureStatus[];
32
+ /**
33
+ * Why a feature is off: the first check that said no. `unknown` is an id that
34
+ * isn't in the registry (or not in a snapshot).
35
+ *
36
+ * @stability Beta
37
+ */
38
+ type GateReason = "unknown" | "status" | "platform" | "tenant" | "flag" | "entitlement";
39
+ /**
40
+ * The gate's answer for one feature. `unlock` is set when the reason is
41
+ * `entitlement`: the plan that turns it on, so the UI can show an upgrade
42
+ * instead of hiding the feature.
43
+ *
44
+ * @stability Beta
45
+ */
46
+ interface GateAnswer {
47
+ on: boolean;
48
+ reason?: GateReason;
49
+ unlock?: {
50
+ plan: string;
51
+ };
52
+ /** The flag that turned it off, when the reason is `flag`. Server side only: snapshots leave it out. */
53
+ flag?: string;
54
+ }
55
+ /** The fields of a feature the gate reads. A `FeatureDef` fits. @stability Beta */
56
+ interface GateFeature {
57
+ status: FeatureStatus;
58
+ apps: readonly string[];
59
+ platforms?: Partial<Record<FeaturePlatform, FeatureStatus>>;
60
+ access?: FeatureAccess;
61
+ }
62
+ /** The fields of a flag the gate reads. A `FlagDef` fits. @stability Beta */
63
+ interface GateFlag {
64
+ feature: string;
65
+ kind: FlagKind;
66
+ default: FlagValue;
67
+ }
68
+ /** What the gate decides from: the registry, as code defines it. @stability Beta */
69
+ interface GateRegistry {
70
+ features: {
71
+ readonly [id: string]: GateFeature;
72
+ };
73
+ flags?: {
74
+ readonly [name: string]: GateFlag;
75
+ };
76
+ }
77
+ /**
78
+ * A set of ids: a list, a Set or a test. Not any iterable: an iterator would
79
+ * be used up by the first feature asked, and a bare string would count as its
80
+ * characters.
81
+ *
82
+ * @stability Beta
83
+ */
84
+ type IdSet = readonly string[] | ReadonlySet<string> | ((id: string) => boolean);
85
+ /**
86
+ * Where and for whom the gate is asked: the platform, plus the tenant's
87
+ * runtime state. Leave out what the app doesn't have: no `entitlements` means
88
+ * no paid feature is on, no `off` means no switch is off, no `flags` means
89
+ * every flag has its default.
90
+ *
91
+ * @stability Beta
92
+ */
93
+ interface GateContext {
94
+ platform: FeaturePlatform;
95
+ /** Feature ids the tenant holds an active entitlement for. */
96
+ entitlements?: IdSet;
97
+ /** Feature ids the tenant switched off. */
98
+ off?: IdSet;
99
+ /** Flag values for this tenant, by flag name. A missing flag has its default. */
100
+ flags?: {
101
+ readonly [name: string]: FlagValue | undefined;
102
+ } | ((name: string) => FlagValue | undefined);
103
+ }
104
+ /**
105
+ * Is feature `id` on for this context? Returns the first check that said no
106
+ * as `reason`, and for a paid feature the plan that unlocks it. An unknown id
107
+ * is off with reason `unknown`; it never throws for one.
108
+ *
109
+ * ```ts
110
+ * const answer = featureOn({ features, flags }, { platform: "web", entitlements, off }, "form-webhook-delivery");
111
+ * // { on: false, reason: "entitlement", unlock: { plan: "pro" } }
112
+ * ```
113
+ *
114
+ * @stability Beta
115
+ */
116
+ declare function featureOn(registry: GateRegistry, context: GateContext, id: string): GateAnswer;
117
+ /**
118
+ * Every shipped feature's answer for one context: what a server hands a
119
+ * client, so the client never decides on its own. Plain JSON, safe to store
120
+ * (an extension's session storage, a cache) and to compare by `version`.
121
+ *
122
+ * It lists only features that have shipped somewhere (beta, live or
123
+ * deprecated) and leaves out flag names; anything missing reads as off.
124
+ *
125
+ * @stability Beta
126
+ */
127
+ interface GateSnapshot {
128
+ /** The answers, by feature id. */
129
+ readonly answers: {
130
+ readonly [id: string]: GateAnswer;
131
+ };
132
+ /** When the server made it (ISO 8601). Refresh after your own time limit. */
133
+ readonly at: string;
134
+ /** The registry version it was made from, when known (the build's version). */
135
+ readonly version?: string | number;
136
+ }
137
+ /** @stability Beta */
138
+ interface GateSnapshotOptions {
139
+ /** Answer for these features only. */
140
+ ids?: Iterable<string>;
141
+ /** The registry version, carried into the snapshot. */
142
+ version?: string | number;
143
+ /** The time to stamp (default now). */
144
+ at?: Date;
145
+ }
146
+ /** @stability Beta */
147
+ declare function gateSnapshot(registry: GateRegistry, context: GateContext, options?: GateSnapshotOptions): GateSnapshot;
148
+ /**
149
+ * Whether a snapshot is older than `maxAgeMs`: refresh it then. A client
150
+ * (an extension worker, a tab left open) keeps a snapshot, replaces it when it
151
+ * is stale, after sign-in or a tenant switch, and right after a refusal.
152
+ *
153
+ * @stability Beta
154
+ */
155
+ declare function isSnapshotStale(snapshot: GateSnapshot, maxAgeMs: number, now?: Date): boolean;
156
+ /** One feature's answer from a snapshot. An id missing from it is off, as an unknown feature. @stability Beta */
157
+ declare function fromSnapshot(snapshot: GateSnapshot, id: string): GateAnswer;
158
+ /**
159
+ * Thrown by {@link requireFeature} when a feature is off. Servers map it to a
160
+ * refusal that carries the reason (HTTP 403, or 402 for `entitlement`).
161
+ *
162
+ * @stability Beta
163
+ */
164
+ declare class FeatureOff extends Error {
165
+ readonly feature: string;
166
+ readonly reason: GateReason;
167
+ readonly unlock?: {
168
+ plan: string;
169
+ };
170
+ constructor(feature: string, answer: GateAnswer);
171
+ /** The HTTP status for this refusal: 402 when a plan unlocks it, else 403. */
172
+ get status(): 402 | 403;
173
+ }
174
+ /**
175
+ * Refuse unless the feature is on: call it at the top of every server
176
+ * function and route that belongs to a feature.
177
+ *
178
+ * ```ts
179
+ * requireFeature({ features, flags }, await gateContext(tenant), "form-webhook-delivery");
180
+ * ```
181
+ *
182
+ * @stability Beta
183
+ */
184
+ declare function requireFeature(registry: GateRegistry, context: GateContext, id: string): void;
185
+
186
+ export { FeatureOff as F, type GateAnswer as G, type IdSet as I, SHIPPED_STATUSES as S, type GateSnapshot as a, type GateContext as b, type GateFeature as c, type GateFlag as d, type GateReason as e, type GateRegistry as f, type GateSnapshotOptions as g, featureOn as h, fromSnapshot as i, gateSnapshot as j, isSnapshotStale as k, requireFeature as r };
@@ -0,0 +1,49 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { G as GateAnswer, a as GateSnapshot } from './gate-BfX5GmG5.js';
4
+ import './model-DVV57jDL.js';
5
+ import 'zod';
6
+ import './platforms-NR0liM8L.js';
7
+
8
+ /** Hands the session's gate answers to every {@link useFeature} below it. @stability Beta */
9
+ declare function FeatureGateProvider({ snapshot, children, }: {
10
+ snapshot: GateSnapshot;
11
+ children: ReactNode;
12
+ }): react.JSX.Element;
13
+ /**
14
+ * The gate's answer for one feature. Outside a {@link FeatureGateProvider}
15
+ * this throws: a missing provider would otherwise turn every feature off
16
+ * without a word.
17
+ *
18
+ * @stability Beta
19
+ */
20
+ declare function useFeature(id: string): GateAnswer;
21
+ /** @stability Beta */
22
+ interface FeatureGateProps {
23
+ /** The feature this content belongs to. */
24
+ feature: string;
25
+ children: ReactNode;
26
+ /** Shown when a plan would unlock the feature: an upgrade prompt, a locked row. Defaults to `fallback`. */
27
+ upsell?: (answer: GateAnswer & {
28
+ unlock: {
29
+ plan: string;
30
+ };
31
+ }) => ReactNode;
32
+ /** Shown for any other "off". Defaults to nothing. */
33
+ fallback?: ReactNode;
34
+ }
35
+ /**
36
+ * Renders `children` when the feature is on; `upsell` when a plan would turn
37
+ * it on; otherwise `fallback`.
38
+ *
39
+ * ```tsx
40
+ * <FeatureGate feature="form-webhook-delivery" upsell={({ unlock }) => <UpgradeRow plan={unlock.plan} />}>
41
+ * <WebhookSettings />
42
+ * </FeatureGate>
43
+ * ```
44
+ *
45
+ * @stability Beta
46
+ */
47
+ declare function FeatureGate({ feature, children, upsell, fallback, }: FeatureGateProps): react.JSX.Element;
48
+
49
+ export { FeatureGate, type FeatureGateProps, FeatureGateProvider, useFeature };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { fromSnapshot } from './chunk-O2L5R5JT.js';
3
+ import './chunk-EMX5HYKM.js';
4
+ import { createContext, useContext } from 'react';
5
+ import { jsx, Fragment } from 'react/jsx-runtime';
6
+
7
+ var GateContext = createContext(null);
8
+ function FeatureGateProvider({
9
+ snapshot,
10
+ children
11
+ }) {
12
+ return /* @__PURE__ */ jsx(GateContext.Provider, { value: snapshot, children });
13
+ }
14
+ function useFeature(id) {
15
+ const snapshot = useContext(GateContext);
16
+ if (!snapshot)
17
+ throw new Error(
18
+ `useFeature("${id}") needs a <FeatureGateProvider> above it`
19
+ );
20
+ return fromSnapshot(snapshot, id);
21
+ }
22
+ function FeatureGate({
23
+ feature,
24
+ children,
25
+ upsell,
26
+ fallback = null
27
+ }) {
28
+ const answer = useFeature(feature);
29
+ if (answer.on) return /* @__PURE__ */ jsx(Fragment, { children });
30
+ if (answer.reason === "entitlement" && answer.unlock && upsell)
31
+ return /* @__PURE__ */ jsx(Fragment, { children: upsell({ ...answer, unlock: answer.unlock }) });
32
+ return /* @__PURE__ */ jsx(Fragment, { children: fallback });
33
+ }
34
+
35
+ export { FeatureGate, FeatureGateProvider, useFeature };
36
+ //# sourceMappingURL=gate-react.js.map
37
+ //# sourceMappingURL=gate-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/gate-react.tsx"],"names":[],"mappings":";;;;;;AAYA,IAAM,WAAA,GAAc,cAAmC,IAAI,CAAA;AAGpD,SAAS,mBAAA,CAAoB;AAAA,EAClC,QAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,2BACG,WAAA,CAAY,QAAA,EAAZ,EAAqB,KAAA,EAAO,UAAW,QAAA,EAAS,CAAA;AAErD;AASO,SAAS,WAAW,EAAA,EAAwB;AACjD,EAAA,MAAM,QAAA,GAAW,WAAW,WAAW,CAAA;AACvC,EAAA,IAAI,CAAC,QAAA;AACH,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,eAAe,EAAE,CAAA,yCAAA;AAAA,KACnB;AACF,EAAA,OAAO,YAAA,CAAa,UAAU,EAAE,CAAA;AAClC;AAyBO,SAAS,WAAA,CAAY;AAAA,EAC1B,OAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA,GAAW;AACb,CAAA,EAAqB;AACnB,EAAA,MAAM,MAAA,GAAS,WAAW,OAAO,CAAA;AACjC,EAAA,IAAI,MAAA,CAAO,EAAA,EAAI,uBAAO,GAAA,CAAA,QAAA,EAAA,EAAG,QAAA,EAAS,CAAA;AAClC,EAAA,IAAI,MAAA,CAAO,MAAA,KAAW,aAAA,IAAiB,MAAA,CAAO,MAAA,IAAU,MAAA;AACtD,IAAA,uBAAO,GAAA,CAAA,QAAA,EAAA,EAAG,iBAAO,EAAE,GAAG,QAAQ,MAAA,EAAQ,MAAA,CAAO,MAAA,EAAQ,CAAA,EAAE,CAAA;AACzD,EAAA,uCAAU,QAAA,EAAA,QAAA,EAAS,CAAA;AACrB","file":"gate-react.js","sourcesContent":["/**\n * `@marktiderman/genesis-features/gate/react`: the gate's answers in React,\n * on the web and in React Native. The server computes a {@link GateSnapshot}\n * and the provider hands it down; components never decide on their own. To\n * refresh, give the provider a new snapshot: every `useFeature` below it\n * re-renders with the new answers.\n *\n * @stability Beta\n */\nimport { createContext, useContext, type ReactNode } from \"react\";\nimport { fromSnapshot, type GateAnswer, type GateSnapshot } from \"./gate\";\n\nconst GateContext = createContext<GateSnapshot | null>(null);\n\n/** Hands the session's gate answers to every {@link useFeature} below it. @stability Beta */\nexport function FeatureGateProvider({\n snapshot,\n children,\n}: {\n snapshot: GateSnapshot;\n children: ReactNode;\n}) {\n return (\n <GateContext.Provider value={snapshot}>{children}</GateContext.Provider>\n );\n}\n\n/**\n * The gate's answer for one feature. Outside a {@link FeatureGateProvider}\n * this throws: a missing provider would otherwise turn every feature off\n * without a word.\n *\n * @stability Beta\n */\nexport function useFeature(id: string): GateAnswer {\n const snapshot = useContext(GateContext);\n if (!snapshot)\n throw new Error(\n `useFeature(\"${id}\") needs a <FeatureGateProvider> above it`,\n );\n return fromSnapshot(snapshot, id);\n}\n\n/** @stability Beta */\nexport interface FeatureGateProps {\n /** The feature this content belongs to. */\n feature: string;\n children: ReactNode;\n /** Shown when a plan would unlock the feature: an upgrade prompt, a locked row. Defaults to `fallback`. */\n upsell?: (answer: GateAnswer & { unlock: { plan: string } }) => ReactNode;\n /** Shown for any other \"off\". Defaults to nothing. */\n fallback?: ReactNode;\n}\n\n/**\n * Renders `children` when the feature is on; `upsell` when a plan would turn\n * it on; otherwise `fallback`.\n *\n * ```tsx\n * <FeatureGate feature=\"form-webhook-delivery\" upsell={({ unlock }) => <UpgradeRow plan={unlock.plan} />}>\n * <WebhookSettings />\n * </FeatureGate>\n * ```\n *\n * @stability Beta\n */\nexport function FeatureGate({\n feature,\n children,\n upsell,\n fallback = null,\n}: FeatureGateProps) {\n const answer = useFeature(feature);\n if (answer.on) return <>{children}</>;\n if (answer.reason === \"entitlement\" && answer.unlock && upsell)\n return <>{upsell({ ...answer, unlock: answer.unlock })}</>;\n return <>{fallback}</>;\n}\n"]}
package/dist/gate.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export { F as FeatureOff, G as GateAnswer, b as GateContext, c as GateFeature, d as GateFlag, e as GateReason, f as GateRegistry, a as GateSnapshot, g as GateSnapshotOptions, I as IdSet, S as SHIPPED_STATUSES, h as featureOn, i as fromSnapshot, j as gateSnapshot, k as isSnapshotStale, r as requireFeature } from './gate-BfX5GmG5.js';
2
+ import { a as FeatureStatus } from './model-DVV57jDL.js';
3
+ import { F as FeaturePlatform } from './platforms-NR0liM8L.js';
4
+ export { a as FEATURE_PLATFORMS } from './platforms-NR0liM8L.js';
5
+ import 'zod';
6
+
7
+ /**
8
+ * A feature's status on one platform, or undefined when it isn't there.
9
+ * Zod-free so the gate can use it on phones and in browsers.
10
+ *
11
+ * @stability Beta
12
+ */
13
+ declare function statusOn(def: {
14
+ status: FeatureStatus;
15
+ apps: readonly string[];
16
+ platforms?: Partial<Record<FeaturePlatform, FeatureStatus>>;
17
+ }, platform: FeaturePlatform): FeatureStatus | undefined;
18
+
19
+ export { FeaturePlatform, statusOn };
package/dist/gate.js ADDED
@@ -0,0 +1,5 @@
1
+ export { FeatureOff, SHIPPED_STATUSES, featureOn, fromSnapshot, gateSnapshot, isSnapshotStale, requireFeature } from './chunk-O2L5R5JT.js';
2
+ export { FEATURE_PLATFORMS } from './chunk-B6WRD3WF.js';
3
+ export { statusOn } from './chunk-EMX5HYKM.js';
4
+ //# sourceMappingURL=gate.js.map
5
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"gate.js"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- import { F as Features, b as FeatureRecord, a as Flags } from './model-CW3d2gsf.js';
2
- export { d as FEATURE_HORIZONS, e as FEATURE_LAYERS, f as FEATURE_STATUSES, g as FLAG_KINDS, h as FeatureAccess, i as FeatureDef, j as FeatureHorizon, k as FeatureIdOf, l as FeatureLayer, m as FeatureLinks, n as FeatureMedia, o as FeatureRegistryError, c as FeatureStatus, p as FeatureVisibility, q as FindOptions, r as FlagDef, s as FlagKind, t as FlagValue, u as defineFeatures, v as defineFlags, w as expiredFlags, x as featureSchema, y as findFeatures, z as flagSchema, A as flagsForFeature, B as statusOn, C as toRecords } from './model-CW3d2gsf.js';
1
+ import { d as Features, f as FeatureRecord, e as Flags } from './model-DVV57jDL.js';
2
+ export { g as FEATURE_HORIZONS, h as FEATURE_LAYERS, i as FEATURE_STATUSES, j as FLAG_KINDS, b as FeatureAccess, k as FeatureDef, l as FeatureHorizon, m as FeatureIdOf, n as FeatureLayer, o as FeatureLinks, p as FeatureMedia, q as FeatureRegistryError, a as FeatureStatus, r as FeatureVisibility, s as FindOptions, t as FlagDef, c as FlagKind, F as FlagValue, u as defineFeatures, v as defineFlags, w as expiredFlags, x as featureSchema, y as findFeatures, z as flagSchema, A as flagsForFeature, B as toRecords } from './model-DVV57jDL.js';
3
3
  export { BlockContributions, BlockDataUse, BlockDef, BlockError, BlockMigration, BlockNavItem, BlockPrivacy, BlockRoute, BlockSettingsRow, Contributed, EnabledBlocks, ResolveBlocksOptions, ResolvedBlocks, defineBlock, resolveBlocks } from './blocks.js';
4
+ export { F as FeatureOff, G as GateAnswer, b as GateContext, c as GateFeature, d as GateFlag, e as GateReason, f as GateRegistry, a as GateSnapshot, g as GateSnapshotOptions, I as IdSet, S as SHIPPED_STATUSES, h as featureOn, i as fromSnapshot, j as gateSnapshot, k as isSnapshotStale, r as requireFeature } from './gate-BfX5GmG5.js';
4
5
  export { a as FEATURE_PLATFORMS, F as FeaturePlatform } from './platforms-NR0liM8L.js';
6
+ export { statusOn } from './gate.js';
5
7
  import 'zod';
6
8
 
7
9
  /** Marks the start of the generated block in AGENTS.md. */
package/dist/index.js CHANGED
@@ -1,5 +1,8 @@
1
- export { BlockError, defineBlock, resolveBlocks } from './chunk-EF72JS5S.js';
2
- export { AGENTS_BLOCK_END, AGENTS_BLOCK_START, BrokenBlockError, FEATURE_HORIZONS, FEATURE_LAYERS, FEATURE_STATUSES, FLAG_KINDS, FeatureRegistryError, MARKETING_BLOCK_END, MARKETING_BLOCK_START, OPENFEATURE_MANIFEST_SCHEMA, defineFeatures, defineFlags, expiredFlags, featureSchema, findFeatures, flagSchema, flagsForFeature, marketingRecords, readAgentsBlock, replaceAgentsBlock, statusOn, toAgentsMarkdown, toJson, toMarketingMarkdown, toOpenFeatureManifest, toRecords, toSkillMarkdown } from './chunk-KCUQY5UZ.js';
3
- export { FEATURE_PLATFORMS, cycleProblems, dependencyOrder, requirementProblem, requiresProblems } from './chunk-2ARZER3G.js';
1
+ export { BlockError, defineBlock, resolveBlocks } from './chunk-4Q356635.js';
2
+ export { FeatureOff, SHIPPED_STATUSES, featureOn, fromSnapshot, gateSnapshot, isSnapshotStale, requireFeature } from './chunk-O2L5R5JT.js';
3
+ export { AGENTS_BLOCK_END, AGENTS_BLOCK_START, BrokenBlockError, FEATURE_HORIZONS, FEATURE_LAYERS, FEATURE_STATUSES, FLAG_KINDS, FeatureRegistryError, MARKETING_BLOCK_END, MARKETING_BLOCK_START, OPENFEATURE_MANIFEST_SCHEMA, defineFeatures, defineFlags, expiredFlags, featureSchema, findFeatures, flagSchema, flagsForFeature, marketingRecords, readAgentsBlock, replaceAgentsBlock, toAgentsMarkdown, toJson, toMarketingMarkdown, toOpenFeatureManifest, toRecords, toSkillMarkdown } from './chunk-T2N2ZLX6.js';
4
+ export { cycleProblems, dependencyOrder, requirementProblem, requiresProblems } from './chunk-VYUX7VAX.js';
5
+ export { FEATURE_PLATFORMS } from './chunk-B6WRD3WF.js';
6
+ export { statusOn } from './chunk-EMX5HYKM.js';
4
7
  //# sourceMappingURL=index.js.map
5
8
  //# sourceMappingURL=index.js.map
@@ -385,8 +385,7 @@ interface FindOptions {
385
385
  layer?: FeatureLayer;
386
386
  status?: FeatureStatus;
387
387
  }
388
- /** A feature's status on one platform, or undefined when it isn't there. @stability Beta */
389
- declare function statusOn(def: FeatureDef, platform: FeaturePlatform): FeatureStatus | undefined;
388
+
390
389
  /**
391
390
  * Features matching `term` in their id, aliases, name, keywords, summary,
392
391
  * tagline, category, import paths, slots, contributions or code paths, best
@@ -397,4 +396,4 @@ declare function statusOn(def: FeatureDef, platform: FeaturePlatform): FeatureSt
397
396
  */
398
397
  declare function findFeatures(features: Features, term: string, flags?: Flags, options?: FindOptions): FeatureRecord[];
399
398
 
400
- export { flagsForFeature as A, statusOn as B, toRecords as C, type Features as F, type Flags as a, type FeatureRecord as b, type FeatureStatus as c, FEATURE_HORIZONS as d, FEATURE_LAYERS as e, FEATURE_STATUSES as f, FLAG_KINDS as g, type FeatureAccess as h, type FeatureDef as i, type FeatureHorizon as j, type FeatureIdOf as k, type FeatureLayer as l, type FeatureLinks as m, type FeatureMedia as n, FeatureRegistryError as o, type FeatureVisibility as p, type FindOptions as q, type FlagDef as r, type FlagKind as s, type FlagValue as t, defineFeatures as u, defineFlags as v, expiredFlags as w, featureSchema as x, findFeatures as y, flagSchema as z };
399
+ export { flagsForFeature as A, toRecords as B, type FlagValue as F, type FeatureStatus as a, type FeatureAccess as b, type FlagKind as c, type Features as d, type Flags as e, type FeatureRecord as f, FEATURE_HORIZONS as g, FEATURE_LAYERS as h, FEATURE_STATUSES as i, FLAG_KINDS as j, type FeatureDef as k, type FeatureHorizon as l, type FeatureIdOf as m, type FeatureLayer as n, type FeatureLinks as o, type FeatureMedia as p, FeatureRegistryError as q, type FeatureVisibility as r, type FindOptions as s, type FlagDef as t, defineFeatures as u, defineFlags as v, expiredFlags as w, featureSchema as x, findFeatures as y, flagSchema as z };
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { F as Features, a as Flags } from './model-CW3d2gsf.js';
1
+ import { d as Features, e as Flags } from './model-DVV57jDL.js';
2
2
  import 'zod';
3
3
  import './platforms-NR0liM8L.js';
4
4
 
package/dist/node.js CHANGED
@@ -1,5 +1,7 @@
1
- import { BrokenBlockError, expiredFlags, toAgentsMarkdown, readAgentsBlock, replaceAgentsBlock, toJson, toOpenFeatureManifest, toSkillMarkdown, toMarketingMarkdown, readBlock, MARKETING_BLOCK_START, MARKETING_BLOCK_END, replaceBlock } from './chunk-KCUQY5UZ.js';
2
- import './chunk-2ARZER3G.js';
1
+ import { BrokenBlockError, expiredFlags, toAgentsMarkdown, readAgentsBlock, replaceAgentsBlock, toJson, toOpenFeatureManifest, toSkillMarkdown, toMarketingMarkdown, readBlock, MARKETING_BLOCK_START, MARKETING_BLOCK_END, replaceBlock } from './chunk-T2N2ZLX6.js';
2
+ import './chunk-VYUX7VAX.js';
3
+ import './chunk-B6WRD3WF.js';
4
+ import './chunk-EMX5HYKM.js';
3
5
  import { existsSync, readFileSync, readdirSync, mkdirSync, writeFileSync } from 'fs';
4
6
  import { join, dirname } from 'path';
5
7