@opengeni/contracts 0.40.0 → 0.50.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 (148) hide show
  1. package/dist/atlassian.d.ts +278 -0
  2. package/dist/atlassian.js +57 -0
  3. package/dist/atlassian.js.map +1 -0
  4. package/dist/canonical-human-identities.d.ts +157 -0
  5. package/dist/canonical-human-identities.js +23 -0
  6. package/dist/canonical-human-identities.js.map +1 -0
  7. package/dist/{chunk-7JZMI22I.js → chunk-5UDNP7AO.js} +34 -2
  8. package/dist/chunk-5UDNP7AO.js.map +1 -0
  9. package/dist/chunk-BVGIYW7D.js +11 -0
  10. package/dist/chunk-BVGIYW7D.js.map +1 -0
  11. package/dist/chunk-CADSX6UN.js +1145 -0
  12. package/dist/chunk-CADSX6UN.js.map +1 -0
  13. package/dist/chunk-CM6BMECR.js +24 -0
  14. package/dist/chunk-CM6BMECR.js.map +1 -0
  15. package/dist/chunk-D2HKF2EF.js +1460 -0
  16. package/dist/chunk-D2HKF2EF.js.map +1 -0
  17. package/dist/chunk-JBCIY7QD.js +194 -0
  18. package/dist/chunk-JBCIY7QD.js.map +1 -0
  19. package/dist/chunk-JUFK3T4Q.js +80 -0
  20. package/dist/chunk-JUFK3T4Q.js.map +1 -0
  21. package/dist/chunk-LSB7GRLG.js +779 -0
  22. package/dist/chunk-LSB7GRLG.js.map +1 -0
  23. package/dist/chunk-LW7OH6CS.js +382 -0
  24. package/dist/chunk-LW7OH6CS.js.map +1 -0
  25. package/dist/chunk-M5ZGRVIQ.js +719 -0
  26. package/dist/chunk-M5ZGRVIQ.js.map +1 -0
  27. package/dist/chunk-MYBZRDTY.js +340 -0
  28. package/dist/chunk-MYBZRDTY.js.map +1 -0
  29. package/dist/chunk-Q6A7XT2N.js +16734 -0
  30. package/dist/chunk-Q6A7XT2N.js.map +1 -0
  31. package/dist/chunk-RIY7GYQS.js +1204 -0
  32. package/dist/chunk-RIY7GYQS.js.map +1 -0
  33. package/dist/chunk-TZ6YEYN4.js +386 -0
  34. package/dist/chunk-TZ6YEYN4.js.map +1 -0
  35. package/dist/chunk-Y3MLSLB4.js +392 -0
  36. package/dist/chunk-Y3MLSLB4.js.map +1 -0
  37. package/dist/chunk-YRKRZ6OF.js +134 -0
  38. package/dist/chunk-YRKRZ6OF.js.map +1 -0
  39. package/dist/codex-provider-account-authority.d.ts +23 -0
  40. package/dist/codex-provider-account-authority.js +23 -0
  41. package/dist/codex-provider-account-authority.js.map +1 -0
  42. package/dist/company-profile.d.ts +629 -0
  43. package/dist/document-artifact-commands.d.ts +282 -0
  44. package/dist/document-artifact-commands.js +54 -0
  45. package/dist/document-artifact-commands.js.map +1 -0
  46. package/dist/document-artifact-query.d.ts +2 -0
  47. package/dist/document-artifact-query.js +54 -0
  48. package/dist/document-artifact-query.js.map +1 -0
  49. package/dist/editable-artifact-binary.d.ts +56 -0
  50. package/dist/editable-artifact-causal-frontier.d.ts +12 -0
  51. package/dist/editable-artifact-causal-frontier.js +18 -0
  52. package/dist/editable-artifact-causal-frontier.js.map +1 -0
  53. package/dist/editable-artifact-codec-registry.d.ts +48 -0
  54. package/dist/editable-artifact-codec-registry.js +20 -0
  55. package/dist/editable-artifact-codec-registry.js.map +1 -0
  56. package/dist/editable-artifact-committed-transaction.d.ts +35 -0
  57. package/dist/editable-artifact-committed-transaction.js +19 -0
  58. package/dist/editable-artifact-committed-transaction.js.map +1 -0
  59. package/dist/editable-artifact-live.d.ts +276 -0
  60. package/dist/editable-artifact-live.js +907 -0
  61. package/dist/editable-artifact-live.js.map +1 -0
  62. package/dist/editable-artifact-serialized-commit.d.ts +53 -0
  63. package/dist/editable-artifact-serialized-commit.js +26 -0
  64. package/dist/editable-artifact-serialized-commit.js.map +1 -0
  65. package/dist/editable-artifact-versions.d.ts +6 -0
  66. package/dist/editable-artifact-versions.js +11 -0
  67. package/dist/editable-artifact-versions.js.map +1 -0
  68. package/dist/editable-artifacts.d.ts +46 -0
  69. package/dist/editable-artifacts.js +236 -0
  70. package/dist/editable-artifacts.js.map +1 -0
  71. package/dist/event-preview.d.ts +1 -1
  72. package/dist/google-drive.d.ts +114 -2
  73. package/dist/google-drive.js +72 -14
  74. package/dist/google-drive.js.map +1 -1
  75. package/dist/image-generation.d.ts +70 -0
  76. package/dist/index.d.ts +5661 -166
  77. package/dist/index.js +1438 -21
  78. package/dist/interaction.d.ts +8290 -0
  79. package/dist/knowledge.d.ts +543 -0
  80. package/dist/memory-slack-delivery.d.ts +397 -0
  81. package/dist/presentation-artifact-commands.d.ts +349 -0
  82. package/dist/presentation-artifact-commands.js +66 -0
  83. package/dist/presentation-artifact-commands.js.map +1 -0
  84. package/dist/presentation-artifact-query.d.ts +2 -0
  85. package/dist/presentation-artifact-query.js +66 -0
  86. package/dist/presentation-artifact-query.js.map +1 -0
  87. package/dist/retained-output.d.ts +24 -0
  88. package/dist/sandbox-snapshots.d.ts +9 -0
  89. package/dist/scoped-knowledge.d.ts +14 -13
  90. package/dist/slack-bot-scopes.d.ts +4 -0
  91. package/dist/slack-bot-scopes.js +3 -1
  92. package/dist/slack-task-policy.d.ts +294 -0
  93. package/dist/spreadsheet-artifact-commands.d.ts +101 -0
  94. package/dist/spreadsheet-artifact-commands.js +27 -0
  95. package/dist/spreadsheet-artifact-commands.js.map +1 -0
  96. package/dist/spreadsheet-artifact-date.d.ts +4 -0
  97. package/dist/spreadsheet-artifact-query.d.ts +120 -0
  98. package/dist/spreadsheet-artifact-query.js +48 -0
  99. package/dist/spreadsheet-artifact-query.js.map +1 -0
  100. package/dist/task-notes.d.ts +128 -0
  101. package/dist/tool-catalog.d.ts +576 -0
  102. package/dist/video-generation.d.ts +580 -0
  103. package/dist/video-generation.js +59 -0
  104. package/dist/video-generation.js.map +1 -0
  105. package/dist/workspace-learning-policy.d.ts +208 -0
  106. package/dist/xai-provider-account-authority.d.ts +23 -0
  107. package/dist/xai-provider-account-authority.js +9 -0
  108. package/dist/xai-provider-account-authority.js.map +1 -0
  109. package/package.json +73 -1
  110. package/src/artifacts.ts +1 -1
  111. package/src/atlassian.ts +160 -0
  112. package/src/canonical-human-identities.ts +93 -0
  113. package/src/codex-provider-account-authority.ts +37 -0
  114. package/src/company-profile.ts +306 -0
  115. package/src/document-artifact-commands.ts +1709 -0
  116. package/src/document-artifact-query.ts +2 -0
  117. package/src/editable-artifact-binary.ts +396 -0
  118. package/src/editable-artifact-causal-frontier.ts +154 -0
  119. package/src/editable-artifact-codec-registry.ts +261 -0
  120. package/src/editable-artifact-committed-transaction.ts +478 -0
  121. package/src/editable-artifact-live.ts +1379 -0
  122. package/src/editable-artifact-serialized-commit.ts +494 -0
  123. package/src/editable-artifact-versions.ts +8 -0
  124. package/src/editable-artifacts.ts +473 -0
  125. package/src/google-drive.ts +68 -15
  126. package/src/image-generation.ts +106 -0
  127. package/src/index.ts +2920 -326
  128. package/src/interaction.ts +3173 -0
  129. package/src/knowledge.ts +207 -0
  130. package/src/memory-slack-delivery.ts +183 -0
  131. package/src/presentation-artifact-commands.ts +2035 -0
  132. package/src/presentation-artifact-query.ts +2 -0
  133. package/src/retained-output.ts +149 -2
  134. package/src/sandbox-snapshots.ts +28 -1
  135. package/src/scoped-knowledge.ts +18 -4
  136. package/src/slack-bot-scopes.ts +34 -1
  137. package/src/slack-task-policy.ts +215 -0
  138. package/src/spreadsheet-artifact-commands.ts +999 -0
  139. package/src/spreadsheet-artifact-date.ts +21 -0
  140. package/src/spreadsheet-artifact-query.ts +1411 -0
  141. package/src/task-notes.ts +92 -0
  142. package/src/tool-catalog.ts +334 -0
  143. package/src/video-generation.ts +431 -0
  144. package/src/workspace-learning-policy.ts +233 -0
  145. package/src/xai-provider-account-authority.ts +37 -0
  146. package/dist/chunk-5HR2GPSC.js +0 -11031
  147. package/dist/chunk-5HR2GPSC.js.map +0 -1
  148. package/dist/chunk-7JZMI22I.js.map +0 -1
