@ouro.bot/cli 0.1.0-alpha.1411 → 0.1.0-alpha.1413
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 +18 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.ouro/tool-profiles.json +22 -2
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/awaiting/await-scheduler.js +63 -4
- package/dist/heart/daemon/sanctuary-acceptance-harness.js +1 -1
- package/dist/repertoire/tools.js +3 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
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.1413",
|
|
6
|
+
"changes": [
|
|
7
|
+
"The Butler's household profile (version 8) gets the media tools: a friend can find media and make it available. Applying a quality or release profile, removing blocklist entries, owner-worded stalled cleanups and retrying blocklisted releases stay family-only. Of MCP, a friend gets only the Butler's own media server."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1412",
|
|
12
|
+
"changes": [
|
|
13
|
+
"An await with a wake_at now waits for that time: it isn't checked before then, and it's checked once, right away, when the time comes. Until now only its cadence decided when it was checked."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1411",
|
|
6
18
|
"changes": [
|
|
7
|
-
"npm run eval runs the replay eval's cases on a real model (GitHub Copilot or MiniMax) against one bundle, in the sandbox locally or on another Docker host over ssh. Every run reserves its worst-case spend first, in premium requests and in credits, refuses to start without a Copilot multiplier or, for a pay-per-token target, without a credits cap, stops on the first 402 or 429, and writes a private report with pass@1 and Wilson intervals.",
|
|
8
19
|
"The Butler's A2A server passes Ari's relayed approval answers to the Telegram sense, unopened and without starting a model turn, and only from the owner route's peer."
|
|
9
20
|
]
|
|
10
21
|
},
|
|
22
|
+
{
|
|
23
|
+
"version": "0.1.0-alpha.1410",
|
|
24
|
+
"changes": [
|
|
25
|
+
"npm run eval runs the replay eval's cases on a real model (GitHub Copilot or MiniMax) against one bundle, in the sandbox locally or on another Docker host over ssh. Every run reserves its worst-case spend first, in premium requests and in credits, refuses to start without a Copilot multiplier or, for a pay-per-token target, without a credits cap, stops on the first 402 or 429, and writes a private report with pass@1 and Wilson intervals."
|
|
26
|
+
]
|
|
27
|
+
},
|
|
11
28
|
{
|
|
12
29
|
"version": "0.1.0-alpha.1409",
|
|
13
30
|
"changes": [
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
101
|
"sanctuary-household": {
|
|
102
|
-
"version":
|
|
102
|
+
"version": 8,
|
|
103
103
|
"contextScopes": [
|
|
104
104
|
"household.status",
|
|
105
105
|
"own_requests"
|
|
@@ -121,7 +121,27 @@
|
|
|
121
121
|
"settle",
|
|
122
122
|
"speak",
|
|
123
123
|
"react",
|
|
124
|
-
"set_reply_target"
|
|
124
|
+
"set_reply_target",
|
|
125
|
+
"media_search",
|
|
126
|
+
"media_request",
|
|
127
|
+
"media_request_status",
|
|
128
|
+
"media_diagnose_and_fix",
|
|
129
|
+
"media_chain_health",
|
|
130
|
+
"media_play_or_resolve",
|
|
131
|
+
"media_search_now",
|
|
132
|
+
"media_queue",
|
|
133
|
+
"media_blocklist_stalled",
|
|
134
|
+
"media_episodes",
|
|
135
|
+
"media_monitor",
|
|
136
|
+
"media_watch_history",
|
|
137
|
+
"media_indexer_search",
|
|
138
|
+
"media_release_search",
|
|
139
|
+
"media_release_grab",
|
|
140
|
+
"media_blocklist",
|
|
141
|
+
"media_manual_import",
|
|
142
|
+
"media_quality_profile",
|
|
143
|
+
"media_release_profile",
|
|
144
|
+
"media_fill_missing"
|
|
125
145
|
],
|
|
126
146
|
"effectScopes": [
|
|
127
147
|
"telegram.request_return"
|
|
@@ -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.1413</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -42,6 +42,15 @@ const cadence_1 = require("../daemon/cadence");
|
|
|
42
42
|
const WATCH_DEBOUNCE_MS = 200;
|
|
43
43
|
/** Cron-label namespace prefix to avoid collision with habits. */
|
|
44
44
|
exports.AWAIT_CRON_LABEL_PREFIX_MARKER = "await";
|
|
45
|
+
/** setTimeout's longest delay; a wake further off is re-armed by the next reconcile. */
|
|
46
|
+
const MAX_TIMER_MS = 2_147_483_647;
|
|
47
|
+
/** Epoch ms of an await's wake_at, or null when it has none or it can't be read. */
|
|
48
|
+
function wakeAtMs(a) {
|
|
49
|
+
if (!a.wake_at)
|
|
50
|
+
return null;
|
|
51
|
+
const ms = Date.parse(a.wake_at);
|
|
52
|
+
return Number.isFinite(ms) ? ms : null;
|
|
53
|
+
}
|
|
45
54
|
/** An await that ships with the package: it has no filer, friend, conversation or request behind it (the same test the private runtime uses for "no relationship"). */
|
|
46
55
|
function isSystemAwait(a) {
|
|
47
56
|
return !a.request_id && !a.filed_for_friend_id && !a.filed_from_key && (!a.filed_from || a.filed_from === "unknown");
|
|
@@ -62,6 +71,7 @@ class AwaitScheduler {
|
|
|
62
71
|
timerFallbacks = new Map();
|
|
63
72
|
degradedAwaitNames = new Map();
|
|
64
73
|
periodicTimer = null;
|
|
74
|
+
wakeTimer = null;
|
|
65
75
|
constructor(options) {
|
|
66
76
|
this.agent = options.agent;
|
|
67
77
|
this.awaitsDir = options.awaitsDir;
|
|
@@ -87,10 +97,13 @@ class AwaitScheduler {
|
|
|
87
97
|
const awaits = this.scanAwaits();
|
|
88
98
|
this.expireOverdueByMaxAge(awaits);
|
|
89
99
|
const remaining = awaits.filter((a) => a.status === "pending" && !this.isExpiredByMaxAge(a));
|
|
90
|
-
|
|
100
|
+
// An await with a wake_at still ahead is neither scheduled nor fired: it waits for that time.
|
|
101
|
+
const due = remaining.filter((a) => !this.waitsForWakeAt(a));
|
|
102
|
+
const jobs = this.buildJobs(due);
|
|
91
103
|
this.osCronManager.sync(jobs);
|
|
92
104
|
this.verifyCronAndCreateFallbacks(jobs);
|
|
93
|
-
this.fireOverdueAwaits(
|
|
105
|
+
this.fireOverdueAwaits(due);
|
|
106
|
+
this.armWakeTimer(remaining);
|
|
94
107
|
}
|
|
95
108
|
reconcile() {
|
|
96
109
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -103,10 +116,13 @@ class AwaitScheduler {
|
|
|
103
116
|
const awaits = this.scanAwaits();
|
|
104
117
|
this.expireOverdueByMaxAge(awaits);
|
|
105
118
|
const remaining = awaits.filter((a) => a.status === "pending" && !this.isExpiredByMaxAge(a));
|
|
106
|
-
|
|
119
|
+
// An await with a wake_at still ahead is neither scheduled nor fired: it waits for that time.
|
|
120
|
+
const due = remaining.filter((a) => !this.waitsForWakeAt(a));
|
|
121
|
+
const jobs = this.buildJobs(due);
|
|
107
122
|
this.osCronManager.sync(jobs);
|
|
108
123
|
this.verifyCronAndCreateFallbacks(jobs);
|
|
109
|
-
this.fireOverdueAwaits(
|
|
124
|
+
this.fireOverdueAwaits(due);
|
|
125
|
+
this.armWakeTimer(remaining);
|
|
110
126
|
}
|
|
111
127
|
stop() {
|
|
112
128
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -117,6 +133,7 @@ class AwaitScheduler {
|
|
|
117
133
|
});
|
|
118
134
|
this.stopPeriodicReconciliation();
|
|
119
135
|
this.clearAllTimerFallbacks();
|
|
136
|
+
this.clearWakeTimer();
|
|
120
137
|
this.osCronManager.removeAll();
|
|
121
138
|
}
|
|
122
139
|
getParseErrors() {
|
|
@@ -189,8 +206,50 @@ class AwaitScheduler {
|
|
|
189
206
|
this.scheduleNextReconciliation(intervalMs);
|
|
190
207
|
}, intervalMs);
|
|
191
208
|
}
|
|
209
|
+
waitsForWakeAt(a) {
|
|
210
|
+
const wake = wakeAtMs(a);
|
|
211
|
+
return wake !== null && wake > this.deps.now();
|
|
212
|
+
}
|
|
213
|
+
/** One timer, at the nearest wake_at still ahead, that reconciles so that await is scheduled and fires on time. */
|
|
214
|
+
armWakeTimer(awaits) {
|
|
215
|
+
this.clearWakeTimer();
|
|
216
|
+
const nowMs = this.deps.now();
|
|
217
|
+
const next = Math.min(...awaits.map((a) => wakeAtMs(a) ?? Infinity).filter((ms) => ms > nowMs));
|
|
218
|
+
if (!Number.isFinite(next))
|
|
219
|
+
return;
|
|
220
|
+
const delay = Math.min(next - nowMs, MAX_TIMER_MS);
|
|
221
|
+
(0, runtime_1.emitNervesEvent)({
|
|
222
|
+
component: "daemon",
|
|
223
|
+
event: "daemon.await_wake_timer_armed",
|
|
224
|
+
message: "await scheduler waiting for the next wake_at",
|
|
225
|
+
meta: { agent: this.agent, delayMs: delay },
|
|
226
|
+
});
|
|
227
|
+
this.wakeTimer = setTimeout(() => {
|
|
228
|
+
this.wakeTimer = null;
|
|
229
|
+
this.reconcile();
|
|
230
|
+
}, delay);
|
|
231
|
+
}
|
|
232
|
+
clearWakeTimer() {
|
|
233
|
+
if (this.wakeTimer !== null) {
|
|
234
|
+
clearTimeout(this.wakeTimer);
|
|
235
|
+
this.wakeTimer = null;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
192
238
|
fireOverdueAwaits(awaits) {
|
|
193
239
|
for (const a of awaits) {
|
|
240
|
+
// A wake_at that has passed fires once, at once, unless the await was checked since; then the cadence takes over.
|
|
241
|
+
const wake = wakeAtMs(a);
|
|
242
|
+
const lastCheckedAt = a.last_checked ? Date.parse(a.last_checked) : Number.NaN;
|
|
243
|
+
if (wake !== null && !(lastCheckedAt >= wake)) {
|
|
244
|
+
(0, runtime_1.emitNervesEvent)({
|
|
245
|
+
component: "daemon",
|
|
246
|
+
event: "daemon.await_fire",
|
|
247
|
+
message: "firing await at its wake_at",
|
|
248
|
+
meta: { awaitName: a.name, agent: this.agent, wakeAt: a.wake_at },
|
|
249
|
+
});
|
|
250
|
+
this.onAwaitFire(a.name);
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
194
253
|
if (!a.cadence)
|
|
195
254
|
continue;
|
|
196
255
|
const cadenceMs = (0, cadence_1.parseCadenceToMs)(a.cadence);
|
|
@@ -60,7 +60,7 @@ function exactSanctuaryContainmentProfileBoundaries(value) {
|
|
|
60
60
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
61
61
|
return false;
|
|
62
62
|
const boundaries = value;
|
|
63
|
-
const versions = { "sanctuary-owner": 23, "sanctuary-household":
|
|
63
|
+
const versions = { "sanctuary-owner": 23, "sanctuary-household": 8, "sanctuary-event": 4 };
|
|
64
64
|
if (!(0, node_util_1.isDeepStrictEqual)(Object.keys(boundaries).sort(), Object.keys(versions).sort()))
|
|
65
65
|
return false;
|
|
66
66
|
const packageRoot = path.resolve(__dirname, "../../../deploy/unraid/sanctuary.ouro");
|
package/dist/repertoire/tools.js
CHANGED
|
@@ -173,6 +173,9 @@ function selectToolsForChannel(capabilities, toolPreferences, _context, provider
|
|
|
173
173
|
...tools_chat_1.chatToolDefinitions, ...tools_unraid_1.unraidToolDefinitions, tools_steward_policy_1.stewardPolicyToolDefinition, ...(ownerLike ? tools_house_care_1.houseCareToolDefinitions : []),
|
|
174
174
|
...(owner ? tools_bundle_1.bundleToolDefinitions.filter((definition) => SANCTUARY_OWNER_SYNC_TOOLS.has(definition.tool.function.name)) : []),
|
|
175
175
|
...(ownerLike ? mcp : []),
|
|
176
|
+
// A friend gets only the Butler's own media server, and of it only what the profile lists;
|
|
177
|
+
// mcp-write-guard keeps the family-only arguments to family.
|
|
178
|
+
...(profileId === "sanctuary-household" ? mcp.filter((definition) => definition.mcpBinding?.server === "media" && definition.mcpBinding.source === "builtin") : []),
|
|
176
179
|
]
|
|
177
180
|
: [];
|
|
178
181
|
}
|
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.1413",
|
|
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.1413",
|
|
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.1413",
|
|
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": {
|