@genobank/biofs 2.4.1 → 2.5.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE +37 -0
  3. package/README.md +2 -1
  4. package/bin/biofs.js +2 -1
  5. package/contracts/ClaraJobNFT.sol +101 -0
  6. package/dist/commands/agent/health.js +1 -1
  7. package/dist/commands/agent/health.js.map +1 -1
  8. package/dist/commands/agent/list.d.ts +14 -0
  9. package/dist/commands/agent/list.d.ts.map +1 -0
  10. package/dist/commands/agent/list.js +101 -0
  11. package/dist/commands/agent/list.js.map +1 -0
  12. package/dist/commands/agent/register.d.ts +18 -0
  13. package/dist/commands/agent/register.d.ts.map +1 -0
  14. package/dist/commands/agent/register.js +120 -0
  15. package/dist/commands/agent/register.js.map +1 -0
  16. package/dist/commands/agent/status.d.ts +14 -0
  17. package/dist/commands/agent/status.d.ts.map +1 -0
  18. package/dist/commands/agent/status.js +151 -0
  19. package/dist/commands/agent/status.js.map +1 -0
  20. package/dist/commands/annotate/status.d.ts +11 -0
  21. package/dist/commands/annotate/status.d.ts.map +1 -0
  22. package/dist/commands/annotate/status.js +123 -0
  23. package/dist/commands/annotate/status.js.map +1 -0
  24. package/dist/commands/annotate/submit.d.ts +23 -0
  25. package/dist/commands/annotate/submit.d.ts.map +1 -0
  26. package/dist/commands/annotate/submit.js +296 -0
  27. package/dist/commands/annotate/submit.js.map +1 -0
  28. package/dist/commands/family-status.d.ts +12 -0
  29. package/dist/commands/family-status.d.ts.map +1 -0
  30. package/dist/commands/family-status.js +220 -0
  31. package/dist/commands/family-status.js.map +1 -0
  32. package/dist/commands/job/status.d.ts +1 -0
  33. package/dist/commands/job/status.d.ts.map +1 -1
  34. package/dist/commands/job/status.js.map +1 -1
  35. package/dist/commands/link-clara.d.ts +20 -0
  36. package/dist/commands/link-clara.d.ts.map +1 -0
  37. package/dist/commands/link-clara.js +234 -0
  38. package/dist/commands/link-clara.js.map +1 -0
  39. package/dist/commands/mount-remote.d.ts +1 -1
  40. package/dist/commands/mount-remote.js +1 -1
  41. package/dist/commands/payment/balance.d.ts +12 -0
  42. package/dist/commands/payment/balance.d.ts.map +1 -0
  43. package/dist/commands/payment/balance.js +101 -0
  44. package/dist/commands/payment/balance.js.map +1 -0
  45. package/dist/commands/payment/faucet.d.ts +11 -0
  46. package/dist/commands/payment/faucet.d.ts.map +1 -0
  47. package/dist/commands/payment/faucet.js +92 -0
  48. package/dist/commands/payment/faucet.js.map +1 -0
  49. package/dist/commands/payment/history.d.ts +27 -0
  50. package/dist/commands/payment/history.d.ts.map +1 -0
  51. package/dist/commands/payment/history.js +162 -0
  52. package/dist/commands/payment/history.js.map +1 -0
  53. package/dist/commands/payment/pricing.d.ts +12 -0
  54. package/dist/commands/payment/pricing.d.ts.map +1 -0
  55. package/dist/commands/payment/pricing.js +65 -0
  56. package/dist/commands/payment/pricing.js.map +1 -0
  57. package/dist/commands/payment/setup.d.ts +25 -0
  58. package/dist/commands/payment/setup.d.ts.map +1 -0
  59. package/dist/commands/payment/setup.js +155 -0
  60. package/dist/commands/payment/setup.js.map +1 -0
  61. package/dist/commands/tokenize-biosample.d.ts +19 -0
  62. package/dist/commands/tokenize-biosample.d.ts.map +1 -0
  63. package/dist/commands/tokenize-biosample.js +253 -0
  64. package/dist/commands/tokenize-biosample.js.map +1 -0
  65. package/dist/index.js +281 -13
  66. package/dist/index.js.map +1 -1
  67. package/dist/lib/api/bionft-client.d.ts +35 -7
  68. package/dist/lib/api/bionft-client.d.ts.map +1 -1
  69. package/dist/lib/api/bionft-client.js +106 -16
  70. package/dist/lib/api/bionft-client.js.map +1 -1
  71. package/dist/lib/kite/agent.d.ts +85 -0
  72. package/dist/lib/kite/agent.d.ts.map +1 -0
  73. package/dist/lib/kite/agent.js +332 -0
  74. package/dist/lib/kite/agent.js.map +1 -0
  75. package/dist/lib/kite/index.d.ts +9 -0
  76. package/dist/lib/kite/index.d.ts.map +1 -0
  77. package/dist/lib/kite/index.js +25 -0
  78. package/dist/lib/kite/index.js.map +1 -0
  79. package/dist/lib/kite/passport.d.ts +69 -0
  80. package/dist/lib/kite/passport.d.ts.map +1 -0
  81. package/dist/lib/kite/passport.js +312 -0
  82. package/dist/lib/kite/passport.js.map +1 -0
  83. package/dist/lib/x402/client.d.ts +78 -0
  84. package/dist/lib/x402/client.d.ts.map +1 -0
  85. package/dist/lib/x402/client.js +298 -0
  86. package/dist/lib/x402/client.js.map +1 -0
  87. package/dist/lib/x402/index.d.ts +9 -0
  88. package/dist/lib/x402/index.d.ts.map +1 -0
  89. package/dist/lib/x402/index.js +37 -0
  90. package/dist/lib/x402/index.js.map +1 -0
  91. package/dist/lib/x402/middleware.d.ts +37 -0
  92. package/dist/lib/x402/middleware.d.ts.map +1 -0
  93. package/dist/lib/x402/middleware.js +220 -0
  94. package/dist/lib/x402/middleware.js.map +1 -0
  95. package/dist/types/kite.d.ts +157 -0
  96. package/dist/types/kite.d.ts.map +1 -0
  97. package/dist/types/kite.js +107 -0
  98. package/dist/types/kite.js.map +1 -0
  99. package/dist/types/x402.d.ts +78 -0
  100. package/dist/types/x402.d.ts.map +1 -0
  101. package/dist/types/x402.js +79 -0
  102. package/dist/types/x402.js.map +1 -0
  103. package/docs/AI_AGENT_MCP_MANUAL.md +1029 -0
  104. package/docs/USER_MANUAL.md +603 -0
  105. package/docs/technical-details.html +555 -0
  106. package/lib/bionfs-client.js +2 -0
  107. package/lib/consent-manager.js +2 -0
  108. package/lib/consent-prompt.js +2 -0
  109. package/package.json +9 -3
  110. package/presentation/biofs-x402-kite-presentation.html +813 -0
  111. package/scripts/build_annotator_dictionary.py +1 -0
  112. package/scripts/deploy-clara-nft.js +37 -0
  113. package/test-complete-flow.sh +1 -1
  114. package/test.vcf +1 -0
  115. package/test_23andme.txt +1 -0
  116. package/ADMIN_REGISTER_LAB.md +0 -252
  117. package/ANNOTATOR_RECOMMENDATIONS_API.md +0 -490
  118. package/BIOFS_QUICK_START.md +0 -200
  119. package/BIOFS_TOKENIZE_COMPLETE.md +0 -541
  120. package/BIOFS_V1.2.7_PUBLISHED.md +0 -317
  121. package/BIOFS_V1.2.9_FIXES.md +0 -306
  122. package/BIOFS_V1.3.0_DIRECT_GRANT.md +0 -381
  123. package/BIOFS_V1.3.1_GRANTED_FILES.md +0 -328
  124. package/BIONFS_DEPLOYMENT_GUIDE.md +0 -408
  125. package/BIONFS_MOUNT_INTEGRATION_PLAN.md +0 -415
  126. package/BIONFS_PROTOCOL_SPECIFICATION.md +0 -688
  127. package/BIONFS_SEQUENTIAS_INTEGRATION.md +0 -457
  128. package/BIONFT_GATED_REMOTE_MOUNTING.md +0 -1260
  129. package/BIONFT_NFS_PROTOCOL_ARCHITECTURE.md +0 -583
  130. package/BIOOS_CLI_IMPLEMENTATION_COMPLETE.md +0 -422
  131. package/BIOOS_JOB_MANAGEMENT.md +0 -681
  132. package/BUGFIX_V2.1.3.md +0 -72
  133. package/CHANGELOG_V2.1.0.md +0 -386
  134. package/CHANGELOG_V2.2.0.md +0 -284
  135. package/ENHANCEMENT_DOCUMENTATION.md +0 -218
  136. package/GDPR_BIONFS_CONSENT_ARCHITECTURE.md +0 -798
  137. package/GDPR_BIONFS_IMPLEMENTATION_STATUS.md +0 -462
  138. package/INSTALL_V1.2.7_ON_MAC.md +0 -306
  139. package/LABNFT_BIOFS_INTEGRATION.md +0 -396
  140. package/OPENCRAVAT_ANNOTATORS_REFERENCE.md +0 -340
  141. package/OPENCRAVAT_ANNOTATOR_INTELLIGENCE_COMPLETE.md +0 -479
  142. package/QUICK_START_V2.1.0.md +0 -116
  143. package/RELEASE_SUMMARY_V1.2.7.md +0 -479
  144. package/RELEASE_SUMMARY_V1.3.0.md +0 -324
  145. package/SEQUENTIAS_PROTOCOL_ARCHITECTURE.md +0 -880
  146. package/SEQUENTIA_MIGRATION_GUIDE.md +0 -337
  147. package/SESSION_SUMMARY_DIRECT_GRANT.md +0 -321
  148. package/ULTRATHINK_BIONFS_COMPLETE.md +0 -458
  149. package/WEB3FUSE_LICENSE_TOKEN_ANALYSIS.md +0 -494
  150. package/WHERE_PERMISSIONS_LIVE.md +0 -165
  151. package/config.json +0 -21
  152. package/opencravat_annotators_dictionary.json +0 -2356
  153. package/package.json.working.v1.9.2.20251105_023952 +0 -48
