@ouro.bot/cli 0.1.0-alpha.940 → 0.1.0-alpha.941
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,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.941",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Shepherd owner-requested terminal input now reports submission separately from unverified receiver receipt, execution, capability and progress; uncertain attempts retain identity and are not blindly retried."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.940",
|
|
6
12
|
"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.941</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -37,6 +37,7 @@ exports.shepherdToolDefinitions = exports.shepherdSendToolDefinition = exports.s
|
|
|
37
37
|
exports.shepherdToolsEnabled = shepherdToolsEnabled;
|
|
38
38
|
const fs = __importStar(require("node:fs"));
|
|
39
39
|
const path = __importStar(require("node:path"));
|
|
40
|
+
const node_crypto_1 = require("node:crypto");
|
|
40
41
|
const runtime_credentials_1 = require("../heart/runtime-credentials");
|
|
41
42
|
const shepherd_config_1 = require("../heart/shepherd-config");
|
|
42
43
|
const runtime_1 = require("../nerves/runtime");
|
|
@@ -228,7 +229,7 @@ exports.shepherdSendToolDefinition = {
|
|
|
228
229
|
type: "function",
|
|
229
230
|
function: {
|
|
230
231
|
name: "shepherd_send",
|
|
231
|
-
description: `Type into one coding agent's terminal on this machine for the human you are talking with, because they asked you to. Use it only to
|
|
232
|
+
description: `Type into one coding agent's terminal on this machine for the human you are talking with, because they asked you to. Use it only to submit that human's own instruction or keypress ("tell it to run the tests", "approve that", "stop it"): never on your own initiative, and never for anyone else. Give exactly one of text or key. text is one line (at most ${exports.SEND_TEXT_MAX_CHARS} characters, no control characters), typed as "[<your configured name> for <their name>] <text>" and submitted with Enter. key is pressed alone: one of ${exports.SEND_KEYS.join(", ")} (a menu or permission prompt, escape to interrupt, ctrl-c to cancel). enter, tab, a digit, y and n can approve or choose on a prompt, so they need screen from a shepherd_read made just before, and nothing is sent if the terminal changed since; tell the human what a prompt asks before approving it unless they have seen it. Pass screen with text too when the text answers what is on screen. To interrupt and then instruct, send escape, read again, then send the text. It also types into the terminal the human has focused on this machine. submission.state accepted means only that the terminal host accepted input; it may still be queued behind credential approval or a busy agent. It does not prove receiver receipt, resumed execution, restored capability or useful progress. Report those as unverified, never "unblocked" or "all unblocked" from this result or an unchanged screen. Each stronger claim needs fresh evidence from the exact target instance after this attempt, tied to this instruction; receipt alone is not progress or restored credentials. unknown may already have arrived: preserve the attempt and do not blindly resend.`,
|
|
232
233
|
parameters: {
|
|
233
234
|
type: "object",
|
|
234
235
|
properties: {
|
|
@@ -275,19 +276,45 @@ exports.shepherdSendToolDefinition = {
|
|
|
275
276
|
if (seen && seen !== now)
|
|
276
277
|
return refused("the terminal changed since it was read, so nothing was sent; read it again", meta);
|
|
277
278
|
const typed = key ? null : `[${(0, agent_presentation_1.readAgentPresentation)(ctx.agentName, ctx.agentRoot).name} for ${friend.name}] ${line}`;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
const input = key ? { key } : { text: typed };
|
|
280
|
+
const attemptId = (0, node_crypto_1.randomUUID)();
|
|
281
|
+
const attemptedAt = new Date().toISOString();
|
|
282
|
+
const receiptTarget = { host: host.name, id: target.id, ref: target.ref, instance: target.instance ?? null };
|
|
283
|
+
const verification = { received: "unverified", execution: "unverified", capability: "unverified", progress: "unverified" };
|
|
284
|
+
const retry = "Do not resend blindly; reconcile this attempt with the exact receiver first.";
|
|
285
|
+
// A rejected/expired call can follow a partial paste or an accepted key.
|
|
286
|
+
// Neither host provides an agent-receipt or progress acknowledgement here.
|
|
287
|
+
try {
|
|
288
|
+
if (key)
|
|
289
|
+
await host.key(target.id, key);
|
|
290
|
+
else
|
|
291
|
+
await host.prompt(target.id, typed);
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
const message = (0, redact_1.redactSecrets)(error instanceof Error ? error.message : String(error));
|
|
295
|
+
(0, runtime_1.emitNervesEvent)({
|
|
296
|
+
level: "warn", component: "repertoire", event: "repertoire.shepherd_send_unknown",
|
|
297
|
+
message: "terminal input outcome is unknown; do not blindly resend",
|
|
298
|
+
meta: { ...meta, session: target.id, ref: target.ref, instance: target.instance ?? null, attemptId, attemptedAt, error: message },
|
|
299
|
+
});
|
|
300
|
+
return {
|
|
301
|
+
error: message, session: target.ref, attempted: input,
|
|
302
|
+
submission: { state: "unknown", attemptId, attemptedAt, reportedAt: new Date().toISOString(), target: receiptTarget },
|
|
303
|
+
verification, retry,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
282
306
|
(0, runtime_1.emitNervesEvent)({
|
|
283
307
|
component: "repertoire",
|
|
284
308
|
event: "repertoire.shepherd_send",
|
|
285
|
-
message: "
|
|
286
|
-
meta: { ...meta, session: target.id, ref: target.ref, agent: target.agent, focused: target.focused, screenChecked: !!seen },
|
|
309
|
+
message: "terminal host accepted input; receiver receipt and progress unverified",
|
|
310
|
+
meta: { ...meta, session: target.id, ref: target.ref, instance: target.instance ?? null, attemptId, attemptedAt, agent: target.agent, focused: target.focused, screenChecked: !!seen },
|
|
287
311
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
312
|
+
await host.signal(target.id, `submitted for ${friend.name}; receipt unverified`.slice(0, STATUS_MAX_CHARS)).catch(() => undefined);
|
|
313
|
+
return {
|
|
314
|
+
session: target.ref, submitted: input, focused: target.focused,
|
|
315
|
+
submission: { state: "accepted", attemptId, attemptedAt, reportedAt: new Date().toISOString(), target: receiptTarget },
|
|
316
|
+
verification, retry,
|
|
317
|
+
};
|
|
291
318
|
});
|
|
292
319
|
},
|
|
293
320
|
summaryKeys: ["session", "key"],
|
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.941",
|
|
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.941",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|