@contractspec/lib.feature-flags 1.56.1 → 1.58.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.
Files changed (279) hide show
  1. package/dist/browser/contracts/index.js +636 -0
  2. package/dist/browser/docs/feature-flags.docblock.js +71 -0
  3. package/dist/browser/docs/index.js +71 -0
  4. package/dist/browser/entities/index.js +306 -0
  5. package/dist/browser/evaluation/index.js +223 -0
  6. package/dist/browser/events.js +296 -0
  7. package/dist/browser/feature-flags.capability.js +28 -0
  8. package/dist/browser/feature-flags.feature.js +55 -0
  9. package/dist/browser/index.js +1583 -0
  10. package/dist/contracts/index.d.ts +944 -953
  11. package/dist/contracts/index.d.ts.map +1 -1
  12. package/dist/contracts/index.js +635 -906
  13. package/dist/docs/feature-flags.docblock.d.ts +2 -1
  14. package/dist/docs/feature-flags.docblock.d.ts.map +1 -0
  15. package/dist/docs/feature-flags.docblock.js +18 -22
  16. package/dist/docs/index.d.ts +2 -1
  17. package/dist/docs/index.d.ts.map +1 -0
  18. package/dist/docs/index.js +72 -1
  19. package/dist/entities/index.d.ts +159 -164
  20. package/dist/entities/index.d.ts.map +1 -1
  21. package/dist/entities/index.js +297 -315
  22. package/dist/evaluation/index.d.ts +119 -122
  23. package/dist/evaluation/index.d.ts.map +1 -1
  24. package/dist/evaluation/index.js +215 -212
  25. package/dist/events.d.ts +480 -489
  26. package/dist/events.d.ts.map +1 -1
  27. package/dist/events.js +272 -511
  28. package/dist/feature-flags.capability.d.ts +2 -8
  29. package/dist/feature-flags.capability.d.ts.map +1 -1
  30. package/dist/feature-flags.capability.js +29 -25
  31. package/dist/feature-flags.feature.d.ts +1 -7
  32. package/dist/feature-flags.feature.d.ts.map +1 -1
  33. package/dist/feature-flags.feature.js +54 -146
  34. package/dist/index.d.ts +7 -6
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +1584 -8
  37. package/dist/node/contracts/index.js +636 -0
  38. package/dist/node/docs/feature-flags.docblock.js +71 -0
  39. package/dist/node/docs/index.js +71 -0
  40. package/dist/node/entities/index.js +306 -0
  41. package/dist/node/evaluation/index.js +223 -0
  42. package/dist/node/events.js +296 -0
  43. package/dist/node/feature-flags.capability.js +28 -0
  44. package/dist/node/feature-flags.feature.js +55 -0
  45. package/dist/node/index.js +1583 -0
  46. package/package.json +117 -30
  47. package/dist/contracts/index.js.map +0 -1
  48. package/dist/contracts/src/app-config/lifecycle.d.ts +0 -1
  49. package/dist/contracts/src/app-config/runtime.d.ts +0 -13
  50. package/dist/contracts/src/app-config/spec.d.ts +0 -9
  51. package/dist/contracts/src/app-config/validation.d.ts +0 -8
  52. package/dist/contracts/src/capabilities/capabilities.d.ts +0 -60
  53. package/dist/contracts/src/capabilities/capabilities.d.ts.map +0 -1
  54. package/dist/contracts/src/capabilities/context.d.ts +0 -1
  55. package/dist/contracts/src/capabilities/guards.d.ts +0 -4
  56. package/dist/contracts/src/capabilities/index.d.ts +0 -5
  57. package/dist/contracts/src/capabilities/openbanking.d.ts +0 -1
  58. package/dist/contracts/src/capabilities/validation.d.ts +0 -4
  59. package/dist/contracts/src/client/index.d.ts +0 -1
  60. package/dist/contracts/src/client/react/drivers/rn-reusables.d.ts +0 -1
  61. package/dist/contracts/src/client/react/drivers/shadcn.d.ts +0 -1
  62. package/dist/contracts/src/client/react/feature-render.d.ts +0 -3
  63. package/dist/contracts/src/client/react/form-render.d.ts +0 -4
  64. package/dist/contracts/src/client/react/index.d.ts +0 -4
  65. package/dist/contracts/src/contract-registry/index.d.ts +0 -2
  66. package/dist/contracts/src/contract-registry/schemas.d.ts +0 -2
  67. package/dist/contracts/src/contract-registry/types.d.ts +0 -1
  68. package/dist/contracts/src/data-views/index.d.ts +0 -4
  69. package/dist/contracts/src/data-views/registry.d.ts +0 -2
  70. package/dist/contracts/src/data-views/report/contractVerificationTable.d.ts +0 -1
  71. package/dist/contracts/src/data-views/spec.d.ts +0 -3
  72. package/dist/contracts/src/data-views/types.d.ts +0 -2
  73. package/dist/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.d.ts +0 -1
  74. package/dist/contracts/src/docs/capabilities/documentationSystem.capability.d.ts +0 -1
  75. package/dist/contracts/src/docs/capabilities/index.d.ts +0 -1
  76. package/dist/contracts/src/docs/commands/docsGenerate.command.d.ts +0 -2
  77. package/dist/contracts/src/docs/commands/docsPublish.command.d.ts +0 -2
  78. package/dist/contracts/src/docs/commands/index.d.ts +0 -2
  79. package/dist/contracts/src/docs/contracts.d.ts +0 -7
  80. package/dist/contracts/src/docs/events/docsGenerated.event.d.ts +0 -2
  81. package/dist/contracts/src/docs/events/docsPublished.event.d.ts +0 -2
  82. package/dist/contracts/src/docs/events/index.d.ts +0 -2
  83. package/dist/contracts/src/docs/forms/docsSearch.form.d.ts +0 -2
  84. package/dist/contracts/src/docs/forms/index.d.ts +0 -1
  85. package/dist/contracts/src/docs/index.d.ts +0 -33
  86. package/dist/contracts/src/docs/presentations/docsLayout.presentation.d.ts +0 -1
  87. package/dist/contracts/src/docs/presentations/docsReferencePage.presentation.d.ts +0 -1
  88. package/dist/contracts/src/docs/presentations/index.d.ts +0 -2
  89. package/dist/contracts/src/docs/presentations.d.ts +0 -2
  90. package/dist/contracts/src/docs/queries/contractReference.query.d.ts +0 -2
  91. package/dist/contracts/src/docs/queries/docsIndex.query.d.ts +0 -2
  92. package/dist/contracts/src/docs/queries/index.d.ts +0 -2
  93. package/dist/contracts/src/docs/registry.d.ts +0 -10
  94. package/dist/contracts/src/docs/registry.d.ts.map +0 -1
  95. package/dist/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.d.ts +0 -1
  96. package/dist/contracts/src/docs/tech/contracts/README.docblock.d.ts +0 -1
  97. package/dist/contracts/src/docs/tech/contracts/openapi-export.docblock.d.ts +0 -1
  98. package/dist/contracts/src/docs/tech/contracts/openapi-import.docblock.d.ts +0 -1
  99. package/dist/contracts/src/docs/tech/lifecycle-stage-system.docblock.d.ts +0 -1
  100. package/dist/contracts/src/docs/tech/llm/llm-integration.docblock.d.ts +0 -1
  101. package/dist/contracts/src/docs/tech/mcp-endpoints.docblock.d.ts +0 -1
  102. package/dist/contracts/src/docs/tech/presentation-runtime.docblock.d.ts +0 -1
  103. package/dist/contracts/src/docs/tech/schema/README.docblock.d.ts +0 -1
  104. package/dist/contracts/src/docs/tech/studio/learning-events.docblock.d.ts +0 -1
  105. package/dist/contracts/src/docs/tech/studio/learning-journeys.docblock.d.ts +0 -1
  106. package/dist/contracts/src/docs/tech/studio/platform-admin-panel.docblock.d.ts +0 -1
  107. package/dist/contracts/src/docs/tech/studio/project-access-teams.docblock.d.ts +0 -1
  108. package/dist/contracts/src/docs/tech/studio/project-routing.docblock.d.ts +0 -1
  109. package/dist/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.d.ts +0 -1
  110. package/dist/contracts/src/docs/tech/studio/team-invitations.docblock.d.ts +0 -1
  111. package/dist/contracts/src/docs/tech/studio/workspace-ops.docblock.d.ts +0 -1
  112. package/dist/contracts/src/docs/tech/studio/workspaces.docblock.d.ts +0 -1
  113. package/dist/contracts/src/docs/tech/telemetry-ingest.docblock.d.ts +0 -1
  114. package/dist/contracts/src/docs/tech/vscode-extension.docblock.d.ts +0 -1
  115. package/dist/contracts/src/docs/views/contractReference.dataView.d.ts +0 -1
  116. package/dist/contracts/src/docs/views/docsIndex.dataView.d.ts +0 -1
  117. package/dist/contracts/src/docs/views/exampleCatalog.dataView.d.ts +0 -1
  118. package/dist/contracts/src/docs/views/index.d.ts +0 -3
  119. package/dist/contracts/src/events.d.ts +0 -45
  120. package/dist/contracts/src/events.d.ts.map +0 -1
  121. package/dist/contracts/src/examples/index.d.ts +0 -4
  122. package/dist/contracts/src/examples/registry.d.ts +0 -2
  123. package/dist/contracts/src/examples/schema.d.ts +0 -2
  124. package/dist/contracts/src/examples/types.d.ts +0 -3
  125. package/dist/contracts/src/examples/validation.d.ts +0 -1
  126. package/dist/contracts/src/experiments/evaluator.d.ts +0 -2
  127. package/dist/contracts/src/experiments/spec-resolver.d.ts +0 -4
  128. package/dist/contracts/src/experiments/spec.d.ts +0 -16
  129. package/dist/contracts/src/experiments/spec.d.ts.map +0 -1
  130. package/dist/contracts/src/features/index.d.ts +0 -4
  131. package/dist/contracts/src/features/install.d.ts +0 -6
  132. package/dist/contracts/src/features/registry.d.ts +0 -2
  133. package/dist/contracts/src/features/types.d.ts +0 -80
  134. package/dist/contracts/src/features/types.d.ts.map +0 -1
  135. package/dist/contracts/src/features/validation.d.ts +0 -2
  136. package/dist/contracts/src/forms/forms.d.ts +0 -3
  137. package/dist/contracts/src/forms/index.d.ts +0 -1
  138. package/dist/contracts/src/index.d.ts +0 -53
  139. package/dist/contracts/src/install.d.ts +0 -7
  140. package/dist/contracts/src/integrations/connection.d.ts +0 -1
  141. package/dist/contracts/src/integrations/index.d.ts +0 -6
  142. package/dist/contracts/src/integrations/openbanking/contracts/accounts.d.ts +0 -4
  143. package/dist/contracts/src/integrations/openbanking/contracts/balances.d.ts +0 -4
  144. package/dist/contracts/src/integrations/openbanking/contracts/index.d.ts +0 -5
  145. package/dist/contracts/src/integrations/openbanking/contracts/transactions.d.ts +0 -4
  146. package/dist/contracts/src/integrations/openbanking/guards.d.ts +0 -1
  147. package/dist/contracts/src/integrations/openbanking/models.d.ts +0 -1
  148. package/dist/contracts/src/integrations/openbanking/openbanking.feature.d.ts +0 -1
  149. package/dist/contracts/src/integrations/operations.d.ts +0 -4
  150. package/dist/contracts/src/integrations/providers/elevenlabs.d.ts +0 -2
  151. package/dist/contracts/src/integrations/providers/gcs-storage.d.ts +0 -2
  152. package/dist/contracts/src/integrations/providers/gmail.d.ts +0 -2
  153. package/dist/contracts/src/integrations/providers/google-calendar.d.ts +0 -2
  154. package/dist/contracts/src/integrations/providers/index.d.ts +0 -11
  155. package/dist/contracts/src/integrations/providers/mistral.d.ts +0 -2
  156. package/dist/contracts/src/integrations/providers/postmark.d.ts +0 -2
  157. package/dist/contracts/src/integrations/providers/powens.d.ts +0 -2
  158. package/dist/contracts/src/integrations/providers/qdrant.d.ts +0 -2
  159. package/dist/contracts/src/integrations/providers/registry.d.ts +0 -1
  160. package/dist/contracts/src/integrations/providers/stripe.d.ts +0 -2
  161. package/dist/contracts/src/integrations/providers/twilio-sms.d.ts +0 -2
  162. package/dist/contracts/src/integrations/spec.d.ts +0 -3
  163. package/dist/contracts/src/jsonschema.d.ts +0 -4
  164. package/dist/contracts/src/knowledge/index.d.ts +0 -2
  165. package/dist/contracts/src/knowledge/operations.d.ts +0 -4
  166. package/dist/contracts/src/knowledge/spaces/email-threads.d.ts +0 -1
  167. package/dist/contracts/src/knowledge/spaces/financial-docs.d.ts +0 -1
  168. package/dist/contracts/src/knowledge/spaces/financial-overview.d.ts +0 -1
  169. package/dist/contracts/src/knowledge/spaces/index.d.ts +0 -6
  170. package/dist/contracts/src/knowledge/spaces/product-canon.d.ts +0 -1
  171. package/dist/contracts/src/knowledge/spaces/support-faq.d.ts +0 -1
  172. package/dist/contracts/src/knowledge/spaces/uploaded-docs.d.ts +0 -1
  173. package/dist/contracts/src/knowledge/spec.d.ts +0 -3
  174. package/dist/contracts/src/llm/exporters.d.ts +0 -7
  175. package/dist/contracts/src/llm/index.d.ts +0 -3
  176. package/dist/contracts/src/llm/prompts.d.ts +0 -2
  177. package/dist/contracts/src/llm/types.d.ts +0 -5
  178. package/dist/contracts/src/migrations.d.ts +0 -1
  179. package/dist/contracts/src/model-registry.d.ts +0 -1
  180. package/dist/contracts/src/onboarding-base.d.ts +0 -2
  181. package/dist/contracts/src/openapi.d.ts +0 -1
  182. package/dist/contracts/src/operations/index.d.ts +0 -3
  183. package/dist/contracts/src/operations/operation.d.ts +0 -176
  184. package/dist/contracts/src/operations/operation.d.ts.map +0 -1
  185. package/dist/contracts/src/operations/registry.d.ts +0 -6
  186. package/dist/contracts/src/operations/report/getContractVerificationStatus.d.ts +0 -3
  187. package/dist/contracts/src/operations/report/index.d.ts +0 -4
  188. package/dist/contracts/src/ownership.d.ts +0 -164
  189. package/dist/contracts/src/ownership.d.ts.map +0 -1
  190. package/dist/contracts/src/policy/engine.d.ts +0 -3
  191. package/dist/contracts/src/policy/guards.d.ts +0 -1
  192. package/dist/contracts/src/policy/index.d.ts +0 -6
  193. package/dist/contracts/src/policy/opa-adapter.d.ts +0 -3
  194. package/dist/contracts/src/policy/registry.d.ts +0 -2
  195. package/dist/contracts/src/policy/spec.d.ts +0 -13
  196. package/dist/contracts/src/policy/spec.d.ts.map +0 -1
  197. package/dist/contracts/src/policy/validation.d.ts +0 -3
  198. package/dist/contracts/src/presentations/index.d.ts +0 -3
  199. package/dist/contracts/src/presentations/presentations.d.ts +0 -10
  200. package/dist/contracts/src/presentations/presentations.d.ts.map +0 -1
  201. package/dist/contracts/src/presentations/registry.d.ts +0 -2
  202. package/dist/contracts/src/presentations/transform-engine.d.ts +0 -2
  203. package/dist/contracts/src/prompt.d.ts +0 -2
  204. package/dist/contracts/src/promptRegistry.d.ts +0 -2
  205. package/dist/contracts/src/regenerator/adapters.d.ts +0 -1
  206. package/dist/contracts/src/regenerator/executor.d.ts +0 -1
  207. package/dist/contracts/src/regenerator/index.d.ts +0 -6
  208. package/dist/contracts/src/regenerator/service.d.ts +0 -2
  209. package/dist/contracts/src/regenerator/sinks.d.ts +0 -2
  210. package/dist/contracts/src/regenerator/types.d.ts +0 -3
  211. package/dist/contracts/src/regenerator/utils.d.ts +0 -1
  212. package/dist/contracts/src/registry-utils.d.ts +0 -1
  213. package/dist/contracts/src/registry.d.ts +0 -3
  214. package/dist/contracts/src/resources.d.ts +0 -19
  215. package/dist/contracts/src/resources.d.ts.map +0 -1
  216. package/dist/contracts/src/schema-to-markdown.d.ts +0 -1
  217. package/dist/contracts/src/serialization/index.d.ts +0 -1
  218. package/dist/contracts/src/serialization/serializers.d.ts +0 -7
  219. package/dist/contracts/src/server/graphql-pothos.d.ts +0 -7
  220. package/dist/contracts/src/server/index.d.ts +0 -7
  221. package/dist/contracts/src/server/mcp/createMcpServer.d.ts +0 -5
  222. package/dist/contracts/src/server/mcp/mcpTypes.d.ts +0 -2
  223. package/dist/contracts/src/server/provider-mcp.d.ts +0 -1
  224. package/dist/contracts/src/server/rest-elysia.d.ts +0 -3
  225. package/dist/contracts/src/server/rest-express.d.ts +0 -3
  226. package/dist/contracts/src/server/rest-generic.d.ts +0 -2
  227. package/dist/contracts/src/server/rest-next-app.d.ts +0 -3
  228. package/dist/contracts/src/server/rest-next-pages.d.ts +0 -3
  229. package/dist/contracts/src/telemetry/anomaly.d.ts +0 -2
  230. package/dist/contracts/src/telemetry/index.d.ts +0 -3
  231. package/dist/contracts/src/telemetry/spec.d.ts +0 -2
  232. package/dist/contracts/src/telemetry/tracker.d.ts +0 -3
  233. package/dist/contracts/src/tests/index.d.ts +0 -2
  234. package/dist/contracts/src/tests/runner.d.ts +0 -3
  235. package/dist/contracts/src/tests/spec.d.ts +0 -13
  236. package/dist/contracts/src/tests/spec.d.ts.map +0 -1
  237. package/dist/contracts/src/themes.d.ts +0 -2
  238. package/dist/contracts/src/types.d.ts +0 -5
  239. package/dist/contracts/src/versioning/refs.d.ts +0 -47
  240. package/dist/contracts/src/versioning/refs.d.ts.map +0 -1
  241. package/dist/contracts/src/workflow/adapters/db-adapter.d.ts +0 -1
  242. package/dist/contracts/src/workflow/adapters/file-adapter.d.ts +0 -1
  243. package/dist/contracts/src/workflow/adapters/index.d.ts +0 -3
  244. package/dist/contracts/src/workflow/adapters/memory-store.d.ts +0 -1
  245. package/dist/contracts/src/workflow/context.d.ts +0 -2
  246. package/dist/contracts/src/workflow/index.d.ts +0 -8
  247. package/dist/contracts/src/workflow/overview.docblock.d.ts +0 -1
  248. package/dist/contracts/src/workflow/runner.d.ts +0 -5
  249. package/dist/contracts/src/workflow/sla-monitor.d.ts +0 -2
  250. package/dist/contracts/src/workflow/spec.d.ts +0 -6
  251. package/dist/contracts/src/workflow/state.d.ts +0 -1
  252. package/dist/contracts/src/workflow/validation.d.ts +0 -5
  253. package/dist/contracts/src/workspace-config/contractsrc-schema.d.ts +0 -1
  254. package/dist/contracts/src/workspace-config/index.d.ts +0 -1
  255. package/dist/contracts/src/workspace-config/workspace-config.docblock.d.ts +0 -1
  256. package/dist/docs/feature-flags.docblock.js.map +0 -1
  257. package/dist/entities/index.js.map +0 -1
  258. package/dist/evaluation/index.js.map +0 -1
  259. package/dist/events.js.map +0 -1
  260. package/dist/feature-flags.capability.js.map +0 -1
  261. package/dist/feature-flags.feature.js.map +0 -1
  262. package/dist/schema/src/EnumType.d.ts +0 -36
  263. package/dist/schema/src/EnumType.d.ts.map +0 -1
  264. package/dist/schema/src/FieldType.d.ts +0 -30
  265. package/dist/schema/src/FieldType.d.ts.map +0 -1
  266. package/dist/schema/src/GraphQLSchemaType.d.ts +0 -2
  267. package/dist/schema/src/JsonSchemaType.d.ts +0 -2
  268. package/dist/schema/src/ScalarTypeEnum.d.ts +0 -1
  269. package/dist/schema/src/SchemaModel.d.ts +0 -70
  270. package/dist/schema/src/SchemaModel.d.ts.map +0 -1
  271. package/dist/schema/src/SchemaModelType.d.ts +0 -38
  272. package/dist/schema/src/SchemaModelType.d.ts.map +0 -1
  273. package/dist/schema/src/ZodSchemaType.d.ts +0 -2
  274. package/dist/schema/src/entity/defineEntity.d.ts +0 -1
  275. package/dist/schema/src/entity/generator.d.ts +0 -1
  276. package/dist/schema/src/entity/index.d.ts +0 -3
  277. package/dist/schema/src/entity/types.d.ts +0 -146
  278. package/dist/schema/src/entity/types.d.ts.map +0 -1
  279. package/dist/schema/src/index.d.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.feature-flags",
