@opengeni/config 1.0.4 → 1.1.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ export declare const McpServerConnectionRefSchema: z.ZodObject<{
|
|
|
60
60
|
kind: z.ZodLiteral<"repository">;
|
|
61
61
|
}, z.core.$strict>>>;
|
|
62
62
|
authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
63
|
+
hostBinding: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
bindingId: z.ZodString;
|
|
65
|
+
generation: z.ZodNumber;
|
|
66
|
+
}, z.core.$strict>>;
|
|
63
67
|
subjectScope: z.ZodOptional<z.ZodEnum<{
|
|
64
68
|
subject: "subject";
|
|
65
69
|
workspace: "workspace";
|
|
@@ -506,6 +510,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
506
510
|
goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
507
511
|
childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
508
512
|
hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
513
|
+
hostMcpCredentialResolversJson: z.ZodOptional<z.ZodString>;
|
|
509
514
|
slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
510
515
|
agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
511
516
|
contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -867,6 +872,10 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
867
872
|
kind: z.ZodLiteral<"repository">;
|
|
868
873
|
}, z.core.$strict>>>;
|
|
869
874
|
authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
875
|
+
hostBinding: z.ZodOptional<z.ZodObject<{
|
|
876
|
+
bindingId: z.ZodString;
|
|
877
|
+
generation: z.ZodNumber;
|
|
878
|
+
}, z.core.$strict>>;
|
|
870
879
|
subjectScope: z.ZodOptional<z.ZodEnum<{
|
|
871
880
|
subject: "subject";
|
|
872
881
|
workspace: "workspace";
|
package/dist/index.js
CHANGED
|
@@ -182,6 +182,7 @@ var McpServerConnectionRefSchema = z.object({
|
|
|
182
182
|
}
|
|
183
183
|
}).optional(),
|
|
184
184
|
authoritySource: z.literal("host").optional(),
|
|
185
|
+
hostBinding: z.object({ bindingId: z.string().uuid(), generation: z.number().int().positive().safe() }).strict().optional(),
|
|
185
186
|
subjectScope: z.enum(["workspace", "subject"]).optional()
|
|
186
187
|
}).strict().superRefine((reference, context) => {
|
|
187
188
|
if (reference.authoritySource === "host" && !reference.connectionId) {
|
|
@@ -191,6 +192,12 @@ var McpServerConnectionRefSchema = z.object({
|
|
|
191
192
|
path: ["connectionId"]
|
|
192
193
|
});
|
|
193
194
|
}
|
|
195
|
+
if (reference.hostBinding && reference.authoritySource !== "host")
|
|
196
|
+
context.addIssue({
|
|
197
|
+
code: "custom",
|
|
198
|
+
path: ["hostBinding"],
|
|
199
|
+
message: "Durable binding requires host authority"
|
|
200
|
+
});
|
|
194
201
|
if (!reference.selectedResources) return;
|
|
195
202
|
if (!reference.connectionId) {
|
|
196
203
|
context.addIssue({
|
|
@@ -410,6 +417,9 @@ var SettingsSchema = z.object({
|
|
|
410
417
|
// separate compatibility lane for already-persisted embedding integrations.
|
|
411
418
|
// Env: OPENGENI_HOST_MCP_AUTHORITY_SOURCE_ADMISSION_ENABLED.
|
|
412
419
|
hostMcpAuthoritySourceAdmissionEnabled: EnvBoolean.default(false),
|
|
420
|
+
// Server-owned per-organization remote MCP resolver configuration. Optional;
|
|
421
|
+
// inline credentials and native provider OAuth do not require this service.
|
|
422
|
+
hostMcpCredentialResolversJson: z.string().optional(),
|
|
413
423
|
// Per-channel and per-DM Slack workspace routing. Default ON. A channel does
|
|
414
424
|
// not count a personal workspace as a candidate, so an organization with one
|
|
415
425
|
// shared workspace resolves it as the sole candidate and never asks; the
|
|
@@ -2275,6 +2285,7 @@ function getSettings(source = process.env) {
|
|
|
2275
2285
|
hostMcpAuthoritySourceAdmissionEnabled: optional(
|
|
2276
2286
|
"OPENGENI_HOST_MCP_AUTHORITY_SOURCE_ADMISSION_ENABLED"
|
|
2277
2287
|
),
|
|
2288
|
+
hostMcpCredentialResolversJson: optional("OPENGENI_HOST_MCP_CREDENTIAL_RESOLVERS_JSON"),
|
|
2278
2289
|
slackWorkspaceRoutingEnabled: optional("OPENGENI_SLACK_WORKSPACE_ROUTING_ENABLED"),
|
|
2279
2290
|
agentMaxModelCallsPerTurn: optional("OPENGENI_AGENT_MAX_MODEL_CALLS_PER_TURN"),
|
|
2280
2291
|
contextWindowTokens: optional("OPENGENI_CONTEXT_WINDOW_TOKENS"),
|