@opengeni/contracts 1.3.0 → 1.4.2

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.
@@ -500,6 +500,7 @@ export type AgentFunctionToolClass = AgentCapabilityId | "runtime" | "sandbox";
500
500
  /** Tools served outside the first-party MCP catalog, by the name the model sees. */
501
501
  export declare const AGENT_FUNCTION_TOOL_CAPABILITIES: {
502
502
  readonly web_search: "webSearch";
503
+ readonly web_fetch: "webSearch";
503
504
  readonly x_search: "webSearch";
504
505
  readonly image_generation: "media";
505
506
  readonly request_human_input: "humanInput";
package/dist/atlassian.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-LLFQJL3S.js";
20
+ } from "./chunk-LGT7XRX7.js";
21
21
  import "./chunk-4JGHSSB7.js";
22
22
  import "./chunk-5IXYF6XN.js";
23
23
  import "./chunk-NRMCVHAU.js";
@@ -32,7 +32,7 @@ import "./chunk-YRKRZ6OF.js";
32
32
  import "./chunk-2VORLN2R.js";
33
33
  import "./chunk-GRG7PHWQ.js";
34
34
  import "./chunk-YRXAWWCU.js";
35
- import "./chunk-RYEHNSO7.js";
35
+ import "./chunk-TCXCRBPF.js";
36
36
  import "./chunk-2ACYHZFB.js";
37
37
  import "./chunk-KHHZTBP7.js";
38
38
  import "./chunk-YBW5JSA3.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ConnectionKind,
3
3
  SessionTenancyVisibility
4
- } from "./chunk-LLFQJL3S.js";
4
+ } from "./chunk-LGT7XRX7.js";
5
5
 
6
6
  // src/connection-authority.ts
7
7
  import { z } from "zod";
@@ -183,4 +183,4 @@ export {
183
183
  ConnectionUseAuditFact,
184
184
  ConnectionUseAuthorizationResult
185
185
  };
186
- //# sourceMappingURL=chunk-AIEC5DTX.js.map
186
+ //# sourceMappingURL=chunk-IBQ2IDBV.js.map
@@ -1337,8 +1337,11 @@ var FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
1337
1337
  editable_artifact_export_status: "artifacts"
1338
1338
  };
