@contractspec/example.locale-jurisdiction-gate 0.0.0-canary-20260113162409

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 (73) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +56 -0
  2. package/.turbo/turbo-build.log +57 -0
  3. package/CHANGELOG.md +302 -0
  4. package/LICENSE +21 -0
  5. package/README.md +42 -0
  6. package/dist/docs/index.d.ts +1 -0
  7. package/dist/docs/index.js +1 -0
  8. package/dist/docs/locale-jurisdiction-gate.docblock.d.ts +1 -0
  9. package/dist/docs/locale-jurisdiction-gate.docblock.js +53 -0
  10. package/dist/docs/locale-jurisdiction-gate.docblock.js.map +1 -0
  11. package/dist/entities/index.d.ts +2 -0
  12. package/dist/entities/index.js +3 -0
  13. package/dist/entities/models.d.ts +186 -0
  14. package/dist/entities/models.d.ts.map +1 -0
  15. package/dist/entities/models.js +168 -0
  16. package/dist/entities/models.js.map +1 -0
  17. package/dist/events.d.ts +69 -0
  18. package/dist/events.d.ts.map +1 -0
  19. package/dist/events.js +123 -0
  20. package/dist/events.js.map +1 -0
  21. package/dist/example.d.ts +7 -0
  22. package/dist/example.d.ts.map +1 -0
  23. package/dist/example.js +47 -0
  24. package/dist/example.js.map +1 -0
  25. package/dist/handlers/demo.handlers.d.ts +59 -0
  26. package/dist/handlers/demo.handlers.d.ts.map +1 -0
  27. package/dist/handlers/demo.handlers.js +86 -0
  28. package/dist/handlers/demo.handlers.js.map +1 -0
  29. package/dist/handlers/index.d.ts +2 -0
  30. package/dist/handlers/index.js +3 -0
  31. package/dist/index.d.ts +11 -0
  32. package/dist/index.js +12 -0
  33. package/dist/locale-jurisdiction-gate.feature.d.ts +7 -0
  34. package/dist/locale-jurisdiction-gate.feature.d.ts.map +1 -0
  35. package/dist/locale-jurisdiction-gate.feature.js +53 -0
  36. package/dist/locale-jurisdiction-gate.feature.js.map +1 -0
  37. package/dist/operations/assistant.d.ts +245 -0
  38. package/dist/operations/assistant.d.ts.map +1 -0
  39. package/dist/operations/assistant.js +115 -0
  40. package/dist/operations/assistant.js.map +1 -0
  41. package/dist/operations/index.d.ts +2 -0
  42. package/dist/operations/index.js +3 -0
  43. package/dist/policy/guard.d.ts +27 -0
  44. package/dist/policy/guard.d.ts.map +1 -0
  45. package/dist/policy/guard.js +73 -0
  46. package/dist/policy/guard.js.map +1 -0
  47. package/dist/policy/index.d.ts +3 -0
  48. package/dist/policy/index.js +3 -0
  49. package/dist/policy/types.d.ts +16 -0
  50. package/dist/policy/types.d.ts.map +1 -0
  51. package/dist/policy/types.js +0 -0
  52. package/example.ts +1 -0
  53. package/package.json +77 -0
  54. package/src/docs/index.ts +1 -0
  55. package/src/docs/locale-jurisdiction-gate.docblock.ts +46 -0
  56. package/src/entities/index.ts +1 -0
  57. package/src/entities/models.ts +110 -0
  58. package/src/events.ts +74 -0
  59. package/src/example.ts +34 -0
  60. package/src/handlers/demo.handlers.test.ts +54 -0
  61. package/src/handlers/demo.handlers.ts +160 -0
  62. package/src/handlers/index.ts +1 -0
  63. package/src/index.ts +15 -0
  64. package/src/locale-jurisdiction-gate.feature.ts +30 -0
  65. package/src/operations/assistant.ts +98 -0
  66. package/src/operations/index.ts +1 -0
  67. package/src/policy/guard.test.ts +25 -0
  68. package/src/policy/guard.ts +102 -0
  69. package/src/policy/index.ts +2 -0
  70. package/src/policy/types.ts +18 -0
  71. package/tsconfig.json +17 -0
  72. package/tsconfig.tsbuildinfo +1 -0
  73. package/tsdown.config.js +17 -0