@@ -0,0 +1,208 @@
1
+ import { z } from "zod";
2
+ export declare const WORKSPACE_LEARNING_POLICY_MAX_SOURCE_OVERRIDES = 256;
3
+ export declare const WORKSPACE_LEARNING_POLICY_SOURCE_KIND_MAX_CHARS = 96;
4
+ export declare const WORKSPACE_LEARNING_POLICY_SOURCE_ID_MAX_CHARS = 1024;
5
+ export declare const WORKSPACE_LEARNING_POLICY_REASON_MAX_CHARS = 4096;
6
+ export declare const WORKSPACE_LEARNING_POLICY_DEFAULT_OFF_REVISION_ID = "workspace-learning-policy:default-off:v1";
7
+ export declare const WorkspaceLearningMode: z.ZodEnum<{
8
+ automatic: "automatic";
9
+ off: "off";
10
+ suggest: "suggest";
11
+ }>;
12
+ export type WorkspaceLearningMode = z.infer<typeof WorkspaceLearningMode>;
13
+ export declare const WorkspaceLearningOverrideMode: z.ZodEnum<{
14
+ automatic: "automatic";
15
+ inherit: "inherit";
16
+ off: "off";
17
+ suggest: "suggest";
18
+ }>;
19
+ export type WorkspaceLearningOverrideMode = z.infer<typeof WorkspaceLearningOverrideMode>;
20
+ export declare function normalizeWorkspaceLearningSourceKind(value: string): string;
21
+ export declare const WorkspaceLearningSourceKind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
22
+ export type WorkspaceLearningSourceKind = z.infer<typeof WorkspaceLearningSourceKind>;
23
+ export declare const WorkspaceLearningSourceId: z.ZodString;
24
+ export type WorkspaceLearningSourceId = z.infer<typeof WorkspaceLearningSourceId>;
25
+ export declare const WorkspaceLearningSourceRef: z.ZodObject<{
26
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
27
+ id: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type WorkspaceLearningSourceRef = z.infer<typeof WorkspaceLearningSourceRef>;
30
+ export declare const WorkspaceLearningSourceOverrideInput: z.ZodObject<{
31
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
32
+ id: z.ZodString;
33
+ mode: z.ZodEnum<{
34
+ automatic: "automatic";
35
+ inherit: "inherit";
36
+ off: "off";
37
+ suggest: "suggest";
38
+ }>;
39
+ }, z.core.$strip>;
40
+ export type WorkspaceLearningSourceOverrideInput = z.infer<typeof WorkspaceLearningSourceOverrideInput>;
41
+ export declare const WorkspaceLearningSourceOverride: z.ZodObject<{
42
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
43
+ id: z.ZodString;
44
+ mode: z.ZodEnum<{
45
+ automatic: "automatic";
46
+ off: "off";
47
+ suggest: "suggest";
48
+ }>;
49
+ }, z.core.$strip>;
50
+ export type WorkspaceLearningSourceOverride = z.infer<typeof WorkspaceLearningSourceOverride>;
51
+ export declare const WorkspaceLearningSourceOverrides: z.ZodArray<z.ZodObject<{
52
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
53
+ id: z.ZodString;
54
+ mode: z.ZodEnum<{
55
+ automatic: "automatic";
56
+ off: "off";
57
+ suggest: "suggest";
58
+ }>;
59
+ }, z.core.$strip>>;
60
+ export type WorkspaceLearningSourceOverrides = z.infer<typeof WorkspaceLearningSourceOverrides>;
61
+ export declare function workspaceLearningSourceKey(source: WorkspaceLearningSourceRef): string;
62
+ /**
63
+ * Canonicalize caller input before hashing or persistence. `inherit` is a
64
+ * request-only reset operation: inherited entries are deliberately absent from
65
+ * immutable revisions so the persisted policy stays sparse and transparent.
66
+ */
67
+ export declare function canonicalizeWorkspaceLearningSourceOverrides(input: readonly WorkspaceLearningSourceOverrideInput[]): WorkspaceLearningSourceOverride[];
68
+ export declare const WorkspaceLearningPolicyRevisionIdentity: z.ZodObject<{
69
+ id: z.ZodString;
70
+ revision: z.ZodNumber;
71
+ policyHash: z.ZodString;
72
+ }, z.core.$strip>;
73
+ export type WorkspaceLearningPolicyRevisionIdentity = z.infer<typeof WorkspaceLearningPolicyRevisionIdentity>;
74
+ export declare const WorkspaceLearningPolicyRevision: z.ZodObject<{
75
+ id: z.ZodString;
76
+ revision: z.ZodNumber;
77
+ policyHash: z.ZodString;
78
+ operationId: z.ZodString;
79
+ accountId: z.ZodString;
80
+ workspaceId: z.ZodString;
81
+ workspaceMode: z.ZodEnum<{
82
+ automatic: "automatic";
83
+ off: "off";
84
+ suggest: "suggest";
85
+ }>;
86
+ sourceOverrides: z.ZodArray<z.ZodObject<{
87
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
88
+ id: z.ZodString;
89
+ mode: z.ZodEnum<{
90
+ automatic: "automatic";
91
+ off: "off";
92
+ suggest: "suggest";
93
+ }>;
94
+ }, z.core.$strip>>;
95
+ supersedesRevisionId: z.ZodNullable<z.ZodString>;
96
+ createdBySubjectId: z.ZodString;
97
+ createdAt: z.ZodString;
98
+ }, z.core.$strip>;
99
+ export type WorkspaceLearningPolicyRevision = z.infer<typeof WorkspaceLearningPolicyRevision>;
100
+ export declare const WorkspaceLearningPolicyHead: z.ZodObject<{
101
+ accountId: z.ZodString;
102
+ workspaceId: z.ZodString;
103
+ revisionId: z.ZodString;
104
+ revision: z.ZodNumber;
105
+ policyHash: z.ZodString;
106
+ activationVersion: z.ZodNumber;
107
+ activatedAt: z.ZodString;
108
+ }, z.core.$strip>;
109
+ export type WorkspaceLearningPolicyHead = z.infer<typeof WorkspaceLearningPolicyHead>;
110
+ export declare const WorkspaceLearningPolicyActivationType: z.ZodEnum<{
111
+ activate: "activate";
112
+ rollback: "rollback";
113
+ }>;
114
+ export type WorkspaceLearningPolicyActivationType = z.infer<typeof WorkspaceLearningPolicyActivationType>;
115
+ export declare const WorkspaceLearningPolicyActivationEvent: z.ZodObject<{
116
+ id: z.ZodString;
117
+ operationId: z.ZodString;
118
+ accountId: z.ZodString;
119
+ workspaceId: z.ZodString;
120
+ type: z.ZodEnum<{
121
+ activate: "activate";
122
+ rollback: "rollback";
123
+ }>;
124
+ activationVersion: z.ZodNumber;
125
+ oldRevision: z.ZodNullable<z.ZodObject<{
126
+ id: z.ZodString;
127
+ revision: z.ZodNumber;
128
+ policyHash: z.ZodString;
129
+ }, z.core.$strip>>;
130
+ newRevision: z.ZodObject<{
131
+ id: z.ZodString;
132
+ revision: z.ZodNumber;
133
+ policyHash: z.ZodString;
134
+ }, z.core.$strip>;
135
+ actorSubjectId: z.ZodString;
136
+ reason: z.ZodString;
137
+ createdAt: z.ZodString;
138
+ }, z.core.$strip>;
139
+ export type WorkspaceLearningPolicyActivationEvent = z.infer<typeof WorkspaceLearningPolicyActivationEvent>;
140
+ export declare const WorkspaceLearningPolicySnapshot: z.ZodObject<{
141
+ id: z.ZodString;
142
+ accountId: z.ZodString;
143
+ workspaceId: z.ZodString;
144
+ sessionId: z.ZodString;
145
+ turnId: z.ZodString;
146
+ attemptId: z.ZodString;
147
+ executionGeneration: z.ZodNumber;
148
+ revision: z.ZodNullable<z.ZodObject<{
149
+ id: z.ZodString;
150
+ revision: z.ZodNumber;
151
+ policyHash: z.ZodString;
152
+ }, z.core.$strip>>;
153
+ activationVersion: z.ZodNumber;
154
+ activatedAt: z.ZodNullable<z.ZodString>;
155
+ workspaceMode: z.ZodEnum<{
156
+ automatic: "automatic";
157
+ off: "off";
158
+ suggest: "suggest";
159
+ }>;
160
+ sourceOverrides: z.ZodArray<z.ZodObject<{
161
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
162
+ id: z.ZodString;
163
+ mode: z.ZodEnum<{
164
+ automatic: "automatic";
165
+ off: "off";
166
+ suggest: "suggest";
167
+ }>;
168
+ }, z.core.$strip>>;
169
+ snapshotHash: z.ZodString;
170
+ createdAt: z.ZodString;
171
+ }, z.core.$strip>;
172
+ export type WorkspaceLearningPolicySnapshot = z.infer<typeof WorkspaceLearningPolicySnapshot>;
173
+ export declare const WorkspaceLearningPolicyRouterContext: z.ZodObject<{
174
+ mode: z.ZodEnum<{
175
+ automatic: "automatic";
176
+ off: "off";
177
+ suggest: "suggest";
178
+ }>;
179
+ snapshotId: z.ZodString;
180
+ revisionId: z.ZodString;
181
+ }, z.core.$strip>;
182
+ export type WorkspaceLearningPolicyRouterContext = z.infer<typeof WorkspaceLearningPolicyRouterContext>;
183
+ export declare const WorkspaceLearningPolicyEffectiveMode: z.ZodObject<{
184
+ mode: z.ZodEnum<{
185
+ automatic: "automatic";
186
+ off: "off";
187
+ suggest: "suggest";
188
+ }>;
189
+ snapshotId: z.ZodString;
190
+ revisionId: z.ZodString;
191
+ inherited: z.ZodBoolean;
192
+ source: z.ZodObject<{
193
+ kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
194
+ id: z.ZodString;
195
+ }, z.core.$strip>;
196
+ policyRevision: z.ZodNullable<z.ZodObject<{
197
+ id: z.ZodString;
198
+ revision: z.ZodNumber;
199
+ policyHash: z.ZodString;
200
+ }, z.core.$strip>>;
201
+ activationVersion: z.ZodNumber;
202
+ snapshotHash: z.ZodString;
203
+ }, z.core.$strip>;
204
+ export type WorkspaceLearningPolicyEffectiveMode = z.infer<typeof WorkspaceLearningPolicyEffectiveMode>;
205
+ /** Stable router seam: resolve only from an immutable accepted-attempt snapshot. */
206
+ export declare function resolveWorkspaceLearningPolicyEffectiveMode(snapshot: WorkspaceLearningPolicySnapshot, source: WorkspaceLearningSourceRef): WorkspaceLearningPolicyEffectiveMode;
207
+ /** Exact provider-neutral context consumed by the canonical durable-learning router. */
208
+ export declare function workspaceLearningPolicyRouterContext(effectiveMode: WorkspaceLearningPolicyEffectiveMode): WorkspaceLearningPolicyRouterContext;
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Opaque authority frozen at an xAI provider-account acceptance boundary.
4
+ *
5
+ * This snapshot deliberately carries no organization, membership, credential,
6
+ * provider-account, subject, label, quota, token, or plan identity. User scope
7
+ * becomes executable only after exact live database revalidation against the
8
+ * separately stored causal subject and xAI subscription authority row.
9
+ */
10
+ export declare const XaiProviderAccountAuthoritySnapshotV1: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
+ version: z.ZodLiteral<1>;
12
+ scope: z.ZodLiteral<"workspace">;
13
+ }, z.core.$strict>, z.ZodObject<{
14
+ version: z.ZodLiteral<1>;
15
+ scope: z.ZodLiteral<"user">;
16
+ authorityGeneration: z.ZodNumber;
17
+ }, z.core.$strict>], "scope">;
18
+ export type XaiProviderAccountAuthoritySnapshotV1 = z.infer<typeof XaiProviderAccountAuthoritySnapshotV1>;
19
+ /** Explicit compatibility value for workspace-default accepted work. */
20
+ export declare const WORKSPACE_XAI_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1: {
21
+ readonly version: 1;
22
+ readonly scope: "workspace";
23
+ };
@@ -0,0 +1,9 @@
1
+ import {
2
+ WORKSPACE_XAI_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1,
3
+ XaiProviderAccountAuthoritySnapshotV1
4
+ } from "./chunk-CM6BMECR.js";
5
+ export {
6
+ WORKSPACE_XAI_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1,
7
+ XaiProviderAccountAuthoritySnapshotV1
8
+ };
9
+ //# sourceMappingURL=xai-provider-account-authority.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.40.0",
3
+ "version": "0.50.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,9 +30,81 @@
30
30
  "types": "./dist/google-drive.d.ts",