3
- "version": "1.56.1",
3
+ "version": "1.58.0",
4
4
  "description": "Feature flags and experiments module for ContractSpec applications",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -14,36 +14,41 @@
14
14
  "scripts": {
15
15
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
16
16
  "publish:pkg:canary": "bun publish:pkg --tag canary",
17
- "build": "bun build:types && bun build:bundle",
18
- "build:bundle": "tsdown",
19
- "build:types": "tsc --noEmit",
20
- "dev": "bun build:bundle --watch",
17
+ "build": "bun run prebuild && bun run build:bundle && bun run build:types",
18
+ "build:bundle": "contractspec-bun-build transpile",
19
+ "build:types": "contractspec-bun-build types",
20
+ "dev": "contractspec-bun-build dev",
21
21
  "clean": "rimraf dist .turbo",
22
22
  "lint": "bun lint:fix",
23
23
  "lint:fix": "eslint src --fix",
24
- "lint:check": "eslint src"
24
+ "lint:check": "eslint src",
25
+ "prebuild": "contractspec-bun-build prebuild",
26
+ "typecheck": "tsc --noEmit"
25
27
  },
26
28
  "dependencies": {
27
- "@contractspec/lib.schema": "1.56.1",
28
- "@contractspec/lib.contracts": "1.56.1",
29
+ "@contractspec/lib.schema": "1.58.0",
30
+ "@contractspec/lib.contracts": "1.58.0",
29
31
  "zod": "^4.3.5"
30
32
  },
