@opengeni/contracts 0.39.0 → 0.44.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.
Files changed (130) hide show
  1. package/dist/atlassian.d.ts +278 -0
  2. package/dist/atlassian.js +55 -0
  3. package/dist/atlassian.js.map +1 -0
  4. package/dist/chunk-52SGB2QO.js +688 -0
  5. package/dist/chunk-52SGB2QO.js.map +1 -0
  6. package/dist/{chunk-7JZMI22I.js → chunk-5UDNP7AO.js} +34 -2
  7. package/dist/chunk-5UDNP7AO.js.map +1 -0
  8. package/dist/chunk-BVGIYW7D.js +11 -0
  9. package/dist/chunk-BVGIYW7D.js.map +1 -0
  10. package/dist/chunk-CADSX6UN.js +1145 -0
  11. package/dist/chunk-CADSX6UN.js.map +1 -0
  12. package/dist/chunk-D2HKF2EF.js +1460 -0
  13. package/dist/chunk-D2HKF2EF.js.map +1 -0
  14. package/dist/chunk-FJBG5E4O.js +194 -0
  15. package/dist/chunk-FJBG5E4O.js.map +1 -0
  16. package/dist/chunk-H5BVCZKF.js +382 -0
  17. package/dist/chunk-H5BVCZKF.js.map +1 -0
  18. package/dist/chunk-LSB7GRLG.js +779 -0
  19. package/dist/chunk-LSB7GRLG.js.map +1 -0
  20. package/dist/chunk-MYBZRDTY.js +340 -0
  21. package/dist/chunk-MYBZRDTY.js.map +1 -0
  22. package/dist/chunk-RIY7GYQS.js +1204 -0
  23. package/dist/chunk-RIY7GYQS.js.map +1 -0
  24. package/dist/chunk-TZ6YEYN4.js +386 -0
  25. package/dist/chunk-TZ6YEYN4.js.map +1 -0
  26. package/dist/chunk-VA22KRHS.js +15177 -0
  27. package/dist/chunk-VA22KRHS.js.map +1 -0
  28. package/dist/chunk-Y3MLSLB4.js +392 -0
  29. package/dist/chunk-Y3MLSLB4.js.map +1 -0
  30. package/dist/chunk-YRKRZ6OF.js +134 -0
  31. package/dist/chunk-YRKRZ6OF.js.map +1 -0
  32. package/dist/company-profile.d.ts +629 -0
  33. package/dist/document-artifact-commands.d.ts +282 -0
  34. package/dist/document-artifact-commands.js +54 -0
  35. package/dist/document-artifact-commands.js.map +1 -0
  36. package/dist/document-artifact-query.d.ts +2 -0
  37. package/dist/document-artifact-query.js +54 -0
  38. package/dist/document-artifact-query.js.map +1 -0
  39. package/dist/editable-artifact-binary.d.ts +56 -0
  40. package/dist/editable-artifact-causal-frontier.d.ts +12 -0
  41. package/dist/editable-artifact-causal-frontier.js +18 -0
  42. package/dist/editable-artifact-causal-frontier.js.map +1 -0
  43. package/dist/editable-artifact-codec-registry.d.ts +48 -0
  44. package/dist/editable-artifact-codec-registry.js +20 -0
  45. package/dist/editable-artifact-codec-registry.js.map +1 -0
  46. package/dist/editable-artifact-committed-transaction.d.ts +35 -0
  47. package/dist/editable-artifact-committed-transaction.js +19 -0
  48. package/dist/editable-artifact-committed-transaction.js.map +1 -0
  49. package/dist/editable-artifact-live.d.ts +276 -0
  50. package/dist/editable-artifact-live.js +907 -0
  51. package/dist/editable-artifact-live.js.map +1 -0
  52. package/dist/editable-artifact-serialized-commit.d.ts +53 -0
  53. package/dist/editable-artifact-serialized-commit.js +26 -0
  54. package/dist/editable-artifact-serialized-commit.js.map +1 -0
  55. package/dist/editable-artifact-versions.d.ts +6 -0
  56. package/dist/editable-artifact-versions.js +11 -0
  57. package/dist/editable-artifact-versions.js.map +1 -0
  58. package/dist/editable-artifacts.d.ts +46 -0
  59. package/dist/editable-artifacts.js +236 -0
  60. package/dist/editable-artifacts.js.map +1 -0
  61. package/dist/event-preview.d.ts +7 -7
  62. package/dist/google-drive.d.ts +114 -2
  63. package/dist/google-drive.js +70 -14
  64. package/dist/google-drive.js.map +1 -1
  65. package/dist/image-generation.d.ts +70 -0
  66. package/dist/index.d.ts +5180 -329
  67. package/dist/index.js +1173 -40
  68. package/dist/interaction.d.ts +6895 -0
  69. package/dist/mcp-receipts.d.ts +96 -0
  70. package/dist/memory-slack-delivery.d.ts +397 -0
  71. package/dist/presentation-artifact-commands.d.ts +349 -0
  72. package/dist/presentation-artifact-commands.js +66 -0
  73. package/dist/presentation-artifact-commands.js.map +1 -0
  74. package/dist/presentation-artifact-query.d.ts +2 -0
  75. package/dist/presentation-artifact-query.js +66 -0
  76. package/dist/presentation-artifact-query.js.map +1 -0
  77. package/dist/retained-output.d.ts +83 -6
  78. package/dist/sandbox-snapshots.d.ts +9 -0
  79. package/dist/scoped-knowledge.d.ts +14 -13
  80. package/dist/slack-bot-scopes.d.ts +4 -0
  81. package/dist/slack-bot-scopes.js +3 -1
  82. package/dist/spreadsheet-artifact-commands.d.ts +101 -0
  83. package/dist/spreadsheet-artifact-commands.js +27 -0
  84. package/dist/spreadsheet-artifact-commands.js.map +1 -0
  85. package/dist/spreadsheet-artifact-date.d.ts +4 -0
  86. package/dist/spreadsheet-artifact-query.d.ts +120 -0
  87. package/dist/spreadsheet-artifact-query.js +48 -0
  88. package/dist/spreadsheet-artifact-query.js.map +1 -0
  89. package/dist/tool-catalog.d.ts +576 -0
  90. package/dist/video-generation.d.ts +532 -0
  91. package/dist/video-generation.js +51 -0
  92. package/dist/video-generation.js.map +1 -0
  93. package/dist/workspace-learning-policy.d.ts +208 -0
  94. package/package.json +61 -1
  95. package/src/atlassian.ts +160 -0
  96. package/src/company-profile.ts +306 -0
  97. package/src/document-artifact-commands.ts +1709 -0
  98. package/src/document-artifact-query.ts +2 -0
  99. package/src/editable-artifact-binary.ts +396 -0
  100. package/src/editable-artifact-causal-frontier.ts +154 -0
  101. package/src/editable-artifact-codec-registry.ts +261 -0
  102. package/src/editable-artifact-committed-transaction.ts +478 -0
  103. package/src/editable-artifact-live.ts +1379 -0
  104. package/src/editable-artifact-serialized-commit.ts +494 -0
  105. package/src/editable-artifact-versions.ts +8 -0
  106. package/src/editable-artifacts.ts +473 -0
  107. package/src/event-preview.ts +6 -6
  108. package/src/google-drive.ts +68 -15
  109. package/src/image-generation.ts +106 -0
  110. package/src/index.ts +2535 -282
  111. package/src/interaction.ts +2292 -0
  112. package/src/mcp-receipts.ts +281 -0
  113. package/src/memory-slack-delivery.ts +183 -0
  114. package/src/presentation-artifact-commands.ts +2035 -0
  115. package/src/presentation-artifact-query.ts +2 -0
  116. package/src/retained-output.ts +248 -8
  117. package/src/sandbox-snapshots.ts +28 -1
  118. package/src/scoped-knowledge.ts +18 -4
  119. package/src/slack-bot-scopes.ts +34 -1
  120. package/src/spreadsheet-artifact-commands.ts +999 -0
  121. package/src/spreadsheet-artifact-date.ts +21 -0
  122. package/src/spreadsheet-artifact-query.ts +1411 -0
  123. package/src/tool-catalog.ts +334 -0
  124. package/src/video-generation.ts +394 -0
  125. package/src/workspace-learning-policy.ts +233 -0
  126. package/dist/chunk-7JZMI22I.js.map +0 -1
  127. package/dist/chunk-PCTCJEAF.js +0 -10799
  128. package/dist/chunk-PCTCJEAF.js.map +0 -1
  129. package/dist/secret-redaction.d.ts +0 -40
  130. package/src/secret-redaction.ts +0 -364
