cencori 1.6.1 → 1.7.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.
package/README.md CHANGED
@@ -31,8 +31,34 @@ console.log(response.content);
31
31
  | Product | Status | Description |
32
32
  |---------|--------|-------------|
33
33
  | **AI Gateway** | ✅ Available | Multi-provider routing, security, observability |
34
+ | **Web** | ✅ Available | First-party fetch, extraction, crawl, and evidence-bearing search |
34
35
  | **Billing** | ✅ Available | End-user usage monetization and Stripe integration |
35
36
  | **Integration** | ✅ Available | SDKs, Vercel AI, TanStack |
37
+ | **Embedded Agents** | ✅ Available | Multi-tenant agent backend: tenants, versions, runs, approvals, metering |
38
+
39
+ ## Embedded Agents
40
+
41
+ ```typescript
42
+ import { Cencori } from 'cencori';
43
+
44
+ const cencori = new Cencori({ apiKey: process.env.CENCORI_API_KEY });
45
+
46
+ // Tenants → install → scoped session
47
+ const tenant = await cencori.tenants.create({ external_id: 'company_123', name: 'Acme Ltd' });
48
+ await cencori.installations.create({ tenant_id: tenant.id, agent_id: 'agt_...', version: '1.0.0' });
49
+ const { token } = await cencori.clientTokens.mint({ tenant_id: tenant.id, external_user_id: 'u_1' });
50
+
51
+ // Background run with idempotency, then approve once
52
+ const run = await cencori.runs.create('agt_...', { installation_id: 'ins_...', mode: 'background', input: {} }, 'plan-123');
53
+ await cencori.actions.approve('act_...');
54
+
55
+ // Skills, MCP, usage
56
+ await cencori.skills.create({ name: 'Refund policy' });
57
+ await cencori.mcpServers.register({ name: 'CRM', url: 'https://mcp.example.com/mcp' });
58
+ const csv = await cencori.usage.exportCsv({ days: 30, tenant_id: tenant.id });
59
+ ```
60
+
61
+ Namespaces: `tenants`, `clientTokens`, `models`, `providerConnections`, `agentVersions`, `installations`, `runs`, `actions`, `knowledge`, `connections`, `mcpServers`, `skills`, `skillImports`, `webhooks`, `usage`, `endUsers`, `ratePlans`. Full reference: https://cencori.com/openapi/embedded-agents.json.
36
62
 
37
63
  ## AI Gateway
38
64
 
