@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.
- package/dist/atlassian.d.ts +278 -0
- package/dist/atlassian.js +55 -0
- package/dist/atlassian.js.map +1 -0
- package/dist/chunk-52SGB2QO.js +688 -0
- package/dist/chunk-52SGB2QO.js.map +1 -0
- package/dist/{chunk-7JZMI22I.js → chunk-5UDNP7AO.js} +34 -2
- package/dist/chunk-5UDNP7AO.js.map +1 -0
- package/dist/chunk-BVGIYW7D.js +11 -0
- package/dist/chunk-BVGIYW7D.js.map +1 -0
- package/dist/chunk-CADSX6UN.js +1145 -0
- package/dist/chunk-CADSX6UN.js.map +1 -0
- package/dist/chunk-D2HKF2EF.js +1460 -0
- package/dist/chunk-D2HKF2EF.js.map +1 -0
- package/dist/chunk-FJBG5E4O.js +194 -0
- package/dist/chunk-FJBG5E4O.js.map +1 -0
- package/dist/chunk-H5BVCZKF.js +382 -0
- package/dist/chunk-H5BVCZKF.js.map +1 -0
- package/dist/chunk-LSB7GRLG.js +779 -0
- package/dist/chunk-LSB7GRLG.js.map +1 -0
- package/dist/chunk-MYBZRDTY.js +340 -0
- package/dist/chunk-MYBZRDTY.js.map +1 -0
- package/dist/chunk-RIY7GYQS.js +1204 -0
- package/dist/chunk-RIY7GYQS.js.map +1 -0
- package/dist/chunk-TZ6YEYN4.js +386 -0
- package/dist/chunk-TZ6YEYN4.js.map +1 -0
- package/dist/chunk-VA22KRHS.js +15177 -0
- package/dist/chunk-VA22KRHS.js.map +1 -0
- package/dist/chunk-Y3MLSLB4.js +392 -0
- package/dist/chunk-Y3MLSLB4.js.map +1 -0
- package/dist/chunk-YRKRZ6OF.js +134 -0
- package/dist/chunk-YRKRZ6OF.js.map +1 -0
- package/dist/company-profile.d.ts +629 -0
- package/dist/document-artifact-commands.d.ts +282 -0
- package/dist/document-artifact-commands.js +54 -0
- package/dist/document-artifact-commands.js.map +1 -0
- package/dist/document-artifact-query.d.ts +2 -0
- package/dist/document-artifact-query.js +54 -0
- package/dist/document-artifact-query.js.map +1 -0
- package/dist/editable-artifact-binary.d.ts +56 -0
- package/dist/editable-artifact-causal-frontier.d.ts +12 -0
- package/dist/editable-artifact-causal-frontier.js +18 -0
- package/dist/editable-artifact-causal-frontier.js.map +1 -0
- package/dist/editable-artifact-codec-registry.d.ts +48 -0
- package/dist/editable-artifact-codec-registry.js +20 -0
- package/dist/editable-artifact-codec-registry.js.map +1 -0
- package/dist/editable-artifact-committed-transaction.d.ts +35 -0
- package/dist/editable-artifact-committed-transaction.js +19 -0
- package/dist/editable-artifact-committed-transaction.js.map +1 -0
- package/dist/editable-artifact-live.d.ts +276 -0
- package/dist/editable-artifact-live.js +907 -0
- package/dist/editable-artifact-live.js.map +1 -0
- package/dist/editable-artifact-serialized-commit.d.ts +53 -0
- package/dist/editable-artifact-serialized-commit.js +26 -0
- package/dist/editable-artifact-serialized-commit.js.map +1 -0
- package/dist/editable-artifact-versions.d.ts +6 -0
- package/dist/editable-artifact-versions.js +11 -0
- package/dist/editable-artifact-versions.js.map +1 -0
- package/dist/editable-artifacts.d.ts +46 -0
- package/dist/editable-artifacts.js +236 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/event-preview.d.ts +7 -7
- package/dist/google-drive.d.ts +114 -2
- package/dist/google-drive.js +70 -14
- package/dist/google-drive.js.map +1 -1
- package/dist/image-generation.d.ts +70 -0
- package/dist/index.d.ts +5180 -329
- package/dist/index.js +1173 -40
- package/dist/interaction.d.ts +6895 -0
- package/dist/mcp-receipts.d.ts +96 -0
- package/dist/memory-slack-delivery.d.ts +397 -0
- package/dist/presentation-artifact-commands.d.ts +349 -0
- package/dist/presentation-artifact-commands.js +66 -0
- package/dist/presentation-artifact-commands.js.map +1 -0
- package/dist/presentation-artifact-query.d.ts +2 -0
- package/dist/presentation-artifact-query.js +66 -0
- package/dist/presentation-artifact-query.js.map +1 -0
- package/dist/retained-output.d.ts +83 -6
- package/dist/sandbox-snapshots.d.ts +9 -0
- package/dist/scoped-knowledge.d.ts +14 -13
- package/dist/slack-bot-scopes.d.ts +4 -0
- package/dist/slack-bot-scopes.js +3 -1
- package/dist/spreadsheet-artifact-commands.d.ts +101 -0
- package/dist/spreadsheet-artifact-commands.js +27 -0
- package/dist/spreadsheet-artifact-commands.js.map +1 -0
- package/dist/spreadsheet-artifact-date.d.ts +4 -0
- package/dist/spreadsheet-artifact-query.d.ts +120 -0
- package/dist/spreadsheet-artifact-query.js +48 -0
- package/dist/spreadsheet-artifact-query.js.map +1 -0
- package/dist/tool-catalog.d.ts +576 -0
- package/dist/video-generation.d.ts +532 -0
- package/dist/video-generation.js +51 -0
- package/dist/video-generation.js.map +1 -0
- package/dist/workspace-learning-policy.d.ts +208 -0
- package/package.json +61 -1
- package/src/atlassian.ts +160 -0
- package/src/company-profile.ts +306 -0
- package/src/document-artifact-commands.ts +1709 -0
- package/src/document-artifact-query.ts +2 -0
- package/src/editable-artifact-binary.ts +396 -0
- package/src/editable-artifact-causal-frontier.ts +154 -0
- package/src/editable-artifact-codec-registry.ts +261 -0
- package/src/editable-artifact-committed-transaction.ts +478 -0
- package/src/editable-artifact-live.ts +1379 -0
- package/src/editable-artifact-serialized-commit.ts +494 -0
- package/src/editable-artifact-versions.ts +8 -0
- package/src/editable-artifacts.ts +473 -0
- package/src/event-preview.ts +6 -6
- package/src/google-drive.ts +68 -15
- package/src/image-generation.ts +106 -0
- package/src/index.ts +2535 -282
- package/src/interaction.ts +2292 -0
- package/src/mcp-receipts.ts +281 -0
- package/src/memory-slack-delivery.ts +183 -0
- package/src/presentation-artifact-commands.ts +2035 -0
- package/src/presentation-artifact-query.ts +2 -0
- package/src/retained-output.ts +248 -8
- package/src/sandbox-snapshots.ts +28 -1
- package/src/scoped-knowledge.ts +18 -4
- package/src/slack-bot-scopes.ts +34 -1
- package/src/spreadsheet-artifact-commands.ts +999 -0
- package/src/spreadsheet-artifact-date.ts +21 -0
- package/src/spreadsheet-artifact-query.ts +1411 -0
- package/src/tool-catalog.ts +334 -0
- package/src/video-generation.ts +394 -0
- package/src/workspace-learning-policy.ts +233 -0
- package/dist/chunk-7JZMI22I.js.map +0 -1
- package/dist/chunk-PCTCJEAF.js +0 -10799
- package/dist/chunk-PCTCJEAF.js.map +0 -1
- package/dist/secret-redaction.d.ts +0 -40
- 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>;
|