@opengeni/contracts 0.39.0 → 0.40.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.
package/dist/index.js CHANGED
@@ -23,6 +23,11 @@ import {
23
23
  CODEX_FLEET_POLICY_MAX_OVERLAYS_PER_CANDIDATE,
24
24
  CODEX_FLEET_POLICY_SCHEMA_VERSION,
25
25
  CODEX_FLEET_POLICY_VERSION,
26
+ COMPUTER_SCREENSHOT_MAX_BYTES,
27
+ COMPUTER_SCREENSHOT_MAX_DIMENSION,
28
+ COMPUTER_SCREENSHOT_MAX_PIXELS,
29
+ COMPUTER_SCREENSHOT_RETENTION_MS,
30
+ COMPUTER_SCREENSHOT_WORKSPACE_QUOTA_BYTES,
26
31
  CapabilityCatalogAuthKind,
27
32
  CapabilityCatalogItem,
28
33
  CapabilityCatalogResponse,
@@ -158,6 +163,8 @@ import {
158
163
  FsDeleteRequest,
159
164
  FsDeleteResponse,
160
165
  FsEncoding,
166
+ FsListBatchRequest,
167
+ FsListBatchResponse,
161
168
  FsListRequest,
162
169
  FsListResponse,
163
170
  FsMkdirRequest,
@@ -199,6 +206,10 @@ import {
199
206
  GitHubRepositoryScope,
200
207
  GitLogRequest,
201
208
  GitLogResponse,
209
+ GitReadBatchItemRequest,
210
+ GitReadBatchItemResponse,
211
+ GitReadBatchRequest,
212
+ GitReadBatchResponse,
202
213
  GitRepositoryAccess,
203
214
  GitShowRequest,
204
215
  GitShowResponse,
@@ -257,6 +268,8 @@ import {
257
268
  ListEnrollmentsResponse,
258
269
  ListWorkspaceMembersResponse,
259
270
  MAX_NESTED_AGENT_DEPTH,
271
+ MCP_MUTATION_RECEIPT_MAX_BYTES,
272
+ MCP_MUTATION_RECEIPT_VERSION,
260
273
  MODEL_ATTACHMENT_REFS_FIELD,
261
274
  MachineKind,
262
275
  MachineMetricsSeriesResponse,
@@ -266,6 +279,10 @@ import {
266
279
  ManagedAccount,
267
280
  MarketingDailyAnalysisTaskRequest,
268
281
  McpConnectionResourceScope,
282
+ McpMutationReceipt,
283
+ McpMutationReceiptIdempotencyStatus,
284
+ McpMutationReceiptOutcome,
285
+ McpMutationResource,
269
286
  McpPersonalConnectionDelegation,
270
287
  McpPersonalConnectionDelegations,
271
288
  McpPersonalConnectionSummary,
@@ -359,8 +376,10 @@ import {
359
376
  RegisterCapabilityPackRequest,
360
377
  RejectPreferenceRegistryProposalRequest,
361
378
  RelayTokenPayload,
379
+ RemoveEnrollmentRequest,
362
380
  RenewSessionRealtimeRequest,
363
381
  RepositoryResourceRef,
382
+ RepositoryUriError,
364
383
  RequestHumanInputToolInput,
365
384
  ResolvedWorkspaceInstructionPolicySnapshot,
366
385
  ResolvedWorkspaceInstructionPolicySnapshotEntry,
@@ -574,6 +593,7 @@ import {
574
593
  VOICE_INPUT_MAX_DURATION_SECONDS,
575
594
  VOICE_INPUT_MAX_SIZE_BYTES,
576
595
  VariableSet,
596
+ VariableSetSecret,
577
597
  VariableSetVariableMetadata,
578
598
  VariableSetVariableName,
579
599
  ViewerHeartbeatRequest,
@@ -717,7 +737,6 @@ import {
717
737
  compareCodexFleetCanonicalStringsV1,
718
738
  comparePersonalSlackCanonicalConnections,
719
739
  createCodexFleetReplayRecordV1,
720
- createSecretRedactor,
721
740
  decodeNativeSnapshotRef,
722
741
  defaultRepositoryMountPath,
723
742
  effectiveCodexFleetCacheStateV1,
@@ -725,10 +744,10 @@ import {
725
744
  evaluateWorkspaceModelPolicy,
726
745
  gitCredentialBindingIdForRepository,
727
746
  gitCredentialProviderForRepository,
728
- identityRedactor,
747
+ gitRemoteIdentity,
748
+ gitRemotePathAliases,
749
+ gitRemoteUriAliases,
729
750
  isClearedRunStateBlob,
730
- isCredentialHeaderName,
731
- isSensitiveFieldName,
732
751
  latencyModeForMetadata,
733
752
  measureSessionEventJson,
734
753
  mergeResourceRefs,
@@ -736,6 +755,7 @@ import {
736
755
  metadataWithTurnExecutionPolicyV1,
737
756
  normalizePreferenceRegistryStableKey,
738
757
  normalizeRepositorySubpath,
758
+ normalizeRepositoryTransportUri,
739
759
  normalizeResourceMountPath,
740
760
  normalizeWorkspaceArtifactSlug,
741
761
  normalizeWorkspaceInstructionPolicyRoleKey,
@@ -744,14 +764,11 @@ import {
744
764
  readCodexFleetReplayRecordV1,
745
765
  readTurnExecutionPolicyV1,
746
766
  reasoningEffortForMetadata,
747
- redactSensitiveData,
748
- redactSensitiveKey,
749
- redactSensitiveText,
750
- redactSerializedJson,
751
767
  renderSessionSystemUpdateBatch,
752
768
  replayCodexFleetDecisionV1,
753
769
  resolveRetainedOutputRange,
754
770
  resolveSessionEventTypeFilters,
771
+ resolveWorkspaceAgentHumanInputEnabled,
755
772
  resolveWorkspaceCodexCompactionDefault,
756
773
  resolveWorkspaceMemoryEnabled,
757
774
  resolveWorkspaceSlackReactionSummonSettings,
@@ -761,6 +778,7 @@ import {
761
778
  resourceMountPathCollisionKey,
762
779
  retainedArtifactReferenceFromFile,
763
780
  retainedOutputUnavailable,
781
+ retainedScreenshotReferenceFromFile,
764
782
  selectCanonicalPersonalSlackConnection,
765
783
  sessionEventJsonBytes,
766
784
  sessionEventLatestClassToSemanticClass,
@@ -783,7 +801,7 @@ import {
783
801
  verifyStreamToken,
784
802
  workspaceControlUtf8Bytes,
785
803
  workspaceSlackReactionChannelAllowed
786
- } from "./chunk-PCTCJEAF.js";
804
+ } from "./chunk-5HR2GPSC.js";
787
805
  import {
788
806
  ConnectorDocumentDestination,
789
807
  ConnectorDocumentDestinationAuthority,
@@ -832,6 +850,11 @@ export {
832
850
  CODEX_FLEET_POLICY_MAX_OVERLAYS_PER_CANDIDATE,
833
851
  CODEX_FLEET_POLICY_SCHEMA_VERSION,
834
852
  CODEX_FLEET_POLICY_VERSION,
853
+ COMPUTER_SCREENSHOT_MAX_BYTES,
854
+ COMPUTER_SCREENSHOT_MAX_DIMENSION,
855
+ COMPUTER_SCREENSHOT_MAX_PIXELS,
856
+ COMPUTER_SCREENSHOT_RETENTION_MS,
857
+ COMPUTER_SCREENSHOT_WORKSPACE_QUOTA_BYTES,
835
858
  CapabilityCatalogAuthKind,
836
859
  CapabilityCatalogItem,
837
860
  CapabilityCatalogResponse,
@@ -970,6 +993,8 @@ export {
970
993
  FsDeleteRequest,
971
994
  FsDeleteResponse,
972
995
  FsEncoding,
996
+ FsListBatchRequest,
997
+ FsListBatchResponse,
973
998
  FsListRequest,
974
999
  FsListResponse,
975
1000
  FsMkdirRequest,
@@ -1011,6 +1036,10 @@ export {
1011
1036
  GitHubRepositoryScope,
1012
1037
  GitLogRequest,
1013
1038
  GitLogResponse,
1039
+ GitReadBatchItemRequest,
1040
+ GitReadBatchItemResponse,
1041
+ GitReadBatchRequest,
1042
+ GitReadBatchResponse,
1014
1043
  GitRepositoryAccess,
1015
1044
  GitShowRequest,
1016
1045
  GitShowResponse,
@@ -1069,6 +1098,8 @@ export {
1069
1098
  ListEnrollmentsResponse,
1070
1099
  ListWorkspaceMembersResponse,
1071
1100
  MAX_NESTED_AGENT_DEPTH,
1101
+ MCP_MUTATION_RECEIPT_MAX_BYTES,
1102
+ MCP_MUTATION_RECEIPT_VERSION,
1072
1103
  MODEL_ATTACHMENT_REFS_FIELD,
1073
1104
  MachineKind,
1074
1105
  MachineMetricsSeriesResponse,
@@ -1078,6 +1109,10 @@ export {
1078
1109
  ManagedAccount,
1079
1110
  MarketingDailyAnalysisTaskRequest,
1080
1111
  McpConnectionResourceScope,
1112
+ McpMutationReceipt,
1113
+ McpMutationReceiptIdempotencyStatus,
1114
+ McpMutationReceiptOutcome,
1115
+ McpMutationResource,
1081
1116
  McpPersonalConnectionDelegation,
1082
1117
  McpPersonalConnectionDelegations,
1083
1118
  McpPersonalConnectionSummary,
@@ -1178,8 +1213,10 @@ export {
1178
1213
  RegisterCapabilityPackRequest,
1179
1214
  RejectPreferenceRegistryProposalRequest,
1180
1215
  RelayTokenPayload,
1216
+ RemoveEnrollmentRequest,
1181
1217
  RenewSessionRealtimeRequest,
1182
1218
  RepositoryResourceRef,
1219
+ RepositoryUriError,
1183
1220
  RequestHumanInputToolInput,
1184
1221
  ResolvedWorkspaceInstructionPolicySnapshot,
1185
1222
  ResolvedWorkspaceInstructionPolicySnapshotEntry,
@@ -1393,6 +1430,7 @@ export {
1393
1430
  VOICE_INPUT_MAX_DURATION_SECONDS,
1394
1431
  VOICE_INPUT_MAX_SIZE_BYTES,
1395
1432
  VariableSet,
1433
+ VariableSetSecret,
1396
1434
  VariableSetVariableMetadata,
1397
1435
  VariableSetVariableName,
1398
1436
  ViewerHeartbeatRequest,
@@ -1541,7 +1579,6 @@ export {
1541
1579
  connectorDestinationDocumentAuthority,
1542
1580
  connectorDocumentDestinationCollectionId,
1543
1581
  createCodexFleetReplayRecordV1,
1544
- createSecretRedactor,
1545
1582
  decodeNativeSnapshotRef,
1546
1583
  defaultRepositoryMountPath,
1547
1584
  effectiveCodexFleetCacheStateV1,
@@ -1550,11 +1587,11 @@ export {
1550
1587
  evaluateWorkspaceModelPolicy,
1551
1588
  gitCredentialBindingIdForRepository,
1552
1589
  gitCredentialProviderForRepository,
1590
+ gitRemoteIdentity,
1591
+ gitRemotePathAliases,
1592
+ gitRemoteUriAliases,
1553
1593
  hasOpenGeniSlackReactionScope,
1554
- identityRedactor,
1555
1594
  isClearedRunStateBlob,
1556
- isCredentialHeaderName,
1557
- isSensitiveFieldName,
1558
1595
  latencyModeForMetadata,
1559
1596
  legacyWorkspaceConnectorDocumentDestination,
1560
1597
  measureSessionEventJson,
@@ -1563,6 +1600,7 @@ export {
1563
1600
  metadataWithTurnExecutionPolicyV1,
1564
1601
  normalizePreferenceRegistryStableKey,
1565
1602
  normalizeRepositorySubpath,
1603
+ normalizeRepositoryTransportUri,
1566
1604
  normalizeResourceMountPath,
1567
1605
  normalizeWorkspaceArtifactSlug,
1568
1606
  normalizeWorkspaceInstructionPolicyRoleKey,
@@ -1571,15 +1609,12 @@ export {
1571
1609
  readCodexFleetReplayRecordV1,
1572
1610
  readTurnExecutionPolicyV1,
1573
1611
  reasoningEffortForMetadata,
1574
- redactSensitiveData,
1575
- redactSensitiveKey,
1576
- redactSensitiveText,
1577
- redactSerializedJson,
1578
1612
  renderSessionSystemUpdateBatch,
1579
1613
  replayCodexFleetDecisionV1,
1580
1614
  resolveConnectorDocumentDestination,
1581
1615
  resolveRetainedOutputRange,
1582
1616
  resolveSessionEventTypeFilters,
1617
+ resolveWorkspaceAgentHumanInputEnabled,
1583
1618
  resolveWorkspaceCodexCompactionDefault,
1584
1619
  resolveWorkspaceMemoryEnabled,
1585
1620
  resolveWorkspaceSlackReactionSummonSettings,
@@ -1589,6 +1624,7 @@ export {
1589
1624
  resourceMountPathCollisionKey,
1590
1625
  retainedArtifactReferenceFromFile,
1591
1626
  retainedOutputUnavailable,
1627
+ retainedScreenshotReferenceFromFile,
1592
1628
  selectCanonicalPersonalSlackConnection,
1593
1629
  sessionEventJsonBytes,
1594
1630
  sessionEventLatestClassToSemanticClass,
@@ -0,0 +1,96 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Versioned, provider-neutral receipt returned by first-party MCP mutation tools.
4
+ *
5
+ * A receipt intentionally contains only server-generated identity and outcome
6
+ * facts. Callers already have mutation inputs in their tool-call history, so
7
+ * copying names, prompts, instructions, commands, evidence, or other request
8
+ * fields into the result wastes context and can expose data twice.
9
+ */
10
+ export declare const MCP_MUTATION_RECEIPT_VERSION: "mcp-mutation-receipt.v1";
11
+ export declare const MCP_MUTATION_RECEIPT_MAX_BYTES: number;
12
+ export declare const McpMutationReceiptOutcome: z.ZodEnum<{
13
+ accepted: "accepted";
14
+ created: "created";
15
+ deleted: "deleted";
16
+ partial_failure: "partial_failure";
17
+ repaired: "repaired";
18
+ replayed: "replayed";
19
+ triggered: "triggered";
20
+ unchanged: "unchanged";
21
+ updated: "updated";
22
+ }>;
23
+ export type McpMutationReceiptOutcome = z.infer<typeof McpMutationReceiptOutcome>;
24
+ export declare const McpMutationReceiptIdempotencyStatus: z.ZodEnum<{
25
+ applied: "applied";
26
+ not_requested: "not_requested";
27
+ not_supported: "not_supported";
28
+ replayed: "replayed";
29
+ unknown: "unknown";
30
+ }>;
31
+ export type McpMutationReceiptIdempotencyStatus = z.infer<typeof McpMutationReceiptIdempotencyStatus>;
32
+ export declare const McpMutationResource: z.ZodObject<{
33
+ type: z.ZodString;
34
+ id: z.ZodString;
35
+ version: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
36
+ etag: z.ZodOptional<z.ZodString>;
37
+ state: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strict>;
39
+ export type McpMutationResource = z.infer<typeof McpMutationResource>;
40
+ export declare const McpMutationReceipt: z.ZodObject<{
41
+ receiptVersion: z.ZodLiteral<"mcp-mutation-receipt.v1">;
42
+ operation: z.ZodString;
43
+ committed: z.ZodLiteral<true>;
44
+ outcome: z.ZodEnum<{
45
+ accepted: "accepted";
46
+ created: "created";
47
+ deleted: "deleted";
48
+ partial_failure: "partial_failure";
49
+ repaired: "repaired";
50
+ replayed: "replayed";
51
+ triggered: "triggered";
52
+ unchanged: "unchanged";
53
+ updated: "updated";
54
+ }>;
55
+ changed: z.ZodBoolean;
56
+ resource: z.ZodObject<{
57
+ type: z.ZodString;
58
+ id: z.ZodString;
59
+ version: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
60
+ etag: z.ZodOptional<z.ZodString>;
61
+ state: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>;
63
+ relatedResources: z.ZodOptional<z.ZodArray<z.ZodObject<{
64
+ type: z.ZodString;
65
+ id: z.ZodString;
66
+ version: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
67
+ etag: z.ZodOptional<z.ZodString>;
68
+ state: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strict>>>;
70
+ timestamp: z.ZodString;
71
+ idempotency: z.ZodObject<{
72
+ status: z.ZodEnum<{
73
+ applied: "applied";
74
+ not_requested: "not_requested";
75
+ not_supported: "not_supported";
76
+ replayed: "replayed";
77
+ unknown: "unknown";
78
+ }>;
79
+ }, z.core.$strict>;
80
+ partialFailure: z.ZodOptional<z.ZodObject<{
81
+ stage: z.ZodString;
82
+ retryable: z.ZodBoolean;
83
+ }, z.core.$strict>>;
84
+ warnings: z.ZodArray<z.ZodString>;
85
+ nextAction: z.ZodOptional<z.ZodObject<{
86
+ tool: z.ZodString;
87
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
88
+ }, z.core.$strict>>;
89
+ facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
90
+ id: z.ZodOptional<z.ZodString>;
91
+ rootSessionId: z.ZodOptional<z.ZodString>;
92
+ nestedAgentDepth: z.ZodOptional<z.ZodNumber>;
93
+ effectiveMaxNestedAgentDepth: z.ZodOptional<z.ZodNumber>;
94
+ updateId: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strict>;
96
+ export type McpMutationReceipt = z.infer<typeof McpMutationReceipt>;
@@ -5,8 +5,17 @@ export declare const RETAINED_OUTPUT_MAX_PAGE_BYTES: number;
5
5
  export declare const RETAINED_OUTPUT_DEFAULT_PAGE_BYTES: number;
6
6
  /** Receipts are timeline references, never an extensible metadata bag. */
7
7
  export declare const RETAINED_OUTPUT_RECEIPT_MAX_BYTES: number;
8
+ /** Screenshot bytes are accounted separately from the 10k-token text policy. */
9
+ export declare const COMPUTER_SCREENSHOT_MAX_BYTES: number;
10
+ export declare const COMPUTER_SCREENSHOT_MAX_DIMENSION = 16384;
11
+ export declare const COMPUTER_SCREENSHOT_MAX_PIXELS = 67108864;
12
+ /** Canonical ready-object retention window: 30 days from successful settlement. */
13
+ export declare const COMPUTER_SCREENSHOT_RETENTION_MS: number;
14
+ /** Hard workspace reservation across pending + ready screenshot artifacts. */
15
+ export declare const COMPUTER_SCREENSHOT_WORKSPACE_QUOTA_BYTES: number;
8
16
  export declare const RetainedOutputKind: z.ZodEnum<{
9
17
  assistant_completion: "assistant_completion";
18
+ computer_screenshot: "computer_screenshot";
10
19
  event_media: "event_media";
11
20
  file: "file";
12
21
  internal_update: "internal_update";
@@ -17,9 +26,12 @@ export declare const RetainedOutputUnavailableReason: z.ZodEnum<{
17
26
  deleted: "deleted";
18
27
  expired: "expired";
19
28
  failed: "failed";
29
+ invalid_content: "invalid_content";
20
30
  missing_storage: "missing_storage";
21
31
  not_retained: "not_retained";
32
+ oversized: "oversized";
22
33
  pending: "pending";
34
+ quota_exceeded: "quota_exceeded";
23
35
  storage_write_failed: "storage_write_failed";
24
36
  unsupported: "unsupported";
25
37
  }>;
@@ -29,6 +41,7 @@ export declare const RetainedArtifactReferenceSchema: z.ZodObject<{
29
41
  artifactId: z.ZodString;
30
42
  kind: z.ZodEnum<{
31
43
  assistant_completion: "assistant_completion";
44
+ computer_screenshot: "computer_screenshot";
32
45
  event_media: "event_media";
33
46
  file: "file";
34
47
  internal_update: "internal_update";
@@ -38,10 +51,17 @@ export declare const RetainedArtifactReferenceSchema: z.ZodObject<{
38
51
  originalBytes: z.ZodNumber;
39
52
  sha256: z.ZodString;
40
53
  retainedAt: z.ZodString;
41
- retention: z.ZodObject<{
54
+ dimensions: z.ZodOptional<z.ZodObject<{
55
+ width: z.ZodNumber;
56
+ height: z.ZodNumber;
57
+ }, z.core.$strict>>;
58
+ retention: z.ZodUnion<readonly [z.ZodObject<{
42
59
  policy: z.ZodLiteral<"workspace_file">;
43
60
  expiresAt: z.ZodNull;
44
- }, z.core.$strict>;
61
+ }, z.core.$strict>, z.ZodObject<{
62
+ policy: z.ZodLiteral<"session_screenshot">;
63
+ expiresAt: z.ZodString;
64
+ }, z.core.$strict>]>;
45
65
  retrieval: z.ZodObject<{
46
66
  method: z.ZodLiteral<"GET">;
47
67
  path: z.ZodString;
@@ -62,9 +82,12 @@ export declare const RetainedOutputEvidenceSchema: z.ZodDiscriminatedUnion<[z.Zo
62
82
  deleted: "deleted";
63
83
  expired: "expired";
64
84
  failed: "failed";
85
+ invalid_content: "invalid_content";
65
86
  missing_storage: "missing_storage";
66
87
  not_retained: "not_retained";
88
+ oversized: "oversized";
67
89
  pending: "pending";
90
+ quota_exceeded: "quota_exceeded";
68
91
  storage_write_failed: "storage_write_failed";
69
92
  unsupported: "unsupported";
70
93
  }>;
@@ -73,6 +96,7 @@ export declare const RetainedOutputEvidenceSchema: z.ZodDiscriminatedUnion<[z.Zo
73
96
  artifactId: z.ZodString;
74
97
  kind: z.ZodEnum<{
75
98
  assistant_completion: "assistant_completion";
99
+ computer_screenshot: "computer_screenshot";
76
100
  event_media: "event_media";
77
101
  file: "file";
78
102
  internal_update: "internal_update";
@@ -82,10 +106,17 @@ export declare const RetainedOutputEvidenceSchema: z.ZodDiscriminatedUnion<[z.Zo
82
106
  originalBytes: z.ZodNumber;
83
107
  sha256: z.ZodString;
84
108
  retainedAt: z.ZodString;
85
- retention: z.ZodObject<{
109
+ dimensions: z.ZodOptional<z.ZodObject<{
110
+ width: z.ZodNumber;
111
+ height: z.ZodNumber;
112
+ }, z.core.$strict>>;
113
+ retention: z.ZodUnion<readonly [z.ZodObject<{
86
114
  policy: z.ZodLiteral<"workspace_file">;
87
115
  expiresAt: z.ZodNull;
88
- }, z.core.$strict>;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ policy: z.ZodLiteral<"session_screenshot">;
118
+ expiresAt: z.ZodString;
119
+ }, z.core.$strict>]>;
89
120
  retrieval: z.ZodObject<{
90
121
  method: z.ZodLiteral<"GET">;
91
122
  path: z.ZodString;
@@ -104,9 +135,12 @@ export declare const RetainedArtifactUnavailableSchema: z.ZodObject<{
104
135
  deleted: "deleted";
105
136
  expired: "expired";
106
137
  failed: "failed";
138
+ invalid_content: "invalid_content";
107
139
  missing_storage: "missing_storage";
108
140
  not_retained: "not_retained";
141
+ oversized: "oversized";
109
142
  pending: "pending";
143
+ quota_exceeded: "quota_exceeded";
110
144
  storage_write_failed: "storage_write_failed";
111
145
  unsupported: "unsupported";
112
146
  }>;
@@ -118,6 +152,7 @@ export declare const RetainedArtifactMetadataSchema: z.ZodUnion<readonly [z.ZodO
118
152
  artifactId: z.ZodString;
119
153
  kind: z.ZodEnum<{
120
154
  assistant_completion: "assistant_completion";
155
+ computer_screenshot: "computer_screenshot";
121
156
  event_media: "event_media";
122
157
  file: "file";
123
158
  internal_update: "internal_update";
@@ -127,10 +162,17 @@ export declare const RetainedArtifactMetadataSchema: z.ZodUnion<readonly [z.ZodO
127
162
  originalBytes: z.ZodNumber;
128
163
  sha256: z.ZodString;
129
164
  retainedAt: z.ZodString;
130
- retention: z.ZodObject<{
165
+ dimensions: z.ZodOptional<z.ZodObject<{
166
+ width: z.ZodNumber;
167
+ height: z.ZodNumber;
168
+ }, z.core.$strict>>;
169
+ retention: z.ZodUnion<readonly [z.ZodObject<{
131
170
  policy: z.ZodLiteral<"workspace_file">;
132
171
  expiresAt: z.ZodNull;
133
- }, z.core.$strict>;
172
+ }, z.core.$strict>, z.ZodObject<{
173
+ policy: z.ZodLiteral<"session_screenshot">;
174
+ expiresAt: z.ZodString;
175
+ }, z.core.$strict>]>;
134
176
  retrieval: z.ZodObject<{
135
177
  method: z.ZodLiteral<"GET">;
136
178
  path: z.ZodString;
@@ -144,9 +186,12 @@ export declare const RetainedArtifactMetadataSchema: z.ZodUnion<readonly [z.ZodO
144
186
  deleted: "deleted";
145
187
  expired: "expired";
146
188
  failed: "failed";
189
+ invalid_content: "invalid_content";
147
190
  missing_storage: "missing_storage";
148
191
  not_retained: "not_retained";
192
+ oversized: "oversized";
149
193
  pending: "pending";
194
+ quota_exceeded: "quota_exceeded";
150
195
  storage_write_failed: "storage_write_failed";
151
196
  unsupported: "unsupported";
152
197
  }>;
@@ -161,12 +206,20 @@ export type RetainedArtifactFileInput = {
161
206
  sha256: string | null;
162
207
  updatedAt: string;
163
208
  };
209
+ export type RetainedScreenshotArtifactInput = RetainedArtifactFileInput & {
210
+ sessionId: string;
211
+ width: number;
212
+ height: number;
213
+ expiresAt: string;
214
+ };
164
215
  /**
165
216
  * Convert a ready, integrity-addressed workspace file into the only available
166
217
  * retained-output receipt shape. Invalid, pending, or checksum-less files fail
167
218
  * closed instead of implying that full evidence is retrievable.
168
219
  */
169
220
  export declare function retainedArtifactReferenceFromFile(file: RetainedArtifactFileInput, kind?: RetainedOutputKind): RetainedArtifactReference | null;
221
+ /** Build the closed, session-scoped receipt for one ready screenshot file. */
222
+ export declare function retainedScreenshotReferenceFromFile(file: RetainedScreenshotArtifactInput): RetainedArtifactReference | null;
170
223
  /** Parse and clone a trusted server receipt; invalid/untrusted data fails closed. */
171
224
  export declare function validateRetainedOutputEvidence(value: unknown): RetainedOutputEvidence | null;
172
225
  export declare function retainedOutputUnavailable(reason?: RetainedOutputUnavailableReason): RetainedOutputEvidence;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Canonical bounded representation for `session_events.payload`.
2
+ * Canonical bounded representation for explicit session-event previews.
3
3
  *
4
- * Session events are the lossy human/audit projection, not model memory and not
5
- * an evidence blob store. This helper keeps that projection useful while making
6
- * the loss explicit. It deliberately has no server-only dependency so the DB,
7
- * realtime transports, SDK/React, and tests can share one wire contract.
4
+ * Canonical session-event payloads are stored in full. This helper derives a
5
+ * bounded monitoring/public projection without writing that projection back
6
+ * over canonical data. It deliberately has no server-only dependency so the
7
+ * DB, realtime transports, SDK/React, and tests can share one wire contract.
8
8
  */
9
9
 
10
10
  import {
@@ -184,7 +184,7 @@ export function sessionEventPayloadTruncation(
184
184
  }
185
185
 
186
186
  /**
187
- * Return a byte-bounded audit payload. Unchanged ordinary payloads retain their
187
+ * Return a byte-bounded preview payload. Unchanged ordinary payloads retain their
188
188
  * reference. Oversized strings/containers get deterministic head+tail previews;
189
189
  * inline images/binary values become metadata because `session_events` does not
190
190
  * durably retain their source bytes as independently retrievable evidence.