@@ -195,6 +221,34 @@ const { answer } = await cencori.documents.query({
195
221
 
196
222
  Full API in [docs](https://cencori.com/docs/ai/endpoints/documents). See the [Contract Analyzer tutorial](https://cencori.com/docs/guides/build-a-contract-analyzer) for an end-to-end example.
197
223
 
224
+ ### Web Search and Retrieval
225
+
226
+ Fetch and extract public pages, build a private project corpus, or search Cencori's continuously refreshed public index:
227
+
228
+ ```typescript
229
+ const results = await cencori.web.search({
230
+ query: 'PostgreSQL row-level locking',
231
+ freshness: '30d',
232
+ limit: 10,
233
+ });
234
+
235
+ for (const result of results.results) {
236
+ console.log(result.title, result.canonicalUrl, result.evidence.quote);
237
+ }
238
+
239
+ const page = await cencori.web.extract({
240
+ url: 'https://www.postgresql.org/docs/current/explicit-locking.html',
241
+ });
242
+
243
+ await cencori.web.crawl({
244
+ seeds: ['https://docs.example.com/'],
245
+ maxPages: 100,
246
+ maxDepth: 2,
247
+ });
248
+ ```
249
+
250
+ For tool-calling agents, import `WEB_SEARCH_TOOL` or `WEB_FETCH_TOOL` from `cencori/web`, then resolve emitted calls with `cencori.web.executeTool(...)`. Retrieved page content is always marked as untrusted input.
251
+
198
252
  ### Image Generation
199
253
 
200
254
  Generate images from text prompts using multiple providers:
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig, a as ChatRequest, b as ChatResponse, T as ToolCall, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, G as GenerateObjectRequest, e as GenerateObjectResponse, I as ImageGenerationRequest, f as ImageGenerationResponse, R as ResponsesRequest, g as ResponsesResponse } from '../types-kh1whvNH.mjs';
1
+ import { C as CencoriConfig, a as ChatRequest, b as ChatResponse, T as ToolCall, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, G as GenerateObjectRequest, e as GenerateObjectResponse, I as ImageGenerationRequest, f as ImageGenerationResponse, R as ResponsesRequest, g as ResponsesResponse } from '../types-xSwLRBZw.mjs';
2
2
 
3
3
  /**
4
4
  * AI Gateway - Chat, Completions, Embeddings, and Streaming
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig, a as ChatRequest, b as ChatResponse, T as ToolCall, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, G as GenerateObjectRequest, e as GenerateObjectResponse, I as ImageGenerationRequest, f as ImageGenerationResponse, R as ResponsesRequest, g as ResponsesResponse } from '../types-kh1whvNH.js';
1
+ import { C as CencoriConfig, a as ChatRequest, b as ChatResponse, T as ToolCall, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, G as GenerateObjectRequest, e as GenerateObjectResponse, I as ImageGenerationRequest, f as ImageGenerationResponse, R as ResponsesRequest, g as ResponsesResponse } from '../types-xSwLRBZw.js';
2
2
 
3
3
  /**
4
4
  * AI Gateway - Chat, Completions, Embeddings, and Streaming
@@ -1,4 +1,4 @@
1
- import { h as ComputeRunOptions } from '../types-kh1whvNH.mjs';
1
+ import { h as ComputeRunOptions } from '../types-xSwLRBZw.mjs';
2
2
 
3
3
  /**
4
4
  * Compute Namespace - Serverless Functions & GPU Access
@@ -1,4 +1,4 @@
1
- import { h as ComputeRunOptions } from '../types-kh1whvNH.js';
1
+ import { h as ComputeRunOptions } from '../types-xSwLRBZw.js';
2
2
 
3
3
  /**
4
4
  * Compute Namespace - Serverless Functions & GPU Access
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-kh1whvNH.mjs';
1
+ import { C as CencoriConfig } from '../types-xSwLRBZw.mjs';
2
2
 
3
3
  /**
4
4
  * Documents API — extract text from PDFs and images, summarize, and query.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-kh1whvNH.js';
1
+ import { C as CencoriConfig } from '../types-xSwLRBZw.js';
2
2
 
3
3
  /**
4
4
  * Documents API — extract text from PDFs and images, summarize, and query.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CencoriConfig, i as RequestOptions } from './types-kh1whvNH.mjs';
2
- export { j as ChatMessage, a as ChatRequest, b as ChatResponse, o as CodeInterpreterTool, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, F as FileSearchTool, l as ResponseInputItem, k as ResponsesOutputItem, R as ResponsesRequest, g as ResponsesResponse, m as ResponsesTool, U as UrlCitation, n as WebSearchTool } from './types-kh1whvNH.mjs';
1
+ import { C as CencoriConfig, i as RequestOptions } from './types-xSwLRBZw.mjs';
2
+ export { j as ChatMessage, a as ChatRequest, b as ChatResponse, o as CodeInterpreterTool, c as CompletionRequest, E as EmbeddingRequest, d as EmbeddingResponse, F as FileSearchTool, l as ResponseInputItem, k as ResponsesOutputItem, R as ResponsesRequest, g as ResponsesResponse, m as ResponsesTool, U as UrlCitation, n as WebSearchTool } from './types-xSwLRBZw.mjs';
3
3
  import { AINamespace } from './ai/index.mjs';
4
4
  export { StreamChunk } from './ai/index.mjs';
5
5
  import { VisionNamespace } from './vision/index.mjs';
@@ -310,6 +310,539 @@ declare class ChatNamespace {
310
310
  constructor(config: Required<CencoriConfig>);
311
311
  }
312
312
 
313
+ interface Tenant {
314
+ id: string;
315
+ external_id: string;
316
+ name: string;
317
+ status: string;
318
+ region: string | null;
319
+ metadata: Record<string, unknown>;
320
+ created_at: string;
321
+ updated_at: string;
322
+ }
323
+ declare class TenantsNamespace {
324
+ private config;
325
+ constructor(config: Required<CencoriConfig>);
326
+ create(params: {
327
+ external_id: string;
328
+ name: string;
329
+ region?: string;
330
+ metadata?: Record<string, unknown>;
331
+ }, idempotencyKey?: string): Promise<Tenant>;
332
+ list(params?: {
333
+ limit?: number;
334
+ cursor?: string;
335
+ status?: string;
336
+ }): Promise<{
337
+ data: Tenant[];
338
+ next_cursor: string | null;
339
+ }>;
340
+ get(tenantId: string): Promise<Tenant>;
341
+ update(tenantId: string, params: {
342
+ name?: string;
343
+ metadata?: Record<string, unknown>;
344
+ region?: string | null;
345
+ }): Promise<Tenant>;
346
+ remove(tenantId: string): Promise<{
347
+ id: string;
348
+ status: string;
349
+ deleted?: Record<string, number>;
350
+ }>;
351
+ exportData(tenantId: string): Promise<{
352
+ tenant: Tenant;
353
+ users: unknown[];
354
+ exported_at: string;
355
+ }>;
356
+ upsertUser(tenantId: string, externalUserId: string, params?: {
357
+ display_name?: string;
358
+ roles?: string[];
359
+ groups?: string[];
360
+ metadata?: Record<string, unknown>;
361
+ }): Promise<unknown>;
362
+ getUser(tenantId: string, externalUserId: string): Promise<unknown>;
363
+ patchUser(tenantId: string, externalUserId: string, params: Record<string, unknown>): Promise<unknown>;
364
+ listUsers(tenantId: string): Promise<{
365
+ data: unknown[];
366
+ next_cursor: string | null;
367
+ }>;
368
+ deleteUser(tenantId: string, externalUserId: string, hard?: boolean): Promise<{
369
+ deleted: boolean;
370
+ }>;
371
+ }
372
+ declare class ClientTokensNamespace {
373
+ private config;
374
+ constructor(config: Required<CencoriConfig>);
375
+ mint(params: {
376
+ tenant_id: string;
377
+ external_user_id: string;
378
+ installation_ids?: string[];
379
+ permissions?: string[];
380
+ expires_in?: number;
381
+ session_id?: string;
382
+ }): Promise<{
383
+ token: string;
384
+ expires_at: string;
385
+ }>;
386
+ }
387
+ interface UnifiedModel {
388
+ id: string;
389
+ object: 'model';
390
+ created: number;
391
+ owned_by: string;
392
+ name: string;
393
+ type: string;
394
+ types: string[];
395
+ context_window: number;
396
+ provider: string;
397
+ source: 'cencori' | 'byok' | 'custom';
398
+ connection_id: string | null;
399
+ status: string;
400
+ available: boolean;
401
+ unavailable_reason: string | null;
402
+ }
403
+ declare class ModelsNamespace {
404
+ private config;
405
+ constructor(config: Required<CencoriConfig>);
406
+ list(params?: {
407
+ provider?: string;
408
+ type?: string;
409
+ available?: boolean;
410
+ source?: string;
411
+ connection_id?: string;
412
+ }): Promise<{
413
+ object: string;
414
+ data: UnifiedModel[];
415
+ providers: unknown[];
416
+ }>;
417
+ }
418
+ declare class ProviderConnectionsNamespace {
419
+ private config;
420
+ constructor(config: Required<CencoriConfig>);
421
+ create(params: {
422
+ name: string;
423
+ provider: string;
424
+ api_format?: string;
425
+ base_url?: string;
426
+ api_key?: string;
427
+ }, idempotencyKey?: string): Promise<unknown>;
428
+ list(): Promise<{
429
+ data: unknown[];
430
+ next_cursor: string | null;
431
+ }>;
432
+ get(connectionId: string): Promise<unknown>;
433
+ update(connectionId: string, params: {
434
+ name?: string;
435
+ api_key?: string;
436
+ status?: string;
437
+ base_url?: string;
438
+ }): Promise<unknown>;
439
+ remove(connectionId: string): Promise<{
440
+ deleted: boolean;
441
+ }>;
442
+ validate(params: {
443
+ provider: string;
444
+ base_url?: string;
445
+ api_key?: string;
446
+ api_format?: string;
447
+ }): Promise<{
448
+ valid: boolean;
449
+ }>;
450
+ test(connectionId: string): Promise<unknown>;
451
+ previewSync(connectionId: string): Promise<{
452
+ id: string;
453
+ status: string;
454
+ counts: Record<string, number>;
455
+ }>;
456
+ getSync(connectionId: string, syncId: string): Promise<unknown>;
457
+ applySync(connectionId: string, syncId: string, idempotencyKey?: string): Promise<unknown>;
458
+ }
459
+ declare class AgentVersionsNamespace {
460
+ private config;
461
+ constructor(config: Required<CencoriConfig>);
462
+ create(agentId: string, params: {
463
+ version: string;
464
+ config?: Record<string, unknown>;
465
+ requirements?: Record<string, unknown>;
466
+ visibility?: string;
467
+ }): Promise<unknown>;
468
+ list(agentId: string, status?: string): Promise<{
469
+ data: unknown[];
470
+ next_cursor: string | null;
471
+ }>;
472
+ get(agentId: string, version: string): Promise<unknown>;
473
+ validate(agentId: string, version: string): Promise<unknown>;
474
+ submit(agentId: string, version: string): Promise<unknown>;
475
+ review(agentId: string, version: string, params: {
476
+ decision: 'approve' | 'reject';
477
+ reviewed_by?: string;
478
+ reason?: string;
479
+ visibility?: string;
480
+ }): Promise<unknown>;
481
+ publish(agentId: string, version: string): Promise<unknown>;
482
+ test(agentId: string, version: string, params?: {
483
+ input?: string;
484
+ test_connection_ids?: string[];
485
+ }): Promise<unknown>;
486
+ deprecate(agentId: string, version: string): Promise<unknown>;
487
+ retire(agentId: string, version: string): Promise<unknown>;
488
+ catalog(params?: {
489
+ visibility?: string;
490
+ agent_id?: string;
491
+ }): Promise<{
492
+ data: unknown[];
493
+ next_cursor: string | null;
494
+ }>;
495
+ }
496
+ declare class InstallationsNamespace {
497
+ private config;
498
+ constructor(config: Required<CencoriConfig>);
499
+ create(params: {
500
+ tenant_id: string;
501
+ agent_id: string;
502
+ version?: string;
503
+ update_channel?: string;
504
+ knowledge_base_ids?: string[];
505
+ connection_ids?: string[];
506
+ approval_policy?: Record<string, unknown>;
507
+ }): Promise<unknown>;
508
+ list(tenantId?: string): Promise<{
509
+ data: unknown[];
510
+ next_cursor: string | null;
511
+ }>;
512
+ get(installationId: string): Promise<unknown>;
513
+ update(installationId: string, params: Record<string, unknown>): Promise<unknown>;
514
+ remove(installationId: string): Promise<unknown>;
515
+ upgrade(installationId: string, params?: {
516
+ version?: string;
517
+ }): Promise<unknown>;
518
+ rollback(installationId: string): Promise<unknown>;
519
+ }
520
+ declare class RunsNamespace {
521
+ private config;
522
+ constructor(config: Required<CencoriConfig>);
523
+ create(agentId: string, params: {
524
+ installation_id?: string;
525
+ tenant_id?: string;
526
+ external_user_id?: string;
527
+ mode?: string;
528
+ input?: unknown;
529
+ response_format?: unknown;
530
+ session_id?: string;
531
+ }, idempotencyKey?: string): Promise<unknown>;
532
+ get(runId: string): Promise<unknown>;
533
+ events(runId: string, params?: {
534
+ after?: string;
535
+ limit?: number;
536
+ }): Promise<{
537
+ data: unknown[];
538
+ next_cursor: string | null;
539
+ }>;
540
+ cancel(runId: string): Promise<unknown>;
541
+ delegate(runId: string, params: {
542
+ agent_version_id: string;
543
+ input?: unknown;
544
+ installation_id?: string;
545
+ }, idempotencyKey?: string): Promise<unknown>;
546
+ }
547
+ declare class ActionsNamespace {
548
+ private config;
549
+ constructor(config: Required<CencoriConfig>);
550
+ create(params: {
551
+ tool: string;
552
+ arguments?: Record<string, unknown>;
553
+ run_id?: string;
554
+ session_id?: string;
555
+ tenant_id?: string;
556
+ approval_policy?: Record<string, unknown>;
557
+ }, idempotencyKey?: string): Promise<unknown>;
558
+ get(actionId: string): Promise<unknown>;
559
+ approve(actionId: string, params?: {
560
+ approved_by?: string;
561
+ }): Promise<unknown>;
562
+ reject(actionId: string, params?: {
563
+ rejected_by?: string;
564
+ reason?: string;
565
+ }): Promise<unknown>;
566
+ }
567
+ declare class KnowledgeNamespace {
568
+ private config;
569
+ constructor(config: Required<CencoriConfig>);
570
+ createBase(params: {
571
+ name: string;
572
+ tenant_id?: string;
573
+ scope_type?: string;
574
+ region?: string;
575
+ }): Promise<unknown>;
576
+ listBases(tenantId?: string): Promise<{
577
+ data: unknown[];
578
+ next_cursor: string | null;
579
+ }>;
580
+ getBase(kbId: string): Promise<unknown>;
581
+ updateBase(kbId: string, params: {
582
+ name?: string;
583
+ status?: string;
584
+ retention_policy?: Record<string, unknown>;
585
+ }): Promise<unknown>;
586
+ removeBase(kbId: string): Promise<{
587
+ deleted: boolean;
588
+ }>;
589
+ addInlineSource(kbId: string, text: string, metadata?: Record<string, unknown>): Promise<unknown>;
590
+ listSources(kbId: string): Promise<{
591
+ data: unknown[];
592
+ next_cursor: string | null;
593
+ }>;
594
+ getSource(kbId: string, sourceId: string): Promise<unknown>;
595
+ removeSource(kbId: string, sourceId: string): Promise<{
596
+ deleted: boolean;
597
+ }>;
598
+ syncSource(kbId: string, sourceId: string, text?: string): Promise<unknown>;
599
+ listGrants(kbId: string): Promise<{
600
+ data: unknown[];
601
+ next_cursor: string | null;
602
+ }>;
603
+ revokeGrant(kbId: string, grantId: string): Promise<{
604
+ deleted: boolean;
605
+ }>;
606
+ grant(kbId: string, params: {
607
+ subject_type: string;
608
+ subject_id: string;
609
+ permissions?: string[];
610
+ }): Promise<unknown>;
611
+ search(kbId: string, params: {
612
+ query: string;
613
+ top_k?: number;
614
+ installation_id?: string;
615
+ }): Promise<{
616
+ data: unknown[];
617
+ }>;
618
+ }
619
+ declare class SkillsNamespace {
620
+ private config;
621
+ constructor(config: Required<CencoriConfig>);
622
+ create(params: {
623
+ name: string;
624
+ slug?: string;
625
+ description?: string;
626
+ visibility?: string;
627
+ tenant_id?: string;
628
+ }): Promise<unknown>;
629
+ list(params?: {
630
+ visibility?: string;
631
+ tenant_id?: string;
632
+ }): Promise<{
633
+ data: unknown[];
634
+ next_cursor: string | null;
635
+ }>;
636
+ get(skillId: string): Promise<unknown>;
637
+ update(skillId: string, params: {
638
+ name?: string;
639
+ description?: string;
640
+ visibility?: string;
641
+ status?: string;
642
+ }): Promise<unknown>;
643
+ createVersion(skillId: string, params: {
644
+ version: string;
645
+ content?: string;
646
+ files?: Array<{
647
+ path?: string;
648
+ content?: string;
649
+ }>;
650
+ }): Promise<unknown>;
651
+ listVersions(skillId: string): Promise<{
652
+ data: unknown[];
653
+ next_cursor: string | null;
654
+ }>;
655
+ getVersion(skillId: string, version: string): Promise<unknown>;
656
+ publishVersion(skillId: string, version: string, params?: {
657
+ reviewed_by?: string;
658
+ }): Promise<unknown>;
659
+ deprecateVersion(skillId: string, version: string): Promise<unknown>;
660
+ }
661
+ declare class SkillImportsNamespace {
662
+ private config;
663
+ constructor(config: Required<CencoriConfig>);
664
+ stage(params: {
665
+ url?: string;
666
+ repository?: string;
667
+ text?: string;
668
+ files?: Array<{
669
+ path?: string;
670
+ content?: string;
671
+ }>;
672
+ tenant_id?: string;
673
+ }): Promise<unknown>;
674
+ get(importId: string): Promise<unknown>;
675
+ publish(importId: string, params: {
676
+ name?: string;
677
+ skill_id?: string;
678
+ visibility?: string;
679
+ version?: string;
680
+ reviewed_by?: string;
681
+ }): Promise<unknown>;
682
+ }
683
+ declare class ConnectionsNamespace {
684
+ private config;
685
+ constructor(config: Required<CencoriConfig>);
686
+ listConnectors(): Promise<{
687
+ data: unknown[];
688
+ next_cursor: string | null;
689
+ }>;
690
+ getConnector(connectorId: string): Promise<unknown>;
691
+ create(params: {
692
+ connector?: string;
693
+ owner_type?: string;
694
+ tenant_id?: string;
695
+ external_user_id?: string;
696
+ api_key?: string;
697
+ scopes?: string[];
698
+ }): Promise<unknown>;
699
+ list(tenantId?: string): Promise<{
700
+ data: unknown[];
701
+ next_cursor: string | null;
702
+ }>;
703
+ get(connectionId: string): Promise<unknown>;
704
+ update(connectionId: string, params: {
705
+ scopes?: string[];
706
+ metadata?: Record<string, unknown>;
707
+ }): Promise<unknown>;
708
+ remove(connectionId: string): Promise<unknown>;
709
+ authorize(connectionId: string, params: {
710
+ redirect_uri?: string;
711
+ scopes?: string[];
712
+ }): Promise<{
713
+ authorize_url: string;
714
+ state: string;
715
+ }>;
716
+ test(connectionId: string): Promise<unknown>;
717
+ refresh(connectionId: string): Promise<unknown>;
718
+ registerMcpServer(params: {
719
+ name: string;
720
+ url: string;
721
+ transport?: string;
722
+ tenant_id?: string;
723
+ }): Promise<unknown>;
724
+ mcpTools(serverId: string): Promise<{
725
+ tools: unknown[];
726
+ }>;
727
+ refreshMcpTools(serverId: string): Promise<unknown>;
728
+ }
729
+ declare class McpServersNamespace {
730
+ private config;
731
+ constructor(config: Required<CencoriConfig>);
732
+ list(tenantId?: string): Promise<{
733
+ data: unknown[];
734
+ next_cursor: string | null;
735
+ }>;
736
+ get(serverId: string): Promise<unknown>;
737
+ register(params: {
738
+ name: string;
739
+ url: string;
740
+ transport?: string;
741
+ tenant_id?: string;
742
+ auth_connection_id?: string;
743
+ }): Promise<unknown>;
744
+ update(serverId: string, params: {
745
+ name?: string;
746
+ url?: string;
747
+ status?: string;
748
+ auth_connection_id?: string | null;
749
+ }): Promise<unknown>;
750
+ remove(serverId: string): Promise<{
751
+ id: string;
752
+ status: string;
753
+ }>;
754
+ test(serverId: string): Promise<unknown>;
755
+ tools(serverId: string): Promise<{
756
+ tools: unknown[];
757
+ }>;
758
+ refreshTools(serverId: string): Promise<unknown>;
759
+ }
760
+ declare class WebhooksNamespace {
761
+ private config;
762
+ constructor(config: Required<CencoriConfig>);
763
+ create(params: {
764
+ name: string;
765
+ url: string;
766
+ events?: string[];
767
+ }): Promise<unknown>;
768
+ update(webhookId: string, params: {
769
+ name?: string;
770
+ url?: string;
771
+ events?: string[];
772
+ is_active?: boolean;
773
+ }): Promise<unknown>;
774
+ list(): Promise<{
775
+ data: unknown[];
776
+ next_cursor: string | null;
777
+ }>;
778
+ remove(webhookId: string): Promise<{
779
+ deleted: boolean;
780
+ }>;
781
+ deliveries(): Promise<{
782
+ data: unknown[];
783
+ next_cursor: string | null;
784
+ }>;
785
+ replay(deliveryId: string): Promise<unknown>;
786
+ }
787
+ declare class UsageNamespace {
788
+ private config;
789
+ constructor(config: Required<CencoriConfig>);
790
+ summary(params?: {
791
+ days?: number;
792
+ tenant_id?: string;
793
+ agent_id?: string;
794
+ }): Promise<{
795
+ totals: unknown;
796
+ groups: unknown[];
797
+ }>;
798
+ events(params?: {
799
+ days?: number;
800
+ tenant_id?: string;
801
+ agent_id?: string;
802
+ limit?: number;
803
+ cursor?: string;
804
+ }): Promise<{
805
+ data: unknown[];
806
+ next_cursor: string | null;
807
+ }>;
808
+ exportCsv(params?: {
809
+ days?: number;
810
+ tenant_id?: string;
811
+ agent_id?: string;
812
+ }): Promise<string>;
813
+ }
814
+ declare class EndUsersNamespace {
815
+ private config;
816
+ constructor(config: Required<CencoriConfig>);
817
+ list(limit?: number): Promise<{
818
+ data: unknown[];
819
+ next_cursor: string | null;
820
+ }>;
821
+ upsert(params: {
822
+ external_id: string;
823
+ display_name?: string;
824
+ email?: string;
825
+ rate_plan_id?: string | null;
826
+ is_blocked?: boolean;
827
+ metadata?: Record<string, unknown>;
828
+ }): Promise<unknown>;
829
+ }
830
+ declare class RatePlansNamespace {
831
+ private config;
832
+ constructor(config: Required<CencoriConfig>);
833
+ list(): Promise<{
834
+ data: unknown[];
835
+ next_cursor: string | null;
836
+ }>;
837
+ create(params: {
838
+ name: string;
839
+ slug?: string;
840
+ markup_percentage?: number;
841
+ flat_rate?: number;
842
+ currency?: string;
843
+ }): Promise<unknown>;
844
+ }
845
+
313
846
  /**
314
847
  * Cencori - Unified AI Infrastructure SDK
315
848
  *
@@ -492,6 +1025,24 @@ declare class Cencori {
492
1025
  * const results = await cencori.web.search({ query: 'authentication guide' });
493
1026
  */
494
1027
  readonly web: WebNamespace;
1028
+ /** Embedded Agents - multi-tenant agent backend (tenants, versions, runs, knowledge). */
1029
+ readonly tenants: TenantsNamespace;
1030
+ readonly clientTokens: ClientTokensNamespace;
1031
+ readonly models: ModelsNamespace;
1032
+ readonly providerConnections: ProviderConnectionsNamespace;
1033
+ readonly agentVersions: AgentVersionsNamespace;
1034
+ readonly installations: InstallationsNamespace;
1035
+ readonly runs: RunsNamespace;
1036
+ readonly actions: ActionsNamespace;
1037
+ readonly knowledge: KnowledgeNamespace;
1038
+ readonly connections: ConnectionsNamespace;
1039
+ readonly mcpServers: McpServersNamespace;
1040
+ readonly skills: SkillsNamespace;
1041
+ readonly skillImports: SkillImportsNamespace;
1042
+ readonly webhooks: WebhooksNamespace;
1043
+ readonly usage: UsageNamespace;
1044
+ readonly endUsers: EndUsersNamespace;
1045
+ readonly ratePlans: RatePlansNamespace;
495
1046
  /**
496
1047
  * Create a new Cencori client
497
1048
  *
@@ -563,4 +1114,4 @@ declare class SafetyError extends CencoriError {
563
1114
  */
564
1115
  declare function fetchWithRetry(url: string, options: RequestInit, maxRetries?: number): Promise<Response>;
565
1116
 
566
- export { AINamespace, type Agent, type AgentConfig, type AgentKey, type AgentListItem, AgentsNamespace, AuthenticationError, Cencori, CencoriConfig, CencoriError, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionResponse, type ChatCompletionStream, type ChatMemoryOptions, ChatNamespace, ComputeNamespace, type CreateAgentKeyParams, type CreateAgentParams, type CreateSessionParams, DocumentsNamespace, MemoryClient, type PaginatedResponse, RateLimitError, RequestOptions, SafetyError, type Session, type SessionEvent, type SessionListParams, SessionsNamespace, StorageNamespace, TelemetryClient, type TurnParams, type UpdateAgentParams, VisionNamespace, VoiceNamespace, WebNamespace, WorkflowNamespace, Cencori as default, fetchWithRetry };
1117
+ export { AINamespace, ActionsNamespace, type Agent, type AgentConfig, type AgentKey, type AgentListItem, AgentVersionsNamespace, AgentsNamespace, AuthenticationError, Cencori, CencoriConfig, CencoriError, type ChatCompletionChunk, type ChatCompletionCreateParams, type ChatCompletionResponse, type ChatCompletionStream, type ChatMemoryOptions, ChatNamespace, ClientTokensNamespace, ComputeNamespace, ConnectionsNamespace, type CreateAgentKeyParams, type CreateAgentParams, type CreateSessionParams, DocumentsNamespace, EndUsersNamespace, InstallationsNamespace, KnowledgeNamespace, McpServersNamespace, MemoryClient, ModelsNamespace, type PaginatedResponse, ProviderConnectionsNamespace, RateLimitError, RatePlansNamespace, RequestOptions, RunsNamespace, SafetyError, type Session, type SessionEvent, type SessionListParams, SessionsNamespace, SkillImportsNamespace, SkillsNamespace, StorageNamespace, TelemetryClient, type Tenant, TenantsNamespace, type TurnParams, type UnifiedModel, type UpdateAgentParams, UsageNamespace, VisionNamespace, VoiceNamespace, WebNamespace, WebhooksNamespace, WorkflowNamespace, Cencori as default, fetchWithRetry };