31
33
  "devDependencies": {
32
- "@contractspec/tool.typescript": "1.56.1",
33
- "@contractspec/tool.tsdown": "1.56.1",
34
- "typescript": "^5.9.3"
34
+ "@contractspec/tool.typescript": "1.58.0",
35
+ "typescript": "^5.9.3",
36
+ "@contractspec/tool.bun": "1.57.0"
35
37
  },
36
38
  "exports": {
37
- ".": "./dist/index.js",
38
- "./contracts": "./dist/contracts/index.js",
39
- "./docs": "./dist/docs/index.js",
40
- "./docs/feature-flags.docblock": "./dist/docs/feature-flags.docblock.js",
41
- "./entities": "./dist/entities/index.js",
42
- "./evaluation": "./dist/evaluation/index.js",
43
- "./events": "./dist/events.js",
44
- "./feature-flags.capability": "./dist/feature-flags.capability.js",
45
- "./feature-flags.feature": "./dist/feature-flags.feature.js",
46
- "./*": "./*"
39
+ ".": "./src/index.ts",
40
+ "./contracts": "./src/contracts/index.ts",
41
+ "./contracts/index": "./src/contracts/index.ts",
42
+ "./docs": "./src/docs/index.ts",
43
+ "./docs/feature-flags.docblock": "./src/docs/feature-flags.docblock.ts",
44
+ "./docs/index": "./src/docs/index.ts",
45
+ "./entities": "./src/entities/index.ts",
46
+ "./entities/index": "./src/entities/index.ts",
47
+ "./evaluation": "./src/evaluation/index.ts",
48
+ "./evaluation/index": "./src/evaluation/index.ts",
49
+ "./events": "./src/events.ts",
50
+ "./feature-flags.capability": "./src/feature-flags.capability.ts",
51
+ "./feature-flags.feature": "./src/feature-flags.feature.ts"
47
52
  },
