@ouro.bot/cli 0.1.0-alpha.1056 → 0.1.0-alpha.1057
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,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.1057",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Habit wakes: require a known trigger, prove it end to end"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1056",
|
|
6
12
|
"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.1057</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -41,6 +41,7 @@ const identity_1 = require("../identity");
|
|
|
41
41
|
const auth_flow_1 = require("../auth/auth-flow");
|
|
42
42
|
const runtime_1 = require("../../nerves/runtime");
|
|
43
43
|
const provider_credentials_1 = require("../provider-credentials");
|
|
44
|
+
const flight_recorder_1 = require("../../arc/flight-recorder");
|
|
44
45
|
const ledger_1 = require("./ledger");
|
|
45
46
|
function isRecord(value) {
|
|
46
47
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -184,14 +185,7 @@ async function evaluatePolicy(request, context, deps) {
|
|
|
184
185
|
reason: "verified daemon await check",
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
if (habitTrigger.length > 0
|
|
189
|
-
&& hasNonEmptyOriginRef(originRefs, "habit")
|
|
190
|
-
&& hasOriginRef(originRefs, "habit-trigger", habitTrigger)
|
|
191
|
-
&& hasNonEmptyOriginRef(originRefs, "habit-occurrence")
|
|
192
|
-
&& (hasOriginRef(originRefs, "daemon-entry", "habit-scheduler")
|
|
193
|
-
|| hasOriginRef(originRefs, "daemon-command", "habit.poke")
|
|
194
|
-
|| hasOriginRef(originRefs, "daemon-command", "habit.probe"))) {
|
|
188
|
+
if (isVerifiedHabitWake(request.triggerSource, originRefs)) {
|
|
195
189
|
return {
|
|
196
190
|
result: "allow",
|
|
197
191
|
reason: "verified daemon habit",
|
|
@@ -203,6 +197,26 @@ async function evaluatePolicy(request, context, deps) {
|
|
|
203
197
|
deniedReason: "default policy deny",
|
|
204
198
|
};
|
|
205
199
|
}
|
|
200
|
+
/** Where a habit wake may come from: the daemon's own scheduler, or `ouro poke`/probe through the daemon. */
|
|
201
|
+
const HABIT_WAKE_SOURCES = [
|
|
202
|
+
["daemon-entry", "habit-scheduler"],
|
|
203
|
+
["daemon-command", "habit.poke"],
|
|
204
|
+
["daemon-command", "habit.probe"],
|
|
205
|
+
];
|
|
206
|
+
/**
|
|
207
|
+
* A habit wake the daemon built (buildHabitPrivateWakeCommand): it names the habit, its trigger
|
|
208
|
+
* and occurrence, comes from one of the daemon's habit sources, and its trigger source matches
|
|
209
|
+
* its trigger. The daemon has already checked the habit file is active before asking.
|
|
210
|
+
*/
|
|
211
|
+
function isVerifiedHabitWake(triggerSource, originRefs) {
|
|
212
|
+
const trigger = originRefs.find((ref) => ref.kind === "habit-trigger")?.id;
|
|
213
|
+
return typeof trigger === "string"
|
|
214
|
+
&& (0, flight_recorder_1.isHabitRunTrigger)(trigger)
|
|
215
|
+
&& triggerSource === `habit-${trigger}`
|
|
216
|
+
&& hasNonEmptyOriginRef(originRefs, "habit")
|
|
217
|
+
&& hasNonEmptyOriginRef(originRefs, "habit-occurrence")
|
|
218
|
+
&& HABIT_WAKE_SOURCES.some(([kind, id]) => hasOriginRef(originRefs, kind, id));
|
|
219
|
+
}
|
|
206
220
|
function emptyReceiptId() {
|
|
207
221
|
return "";
|
|
208
222
|
}
|
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.1057",
|
|
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.1057",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@ouro.bot/friends": "0.1.0-alpha.18",
|