@ouro.bot/cli 0.1.0-alpha.1715 → 0.1.0-alpha.1716
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 +6 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/daemon/sense-manager.js +9 -11
- package/dist/heart/product/active.js +35 -0
- package/dist/heart/turn-context.js +5 -8
- package/dist/mind/prompt.js +6 -3
- package/dist/products/butler.js +12 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
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.1716",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Whether the Butler's Telegram sense is set up is now decided in one place, the Butler's product registration. The daemon's sense status and the sense lines in the Butler's prompt all read it. Before, each kept its own copy of the rule. In the Butler's image nothing changes: its Telegram is ready when both of its runtime configs can be read and neither holds a bot token, because the root gateway holds the token. It needs this machine's config, and the repair line says to finish the root authority migration rather than restore a token. Other agents' Telegram readiness is unchanged."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1715",
|
|
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.1716</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -40,7 +40,7 @@ const os = __importStar(require("os"));
|
|
|
40
40
|
const path = __importStar(require("path"));
|
|
41
41
|
const runtime_1 = require("../../nerves/runtime");
|
|
42
42
|
const identity_1 = require("../identity");
|
|
43
|
-
const
|
|
43
|
+
const active_1 = require("../product/active");
|
|
44
44
|
const runtime_credentials_1 = require("../runtime-credentials");
|
|
45
45
|
const provider_credentials_1 = require("../provider-credentials");
|
|
46
46
|
const sense_truth_1 = require("../sense-truth");
|
|
@@ -190,7 +190,7 @@ function runtimeConfigUnavailableDetail(agent, runtimeConfig) {
|
|
|
190
190
|
return `vault ${itemName} unavailable (${compactRuntimeConfigError(agent, runtimeConfig.error)})`;
|
|
191
191
|
}
|
|
192
192
|
function needsMachineRuntimeConfig(agent, sense) {
|
|
193
|
-
return sense === "bluebubbles" || sense === "voice" || sense === "a2a" || sense === "shepherd" || ((0,
|
|
193
|
+
return sense === "bluebubbles" || sense === "voice" || sense === "a2a" || sense === "shepherd" || (sense === "telegram" && (0, active_1.productSense)(agent, "telegram")?.needsMachineConfig === true);
|
|
194
194
|
}
|
|
195
195
|
function senseFactsFromRuntimeConfig(agent, senses, runtimeConfig, machineRuntimeConfig = (0, runtime_credentials_1.readMachineRuntimeCredentialConfig)(agent), workbenchHasStaleBundleEntry = false) {
|
|
196
196
|
const base = {
|
|
@@ -216,12 +216,11 @@ function senseFactsFromRuntimeConfig(agent, senses, runtimeConfig, machineRuntim
|
|
|
216
216
|
const integrations = payload.integrations;
|
|
217
217
|
const voice = machinePayload.voice;
|
|
218
218
|
const a2a = machinePayload.a2a;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
: { configured: false, detail: "root authority migration requires available tokenless credential inventories" };
|
|
219
|
+
const productTelegram = senses.telegram.enabled
|
|
220
|
+
? (0, active_1.productSenseReadiness)(agent, "telegram", { runtime: { ok: runtimeConfig.ok, config: payload }, machine: { ok: machineRuntimeConfig.ok, config: machinePayload } })
|
|
221
|
+
: null;
|
|
222
|
+
if (productTelegram) {
|
|
223
|
+
base.telegram = productTelegram;
|
|
225
224
|
}
|
|
226
225
|
else if (senses.telegram.enabled) {
|
|
227
226
|
const missing = ["telegramBotToken", "telegramAuthorizedUserId", "telegramAuthorizedChatId"]
|
|
@@ -409,9 +408,8 @@ function senseRepairHint(agent, sense) {
|
|
|
409
408
|
return `Agent-runnable: run 'ouro connect a2a --agent ${agent}', then restart with 'ouro up'.`;
|
|
410
409
|
}
|
|
411
410
|
if (sense === "telegram") {
|
|
412
|
-
return (0,
|
|
413
|
-
|
|
414
|
-
: `Agent-runnable: store Telegram bot/user/chat coordinates with 'ouro connect telegram --agent ${agent}', then restart with 'ouro up'.`;
|
|
411
|
+
return (0, active_1.productSenseRepairHint)(agent, "telegram")
|
|
412
|
+
?? `Agent-runnable: store Telegram bot/user/chat coordinates with 'ouro connect telegram --agent ${agent}', then restart with 'ouro up'.`;
|
|
415
413
|
}
|
|
416
414
|
if (sense === "shepherd")
|
|
417
415
|
return (0, shepherd_config_1.shepherdRepairHint)(agent);
|
|
@@ -12,6 +12,9 @@ exports.productTools = productTools;
|
|
|
12
12
|
exports.productToolDefinitions = productToolDefinitions;
|
|
13
13
|
exports.productToolSelection = productToolSelection;
|
|
14
14
|
exports.productActiveWorkSections = productActiveWorkSections;
|
|
15
|
+
exports.productSense = productSense;
|
|
16
|
+
exports.productSenseRepairHint = productSenseRepairHint;
|
|
17
|
+
exports.productSenseReadiness = productSenseReadiness;
|
|
15
18
|
const runtime_1 = require("../../nerves/runtime");
|
|
16
19
|
const container_runtime_1 = require("../daemon/container-runtime");
|
|
17
20
|
/** The seam version this harness runs. A product built for another stops the start. */
|
|
@@ -199,3 +202,35 @@ async function productActiveWorkSections(input) {
|
|
|
199
202
|
throw error;
|
|
200
203
|
}
|
|
201
204
|
}
|
|
205
|
+
/** How this agent's product runs one of core's senses (J6), or null when it runs it core's way. */
|
|
206
|
+
function productSense(agentName, sense) {
|
|
207
|
+
return productFor(agentName)?.senses?.[sense] ?? null;
|
|
208
|
+
}
|
|
209
|
+
/** The product's repair line for a sense that isn't set up (J6), or null when core gives it. A throw from the product fails the status. */
|
|
210
|
+
function productSenseRepairHint(agentName, sense) {
|
|
211
|
+
const product = productFor(agentName);
|
|
212
|
+
const own = product?.senses?.[sense];
|
|
213
|
+
if (!own)
|
|
214
|
+
return null;
|
|
215
|
+
try {
|
|
216
|
+
return own.repairHint(agentName);
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
hookFailed(product, "senses.repairHint", agentName, error, "the product's sense repair line failed, so the sense's status can't be read");
|
|
220
|
+
throw error;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/** The product's judgement of whether a sense is set up (J6), or null when core judges it. A throw from the product fails the status. */
|
|
224
|
+
function productSenseReadiness(agentName, sense, input) {
|
|
225
|
+
const product = productFor(agentName);
|
|
226
|
+
const own = product?.senses?.[sense];
|
|
227
|
+
if (!own)
|
|
228
|
+
return null;
|
|
229
|
+
try {
|
|
230
|
+
return own.readiness(input);
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
hookFailed(product, "senses.readiness", agentName, error, "the product's sense readiness failed, so the sense's status can't be read");
|
|
234
|
+
throw error;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -48,7 +48,7 @@ const path = __importStar(require("path"));
|
|
|
48
48
|
const runtime_1 = require("../nerves/runtime");
|
|
49
49
|
const manager_1 = require("./bridges/manager");
|
|
50
50
|
const identity_1 = require("./identity");
|
|
51
|
-
const
|
|
51
|
+
const active_1 = require("./product/active");
|
|
52
52
|
const coding_1 = require("../repertoire/coding");
|
|
53
53
|
const session_activity_1 = require("./session-activity");
|
|
54
54
|
const thoughts_1 = require("./daemon/thoughts");
|
|
@@ -219,14 +219,11 @@ function readSenseStatusLines() {
|
|
|
219
219
|
? openAIRealtimeVoiceReady
|
|
220
220
|
: cascadeVoiceReady,
|
|
221
221
|
a2a: true,
|
|
222
|
-
//
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
telegram: (0, butler_agent_1.isButlerAgent)(agentName)
|
|
226
|
-
? runtimeConfig.ok && machineRuntimeConfig.ok && !Object.hasOwn(runtimePayload, "telegramBotToken") && !Object.hasOwn(machinePayload, "telegramBotToken")
|
|
227
|
-
: hasTextField(runtimePayload, "telegramBotToken")
|
|
222
|
+
// A product that runs Telegram its own way judges its readiness, the same judgement the daemon's sense status reads (D-047).
|
|
223
|
+
telegram: (0, active_1.productSenseReadiness)(agentName, "telegram", { runtime: { ok: runtimeConfig.ok, config: runtimePayload }, machine: { ok: machineRuntimeConfig.ok, config: machinePayload } })?.configured
|
|
224
|
+
?? (hasTextField(runtimePayload, "telegramBotToken")
|
|
228
225
|
&& hasTextField(runtimePayload, "telegramAuthorizedUserId")
|
|
229
|
-
&& hasTextField(runtimePayload, "telegramAuthorizedChatId"),
|
|
226
|
+
&& hasTextField(runtimePayload, "telegramAuthorizedChatId")),
|
|
230
227
|
workbench: false,
|
|
231
228
|
shepherd: (0, shepherd_config_1.shepherdSenseStatus)(true, machinePayload) === "ready",
|
|
232
229
|
"app-sessions": true,
|
package/dist/mind/prompt.js
CHANGED
|
@@ -73,6 +73,7 @@ const identity_1 = require("../heart/identity");
|
|
|
73
73
|
const runtime_cwd_1 = require("../heart/runtime-cwd");
|
|
74
74
|
const config_1 = require("../heart/config");
|
|
75
75
|
const runtime_credentials_1 = require("../heart/runtime-credentials");
|
|
76
|
+
const active_1 = require("../heart/product/active");
|
|
76
77
|
const runtime_mode_1 = require("../heart/daemon/runtime-mode");
|
|
77
78
|
const friends_1 = require("@ouro.bot/friends");
|
|
78
79
|
const runtime_1 = require("../nerves/runtime");
|
|
@@ -560,9 +561,11 @@ function localSenseStatusLines() {
|
|
|
560
561
|
&& hasTextField(voice, "whisperCliPath")
|
|
561
562
|
&& hasTextField(voice, "whisperModelPath"),
|
|
562
563
|
a2a: true,
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
// A product that runs Telegram its own way judges its readiness, as the daemon and turn-context do.
|
|
565
|
+
telegram: (0, active_1.productSenseReadiness)((0, identity_1.getAgentName)(), "telegram", { runtime: { ok: runtimeConfig.ok, config: runtimePayload }, machine: { ok: machineRuntimeConfig.ok, config: machinePayload } })?.configured
|
|
566
|
+
?? (hasTextField(runtimePayload, "telegramBotToken")
|
|
567
|
+
&& hasTextField(runtimePayload, "telegramAuthorizedUserId")
|
|
568
|
+
&& hasTextField(runtimePayload, "telegramAuthorizedChatId")),
|
|
566
569
|
workbench: false,
|
|
567
570
|
shepherd: (0, shepherd_config_1.shepherdSenseStatus)(true, machinePayload) === "ready",
|
|
568
571
|
"app-sessions": true,
|
package/dist/products/butler.js
CHANGED
|
@@ -160,6 +160,18 @@ exports.product = {
|
|
|
160
160
|
});
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
+
// J6: the Butler's Telegram holds no bot token. The root authority gateway holds it, so a token in the Butler's own config
|
|
164
|
+
// is the misconfiguration, and both configs must be readable for the gateway to be validated at startup.
|
|
165
|
+
senses: {
|
|
166
|
+
telegram: {
|
|
167
|
+
needsMachineConfig: true,
|
|
168
|
+
readiness: ({ runtime, machine }) => runtime.ok && machine.ok
|
|
169
|
+
&& !Object.hasOwn(runtime.config, "telegramBotToken") && !Object.hasOwn(machine.config, "telegramBotToken")
|
|
170
|
+
? { configured: true, detail: "root authority transport; gateway validated at process startup" }
|
|
171
|
+
: { configured: false, detail: "root authority migration requires available tokenless credential inventories" },
|
|
172
|
+
repairHint: () => "Agent-runnable: complete or recover the root authority migration; do not restore a resident Telegram token.",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
163
175
|
// J5: the house check runs in the daemon, and only Supercronic may fire it on its cron schedule.
|
|
164
176
|
habits: {
|
|
165
177
|
"sanctuary-health": {
|
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.1716",
|
|
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.1716",
|
|
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.1716",
|
|
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": {
|