@ouro.bot/cli 0.1.0-alpha.1104 → 0.1.0-alpha.1106
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/repertoire/guardrails.js +1 -1
- package/dist/repertoire/tools-surface.js +5 -1
- package/dist/senses/teams.js +9 -1
- 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.1106",
|
|
6
|
+
"changes": [
|
|
7
|
+
"When a surface send to Teams fails, the result now says the send failed and delivery is not confirmed, instead of reading like a plain queue. The message is still queued for the next Teams message, as before."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.1105",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Teams now tells the agent when a chat is shared with other people, so a Teams group chat or channel no longer gets one-to-one privileges."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.1104",
|
|
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.1106</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -193,7 +193,7 @@ function psycheWriteAllowed(fileClass, _filePath, context) {
|
|
|
193
193
|
&& context.trustLevel === "family"
|
|
194
194
|
&& context.channel !== undefined && PSYCHE_IDENTITY_CHANNELS.has(context.channel)
|
|
195
195
|
&& context.isGroupChat !== true
|
|
196
|
-
// Teams
|
|
196
|
+
// On Teams only an explicit one-to-one counts: the sense reports a conversation of unknown type as one-to-one.
|
|
197
197
|
&& (context.channel !== "teams" || context.isGroupChat === false);
|
|
198
198
|
}
|
|
199
199
|
/** The line a successful write to an identity file carries back to the agent. */
|
|
@@ -188,7 +188,11 @@ async function routeSurfaceToFriend(agentName, friendId, content, queueItem, hin
|
|
|
188
188
|
const sent = await sendTeamsOffTurn({ friendId: target.friendId, key: target.key, text: content, origin: "proactive" }, { agentRoot });
|
|
189
189
|
if (sent?.forwardedTo)
|
|
190
190
|
return { status: "queued", detail: `forwarded to ${sent.forwardedTo}, which runs Teams; it sends on its next sync` };
|
|
191
|
-
|
|
191
|
+
if (sent?.delivered)
|
|
192
|
+
return { status: "delivered", detail: "sent to Teams now" };
|
|
193
|
+
if (sent?.reason === "send_error")
|
|
194
|
+
return queueToSession(target, `Teams send failed, so delivery is not confirmed; saved ${detail}`);
|
|
195
|
+
return queueToSession(target, detail);
|
|
192
196
|
};
|
|
193
197
|
const deliverOrQueue = (target, detail) => target.channel === "telegram"
|
|
194
198
|
? deliverTelegramOrQueue(target, detail)
|
package/dist/senses/teams.js
CHANGED
|
@@ -44,6 +44,7 @@ exports.createTeamsCallbacks = createTeamsCallbacks;
|
|
|
44
44
|
exports.reasoningStatus = reasoningStatus;
|
|
45
45
|
exports.withConversationLock = withConversationLock;
|
|
46
46
|
exports.parseTeamsQuotedReply = parseTeamsQuotedReply;
|
|
47
|
+
exports.teamsIsGroupChat = teamsIsGroupChat;
|
|
47
48
|
exports.oauthSigninUnavailableReason = oauthSigninUnavailableReason;
|
|
48
49
|
exports.recordOAuthSigninFailure = recordOAuthSigninFailure;
|
|
49
50
|
exports.oauthSigninUnavailableNotice = oauthSigninUnavailableNotice;
|
|
@@ -817,6 +818,11 @@ function parseTeamsQuotedReply(attachments, ids) {
|
|
|
817
818
|
}
|
|
818
819
|
return undefined;
|
|
819
820
|
}
|
|
821
|
+
// Context from the Teams activity that carries OAuth tokens and signin ability
|
|
822
|
+
/** Teams calls a one-to-one chat "personal"; a group chat or channel is shared with other people. Unknown counts as one-to-one, as before. */
|
|
823
|
+
function teamsIsGroupChat(conversationType) {
|
|
824
|
+
return conversationType !== undefined && conversationType !== "personal";
|
|
825
|
+
}
|
|
820
826
|
const OAUTH_SERVICE_LABELS = { graph: "Microsoft Graph", ado: "Azure DevOps", github: "GitHub" };
|
|
821
827
|
const OAUTH_UNAVAILABLE_TTL_MS = 60 * 60 * 1000;
|
|
822
828
|
// Sign-ins that could not start, by OAuth connection name. Kept for an hour so every turn in between can say why
|
|
@@ -1042,7 +1048,7 @@ async function handleTeamsMessage(text, stream, conversationId, teamsContext, se
|
|
|
1042
1048
|
provider,
|
|
1043
1049
|
externalId,
|
|
1044
1050
|
tenantId: teamsContext?.tenantId,
|
|
1045
|
-
isGroupChat: false,
|
|
1051
|
+
isGroupChat: teamsContext?.isGroupChat ?? false,
|
|
1046
1052
|
groupHasFamilyMember: false,
|
|
1047
1053
|
hasExistingGroupWithFamily: false,
|
|
1048
1054
|
enforceTrustGate: trust_gate_1.enforceTrustGate,
|
|
@@ -1308,6 +1314,7 @@ function registerBotHandlers(app, label) {
|
|
|
1308
1314
|
const teamsContext = {
|
|
1309
1315
|
replyToId: activity.replyToId,
|
|
1310
1316
|
signin: async () => undefined,
|
|
1317
|
+
isGroupChat: teamsIsGroupChat(activity.conversation?.conversationType),
|
|
1311
1318
|
aadObjectId: activity.from?.aadObjectId,
|
|
1312
1319
|
tenantId: activity.conversation?.tenantId,
|
|
1313
1320
|
displayName: activity.from?.name,
|
|
@@ -1501,6 +1508,7 @@ function registerBotHandlers(app, label) {
|
|
|
1501
1508
|
const teamsContext = {
|
|
1502
1509
|
inboundActivityId: activity.id,
|
|
1503
1510
|
replyToId: activity.replyToId,
|
|
1511
|
+
isGroupChat: teamsIsGroupChat(activity.conversation?.conversationType),
|
|
1504
1512
|
quotedReply: parseTeamsQuotedReply(activity.attachments, { botId: activity.recipient?.id ?? app.id, userId }),
|
|
1505
1513
|
graphToken,
|
|
1506
1514
|
adoToken,
|
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.1106",
|
|
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.1106",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@ouro.bot/friends": "0.1.0-alpha.18",
|