48
53
  "files": [
49
54
  "dist",
@@ -52,15 +57,97 @@
52
57
  "publishConfig": {
53
58
  "access": "public",
54
59
  "exports": {
55
- ".": "./dist/index.js",
56
- "./contracts": "./dist/contracts/index.js",
57
- "./docs": "./dist/docs/index.js",
58
- "./docs/feature-flags.docblock": "./dist/docs/feature-flags.docblock.js",
59
- "./entities": "./dist/entities/index.js",
60
- "./evaluation": "./dist/evaluation/index.js",
61
- "./events": "./dist/events.js",
62
- "./feature-flags.feature": "./dist/feature-flags.feature.js",
63
- "./*": "./*"
60
+ ".": {
61
+ "types": "./dist/index.d.ts",
62
+ "bun": "./dist/index.js",
63
+ "node": "./dist/node/index.mjs",
64
+ "browser": "./dist/browser/index.js",
65
+ "default": "./dist/index.js"
66
+ },
67
+ "./contracts": {
68
+ "types": "./dist/contracts/index.d.ts",
69
+ "bun": "./dist/contracts/index.js",
70
+ "node": "./dist/node/contracts/index.mjs",
71
+ "browser": "./dist/browser/contracts/index.js",
72
+ "default": "./dist/contracts/index.js"
73
+ },
74
+ "./contracts/index": {
75
+ "types": "./dist/contracts/index.d.ts",
76
+ "bun": "./dist/contracts/index.js",
77
+ "node": "./dist/node/contracts/index.mjs",
78
+ "browser": "./dist/browser/contracts/index.js",
79
+ "default": "./dist/contracts/index.js"
80
+ },
81
+ "./docs": {
82
+ "types": "./dist/docs/index.d.ts",
83
+ "bun": "./dist/docs/index.js",
84
+ "node": "./dist/node/docs/index.mjs",
85
+ "browser": "./dist/browser/docs/index.js",
86
+ "default": "./dist/docs/index.js"
87
+ },
88
+ "./docs/feature-flags.docblock": {
89
+ "types": "./dist/docs/feature-flags.docblock.d.ts",
90
+ "bun": "./dist/docs/feature-flags.docblock.js",
91
+ "node": "./dist/node/docs/feature-flags.docblock.mjs",
92
+ "browser": "./dist/browser/docs/feature-flags.docblock.js",
93
+ "default": "./dist/docs/feature-flags.docblock.js"
94
+ },
95
+ "./docs/index": {
96
+ "types": "./dist/docs/index.d.ts",
97
+ "bun": "./dist/docs/index.js",
98
+ "node": "./dist/node/docs/index.mjs",
99
+ "browser": "./dist/browser/docs/index.js",
100
+ "default": "./dist/docs/index.js"
101
+ },
102
+ "./entities": {
103
+ "types": "./dist/entities/index.d.ts",
104
+ "bun": "./dist/entities/index.js",
105
+ "node": "./dist/node/entities/index.mjs",
106
+ "browser": "./dist/browser/entities/index.js",
107
+ "default": "./dist/entities/index.js"
108
+ },
109
+ "./entities/index": {
110
+ "types": "./dist/entities/index.d.ts",
111
+ "bun": "./dist/entities/index.js",
112
+ "node": "./dist/node/entities/index.mjs",
113
+ "browser": "./dist/browser/entities/index.js",
114
+ "default": "./dist/entities/index.js"
115
+ },
116
+ "./evaluation": {
117
+ "types": "./dist/evaluation/index.d.ts",
118
+ "bun": "./dist/evaluation/index.js",
119
+ "node": "./dist/node/evaluation/index.mjs",
120
+ "browser": "./dist/browser/evaluation/index.js",
121
+ "default": "./dist/evaluation/index.js"
122
+ },
123
+ "./evaluation/index": {
124
+ "types": "./dist/evaluation/index.d.ts",
125
+ "bun": "./dist/evaluation/index.js",
126
+ "node": "./dist/node/evaluation/index.mjs",
127
+ "browser": "./dist/browser/evaluation/index.js",
128
+ "default": "./dist/evaluation/index.js"
129
+ },
130
+ "./events": {
131
+ "types": "./dist/events.d.ts",
132
+ "bun": "./dist/events.js",
133
+ "node": "./dist/node/events.mjs",
134
+ "browser": "./dist/browser/events.js",
135
+ "default": "./dist/events.js"
136
+ },
137
+ "./feature-flags.capability": {
138
+ "types": "./dist/feature-flags.capability.d.ts",
139
+ "bun": "./dist/feature-flags.capability.js",
140
+ "node": "./dist/node/feature-flags.capability.mjs",
141
+ "browser": "./dist/browser/feature-flags.capability.js",
142
+ "default": "./dist/feature-flags.capability.js"
143
+ },
144
+ "./feature-flags.feature": {
145
+ "types": "./dist/feature-flags.feature.d.ts",
146
+ "bun": "./dist/feature-flags.feature.js",
147
+ "node": "./dist/node/feature-flags.feature.mjs",
148
+ "browser": "./dist/browser/feature-flags.feature.js",
149
+ "default": "./dist/feature-flags.feature.js"
150
+ }
64
151
  },
65
152
  "registry": "https://registry.npmjs.org/"
66
153
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/contracts/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.feature-flags'] as const;\n\n// ============ Schema Models ============\n\nexport const FeatureFlagModel = defineSchemaModel({\n name: 'FeatureFlag',\n description: 'Represents a feature flag',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n defaultValue: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n variants: { type: ScalarTypeEnum.JSON(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const TargetingRuleModel = defineSchemaModel({\n name: 'TargetingRule',\n description: 'Represents a targeting rule',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n priority: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n enabled: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n attribute: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n operator: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n value: { type: ScalarTypeEnum.JSON(), isOptional: false },\n rolloutPercentage: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n serveValue: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n serveVariant: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const ExperimentModel = defineSchemaModel({\n name: 'Experiment',\n description: 'Represents an experiment',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n hypothesis: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n variants: { type: ScalarTypeEnum.JSON(), isOptional: false },\n metrics: { type: ScalarTypeEnum.JSON(), isOptional: true },\n audiencePercentage: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n endedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n winningVariant: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n results: { type: ScalarTypeEnum.JSON(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const EvaluationResultModel = defineSchemaModel({\n name: 'EvaluationResult',\n description: 'Result of flag evaluation',\n fields: {\n enabled: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n variant: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n ruleId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n experimentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n// ============ Input/Output Models ============\n\nconst CreateFlagInput = defineSchemaModel({\n name: 'CreateFlagInput',\n description: 'Input for creating a feature flag',\n fields: {\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n defaultValue: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n variants: { type: ScalarTypeEnum.JSON(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst UpdateFlagInput = defineSchemaModel({\n name: 'UpdateFlagInput',\n description: 'Input for updating a feature flag',\n fields: {\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n defaultValue: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n variants: { type: ScalarTypeEnum.JSON(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst DeleteFlagInput = defineSchemaModel({\n name: 'DeleteFlagInput',\n description: 'Input for deleting a feature flag',\n fields: {\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst ToggleFlagInput = defineSchemaModel({\n name: 'ToggleFlagInput',\n description: 'Input for toggling a feature flag',\n fields: {\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst GetFlagInput = defineSchemaModel({\n name: 'GetFlagInput',\n description: 'Input for getting a feature flag',\n fields: {\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst ListFlagsInput = defineSchemaModel({\n name: 'ListFlagsInput',\n description: 'Input for listing feature flags',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst ListFlagsOutput = defineSchemaModel({\n name: 'ListFlagsOutput',\n description: 'Output for listing feature flags',\n fields: {\n flags: { type: FeatureFlagModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst EvaluateFlagInput = defineSchemaModel({\n name: 'EvaluateFlagInput',\n description: 'Input for evaluating a feature flag',\n fields: {\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n context: { type: ScalarTypeEnum.JSON(), isOptional: false },\n },\n});\n\nconst CreateRuleInput = defineSchemaModel({\n name: 'CreateRuleInput',\n description: 'Input for creating a targeting rule',\n fields: {\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n priority: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n attribute: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n operator: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n value: { type: ScalarTypeEnum.JSON(), isOptional: false },\n rolloutPercentage: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n serveValue: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n serveVariant: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst DeleteRuleInput = defineSchemaModel({\n name: 'DeleteRuleInput',\n description: 'Input for deleting a targeting rule',\n fields: {\n ruleId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst CreateExperimentInput = defineSchemaModel({\n name: 'CreateExperimentInput',\n description: 'Input for creating an experiment',\n fields: {\n key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n hypothesis: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n flagId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n variants: { type: ScalarTypeEnum.JSON(), isOptional: false },\n metrics: { type: ScalarTypeEnum.JSON(), isOptional: true },\n audiencePercentage: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n scheduledStartAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n scheduledEndAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst StartExperimentInput = defineSchemaModel({\n name: 'StartExperimentInput',\n description: 'Input for starting an experiment',\n fields: {\n experimentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst StopExperimentInput = defineSchemaModel({\n name: 'StopExperimentInput',\n description: 'Input for stopping an experiment',\n fields: {\n experimentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n winningVariant: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n },\n});\n\nconst GetExperimentInput = defineSchemaModel({\n name: 'GetExperimentInput',\n description: 'Input for getting an experiment',\n fields: {\n experimentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst SuccessOutput = defineSchemaModel({\n name: 'SuccessOutput',\n description: 'Generic success output',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Create a feature flag.\n */\nexport const CreateFlagContract = defineCommand({\n meta: {\n key: 'flag.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'create'],\n description: 'Create a new feature flag.',\n goal: 'Define a new feature flag for toggling features.',\n context: 'Called when setting up a new feature flag.',\n },\n io: {\n input: CreateFlagInput,\n output: FeatureFlagModel,\n errors: {\n KEY_ALREADY_EXISTS: {\n description: 'Flag key already exists',\n http: 409,\n gqlCode: 'FLAG_KEY_EXISTS',\n when: 'A flag with this key already exists',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Update a feature flag.\n */\nexport const UpdateFlagContract = defineCommand({\n meta: {\n key: 'flag.update',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'update'],\n description: 'Update an existing feature flag.',\n goal: 'Modify flag configuration.',\n context: 'Called when adjusting flag settings.',\n },\n io: {\n input: UpdateFlagInput,\n output: FeatureFlagModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag ID is invalid',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Delete a feature flag.\n */\nexport const DeleteFlagContract = defineCommand({\n meta: {\n key: 'flag.delete',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'delete'],\n description: 'Delete a feature flag.',\n goal: 'Remove a feature flag and all its rules.',\n context: 'Called when a flag is no longer needed.',\n },\n io: {\n input: DeleteFlagInput,\n output: SuccessOutput,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag ID is invalid',\n },\n FLAG_HAS_ACTIVE_EXPERIMENT: {\n description: 'Flag has an active experiment',\n http: 409,\n gqlCode: 'FLAG_HAS_ACTIVE_EXPERIMENT',\n when: 'Cannot delete flag with running experiment',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Toggle a feature flag status.\n */\nexport const ToggleFlagContract = defineCommand({\n meta: {\n key: 'flag.toggle',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'toggle'],\n description: 'Toggle a feature flag status.',\n goal: 'Quickly enable or disable a feature.',\n context: 'Called when turning a feature on or off.',\n },\n io: {\n input: ToggleFlagInput,\n output: FeatureFlagModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag ID is invalid',\n },\n INVALID_STATUS: {\n description: 'Invalid status value',\n http: 400,\n gqlCode: 'INVALID_STATUS',\n when: 'Status must be OFF, ON, or GRADUAL',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Get a feature flag by key.\n */\nexport const GetFlagContract = defineQuery({\n meta: {\n key: 'flag.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'get'],\n description: 'Get a feature flag by key.',\n goal: 'Retrieve flag configuration.',\n context: 'Called to inspect flag details.',\n },\n io: {\n input: GetFlagInput,\n output: FeatureFlagModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag key is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List feature flags.\n */\nexport const ListFlagsContract = defineQuery({\n meta: {\n key: 'flag.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'list'],\n description: 'List all feature flags.',\n goal: 'View all configured flags.',\n context: 'Admin dashboard.',\n },\n io: {\n input: ListFlagsInput,\n output: ListFlagsOutput,\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Evaluate a feature flag.\n */\nexport const EvaluateFlagContract = defineQuery({\n meta: {\n key: 'flag.evaluate',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'evaluate'],\n description: 'Evaluate a feature flag for a given context.',\n goal: 'Determine if a feature should be enabled.',\n context: 'Called at runtime to check feature availability.',\n },\n io: {\n input: EvaluateFlagInput,\n output: EvaluationResultModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag key is invalid',\n },\n },\n },\n policy: {\n auth: 'anonymous',\n },\n});\n\n/**\n * Create a targeting rule.\n */\nexport const CreateRuleContract = defineCommand({\n meta: {\n key: 'flag.rule.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'rule', 'create'],\n description: 'Create a targeting rule for a flag.',\n goal: 'Add conditional targeting to a flag.',\n context: 'Called when setting up targeting.',\n },\n io: {\n input: CreateRuleInput,\n output: TargetingRuleModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag ID is invalid',\n },\n INVALID_OPERATOR: {\n description: 'Invalid operator',\n http: 400,\n gqlCode: 'INVALID_OPERATOR',\n when: 'Operator is not supported',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Delete a targeting rule.\n */\nexport const DeleteRuleContract = defineCommand({\n meta: {\n key: 'flag.rule.delete',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'rule', 'delete'],\n description: 'Delete a targeting rule.',\n goal: 'Remove a targeting rule from a flag.',\n context: 'Called when removing targeting conditions.',\n },\n io: {\n input: DeleteRuleInput,\n output: SuccessOutput,\n errors: {\n RULE_NOT_FOUND: {\n description: 'Rule does not exist',\n http: 404,\n gqlCode: 'RULE_NOT_FOUND',\n when: 'Rule ID is invalid',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Create an experiment.\n */\nexport const CreateExperimentContract = defineCommand({\n meta: {\n key: 'experiment.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'experiment', 'create'],\n description: 'Create an A/B test experiment.',\n goal: 'Set up an experiment with variants.',\n context: 'Called when setting up A/B testing.',\n },\n io: {\n input: CreateExperimentInput,\n output: ExperimentModel,\n errors: {\n FLAG_NOT_FOUND: {\n description: 'Flag does not exist',\n http: 404,\n gqlCode: 'FLAG_NOT_FOUND',\n when: 'Flag ID is invalid',\n },\n EXPERIMENT_KEY_EXISTS: {\n description: 'Experiment key already exists',\n http: 409,\n gqlCode: 'EXPERIMENT_KEY_EXISTS',\n when: 'An experiment with this key already exists',\n },\n INVALID_VARIANTS: {\n description: 'Invalid variant configuration',\n http: 400,\n gqlCode: 'INVALID_VARIANTS',\n when: 'Variant percentages must sum to 100',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Start an experiment.\n */\nexport const StartExperimentContract = defineCommand({\n meta: {\n key: 'experiment.start',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'experiment', 'start'],\n description: 'Start an experiment.',\n goal: 'Begin collecting data for an experiment.',\n context: 'Called when ready to run an A/B test.',\n },\n io: {\n input: StartExperimentInput,\n output: ExperimentModel,\n errors: {\n EXPERIMENT_NOT_FOUND: {\n description: 'Experiment does not exist',\n http: 404,\n gqlCode: 'EXPERIMENT_NOT_FOUND',\n when: 'Experiment ID is invalid',\n },\n EXPERIMENT_ALREADY_RUNNING: {\n description: 'Experiment is already running',\n http: 409,\n gqlCode: 'EXPERIMENT_ALREADY_RUNNING',\n when: 'Cannot start an experiment that is already running',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Stop an experiment.\n */\nexport const StopExperimentContract = defineCommand({\n meta: {\n key: 'experiment.stop',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'experiment', 'stop'],\n description: 'Stop an experiment.',\n goal: 'End an experiment and optionally declare a winner.',\n context: 'Called when concluding an A/B test.',\n },\n io: {\n input: StopExperimentInput,\n output: ExperimentModel,\n errors: {\n EXPERIMENT_NOT_FOUND: {\n description: 'Experiment does not exist',\n http: 404,\n gqlCode: 'EXPERIMENT_NOT_FOUND',\n when: 'Experiment ID is invalid',\n },\n EXPERIMENT_NOT_RUNNING: {\n description: 'Experiment is not running',\n http: 409,\n gqlCode: 'EXPERIMENT_NOT_RUNNING',\n when: 'Cannot stop an experiment that is not running',\n },\n },\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Get an experiment.\n */\nexport const GetExperimentContract = defineQuery({\n meta: {\n key: 'experiment.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['feature-flags', 'experiment', 'get'],\n description: 'Get experiment details.',\n goal: 'View experiment configuration and results.',\n context: 'Called to inspect experiment status.',\n },\n io: {\n input: GetExperimentInput,\n output: ExperimentModel,\n errors: {\n EXPERIMENT_NOT_FOUND: {\n description: 'Experiment does not exist',\n http: 404,\n gqlCode: 'EXPERIMENT_NOT_FOUND',\n when: 'Experiment ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,yBAAyB;AAIzC,MAAa,mBAAmB,kBAAkB;CAChD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,KAAK;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAClE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,cAAc;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC3D,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;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Q,EACN,MAAM,QACP;CACF,CAAC"}
@@ -1 +0,0 @@
1
- import "./spec.js";
@@ -1,13 +0,0 @@
1
- import "../policy/spec.js";
2
- import "../telemetry/spec.js";
3
- import "../capabilities/index.js";
4
- import "../experiments/spec.js";
5
- import "../data-views/index.js";
6
- import "../features/index.js";
7
- import "../workflow/spec.js";
8
- import "../policy/registry.js";
9
- import "../themes.js";
10
- import "../integrations/spec.js";
11
- import "../integrations/connection.js";
12
- import "../knowledge/spec.js";
13
- import "./spec.js";
@@ -1,9 +0,0 @@
1
- import "../policy/spec.js";
2
- import "../registry.js";
3
- import "../capabilities/index.js";
4
- import "../experiments/spec.js";
5
- import "../features/index.js";
6
- import "../themes.js";
7
- import "../integrations/spec.js";
8
- import "./lifecycle.js";
9
- import "../ownership.js";
@@ -1,8 +0,0 @@
1
- import "../capabilities/index.js";
2
- import "../data-views/index.js";
3
- import "../workflow/spec.js";
4
- import "../integrations/spec.js";
5
- import "../integrations/connection.js";
6
- import "../knowledge/spec.js";
7
- import "./spec.js";
8
- import "./runtime.js";
@@ -1,60 +0,0 @@
1
- import { VersionedSpecRef } from "../versioning/refs.js";
2
- import { OwnerShipMeta } from "../ownership.js";
3
-
4
- //#region ../contracts/src/capabilities/capabilities.d.ts
5
- /** Classification of capability types. */
6
- type CapabilityKind = 'api' | 'event' | 'data' | 'ui' | 'integration';
7
- /** Surfaces where capabilities can be exposed or consumed. */
8
- type CapabilitySurface = 'operation' | 'event' | 'workflow' | 'presentation' | 'resource';
9
- /**
10
- * Reference to a capability on a specific surface.
11
- * Extends VersionedSpecRef with surface and description context.
12
- */
13
- interface CapabilitySurfaceRef {
14
- /** The surface type where this capability is exposed. */
15
- surface: CapabilitySurface;
16
- /** Unique key identifying the spec on that surface (e.g., operation key). */
17
- key: string;
18
- /** Semantic version of the spec on that surface. */
19
- version?: string;
20
- /** Optional description of what this capability provides. */
21
- description?: string;
22
- }
23
- /** Metadata for a capability spec, extending ownership with kind. */
24
- interface CapabilityMeta extends OwnerShipMeta {
25
- /** The kind/category of this capability. */
26
- kind: CapabilityKind;
27
- }
28
- /**
29
- * Requirement for a capability dependency.
30
- * Used to declare what capabilities a spec needs.
31
- */
32
- interface CapabilityRequirement {
33
- /** Unique key of the required capability. */
34
- key: string;
35
- /** Optional specific version required. */
36
- version?: string;
37
- /** Optional kind filter for the requirement. */
38
- kind?: CapabilityKind;
39
- /** If true, the requirement is optional and won't block if missing. */
40
- optional?: boolean;
41
- /** Human-readable reason why this capability is required. */
42
- reason?: string;
43
- }
44
- /**
45
- * Reference to a capability spec.
46
- * Uses key and version to identify a specific capability.
47
- */
48
- type CapabilityRef = VersionedSpecRef;
49
- interface CapabilitySpec {
50
- meta: CapabilityMeta;
51
- /** Capabilities this capability extends (inherits requirements from). */
52
- extends?: CapabilityRef;
53
- /** Surfaces (operations, events, presentations, etc.) this capability provides. */
54
- provides?: CapabilitySurfaceRef[];
55
- /** Capabilities that must be present for this capability to function. */
56
- requires?: CapabilityRequirement[];
57
- }
58
- //#endregion
59
- export { CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRequirement, CapabilitySpec, CapabilitySurface, CapabilitySurfaceRef };
60
- //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","names":[],"sources":["../../../../../contracts/src/capabilities/capabilities.ts"],"sourcesContent":[],"mappings":";;;;;KAKY,cAAA;AAAZ;AAGY,KAAA,iBAAA,GAAiB,WAAA,GAAA,OAAA,GAAA,UAAA,GAAA,cAAA,GAAA,UAAA;AAW7B;AAYA;AASA;AAiBA;AAEiB,UAxCA,oBAAA,CAwCc;EACvB;EAEI,OAAA,EAzCD,iBAyCC;EAEC;EAEA,GAAA,EAAA,MAAA;EAAqB;;;;;;UAnCjB,cAAA,SAAuB;;QAEhC;;;;;;UAOS,qBAAA;;;;;;SAMR;;;;;;;;;;KAWG,aAAA,GAAgB;UAEX,cAAA;QACT;;YAEI;;aAEC;;aAEA"}
@@ -1 +0,0 @@
1
- import "./capabilities.js";
@@ -1,4 +0,0 @@
1
- import "../operations/operation.js";
2
- import "../presentations/presentations.js";
3
- import "./context.js";
4
- import "../events.js";
@@ -1,5 +0,0 @@
1
- import { CapabilityKind, CapabilityMeta, CapabilityRef, CapabilityRequirement, CapabilitySpec, CapabilitySurface, CapabilitySurfaceRef } from "./capabilities.js";
2
- import "./validation.js";
3
- import "./context.js";
4
- import "./guards.js";
5
- import "./openbanking.js";
@@ -1 +0,0 @@
1
- import "./index.js";
@@ -1,4 +0,0 @@
1
- import "./capabilities.js";
2
- import "../presentations/index.js";
3
- import "../operations/registry.js";
4
- import "../events.js";
@@ -1 +0,0 @@
1
- import "./react/index.js";
@@ -1 +0,0 @@
1
- import "../form-render.js";
@@ -1 +0,0 @@
1
- import "../form-render.js";
@@ -1,3 +0,0 @@
1
- import "../../presentations/index.js";
2
- import "../../features/index.js";
3
- import "react";
@@ -1,4 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../forms/index.js";
3
- import "react";
4
- import "react/jsx-runtime";
@@ -1,4 +0,0 @@
1
- import "./feature-render.js";
2
- import "./form-render.js";
3
- import "./drivers/shadcn.js";
4
- import "./drivers/rn-reusables.js";
@@ -1,2 +0,0 @@
1
- import "./types.js";
2
- import "./schemas.js";
@@ -1,2 +0,0 @@
1
- import "./types.js";
2
- import "zod";
@@ -1 +0,0 @@
1
- import "../ownership.js";
@@ -1,4 +0,0 @@
1
- import "./types.js";
2
- import "./spec.js";
3
- import "./registry.js";
4
- import { DataViewRef } from "../features/types.js";
@@ -1,2 +0,0 @@
1
- import "../registry.js";
2
- import "./spec.js";
@@ -1 +0,0 @@
1
- import "../index.js";
@@ -1,3 +0,0 @@
1
- import "../experiments/spec.js";
2
- import "./types.js";
3
- import { DataViewRef } from "../features/types.js";
@@ -1,2 +0,0 @@
1
- import "../features/index.js";
2
- import "../ownership.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "./documentationSystem.capability.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "./docsGenerate.command.js";
2
- import "./docsPublish.command.js";
@@ -1,7 +0,0 @@
1
- import "../../../schema/src/index.js";
2
- import "../presentations/index.js";
3
- import "../data-views/index.js";
4
- import "../operations/registry.js";
5
- import "../forms/index.js";
6
- import "../events.js";
7
- import "../index.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "./docsGenerated.event.js";
2
- import "./docsPublished.event.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "./docsSearch.form.js";
@@ -1,33 +0,0 @@
1
- import "./commands/index.js";
2
- import "./queries/index.js";
3
- import "./events/index.js";
4
- import "./capabilities/index.js";
5
- import "./contracts.js";
6
- import "./presentations.js";
7
- import "./presentations/index.js";
8
- import "./forms/index.js";
9
- import "./views/index.js";
10
- import { DocId } from "./registry.js";
11
- import "./accessibility_wcag_compliance_specs.docblock.js";
12
- import "./tech/lifecycle-stage-system.docblock.js";
13
- import "./tech/presentation-runtime.docblock.js";
14
- import "./tech/auth/better-auth-nextjs.docblock.js";
15
- import "./tech/schema/README.docblock.js";
16
- import "../workflow/overview.docblock.js";
17
- import "./tech/mcp-endpoints.docblock.js";
18
- import "./tech/vscode-extension.docblock.js";
19
- import "./tech/telemetry-ingest.docblock.js";
20
- import "./tech/contracts/README.docblock.js";
21
- import "./tech/contracts/openapi-export.docblock.js";
22
- import "./tech/contracts/openapi-import.docblock.js";
23
- import "../workspace-config/workspace-config.docblock.js";
24
- import "./tech/studio/workspaces.docblock.js";
25
- import "./tech/studio/sandbox-unlogged.docblock.js";
26
- import "./tech/studio/workspace-ops.docblock.js";
27
- import "./tech/studio/project-routing.docblock.js";
28
- import "./tech/studio/platform-admin-panel.docblock.js";
29
- import "./tech/studio/learning-events.docblock.js";
30
- import "./tech/studio/learning-journeys.docblock.js";
31
- import "./tech/studio/project-access-teams.docblock.js";
32
- import "./tech/studio/team-invitations.docblock.js";
33
- import "./tech/llm/llm-integration.docblock.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "./docsLayout.presentation.js";
2
- import "./docsReferencePage.presentation.js";
@@ -1,2 +0,0 @@
1
- import "../presentations/presentations.js";
2
- import "../ownership.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "../../../../schema/src/index.js";
2
- import "../../index.js";
@@ -1,2 +0,0 @@
1
- import "./docsIndex.query.js";
2
- import "./contractReference.query.js";
@@ -1,10 +0,0 @@
1
- import "../presentations/presentations.js";
2
- import "./presentations.js";
3
-
4
- //#region ../contracts/src/docs/registry.d.ts
5
- type DocId = string & {
6
- __docId: true;
7
- };
8
- //#endregion
9
- export { DocId };
10
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","names":[],"sources":["../../../../../contracts/src/docs/registry.ts"],"sourcesContent":[],"mappings":";;;;KASY,KAAA;EAAA,OAAA,EAAK,IAAA"}
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";
@@ -1 +0,0 @@
1
- import "../index.js";
@@ -1 +0,0 @@
1
- import "../index.js";
@@ -1 +0,0 @@
1
- import "../../index.js";