@genobank/biofs 3.21.1 → 3.22.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 (36) hide show
  1. package/dist/commands/inventory-delegate/index.d.ts +28 -0
  2. package/dist/commands/inventory-delegate/index.d.ts.map +1 -0
  3. package/dist/commands/inventory-delegate/index.js +171 -0
  4. package/dist/commands/inventory-delegate/index.js.map +1 -0
  5. package/dist/commands/inventory-list/index.d.ts +33 -0
  6. package/dist/commands/inventory-list/index.d.ts.map +1 -0
  7. package/dist/commands/inventory-list/index.js +74 -0
  8. package/dist/commands/inventory-list/index.js.map +1 -0
  9. package/dist/commands/inventory-register/index.d.ts +8 -0
  10. package/dist/commands/inventory-register/index.d.ts.map +1 -0
  11. package/dist/commands/inventory-register/index.js +57 -0
  12. package/dist/commands/inventory-register/index.js.map +1 -0
  13. package/dist/commands/job-view/index.d.ts +15 -0
  14. package/dist/commands/job-view/index.d.ts.map +1 -0
  15. package/dist/commands/job-view/index.js +88 -0
  16. package/dist/commands/job-view/index.js.map +1 -0
  17. package/dist/commands/neoantigen-pipeline/index.d.ts +35 -1
  18. package/dist/commands/neoantigen-pipeline/index.d.ts.map +1 -1
  19. package/dist/commands/neoantigen-pipeline/index.js +107 -1
  20. package/dist/commands/neoantigen-pipeline/index.js.map +1 -1
  21. package/dist/commands/parabricks/index.d.ts +83 -0
  22. package/dist/commands/parabricks/index.d.ts.map +1 -0
  23. package/dist/commands/parabricks/index.js +340 -0
  24. package/dist/commands/parabricks/index.js.map +1 -0
  25. package/dist/commands/parabricks/registry.json +15100 -0
  26. package/dist/commands/whoami.d.ts +1 -0
  27. package/dist/commands/whoami.d.ts.map +1 -1
  28. package/dist/commands/whoami.js +20 -0
  29. package/dist/commands/whoami.js.map +1 -1
  30. package/dist/index.js +134 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/utils/node_roles.d.ts +16 -0
  33. package/dist/lib/utils/node_roles.d.ts.map +1 -0
  34. package/dist/lib/utils/node_roles.js +34 -0
  35. package/dist/lib/utils/node_roles.js.map +1 -0
  36. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