31
31
  "import": "./dist/google-drive.js"
32
32
  },
33
+ "./atlassian": {
34
+ "types": "./dist/atlassian.d.ts",
35
+ "import": "./dist/atlassian.js"
36
+ },
33
37
  "./connector-destinations": {
34
38
  "types": "./dist/connector-destinations.d.ts",
35
39
  "import": "./dist/connector-destinations.js"
40
+ },
41
+ "./video-generation": {
42
+ "types": "./dist/video-generation.d.ts",
43
+ "import": "./dist/video-generation.js"
44
+ },
45
+ "./canonical-human-identities": {
46
+ "types": "./dist/canonical-human-identities.d.ts",
47
+ "import": "./dist/canonical-human-identities.js"
48
+ },
49
+ "./codex-provider-account-authority": {
50
+ "types": "./dist/codex-provider-account-authority.d.ts",
51
+ "import": "./dist/codex-provider-account-authority.js"
52
+ },
53
+ "./xai-provider-account-authority": {
54
+ "types": "./dist/xai-provider-account-authority.d.ts",
55
+ "import": "./dist/xai-provider-account-authority.js"
56
+ },
57
+ "./editable-artifacts": {
58
+ "types": "./dist/editable-artifacts.d.ts",
59
+ "import": "./dist/editable-artifacts.js"
60
+ },
61
+ "./editable-artifact-committed-transaction": {
62
+ "types": "./dist/editable-artifact-committed-transaction.d.ts",
63
+ "import": "./dist/editable-artifact-committed-transaction.js"
64
+ },
65
+ "./editable-artifact-serialized-commit": {
66
+ "types": "./dist/editable-artifact-serialized-commit.d.ts",
67
+ "import": "./dist/editable-artifact-serialized-commit.js"
68
+ },
69
+ "./editable-artifact-live": {
70
+ "types": "./dist/editable-artifact-live.d.ts",
71
+ "import": "./dist/editable-artifact-live.js"
72
+ },
73
+ "./editable-artifact-causal-frontier": {
74
+ "types": "./dist/editable-artifact-causal-frontier.d.ts",
75
+ "import": "./dist/editable-artifact-causal-frontier.js"
76
+ },
77
+ "./editable-artifact-codec-registry": {
78
+ "types": "./dist/editable-artifact-codec-registry.d.ts",
79
+ "import": "./dist/editable-artifact-codec-registry.js"
80
+ },
81
+ "./editable-artifact-versions": {
82
+ "types": "./dist/editable-artifact-versions.d.ts",
83
+ "import": "./dist/editable-artifact-versions.js"
84
+ },
85
+ "./spreadsheet-artifact-commands": {
86
+ "types": "./dist/spreadsheet-artifact-commands.d.ts",
87
+ "import": "./dist/spreadsheet-artifact-commands.js"
88
+ },
89
+ "./spreadsheet-artifact-query": {
90
+ "types": "./dist/spreadsheet-artifact-query.d.ts",
91
+ "import": "./dist/spreadsheet-artifact-query.js"
92
+ },
93
+ "./document-artifact-commands": {
94
+ "types": "./dist/document-artifact-commands.d.ts",
95
+ "import": "./dist/document-artifact-commands.js"
96
+ },
97
+ "./document-artifact-query": {
98
+ "types": "./dist/document-artifact-query.d.ts",
99
+ "import": "./dist/document-artifact-query.js"
100
+ },
101
+ "./presentation-artifact-commands": {
102
+ "types": "./dist/presentation-artifact-commands.d.ts",
103
+ "import": "./dist/presentation-artifact-commands.js"
104
+ },
105
+ "./presentation-artifact-query": {
106
+ "types": "./dist/presentation-artifact-query.d.ts",
107
+ "import": "./dist/presentation-artifact-query.js"
36
108
  }
