executor 1.2.4-beta.6 → 1.2.4-beta.7
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/bin/executor.mjs +48 -13
- package/package.json +1 -1
- package/resources/web/assets/{highlighted-body-TPN3WLV5-DYg1rqdL.js → highlighted-body-TPN3WLV5-dT8t51CG.js} +1 -1
- package/resources/web/assets/{index-BuXgGpBl.js → index-oj1F5-Xg.js} +2 -2
- package/resources/web/assets/{mermaid-O7DHMXV3-Du9Efp9a.js → mermaid-O7DHMXV3-d5ePT8Z-.js} +3 -3
- package/resources/web/index.html +1 -1
package/bin/executor.mjs
CHANGED
|
@@ -357330,6 +357330,32 @@ var hasSubstringMatch = (value7, queryToken) => {
|
|
|
357330
357330
|
return singular !== queryToken && value7.includes(singular);
|
|
357331
357331
|
};
|
|
357332
357332
|
var queryTokenWeight = (token) => LOW_SIGNAL_QUERY_TOKENS.has(token) ? 0.25 : 1;
|
|
357333
|
+
var namespaceFromPath2 = (path4) => {
|
|
357334
|
+
const [first3, second] = path4.split(".");
|
|
357335
|
+
return second ? `${first3}.${second}` : first3;
|
|
357336
|
+
};
|
|
357337
|
+
var sortNamespaces = (namespaces) => [...namespaces].sort((left3, right3) => left3.namespace.localeCompare(right3.namespace));
|
|
357338
|
+
var loadWorkspaceCatalogNamespaces = (input) => gen2(function* () {
|
|
357339
|
+
const catalogs = yield* input.sourceCatalogStore.loadWorkspaceSourceCatalogs({
|
|
357340
|
+
scopeId: input.scopeId,
|
|
357341
|
+
actorScopeId: input.actorScopeId
|
|
357342
|
+
});
|
|
357343
|
+
const namespaces = new Map;
|
|
357344
|
+
for (const catalog6 of catalogs) {
|
|
357345
|
+
if (!catalog6.source.enabled || catalog6.source.status !== "connected") {
|
|
357346
|
+
continue;
|
|
357347
|
+
}
|
|
357348
|
+
for (const descriptor2 of Object.values(catalog6.projected.toolDescriptors)) {
|
|
357349
|
+
const namespace = namespaceFromPath2(descriptor2.toolPath.join("."));
|
|
357350
|
+
const existing = namespaces.get(namespace);
|
|
357351
|
+
namespaces.set(namespace, {
|
|
357352
|
+
namespace,
|
|
357353
|
+
toolCount: (existing?.toolCount ?? 0) + 1
|
|
357354
|
+
});
|
|
357355
|
+
}
|
|
357356
|
+
}
|
|
357357
|
+
return sortNamespaces(namespaces.values());
|
|
357358
|
+
});
|
|
357333
357359
|
var loadWorkspaceCatalogTools = (input) => map16(input.sourceCatalogStore.loadWorkspaceSourceCatalogToolIndex({
|
|
357334
357360
|
scopeId: input.scopeId,
|
|
357335
357361
|
actorScopeId: input.actorScopeId,
|
|
@@ -357450,7 +357476,11 @@ var createScopeSourceCatalog = (input) => {
|
|
|
357450
357476
|
});
|
|
357451
357477
|
}));
|
|
357452
357478
|
return {
|
|
357453
|
-
listNamespaces: ({ limit }) => provideRuntimeLocalScope(
|
|
357479
|
+
listNamespaces: ({ limit }) => provideRuntimeLocalScope(provideWorkspaceStorage(map16(loadWorkspaceCatalogNamespaces({
|
|
357480
|
+
scopeId: input.scopeId,
|
|
357481
|
+
actorScopeId: input.actorScopeId,
|
|
357482
|
+
sourceCatalogStore: input.sourceCatalogStore
|
|
357483
|
+
}), (namespaces) => namespaces.slice(0, limit))), input.runtimeLocalScope),
|
|
357454
357484
|
listTools: ({ namespace, query, limit, includeSchemas = false }) => provideRuntimeLocalScope(flatMap10(createSharedCatalog(includeSchemas), (catalog6) => catalog6.listTools({
|
|
357455
357485
|
...namespace !== undefined ? { namespace } : {},
|
|
357456
357486
|
...query !== undefined ? { query } : {},
|
|
@@ -368329,11 +368359,15 @@ var supportsManagedElicitation = (server2) => {
|
|
|
368329
368359
|
return Boolean(capabilities?.elicitation?.form) && Boolean(capabilities?.elicitation?.url);
|
|
368330
368360
|
};
|
|
368331
368361
|
var interactionModeForServer = (server2) => supportsManagedElicitation(server2) ? "live_form" : "detach";
|
|
368332
|
-
var
|
|
368362
|
+
var executeDescriptionToolsPerSource = 5;
|
|
368363
|
+
var buildExecuteWorkflowText = (sourceToolExamples = []) => [
|
|
368333
368364
|
"Execute TypeScript in sandbox; call tools via discovery workflow.",
|
|
368334
|
-
...
|
|
368335
|
-
"Available
|
|
368336
|
-
...
|
|
368365
|
+
...sourceToolExamples.length > 0 ? [
|
|
368366
|
+
"Available source tool examples:",
|
|
368367
|
+
...sourceToolExamples.flatMap((source2) => [
|
|
368368
|
+
`${source2.sourceName}:`,
|
|
368369
|
+
...source2.toolPaths.map((toolPath) => `- ${toolPath}`)
|
|
368370
|
+
])
|
|
368337
368371
|
] : [],
|
|
368338
368372
|
"Workflow:",
|
|
368339
368373
|
'1) const matches = await tools.discover({ query: "<intent>", limit: 12 });',
|
|
@@ -368347,18 +368381,19 @@ var buildExecuteWorkflowText = (namespaces = []) => [
|
|
|
368347
368381
|
`);
|
|
368348
368382
|
var defaultExecuteDescription = buildExecuteWorkflowText();
|
|
368349
368383
|
var loadExecuteDescription = (runtime6) => runControlPlane(runtime6, gen2(function* () {
|
|
368350
|
-
const
|
|
368351
|
-
const
|
|
368384
|
+
const sourceCatalogStore = yield* RuntimeSourceCatalogStoreService;
|
|
368385
|
+
const catalogs = yield* sourceCatalogStore.loadWorkspaceSourceCatalogs({
|
|
368352
368386
|
scopeId: runtime6.localInstallation.scopeId,
|
|
368353
|
-
actorScopeId: runtime6.localInstallation.actorScopeId
|
|
368354
|
-
executionId: ExecutionIdSchema.make("exec_mcp_help")
|
|
368387
|
+
actorScopeId: runtime6.localInstallation.actorScopeId
|
|
368355
368388
|
});
|
|
368356
|
-
const
|
|
368357
|
-
|
|
368389
|
+
const sourceToolExamples = catalogs.filter((catalog6) => catalog6.source.enabled && catalog6.source.status === "connected").map((catalog6) => ({
|
|
368390
|
+
sourceName: catalog6.source.name,
|
|
368391
|
+
toolPaths: Object.values(catalog6.projected.toolDescriptors).map((descriptor2) => descriptor2.toolPath.join(".")).filter((toolPath) => toolPath.length > 0).sort((left3, right3) => left3.localeCompare(right3)).slice(0, executeDescriptionToolsPerSource)
|
|
368392
|
+
})).filter((catalog6) => catalog6.toolPaths.length > 0);
|
|
368393
|
+
if (sourceToolExamples.length === 0) {
|
|
368358
368394
|
return defaultExecuteDescription;
|
|
368359
368395
|
}
|
|
368360
|
-
|
|
368361
|
-
return buildExecuteWorkflowText(namespaces);
|
|
368396
|
+
return buildExecuteWorkflowText(sourceToolExamples);
|
|
368362
368397
|
}).pipe(catchAll2(() => succeed8(defaultExecuteDescription))));
|
|
368363
368398
|
var summarizeExecution = (execution2) => {
|
|
368364
368399
|
switch (execution2.status) {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-
|
|
1
|
+
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-d5ePT8Z-.js";import{j as d}from"./index-CRuElBS1.js";var R=({code:i,language:e,raw:t,className:g,startLine:u,...m})=>{let{shikiTheme:o}=r.useContext(c),a=p(),[n,s]=r.useState(t);return r.useEffect(()=>{if(!a){s(t);return}let l=a.highlight({code:i,language:e,themes:o},h=>{s(h)});l&&s(l)},[i,e,o,a,t]),d.jsx(x,{className:g,language:e,result:n,startLine:u,...m})};export{R as HighlightedCodeBlockBody};
|