@plumeai/plugin-sdk 0.1.8 → 0.2.1
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/client/ui/src/i18n/messages/en.d.ts +45 -47
- package/dist/client/ui/src/i18n/messages/zh-CN.d.ts +42 -38
- package/dist/contract/src/changes.d.ts +30 -12
- package/dist/contract/src/diagnostics.d.ts +18 -23
- package/dist/contract/src/index.d.ts +2 -2
- package/dist/contract/src/plugin.d.ts +744 -135
- package/dist/contract/src/resources.d.ts +27 -14
- package/dist/contract/src/service.d.ts +138 -40
- package/dist/contract/src/ui.d.ts +168 -39
- package/dist/core/llm/images/types.d.ts +0 -62
- package/dist/core/llm/types/message.d.ts +47 -61
- package/dist/ui.d.ts +1 -1
- package/lib/build.mjs +34 -2
- package/lib/lint/i18n.mjs +41 -3
- package/package.json +1 -1
- package/skill/SKILL.md +20 -16
- package/skill/references/components.md +17 -0
- package/skill/references/logic.md +179 -89
- package/skill/references/ui.md +94 -32
|
@@ -26,6 +26,7 @@ export declare const en: {
|
|
|
26
26
|
"override.projectValue": string;
|
|
27
27
|
"override.globalValue": string;
|
|
28
28
|
"override.overriddenNote": string;
|
|
29
|
+
"override.looseningIgnored": string;
|
|
29
30
|
"override.repoBanned": string;
|
|
30
31
|
"fileAction.exists": string;
|
|
31
32
|
"fileAction.replaceDetail": string;
|
|
@@ -169,6 +170,7 @@ export declare const en: {
|
|
|
169
170
|
"sessionCard.output": string;
|
|
170
171
|
"sessionCard.partMain": string;
|
|
171
172
|
"sessionCard.started": string;
|
|
173
|
+
"sessionCard.stewardedBy": string;
|
|
172
174
|
"sessionCard.readCache": string;
|
|
173
175
|
"reorder.saveFailed": string;
|
|
174
176
|
"sidebar.created": string;
|
|
@@ -739,6 +741,8 @@ export declare const en: {
|
|
|
739
741
|
"sessionMenu.markRead": string;
|
|
740
742
|
"sessionMenu.markedUnread": string;
|
|
741
743
|
"sessionMenu.markedRead": string;
|
|
744
|
+
"sessionMenu.revokeSteward": string;
|
|
745
|
+
"sessionMenu.stewardRevoked": string;
|
|
742
746
|
"sessionMenu.project": string;
|
|
743
747
|
"sessionMenu.moveToProject": string;
|
|
744
748
|
"sessionMenu.currentProject": string;
|
|
@@ -788,7 +792,6 @@ export declare const en: {
|
|
|
788
792
|
"tools.edit": string;
|
|
789
793
|
"tools.read": string;
|
|
790
794
|
"tools.bash": string;
|
|
791
|
-
"tools.monitor": string;
|
|
792
795
|
"tools.output": string;
|
|
793
796
|
"tools.outputOf": string;
|
|
794
797
|
"tools.outputOfTimes": {
|
|
@@ -805,39 +808,17 @@ export declare const en: {
|
|
|
805
808
|
"peers.letter": string;
|
|
806
809
|
"peers.open": string;
|
|
807
810
|
"peers.sessionGone": string;
|
|
808
|
-
"
|
|
809
|
-
"
|
|
810
|
-
"
|
|
811
|
-
"jobReturn.killed": string;
|
|
812
|
-
"jobReturn.many": {
|
|
813
|
-
one: string;
|
|
814
|
-
other: string;
|
|
815
|
-
};
|
|
816
|
-
"jobReturn.failedCount": string;
|
|
817
|
-
"jobReturn.monitorLines": {
|
|
818
|
-
one: string;
|
|
819
|
-
other: string;
|
|
820
|
-
};
|
|
821
|
-
"jobReturn.monitorStopped": string;
|
|
822
|
-
"jobReturn.monitorIdle": string;
|
|
823
|
-
"jobReturn.monitorMaxEvents": string;
|
|
824
|
-
"jobReturn.manyUpdates": {
|
|
825
|
-
one: string;
|
|
826
|
-
other: string;
|
|
827
|
-
};
|
|
828
|
-
"wakeupReturn.fired": string;
|
|
829
|
-
"sessionReturn.from": string;
|
|
830
|
-
"sessionReturn.failed": string;
|
|
811
|
+
"delivery.fromSession": string;
|
|
812
|
+
"delivery.failed": string;
|
|
813
|
+
"delivery.incomplete": string;
|
|
831
814
|
"tools.find": string;
|
|
832
815
|
"tools.grep": string;
|
|
833
816
|
"tools.ls": string;
|
|
834
|
-
"tools.todo": string;
|
|
835
|
-
"tools.todoOf": string;
|
|
836
|
-
"tools.todoAt": string;
|
|
837
817
|
"tools.using": string;
|
|
838
818
|
"tools.countOf": string;
|
|
839
819
|
"tools.countTimes": string;
|
|
840
820
|
"tools.run": string;
|
|
821
|
+
"tools.answeredBy": string;
|
|
841
822
|
"step.thinking": {
|
|
842
823
|
one: string;
|
|
843
824
|
other: string;
|
|
@@ -857,6 +838,7 @@ export declare const en: {
|
|
|
857
838
|
"questionNav.imageMessage": string;
|
|
858
839
|
"userMessage.fromChild": string;
|
|
859
840
|
"userMessage.fromPlugin": string;
|
|
841
|
+
"userMessage.relayedBy": string;
|
|
860
842
|
"userMessage.showMore": string;
|
|
861
843
|
"userMessage.showLess": string;
|
|
862
844
|
"conversation.quoteToComposer": string;
|
|
@@ -877,22 +859,6 @@ export declare const en: {
|
|
|
877
859
|
"common.send": string;
|
|
878
860
|
"userMessage.turnRunning": string;
|
|
879
861
|
"userMessage.editResend": string;
|
|
880
|
-
"taskStrip.queued": string;
|
|
881
|
-
"taskStrip.mainBusy": string;
|
|
882
|
-
"taskStrip.done": string;
|
|
883
|
-
"taskStrip.failedWith": string;
|
|
884
|
-
"taskStrip.failed": string;
|
|
885
|
-
"taskStrip.stalled": string;
|
|
886
|
-
"taskStrip.maxTurns": string;
|
|
887
|
-
"taskStrip.interrupted": string;
|
|
888
|
-
"taskStrip.withdrawn": string;
|
|
889
|
-
"taskStrip.runNow": string;
|
|
890
|
-
"taskStrip.withdraw": string;
|
|
891
|
-
"taskStrip.withdrawOne": string;
|
|
892
|
-
"taskStrip.retryOne": string;
|
|
893
|
-
"taskStrip.resumeOne": string;
|
|
894
|
-
"taskStrip.remove": string;
|
|
895
|
-
"taskStrip.removeOne": string;
|
|
896
862
|
"sideMessage.reask": string;
|
|
897
863
|
"sideMessage.busy": string;
|
|
898
864
|
"sideMessage.editAndReask": string;
|
|
@@ -1019,6 +985,8 @@ export declare const en: {
|
|
|
1019
985
|
"composer.permissionAsk": string;
|
|
1020
986
|
"composer.permissionAuto": string;
|
|
1021
987
|
"composer.permissionFull": string;
|
|
988
|
+
"composer.permissionProject": string;
|
|
989
|
+
"permission.projectNote": string;
|
|
1022
990
|
"permission.mode": string;
|
|
1023
991
|
"permission.question": string;
|
|
1024
992
|
"permission.askDetail": string;
|
|
@@ -1040,13 +1008,36 @@ export declare const en: {
|
|
|
1040
1008
|
"permission.once": string;
|
|
1041
1009
|
"approval.fromChild": string;
|
|
1042
1010
|
"approval.childUntitled": string;
|
|
1043
|
-
"approval.
|
|
1044
|
-
"approval.
|
|
1045
|
-
"approval.
|
|
1046
|
-
"approval.
|
|
1011
|
+
"approval.command": string;
|
|
1012
|
+
"approval.create": string;
|
|
1013
|
+
"approval.modify": string;
|
|
1014
|
+
"approval.view": string;
|
|
1047
1015
|
"approval.expiresIn": string;
|
|
1016
|
+
"approval.requestUnavailable": string;
|
|
1017
|
+
"approval.decline": string;
|
|
1048
1018
|
"running.waitingForAnswer": string;
|
|
1049
1019
|
"composer.plumePlaceholder": string;
|
|
1020
|
+
"contextMeter.usedPercent": string;
|
|
1021
|
+
"contextMeter.windowUsage": string;
|
|
1022
|
+
"contextMeter.window": string;
|
|
1023
|
+
"contextMeter.usedOfLimit": string;
|
|
1024
|
+
"contextMeter.percentUsed": string;
|
|
1025
|
+
"contextMeter.fileCount": {
|
|
1026
|
+
one: string;
|
|
1027
|
+
other: string;
|
|
1028
|
+
};
|
|
1029
|
+
"contextMeter.nearLimit": string;
|
|
1030
|
+
"contextMeter.used": string;
|
|
1031
|
+
"contextMeter.remaining": string;
|
|
1032
|
+
"contextMeter.memoryFiles": string;
|
|
1033
|
+
"contextMeter.noMemoryFiles": string;
|
|
1034
|
+
"contextMeter.segment.messages": string;
|
|
1035
|
+
"contextMeter.segment.tools": string;
|
|
1036
|
+
"contextMeter.segment.mcpTools": string;
|
|
1037
|
+
"contextMeter.segment.skills": string;
|
|
1038
|
+
"contextMeter.segment.systemPrompt": string;
|
|
1039
|
+
"contextMeter.segment.conventions": string;
|
|
1040
|
+
"contextMeter.segment.memory": string;
|
|
1050
1041
|
"command.slash": string;
|
|
1051
1042
|
"command.builtin": string;
|
|
1052
1043
|
"command.custom": string;
|
|
@@ -1063,6 +1054,12 @@ export declare const en: {
|
|
|
1063
1054
|
"general.autoReviewDetail": string;
|
|
1064
1055
|
"general.fullAccess": string;
|
|
1065
1056
|
"general.fullAccessDetail": string;
|
|
1057
|
+
"general.alwaysAllowDetail": string;
|
|
1058
|
+
"general.alwaysAllowEmpty": string;
|
|
1059
|
+
"general.alwaysAllowClear": string;
|
|
1060
|
+
"general.alwaysAllowRevoke": string;
|
|
1061
|
+
"general.alwaysAllowCore": string;
|
|
1062
|
+
"general.alwaysAllowRead": string;
|
|
1066
1063
|
"general.section": string;
|
|
1067
1064
|
"general.hideEmptiedProjects": string;
|
|
1068
1065
|
"general.hideEmptiedProjectsDetail": string;
|
|
@@ -1110,6 +1107,7 @@ export declare const en: {
|
|
|
1110
1107
|
"retry.fixedDetail": string;
|
|
1111
1108
|
"plugins.failed": string;
|
|
1112
1109
|
"plugins.waiting": string;
|
|
1110
|
+
"plugins.observesAll": string;
|
|
1113
1111
|
"about.intro": string;
|
|
1114
1112
|
"about.checking": string;
|
|
1115
1113
|
"about.checkInterval": string;
|
|
@@ -24,6 +24,7 @@ export declare const zhCN: {
|
|
|
24
24
|
readonly "override.projectValue": "项目值";
|
|
25
25
|
readonly "override.globalValue": "全局值";
|
|
26
26
|
readonly "override.overriddenNote": "⚠ 被项目值{mode},不生效";
|
|
27
|
+
readonly "override.looseningIgnored": "会放宽权限,已被忽略:仓库里的配置只能收紧权限,放宽要在本机的设置里改";
|
|
27
28
|
readonly "override.repoBanned": "不允许放在仓库文件里,已被忽略";
|
|
28
29
|
readonly "fileAction.exists": "「{name}」已存在";
|
|
29
30
|
readonly "fileAction.noTerminal": "请先安装并启用终端插件。";
|
|
@@ -146,6 +147,7 @@ export declare const zhCN: {
|
|
|
146
147
|
readonly "sessionCard.output": "输出";
|
|
147
148
|
readonly "sessionCard.partMain": "主会话";
|
|
148
149
|
readonly "sessionCard.started": "{at} 开始";
|
|
150
|
+
readonly "sessionCard.stewardedBy": "由 {name} 代管";
|
|
149
151
|
readonly "sessionCard.readCache": "读缓存 {n}";
|
|
150
152
|
readonly "reorder.saveFailed": "排序未能保存:{reason}";
|
|
151
153
|
readonly "sidebar.created": "最近创建";
|
|
@@ -655,6 +657,8 @@ export declare const zhCN: {
|
|
|
655
657
|
readonly "sessionMenu.markRead": "标记为已读";
|
|
656
658
|
readonly "sessionMenu.markedUnread": "已标记为未读";
|
|
657
659
|
readonly "sessionMenu.markedRead": "已标记为已读";
|
|
660
|
+
readonly "sessionMenu.revokeSteward": "停止代管";
|
|
661
|
+
readonly "sessionMenu.stewardRevoked": "已停止代管,插件不能再往这个会话里转话、答卡";
|
|
658
662
|
readonly "sessionMenu.project": "项目";
|
|
659
663
|
readonly "sessionMenu.moveToProject": "移动到项目";
|
|
660
664
|
readonly "sessionMenu.currentProject": "当前项目";
|
|
@@ -704,7 +708,6 @@ export declare const zhCN: {
|
|
|
704
708
|
readonly "tools.edit": "修改文件";
|
|
705
709
|
readonly "tools.read": "读取文件";
|
|
706
710
|
readonly "tools.bash": "执行命令";
|
|
707
|
-
readonly "tools.monitor": "监视命令";
|
|
708
711
|
readonly "tools.output": "查看输出";
|
|
709
712
|
readonly "tools.outputOf": "查看「{what}」的输出";
|
|
710
713
|
readonly "tools.outputOfTimes": "查看「{what}」的输出 {n} 次";
|
|
@@ -715,30 +718,17 @@ export declare const zhCN: {
|
|
|
715
718
|
readonly "peers.letter": "其他会话的消息";
|
|
716
719
|
readonly "peers.open": "打开这个会话";
|
|
717
720
|
readonly "peers.sessionGone": "这个会话已经不在了";
|
|
718
|
-
readonly "
|
|
719
|
-
readonly "
|
|
720
|
-
readonly "
|
|
721
|
-
readonly "jobReturn.killed": "被终止";
|
|
722
|
-
readonly "jobReturn.many": "{n} 个后台命令结束";
|
|
723
|
-
readonly "jobReturn.failedCount": "{n} 个失败";
|
|
724
|
-
readonly "jobReturn.monitorLines": "监视到 {n} 行新输出";
|
|
725
|
-
readonly "jobReturn.monitorStopped": "监视已停止";
|
|
726
|
-
readonly "jobReturn.monitorIdle": "长时间没有输出";
|
|
727
|
-
readonly "jobReturn.monitorMaxEvents": "达到行数上限";
|
|
728
|
-
readonly "jobReturn.manyUpdates": "{n} 个后台命令有新输出";
|
|
729
|
-
readonly "wakeupReturn.fired": "定时唤醒";
|
|
730
|
-
readonly "sessionReturn.from": "来自新会话";
|
|
731
|
-
readonly "sessionReturn.failed": "没跑完";
|
|
721
|
+
readonly "delivery.fromSession": "来自新会话";
|
|
722
|
+
readonly "delivery.failed": "没跑完";
|
|
723
|
+
readonly "delivery.incomplete": "只做了一部分";
|
|
732
724
|
readonly "tools.find": "查找文件";
|
|
733
725
|
readonly "tools.grep": "搜索内容";
|
|
734
726
|
readonly "tools.ls": "列出目录";
|
|
735
|
-
readonly "tools.todo": "更新清单";
|
|
736
|
-
readonly "tools.todoOf": "更新清单 {done}/{total}";
|
|
737
|
-
readonly "tools.todoAt": "更新清单 {done}/{total} · {task}";
|
|
738
727
|
readonly "tools.using": "使用工具";
|
|
739
728
|
readonly "tools.countOf": "{kind} {count} 个";
|
|
740
729
|
readonly "tools.countTimes": "{kind} {count} 次";
|
|
741
730
|
readonly "tools.run": "工具调用";
|
|
731
|
+
readonly "tools.answeredBy": "由 {name} 代答";
|
|
742
732
|
readonly "step.thinking": "思考 {n} 次";
|
|
743
733
|
readonly "step.separator": " · ";
|
|
744
734
|
readonly "conversation.showEarlier": "显示更早的 {n} 轮(共 {total} 轮)";
|
|
@@ -753,6 +743,7 @@ export declare const zhCN: {
|
|
|
753
743
|
readonly "userMessage.showMore": "展开全文";
|
|
754
744
|
readonly "userMessage.fromChild": "来自子会话";
|
|
755
745
|
readonly "userMessage.fromPlugin": "来自{name}";
|
|
746
|
+
readonly "userMessage.relayedBy": "{name} 转来";
|
|
756
747
|
readonly "userMessage.showLess": "收起";
|
|
757
748
|
readonly "conversation.quoteToComposer": "引用到输入框";
|
|
758
749
|
readonly "composer.quotesTitle": "对话引用";
|
|
@@ -766,22 +757,6 @@ export declare const zhCN: {
|
|
|
766
757
|
readonly "common.send": "发送";
|
|
767
758
|
readonly "userMessage.turnRunning": "回合进行中,无法编辑";
|
|
768
759
|
readonly "userMessage.editResend": "编辑并重新发送";
|
|
769
|
-
readonly "taskStrip.queued": "排队中";
|
|
770
|
-
readonly "taskStrip.mainBusy": "主会话执行中";
|
|
771
|
-
readonly "taskStrip.done": "已完成";
|
|
772
|
-
readonly "taskStrip.failedWith": "失败 · {error} · 可重试";
|
|
773
|
-
readonly "taskStrip.failed": "失败 · 可重试";
|
|
774
|
-
readonly "taskStrip.stalled": "没做完 · 反复做同一个调用后停下 · 可重试";
|
|
775
|
-
readonly "taskStrip.maxTurns": "没做完 · 到了轮数上限 · 可重试";
|
|
776
|
-
readonly "taskStrip.interrupted": "主会话已暂停,任务一并中断 · 可继续";
|
|
777
|
-
readonly "taskStrip.withdrawn": "已撤回";
|
|
778
|
-
readonly "taskStrip.runNow": "立即执行";
|
|
779
|
-
readonly "taskStrip.withdraw": "撤回,内容回到输入框";
|
|
780
|
-
readonly "taskStrip.withdrawOne": "撤回这个任务,内容回到输入框";
|
|
781
|
-
readonly "taskStrip.retryOne": "重试这个任务";
|
|
782
|
-
readonly "taskStrip.resumeOne": "继续这个任务";
|
|
783
|
-
readonly "taskStrip.remove": "从列表移除";
|
|
784
|
-
readonly "taskStrip.removeOne": "把这条从列表移除";
|
|
785
760
|
readonly "sideMessage.reask": "重新提问";
|
|
786
761
|
readonly "sideMessage.busy": "回答进行中,无法编辑";
|
|
787
762
|
readonly "sideMessage.editAndReask": "编辑并重新提问";
|
|
@@ -875,6 +850,8 @@ export declare const zhCN: {
|
|
|
875
850
|
readonly "composer.permissionAsk": "请求批准";
|
|
876
851
|
readonly "composer.permissionAuto": "帮我批准";
|
|
877
852
|
readonly "composer.permissionFull": "完全访问";
|
|
853
|
+
readonly "composer.permissionProject": "{mode}:这个项目的 .plume/config.json 要求的";
|
|
854
|
+
readonly "permission.projectNote": "这个项目的 .plume/config.json 要求「{mode}」,这里的对话都按它来。下面改的是本机设置,在这个项目里不会比「{mode}」宽。";
|
|
878
855
|
readonly "permission.mode": "权限模式";
|
|
879
856
|
readonly "permission.question": "应如何批准 Plume 操作?";
|
|
880
857
|
readonly "permission.askDetail": "编辑文件和运行会改动东西的命令时始终询问";
|
|
@@ -896,13 +873,33 @@ export declare const zhCN: {
|
|
|
896
873
|
readonly "permission.once": "允许一次";
|
|
897
874
|
readonly "approval.fromChild": "来自「{title}」的请求";
|
|
898
875
|
readonly "approval.childUntitled": "未命名";
|
|
899
|
-
readonly "approval.
|
|
900
|
-
readonly "approval.
|
|
901
|
-
readonly "approval.
|
|
902
|
-
readonly "approval.
|
|
876
|
+
readonly "approval.command": "执行命令";
|
|
877
|
+
readonly "approval.create": "写入文件";
|
|
878
|
+
readonly "approval.modify": "修改文件";
|
|
879
|
+
readonly "approval.view": "读取文件";
|
|
903
880
|
readonly "approval.expiresIn": "{time} 后失效";
|
|
881
|
+
readonly "approval.requestUnavailable": "这张卡画不出来(画它的插件停用了或出了错),只能不答。";
|
|
882
|
+
readonly "approval.decline": "不答";
|
|
904
883
|
readonly "running.waitingForAnswer": "等待你的回答";
|
|
905
884
|
readonly "composer.plumePlaceholder": "输入消息,/ 命令,@ 引用";
|
|
885
|
+
readonly "contextMeter.usedPercent": "上下文占用 {percent}%";
|
|
886
|
+
readonly "contextMeter.windowUsage": "上下文窗口用量";
|
|
887
|
+
readonly "contextMeter.window": "上下文窗口";
|
|
888
|
+
readonly "contextMeter.usedOfLimit": "{used} / {limit} 个 token";
|
|
889
|
+
readonly "contextMeter.percentUsed": "已用 {percent}%";
|
|
890
|
+
readonly "contextMeter.fileCount": "{n} 个文件";
|
|
891
|
+
readonly "contextMeter.nearLimit": "接近上限,较早的消息会被自动摘要压缩。开新对话可以拿回全部窗口。";
|
|
892
|
+
readonly "contextMeter.used": "上一次请求";
|
|
893
|
+
readonly "contextMeter.remaining": "剩余空间";
|
|
894
|
+
readonly "contextMeter.memoryFiles": "记忆文件";
|
|
895
|
+
readonly "contextMeter.noMemoryFiles": "当前未加载项目指令或记忆";
|
|
896
|
+
readonly "contextMeter.segment.messages": "对话消息";
|
|
897
|
+
readonly "contextMeter.segment.tools": "工具";
|
|
898
|
+
readonly "contextMeter.segment.mcpTools": "MCP 工具";
|
|
899
|
+
readonly "contextMeter.segment.skills": "技能目录";
|
|
900
|
+
readonly "contextMeter.segment.systemPrompt": "系统提示词";
|
|
901
|
+
readonly "contextMeter.segment.conventions": "项目指令";
|
|
902
|
+
readonly "contextMeter.segment.memory": "记忆";
|
|
906
903
|
readonly "command.slash": "斜杠命令";
|
|
907
904
|
readonly "command.builtin": "命令";
|
|
908
905
|
readonly "command.custom": "自定义命令";
|
|
@@ -919,6 +916,12 @@ export declare const zhCN: {
|
|
|
919
916
|
readonly "general.autoReviewDetail": "开启后命令在沙箱里直接运行,只对检测到的风险操作请求批准,比如递归删除、强制推送、写到项目外。关闭时,只读命令以外的操作都要你批准。";
|
|
920
917
|
readonly "general.fullAccess": "完全访问";
|
|
921
918
|
readonly "general.fullAccessDetail": "开启后 Plume 无需批准即可修改文件、执行命令并访问网络。这会显著提高数据丢失或意外行为的风险。";
|
|
919
|
+
readonly "general.alwaysAllowDetail": "在审批卡上点「以后不再问」记下的批准,只存在这台电脑上。撤销后,下次遇到同样的操作会重新询问。";
|
|
920
|
+
readonly "general.alwaysAllowEmpty": "还没有。在审批卡上点「以后不再问」后,批准会列在这里,可以随时撤销。";
|
|
921
|
+
readonly "general.alwaysAllowClear": "全部撤销";
|
|
922
|
+
readonly "general.alwaysAllowRevoke": "撤销";
|
|
923
|
+
readonly "general.alwaysAllowCore": "Plume";
|
|
924
|
+
readonly "general.alwaysAllowRead": "读取 {path}";
|
|
922
925
|
readonly "general.section": "常规";
|
|
923
926
|
readonly "general.hideEmptiedProjects": "归档后收起项目";
|
|
924
927
|
readonly "general.hideEmptiedProjectsDetail": "项目下的会话全部归档后,连项目一起从列表收起。从没有过会话的项目始终保留。";
|
|
@@ -966,6 +969,7 @@ export declare const zhCN: {
|
|
|
966
969
|
readonly "retry.fixedDetail": "每次大致等这么久,上下浮动两成,免得断线后大家同时重连;服务端明确要求等更久时按服务端(最多 5 分钟)。";
|
|
967
970
|
readonly "plugins.failed": "加载失败";
|
|
968
971
|
readonly "plugins.waiting": "等待服务:{services}";
|
|
972
|
+
readonly "plugins.observesAll": "能看到所有会话的运行情况:发给模型的内容、模型的回复、等人答的卡";
|
|
969
973
|
readonly "about.intro": "查看当前版本、更新内容,手动检查更新、设置自动检查的频率。";
|
|
970
974
|
readonly "about.checking": "正在检查…";
|
|
971
975
|
readonly "about.checkInterval": "自动检查更新";
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 替模型改过的文件:本体记下的改动快照(`ToolResultMessage.changes`)汇总成的净变化、能不能撤销,见 `PluginChanges`。 */
|
|
2
2
|
export interface ChangeHunk {
|
|
3
3
|
oldStart: number;
|
|
4
4
|
newStart: number;
|
|
5
|
-
lines:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
lines: ChangeLine[];
|
|
6
|
+
}
|
|
7
|
+
/** diff 里的一行;行号只在那一边有这一行时给。 */
|
|
8
|
+
export interface ChangeLine {
|
|
9
|
+
type: "context" | "add" | "remove";
|
|
10
|
+
text: string;
|
|
11
|
+
oldLine?: number;
|
|
12
|
+
newLine?: number;
|
|
11
13
|
}
|
|
12
14
|
export interface ChangedFile {
|
|
13
15
|
/** 真实绝对路径;界面只在显示时相对化,文件菜单和撤销不丢失工作目录。 */
|
|
@@ -27,11 +29,27 @@ export interface FileChangesSummary {
|
|
|
27
29
|
files: ChangedFile[];
|
|
28
30
|
warnings: string[];
|
|
29
31
|
}
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/**
|
|
33
|
+
* 工具结果的 `details` 带上这几个字段,就是声明「这次调用改了一个文件,改的是这几处」:转录的通用卡片按它画 diff、写 +N −M,
|
|
34
|
+
* 一段活的那一行把各次的加减合起来。只说这一次改了什么给人看;改了哪些文件、能不能撤销是本体记的 `ToolResultMessage.changes`,
|
|
35
|
+
* 不用工具声明。命令改的文件只有那一份,没有这一份。`details` 里别的字段照旧归插件。
|
|
36
|
+
*/
|
|
37
|
+
export interface FileDiffDetails {
|
|
38
|
+
/** 改的是哪个文件,给人看的写法(工作目录里的写相对路径);diff 按它的扩展名配色。 */
|
|
39
|
+
path: string;
|
|
40
|
+
added: number;
|
|
41
|
+
removed: number;
|
|
42
|
+
hunks: ChangeHunk[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `ctx.changes`:本体记下的改动快照汇总和撤销(交付卡、侧边聊天告诉主会话它改过哪些文件)。快照标识来自工具结果的
|
|
46
|
+
* `ToolResultMessage.changes.ids`,不接受界面传来的文件原文;工作目录用会话自己的。本体提供,别的插件换不掉。
|
|
47
|
+
*/
|
|
48
|
+
export interface PluginChanges {
|
|
49
|
+
/** 这组快照的净变化:同一文件只算首次写之前到末次写之后,改回原样的不列;快照读不出来时 `warnings` 不为空。没有这个会话时抛错。 */
|
|
50
|
+
collect(sessionId: string, ids: readonly string[]): Promise<FileChangesSummary>;
|
|
51
|
+
/** 撤销这组快照改过的文件,`path` 不给时全部;写入前重新校验快照、当前内容和项目边界,有一个不对就都不写,抛错的 message 给人看。 */
|
|
52
|
+
undo(sessionId: string, ids: readonly string[], path?: string): Promise<void>;
|
|
35
53
|
}
|
|
36
54
|
/** 撤回、编辑重发截掉一段对话时,那段里改过的一个文件。`problem` 为 null 的能安全退回到截断点之前。 */
|
|
37
55
|
export interface RevertFile {
|
|
@@ -30,7 +30,9 @@ export interface SessionObservation {
|
|
|
30
30
|
stop: TurnStop;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* 会话里登记着的一项后台任务(`ToolRun.track` 登记的),`ctx.sessions.jobs` 列出的样子。只按所属会话和任务 id 操作,不能传 pid 或日志路径。
|
|
35
|
+
*/
|
|
34
36
|
export interface BackgroundJobInfo {
|
|
35
37
|
id: string;
|
|
36
38
|
command: string;
|
|
@@ -39,32 +41,32 @@ export interface BackgroundJobInfo {
|
|
|
39
41
|
finishedAt?: number;
|
|
40
42
|
exitCode: number | null;
|
|
41
43
|
pid?: number;
|
|
44
|
+
/** `stopping`:经 `ctx.sessions.stopJob`(或删会话)叫它停了,还没退出。 */
|
|
42
45
|
status: "running" | "stopping" | "exited" | "failed";
|
|
43
46
|
error?: string;
|
|
44
|
-
|
|
47
|
+
/** 每有新输出就叫醒这个会话开一轮(监视命令):人得认得出哪一个在持续花钱。普通后台命令没有。 */
|
|
48
|
+
wakes?: true;
|
|
45
49
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}>;
|
|
55
|
-
stop(sessionId: string, jobId: string, force: boolean): boolean;
|
|
50
|
+
/** 一项后台任务的尾部输出(`ctx.sessions.jobOutput`):给人看的,不算模型读过,也不消费它的送达。 */
|
|
51
|
+
export interface BackgroundJobOutput {
|
|
52
|
+
text: string;
|
|
53
|
+
/** 任务结束了、输出也写全了。 */
|
|
54
|
+
done: boolean;
|
|
55
|
+
/** 只给了尾部,前面还有。 */
|
|
56
|
+
truncated: boolean;
|
|
57
|
+
error?: string;
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
+
* 一个会话里约好的「以后再接着做」(`ToolRun.schedule`),还没触发的那一个:`kind: "wakeup"` 是到某个时刻的一次性唤醒,
|
|
61
|
+
* `"cron"` 按 cron 表达式触发(一次或循环)。只活在 agent 进程的内存里:退出应用、人按停止、撤回或编辑重发截掉约它的那次调用都会取消。
|
|
60
62
|
*/
|
|
61
63
|
export interface SessionWakeup {
|
|
62
64
|
/** `wake-1`、`cron-2`,在会话里唯一。 */
|
|
63
65
|
id: string;
|
|
64
66
|
kind: "wakeup" | "cron";
|
|
65
|
-
/**
|
|
67
|
+
/** 到点时要接着做的事,模型写给自己的。 */
|
|
66
68
|
prompt: string;
|
|
67
|
-
/**
|
|
69
|
+
/** 给人看的几个字;没有时界面用 `prompt` 的第一行。 */
|
|
68
70
|
reason?: string;
|
|
69
71
|
/** 5 段 cron 表达式,本地时间;一次性唤醒没有。 */
|
|
70
72
|
cron?: string;
|
|
@@ -77,10 +79,3 @@ export interface SessionWakeup {
|
|
|
77
79
|
/** 已经触发过几次。 */
|
|
78
80
|
fired: number;
|
|
79
81
|
}
|
|
80
|
-
/** 服务 `session.wakeups`:读、取消会话里待触发的定时唤醒。内置插件 plume.tools 提供(它注册 `schedule_wakeup`、`cron_*` 这几件工具)。 */
|
|
81
|
-
export interface SessionWakeupsService {
|
|
82
|
-
/** 按下一次触发的先后;会话没有、没安排过时是空数组。 */
|
|
83
|
-
list(sessionId: string): SessionWakeup[];
|
|
84
|
-
/** 取消一个;已经触发了、不存在时返回 false。 */
|
|
85
|
-
cancel(sessionId: string, id: string): boolean;
|
|
86
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 共享类型:跨包、跨进程的约定都在这里,只有类型,没有运行时代码。按用途分文件:
|
|
3
3
|
*
|
|
4
|
-
* - `plugin.ts`:插件逻辑入口的 API(钩子、工具、ctx);界面入口的在 `ui.ts`(`@plume/contract/ui`);`resources.ts
|
|
4
|
+
* - `plugin.ts`:插件逻辑入口的 API(钩子、工具、ctx);界面入口的在 `ui.ts`(`@plume/contract/ui`);`resources.ts`:`ctx.resources` 的资源地址;
|
|
5
5
|
* - `service.ts`:agent 进程给界面的 AgentService、事件和视图;`usage.ts`:存储页和插件读的使用统计数据;
|
|
6
6
|
* - `app.ts`:agent 和装配它的应用之间的约定(待加载的插件、日志)。
|
|
7
7
|
*
|
|
8
8
|
* 消息类型定义在 `@plume/llm`,在这里转出,使用方一律从 `@plume/contract` 引用。
|
|
9
9
|
*/
|
|
10
|
-
export type { ApiFormat, AssistantMessage, DeliveredReport, ImageContent, Message, MessageAttachment, PeerLetter, TextContent, ToolResultMessage, ToolSpec, UserContent, UserMessage, } from "../../core/llm/types.d.ts";
|
|
10
|
+
export type { ApiFormat, AssistantMessage, DeliveredReport, FileChanges, ImageContent, Message, MessageAttachment, PeerLetter, TextContent, ToolResultMessage, ToolSpec, UserContent, UserMessage, } from "../../core/llm/types.d.ts";
|
|
11
11
|
export type { CallContext } from "../../infra/rpc/src/index.d.ts";
|
|
12
12
|
export type * from "./app.ts";
|
|
13
13
|
export type * from "./changes.ts";
|