@opengeni/contracts 0.37.0 → 0.38.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-WVE7RAHN.js";
3
+ } from "./chunk-Y7UWTT3T.js";
4
4
  import {
5
5
  ConnectorDocumentDestination,
6
6
  ConnectorDocumentDestinationSelection
package/dist/index.d.ts CHANGED
@@ -2473,6 +2473,10 @@ export declare const McpPersonalConnectionDelegation: z.ZodObject<{
2473
2473
  delegated: "delegated";
2474
2474
  oauth2: "oauth2";
2475
2475
  }>>;
2476
+ connectionType: z.ZodOptional<z.ZodEnum<{
2477
+ mcp: "mcp";
2478
+ social: "social";
2479
+ }>>;
2476
2480
  }, z.core.$strict>;
2477
2481
  export type McpPersonalConnectionDelegation = z.infer<typeof McpPersonalConnectionDelegation>;
2478
2482
  /**
@@ -2491,6 +2495,10 @@ export declare const McpPersonalConnectionDelegations: z.ZodArray<z.ZodObject<{
2491
2495
  delegated: "delegated";
2492
2496
  oauth2: "oauth2";
2493
2497
  }>>;
2498
+ connectionType: z.ZodOptional<z.ZodEnum<{
2499
+ mcp: "mcp";
2500
+ social: "social";
2501
+ }>>;
2494
2502
  }, z.core.$strict>>;
2495
2503
  export declare const McpPersonalConnectionSummary: z.ZodObject<{
2496
2504
  serverId: z.ZodString;
@@ -7240,6 +7248,11 @@ export declare const SocialConnectionStatus: z.ZodEnum<{
7240
7248
  needs_reauth: "needs_reauth";
7241
7249
  }>;
7242
7250
  export type SocialConnectionStatus = z.infer<typeof SocialConnectionStatus>;
7251
+ export declare const ConnectionOwnership: z.ZodEnum<{
7252
+ personal: "personal";
7253
+ workspace: "workspace";
7254
+ }>;
7255
+ export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
7243
7256
  export declare const SocialConnection: z.ZodObject<{
7244
7257
  id: z.ZodString;
7245
7258
  accountId: z.ZodString;
@@ -7257,6 +7270,10 @@ export declare const SocialConnection: z.ZodObject<{
7257
7270
  accountHandle: z.ZodString;
7258
7271
  accountName: z.ZodNullable<z.ZodString>;
7259
7272
  externalAccountId: z.ZodNullable<z.ZodString>;
7273
+ ownership: z.ZodEnum<{
7274
+ personal: "personal";
7275
+ workspace: "workspace";
7276
+ }>;
7260
7277
  status: z.ZodEnum<{
7261
7278
  connected: "connected";
7262
7279
  disabled: "disabled";
@@ -7341,6 +7358,10 @@ export declare const SocialOAuthStartRequest: z.ZodObject<{
7341
7358
  reddit: "reddit";
7342
7359
  x: "x";
7343
7360
  }>;
7361
+ ownership: z.ZodDefault<z.ZodEnum<{
7362
+ personal: "personal";
7363
+ workspace: "workspace";
7364
+ }>>;
7344
7365
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
7345
7366
  returnPath: z.ZodOptional<z.ZodString>;
7346
7367
  }, z.core.$strip>;
@@ -7418,11 +7439,6 @@ export declare function comparePersonalSlackCanonicalConnections(left: PersonalS
7418
7439
  export declare function selectCanonicalPersonalSlackConnection<T extends PersonalSlackCanonicalConnection>(connections: readonly T[]): T | null;
7419
7440
  export declare const ConnectionCredentialBundle: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7420
7441
  export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
7421
- export declare const ConnectionOwnership: z.ZodEnum<{
7422
- personal: "personal";
7423
- workspace: "workspace";
7424
- }>;
7425
- export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
7426
7442
  export declare const CreateConnectionRequest: z.ZodObject<{
7427
7443
  providerDomain: z.ZodString;
7428
7444
  kind: z.ZodEnum<{
@@ -8179,6 +8195,7 @@ export declare const Session: z.ZodObject<{
8179
8195
  sandboxGroupId: z.ZodString;
8180
8196
  activeSandboxId: z.ZodNullable<z.ZodString>;
8181
8197
  activeEpoch: z.ZodNumber;
8198
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8182
8199
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8183
8200
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8184
8201
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -8589,6 +8606,7 @@ export declare const CreateSessionResponse: z.ZodObject<{
8589
8606
  sandboxGroupId: z.ZodString;
8590
8607
  activeSandboxId: z.ZodNullable<z.ZodString>;
8591
8608
  activeEpoch: z.ZodNumber;
8609
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8592
8610
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8593
8611
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8594
8612
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9005,6 +9023,7 @@ export declare const SessionListResponse: z.ZodObject<{
9005
9023
  sandboxGroupId: z.ZodString;
9006
9024
  activeSandboxId: z.ZodNullable<z.ZodString>;
9007
9025
  activeEpoch: z.ZodNumber;
9026
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9008
9027
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9009
9028
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9010
9029
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9410,6 +9429,7 @@ export declare const SessionListResponse: z.ZodObject<{
9410
9429
  sandboxGroupId: z.ZodString;
9411
9430
  activeSandboxId: z.ZodNullable<z.ZodString>;
9412
9431
  activeEpoch: z.ZodNumber;
9432
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9413
9433
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9414
9434
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9415
9435
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9823,6 +9843,7 @@ export declare const SessionLineageResponse: z.ZodObject<{
9823
9843
  sandboxGroupId: z.ZodString;
9824
9844
  activeSandboxId: z.ZodNullable<z.ZodString>;
9825
9845
  activeEpoch: z.ZodNumber;
9846
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9826
9847
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9827
9848
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9828
9849
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -14359,6 +14380,7 @@ export type ModelPricingScheduleV1 = z.infer<typeof ModelPricingScheduleV1>;
14359
14380
  export declare const ClientModel: z.ZodObject<{
14360
14381
  id: z.ZodString;
14361
14382
  label: z.ZodString;
14383
+ shortLabel: z.ZodOptional<z.ZodString>;
14362
14384
  provider: z.ZodString;
14363
14385
  providerLabel: z.ZodString;
14364
14386
  api: z.ZodEnum<{
@@ -14609,6 +14631,7 @@ export type ModelAvailabilityV1 = z.infer<typeof ModelAvailabilityV1>;
14609
14631
  export declare const WorkspaceModelCatalogModel: z.ZodObject<{
14610
14632
  id: z.ZodString;
14611
14633
  label: z.ZodString;
14634
+ shortLabel: z.ZodOptional<z.ZodString>;
14612
14635
  provider: z.ZodString;
14613
14636
  providerLabel: z.ZodString;
14614
14637
  api: z.ZodEnum<{
@@ -14858,6 +14881,7 @@ export declare const WorkspaceModelCatalogResponse: z.ZodObject<{
14858
14881
  models: z.ZodArray<z.ZodObject<{
14859
14882
  id: z.ZodString;
14860
14883
  label: z.ZodString;
14884
+ shortLabel: z.ZodOptional<z.ZodString>;
14861
14885
  provider: z.ZodString;
14862
14886
  providerLabel: z.ZodString;
14863
14887
  api: z.ZodEnum<{
@@ -15125,6 +15149,7 @@ export declare const ClientConfig: z.ZodObject<{
15125
15149
  models: z.ZodDefault<z.ZodArray<z.ZodObject<{
15126
15150
  id: z.ZodString;
15127
15151
  label: z.ZodString;
15152
+ shortLabel: z.ZodOptional<z.ZodString>;
15128
15153
  provider: z.ZodString;
15129
15154
  providerLabel: z.ZodString;
15130
15155
  api: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -579,6 +579,7 @@ import {
579
579
  WORKSPACE_INSTRUCTION_POLICY_ROLE_KEY_MAX_CHARS,
580
580
  WORKSPACE_INSTRUCTION_POLICY_SOURCE_ID_MAX_CHARS,
581
581
  WORKSPACE_STATE_BASE_NAME_MAX_CHARS,
582
+ WORKSPACE_STATE_EXPORT_SCHEMA_VERSION,
582
583
  WORKSPACE_STATE_MAX_ACTIVE_POLICY_HEADS,
583
584
  WORKSPACE_STATE_MAX_BASES,
584
585
  WORKSPACE_STATE_MAX_GAPS,
@@ -660,7 +661,10 @@ import {
660
661
  WorkspaceSlackReactionChannelPolicy,
661
662
  WorkspaceSlackReactionSummonSettings,
662
663
  WorkspaceStateAttemptGovernance,
664
+ WorkspaceStateDocumentAuthorityKindCounts,
663
665
  WorkspaceStateDocumentStatusCounts,
666
+ WorkspaceStateExportOmission,
667
+ WorkspaceStateExportResponse,
664
668
  WorkspaceStateGap,
665
669
  WorkspaceStateGapCode,
666
670
  WorkspaceStateGovernanceDriftStatus,
@@ -673,6 +677,7 @@ import {
673
677
  WorkspaceStatePolicy,
674
678
  WorkspaceStatePolicyHead,
675
679
  WorkspaceStatePolicyRevisionSummary,
680
+ WorkspaceStatePreferences,
676
681
  WorkspaceStateQuery,
677
682
  WorkspaceStateResponse,
678
683
  WorkspaceStateSourceKindCounts,
@@ -760,7 +765,7 @@ import {
760
765
  verifyStreamToken,
761
766
  workspaceControlUtf8Bytes,
762
767
  workspaceSlackReactionChannelAllowed
763
- } from "./chunk-WVE7RAHN.js";
768
+ } from "./chunk-Y7UWTT3T.js";
764
769
  import {
765
770
  ConnectorDocumentDestination,
766
771
  ConnectorDocumentDestinationAuthority,
@@ -1375,6 +1380,7 @@ export {
1375
1380
  WORKSPACE_INSTRUCTION_POLICY_ROLE_KEY_MAX_CHARS,
1376
1381
  WORKSPACE_INSTRUCTION_POLICY_SOURCE_ID_MAX_CHARS,
1377
1382
  WORKSPACE_STATE_BASE_NAME_MAX_CHARS,
1383
+ WORKSPACE_STATE_EXPORT_SCHEMA_VERSION,
1378
1384
  WORKSPACE_STATE_MAX_ACTIVE_POLICY_HEADS,
1379
1385
  WORKSPACE_STATE_MAX_BASES,
1380
1386
  WORKSPACE_STATE_MAX_GAPS,
@@ -1456,7 +1462,10 @@ export {
1456
1462
  WorkspaceSlackReactionChannelPolicy,
1457
1463
  WorkspaceSlackReactionSummonSettings,
1458
1464
  WorkspaceStateAttemptGovernance,
1465
+ WorkspaceStateDocumentAuthorityKindCounts,
1459
1466
  WorkspaceStateDocumentStatusCounts,
1467
+ WorkspaceStateExportOmission,
1468
+ WorkspaceStateExportResponse,
1460
1469
  WorkspaceStateGap,
1461
1470
  WorkspaceStateGapCode,
1462
1471
  WorkspaceStateGovernanceDriftStatus,
@@ -1469,6 +1478,7 @@ export {
1469
1478
  WorkspaceStatePolicy,
1470
1479
  WorkspaceStatePolicyHead,
1471
1480
  WorkspaceStatePolicyRevisionSummary,
1481
+ WorkspaceStatePreferences,
1472
1482
  WorkspaceStateQuery,
1473
1483
  WorkspaceStateResponse,
1474
1484
  WorkspaceStateSourceKindCounts,
@@ -6,6 +6,7 @@ export declare const WORKSPACE_STATE_MAX_GAPS = 16;
6
6
  export declare const WORKSPACE_STATE_BASE_NAME_MAX_CHARS = 160;
7
7
  export declare const WORKSPACE_STATE_TOPIC_MAX_CHARS = 96;
8
8
  export declare const WORKSPACE_STATE_MEMORY_SAMPLE_LIMIT = 100;
9
+ export declare const WORKSPACE_STATE_EXPORT_SCHEMA_VERSION = 1;
9
10
  export declare const WorkspaceStateQuery: z.ZodObject<{
10
11
  attemptId: z.ZodOptional<z.ZodString>;
11
12
  }, z.core.$strict>;
@@ -28,6 +29,12 @@ export declare const WorkspaceStateSourceKindCounts: z.ZodObject<{
28
29
  other: z.ZodNumber;
29
30
  }, z.core.$strict>;
30
31
  export type WorkspaceStateSourceKindCounts = z.infer<typeof WorkspaceStateSourceKindCounts>;
32
+ export declare const WorkspaceStateDocumentAuthorityKindCounts: z.ZodObject<{
33
+ organization: z.ZodNumber;
34
+ workspace: z.ZodNumber;
35
+ personal: z.ZodNumber;
36
+ }, z.core.$strict>;
37
+ export type WorkspaceStateDocumentAuthorityKindCounts = z.infer<typeof WorkspaceStateDocumentAuthorityKindCounts>;
31
38
  export declare const WorkspaceStateMemoryStatusCounts: z.ZodObject<{
32
39
  proposed: z.ZodNumber;
33
40
  approved: z.ZodNumber;
@@ -141,6 +148,17 @@ export declare const WorkspaceStatePolicy: z.ZodObject<{
141
148
  status: z.ZodLiteral<"not_implemented">;
142
149
  }, z.core.$strict>;
143
150
  }, z.core.$strict>;
151
+ export declare const WorkspaceStatePreferences: z.ZodObject<{
152
+ authority: z.ZodLiteral<"preference_registry_preferences">;
153
+ activeDescriptorCount: z.ZodNumber;
154
+ activeDescriptorHash: z.ZodString;
155
+ scopeCounts: z.ZodObject<{
156
+ organization: z.ZodNumber;
157
+ workspace: z.ZodNumber;
158
+ user: z.ZodNumber;
159
+ }, z.core.$strict>;
160
+ truncated: z.ZodBoolean;
161
+ }, z.core.$strict>;
144
162
  export declare const WorkspaceStateKnowledgeBase: z.ZodObject<{
145
163
  id: z.ZodString;
146
164
  name: z.ZodString;
@@ -223,6 +241,11 @@ export declare const WorkspaceStateKnowledgeAvailable: z.ZodObject<{
223
241
  web: z.ZodNumber;
224
242
  other: z.ZodNumber;
225
243
  }, z.core.$strict>;
244
+ authorityKindCounts: z.ZodObject<{
245
+ organization: z.ZodNumber;
246
+ workspace: z.ZodNumber;
247
+ personal: z.ZodNumber;
248
+ }, z.core.$strict>;
226
249
  topics: z.ZodArray<z.ZodObject<{
227
250
  name: z.ZodString;
228
251
  documentCount: z.ZodNumber;
@@ -314,6 +337,11 @@ export declare const WorkspaceStateKnowledge: z.ZodDiscriminatedUnion<[z.ZodObje
314
337
  web: z.ZodNumber;
315
338
  other: z.ZodNumber;
316
339
  }, z.core.$strict>;
340
+ authorityKindCounts: z.ZodObject<{
341
+ organization: z.ZodNumber;
342
+ workspace: z.ZodNumber;
343
+ personal: z.ZodNumber;
344
+ }, z.core.$strict>;
317
345
  topics: z.ZodArray<z.ZodObject<{
318
346
  name: z.ZodString;
319
347
  documentCount: z.ZodNumber;
@@ -646,6 +674,17 @@ export declare const WorkspaceStateResponse: z.ZodObject<{
646
674
  status: z.ZodLiteral<"not_implemented">;
647
675
  }, z.core.$strict>;
648
676
  }, z.core.$strict>;
677
+ preferences: z.ZodObject<{
678
+ authority: z.ZodLiteral<"preference_registry_preferences">;
679
+ activeDescriptorCount: z.ZodNumber;
680
+ activeDescriptorHash: z.ZodString;
681
+ scopeCounts: z.ZodObject<{
682
+ organization: z.ZodNumber;
683
+ workspace: z.ZodNumber;
684
+ user: z.ZodNumber;
685
+ }, z.core.$strict>;
686
+ truncated: z.ZodBoolean;
687
+ }, z.core.$strict>;
649
688
  knowledge: z.ZodDiscriminatedUnion<[z.ZodObject<{
650
689
  availability: z.ZodLiteral<"available">;
651
690
  coverage: z.ZodEnum<{
@@ -683,6 +722,11 @@ export declare const WorkspaceStateResponse: z.ZodObject<{
683
722
  web: z.ZodNumber;
684
723
  other: z.ZodNumber;
685
724
  }, z.core.$strict>;
725
+ authorityKindCounts: z.ZodObject<{
726
+ organization: z.ZodNumber;
727
+ workspace: z.ZodNumber;
728
+ personal: z.ZodNumber;
729
+ }, z.core.$strict>;
686
730
  topics: z.ZodArray<z.ZodObject<{
687
731
  name: z.ZodString;
688
732
  documentCount: z.ZodNumber;
@@ -738,3 +782,302 @@ export declare const WorkspaceStateResponse: z.ZodObject<{
738
782
  }, z.core.$strict>], "availability">;
739
783
  }, z.core.$strict>;
740
784
  export type WorkspaceStateResponse = z.infer<typeof WorkspaceStateResponse>;
785
+ export declare const WorkspaceStateExportOmission: z.ZodEnum<{
786
+ document_content_and_private_metadata: "document_content_and_private_metadata";
787
+ hidden_platform_prompts: "hidden_platform_prompts";
788
+ memory_content_and_provenance: "memory_content_and_provenance";
789
+ policy_bodies: "policy_bodies";
790
+ preference_content: "preference_content";
791
+ secret_values_and_credentials: "secret_values_and_credentials";
792
+ session_messages_and_tool_outputs: "session_messages_and_tool_outputs";
793
+ }>;
794
+ export type WorkspaceStateExportOmission = z.infer<typeof WorkspaceStateExportOmission>;
795
+ export declare const WorkspaceStateExportResponse: z.ZodObject<{
796
+ kind: z.ZodLiteral<"opengeni.workspace_state.sanitized_export">;
797
+ schemaVersion: z.ZodLiteral<1>;
798
+ generatedAt: z.ZodString;
799
+ stateSha256: z.ZodString;
800
+ omissions: z.ZodArray<z.ZodEnum<{
801
+ document_content_and_private_metadata: "document_content_and_private_metadata";
802
+ hidden_platform_prompts: "hidden_platform_prompts";
803
+ memory_content_and_provenance: "memory_content_and_provenance";
804
+ policy_bodies: "policy_bodies";
805
+ preference_content: "preference_content";
806
+ secret_values_and_credentials: "secret_values_and_credentials";
807
+ session_messages_and_tool_outputs: "session_messages_and_tool_outputs";
808
+ }>>;
809
+ state: z.ZodObject<{
810
+ workspaceId: z.ZodString;
811
+ generatedAt: z.ZodString;
812
+ truth: z.ZodObject<{
813
+ current: z.ZodObject<{
814
+ source: z.ZodLiteral<"read_time_projection">;
815
+ capturedAt: z.ZodString;
816
+ }, z.core.$strict>;
817
+ attemptGovernance: z.ZodDiscriminatedUnion<[z.ZodObject<{
818
+ status: z.ZodLiteral<"not_requested">;
819
+ }, z.core.$strict>, z.ZodObject<{
820
+ status: z.ZodLiteral<"unavailable">;
821
+ reason: z.ZodLiteral<"attempt_not_found_or_not_authorized">;
822
+ driftStatus: z.ZodLiteral<"unavailable">;
823
+ }, z.core.$strict>, z.ZodObject<{
824
+ status: z.ZodLiteral<"available">;
825
+ attemptId: z.ZodString;
826
+ executionGeneration: z.ZodNumber;
827
+ acceptedAt: z.ZodString;
828
+ policySnapshot: z.ZodDiscriminatedUnion<[z.ZodObject<{
829
+ status: z.ZodLiteral<"available">;
830
+ id: z.ZodString;
831
+ createdAt: z.ZodString;
832
+ entryHash: z.ZodString;
833
+ policyRole: z.ZodNullable<z.ZodString>;
834
+ roleSource: z.ZodEnum<{
835
+ invalid_metadata_fallback: "invalid_metadata_fallback";
836
+ metadata_fallback: "metadata_fallback";
837
+ none: "none";
838
+ session_binding: "session_binding";
839
+ }>;
840
+ entries: z.ZodArray<z.ZodObject<{
841
+ kind: z.ZodEnum<{
842
+ charter: "charter";
843
+ policy: "policy";
844
+ }>;
845
+ scope: z.ZodEnum<{
846
+ global: "global";
847
+ role: "role";
848
+ }>;
849
+ roleKey: z.ZodNullable<z.ZodString>;
850
+ revisionId: z.ZodString;
851
+ revision: z.ZodNumber;
852
+ contentHash: z.ZodString;
853
+ activationVersion: z.ZodNumber;
854
+ activatedAt: z.ZodString;
855
+ provenance: z.ZodObject<{
856
+ source: z.ZodEnum<{
857
+ human: "human";
858
+ knowledge_proposal: "knowledge_proposal";
859
+ legacy_import: "legacy_import";
860
+ onboarding: "onboarding";
861
+ }>;
862
+ sourceIdHash: z.ZodNullable<z.ZodString>;
863
+ }, z.core.$strip>;
864
+ }, z.core.$strip>>;
865
+ }, z.core.$strict>, z.ZodObject<{
866
+ status: z.ZodLiteral<"missing">;
867
+ }, z.core.$strict>], "status">;
868
+ preferenceSnapshot: z.ZodDiscriminatedUnion<[z.ZodObject<{
869
+ status: z.ZodLiteral<"available">;
870
+ id: z.ZodString;
871
+ createdAt: z.ZodString;
872
+ descriptorHash: z.ZodString;
873
+ descriptorCount: z.ZodNumber;
874
+ truncated: z.ZodBoolean;
875
+ }, z.core.$strict>, z.ZodObject<{
876
+ status: z.ZodLiteral<"missing">;
877
+ }, z.core.$strict>], "status">;
878
+ drift: z.ZodObject<{
879
+ overall: z.ZodEnum<{
880
+ changed: "changed";
881
+ identical: "identical";
882
+ missing: "missing";
883
+ superseded: "superseded";
884
+ truncated: "truncated";
885
+ unavailable: "unavailable";
886
+ }>;
887
+ policy: z.ZodObject<{
888
+ status: z.ZodEnum<{
889
+ changed: "changed";
890
+ identical: "identical";
891
+ missing: "missing";
892
+ superseded: "superseded";
893
+ truncated: "truncated";
894
+ unavailable: "unavailable";
895
+ }>;
896
+ snapshotHash: z.ZodNullable<z.ZodString>;
897
+ currentHash: z.ZodNullable<z.ZodString>;
898
+ snapshotTargetCount: z.ZodNumber;
899
+ currentTargetCount: z.ZodNumber;
900
+ }, z.core.$strict>;
901
+ preferences: z.ZodObject<{
902
+ status: z.ZodEnum<{
903
+ changed: "changed";
904
+ identical: "identical";
905
+ missing: "missing";
906
+ superseded: "superseded";
907
+ truncated: "truncated";
908
+ unavailable: "unavailable";
909
+ }>;
910
+ snapshotHash: z.ZodNullable<z.ZodString>;
911
+ currentHash: z.ZodNullable<z.ZodString>;
912
+ snapshotDescriptorCount: z.ZodNumber;
913
+ currentDescriptorCount: z.ZodNumber;
914
+ snapshotTruncated: z.ZodBoolean;
915
+ currentTruncated: z.ZodBoolean;
916
+ }, z.core.$strict>;
917
+ }, z.core.$strict>;
918
+ }, z.core.$strict>], "status">;
919
+ }, z.core.$strict>;
920
+ policy: z.ZodObject<{
921
+ authority: z.ZodLiteral<"workspace_instruction_policy_heads">;
922
+ activeHeads: z.ZodArray<z.ZodObject<{
923
+ kind: z.ZodEnum<{
924
+ charter: "charter";
925
+ policy: "policy";
926
+ }>;
927
+ scope: z.ZodEnum<{
928
+ global: "global";
929
+ role: "role";
930
+ }>;
931
+ roleKey: z.ZodNullable<z.ZodString>;
932
+ revisionId: z.ZodString;
933
+ revision: z.ZodNumber;
934
+ contentHash: z.ZodString;
935
+ activationVersion: z.ZodNumber;
936
+ activatedAt: z.ZodString;
937
+ }, z.core.$strict>>;
938
+ activeHeadsTruncated: z.ZodBoolean;
939
+ latestRevision: z.ZodNullable<z.ZodObject<{
940
+ kind: z.ZodEnum<{
941
+ charter: "charter";
942
+ policy: "policy";
943
+ }>;
944
+ scope: z.ZodEnum<{
945
+ global: "global";
946
+ role: "role";
947
+ }>;
948
+ roleKey: z.ZodNullable<z.ZodString>;
949
+ revisionId: z.ZodString;
950
+ revision: z.ZodNumber;
951
+ contentHash: z.ZodString;
952
+ provenanceSource: z.ZodEnum<{
953
+ human: "human";
954
+ knowledge_proposal: "knowledge_proposal";
955
+ legacy_import: "legacy_import";
956
+ onboarding: "onboarding";
957
+ }>;
958
+ state: z.ZodEnum<{
959
+ active: "active";
960
+ inactive: "inactive";
961
+ }>;
962
+ createdAt: z.ZodString;
963
+ }, z.core.$strict>>;
964
+ legacyRuntime: z.ZodObject<{
965
+ source: z.ZodEnum<{
966
+ deployment_default: "deployment_default";
967
+ workspace_override: "workspace_override";
968
+ }>;
969
+ workspaceOverrideConfigured: z.ZodBoolean;
970
+ }, z.core.$strict>;
971
+ runtimeComposition: z.ZodObject<{
972
+ status: z.ZodLiteral<"not_implemented">;
973
+ }, z.core.$strict>;
974
+ }, z.core.$strict>;
975
+ preferences: z.ZodObject<{
976
+ authority: z.ZodLiteral<"preference_registry_preferences">;
977
+ activeDescriptorCount: z.ZodNumber;
978
+ activeDescriptorHash: z.ZodString;
979
+ scopeCounts: z.ZodObject<{
980
+ organization: z.ZodNumber;
981
+ workspace: z.ZodNumber;
982
+ user: z.ZodNumber;
983
+ }, z.core.$strict>;
984
+ truncated: z.ZodBoolean;
985
+ }, z.core.$strict>;
986
+ knowledge: z.ZodDiscriminatedUnion<[z.ZodObject<{
987
+ availability: z.ZodLiteral<"available">;
988
+ coverage: z.ZodEnum<{
989
+ complete: "complete";
990
+ partial: "partial";
991
+ }>;
992
+ baseCount: z.ZodNumber;
993
+ bases: z.ZodArray<z.ZodObject<{
994
+ id: z.ZodString;
995
+ name: z.ZodString;
996
+ visibleDocumentCount: z.ZodNumber;
997
+ statusCounts: z.ZodObject<{
998
+ queued: z.ZodNumber;
999
+ indexing: z.ZodNumber;
1000
+ ready: z.ZodNumber;
1001
+ failed: z.ZodNumber;
1002
+ }, z.core.$strict>;
1003
+ latestUpdatedAt: z.ZodNullable<z.ZodString>;
1004
+ }, z.core.$strict>>;
1005
+ basesTruncated: z.ZodBoolean;
1006
+ inspectedVisibleDocumentCount: z.ZodNumber;
1007
+ documentStatusCounts: z.ZodObject<{
1008
+ queued: z.ZodNumber;
1009
+ indexing: z.ZodNumber;
1010
+ ready: z.ZodNumber;
1011
+ failed: z.ZodNumber;
1012
+ }, z.core.$strict>;
1013
+ sourceKindCounts: z.ZodObject<{
1014
+ manual_upload: z.ZodNumber;
1015
+ meeting_transcript: z.ZodNumber;
1016
+ repository: z.ZodNumber;
1017
+ email: z.ZodNumber;
1018
+ chat: z.ZodNumber;
1019
+ document: z.ZodNumber;
1020
+ web: z.ZodNumber;
1021
+ other: z.ZodNumber;
1022
+ }, z.core.$strict>;
1023
+ authorityKindCounts: z.ZodObject<{
1024
+ organization: z.ZodNumber;
1025
+ workspace: z.ZodNumber;
1026
+ personal: z.ZodNumber;
1027
+ }, z.core.$strict>;
1028
+ topics: z.ZodArray<z.ZodObject<{
1029
+ name: z.ZodString;
1030
+ documentCount: z.ZodNumber;
1031
+ }, z.core.$strict>>;
1032
+ topicsTruncated: z.ZodBoolean;
1033
+ latestDocumentUpdatedAt: z.ZodNullable<z.ZodString>;
1034
+ memorySample: z.ZodObject<{
1035
+ recordCount: z.ZodNumber;
1036
+ sampleLimit: z.ZodLiteral<100>;
1037
+ limitReached: z.ZodBoolean;
1038
+ statusCounts: z.ZodObject<{
1039
+ proposed: z.ZodNumber;
1040
+ approved: z.ZodNumber;
1041
+ rejected: z.ZodNumber;
1042
+ active: z.ZodNumber;
1043
+ superseded: z.ZodNumber;
1044
+ archived: z.ZodNumber;
1045
+ }, z.core.$strict>;
1046
+ kindCounts: z.ZodObject<{
1047
+ semantic: z.ZodNumber;
1048
+ episodic: z.ZodNumber;
1049
+ procedural: z.ZodNumber;
1050
+ decision: z.ZodNumber;
1051
+ preference: z.ZodNumber;
1052
+ }, z.core.$strict>;
1053
+ preferenceAuthority: z.ZodObject<{
1054
+ kindCountSource: z.ZodLiteral<"knowledge_memories_legacy_observations">;
1055
+ activeAuthority: z.ZodLiteral<"structured_preference_registry">;
1056
+ }, z.core.$strict>;
1057
+ latestUpdatedAt: z.ZodNullable<z.ZodString>;
1058
+ }, z.core.$strict>;
1059
+ gaps: z.ZodArray<z.ZodObject<{
1060
+ code: z.ZodEnum<{
1061
+ failed_documents: "failed_documents";
1062
+ missing_topic_coverage: "missing_topic_coverage";
1063
+ no_document_bases: "no_document_bases";
1064
+ no_memory_records: "no_memory_records";
1065
+ no_visible_documents: "no_visible_documents";
1066
+ partial_inventory: "partial_inventory";
1067
+ pending_memory_review: "pending_memory_review";
1068
+ processing_documents: "processing_documents";
1069
+ }>;
1070
+ severity: z.ZodEnum<{
1071
+ info: "info";
1072
+ warning: "warning";
1073
+ }>;
1074
+ relatedCount: z.ZodNullable<z.ZodNumber>;
1075
+ }, z.core.$strict>>;
1076
+ }, z.core.$strict>, z.ZodObject<{
1077
+ availability: z.ZodLiteral<"unavailable">;
1078
+ reason: z.ZodLiteral<"missing_permission">;
1079
+ requiredPermission: z.ZodLiteral<"documents:search">;
1080
+ }, z.core.$strict>], "availability">;
1081
+ }, z.core.$strict>;
1082
+ }, z.core.$strict>;
1083
+ export type WorkspaceStateExportResponse = z.infer<typeof WorkspaceStateExportResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.37.0",
3
+ "version": "0.38.2",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -2650,6 +2650,7 @@ export const McpPersonalConnectionDelegation = z
2650
2650
  ownerSubjectId: z.string().min(1).max(512),
2651
2651
  providerDomain: z.string().min(1).max(2048),
2652
2652
  kind: z.enum(["oauth2", "api_key", "app_install", "delegated"]).optional(),
2653
+ connectionType: z.enum(["mcp", "social"]).optional(),
2653
2654
  })
2654
2655
  .strict();
2655
2656
  export type McpPersonalConnectionDelegation = z.infer<typeof McpPersonalConnectionDelegation>;
@@ -5687,6 +5688,9 @@ export type SocialProvider = z.infer<typeof SocialProvider>;
5687
5688
  export const SocialConnectionStatus = z.enum(["connected", "needs_reauth", "disabled"]);
5688
5689
  export type SocialConnectionStatus = z.infer<typeof SocialConnectionStatus>;
5689
5690
 
5691
+ export const ConnectionOwnership = z.enum(["workspace", "personal"]);
5692
+ export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
5693
+
5690
5694
  export const SocialConnection = z.object({
5691
5695
  id: z.string().uuid(),
5692
5696
  accountId: z.string().uuid(),
@@ -5695,6 +5699,7 @@ export const SocialConnection = z.object({
5695
5699
  accountHandle: z.string().min(1),
5696
5700
  accountName: z.string().nullable(),
5697
5701
  externalAccountId: z.string().nullable(),
5702
+ ownership: ConnectionOwnership,
5698
5703
  status: SocialConnectionStatus,
5699
5704
  scopes: z.array(z.string()),
5700
5705
  credentialRef: z.string().nullable(),
@@ -5755,6 +5760,7 @@ export type SocialOAuthProviderId = z.infer<typeof SocialOAuthProviderId>;
5755
5760
 
5756
5761
  export const SocialOAuthStartRequest = z.object({
5757
5762
  provider: SocialOAuthProviderId,
5763
+ ownership: ConnectionOwnership.default("workspace"),
5758
5764
  scopes: z.array(z.string().min(1)).optional(),
5759
5765
  returnPath: z.string().optional(),
5760
5766
  });
@@ -5876,9 +5882,6 @@ function compareDescending(left: number | string, right: number | string): numbe
5876
5882
  export const ConnectionCredentialBundle = z.record(z.string(), z.unknown());
5877
5883
  export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
5878
5884
 
5879
- export const ConnectionOwnership = z.enum(["workspace", "personal"]);
5880
- export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
5881
-
5882
5885
  export const CreateConnectionRequest = z.object({
5883
5886
  providerDomain: z.string().min(1),
5884
5887
  kind: ConnectionKind,
@@ -6210,6 +6213,9 @@ export const Session = z.object({
6210
6213
  // stale in-flight op and retry against the new active sandbox.
6211
6214
  activeSandboxId: z.string().uuid().nullable(),
6212
6215
  activeEpoch: z.number().int().nonnegative(),
6216
+ // The explicit connected-machine project root selected for this session.
6217
+ // Null means the enrolled agent's launch workspace root.
6218
+ workingDir: z.string().nullable().default(null),
6213
6219
  variableSetId: z.string().uuid().nullable().default(null),
6214
6220
  /** @deprecated use variableSetId */
6215
6221
  environmentId: z.string().uuid().nullable().default(null),
@@ -9773,6 +9779,8 @@ export const ClientModel = /* @__PURE__ */ defineModelContractSchema(() =>
9773
9779
  z.object({
9774
9780
  id: z.string(),
9775
9781
  label: z.string(),
9782
+ /** Optional curated compact label for dense UI (e.g. mobile composer). */
9783
+ shortLabel: z.string().min(1).max(64).optional(),
9776
9784
  provider: z.string(), // provider id
9777
9785
  providerLabel: z.string(),
9778
9786
  api: z.enum(["responses", "chat"]),