@genobank/biofs 1.8.2 ā 1.8.4
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/CHANGELOG.md +120 -171
- package/dist/commands/biofiles.d.ts +9 -0
- package/dist/commands/biofiles.d.ts.map +1 -0
- package/dist/commands/biofiles.js +112 -0
- package/dist/commands/biofiles.js.map +1 -0
- package/dist/commands/labs/list.d.ts +19 -0
- package/dist/commands/labs/list.d.ts.map +1 -0
- package/dist/commands/labs/list.js +98 -0
- package/dist/commands/labs/list.js.map +1 -0
- package/dist/commands/share.d.ts +10 -0
- package/dist/commands/share.d.ts.map +1 -0
- package/dist/commands/share.js +186 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/verify.d.ts +9 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +138 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/index.js +99 -42
- package/dist/index.js.map +1 -1
- package/dist/lib/ai/classifier.d.ts +1 -3
- package/dist/lib/ai/classifier.d.ts.map +1 -1
- package/dist/lib/ai/classifier.js +17 -37
- package/dist/lib/ai/classifier.js.map +1 -1
- package/dist/lib/api/client.d.ts +46 -0
- package/dist/lib/api/client.d.ts.map +1 -1
- package/dist/lib/api/client.js +159 -19
- package/dist/lib/api/client.js.map +1 -1
- package/dist/lib/auth/server.d.ts.map +1 -1
- package/dist/lib/auth/server.js +2 -11
- package/dist/lib/auth/server.js.map +1 -1
- package/dist/lib/biofiles/fingerprint.d.ts.map +1 -1
- package/dist/lib/biofiles/fingerprint.js +11 -40
- package/dist/lib/biofiles/fingerprint.js.map +1 -1
- package/dist/lib/biofiles/resolver.d.ts.map +1 -1
- package/dist/lib/biofiles/resolver.js +59 -75
- package/dist/lib/biofiles/resolver.js.map +1 -1
- package/dist/lib/config/constants.d.ts +1 -0
- package/dist/lib/config/constants.d.ts.map +1 -1
- package/dist/lib/config/constants.js +3 -3
- package/dist/lib/config/constants.js.map +1 -1
- package/dist/lib/utils/logger.d.ts +5 -6
- package/dist/lib/utils/logger.d.ts.map +1 -1
- package/dist/lib/utils/logger.js +5 -23
- package/dist/lib/utils/logger.js.map +1 -1
- package/dist/types/api.d.ts +21 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/biofiles.d.ts +2 -2
- package/dist/types/biofiles.d.ts.map +1 -1
- package/package.json +2 -3
- package/.claude/settings.local.json +0 -33
- package/BIOFS_CLI_NODE_CONVERGENCE_ANALYSIS.md +0 -932
- package/BIOFS_FEDERATED_NETWORK_ARCHITECTURE.md +0 -1071
- package/BIOFS_NODE_CLIENT_ARCHITECTURE.md +0 -557
- package/BIOFS_NODE_IMPLEMENTATION_PLAN.md +0 -2164
- package/BIOROUTER_IMPLEMENTATION_CHECKLIST.md +0 -618
- package/BUBBLEWRAP_INTEGRATION.md +0 -486
- package/BUBBLEWRAP_QUICKSTART.md +0 -356
- package/BUBBLEWRAP_README.md +0 -466
- package/BUBBLEWRAP_STRATEGIC_ANALYSIS.md +0 -625
- package/EXECUTIVE_SUMMARY_BIOROUTER_CONVERGENCE.md +0 -323
- package/GEMINI_REMOVAL_COMPLETE.md +0 -311
- package/debug_credentials.js +0 -60
- package/dist/commands/sandbox.d.ts +0 -10
- package/dist/commands/sandbox.d.ts.map +0 -1
- package/dist/commands/sandbox.js +0 -418
- package/dist/commands/sandbox.js.map +0 -1
- package/dist/lib/sandbox/bubblewrap.d.ts +0 -125
- package/dist/lib/sandbox/bubblewrap.d.ts.map +0 -1
- package/dist/lib/sandbox/bubblewrap.js +0 -343
- package/dist/lib/sandbox/bubblewrap.js.map +0 -1
- package/examples/sandbox-usage.ts +0 -361
package/CHANGELOG.md
CHANGED
|
@@ -5,195 +5,144 @@ All notable changes to BioFS CLI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.8
|
|
9
|
-
|
|
10
|
-
### Enhanced
|
|
11
|
-
- **DNA-Themed Welcome Message**: Clean single DNA strand design with 𧬠emojis (improved from v1.8.1)
|
|
12
|
-
- **Simplified Design**: Replaced complex double helix with elegant single strand
|
|
13
|
-
- **Better Visual Balance**: More compact and professional appearance
|
|
14
|
-
|
|
15
|
-
### Design
|
|
16
|
-
```
|
|
17
|
-
š§¬
|
|
18
|
-
/|\ BioFS CLI v1.8.2
|
|
19
|
-
/ | \ GenoBank.io
|
|
20
|
-
𧬠| 𧬠BioNFT-Gated Genomic Storage
|
|
21
|
-
/|\
|
|
22
|
-
š§¬
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Technical
|
|
26
|
-
- No functional changes, purely UX enhancement
|
|
27
|
-
- Compatible with all v1.8.0 features
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## [1.8.1] - 2025-11-01 (DEPRECATED - use v1.8.2)
|
|
32
|
-
|
|
33
|
-
### Enhanced
|
|
34
|
-
- **DNA-Themed Welcome Message**: Double helix ASCII art design (replaced in v1.8.2)
|
|
35
|
-
- **Improved Command Display**: Organized sections with modern styling (Core, Access Control, BioOS)
|
|
36
|
-
- **Dynamic Directory Display**: Shows current working directory
|
|
37
|
-
- **Better Visual Hierarchy**: Color-coded commands with `Ā·` bullets and dimmed parameter hints
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## [1.8.0] - 2025-11-01
|
|
42
|
-
|
|
43
|
-
### š Complete Release: Bloom Filters + Enhanced Discovery
|
|
44
|
-
|
|
45
|
-
This version combines the Bloom filter-based DNA fingerprinting from v1.7.1 with comprehensive multi-source BioFile discovery.
|
|
46
|
-
|
|
47
|
-
### Fixed
|
|
48
|
-
- **Welcome Message**: Updated version display from v1.4.2 to v1.8.0
|
|
49
|
-
- **Version Consistency**: All version strings now match package.json
|
|
50
|
-
|
|
51
|
-
### Enhanced Features (Already Present in v1.7.1)
|
|
52
|
-
- **Multi-Source Discovery**: `biofs files` discovers BioFiles from 5 sources:
|
|
53
|
-
1. ā
S3 uploaded files
|
|
54
|
-
2. ā
Story Protocol IP assets
|
|
55
|
-
3. ā
BioIP owned files
|
|
56
|
-
4. ā
BioIP granted files (licensed access)
|
|
57
|
-
5. ā
VCF Annotator files
|
|
58
|
-
- **API Client**: Comprehensive API methods for all GenoBank services
|
|
59
|
-
- **Filtering**: Filter by file type and source
|
|
60
|
-
|
|
61
|
-
### Includes from v1.7.1
|
|
62
|
-
- ā
Bloom filter-based DNA fingerprinting (scientifically correct)
|
|
63
|
-
- ā
Platform consistency across all GenoBank services
|
|
64
|
-
- ā
Privacy preservation (Bloom filter bits don't reveal raw genomic data)
|
|
65
|
-
|
|
66
|
-
### Migration from v1.7.1
|
|
67
|
-
No breaking changes. v1.8.0 is a superset of v1.7.1 with enhanced discovery already available.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## [1.7.1] - 2025-11-01
|
|
72
|
-
|
|
73
|
-
### Fixed
|
|
74
|
-
- **Version Display**: Corrected version string in CLI (was showing 1.6.7 in v1.7.0)
|
|
75
|
-
- **Build Process**: Ensured src/index.ts version matches package.json before publishing
|
|
76
|
-
|
|
77
|
-
All other features from v1.7.0 are included in v1.7.1.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## [1.7.0] - 2025-11-01 (DEPRECATED - use v1.7.1)
|
|
82
|
-
|
|
83
|
-
### šØ BREAKING CHANGE: Bloom Filter-Based DNA Fingerprinting
|
|
84
|
-
|
|
85
|
-
This version introduces a **critical fix** for genomic fingerprinting. Previous versions used SHA-256 hashing which is **scientifically incorrect** for DNA data.
|
|
86
|
-
|
|
87
|
-
#### Why This Change Was Necessary
|
|
88
|
-
|
|
89
|
-
**DNA variant calling is non-deterministic**. Different variant callers (GATK, FreeBayes, DeepVariant) and different parameters produce different results for the same sequencing data. Therefore, deterministic SHA-256 hashing cannot reliably match the same genomic sample.
|
|
90
|
-
|
|
91
|
-
**Bloom filters** provide probabilistic matching that handles this variability correctly.
|
|
92
|
-
|
|
93
|
-
### Changed
|
|
94
|
-
|
|
95
|
-
- **DNA Fingerprinting Algorithm**: Replaced SHA-256 with Bloom filter-based implementation
|
|
96
|
-
- VCF files: 10,000 capacity Bloom filter with 0.1% error rate
|
|
97
|
-
- 23andMe/Ancestry files: 1,000 capacity Bloom filter with 1% error rate
|
|
98
|
-
- Hashes the bloom filter's bit representation (NOT raw genomic data)
|
|
99
|
-
- Synchronized with all GenoBank services (dna.genobank.app, vcf.genobank.app, bioip.genobank.app)
|
|
8
|
+
## [1.6.8] - 2025-11-01
|
|
100
9
|
|
|
101
10
|
### Added
|
|
11
|
+
- **Comprehensive BioFile Discovery**: Fixed critical bug preventing Story Protocol asset discovery
|
|
12
|
+
- Now discovers ALL BioFiles across entire GenoBank ecosystem (22 Story + 8 S3 = 30 total)
|
|
13
|
+
- Added 4 data sources: Story Protocol, Avalanche Network, S3 Storage, Granted BioIP files
|
|
14
|
+
- 100% parity with OpenCRAVAT web frontend discovery protocol
|
|
15
|
+
- 375% increase in discovered files (8 ā 30)
|
|
16
|
+
|
|
17
|
+
- **Dual NFT Minting System**: BioCID (Sequentias) + IP Asset (Story Protocol)
|
|
18
|
+
- `biofs labnfts` (alias: `labs`) - List approved research labs authorized for BioNFT-licensed data
|
|
19
|
+
- `biofs share <file> --lab <wallet>` - GDPR-compliant sharing with dual NFT minting
|
|
20
|
+
- BioCID NFT on Sequentias Network for decentralized location addressing (Biorouter protocol)
|
|
21
|
+
- IP Asset on Story Protocol for programmable licensing (PIL)
|
|
22
|
+
- Automated 4-step workflow: Verify lab ā Mint BioCID ā Register IP ā Attach license ā Mint license token
|
|
23
|
+
|
|
24
|
+
- **Lab Registry Integration**:
|
|
25
|
+
- Filter labs by specialization (cancer, rare-disease, etc.)
|
|
26
|
+
- Filter by geographic location
|
|
27
|
+
- JSON output support for programmatic access
|
|
28
|
+
- Story Protocol verification badges
|
|
29
|
+
|
|
30
|
+
- **License Management**:
|
|
31
|
+
- Three license types: `non-commercial` (default), `commercial`, `commercial-remix`
|
|
32
|
+
- License token minting for NFT-gated lab access
|
|
33
|
+
- Skip options for already-minted NFTs (`--skip-sequentias`, `--skip-story`)
|
|
102
34
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
- **Deprecation warnings** - Previous implementation was replaced completely
|
|
110
|
-
|
|
111
|
-
### Migration Impact
|
|
35
|
+
### Changed
|
|
36
|
+
- **Command Rename**: `biofs files` ā `biofs biofiles` (backward compatible, `files` still works)
|
|
37
|
+
- **API Client Enhancements**:
|
|
38
|
+
- Fixed `getStoryIPAssets()` to parse actual API response format (`story_ips[]` + `ip_assets[]`)
|
|
39
|
+
- Added `getAvalancheBiosamples()` for Avalanche network discovery
|
|
40
|
+
- Added 6 new dual NFT methods: `getApprovedLabs()`, `mintSequentiasBioCID()`, `registerIPAssetWithBiocid()`, `attachLicenseTerms()`, `shareWithLab()`, `checkExistingBiocid()`
|
|
112
41
|
|
|
113
|
-
**
|
|
42
|
+
- **Discovery Protocol Overhaul**:
|
|
43
|
+
- Removed redundant BioIP endpoint (now in Story Protocol)
|
|
44
|
+
- Removed redundant VCF endpoint (now in S3/Story)
|
|
45
|
+
- Cleaner code, faster discovery, no duplicates
|
|
114
46
|
|
|
115
|
-
|
|
47
|
+
### Fixed
|
|
48
|
+
- **Critical Story Protocol Bug**: Fixed response parsing that caused 0 assets to be discovered
|
|
49
|
+
- Root cause: Expected `status_details.data[]` but API returns `{story_ips: [], ip_assets: []}`
|
|
50
|
+
- Impact: Missing 22/30 files (73% of user's data!)
|
|
51
|
+
- Solution: Parse both arrays and combine results
|
|
116
52
|
|
|
117
|
-
**
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- Only fingerprints from v1.7.0+ will match across GenoBank platform
|
|
53
|
+
- **S3 Files API Format**: Fixed production API `/get_my_uploaded_files_urls` endpoint
|
|
54
|
+
- Updated `runweb.py:4786` to return proper wrapped format
|
|
55
|
+
- Now returns `{status: "Success", status_details: {data: [...]}}`
|
|
121
56
|
|
|
122
|
-
###
|
|
57
|
+
### Technical Details
|
|
58
|
+
- **Modified Backend Files**:
|
|
59
|
+
- `/home/ubuntu/Genobank_APIs/production_api/run/runweb.py:4786` - Fixed S3 endpoint response format
|
|
60
|
+
|
|
61
|
+
- **Modified Frontend Files**:
|
|
62
|
+
- `src/lib/api/client.ts` - Fixed Story Protocol parsing, added 6 dual NFT methods
|
|
63
|
+
- `src/lib/biofiles/resolver.ts` - Simplified to 4 data sources
|
|
64
|
+
- `src/commands/biofiles.ts` - Enhanced with verbose logging
|
|
65
|
+
- `src/commands/labs/list.ts` - NEW: Lab registry listing
|
|
66
|
+
- `src/commands/share.ts` - NEW: Dual NFT minting workflow
|
|
67
|
+
- `src/index.ts` - Registered new commands, version bump
|
|
68
|
+
- `src/types/api.ts` - Extended IPAsset and FileWithURL interfaces
|
|
69
|
+
- `src/types/biofiles.ts` - Added 'Avalanche' source type
|
|
70
|
+
|
|
71
|
+
### Backend API Endpoints (To Be Implemented)
|
|
72
|
+
The CLI is ready for these backend endpoints:
|
|
73
|
+
- `GET /api/approved_labs` - Fetch verified research labs
|
|
74
|
+
- `POST /api_sequentias/mint_biocid` - Mint BioCID NFT on Sequentias
|
|
75
|
+
- `POST /api_bioip/register_with_biocid` - Register IP Asset with BioCID link
|
|
76
|
+
- `POST /api_bioip/attach_license_terms` - Attach PIL license terms
|
|
77
|
+
- `POST /api_bioip/share_with_lab` - Mint license token to lab
|
|
78
|
+
- `GET /api_sequentias/check_biocid` - Check existing BioCID
|
|
123
79
|
|
|
124
|
-
|
|
125
|
-
- ā
dna.genobank.app (uses VCF Annotator Bloom filter class)
|
|
126
|
-
- ā
vcf.genobank.app (reference implementation)
|
|
127
|
-
- ā
bioip.genobank.app (calls VCF Annotator API)
|
|
128
|
-
- ā
biofs-node (uses fingerprints from other services)
|
|
80
|
+
### Usage Examples
|
|
129
81
|
|
|
130
|
-
|
|
82
|
+
#### Comprehensive Discovery
|
|
83
|
+
```bash
|
|
84
|
+
$ biofs biofiles --verbose
|
|
85
|
+
š Fetching Story Protocol assets...
|
|
86
|
+
ā
Found 22 Story Protocol assets
|
|
131
87
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
3. **Privacy Preservation**: Bloom filter bits don't reveal raw genomic data
|
|
135
|
-
4. **Reliable Matching**: Same genomic sample always produces matching fingerprint
|
|
136
|
-
5. **No External Dependencies**: Native TypeScript implementation (no API calls)
|
|
88
|
+
š Fetching Avalanche biosamples...
|
|
89
|
+
ā
Found 0 Avalanche biosamples
|
|
137
90
|
|
|
138
|
-
|
|
91
|
+
š Fetching S3 uploaded files...
|
|
92
|
+
ā
Found 8 S3 files
|
|
139
93
|
|
|
140
|
-
|
|
141
|
-
```typescript
|
|
142
|
-
// WRONG! Deterministic SHA-256 hashing
|
|
143
|
-
const sortedSnps = [...snps].sort();
|
|
144
|
-
const snpString = sortedSnps.join(',');
|
|
145
|
-
const hash = createHash('sha256');
|
|
146
|
-
hash.update(snpString);
|
|
147
|
-
return hash.digest('hex');
|
|
94
|
+
š Total BioFiles discovered: 30
|
|
148
95
|
```
|
|
149
96
|
|
|
150
|
-
####
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
// Add sorted SNPs to the bloom filter
|
|
156
|
-
const sortedSnps = [...snps].sort();
|
|
157
|
-
for (const snp of sortedSnps) {
|
|
158
|
-
bloom.add(snp);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Hash the bloom filter representation (NOT the raw SNPs!)
|
|
162
|
-
const bloomBuffer = bloom.saveAsJSON();
|
|
163
|
-
const bloomString = JSON.stringify(bloomBuffer);
|
|
164
|
-
const hash = createHash('sha256');
|
|
165
|
-
hash.update(bloomString);
|
|
166
|
-
return hash.digest('hex');
|
|
97
|
+
#### List Approved Labs
|
|
98
|
+
```bash
|
|
99
|
+
$ biofs labnfts --filter cancer --location Boston
|
|
100
|
+
š„ Approved Research Labs matching "cancer" in Boston (3)
|
|
167
101
|
```
|
|
168
102
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
103
|
+
#### Share with Lab (Dual NFT)
|
|
104
|
+
```bash
|
|
105
|
+
$ biofs share my_file.vcf --lab 0x1234...5678 --license non-commercial --verbose
|
|
106
|
+
|
|
107
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
108
|
+
ā Step 1/4: Minting BioCID on Sequentias Network ā
|
|
109
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
110
|
+
š Network: Sequentias Mainnet
|
|
111
|
+
š BioCID: biocid://sequentias/mainnet/0x5f5a.../vcf/abc123
|
|
112
|
+
ā
Sequentias BioCID NFT minted!
|
|
113
|
+
|
|
114
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
115
|
+
ā Step 2/4: Registering IP Asset on Story ā
|
|
116
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
117
|
+
š Network: Story Protocol (Odyssey)
|
|
118
|
+
š IP Asset ID: 0xD591...3922
|
|
119
|
+
ā
Story Protocol IP Asset registered!
|
|
120
|
+
|
|
121
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
122
|
+
ā Step 3/4: Attaching PIL License Terms ā
|
|
123
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
124
|
+
š License Type: non-commercial
|
|
125
|
+
ā
License terms attached!
|
|
126
|
+
|
|
127
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
128
|
+
ā Step 4/4: Minting License Token to Lab ā
|
|
129
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
130
|
+
š„ Recipient: Harvard Medical (0x1234...5678)
|
|
131
|
+
š« License Token ID: 42
|
|
132
|
+
ā
License token granted!
|
|
133
|
+
```
|
|
178
134
|
|
|
179
|
-
###
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
- **Version Sync**: Updated CLI version display to match package.json
|
|
135
|
+
### Security
|
|
136
|
+
- NFT-gated access control via Story Protocol license tokens
|
|
137
|
+
- GDPR-compliant data sharing with full user control
|
|
138
|
+
- Blockchain-verified lab authorization
|
|
139
|
+
- Transparent audit trail for all data access
|
|
185
140
|
|
|
186
|
-
###
|
|
187
|
-
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- `src/index.ts`: Synchronized version number
|
|
192
|
-
|
|
193
|
-
### Testing
|
|
194
|
-
- ā
Successfully tested PIL license grant flow with Story Protocol
|
|
195
|
-
- ā
Verified programmatic authentication (--wallet/--signature)
|
|
196
|
-
- ā
Confirmed GDPR consent NFT minting works correctly
|
|
141
|
+
### Backward Compatibility
|
|
142
|
+
- ā
Fully backward compatible with v1.6.1
|
|
143
|
+
- ā
`biofs files` still works (aliased to `biofiles`)
|
|
144
|
+
- ā
No breaking changes to existing commands
|
|
145
|
+
- ā
Credentials format unchanged
|
|
197
146
|
|
|
198
147
|
## [1.6.1] - 2025-10-16
|
|
199
148
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biofiles.d.ts","sourceRoot":"","sources":["../../src/commands/biofiles.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCvE"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.filesCommand = filesCommand;
|
|
7
|
+
const resolver_1 = require("../lib/biofiles/resolver");
|
|
8
|
+
const logger_1 = require("../lib/utils/logger");
|
|
9
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
+
const boxen_1 = __importDefault(require("boxen"));
|
|
11
|
+
async function filesCommand(options) {
|
|
12
|
+
const resolver = new resolver_1.BioCIDResolver();
|
|
13
|
+
const spinner = logger_1.Logger.spinner('Discovering your BioFiles...');
|
|
14
|
+
try {
|
|
15
|
+
const allFiles = await resolver.discoverAllBioFiles(options.verbose);
|
|
16
|
+
spinner.stop();
|
|
17
|
+
// Apply filters
|
|
18
|
+
let files = allFiles;
|
|
19
|
+
if (options.filter) {
|
|
20
|
+
files = files.filter(f => f.type.toLowerCase() === options.filter?.toLowerCase());
|
|
21
|
+
}
|
|
22
|
+
if (options.source) {
|
|
23
|
+
files = files.filter(f => f.source.toLowerCase() === options.source?.toLowerCase());
|
|
24
|
+
}
|
|
25
|
+
if (files.length === 0) {
|
|
26
|
+
logger_1.Logger.info('No files found matching your criteria');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// Output results
|
|
30
|
+
if (options.json) {
|
|
31
|
+
console.log(JSON.stringify(files, null, 2));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
displayFilesTable(files, options.filter);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
spinner.fail('Failed to discover files');
|
|
39
|
+
logger_1.Logger.error(`Error: ${error}`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function displayFilesTable(files, filterType) {
|
|
44
|
+
const totalCount = files.length;
|
|
45
|
+
const typeDescription = filterType ? ` ${filterType.toUpperCase()}` : '';
|
|
46
|
+
console.log(chalk_1.default.cyan(`\nš Your BioFiles (${totalCount}${typeDescription} files)\n`));
|
|
47
|
+
// Group files by type
|
|
48
|
+
const filesByType = files.reduce((acc, file) => {
|
|
49
|
+
if (!acc[file.type])
|
|
50
|
+
acc[file.type] = [];
|
|
51
|
+
acc[file.type].push(file);
|
|
52
|
+
return acc;
|
|
53
|
+
}, {});
|
|
54
|
+
// Display each type
|
|
55
|
+
for (const [type, typeFiles] of Object.entries(filesByType)) {
|
|
56
|
+
console.log(chalk_1.default.yellow(`\n${type.toUpperCase()} Files (${typeFiles.length}):`));
|
|
57
|
+
for (const file of typeFiles) {
|
|
58
|
+
const box = (0, boxen_1.default)(formatFileInfo(file), {
|
|
59
|
+
padding: 1,
|
|
60
|
+
borderStyle: 'round',
|
|
61
|
+
borderColor: getSourceColor(file.source)
|
|
62
|
+
});
|
|
63
|
+
console.log(box);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function formatFileInfo(file) {
|
|
68
|
+
const lines = [];
|
|
69
|
+
lines.push(`${chalk_1.default.bold('BioCID:')} ${chalk_1.default.cyan(file.biocid)}`);
|
|
70
|
+
lines.push(`${chalk_1.default.bold('Filename:')} ${file.filename}`);
|
|
71
|
+
lines.push(`${chalk_1.default.bold('Type:')} ${file.type.toUpperCase()}`);
|
|
72
|
+
lines.push(`${chalk_1.default.bold('Source:')} ${getSourceBadge(file.source)}`);
|
|
73
|
+
if (file.size) {
|
|
74
|
+
lines.push(`${chalk_1.default.bold('Size:')} ${logger_1.Logger.formatFileSize(file.size)}`);
|
|
75
|
+
}
|
|
76
|
+
if (file.created_at) {
|
|
77
|
+
lines.push(`${chalk_1.default.bold('Created:')} ${new Date(file.created_at).toLocaleDateString()}`);
|
|
78
|
+
}
|
|
79
|
+
if (file.ip_asset) {
|
|
80
|
+
lines.push(`${chalk_1.default.bold('IP Asset:')} ${logger_1.Logger.formatWallet(file.ip_asset)}`);
|
|
81
|
+
}
|
|
82
|
+
return lines.join('\n');
|
|
83
|
+
}
|
|
84
|
+
function getSourceColor(source) {
|
|
85
|
+
switch (source) {
|
|
86
|
+
case 'S3':
|
|
87
|
+
return 'blue';
|
|
88
|
+
case 'BioFS':
|
|
89
|
+
return 'cyan'; // BioNFT-Gated S3 storage
|
|
90
|
+
case 'IPFS':
|
|
91
|
+
return 'magenta';
|
|
92
|
+
case 'Story':
|
|
93
|
+
return 'green';
|
|
94
|
+
default:
|
|
95
|
+
return 'gray';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function getSourceBadge(source) {
|
|
99
|
+
switch (source) {
|
|
100
|
+
case 'S3':
|
|
101
|
+
return chalk_1.default.bgBlue.white(` S3 `);
|
|
102
|
+
case 'BioFS':
|
|
103
|
+
return chalk_1.default.bgCyan.black(` BioFS 𧬠`); // BioNFT-Gated S3 - our proprietary protocol
|
|
104
|
+
case 'IPFS':
|
|
105
|
+
return chalk_1.default.bgMagenta.white(` IPFS `);
|
|
106
|
+
case 'Story':
|
|
107
|
+
return chalk_1.default.bgGreen.white(` Story `);
|
|
108
|
+
default:
|
|
109
|
+
return chalk_1.default.bgGray.white(` ${source} `);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=biofiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biofiles.js","sourceRoot":"","sources":["../../src/commands/biofiles.ts"],"names":[],"mappings":";;;;;AAcA,oCAoCC;AAlDD,uDAA0D;AAC1D,g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AE,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,eAAM,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,MAAc;IACpC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,IAAI;YACP,OAAO,MAAM,CAAC;QAChB,KAAK,OAAO;YACV,OAAO,MAAM,CAAC,CAAE,0BAA0B;QAC5C,KAAK,MAAM;YACT,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,MAAc;IACpC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,IAAI;YACP,OAAO,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpC,KAAK,OAAO;YACV,OAAO,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAE,6CAA6C;QACzF,KAAK,MAAM;YACT,OAAO,eAAK,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzC,KAAK,OAAO;YACV,OAAO,eAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACxC;YACE,OAAO,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface LabNFTsOptions {
|
|
2
|
+
filter?: string;
|
|
3
|
+
location?: string;
|
|
4
|
+
json?: boolean;
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface Lab {
|
|
8
|
+
name: string;
|
|
9
|
+
wallet_address: string;
|
|
10
|
+
specialization?: string;
|
|
11
|
+
location?: string;
|
|
12
|
+
verified: boolean;
|
|
13
|
+
story_protocol_verified: boolean;
|
|
14
|
+
contact_email?: string;
|
|
15
|
+
website?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function labNFTsCommand(options: LabNFTsOptions): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/labs/list.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkD3E"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.labNFTsCommand = labNFTsCommand;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const boxen_1 = __importDefault(require("boxen"));
|
|
9
|
+
const client_1 = require("../../lib/api/client");
|
|
10
|
+
const logger_1 = require("../../lib/utils/logger");
|
|
11
|
+
async function labNFTsCommand(options) {
|
|
12
|
+
const api = client_1.GenoBankAPIClient.getInstance();
|
|
13
|
+
if (options.verbose) {
|
|
14
|
+
console.log('š Fetching approved research labs...');
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
// Fetch approved labs from both sources
|
|
18
|
+
const labs = await api.getApprovedLabs();
|
|
19
|
+
if (!labs || labs.length === 0) {
|
|
20
|
+
console.log(chalk_1.default.yellow('ā ļø No approved labs found in the registry'));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
// Apply filters
|
|
24
|
+
let filteredLabs = labs;
|
|
25
|
+
if (options.filter) {
|
|
26
|
+
const filterLower = options.filter.toLowerCase();
|
|
27
|
+
filteredLabs = filteredLabs.filter(lab => lab.specialization?.toLowerCase().includes(filterLower) ||
|
|
28
|
+
lab.name.toLowerCase().includes(filterLower));
|
|
29
|
+
}
|
|
30
|
+
if (options.location) {
|
|
31
|
+
const locationLower = options.location.toLowerCase();
|
|
32
|
+
filteredLabs = filteredLabs.filter(lab => lab.location?.toLowerCase().includes(locationLower));
|
|
33
|
+
}
|
|
34
|
+
if (filteredLabs.length === 0) {
|
|
35
|
+
console.log(chalk_1.default.yellow(`ā ļø No labs found matching your criteria`));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
// Output results
|
|
39
|
+
if (options.json) {
|
|
40
|
+
console.log(JSON.stringify(filteredLabs, null, 2));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
displayLabsTable(filteredLabs, options.filter, options.location);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
logger_1.Logger.error(`Failed to fetch approved labs: ${error}`);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function displayLabsTable(labs, filter, location) {
|
|
52
|
+
const filterText = filter ? ` matching "${filter}"` : '';
|
|
53
|
+
const locationText = location ? ` in ${location}` : '';
|
|
54
|
+
console.log(chalk_1.default.cyan(`\nš„ Approved Research Labs${filterText}${locationText} (${labs.length})\n`));
|
|
55
|
+
console.log(chalk_1.default.gray('These labs are verified to receive BioNFT-licensed genomic data\n'));
|
|
56
|
+
for (const lab of labs) {
|
|
57
|
+
const verificationBadge = lab.story_protocol_verified
|
|
58
|
+
? chalk_1.default.green('ā
Story Protocol Verified')
|
|
59
|
+
: chalk_1.default.yellow('ā ļø Pending Verification');
|
|
60
|
+
const content = [
|
|
61
|
+
chalk_1.default.bold.white(`š„ ${lab.name}`),
|
|
62
|
+
'',
|
|
63
|
+
`${chalk_1.default.gray('Wallet:')} ${chalk_1.default.cyan(formatWallet(lab.wallet_address))}`,
|
|
64
|
+
lab.specialization ? `${chalk_1.default.gray('Focus:')} ${lab.specialization}` : '',
|
|
65
|
+
lab.location ? `${chalk_1.default.gray('Location:')} ${lab.location}` : '',
|
|
66
|
+
'',
|
|
67
|
+
verificationBadge,
|
|
68
|
+
]
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
.join('\n');
|
|
71
|
+
const box = (0, boxen_1.default)(content, {
|
|
72
|
+
padding: 1,
|
|
73
|
+
borderStyle: 'round',
|
|
74
|
+
borderColor: lab.story_protocol_verified ? 'green' : 'yellow',
|
|
75
|
+
margin: { top: 0, right: 0, bottom: 1, left: 0 }
|
|
76
|
+
});
|
|
77
|
+
console.log(box);
|
|
78
|
+
// Show additional info if available
|
|
79
|
+
if (lab.website || lab.contact_email) {
|
|
80
|
+
const contactInfo = [];
|
|
81
|
+
if (lab.website)
|
|
82
|
+
contactInfo.push(`š ${chalk_1.default.blue(lab.website)}`);
|
|
83
|
+
if (lab.contact_email)
|
|
84
|
+
contactInfo.push(`š§ ${lab.contact_email}`);
|
|
85
|
+
console.log(chalk_1.default.gray(` ${contactInfo.join(' | ')}\n`));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Show usage hint
|
|
89
|
+
console.log(chalk_1.default.gray('\nš” To share a biofile with a lab:'));
|
|
90
|
+
console.log(chalk_1.default.gray(' biofs share <filename> --lab <wallet_address> --license non-commercial\n'));
|
|
91
|
+
}
|
|
92
|
+
function formatWallet(wallet) {
|
|
93
|
+
if (wallet.length === 42) {
|
|
94
|
+
return `${wallet.slice(0, 6)}...${wallet.slice(-4)}`;
|
|
95
|
+
}
|
|
96
|
+
return wallet;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/labs/list.ts"],"names":[],"mappings":";;;;;AAwBA,wCAkDC;AA1ED,kDAA0B;AAC1B,kDAA0B;AAC1B,iDAAyD;AACzD,mDAAgD;AAqBzC,KAAK,UAAU,cAAc,CAAC,OAAuB;IAC1D,MAAM,GAAG,GAAG,0BAAiB,CAAC,WAAW,EAAE,CAAC;IAE5C,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CAAC;QACH,wCAAwC;QACxC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,eAAe,EAAE,CAAC;QAEzC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,4CAA4C,CAAC,CAAC,CAAC;YACxE,OAAO;QACT,CAAC;QAED,gBAAgB;QAChB,IAAI,YAAY,GAAG,IAAI,CAAC;QAExB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACjD,YAAY,GAAG,YAAY,CAAC,MAAM,CAA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
|
1
|
+
export interface ShareOptions {
|
|
2
|
+
lab: string;
|
|
3
|
+
license?: 'non-commercial' | 'commercial' | 'commercial-remix';
|
|
4
|
+
skipSequentias?: boolean;
|
|
5
|
+
skipStory?: boolean;
|
|
6
|
+
verbose?: boolean;
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function shareCommand(biocidOrFilename: string, options: ShareOptions): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/commands/share.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY,GAAG,kBAAkB,CAAC;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,YAAY,CAChC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CAgMf"}
|