37
109
  },
38
110
  "publishConfig": {
package/src/artifacts.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
 
3
- export const WORKSPACE_ARTIFACT_HTML_MAX_UTF8_BYTES = 512 * 1024;
3
+ export const WORKSPACE_ARTIFACT_HTML_MAX_UTF8_BYTES = 4 * 1024 * 1024;
4
4
  export const WORKSPACE_ARTIFACT_TITLE_MAX_CHARS = 120;
5
5
  export const WORKSPACE_ARTIFACT_DESCRIPTION_MAX_CHARS = 2_000;
6
6
  export const WORKSPACE_ARTIFACT_LIST_MAX = 100;
@@ -0,0 +1,160 @@
1
+ import { z } from "zod";
2
+ import { ConnectionMetadata } from "./index";
3
+ import { ConnectorDocumentDestination } from "./connector-destinations";
4
+
5
+ export const ATLASSIAN_PROVIDER_DOMAIN = "api.atlassian.com" as const;
6
+ export const ATLASSIAN_CREDENTIAL_ROLE = "atlassian_knowledge" as const;
7
+ export const ATLASSIAN_CREDENTIAL_LABEL = "Atlassian read-only knowledge sync" as const;
8
+
9
+ export const ATLASSIAN_REQUIRED_SCOPES = [
10
+ "offline_access",
11
+ "read:me",
12
+ "read:jira-work",
13
+ "read:jira-user",
14
+ "read:confluence-content.all",
15
+ "read:confluence-space.summary",
16
+ "search:confluence",
17
+ "read:space:confluence",
18
+ "read:page:confluence",
19
+ "read:comment:confluence",
20
+ ] as const;
21
+
22
+ export const AtlassianSourceKind = z.enum(["jira_project", "confluence_space"]);
23
+ export type AtlassianSourceKind = z.infer<typeof AtlassianSourceKind>;
24
+
25
+ export const AtlassianSyncCadence = z.enum(["manual", "hourly", "daily"]);
26
+ export type AtlassianSyncCadence = z.infer<typeof AtlassianSyncCadence>;
27
+
28
+ export const AtlassianReadPolicy = z.enum(["allow", "ask", "block"]);
29
+ export type AtlassianReadPolicy = z.infer<typeof AtlassianReadPolicy>;
30
+
31
+ export const AtlassianConnectionLifecycle = z.object({
32
+ state: z.enum([
33
+ "active",
34
+ "paused",
35
+ "token_revoked",
36
+ "app_removed",
37
+ "disconnected",
38
+ "reconnect_required",
39
+ "reconsent_required",
40
+ ]),
41
+ recoverable: z.boolean(),
42
+ observedAt: z.string().datetime(),
43
+ });
44
+ export type AtlassianConnectionLifecycle = z.infer<typeof AtlassianConnectionLifecycle>;
45
+
46
+ export const AtlassianSelectedSource = z.object({
47
+ id: z.string().min(1).max(300),
48
+ cloudId: z.string().min(1).max(256),
49
+ siteName: z.string().min(1).max(512),
50
+ siteUrl: z.string().url(),
51
+ resourceId: z.string().min(1).max(256),
52
+ key: z.string().min(1).max(128),
53
+ name: z.string().min(1).max(512),
54
+ kind: AtlassianSourceKind,
55
+ destination: ConnectorDocumentDestination.optional(),
56
+ syncCadence: AtlassianSyncCadence,
57
+ syncEnabled: z.boolean(),
58
+ configGeneration: z.number().int().positive(),
59
+ readPolicy: AtlassianReadPolicy,
60
+ selectedAt: z.string().datetime(),
61
+ });
62
+ export type AtlassianSelectedSource = z.infer<typeof AtlassianSelectedSource>;
63
+
64
+ export const AtlassianConnectionMetadata = z.object({
65
+ credentialRole: z.literal(ATLASSIAN_CREDENTIAL_ROLE),
66
+ credentialLabel: z.literal(ATLASSIAN_CREDENTIAL_LABEL),
67
+ atlassianAccountId: z.string().min(1).max(256),
68
+ displayName: z.string().min(1).max(512),
69
+ email: z.string().email().nullable().optional(),
70
+ sites: z
71
+ .array(
72
+ z.object({
73
+ cloudId: z.string().min(1).max(256),
74
+ name: z.string().min(1).max(512),
75
+ url: z.string().url(),
76
+ products: z.array(z.enum(["jira", "confluence"])).max(2),
77
+ }),
78
+ )
79
+ .min(1)
80
+ .max(50),
81
+ verifiedAt: z.string().datetime(),
82
+ accessMode: z.literal("readonly"),
83
+ lifecycle: AtlassianConnectionLifecycle.optional(),
84
+ documentDestination: ConnectorDocumentDestination.optional(),
85
+ selectedSources: z.array(AtlassianSelectedSource).max(100).default([]),
86
+ });
87
+ export type AtlassianConnectionMetadata = z.infer<typeof AtlassianConnectionMetadata>;
88
+
89
+ export const AtlassianOAuthStartRequest = z.object({
90
+ connectionId: z.string().uuid().optional(),
91
+ });
92
+ export type AtlassianOAuthStartRequest = z.infer<typeof AtlassianOAuthStartRequest>;
93
+
94
+ export const AtlassianOAuthStartResponse = z.object({
95
+ authorizationUrl: z.string().url(),
96
+ expiresAt: z.string().datetime(),
97
+ });
98
+ export type AtlassianOAuthStartResponse = z.infer<typeof AtlassianOAuthStartResponse>;
99
+
100
+ export const AtlassianBrowseItem = z.object({
101
+ id: z.string().min(1).max(300),
102
+ cloudId: z.string().min(1).max(256),
103
+ siteName: z.string().min(1).max(512),
104
+ siteUrl: z.string().url(),
105
+ resourceId: z.string().min(1).max(256),
106
+ key: z.string().min(1).max(128),
107
+ name: z.string().min(1).max(512),
108
+ kind: AtlassianSourceKind,
109
+ description: z.string().max(2_000).nullable(),
110
+ webUrl: z.string().url(),
111
+ });
112
+ export type AtlassianBrowseItem = z.infer<typeof AtlassianBrowseItem>;
113
+
114
+ export const AtlassianBrowseResponse = z.object({
115
+ connection: z.lazy(() => ConnectionMetadata),
116
+ items: z.array(AtlassianBrowseItem).max(200),
117
+ });
118
+ export type AtlassianBrowseResponse = z.infer<typeof AtlassianBrowseResponse>;
119
+
120
+ export const SaveAtlassianSourcesRequest = z.object({
121
+ sources: z
122
+ .array(
123
+ AtlassianBrowseItem.pick({
124
+ id: true,
125
+ cloudId: true,
126
+ siteName: true,
127
+ siteUrl: true,
128
+ resourceId: true,
129
+ key: true,
130
+ name: true,
131
+ kind: true,
132
+ }),
133
+ )
134
+ .max(100),
135
+ destination: z.object({
136
+ authorityKind: z.enum(["organization", "workspace", "personal"]),
137
+ collectionId: z.string().uuid().nullable().default(null),
138
+ }),
139
+ syncCadence: AtlassianSyncCadence,
140
+ syncEnabled: z.boolean(),
141
+ readPolicy: AtlassianReadPolicy.default("allow"),
142
+ });
143
+ export type SaveAtlassianSourcesRequest = z.infer<typeof SaveAtlassianSourcesRequest>;
144
+
145
+ export const AtlassianLifecycleActionRequest = z.object({
146
+ action: z.enum(["pause", "resume"]),
147
+ expectedVersion: z.number().int().positive(),
148
+ });
149
+ export type AtlassianLifecycleActionRequest = z.infer<typeof AtlassianLifecycleActionRequest>;
150
+
151
+ export const AtlassianDisconnectRequest = z.object({
152
+ expectedVersion: z.number().int().positive(),
153
+ idempotencyKey: z.string().uuid(),
154
+ });
155
+ export type AtlassianDisconnectRequest = z.infer<typeof AtlassianDisconnectRequest>;
156
+
157
+ export function atlassianScopesAllowRead(scopes: readonly string[]): boolean {
158
+ const granted = new Set(scopes);
159
+ return ATLASSIAN_REQUIRED_SCOPES.every((scope) => granted.has(scope));
160
+ }
@@ -0,0 +1,93 @@
1
+ import { z } from "zod";
2
+
3
+ export const CanonicalHumanIdentityStatus = z.enum([
4
+ "active",
5
+ "recovery_required",
6
+ "disputed",
7
+ "disabled",
8
+ ]);
9
+ export type CanonicalHumanIdentityStatus = z.infer<typeof CanonicalHumanIdentityStatus>;
10
+
11
+ export const CanonicalHumanLoginBindingStatus = z.enum([
12
+ "active",
13
+ "recovery_pending",
14
+ "stale",
15
+ "disputed",
16
+ "revoked",
17
+ ]);
18
+ export type CanonicalHumanLoginBindingStatus = z.infer<typeof CanonicalHumanLoginBindingStatus>;
19
+
20
+ export const CanonicalHumanRecoveryState = z.enum([
21
+ "ready",
22
+ "recovery_required",
23
+ "lost_factor",
24
+ "disputed",
25
+ "disabled",
26
+ ]);
27
+ export type CanonicalHumanRecoveryState = z.infer<typeof CanonicalHumanRecoveryState>;
28
+
29
+ export const CanonicalHumanLoginBinding = z.object({
30
+ id: z.string().uuid(),
31
+ providerId: z.string().min(1).max(128),
32
+ providerAccountId: z.string().min(1).max(1024),
33
+ status: CanonicalHumanLoginBindingStatus,
34
+ revision: z.number().int().positive(),
35
+ verifiedAt: z.string().datetime(),
36
+ lastVerifiedAt: z.string().datetime(),
37
+ revokedAt: z.string().datetime().nullable(),
38
+ createdAt: z.string().datetime(),
39
+ updatedAt: z.string().datetime(),
40
+ });
41
+ export type CanonicalHumanLoginBinding = z.infer<typeof CanonicalHumanLoginBinding>;
42
+
43
+ export const CanonicalHumanIdentityProjection = z.object({
44
+ activeIdentity: z.object({
45
+ id: z.string().uuid(),
46
+ displayName: z.string().min(1).max(256),
47
+ status: CanonicalHumanIdentityStatus,
48
+ identityRevision: z.number().int().positive(),
49
+ authRevision: z.number().int().positive(),
50
+ activeLoginBindingId: z.string().uuid().nullable(),
51
+ recoveryState: CanonicalHumanRecoveryState,
52
+ createdAt: z.string().datetime(),
53
+ updatedAt: z.string().datetime(),
54
+ }),
55
+ loginBindings: z.array(CanonicalHumanLoginBinding).max(64),
56
+ });
57
+ export type CanonicalHumanIdentityProjection = z.infer<typeof CanonicalHumanIdentityProjection>;
58
+
59
+ const OperationFields = {
60
+ operationId: z.string().uuid().optional(),
61
+ expectedIdentityRevision: z.number().int().positive(),
62
+ reason: z.string().trim().min(1).max(512),
63
+ } as const;
64
+
65
+ export const LinkCanonicalHumanLoginBindingRequest = z.object({
66
+ ...OperationFields,
67
+ providerId: z.string().trim().min(1).max(128),
68
+ providerAccountId: z.string().trim().min(1).max(1024),
69
+ });
70
+ export type LinkCanonicalHumanLoginBindingRequest = z.infer<
71
+ typeof LinkCanonicalHumanLoginBindingRequest
72
+ >;
73
+
74
+ export const CanonicalHumanBindingOperationRequest = z.object({
75
+ ...OperationFields,
76
+ });
77
+ export type CanonicalHumanBindingOperationRequest = z.infer<
78
+ typeof CanonicalHumanBindingOperationRequest
79
+ >;
80
+
81
+ export const CanonicalHumanIdentityMutationOutcome = z.enum(["applied", "lost_factor", "disputed"]);
82
+ export type CanonicalHumanIdentityMutationOutcome = z.infer<
83
+ typeof CanonicalHumanIdentityMutationOutcome
84
+ >;
85
+
86
+ export const CanonicalHumanIdentityMutationResponse = z.object({
87
+ outcome: CanonicalHumanIdentityMutationOutcome,
88
+ operationId: z.string().uuid(),
89
+ identity: CanonicalHumanIdentityProjection,
90
+ });
91
+ export type CanonicalHumanIdentityMutationResponse = z.infer<
92
+ typeof CanonicalHumanIdentityMutationResponse
93
+ >;
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+
3
+ const PositiveSafeInteger = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
4
+
5
+ /**
6
+ * Opaque authority frozen at a Codex provider-account acceptance boundary.
7
+ *
8
+ * The snapshot deliberately carries no organization, membership, credential,
9
+ * provider-account, subject, label, quota, token, or plan identity. A later
10
+ * activation slice may use the user generation only together with separately
11
+ * authorized durable state; this value is never sufficient authority alone.
12
+ */
13
+ export const CodexProviderAccountAuthoritySnapshotV1 = z.discriminatedUnion("scope", [
14
+ z
15
+ .object({
16
+ version: z.literal(1),
17
+ scope: z.literal("workspace"),
18
+ })
19
+ .strict(),
20
+ z
21
+ .object({
22
+ version: z.literal(1),
23
+ scope: z.literal("user"),
24
+ authorityGeneration: PositiveSafeInteger,
25
+ })
26
+ .strict(),
27
+ ]);
28
+
29
+ export type CodexProviderAccountAuthoritySnapshotV1 = z.infer<
30
+ typeof CodexProviderAccountAuthoritySnapshotV1
31
+ >;
32
+
33
+ /** Explicit compatibility value for all pre-foundation accepted work. */
34
+ export const LEGACY_WORKSPACE_CODEX_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1 = {
35
+ version: 1,
36
+ scope: "workspace",
37
+ } as const satisfies CodexProviderAccountAuthoritySnapshotV1;