@opengeni/core 6.35.1-canary.45051251770001 → 6.36.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.
@@ -31,15 +31,21 @@ export type DelegatedHumanAuthorization = Readonly<{
31
31
  permissions: Permission[];
32
32
  workspaceScope: OrganizationWorkspaceScope;
33
33
  }>;
34
- /** What an outside agent may do with app data: read like a viewer, or manage. */
34
+ /**
35
+ * What an outside agent may do with app data (read like a viewer, or manage),
36
+ * and the connected agent it is, when it signed in as one (a personal API key
37
+ * has none). Its writes are recorded as that connected agent.
38
+ */
35
39
  export type OutsideAgentReach = Readonly<{
36
40
  appData: "viewer" | "manager";
41
+ connectionId?: string;
37
42
  }>;
38
43
  /** Grant metadata key naming an outside agent's reach (see {@link outsideAgentReach}). */
39
44
  export declare const OUTSIDE_AGENT_GRANT_METADATA_KEY = "outsideAgent";
40
45
  /**
41
46
  * The outside-agent reach a grant was resolved with, or null for every other
42
- * caller. Only narrows: a grant that claims it is treated as an outside agent.
47
+ * caller. Set only by the server from a verified OAuth connection; it narrows
48
+ * access, and its `connectionId` names the connected agent as the writer.
43
49
  */
44
50
  export declare function outsideAgentReach(grant: {
45
51
  metadata?: Record<string, unknown> | undefined;
@@ -202,6 +202,7 @@ export declare function resolveGoalModelAdmission(db: Database, settings: Settin
202
202
  opengeniMcpInternalUrl?: string | undefined;
203
203
  opengeniMcpUrl?: string | undefined;
204
204
  corsAllowOriginRegex: string;
205
+ interactionViewerOrigins?: string | undefined;
205
206
  localAllowedOrigins?: string | undefined;
206
207
  landingOrigins?: string | undefined;
207
208
  openaiProvider: "azure" | "openai";
@@ -280,6 +281,11 @@ export declare function resolveGoalModelAdmission(db: Database, settings: Settin
280
281
  resolvedOpperModelsJson?: string | undefined;
281
282
  resolvedCodexModelsJson?: string | undefined;
282
283
  modelProvidersJson: string;
284
+ bedrockRegion?: string | undefined;
285
+ bedrockEndpointUrl?: string | undefined;
286
+ bedrockModels?: string | undefined;
287
+ bedrockModelDiscovery?: boolean | undefined;
288
+ bedrockAttributionRoleArn?: string | undefined;
283
289
  builtinModelResidencyJson?: string | undefined;
284
290
  sideFeatureResidencyJson?: string | undefined;
285
291
  requiredModelGeography?: "eu" | undefined;
package/dist/index.js CHANGED
@@ -1,31 +1,3 @@
1
- import {
2
- EDITABLE_ARTIFACT_EXPORT_FORMATS,
3
- EDITABLE_ARTIFACT_EXPORT_MAX_DOWNLOAD_BYTES,
4
- EDITABLE_ARTIFACT_EXPORT_MAX_OPTIONS_BYTES,
5
- EditableArtifactAgentApplication,
6
- EditableArtifactCompactionPipeline,
7
- EditableArtifactDurableExportError,
8
- EditableArtifactDurableExportService,
9
- EditableArtifactGenesisPipeline,
10
- EditableArtifactOfficeImportError,
11
- InMemoryEditableArtifactStableIdFactory,
12
- InMemoryEditableArtifactStore,
13
- SystemEditableArtifactClock,
14
- describeConfiguredExportFormats,
15
- describeEditableArtifactExportFormats,
16
- editableArtifactAuthorizationRevisionPortFromPostgres,
17
- editableArtifactDurableExportStorePortFromPostgres,
18
- editableArtifactFormatMatchesModality,
19
- editableArtifactLiveReadPortFromPostgres,
20
- editableArtifactLiveTicketStorePortFromPostgres,
21
- editableArtifactMaterializationKey,
22
- editableArtifactMaterializationMimeType,
23
- editableArtifactScopeAuthorizationRevisionPortFromPostgres,
24
- editableArtifactStorePortFromPostgres,
25
- unsupportedEditableArtifactExport,
26
- validateEditableArtifactMaterializationJob,
27
- validateEditableArtifactPinnedVersion
28
- } from "./chunk-SH5QEVGO.js";
29
1
  import {
30
2
  EDITABLE_ARTIFACT_HINT_MAX_BYTES,
31
3
  EDITABLE_ARTIFACT_HINT_SUBJECT_PREFIX,
@@ -54,6 +26,34 @@ import {
54
26
  encodeEditableArtifactLiveServerWireFrame,
55
27
  inspectEditableArtifactLiveWireEnvelope
56
28
  } from "./chunk-52AHIXY4.js";
29
+ import {
30
+ EDITABLE_ARTIFACT_EXPORT_FORMATS,
31
+ EDITABLE_ARTIFACT_EXPORT_MAX_DOWNLOAD_BYTES,
32
+ EDITABLE_ARTIFACT_EXPORT_MAX_OPTIONS_BYTES,
33
+ EditableArtifactAgentApplication,
34
+ EditableArtifactCompactionPipeline,
35
+ EditableArtifactDurableExportError,
36
+ EditableArtifactDurableExportService,
37
+ EditableArtifactGenesisPipeline,
38
+ EditableArtifactOfficeImportError,
39
+ InMemoryEditableArtifactStableIdFactory,
40
+ InMemoryEditableArtifactStore,
41
+ SystemEditableArtifactClock,
42
+ describeConfiguredExportFormats,
43
+ describeEditableArtifactExportFormats,
44
+ editableArtifactAuthorizationRevisionPortFromPostgres,
45
+ editableArtifactDurableExportStorePortFromPostgres,
46
+ editableArtifactFormatMatchesModality,
47
+ editableArtifactLiveReadPortFromPostgres,
48
+ editableArtifactLiveTicketStorePortFromPostgres,
49
+ editableArtifactMaterializationKey,
50
+ editableArtifactMaterializationMimeType,
51
+ editableArtifactScopeAuthorizationRevisionPortFromPostgres,
52
+ editableArtifactStorePortFromPostgres,
53
+ unsupportedEditableArtifactExport,
54
+ validateEditableArtifactMaterializationJob,
55
+ validateEditableArtifactPinnedVersion
56
+ } from "./chunk-SH5QEVGO.js";
57
57
  import {
58
58
  EDITABLE_ARTIFACT_COMPACTION_BYTE_THRESHOLD,
59
59
  EDITABLE_ARTIFACT_COMPACTION_TRANSACTION_THRESHOLD,
@@ -7651,18 +7651,25 @@ var delegatedHumanAuthorizationSchema = z2.object({
7651
7651
  var delegatedHumanRequests = /* @__PURE__ */ new WeakMap();
7652
7652
  var delegatedHumanContexts = /* @__PURE__ */ new WeakMap();
7653
7653
  var outsideAgentProofs = /* @__PURE__ */ new WeakMap();
7654
+ var CONNECTION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
7655
+ function frozenReach(reach) {
7656
+ return Object.freeze({
7657
+ appData: reach.appData === "manager" ? "manager" : "viewer",
7658
+ ...typeof reach.connectionId === "string" && CONNECTION_ID.test(reach.connectionId) ? { connectionId: reach.connectionId.toLowerCase() } : {}
7659
+ });
7660
+ }
7654
7661
  var OUTSIDE_AGENT_GRANT_METADATA_KEY = "outsideAgent";
7655
7662
  function outsideAgentReach(grant) {
7656
7663
  const value = grant?.metadata?.[OUTSIDE_AGENT_GRANT_METADATA_KEY];
7657
7664
  if (value === null || typeof value !== "object" || Array.isArray(value)) return null;
7658
- return { appData: value.appData === "manager" ? "manager" : "viewer" };
7665
+ return frozenReach(value);
7659
7666
  }
7660
7667
  function withOutsideAgentMetadata(grant, proof) {
7661
7668
  const reach = outsideAgentProofs.get(proof);
7662
7669
  if (!reach) return grant;
7663
7670
  return {
7664
7671
  ...grant,
7665
- metadata: { ...grant.metadata, [OUTSIDE_AGENT_GRANT_METADATA_KEY]: { appData: reach.appData } }
7672
+ metadata: { ...grant.metadata, [OUTSIDE_AGENT_GRANT_METADATA_KEY]: { ...reach } }
7666
7673
  };
7667
7674
  }
7668
7675
  var workspaceExternalPersonProofs = /* @__PURE__ */ new WeakSet();
@@ -7700,8 +7707,7 @@ function stampDelegatedHumanAuthorization(request2, input, options = {}) {
7700
7707
  workspaceScope
7701
7708
  };
7702
7709
  Object.freeze(proof.permissions);
7703
- if (options.outsideAgent)
7704
- outsideAgentProofs.set(proof, Object.freeze({ appData: options.outsideAgent.appData }));
7710
+ if (options.outsideAgent) outsideAgentProofs.set(proof, frozenReach(options.outsideAgent));
7705
7711
  delegatedHumanRequests.set(request2, Object.freeze(proof));
7706
7712
  }
7707
7713
  function stampSiteViewerSessionAuthorization(request2, input) {
@@ -7729,8 +7735,7 @@ function stampWorkspacePersonAuthorization(request2, input, options = {}) {
7729
7735
  Object.freeze(parsed3.workspaceScope.workspaceIds);
7730
7736
  Object.freeze(parsed3.workspaceScope);
7731
7737
  const proof = Object.freeze(parsed3);
7732
- if (options.outsideAgent)
7733
- outsideAgentProofs.set(proof, Object.freeze({ appData: options.outsideAgent.appData }));
7738
+ if (options.outsideAgent) outsideAgentProofs.set(proof, frozenReach(options.outsideAgent));
7734
7739
  workspaceExternalPersonProofs.add(proof);
7735
7740
  delegatedHumanRequests.set(request2, proof);
7736
7741
  }