@flashbacktech/tsclient 0.4.49 → 0.4.51

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/index.d.cts CHANGED
@@ -573,7 +573,7 @@ declare class SandboxesClient {
573
573
  delete(sandboxId: string): Promise<SimpleResponse>;
574
574
  }
575
575
 
576
- type ProviderID = 'AWS' | 'BEDROCK' | 'GCP' | 'AZURE' | 'SSH' | 'GITHUB' | 'GITLAB' | 'AZURE_DEVOPS' | 'OPENAI' | 'ANTHROPIC' | 'GEMINI' | string;
576
+ type ProviderID = 'AWS' | 'BEDROCK' | 'GCP' | 'AZURE' | 'OCI' | 'SSH' | 'GITHUB' | 'GITLAB' | 'AZURE_DEVOPS' | 'OPENAI' | 'ANTHROPIC' | 'GEMINI' | string;
577
577
  interface Credential {
578
578
  id: string;
579
579
  provider: ProviderID;
@@ -716,6 +716,13 @@ declare class CredentialsClient {
716
716
  * republish.
717
717
  */
718
718
  providers(): Promise<ProviderSpec[]>;
719
+ /**
720
+ * globalAiProviders returns the AI provider ids the platform "global" key
721
+ * pool (admin org's reference project) can serve, e.g. ['ANTHROPIC']. Empty
722
+ * when no platform keys are configured — the UI then hides the non-BYOK
723
+ * provider picker entirely (BYOK-only, as before the feature).
724
+ */
725
+ globalAiProviders(): Promise<ProviderID[]>;
719
726
  }
720
727
 
721
728
  /**
package/dist/index.d.ts CHANGED
@@ -573,7 +573,7 @@ declare class SandboxesClient {
573
573
  delete(sandboxId: string): Promise<SimpleResponse>;
574
574
  }
575
575
 
576
- type ProviderID = 'AWS' | 'BEDROCK' | 'GCP' | 'AZURE' | 'SSH' | 'GITHUB' | 'GITLAB' | 'AZURE_DEVOPS' | 'OPENAI' | 'ANTHROPIC' | 'GEMINI' | string;
576
+ type ProviderID = 'AWS' | 'BEDROCK' | 'GCP' | 'AZURE' | 'OCI' | 'SSH' | 'GITHUB' | 'GITLAB' | 'AZURE_DEVOPS' | 'OPENAI' | 'ANTHROPIC' | 'GEMINI' | string;
577
577
  interface Credential {
578
578
  id: string;
579
579
  provider: ProviderID;
@@ -716,6 +716,13 @@ declare class CredentialsClient {
716
716
  * republish.
717
717
  */
718
718
  providers(): Promise<ProviderSpec[]>;
719
+ /**
720
+ * globalAiProviders returns the AI provider ids the platform "global" key
721
+ * pool (admin org's reference project) can serve, e.g. ['ANTHROPIC']. Empty
722
+ * when no platform keys are configured — the UI then hides the non-BYOK
723
+ * provider picker entirely (BYOK-only, as before the feature).
724
+ */
725
+ globalAiProviders(): Promise<ProviderID[]>;
719
726
  }
720
727
 
721
728
  /**
package/dist/index.js CHANGED
@@ -586,6 +586,18 @@ var CredentialsClient = class {
586
586
  const res = await this.http.get("/providers");
587
587
  return res.providers ?? res.data ?? [];
588
588
  }
589
+ /**
590
+ * globalAiProviders returns the AI provider ids the platform "global" key
591
+ * pool (admin org's reference project) can serve, e.g. ['ANTHROPIC']. Empty
592
+ * when no platform keys are configured — the UI then hides the non-BYOK
593
+ * provider picker entirely (BYOK-only, as before the feature).
594
+ */
595
+ async globalAiProviders() {
596
+ const res = await this.http.get(
597
+ "/credentials/global-ai-providers"
598
+ );
599
+ return res.providers ?? res.data ?? [];
600
+ }
589
601
  };
590
602
 
591
603
  // src/modules/chat/ChatStream.ts
