@tonbo/cli 0.16.0 → 0.17.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 (2) hide show
  1. package/dist/bin/tonbo.js +34 -193
  2. package/package.json +1 -1
package/dist/bin/tonbo.js CHANGED
@@ -380,7 +380,8 @@ var managementOperations = {
380
380
  "path": "/sessions/store",
381
381
  "pathParams": [],
382
382
  "query": [
383
- "capture"
383
+ "capture",
384
+ "project"
384
385
  ],
385
386
  "idempotencyKey": false
386
387
  },
@@ -401,6 +402,7 @@ var managementOperations = {
401
402
  "pathParams": [],
402
403
  "query": [
403
404
  "origin",
405
+ "scope",
404
406
  "cursor",
405
407
  "limit"
406
408
  ],
@@ -433,149 +435,30 @@ var managementOperations = {
433
435
  "query": [],
434
436
  "idempotencyKey": false
435
437
  },
436
- "latestPersonalHandoffResult": {
438
+ "listProjectPeople": {
437
439
  "method": "GET",
438
- "path": "/yield/sessions/{sessionId}/latest-result",
440
+ "path": "/projects/{project_id}/people",
439
441
  "pathParams": [
440
- "sessionId"
442
+ "project_id"
441
443
  ],
442
444
  "query": [],
443
445
  "idempotencyKey": false
444
446
  },
445
- "listHandoffs": {
446
- "method": "GET",
447
- "path": "/yield/handoffs",
448
- "pathParams": [],
449
- "query": [],
450
- "idempotencyKey": false
451
- },
452
- "createPersonalHandoff": {
453
- "method": "POST",
454
- "path": "/yield/handoffs",
455
- "pathParams": [],
456
- "query": [],
457
- "idempotencyKey": false
458
- },
459
- "listHandoffEvents": {
460
- "method": "GET",
461
- "path": "/yield/handoffs/events",
462
- "pathParams": [],
463
- "query": [
464
- "after",
465
- "wait",
466
- "include"
467
- ],
468
- "idempotencyKey": false
469
- },
470
- "listTeamHandoffs": {
471
- "method": "GET",
472
- "path": "/yield/handoffs/team",
473
- "pathParams": [],
474
- "query": [],
475
- "idempotencyKey": false
476
- },
477
- "renewHandoffHolds": {
478
- "method": "POST",
479
- "path": "/yield/handoffs/holds",
480
- "pathParams": [],
481
- "query": [],
482
- "idempotencyKey": false
483
- },
484
- "showPersonalHandoff": {
485
- "method": "GET",
486
- "path": "/yield/handoffs/{id}",
487
- "pathParams": [
488
- "id"
489
- ],
490
- "query": [],
491
- "idempotencyKey": false
492
- },
493
- "takePersonalHandoff": {
494
- "method": "POST",
495
- "path": "/yield/handoffs/{id}/take",
496
- "pathParams": [
497
- "id"
498
- ],
499
- "query": [],
500
- "idempotencyKey": false
501
- },
502
- "markPersonalHandoffRestored": {
503
- "method": "POST",
504
- "path": "/yield/handoffs/{id}/restored",
505
- "pathParams": [
506
- "id"
507
- ],
508
- "query": [],
509
- "idempotencyKey": false
510
- },
511
- "startPersonalHandoff": {
512
- "method": "POST",
513
- "path": "/yield/handoffs/{id}/started",
514
- "pathParams": [
515
- "id"
516
- ],
517
- "query": [],
518
- "idempotencyKey": false
519
- },
520
- "needHumanPersonalHandoff": {
521
- "method": "POST",
522
- "path": "/yield/handoffs/{id}/need-human",
523
- "pathParams": [
524
- "id"
525
- ],
526
- "query": [],
527
- "idempotencyKey": false
528
- },
529
- "cancelPersonalHandoff": {
530
- "method": "POST",
531
- "path": "/yield/handoffs/{id}/cancel",
532
- "pathParams": [
533
- "id"
534
- ],
535
- "query": [],
536
- "idempotencyKey": false
537
- },
538
- "renewPersonalHandoffSource": {
539
- "method": "POST",
540
- "path": "/yield/handoffs/{id}/renew-source",
541
- "pathParams": [
542
- "id"
543
- ],
544
- "query": [],
545
- "idempotencyKey": false
546
- },
547
- "finishPersonalHandoff": {
548
- "method": "POST",
549
- "path": "/yield/handoffs/{id}/done",
550
- "pathParams": [
551
- "id"
552
- ],
553
- "query": [],
554
- "idempotencyKey": false
555
- },
556
- "pullPersonalHandoff": {
557
- "method": "GET",
558
- "path": "/yield/handoffs/{id}/result",
559
- "pathParams": [
560
- "id"
561
- ],
562
- "query": [],
563
- "idempotencyKey": false
564
- },
565
- "markPersonalHandoffPulled": {
447
+ "inviteProjectPerson": {
566
448
  "method": "POST",
567
- "path": "/yield/handoffs/{id}/pulled",
449
+ "path": "/projects/{project_id}/people",
568
450
  "pathParams": [
569
- "id"
451
+ "project_id"
570
452
  ],
571
453
  "query": [],
572
454
  "idempotencyKey": false
573
455
  },
574
- "renewPersonalHandoffResult": {
575
- "method": "POST",
576
- "path": "/yield/handoffs/{id}/renew-result",
456
+ "removeProjectPerson": {
457
+ "method": "DELETE",
458
+ "path": "/projects/{project_id}/people/{person}",
577
459
  "pathParams": [
578
- "id"
460
+ "project_id",
461
+ "person"
579
462
  ],
580
463
  "query": [],
581
464
  "idempotencyKey": false
@@ -650,68 +533,6 @@ var managementOperations = {
650
533
  "query": [],
651
534
  "idempotencyKey": false
652
535
  },
653
- "createYieldPickup": {
654
- "method": "POST",
655
- "path": "/yield/pickups",
656
- "pathParams": [],
657
- "query": [],
658
- "idempotencyKey": false
659
- },
660
- "listYieldQuestions": {
661
- "method": "GET",
662
- "path": "/yield/questions",
663
- "pathParams": [],
664
- "query": [
665
- "team",
666
- "limit"
667
- ],
668
- "idempotencyKey": false
669
- },
670
- "createYieldQuestion": {
671
- "method": "POST",
672
- "path": "/yield/questions",
673
- "pathParams": [],
674
- "query": [],
675
- "idempotencyKey": false
676
- },
677
- "showYieldQuestion": {
678
- "method": "GET",
679
- "path": "/yield/questions/{id}",
680
- "pathParams": [
681
- "id"
682
- ],
683
- "query": [],
684
- "idempotencyKey": false
685
- },
686
- "replyYieldQuestion": {
687
- "method": "POST",
688
- "path": "/yield/questions/{id}/replies",
689
- "pathParams": [
690
- "id"
691
- ],
692
- "query": [],
693
- "idempotencyKey": false
694
- },
695
- "closeYieldQuestion": {
696
- "method": "POST",
697
- "path": "/yield/questions/{id}/close",
698
- "pathParams": [
699
- "id"
700
- ],
701
- "query": [],
702
- "idempotencyKey": false
703
- },
704
- "listYieldDecisions": {
705
- "method": "GET",
706
- "path": "/yield/decisions",
707
- "pathParams": [],
708
- "query": [
709
- "project",
710
- "path",
711
- "limit"
712
- ],
713
- "idempotencyKey": false
714
- },
715
536
  "listDatabases": {
716
537
  "method": "GET",
717
538
  "path": "/databases",
@@ -5823,6 +5644,7 @@ function machineFields(machine, billing, etag = null, lastEnd = null) {
5823
5644
  ["Region", machine.region],
5824
5645
  ["State", machineState(machine)],
5825
5646
  ["Power", powerText(machine)],
5647
+ ...awakeFields(machine),
5826
5648
  ...activationFields(machine),
5827
5649
  ...lastEnd ? [["Last end", endText(lastEnd)]] : [],
5828
5650
  ...conditionFields(machine, billing),
@@ -5850,6 +5672,25 @@ function machineFields(machine, billing, etag = null, lastEnd = null) {
5850
5672
  ["Updated", machine.updated_at]
5851
5673
  ]);
5852
5674
  }
5675
+ function holderText(hold) {
5676
+ const until = hold.until ? ` until ${hold.until}` : "";
5677
+ return hold.kind === "edge_outage" ? `edge_outage${until}` : `${hold.kind} ${hold.count}${until}`;
5678
+ }
5679
+ function awakeFields(machine) {
5680
+ if (machine.state !== "active" || machine.status.power !== "awake") return [];
5681
+ const awake = machine.status.awake;
5682
+ if (awake === void 0) return [];
5683
+ if (awake === null) return [["Held by", "not reported yet; read it again in a few seconds"]];
5684
+ const held = awake.held_by.length > 0;
5685
+ const sleeps = awake.sleeps_at_earliest ? `${awake.sleeps_at_earliest} (${awake.sleeps_by === "idle_early" ? `idle_early: quiet for ${duration(earlyReclaimSeconds)}` : `sleep_after: idle for ${duration(machine.sleep_after_seconds)}`})` : held ? "not while anything holds it" : "not known yet";
5686
+ return [
5687
+ ["Held by", held ? awake.held_by.map(holderText).join(", ") : "nothing"],
5688
+ ...awake.idle_since ? [["Idle since", awake.idle_since]] : [],
5689
+ ["Quiet", awake.quiet.passes ? "yes" : `no: ${awake.quiet.reason ?? "measuring"}`],
5690
+ ["Sleeps at", sleeps],
5691
+ ["Judged at", awake.as_of]
5692
+ ];
5693
+ }
5853
5694
  function deleteFields(machine) {
5854
5695
  const seconds = machine.delete_after_seconds;
5855
5696
  if (seconds === void 0 || seconds === null) return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonbo/cli",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "The Tonbo CLI. Compute, disks, databases and streams for AI agents: your agent picks what it needs, sets it up, and knows what it costs, from the command line.",
5
5
  "homepage": "https://tonbo.dev",
6
6
  "bugs": {