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