@ouro.bot/cli 0.1.0-alpha.1383 → 0.1.0-alpha.1385
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 +14 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/mailbox-ui/assets/index-B5PHJ96n.js +1 -0
- package/dist/mailbox-ui/assets/index-C1x3aMJb.css +1 -0
- package/dist/mailbox-ui/assets/vendor-BfcLUM_P.js +65 -0
- package/dist/mailbox-ui/index.html +3 -3
- package/dist/senses/a2a-entry.js +3 -3
- package/dist/senses/telegram.js +34 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/mailbox-ui/assets/index-CmMXMK-O.js +0 -1
- package/dist/mailbox-ui/assets/index-DrBzo6CV.css +0 -1
- package/dist/mailbox-ui/assets/vendor-C-KA_woR.js +0 -65
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<meta name="color-scheme" content="dark" />
|
|
7
7
|
<title>Ouro Mailbox</title>
|
|
8
8
|
<meta name="description" content="The daemon-hosted shared orientation surface for agents alive on this machine." />
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-B5PHJ96n.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-BfcLUM_P.js">
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C1x3aMJb.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<script>(function(w,d){if(w.__ouroFragmentFocus)return;var s=d.currentScript,n=s;while(n&&!n.nextSibling)n=n.parentNode;w.__ouroFragmentFocus={parsed:d.readyState==="loading"&&!!s&&!n,script:s};var ua=navigator.userAgent;if(!/AppleWebKit/.test(ua)||/Chrome\/|Edg\//.test(ua))return;var done=new WeakSet,failed=new WeakSet,jump=null,until=0,i,l=d.querySelectorAll('link[rel~="stylesheet"]');for(i=0;i<l.length;i++)done.add(l[i]);function pending(x){return !done.has(x)&&x.getAttribute("href")&&!x.disabled&&!/\balternate\b/i.test(x.rel)}function sheets(){return d.querySelectorAll('link[rel~="stylesheet"]')}function loading(){var a=sheets(),j;for(j=0;j<a.length;j++)if(pending(a[j]))return true;return false}function importing(s){try{for(var r=s.cssRules,i=0;i<r.length;i++)if(r[i] instanceof CSSImportRule&&(!r[i].styleSheet||importing(r[i].styleSheet)))return true}catch(e){}return false}function renew(x){if(!x.sheet&&!failed.has(x))x.replaceWith(x.cloneNode(true))}d.addEventListener("DOMContentLoaded",function(){w.addEventListener("DOMContentLoaded",setAside,{once:true})});function setAside(){var a=sheets(),held=[],j;for(j=0;j<a.length;j++)if(pending(a[j])&&(importing(a[j].sheet)||!a[j].sheet)){a[j].disabled=true;held.push(a[j])}if(held.length)setTimeout(function(){for(var k=0;k<held.length;k++){var x=held[k];x.disabled=false;if(!x.sheet){if(done.has(x))renew(x);else x.addEventListener("load",renew.bind(null,x),{once:true})}}})}function here(){return location.href.split("#")[0]}function follow(){if(jump&&(!loading()||Date.now()>=until)){var h=jump;jump=null;if(h.split("#")[0]===here())location.assign(h)}}function drop(){jump=null}w.addEventListener("popstate",drop);w.addEventListener("hashchange",drop);function settle(e){if(e.target&&e.target.localName==="link"){done.add(e.target);if(e.type==="error")failed.add(e.target);setTimeout(follow)}}d.addEventListener("load",settle,true);d.addEventListener("error",settle,true);w.addEventListener("click",function(e){var p=e.composedPath(),a,k,h;for(k=0;k<p.length;k++)if((p[k].localName==="a"||p[k].localName==="area")&&typeof p[k].href==="string"&&p[k].hasAttribute("href")){a=p[k];break}if(!a)return;jump=null;if(e.defaultPrevented||e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a.target&&a.target!=="_self")||a.hasAttribute("download"))return;h=a.href;if(h.indexOf("#")<0||h.split("#")[0]!==here()||!loading())return;e.preventDefault();jump=h;until=Date.now()+2000;setTimeout(follow,2000)})})(window,document)</script>
|
package/dist/senses/a2a-entry.js
CHANGED
|
@@ -103,14 +103,14 @@ Promise.all([
|
|
|
103
103
|
agentName,
|
|
104
104
|
identity,
|
|
105
105
|
// The Butler accepts delegated commands from explicitly granted peers; each
|
|
106
|
-
// one is announced in the owner's Telegram chat before it runs.
|
|
106
|
+
// one is announced in the owner's own Telegram chat before it runs (never through the owner route, never held).
|
|
107
107
|
...(agentName === "sanctuary" ? {
|
|
108
108
|
delegation: {
|
|
109
109
|
principalProfileId: delegated_command_1.A2A_PRINCIPAL_PROFILE_ID,
|
|
110
110
|
agentRoot: (0, identity_1.getAgentRoot)(agentName),
|
|
111
111
|
notifyPrincipal: async (notice) => {
|
|
112
|
-
const {
|
|
113
|
-
await
|
|
112
|
+
const { sendTelegramDelegatedAuditNotice } = await Promise.resolve().then(() => __importStar(require("./telegram")));
|
|
113
|
+
await sendTelegramDelegatedAuditNotice(agentName, { ...notice, signal: AbortSignal.timeout(30_000) });
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
116
|
} : {}),
|
package/dist/senses/telegram.js
CHANGED
|
@@ -52,6 +52,7 @@ exports.loadTelegramSenseCredentials = loadTelegramSenseCredentials;
|
|
|
52
52
|
exports.createProductionTelegramRelationshipComposition = createProductionTelegramRelationshipComposition;
|
|
53
53
|
exports.startTelegramSenseApp = startTelegramSenseApp;
|
|
54
54
|
exports.sendTelegramExternalEventDecision = sendTelegramExternalEventDecision;
|
|
55
|
+
exports.sendTelegramDelegatedAuditNotice = sendTelegramDelegatedAuditNotice;
|
|
55
56
|
exports.sendTelegramOwnerNotice = sendTelegramOwnerNotice;
|
|
56
57
|
exports.createProactiveRepetitionGuard = createProactiveRepetitionGuard;
|
|
57
58
|
exports.withTelegramTypingIndicator = withTelegramTypingIndicator;
|
|
@@ -1039,13 +1040,13 @@ function createTelegramSenseApp(options) {
|
|
|
1039
1040
|
approvalReconciliationsInFlight.add(failsafe);
|
|
1040
1041
|
}, delay);
|
|
1041
1042
|
};
|
|
1042
|
-
const deliverButlerEffect = async (text, idempotencyKey, signal, onMessageDelivered, exactDownloadCreditQuestion = false, replyToMessageId) => {
|
|
1043
|
+
const deliverButlerEffect = async (text, idempotencyKey, signal, onMessageDelivered, exactDownloadCreditQuestion = false, replyToMessageId, silent = false) => {
|
|
1043
1044
|
const presentedText = (0, sanctuary_download_credit_presentation_1.presentSanctuaryDownloadCreditReply)(options.agentName, exactDownloadCreditQuestion, text);
|
|
1044
1045
|
return executeAuthorizedEffect({
|
|
1045
1046
|
idempotencyKey,
|
|
1046
1047
|
target: configuredOwnerTarget(),
|
|
1047
1048
|
authorClass: "butler",
|
|
1048
|
-
effect: { kind: "text", text: presentedText, ...(replyToMessageId ? { replyToMessageId } : {}) },
|
|
1049
|
+
effect: { kind: "text", text: presentedText, ...(replyToMessageId ? { replyToMessageId } : {}), ...(silent ? { silent: true } : {}) },
|
|
1049
1050
|
...(signal ? { signal } : {}),
|
|
1050
1051
|
...(onMessageDelivered ? { onMessageDelivered } : {}),
|
|
1051
1052
|
});
|
|
@@ -2069,6 +2070,8 @@ function createTelegramSenseApp(options) {
|
|
|
2069
2070
|
const noticeId = requiredText(input.noticeId, "owner notice id");
|
|
2070
2071
|
if (Buffer.byteLength(noticeId) > 512)
|
|
2071
2072
|
throw new Error("Telegram owner notice id is invalid");
|
|
2073
|
+
if (noticeId.startsWith("delegated:"))
|
|
2074
|
+
return this.sendDelegatedAuditNotice({ ...input, noticeId });
|
|
2072
2075
|
await runWithAcceptanceAuditOwner(async () => {
|
|
2073
2076
|
const text = requiredText(input.text, "owner notice");
|
|
2074
2077
|
const telegramText = await routeSelfStarted(text, `owner-notice:${noticeId}`, undefined, input.signal);
|
|
@@ -2083,6 +2086,25 @@ function createTelegramSenseApp(options) {
|
|
|
2083
2086
|
await recordAcceptedEffects(sessionPath, [effect]);
|
|
2084
2087
|
});
|
|
2085
2088
|
},
|
|
2089
|
+
async sendDelegatedAuditNotice(input) {
|
|
2090
|
+
const noticeId = requiredText(input.noticeId, "delegated audit notice id");
|
|
2091
|
+
if (!noticeId.startsWith("delegated:") || Buffer.byteLength(noticeId) > 512)
|
|
2092
|
+
throw new Error("Telegram delegated audit notice id is invalid");
|
|
2093
|
+
const key = `owner-notice:${noticeId}`;
|
|
2094
|
+
await runWithAcceptanceAuditOwner(async () => {
|
|
2095
|
+
const text = requiredText(input.text, "delegated audit notice");
|
|
2096
|
+
if (ownerChatIsHandedOff()) {
|
|
2097
|
+
(0, runtime_1.emitNervesEvent)({ level: "warn", component: "senses", event: "senses.telegram_delegated_notice_refused", message: "refused a delegated command's audit notice while the owner's chat is handed to someone else", meta: { agentName: options.agentName, reason: "handed_off" } });
|
|
2098
|
+
throw new Error("the owner's Telegram chat is handed to someone else, so a delegated command's notice can't be sent");
|
|
2099
|
+
}
|
|
2100
|
+
const pacingReason = options.proactivePacing ? (0, telegram_handoff_1.proactiveHoldReason)(proactiveLedgerPath, new Date(), options.proactivePacing) : null;
|
|
2101
|
+
const silent = options.ownerRoute !== undefined || pacingReason === "quiet_hours";
|
|
2102
|
+
const effect = await deliverButlerEffect(text, key, input.signal, undefined, false, undefined, silent);
|
|
2103
|
+
(0, runtime_1.emitNervesEvent)({ component: "senses", event: "senses.telegram_delegated_notice_sent", message: "sent a delegated command's audit notice to the owner's Telegram chat", meta: { agentName: options.agentName, silent } });
|
|
2104
|
+
const sessionPath = (0, shared_turn_1.getSenseSessionPath)(options.agentName, configuredOwnerFriendId, "telegram", configuredOwnerSessionKey, agentRoot);
|
|
2105
|
+
await recordAcceptedEffects(sessionPath, [effect]);
|
|
2106
|
+
});
|
|
2107
|
+
},
|
|
2086
2108
|
stop() {
|
|
2087
2109
|
if (stopPromise)
|
|
2088
2110
|
return stopPromise;
|
|
@@ -2421,6 +2443,16 @@ async function sendTelegramExternalEventDecision(agentName, input) {
|
|
|
2421
2443
|
await app.stop();
|
|
2422
2444
|
}
|
|
2423
2445
|
}
|
|
2446
|
+
/** Sends a delegated command's audit notice; see `sendDelegatedAuditNotice`. Throws when it can't be sent. */
|
|
2447
|
+
async function sendTelegramDelegatedAuditNotice(agentName, input) {
|
|
2448
|
+
const app = await startTelegramSenseApp(agentName);
|
|
2449
|
+
try {
|
|
2450
|
+
await app.sendDelegatedAuditNotice(input);
|
|
2451
|
+
}
|
|
2452
|
+
finally {
|
|
2453
|
+
await app.stop();
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2424
2456
|
async function sendTelegramOwnerNotice(agentName, input) {
|
|
2425
2457
|
const app = await startTelegramSenseApp(agentName);
|
|
2426
2458
|
try {
|
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.1385",
|
|
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.1385",
|
|
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.1385",
|
|
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": {
|