@yigemo/choosefire 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/contracts/choosefire-family-wealth/v2/capability-matrix.v1.json +7 -6
- package/contracts/choosefire-family-wealth/v2/golden/r3-holdings.v1.json +311 -0
- package/contracts/choosefire-family-wealth/v2/manifest.json +12 -7
- package/contracts/choosefire-family-wealth/v2/openapi.generated.json +682 -39
- package/contracts/choosefire-family-wealth/v2/runtime-schemas/family-wealth.v2.schema.json +487 -15
- package/dist/commands.js +115 -6
- package/dist/commands.js.map +1 -1
- package/dist/family-wealth-v2-contracts.d.ts +92 -6
- package/dist/family-wealth-v2-contracts.js +1 -1
- package/dist/family-wealth-v2-contracts.js.map +1 -1
- package/dist/family-wealth-v2-http.d.ts +8 -4
- package/dist/family-wealth-v2-http.js +49 -3
- package/dist/family-wealth-v2-http.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,6 +57,12 @@ choosefire workspace snapshot --json
|
|
|
57
57
|
choosefire workspace summary --json
|
|
58
58
|
choosefire workspace activity --limit 50 [--cursor <cursor>] --json
|
|
59
59
|
choosefire workspace fact-record --expected-version <n> --idempotency-key <key> --field household.total_assets --amount 100.5 --currency CNY [--status confirmed|estimated] [--as-of <iso>] --json
|
|
60
|
+
choosefire household summary --json
|
|
61
|
+
choosefire wealth overview --json
|
|
62
|
+
choosefire wealth account-show --account-id <uuid> --json
|
|
63
|
+
choosefire wealth holding-create --command-id <uuid> --holding-id <uuid> --account-id <uuid> --name "Global Equity ETF" --currency CNY --expected-workspace-version <n> --idempotency-key <key> [--instrument-ref ETF-EXAMPLE-001] [--quantity 12.5 --quantity-as-of <iso>] --json
|
|
64
|
+
choosefire wealth holding-update --command-id <uuid> --holding-id <uuid> --name "Global Equity ETF" --currency CNY --expected-object-revision <n> --expected-workspace-version <n> --idempotency-key <key> [--quantity 13.5 --quantity-as-of <iso>] --json
|
|
65
|
+
choosefire wealth holding-archive --command-id <uuid> --holding-id <uuid> --reason "Position closed" --expected-object-revision <n> --expected-workspace-version <n> --idempotency-key <key> --json
|
|
60
66
|
choosefire plan list --json
|
|
61
67
|
choosefire plan get <plan-id> --json
|
|
62
68
|
choosefire plan update-inputs <plan-id> --annual-return 0.035 --annual-inflation 0.04 --expected-updated-at <iso> --dry-run --json
|
|
@@ -68,7 +74,7 @@ choosefire asset remove --plan <plan-id> --account-id asset-bank --reason "dupli
|
|
|
68
74
|
choosefire visual dataset --plan <plan-id> --kind overview --json
|
|
69
75
|
```
|
|
70
76
|
|
|
71
|
-
The
|
|
77
|
+
The `workspace`, `household`, and `wealth` operations use the workspace bearer only, validate every request and response against the checked-in contract, never retry mutations, and never fall back to the legacy token or local files. Holding commands are available only for detailed accounts. `--quantity` and `--quantity-as-of` must be supplied together so scripts and audit replays remain deterministic. Give every wealth mutation an explicit `--command-id`; when an outcome is unknown, first read the latest projection and then explicitly retry the exact serialized body with the original command ID and idempotency key to recover the receipt-first outcome. Never generate a new ID or key for that recovery attempt. The JSON error includes this exact recovery material and action.
|
|
72
78
|
|
|
73
79
|
Existing legacy plan write commands still default to dry-run unless `--apply` is passed. For CLI and MCP sources, `--expected-updated-at` should be provided to avoid overwriting newer data.
|
|
74
80
|
|
|
@@ -159,20 +159,21 @@
|
|
|
159
159
|
"webPath": "/app"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
|
-
"builtinAi": "
|
|
162
|
+
"builtinAi": "read",
|
|
163
163
|
"capabilityId": "holding.manage",
|
|
164
|
-
"cliPath": "holding
|
|
165
|
-
"commandOrQuery": "holding.
|
|
164
|
+
"cliPath": "wealth holding-create|holding-update|holding-archive|account-show",
|
|
165
|
+
"commandOrQuery": "holding.create|update|archive.v2 + asset_account.detail.v2",
|
|
166
166
|
"fixtureIds": [
|
|
167
167
|
"CFW-FIX-003"
|
|
168
168
|
],
|
|
169
|
-
"mcpSurface": "choosefire
|
|
169
|
+
"mcpSurface": "choosefire://workspace/accounts/{accountId}",
|
|
170
170
|
"milestone": "R3",
|
|
171
171
|
"requiredRole": "owner",
|
|
172
172
|
"riskLevel": "L2",
|
|
173
|
-
"status": "
|
|
173
|
+
"status": "parity",
|
|
174
174
|
"storyIds": [
|
|
175
|
-
"CAPTURE-01"
|
|
175
|
+
"CAPTURE-01",
|
|
176
|
+
"CHANNEL-01"
|
|
176
177
|
],
|
|
177
178
|
"webPath": "/app/assets/:id"
|
|
178
179
|
},
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cases": [
|
|
3
|
+
{
|
|
4
|
+
"actorRole": "owner",
|
|
5
|
+
"caseId": "R3-HOLDING-CREATE-001",
|
|
6
|
+
"expectedAssertions": [
|
|
7
|
+
"owner can create a holding only under a detailed active account",
|
|
8
|
+
"quantity precision is preserved as a decimal string"
|
|
9
|
+
],
|
|
10
|
+
"fixtureId": "CFW-FIX-003",
|
|
11
|
+
"request": {
|
|
12
|
+
"body": {
|
|
13
|
+
"commandId": "71000000-0000-4000-8000-000000000001",
|
|
14
|
+
"expectedObjectRevision": null,
|
|
15
|
+
"expectedWorkspaceVersion": 4,
|
|
16
|
+
"idempotencyKey": "r3-holding-create-01",
|
|
17
|
+
"kind": "holding.create.v2",
|
|
18
|
+
"payload": {
|
|
19
|
+
"accountId": "30000000-0000-4000-8000-000000000003",
|
|
20
|
+
"holding": {
|
|
21
|
+
"currency": "CNY",
|
|
22
|
+
"instrumentRef": "ETF-EXAMPLE-001",
|
|
23
|
+
"name": "Global Equity ETF",
|
|
24
|
+
"quality": "confirmed",
|
|
25
|
+
"quantity": "12.345678901234",
|
|
26
|
+
"quantityAsOf": "2026-09-01T08:00:00.000Z",
|
|
27
|
+
"source": {
|
|
28
|
+
"channel": "cli",
|
|
29
|
+
"clientId": "choosefire-cli"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"holdingId": "70000000-0000-4000-8000-000000000001"
|
|
33
|
+
},
|
|
34
|
+
"source": {
|
|
35
|
+
"channel": "cli",
|
|
36
|
+
"clientId": "choosefire-cli"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"method": "POST",
|
|
40
|
+
"path": "/choosefire/v2/workspace/holdings",
|
|
41
|
+
"schema": "HoldingCreateCommandV2"
|
|
42
|
+
},
|
|
43
|
+
"response": {
|
|
44
|
+
"body": {
|
|
45
|
+
"code": 0,
|
|
46
|
+
"data": {
|
|
47
|
+
"affectedObjects": [
|
|
48
|
+
{
|
|
49
|
+
"objectId": "70000000-0000-4000-8000-000000000001",
|
|
50
|
+
"objectType": "holding"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"baseWorkspaceVersion": 4,
|
|
54
|
+
"commandId": "71000000-0000-4000-8000-000000000001",
|
|
55
|
+
"committedAt": "2026-09-01T08:00:00.000Z",
|
|
56
|
+
"cursor": "eyJraW5kIjoicjNfaG9sZGluZ19jdXJzb3IifQ.signature",
|
|
57
|
+
"kind": "command_receipt.v2",
|
|
58
|
+
"projectionHints": [
|
|
59
|
+
"asset_account.detail.v2",
|
|
60
|
+
"workspace.summary.v2"
|
|
61
|
+
],
|
|
62
|
+
"receiptId": "72000000-0000-4000-8000-000000000001",
|
|
63
|
+
"replayed": false,
|
|
64
|
+
"resultWorkspaceVersion": 5,
|
|
65
|
+
"status": "committed"
|
|
66
|
+
},
|
|
67
|
+
"kind": "family_wealth_success.v2",
|
|
68
|
+
"status": "success",
|
|
69
|
+
"success": true
|
|
70
|
+
},
|
|
71
|
+
"httpStatus": 200,
|
|
72
|
+
"schema": "CommandSuccessV2"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"actorRole": "owner",
|
|
77
|
+
"caseId": "R3-HOLDING-UPDATE-001",
|
|
78
|
+
"expectedAssertions": [
|
|
79
|
+
"holding update requires both workspace and object revisions"
|
|
80
|
+
],
|
|
81
|
+
"fixtureId": "CFW-FIX-003",
|
|
82
|
+
"request": {
|
|
83
|
+
"body": {
|
|
84
|
+
"commandId": "71000000-0000-4000-8000-000000000002",
|
|
85
|
+
"expectedObjectRevision": 1,
|
|
86
|
+
"expectedWorkspaceVersion": 5,
|
|
87
|
+
"idempotencyKey": "r3-holding-update-02",
|
|
88
|
+
"kind": "holding.update.v2",
|
|
89
|
+
"payload": {
|
|
90
|
+
"holding": {
|
|
91
|
+
"currency": "CNY",
|
|
92
|
+
"instrumentRef": "ETF-EXAMPLE-001",
|
|
93
|
+
"name": "Global Equity ETF",
|
|
94
|
+
"quality": "estimated",
|
|
95
|
+
"quantity": "13.5",
|
|
96
|
+
"quantityAsOf": "2026-09-01T08:00:00.000Z",
|
|
97
|
+
"source": {
|
|
98
|
+
"channel": "cli",
|
|
99
|
+
"clientId": "choosefire-cli"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"holdingId": "70000000-0000-4000-8000-000000000001"
|
|
103
|
+
},
|
|
104
|
+
"source": {
|
|
105
|
+
"channel": "cli",
|
|
106
|
+
"clientId": "choosefire-cli"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"method": "PUT",
|
|
110
|
+
"path": "/choosefire/v2/workspace/holdings",
|
|
111
|
+
"schema": "HoldingUpdateCommandV2"
|
|
112
|
+
},
|
|
113
|
+
"response": {
|
|
114
|
+
"body": {
|
|
115
|
+
"code": 0,
|
|
116
|
+
"data": {
|
|
117
|
+
"affectedObjects": [
|
|
118
|
+
{
|
|
119
|
+
"objectId": "70000000-0000-4000-8000-000000000001",
|
|
120
|
+
"objectType": "holding"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"baseWorkspaceVersion": 5,
|
|
124
|
+
"commandId": "71000000-0000-4000-8000-000000000002",
|
|
125
|
+
"committedAt": "2026-09-01T08:00:00.000Z",
|
|
126
|
+
"cursor": "eyJraW5kIjoicjNfaG9sZGluZ19jdXJzb3IifQ.signature",
|
|
127
|
+
"kind": "command_receipt.v2",
|
|
128
|
+
"projectionHints": [
|
|
129
|
+
"asset_account.detail.v2",
|
|
130
|
+
"workspace.summary.v2"
|
|
131
|
+
],
|
|
132
|
+
"receiptId": "72000000-0000-4000-8000-000000000002",
|
|
133
|
+
"replayed": false,
|
|
134
|
+
"resultWorkspaceVersion": 6,
|
|
135
|
+
"status": "committed"
|
|
136
|
+
},
|
|
137
|
+
"kind": "family_wealth_success.v2",
|
|
138
|
+
"status": "success",
|
|
139
|
+
"success": true
|
|
140
|
+
},
|
|
141
|
+
"httpStatus": 200,
|
|
142
|
+
"schema": "CommandSuccessV2"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"actorRole": "owner",
|
|
147
|
+
"caseId": "R3-HOLDING-ARCHIVE-001",
|
|
148
|
+
"expectedAssertions": [
|
|
149
|
+
"holding removal archives history instead of deleting it"
|
|
150
|
+
],
|
|
151
|
+
"fixtureId": "CFW-FIX-003",
|
|
152
|
+
"request": {
|
|
153
|
+
"body": {
|
|
154
|
+
"commandId": "71000000-0000-4000-8000-000000000003",
|
|
155
|
+
"expectedObjectRevision": 2,
|
|
156
|
+
"expectedWorkspaceVersion": 6,
|
|
157
|
+
"idempotencyKey": "r3-holding-archive-03",
|
|
158
|
+
"kind": "holding.archive.v2",
|
|
159
|
+
"payload": {
|
|
160
|
+
"holdingId": "70000000-0000-4000-8000-000000000001",
|
|
161
|
+
"reason": "Position closed"
|
|
162
|
+
},
|
|
163
|
+
"source": {
|
|
164
|
+
"channel": "cli",
|
|
165
|
+
"clientId": "choosefire-cli"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"method": "POST",
|
|
169
|
+
"path": "/choosefire/v2/workspace/holdings/archive",
|
|
170
|
+
"schema": "HoldingArchiveCommandV2"
|
|
171
|
+
},
|
|
172
|
+
"response": {
|
|
173
|
+
"body": {
|
|
174
|
+
"code": 0,
|
|
175
|
+
"data": {
|
|
176
|
+
"affectedObjects": [
|
|
177
|
+
{
|
|
178
|
+
"objectId": "70000000-0000-4000-8000-000000000001",
|
|
179
|
+
"objectType": "holding"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"baseWorkspaceVersion": 6,
|
|
183
|
+
"commandId": "71000000-0000-4000-8000-000000000003",
|
|
184
|
+
"committedAt": "2026-09-01T08:00:00.000Z",
|
|
185
|
+
"cursor": "eyJraW5kIjoicjNfaG9sZGluZ19jdXJzb3IifQ.signature",
|
|
186
|
+
"kind": "command_receipt.v2",
|
|
187
|
+
"projectionHints": [
|
|
188
|
+
"asset_account.detail.v2",
|
|
189
|
+
"workspace.summary.v2"
|
|
190
|
+
],
|
|
191
|
+
"receiptId": "72000000-0000-4000-8000-000000000003",
|
|
192
|
+
"replayed": false,
|
|
193
|
+
"resultWorkspaceVersion": 7,
|
|
194
|
+
"status": "committed"
|
|
195
|
+
},
|
|
196
|
+
"kind": "family_wealth_success.v2",
|
|
197
|
+
"status": "success",
|
|
198
|
+
"success": true
|
|
199
|
+
},
|
|
200
|
+
"httpStatus": 200,
|
|
201
|
+
"schema": "CommandSuccessV2"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"actorRole": "owner",
|
|
206
|
+
"caseId": "R3-ACCOUNT-DETAIL-001",
|
|
207
|
+
"expectedAssertions": [
|
|
208
|
+
"account detail returns bounded active holdings",
|
|
209
|
+
"holding classification explicitly reports account inheritance"
|
|
210
|
+
],
|
|
211
|
+
"fixtureId": "CFW-FIX-003",
|
|
212
|
+
"request": {
|
|
213
|
+
"body": null,
|
|
214
|
+
"method": "GET",
|
|
215
|
+
"path": "/choosefire/v2/workspace/asset-accounts/30000000-0000-4000-8000-000000000003",
|
|
216
|
+
"schema": null
|
|
217
|
+
},
|
|
218
|
+
"response": {
|
|
219
|
+
"body": {
|
|
220
|
+
"code": 0,
|
|
221
|
+
"data": {
|
|
222
|
+
"account": {
|
|
223
|
+
"accountId": "30000000-0000-4000-8000-000000000003",
|
|
224
|
+
"accountType": "brokerage",
|
|
225
|
+
"aggregationConsent": true,
|
|
226
|
+
"assetClasses": [
|
|
227
|
+
{
|
|
228
|
+
"basisPoints": 10000,
|
|
229
|
+
"code": "equity"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"classificationRevision": 0,
|
|
233
|
+
"currency": "CNY",
|
|
234
|
+
"maintenanceMode": "detailed",
|
|
235
|
+
"name": "Brokerage Account",
|
|
236
|
+
"ownerSubjectId": "20000000-0000-4000-8000-000000000010",
|
|
237
|
+
"purposeBuckets": [
|
|
238
|
+
{
|
|
239
|
+
"basisPoints": 10000,
|
|
240
|
+
"code": "long_term_investing"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"revision": 1,
|
|
244
|
+
"valuation": {
|
|
245
|
+
"asOf": null,
|
|
246
|
+
"freshness": "missing",
|
|
247
|
+
"quality": "unknown",
|
|
248
|
+
"value": null
|
|
249
|
+
},
|
|
250
|
+
"visibility": "household"
|
|
251
|
+
},
|
|
252
|
+
"asOf": "2026-09-01T08:00:00.000Z",
|
|
253
|
+
"authority": {
|
|
254
|
+
"householdId": "20000000-0000-4000-8000-000000000001",
|
|
255
|
+
"role": "owner",
|
|
256
|
+
"workspaceId": "20000000-0000-4000-8000-000000000002"
|
|
257
|
+
},
|
|
258
|
+
"contractVersion": 2,
|
|
259
|
+
"holdings": [
|
|
260
|
+
{
|
|
261
|
+
"accountId": "30000000-0000-4000-8000-000000000003",
|
|
262
|
+
"assetClasses": [
|
|
263
|
+
{
|
|
264
|
+
"basisPoints": 10000,
|
|
265
|
+
"code": "equity"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"classificationRevision": 0,
|
|
269
|
+
"classificationSource": "account_default",
|
|
270
|
+
"currency": "CNY",
|
|
271
|
+
"holdingId": "70000000-0000-4000-8000-000000000001",
|
|
272
|
+
"instrumentRef": "ETF-EXAMPLE-001",
|
|
273
|
+
"name": "Global Equity ETF",
|
|
274
|
+
"purposeBuckets": [
|
|
275
|
+
{
|
|
276
|
+
"basisPoints": 10000,
|
|
277
|
+
"code": "long_term_investing"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"quality": "confirmed",
|
|
281
|
+
"quantity": "12.345678901234",
|
|
282
|
+
"quantityAsOf": "2026-09-01T08:00:00.000Z",
|
|
283
|
+
"revision": 2,
|
|
284
|
+
"source": {
|
|
285
|
+
"channel": "cli",
|
|
286
|
+
"clientId": "choosefire-cli"
|
|
287
|
+
},
|
|
288
|
+
"valuation": {
|
|
289
|
+
"asOf": null,
|
|
290
|
+
"freshness": "missing",
|
|
291
|
+
"quality": "unknown",
|
|
292
|
+
"value": null
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"kind": "asset_account.detail.v2",
|
|
297
|
+
"projectionVersion": 1,
|
|
298
|
+
"workspaceVersion": 6
|
|
299
|
+
},
|
|
300
|
+
"kind": "family_wealth_success.v2",
|
|
301
|
+
"status": "success",
|
|
302
|
+
"success": true
|
|
303
|
+
},
|
|
304
|
+
"httpStatus": 200,
|
|
305
|
+
"schema": "AssetAccountDetailSuccessV2"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"kind": "choosefire_r3_holdings_golden.v1",
|
|
310
|
+
"milestone": "R3"
|
|
311
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"aggregateSha256": "
|
|
2
|
+
"aggregateSha256": "47c847f78839999c2927f21079c304910875123aabeaa03c707da991a54c6426",
|
|
3
3
|
"artifacts": [
|
|
4
4
|
{
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 12272,
|
|
6
6
|
"path": "capability-matrix.v1.json",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "9bb97456779d37329377ab4e4477ad86d89b5509e5b3f257eb85cffa1f64a641"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"bytes": 1974,
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"path": "golden/r2-contract.v1.json",
|
|
17
17
|
"sha256": "300968d22c1b983d9a292e15852e063c30fc59c7ddd1f68381178407ae9e5233"
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"bytes": 10259,
|
|
21
|
+
"path": "golden/r3-holdings.v1.json",
|
|
22
|
+
"sha256": "749bd2c5c6d5ccf8ae1f3ca9abc5c6439b8fe9a420c096d52eaa18de81447623"
|
|
23
|
+
},
|
|
19
24
|
{
|
|
20
25
|
"bytes": 6348,
|
|
21
26
|
"path": "golden/scenarios.v1.json",
|
|
@@ -27,14 +32,14 @@
|
|
|
27
32
|
"sha256": "a956ab303c2b35720c8328649170a8e0c18ea37a36d98614b46adfc56f5c51cc"
|
|
28
33
|
},
|
|
29
34
|
{
|
|
30
|
-
"bytes":
|
|
35
|
+
"bytes": 86637,
|
|
31
36
|
"path": "openapi.generated.json",
|
|
32
|
-
"sha256": "
|
|
37
|
+
"sha256": "81cc1b651cb2faf443b2fa99e2c5e66c6fed591abb70cc3fe1ff47eca0f37542"
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
|
-
"bytes":
|
|
40
|
+
"bytes": 62208,
|
|
36
41
|
"path": "runtime-schemas/family-wealth.v2.schema.json",
|
|
37
|
-
"sha256": "
|
|
42
|
+
"sha256": "ffbfa2d5ee32f38ccf2d7d3a2170fa55488c0fb1401b1605f88b03855636dea9"
|
|
38
43
|
},
|
|
39
44
|
{
|
|
40
45
|
"bytes": 700,
|