@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,462 +0,0 @@
1
- # ๐Ÿ”’ GDPR-Compliant BioNFS Implementation Status
2
-
3
- ## โœ… COMPLETED: Core Libraries
4
-
5
- ### 1. Consent Manager (`lib/consent-manager.js`)
6
- **Purpose:** Manages GDPR consent records via API
7
-
8
- **Features:**
9
- - โœ… Check if user has already given consent
10
- - โœ… Record new consent after user agrees
11
- - โœ… Revoke consent for IP assets
12
- - โœ… Get all consent records for wallet
13
-
14
- **API Integration:**
15
- - `POST /bionfs/v1/verify_consent` - Check consent status
16
- - `POST /bionfs/v1/record_consent` - Record consent
17
- - `POST /bionfs/v1/revoke_consent` - Revoke consent
18
- - `GET /bionfs/v1/my_consents` - List consents
19
-
20
- ---
21
-
22
- ### 2. Consent Prompt (`lib/consent-prompt.js`)
23
- **Purpose:** Display GDPR-compliant consent notice
24
-
25
- **Features:**
26
- - โœ… Shows file information (owner, license, IP asset)
27
- - โœ… Explains genomic data nature (GDPR Article 9)
28
- - โœ… Lists user rights (revoke, audit trail)
29
- - โœ… Shows license terms (non-commercial, attribution)
30
- - โœ… Records IP address and timestamp
31
- - โœ… Requires explicit "I AGREE" input
32
-
33
- **GDPR Compliance:**
34
- - โœ… Informed consent (user understands what they're accessing)
35
- - โœ… Explicit agreement (active "I AGREE" required)
36
- - โœ… Purpose limitation (stated purpose of access)
37
- - โœ… Right to withdraw (revoke command mentioned)
38
- - โœ… Audit trail (timestamp + IP logged)
39
-
40
- ---
41
-
42
- ### 3. BioNFS Client (`lib/bionfs-client.js`)
43
- **Purpose:** Stream files via BioNFS protocol
44
-
45
- **Features:**
46
- - โœ… Authenticate with BioNFS server
47
- - โœ… Stream files by IP Asset ID or BioCID
48
- - โœ… Fallback to direct API if BioNFS unavailable
49
- - โœ… Parse BioCID format
50
-
51
- **Streaming Methods:**
52
- 1. **BioNFS Protocol** (preferred):
53
- - Authenticate โ†’ Get session ID
54
- - Stream via `/bionfs/v1/stream/<ip_id>`
55
- - Uses session-based permissions
56
-
57
- 2. **Direct API** (fallback):
58
- - Download via `/api_bioip/download_granted_file`
59
- - Uses signature-based auth
60
-
61
- ---
62
-
63
- ## ๐Ÿšง IN PROGRESS: Command Integration
64
-
65
- ### Next Steps
66
-
67
- #### 1. Update Download Command
68
- **File:** `bin/biofs.js` (download command section)
69
-
70
- **Add:**
71
- ```javascript
72
- const ConsentManager = require('../lib/consent-manager');
73
- const ConsentPrompt = require('../lib/consent-prompt');
74
- const BioNFSClient = require('../lib/bionfs-client');
75
-
76
- // In download command:
77
- program
78
- .command('download')
79
- .action(async (biocid, destination, options) => {
80
- // 1. Load auth
81
- const { wallet, signature } = loadAuth();
82
-
83
- // 2. Resolve BioCID to file info
84
- const fileInfo = await resolveFile(biocid, signature);
85
-
86
- // 3. Check consent
87
- const consentManager = new ConsentManager();
88
- const hasConsent = await consentManager.hasConsent(
89
- wallet, fileInfo.ip_id, 'download', signature
90
- );
91
-
92
- if (!hasConsent) {
93
- // 4. Show GDPR consent notice
94
- const consentPrompt = new ConsentPrompt();
95
- fileInfo.wallet = wallet;
96
- const agreed = await consentPrompt.showConsentNotice(fileInfo, 'download');
97
-
98
- if (!agreed) {
99
- console.log('โŒ Consent declined');
100
- process.exit(1);
101
- }
102
-
103
- // 5. Record consent
104
- const ipAddress = await consentPrompt.getPublicIP();
105
- await consentManager.recordConsent(wallet, fileInfo, 'download', ipAddress, signature);
106
- }
107
-
108
- // 6. Download file
109
- const bionfs = new BioNFSClient();
110
- await bionfs.authenticate(wallet, signature);
111
- await bionfs.streamFile(fileInfo.ip_id, destination, signature);
112
-
113
- console.log('โœ… Downloaded:', destination);
114
- });
115
- ```
116
-
117
- #### 2. Add Mount Command
118
- **File:** `bin/biofs.js`
119
-
120
- **Add:**
121
- ```javascript
122
- program
123
- .command('mount')
124
- .argument('<mount-point>', 'Directory to mount files')
125
- .option('--read-only', 'Mount as read-only')
126
- .description('Mount all granted BioFiles to local directory')
127
- .action(async (mountPoint, options) => {
128
- // 1. Get all granted files
129
- const files = await api.getGrantedBioIPs(signature);
130
-
131
- // 2. Check/request consent for each
132
- for (const file of files) {
133
- const hasConsent = await consentManager.hasConsent(
134
- wallet, file.ip_id, 'mount', signature
135
- );
136
-
137
- if (!hasConsent) {
138
- const agreed = await consentPrompt.showConsentNotice(file, 'mount');
139
- if (agreed) {
140
- await consentManager.recordConsent(wallet, file, 'mount', ipAddress, signature);
141
- }
142
- }
143
- }
144
-
145
- // 3. Download all consented files
146
- fs.mkdirSync(mountPoint, { recursive: true });
147
- for (const file of files) {
148
- const localPath = path.join(mountPoint, file.filename);
149
- await bionfs.streamFile(file.ip_id, localPath, signature);
150
- }
151
-
152
- console.log(`โœ… Mounted ${files.length} files to ${mountPoint}`);
153
- });
154
- ```
155
-
156
- #### 3. Add Revoke Command
157
- **File:** `bin/biofs.js`
158
-
159
- **Add:**
160
- ```javascript
161
- program
162
- .command('access')
163
- .command('revoke [ip-id]')
164
- .option('--all', 'Revoke all consents')
165
- .description('Revoke access consent for genomic files')
166
- .action(async (ipId, options) => {
167
- const consentManager = new ConsentManager();
168
-
169
- if (options.all) {
170
- await consentManager.revokeConsent(wallet, null, signature);
171
- console.log('โœ… Revoked all consents');
172
- } else {
173
- await consentManager.revokeConsent(wallet, ipId, signature);
174
- console.log('โœ… Revoked consent for', ipId);
175
- }
176
- });
177
- ```
178
-
179
- ---
180
-
181
- ## ๐Ÿ“‹ PENDING: API Endpoints
182
-
183
- ### API Implementation Required
184
-
185
- **File:** `/home/ubuntu/Genobank_APIs/production_api/plugins/bioip/api_bioip.py`
186
-
187
- **Add these endpoints:**
188
-
189
- ```python
190
- @app.route('/bionfs/v1/verify_consent', methods=['POST'])
191
- def verify_consent():
192
- """Check if user has given consent for this file"""
193
- user_signature = request.json.get('user_signature')
194
- ip_id = request.json.get('ip_id')
195
- action = request.json.get('action')
196
-
197
- wallet = recover_wallet(user_signature)
198
-
199
- # Check MongoDB
200
- consent = db.bioip_access_consents.find_one({
201
- 'wallet_address': wallet.lower(),
202
- 'ip_id': ip_id.lower(),
203
- 'action': action,
204
- 'revoked': False
205
- })
206
-
207
- if consent:
208
- return jsonify({
209
- 'has_consent': True,
210
- 'consent_given_at': consent['consent_given_at'].isoformat(),
211
- 'access_count': consent['access_count']
212
- })
213
- else:
214
- return jsonify({'has_consent': False})
215
-
216
-
217
- @app.route('/bionfs/v1/record_consent', methods=['POST'])
218
- def record_consent():
219
- """Record GDPR consent after user agrees"""
220
- user_signature = request.json.get('user_signature')
221
- ip_id = request.json.get('ip_id')
222
- action = request.json.get('action')
223
- ip_address = request.json.get('ip_address')
224
-
225
- wallet = recover_wallet(user_signature)
226
-
227
- # Get file info
228
- bioip = bioip_dao.get_bioip_by_ip_id(ip_id)
229
-
230
- consent_record = {
231
- 'wallet_address': wallet.lower(),
232
- 'ip_id': ip_id.lower(),
233
- 'filename': bioip.get('filename'),
234
- 'data_owner': bioip.get('owner', '').lower(),
235
- 'license_token_id': bioip.get('license_token_id'),
236
- 'license_type': bioip.get('license_type', 'non-commercial'),
237
-
238
- 'action': action,
239
- 'purpose': 'research_and_clinical_analysis',
240
-
241
- 'consent_text_version': 'v1.0',
242
- 'consent_given_at': datetime.utcnow(),
243
- 'consent_ip_address': ip_address,
244
- 'consent_user_agent': request.headers.get('User-Agent'),
245
-
246
- 'gdpr_rights_acknowledged': True,
247
- 'license_terms_acknowledged': True,
248
-
249
- 'access_count': 1,
250
- 'last_accessed_at': datetime.utcnow(),
251
-
252
- 'revoked': False
253
- }
254
-
255
- db.bioip_access_consents.insert_one(consent_record)
256
-
257
- # Audit log
258
- db.audit_log.insert_one({
259
- 'event_type': 'consent_granted',
260
- 'wallet': wallet,
261
- 'ip_id': ip_id,
262
- 'action': action,
263
- 'timestamp': datetime.utcnow()
264
- })
265
-
266
- return jsonify({'status': 'Success', 'message': 'Consent recorded'})
267
-
268
-
269
- @app.route('/bionfs/v1/revoke_consent', methods=['POST'])
270
- def revoke_consent():
271
- """Revoke consent (GDPR right to withdraw)"""
272
- user_signature = request.json.get('user_signature')
273
- ip_id = request.json.get('ip_id')
274
-
275
- wallet = recover_wallet(user_signature)
276
-
277
- if ip_id == 'all':
278
- result = db.bioip_access_consents.update_many(
279
- {
280
- 'wallet_address': wallet.lower(),
281
- 'revoked': False
282
- },
283
- {
284
- '$set': {
285
- 'revoked': True,
286
- 'revoked_at': datetime.utcnow(),
287
- 'revoked_reason': 'user_requested'
288
- }
289
- }
290
- )
291
- count = result.modified_count
292
- else:
293
- result = db.bioip_access_consents.update_many(
294
- {
295
- 'wallet_address': wallet.lower(),
296
- 'ip_id': ip_id.lower(),
297
- 'revoked': False
298
- },
299
- {
300
- '$set': {
301
- 'revoked': True,
302
- 'revoked_at': datetime.utcnow(),
303
- 'revoked_reason': 'user_requested'
304
- }
305
- }
306
- )
307
- count = result.modified_count
308
-
309
- db.audit_log.insert_one({
310
- 'event_type': 'consent_revoked',
311
- 'wallet': wallet,
312
- 'ip_id': ip_id,
313
- 'timestamp': datetime.utcnow()
314
- })
315
-
316
- return jsonify({
317
- 'status': 'Success',
318
- 'message': f'Revoked {count} consent(s)'
319
- })
320
-
321
-
322
- @app.route('/api_bioip/download_granted_file', methods=['GET', 'POST'])
323
- def download_granted_file():
324
- """Download a file you have a license token for"""
325
- user_signature = request.values.get('user_signature')
326
- ip_id = request.values.get('ip_id')
327
-
328
- wallet = recover_wallet(user_signature)
329
-
330
- # Verify license token
331
- has_license = story_protocol_service.verify_license(ip_id, wallet)
332
- if not has_license:
333
- return jsonify({'error': 'No valid license found'}), 403
334
-
335
- # Get S3 path
336
- bioip = bioip_dao.get_bioip_by_ip_id(ip_id)
337
- if not bioip:
338
- return jsonify({'error': 'File not found'}), 404
339
-
340
- s3_path = bioip['s3_path']
341
-
342
- # Stream from S3
343
- return stream_s3_file_response(s3_path, bioip['filename'])
344
- ```
345
-
346
- ---
347
-
348
- ## ๐Ÿงช Testing Plan
349
-
350
- ### Test 1: Dr. Claudia's First Download (Shows Consent)
351
-
352
- ```bash
353
- biofs download "biocid://0x5f5a60EaEf242c0D51A21c703f520347b96Ed19a/bioip/0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7"
354
-
355
- # Expected:
356
- # โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
357
- # ๐Ÿ”’ GENOMIC DATA ACCESS CONSENT
358
- # โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
359
- #
360
- # FILE INFORMATION:
361
- # Filename: 55052008714000.deepvariant.vcf
362
- # Owner: 0x5f5a...d19a
363
- # License Type: non-commercial
364
- #
365
- # YOU ARE ABOUT TO ACCESS:
366
- # โ€ข Genomic variants (VCF format)
367
- # โ€ข Protected under GDPR Article 9
368
- #
369
- # > Type "I AGREE" to proceed: I AGREE
370
- #
371
- # โœ… Consent recorded
372
- # โœ… Downloaded: ./55052008714000.deepvariant.vcf
373
- ```
374
-
375
- ### Test 2: Second Download (Uses Existing Consent)
376
-
377
- ```bash
378
- biofs download "55052008714000.deepvariant.vcf" ~/second-copy.vcf
379
-
380
- # Expected:
381
- # โœ“ Using existing consent
382
- # โœ… Downloaded: ~/second-copy.vcf
383
- ```
384
-
385
- ### Test 3: Mount (Shows Consent for Each File)
386
-
387
- ```bash
388
- biofs mount ~/dr-claudia-genomic-data
389
-
390
- # Expected:
391
- # ๐Ÿ“„ File 1 of 1:
392
- # [Shows consent notice]
393
- # > Type "I AGREE" to proceed: I AGREE
394
- #
395
- # โœ… Consent recorded
396
- # โœ… Mounted 1 file(s) to ~/dr-claudia-genomic-data
397
- #
398
- # Your Files:
399
- # โœ“ 55052008714000.deepvariant.vcf
400
- ```
401
-
402
- ### Test 4: Revoke Access
403
-
404
- ```bash
405
- biofs access revoke 0xCCe14315eE3D6a41596EeB4a2839eE50A8ec59f7
406
-
407
- # Expected:
408
- # โœ… Revoked consent for 0xCCe1...59f7
409
- ```
410
-
411
- ---
412
-
413
- ## ๐Ÿ“Š GDPR Compliance Checklist
414
-
415
- โœ… **Article 6 (Lawfulness)** - Consent is basis for processing
416
- โœ… **Article 7 (Conditions for Consent)** - Explicit "I AGREE" required
417
- โœ… **Article 9 (Special Categories)** - Genomic data explicitly mentioned
418
- โœ… **Article 13 (Information)** - User informed of purpose, rights, audit
419
- โœ… **Article 17 (Right to Erasure)** - Revoke command available
420
- โœ… **Article 30 (Records of Processing)** - Audit trail in MongoDB
421
-
422
- ---
423
-
424
- ## ๐Ÿ“ File Summary
425
-
426
- **Created:**
427
- - โœ… `/home/ubuntu/genobank-cli/lib/consent-manager.js`
428
- - โœ… `/home/ubuntu/genobank-cli/lib/consent-prompt.js`
429
- - โœ… `/home/ubuntu/genobank-cli/lib/bionfs-client.js`
430
- - โœ… `/home/ubuntu/genobank-cli/GDPR_BIONFS_CONSENT_ARCHITECTURE.md`
431
- - โœ… `/home/ubuntu/genobank-cli/BIONFS_MOUNT_INTEGRATION_PLAN.md`
432
-
433
- **To Update:**
434
- - โณ `/home/ubuntu/genobank-cli/bin/biofs.js` - Add download/mount/revoke commands
435
- - โณ `/home/ubuntu/Genobank_APIs/production_api/plugins/bioip/api_bioip.py` - Add BioNFS endpoints
436
-
437
- **To Create:**
438
- - โณ MongoDB collection: `bioip_access_consents`
439
- - โณ MongoDB collection: `audit_log` (if not exists)
440
-
441
- ---
442
-
443
- ## ๐Ÿš€ Next Actions
444
-
445
- 1. **Update bin/biofs.js** with consent flow integration
446
- 2. **Deploy API endpoints** to production API
447
- 3. **Create MongoDB collections** with proper indexes
448
- 4. **Test with Dr. Claudia's file**
449
- 5. **Document user guide** for GDPR consent workflow
450
-
451
- ---
452
-
453
- ## ๐Ÿ’ก Key Innovation
454
-
455
- This implementation provides:
456
- - **First GDPR-compliant genomic data CLI** with explicit consent
457
- - **Blockchain-verified access control** (Story Protocol licenses)
458
- - **Full audit trail** for regulatory compliance
459
- - **User-friendly consent flow** (not just legalese)
460
- - **Revocable access** (right to withdraw)
461
-
462
- Dr. Claudia will have full transparency and control over her genomic data access! ๐Ÿ”’