@opengeni/contracts 0.32.0 → 0.35.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/{chunk-GMOYIHF3.js → chunk-JRHJTJVH.js} +114 -16
- package/dist/chunk-JRHJTJVH.js.map +1 -0
- package/dist/google-drive.d.ts +82 -0
- package/dist/google-drive.js +61 -1
- package/dist/google-drive.js.map +1 -1
- package/dist/index.d.ts +90 -6
- package/dist/index.js +17 -1
- package/dist/workspace-instruction-policies.d.ts +18 -0
- package/dist/workspace-state.d.ts +218 -4
- package/package.json +1 -1
- package/src/google-drive.ts +66 -0
- package/src/index.ts +37 -14
- package/src/workspace-instruction-policies.ts +16 -0
- package/src/workspace-state.ts +112 -6
- package/dist/chunk-GMOYIHF3.js.map +0 -1
package/dist/google-drive.d.ts
CHANGED
|
@@ -43,6 +43,46 @@ export declare const GoogleDriveReadPolicy: z.ZodEnum<{
|
|
|
43
43
|
block: "block";
|
|
44
44
|
}>;
|
|
45
45
|
export type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;
|
|
46
|
+
export declare const GoogleDriveConnectionLifecycleState: z.ZodEnum<{
|
|
47
|
+
active: "active";
|
|
48
|
+
app_removed: "app_removed";
|
|
49
|
+
disconnected: "disconnected";
|
|
50
|
+
paused: "paused";
|
|
51
|
+
reconnect_required: "reconnect_required";
|
|
52
|
+
reconsent_required: "reconsent_required";
|
|
53
|
+
token_revoked: "token_revoked";
|
|
54
|
+
}>;
|
|
55
|
+
export type GoogleDriveConnectionLifecycleState = z.infer<typeof GoogleDriveConnectionLifecycleState>;
|
|
56
|
+
export declare const GoogleDriveConnectionLifecycle: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
state: z.ZodLiteral<"active">;
|
|
58
|
+
recoverable: z.ZodLiteral<true>;
|
|
59
|
+
observedAt: z.ZodString;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
state: z.ZodLiteral<"paused">;
|
|
62
|
+
recoverable: z.ZodLiteral<true>;
|
|
63
|
+
observedAt: z.ZodString;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
state: z.ZodLiteral<"token_revoked">;
|
|
66
|
+
recoverable: z.ZodLiteral<true>;
|
|
67
|
+
observedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
state: z.ZodLiteral<"app_removed">;
|
|
70
|
+
recoverable: z.ZodLiteral<false>;
|
|
71
|
+
observedAt: z.ZodString;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
state: z.ZodLiteral<"disconnected">;
|
|
74
|
+
recoverable: z.ZodLiteral<true>;
|
|
75
|
+
observedAt: z.ZodString;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
state: z.ZodLiteral<"reconnect_required">;
|
|
78
|
+
recoverable: z.ZodLiteral<true>;
|
|
79
|
+
observedAt: z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
state: z.ZodLiteral<"reconsent_required">;
|
|
82
|
+
recoverable: z.ZodLiteral<true>;
|
|
83
|
+
observedAt: z.ZodString;
|
|
84
|
+
}, z.core.$strip>], "state">;
|
|
85
|
+
export type GoogleDriveConnectionLifecycle = z.infer<typeof GoogleDriveConnectionLifecycle>;
|
|
46
86
|
export declare const GoogleDriveSelectedSource: z.ZodObject<{
|
|
47
87
|
id: z.ZodString;
|
|
48
88
|
name: z.ZodString;
|
|
@@ -77,6 +117,35 @@ export declare const GoogleDriveConnectionMetadata: z.ZodObject<{
|
|
|
77
117
|
metadata_readonly: "metadata_readonly";
|
|
78
118
|
readonly: "readonly";
|
|
79
119
|
}>;
|
|
120
|
+
lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
121
|
+
state: z.ZodLiteral<"active">;
|
|
122
|
+
recoverable: z.ZodLiteral<true>;
|
|
123
|
+
observedAt: z.ZodString;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
state: z.ZodLiteral<"paused">;
|
|
126
|
+
recoverable: z.ZodLiteral<true>;
|
|
127
|
+
observedAt: z.ZodString;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
state: z.ZodLiteral<"token_revoked">;
|
|
130
|
+
recoverable: z.ZodLiteral<true>;
|
|
131
|
+
observedAt: z.ZodString;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
state: z.ZodLiteral<"app_removed">;
|
|
134
|
+
recoverable: z.ZodLiteral<false>;
|
|
135
|
+
observedAt: z.ZodString;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
state: z.ZodLiteral<"disconnected">;
|
|
138
|
+
recoverable: z.ZodLiteral<true>;
|
|
139
|
+
observedAt: z.ZodString;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
state: z.ZodLiteral<"reconnect_required">;
|
|
142
|
+
recoverable: z.ZodLiteral<true>;
|
|
143
|
+
observedAt: z.ZodString;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
145
|
+
state: z.ZodLiteral<"reconsent_required">;
|
|
146
|
+
recoverable: z.ZodLiteral<true>;
|
|
147
|
+
observedAt: z.ZodString;
|
|
148
|
+
}, z.core.$strip>], "state">>;
|
|
80
149
|
selectedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
150
|
id: z.ZodString;
|
|
82
151
|
name: z.ZodString;
|
|
@@ -132,6 +201,19 @@ export declare const GoogleDriveOAuthStartResponse: z.ZodObject<{
|
|
|
132
201
|
expiresAt: z.ZodString;
|
|
133
202
|
}, z.core.$strip>;
|
|
134
203
|
export type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;
|
|
204
|
+
export declare const GoogleDriveLifecycleActionRequest: z.ZodObject<{
|
|
205
|
+
action: z.ZodEnum<{
|
|
206
|
+
pause: "pause";
|
|
207
|
+
resume: "resume";
|
|
208
|
+
}>;
|
|
209
|
+
expectedVersion: z.ZodNumber;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
export type GoogleDriveLifecycleActionRequest = z.infer<typeof GoogleDriveLifecycleActionRequest>;
|
|
212
|
+
export declare const GoogleDriveDisconnectRequest: z.ZodObject<{
|
|
213
|
+
expectedVersion: z.ZodNumber;
|
|
214
|
+
idempotencyKey: z.ZodString;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
export type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;
|
|
135
217
|
export declare const GoogleDriveBrowseItem: z.ZodObject<{
|
|
136
218
|
id: z.ZodString;
|
|
137
219
|
name: z.ZodString;
|
package/dist/google-drive.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConnectionMetadata
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JRHJTJVH.js";
|
|
4
4
|
import "./chunk-7JZMI22I.js";
|
|
5
5
|
|
|
6
6
|
// src/google-drive.ts
|
|
@@ -41,6 +41,53 @@ function googleDriveScopesAllowCapability(grantedScopes, capability) {
|
|
|
41
41
|
var GoogleDriveTargetScope = z.enum(["user", "workspace", "organization"]);
|
|
42
42
|
var GoogleDriveSyncCadence = z.enum(["manual", "hourly", "daily"]);
|
|
43
43
|
var GoogleDriveReadPolicy = z.enum(["allow", "ask", "block"]);
|
|
44
|
+
var GoogleDriveConnectionLifecycleState = z.enum([
|
|
45
|
+
"active",
|
|
46
|
+
"paused",
|
|
47
|
+
"token_revoked",
|
|
48
|
+
"app_removed",
|
|
49
|
+
"disconnected",
|
|
50
|
+
"reconnect_required",
|
|
51
|
+
"reconsent_required"
|
|
52
|
+
]);
|
|
53
|
+
var GoogleDriveLifecycleObservedAt = z.string().datetime({ offset: true });
|
|
54
|
+
var GoogleDriveConnectionLifecycle = z.discriminatedUnion("state", [
|
|
55
|
+
z.object({
|
|
56
|
+
state: z.literal("active"),
|
|
57
|
+
recoverable: z.literal(true),
|
|
58
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
59
|
+
}),
|
|
60
|
+
z.object({
|
|
61
|
+
state: z.literal("paused"),
|
|
62
|
+
recoverable: z.literal(true),
|
|
63
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
64
|
+
}),
|
|
65
|
+
z.object({
|
|
66
|
+
state: z.literal("token_revoked"),
|
|
67
|
+
recoverable: z.literal(true),
|
|
68
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
69
|
+
}),
|
|
70
|
+
z.object({
|
|
71
|
+
state: z.literal("app_removed"),
|
|
72
|
+
recoverable: z.literal(false),
|
|
73
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
74
|
+
}),
|
|
75
|
+
z.object({
|
|
76
|
+
state: z.literal("disconnected"),
|
|
77
|
+
recoverable: z.literal(true),
|
|
78
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
79
|
+
}),
|
|
80
|
+
z.object({
|
|
81
|
+
state: z.literal("reconnect_required"),
|
|
82
|
+
recoverable: z.literal(true),
|
|
83
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
84
|
+
}),
|
|
85
|
+
z.object({
|
|
86
|
+
state: z.literal("reconsent_required"),
|
|
87
|
+
recoverable: z.literal(true),
|
|
88
|
+
observedAt: GoogleDriveLifecycleObservedAt
|
|
89
|
+
})
|
|
90
|
+
]);
|
|
44
91
|
var GoogleDriveSelectedSource = z.object({
|
|
45
92
|
id: z.string().min(1).max(256),
|
|
46
93
|
name: z.string().min(1).max(1024),
|
|
@@ -59,6 +106,7 @@ var GoogleDriveConnectionMetadata = z.object({
|
|
|
59
106
|
googleDisplayName: z.string().min(1).max(512).nullable(),
|
|
60
107
|
verifiedAt: z.string().datetime({ offset: true }),
|
|
61
108
|
accessMode: z.enum(["metadata_readonly", "readonly"]),
|
|
109
|
+
lifecycle: GoogleDriveConnectionLifecycle.optional(),
|
|
62
110
|
selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),
|
|
63
111
|
/** @deprecated Read `selectedSources`; retained while existing connections migrate. */
|
|
64
112
|
selectedSource: GoogleDriveSelectedSource.nullable().optional()
|
|
@@ -70,6 +118,14 @@ var GoogleDriveOAuthStartResponse = z.object({
|
|
|
70
118
|
authorizationUrl: z.string().url(),
|
|
71
119
|
expiresAt: z.string().datetime({ offset: true })
|
|
72
120
|
});
|
|
121
|
+
var GoogleDriveLifecycleActionRequest = z.object({
|
|
122
|
+
action: z.enum(["pause", "resume"]),
|
|
123
|
+
expectedVersion: z.number().int().positive()
|
|
124
|
+
});
|
|
125
|
+
var GoogleDriveDisconnectRequest = z.object({
|
|
126
|
+
expectedVersion: z.number().int().positive(),
|
|
127
|
+
idempotencyKey: z.string().trim().min(1).max(200)
|
|
128
|
+
});
|
|
73
129
|
var GoogleDriveBrowseItem = z.object({
|
|
74
130
|
id: z.string().min(1).max(256),
|
|
75
131
|
name: z.string().min(1).max(1024),
|
|
@@ -113,7 +169,11 @@ export {
|
|
|
113
169
|
GOOGLE_DRIVE_READONLY_SCOPE,
|
|
114
170
|
GoogleDriveBrowseItem,
|
|
115
171
|
GoogleDriveBrowseResponse,
|
|
172
|
+
GoogleDriveConnectionLifecycle,
|
|
173
|
+
GoogleDriveConnectionLifecycleState,
|
|
116
174
|
GoogleDriveConnectionMetadata,
|
|
175
|
+
GoogleDriveDisconnectRequest,
|
|
176
|
+
GoogleDriveLifecycleActionRequest,
|
|
117
177
|
GoogleDriveOAuthCapability,
|
|
118
178
|
GoogleDriveOAuthStartRequest,
|
|
119
179
|
GoogleDriveOAuthStartResponse,
|
package/dist/google-drive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/google-drive.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const GOOGLE_DRIVE_PROVIDER_DOMAIN = \"googleapis.com\" as const;\nexport const GOOGLE_DRIVE_FULL_SCOPE = \"https://www.googleapis.com/auth/drive\" as const;\nexport const GOOGLE_DRIVE_FILE_SCOPE = \"https://www.googleapis.com/auth/drive.file\" as const;\nexport const GOOGLE_DRIVE_METADATA_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.metadata.readonly\" as const;\nexport const GOOGLE_DRIVE_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.readonly\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_ROLE = \"google_drive_metadata\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_LABEL = \"Google Drive metadata browser\" as const;\n\nexport const GoogleDriveOAuthCapability = z.enum([\n \"picker_file_read\",\n \"source_metadata_discovery\",\n \"source_content_read\",\n \"recursive_source_sync\",\n]);\nexport type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;\n\nexport type GoogleDriveOAuthScopeDecision = {\n accessMode: \"metadata_readonly\" | \"readonly\" | null;\n capabilities: GoogleDriveOAuthCapability[];\n};\n\n/**\n * Converts exact Google OAuth grants into the Drive capabilities OpenGeni may\n * rely on. Unknown or malformed grants add no authority. In particular,\n * drive.file covers only files explicitly opened or shared with the app and\n * never authorizes arbitrary recursive descendant discovery.\n */\nexport function googleDriveOAuthScopeDecision(\n grantedScopes: readonly string[],\n): GoogleDriveOAuthScopeDecision {\n const granted = new Set(grantedScopes);\n const hasFullDrive = granted.has(GOOGLE_DRIVE_FULL_SCOPE);\n const hasSourceContentRead = hasFullDrive || granted.has(GOOGLE_DRIVE_READONLY_SCOPE);\n const hasSourceMetadataDiscovery =\n hasSourceContentRead || granted.has(GOOGLE_DRIVE_METADATA_READONLY_SCOPE);\n const hasPickerFileRead = hasSourceContentRead || granted.has(GOOGLE_DRIVE_FILE_SCOPE);\n const capabilities: GoogleDriveOAuthCapability[] = [];\n if (hasPickerFileRead) capabilities.push(\"picker_file_read\");\n if (hasSourceMetadataDiscovery) capabilities.push(\"source_metadata_discovery\");\n if (hasSourceContentRead) {\n capabilities.push(\"source_content_read\", \"recursive_source_sync\");\n }\n return {\n accessMode: hasSourceContentRead\n ? \"readonly\"\n : hasSourceMetadataDiscovery\n ? \"metadata_readonly\"\n : null,\n capabilities,\n };\n}\n\nexport function googleDriveScopesAllowCapability(\n grantedScopes: readonly string[],\n capability: GoogleDriveOAuthCapability,\n): boolean {\n return googleDriveOAuthScopeDecision(grantedScopes).capabilities.includes(capability);\n}\n\nexport const GoogleDriveTargetScope = z.enum([\"user\", \"workspace\", \"organization\"]);\nexport type GoogleDriveTargetScope = z.infer<typeof GoogleDriveTargetScope>;\n\nexport const GoogleDriveSyncCadence = z.enum([\"manual\", \"hourly\", \"daily\"]);\nexport type GoogleDriveSyncCadence = z.infer<typeof GoogleDriveSyncCadence>;\n\nexport const GoogleDriveReadPolicy = z.enum([\"allow\", \"ask\", \"block\"]);\nexport type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;\n\nexport const GoogleDriveSelectedSource = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(256).nullable().default(null),\n targetScope: GoogleDriveTargetScope,\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n selectedAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;\n\nexport const GoogleDriveConnectionMetadata = z\n .object({\n credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),\n credentialLabel: z.literal(GOOGLE_DRIVE_CREDENTIAL_LABEL),\n googlePermissionId: z.string().min(1).max(256),\n googleEmail: z.string().email().max(320),\n googleDisplayName: z.string().min(1).max(512).nullable(),\n verifiedAt: z.string().datetime({ offset: true }),\n accessMode: z.enum([\"metadata_readonly\", \"readonly\"]),\n selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),\n /** @deprecated Read `selectedSources`; retained while existing connections migrate. */\n selectedSource: GoogleDriveSelectedSource.nullable().optional(),\n })\n .passthrough();\nexport type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;\n\nexport const GoogleDriveOAuthStartRequest = z.object({\n connectionId: z.string().uuid().optional(),\n});\nexport type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;\n\nexport const GoogleDriveOAuthStartResponse = z.object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;\n\nexport const GoogleDriveBrowseItem = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n kind: z.enum([\"folder\", \"file\"]),\n driveId: z.string().min(1).max(256).nullable(),\n modifiedTime: z.string().datetime({ offset: true }).nullable(),\n size: z.string().regex(/^\\d+$/).nullable(),\n webViewLink: z.string().url().nullable(),\n});\nexport type GoogleDriveBrowseItem = z.infer<typeof GoogleDriveBrowseItem>;\n\nexport const GoogleDriveBrowseResponse = z.object({\n connection: z.lazy(() => ConnectionMetadata),\n parentId: z.string().min(1).max(256),\n current: GoogleDriveBrowseItem.nullable(),\n items: z.array(GoogleDriveBrowseItem),\n nextPageToken: z.string().min(1).max(4096).nullable(),\n incompleteSearch: z.boolean(),\n});\nexport type GoogleDriveBrowseResponse = z.infer<typeof GoogleDriveBrowseResponse>;\n\nexport const SaveGoogleDriveSourceRequest = z.object({\n sources: z\n .array(\n GoogleDriveBrowseItem.pick({\n id: true,\n name: true,\n mimeType: true,\n driveId: true,\n }),\n )\n .max(100)\n .refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {\n message: \"Google Drive sources must be unique\",\n }),\n targetScope: GoogleDriveTargetScope,\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n});\nex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;AAAA,EACX,CAAC;AAAA,EACH,aAAa;AAAA,EACb,aAAa,uBAAuB,QAAQ,QAAQ;AAAA,EACpD,YAAY,sBAAsB,QAAQ,OAAO;AACnD,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/google-drive.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const GOOGLE_DRIVE_PROVIDER_DOMAIN = \"googleapis.com\" as const;\nexport const GOOGLE_DRIVE_FULL_SCOPE = \"https://www.googleapis.com/auth/drive\" as const;\nexport const GOOGLE_DRIVE_FILE_SCOPE = \"https://www.googleapis.com/auth/drive.file\" as const;\nexport const GOOGLE_DRIVE_METADATA_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.metadata.readonly\" as const;\nexport const GOOGLE_DRIVE_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.readonly\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_ROLE = \"google_drive_metadata\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_LABEL = \"Google Drive metadata browser\" as const;\n\nexport const GoogleDriveOAuthCapability = z.enum([\n \"picker_file_read\",\n \"source_metadata_discovery\",\n \"source_content_read\",\n \"recursive_source_sync\",\n]);\nexport type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;\n\nexport type GoogleDriveOAuthScopeDecision = {\n accessMode: \"metadata_readonly\" | \"readonly\" | null;\n capabilities: GoogleDriveOAuthCapability[];\n};\n\n/**\n * Converts exact Google OAuth grants into the Drive capabilities OpenGeni may\n * rely on. Unknown or malformed grants add no authority. In particular,\n * drive.file covers only files explicitly opened or shared with the app and\n * never authorizes arbitrary recursive descendant discovery.\n */\nexport function googleDriveOAuthScopeDecision(\n grantedScopes: readonly string[],\n): GoogleDriveOAuthScopeDecision {\n const granted = new Set(grantedScopes);\n const hasFullDrive = granted.has(GOOGLE_DRIVE_FULL_SCOPE);\n const hasSourceContentRead = hasFullDrive || granted.has(GOOGLE_DRIVE_READONLY_SCOPE);\n const hasSourceMetadataDiscovery =\n hasSourceContentRead || granted.has(GOOGLE_DRIVE_METADATA_READONLY_SCOPE);\n const hasPickerFileRead = hasSourceContentRead || granted.has(GOOGLE_DRIVE_FILE_SCOPE);\n const capabilities: GoogleDriveOAuthCapability[] = [];\n if (hasPickerFileRead) capabilities.push(\"picker_file_read\");\n if (hasSourceMetadataDiscovery) capabilities.push(\"source_metadata_discovery\");\n if (hasSourceContentRead) {\n capabilities.push(\"source_content_read\", \"recursive_source_sync\");\n }\n return {\n accessMode: hasSourceContentRead\n ? \"readonly\"\n : hasSourceMetadataDiscovery\n ? \"metadata_readonly\"\n : null,\n capabilities,\n };\n}\n\nexport function googleDriveScopesAllowCapability(\n grantedScopes: readonly string[],\n capability: GoogleDriveOAuthCapability,\n): boolean {\n return googleDriveOAuthScopeDecision(grantedScopes).capabilities.includes(capability);\n}\n\nexport const GoogleDriveTargetScope = z.enum([\"user\", \"workspace\", \"organization\"]);\nexport type GoogleDriveTargetScope = z.infer<typeof GoogleDriveTargetScope>;\n\nexport const GoogleDriveSyncCadence = z.enum([\"manual\", \"hourly\", \"daily\"]);\nexport type GoogleDriveSyncCadence = z.infer<typeof GoogleDriveSyncCadence>;\n\nexport const GoogleDriveReadPolicy = z.enum([\"allow\", \"ask\", \"block\"]);\nexport type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;\n\nexport const GoogleDriveConnectionLifecycleState = z.enum([\n \"active\",\n \"paused\",\n \"token_revoked\",\n \"app_removed\",\n \"disconnected\",\n \"reconnect_required\",\n \"reconsent_required\",\n]);\nexport type GoogleDriveConnectionLifecycleState = z.infer<\n typeof GoogleDriveConnectionLifecycleState\n>;\n\nconst GoogleDriveLifecycleObservedAt = z.string().datetime({ offset: true });\nexport const GoogleDriveConnectionLifecycle = z.discriminatedUnion(\"state\", [\n z.object({\n state: z.literal(\"active\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"paused\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"token_revoked\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"app_removed\"),\n recoverable: z.literal(false),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"disconnected\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconnect_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconsent_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n]);\nexport type GoogleDriveConnectionLifecycle = z.infer<typeof GoogleDriveConnectionLifecycle>;\n\nexport const GoogleDriveSelectedSource = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(256).nullable().default(null),\n targetScope: GoogleDriveTargetScope,\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n selectedAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;\n\nexport const GoogleDriveConnectionMetadata = z\n .object({\n credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),\n credentialLabel: z.literal(GOOGLE_DRIVE_CREDENTIAL_LABEL),\n googlePermissionId: z.string().min(1).max(256),\n googleEmail: z.string().email().max(320),\n googleDisplayName: z.string().min(1).max(512).nullable(),\n verifiedAt: z.string().datetime({ offset: true }),\n accessMode: z.enum([\"metadata_readonly\", \"readonly\"]),\n lifecycle: GoogleDriveConnectionLifecycle.optional(),\n selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),\n /** @deprecated Read `selectedSources`; retained while existing connections migrate. */\n selectedSource: GoogleDriveSelectedSource.nullable().optional(),\n })\n .passthrough();\nexport type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;\n\nexport const GoogleDriveOAuthStartRequest = z.object({\n connectionId: z.string().uuid().optional(),\n});\nexport type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;\n\nexport const GoogleDriveOAuthStartResponse = z.object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;\n\nexport const GoogleDriveLifecycleActionRequest = z.object({\n action: z.enum([\"pause\", \"resume\"]),\n expectedVersion: z.number().int().positive(),\n});\nexport type GoogleDriveLifecycleActionRequest = z.infer<typeof GoogleDriveLifecycleActionRequest>;\n\nexport const GoogleDriveDisconnectRequest = z.object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n});\nexport type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;\n\nexport const GoogleDriveBrowseItem = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n kind: z.enum([\"folder\", \"file\"]),\n driveId: z.string().min(1).max(256).nullable(),\n modifiedTime: z.string().datetime({ offset: true }).nullable(),\n size: z.string().regex(/^\\d+$/).nullable(),\n webViewLink: z.string().url().nullable(),\n});\nexport type GoogleDriveBrowseItem = z.infer<typeof GoogleDriveBrowseItem>;\n\nexport const GoogleDriveBrowseResponse = z.object({\n connection: z.lazy(() => ConnectionMetadata),\n parentId: z.string().min(1).max(256),\n current: GoogleDriveBrowseItem.nullable(),\n items: z.array(GoogleDriveBrowseItem),\n nextPageToken: z.string().min(1).max(4096).nullable(),\n incompleteSearch: z.boolean(),\n});\nexport type GoogleDriveBrowseResponse = z.infer<typeof GoogleDriveBrowseResponse>;\n\nexport const SaveGoogleDriveSourceRequest = z.object({\n sources: z\n .array(\n GoogleDriveBrowseItem.pick({\n id: true,\n name: true,\n mimeType: true,\n driveId: true,\n }),\n )\n .max(100)\n .refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {\n message: \"Google Drive sources must be unique\",\n }),\n targetScope: GoogleDriveTargetScope,\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n});\nexport type SaveGoogleDriveSourceRequest = z.infer<typeof SaveGoogleDriveSourceRequest>;\n"],"mappings":";;;;;;AAAA,SAAS,SAAS;AAIX,IAAM,+BAA+B;AACrC,IAAM,0BAA0B;AAChC,IAAM,0BAA0B;AAChC,IAAM,uCACX;AACK,IAAM,8BACX;AACK,IAAM,+BAA+B;AACrC,IAAM,gCAAgC;AAEtC,IAAM,6BAA6B,EAAE,KAAK;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAcM,SAAS,8BACd,eAC+B;AAC/B,QAAM,UAAU,IAAI,IAAI,aAAa;AACrC,QAAM,eAAe,QAAQ,IAAI,uBAAuB;AACxD,QAAM,uBAAuB,gBAAgB,QAAQ,IAAI,2BAA2B;AACpF,QAAM,6BACJ,wBAAwB,QAAQ,IAAI,oCAAoC;AAC1E,QAAM,oBAAoB,wBAAwB,QAAQ,IAAI,uBAAuB;AACrF,QAAM,eAA6C,CAAC;AACpD,MAAI,kBAAmB,cAAa,KAAK,kBAAkB;AAC3D,MAAI,2BAA4B,cAAa,KAAK,2BAA2B;AAC7E,MAAI,sBAAsB;AACxB,iBAAa,KAAK,uBAAuB,uBAAuB;AAAA,EAClE;AACA,SAAO;AAAA,IACL,YAAY,uBACR,aACA,6BACE,sBACA;AAAA,IACN;AAAA,EACF;AACF;AAEO,SAAS,iCACd,eACA,YACS;AACT,SAAO,8BAA8B,aAAa,EAAE,aAAa,SAAS,UAAU;AACtF;AAEO,IAAM,yBAAyB,EAAE,KAAK,CAAC,QAAQ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E,KAAK,MAAM,kBAAkB;AAAA,EAC3C,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACnC,SAAS,sBAAsB,SAAS;AAAA,EACxC,OAAO,EAAE,MAAM,qBAAqB;AAAA,EACpC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE,SAAS;AAAA,EACpD,kBAAkB,EAAE,QAAQ;AAC9B,CAAC;AAGM,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,SAAS,EACN;AAAA,IACC,sBAAsB,KAAK;AAAA,MACzB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,IACX,CAAC;AAAA,EACH,EACC,IAAI,GAAG,EACP,OAAO,CAAC,YAAY,IAAI,IAAI,QAAQ,IAAI,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,SAAS,QAAQ,QAAQ;AAAA,IACxF,SAAS;AAAA,EACX,CAAC;AAAA,EACH,aAAa;AAAA,EACb,aAAa,uBAAuB,QAAQ,QAAQ;AAAA,EACpD,YAAY,sBAAsB,QAAQ,OAAO;AACnD,CAAC;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2696,6 +2696,13 @@ export declare const FileResourceRef: z.ZodObject<{
|
|
|
2696
2696
|
mountPath: z.ZodOptional<z.ZodString>;
|
|
2697
2697
|
}, z.core.$strip>;
|
|
2698
2698
|
export type FileResourceRef = z.infer<typeof FileResourceRef>;
|
|
2699
|
+
/**
|
|
2700
|
+
* Private durable metadata carried on user history items. It contains only
|
|
2701
|
+
* stable file references, never file bytes, and is removed before model wire
|
|
2702
|
+
* serialization. Keeping the references beside the message lets a later turn
|
|
2703
|
+
* reconstruct the same typed attachment input after a model switch or retry.
|
|
2704
|
+
*/
|
|
2705
|
+
export declare const MODEL_ATTACHMENT_REFS_FIELD: "opengeni_attachment_refs";
|
|
2699
2706
|
export declare const ResourceRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2700
2707
|
kind: z.ZodLiteral<"repository">;
|
|
2701
2708
|
uri: z.ZodString;
|
|
@@ -2748,6 +2755,7 @@ export declare function resourceMountPathCollisionKey(path: string): string;
|
|
|
2748
2755
|
*/
|
|
2749
2756
|
export declare function defaultRepositoryMountPath(uri: string): string;
|
|
2750
2757
|
/** Resolve the exact mount used by API normalization, manifests, and clone hooks. */
|
|
2758
|
+
export declare const DEFAULT_FILE_RESOURCE_MOUNT_ROOT: ".opengeni/files";
|
|
2751
2759
|
export declare function resourceMountPath(resource: ResourceRef): string;
|
|
2752
2760
|
/** Fail before sandbox execution when two resources share a portable path. */
|
|
2753
2761
|
export declare function assertUniqueResourceMountPaths(resources: readonly ResourceRef[]): void;
|
|
@@ -2856,6 +2864,12 @@ export declare const DocumentSearchMode: z.ZodEnum<{
|
|
|
2856
2864
|
vector: "vector";
|
|
2857
2865
|
}>;
|
|
2858
2866
|
export type DocumentSearchMode = z.infer<typeof DocumentSearchMode>;
|
|
2867
|
+
export declare const DocumentAuthorityKind: z.ZodEnum<{
|
|
2868
|
+
organization: "organization";
|
|
2869
|
+
personal: "personal";
|
|
2870
|
+
workspace: "workspace";
|
|
2871
|
+
}>;
|
|
2872
|
+
export type DocumentAuthorityKind = z.infer<typeof DocumentAuthorityKind>;
|
|
2859
2873
|
export declare const DocumentVisibility: z.ZodEnum<{
|
|
2860
2874
|
private: "private";
|
|
2861
2875
|
workspace: "workspace";
|
|
@@ -2920,6 +2934,13 @@ export declare const Document: z.ZodObject<{
|
|
|
2920
2934
|
sourceUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
2921
2935
|
sourceVersion: z.ZodNullable<z.ZodString>;
|
|
2922
2936
|
aclTags: z.ZodArray<z.ZodString>;
|
|
2937
|
+
authorityKind: z.ZodEnum<{
|
|
2938
|
+
organization: "organization";
|
|
2939
|
+
personal: "personal";
|
|
2940
|
+
workspace: "workspace";
|
|
2941
|
+
}>;
|
|
2942
|
+
authorityWorkspaceId: z.ZodNullable<z.ZodString>;
|
|
2943
|
+
authoritySubjectId: z.ZodNullable<z.ZodString>;
|
|
2923
2944
|
visibility: z.ZodEnum<{
|
|
2924
2945
|
private: "private";
|
|
2925
2946
|
workspace: "workspace";
|
|
@@ -2983,8 +3004,62 @@ export declare const DocumentSearchResult: z.ZodObject<{
|
|
|
2983
3004
|
sourceUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
2984
3005
|
sourceVersion: z.ZodNullable<z.ZodString>;
|
|
2985
3006
|
aclTags: z.ZodArray<z.ZodString>;
|
|
3007
|
+
authorityKind: z.ZodEnum<{
|
|
3008
|
+
organization: "organization";
|
|
3009
|
+
personal: "personal";
|
|
3010
|
+
workspace: "workspace";
|
|
3011
|
+
}>;
|
|
3012
|
+
authorityWorkspaceId: z.ZodNullable<z.ZodString>;
|
|
3013
|
+
authoritySubjectId: z.ZodNullable<z.ZodString>;
|
|
2986
3014
|
}, z.core.$strip>;
|
|
2987
3015
|
export type DocumentSearchResult = z.infer<typeof DocumentSearchResult>;
|
|
3016
|
+
export declare const DocumentSearchResponse: z.ZodObject<{
|
|
3017
|
+
results: z.ZodArray<z.ZodObject<{
|
|
3018
|
+
chunkId: z.ZodString;
|
|
3019
|
+
workspaceId: z.ZodString;
|
|
3020
|
+
documentId: z.ZodString;
|
|
3021
|
+
baseId: z.ZodString;
|
|
3022
|
+
fileId: z.ZodString;
|
|
3023
|
+
title: z.ZodString;
|
|
3024
|
+
text: z.ZodString;
|
|
3025
|
+
score: z.ZodNumber;
|
|
3026
|
+
matchType: z.ZodEnum<{
|
|
3027
|
+
hybrid: "hybrid";
|
|
3028
|
+
keyword: "keyword";
|
|
3029
|
+
vector: "vector";
|
|
3030
|
+
}>;
|
|
3031
|
+
vectorScore: z.ZodNullable<z.ZodNumber>;
|
|
3032
|
+
keywordScore: z.ZodNullable<z.ZodNumber>;
|
|
3033
|
+
chunkIndex: z.ZodNumber;
|
|
3034
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3035
|
+
sourceKind: z.ZodEnum<{
|
|
3036
|
+
chat: "chat";
|
|
3037
|
+
document: "document";
|
|
3038
|
+
email: "email";
|
|
3039
|
+
manual_upload: "manual_upload";
|
|
3040
|
+
meeting_transcript: "meeting_transcript";
|
|
3041
|
+
other: "other";
|
|
3042
|
+
repository: "repository";
|
|
3043
|
+
web: "web";
|
|
3044
|
+
}>;
|
|
3045
|
+
sourceUri: z.ZodNullable<z.ZodString>;
|
|
3046
|
+
sourceExternalId: z.ZodNullable<z.ZodString>;
|
|
3047
|
+
sourceTitle: z.ZodNullable<z.ZodString>;
|
|
3048
|
+
sourceAuthor: z.ZodNullable<z.ZodString>;
|
|
3049
|
+
sourceCreatedAt: z.ZodNullable<z.ZodString>;
|
|
3050
|
+
sourceUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
3051
|
+
sourceVersion: z.ZodNullable<z.ZodString>;
|
|
3052
|
+
aclTags: z.ZodArray<z.ZodString>;
|
|
3053
|
+
authorityKind: z.ZodEnum<{
|
|
3054
|
+
organization: "organization";
|
|
3055
|
+
personal: "personal";
|
|
3056
|
+
workspace: "workspace";
|
|
3057
|
+
}>;
|
|
3058
|
+
authorityWorkspaceId: z.ZodNullable<z.ZodString>;
|
|
3059
|
+
authoritySubjectId: z.ZodNullable<z.ZodString>;
|
|
3060
|
+
}, z.core.$strip>>;
|
|
3061
|
+
}, z.core.$strip>;
|
|
3062
|
+
export type DocumentSearchResponse = z.infer<typeof DocumentSearchResponse>;
|
|
2988
3063
|
export declare const CreateDocumentBaseRequest: z.ZodObject<{
|
|
2989
3064
|
name: z.ZodString;
|
|
2990
3065
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -3011,6 +3086,11 @@ export declare const AddDocumentRequest: z.ZodObject<{
|
|
|
3011
3086
|
sourceUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
3012
3087
|
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
3013
3088
|
aclTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3089
|
+
authorityKind: z.ZodOptional<z.ZodEnum<{
|
|
3090
|
+
organization: "organization";
|
|
3091
|
+
personal: "personal";
|
|
3092
|
+
workspace: "workspace";
|
|
3093
|
+
}>>;
|
|
3014
3094
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
3015
3095
|
private: "private";
|
|
3016
3096
|
workspace: "workspace";
|
|
@@ -3023,6 +3103,11 @@ export declare const CreateKnowledgeDropRequest: z.ZodObject<{
|
|
|
3023
3103
|
fileId: z.ZodOptional<z.ZodString>;
|
|
3024
3104
|
filename: z.ZodOptional<z.ZodString>;
|
|
3025
3105
|
title: z.ZodOptional<z.ZodString>;
|
|
3106
|
+
authorityKind: z.ZodOptional<z.ZodEnum<{
|
|
3107
|
+
organization: "organization";
|
|
3108
|
+
personal: "personal";
|
|
3109
|
+
workspace: "workspace";
|
|
3110
|
+
}>>;
|
|
3026
3111
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
3027
3112
|
private: "private";
|
|
3028
3113
|
workspace: "workspace";
|
|
@@ -12500,8 +12585,6 @@ export declare const HumanInputQuestion: z.ZodObject<{
|
|
|
12500
12585
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
12501
12586
|
allowOther: z.ZodDefault<z.ZodBoolean>;
|
|
12502
12587
|
validation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12503
|
-
minLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12504
|
-
maxLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12505
12588
|
minSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12506
12589
|
maxSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12507
12590
|
}, z.core.$strip>>>;
|
|
@@ -12534,8 +12617,6 @@ export declare const RequestHumanInputToolInput: z.ZodObject<{
|
|
|
12534
12617
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
12535
12618
|
allowOther: z.ZodDefault<z.ZodBoolean>;
|
|
12536
12619
|
validation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12537
|
-
minLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12538
|
-
maxLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12539
12620
|
minSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12540
12621
|
maxSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12541
12622
|
}, z.core.$strip>>>;
|
|
@@ -12609,8 +12690,6 @@ export declare const SessionHumanInputRequest: z.ZodObject<{
|
|
|
12609
12690
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
12610
12691
|
allowOther: z.ZodDefault<z.ZodBoolean>;
|
|
12611
12692
|
validation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12612
|
-
minLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12613
|
-
maxLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12614
12693
|
minSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12615
12694
|
maxSelections: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12616
12695
|
}, z.core.$strip>>>;
|
|
@@ -14034,6 +14113,7 @@ export declare const ModelCapabilitiesV1: z.ZodObject<{
|
|
|
14034
14113
|
image: "image";
|
|
14035
14114
|
text: "text";
|
|
14036
14115
|
}>>;
|
|
14116
|
+
inputFileMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14037
14117
|
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
14038
14118
|
audio: "audio";
|
|
14039
14119
|
image: "image";
|
|
@@ -14404,6 +14484,7 @@ export declare const ClientModel: z.ZodObject<{
|
|
|
14404
14484
|
image: "image";
|
|
14405
14485
|
text: "text";
|
|
14406
14486
|
}>>;
|
|
14487
|
+
inputFileMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14407
14488
|
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
14408
14489
|
audio: "audio";
|
|
14409
14490
|
image: "image";
|
|
@@ -14653,6 +14734,7 @@ export declare const WorkspaceModelCatalogModel: z.ZodObject<{
|
|
|
14653
14734
|
image: "image";
|
|
14654
14735
|
text: "text";
|
|
14655
14736
|
}>>;
|
|
14737
|
+
inputFileMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14656
14738
|
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
14657
14739
|
audio: "audio";
|
|
14658
14740
|
image: "image";
|
|
@@ -14901,6 +14983,7 @@ export declare const WorkspaceModelCatalogResponse: z.ZodObject<{
|
|
|
14901
14983
|
image: "image";
|
|
14902
14984
|
text: "text";
|
|
14903
14985
|
}>>;
|
|
14986
|
+
inputFileMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14904
14987
|
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
14905
14988
|
audio: "audio";
|
|
14906
14989
|
image: "image";
|
|
@@ -15167,6 +15250,7 @@ export declare const ClientConfig: z.ZodObject<{
|
|
|
15167
15250
|
image: "image";
|
|
15168
15251
|
text: "text";
|
|
15169
15252
|
}>>;
|
|
15253
|
+
inputFileMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15170
15254
|
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
15171
15255
|
audio: "audio";
|
|
15172
15256
|
image: "image";
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,7 @@ import {
|
|
|
88
88
|
CreateWorkspaceRequest,
|
|
89
89
|
CredentialAuthNeededPayload,
|
|
90
90
|
DEFAULT_CODEX_FLEET_POLICY_V1,
|
|
91
|
+
DEFAULT_FILE_RESOURCE_MOUNT_ROOT,
|
|
91
92
|
DEFAULT_FIRST_PARTY_MCP_PERMISSIONS,
|
|
92
93
|
DEFAULT_FIRST_PARTY_MCP_TOOLS,
|
|
93
94
|
DEFAULT_WORKSPACE_SLACK_REACTION_SUMMON_SETTINGS,
|
|
@@ -110,11 +111,13 @@ import {
|
|
|
110
111
|
DeviceEnrollmentState,
|
|
111
112
|
DiscoverMcpCapabilitiesResponse,
|
|
112
113
|
Document,
|
|
114
|
+
DocumentAuthorityKind,
|
|
113
115
|
DocumentBase,
|
|
114
116
|
DocumentCuration,
|
|
115
117
|
DocumentCurationStatus,
|
|
116
118
|
DocumentSearchMode,
|
|
117
119
|
DocumentSearchRequest,
|
|
120
|
+
DocumentSearchResponse,
|
|
118
121
|
DocumentSearchResult,
|
|
119
122
|
DocumentStatus,
|
|
120
123
|
DocumentVisibility,
|
|
@@ -250,6 +253,7 @@ import {
|
|
|
250
253
|
ListEnrollmentsResponse,
|
|
251
254
|
ListWorkspaceMembersResponse,
|
|
252
255
|
MAX_NESTED_AGENT_DEPTH,
|
|
256
|
+
MODEL_ATTACHMENT_REFS_FIELD,
|
|
253
257
|
MachineKind,
|
|
254
258
|
MachineMetricsSeriesResponse,
|
|
255
259
|
MachineState,
|
|
@@ -618,6 +622,7 @@ import {
|
|
|
618
622
|
WorkspaceInstructionPolicyKind,
|
|
619
623
|
WorkspaceInstructionPolicyListQuery,
|
|
620
624
|
WorkspaceInstructionPolicyListResponse,
|
|
625
|
+
WorkspaceInstructionPolicyOperationReuseResponse,
|
|
621
626
|
WorkspaceInstructionPolicyProvenance,
|
|
622
627
|
WorkspaceInstructionPolicyProvenanceSource,
|
|
623
628
|
WorkspaceInstructionPolicyRevision,
|
|
@@ -645,9 +650,11 @@ import {
|
|
|
645
650
|
WorkspaceSettingsSchema,
|
|
646
651
|
WorkspaceSlackReactionChannelPolicy,
|
|
647
652
|
WorkspaceSlackReactionSummonSettings,
|
|
653
|
+
WorkspaceStateAttemptGovernance,
|
|
648
654
|
WorkspaceStateDocumentStatusCounts,
|
|
649
655
|
WorkspaceStateGap,
|
|
650
656
|
WorkspaceStateGapCode,
|
|
657
|
+
WorkspaceStateGovernanceDriftStatus,
|
|
651
658
|
WorkspaceStateKnowledge,
|
|
652
659
|
WorkspaceStateKnowledgeAvailable,
|
|
653
660
|
WorkspaceStateKnowledgeBase,
|
|
@@ -657,6 +664,7 @@ import {
|
|
|
657
664
|
WorkspaceStatePolicy,
|
|
658
665
|
WorkspaceStatePolicyHead,
|
|
659
666
|
WorkspaceStatePolicyRevisionSummary,
|
|
667
|
+
WorkspaceStateQuery,
|
|
660
668
|
WorkspaceStateResponse,
|
|
661
669
|
WorkspaceStateSourceKindCounts,
|
|
662
670
|
WorkspaceStateTopic,
|
|
@@ -743,7 +751,7 @@ import {
|
|
|
743
751
|
verifyStreamToken,
|
|
744
752
|
workspaceControlUtf8Bytes,
|
|
745
753
|
workspaceSlackReactionChannelAllowed
|
|
746
|
-
} from "./chunk-
|
|
754
|
+
} from "./chunk-JRHJTJVH.js";
|
|
747
755
|
import {
|
|
748
756
|
OPENGENI_MANAGED_PUBLIC_BASE_URL,
|
|
749
757
|
OPENGENI_SLACK_BOT_EVENTS,
|
|
@@ -847,6 +855,7 @@ export {
|
|
|
847
855
|
CreateWorkspaceRequest,
|
|
848
856
|
CredentialAuthNeededPayload,
|
|
849
857
|
DEFAULT_CODEX_FLEET_POLICY_V1,
|
|
858
|
+
DEFAULT_FILE_RESOURCE_MOUNT_ROOT,
|
|
850
859
|
DEFAULT_FIRST_PARTY_MCP_PERMISSIONS,
|
|
851
860
|
DEFAULT_FIRST_PARTY_MCP_TOOLS,
|
|
852
861
|
DEFAULT_WORKSPACE_SLACK_REACTION_SUMMON_SETTINGS,
|
|
@@ -869,11 +878,13 @@ export {
|
|
|
869
878
|
DeviceEnrollmentState,
|
|
870
879
|
DiscoverMcpCapabilitiesResponse,
|
|
871
880
|
Document,
|
|
881
|
+
DocumentAuthorityKind,
|
|
872
882
|
DocumentBase,
|
|
873
883
|
DocumentCuration,
|
|
874
884
|
DocumentCurationStatus,
|
|
875
885
|
DocumentSearchMode,
|
|
876
886
|
DocumentSearchRequest,
|
|
887
|
+
DocumentSearchResponse,
|
|
877
888
|
DocumentSearchResult,
|
|
878
889
|
DocumentStatus,
|
|
879
890
|
DocumentVisibility,
|
|
@@ -1009,6 +1020,7 @@ export {
|
|
|
1009
1020
|
ListEnrollmentsResponse,
|
|
1010
1021
|
ListWorkspaceMembersResponse,
|
|
1011
1022
|
MAX_NESTED_AGENT_DEPTH,
|
|
1023
|
+
MODEL_ATTACHMENT_REFS_FIELD,
|
|
1012
1024
|
MachineKind,
|
|
1013
1025
|
MachineMetricsSeriesResponse,
|
|
1014
1026
|
MachineState,
|
|
@@ -1384,6 +1396,7 @@ export {
|
|
|
1384
1396
|
WorkspaceInstructionPolicyKind,
|
|
1385
1397
|
WorkspaceInstructionPolicyListQuery,
|
|
1386
1398
|
WorkspaceInstructionPolicyListResponse,
|
|
1399
|
+
WorkspaceInstructionPolicyOperationReuseResponse,
|
|
1387
1400
|
WorkspaceInstructionPolicyProvenance,
|
|
1388
1401
|
WorkspaceInstructionPolicyProvenanceSource,
|
|
1389
1402
|
WorkspaceInstructionPolicyRevision,
|
|
@@ -1411,9 +1424,11 @@ export {
|
|
|
1411
1424
|
WorkspaceSettingsSchema,
|
|
1412
1425
|
WorkspaceSlackReactionChannelPolicy,
|
|
1413
1426
|
WorkspaceSlackReactionSummonSettings,
|
|
1427
|
+
WorkspaceStateAttemptGovernance,
|
|
1414
1428
|
WorkspaceStateDocumentStatusCounts,
|
|
1415
1429
|
WorkspaceStateGap,
|
|
1416
1430
|
WorkspaceStateGapCode,
|
|
1431
|
+
WorkspaceStateGovernanceDriftStatus,
|
|
1417
1432
|
WorkspaceStateKnowledge,
|
|
1418
1433
|
WorkspaceStateKnowledgeAvailable,
|
|
1419
1434
|
WorkspaceStateKnowledgeBase,
|
|
@@ -1423,6 +1438,7 @@ export {
|
|
|
1423
1438
|
WorkspaceStatePolicy,
|
|
1424
1439
|
WorkspaceStatePolicyHead,
|
|
1425
1440
|
WorkspaceStatePolicyRevisionSummary,
|
|
1441
|
+
WorkspaceStateQuery,
|
|
1426
1442
|
WorkspaceStateResponse,
|
|
1427
1443
|
WorkspaceStateSourceKindCounts,
|
|
1428
1444
|
WorkspaceStateTopic,
|
|
@@ -89,6 +89,7 @@ export declare const WorkspaceInstructionPolicyRevision: z.ZodObject<{
|
|
|
89
89
|
id: z.ZodString;
|
|
90
90
|
revision: z.ZodNumber;
|
|
91
91
|
contentHash: z.ZodString;
|
|
92
|
+
operationId: z.ZodString;
|
|
92
93
|
accountId: z.ZodString;
|
|
93
94
|
workspaceId: z.ZodString;
|
|
94
95
|
content: z.ZodString;
|
|
@@ -285,6 +286,7 @@ export declare const WorkspaceInstructionPolicyActivationEvent: z.ZodObject<{
|
|
|
285
286
|
}>;
|
|
286
287
|
roleKey: z.ZodNullable<z.ZodString>;
|
|
287
288
|
id: z.ZodString;
|
|
289
|
+
operationId: z.ZodString;
|
|
288
290
|
accountId: z.ZodString;
|
|
289
291
|
workspaceId: z.ZodString;
|
|
290
292
|
type: z.ZodEnum<{
|
|
@@ -308,6 +310,7 @@ export declare const WorkspaceInstructionPolicyActivationEvent: z.ZodObject<{
|
|
|
308
310
|
}, z.core.$strip>;
|
|
309
311
|
export type WorkspaceInstructionPolicyActivationEvent = z.infer<typeof WorkspaceInstructionPolicyActivationEvent>;
|
|
310
312
|
export declare const CreateWorkspaceInstructionPolicyDraftRequest: z.ZodObject<{
|
|
313
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
311
314
|
kind: z.ZodEnum<{
|
|
312
315
|
charter: "charter";
|
|
313
316
|
policy: "policy";
|
|
@@ -328,6 +331,7 @@ export declare const CreateWorkspaceInstructionPolicyDraftRequest: z.ZodObject<{
|
|
|
328
331
|
}, z.core.$strip>;
|
|
329
332
|
export type CreateWorkspaceInstructionPolicyDraftRequest = z.infer<typeof CreateWorkspaceInstructionPolicyDraftRequest>;
|
|
330
333
|
export declare const ImportLegacyWorkspaceInstructionPolicyDraftRequest: z.ZodObject<{
|
|
334
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
331
335
|
supersedesRevisionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
332
336
|
}, z.core.$strict>;
|
|
333
337
|
export type ImportLegacyWorkspaceInstructionPolicyDraftRequest = z.infer<typeof ImportLegacyWorkspaceInstructionPolicyDraftRequest>;
|
|
@@ -359,6 +363,7 @@ export declare const WorkspaceInstructionPolicyListResponse: z.ZodObject<{
|
|
|
359
363
|
id: z.ZodString;
|
|
360
364
|
revision: z.ZodNumber;
|
|
361
365
|
contentHash: z.ZodString;
|
|
366
|
+
operationId: z.ZodString;
|
|
362
367
|
accountId: z.ZodString;
|
|
363
368
|
workspaceId: z.ZodString;
|
|
364
369
|
content: z.ZodString;
|
|
@@ -403,6 +408,7 @@ export declare const WorkspaceInstructionPolicyListResponse: z.ZodObject<{
|
|
|
403
408
|
}>;
|
|
404
409
|
roleKey: z.ZodNullable<z.ZodString>;
|
|
405
410
|
id: z.ZodString;
|
|
411
|
+
operationId: z.ZodString;
|
|
406
412
|
accountId: z.ZodString;
|
|
407
413
|
workspaceId: z.ZodString;
|
|
408
414
|
type: z.ZodEnum<{
|
|
@@ -446,6 +452,7 @@ export declare const WorkspaceInstructionPolicyDiffResponse: z.ZodObject<{
|
|
|
446
452
|
id: z.ZodString;
|
|
447
453
|
revision: z.ZodNumber;
|
|
448
454
|
contentHash: z.ZodString;
|
|
455
|
+
operationId: z.ZodString;
|
|
449
456
|
accountId: z.ZodString;
|
|
450
457
|
workspaceId: z.ZodString;
|
|
451
458
|
content: z.ZodString;
|
|
@@ -475,6 +482,7 @@ export declare const WorkspaceInstructionPolicyDiffResponse: z.ZodObject<{
|
|
|
475
482
|
id: z.ZodString;
|
|
476
483
|
revision: z.ZodNumber;
|
|
477
484
|
contentHash: z.ZodString;
|
|
485
|
+
operationId: z.ZodString;
|
|
478
486
|
accountId: z.ZodString;
|
|
479
487
|
workspaceId: z.ZodString;
|
|
480
488
|
content: z.ZodString;
|
|
@@ -496,13 +504,17 @@ export declare const WorkspaceInstructionPolicyDiffResponse: z.ZodObject<{
|
|
|
496
504
|
}, z.core.$strip>;
|
|
497
505
|
export type WorkspaceInstructionPolicyDiffResponse = z.infer<typeof WorkspaceInstructionPolicyDiffResponse>;
|
|
498
506
|
export declare const ActivateWorkspaceInstructionPolicyRequest: z.ZodObject<{
|
|
507
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
499
508
|
expectedCurrentRevisionId: z.ZodNullable<z.ZodString>;
|
|
509
|
+
expectedActivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
500
510
|
reason: z.ZodString;
|
|
501
511
|
}, z.core.$strip>;
|
|
502
512
|
export type ActivateWorkspaceInstructionPolicyRequest = z.infer<typeof ActivateWorkspaceInstructionPolicyRequest>;
|
|
503
513
|
export declare const RollbackWorkspaceInstructionPolicyRequest: z.ZodObject<{
|
|
514
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
504
515
|
targetRevisionId: z.ZodString;
|
|
505
516
|
expectedCurrentRevisionId: z.ZodString;
|
|
517
|
+
expectedActivationVersion: z.ZodOptional<z.ZodNumber>;
|
|
506
518
|
reason: z.ZodString;
|
|
507
519
|
}, z.core.$strip>;
|
|
508
520
|
export type RollbackWorkspaceInstructionPolicyRequest = z.infer<typeof RollbackWorkspaceInstructionPolicyRequest>;
|
|
@@ -535,6 +547,7 @@ export declare const WorkspaceInstructionPolicyActivationResponse: z.ZodObject<{
|
|
|
535
547
|
}>;
|
|
536
548
|
roleKey: z.ZodNullable<z.ZodString>;
|
|
537
549
|
id: z.ZodString;
|
|
550
|
+
operationId: z.ZodString;
|
|
538
551
|
accountId: z.ZodString;
|
|
539
552
|
workspaceId: z.ZodString;
|
|
540
553
|
type: z.ZodEnum<{
|
|
@@ -580,3 +593,8 @@ export declare const WorkspaceInstructionPolicyConflictResponse: z.ZodObject<{
|
|
|
580
593
|
}, z.core.$strip>>;
|
|
581
594
|
}, z.core.$strip>;
|
|
582
595
|
export type WorkspaceInstructionPolicyConflictResponse = z.infer<typeof WorkspaceInstructionPolicyConflictResponse>;
|
|
596
|
+
export declare const WorkspaceInstructionPolicyOperationReuseResponse: z.ZodObject<{
|
|
597
|
+
code: z.ZodLiteral<"WORKSPACE_INSTRUCTION_POLICY_OPERATION_REUSED">;
|
|
598
|
+
message: z.ZodString;
|
|
599
|
+
}, z.core.$strip>;
|
|
600
|
+
export type WorkspaceInstructionPolicyOperationReuseResponse = z.infer<typeof WorkspaceInstructionPolicyOperationReuseResponse>;
|