@renai-labs/sdk 0.1.7 → 0.1.8

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.
@@ -549,6 +549,60 @@ export class Github extends HeyApiClient {
549
549
  });
550
550
  }
551
551
  }
552
+ export class Config extends HeyApiClient {
553
+ /**
554
+ * Remove the org's Google Workspace OAuth app configuration
555
+ */
556
+ delete(options) {
557
+ return (options?.client ?? this.client).delete({ url: "/api/google/config", ...options });
558
+ }
559
+ /**
560
+ * Save the org's Google Workspace OAuth app credentials (BYO)
561
+ */
562
+ save(options) {
563
+ return (options?.client ?? this.client).put({
564
+ url: "/api/google/config",
565
+ ...options,
566
+ headers: {
567
+ "Content-Type": "application/json",
568
+ ...options?.headers,
569
+ },
570
+ });
571
+ }
572
+ }
573
+ export class Google extends HeyApiClient {
574
+ /**
575
+ * Report the org's Google Workspace OAuth app configuration
576
+ */
577
+ status(options) {
578
+ return (options?.client ?? this.client).get({
579
+ url: "/api/google/status",
580
+ ...options,
581
+ });
582
+ }
583
+ /**
584
+ * Disconnect the Google Workspace account stored in the given vault
585
+ */
586
+ disconnect(options) {
587
+ return (options.client ?? this.client).delete({
588
+ url: "/api/google/vaults/{vaultId}/connect",
589
+ ...options,
590
+ });
591
+ }
592
+ /**
593
+ * Begin connecting a Google Workspace account into the given vault
594
+ */
595
+ connect(options) {
596
+ return (options.client ?? this.client).post({
597
+ url: "/api/google/vaults/{vaultId}/connect",
598
+ ...options,
599
+ });
600
+ }
601
+ _config;
602
+ get config() {
603
+ return (this._config ??= new Config({ client: this.client }));
604
+ }
605
+ }
552
606
  export class Oauth extends HeyApiClient {
553
607
  /**
554
608
  * Start OAuth for an MCP (or confirm it is already connected)
@@ -1634,6 +1688,17 @@ export class Skill extends HeyApiClient {
1634
1688
  return (this._version ??= new Version2({ client: this.client }));
1635
1689
  }
1636
1690
  }
1691
+ export class Topology extends HeyApiClient {
1692
+ /**
1693
+ * Get agent-stack topology
1694
+ */
1695
+ get(options) {
1696
+ return (options?.client ?? this.client).get({
1697
+ url: "/api/topology",
1698
+ ...options,
1699
+ });
1700
+ }
1701
+ }
1637
1702
  export class Trigger extends HeyApiClient {
1638
1703
  /**
1639
1704
  * List cron triggers in a project
@@ -2156,6 +2221,10 @@ export class RenClient extends HeyApiClient {
2156
2221
  get github() {
2157
2222
  return (this._github ??= new Github({ client: this.client }));
2158
2223
  }
2224
+ _google;
2225
+ get google() {
2226
+ return (this._google ??= new Google({ client: this.client }));
2227
+ }
2159
2228
  _mcp;
2160
2229
  get mcp() {
2161
2230
  return (this._mcp ??= new Mcp({ client: this.client }));
@@ -2204,6 +2273,10 @@ export class RenClient extends HeyApiClient {
2204
2273
  get skill() {
2205
2274
  return (this._skill ??= new Skill({ client: this.client }));
2206
2275
  }
2276
+ _topology;
2277
+ get topology() {
2278
+ return (this._topology ??= new Topology({ client: this.client }));
2279
+ }
2207
2280
  _trigger;
2208
2281
  get trigger() {
2209
2282
  return (this._trigger ??= new Trigger({ client: this.client }));
@@ -150,6 +150,10 @@ export type BlueprintTemplate = {
150
150
  mcps: Array<BlueprintMcpRef>;
151
151
  replays: Array<BlueprintReplayRef>;
152
152
  };
153
+ export type RequiredCredential = {
154
+ name: string;
155
+ description?: string;
156
+ };
153
157
  export type Repository = {
154
158
  url?: string;
155
159
  source?: string;
@@ -212,17 +216,27 @@ export type CredentialAuth = {
212
216
  id: number;
213
217
  login: string;
214
218
  name: string | null;
219
+ } | {
220
+ service: "google_workspace";
221
+ sub: string;
222
+ email: string;
223
+ name: string | null;
224
+ hd: string | null;
215
225
  } | null;
216
226
  } | {
217
227
  type: "env";
218
228
  value: string;
229
+ } | {
230
+ type: "basic";
231
+ username: string;
232
+ password: string;
219
233
  };
220
234
  export type Credential = {
221
235
  id: string;
222
236
  vaultId: string;
223
237
  name: string;
224
238
  mcpId: string | null;
225
- provider: "github" | null;
239
+ provider: "github" | "google_workspace" | null;
226
240
  label: string | null;
227
241
  keyPreview: string | null;
228
242
  auth: CredentialAuthPublic;
@@ -244,6 +258,9 @@ export type CredentialAuthPublic = {
244
258
  } | null;
245
259
  } | {
246
260
  type: "env";
261
+ } | {
262
+ type: "basic";
263
+ username: string;
247
264
  };
248
265
  export type Vault = {
249
266
  id: string;
@@ -317,6 +334,68 @@ export type CronTrigger = {
317
334
  updatedAt: string;
318
335
  archivedAt: string | null;
319
336
  };
337
+ export type Topology = {
338
+ surfaces: Array<{
339
+ id: string;
340
+ kind: "mcp" | "cron" | "webhook" | "slack" | "github";
341
+ name: string;
342
+ icon?: string;
343
+ tags: Array<string>;
344
+ ports: Array<{
345
+ id: string;
346
+ label: string;
347
+ targetProjectId: string;
348
+ }>;
349
+ vaultIds: Array<string>;
350
+ }>;
351
+ pods: Array<{
352
+ id: string;
353
+ name: string;
354
+ isPrivate: boolean;
355
+ }>;
356
+ projects: Array<{
357
+ id: string;
358
+ podId: string;
359
+ name: string;
360
+ agents: Array<{
361
+ id: string;
362
+ name: string;
363
+ icon?: string;
364
+ model?: string;
365
+ }>;
366
+ skillsCount: number;
367
+ }>;
368
+ vaults: Array<{
369
+ id: string;
370
+ name: string;
371
+ podIds: Array<string>;
372
+ credentials: Array<{
373
+ id: string;
374
+ label: string;
375
+ forSurfaceId?: string;
376
+ provider?: string;
377
+ }>;
378
+ }>;
379
+ stores: Array<{
380
+ id: string;
381
+ kind: "file" | "memory";
382
+ name: string;
383
+ mounts: Array<{
384
+ projectId: string;
385
+ }>;
386
+ }>;
387
+ env: {
388
+ id: string;
389
+ } | null;
390
+ edges: Array<{
391
+ id: string;
392
+ kind: "route" | "state" | "cred";
393
+ sourceId: string;
394
+ sourcePortId?: string;
395
+ targetId: string;
396
+ targetCredId?: string;
397
+ }>;
398
+ };
320
399
  export type SkillVersion = {
321
400
  id: string;
322
401
  skillId: string;
@@ -336,10 +415,6 @@ export type SkillVersion = {
336
415
  requiredCredentials: Array<RequiredCredential>;
337
416
  releaseNotes: string | null;
338
417
  };
339
- export type RequiredCredential = {
340
- name: string;
341
- description?: string;
342
- };
343
418
  export type Skill = {
344
419
  id: string;
345
420
  slug: string;
@@ -388,14 +463,16 @@ export type AuthRequirements = {
388
463
  mcps: Array<AuthRequirementMcp>;
389
464
  envs: Array<AuthRequirementEnv>;
390
465
  };
466
+ export type AuthRequirementEnvSource = {
467
+ kind: "skill" | "mcp";
468
+ id: string;
469
+ name: string;
470
+ };
391
471
  export type AuthRequirementEnv = {
392
472
  name: string;
393
473
  description?: string;
394
474
  satisfied: boolean;
395
- neededBy: Array<{
396
- skillId: string;
397
- skillName: string;
398
- }>;
475
+ neededBy: Array<AuthRequirementEnvSource>;
399
476
  };
400
477
  export type McpAuthConfig = {
401
478
  type: "oauth";
@@ -720,6 +797,10 @@ export type Mcp = {
720
797
  prompts: Array<string>;
721
798
  auth: "none" | "oauth" | "api_key" | "basic";
722
799
  authConfig: McpAuthConfig | null;
800
+ env: {
801
+ [key: string]: string;
802
+ };
803
+ requiredCredentials: Array<RequiredCredential>;
723
804
  orgId: string;
724
805
  userId: string | null;
725
806
  publisherId: string | null;
@@ -735,6 +816,15 @@ export type Mcp = {
735
816
  deprecationMessage: string | null;
736
817
  tags?: Array<string>;
737
818
  };
819
+ export type GoogleWorkspaceOAuthStartResult = {
820
+ url: string;
821
+ };
822
+ export type GoogleWorkspaceStatus = {
823
+ isConfigured: boolean;
824
+ clientId: string | null;
825
+ scopes: Array<string>;
826
+ redirectUri: string;
827
+ };
738
828
  export type GithubStatus = {
739
829
  hasInstallation: boolean;
740
830
  hasUserCredential: boolean;
@@ -3101,6 +3191,204 @@ export type GithubReposResponses = {
3101
3191
  }>;
3102
3192
  };
3103
3193
  export type GithubReposResponse = GithubReposResponses[keyof GithubReposResponses];
3194
+ export type GoogleStatusData = {
3195
+ body?: never;
3196
+ path?: never;
3197
+ query?: {
3198
+ /**
3199
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
3200
+ */
3201
+ scope?: "user";
3202
+ };
3203
+ url: "/api/google/status";
3204
+ };
3205
+ export type GoogleStatusErrors = {
3206
+ /**
3207
+ * Unauthorized
3208
+ */
3209
+ 401: {
3210
+ error: string;
3211
+ };
3212
+ /**
3213
+ * Forbidden
3214
+ */
3215
+ 403: {
3216
+ error: string;
3217
+ };
3218
+ };
3219
+ export type GoogleStatusError = GoogleStatusErrors[keyof GoogleStatusErrors];
3220
+ export type GoogleStatusResponses = {
3221
+ /**
3222
+ * Google Workspace configuration status
3223
+ */
3224
+ 200: GoogleWorkspaceStatus;
3225
+ };
3226
+ export type GoogleStatusResponse = GoogleStatusResponses[keyof GoogleStatusResponses];
3227
+ export type GoogleConfigDeleteData = {
3228
+ body?: never;
3229
+ path?: never;
3230
+ query?: {
3231
+ /**
3232
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
3233
+ */
3234
+ scope?: "user";
3235
+ };
3236
+ url: "/api/google/config";
3237
+ };
3238
+ export type GoogleConfigDeleteErrors = {
3239
+ /**
3240
+ * Unauthorized
3241
+ */
3242
+ 401: {
3243
+ error: string;
3244
+ };
3245
+ /**
3246
+ * Forbidden
3247
+ */
3248
+ 403: {
3249
+ error: string;
3250
+ };
3251
+ };
3252
+ export type GoogleConfigDeleteError = GoogleConfigDeleteErrors[keyof GoogleConfigDeleteErrors];
3253
+ export type GoogleConfigDeleteResponses = {
3254
+ /**
3255
+ * Removed
3256
+ */
3257
+ 204: void;
3258
+ };
3259
+ export type GoogleConfigDeleteResponse = GoogleConfigDeleteResponses[keyof GoogleConfigDeleteResponses];
3260
+ export type GoogleConfigSaveData = {
3261
+ body?: {
3262
+ clientId: string;
3263
+ clientSecret: string;
3264
+ scopes?: Array<string>;
3265
+ };
3266
+ path?: never;
3267
+ query?: {
3268
+ /**
3269
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
3270
+ */
3271
+ scope?: "user";
3272
+ };
3273
+ url: "/api/google/config";
3274
+ };
3275
+ export type GoogleConfigSaveErrors = {
3276
+ /**
3277
+ * Bad request
3278
+ */
3279
+ 400: {
3280
+ error: string;
3281
+ };
3282
+ /**
3283
+ * Unauthorized
3284
+ */
3285
+ 401: {
3286
+ error: string;
3287
+ };
3288
+ /**
3289
+ * Forbidden
3290
+ */
3291
+ 403: {
3292
+ error: string;
3293
+ };
3294
+ };
3295
+ export type GoogleConfigSaveError = GoogleConfigSaveErrors[keyof GoogleConfigSaveErrors];
3296
+ export type GoogleConfigSaveResponses = {
3297
+ /**
3298
+ * Updated Google Workspace configuration status
3299
+ */
3300
+ 200: GoogleWorkspaceStatus;
3301
+ };
3302
+ export type GoogleConfigSaveResponse = GoogleConfigSaveResponses[keyof GoogleConfigSaveResponses];
3303
+ export type GoogleDisconnectData = {
3304
+ body?: never;
3305
+ path: {
3306
+ vaultId: string;
3307
+ };
3308
+ query?: {
3309
+ /**
3310
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
3311
+ */
3312
+ scope?: "user";
3313
+ };
3314
+ url: "/api/google/vaults/{vaultId}/connect";
3315
+ };
3316
+ export type GoogleDisconnectErrors = {
3317
+ /**
3318
+ * Unauthorized
3319
+ */
3320
+ 401: {
3321
+ error: string;
3322
+ };
3323
+ /**
3324
+ * Forbidden
3325
+ */
3326
+ 403: {
3327
+ error: string;
3328
+ };
3329
+ /**
3330
+ * Not found
3331
+ */
3332
+ 404: {
3333
+ error: string;
3334
+ };
3335
+ };
3336
+ export type GoogleDisconnectError = GoogleDisconnectErrors[keyof GoogleDisconnectErrors];
3337
+ export type GoogleDisconnectResponses = {
3338
+ /**
3339
+ * Removed
3340
+ */
3341
+ 204: void;
3342
+ };
3343
+ export type GoogleDisconnectResponse = GoogleDisconnectResponses[keyof GoogleDisconnectResponses];
3344
+ export type GoogleConnectData = {
3345
+ body?: never;
3346
+ path: {
3347
+ vaultId: string;
3348
+ };
3349
+ query?: {
3350
+ /**
3351
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
3352
+ */
3353
+ scope?: "user";
3354
+ returnTo?: string;
3355
+ };
3356
+ url: "/api/google/vaults/{vaultId}/connect";
3357
+ };
3358
+ export type GoogleConnectErrors = {
3359
+ /**
3360
+ * Bad request
3361
+ */
3362
+ 400: {
3363
+ error: string;
3364
+ };
3365
+ /**
3366
+ * Unauthorized
3367
+ */
3368
+ 401: {
3369
+ error: string;
3370
+ };
3371
+ /**
3372
+ * Forbidden
3373
+ */
3374
+ 403: {
3375
+ error: string;
3376
+ };
3377
+ /**
3378
+ * Not found
3379
+ */
3380
+ 404: {
3381
+ error: string;
3382
+ };
3383
+ };
3384
+ export type GoogleConnectError = GoogleConnectErrors[keyof GoogleConnectErrors];
3385
+ export type GoogleConnectResponses = {
3386
+ /**
3387
+ * Authorization URL for the user to visit
3388
+ */
3389
+ 200: GoogleWorkspaceOAuthStartResult;
3390
+ };
3391
+ export type GoogleConnectResponse = GoogleConnectResponses[keyof GoogleConnectResponses];
3104
3392
  export type McpListData = {
3105
3393
  body?: never;
3106
3394
  path?: never;
@@ -3142,12 +3430,16 @@ export type McpCreateData = {
3142
3430
  name: string;
3143
3431
  description?: string;
3144
3432
  icon?: string | null;
3145
- mcpServerUrl: string;
3433
+ mcpServerUrl?: string | null;
3146
3434
  docUrl?: string | null;
3147
3435
  type?: "remote" | "local";
3148
3436
  transport?: "streamable-http" | "sse" | "stdio";
3149
3437
  command?: string | null;
3150
3438
  args?: Array<string>;
3439
+ env?: {
3440
+ [key: string]: string;
3441
+ };
3442
+ requiredCredentials?: Array<RequiredCredential>;
3151
3443
  version?: string | null;
3152
3444
  repository?: Repository | null;
3153
3445
  tools?: Array<string>;
@@ -3332,6 +3624,10 @@ export type McpUpdateData = {
3332
3624
  transport?: "streamable-http" | "sse" | "stdio";
3333
3625
  command?: string | null;
3334
3626
  args?: Array<string>;
3627
+ env?: {
3628
+ [key: string]: string;
3629
+ };
3630
+ requiredCredentials?: Array<RequiredCredential>;
3335
3631
  version?: string | null;
3336
3632
  repository?: Repository | null;
3337
3633
  tools?: Array<string>;
@@ -7345,6 +7641,40 @@ export type SkillVersionArchiveResponses = {
7345
7641
  200: SkillVersion;
7346
7642
  };
7347
7643
  export type SkillVersionArchiveResponse = SkillVersionArchiveResponses[keyof SkillVersionArchiveResponses];
7644
+ export type TopologyGetData = {
7645
+ body?: never;
7646
+ path?: never;
7647
+ query?: never;
7648
+ url: "/api/topology";
7649
+ };
7650
+ export type TopologyGetErrors = {
7651
+ /**
7652
+ * Bad request
7653
+ */
7654
+ 400: {
7655
+ error: string;
7656
+ };
7657
+ /**
7658
+ * Unauthorized
7659
+ */
7660
+ 401: {
7661
+ error: string;
7662
+ };
7663
+ /**
7664
+ * Forbidden
7665
+ */
7666
+ 403: {
7667
+ error: string;
7668
+ };
7669
+ };
7670
+ export type TopologyGetError = TopologyGetErrors[keyof TopologyGetErrors];
7671
+ export type TopologyGetResponses = {
7672
+ /**
7673
+ * Agent-stack topology
7674
+ */
7675
+ 200: Topology;
7676
+ };
7677
+ export type TopologyGetResponse = TopologyGetResponses[keyof TopologyGetResponses];
7348
7678
  export type TriggerListData = {
7349
7679
  body?: never;
7350
7680
  path?: never;