@ouro.bot/cli 0.1.0-alpha.1177 → 0.1.0-alpha.1179
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 +14 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/attachments/understand.js +81 -7
- package/dist/heart/providers/anthropic.js +7 -0
- package/dist/heart/streaming.js +10 -0
- package/dist/mailbox-ui/assets/index-DNSDr1Lb.js +1 -0
- package/dist/mailbox-ui/assets/index-DooL30tv.css +1 -0
- package/dist/mailbox-ui/assets/{vendor-tRKTU6Ih.js → vendor-D_wlGdJf.js} +10 -10
- package/dist/mailbox-ui/index.html +3 -3
- package/dist/repertoire/guardrails.js +1 -1
- package/dist/repertoire/tools-attachments.js +8 -6
- package/dist/senses/teams.js +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/mailbox-ui/assets/index-CcfmfCyO.js +0 -1
- package/dist/mailbox-ui/assets/index-JVa7jDQI.css +0 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
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.1179",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Describe Teams screenshots and image attachments through the agent's configured vision provider without requiring a MiniMax key.",
|
|
8
|
+
"Reject truncated native image descriptions and preserve provider completion status and attachment timeouts.",
|
|
9
|
+
"Preserve Responses API failure messages and reject partial image descriptions from failed streams."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"version": "0.1.0-alpha.1178",
|
|
14
|
+
"changes": [
|
|
15
|
+
"The owner can ask for a psyche edit in a private Teams chat: the adapter now carries Teams' private/shared conversation status through friend resolution to tool authorization. Unknown conversation types remain unproven, and group, channel, non-family and agent requests stay blocked."
|
|
16
|
+
]
|
|
17
|
+
},
|
|
4
18
|
{
|
|
5
19
|
"version": "0.1.0-alpha.1177",
|
|
6
20
|
"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.1179</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,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.IMAGE_DESCRIPTION_TEXT = exports.ATTACHMENT_WORDS_TIMEOUT_MS = void 0;
|
|
36
|
+
exports.UnsupportedImageModelError = exports.IMAGE_DESCRIPTION_TEXT = exports.ATTACHMENT_WORDS_TIMEOUT_MS = void 0;
|
|
37
37
|
exports.imageDescriptionPrompt = imageDescriptionPrompt;
|
|
38
38
|
exports.imageFileDataUrl = imageFileDataUrl;
|
|
39
39
|
exports.describeImage = describeImage;
|
|
@@ -41,6 +41,8 @@ exports.attachmentWords = attachmentWords;
|
|
|
41
41
|
exports.attachmentTurnLines = attachmentTurnLines;
|
|
42
42
|
const fs = __importStar(require("node:fs/promises"));
|
|
43
43
|
const runtime_1 = require("../../nerves/runtime");
|
|
44
|
+
const identity_1 = require("../identity");
|
|
45
|
+
const model_capabilities_1 = require("../model-capabilities");
|
|
44
46
|
const provider_credentials_1 = require("../provider-credentials");
|
|
45
47
|
const minimax_1 = require("../providers/minimax");
|
|
46
48
|
const minimax_vlm_1 = require("../providers/minimax-vlm");
|
|
@@ -61,14 +63,84 @@ async function imageFileDataUrl(filePath, mimeType) {
|
|
|
61
63
|
const normalizedMime = mimeType?.trim().toLowerCase() || "image/jpeg";
|
|
62
64
|
return `data:${normalizedMime};base64,${(await fs.readFile(filePath)).toString("base64")}`;
|
|
63
65
|
}
|
|
64
|
-
|
|
66
|
+
class UnsupportedImageModelError extends Error {
|
|
67
|
+
}
|
|
68
|
+
exports.UnsupportedImageModelError = UnsupportedImageModelError;
|
|
69
|
+
const ignoreProgress = () => { };
|
|
70
|
+
/** Describe with the configured outward provider; never borrow another provider's credentials. */
|
|
65
71
|
async function describeImage(agentName, params) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
(0, runtime_1.emitNervesEvent)({
|
|
73
|
+
component: "senses",
|
|
74
|
+
event: "senses.image_description_start",
|
|
75
|
+
message: "describing an image with the configured provider",
|
|
76
|
+
meta: { attachmentId: params.attachmentGuid },
|
|
77
|
+
});
|
|
78
|
+
try {
|
|
79
|
+
// Loaded at call time because the provider runtime also imports the attachment tools.
|
|
80
|
+
const { getProviderRuntime } = await Promise.resolve().then(() => __importStar(require("../core")));
|
|
81
|
+
const runtime = await getProviderRuntime("human", { agentName, agentRoot: params.agentRoot ?? (0, identity_1.getAgentRoot)(agentName) });
|
|
82
|
+
let description;
|
|
83
|
+
if ((0, model_capabilities_1.getModelCapabilities)(runtime.model).vision === true) {
|
|
84
|
+
const messages = [{
|
|
85
|
+
role: "user",
|
|
86
|
+
content: [
|
|
87
|
+
{ type: "text", text: params.prompt },
|
|
88
|
+
{ type: "image_url", image_url: { url: params.imageDataUrl } },
|
|
89
|
+
],
|
|
90
|
+
}];
|
|
91
|
+
runtime.resetTurnState(messages);
|
|
92
|
+
const signal = params.timeoutMs === undefined ? undefined : AbortSignal.timeout(params.timeoutMs);
|
|
93
|
+
const result = await runtime.streamTurn({
|
|
94
|
+
messages,
|
|
95
|
+
activeTools: [],
|
|
96
|
+
signal,
|
|
97
|
+
callbacks: {
|
|
98
|
+
onModelStart: ignoreProgress,
|
|
99
|
+
onModelStreamStart: ignoreProgress,
|
|
100
|
+
onTextChunk: ignoreProgress,
|
|
101
|
+
onReasoningChunk: ignoreProgress,
|
|
102
|
+
onToolStart: ignoreProgress,
|
|
103
|
+
onToolEnd: ignoreProgress,
|
|
104
|
+
onError(error) { throw error; },
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
signal?.throwIfAborted();
|
|
108
|
+
if (!result.content.trim() || result.toolCalls.length > 0 || result.termination?.refused
|
|
109
|
+
|| result.termination?.finishReason === "length" || result.termination?.finishReason === "incomplete"
|
|
110
|
+
|| result.termination?.finishReason === "content_filter") {
|
|
111
|
+
throw new Error(`image description from ${runtime.id} (${runtime.model}) was empty, refused or incomplete; retry the image request`);
|
|
112
|
+
}
|
|
113
|
+
description = result.content;
|
|
114
|
+
}
|
|
115
|
+
else if (runtime.id === "minimax") {
|
|
116
|
+
const credential = await (0, provider_credentials_1.readProviderCredentialRecord)(agentName, "minimax");
|
|
117
|
+
const apiKey = credential.ok ? credential.record.credentials.apiKey : undefined;
|
|
118
|
+
if (!apiKey) {
|
|
119
|
+
throw new Error("image understanding needs a MiniMax API key in the agent vault — human-required: run `ouro auth --agent <agent> --provider minimax`");
|
|
120
|
+
}
|
|
121
|
+
description = await (0, minimax_vlm_1.minimaxVlmDescribe)({ ...params, apiKey: String(apiKey), baseURL: minimax_1.MINIMAX_PROVIDER_BASE_URL });
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
throw new UnsupportedImageModelError(`image understanding: configured outward model ${runtime.id} (${runtime.model}) does not support images; human-choice: select a vision-capable outward model with \`ouro use --agent ${agentName} --lane outward --provider <provider> --model <model>\``);
|
|
125
|
+
}
|
|
126
|
+
(0, runtime_1.emitNervesEvent)({
|
|
127
|
+
component: "senses",
|
|
128
|
+
event: "senses.image_description_end",
|
|
129
|
+
message: "image description received",
|
|
130
|
+
meta: { provider: runtime.id, model: runtime.model, descriptionLength: description.length },
|
|
131
|
+
});
|
|
132
|
+
return description;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
(0, runtime_1.emitNervesEvent)({
|
|
136
|
+
level: "warn",
|
|
137
|
+
component: "senses",
|
|
138
|
+
event: "senses.image_description_error",
|
|
139
|
+
message: "image description unavailable",
|
|
140
|
+
meta: { attachmentId: params.attachmentGuid },
|
|
141
|
+
});
|
|
142
|
+
throw error;
|
|
70
143
|
}
|
|
71
|
-
return (0, minimax_vlm_1.minimaxVlmDescribe)({ apiKey: String(apiKey), baseURL: minimax_1.MINIMAX_PROVIDER_BASE_URL, ...params });
|
|
72
144
|
}
|
|
73
145
|
/** Turn stored attachments into words for a text-only turn. Other kinds stay listed in the attachment block for the tools. */
|
|
74
146
|
async function attachmentWords(records, context) {
|
|
@@ -84,6 +156,8 @@ async function attachmentWords(records, context) {
|
|
|
84
156
|
imageDataUrl: await imageFileDataUrl(image.path, image.mimeType),
|
|
85
157
|
attachmentGuid: record.id,
|
|
86
158
|
mimeType: image.mimeType,
|
|
159
|
+
agentRoot: context.agentRoot,
|
|
160
|
+
timeoutMs: context.timeoutMs,
|
|
87
161
|
});
|
|
88
162
|
lines.push(exports.IMAGE_DESCRIPTION_TEXT.description(description));
|
|
89
163
|
}
|
|
@@ -372,6 +372,7 @@ async function streamAnthropicMessages(client, model, request, options = { claud
|
|
|
372
372
|
let content = "";
|
|
373
373
|
let streamStarted = false;
|
|
374
374
|
let usage;
|
|
375
|
+
let termination;
|
|
375
376
|
const toolCalls = new Map();
|
|
376
377
|
const thinkingBlocks = new Map();
|
|
377
378
|
const redactedBlocks = new Map();
|
|
@@ -467,6 +468,11 @@ async function streamAnthropicMessages(client, model, request, options = { claud
|
|
|
467
468
|
continue;
|
|
468
469
|
}
|
|
469
470
|
if (eventType === "message_delta") {
|
|
471
|
+
const stopReason = event.delta?.stop_reason;
|
|
472
|
+
if (stopReason === "max_tokens" || stopReason === "model_context_window_exceeded"
|
|
473
|
+
|| stopReason === "pause_turn" || stopReason === "refusal") {
|
|
474
|
+
termination = { finishReason: "incomplete", refused: stopReason === "refusal" };
|
|
475
|
+
}
|
|
470
476
|
const rawUsage = event.usage;
|
|
471
477
|
if (rawUsage && typeof rawUsage === "object") {
|
|
472
478
|
usage = toAnthropicUsage(rawUsage);
|
|
@@ -508,6 +514,7 @@ async function streamAnthropicMessages(client, model, request, options = { claud
|
|
|
508
514
|
toolCalls: completedToolCalls,
|
|
509
515
|
outputItems,
|
|
510
516
|
usage,
|
|
517
|
+
...(termination ? { termination } : {}),
|
|
511
518
|
settleStreamed: answerStreamer.streamed,
|
|
512
519
|
...(settleFinalization ? { settleFinalization } : {}),
|
|
513
520
|
};
|
package/dist/heart/streaming.js
CHANGED
|
@@ -788,6 +788,7 @@ async function streamResponsesApi(client, createParams, callbacks, signal, eager
|
|
|
788
788
|
let streamStarted = false;
|
|
789
789
|
const toolCalls = [];
|
|
790
790
|
const outputItems = [];
|
|
791
|
+
let incomplete = false;
|
|
791
792
|
let currentToolCall = null;
|
|
792
793
|
let usage;
|
|
793
794
|
const answerStreamer = new SettleStreamer(callbacks, eagerSettleStreaming);
|
|
@@ -856,8 +857,16 @@ async function streamResponsesApi(client, createParams, callbacks, signal, eager
|
|
|
856
857
|
}
|
|
857
858
|
break;
|
|
858
859
|
}
|
|
860
|
+
case "response.failed":
|
|
861
|
+
case "response.incomplete":
|
|
859
862
|
case "response.completed":
|
|
860
863
|
case "response.done": {
|
|
864
|
+
if (event.type === "response.failed" || event.response?.status === "failed") {
|
|
865
|
+
const message = event.response?.error?.message;
|
|
866
|
+
throw new Error(`Responses API failed: ${typeof message === "string" ? message : "without error details"}`);
|
|
867
|
+
}
|
|
868
|
+
if (event.type === "response.incomplete" || event.response?.status === "incomplete")
|
|
869
|
+
incomplete = true;
|
|
861
870
|
const u = event.response?.usage;
|
|
862
871
|
if (u) {
|
|
863
872
|
usage = {
|
|
@@ -911,6 +920,7 @@ async function streamResponsesApi(client, createParams, callbacks, signal, eager
|
|
|
911
920
|
toolCalls,
|
|
912
921
|
outputItems,
|
|
913
922
|
usage,
|
|
923
|
+
...(incomplete ? { termination: { finishReason: "incomplete", refused: false } } : {}),
|
|
914
924
|
settleStreamed: answerStreamer.streamed,
|
|
915
925
|
...(settleFinalization ? { settleFinalization } : {}),
|
|
916
926
|
};
|