1339
1339
  var AGENT_FUNCTION_TOOL_CAPABILITIES = {
1340
- // Hosted provider tools.
1340
+ // Web search: the provider-hosted `web_search`/`x_search` tools, or
1341
+ // Opengeni's provider-agnostic `web_search` and `web_fetch` function tools
1342
+ // (one transport per turn; the capability is the same).
1341
1343
  web_search: "webSearch",
1344
+ web_fetch: "webSearch",
1342
1345
  x_search: "webSearch",
1343
1346
  image_generation: "media",
1344
1347
  // Runtime function tools.
@@ -3940,7 +3943,10 @@ var TranscriptionRecordingErrorCode = z24.enum([
3940
3943
  "unavailable",
3941
3944
  "too_large",
3942
3945
  "invalid_audio",
3943
- "unknown"
3946
+ "unknown",
3947
+ "insufficient_credits",
3948
+ "allowance_exhausted",
3949
+ "monthly_model_cost_limit"
3944
3950
  ]);
3945
3951
  var TranscriptionRecordingState = z24.enum([
3946
3952
  "uploading",
@@ -5018,6 +5024,59 @@ var CodemodeDispatchAck = z31.object({
5018
5024
  status: z31.enum(["accepted", "already_running", "terminal", "unavailable", "rejected"])
5019
5025
  }).strict();
5020
5026
 
5027
+ // src/mcp-structured-content.ts
5028
+ function omitStructuredContentTextDuplicates(result) {
5029
+ const structured = result.structuredContent;
5030
+ if (structured === void 0 || structured === null) return result;
5031
+ const content = result.content.filter(
5032
+ (entry) => !isPlainTextBlock(entry) || !textDuplicatesStructuredContent(entry.text, structured)
5033
+ );
5034
+ if (content.length === result.content.length) return result;
5035
+ return { ...result, content };
5036
+ }
5037
+ function isPlainTextBlock(entry) {
5038
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) return false;
5039
+ const record = entry;
5040
+ if (record.type !== "text" || typeof record.text !== "string") return false;
5041
+ return Object.keys(record).every((key) => key === "type" || key === "text");
5042
+ }
5043
+ function textDuplicatesStructuredContent(text, structured) {
5044
+ const trimmed = text.replace(/^[ \t\n\r]+/u, "");
5045
+ if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return false;
5046
+ let parsed;
5047
+ try {
5048
+ parsed = JSON.parse(text);
5049
+ } catch {
5050
+ return false;
5051
+ }
5052
+ return !containsUnsafeInteger(parsed) && jsonValuesEqual(parsed, structured);
5053
+ }
5054
+ function containsUnsafeInteger(value) {
5055
+ if (typeof value === "number") return Number.isInteger(value) && !Number.isSafeInteger(value);
5056
+ if (Array.isArray(value)) return value.some(containsUnsafeInteger);
5057
+ if (value && typeof value === "object") return Object.values(value).some(containsUnsafeInteger);
5058
+ return false;
5059
+ }
5060
+ function jsonValuesEqual(left, right) {
5061
+ if (left === right) return true;
5062
+ if (typeof left !== "object" || typeof right !== "object" || left === null || right === null) {
5063
+ return false;
5064
+ }
5065
+ if (Array.isArray(left) || Array.isArray(right)) {
5066
+ if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
5067
+ return false;
5068
+ }
5069
+ return left.every((entry, index) => jsonValuesEqual(entry, right[index]));
5070
+ }
5071
+ const leftRecord = left;
5072
+ const rightRecord = right;
5073
+ const leftKeys = Object.keys(leftRecord);
5074
+ if (leftKeys.length !== Object.keys(rightRecord).length) return false;
5075
+ return leftKeys.every(
5076
+ (key) => Object.hasOwn(rightRecord, key) && jsonValuesEqual(leftRecord[key], rightRecord[key])
5077
+ );
5078
+ }
5079
+
5021
5080
  // src/mcp-oauth.ts
5022
5081
  import { z as z32 } from "zod";
5023
5082
  var MCP_OAUTH_SCOPE = "mcp:access";
@@ -12139,6 +12198,7 @@ var ToolReviewStatus = z57.enum([
12139
12198
  "cancelled",
12140
12199
  "expired",
12141
12200
  "revoked",
12201
+ "blocked",
12142
12202
  "stale",
12143
12203
  "failed",
12144
12204
  "unavailable"
@@ -13428,7 +13488,10 @@ var TranscriptionErrorCode = z58.enum([
13428
13488
  "unavailable",
13429
13489
  "too_large",
13430
13490
  "invalid_audio",
13431
- "unknown"
13491
+ "unknown",
13492
+ "insufficient_credits",
13493
+ "allowance_exhausted",
13494
+ "monthly_model_cost_limit"
13432
13495
  ]);
13433
13496
  var VoiceInputErrorCode = TranscriptionErrorCode;
13434
13497
  var TranscriptionTimeSpan = z58.object({
@@ -13621,7 +13684,8 @@ var VoiceInputProviderId = z58.enum([
13621
13684
  "supergrok-subscription",
13622
13685
  "codex-subscription",
13623
13686
  "openai",
13624
- "azure-openai"
13687
+ "azure-openai",
13688
+ "azure-mai"
13625
13689
  ]);
13626
13690
  var WorkspaceVoiceInputSettings = z58.object({
13627
13691
  enabled: z58.boolean(),
@@ -15242,7 +15306,9 @@ var PromotionalCreditScope = z58.object({
15242
15306
  });
15243
15307
  var PromotionalCreditBalance = PromotionalCreditScope.extend({
15244
15308
  grantId: z58.string().uuid(),
15245
- remainingMicros: z58.number().int().nonnegative()
15309
+ remainingMicros: z58.number().int().nonnegative(),
15310
+ /** Also pays for dictation and live voice, like general credits (signup credits). */
15311
+ coversVoice: z58.boolean().optional()
15246
15312
  });
15247
15313
  var BillingBalance = z58.object({
15248
15314
  accountId: z58.string().uuid(),
@@ -16561,7 +16627,7 @@ var CodexRealtimeWebrtcRequest = SessionRealtimeOwnerProof.extend({
16561
16627
  var CodexRealtimeWebrtcResponse = z58.object({
16562
16628
  sdp: z58.string().min(1).max(1024 * 1024),
16563
16629
  version: CodexRealtimeWebrtcVersion,
16564
- model: z58.literal("gpt-live-1-boulder-alpha"),
16630
+ model: z58.enum(["gpt-live-1-boulder-alpha", "opengeni-azure/gpt-live-1"]),
16565
16631
  connectionId: z58.string().uuid(),
16566
16632
  connectionEpoch: z58.number().int().positive(),
16567
16633
  startupFenceSequence: z58.number().int().nonnegative(),
@@ -16676,6 +16742,7 @@ var SyncSessionRealtimeLedgerResponse = z58.object({
16676
16742
  outbound: z58.array(SessionRealtimeLedgerEntry)
16677
16743
  }).strict();
16678
16744
  var SessionRealtimeModel = z58.enum([
16745
+ "opengeni-azure/gpt-live-1",
16679
16746
  "gpt-live-1-boulder-alpha",
16680
16747
  "supergrok/grok-voice-think-fast-2.0",
16681
16748
  "opengeni-gateway/openai/gpt-realtime-2.1",
@@ -16692,6 +16759,12 @@ var WorkspaceRealtimeModelCatalogItem = z58.object({
16692
16759
  description: z58.string().min(1),
16693
16760
  available: z58.boolean(),
16694
16761
  unavailableReason: z58.string().nullable(),
16762
+ /**
16763
+ * Machine-readable reason when unavailable. Credit refusals use the same
16764
+ * codes as voice input (`insufficient_credits`, `allowance_exhausted`,
16765
+ * `monthly_model_cost_limit`).
16766
+ */
16767
+ unavailableCode: z58.string().min(1).max(64).nullable().optional(),
16695
16768
  recommended: z58.boolean()
16696
16769
  });
16697
16770
  var WorkspaceRealtimeModelCatalogResponse = z58.object({
@@ -16729,9 +16802,14 @@ var RenewSessionRealtimeRequest = SessionRealtimeOwnerProof.extend({
16729
16802
  var EndSessionRealtimeRequest = RenewSessionRealtimeRequest.extend({
16730
16803
  reason: z58.enum(["user_stop", "browser_unload"])
16731
16804
  });
16805
+ var SessionRealtimeStopInstruction = z58.object({
16806
+ code: z58.string().min(1).max(64),
16807
+ message: z58.string().min(1).max(512)
16808
+ });
16732
16809
  var SessionRealtimeMutationResponse = z58.object({
16733
16810
  mode: SessionRealtimeMode,
16734
- replay: z58.boolean()
16811
+ replay: z58.boolean(),
16812
+ stop: SessionRealtimeStopInstruction.optional()
16735
16813
  });
16736
16814
  var SessionAuthorizationOperation = z58.enum([
16737
16815
  "session.read",
@@ -20060,7 +20138,12 @@ var CapabilityRuntime = z58.object({
20060
20138
  "active_installation_compatibility",
20061
20139
  "missing_verification"
20062
20140
  ])
20063
- }).optional()
20141
+ }).optional(),
20142
+ // Server-derived connectability: present when the connector's OAuth
20143
+ // authorization server refuses self-registration, so connecting needs an
20144
+ // operator-registered client. `configured` is whether this deployment has
20145
+ // one; connector surfaces offer the row only when it is true.
20146
+ operatorOAuthClient: z58.object({ configured: z58.boolean() }).optional()
20064
20147
  });
20065
20148
  var CapabilityCatalogItem = z58.object({
20066
20149
  id: z58.string().min(1),
@@ -25174,6 +25257,7 @@ export {
25174
25257
  CodemodeCallSubmission,
25175
25258
  CodemodeDispatchRequest,
25176
25259
  CodemodeDispatchAck,
25260
+ omitStructuredContentTextDuplicates,
25177
25261
  MCP_OAUTH_SCOPE,
25178
25262
  MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS,
25179
25263
  MCP_OAUTH_REFRESH_TOKEN_TTL_SECONDS,
@@ -26242,6 +26326,7 @@ export {
26242
26326
  BeginSessionRealtimeRequest,
26243
26327
  RenewSessionRealtimeRequest,
26244
26328
  EndSessionRealtimeRequest,
26329
+ SessionRealtimeStopInstruction,
26245
26330
  SessionRealtimeMutationResponse,
26246
26331
  SessionAuthorizationOperation,
26247
26332
  SessionAuthorizationActor,
@@ -26889,4 +26974,4 @@ export {
26889
26974
  AtlassianDisconnectRequest,
26890
26975
  atlassianScopesAllowRead
26891
26976
  };
26892
- //# sourceMappingURL=chunk-LLFQJL3S.js.map
26977
+ //# sourceMappingURL=chunk-LGT7XRX7.js.map