@ai-agent-forge/agent-forge 0.86.2 → 0.86.4
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/CHANGELOG.md +38 -1
- package/dist/bundle/.build-manifest.json +183 -177
- package/dist/bundle/chunks/{anthropic-messages-RJYU4TCY.js → anthropic-messages-EVFQ6MLR.js} +3 -3
- package/dist/bundle/chunks/{azure-openai-responses-LESTCUL7.js → azure-openai-responses-WQCZWFAH.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-MDOTREMR.js → chunk-3WE3W52L.js} +2 -2
- package/dist/bundle/chunks/chunk-F6SBZUJG.js +141 -0
- package/dist/bundle/chunks/{chunk-SER2HCLE.js → chunk-PE3XUHPT.js} +3 -3
- package/dist/bundle/chunks/chunk-TBPTHASB.js +2 -0
- package/dist/bundle/chunks/chunk-ZV3W36HK.js +1445 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-LQ375GYC.js +2 -0
- package/dist/bundle/chunks/google-vertex-HXSRAKEZ.js +2 -0
- package/dist/bundle/chunks/jiti-static-loader-CDSTNEDU.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-CSNMFR4J.js +5 -0
- package/dist/bundle/chunks/{openai-codex-responses-UFH6O5K6.js → openai-codex-responses-YDJSZOIH.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-A55GHA4O.js → openai-completions-UPRWTQPT.js} +3 -3
- package/dist/bundle/chunks/openai-responses-O63W6HQ3.js +2 -0
- package/dist/bundle/chunks/virtual-modules-O72ICTMQ.js +2 -0
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +14 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/session-picker.d.ts +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +8 -2
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts +4 -4
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +161 -45
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +1 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +13 -4
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +91 -93
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +15 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +20 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/template.css +10 -0
- package/dist/core/export-html/template.js +50 -17
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts.map +1 -1
- package/dist/core/extensions/bootstrap-compaction-policy.js +1 -2
- package/dist/core/extensions/bootstrap-compaction-policy.js.map +1 -1
- package/dist/core/extensions/capability-plugin.d.ts.map +1 -1
- package/dist/core/extensions/capability-plugin.js +25 -30
- package/dist/core/extensions/capability-plugin.js.map +1 -1
- package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +5 -0
- package/dist/core/extensions/jiti-static-loader.js.map +1 -0
- package/dist/core/extensions/microcompact.d.ts +16 -8
- package/dist/core/extensions/microcompact.d.ts.map +1 -1
- package/dist/core/extensions/microcompact.js +9 -7
- package/dist/core/extensions/microcompact.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +32 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/facade/coding-agent-facade.d.ts +3 -3
- package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
- package/dist/core/facade/coding-agent-facade.js.map +1 -1
- package/dist/core/facade/coding-agent-runtime-facade.d.ts +2 -2
- package/dist/core/facade/coding-agent-runtime-facade.d.ts.map +1 -1
- package/dist/core/facade/coding-agent-runtime-facade.js +4 -4
- package/dist/core/facade/coding-agent-runtime-facade.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +2 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-install-host.d.ts +1 -1
- package/dist/core/package-install-host.d.ts.map +1 -1
- package/dist/core/package-install-host.js +4 -3
- package/dist/core/package-install-host.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +61 -35
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +6 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts +23 -4
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +146 -108
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +5 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +27 -13
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -7
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +8 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +40 -4
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +5 -5
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +74 -50
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +18 -9
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +35 -32
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +14 -6
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +47 -10
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +9 -10
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +10 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/remote/server-assembly.d.ts.map +1 -1
- package/dist/remote/server-assembly.js +1 -1
- package/dist/remote/server-assembly.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +1 -12
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +88 -13
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/shell.d.ts +1 -3
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +3 -30
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/wsl.d.ts +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/docs/rpc.md +7 -5
- package/docs/sdk.md +9 -8
- package/package.json +1 -1
- package/dist/bundle/chunks/chunk-JR3Q27QP.js +0 -1581
- package/dist/bundle/chunks/chunk-KQEGUM34.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-NZ66X6K7.js +0 -2
- package/dist/bundle/chunks/google-vertex-2ZZOFBNQ.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-B6DZRMEK.js +0 -5
- package/dist/bundle/chunks/openai-responses-TJLXRAXR.js +0 -2
|
@@ -308,6 +308,7 @@ class SessionList {
|
|
|
308
308
|
allSessions = [];
|
|
309
309
|
filteredSessions = [];
|
|
310
310
|
selectedIndex = 0;
|
|
311
|
+
selectionTouched = false;
|
|
311
312
|
searchInput;
|
|
312
313
|
showCwd = false;
|
|
313
314
|
sortMode = "threaded";
|
|
@@ -372,9 +373,18 @@ class SessionList {
|
|
|
372
373
|
this.filterSessions(this.searchInput.getValue());
|
|
373
374
|
}
|
|
374
375
|
setSessions(sessions, showCwd) {
|
|
376
|
+
const selectedPath = this.selectionTouched ? this.getSelectedSessionPath() : undefined;
|
|
375
377
|
this.allSessions = sessions;
|
|
376
378
|
this.showCwd = showCwd;
|
|
377
379
|
this.filterSessions(this.searchInput.getValue());
|
|
380
|
+
if (!this.selectionTouched) {
|
|
381
|
+
this.selectedIndex = 0;
|
|
382
|
+
}
|
|
383
|
+
else if (selectedPath) {
|
|
384
|
+
const selectedIndex = this.filteredSessions.findIndex((node) => node.kind === "session" && node.session.path === selectedPath);
|
|
385
|
+
if (selectedIndex >= 0)
|
|
386
|
+
this.selectedIndex = selectedIndex;
|
|
387
|
+
}
|
|
378
388
|
}
|
|
379
389
|
/**
|
|
380
390
|
* Inject the suite dimension (设计 §10.1): "current" keeps only sessions
|
|
@@ -639,6 +649,7 @@ class SessionList {
|
|
|
639
649
|
this.startDeleteConfirmationForSelectedSession();
|
|
640
650
|
return;
|
|
641
651
|
}
|
|
652
|
+
this.selectionTouched = true;
|
|
642
653
|
// Up arrow
|
|
643
654
|
if (kb.matches(keyData, "tui.select.up")) {
|
|
644
655
|
this.selectedIndex = Math.max(0, this.selectedIndex - 1);
|
|
@@ -749,9 +760,8 @@ export class SessionSelectorComponent extends Container {
|
|
|
749
760
|
allSessionsLoader;
|
|
750
761
|
requestRender;
|
|
751
762
|
renameSession;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
allLoadSeq = 0;
|
|
763
|
+
currentLoad = null;
|
|
764
|
+
allLoad = null;
|
|
755
765
|
mode = "list";
|
|
756
766
|
renameInput = new Input();
|
|
757
767
|
renameTargetPath = null;
|
|
@@ -810,14 +820,17 @@ export class SessionSelectorComponent extends Container {
|
|
|
810
820
|
const clearStatusMessage = () => this.header.setStatusMessage(null);
|
|
811
821
|
this.sessionList.onSelect = (sessionPath) => {
|
|
812
822
|
clearStatusMessage();
|
|
823
|
+
this.cancelLoads();
|
|
813
824
|
onSelect(sessionPath);
|
|
814
825
|
};
|
|
815
826
|
this.sessionList.onCancel = () => {
|
|
816
827
|
clearStatusMessage();
|
|
828
|
+
this.cancelLoads();
|
|
817
829
|
onCancel();
|
|
818
830
|
};
|
|
819
831
|
this.sessionList.onExit = () => {
|
|
820
832
|
clearStatusMessage();
|
|
833
|
+
this.cancelLoads();
|
|
821
834
|
onExit();
|
|
822
835
|
};
|
|
823
836
|
this.sessionList.onToggleScope = () => this.toggleScope();
|
|
@@ -827,9 +840,7 @@ export class SessionSelectorComponent extends Container {
|
|
|
827
840
|
if (!renameSession)
|
|
828
841
|
return;
|
|
829
842
|
// v8 ignore next -- rename requires a visible selection, impossible while the current load is pending
|
|
830
|
-
if (this.scope === "current"
|
|
831
|
-
return;
|
|
832
|
-
if (this.scope === "all" && this.allLoading)
|
|
843
|
+
if (this.scope === "current" ? this.currentLoad : this.allLoad)
|
|
833
844
|
return;
|
|
834
845
|
const sessions = this.scope === "all" ? (this.allSessions ?? []) : (this.currentSessions ?? []);
|
|
835
846
|
const session = sessions.find((s) => s.path === sessionPath);
|
|
@@ -873,10 +884,19 @@ export class SessionSelectorComponent extends Container {
|
|
|
873
884
|
this.requestRender();
|
|
874
885
|
};
|
|
875
886
|
// Start loading current sessions immediately
|
|
876
|
-
this.
|
|
887
|
+
void this.loadScope("current");
|
|
877
888
|
}
|
|
878
|
-
|
|
879
|
-
|
|
889
|
+
cancelLoads() {
|
|
890
|
+
if (this.currentLoad) {
|
|
891
|
+
this.currentLoad.abort();
|
|
892
|
+
this.currentLoad = null;
|
|
893
|
+
this.currentSessions = null;
|
|
894
|
+
}
|
|
895
|
+
if (this.allLoad) {
|
|
896
|
+
this.allLoad.abort();
|
|
897
|
+
this.allLoad = null;
|
|
898
|
+
this.allSessions = null;
|
|
899
|
+
}
|
|
880
900
|
}
|
|
881
901
|
enterRenameMode(sessionPath, currentName) {
|
|
882
902
|
this.mode = "rename";
|
|
@@ -928,66 +948,77 @@ export class SessionSelectorComponent extends Container {
|
|
|
928
948
|
this.exitRenameMode();
|
|
929
949
|
}
|
|
930
950
|
}
|
|
931
|
-
async loadScope(scope
|
|
951
|
+
async loadScope(scope) {
|
|
952
|
+
if (scope === "current" ? this.currentLoad : this.allLoad)
|
|
953
|
+
return;
|
|
932
954
|
const showCwd = scope === "all";
|
|
933
|
-
|
|
955
|
+
const controller = new AbortController();
|
|
934
956
|
if (scope === "current") {
|
|
935
|
-
this.
|
|
957
|
+
this.currentLoad = controller;
|
|
936
958
|
}
|
|
937
959
|
else {
|
|
938
|
-
this.
|
|
960
|
+
this.allLoad = controller;
|
|
939
961
|
}
|
|
940
|
-
const seq = scope === "all" ? ++this.allLoadSeq : undefined;
|
|
941
962
|
this.header.setScope(scope);
|
|
942
963
|
this.header.setLoading(true);
|
|
943
964
|
this.requestRender();
|
|
944
|
-
const
|
|
945
|
-
|
|
965
|
+
const isActive = () => (scope === "current" ? this.currentLoad : this.allLoad) === controller;
|
|
966
|
+
const onProgress = (loaded, total, partialSessions) => {
|
|
967
|
+
if (!isActive())
|
|
946
968
|
return;
|
|
947
|
-
if (
|
|
969
|
+
if (partialSessions) {
|
|
970
|
+
const sessions = [...partialSessions];
|
|
971
|
+
if (scope === "current") {
|
|
972
|
+
this.currentSessions = sessions;
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
this.allSessions = sessions;
|
|
976
|
+
}
|
|
977
|
+
if (scope === this.scope)
|
|
978
|
+
this.sessionList.setSessions(sessions, showCwd);
|
|
979
|
+
}
|
|
980
|
+
if (scope !== this.scope)
|
|
948
981
|
return;
|
|
949
982
|
this.header.setProgress(loaded, total);
|
|
950
983
|
this.requestRender();
|
|
951
984
|
};
|
|
952
985
|
try {
|
|
953
986
|
const sessions = await (scope === "current"
|
|
954
|
-
? this.currentSessionsLoader(onProgress)
|
|
955
|
-
: this.allSessionsLoader(onProgress));
|
|
987
|
+
? this.currentSessionsLoader(onProgress, controller.signal)
|
|
988
|
+
: this.allSessionsLoader(onProgress, controller.signal));
|
|
989
|
+
if (!isActive())
|
|
990
|
+
return;
|
|
956
991
|
if (scope === "current") {
|
|
957
992
|
this.currentSessions = sessions;
|
|
958
|
-
this.
|
|
993
|
+
this.currentLoad = null;
|
|
959
994
|
}
|
|
960
995
|
else {
|
|
961
996
|
this.allSessions = sessions;
|
|
962
|
-
this.
|
|
997
|
+
this.allLoad = null;
|
|
963
998
|
}
|
|
964
999
|
if (scope !== this.scope)
|
|
965
1000
|
return;
|
|
966
|
-
// v8 ignore next -- a new all-scope load only starts after the previous one settled
|
|
967
|
-
if (seq !== undefined && seq !== this.allLoadSeq)
|
|
968
|
-
return;
|
|
969
1001
|
this.header.setLoading(false);
|
|
970
1002
|
this.sessionList.setSessions(sessions, showCwd);
|
|
971
1003
|
this.requestRender();
|
|
972
1004
|
}
|
|
973
1005
|
catch (err) {
|
|
1006
|
+
if (!isActive())
|
|
1007
|
+
return;
|
|
974
1008
|
if (scope === "current") {
|
|
975
|
-
this.
|
|
1009
|
+
this.currentLoad = null;
|
|
1010
|
+
this.currentSessions = null;
|
|
976
1011
|
}
|
|
977
1012
|
else {
|
|
978
|
-
this.
|
|
1013
|
+
this.allLoad = null;
|
|
1014
|
+
this.allSessions = null;
|
|
979
1015
|
}
|
|
980
1016
|
if (scope !== this.scope)
|
|
981
1017
|
return;
|
|
982
|
-
// v8 ignore next -- a new all-scope load only starts after the previous one settled
|
|
983
|
-
if (seq !== undefined && seq !== this.allLoadSeq)
|
|
984
|
-
return;
|
|
985
1018
|
const message = err instanceof Error ? err.message : String(err);
|
|
986
1019
|
this.header.setLoading(false);
|
|
987
1020
|
this.header.setStatusMessage({ type: "error", message: `Failed to load sessions: ${message}` }, 4000);
|
|
988
|
-
|
|
989
|
-
this.sessionList.setSessions([], showCwd);
|
|
990
|
-
}
|
|
1021
|
+
this.sessionList.setSessions([], showCwd);
|
|
991
1022
|
this.requestRender();
|
|
992
1023
|
}
|
|
993
1024
|
}
|
|
@@ -1023,28 +1054,21 @@ export class SessionSelectorComponent extends Container {
|
|
|
1023
1054
|
this.requestRender();
|
|
1024
1055
|
}
|
|
1025
1056
|
async refreshSessionsAfterMutation() {
|
|
1026
|
-
|
|
1057
|
+
this.cancelLoads();
|
|
1058
|
+
this.currentSessions = null;
|
|
1059
|
+
this.allSessions = null;
|
|
1060
|
+
await this.loadScope(this.scope);
|
|
1027
1061
|
}
|
|
1028
1062
|
toggleScope() {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
if (this.allSessions !== null) {
|
|
1033
|
-
this.header.setLoading(false);
|
|
1034
|
-
this.sessionList.setSessions(this.allSessions, true);
|
|
1035
|
-
this.requestRender();
|
|
1036
|
-
return;
|
|
1037
|
-
}
|
|
1038
|
-
if (!this.allLoading) {
|
|
1039
|
-
void this.loadScope("all", "toggle");
|
|
1040
|
-
}
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
this.scope = "current";
|
|
1063
|
+
this.scope = this.scope === "current" ? "all" : "current";
|
|
1064
|
+
const sessions = this.scope === "current" ? this.currentSessions : this.allSessions;
|
|
1065
|
+
const loading = (this.scope === "current" ? this.currentLoad : this.allLoad) !== null;
|
|
1044
1066
|
this.header.setScope(this.scope);
|
|
1045
|
-
this.header.setLoading(
|
|
1046
|
-
this.sessionList.setSessions(
|
|
1067
|
+
this.header.setLoading(loading);
|
|
1068
|
+
this.sessionList.setSessions(sessions ?? [], this.scope === "all");
|
|
1047
1069
|
this.requestRender();
|
|
1070
|
+
if (sessions === null && !loading)
|
|
1071
|
+
void this.loadScope(this.scope);
|
|
1048
1072
|
}
|
|
1049
1073
|
getSessionList() {
|
|
1050
1074
|
return this.sessionList;
|