@ouro.bot/cli 0.1.0-alpha.1630 → 0.1.0-alpha.1631
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.json
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.1631",
|
|
6
|
+
"changes": [
|
|
7
|
+
"ACP clients such as Orca's chat now see each tool call separately. Before, two calls to the same tool in one turn shared an id, so the client merged them into one row and showed only the last result."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1630",
|
|
6
12
|
"changes": [
|
|
7
|
-
"`mailbox_deliver` now sends a waiting letter to the person's iMessage chat, as the agent, through the agent's own BlueBubbles settings. The text is the one Ouro renders, never the agent's. It goes to the handle that was set when the letter was filed, and the letter records a `delivered` event saying where it landed. A dry run shows the exact text and sends nothing.",
|
|
8
|
-
"Each letter goes to the chat once. A second deliver is refused with `already-delivered`. A send that fails after it may have reached the chat, or that outlasts its 25-second deadline, counts as delivered (`send-uncertain`), so a retry never sends the person the same letter twice. A send that never reached the chat (`send-failed`) leaves the letter waiting. A letter whose expiry has passed isn't delivered. When the person has never messaged the agent from that handle, the refusal says so.",
|
|
9
13
|
"Fixed a flaky guardrails test (#1972): its fixture filled `R/` and then `H/` placeholders in two passes, so a temp folder whose random name ended in `H` had its path rewritten and the shell call was no longer aimed at the friends store. No change to the shipped guard."
|
|
10
14
|
]
|
|
11
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.0-alpha.1629",
|
|
18
|
+
"changes": [
|
|
19
|
+
"`mailbox_deliver` now sends a waiting letter to the person's iMessage chat, as the agent, through the agent's own BlueBubbles settings. The text is the one Ouro renders, never the agent's. It goes to the handle that was set when the letter was filed, and the letter records a `delivered` event saying where it landed. A dry run shows the exact text and sends nothing.",
|
|
20
|
+
"Each letter goes to the chat once. A second deliver is refused with `already-delivered`. A send that fails after it may have reached the chat, or that outlasts its 25-second deadline, counts as delivered (`send-uncertain`), so a retry never sends the person the same letter twice. A send that never reached the chat (`send-failed`) leaves the letter waiting. A letter whose expiry has passed isn't delivered. When the person has never messaged the agent from that handle, the refusal says so."
|
|
21
|
+
]
|
|
22
|
+
},
|
|
12
23
|
{
|
|
13
24
|
"version": "0.1.0-alpha.1628",
|
|
14
25
|
"changes": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0"?>
|
|
2
2
|
<Container version="2">
|
|
3
3
|
<Name>ouro-butler</Name>
|
|
4
|
-
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1631</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -77,6 +77,7 @@ function createAcpServer(options) {
|
|
|
77
77
|
for (const prompt of activePrompts.values())
|
|
78
78
|
prompt.reject(failure);
|
|
79
79
|
pendingOutbound.clear();
|
|
80
|
+
toolCalls.clear();
|
|
80
81
|
});
|
|
81
82
|
return value;
|
|
82
83
|
});
|
|
@@ -110,6 +111,28 @@ function createAcpServer(options) {
|
|
|
110
111
|
},
|
|
111
112
|
});
|
|
112
113
|
}
|
|
114
|
+
const toolCalls = new Map();
|
|
115
|
+
function startToolCall(sessionId, turnId, name) {
|
|
116
|
+
const turns = toolCalls.get(sessionId) ?? new Map();
|
|
117
|
+
const turn = turns.get(turnId) ?? new Map();
|
|
118
|
+
const calls = turn.get(name) ?? { started: 0, open: [] };
|
|
119
|
+
calls.started += 1;
|
|
120
|
+
const toolCallId = `${turnId}:${name}:${calls.started}`;
|
|
121
|
+
calls.open.push(toolCallId);
|
|
122
|
+
turn.set(name, calls);
|
|
123
|
+
turns.set(turnId, turn);
|
|
124
|
+
toolCalls.set(sessionId, turns);
|
|
125
|
+
return toolCallId;
|
|
126
|
+
}
|
|
127
|
+
function finishToolCall(sessionId, turnId, name) {
|
|
128
|
+
return toolCalls.get(sessionId)?.get(turnId)?.get(name)?.open.shift();
|
|
129
|
+
}
|
|
130
|
+
function forgetTurnToolCalls(sessionId, turnId) {
|
|
131
|
+
const turns = toolCalls.get(sessionId);
|
|
132
|
+
turns?.delete(turnId);
|
|
133
|
+
if (turns?.size === 0)
|
|
134
|
+
toolCalls.delete(sessionId);
|
|
135
|
+
}
|
|
113
136
|
function replayEvent(sessionId, event) {
|
|
114
137
|
const data = event.data ?? {};
|
|
115
138
|
if (event.type === "user_message" && typeof data.text === "string") {
|
|
@@ -129,20 +152,36 @@ function createAcpServer(options) {
|
|
|
129
152
|
else if (event.type === "tool_started") {
|
|
130
153
|
sessionUpdate(sessionId, {
|
|
131
154
|
sessionUpdate: "tool_call",
|
|
132
|
-
toolCallId:
|
|
155
|
+
toolCallId: startToolCall(sessionId, String(event.turnId), String(data.name ?? "tool")),
|
|
133
156
|
title: String(data.name ?? "tool"),
|
|
134
157
|
status: "pending",
|
|
135
158
|
rawInput: data.args ?? {},
|
|
136
159
|
});
|
|
137
160
|
}
|
|
138
161
|
else if (event.type === "tool_completed") {
|
|
162
|
+
const name = String(data.name ?? "tool");
|
|
163
|
+
const toolCallId = finishToolCall(sessionId, String(event.turnId), name);
|
|
164
|
+
if (!toolCallId) {
|
|
165
|
+
// An ACP update must name a call the client was shown; this completion has none to close.
|
|
166
|
+
(0, runtime_1.emitNervesEvent)({
|
|
167
|
+
level: "warn",
|
|
168
|
+
component: "senses",
|
|
169
|
+
event: "senses.acp_tool_completion_unmatched",
|
|
170
|
+
message: "ACP tool completion had no open call to close",
|
|
171
|
+
meta: { sessionId, turnId: String(event.turnId), tool: name },
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
139
175
|
sessionUpdate(sessionId, {
|
|
140
176
|
sessionUpdate: "tool_call_update",
|
|
141
|
-
toolCallId
|
|
177
|
+
toolCallId,
|
|
142
178
|
status: data.success === false ? "failed" : "completed",
|
|
143
179
|
content: [{ type: "content", content: { type: "text", text: String(data.summary ?? "") } }],
|
|
144
180
|
});
|
|
145
181
|
}
|
|
182
|
+
else if (event.type === "turn_completed" || event.type === "turn_cancelled" || event.type === "turn_failed") {
|
|
183
|
+
forgetTurnToolCalls(sessionId, String(event.turnId));
|
|
184
|
+
}
|
|
146
185
|
else if (event.type === "structured_output") {
|
|
147
186
|
const output = data.output;
|
|
148
187
|
sessionUpdate(sessionId, {
|
|
@@ -159,6 +198,9 @@ function createAcpServer(options) {
|
|
|
159
198
|
return;
|
|
160
199
|
const turnId = typeof event.turnId === "string" ? event.turnId : "";
|
|
161
200
|
const active = activePrompts.get(sessionId);
|
|
201
|
+
if (event.event === "turn.completed" || event.event === "turn.cancelled" || event.event === "turn.failed") {
|
|
202
|
+
replayEvent(sessionId, { type: event.event.replace(".", "_"), turnId });
|
|
203
|
+
}
|
|
162
204
|
if (event.event === "text.delta" && typeof event.text === "string") {
|
|
163
205
|
sessionUpdate(sessionId, {
|
|
164
206
|
sessionUpdate: "agent_message_chunk",
|
|
@@ -278,6 +320,9 @@ function createAcpServer(options) {
|
|
|
278
320
|
if (!Array.isArray(replay?.events) || replay.events.length === 0) {
|
|
279
321
|
throw new AcpProtocolError(-32001, "session not found");
|
|
280
322
|
}
|
|
323
|
+
// The replay rebuilds which calls are open; counters from an earlier load, or live events that
|
|
324
|
+
// arrived while this load was pending (the journal holds them too), would misnumber them.
|
|
325
|
+
toolCalls.delete(sessionId);
|
|
281
326
|
for (const event of replay.events)
|
|
282
327
|
replayEvent(sessionId, event);
|
|
283
328
|
await subscribe(sessionId);
|
|
@@ -380,6 +425,7 @@ function createAcpServer(options) {
|
|
|
380
425
|
prompt.reject(new Error("ACP server stopped"));
|
|
381
426
|
activePrompts.clear();
|
|
382
427
|
pendingOutbound.clear();
|
|
428
|
+
toolCalls.clear();
|
|
383
429
|
sessions.clear();
|
|
384
430
|
},
|
|
385
431
|
};
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1631",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@ouro.bot/cli",
|
|
9
|
-
"version": "0.1.0-alpha.
|
|
9
|
+
"version": "0.1.0-alpha.1631",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@ouro.bot/friends"
|
|
12
12
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1631",
|
|
4
4
|
"description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
|
|
5
5
|
"homepage": "https://ouroboros.bot/",
|
|
6
6
|
"engines": {
|