@@ -1,324 +0,0 @@
1
- # BioFS v1.3.0 Release Summary
2
-
3
- ## ✅ Successfully Published to npm
4
-
5
- **Package**: `@genobank/biofs@1.3.0`
6
- **Published**: October 7, 2025
7
- **npm URL**: https://www.npmjs.com/package/@genobank/biofs
8
- **Package Size**: 167.3 kB (unpacked: 763.9 kB)
9
-
10
- ## Major Feature: Direct Grant Access Control
11
-
12
- ### What Changed
13
-
14
- **NEW**: IP asset owners can now grant access to researchers **directly** without requiring them to request access first.
15
-
16
- ### Both Access Flows Now Supported
17
-
18
- #### 1. Direct Grant (NEW) ✨
19
- ```bash
20
- # Owner grants access directly (no request needed)
21
- biofs access grant <ip_id> <researcher_wallet>
22
-
23
- # Example:
24
- biofs access grant 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7 0xb3c3a584491b8ca4df45116a1e250098a0d6192d
25
-
26
- # Output shows:
27
- Grant Type: Direct Grant (owner-initiated)
28
- ```
29
-
30
- #### 2. Request-Based Grant (Existing)
31
- ```bash
32
- # Researcher requests access
33
- biofs access request <ip_id>
34
-
35
- # Owner approves
36
- biofs access grant <ip_id> <researcher_wallet>
37
-
38
- # Output shows:
39
- Grant Type: Request-Based (researcher-requested)
40
- ```
41
-
42
- ### Smart Fallback Mechanism
43
-
44
- The CLI automatically tries the best flow:
45
- 1. **Tries direct grant first** (no request needed)
46
- 2. **Falls back to request-based** if request exists
47
- 3. **Clear error messages** if both fail
48
-
49
- ## Installation
50
-
51
- ### New Install
52
- ```bash
53
- npm install -g @genobank/biofs@1.3.0
54
- biofs --version # Should show: 1.3.0
55
- ```
56
-
57
- ### Update from Previous Version
58
- ```bash
59
- npm update -g @genobank/biofs
60
- biofs --version # Should show: 1.3.0
61
- ```
62
-
63
- ## Testing the Feature
64
-
65
- ### Live Test Results ✅
66
-
67
- Successfully tested on production server:
68
-
69
- ```bash
70
- # 1. Listed server's BioIP files
71
- ./bin/biofs.js files --json
72
- # Found: 17 BioIP files owned by 0x5f5a60EaEf242c0D51A21c703f520347b96Ed19a
73
-
74
- # 2. Granted direct access to Dra. Claudia
75
- ./bin/biofs.js access grant 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7 0xb3c3a584491b8ca4df45116a1e250098a0d6192d
76
-
77
- # Result:
78
- ══════════════════════════════════════════════════════════════════
79
- License Token Grant Confirmation (GDPR Consent)
80
- ══════════════════════════════════════════════════════════════════
81
- Grant Type: Direct Grant (owner-initiated)
82
- IP Asset ID: 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7
83
- Granted To: 0xb3c3a584491b8ca4df45116a1e250098a0d6192d
84
- License Type: Non-Commercial (GDPR Research Consent)
85
- ══════════════════════════════════════════════════════════════════
86
-
87
- # 3. Verified grant in access list
88
- ./bin/biofs.js access list 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7
89
-
90
- # Shows:
91
- ┌─────────────────────────────────────────────┬────────────────────┬───────────────┬────────────┬───────────────┐
92
- │ Researcher Wallet │ License Type │ Date │ Status │ Token ID │
93
- ├─────────────────────────────────────────────┼────────────────────┼───────────────┼────────────┼───────────────┤
94
- │ 0xb3c3a584491b8ca4df45116a1e250098a0d6192d │ GDPR Research │ 10/7/2025 │ active │ 40249 │
95
- └─────────────────────────────────────────────┴────────────────────┴───────────────┴────────────┴───────────────┘
96
-
97
- ✅ License token ID 40249 successfully minted on blockchain
98
- ✅ Dra. Claudia can now access the file
99
- ```
100
-
101
- ## Files Modified
102
-
103
- ### Frontend (CLI)
104
- 1. **`src/lib/api/client.ts`** - Added `directGrantLicenseToken()` method
105
- 2. **`src/commands/access/grant.ts`** - Smart fallback: try direct grant → request-based
106
- 3. **`package.json`** - Version 1.2.9 → 1.3.0
107
- 4. **`src/index.ts`** - Version and banner updated
108
-
109
- ### Backend (API)
110
- 1. **`plugins/bioip/api_bioip.py`** - Added `direct_grant_license_token()` endpoint
111
- 2. **Production API restarted** - New endpoint now live
112
-
113
- ### Documentation
114
- 1. **`BIOFS_V1.3.0_DIRECT_GRANT.md`** - Comprehensive feature documentation
115
- 2. **`RELEASE_SUMMARY_V1.3.0.md`** - This release summary
116
-
117
- ## API Changes
118
-
119
- ### New Endpoint
120
-
121
- **POST** `/api_bioip/direct_grant_license_token`
122
-
123
- **Request:**
124
- ```json
125
- {
126
- "user_signature": "0x...",
127
- "ip_id": "0x...",
128
- "receiver_wallet": "0x...",
129
- "license_type": "non-commercial"
130
- }
131
- ```
132
-
133
- **Response:**
134
- ```json
135
- {
136
- "status": "Success",
137
- "status_details": {
138
- "data": {
139
- "license_token_id": 40249,
140
- "tx_hash": "0x...",
141
- "ip_id": "0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7",
142
- "receiver": "0xb3c3a584491b8ca4df45116a1e250098a0d6192d",
143
- "owner": "0x5f5a60EaEf242c0D51A21c703f520347b96Ed19a",
144
- "license_type": "non-commercial",
145
- "grant_type": "direct",
146
- "message": "Direct access granted! 0xb3c3a584... can now access the data"
147
- }
148
- }
149
- }
150
- ```
151
-
152
- ### New Client Method
153
-
154
- **TypeScript:**
155
- ```typescript
156
- async directGrantLicenseToken(
157
- ipId: string,
158
- receiverWallet: string,
159
- licenseType: string = 'non-commercial'
160
- ): Promise<any> {
161
- const signature = await this.getSignature();
162
- const response = await this.axios.post('/api_bioip/direct_grant_license_token', {
163
- user_signature: signature,
164
- ip_id: ipId,
165
- receiver_wallet: receiverWallet,
166
- license_type: licenseType
167
- });
168
-
169
- if (response.data.status === 'Success') {
170
- return response.data.status_details?.data || response.data;
171
- }
172
- throw new Error(response.data.status_details?.message || 'Direct grant failed');
173
- }
174
- ```
175
-
176
- ## MongoDB Changes
177
-
178
- ### New Field: `grant_type`
179
-
180
- License tokens now track how they were created:
181
-
182
- ```json
183
- {
184
- "_id": ObjectId("..."),
185
- "ip_id": "0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7",
186
- "sender": "0x5f5a60EaEf242c0D51A21c703f520347b96Ed19a",
187
- "receiver": "0xb3c3a584491b8ca4df45116a1e250098a0d6192d",
188
- "license_token_id": 40249,
189
- "tx_hash": "0x...",
190
- "status": "active",
191
- "grant_type": "direct", // NEW: "direct" or "request-based"
192
- "created_at": ISODate("2025-10-07T01:15:00Z")
193
- }
194
- ```
195
-
196
- ## Use Cases
197
-
198
- ### 1. Collaborative Research
199
- PI shares genomic data with collaborators without requiring requests:
200
- ```bash
201
- biofs access grant 0xMyDataset 0xCollaborator1
202
- biofs access grant 0xMyDataset 0xCollaborator2
203
- biofs access grant 0xMyDataset 0xCollaborator3
204
- ```
205
-
206
- ### 2. Teaching & Workshops
207
- Instructor shares datasets with students:
208
- ```bash
209
- for wallet in $(cat student_wallets.txt); do
210
- biofs access grant 0xTeachingDataset $wallet
211
- done
212
- ```
213
-
214
- ### 3. Consortium Data Sharing
215
- Consortium lead shares aggregated data with all member institutions:
216
- ```bash
217
- biofs access grant 0xConsortiumData 0xInstitution1
218
- biofs access grant 0xConsortiumData 0xInstitution2
219
- # ... (continues for all members)
220
- ```
221
-
222
- ### 4. Traditional Request Flow
223
- Researcher discovers public dataset and requests access:
224
- ```bash
225
- # Researcher: request access
226
- biofs access request 0xPublicDataset
227
-
228
- # Owner: approve request
229
- biofs access grant 0xPublicDataset 0xResearcher
230
- # Output: "Grant Type: Request-Based (researcher-requested)"
231
- ```
232
-
233
- ## Security & Compliance
234
-
235
- ### Access Control ✅
236
- - **Ownership Verification**: Only IP asset owner can grant (both flows)
237
- - **Blockchain Enforcement**: All grants = Story Protocol license tokens
238
- - **Revocation Supported**: `biofs access revoke` works for both flows
239
-
240
- ### GDPR Compliance ✅
241
- - **Right to Erasure**: Revoke license token = revoke data access
242
- - **Consent Management**: License tokens = GDPR consent mechanism
243
- - **Audit Trail**: MongoDB records all grants with timestamps and grant_type
244
-
245
- ## Backward Compatibility ✅
246
-
247
- **Fully Backward Compatible**:
248
- - ✅ Existing request-based flow unchanged
249
- - ✅ Old CLI versions still work (just lack direct grant)
250
- - ✅ MongoDB queries unchanged (grant_type is optional)
251
- - ✅ API endpoints are additive (no breaking changes)
252
-
253
- ## Breaking Changes
254
-
255
- **None**. This is a purely additive feature.
256
-
257
- ## Version History
258
-
259
- - **v1.3.0** (Oct 7, 2025): ✨ Added direct grant access control
260
- - **v1.2.9** (Oct 7, 2025): Fixed ESM warnings, added verbose mode
261
- - **v1.2.8** (Oct 7, 2025): Version banner fix
262
- - **v1.2.7** (Oct 7, 2025): Added annotator intelligence
263
- - **v1.2.6** (Oct 5, 2025): Added BioOS job management
264
-
265
- ## Support
266
-
267
- - **npm Package**: https://www.npmjs.com/package/@genobank/biofs
268
- - **GitHub**: https://github.com/Genobank/genobank-cli
269
- - **Documentation**: See `BIOFS_V1.3.0_DIRECT_GRANT.md`
270
- - **Support**: support@genobank.io
271
-
272
- ## Next Steps for Users
273
-
274
- ### Dra. Claudia (Researcher)
275
-
276
- 1. **Update to v1.3.0**:
277
- ```bash
278
- npm install -g @genobank/biofs@1.3.0
279
- biofs --version # Should show: 1.3.0
280
- ```
281
-
282
- 2. **Authenticate**:
283
- ```bash
284
- biofs login # Use wallet: 0xb3c3a584491b8ca4df45116a1e250098a0d6192d
285
- ```
286
-
287
- 3. **Verify Access**:
288
- ```bash
289
- biofs files
290
- # Should now show: 55052008714000.deepvariant.vcf
291
- ```
292
-
293
- 4. **Download File**:
294
- ```bash
295
- biofs download 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7 ./my-analysis/
296
- # File downloads successfully!
297
- ```
298
-
299
- ### IP Asset Owners
300
-
301
- 1. **Share Data Proactively**:
302
- ```bash
303
- # No longer need to wait for requests!
304
- biofs access grant <your_ip_id> <researcher_wallet>
305
- ```
306
-
307
- 2. **View All Grants**:
308
- ```bash
309
- biofs access list <your_ip_id>
310
- # Shows all granted wallets with grant type
311
- ```
312
-
313
- 3. **Revoke Access**:
314
- ```bash
315
- biofs access revoke <your_ip_id> <researcher_wallet> --yes
316
- # GDPR right to erasure
317
- ```
318
-
319
- ---
320
-
321
- **Status**: ✅ Published, tested, and ready for production use
322
- **Key Feature**: Direct Grant enables owner-initiated data sharing
323
- **Impact**: Simplifies collaborative research workflows
324
- **Compliance**: Fully GDPR compliant with right to erasure support