@xyz-agent/extension-protocol 0.6.0 → 0.7.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.mts +31 -1
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -445,4 +445,34 @@ interface SessionManagerErrorResult {
|
|
|
445
445
|
hint?: string;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
|
|
448
|
+
/**
|
|
449
|
+
* 子代理引擎契约(U7 引擎可发现性 + GUI 引擎选择)。
|
|
450
|
+
*
|
|
451
|
+
* 契约两端:
|
|
452
|
+
* - 写侧:@zhushanwen/pi-subagent-workflow extension(pi 进程内,engine registry 权威)
|
|
453
|
+
* 在 session_start 时把注册引擎列表同步到 <agentDir>/subagents/engines.json;
|
|
454
|
+
* - 读侧:xyz-agent runtime(subagent.getEngineConfig / subagent.setDefaultEngine RPC)
|
|
455
|
+
* → renderer Settings「子代理」页引擎下拉(动态选项,不硬编码)。
|
|
456
|
+
*
|
|
457
|
+
* defaultEngine 的权威存储仍是 <agentDir>/subagents/config.json(extension 的
|
|
458
|
+
* ModelConfigService 读同文件——GUI 写入经 runtime 读改写,单一文件双端共识)。
|
|
459
|
+
*/
|
|
460
|
+
/** 引擎列表状态文件名(相对 <agentDir>/subagents/,与 config.json 同目录)。 */
|
|
461
|
+
declare const SUBAGENTS_ENGINES_FILENAME: "engines.json";
|
|
462
|
+
/** 引擎列表状态文件形状(写侧 extension 权威;读侧运行时 guard,坏形状降级空列表)。 */
|
|
463
|
+
interface SubagentEnginesFile {
|
|
464
|
+
v: 1;
|
|
465
|
+
/** 已注册引擎 id 清单(注册序稳定;展示名即 id——'pi'/'zcode' 本身是品牌名)。 */
|
|
466
|
+
engines: string[];
|
|
467
|
+
/** 写入时间(ms epoch;诊断用,读侧不依赖)。 */
|
|
468
|
+
updatedAt: number;
|
|
469
|
+
}
|
|
470
|
+
/** getEngineConfig RPC 返回形状(engines.json + config.json defaultEngine 的合成视图)。 */
|
|
471
|
+
interface SubagentEngineConfigView {
|
|
472
|
+
/** 可选引擎 id(动态发现;engines.json 缺失/损坏时为 ['pi'] 兜底——pi 恒可用)。 */
|
|
473
|
+
engines: string[];
|
|
474
|
+
/** 当前 defaultEngine(config.json 值;缺省 'pi')。 */
|
|
475
|
+
defaultEngine: string;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export { ASK_USER_MARKER, type AskUserAnswers, type AskUserOption, type AskUserQuestion, GUI_WIDGET_MARKER, type GuiComponent, type GuiComponentProps, type GuiComponentType, type GuiContext, type GuiRenderResult, PROTOCOL_VERSION, SESSION_MANAGER_ACTIONS, SESSION_MANAGER_MARKER, SUBAGENTS_ENGINES_FILENAME, type SessionManagerAbortParams, type SessionManagerAbortResult, type SessionManagerAction, type SessionManagerCreateParams, type SessionManagerCreateResult, type SessionManagerErrorResult, type SessionManagerHistoryParams, type SessionManagerHistoryResult, type SessionManagerListParams, type SessionManagerListResult, type SessionManagerParams, type SessionManagerRequest, type SessionManagerSendParams, type SessionManagerSendResult, type SessionManagerSessionSummary, type SessionManagerStatusParams, type SessionManagerStatusResult, type StatItem, type SubagentEngineConfigView, type SubagentEnginesFile, type TreeItem, type TreeItemIcon, type WidgetMeta, askUserInteract, extractGui, getAskUserAnswer, getAskUserOther, guiComponent, guiResult, guiSetWidget, isAskUserQuestion, isGuiCapable, isGuiComponent, isGuiRenderResult, isSessionManagerAbortParams, isSessionManagerCreateParams, isSessionManagerHistoryParams, isSessionManagerListParams, isSessionManagerSendParams, isSessionManagerStatusParams };
|
package/dist/index.mjs
CHANGED
|
@@ -145,12 +145,16 @@ function isSessionManagerListParams(v) {
|
|
|
145
145
|
// src/extensions/session-manager/marker.ts
|
|
146
146
|
var SESSION_MANAGER_MARKER = "\0XYZ_SESSION_MANAGER";
|
|
147
147
|
var SESSION_MANAGER_ACTIONS = ["create", "send", "history", "status", "list", "abort"];
|
|
148
|
+
|
|
149
|
+
// src/extensions/subagent-engine/contract.ts
|
|
150
|
+
var SUBAGENTS_ENGINES_FILENAME = "engines.json";
|
|
148
151
|
export {
|
|
149
152
|
ASK_USER_MARKER,
|
|
150
153
|
GUI_WIDGET_MARKER,
|
|
151
154
|
PROTOCOL_VERSION,
|
|
152
155
|
SESSION_MANAGER_ACTIONS,
|
|
153
156
|
SESSION_MANAGER_MARKER,
|
|
157
|
+
SUBAGENTS_ENGINES_FILENAME,
|
|
154
158
|
askUserInteract,
|
|
155
159
|
extractGui,
|
|
156
160
|
getAskUserAnswer,
|
package/package.json
CHANGED