@ouro.bot/cli 0.1.0-alpha.1631 → 0.1.0-alpha.1632
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
|
@@ -2,9 +2,11 @@
|
|
|
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
4
|
{
|
|
5
|
-
"version": "0.1.0-alpha.
|
|
5
|
+
"version": "0.1.0-alpha.1632",
|
|
6
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."
|
|
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
|
+
"Reopening a saved Ouro chat in an ACP client such as Orca now works, and long chats come back whole. Before, the client was never told it could reopen them, and longer chats lost their latest turns when reopened.",
|
|
9
|
+
"When something inside Ouro fails during an ACP chat (for example the daemon restarting), Orca now shows that error instead of asking you to sign in."
|
|
8
10
|
]
|
|
9
11
|
},
|
|
10
12
|
{
|
|
@@ -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.1632</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -38,6 +38,7 @@ const node_crypto_1 = require("node:crypto");
|
|
|
38
38
|
const readline = __importStar(require("node:readline"));
|
|
39
39
|
const frontend_socket_client_1 = require("../heart/frontend-socket-client");
|
|
40
40
|
const runtime_1 = require("../nerves/runtime");
|
|
41
|
+
const bundle_manifest_1 = require("../mind/bundle-manifest");
|
|
41
42
|
const SESSION_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
|
|
42
43
|
class AcpProtocolError extends Error {
|
|
43
44
|
code;
|
|
@@ -286,7 +287,12 @@ function createAcpServer(options) {
|
|
|
286
287
|
return;
|
|
287
288
|
if (requestParams.protocolVersion !== 1)
|
|
288
289
|
throw new AcpProtocolError(-32602, "protocolVersion must be 1");
|
|
289
|
-
result(id, {
|
|
290
|
+
result(id, {
|
|
291
|
+
protocolVersion: 1,
|
|
292
|
+
// Clients only reopen a saved chat when loading is advertised; observe-only mode refuses it.
|
|
293
|
+
agentCapabilities: { loadSession: !options.disableTools },
|
|
294
|
+
agentInfo: { name: "ouro", title: "Ouro", version: (0, bundle_manifest_1.getPackageVersion)() },
|
|
295
|
+
});
|
|
290
296
|
return;
|
|
291
297
|
}
|
|
292
298
|
if (method === "session/new") {
|
|
@@ -311,22 +317,35 @@ function createAcpServer(options) {
|
|
|
311
317
|
}
|
|
312
318
|
const sessionId = requiredString(requestParams.sessionId, "sessionId");
|
|
313
319
|
const frontend = await client();
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
// The journal answers in pages of up to 1,000 events; read every page so the newest turns show.
|
|
321
|
+
const events = [];
|
|
322
|
+
let pendingPermissions = [];
|
|
323
|
+
let afterSequence = 0;
|
|
324
|
+
for (;;) {
|
|
325
|
+
const page = await frontend.request("session.load", {
|
|
326
|
+
agent: options.agent,
|
|
327
|
+
friendId: options.friendId,
|
|
328
|
+
sessionKey: sessionId,
|
|
329
|
+
afterSequence,
|
|
330
|
+
});
|
|
331
|
+
const pageEvents = Array.isArray(page?.events) ? page.events : [];
|
|
332
|
+
events.push(...pageEvents);
|
|
333
|
+
pendingPermissions = page?.pendingPermissions ?? [];
|
|
334
|
+
const last = pageEvents.at(-1)?.sequence;
|
|
335
|
+
if (page?.hasMore !== true || typeof last !== "number" || last <= afterSequence)
|
|
336
|
+
break;
|
|
337
|
+
afterSequence = last;
|
|
322
338
|
}
|
|
339
|
+
// -32002 is ACP's resource-not-found code; clients start a new session for an unsaved chat on it.
|
|
340
|
+
if (events.length === 0)
|
|
341
|
+
throw new AcpProtocolError(-32002, "session not found");
|
|
323
342
|
// The replay rebuilds which calls are open; counters from an earlier load, or live events that
|
|
324
343
|
// arrived while this load was pending (the journal holds them too), would misnumber them.
|
|
325
344
|
toolCalls.delete(sessionId);
|
|
326
|
-
for (const event of
|
|
345
|
+
for (const event of events)
|
|
327
346
|
replayEvent(sessionId, event);
|
|
328
347
|
await subscribe(sessionId);
|
|
329
|
-
for (const pending of
|
|
348
|
+
for (const pending of pendingPermissions)
|
|
330
349
|
permissionRequest(sessionId, pending);
|
|
331
350
|
result(id, {});
|
|
332
351
|
return;
|
|
@@ -388,7 +407,8 @@ function createAcpServer(options) {
|
|
|
388
407
|
}
|
|
389
408
|
catch (caught) {
|
|
390
409
|
const id = request.id ?? null;
|
|
391
|
-
|
|
410
|
+
// ACP reserves -32000 for "authentication required", so an internal failure is JSON-RPC's -32603.
|
|
411
|
+
const code = caught instanceof AcpProtocolError ? caught.code : -32603;
|
|
392
412
|
error(id, code, caught instanceof Error ? caught.message : String(caught));
|
|
393
413
|
}
|
|
394
414
|
}
|
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.1632",
|
|
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.1632",
|
|
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.1632",
|
|
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": {
|