@ouro.bot/cli 0.1.0-alpha.786 → 0.1.0-alpha.788
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 +12 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/private-runtime/policy.js +26 -2
- package/dist/senses/sanctuary-media-optimization.js +5 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
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.788",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Allow verified operator CLI and daemon await private wakes by default, including queued await-expiry alerts."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.787",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Tolerate untitled Jellyfin catalog items in Sanctuary media reads."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.786",
|
|
6
18
|
"changes": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0"?>
|
|
2
2
|
<Container version="2">
|
|
3
3
|
<Name>Mendelow Cloud Butler</Name>
|
|
4
|
-
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.788</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -111,6 +111,12 @@ function emitPolicyEvaluated(deps, input) {
|
|
|
111
111
|
meta: payload.meta,
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
function hasOriginRef(refs, kind, id) {
|
|
115
|
+
return refs.some((ref) => ref.kind === kind && ref.id === id);
|
|
116
|
+
}
|
|
117
|
+
function hasNonEmptyOriginRef(refs, kind) {
|
|
118
|
+
return refs.some((ref) => ref.kind === kind && typeof ref.id === "string" && ref.id.trim().length > 0);
|
|
119
|
+
}
|
|
114
120
|
async function defaultResolveProviderLane(agent, lane, deps) {
|
|
115
121
|
const bundlesRoot = deps.bundlesRoot ?? (0, identity_1.getAgentBundlesRoot)();
|
|
116
122
|
const { config } = (0, auth_flow_1.readAgentConfigForAgent)(agent, bundlesRoot);
|
|
@@ -137,13 +143,31 @@ async function evaluatePolicy(request, context, deps) {
|
|
|
137
143
|
return deps.evaluatePolicy(request, context);
|
|
138
144
|
const originRefs = request.originRefs ?? [];
|
|
139
145
|
if (request.triggerSource === "external-event"
|
|
140
|
-
&& originRefs
|
|
141
|
-
&& originRefs
|
|
146
|
+
&& hasNonEmptyOriginRef(originRefs, "external-event")
|
|
147
|
+
&& hasOriginRef(originRefs, "daemon-command", "external.event.submit")) {
|
|
142
148
|
return {
|
|
143
149
|
result: "allow",
|
|
144
150
|
reason: "verified daemon external event",
|
|
145
151
|
};
|
|
146
152
|
}
|
|
153
|
+
if (request.triggerSource === "operator-cli"
|
|
154
|
+
&& hasOriginRef(originRefs, "cli-command", "ouro msg")
|
|
155
|
+
&& hasNonEmptyOriginRef(originRefs, "daemon-receipt")) {
|
|
156
|
+
return {
|
|
157
|
+
result: "allow",
|
|
158
|
+
reason: "verified operator CLI message",
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
if ((request.triggerSource === "await-poke" || request.triggerSource === "await-scheduler" || request.triggerSource === "await-expiry")
|
|
162
|
+
&& hasNonEmptyOriginRef(originRefs, "await")
|
|
163
|
+
&& (hasOriginRef(originRefs, "daemon-command", "await.poke")
|
|
164
|
+
|| hasOriginRef(originRefs, "scheduler", "await-scheduler")
|
|
165
|
+
|| hasOriginRef(originRefs, "await-alert", "expired"))) {
|
|
166
|
+
return {
|
|
167
|
+
result: "allow",
|
|
168
|
+
reason: "verified daemon await check",
|
|
169
|
+
};
|
|
170
|
+
}
|
|
147
171
|
return {
|
|
148
172
|
result: "deny",
|
|
149
173
|
reason: "private runtime policy denies by default",
|
|
@@ -64,6 +64,9 @@ function boundedLabel(value) {
|
|
|
64
64
|
function optionalBoundedLabel(value) {
|
|
65
65
|
return value === undefined || value === null ? null : boundedLabel(value);
|
|
66
66
|
}
|
|
67
|
+
function mediaTitle(item, type) {
|
|
68
|
+
return typeof item.Name === "string" ? boundedLabel(item.Name) : `Untitled ${type}`;
|
|
69
|
+
}
|
|
67
70
|
function basename(value) {
|
|
68
71
|
const parts = string(value).replaceAll("\\", "/").split("/");
|
|
69
72
|
return boundedLabel(parts[parts.length - 1]);
|
|
@@ -332,8 +335,8 @@ function createSanctuaryMediaOptimizationClient(options) {
|
|
|
332
335
|
const sourceIds = new Set();
|
|
333
336
|
let sourceCapped = false;
|
|
334
337
|
for (const item of catalog.items) {
|
|
335
|
-
const untrustedTitle = boundedLabel(item.Name);
|
|
336
338
|
const type = string(item.Type);
|
|
339
|
+
const untrustedTitle = mediaTitle(item, type);
|
|
337
340
|
const mediaSources = array(item.MediaSources);
|
|
338
341
|
if (mediaSources.length > 100)
|
|
339
342
|
throw new ReadFailure("invalid_response", "Jellyfin returned too many sources for one item");
|
|
@@ -469,8 +472,8 @@ function createSanctuaryMediaOptimizationClient(options) {
|
|
|
469
472
|
throw new ReadFailure("invalid_response", "Media catalog limit must be an integer from 1 to 20");
|
|
470
473
|
const catalog = await readJellyfinItems(deadline, { includeMediaSources: false });
|
|
471
474
|
const candidates = catalog.items.map((item) => {
|
|
472
|
-
const title = boundedLabel(item.Name);
|
|
473
475
|
const type = string(item.Type);
|
|
476
|
+
const title = mediaTitle(item, type);
|
|
474
477
|
const productionYear = optionalInteger(item.ProductionYear);
|
|
475
478
|
const premiereDate = optionalBoundedLabel(item.PremiereDate);
|
|
476
479
|
return { untrustedTitle: title, type, productionYear, premiereDate };
|
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.788",
|
|
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.788",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|