@zhushanwen/extension-protocol 0.14.0 → 0.15.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.ts +33 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1162,6 +1162,38 @@ declare function isInFlightReportAck(v: unknown): v is typeof INFLIGHT_REPORT_AC
|
|
|
1162
1162
|
*/
|
|
1163
1163
|
declare const SUBAGENT_INFLIGHT_MARKER = "\0TAIJI_SUBAGENT_INFLIGHT";
|
|
1164
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* subagent-workflow 通知通道的 custom_message customType 词表(单源)。
|
|
1167
|
+
*
|
|
1168
|
+
* 契约两端(值逐字节依赖,改名 = 跨侧破坏性变更):
|
|
1169
|
+
* - 写侧:@zhushanwen/pi-subagent-workflow extension(workflow 收口通知 / bg-notify
|
|
1170
|
+
* 送达 / 定向消息留痕,经 pi.sendMessage 落 custom_message entry 进 session JSONL)
|
|
1171
|
+
* 与 @zhushanwen/subagent-core(notifier 送达 + notify ledger 默认通道);
|
|
1172
|
+
* - 读侧:taiji 三层——@taiji/shared(COMPLETE_NOTIFY_CUSTOM_TYPES display 覆写
|
|
1173
|
+
* 集合 + parseSubagentDirective 判型)、runtime(event-interpreter W18 失效信号 /
|
|
1174
|
+
* subagent-extractor legacy 扫描)、core(notify-summary 边界聚合判据)。
|
|
1175
|
+
*
|
|
1176
|
+
* 历史上双侧各持裸字面量、零跨侧锚定(值相等靠手工同步,commit 21578c74f 在案)。
|
|
1177
|
+
* 收敛本单源后两侧 import 同一常量;等值锁 = 壳 __tests__/contract.notify-custom-types.test.ts
|
|
1178
|
+
* (值锚定 + 生产码不得本地重定义,防镜像回潮)。
|
|
1179
|
+
*
|
|
1180
|
+
* 注意与 worker 协议帧的 `type: "workflow-result"`(subagent-core worker-message-pump /
|
|
1181
|
+
* worker-script-builder 的 postMessage 帧 type)是同名不同域——那是引擎进程内 RPC 形状,
|
|
1182
|
+
* 不跨 pi session 边界,不进本词表。
|
|
1183
|
+
*/
|
|
1184
|
+
/** workflow run 收口通知的送达 customType。runtime event-interpreter 按它识别 run 完成
|
|
1185
|
+
* 并驱动 W18 workflow-record 失效信号;shared 完成通知 display 覆写集合亦按它收录。
|
|
1186
|
+
* 与 SUBAGENT_BG_NOTIFY_CUSTOM_TYPE 通道互斥(互用会让失效信号误判通道语义)。 */
|
|
1187
|
+
declare const WORKFLOW_RESULT_CUSTOM_TYPE: "workflow-result";
|
|
1188
|
+
/** subagent 后台完成通知的送达 customType(notifier 单条/合批 + notify ledger 默认通道;
|
|
1189
|
+
* 壳 index.ts 的 registerMessageRenderer 同按它注册 TUI 渲染)。legacy 链路的
|
|
1190
|
+
* subagent-extractor 磁盘扫描、shared display 覆写集合均按它判型。 */
|
|
1191
|
+
declare const SUBAGENT_BG_NOTIFY_CUSTOM_TYPE: "subagent-bg-notify";
|
|
1192
|
+
/** subagent 定向消息留痕的 customType(composer 四符号 `@` 定向对话:GUI 经 client.prompt
|
|
1193
|
+
* 触发 /subagents message,成功派发后落 custom_message entry——一 entry 双消费:主 agent
|
|
1194
|
+
* 上下文 + renderer 定向气泡)。shared parseSubagentDirective / runtime display 覆写消费。 */
|
|
1195
|
+
declare const SUBAGENT_DIRECTIVE_CUSTOM_TYPE: "subagent-directive";
|
|
1196
|
+
|
|
1165
1197
|
/**
|
|
1166
1198
|
* plugin-bridge 请求的 title marker。runtime event-adapter 和 pi 侧
|
|
1167
1199
|
* bridge extension(@zhushanwen/pi-plugin-bridge)双端消费此 marker,
|
|
@@ -1360,4 +1392,4 @@ declare function collectActivePendingIds(entries: unknown[], opts?: CollectPendi
|
|
|
1360
1392
|
type MappedPendingStatus = 'completed' | 'failed' | 'cancelled' | 'expired' | 'time_limited' | 'aborted';
|
|
1361
1393
|
declare function mapReasonToStatus(reason: string): MappedPendingStatus;
|
|
1362
1394
|
|
|
1363
|
-
export { ASK_USER_MARKER, type AskUserAnswers, type AskUserOption, type AskUserQuestion, BRIDGE_MARKER, BRIDGE_METHODS, type BridgeErrorResponse, type BridgeInterceptResponse, type BridgeMethod, type BridgeRequest, type BridgeSyncPayload, type BridgeToolExecuteResponse, type ChannelErrorResult, type ChoiceQuestion, type CollectPendingIdsOptions, type DualWidgetContent, type ExecutionRecord, type FormAnswers, type FormOption, type FormQuestion, GUI_WIDGET_MARKER, type GuiComponent, type GuiComponentProps, type GuiComponentType, type GuiContext, type GuiRenderResult, HISTORY_LIMIT, INFLIGHT_REPORT_ACK, MS_PER_DAY, MS_PER_HOUR, MS_PER_MINUTE, MS_PER_SECOND, type MappedPendingStatus, type MarkerRpcOptions, type MarkerRpcResult, PENDING_REGISTER_ENTRY_TYPE, PENDING_UNREGISTER_ENTRY_TYPE, PLAN_REVIEW_MARKER, PROTOCOL_VERSION, type PendingEntriesScan, type PlanDocMeta, type PlanReviewComment, type PlanReviewDecision, type PlanReviewRequest, type PlanReviewResponse, type ReplayFoldOptions, SCHEDULE_CREATE_MARKER, SESSION_MANAGER_ACTIONS, SESSION_MANAGER_MARKER, SUBAGENTS_ENGINES_FILENAME, SUBAGENT_INFLIGHT_MARKER, type ScheduleDraft, type ScheduleFormResult, type ScheduleKind, type ScheduleQuestion, type ScheduleSpec, type ScheduledTask, type SchedulerEntryLike, type SchedulerEntryOp, type SessionManagerAbortParams, type SessionManagerAbortResult, type SessionManagerAction, type SessionManagerCreateParams, type SessionManagerCreateResult, type SessionManagerErrorResult, type SessionManagerHistoryParams, type SessionManagerHistoryResult, type SessionManagerListParams, type SessionManagerListResult, type SessionManagerParams, type SessionManagerSendParams, type SessionManagerSendResult, type SessionManagerSessionSummary, type SessionManagerStatusParams, type SessionManagerStatusResult, type StatItem, type SubagentEngineConfigView, type SubagentEnginesFile, type SubagentInFlightReport, TASK_ENTRY_TYPE, type TaskKind, type TaskSnapshot, type TaskStatus, type TextQuestion, type TreeItem, type TreeItemIcon, UI_FORM_MARKER, type UiFormInteractOptions, type UiFormInteractResult, type WidgetIconPathsRejection, type WidgetIconPathsValidation, type WidgetMeta, appendExecutionRecord, applyPendingDiff, callMarkerRpc, collectActivePendingIds, dateToOnceCron, extractGui, firstContentText, formatChannelErrorText, formatDuration, formatRelativeTime, formatSchedule, getAskUserAnswer, getAskUserOther, guiComponent, guiResult, guiSetWidget, isAskUserQuestion, isBridgeErrorResponse, isBridgeInterceptResponse, isBridgeSyncPayload, isBridgeToolExecuteResponse, isChannelErrorResult, isFormAnswers, isFormQuestion, isGuiCapable, isGuiComponent, isGuiRenderResult, isInFlightReportAck, isScheduleDraft, isScheduleFormResult, isSessionManagerAbortParams, isSessionManagerCreateParams, isSessionManagerHistoryParams, isSessionManagerListParams, isSessionManagerSendParams, isSessionManagerStatusParams, isSubagentInFlightReport, isSyncedTool, mapReasonToStatus, onceCronToDate, replayFoldEntries, scanPendingEntries, setWidgetDual, snapshotToTask, uiFormInteract, validateWidgetIconPaths };
|
|
1395
|
+
export { ASK_USER_MARKER, type AskUserAnswers, type AskUserOption, type AskUserQuestion, BRIDGE_MARKER, BRIDGE_METHODS, type BridgeErrorResponse, type BridgeInterceptResponse, type BridgeMethod, type BridgeRequest, type BridgeSyncPayload, type BridgeToolExecuteResponse, type ChannelErrorResult, type ChoiceQuestion, type CollectPendingIdsOptions, type DualWidgetContent, type ExecutionRecord, type FormAnswers, type FormOption, type FormQuestion, GUI_WIDGET_MARKER, type GuiComponent, type GuiComponentProps, type GuiComponentType, type GuiContext, type GuiRenderResult, HISTORY_LIMIT, INFLIGHT_REPORT_ACK, MS_PER_DAY, MS_PER_HOUR, MS_PER_MINUTE, MS_PER_SECOND, type MappedPendingStatus, type MarkerRpcOptions, type MarkerRpcResult, PENDING_REGISTER_ENTRY_TYPE, PENDING_UNREGISTER_ENTRY_TYPE, PLAN_REVIEW_MARKER, PROTOCOL_VERSION, type PendingEntriesScan, type PlanDocMeta, type PlanReviewComment, type PlanReviewDecision, type PlanReviewRequest, type PlanReviewResponse, type ReplayFoldOptions, SCHEDULE_CREATE_MARKER, SESSION_MANAGER_ACTIONS, SESSION_MANAGER_MARKER, SUBAGENTS_ENGINES_FILENAME, SUBAGENT_BG_NOTIFY_CUSTOM_TYPE, SUBAGENT_DIRECTIVE_CUSTOM_TYPE, SUBAGENT_INFLIGHT_MARKER, type ScheduleDraft, type ScheduleFormResult, type ScheduleKind, type ScheduleQuestion, type ScheduleSpec, type ScheduledTask, type SchedulerEntryLike, type SchedulerEntryOp, type SessionManagerAbortParams, type SessionManagerAbortResult, type SessionManagerAction, type SessionManagerCreateParams, type SessionManagerCreateResult, type SessionManagerErrorResult, type SessionManagerHistoryParams, type SessionManagerHistoryResult, type SessionManagerListParams, type SessionManagerListResult, type SessionManagerParams, type SessionManagerSendParams, type SessionManagerSendResult, type SessionManagerSessionSummary, type SessionManagerStatusParams, type SessionManagerStatusResult, type StatItem, type SubagentEngineConfigView, type SubagentEnginesFile, type SubagentInFlightReport, TASK_ENTRY_TYPE, type TaskKind, type TaskSnapshot, type TaskStatus, type TextQuestion, type TreeItem, type TreeItemIcon, UI_FORM_MARKER, type UiFormInteractOptions, type UiFormInteractResult, WORKFLOW_RESULT_CUSTOM_TYPE, type WidgetIconPathsRejection, type WidgetIconPathsValidation, type WidgetMeta, appendExecutionRecord, applyPendingDiff, callMarkerRpc, collectActivePendingIds, dateToOnceCron, extractGui, firstContentText, formatChannelErrorText, formatDuration, formatRelativeTime, formatSchedule, getAskUserAnswer, getAskUserOther, guiComponent, guiResult, guiSetWidget, isAskUserQuestion, isBridgeErrorResponse, isBridgeInterceptResponse, isBridgeSyncPayload, isBridgeToolExecuteResponse, isChannelErrorResult, isFormAnswers, isFormQuestion, isGuiCapable, isGuiComponent, isGuiRenderResult, isInFlightReportAck, isScheduleDraft, isScheduleFormResult, isSessionManagerAbortParams, isSessionManagerCreateParams, isSessionManagerHistoryParams, isSessionManagerListParams, isSessionManagerSendParams, isSessionManagerStatusParams, isSubagentInFlightReport, isSyncedTool, mapReasonToStatus, onceCronToDate, replayFoldEntries, scanPendingEntries, setWidgetDual, snapshotToTask, uiFormInteract, validateWidgetIconPaths };
|
package/dist/index.js
CHANGED
|
@@ -562,6 +562,11 @@ function isInFlightReportAck(v) {
|
|
|
562
562
|
return v === INFLIGHT_REPORT_ACK;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
+
// src/extensions/subagent-notify/custom-types.ts
|
|
566
|
+
var WORKFLOW_RESULT_CUSTOM_TYPE = "workflow-result";
|
|
567
|
+
var SUBAGENT_BG_NOTIFY_CUSTOM_TYPE = "subagent-bg-notify";
|
|
568
|
+
var SUBAGENT_DIRECTIVE_CUSTOM_TYPE = "subagent-directive";
|
|
569
|
+
|
|
565
570
|
// src/extensions/plugin-bridge/marker.ts
|
|
566
571
|
var BRIDGE_MARKER = "\0TAIJI_BRIDGE";
|
|
567
572
|
var BRIDGE_METHODS = ["bridge:sync", "bridge:tool_execute", "bridge:event", "bridge:intercept"];
|
|
@@ -678,9 +683,12 @@ export {
|
|
|
678
683
|
SESSION_MANAGER_ACTIONS,
|
|
679
684
|
SESSION_MANAGER_MARKER,
|
|
680
685
|
SUBAGENTS_ENGINES_FILENAME,
|
|
686
|
+
SUBAGENT_BG_NOTIFY_CUSTOM_TYPE,
|
|
687
|
+
SUBAGENT_DIRECTIVE_CUSTOM_TYPE,
|
|
681
688
|
SUBAGENT_INFLIGHT_MARKER,
|
|
682
689
|
TASK_ENTRY_TYPE,
|
|
683
690
|
UI_FORM_MARKER,
|
|
691
|
+
WORKFLOW_RESULT_CUSTOM_TYPE,
|
|
684
692
|
appendExecutionRecord,
|
|
685
693
|
applyPendingDiff,
|
|
686
694
|
callMarkerRpc,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/extension-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Cross-layer pi extension contract package: dual-mode (TUI/GUI) rendering helpers, session/background-task/pending-entries protocols, and shared behavior primitives",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|