@ouro.bot/cli 0.1.0-alpha.1031 → 0.1.0-alpha.1038
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/auth/auth-flow.js +2 -0
- package/dist/heart/daemon/cli-exec.js +3 -9
- package/dist/heart/daemon/sense-manager.js +1 -12
- package/dist/heart/identity.js +23 -1
- package/dist/heart/providers/account-pool.js +13 -4
- 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.1038",
|
|
6
|
+
"changes": [
|
|
7
|
+
"New agents no longer start with a senses.workbench entry in agent.json, and an existing senses.workbench: { enabled: false } now reads as disabled instead of a stale Workbench entry. Before, every freshly hatched agent showed Workbench as needs_config, which failed the MCP canary, kept a critical health alert firing and left the context-loss sentinel blocked. Writing a model or provider choice back to agent.json no longer re-adds the entry, and ouro connect shows Workbench as ready for such bundles. senses.workbench: { enabled: true } and mcpServers.ouro_workbench still count as stale until ouro connect workbench cleans them."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1034",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Account pool: the fleet burn file uses the machine name this Mac's quota balancer uses (for example laptop), before LocalHostName."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1031",
|
|
6
18
|
"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.1038</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -129,6 +129,7 @@ function writeAgentProviderSelection(agentName, facing, provider, bundlesRoot =
|
|
|
129
129
|
const resolved = (0, provider_models_1.resolveModelForProviderSelection)(provider, previousFacing.model);
|
|
130
130
|
const nextConfig = {
|
|
131
131
|
...config,
|
|
132
|
+
senses: (0, identity_1.persistedSenses)(config.senses),
|
|
132
133
|
[facingKey]: { ...previousFacing, provider, model: resolved.model },
|
|
133
134
|
};
|
|
134
135
|
fs.writeFileSync(configPath, `${JSON.stringify(nextConfig, null, 2)}\n`, "utf8");
|
|
@@ -171,6 +172,7 @@ function writeAgentModel(agentName, facing, modelName, deps = {}) {
|
|
|
171
172
|
const provider = facingBlock.provider;
|
|
172
173
|
const nextConfig = {
|
|
173
174
|
...config,
|
|
175
|
+
senses: (0, identity_1.persistedSenses)(config.senses),
|
|
174
176
|
[facingKey]: { ...facingBlock, model: modelName },
|
|
175
177
|
};
|
|
176
178
|
fs.writeFileSync(configPath, `${JSON.stringify(nextConfig, null, 2)}\n`, "utf8");
|
|
@@ -3070,12 +3070,6 @@ function readConnectBaySenseFlags(agent, deps) {
|
|
|
3070
3070
|
const mcpServers = parsed.mcpServers && typeof parsed.mcpServers === "object" && !Array.isArray(parsed.mcpServers)
|
|
3071
3071
|
? parsed.mcpServers
|
|
3072
3072
|
: undefined;
|
|
3073
|
-
const workbenchSensePresent = senses
|
|
3074
|
-
? Object.prototype.hasOwnProperty.call(senses, "workbench")
|
|
3075
|
-
: false;
|
|
3076
|
-
const workbenchMcpPresent = mcpServers
|
|
3077
|
-
? Object.prototype.hasOwnProperty.call(mcpServers, "ouro_workbench")
|
|
3078
|
-
: false;
|
|
3079
3073
|
const workbenchCommand = mcpServers?.ouro_workbench?.command;
|
|
3080
3074
|
const workbenchEnabled = senses?.workbench?.enabled === true;
|
|
3081
3075
|
const workbenchMcpCommand = typeof workbenchCommand === "string" && workbenchCommand.trim().length > 0
|
|
@@ -3089,7 +3083,7 @@ function readConnectBaySenseFlags(agent, deps) {
|
|
|
3089
3083
|
a2aEnabled: senses?.a2a?.enabled === true,
|
|
3090
3084
|
workbenchEnabled,
|
|
3091
3085
|
workbenchMcpCommand,
|
|
3092
|
-
workbenchHasStaleBundleEntry:
|
|
3086
|
+
workbenchHasStaleBundleEntry: (0, identity_1.hasStaleWorkbenchBundleEntry)(senses, mcpServers),
|
|
3093
3087
|
};
|
|
3094
3088
|
}
|
|
3095
3089
|
function defaultWorkbenchMcpCandidates(deps) {
|
|
@@ -5390,7 +5384,7 @@ async function executeConnectTelegram(agent, deps) {
|
|
|
5390
5384
|
});
|
|
5391
5385
|
}
|
|
5392
5386
|
async function executeConnectWorkbench(agent, deps) {
|
|
5393
|
-
const { workbenchMcpCommand
|
|
5387
|
+
const { workbenchMcpCommand } = readConnectBaySenseFlags(agent, deps);
|
|
5394
5388
|
const changed = removeWorkbenchMcpRegistration(agent, deps);
|
|
5395
5389
|
const syncSummary = changed ? await pushAgentBundleAfterCliMutation(agent, deps) : "";
|
|
5396
5390
|
const executablePath = findInstalledWorkbenchMcp(deps, workbenchMcpCommand);
|
|
@@ -5410,7 +5404,7 @@ async function executeConnectWorkbench(agent, deps) {
|
|
|
5410
5404
|
const message = [
|
|
5411
5405
|
`Workbench runtime injection ready for ${agent}`,
|
|
5412
5406
|
`OuroWorkbenchMCP found: ${executablePath}`,
|
|
5413
|
-
|
|
5407
|
+
changed
|
|
5414
5408
|
? "agent.json: removed stale senses.workbench / mcpServers.ouro_workbench entries"
|
|
5415
5409
|
: "agent.json: no Workbench entries needed or written",
|
|
5416
5410
|
`boss launch path: ouro acp-serve --agent ${agent} --workbench-mcp ${executablePath}`,
|
|
@@ -90,23 +90,12 @@ function readAgentSenses(agentJsonPath) {
|
|
|
90
90
|
return { senses: defaults, workbenchHasStaleBundleEntry: false };
|
|
91
91
|
}
|
|
92
92
|
const rawSenses = parsed.senses;
|
|
93
|
+
const workbenchHasStaleBundleEntry = (0, identity_1.hasStaleWorkbenchBundleEntry)(rawSenses, parsed.mcpServers);
|
|
93
94
|
if (!rawSenses || typeof rawSenses !== "object" || Array.isArray(rawSenses)) {
|
|
94
|
-
const rawMcpServers = parsed.mcpServers;
|
|
95
|
-
const workbenchHasStaleBundleEntry = !!rawMcpServers
|
|
96
|
-
&& typeof rawMcpServers === "object"
|
|
97
|
-
&& !Array.isArray(rawMcpServers)
|
|
98
|
-
&& Object.prototype.hasOwnProperty.call(rawMcpServers, "ouro_workbench");
|
|
99
95
|
if (workbenchHasStaleBundleEntry)
|
|
100
96
|
defaults.workbench = { enabled: true };
|
|
101
97
|
return { senses: defaults, workbenchHasStaleBundleEntry };
|
|
102
98
|
}
|
|
103
|
-
const workbenchSensePresent = Object.prototype.hasOwnProperty.call(rawSenses, "workbench");
|
|
104
|
-
const rawMcpServers = parsed.mcpServers;
|
|
105
|
-
const workbenchMcpPresent = !!rawMcpServers
|
|
106
|
-
&& typeof rawMcpServers === "object"
|
|
107
|
-
&& !Array.isArray(rawMcpServers)
|
|
108
|
-
&& Object.prototype.hasOwnProperty.call(rawMcpServers, "ouro_workbench");
|
|
109
|
-
const workbenchHasStaleBundleEntry = workbenchSensePresent || workbenchMcpPresent;
|
|
110
99
|
for (const sense of ["cli", "teams", "bluebubbles", "mail", "voice", "a2a", "telegram", "workbench", "shepherd", "app-sessions"]) {
|
|
111
100
|
const rawSense = rawSenses[sense];
|
|
112
101
|
if (!rawSense || typeof rawSense !== "object" || Array.isArray(rawSense)) {
|
package/dist/heart/identity.js
CHANGED
|
@@ -38,6 +38,8 @@ exports.normalizeVaultServerUrl = normalizeVaultServerUrl;
|
|
|
38
38
|
exports.getVaultServerUrlCandidates = getVaultServerUrlCandidates;
|
|
39
39
|
exports.defaultStableVaultEmail = defaultStableVaultEmail;
|
|
40
40
|
exports.resolveVaultConfig = resolveVaultConfig;
|
|
41
|
+
exports.persistedSenses = persistedSenses;
|
|
42
|
+
exports.hasStaleWorkbenchBundleEntry = hasStaleWorkbenchBundleEntry;
|
|
41
43
|
exports.normalizeSenses = normalizeSenses;
|
|
42
44
|
exports.buildDefaultAgentTemplate = buildDefaultAgentTemplate;
|
|
43
45
|
exports.getAgentName = getAgentName;
|
|
@@ -151,6 +153,27 @@ exports.DEFAULT_AGENT_SENSES = {
|
|
|
151
153
|
shepherd: { enabled: false },
|
|
152
154
|
"app-sessions": { enabled: false },
|
|
153
155
|
};
|
|
156
|
+
/** Drops the disabled Workbench default before senses are written back to agent.json. */
|
|
157
|
+
function persistedSenses(senses) {
|
|
158
|
+
const { workbench, ...rest } = senses;
|
|
159
|
+
return workbench.enabled ? { ...rest, workbench } : rest;
|
|
160
|
+
}
|
|
161
|
+
function isPlainRecord(value) {
|
|
162
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* True when agent.json still carries a legacy Workbench registration that
|
|
166
|
+
* `ouro connect workbench` should clean: `mcpServers.ouro_workbench`, or a
|
|
167
|
+
* `senses.workbench` entry other than an explicit `{ enabled: false }`.
|
|
168
|
+
*/
|
|
169
|
+
function hasStaleWorkbenchBundleEntry(rawSenses, rawMcpServers) {
|
|
170
|
+
if (isPlainRecord(rawMcpServers) && Object.prototype.hasOwnProperty.call(rawMcpServers, "ouro_workbench"))
|
|
171
|
+
return true;
|
|
172
|
+
if (!isPlainRecord(rawSenses) || !Object.prototype.hasOwnProperty.call(rawSenses, "workbench"))
|
|
173
|
+
return false;
|
|
174
|
+
const rawWorkbench = rawSenses.workbench;
|
|
175
|
+
return !(isPlainRecord(rawWorkbench) && rawWorkbench.enabled === false);
|
|
176
|
+
}
|
|
154
177
|
function normalizeSenses(value, configFile) {
|
|
155
178
|
const defaults = {
|
|
156
179
|
cli: { ...exports.DEFAULT_AGENT_SENSES.cli },
|
|
@@ -261,7 +284,6 @@ function buildDefaultAgentTemplate(_agentName) {
|
|
|
261
284
|
voice: { ...exports.DEFAULT_AGENT_SENSES.voice },
|
|
262
285
|
a2a: { ...exports.DEFAULT_AGENT_SENSES.a2a },
|
|
263
286
|
telegram: { ...exports.DEFAULT_AGENT_SENSES.telegram },
|
|
264
|
-
workbench: { ...exports.DEFAULT_AGENT_SENSES.workbench },
|
|
265
287
|
shepherd: { ...exports.DEFAULT_AGENT_SENSES.shepherd },
|
|
266
288
|
"app-sessions": { ...exports.DEFAULT_AGENT_SENSES["app-sessions"] },
|
|
267
289
|
},
|
|
@@ -61,13 +61,22 @@ const fleet_readings_1 = require("../quota/fleet-readings");
|
|
|
61
61
|
const accountKey = (account) => `${account.login}@${account.host}`;
|
|
62
62
|
exports.accountKey = accountKey;
|
|
63
63
|
/**
|
|
64
|
-
* This Mac's name for the fleet gist
|
|
65
|
-
*
|
|
66
|
-
*
|
|
64
|
+
* This Mac's name for the fleet gist. First the name the Mac's own quota balancer uses (`last.machine` in
|
|
65
|
+
* `~/.config/mac-fleet/quota-balance.json`, from the fleet's machines.json, e.g. "laptop"), so the agent's file sits
|
|
66
|
+
* beside that Mac's `<machine>.quota.txt`. Else macOS's LocalHostName (unique on the network), else the host name.
|
|
67
|
+
* Lowercased with no dots: a generic host name such as "Mac" would make two machines write one file.
|
|
67
68
|
*/
|
|
68
69
|
function defaultMachineName(deps = {}) {
|
|
69
70
|
let name = "";
|
|
70
|
-
|
|
71
|
+
try {
|
|
72
|
+
const state = JSON.parse((deps.readFile ?? ((file) => fs.readFileSync(file, "utf8")))(path.join(deps.homeDir ?? os.homedir(), fleet_readings_1.LOCAL_BALANCER_STATE)));
|
|
73
|
+
if (typeof state?.last?.machine === "string")
|
|
74
|
+
name = state.last.machine.trim();
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// no balancer on this Mac
|
|
78
|
+
}
|
|
79
|
+
if (!name && (deps.platform ?? process.platform) === "darwin") {
|
|
71
80
|
const result = spawnOf(deps)("/usr/sbin/scutil", ["--get", "LocalHostName"], { encoding: "utf8", timeout: 3000 });
|
|
72
81
|
name = result.status === 0 ? String(result.stdout ?? "").trim() : "";
|
|
73
82
|
}
|
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.1038",
|
|
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.1038",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@ouro.bot/friends": "0.1.0-alpha.18",
|