@ouro.bot/cli 0.1.0-alpha.1411 → 0.1.0-alpha.1412
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,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.1412",
|
|
6
|
+
"changes": [
|
|
7
|
+
"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."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1411",
|
|
6
12
|
"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
13
|
"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
14
|
]
|
|
10
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.0-alpha.1410",
|
|
18
|
+
"changes": [
|
|
19
|
+
"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."
|
|
20
|
+
]
|
|
21
|
+
},
|
|
11
22
|
{
|
|
12
23
|
"version": "0.1.0-alpha.1409",
|
|
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.1412</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);
|
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.1412",
|
|
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.1412",
|
|
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.1412",
|
|
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": {
|