@opengeni/contracts 0.37.0 → 0.38.1

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-XRNQOQ2K.js";
4
4
  import {
5
5
  ConnectorDocumentDestination,
6
6
  ConnectorDocumentDestinationSelection
package/dist/index.d.ts CHANGED
@@ -8179,6 +8179,7 @@ export declare const Session: z.ZodObject<{
8179
8179
  sandboxGroupId: z.ZodString;
8180
8180
  activeSandboxId: z.ZodNullable<z.ZodString>;
8181
8181
  activeEpoch: z.ZodNumber;
8182
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8182
8183
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8183
8184
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8184
8185
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -8589,6 +8590,7 @@ export declare const CreateSessionResponse: z.ZodObject<{
8589
8590
  sandboxGroupId: z.ZodString;
8590
8591
  activeSandboxId: z.ZodNullable<z.ZodString>;
8591
8592
  activeEpoch: z.ZodNumber;
8593
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8592
8594
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8593
8595
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8594
8596
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9005,6 +9007,7 @@ export declare const SessionListResponse: z.ZodObject<{
9005
9007
  sandboxGroupId: z.ZodString;
9006
9008
  activeSandboxId: z.ZodNullable<z.ZodString>;
9007
9009
  activeEpoch: z.ZodNumber;
9010
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9008
9011
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9009
9012
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9010
9013
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9410,6 +9413,7 @@ export declare const SessionListResponse: z.ZodObject<{
9410
9413
  sandboxGroupId: z.ZodString;
9411
9414
  activeSandboxId: z.ZodNullable<z.ZodString>;
9412
9415
  activeEpoch: z.ZodNumber;
9416
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9413
9417
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9414
9418
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9415
9419
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -9823,6 +9827,7 @@ export declare const SessionLineageResponse: z.ZodObject<{
9823
9827
  sandboxGroupId: z.ZodString;
9824
9828
  activeSandboxId: z.ZodNullable<z.ZodString>;
9825
9829
  activeEpoch: z.ZodNumber;
9830
+ workingDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9826
9831
  variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9827
9832
  environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9828
9833
  rigId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -14359,6 +14364,7 @@ export type ModelPricingScheduleV1 = z.infer<typeof ModelPricingScheduleV1>;
14359
14364
  export declare const ClientModel: z.ZodObject<{
14360
14365
  id: z.ZodString;
14361
14366
  label: z.ZodString;
14367
+ shortLabel: z.ZodOptional<z.ZodString>;
14362
14368
  provider: z.ZodString;
14363
14369
  providerLabel: z.ZodString;
14364
14370
  api: z.ZodEnum<{
@@ -14609,6 +14615,7 @@ export type ModelAvailabilityV1 = z.infer<typeof ModelAvailabilityV1>;
14609
14615
  export declare const WorkspaceModelCatalogModel: z.ZodObject<{
14610
14616
  id: z.ZodString;
14611
14617
  label: z.ZodString;
14618
+ shortLabel: z.ZodOptional<z.ZodString>;
14612
14619
  provider: z.ZodString;
14613
14620
  providerLabel: z.ZodString;
14614
14621
  api: z.ZodEnum<{
@@ -14858,6 +14865,7 @@ export declare const WorkspaceModelCatalogResponse: z.ZodObject<{
14858
14865
  models: z.ZodArray<z.ZodObject<{
14859
14866
  id: z.ZodString;
14860
14867
  label: z.ZodString;
14868
+ shortLabel: z.ZodOptional<z.ZodString>;
14861
14869
  provider: z.ZodString;
14862
14870
  providerLabel: z.ZodString;
14863
14871
  api: z.ZodEnum<{
@@ -15125,6 +15133,7 @@ export declare const ClientConfig: z.ZodObject<{
15125
15133
  models: z.ZodDefault<z.ZodArray<z.ZodObject<{
15126
15134
  id: z.ZodString;
15127
15135
  label: z.ZodString;
15136
+ shortLabel: z.ZodOptional<z.ZodString>;
15128
15137
  provider: z.ZodString;
15129
15138
  providerLabel: z.ZodString;
15130
15139
  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-XRNQOQ2K.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.1",
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
@@ -6210,6 +6210,9 @@ export const Session = z.object({
6210
6210
  // stale in-flight op and retry against the new active sandbox.
6211
6211
  activeSandboxId: z.string().uuid().nullable(),
6212
6212
  activeEpoch: z.number().int().nonnegative(),
6213
+ // The explicit connected-machine project root selected for this session.
6214
+ // Null means the enrolled agent's launch workspace root.
6215
+ workingDir: z.string().nullable().default(null),
6213
6216
  variableSetId: z.string().uuid().nullable().default(null),
6214
6217
  /** @deprecated use variableSetId */
6215
6218
  environmentId: z.string().uuid().nullable().default(null),
@@ -9773,6 +9776,8 @@ export const ClientModel = /* @__PURE__ */ defineModelContractSchema(() =>
9773
9776
  z.object({
9774
9777
  id: z.string(),
9775
9778
  label: z.string(),
9779
+ /** Optional curated compact label for dense UI (e.g. mobile composer). */
9780
+ shortLabel: z.string().min(1).max(64).optional(),
9776
9781
  provider: z.string(), // provider id
9777
9782
  providerLabel: z.string(),
9778
9783
  api: z.enum(["responses", "chat"]),
@@ -16,6 +16,7 @@ export const WORKSPACE_STATE_MAX_GAPS = 16;
16
16
  export const WORKSPACE_STATE_BASE_NAME_MAX_CHARS = 160;
17
17
  export const WORKSPACE_STATE_TOPIC_MAX_CHARS = 96;
18
18
  export const WORKSPACE_STATE_MEMORY_SAMPLE_LIMIT = 100;
19
+ export const WORKSPACE_STATE_EXPORT_SCHEMA_VERSION = 1;
19
20
 
20
21
  const Count = z.number().int().nonnegative();
21
22
 
@@ -46,6 +47,17 @@ export const WorkspaceStateSourceKindCounts = z
46
47
  .strict();
47
48
  export type WorkspaceStateSourceKindCounts = z.infer<typeof WorkspaceStateSourceKindCounts>;
48
49
 
50
+ export const WorkspaceStateDocumentAuthorityKindCounts = z
51
+ .object({
52
+ organization: Count,
53
+ workspace: Count,
54
+ personal: Count,
55
+ })
56
+ .strict();
57
+ export type WorkspaceStateDocumentAuthorityKindCounts = z.infer<
58
+ typeof WorkspaceStateDocumentAuthorityKindCounts
59
+ >;
60
+
49
61
  export const WorkspaceStateMemoryStatusCounts = z
50
62
  .object({
51
63
  proposed: Count,
@@ -116,6 +128,22 @@ export const WorkspaceStatePolicy = z
116
128
  })
117
129
  .strict();
118
130
 
131
+ export const WorkspaceStatePreferences = z
132
+ .object({
133
+ authority: z.literal("preference_registry_preferences"),
134
+ activeDescriptorCount: Count.max(64),
135
+ activeDescriptorHash: z.string().regex(/^[0-9a-f]{64}$/),
136
+ scopeCounts: z
137
+ .object({
138
+ organization: Count,
139
+ workspace: Count,
140
+ user: Count,
141
+ })
142
+ .strict(),
143
+ truncated: z.boolean(),
144
+ })
145
+ .strict();
146
+
119
147
  export const WorkspaceStateKnowledgeBase = z
120
148
  .object({
121
149
  id: z.string().uuid(),
@@ -164,6 +192,7 @@ export const WorkspaceStateKnowledgeAvailable = z
164
192
  inspectedVisibleDocumentCount: Count,
165
193
  documentStatusCounts: WorkspaceStateDocumentStatusCounts,
166
194
  sourceKindCounts: WorkspaceStateSourceKindCounts,
195
+ authorityKindCounts: WorkspaceStateDocumentAuthorityKindCounts,
167
196
  topics: z.array(WorkspaceStateTopic).max(WORKSPACE_STATE_MAX_TOPICS),
168
197
  topicsTruncated: z.boolean(),
169
198
  latestDocumentUpdatedAt: z.string().datetime().nullable(),
@@ -323,7 +352,31 @@ export const WorkspaceStateResponse = z
323
352
  })
324
353
  .strict(),
325
354
  policy: WorkspaceStatePolicy,
355
+ preferences: WorkspaceStatePreferences,
326
356
  knowledge: WorkspaceStateKnowledge,
327
357
  })
328
358
  .strict();
329
359
  export type WorkspaceStateResponse = z.infer<typeof WorkspaceStateResponse>;
360
+
361
+ export const WorkspaceStateExportOmission = z.enum([
362
+ "hidden_platform_prompts",
363
+ "policy_bodies",
364
+ "preference_content",
365
+ "document_content_and_private_metadata",
366
+ "memory_content_and_provenance",
367
+ "secret_values_and_credentials",
368
+ "session_messages_and_tool_outputs",
369
+ ]);
370
+ export type WorkspaceStateExportOmission = z.infer<typeof WorkspaceStateExportOmission>;
371
+
372
+ export const WorkspaceStateExportResponse = z
373
+ .object({
374
+ kind: z.literal("opengeni.workspace_state.sanitized_export"),
375
+ schemaVersion: z.literal(WORKSPACE_STATE_EXPORT_SCHEMA_VERSION),
376
+ generatedAt: z.string().datetime(),
377
+ stateSha256: z.string().regex(/^[0-9a-f]{64}$/),
378
+ omissions: z.array(WorkspaceStateExportOmission).length(7),
379
+ state: WorkspaceStateResponse,
380
+ })
381
+ .strict();
382
+ export type WorkspaceStateExportResponse = z.infer<typeof WorkspaceStateExportResponse>;