@@ -0,0 +1,56 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
3
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/locale-jurisdiction-gate/tsdown.config.js
4
+ ℹ entry: src/events.ts, src/example.ts, src/index.ts, src/locale-jurisdiction-gate.feature.ts, src/docs/index.ts, src/docs/locale-jurisdiction-gate.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/demo.handlers.ts, src/handlers/index.ts, src/operations/assistant.ts, src/operations/index.ts, src/policy/guard.ts, src/policy/index.ts, src/policy/types.ts
5
+ ℹ target: esnext
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ Cleaning 51 files
9
+ ℹ dist/entities/models.js 3.95 kB │ gzip: 0.83 kB
10
+ ℹ dist/operations/assistant.js 3.25 kB │ gzip: 1.07 kB
11
+ ℹ dist/events.js 3.07 kB │ gzip: 0.68 kB
12
+ ℹ dist/handlers/demo.handlers.js 2.46 kB │ gzip: 0.90 kB
13
+ ℹ dist/policy/guard.js 1.90 kB │ gzip: 0.76 kB
14
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.js 1.64 kB │ gzip: 0.74 kB
15
+ ℹ dist/index.js 1.27 kB │ gzip: 0.40 kB
16
+ ℹ dist/locale-jurisdiction-gate.feature.js 1.16 kB │ gzip: 0.50 kB
17
+ ℹ dist/example.js 1.13 kB │ gzip: 0.58 kB
18
+ ℹ dist/entities/index.js 0.36 kB │ gzip: 0.16 kB
19
+ ℹ dist/operations/index.js 0.16 kB │ gzip: 0.10 kB
20
+ ℹ dist/policy/index.js 0.15 kB │ gzip: 0.11 kB
21
+ ℹ dist/handlers/index.js 0.11 kB │ gzip: 0.09 kB
22
+ ℹ dist/docs/index.js 0.05 kB │ gzip: 0.07 kB
23
+ ℹ dist/policy/types.js 0.00 kB │ gzip: 0.02 kB
24
+ ℹ dist/handlers/demo.handlers.js.map 5.94 kB │ gzip: 1.81 kB
25
+ ℹ dist/entities/models.js.map 5.85 kB │ gzip: 1.20 kB
26
+ ℹ dist/operations/assistant.js.map 4.60 kB │ gzip: 1.41 kB
27
+ ℹ dist/events.js.map 4.40 kB │ gzip: 0.93 kB
28
+ ℹ dist/policy/guard.js.map 4.08 kB │ gzip: 1.44 kB
29
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.js.map 2.16 kB │ gzip: 0.93 kB
30
+ ℹ dist/locale-jurisdiction-gate.feature.js.map 1.67 kB │ gzip: 0.72 kB
31
+ ℹ dist/example.js.map 1.60 kB │ gzip: 0.79 kB
32
+ ℹ dist/entities/models.d.ts.map 0.91 kB │ gzip: 0.39 kB
33
+ ℹ dist/policy/guard.d.ts.map 0.76 kB │ gzip: 0.39 kB
34
+ ℹ dist/operations/assistant.d.ts.map 0.65 kB │ gzip: 0.28 kB
35
+ ℹ dist/events.d.ts.map 0.57 kB │ gzip: 0.26 kB
36
+ ℹ dist/handlers/demo.handlers.d.ts.map 0.45 kB │ gzip: 0.26 kB
37
+ ℹ dist/policy/types.d.ts.map 0.25 kB │ gzip: 0.19 kB
38
+ ℹ dist/locale-jurisdiction-gate.feature.d.ts.map 0.19 kB │ gzip: 0.15 kB
39
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
40
+ ℹ dist/operations/assistant.d.ts 7.28 kB │ gzip: 0.64 kB
41
+ ℹ dist/entities/models.d.ts 5.48 kB │ gzip: 0.68 kB
42
+ ℹ dist/events.d.ts 2.20 kB │ gzip: 0.38 kB
43
+ ℹ dist/handlers/demo.handlers.d.ts 1.48 kB │ gzip: 0.55 kB
44
+ ℹ dist/index.d.ts 1.37 kB │ gzip: 0.42 kB
45
+ ℹ dist/policy/guard.d.ts 0.93 kB │ gzip: 0.42 kB
46
+ ℹ dist/policy/types.d.ts 0.46 kB │ gzip: 0.31 kB
47
+ ℹ dist/entities/index.d.ts 0.36 kB │ gzip: 0.16 kB
48
+ ℹ dist/locale-jurisdiction-gate.feature.d.ts 0.34 kB │ gzip: 0.20 kB
49
+ ℹ dist/policy/index.d.ts 0.26 kB │ gzip: 0.14 kB
50
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
51
+ ℹ dist/operations/index.d.ts 0.16 kB │ gzip: 0.10 kB
52
+ ℹ dist/handlers/index.d.ts 0.15 kB │ gzip: 0.09 kB
53
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
54
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
55
+ ℹ 46 files, total: 75.65 kB
56
+ ✔ Build complete in 30479ms
@@ -0,0 +1,57 @@
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
3
+ $ tsdown
4
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/locale-jurisdiction-gate/tsdown.config.js
6
+ ℹ entry: src/events.ts, src/example.ts, src/index.ts, src/locale-jurisdiction-gate.feature.ts, src/docs/index.ts, src/docs/locale-jurisdiction-gate.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/demo.handlers.ts, src/handlers/index.ts, src/operations/assistant.ts, src/operations/index.ts, src/policy/guard.ts, src/policy/index.ts, src/policy/types.ts
7
+ ℹ target: esnext
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ dist/entities/models.js 3.95 kB │ gzip: 0.83 kB
11
+ ℹ dist/operations/assistant.js 3.25 kB │ gzip: 1.07 kB
12
+ ℹ dist/events.js 3.07 kB │ gzip: 0.68 kB
13
+ ℹ dist/handlers/demo.handlers.js 2.46 kB │ gzip: 0.90 kB
14
+ ℹ dist/policy/guard.js 1.90 kB │ gzip: 0.76 kB
15
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.js 1.64 kB │ gzip: 0.74 kB
16
+ ℹ dist/index.js 1.27 kB │ gzip: 0.40 kB
17
+ ℹ dist/locale-jurisdiction-gate.feature.js 1.16 kB │ gzip: 0.50 kB
18
+ ℹ dist/example.js 1.13 kB │ gzip: 0.58 kB
19
+ ℹ dist/entities/index.js 0.36 kB │ gzip: 0.16 kB
20
+ ℹ dist/operations/index.js 0.16 kB │ gzip: 0.10 kB
21
+ ℹ dist/policy/index.js 0.15 kB │ gzip: 0.11 kB
22
+ ℹ dist/handlers/index.js 0.11 kB │ gzip: 0.09 kB
23
+ ℹ dist/docs/index.js 0.05 kB │ gzip: 0.07 kB
24
+ ℹ dist/policy/types.js 0.00 kB │ gzip: 0.02 kB
25
+ ℹ dist/handlers/demo.handlers.js.map 5.94 kB │ gzip: 1.81 kB
26
+ ℹ dist/entities/models.js.map 5.85 kB │ gzip: 1.20 kB
27
+ ℹ dist/operations/assistant.js.map 4.60 kB │ gzip: 1.41 kB
28
+ ℹ dist/events.js.map 4.40 kB │ gzip: 0.93 kB
29
+ ℹ dist/policy/guard.js.map 4.08 kB │ gzip: 1.44 kB
30
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.js.map 2.16 kB │ gzip: 0.93 kB
31
+ ℹ dist/locale-jurisdiction-gate.feature.js.map 1.67 kB │ gzip: 0.72 kB
32
+ ℹ dist/example.js.map 1.60 kB │ gzip: 0.79 kB
33
+ ℹ dist/entities/models.d.ts.map 0.91 kB │ gzip: 0.39 kB
34
+ ℹ dist/policy/guard.d.ts.map 0.76 kB │ gzip: 0.39 kB
35
+ ℹ dist/operations/assistant.d.ts.map 0.65 kB │ gzip: 0.28 kB
36
+ ℹ dist/events.d.ts.map 0.57 kB │ gzip: 0.26 kB
37
+ ℹ dist/handlers/demo.handlers.d.ts.map 0.45 kB │ gzip: 0.26 kB
38
+ ℹ dist/policy/types.d.ts.map 0.25 kB │ gzip: 0.19 kB
39
+ ℹ dist/locale-jurisdiction-gate.feature.d.ts.map 0.19 kB │ gzip: 0.15 kB
40
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
41
+ ℹ dist/operations/assistant.d.ts 7.28 kB │ gzip: 0.64 kB
42
+ ℹ dist/entities/models.d.ts 5.48 kB │ gzip: 0.68 kB
43
+ ℹ dist/events.d.ts 2.20 kB │ gzip: 0.38 kB
44
+ ℹ dist/handlers/demo.handlers.d.ts 1.48 kB │ gzip: 0.55 kB
45
+ ℹ dist/index.d.ts 1.37 kB │ gzip: 0.42 kB
46
+ ℹ dist/policy/guard.d.ts 0.93 kB │ gzip: 0.42 kB
47
+ ℹ dist/policy/types.d.ts 0.46 kB │ gzip: 0.31 kB
48
+ ℹ dist/entities/index.d.ts 0.36 kB │ gzip: 0.16 kB
49
+ ℹ dist/locale-jurisdiction-gate.feature.d.ts 0.34 kB │ gzip: 0.20 kB
50
+ ℹ dist/policy/index.d.ts 0.26 kB │ gzip: 0.14 kB
51
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
52
+ ℹ dist/operations/index.d.ts 0.16 kB │ gzip: 0.10 kB
53
+ ℹ dist/handlers/index.d.ts 0.15 kB │ gzip: 0.09 kB
54
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
55
+ ℹ dist/docs/locale-jurisdiction-gate.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
56
+ ℹ 46 files, total: 75.65 kB
57
+ ✔ Build complete in 29765ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,302 @@
1
+ # @contractspec/example.locale-jurisdiction-gate
2
+
3
+ ## 0.0.0-canary-20260113162409
4
+
5
+ ### Minor Changes
6
+
7
+ - caf8701: feat: add cli vibe command to run workflow
8
+ - c69b849: feat: add api web services (mcp & website)
9
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
10
+ - fd38e85: feat: auto-fix contractspec issues
11
+
12
+ ### Patch Changes
13
+
14
+ - e7ded36: feat: improve stability (adding ts-morph)
15
+ - c231a8b: test: improve workspace stability
16
+ - Updated dependencies [e7ded36]
17
+ - Updated dependencies [caf8701]
18
+ - Updated dependencies [c69b849]
19
+ - Updated dependencies [c231a8b]
20
+ - Updated dependencies [42b8d78]
21
+ - Updated dependencies [fd38e85]
22
+ - @contractspec/lib.contracts@0.0.0-canary-20260113162409
23
+ - @contractspec/lib.schema@0.0.0-canary-20260113162409
24
+
25
+ ## 1.46.2
26
+
27
+ ### Patch Changes
28
+
29
+ - 7e21625: feat: library services (landing page & api)
30
+ - Updated dependencies [7e21625]
31
+ - @contractspec/lib.contracts@1.46.2
32
+ - @contractspec/lib.schema@1.46.2
33
+
34
+ ## 1.46.1
35
+
36
+ ### Patch Changes
37
+
38
+ - 2d8a72b: fix: mcp for presentation
39
+ - Updated dependencies [2d8a72b]
40
+ - @contractspec/lib.contracts@1.46.1
41
+ - @contractspec/lib.schema@1.46.1
42
+
43
+ ## 1.46.0
44
+
45
+ ### Minor Changes
46
+
47
+ - 07cb19b: feat: feat: cleaude code & opencode integrations
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [07cb19b]
52
+ - @contractspec/lib.contracts@1.46.0
53
+ - @contractspec/lib.schema@1.46.0
54
+
55
+ ## 1.45.6
56
+
57
+ ### Patch Changes
58
+
59
+ - a913074: feat: improve ai agents rules management"
60
+ - Updated dependencies [a913074]
61
+ - @contractspec/lib.contracts@1.45.6
62
+ - @contractspec/lib.schema@1.45.6
63
+
64
+ ## 1.45.5
65
+
66
+ ### Patch Changes
67
+
68
+ - 9ddd7fa: feat: improve versioning
69
+ - Updated dependencies [9ddd7fa]
70
+ - @contractspec/lib.contracts@1.45.5
71
+ - @contractspec/lib.schema@1.45.5
72
+
73
+ ## 1.45.4
74
+
75
+ ### Patch Changes
76
+
77
+ - fix: github action
78
+ - Updated dependencies
79
+ - @contractspec/lib.contracts@1.45.4
80
+ - @contractspec/lib.schema@1.45.4
81
+
82
+ ## 1.45.3
83
+
84
+ ### Patch Changes
85
+
86
+ - e74ea9e: feat: version management
87
+ - Updated dependencies [e74ea9e]
88
+ - @contractspec/lib.contracts@1.45.3
89
+ - @contractspec/lib.schema@1.45.3
90
+
91
+ ## 1.45.2
92
+
93
+ ### Patch Changes
94
+
95
+ - 39ca241: code cleaning
96
+ - Updated dependencies [39ca241]
97
+ - @contractspec/lib.contracts@1.45.2
98
+ - @contractspec/lib.schema@1.45.2
99
+
100
+ ## 1.45.1
101
+
102
+ ### Patch Changes
103
+
104
+ - feat: improve app config and examples contracts
105
+ - Updated dependencies
106
+ - @contractspec/lib.contracts@1.45.1
107
+ - @contractspec/lib.schema@1.45.1
108
+
109
+ ## 1.45.0
110
+
111
+ ### Minor Changes
112
+
113
+ - e73ca1d: feat: improve app config and examples contracts
114
+ feat: Contract layers support (features, examples, app-configs)
115
+
116
+ ### New CLI Commands
117
+ - `contractspec list layers` - List all contract layers with filtering
118
+
119
+ ### Enhanced Commands
120
+ - `contractspec ci` - New `layers` check category validates features/examples/config
121
+ - `contractspec doctor` - New `layers` health checks
122
+ - `contractspec integrity` - Now shows layer statistics
123
+
124
+ ### New APIs
125
+ - `discoverLayers()` - Scan workspace for all layer files
126
+ - `scanExampleSource()` - Parse ExampleSpec from source code
127
+ - `isExampleFile()` - Check if file is an example spec
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [e73ca1d]
132
+ - @contractspec/lib.contracts@1.45.0
133
+ - @contractspec/lib.schema@1.45.0
134
+
135
+ ## 1.44.1
136
+
137
+ ### Patch Changes
138
+
139
+ - 3c594fb: fix
140
+ - Updated dependencies [3c594fb]
141
+ - @contractspec/lib.contracts@1.44.1
142
+ - @contractspec/lib.schema@1.44.1
143
+
144
+ ## 1.44.0
145
+
146
+ ### Minor Changes
147
+
148
+ - 5f3a868: chore: isolate branding to contractspec.io
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [5f3a868]
153
+ - @contractspec/lib.contracts@1.44.0
154
+ - @contractspec/lib.schema@1.44.0
155
+
156
+ ## 1.43.4
157
+
158
+ ### Patch Changes
159
+
160
+ - 9216062: fix: cross-platform compatibility
161
+ - Updated dependencies [9216062]
162
+ - @contractspec/lib.contracts@1.43.4
163
+ - @contractspec/lib.schema@1.43.3
164
+
165
+ ## 1.43.3
166
+
167
+ ### Patch Changes
168
+
169
+ - 24d9759: improve documentation
170
+ - Updated dependencies [24d9759]
171
+ - @contractspec/lib.contracts@1.43.3
172
+ - @contractspec/lib.schema@1.43.2
173
+
174
+ ## 1.43.2
175
+
176
+ ### Patch Changes
177
+
178
+ - e147271: fix: improve stability
179
+ - Updated dependencies [e147271]
180
+ - @contractspec/lib.contracts@1.43.2
181
+ - @contractspec/lib.schema@1.43.1
182
+
183
+ ## 1.43.1
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [f28fdad]
188
+ - @contractspec/lib.contracts@1.43.1
189
+
190
+ ## 1.43.0
191
+
192
+ ### Minor Changes
193
+
194
+ - 042d072: feat: schema declaration using json schema, including zod
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [042d072]
199
+ - @contractspec/lib.contracts@1.43.0
200
+ - @contractspec/lib.schema@1.43.0
201
+
202
+ ## 1.42.10
203
+
204
+ ### Patch Changes
205
+
206
+ - 1e6a0f1: fix: mcp server
207
+ - Updated dependencies [1e6a0f1]
208
+ - @contractspec/lib.contracts@1.42.10
209
+ - @contractspec/lib.schema@1.42.10
210
+
211
+ ## 1.42.9
212
+
213
+ ### Patch Changes
214
+
215
+ - 9281db7: fix ModelRegistry
216
+ - Updated dependencies [9281db7]
217
+ - @contractspec/lib.contracts@1.42.9
218
+ - @contractspec/lib.schema@1.42.9
219
+
220
+ ## 1.42.8
221
+
222
+ ### Patch Changes
223
+
224
+ - e07b5ac: fix
225
+ - Updated dependencies [e07b5ac]
226
+ - @contractspec/lib.contracts@1.42.8
227
+ - @contractspec/lib.schema@1.42.8
228
+
229
+ ## 1.42.7
230
+
231
+ ### Patch Changes
232
+
233
+ - e9b575d: fix release
234
+ - Updated dependencies [e9b575d]
235
+ - @contractspec/lib.contracts@1.42.7
236
+ - @contractspec/lib.schema@1.42.7
237
+
238
+ ## 1.42.6
239
+
240
+ ### Patch Changes
241
+
242
+ - 1500242: fix tooling
243
+ - Updated dependencies [1500242]
244
+ - @contractspec/lib.contracts@1.42.6
245
+ - @contractspec/lib.schema@1.42.6
246
+
247
+ ## 1.42.5
248
+
249
+ ### Patch Changes
250
+
251
+ - 1299719: fix vscode
252
+ - Updated dependencies [1299719]
253
+ - @contractspec/lib.contracts@1.42.5
254
+ - @contractspec/lib.schema@1.42.5
255
+
256
+ ## 1.42.4
257
+
258
+ ### Patch Changes
259
+
260
+ - ac28b99: fix: generate from openapi
261
+ - Updated dependencies [ac28b99]
262
+ - @contractspec/lib.contracts@1.42.4
263
+ - @contractspec/lib.schema@1.42.4
264
+
265
+ ## 1.42.3
266
+
267
+ ### Patch Changes
268
+
269
+ - 3f5d015: fix(tooling): cicd
270
+ - Updated dependencies [3f5d015]
271
+ - @contractspec/lib.contracts@1.42.3
272
+ - @contractspec/lib.schema@1.42.3
273
+
274
+ ## 1.42.2
275
+
276
+ ### Patch Changes
277
+
278
+ - 1f9ac4c: fix
279
+ - Updated dependencies [1f9ac4c]
280
+ - @contractspec/lib.contracts@1.42.2
281
+ - @contractspec/lib.schema@1.42.2
282
+
283
+ ## 1.42.1
284
+
285
+ ### Patch Changes
286
+
287
+ - f043995: Fix release
288
+ - Updated dependencies [f043995]
289
+ - @contractspec/lib.contracts@1.42.1
290
+ - @contractspec/lib.schema@1.42.1
291
+
292
+ ## 1.42.0
293
+
294
+ ### Minor Changes
295
+
296
+ - 8eefd9c: initial release
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [8eefd9c]
301
+ - @contractspec/lib.contracts@1.42.0
302
+ - @contractspec/lib.schema@1.42.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # `@contractspec/example.locale-jurisdiction-gate`
2
+
3
+ Website: https://contractspec.io/
4
+
5
+
6
+ Spec-first example showing how to **fail-closed** on every assistant call unless:
7
+
8
+ - `locale` is provided and supported
9
+ - `jurisdiction` is provided
10
+ - `kbSnapshotId` is provided
11
+ - `allowedScope` is provided and respected
12
+ - answers include **at least one citation** (or the call is refused)
13
+
14
+ ## What this example demonstrates
15
+
16
+ - **Locale + jurisdiction as explicit inputs** (no guessing)
17
+ - **Structured Answer IR** with citations, disclaimers, and risk flags
18
+ - **Scope enforcement**: blocks scope-violating content under restricted scopes
19
+ - **Traceability**: emits events for requested / blocked / delivered
20
+
21
+ ## Key exports
22
+
23
+ - `contracts`: `assistant.answer`, `assistant.explainConcept`
24
+ - `entities/models`: `LLMCallEnvelope`, `AssistantAnswerIR`, `RegulatoryContext`
25
+ - `policy/guard`: pure gate functions used by handlers and tests
26
+ - `handlers/demo.handlers`: deterministic demo handlers (no LLM)
27
+
28
+ ## Running tests
29
+
30
+ ```bash
31
+ bun test
32
+ ```
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "./locale-jurisdiction-gate.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,53 @@
1
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
2
+
3
+ //#region src/docs/locale-jurisdiction-gate.docblock.ts
4
+ registerDocBlocks([{
5
+ id: "docs.examples.locale-jurisdiction-gate.goal",
6
+ title: "Locale/Jurisdiction Gate — Goal",
7
+ summary: "Fail-closed gate that forces locale + jurisdiction + kbSnapshotId + allowedScope for assistant calls.",
8
+ kind: "goal",
9
+ visibility: "public",
10
+ route: "/docs/examples/locale-jurisdiction-gate/goal",
11
+ tags: [
12
+ "assistant",
13
+ "policy",
14
+ "locale",
15
+ "jurisdiction",
16
+ "knowledge"
17
+ ],
18
+ body: `## Why it matters
19
+ - Forces all assistant behavior to be bound to explicit inputs (no guessing).
20
+ - Requires KB snapshot citations to make answers traceable and regenerable.
21
+
22
+ ## Guardrails
23
+ - Missing locale/jurisdiction/snapshot/scope => refuse (structured).
24
+ - Missing citations => refuse.
25
+ - Scope violations under education_only => refuse/escalate.`
26
+ }, {
27
+ id: "docs.examples.locale-jurisdiction-gate.reference",
28
+ title: "Locale/Jurisdiction Gate — Reference",
29
+ summary: "Contracts, models, and events exposed by the gate example.",
30
+ kind: "reference",
31
+ visibility: "public",
32
+ route: "/docs/examples/locale-jurisdiction-gate",
33
+ tags: [
34
+ "assistant",
35
+ "policy",
36
+ "reference"
37
+ ],
38
+ body: `## Contracts
39
+ - assistant.answer (v1)
40
+ - assistant.explainConcept (v1)
41
+
42
+ ## Models
43
+ - LLMCallEnvelope (locale, regulatoryContext, kbSnapshotId, allowedScope, traceId)
44
+ - AssistantAnswerIR (sections, citations, disclaimers, riskFlags)
45
+
46
+ ## Events
47
+ - assistant.answer.requested
48
+ - assistant.answer.blocked
49
+ - assistant.answer.delivered`
50
+ }]);
51
+
52
+ //#endregion
53
+ //# sourceMappingURL=locale-jurisdiction-gate.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-jurisdiction-gate.docblock.js","names":[],"sources":["../../src/docs/locale-jurisdiction-gate.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst docBlocks: DocBlock[] = [\n {\n id: 'docs.examples.locale-jurisdiction-gate.goal',\n title: 'Locale/Jurisdiction Gate — Goal',\n summary:\n 'Fail-closed gate that forces locale + jurisdiction + kbSnapshotId + allowedScope for assistant calls.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/locale-jurisdiction-gate/goal',\n tags: ['assistant', 'policy', 'locale', 'jurisdiction', 'knowledge'],\n body: `## Why it matters\n- Forces all assistant behavior to be bound to explicit inputs (no guessing).\n- Requires KB snapshot citations to make answers traceable and regenerable.\n\n## Guardrails\n- Missing locale/jurisdiction/snapshot/scope => refuse (structured).\n- Missing citations => refuse.\n- Scope violations under education_only => refuse/escalate.`,\n },\n {\n id: 'docs.examples.locale-jurisdiction-gate.reference',\n title: 'Locale/Jurisdiction Gate — Reference',\n summary: 'Contracts, models, and events exposed by the gate example.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/locale-jurisdiction-gate',\n tags: ['assistant', 'policy', 'reference'],\n body: `## Contracts\n- assistant.answer (v1)\n- assistant.explainConcept (v1)\n\n## Models\n- LLMCallEnvelope (locale, regulatoryContext, kbSnapshotId, allowedScope, traceId)\n- AssistantAnswerIR (sections, citations, disclaimers, riskFlags)\n\n## Events\n- assistant.answer.requested\n- assistant.answer.blocked\n- assistant.answer.delivered`,\n },\n];\n\nregisterDocBlocks(docBlocks);\n"],"mappings":";;;AA6CA,kBA1C8B,CAC5B;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAa;EAAU;EAAU;EAAgB;EAAY;CACpE,MAAM;;;;;;;;CAQP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAa;EAAU;EAAY;CAC1C,MAAM;;;;;;;;;;;;CAYP,CACF,CAE2B"}
@@ -0,0 +1,2 @@
1
+ import { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel } from "./models.js";
2
+ export { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel };
@@ -0,0 +1,3 @@
1
+ import { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel } from "./models.js";
2
+
3
+ export { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel };