@opengeni/contracts 2.9.2-canary.1 → 2.11.1-canary.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.
Files changed (41) hide show
  1. package/dist/atlassian.js +11 -11
  2. package/dist/{chunk-UGGTRQNU.js → chunk-6HOHS44G.js} +168 -27
  3. package/dist/chunk-6HOHS44G.js.map +1 -0
  4. package/dist/{chunk-4IVHBXRI.js → chunk-7ABONTXE.js} +42 -2
  5. package/dist/chunk-7ABONTXE.js.map +1 -0
  6. package/dist/{chunk-7RMTKFJW.js → chunk-7Q6HPDY2.js} +8 -8
  7. package/dist/{chunk-N6GRVXAJ.js → chunk-NPBM4QSK.js} +2 -2
  8. package/dist/connection-authority.js +11 -11
  9. package/dist/editable-artifact-codec-registry.js +2 -2
  10. package/dist/editable-artifact-live.js +2 -2
  11. package/dist/editable-artifact-serialized-commit.js +3 -3
  12. package/dist/editable-artifacts.js +13 -13
  13. package/dist/github-repository-contracts.d.ts +36 -0
  14. package/dist/github-repository-contracts.js +59 -0
  15. package/dist/github-repository-contracts.js.map +1 -0
  16. package/dist/github-repository.d.ts +14 -0
  17. package/dist/github-repository.js +36 -0
  18. package/dist/github-repository.js.map +1 -0
  19. package/dist/google-drive.js +12 -12
  20. package/dist/index.d.ts +386 -17
  21. package/dist/index.js +163 -135
  22. package/dist/model-picker-order.d.ts +2 -2
  23. package/dist/model-picker-order.js +13 -2
  24. package/dist/model-picker-order.js.map +1 -1
  25. package/dist/organization-membership-lifecycle.d.ts +17 -0
  26. package/dist/personal-github.js +11 -11
  27. package/dist/session-titles.d.ts +35 -0
  28. package/dist/session-titles.js +9 -3
  29. package/dist/workspace-learning-policy.d.ts +1 -1
  30. package/package.json +9 -1
  31. package/src/github-repository-contracts.ts +85 -0
  32. package/src/github-repository.ts +59 -0
  33. package/src/index.ts +239 -49
  34. package/src/model-picker-order.ts +17 -5
  35. package/src/organization-membership-lifecycle.ts +20 -0
  36. package/src/session-titles.ts +100 -0
  37. package/src/workspace-learning-policy.ts +4 -3
  38. package/dist/chunk-4IVHBXRI.js.map +0 -1
  39. package/dist/chunk-UGGTRQNU.js.map +0 -1
  40. /package/dist/{chunk-7RMTKFJW.js.map → chunk-7Q6HPDY2.js.map} +0 -0
  41. /package/dist/{chunk-N6GRVXAJ.js.map → chunk-NPBM4QSK.js.map} +0 -0
package/dist/atlassian.js CHANGED
@@ -17,26 +17,26 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-UGGTRQNU.js";
21
- import "./chunk-WYBDERIY.js";
22
- import "./chunk-MRWYRAS5.js";
23
- import "./chunk-4IVHBXRI.js";
24
- import "./chunk-CM6BMECR.js";
25
- import "./chunk-JUFK3T4Q.js";
20
+ } from "./chunk-6HOHS44G.js";
26
21
  import "./chunk-YBW5JSA3.js";
27
- import "./chunk-N6GRVXAJ.js";
22
+ import "./chunk-NPBM4QSK.js";
23
+ import "./chunk-CM6BMECR.js";
24
+ import "./chunk-MRWYRAS5.js";
28
25
  import "./chunk-3SIZGL3O.js";
26
+ import "./chunk-M5ZGRVIQ.js";
27
+ import "./chunk-BCS7WHCK.js";
28
+ import "./chunk-WYBDERIY.js";
29
+ import "./chunk-7ABONTXE.js";
29
30
  import "./chunk-NVJMJWLL.js";
30
31
  import "./chunk-YRKRZ6OF.js";
31
- import "./chunk-7RMTKFJW.js";
32
+ import "./chunk-7Q6HPDY2.js";
32
33
  import "./chunk-Y3KNXVTD.js";
34
+ import "./chunk-TXTQIYCV.js";
33
35
  import "./chunk-RIY7GYQS.js";
34
36
  import "./chunk-D2HKF2EF.js";
35
37
  import "./chunk-MYBZRDTY.js";
36
- import "./chunk-TXTQIYCV.js";
37
38
  import "./chunk-PX3VCKAU.js";
38
- import "./chunk-BCS7WHCK.js";
39
- import "./chunk-M5ZGRVIQ.js";
39
+ import "./chunk-JUFK3T4Q.js";
40
40
  export {
41
41
  ATLASSIAN_CREDENTIAL_LABEL,
42
42
  ATLASSIAN_CREDENTIAL_ROLE,
@@ -1,9 +1,3 @@
1
- import {
2
- ConnectorDocumentDestination
3
- } from "./chunk-WYBDERIY.js";
4
- import {
5
- normalizeAutomaticSessionTitle
6
- } from "./chunk-4IVHBXRI.js";
7
1
  import {
8
2
  XaiProviderAccountAuthoritySnapshotV1
9
3
  } from "./chunk-CM6BMECR.js";
@@ -14,6 +8,12 @@ import {
14
8
  retainedOutputUnavailable,
15
9
  validateRetainedOutputEvidence
16
10
  } from "./chunk-M5ZGRVIQ.js";
11
+ import {
12
+ ConnectorDocumentDestination
13
+ } from "./chunk-WYBDERIY.js";
14
+ import {
15
+ normalizeAutomaticSessionTitle
16
+ } from "./chunk-7ABONTXE.js";
17
17
 
18
18
  // src/atlassian.ts
19
19
  import { z as z31 } from "zod";
@@ -6772,7 +6772,7 @@ var WORKSPACE_LEARNING_POLICY_MAX_SOURCE_OVERRIDES = 256;
6772
6772
  var WORKSPACE_LEARNING_POLICY_SOURCE_KIND_MAX_CHARS = 96;
6773
6773
  var WORKSPACE_LEARNING_POLICY_SOURCE_ID_MAX_CHARS = 1024;
6774
6774
  var WORKSPACE_LEARNING_POLICY_REASON_MAX_CHARS = 4096;
6775
- var WORKSPACE_LEARNING_POLICY_DEFAULT_OFF_REVISION_ID = "workspace-learning-policy:default-off:v1";
6775
+ var WORKSPACE_LEARNING_POLICY_DEFAULT_SUGGEST_REVISION_ID = "workspace-learning-policy:default-suggest:v1";
6776
6776
  var WorkspaceLearningMode = z21.enum(["off", "suggest", "automatic"]);
6777
6777
  var WorkspaceLearningOverrideMode = z21.enum(["inherit", "off", "suggest", "automatic"]);
6778
6778
  function normalizeWorkspaceLearningSourceKind(value) {
@@ -6913,7 +6913,7 @@ function resolveWorkspaceLearningPolicyEffectiveMode(snapshot, source) {
6913
6913
  policyRevision: parsedSnapshot.revision,
6914
6914
  activationVersion: parsedSnapshot.activationVersion,
6915
6915
  snapshotId: parsedSnapshot.id,
6916
- revisionId: parsedSnapshot.revision?.id ?? WORKSPACE_LEARNING_POLICY_DEFAULT_OFF_REVISION_ID,
6916
+ revisionId: parsedSnapshot.revision?.id ?? WORKSPACE_LEARNING_POLICY_DEFAULT_SUGGEST_REVISION_ID,
6917
6917
  snapshotHash: parsedSnapshot.snapshotHash
6918
6918
  });
6919
6919
  }
@@ -7934,6 +7934,16 @@ var CreateOrganizationResponse = z28.object({
7934
7934
  organization: OrganizationSummary,
7935
7935
  workspaceId: z28.string().uuid()
7936
7936
  });
