@dobby.ai/dobby 0.1.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/.env.example +9 -0
- package/AGENTS.md +267 -0
- package/README.md +382 -0
- package/ROADMAP.md +34 -0
- package/config/cron.example.json +9 -0
- package/config/gateway.example.json +128 -0
- package/config/models.custom.example.json +27 -0
- package/dist/src/agent/event-forwarder.js +341 -0
- package/dist/src/agent/tests/event-forwarder.test.js +113 -0
- package/dist/src/cli/commands/config.js +243 -0
- package/dist/src/cli/commands/configure.js +61 -0
- package/dist/src/cli/commands/cron.js +288 -0
- package/dist/src/cli/commands/doctor.js +189 -0
- package/dist/src/cli/commands/extension.js +151 -0
- package/dist/src/cli/commands/init.js +286 -0
- package/dist/src/cli/commands/start.js +177 -0
- package/dist/src/cli/commands/topology.js +254 -0
- package/dist/src/cli/index.js +8 -0
- package/dist/src/cli/program.js +386 -0
- package/dist/src/cli/shared/config-io.js +223 -0
- package/dist/src/cli/shared/config-mutators.js +345 -0
- package/dist/src/cli/shared/config-path.js +207 -0
- package/dist/src/cli/shared/config-schema.js +159 -0
- package/dist/src/cli/shared/config-types.js +1 -0
- package/dist/src/cli/shared/configure-sections.js +429 -0
- package/dist/src/cli/shared/discord-config.js +12 -0
- package/dist/src/cli/shared/init-catalog.js +115 -0
- package/dist/src/cli/shared/init-models-file.js +65 -0
- package/dist/src/cli/shared/presets.js +86 -0
- package/dist/src/cli/shared/runtime.js +29 -0
- package/dist/src/cli/shared/schema-prompts.js +325 -0
- package/dist/src/cli/tests/config-command.test.js +42 -0
- package/dist/src/cli/tests/config-io.test.js +64 -0
- package/dist/src/cli/tests/config-mutators.test.js +47 -0
- package/dist/src/cli/tests/config-path.test.js +21 -0
- package/dist/src/cli/tests/discord-config.test.js +23 -0
- package/dist/src/cli/tests/doctor.test.js +107 -0
- package/dist/src/cli/tests/init-catalog.test.js +87 -0
- package/dist/src/cli/tests/presets.test.js +41 -0
- package/dist/src/cli/tests/program-options.test.js +92 -0
- package/dist/src/cli/tests/routing-config.test.js +199 -0
- package/dist/src/cli/tests/routing-legacy.test.js +191 -0
- package/dist/src/core/control-command.js +12 -0
- package/dist/src/core/dedup-store.js +92 -0
- package/dist/src/core/gateway.js +432 -0
- package/dist/src/core/routing.js +306 -0
- package/dist/src/core/runtime-registry.js +119 -0
- package/dist/src/core/tests/control-command.test.js +17 -0
- package/dist/src/core/tests/gateway-update-strategy.test.js +167 -0
- package/dist/src/core/tests/runtime-registry.test.js +116 -0
- package/dist/src/core/tests/typing-controller.test.js +103 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/typing-controller.js +88 -0
- package/dist/src/cron/config.js +114 -0
- package/dist/src/cron/schedule.js +49 -0
- package/dist/src/cron/service.js +196 -0
- package/dist/src/cron/store.js +142 -0
- package/dist/src/cron/types.js +1 -0
- package/dist/src/extension/loader.js +97 -0
- package/dist/src/extension/manager.js +269 -0
- package/dist/src/extension/manifest.js +21 -0
- package/dist/src/extension/registry.js +137 -0
- package/dist/src/main.js +6 -0
- package/dist/src/sandbox/executor.js +1 -0
- package/dist/src/sandbox/host-executor.js +111 -0
- package/docs/BOXLITE_SANDBOX_FEASIBILITY.md +175 -0
- package/docs/CRON_SCHEDULER_DESIGN.md +374 -0
- package/docs/DOCKER_SANDBOX_vs_BOXLITE.md +77 -0
- package/docs/EXTENSION_SYSTEM_ARCHITECTURE.md +119 -0
- package/docs/MVP.md +135 -0
- package/docs/RUNBOOK.md +242 -0
- package/docs/TEAMWORK_HANDOFF_DESIGN.md +440 -0
- package/package.json +43 -0
- package/plugins/connector-discord/dobby.manifest.json +18 -0
- package/plugins/connector-discord/index.js +1 -0
- package/plugins/connector-discord/package-lock.json +360 -0
- package/plugins/connector-discord/package.json +38 -0
- package/plugins/connector-discord/src/connector.ts +350 -0
- package/plugins/connector-discord/src/contribution.ts +21 -0
- package/plugins/connector-discord/src/mapper.ts +102 -0
- package/plugins/connector-discord/tsconfig.json +19 -0
- package/plugins/connector-feishu/dobby.manifest.json +18 -0
- package/plugins/connector-feishu/index.js +1 -0
- package/plugins/connector-feishu/package-lock.json +618 -0
- package/plugins/connector-feishu/package.json +38 -0
- package/plugins/connector-feishu/src/connector.ts +343 -0
- package/plugins/connector-feishu/src/contribution.ts +26 -0
- package/plugins/connector-feishu/src/mapper.ts +401 -0
- package/plugins/connector-feishu/tsconfig.json +19 -0
- package/plugins/plugin-sdk/index.d.ts +261 -0
- package/plugins/plugin-sdk/index.js +1 -0
- package/plugins/plugin-sdk/package-lock.json +12 -0
- package/plugins/plugin-sdk/package.json +22 -0
- package/plugins/provider-claude/dobby.manifest.json +17 -0
- package/plugins/provider-claude/index.js +1 -0
- package/plugins/provider-claude/package-lock.json +3398 -0
- package/plugins/provider-claude/package.json +39 -0
- package/plugins/provider-claude/src/contribution.ts +1018 -0
- package/plugins/provider-claude/tsconfig.json +19 -0
- package/plugins/provider-claude-cli/dobby.manifest.json +17 -0
- package/plugins/provider-claude-cli/index.js +1 -0
- package/plugins/provider-claude-cli/package-lock.json +2898 -0
- package/plugins/provider-claude-cli/package.json +38 -0
- package/plugins/provider-claude-cli/src/contribution.ts +1673 -0
- package/plugins/provider-claude-cli/tsconfig.json +19 -0
- package/plugins/provider-pi/dobby.manifest.json +17 -0
- package/plugins/provider-pi/index.js +1 -0
- package/plugins/provider-pi/package-lock.json +3877 -0
- package/plugins/provider-pi/package.json +40 -0
- package/plugins/provider-pi/src/contribution.ts +476 -0
- package/plugins/provider-pi/tsconfig.json +19 -0
- package/plugins/sandbox-core/boxlite.js +1 -0
- package/plugins/sandbox-core/dobby.manifest.json +17 -0
- package/plugins/sandbox-core/docker.js +1 -0
- package/plugins/sandbox-core/package-lock.json +136 -0
- package/plugins/sandbox-core/package.json +39 -0
- package/plugins/sandbox-core/src/boxlite-context.ts +2 -0
- package/plugins/sandbox-core/src/boxlite-contribution.ts +53 -0
- package/plugins/sandbox-core/src/boxlite-executor.ts +911 -0
- package/plugins/sandbox-core/src/docker-contribution.ts +43 -0
- package/plugins/sandbox-core/src/docker-executor.ts +217 -0
- package/plugins/sandbox-core/tsconfig.json +19 -0
- package/scripts/local-extensions.mjs +168 -0
- package/src/agent/event-forwarder.ts +414 -0
- package/src/cli/commands/config.ts +328 -0
- package/src/cli/commands/configure.ts +92 -0
- package/src/cli/commands/cron.ts +410 -0
- package/src/cli/commands/doctor.ts +230 -0
- package/src/cli/commands/extension.ts +205 -0
- package/src/cli/commands/init.ts +396 -0
- package/src/cli/commands/start.ts +223 -0
- package/src/cli/commands/topology.ts +383 -0
- package/src/cli/index.ts +9 -0
- package/src/cli/program.ts +465 -0
- package/src/cli/shared/config-io.ts +277 -0
- package/src/cli/shared/config-mutators.ts +440 -0
- package/src/cli/shared/config-schema.ts +228 -0
- package/src/cli/shared/config-types.ts +121 -0
- package/src/cli/shared/configure-sections.ts +551 -0
- package/src/cli/shared/discord-config.ts +14 -0
- package/src/cli/shared/init-catalog.ts +189 -0
- package/src/cli/shared/init-models-file.ts +77 -0
- package/src/cli/shared/runtime.ts +33 -0
- package/src/cli/shared/schema-prompts.ts +414 -0
- package/src/cli/tests/config-command.test.ts +56 -0
- package/src/cli/tests/config-io.test.ts +92 -0
- package/src/cli/tests/config-mutators.test.ts +59 -0
- package/src/cli/tests/doctor.test.ts +120 -0
- package/src/cli/tests/init-catalog.test.ts +96 -0
- package/src/cli/tests/program-options.test.ts +113 -0
- package/src/cli/tests/routing-config.test.ts +209 -0
- package/src/core/control-command.ts +12 -0
- package/src/core/dedup-store.ts +103 -0
- package/src/core/gateway.ts +607 -0
- package/src/core/routing.ts +379 -0
- package/src/core/runtime-registry.ts +141 -0
- package/src/core/tests/control-command.test.ts +20 -0
- package/src/core/tests/runtime-registry.test.ts +140 -0
- package/src/core/tests/typing-controller.test.ts +129 -0
- package/src/core/types.ts +318 -0
- package/src/core/typing-controller.ts +119 -0
- package/src/cron/config.ts +154 -0
- package/src/cron/schedule.ts +61 -0
- package/src/cron/service.ts +249 -0
- package/src/cron/store.ts +155 -0
- package/src/cron/types.ts +60 -0
- package/src/extension/loader.ts +145 -0
- package/src/extension/manager.ts +355 -0
- package/src/extension/manifest.ts +26 -0
- package/src/extension/registry.ts +229 -0
- package/src/main.ts +8 -0
- package/src/sandbox/executor.ts +44 -0
- package/src/sandbox/host-executor.ts +118 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Ajv, type ErrorObject, type ValidateFunction } from "ajv";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import pino from "pino";
|
|
4
|
+
import type { ExtensionKind } from "../../core/types.js";
|
|
5
|
+
import { ExtensionLoader } from "../../extension/loader.js";
|
|
6
|
+
import { ExtensionRegistry } from "../../extension/registry.js";
|
|
7
|
+
import { ensureGatewayConfigShape } from "./config-mutators.js";
|
|
8
|
+
import { resolveDataRootDir } from "./config-io.js";
|
|
9
|
+
import type { RawExtensionItemConfig, RawGatewayConfig } from "./config-types.js";
|
|
10
|
+
|
|
11
|
+
export interface ContributionSchemaCatalogEntry {
|
|
12
|
+
contributionId: string;
|
|
13
|
+
packageName: string;
|
|
14
|
+
kind: ExtensionKind;
|
|
15
|
+
configSchema?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ContributionSchemaListItem {
|
|
19
|
+
contributionId: string;
|
|
20
|
+
packageName: string;
|
|
21
|
+
kind: ExtensionKind;
|
|
22
|
+
hasSchema: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface InstanceValidationTask {
|
|
26
|
+
section: "providers" | "connectors" | "sandboxes";
|
|
27
|
+
instanceId: string;
|
|
28
|
+
instance: RawExtensionItemConfig;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
32
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function decodeJsonPointerSegment(value: string): string {
|
|
36
|
+
return value.replaceAll("~1", "/").replaceAll("~0", "~");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function normalizeSchemaForValidation(schema: Record<string, unknown>): Record<string, unknown> {
|
|
40
|
+
const cloned = structuredClone(schema);
|
|
41
|
+
if (isRecord(cloned) && typeof cloned.$schema === "string") {
|
|
42
|
+
delete cloned.$schema;
|
|
43
|
+
}
|
|
44
|
+
return cloned;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function formatErrorPath(instancePath: string): string {
|
|
48
|
+
if (!instancePath) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const segments = instancePath
|
|
53
|
+
.split("/")
|
|
54
|
+
.slice(1)
|
|
55
|
+
.map((segment) => decodeJsonPointerSegment(segment))
|
|
56
|
+
.filter((segment) => segment.length > 0);
|
|
57
|
+
|
|
58
|
+
if (segments.length === 0) {
|
|
59
|
+
return "";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let formatted = "";
|
|
63
|
+
for (const segment of segments) {
|
|
64
|
+
if (/^\d+$/.test(segment)) {
|
|
65
|
+
formatted += `[${segment}]`;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (/^[a-zA-Z_$][\w$]*$/.test(segment)) {
|
|
70
|
+
formatted += `.${segment}`;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
formatted += `['${segment.replaceAll("'", "\\'")}']`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return formatted;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function buildValidationErrorMessage(
|
|
81
|
+
task: InstanceValidationTask,
|
|
82
|
+
contributionId: string,
|
|
83
|
+
errors: ErrorObject[] | null | undefined,
|
|
84
|
+
): string {
|
|
85
|
+
const details = (errors ?? [])
|
|
86
|
+
.slice(0, 5)
|
|
87
|
+
.map((error) => {
|
|
88
|
+
const suffix = formatErrorPath(error.instancePath);
|
|
89
|
+
return `${task.section}.items['${task.instanceId}']${suffix}: ${error.message ?? "invalid"}`;
|
|
90
|
+
})
|
|
91
|
+
.join("; ");
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
`Invalid config for instance '${task.instanceId}' (contribution '${contributionId}'). `
|
|
95
|
+
+ (details.length > 0 ? details : "Schema validation failed.")
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async function loadRegistryForConfig(
|
|
100
|
+
configPath: string,
|
|
101
|
+
rawConfig: RawGatewayConfig,
|
|
102
|
+
): Promise<ExtensionRegistry> {
|
|
103
|
+
const normalized = ensureGatewayConfigShape(structuredClone(rawConfig));
|
|
104
|
+
const rootDir = resolveDataRootDir(configPath, normalized);
|
|
105
|
+
const loader = new ExtensionLoader(pino({ name: "dobby.config-schema", level: "silent" }), {
|
|
106
|
+
extensionsDir: join(rootDir, "extensions"),
|
|
107
|
+
});
|
|
108
|
+
const loadedPackages = await loader.loadAllowList(normalized.extensions.allowList);
|
|
109
|
+
const registry = new ExtensionRegistry();
|
|
110
|
+
registry.registerPackages(loadedPackages);
|
|
111
|
+
return registry;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Loads contribution-level JSON Schema catalog from installed/allow-listed extensions.
|
|
116
|
+
*/
|
|
117
|
+
export async function loadContributionSchemaCatalog(
|
|
118
|
+
configPath: string,
|
|
119
|
+
rawConfig: RawGatewayConfig,
|
|
120
|
+
): Promise<ContributionSchemaCatalogEntry[]> {
|
|
121
|
+
const registry = await loadRegistryForConfig(configPath, rawConfig);
|
|
122
|
+
return registry.listContributionSchemas();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Lists available contribution schemas with lightweight flags for CLI display.
|
|
127
|
+
*/
|
|
128
|
+
export async function listContributionSchemas(
|
|
129
|
+
configPath: string,
|
|
130
|
+
rawConfig: RawGatewayConfig,
|
|
131
|
+
): Promise<ContributionSchemaListItem[]> {
|
|
132
|
+
const catalog = await loadContributionSchemaCatalog(configPath, rawConfig);
|
|
133
|
+
return catalog.map((item) => ({
|
|
134
|
+
contributionId: item.contributionId,
|
|
135
|
+
packageName: item.packageName,
|
|
136
|
+
kind: item.kind,
|
|
137
|
+
hasSchema: Boolean(item.configSchema),
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Returns one contribution schema entry, or null when not found.
|
|
143
|
+
*/
|
|
144
|
+
export async function getContributionSchema(
|
|
145
|
+
configPath: string,
|
|
146
|
+
rawConfig: RawGatewayConfig,
|
|
147
|
+
contributionId: string,
|
|
148
|
+
): Promise<ContributionSchemaCatalogEntry | null> {
|
|
149
|
+
const catalog = await loadContributionSchemaCatalog(configPath, rawConfig);
|
|
150
|
+
return catalog.find((item) => item.contributionId === contributionId) ?? null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Applies extension config defaults and validates provider/connector/sandbox instance configs with Ajv.
|
|
155
|
+
*/
|
|
156
|
+
export async function applyAndValidateContributionSchemas(
|
|
157
|
+
configPath: string,
|
|
158
|
+
rawConfig: RawGatewayConfig,
|
|
159
|
+
): Promise<RawGatewayConfig> {
|
|
160
|
+
const next = ensureGatewayConfigShape(structuredClone(rawConfig));
|
|
161
|
+
const catalog = await loadContributionSchemaCatalog(configPath, next);
|
|
162
|
+
|
|
163
|
+
const schemaByContribution = new Map<string, Record<string, unknown>>();
|
|
164
|
+
for (const entry of catalog) {
|
|
165
|
+
if (!entry.configSchema) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
schemaByContribution.set(entry.contributionId, normalizeSchemaForValidation(entry.configSchema));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const ajv = new Ajv({
|
|
172
|
+
allErrors: true,
|
|
173
|
+
strict: false,
|
|
174
|
+
useDefaults: true,
|
|
175
|
+
});
|
|
176
|
+
const validators = new Map<string, ValidateFunction>();
|
|
177
|
+
|
|
178
|
+
const tasks: InstanceValidationTask[] = [
|
|
179
|
+
...Object.entries(next.providers.items).map(([instanceId, instance]) => ({
|
|
180
|
+
section: "providers" as const,
|
|
181
|
+
instanceId,
|
|
182
|
+
instance,
|
|
183
|
+
})),
|
|
184
|
+
...Object.entries(next.connectors.items).map(([instanceId, instance]) => ({
|
|
185
|
+
section: "connectors" as const,
|
|
186
|
+
instanceId,
|
|
187
|
+
instance,
|
|
188
|
+
})),
|
|
189
|
+
...Object.entries(next.sandboxes.items).map(([instanceId, instance]) => ({
|
|
190
|
+
section: "sandboxes" as const,
|
|
191
|
+
instanceId,
|
|
192
|
+
instance,
|
|
193
|
+
})),
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
for (const task of tasks) {
|
|
197
|
+
const contributionId = task.instance.type;
|
|
198
|
+
const schema = schemaByContribution.get(contributionId);
|
|
199
|
+
if (!schema) {
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let validate = validators.get(contributionId);
|
|
204
|
+
if (!validate) {
|
|
205
|
+
const compiled = ajv.compile(schema) as ValidateFunction;
|
|
206
|
+
validators.set(contributionId, compiled);
|
|
207
|
+
validate = compiled;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const { type: _type, ...instanceConfig } = task.instance;
|
|
211
|
+
const valid = validate(instanceConfig);
|
|
212
|
+
if (!valid) {
|
|
213
|
+
throw new Error(buildValidationErrorMessage(task, contributionId, validate.errors));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
for (const key of Object.keys(task.instance)) {
|
|
217
|
+
if (key !== "type") {
|
|
218
|
+
delete task.instance[key];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
Object.assign(task.instance, {
|
|
222
|
+
type: contributionId,
|
|
223
|
+
...instanceConfig,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return next;
|
|
228
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export interface RawExtensionPackageConfig {
|
|
2
|
+
package: string;
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface RawExtensionItemConfig {
|
|
7
|
+
type: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface RawRouteDefaults {
|
|
12
|
+
provider?: string;
|
|
13
|
+
sandbox?: string;
|
|
14
|
+
tools?: "full" | "readonly";
|
|
15
|
+
mentions?: "required" | "optional";
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RawRouteProfile {
|
|
20
|
+
projectRoot: string;
|
|
21
|
+
tools?: "full" | "readonly";
|
|
22
|
+
systemPromptFile?: string;
|
|
23
|
+
mentions?: "required" | "optional";
|
|
24
|
+
provider?: string;
|
|
25
|
+
sandbox?: string;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RawBindingConfig {
|
|
30
|
+
connector: string;
|
|
31
|
+
source: {
|
|
32
|
+
type: "channel" | "chat";
|
|
33
|
+
id: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
route: string;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface RawGatewayConfig {
|
|
41
|
+
extensions?: {
|
|
42
|
+
allowList?: RawExtensionPackageConfig[];
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
providers?: {
|
|
46
|
+
default?: string;
|
|
47
|
+
items?: Record<string, RawExtensionItemConfig>;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
};
|
|
50
|
+
connectors?: {
|
|
51
|
+
items?: Record<string, RawExtensionItemConfig>;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
sandboxes?: {
|
|
55
|
+
default?: string;
|
|
56
|
+
items?: Record<string, RawExtensionItemConfig>;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
routes?: {
|
|
60
|
+
defaults?: RawRouteDefaults;
|
|
61
|
+
items?: Record<string, RawRouteProfile>;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
bindings?: {
|
|
65
|
+
items?: Record<string, RawBindingConfig>;
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
data?: {
|
|
69
|
+
rootDir?: string;
|
|
70
|
+
dedupTtlMs?: number;
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface NormalizedGatewayConfig extends RawGatewayConfig {
|
|
77
|
+
extensions: {
|
|
78
|
+
allowList: RawExtensionPackageConfig[];
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
providers: {
|
|
82
|
+
default: string;
|
|
83
|
+
items: Record<string, RawExtensionItemConfig>;
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
connectors: {
|
|
87
|
+
items: Record<string, RawExtensionItemConfig>;
|
|
88
|
+
[key: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
sandboxes: {
|
|
91
|
+
default: string;
|
|
92
|
+
items: Record<string, RawExtensionItemConfig>;
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
routes: {
|
|
96
|
+
defaults: RawRouteDefaults;
|
|
97
|
+
items: Record<string, RawRouteProfile>;
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
};
|
|
100
|
+
bindings: {
|
|
101
|
+
items: Record<string, RawBindingConfig>;
|
|
102
|
+
[key: string]: unknown;
|
|
103
|
+
};
|
|
104
|
+
data: {
|
|
105
|
+
rootDir: string;
|
|
106
|
+
dedupTtlMs: number;
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface ContributionInstanceTemplate {
|
|
112
|
+
id: string;
|
|
113
|
+
type: string;
|
|
114
|
+
config: Record<string, unknown>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface ContributionTemplatesByKind {
|
|
118
|
+
providers: ContributionInstanceTemplate[];
|
|
119
|
+
connectors: ContributionInstanceTemplate[];
|
|
120
|
+
sandboxes: ContributionInstanceTemplate[];
|
|
121
|
+
}
|