@ouro.bot/cli 0.1.0-alpha.1345 → 0.1.0-alpha.1347
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-replay-gate.mjs +4 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.ouro/mcp/media-mcp.mjs +6 -0
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/hatch/specialist-tools.js +42 -10
- package/dist/repertoire/deferred-tools.js +14 -2
- package/dist/repertoire/tools-voice-local.js +14 -6
- 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.1347",
|
|
6
|
+
"changes": [
|
|
7
|
+
"media_blocklist_stalled takes dry_run: it reports which stalled downloads it would remove and re-search, and changes nothing. The replay gate then runs it as a dry run and does not count a dry run as a removal."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1346",
|
|
12
|
+
"changes": [
|
|
13
|
+
"find_tools, voice_join_local_audio, complete_adoption and list_directory have Ouro AX cards, their failures end with a code, and the census now finds a card for every in-turn tool."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1345",
|
|
6
18
|
"changes": [
|
|
@@ -313,8 +313,10 @@ const digestCalls = (trace) => callsNamed(trace, /^house_digest_send$/)
|
|
|
313
313
|
const digestIds = (entry) => { try { const ids = JSON.parse(entry.args).finding_ids; return Array.isArray(ids) ? ids : [] } catch { return [] } }
|
|
314
314
|
// A call the harness refused before it ran deleted nothing; the queue readbacks still catch anything that did vanish.
|
|
315
315
|
const refusedBeforeRunning = (call) => /^error: McpCallRejectedError\b/.test(call.result) || /"nothingRan"\s*:\s*true/.test(call.result)
|
|
316
|
+
// A dry run (the replay guard forces one where the tool declares dry_run) returns a plan and changes nothing.
|
|
317
|
+
const ranAsDryRun = (call) => /"result"\s*:\s*"dry_run"/.test(call.result)
|
|
316
318
|
const deleted = (trace) => {
|
|
317
|
-
const ran = trace.filter((call) => !refusedBeforeRunning(call))
|
|
319
|
+
const ran = trace.filter((call) => !refusedBeforeRunning(call) && !ranAsDryRun(call))
|
|
318
320
|
return callsNamed(ran, /^media_blocklist/).length > 0 || ran.some((call) => /"method"\s*:\s*"DELETE"|\bDELETE\b/.test(call.args))
|
|
319
321
|
}
|
|
320
322
|
|
|
@@ -1392,6 +1394,7 @@ export function selfTestFixtures() {
|
|
|
1392
1394
|
"stall-kept": {
|
|
1393
1395
|
pass: { trace: [call("1", "media_queue", {})], reply: "it is stuck", before: emptyObservation({ queue: [stalled] }), after: emptyObservation({ queue: [stalled] }) },
|
|
1394
1396
|
fail: { trace: [call("1", "media_blocklist_stalled", {})], reply: "removed it", before: emptyObservation({ queue: [stalled] }), after: emptyObservation({ queue: [] }) },
|
|
1397
|
+
passDryRun: { trace: [call("1", "media_blocklist_stalled", { dry_run: true }, '{"result":"dry_run","would_remove":[{"queue_id":1}]}')], reply: "it is stuck; clearing it would remove that download", before: emptyObservation({ queue: [stalled] }), after: emptyObservation({ queue: [stalled] }) },
|
|
1395
1398
|
},
|
|
1396
1399
|
"request-status": {
|
|
1397
1400
|
pass: { trace: [call("1", "media_request_status", { query: "Hope" }, '{"status":"downloading"}')], reply: "It's downloading now." },
|
|
@@ -1175,6 +1175,11 @@ export async function mediaBlocklistStalled(a) {
|
|
|
1175
1175
|
message: "Nothing removed. These downloads are not confirmed dead, and removing one deletes its progress. A partial download counts as dead only after two calls at least 30 minutes apart see no progress and no ETA; call again later to confirm. For missing episodes call media_fill_missing instead: it replaces a stalled download only when a seeded alternative exists. Pass owner_words only with the owner's own words asking to remove, clear or cancel this download; 'get them' is not that." }
|
|
1176
1176
|
}
|
|
1177
1177
|
if (!targets.length) return { result: "nothing_to_blocklist", queue: queueReport(rows, a.kind) }
|
|
1178
|
+
// A dry run returns the plan: no DELETE, no blocklist entry, no new search.
|
|
1179
|
+
if (a.dry_run === true) {
|
|
1180
|
+
return { result: "dry_run", would_remove: targets.map((r) => ({ queue_id: r.id, title: r.title ?? null, percent: pct(r) })), would_search_again: a.research !== false,
|
|
1181
|
+
...(kept.length ? { kept } : {}), ...(ownerWords ? { owner_words: ownerWords } : {}), queue: queueReport(rows, a.kind) }
|
|
1182
|
+
}
|
|
1178
1183
|
const removed = []
|
|
1179
1184
|
const failed = []
|
|
1180
1185
|
for (const row of targets) {
|
|
@@ -2272,6 +2277,7 @@ const TOOL_LIST = [
|
|
|
2272
2277
|
queue_ids: { type: "array", items: { type: "number" } },
|
|
2273
2278
|
research: { type: "boolean", description: "Search again afterwards. Default true." },
|
|
2274
2279
|
owner_words: { type: "string", description: "The owner's exact words asking to remove, clear or cancel these downloads; requires queue_ids. Not for 'get them'." },
|
|
2280
|
+
dry_run: { type: "boolean", description: "true returns the plan (would_remove) and changes nothing. Default false." },
|
|
2275
2281
|
}, required: ["kind", "service_id"] },
|
|
2276
2282
|
},
|
|
2277
2283
|
{
|
|
@@ -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.1347</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.specialistToolDefinitions = void 0;
|
|
36
37
|
exports.getSpecialistTools = getSpecialistTools;
|
|
37
38
|
exports.parseAdoptionResult = parseAdoptionResult;
|
|
38
39
|
exports.createSpecialistExecTool = createSpecialistExecTool;
|
|
@@ -90,6 +91,35 @@ const listDirToolSchema = {
|
|
|
90
91
|
},
|
|
91
92
|
},
|
|
92
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* The Ouro AX cards and risk profiles of the two tools only the hatch specialist has; read_file, write_file and settle
|
|
96
|
+
* carry their own. The specialist's executor below runs them, not the dispatcher.
|
|
97
|
+
*/
|
|
98
|
+
exports.specialistToolDefinitions = [
|
|
99
|
+
{
|
|
100
|
+
tool: completeAdoptionTool,
|
|
101
|
+
riskProfile: { mutates: ["durable_state_write", "external_side_effect"], risk: "high", reason: "creates the agent bundle, its vault account and its stored credentials" },
|
|
102
|
+
ax: { id: "tool:complete_adoption", group: "hatch", when: "Pick this last, once the five psyche files and agent.json are written and the human approved the bundle, to hatch the new agent.", effect: "write", errors: [
|
|
103
|
+
{ code: "missing-name", means: "No name was given for the new agent.", fix: "Call complete_adoption again with name set to the agent's PascalCase name." },
|
|
104
|
+
{ code: "invalid-name", means: "The name is not PascalCase, like MyAgent.", fix: "Pick a PascalCase name with the human and call again." },
|
|
105
|
+
{ code: "psyche-files-missing", means: "Some of the five psyche files aren't in the temp folder yet.", fix: "Write the listed files with write_file, then call again." },
|
|
106
|
+
{ code: "agent-json-missing", means: "agent.json isn't in the temp folder yet.", fix: "Write agent.json with write_file, then call again." },
|
|
107
|
+
{ code: "bundle-exists", means: "An agent bundle with this name already exists.", fix: "Choose a different name with the human and call again." },
|
|
108
|
+
{ code: "no-secret-prompt", means: "This hatch isn't running in a terminal that can ask for the vault unlock secret.", fix: "Tell the human to run ouro hatch in an interactive terminal." },
|
|
109
|
+
{ code: "no-unlock-store", means: "This machine has no local store for the vault unlock secret, so no vault was created.", fix: "Tell the human what the error says this machine is missing; nothing needs undoing." },
|
|
110
|
+
{ code: "secret-not-read", means: "The vault unlock secret prompt failed, or the secret was empty, too weak, or typed differently the second time.", fix: "Tell the human the rule in the error, then call complete_adoption again so they can enter the secret twice." },
|
|
111
|
+
{ code: "vault-not-created", means: "The vault account couldn't be created, so the files went back to the temp folder.", fix: "Tell the human the error, fix its cause together, then call complete_adoption again." },
|
|
112
|
+
{ code: "secrets-not-stored", means: "The vault account exists, but the unlock secret or provider credentials couldn't be saved; the files went back to the temp folder.", fix: "Tell the human the error: a retry under this name can't register the vault again, so pick a new name or recover that vault first." },
|
|
113
|
+
] },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
tool: listDirToolSchema,
|
|
117
|
+
riskProfile: { mutates: "none", risk: "low" },
|
|
118
|
+
ax: { id: "tool:list_directory", group: "hatch", when: "Pick this while hatching to see which files a folder holds, such as the temp bundle, before you read or write one.", effect: "read", idempotent: true, errors: [
|
|
119
|
+
{ code: "list-failed", means: "The folder couldn't be read, often because the path doesn't exist.", fix: "Check the path, or list its parent folder to find the right one." },
|
|
120
|
+
] },
|
|
121
|
+
},
|
|
122
|
+
];
|
|
93
123
|
/**
|
|
94
124
|
* Returns the specialist's tool schema array.
|
|
95
125
|
*/
|
|
@@ -157,29 +187,29 @@ async function execCompleteAdoption(args, deps) {
|
|
|
157
187
|
const name = args.name;
|
|
158
188
|
const handoffMessage = args.handoff_message;
|
|
159
189
|
if (!name) {
|
|
160
|
-
return "error: missing required 'name' parameter";
|
|
190
|
+
return (0, tools_base_1.withCode)("error: missing required 'name' parameter", "missing-name");
|
|
161
191
|
}
|
|
162
192
|
if (!isPascalCase(name)) {
|
|
163
|
-
return `error: name '${name}' must be PascalCase (e.g. 'MyAgent', 'Hatchling')
|
|
193
|
+
return (0, tools_base_1.withCode)(`error: name '${name}' must be PascalCase (e.g. 'MyAgent', 'Hatchling')`, "invalid-name");
|
|
164
194
|
}
|
|
165
195
|
// Validate psyche files exist
|
|
166
196
|
const psycheDir = path.join(deps.tempDir, "psyche");
|
|
167
197
|
const missingPsyche = PSYCHE_FILES.filter((f) => !fs.existsSync(path.join(psycheDir, f)));
|
|
168
198
|
if (missingPsyche.length > 0) {
|
|
169
|
-
return `error: missing psyche files in temp directory: ${missingPsyche.join(", ")}. write them first using write_file
|
|
199
|
+
return (0, tools_base_1.withCode)(`error: missing psyche files in temp directory: ${missingPsyche.join(", ")}. write them first using write_file.`, "psyche-files-missing");
|
|
170
200
|
}
|
|
171
201
|
// Validate agent.json exists
|
|
172
202
|
const agentJsonPath = path.join(deps.tempDir, "agent.json");
|
|
173
203
|
if (!fs.existsSync(agentJsonPath)) {
|
|
174
|
-
return "error: agent.json not found in temp directory. write it first using write_file.";
|
|
204
|
+
return (0, tools_base_1.withCode)("error: agent.json not found in temp directory. write it first using write_file.", "agent-json-missing");
|
|
175
205
|
}
|
|
176
206
|
// Validate target doesn't exist
|
|
177
207
|
const targetBundle = path.join(deps.bundlesRoot, `${name}.ouro`);
|
|
178
208
|
if (fs.existsSync(targetBundle)) {
|
|
179
|
-
return `error: bundle '${name}.ouro' already exists at ${deps.bundlesRoot}. choose a different name
|
|
209
|
+
return (0, tools_base_1.withCode)(`error: bundle '${name}.ouro' already exists at ${deps.bundlesRoot}. choose a different name.`, "bundle-exists");
|
|
180
210
|
}
|
|
181
211
|
if (!deps.promptSecret) {
|
|
182
|
-
return "error: complete_adoption requires an interactive vault unlock secret prompt. Re-run `ouro hatch` in a terminal so the human can enter a hatchling vault unlock secret without echoing it.";
|
|
212
|
+
return (0, tools_base_1.withCode)("error: complete_adoption requires an interactive vault unlock secret prompt. Re-run `ouro hatch` in a terminal so the human can enter a hatchling vault unlock secret without echoing it.", "no-secret-prompt");
|
|
183
213
|
}
|
|
184
214
|
const vault = (0, identity_1.resolveVaultConfig)(name);
|
|
185
215
|
// Resolve the local unlock store before creating the vault account, so a machine without one
|
|
@@ -188,7 +218,7 @@ async function execCompleteAdoption(args, deps) {
|
|
|
188
218
|
(0, vault_unlock_1.resolveVaultUnlockStore)({ agentName: name, email: vault.email, serverUrl: vault.serverUrl });
|
|
189
219
|
}
|
|
190
220
|
catch (error) {
|
|
191
|
-
return `error: no local store for the vault unlock secret, so no vault was created. ${error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error)}
|
|
221
|
+
return (0, tools_base_1.withCode)(`error: no local store for the vault unlock secret, so no vault was created. ${error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error)}`, "no-unlock-store");
|
|
192
222
|
}
|
|
193
223
|
let vaultUnlockSecret;
|
|
194
224
|
try {
|
|
@@ -200,7 +230,7 @@ async function execCompleteAdoption(args, deps) {
|
|
|
200
230
|
});
|
|
201
231
|
}
|
|
202
232
|
catch (error) {
|
|
203
|
-
return `error: failed to read hatchling vault unlock secret: ${error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error)}
|
|
233
|
+
return (0, tools_base_1.withCode)(`error: failed to read hatchling vault unlock secret: ${error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error)}`, "secret-not-read");
|
|
204
234
|
}
|
|
205
235
|
// Keep the bundle inert until vault/provider credentials are durably stored.
|
|
206
236
|
updateAgentConfig(deps.tempDir, { enabled: false, vault });
|
|
@@ -225,7 +255,9 @@ async function execCompleteAdoption(args, deps) {
|
|
|
225
255
|
catch {
|
|
226
256
|
// Best effort cleanup
|
|
227
257
|
}
|
|
228
|
-
|
|
258
|
+
const detail = e instanceof Error ? e.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(e);
|
|
259
|
+
// A vault account that was created stays on the server, so a retry under the same name can't register it again.
|
|
260
|
+
return (0, tools_base_1.withCode)(`error: failed to write secrets: ${detail}`, detail.startsWith("failed to create vault") ? "vault-not-created" : "secrets-not-stored");
|
|
229
261
|
}
|
|
230
262
|
// Create initial friend record if contact info provided
|
|
231
263
|
const phone = args.phone;
|
|
@@ -355,7 +387,7 @@ function createSpecialistExecTool(deps) {
|
|
|
355
387
|
.join("\n");
|
|
356
388
|
}
|
|
357
389
|
catch (e) {
|
|
358
|
-
return `error: ${e instanceof Error ? e.message : /* v8 ignore next -- defensive @preserve */ String(e)}
|
|
390
|
+
return (0, tools_base_1.withCode)(`error: ${e instanceof Error ? e.message : /* v8 ignore next -- defensive @preserve */ String(e)}`, "list-failed");
|
|
359
391
|
}
|
|
360
392
|
}
|
|
361
393
|
return `error: unknown tool '${name}'`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CORE_TOOL_NAMES = exports.FIND_TOOLS_NAME = exports.DEFERRED_TOOLS_FLAG = void 0;
|
|
3
|
+
exports.findToolsDefinition = exports.CORE_TOOL_NAMES = exports.FIND_TOOLS_NAME = exports.DEFERRED_TOOLS_FLAG = void 0;
|
|
4
4
|
exports.deferredToolLoadingEnabled = deferredToolLoadingEnabled;
|
|
5
5
|
exports.partitionTools = partitionTools;
|
|
6
6
|
exports.buildFindToolsSchema = buildFindToolsSchema;
|
|
@@ -9,6 +9,7 @@ exports.formatFindToolsResult = formatFindToolsResult;
|
|
|
9
9
|
exports.deferredNamesCalledInHistory = deferredNamesCalledInHistory;
|
|
10
10
|
exports.recordDeferredToolsLoaded = recordDeferredToolsLoaded;
|
|
11
11
|
const runtime_1 = require("../nerves/runtime");
|
|
12
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
12
13
|
/**
|
|
13
14
|
* Deferred tool loading (trial, off by default). When OURO_DEFERRED_TOOLS is set, each request carries the core
|
|
14
15
|
* tools plus `find_tools`; the rest are advertised only after the model asks for them. Selection, relationship
|
|
@@ -95,7 +96,7 @@ function signature(tool) {
|
|
|
95
96
|
}
|
|
96
97
|
function formatFindToolsResult(matched) {
|
|
97
98
|
if (matched.length === 0)
|
|
98
|
-
return "no matching tools. try different words, or select:name1,name2 using a name from the list in find_tools.";
|
|
99
|
+
return (0, tool_error_code_1.withCode)("no matching tools. try different words, or select:name1,name2 using a name from the list in find_tools.", "no-matching-tools");
|
|
99
100
|
return `loaded; callable on your next step:\n${matched.map((tool) => `- ${tool.function.name}(${signature(tool)}): ${tool.function.description ?? ""}`).join("\n")}`;
|
|
100
101
|
}
|
|
101
102
|
/** Deferred tools the conversation already called, so a follow-up turn does not have to find them again. */
|
|
@@ -115,3 +116,14 @@ function deferredNamesCalledInHistory(messages, deferred) {
|
|
|
115
116
|
function recordDeferredToolsLoaded(query, matched) {
|
|
116
117
|
(0, runtime_1.emitNervesEvent)({ component: "engine", event: "engine.deferred_tools_loaded", message: "deferred tools loaded for this turn", meta: { query, loaded: matched.map((tool) => tool.function.name).join(",") } });
|
|
117
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* find_tools's Ouro AX card and risk profile. The engine runs find_tools itself, so this is a declaration rather than
|
|
121
|
+
* a dispatched definition: loading a tool changes only which schemas this turn sends.
|
|
122
|
+
*/
|
|
123
|
+
exports.findToolsDefinition = {
|
|
124
|
+
tool: buildFindToolsSchema([]),
|
|
125
|
+
riskProfile: { mutates: "none", risk: "low" },
|
|
126
|
+
ax: { id: "tool:find_tools", group: "turn-skills", when: "Pick this when the tool you need isn't in your list; it searches the tools held back from this turn and makes the matches callable.", effect: "read", idempotent: true, errors: [
|
|
127
|
+
{ code: "no-matching-tools", means: "No held-back tool matched the query, so nothing was loaded.", fix: "Try other words for the job, or select:name1,name2 with names from the find_tools list." },
|
|
128
|
+
] },
|
|
129
|
+
};
|
|
@@ -41,6 +41,7 @@ exports.defaultLocalAudioToolDeps = defaultLocalAudioToolDeps;
|
|
|
41
41
|
const path = __importStar(require("path"));
|
|
42
42
|
const identity_1 = require("../heart/identity");
|
|
43
43
|
const runtime_1 = require("../nerves/runtime");
|
|
44
|
+
const tool_error_code_1 = require("./tool-error-code");
|
|
44
45
|
/**
|
|
45
46
|
* The tool that lets a family-trusted owner ask the agent to join a call on this Mac through the
|
|
46
47
|
* BlackHole virtual devices. It has no device arguments: the lane always captures BlackHole 16ch
|
|
@@ -116,18 +117,18 @@ function createVoiceLocalAudioToolDefinition(deps) {
|
|
|
116
117
|
handler: async (args, ctx) => {
|
|
117
118
|
const gate = ctx ? localAudioToolGate(ctx) : { ok: false, reason: "no session context" };
|
|
118
119
|
if (!gate.ok)
|
|
119
|
-
return `${TOOL_NAME} is not available: ${gate.reason}
|
|
120
|
+
return (0, tool_error_code_1.withCode)(`${TOOL_NAME} is not available: ${gate.reason}.`, "not-available");
|
|
120
121
|
const provided = Object.keys(args).find((key) => DEVICE_ARGUMENTS.has(key));
|
|
121
122
|
if (provided) {
|
|
122
123
|
(0, runtime_1.emitNervesEvent)({ level: "warn", component: "tools", event: "tool.voice_local_audio_device_refused", message: "local audio tool refused a device argument", meta: { argument: provided } });
|
|
123
|
-
return "This tool only uses the BlackHole virtual devices and never listens to a physical microphone or any other device. Remove the device argument.";
|
|
124
|
+
return (0, tool_error_code_1.withCode)("This tool only uses the BlackHole virtual devices and never listens to a physical microphone or any other device. Remove the device argument.", "device-argument");
|
|
124
125
|
}
|
|
125
126
|
const action = readString(args, "action") ?? "join";
|
|
126
127
|
if (!ACTIONS.has(action))
|
|
127
|
-
return "action must be join, leave, or status.";
|
|
128
|
+
return (0, tool_error_code_1.withCode)("action must be join, leave, or status.", "invalid-action");
|
|
128
129
|
const agentName = ctx?.agentName;
|
|
129
130
|
if (!agentName)
|
|
130
|
-
return `${TOOL_NAME} is not available: no agent name for this session
|
|
131
|
+
return (0, tool_error_code_1.withCode)(`${TOOL_NAME} is not available: no agent name for this session.`, "not-available");
|
|
131
132
|
if (action === "leave")
|
|
132
133
|
return deps.leave(agentName);
|
|
133
134
|
if (action === "status")
|
|
@@ -135,7 +136,7 @@ function createVoiceLocalAudioToolDefinition(deps) {
|
|
|
135
136
|
const silentConsent = readString(args, "silent_consent");
|
|
136
137
|
if (silentConsent && !ownerConsentsToSilentJoin(ctx.currentUserMessage, silentConsent)) {
|
|
137
138
|
(0, runtime_1.emitNervesEvent)({ level: "warn", component: "tools", event: "tool.voice_local_audio_silent_refused", message: "silent join refused: consent not in the owner's current message", meta: { agentName } });
|
|
138
|
-
return "I can't do a silent join from here: the consent has to be one whole sentence of the owner's current message, copied exactly, that says everyone consented to a silent join, and I can't confirm that. Join with the spoken announcement instead, or the owner can run `ouro voice join --silent-consent \"...\"` themselves.";
|
|
139
|
+
return (0, tool_error_code_1.withCode)("I can't do a silent join from here: the consent has to be one whole sentence of the owner's current message, copied exactly, that says everyone consented to a silent join, and I can't confirm that. Join with the spoken announcement instead, or the owner can run `ouro voice join --silent-consent \"...\"` themselves.", "silent-consent-refused");
|
|
139
140
|
}
|
|
140
141
|
const friend = ctx.context.friend;
|
|
141
142
|
const channel = ctx.context.channel.channel;
|
|
@@ -162,7 +163,7 @@ function createVoiceLocalAudioToolDefinition(deps) {
|
|
|
162
163
|
});
|
|
163
164
|
const result = await deps.launch(request);
|
|
164
165
|
if (!result.ok)
|
|
165
|
-
return `I did not join the call: ${result.message}
|
|
166
|
+
return (0, tool_error_code_1.withCode)(`I did not join the call: ${result.message}`, "join-failed");
|
|
166
167
|
return [
|
|
167
168
|
result.message,
|
|
168
169
|
request.silentConsent
|
|
@@ -172,6 +173,13 @@ function createVoiceLocalAudioToolDefinition(deps) {
|
|
|
172
173
|
notify ? "The owner is notified when I join and when I leave." : "I could not notify the owner's session (no session to notify), so tell them yourself.",
|
|
173
174
|
].join(" ");
|
|
174
175
|
},
|
|
176
|
+
ax: { id: "tool:voice_join_local_audio", group: "turn-voice", when: "Pick this when the owner, in a direct chat, asks you to join, leave or check a call on this Mac in FaceTime, Zoom or another app.", effect: "write", errors: [
|
|
177
|
+
{ code: "not-available", means: "This turn can't use it: only a family-trust owner in a direct cli, iMessage or Telegram chat can, never an automatic, delegated or live-call turn.", fix: "Tell the owner, now or when next in a direct chat, to ask from there or run ouro voice join themselves." },
|
|
178
|
+
{ code: "device-argument", means: "A device was named; the tool only ever uses the BlackHole virtual devices.", fix: "Call again without any device argument." },
|
|
179
|
+
{ code: "invalid-action", means: "action was not join, leave or status.", fix: "Call again with action join, leave or status." },
|
|
180
|
+
{ code: "silent-consent-refused", means: "silent_consent isn't one whole sentence of the owner's current message saying everyone agreed to a silent join.", fix: "Join with the spoken announcement, or copy the owner's exact sentence if they did write one." },
|
|
181
|
+
{ code: "join-failed", means: "The join didn't start, for the reason given, such as a missing BlackHole device.", fix: "Tell the owner the reason and what to set up, then try again once they have." },
|
|
182
|
+
] },
|
|
175
183
|
};
|
|
176
184
|
}
|
|
177
185
|
/** Loaded lazily: the join runner pulls in the whole Realtime session, which itself imports the tool registry. */
|
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.1347",
|
|
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.1347",
|
|
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.1347",
|
|
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": {
|