@opengeni/sdk 0.26.0 → 0.27.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Framework-agnostic TypeScript SDK for the OpenGeni API: typed client, session lifecycle, SSE event streaming with reconnect + replay-by-sequence, and proxy re-streaming helpers.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/client.ts CHANGED
@@ -46,7 +46,8 @@ import type {
46
46
  CreateCapabilityCatalogItemRequest,
47
47
  CreateCheckoutRequest,
48
48
  CreateCheckoutResponse,
49
- ConnectOpenGeniSlackBotRequest,
49
+ OpenGeniSlackBotInstallRequest,
50
+ OpenGeniSlackBotInstallStart,
50
51
  CreateConnectionRequest,
51
52
  CreateDocumentBaseRequest,
52
53
  CreateFileUploadRequest,
@@ -2589,17 +2590,16 @@ export class OpenGeniClient {
2589
2590
  return response.connection;
2590
2591
  }
2591
2592
 
2592
- /** Validate and store/reinstall the workspace-shared OpenGeni Slack bot credential. */
2593
- async connectOpenGeniSlackBot(
2593
+ /** Start the public Slack installation flow for the workspace-shared OpenGeni bot. */
2594
+ async startOpenGeniSlackBotInstall(
2594
2595
  workspaceId: string,
2595
- request: ConnectOpenGeniSlackBotRequest,
2596
- ): Promise<ConnectionMetadata> {
2597
- const response = await this.requestJson<ConnectionResponse>(
2596
+ request: OpenGeniSlackBotInstallRequest = {},
2597
+ ): Promise<OpenGeniSlackBotInstallStart> {
2598
+ return await this.requestJson<OpenGeniSlackBotInstallStart>(
2598
2599
  "POST",
2599
- `/v1/workspaces/${workspaceId}/connections/slack-bot`,
2600
+ `/v1/workspaces/${workspaceId}/connections/slack-bot/install`,
2600
2601
  request,
2601
2602
  );
2602
- return response.connection;
2603
2603
  }
2604
2604
 
2605
2605
  async updateConnection(
package/src/index.ts CHANGED
@@ -191,7 +191,8 @@ export type {
191
191
  CreateApiKeyRequest,
192
192
  CreateApiKeyResponse,
193
193
  CreateCapabilityCatalogItemRequest,
194
- ConnectOpenGeniSlackBotRequest,
194
+ OpenGeniSlackBotInstallRequest,
195
+ OpenGeniSlackBotInstallStart,
195
196
  CreateConnectionRequest,
196
197
  CreateCheckoutRequest,
197
198
  CreateCheckoutResponse,
package/src/types.ts CHANGED
@@ -408,13 +408,16 @@ export type CreateConnectionRequest = {
408
408
  metadata?: Record<string, unknown> | undefined;
409
409
  };
410
410
 
411
- export type ConnectOpenGeniSlackBotRequest = {
412
- /** Write-only Slack bot token. It is never returned by the API. */
413
- token: string;
411
+ export type OpenGeniSlackBotInstallRequest = {
414
412
  /** Existing OpenGeni Slack bot connection to reinstall in place. */
415
413
  connectionId?: string | undefined;
416
414
  };
417
415
 
416
+ export type OpenGeniSlackBotInstallStart = {
417
+ authorizationUrl: string;
418
+ expiresAt: string;
419
+ };
420
+
418
421
  export type UpdateConnectionRequest = {
419
422
  providerDomain?: string | undefined;
420
423
  subjectId?: string | null | undefined;
@@ -491,6 +494,7 @@ export type Session = {
491
494
  // the session carried none. Org-visible metadata, never a timeline event.
492
495
  instructions: string | null;
493
496
  resources: ResourceRef[];
497
+ skills: SessionSkill[];
494
498
  tools: ToolRef[];
495
499
  toolPolicy?: SessionToolPolicy | undefined;
496
500
  toolPolicyVersion?: number | undefined;
@@ -1366,7 +1370,8 @@ export type WorkspaceCaptureRepo = {
1366
1370
  export type WorkspaceCaptureDegradedReason =
1367
1371
  | "repository_discovery_command_failed"
1368
1372
  | "repository_discovery_timed_out"
1369
- | "repository_discovery_result_limit_exceeded";
1373
+ | "repository_discovery_result_limit_exceeded"
1374
+ | "repository_read_unavailable";
1370
1375
  export type WorkspaceCaptureStats = {
1371
1376
  repoCount: number;
1372
1377
  fileCount: number;
@@ -1559,6 +1564,8 @@ export type CreateSessionRequest = {
1559
1564
  // user-visible timeline. Trimmed, non-empty, max 32768 chars.
1560
1565
  instructions?: string | undefined;
1561
1566
  resources?: ResourceRef[] | undefined;
1567
+ /** Inline skills fixed onto this session; omitted children inherit them. */
1568
+ skills?: SessionSkill[] | undefined;
1562
1569
  tools?: ToolRef[] | undefined;
1563
1570
  metadata?: Record<string, unknown> | undefined;
1564
1571
  model?: string | undefined;
@@ -3124,6 +3131,8 @@ export type CapabilityPackSkill = {
3124
3131
  files: CapabilityPackSkillFile[];
3125
3132
  };
3126
3133
 
3134
+ export type SessionSkill = CapabilityPackSkill;
3135
+
3127
3136
  export type CapabilityPackVariableSetSpec = {
3128
3137
  description: string;
3129
3138
  requiredVariables: string[];
@@ -3312,9 +3321,10 @@ export type CapabilityCatalogItem = {
3312
3321
  enabledReason: string | null;
3313
3322
  /** The connection backing this enabled installation, or null when none is involved. */
3314
3323
  connectionRef: {
3315
- connectionId: string;
3324
+ connectionId?: string | undefined;
3316
3325
  providerDomain: string;
3317
3326
  kind: string;
3327
+ subjectScope?: "subject" | "workspace" | undefined;
3318
3328
  } | null;
3319
3329
  metadata: Record<string, unknown>;
3320
3330
  createdAt?: string | undefined;