@ouro.bot/cli 0.1.0-alpha.1717 → 0.1.0-alpha.1718
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 +12 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/a2a/escalation-wiring.js +23 -3
- package/dist/heart/product/active.js +20 -0
- package/dist/products/butler.js +11 -0
- package/dist/senses/a2a-entry.js +3 -15
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
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.1718",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Whether the Butler takes delegated commands and failure reports from other agents is now set in its product registration. Before, the A2A sense and the A2A server wiring each checked the Butler's name. On the Butler's image nothing changes: peers the operator granted can still send delegated commands, each one is still announced in the owner's own Telegram chat before it runs, and escalation peers can still file failure reports that are confirmed to the owner once the fix is live. The A2A sense now logs `senses.a2a_delegation_wired` when it turns delegation on. Agents with no product never get either, and that now includes a `butler` or `sanctuary` bundle run outside the Butler's image, which got both before. A notice that fails now also logs `daemon.product_hook_error`, and the command is still refused."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1717",
|
|
6
12
|
"changes": [
|
|
7
|
-
"Whether the Butler's Telegram sense is set up is now decided in one place, the Butler's product registration. The daemon's sense status and the sense lines in the Butler's prompt all read it. Before, each kept its own copy of the rule. In the Butler's image nothing changes: its Telegram is ready when both of its runtime configs can be read and neither holds a bot token, because the root gateway holds the token. It needs this machine's config, and the repair line says to finish the root authority migration rather than restore a token. Other agents' Telegram readiness is unchanged.",
|
|
8
13
|
"The summary works on iMessage as well as Teams. Held notices are only cleared once the reply carrying the summary is confirmed delivered; a failed or unconfirmed send keeps them for the next message."
|
|
9
14
|
]
|
|
10
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.0-alpha.1716",
|
|
18
|
+
"changes": [
|
|
19
|
+
"Whether the Butler's Telegram sense is set up is now decided in one place, the Butler's product registration. The daemon's sense status and the sense lines in the Butler's prompt all read it. Before, each kept its own copy of the rule. In the Butler's image nothing changes: its Telegram is ready when both of its runtime configs can be read and neither holds a bot token, because the root gateway holds the token. It needs this machine's config, and the repair line says to finish the root authority migration rather than restore a token. Other agents' Telegram readiness is unchanged."
|
|
20
|
+
]
|
|
21
|
+
},
|
|
11
22
|
{
|
|
12
23
|
"version": "0.1.0-alpha.1715",
|
|
13
24
|
"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.1718</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -35,11 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.RUNNING_HARNESS_VERSION = void 0;
|
|
37
37
|
exports.escalationOptionsFor = escalationOptionsFor;
|
|
38
|
+
exports.delegationOptionsFor = delegationOptionsFor;
|
|
38
39
|
exports.sendOwnerNoticeViaTelegram = sendOwnerNoticeViaTelegram;
|
|
39
40
|
const fs = __importStar(require("node:fs"));
|
|
40
41
|
const path = __importStar(require("node:path"));
|
|
41
42
|
const runtime_1 = require("../nerves/runtime");
|
|
42
|
-
const
|
|
43
|
+
const identity_1 = require("../heart/identity");
|
|
44
|
+
const active_1 = require("../heart/product/active");
|
|
45
|
+
const delegated_command_1 = require("./delegated-command");
|
|
43
46
|
/**
|
|
44
47
|
* The version of the harness that is running, read from its own package.json once when this module loads. A fix is
|
|
45
48
|
* "live" only when this process carries it, so the value must not follow whatever an upgrade later writes to disk.
|
|
@@ -47,14 +50,31 @@ const butler_agent_1 = require("../heart/butler-agent");
|
|
|
47
50
|
exports.RUNNING_HARNESS_VERSION = JSON.parse(fs.readFileSync(path.resolve(__dirname, "../../package.json"), "utf8")).version;
|
|
48
51
|
/**
|
|
49
52
|
* What every A2A server entry point passes as `escalation`: confirm-when-live notices go to the owner through the same
|
|
50
|
-
* owner-notice path as delegated commands. Only
|
|
53
|
+
* owner-notice path as delegated commands. Only an agent whose product files and confirms failure reports gets it.
|
|
51
54
|
*/
|
|
52
55
|
function escalationOptionsFor(agentName, sendOwnerNotice) {
|
|
53
|
-
if (
|
|
56
|
+
if ((0, active_1.productFor)(agentName)?.a2a?.escalation !== true)
|
|
54
57
|
return {};
|
|
55
58
|
(0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.a2a_escalation_wired", message: "A2A server will confirm resolved failure reports to the owner", meta: { agentName, runningVersion: exports.RUNNING_HARNESS_VERSION } });
|
|
56
59
|
return { escalation: { runningVersion: exports.RUNNING_HARNESS_VERSION, notifyOwner: sendOwnerNotice } };
|
|
57
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* What the A2A server entry passes as `delegation`: an agent whose product accepts delegated commands takes them from
|
|
63
|
+
* granted peers on its owner's menu, and the product announces each one before it runs.
|
|
64
|
+
*/
|
|
65
|
+
function delegationOptionsFor(agentName) {
|
|
66
|
+
const notifyPrincipal = (0, active_1.productDelegationNotifier)(agentName);
|
|
67
|
+
if (!notifyPrincipal)
|
|
68
|
+
return {};
|
|
69
|
+
(0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.a2a_delegation_wired", message: "A2A server will accept delegated commands from granted peers", meta: { agentName } });
|
|
70
|
+
return {
|
|
71
|
+
delegation: {
|
|
72
|
+
principalProfileId: delegated_command_1.A2A_PRINCIPAL_PROFILE_ID,
|
|
73
|
+
agentRoot: (0, identity_1.getAgentRoot)(agentName),
|
|
74
|
+
notifyPrincipal,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
58
78
|
async function sendOwnerNoticeViaTelegram(agentName, notice) {
|
|
59
79
|
const { sendTelegramOwnerNotice } = await Promise.resolve().then(() => __importStar(require("../senses/telegram")));
|
|
60
80
|
await sendTelegramOwnerNotice(agentName, { ...notice, signal: AbortSignal.timeout(30_000) });
|
|
@@ -12,6 +12,7 @@ exports.productTools = productTools;
|
|
|
12
12
|
exports.productToolDefinitions = productToolDefinitions;
|
|
13
13
|
exports.productToolSelection = productToolSelection;
|
|
14
14
|
exports.productActiveWorkSections = productActiveWorkSections;
|
|
15
|
+
exports.productDelegationNotifier = productDelegationNotifier;
|
|
15
16
|
exports.productSense = productSense;
|
|
16
17
|
exports.productSenseRepairHint = productSenseRepairHint;
|
|
17
18
|
exports.productSenseReadiness = productSenseReadiness;
|
|
@@ -202,6 +203,25 @@ async function productActiveWorkSections(input) {
|
|
|
202
203
|
throw error;
|
|
203
204
|
}
|
|
204
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* How this agent's product announces a delegated command to its owner (J8), or null when the agent takes none. A rejection
|
|
208
|
+
* refuses the command, as the A2A server does for any failed notice, and is logged as the product's.
|
|
209
|
+
*/
|
|
210
|
+
function productDelegationNotifier(agentName) {
|
|
211
|
+
const product = productFor(agentName);
|
|
212
|
+
const delegation = product?.a2a?.delegation;
|
|
213
|
+
if (!delegation)
|
|
214
|
+
return null;
|
|
215
|
+
return async (notice) => {
|
|
216
|
+
try {
|
|
217
|
+
await delegation.notifyPrincipal(agentName, notice);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
hookFailed(product, "a2a.delegation.notifyPrincipal", agentName, error, "the product's delegated-command notice failed, so the command is refused");
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
205
225
|
/** How this agent's product runs one of core's senses (J6), or null when it runs it core's way. */
|
|
206
226
|
function productSense(agentName, sense) {
|
|
207
227
|
return productFor(agentName)?.senses?.[sense] ?? null;
|
package/dist/products/butler.js
CHANGED
|
@@ -172,6 +172,17 @@ exports.product = {
|
|
|
172
172
|
repairHint: () => "Agent-runnable: complete or recover the root authority migration; do not restore a resident Telegram token.",
|
|
173
173
|
},
|
|
174
174
|
},
|
|
175
|
+
// J8: the Butler takes delegated commands from peers the operator granted, each announced in the owner's own Telegram
|
|
176
|
+
// chat before it runs (never through the owner route, never held), and files and confirms failure reports.
|
|
177
|
+
a2a: {
|
|
178
|
+
delegation: {
|
|
179
|
+
notifyPrincipal: async (agentName, notice) => {
|
|
180
|
+
const { sendTelegramDelegatedAuditNotice } = await Promise.resolve().then(() => __importStar(require("../senses/telegram")));
|
|
181
|
+
await sendTelegramDelegatedAuditNotice(agentName, { ...notice, signal: AbortSignal.timeout(30_000) });
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
escalation: true,
|
|
185
|
+
},
|
|
175
186
|
// J5: the house check runs in the daemon, and only Supercronic may fire it on its cron schedule.
|
|
176
187
|
habits: {
|
|
177
188
|
"sanctuary-health": {
|
package/dist/senses/a2a-entry.js
CHANGED
|
@@ -47,9 +47,7 @@ function argValue(name) {
|
|
|
47
47
|
}
|
|
48
48
|
const runtime_logging_1 = require("../heart/daemon/runtime-logging");
|
|
49
49
|
const runtime_1 = require("../nerves/runtime");
|
|
50
|
-
const delegated_command_1 = require("../a2a/delegated-command");
|
|
51
50
|
const identity_1 = require("../heart/identity");
|
|
52
|
-
const butler_agent_1 = require("../heart/butler-agent");
|
|
53
51
|
(0, runtime_logging_1.configureDaemonRuntimeLogger)("a2a");
|
|
54
52
|
(0, runtime_1.emitNervesEvent)({
|
|
55
53
|
component: "senses",
|
|
@@ -67,7 +65,7 @@ Promise.all([
|
|
|
67
65
|
Promise.resolve().then(() => __importStar(require("../a2a/relay-config-vault"))),
|
|
68
66
|
Promise.resolve().then(() => __importStar(require("./sense-shutdown"))),
|
|
69
67
|
])
|
|
70
|
-
.then(async ([{ startA2AServer }, { loadOrMintA2AIdentity, readStoredA2ASeed, publishOwnA2ADid }, { waitForRuntimeCredentialBootstrap, readMachineRuntimeCredentialConfig, refreshMachineRuntimeCredentialConfig, mergeMachineRuntimeCredentialConfig }, { loadOrCreateMachineIdentity }, { ready }, { escalationOptionsFor, sendOwnerNoticeViaTelegram }, { relayConfigFrom, vaultRelayConfigStore }, { installSenseShutdown },]) => {
|
|
68
|
+
.then(async ([{ startA2AServer }, { loadOrMintA2AIdentity, readStoredA2ASeed, publishOwnA2ADid }, { waitForRuntimeCredentialBootstrap, readMachineRuntimeCredentialConfig, refreshMachineRuntimeCredentialConfig, mergeMachineRuntimeCredentialConfig }, { loadOrCreateMachineIdentity }, { ready }, { delegationOptionsFor, escalationOptionsFor, sendOwnerNoticeViaTelegram }, { relayConfigFrom, vaultRelayConfigStore }, { installSenseShutdown },]) => {
|
|
71
69
|
const os = await Promise.resolve().then(() => __importStar(require("node:os")));
|
|
72
70
|
// Wait for the daemon to deliver the machine-local runtime config (carrying the
|
|
73
71
|
// a2a identity seed) into the in-memory cache before we read or mint identity.
|
|
@@ -104,18 +102,8 @@ Promise.all([
|
|
|
104
102
|
const handle = await startA2AServer({
|
|
105
103
|
agentName,
|
|
106
104
|
identity,
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
...((0, butler_agent_1.isButlerAgent)(agentName) ? {
|
|
110
|
-
delegation: {
|
|
111
|
-
principalProfileId: delegated_command_1.A2A_PRINCIPAL_PROFILE_ID,
|
|
112
|
-
agentRoot: (0, identity_1.getAgentRoot)(agentName),
|
|
113
|
-
notifyPrincipal: async (notice) => {
|
|
114
|
-
const { sendTelegramDelegatedAuditNotice } = await Promise.resolve().then(() => __importStar(require("./telegram")));
|
|
115
|
-
await sendTelegramDelegatedAuditNotice(agentName, { ...notice, signal: AbortSignal.timeout(30_000) });
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
} : {}),
|
|
105
|
+
// An agent whose product accepts delegated commands takes them from explicitly granted peers, each announced before it runs.
|
|
106
|
+
...delegationOptionsFor(agentName),
|
|
119
107
|
...escalationOptionsFor(agentName, (notice) => sendOwnerNoticeViaTelegram(agentName, notice)),
|
|
120
108
|
notifyOwner: (notice) => sendOwnerNoticeViaTelegram(agentName, notice),
|
|
121
109
|
// A friends-relay inbox for messages sent while this agent is offline, when the operator set a2a.relay.url
|
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.1718",
|
|
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.1718",
|
|
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.1718",
|
|
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": {
|