@yeaft/webchat-agent 1.0.562 → 1.0.565
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/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +27 -19
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +2 -2
- package/local-runtime/web/style.bundle.css +1 -1
- package/local-runtime/web/style.bundle.css.gz +0 -0
- package/package.json +1 -1
- package/yeaft/web-bridge.js +13 -12
|
Binary file
|
package/package.json
CHANGED
package/yeaft/web-bridge.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { delimiter, join } from 'node:path';
|
|
19
19
|
import { COLLAB_TOOL_POLICY } from './tools/registry.js';
|
|
20
|
+
import { createFullRegistry } from './tools/index.js';
|
|
20
21
|
import { existsSync, lstatSync } from 'node:fs';
|
|
21
22
|
import { randomUUID } from 'node:crypto';
|
|
22
23
|
import { DEFAULT_YEAFT_DIR } from './init.js';
|
|
@@ -3360,9 +3361,15 @@ function resolvePluginCatalogRuntime(workDir = '') {
|
|
|
3360
3361
|
const active = runtimeBelongsToOwner(runtime, owner)
|
|
3361
3362
|
? runtime
|
|
3362
3363
|
: (baseRuntime && runtimeBelongsToOwner(baseRuntime, owner) ? baseRuntime : null);
|
|
3364
|
+
const yeaftDir = ctx.CONFIG?.yeaftDir || session?.yeaftDir || DEFAULT_YEAFT_DIR;
|
|
3365
|
+
// Inventory belongs to the Agent, not an initialized inference runtime.
|
|
3366
|
+
// Read Skills afresh for the requested scope (empty means Agent-only), so a
|
|
3367
|
+
// cold/unvisited project never inherits another Session's Skills. Do not boot
|
|
3368
|
+
// a Session, load a provider, or connect MCP just to inspect capabilities.
|
|
3363
3369
|
return {
|
|
3364
|
-
toolRegistry:
|
|
3365
|
-
skillManager:
|
|
3370
|
+
toolRegistry: createFullRegistry(),
|
|
3371
|
+
skillManager: createSkillManager(yeaftDir, normalizedWorkDir),
|
|
3372
|
+
mcpConfig: loadPluginCatalogMcpConfig(yeaftDir),
|
|
3366
3373
|
mcpManager: active?.mcpManager || session?.mcpManager || null,
|
|
3367
3374
|
};
|
|
3368
3375
|
}
|
|
@@ -3439,11 +3446,8 @@ function reloadManagedSkillRuntime(scope, workDir = '') {
|
|
|
3439
3446
|
if (scope === 'user') reloadActiveSkills(owner);
|
|
3440
3447
|
}
|
|
3441
3448
|
|
|
3442
|
-
function managedSkillCatalog(
|
|
3443
|
-
|
|
3444
|
-
const runtime = resolvePluginCatalogRuntime(normalizedWorkDir);
|
|
3445
|
-
const manager = createSkillManager(yeaftDir, normalizedWorkDir || process.cwd());
|
|
3446
|
-
return buildPluginCatalog({ ...runtime, skillManager: manager });
|
|
3449
|
+
function managedSkillCatalog(workDir = '') {
|
|
3450
|
+
return buildPluginCatalog(resolvePluginCatalogRuntime(workDir));
|
|
3447
3451
|
}
|
|
3448
3452
|
|
|
3449
3453
|
/**
|
|
@@ -3479,7 +3483,7 @@ export function handleYeaftManagedSkill(msg = {}) {
|
|
|
3479
3483
|
? createManagedSkill(join(yeaftDir, 'skills'), msg.skill || {})
|
|
3480
3484
|
: removeManagedSkill(join(yeaftDir, 'skills'), msg.name));
|
|
3481
3485
|
reloadManagedSkillRuntime(scope, managedSession?.workDir || '');
|
|
3482
|
-
const catalog = managedSkillCatalog(
|
|
3486
|
+
const catalog = managedSkillCatalog(managedSession?.workDir || '');
|
|
3483
3487
|
respond({ scope, sessionId: managedSession?.sessionId || null, result, catalog, error: null });
|
|
3484
3488
|
} catch (err) {
|
|
3485
3489
|
respond({ scope, sessionId: null, catalog: { tools: [], skills: [], skillSources: [], mcpServers: [] }, error: err?.message || String(err) });
|
|
@@ -3495,10 +3499,7 @@ export function handleYeaftPluginCatalog(msg = {}) {
|
|
|
3495
3499
|
const requestId = msg.requestId || null;
|
|
3496
3500
|
const requestedWorkDir = normalizeSessionWorkDir(msg.workDir);
|
|
3497
3501
|
try {
|
|
3498
|
-
const
|
|
3499
|
-
const yeaftDir = ctx.CONFIG?.yeaftDir || session?.yeaftDir || DEFAULT_YEAFT_DIR;
|
|
3500
|
-
runtime.mcpConfig = loadPluginCatalogMcpConfig(yeaftDir);
|
|
3501
|
-
const catalog = buildPluginCatalog(runtime);
|
|
3502
|
+
const catalog = buildPluginCatalog(resolvePluginCatalogRuntime(requestedWorkDir));
|
|
3502
3503
|
sendToServer({
|
|
3503
3504
|
type: 'yeaft_plugin_catalog_result',
|
|
3504
3505
|
requestId,
|