poe-code 3.0.269 → 3.0.270
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/cli/commands/agent.js +3 -31
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/index.js +14 -38
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/dist/providers/gemini-cli.js +10 -8
- package/dist/providers/gemini-cli.js.map +2 -2
- package/dist/providers/poe-agent.js +1 -0
- package/dist/providers/poe-agent.js.map +2 -2
- package/package.json +1 -1
- package/packages/agent-spawn/dist/acp/session-update-converter.d.ts +7 -4
- package/packages/agent-spawn/dist/acp/session-update-converter.js +16 -14
- package/packages/agent-spawn/dist/acp/types.d.ts +15 -3
- package/packages/agent-spawn/dist/index.d.ts +2 -0
- package/packages/agent-spawn/dist/index.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderAcpEvent } from "@poe-code/agent-spawn";
|
|
1
|
+
import { createToolRenderState, renderAcpEvent, sessionUpdateToEvents } from "@poe-code/agent-spawn";
|
|
2
2
|
import { DEFAULT_FRONTIER_MODEL } from "../constants.js";
|
|
3
3
|
import { createExecutionResources, resolveCommandFlags } from "./shared.js";
|
|
4
4
|
export function registerAgentCommand(program, container) {
|
|
@@ -29,10 +29,10 @@ export function registerAgentCommand(program, container) {
|
|
|
29
29
|
apiKey: options.apiKey,
|
|
30
30
|
cwd: container.env.cwd
|
|
31
31
|
});
|
|
32
|
-
const
|
|
32
|
+
const toolRenderState = createToolRenderState();
|
|
33
33
|
const response = await session.sendMessage(prompt, {
|
|
34
34
|
onSessionUpdate(update) {
|
|
35
|
-
for (const event of
|
|
35
|
+
for (const event of sessionUpdateToEvents(update, toolRenderState)) {
|
|
36
36
|
renderAcpEvent(event);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -53,32 +53,4 @@ export function registerAgentCommand(program, container) {
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function toAcpEvents(update, started) {
|
|
57
|
-
if (update.sessionUpdate === "tool_call") {
|
|
58
|
-
if (started.has(update.toolCallId))
|
|
59
|
-
return [];
|
|
60
|
-
started.add(update.toolCallId);
|
|
61
|
-
return [
|
|
62
|
-
{
|
|
63
|
-
event: "tool_start",
|
|
64
|
-
kind: "exec",
|
|
65
|
-
title: update.title,
|
|
66
|
-
id: update.toolCallId
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
}
|
|
70
|
-
if (update.sessionUpdate === "tool_call_update") {
|
|
71
|
-
if (update.status === "completed" || update.status === "failed") {
|
|
72
|
-
return [
|
|
73
|
-
{
|
|
74
|
-
event: "tool_complete",
|
|
75
|
-
kind: "exec",
|
|
76
|
-
path: typeof update.rawOutput === "string" ? update.rawOutput : "",
|
|
77
|
-
id: update.toolCallId
|
|
78
|
-
}
|
|
79
|
-
];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return [];
|
|
83
|
-
}
|
|
84
56
|
//# sourceMappingURL=agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/cli/commands/agent.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/cli/commands/agent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EAEtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAO5E,MAAM,UAAU,oBAAoB,CAAC,OAAgB,EAAE,SAAuB;IAC5E,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,kCAAkC,CAAC;SAC/C,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC;SAC3C,MAAM,CA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IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;YAED,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACzB,OAAO,EAAE,0BAA0B;gBACnC,GAAG,EAAE,4CAA4C;aAClD,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;YAC1B,CAAC;YACD,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -32759,7 +32759,7 @@ function createToolRenderState() {
|
|
|
32759
32759
|
}
|
|
32760
32760
|
function toRenderKind(kind) {
|
|
32761
32761
|
if (kind === "execute") return "exec";
|
|
32762
|
-
if (kind === "write") return "edit";
|
|
32762
|
+
if (kind === "write" || kind === "edit") return "edit";
|
|
32763
32763
|
if (kind === "read") return "read";
|
|
32764
32764
|
return "other";
|
|
32765
32765
|
}
|
|
@@ -32818,15 +32818,17 @@ function sessionUpdateToEvents(update, state) {
|
|
|
32818
32818
|
return [];
|
|
32819
32819
|
}
|
|
32820
32820
|
state.startedToolCalls.add(update.toolCallId);
|
|
32821
|
-
return [
|
|
32822
|
-
|
|
32823
|
-
|
|
32824
|
-
|
|
32825
|
-
|
|
32826
|
-
|
|
32821
|
+
return [
|
|
32822
|
+
{
|
|
32823
|
+
event: "tool_start",
|
|
32824
|
+
kind: renderKind,
|
|
32825
|
+
title: title2,
|
|
32826
|
+
id: update.toolCallId
|
|
32827
|
+
}
|
|
32828
|
+
];
|
|
32827
32829
|
}
|
|
32828
32830
|
if (update.sessionUpdate === "tool_call_update") {
|
|
32829
|
-
const renderKind =
|
|
32831
|
+
const renderKind = (update.kind == null ? void 0 : toRenderKind(update.kind)) || state.toolCallKinds.get(update.toolCallId) || "other";
|
|
32830
32832
|
state.toolCallKinds.set(update.toolCallId, renderKind);
|
|
32831
32833
|
const events = [];
|
|
32832
32834
|
const toolTitle = toToolTitle(
|
|
@@ -35608,6 +35610,7 @@ var init_src17 = __esm({
|
|
|
35608
35610
|
init_spawn_interactive();
|
|
35609
35611
|
init_autonomous();
|
|
35610
35612
|
init_renderer2();
|
|
35613
|
+
init_session_update_converter();
|
|
35611
35614
|
init_replay();
|
|
35612
35615
|
init_spawn();
|
|
35613
35616
|
init_spawn_acp();
|
|
@@ -91287,10 +91290,10 @@ function registerAgentCommand(program, container) {
|
|
|
91287
91290
|
apiKey: options.apiKey,
|
|
91288
91291
|
cwd: container.env.cwd
|
|
91289
91292
|
});
|
|
91290
|
-
const
|
|
91293
|
+
const toolRenderState = createToolRenderState();
|
|
91291
91294
|
const response = await session.sendMessage(prompt, {
|
|
91292
91295
|
onSessionUpdate(update) {
|
|
91293
|
-
for (const event of
|
|
91296
|
+
for (const event of sessionUpdateToEvents(update, toolRenderState)) {
|
|
91294
91297
|
renderAcpEvent(event);
|
|
91295
91298
|
}
|
|
91296
91299
|
}
|
|
@@ -91310,33 +91313,6 @@ function registerAgentCommand(program, container) {
|
|
|
91310
91313
|
}
|
|
91311
91314
|
});
|
|
91312
91315
|
}
|
|
91313
|
-
function toAcpEvents(update, started) {
|
|
91314
|
-
if (update.sessionUpdate === "tool_call") {
|
|
91315
|
-
if (started.has(update.toolCallId)) return [];
|
|
91316
|
-
started.add(update.toolCallId);
|
|
91317
|
-
return [
|
|
91318
|
-
{
|
|
91319
|
-
event: "tool_start",
|
|
91320
|
-
kind: "exec",
|
|
91321
|
-
title: update.title,
|
|
91322
|
-
id: update.toolCallId
|
|
91323
|
-
}
|
|
91324
|
-
];
|
|
91325
|
-
}
|
|
91326
|
-
if (update.sessionUpdate === "tool_call_update") {
|
|
91327
|
-
if (update.status === "completed" || update.status === "failed") {
|
|
91328
|
-
return [
|
|
91329
|
-
{
|
|
91330
|
-
event: "tool_complete",
|
|
91331
|
-
kind: "exec",
|
|
91332
|
-
path: typeof update.rawOutput === "string" ? update.rawOutput : "",
|
|
91333
|
-
id: update.toolCallId
|
|
91334
|
-
}
|
|
91335
|
-
];
|
|
91336
|
-
}
|
|
91337
|
-
}
|
|
91338
|
-
return [];
|
|
91339
|
-
}
|
|
91340
91316
|
var init_agent2 = __esm({
|
|
91341
91317
|
"src/cli/commands/agent.ts"() {
|
|
91342
91318
|
"use strict";
|
|
@@ -136076,7 +136052,7 @@ var init_package2 = __esm({
|
|
|
136076
136052
|
"package.json"() {
|
|
136077
136053
|
package_default2 = {
|
|
136078
136054
|
name: "poe-code",
|
|
136079
|
-
version: "3.0.
|
|
136055
|
+
version: "3.0.270",
|
|
136080
136056
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
136081
136057
|
type: "module",
|
|
136082
136058
|
main: "./dist/index.js",
|