@ouro.bot/cli 0.1.0-alpha.845 → 0.1.0-alpha.846
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.846",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Sanctuary: a natural question about the Butler's version ('what version are you on?') now requires a fresh install-state read, and any version it states must match that read. After an upgrade it had answered 'Just checked the live state: 0.1.0-alpha.841' from earlier conversation while running 845, with no tool call."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.845",
|
|
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.846</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sanctuaryInstallStateRequiredToolCalls = sanctuaryInstallStateRequiredToolCalls;
|
|
4
|
+
exports.sanctuaryVersionQuestionRequiredToolCalls = sanctuaryVersionQuestionRequiredToolCalls;
|
|
4
5
|
const runtime_1 = require("../nerves/runtime");
|
|
5
6
|
const TOOL_NAME = "sanctuary_get_install_state";
|
|
6
7
|
const REQUEST = /\b(?:use|run|call)\s+sanctuary_get_install_state\b/iu;
|
|
@@ -124,3 +125,45 @@ function sanctuaryInstallStateRequiredToolCalls(request, advertisedToolNames) {
|
|
|
124
125
|
},
|
|
125
126
|
};
|
|
126
127
|
}
|
|
128
|
+
const VERSION_QUESTION = /\b(?:what|which)(?:'s|\s+is)?\s+(?:your\s+|the\s+)?(?:current\s+|live\s+|installed\s+|running\s+)?version\b|\bversion\s+(?:are|r)\s+(?:you|u)\b|\bwhat\s+(?:are\s+you|you're)\s+(?:on|running)\b|\bare\s+you\s+(?:on|running)\s+(?:the\s+)?(?:latest|newest|new|current)\b/iu;
|
|
129
|
+
const VERSION_CLAIM = /\bv?\d+\.\d+\.\d+(?:-[0-9A-Za-z]+(?:\.[0-9A-Za-z]+)*)?\b/gu;
|
|
130
|
+
/**
|
|
131
|
+
* A natural question about the Butler's own version must be answered from a fresh
|
|
132
|
+
* install-state read. After an upgrade the Butler once answered "Just checked the live
|
|
133
|
+
* state: 0.1.0-alpha.841" from earlier conversation while it was running 845, with no
|
|
134
|
+
* tool call at all. Unlike the explicit install-state contract, the wording stays free:
|
|
135
|
+
* only the version it states is checked against the read.
|
|
136
|
+
*/
|
|
137
|
+
function sanctuaryVersionQuestionRequiredToolCalls(request, advertisedToolNames) {
|
|
138
|
+
const normalizedRequest = request.normalize("NFKC").replace(/[‘’]/gu, "'");
|
|
139
|
+
if (!advertisedToolNames.includes(TOOL_NAME) || REQUEST.test(normalizedRequest) || !VERSION_QUESTION.test(normalizedRequest))
|
|
140
|
+
return undefined;
|
|
141
|
+
let current;
|
|
142
|
+
(0, runtime_1.emitNervesEvent)({
|
|
143
|
+
component: "senses",
|
|
144
|
+
event: "senses.sanctuary_version_question_required",
|
|
145
|
+
message: "a question about the running version requires a fresh install-state read",
|
|
146
|
+
meta: { requiredToolName: TOOL_NAME },
|
|
147
|
+
});
|
|
148
|
+
return {
|
|
149
|
+
names: [TOOL_NAME],
|
|
150
|
+
retryMessage: "Call sanctuary_get_install_state with empty arguments now, then state the version from that fresh result, not from earlier conversation.",
|
|
151
|
+
requireSuccessfulResults: true,
|
|
152
|
+
validateRequiredToolResult: (name, result, args) => {
|
|
153
|
+
if (name !== TOOL_NAME || Object.keys(args).length !== 0)
|
|
154
|
+
return false;
|
|
155
|
+
current = parseInstallState(result);
|
|
156
|
+
return current !== undefined;
|
|
157
|
+
},
|
|
158
|
+
validateTerminalAnswer: (answer) => {
|
|
159
|
+
if (!current)
|
|
160
|
+
return "Call sanctuary_get_install_state and state the version from that fresh result.";
|
|
161
|
+
const known = new Set([current.runtimePackageVersion, current.packagedBundleVersion, ...(current.liveBundleVersion ? [current.liveBundleVersion] : [])].map((version) => version.replace(/^v/u, "")));
|
|
162
|
+
const claimed = [...answer.normalize("NFKC").matchAll(VERSION_CLAIM)].map((match) => match[0].replace(/^v/u, ""));
|
|
163
|
+
if (claimed.length === 0)
|
|
164
|
+
return `State the running version from the fresh result: ${current.runtimePackageVersion}.`;
|
|
165
|
+
const stale = claimed.filter((version) => !known.has(version));
|
|
166
|
+
return stale.length === 0 ? undefined : `The fresh install-state result says ${current.runtimePackageVersion}; do not state ${stale.join(", ")} as the current version.`;
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
}
|
package/dist/senses/telegram.js
CHANGED
|
@@ -1234,9 +1234,12 @@ function createTelegramSenseApp(options) {
|
|
|
1234
1234
|
const installState = isSanctuaryOwner
|
|
1235
1235
|
? (0, sanctuary_install_state_contract_1.sanctuaryInstallStateRequiredToolCalls)(input.userMessage, relationshipAuthorization.advertisedToolNames)
|
|
1236
1236
|
: undefined;
|
|
1237
|
+
const versionQuestion = isSanctuaryOwner
|
|
1238
|
+
? (0, sanctuary_install_state_contract_1.sanctuaryVersionQuestionRequiredToolCalls)(input.userMessage, relationshipAuthorization.advertisedToolNames)
|
|
1239
|
+
: undefined;
|
|
1237
1240
|
if (input.fullVisibilityProgress && fullVisibility)
|
|
1238
1241
|
input.fullVisibilityProgress.fallback = fullVisibility.emptyResponseFallback;
|
|
1239
|
-
const contracts = [storageOptimization, fullVisibility, staleDockerCare, mediaCatalog, installState].filter(Boolean);
|
|
1242
|
+
const contracts = [storageOptimization, fullVisibility, staleDockerCare, mediaCatalog, installState, versionQuestion].filter(Boolean);
|
|
1240
1243
|
const ownedNames = contracts.map((contract) => new Set(contract.names));
|
|
1241
1244
|
const requiredToolCalls = contracts.length === 0 ? undefined : {
|
|
1242
1245
|
names: [...new Set(contracts.flatMap((contract) => [...contract.names]))],
|
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.846",
|
|
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.846",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|