@renai-labs/sdk 0.1.19 → 0.1.21
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/error.js +11 -0
- package/dist/generated/@tanstack/react-query.gen.d.ts +635 -107
- package/dist/generated/@tanstack/react-query.gen.js +510 -60
- package/dist/generated/internal/types.gen.d.ts +328 -21
- package/dist/generated/sdk.gen.d.ts +175 -33
- package/dist/generated/sdk.gen.js +349 -68
- package/dist/generated/types.gen.d.ts +2153 -1621
- package/dist/generated/zod.gen.d.ts +7375 -3891
- package/dist/generated/zod.gen.js +1004 -868
- package/package.json +2 -2
|
@@ -115,7 +115,7 @@ export const agentCreateMutation = (options) => {
|
|
|
115
115
|
return mutationOptions;
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
|
-
* Search agents across
|
|
118
|
+
* Search agents across private, org, and published tiers
|
|
119
119
|
*/
|
|
120
120
|
export const agentSearchMutation = (options) => {
|
|
121
121
|
const mutationOptions = {
|
|
@@ -211,12 +211,12 @@ export const agentPublishMutation = (options) => {
|
|
|
211
211
|
return mutationOptions;
|
|
212
212
|
};
|
|
213
213
|
/**
|
|
214
|
-
*
|
|
214
|
+
* Promote a private agent to org scope in place, cascading to its private dependencies
|
|
215
215
|
*/
|
|
216
|
-
export const
|
|
216
|
+
export const agentPromoteMutation = (options) => {
|
|
217
217
|
const mutationOptions = {
|
|
218
218
|
mutationFn: async (fnOptions) => {
|
|
219
|
-
const { data } = await RenClient.__registry.get().agent.
|
|
219
|
+
const { data } = await RenClient.__registry.get().agent.promote({
|
|
220
220
|
...options,
|
|
221
221
|
...fnOptions,
|
|
222
222
|
throwOnError: true,
|
|
@@ -408,6 +408,22 @@ export const blueprintCreateMutation = (options) => {
|
|
|
408
408
|
};
|
|
409
409
|
return mutationOptions;
|
|
410
410
|
};
|
|
411
|
+
/**
|
|
412
|
+
* Create or update a blueprint from a raw Spec
|
|
413
|
+
*/
|
|
414
|
+
export const blueprintPushMutation = (options) => {
|
|
415
|
+
const mutationOptions = {
|
|
416
|
+
mutationFn: async (fnOptions) => {
|
|
417
|
+
const { data } = await RenClient.__registry.get().blueprint.push({
|
|
418
|
+
...options,
|
|
419
|
+
...fnOptions,
|
|
420
|
+
throwOnError: true,
|
|
421
|
+
});
|
|
422
|
+
return data;
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
return mutationOptions;
|
|
426
|
+
};
|
|
411
427
|
/**
|
|
412
428
|
* Install a blueprint into a pod
|
|
413
429
|
*/
|
|
@@ -536,6 +552,53 @@ export const billingGetOptions = (options) => queryOptions({
|
|
|
536
552
|
},
|
|
537
553
|
queryKey: billingGetQueryKey(options),
|
|
538
554
|
});
|
|
555
|
+
export const billingUsageQueryKey = (options) => createQueryKey("billingUsage", options);
|
|
556
|
+
/**
|
|
557
|
+
* Get organization-wide credit usage
|
|
558
|
+
*
|
|
559
|
+
* Total Ren credits consumed across the organization over a bounded time range, broken down by a chosen dimension (user, member, agent, model, session, project, pod, or source) with a per-day trend. Requires an explicit `start`/`end` range (max 92 days). Served from the local hourly usage rollup; values may lag live spend by up to roughly one hour plus a meter cycle.
|
|
560
|
+
*/
|
|
561
|
+
export const billingUsageOptions = (options) => queryOptions({
|
|
562
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
563
|
+
const { data } = await RenClient.__registry.get().billing.usage({
|
|
564
|
+
...options,
|
|
565
|
+
...queryKey[0],
|
|
566
|
+
signal,
|
|
567
|
+
throwOnError: true,
|
|
568
|
+
});
|
|
569
|
+
return data;
|
|
570
|
+
},
|
|
571
|
+
queryKey: billingUsageQueryKey(options),
|
|
572
|
+
});
|
|
573
|
+
export const billingUsageInfiniteQueryKey = (options) => createQueryKey("billingUsage", options, true);
|
|
574
|
+
/**
|
|
575
|
+
* Get organization-wide credit usage
|
|
576
|
+
*
|
|
577
|
+
* Total Ren credits consumed across the organization over a bounded time range, broken down by a chosen dimension (user, member, agent, model, session, project, pod, or source) with a per-day trend. Requires an explicit `start`/`end` range (max 92 days). Served from the local hourly usage rollup; values may lag live spend by up to roughly one hour plus a meter cycle.
|
|
578
|
+
*/
|
|
579
|
+
export const billingUsageInfiniteOptions = (options) => infiniteQueryOptions(
|
|
580
|
+
// @ts-ignore
|
|
581
|
+
{
|
|
582
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
583
|
+
// @ts-ignore
|
|
584
|
+
const page = typeof pageParam === "object"
|
|
585
|
+
? pageParam
|
|
586
|
+
: {
|
|
587
|
+
query: {
|
|
588
|
+
start: pageParam,
|
|
589
|
+
},
|
|
590
|
+
};
|
|
591
|
+
const params = createInfiniteParams(queryKey, page);
|
|
592
|
+
const { data } = await RenClient.__registry.get().billing.usage({
|
|
593
|
+
...options,
|
|
594
|
+
...params,
|
|
595
|
+
signal,
|
|
596
|
+
throwOnError: true,
|
|
597
|
+
});
|
|
598
|
+
return data;
|
|
599
|
+
},
|
|
600
|
+
queryKey: billingUsageInfiniteQueryKey(options),
|
|
601
|
+
});
|
|
539
602
|
export const billingInvoicesQueryKey = (options) => createQueryKey("billingInvoices", options);
|
|
540
603
|
/**
|
|
541
604
|
* List invoices for the organization
|
|
@@ -579,13 +642,29 @@ export const billingInvoicesInfiniteOptions = (options) => infiniteQueryOptions(
|
|
|
579
642
|
},
|
|
580
643
|
queryKey: billingInvoicesInfiniteQueryKey(options),
|
|
581
644
|
});
|
|
582
|
-
export const
|
|
645
|
+
export const billingInvoicePaymentUrlQueryKey = (options) => createQueryKey("billingInvoicePaymentUrl", options);
|
|
646
|
+
/**
|
|
647
|
+
* Get a payment URL for an invoice
|
|
648
|
+
*/
|
|
649
|
+
export const billingInvoicePaymentUrlOptions = (options) => queryOptions({
|
|
650
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
651
|
+
const { data } = await RenClient.__registry.get().billing.invoicePaymentUrl({
|
|
652
|
+
...options,
|
|
653
|
+
...queryKey[0],
|
|
654
|
+
signal,
|
|
655
|
+
throwOnError: true,
|
|
656
|
+
});
|
|
657
|
+
return data;
|
|
658
|
+
},
|
|
659
|
+
queryKey: billingInvoicePaymentUrlQueryKey(options),
|
|
660
|
+
});
|
|
661
|
+
export const billingPlansQueryKey = (options) => createQueryKey("billingPlans", options);
|
|
583
662
|
/**
|
|
584
|
-
*
|
|
663
|
+
* List available subscription plans
|
|
585
664
|
*/
|
|
586
|
-
export const
|
|
665
|
+
export const billingPlansOptions = (options) => queryOptions({
|
|
587
666
|
queryFn: async ({ queryKey, signal }) => {
|
|
588
|
-
const { data } = await RenClient.__registry.get().billing.
|
|
667
|
+
const { data } = await RenClient.__registry.get().billing.plans({
|
|
589
668
|
...options,
|
|
590
669
|
...queryKey[0],
|
|
591
670
|
signal,
|
|
@@ -593,15 +672,31 @@ export const billingDailyUsageOptions = (options) => queryOptions({
|
|
|
593
672
|
});
|
|
594
673
|
return data;
|
|
595
674
|
},
|
|
596
|
-
queryKey:
|
|
675
|
+
queryKey: billingPlansQueryKey(options),
|
|
597
676
|
});
|
|
598
|
-
export const billingInvoicePaymentUrlQueryKey = (options) => createQueryKey("billingInvoicePaymentUrl", options);
|
|
599
677
|
/**
|
|
600
|
-
*
|
|
678
|
+
* Start a subscription-plan checkout
|
|
601
679
|
*/
|
|
602
|
-
export const
|
|
680
|
+
export const billingSubscribeMutation = (options) => {
|
|
681
|
+
const mutationOptions = {
|
|
682
|
+
mutationFn: async (fnOptions) => {
|
|
683
|
+
const { data } = await RenClient.__registry.get().billing.subscribe({
|
|
684
|
+
...options,
|
|
685
|
+
...fnOptions,
|
|
686
|
+
throwOnError: true,
|
|
687
|
+
});
|
|
688
|
+
return data;
|
|
689
|
+
},
|
|
690
|
+
};
|
|
691
|
+
return mutationOptions;
|
|
692
|
+
};
|
|
693
|
+
export const billingPortalQueryKey = (options) => createQueryKey("billingPortal", options);
|
|
694
|
+
/**
|
|
695
|
+
* Get a customer-portal URL to manage the plan
|
|
696
|
+
*/
|
|
697
|
+
export const billingPortalOptions = (options) => queryOptions({
|
|
603
698
|
queryFn: async ({ queryKey, signal }) => {
|
|
604
|
-
const { data } = await RenClient.__registry.get().billing.
|
|
699
|
+
const { data } = await RenClient.__registry.get().billing.portal({
|
|
605
700
|
...options,
|
|
606
701
|
...queryKey[0],
|
|
607
702
|
signal,
|
|
@@ -609,15 +704,31 @@ export const billingInvoicePaymentUrlOptions = (options) => queryOptions({
|
|
|
609
704
|
});
|
|
610
705
|
return data;
|
|
611
706
|
},
|
|
612
|
-
queryKey:
|
|
707
|
+
queryKey: billingPortalQueryKey(options),
|
|
613
708
|
});
|
|
614
709
|
/**
|
|
615
|
-
*
|
|
710
|
+
* Upgrade or downgrade the current subscription plan
|
|
711
|
+
*/
|
|
712
|
+
export const billingChangePlanMutation = (options) => {
|
|
713
|
+
const mutationOptions = {
|
|
714
|
+
mutationFn: async (fnOptions) => {
|
|
715
|
+
const { data } = await RenClient.__registry.get().billing.changePlan({
|
|
716
|
+
...options,
|
|
717
|
+
...fnOptions,
|
|
718
|
+
throwOnError: true,
|
|
719
|
+
});
|
|
720
|
+
return data;
|
|
721
|
+
},
|
|
722
|
+
};
|
|
723
|
+
return mutationOptions;
|
|
724
|
+
};
|
|
725
|
+
/**
|
|
726
|
+
* Cancel the subscription at the next renewal
|
|
616
727
|
*/
|
|
617
|
-
export const
|
|
728
|
+
export const billingCancelMutation = (options) => {
|
|
618
729
|
const mutationOptions = {
|
|
619
730
|
mutationFn: async (fnOptions) => {
|
|
620
|
-
const { data } = await RenClient.__registry.get().billing.
|
|
731
|
+
const { data } = await RenClient.__registry.get().billing.cancel({
|
|
621
732
|
...options,
|
|
622
733
|
...fnOptions,
|
|
623
734
|
throwOnError: true,
|
|
@@ -953,6 +1064,22 @@ export const fileStoreFilesFinalizeUploadMutation = (options) => {
|
|
|
953
1064
|
};
|
|
954
1065
|
return mutationOptions;
|
|
955
1066
|
};
|
|
1067
|
+
export const invitationPreviewQueryKey = (options) => createQueryKey("invitationPreview", options);
|
|
1068
|
+
/**
|
|
1069
|
+
* Preview an organization invitation
|
|
1070
|
+
*/
|
|
1071
|
+
export const invitationPreviewOptions = (options) => queryOptions({
|
|
1072
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1073
|
+
const { data } = await RenClient.__registry.get().invitation.preview({
|
|
1074
|
+
...options,
|
|
1075
|
+
...queryKey[0],
|
|
1076
|
+
signal,
|
|
1077
|
+
throwOnError: true,
|
|
1078
|
+
});
|
|
1079
|
+
return data;
|
|
1080
|
+
},
|
|
1081
|
+
queryKey: invitationPreviewQueryKey(options),
|
|
1082
|
+
});
|
|
956
1083
|
/**
|
|
957
1084
|
* Disconnect the org's GitHub App installation
|
|
958
1085
|
*/
|
|
@@ -1221,7 +1348,7 @@ export const mcpCreateMutation = (options) => {
|
|
|
1221
1348
|
return mutationOptions;
|
|
1222
1349
|
};
|
|
1223
1350
|
/**
|
|
1224
|
-
* Search MCPs across
|
|
1351
|
+
* Search MCPs across private, org, and published tiers
|
|
1225
1352
|
*/
|
|
1226
1353
|
export const mcpSearchMutation = (options) => {
|
|
1227
1354
|
const mutationOptions = {
|
|
@@ -1317,12 +1444,12 @@ export const mcpPublishMutation = (options) => {
|
|
|
1317
1444
|
return mutationOptions;
|
|
1318
1445
|
};
|
|
1319
1446
|
/**
|
|
1320
|
-
*
|
|
1447
|
+
* Promote a private MCP to org scope in place
|
|
1321
1448
|
*/
|
|
1322
|
-
export const
|
|
1449
|
+
export const mcpPromoteMutation = (options) => {
|
|
1323
1450
|
const mutationOptions = {
|
|
1324
1451
|
mutationFn: async (fnOptions) => {
|
|
1325
|
-
const { data } = await RenClient.__registry.get().mcp.
|
|
1452
|
+
const { data } = await RenClient.__registry.get().mcp.promote({
|
|
1326
1453
|
...options,
|
|
1327
1454
|
...fnOptions,
|
|
1328
1455
|
throwOnError: true,
|
|
@@ -1412,6 +1539,42 @@ export const meGetOptions = (options) => queryOptions({
|
|
|
1412
1539
|
},
|
|
1413
1540
|
queryKey: meGetQueryKey(options),
|
|
1414
1541
|
});
|
|
1542
|
+
/**
|
|
1543
|
+
* Update the active member persona
|
|
1544
|
+
*
|
|
1545
|
+
* Sets the authenticated user's persona for their active organization membership.
|
|
1546
|
+
*/
|
|
1547
|
+
export const meUpdatePersonaMutation = (options) => {
|
|
1548
|
+
const mutationOptions = {
|
|
1549
|
+
mutationFn: async (fnOptions) => {
|
|
1550
|
+
const { data } = await RenClient.__registry.get().me.updatePersona({
|
|
1551
|
+
...options,
|
|
1552
|
+
...fnOptions,
|
|
1553
|
+
throwOnError: true,
|
|
1554
|
+
});
|
|
1555
|
+
return data;
|
|
1556
|
+
},
|
|
1557
|
+
};
|
|
1558
|
+
return mutationOptions;
|
|
1559
|
+
};
|
|
1560
|
+
/**
|
|
1561
|
+
* Mark member onboarding complete
|
|
1562
|
+
*
|
|
1563
|
+
* Stamps the authenticated member as onboarded for their active organization.
|
|
1564
|
+
*/
|
|
1565
|
+
export const meCompleteOnboardingMutation = (options) => {
|
|
1566
|
+
const mutationOptions = {
|
|
1567
|
+
mutationFn: async (fnOptions) => {
|
|
1568
|
+
const { data } = await RenClient.__registry.get().me.completeOnboarding({
|
|
1569
|
+
...options,
|
|
1570
|
+
...fnOptions,
|
|
1571
|
+
throwOnError: true,
|
|
1572
|
+
});
|
|
1573
|
+
return data;
|
|
1574
|
+
},
|
|
1575
|
+
};
|
|
1576
|
+
return mutationOptions;
|
|
1577
|
+
};
|
|
1415
1578
|
export const memoryStoreListQueryKey = (options) => createQueryKey("memoryStoreList", options);
|
|
1416
1579
|
/**
|
|
1417
1580
|
* List memory stores
|
|
@@ -1651,6 +1814,54 @@ export const onboardingSetupPersonalOrgMutation = (options) => {
|
|
|
1651
1814
|
};
|
|
1652
1815
|
return mutationOptions;
|
|
1653
1816
|
};
|
|
1817
|
+
export const orgGetQueryKey = (options) => createQueryKey("orgGet", options);
|
|
1818
|
+
/**
|
|
1819
|
+
* Get organization settings
|
|
1820
|
+
*/
|
|
1821
|
+
export const orgGetOptions = (options) => queryOptions({
|
|
1822
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1823
|
+
const { data } = await RenClient.__registry.get().org.get({
|
|
1824
|
+
...options,
|
|
1825
|
+
...queryKey[0],
|
|
1826
|
+
signal,
|
|
1827
|
+
throwOnError: true,
|
|
1828
|
+
});
|
|
1829
|
+
return data;
|
|
1830
|
+
},
|
|
1831
|
+
queryKey: orgGetQueryKey(options),
|
|
1832
|
+
});
|
|
1833
|
+
/**
|
|
1834
|
+
* Update organization settings
|
|
1835
|
+
*/
|
|
1836
|
+
export const orgUpdateMutation = (options) => {
|
|
1837
|
+
const mutationOptions = {
|
|
1838
|
+
mutationFn: async (fnOptions) => {
|
|
1839
|
+
const { data } = await RenClient.__registry.get().org.update({
|
|
1840
|
+
...options,
|
|
1841
|
+
...fnOptions,
|
|
1842
|
+
throwOnError: true,
|
|
1843
|
+
});
|
|
1844
|
+
return data;
|
|
1845
|
+
},
|
|
1846
|
+
};
|
|
1847
|
+
return mutationOptions;
|
|
1848
|
+
};
|
|
1849
|
+
/**
|
|
1850
|
+
* Upload an organization logo
|
|
1851
|
+
*/
|
|
1852
|
+
export const organizationLogoUploadMutation = (options) => {
|
|
1853
|
+
const mutationOptions = {
|
|
1854
|
+
mutationFn: async (fnOptions) => {
|
|
1855
|
+
const { data } = await RenClient.__registry.get().organizationLogo.upload({
|
|
1856
|
+
...options,
|
|
1857
|
+
...fnOptions,
|
|
1858
|
+
throwOnError: true,
|
|
1859
|
+
});
|
|
1860
|
+
return data;
|
|
1861
|
+
},
|
|
1862
|
+
};
|
|
1863
|
+
return mutationOptions;
|
|
1864
|
+
};
|
|
1654
1865
|
export const patListQueryKey = (options) => createQueryKey("patList", options);
|
|
1655
1866
|
/**
|
|
1656
1867
|
* List personal access tokens
|
|
@@ -1790,6 +2001,24 @@ export const podUpdateMutation = (options) => {
|
|
|
1790
2001
|
};
|
|
1791
2002
|
return mutationOptions;
|
|
1792
2003
|
};
|
|
2004
|
+
export const podUsageQueryKey = (options) => createQueryKey("podUsage", options);
|
|
2005
|
+
/**
|
|
2006
|
+
* Get total credit usage for a pod
|
|
2007
|
+
*
|
|
2008
|
+
* Total Ren credits consumed across the whole pod, served from the local hourly usage rollup.
|
|
2009
|
+
*/
|
|
2010
|
+
export const podUsageOptions = (options) => queryOptions({
|
|
2011
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2012
|
+
const { data } = await RenClient.__registry.get().pod.usage({
|
|
2013
|
+
...options,
|
|
2014
|
+
...queryKey[0],
|
|
2015
|
+
signal,
|
|
2016
|
+
throwOnError: true,
|
|
2017
|
+
});
|
|
2018
|
+
return data;
|
|
2019
|
+
},
|
|
2020
|
+
queryKey: podUsageQueryKey(options),
|
|
2021
|
+
});
|
|
1793
2022
|
/**
|
|
1794
2023
|
* Archive a pod
|
|
1795
2024
|
*/
|
|
@@ -2047,6 +2276,53 @@ export const projectUpdateMutation = (options) => {
|
|
|
2047
2276
|
};
|
|
2048
2277
|
return mutationOptions;
|
|
2049
2278
|
};
|
|
2279
|
+
export const projectUsageQueryKey = (options) => createQueryKey("projectUsage", options);
|
|
2280
|
+
/**
|
|
2281
|
+
* Get a project's credit usage
|
|
2282
|
+
*
|
|
2283
|
+
* Ren credits consumed within the project, with a per-day trend, a breakdown by usage source and operation, and an optional grouped breakdown (e.g. `groupBy=session` for per-session costs). `start`/`end` bound the range (max 92 days); omit both for all-time. Served from the local hourly usage rollup.
|
|
2284
|
+
*/
|
|
2285
|
+
export const projectUsageOptions = (options) => queryOptions({
|
|
2286
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2287
|
+
const { data } = await RenClient.__registry.get().project.usage({
|
|
2288
|
+
...options,
|
|
2289
|
+
...queryKey[0],
|
|
2290
|
+
signal,
|
|
2291
|
+
throwOnError: true,
|
|
2292
|
+
});
|
|
2293
|
+
return data;
|
|
2294
|
+
},
|
|
2295
|
+
queryKey: projectUsageQueryKey(options),
|
|
2296
|
+
});
|
|
2297
|
+
export const projectUsageInfiniteQueryKey = (options) => createQueryKey("projectUsage", options, true);
|
|
2298
|
+
/**
|
|
2299
|
+
* Get a project's credit usage
|
|
2300
|
+
*
|
|
2301
|
+
* Ren credits consumed within the project, with a per-day trend, a breakdown by usage source and operation, and an optional grouped breakdown (e.g. `groupBy=session` for per-session costs). `start`/`end` bound the range (max 92 days); omit both for all-time. Served from the local hourly usage rollup.
|
|
2302
|
+
*/
|
|
2303
|
+
export const projectUsageInfiniteOptions = (options) => infiniteQueryOptions(
|
|
2304
|
+
// @ts-ignore
|
|
2305
|
+
{
|
|
2306
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
2307
|
+
// @ts-ignore
|
|
2308
|
+
const page = typeof pageParam === "object"
|
|
2309
|
+
? pageParam
|
|
2310
|
+
: {
|
|
2311
|
+
query: {
|
|
2312
|
+
start: pageParam,
|
|
2313
|
+
},
|
|
2314
|
+
};
|
|
2315
|
+
const params = createInfiniteParams(queryKey, page);
|
|
2316
|
+
const { data } = await RenClient.__registry.get().project.usage({
|
|
2317
|
+
...options,
|
|
2318
|
+
...params,
|
|
2319
|
+
signal,
|
|
2320
|
+
throwOnError: true,
|
|
2321
|
+
});
|
|
2322
|
+
return data;
|
|
2323
|
+
},
|
|
2324
|
+
queryKey: projectUsageInfiniteQueryKey(options),
|
|
2325
|
+
});
|
|
2050
2326
|
export const projectAgentListQueryKey = (options) => createQueryKey("projectAgentList", options);
|
|
2051
2327
|
/**
|
|
2052
2328
|
* List agents attached to a project
|
|
@@ -2207,6 +2483,120 @@ export const projectMemoryStoreRemoveMutation = (options) => {
|
|
|
2207
2483
|
};
|
|
2208
2484
|
return mutationOptions;
|
|
2209
2485
|
};
|
|
2486
|
+
export const projectSkillListQueryKey = (options) => createQueryKey("projectSkillList", options);
|
|
2487
|
+
/**
|
|
2488
|
+
* List skills attached to a project
|
|
2489
|
+
*/
|
|
2490
|
+
export const projectSkillListOptions = (options) => queryOptions({
|
|
2491
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2492
|
+
const { data } = await RenClient.__registry.get().project.skill.list({
|
|
2493
|
+
...options,
|
|
2494
|
+
...queryKey[0],
|
|
2495
|
+
signal,
|
|
2496
|
+
throwOnError: true,
|
|
2497
|
+
});
|
|
2498
|
+
return data;
|
|
2499
|
+
},
|
|
2500
|
+
queryKey: projectSkillListQueryKey(options),
|
|
2501
|
+
});
|
|
2502
|
+
/**
|
|
2503
|
+
* Attach a skill to a project
|
|
2504
|
+
*/
|
|
2505
|
+
export const projectSkillAddMutation = (options) => {
|
|
2506
|
+
const mutationOptions = {
|
|
2507
|
+
mutationFn: async (fnOptions) => {
|
|
2508
|
+
const { data } = await RenClient.__registry.get().project.skill.add({
|
|
2509
|
+
...options,
|
|
2510
|
+
...fnOptions,
|
|
2511
|
+
throwOnError: true,
|
|
2512
|
+
});
|
|
2513
|
+
return data;
|
|
2514
|
+
},
|
|
2515
|
+
};
|
|
2516
|
+
return mutationOptions;
|
|
2517
|
+
};
|
|
2518
|
+
export const projectSkillResolutionQueryKey = (options) => createQueryKey("projectSkillResolution", options);
|
|
2519
|
+
/**
|
|
2520
|
+
* Resolve the one version served per skill in this project, with pin-conflict warnings
|
|
2521
|
+
*
|
|
2522
|
+
* The server resolves one version per skill per project — highest live version wins (decision 5). When a bound pin loses, it is reported here as a warning (never an error at bind time): a pin can lose later when someone publishes a newer version, so there is no request to reject at that moment.
|
|
2523
|
+
*/
|
|
2524
|
+
export const projectSkillResolutionOptions = (options) => queryOptions({
|
|
2525
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2526
|
+
const { data } = await RenClient.__registry.get().project.skill.resolution({
|
|
2527
|
+
...options,
|
|
2528
|
+
...queryKey[0],
|
|
2529
|
+
signal,
|
|
2530
|
+
throwOnError: true,
|
|
2531
|
+
});
|
|
2532
|
+
return data;
|
|
2533
|
+
},
|
|
2534
|
+
queryKey: projectSkillResolutionQueryKey(options),
|
|
2535
|
+
});
|
|
2536
|
+
/**
|
|
2537
|
+
* Detach a skill from a project
|
|
2538
|
+
*/
|
|
2539
|
+
export const projectSkillRemoveMutation = (options) => {
|
|
2540
|
+
const mutationOptions = {
|
|
2541
|
+
mutationFn: async (fnOptions) => {
|
|
2542
|
+
const { data } = await RenClient.__registry.get().project.skill.remove({
|
|
2543
|
+
...options,
|
|
2544
|
+
...fnOptions,
|
|
2545
|
+
throwOnError: true,
|
|
2546
|
+
});
|
|
2547
|
+
return data;
|
|
2548
|
+
},
|
|
2549
|
+
};
|
|
2550
|
+
return mutationOptions;
|
|
2551
|
+
};
|
|
2552
|
+
export const projectMcpListQueryKey = (options) => createQueryKey("projectMcpList", options);
|
|
2553
|
+
/**
|
|
2554
|
+
* List MCPs attached to a project
|
|
2555
|
+
*/
|
|
2556
|
+
export const projectMcpListOptions = (options) => queryOptions({
|
|
2557
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2558
|
+
const { data } = await RenClient.__registry.get().project.mcp.list({
|
|
2559
|
+
...options,
|
|
2560
|
+
...queryKey[0],
|
|
2561
|
+
signal,
|
|
2562
|
+
throwOnError: true,
|
|
2563
|
+
});
|
|
2564
|
+
return data;
|
|
2565
|
+
},
|
|
2566
|
+
queryKey: projectMcpListQueryKey(options),
|
|
2567
|
+
});
|
|
2568
|
+
/**
|
|
2569
|
+
* Attach an MCP to a project
|
|
2570
|
+
*/
|
|
2571
|
+
export const projectMcpAddMutation = (options) => {
|
|
2572
|
+
const mutationOptions = {
|
|
2573
|
+
mutationFn: async (fnOptions) => {
|
|
2574
|
+
const { data } = await RenClient.__registry.get().project.mcp.add({
|
|
2575
|
+
...options,
|
|
2576
|
+
...fnOptions,
|
|
2577
|
+
throwOnError: true,
|
|
2578
|
+
});
|
|
2579
|
+
return data;
|
|
2580
|
+
},
|
|
2581
|
+
};
|
|
2582
|
+
return mutationOptions;
|
|
2583
|
+
};
|
|
2584
|
+
/**
|
|
2585
|
+
* Detach an MCP from a project
|
|
2586
|
+
*/
|
|
2587
|
+
export const projectMcpRemoveMutation = (options) => {
|
|
2588
|
+
const mutationOptions = {
|
|
2589
|
+
mutationFn: async (fnOptions) => {
|
|
2590
|
+
const { data } = await RenClient.__registry.get().project.mcp.remove({
|
|
2591
|
+
...options,
|
|
2592
|
+
...fnOptions,
|
|
2593
|
+
throwOnError: true,
|
|
2594
|
+
});
|
|
2595
|
+
return data;
|
|
2596
|
+
},
|
|
2597
|
+
};
|
|
2598
|
+
return mutationOptions;
|
|
2599
|
+
};
|
|
2210
2600
|
/**
|
|
2211
2601
|
* Archive a project
|
|
2212
2602
|
*/
|
|
@@ -2503,6 +2893,8 @@ export const sessionListInfiniteOptions = (options) => infiniteQueryOptions(
|
|
|
2503
2893
|
});
|
|
2504
2894
|
/**
|
|
2505
2895
|
* Create a session
|
|
2896
|
+
*
|
|
2897
|
+
* Starts an async, sandbox-warming session creation job and returns a jobId to poll via session.createStatus.
|
|
2506
2898
|
*/
|
|
2507
2899
|
export const sessionCreateMutation = (options) => {
|
|
2508
2900
|
const mutationOptions = {
|
|
@@ -2517,6 +2909,22 @@ export const sessionCreateMutation = (options) => {
|
|
|
2517
2909
|
};
|
|
2518
2910
|
return mutationOptions;
|
|
2519
2911
|
};
|
|
2912
|
+
export const sessionCreateStatusQueryKey = (options) => createQueryKey("sessionCreateStatus", options);
|
|
2913
|
+
/**
|
|
2914
|
+
* Poll a session creation job
|
|
2915
|
+
*/
|
|
2916
|
+
export const sessionCreateStatusOptions = (options) => queryOptions({
|
|
2917
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2918
|
+
const { data } = await RenClient.__registry.get().session.createStatus({
|
|
2919
|
+
...options,
|
|
2920
|
+
...queryKey[0],
|
|
2921
|
+
signal,
|
|
2922
|
+
throwOnError: true,
|
|
2923
|
+
});
|
|
2924
|
+
return data;
|
|
2925
|
+
},
|
|
2926
|
+
queryKey: sessionCreateStatusQueryKey(options),
|
|
2927
|
+
});
|
|
2520
2928
|
export const sessionGetQueryKey = (options) => createQueryKey("sessionGet", options);
|
|
2521
2929
|
/**
|
|
2522
2930
|
* Get a session
|
|
@@ -2630,6 +3038,24 @@ export const sessionTracesListInfiniteOptions = (options) => infiniteQueryOption
|
|
|
2630
3038
|
},
|
|
2631
3039
|
queryKey: sessionTracesListInfiniteQueryKey(options),
|
|
2632
3040
|
});
|
|
3041
|
+
export const sessionUsageQueryKey = (options) => createQueryKey("sessionUsage", options);
|
|
3042
|
+
/**
|
|
3043
|
+
* Get a session's credit usage
|
|
3044
|
+
*
|
|
3045
|
+
* Total Ren credits consumed by this session and all of its child/subagent sessions, with a breakdown by usage source and operation. Served from the local hourly usage rollup; the value may lag live spend by up to roughly one hour plus a meter cycle.
|
|
3046
|
+
*/
|
|
3047
|
+
export const sessionUsageOptions = (options) => queryOptions({
|
|
3048
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
3049
|
+
const { data } = await RenClient.__registry.get().session.usage({
|
|
3050
|
+
...options,
|
|
3051
|
+
...queryKey[0],
|
|
3052
|
+
signal,
|
|
3053
|
+
throwOnError: true,
|
|
3054
|
+
});
|
|
3055
|
+
return data;
|
|
3056
|
+
},
|
|
3057
|
+
queryKey: sessionUsageQueryKey(options),
|
|
3058
|
+
});
|
|
2633
3059
|
export const sessionAuthRequirementsQueryKey = (options) => createQueryKey("sessionAuthRequirements", options);
|
|
2634
3060
|
/**
|
|
2635
3061
|
* Compute MCP and skill credential requirements for a session
|
|
@@ -2696,7 +3122,7 @@ export const sessionFilesPresignDownloadMutation = (options) => {
|
|
|
2696
3122
|
};
|
|
2697
3123
|
export const skillListQueryKey = (options) => createQueryKey("skillList", options);
|
|
2698
3124
|
/**
|
|
2699
|
-
* List skills
|
|
3125
|
+
* List and search skills
|
|
2700
3126
|
*/
|
|
2701
3127
|
export const skillListOptions = (options) => queryOptions({
|
|
2702
3128
|
queryFn: async ({ queryKey, signal }) => {
|
|
@@ -2712,7 +3138,7 @@ export const skillListOptions = (options) => queryOptions({
|
|
|
2712
3138
|
});
|
|
2713
3139
|
export const skillListInfiniteQueryKey = (options) => createQueryKey("skillList", options, true);
|
|
2714
3140
|
/**
|
|
2715
|
-
* List skills
|
|
3141
|
+
* List and search skills
|
|
2716
3142
|
*/
|
|
2717
3143
|
export const skillListInfiniteOptions = (options) => infiniteQueryOptions(
|
|
2718
3144
|
// @ts-ignore
|
|
@@ -2753,41 +3179,9 @@ export const skillCreateMutation = (options) => {
|
|
|
2753
3179
|
};
|
|
2754
3180
|
return mutationOptions;
|
|
2755
3181
|
};
|
|
2756
|
-
/**
|
|
2757
|
-
* Search skills across user, org, and registry scopes
|
|
2758
|
-
*/
|
|
2759
|
-
export const skillSearchMutation = (options) => {
|
|
2760
|
-
const mutationOptions = {
|
|
2761
|
-
mutationFn: async (fnOptions) => {
|
|
2762
|
-
const { data } = await RenClient.__registry.get().skill.search({
|
|
2763
|
-
...options,
|
|
2764
|
-
...fnOptions,
|
|
2765
|
-
throwOnError: true,
|
|
2766
|
-
});
|
|
2767
|
-
return data;
|
|
2768
|
-
},
|
|
2769
|
-
};
|
|
2770
|
-
return mutationOptions;
|
|
2771
|
-
};
|
|
2772
|
-
export const skillGetBySlugQueryKey = (options) => createQueryKey("skillGetBySlug", options);
|
|
2773
|
-
/**
|
|
2774
|
-
* Get a skill by slug
|
|
2775
|
-
*/
|
|
2776
|
-
export const skillGetBySlugOptions = (options) => queryOptions({
|
|
2777
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
2778
|
-
const { data } = await RenClient.__registry.get().skill.getBySlug({
|
|
2779
|
-
...options,
|
|
2780
|
-
...queryKey[0],
|
|
2781
|
-
signal,
|
|
2782
|
-
throwOnError: true,
|
|
2783
|
-
});
|
|
2784
|
-
return data;
|
|
2785
|
-
},
|
|
2786
|
-
queryKey: skillGetBySlugQueryKey(options),
|
|
2787
|
-
});
|
|
2788
3182
|
export const skillGetQueryKey = (options) => createQueryKey("skillGet", options);
|
|
2789
3183
|
/**
|
|
2790
|
-
* Get a skill
|
|
3184
|
+
* Get a skill by ID or slug
|
|
2791
3185
|
*/
|
|
2792
3186
|
export const skillGetOptions = (options) => queryOptions({
|
|
2793
3187
|
queryFn: async ({ queryKey, signal }) => {
|
|
@@ -2835,6 +3229,8 @@ export const skillArchiveMutation = (options) => {
|
|
|
2835
3229
|
};
|
|
2836
3230
|
/**
|
|
2837
3231
|
* Publish a skill
|
|
3232
|
+
*
|
|
3233
|
+
* Publishing changes copyability (the skill enters the registry), not materialisation: it does NOT fan out to sandboxes. A git-backed skill's repository must be publicly cloneable (decision 11).
|
|
2838
3234
|
*/
|
|
2839
3235
|
export const skillPublishMutation = (options) => {
|
|
2840
3236
|
const mutationOptions = {
|
|
@@ -2851,6 +3247,8 @@ export const skillPublishMutation = (options) => {
|
|
|
2851
3247
|
};
|
|
2852
3248
|
/**
|
|
2853
3249
|
* Deprecate a skill
|
|
3250
|
+
*
|
|
3251
|
+
* Deprecation is an adoption signal only — it does NOT affect materialisation: sandboxes already tracking the skill keep receiving it. Use archive to remove a skill from sandboxes.
|
|
2854
3252
|
*/
|
|
2855
3253
|
export const skillDeprecateMutation = (options) => {
|
|
2856
3254
|
const mutationOptions = {
|
|
@@ -2898,12 +3296,12 @@ export const skillCopyMutation = (options) => {
|
|
|
2898
3296
|
return mutationOptions;
|
|
2899
3297
|
};
|
|
2900
3298
|
/**
|
|
2901
|
-
*
|
|
3299
|
+
* Promote a private skill to org scope in place
|
|
2902
3300
|
*/
|
|
2903
|
-
export const
|
|
3301
|
+
export const skillPromoteMutation = (options) => {
|
|
2904
3302
|
const mutationOptions = {
|
|
2905
3303
|
mutationFn: async (fnOptions) => {
|
|
2906
|
-
const { data } = await RenClient.__registry.get().skill.
|
|
3304
|
+
const { data } = await RenClient.__registry.get().skill.promote({
|
|
2907
3305
|
...options,
|
|
2908
3306
|
...fnOptions,
|
|
2909
3307
|
throwOnError: true,
|
|
@@ -2916,6 +3314,8 @@ export const skillCopyToOrgMutation = (options) => {
|
|
|
2916
3314
|
export const skillVersionListQueryKey = (options) => createQueryKey("skillVersionList", options);
|
|
2917
3315
|
/**
|
|
2918
3316
|
* List skill versions
|
|
3317
|
+
*
|
|
3318
|
+
* Git-backed skills are versionless (GitHub owns their history) but expose one pointer row holding the git source; its version string is a placeholder, not a commit SHA.
|
|
2919
3319
|
*/
|
|
2920
3320
|
export const skillVersionListOptions = (options) => queryOptions({
|
|
2921
3321
|
queryFn: async ({ queryKey, signal }) => {
|
|
@@ -2932,6 +3332,8 @@ export const skillVersionListOptions = (options) => queryOptions({
|
|
|
2932
3332
|
export const skillVersionListInfiniteQueryKey = (options) => createQueryKey("skillVersionList", options, true);
|
|
2933
3333
|
/**
|
|
2934
3334
|
* List skill versions
|
|
3335
|
+
*
|
|
3336
|
+
* Git-backed skills are versionless (GitHub owns their history) but expose one pointer row holding the git source; its version string is a placeholder, not a commit SHA.
|
|
2935
3337
|
*/
|
|
2936
3338
|
export const skillVersionListInfiniteOptions = (options) => infiniteQueryOptions(
|
|
2937
3339
|
// @ts-ignore
|
|
@@ -3357,6 +3759,22 @@ export const slackInstallMutation = (options) => {
|
|
|
3357
3759
|
};
|
|
3358
3760
|
return mutationOptions;
|
|
3359
3761
|
};
|
|
3762
|
+
export const slackOnboardingResolveQueryKey = (options) => createQueryKey("slackOnboardingResolve", options);
|
|
3763
|
+
/**
|
|
3764
|
+
* Resolve the next onboarding step after Sign in with Slack
|
|
3765
|
+
*/
|
|
3766
|
+
export const slackOnboardingResolveOptions = (options) => queryOptions({
|
|
3767
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
3768
|
+
const { data } = await RenClient.__registry.get().slack.onboarding.resolve({
|
|
3769
|
+
...options,
|
|
3770
|
+
...queryKey[0],
|
|
3771
|
+
signal,
|
|
3772
|
+
throwOnError: true,
|
|
3773
|
+
});
|
|
3774
|
+
return data;
|
|
3775
|
+
},
|
|
3776
|
+
queryKey: slackOnboardingResolveQueryKey(options),
|
|
3777
|
+
});
|
|
3360
3778
|
export const slackStatusQueryKey = (options) => createQueryKey("slackStatus", options);
|
|
3361
3779
|
/**
|
|
3362
3780
|
* Report whether Slack is installed for the caller's org
|
|
@@ -3662,7 +4080,7 @@ export const linearMappingsListOptions = (options) => queryOptions({
|
|
|
3662
4080
|
queryKey: linearMappingsListQueryKey(options),
|
|
3663
4081
|
});
|
|
3664
4082
|
/**
|
|
3665
|
-
* Map a Linear project to a Ren project
|
|
4083
|
+
* Map a Linear project to a Ren project (idempotent upsert)
|
|
3666
4084
|
*/
|
|
3667
4085
|
export const linearMappingsCreateMutation = (options) => {
|
|
3668
4086
|
const mutationOptions = {
|
|
@@ -3939,6 +4357,22 @@ export const credentialArchiveMutation = (options) => {
|
|
|
3939
4357
|
};
|
|
3940
4358
|
return mutationOptions;
|
|
3941
4359
|
};
|
|
4360
|
+
/**
|
|
4361
|
+
* Copy or move a credential to another vault
|
|
4362
|
+
*/
|
|
4363
|
+
export const credentialTransferMutation = (options) => {
|
|
4364
|
+
const mutationOptions = {
|
|
4365
|
+
mutationFn: async (fnOptions) => {
|
|
4366
|
+
const { data } = await RenClient.__registry.get().credential.transfer({
|
|
4367
|
+
...options,
|
|
4368
|
+
...fnOptions,
|
|
4369
|
+
throwOnError: true,
|
|
4370
|
+
});
|
|
4371
|
+
return data;
|
|
4372
|
+
},
|
|
4373
|
+
};
|
|
4374
|
+
return mutationOptions;
|
|
4375
|
+
};
|
|
3942
4376
|
/**
|
|
3943
4377
|
* Begin SDK-delegated OAuth flow against an MCP
|
|
3944
4378
|
*/
|
|
@@ -4164,6 +4598,22 @@ export const registryBlueprintGetOptions = (options) => queryOptions({
|
|
|
4164
4598
|
},
|
|
4165
4599
|
queryKey: registryBlueprintGetQueryKey(options),
|
|
4166
4600
|
});
|
|
4601
|
+
export const registryPublisherGetQueryKey = (options) => createQueryKey("registryPublisherGet", options);
|
|
4602
|
+
/**
|
|
4603
|
+
* Get a registry publisher by slug
|
|
4604
|
+
*/
|
|
4605
|
+
export const registryPublisherGetOptions = (options) => queryOptions({
|
|
4606
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
4607
|
+
const { data } = await RenClient.__registry.get().registry.publisher.get({
|
|
4608
|
+
...options,
|
|
4609
|
+
...queryKey[0],
|
|
4610
|
+
signal,
|
|
4611
|
+
throwOnError: true,
|
|
4612
|
+
});
|
|
4613
|
+
return data;
|
|
4614
|
+
},
|
|
4615
|
+
queryKey: registryPublisherGetQueryKey(options),
|
|
4616
|
+
});
|
|
4167
4617
|
export const registryReplayGetQueryKey = (options) => createQueryKey("registryReplayGet", options);
|
|
4168
4618
|
/**
|
|
4169
4619
|
* Get a registry replay by slug
|