@@ -1387,6 +1399,54 @@ var PROVIDER_CATALOG = {
1387
1399
  }
1388
1400
  ]
1389
1401
  },
1402
+ OCI: {
1403
+ id: "OCI",
1404
+ displayName: "Oracle Cloud Infrastructure",
1405
+ capabilities: CAP_STORAGE,
1406
+ fields: [
1407
+ {
1408
+ path: "metadata.tenancyOcid",
1409
+ label: "Tenancy OCID",
1410
+ type: "text",
1411
+ required: true,
1412
+ placeholder: "ocid1.tenancy.oc1..aaaa\u2026",
1413
+ help: "The tenancy's OCID, from the OCI console (Profile \u2192 Tenancy)."
1414
+ },
1415
+ {
1416
+ path: "metadata.userOcid",
1417
+ label: "User OCID",
1418
+ type: "text",
1419
+ required: true,
1420
+ placeholder: "ocid1.user.oc1..aaaa\u2026",
1421
+ help: "The OCID of the user the API signing key belongs to."
1422
+ },
1423
+ {
1424
+ path: "metadata.fingerprint",
1425
+ label: "Key Fingerprint",
1426
+ type: "text",
1427
+ required: true,
1428
+ placeholder: "aa:bb:cc:dd:\u2026",
1429
+ help: "Fingerprint of the uploaded API signing key (shown next to the key in the console)."
1430
+ },
1431
+ {
1432
+ path: "secret",
1433
+ label: "API Private Key (PEM)",
1434
+ type: "pem",
1435
+ required: true,
1436
+ secret: true,
1437
+ placeholder: "-----BEGIN PRIVATE KEY-----\n\u2026\n-----END PRIVATE KEY-----",
1438
+ help: "Paste the PEM, or drop the .pem file. Passphrase-protected keys are rejected \u2014 the agent runs unattended. Encrypted at rest."
1439
+ },
1440
+ {
1441
+ path: "metadata.region",
1442
+ label: "Region",
1443
+ type: "text",
1444
+ required: false,
1445
+ placeholder: "us-phoenix-1",
1446
+ help: "Default region for the oci CLI / SDK. Optional \u2014 leave blank to use the SDK default."
1447
+ }
1448
+ ]
1449
+ },
1390
1450
  SSH: {
1391
1451
  id: "SSH",
1392
1452
  displayName: "SSH",
@@ -1748,7 +1808,7 @@ var PROVIDER_CATALOG = {
1748
1808
  ]
1749
1809
  }
1750
1810
  };
1751
- var PROVIDER_ORDER = ["AWS", "BEDROCK", "GCP", "AZURE", "SSH", "GITHUB", "GITLAB", "AZURE_DEVOPS", "OPENAI", "ANTHROPIC", "GEMINI", "SLACK", "TEAMS", "PAGERDUTY", "SMTP"];
1811
+ var PROVIDER_ORDER = ["AWS", "BEDROCK", "GCP", "AZURE", "OCI", "SSH", "GITHUB", "GITLAB", "AZURE_DEVOPS", "OPENAI", "ANTHROPIC", "GEMINI", "SLACK", "TEAMS", "PAGERDUTY", "SMTP"];
1752
1812
  function listProviders() {
1753
1813
  return PROVIDER_ORDER.flatMap((id) => PROVIDER_CATALOG[id] ? [PROVIDER_CATALOG[id]] : []);
1754
1814
  }
@@ -1914,6 +1974,12 @@ function computeDisplayHint(providerId, metadata) {
1914
1974
  const head = shortPrefix(client, 8);
1915
1975
  return head + (sub ? ` / sub:${shortPrefix(sub, 8)}` : "");
1916
1976
  }
1977
+ case "OCI": {
1978
+ const tenancy = str(metadata["tenancyOcid"]);
1979
+ const region = str(metadata["region"]);
1980
+ const head = shortPrefix(tenancy, 12);
1981
+ return head + (region ? ` / ${region}` : "");
1982
+ }
1917
1983
  case "SSH": {
1918
1984
  const user = str(metadata["user"]);
1919
1985
  const host = str(metadata["host"]);