@ouro.bot/cli 0.1.0-alpha.1683 → 0.1.0-alpha.1685
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/container-runtime.json +1 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/a2a/config.js +4 -4
- package/dist/heart/daemon/daemon-entry.js +14 -5
- package/dist/heart/external-events/router.js +19 -12
- package/dist/heart/product/active.js +28 -3
- package/dist/products/butler.js +16 -0
- package/dist/senses/telegram-effect-adapter.js +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
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.1685",
|
|
6
|
+
"changes": [
|
|
7
|
+
"The Butler now registers itself with the harness as a product. The Unraid image names its module in `container-runtime.json`, and every process in the container loads it. Core learns the Butler's two names (`butler`, and `sanctuary` from before the rename) from that registration instead of importing Butler code, for the A2A port, the saved external events and the Telegram failsafe. Nothing changes for the person: the Butler keeps its port and its saved events under either name."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1684",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Update the Ouro UI files to Ouro UI v1.3.618."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1683",
|
|
6
18
|
"changes": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"scheduler":"supercronic","updates":"disabled"}
|
|
1
|
+
{"scheduler":"supercronic","updates":"disabled","product":"/opt/ouro/dist/products/butler.js"}
|
|
@@ -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.1685</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
package/dist/a2a/config.js
CHANGED
|
@@ -6,14 +6,14 @@ exports.normalizeA2APath = normalizeA2APath;
|
|
|
6
6
|
exports.a2aEndpointFromBaseUrl = a2aEndpointFromBaseUrl;
|
|
7
7
|
const node_crypto_1 = require("node:crypto");
|
|
8
8
|
const runtime_1 = require("../nerves/runtime");
|
|
9
|
-
const
|
|
9
|
+
const active_1 = require("../heart/product/active");
|
|
10
10
|
exports.A2A_DEFAULT_PROTOCOL_VERSION = "1.0";
|
|
11
11
|
exports.A2A_DEFAULT_HOST = "127.0.0.1";
|
|
12
12
|
exports.A2A_DEFAULT_PATH = "/a2a";
|
|
13
13
|
function defaultA2APort(agentName) {
|
|
14
|
-
//
|
|
15
|
-
// rename must not move it.
|
|
16
|
-
const portKey = (0,
|
|
14
|
+
// A product's agent keeps the port its first name gave, whatever it is called now: peers saved its agent card at that
|
|
15
|
+
// port, so a rename must not move it. Its names run current first, so the first name is the last one listed.
|
|
16
|
+
const portKey = (0, active_1.productFor)(agentName)?.agents.at(-1) ?? agentName;
|
|
17
17
|
const digest = (0, node_crypto_1.createHash)("sha256").update(portKey).digest();
|
|
18
18
|
const port = 18920 + (digest[0] % 60);
|
|
19
19
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -52,7 +52,7 @@ const sense_manager_1 = require("./sense-manager");
|
|
|
52
52
|
const agent_discovery_1 = require("./agent-discovery");
|
|
53
53
|
const agent_home_1 = require("./agent-home");
|
|
54
54
|
const identity_1 = require("../identity");
|
|
55
|
-
const
|
|
55
|
+
const active_1 = require("../product/active");
|
|
56
56
|
const app_sessions_record_1 = require("./app-sessions-record");
|
|
57
57
|
const runtime_mode_1 = require("./runtime-mode");
|
|
58
58
|
const habit_scheduler_1 = require("../habits/habit-scheduler");
|
|
@@ -117,6 +117,15 @@ if (homeFilesystemProblem) {
|
|
|
117
117
|
process.exit(1);
|
|
118
118
|
}
|
|
119
119
|
/* v8 ignore stop */
|
|
120
|
+
/* v8 ignore start -- the product module the image names loads first, so a broken one stops the start; the loader is unit-tested in heart/product @preserve */
|
|
121
|
+
try {
|
|
122
|
+
(0, active_1.loadImageProduct)();
|
|
123
|
+
}
|
|
124
|
+
catch (failure) {
|
|
125
|
+
process.stderr.write(`${failure instanceof Error ? failure.message : String(failure)}\ncode: product-invalid\n`);
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
/* v8 ignore stop */
|
|
120
129
|
const entryPath = path.resolve(__dirname, "daemon-entry.js");
|
|
121
130
|
const mode = (0, runtime_mode_1.detectRuntimeMode)((0, identity_1.getRepoRoot)());
|
|
122
131
|
// Each agent runs on exactly one machine: manage only agents homed here
|
|
@@ -125,7 +134,7 @@ const daemonMachine = (0, machine_identity_1.loadOrCreateMachineIdentity)();
|
|
|
125
134
|
const daemonMachineId = daemonMachine.machineId;
|
|
126
135
|
const managedAgents = (0, agent_discovery_1.listHomeBundleAgents)({ machineId: daemonMachineId });
|
|
127
136
|
// The Butler under whichever name its bundle has; its container paths follow that name.
|
|
128
|
-
const butlerName = (0,
|
|
137
|
+
const butlerName = (0, active_1.productAgentAmong)(managedAgents) ?? "sanctuary";
|
|
129
138
|
// Its saved external events follow that name too: a folder left under the other name (by the rename or a rollback) moves over.
|
|
130
139
|
// It must: records left under the other name can't be settled, so a failed move or merge stops the start.
|
|
131
140
|
try {
|
|
@@ -550,7 +559,7 @@ const daemon = new daemon_1.OuroDaemon({
|
|
|
550
559
|
},
|
|
551
560
|
schedulerFireConsumer: (origin) => (0, sanctuary_scheduler_liveness_1.consumeSanctuarySchedulerFire)(path.join((0, identity_1.getAgentBundlesRoot)(), `${butlerName}.ouro`), origin),
|
|
552
561
|
nativeHabitRunner: async ({ agent, habitName, trigger, occurrenceId, runnerId, schedulerOrigin }) => {
|
|
553
|
-
if (!(0,
|
|
562
|
+
if (!(0, active_1.productFor)(agent) || habitName !== "sanctuary-health")
|
|
554
563
|
return null;
|
|
555
564
|
const marker = (0, sanctuary_acceptance_marker_1.readSanctuaryAcceptanceMarker)(agent);
|
|
556
565
|
const schedulerScenario = marker?.label === "unit-16f-cron-fingerprint" ? marker : null;
|
|
@@ -593,7 +602,7 @@ const daemon = new daemon_1.OuroDaemon({
|
|
|
593
602
|
}
|
|
594
603
|
return result;
|
|
595
604
|
},
|
|
596
|
-
nativeHabitMatch: (agent, habitName) => (0,
|
|
605
|
+
nativeHabitMatch: (agent, habitName) => (0, active_1.productFor)(agent) !== null && habitName === "sanctuary-health",
|
|
597
606
|
mode,
|
|
598
607
|
onStopCommandComplete: async () => {
|
|
599
608
|
await stopEntryRuntime();
|
|
@@ -910,7 +919,7 @@ void (0, daemon_bootstrap_startup_1.startDaemonAfterContainerCredentialBootstrap
|
|
|
910
919
|
habitsDir,
|
|
911
920
|
osCronManager,
|
|
912
921
|
onHabitFire: (habitName, trigger, context) => {
|
|
913
|
-
if ((0, habit_policy_1.isRsvpHabitName)(habitName) || ((0,
|
|
922
|
+
if ((0, habit_policy_1.isRsvpHabitName)(habitName) || ((0, active_1.productFor)(agent) !== null && habitName === "sanctuary-health")) {
|
|
914
923
|
(0, socket_client_1.sendDaemonCommand)(socketPath, {
|
|
915
924
|
kind: "habit.poke",
|
|
916
925
|
agent,
|
|
@@ -63,7 +63,7 @@ const path = __importStar(require("node:path"));
|
|
|
63
63
|
const runtime_1 = require("../../nerves/runtime");
|
|
64
64
|
const ouro_version_manager_1 = require("../versioning/ouro-version-manager");
|
|
65
65
|
const atomic_file_1 = require("../atomic-file");
|
|
66
|
-
const
|
|
66
|
+
const active_1 = require("../product/active");
|
|
67
67
|
const MAX_EVENT_TEXT_BYTES = 4_096;
|
|
68
68
|
const MAX_EVENT_EVIDENCE = 32;
|
|
69
69
|
const MAX_EVENT_RECORD_BYTES = 64 * 1_024;
|
|
@@ -323,13 +323,17 @@ function isRecord(value) {
|
|
|
323
323
|
}
|
|
324
324
|
// The Butler this daemon runs, set once at daemon start. Records saved under the Butler's other name are its records.
|
|
325
325
|
let runningButler = null;
|
|
326
|
+
/** Whether this name (an agent, a record's `agent` or an event folder) is one of the product's names. */
|
|
327
|
+
function isProductAgentName(name) {
|
|
328
|
+
return (0, active_1.productFor)(name) !== null;
|
|
329
|
+
}
|
|
326
330
|
/** The agent a record or new event belongs to: a Butler name means the running Butler, or the Butler folder it sits in. */
|
|
327
331
|
function eventAgent(agent, folder) {
|
|
328
|
-
if (!(
|
|
332
|
+
if (!isProductAgentName(agent))
|
|
329
333
|
return agent;
|
|
330
334
|
if (runningButler)
|
|
331
335
|
return runningButler;
|
|
332
|
-
return folder !== undefined && (
|
|
336
|
+
return folder !== undefined && isProductAgentName(folder) ? folder : agent;
|
|
333
337
|
}
|
|
334
338
|
/** The record as the daemon sees it: owned by the running Butler, at the path it was read from. */
|
|
335
339
|
function normaliseButlerRecord(record, recordPath) {
|
|
@@ -348,7 +352,7 @@ function readStoredExternalEventRecord(recordPath) {
|
|
|
348
352
|
return parsed;
|
|
349
353
|
// A Butler record whose folder was adopted under the Butler's other name: it names the folder it was written in, or this one.
|
|
350
354
|
const folder = path.basename(path.dirname(path.dirname(recordPath)));
|
|
351
|
-
const adopted = (
|
|
355
|
+
const adopted = isProductAgentName(parsed.agent) && isProductAgentName(folder)
|
|
352
356
|
&& path.resolve(externalEventRecordPath(root, { ...parsed, agent: folder })) === here
|
|
353
357
|
&& [here, expectedPath].includes(path.resolve(parsed.recordPath));
|
|
354
358
|
if (!adopted)
|
|
@@ -366,7 +370,7 @@ function readExternalEventRecord(recordPath) {
|
|
|
366
370
|
function externalEventAwaitRecordPath(agentName, filedFromKey, root = getExternalEventRoot()) {
|
|
367
371
|
const resolvedRoot = path.resolve(root);
|
|
368
372
|
const [folder, ...rest] = path.relative(resolvedRoot, path.resolve(filedFromKey)).split(path.sep);
|
|
369
|
-
if (!(
|
|
373
|
+
if (!isProductAgentName(agentName) || !isProductAgentName(folder) || folder === agentName || fs.existsSync(filedFromKey))
|
|
370
374
|
return filedFromKey;
|
|
371
375
|
return path.join(resolvedRoot, agentName, ...rest);
|
|
372
376
|
}
|
|
@@ -489,11 +493,14 @@ function removeMergedEventFolder(dir) {
|
|
|
489
493
|
* Butler's folder can't be settled. A symlinked other folder is left alone, with a warning.
|
|
490
494
|
*/
|
|
491
495
|
function prepareButlerExternalEvents(root, managedAgents, now = () => new Date().toISOString()) {
|
|
492
|
-
const butler = (0,
|
|
496
|
+
const butler = (0, active_1.productAgentAmong)(managedAgents);
|
|
493
497
|
runningButler = butler;
|
|
494
498
|
if (!butler)
|
|
495
499
|
return "none";
|
|
496
|
-
|
|
500
|
+
// The product's other name: the Butler has exactly two, the one it runs as and the one from before the rename.
|
|
501
|
+
const otherName = (0, active_1.productFor)(butler).agents.find((name) => name !== butler);
|
|
502
|
+
if (otherName === undefined)
|
|
503
|
+
return "none";
|
|
497
504
|
const own = path.join(root, butler);
|
|
498
505
|
const other = path.join(root, otherName);
|
|
499
506
|
let otherStat;
|
|
@@ -637,9 +644,9 @@ function parseRepairManifest(manifestPath) {
|
|
|
637
644
|
}
|
|
638
645
|
/** The folder a reviewed repair's record is in: its own agent's, or the other Butler name's once the daemon adopted it. */
|
|
639
646
|
function repairFolderAgent(root, entry) {
|
|
640
|
-
if (!(
|
|
647
|
+
if (!isProductAgentName(entry.agent))
|
|
641
648
|
return entry.agent;
|
|
642
|
-
const names = [entry.agent, ...
|
|
649
|
+
const names = [entry.agent, ...(0, active_1.productFor)(entry.agent).agents.filter((name) => name !== entry.agent)];
|
|
643
650
|
return names.find((agent) => fs.existsSync(externalEventRecordPath(root, { ...entry, agent }))) ?? entry.agent;
|
|
644
651
|
}
|
|
645
652
|
function assertRepairRecordPath(root, entry) {
|
|
@@ -1114,7 +1121,7 @@ function parsePrivilegedEnvelope(raw, fileName, now) {
|
|
|
1114
1121
|
const observationTransitionIsAllowed = value.eventType !== "usenet.health_observation" || /^(?:auth-failed|stalled|recovered|indeterminate):\d{8}T\d{6}Z$/u.test(String(value.transitionId));
|
|
1115
1122
|
const expectedKeys = ["action", "actionReceipt", "agent", "createdAt", "critical", "eventType", "evidence", "expiresAt", "incidentKey", "nonce", "observationRevision", "protectiveStateDigest", "protectiveStateObservedAt", "protectiveStateVerified", "schemaVersion", "source", "summary", "transitionId"];
|
|
1116
1123
|
if (Object.keys(value).sort().join("\0") !== expectedKeys.sort().join("\0")
|
|
1117
|
-
|| value.schemaVersion !== 1 || !(
|
|
1124
|
+
|| value.schemaVersion !== 1 || !isProductAgentName(value.agent) || value.source !== PRIVILEGED_EVENT_SOURCE
|
|
1118
1125
|
|| !eventShapeIsAllowed || !observationTransitionIsAllowed
|
|
1119
1126
|
|| value.critical !== true || !boundedIdentifier(value.incidentKey) || !boundedIdentifier(value.transitionId)
|
|
1120
1127
|
|| !/^[a-f0-9]{64}$/u.test(String(value.observationRevision)) || !/^[a-f0-9]{64}$/u.test(String(value.nonce))
|
|
@@ -1265,7 +1272,7 @@ function isReplayState(value) {
|
|
|
1265
1272
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1266
1273
|
return false;
|
|
1267
1274
|
const state = value;
|
|
1268
|
-
if (state.schemaVersion !== 1 || !(
|
|
1275
|
+
if (state.schemaVersion !== 1 || !isProductAgentName(state.agent) || state.source !== PRIVILEGED_EVENT_SOURCE || !canonicalIso(state.updatedAt))
|
|
1269
1276
|
return false;
|
|
1270
1277
|
try {
|
|
1271
1278
|
replayBytes(state);
|
|
@@ -1444,7 +1451,7 @@ function commitMutation(recordPath, record, now) {
|
|
|
1444
1451
|
function bindPrivilegedFailsafeArtifact(recordPath, input) {
|
|
1445
1452
|
return withRecordLock(recordPath, () => {
|
|
1446
1453
|
const record = readExternalEventRecord(recordPath);
|
|
1447
|
-
if (!(
|
|
1454
|
+
if (!isProductAgentName(record.agent) || record.source !== PRIVILEGED_EVENT_SOURCE || !record.privilegedProtectiveAction) {
|
|
1448
1455
|
throw new Error("System failsafe requires a privileged Sanctuary event");
|
|
1449
1456
|
}
|
|
1450
1457
|
if (!/^[a-f0-9]{64}$/u.test(input.artifactId))
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PRODUCT_SEAM_VERSION = void 0;
|
|
4
4
|
exports.loadProduct = loadProduct;
|
|
5
|
+
exports.loadImageProduct = loadImageProduct;
|
|
5
6
|
exports.productFor = productFor;
|
|
7
|
+
exports.productAgentAmong = productAgentAmong;
|
|
6
8
|
const runtime_1 = require("../../nerves/runtime");
|
|
9
|
+
const container_runtime_1 = require("../daemon/container-runtime");
|
|
7
10
|
/** The seam version this harness runs. A product built for another stops the start. */
|
|
8
11
|
exports.PRODUCT_SEAM_VERSION = 1;
|
|
9
12
|
let active = null;
|
|
13
|
+
// Whether this process has settled which product it runs: by an explicit load, or by the first productFor reading the image's policy.
|
|
14
|
+
let settled = false;
|
|
10
15
|
function invalid(modulePath, problem) {
|
|
11
16
|
(0, runtime_1.emitNervesEvent)({
|
|
12
17
|
level: "error",
|
|
@@ -39,10 +44,13 @@ function validProduct(value, modulePath) {
|
|
|
39
44
|
* invalid stops the start.
|
|
40
45
|
*/
|
|
41
46
|
function loadProduct(modulePath, load = require) {
|
|
47
|
+
active = null;
|
|
42
48
|
if (modulePath === undefined) {
|
|
43
|
-
|
|
49
|
+
settled = true;
|
|
44
50
|
return null;
|
|
45
51
|
}
|
|
52
|
+
// A module that fails stays unsettled, so every later productFor in this process fails the same way instead of answering null.
|
|
53
|
+
settled = false;
|
|
46
54
|
let loaded;
|
|
47
55
|
try {
|
|
48
56
|
loaded = load(modulePath);
|
|
@@ -51,6 +59,7 @@ function loadProduct(modulePath, load = require) {
|
|
|
51
59
|
throw invalid(modulePath, `it did not load (${error instanceof Error ? error.message : String(error)})`);
|
|
52
60
|
}
|
|
53
61
|
active = validProduct(loaded, modulePath);
|
|
62
|
+
settled = true;
|
|
54
63
|
(0, runtime_1.emitNervesEvent)({
|
|
55
64
|
component: "daemon",
|
|
56
65
|
event: "daemon.product_loaded",
|
|
@@ -59,7 +68,23 @@ function loadProduct(modulePath, load = require) {
|
|
|
59
68
|
});
|
|
60
69
|
return active;
|
|
61
70
|
}
|
|
62
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Loads the product /opt/ouro/container-runtime.json names (`product`), or none when the file is absent or names none. The
|
|
73
|
+
* daemon calls it first, so a broken product stops the start; every other process (each sense, the agent's own turns, the CLI)
|
|
74
|
+
* settles it on its first `productFor`, so no child can run without the product its image names.
|
|
75
|
+
*/
|
|
76
|
+
function loadImageProduct(options = {}) {
|
|
77
|
+
const policy = (0, container_runtime_1.readContainerRuntimePolicy)(options.policyPath === undefined ? {} : { path: options.policyPath });
|
|
78
|
+
return loadProduct(policy?.product, options.load);
|
|
79
|
+
}
|
|
80
|
+
/** The loaded product when this agent (or a saved record's `agent`) is one of its names, else null. */
|
|
63
81
|
function productFor(agentName) {
|
|
64
|
-
|
|
82
|
+
if (!settled)
|
|
83
|
+
loadImageProduct();
|
|
84
|
+
return active && typeof agentName === "string" && active.agents.includes(agentName) ? active : null;
|
|
85
|
+
}
|
|
86
|
+
/** The one agent among `agents` that the product runs, or null when there is none or more than one. */
|
|
87
|
+
function productAgentAmong(agents) {
|
|
88
|
+
const owned = agents.filter((agent) => productFor(agent) !== null);
|
|
89
|
+
return owned.length === 1 ? owned[0] : null;
|
|
65
90
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.product = void 0;
|
|
4
|
+
const butler_agent_1 = require("../heart/butler-agent");
|
|
5
|
+
const runtime_1 = require("../nerves/runtime");
|
|
6
|
+
/**
|
|
7
|
+
* The Butler, registered with the harness through the product seam. The Unraid image names this module in
|
|
8
|
+
* /opt/ouro/container-runtime.json, so core loads it at runtime and never imports it. Each of the Butler's jobs gets its
|
|
9
|
+
* slot here as it moves behind the seam (M3).
|
|
10
|
+
*/
|
|
11
|
+
exports.product = {
|
|
12
|
+
seamVersion: 1,
|
|
13
|
+
id: "butler",
|
|
14
|
+
agents: butler_agent_1.BUTLER_AGENT_NAMES,
|
|
15
|
+
};
|
|
16
|
+
(0, runtime_1.emitNervesEvent)({ component: "daemon", event: "daemon.butler_product_registered", message: "Butler product registered", meta: { agents: [...exports.product.agents] } });
|
|
@@ -57,7 +57,7 @@ const session_events_1 = require("../heart/session-events");
|
|
|
57
57
|
const session_transaction_1 = require("../mind/session-transaction");
|
|
58
58
|
const telegram_client_1 = require("./telegram-client");
|
|
59
59
|
const telegram_markdown_1 = require("./telegram-markdown");
|
|
60
|
-
const
|
|
60
|
+
const active_1 = require("../heart/product/active");
|
|
61
61
|
exports.FIXED_ADMISSION_ACKNOWLEDGEMENT = "Thanks — I’ve asked the person I work for. Your message is still unread and unprocessed; I’ll only read it if they welcome you in.";
|
|
62
62
|
exports.FIXED_USENET_SYSTEM_FAILSAFE = "Quick heads-up: I paused downloads because the server was discarding most of what it fetched. Nothing needs doing this second — I’ll investigate and follow up when I’m back online.";
|
|
63
63
|
const SYSTEM_FAILSAFE_UNAVAILABLE_MS = 2 * 60_000;
|
|
@@ -544,7 +544,7 @@ async function reconcileTelegramSystemFailsafe(input) {
|
|
|
544
544
|
const action = record.privilegedProtectiveAction;
|
|
545
545
|
if (record.privilegedFailsafe)
|
|
546
546
|
return { sent: false, reason: "already_recorded", artifactId: record.privilegedFailsafe.artifactId };
|
|
547
|
-
if (!(0,
|
|
547
|
+
if (!(0, active_1.productFor)(record.agent) || record.source !== "sanctuary-usenet" || record.eventType !== "usenet.protective_action"
|
|
548
548
|
|| record.priority !== "critical" || !action?.critical)
|
|
549
549
|
return { sent: false, reason: "noncritical" };
|
|
550
550
|
if (!action.verification.verified)
|
|
@@ -579,7 +579,7 @@ async function reconcileTelegramSystemFailsafe(input) {
|
|
|
579
579
|
async function sweepTelegramSystemFailsafes(input) {
|
|
580
580
|
const scanned = (input.scanCache ?? new router_1.ExternalEventScanCache()).scan(input.eventRoot);
|
|
581
581
|
const records = scanned
|
|
582
|
-
.flatMap((entry) => entry.record && (0,
|
|
582
|
+
.flatMap((entry) => entry.record && (0, active_1.productFor)(entry.record.agent) && entry.record.source === "sanctuary-usenet" && !entry.record.privilegedFailsafe ? [entry.record] : [])
|
|
583
583
|
.sort((left, right) => left.eventId.localeCompare(right.eventId))
|
|
584
584
|
.slice(0, 32);
|
|
585
585
|
let sent = 0;
|
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.1685",
|
|
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.1685",
|
|
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.1685",
|
|
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": {
|