@yigemo/choosefire 0.1.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 (62) hide show
  1. package/README.md +83 -0
  2. package/contracts/choosefire-family-wealth/v2/capability-matrix.v1.json +464 -0
  3. package/contracts/choosefire-family-wealth/v2/golden/performance.v1.json +79 -0
  4. package/contracts/choosefire-family-wealth/v2/golden/r2-contract.v1.json +1070 -0
  5. package/contracts/choosefire-family-wealth/v2/golden/scenarios.v1.json +241 -0
  6. package/contracts/choosefire-family-wealth/v2/golden/transport.v1.json +207 -0
  7. package/contracts/choosefire-family-wealth/v2/manifest.json +58 -0
  8. package/contracts/choosefire-family-wealth/v2/openapi.generated.json +2605 -0
  9. package/contracts/choosefire-family-wealth/v2/runtime-schemas/family-wealth.v2.schema.json +2127 -0
  10. package/contracts/choosefire-family-wealth/v2/taxonomies/account-types.v1.json +41 -0
  11. package/contracts/choosefire-family-wealth/v2/taxonomies/asset-classes.v1.json +45 -0
  12. package/contracts/choosefire-family-wealth/v2/taxonomies/transaction-types.v1.json +57 -0
  13. package/contracts/choosefire-financial-workspace/v1/field-registry.generated.json +137 -0
  14. package/contracts/choosefire-financial-workspace/v1/field-registry.manifest.json +11 -0
  15. package/contracts/choosefire-financial-workspace/v1/golden/commands.invalid.json +583 -0
  16. package/contracts/choosefire-financial-workspace/v1/golden/commands.valid.json +201 -0
  17. package/contracts/choosefire-financial-workspace/v1/golden/cursors.invalid.json +82 -0
  18. package/contracts/choosefire-financial-workspace/v1/golden/errors.invalid.json +191 -0
  19. package/contracts/choosefire-financial-workspace/v1/golden/errors.valid.json +298 -0
  20. package/contracts/choosefire-financial-workspace/v1/golden/fingerprints.json +105 -0
  21. package/contracts/choosefire-financial-workspace/v1/golden/projections.invalid.json +3543 -0
  22. package/contracts/choosefire-financial-workspace/v1/golden/projections.valid.json +2953 -0
  23. package/contracts/choosefire-financial-workspace/v1/manifest.json +69 -0
  24. package/contracts/choosefire-financial-workspace/v1/openapi.generated.json +1987 -0
  25. package/contracts/choosefire-financial-workspace/v1/runtime-schemas/financial-workspace.v1.schema.json +1496 -0
  26. package/dist/args.d.ts +5 -0
  27. package/dist/args.js +60 -0
  28. package/dist/args.js.map +1 -0
  29. package/dist/auth.d.ts +55 -0
  30. package/dist/auth.js +480 -0
  31. package/dist/auth.js.map +1 -0
  32. package/dist/commands.d.ts +4 -0
  33. package/dist/commands.js +637 -0
  34. package/dist/commands.js.map +1 -0
  35. package/dist/config.d.ts +10 -0
  36. package/dist/config.js +74 -0
  37. package/dist/config.js.map +1 -0
  38. package/dist/family-wealth-v2-contracts.d.ts +276 -0
  39. package/dist/family-wealth-v2-contracts.js +77 -0
  40. package/dist/family-wealth-v2-contracts.js.map +1 -0
  41. package/dist/family-wealth-v2-http.d.ts +65 -0
  42. package/dist/family-wealth-v2-http.js +340 -0
  43. package/dist/family-wealth-v2-http.js.map +1 -0
  44. package/dist/financial-workspace-contracts.d.ts +191 -0
  45. package/dist/financial-workspace-contracts.js +282 -0
  46. package/dist/financial-workspace-contracts.js.map +1 -0
  47. package/dist/http.d.ts +76 -0
  48. package/dist/http.js +446 -0
  49. package/dist/http.js.map +1 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/index.js +50 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/output.d.ts +18 -0
  54. package/dist/output.js +111 -0
  55. package/dist/output.js.map +1 -0
  56. package/dist/token-store.d.ts +27 -0
  57. package/dist/token-store.js +408 -0
  58. package/dist/token-store.js.map +1 -0
  59. package/dist/types.d.ts +65 -0
  60. package/dist/types.js +5 -0
  61. package/dist/types.js.map +1 -0
  62. package/package.json +43 -0
