@brainbox-labs/sdk 0.0.0-stage → 0.23.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/README.md +346 -2
- package/dist/athena-R67AV2DO.js +13 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +57 -0
- package/dist/chunk-43LDD7YT.js +139 -0
- package/dist/chunk-4J77FNJJ.js +192 -0
- package/dist/chunk-AJR44IFE.js +47 -0
- package/dist/chunk-GVWDS5TG.js +112 -0
- package/dist/chunk-MF3BADT7.js +544 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-VEXUCOXR.js +387 -0
- package/dist/chunk-XFLBPF4A.js +169 -0
- package/dist/chunk-YRH35U57.js +178 -0
- package/dist/column-profiler-FJCAQQAS.js +23 -0
- package/dist/docs-loader-B2l0cO36.d.ts +25 -0
- package/dist/docs-loader-VA4KBG6Y.js +11 -0
- package/dist/index-qV0gq2eJ.d.ts +148 -0
- package/dist/index.d.ts +476 -0
- package/dist/index.js +523 -0
- package/dist/ingest/public.d.ts +178 -0
- package/dist/ingest/public.js +63 -0
- package/dist/ingest-DICRS7WW.js +13 -0
- package/dist/introspect-KQOOQEZM.js +11 -0
- package/dist/schema-reader-4ZVTUZIX.js +150 -0
- package/dist/serve/index.d.ts +2 -0
- package/dist/serve/index.js +8 -0
- package/dist/sql-parser-TB26PFXS.js +198 -0
- package/dist/sync-MXG4WALD.js +260 -0
- package/dist/trino-TUQ7CIRM.js +13 -0
- package/package.json +79 -4
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// src/ingest/docs-loader.ts
|
|
2
|
+
import * as fs2 from "fs/promises";
|
|
3
|
+
import * as nodePath2 from "path";
|
|
4
|
+
import { glob } from "glob";
|
|
5
|
+
|
|
6
|
+
// src/ingest/doc-converter.ts
|
|
7
|
+
import * as fs from "fs/promises";
|
|
8
|
+
import * as nodePath from "path";
|
|
9
|
+
function needsConversion(filePath) {
|
|
10
|
+
const ext = nodePath.extname(filePath).toLowerCase();
|
|
11
|
+
return ext === ".pdf" || ext === ".docx" || ext === ".html" || ext === ".htm";
|
|
12
|
+
}
|
|
13
|
+
async function htmlToMarkdown(html) {
|
|
14
|
+
const TurndownService = (await import("turndown")).default;
|
|
15
|
+
const td = new TurndownService({ headingStyle: "atx", codeBlockStyle: "fenced" });
|
|
16
|
+
return td.turndown(html);
|
|
17
|
+
}
|
|
18
|
+
async function convertToMarkdown(filePath) {
|
|
19
|
+
const ext = nodePath.extname(filePath).toLowerCase();
|
|
20
|
+
if (ext === ".docx") {
|
|
21
|
+
const mammoth = await import("mammoth");
|
|
22
|
+
const result = await mammoth.convertToHtml({ path: filePath });
|
|
23
|
+
const warnings = result.messages.filter((m) => m.type === "warning").map((m) => m.message);
|
|
24
|
+
if (warnings.length > 0) {
|
|
25
|
+
process.stderr.write(`mammoth warnings for ${nodePath.basename(filePath)}:
|
|
26
|
+
${warnings.join("\n")}
|
|
27
|
+
`);
|
|
28
|
+
}
|
|
29
|
+
return htmlToMarkdown(result.value);
|
|
30
|
+
}
|
|
31
|
+
if (ext === ".html" || ext === ".htm") {
|
|
32
|
+
const html = await fs.readFile(filePath, "utf-8");
|
|
33
|
+
return htmlToMarkdown(html);
|
|
34
|
+
}
|
|
35
|
+
if (ext === ".pdf") {
|
|
36
|
+
const { PDFParse } = await import("pdf-parse");
|
|
37
|
+
const buffer = await fs.readFile(filePath);
|
|
38
|
+
const parser = new PDFParse({ data: buffer });
|
|
39
|
+
try {
|
|
40
|
+
const result = await parser.getText();
|
|
41
|
+
return result.text;
|
|
42
|
+
} finally {
|
|
43
|
+
await parser.destroy();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
throw new Error(`No converter available for extension "${ext}"`);
|
|
47
|
+
}
|
|
48
|
+
function convertedName(filePath) {
|
|
49
|
+
return nodePath.basename(filePath) + ".md";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/sync/keys.ts
|
|
53
|
+
import { createHash } from "crypto";
|
|
54
|
+
var MAX_KEY_LENGTH = 256;
|
|
55
|
+
function validateSourceKey(raw, where = "sourceKey") {
|
|
56
|
+
if (typeof raw !== "string") throw new Error(`[BrainBox] ${where} must be a string`);
|
|
57
|
+
const key = raw.trim();
|
|
58
|
+
if (key === "") throw new Error(`[BrainBox] ${where} must not be empty`);
|
|
59
|
+
if (key.length > MAX_KEY_LENGTH) throw new Error(`[BrainBox] ${where} "${key.slice(0, 40)}\u2026" is longer than ${MAX_KEY_LENGTH} characters`);
|
|
60
|
+
if (key.includes("/")) throw new Error(`[BrainBox] ${where} "${key}" must not contain "/"`);
|
|
61
|
+
return key;
|
|
62
|
+
}
|
|
63
|
+
function normalizeNamespace(ns) {
|
|
64
|
+
return (ns ?? "").trim().replace(/^\/+|\/+$/g, "");
|
|
65
|
+
}
|
|
66
|
+
function deriveSourceKey(relPath, namespace) {
|
|
67
|
+
const posix = relPath.split("\\").join("/").replace(/^\.\//, "").replace(/^\/+/, "");
|
|
68
|
+
const ns = normalizeNamespace(namespace);
|
|
69
|
+
const full = ns === "" ? posix : `${ns}/${posix}`;
|
|
70
|
+
const encoded = full.replace(/%/g, "%25").replace(/\//g, "%2F").trim();
|
|
71
|
+
if (encoded.length <= MAX_KEY_LENGTH) return validateSourceKey(encoded);
|
|
72
|
+
const digest = createHash("sha256").update(encoded).digest("hex").slice(0, 16);
|
|
73
|
+
return `${encoded.slice(0, 200)}~${digest}`;
|
|
74
|
+
}
|
|
75
|
+
function frontmatterSourceKey(content) {
|
|
76
|
+
const fm = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(content);
|
|
77
|
+
if (!fm) return void 0;
|
|
78
|
+
const line = /^sourceKey:[ \t]*(.*)$/m.exec(fm[1]);
|
|
79
|
+
if (!line) return void 0;
|
|
80
|
+
const value = line[1].trim().replace(/^(['"])(.*)\1$/, "$2");
|
|
81
|
+
return validateSourceKey(value, "frontmatter sourceKey");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/ingest/docs-loader.ts
|
|
85
|
+
var BINARY_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
86
|
+
".png",
|
|
87
|
+
".jpg",
|
|
88
|
+
".jpeg",
|
|
89
|
+
".gif",
|
|
90
|
+
".bmp",
|
|
91
|
+
".zip",
|
|
92
|
+
".tar",
|
|
93
|
+
".gz",
|
|
94
|
+
".bz2",
|
|
95
|
+
".7z",
|
|
96
|
+
".exe",
|
|
97
|
+
".dll",
|
|
98
|
+
".so",
|
|
99
|
+
".bin"
|
|
100
|
+
]);
|
|
101
|
+
var CONVERT_EXTENSIONS = /* @__PURE__ */ new Set([".pdf", ".docx"]);
|
|
102
|
+
function inferType(filePath) {
|
|
103
|
+
const ext = nodePath2.extname(filePath).toLowerCase();
|
|
104
|
+
if (ext === ".md" || ext === ".markdown") return "markdown";
|
|
105
|
+
if (ext === ".html" || ext === ".htm") return "html";
|
|
106
|
+
return "text";
|
|
107
|
+
}
|
|
108
|
+
async function loadDocFile(file, outputDir) {
|
|
109
|
+
const ext = nodePath2.extname(file).toLowerCase();
|
|
110
|
+
if (BINARY_EXTENSIONS.has(ext)) {
|
|
111
|
+
throw new Error(
|
|
112
|
+
`Unsupported file type "${ext}" for "${file}". Convert to markdown/text before passing to brain.ingest.`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
if (CONVERT_EXTENSIONS.has(ext)) {
|
|
116
|
+
const content = await convertToMarkdown(file);
|
|
117
|
+
const name = convertedName(file);
|
|
118
|
+
if (outputDir) {
|
|
119
|
+
await fs2.writeFile(nodePath2.join(outputDir, name), content, "utf-8");
|
|
120
|
+
}
|
|
121
|
+
return { name, content, type: "markdown" };
|
|
122
|
+
}
|
|
123
|
+
return { name: nodePath2.basename(file), content: await fs2.readFile(file, "utf-8"), type: inferType(file) };
|
|
124
|
+
}
|
|
125
|
+
function entryToSource(entry, loaded, defaultDepth) {
|
|
126
|
+
const key = entry.sourceKey !== void 0 ? validateSourceKey(entry.sourceKey) : void 0;
|
|
127
|
+
const depth = entry.analysisDepth ?? defaultDepth;
|
|
128
|
+
const name = entry.name ?? loaded.name;
|
|
129
|
+
return {
|
|
130
|
+
id: key ?? name,
|
|
131
|
+
name,
|
|
132
|
+
content: loaded.content,
|
|
133
|
+
type: entry.type ?? loaded.type,
|
|
134
|
+
...key !== void 0 && { sourceKey: key },
|
|
135
|
+
...entry.sourceVersion !== void 0 && { sourceVersion: entry.sourceVersion },
|
|
136
|
+
...entry.namespace !== void 0 && { namespace: entry.namespace },
|
|
137
|
+
...entry.metadata !== void 0 && { metadata: entry.metadata },
|
|
138
|
+
...depth && { analysisDepth: depth }
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
async function expandDocPatterns(patterns, outputDir, analysisDepth) {
|
|
142
|
+
if (outputDir) {
|
|
143
|
+
await fs2.mkdir(outputDir, { recursive: true });
|
|
144
|
+
}
|
|
145
|
+
const sources = [];
|
|
146
|
+
const seen = /* @__PURE__ */ new Set();
|
|
147
|
+
const keys = /* @__PURE__ */ new Set();
|
|
148
|
+
const push = (s) => {
|
|
149
|
+
if (s.sourceKey !== void 0) {
|
|
150
|
+
if (keys.has(s.sourceKey)) throw new Error(`[BrainBox] duplicate sourceKey "${s.sourceKey}" in docs`);
|
|
151
|
+
keys.add(s.sourceKey);
|
|
152
|
+
}
|
|
153
|
+
sources.push(s);
|
|
154
|
+
};
|
|
155
|
+
for (const pattern of patterns) {
|
|
156
|
+
if (typeof pattern !== "string" && pattern.content !== void 0) {
|
|
157
|
+
const name = pattern.name ?? pattern.sourceKey;
|
|
158
|
+
if (name === void 0) throw new Error("[BrainBox] a docs entry with inline `content` needs a `name` or `sourceKey`");
|
|
159
|
+
push(entryToSource(pattern, { name, content: pattern.content, type: inferType(name) }, analysisDepth));
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const entry = typeof pattern === "string" ? { path: pattern } : pattern;
|
|
163
|
+
if (entry.path === void 0) throw new Error("[BrainBox] a docs entry needs `path` or `content`");
|
|
164
|
+
const matches = await glob(entry.path, { nodir: true, absolute: true });
|
|
165
|
+
if (entry.sourceKey !== void 0 && matches.length !== 1) {
|
|
166
|
+
throw new Error(`[BrainBox] docs entry with sourceKey "${entry.sourceKey}" must match exactly one file; "${entry.path}" matched ${matches.length}`);
|
|
167
|
+
}
|
|
168
|
+
for (const file of matches) {
|
|
169
|
+
if (seen.has(file)) continue;
|
|
170
|
+
seen.add(file);
|
|
171
|
+
push(entryToSource(entry, await loadDocFile(file, outputDir), analysisDepth));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return sources;
|
|
175
|
+
}
|
|
176
|
+
function inlineText(text, analysisDepth) {
|
|
177
|
+
return { id: "inline.txt", name: "inline.txt", content: text, type: "text", ...analysisDepth && { analysisDepth } };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
needsConversion,
|
|
182
|
+
htmlToMarkdown,
|
|
183
|
+
convertToMarkdown,
|
|
184
|
+
convertedName,
|
|
185
|
+
validateSourceKey,
|
|
186
|
+
normalizeNamespace,
|
|
187
|
+
deriveSourceKey,
|
|
188
|
+
frontmatterSourceKey,
|
|
189
|
+
loadDocFile,
|
|
190
|
+
expandDocPatterns,
|
|
191
|
+
inlineText
|
|
192
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/ingest/introspect.ts
|
|
2
|
+
var SUPPORTED_INTROSPECTION_DIALECTS = ["postgres", "trino", "athena"];
|
|
3
|
+
var INTROSPECTORS = {
|
|
4
|
+
postgres: async () => (await import("./schema-reader-4ZVTUZIX.js")).introspectSchema,
|
|
5
|
+
trino: async () => (await import("./trino-TUQ7CIRM.js")).introspectTrinoSchema,
|
|
6
|
+
athena: async () => (await import("./athena-R67AV2DO.js")).introspectAthenaSchema
|
|
7
|
+
};
|
|
8
|
+
function detectIntrospectionDialect(url) {
|
|
9
|
+
const lower = url.toLowerCase();
|
|
10
|
+
if (lower.startsWith("postgres://") || lower.startsWith("postgresql://")) return "postgres";
|
|
11
|
+
if (lower.startsWith("trino://") || lower.startsWith("trino+http")) return "trino";
|
|
12
|
+
if (lower.startsWith("athena://") || lower.startsWith("awsathena://")) return "athena";
|
|
13
|
+
return void 0;
|
|
14
|
+
}
|
|
15
|
+
var KNOWN_UNSUPPORTED = [
|
|
16
|
+
[["mysql://", "mysql2://"], "MySQL"],
|
|
17
|
+
[["sqlite:", "sqlite3:"], "SQLite"],
|
|
18
|
+
[["duckdb:", "md:"], "DuckDB"],
|
|
19
|
+
[["bigquery://"], "BigQuery"],
|
|
20
|
+
[["snowflake://"], "Snowflake"],
|
|
21
|
+
[["jdbc:awsathena"], "Athena (JDBC connection strings \u2014 use athena://region/database instead)"],
|
|
22
|
+
[["presto://"], "Presto"]
|
|
23
|
+
];
|
|
24
|
+
function unsupportedMessage(url) {
|
|
25
|
+
const supported = SUPPORTED_INTROSPECTION_DIALECTS.join(", ");
|
|
26
|
+
const lower = url.toLowerCase();
|
|
27
|
+
for (const [prefixes, label] of KNOWN_UNSUPPORTED) {
|
|
28
|
+
if (prefixes.some((p) => lower.startsWith(p))) {
|
|
29
|
+
return `[BrainBox] ${label} schema introspection is not yet supported (supported: ${supported}).`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return `[BrainBox] Cannot detect the database engine from the connection string (supported: ${supported}). For connection strings without a URL scheme (e.g. keyword/value Postgres format), pass the dialect explicitly.`;
|
|
33
|
+
}
|
|
34
|
+
async function introspectDatabaseSchema(connectionString, dialect) {
|
|
35
|
+
const resolved = dialect ?? detectIntrospectionDialect(connectionString);
|
|
36
|
+
if (resolved === void 0) {
|
|
37
|
+
throw new Error(unsupportedMessage(connectionString));
|
|
38
|
+
}
|
|
39
|
+
const introspect = await INTROSPECTORS[resolved]();
|
|
40
|
+
return introspect(connectionString);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
SUPPORTED_INTROSPECTION_DIALECTS,
|
|
45
|
+
detectIntrospectionDialect,
|
|
46
|
+
introspectDatabaseSchema
|
|
47
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/serve/connectors/brain.ts
|
|
2
|
+
import { BRAIN_TOOL_DEFS } from "@brainbox-labs/types";
|
|
3
|
+
var WRITE_TOOL_NAMES = new Set(
|
|
4
|
+
BRAIN_TOOL_DEFS.filter((t) => !t.annotations.readOnlyHint).map((t) => t.name)
|
|
5
|
+
);
|
|
6
|
+
var DESTRUCTIVE_TOOL_NAMES = new Set(
|
|
7
|
+
BRAIN_TOOL_DEFS.filter((t) => t.annotations.destructiveHint).map((t) => t.name)
|
|
8
|
+
);
|
|
9
|
+
var LEGACY_WRITE_TOOL_ALIASES = /* @__PURE__ */ new Set(["append_wiki_page", "flag_personal_page_for_review"]);
|
|
10
|
+
function isWriteTool(toolName) {
|
|
11
|
+
return WRITE_TOOL_NAMES.has(toolName) || LEGACY_WRITE_TOOL_ALIASES.has(toolName);
|
|
12
|
+
}
|
|
13
|
+
var BrainDispatchError = class extends Error {
|
|
14
|
+
status;
|
|
15
|
+
toolName;
|
|
16
|
+
body;
|
|
17
|
+
code;
|
|
18
|
+
/** The JSON error body, when there is one (e.g. `currentVersion` on a VERSION_CONFLICT). */
|
|
19
|
+
details;
|
|
20
|
+
/**
|
|
21
|
+
* True when the same call can succeed later: 429, 502, 503, 504, and the process_event 409
|
|
22
|
+
* for a source.externalId that is still being processed. Other 409s (VERSION_CONFLICT, an
|
|
23
|
+
* archived skill) need the caller to change something first, so they are not retryable.
|
|
24
|
+
*/
|
|
25
|
+
retryable;
|
|
26
|
+
/** Seconds from the Retry-After header, when the server sent one. */
|
|
27
|
+
retryAfter;
|
|
28
|
+
constructor(status, toolName, body, opts = {}) {
|
|
29
|
+
super(opts.message ?? `[BrainBox] Brain dispatch ${status} (${toolName}): ${body}`);
|
|
30
|
+
this.name = "BrainDispatchError";
|
|
31
|
+
this.status = status;
|
|
32
|
+
this.toolName = toolName;
|
|
33
|
+
this.body = body;
|
|
34
|
+
this.details = parseErrorBody(body);
|
|
35
|
+
const serverCode = typeof this.details?.["code"] === "string" ? this.details["code"] : void 0;
|
|
36
|
+
this.code = serverCode ?? (status === 409 ? "CONFLICT" : `HTTP_${status}`);
|
|
37
|
+
this.retryable = [429, 502, 503, 504].includes(status) || status === 409 && toolName === "process_event" && this.code === "CONFLICT";
|
|
38
|
+
this.retryAfter = opts.retryAfter;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
function parseErrorBody(body) {
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(body);
|
|
44
|
+
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : void 0;
|
|
45
|
+
} catch {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function parseRetryAfter(header) {
|
|
50
|
+
const seconds = header === null ? NaN : Number(header);
|
|
51
|
+
return Number.isFinite(seconds) && seconds >= 0 ? seconds : void 0;
|
|
52
|
+
}
|
|
53
|
+
async function dispatchBrainTool(apiUrl, apiKey, projectId, toolName, args) {
|
|
54
|
+
const url = `${apiUrl.replace(/\/+$/, "")}/api/projects/${encodeURIComponent(projectId)}/domain-model/dispatch`;
|
|
55
|
+
const res = await globalThis.fetch(url, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
headers: {
|
|
58
|
+
Authorization: `Bearer ${apiKey}`,
|
|
59
|
+
"Content-Type": "application/json"
|
|
60
|
+
},
|
|
61
|
+
body: JSON.stringify({ tool: toolName, args })
|
|
62
|
+
});
|
|
63
|
+
if (!res.ok) {
|
|
64
|
+
throw new BrainDispatchError(res.status, toolName, await res.text(), {
|
|
65
|
+
retryAfter: parseRetryAfter(res.headers.get("retry-after"))
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const contentType = res.headers.get("content-type") ?? "";
|
|
69
|
+
if (!contentType.includes("application/json")) {
|
|
70
|
+
throw new Error(`[BrainBox] Brain dispatch returned non-JSON response (${contentType}) for tool '${toolName}'`);
|
|
71
|
+
}
|
|
72
|
+
return res.json();
|
|
73
|
+
}
|
|
74
|
+
function createBrainExecutor(apiUrl, apiKey, projectId) {
|
|
75
|
+
return async (toolName, args, callOpts) => {
|
|
76
|
+
if (callOpts?.projectId !== void 0 && callOpts.projectId !== projectId) {
|
|
77
|
+
throw new Error(
|
|
78
|
+
`[BrainBox] Per-call projectId targeting ("${callOpts.projectId}") is only supported for tenant-key handles.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return dispatchBrainTool(apiUrl, apiKey, projectId, toolName, args);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function createTenantBrainExecutor(apiUrl, apiKey, view) {
|
|
85
|
+
const validBaseIds = new Set(view.bases.map((b) => b.projectId));
|
|
86
|
+
return async (toolName, args, callOpts) => {
|
|
87
|
+
const requestedProjectId = callOpts?.projectId;
|
|
88
|
+
if (requestedProjectId !== void 0 && requestedProjectId !== view.overlay.projectId && !validBaseIds.has(requestedProjectId)) {
|
|
89
|
+
throw new Error(
|
|
90
|
+
`[BrainBox] projectId "${requestedProjectId}" is not a readable project for this tenant key. Readable projects: overlay (${view.overlay.projectId}), bases: ${[...validBaseIds].join(", ") || "(none)"}.`
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
if (isWriteTool(toolName)) {
|
|
94
|
+
const targetsBase = requestedProjectId !== void 0 && requestedProjectId !== view.overlay.projectId;
|
|
95
|
+
if (targetsBase && DESTRUCTIVE_TOOL_NAMES.has(toolName)) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`[BrainBox] ${toolName} cannot target base project "${requestedProjectId}": a tenant key can only archive its own overlay's content.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
const writeArgs = targetsBase ? { ...args, appliesTo: requestedProjectId } : args;
|
|
101
|
+
return dispatchBrainTool(apiUrl, apiKey, view.overlay.projectId, toolName, writeArgs);
|
|
102
|
+
}
|
|
103
|
+
return dispatchBrainTool(apiUrl, apiKey, requestedProjectId ?? view.overlay.projectId, toolName, args);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
WRITE_TOOL_NAMES,
|
|
109
|
+
BrainDispatchError,
|
|
110
|
+
createBrainExecutor,
|
|
111
|
+
createTenantBrainExecutor
|
|
112
|
+
};
|