@@ -0,0 +1,106 @@
1
+ import { z } from "zod";
2
+ import { RETAINED_OUTPUT_MAX_PAGE_BYTES, RetainedArtifactReferenceSchema } from "./retained-output";
3
+
4
+ // Codex accepts five references, while the current Gateway GPT Image 2 route
5
+ // accepts four. Keep the provider-neutral tool at the reliable shared limit.
6
+ export const IMAGE_GENERATION_MAX_REFERENCES = 4;
7
+
8
+ const WorkspaceImagePathSchema = z
9
+ .string()
10
+ .max(512)
11
+ // Keep the provider-visible pattern within the portable JSON Schema regex
12
+ // subset. Codex rejects lookaround before inference.
13
+ .regex(/^\/workspace\/.+$/)
14
+ // Path traversal remains an exact runtime validation concern. Zod does not
15
+ // project custom refinements into JSON Schema, so this preserves the guard
16
+ // without sending unsupported regex syntax to model providers.
17
+ .refine((path) => path.split("/").every((segment) => segment !== "." && segment !== ".."), {
18
+ message: "Sandbox image paths cannot contain dot segments",
19
+ });
20
+
21
+ /** One ordered, workspace-owned input used to guide or edit an image. */
22
+ export const ImageGenerationReferenceSchema = z.discriminatedUnion("kind", [
23
+ z
24
+ .object({
25
+ kind: z.literal("sandbox_path"),
26
+ path: WorkspaceImagePathSchema,
27
+ })
28
+ .strict(),
29
+ z
30
+ .object({
31
+ kind: z.literal("file"),
32
+ fileId: z.string().uuid(),
33
+ })
34
+ .strict(),
35
+ z
36
+ .object({
37
+ kind: z.literal("artifact"),
38
+ artifactId: z.string().uuid(),
39
+ })
40
+ .strict(),
41
+ ]);
42
+ export type ImageGenerationReference = z.infer<typeof ImageGenerationReferenceSchema>;
43
+
44
+ /** Provider-neutral minimum shared by native and adapter-backed image tools. */
45
+ export const GenerateImageToolInput = z
46
+ .object({
47
+ prompt: z.string().trim().min(1).max(32_000),
48
+ references: z
49
+ .array(ImageGenerationReferenceSchema)
50
+ .max(IMAGE_GENERATION_MAX_REFERENCES)
51
+ .optional()
52
+ .default([]),
53
+ })
54
+ .strict();
55
+ export type GenerateImageToolInput = z.infer<typeof GenerateImageToolInput>;
56
+
57
+ /** Closed durable result shared by native and adapter-backed image tools. */
58
+ export const GeneratedImageReceiptSchema = z
59
+ .object({
60
+ type: z.literal("generated_image"),
61
+ artifact: RetainedArtifactReferenceSchema,
62
+ sandboxPath: z
63
+ .string()
64
+ .max(256)
65
+ .regex(
66
+ /^\/workspace\/generated-images\/generated-image-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\.(png|jpg|webp)$/,
67
+ ),
68
+ })
69
+ .strict()
70
+ .superRefine((value, ctx) => {
71
+ if (value.artifact.kind !== "generated_image") {
72
+ ctx.addIssue({
73
+ code: "custom",
74
+ path: ["artifact", "kind"],
75
+ message: "generated-image receipt requires a generated-image artifact",
76
+ });
77
+ return;
78
+ }
79
+ if (value.artifact.retrieval.maxRangeBytes !== RETAINED_OUTPUT_MAX_PAGE_BYTES) {
80
+ ctx.addIssue({
81
+ code: "custom",
82
+ path: ["artifact", "retrieval", "maxRangeBytes"],
83
+ message: "generated-image receipt requires the canonical range size",
84
+ });
85
+ }
86
+ const extension =
87
+ value.artifact.contentType === "image/png"
88
+ ? "png"
89
+ : value.artifact.contentType === "image/jpeg"
90
+ ? "jpg"
91
+ : value.artifact.contentType === "image/webp"
92
+ ? "webp"
93
+ : null;
94
+ if (
95
+ extension === null ||
96
+ value.sandboxPath !==
97
+ `/workspace/generated-images/generated-image-${value.artifact.artifactId}.${extension}`
98
+ ) {
99
+ ctx.addIssue({
100
+ code: "custom",
101
+ path: ["sandboxPath"],
102
+ message: "generated-image sandbox path does not match its artifact",
103
+ });
104
+ }
105
+ });
106
+ export type GeneratedImageReceipt = z.infer<typeof GeneratedImageReceiptSchema>;