@agentconnect.md/daemon 1.0.0-rc.271 → 1.0.0-rc.273
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/{acp-host-Da9dMauw.js → acp-host-BfCc6AlK.js} +24 -6
- package/dist/{acp-host-Da9dMauw.js.map → acp-host-BfCc6AlK.js.map} +1 -1
- package/dist/{chat-C5exDWtC.js → chat-BfgzfiG5.js} +2 -2
- package/dist/{chat-C5exDWtC.js.map → chat-BfgzfiG5.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/{login-FfGeGEde.js → login-BvyLgncV.js} +2 -2
- package/dist/{login-FfGeGEde.js.map → login-BvyLgncV.js.map} +1 -1
- package/dist/run-foreground-CXCTj8h-.js +2 -0
- package/dist/{run-foreground-C4qribod.js → run-foreground-CcV3IOs2.js} +342 -2
- package/dist/{run-foreground-C4qribod.js.map → run-foreground-CcV3IOs2.js.map} +1 -1
- package/package.json +1 -1
- package/dist/run-foreground-B-RDdyh7.js +0 -2
|
@@ -9775,19 +9775,37 @@ var AcpHost = class {
|
|
|
9775
9775
|
this.conn = client({ name: "agentconnect" }).onNotification(methods.client.session.update, (ctx) => {
|
|
9776
9776
|
if (self.loadingSessions.has(ctx.params.sessionId)) return;
|
|
9777
9777
|
self.opts.onUpdate(ctx.params.sessionId, ctx.params.update);
|
|
9778
|
-
}).onRequest(methods.client.session.requestPermission, (ctx) => {
|
|
9778
|
+
}).onRequest(methods.client.session.requestPermission, async (ctx) => {
|
|
9779
|
+
if (self.opts.onPermission) try {
|
|
9780
|
+
const res = await self.opts.onPermission(ctx.params.sessionId, ctx.params);
|
|
9781
|
+
if (res) return res;
|
|
9782
|
+
} catch (err) {
|
|
9783
|
+
self.opts.log?.debug(`acp: onPermission failed, auto-allowing: ${err.message}`);
|
|
9784
|
+
}
|
|
9779
9785
|
const optionId = (ctx.params.options.find((o) => o.kind === "allow_once" || o.kind === "allow_always") ?? ctx.params.options[0])?.optionId;
|
|
9780
9786
|
return { outcome: optionId ? {
|
|
9781
9787
|
outcome: "selected",
|
|
9782
9788
|
optionId
|
|
9783
9789
|
} : { outcome: "cancelled" } };
|
|
9790
|
+
}).onRequest(methods.client.elicitation.create, async (ctx) => {
|
|
9791
|
+
const sessionId = ctx.params.sessionId;
|
|
9792
|
+
if (self.opts.onElicit && sessionId) try {
|
|
9793
|
+
const res = await self.opts.onElicit(sessionId, ctx.params);
|
|
9794
|
+
if (res) return res;
|
|
9795
|
+
} catch (err) {
|
|
9796
|
+
self.opts.log?.debug(`acp: onElicit failed, declining: ${err.message}`);
|
|
9797
|
+
}
|
|
9798
|
+
return { action: "decline" };
|
|
9784
9799
|
}).connect(stream);
|
|
9785
9800
|
const init = await this.conn.agent.request(methods.agent.initialize, {
|
|
9786
9801
|
protocolVersion: PROTOCOL_VERSION,
|
|
9787
|
-
clientCapabilities: {
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9802
|
+
clientCapabilities: {
|
|
9803
|
+
fs: {
|
|
9804
|
+
readTextFile: false,
|
|
9805
|
+
writeTextFile: false
|
|
9806
|
+
},
|
|
9807
|
+
elicitation: { form: {} }
|
|
9808
|
+
}
|
|
9791
9809
|
});
|
|
9792
9810
|
this.negotiatedProtocolVersion = init.protocolVersion;
|
|
9793
9811
|
this.canLoad = init.agentCapabilities?.loadSession ?? false;
|
|
@@ -10035,4 +10053,4 @@ var AcpHost = class {
|
|
|
10035
10053
|
//#endregion
|
|
10036
10054
|
export { resolveRuntimes as S, writeMemoryFile as _, initGitInjection as a, cachedRuntimeNames as b, simpleGit as c, memoryProviderFor as d, MemoryConflictError as f, resolveInMemoryDir as g, listMemory as h, prepareWorkspace as i, createMemoryProvider as l, MemoryTooLargeError as m, installedRuntimes as n, probeGitVersion as o, MemoryPathError as p, prefetchWorkspace as r, sessionGitEnv as s, AcpHost as t, memoryKindOf as u, MEMORY_TOOL_NAMES as v, cachedRuntimeVersions as x, toolsForIntegrations as y };
|
|
10037
10055
|
|
|
10038
|
-
//# sourceMappingURL=acp-host-
|
|
10056
|
+
//# sourceMappingURL=acp-host-BfCc6AlK.js.map
|