@ouro.bot/cli 0.1.0-alpha.1617 → 0.1.0-alpha.1618
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 +4 -2
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/repertoire/tools-surface.js +1 -1
- package/dist/senses/bluebubbles/index.js +1 -1
- package/dist/senses/proactive-content-guard.js +63 -15
- package/dist/senses/teams.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
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.1618",
|
|
6
6
|
"changes": [
|
|
7
|
-
"Blind interviews, product U: every arm's sandbox container now has 4 GB of memory instead of 2 GB. Grading a component built on the shadcn kit peaks at about 2 GB, so at 2 GB it thrashed until the turn's time limit and the arm ended ungraded. A guest can now name its own container memory (`memory`, such as `4g`); the household and helper containers keep 2 GB."
|
|
7
|
+
"Blind interviews, product U: every arm's sandbox container now has 4 GB of memory instead of 2 GB. Grading a component built on the shadcn kit peaks at about 2 GB, so at 2 GB it thrashed until the turn's time limit and the arm ended ungraded. A guest can now name its own container memory (`memory`, such as `4g`); the household and helper containers keep 2 GB.",
|
|
8
|
+
"An ask on its way to a person (through `surface`, `send_message`, Teams or iMessage) now reaches them only when it names something only their body can do: approve a number or prompt on their own phone (2FA, GitHub Mobile, a passkey), pay with their card, or make an irreversible call that is theirs. An ask to run a command, press a key at a prompt, paste a code from their mail, sign in on a particular machine, accept terms or change a setting by hand goes back to the sender with \"do it yourself; you have standing authority\". A \"you need to sign in to gh\" ask is checked with `gh auth status` first and dropped when gh is already signed in. Sign-in, password and verification-code asks are no longer treated as theirs.",
|
|
9
|
+
"The auth and mail docs no longer tell agents to hand browser logins, dashboards, API tokens, HEY export or DNS to the person: those are the agent's, with its vault and browser."
|
|
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.1618</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -349,7 +349,7 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
|
|
|
349
349
|
return { status: "unconfirmed", detail: unconfirmedDetail("Teams") };
|
|
350
350
|
if (sent?.reason && CONTENT_REFUSALS.has(sent.reason)) {
|
|
351
351
|
const held = (0, proactive_content_guard_1.getProactiveInternalContentBlockReason)(content);
|
|
352
|
-
const detail = (0, proactive_content_guard_1.
|
|
352
|
+
const detail = (0, proactive_content_guard_1.isReturnToSenderReason)(held)
|
|
353
353
|
? (0, proactive_content_guard_1.proactiveContentBlockGuidance)(held)
|
|
354
354
|
: `blocked: Teams refused this text as internal (${sent.reason}); rewrite it as plain words for them`;
|
|
355
355
|
return { status: "failed", detail: (0, tool_error_code_1.withCode)(detail, "delivery-blocked") };
|
|
@@ -4433,7 +4433,7 @@ async function drainAndSendPendingBlueBubbles(deps = {}, pendingRoot) {
|
|
|
4433
4433
|
reason: internalBlockReason,
|
|
4434
4434
|
source: "pending_drain",
|
|
4435
4435
|
});
|
|
4436
|
-
if ((0, proactive_content_guard_1.
|
|
4436
|
+
if ((0, proactive_content_guard_1.isReturnToSenderReason)(internalBlockReason)) {
|
|
4437
4437
|
await (0, proactive_content_guard_1.returnHeldProactiveMessage)({ agentName: (0, identity_1.getAgentName)(), friendId, text: messageText, reason: internalBlockReason });
|
|
4438
4438
|
}
|
|
4439
4439
|
continue;
|
|
@@ -34,10 +34,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getProactiveInternalContentBlockReason = getProactiveInternalContentBlockReason;
|
|
37
|
-
exports.
|
|
37
|
+
exports.isReturnToSenderReason = isReturnToSenderReason;
|
|
38
38
|
exports.proactiveContentBlockGuidance = proactiveContentBlockGuidance;
|
|
39
39
|
exports.returnHeldProactiveMessage = returnHeldProactiveMessage;
|
|
40
40
|
exports.emitProactiveInternalContentBlocked = emitProactiveInternalContentBlocked;
|
|
41
|
+
const child_process_1 = require("child_process");
|
|
41
42
|
const runtime_1 = require("../nerves/runtime");
|
|
42
43
|
// ── Patterns ────────────────────────────────────────────────────
|
|
43
44
|
const PROACTIVE_INTERNAL_CONTENT_PATTERNS = [
|
|
@@ -62,14 +63,54 @@ const PROACTIVE_INTERNAL_CONTENT_PATTERNS = [
|
|
|
62
63
|
{ reason: "heartbeat_status", pattern: /\bobligations?\s+showing\b/i },
|
|
63
64
|
{ reason: "heartbeat_status", pattern: /\bsame state\b/i },
|
|
64
65
|
];
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
// ── Asks that aren't theirs ─────────────────────────────────────
|
|
67
|
+
// An ask reaches a person only when it names something only their body can do: approve a number or prompt on their own
|
|
68
|
+
// phone, pay with their card, or make an irreversible call that is theirs. The rest goes back to the sender.
|
|
69
|
+
// The sentence asks them to act: it opens with a command, or asks "can you", "please", "you need to".
|
|
70
|
+
const ASK_FRAME = /^\s*(?:[-*\u2022]\s*)?(?:\w+[:,]\s*)?(?:please\s+)?(?:run|type|press|paste|enter|sign|log|accept|make|open|check|click|restart|grab|copy|create|grant)\b|\b(?:(?:can|could|would|will) you|please|you(?:'ll)? (?:need|have) to|needs? you to|ask(?:ing)? you to|the (?:human|owner) (?:needs?|has) to)\b/i;
|
|
71
|
+
// Keyboard and terminal work, codes in their mail, a sign-in or a setting: never theirs.
|
|
72
|
+
const AT_A_KEYBOARD = [
|
|
73
|
+
/\b(?:run|type|paste|enter)\s+(?:`[^`\n]+`|(?:gh|ouro|npm|npx|git|claude|brew|bw)\b)/i,
|
|
74
|
+
/\b(?:in|from|at) (?:a|your|the) (?:terminal|shell|command line)\b/i,
|
|
75
|
+
/\bpress(?:ing)? (?:\d+|enter|return|y(?:es)?|no?)\b|\bat the [^.?!\n]{0,30}\bprompt\b/i,
|
|
76
|
+
/\b(?:paste|send|give|forward|tell|read|grab|copy)\b[^.?!\n]{0,40}\bcodes?\b(?!\s+review)/i,
|
|
77
|
+
/(?:^\s*|\b(?:you(?:'ll)? (?:need|have) to|(?:can|could|would) you|please|needs? you to)\s+)(?:re-?)?(?:sign|log)\s*-?\s*(?:in|into|on)\b|\bre-?(?:auth(?:enticate)?|login)\b|\b(?:gh auth (?:login|refresh)|ouro up)\b/i,
|
|
78
|
+
/\baccept\b[^.?!\n]{0,40}\b(?:agreement|terms|tos|eula|licen[cs]e)\b|\bmake\b[^.?!\n]{0,40}\b(?:public|private)\b/i,
|
|
79
|
+
/\b(?:by hand|manually|system settings|full disk access)\b|\bgrant\b[^.?!\n]{0,30}\baccess\b/i,
|
|
80
|
+
/\b(?:restart|relaunch|re-?run|rotate|click|merge)\b|\b(?:create|generate)\b[^.?!\n]{0,40}\b(?:token|api key)\b/i,
|
|
70
81
|
];
|
|
71
|
-
//
|
|
72
|
-
const
|
|
82
|
+
// A particular machine: theirs only when the sentence is about a phone approval or a payment.
|
|
83
|
+
const ON_A_MACHINE = /\b(?:in|on) (?:edge|chrome|safari|firefox|the browser|(?:the |your )?(?:mac(?: mini)?|macbook|laptop|desktop|computer)|[\w-]+-host)\b/i;
|
|
84
|
+
// A check an agent can run, asked for in its own words ("open X and tell me if it shows").
|
|
85
|
+
const ROUTINE_CHECKS = [
|
|
86
|
+
/\b(?:open|check|look at|test|try|verify|confirm)\b[^.?!]{0,160}\b(?:tell|let) me\b(?![^.?!]*\bworks? for you\b)/i,
|
|
87
|
+
/\b(?:tell|let) me(?: know)? (?:if|whether)\b[^.?!]{0,80}\b(?:show|shows|showing|load|loads|loading|works?(?! for you)|render|renders|appear|appears)\b/i,
|
|
88
|
+
/\b(?:can|could) you (?:check|see|look at)\b[^.?!\n]{0,40}\b(?:whether|logs?)\b/i,
|
|
89
|
+
];
|
|
90
|
+
const BODY_ONLY = /\b(?:passkey|face id|touch id|github mobile|authenticator|(?:approve|tap|confirm)\b[^.?!\n]{0,40}\b(?:on|in) (?:your|their|his|her) (?:own )?phone|tap \d+|pay|payment|(?:your|their|his|her) card|irreversible|can'?t be undone|permanently)\b/i;
|
|
91
|
+
// A sign-in ask whose claim the agent can check, and the command that checks it.
|
|
92
|
+
const SIGN_IN_CLAIMS = [
|
|
93
|
+
{ ask: /\bgh auth (?:login|refresh)\b|\b(?:sign|log)\s*-?\s*(?:in|into)\s+(?:to\s+)?(?:gh|the github cli)\b/i, command: "gh", args: ["auth", "status"] },
|
|
94
|
+
];
|
|
95
|
+
/** The first sentence that asks them for something that isn't theirs to do, or null. */
|
|
96
|
+
function askNotTheirs(text) {
|
|
97
|
+
// Only they hold the vault's own unlock secret.
|
|
98
|
+
return text.split(/(?<=[.?!])\s+|\n+/).find((sentence) => !/\bouro vault (?:unlock|create)\b/i.test(sentence) && ((ASK_FRAME.test(sentence) && AT_A_KEYBOARD.some((p) => p.test(sentence)))
|
|
99
|
+
|| (!BODY_ONLY.test(sentence) && ((ASK_FRAME.test(sentence) && ON_A_MACHINE.test(sentence)) || ROUTINE_CHECKS.some((p) => p.test(sentence)))))) ?? null;
|
|
100
|
+
}
|
|
101
|
+
/** True when the sign-in the ask wants is already done, by the claim's own status command. */
|
|
102
|
+
function isSignInClaimFalse(ask) {
|
|
103
|
+
const claim = SIGN_IN_CLAIMS.find((c) => c.ask.test(ask));
|
|
104
|
+
if (!claim)
|
|
105
|
+
return false;
|
|
106
|
+
try {
|
|
107
|
+
(0, child_process_1.execFileSync)(claim.command, claim.args, { stdio: "ignore", timeout: 5_000 });
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
73
114
|
// An untested result offered as the news.
|
|
74
115
|
const UNTESTED_CLAIM_PATTERNS = [
|
|
75
116
|
/\b(?:hasn'?t|has not|haven'?t|have not|not yet|never)\s+(?:been\s+)?(?:tested|verified|confirmed)\b/i,
|
|
@@ -80,9 +121,9 @@ const VERIFIED_BY_SENDER_PATTERN = /\b(?:i|we)(?:'ve| have)?\s+(?:verified|confi
|
|
|
80
121
|
// The person asked for this update, so labelling it unverified is honest progress, not a delivery claim.
|
|
81
122
|
const REQUESTED_STATUS_PATTERN = /\b(?:as you asked|you asked (?:for|me)|you wanted (?:an )?update|status you asked)\b/i;
|
|
82
123
|
function getVerificationHoldReason(text) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
124
|
+
const ask = askNotTheirs(text);
|
|
125
|
+
if (ask)
|
|
126
|
+
return isSignInClaimFalse(ask) ? "false_sign_in_claim" : "not_theirs_to_do";
|
|
86
127
|
if (REQUESTED_STATUS_PATTERN.test(text))
|
|
87
128
|
return null;
|
|
88
129
|
if (UNTESTED_CLAIM_PATTERNS.some((p) => p.test(text)))
|
|
@@ -103,13 +144,20 @@ function getProactiveInternalContentBlockReason(text) {
|
|
|
103
144
|
}
|
|
104
145
|
return getVerificationHoldReason(text);
|
|
105
146
|
}
|
|
106
|
-
|
|
107
|
-
|
|
147
|
+
/** Reasons the sender is told about, so it can do the work itself instead of asking. */
|
|
148
|
+
function isReturnToSenderReason(reason) {
|
|
149
|
+
return reason === "not_theirs_to_do" || reason === "false_sign_in_claim" || reason === "untested_delivery_claim";
|
|
108
150
|
}
|
|
109
151
|
/** What the sending lane is told when the guard refuses its text. */
|
|
110
152
|
function proactiveContentBlockGuidance(reason) {
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
153
|
+
if (reason === "not_theirs_to_do") {
|
|
154
|
+
return "held back, not sent (not_theirs_to_do): do it yourself; you have standing authority. An ask reaches them only when their body must do it: approve a number or prompt on their own phone (2FA, GitHub Mobile, passkey), pay with their card, or an irreversible call that is theirs. Keyboard and terminal steps, anything on a particular machine, codes in their mail, sign-ins (the password is in your vault) and checks you can run are yours; when a sign-in ends in a phone prompt, send only the number to approve";
|
|
155
|
+
}
|
|
156
|
+
if (reason === "false_sign_in_claim") {
|
|
157
|
+
return "dropped, not sent (false_sign_in_claim): its status command says that sign-in is already done (for gh, `gh auth status` passes), so there is nothing to ask them; retry what failed and read its real error";
|
|
158
|
+
}
|
|
159
|
+
if (reason === "untested_delivery_claim") {
|
|
160
|
+
return "held back, not sent (untested_delivery_claim): do not report an untested result. Verify it yourself, then send the verified result with its proof, naming exactly what you verified (a mobile-web browser render is not proof for the native app). A status update they asked for may go unverified if it says so (\"as you asked\")";
|
|
113
161
|
}
|
|
114
162
|
return `blocked: this reads as internal status${reason ? ` (${reason})` : ""}, so no chat sends it; rewrite it as plain words for them`;
|
|
115
163
|
}
|
package/dist/senses/teams.js
CHANGED
|
@@ -2130,7 +2130,7 @@ async function drainAndSendPendingTeams(store, botApi, pendingRoot) {
|
|
|
2130
2130
|
reason: internalBlockReason,
|
|
2131
2131
|
source: "pending_drain",
|
|
2132
2132
|
});
|
|
2133
|
-
if ((0, proactive_content_guard_1.
|
|
2133
|
+
if ((0, proactive_content_guard_1.isReturnToSenderReason)(internalBlockReason)) {
|
|
2134
2134
|
await (0, proactive_content_guard_1.returnHeldProactiveMessage)({ agentName: (0, identity_1.getAgentName)(), friendId, text: messageText, reason: internalBlockReason });
|
|
2135
2135
|
}
|
|
2136
2136
|
continue;
|
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.1618",
|
|
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.1618",
|
|
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.1618",
|
|
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": {
|