@onesi/genesis 0.2.7 → 0.2.9

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/dist/genesis.d.ts CHANGED
@@ -369,6 +369,7 @@ export declare class Genesis extends GenesisClient {
369
369
  };
370
370
  }, options?: import("./minds-engine.js").MindsEngineOptions) => Promise<unknown>;
371
371
  getIndexStats: (mindId: string, input?: {}, options?: import("./minds-engine.js").MindsEngineOptions) => Promise<unknown>;
372
+ getMicrotheory: (mindId: string, input?: {}, options?: import("./minds-engine.js").MindsEngineOptions) => Promise<unknown>;
372
373
  postMicrotheoryKeyspace: (mindId: string, input: {
373
374
  body: {
374
375
  name: string;
@@ -1417,7 +1418,7 @@ export declare class Genesis extends GenesisClient {
1417
1418
  offset: number;
1418
1419
  }>;
1419
1420
  get: (slug: string, init?: {
1420
- signal?: AbortSignal;
1421
+ signal? /** Explicit KMS reveal with a persisted names-only audit. Do not log the plaintext. */: AbortSignal;
1421
1422
  }) => Promise<{
1422
1423
  provider: components["schemas"]["Blinds.ProviderSummary"];
1423
1424
  oauth2?: {
@@ -2195,9 +2196,7 @@ export declare class Genesis extends GenesisClient {
2195
2196
  }>;
2196
2197
  streamEvents: (run_id: string, options?: import("./henry.js").HenryStreamOptions) => AsyncGenerator<import("./henry.js").HenryStreamEvent, any, any>;
2197
2198
  replay: (run_id: string, options?: {
2198
- signal
2199
- /** Copies the parent's latest checkpoint (the default branch when no parent is given). */
2200
- ? /** Copies the parent's latest checkpoint (the default branch when no parent is given). */: AbortSignal;
2199
+ signal?: AbortSignal;
2201
2200
  }) => Promise<import("./henry.js").HenryReplay>;
2202
2201
  };
2203
2202
  };
@@ -2358,6 +2357,325 @@ export declare class Genesis extends GenesisClient {
2358
2357
  updated_at?: number;
2359
2358
  }>;
2360
2359
  };
2360
+ seats: {
2361
+ plans: () => Promise<{
2362
+ plans: components["schemas"]["Fleets.SeatPlan"][];
2363
+ credit?: {
2364
+ unit?: string;
2365
+ value_usd?: number;
2366
+ meaning?: string;
2367
+ };
2368
+ }>;
2369
+ list: () => Promise<{
2370
+ seats: components["schemas"]["Fleets.Seat"][];
2371
+ }>;
2372
+ hire: (body: {
2373
+ type: components["schemas"]["Fleets.SeatType"];
2374
+ name?: string;
2375
+ borrow_ceiling_credits?: number;
2376
+ pool_id?: string;
2377
+ fund?: boolean;
2378
+ idempotency_key: components["schemas"]["Fleets.IdempotencyKey"];
2379
+ }) => Promise<{
2380
+ id: string;
2381
+ object: "fleets.seat";
2382
+ type: components["schemas"]["Fleets.SeatType"];
2383
+ name?: string;
2384
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2385
+ pause_reason?: string;
2386
+ agent_id?: string | null;
2387
+ pool_id?: string | null;
2388
+ purse: components["schemas"]["Fleets.Purse"];
2389
+ computer: components["schemas"]["Fleets.Computer"];
2390
+ release?: components["schemas"]["Fleets.SeatRelease"];
2391
+ created_at?: string;
2392
+ updated_at?: string;
2393
+ }>;
2394
+ get: (seat_id: string) => Promise<{
2395
+ id: string;
2396
+ object: "fleets.seat";
2397
+ type: components["schemas"]["Fleets.SeatType"];
2398
+ name?: string;
2399
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2400
+ pause_reason?: string;
2401
+ agent_id?: string | null;
2402
+ pool_id?: string | null;
2403
+ purse: components["schemas"]["Fleets.Purse"];
2404
+ computer: components["schemas"]["Fleets.Computer"];
2405
+ release?: components["schemas"]["Fleets.SeatRelease"];
2406
+ created_at?: string;
2407
+ updated_at?: string;
2408
+ }>;
2409
+ update: (seat_id: string, body: {
2410
+ name?: string;
2411
+ borrow_ceiling_credits?: number;
2412
+ }) => Promise<{
2413
+ id: string;
2414
+ object: "fleets.seat";
2415
+ type: components["schemas"]["Fleets.SeatType"];
2416
+ name?: string;
2417
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2418
+ pause_reason?: string;
2419
+ agent_id?: string | null;
2420
+ pool_id?: string | null;
2421
+ purse: components["schemas"]["Fleets.Purse"];
2422
+ computer: components["schemas"]["Fleets.Computer"];
2423
+ release?: components["schemas"]["Fleets.SeatRelease"];
2424
+ created_at?: string;
2425
+ updated_at?: string;
2426
+ }>;
2427
+ topUp: (seat_id: string, credits: number, idempotency_key: string, computer_minutes?: number) => Promise<{
2428
+ id: string;
2429
+ object: "fleets.seat";
2430
+ type: components["schemas"]["Fleets.SeatType"];
2431
+ name?: string;
2432
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2433
+ pause_reason?: string;
2434
+ agent_id?: string | null;
2435
+ pool_id?: string | null;
2436
+ purse: components["schemas"]["Fleets.Purse"];
2437
+ computer: components["schemas"]["Fleets.Computer"];
2438
+ release?: components["schemas"]["Fleets.SeatRelease"];
2439
+ created_at?: string;
2440
+ updated_at?: string;
2441
+ }>;
2442
+ upgrade: (seat_id: string, type: "helper" | "operator" | "always_on") => Promise<{
2443
+ id: string;
2444
+ object: "fleets.seat";
2445
+ type: components["schemas"]["Fleets.SeatType"];
2446
+ name?: string;
2447
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2448
+ pause_reason?: string;
2449
+ agent_id?: string | null;
2450
+ pool_id?: string | null;
2451
+ purse: components["schemas"]["Fleets.Purse"];
2452
+ computer: components["schemas"]["Fleets.Computer"];
2453
+ release?: components["schemas"]["Fleets.SeatRelease"];
2454
+ created_at?: string;
2455
+ updated_at?: string;
2456
+ }>;
2457
+ hold: (seat_id: string) => Promise<{
2458
+ id: string;
2459
+ object: "fleets.seat";
2460
+ type: components["schemas"]["Fleets.SeatType"];
2461
+ name?: string;
2462
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2463
+ pause_reason?: string;
2464
+ agent_id?: string | null;
2465
+ pool_id?: string | null;
2466
+ purse: components["schemas"]["Fleets.Purse"];
2467
+ computer: components["schemas"]["Fleets.Computer"];
2468
+ release?: components["schemas"]["Fleets.SeatRelease"];
2469
+ created_at?: string;
2470
+ updated_at?: string;
2471
+ } & {
2472
+ cancelled_tasks: string[];
2473
+ agent_state?: string;
2474
+ }>;
2475
+ resume: (seat_id: string) => Promise<{
2476
+ id: string;
2477
+ object: "fleets.seat";
2478
+ type: components["schemas"]["Fleets.SeatType"];
2479
+ name?: string;
2480
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2481
+ pause_reason?: string;
2482
+ agent_id?: string | null;
2483
+ pool_id?: string | null;
2484
+ purse: components["schemas"]["Fleets.Purse"];
2485
+ computer: components["schemas"]["Fleets.Computer"];
2486
+ release?: components["schemas"]["Fleets.SeatRelease"];
2487
+ created_at?: string;
2488
+ updated_at?: string;
2489
+ }>;
2490
+ kill: (seat_id: string) => Promise<{
2491
+ id: string;
2492
+ object: "fleets.seat";
2493
+ type: components["schemas"]["Fleets.SeatType"];
2494
+ name?: string;
2495
+ state: "active" | "paused" | "held" | "killed" | "releasing" | "released";
2496
+ pause_reason?: string;
2497
+ agent_id?: string | null;
2498
+ pool_id?: string | null;
2499
+ purse: components["schemas"]["Fleets.Purse"];
2500
+ computer: components["schemas"]["Fleets.Computer"];
2501
+ release?: components["schemas"]["Fleets.SeatRelease"];
2502
+ created_at?: string;
2503
+ updated_at?: string;
2504
+ } & {
2505
+ cancelled_tasks: string[];
2506
+ agent_state?: string;
2507
+ }>;
2508
+ release: (seat_id: string) => Promise<{
2509
+ id: string;
2510
+ object: "fleets.seat.release";
2511
+ seat_id?: string;
2512
+ state: "released";
2513
+ returned_credits: number;
2514
+ returned_computer_minutes: number;
2515
+ unpaid_overdraft_credits?: number;
2516
+ spent_credits?: number;
2517
+ pool_id?: string | null;
2518
+ agent_deleted?: boolean;
2519
+ released_at?: string;
2520
+ }>;
2521
+ ledger: (seat_id: string) => Promise<{
2522
+ id?: string;
2523
+ entries: components["schemas"]["Fleets.SeatLedgerEntry"][];
2524
+ }>;
2525
+ tasks: {
2526
+ list: (seat_id: string) => Promise<{
2527
+ tasks: components["schemas"]["Fleets.SeatTask"][];
2528
+ }>;
2529
+ submit: (seat_id: string, body: {
2530
+ input: string;
2531
+ kind?: "research" | "computer";
2532
+ timeout_seconds?: number;
2533
+ approve_computer?: boolean;
2534
+ idempotency_key: components["schemas"]["Fleets.IdempotencyKey"];
2535
+ }) => Promise<{
2536
+ task_id: string;
2537
+ object?: "fleets.seat.task";
2538
+ seat_id: string;
2539
+ kind: "research" | "computer";
2540
+ state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
2541
+ output?: string | null;
2542
+ error?: string | null;
2543
+ approvals?: components["schemas"]["Fleets.SeatApproval"][];
2544
+ credits?: {
2545
+ reserved?: number;
2546
+ charged?: number | null;
2547
+ borrowed?: number;
2548
+ };
2549
+ computer_minutes?: number;
2550
+ computer_minutes_allowed?: number;
2551
+ settled?: boolean;
2552
+ receipt_url?: string;
2553
+ submitted_at?: string;
2554
+ completed_at?: string | null;
2555
+ }>;
2556
+ get: (seat_id: string, task_id: string) => Promise<{
2557
+ task_id: string;
2558
+ object?: "fleets.seat.task";
2559
+ seat_id: string;
2560
+ kind: "research" | "computer";
2561
+ state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
2562
+ output?: string | null;
2563
+ error?: string | null;
2564
+ approvals?: components["schemas"]["Fleets.SeatApproval"][];
2565
+ credits?: {
2566
+ reserved?: number;
2567
+ charged?: number | null;
2568
+ borrowed?: number;
2569
+ };
2570
+ computer_minutes?: number;
2571
+ computer_minutes_allowed?: number;
2572
+ settled?: boolean;
2573
+ receipt_url?: string;
2574
+ submitted_at?: string;
2575
+ completed_at?: string | null;
2576
+ }>;
2577
+ decide: (seat_id: string, task_id: string, approval_id: string, decision: "approve" | "deny") => Promise<{
2578
+ task_id: string;
2579
+ object?: "fleets.seat.task";
2580
+ seat_id: string;
2581
+ kind: "research" | "computer";
2582
+ state: "pending" | "running" | "awaiting_approval" | "completed" | "failed" | "cancelled" | "timed_out";
2583
+ output?: string | null;
2584
+ error?: string | null;
2585
+ approvals?: components["schemas"]["Fleets.SeatApproval"][];
2586
+ credits?: {
2587
+ reserved?: number;
2588
+ charged?: number | null;
2589
+ borrowed?: number;
2590
+ };
2591
+ computer_minutes?: number;
2592
+ computer_minutes_allowed?: number;
2593
+ settled?: boolean;
2594
+ receipt_url?: string;
2595
+ submitted_at?: string;
2596
+ completed_at?: string | null;
2597
+ }>;
2598
+ };
2599
+ };
2600
+ pools: {
2601
+ list: () => Promise<{
2602
+ pools: components["schemas"]["Fleets.Pool"][];
2603
+ }>;
2604
+ create: (body: {
2605
+ name?: string;
2606
+ credits: number;
2607
+ computer_minutes?: number;
2608
+ idempotency_key: components["schemas"]["Fleets.IdempotencyKey"];
2609
+ }) => Promise<{
2610
+ id: string;
2611
+ object: "fleets.pool";
2612
+ name?: string;
2613
+ state?: string;
2614
+ purse: components["schemas"]["Fleets.Purse"];
2615
+ computer: components["schemas"]["Fleets.Computer"];
2616
+ seats?: string[];
2617
+ release?: components["schemas"]["Fleets.PoolRelease"];
2618
+ created_at?: string;
2619
+ updated_at?: string;
2620
+ }>;
2621
+ get: (pool_id: string) => Promise<{
2622
+ id: string;
2623
+ object: "fleets.pool";
2624
+ name?: string;
2625
+ state?: string;
2626
+ purse: components["schemas"]["Fleets.Purse"];
2627
+ computer: components["schemas"]["Fleets.Computer"];
2628
+ seats?: string[];
2629
+ release?: components["schemas"]["Fleets.PoolRelease"];
2630
+ created_at?: string;
2631
+ updated_at?: string;
2632
+ }>;
2633
+ topUp: (pool_id: string, body: {
2634
+ credits: number;
2635
+ computer_minutes?: number;
2636
+ idempotency_key: components["schemas"]["Fleets.IdempotencyKey"];
2637
+ }) => Promise<{
2638
+ id: string;
2639
+ object: "fleets.pool";
2640
+ name?: string;
2641
+ state?: string;
2642
+ purse: components["schemas"]["Fleets.Purse"];
2643
+ computer: components["schemas"]["Fleets.Computer"];
2644
+ seats?: string[];
2645
+ release?: components["schemas"]["Fleets.PoolRelease"];
2646
+ created_at?: string;
2647
+ updated_at?: string;
2648
+ }>;
2649
+ ledger: (pool_id: string) => Promise<{
2650
+ id?: string;
2651
+ entries: components["schemas"]["Fleets.SeatLedgerEntry"][];
2652
+ }>;
2653
+ release: (pool_id: string) => Promise<{
2654
+ id: string;
2655
+ object: "fleets.pool.release";
2656
+ pool_id?: string;
2657
+ state: "released";
2658
+ returned_credits: number;
2659
+ returned_computer_minutes: number;
2660
+ unpaid_overdraft_credits?: number;
2661
+ spent_credits?: number;
2662
+ released_at?: string;
2663
+ }>;
2664
+ };
2665
+ computerConnection: {
2666
+ get: () => Promise<{
2667
+ connected: boolean;
2668
+ updated_at?: number;
2669
+ }>;
2670
+ set: (api_key: string) => Promise<{
2671
+ connected: boolean;
2672
+ updated_at?: number;
2673
+ }>;
2674
+ delete: () => Promise<{
2675
+ connected: boolean;
2676
+ updated_at?: number;
2677
+ }>;
2678
+ };
2361
2679
  usage: {
2362
2680
  events: (query?: In<"fleets_listUsageEvents">) => Promise<{
2363
2681
  events: components["schemas"]["Fleets.UsageEvent"][];
@@ -6675,9 +6993,7 @@ export declare class Genesis extends GenesisClient {
6675
6993
  };
6676
6994
  invoices: (org: string, query?: {
6677
6995
  service?: string;
6678
- limit
6679
- /** The Hives project id (prj_…) for a prj_… id, the selected context's Genesis pr_… id, or nothing (the selected context's binding). */
6680
- ? /** The Hives project id (prj_…) for a prj_… id, the selected context's Genesis pr_… id, or nothing (the selected context's binding). */: number;
6996
+ limit?: number;
6681
6997
  }) => Promise<{
6682
6998
  object: "list";
6683
6999
  org_id: string;
@@ -6764,6 +7080,72 @@ export declare class Genesis extends GenesisClient {
6764
7080
  }[];
6765
7081
  }>;
6766
7082
  };
7083
+ /** Your One credits: balance, ledger, usage, settings, checkout and subscription (login session, or an org API key with genesis.billing.read / .manage). */
7084
+ readonly credits: {
7085
+ get: () => Promise<{
7086
+ org: string;
7087
+ plan: string;
7088
+ period: {
7089
+ start: string | null;
7090
+ end: string | null;
7091
+ };
7092
+ balance_micro_usd: number;
7093
+ balance_credits: number;
7094
+ buckets: {
7095
+ allowance: number;
7096
+ seat?: number;
7097
+ pack: number;
7098
+ refill: number;
7099
+ grant: number;
7100
+ };
7101
+ month: {
7102
+ spent_micro_usd: number;
7103
+ by_source: {
7104
+ inference: number;
7105
+ computer: number;
7106
+ voice: number;
7107
+ };
7108
+ };
7109
+ borrow: components["schemas"]["Gateway.CreditBorrow"];
7110
+ auto_refill: components["schemas"]["Gateway.CreditAutoRefill"];
7111
+ subscription: components["schemas"]["Gateway.CreditSubscription"] | null;
7112
+ seat_funding_pending?: number;
7113
+ foundry?: {
7114
+ status: string;
7115
+ granted_micro_usd: number;
7116
+ };
7117
+ }>;
7118
+ entries: (query?: {
7119
+ limit?: number;
7120
+ before?: string;
7121
+ }) => Promise<{
7122
+ data: components["schemas"]["Gateway.CreditEntry"][];
7123
+ has_more: boolean;
7124
+ next_before: string | null;
7125
+ }>;
7126
+ usage: (query?: {
7127
+ ref?: string;
7128
+ }) => Promise<{
7129
+ ref: string | null;
7130
+ data: components["schemas"]["Gateway.CreditUsageRow"][];
7131
+ }>;
7132
+ updateSettings: (body: In<"gateway_updateCreditSettings">["body"], idempotencyKey: string) => Promise<{
7133
+ org: string;
7134
+ borrow: components["schemas"]["Gateway.CreditBorrow"];
7135
+ auto_refill: components["schemas"]["Gateway.CreditAutoRefill"];
7136
+ }>;
7137
+ checkout: (body: In<"gateway_createCreditCheckout">["body"], idempotencyKey: string) => Promise<{
7138
+ url: string;
7139
+ }>;
7140
+ changeSubscription: (body: In<"gateway_changeCreditSubscription">["body"], idempotencyKey: string) => Promise<{
7141
+ plan?: string;
7142
+ subscription: components["schemas"]["Gateway.CreditSubscription"] | null;
7143
+ }>;
7144
+ cancelSubscription: (idempotencyKey: string) => Promise<{
7145
+ plan?: string;
7146
+ subscription: components["schemas"]["Gateway.CreditSubscription"] | null;
7147
+ }>;
7148
+ };
6767
7149
  /** IAM v4: organizations, fleets, agents, roles, grants, capabilities and checks (login or org API key with iam:read / iam:write). */
6768
7150
  readonly iam: {
6769
7151
  orgs: {
@@ -8498,8 +8880,8 @@ export declare class Genesis extends GenesisClient {
8498
8880
  organizationId: string;
8499
8881
  billingAccountId: string;
8500
8882
  environmentId: "sandbox";
8501
- stripeAccountId: string;
8502
- stripeCustomerId: string | null;
8883
+ stripeAccountId?: string;
8884
+ stripeCustomerId?: string | null;
8503
8885
  livemode: false;
8504
8886
  canEnsure: boolean;
8505
8887
  } | {
@@ -8519,8 +8901,8 @@ export declare class Genesis extends GenesisClient {
8519
8901
  organizationId: string;
8520
8902
  billingAccountId: string;
8521
8903
  environmentId: "sandbox";
8522
- stripeAccountId: string;
8523
- stripeCustomerId: string | null;
8904
+ stripeAccountId?: string;
8905
+ stripeCustomerId?: string | null;
8524
8906
  livemode: false;
8525
8907
  canEnsure: boolean;
8526
8908
  } | {
@@ -8538,8 +8920,8 @@ export declare class Genesis extends GenesisClient {
8538
8920
  organizationId: string;
8539
8921
  billingAccountId: string;
8540
8922
  environmentId: "sandbox";
8541
- stripeAccountId: string;
8542
- stripeCustomerId: string | null;
8923
+ stripeAccountId?: string;
8924
+ stripeCustomerId?: string | null;
8543
8925
  livemode: false;
8544
8926
  canEnsure: boolean;
8545
8927
  } | {
@@ -8557,8 +8939,8 @@ export declare class Genesis extends GenesisClient {
8557
8939
  organizationId: string;
8558
8940
  billingAccountId: string;
8559
8941
  environmentId: "sandbox";
8560
- stripeAccountId: string;
8561
- stripeCustomerId: string | null;
8942
+ stripeAccountId?: string;
8943
+ stripeCustomerId?: string | null;
8562
8944
  livemode: false;
8563
8945
  canEnsure: boolean;
8564
8946
  } | {
@@ -10681,6 +11063,7 @@ export declare class Genesis extends GenesisClient {
10681
11063
  scopes: string[];
10682
11064
  expires_at?: string | null;
10683
11065
  created_at: string;
11066
+ binding?: components["schemas"]["Iam.ApiKeyBinding"] | null;
10684
11067
  }>;
10685
11068
  revoke: (key_id: string) => Promise<void>;
10686
11069
  };
package/dist/genesis.js CHANGED
@@ -20,7 +20,7 @@ import { tapsModule } from './taps.js';
20
20
  import { lanesModule } from './lanes.js';
21
21
  import { flaresModule } from './flares.js';
22
22
  import { tracesModule } from './traces.js';
23
- import { billingModule, gatewayModule, orgsModule } from './gateway.js';
23
+ import { billingModule, creditsModule, gatewayModule, orgsModule } from './gateway.js';
24
24
  import { orgsEntitiesModule } from './orgs.js';
25
25
  import { iamModule } from './iam.js';
26
26
  import { boxesModule } from './boxes.js';
@@ -64,6 +64,8 @@ export class Genesis extends GenesisClient {
64
64
  /** Your organization's usage and billing reads, and Orgs: legal entities, seats, resolutions, documents, filings, formation and the record. */
65
65
  orgs = { ...orgsModule(this), ...orgsEntitiesModule(this) };
66
66
  billing = billingModule(this);
67
+ /** Your One credits: balance, ledger, usage, settings, checkout and subscription (login session, or an org API key with genesis.billing.read / .manage). */
68
+ credits = creditsModule(this);
67
69
  /** IAM v4: organizations, fleets, agents, roles, grants, capabilities and checks (login or org API key with iam:read / iam:write). */
68
70
  iam = iamModule(this);
69
71
  taps = tapsModule(this);