7937
+ var CreateAdditionalOrganizationRequest = z28.object({
7938
+ name: z28.string().trim().min(1).max(120),
7939
+ workspaceName: z28.string().trim().min(1).max(120),
7940
+ operationId: z28.string().uuid()
7941
+ }).strict();
7942
+ var CreateAdditionalOrganizationResponse = z28.object({
7943
+ organization: OrganizationSummary,
7944
+ workspaceId: z28.string().uuid(),
7945
+ personalWorkspaceId: z28.string().uuid()
7946
+ });
7937
7947
  var UpdateOrganizationNameRequest = z28.object({
7938
7948
  name: z28.string().trim().min(1).max(120),
7939
7949
  expectedUpdatedAt: z28.string().datetime({ offset: true }),
@@ -9731,8 +9741,8 @@ var WorkspaceSettingsSchema = z30.object({
9731
9741
  slackOrchestrationNotices: WorkspaceSlackOrchestrationNoticeSettings.optional()
9732
9742
  }).passthrough();
9733
9743
  function resolveWorkspaceMemoryEnabled(settings) {
9734
- const parsed = WorkspaceSettingsSchema.safeParse(settings ?? {});
9735
- return parsed.success ? parsed.data.memoryEnabled === true : false;
9744
+ const parsed = WorkspaceSettingsSchema.safeParse(settings === void 0 ? {} : settings);
9745
+ return parsed.success ? parsed.data.memoryEnabled !== false : false;
9736
9746
  }
9737
9747
  function resolveWorkspaceSessionDefaults(settings) {
9738
9748
  const parsed = WorkspaceSettingsSchema.safeParse(settings ?? {});
@@ -9844,6 +9854,26 @@ var WorkspaceOpenRouterCustomModel = WorkspaceGatewayCustomModel;
9844
9854
  var WorkspaceOpenRouterCustomModelsResponse = z30.object({
9845
9855
  models: z30.array(WorkspaceOpenRouterCustomModel)
9846
9856
  });
9857
+ var CreateOrganizationProviderCustomModelRequest = CreateWorkspaceGatewayCustomModelRequest;
9858
+ var DeleteOrganizationProviderCustomModelRequest = DeleteWorkspaceGatewayCustomModelRequest;
9859
+ var OrganizationProviderCustomModel = WorkspaceGatewayCustomModel;
9860
+ var OrganizationProviderCustomModelsResponse = z30.object({
9861
+ models: z30.array(OrganizationProviderCustomModel)
9862
+ });
9863
+ var OrganizationModelProviderKind = z30.enum(["vercel_gateway", "openrouter"]);
9864
+ var OrganizationModelProviderConnectionResponse = z30.object({
9865
+ providerKind: OrganizationModelProviderKind,
9866
+ status: z30.enum(["active", "revoked"]),
9867
+ version: z30.number().int().positive(),
9868
+ createdAt: z30.string().datetime(),
9869
+ updatedAt: z30.string().datetime()
9870
+ });
9871
+ var UpsertOrganizationModelProviderConnectionRequest = z30.object({
9872
+ operationId: z30.string().uuid(),
9873
+ expectedVersion: z30.number().int().nonnegative().optional(),
9874
+ apiKey: z30.string().trim().min(1).max(8192)
9875
+ }).strict();
9876
+ var RevokeOrganizationModelProviderConnectionRequest = z30.object({ operationId: z30.string().uuid(), expectedVersion: z30.number().int().positive() }).strict();
9847
9877
  var turnInitiatorIdentityFields = {
9848
9878
  subjectId: z30.string().min(1),
9849
9879
  /** Immutable display snapshot; never an authorization input. */
@@ -10497,7 +10527,10 @@ var InsightsModelUsageRow = z30.object({
10497
10527
  creditUsd: z30.number().nonnegative(),
10498
10528
  /** Hypothetical provider-rate USD; never an OpenGeni charge. */
10499
10529
  estimatedProviderUsd: z30.number().nonnegative(),
10500
- estimatedProviderCostKnownCalls: z30.number().int().nonnegative()
10530
+ estimatedProviderCostKnownCalls: z30.number().int().nonnegative(),
10531
+ /** OpenGeni credit price at the captured rate, whether or not credits paid for the call. */
10532
+ equivalentCreditUsd: z30.number().nonnegative(),
10533
+ equivalentCreditCostKnownCalls: z30.number().int().nonnegative()
10501
10534
  });
10502
10535
  var InsightsSeriesPoint = z30.object({
10503
10536
  label: z30.string().min(1),
@@ -10506,6 +10539,9 @@ var InsightsSeriesPoint = z30.object({
10506
10539
  /** UTC hour/day-bucketed hypothetical provider-rate USD for calls with captured pricing. */
10507
10540
  estimatedProviderUsd: z30.number().nonnegative(),
10508
10541
  estimatedProviderCostKnownCalls: z30.number().int().nonnegative(),
10542
+ /** UTC hour/day-bucketed equivalent OpenGeni credit price for calls with captured pricing. */
10543
+ equivalentCreditUsd: z30.number().nonnegative(),
10544
+ equivalentCreditCostKnownCalls: z30.number().int().nonnegative(),
10509
10545
  warmSeconds: z30.number().nonnegative(),
10510
10546
  inputTokens: z30.number().nonnegative(),
10511
10547
  outputTokens: z30.number().nonnegative(),
@@ -10534,6 +10570,8 @@ var InsightsSpendDriver = z30.object({
10534
10570
  creditUsd: z30.number().nonnegative(),
10535
10571
  estimatedProviderUsd: z30.number().nonnegative(),
10536
10572
  estimatedProviderCostKnownCalls: z30.number().int().nonnegative(),
10573
+ equivalentCreditUsd: z30.number().nonnegative(),
10574
+ equivalentCreditCostKnownCalls: z30.number().int().nonnegative(),
10537
10575
  tokens: z30.number().nonnegative(),
10538
10576
  cacheHitPct: z30.number().int().min(0).max(100),
10539
10577
  pctOfCreditUsd: z30.number().int().min(0).max(100),
@@ -10578,6 +10616,8 @@ var InsightsScheduleRow = z30.object({
10578
10616
  creditUsd: z30.number().nonnegative().nullable(),
10579
10617
  estimatedProviderUsd: z30.number().nonnegative().nullable(),
10580
10618
  estimatedProviderCostKnownCalls: z30.number().int().nonnegative().nullable(),
10619
+ equivalentCreditUsd: z30.number().nonnegative().nullable(),
10620
+ equivalentCreditCostKnownCalls: z30.number().int().nonnegative().nullable(),
10581
10621
  tokens: z30.number().nonnegative().nullable(),
10582
10622
  cacheHitPct: z30.number().int().min(0).max(100).nullable(),
10583
10623
  billing: InsightsBillingPath.nullable()
@@ -10603,6 +10643,8 @@ var InsightsModelCallRow = z30.object({
10603
10643
  creditUsd: z30.number().nonnegative(),
10604
10644
  /** Hypothetical provider-rate USD; null when historical pricing is unavailable. */
10605
10645
  estimatedProviderUsd: z30.number().nonnegative().nullable(),
10646
+ /** Equivalent OpenGeni credit price; null when historical pricing is unavailable. */
10647
+ equivalentCreditUsd: z30.number().nonnegative().nullable(),
10606
10648
  pricingSource: InsightsPricingSource.nullable()
10607
10649
  });
10608
10650
  var WorkspaceInsightsSnapshot = z30.object({
@@ -10649,6 +10691,11 @@ var WorkspaceInsightsSnapshot = z30.object({
10649
10691
  priorEstimatedProviderUsd: z30.number().nonnegative(),
10650
10692
  estimatedProviderCostKnownCalls: z30.number().int().nonnegative(),
10651
10693
  priorEstimatedProviderCostKnownCalls: z30.number().int().nonnegative(),
10694
+ /** Equivalent OpenGeni credit price across calls whose historical price was captured. */
10695
+ equivalentCreditUsd: z30.number().nonnegative(),
10696
+ priorEquivalentCreditUsd: z30.number().nonnegative(),
10697
+ equivalentCreditCostKnownCalls: z30.number().int().nonnegative(),
10698
+ priorEquivalentCreditCostKnownCalls: z30.number().int().nonnegative(),
10652
10699
  modelCalls: z30.number().int().nonnegative(),
10653
10700
  priorInputTokens: z30.number().nonnegative(),
10654
10701
  priorTotalTokens: z30.number().nonnegative(),
@@ -10752,6 +10799,8 @@ var McpConnectionResourceScopes = z30.array(McpConnectionResourceScope).min(1).m
10752
10799
  var McpServerConnectionRef = z30.object({
10753
10800
  /** Opaque host or standalone connection identifier. */
10754
10801
  connectionId: z30.string().min(1).optional(),
10802
+ /** Host-owned credential authority; omission keeps OpenGeni's native connection authority. */
10803
+ authoritySource: z30.literal("host").optional(),
10755
10804
  /** Stable provider family (for example github, gitlab, or azure_devops). */
10756
10805
  provider: z30.string().min(1).max(128).optional(),
10757
10806
  /** Provider host or tenant domain. */
@@ -10764,6 +10813,13 @@ var McpServerConnectionRef = z30.object({
10764
10813
  selectedResources: McpConnectionResourceScopes.optional(),
10765
10814
  subjectScope: z30.enum(["workspace", "subject"]).optional()
10766
10815
  }).strict().superRefine((reference, context) => {
10816
+ if (reference.authoritySource === "host" && !reference.connectionId) {
10817
+ context.addIssue({
10818
+ code: "custom",
10819
+ message: "host authority requires connectionId",
10820
+ path: ["connectionId"]
10821
+ });
10822
+ }
10767
10823
  if (!reference.selectedResources) return;
10768
10824
  if (!reference.connectionId) {
10769
10825
  context.addIssue({
@@ -14575,6 +14631,12 @@ var CapabilityPackSkill = z30.object({
14575
14631
  message: "skill name must be a single path segment of letters, digits, '.', '_' or '-'"
14576
14632
  }),
14577
14633
  description: z30.string().min(1).max(2048).optional(),
14634
+ // Workspace-managed Skills are available to every session in the
14635
+ // workspace. Session-selected Skills remain installed and inspectable, but
14636
+ // enter model context only when their immutable definition is attached to
14637
+ // a session explicitly. This is the hard contamination boundary for Packs
14638
+ // that guide implementation agents rather than customer-facing agents.
14639
+ activationMode: z30.enum(["workspace_managed", "session_selected"]).optional(),
14578
14640
  files: z30.array(CapabilityPackSkillFile).min(1).max(64)
14579
14641
  }).superRefine((skill, ctx) => {
14580
14642
  const seen = /* @__PURE__ */ new Set();
@@ -14596,7 +14658,9 @@ var CapabilityPackSkill = z30.object({
14596
14658
  });
14597
14659
  }
14598
14660
  });
14599
- var SessionSkill = CapabilityPackSkill;
14661
+ var SessionSkill = CapabilityPackSkill.transform(
14662
+ ({ activationMode: _activationMode, ...skill }) => skill
14663
+ );
14600
14664
  var SessionSkills = z30.array(SessionSkill).max(32).transform((skills, ctx) => {
14601
14665
  const selected = /* @__PURE__ */ new Map();
14602
14666
  for (const skill of skills) {
@@ -15459,10 +15523,13 @@ var CapabilityCatalogItem = z30.object({
15459
15523
  /** @deprecated Compatibility explanation paired with enabled. */
15460
15524
  enabledReason: z30.string().nullable().default(null),
15461
15525
  // The non-secret connection binding stored with an enabled installation.
15462
- // Workspace refs retain an exact row id. Subject refs deliberately omit it:
15463
- // each caller resolves their own visible row by provider/kind at runtime.
15526
+ // Native workspace refs retain an exact row id. Native subject refs omit it
15527
+ // so each caller resolves their own row. The first-party catalog projects a
15528
+ // host-owned installation as null for old-browser safety; the schema remains
15529
+ // tolerant of additive host projections from embedding-specific catalogs.
15464
15530
  connectionRef: z30.object({
15465
15531
  connectionId: z30.string().min(1).optional(),
15532
+ authoritySource: z30.literal("host").optional(),
15466
15533
  providerDomain: z30.string().min(1),
15467
15534
  kind: z30.string().min(1),
15468
15535
  subjectScope: z30.enum(["workspace", "subject"]).optional()
@@ -16647,6 +16714,15 @@ function resolveSessionEventTypeFilters(input) {
16647
16714
  for (const type of excluded) included.delete(type);
16648
16715
  return { includeTypes: [...included], excludeTypes: [...excluded] };
16649
16716
  }
16717
+ var ToolAuthNeededReason = z30.enum([
16718
+ "missing_connection",
16719
+ "expired",
16720
+ "insufficient_scope",
16721
+ "refresh_failed",
16722
+ "personal_authority_unavailable",
16723
+ "unsupported_auth",
16724
+ "resource_scope_unavailable"
16725
+ ]);
16650
16726
  var ToolAuthNeededPayload = z30.object({
16651
16727
  serverId: z30.string().min(1),
16652
16728
  toolName: z30.string().min(1).nullable().optional(),
@@ -16655,15 +16731,16 @@ var ToolAuthNeededPayload = z30.object({
16655
16731
  // Embedded hosts may use an opaque connection identity; never assume an
16656
16732
  // OpenGeni UUID on the public event wire.
16657
16733
  connectionId: z30.string().min(1).nullable().optional(),
16658
- reason: z30.enum([
16659
- "missing_connection",
16660
- "expired",
16661
- "insufficient_scope",
16662
- "refresh_failed",
16663
- "personal_authority_unavailable",
16664
- "unsupported_auth",
16665
- "resource_scope_unavailable"
16666
- ]),
16734
+ /** The failed binding is owned by the embedding host, not OpenGeni's connection broker. */
16735
+ authoritySource: z30.literal("host").optional(),
16736
+ /**
16737
+ * Legacy-compatible reason. Host-owned event writers pin this to
16738
+ * unsupported_auth so a pre-host-authority browser cannot launch native
16739
+ * OAuth for the opaque id.
16740
+ */
16741
+ reason: ToolAuthNeededReason,
16742
+ /** Exact host recovery reason consumed by host-aware clients. */
16743
+ hostReason: ToolAuthNeededReason.optional(),
16667
16744
  scopes: z30.array(z30.string().min(1)).optional(),
16668
16745
  resource: z30.string().min(1).optional(),
16669
16746
  selectedResources: McpConnectionResourceScopes.optional(),
@@ -16682,6 +16759,29 @@ var ToolAuthNeededPayload = z30.object({
16682
16759
  rationale: z30.string().min(1).max(2e3),
16683
16760
  requiredVariables: z30.array(VariableSetVariableName).max(64).default([])
16684
16761
  }).optional()
16762
+ }).superRefine((payload, context) => {
16763
+ if (payload.authoritySource === "host") {
16764
+ if (payload.reason !== "unsupported_auth") {
16765
+ context.addIssue({
16766
+ code: "custom",
16767
+ message: "host auth-needed events require the legacy-safe unsupported_auth reason",
16768
+ path: ["reason"]
16769
+ });
16770
+ }
16771
+ if (!payload.hostReason) {
16772
+ context.addIssue({
16773
+ code: "custom",
16774
+ message: "host auth-needed events require hostReason",
16775
+ path: ["hostReason"]
16776
+ });
16777
+ }
16778
+ } else if (payload.hostReason) {
16779
+ context.addIssue({
16780
+ code: "custom",
16781
+ message: "hostReason is reserved for host-owned auth-needed events",
16782
+ path: ["hostReason"]
16783
+ });
16784
+ }
16685
16785
  });
16686
16786
  var CredentialAuthNeededPayload = z30.object({
16687
16787
  credentialClass: z30.literal("run"),
@@ -17268,6 +17368,8 @@ var SessionEvent = z30.object({
17268
17368
  workspaceId: z30.string().uuid(),
17269
17369
  sessionId: z30.string().uuid(),
17270
17370
  sequence: z30.number().int().positive(),
17371
+ /** Server-owned durable high-water mark for a synthetic compact event. */
17372
+ coveredThrough: z30.number().int().positive().optional(),
17271
17373
  type: SessionEventType,
17272
17374
  payload: z30.unknown().default({}),
17273
17375
  occurredAt: z30.string(),
@@ -17616,6 +17718,8 @@ function boundSessionEvent(event, options = {}) {
17616
17718
  const turnGeneration = canonicalSessionEventGeneration(source.turnGeneration);
17617
17719
  const turnAttemptId = canonicalOptionalSessionEventUuid(source.turnAttemptId);
17618
17720
  const duplicateOfEventId = canonicalOptionalSessionEventUuid(source.duplicateOfEventId);
17721
+ const rawCoveredThrough = source.coveredThrough.readable ? source.coveredThrough.value : void 0;
17722
+ const coveredThrough = typeof rawCoveredThrough === "number" && Number.isSafeInteger(rawCoveredThrough) && rawCoveredThrough >= sequence ? rawCoveredThrough : void 0;
17619
17723
  const envelopeFields = [
17620
17724
  sessionEventCustomSerializerProjection(event),
17621
17725
  sessionEventAdditionalTopLevelFieldProjection(event),
@@ -17643,6 +17747,12 @@ function boundSessionEvent(event, options = {}) {
17643
17747
  duplicateReason,
17644
17748
  source.duplicateReason.readable
17645
17749
  ) : null,
17750
+ !source.coveredThrough.readable || rawCoveredThrough !== coveredThrough ? sessionEventEnvelopeFieldProjection(
17751
+ "coveredThrough",
17752
+ rawCoveredThrough,
17753
+ coveredThrough,
17754
+ source.coveredThrough.readable
17755
+ ) : null,
17646
17756
  ...sessionEventCanonicalFieldProjections(source, {
17647
17757
  id,
17648
17758
  workspaceId,
@@ -17678,6 +17788,7 @@ function boundSessionEvent(event, options = {}) {
17678
17788
  workspaceId,
17679
17789
  sessionId,
17680
17790
  sequence,
17791
+ ...coveredThrough === void 0 ? {} : { coveredThrough },
17681
17792
  type: typeIsSafe ? rawType : "session.event.envelope_omitted",
17682
17793
  payload,
17683
17794
  occurredAt,
@@ -17695,6 +17806,7 @@ function boundSessionEvent(event, options = {}) {
17695
17806
  workspaceId,
17696
17807
  sessionId,
17697
17808
  sequence,
17809
+ ...coveredThrough === void 0 ? {} : { coveredThrough },
17698
17810
  type: "session.event.envelope_omitted",
17699
17811
  payload: boundSessionEventPayload(
17700
17812
  {
@@ -17758,6 +17870,7 @@ var SESSION_EVENT_OWN_DATA_FIELDS = [
17758
17870
  "workspaceId",
17759
17871
  "sessionId",
17760
17872
  "sequence",
17873
+ "coveredThrough",
17761
17874
  "type",
17762
17875
  "payload",
17763
17876
  "occurredAt",
@@ -17933,6 +18046,13 @@ var CreateSessionRequest = withVariableSetIdAlias(
17933
18046
  // Inline skills are fixed onto the session. Child omission inherits the
17934
18047
  // trusted parent's selection; an explicit array, including [], wins.
17935
18048
  skills: SessionSkills.default([]),
18049
+ // Immutable workspace Skill identities to copy onto this session at
18050
+ // creation. This is the explicit opt-in path for session-selected Pack
18051
+ // Skills: installation alone never exposes them to model context. Child
18052
+ // omission still inherits the parent's already-materialized session Skills.
18053
+ installedSkillIds: z30.array(z30.string().min(1).max(512)).max(32).refine((ids) => new Set(ids).size === ids.length, {
18054
+ message: "installed Skill identities must be unique"
18055
+ }).optional(),
17936
18056
  // The same child omission rule applies to selected MCP tool refs. Top-level
17937
18057
  // omission still applies workspace-default capability MCP tools; explicit []
17938
18058
  // suppresses those defaults (the first-party OpenGeni server remains added).
@@ -18927,6 +19047,10 @@ var ModelCredentialSourceV1 = /* @__PURE__ */ defineModelContractSchema(
18927
19047
  z30.object({
18928
19048
  kind: z30.literal("workspace_connection"),
18929
19049
  mechanism: z30.literal("api_key")
19050
+ }).strict(),
19051
+ z30.object({
19052
+ kind: z30.literal("organization_connection"),
19053
+ mechanism: z30.literal("api_key")
18930
19054
  }).strict()
18931
19055
  ])
18932
19056
  );
@@ -18939,12 +19063,17 @@ var TurnExecutionCredentialSourceV1 = z30.union([
18939
19063
  ]);
18940
19064
  var ModelBillingAttributionV1 = /* @__PURE__ */ defineModelContractSchema(
18941
19065
  () => z30.object({
18942
- upstreamPayer: z30.enum(["deployment", "workspace", "connected_subscription"]),
19066
+ upstreamPayer: z30.enum([
19067
+ "deployment",
19068
+ "workspace",
19069
+ "organization",
19070
+ "connected_subscription"
19071
+ ]),
18943
19072
  metering: z30.enum(["opengeni_credits", "external"])
18944
19073
  }).strict()
18945
19074
  );
18946
19075
  var ModelCostClassV1 = /* @__PURE__ */ defineModelContractSchema(
18947
- () => z30.enum(["free", "credits", "subscription", "workspace"])
19076
+ () => z30.enum(["free", "credits", "subscription", "workspace", "organization"])
18948
19077
  );
18949
19078
  var TURN_EXECUTION_POLICY_METADATA_KEY = "turnExecutionPolicyV1";
18950
19079
  var TurnExecutionModelSourceV1 = /* @__PURE__ */ defineModelContractSchema(
@@ -19042,6 +19171,7 @@ var ModelPricingV1 = /* @__PURE__ */ defineModelContractSchema(
19042
19171
  () => z30.object({
19043
19172
  inputMicrosPerMillionTokens: z30.number().int().nonnegative(),
19044
19173
  cachedInputMicrosPerMillionTokens: z30.number().int().nonnegative().optional(),
19174
+ cacheWriteMicrosPerMillionTokens: z30.number().int().nonnegative().optional(),
19045
19175
  outputMicrosPerMillionTokens: z30.number().int().nonnegative(),
19046
19176
  marginBps: z30.number().int().min(0).max(1e5).optional()
19047
19177
  })
@@ -20005,7 +20135,7 @@ export {
20005
20135
  WORKSPACE_LEARNING_POLICY_SOURCE_KIND_MAX_CHARS,
20006
20136
  WORKSPACE_LEARNING_POLICY_SOURCE_ID_MAX_CHARS,
20007
20137
  WORKSPACE_LEARNING_POLICY_REASON_MAX_CHARS,
20008
- WORKSPACE_LEARNING_POLICY_DEFAULT_OFF_REVISION_ID,
20138
+ WORKSPACE_LEARNING_POLICY_DEFAULT_SUGGEST_REVISION_ID,
20009
20139
  WorkspaceLearningMode,
20010
20140
  WorkspaceLearningOverrideMode,
20011
20141
  normalizeWorkspaceLearningSourceKind,
@@ -20151,6 +20281,8 @@ export {
20151
20281
  RevokeOrganizationWorkspaceMemberResponse,
20152
20282
  CreateOrganizationRequest,
20153
20283
  CreateOrganizationResponse,
20284
+ CreateAdditionalOrganizationRequest,
20285
+ CreateAdditionalOrganizationResponse,
20154
20286
  UpdateOrganizationNameRequest,
20155
20287
  OrganizationRetentionPolicy,
20156
20288
  OrganizationRetentionDeletionClaim,
@@ -20322,6 +20454,14 @@ export {
20322
20454
  DeleteWorkspaceOpenRouterCustomModelRequest,
20323
20455
  WorkspaceOpenRouterCustomModel,
20324
20456
  WorkspaceOpenRouterCustomModelsResponse,
20457
+ CreateOrganizationProviderCustomModelRequest,
20458
+ DeleteOrganizationProviderCustomModelRequest,
20459
+ OrganizationProviderCustomModel,
20460
+ OrganizationProviderCustomModelsResponse,
20461
+ OrganizationModelProviderKind,
20462
+ OrganizationModelProviderConnectionResponse,
20463
+ UpsertOrganizationModelProviderConnectionRequest,
20464
+ RevokeOrganizationModelProviderConnectionRequest,
20325
20465
  UNATTRIBUTED_LEGACY_INITIATOR_SUBJECT_ID,
20326
20466
  ServiceTurnInitiator,
20327
20467
  TurnInitiatorContext,
@@ -20957,6 +21097,7 @@ export {
20957
21097
  SESSION_EVENT_RAW_DELTA_TYPES,
20958
21098
  SESSION_EVENT_SEMANTIC_CLASS_TYPES,
20959
21099
  resolveSessionEventTypeFilters,
21100
+ ToolAuthNeededReason,
20960
21101
  ToolAuthNeededPayload,
20961
21102
  CredentialAuthNeededPayload,
20962
21103
  StreamUrlRotatedPayload,
@@ -21156,4 +21297,4 @@ export {
21156
21297
  ClientConfig,
21157
21298
  evaluateWorkspaceModelPolicy
21158
21299
  };
21159
- //# sourceMappingURL=chunk-UGGTRQNU.js.map
21300
+ //# sourceMappingURL=chunk-6HOHS44G.js.map