1
  export interface WhoamiOptions {
2
+ roles?: boolean;
2
3
  json?: boolean;
3
4
  verify?: boolean;
4
5
  check?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwHzE"}
1
+ {"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsIzE"}
@@ -8,6 +8,9 @@ const credentials_1 = require("../lib/auth/credentials");
8
8
  const logger_1 = require("../lib/utils/logger");
9
9
  const chalk_1 = __importDefault(require("chalk"));
10
10
  const ethers_1 = require("ethers");
11
+ const axios_1 = __importDefault(require("axios"));
12
+ const paths_1 = require("../lib/config/paths");
13
+ const node_roles_1 = require("../lib/utils/node_roles");
11
14
  async function whoamiCommand(options) {
12
15
  const credManager = credentials_1.CredentialsManager.getInstance();
13
16
  const creds = await credManager.loadCredentials();
@@ -15,6 +18,23 @@ async function whoamiCommand(options) {
15
18
  logger_1.Logger.error('Not authenticated. Please run "biofs login" first.');
16
19
  process.exit(1);
17
20
  }
21
+ if (options.roles) {
22
+ const base = process.env.BIOFS_NODE_URL || `${process.env.GENOBANK_API_URL || 'https://genobank.app'}/api_biofs_node`;
23
+ const r = await axios_1.default.get(`${base}/whoami_roles`, {
24
+ headers: { 'X-Biofs-Wallet': creds.wallet_address, 'X-Biofs-Signature': creds.user_signature },
25
+ timeout: 30000, validateStatus: (s) => s < 500,
26
+ });
27
+ if (r.status >= 400)
28
+ throw new Error(`${r.status}: ${r.data?.error || 'unknown'}`);
29
+ const roles = r.data;
30
+ const profile = (0, paths_1.getActiveProfileName)();
31
+ if (options.json)
32
+ console.log(JSON.stringify({ ...roles, profile }, null, 2));
33
+ else
34
+ for (const l of (0, node_roles_1.rolesText)(roles, profile))
35
+ console.log(l);
36
+ return;
37
+ }
18
38
  // Verify signature if requested
19
39
  let signatureValid = false;
20
40
  let recoveredWallet = '';
@@ -1 +1 @@
1
- {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":";;;;;AAWA,sCAwHC;AAnID,yDAA6D;AAC7D,gDAA6C;AAC7C,kDAA0B;AAC1B,mCAAgC;AAQzB,KAAK,UAAU,aAAa,CAAC,OAAsB;IACxD,MAAM,WAAW,GAAG,gCAAkB,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,eAAe,EAAE,CAAC;IAElD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,eAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,gCAAgC;IAChC,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,mBAAmB,CAAC;YACpC,eAAe,GAAG,eAAM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C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC,CAAC;YAChF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC7C,CAAC;aAAM,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,gDAAgD,CAAC,CAAC,CAAC;YAC5E,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC,CAAC;YACrE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;AACH,CAAC"}
package/dist/index.js CHANGED
@@ -110,6 +110,11 @@ const exec_7 = require("./commands/ont-variants/exec");
110
110
  const submit_10 = require("./commands/hifi-align/submit");
111
111
  const exec_8 = require("./commands/hifi-align/exec");
112
112
  const register_derived_1 = require("./commands/register-derived");
113
+ const parabricks_1 = require("./commands/parabricks");
114
+ const inventory_register_1 = require("./commands/inventory-register");
115
+ const inventory_delegate_1 = require("./commands/inventory-delegate");
116
+ const job_view_1 = require("./commands/job-view");
117
+ const inventory_list_1 = require("./commands/inventory-list");
113
118
  const neoantigen_pipeline_1 = require("./commands/neoantigen-pipeline");
114
119
  const onramp_https_1 = require("./commands/onramp-https");
115
120
  const submit_11 = require("./commands/pbsv/submit");
@@ -270,6 +275,7 @@ program
270
275
  .description('Show current authenticated wallet')
271
276
  .option('--json', 'Output as JSON')
272
277
  .option('--verify', 'Verify signature validity')
278
+ .option('--roles', 'Ask the node whether this wallet is a node operator and which profile is active (read-only), with the one-line fix when it is not')
273
279
  .option('--check <wallet>', 'Check against specific wallet address (e.g., 0x0000000000000000000000000000000000000000)')
274
280
  .action(async (options) => {
275
281
  try {
@@ -4542,6 +4548,109 @@ synapsePullCmd
4542
4548
  .option('--wait', 'Poll until done or failed')
4543
4549
  .option('--json', 'Emit JSON')
4544
4550
  .action(async (id, options) => { await (0, neoantigen_pipeline_1.neoantigenStatusCommand)('synapse', id, options); });
4551
+ const publicFetchCmd = program
4552
+ .command('public-fetch')
4553
+ .description('Bring a PUBLIC ENA paired FASTQ run (or its first N read pairs) onto a governed worker and into your biowallet, with the archive\'s own size and MD5 as lineage (the job names an accession, never a URL; dispatched through biofs-node)');
4554
+ publicFetchCmd
4555
+ .command('submit <caseId>')
4556
+ .description('Submit a public archive fetch; nothing is downloaded by this machine')
4557
+ .requiredOption('--accession <run>', 'ENA run accession, for example SRR1234567 (paired Illumina run)')
4558
+ .requiredOption('--max-total-bytes <n>', 'Refuse the job if the run is larger than this many bytes (nothing is downloaded)')
4559
+ .option('--pairs <n>', 'Keep only the first N read pairs (1000 to 50000000), written with a deterministic gzip; the lineage says so')
4560
+ .option('--out-name <name>', 'Name stem of the two FASTQ files (default: the accession)')
4561
+ .option('--owner <biowallet>', 'Owner biowallet when an operator runs the job for a custodial biowallet (default: the signer)')
4562
+ .option('--wait', 'Poll until the job finishes')
4563
+ .option('--json', 'Emit JSON')
4564
+ .action(async (caseId, options) => { await (0, neoantigen_pipeline_1.publicFetchSubmitCommand)(caseId, options); });
4565
+ publicFetchCmd
4566
+ .command('status <job>')
4567
+ .description('Show a public fetch job (only the signer who submitted it can read it)')
4568
+ .option('--wait', 'Poll until done or failed')
4569
+ .option('--json', 'Emit JSON')
4570
+ .action(async (id, options) => { await (0, neoantigen_pipeline_1.neoantigenStatusCommand)('public_fetch', id, options); });
4571
+ program
4572
+ .command('inventory-list')
4573
+ .description('NODE OPERATOR, read-only: list the file rows of bioroutes.inventory for sample serials or one lab, grouped by file (never the whole inventory)')
4574
+ .option('--serial <serials...>', 'Sample serial numbers')
4575
+ .option('--lab <name>', 'Origin lab (for example augenomics)')
4576
+ .option('--type <types...>', 'File types (fastq, bam, vcf, gvcf, sqlite, ...)')
4577
+ .option('--limit <n>', 'Maximum rows (default 200, at most 500)')
4578
+ .option('--json', 'Emit JSON with the biocids')
4579
+ .action(async (options) => {
4580
+ try {
4581
+ await (0, inventory_list_1.inventoryListCommand)(options);
4582
+ }
4583
+ catch (e) {
4584
+ console.error(chalk_1.default.red(e.message));
4585
+ process.exit(1);
4586
+ }
4587
+ });
4588
+ program
4589
+ .command('inventory-register <biocids...>')
4590
+ .description('NODE OPERATOR: copy file rows already in bioroutes.inventory into biocid_registry so jobs can resolve them (owner unchanged, consent custodian, your attestation recorded; dry run unless --yes)')
4591
+ .requiredOption('--attest <text>', 'The basis on which GenoBank.io holds and uses these files (at least 20 characters, recorded with the rows)')
4592
+ .option('--yes', 'Write the rows (default is a dry run that writes nothing)')
4593
+ .option('--json', 'Emit JSON')
4594
+ .action(async (biocids, options) => {
4595
+ try {
4596
+ await (0, inventory_register_1.inventoryRegisterCommand)(biocids, options);
4597
+ }
4598
+ catch (e) {
4599
+ console.error(chalk_1.default.red(e.message));
4600
+ process.exit(1);
4601
+ }
4602
+ });
4603
+ program
4604
+ .command('jobs')
4605
+ .description('The governed jobs you may see (as owner, submitter, node operator or read-only viewer), newest first, with status, stage and elapsed time')
4606
+ .option('--limit <n>', 'How many (default 25, at most 100)')
4607
+ .option('--json', 'Emit JSON')
4608
+ .action(async (options) => {
4609
+ try {
4610
+ await (0, job_view_1.jobsCommand)(options);
4611
+ }
4612
+ catch (e) {
4613
+ console.error(chalk_1.default.red(e.message));
4614
+ process.exit(1);
4615
+ }
4616
+ });
4617
+ program
4618
+ .command('job-log <job>')
4619
+ .description('The run log of a governed job (pbrun\'s own output); --follow streams it live until the job ends')
4620
+ .option('--follow', 'Stream until the job ends')
4621
+ .option('--from <n>', 'Byte offset to start from (the next offset of the previous call)')
4622
+ .option('--json', 'Emit JSON lines')
4623
+ .action(async (job, options) => {
4624
+ try {
4625
+ await (0, job_view_1.jobLogCommand)(job, options);
4626
+ }
4627
+ catch (e) {
4628
+ console.error(chalk_1.default.red(e.message));
4629
+ process.exit(1);
4630
+ }
4631
+ });
4632
+ program
4633
+ .command('inventory-delegate <biocids...>')
4634
+ .description('OWNER SIGNATURE: the current owner (MetaMask) signs a message that hands the named biofiles to a new owner wallet while the named operators keep the right to run pipelines and deliver results to the new owner. Step 1 prints the message to sign; step 2 sends it with --signature (dry run unless --yes)')
4635
+ .requiredOption('--from <wallet>', 'The current owner wallet that signs (must equal the rows\' present owner)')
4636
+ .requiredOption('--to <wallet>', 'The new owner wallet')
4637
+ .requiredOption('--attest <text>', 'The basis on which the owner hands these files over (20 to 600 characters, signed and recorded)')
4638
+ .option('--operator <wallets...>', 'Operator wallets that keep pipeline rights (default: the owner and your signed-in wallet)')
4639
+ .option('--signature <hex>', 'The personal_sign signature of the message printed by step 1')
4640
+ .option('--nonce <hex>', 'The nonce printed by step 1 (required with --signature)')
4641
+ .option('--expires <iso>', 'The expiry printed by step 1 (required with --signature)')
4642
+ .option('--expires-hours <n>', 'Step 1 only: validity in hours (default 24, at most 168)')
4643
+ .option('--yes', 'Write the change (default is a dry run that writes nothing)')
4644
+ .option('--json', 'Emit JSON')
4645
+ .action(async (biocids, options) => {
4646
+ try {
4647
+ await (0, inventory_delegate_1.inventoryDelegateCommand)(biocids, options);
4648
+ }
4649
+ catch (e) {
4650
+ console.error(chalk_1.default.red(e.message));
4651
+ process.exit(1);
4652
+ }
4653
+ });
4545
4654
  const teslaGateCmd = program
4546
4655
  .command('tesla-gate')
4547
4656
  .description('The registered test of the case 1 evidence gate on the TESLA subjects: join variants to pMHC, apply the frozen gate, exact and permutation statistics (dispatched through biofs-node)');
@@ -4566,6 +4675,31 @@ teslaGateCmd
4566
4675
  .option('--wait', 'Poll until done or failed')
4567
4676
  .option('--json', 'Emit JSON')
4568
4677
  .action(async (id, options) => { await (0, neoantigen_pipeline_1.neoantigenStatusCommand)('tesla_gate', id, options); });
4678
+ const identityCmd = program
4679
+ .command('identity-concordance')
4680
+ .description('Are these samples the same individual? Pairwise genotype concordance and KING-robust kinship from the samples\' gVCFs under the registered identity protocol; gates any pooling or merging (dispatched through biofs-node, decision support only)');
4681
+ identityCmd
4682
+ .command('submit <caseId>')
4683
+ .description('Submit the identity comparison; every input is a gVCF biocid and the code and protocol hashes must be the registered ones')
4684
+ .requiredOption('--sample <pairs...>', 'label=biocid of a sample\'s gVCF, 2 to 8, repeatable: L13972=biocid://genobank/0x.../gvcf/...')
4685
+ .requiredOption('--code-sha256 <hex>', 'SHA-256 of identity_concordance.py as registered; the worker refuses any other code')
4686
+ .requiredOption('--protocol-sha256 <hex>', 'SHA-256 of the registered protocol')
4687
+ .requiredOption('--ledger-record <n>', 'The pre-registration ledger record number')
4688
+ .option('--min-depth <n>', 'Minimum depth of a confident genotype (default 10)')
4689
+ .option('--min-gq <n>', 'Minimum genotype quality (default 20)')
4690
+ .option('--executor <where>', 'auto (default): a healthy neoantigen worker agent, else this node; worker: only a worker, never falls back; local: only this node')
4691
+ .option('--owner <biowallet>', 'Owner biowallet when an operator runs the job for a custodial biowallet (default: the signer)')
4692
+ .option('--wait', 'Poll until the job finishes')
4693
+ .option('--json', 'Emit JSON')
4694
+ .action(async (caseId, options) => { await (0, neoantigen_pipeline_1.identitySubmitCommand)(caseId, options); });
4695
+ identityCmd
4696
+ .command('status <job>')
4697
+ .description('Show an identity job (only the signer who submitted it can read it)')
4698
+ .option('--wait', 'Poll until done or failed')
4699
+ .option('--json', 'Emit JSON')
4700
+ .action(async (id, options) => { await (0, neoantigen_pipeline_1.neoantigenStatusCommand)('identity', id, options); });
4701
+ // pbrun: one verb for each NVIDIA Parabricks tool, generated from the registry (src/commands/parabricks/registry.json)
4702
+ (0, parabricks_1.registerParabricksCommands)(program);
4569
4703
  const registerDerivedCmd = program
4570
4704
  .command('register-derived')
4571
4705
  .description('Give a biocid, with lineage, to a derived biofile (dispatched through biofs-node)');