@@ -0,0 +1,298 @@
1
+ [
2
+ {
3
+ "caseId": "error-account-scope-required",
4
+ "httpStatus": 403,
5
+ "input": {
6
+ "code": "ACCOUNT_SCOPE_REQUIRED",
7
+ "error": {
8
+ "data": {},
9
+ "message": "Synthetic ACCOUNT_SCOPE_REQUIRED",
10
+ "requestId": "request-synthetic-001"
11
+ },
12
+ "kind": "financial_workspace_error.v1",
13
+ "status": "error",
14
+ "success": false
15
+ },
16
+ "schema": "ErrorEnvelope403V1",
17
+ "valid": true
18
+ },
19
+ {
20
+ "caseId": "error-auth-required",
21
+ "httpStatus": 401,
22
+ "input": {
23
+ "code": "AUTH_REQUIRED",
24
+ "error": {
25
+ "data": {},
26
+ "message": "Synthetic AUTH_REQUIRED",
27
+ "requestId": "request-synthetic-001"
28
+ },
29
+ "kind": "financial_workspace_error.v1",
30
+ "status": "error",
31
+ "success": false
32
+ },
33
+ "schema": "ErrorEnvelope401V1",
34
+ "valid": true
35
+ },
36
+ {
37
+ "caseId": "error-csrf-validation-failed",
38
+ "httpStatus": 403,
39
+ "input": {
40
+ "code": "CSRF_VALIDATION_FAILED",
41
+ "error": {
42
+ "data": {},
43
+ "message": "Synthetic CSRF_VALIDATION_FAILED",
44
+ "requestId": "request-synthetic-001"
45
+ },
46
+ "kind": "financial_workspace_error.v1",
47
+ "status": "error",
48
+ "success": false
49
+ },
50
+ "schema": "ErrorEnvelope403V1",
51
+ "valid": true
52
+ },
53
+ {
54
+ "caseId": "error-cursor-expired",
55
+ "httpStatus": 410,
56
+ "input": {
57
+ "code": "CURSOR_EXPIRED",
58
+ "error": {
59
+ "data": {
60
+ "recovery": "read_snapshot"
61
+ },
62
+ "message": "Synthetic CURSOR_EXPIRED",
63
+ "requestId": "request-synthetic-001"
64
+ },
65
+ "kind": "financial_workspace_error.v1",
66
+ "status": "error",
67
+ "success": false
68
+ },
69
+ "schema": "ErrorEnvelope410V1",
70
+ "valid": true
71
+ },
72
+ {
73
+ "caseId": "error-idempotency-conflict",
74
+ "httpStatus": 409,
75
+ "input": {
76
+ "code": "IDEMPOTENCY_CONFLICT",
77
+ "error": {
78
+ "data": {},
79
+ "message": "Synthetic IDEMPOTENCY_CONFLICT",
80
+ "requestId": "request-synthetic-001"
81
+ },
82
+ "kind": "financial_workspace_error.v1",
83
+ "status": "error",
84
+ "success": false
85
+ },
86
+ "schema": "ErrorEnvelope409V1",
87
+ "valid": true
88
+ },
89
+ {
90
+ "caseId": "error-invalid-http-framing",
91
+ "httpStatus": 400,
92
+ "input": {
93
+ "code": "INVALID_HTTP_FRAMING",
94
+ "error": {
95
+ "data": {},
96
+ "message": "Synthetic INVALID_HTTP_FRAMING",
97
+ "requestId": "request-synthetic-001"
98
+ },
99
+ "kind": "financial_workspace_error.v1",
100
+ "status": "error",
101
+ "success": false
102
+ },
103
+ "schema": "ErrorEnvelope400V1",
104
+ "valid": true
105
+ },
106
+ {
107
+ "caseId": "error-invalid-json",
108
+ "httpStatus": 400,
109
+ "input": {
110
+ "code": "INVALID_JSON",
111
+ "error": {
112
+ "data": {},
113
+ "message": "Synthetic INVALID_JSON",
114
+ "requestId": "request-synthetic-001"
115
+ },
116
+ "kind": "financial_workspace_error.v1",
117
+ "status": "error",
118
+ "success": false
119
+ },
120
+ "schema": "ErrorEnvelope400V1",
121
+ "valid": true
122
+ },
123
+ {
124
+ "caseId": "error-payload-too-large",
125
+ "httpStatus": 413,
126
+ "input": {
127
+ "code": "PAYLOAD_TOO_LARGE",
128
+ "error": {
129
+ "data": {},
130
+ "message": "Synthetic PAYLOAD_TOO_LARGE",
131
+ "requestId": "request-synthetic-001"
132
+ },
133
+ "kind": "financial_workspace_error.v1",
134
+ "status": "error",
135
+ "success": false
136
+ },
137
+ "schema": "ErrorEnvelope413V1",
138
+ "valid": true
139
+ },
140
+ {
141
+ "caseId": "error-protected-fact-change-requires-preview",
142
+ "httpStatus": 409,
143
+ "input": {
144
+ "code": "PROTECTED_FACT_CHANGE_REQUIRES_PREVIEW",
145
+ "error": {
146
+ "data": {},
147
+ "message": "Synthetic PROTECTED_FACT_CHANGE_REQUIRES_PREVIEW",
148
+ "requestId": "request-synthetic-001"
149
+ },
150
+ "kind": "financial_workspace_error.v1",
151
+ "status": "error",
152
+ "success": false
153
+ },
154
+ "schema": "ErrorEnvelope409V1",
155
+ "valid": true
156
+ },
157
+ {
158
+ "caseId": "error-remote-unavailable",
159
+ "httpStatus": 503,
160
+ "input": {
161
+ "code": "REMOTE_UNAVAILABLE",
162
+ "error": {
163
+ "data": {},
164
+ "message": "Synthetic REMOTE_UNAVAILABLE",
165
+ "requestId": "request-synthetic-001"
166
+ },
167
+ "kind": "financial_workspace_error.v1",
168
+ "status": "error",
169
+ "success": false
170
+ },
171
+ "schema": "ErrorEnvelope503V1",
172
+ "valid": true
173
+ },
174
+ {
175
+ "caseId": "error-transaction-retryable",
176
+ "httpStatus": 503,
177
+ "input": {
178
+ "code": "TRANSACTION_RETRYABLE",
179
+ "error": {
180
+ "data": {
181
+ "retryAfterMs": 500
182
+ },
183
+ "message": "Synthetic TRANSACTION_RETRYABLE",
184
+ "requestId": "request-synthetic-001"
185
+ },
186
+ "kind": "financial_workspace_error.v1",
187
+ "status": "error",
188
+ "success": false
189
+ },
190
+ "schema": "ErrorEnvelope503V1",
191
+ "valid": true
192
+ },
193
+ {
194
+ "caseId": "error-unsupported-media-type",
195
+ "httpStatus": 415,
196
+ "input": {
197
+ "code": "UNSUPPORTED_MEDIA_TYPE",
198
+ "error": {
199
+ "data": {},
200
+ "message": "Synthetic UNSUPPORTED_MEDIA_TYPE",
201
+ "requestId": "request-synthetic-001"
202
+ },
203
+ "kind": "financial_workspace_error.v1",
204
+ "status": "error",
205
+ "success": false
206
+ },
207
+ "schema": "ErrorEnvelope415V1",
208
+ "valid": true
209
+ },
210
+ {
211
+ "caseId": "error-validation-error",
212
+ "httpStatus": 400,
213
+ "input": {
214
+ "code": "VALIDATION_ERROR",
215
+ "error": {
216
+ "data": {},
217
+ "message": "Synthetic VALIDATION_ERROR",
218
+ "requestId": "request-synthetic-001"
219
+ },
220
+ "kind": "financial_workspace_error.v1",
221
+ "status": "error",
222
+ "success": false
223
+ },
224
+ "schema": "ErrorEnvelope400V1",
225
+ "valid": true
226
+ },
227
+ {
228
+ "caseId": "error-version-conflict",
229
+ "httpStatus": 409,
230
+ "input": {
231
+ "code": "VERSION_CONFLICT",
232
+ "error": {
233
+ "data": {
234
+ "currentCursor": "synthetic-opaque-cursor-v1",
235
+ "currentVersion": 2
236
+ },
237
+ "message": "Synthetic VERSION_CONFLICT",
238
+ "requestId": "request-synthetic-001"
239
+ },
240
+ "kind": "financial_workspace_error.v1",
241
+ "status": "error",
242
+ "success": false
243
+ },
244
+ "schema": "ErrorEnvelope409V1",
245
+ "valid": true
246
+ },
247
+ {
248
+ "caseId": "error-workspace-already-initialized",
249
+ "httpStatus": 409,
250
+ "input": {
251
+ "code": "WORKSPACE_ALREADY_INITIALIZED",
252
+ "error": {
253
+ "data": {},
254
+ "message": "Synthetic WORKSPACE_ALREADY_INITIALIZED",
255
+ "requestId": "request-synthetic-001"
256
+ },
257
+ "kind": "financial_workspace_error.v1",
258
+ "status": "error",
259
+ "success": false
260
+ },
261
+ "schema": "ErrorEnvelope409V1",
262
+ "valid": true
263
+ },
264
+ {
265
+ "caseId": "error-workspace-authority-mismatch",
266
+ "httpStatus": 409,
267
+ "input": {
268
+ "code": "WORKSPACE_AUTHORITY_MISMATCH",
269
+ "error": {
270
+ "data": {},
271
+ "message": "Synthetic WORKSPACE_AUTHORITY_MISMATCH",
272
+ "requestId": "request-synthetic-001"
273
+ },
274
+ "kind": "financial_workspace_error.v1",
275
+ "status": "error",
276
+ "success": false
277
+ },
278
+ "schema": "ErrorEnvelope409V1",
279
+ "valid": true
280
+ },
281
+ {
282
+ "caseId": "error-workspace-not-initialized",
283
+ "httpStatus": 404,
284
+ "input": {
285
+ "code": "WORKSPACE_NOT_INITIALIZED",
286
+ "error": {
287
+ "data": {},
288
+ "message": "Synthetic WORKSPACE_NOT_INITIALIZED",
289
+ "requestId": "request-synthetic-001"
290
+ },
291
+ "kind": "financial_workspace_error.v1",
292
+ "status": "error",
293
+ "success": false
294
+ },
295
+ "schema": "ErrorEnvelope404V1",
296
+ "valid": true
297
+ }
298
+ ]
@@ -0,0 +1,105 @@
1
+ [
2
+ {
3
+ "canonicalBytes": "{\"authority\":{\"kind\":\"financial_workspace.v1\",\"workspaceId\":\"201\"},\"command\":{\"asOf\":null,\"expectedVersion\":1,\"field\":\"household.total_assets\",\"idempotencyKey\":\"fact-synthetic-001\",\"kind\":\"financial_workspace_fact_record_command.v1\",\"status\":\"confirmed\",\"value\":{\"amount\":\"100.5\",\"currency\":\"CNY\",\"kind\":\"money.v1\"}},\"kind\":\"choosefire_command_request_fingerprint_preimage.v1\",\"registeredClientId\":\"choosefire-web-bff\"}",
4
+ "caseId": "command-fingerprint-fact-normalized",
5
+ "digest": "7e4bb9144781395a51e7131a672e46b75c2b014eb2115a07b66b89bf86be8c57",
6
+ "input": {
7
+ "authority": {
8
+ "kind": "financial_workspace.v1",
9
+ "workspaceId": "201"
10
+ },
11
+ "command": {
12
+ "asOf": null,
13
+ "expectedVersion": 1,
14
+ "field": "household.total_assets",
15
+ "idempotencyKey": "fact-synthetic-001",
16
+ "kind": "financial_workspace_fact_record_command.v1",
17
+ "status": "confirmed",
18
+ "value": {
19
+ "amount": "100.5",
20
+ "currency": "CNY",
21
+ "kind": "money.v1"
22
+ }
23
+ },
24
+ "kind": "choosefire_command_request_fingerprint_preimage.v1",
25
+ "registeredClientId": "choosefire-web-bff"
26
+ },
27
+ "schema": "choosefire-command-request-jcs-sha256.v1",
28
+ "syntheticTestOnly": true,
29
+ "valid": true
30
+ },
31
+ {
32
+ "canonicalBytes": "{\"authority\":{\"householdId\":\"101\",\"kind\":\"personal_household_allocation.v1\"},\"command\":{\"idempotencyKey\":\"initialize-synthetic-001\",\"kind\":\"financial_workspace_initialize_command.v1\"},\"kind\":\"choosefire_command_request_fingerprint_preimage.v1\",\"registeredClientId\":\"choosefire-cli\"}",
33
+ "caseId": "command-fingerprint-initialize",
34
+ "digest": "173cfe627140a7d3d4ed187ccc3ac64bdd206a8c7fb598cd4f6c6367df777aa3",
35
+ "input": {
36
+ "authority": {
37
+ "householdId": "101",
38
+ "kind": "personal_household_allocation.v1"
39
+ },
40
+ "command": {
41
+ "idempotencyKey": "initialize-synthetic-001",
42
+ "kind": "financial_workspace_initialize_command.v1"
43
+ },
44
+ "kind": "choosefire_command_request_fingerprint_preimage.v1",
45
+ "registeredClientId": "choosefire-cli"
46
+ },
47
+ "schema": "choosefire-command-request-jcs-sha256.v1",
48
+ "syntheticTestOnly": true,
49
+ "valid": true
50
+ },
51
+ {
52
+ "canonicalBytes": "{\"kind\":\"choosefire_receipt_fingerprint_preimage.v1\",\"receipt\":{\"authority\":{\"householdId\":\"household-synthetic-001\",\"mode\":\"account\",\"status\":\"authoritative\",\"storeId\":\"store-synthetic-001\"},\"baseVersion\":0,\"committedAt\":\"2026-08-16T00:00:00.000Z\",\"cursor\":\"synthetic-opaque-cursor-v1\",\"operation\":{\"affectedObjects\":[{\"kind\":\"financial_workspace_workspace_ref.v1\",\"storeId\":\"store-synthetic-001\"}],\"baseVersion\":0,\"channel\":\"cli\",\"committedAt\":\"2026-08-16T00:00:00.000Z\",\"kind\":\"financial_workspace_operation.v1\",\"operation\":\"workspace.initialize\",\"operationId\":\"operation-synthetic-001\",\"primaryObject\":{\"kind\":\"financial_workspace_workspace_ref.v1\",\"storeId\":\"store-synthetic-001\"},\"resultVersion\":1},\"resultVersion\":1},\"requestBinding\":{\"authority\":{\"householdId\":\"101\",\"kind\":\"personal_household_allocation.v1\"},\"idempotencyKey\":\"initialize-synthetic-001\",\"registeredClientId\":\"choosefire-cli\"},\"requestFingerprint\":{\"algorithm\":\"choosefire-command-request-jcs-sha256.v1\",\"fingerprint\":\"173cfe627140a7d3d4ed187ccc3ac64bdd206a8c7fb598cd4f6c6367df777aa3\"}}",
53
+ "caseId": "receipt-fingerprint-includes-operation-channel",
54
+ "digest": "85683ab844f58b30a0df42bdded016df83b3246f03806195db1e55dbbf2b7ce6",
55
+ "input": {
56
+ "kind": "choosefire_receipt_fingerprint_preimage.v1",
57
+ "receipt": {
58
+ "authority": {
59
+ "householdId": "household-synthetic-001",
60
+ "mode": "account",
61
+ "status": "authoritative",
62
+ "storeId": "store-synthetic-001"
63
+ },
64
+ "baseVersion": 0,
65
+ "committedAt": "2026-08-16T00:00:00.000Z",
66
+ "cursor": "synthetic-opaque-cursor-v1",
67
+ "operation": {
68
+ "affectedObjects": [
69
+ {
70
+ "kind": "financial_workspace_workspace_ref.v1",
71
+ "storeId": "store-synthetic-001"
72
+ }
73
+ ],
74
+ "baseVersion": 0,
75
+ "channel": "cli",
76
+ "committedAt": "2026-08-16T00:00:00.000Z",
77
+ "kind": "financial_workspace_operation.v1",
78
+ "operation": "workspace.initialize",
79
+ "operationId": "operation-synthetic-001",
80
+ "primaryObject": {
81
+ "kind": "financial_workspace_workspace_ref.v1",
82
+ "storeId": "store-synthetic-001"
83
+ },
84
+ "resultVersion": 1
85
+ },
86
+ "resultVersion": 1
87
+ },
88
+ "requestBinding": {
89
+ "authority": {
90
+ "householdId": "101",
91
+ "kind": "personal_household_allocation.v1"
92
+ },
93
+ "idempotencyKey": "initialize-synthetic-001",
94
+ "registeredClientId": "choosefire-cli"
95
+ },
96
+ "requestFingerprint": {
97
+ "algorithm": "choosefire-command-request-jcs-sha256.v1",
98
+ "fingerprint": "173cfe627140a7d3d4ed187ccc3ac64bdd206a8c7fb598cd4f6c6367df777aa3"
99
+ }
100
+ },
101
+ "schema": "choosefire-receipt-jcs-sha256.v1",
102
+ "syntheticTestOnly": true,
103
+ "valid": true
104
+ }
105
+ ]