@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
|
@@ -141,8 +141,8 @@ export function createInteractiveTui(options) {
|
|
|
141
141
|
await copyToClipboard(text);
|
|
142
142
|
return true;
|
|
143
143
|
}
|
|
144
|
-
catch {
|
|
145
|
-
return
|
|
144
|
+
catch (error) {
|
|
145
|
+
return error instanceof Error ? error.message : String(error);
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
});
|
|
@@ -295,13 +295,6 @@ export class InteractiveMode {
|
|
|
295
295
|
get session() {
|
|
296
296
|
return this.runtimeHost.session;
|
|
297
297
|
}
|
|
298
|
-
get agent() {
|
|
299
|
-
// 1B.7c: agent-loop control goes through the curated host surface.
|
|
300
|
-
return {
|
|
301
|
-
abort: () => this.session.host.abortAgent(),
|
|
302
|
-
signal: this.session.host.abortSignal,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
298
|
/**
|
|
306
299
|
* Constructor-injected settings (D-047): the TUI reads settings from the
|
|
307
300
|
* host-provided manager, never from AgentSession. Internal collaboration
|
|
@@ -1776,7 +1769,7 @@ export class InteractiveMode {
|
|
|
1776
1769
|
for (const [, component] of this.pendingTools.entries()) {
|
|
1777
1770
|
component.setArgsComplete();
|
|
1778
1771
|
}
|
|
1779
|
-
this.
|
|
1772
|
+
this.maybeShowThinkingDropNotice(this.streamingMessage);
|
|
1780
1773
|
this.maybeShowCacheMissNotice(this.streamingMessage);
|
|
1781
1774
|
}
|
|
1782
1775
|
this.streamingComponent = undefined;
|
|
@@ -2138,7 +2131,6 @@ export class InteractiveMode {
|
|
|
2138
2131
|
}
|
|
2139
2132
|
}
|
|
2140
2133
|
if (message.stopReason !== "aborted" && message.stopReason !== "error") {
|
|
2141
|
-
this.maybeShowAssistantDiagnostics(message);
|
|
2142
2134
|
const miss = cacheMisses.get(message);
|
|
2143
2135
|
if (miss)
|
|
2144
2136
|
this.addCacheMissNotice(miss);
|
|
@@ -2195,31 +2187,42 @@ export class InteractiveMode {
|
|
|
2195
2187
|
this.chatContainer.addChild(new Spacer(1));
|
|
2196
2188
|
this.chatContainer.addChild(new Text(theme.fg("warning", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0));
|
|
2197
2189
|
}
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
return;
|
|
2190
|
+
static countDroppedThinkingBlocks(message) {
|
|
2191
|
+
let count = 0;
|
|
2201
2192
|
for (const diagnostic of message.diagnostics ?? []) {
|
|
2202
2193
|
if (diagnostic.type !== "anthropic_input_transformations")
|
|
2203
2194
|
continue;
|
|
2204
2195
|
const transformations = diagnostic.details?.transformations;
|
|
2205
2196
|
if (!Array.isArray(transformations))
|
|
2206
2197
|
continue;
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
const details = transformation;
|
|
2211
|
-
if (details.type !== "thinking_dropped")
|
|
2212
|
-
return [];
|
|
2213
|
-
const reason = typeof details.reason === "string" ? details.reason : "unknown reason";
|
|
2214
|
-
const location = typeof details.path === "string" ? ` at ${details.path}` : "";
|
|
2215
|
-
return [`${reason}${location}`];
|
|
2216
|
-
});
|
|
2217
|
-
if (dropped.length === 0)
|
|
2218
|
-
continue;
|
|
2219
|
-
const noun = dropped.length === 1 ? "thinking block" : `${dropped.length} thinking blocks`;
|
|
2220
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
2221
|
-
this.chatContainer.addChild(new Text(theme.fg("warning", `Anthropic dropped ${noun}: ${dropped.join("; ")}`), 1, 0));
|
|
2198
|
+
count += transformations.filter((transformation) => typeof transformation === "object" &&
|
|
2199
|
+
transformation !== null &&
|
|
2200
|
+
transformation.type === "thinking_dropped").length;
|
|
2222
2201
|
}
|
|
2202
|
+
return count;
|
|
2203
|
+
}
|
|
2204
|
+
maybeShowThinkingDropNotice(message) {
|
|
2205
|
+
if (!this.settingsManager.getShowCacheMissNotices())
|
|
2206
|
+
return;
|
|
2207
|
+
const droppedCount = InteractiveMode.countDroppedThinkingBlocks(message);
|
|
2208
|
+
if (droppedCount === 0)
|
|
2209
|
+
return;
|
|
2210
|
+
let previousDroppedCount = 0;
|
|
2211
|
+
// message_end reaches the UI before the current message is persisted,
|
|
2212
|
+
// so the branch's last assistant message is the previous response.
|
|
2213
|
+
const entries = this.facade.getEntries();
|
|
2214
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
2215
|
+
const entry = entries[i];
|
|
2216
|
+
if (entry.type === "message" && entry.message.role === "assistant") {
|
|
2217
|
+
previousDroppedCount = InteractiveMode.countDroppedThinkingBlocks(entry.message);
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
if (droppedCount <= previousDroppedCount)
|
|
2222
|
+
return;
|
|
2223
|
+
const noun = droppedCount === 1 ? "thinking block" : "thinking blocks";
|
|
2224
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
2225
|
+
this.chatContainer.addChild(new Text(theme.fg("warning", `Anthropic dropped ${droppedCount} ${noun} (details in session)`), 1, 0));
|
|
2223
2226
|
}
|
|
2224
2227
|
/**
|
|
2225
2228
|
* Show a transcript notice when a completed assistant message paid for a
|
|
@@ -2697,7 +2700,7 @@ export class InteractiveMode {
|
|
|
2697
2700
|
if (allQueued.length === 0) {
|
|
2698
2701
|
this.updatePendingMessagesDisplay();
|
|
2699
2702
|
if (options?.abort) {
|
|
2700
|
-
this.
|
|
2703
|
+
void this.facade.abort();
|
|
2701
2704
|
}
|
|
2702
2705
|
return 0;
|
|
2703
2706
|
}
|
|
@@ -2707,7 +2710,7 @@ export class InteractiveMode {
|
|
|
2707
2710
|
this.editor.setText(combinedText);
|
|
2708
2711
|
this.updatePendingMessagesDisplay();
|
|
2709
2712
|
if (options?.abort) {
|
|
2710
|
-
this.
|
|
2713
|
+
void this.facade.abort();
|
|
2711
2714
|
}
|
|
2712
2715
|
return allQueued.length;
|
|
2713
2716
|
}
|
|
@@ -3324,7 +3327,7 @@ export class InteractiveMode {
|
|
|
3324
3327
|
}
|
|
3325
3328
|
showSessionSelector() {
|
|
3326
3329
|
this.showSelector((done) => {
|
|
3327
|
-
const selector = new SessionSelectorComponent((onProgress) => this.runtimeFacade.listSessions(onProgress), (onProgress) => this.runtimeFacade.listAllSessions(onProgress), async (sessionPath) => {
|
|
3330
|
+
const selector = new SessionSelectorComponent((onProgress, signal) => this.runtimeFacade.listSessions(onProgress, signal), (onProgress, signal) => this.runtimeFacade.listAllSessions(onProgress, signal), async (sessionPath) => {
|
|
3328
3331
|
done();
|
|
3329
3332
|
await this.handleResumeSession(sessionPath);
|
|
3330
3333
|
}, () => {
|